diff options
author | Raven Szewczyk <git@eigenraven.me> | 2022-08-27 10:19:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-27 11:19:57 +0200 |
commit | 6f31720697bcc351421a4d86ba3bf749375dd12c (patch) | |
tree | 3adf8f318f22c892d74cd7c9d30b6dd3f11f11bd /src/main/java | |
parent | c3eac50decd33ee2be8703dfb2ecf9cdc31c2b67 (diff) | |
download | GT5-Unofficial-6f31720697bcc351421a4d86ba3bf749375dd12c.tar.gz GT5-Unofficial-6f31720697bcc351421a4d86ba3bf749375dd12c.tar.bz2 GT5-Unofficial-6f31720697bcc351421a4d86ba3bf749375dd12c.zip |
Update buildscript & apply spotless (#1306)
* Update dependencies
* Update buildscript, apply spotless
Diffstat (limited to 'src/main/java')
725 files changed, 135026 insertions, 38691 deletions
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index f59c7c18df..7025c16416 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -1,5 +1,8 @@ package gregtech; +import static gregtech.api.GregTech_API.registerCircuitProgrammer; +import static gregtech.api.enums.GT_Values.MOD_ID_FR; + import appeng.api.AEApi; import com.google.common.base.Stopwatch; import cpw.mods.fml.common.FMLCommonHandler; @@ -15,8 +18,6 @@ import cpw.mods.fml.common.event.FMLServerStartedEvent; import cpw.mods.fml.common.event.FMLServerStartingEvent; import cpw.mods.fml.common.event.FMLServerStoppingEvent; import cpw.mods.fml.common.registry.EntityRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTech_API; import gregtech.api.enchants.Enchantment_EnderDamage; import gregtech.api.enchants.Enchantment_Radioactivity; @@ -56,7 +57,6 @@ import gregtech.common.misc.GT_Command; import gregtech.common.tileentities.storage.GT_MetaTileEntity_DigitalChestBase; import gregtech.crossmod.Harvestcraft; import gregtech.crossmod.Waila; -import gregtech.loaders.ExtraIcons; import gregtech.loaders.load.GT_CoverBehaviorLoader; import gregtech.loaders.load.GT_FuelLoader; import gregtech.loaders.load.GT_ItemIterator; @@ -69,6 +69,13 @@ import gregtech.loaders.preload.*; import gregtech.nei.IMCForNEI; import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeOutput; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Locale; +import java.util.Map; +import java.util.function.Predicate; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; @@ -85,71 +92,67 @@ import net.minecraftforge.oredict.OreDictionary; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Locale; -import java.util.Map; -import java.util.function.Predicate; - -import static gregtech.api.GregTech_API.registerCircuitProgrammer; -import static gregtech.api.enums.GT_Values.MOD_ID_FR; - -@Mod(modid = "gregtech", name = "GregTech", version = "MC1710", +@Mod( + modid = "gregtech", + name = "GregTech", + version = "MC1710", guiFactory = "gregtech.client.GT_GuiFactory", - dependencies = " required-after:IC2;" + - " required-after:structurelib;" + - " required-after:gtnhlib;" + - " after:dreamcraft;" + - " after:Forestry;" + - " after:PFAAGeologica;" + - " after:Thaumcraft;" + - " after:Railcraft;" + - " after:appliedenergistics2;" + - " after:ThermalExpansion;" + - " after:TwilightForest;" + - " after:harvestcraft;" + - " after:magicalcrops;" + - " after:Botania;" + - " after:BuildCraft|Transport;" + - " after:BuildCraft|Silicon;" + - " after:BuildCraft|Factory;" + - " after:BuildCraft|Energy;" + - " after:BuildCraft|Core;" + - " after:BuildCraft|Builders;" + - " after:GalacticraftCore;" + - " after:GalacticraftMars;" + - " after:GalacticraftPlanets;" + - " after:ThermalExpansion|Transport;" + - " after:ThermalExpansion|Energy;" + - " after:ThermalExpansion|Factory;" + - " after:RedPowerCore;" + - " after:RedPowerBase;" + - " after:RedPowerMachine;" + - " after:RedPowerCompat;" + - " after:RedPowerWiring;" + - " after:RedPowerLogic;" + - " after:RedPowerLighting;" + - " after:RedPowerWorld;" + - " after:RedPowerControl;" + - " after:UndergroundBiomes;" + - " after:TConstruct;" + - " after:Translocator;" + - " after:gendustry;") + dependencies = " required-after:IC2;" + " required-after:structurelib;" + + " required-after:gtnhlib;" + + " after:dreamcraft;" + + " after:Forestry;" + + " after:PFAAGeologica;" + + " after:Thaumcraft;" + + " after:Railcraft;" + + " after:appliedenergistics2;" + + " after:ThermalExpansion;" + + " after:TwilightForest;" + + " after:harvestcraft;" + + " after:magicalcrops;" + + " after:Botania;" + + " after:BuildCraft|Transport;" + + " after:BuildCraft|Silicon;" + + " after:BuildCraft|Factory;" + + " after:BuildCraft|Energy;" + + " after:BuildCraft|Core;" + + " after:BuildCraft|Builders;" + + " after:GalacticraftCore;" + + " after:GalacticraftMars;" + + " after:GalacticraftPlanets;" + + " after:ThermalExpansion|Transport;" + + " after:ThermalExpansion|Energy;" + + " after:ThermalExpansion|Factory;" + + " after:RedPowerCore;" + + " after:RedPowerBase;" + + " after:RedPowerMachine;" + + " after:RedPowerCompat;" + + " after:RedPowerWiring;" + + " after:RedPowerLogic;" + + " after:RedPowerLighting;" + + " after:RedPowerWorld;" + + " after:RedPowerControl;" + + " after:UndergroundBiomes;" + + " after:TConstruct;" + + " after:Translocator;" + + " after:gendustry;") public class GT_Mod implements IGT_Mod { @Deprecated // Keep for use in BaseMetaTileEntity public static final int VERSION = 509, SUBVERSION = 40; + @SuppressWarnings("DeprecatedIsStillUsed") // Need initialization until it is deleted @Deprecated public static final int TOTAL_VERSION = calculateTotalGTVersion(VERSION, SUBVERSION); + @Deprecated public static final int REQUIRED_IC2 = 624; + @Mod.Instance("gregtech") public static GT_Mod instance; + @SidedProxy(modId = "gregtech", clientSide = "gregtech.common.GT_Client", serverSide = "gregtech.common.GT_Server") public static GT_Proxy gregtechproxy; + public static int MAX_IC2 = 2147483647; public static GT_Achievements achievements; public static final String aTextGeneral = "general"; @@ -157,8 +160,17 @@ public class GT_Mod implements IGT_Mod { public static final Logger GT_FML_LOGGER = LogManager.getLogger("GregTech GTNH"); static { - if ((509 != GregTech_API.VERSION) || (509 != GT_ModHandler.VERSION) || (509 != GT_OreDictUnificator.VERSION) || (509 != GT_Recipe.VERSION) || (509 != GT_Utility.VERSION) || (509 != GT_RecipeRegistrator.VERSION) || (509 != Element.VERSION) || (509 != Materials.VERSION) || (509 != OrePrefixes.VERSION)) { - throw new GT_ItsNotMyFaultException("One of your Mods included GregTech-API Files inside it's download, mention this to the Mod Author, who does this bad thing, and tell him/her to use reflection. I have added a Version check, to prevent Authors from breaking my Mod that way."); + if ((509 != GregTech_API.VERSION) + || (509 != GT_ModHandler.VERSION) + || (509 != GT_OreDictUnificator.VERSION) + || (509 != GT_Recipe.VERSION) + || (509 != GT_Utility.VERSION) + || (509 != GT_RecipeRegistrator.VERSION) + || (509 != Element.VERSION) + || (509 != Materials.VERSION) + || (509 != OrePrefixes.VERSION)) { + throw new GT_ItsNotMyFaultException( + "One of your Mods included GregTech-API Files inside it's download, mention this to the Mod Author, who does this bad thing, and tell him/her to use reflection. I have added a Version check, to prevent Authors from breaking my Mod that way."); } } @@ -222,7 +234,8 @@ public class GT_Mod implements IGT_Mod { GT_PreLoad.adjustScrap(); EntityRegistry.registerModEntity(GT_Entity_Arrow.class, "GT_Entity_Arrow", 1, GT_Values.GT, 160, 1, true); - EntityRegistry.registerModEntity(GT_Entity_Arrow_Potion.class, "GT_Entity_Arrow_Potion", 2, GT_Values.GT, 160, 1, true); + EntityRegistry.registerModEntity( + GT_Entity_Arrow_Potion.class, "GT_Entity_Arrow_Potion", 2, GT_Values.GT, 160, 1, true); GT_PreLoad.runMineTweakerCompat(); @@ -251,8 +264,7 @@ 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 @@ -280,16 +292,17 @@ public class GT_Mod implements IGT_Mod { gregtechproxy.onLoad(); - registerCircuitProgrammer(new Predicate<ItemStack>() { - private final int screwdriverOreId = OreDictionary.getOreID("craftingToolScrewdriver"); - @Override - public boolean test(ItemStack stack) { - for (int i : OreDictionary.getOreIDs(stack)) - if (i == screwdriverOreId) - return true; - return false; - } - }, true); + registerCircuitProgrammer( + new Predicate<ItemStack>() { + private final int screwdriverOreId = OreDictionary.getOreID("craftingToolScrewdriver"); + + @Override + public boolean test(ItemStack stack) { + for (int i : OreDictionary.getOreIDs(stack)) if (i == screwdriverOreId) return true; + return false; + } + }, + true); if (gregtechproxy.mSortToTheEnd) { new GT_ItemIterator().run(); @@ -310,7 +323,6 @@ public class GT_Mod implements IGT_Mod { e.printStackTrace(GT_Log.err); } } - } @Mod.EventHandler @@ -354,14 +366,42 @@ public class GT_Mod implements IGT_Mod { new GT_Worldgenloader().run(); new GT_CoverLoader().run(); - GT_RecipeRegistrator.registerUsagesForMaterials(null, false, new ItemStack(Blocks.planks, 1), new ItemStack(Blocks.cobblestone, 1), new ItemStack(Blocks.stone, 1), new ItemStack(Items.leather, 1)); - - GT_OreDictUnificator.addItemData(GT_ModHandler.getRecipeOutput(null, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L), null, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L), null, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L), null, null, null), new ItemData(Materials.Tin, 10886400L)); + GT_RecipeRegistrator.registerUsagesForMaterials( + null, + false, + new ItemStack(Blocks.planks, 1), + new ItemStack(Blocks.cobblestone, 1), + new ItemStack(Blocks.stone, 1), + new ItemStack(Items.leather, 1)); + + GT_OreDictUnificator.addItemData( + GT_ModHandler.getRecipeOutput( + null, + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L), + null, + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L), + null, + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L), + null, + null, + null), + new ItemData(Materials.Tin, 10886400L)); if (!GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.storageblockcrafting, "tile.glowstone", false)) { - GT_ModHandler.removeRecipe(new ItemStack(Items.glowstone_dust, 1), new ItemStack(Items.glowstone_dust, 1), null, new ItemStack(Items.glowstone_dust, 1), new ItemStack(Items.glowstone_dust, 1)); - } - GT_ModHandler.removeRecipeDelayed(new ItemStack(Blocks.wooden_slab, 1, 0), new ItemStack(Blocks.wooden_slab, 1, 1), new ItemStack(Blocks.wooden_slab, 1, 2)); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.wooden_slab, 6, 0), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"WWW", 'W', new ItemStack(Blocks.planks, 1, 0)}); + GT_ModHandler.removeRecipe( + new ItemStack(Items.glowstone_dust, 1), + new ItemStack(Items.glowstone_dust, 1), + null, + new ItemStack(Items.glowstone_dust, 1), + new ItemStack(Items.glowstone_dust, 1)); + } + GT_ModHandler.removeRecipeDelayed( + new ItemStack(Blocks.wooden_slab, 1, 0), + new ItemStack(Blocks.wooden_slab, 1, 1), + new ItemStack(Blocks.wooden_slab, 1, 2)); + GT_ModHandler.addCraftingRecipe( + new ItemStack(Blocks.wooden_slab, 6, 0), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] {"WWW", 'W', new ItemStack(Blocks.planks, 1, 0)}); // Save a copy of these list before activateOreDictHandler(), then loop over them. Map<IRecipeInput, RecipeOutput> aMaceratorRecipeList = GT_ModHandler.getMaceratorRecipeList(); @@ -370,22 +410,35 @@ public class GT_Mod implements IGT_Mod { Map<IRecipeInput, RecipeOutput> aOreWashingRecipeList = GT_ModHandler.getOreWashingRecipeList(); Map<IRecipeInput, RecipeOutput> aThermalCentrifugeRecipeList = GT_ModHandler.getThermalCentrifugeRecipeList(); - GT_Log.out.println("GT_Mod: Activating OreDictionary Handler, this can take some time, as it scans the whole OreDictionary"); - GT_FML_LOGGER.info("If your Log stops here, you were too impatient. Wait a bit more next time, before killing Minecraft with the Task Manager."); + GT_Log.out.println( + "GT_Mod: Activating OreDictionary Handler, this can take some time, as it scans the whole OreDictionary"); + GT_FML_LOGGER.info( + "If your Log stops here, you were too impatient. Wait a bit more next time, before killing Minecraft with the Task Manager."); GT_PostLoad.activateOreDictHandler(); GT_PostLoad.replaceVanillaMaterials(); - GT_PostLoad.removeIc2Recipes(aMaceratorRecipeList, aCompressorRecipeList, aExtractorRecipeList, aOreWashingRecipeList, aThermalCentrifugeRecipeList); + GT_PostLoad.removeIc2Recipes( + aMaceratorRecipeList, + aCompressorRecipeList, + aExtractorRecipeList, + aOreWashingRecipeList, + 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)) { GT_ModHandler.removeRecipeByOutput(ItemList.IC2_ForgeHammer.getWildcard(1L)); } GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("machine", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("machine", 1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "RwR", "RRR", 'R', OrePrefixes.plate.get(Materials.Iron)}); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("machine", 1L), + GT_ModHandler.RecipeBits.BUFFERED + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"RRR", "RwR", "RRR", 'R', OrePrefixes.plate.get(Materials.Iron)}); GT_PostLoad.registerFluidCannerRecipes(); @@ -395,7 +448,11 @@ public class GT_Mod implements IGT_Mod { } if (GregTech_API.mAE2) { GT_MetaTileEntity_DigitalChestBase.registerAEIntegration(); - ItemStack facade = AEApi.instance().definitions().items().facade().maybeItem() + ItemStack facade = AEApi.instance() + .definitions() + .items() + .facade() + .maybeItem() .transform(i -> new ItemStack(i, 1, GT_Values.W)) .orNull(); if (facade != null) { @@ -403,14 +460,30 @@ public class GT_Mod implements IGT_Mod { } } - - Arrays.stream(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); - + Arrays.stream(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); GT_PostLoad.nerfVanillaTools(); new GT_ExtremeDieselFuelLoader().run(); @@ -494,56 +567,95 @@ public class GT_Mod implements IGT_Mod { } gregtechproxy.onServerStarting(); - //Check for more IC2 recipes on ServerStart to also catch MineTweaker additions - GT_ModHandler.addIC2RecipesToGT(GT_ModHandler.getMaceratorRecipeList(), GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, true, true, true); - GT_ModHandler.addIC2RecipesToGT(GT_ModHandler.getCompressorRecipeList(), GT_Recipe.GT_Recipe_Map.sCompressorRecipes, true, true, true); - GT_ModHandler.addIC2RecipesToGT(GT_ModHandler.getExtractorRecipeList(), GT_Recipe.GT_Recipe_Map.sExtractorRecipes, true, true, true); - GT_ModHandler.addIC2RecipesToGT(GT_ModHandler.getOreWashingRecipeList(), GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, false, true, true); - GT_ModHandler.addIC2RecipesToGT(GT_ModHandler.getThermalCentrifugeRecipeList(), GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, true, true, true); + // Check for more IC2 recipes on ServerStart to also catch MineTweaker additions + GT_ModHandler.addIC2RecipesToGT( + GT_ModHandler.getMaceratorRecipeList(), GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, true, true, true); + GT_ModHandler.addIC2RecipesToGT( + GT_ModHandler.getCompressorRecipeList(), GT_Recipe.GT_Recipe_Map.sCompressorRecipes, true, true, true); + GT_ModHandler.addIC2RecipesToGT( + GT_ModHandler.getExtractorRecipeList(), GT_Recipe.GT_Recipe_Map.sExtractorRecipes, true, true, true); + GT_ModHandler.addIC2RecipesToGT( + GT_ModHandler.getOreWashingRecipeList(), GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, false, true, true); + GT_ModHandler.addIC2RecipesToGT( + GT_ModHandler.getThermalCentrifugeRecipeList(), + GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, + true, + true, + true); GT_Log.out.println("GT_Mod: Unificating outputs of all known Recipe Types."); 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())) { + for (WeightedRandomChestContent tContent : + ChestGenHooks.getInfo("pyramidJungleDispenser").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"); @@ -562,19 +674,31 @@ public class GT_Mod implements IGT_Mod { for (ItemStack tOutput : tStacks) { if (gregtechproxy.mRegisteredOres.contains(tOutput)) { GT_FML_LOGGER.error("GT-ERR-01: @ " + tOutput.getUnlocalizedName() + " " + tOutput.getDisplayName()); - GT_FML_LOGGER.error("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("The Owner of the ==>RECIPE<==, NOT the Owner of the Item, which has been mentioned above!!!"); - GT_FML_LOGGER.error("And ONLY Recipes which are ==>OUTPUTTING<== the Item, sorry but I don't want failed Bug Reports."); - GT_FML_LOGGER.error("GregTech just reports this Error to you, so you can report it to the Mod causing the Problem."); - GT_FML_LOGGER.error("Even though I make that Bug visible, I can not and will not fix that for you, that's for the causing Mod to fix."); + GT_FML_LOGGER.error( + "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( + "The Owner of the ==>RECIPE<==, NOT the Owner of the Item, which has been mentioned above!!!"); + GT_FML_LOGGER.error( + "And ONLY Recipes which are ==>OUTPUTTING<== the Item, sorry but I don't want failed Bug Reports."); + GT_FML_LOGGER.error( + "GregTech just reports this Error to you, so you can report it to the Mod causing the Problem."); + GT_FML_LOGGER.error( + "Even though I make that Bug visible, I can not and will not fix that for you, that's for the causing Mod to fix."); 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("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("If it would be possible, then I would have had added the Mod which is causing it to the Message already. But it is not possible."); - GT_FML_LOGGER.error("Sorry, but this Error is serious enough to justify this Wall-O-Text and the partially allcapsed Language."); + 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( + "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( + "If it would be possible, then I would have had added the Mod which is causing it to the Message already. But it is not possible."); + GT_FML_LOGGER.error( + "Sorry, but this Error is serious enough to justify this Wall-O-Text and the partially allcapsed Language."); GT_FML_LOGGER.error("Also it is a Ban Reason on the IC2-Forums to post this seriously."); tOutput.setStackDisplayName("ERROR! PLEASE CHECK YOUR LOG FOR 'GT-ERR-01'!"); } else { @@ -634,7 +758,6 @@ public class GT_Mod implements IGT_Mod { } catch (Throwable e) { e.printStackTrace(GT_Log.err); } - } @Mod.EventHandler @@ -656,7 +779,7 @@ public class GT_Mod implements IGT_Mod { e.printStackTrace(GT_Log.err); } } - //Interrupt IDLE Threads to close down cleanly + // Interrupt IDLE Threads to close down cleanly GT_Runnable_MachineBlockUpdate.shutdownExecutorService(); } diff --git a/src/main/java/gregtech/api/GregTech_API.java b/src/main/java/gregtech/api/GregTech_API.java index 2400f1eef9..56e80d4971 100644 --- a/src/main/java/gregtech/api/GregTech_API.java +++ b/src/main/java/gregtech/api/GregTech_API.java @@ -1,5 +1,10 @@ package gregtech.api; +import static gregtech.api.enums.GT_Values.B; +import static gregtech.api.enums.GT_Values.L; +import static gregtech.api.enums.GT_Values.M; +import static gregtech.api.enums.GT_Values.MOD_ID_IC2; + import com.google.common.collect.Multimap; import com.google.common.collect.Multimaps; import cpw.mods.fml.common.registry.GameRegistry; @@ -37,16 +42,6 @@ import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.api.world.GT_Worldgen; import gregtech.common.items.GT_IntegratedCircuit_Item; -import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.world.World; -import net.minecraftforge.fluids.Fluid; - import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -62,11 +57,15 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.function.BiFunction; import java.util.function.Predicate; import java.util.stream.Collectors; - -import static gregtech.api.enums.GT_Values.B; -import static gregtech.api.enums.GT_Values.L; -import static gregtech.api.enums.GT_Values.M; -import static gregtech.api.enums.GT_Values.MOD_ID_IC2; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChunkCoordinates; +import net.minecraft.world.World; +import net.minecraftforge.fluids.Fluid; /** * Please do not include this File in your Mod-download as it ruins compatibility, like with the IC2-API @@ -84,7 +83,6 @@ import static gregtech.api.enums.GT_Values.MOD_ID_IC2; * * @author Gregorius Techneticies */ - @SuppressWarnings("unused") // API class has legitimately unused methods and members public class GregTech_API { @@ -102,6 +100,7 @@ public class GregTech_API { * Fixes the HashMap Mappings for ItemStacks once the Server started */ public static final Collection<Map<GT_ItemStack, ?>> sItemStackMappings = new ArrayList<>(); + public static final Collection<Map<Fluid, ?>> sFluidMappings = new ArrayList<>(); /** * The MetaTileEntity-ID-List-Length @@ -110,8 +109,7 @@ public class GregTech_API { /** * My Creative Tab */ - public static final CreativeTabs - TAB_GREGTECH = new GT_CreativeTab("Main", "Main"), + public static final CreativeTabs TAB_GREGTECH = new GT_CreativeTab("Main", "Main"), TAB_GREGTECH_MATERIALS = new GT_CreativeTab("Materials", "Materials"), TAB_GREGTECH_ORES = new GT_CreativeTab("Ores", "Ores"); /** @@ -189,8 +187,7 @@ public class GregTech_API { /** * The List of Tools, which can be used. Accepts regular damageable Items and Electric Items */ - public static final GT_HashSet<GT_ItemStack> - sToolList = new GT_HashSet<>(), + public static final GT_HashSet<GT_ItemStack> sToolList = new GT_HashSet<>(), sCrowbarList = new GT_HashSet<>(), sScrewdriverList = new GT_HashSet<>(), sWrenchList = new GT_HashSet<>(), @@ -202,17 +199,20 @@ public class GregTech_API { /** * The List of Hazmat Armors */ - public static final GT_HashSet<GT_ItemStack> - sGasHazmatList = new GT_HashSet<>(), + public static final GT_HashSet<GT_ItemStack> sGasHazmatList = new GT_HashSet<>(), sBioHazmatList = new GT_HashSet<>(), sFrostHazmatList = new GT_HashSet<>(), sHeatHazmatList = new GT_HashSet<>(), sRadioHazmatList = new GT_HashSet<>(), sElectroHazmatList = new GT_HashSet<>(); - private static final Multimap<Integer, ItemStack> sRealConfigurationList = Multimaps.newListMultimap(new TreeMap<>(), ArrayList::new); + + private static final Multimap<Integer, ItemStack> sRealConfigurationList = + Multimaps.newListMultimap(new TreeMap<>(), ArrayList::new); private static final Map<Integer, List<ItemStack>> sConfigurationLists = new HashMap<>(); - private static final Map<Predicate<ItemStack>, BiFunction<ItemStack, EntityPlayerMP, ItemStack>> sRealCircuitProgrammerList = new LinkedHashMap<>(); - public static final Map<Predicate<ItemStack>, BiFunction<ItemStack, EntityPlayerMP, ItemStack>> sCircuitProgrammerList = Collections.unmodifiableMap(sRealCircuitProgrammerList); + private static final Map<Predicate<ItemStack>, BiFunction<ItemStack, EntityPlayerMP, ItemStack>> + sRealCircuitProgrammerList = new LinkedHashMap<>(); + public static final Map<Predicate<ItemStack>, BiFunction<ItemStack, EntityPlayerMP, ItemStack>> + sCircuitProgrammerList = Collections.unmodifiableMap(sRealCircuitProgrammerList); /** * The List of Dimensions, which are Whitelisted for the Teleporter. This list should not contain other Planets. @@ -231,9 +231,7 @@ public class GregTech_API { /** * This is the generic Cover behavior. Used for the default Covers, which have no Behavior. */ - public static final GT_CoverBehavior - sDefaultBehavior = new GT_Cover_Default(), - sNoBehavior = new GT_Cover_None(); + public static final GT_CoverBehavior sDefaultBehavior = new GT_Cover_Default(), sNoBehavior = new GT_Cover_None(); /** * For the API Version check */ @@ -252,8 +250,7 @@ public class GregTech_API { /** * These Lists are getting executed at their respective timings. Useful if you have to do things right before/after I do them, without having to control the load order. Add your "Commands" in the Constructor or in a static Code Block of your Mods Main Class. These are not Threaded, I just use a native Java Interface for their execution. Implement just the Method run() and everything should work */ - public static List<Runnable> - sBeforeGTPreload = new ArrayList<>(), + public static List<Runnable> sBeforeGTPreload = new ArrayList<>(), sAfterGTPreload = new ArrayList<>(), sBeforeGTLoad = new ArrayList<>(), sAfterGTLoad = new ArrayList<>(), @@ -270,14 +267,11 @@ public class GregTech_API { * The Icon Registers from Blocks and Items. They will get set right before the corresponding Icon Load Phase as executed in the Runnable List above. */ @SideOnly(Side.CLIENT) - public static IIconRegister - sBlockIcons, - sItemIcons; + public static IIconRegister sBlockIcons, sItemIcons; /** * The Configuration Objects */ - public static GT_Config - sRecipeFile = null, + public static GT_Config sRecipeFile = null, sMachineFile = null, sWorldgenFile = null, sMaterialProperties = null, @@ -286,20 +280,18 @@ public class GregTech_API { sSpecialFile = null, sClientDataFile, sOPStuff = null; - public static int - TICKS_FOR_LAG_AVERAGING = 25, - MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING = 100; + + public static int TICKS_FOR_LAG_AVERAGING = 25, MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING = 100; /** * Initialized by the Block creation. */ public static Block sBlockMachines; - public static Block - sBlockOres1, + public static Block sBlockOres1, sBlockOresUb1, sBlockOresUb2, sBlockOresUb3, - /*sBlockGem,*/ + /*sBlockGem,*/ sBlockMetal1, sBlockMetal2, sBlockMetal3, @@ -313,25 +305,19 @@ public class GregTech_API { sBlockGem2, sBlockGem3, sBlockReinforced; - public static Block - sBlockGranites, - sBlockConcretes, - sBlockStones; - public static Block - sBlockCasings1, + public static Block sBlockGranites, sBlockConcretes, sBlockStones; + public static Block sBlockCasings1, sBlockCasings2, sBlockCasings3, sBlockCasings4, sBlockCasings5, sBlockCasings6, sBlockCasings8; - public static Block - sBlockLongDistancePipes; + public static Block sBlockLongDistancePipes; /** * Getting assigned by the Config */ - public static boolean - sTimber = true, + public static boolean sTimber = true, sDrinksAlwaysDrinkable = false, sMultiThreadedSounds = false, sDoShowAllItemsInCreative = false, @@ -358,31 +344,28 @@ public class GregTech_API { mTConstruct = false, mGalacticraft = false, mAE2 = false; - public static int - mEUtoRF = 360, - mRFtoEU = 20; + public static int mEUtoRF = 360, mRFtoEU = 20; /** * Option to not use MACHINE_METAL mixing into colors */ public static boolean sUseMachineMetal = false; - public static boolean mUseOnlyGoodSolderingMaterials = false; private static final String aTextIC2Lower = MOD_ID_IC2.toLowerCase(Locale.ENGLISH); /** * Getting assigned by the Mod loading */ - public static boolean - sUnificationEntriesRegistered = false, + public static boolean sUnificationEntriesRegistered = false, sPreloadStarted = false, sPreloadFinished = false, sLoadStarted = false, sLoadFinished = false, sPostloadStarted = false, sPostloadFinished = false; + private static Class<BaseMetaTileEntity> sBaseMetaTileEntityClass = null; static { @@ -408,7 +391,8 @@ public class GregTech_API { */ public static ItemStack getUnificatedOreDictStack(ItemStack aOreStack) { if (!GregTech_API.sPreloadFinished) - GT_Log.err.println("GregTech_API ERROR: " + aOreStack.getItem() + "." + aOreStack.getItemDamage() + " - OreDict Unification Entries are not registered now, please call it in the postload phase."); + GT_Log.err.println("GregTech_API ERROR: " + aOreStack.getItem() + "." + aOreStack.getItemDamage() + + " - OreDict Unification Entries are not registered now, please call it in the postload phase."); return GT_OreDictUnificator.get(true, aOreStack); } @@ -449,8 +433,7 @@ public class GregTech_API { */ @SuppressWarnings("UnusedReturnValue") // Retains API method signature public static boolean registerMachineBlock(Block aBlock, int aMeta) { - if (aBlock == null) - return false; + if (aBlock == null) return false; if (GregTech_API.sThaumcraftCompat != null) GregTech_API.sThaumcraftCompat.registerPortholeBlacklistedBlock(aBlock); sMachineIDs.put(aBlock, aMeta); @@ -461,8 +444,7 @@ public class GregTech_API { * Like above but with boolean Parameters instead of a BitMask */ public static boolean registerMachineBlock(Block aBlock, boolean... aMeta) { - if (aBlock == null || aMeta == null || aMeta.length == 0) - return false; + if (aBlock == null || aMeta == null || aMeta.length == 0) return false; if (GregTech_API.sThaumcraftCompat != null) GregTech_API.sThaumcraftCompat.registerPortholeBlacklistedBlock(aBlock); int rMeta = 0; @@ -488,132 +470,279 @@ public class GregTech_API { public static Item constructCoolantCellItem(String aUnlocalized, String aEnglish, int aMaxStore) { try { return new GT_CoolantCellIC_Item(aUnlocalized, aEnglish, aMaxStore); -// return (Item)Class.forName("gregtech.api.items.GT_CoolantCellIC_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxStore); - } catch (Throwable e) {/*Do nothing*/} + // return + // (Item)Class.forName("gregtech.api.items.GT_CoolantCellIC_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxStore); + } catch (Throwable e) { + /*Do nothing*/ + } try { return new GT_CoolantCell_Item(aUnlocalized, aEnglish, aMaxStore); -// return (Item)Class.forName("gregtech.api.items.GT_CoolantCell_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxStore); - } catch (Throwable e) {/*Do nothing*/} - return new gregtech.api.items.GT_Generic_Item(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", false); + // return + // (Item)Class.forName("gregtech.api.items.GT_CoolantCell_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxStore); + } catch (Throwable e) { + /*Do nothing*/ + } + return new gregtech.api.items.GT_Generic_Item( + aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", false); } /** * Creates a new Energy Armor Item */ - public static Item constructElectricArmorItem(String aUnlocalized, String aEnglish, int aCharge, int aTransfer, int aTier, int aDamageEnergyCost, int aSpecials, double aArmorAbsorbtionPercentage, boolean aChargeProvider, int aType, int aArmorIndex) { + public static Item constructElectricArmorItem( + String aUnlocalized, + String aEnglish, + int aCharge, + int aTransfer, + int aTier, + int aDamageEnergyCost, + int aSpecials, + double aArmorAbsorbtionPercentage, + boolean aChargeProvider, + int aType, + int aArmorIndex) { try { - return (Item) Class.forName("gregtechmod.api.items.GT_EnergyArmorIC_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aCharge, aTransfer, aTier, aDamageEnergyCost, aSpecials, aArmorAbsorbtionPercentage, aChargeProvider, aType, aArmorIndex); - } catch (Throwable e) {/*Do nothing*/} + return (Item) Class.forName("gregtechmod.api.items.GT_EnergyArmorIC_Item") + .getConstructors()[0] + .newInstance( + aUnlocalized, + aEnglish, + aCharge, + aTransfer, + aTier, + aDamageEnergyCost, + aSpecials, + aArmorAbsorbtionPercentage, + aChargeProvider, + aType, + aArmorIndex); + } catch (Throwable e) { + /*Do nothing*/ + } try { - return (Item) Class.forName("gregtechmod.api.items.GT_EnergyArmor_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aCharge, aTransfer, aTier, aDamageEnergyCost, aSpecials, aArmorAbsorbtionPercentage, aChargeProvider, aType, aArmorIndex); - } catch (Throwable e) {/*Do nothing*/} - return new gregtech.api.items.GT_Generic_Item(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", false); + return (Item) Class.forName("gregtechmod.api.items.GT_EnergyArmor_Item") + .getConstructors()[0] + .newInstance( + aUnlocalized, + aEnglish, + aCharge, + aTransfer, + aTier, + aDamageEnergyCost, + aSpecials, + aArmorAbsorbtionPercentage, + aChargeProvider, + aType, + aArmorIndex); + } catch (Throwable e) { + /*Do nothing*/ + } + return new gregtech.api.items.GT_Generic_Item( + aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", false); } /** * Creates a new Energy Battery Item */ - public static Item constructElectricEnergyStorageItem(String aUnlocalized, String aEnglish, int aCharge, int aTransfer, int aTier, int aEmptyID, int aFullID) { + public static Item constructElectricEnergyStorageItem( + String aUnlocalized, String aEnglish, int aCharge, int aTransfer, int aTier, int aEmptyID, int aFullID) { try { - return (Item) Class.forName("gregtechmod.api.items.GT_EnergyStoreIC_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aCharge, aTransfer, aTier, aEmptyID, aFullID); - } catch (Throwable e) {/*Do nothing*/} + return (Item) Class.forName("gregtechmod.api.items.GT_EnergyStoreIC_Item") + .getConstructors()[0] + .newInstance(aUnlocalized, aEnglish, aCharge, aTransfer, aTier, aEmptyID, aFullID); + } catch (Throwable e) { + /*Do nothing*/ + } try { - return (Item) Class.forName("gregtechmod.api.items.GT_EnergyStore_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aCharge, aTransfer, aTier, aEmptyID, aFullID); - } catch (Throwable e) {/*Do nothing*/} - return new gregtech.api.items.GT_Generic_Item(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", false); + return (Item) Class.forName("gregtechmod.api.items.GT_EnergyStore_Item") + .getConstructors()[0] + .newInstance(aUnlocalized, aEnglish, aCharge, aTransfer, aTier, aEmptyID, aFullID); + } catch (Throwable e) { + /*Do nothing*/ + } + return new gregtech.api.items.GT_Generic_Item( + aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", false); } /** * Creates a new Hard Hammer Item */ - public static GT_Tool_Item constructHardHammerItem(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage) { + public static GT_Tool_Item constructHardHammerItem( + String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage) { try { - return (GT_Tool_Item) Class.forName("gregtechmod.api.items.GT_HardHammer_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage); - } catch (Throwable e) {/*Do nothing*/} - return new gregtech.api.items.GT_Tool_Item(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, false); + return (GT_Tool_Item) Class.forName("gregtechmod.api.items.GT_HardHammer_Item") + .getConstructors()[0] + .newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage); + } catch (Throwable e) { + /*Do nothing*/ + } + return new gregtech.api.items.GT_Tool_Item( + aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, false); } /** * Creates a new Crowbar Item */ - public static GT_Tool_Item constructCrowbarItem(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage) { + public static GT_Tool_Item constructCrowbarItem( + String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage) { try { - return (GT_Tool_Item) Class.forName("gregtechmod.api.items.GT_CrowbarRC_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage); - } catch (Throwable e) {/*Do nothing*/} + return (GT_Tool_Item) Class.forName("gregtechmod.api.items.GT_CrowbarRC_Item") + .getConstructors()[0] + .newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage); + } catch (Throwable e) { + /*Do nothing*/ + } try { - return (GT_Tool_Item) Class.forName("gregtechmod.api.items.GT_Crowbar_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage); - } catch (Throwable e) {/*Do nothing*/} - return new gregtech.api.items.GT_Tool_Item(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, false); + return (GT_Tool_Item) Class.forName("gregtechmod.api.items.GT_Crowbar_Item") + .getConstructors()[0] + .newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage); + } catch (Throwable e) { + /*Do nothing*/ + } + return new gregtech.api.items.GT_Tool_Item( + aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, false); } /** * Creates a new Wrench Item */ - public static GT_Tool_Item constructWrenchItem(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage, int aDisChargedGTID) { + public static GT_Tool_Item constructWrenchItem( + String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage, int aDisChargedGTID) { try { - return (GT_Tool_Item) Class.forName("gregtechmod.api.items.GT_Wrench_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage, aDisChargedGTID); - } catch (Throwable e) {/*Do nothing*/} - return new gregtech.api.items.GT_Tool_Item(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, false); + return (GT_Tool_Item) Class.forName("gregtechmod.api.items.GT_Wrench_Item") + .getConstructors()[0] + .newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage, aDisChargedGTID); + } catch (Throwable e) { + /*Do nothing*/ + } + return new gregtech.api.items.GT_Tool_Item( + aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, false); } /** * Creates a new electric Screwdriver Item */ - public static GT_Tool_Item constructElectricScrewdriverItem(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage, int aDisChargedGTID) { + public static GT_Tool_Item constructElectricScrewdriverItem( + String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage, int aDisChargedGTID) { try { - return (GT_Tool_Item) Class.forName("gregtechmod.api.items.GT_ScrewdriverIC_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage, aDisChargedGTID); - } catch (Throwable e) {/*Do nothing*/} - return new gregtech.api.items.GT_Tool_Item(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, false); + return (GT_Tool_Item) Class.forName("gregtechmod.api.items.GT_ScrewdriverIC_Item") + .getConstructors()[0] + .newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage, aDisChargedGTID); + } catch (Throwable e) { + /*Do nothing*/ + } + return new gregtech.api.items.GT_Tool_Item( + aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, false); } /** * Creates a new electric Wrench Item */ - public static GT_Tool_Item constructElectricWrenchItem(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage, int aDisChargedGTID) { + public static GT_Tool_Item constructElectricWrenchItem( + String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage, int aDisChargedGTID) { try { - return (GT_Tool_Item) Class.forName("gregtechmod.api.items.GT_WrenchIC_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage, aDisChargedGTID); - } catch (Throwable e) {/*Do nothing*/} - return new gregtech.api.items.GT_Tool_Item(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, false); + return (GT_Tool_Item) Class.forName("gregtechmod.api.items.GT_WrenchIC_Item") + .getConstructors()[0] + .newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage, aDisChargedGTID); + } catch (Throwable e) { + /*Do nothing*/ + } + return new gregtech.api.items.GT_Tool_Item( + aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, false); } /** * Creates a new electric Saw Item */ - public static GT_Tool_Item constructElectricSawItem(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage, int aToolQuality, float aToolStrength, int aEnergyConsumptionPerBlockBreak, int aDisChargedGTID) { + public static GT_Tool_Item constructElectricSawItem( + String aUnlocalized, + String aEnglish, + int aMaxDamage, + int aEntityDamage, + int aToolQuality, + float aToolStrength, + int aEnergyConsumptionPerBlockBreak, + int aDisChargedGTID) { try { - return (GT_Tool_Item) Class.forName("gregtechmod.api.items.GT_SawIC_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage, aToolQuality, aToolStrength, aEnergyConsumptionPerBlockBreak, aDisChargedGTID); - } catch (Throwable e) {/*Do nothing*/} - return new gregtech.api.items.GT_Tool_Item(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, false); + return (GT_Tool_Item) Class.forName("gregtechmod.api.items.GT_SawIC_Item") + .getConstructors()[0] + .newInstance( + aUnlocalized, + aEnglish, + aMaxDamage, + aEntityDamage, + aToolQuality, + aToolStrength, + aEnergyConsumptionPerBlockBreak, + aDisChargedGTID); + } catch (Throwable e) { + /*Do nothing*/ + } + return new gregtech.api.items.GT_Tool_Item( + aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, false); } /** * Creates a new electric Drill Item */ - public static GT_Tool_Item constructElectricDrillItem(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage, int aToolQuality, float aToolStrength, int aEnergyConsumptionPerBlockBreak, int aDisChargedGTID) { + public static GT_Tool_Item constructElectricDrillItem( + String aUnlocalized, + String aEnglish, + int aMaxDamage, + int aEntityDamage, + int aToolQuality, + float aToolStrength, + int aEnergyConsumptionPerBlockBreak, + int aDisChargedGTID) { try { - return (GT_Tool_Item) Class.forName("gregtechmod.api.items.GT_DrillIC_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage, aToolQuality, aToolStrength, aEnergyConsumptionPerBlockBreak, aDisChargedGTID); - } catch (Throwable e) {/*Do nothing*/} - return new gregtech.api.items.GT_Tool_Item(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, false); + return (GT_Tool_Item) Class.forName("gregtechmod.api.items.GT_DrillIC_Item") + .getConstructors()[0] + .newInstance( + aUnlocalized, + aEnglish, + aMaxDamage, + aEntityDamage, + aToolQuality, + aToolStrength, + aEnergyConsumptionPerBlockBreak, + aDisChargedGTID); + } catch (Throwable e) { + /*Do nothing*/ + } + return new gregtech.api.items.GT_Tool_Item( + aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, false); } /** * Creates a new electric Soldering Tool */ - public static GT_Tool_Item constructElectricSolderingToolItem(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage, int aDisChargedGTID) { + public static GT_Tool_Item constructElectricSolderingToolItem( + String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage, int aDisChargedGTID) { try { - return (GT_Tool_Item) Class.forName("gregtechmod.api.items.GT_SolderingToolIC_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage, aDisChargedGTID); - } catch (Throwable e) {/*Do nothing*/} - return new gregtech.api.items.GT_Tool_Item(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, false); + return (GT_Tool_Item) Class.forName("gregtechmod.api.items.GT_SolderingToolIC_Item") + .getConstructors()[0] + .newInstance(aUnlocalized, aEnglish, aMaxDamage, aEntityDamage, aDisChargedGTID); + } catch (Throwable e) { + /*Do nothing*/ + } + return new gregtech.api.items.GT_Tool_Item( + aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, aEntityDamage, false); } /** * Creates a new empty electric Tool */ - public static GT_Tool_Item constructEmptyElectricToolItem(String aUnlocalized, String aEnglish, int aMaxDamage, int aChargedGTID) { + public static GT_Tool_Item constructEmptyElectricToolItem( + String aUnlocalized, String aEnglish, int aMaxDamage, int aChargedGTID) { try { - return (GT_Tool_Item) Class.forName("gregtechmod.api.items.GT_EmptyToolIC_Item").getConstructors()[0].newInstance(aUnlocalized, aEnglish, aMaxDamage, aChargedGTID); - } catch (Throwable e) {/*Do nothing*/} - return new gregtech.api.items.GT_Tool_Item(aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, 0, false); + return (GT_Tool_Item) Class.forName("gregtechmod.api.items.GT_EmptyToolIC_Item") + .getConstructors()[0] + .newInstance(aUnlocalized, aEnglish, aMaxDamage, aChargedGTID); + } catch (Throwable e) { + /*Do nothing*/ + } + return new gregtech.api.items.GT_Tool_Item( + aUnlocalized, aEnglish, "Doesn't work as intended, this is a Bug", aMaxDamage, 0, false); } /** @@ -623,7 +752,9 @@ public class GregTech_API { if (sBaseMetaTileEntityClass == null) { try { return (sBaseMetaTileEntityClass = BaseMetaTileEntity.class).newInstance(); - } catch (Throwable e) {/*Do nothing*/} + } catch (Throwable e) { + /*Do nothing*/ + } } try { @@ -650,11 +781,9 @@ public class GregTech_API { * in LV+ single blocks, GT++ breakthrough circuit is offered in HV+ single blocks */ public static void registerConfigurationCircuit(ItemStack aStack, int minTier) { - if (GT_Utility.isStackInvalid(aStack)) - return; + if (GT_Utility.isStackInvalid(aStack)) return; for (ItemStack tRegistered : sRealConfigurationList.values()) - if (GT_Utility.areStacksEqual(tRegistered, aStack)) - return; + if (GT_Utility.areStacksEqual(tRegistered, aStack)) return; ItemStack stack = GT_Utility.copyAmount(0, aStack); sRealConfigurationList.put(minTier, stack); sConfigurationLists.entrySet().stream() @@ -671,35 +800,40 @@ public class GregTech_API { * DO NOT MODIFY THE ItemStacks! */ public static List<ItemStack> getConfigurationCircuitList(int machineTier) { - return Collections.unmodifiableList( - sConfigurationLists.computeIfAbsent(machineTier, (t) -> sRealConfigurationList.entries().stream().filter(e -> e.getKey() <= machineTier).map(Map.Entry::getValue).collect(Collectors.toList())) + return Collections.unmodifiableList(sConfigurationLists + .computeIfAbsent(machineTier, (t) -> sRealConfigurationList.entries().stream() + .filter(e -> e.getKey() <= machineTier) + .map(Map.Entry::getValue) + .collect(Collectors.toList())) .stream() .sorted(getConfigurationCircuitsComparator()) - .collect(Collectors.toList()) - ); + .collect(Collectors.toList())); } public static Comparator<ItemStack> getConfigurationCircuitsComparator() { - return Comparator - .comparingInt((ItemStack is) -> { - // By default, the Programmed Circuit should be the earliest configuration circuit to which the player is exposed - if (GT_Mod.gregtechproxy.mCircuitsOrder.isEmpty()) - return is.getItem() instanceof GT_IntegratedCircuit_Item ? 0 : 1; - return GT_Mod.gregtechproxy.mCircuitsOrder.getOrDefault(GameRegistry.findUniqueIdentifierFor(is.getItem()).toString(), Integer.MAX_VALUE); - }) - .thenComparing(ItemStack::getUnlocalizedName) - .thenComparing(ItemStack::getItemDamage); + return Comparator.comparingInt((ItemStack is) -> { + // By default, the Programmed Circuit should be the earliest configuration circuit to which the + // player is exposed + if (GT_Mod.gregtechproxy.mCircuitsOrder.isEmpty()) + return is.getItem() instanceof GT_IntegratedCircuit_Item ? 0 : 1; + return GT_Mod.gregtechproxy.mCircuitsOrder.getOrDefault( + GameRegistry.findUniqueIdentifierFor(is.getItem()).toString(), Integer.MAX_VALUE); + }) + .thenComparing(ItemStack::getUnlocalizedName) + .thenComparing(ItemStack::getItemDamage); } public static void registerCircuitProgrammer(ItemStack stack, boolean ignoreNBT, boolean useContainer) { - registerCircuitProgrammer(rhs -> GT_Utility.areStacksEqual(stack, rhs, ignoreNBT), useContainer); + registerCircuitProgrammer(rhs -> GT_Utility.areStacksEqual(stack, rhs, ignoreNBT), useContainer); } public static void registerCircuitProgrammer(Predicate<ItemStack> predicate, boolean useContainer) { - sRealCircuitProgrammerList.put(predicate, useContainer ? (s, p) -> s.getItem().getContainerItem(s) : (s, p) -> s); + sRealCircuitProgrammerList.put( + predicate, useContainer ? (s, p) -> s.getItem().getContainerItem(s) : (s, p) -> s); } - public static void registerCircuitProgrammer(Predicate<ItemStack> predicate, BiFunction<ItemStack, EntityPlayerMP, ItemStack> doDamage) { + public static void registerCircuitProgrammer( + Predicate<ItemStack> predicate, BiFunction<ItemStack, EntityPlayerMP, ItemStack> doDamage) { sRealCircuitProgrammerList.put(predicate, doDamage); } @@ -709,9 +843,10 @@ public class GregTech_API { public static void registerCover(ItemStack aStack, ITexture aCover, GT_CoverBehaviorBase<?> aBehavior) { if (!sCovers.containsKey(new GT_ItemStack(aStack))) - sCovers.put(new GT_ItemStack(aStack), aCover == null || !aCover.isValidTexture() ? Textures.BlockIcons.ERROR_RENDERING[0] : aCover); - if (aBehavior != null) - sCoverBehaviors.put(new GT_ItemStack(aStack), aBehavior); + sCovers.put( + new GT_ItemStack(aStack), + aCover == null || !aCover.isValidTexture() ? Textures.BlockIcons.ERROR_RENDERING[0] : aCover); + if (aBehavior != null) sCoverBehaviors.put(new GT_ItemStack(aStack), aBehavior); } public static void registerCoverBehavior(ItemStack aStack, GT_CoverBehavior aBehavior) { @@ -728,7 +863,7 @@ public class GregTech_API { * @param aBehavior can be null */ public static void registerCover(Collection<ItemStack> aStackList, ITexture aCover, GT_CoverBehavior aBehavior) { - registerCover(aStackList, aCover, (GT_CoverBehaviorBase<?>)aBehavior); + registerCover(aStackList, aCover, (GT_CoverBehaviorBase<?>) aBehavior); } /** @@ -736,7 +871,8 @@ public class GregTech_API { * * @param aBehavior can be null */ - public static void registerCover(Collection<ItemStack> aStackList, ITexture aCover, GT_CoverBehaviorBase<?> aBehavior) { + public static void registerCover( + Collection<ItemStack> aStackList, ITexture aCover, GT_CoverBehaviorBase<?> aBehavior) { if (aCover.isValidTexture()) aStackList.forEach(tStack -> GregTech_API.registerCover(tStack, aCover, aBehavior)); } @@ -746,11 +882,9 @@ public class GregTech_API { */ @Deprecated public static GT_CoverBehavior getCoverBehavior(ItemStack aStack) { - if (aStack == null || aStack.getItem() == null) - return sNoBehavior; + if (aStack == null || aStack.getItem() == null) return sNoBehavior; GT_CoverBehaviorBase<?> rCover = sCoverBehaviors.get(new GT_ItemStack(aStack)); - if (!(rCover instanceof GT_CoverBehavior)) - return sDefaultBehavior; + if (!(rCover instanceof GT_CoverBehavior)) return sDefaultBehavior; return (GT_CoverBehavior) rCover; } @@ -759,8 +893,7 @@ public class GregTech_API { * @return The Cover behavior */ public static GT_CoverBehaviorBase<?> getCoverBehaviorNew(ItemStack aStack) { - if (aStack == null || aStack.getItem() == null) - return sNoBehavior; + if (aStack == null || aStack.getItem() == null) return sNoBehavior; GT_CoverBehaviorBase<?> rCover = sCoverBehaviors.get(new GT_ItemStack(aStack)); if (rCover != null) return rCover; rCover = sCoverBehaviors.get(new GT_ItemStack(aStack, true)); @@ -773,8 +906,7 @@ public class GregTech_API { */ @Deprecated public static GT_CoverBehavior getCoverBehavior(int aStack) { - if (aStack == 0) - return sNoBehavior; + if (aStack == 0) return sNoBehavior; return getCoverBehavior(GT_Utility.intToStack(aStack)); } @@ -782,8 +914,7 @@ public class GregTech_API { * returns a Cover behavior, guaranteed to not return null */ public static GT_CoverBehaviorBase<?> getCoverBehaviorNew(int aStack) { - if (aStack == 0) - return sNoBehavior; + if (aStack == 0) return sNoBehavior; return getCoverBehaviorNew(GT_Utility.intToStack(aStack)); } @@ -881,8 +1012,11 @@ public class GregTech_API { * Contains all sanity Checks for Tools, like preventing one Tool from being registered for multiple purposes as controls would override each other. */ public static boolean registerTool(ItemStack aTool, Collection<GT_ItemStack> aToolList) { - if (aTool == null || GT_Utility.isStackInList(aTool, sToolList) || (!aTool.getItem().isDamageable() && !GT_ModHandler.isElectricItem(aTool) && !(aTool.getItem() instanceof IDamagableItem))) - return false; + if (aTool == null + || GT_Utility.isStackInList(aTool, sToolList) + || (!aTool.getItem().isDamageable() + && !GT_ModHandler.isElectricItem(aTool) + && !(aTool.getItem() instanceof IDamagableItem))) return false; aToolList.add(new GT_ItemStack(GT_Utility.copyAmount(1, aTool))); sToolList.add(new GT_ItemStack(GT_Utility.copyAmount(1, aTool))); return true; diff --git a/src/main/java/gregtech/api/damagesources/GT_DamageSources.java b/src/main/java/gregtech/api/damagesources/GT_DamageSources.java index 45f3fd5323..a012f030c5 100644 --- a/src/main/java/gregtech/api/damagesources/GT_DamageSources.java +++ b/src/main/java/gregtech/api/damagesources/GT_DamageSources.java @@ -1,11 +1,10 @@ package gregtech.api.damagesources; +import javax.annotation.Nullable; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.util.*; -import javax.annotation.Nullable; - public class GT_DamageSources { public static DamageSource getElectricDamage() { return ic2.api.info.Info.DMG_ELECTRIC; @@ -57,7 +56,8 @@ public class GT_DamageSources { @Override public IChatComponent func_151519_b(EntityLivingBase aTarget) { - return new ChatComponentText(EnumChatFormatting.RED + aTarget.getCommandSenderName() + EnumChatFormatting.WHITE + " got frozen"); + return new ChatComponentText( + EnumChatFormatting.RED + aTarget.getCommandSenderName() + EnumChatFormatting.WHITE + " got frozen"); } } @@ -69,7 +69,8 @@ public class GT_DamageSources { @Override public IChatComponent func_151519_b(EntityLivingBase aTarget) { - return new ChatComponentText(EnumChatFormatting.RED + aTarget.getCommandSenderName() + EnumChatFormatting.WHITE + " was boiled alive"); + return new ChatComponentText(EnumChatFormatting.RED + aTarget.getCommandSenderName() + + EnumChatFormatting.WHITE + " was boiled alive"); } } @@ -97,7 +98,8 @@ public class GT_DamageSources { @Override public IChatComponent func_151519_b(EntityLivingBase aTarget) { - return new ChatComponentText(EnumChatFormatting.RED + aTarget.getCommandSenderName() + EnumChatFormatting.WHITE + " exploded"); + return new ChatComponentText( + EnumChatFormatting.RED + aTarget.getCommandSenderName() + EnumChatFormatting.WHITE + " exploded"); } } } diff --git a/src/main/java/gregtech/api/enchants/Enchantment_EnderDamage.java b/src/main/java/gregtech/api/enchants/Enchantment_EnderDamage.java index 9a9521d130..a31b802219 100644 --- a/src/main/java/gregtech/api/enchants/Enchantment_EnderDamage.java +++ b/src/main/java/gregtech/api/enchants/Enchantment_EnderDamage.java @@ -43,11 +43,20 @@ public class Enchantment_EnderDamage extends EnchantmentDamage { @Override public void func_151367_b(EntityLivingBase aHurtEntity, Entity aDamagingEntity, int aLevel) { - if ((aHurtEntity instanceof EntityEnderman || aHurtEntity instanceof EntityDragon || (aHurtEntity.getClass().getName().contains(".") && aHurtEntity.getClass().getName().substring(aHurtEntity.getClass().getName().lastIndexOf(".")).contains("Ender")))) { + if ((aHurtEntity instanceof EntityEnderman + || aHurtEntity instanceof EntityDragon + || (aHurtEntity.getClass().getName().contains(".") + && aHurtEntity + .getClass() + .getName() + .substring(aHurtEntity.getClass().getName().lastIndexOf(".")) + .contains("Ender")))) { // Weakness causes Endermen to not be able to teleport with GT being installed. - aHurtEntity.addPotionEffect(new PotionEffect(Potion.weakness.id, aLevel * 200, Math.max(1, (5 * aLevel) / 7))); + aHurtEntity.addPotionEffect( + new PotionEffect(Potion.weakness.id, aLevel * 200, Math.max(1, (5 * aLevel) / 7))); // They also get Poisoned. If you have this Enchant on an Arrow, you can kill the Ender Dragon easier. - aHurtEntity.addPotionEffect(new PotionEffect(Potion.poison.id, aLevel * 200, Math.max(1, (5 * aLevel) / 7))); + aHurtEntity.addPotionEffect( + new PotionEffect(Potion.poison.id, aLevel * 200, Math.max(1, (5 * aLevel) / 7))); } } diff --git a/src/main/java/gregtech/api/enums/ConfigCategories.java b/src/main/java/gregtech/api/enums/ConfigCategories.java index 513872ce38..ae4b425e5e 100644 --- a/src/main/java/gregtech/api/enums/ConfigCategories.java +++ b/src/main/java/gregtech/api/enums/ConfigCategories.java @@ -15,7 +15,8 @@ public enum ConfigCategories { heatdamage, oreprocessingoutputmultiplier, blastfurnacerequirements, - blastinductionsmelter,; + blastinductionsmelter, + ; } public enum Recipes { @@ -25,7 +26,7 @@ public enum ConfigCategories { disabledrecipes, recipereplacements, storageblockcrafting, - storageblockdecrafting, + storageblockdecrafting, crops; } @@ -61,6 +62,6 @@ public enum ConfigCategories { hammertripleplate, hammerquadrupleplate, hammerquintupleplate, - scoop; + scoop; } } diff --git a/src/main/java/gregtech/api/enums/Dyes.java b/src/main/java/gregtech/api/enums/Dyes.java index 6b1ce244c0..46207ee781 100644 --- a/src/main/java/gregtech/api/enums/Dyes.java +++ b/src/main/java/gregtech/api/enums/Dyes.java @@ -3,11 +3,10 @@ package gregtech.api.enums; import gregtech.api.interfaces.IColorModulationContainer; import gregtech.api.objects.GT_ArrayList; import gregtech.api.util.GT_Utility; +import java.util.ArrayList; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; -import java.util.ArrayList; - public enum Dyes implements IColorModulationContainer { /** * The valid Colors, see VALUES Array below @@ -39,7 +38,24 @@ public enum Dyes implements IColorModulationContainer { CONSTRUCTION_FOAM(-1, 64, 64, 64, "Construction Foam"), MACHINE_METAL(-1, 210, 220, 255, "Machine Metal"); - public static final Dyes[] VALUES = {dyeBlack, dyeRed, dyeGreen, dyeBrown, dyeBlue, dyePurple, dyeCyan, dyeLightGray, dyeGray, dyePink, dyeLime, dyeYellow, dyeLightBlue, dyeMagenta, dyeOrange, dyeWhite}; + public static final Dyes[] VALUES = { + dyeBlack, + dyeRed, + dyeGreen, + dyeBrown, + dyeBlue, + dyePurple, + dyeCyan, + dyeLightGray, + dyeGray, + dyePink, + dyeLime, + dyeYellow, + dyeLightBlue, + dyeMagenta, + dyeOrange, + dyeWhite + }; public final byte mIndex; public final String mName; @@ -50,7 +66,7 @@ public enum Dyes implements IColorModulationContainer { Dyes(int aIndex, int aR, int aG, int aB, String aName) { mIndex = (byte) aIndex; mName = aName; - mRGBa = new short[]{(short) aR, (short) aG, (short) aB, 0}; + mRGBa = new short[] {(short) aR, (short) aG, (short) aB, 0}; mOriginalRGBa = mRGBa.clone(); } diff --git a/src/main/java/gregtech/api/enums/Element.java b/src/main/java/gregtech/api/enums/Element.java index eddb9fbce5..d60a25024f 100644 --- a/src/main/java/gregtech/api/enums/Element.java +++ b/src/main/java/gregtech/api/enums/Element.java @@ -293,7 +293,14 @@ public enum Element { * @param aDecayTo String representing the Elements it decays to. Separated by an '&' Character. * @param aName Name of the Element */ - Element(long aProtons, long aNeutrons, long aAdditionalMass, long aHalfLifeSeconds, String aDecayTo, String aName, boolean aIsIsotope) { + Element( + long aProtons, + long aNeutrons, + long aAdditionalMass, + long aHalfLifeSeconds, + String aDecayTo, + String aName, + boolean aIsIsotope) { mProtons = aProtons; mNeutrons = aNeutrons; mAdditionalMass = aAdditionalMass; diff --git a/src/main/java/gregtech/api/enums/GTNH_ExtraMaterials.java b/src/main/java/gregtech/api/enums/GTNH_ExtraMaterials.java index 517b9beac8..c0a259197e 100644 --- a/src/main/java/gregtech/api/enums/GTNH_ExtraMaterials.java +++ b/src/main/java/gregtech/api/enums/GTNH_ExtraMaterials.java @@ -1,12 +1,12 @@ package gregtech.api.enums; -import gregtech.api.interfaces.IMaterialHandler; - import static gregtech.GT_Mod.GT_FML_LOGGER; +import gregtech.api.interfaces.IMaterialHandler; + public class GTNH_ExtraMaterials implements IMaterialHandler { - public GTNH_ExtraMaterials(){ + public GTNH_ExtraMaterials() { GT_FML_LOGGER.info("Registering GTNH-Materials (post Java 64kb limit)"); Materials.add(this); } @@ -14,33 +14,605 @@ public class GTNH_ExtraMaterials implements IMaterialHandler { /** * This Class is for adding new Materials since Java has a Limiation of 64kb per Method / Class header */ + public static Materials Signalum = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1 | 2, + 255, + 255, + 255, + 0, + "Signalum", + "Signalum", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); - public static Materials Signalum = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Signalum" , "Signalum" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Lumium = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Lumium" , "Lumium" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials EnrichedCopper = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "EnrichedCopper" , "Enriched Copper" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials DiamondCopper = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "DiamondCopper" , "Diamond Copper" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials TarPitch = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "TarPitch" , "Tar Pitch" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials LimePure = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "LimePure" , "Pure Lime" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLime ); - public static Materials Wimalite = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 8 , 255, 255, 255, 0, "Wimalite" , "Wimalite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeYellow ); - public static Materials Yellorite = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 8 , 255, 255, 255, 0, "Yellorite" , "Yellorite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeYellow ); - public static Materials Quantum = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Quantum" , "Quantum" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite ); - public static Materials Turquoise = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Turquoise" , "Turquoise" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Tapazite = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Tapazite" , "Tapazite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeGreen ); - public static Materials Thyrium = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1|2 |8 , 255, 255, 255, 0, "Thyrium" , "Thyrium" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Tourmaline = new Materials( -1, TextureSet.SET_RUBY , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Tourmaline" , "Tourmaline" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Spinel = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 0 , 255, 255, 255, 0, "Spinel" , "Spinel" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Starconium = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1|2 |8 , 255, 255, 255, 0, "Starconium" , "Starconium" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Sugilite = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Sugilite" , "Sugilite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Prismarine = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 |4 , 255, 255, 255, 0, "Prismarine" , "Prismarine" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials GraveyardDirt = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "GraveyardDirt" , "Graveyard Dirt" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Tennantite = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Tennantite" , "Tennantite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Fairy = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Fairy" , "Fairy" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Ludicrite = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Ludicrite" , "Ludicrite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials AquaRegia = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 255, 255, 255, 0, "AquaRegia" , "Aqua Regia" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials SolutionBlueVitriol = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 255, 255, 255, 0, "SolutionBlueVitriol" , "Blue Vitriol Solution" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials SolutionNickelSulfate = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 255, 255, 255, 0, "SolutionNickelSulfate" , "Nickel Sulfate Solution" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Lodestone = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 |8 , 255, 255, 255, 0, "Lodestone" , "Lodestone" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Luminite = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 |8 , 250, 250, 250, 0, "Luminite" , "Luminite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeWhite ); + public static Materials Lumium = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1 | 2, + 255, + 255, + 255, + 0, + "Lumium", + "Lumium", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials EnrichedCopper = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1 | 2, + 255, + 255, + 255, + 0, + "EnrichedCopper", + "Enriched Copper", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials DiamondCopper = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1 | 2, + 255, + 255, + 255, + 0, + "DiamondCopper", + "Diamond Copper", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials TarPitch = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1 | 2, + 255, + 255, + 255, + 0, + "TarPitch", + "Tar Pitch", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials LimePure = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "LimePure", + "Pure Lime", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLime); + public static Materials Wimalite = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 8, + 255, + 255, + 255, + 0, + "Wimalite", + "Wimalite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeYellow); + public static Materials Yellorite = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 8, + 255, + 255, + 255, + 0, + "Yellorite", + "Yellorite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeYellow); + public static Materials Quantum = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "Quantum", + "Quantum", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite); + public static Materials Turquoise = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 1, + 1, + 255, + 255, + 255, + 0, + "Turquoise", + "Turquoise", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Tapazite = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 1, + 1, + 255, + 255, + 255, + 0, + "Tapazite", + "Tapazite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeGreen); + public static Materials Thyrium = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 1, + 1 | 2 | 8, + 255, + 255, + 255, + 0, + "Thyrium", + "Thyrium", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Tourmaline = new Materials( + -1, + TextureSet.SET_RUBY, + 1.0F, + 0, + 1, + 1, + 255, + 255, + 255, + 0, + "Tourmaline", + "Tourmaline", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Spinel = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 1, + 0, + 255, + 255, + 255, + 0, + "Spinel", + "Spinel", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Starconium = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 1, + 1 | 2 | 8, + 255, + 255, + 255, + 0, + "Starconium", + "Starconium", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Sugilite = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 1, + 1, + 255, + 255, + 255, + 0, + "Sugilite", + "Sugilite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Prismarine = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1 | 4, + 255, + 255, + 255, + 0, + "Prismarine", + "Prismarine", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials GraveyardDirt = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1, + 255, + 255, + 255, + 0, + "GraveyardDirt", + "Graveyard Dirt", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Tennantite = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1, + 255, + 255, + 255, + 0, + "Tennantite", + "Tennantite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Fairy = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1 | 2, + 255, + 255, + 255, + 0, + "Fairy", + "Fairy", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Ludicrite = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1 | 2, + 255, + 255, + 255, + 0, + "Ludicrite", + "Ludicrite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials AquaRegia = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 0, + 255, + 255, + 255, + 0, + "AquaRegia", + "Aqua Regia", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials SolutionBlueVitriol = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 0, + 255, + 255, + 255, + 0, + "SolutionBlueVitriol", + "Blue Vitriol Solution", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials SolutionNickelSulfate = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 0, + 255, + 255, + 255, + 0, + "SolutionNickelSulfate", + "Nickel Sulfate Solution", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Lodestone = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 1, + 1 | 8, + 255, + 255, + 255, + 0, + "Lodestone", + "Lodestone", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Luminite = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 1, + 1 | 8, + 250, + 250, + 250, + 0, + "Luminite", + "Luminite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeWhite); private static void initSubTags() { SubTag.METAL.addTo(Signalum, Lumium, EnrichedCopper, DiamondCopper); @@ -53,11 +625,8 @@ public class GTNH_ExtraMaterials implements IMaterialHandler { } @Override - public void onComponentInit() { - } + public void onComponentInit() {} @Override - public void onComponentIteration(Materials aMaterial) { - - } + public void onComponentIteration(Materials aMaterial) {} } diff --git a/src/main/java/gregtech/api/enums/GT_HatchElement.java b/src/main/java/gregtech/api/enums/GT_HatchElement.java index 1bc94340bb..68702f5eb5 100644 --- a/src/main/java/gregtech/api/enums/GT_HatchElement.java +++ b/src/main/java/gregtech/api/enums/GT_HatchElement.java @@ -2,7 +2,6 @@ package gregtech.api.enums; import gregtech.api.interfaces.IHatchElement; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; @@ -14,7 +13,6 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Outpu import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; import gregtech.api.util.GT_ExoticEnergyInputHelper; import gregtech.api.util.IGT_HatchAdder; - import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -26,7 +24,8 @@ public enum GT_HatchElement implements IHatchElement<GT_MetaTileEntity_MultiBloc return t.mMufflerHatches.size(); } }, - Maintenance(GT_MetaTileEntity_MultiBlockBase::addMaintenanceToMachineList, GT_MetaTileEntity_Hatch_Maintenance.class) { + Maintenance( + GT_MetaTileEntity_MultiBlockBase::addMaintenanceToMachineList, GT_MetaTileEntity_Hatch_Maintenance.class) { @Override public long count(GT_MetaTileEntity_MultiBlockBase t) { return t.mMaintenanceHatches.size(); @@ -84,7 +83,8 @@ public enum GT_HatchElement implements IHatchElement<GT_MetaTileEntity_MultiBloc private final IGT_HatchAdder<GT_MetaTileEntity_MultiBlockBase> adder; @SafeVarargs - GT_HatchElement(IGT_HatchAdder<GT_MetaTileEntity_MultiBlockBase> adder, Class<? extends IMetaTileEntity>... mteClasses) { + GT_HatchElement( + IGT_HatchAdder<GT_MetaTileEntity_MultiBlockBase> adder, Class<? extends IMetaTileEntity>... mteClasses) { this.mteClasses = Collections.unmodifiableList(Arrays.asList(mteClasses)); this.adder = adder; } diff --git a/src/main/java/gregtech/api/enums/GT_Values.java b/src/main/java/gregtech/api/enums/GT_Values.java index 59cb64bce8..b3394ca2a1 100644 --- a/src/main/java/gregtech/api/enums/GT_Values.java +++ b/src/main/java/gregtech/api/enums/GT_Values.java @@ -5,6 +5,9 @@ import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.internal.IGT_Mod; import gregtech.api.interfaces.internal.IGT_RecipeAdder; import gregtech.api.net.IGT_NetworkHandler; +import java.util.HashSet; +import java.util.Locale; +import java.util.Set; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; @@ -13,10 +16,6 @@ import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidTank; import net.minecraftforge.oredict.OreDictionary; -import java.util.HashSet; -import java.util.Locale; -import java.util.Set; - /** * Made for static imports, this Class is just a Helper. * <p/> @@ -41,18 +40,19 @@ public class GT_Values { * The first 32 Bits */ @SuppressWarnings("PointlessBitwiseExpression") // Nicer source layout this way - public static final int[] B = new int[]{ - 1 << 0, 1 << 1, 1 << 2, - 1 << 3, 1 << 4, 1 << 5, - 1 << 6, 1 << 7, 1 << 8, - 1 << 9, 1 << 10, 1 << 11, - 1 << 12, 1 << 13, 1 << 14, - 1 << 15, 1 << 16, 1 << 17, - 1 << 18, 1 << 19, 1 << 20, - 1 << 21, 1 << 22, 1 << 23, - 1 << 24, 1 << 25, 1 << 26, - 1 << 27, 1 << 28, 1 << 29, - 1 << 30, 1 << 31}; + public static final int[] B = new int[] { + 1 << 0, 1 << 1, 1 << 2, + 1 << 3, 1 << 4, 1 << 5, + 1 << 6, 1 << 7, 1 << 8, + 1 << 9, 1 << 10, 1 << 11, + 1 << 12, 1 << 13, 1 << 14, + 1 << 15, 1 << 16, 1 << 17, + 1 << 18, 1 << 19, 1 << 20, + 1 << 21, 1 << 22, 1 << 23, + 1 << 24, 1 << 25, 1 << 26, + 1 << 27, 1 << 28, 1 << 29, + 1 << 30, 1 << 31 + }; /** * Renamed from "MATERIAL_UNIT" to just "M" @@ -83,103 +83,108 @@ public class GT_Values { /** * The Voltage Tiers. Use this Array instead of the old named Voltage Variables */ - public static final long[] V = - new long[]{ - 8L, 32L, 128L, - 512L, 2048L, 8192L, - 32_768L, 131_072L, 524_288L, - 2_097_152L, 8_388_608L, 33_554_432L, - 134_217_728L, 536_870_912L, Integer.MAX_VALUE - 7, - // Error tier to prevent out of bounds errors. Not really a real tier (for now). - 8_589_934_592L}; - // Why -7? Mystery of the universe. Something may break if you change this so please do not without extensive testing. - //TODO:Adding that in coremod!!! - //TODO:tier 14,15 wires and transformers only (not even cables !!!) - //TODO:tier 12,13 the above + batteries, battery buffers, (maybe cables,12 also works for machines) - //TODO:tier 10,11 the above + chargers and other machines, (cables would be nice) - //TODO:tier 9 machines and batteries - - //TODO:AND ALL THE MATERIALS... for that - //TODO:LIST OF MACHINES WITH POINTLESS TIERS (unless you implement some other tiering mechanism like reducing eu cost if time=1tick) - //Macerator/Compressor/Furnace... and for cheap recipes any + public static final long[] V = new long[] { + 8L, 32L, 128L, + 512L, 2048L, 8192L, + 32_768L, 131_072L, 524_288L, + 2_097_152L, 8_388_608L, 33_554_432L, + 134_217_728L, 536_870_912L, Integer.MAX_VALUE - 7, + // Error tier to prevent out of bounds errors. Not really a real tier (for now). + 8_589_934_592L + }; + // Why -7? Mystery of the universe. Something may break if you change this so please do not without extensive + // testing. + // TODO:Adding that in coremod!!! + // TODO:tier 14,15 wires and transformers only (not even cables !!!) + // TODO:tier 12,13 the above + batteries, battery buffers, (maybe cables,12 also works for machines) + // TODO:tier 10,11 the above + chargers and other machines, (cables would be nice) + // TODO:tier 9 machines and batteries + + // TODO:AND ALL THE MATERIALS... for that + // TODO:LIST OF MACHINES WITH POINTLESS TIERS (unless you implement some other tiering mechanism like reducing eu + // cost if time=1tick) + // Macerator/Compressor/Furnace... and for cheap recipes any /** * Array of Maximum Amperes at given Tier index * <p>keeping Voltage*Amps < Integer.MAX_VALUE-7 for machines (and tier logic 4x EUt 2/ time)</p> * <p>AMV[4]= max amps at tier 4</p> */ - public static final long[] AatV = - new long[]{ - 268435455, 67108863, 16777215, - 4194303, 1048575, 262143, - 65535, 16383, 4095, - 1023, 255, 63, - 15, 3, 1, - 1}; + public static final long[] AatV = new long[] { + 268435455, 67108863, 16777215, + 4194303, 1048575, 262143, + 65535, 16383, 4095, + 1023, 255, 63, + 15, 3, 1, + 1 + }; /** * The short Names for the Voltages */ - public static final String[] VN = - new String[]{ - "ULV", // 0 - "LV", // 1 - "MV", // 2 - "HV", // 3 - "EV", // 4 - "IV", // 5 - "LuV", // 6 - "ZPM", // 7 - "UV", // 8 - "UHV", // 9 - "UEV", // 10 - "UIV", // 11 - "UMV", // 12 - "UXV", // 13 - "MAX", // 14 - "ERROR VOLTAGE" // 15 + public static final String[] VN = new String[] { + "ULV", // 0 + "LV", // 1 + "MV", // 2 + "HV", // 3 + "EV", // 4 + "IV", // 5 + "LuV", // 6 + "ZPM", // 7 + "UV", // 8 + "UHV", // 9 + "UEV", // 10 + "UIV", // 11 + "UMV", // 12 + "UXV", // 13 + "MAX", // 14 + "ERROR VOLTAGE" // 15 }; /** * The long Names for the Voltages */ - public static final String[] VOLTAGE_NAMES = - new String[]{ - "Ultra Low Voltage", // 0 - "Low Voltage", // 1 - "Medium Voltage", // 2 - "High Voltage", // 3 - "Extreme Voltage", // 4 - "Insane Voltage", // 5 - "Ludicrous Voltage", // 6 - "ZPM Voltage", // 7 - "Ultimate Voltage", // 8 - "Ultimate High Voltage", // 9 - "Ultimate Extreme Voltage", // 10 - "Ultimate Insane Voltage", // 11 - "Ultimate Mega Voltage", // 12 - "Ultimate Extended Mega Voltage", // 13 - "Maximum Voltage", // 14 - "Error Voltage, report this" // 15 + public static final String[] VOLTAGE_NAMES = new String[] { + "Ultra Low Voltage", // 0 + "Low Voltage", // 1 + "Medium Voltage", // 2 + "High Voltage", // 3 + "Extreme Voltage", // 4 + "Insane Voltage", // 5 + "Ludicrous Voltage", // 6 + "ZPM Voltage", // 7 + "Ultimate Voltage", // 8 + "Ultimate High Voltage", // 9 + "Ultimate Extreme Voltage", // 10 + "Ultimate Insane Voltage", // 11 + "Ultimate Mega Voltage", // 12 + "Ultimate Extended Mega Voltage", // 13 + "Maximum Voltage", // 14 + "Error Voltage, report this" // 15 }; - public static final String[] TIER_COLORS = - new String[]{ - EnumChatFormatting.RED.toString(), // ULV, 0 - EnumChatFormatting.GRAY.toString(), // LV, 1 - EnumChatFormatting.GOLD.toString(), // MV, 2 - EnumChatFormatting.YELLOW.toString(), // HV, 3 - EnumChatFormatting.DARK_GRAY.toString(), // EV, 4 - EnumChatFormatting.GREEN.toString(), // IV, 5 - EnumChatFormatting.LIGHT_PURPLE.toString(), // LuV, 6 - EnumChatFormatting.AQUA.toString(), // ZPM, 7 - EnumChatFormatting.DARK_GREEN.toString(), // UV, 8 - EnumChatFormatting.DARK_RED.toString(), // UHV, 9 - EnumChatFormatting.DARK_PURPLE.toString(), // UEV, 10 - EnumChatFormatting.DARK_BLUE.toString() + EnumChatFormatting.BOLD.toString(), // UIV, 11 - EnumChatFormatting.RED.toString() + EnumChatFormatting.BOLD.toString() + EnumChatFormatting.UNDERLINE.toString(), // UMV, 12 - EnumChatFormatting.DARK_RED.toString() + EnumChatFormatting.BOLD.toString() + EnumChatFormatting.UNDERLINE.toString(), // UXV, 13 - EnumChatFormatting.WHITE.toString() + EnumChatFormatting.BOLD.toString() + EnumChatFormatting.UNDERLINE.toString(), // MAX, 14 - EnumChatFormatting.OBFUSCATED.toString() // ~~~, 15 + public static final String[] TIER_COLORS = new String[] { + EnumChatFormatting.RED.toString(), // ULV, 0 + EnumChatFormatting.GRAY.toString(), // LV, 1 + EnumChatFormatting.GOLD.toString(), // MV, 2 + EnumChatFormatting.YELLOW.toString(), // HV, 3 + EnumChatFormatting.DARK_GRAY.toString(), // EV, 4 + EnumChatFormatting.GREEN.toString(), // IV, 5 + EnumChatFormatting.LIGHT_PURPLE.toString(), // LuV, 6 + EnumChatFormatting.AQUA.toString(), // ZPM, 7 + EnumChatFormatting.DARK_GREEN.toString(), // UV, 8 + EnumChatFormatting.DARK_RED.toString(), // UHV, 9 + EnumChatFormatting.DARK_PURPLE.toString(), // UEV, 10 + EnumChatFormatting.DARK_BLUE.toString() + EnumChatFormatting.BOLD.toString(), // UIV, 11 + EnumChatFormatting.RED.toString() + + EnumChatFormatting.BOLD.toString() + + EnumChatFormatting.UNDERLINE.toString(), // UMV, 12 + EnumChatFormatting.DARK_RED.toString() + + EnumChatFormatting.BOLD.toString() + + EnumChatFormatting.UNDERLINE.toString(), // UXV, 13 + EnumChatFormatting.WHITE.toString() + + EnumChatFormatting.BOLD.toString() + + EnumChatFormatting.UNDERLINE.toString(), // MAX, 14 + EnumChatFormatting.OBFUSCATED.toString() // ~~~, 15 }; /** @@ -193,8 +198,7 @@ public class GT_Values { /** * MOD ID Strings, since they are very common Parameters. */ - public static final String - MOD_ID = "gregtech", + public static final String MOD_ID = "gregtech", MOD_ID_IC2 = "IC2", MOD_ID_NC = "IC2NuclearControl", MOD_ID_TC = "Thaumcraft", @@ -224,8 +228,7 @@ public class GT_Values { /** * File Paths and Resource Paths */ - public static final String - TEX_DIR = "textures/", + public static final String TEX_DIR = "textures/", TEX_DIR_GUI = TEX_DIR + "gui/", TEX_DIR_ITEM = TEX_DIR + "items/", TEX_DIR_BLOCK = TEX_DIR + "blocks/", @@ -244,45 +247,42 @@ public class GT_Values { * NBT String Keys */ public static class NBT { - public static final String - COLOR = "gt.color", // Integer - CUSTOM_NAME = "name", // String - DISPAY = "gt.display", // String - FACING = "gt.facing", // Byte - LOCK_UPGRADE = "gt.locked", // Boolean - MATERIAL = "gt.material", // String containing the Material Name. - MODE = "gt.mode", // Number - ALLOWED_MODES = "gt.amode", // Number - MTE_ID = "gt.mte.id", // Containing the MTE ID - MTE_REG = "gt.mte.reg", // Containing the MTE Registry ID - OWNER = "gt.owner", // String - OWNER_UUID = "gt.ownerUuid", // UUID (String) - - // Machines - ACTIVE = "gt.active", // Boolean - FLUID_OUT = "gt.fluidout", // Output Fluid - INV_OUT = "gt.invout", // ItemStack - PARALLEL = "gt.parallel", // Number - TANK_CAPACITY = "gt.tankcap", // Number - TANK_IN = "gt.tank.in.", // FluidStack - TANK_OUT = "gt.tank.out.", // FluidStack - TEXTURE = "gt.texture", // String - INV_SIZE = "gt.invsize", // Number - INV_LIST = "gt.invlist", // NBT List - - // MultiBlock - STRUCTURE_OK = "gt.structure.ok", - ROTATION = "gt.eRotation", - FLIP = "gt.eFlip", - TARGET = "gt.target", // Boolean - TARGET_X = "gt.target.x", // Number - TARGET_Y = "gt.target.y", // Number - TARGET_Z = "gt.target.z", // Number - - empty_ = ""; + public static final String COLOR = "gt.color", // Integer + CUSTOM_NAME = "name", // String + DISPAY = "gt.display", // String + FACING = "gt.facing", // Byte + LOCK_UPGRADE = "gt.locked", // Boolean + MATERIAL = "gt.material", // String containing the Material Name. + MODE = "gt.mode", // Number + ALLOWED_MODES = "gt.amode", // Number + MTE_ID = "gt.mte.id", // Containing the MTE ID + MTE_REG = "gt.mte.reg", // Containing the MTE Registry ID + OWNER = "gt.owner", // String + OWNER_UUID = "gt.ownerUuid", // UUID (String) + + // Machines + ACTIVE = "gt.active", // Boolean + FLUID_OUT = "gt.fluidout", // Output Fluid + INV_OUT = "gt.invout", // ItemStack + PARALLEL = "gt.parallel", // Number + TANK_CAPACITY = "gt.tankcap", // Number + TANK_IN = "gt.tank.in.", // FluidStack + TANK_OUT = "gt.tank.out.", // FluidStack + TEXTURE = "gt.texture", // String + INV_SIZE = "gt.invsize", // Number + INV_LIST = "gt.invlist", // NBT List + + // MultiBlock + STRUCTURE_OK = "gt.structure.ok", + ROTATION = "gt.eRotation", + FLIP = "gt.eFlip", + TARGET = "gt.target", // Boolean + TARGET_X = "gt.target.x", // Number + TARGET_Y = "gt.target.y", // Number + TARGET_Z = "gt.target.z", // Number + empty_ = ""; } - /** The Color White as RGB Short Array. */ public static final short[] UNCOLORED_RBGA = {255, 255, 255, 255}; /** The Color White as simple Integer (0x00ffffff). */ @@ -291,61 +291,58 @@ public class GT_Values { /** * Sides */ - public static final byte - SIDE_BOTTOM = 0, SIDE_DOWN = 0, - SIDE_TOP = 1, SIDE_UP = 1, - SIDE_NORTH = 2, // Also a Side with a stupidly mirrored Texture - SIDE_SOUTH = 3, - SIDE_WEST = 4, - SIDE_EAST = 5, // Also a Side with a stupidly mirrored Texture - SIDE_ANY = 6, SIDE_UNKNOWN = 6, SIDE_INVALID = 6, SIDE_INSIDE = 6, SIDE_UNDEFINED = 6; + public static final byte SIDE_BOTTOM = 0, + SIDE_DOWN = 0, + SIDE_TOP = 1, + SIDE_UP = 1, + SIDE_NORTH = 2, // Also a Side with a stupidly mirrored Texture + SIDE_SOUTH = 3, + SIDE_WEST = 4, + SIDE_EAST = 5, // Also a Side with a stupidly mirrored Texture + SIDE_ANY = 6, + SIDE_UNKNOWN = 6, + SIDE_INVALID = 6, + SIDE_INSIDE = 6, + SIDE_UNDEFINED = 6; /** Compass alike Array for the proper ordering of North, East, South and West. */ public static final byte[] COMPASS_DIRECTIONS = {SIDE_NORTH, SIDE_EAST, SIDE_SOUTH, SIDE_WEST}; - /** * An Array containing all Sides which follow the Condition, in order to iterate over them for example. */ - public static final byte[] - ALL_SIDES = {0,1,2,3,4,5,6}, - ALL_VALID_SIDES = {0,1,2,3,4,5 }; + public static final byte[] ALL_SIDES = {0, 1, 2, 3, 4, 5, 6}, ALL_VALID_SIDES = {0, 1, 2, 3, 4, 5}; /** * For Facing Checks. */ - - public static final boolean[] - INVALID_SIDES = { false, false, false, false, false, false, true }, - VALID_SIDES = { true, true, true, true, true, true, false }; - + public static final boolean[] INVALID_SIDES = {false, false, false, false, false, false, true}, + VALID_SIDES = {true, true, true, true, true, true, false}; /** * Side->Offset Mappings. */ - public static final byte[] - OFFX = { 0, 0, 0, 0,-1,+1, 0}, - OFFY = {-1,+1, 0, 0, 0, 0, 0}, - OFFZ = { 0, 0,-1,+1, 0, 0, 0}; + public static final byte[] OFFX = {0, 0, 0, 0, -1, +1, 0}, + OFFY = {-1, +1, 0, 0, 0, 0, 0}, + OFFZ = {0, 0, -1, +1, 0, 0, 0}; /** * Side->Opposite Mappings. **/ - public static final byte[] - OPOS = { 1, 0, 3, 2, 5, 4, 6}; + public static final byte[] OPOS = {1, 0, 3, 2, 5, 4, 6}; /** * [Facing,Side]->Side Mappings for Blocks, which don't face up- and downwards. * 0 = bottom, 1 = top, 2 = left, 3 = front, 4 = right, 5 = back, 6 = undefined. */ public static final byte[][] FACING_ROTATIONS = { - {0,1,2,3,4,5,6}, - {0,1,2,3,4,5,6}, - {0,1,3,5,4,2,6}, - {0,1,5,3,2,4,6}, - {0,1,2,4,3,5,6}, - {0,1,4,2,5,3,6}, - {0,1,2,3,4,5,6} + {0, 1, 2, 3, 4, 5, 6}, + {0, 1, 2, 3, 4, 5, 6}, + {0, 1, 3, 5, 4, 2, 6}, + {0, 1, 5, 3, 2, 4, 6}, + {0, 1, 2, 4, 3, 5, 6}, + {0, 1, 4, 2, 5, 3, 6}, + {0, 1, 2, 3, 4, 5, 6} }; /** @@ -464,12 +461,12 @@ public class GT_Values { * If true, then digital chest with AE2 storage bus will be accessible only through AE2 */ public static boolean disableDigitalChestsExternalAccess = false; + public static boolean lateConfigSave = true; public static boolean worldTickHappened = false; public static final int[] emptyIntArray = new int[0]; - public static final IFluidTank[] emptyFluidTank = new IFluidTank[0]; public static final FluidTankGT[] emptyFluidTankGT = new FluidTankGT[0]; public static final FluidTankInfo[] emptyFluidTankInfo = new FluidTankInfo[0]; @@ -480,11 +477,14 @@ public class GT_Values { /** * Pretty formatting for author names. */ - public static final String AuthorColen = "Author: " + - EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + EnumChatFormatting.ITALIC + EnumChatFormatting.UNDERLINE + "C" + - EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + EnumChatFormatting.ITALIC + EnumChatFormatting.UNDERLINE + "o" + - EnumChatFormatting.GREEN + EnumChatFormatting.BOLD + EnumChatFormatting.ITALIC + EnumChatFormatting.UNDERLINE + "l" + - EnumChatFormatting.DARK_AQUA + EnumChatFormatting.BOLD + EnumChatFormatting.ITALIC + EnumChatFormatting.UNDERLINE + "e" + - EnumChatFormatting.DARK_PURPLE + EnumChatFormatting.BOLD + EnumChatFormatting.ITALIC + EnumChatFormatting.UNDERLINE + "n"; - + public static final String AuthorColen = "Author: " + EnumChatFormatting.DARK_RED + + EnumChatFormatting.BOLD + EnumChatFormatting.ITALIC + EnumChatFormatting.UNDERLINE + "C" + + EnumChatFormatting.GOLD + + EnumChatFormatting.BOLD + EnumChatFormatting.ITALIC + EnumChatFormatting.UNDERLINE + "o" + + EnumChatFormatting.GREEN + + EnumChatFormatting.BOLD + EnumChatFormatting.ITALIC + EnumChatFormatting.UNDERLINE + "l" + + EnumChatFormatting.DARK_AQUA + + EnumChatFormatting.BOLD + EnumChatFormatting.ITALIC + EnumChatFormatting.UNDERLINE + "e" + + EnumChatFormatting.DARK_PURPLE + + EnumChatFormatting.BOLD + EnumChatFormatting.ITALIC + EnumChatFormatting.UNDERLINE + "n"; } diff --git a/src/main/java/gregtech/api/enums/HeatingCoilLevel.java b/src/main/java/gregtech/api/enums/HeatingCoilLevel.java index 0ee208658b..bce2925d7c 100644 --- a/src/main/java/gregtech/api/enums/HeatingCoilLevel.java +++ b/src/main/java/gregtech/api/enums/HeatingCoilLevel.java @@ -3,71 +3,69 @@ package gregtech.api.enums; import net.minecraft.util.StatCollector; public enum HeatingCoilLevel { - None, // 0 - ULV, //Not implemented 901 - LV, //Cupronickel 1801 - MV, //KANTHAL 2701 - HV, //NICHROME 3601 - EV, //TUNGSTENSTEEL 4501 - IV, //HSSG 5401 - LuV, //HSSS 6301 - ZPM, //NAQUADAH 7201 - UV, //NAQUADAHALLOY 8101 - UHV, //TRINIUM 9001 - UEV, //ELECTRUMFLUX 9901 - UIV, //AWAKENEDDRACONIUM 10801 - UMV, //INFINITY 11701 - UXV, //HYPOGEN 12601 - MAX, //ETERNAL 13501 - ; + None, // 0 + ULV, // Not implemented 901 + LV, // Cupronickel 1801 + MV, // KANTHAL 2701 + HV, // NICHROME 3601 + EV, // TUNGSTENSTEEL 4501 + IV, // HSSG 5401 + LuV, // HSSS 6301 + ZPM, // NAQUADAH 7201 + UV, // NAQUADAHALLOY 8101 + UHV, // TRINIUM 9001 + UEV, // ELECTRUMFLUX 9901 + UIV, // AWAKENEDDRACONIUM 10801 + UMV, // INFINITY 11701 + UXV, // HYPOGEN 12601 + MAX, // ETERNAL 13501 + ; + private static final HeatingCoilLevel[] VALUES = values(); - private static final HeatingCoilLevel[] VALUES = values(); + /** + * @return the coil heat, used for recipes in the Electronic Blast Furnace for example. + */ + public long getHeat() { + return this == None ? 0 : 1L + (900L * this.ordinal()); + } - /** - * @return the coil heat, used for recipes in the Electronic Blast Furnace for example. - */ - public long getHeat() { - return this == None ? 0 : 1L + (900L * this.ordinal()); - } + /** + * @return the coil tier, used for discount in the Pyrolyse Oven for example. + */ + public byte getTier() { + return (byte) (this.ordinal() - 2); + } - /** - * @return the coil tier, used for discount in the Pyrolyse Oven for example. - */ - public byte getTier() { - return (byte) (this.ordinal() - 2); - } + /** + * @return the coil Level, used for Parallels in the Multi Furnace for example. + */ + public byte getLevel() { + return (byte) (1 << Math.min(Math.max(0, this.ordinal() - 2), 4)); + } - /** - * @return the coil Level, used for Parallels in the Multi Furnace for example. - */ - public byte getLevel() { - return (byte) (1 << Math.min(Math.max(0, this.ordinal() - 2), 4)); - } + /** + * @return the coil Discount, used for discount in the Multi Furnace for example + */ + public int getCostDiscount() { + return 1 << Math.max(0, this.ordinal() - 5); + } - /** - * @return the coil Discount, used for discount in the Multi Furnace for example - */ - public int getCostDiscount() { - return 1 << Math.max(0, this.ordinal() - 5); - } + public String getName() { + return StatCollector.translateToLocal("GT5U.coil." + this); + } - public String getName() { - return StatCollector.translateToLocal("GT5U.coil." + this); - } + public static HeatingCoilLevel getFromTier(byte tier) { + if (tier < 0 || tier > getMaxTier()) return HeatingCoilLevel.None; - public static HeatingCoilLevel getFromTier(byte tier){ - if (tier < 0 || tier > getMaxTier()) - return HeatingCoilLevel.None; + return VALUES[tier + 2]; + } - return VALUES[tier+2]; - } + public static int size() { + return VALUES.length; + } - public static int size() { - return VALUES.length; - } - - public static int getMaxTier() { - return VALUES.length - 1 - 2; - } + public static int getMaxTier() { + return VALUES.length - 1 - 2; + } } diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java index 6af3e75961..d517a6d50c 100644 --- a/src/main/java/gregtech/api/enums/ItemList.java +++ b/src/main/java/gregtech/api/enums/ItemList.java @@ -1,20 +1,19 @@ package gregtech.api.enums; +import static gregtech.api.enums.GT_Values.NI; +import static gregtech.api.enums.GT_Values.W; + import gregtech.api.interfaces.IItemContainer; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; +import java.util.Locale; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.Fluid; -import java.util.Locale; - -import static gregtech.api.enums.GT_Values.NI; -import static gregtech.api.enums.GT_Values.W; - /** * Class containing all non-OreDict Items of GregTech. */ @@ -379,7 +378,7 @@ public enum ItemList implements IItemContainer { Circuit_Biowarecomputer, Circuit_Biowaresupercomputer, - Rotor_LV,//these aren't actually used + Rotor_LV, // these aren't actually used Rotor_MV, Rotor_HV, Rotor_EV, @@ -744,7 +743,7 @@ public enum ItemList implements IItemContainer { Generator_Naquadah_Mark_III, Generator_Naquadah_Mark_IV, Generator_Naquadah_Mark_V, - //Generator_Naquadah_Mark_VI, + // Generator_Naquadah_Mark_VI, Machine_Bronze_Boiler, Machine_Bronze_Boiler_Solar, Machine_HP_Solar, @@ -1903,171 +1902,156 @@ public enum ItemList implements IItemContainer { VOLUMETRIC_FLASK, Hatch_Input_Bus_ME, - Hatch_CraftingInput_Bus_ME - ; - + Hatch_CraftingInput_Bus_ME; public static final ItemList[] - DYE_ONLY_ITEMS = { - Color_00, - Color_01, - Color_02, - Color_03, - Color_04, - Color_05, - Color_06, - Color_07, - Color_08, - Color_09, - Color_10, - Color_11, - Color_12, - Color_13, - Color_14, - Color_15 - }, - SPRAY_CAN_DYES = { - Spray_Color_00, - Spray_Color_01, - Spray_Color_02, - Spray_Color_03, - Spray_Color_04, - Spray_Color_05, - Spray_Color_06, - Spray_Color_07, - Spray_Color_08, - Spray_Color_09, - Spray_Color_10, - Spray_Color_11, - Spray_Color_12, - Spray_Color_13, - Spray_Color_14, - Spray_Color_15 - }, - SPRAY_CAN_DYES_USED = { - Spray_Color_Used_00, - Spray_Color_Used_01, - Spray_Color_Used_02, - Spray_Color_Used_03, - Spray_Color_Used_04, - Spray_Color_Used_05, - Spray_Color_Used_06, - Spray_Color_Used_07, - Spray_Color_Used_08, - Spray_Color_Used_09, - Spray_Color_Used_10, - Spray_Color_Used_11, - Spray_Color_Used_12, - Spray_Color_Used_13, - Spray_Color_Used_14, - Spray_Color_Used_15 - }, - TRANSFORMERS = { - Transformer_LV_ULV, - Transformer_MV_LV, - Transformer_HV_MV, - Transformer_EV_HV, - Transformer_IV_EV, - Transformer_LuV_IV, - Transformer_ZPM_LuV, - Transformer_UV_ZPM, - Transformer_MAX_UV - }, - MACHINE_HULLS = { - Hull_ULV, - Hull_LV, - Hull_MV, - Hull_HV, - Hull_EV, - Hull_IV, - Hull_LuV, - Hull_ZPM, - Hull_UV, - Hull_MAX - }, - HATCHES_DYNAMO = { - Hatch_Dynamo_ULV, - Hatch_Dynamo_LV, - Hatch_Dynamo_MV, - Hatch_Dynamo_HV, - Hatch_Dynamo_EV, - Hatch_Dynamo_IV, - Hatch_Dynamo_LuV, - Hatch_Dynamo_ZPM, - Hatch_Dynamo_UV, - Hatch_Dynamo_MAX - }, - HATCHES_ENERGY = { - Hatch_Energy_ULV, - Hatch_Energy_LV, - Hatch_Energy_MV, - Hatch_Energy_HV, - Hatch_Energy_EV, - Hatch_Energy_IV, - Hatch_Energy_LuV, - Hatch_Energy_ZPM, - Hatch_Energy_UV, - Hatch_Energy_MAX - }, - HATCHES_INPUT = { - Hatch_Input_ULV, - Hatch_Input_LV, - Hatch_Input_MV, - Hatch_Input_HV, - Hatch_Input_EV, - Hatch_Input_IV, - Hatch_Input_LuV, - Hatch_Input_ZPM, - Hatch_Input_UV, - Hatch_Input_MAX - }, - HATCHES_INPUT_BUS = { - Hatch_Input_Bus_ULV, - Hatch_Input_Bus_LV, - Hatch_Input_Bus_MV, - Hatch_Input_Bus_HV, - Hatch_Input_Bus_EV, - Hatch_Input_Bus_IV, - Hatch_Input_Bus_LuV, - Hatch_Input_Bus_ZPM, - Hatch_Input_Bus_UV, - Hatch_Input_Bus_MAX - }, - HATCHES_OUTPUT = { - Hatch_Output_ULV, - Hatch_Output_LV, - Hatch_Output_MV, - Hatch_Output_HV, - Hatch_Output_EV, - Hatch_Output_IV, - Hatch_Output_LuV, - Hatch_Output_ZPM, - Hatch_Output_UV, - Hatch_Output_MAX - }, - HATCHES_OUTPUT_BUS = { - Hatch_Output_Bus_ULV, - Hatch_Output_Bus_LV, - Hatch_Output_Bus_MV, - Hatch_Output_Bus_HV, - Hatch_Output_Bus_EV, - Hatch_Output_Bus_IV, - Hatch_Output_Bus_LuV, - Hatch_Output_Bus_ZPM, - Hatch_Output_Bus_UV, - Hatch_Output_Bus_MAX - }, - HATCHES_MUFFLER = { - Hatch_Muffler_LV, - Hatch_Muffler_LV, - Hatch_Muffler_MV, - Hatch_Muffler_HV, - Hatch_Muffler_EV, - Hatch_Muffler_IV, - Hatch_Muffler_LuV, - Hatch_Muffler_ZPM, - Hatch_Muffler_UV, - Hatch_Muffler_MAX - }; + DYE_ONLY_ITEMS = + { + Color_00, Color_01, Color_02, Color_03, Color_04, Color_05, Color_06, Color_07, Color_08, + Color_09, Color_10, Color_11, Color_12, Color_13, Color_14, Color_15 + }, + SPRAY_CAN_DYES = + { + Spray_Color_00, + Spray_Color_01, + Spray_Color_02, + Spray_Color_03, + Spray_Color_04, + Spray_Color_05, + Spray_Color_06, + Spray_Color_07, + Spray_Color_08, + Spray_Color_09, + Spray_Color_10, + Spray_Color_11, + Spray_Color_12, + Spray_Color_13, + Spray_Color_14, + Spray_Color_15 + }, + SPRAY_CAN_DYES_USED = + { + Spray_Color_Used_00, + Spray_Color_Used_01, + Spray_Color_Used_02, + Spray_Color_Used_03, + Spray_Color_Used_04, + Spray_Color_Used_05, + Spray_Color_Used_06, + Spray_Color_Used_07, + Spray_Color_Used_08, + Spray_Color_Used_09, + Spray_Color_Used_10, + Spray_Color_Used_11, + Spray_Color_Used_12, + Spray_Color_Used_13, + Spray_Color_Used_14, + Spray_Color_Used_15 + }, + TRANSFORMERS = + { + Transformer_LV_ULV, + Transformer_MV_LV, + Transformer_HV_MV, + Transformer_EV_HV, + Transformer_IV_EV, + Transformer_LuV_IV, + Transformer_ZPM_LuV, + Transformer_UV_ZPM, + Transformer_MAX_UV + }, + MACHINE_HULLS = + {Hull_ULV, Hull_LV, Hull_MV, Hull_HV, Hull_EV, Hull_IV, Hull_LuV, Hull_ZPM, Hull_UV, Hull_MAX}, + HATCHES_DYNAMO = + { + Hatch_Dynamo_ULV, + Hatch_Dynamo_LV, + Hatch_Dynamo_MV, + Hatch_Dynamo_HV, + Hatch_Dynamo_EV, + Hatch_Dynamo_IV, + Hatch_Dynamo_LuV, + Hatch_Dynamo_ZPM, + Hatch_Dynamo_UV, + Hatch_Dynamo_MAX + }, + HATCHES_ENERGY = + { + Hatch_Energy_ULV, + Hatch_Energy_LV, + Hatch_Energy_MV, + Hatch_Energy_HV, + Hatch_Energy_EV, + Hatch_Energy_IV, + Hatch_Energy_LuV, + Hatch_Energy_ZPM, + Hatch_Energy_UV, + Hatch_Energy_MAX + }, + HATCHES_INPUT = + { + Hatch_Input_ULV, + Hatch_Input_LV, + Hatch_Input_MV, + Hatch_Input_HV, + Hatch_Input_EV, + Hatch_Input_IV, + Hatch_Input_LuV, + Hatch_Input_ZPM, + Hatch_Input_UV, + Hatch_Input_MAX + }, + HATCHES_INPUT_BUS = + { + Hatch_Input_Bus_ULV, + Hatch_Input_Bus_LV, + Hatch_Input_Bus_MV, + Hatch_Input_Bus_HV, + Hatch_Input_Bus_EV, + Hatch_Input_Bus_IV, + Hatch_Input_Bus_LuV, + Hatch_Input_Bus_ZPM, + Hatch_Input_Bus_UV, + Hatch_Input_Bus_MAX + }, + HATCHES_OUTPUT = + { + Hatch_Output_ULV, + Hatch_Output_LV, + Hatch_Output_MV, + Hatch_Output_HV, + Hatch_Output_EV, + Hatch_Output_IV, + Hatch_Output_LuV, + Hatch_Output_ZPM, + Hatch_Output_UV, + Hatch_Output_MAX + }, + HATCHES_OUTPUT_BUS = + { + Hatch_Output_Bus_ULV, + Hatch_Output_Bus_LV, + Hatch_Output_Bus_MV, + Hatch_Output_Bus_HV, + Hatch_Output_Bus_EV, + Hatch_Output_Bus_IV, + Hatch_Output_Bus_LuV, + Hatch_Output_Bus_ZPM, + Hatch_Output_Bus_UV, + Hatch_Output_Bus_MAX + }, + HATCHES_MUFFLER = + { + Hatch_Muffler_LV, + Hatch_Muffler_LV, + Hatch_Muffler_MV, + Hatch_Muffler_HV, + Hatch_Muffler_EV, + Hatch_Muffler_IV, + Hatch_Muffler_LuV, + Hatch_Muffler_ZPM, + Hatch_Muffler_UV, + Hatch_Muffler_MAX + }; public static Fluid sOilExtraHeavy, sEpichlorhydrin, sDrillingFluid, @@ -2086,8 +2070,7 @@ public enum ItemList implements IItemContainer { @Override public IItemContainer set(Item aItem) { mHasNotBeenSet = false; - if (aItem == null) - return this; + if (aItem == null) return this; ItemStack aStack = new ItemStack(aItem, 1, 0); mStack = GT_Utility.copyAmount(1, aStack); return this; @@ -2104,8 +2087,7 @@ public enum ItemList implements IItemContainer { public Item getItem() { if (mHasNotBeenSet) throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - if (GT_Utility.isStackInvalid(mStack)) - return null; + if (GT_Utility.isStackInvalid(mStack)) return null; return mStack.getItem(); } @@ -2128,8 +2110,7 @@ public enum ItemList implements IItemContainer { @Override public boolean isStackEqual(Object aStack, boolean aWildcard, boolean aIgnoreNBT) { - if (GT_Utility.isStackInvalid(aStack)) - return false; + if (GT_Utility.isStackInvalid(aStack)) return false; return GT_Utility.areUnificationsEqual((ItemStack) aStack, aWildcard ? getWildcard(1) : get(1), aIgnoreNBT); } @@ -2137,8 +2118,7 @@ public enum ItemList implements IItemContainer { public ItemStack get(long aAmount, Object... aReplacements) { if (mHasNotBeenSet) throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - if (GT_Utility.isStackInvalid(mStack)) - return GT_Utility.copyAmount(aAmount, aReplacements); + if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements); return GT_Utility.copyAmount(aAmount, GT_OreDictUnificator.get(mStack)); } @@ -2146,8 +2126,7 @@ public enum ItemList implements IItemContainer { public ItemStack getWildcard(long aAmount, Object... aReplacements) { if (mHasNotBeenSet) throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - if (GT_Utility.isStackInvalid(mStack)) - return GT_Utility.copyAmount(aAmount, aReplacements); + if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements); return GT_Utility.copyAmountAndMetaData(aAmount, W, GT_OreDictUnificator.get(mStack)); } @@ -2155,8 +2134,7 @@ public enum ItemList implements IItemContainer { public ItemStack getUndamaged(long aAmount, Object... aReplacements) { if (mHasNotBeenSet) throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - if (GT_Utility.isStackInvalid(mStack)) - return GT_Utility.copyAmount(aAmount, aReplacements); + if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements); return GT_Utility.copyAmountAndMetaData(aAmount, 0, GT_OreDictUnificator.get(mStack)); } @@ -2164,23 +2142,23 @@ public enum ItemList implements IItemContainer { public ItemStack getAlmostBroken(long aAmount, Object... aReplacements) { if (mHasNotBeenSet) throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - if (GT_Utility.isStackInvalid(mStack)) - return GT_Utility.copyAmount(aAmount, aReplacements); + if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements); return GT_Utility.copyAmountAndMetaData(aAmount, mStack.getMaxDamage() - 1, GT_OreDictUnificator.get(mStack)); } @Override public ItemStack getWithName(long aAmount, String aDisplayName, Object... aReplacements) { ItemStack rStack = get(1, aReplacements); - if (GT_Utility.isStackInvalid(rStack)) - return NI; + if (GT_Utility.isStackInvalid(rStack)) return NI; // CamelCase alphanumeric words from aDisplayName StringBuilder tCamelCasedDisplayNameBuilder = new StringBuilder(); final String[] tDisplayNameWords = aDisplayName.split("\\W"); - for (String tWord : tDisplayNameWords){ - if (tWord.length() > 0) tCamelCasedDisplayNameBuilder.append(tWord.substring(0, 1).toUpperCase(Locale.US)); - if (tWord.length() > 1) tCamelCasedDisplayNameBuilder.append(tWord.substring(1).toLowerCase(Locale.US)); + for (String tWord : tDisplayNameWords) { + if (tWord.length() > 0) + tCamelCasedDisplayNameBuilder.append(tWord.substring(0, 1).toUpperCase(Locale.US)); + if (tWord.length() > 1) + tCamelCasedDisplayNameBuilder.append(tWord.substring(1).toLowerCase(Locale.US)); } if (tCamelCasedDisplayNameBuilder.length() == 0) { // CamelCased DisplayName is empty, so use hash of aDisplayName @@ -2197,8 +2175,7 @@ public enum ItemList implements IItemContainer { @Override public ItemStack getWithCharge(long aAmount, int aEnergy, Object... aReplacements) { ItemStack rStack = get(1, aReplacements); - if (GT_Utility.isStackInvalid(rStack)) - return null; + if (GT_Utility.isStackInvalid(rStack)) return null; GT_ModHandler.chargeElectricItem(rStack, aEnergy, Integer.MAX_VALUE, true, false); return GT_Utility.copyAmount(aAmount, rStack); } @@ -2207,8 +2184,7 @@ public enum ItemList implements IItemContainer { public ItemStack getWithDamage(long aAmount, long aMetaValue, Object... aReplacements) { if (mHasNotBeenSet) throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - if (GT_Utility.isStackInvalid(mStack)) - return GT_Utility.copyAmount(aAmount, aReplacements); + if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements); return GT_Utility.copyAmountAndMetaData(aAmount, aMetaValue, GT_OreDictUnificator.get(mStack)); } @@ -2216,8 +2192,7 @@ public enum ItemList implements IItemContainer { public IItemContainer registerOre(Object... aOreNames) { if (mHasNotBeenSet) throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - for (Object tOreName : aOreNames) - GT_OreDictUnificator.registerOre(tOreName, get(1)); + for (Object tOreName : aOreNames) GT_OreDictUnificator.registerOre(tOreName, get(1)); return this; } @@ -2225,8 +2200,7 @@ public enum ItemList implements IItemContainer { public IItemContainer registerWildcardAsOre(Object... aOreNames) { if (mHasNotBeenSet) throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - for (Object tOreName : aOreNames) - GT_OreDictUnificator.registerOre(tOreName, getWildcard(1)); + for (Object tOreName : aOreNames) GT_OreDictUnificator.registerOre(tOreName, getWildcard(1)); return this; } diff --git a/src/main/java/gregtech/api/enums/MaterialBuilder.java b/src/main/java/gregtech/api/enums/MaterialBuilder.java index 94d0db1e35..5514b9382e 100644 --- a/src/main/java/gregtech/api/enums/MaterialBuilder.java +++ b/src/main/java/gregtech/api/enums/MaterialBuilder.java @@ -1,261 +1,275 @@ package gregtech.api.enums; import gregtech.api.objects.MaterialStack; - import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class MaterialBuilder { - public static final int - DIESEL = 0, - GAS = 1, - THERMAL = 2, - SEMIFLUID = 3, - PLASMA = 4, - MAGIC = 5; - - private int metaItemSubID; - private TextureSet iconSet; - private float toolSpeed = 1.0f; - private int durability = 0; - private int toolQuality = 0; - private int types = 0; - private int r = 255, g = 255, b = 255, a = 0; - private String name; - private String defaultLocalName; - private int fuelType = 0; - private int fuelPower = 0; - private int meltingPoint = 0; - private int blastFurnaceTemp = 0; - private boolean blastFurnaceRequired = false; - private boolean transparent = false; - private int oreValue = 1; - private int densityMultiplier = 1; - private int densityDivider = 1; - private Dyes color = Dyes._NULL; - private int extraData = 0; - private List<MaterialStack> materialList = new ArrayList<>(); - private List<TC_Aspects.TC_AspectStack> aspects = new ArrayList<>(); - private boolean hasCorrespondingFluid = false; - private boolean hasCorrespondingGas = false; - private boolean canBeCracked = false; - private boolean canBeSteamCracked = false; - private int liquidTemperature = 300; - private int gasTemperature = 300; - - public MaterialBuilder(int metaItemSubID, TextureSet iconSet, String defaultLocalName) { - this.metaItemSubID = metaItemSubID; - this.iconSet = iconSet; - this.name = defaultLocalName.replace(" ", "").replace("-", ""); - this.defaultLocalName = defaultLocalName; - } - - public Materials constructMaterial() { - return new Materials(metaItemSubID, iconSet, toolSpeed, durability, toolQuality, types, r, g, b, a, name, defaultLocalName, fuelType, fuelPower, meltingPoint, blastFurnaceTemp, - blastFurnaceRequired, transparent, oreValue, densityMultiplier, densityDivider, color, extraData, materialList, aspects) - .setHasCorrespondingFluid(hasCorrespondingFluid) - .setHasCorrespondingGas(hasCorrespondingGas) - .setCanBeCracked(canBeCracked); - } - - public MaterialBuilder setName(String name){ - this.name = name; - return this; - } - - public MaterialBuilder setTypes(int types){ - this.types = types; - return this; - } - - public MaterialBuilder addDustItems(){ - types = types | 1; - return this; - } - - public MaterialBuilder addMetalItems(){ - types = types | 2; - return this; - } - - public MaterialBuilder addGemItems(){ - types = types | 4; - return this; - } - - public MaterialBuilder addOreItems(){ - types = types | 8; - return this; - } - - public MaterialBuilder addCell(){ - types = types | 16; - return this; - } - - public MaterialBuilder addPlasma(){ - types = types | 32; - return this; - } - - public MaterialBuilder addToolHeadItems(){ - types = types | 64; - return this; - } - - public MaterialBuilder addGearItems(){ - types = types | 128; - return this; - } - - public MaterialBuilder addFluid(){ - this.hasCorrespondingFluid = true; - return this; - } - - public MaterialBuilder addGas(){ - this.hasCorrespondingGas = true; - return this; - } - - public MaterialBuilder setRGBA(int r, int g, int b, int a){ - this.r = r; - this.g = g; - this.b = b; - this.a = a; - return this; - } - - public MaterialBuilder setRGB(int r, int g, int b){ - this.r = r; - this.g = g; - this.b = b; - return this; - } - - public MaterialBuilder setTransparent(boolean transparent){ - this.transparent = transparent; - return this; - } - - public MaterialBuilder setColor(Dyes color){ - this.color = color; - return this; - } - - - public MaterialBuilder setToolSpeed(float toolSpeed) { - this.toolSpeed = toolSpeed; - return this; - } - - public MaterialBuilder setDurability(int durability) { - this.durability = durability; - return this; - } - - public MaterialBuilder setToolQuality(int toolQuality) { - this.toolQuality = toolQuality; - return this; - } - - - public MaterialBuilder setFuelType(int fuelType) { - this.fuelType = fuelType; - return this; - } - - public MaterialBuilder setFuelPower(int fuelPower) { - this.fuelPower = fuelPower; - return this; - } - - public MaterialBuilder setMeltingPoint(int meltingPoint) { - this.meltingPoint = meltingPoint; - return this; - } - - public MaterialBuilder setBlastFurnaceTemp(int blastFurnaceTemp) { - this.blastFurnaceTemp = blastFurnaceTemp; - return this; - } - - public MaterialBuilder setBlastFurnaceRequired(boolean blastFurnaceRequired) { - this.blastFurnaceRequired = blastFurnaceRequired; - return this; - } - - public MaterialBuilder setOreValue(int oreValue) { - this.oreValue = oreValue; - return this; - } - - public MaterialBuilder setDensityMultiplier(int densityMultiplier) { - this.densityMultiplier = densityMultiplier; - return this; - } - - public MaterialBuilder setDensityDivider(int densityDivider) { - this.densityDivider = densityDivider; - return this; - } - - public MaterialBuilder setExtraData(int extraData) { - this.extraData = extraData; - return this; - } - - public MaterialBuilder addElectrolyzerRecipe(){ - extraData = extraData | 1; - return this; - } - - public MaterialBuilder addCentrifugeRecipe(){ - extraData = extraData | 2; - return this; - } - - public MaterialBuilder setMaterialList(List<MaterialStack> materialList) { - this.materialList = materialList; - return this; - } - - public MaterialBuilder setMaterialList(MaterialStack ... materials) { - this.materialList = Arrays.asList(materials); - return this; - } - - public MaterialBuilder setAspects(List<TC_Aspects.TC_AspectStack> aspects) { - this.aspects = aspects; - return this; - } - - public int getLiquidTemperature() { - return liquidTemperature; - } - - public MaterialBuilder setLiquidTemperature(int liquidTemperature) { - this.liquidTemperature = liquidTemperature; - return this; - } - - public int getGasTemperature() { - return gasTemperature; - } - - public MaterialBuilder setGasTemperature(int gasTemperature) { - this.gasTemperature = gasTemperature; - return this; - } - - public boolean canBeCracked() { - return canBeCracked; - } - - public MaterialBuilder setCanBeCracked(boolean canBeCracked) { - this.canBeCracked = canBeCracked; - return this; - } - + public static final int DIESEL = 0, GAS = 1, THERMAL = 2, SEMIFLUID = 3, PLASMA = 4, MAGIC = 5; + + private int metaItemSubID; + private TextureSet iconSet; + private float toolSpeed = 1.0f; + private int durability = 0; + private int toolQuality = 0; + private int types = 0; + private int r = 255, g = 255, b = 255, a = 0; + private String name; + private String defaultLocalName; + private int fuelType = 0; + private int fuelPower = 0; + private int meltingPoint = 0; + private int blastFurnaceTemp = 0; + private boolean blastFurnaceRequired = false; + private boolean transparent = false; + private int oreValue = 1; + private int densityMultiplier = 1; + private int densityDivider = 1; + private Dyes color = Dyes._NULL; + private int extraData = 0; + private List<MaterialStack> materialList = new ArrayList<>(); + private List<TC_Aspects.TC_AspectStack> aspects = new ArrayList<>(); + private boolean hasCorrespondingFluid = false; + private boolean hasCorrespondingGas = false; + private boolean canBeCracked = false; + private boolean canBeSteamCracked = false; + private int liquidTemperature = 300; + private int gasTemperature = 300; + + public MaterialBuilder(int metaItemSubID, TextureSet iconSet, String defaultLocalName) { + this.metaItemSubID = metaItemSubID; + this.iconSet = iconSet; + this.name = defaultLocalName.replace(" ", "").replace("-", ""); + this.defaultLocalName = defaultLocalName; + } + + public Materials constructMaterial() { + return new Materials( + metaItemSubID, + iconSet, + toolSpeed, + durability, + toolQuality, + types, + r, + g, + b, + a, + name, + defaultLocalName, + fuelType, + fuelPower, + meltingPoint, + blastFurnaceTemp, + blastFurnaceRequired, + transparent, + oreValue, + densityMultiplier, + densityDivider, + color, + extraData, + materialList, + aspects) + .setHasCorrespondingFluid(hasCorrespondingFluid) + .setHasCorrespondingGas(hasCorrespondingGas) + .setCanBeCracked(canBeCracked); + } + + public MaterialBuilder setName(String name) { + this.name = name; + return this; + } + + public MaterialBuilder setTypes(int types) { + this.types = types; + return this; + } + + public MaterialBuilder addDustItems() { + types = types | 1; + return this; + } + + public MaterialBuilder addMetalItems() { + types = types | 2; + return this; + } + + public MaterialBuilder addGemItems() { + types = types | 4; + return this; + } + + public MaterialBuilder addOreItems() { + types = types | 8; + return this; + } + + public MaterialBuilder addCell() { + types = types | 16; + return this; + } + + public MaterialBuilder addPlasma() { + types = types | 32; + return this; + } + + public MaterialBuilder addToolHeadItems() { + types = types | 64; + return this; + } + + public MaterialBuilder addGearItems() { + types = types | 128; + return this; + } + + public MaterialBuilder addFluid() { + this.hasCorrespondingFluid = true; + return this; + } + + public MaterialBuilder addGas() { + this.hasCorrespondingGas = true; + return this; + } + + public MaterialBuilder setRGBA(int r, int g, int b, int a) { + this.r = r; + this.g = g; + this.b = b; + this.a = a; + return this; + } + + public MaterialBuilder setRGB(int r, int g, int b) { + this.r = r; + this.g = g; + this.b = b; + return this; + } + + public MaterialBuilder setTransparent(boolean transparent) { + this.transparent = transparent; + return this; + } + + public MaterialBuilder setColor(Dyes color) { + this.color = color; + return this; + } + + public MaterialBuilder setToolSpeed(float toolSpeed) { + this.toolSpeed = toolSpeed; + return this; + } + + public MaterialBuilder setDurability(int durability) { + this.durability = durability; + return this; + } + + public MaterialBuilder setToolQuality(int toolQuality) { + this.toolQuality = toolQuality; + return this; + } + + public MaterialBuilder setFuelType(int fuelType) { + this.fuelType = fuelType; + return this; + } + + public MaterialBuilder setFuelPower(int fuelPower) { + this.fuelPower = fuelPower; + return this; + } + + public MaterialBuilder setMeltingPoint(int meltingPoint) { + this.meltingPoint = meltingPoint; + return this; + } + + public MaterialBuilder setBlastFurnaceTemp(int blastFurnaceTemp) { + this.blastFurnaceTemp = blastFurnaceTemp; + return this; + } + + public MaterialBuilder setBlastFurnaceRequired(boolean blastFurnaceRequired) { + this.blastFurnaceRequired = blastFurnaceRequired; + return this; + } + + public MaterialBuilder setOreValue(int oreValue) { + this.oreValue = oreValue; + return this; + } + + public MaterialBuilder setDensityMultiplier(int densityMultiplier) { + this.densityMultiplier = densityMultiplier; + return this; + } + + public MaterialBuilder setDensityDivider(int densityDivider) { + this.densityDivider = densityDivider; + return this; + } + + public MaterialBuilder setExtraData(int extraData) { + this.extraData = extraData; + return this; + } + + public MaterialBuilder addElectrolyzerRecipe() { + extraData = extraData | 1; + return this; + } + + public MaterialBuilder addCentrifugeRecipe() { + extraData = extraData | 2; + return this; + } + + public MaterialBuilder setMaterialList(List<MaterialStack> materialList) { + this.materialList = materialList; + return this; + } + + public MaterialBuilder setMaterialList(MaterialStack... materials) { + this.materialList = Arrays.asList(materials); + return this; + } + + public MaterialBuilder setAspects(List<TC_Aspects.TC_AspectStack> aspects) { + this.aspects = aspects; + return this; + } + + public int getLiquidTemperature() { + return liquidTemperature; + } + + public MaterialBuilder setLiquidTemperature(int liquidTemperature) { + this.liquidTemperature = liquidTemperature; + return this; + } + + public int getGasTemperature() { + return gasTemperature; + } + + public MaterialBuilder setGasTemperature(int gasTemperature) { + this.gasTemperature = gasTemperature; + return this; + } + + public boolean canBeCracked() { + return canBeCracked; + } + + public MaterialBuilder setCanBeCracked(boolean canBeCracked) { + this.canBeCracked = canBeCracked; + return this; + } } diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index caadfdb0a8..dac99a8630 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -1,5 +1,8 @@ package gregtech.api.enums; +import static gregtech.api.enums.GT_Values.M; +import static gregtech.api.enums.GT_Values.MOD_ID_DC; + import cpw.mods.fml.common.Loader; import gregtech.GT_Mod; import gregtech.api.GregTech_API; @@ -14,18 +17,14 @@ import gregtech.api.util.GT_Utility; import gregtech.common.render.items.GT_GeneratedMaterial_Renderer; import gregtech.loaders.materialprocessing.ProcessingConfig; import gregtech.loaders.materialprocessing.ProcessingModSupport; +import java.util.*; +import java.util.stream.Collectors; +import java.util.stream.IntStream; import net.minecraft.enchantment.Enchantment; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; -import java.util.*; -import java.util.stream.Collectors; -import java.util.stream.IntStream; - -import static gregtech.api.enums.GT_Values.M; -import static gregtech.api.enums.GT_Values.MOD_ID_DC; - @SuppressWarnings("unused") // API Legitimately has unused Members and Methods public class Materials implements IColorModulationContainer, ISubTagContainer { @@ -40,855 +39,16849 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { /** * This is the Default Material returned in case no Material has been found or a NullPointer has been inserted at a location where it shouldn't happen. */ - public static Materials _NULL = new Materials(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "NULL", "NULL", 0, 0, 0, 0, false, false, 1, 1, 1, Dyes._NULL, Element._NULL, Collections.singletonList(new TC_AspectStack(TC_Aspects.VACUOS, 1))); + public static Materials _NULL = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "NULL", + "NULL", + 0, + 0, + 0, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + Element._NULL, + Collections.singletonList(new TC_AspectStack(TC_Aspects.VACUOS, 1))); /** * Direct Elements */ - public static Materials Aluminium = new Materials( 19, TextureSet.SET_DULL , 10.0F, 128, 2, 1|2 |8 |32|64|128 , 128, 200, 240, 0, "Aluminium" , "Aluminium" , 0, 0, 933, 1700, true, false, 3, 1, 1, Dyes.dyeLightBlue , Element.Al , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.VOLATUS, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Americium = new Materials( 103, TextureSet.SET_METALLIC , 1.0F, 0, 3, 1|2 |8 |32 , 200, 200, 200, 0, "Americium" , "Americium" , 0, 0, 1449, 0, false, false, 3, 1, 1, Dyes.dyeLightGray , Element.Am , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); - public static Materials Antimony = new Materials( 58, TextureSet.SET_SHINY , 1.0F, 0, 2, 1|2 |8 |32 , 220, 220, 240, 0, "Antimony" , "Antimony" , 0, 0, 903, 0, false, false, 2, 1, 1, Dyes.dyeLightGray , Element.Sb , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.AQUA, 1))); - public static Materials Argon = new Materials( 24, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 0, 255, 0, 240, "Argon" , "Argon" , 0, 0, 83, 0, false, true, 5, 1, 1, Dyes.dyeGreen , Element.Ar , Collections.singletonList(new TC_AspectStack(TC_Aspects.AER, 2))); - public static Materials Arsenic = new Materials( 39, TextureSet.SET_DULL , 1.0F, 0, 2, 1|2 |8|16|32 , 255, 255, 255, 0, "Arsenic" , "Arsenic" , 0, 0, 1090, 0, false, false, 3, 1, 1, Dyes.dyeOrange , Element.As , Collections.singletonList(new TC_AspectStack(TC_Aspects.VENENUM, 3))); - public static Materials Barium = new Materials( 63, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 255, 0, "Barium" , "Barium" , 0, 0, 1000, 0, false, false, 1, 1, 1, Dyes._NULL , Element.Ba , Collections.singletonList(new TC_AspectStack(TC_Aspects.VINCULUM, 3))); - public static Materials Beryllium = new Materials( 8, TextureSet.SET_METALLIC , 14.0F, 64, 2, 1|2 |8 |32|64 , 100, 180, 100, 0, "Beryllium" , "Beryllium" , 0, 0, 1560, 0, false, false, 6, 1, 1, Dyes.dyeGreen , Element.Be , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.LUCRUM, 1))); - public static Materials Bismuth = new Materials( 90, TextureSet.SET_METALLIC , 6.0F, 64, 1, 1|2 |8 |32|64|128 , 100, 160, 160, 0, "Bismuth" , "Bismuth" , 0, 0, 544, 0, false, false, 2, 1, 1, Dyes.dyeCyan , Element.Bi , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))); - public static Materials Boron = new Materials( 9, TextureSet.SET_DULL , 1.0F, 0, 2, 1|32 , 210, 250, 210, 0, "Boron" , "Boron" , 0, 0, 2349, 0, false, false, 1, 1, 1, Dyes.dyeWhite , Element.B , Collections.singletonList(new TC_AspectStack(TC_Aspects.VITREUS, 3))); - public static Materials Caesium = new Materials( 62, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 176, 196, 222, 0, "Caesium" , "Caesium" , 0, 0, 301, 0, false, false, 4, 1, 1, Dyes._NULL , Element.Cs , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); - public static Materials Calcium = new Materials( 26, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |32 , 255, 245, 245, 0, "Calcium" , "Calcium" , 0, 0, 1115, 1115, true, false, 4, 1, 1, Dyes.dyePink , Element.Ca , Arrays.asList(new TC_AspectStack(TC_Aspects.SANO, 1), new TC_AspectStack(TC_Aspects.TUTAMEN, 1))); - public static Materials Carbon = new Materials( 10, TextureSet.SET_DULL , 1.0F, 64, 2, 1|2 |16|32|64|128 , 20, 20, 20, 0, "Carbon" , "Carbon" , 0, 0, 3800, 0, false, false, 2, 1, 1, Dyes.dyeBlack , Element.C , Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1), new TC_AspectStack(TC_Aspects.IGNIS, 1))); - public static Materials Cadmium = new Materials( 55, TextureSet.SET_SHINY , 1.0F, 0, 2, 1 |8 |32 , 50, 50, 60, 0, "Cadmium" , "Cadmium" , 0, 0, 594, 0, false, false, 3, 1, 1, Dyes.dyeGray , Element.Cd , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 1), new TC_AspectStack(TC_Aspects.POTENTIA, 1), new TC_AspectStack(TC_Aspects.VENENUM, 1))); - public static Materials Cerium = new Materials( 65, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 123, 212, 144, 0, "Cerium" , "Cerium" , 0, 0, 1068, 1068, true, false, 4, 1, 1, Dyes._NULL , Element.Ce , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); - public static Materials Chlorine = new Materials( 23, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 255, 255, 255, 0, "Chlorine" , "Chlorine" , 0, 0, 171, 0, false, false, 2, 1, 1, Dyes.dyeCyan , Element.Cl , Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 2), new TC_AspectStack(TC_Aspects.PANNUS, 1))); - public static Materials Chrome = new Materials( 30, TextureSet.SET_SHINY , 11.0F, 256, 3, 1|2 |8 |32|64|128 , 255, 230, 230, 0, "Chrome" , "Chrome" , 0, 0, 2180, 1700, true, false, 5, 1, 1, Dyes.dyePink , Element.Cr , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MACHINA, 1))); - public static Materials Cobalt = new Materials( 33, TextureSet.SET_METALLIC , 8.0F, 512, 3, 1|2 |8 |32|64|128 , 80, 80, 250, 0, "Cobalt" , "Cobalt" , 0, 0, 1768, 1700, true, false, 3, 1, 1, Dyes.dyeBlue , Element.Co , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Copper = new Materials( 35, TextureSet.SET_DULL , 1.0F, 0, 1, 1|2 |8 |32 |128 , 255, 100, 0, 0, "Copper" , "Copper" , 0, 0, 1357, 0, false, false, 3, 1, 1, Dyes.dyeOrange , Element.Cu , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.PERMUTATIO, 1))); - public static Materials Deuterium = new Materials( 2, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 255, 255, 0, 240, "Deuterium" , "Deuterium" , 0, 0, 14, 0, false, true, 10, 1, 1, Dyes.dyeYellow , Element.D , Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 3))); - public static Materials Dysprosium = new Materials( 73, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 105, 209, 80, 0, "Dysprosium" , "Dysprosium" , 0, 0, 1680, 1680, true, false, 4, 1, 1, Dyes._NULL , Element.Dy , Collections.singletonList(new TC_AspectStack(TC_Aspects.METALLUM, 3))); - public static Materials Empty = new Materials( 0, TextureSet.SET_NONE , 1.0F, 0, 2, 256/*Only when needed*/ , 255, 255, 255, 255, "Empty" , "Empty" , 0, 0, -1, 0, false, true, 1, 1, 1, Dyes._NULL , Element._NULL , Collections.singletonList(new TC_AspectStack(TC_Aspects.VACUOS, 2))); - public static Materials Erbium = new Materials( 75, TextureSet.SET_SHINY , 1.0F, 0, 2, 1|2 |8 |32 , 176, 152, 81, 0, "Erbium" , "Erbium" , 0, 0, 1802, 1802, true, false, 4, 1, 1, Dyes._NULL , Element.Er , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); - public static Materials Europium = new Materials( 70, TextureSet.SET_SHINY , 1.0F, 0, 2, 1|2 |8 |32 , 246, 181, 255, 0, "Europium" , "Europium" , 0, 0, 1099, 1099, true, false, 4, 1, 1, Dyes._NULL , Element.Eu , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); - public static Materials Fluorine = new Materials( 14, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 255, 255, 255, 127, "Fluorine" , "Fluorine" , 0, 0, 53, 0, false, true, 2, 1, 1, Dyes.dyeGreen , Element.F , Collections.singletonList(new TC_AspectStack(TC_Aspects.PERDITIO, 2))); - public static Materials Gadolinium = new Materials( 71, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 59, 186, 28, 0, "Gadolinium" , "Gadolinium" , 0, 0, 1585, 1585, true, false, 4, 1, 1, Dyes._NULL , Element.Gd , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); - public static Materials Gallium = new Materials( 37, TextureSet.SET_SHINY , 1.0F, 64, 2, 1|2 |8 |32 , 220, 220, 255, 0, "Gallium" , "Gallium" , 0, 0, 302, 0, false, false, 5, 1, 1, Dyes.dyeLightGray , Element.Ga , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ELECTRUM, 1))); - public static Materials Gold = new Materials( 86, TextureSet.SET_SHINY , 12.0F, 64, 2, 1|2 |8 |32|64|128 , 255, 255, 30, 0, "Gold" , "Gold" , 0, 0, 1337, 0, false, false, 4, 1, 1, Dyes.dyeYellow , Element.Au , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.LUCRUM, 2))); - public static Materials Holmium = new Materials( 74, TextureSet.SET_SHINY , 1.0F, 0, 2, 1|2 |8 |32 , 22, 8, 166, 0, "Holmium" , "Holmium" , 0, 0, 1734, 1734, true, false, 4, 1, 1, Dyes._NULL , Element.Ho , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); - public static Materials Hydrogen = new Materials( 1, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 0, 0, 255, 240, "Hydrogen" , "Hydrogen" , 1, 20, 14, 0, false, true, 2, 1, 1, Dyes.dyeBlue , Element.H , Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))); - public static Materials Helium = new Materials( 4, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 255, 255, 0, 240, "Helium" , "Helium" , 0, 0, 1, 0, false, true, 5, 1, 1, Dyes.dyeYellow , Element.He , Collections.singletonList(new TC_AspectStack(TC_Aspects.AER, 2))); - public static Materials Helium_3 = new Materials( 5, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 255, 255, 0, 240, "Helium_3" , "Helium-3" , 0, 0, 1, 0, false, true, 10, 1, 1, Dyes.dyeYellow , Element.He_3 , Collections.singletonList(new TC_AspectStack(TC_Aspects.AER, 3))); - public static Materials Indium = new Materials( 56, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 64, 0, 128, 0, "Indium" , "Indium" , 0, 0, 429, 0, false, false, 4, 1, 1, Dyes.dyeGray , Element.In , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); - public static Materials Iridium = new Materials( 84, TextureSet.SET_DULL , 6.0F, 2560, 3, 1|2 |8 |32|64|128 , 240, 240, 245, 0, "Iridium" , "Iridium" , 0, 0, 2719, 4500, true, false, 10, 1, 1, Dyes.dyeWhite , Element.Ir , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MACHINA, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Iron = new Materials( 32, TextureSet.SET_METALLIC , 6.0F, 256, 2, 1|2 |8 |32|64|128 , 200, 200, 200, 0, "Iron" , "Iron" , 0, 0, 1811, 0, false, false, 3, 1, 1, Dyes.dyeLightGray , Element.Fe , Collections.singletonList(new TC_AspectStack(TC_Aspects.METALLUM, 3))); - public static Materials Lanthanum = new Materials( 64, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 138, 138, 138, 0, "Lanthanum" , "Lanthanum" , 0, 0, 1193, 1193, true, false, 4, 1, 1, Dyes._NULL , Element.La , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); - public static Materials Lead = new Materials( 89, TextureSet.SET_DULL , 8.0F, 64, 1, 1|2 |8 |32|64|128 , 140, 100, 140, 0, "Lead" , "Lead" , 0, 0, 600, 0, false, false, 3, 1, 1, Dyes.dyePurple , Element.Pb , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ORDO, 1))); - public static Materials Lithium = new Materials( 6, TextureSet.SET_DULL , 1.0F, 0, 2, 1|2 |8 |32 , 225, 220, 255, 0, "Lithium" , "Lithium" , 0, 0, 454, 0, false, false, 4, 1, 1, Dyes.dyeLightBlue , Element.Li , Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 1), new TC_AspectStack(TC_Aspects.POTENTIA, 2))); - public static Materials Lutetium = new Materials( 78, TextureSet.SET_SHINY , 1.0F, 0, 2, 1|2 |8 |32 , 188, 62, 199, 0, "Lutetium" , "Lutetium" , 0, 0, 1925, 1925, true, false, 4, 1, 1, Dyes._NULL , Element.Lu , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); - public static Materials Magic = new Materials(-128, TextureSet.SET_SHINY , 8.0F, 5120, 5, 1|2|4|8|16|32|64|128 , 100, 0, 200, 0, "Magic" , "Magic" , 5, 32, 5000, 0, false, false, 7, 1, 1, Dyes.dyePurple , Element.Ma , Collections.singletonList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 4))); - public static Materials Magnesium = new Materials( 18, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 200, 200, 0, "Magnesium" , "Magnesium" , 0, 0, 923, 0, false, false, 3, 1, 1, Dyes.dyePink , Element.Mg , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.SANO, 1))); - public static Materials Manganese = new Materials( 31, TextureSet.SET_DULL , 7.0F, 512, 2, 1|2 |8 |32|64 , 250, 250, 250, 0, "Manganese" , "Manganese" , 0, 0, 1519, 0, false, false, 3, 1, 1, Dyes.dyeWhite , Element.Mn , Collections.singletonList(new TC_AspectStack(TC_Aspects.METALLUM, 3))); - public static Materials Mercury = new Materials( 87, TextureSet.SET_SHINY , 1.0F, 0, 0, 16|32 , 255, 220, 220, 0, "Mercury" , "Mercury" , 5, 32, 234, 0, false, false, 3, 1, 1, Dyes.dyeLightGray , Element.Hg , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 1), new TC_AspectStack(TC_Aspects.AQUA, 1), new TC_AspectStack(TC_Aspects.VENENUM, 1))); - public static Materials Molybdenum = new Materials( 48, TextureSet.SET_SHINY , 7.0F, 512, 2, 1|2 |8 |32|64 , 180, 180, 220, 0, "Molybdenum" , "Molybdenum" , 0, 0, 2896, 0, false, false, 1, 1, 1, Dyes.dyeBlue , Element.Mo , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))); - public static Materials Neodymium = new Materials( 67, TextureSet.SET_METALLIC , 7.0F, 512, 2, 1|2 |8 |32|64|128 , 100, 100, 100, 0, "Neodymium" , "Neodymium" , 0, 0, 1297, 1297, true, false, 4, 1, 1, Dyes._NULL , Element.Nd , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 2))); - public static Materials Neutronium = new Materials( 129, TextureSet.SET_DULL , 24.0F, 655360, 6, 1|2 |8 |32|64|128 , 250, 250, 250, 0, "Neutronium" , "Neutronium" , 0, 0, 10000, 10000, true, false, 20, 1, 1, Dyes.dyeWhite , Element.Nt , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 4), new TC_AspectStack(TC_Aspects.VITREUS, 3), new TC_AspectStack(TC_Aspects.ALIENIS, 2))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Nickel = new Materials( 34, TextureSet.SET_METALLIC , 6.0F, 64, 2, 1|2 |8 |32|64|128 , 200, 200, 250, 0, "Nickel" , "Nickel" , 0, 0, 1728, 0, false, false, 4, 1, 1, Dyes.dyeLightBlue , Element.Ni , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.IGNIS, 1))); - public static Materials Niobium = new Materials( 47, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 190, 180, 200, 0, "Niobium" , "Niobium" , 0, 0, 2750, 2750, true, false, 5, 1, 1, Dyes._NULL , Element.Nb , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ELECTRUM, 1))); - public static Materials Nitrogen = new Materials( 12, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 0, 150, 200, 240, "Nitrogen" , "Nitrogen" , 0, 0, 63, 0, false, true, 2, 1, 1, Dyes.dyeCyan , Element.N , Collections.singletonList(new TC_AspectStack(TC_Aspects.AER, 2))); - public static Materials Osmium = new Materials( 83, TextureSet.SET_METALLIC , 16.0F, 1280, 4, 1|2 |8 |32|64|128 , 50, 50, 255, 0, "Osmium" , "Osmium" , 0, 0, 3306, 4500, true, false, 10, 1, 1, Dyes.dyeBlue , Element.Os , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MACHINA, 1), new TC_AspectStack(TC_Aspects.NEBRISUM, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Oxygen = new Materials( 13, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 0, 100, 200, 240, "Oxygen" , "Oxygen" , 0, 0, 54, 0, false, true, 1, 1, 1, Dyes.dyeWhite , Element.O , Collections.singletonList(new TC_AspectStack(TC_Aspects.AER, 1))); - public static Materials Palladium = new Materials( 52, TextureSet.SET_SHINY , 8.0F, 512, 4, 1|2 |8 |32|64|128 , 128, 128, 128, 0, "Palladium" , "Palladium" , 0, 0, 1828, 1828, true, false, 4, 1, 1, Dyes.dyeGray , Element.Pd , Collections.singletonList(new TC_AspectStack(TC_Aspects.METALLUM, 3))); - public static Materials Phosphorus = new Materials( 21, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |32 , 255, 255, 0, 0, "Phosphorus" , "Phosphorus" , 0, 0, 317, 0, false, false, 2, 1, 1, Dyes.dyeYellow , Element.P , Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 2), new TC_AspectStack(TC_Aspects.POTENTIA, 1))); - public static Materials Platinum = new Materials( 85, TextureSet.SET_SHINY , 12.0F, 64, 4, 1|2 |8 |32|64|128 , 255, 255, 200, 0, "Platinum" , "Platinum" , 0, 0, 2041, 0, false, false, 6, 1, 1, Dyes.dyeOrange , Element.Pt , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.NEBRISUM, 1))); - public static Materials Plutonium = new Materials( 100, TextureSet.SET_METALLIC , 6.0F, 512, 3, 1|2 |8 |32|64 , 240, 50, 50, 0, "Plutonium" , "Plutonium 239" , 0, 0, 912, 0, false, false, 6, 1, 1, Dyes.dyeLime , Element.Pu , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 2))); - public static Materials Plutonium241 = new Materials( 101, TextureSet.SET_SHINY , 6.0F, 512, 3, 1|2 |8 |32|64 , 250, 70, 70, 0, "Plutonium241" , "Plutonium 241" , 0, 0, 912, 0, false, false, 6, 1, 1, Dyes.dyeLime , Element.Pu_241 , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 3))); - public static Materials Potassium = new Materials( 25, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1|2 |32 , 154, 172, 223, 0, "Potassium" , "Potassium" , 0, 0, 336, 0, false, false, 2, 1, 1, Dyes.dyeWhite , Element.K , Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 1), new TC_AspectStack(TC_Aspects.POTENTIA, 1))); - public static Materials Praseodymium = new Materials( 66, TextureSet.SET_DULL , 1.0F, 0, 2, 1|2 |8 |32 , 117, 214, 129, 0, "Praseodymium" , "Praseodymium" , 0, 0, 1208, 1208, true, false, 4, 1, 1, Dyes._NULL , Element.Pr , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); - public static Materials Promethium = new Materials( 68, TextureSet.SET_SHINY , 1.0F, 0, 2, 1|2 |8 |32 , 36, 181, 53, 0, "Promethium" , "Promethium" , 0, 0, 1315, 1315, true, false, 4, 1, 1, Dyes._NULL , Element.Pm , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); - public static Materials Radon = new Materials( 93, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 255, 0, 255, 240, "Radon" , "Radon" , 0, 0, 202, 0, false, true, 5, 1, 1, Dyes.dyePurple , Element.Rn , Arrays.asList(new TC_AspectStack(TC_Aspects.AER, 1), new TC_AspectStack(TC_Aspects.RADIO, 1))); - public static Materials Rubidium = new Materials( 43, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 240, 30, 30, 0, "Rubidium" , "Rubidium" , 0, 0, 312, 0, false, false, 4, 1, 1, Dyes.dyeRed , Element.Rb , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.VITREUS, 1))); - public static Materials Samarium = new Materials( 69, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 204, 0, "Samarium" , "Samarium" , 0, 0, 1345, 1345, true, false, 4, 1, 1, Dyes.dyeWhite , Element.Sm , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1), new TC_AspectStack(TC_Aspects.MAGNETO,10))); - public static Materials Scandium = new Materials( 27, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 204, 204, 204, 0, "Scandium" , "Scandium" , 0, 0, 1814, 1814, true, false, 2, 1, 1, Dyes.dyeYellow , Element.Sc , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); - public static Materials Silicon = new Materials( 20, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 60, 60, 80, 0, "Silicon" , "Raw Silicon" , 0, 0, 2273, 2273, true, false, 1, 1, 1, Dyes.dyeBlack , Element.Si , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.TENEBRAE, 1))); - public static Materials Silver = new Materials( 54, TextureSet.SET_SHINY , 10.0F, 64, 2, 1|2 |8 |32|64|128 , 220, 220, 255, 0, "Silver" , "Silver" , 0, 0, 1234, 0, false, false, 3, 1, 1, Dyes.dyeLightGray , Element.Ag , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.LUCRUM, 1))); - public static Materials Sodium = new Materials( 17, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |32 , 0, 0, 150, 0, "Sodium" , "Sodium" , 0, 0, 370, 0, false, false, 1, 1, 1, Dyes.dyeBlue , Element.Na , Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 2), new TC_AspectStack(TC_Aspects.LUX, 1))); - public static Materials Strontium = new Materials( 44, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 |32 , 200, 200, 200, 0, "Strontium" , "Strontium" , 0, 0, 1050, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Element.Sr , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.STRONTIO, 1))); - public static Materials Sulfur = new Materials( 22, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 |32 , 200, 200, 0, 0, "Sulfur" , "Sulfur" , 0, 0, 388, 0, false, false, 2, 1, 1, Dyes.dyeYellow , Element.S , Collections.singletonList(new TC_AspectStack(TC_Aspects.IGNIS, 1))); - public static Materials Tantalum = new Materials( 80, TextureSet.SET_SHINY , 6.0F, 2560, 3, 1|2 |8 |32 , 105, 183, 255, 0, "Tantalum" , "Tantalum" , 0, 0, 3290, 3290, true, false, 4, 1, 1, Dyes._NULL , Element.Ta , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.VINCULUM, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Tellurium = new Materials( 59, TextureSet.SET_DULL , 1.0F, 0, 2, 1|2 |8 |32 , 206, 277, 86, 0, "Tellurium" , "Tellurium" , 0, 0, 722, 0, false, false, 4, 1, 1, Dyes.dyeGray , Element.Te , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); - public static Materials Terbium = new Materials( 72, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 255, 255, 255, 0, "Terbium" , "Terbium" , 0, 0, 1629, 1629, true, false, 4, 1, 1, Dyes._NULL , Element.Tb , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); - public static Materials Thorium = new Materials( 96, TextureSet.SET_SHINY , 6.0F, 512, 2, 1|2 |8 |32|64 , 0, 30, 0, 0, "Thorium" , "Thorium" , 0, 0, 2115, 0, false, false, 4, 1, 1, Dyes.dyeBlack , Element.Th , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); - public static Materials Thulium = new Materials( 76, TextureSet.SET_SHINY , 1.0F, 0, 2, 1|2 |8 |32 , 89, 107, 194, 0, "Thulium" , "Thulium" , 0, 0, 1818, 1818, true, false, 4, 1, 1, Dyes._NULL , Element.Tm , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); - public static Materials Tin = new Materials( 57, TextureSet.SET_DULL , 1.0F, 0, 3, 1|2 |8 |32 |128 , 220, 220, 220, 0, "Tin" , "Tin" , 0, 0, 505, 505, false, false, 3, 1, 1, Dyes.dyeWhite , Element.Sn , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.VITREUS, 1))); - public static Materials Titanium = new Materials( 28, TextureSet.SET_METALLIC , 7.0F, 1600, 3, 1|2 |8 |32|64|128 , 220, 160, 240, 0, "Titanium" , "Titanium" , 0, 0, 1941, 1940, true, false, 5, 1, 1, Dyes.dyePurple , Element.Ti , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.TUTAMEN, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Tritanium = new Materials( 329, TextureSet.SET_METALLIC , 20.0F,1435392, 6, 1|2 |64 , 96, 0, 0, 0, "Tritanium" , "Tritanium" , 0, 0, 9900, 9900, true, false, 1, 1, 1, Dyes.dyeWhite , Element.Tn ,Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ORDO, 2))); - public static Materials Tritium = new Materials( 3, TextureSet.SET_METALLIC , 1.0F, 0, 2, 16|32 , 255, 0, 0, 240, "Tritium" , "Tritium" , 0, 0, 14, 0, false, true, 10, 1, 1, Dyes.dyeRed , Element.T , Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 4))); - public static Materials Tungsten = new Materials( 81, TextureSet.SET_METALLIC , 7.0F, 2560, 3, 1|2 |8 |32|64|128 , 50, 50, 50, 0, "Tungsten" , "Tungsten" , 0, 0, 3695, 3000, true, false, 4, 1, 1, Dyes.dyeBlack , Element.W , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 3), new TC_AspectStack(TC_Aspects.TUTAMEN, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Uranium = new Materials( 98, TextureSet.SET_METALLIC , 6.0F, 512, 3, 1|2 |8 |32|64 , 50, 240, 50, 0, "Uranium" , "Uranium 238" , 0, 0, 1405, 0, false, false, 4, 1, 1, Dyes.dyeGreen , Element.U , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); - public static Materials Uranium235 = new Materials( 97, TextureSet.SET_SHINY , 6.0F, 512, 3, 1|2 |8 |32|64 , 70, 250, 70, 0, "Uranium235" , "Uranium 235" , 0, 0, 1405, 0, false, false, 4, 1, 1, Dyes.dyeGreen , Element.U_235 , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 2))); - public static Materials Vanadium = new Materials( 29, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 50, 50, 50, 0, "Vanadium" , "Vanadium" , 0, 0, 2183, 2183, true, false, 2, 1, 1, Dyes.dyeBlack , Element.V , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); - public static Materials Ytterbium = new Materials( 77, TextureSet.SET_SHINY , 1.0F, 0, 2, 1|2 |8 |32 , 44, 199, 80, 0, "Ytterbium" , "Ytterbium" , 0, 0, 1097, 1097, true, false, 4, 1, 1, Dyes._NULL , Element.Yb , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); - public static Materials Yttrium = new Materials( 45, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 220, 250, 220, 0, "Yttrium" , "Yttrium" , 0, 0, 1799, 1799, true, false, 4, 1, 1, Dyes._NULL , Element.Y , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); - public static Materials Zinc = new Materials( 36, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1|2 |8 |32 , 250, 240, 240, 0, "Zinc" , "Zinc" , 0, 0, 692, 0, false, false, 2, 1, 1, Dyes.dyeWhite , Element.Zn , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.SANO, 1))); - - //GT++ materials - public static Materials Flerovium = new Materials( 984, TextureSet.SET_SHINY , 1.0F, 0, 0, 1|2 |8 |32|64|128 , 255,255, 255, 0, "Flerovium_GT5U" , "Flerovium" , 0, 0, 0, 0, false, false, 1 , 1, 1, Dyes.dyeWhite , Element.Fl , Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_Aspects.TC_AspectStack(TC_Aspects.RADIO, 3))).disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Aluminium = new Materials( + 19, + TextureSet.SET_DULL, + 10.0F, + 128, + 2, + 1 | 2 | 8 | 32 | 64 | 128, + 128, + 200, + 240, + 0, + "Aluminium", + "Aluminium", + 0, + 0, + 933, + 1700, + true, + false, + 3, + 1, + 1, + Dyes.dyeLightBlue, + Element.Al, + Arrays.asList( + new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.VOLATUS, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + + public static Materials Americium = new Materials( + 103, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 3, + 1 | 2 | 8 | 32, + 200, + 200, + 200, + 0, + "Americium", + "Americium", + 0, + 0, + 1449, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeLightGray, + Element.Am, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); + public static Materials Antimony = new Materials( + 58, + TextureSet.SET_SHINY, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 220, + 220, + 240, + 0, + "Antimony", + "Antimony", + 0, + 0, + 903, + 0, + false, + false, + 2, + 1, + 1, + Dyes.dyeLightGray, + Element.Sb, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.AQUA, 1))); + public static Materials Argon = new Materials( + 24, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16 | 32, + 0, + 255, + 0, + 240, + "Argon", + "Argon", + 0, + 0, + 83, + 0, + false, + true, + 5, + 1, + 1, + Dyes.dyeGreen, + Element.Ar, + Collections.singletonList(new TC_AspectStack(TC_Aspects.AER, 2))); + public static Materials Arsenic = new Materials( + 39, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 16 | 32, + 255, + 255, + 255, + 0, + "Arsenic", + "Arsenic", + 0, + 0, + 1090, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeOrange, + Element.As, + Collections.singletonList(new TC_AspectStack(TC_Aspects.VENENUM, 3))); + public static Materials Barium = new Materials( + 63, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 255, + 255, + 255, + 0, + "Barium", + "Barium", + 0, + 0, + 1000, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + Element.Ba, + Collections.singletonList(new TC_AspectStack(TC_Aspects.VINCULUM, 3))); + public static Materials Beryllium = new Materials( + 8, + TextureSet.SET_METALLIC, + 14.0F, + 64, + 2, + 1 | 2 | 8 | 32 | 64, + 100, + 180, + 100, + 0, + "Beryllium", + "Beryllium", + 0, + 0, + 1560, + 0, + false, + false, + 6, + 1, + 1, + Dyes.dyeGreen, + Element.Be, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.LUCRUM, 1))); + public static Materials Bismuth = new Materials( + 90, + TextureSet.SET_METALLIC, + 6.0F, + 64, + 1, + 1 | 2 | 8 | 32 | 64 | 128, + 100, + 160, + 160, + 0, + "Bismuth", + "Bismuth", + 0, + 0, + 544, + 0, + false, + false, + 2, + 1, + 1, + Dyes.dyeCyan, + Element.Bi, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))); + public static Materials Boron = new Materials( + 9, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 32, + 210, + 250, + 210, + 0, + "Boron", + "Boron", + 0, + 0, + 2349, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + Element.B, + Collections.singletonList(new TC_AspectStack(TC_Aspects.VITREUS, 3))); + public static Materials Caesium = new Materials( + 62, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 176, + 196, + 222, + 0, + "Caesium", + "Caesium", + 0, + 0, + 301, + 0, + false, + false, + 4, + 1, + 1, + Dyes._NULL, + Element.Cs, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); + public static Materials Calcium = new Materials( + 26, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 32, + 255, + 245, + 245, + 0, + "Calcium", + "Calcium", + 0, + 0, + 1115, + 1115, + true, + false, + 4, + 1, + 1, + Dyes.dyePink, + Element.Ca, + Arrays.asList(new TC_AspectStack(TC_Aspects.SANO, 1), new TC_AspectStack(TC_Aspects.TUTAMEN, 1))); + public static Materials Carbon = new Materials( + 10, + TextureSet.SET_DULL, + 1.0F, + 64, + 2, + 1 | 2 | 16 | 32 | 64 | 128, + 20, + 20, + 20, + 0, + "Carbon", + "Carbon", + 0, + 0, + 3800, + 0, + false, + false, + 2, + 1, + 1, + Dyes.dyeBlack, + Element.C, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1), new TC_AspectStack(TC_Aspects.IGNIS, 1))); + public static Materials Cadmium = new Materials( + 55, + TextureSet.SET_SHINY, + 1.0F, + 0, + 2, + 1 | 8 | 32, + 50, + 50, + 60, + 0, + "Cadmium", + "Cadmium", + 0, + 0, + 594, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeGray, + Element.Cd, + Arrays.asList( + new TC_AspectStack(TC_Aspects.METALLUM, 1), + new TC_AspectStack(TC_Aspects.POTENTIA, 1), + new TC_AspectStack(TC_Aspects.VENENUM, 1))); + public static Materials Cerium = new Materials( + 65, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 123, + 212, + 144, + 0, + "Cerium", + "Cerium", + 0, + 0, + 1068, + 1068, + true, + false, + 4, + 1, + 1, + Dyes._NULL, + Element.Ce, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); + public static Materials Chlorine = new Materials( + 23, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16 | 32, + 255, + 255, + 255, + 0, + "Chlorine", + "Chlorine", + 0, + 0, + 171, + 0, + false, + false, + 2, + 1, + 1, + Dyes.dyeCyan, + Element.Cl, + Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 2), new TC_AspectStack(TC_Aspects.PANNUS, 1))); + public static Materials Chrome = new Materials( + 30, + TextureSet.SET_SHINY, + 11.0F, + 256, + 3, + 1 | 2 | 8 | 32 | 64 | 128, + 255, + 230, + 230, + 0, + "Chrome", + "Chrome", + 0, + 0, + 2180, + 1700, + true, + false, + 5, + 1, + 1, + Dyes.dyePink, + Element.Cr, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MACHINA, 1))); + public static Materials Cobalt = new Materials( + 33, + TextureSet.SET_METALLIC, + 8.0F, + 512, + 3, + 1 | 2 | 8 | 32 | 64 | 128, + 80, + 80, + 250, + 0, + "Cobalt", + "Cobalt", + 0, + 0, + 1768, + 1700, + true, + false, + 3, + 1, + 1, + Dyes.dyeBlue, + Element.Co, + Arrays.asList( + new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Copper = new Materials( + 35, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1 | 2 | 8 | 32 | 128, + 255, + 100, + 0, + 0, + "Copper", + "Copper", + 0, + 0, + 1357, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeOrange, + Element.Cu, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.PERMUTATIO, 1))); + public static Materials Deuterium = new Materials( + 2, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16 | 32, + 255, + 255, + 0, + 240, + "Deuterium", + "Deuterium", + 0, + 0, + 14, + 0, + false, + true, + 10, + 1, + 1, + Dyes.dyeYellow, + Element.D, + Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 3))); + public static Materials Dysprosium = new Materials( + 73, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 105, + 209, + 80, + 0, + "Dysprosium", + "Dysprosium", + 0, + 0, + 1680, + 1680, + true, + false, + 4, + 1, + 1, + Dyes._NULL, + Element.Dy, + Collections.singletonList(new TC_AspectStack(TC_Aspects.METALLUM, 3))); + public static Materials Empty = new Materials( + 0, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 256 /*Only when needed*/, + 255, + 255, + 255, + 255, + "Empty", + "Empty", + 0, + 0, + -1, + 0, + false, + true, + 1, + 1, + 1, + Dyes._NULL, + Element._NULL, + Collections.singletonList(new TC_AspectStack(TC_Aspects.VACUOS, 2))); + public static Materials Erbium = new Materials( + 75, + TextureSet.SET_SHINY, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 176, + 152, + 81, + 0, + "Erbium", + "Erbium", + 0, + 0, + 1802, + 1802, + true, + false, + 4, + 1, + 1, + Dyes._NULL, + Element.Er, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); + public static Materials Europium = new Materials( + 70, + TextureSet.SET_SHINY, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 246, + 181, + 255, + 0, + "Europium", + "Europium", + 0, + 0, + 1099, + 1099, + true, + false, + 4, + 1, + 1, + Dyes._NULL, + Element.Eu, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); + public static Materials Fluorine = new Materials( + 14, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16 | 32, + 255, + 255, + 255, + 127, + "Fluorine", + "Fluorine", + 0, + 0, + 53, + 0, + false, + true, + 2, + 1, + 1, + Dyes.dyeGreen, + Element.F, + Collections.singletonList(new TC_AspectStack(TC_Aspects.PERDITIO, 2))); + public static Materials Gadolinium = new Materials( + 71, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 59, + 186, + 28, + 0, + "Gadolinium", + "Gadolinium", + 0, + 0, + 1585, + 1585, + true, + false, + 4, + 1, + 1, + Dyes._NULL, + Element.Gd, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); + public static Materials Gallium = new Materials( + 37, + TextureSet.SET_SHINY, + 1.0F, + 64, + 2, + 1 | 2 | 8 | 32, + 220, + 220, + 255, + 0, + "Gallium", + "Gallium", + 0, + 0, + 302, + 0, + false, + false, + 5, + 1, + 1, + Dyes.dyeLightGray, + Element.Ga, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ELECTRUM, 1))); + public static Materials Gold = new Materials( + 86, + TextureSet.SET_SHINY, + 12.0F, + 64, + 2, + 1 | 2 | 8 | 32 | 64 | 128, + 255, + 255, + 30, + 0, + "Gold", + "Gold", + 0, + 0, + 1337, + 0, + false, + false, + 4, + 1, + 1, + Dyes.dyeYellow, + Element.Au, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.LUCRUM, 2))); + public static Materials Holmium = new Materials( + 74, + TextureSet.SET_SHINY, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 22, + 8, + 166, + 0, + "Holmium", + "Holmium", + 0, + 0, + 1734, + 1734, + true, + false, + 4, + 1, + 1, + Dyes._NULL, + Element.Ho, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); + public static Materials Hydrogen = new Materials( + 1, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16 | 32, + 0, + 0, + 255, + 240, + "Hydrogen", + "Hydrogen", + 1, + 20, + 14, + 0, + false, + true, + 2, + 1, + 1, + Dyes.dyeBlue, + Element.H, + Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))); + public static Materials Helium = new Materials( + 4, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16 | 32, + 255, + 255, + 0, + 240, + "Helium", + "Helium", + 0, + 0, + 1, + 0, + false, + true, + 5, + 1, + 1, + Dyes.dyeYellow, + Element.He, + Collections.singletonList(new TC_AspectStack(TC_Aspects.AER, 2))); + public static Materials Helium_3 = new Materials( + 5, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16 | 32, + 255, + 255, + 0, + 240, + "Helium_3", + "Helium-3", + 0, + 0, + 1, + 0, + false, + true, + 10, + 1, + 1, + Dyes.dyeYellow, + Element.He_3, + Collections.singletonList(new TC_AspectStack(TC_Aspects.AER, 3))); + public static Materials Indium = new Materials( + 56, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 64, + 0, + 128, + 0, + "Indium", + "Indium", + 0, + 0, + 429, + 0, + false, + false, + 4, + 1, + 1, + Dyes.dyeGray, + Element.In, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); + public static Materials Iridium = new Materials( + 84, + TextureSet.SET_DULL, + 6.0F, + 2560, + 3, + 1 | 2 | 8 | 32 | 64 | 128, + 240, + 240, + 245, + 0, + "Iridium", + "Iridium", + 0, + 0, + 2719, + 4500, + true, + false, + 10, + 1, + 1, + Dyes.dyeWhite, + Element.Ir, + Arrays.asList( + new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MACHINA, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Iron = new Materials( + 32, + TextureSet.SET_METALLIC, + 6.0F, + 256, + 2, + 1 | 2 | 8 | 32 | 64 | 128, + 200, + 200, + 200, + 0, + "Iron", + "Iron", + 0, + 0, + 1811, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeLightGray, + Element.Fe, + Collections.singletonList(new TC_AspectStack(TC_Aspects.METALLUM, 3))); + public static Materials Lanthanum = new Materials( + 64, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 138, + 138, + 138, + 0, + "Lanthanum", + "Lanthanum", + 0, + 0, + 1193, + 1193, + true, + false, + 4, + 1, + 1, + Dyes._NULL, + Element.La, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); + public static Materials Lead = new Materials( + 89, + TextureSet.SET_DULL, + 8.0F, + 64, + 1, + 1 | 2 | 8 | 32 | 64 | 128, + 140, + 100, + 140, + 0, + "Lead", + "Lead", + 0, + 0, + 600, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyePurple, + Element.Pb, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ORDO, 1))); + public static Materials Lithium = new Materials( + 6, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 225, + 220, + 255, + 0, + "Lithium", + "Lithium", + 0, + 0, + 454, + 0, + false, + false, + 4, + 1, + 1, + Dyes.dyeLightBlue, + Element.Li, + Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 1), new TC_AspectStack(TC_Aspects.POTENTIA, 2))); + public static Materials Lutetium = new Materials( + 78, + TextureSet.SET_SHINY, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 188, + 62, + 199, + 0, + "Lutetium", + "Lutetium", + 0, + 0, + 1925, + 1925, + true, + false, + 4, + 1, + 1, + Dyes._NULL, + Element.Lu, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); + public static Materials Magic = new Materials( + -128, + TextureSet.SET_SHINY, + 8.0F, + 5120, + 5, + 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128, + 100, + 0, + 200, + 0, + "Magic", + "Magic", + 5, + 32, + 5000, + 0, + false, + false, + 7, + 1, + 1, + Dyes.dyePurple, + Element.Ma, + Collections.singletonList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 4))); + public static Materials Magnesium = new Materials( + 18, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 255, + 200, + 200, + 0, + "Magnesium", + "Magnesium", + 0, + 0, + 923, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyePink, + Element.Mg, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.SANO, 1))); + public static Materials Manganese = new Materials( + 31, + TextureSet.SET_DULL, + 7.0F, + 512, + 2, + 1 | 2 | 8 | 32 | 64, + 250, + 250, + 250, + 0, + "Manganese", + "Manganese", + 0, + 0, + 1519, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeWhite, + Element.Mn, + Collections.singletonList(new TC_AspectStack(TC_Aspects.METALLUM, 3))); + public static Materials Mercury = new Materials( + 87, + TextureSet.SET_SHINY, + 1.0F, + 0, + 0, + 16 | 32, + 255, + 220, + 220, + 0, + "Mercury", + "Mercury", + 5, + 32, + 234, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeLightGray, + Element.Hg, + Arrays.asList( + new TC_AspectStack(TC_Aspects.METALLUM, 1), + new TC_AspectStack(TC_Aspects.AQUA, 1), + new TC_AspectStack(TC_Aspects.VENENUM, 1))); + public static Materials Molybdenum = new Materials( + 48, + TextureSet.SET_SHINY, + 7.0F, + 512, + 2, + 1 | 2 | 8 | 32 | 64, + 180, + 180, + 220, + 0, + "Molybdenum", + "Molybdenum", + 0, + 0, + 2896, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlue, + Element.Mo, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))); + public static Materials Neodymium = new Materials( + 67, + TextureSet.SET_METALLIC, + 7.0F, + 512, + 2, + 1 | 2 | 8 | 32 | 64 | 128, + 100, + 100, + 100, + 0, + "Neodymium", + "Neodymium", + 0, + 0, + 1297, + 1297, + true, + false, + 4, + 1, + 1, + Dyes._NULL, + Element.Nd, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 2))); + public static Materials Neutronium = new Materials( + 129, + TextureSet.SET_DULL, + 24.0F, + 655360, + 6, + 1 | 2 | 8 | 32 | 64 | 128, + 250, + 250, + 250, + 0, + "Neutronium", + "Neutronium", + 0, + 0, + 10000, + 10000, + true, + false, + 20, + 1, + 1, + Dyes.dyeWhite, + Element.Nt, + Arrays.asList( + new TC_AspectStack(TC_Aspects.METALLUM, 4), + new TC_AspectStack(TC_Aspects.VITREUS, 3), + new TC_AspectStack(TC_Aspects.ALIENIS, 2))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Nickel = new Materials( + 34, + TextureSet.SET_METALLIC, + 6.0F, + 64, + 2, + 1 | 2 | 8 | 32 | 64 | 128, + 200, + 200, + 250, + 0, + "Nickel", + "Nickel", + 0, + 0, + 1728, + 0, + false, + false, + 4, + 1, + 1, + Dyes.dyeLightBlue, + Element.Ni, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.IGNIS, 1))); + public static Materials Niobium = new Materials( + 47, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 190, + 180, + 200, + 0, + "Niobium", + "Niobium", + 0, + 0, + 2750, + 2750, + true, + false, + 5, + 1, + 1, + Dyes._NULL, + Element.Nb, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ELECTRUM, 1))); + public static Materials Nitrogen = new Materials( + 12, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16 | 32, + 0, + 150, + 200, + 240, + "Nitrogen", + "Nitrogen", + 0, + 0, + 63, + 0, + false, + true, + 2, + 1, + 1, + Dyes.dyeCyan, + Element.N, + Collections.singletonList(new TC_AspectStack(TC_Aspects.AER, 2))); + public static Materials Osmium = new Materials( + 83, + TextureSet.SET_METALLIC, + 16.0F, + 1280, + 4, + 1 | 2 | 8 | 32 | 64 | 128, + 50, + 50, + 255, + 0, + "Osmium", + "Osmium", + 0, + 0, + 3306, + 4500, + true, + false, + 10, + 1, + 1, + Dyes.dyeBlue, + Element.Os, + Arrays.asList( + new TC_AspectStack(TC_Aspects.METALLUM, 2), + new TC_AspectStack(TC_Aspects.MACHINA, 1), + new TC_AspectStack(TC_Aspects.NEBRISUM, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Oxygen = new Materials( + 13, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16 | 32, + 0, + 100, + 200, + 240, + "Oxygen", + "Oxygen", + 0, + 0, + 54, + 0, + false, + true, + 1, + 1, + 1, + Dyes.dyeWhite, + Element.O, + Collections.singletonList(new TC_AspectStack(TC_Aspects.AER, 1))); + public static Materials Palladium = new Materials( + 52, + TextureSet.SET_SHINY, + 8.0F, + 512, + 4, + 1 | 2 | 8 | 32 | 64 | 128, + 128, + 128, + 128, + 0, + "Palladium", + "Palladium", + 0, + 0, + 1828, + 1828, + true, + false, + 4, + 1, + 1, + Dyes.dyeGray, + Element.Pd, + Collections.singletonList(new TC_AspectStack(TC_Aspects.METALLUM, 3))); + public static Materials Phosphorus = new Materials( + 21, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 32, + 255, + 255, + 0, + 0, + "Phosphorus", + "Phosphorus", + 0, + 0, + 317, + 0, + false, + false, + 2, + 1, + 1, + Dyes.dyeYellow, + Element.P, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 2), new TC_AspectStack(TC_Aspects.POTENTIA, 1))); + public static Materials Platinum = new Materials( + 85, + TextureSet.SET_SHINY, + 12.0F, + 64, + 4, + 1 | 2 | 8 | 32 | 64 | 128, + 255, + 255, + 200, + 0, + "Platinum", + "Platinum", + 0, + 0, + 2041, + 0, + false, + false, + 6, + 1, + 1, + Dyes.dyeOrange, + Element.Pt, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.NEBRISUM, 1))); + public static Materials Plutonium = new Materials( + 100, + TextureSet.SET_METALLIC, + 6.0F, + 512, + 3, + 1 | 2 | 8 | 32 | 64, + 240, + 50, + 50, + 0, + "Plutonium", + "Plutonium 239", + 0, + 0, + 912, + 0, + false, + false, + 6, + 1, + 1, + Dyes.dyeLime, + Element.Pu, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 2))); + public static Materials Plutonium241 = new Materials( + 101, + TextureSet.SET_SHINY, + 6.0F, + 512, + 3, + 1 | 2 | 8 | 32 | 64, + 250, + 70, + 70, + 0, + "Plutonium241", + "Plutonium 241", + 0, + 0, + 912, + 0, + false, + false, + 6, + 1, + 1, + Dyes.dyeLime, + Element.Pu_241, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 3))); + public static Materials Potassium = new Materials( + 25, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 1, + 1 | 2 | 32, + 154, + 172, + 223, + 0, + "Potassium", + "Potassium", + 0, + 0, + 336, + 0, + false, + false, + 2, + 1, + 1, + Dyes.dyeWhite, + Element.K, + Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 1), new TC_AspectStack(TC_Aspects.POTENTIA, 1))); + public static Materials Praseodymium = new Materials( + 66, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 117, + 214, + 129, + 0, + "Praseodymium", + "Praseodymium", + 0, + 0, + 1208, + 1208, + true, + false, + 4, + 1, + 1, + Dyes._NULL, + Element.Pr, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); + public static Materials Promethium = new Materials( + 68, + TextureSet.SET_SHINY, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 36, + 181, + 53, + 0, + "Promethium", + "Promethium", + 0, + 0, + 1315, + 1315, + true, + false, + 4, + 1, + 1, + Dyes._NULL, + Element.Pm, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); + public static Materials Radon = new Materials( + 93, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16 | 32, + 255, + 0, + 255, + 240, + "Radon", + "Radon", + 0, + 0, + 202, + 0, + false, + true, + 5, + 1, + 1, + Dyes.dyePurple, + Element.Rn, + Arrays.asList(new TC_AspectStack(TC_Aspects.AER, 1), new TC_AspectStack(TC_Aspects.RADIO, 1))); + public static Materials Rubidium = new Materials( + 43, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 240, + 30, + 30, + 0, + "Rubidium", + "Rubidium", + 0, + 0, + 312, + 0, + false, + false, + 4, + 1, + 1, + Dyes.dyeRed, + Element.Rb, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.VITREUS, 1))); + public static Materials Samarium = new Materials( + 69, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 255, + 255, + 204, + 0, + "Samarium", + "Samarium", + 0, + 0, + 1345, + 1345, + true, + false, + 4, + 1, + 1, + Dyes.dyeWhite, + Element.Sm, + Arrays.asList( + new TC_AspectStack(TC_Aspects.METALLUM, 2), + new TC_AspectStack(TC_Aspects.RADIO, 1), + new TC_AspectStack(TC_Aspects.MAGNETO, 10))); + public static Materials Scandium = new Materials( + 27, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 204, + 204, + 204, + 0, + "Scandium", + "Scandium", + 0, + 0, + 1814, + 1814, + true, + false, + 2, + 1, + 1, + Dyes.dyeYellow, + Element.Sc, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); + public static Materials Silicon = new Materials( + 20, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 60, + 60, + 80, + 0, + "Silicon", + "Raw Silicon", + 0, + 0, + 2273, + 2273, + true, + false, + 1, + 1, + 1, + Dyes.dyeBlack, + Element.Si, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.TENEBRAE, 1))); + public static Materials Silver = new Materials( + 54, + TextureSet.SET_SHINY, + 10.0F, + 64, + 2, + 1 | 2 | 8 | 32 | 64 | 128, + 220, + 220, + 255, + 0, + "Silver", + "Silver", + 0, + 0, + 1234, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeLightGray, + Element.Ag, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.LUCRUM, 1))); + public static Materials Sodium = new Materials( + 17, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 32, + 0, + 0, + 150, + 0, + "Sodium", + "Sodium", + 0, + 0, + 370, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlue, + Element.Na, + Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 2), new TC_AspectStack(TC_Aspects.LUX, 1))); + public static Materials Strontium = new Materials( + 44, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 8 | 32, + 200, + 200, + 200, + 0, + "Strontium", + "Strontium", + 0, + 0, + 1050, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + Element.Sr, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.STRONTIO, 1))); + public static Materials Sulfur = new Materials( + 22, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 8 | 32, + 200, + 200, + 0, + 0, + "Sulfur", + "Sulfur", + 0, + 0, + 388, + 0, + false, + false, + 2, + 1, + 1, + Dyes.dyeYellow, + Element.S, + Collections.singletonList(new TC_AspectStack(TC_Aspects.IGNIS, 1))); + public static Materials Tantalum = new Materials( + 80, + TextureSet.SET_SHINY, + 6.0F, + 2560, + 3, + 1 | 2 | 8 | 32, + 105, + 183, + 255, + 0, + "Tantalum", + "Tantalum", + 0, + 0, + 3290, + 3290, + true, + false, + 4, + 1, + 1, + Dyes._NULL, + Element.Ta, + Arrays.asList( + new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.VINCULUM, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Tellurium = new Materials( + 59, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 206, + 277, + 86, + 0, + "Tellurium", + "Tellurium", + 0, + 0, + 722, + 0, + false, + false, + 4, + 1, + 1, + Dyes.dyeGray, + Element.Te, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); + public static Materials Terbium = new Materials( + 72, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 255, + 255, + 255, + 0, + "Terbium", + "Terbium", + 0, + 0, + 1629, + 1629, + true, + false, + 4, + 1, + 1, + Dyes._NULL, + Element.Tb, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); + public static Materials Thorium = new Materials( + 96, + TextureSet.SET_SHINY, + 6.0F, + 512, + 2, + 1 | 2 | 8 | 32 | 64, + 0, + 30, + 0, + 0, + "Thorium", + "Thorium", + 0, + 0, + 2115, + 0, + false, + false, + 4, + 1, + 1, + Dyes.dyeBlack, + Element.Th, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); + public static Materials Thulium = new Materials( + 76, + TextureSet.SET_SHINY, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 89, + 107, + 194, + 0, + "Thulium", + "Thulium", + 0, + 0, + 1818, + 1818, + true, + false, + 4, + 1, + 1, + Dyes._NULL, + Element.Tm, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); + public static Materials Tin = new Materials( + 57, + TextureSet.SET_DULL, + 1.0F, + 0, + 3, + 1 | 2 | 8 | 32 | 128, + 220, + 220, + 220, + 0, + "Tin", + "Tin", + 0, + 0, + 505, + 505, + false, + false, + 3, + 1, + 1, + Dyes.dyeWhite, + Element.Sn, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.VITREUS, 1))); + public static Materials Titanium = new Materials( + 28, + TextureSet.SET_METALLIC, + 7.0F, + 1600, + 3, + 1 | 2 | 8 | 32 | 64 | 128, + 220, + 160, + 240, + 0, + "Titanium", + "Titanium", + 0, + 0, + 1941, + 1940, + true, + false, + 5, + 1, + 1, + Dyes.dyePurple, + Element.Ti, + Arrays.asList( + new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.TUTAMEN, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Tritanium = new Materials( + 329, + TextureSet.SET_METALLIC, + 20.0F, + 1435392, + 6, + 1 | 2 | 64, + 96, + 0, + 0, + 0, + "Tritanium", + "Tritanium", + 0, + 0, + 9900, + 9900, + true, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + Element.Tn, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ORDO, 2))); + public static Materials Tritium = new Materials( + 3, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 16 | 32, + 255, + 0, + 0, + 240, + "Tritium", + "Tritium", + 0, + 0, + 14, + 0, + false, + true, + 10, + 1, + 1, + Dyes.dyeRed, + Element.T, + Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 4))); + public static Materials Tungsten = new Materials( + 81, + TextureSet.SET_METALLIC, + 7.0F, + 2560, + 3, + 1 | 2 | 8 | 32 | 64 | 128, + 50, + 50, + 50, + 0, + "Tungsten", + "Tungsten", + 0, + 0, + 3695, + 3000, + true, + false, + 4, + 1, + 1, + Dyes.dyeBlack, + Element.W, + Arrays.asList( + new TC_AspectStack(TC_Aspects.METALLUM, 3), new TC_AspectStack(TC_Aspects.TUTAMEN, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Uranium = new Materials( + 98, + TextureSet.SET_METALLIC, + 6.0F, + 512, + 3, + 1 | 2 | 8 | 32 | 64, + 50, + 240, + 50, + 0, + "Uranium", + "Uranium 238", + 0, + 0, + 1405, + 0, + false, + false, + 4, + 1, + 1, + Dyes.dyeGreen, + Element.U, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); + public static Materials Uranium235 = new Materials( + 97, + TextureSet.SET_SHINY, + 6.0F, + 512, + 3, + 1 | 2 | 8 | 32 | 64, + 70, + 250, + 70, + 0, + "Uranium235", + "Uranium 235", + 0, + 0, + 1405, + 0, + false, + false, + 4, + 1, + 1, + Dyes.dyeGreen, + Element.U_235, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 2))); + public static Materials Vanadium = new Materials( + 29, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 50, + 50, + 50, + 0, + "Vanadium", + "Vanadium", + 0, + 0, + 2183, + 2183, + true, + false, + 2, + 1, + 1, + Dyes.dyeBlack, + Element.V, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); + public static Materials Ytterbium = new Materials( + 77, + TextureSet.SET_SHINY, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 44, + 199, + 80, + 0, + "Ytterbium", + "Ytterbium", + 0, + 0, + 1097, + 1097, + true, + false, + 4, + 1, + 1, + Dyes._NULL, + Element.Yb, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); + public static Materials Yttrium = new Materials( + 45, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 220, + 250, + 220, + 0, + "Yttrium", + "Yttrium", + 0, + 0, + 1799, + 1799, + true, + false, + 4, + 1, + 1, + Dyes._NULL, + Element.Y, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); + public static Materials Zinc = new Materials( + 36, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 1, + 1 | 2 | 8 | 32, + 250, + 240, + 240, + 0, + "Zinc", + "Zinc", + 0, + 0, + 692, + 0, + false, + false, + 2, + 1, + 1, + Dyes.dyeWhite, + Element.Zn, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.SANO, 1))); + + // GT++ materials + public static Materials Flerovium = new Materials( + 984, + TextureSet.SET_SHINY, + 1.0F, + 0, + 0, + 1 | 2 | 8 | 32 | 64 | 128, + 255, + 255, + 255, + 0, + "Flerovium_GT5U", + "Flerovium", + 0, + 0, + 0, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + Element.Fl, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2), + new TC_Aspects.TC_AspectStack(TC_Aspects.RADIO, 3))) + .disableAutoGeneratedBlastFurnaceRecipes(); /** * The "Random Material" ones. */ - public static Materials Organic = new Materials( -1, TextureSet.SET_LEAF , 1.0F, 0, 1, false, "Organic" , "Organic" ); - public static Materials AnyCopper = new Materials( -1, TextureSet.SET_SHINY , 1.0F, 0, 3, false, "AnyCopper" , "AnyCopper" ); - public static Materials AnyBronze = new Materials( -1, TextureSet.SET_SHINY , 1.0F, 0, 3, false, "AnyBronze" , "AnyBronze" ); - public static Materials AnyIron = new Materials( -1, TextureSet.SET_SHINY , 1.0F, 0, 3, false, "AnyIron" , "AnyIron" ); - public static Materials AnyRubber = new Materials( -1, TextureSet.SET_SHINY , 1.0F, 0, 3, false, "AnyRubber" , "AnyRubber" ); - public static Materials AnySyntheticRubber = new Materials( -1, TextureSet.SET_SHINY , 1.0F, 0, 3, false, "AnySyntheticRubber" , "AnySyntheticRubber" ); - public static Materials Crystal = new Materials( -1, TextureSet.SET_SHINY , 1.0F, 0, 3, false, "Crystal" , "Crystal" ); - public static Materials Quartz = new Materials( -1, TextureSet.SET_QUARTZ , 1.0F, 0, 2, false, "Quartz" , "Quartz" ); - public static Materials Metal = new Materials( -1, TextureSet.SET_METALLIC , 1.0F, 0, 2, false, "Metal" , "Metal" ); - public static Materials Unknown = new Materials( -1, TextureSet.SET_DULL , 1.0F, 0, 2, false, "Unknown" , "Unknown" ); - public static Materials Cobblestone = new Materials( -1, TextureSet.SET_DULL , 1.0F, 0, 1, false, "Cobblestone" , "Cobblestone" ); - public static Materials BrickNether = new Materials( -1, TextureSet.SET_DULL , 1.0F, 0, 1, false, "BrickNether" , "BrickNether" ); + public static Materials Organic = new Materials(-1, TextureSet.SET_LEAF, 1.0F, 0, 1, false, "Organic", "Organic"); + + public static Materials AnyCopper = + new Materials(-1, TextureSet.SET_SHINY, 1.0F, 0, 3, false, "AnyCopper", "AnyCopper"); + public static Materials AnyBronze = + new Materials(-1, TextureSet.SET_SHINY, 1.0F, 0, 3, false, "AnyBronze", "AnyBronze"); + public static Materials AnyIron = new Materials(-1, TextureSet.SET_SHINY, 1.0F, 0, 3, false, "AnyIron", "AnyIron"); + public static Materials AnyRubber = + new Materials(-1, TextureSet.SET_SHINY, 1.0F, 0, 3, false, "AnyRubber", "AnyRubber"); + public static Materials AnySyntheticRubber = + new Materials(-1, TextureSet.SET_SHINY, 1.0F, 0, 3, false, "AnySyntheticRubber", "AnySyntheticRubber"); + public static Materials Crystal = new Materials(-1, TextureSet.SET_SHINY, 1.0F, 0, 3, false, "Crystal", "Crystal"); + public static Materials Quartz = new Materials(-1, TextureSet.SET_QUARTZ, 1.0F, 0, 2, false, "Quartz", "Quartz"); + public static Materials Metal = new Materials(-1, TextureSet.SET_METALLIC, 1.0F, 0, 2, false, "Metal", "Metal"); + public static Materials Unknown = new Materials(-1, TextureSet.SET_DULL, 1.0F, 0, 2, false, "Unknown", "Unknown"); + public static Materials Cobblestone = + new Materials(-1, TextureSet.SET_DULL, 1.0F, 0, 1, false, "Cobblestone", "Cobblestone"); + public static Materials BrickNether = + new Materials(-1, TextureSet.SET_DULL, 1.0F, 0, 1, false, "BrickNether", "BrickNether"); /** * The "I don't care" Section, everything I don't want to do anything with right now, is right here. Just to make the Material Finder shut up about them. * But I do see potential uses in some of these Materials. */ - public static Materials Serpentine = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 |8 , 255, 255, 255, 0, "Serpentine" , "Serpentine" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Flux = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Flux" , "Flux" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials OsmiumTetroxide = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "OsmiumTetroxide" , "Osmium Tetroxide" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials RubberTreeSap = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 255, 255, 255, 0, "RubberTreeSap" , "Rubber Tree Sap" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials PhasedIron = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "PhasedIron" , "Phased Iron" , 0, 0, 3300, 3300, true, false, 3, 1, 1, Dyes._NULL ); - public static Materials PhasedGold = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "PhasedGold" , "Phased Gold" , 0, 0, -1, 1800, true, false, 3, 1, 1, Dyes._NULL ); - public static Materials HeeEndium = new Materials( 770, TextureSet.SET_DULL , 16.0F, 1024, 4, 1|2 |8 |64|128 , 165, 220, 250, 0, "HeeEndium" , "Endium" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeLightBlue ); - public static Materials Teslatite = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 60, 180, 200, 0, "Teslatite" , "Teslatite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Fluix = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 |4 , 255, 255, 255, 0, "Fluix" , "Fluix" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials DarkThaumium = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "DarkThaumium" , "Dark Thaumium" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Alfium = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Alfium" , "Alfium" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Mutation = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Mutation" , "Mutation" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Aquamarine = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 |4 , 255, 255, 255, 0, "Aquamarine" , "Aquamarine" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Ender = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Ender" , "Ender" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials SodiumPeroxide = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "SodiumPeroxide" , "Sodium Peroxide" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials IridiumSodiumOxide = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "IridiumSodiumOxide" , "Iridium Sodium Oxide" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials PlatinumGroupSludge = new Materials( 241, TextureSet.SET_POWDER , 1.0F, 0, 2, 1 , 0, 30, 0, 0, "PlatinumGroupSludge" , "Platinum Group Sludge" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Draconium = new Materials( 975, TextureSet.SET_SHINY , 20.0F, 32768, 7, 1|2| 8| 32|64|128 , 122, 68, 176, 0, "Draconium" , "Draconium" , 0, 0, 5000, 7200, true, false, 3, 1, 1, Dyes.dyePink ).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials DraconiumAwakened = new Materials( 976, TextureSet.SET_SHINY , 40.0F, 65536, 9, 1|2| 8| 32|64|128 , 244, 78, 0, 0, "DraconiumAwakened" , "Awakened Draconium" , 0, 0, 9900,9900, true, false, 3, 1, 1, Dyes.dyeOrange ).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials PurpleAlloy = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 100, 180, 255, 0, "PurpleAlloy" , "Purple Alloy" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials InfusedTeslatite = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 100, 180, 255, 0, "InfusedTeslatite" , "Infused Teslatite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); + public static Materials Serpentine = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1 | 2 | 8, + 255, + 255, + 255, + 0, + "Serpentine", + "Serpentine", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + + public static Materials Flux = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1, + 255, + 255, + 255, + 0, + "Flux", + "Flux", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials OsmiumTetroxide = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1, + 255, + 255, + 255, + 0, + "OsmiumTetroxide", + "Osmium Tetroxide", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials RubberTreeSap = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 0, + 255, + 255, + 255, + 0, + "RubberTreeSap", + "Rubber Tree Sap", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials PhasedIron = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1 | 2, + 255, + 255, + 255, + 0, + "PhasedIron", + "Phased Iron", + 0, + 0, + 3300, + 3300, + true, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials PhasedGold = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1 | 2, + 255, + 255, + 255, + 0, + "PhasedGold", + "Phased Gold", + 0, + 0, + -1, + 1800, + true, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials HeeEndium = new Materials( + 770, + TextureSet.SET_DULL, + 16.0F, + 1024, + 4, + 1 | 2 | 8 | 64 | 128, + 165, + 220, + 250, + 0, + "HeeEndium", + "Endium", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeLightBlue); + public static Materials Teslatite = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1, + 60, + 180, + 200, + 0, + "Teslatite", + "Teslatite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Fluix = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1 | 4, + 255, + 255, + 255, + 0, + "Fluix", + "Fluix", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials DarkThaumium = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1 | 2, + 255, + 255, + 255, + 0, + "DarkThaumium", + "Dark Thaumium", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Alfium = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1, + 255, + 255, + 255, + 0, + "Alfium", + "Alfium", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Mutation = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1, + 255, + 255, + 255, + 0, + "Mutation", + "Mutation", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Aquamarine = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1 | 4, + 255, + 255, + 255, + 0, + "Aquamarine", + "Aquamarine", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Ender = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1, + 255, + 255, + 255, + 0, + "Ender", + "Ender", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials SodiumPeroxide = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1, + 255, + 255, + 255, + 0, + "SodiumPeroxide", + "Sodium Peroxide", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials IridiumSodiumOxide = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1, + 255, + 255, + 255, + 0, + "IridiumSodiumOxide", + "Iridium Sodium Oxide", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials PlatinumGroupSludge = new Materials( + 241, + TextureSet.SET_POWDER, + 1.0F, + 0, + 2, + 1, + 0, + 30, + 0, + 0, + "PlatinumGroupSludge", + "Platinum Group Sludge", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Draconium = new Materials( + 975, + TextureSet.SET_SHINY, + 20.0F, + 32768, + 7, + 1 | 2 | 8 | 32 | 64 | 128, + 122, + 68, + 176, + 0, + "Draconium", + "Draconium", + 0, + 0, + 5000, + 7200, + true, + false, + 3, + 1, + 1, + Dyes.dyePink) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials DraconiumAwakened = new Materials( + 976, + TextureSet.SET_SHINY, + 40.0F, + 65536, + 9, + 1 | 2 | 8 | 32 | 64 | 128, + 244, + 78, + 0, + 0, + "DraconiumAwakened", + "Awakened Draconium", + 0, + 0, + 9900, + 9900, + true, + false, + 3, + 1, + 1, + Dyes.dyeOrange) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials PurpleAlloy = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 0, + 100, + 180, + 255, + 0, + "PurpleAlloy", + "Purple Alloy", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials InfusedTeslatite = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 0, + 100, + 180, + 255, + 0, + "InfusedTeslatite", + "Infused Teslatite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); /** * Unknown Material Components. Dead End Section. */ - public static Materials Adamantium = new Materials( 319, TextureSet.SET_SHINY , 32.0F, 8192, 10, 1|2 |8 |64|128 , 255, 255, 255, 0, "Adamantium" , "Adamantium" , 0, 0, 7200, 7200, true, false, 1, 1, 1, Dyes.dyeLightGray ).setTurbineMultipliers(1, 5, 1); - public static Materials Adamite = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 3, 1 |8 , 255, 255, 255, 0, "Adamite" , "Adamite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray ); - public static Materials Adluorite = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 |8 |64|128 , 255, 255, 255, 0, "Adluorite" , "Adluorite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightBlue ); - public static Materials Agate = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Agate" , "Agate" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Alduorite = new Materials( 485, TextureSet.SET_SHINY , 32.0F, 8192, 1, 1|2 |8 |64|128 , 159, 180, 180, 0, "Alduorite" , "Alduorite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ).disableAutoGeneratedBlastFurnaceRecipes().setTurbineMultipliers(6, 1, 1); - public static Materials Amber = new Materials( 514, TextureSet.SET_RUBY , 4.0F, 128, 2, 1 |4|8 |64 , 255, 128, 0, 127, "Amber" , "Amber" , 5, 3, -1, 0, false, true, 1, 1, 1, Dyes.dyeOrange ,1, Arrays.asList(new MaterialStack(Carbon, 10), new MaterialStack(Hydrogen, 10), new MaterialStack(Oxygen, 16)), Arrays.asList(new TC_AspectStack(TC_Aspects.VINCULUM, 2), new TC_AspectStack(TC_Aspects.VITREUS, 1))); - public static Materials Ammonium = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Ammonium" , "Ammonium" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Amordrine = new Materials( -1, TextureSet.SET_NONE , 6.0F, 64, 2, 1|2 |8 |64 , 255, 255, 255, 0, "Amordrine" , "Amordrine" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Andesite = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 |8 , 255, 255, 255, 0, "Andesite" , "Andesite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Angmallen = new Materials( 958, TextureSet.SET_METALLIC , 10.0F, 128, 2, 1|2 |8 |64 , 215, 225, 138, 0, "Angmallen" , "Angmallen" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Ardite = new Materials( 382, TextureSet.SET_METALLIC , 18.0F, 1024, 4, 1|2 |8 |32|64|128 , 250, 129, 0, 0, "Ardite" , "Ardite" , 0, 0, 1600, 1600, true, false, 1, 1, 1, Dyes.dyeRed ).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Aredrite = new Materials( -1, TextureSet.SET_NONE , 6.0F, 64, 2, 1|2 |8 |64 , 255, 0, 0, 0, "Aredrite" , "Aredrite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow ); - public static Materials Atlarus = new Materials( 965, TextureSet.SET_METALLIC , 6.0F, 64, 2, 1|2 |8 |64 , 255, 255, 255, 0, "Atlarus" , "Atlarus" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Bitumen = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 |8 , 255, 255, 255, 0, "Bitumen" , "Bitumen" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Black = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 0, 0, 0, 0, "Black" , "Black" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeBlack ); - public static Materials Blizz = new Materials( 851, TextureSet.SET_SHINY , 1.0F, 0, 2, 1 , 220, 233, 255, 0, "Blizz" , "Blizz" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Blueschist = new Materials( 852, TextureSet.SET_DULL , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Blueschist" , "Blueschist" , 0, 0, -1, 0, false, false, 0, 1, 1, Dyes.dyeLightBlue ); - public static Materials Bluestone = new Materials( 813, TextureSet.SET_DULL , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Bluestone" , "Bluestone" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlue ); - public static Materials Bloodstone = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Bloodstone" , "Bloodstone" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeRed ); - public static Materials Blutonium = new Materials( -1, TextureSet.SET_SHINY , 1.0F, 0, 2, 1|2 |8 , 0, 0, 255, 0, "Blutonium" , "Blutonium" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeBlue ); - public static Materials Carmot = new Materials( 962, TextureSet.SET_METALLIC , 16.0F, 128, 1, 1|2 |8 |64 , 217, 205, 140, 0, "Carmot" , "Carmot" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Celenegil = new Materials( 964, TextureSet.SET_METALLIC , 10.0F, 4096, 2, 1|2 |8 |64 , 148, 204, 72, 0, "Celenegil" , "Celenegil" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials CertusQuartz = new Materials( 516, TextureSet.SET_QUARTZ , 5.0F, 32, 1, 1 |4|8 |64 , 210, 210, 230, 0, "CertusQuartz" , "Certus Quartz" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeLightGray , Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 1), new TC_AspectStack(TC_Aspects.VITREUS, 1))); - public static Materials Ceruclase = new Materials( 952, TextureSet.SET_METALLIC , 32.0F, 1280, 2, 1|2 |8 |64|128 , 140, 189, 208, 0, "Ceruclase" , "Ceruclase" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlue ).disableAutoGeneratedBlastFurnaceRecipes().setTurbineMultipliers(1, 22, 1); - public static Materials Citrine = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Citrine" , "Citrine" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials CobaltHexahydrate = new Materials( 853, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |16 , 80, 80, 250, 0, "CobaltHexahydrate" , "Cobalt Hexahydrate" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlue ); - public static Materials ConstructionFoam = new Materials( 854, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |16 |64|128 , 128, 128, 128, 0, "ConstructionFoam" , "Construction Foam" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeGray ); - public static Materials Chert = new Materials( 857, TextureSet.SET_DULL , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Chert" , "Chert" , 0, 0, -1, 0, false, false, 0, 1, 1, Dyes._NULL ); - public static Materials Chimerite = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Chimerite" , "Chimerite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Coral = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 , 255, 128, 255, 0, "Coral" , "Coral" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials CrudeOil = new Materials( 858, TextureSet.SET_DULL , 1.0F, 0, 2, 1 , 10, 10, 10, 0, "CrudeOil" , "Crude Oil" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack ); - public static Materials Chrysocolla = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Chrysocolla" , "Chrysocolla" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials CrystalFlux = new Materials( -1, TextureSet.SET_QUARTZ , 1.0F, 0, 3, 1 |4 , 100, 50, 100, 0, "CrystalFlux" , "Flux Crystal" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Cyanite = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Cyanite" , "Cyanite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeCyan ); - public static Materials Dacite = new Materials( 859, TextureSet.SET_DULL , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Dacite" , "Dacite" , 0, 0, -1, 0, false, false, 0, 1, 1, Dyes.dyeLightGray ); - public static Materials DarkIron = new Materials( 342, TextureSet.SET_DULL , 7.0F, 384, 3, 1|2 |8 |64 , 55, 40, 60, 0, "DarkIron" , "Dark Iron" , 0, 0, -1, 0, false, false, 5, 1, 1, Dyes.dyePurple ); - public static Materials DarkStone = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "DarkStone" , "Dark Stone" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeBlack ); - public static Materials Demonite = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Demonite" , "Demonite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeRed ); - public static Materials Desh = new Materials( 884, TextureSet.SET_DULL , 20.0F, 1280, 4, 1|2 |8 |64|128 , 40, 40, 40, 0, "Desh" , "Desh" , 0, 0, 2500, 2500, true, false, 1, 1, 1, Dyes.dyeBlack ,Element.De, Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ALIENIS, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Desichalkos = new Materials( -1, TextureSet.SET_NONE , 6.0F, 1280, 3, 1|2 |8 |64 , 255, 255, 255, 0, "Desichalkos" , "Desichalkos" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Dilithium = new Materials( 515, TextureSet.SET_DIAMOND , 1.0F, 0, 1, 1 |4|8|16 , 255, 250, 250, 127, "Dilithium" , "Dilithium" , 0, 0, -1, 0, false, true, 1, 1, 1, Dyes.dyeWhite ); - public static Materials Draconic = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Draconic" , "Draconic" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeRed ); - public static Materials Drulloy = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|16 , 255, 255, 255, 0, "Drulloy" , "Drulloy" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeRed ); - public static Materials Duranium = new Materials( 328, TextureSet.SET_METALLIC , 32.0F, 40960, 11, 1|2 |64 , 255, 255, 255, 0, "Duranium" , "Duranium" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray ).setTurbineMultipliers(16, 16, 1); - public static Materials Eclogite = new Materials( 860, TextureSet.SET_DULL , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Eclogite" , "Eclogite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials ElectrumFlux = new Materials( 320, TextureSet.SET_SHINY , 16.0F, 512, 3, 1|2 |8 |64|128 , 255, 255, 120, 0, "ElectrumFlux" , "Fluxed Electrum" , 0, 0, 9000, 9000, true, false, 1, 1, 1, Dyes.dyeYellow ).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Emery = new Materials( 861, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 255, 255, 255, 0, "Emery" , "Emery" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials EnderiumBase = new Materials( 380, TextureSet.SET_DULL , 16.0F, 768, 4, 1|2 |64|128 , 72, 119, 153, 0, "EnderiumBase" , "Enderium Base" , 0, 0, 3600, 3600, true, false, 1, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(Tin, 2), new MaterialStack(Silver, 1), new MaterialStack(Platinum, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ALIENIS, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Energized = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 255, 255, 255, 0, "Energized" , "Energized" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Epidote = new Materials( 862, TextureSet.SET_DULL , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Epidote" , "Epidote" , 0, 0, -1, 0, false, false, 0, 1, 1, Dyes._NULL ); - public static Materials Eximite = new Materials( 959, TextureSet.SET_METALLIC , 5.0F, 2560, 3, 1|2 |8 |64 , 124, 90, 150, 0, "Eximite" , "Eximite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials FierySteel = new Materials( 346, TextureSet.SET_FIERY , 8.0F, 256, 3, 1|2 |64|128 , 64, 0, 0, 0, "FierySteel" , "Fiery Steel" , 5, 2048, 1811, 1800, true, false, 1, 1, 1, Dyes.dyeRed , Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 3), new TC_AspectStack(TC_Aspects.IGNIS, 3), new TC_AspectStack(TC_Aspects.CORPUS, 3))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Firestone = new Materials( 347, TextureSet.SET_QUARTZ , 6.0F, 1280, 3, 1 |4|8 |64 , 200, 20, 0, 0, "Firestone" , "Firestone" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeRed ); - public static Materials Fluorite = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 |8 , 255, 255, 255, 0, "Fluorite" , "Fluorite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeGreen ); - public static Materials FoolsRuby = new Materials( 512, TextureSet.SET_RUBY , 1.0F, 0, 2, 1 |4|8 , 255, 100, 100, 127, "FoolsRuby" , "Ruby" , 0, 0, -1, 0, false, true, 3, 1, 1, Dyes.dyeRed , 1, Arrays.asList(new MaterialStack(Magnesium, 1), new MaterialStack(Aluminium, 2), new MaterialStack(Oxygen, 4)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 2), new TC_AspectStack(TC_Aspects.VITREUS, 2))); - public static Materials Force = new Materials( 521, TextureSet.SET_DIAMOND , 10.0F, 128, 3, 1|2|4|8 |64|128 , 255, 255, 0, 0, "Force" , "Force" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeYellow , Collections.singletonList(new TC_AspectStack(TC_Aspects.POTENTIA, 5))); - public static Materials Forcicium = new Materials( 518, TextureSet.SET_DIAMOND , 1.0F, 0, 1, 1 |4|8|16 , 50, 50, 70, 0, "Forcicium" , "Forcicium" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeGreen , Collections.singletonList(new TC_AspectStack(TC_Aspects.POTENTIA, 2))); - public static Materials Forcillium = new Materials( 519, TextureSet.SET_DIAMOND , 1.0F, 0, 1, 1 |4|8|16 , 50, 50, 70, 0, "Forcillium" , "Forcillium" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeGreen , Collections.singletonList(new TC_AspectStack(TC_Aspects.POTENTIA, 2))); - public static Materials Gabbro = new Materials( 863, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Gabbro" , "Gabbro" , 0, 0, -1, 0, false, false, 0, 1, 1, Dyes._NULL ); - public static Materials Glowstone = new Materials( 811, TextureSet.SET_SHINY , 1.0F, 0, 1, 1 |16 , 255, 255, 0, 0, "Glowstone" , "Glowstone" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow , Arrays.asList(new TC_AspectStack(TC_Aspects.LUX, 2), new TC_AspectStack(TC_Aspects.SENSUS, 1))); - public static Materials Gneiss = new Materials( 864, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Gneiss" , "Gneiss" , 0, 0, -1, 0, false, false, 0, 1, 1, Dyes._NULL ); - public static Materials Graphite = new Materials( 865, TextureSet.SET_DULL , 5.0F, 32, 2, 1 |8|16 |64 , 128, 128, 128, 0, "Graphite" , "Graphite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeGray , 0, Collections.singletonList(new MaterialStack(Carbon, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 2), new TC_AspectStack(TC_Aspects.IGNIS, 1))); - public static Materials Graphene = new Materials( 819, TextureSet.SET_DULL , 6.0F, 32, 1, 1 |64 , 128, 128, 128, 0, "Graphene" , "Graphene" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeGray , 0, Collections.singletonList(new MaterialStack(Carbon, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 2), new TC_AspectStack(TC_Aspects.ELECTRUM, 1))); - public static Materials Greenschist = new Materials( 866, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Greenschist" , "Green Schist" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeGreen ); - public static Materials Greenstone = new Materials( 867, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Greenstone" , "Greenstone" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeGreen ); - public static Materials Greywacke = new Materials( 897, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Greywacke" , "Greywacke" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeGray ); - public static Materials Haderoth = new Materials( 963, TextureSet.SET_METALLIC , 10.0F, 3200, 3, 1|2 |8 |64 , 119, 52, 30, 0, "Haderoth" , "Haderoth" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Hematite = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 |8 , 255, 255, 255, 0, "Hematite" , "Hematite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Hepatizon = new Materials( 957, TextureSet.SET_METALLIC , 12.0F, 128, 2, 1|2 |8 |64 , 117, 94, 117, 0, "Hepatizon" , "Hepatizon" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials HSLA = new Materials( 322, TextureSet.SET_METALLIC , 6.0F, 500, 3, 1|2 |64|128 , 128, 128, 128, 0, "HSLA" , "HSLA Steel" , 0, 0, 1811, 1000, true, false, 3, 1, 1, Dyes._NULL , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 1), new TC_AspectStack(TC_Aspects.ORDO, 1))); - public static Materials Ignatius = new Materials( 950, TextureSet.SET_METALLIC , 12.0F, 512, 2, 1|2 , 255, 169, 83, 0, "Ignatius" , "Ignatius" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Infernal = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 255, 255, 255, 0, "Infernal" , "Infernal" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Infuscolium = new Materials( 490, TextureSet.SET_METALLIC , 6.0F, 64, 2, 1|2 |8 |64 , 146, 33, 86, 0, "Infuscolium" , "Infuscolium" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials InfusedGold = new Materials( 323, TextureSet.SET_SHINY , 12.0F, 64, 3, 1|2 |8 |64|128 , 255, 200, 60, 0, "InfusedGold" , "Infused Gold" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeYellow ); - public static Materials InfusedAir = new Materials( 540, TextureSet.SET_SHARDS , 8.0F, 64, 3, 1 |4|8 |64|128 , 255, 255, 0, 0, "InfusedAir" , "Aer" , 5, 160, -1, 0, false, true, 3, 1, 1, Dyes.dyeYellow , Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1), new TC_AspectStack(TC_Aspects.AER, 2))); - public static Materials InfusedFire = new Materials( 541, TextureSet.SET_SHARDS , 8.0F, 64, 3, 1 |4|8 |64|128 , 255, 0, 0, 0, "InfusedFire" , "Ignis" , 5, 320, -1, 0, false, true, 3, 1, 1, Dyes.dyeRed , Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1), new TC_AspectStack(TC_Aspects.IGNIS, 2))); - public static Materials InfusedEarth = new Materials( 542, TextureSet.SET_SHARDS , 8.0F, 256, 3, 1 |4|8 |64|128 , 0, 255, 0, 0, "InfusedEarth" , "Terra" , 5, 160, -1, 0, false, true, 3, 1, 1, Dyes.dyeGreen , Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1), new TC_AspectStack(TC_Aspects.TERRA, 2))); - public static Materials InfusedWater = new Materials( 543, TextureSet.SET_SHARDS , 8.0F, 64, 3, 1 |4|8 |64|128 , 0, 0, 255, 0, "InfusedWater" , "Aqua" , 5, 160, -1, 0, false, true, 3, 1, 1, Dyes.dyeBlue , Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1), new TC_AspectStack(TC_Aspects.AQUA, 2))); - public static Materials InfusedEntropy = new Materials( 544, TextureSet.SET_SHARDS , 32.0F, 64, 4, 1 |4|8 |64|128 , 62, 62, 62, 0, "InfusedEntropy" , "Perditio" , 5, 320, -1, 0, false, true, 3, 1, 1, Dyes.dyeBlack , Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1), new TC_AspectStack(TC_Aspects.PERDITIO, 2))); - public static Materials InfusedOrder = new Materials( 545, TextureSet.SET_SHARDS , 8.0F, 64, 3, 1 |4|8 |64|128 , 252, 252, 252, 0, "InfusedOrder" , "Ordo" , 5, 240, -1, 0, false, true, 3, 1, 1, Dyes.dyeWhite , Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1), new TC_AspectStack(TC_Aspects.ORDO, 2))); - public static Materials InfusedVis = new Materials( -1, TextureSet.SET_SHARDS , 8.0F, 64, 3, 1 |4|8 |64|128 , 255, 0, 255, 0, "InfusedVis" , "Auram" , 5, 240, -1, 0, false, true, 3, 1, 1, Dyes.dyePurple , Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1), new TC_AspectStack(TC_Aspects.AURAM, 2))); - public static Materials InfusedDull = new Materials( -1, TextureSet.SET_SHARDS , 32.0F, 64, 3, 1 |4|8 |64|128 , 100, 100, 100, 0, "InfusedDull" , "Vacuus" , 5, 160, -1, 0, false, true, 3, 1, 1, Dyes.dyeLightGray , Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1), new TC_AspectStack(TC_Aspects.VACUOS, 2))); - public static Materials Inolashite = new Materials( 954, TextureSet.SET_NONE , 8.0F, 2304, 3, 1|2 |8 |64 , 148, 216, 187, 0, "Inolashite" , "Inolashite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeGreen ); - public static Materials Invisium = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Invisium" , "Invisium" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Jade = new Materials( 537, TextureSet.SET_SHINY , 1.0F, 16, 2, 1 |4|8 |64 , 0, 100, 0, 0, "Jade" , "Jade" , 0, 0, -1, 0, false, false, 5, 1, 1, Dyes.dyeGreen ,1, Arrays.asList(new MaterialStack(Sodium, 1), new MaterialStack(Aluminium, 1), new MaterialStack(Silicon, 2), new MaterialStack(Oxygen, 6)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 6), new TC_AspectStack(TC_Aspects.VITREUS, 3))); - public static Materials Kalendrite = new Materials( 953, TextureSet.SET_METALLIC , 5.0F, 2560, 3, 1|2 , 170, 91, 189, 0, "Kalendrite" , "Kalendrite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Komatiite = new Materials( 869, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Komatiite" , "Komatiite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow ); - public static Materials Lava = new Materials( 700, TextureSet.SET_FLUID , 1.0F, 0, 1, 16 , 255, 64, 0, 0, "Lava" , "Lava" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange ); - public static Materials Lemurite = new Materials( 486, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 , 219, 219, 219, 0, "Lemurite" , "Lemurite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Limestone = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Limestone" , "Limestone" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Magma = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 0 , 255, 64, 0, 0, "Magma" , "Magma" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange ); - public static Materials Mawsitsit = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Mawsitsit" , "Mawsitsit" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Mercassium = new Materials( -1, TextureSet.SET_NONE , 6.0F, 64, 1, 1|2 |8 |64 , 255, 255, 255, 0, "Mercassium" , "Mercassium" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials MeteoricIron = new Materials( 340, TextureSet.SET_METALLIC , 6.0F, 384, 3, 1|2 |8 |64 , 100, 50, 80, 0, "MeteoricIron" , "Meteoric Iron" , 0, 0, 1811, 1000, true, false, 1, 1, 1, Dyes.dyeGray ,Element.SpFe, Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))); - public static Materials MeteoricSteel = new Materials( 341, TextureSet.SET_METALLIC , 6.0F, 768, 4, 1|2 |64 , 50, 25, 40, 0, "MeteoricSteel" , "Meteoric Steel" , 0, 0, 1811, 1000, true, false, 4, 51, 50, Dyes.dyeGray , 1, Arrays.asList(new MaterialStack(MeteoricIron, 50), new MaterialStack(Carbon, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1), new TC_AspectStack(TC_Aspects.ORDO, 1))); - public static Materials Meteorite = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 |8 , 80, 35, 60, 0, "Meteorite" , "Meteorite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyePurple ); - public static Materials Meutoite = new Materials( 487, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1 |8 , 95, 82, 105, 0, "Meutoite" , "Meutoite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Migmatite = new Materials( 872, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Migmatite" , "Migmatite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Mimichite = new Materials( -1, TextureSet.SET_GEM_VERTICAL , 1.0F, 0, 1, 1 |4|8 , 255, 255, 255, 0, "Mimichite" , "Mimichite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Moonstone = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 |8 , 255, 255, 255, 0, "Moonstone" , "Moonstone" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeWhite , Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 1), new TC_AspectStack(TC_Aspects.ALIENIS, 1))); - public static Materials Naquadah = new Materials( 324, TextureSet.SET_METALLIC , 6.0F, 1280, 4, 1|2 |8 |64|128 , 50, 50, 50, 0, "Naquadah" , "Naquadah" , 0, 0, 5400, 5400, true, false, 10, 1, 1, Dyes.dyeBlack , Element.Nq, Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 3), new TC_AspectStack(TC_Aspects.RADIO, 1), new TC_AspectStack(TC_Aspects.NEBRISUM, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials NaquadahAlloy = new Materials( 325, TextureSet.SET_METALLIC , 8.0F, 5120, 5, 1|2 |64|128 , 40, 40, 40, 0, "NaquadahAlloy" , "Naquadah Alloy" , 0, 0, 7200, 7200, true, false, 10, 1, 1, Dyes.dyeBlack , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 4), new TC_AspectStack(TC_Aspects.NEBRISUM, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials NaquadahEnriched = new Materials( 326, TextureSet.SET_METALLIC , 6.0F, 1280, 4, 1|2 |8 |64 , 50, 50, 50, 0, "NaquadahEnriched" , "Enriched Naquadah" , 0, 0, 4500, 4500, true, false, 15, 1, 1, Dyes.dyeBlack , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 3), new TC_AspectStack(TC_Aspects.RADIO, 2), new TC_AspectStack(TC_Aspects.NEBRISUM, 2))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Naquadria = new Materials( 327, TextureSet.SET_SHINY , 1.0F, 512, 4, 1|2 |8 |64 , 30, 30, 30, 0, "Naquadria" , "Naquadria" , 0, 0, 9000, 9000, true, false, 20, 1, 1, Dyes.dyeBlack , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 4), new TC_AspectStack(TC_Aspects.RADIO, 3), new TC_AspectStack(TC_Aspects.NEBRISUM, 3))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Nether = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 0 , 255, 255, 255, 0, "Nether" , "Nether" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials NetherBrick = new Materials( 814, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 100, 0, 0, 0, "NetherBrick" , "Nether Brick" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeRed , Collections.singletonList(new TC_AspectStack(TC_Aspects.IGNIS, 1))); - public static Materials NetherQuartz = new Materials( 522, TextureSet.SET_QUARTZ , 1.0F, 32, 1, 1 |4|8 |64 , 230, 210, 210, 0, "NetherQuartz" , "Nether Quartz" , 0, 0, -1, 0, false, false, 2, 1, 1, Dyes.dyeWhite , Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 1), new TC_AspectStack(TC_Aspects.VITREUS, 1))); - public static Materials NetherStar = new Materials( 506, TextureSet.SET_NETHERSTAR , 6.0F, 5120, 4, 1| 4|8 |64 , 255, 255, 255, 0, "NetherStar" , "Nether Star" , 5, 50000, -1, 0, false, false, 15, 1, 1, Dyes.dyeWhite ); - public static Materials ObsidianFlux = new Materials( -1, TextureSet.SET_DULL , 1.0F, 0, 1, 1|2 , 80, 50, 100, 0, "ObsidianFlux" , "Fluxed Obsidian" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyePurple ); - public static Materials Oilsands = new Materials( 878, TextureSet.SET_NONE , 1.0F, 0, 1, 1 |8 , 10, 10, 10, 0, "Oilsands" , "Oilsands" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Onyx = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Onyx" , "Onyx" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Orichalcum = new Materials( 966, TextureSet.SET_METALLIC , 32.0F, 20480, 1, 1|2 |8 |64|128 , 84, 122, 56, 0, "Orichalcum" , "Orichalcum" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ).disableAutoGeneratedBlastFurnaceRecipes().setTurbineMultipliers(1, 6, 1); - public static Materials Osmonium = new Materials( -1, TextureSet.SET_NONE , 6.0F, 64, 1, 1|2 |8 |64 , 255, 255, 255, 0, "Osmonium" , "Osmonium" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeBlue ); - public static Materials Oureclase = new Materials( 961, TextureSet.SET_METALLIC , 6.0F, 1920, 3, 1|2 |8 |64 , 183, 98, 21, 0, "Oureclase" , "Oureclase" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Painite = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 0 , 255, 255, 255, 0, "Painite" , "Painite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Peanutwood = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 0 , 255, 255, 255, 0, "Peanutwood" , "Peanut Wood" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Petroleum = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 |8 , 255, 255, 255, 0, "Petroleum" , "Petroleum" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Pewter = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 0 , 255, 255, 255, 0, "Pewter" , "Pewter" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Phoenixite = new Materials( -1, TextureSet.SET_NONE , 6.0F, 64, 1, 1|2 |8 |64 , 255, 255, 255, 0, "Phoenixite" , "Phoenixite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Prometheum = new Materials( 960, TextureSet.SET_METALLIC , 8.0F, 512, 1, 1|2 |8 |64 , 90, 129, 86, 0, "Prometheum" , "Prometheum" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Quartzite = new Materials( 523, TextureSet.SET_QUARTZ , 1.0F, 0, 1, 1 |4|8 , 210, 230, 210, 0, "Quartzite" , "Quartzite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeWhite ); - public static Materials Randomite = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 |8 , 255, 255, 255, 0, "Randomite" , "Randomite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Rhyolite = new Materials( 875, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Rhyolite" , "Rhyolite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Rubracium = new Materials( 488, TextureSet.SET_METALLIC , 1.0F, 128, 1, 1|2 |8 |64|128 , 151, 45, 45, 0, "Rubracium" , "Rubracium" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeRed ); - public static Materials Sand = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 0 , 255, 255, 255, 0, "Sand" , "Sand" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow ); - public static Materials Sanguinite = new Materials( 955, TextureSet.SET_METALLIC , 3.0F, 4480, 4, 1|2 |8 , 185, 0, 0, 0, "Sanguinite" , "Sanguinite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Siltstone = new Materials( 876, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Siltstone" , "Siltstone" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Sunstone = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 1 |8 , 255, 255, 255, 0, "Sunstone" , "Sunstone" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeYellow , Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 1), new TC_AspectStack(TC_Aspects.ALIENIS, 1))); - public static Materials Tar = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 0 , 10, 10, 10, 0, "Tar" , "Tar" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack ); - public static Materials Tartarite = new Materials( 956, TextureSet.SET_METALLIC , 32.0F, 20480, 3, 1|2 |8 , 255, 118, 60, 0, "Tartarite" , "Tartarite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ).disableAutoGeneratedBlastFurnaceRecipes().setTurbineMultipliers(1120, 1120, 1); - public static Materials UUAmplifier = new Materials( 721, TextureSet.SET_FLUID , 1.0F, 0, 1, 16 , 96, 0, 128, 0, "UUAmplifier" , "UU-Amplifier" , 0, 0, -1, 0, false, false, 10, 1, 1, Dyes.dyePink ); - public static Materials UUMatter = new Materials( 703, TextureSet.SET_FLUID , 1.0F, 0, 1, 16 , 128, 0, 196, 0, "UUMatter" , "UU-Matter" , 0, 0, -1, 0, false, false, 10, 1, 1, Dyes.dyePink ); - public static Materials Void = new Materials( 970, TextureSet.SET_METALLIC , 32.0F, 512, 4, 1|2 |64|128 , 28, 6, 57, 0, "Void" , "Void" , 5, 1500, -1, 0, false, true, 5, 2, 1, Dyes.dyeBlack , Collections.singletonList(new TC_AspectStack(TC_Aspects.VACUOS, 1))); - public static Materials Voidstone = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 0 , 255, 255, 255, 200, "Voidstone" , "Voidstone" , 0, 0, -1, 0, false, true, 1, 1, 1, Dyes._NULL , Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1), new TC_AspectStack(TC_Aspects.VACUOS, 1))); - public static Materials Vulcanite = new Materials( 489, TextureSet.SET_METALLIC , 32.0F, 20480, 2, 1|2 |8 |64|128 , 255, 132, 72, 0, "Vulcanite" , "Vulcanite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ).disableAutoGeneratedBlastFurnaceRecipes().setTurbineMultipliers(40, 1, 1); - public static Materials Vyroxeres = new Materials( 951, TextureSet.SET_METALLIC , 32.0F, 7680, 1, 1|2 |8 |64 , 85, 224, 1, 0, "Vyroxeres" , "Vyroxeres" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ).disableAutoGeneratedBlastFurnaceRecipes().setTurbineMultipliers(1, 3, 1); - public static Materials Yellorium = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Yellorium" , "Yellorium" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeYellow ); - public static Materials Zectium = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 |8 , 255, 255, 255, 0, "Zectium" , "Zectium" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeBlack ); + public static Materials Adamantium = new Materials( + 319, + TextureSet.SET_SHINY, + 32.0F, + 8192, + 10, + 1 | 2 | 8 | 64 | 128, + 255, + 255, + 255, + 0, + "Adamantium", + "Adamantium", + 0, + 0, + 7200, + 7200, + true, + false, + 1, + 1, + 1, + Dyes.dyeLightGray) + .setTurbineMultipliers(1, 5, 1); + + public static Materials Adamite = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 3, + 1 | 8, + 255, + 255, + 255, + 0, + "Adamite", + "Adamite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray); + public static Materials Adluorite = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 64 | 128, + 255, + 255, + 255, + 0, + "Adluorite", + "Adluorite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightBlue); + public static Materials Agate = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1, + 255, + 255, + 255, + 0, + "Agate", + "Agate", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Alduorite = new Materials( + 485, + TextureSet.SET_SHINY, + 32.0F, + 8192, + 1, + 1 | 2 | 8 | 64 | 128, + 159, + 180, + 180, + 0, + "Alduorite", + "Alduorite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL) + .disableAutoGeneratedBlastFurnaceRecipes() + .setTurbineMultipliers(6, 1, 1); + public static Materials Amber = new Materials( + 514, + TextureSet.SET_RUBY, + 4.0F, + 128, + 2, + 1 | 4 | 8 | 64, + 255, + 128, + 0, + 127, + "Amber", + "Amber", + 5, + 3, + -1, + 0, + false, + true, + 1, + 1, + 1, + Dyes.dyeOrange, + 1, + Arrays.asList( + new MaterialStack(Carbon, 10), new MaterialStack(Hydrogen, 10), new MaterialStack(Oxygen, 16)), + Arrays.asList(new TC_AspectStack(TC_Aspects.VINCULUM, 2), new TC_AspectStack(TC_Aspects.VITREUS, 1))); + public static Materials Ammonium = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1, + 255, + 255, + 255, + 0, + "Ammonium", + "Ammonium", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Amordrine = new Materials( + -1, + TextureSet.SET_NONE, + 6.0F, + 64, + 2, + 1 | 2 | 8 | 64, + 255, + 255, + 255, + 0, + "Amordrine", + "Amordrine", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Andesite = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1 | 8, + 255, + 255, + 255, + 0, + "Andesite", + "Andesite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Angmallen = new Materials( + 958, + TextureSet.SET_METALLIC, + 10.0F, + 128, + 2, + 1 | 2 | 8 | 64, + 215, + 225, + 138, + 0, + "Angmallen", + "Angmallen", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Ardite = new Materials( + 382, + TextureSet.SET_METALLIC, + 18.0F, + 1024, + 4, + 1 | 2 | 8 | 32 | 64 | 128, + 250, + 129, + 0, + 0, + "Ardite", + "Ardite", + 0, + 0, + 1600, + 1600, + true, + false, + 1, + 1, + 1, + Dyes.dyeRed) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Aredrite = new Materials( + -1, + TextureSet.SET_NONE, + 6.0F, + 64, + 2, + 1 | 2 | 8 | 64, + 255, + 0, + 0, + 0, + "Aredrite", + "Aredrite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeYellow); + public static Materials Atlarus = new Materials( + 965, + TextureSet.SET_METALLIC, + 6.0F, + 64, + 2, + 1 | 2 | 8 | 64, + 255, + 255, + 255, + 0, + "Atlarus", + "Atlarus", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Bitumen = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1 | 8, + 255, + 255, + 255, + 0, + "Bitumen", + "Bitumen", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Black = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 0, + 0, + 0, + 0, + 0, + "Black", + "Black", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeBlack); + public static Materials Blizz = new Materials( + 851, + TextureSet.SET_SHINY, + 1.0F, + 0, + 2, + 1, + 220, + 233, + 255, + 0, + "Blizz", + "Blizz", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Blueschist = new Materials( + 852, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1, + 255, + 255, + 255, + 0, + "Blueschist", + "Blueschist", + 0, + 0, + -1, + 0, + false, + false, + 0, + 1, + 1, + Dyes.dyeLightBlue); + public static Materials Bluestone = new Materials( + 813, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1, + 255, + 255, + 255, + 0, + "Bluestone", + "Bluestone", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlue); + public static Materials Bloodstone = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1, + 255, + 255, + 255, + 0, + "Bloodstone", + "Bloodstone", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeRed); + public static Materials Blutonium = new Materials( + -1, + TextureSet.SET_SHINY, + 1.0F, + 0, + 2, + 1 | 2 | 8, + 0, + 0, + 255, + 0, + "Blutonium", + "Blutonium", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeBlue); + public static Materials Carmot = new Materials( + 962, + TextureSet.SET_METALLIC, + 16.0F, + 128, + 1, + 1 | 2 | 8 | 64, + 217, + 205, + 140, + 0, + "Carmot", + "Carmot", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Celenegil = new Materials( + 964, + TextureSet.SET_METALLIC, + 10.0F, + 4096, + 2, + 1 | 2 | 8 | 64, + 148, + 204, + 72, + 0, + "Celenegil", + "Celenegil", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials CertusQuartz = new Materials( + 516, + TextureSet.SET_QUARTZ, + 5.0F, + 32, + 1, + 1 | 4 | 8 | 64, + 210, + 210, + 230, + 0, + "CertusQuartz", + "Certus Quartz", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeLightGray, + Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 1), new TC_AspectStack(TC_Aspects.VITREUS, 1))); + public static Materials Ceruclase = new Materials( + 952, + TextureSet.SET_METALLIC, + 32.0F, + 1280, + 2, + 1 | 2 | 8 | 64 | 128, + 140, + 189, + 208, + 0, + "Ceruclase", + "Ceruclase", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlue) + .disableAutoGeneratedBlastFurnaceRecipes() + .setTurbineMultipliers(1, 22, 1); + public static Materials Citrine = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1, + 255, + 255, + 255, + 0, + "Citrine", + "Citrine", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials CobaltHexahydrate = new Materials( + 853, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 16, + 80, + 80, + 250, + 0, + "CobaltHexahydrate", + "Cobalt Hexahydrate", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlue); + public static Materials ConstructionFoam = new Materials( + 854, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 16 | 64 | 128, + 128, + 128, + 128, + 0, + "ConstructionFoam", + "Construction Foam", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeGray); + public static Materials Chert = new Materials( + 857, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1, + 255, + 255, + 255, + 0, + "Chert", + "Chert", + 0, + 0, + -1, + 0, + false, + false, + 0, + 1, + 1, + Dyes._NULL); + public static Materials Chimerite = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1, + 255, + 255, + 255, + 0, + "Chimerite", + "Chimerite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Coral = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 1, + 1, + 255, + 128, + 255, + 0, + "Coral", + "Coral", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials CrudeOil = new Materials( + 858, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1, + 10, + 10, + 10, + 0, + "CrudeOil", + "Crude Oil", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlack); + public static Materials Chrysocolla = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1, + 255, + 255, + 255, + 0, + "Chrysocolla", + "Chrysocolla", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials CrystalFlux = new Materials( + -1, + TextureSet.SET_QUARTZ, + 1.0F, + 0, + 3, + 1 | 4, + 100, + 50, + 100, + 0, + "CrystalFlux", + "Flux Crystal", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Cyanite = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1, + 255, + 255, + 255, + 0, + "Cyanite", + "Cyanite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeCyan); + public static Materials Dacite = new Materials( + 859, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1, + 255, + 255, + 255, + 0, + "Dacite", + "Dacite", + 0, + 0, + -1, + 0, + false, + false, + 0, + 1, + 1, + Dyes.dyeLightGray); + public static Materials DarkIron = new Materials( + 342, + TextureSet.SET_DULL, + 7.0F, + 384, + 3, + 1 | 2 | 8 | 64, + 55, + 40, + 60, + 0, + "DarkIron", + "Dark Iron", + 0, + 0, + -1, + 0, + false, + false, + 5, + 1, + 1, + Dyes.dyePurple); + public static Materials DarkStone = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1, + 255, + 255, + 255, + 0, + "DarkStone", + "Dark Stone", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeBlack); + public static Materials Demonite = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1, + 255, + 255, + 255, + 0, + "Demonite", + "Demonite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeRed); + public static Materials Desh = new Materials( + 884, + TextureSet.SET_DULL, + 20.0F, + 1280, + 4, + 1 | 2 | 8 | 64 | 128, + 40, + 40, + 40, + 0, + "Desh", + "Desh", + 0, + 0, + 2500, + 2500, + true, + false, + 1, + 1, + 1, + Dyes.dyeBlack, + Element.De, + Arrays.asList( + new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ALIENIS, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Desichalkos = new Materials( + -1, + TextureSet.SET_NONE, + 6.0F, + 1280, + 3, + 1 | 2 | 8 | 64, + 255, + 255, + 255, + 0, + "Desichalkos", + "Desichalkos", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Dilithium = new Materials( + 515, + TextureSet.SET_DIAMOND, + 1.0F, + 0, + 1, + 1 | 4 | 8 | 16, + 255, + 250, + 250, + 127, + "Dilithium", + "Dilithium", + 0, + 0, + -1, + 0, + false, + true, + 1, + 1, + 1, + Dyes.dyeWhite); + public static Materials Draconic = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1, + 255, + 255, + 255, + 0, + "Draconic", + "Draconic", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeRed); + public static Materials Drulloy = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1 | 16, + 255, + 255, + 255, + 0, + "Drulloy", + "Drulloy", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeRed); + public static Materials Duranium = new Materials( + 328, + TextureSet.SET_METALLIC, + 32.0F, + 40960, + 11, + 1 | 2 | 64, + 255, + 255, + 255, + 0, + "Duranium", + "Duranium", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray) + .setTurbineMultipliers(16, 16, 1); + public static Materials Eclogite = new Materials( + 860, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1, + 255, + 255, + 255, + 0, + "Eclogite", + "Eclogite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials ElectrumFlux = new Materials( + 320, + TextureSet.SET_SHINY, + 16.0F, + 512, + 3, + 1 | 2 | 8 | 64 | 128, + 255, + 255, + 120, + 0, + "ElectrumFlux", + "Fluxed Electrum", + 0, + 0, + 9000, + 9000, + true, + false, + 1, + 1, + 1, + Dyes.dyeYellow) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Emery = new Materials( + 861, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 8, + 255, + 255, + 255, + 0, + "Emery", + "Emery", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials EnderiumBase = new Materials( + 380, + TextureSet.SET_DULL, + 16.0F, + 768, + 4, + 1 | 2 | 64 | 128, + 72, + 119, + 153, + 0, + "EnderiumBase", + "Enderium Base", + 0, + 0, + 3600, + 3600, + true, + false, + 1, + 1, + 1, + Dyes.dyeGreen, + 1, + Arrays.asList( + new MaterialStack(Tin, 2), new MaterialStack(Silver, 1), new MaterialStack(Platinum, 1)), + Arrays.asList( + new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ALIENIS, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Energized = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 0, + 255, + 255, + 255, + 0, + "Energized", + "Energized", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Epidote = new Materials( + 862, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1, + 255, + 255, + 255, + 0, + "Epidote", + "Epidote", + 0, + 0, + -1, + 0, + false, + false, + 0, + 1, + 1, + Dyes._NULL); + public static Materials Eximite = new Materials( + 959, + TextureSet.SET_METALLIC, + 5.0F, + 2560, + 3, + 1 | 2 | 8 | 64, + 124, + 90, + 150, + 0, + "Eximite", + "Eximite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials FierySteel = new Materials( + 346, + TextureSet.SET_FIERY, + 8.0F, + 256, + 3, + 1 | 2 | 64 | 128, + 64, + 0, + 0, + 0, + "FierySteel", + "Fiery Steel", + 5, + 2048, + 1811, + 1800, + true, + false, + 1, + 1, + 1, + Dyes.dyeRed, + Arrays.asList( + new TC_AspectStack(TC_Aspects.PRAECANTATIO, 3), + new TC_AspectStack(TC_Aspects.IGNIS, 3), + new TC_AspectStack(TC_Aspects.CORPUS, 3))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Firestone = new Materials( + 347, + TextureSet.SET_QUARTZ, + 6.0F, + 1280, + 3, + 1 | 4 | 8 | 64, + 200, + 20, + 0, + 0, + "Firestone", + "Firestone", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeRed); + public static Materials Fluorite = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1 | 8, + 255, + 255, + 255, + 0, + "Fluorite", + "Fluorite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeGreen); + public static Materials FoolsRuby = new Materials( + 512, + TextureSet.SET_RUBY, + 1.0F, + 0, + 2, + 1 | 4 | 8, + 255, + 100, + 100, + 127, + "FoolsRuby", + "Ruby", + 0, + 0, + -1, + 0, + false, + true, + 3, + 1, + 1, + Dyes.dyeRed, + 1, + Arrays.asList( + new MaterialStack(Magnesium, 1), new MaterialStack(Aluminium, 2), new MaterialStack(Oxygen, 4)), + Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 2), new TC_AspectStack(TC_Aspects.VITREUS, 2))); + public static Materials Force = new Materials( + 521, + TextureSet.SET_DIAMOND, + 10.0F, + 128, + 3, + 1 | 2 | 4 | 8 | 64 | 128, + 255, + 255, + 0, + 0, + "Force", + "Force", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeYellow, + Collections.singletonList(new TC_AspectStack(TC_Aspects.POTENTIA, 5))); + public static Materials Forcicium = new Materials( + 518, + TextureSet.SET_DIAMOND, + 1.0F, + 0, + 1, + 1 | 4 | 8 | 16, + 50, + 50, + 70, + 0, + "Forcicium", + "Forcicium", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeGreen, + Collections.singletonList(new TC_AspectStack(TC_Aspects.POTENTIA, 2))); + public static Materials Forcillium = new Materials( + 519, + TextureSet.SET_DIAMOND, + 1.0F, + 0, + 1, + 1 | 4 | 8 | 16, + 50, + 50, + 70, + 0, + "Forcillium", + "Forcillium", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeGreen, + Collections.singletonList(new TC_AspectStack(TC_Aspects.POTENTIA, 2))); + public static Materials Gabbro = new Materials( + 863, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1, + 255, + 255, + 255, + 0, + "Gabbro", + "Gabbro", + 0, + 0, + -1, + 0, + false, + false, + 0, + 1, + 1, + Dyes._NULL); + public static Materials Glowstone = new Materials( + 811, + TextureSet.SET_SHINY, + 1.0F, + 0, + 1, + 1 | 16, + 255, + 255, + 0, + 0, + "Glowstone", + "Glowstone", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeYellow, + Arrays.asList(new TC_AspectStack(TC_Aspects.LUX, 2), new TC_AspectStack(TC_Aspects.SENSUS, 1))); + public static Materials Gneiss = new Materials( + 864, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1, + 255, + 255, + 255, + 0, + "Gneiss", + "Gneiss", + 0, + 0, + -1, + 0, + false, + false, + 0, + 1, + 1, + Dyes._NULL); + public static Materials Graphite = new Materials( + 865, + TextureSet.SET_DULL, + 5.0F, + 32, + 2, + 1 | 8 | 16 | 64, + 128, + 128, + 128, + 0, + "Graphite", + "Graphite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeGray, + 0, + Collections.singletonList(new MaterialStack(Carbon, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 2), new TC_AspectStack(TC_Aspects.IGNIS, 1))); + public static Materials Graphene = new Materials( + 819, + TextureSet.SET_DULL, + 6.0F, + 32, + 1, + 1 | 64, + 128, + 128, + 128, + 0, + "Graphene", + "Graphene", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeGray, + 0, + Collections.singletonList(new MaterialStack(Carbon, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 2), new TC_AspectStack(TC_Aspects.ELECTRUM, 1))); + public static Materials Greenschist = new Materials( + 866, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1, + 255, + 255, + 255, + 0, + "Greenschist", + "Green Schist", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeGreen); + public static Materials Greenstone = new Materials( + 867, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1, + 255, + 255, + 255, + 0, + "Greenstone", + "Greenstone", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeGreen); + public static Materials Greywacke = new Materials( + 897, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1, + 255, + 255, + 255, + 0, + "Greywacke", + "Greywacke", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeGray); + public static Materials Haderoth = new Materials( + 963, + TextureSet.SET_METALLIC, + 10.0F, + 3200, + 3, + 1 | 2 | 8 | 64, + 119, + 52, + 30, + 0, + "Haderoth", + "Haderoth", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Hematite = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1 | 2 | 8, + 255, + 255, + 255, + 0, + "Hematite", + "Hematite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Hepatizon = new Materials( + 957, + TextureSet.SET_METALLIC, + 12.0F, + 128, + 2, + 1 | 2 | 8 | 64, + 117, + 94, + 117, + 0, + "Hepatizon", + "Hepatizon", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials HSLA = new Materials( + 322, + TextureSet.SET_METALLIC, + 6.0F, + 500, + 3, + 1 | 2 | 64 | 128, + 128, + 128, + 128, + 0, + "HSLA", + "HSLA Steel", + 0, + 0, + 1811, + 1000, + true, + false, + 3, + 1, + 1, + Dyes._NULL, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 1), new TC_AspectStack(TC_Aspects.ORDO, 1))); + public static Materials Ignatius = new Materials( + 950, + TextureSet.SET_METALLIC, + 12.0F, + 512, + 2, + 1 | 2, + 255, + 169, + 83, + 0, + "Ignatius", + "Ignatius", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Infernal = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 0, + 255, + 255, + 255, + 0, + "Infernal", + "Infernal", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Infuscolium = new Materials( + 490, + TextureSet.SET_METALLIC, + 6.0F, + 64, + 2, + 1 | 2 | 8 | 64, + 146, + 33, + 86, + 0, + "Infuscolium", + "Infuscolium", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials InfusedGold = new Materials( + 323, + TextureSet.SET_SHINY, + 12.0F, + 64, + 3, + 1 | 2 | 8 | 64 | 128, + 255, + 200, + 60, + 0, + "InfusedGold", + "Infused Gold", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeYellow); + public static Materials InfusedAir = new Materials( + 540, + TextureSet.SET_SHARDS, + 8.0F, + 64, + 3, + 1 | 4 | 8 | 64 | 128, + 255, + 255, + 0, + 0, + "InfusedAir", + "Aer", + 5, + 160, + -1, + 0, + false, + true, + 3, + 1, + 1, + Dyes.dyeYellow, + Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1), new TC_AspectStack(TC_Aspects.AER, 2))); + public static Materials InfusedFire = new Materials( + 541, + TextureSet.SET_SHARDS, + 8.0F, + 64, + 3, + 1 | 4 | 8 | 64 | 128, + 255, + 0, + 0, + 0, + "InfusedFire", + "Ignis", + 5, + 320, + -1, + 0, + false, + true, + 3, + 1, + 1, + Dyes.dyeRed, + Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1), new TC_AspectStack(TC_Aspects.IGNIS, 2))); + public static Materials InfusedEarth = new Materials( + 542, + TextureSet.SET_SHARDS, + 8.0F, + 256, + 3, + 1 | 4 | 8 | 64 | 128, + 0, + 255, + 0, + 0, + "InfusedEarth", + "Terra", + 5, + 160, + -1, + 0, + false, + true, + 3, + 1, + 1, + Dyes.dyeGreen, + Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1), new TC_AspectStack(TC_Aspects.TERRA, 2))); + public static Materials InfusedWater = new Materials( + 543, + TextureSet.SET_SHARDS, + 8.0F, + 64, + 3, + 1 | 4 | 8 | 64 | 128, + 0, + 0, + 255, + 0, + "InfusedWater", + "Aqua", + 5, + 160, + -1, + 0, + false, + true, + 3, + 1, + 1, + Dyes.dyeBlue, + Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1), new TC_AspectStack(TC_Aspects.AQUA, 2))); + public static Materials InfusedEntropy = new Materials( + 544, + TextureSet.SET_SHARDS, + 32.0F, + 64, + 4, + 1 | 4 | 8 | 64 | 128, + 62, + 62, + 62, + 0, + "InfusedEntropy", + "Perditio", + 5, + 320, + -1, + 0, + false, + true, + 3, + 1, + 1, + Dyes.dyeBlack, + Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1), new TC_AspectStack(TC_Aspects.PERDITIO, 2))); + public static Materials InfusedOrder = new Materials( + 545, + TextureSet.SET_SHARDS, + 8.0F, + 64, + 3, + 1 | 4 | 8 | 64 | 128, + 252, + 252, + 252, + 0, + "InfusedOrder", + "Ordo", + 5, + 240, + -1, + 0, + false, + true, + 3, + 1, + 1, + Dyes.dyeWhite, + Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1), new TC_AspectStack(TC_Aspects.ORDO, 2))); + public static Materials InfusedVis = new Materials( + -1, + TextureSet.SET_SHARDS, + 8.0F, + 64, + 3, + 1 | 4 | 8 | 64 | 128, + 255, + 0, + 255, + 0, + "InfusedVis", + "Auram", + 5, + 240, + -1, + 0, + false, + true, + 3, + 1, + 1, + Dyes.dyePurple, + Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1), new TC_AspectStack(TC_Aspects.AURAM, 2))); + public static Materials InfusedDull = new Materials( + -1, + TextureSet.SET_SHARDS, + 32.0F, + 64, + 3, + 1 | 4 | 8 | 64 | 128, + 100, + 100, + 100, + 0, + "InfusedDull", + "Vacuus", + 5, + 160, + -1, + 0, + false, + true, + 3, + 1, + 1, + Dyes.dyeLightGray, + Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1), new TC_AspectStack(TC_Aspects.VACUOS, 2))); + public static Materials Inolashite = new Materials( + 954, + TextureSet.SET_NONE, + 8.0F, + 2304, + 3, + 1 | 2 | 8 | 64, + 148, + 216, + 187, + 0, + "Inolashite", + "Inolashite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeGreen); + public static Materials Invisium = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1, + 255, + 255, + 255, + 0, + "Invisium", + "Invisium", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Jade = new Materials( + 537, + TextureSet.SET_SHINY, + 1.0F, + 16, + 2, + 1 | 4 | 8 | 64, + 0, + 100, + 0, + 0, + "Jade", + "Jade", + 0, + 0, + -1, + 0, + false, + false, + 5, + 1, + 1, + Dyes.dyeGreen, + 1, + Arrays.asList( + new MaterialStack(Sodium, 1), + new MaterialStack(Aluminium, 1), + new MaterialStack(Silicon, 2), + new MaterialStack(Oxygen, 6)), + Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 6), new TC_AspectStack(TC_Aspects.VITREUS, 3))); + public static Materials Kalendrite = new Materials( + 953, + TextureSet.SET_METALLIC, + 5.0F, + 2560, + 3, + 1 | 2, + 170, + 91, + 189, + 0, + "Kalendrite", + "Kalendrite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Komatiite = new Materials( + 869, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1, + 255, + 255, + 255, + 0, + "Komatiite", + "Komatiite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeYellow); + public static Materials Lava = new Materials( + 700, + TextureSet.SET_FLUID, + 1.0F, + 0, + 1, + 16, + 255, + 64, + 0, + 0, + "Lava", + "Lava", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeOrange); + public static Materials Lemurite = new Materials( + 486, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1, + 219, + 219, + 219, + 0, + "Lemurite", + "Lemurite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Limestone = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 1, + 1, + 255, + 255, + 255, + 0, + "Limestone", + "Limestone", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Magma = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 1, + 0, + 255, + 64, + 0, + 0, + "Magma", + "Magma", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeOrange); + public static Materials Mawsitsit = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 1, + 1, + 255, + 255, + 255, + 0, + "Mawsitsit", + "Mawsitsit", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Mercassium = new Materials( + -1, + TextureSet.SET_NONE, + 6.0F, + 64, + 1, + 1 | 2 | 8 | 64, + 255, + 255, + 255, + 0, + "Mercassium", + "Mercassium", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials MeteoricIron = new Materials( + 340, + TextureSet.SET_METALLIC, + 6.0F, + 384, + 3, + 1 | 2 | 8 | 64, + 100, + 50, + 80, + 0, + "MeteoricIron", + "Meteoric Iron", + 0, + 0, + 1811, + 1000, + true, + false, + 1, + 1, + 1, + Dyes.dyeGray, + Element.SpFe, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))); + public static Materials MeteoricSteel = new Materials( + 341, + TextureSet.SET_METALLIC, + 6.0F, + 768, + 4, + 1 | 2 | 64, + 50, + 25, + 40, + 0, + "MeteoricSteel", + "Meteoric Steel", + 0, + 0, + 1811, + 1000, + true, + false, + 4, + 51, + 50, + Dyes.dyeGray, + 1, + Arrays.asList(new MaterialStack(MeteoricIron, 50), new MaterialStack(Carbon, 1)), + Arrays.asList( + new TC_AspectStack(TC_Aspects.METALLUM, 2), + new TC_AspectStack(TC_Aspects.MAGNETO, 1), + new TC_AspectStack(TC_Aspects.ORDO, 1))); + public static Materials Meteorite = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 1, + 1 | 8, + 80, + 35, + 60, + 0, + "Meteorite", + "Meteorite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyePurple); + public static Materials Meutoite = new Materials( + 487, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 1, + 1 | 8, + 95, + 82, + 105, + 0, + "Meutoite", + "Meutoite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Migmatite = new Materials( + 872, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1, + 255, + 255, + 255, + 0, + "Migmatite", + "Migmatite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Mimichite = new Materials( + -1, + TextureSet.SET_GEM_VERTICAL, + 1.0F, + 0, + 1, + 1 | 4 | 8, + 255, + 255, + 255, + 0, + "Mimichite", + "Mimichite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Moonstone = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 1, + 1 | 8, + 255, + 255, + 255, + 0, + "Moonstone", + "Moonstone", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeWhite, + Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 1), new TC_AspectStack(TC_Aspects.ALIENIS, 1))); + public static Materials Naquadah = new Materials( + 324, + TextureSet.SET_METALLIC, + 6.0F, + 1280, + 4, + 1 | 2 | 8 | 64 | 128, + 50, + 50, + 50, + 0, + "Naquadah", + "Naquadah", + 0, + 0, + 5400, + 5400, + true, + false, + 10, + 1, + 1, + Dyes.dyeBlack, + Element.Nq, + Arrays.asList( + new TC_AspectStack(TC_Aspects.METALLUM, 3), + new TC_AspectStack(TC_Aspects.RADIO, 1), + new TC_AspectStack(TC_Aspects.NEBRISUM, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials NaquadahAlloy = new Materials( + 325, + TextureSet.SET_METALLIC, + 8.0F, + 5120, + 5, + 1 | 2 | 64 | 128, + 40, + 40, + 40, + 0, + "NaquadahAlloy", + "Naquadah Alloy", + 0, + 0, + 7200, + 7200, + true, + false, + 10, + 1, + 1, + Dyes.dyeBlack, + Arrays.asList( + new TC_AspectStack(TC_Aspects.METALLUM, 4), new TC_AspectStack(TC_Aspects.NEBRISUM, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials NaquadahEnriched = new Materials( + 326, + TextureSet.SET_METALLIC, + 6.0F, + 1280, + 4, + 1 | 2 | 8 | 64, + 50, + 50, + 50, + 0, + "NaquadahEnriched", + "Enriched Naquadah", + 0, + 0, + 4500, + 4500, + true, + false, + 15, + 1, + 1, + Dyes.dyeBlack, + Arrays.asList( + new TC_AspectStack(TC_Aspects.METALLUM, 3), + new TC_AspectStack(TC_Aspects.RADIO, 2), + new TC_AspectStack(TC_Aspects.NEBRISUM, 2))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Naquadria = new Materials( + 327, + TextureSet.SET_SHINY, + 1.0F, + 512, + 4, + 1 | 2 | 8 | 64, + 30, + 30, + 30, + 0, + "Naquadria", + "Naquadria", + 0, + 0, + 9000, + 9000, + true, + false, + 20, + 1, + 1, + Dyes.dyeBlack, + Arrays.asList( + new TC_AspectStack(TC_Aspects.METALLUM, 4), + new TC_AspectStack(TC_Aspects.RADIO, 3), + new TC_AspectStack(TC_Aspects.NEBRISUM, 3))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Nether = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 1, + 0, + 255, + 255, + 255, + 0, + "Nether", + "Nether", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials NetherBrick = new Materials( + 814, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1, + 100, + 0, + 0, + 0, + "NetherBrick", + "Nether Brick", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeRed, + Collections.singletonList(new TC_AspectStack(TC_Aspects.IGNIS, 1))); + public static Materials NetherQuartz = new Materials( + 522, + TextureSet.SET_QUARTZ, + 1.0F, + 32, + 1, + 1 | 4 | 8 | 64, + 230, + 210, + 210, + 0, + "NetherQuartz", + "Nether Quartz", + 0, + 0, + -1, + 0, + false, + false, + 2, + 1, + 1, + Dyes.dyeWhite, + Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 1), new TC_AspectStack(TC_Aspects.VITREUS, 1))); + public static Materials NetherStar = new Materials( + 506, + TextureSet.SET_NETHERSTAR, + 6.0F, + 5120, + 4, + 1 | 4 | 8 | 64, + 255, + 255, + 255, + 0, + "NetherStar", + "Nether Star", + 5, + 50000, + -1, + 0, + false, + false, + 15, + 1, + 1, + Dyes.dyeWhite); + public static Materials ObsidianFlux = new Materials( + -1, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1 | 2, + 80, + 50, + 100, + 0, + "ObsidianFlux", + "Fluxed Obsidian", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyePurple); + public static Materials Oilsands = new Materials( + 878, + TextureSet.SET_NONE, + 1.0F, + 0, + 1, + 1 | 8, + 10, + 10, + 10, + 0, + "Oilsands", + "Oilsands", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Onyx = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 1, + 1, + 255, + 255, + 255, + 0, + "Onyx", + "Onyx", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Orichalcum = new Materials( + 966, + TextureSet.SET_METALLIC, + 32.0F, + 20480, + 1, + 1 | 2 | 8 | 64 | 128, + 84, + 122, + 56, + 0, + "Orichalcum", + "Orichalcum", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL) + .disableAutoGeneratedBlastFurnaceRecipes() + .setTurbineMultipliers(1, 6, 1); + public static Materials Osmonium = new Materials( + -1, + TextureSet.SET_NONE, + 6.0F, + 64, + 1, + 1 | 2 | 8 | 64, + 255, + 255, + 255, + 0, + "Osmonium", + "Osmonium", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeBlue); + public static Materials Oureclase = new Materials( + 961, + TextureSet.SET_METALLIC, + 6.0F, + 1920, + 3, + 1 | 2 | 8 | 64, + 183, + 98, + 21, + 0, + "Oureclase", + "Oureclase", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Painite = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 1, + 0, + 255, + 255, + 255, + 0, + "Painite", + "Painite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Peanutwood = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 1, + 0, + 255, + 255, + 255, + 0, + "Peanutwood", + "Peanut Wood", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Petroleum = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 1, + 1 | 8, + 255, + 255, + 255, + 0, + "Petroleum", + "Petroleum", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Pewter = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 1, + 0, + 255, + 255, + 255, + 0, + "Pewter", + "Pewter", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Phoenixite = new Materials( + -1, + TextureSet.SET_NONE, + 6.0F, + 64, + 1, + 1 | 2 | 8 | 64, + 255, + 255, + 255, + 0, + "Phoenixite", + "Phoenixite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes._NULL); + public static Materials Prometheum = new Materials( + 960, + TextureSet.SET_METALLIC, + 8.0F, + 512, + 1, + 1 | 2 | 8 | 64, + 90, + 129, + 86, + 0, + "Prometheum", + "Prometheum", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Quartzite = new Materials( + 523, + TextureSet.SET_QUARTZ, + 1.0F, + 0, + 1, + 1 | 4 | 8, + 210, + 230, + 210, + 0, + "Quartzite", + "Quartzite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeWhite); + public static Materials Randomite = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 1, + 1 | 8, + 255, + 255, + 255, + 0, + "Randomite", + "Randomite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Rhyolite = new Materials( + 875, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1, + 255, + 255, + 255, + 0, + "Rhyolite", + "Rhyolite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Rubracium = new Materials( + 488, + TextureSet.SET_METALLIC, + 1.0F, + 128, + 1, + 1 | 2 | 8 | 64 | 128, + 151, + 45, + 45, + 0, + "Rubracium", + "Rubracium", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeRed); + public static Materials Sand = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 1, + 0, + 255, + 255, + 255, + 0, + "Sand", + "Sand", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeYellow); + public static Materials Sanguinite = new Materials( + 955, + TextureSet.SET_METALLIC, + 3.0F, + 4480, + 4, + 1 | 2 | 8, + 185, + 0, + 0, + 0, + "Sanguinite", + "Sanguinite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Siltstone = new Materials( + 876, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1, + 255, + 255, + 255, + 0, + "Siltstone", + "Siltstone", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL); + public static Materials Sunstone = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 1, + 1 | 8, + 255, + 255, + 255, + 0, + "Sunstone", + "Sunstone", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeYellow, + Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 1), new TC_AspectStack(TC_Aspects.ALIENIS, 1))); + public static Materials Tar = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 1, + 0, + 10, + 10, + 10, + 0, + "Tar", + "Tar", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlack); + public static Materials Tartarite = new Materials( + 956, + TextureSet.SET_METALLIC, + 32.0F, + 20480, + 3, + 1 | 2 | 8, + 255, + 118, + 60, + 0, + "Tartarite", + "Tartarite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL) + .disableAutoGeneratedBlastFurnaceRecipes() + .setTurbineMultipliers(1120, 1120, 1); + public static Materials UUAmplifier = new Materials( + 721, + TextureSet.SET_FLUID, + 1.0F, + 0, + 1, + 16, + 96, + 0, + 128, + 0, + "UUAmplifier", + "UU-Amplifier", + 0, + 0, + -1, + 0, + false, + false, + 10, + 1, + 1, + Dyes.dyePink); + public static Materials UUMatter = new Materials( + 703, + TextureSet.SET_FLUID, + 1.0F, + 0, + 1, + 16, + 128, + 0, + 196, + 0, + "UUMatter", + "UU-Matter", + 0, + 0, + -1, + 0, + false, + false, + 10, + 1, + 1, + Dyes.dyePink); + public static Materials Void = new Materials( + 970, + TextureSet.SET_METALLIC, + 32.0F, + 512, + 4, + 1 | 2 | 64 | 128, + 28, + 6, + 57, + 0, + "Void", + "Void", + 5, + 1500, + -1, + 0, + false, + true, + 5, + 2, + 1, + Dyes.dyeBlack, + Collections.singletonList(new TC_AspectStack(TC_Aspects.VACUOS, 1))); + public static Materials Voidstone = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 1, + 0, + 255, + 255, + 255, + 200, + "Voidstone", + "Voidstone", + 0, + 0, + -1, + 0, + false, + true, + 1, + 1, + 1, + Dyes._NULL, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1), new TC_AspectStack(TC_Aspects.VACUOS, 1))); + public static Materials Vulcanite = new Materials( + 489, + TextureSet.SET_METALLIC, + 32.0F, + 20480, + 2, + 1 | 2 | 8 | 64 | 128, + 255, + 132, + 72, + 0, + "Vulcanite", + "Vulcanite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL) + .disableAutoGeneratedBlastFurnaceRecipes() + .setTurbineMultipliers(40, 1, 1); + public static Materials Vyroxeres = new Materials( + 951, + TextureSet.SET_METALLIC, + 32.0F, + 7680, + 1, + 1 | 2 | 8 | 64, + 85, + 224, + 1, + 0, + "Vyroxeres", + "Vyroxeres", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL) + .disableAutoGeneratedBlastFurnaceRecipes() + .setTurbineMultipliers(1, 3, 1); + public static Materials Yellorium = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1 | 2, + 255, + 255, + 255, + 0, + "Yellorium", + "Yellorium", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeYellow); + public static Materials Zectium = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 2, + 1 | 2 | 8, + 255, + 255, + 255, + 0, + "Zectium", + "Zectium", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeBlack); /** * Circuitry, Batteries and other Technical things */ - public static Materials Primitive = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Primitive" , "Primitive" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Collections.singletonList(new TC_AspectStack(TC_Aspects.MACHINA, 1))); - public static Materials Basic = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Basic" , "Basic" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Collections.singletonList(new TC_AspectStack(TC_Aspects.MACHINA, 2))); - public static Materials Good = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Good" , "Good" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Collections.singletonList(new TC_AspectStack(TC_Aspects.MACHINA, 3))); - public static Materials Advanced = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Advanced" , "Advanced" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Collections.singletonList(new TC_AspectStack(TC_Aspects.MACHINA, 4))); - public static Materials Data = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Data" , "Data" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Collections.singletonList(new TC_AspectStack(TC_Aspects.MACHINA, 5))); - public static Materials Elite = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Elite" , "Elite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Collections.singletonList(new TC_AspectStack(TC_Aspects.MACHINA, 6))); - public static Materials Master = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Master" , "Master" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Collections.singletonList(new TC_AspectStack(TC_Aspects.MACHINA, 7))); - public static Materials Ultimate = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Ultimate" , "Ultimate" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Collections.singletonList(new TC_AspectStack(TC_Aspects.MACHINA, 8))); - public static Materials Infinite = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Infinite" , "Infinite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 9))); - public static Materials Bio = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Bio" , "Bio" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 10))); - public static Materials Nano = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Nano" , "Bio" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 11))); - public static Materials Piko = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Piko" , "Bio" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 12))); - public static Materials Quantum = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Quantum" , "Bio" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 13))); - public static Materials Optical = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Optical" , "Optical" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 13))); - public static Materials Exotic = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Exotic" , "Exotic" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 14))); - public static Materials Cosmic = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Cosmic" , "Cosmic" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 15))); - public static Materials Transcendent = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Transcendent" , "Transcendent" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 16))); - public static Materials Resistor = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Resistor" , "Resistor" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 1))); - public static Materials Diode = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Diode" , "Diode" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 1))); - public static Materials Transistor = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Transistor" , "Transistor" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 1))); - public static Materials Capacitor = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Capacitor" , "Capacitor" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 1))); - public static Materials Inductor = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Inductor" , "Inductor" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 1))); + public static Materials Primitive = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "Primitive", + "Primitive", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + Collections.singletonList(new TC_AspectStack(TC_Aspects.MACHINA, 1))); + + public static Materials Basic = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "Basic", + "Basic", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + Collections.singletonList(new TC_AspectStack(TC_Aspects.MACHINA, 2))); + public static Materials Good = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "Good", + "Good", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + Collections.singletonList(new TC_AspectStack(TC_Aspects.MACHINA, 3))); + public static Materials Advanced = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "Advanced", + "Advanced", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + Collections.singletonList(new TC_AspectStack(TC_Aspects.MACHINA, 4))); + public static Materials Data = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "Data", + "Data", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + Collections.singletonList(new TC_AspectStack(TC_Aspects.MACHINA, 5))); + public static Materials Elite = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "Elite", + "Elite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + Collections.singletonList(new TC_AspectStack(TC_Aspects.MACHINA, 6))); + public static Materials Master = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "Master", + "Master", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + Collections.singletonList(new TC_AspectStack(TC_Aspects.MACHINA, 7))); + public static Materials Ultimate = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "Ultimate", + "Ultimate", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + Collections.singletonList(new TC_AspectStack(TC_Aspects.MACHINA, 8))); + public static Materials Infinite = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "Infinite", + "Infinite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 9))); + public static Materials Bio = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "Bio", + "Bio", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 10))); + public static Materials Nano = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "Nano", + "Bio", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 11))); + public static Materials Piko = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "Piko", + "Bio", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 12))); + public static Materials Quantum = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "Quantum", + "Bio", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 13))); + public static Materials Optical = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "Optical", + "Optical", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 13))); + public static Materials Exotic = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "Exotic", + "Exotic", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 14))); + public static Materials Cosmic = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "Cosmic", + "Cosmic", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 15))); + public static Materials Transcendent = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "Transcendent", + "Transcendent", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 16))); + public static Materials Resistor = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "Resistor", + "Resistor", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 1))); + public static Materials Diode = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "Diode", + "Diode", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 1))); + public static Materials Transistor = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "Transistor", + "Transistor", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 1))); + public static Materials Capacitor = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "Capacitor", + "Capacitor", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 1))); + public static Materials Inductor = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "Inductor", + "Inductor", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 1))); /** * Not possible to determine exact Components */ - public static Materials Antimatter = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Antimatter" , "Antimatter" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyePink , Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 9), new TC_AspectStack(TC_Aspects.PERFODIO, 8))); - public static Materials AdvancedGlue = new MaterialBuilder(567, TextureSet.SET_FLUID , "Advanced Glue").setName("AdvancedGlue").addCell().addFluid().setRGB(255, 255, 185).setColor(Dyes.dyeYellow).setAspects(Collections.singletonList(new TC_AspectStack(TC_Aspects.LIMUS, 5))).constructMaterial(); - public static Materials BioFuel = new Materials( 705, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 128, 0, 0, "BioFuel" , "Biofuel" , 0, 6, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange ); - public static Materials Biomass = new Materials( 704, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 0, 255, 0, 0, "Biomass" , "Forestry Biomass" , 3, 8, -1, 0, false, false, 1, 1, 1, Dyes.dyeGreen ); - public static Materials CharcoalByproducts = new MaterialBuilder(675, TextureSet.SET_FLUID , "Charcoal Byproducts").addCell().setRGB(120, 68, 33).setColor(Dyes.dyeBrown).constructMaterial(); - public static Materials Cheese = new Materials( 894, TextureSet.SET_FINE , 1.0F, 0, 0, 1 |8 , 255, 255, 0, 0, "Cheese" , "Cheese" , 0, 0, 320, 0, false, false, 1, 1, 1, Dyes.dyeYellow ); - public static Materials Chili = new Materials( 895, TextureSet.SET_FINE , 1.0F, 0, 0, 1 , 200, 0, 0, 0, "Chili" , "Chili" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeRed ); - public static Materials Chocolate = new Materials( 886, TextureSet.SET_FINE , 1.0F, 0, 0, 1 , 190, 95, 0, 0, "Chocolate" , "Chocolate" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBrown ); - public static Materials Cluster = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 127, "Cluster" , "Cluster" , 0, 0, -1, 0, false, true, 1, 1, 1, Dyes.dyeWhite ); - public static Materials CoalFuel = new Materials( 710, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 50, 50, 70, 0, "CoalFuel" , "Coalfuel" , 0, 16, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack ); - public static Materials Cocoa = new Materials( 887, TextureSet.SET_FINE , 1.0F, 0, 0, 1 , 190, 95, 0, 0, "Cocoa" , "Cocoa" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBrown ); - public static Materials Coffee = new Materials( 888, TextureSet.SET_FINE , 1.0F, 0, 0, 1 , 150, 75, 0, 0, "Coffee" , "Coffee" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBrown ); - public static Materials Creosote = new Materials( 712, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 128, 64, 0, 0, "Creosote" , "Creosote" , 3, 8, -1, 0, false, false, 1, 1, 1, Dyes.dyeBrown ); - public static Materials Ethanol = new Materials( 706, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 128, 0, 0, "Ethanol" , "Ethanol" , 0, 192, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 6), new MaterialStack(Oxygen, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.VENENUM, 1), new TC_AspectStack(TC_Aspects.AQUA, 1))); - public static Materials FishOil = new Materials( 711, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 196, 0, 0, "FishOil" , "Fish Oil" , 3, 2, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow , Collections.singletonList(new TC_AspectStack(TC_Aspects.CORPUS, 2))); - public static Materials FermentedBiomass = new MaterialBuilder(691, TextureSet.SET_FLUID , "Fermented Biomass").addCell().addFluid().setRGB(68, 85, 0).setColor(Dyes.dyeBrown).constructMaterial(); - public static Materials Fuel = new Materials( 708, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 255, 0, 0, "Fuel" , "Diesel" , 0, 480, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow ); - public static Materials Glue = new Materials( 726, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 200, 196, 0, 0, "Glue" , "Refined Glue" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange , Collections.singletonList(new TC_AspectStack(TC_Aspects.LIMUS, 2))); - public static Materials Gunpowder = new Materials( 800, TextureSet.SET_DULL , 1.0F, 0, 0, 1 , 128, 128, 128, 0, "Gunpowder" , "Gunpowder" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeGray , Arrays.asList(new TC_AspectStack(TC_Aspects.PERDITIO, 3), new TC_AspectStack(TC_Aspects.IGNIS, 4))); - public static Materials FryingOilHot = new Materials( 727, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 200, 196, 0, 0, "FryingOilHot" , "Hot Frying Oil" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange , Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 1), new TC_AspectStack(TC_Aspects.IGNIS, 1))); - public static Materials Honey = new Materials( 725, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 210, 200, 0, 0, "Honey" , "Honey" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow ); - public static Materials Leather = new Materials( -1, TextureSet.SET_ROUGH , 1.0F, 0, 0, 1 , 150, 150, 80, 127, "Leather" , "Leather" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange ); - public static Materials Lubricant = new Materials( 724, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 196, 0, 0, "Lubricant" , "Lubricant" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange , Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 2), new TC_AspectStack(TC_Aspects.MACHINA, 1))); - public static Materials McGuffium239 = new Materials( 999, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 200, 50, 150, 0, "McGuffium239" , "Mc Guffium 239" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyePink , Arrays.asList(new TC_AspectStack(TC_Aspects.ALIENIS, 8), new TC_AspectStack(TC_Aspects.PERMUTATIO, 8), new TC_AspectStack(TC_Aspects.SPIRITUS, 8), new TC_AspectStack(TC_Aspects.AURAM, 8), new TC_AspectStack(TC_Aspects.VITIUM, 8), new TC_AspectStack(TC_Aspects.RADIO, 8), new TC_AspectStack(TC_Aspects.MAGNETO, 8), new TC_AspectStack(TC_Aspects.ELECTRUM, 8), new TC_AspectStack(TC_Aspects.NEBRISUM, 8), new TC_AspectStack(TC_Aspects.STRONTIO, 8))); - public static Materials MeatRaw = new Materials( 892, TextureSet.SET_FINE , 1.0F, 0, 0, 1 , 255, 100, 100, 0, "MeatRaw" , "Raw Meat" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyePink ); - public static Materials MeatCooked = new Materials( 893, TextureSet.SET_FINE , 1.0F, 0, 0, 1 , 150, 60, 20, 0, "MeatCooked" , "Cooked Meat" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyePink ); - public static Materials Milk = new Materials( 885, TextureSet.SET_FINE , 1.0F, 0, 0, 1 |16 , 254, 254, 254, 0, "Milk" , "Milk" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , Collections.singletonList(new TC_AspectStack(TC_Aspects.SANO, 2))); - public static Materials Mud = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Mud" , "Mud" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBrown ); - public static Materials Oil = new Materials( 707, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 10, 10, 10, 0, "Oil" , "Oil" , 3, 20, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack ); - public static Materials Paper = new Materials( 879, TextureSet.SET_PAPER , 1.0F, 0, 0, 1 , 250, 250, 250, 0, "Paper" , "Paper" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , Collections.singletonList(new TC_AspectStack(TC_Aspects.COGNITIO, 1))); - public static Materials Peat = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Peat" , "Peat" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBrown , Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 2), new TC_AspectStack(TC_Aspects.IGNIS, 2))); - public static Materials RareEarth = new Materials( 891, TextureSet.SET_FINE , 1.0F, 0, 0, 1 , 128, 128, 100, 0, "RareEarth" , "Rare Earth" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeGray , Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 1), new TC_AspectStack(TC_Aspects.LUCRUM, 1))); - public static Materials Red = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 0, 0, 0, "Red" , "Red" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeRed ); - public static Materials Reinforced = new Materials( 383, TextureSet.SET_METALLIC , 7.0F, 480, 4, 1|2 |64|128 , 105, 141, 165, 0, "Reinforced" , "Reinforced" , 0, 0, -1, 1700, true, false, 1, 1, 1, Dyes.dyeBlue ).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials SeedOil = new Materials( 713, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 196, 255, 0, 0, "SeedOil" , "Seed Oil" , 3, 2, -1, 0, false, false, 1, 1, 1, Dyes.dyeLime , Collections.singletonList(new TC_AspectStack(TC_Aspects.GRANUM, 2))); - public static Materials SeedOilHemp = new Materials( 722, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 196, 255, 0, 0, "SeedOilHemp" , "Hemp Seed Oil" , 3, 2, -1, 0, false, false, 1, 1, 1, Dyes.dyeLime , Collections.singletonList(new TC_AspectStack(TC_Aspects.GRANUM, 2))); - public static Materials SeedOilLin = new Materials( 723, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 196, 255, 0, 0, "SeedOilLin" , "Lin Seed Oil" , 3, 2, -1, 0, false, false, 1, 1, 1, Dyes.dyeLime , Collections.singletonList(new TC_AspectStack(TC_Aspects.GRANUM, 2))); - public static Materials Stone = new Materials( 299, TextureSet.SET_ROUGH , 4.0F, 32, 1, 1 |64|128 , 205, 205, 205, 0, "Stone" , "Stone" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Collections.singletonList(new TC_AspectStack(TC_Aspects.TERRA, 1))); - public static Materials TNT = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "TNT" , "TNT" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeRed , Arrays.asList(new TC_AspectStack(TC_Aspects.PERDITIO, 7), new TC_AspectStack(TC_Aspects.IGNIS, 4))); - public static Materials Unstable = new Materials( 396, TextureSet.SET_SHINY , 1.0F, 0, 4, 1 , 220, 220, 220, 127, "Unstable" , "Unstable" , 0, 0, -1, 0, false, true, 1, 1, 1, Dyes.dyeWhite , Collections.singletonList(new TC_AspectStack(TC_Aspects.PERDITIO, 4))); - public static Materials Unstableingot = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 4, 0 , 255, 255, 255, 127, "Unstableingot" , "Unstable" , 0, 0, -1, 0, false, true, 1, 1, 1, Dyes.dyeWhite , Collections.singletonList(new TC_AspectStack(TC_Aspects.PERDITIO, 4))); - public static Materials Vinegar = new MaterialBuilder(690, TextureSet.SET_FLUID , "Vinegar").setColor(Dyes.dyeBrown).constructMaterial(); - public static Materials Wheat = new Materials( 881, TextureSet.SET_POWDER , 1.0F, 0, 0, 1 , 255, 255, 196, 0, "Wheat" , "Wheat" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow , Collections.singletonList(new TC_AspectStack(TC_Aspects.MESSIS, 2))); - public static Materials WoodGas = new MaterialBuilder(660, TextureSet.SET_FLUID , "Wood Gas").addCell().addGas().setRGB(222, 205, 135).setColor(Dyes.dyeBrown).setFuelType(MaterialBuilder.GAS).setFuelPower(24).constructMaterial(); - public static Materials WoodTar = new MaterialBuilder(662, TextureSet.SET_FLUID , "Wood Tar").addCell().addFluid().setRGB(40, 23, 11).setColor(Dyes.dyeBrown).constructMaterial(); - public static Materials WoodVinegar = new MaterialBuilder(661, TextureSet.SET_FLUID , "Wood Vinegar").addCell().addFluid().setRGB(212, 85, 0).setColor(Dyes.dyeBrown).constructMaterial(); + public static Materials Antimatter = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "Antimatter", + "Antimatter", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyePink, + Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 9), new TC_AspectStack(TC_Aspects.PERFODIO, 8))); + + public static Materials AdvancedGlue = new MaterialBuilder(567, TextureSet.SET_FLUID, "Advanced Glue") + .setName("AdvancedGlue") + .addCell() + .addFluid() + .setRGB(255, 255, 185) + .setColor(Dyes.dyeYellow) + .setAspects(Collections.singletonList(new TC_AspectStack(TC_Aspects.LIMUS, 5))) + .constructMaterial(); + public static Materials BioFuel = new Materials( + 705, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 255, + 128, + 0, + 0, + "BioFuel", + "Biofuel", + 0, + 6, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeOrange); + public static Materials Biomass = new Materials( + 704, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 0, + 255, + 0, + 0, + "Biomass", + "Forestry Biomass", + 3, + 8, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeGreen); + public static Materials CharcoalByproducts = new MaterialBuilder(675, TextureSet.SET_FLUID, "Charcoal Byproducts") + .addCell() + .setRGB(120, 68, 33) + .setColor(Dyes.dyeBrown) + .constructMaterial(); + public static Materials Cheese = new Materials( + 894, + TextureSet.SET_FINE, + 1.0F, + 0, + 0, + 1 | 8, + 255, + 255, + 0, + 0, + "Cheese", + "Cheese", + 0, + 0, + 320, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeYellow); + public static Materials Chili = new Materials( + 895, + TextureSet.SET_FINE, + 1.0F, + 0, + 0, + 1, + 200, + 0, + 0, + 0, + "Chili", + "Chili", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeRed); + public static Materials Chocolate = new Materials( + 886, + TextureSet.SET_FINE, + 1.0F, + 0, + 0, + 1, + 190, + 95, + 0, + 0, + "Chocolate", + "Chocolate", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBrown); + public static Materials Cluster = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 127, + "Cluster", + "Cluster", + 0, + 0, + -1, + 0, + false, + true, + 1, + 1, + 1, + Dyes.dyeWhite); + public static Materials CoalFuel = new Materials( + 710, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 50, + 50, + 70, + 0, + "CoalFuel", + "Coalfuel", + 0, + 16, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlack); + public static Materials Cocoa = new Materials( + 887, + TextureSet.SET_FINE, + 1.0F, + 0, + 0, + 1, + 190, + 95, + 0, + 0, + "Cocoa", + "Cocoa", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBrown); + public static Materials Coffee = new Materials( + 888, + TextureSet.SET_FINE, + 1.0F, + 0, + 0, + 1, + 150, + 75, + 0, + 0, + "Coffee", + "Coffee", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBrown); + public static Materials Creosote = new Materials( + 712, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 128, + 64, + 0, + 0, + "Creosote", + "Creosote", + 3, + 8, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBrown); + public static Materials Ethanol = new Materials( + 706, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 255, + 128, + 0, + 0, + "Ethanol", + "Ethanol", + 0, + 192, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeOrange, + 1, + Arrays.asList(new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 6), new MaterialStack(Oxygen, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.VENENUM, 1), new TC_AspectStack(TC_Aspects.AQUA, 1))); + public static Materials FishOil = new Materials( + 711, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 255, + 196, + 0, + 0, + "FishOil", + "Fish Oil", + 3, + 2, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeYellow, + Collections.singletonList(new TC_AspectStack(TC_Aspects.CORPUS, 2))); + public static Materials FermentedBiomass = new MaterialBuilder(691, TextureSet.SET_FLUID, "Fermented Biomass") + .addCell() + .addFluid() + .setRGB(68, 85, 0) + .setColor(Dyes.dyeBrown) + .constructMaterial(); + public static Materials Fuel = new Materials( + 708, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 255, + 255, + 0, + 0, + "Fuel", + "Diesel", + 0, + 480, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeYellow); + public static Materials Glue = new Materials( + 726, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 200, + 196, + 0, + 0, + "Glue", + "Refined Glue", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeOrange, + Collections.singletonList(new TC_AspectStack(TC_Aspects.LIMUS, 2))); + public static Materials Gunpowder = new Materials( + 800, + TextureSet.SET_DULL, + 1.0F, + 0, + 0, + 1, + 128, + 128, + 128, + 0, + "Gunpowder", + "Gunpowder", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeGray, + Arrays.asList(new TC_AspectStack(TC_Aspects.PERDITIO, 3), new TC_AspectStack(TC_Aspects.IGNIS, 4))); + public static Materials FryingOilHot = new Materials( + 727, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 200, + 196, + 0, + 0, + "FryingOilHot", + "Hot Frying Oil", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeOrange, + Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 1), new TC_AspectStack(TC_Aspects.IGNIS, 1))); + public static Materials Honey = new Materials( + 725, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 210, + 200, + 0, + 0, + "Honey", + "Honey", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeYellow); + public static Materials Leather = new Materials( + -1, + TextureSet.SET_ROUGH, + 1.0F, + 0, + 0, + 1, + 150, + 150, + 80, + 127, + "Leather", + "Leather", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeOrange); + public static Materials Lubricant = new Materials( + 724, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 255, + 196, + 0, + 0, + "Lubricant", + "Lubricant", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeOrange, + Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 2), new TC_AspectStack(TC_Aspects.MACHINA, 1))); + public static Materials McGuffium239 = new Materials( + 999, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 200, + 50, + 150, + 0, + "McGuffium239", + "Mc Guffium 239", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyePink, + Arrays.asList( + new TC_AspectStack(TC_Aspects.ALIENIS, 8), + new TC_AspectStack(TC_Aspects.PERMUTATIO, 8), + new TC_AspectStack(TC_Aspects.SPIRITUS, 8), + new TC_AspectStack(TC_Aspects.AURAM, 8), + new TC_AspectStack(TC_Aspects.VITIUM, 8), + new TC_AspectStack(TC_Aspects.RADIO, 8), + new TC_AspectStack(TC_Aspects.MAGNETO, 8), + new TC_AspectStack(TC_Aspects.ELECTRUM, 8), + new TC_AspectStack(TC_Aspects.NEBRISUM, 8), + new TC_AspectStack(TC_Aspects.STRONTIO, 8))); + public static Materials MeatRaw = new Materials( + 892, + TextureSet.SET_FINE, + 1.0F, + 0, + 0, + 1, + 255, + 100, + 100, + 0, + "MeatRaw", + "Raw Meat", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyePink); + public static Materials MeatCooked = new Materials( + 893, + TextureSet.SET_FINE, + 1.0F, + 0, + 0, + 1, + 150, + 60, + 20, + 0, + "MeatCooked", + "Cooked Meat", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyePink); + public static Materials Milk = new Materials( + 885, + TextureSet.SET_FINE, + 1.0F, + 0, + 0, + 1 | 16, + 254, + 254, + 254, + 0, + "Milk", + "Milk", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + Collections.singletonList(new TC_AspectStack(TC_Aspects.SANO, 2))); + public static Materials Mud = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "Mud", + "Mud", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBrown); + public static Materials Oil = new Materials( + 707, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 10, + 10, + 10, + 0, + "Oil", + "Oil", + 3, + 20, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlack); + public static Materials Paper = new Materials( + 879, + TextureSet.SET_PAPER, + 1.0F, + 0, + 0, + 1, + 250, + 250, + 250, + 0, + "Paper", + "Paper", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + Collections.singletonList(new TC_AspectStack(TC_Aspects.COGNITIO, 1))); + public static Materials Peat = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "Peat", + "Peat", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBrown, + Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 2), new TC_AspectStack(TC_Aspects.IGNIS, 2))); + public static Materials RareEarth = new Materials( + 891, + TextureSet.SET_FINE, + 1.0F, + 0, + 0, + 1, + 128, + 128, + 100, + 0, + "RareEarth", + "Rare Earth", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeGray, + Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 1), new TC_AspectStack(TC_Aspects.LUCRUM, 1))); + public static Materials Red = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 0, + 0, + 0, + "Red", + "Red", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeRed); + public static Materials Reinforced = new Materials( + 383, + TextureSet.SET_METALLIC, + 7.0F, + 480, + 4, + 1 | 2 | 64 | 128, + 105, + 141, + 165, + 0, + "Reinforced", + "Reinforced", + 0, + 0, + -1, + 1700, + true, + false, + 1, + 1, + 1, + Dyes.dyeBlue) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials SeedOil = new Materials( + 713, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 196, + 255, + 0, + 0, + "SeedOil", + "Seed Oil", + 3, + 2, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLime, + Collections.singletonList(new TC_AspectStack(TC_Aspects.GRANUM, 2))); + public static Materials SeedOilHemp = new Materials( + 722, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 196, + 255, + 0, + 0, + "SeedOilHemp", + "Hemp Seed Oil", + 3, + 2, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLime, + Collections.singletonList(new TC_AspectStack(TC_Aspects.GRANUM, 2))); + public static Materials SeedOilLin = new Materials( + 723, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 196, + 255, + 0, + 0, + "SeedOilLin", + "Lin Seed Oil", + 3, + 2, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLime, + Collections.singletonList(new TC_AspectStack(TC_Aspects.GRANUM, 2))); + public static Materials Stone = new Materials( + 299, + TextureSet.SET_ROUGH, + 4.0F, + 32, + 1, + 1 | 64 | 128, + 205, + 205, + 205, + 0, + "Stone", + "Stone", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + Collections.singletonList(new TC_AspectStack(TC_Aspects.TERRA, 1))); + public static Materials TNT = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "TNT", + "TNT", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeRed, + Arrays.asList(new TC_AspectStack(TC_Aspects.PERDITIO, 7), new TC_AspectStack(TC_Aspects.IGNIS, 4))); + public static Materials Unstable = new Materials( + 396, + TextureSet.SET_SHINY, + 1.0F, + 0, + 4, + 1, + 220, + 220, + 220, + 127, + "Unstable", + "Unstable", + 0, + 0, + -1, + 0, + false, + true, + 1, + 1, + 1, + Dyes.dyeWhite, + Collections.singletonList(new TC_AspectStack(TC_Aspects.PERDITIO, 4))); + public static Materials Unstableingot = new Materials( + -1, + TextureSet.SET_NONE, + 1.0F, + 0, + 4, + 0, + 255, + 255, + 255, + 127, + "Unstableingot", + "Unstable", + 0, + 0, + -1, + 0, + false, + true, + 1, + 1, + 1, + Dyes.dyeWhite, + Collections.singletonList(new TC_AspectStack(TC_Aspects.PERDITIO, 4))); + public static Materials Vinegar = new MaterialBuilder(690, TextureSet.SET_FLUID, "Vinegar") + .setColor(Dyes.dyeBrown) + .constructMaterial(); + public static Materials Wheat = new Materials( + 881, + TextureSet.SET_POWDER, + 1.0F, + 0, + 0, + 1, + 255, + 255, + 196, + 0, + "Wheat", + "Wheat", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeYellow, + Collections.singletonList(new TC_AspectStack(TC_Aspects.MESSIS, 2))); + public static Materials WoodGas = new MaterialBuilder(660, TextureSet.SET_FLUID, "Wood Gas") + .addCell() + .addGas() + .setRGB(222, 205, 135) + .setColor(Dyes.dyeBrown) + .setFuelType(MaterialBuilder.GAS) + .setFuelPower(24) + .constructMaterial(); + public static Materials WoodTar = new MaterialBuilder(662, TextureSet.SET_FLUID, "Wood Tar") + .addCell() + .addFluid() + .setRGB(40, 23, 11) + .setColor(Dyes.dyeBrown) + .constructMaterial(); + public static Materials WoodVinegar = new MaterialBuilder(661, TextureSet.SET_FLUID, "Wood Vinegar") + .addCell() + .addFluid() + .setRGB(212, 85, 0) + .setColor(Dyes.dyeBrown) + .constructMaterial(); /** * TODO: This */ - public static Materials AluminiumBrass = new Materials( -1, TextureSet.SET_METALLIC , 6.0F, 64, 2, 1|2 |64 , 255, 255, 255, 0, "AluminiumBrass" , "Aluminium Brass" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow ); - public static Materials Osmiridium = new Materials( 317, TextureSet.SET_METALLIC , 7.0F, 1600, 3, 1|2 |64|128 , 100, 100, 255, 0, "Osmiridium" , "Osmiridium" , 0, 0, 3500, 4500, true, false, 1, 1, 1, Dyes.dyeLightBlue , 1, Arrays.asList(new MaterialStack(Iridium, 3), new MaterialStack(Osmium, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Sunnarium = new Materials( 318, TextureSet.SET_SHINY , 1.0F, 0, 1, 1|2 |64|128 , 255, 255, 0, 0, "Sunnarium" , "Sunnarium" , 0, 0, 4200, 4200, true, false, 1, 1, 1, Dyes.dyeYellow ).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Endstone = new Materials( 808, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 255, 255, 255, 0, "Endstone" , "Endstone" , 0, 0, -1, 0, false, false, 0, 1, 1, Dyes.dyeYellow ); - public static Materials Netherrack = new Materials( 807, TextureSet.SET_DULL , 1.0F, 0, 0, 1 , 200, 0, 0, 0, "Netherrack" , "Netherrack" , 0, 0, -1, 0, false, false, 0, 1, 1, Dyes.dyeRed ); - public static Materials SoulSand = new Materials( -1, TextureSet.SET_DULL , 1.0F, 0, 0, 1 , 255, 255, 255, 0, "SoulSand" , "Soulsand" , 0, 0, -1, 0, false, false, 0, 1, 1, Dyes.dyeBrown ); + public static Materials AluminiumBrass = new Materials( + -1, + TextureSet.SET_METALLIC, + 6.0F, + 64, + 2, + 1 | 2 | 64, + 255, + 255, + 255, + 0, + "AluminiumBrass", + "Aluminium Brass", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeYellow); + + public static Materials Osmiridium = new Materials( + 317, + TextureSet.SET_METALLIC, + 7.0F, + 1600, + 3, + 1 | 2 | 64 | 128, + 100, + 100, + 255, + 0, + "Osmiridium", + "Osmiridium", + 0, + 0, + 3500, + 4500, + true, + false, + 1, + 1, + 1, + Dyes.dyeLightBlue, + 1, + Arrays.asList(new MaterialStack(Iridium, 3), new MaterialStack(Osmium, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Sunnarium = new Materials( + 318, + TextureSet.SET_SHINY, + 1.0F, + 0, + 1, + 1 | 2 | 64 | 128, + 255, + 255, + 0, + 0, + "Sunnarium", + "Sunnarium", + 0, + 0, + 4200, + 4200, + true, + false, + 1, + 1, + 1, + Dyes.dyeYellow) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Endstone = new Materials( + 808, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1, + 255, + 255, + 255, + 0, + "Endstone", + "Endstone", + 0, + 0, + -1, + 0, + false, + false, + 0, + 1, + 1, + Dyes.dyeYellow); + public static Materials Netherrack = new Materials( + 807, + TextureSet.SET_DULL, + 1.0F, + 0, + 0, + 1, + 200, + 0, + 0, + 0, + "Netherrack", + "Netherrack", + 0, + 0, + -1, + 0, + false, + false, + 0, + 1, + 1, + Dyes.dyeRed); + public static Materials SoulSand = new Materials( + -1, + TextureSet.SET_DULL, + 1.0F, + 0, + 0, + 1, + 255, + 255, + 255, + 0, + "SoulSand", + "Soulsand", + 0, + 0, + -1, + 0, + false, + false, + 0, + 1, + 1, + Dyes.dyeBrown); /** * First Degree Compounds */ - public static Materials Methane = new Materials( 715, TextureSet.SET_FLUID , 1.0F, 0, 1, 16 , 255, 255, 255, 0, "Methane" , "Methane" , 1, 104, -1, 0, false, false, 3, 1, 1, Dyes.dyeMagenta , 1, Arrays.asList(new MaterialStack(Carbon, 1), new MaterialStack(Hydrogen, 4))); - public static Materials CarbonDioxide = new Materials( 497, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 169, 208, 245, 240, "CarbonDioxide" , "Carbon Dioxide" , 0, 0, 25, 1, false, true, 1, 1, 1, Dyes.dyeLightBlue , 0, Arrays.asList(new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 2))).setHasCorrespondingGas(true); - public static Materials NobleGases = new Materials( 496, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 169, 208, 245, 240, "NobleGases" , "Noble Gases" , 0, 0, 4, 0, false, true, 1, 1, 1, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(CarbonDioxide,21),new MaterialStack(Helium, 9), new MaterialStack(Methane, 3), new MaterialStack(Deuterium, 1))).setHasCorrespondingGas(true); - public static Materials Air = new Materials( -1, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 169, 208, 245, 240, "Air" , "Air" , 0, 0, -1, 0, false, true, 1, 1, 1, Dyes.dyeLightBlue , 0, Arrays.asList(new MaterialStack(Nitrogen, 40), new MaterialStack(Oxygen, 11), new MaterialStack(Argon, 1),new MaterialStack(NobleGases,1))); - public static Materials LiquidAir = new Materials( 495, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 169, 208, 245, 240, "LiquidAir" , "Liquid Air" , 0, 0, 4, 0, false, true, 1, 1, 1, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Nitrogen, 40), new MaterialStack(Oxygen, 11), new MaterialStack(Argon, 1),new MaterialStack(NobleGases,1))); - public static Materials LiquidNitrogen = new Materials( 494, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 169, 208, 245, 240, "LiquidNitrogen" , "Liquid Nitrogen" , 0, 0, 4, 0, false, true, 1, 1, 1, Dyes.dyeLightBlue , 1, Collections.singletonList(new MaterialStack(Nitrogen, 1))); - public static Materials LiquidOxygen = new Materials( 493, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 169, 208, 245, 240, "LiquidOxygen" , "Liquid Oxygen" , 0, 0, 4, 0, false, true, 1, 1, 1, Dyes.dyeLightBlue , 1, Collections.singletonList(new MaterialStack(Oxygen, 1))); - public static Materials SiliconDioxide = new MaterialBuilder(837, TextureSet.SET_QUARTZ, "Silicon Dioxide").setToolSpeed(1.0F).setDurability(0).setToolQuality(1).addDustItems().setRGB(255, 255, 255).setColor(Dyes.dyeLightGray).setOreValue(1).setExtraData(0).setMaterialList(new MaterialStack(Silicon, 1), new MaterialStack(Oxygen, 2)).constructMaterial(); - public static Materials Jasper = new Materials( 511, TextureSet.SET_EMERALD , 1.0F, 0, 2, 1 |4|8 |64 , 200, 80, 80, 100, "Jasper" , "Jasper" , 0, 0, -1, 0, false, true, 3, 1, 1, Dyes.dyeRed , 1, Collections.singletonList(new MaterialStack(SiliconDioxide, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 4), new TC_AspectStack(TC_Aspects.VITREUS, 2))); - public static Materials Almandine = new Materials( 820, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 |8 , 255, 0, 0, 0, "Almandine" , "Almandine" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeRed , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Iron, 3), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 12))); - public static Materials Andradite = new Materials( 821, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 |8 , 150, 120, 0, 0, "Andradite" , "Andradite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeYellow , 1, Arrays.asList(new MaterialStack(Calcium, 3), new MaterialStack(Iron, 2), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 12))); - public static Materials AnnealedCopper = new Materials( 345, TextureSet.SET_SHINY , 1.0F, 0, 2, 1|2 |128 , 255, 120, 20, 0, "AnnealedCopper" , "Annealed Copper" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeOrange , 2, Collections.singletonList(new MaterialStack(Copper, 1))); - public static Materials Asbestos = new Materials( 946, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 230, 230, 230, 0, "Asbestos" , "Asbestos" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Magnesium, 3), new MaterialStack(Silicon, 2), new MaterialStack(Hydrogen, 4), new MaterialStack(Oxygen, 9))); // Mg3Si2O5(OH)4 - public static Materials Ash = new Materials( 815, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 150, 150, 150, 0, "Ash" , "Ashes" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , 2, Collections.singletonList(new MaterialStack(Carbon, 1)), Collections.singletonList(new TC_AspectStack(TC_Aspects.PERDITIO, 1))); - public static Materials BandedIron = new Materials( 917, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 145, 90, 90, 0, "BandedIron" , "Banded Iron" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBrown , 1, Arrays.asList(new MaterialStack(Iron, 2), new MaterialStack(Oxygen, 3))); - public static Materials BatteryAlloy = new Materials( 315, TextureSet.SET_DULL , 1.0F, 0, 1, 1|2 , 156, 124, 160, 0, "BatteryAlloy" , "Battery Alloy" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyePurple , 2, Arrays.asList(new MaterialStack(Lead, 4), new MaterialStack(Antimony, 1))); - public static Materials BlueTopaz = new Materials( 513, TextureSet.SET_GEM_HORIZONTAL , 7.0F, 256, 3, 1 |4|8 |64 , 0, 0, 255, 127, "BlueTopaz" , "Blue Topaz" , 0, 0, -1, 0, false, true, 3, 1, 1, Dyes.dyeBlue , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 1), new MaterialStack(Fluorine, 2), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 6)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 6), new TC_AspectStack(TC_Aspects.VITREUS, 4))); - public static Materials Bone = new Materials( 806, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 250, 250, 250, 0, "Bone" , "Bone" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 0, Collections.singletonList(new MaterialStack(Calcium, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.MORTUUS, 2), new TC_AspectStack(TC_Aspects.CORPUS, 1))); - public static Materials Brass = new Materials( 301, TextureSet.SET_METALLIC , 7.0F, 96, 1, 1|2 |64|128 , 255, 180, 0, 0, "Brass" , "Brass" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Zinc, 1), new MaterialStack(Copper, 3)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))); - public static Materials Bronze = new Materials( 300, TextureSet.SET_METALLIC , 6.0F, 192, 2, 1|2 |64|128 , 255, 128, 0, 0, "Bronze" , "Bronze" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Tin, 1), new MaterialStack(Copper, 3)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))); - public static Materials BrownLimonite = new Materials( 930, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1 |8 , 200, 100, 0, 0, "BrownLimonite" , "Brown Limonite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBrown , 2, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Hydrogen, 1), new MaterialStack(Oxygen, 2))); // FeO(OH) - public static Materials Calcite = new Materials( 823, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 250, 230, 220, 0, "Calcite" , "Calcite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 3))); - public static Materials Cassiterite = new Materials( 824, TextureSet.SET_METALLIC , 1.0F, 0, 3, 1 |8 , 220, 220, 220, 0, "Cassiterite" , "Cassiterite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Tin, 1), new MaterialStack(Oxygen, 2))); - public static Materials CassiteriteSand = new Materials( 937, TextureSet.SET_SAND , 1.0F, 0, 1, 1 |8 , 220, 220, 220, 0, "CassiteriteSand" , "Cassiterite Sand" , 0, 0, -1, 0, false, false, 4, 1, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Tin, 1), new MaterialStack(Oxygen, 2))); - public static Materials Chalcopyrite = new Materials( 855, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 160, 120, 40, 0, "Chalcopyrite" , "Chalcopyrite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow , 1, Arrays.asList(new MaterialStack(Copper, 1), new MaterialStack(Iron, 1), new MaterialStack(Sulfur, 2))); - public static Materials Charcoal = new Materials( 536, TextureSet.SET_FINE , 1.0F, 0, 1, 1 |4 , 100, 70, 70, 0, "Charcoal" , "Charcoal" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack , 1, Collections.singletonList(new MaterialStack(Carbon, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 2), new TC_AspectStack(TC_Aspects.IGNIS, 2))); - public static Materials Chromite = new Materials( 825, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1 |8 , 35, 20, 15, 0, "Chromite" , "Chromite" , 0, 0, 1700, 1700, true, false, 6, 1, 1, Dyes.dyePink , 1, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Chrome, 2), new MaterialStack(Oxygen, 4))); - public static Materials ChromiumDioxide = new Materials( 361, TextureSet.SET_DULL , 11.0F, 256, 3, 1|2 , 230, 200, 200, 0, "ChromiumDioxide" , "Chromium Dioxide" , 0, 0, 650, 650, false, false, 5, 3, 1, Dyes.dyePink , 1, Arrays.asList(new MaterialStack(Chrome, 1), new MaterialStack(Oxygen, 2)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MACHINA, 1))); - public static Materials Cinnabar = new Materials( 826, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 |8 , 150, 0, 0, 0, "Cinnabar" , "Cinnabar" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeBrown , 2, Arrays.asList(new MaterialStack(Mercury, 1), new MaterialStack(Sulfur, 1))); - public static Materials Water = new Materials( 701, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 0, 0, 255, 0, "Water" , "Water" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlue , 0, Arrays.asList(new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 1)), Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 2))); - public static Materials Clay = new Materials( 805, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 , 200, 200, 220, 0, "Clay" , "Clay" , 0, 0, -1, 0, false, false, 5, 1, 1, Dyes.dyeLightBlue , 0, Arrays.asList(new MaterialStack(Sodium, 2), new MaterialStack(Lithium, 1), new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 2),new MaterialStack(Water,6))); - public static Materials Coal = new Materials( 535, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 |4|8 , 70, 70, 70, 0, "Coal" , "Coal" , 0, 0, -1, 0, false, false, 2, 2, 1, Dyes.dyeBlack , 1, Collections.singletonList(new MaterialStack(Carbon, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 2), new TC_AspectStack(TC_Aspects.IGNIS, 2))); - public static Materials Cobaltite = new Materials( 827, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1 |8 , 80, 80, 250, 0, "Cobaltite" , "Cobaltite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeBlue , 1, Arrays.asList(new MaterialStack(Cobalt, 1), new MaterialStack(Arsenic, 1), new MaterialStack(Sulfur, 1))); - public static Materials Cooperite = new Materials( 828, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1 |8 , 255, 255, 200, 0, "Cooperite" , "Sheldonite" , 0, 0, -1, 0, false, false, 5, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Platinum, 3), new MaterialStack(Nickel, 1), new MaterialStack(Sulfur, 1), new MaterialStack(Palladium, 1))); - public static Materials Cupronickel = new Materials( 310, TextureSet.SET_METALLIC , 6.0F, 64, 1, 1|2 |64 , 227, 150, 128, 0, "Cupronickel" , "Cupronickel" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Copper, 1), new MaterialStack(Nickel, 1))); - public static Materials DarkAsh = new Materials( 816, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 50, 50, 50, 0, "DarkAsh" , "Dark Ashes" , 0, 0, -1, 0, false, false, 1, 2, 1, Dyes.dyeGray , 1, Collections.singletonList(new MaterialStack(Carbon, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.IGNIS, 1), new TC_AspectStack(TC_Aspects.PERDITIO, 1))); - public static Materials DeepIron = new Materials( 829, TextureSet.SET_METALLIC , 6.0F, 384, 2, 1|2 |8 |64 , 150, 140, 140, 0, "DeepIron" , "Deep Iron" , 0, 0, 7500, 7500, true, false, 3, 1, 1, Dyes.dyePink , 2, Collections.singletonList(new MaterialStack(Iron, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))); - public static Materials Diamond = new Materials( 500, TextureSet.SET_DIAMOND , 8.0F, 1280, 4, 1 |4|8 |64|128 , 200, 255, 255, 127, "Diamond" , "Diamond" , 0, 0, -1, 0, false, true, 5, 64, 1, Dyes.dyeWhite , 1, Collections.singletonList(new MaterialStack(Carbon, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 3), new TC_AspectStack(TC_Aspects.LUCRUM, 4))); - public static Materials Electrum = new Materials( 303, TextureSet.SET_SHINY , 12.0F, 64, 2, 1|2 |8 |64|128 , 255, 255, 100, 0, "Electrum" , "Electrum" , 0, 0, -1, 0, false, false, 4, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Silver, 1), new MaterialStack(Gold, 1))); - public static Materials Emerald = new Materials( 501, TextureSet.SET_EMERALD , 7.0F, 256, 4, 1 |4|8 |64 , 80, 255, 80, 127, "Emerald" , "Emerald" , 0, 0, -1, 0, false, true, 5, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(Beryllium, 3), new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 6), new MaterialStack(Oxygen, 18)), Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 3), new TC_AspectStack(TC_Aspects.LUCRUM, 5))); - public static Materials FreshWater = new Materials( -1, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 0, 0, 255, 0, "FreshWater" , "Fresh Water" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlue , 0, Arrays.asList(new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 1)), Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 2))); - public static Materials Galena = new Materials( 830, TextureSet.SET_DULL , 1.0F, 0, 3, 1 |8 , 100, 60, 100, 0, "Galena" , "Galena" , 0, 0, -1, 0, false, false, 4, 1, 1, Dyes.dyePurple , 1, Arrays.asList(new MaterialStack(Lead, 1), new MaterialStack(Sulfur, 1))); - public static Materials Garnierite = new Materials( 906, TextureSet.SET_METALLIC , 1.0F, 0, 3, 1 |8 , 50, 200, 70, 0, "Garnierite" , "Garnierite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightBlue , 1, Arrays.asList(new MaterialStack(Nickel, 1), new MaterialStack(Oxygen, 1))); - public static Materials Glyceryl = new Materials( 714, TextureSet.SET_FLUID , 1.0F, 0, 1, 16 , 0, 150, 150, 0, "Glyceryl" , "Glyceryl Trinitrate" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeCyan , 1, Arrays.asList(new MaterialStack(Carbon, 3), new MaterialStack(Hydrogen, 5), new MaterialStack(Nitrogen, 3), new MaterialStack(Oxygen, 9))); - public static Materials GreenSapphire = new MaterialBuilder(504, TextureSet.SET_GEM_HORIZONTAL, "Green Sapphire").setToolSpeed(7.0F).setDurability(256).setToolQuality(2).addDustItems().addGemItems().setTransparent(true).addOreItems().addToolHeadItems().setRGBA(100, 200, 130, 127).setColor(Dyes.dyeCyan).setOreValue(5).setExtraData(0).setMaterialList(new MaterialStack(Aluminium, 2), new MaterialStack(Oxygen, 3)).setAspects(Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 5), new TC_AspectStack(TC_Aspects.VITREUS, 3))).constructMaterial().disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Grossular = new Materials( 831, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 |8 , 200, 100, 0, 0, "Grossular" , "Grossular" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(Calcium, 3), new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 12))); - public static Materials HolyWater = new Materials( 729, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 0, 0, 255, 0, "HolyWater" , "Holy Water" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlue , 0, Arrays.asList(new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 2), new TC_AspectStack(TC_Aspects.AURAM, 1))); - public static Materials Ice = new Materials( 702, TextureSet.SET_SHINY , 1.0F, 0, 0, 1| 16 , 200, 200, 255, 0, "Ice" , "Ice" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlue , 0, Arrays.asList(new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 1)), Collections.singletonList(new TC_AspectStack(TC_Aspects.GELUM, 2))); - public static Materials Ilmenite = new Materials( 918, TextureSet.SET_METALLIC , 1.0F, 0, 3, 1 |8 , 70, 55, 50, 0, "Ilmenite" , "Ilmenite" , 0, 0, -1, 0, false, false, 1, 2, 1, Dyes.dyePurple , 0, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Titanium, 1), new MaterialStack(Oxygen, 3))); - public static Materials Rutile = new Materials( 375, TextureSet.SET_GEM_HORIZONTAL , 1.0F, 0, 2, 1 |8 , 212, 13, 92, 0, "Rutile" , "Rutile" , 0, 0, -1, 0, false, false, 1, 2, 1, Dyes.dyeRed , 0, Arrays.asList(new MaterialStack(Titanium, 1), new MaterialStack(Oxygen, 2))); - public static Materials Bauxite = new Materials( 822, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 200, 100, 0, 0, "Bauxite" , "Bauxite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeBrown , 1, Arrays.asList(new MaterialStack(Rutile, 2), new MaterialStack(Aluminium, 16), new MaterialStack(Hydrogen, 10), new MaterialStack(Oxygen, 11))); - public static Materials Titaniumtetrachloride = new Materials( 376, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 212, 13, 92, 0, "Titaniumtetrachloride" , "Titaniumtetrachloride" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeRed , 0, Arrays.asList(new MaterialStack(Titanium, 1), new MaterialStack(Chlorine, 4))); - public static Materials Magnesiumchloride = new Materials( 377, TextureSet.SET_DULL , 1.0F, 0, 2, 1|16 , 212, 13, 92, 0, "Magnesiumchloride" , "Magnesiumchloride" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeRed , 0, Arrays.asList(new MaterialStack(Magnesium, 1), new MaterialStack(Chlorine, 2))); - public static Materials Invar = new Materials( 302, TextureSet.SET_METALLIC , 6.0F, 256, 2, 1|2 |64|128 , 180, 180, 120, 0, "Invar" , "Invar" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBrown , 2, Arrays.asList(new MaterialStack(Iron, 2), new MaterialStack(Nickel, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.GELUM, 1))); - public static Materials Kanthal = new Materials( 312, TextureSet.SET_METALLIC , 6.0F, 64, 2, 1|2 |64 , 194, 210, 223, 0, "Kanthal" , "Kanthal" , 0, 0, 1800, 1800, true, false, 1, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Aluminium, 1), new MaterialStack(Chrome, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Lazurite = new Materials( 524, TextureSet.SET_LAPIS , 1.0F, 0, 1, 1 |4|8 , 100, 120, 255, 0, "Lazurite" , "Lazurite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeCyan , 1, Arrays.asList(new MaterialStack(Aluminium, 6), new MaterialStack(Silicon, 6), new MaterialStack(Calcium, 8), new MaterialStack(Sodium, 8))); - public static Materials Magnalium = new Materials( 313, TextureSet.SET_DULL , 6.0F, 256, 2, 1|2 |64|128 , 200, 190, 255, 0, "Magnalium" , "Magnalium" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Magnesium, 1), new MaterialStack(Aluminium, 2))); - public static Materials Magnesite = new Materials( 908, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 250, 250, 180, 0, "Magnesite" , "Magnesite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyePink , 1, Arrays.asList(new MaterialStack(Magnesium, 1), new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 3))); - public static Materials Magnetite = new Materials( 870, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 30, 30, 30, 0, "Magnetite" , "Magnetite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeGray , 1, Arrays.asList(new MaterialStack(Iron, 3), new MaterialStack(Oxygen, 4)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))); - public static Materials Molybdenite = new Materials( 942, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 25, 25, 25, 0, "Molybdenite" , "Molybdenite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlue , 1, Arrays.asList(new MaterialStack(Molybdenum, 1), new MaterialStack(Sulfur, 2))); // MoS2 (also source of Re) - public static Materials Nichrome = new Materials( 311, TextureSet.SET_METALLIC , 6.0F, 64, 2, 1|2 |64 , 205, 206, 246, 0, "Nichrome" , "Nichrome" , 0, 0, 2700, 2700, true, false, 1, 1, 1, Dyes.dyeRed , 2, Arrays.asList(new MaterialStack(Nickel, 4), new MaterialStack(Chrome, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials NiobiumNitride = new Materials( 359, TextureSet.SET_DULL , 1.0F, 0, 2, 1|2 , 29, 41, 29, 0, "NiobiumNitride" , "Niobium Nitride" , 0, 0, 2573, 2573, true, false, 1, 1, 1, Dyes.dyeBlack , 1, Arrays.asList(new MaterialStack(Niobium, 1), new MaterialStack(Nitrogen, 1))); // Anti-Reflective Material - public static Materials NiobiumTitanium = new Materials( 360, TextureSet.SET_DULL , 1.0F, 0, 2, 1|2 , 29, 29, 41, 0, "NiobiumTitanium" , "Niobium-Titanium" , 0, 0, 4500, 4500, true, false, 1, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Niobium, 1), new MaterialStack(Titanium, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials NitroCarbon = new Materials( 716, TextureSet.SET_FLUID , 1.0F, 0, 1, 16 , 0, 75, 100, 0, "NitroCarbon" , "Nitro-Carbon" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeCyan , 1, Arrays.asList(new MaterialStack(Nitrogen, 1), new MaterialStack(Carbon, 1))); - public static Materials NitrogenDioxide = new Materials( 717, TextureSet.SET_FLUID , 1.0F, 0, 1, 16 , 100, 175, 255, 0, "NitrogenDioxide" , "Nitrogen Dioxide" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeCyan , 1, Arrays.asList(new MaterialStack(Nitrogen, 1), new MaterialStack(Oxygen, 2))); - public static Materials Obsidian = new Materials( 804, TextureSet.SET_DULL , 1.0F, 0, 3, 1 , 80, 50, 100, 0, "Obsidian" , "Obsidian" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack , 1, Arrays.asList(new MaterialStack(Magnesium, 1), new MaterialStack(Iron, 1), new MaterialStack(Silicon, 2), new MaterialStack(Oxygen, 8))); - public static Materials Phosphate = new Materials( 833, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8|16 , 255, 255, 0, 0, "Phosphate" , "Phosphate" , 0, 0, -1, 0, false, false, 2, 1, 1, Dyes.dyeYellow , 1, Arrays.asList(new MaterialStack(Phosphorus, 1), new MaterialStack(Oxygen, 4))); - public static Materials PigIron = new Materials( 307, TextureSet.SET_METALLIC , 6.0F, 384, 2, 1|2 |8 |64 , 200, 180, 180, 0, "PigIron" , "Pig Iron" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyePink , 2, Collections.singletonList(new MaterialStack(Iron, 1))); - public static Materials Plastic = new Materials( 874, TextureSet.SET_DULL , 3.0F, 32, 1, 1|2 |64|128 , 200, 200, 200, 0, "Plastic" , "Polyethylene" , 0, 0, 400, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 0, Arrays.asList(new MaterialStack(Carbon, 1), new MaterialStack(Hydrogen, 2)), Collections.singletonList(new TC_AspectStack(TC_Aspects.MOTUS, 2))); - public static Materials Epoxid = new Materials( 470, TextureSet.SET_DULL , 3.0F, 32, 1, 1|2 |64|128 , 200, 140, 20, 0, "Epoxid" , "Epoxid" , 0, 0, 400, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 0, Arrays.asList(new MaterialStack(Carbon, 21), new MaterialStack(Hydrogen, 24), new MaterialStack(Oxygen, 4)), Collections.singletonList(new TC_AspectStack(TC_Aspects.MOTUS, 2))); - public static Materials Polydimethylsiloxane = new MaterialBuilder(633, TextureSet.SET_FLUID , "Polydimethylsiloxane").addDustItems().setRGB(245, 245, 245).setColor(Dyes.dyeWhite).setMaterialList(new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 6), new MaterialStack(Oxygen, 1), new MaterialStack(Silicon, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials Silicone = new Materials( 471, TextureSet.SET_DULL , 3.0F, 128, 1, 1|2 |64|128 , 220, 220, 220, 0, "Silicone" , "Silicone Rubber" , 0, 0, 900, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 0, Arrays.asList(new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 6), new MaterialStack(Oxygen, 1), new MaterialStack(Silicon, 1)), Collections.singletonList(new TC_AspectStack(TC_Aspects.MOTUS, 2))); - public static Materials Polycaprolactam = new Materials( 472, TextureSet.SET_DULL , 3.0F, 32, 1, 1|2 |64|128 , 50, 50, 50, 0, "Polycaprolactam" , "Polycaprolactam" , 0, 0, 500, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 0, Arrays.asList(new MaterialStack(Carbon, 6), new MaterialStack(Hydrogen, 11), new MaterialStack(Nitrogen, 1), new MaterialStack(Oxygen, 1)), Collections.singletonList(new TC_AspectStack(TC_Aspects.MOTUS, 2))); - public static Materials Polytetrafluoroethylene = new Materials( 473, TextureSet.SET_DULL , 3.0F, 32, 1, 1|2 |64|128 , 100, 100, 100, 0, "Polytetrafluoroethylene" , "Polytetrafluoroethylene" , 0, 0, 1400, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 0, Arrays.asList(new MaterialStack(Carbon, 2), new MaterialStack(Fluorine, 4)), Collections.singletonList(new TC_AspectStack(TC_Aspects.MOTUS, 2))); - public static Materials Powellite = new Materials( 883, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 255, 255, 0, 0, "Powellite" , "Powellite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Molybdenum, 1), new MaterialStack(Oxygen, 4))); - public static Materials Pumice = new Materials( 926, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 230, 185, 185, 0, "Pumice" , "Pumice" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeGray , 2, Collections.singletonList(new MaterialStack(Stone, 1))); - public static Materials Pyrite = new Materials( 834, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 |8 , 150, 120, 40, 0, "Pyrite" , "Pyrite" , 0, 0, -1, 0, false, false, 2, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Sulfur, 2))); - public static Materials Pyrolusite = new Materials( 943, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 150, 150, 170, 0, "Pyrolusite" , "Pyrolusite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , 1, Arrays.asList(new MaterialStack(Manganese, 1), new MaterialStack(Oxygen, 2))); - public static Materials Pyrope = new Materials( 835, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 120, 50, 100, 0, "Pyrope" , "Pyrope" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyePurple , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Magnesium, 3), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 12))); - public static Materials RockSalt = new Materials( 944, TextureSet.SET_FINE , 1.0F, 0, 1, 1 |8 , 240, 200, 200, 0, "RockSalt" , "Rock Salt" , 0, 0, -1, 0, false, false, 2, 1, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Chlorine, 1))); - public static Materials Rubber = new Materials( 880, TextureSet.SET_SHINY , 1.5F, 32, 0, 1|2 |64|128 , 0, 0, 0, 0, "Rubber" , "Rubber" , 0, 0, 400, 0, false, false, 1, 1, 1, Dyes.dyeBlack , 0, Arrays.asList(new MaterialStack(Carbon, 5), new MaterialStack(Hydrogen, 8)), Collections.singletonList(new TC_AspectStack(TC_Aspects.MOTUS, 2))); - public static Materials RawRubber = new Materials( 896, TextureSet.SET_DULL , 1.0F, 0, 0, 1 , 204, 199, 137, 0, "RawRubber" , "Raw Rubber" , 0, 0, 400, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 0, Arrays.asList(new MaterialStack(Carbon, 5), new MaterialStack(Hydrogen, 8)), Collections.singletonList(new TC_AspectStack(TC_Aspects.MOTUS, 2))); - public static Materials Ruby = new Materials( 502, TextureSet.SET_RUBY , 7.0F, 256, 2, 1 |4|8 |64 , 255, 100, 100, 127, "Ruby" , "Ruby" , 0, 0, -1, 0, false, true, 5, 1, 1, Dyes.dyeRed , 1, Arrays.asList(new MaterialStack(Chrome, 1), new MaterialStack(Aluminium, 2), new MaterialStack(Oxygen, 3)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 6), new TC_AspectStack(TC_Aspects.VITREUS, 4))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Salt = new Materials( 817, TextureSet.SET_FINE , 1.0F, 0, 1, 1 |8 , 250, 250, 250, 0, "Salt" , "Salt" , 0, 0, -1, 0, false, false, 2, 1, 1, Dyes.dyeWhite , 0, Arrays.asList(new MaterialStack(Sodium, 1), new MaterialStack(Chlorine, 1))); - public static Materials Saltpeter = new Materials( 836, TextureSet.SET_FINE , 1.0F, 0, 1, 1 |8 , 230, 230, 230, 0, "Saltpeter" , "Saltpeter" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Nitrogen, 1), new MaterialStack(Oxygen, 3))); - public static Materials Sapphire = new MaterialBuilder(503, TextureSet.SET_GEM_VERTICAL, "Sapphire").setToolSpeed(7.0F).setDurability(256).setToolQuality(2).addDustItems().addGemItems().setTransparent(true).addOreItems().addToolHeadItems().setRGBA(100, 100, 200, 127).setColor(Dyes.dyeBlue).setOreValue(5).setExtraData(0).setMaterialList(new MaterialStack(Aluminium, 2), new MaterialStack(Oxygen, 3)).setAspects(Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 5), new TC_AspectStack(TC_Aspects.VITREUS, 3))).constructMaterial().disableAutoGeneratedBlastFurnaceRecipes(); - //public static Materials Sapphire = new Materials( 503, TextureSet.SET_GEM_VERTICAL , 7.0F, 256, 2, 1 |4|8 |64 , 100, 100, 200, 127, "Sapphire" , "Sapphire" , 0, 0, -1, 0, false, true, 5, 1, 1, Dyes.dyeBlue , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Oxygen, 3)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 5), new TC_AspectStack(TC_Aspects.VITREUS, 3))); - public static Materials Scheelite = new Materials( 910, TextureSet.SET_DULL , 1.0F, 0, 3, 1 |8 , 200, 140, 20, 0, "Scheelite" , "Scheelite" , 0, 0, 2500, 2500, false, false, 4, 1, 1, Dyes.dyeBlack , 0, Arrays.asList(new MaterialStack(Tungsten, 1), new MaterialStack(Calcium, 1), new MaterialStack(Oxygen, 4))); - public static Materials Snow = new Materials( 728, TextureSet.SET_FINE , 1.0F, 0, 0, 1| 16 , 250, 250, 250, 0, "Snow" , "Snow" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 0, Arrays.asList(new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 1)), Collections.singletonList(new TC_AspectStack(TC_Aspects.GELUM, 1))); - public static Materials Sodalite = new Materials( 525, TextureSet.SET_LAPIS , 1.0F, 0, 1, 1 |4|8 , 20, 20, 255, 0, "Sodalite" , "Sodalite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeBlue , 1, Arrays.asList(new MaterialStack(Aluminium, 3), new MaterialStack(Silicon, 3), new MaterialStack(Sodium, 4), new MaterialStack(Chlorine, 1))); - public static Materials SodiumPersulfate = new Materials( 718, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 255, 255, 255, 0, "SodiumPersulfate" , "Sodium Persulfate" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(Sodium, 2), new MaterialStack(Sulfur, 2), new MaterialStack(Oxygen, 8))); - public static Materials SodiumSulfide = new Materials( 719, TextureSet.SET_FLUID , 1.0F, 0, 2, 1 , 255, 230, 128, 0, "SodiumSulfide" , "Sodium Sulfide" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(Sodium, 2), new MaterialStack(Sulfur, 1))); - public static Materials HydricSulfide = new Materials( 460, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 255, 255, 255, 0, "HydricSulfide" , "Hydrogen Sulfide" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(Hydrogen, 2), new MaterialStack(Sulfur, 1))); - - public static Materials OilHeavy = new Materials( 730, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 10, 10, 10, 0, "OilHeavy" , "Heavy Oil" , 3, 40, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack ); - public static Materials OilMedium = new Materials( 731, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 10, 10, 10, 0, "OilMedium" , "Raw Oil" , 3, 30, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack ); - public static Materials OilLight = new Materials( 732, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 10, 10, 10, 0, "OilLight" , "Light Oil" , 3, 20, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack ); - - public static Materials NatruralGas = new Materials( 733, TextureSet.SET_FLUID , 1.0F, 0, 1, 16 , 255, 255, 255, 0, "NatruralGas" , "Natural Gas" , 1, 20, -1, 0, false, false, 3, 1, 1, Dyes.dyeWhite ); - public static Materials SulfuricGas = new Materials( 734, TextureSet.SET_FLUID , 1.0F, 0, 1, 16 , 255, 255, 255, 0, "SulfuricGas" , "Sulfuric Gas" , 1, 25, -1, 0, false, false, 3, 1, 1, Dyes.dyeWhite ); - public static Materials Gas = new Materials( 735, TextureSet.SET_FLUID , 1.0F, 0, 1, 16 , 255, 255, 255, 0, "Gas" , "Refinery Gas" , 1, 160, -1, 0, false, false, 3, 1, 1, Dyes.dyeWhite).setCanBeCracked(true); - public static Materials SulfuricNaphtha = new Materials( 736, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 255, 0, 0, "SulfuricNaphtha" , "Sulfuric Naphtha" , 1, 40, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow ); - public static Materials SulfuricLightFuel = new Materials( 737, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 255, 0, 0, "SulfuricLightFuel" , "Sulfuric Light Fuel" , 0, 40, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow ); - public static Materials SulfuricHeavyFuel = new Materials( 738, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 255, 0, 0, "SulfuricHeavyFuel" , "Sulfuric Heavy Fuel" , 3, 40, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack ); - public static Materials Naphtha = new Materials( 739, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 255, 0, 0, "Naphtha" , "Naphtha" , 1, 320, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow).setCanBeCracked(true); - public static Materials LightFuel = new Materials( 740, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 255, 0, 0, "LightFuel" , "Light Fuel" , 0, 305, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow).setCanBeCracked(true); - public static Materials HeavyFuel = new Materials( 741, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 255, 0, 0, "HeavyFuel" , "Heavy Fuel" , 3, 240, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack).setCanBeCracked(true); - public static Materials LPG = new Materials( 742, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 255, 0, 0, "LPG" , "LPG" , 1, 320, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow ); - - public static Materials FluidNaquadahFuel = new MaterialBuilder(600, TextureSet.SET_FLUID , "Naquadah Fuel").setName("FluidNaqudahFuel").addCell().addFluid().setRGB(62, 62, 62).setColor(Dyes.dyeBlack).constructMaterial(); - public static Materials EnrichedNaquadria = new MaterialBuilder(601, TextureSet.SET_FLUID , "Enriched Naquadria").setName("EnrichedNaquadria").addCell().addFluid().setRGB(52, 52, 52).setColor(Dyes.dyeBlack).constructMaterial(); - - public static Materials ReinforceGlass = new MaterialBuilder(602, TextureSet.SET_FLUID , "Molten Reinforced Glass").setName("ReinforcedGlass").addCell().addFluid().setRGB(192, 245, 254).setColor(Dyes.dyeWhite).setLiquidTemperature(2000).constructMaterial(); - public static Materials BioMediumRaw = new MaterialBuilder(603, TextureSet.SET_FLUID , "Raw Bio Catalyst Medium").setName("BioMediumRaw").addCell().addFluid().setRGB(97, 147, 46).setColor(Dyes.dyeLime).constructMaterial(); - public static Materials BioMediumSterilized = new MaterialBuilder(604, TextureSet.SET_FLUID , "Sterilized Bio Catalyst Medium").setName("BiohMediumSterilized").addCell().addFluid().setRGB(162, 253, 53).setColor(Dyes.dyeLime).constructMaterial(); - - public static Materials Chlorobenzene = new MaterialBuilder(605, TextureSet.SET_FLUID , "Chlorobenzene").addCell().addFluid().setRGB(0, 50, 65).setColor(Dyes.dyeGray).setMaterialList(new MaterialStack(Carbon, 6), new MaterialStack(Hydrogen, 5), new MaterialStack(Chlorine, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials DilutedHydrochloricAcid = new MaterialBuilder(606, TextureSet.SET_FLUID , "Diluted Hydrochloric Acid").setName("DilutedHydrochloricAcid_GT5U").addCell().addFluid().setRGB(153, 167, 163).setColor(Dyes.dyeLightGray).setMaterialList(new MaterialStack(Hydrogen, 1), new MaterialStack(Chlorine, 1)).constructMaterial(); - public static Materials Pyrochlore = new MaterialBuilder(607, TextureSet.SET_METALLIC , "Pyrochlore").addDustItems().addOreItems().setRGB(43, 17, 0).setColor(Dyes.dyeBlack).setMaterialList(new MaterialStack(Calcium, 2), new MaterialStack(Niobium, 2), new MaterialStack(Oxygen, 7)).addElectrolyzerRecipe().constructMaterial(); - - public static Materials GrowthMediumRaw = new MaterialBuilder(608, TextureSet.SET_FLUID , "Raw Growth Catalyst Medium").setName("GrowthMediumRaw").addCell().addFluid().setRGB(211, 141, 95).setColor(Dyes.dyeOrange).constructMaterial(); - public static Materials GrowthMediumSterilized = new MaterialBuilder(609, TextureSet.SET_FLUID , "Growth Catalyst Medium").setName("GrowthMediumSterilized").addCell().addFluid().setRGB(222, 170, 135).setColor(Dyes.dyeOrange).constructMaterial(); - - public static Materials FerriteMixture = new MaterialBuilder(612, TextureSet.SET_METALLIC , "Ferrite Mixture").addDustItems().setRGB(180, 180, 180).setColor(Dyes.dyeGray).setMaterialList(new MaterialStack(Nickel, 1), new MaterialStack(Zinc, 1), new MaterialStack(Iron, 4)).constructMaterial(); - public static Materials NickelZincFerrite = new MaterialBuilder(613, TextureSet.SET_ROUGH , "Nickel-Zinc Ferrite").addDustItems().addMetalItems().addToolHeadItems().addGearItems().setToolSpeed(3.0f).setDurability(32).setRGB(60, 60, 60).setColor(Dyes.dyeBlack).setBlastFurnaceRequired(true).setBlastFurnaceTemp(1500).setMaterialList(new MaterialStack(Nickel, 1), new MaterialStack(Zinc, 1), new MaterialStack(Iron, 4), new MaterialStack(Oxygen, 8)).constructMaterial(); - - public static Materials Massicot = new MaterialBuilder(614, TextureSet.SET_DULL , "Massicot").addDustItems().setRGB(255, 221, 85).setColor(Dyes.dyeYellow).setMaterialList(new MaterialStack(Lead, 1), new MaterialStack(Oxygen, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials ArsenicTrioxide = new MaterialBuilder(615, TextureSet.SET_SHINY , "Arsenic Trioxide").addDustItems().setRGB(255, 255, 255).setColor(Dyes.dyeGreen).setMaterialList(new MaterialStack(Arsenic, 2), new MaterialStack(Oxygen, 3)).addElectrolyzerRecipe().constructMaterial(); - public static Materials CobaltOxide = new MaterialBuilder(616, TextureSet.SET_DULL , "Cobalt Oxide").addDustItems().setRGB(102, 128, 0).setColor(Dyes.dyeGreen).setMaterialList(new MaterialStack(Cobalt, 1), new MaterialStack(Oxygen, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials Zincite = new MaterialBuilder(617, TextureSet.SET_DULL , "Zincite").addDustItems().setRGB(255, 255, 245).setColor(Dyes.dyeWhite).setMaterialList(new MaterialStack(Zinc, 1), new MaterialStack(Oxygen, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials AntimonyTrioxide = new MaterialBuilder(618, TextureSet.SET_DULL , "Antimony Trioxide").addDustItems().setRGB(230, 230, 240).setColor(Dyes.dyeWhite).setMaterialList(new MaterialStack(Antimony, 2), new MaterialStack(Oxygen, 3)).addElectrolyzerRecipe().constructMaterial(); - public static Materials CupricOxide = new MaterialBuilder(619, TextureSet.SET_DULL , "Cupric Oxide").addDustItems().setRGB(15, 15, 15).setColor(Dyes.dyeBlack).setMeltingPoint(1599).setMaterialList(new MaterialStack(Copper, 1), new MaterialStack(Oxygen, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials Ferrosilite = new MaterialBuilder(620, TextureSet.SET_DULL , "Ferrosilite").addDustItems().setRGB(151, 99, 42).setColor(Dyes.dyeBrown).setMaterialList(new MaterialStack(Iron, 1), new MaterialStack(Silicon, 1), new MaterialStack(Oxygen, 3)).addElectrolyzerRecipe().constructMaterial(); - - public static Materials Magnesia = new MaterialBuilder(621, TextureSet.SET_DULL , "Magnesia").addDustItems().setRGB(255, 225, 225).setColor(Dyes.dyeWhite).setMaterialList(new MaterialStack(Magnesium, 1), new MaterialStack(Oxygen, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials Quicklime = new MaterialBuilder(622, TextureSet.SET_DULL , "Quicklime").addDustItems().setRGB(240, 240, 240).setColor(Dyes.dyeWhite).setMaterialList(new MaterialStack(Calcium, 1), new MaterialStack(Oxygen, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials Potash = new MaterialBuilder(623, TextureSet.SET_DULL , "Potash").addDustItems().setRGB(120, 66, 55).setColor(Dyes.dyeBrown).setMaterialList(new MaterialStack(Potassium, 2), new MaterialStack(Oxygen, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials SodaAsh = new MaterialBuilder(624, TextureSet.SET_DULL , "Soda Ash").addDustItems().setRGB(220, 220, 255).setColor(Dyes.dyeWhite).setMaterialList(new MaterialStack(Sodium, 2), new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 3)).addElectrolyzerRecipe().constructMaterial(); - - public static Materials BioDiesel = new MaterialBuilder(627, TextureSet.SET_FLUID , "Bio Diesel").addCell().addFluid().setRGB(255, 128, 0).setColor(Dyes.dyeOrange).setFuelType(MaterialBuilder.DIESEL).setFuelPower(320).constructMaterial(); - public static Materials NitrationMixture = new MaterialBuilder(628, TextureSet.SET_FLUID , "Nitration Mixture").addCell().setRGB(230, 226, 171).setColor(Dyes.dyeBrown).constructMaterial(); - public static Materials Glycerol = new MaterialBuilder(629, TextureSet.SET_FLUID , "Glycerol").addCell().addFluid().setRGB(135, 222, 135).setColor(Dyes.dyeLime).setFuelType(MaterialBuilder.SEMIFLUID).setFuelType(164).setMaterialList(new MaterialStack(Carbon, 3), new MaterialStack(Hydrogen, 8), new MaterialStack(Oxygen, 3)).addElectrolyzerRecipe().constructMaterial(); - public static Materials SodiumBisulfate = new MaterialBuilder(630, TextureSet.SET_FLUID , "Sodium Bisulfate").addDustItems().setRGB(0, 68, 85).setColor(Dyes.dyeBlue).setMaterialList(new MaterialStack(Sodium, 1), new MaterialStack(Hydrogen, 1), new MaterialStack(Sulfur, 1), new MaterialStack(Oxygen, 4)).constructMaterial(); - public static Materials PolyphenyleneSulfide = new MaterialBuilder(631, TextureSet.SET_DULL , "Polyphenylene Sulfide").addDustItems().addMetalItems().addToolHeadItems().addGearItems().setToolSpeed(3.0f).setDurability(32).setToolQuality(1).setRGB(170, 136, 0).setColor(Dyes.dyeBrown).setMaterialList(new MaterialStack(Carbon, 6), new MaterialStack(Hydrogen, 4), new MaterialStack(Sulfur, 1)).constructMaterial(); - public static Materials Dichlorobenzene = new MaterialBuilder(632, TextureSet.SET_FLUID , "Dichlorobenzene").addCell().addFluid().setRGB(0, 68, 85).setColor(Dyes.dyeBlue).setMaterialList(new MaterialStack(Carbon, 6), new MaterialStack(Hydrogen, 4), new MaterialStack(Chlorine, 2)).addElectrolyzerRecipe().constructMaterial(); - public static Materials Polystyrene = new MaterialBuilder(636, TextureSet.SET_DULL , "Polystyrene").addDustItems().addMetalItems().addToolHeadItems().addGearItems().setToolSpeed(3.0f).setDurability(32).setToolQuality(1).setRGB(190, 180, 170).setColor(Dyes.dyeLightGray).setMaterialList(new MaterialStack(Carbon, 8), new MaterialStack(Hydrogen, 8)).constructMaterial(); - public static Materials Styrene = new MaterialBuilder(637, TextureSet.SET_FLUID , "Styrene").addCell().addFluid().setRGB(210, 200, 190).setColor(Dyes.dyeBlack).setMaterialList(new MaterialStack(Carbon, 8), new MaterialStack(Hydrogen, 8)).addElectrolyzerRecipe().constructMaterial(); - public static Materials Isoprene = new MaterialBuilder(638, TextureSet.SET_FLUID , "Isoprene").addCell().addFluid().setRGB(20, 20, 20).setColor(Dyes.dyeBlack).setMaterialList(new MaterialStack(Carbon, 5), new MaterialStack(Hydrogen, 8)).addElectrolyzerRecipe().constructMaterial(); - public static Materials Tetranitromethane = new MaterialBuilder(639, TextureSet.SET_FLUID , "Tetranitromethane").addCell().addFluid().setRGB(15, 40, 40).setColor(Dyes.dyeBlack).setMaterialList(new MaterialStack(Carbon, 1), new MaterialStack(Nitrogen, 4), new MaterialStack(Oxygen, 8)).addElectrolyzerRecipe().constructMaterial(); - public static Materials Ethenone = new MaterialBuilder(641, TextureSet.SET_FLUID , "Ethenone").addCell().addGas().setRGB(20, 20, 70).setColor(Dyes.dyeBlack).setMaterialList(new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials Ethane = new MaterialBuilder(642, TextureSet.SET_FLUID , "Ethane").addCell().addGas().setRGB(200, 200, 255).setColor(Dyes.dyeLightBlue).setFuelType(MaterialBuilder.GAS).setFuelPower(168).setMaterialList(new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 6)).addElectrolyzerRecipe().setCanBeCracked(true).constructMaterial(); - public static Materials Propane = new MaterialBuilder(643, TextureSet.SET_FLUID , "Propane").addCell().addGas().setRGB(250, 226, 80).setColor(Dyes.dyeYellow).setFuelType(MaterialBuilder.GAS).setFuelPower(232).setMaterialList(new MaterialStack(Carbon, 3), new MaterialStack(Hydrogen, 8)).addElectrolyzerRecipe().setCanBeCracked(true).constructMaterial(); - public static Materials Butane = new MaterialBuilder(644, TextureSet.SET_FLUID , "Butane").addCell().addGas().setRGB(182, 55, 30).setColor(Dyes.dyeOrange).setFuelType(MaterialBuilder.GAS).setFuelPower(296).setMaterialList(new MaterialStack(Carbon, 4), new MaterialStack(Hydrogen, 10)).addElectrolyzerRecipe().setCanBeCracked(true).constructMaterial(); - public static Materials Butene = new MaterialBuilder(645, TextureSet.SET_FLUID , "Butene").addCell().addGas().setRGB(207, 80, 5).setColor(Dyes.dyeOrange).setFuelType(MaterialBuilder.GAS).setFuelPower(256).setMaterialList(new MaterialStack(Carbon, 4), new MaterialStack(Hydrogen, 8)).addElectrolyzerRecipe().setCanBeCracked(true).constructMaterial(); - public static Materials Butadiene = new MaterialBuilder(646, TextureSet.SET_FLUID , "Butadiene").addCell().addGas().setRGB(232, 105, 0).setColor(Dyes.dyeOrange).setFuelType(MaterialBuilder.GAS).setFuelPower(206).setMaterialList(new MaterialStack(Carbon, 4), new MaterialStack(Hydrogen, 6)).addElectrolyzerRecipe().setCanBeCracked(true).constructMaterial(); - public static Materials RawStyreneButadieneRubber = new MaterialBuilder(634, TextureSet.SET_SHINY , "Raw Styrene-Butadiene Rubber").addDustItems().setRGB(84, 64, 61).setColor(Dyes.dyeGray).setMaterialList(new MaterialStack(Styrene, 1), new MaterialStack(Butadiene, 3)).constructMaterial(); - public static Materials StyreneButadieneRubber = new MaterialBuilder(635, TextureSet.SET_SHINY , "Styrene-Butadiene Rubber").addDustItems().addMetalItems().addToolHeadItems().addGearItems().setToolSpeed(3.0f).setDurability(128).setToolQuality(1).setRGB(33, 26, 24).setColor(Dyes.dyeBlack).setMaterialList(new MaterialStack(Styrene, 1), new MaterialStack(Butadiene, 3)).constructMaterial(); - public static Materials Toluene = new MaterialBuilder(647, TextureSet.SET_FLUID , "Toluene").addCell().setRGB(80, 29, 5).setColor(Dyes.dyeBrown).setFuelType(MaterialBuilder.GAS).setFuelPower(328).setMaterialList(new MaterialStack(Carbon, 7), new MaterialStack(Hydrogen, 8)).addElectrolyzerRecipe().constructMaterial(); - public static Materials Epichlorohydrin = new MaterialBuilder(648, TextureSet.SET_FLUID , "Epichlorohydrin").addCell().setRGB(80, 29, 5).setColor(Dyes.dyeBrown).setMaterialList(new MaterialStack(Carbon, 3), new MaterialStack(Hydrogen, 5), new MaterialStack(Chlorine, 1), new MaterialStack(Oxygen, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials PolyvinylChloride = new MaterialBuilder(649, TextureSet.SET_DULL , "Polyvinyl Chloride").addDustItems().addMetalItems().addToolHeadItems().addGearItems().setToolSpeed(3.0f).setDurability(32).setToolQuality(1).setRGB(215, 230, 230).setColor(Dyes.dyeLightGray).setMaterialList(new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 3), new MaterialStack(Chlorine, 1)).constructMaterial(); - public static Materials VinylChloride = new MaterialBuilder(650, TextureSet.SET_FLUID , "Vinyl Chloride").addCell().addGas().setRGB(225, 240, 240).setColor(Dyes.dyeLightGray).setMaterialList(new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 3), new MaterialStack(Chlorine, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials SulfurDioxide = new MaterialBuilder(651, TextureSet.SET_FLUID , "Sulfur Dioxide").addCell().addGas().setRGB(200, 200, 25).setColor(Dyes.dyeYellow).setMaterialList(new MaterialStack(Sulfur, 1), new MaterialStack(Oxygen, 2)).constructMaterial(); - public static Materials SulfurTrioxide = new MaterialBuilder(652, TextureSet.SET_FLUID , "Sulfur Trioxide").addCell().addGas().setGasTemperature(344).setRGB(160, 160, 20).setColor(Dyes.dyeYellow).setMaterialList(new MaterialStack(Sulfur, 1), new MaterialStack(Oxygen, 3)).addElectrolyzerRecipe().constructMaterial(); - public static Materials NitricAcid = new MaterialBuilder(653, TextureSet.SET_FLUID , "Nitric Acid").addCell().addFluid().setRGB(230, 226, 171).setMaterialList(new MaterialStack(Hydrogen, 1), new MaterialStack(Nitrogen, 1), new MaterialStack(Oxygen, 3)).addElectrolyzerRecipe().constructMaterial(); - public static Materials Dimethylhydrazine = new MaterialBuilder(654, TextureSet.SET_FLUID , "1,1-Dimethylhydrazine").addCell().addFluid().setRGB(0, 0, 85).setColor(Dyes.dyeBlue).setMaterialList(new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 8), new MaterialStack(Nitrogen, 2)).addElectrolyzerRecipe().constructMaterial(); - public static Materials Chloramine = new MaterialBuilder(655, TextureSet.SET_FLUID , "Chloramine").addCell().addFluid().setRGB(63, 159, 128).setColor(Dyes.dyeCyan).setMaterialList(new MaterialStack(Nitrogen, 1), new MaterialStack(Hydrogen, 2), new MaterialStack(Chlorine, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials Dimethylamine = new MaterialBuilder(656, TextureSet.SET_FLUID , "Dimethylamine").addCell().addGas().setRGB(85, 68, 105).setColor(Dyes.dyeGray).setMaterialList(new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 7), new MaterialStack(Nitrogen, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials DinitrogenTetroxide = new MaterialBuilder(657, TextureSet.SET_FLUID , "Dinitrogen Tetroxide").addCell().addGas().setRGB(0, 65, 132).setColor(Dyes.dyeBlue).setMaterialList(new MaterialStack(Nitrogen, 2), new MaterialStack(Oxygen, 4)).addElectrolyzerRecipe().constructMaterial(); - public static Materials NitricOxide = new MaterialBuilder(658, TextureSet.SET_FLUID , "Nitric Oxide").addCell().addGas().setRGB(125, 200, 240).setColor(Dyes.dyeCyan).setMaterialList(new MaterialStack(Nitrogen, 1), new MaterialStack(Oxygen, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials Ammonia = new MaterialBuilder(659, TextureSet.SET_FLUID , "Ammonia").addCell().addGas().setRGB(63, 52, 128).setColor(Dyes.dyeBlue).setMaterialList(new MaterialStack(Nitrogen, 1), new MaterialStack(Hydrogen, 3)).addElectrolyzerRecipe().constructMaterial(); - public static Materials Dimethyldichlorosilane = new MaterialBuilder(663, TextureSet.SET_FLUID , "Dimethyldichlorosilane").addCell().addFluid().setRGB(68, 22, 80).setColor(Dyes.dyePurple).setMaterialList(new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 6), new MaterialStack(Chlorine, 2), new MaterialStack(Silicon, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials Chloromethane = new MaterialBuilder(664, TextureSet.SET_FLUID , "Chloromethane").addCell().addGas().setRGB(200, 44, 160).setColor(Dyes.dyeMagenta).setMaterialList(new MaterialStack(Carbon, 1), new MaterialStack(Hydrogen, 3), new MaterialStack(Chlorine, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials PhosphorousPentoxide = new MaterialBuilder(665, TextureSet.SET_FLUID , "Phosphorous Pentoxide").addCell().addDustItems().setRGB(220, 220, 0).setColor(Dyes.dyeYellow).setMaterialList(new MaterialStack(Phosphorus, 4), new MaterialStack(Oxygen, 10)).addElectrolyzerRecipe().constructMaterial(); - public static Materials Tetrafluoroethylene = new MaterialBuilder(666, TextureSet.SET_FLUID , "Tetrafluoroethylene").addCell().addGas().setRGB(125, 125, 125).setColor(Dyes.dyeGray).setMaterialList(new MaterialStack(Carbon, 2), new MaterialStack(Fluorine, 4)).addElectrolyzerRecipe().constructMaterial(); - public static Materials HydrofluoricAcid = new MaterialBuilder(667, TextureSet.SET_FLUID , "Hydrofluoric Acid").setName("HydrofluoricAcid_GT5U").addCell().addFluid().setRGB(0, 136, 170).setColor(Dyes.dyeLightBlue).setMaterialList(new MaterialStack(Hydrogen, 1), new MaterialStack(Fluorine, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials Chloroform = new MaterialBuilder(668, TextureSet.SET_FLUID , "Chloroform").addCell().addFluid().setRGB(137, 44, 160).setColor(Dyes.dyePurple).setMaterialList(new MaterialStack(Carbon, 1), new MaterialStack(Hydrogen, 1), new MaterialStack(Chlorine, 3)).addElectrolyzerRecipe().constructMaterial(); - public static Materials BisphenolA = new MaterialBuilder(669, TextureSet.SET_FLUID , "Bisphenol A").addCell().setRGB(212, 170, 0).setColor(Dyes.dyeBrown).setMaterialList(new MaterialStack(Carbon, 15), new MaterialStack(Hydrogen, 16), new MaterialStack(Oxygen, 2)).addElectrolyzerRecipe().constructMaterial(); - public static Materials AceticAcid = new MaterialBuilder(670, TextureSet.SET_FLUID , "Acetic Acid").addCell().addFluid().setRGB(200, 180, 160).setColor(Dyes.dyeWhite).setMaterialList(new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 4), new MaterialStack(Oxygen, 2)).addElectrolyzerRecipe().constructMaterial(); - public static Materials CalciumAcetateSolution = new MaterialBuilder(671, TextureSet.SET_RUBY , "Calcium Acetate Solution").addCell().addFluid().setRGB(220, 200, 180).setColor(Dyes.dyeCyan).setMaterialList(new MaterialStack(Calcium, 1), new MaterialStack(Carbon, 4), new MaterialStack(Oxygen, 4), new MaterialStack(Hydrogen, 6)).addElectrolyzerRecipe().constructMaterial(); - public static Materials Acetone = new MaterialBuilder(672, TextureSet.SET_FLUID , "Acetone").addCell().addFluid().setRGB(175, 175, 175).setColor(Dyes.dyeWhite).setMaterialList(new MaterialStack(Carbon, 3), new MaterialStack(Hydrogen, 6), new MaterialStack(Oxygen, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials Methanol = new MaterialBuilder(673, TextureSet.SET_FLUID , "Methanol").addCell().addFluid().setRGB(170, 136, 0).setColor(Dyes.dyeBrown).setFuelPower(84).setMaterialList(new MaterialStack(Carbon, 1), new MaterialStack(Hydrogen, 4), new MaterialStack(Oxygen, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials CarbonMonoxide = new MaterialBuilder(674, TextureSet.SET_FLUID , "Carbon Monoxide").addCell().addGas().setRGB(14, 72, 128).setColor(Dyes.dyeBrown).setFuelType(MaterialBuilder.GAS).setFuelPower(24).setMaterialList(new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials MetalMixture = new MaterialBuilder(676, TextureSet.SET_METALLIC , "Metal Mixture").addDustItems().setRGB(80, 45, 22).setColor(Dyes.dyeBrown).constructMaterial(); - public static Materials Ethylene = new MaterialBuilder(677, TextureSet.SET_FLUID , "Ethylene").addCell().addGas().setRGB(225, 225, 225).setColor(Dyes.dyeWhite).setFuelType(MaterialBuilder.GAS).setFuelPower(128).setMaterialList(new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 4)).addElectrolyzerRecipe().setCanBeCracked(true).constructMaterial(); - public static Materials Propene = new MaterialBuilder(678, TextureSet.SET_FLUID , "Propene").addCell().addGas().setRGB(255, 221, 85).setColor(Dyes.dyeYellow).setFuelType(MaterialBuilder.GAS).setFuelPower(192).setMaterialList(new MaterialStack(Carbon, 3), new MaterialStack(Hydrogen, 6)).addElectrolyzerRecipe().setCanBeCracked(true).constructMaterial(); - public static Materials VinylAcetate = new MaterialBuilder(679, TextureSet.SET_FLUID , "Vinyl Acetate").addCell().addFluid().setRGB(255, 179, 128).setColor(Dyes.dyeOrange).setMaterialList(new MaterialStack(Carbon, 4), new MaterialStack(Hydrogen, 6), new MaterialStack(Oxygen, 2)).addElectrolyzerRecipe().constructMaterial(); - public static Materials PolyvinylAcetate = new MaterialBuilder(680, TextureSet.SET_FLUID , "Polyvinyl Acetate").addCell().addFluid().setRGB(255, 153, 85).setColor(Dyes.dyeOrange).setMaterialList(new MaterialStack(Carbon, 4), new MaterialStack(Hydrogen, 6), new MaterialStack(Oxygen, 2)).constructMaterial(); - public static Materials MethylAcetate = new MaterialBuilder(681, TextureSet.SET_FLUID , "Methyl Acetate").addCell().addFluid().setRGB(238, 198, 175).setColor(Dyes.dyeOrange).setMaterialList(new MaterialStack(Carbon, 3), new MaterialStack(Hydrogen, 6), new MaterialStack(Oxygen, 2)).addElectrolyzerRecipe().constructMaterial(); - public static Materials AllylChloride = new MaterialBuilder(682, TextureSet.SET_FLUID , "Allyl Chloride").addCell().addFluid().setRGB(135, 222, 170).setColor(Dyes.dyeCyan).setMaterialList(new MaterialStack(Carbon, 3), new MaterialStack(Hydrogen, 5), new MaterialStack(Chlorine, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials HydrochloricAcid = new MaterialBuilder(683, TextureSet.SET_FLUID , "Hydrochloric Acid").setName("HydrochloricAcid_GT5U").addCell().addFluid().setRGB(183, 200, 196).setColor(Dyes.dyeLightGray).setMaterialList(new MaterialStack(Hydrogen, 1), new MaterialStack(Chlorine, 1)).constructMaterial(); - public static Materials HypochlorousAcid = new MaterialBuilder(684, TextureSet.SET_FLUID , "Hypochlorous Acid").addCell().addFluid().setRGB(111, 138, 145).setColor(Dyes.dyeGray).setMaterialList(new MaterialStack(Hydrogen, 1), new MaterialStack(Chlorine, 1), new MaterialStack(Oxygen, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials SodiumOxide = new MaterialBuilder(744, TextureSet.SET_DULL , "Sodium Oxide").setName("SodiumOxide").addDustItems().setRGB(255, 255, 235).setColor(Dyes.dyeWhite).setMaterialList(new MaterialStack(Sodium, 2), new MaterialStack(Oxygen, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials SodiumHydroxide = new MaterialBuilder(685, TextureSet.SET_DULL , "Sodium Hydroxide").setName("SodiumHydroxide_GT5U").addDustItems().setRGB(0, 51, 128).setColor(Dyes.dyeBlue).setMaterialList(new MaterialStack(Sodium, 1), new MaterialStack(Oxygen, 1), new MaterialStack(Hydrogen, 1)).constructMaterial(); - public static Materials Benzene = new MaterialBuilder(686, TextureSet.SET_FLUID , "Benzene").addCell().addFluid().setRGB(26, 26, 26).setColor(Dyes.dyeGray).setFuelType(MaterialBuilder.GAS).setFuelPower(360).setMaterialList(new MaterialStack(Carbon, 6), new MaterialStack(Hydrogen, 6)).addElectrolyzerRecipe().constructMaterial(); - public static Materials Phenol = new MaterialBuilder(687, TextureSet.SET_FLUID , "Phenol").addCell().addFluid().setRGB(120, 68, 33).setColor(Dyes.dyeBrown).setFuelType(MaterialBuilder.GAS).setFuelPower(288).setMaterialList(new MaterialStack(Carbon, 6), new MaterialStack(Hydrogen, 6), new MaterialStack(Oxygen, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials Cumene = new MaterialBuilder(688, TextureSet.SET_FLUID , "Isopropylbenzene").addCell().addFluid().setRGB(85, 34, 0).setColor(Dyes.dyeBrown).setMaterialList(new MaterialStack(Carbon, 9), new MaterialStack(Hydrogen, 12)).addElectrolyzerRecipe().constructMaterial(); - public static Materials PhosphoricAcid = new MaterialBuilder(689, TextureSet.SET_FLUID , "Phosphoric Acid").setName("PhosphoricAcid_GT5U").addCell().addFluid().setRGB(220, 220, 0).setColor(Dyes.dyeYellow).setMaterialList(new MaterialStack(Hydrogen, 3), new MaterialStack(Phosphorus, 1), new MaterialStack(Oxygen, 4)).addElectrolyzerRecipe().constructMaterial(); - public static Materials SaltWater = new MaterialBuilder(692, TextureSet.SET_FLUID , "Salt Water").addCell().addFluid().setRGB(0, 0, 200).setColor(Dyes.dyeBlue).constructMaterial(); - public static Materials IronIIIChloride = new MaterialBuilder(693, TextureSet.SET_FLUID , "Iron III Chloride").setName("IronIIIChloride").addCell().addFluid().setRGB(22, 21, 14).setColor(Dyes.dyeBlack).setMaterialList(new MaterialStack(Chlorine, 3), new MaterialStack(Iron, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials LifeEssence = new MaterialBuilder(694, TextureSet.SET_FLUID , "Life").setName("lifeessence").addCell().addFluid().setFuelPower(100).setFuelType(5).setRGB(110, 3, 3).setColor(Dyes.dyeRed).setMaterialList().constructMaterial(); - - //Roasted Ore Dust - public static Materials RoastedCopper = new MaterialBuilder(546, TextureSet.SET_DULL , "Roasted Copper").setName("RoastedCopper").addDustItems().setRGB(77, 18, 18).constructMaterial(); - public static Materials RoastedAntimony = new MaterialBuilder(547, TextureSet.SET_DULL , "Roasted Antimony").setName("RoastedAntimony").addDustItems().setRGB(196, 178, 194).constructMaterial(); - public static Materials RoastedIron = new MaterialBuilder(548, TextureSet.SET_DULL , "Roasted Iron").setName("RoastedIron").addDustItems().setRGB(148, 98, 98).addOreItems().constructMaterial(); - public static Materials RoastedNickel = new MaterialBuilder(549, TextureSet.SET_METALLIC, "Roasted Nickel").setName("RoastedNickel").addDustItems().setRGB(70, 140, 45).addOreItems().constructMaterial(); - public static Materials RoastedZinc = new MaterialBuilder(550, TextureSet.SET_DULL , "Roasted Zinc").setName("RoastedZinc").addDustItems().setRGB(209, 209, 209).constructMaterial(); - public static Materials RoastedCobalt = new MaterialBuilder(551, TextureSet.SET_METALLIC, "Roasted Cobalt").setName("RoastedCobalt").addDustItems().setRGB(8, 64, 9).constructMaterial(); - public static Materials RoastedArsenic = new MaterialBuilder(552, TextureSet.SET_SHINY , "Roasted Arsenic").setName("RoastedArsenic").addDustItems().setRGB(240, 240, 240).constructMaterial(); - public static Materials RoastedLead = new MaterialBuilder(553, TextureSet.SET_SHINY , "Roasted Lead").setName("RoastedLead").addDustItems().setRGB(168, 149, 43).constructMaterial(); - - //Silicon Line - public static Materials SiliconSG = new Materials( 856, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 80, 80, 100, 0, "SiliconSolarGrade" , "Silicon Solar Grade (Poly SI)" , 0, 0, 2273, 2273, true, false, 1, 1, 1, Dyes.dyeBlack , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 4), new TC_AspectStack(TC_Aspects.TENEBRAE, 2))); - public static Materials CalciumDisilicide = new Materials( 971, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 180, 180, 180, 0, "CalciumDisilicide" , "Calcium Disilicide" , 0, 0, 1313, -1, false, false, 1, 1, 1, Dyes.dyeGray ,1 , Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Silicon, 2)), Arrays.asList(new TC_AspectStack(TC_Aspects.TERRA, 1), new TC_AspectStack(TC_Aspects.ORDO, 1)));//CaSi2 - public static Materials SiliconTetrafluoride = new MaterialBuilder( 967, TextureSet.SET_FLUID , "Silicon Tetrafluoride" ).setName("SiliconTetrafluoride").addCell().addGas().setTransparent(true).setRGB(200, 200, 200).setColor(Dyes.dyeWhite).setMeltingPoint(178).setMaterialList(new MaterialStack(Silicon, 1), new MaterialStack(Fluorine, 4)).setAspects(Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 1), new TC_AspectStack(TC_Aspects.VENENUM, 1))).constructMaterial();//SIF4 - public static Materials SiliconTetrachloride = new MaterialBuilder( 968, TextureSet.SET_FLUID , "Silicon Tetrachloride").setName("SiliconTetrachloride").addCell().addFluid().setRGB(220, 220, 220).setColor(Dyes.dyeWhite).setMeltingPoint(204).setMaterialList(new MaterialStack(Silicon, 1), new MaterialStack(Chlorine, 4)).setAspects(Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 1), new TC_AspectStack(TC_Aspects.VENENUM, 1))).constructMaterial();//SICL4 - public static Materials Trichlorosilane = new MaterialBuilder( 972, TextureSet.SET_FLUID , "Trichlorosilane" ).setName("Trichlorosilane" ).addCell().addFluid().setRGB( 255, 255, 255).setColor(Dyes.dyeWhite).setMeltingPoint(139).setMaterialList(new MaterialStack(Hydrogen, 1), new MaterialStack(Silicon, 1), new MaterialStack(Chlorine, 3)).setAspects(Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 1), new TC_AspectStack(TC_Aspects.VENENUM, 1))).constructMaterial();//HSICL3 - public static Materials Hexachlorodisilane = new MaterialBuilder( 973, TextureSet.SET_FLUID , "Hexachlorodisilane").setName("Hexachlorodisilane" ).addCell().addFluid().setRGB( 255, 255, 255).setColor(Dyes.dyeWhite).setMeltingPoint(272).setExtraData(1).setMaterialList(new MaterialStack(Silicon, 2), new MaterialStack(Chlorine, 6)).setAspects(Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))).constructMaterial();//SI2CL6 - public static Materials Dichlorosilane = new MaterialBuilder( 799, TextureSet.SET_FLUID , "Dichlorosilane").setName("Dichlorosilane").addCell().addGas().setTransparent(true).setRGB( 255, 255, 255).setColor(Dyes.dyeWhite).setMeltingPoint(151).setExtraData(1).setMaterialList(new MaterialStack(Silicon, 1), new MaterialStack(Hydrogen, 2), new MaterialStack(Chlorine, 2)).setAspects(Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 1), new TC_AspectStack(TC_Aspects.VENENUM, 1))).constructMaterial();//SIH2CL2 - public static Materials Silane = new MaterialBuilder( 798, TextureSet.SET_FLUID , "Silane").setName( "Silane").addCell().addGas().setRGB( 255, 255, 255).setColor(Dyes.dyeWhite).setMeltingPoint(88).setMaterialList(new MaterialStack(Silicon, 1), new MaterialStack(Hydrogen, 4)).setAspects(Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))).constructMaterial();//SIH4 - public static Materials Calciumhydride = new Materials( 797, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 220, 220, 220, 0, "CalciumHydride" , "Calcium Hydride" , 0, 0, 1089, -1, false, false, 1, 1, 1, Dyes.dyeGray ,1 , Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Hydrogen, 2)), Arrays.asList(new TC_AspectStack(TC_Aspects.TERRA, 1), new TC_AspectStack(TC_Aspects.ORDO, 1)));//CaH2 - public static Materials AluminiumFluoride = new Materials( 969, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 255, 255, 255, 0, "Aluminiumfluoride" , "Aluminium Fluoride" , 0, 0, 1533, -1, false, false, 1, 1, 1, Dyes.dyeWhite ,1 , Arrays.asList(new MaterialStack(Aluminium, 1), new MaterialStack(Fluorine, 3)), Arrays.asList(new TC_AspectStack(TC_Aspects.TERRA, 1), new TC_AspectStack(TC_Aspects.ORDO, 1)));//ALF3 - - public static Materials SolderingAlloy = new Materials( 314, TextureSet.SET_DULL , 1.0F, 0, 1, 1|2 , 220, 220, 230, 0, "SolderingAlloy" , "Soldering Alloy" , 0, 0, 400, 400, false, false, 1, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Tin, 9), new MaterialStack(Antimony, 1))); - public static Materials GalliumArsenide = new Materials( 980, TextureSet.SET_DULL , 1.0F, 0, 1, 1|2 , 160, 160, 160, 0, "GalliumArsenide" , "Gallium Arsenide" , 0, 0, -1, 1200, true, false, 1, 1, 1, Dyes.dyeGray , 2, Arrays.asList(new MaterialStack(Arsenic, 1), new MaterialStack(Gallium, 1))); - public static Materials IndiumGalliumPhosphide = new Materials( 981, TextureSet.SET_DULL , 1.0F, 0, 1, 1|2 , 160, 140, 190, 0, "IndiumGalliumPhosphide" , "Indium Gallium Phosphide" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , 2, Arrays.asList(new MaterialStack(Indium, 1), new MaterialStack(Gallium, 1), new MaterialStack(Phosphorus, 1))); - public static Materials Spessartine = new Materials( 838, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 255, 100, 100, 0, "Spessartine" , "Spessartine" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeRed , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Manganese, 3), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 12))); - public static Materials Sphalerite = new Materials( 839, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 255, 255, 255, 0, "Sphalerite" , "Sphalerite" , 0, 0, -1, 0, false, false, 2, 1, 1, Dyes.dyeYellow , 1, Arrays.asList(new MaterialStack(Zinc, 1), new MaterialStack(Sulfur, 1))); - public static Materials StainlessSteel = new Materials( 306, TextureSet.SET_SHINY , 7.0F, 480, 4, 1|2 |64|128 , 200, 200, 220, 0, "StainlessSteel" , "Stainless Steel" , 0, 0, -1, 1700, true, false, 1, 1, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Iron, 6), new MaterialStack(Chrome, 1), new MaterialStack(Manganese, 1), new MaterialStack(Nickel, 1))); - public static Materials Steel = new Materials( 305, TextureSet.SET_METALLIC , 6.0F, 512, 3, 1|2 |64|128 , 128, 128, 128, 0, "Steel" , "Steel" , 0, 0, 1811, 1000, true, false, 4, 51, 50, Dyes.dyeGray , 1, Arrays.asList(new MaterialStack(Iron, 50), new MaterialStack(Carbon, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ORDO, 1))); - public static Materials Stibnite = new Materials( 945, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 70, 70, 70, 0, "Stibnite" , "Stibnite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Antimony, 2), new MaterialStack(Sulfur, 3))); - public static Materials SulfuricAcid = new Materials( 720, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 255, 128, 0, 0, "SulfuricAcid" , "Sulfuric Acid" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(Hydrogen, 2), new MaterialStack(Sulfur, 1), new MaterialStack(Oxygen, 4))); - public static Materials Tanzanite = new Materials( 508, TextureSet.SET_GEM_VERTICAL , 7.0F, 256, 2, 1 |4|8 |64 , 64, 0, 200, 127, "Tanzanite" , "Tanzanite" , 0, 0, -1, 0, false, true, 5, 1, 1, Dyes.dyePurple , 1, Arrays.asList(new MaterialStack(Calcium, 2), new MaterialStack(Aluminium, 3), new MaterialStack(Silicon, 3), new MaterialStack(Hydrogen, 1), new MaterialStack(Oxygen, 13)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 5), new TC_AspectStack(TC_Aspects.VITREUS, 3))); - public static Materials Tetrahedrite = new Materials( 840, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 200, 32, 0, 0, "Tetrahedrite" , "Tetrahedrite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeRed , 2, Arrays.asList(new MaterialStack(Copper, 3), new MaterialStack(Antimony, 1), new MaterialStack(Sulfur, 3), new MaterialStack(Iron, 1))); //Cu3SbS3 + x(Fe,Zn)6Sb2S9 - public static Materials TinAlloy = new Materials( 363, TextureSet.SET_METALLIC , 6.5F, 96, 2, 1|2 |64|128 , 200, 200, 200, 0, "TinAlloy" , "Tin Alloy" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Tin, 1), new MaterialStack(Iron, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))); - public static Materials Topaz = new Materials( 507, TextureSet.SET_GEM_HORIZONTAL , 7.0F, 256, 3, 1 |4|8 |64 , 255, 128, 0, 127, "Topaz" , "Topaz" , 0, 0, -1, 0, false, true, 5, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 1), new MaterialStack(Fluorine, 2), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 6)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 6), new TC_AspectStack(TC_Aspects.VITREUS, 4))); - public static Materials Tungstate = new Materials( 841, TextureSet.SET_DULL , 1.0F, 0, 3, 1 |8 , 55, 50, 35, 0, "Tungstate" , "Tungstate" , 0, 0, 2500, 2500, true, false, 4, 1, 1, Dyes.dyeBlack , 0, Arrays.asList(new MaterialStack(Tungsten, 1), new MaterialStack(Lithium, 2), new MaterialStack(Oxygen, 4))); - public static Materials Ultimet = new Materials( 344, TextureSet.SET_SHINY , 9.0F, 2048, 4, 1|2 |64|128 , 180, 180, 230, 0, "Ultimet" , "Ultimet" , 0, 0, 2700, 2700, true, false, 1, 1, 1, Dyes.dyeLightBlue , 1, Arrays.asList(new MaterialStack(Cobalt, 5), new MaterialStack(Chrome, 2), new MaterialStack(Nickel, 1), new MaterialStack(Molybdenum, 1))); // 54% Cobalt, 26% Chromium, 9% Nickel, 5% Molybdenum, 3% Iron, 2% Tungsten, 0.8% Manganese, 0.3% Silicon, 0.08% Nitrogen and 0.06% Carbon - public static Materials Uraninite = new Materials( 922, TextureSet.SET_METALLIC , 1.0F, 0, 3, 1 |8 , 35, 35, 35, 0, "Uraninite" , "Uraninite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLime , 2, Arrays.asList(new MaterialStack(Uranium, 1), new MaterialStack(Oxygen, 2))); - public static Materials Uvarovite = new Materials( 842, TextureSet.SET_DIAMOND , 1.0F, 0, 2, 1 |8 , 180, 255, 180, 0, "Uvarovite" , "Uvarovite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(Calcium, 3), new MaterialStack(Chrome, 2), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 12))); - public static Materials VanadiumGallium = new Materials( 357, TextureSet.SET_SHINY , 1.0F, 0, 2, 1|2 |128 , 128, 128, 140, 0, "VanadiumGallium" , "Vanadium-Gallium" , 0, 0, 4500, 4500, true, false, 1, 1, 1, Dyes.dyeGray , 2, Arrays.asList(new MaterialStack(Vanadium, 3), new MaterialStack(Gallium, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Wood = new Materials( 809, TextureSet.SET_WOOD , 2.0F, 16, 0, 1|2 |64|128 , 100, 50, 0, 0, "Wood" , "Wood" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBrown , 0, Arrays.asList(new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 1), new MaterialStack(Hydrogen, 1)), Collections.singletonList(new TC_AspectStack(TC_Aspects.ARBOR, 2))); - public static Materials WroughtIron = new Materials( 304, TextureSet.SET_METALLIC , 6.0F, 384, 2, 1|2 |64|128 , 200, 180, 180, 0, "WroughtIron" , "Wrought Iron" , 0, 0, 1811, 0, false, false, 3, 1, 1, Dyes.dyeLightGray , 2, Collections.singletonList(new MaterialStack(Iron, 1))); - public static Materials Wulfenite = new Materials( 882, TextureSet.SET_DULL , 1.0F, 0, 3, 1 |8 , 255, 128, 0, 0, "Wulfenite" , "Wulfenite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Lead, 1), new MaterialStack(Molybdenum, 1), new MaterialStack(Oxygen, 4))); - public static Materials YellowLimonite = new Materials( 931, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 200, 200, 0, 0, "YellowLimonite" , "Yellow Limonite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Hydrogen, 1), new MaterialStack(Oxygen, 2))); // FeO(OH) + a bit of Ni and Co - public static Materials YttriumBariumCuprate = new Materials( 358, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 , 80, 64, 70, 0, "YttriumBariumCuprate" , "Yttrium Barium Cuprate" , 0, 0, 4500, 4500, true, false, 1, 1, 1, Dyes.dyeGray , 0, Arrays.asList(new MaterialStack(Yttrium, 1), new MaterialStack(Barium, 2), new MaterialStack(Copper, 3), new MaterialStack(Oxygen, 7))); + public static Materials Methane = new Materials( + 715, + TextureSet.SET_FLUID, + 1.0F, + 0, + 1, + 16, + 255, + 255, + 255, + 0, + "Methane", + "Methane", + 1, + 104, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeMagenta, + 1, + Arrays.asList(new MaterialStack(Carbon, 1), new MaterialStack(Hydrogen, 4))); + + public static Materials CarbonDioxide = new Materials( + 497, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16 | 32, + 169, + 208, + 245, + 240, + "CarbonDioxide", + "Carbon Dioxide", + 0, + 0, + 25, + 1, + false, + true, + 1, + 1, + 1, + Dyes.dyeLightBlue, + 0, + Arrays.asList(new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 2))) + .setHasCorrespondingGas(true); + public static Materials NobleGases = new Materials( + 496, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16 | 32, + 169, + 208, + 245, + 240, + "NobleGases", + "Noble Gases", + 0, + 0, + 4, + 0, + false, + true, + 1, + 1, + 1, + Dyes.dyeLightBlue, + 2, + Arrays.asList( + new MaterialStack(CarbonDioxide, 21), + new MaterialStack(Helium, 9), + new MaterialStack(Methane, 3), + new MaterialStack(Deuterium, 1))) + .setHasCorrespondingGas(true); + public static Materials Air = new Materials( + -1, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16 | 32, + 169, + 208, + 245, + 240, + "Air", + "Air", + 0, + 0, + -1, + 0, + false, + true, + 1, + 1, + 1, + Dyes.dyeLightBlue, + 0, + Arrays.asList( + new MaterialStack(Nitrogen, 40), + new MaterialStack(Oxygen, 11), + new MaterialStack(Argon, 1), + new MaterialStack(NobleGases, 1))); + public static Materials LiquidAir = new Materials( + 495, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16 | 32, + 169, + 208, + 245, + 240, + "LiquidAir", + "Liquid Air", + 0, + 0, + 4, + 0, + false, + true, + 1, + 1, + 1, + Dyes.dyeLightBlue, + 2, + Arrays.asList( + new MaterialStack(Nitrogen, 40), + new MaterialStack(Oxygen, 11), + new MaterialStack(Argon, 1), + new MaterialStack(NobleGases, 1))); + public static Materials LiquidNitrogen = new Materials( + 494, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16 | 32, + 169, + 208, + 245, + 240, + "LiquidNitrogen", + "Liquid Nitrogen", + 0, + 0, + 4, + 0, + false, + true, + 1, + 1, + 1, + Dyes.dyeLightBlue, + 1, + Collections.singletonList(new MaterialStack(Nitrogen, 1))); + public static Materials LiquidOxygen = new Materials( + 493, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16 | 32, + 169, + 208, + 245, + 240, + "LiquidOxygen", + "Liquid Oxygen", + 0, + 0, + 4, + 0, + false, + true, + 1, + 1, + 1, + Dyes.dyeLightBlue, + 1, + Collections.singletonList(new MaterialStack(Oxygen, 1))); + public static Materials SiliconDioxide = new MaterialBuilder(837, TextureSet.SET_QUARTZ, "Silicon Dioxide") + .setToolSpeed(1.0F) + .setDurability(0) + .setToolQuality(1) + .addDustItems() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeLightGray) + .setOreValue(1) + .setExtraData(0) + .setMaterialList(new MaterialStack(Silicon, 1), new MaterialStack(Oxygen, 2)) + .constructMaterial(); + public static Materials Jasper = new Materials( + 511, + TextureSet.SET_EMERALD, + 1.0F, + 0, + 2, + 1 | 4 | 8 | 64, + 200, + 80, + 80, + 100, + "Jasper", + "Jasper", + 0, + 0, + -1, + 0, + false, + true, + 3, + 1, + 1, + Dyes.dyeRed, + 1, + Collections.singletonList(new MaterialStack(SiliconDioxide, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 4), new TC_AspectStack(TC_Aspects.VITREUS, 2))); + public static Materials Almandine = new Materials( + 820, + TextureSet.SET_ROUGH, + 1.0F, + 0, + 1, + 1 | 8, + 255, + 0, + 0, + 0, + "Almandine", + "Almandine", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeRed, + 1, + Arrays.asList( + new MaterialStack(Aluminium, 2), + new MaterialStack(Iron, 3), + new MaterialStack(Silicon, 3), + new MaterialStack(Oxygen, 12))); + public static Materials Andradite = new Materials( + 821, + TextureSet.SET_ROUGH, + 1.0F, + 0, + 1, + 1 | 8, + 150, + 120, + 0, + 0, + "Andradite", + "Andradite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeYellow, + 1, + Arrays.asList( + new MaterialStack(Calcium, 3), + new MaterialStack(Iron, 2), + new MaterialStack(Silicon, 3), + new MaterialStack(Oxygen, 12))); + public static Materials AnnealedCopper = new Materials( + 345, + TextureSet.SET_SHINY, + 1.0F, + 0, + 2, + 1 | 2 | 128, + 255, + 120, + 20, + 0, + "AnnealedCopper", + "Annealed Copper", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeOrange, + 2, + Collections.singletonList(new MaterialStack(Copper, 1))); + public static Materials Asbestos = new Materials( + 946, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1 | 8, + 230, + 230, + 230, + 0, + "Asbestos", + "Asbestos", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + 1, + Arrays.asList( + new MaterialStack(Magnesium, 3), + new MaterialStack(Silicon, 2), + new MaterialStack(Hydrogen, 4), + new MaterialStack(Oxygen, 9))); // Mg3Si2O5(OH)4 + public static Materials Ash = new Materials( + 815, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1, + 150, + 150, + 150, + 0, + "Ash", + "Ashes", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + 2, + Collections.singletonList(new MaterialStack(Carbon, 1)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.PERDITIO, 1))); + public static Materials BandedIron = new Materials( + 917, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 8, + 145, + 90, + 90, + 0, + "BandedIron", + "Banded Iron", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBrown, + 1, + Arrays.asList(new MaterialStack(Iron, 2), new MaterialStack(Oxygen, 3))); + public static Materials BatteryAlloy = new Materials( + 315, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1 | 2, + 156, + 124, + 160, + 0, + "BatteryAlloy", + "Battery Alloy", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyePurple, + 2, + Arrays.asList(new MaterialStack(Lead, 4), new MaterialStack(Antimony, 1))); + public static Materials BlueTopaz = new Materials( + 513, + TextureSet.SET_GEM_HORIZONTAL, + 7.0F, + 256, + 3, + 1 | 4 | 8 | 64, + 0, + 0, + 255, + 127, + "BlueTopaz", + "Blue Topaz", + 0, + 0, + -1, + 0, + false, + true, + 3, + 1, + 1, + Dyes.dyeBlue, + 1, + Arrays.asList( + new MaterialStack(Aluminium, 2), + new MaterialStack(Silicon, 1), + new MaterialStack(Fluorine, 2), + new MaterialStack(Hydrogen, 2), + new MaterialStack(Oxygen, 6)), + Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 6), new TC_AspectStack(TC_Aspects.VITREUS, 4))); + public static Materials Bone = new Materials( + 806, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1, + 250, + 250, + 250, + 0, + "Bone", + "Bone", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + 0, + Collections.singletonList(new MaterialStack(Calcium, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.MORTUUS, 2), new TC_AspectStack(TC_Aspects.CORPUS, 1))); + public static Materials Brass = new Materials( + 301, + TextureSet.SET_METALLIC, + 7.0F, + 96, + 1, + 1 | 2 | 64 | 128, + 255, + 180, + 0, + 0, + "Brass", + "Brass", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeYellow, + 2, + Arrays.asList(new MaterialStack(Zinc, 1), new MaterialStack(Copper, 3)), + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))); + public static Materials Bronze = new Materials( + 300, + TextureSet.SET_METALLIC, + 6.0F, + 192, + 2, + 1 | 2 | 64 | 128, + 255, + 128, + 0, + 0, + "Bronze", + "Bronze", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeOrange, + 2, + Arrays.asList(new MaterialStack(Tin, 1), new MaterialStack(Copper, 3)), + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))); + public static Materials BrownLimonite = new Materials( + 930, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 1, + 1 | 8, + 200, + 100, + 0, + 0, + "BrownLimonite", + "Brown Limonite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBrown, + 2, + Arrays.asList( + new MaterialStack(Iron, 1), + new MaterialStack(Hydrogen, 1), + new MaterialStack(Oxygen, 2))); // FeO(OH) + public static Materials Calcite = new Materials( + 823, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1 | 8, + 250, + 230, + 220, + 0, + "Calcite", + "Calcite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeOrange, + 1, + Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 3))); + public static Materials Cassiterite = new Materials( + 824, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 3, + 1 | 8, + 220, + 220, + 220, + 0, + "Cassiterite", + "Cassiterite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + 1, + Arrays.asList(new MaterialStack(Tin, 1), new MaterialStack(Oxygen, 2))); + public static Materials CassiteriteSand = new Materials( + 937, + TextureSet.SET_SAND, + 1.0F, + 0, + 1, + 1 | 8, + 220, + 220, + 220, + 0, + "CassiteriteSand", + "Cassiterite Sand", + 0, + 0, + -1, + 0, + false, + false, + 4, + 1, + 1, + Dyes.dyeWhite, + 1, + Arrays.asList(new MaterialStack(Tin, 1), new MaterialStack(Oxygen, 2))); + public static Materials Chalcopyrite = new Materials( + 855, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1 | 8, + 160, + 120, + 40, + 0, + "Chalcopyrite", + "Chalcopyrite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeYellow, + 1, + Arrays.asList(new MaterialStack(Copper, 1), new MaterialStack(Iron, 1), new MaterialStack(Sulfur, 2))); + public static Materials Charcoal = new Materials( + 536, + TextureSet.SET_FINE, + 1.0F, + 0, + 1, + 1 | 4, + 100, + 70, + 70, + 0, + "Charcoal", + "Charcoal", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlack, + 1, + Collections.singletonList(new MaterialStack(Carbon, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 2), new TC_AspectStack(TC_Aspects.IGNIS, 2))); + public static Materials Chromite = new Materials( + 825, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 1, + 1 | 8, + 35, + 20, + 15, + 0, + "Chromite", + "Chromite", + 0, + 0, + 1700, + 1700, + true, + false, + 6, + 1, + 1, + Dyes.dyePink, + 1, + Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Chrome, 2), new MaterialStack(Oxygen, 4))); + public static Materials ChromiumDioxide = new Materials( + 361, + TextureSet.SET_DULL, + 11.0F, + 256, + 3, + 1 | 2, + 230, + 200, + 200, + 0, + "ChromiumDioxide", + "Chromium Dioxide", + 0, + 0, + 650, + 650, + false, + false, + 5, + 3, + 1, + Dyes.dyePink, + 1, + Arrays.asList(new MaterialStack(Chrome, 1), new MaterialStack(Oxygen, 2)), + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MACHINA, 1))); + public static Materials Cinnabar = new Materials( + 826, + TextureSet.SET_ROUGH, + 1.0F, + 0, + 1, + 1 | 8, + 150, + 0, + 0, + 0, + "Cinnabar", + "Cinnabar", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeBrown, + 2, + Arrays.asList(new MaterialStack(Mercury, 1), new MaterialStack(Sulfur, 1))); + public static Materials Water = new Materials( + 701, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 0, + 0, + 255, + 0, + "Water", + "Water", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlue, + 0, + Arrays.asList(new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 1)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 2))); + public static Materials Clay = new Materials( + 805, + TextureSet.SET_ROUGH, + 1.0F, + 0, + 1, + 1, + 200, + 200, + 220, + 0, + "Clay", + "Clay", + 0, + 0, + -1, + 0, + false, + false, + 5, + 1, + 1, + Dyes.dyeLightBlue, + 0, + Arrays.asList( + new MaterialStack(Sodium, 2), + new MaterialStack(Lithium, 1), + new MaterialStack(Aluminium, 2), + new MaterialStack(Silicon, 2), + new MaterialStack(Water, 6))); + public static Materials Coal = new Materials( + 535, + TextureSet.SET_ROUGH, + 1.0F, + 0, + 1, + 1 | 4 | 8, + 70, + 70, + 70, + 0, + "Coal", + "Coal", + 0, + 0, + -1, + 0, + false, + false, + 2, + 2, + 1, + Dyes.dyeBlack, + 1, + Collections.singletonList(new MaterialStack(Carbon, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 2), new TC_AspectStack(TC_Aspects.IGNIS, 2))); + public static Materials Cobaltite = new Materials( + 827, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 1, + 1 | 8, + 80, + 80, + 250, + 0, + "Cobaltite", + "Cobaltite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeBlue, + 1, + Arrays.asList(new MaterialStack(Cobalt, 1), new MaterialStack(Arsenic, 1), new MaterialStack(Sulfur, 1))); + public static Materials Cooperite = new Materials( + 828, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 1, + 1 | 8, + 255, + 255, + 200, + 0, + "Cooperite", + "Sheldonite", + 0, + 0, + -1, + 0, + false, + false, + 5, + 1, + 1, + Dyes.dyeYellow, + 2, + Arrays.asList( + new MaterialStack(Platinum, 3), + new MaterialStack(Nickel, 1), + new MaterialStack(Sulfur, 1), + new MaterialStack(Palladium, 1))); + public static Materials Cupronickel = new Materials( + 310, + TextureSet.SET_METALLIC, + 6.0F, + 64, + 1, + 1 | 2 | 64, + 227, + 150, + 128, + 0, + "Cupronickel", + "Cupronickel", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeOrange, + 2, + Arrays.asList(new MaterialStack(Copper, 1), new MaterialStack(Nickel, 1))); + public static Materials DarkAsh = new Materials( + 816, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1, + 50, + 50, + 50, + 0, + "DarkAsh", + "Dark Ashes", + 0, + 0, + -1, + 0, + false, + false, + 1, + 2, + 1, + Dyes.dyeGray, + 1, + Collections.singletonList(new MaterialStack(Carbon, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.IGNIS, 1), new TC_AspectStack(TC_Aspects.PERDITIO, 1))); + public static Materials DeepIron = new Materials( + 829, + TextureSet.SET_METALLIC, + 6.0F, + 384, + 2, + 1 | 2 | 8 | 64, + 150, + 140, + 140, + 0, + "DeepIron", + "Deep Iron", + 0, + 0, + 7500, + 7500, + true, + false, + 3, + 1, + 1, + Dyes.dyePink, + 2, + Collections.singletonList(new MaterialStack(Iron, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))); + public static Materials Diamond = new Materials( + 500, + TextureSet.SET_DIAMOND, + 8.0F, + 1280, + 4, + 1 | 4 | 8 | 64 | 128, + 200, + 255, + 255, + 127, + "Diamond", + "Diamond", + 0, + 0, + -1, + 0, + false, + true, + 5, + 64, + 1, + Dyes.dyeWhite, + 1, + Collections.singletonList(new MaterialStack(Carbon, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 3), new TC_AspectStack(TC_Aspects.LUCRUM, 4))); + public static Materials Electrum = new Materials( + 303, + TextureSet.SET_SHINY, + 12.0F, + 64, + 2, + 1 | 2 | 8 | 64 | 128, + 255, + 255, + 100, + 0, + "Electrum", + "Electrum", + 0, + 0, + -1, + 0, + false, + false, + 4, + 1, + 1, + Dyes.dyeYellow, + 2, + Arrays.asList(new MaterialStack(Silver, 1), new MaterialStack(Gold, 1))); + public static Materials Emerald = new Materials( + 501, + TextureSet.SET_EMERALD, + 7.0F, + 256, + 4, + 1 | 4 | 8 | 64, + 80, + 255, + 80, + 127, + "Emerald", + "Emerald", + 0, + 0, + -1, + 0, + false, + true, + 5, + 1, + 1, + Dyes.dyeGreen, + 1, + Arrays.asList( + new MaterialStack(Beryllium, 3), + new MaterialStack(Aluminium, 2), + new MaterialStack(Silicon, 6), + new MaterialStack(Oxygen, 18)), + Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 3), new TC_AspectStack(TC_Aspects.LUCRUM, 5))); + public static Materials FreshWater = new Materials( + -1, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 0, + 0, + 255, + 0, + "FreshWater", + "Fresh Water", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlue, + 0, + Arrays.asList(new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 1)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 2))); + public static Materials Galena = new Materials( + 830, + TextureSet.SET_DULL, + 1.0F, + 0, + 3, + 1 | 8, + 100, + 60, + 100, + 0, + "Galena", + "Galena", + 0, + 0, + -1, + 0, + false, + false, + 4, + 1, + 1, + Dyes.dyePurple, + 1, + Arrays.asList(new MaterialStack(Lead, 1), new MaterialStack(Sulfur, 1))); + public static Materials Garnierite = new Materials( + 906, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 3, + 1 | 8, + 50, + 200, + 70, + 0, + "Garnierite", + "Garnierite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightBlue, + 1, + Arrays.asList(new MaterialStack(Nickel, 1), new MaterialStack(Oxygen, 1))); + public static Materials Glyceryl = new Materials( + 714, + TextureSet.SET_FLUID, + 1.0F, + 0, + 1, + 16, + 0, + 150, + 150, + 0, + "Glyceryl", + "Glyceryl Trinitrate", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeCyan, + 1, + Arrays.asList( + new MaterialStack(Carbon, 3), + new MaterialStack(Hydrogen, 5), + new MaterialStack(Nitrogen, 3), + new MaterialStack(Oxygen, 9))); + public static Materials GreenSapphire = new MaterialBuilder(504, TextureSet.SET_GEM_HORIZONTAL, "Green Sapphire") + .setToolSpeed(7.0F) + .setDurability(256) + .setToolQuality(2) + .addDustItems() + .addGemItems() + .setTransparent(true) + .addOreItems() + .addToolHeadItems() + .setRGBA(100, 200, 130, 127) + .setColor(Dyes.dyeCyan) + .setOreValue(5) + .setExtraData(0) + .setMaterialList(new MaterialStack(Aluminium, 2), new MaterialStack(Oxygen, 3)) + .setAspects( + Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 5), new TC_AspectStack(TC_Aspects.VITREUS, 3))) + .constructMaterial() + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Grossular = new Materials( + 831, + TextureSet.SET_ROUGH, + 1.0F, + 0, + 1, + 1 | 8, + 200, + 100, + 0, + 0, + "Grossular", + "Grossular", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeOrange, + 1, + Arrays.asList( + new MaterialStack(Calcium, 3), + new MaterialStack(Aluminium, 2), + new MaterialStack(Silicon, 3), + new MaterialStack(Oxygen, 12))); + public static Materials HolyWater = new Materials( + 729, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 0, + 0, + 255, + 0, + "HolyWater", + "Holy Water", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlue, + 0, + Arrays.asList(new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 2), new TC_AspectStack(TC_Aspects.AURAM, 1))); + public static Materials Ice = new Materials( + 702, + TextureSet.SET_SHINY, + 1.0F, + 0, + 0, + 1 | 16, + 200, + 200, + 255, + 0, + "Ice", + "Ice", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlue, + 0, + Arrays.asList(new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 1)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.GELUM, 2))); + public static Materials Ilmenite = new Materials( + 918, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 3, + 1 | 8, + 70, + 55, + 50, + 0, + "Ilmenite", + "Ilmenite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 2, + 1, + Dyes.dyePurple, + 0, + Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Titanium, 1), new MaterialStack(Oxygen, 3))); + public static Materials Rutile = new Materials( + 375, + TextureSet.SET_GEM_HORIZONTAL, + 1.0F, + 0, + 2, + 1 | 8, + 212, + 13, + 92, + 0, + "Rutile", + "Rutile", + 0, + 0, + -1, + 0, + false, + false, + 1, + 2, + 1, + Dyes.dyeRed, + 0, + Arrays.asList(new MaterialStack(Titanium, 1), new MaterialStack(Oxygen, 2))); + public static Materials Bauxite = new Materials( + 822, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1 | 8, + 200, + 100, + 0, + 0, + "Bauxite", + "Bauxite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeBrown, + 1, + Arrays.asList( + new MaterialStack(Rutile, 2), + new MaterialStack(Aluminium, 16), + new MaterialStack(Hydrogen, 10), + new MaterialStack(Oxygen, 11))); + public static Materials Titaniumtetrachloride = new Materials( + 376, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16, + 212, + 13, + 92, + 0, + "Titaniumtetrachloride", + "Titaniumtetrachloride", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeRed, + 0, + Arrays.asList(new MaterialStack(Titanium, 1), new MaterialStack(Chlorine, 4))); + public static Materials Magnesiumchloride = new Materials( + 377, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 16, + 212, + 13, + 92, + 0, + "Magnesiumchloride", + "Magnesiumchloride", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeRed, + 0, + Arrays.asList(new MaterialStack(Magnesium, 1), new MaterialStack(Chlorine, 2))); + public static Materials Invar = new Materials( + 302, + TextureSet.SET_METALLIC, + 6.0F, + 256, + 2, + 1 | 2 | 64 | 128, + 180, + 180, + 120, + 0, + "Invar", + "Invar", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBrown, + 2, + Arrays.asList(new MaterialStack(Iron, 2), new MaterialStack(Nickel, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.GELUM, 1))); + public static Materials Kanthal = new Materials( + 312, + TextureSet.SET_METALLIC, + 6.0F, + 64, + 2, + 1 | 2 | 64, + 194, + 210, + 223, + 0, + "Kanthal", + "Kanthal", + 0, + 0, + 1800, + 1800, + true, + false, + 1, + 1, + 1, + Dyes.dyeYellow, + 2, + Arrays.asList( + new MaterialStack(Iron, 1), new MaterialStack(Aluminium, 1), new MaterialStack(Chrome, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Lazurite = new Materials( + 524, + TextureSet.SET_LAPIS, + 1.0F, + 0, + 1, + 1 | 4 | 8, + 100, + 120, + 255, + 0, + "Lazurite", + "Lazurite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeCyan, + 1, + Arrays.asList( + new MaterialStack(Aluminium, 6), + new MaterialStack(Silicon, 6), + new MaterialStack(Calcium, 8), + new MaterialStack(Sodium, 8))); + public static Materials Magnalium = new Materials( + 313, + TextureSet.SET_DULL, + 6.0F, + 256, + 2, + 1 | 2 | 64 | 128, + 200, + 190, + 255, + 0, + "Magnalium", + "Magnalium", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightBlue, + 2, + Arrays.asList(new MaterialStack(Magnesium, 1), new MaterialStack(Aluminium, 2))); + public static Materials Magnesite = new Materials( + 908, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 8, + 250, + 250, + 180, + 0, + "Magnesite", + "Magnesite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyePink, + 1, + Arrays.asList(new MaterialStack(Magnesium, 1), new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 3))); + public static Materials Magnetite = new Materials( + 870, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 8, + 30, + 30, + 30, + 0, + "Magnetite", + "Magnetite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeGray, + 1, + Arrays.asList(new MaterialStack(Iron, 3), new MaterialStack(Oxygen, 4)), + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))); + public static Materials Molybdenite = new Materials( + 942, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 8, + 25, + 25, + 25, + 0, + "Molybdenite", + "Molybdenite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlue, + 1, + Arrays.asList(new MaterialStack(Molybdenum, 1), new MaterialStack(Sulfur, 2))); // MoS2 (also source of Re) + public static Materials Nichrome = new Materials( + 311, + TextureSet.SET_METALLIC, + 6.0F, + 64, + 2, + 1 | 2 | 64, + 205, + 206, + 246, + 0, + "Nichrome", + "Nichrome", + 0, + 0, + 2700, + 2700, + true, + false, + 1, + 1, + 1, + Dyes.dyeRed, + 2, + Arrays.asList(new MaterialStack(Nickel, 4), new MaterialStack(Chrome, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials NiobiumNitride = new Materials( + 359, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 2, + 29, + 41, + 29, + 0, + "NiobiumNitride", + "Niobium Nitride", + 0, + 0, + 2573, + 2573, + true, + false, + 1, + 1, + 1, + Dyes.dyeBlack, + 1, + Arrays.asList(new MaterialStack(Niobium, 1), new MaterialStack(Nitrogen, 1))); // Anti-Reflective Material + public static Materials NiobiumTitanium = new Materials( + 360, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 2, + 29, + 29, + 41, + 0, + "NiobiumTitanium", + "Niobium-Titanium", + 0, + 0, + 4500, + 4500, + true, + false, + 1, + 1, + 1, + Dyes.dyeBlack, + 2, + Arrays.asList(new MaterialStack(Niobium, 1), new MaterialStack(Titanium, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials NitroCarbon = new Materials( + 716, + TextureSet.SET_FLUID, + 1.0F, + 0, + 1, + 16, + 0, + 75, + 100, + 0, + "NitroCarbon", + "Nitro-Carbon", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeCyan, + 1, + Arrays.asList(new MaterialStack(Nitrogen, 1), new MaterialStack(Carbon, 1))); + public static Materials NitrogenDioxide = new Materials( + 717, + TextureSet.SET_FLUID, + 1.0F, + 0, + 1, + 16, + 100, + 175, + 255, + 0, + "NitrogenDioxide", + "Nitrogen Dioxide", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeCyan, + 1, + Arrays.asList(new MaterialStack(Nitrogen, 1), new MaterialStack(Oxygen, 2))); + public static Materials Obsidian = new Materials( + 804, + TextureSet.SET_DULL, + 1.0F, + 0, + 3, + 1, + 80, + 50, + 100, + 0, + "Obsidian", + "Obsidian", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlack, + 1, + Arrays.asList( + new MaterialStack(Magnesium, 1), + new MaterialStack(Iron, 1), + new MaterialStack(Silicon, 2), + new MaterialStack(Oxygen, 8))); + public static Materials Phosphate = new Materials( + 833, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1 | 8 | 16, + 255, + 255, + 0, + 0, + "Phosphate", + "Phosphate", + 0, + 0, + -1, + 0, + false, + false, + 2, + 1, + 1, + Dyes.dyeYellow, + 1, + Arrays.asList(new MaterialStack(Phosphorus, 1), new MaterialStack(Oxygen, 4))); + public static Materials PigIron = new Materials( + 307, + TextureSet.SET_METALLIC, + 6.0F, + 384, + 2, + 1 | 2 | 8 | 64, + 200, + 180, + 180, + 0, + "PigIron", + "Pig Iron", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyePink, + 2, + Collections.singletonList(new MaterialStack(Iron, 1))); + public static Materials Plastic = new Materials( + 874, + TextureSet.SET_DULL, + 3.0F, + 32, + 1, + 1 | 2 | 64 | 128, + 200, + 200, + 200, + 0, + "Plastic", + "Polyethylene", + 0, + 0, + 400, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + 0, + Arrays.asList(new MaterialStack(Carbon, 1), new MaterialStack(Hydrogen, 2)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.MOTUS, 2))); + public static Materials Epoxid = new Materials( + 470, + TextureSet.SET_DULL, + 3.0F, + 32, + 1, + 1 | 2 | 64 | 128, + 200, + 140, + 20, + 0, + "Epoxid", + "Epoxid", + 0, + 0, + 400, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + 0, + Arrays.asList(new MaterialStack(Carbon, 21), new MaterialStack(Hydrogen, 24), new MaterialStack(Oxygen, 4)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.MOTUS, 2))); + public static Materials Polydimethylsiloxane = new MaterialBuilder( + 633, TextureSet.SET_FLUID, "Polydimethylsiloxane") + .addDustItems() + .setRGB(245, 245, 245) + .setColor(Dyes.dyeWhite) + .setMaterialList( + new MaterialStack(Carbon, 2), + new MaterialStack(Hydrogen, 6), + new MaterialStack(Oxygen, 1), + new MaterialStack(Silicon, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials Silicone = new Materials( + 471, + TextureSet.SET_DULL, + 3.0F, + 128, + 1, + 1 | 2 | 64 | 128, + 220, + 220, + 220, + 0, + "Silicone", + "Silicone Rubber", + 0, + 0, + 900, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + 0, + Arrays.asList( + new MaterialStack(Carbon, 2), + new MaterialStack(Hydrogen, 6), + new MaterialStack(Oxygen, 1), + new MaterialStack(Silicon, 1)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.MOTUS, 2))); + public static Materials Polycaprolactam = new Materials( + 472, + TextureSet.SET_DULL, + 3.0F, + 32, + 1, + 1 | 2 | 64 | 128, + 50, + 50, + 50, + 0, + "Polycaprolactam", + "Polycaprolactam", + 0, + 0, + 500, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + 0, + Arrays.asList( + new MaterialStack(Carbon, 6), + new MaterialStack(Hydrogen, 11), + new MaterialStack(Nitrogen, 1), + new MaterialStack(Oxygen, 1)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.MOTUS, 2))); + public static Materials Polytetrafluoroethylene = new Materials( + 473, + TextureSet.SET_DULL, + 3.0F, + 32, + 1, + 1 | 2 | 64 | 128, + 100, + 100, + 100, + 0, + "Polytetrafluoroethylene", + "Polytetrafluoroethylene", + 0, + 0, + 1400, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + 0, + Arrays.asList(new MaterialStack(Carbon, 2), new MaterialStack(Fluorine, 4)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.MOTUS, 2))); + public static Materials Powellite = new Materials( + 883, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 8, + 255, + 255, + 0, + 0, + "Powellite", + "Powellite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeYellow, + 2, + Arrays.asList( + new MaterialStack(Calcium, 1), new MaterialStack(Molybdenum, 1), new MaterialStack(Oxygen, 4))); + public static Materials Pumice = new Materials( + 926, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 8, + 230, + 185, + 185, + 0, + "Pumice", + "Pumice", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeGray, + 2, + Collections.singletonList(new MaterialStack(Stone, 1))); + public static Materials Pyrite = new Materials( + 834, + TextureSet.SET_ROUGH, + 1.0F, + 0, + 1, + 1 | 8, + 150, + 120, + 40, + 0, + "Pyrite", + "Pyrite", + 0, + 0, + -1, + 0, + false, + false, + 2, + 1, + 1, + Dyes.dyeOrange, + 1, + Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Sulfur, 2))); + public static Materials Pyrolusite = new Materials( + 943, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 8, + 150, + 150, + 170, + 0, + "Pyrolusite", + "Pyrolusite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + 1, + Arrays.asList(new MaterialStack(Manganese, 1), new MaterialStack(Oxygen, 2))); + public static Materials Pyrope = new Materials( + 835, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 8, + 120, + 50, + 100, + 0, + "Pyrope", + "Pyrope", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyePurple, + 1, + Arrays.asList( + new MaterialStack(Aluminium, 2), + new MaterialStack(Magnesium, 3), + new MaterialStack(Silicon, 3), + new MaterialStack(Oxygen, 12))); + public static Materials RockSalt = new Materials( + 944, + TextureSet.SET_FINE, + 1.0F, + 0, + 1, + 1 | 8, + 240, + 200, + 200, + 0, + "RockSalt", + "Rock Salt", + 0, + 0, + -1, + 0, + false, + false, + 2, + 1, + 1, + Dyes.dyeWhite, + 1, + Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Chlorine, 1))); + public static Materials Rubber = new Materials( + 880, + TextureSet.SET_SHINY, + 1.5F, + 32, + 0, + 1 | 2 | 64 | 128, + 0, + 0, + 0, + 0, + "Rubber", + "Rubber", + 0, + 0, + 400, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlack, + 0, + Arrays.asList(new MaterialStack(Carbon, 5), new MaterialStack(Hydrogen, 8)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.MOTUS, 2))); + public static Materials RawRubber = new Materials( + 896, + TextureSet.SET_DULL, + 1.0F, + 0, + 0, + 1, + 204, + 199, + 137, + 0, + "RawRubber", + "Raw Rubber", + 0, + 0, + 400, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + 0, + Arrays.asList(new MaterialStack(Carbon, 5), new MaterialStack(Hydrogen, 8)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.MOTUS, 2))); + public static Materials Ruby = new Materials( + 502, + TextureSet.SET_RUBY, + 7.0F, + 256, + 2, + 1 | 4 | 8 | 64, + 255, + 100, + 100, + 127, + "Ruby", + "Ruby", + 0, + 0, + -1, + 0, + false, + true, + 5, + 1, + 1, + Dyes.dyeRed, + 1, + Arrays.asList( + new MaterialStack(Chrome, 1), + new MaterialStack(Aluminium, 2), + new MaterialStack(Oxygen, 3)), + Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 6), new TC_AspectStack(TC_Aspects.VITREUS, 4))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Salt = new Materials( + 817, + TextureSet.SET_FINE, + 1.0F, + 0, + 1, + 1 | 8, + 250, + 250, + 250, + 0, + "Salt", + "Salt", + 0, + 0, + -1, + 0, + false, + false, + 2, + 1, + 1, + Dyes.dyeWhite, + 0, + Arrays.asList(new MaterialStack(Sodium, 1), new MaterialStack(Chlorine, 1))); + public static Materials Saltpeter = new Materials( + 836, + TextureSet.SET_FINE, + 1.0F, + 0, + 1, + 1 | 8, + 230, + 230, + 230, + 0, + "Saltpeter", + "Saltpeter", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeWhite, + 1, + Arrays.asList( + new MaterialStack(Potassium, 1), new MaterialStack(Nitrogen, 1), new MaterialStack(Oxygen, 3))); + public static Materials Sapphire = new MaterialBuilder(503, TextureSet.SET_GEM_VERTICAL, "Sapphire") + .setToolSpeed(7.0F) + .setDurability(256) + .setToolQuality(2) + .addDustItems() + .addGemItems() + .setTransparent(true) + .addOreItems() + .addToolHeadItems() + .setRGBA(100, 100, 200, 127) + .setColor(Dyes.dyeBlue) + .setOreValue(5) + .setExtraData(0) + .setMaterialList(new MaterialStack(Aluminium, 2), new MaterialStack(Oxygen, 3)) + .setAspects( + Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 5), new TC_AspectStack(TC_Aspects.VITREUS, 3))) + .constructMaterial() + .disableAutoGeneratedBlastFurnaceRecipes(); + // public static Materials Sapphire = new Materials( 503, TextureSet.SET_GEM_VERTICAL , 7.0F, + // 256, 2, 1 |4|8 |64 , 100, 100, 200, 127, "Sapphire" , "Sapphire" + // , 0, 0, -1, 0, false, true, 5, 1, 1, Dyes.dyeBlue , 1, Arrays.asList(new + // MaterialStack(Aluminium, 2), new MaterialStack(Oxygen, 3)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, + // 5), new TC_AspectStack(TC_Aspects.VITREUS, 3))); + public static Materials Scheelite = new Materials( + 910, + TextureSet.SET_DULL, + 1.0F, + 0, + 3, + 1 | 8, + 200, + 140, + 20, + 0, + "Scheelite", + "Scheelite", + 0, + 0, + 2500, + 2500, + false, + false, + 4, + 1, + 1, + Dyes.dyeBlack, + 0, + Arrays.asList(new MaterialStack(Tungsten, 1), new MaterialStack(Calcium, 1), new MaterialStack(Oxygen, 4))); + public static Materials Snow = new Materials( + 728, + TextureSet.SET_FINE, + 1.0F, + 0, + 0, + 1 | 16, + 250, + 250, + 250, + 0, + "Snow", + "Snow", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + 0, + Arrays.asList(new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 1)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.GELUM, 1))); + public static Materials Sodalite = new Materials( + 525, + TextureSet.SET_LAPIS, + 1.0F, + 0, + 1, + 1 | 4 | 8, + 20, + 20, + 255, + 0, + "Sodalite", + "Sodalite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeBlue, + 1, + Arrays.asList( + new MaterialStack(Aluminium, 3), + new MaterialStack(Silicon, 3), + new MaterialStack(Sodium, 4), + new MaterialStack(Chlorine, 1))); + public static Materials SodiumPersulfate = new Materials( + 718, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16, + 255, + 255, + 255, + 0, + "SodiumPersulfate", + "Sodium Persulfate", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeOrange, + 1, + Arrays.asList(new MaterialStack(Sodium, 2), new MaterialStack(Sulfur, 2), new MaterialStack(Oxygen, 8))); + public static Materials SodiumSulfide = new Materials( + 719, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 1, + 255, + 230, + 128, + 0, + "SodiumSulfide", + "Sodium Sulfide", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeOrange, + 1, + Arrays.asList(new MaterialStack(Sodium, 2), new MaterialStack(Sulfur, 1))); + public static Materials HydricSulfide = new Materials( + 460, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16, + 255, + 255, + 255, + 0, + "HydricSulfide", + "Hydrogen Sulfide", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeOrange, + 1, + Arrays.asList(new MaterialStack(Hydrogen, 2), new MaterialStack(Sulfur, 1))); + + public static Materials OilHeavy = new Materials( + 730, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 10, + 10, + 10, + 0, + "OilHeavy", + "Heavy Oil", + 3, + 40, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlack); + public static Materials OilMedium = new Materials( + 731, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 10, + 10, + 10, + 0, + "OilMedium", + "Raw Oil", + 3, + 30, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlack); + public static Materials OilLight = new Materials( + 732, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 10, + 10, + 10, + 0, + "OilLight", + "Light Oil", + 3, + 20, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlack); + + public static Materials NatruralGas = new Materials( + 733, + TextureSet.SET_FLUID, + 1.0F, + 0, + 1, + 16, + 255, + 255, + 255, + 0, + "NatruralGas", + "Natural Gas", + 1, + 20, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeWhite); + public static Materials SulfuricGas = new Materials( + 734, + TextureSet.SET_FLUID, + 1.0F, + 0, + 1, + 16, + 255, + 255, + 255, + 0, + "SulfuricGas", + "Sulfuric Gas", + 1, + 25, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeWhite); + public static Materials Gas = new Materials( + 735, + TextureSet.SET_FLUID, + 1.0F, + 0, + 1, + 16, + 255, + 255, + 255, + 0, + "Gas", + "Refinery Gas", + 1, + 160, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeWhite) + .setCanBeCracked(true); + public static Materials SulfuricNaphtha = new Materials( + 736, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 255, + 255, + 0, + 0, + "SulfuricNaphtha", + "Sulfuric Naphtha", + 1, + 40, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeYellow); + public static Materials SulfuricLightFuel = new Materials( + 737, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 255, + 255, + 0, + 0, + "SulfuricLightFuel", + "Sulfuric Light Fuel", + 0, + 40, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeYellow); + public static Materials SulfuricHeavyFuel = new Materials( + 738, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 255, + 255, + 0, + 0, + "SulfuricHeavyFuel", + "Sulfuric Heavy Fuel", + 3, + 40, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlack); + public static Materials Naphtha = new Materials( + 739, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 255, + 255, + 0, + 0, + "Naphtha", + "Naphtha", + 1, + 320, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeYellow) + .setCanBeCracked(true); + public static Materials LightFuel = new Materials( + 740, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 255, + 255, + 0, + 0, + "LightFuel", + "Light Fuel", + 0, + 305, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeYellow) + .setCanBeCracked(true); + public static Materials HeavyFuel = new Materials( + 741, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 255, + 255, + 0, + 0, + "HeavyFuel", + "Heavy Fuel", + 3, + 240, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlack) + .setCanBeCracked(true); + public static Materials LPG = new Materials( + 742, + TextureSet.SET_FLUID, + 1.0F, + 0, + 0, + 16, + 255, + 255, + 0, + 0, + "LPG", + "LPG", + 1, + 320, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeYellow); + + public static Materials FluidNaquadahFuel = new MaterialBuilder(600, TextureSet.SET_FLUID, "Naquadah Fuel") + .setName("FluidNaqudahFuel") + .addCell() + .addFluid() + .setRGB(62, 62, 62) + .setColor(Dyes.dyeBlack) + .constructMaterial(); + public static Materials EnrichedNaquadria = new MaterialBuilder(601, TextureSet.SET_FLUID, "Enriched Naquadria") + .setName("EnrichedNaquadria") + .addCell() + .addFluid() + .setRGB(52, 52, 52) + .setColor(Dyes.dyeBlack) + .constructMaterial(); + + public static Materials ReinforceGlass = new MaterialBuilder(602, TextureSet.SET_FLUID, "Molten Reinforced Glass") + .setName("ReinforcedGlass") + .addCell() + .addFluid() + .setRGB(192, 245, 254) + .setColor(Dyes.dyeWhite) + .setLiquidTemperature(2000) + .constructMaterial(); + public static Materials BioMediumRaw = new MaterialBuilder(603, TextureSet.SET_FLUID, "Raw Bio Catalyst Medium") + .setName("BioMediumRaw") + .addCell() + .addFluid() + .setRGB(97, 147, 46) + .setColor(Dyes.dyeLime) + .constructMaterial(); + public static Materials BioMediumSterilized = new MaterialBuilder( + 604, TextureSet.SET_FLUID, "Sterilized Bio Catalyst Medium") + .setName("BiohMediumSterilized") + .addCell() + .addFluid() + .setRGB(162, 253, 53) + .setColor(Dyes.dyeLime) + .constructMaterial(); + + public static Materials Chlorobenzene = new MaterialBuilder(605, TextureSet.SET_FLUID, "Chlorobenzene") + .addCell() + .addFluid() + .setRGB(0, 50, 65) + .setColor(Dyes.dyeGray) + .setMaterialList( + new MaterialStack(Carbon, 6), new MaterialStack(Hydrogen, 5), new MaterialStack(Chlorine, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials DilutedHydrochloricAcid = new MaterialBuilder( + 606, TextureSet.SET_FLUID, "Diluted Hydrochloric Acid") + .setName("DilutedHydrochloricAcid_GT5U") + .addCell() + .addFluid() + .setRGB(153, 167, 163) + .setColor(Dyes.dyeLightGray) + .setMaterialList(new MaterialStack(Hydrogen, 1), new MaterialStack(Chlorine, 1)) + .constructMaterial(); + public static Materials Pyrochlore = new MaterialBuilder(607, TextureSet.SET_METALLIC, "Pyrochlore") + .addDustItems() + .addOreItems() + .setRGB(43, 17, 0) + .setColor(Dyes.dyeBlack) + .setMaterialList(new MaterialStack(Calcium, 2), new MaterialStack(Niobium, 2), new MaterialStack(Oxygen, 7)) + .addElectrolyzerRecipe() + .constructMaterial(); + + public static Materials GrowthMediumRaw = new MaterialBuilder( + 608, TextureSet.SET_FLUID, "Raw Growth Catalyst Medium") + .setName("GrowthMediumRaw") + .addCell() + .addFluid() + .setRGB(211, 141, 95) + .setColor(Dyes.dyeOrange) + .constructMaterial(); + public static Materials GrowthMediumSterilized = new MaterialBuilder( + 609, TextureSet.SET_FLUID, "Growth Catalyst Medium") + .setName("GrowthMediumSterilized") + .addCell() + .addFluid() + .setRGB(222, 170, 135) + .setColor(Dyes.dyeOrange) + .constructMaterial(); + + public static Materials FerriteMixture = new MaterialBuilder(612, TextureSet.SET_METALLIC, "Ferrite Mixture") + .addDustItems() + .setRGB(180, 180, 180) + .setColor(Dyes.dyeGray) + .setMaterialList(new MaterialStack(Nickel, 1), new MaterialStack(Zinc, 1), new MaterialStack(Iron, 4)) + .constructMaterial(); + public static Materials NickelZincFerrite = new MaterialBuilder(613, TextureSet.SET_ROUGH, "Nickel-Zinc Ferrite") + .addDustItems() + .addMetalItems() + .addToolHeadItems() + .addGearItems() + .setToolSpeed(3.0f) + .setDurability(32) + .setRGB(60, 60, 60) + .setColor(Dyes.dyeBlack) + .setBlastFurnaceRequired(true) + .setBlastFurnaceTemp(1500) + .setMaterialList( + new MaterialStack(Nickel, 1), + new MaterialStack(Zinc, 1), + new MaterialStack(Iron, 4), + new MaterialStack(Oxygen, 8)) + .constructMaterial(); + + public static Materials Massicot = new MaterialBuilder(614, TextureSet.SET_DULL, "Massicot") + .addDustItems() + .setRGB(255, 221, 85) + .setColor(Dyes.dyeYellow) + .setMaterialList(new MaterialStack(Lead, 1), new MaterialStack(Oxygen, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials ArsenicTrioxide = new MaterialBuilder(615, TextureSet.SET_SHINY, "Arsenic Trioxide") + .addDustItems() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeGreen) + .setMaterialList(new MaterialStack(Arsenic, 2), new MaterialStack(Oxygen, 3)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials CobaltOxide = new MaterialBuilder(616, TextureSet.SET_DULL, "Cobalt Oxide") + .addDustItems() + .setRGB(102, 128, 0) + .setColor(Dyes.dyeGreen) + .setMaterialList(new MaterialStack(Cobalt, 1), new MaterialStack(Oxygen, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials Zincite = new MaterialBuilder(617, TextureSet.SET_DULL, "Zincite") + .addDustItems() + .setRGB(255, 255, 245) + .setColor(Dyes.dyeWhite) + .setMaterialList(new MaterialStack(Zinc, 1), new MaterialStack(Oxygen, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials AntimonyTrioxide = new MaterialBuilder(618, TextureSet.SET_DULL, "Antimony Trioxide") + .addDustItems() + .setRGB(230, 230, 240) + .setColor(Dyes.dyeWhite) + .setMaterialList(new MaterialStack(Antimony, 2), new MaterialStack(Oxygen, 3)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials CupricOxide = new MaterialBuilder(619, TextureSet.SET_DULL, "Cupric Oxide") + .addDustItems() + .setRGB(15, 15, 15) + .setColor(Dyes.dyeBlack) + .setMeltingPoint(1599) + .setMaterialList(new MaterialStack(Copper, 1), new MaterialStack(Oxygen, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials Ferrosilite = new MaterialBuilder(620, TextureSet.SET_DULL, "Ferrosilite") + .addDustItems() + .setRGB(151, 99, 42) + .setColor(Dyes.dyeBrown) + .setMaterialList(new MaterialStack(Iron, 1), new MaterialStack(Silicon, 1), new MaterialStack(Oxygen, 3)) + .addElectrolyzerRecipe() + .constructMaterial(); + + public static Materials Magnesia = new MaterialBuilder(621, TextureSet.SET_DULL, "Magnesia") + .addDustItems() + .setRGB(255, 225, 225) + .setColor(Dyes.dyeWhite) + .setMaterialList(new MaterialStack(Magnesium, 1), new MaterialStack(Oxygen, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials Quicklime = new MaterialBuilder(622, TextureSet.SET_DULL, "Quicklime") + .addDustItems() + .setRGB(240, 240, 240) + .setColor(Dyes.dyeWhite) + .setMaterialList(new MaterialStack(Calcium, 1), new MaterialStack(Oxygen, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials Potash = new MaterialBuilder(623, TextureSet.SET_DULL, "Potash") + .addDustItems() + .setRGB(120, 66, 55) + .setColor(Dyes.dyeBrown) + .setMaterialList(new MaterialStack(Potassium, 2), new MaterialStack(Oxygen, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials SodaAsh = new MaterialBuilder(624, TextureSet.SET_DULL, "Soda Ash") + .addDustItems() + .setRGB(220, 220, 255) + .setColor(Dyes.dyeWhite) + .setMaterialList(new MaterialStack(Sodium, 2), new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 3)) + .addElectrolyzerRecipe() + .constructMaterial(); + + public static Materials BioDiesel = new MaterialBuilder(627, TextureSet.SET_FLUID, "Bio Diesel") + .addCell() + .addFluid() + .setRGB(255, 128, 0) + .setColor(Dyes.dyeOrange) + .setFuelType(MaterialBuilder.DIESEL) + .setFuelPower(320) + .constructMaterial(); + public static Materials NitrationMixture = new MaterialBuilder(628, TextureSet.SET_FLUID, "Nitration Mixture") + .addCell() + .setRGB(230, 226, 171) + .setColor(Dyes.dyeBrown) + .constructMaterial(); + public static Materials Glycerol = new MaterialBuilder(629, TextureSet.SET_FLUID, "Glycerol") + .addCell() + .addFluid() + .setRGB(135, 222, 135) + .setColor(Dyes.dyeLime) + .setFuelType(MaterialBuilder.SEMIFLUID) + .setFuelType(164) + .setMaterialList(new MaterialStack(Carbon, 3), new MaterialStack(Hydrogen, 8), new MaterialStack(Oxygen, 3)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials SodiumBisulfate = new MaterialBuilder(630, TextureSet.SET_FLUID, "Sodium Bisulfate") + .addDustItems() + .setRGB(0, 68, 85) + .setColor(Dyes.dyeBlue) + .setMaterialList( + new MaterialStack(Sodium, 1), + new MaterialStack(Hydrogen, 1), + new MaterialStack(Sulfur, 1), + new MaterialStack(Oxygen, 4)) + .constructMaterial(); + public static Materials PolyphenyleneSulfide = new MaterialBuilder( + 631, TextureSet.SET_DULL, "Polyphenylene Sulfide") + .addDustItems() + .addMetalItems() + .addToolHeadItems() + .addGearItems() + .setToolSpeed(3.0f) + .setDurability(32) + .setToolQuality(1) + .setRGB(170, 136, 0) + .setColor(Dyes.dyeBrown) + .setMaterialList(new MaterialStack(Carbon, 6), new MaterialStack(Hydrogen, 4), new MaterialStack(Sulfur, 1)) + .constructMaterial(); + public static Materials Dichlorobenzene = new MaterialBuilder(632, TextureSet.SET_FLUID, "Dichlorobenzene") + .addCell() + .addFluid() + .setRGB(0, 68, 85) + .setColor(Dyes.dyeBlue) + .setMaterialList( + new MaterialStack(Carbon, 6), new MaterialStack(Hydrogen, 4), new MaterialStack(Chlorine, 2)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials Polystyrene = new MaterialBuilder(636, TextureSet.SET_DULL, "Polystyrene") + .addDustItems() + .addMetalItems() + .addToolHeadItems() + .addGearItems() + .setToolSpeed(3.0f) + .setDurability(32) + .setToolQuality(1) + .setRGB(190, 180, 170) + .setColor(Dyes.dyeLightGray) + .setMaterialList(new MaterialStack(Carbon, 8), new MaterialStack(Hydrogen, 8)) + .constructMaterial(); + public static Materials Styrene = new MaterialBuilder(637, TextureSet.SET_FLUID, "Styrene") + .addCell() + .addFluid() + .setRGB(210, 200, 190) + .setColor(Dyes.dyeBlack) + .setMaterialList(new MaterialStack(Carbon, 8), new MaterialStack(Hydrogen, 8)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials Isoprene = new MaterialBuilder(638, TextureSet.SET_FLUID, "Isoprene") + .addCell() + .addFluid() + .setRGB(20, 20, 20) + .setColor(Dyes.dyeBlack) + .setMaterialList(new MaterialStack(Carbon, 5), new MaterialStack(Hydrogen, 8)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials Tetranitromethane = new MaterialBuilder(639, TextureSet.SET_FLUID, "Tetranitromethane") + .addCell() + .addFluid() + .setRGB(15, 40, 40) + .setColor(Dyes.dyeBlack) + .setMaterialList(new MaterialStack(Carbon, 1), new MaterialStack(Nitrogen, 4), new MaterialStack(Oxygen, 8)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials Ethenone = new MaterialBuilder(641, TextureSet.SET_FLUID, "Ethenone") + .addCell() + .addGas() + .setRGB(20, 20, 70) + .setColor(Dyes.dyeBlack) + .setMaterialList(new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials Ethane = new MaterialBuilder(642, TextureSet.SET_FLUID, "Ethane") + .addCell() + .addGas() + .setRGB(200, 200, 255) + .setColor(Dyes.dyeLightBlue) + .setFuelType(MaterialBuilder.GAS) + .setFuelPower(168) + .setMaterialList(new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 6)) + .addElectrolyzerRecipe() + .setCanBeCracked(true) + .constructMaterial(); + public static Materials Propane = new MaterialBuilder(643, TextureSet.SET_FLUID, "Propane") + .addCell() + .addGas() + .setRGB(250, 226, 80) + .setColor(Dyes.dyeYellow) + .setFuelType(MaterialBuilder.GAS) + .setFuelPower(232) + .setMaterialList(new MaterialStack(Carbon, 3), new MaterialStack(Hydrogen, 8)) + .addElectrolyzerRecipe() + .setCanBeCracked(true) + .constructMaterial(); + public static Materials Butane = new MaterialBuilder(644, TextureSet.SET_FLUID, "Butane") + .addCell() + .addGas() + .setRGB(182, 55, 30) + .setColor(Dyes.dyeOrange) + .setFuelType(MaterialBuilder.GAS) + .setFuelPower(296) + .setMaterialList(new MaterialStack(Carbon, 4), new MaterialStack(Hydrogen, 10)) + .addElectrolyzerRecipe() + .setCanBeCracked(true) + .constructMaterial(); + public static Materials Butene = new MaterialBuilder(645, TextureSet.SET_FLUID, "Butene") + .addCell() + .addGas() + .setRGB(207, 80, 5) + .setColor(Dyes.dyeOrange) + .setFuelType(MaterialBuilder.GAS) + .setFuelPower(256) + .setMaterialList(new MaterialStack(Carbon, 4), new MaterialStack(Hydrogen, 8)) + .addElectrolyzerRecipe() + .setCanBeCracked(true) + .constructMaterial(); + public static Materials Butadiene = new MaterialBuilder(646, TextureSet.SET_FLUID, "Butadiene") + .addCell() + .addGas() + .setRGB(232, 105, 0) + .setColor(Dyes.dyeOrange) + .setFuelType(MaterialBuilder.GAS) + .setFuelPower(206) + .setMaterialList(new MaterialStack(Carbon, 4), new MaterialStack(Hydrogen, 6)) + .addElectrolyzerRecipe() + .setCanBeCracked(true) + .constructMaterial(); + public static Materials RawStyreneButadieneRubber = new MaterialBuilder( + 634, TextureSet.SET_SHINY, "Raw Styrene-Butadiene Rubber") + .addDustItems() + .setRGB(84, 64, 61) + .setColor(Dyes.dyeGray) + .setMaterialList(new MaterialStack(Styrene, 1), new MaterialStack(Butadiene, 3)) + .constructMaterial(); + public static Materials StyreneButadieneRubber = new MaterialBuilder( + 635, TextureSet.SET_SHINY, "Styrene-Butadiene Rubber") + .addDustItems() + .addMetalItems() + .addToolHeadItems() + .addGearItems() + .setToolSpeed(3.0f) + .setDurability(128) + .setToolQuality(1) + .setRGB(33, 26, 24) + .setColor(Dyes.dyeBlack) + .setMaterialList(new MaterialStack(Styrene, 1), new MaterialStack(Butadiene, 3)) + .constructMaterial(); + public static Materials Toluene = new MaterialBuilder(647, TextureSet.SET_FLUID, "Toluene") + .addCell() + .setRGB(80, 29, 5) + .setColor(Dyes.dyeBrown) + .setFuelType(MaterialBuilder.GAS) + .setFuelPower(328) + .setMaterialList(new MaterialStack(Carbon, 7), new MaterialStack(Hydrogen, 8)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials Epichlorohydrin = new MaterialBuilder(648, TextureSet.SET_FLUID, "Epichlorohydrin") + .addCell() + .setRGB(80, 29, 5) + .setColor(Dyes.dyeBrown) + .setMaterialList( + new MaterialStack(Carbon, 3), + new MaterialStack(Hydrogen, 5), + new MaterialStack(Chlorine, 1), + new MaterialStack(Oxygen, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials PolyvinylChloride = new MaterialBuilder(649, TextureSet.SET_DULL, "Polyvinyl Chloride") + .addDustItems() + .addMetalItems() + .addToolHeadItems() + .addGearItems() + .setToolSpeed(3.0f) + .setDurability(32) + .setToolQuality(1) + .setRGB(215, 230, 230) + .setColor(Dyes.dyeLightGray) + .setMaterialList( + new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 3), new MaterialStack(Chlorine, 1)) + .constructMaterial(); + public static Materials VinylChloride = new MaterialBuilder(650, TextureSet.SET_FLUID, "Vinyl Chloride") + .addCell() + .addGas() + .setRGB(225, 240, 240) + .setColor(Dyes.dyeLightGray) + .setMaterialList( + new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 3), new MaterialStack(Chlorine, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials SulfurDioxide = new MaterialBuilder(651, TextureSet.SET_FLUID, "Sulfur Dioxide") + .addCell() + .addGas() + .setRGB(200, 200, 25) + .setColor(Dyes.dyeYellow) + .setMaterialList(new MaterialStack(Sulfur, 1), new MaterialStack(Oxygen, 2)) + .constructMaterial(); + public static Materials SulfurTrioxide = new MaterialBuilder(652, TextureSet.SET_FLUID, "Sulfur Trioxide") + .addCell() + .addGas() + .setGasTemperature(344) + .setRGB(160, 160, 20) + .setColor(Dyes.dyeYellow) + .setMaterialList(new MaterialStack(Sulfur, 1), new MaterialStack(Oxygen, 3)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials NitricAcid = new MaterialBuilder(653, TextureSet.SET_FLUID, "Nitric Acid") + .addCell() + .addFluid() + .setRGB(230, 226, 171) + .setMaterialList( + new MaterialStack(Hydrogen, 1), new MaterialStack(Nitrogen, 1), new MaterialStack(Oxygen, 3)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials Dimethylhydrazine = new MaterialBuilder(654, TextureSet.SET_FLUID, "1,1-Dimethylhydrazine") + .addCell() + .addFluid() + .setRGB(0, 0, 85) + .setColor(Dyes.dyeBlue) + .setMaterialList( + new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 8), new MaterialStack(Nitrogen, 2)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials Chloramine = new MaterialBuilder(655, TextureSet.SET_FLUID, "Chloramine") + .addCell() + .addFluid() + .setRGB(63, 159, 128) + .setColor(Dyes.dyeCyan) + .setMaterialList( + new MaterialStack(Nitrogen, 1), new MaterialStack(Hydrogen, 2), new MaterialStack(Chlorine, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials Dimethylamine = new MaterialBuilder(656, TextureSet.SET_FLUID, "Dimethylamine") + .addCell() + .addGas() + .setRGB(85, 68, 105) + .setColor(Dyes.dyeGray) + .setMaterialList( + new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 7), new MaterialStack(Nitrogen, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials DinitrogenTetroxide = new MaterialBuilder(657, TextureSet.SET_FLUID, "Dinitrogen Tetroxide") + .addCell() + .addGas() + .setRGB(0, 65, 132) + .setColor(Dyes.dyeBlue) + .setMaterialList(new MaterialStack(Nitrogen, 2), new MaterialStack(Oxygen, 4)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials NitricOxide = new MaterialBuilder(658, TextureSet.SET_FLUID, "Nitric Oxide") + .addCell() + .addGas() + .setRGB(125, 200, 240) + .setColor(Dyes.dyeCyan) + .setMaterialList(new MaterialStack(Nitrogen, 1), new MaterialStack(Oxygen, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials Ammonia = new MaterialBuilder(659, TextureSet.SET_FLUID, "Ammonia") + .addCell() + .addGas() + .setRGB(63, 52, 128) + .setColor(Dyes.dyeBlue) + .setMaterialList(new MaterialStack(Nitrogen, 1), new MaterialStack(Hydrogen, 3)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials Dimethyldichlorosilane = new MaterialBuilder( + 663, TextureSet.SET_FLUID, "Dimethyldichlorosilane") + .addCell() + .addFluid() + .setRGB(68, 22, 80) + .setColor(Dyes.dyePurple) + .setMaterialList( + new MaterialStack(Carbon, 2), + new MaterialStack(Hydrogen, 6), + new MaterialStack(Chlorine, 2), + new MaterialStack(Silicon, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials Chloromethane = new MaterialBuilder(664, TextureSet.SET_FLUID, "Chloromethane") + .addCell() + .addGas() + .setRGB(200, 44, 160) + .setColor(Dyes.dyeMagenta) + .setMaterialList( + new MaterialStack(Carbon, 1), new MaterialStack(Hydrogen, 3), new MaterialStack(Chlorine, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials PhosphorousPentoxide = new MaterialBuilder( + 665, TextureSet.SET_FLUID, "Phosphorous Pentoxide") + .addCell() + .addDustItems() + .setRGB(220, 220, 0) + .setColor(Dyes.dyeYellow) + .setMaterialList(new MaterialStack(Phosphorus, 4), new MaterialStack(Oxygen, 10)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials Tetrafluoroethylene = new MaterialBuilder(666, TextureSet.SET_FLUID, "Tetrafluoroethylene") + .addCell() + .addGas() + .setRGB(125, 125, 125) + .setColor(Dyes.dyeGray) + .setMaterialList(new MaterialStack(Carbon, 2), new MaterialStack(Fluorine, 4)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials HydrofluoricAcid = new MaterialBuilder(667, TextureSet.SET_FLUID, "Hydrofluoric Acid") + .setName("HydrofluoricAcid_GT5U") + .addCell() + .addFluid() + .setRGB(0, 136, 170) + .setColor(Dyes.dyeLightBlue) + .setMaterialList(new MaterialStack(Hydrogen, 1), new MaterialStack(Fluorine, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials Chloroform = new MaterialBuilder(668, TextureSet.SET_FLUID, "Chloroform") + .addCell() + .addFluid() + .setRGB(137, 44, 160) + .setColor(Dyes.dyePurple) + .setMaterialList( + new MaterialStack(Carbon, 1), new MaterialStack(Hydrogen, 1), new MaterialStack(Chlorine, 3)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials BisphenolA = new MaterialBuilder(669, TextureSet.SET_FLUID, "Bisphenol A") + .addCell() + .setRGB(212, 170, 0) + .setColor(Dyes.dyeBrown) + .setMaterialList( + new MaterialStack(Carbon, 15), new MaterialStack(Hydrogen, 16), new MaterialStack(Oxygen, 2)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials AceticAcid = new MaterialBuilder(670, TextureSet.SET_FLUID, "Acetic Acid") + .addCell() + .addFluid() + .setRGB(200, 180, 160) + .setColor(Dyes.dyeWhite) + .setMaterialList(new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 4), new MaterialStack(Oxygen, 2)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials CalciumAcetateSolution = new MaterialBuilder( + 671, TextureSet.SET_RUBY, "Calcium Acetate Solution") + .addCell() + .addFluid() + .setRGB(220, 200, 180) + .setColor(Dyes.dyeCyan) + .setMaterialList( + new MaterialStack(Calcium, 1), + new MaterialStack(Carbon, 4), + new MaterialStack(Oxygen, 4), + new MaterialStack(Hydrogen, 6)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials Acetone = new MaterialBuilder(672, TextureSet.SET_FLUID, "Acetone") + .addCell() + .addFluid() + .setRGB(175, 175, 175) + .setColor(Dyes.dyeWhite) + .setMaterialList(new MaterialStack(Carbon, 3), new MaterialStack(Hydrogen, 6), new MaterialStack(Oxygen, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials Methanol = new MaterialBuilder(673, TextureSet.SET_FLUID, "Methanol") + .addCell() + .addFluid() + .setRGB(170, 136, 0) + .setColor(Dyes.dyeBrown) + .setFuelPower(84) + .setMaterialList(new MaterialStack(Carbon, 1), new MaterialStack(Hydrogen, 4), new MaterialStack(Oxygen, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials CarbonMonoxide = new MaterialBuilder(674, TextureSet.SET_FLUID, "Carbon Monoxide") + .addCell() + .addGas() + .setRGB(14, 72, 128) + .setColor(Dyes.dyeBrown) + .setFuelType(MaterialBuilder.GAS) + .setFuelPower(24) + .setMaterialList(new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials MetalMixture = new MaterialBuilder(676, TextureSet.SET_METALLIC, "Metal Mixture") + .addDustItems() + .setRGB(80, 45, 22) + .setColor(Dyes.dyeBrown) + .constructMaterial(); + public static Materials Ethylene = new MaterialBuilder(677, TextureSet.SET_FLUID, "Ethylene") + .addCell() + .addGas() + .setRGB(225, 225, 225) + .setColor(Dyes.dyeWhite) + .setFuelType(MaterialBuilder.GAS) + .setFuelPower(128) + .setMaterialList(new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 4)) + .addElectrolyzerRecipe() + .setCanBeCracked(true) + .constructMaterial(); + public static Materials Propene = new MaterialBuilder(678, TextureSet.SET_FLUID, "Propene") + .addCell() + .addGas() + .setRGB(255, 221, 85) + .setColor(Dyes.dyeYellow) + .setFuelType(MaterialBuilder.GAS) + .setFuelPower(192) + .setMaterialList(new MaterialStack(Carbon, 3), new MaterialStack(Hydrogen, 6)) + .addElectrolyzerRecipe() + .setCanBeCracked(true) + .constructMaterial(); + public static Materials VinylAcetate = new MaterialBuilder(679, TextureSet.SET_FLUID, "Vinyl Acetate") + .addCell() + .addFluid() + .setRGB(255, 179, 128) + .setColor(Dyes.dyeOrange) + .setMaterialList(new MaterialStack(Carbon, 4), new MaterialStack(Hydrogen, 6), new MaterialStack(Oxygen, 2)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials PolyvinylAcetate = new MaterialBuilder(680, TextureSet.SET_FLUID, "Polyvinyl Acetate") + .addCell() + .addFluid() + .setRGB(255, 153, 85) + .setColor(Dyes.dyeOrange) + .setMaterialList(new MaterialStack(Carbon, 4), new MaterialStack(Hydrogen, 6), new MaterialStack(Oxygen, 2)) + .constructMaterial(); + public static Materials MethylAcetate = new MaterialBuilder(681, TextureSet.SET_FLUID, "Methyl Acetate") + .addCell() + .addFluid() + .setRGB(238, 198, 175) + .setColor(Dyes.dyeOrange) + .setMaterialList(new MaterialStack(Carbon, 3), new MaterialStack(Hydrogen, 6), new MaterialStack(Oxygen, 2)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials AllylChloride = new MaterialBuilder(682, TextureSet.SET_FLUID, "Allyl Chloride") + .addCell() + .addFluid() + .setRGB(135, 222, 170) + .setColor(Dyes.dyeCyan) + .setMaterialList( + new MaterialStack(Carbon, 3), new MaterialStack(Hydrogen, 5), new MaterialStack(Chlorine, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials HydrochloricAcid = new MaterialBuilder(683, TextureSet.SET_FLUID, "Hydrochloric Acid") + .setName("HydrochloricAcid_GT5U") + .addCell() + .addFluid() + .setRGB(183, 200, 196) + .setColor(Dyes.dyeLightGray) + .setMaterialList(new MaterialStack(Hydrogen, 1), new MaterialStack(Chlorine, 1)) + .constructMaterial(); + public static Materials HypochlorousAcid = new MaterialBuilder(684, TextureSet.SET_FLUID, "Hypochlorous Acid") + .addCell() + .addFluid() + .setRGB(111, 138, 145) + .setColor(Dyes.dyeGray) + .setMaterialList( + new MaterialStack(Hydrogen, 1), new MaterialStack(Chlorine, 1), new MaterialStack(Oxygen, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials SodiumOxide = new MaterialBuilder(744, TextureSet.SET_DULL, "Sodium Oxide") + .setName("SodiumOxide") + .addDustItems() + .setRGB(255, 255, 235) + .setColor(Dyes.dyeWhite) + .setMaterialList(new MaterialStack(Sodium, 2), new MaterialStack(Oxygen, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials SodiumHydroxide = new MaterialBuilder(685, TextureSet.SET_DULL, "Sodium Hydroxide") + .setName("SodiumHydroxide_GT5U") + .addDustItems() + .setRGB(0, 51, 128) + .setColor(Dyes.dyeBlue) + .setMaterialList(new MaterialStack(Sodium, 1), new MaterialStack(Oxygen, 1), new MaterialStack(Hydrogen, 1)) + .constructMaterial(); + public static Materials Benzene = new MaterialBuilder(686, TextureSet.SET_FLUID, "Benzene") + .addCell() + .addFluid() + .setRGB(26, 26, 26) + .setColor(Dyes.dyeGray) + .setFuelType(MaterialBuilder.GAS) + .setFuelPower(360) + .setMaterialList(new MaterialStack(Carbon, 6), new MaterialStack(Hydrogen, 6)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials Phenol = new MaterialBuilder(687, TextureSet.SET_FLUID, "Phenol") + .addCell() + .addFluid() + .setRGB(120, 68, 33) + .setColor(Dyes.dyeBrown) + .setFuelType(MaterialBuilder.GAS) + .setFuelPower(288) + .setMaterialList(new MaterialStack(Carbon, 6), new MaterialStack(Hydrogen, 6), new MaterialStack(Oxygen, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials Cumene = new MaterialBuilder(688, TextureSet.SET_FLUID, "Isopropylbenzene") + .addCell() + .addFluid() + .setRGB(85, 34, 0) + .setColor(Dyes.dyeBrown) + .setMaterialList(new MaterialStack(Carbon, 9), new MaterialStack(Hydrogen, 12)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials PhosphoricAcid = new MaterialBuilder(689, TextureSet.SET_FLUID, "Phosphoric Acid") + .setName("PhosphoricAcid_GT5U") + .addCell() + .addFluid() + .setRGB(220, 220, 0) + .setColor(Dyes.dyeYellow) + .setMaterialList( + new MaterialStack(Hydrogen, 3), new MaterialStack(Phosphorus, 1), new MaterialStack(Oxygen, 4)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials SaltWater = new MaterialBuilder(692, TextureSet.SET_FLUID, "Salt Water") + .addCell() + .addFluid() + .setRGB(0, 0, 200) + .setColor(Dyes.dyeBlue) + .constructMaterial(); + public static Materials IronIIIChloride = new MaterialBuilder(693, TextureSet.SET_FLUID, "Iron III Chloride") + .setName("IronIIIChloride") + .addCell() + .addFluid() + .setRGB(22, 21, 14) + .setColor(Dyes.dyeBlack) + .setMaterialList(new MaterialStack(Chlorine, 3), new MaterialStack(Iron, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials LifeEssence = new MaterialBuilder(694, TextureSet.SET_FLUID, "Life") + .setName("lifeessence") + .addCell() + .addFluid() + .setFuelPower(100) + .setFuelType(5) + .setRGB(110, 3, 3) + .setColor(Dyes.dyeRed) + .setMaterialList() + .constructMaterial(); + + // Roasted Ore Dust + public static Materials RoastedCopper = new MaterialBuilder(546, TextureSet.SET_DULL, "Roasted Copper") + .setName("RoastedCopper") + .addDustItems() + .setRGB(77, 18, 18) + .constructMaterial(); + public static Materials RoastedAntimony = new MaterialBuilder(547, TextureSet.SET_DULL, "Roasted Antimony") + .setName("RoastedAntimony") + .addDustItems() + .setRGB(196, 178, 194) + .constructMaterial(); + public static Materials RoastedIron = new MaterialBuilder(548, TextureSet.SET_DULL, "Roasted Iron") + .setName("RoastedIron") + .addDustItems() + .setRGB(148, 98, 98) + .addOreItems() + .constructMaterial(); + public static Materials RoastedNickel = new MaterialBuilder(549, TextureSet.SET_METALLIC, "Roasted Nickel") + .setName("RoastedNickel") + .addDustItems() + .setRGB(70, 140, 45) + .addOreItems() + .constructMaterial(); + public static Materials RoastedZinc = new MaterialBuilder(550, TextureSet.SET_DULL, "Roasted Zinc") + .setName("RoastedZinc") + .addDustItems() + .setRGB(209, 209, 209) + .constructMaterial(); + public static Materials RoastedCobalt = new MaterialBuilder(551, TextureSet.SET_METALLIC, "Roasted Cobalt") + .setName("RoastedCobalt") + .addDustItems() + .setRGB(8, 64, 9) + .constructMaterial(); + public static Materials RoastedArsenic = new MaterialBuilder(552, TextureSet.SET_SHINY, "Roasted Arsenic") + .setName("RoastedArsenic") + .addDustItems() + .setRGB(240, 240, 240) + .constructMaterial(); + public static Materials RoastedLead = new MaterialBuilder(553, TextureSet.SET_SHINY, "Roasted Lead") + .setName("RoastedLead") + .addDustItems() + .setRGB(168, 149, 43) + .constructMaterial(); + + // Silicon Line + public static Materials SiliconSG = new Materials( + 856, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 2 | 8 | 32, + 80, + 80, + 100, + 0, + "SiliconSolarGrade", + "Silicon Solar Grade (Poly SI)", + 0, + 0, + 2273, + 2273, + true, + false, + 1, + 1, + 1, + Dyes.dyeBlack, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 4), new TC_AspectStack(TC_Aspects.TENEBRAE, 2))); + public static Materials CalciumDisilicide = new Materials( + 971, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 8, + 180, + 180, + 180, + 0, + "CalciumDisilicide", + "Calcium Disilicide", + 0, + 0, + 1313, + -1, + false, + false, + 1, + 1, + 1, + Dyes.dyeGray, + 1, + Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Silicon, 2)), + Arrays.asList(new TC_AspectStack(TC_Aspects.TERRA, 1), new TC_AspectStack(TC_Aspects.ORDO, 1))); // CaSi2 + public static Materials SiliconTetrafluoride = new MaterialBuilder( + 967, TextureSet.SET_FLUID, "Silicon Tetrafluoride") + .setName("SiliconTetrafluoride") + .addCell() + .addGas() + .setTransparent(true) + .setRGB(200, 200, 200) + .setColor(Dyes.dyeWhite) + .setMeltingPoint(178) + .setMaterialList(new MaterialStack(Silicon, 1), new MaterialStack(Fluorine, 4)) + .setAspects( + Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 1), new TC_AspectStack(TC_Aspects.VENENUM, 1))) + .constructMaterial(); // SIF4 + public static Materials SiliconTetrachloride = new MaterialBuilder( + 968, TextureSet.SET_FLUID, "Silicon Tetrachloride") + .setName("SiliconTetrachloride") + .addCell() + .addFluid() + .setRGB(220, 220, 220) + .setColor(Dyes.dyeWhite) + .setMeltingPoint(204) + .setMaterialList(new MaterialStack(Silicon, 1), new MaterialStack(Chlorine, 4)) + .setAspects( + Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 1), new TC_AspectStack(TC_Aspects.VENENUM, 1))) + .constructMaterial(); // SICL4 + public static Materials Trichlorosilane = new MaterialBuilder(972, TextureSet.SET_FLUID, "Trichlorosilane") + .setName("Trichlorosilane") + .addCell() + .addFluid() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeWhite) + .setMeltingPoint(139) + .setMaterialList( + new MaterialStack(Hydrogen, 1), new MaterialStack(Silicon, 1), new MaterialStack(Chlorine, 3)) + .setAspects( + Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 1), new TC_AspectStack(TC_Aspects.VENENUM, 1))) + .constructMaterial(); // HSICL3 + public static Materials Hexachlorodisilane = new MaterialBuilder(973, TextureSet.SET_FLUID, "Hexachlorodisilane") + .setName("Hexachlorodisilane") + .addCell() + .addFluid() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeWhite) + .setMeltingPoint(272) + .setExtraData(1) + .setMaterialList(new MaterialStack(Silicon, 2), new MaterialStack(Chlorine, 6)) + .setAspects(Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))) + .constructMaterial(); // SI2CL6 + public static Materials Dichlorosilane = new MaterialBuilder(799, TextureSet.SET_FLUID, "Dichlorosilane") + .setName("Dichlorosilane") + .addCell() + .addGas() + .setTransparent(true) + .setRGB(255, 255, 255) + .setColor(Dyes.dyeWhite) + .setMeltingPoint(151) + .setExtraData(1) + .setMaterialList( + new MaterialStack(Silicon, 1), new MaterialStack(Hydrogen, 2), new MaterialStack(Chlorine, 2)) + .setAspects( + Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 1), new TC_AspectStack(TC_Aspects.VENENUM, 1))) + .constructMaterial(); // SIH2CL2 + public static Materials Silane = new MaterialBuilder(798, TextureSet.SET_FLUID, "Silane") + .setName("Silane") + .addCell() + .addGas() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeWhite) + .setMeltingPoint(88) + .setMaterialList(new MaterialStack(Silicon, 1), new MaterialStack(Hydrogen, 4)) + .setAspects(Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))) + .constructMaterial(); // SIH4 + public static Materials Calciumhydride = new Materials( + 797, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 8, + 220, + 220, + 220, + 0, + "CalciumHydride", + "Calcium Hydride", + 0, + 0, + 1089, + -1, + false, + false, + 1, + 1, + 1, + Dyes.dyeGray, + 1, + Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Hydrogen, 2)), + Arrays.asList(new TC_AspectStack(TC_Aspects.TERRA, 1), new TC_AspectStack(TC_Aspects.ORDO, 1))); // CaH2 + public static Materials AluminiumFluoride = new Materials( + 969, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 8, + 255, + 255, + 255, + 0, + "Aluminiumfluoride", + "Aluminium Fluoride", + 0, + 0, + 1533, + -1, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + 1, + Arrays.asList(new MaterialStack(Aluminium, 1), new MaterialStack(Fluorine, 3)), + Arrays.asList(new TC_AspectStack(TC_Aspects.TERRA, 1), new TC_AspectStack(TC_Aspects.ORDO, 1))); // ALF3 + + public static Materials SolderingAlloy = new Materials( + 314, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1 | 2, + 220, + 220, + 230, + 0, + "SolderingAlloy", + "Soldering Alloy", + 0, + 0, + 400, + 400, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + 2, + Arrays.asList(new MaterialStack(Tin, 9), new MaterialStack(Antimony, 1))); + public static Materials GalliumArsenide = new Materials( + 980, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1 | 2, + 160, + 160, + 160, + 0, + "GalliumArsenide", + "Gallium Arsenide", + 0, + 0, + -1, + 1200, + true, + false, + 1, + 1, + 1, + Dyes.dyeGray, + 2, + Arrays.asList(new MaterialStack(Arsenic, 1), new MaterialStack(Gallium, 1))); + public static Materials IndiumGalliumPhosphide = new Materials( + 981, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1 | 2, + 160, + 140, + 190, + 0, + "IndiumGalliumPhosphide", + "Indium Gallium Phosphide", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLightGray, + 2, + Arrays.asList( + new MaterialStack(Indium, 1), new MaterialStack(Gallium, 1), new MaterialStack(Phosphorus, 1))); + public static Materials Spessartine = new Materials( + 838, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 8, + 255, + 100, + 100, + 0, + "Spessartine", + "Spessartine", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeRed, + 1, + Arrays.asList( + new MaterialStack(Aluminium, 2), + new MaterialStack(Manganese, 3), + new MaterialStack(Silicon, 3), + new MaterialStack(Oxygen, 12))); + public static Materials Sphalerite = new Materials( + 839, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1 | 8, + 255, + 255, + 255, + 0, + "Sphalerite", + "Sphalerite", + 0, + 0, + -1, + 0, + false, + false, + 2, + 1, + 1, + Dyes.dyeYellow, + 1, + Arrays.asList(new MaterialStack(Zinc, 1), new MaterialStack(Sulfur, 1))); + public static Materials StainlessSteel = new Materials( + 306, + TextureSet.SET_SHINY, + 7.0F, + 480, + 4, + 1 | 2 | 64 | 128, + 200, + 200, + 220, + 0, + "StainlessSteel", + "Stainless Steel", + 0, + 0, + -1, + 1700, + true, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + 1, + Arrays.asList( + new MaterialStack(Iron, 6), + new MaterialStack(Chrome, 1), + new MaterialStack(Manganese, 1), + new MaterialStack(Nickel, 1))); + public static Materials Steel = new Materials( + 305, + TextureSet.SET_METALLIC, + 6.0F, + 512, + 3, + 1 | 2 | 64 | 128, + 128, + 128, + 128, + 0, + "Steel", + "Steel", + 0, + 0, + 1811, + 1000, + true, + false, + 4, + 51, + 50, + Dyes.dyeGray, + 1, + Arrays.asList(new MaterialStack(Iron, 50), new MaterialStack(Carbon, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ORDO, 1))); + public static Materials Stibnite = new Materials( + 945, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 8, + 70, + 70, + 70, + 0, + "Stibnite", + "Stibnite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + 2, + Arrays.asList(new MaterialStack(Antimony, 2), new MaterialStack(Sulfur, 3))); + public static Materials SulfuricAcid = new Materials( + 720, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16, + 255, + 128, + 0, + 0, + "SulfuricAcid", + "Sulfuric Acid", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeOrange, + 1, + Arrays.asList(new MaterialStack(Hydrogen, 2), new MaterialStack(Sulfur, 1), new MaterialStack(Oxygen, 4))); + public static Materials Tanzanite = new Materials( + 508, + TextureSet.SET_GEM_VERTICAL, + 7.0F, + 256, + 2, + 1 | 4 | 8 | 64, + 64, + 0, + 200, + 127, + "Tanzanite", + "Tanzanite", + 0, + 0, + -1, + 0, + false, + true, + 5, + 1, + 1, + Dyes.dyePurple, + 1, + Arrays.asList( + new MaterialStack(Calcium, 2), + new MaterialStack(Aluminium, 3), + new MaterialStack(Silicon, 3), + new MaterialStack(Hydrogen, 1), + new MaterialStack(Oxygen, 13)), + Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 5), new TC_AspectStack(TC_Aspects.VITREUS, 3))); + public static Materials Tetrahedrite = new Materials( + 840, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 8, + 200, + 32, + 0, + 0, + "Tetrahedrite", + "Tetrahedrite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeRed, + 2, + Arrays.asList( + new MaterialStack(Copper, 3), + new MaterialStack(Antimony, 1), + new MaterialStack(Sulfur, 3), + new MaterialStack(Iron, 1))); // Cu3SbS3 + x(Fe,Zn)6Sb2S9 + public static Materials TinAlloy = new Materials( + 363, + TextureSet.SET_METALLIC, + 6.5F, + 96, + 2, + 1 | 2 | 64 | 128, + 200, + 200, + 200, + 0, + "TinAlloy", + "Tin Alloy", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + 2, + Arrays.asList(new MaterialStack(Tin, 1), new MaterialStack(Iron, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))); + public static Materials Topaz = new Materials( + 507, + TextureSet.SET_GEM_HORIZONTAL, + 7.0F, + 256, + 3, + 1 | 4 | 8 | 64, + 255, + 128, + 0, + 127, + "Topaz", + "Topaz", + 0, + 0, + -1, + 0, + false, + true, + 5, + 1, + 1, + Dyes.dyeOrange, + 1, + Arrays.asList( + new MaterialStack(Aluminium, 2), + new MaterialStack(Silicon, 1), + new MaterialStack(Fluorine, 2), + new MaterialStack(Hydrogen, 2), + new MaterialStack(Oxygen, 6)), + Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 6), new TC_AspectStack(TC_Aspects.VITREUS, 4))); + public static Materials Tungstate = new Materials( + 841, + TextureSet.SET_DULL, + 1.0F, + 0, + 3, + 1 | 8, + 55, + 50, + 35, + 0, + "Tungstate", + "Tungstate", + 0, + 0, + 2500, + 2500, + true, + false, + 4, + 1, + 1, + Dyes.dyeBlack, + 0, + Arrays.asList(new MaterialStack(Tungsten, 1), new MaterialStack(Lithium, 2), new MaterialStack(Oxygen, 4))); + public static Materials Ultimet = new Materials( + 344, + TextureSet.SET_SHINY, + 9.0F, + 2048, + 4, + 1 | 2 | 64 | 128, + 180, + 180, + 230, + 0, + "Ultimet", + "Ultimet", + 0, + 0, + 2700, + 2700, + true, + false, + 1, + 1, + 1, + Dyes.dyeLightBlue, + 1, + Arrays.asList( + new MaterialStack(Cobalt, 5), + new MaterialStack(Chrome, 2), + new MaterialStack(Nickel, 1), + new MaterialStack( + Molybdenum, + 1))); // 54% Cobalt, 26% Chromium, 9% Nickel, 5% Molybdenum, 3% Iron, 2% Tungsten, 0.8% + // Manganese, 0.3% Silicon, 0.08% Nitrogen and 0.06% Carbon + public static Materials Uraninite = new Materials( + 922, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 3, + 1 | 8, + 35, + 35, + 35, + 0, + "Uraninite", + "Uraninite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLime, + 2, + Arrays.asList(new MaterialStack(Uranium, 1), new MaterialStack(Oxygen, 2))); + public static Materials Uvarovite = new Materials( + 842, + TextureSet.SET_DIAMOND, + 1.0F, + 0, + 2, + 1 | 8, + 180, + 255, + 180, + 0, + "Uvarovite", + "Uvarovite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeGreen, + 1, + Arrays.asList( + new MaterialStack(Calcium, 3), + new MaterialStack(Chrome, 2), + new MaterialStack(Silicon, 3), + new MaterialStack(Oxygen, 12))); + public static Materials VanadiumGallium = new Materials( + 357, + TextureSet.SET_SHINY, + 1.0F, + 0, + 2, + 1 | 2 | 128, + 128, + 128, + 140, + 0, + "VanadiumGallium", + "Vanadium-Gallium", + 0, + 0, + 4500, + 4500, + true, + false, + 1, + 1, + 1, + Dyes.dyeGray, + 2, + Arrays.asList(new MaterialStack(Vanadium, 3), new MaterialStack(Gallium, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Wood = new Materials( + 809, + TextureSet.SET_WOOD, + 2.0F, + 16, + 0, + 1 | 2 | 64 | 128, + 100, + 50, + 0, + 0, + "Wood", + "Wood", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBrown, + 0, + Arrays.asList(new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 1), new MaterialStack(Hydrogen, 1)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.ARBOR, 2))); + public static Materials WroughtIron = new Materials( + 304, + TextureSet.SET_METALLIC, + 6.0F, + 384, + 2, + 1 | 2 | 64 | 128, + 200, + 180, + 180, + 0, + "WroughtIron", + "Wrought Iron", + 0, + 0, + 1811, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeLightGray, + 2, + Collections.singletonList(new MaterialStack(Iron, 1))); + public static Materials Wulfenite = new Materials( + 882, + TextureSet.SET_DULL, + 1.0F, + 0, + 3, + 1 | 8, + 255, + 128, + 0, + 0, + "Wulfenite", + "Wulfenite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeOrange, + 2, + Arrays.asList(new MaterialStack(Lead, 1), new MaterialStack(Molybdenum, 1), new MaterialStack(Oxygen, 4))); + public static Materials YellowLimonite = new Materials( + 931, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 8, + 200, + 200, + 0, + 0, + "YellowLimonite", + "Yellow Limonite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeYellow, + 2, + Arrays.asList( + new MaterialStack(Iron, 1), + new MaterialStack(Hydrogen, 1), + new MaterialStack(Oxygen, 2))); // FeO(OH) + a bit of Ni and Co + public static Materials YttriumBariumCuprate = new Materials( + 358, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 2, + 80, + 64, + 70, + 0, + "YttriumBariumCuprate", + "Yttrium Barium Cuprate", + 0, + 0, + 4500, + 4500, + true, + false, + 1, + 1, + 1, + Dyes.dyeGray, + 0, + Arrays.asList( + new MaterialStack(Yttrium, 1), + new MaterialStack(Barium, 2), + new MaterialStack(Copper, 3), + new MaterialStack(Oxygen, 7))); /** * Second Degree Compounds */ - public static Materials WoodSealed = new Materials( 889, TextureSet.SET_WOOD , 3.0F, 24, 0, 1|2 |64|128 , 80, 40, 0, 0, "WoodSealed" , "Sealed Wood" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBrown , 0, Collections.singletonList(new MaterialStack(Wood, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.ARBOR, 2), new TC_AspectStack(TC_Aspects.FABRICO, 1))); - public static Materials LiveRoot = new Materials( 832, TextureSet.SET_WOOD , 1.0F, 0, 1, 1 , 220, 200, 0, 0, "LiveRoot" , "Liveroot" , 5, 16, -1, 0, false, false, 2, 4, 3, Dyes.dyeBrown , 2, Arrays.asList(new MaterialStack(Wood, 3), new MaterialStack(Magic, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.ARBOR, 2), new TC_AspectStack(TC_Aspects.VICTUS, 2), new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1))); - public static Materials IronWood = new Materials( 338, TextureSet.SET_WOOD , 6.0F, 384, 2, 1|2 |64|128 , 150, 140, 110, 0, "IronWood" , "Ironwood" , 5, 8, -1, 0, false, false, 2, 19, 18, Dyes.dyeBrown , 2, Arrays.asList(new MaterialStack(Iron, 9), new MaterialStack(LiveRoot, 9), new MaterialStack(Gold, 1))); - public static Materials Glass = new Materials( 890, TextureSet.SET_GLASS , 1.0F, 4, 0, 1 |4 , 250, 250, 250, 220, "Glass" , "Glass" , 0, 0, 1500, 0, false, true, 1, 1, 1, Dyes.dyeWhite , 2, Collections.singletonList(new MaterialStack(SiliconDioxide, 1)), Collections.singletonList(new TC_AspectStack(TC_Aspects.VITREUS, 2))); - public static Materials BorosilicateGlass = new MaterialBuilder(611, TextureSet.SET_GLASS , "Borosilicate Glass").addDustItems().addMetalItems().setRGB(230, 243, 230).setColor(Dyes.dyeWhite).setMaterialList(new MaterialStack(Boron, 1), new MaterialStack(Glass, 7)).addCentrifugeRecipe().constructMaterial(); - public static Materials Perlite = new Materials( 925, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 30, 20, 30, 0, "Perlite" , "Perlite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Obsidian, 2), new MaterialStack(Water, 1))); - public static Materials Borax = new Materials( 941, TextureSet.SET_FINE , 1.0F, 0, 1, 1 |8 , 250, 250, 250, 0, "Borax" , "Borax" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Sodium, 2), new MaterialStack(Boron, 4), new MaterialStack(Oxygen, 7), new MaterialStack(Water, 10))); - public static Materials Lignite = new Materials( 538, TextureSet.SET_LIGNITE , 1.0F, 0, 0, 1 |4|8 , 100, 70, 70, 0, "Lignite" , "Lignite Coal" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack , 1, Arrays.asList(new MaterialStack(Carbon, 3), new MaterialStack(Water, 1))); - public static Materials Olivine = new Materials( 505, TextureSet.SET_RUBY , 7.0F, 256, 2, 1 |4|8 |64 , 150, 255, 150, 127, "Olivine" , "Olivine" , 0, 0, -1, 0, false, true, 5, 1, 1, Dyes.dyeLime , 1, Arrays.asList(new MaterialStack(Magnesium, 2), new MaterialStack(Iron, 1), new MaterialStack(SiliconDioxide, 2)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 4), new TC_AspectStack(TC_Aspects.VITREUS, 2))); - public static Materials Opal = new Materials( 510, TextureSet.SET_OPAL , 7.0F, 256, 2, 1 |4|8 |64 , 0, 0, 255, 0, "Opal" , "Opal" , 0, 0, -1, 0, false, true, 3, 1, 1, Dyes.dyeBlue , 1, Collections.singletonList(new MaterialStack(SiliconDioxide, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 5), new TC_AspectStack(TC_Aspects.VITREUS, 3))); - public static Materials Amethyst = new Materials( 509, TextureSet.SET_FLINT , 7.0F, 256, 3, 1 |4|8 |64 , 210, 50, 210, 127, "Amethyst" , "Amethyst" , 0, 0, -1, 0, false, true, 3, 1, 1, Dyes.dyePink , 1, Arrays.asList(new MaterialStack(SiliconDioxide, 4), new MaterialStack(Iron, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 6), new TC_AspectStack(TC_Aspects.VITREUS, 4))); - public static Materials Redstone = new Materials( 810, TextureSet.SET_ROUGH , 1.0F, 0, 2, 1 |8 , 200, 0, 0, 0, "Redstone" , "Redstone" , 0, 0, 500, 0, false, false, 3, 1, 1, Dyes.dyeRed , 2, Arrays.asList(new MaterialStack(Silicon, 1), new MaterialStack(Pyrite, 5), new MaterialStack(Ruby, 1), new MaterialStack(Mercury, 3)), Arrays.asList(new TC_AspectStack(TC_Aspects.MACHINA, 1), new TC_AspectStack(TC_Aspects.POTENTIA, 2))); - public static Materials Lapis = new Materials( 526, TextureSet.SET_LAPIS , 1.0F, 0, 1, 1 |4|8 , 70, 70, 220, 0, "Lapis" , "Lapis" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeBlue , 2, Arrays.asList(new MaterialStack(Lazurite, 12), new MaterialStack(Sodalite, 2), new MaterialStack(Pyrite, 1), new MaterialStack(Calcite, 1)), Collections.singletonList(new TC_AspectStack(TC_Aspects.SENSUS, 1))); - public static Materials Blaze = new Materials( 801, TextureSet.SET_POWDER , 2.0F, 16, 1, 1 |64 , 255, 200, 0, 0, "Blaze" , "Blaze" , 0, 0, 6400, 0, false, false, 2, 3, 2, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(DarkAsh, 1), new MaterialStack(Sulfur, 1), new MaterialStack(Magic, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 2), new TC_AspectStack(TC_Aspects.IGNIS, 4))); - public static Materials EnderPearl = new Materials( 532, TextureSet.SET_SHINY , 1.0F, 16, 1, 1 |4 , 108, 220, 200, 0, "EnderPearl" , "Enderpearl" , 0, 0, -1, 0, false, false, 1, 16, 10, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(Beryllium, 1), new MaterialStack(Potassium, 4), new MaterialStack(Nitrogen, 5), new MaterialStack(Magic, 6)), Arrays.asList(new TC_AspectStack(TC_Aspects.ALIENIS, 4), new TC_AspectStack(TC_Aspects.ITER, 4), new TC_AspectStack(TC_Aspects.PRAECANTATIO, 2))); - public static Materials EnderEye = new Materials( 533, TextureSet.SET_SHINY , 1.0F, 16, 1, 1 |4 , 160, 250, 230, 0, "EnderEye" , "Endereye" , 5, 10, -1, 0, false, false, 1, 2, 1, Dyes.dyeGreen , 2, Arrays.asList(new MaterialStack(EnderPearl, 1), new MaterialStack(Blaze, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.SENSUS, 4), new TC_AspectStack(TC_Aspects.ALIENIS, 4), new TC_AspectStack(TC_Aspects.ITER, 4), new TC_AspectStack(TC_Aspects.PRAECANTATIO, 3), new TC_AspectStack(TC_Aspects.IGNIS, 2))); - public static Materials Flint = new Materials( 802, TextureSet.SET_FLINT , 2.5F, 128, 1, 1 |64 , 0, 32, 64, 0, "Flint" , "Flint" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeGray , 2, Collections.singletonList(new MaterialStack(SiliconDioxide, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.TERRA, 1), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))); - public static Materials Diatomite = new Materials( 948, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 225, 225, 225, 0, "Diatomite" , "Diatomite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeGray , 2, Arrays.asList(new MaterialStack(Flint, 8), new MaterialStack(BandedIron, 1), new MaterialStack(Sapphire, 1))); - public static Materials VolcanicAsh = new Materials( 940, TextureSet.SET_FLINT , 1.0F, 0, 0, 1 , 60, 50, 50, 0, "VolcanicAsh" , "Volcanic Ashes" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Flint, 6), new MaterialStack(Iron, 1), new MaterialStack(Magnesium, 1))); - public static Materials Niter = new Materials( 531, TextureSet.SET_FLINT , 1.0F, 0, 1, 1 |4|8 , 255, 200, 200, 0, "Niter" , "Niter" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyePink , 2, Collections.singletonList(new MaterialStack(Saltpeter, 1))); - public static Materials Pyrotheum = new Materials( 843, TextureSet.SET_FIERY , 1.0F, 0, 1, 1 , 255, 128, 0, 0, "Pyrotheum" , "Pyrotheum" , 2, 62, -1, 0, false, false, 2, 3, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Coal, 1), new MaterialStack(Redstone, 1), new MaterialStack(Blaze, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 2), new TC_AspectStack(TC_Aspects.IGNIS, 1))); - public static Materials Cryotheum = new Materials( 898, TextureSet.SET_SHINY , 1.0F, 0, 1, 1 , 0, 148, 203, 0, "Cryotheum" , "Cryotheum" , 2, 62, -1, 0, false, false, 2, 3, 1, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Saltpeter, 1), new MaterialStack(Redstone, 1), new MaterialStack(Snow, 1), new MaterialStack(Blizz, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 2), new TC_AspectStack(TC_Aspects.ELECTRUM, 1), new TC_AspectStack(TC_Aspects.GELUM, 1))); - public static Materials HydratedCoal = new Materials( 818, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 , 70, 70, 100, 0, "HydratedCoal" , "Hydrated Coal" , 0, 0, -1, 0, false, false, 1, 9, 8, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Coal, 8), new MaterialStack(Water, 1))); - public static Materials Apatite = new Materials( 530, TextureSet.SET_DIAMOND , 1.0F, 0, 1, 1 |4|8 , 200, 200, 255, 0, "Apatite" , "Apatite" , 0, 0, -1, 0, false, false, 2, 1, 1, Dyes.dyeCyan , 1, Arrays.asList(new MaterialStack(Calcium, 5), new MaterialStack(Phosphate, 3), new MaterialStack(Chlorine, 1)), Collections.singletonList(new TC_AspectStack(TC_Aspects.MESSIS, 2))); - public static Materials Alumite = new Materials( 400, TextureSet.SET_METALLIC , 5.0F, 768, 2, 1|2 |64|128 , 255, 105, 180, 0, "Alumite" , "Alumite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyePink , 2, Arrays.asList(new MaterialStack(Aluminium, 5), new MaterialStack(Steel, 2), new MaterialStack(Obsidian, 2)), Collections.singletonList(new TC_AspectStack(TC_Aspects.STRONTIO, 2))); - public static Materials Manyullyn = new Materials( 386, TextureSet.SET_SHINY , 25.0F, 2048, 5, 1|2 |8 |64|128 , 154, 76, 185, 0, "Manyullyn" , "Manyullyn" , 0, 0, 3600, 3600, true, false, 1, 1, 1, Dyes.dyePurple , 2, Arrays.asList(new MaterialStack(Cobalt, 1), new MaterialStack(Ardite, 1)), Collections.singletonList(new TC_AspectStack(TC_Aspects.STRONTIO, 2))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Steeleaf = new Materials( 339, TextureSet.SET_LEAF , 8.0F, 768, 3, 1|2 |64|128 , 50, 127, 50, 0, "Steeleaf" , "Steeleaf" , 5, 24, -1, 0, false, false, 4, 1, 1, Dyes.dyeGreen , 2, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Magic, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.HERBA, 2), new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1))); - public static Materials Knightmetal = new Materials( 362, TextureSet.SET_METALLIC , 8.0F, 1024, 3, 1|2 |64|128 , 210, 240, 200, 0, "Knightmetal" , "Knightmetal" , 5, 24, -1, 0, false, false, 4, 1, 1, Dyes.dyeLime , 2, Arrays.asList(new MaterialStack(Steel, 2), new MaterialStack(Magic, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 1), new TC_AspectStack(TC_Aspects.METALLUM, 2))); - public static Materials SterlingSilver = new Materials( 350, TextureSet.SET_SHINY , 13.0F, 128, 2, 1|2 |64|128 , 250, 220, 225, 0, "SterlingSilver" , "Sterling Silver" , 0, 0, -1, 1700, true, false, 4, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Copper, 1), new MaterialStack(Silver, 4))); - public static Materials RoseGold = new Materials( 351, TextureSet.SET_SHINY , 14.0F, 128, 2, 1|2 |64|128 , 255, 230, 30, 0, "RoseGold" , "Rose Gold" , 0, 0, -1, 1600, true, false, 4, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Copper, 1), new MaterialStack(Gold, 4))); - public static Materials BlackBronze = new Materials( 352, TextureSet.SET_DULL , 12.0F, 256, 2, 1|2 |64|128 , 100, 50, 125, 0, "BlackBronze" , "Black Bronze" , 0, 0, -1, 2000, true, false, 4, 1, 1, Dyes.dyePurple , 2, Arrays.asList(new MaterialStack(Gold, 1), new MaterialStack(Silver, 1), new MaterialStack(Copper, 3))); - public static Materials BismuthBronze = new Materials( 353, TextureSet.SET_DULL , 8.0F, 256, 2, 1|2 |64|128 , 100, 125, 125, 0, "BismuthBronze" , "Bismuth Bronze" , 0, 0, -1, 1100, true, false, 4, 1, 1, Dyes.dyeCyan , 2, Arrays.asList(new MaterialStack(Bismuth, 1), new MaterialStack(Zinc, 1), new MaterialStack(Copper, 3))); - public static Materials BlackSteel = new Materials( 334, TextureSet.SET_METALLIC , 6.5F, 768, 3, 1|2 |64|128 , 100, 100, 100, 0, "BlackSteel" , "Black Steel" , 0, 0, -1, 1200, true, false, 4, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Nickel, 1), new MaterialStack(BlackBronze, 1), new MaterialStack(Steel, 3))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials RedSteel = new Materials( 348, TextureSet.SET_METALLIC , 7.0F, 896, 4, 1|2 |64|128 , 140, 100, 100, 0, "RedSteel" , "Red Steel" , 0, 0, -1, 1300, true, false, 4, 1, 1, Dyes.dyeRed , 2, Arrays.asList(new MaterialStack(SterlingSilver, 1), new MaterialStack(BismuthBronze, 1), new MaterialStack(Steel, 2), new MaterialStack(BlackSteel, 4))); - public static Materials BlueSteel = new Materials( 349, TextureSet.SET_METALLIC , 7.5F, 1024, 4, 1|2 |64|128 , 100, 100, 140, 0, "BlueSteel" , "Blue Steel" , 0, 0, -1, 1400, true, false, 4, 1, 1, Dyes.dyeBlue , 2, Arrays.asList(new MaterialStack(RoseGold, 1), new MaterialStack(Brass, 1), new MaterialStack(Steel, 2), new MaterialStack(BlackSteel, 4))); - public static Materials DamascusSteel = new Materials( 335, TextureSet.SET_METALLIC , 8.0F, 1280, 3, 1|2 |64|128 , 110, 110, 110, 0, "DamascusSteel" , "Damascus Steel" , 0, 0, 2000, 1500, true, false, 4, 1, 1, Dyes.dyeGray , 2, Collections.singletonList(new MaterialStack(Steel, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials TungstenSteel = new Materials( 316, TextureSet.SET_METALLIC , 8.0F, 2560, 4, 1|2 |64|128 , 100, 100, 160, 0, "TungstenSteel" , "Tungstensteel" , 0, 0, -1, 3000, true, false, 4, 1, 1, Dyes.dyeBlue , 2, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Tungsten, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials NitroCoalFuel = new Materials( -1, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 50, 70, 50, 0, "NitroCoalFuel" , "Nitro-Coalfuel" , 0, 48, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack , 0, Arrays.asList(new MaterialStack(Glyceryl, 1), new MaterialStack(CoalFuel, 4))); - public static Materials NitroFuel = new Materials( 709, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 200, 255, 0, 0, "NitroFuel" , "Cetane-Boosted Diesel" , 0, 1000, -1, 0, false, false, 1, 1, 1, Dyes.dyeLime ); - public static Materials RedAlloy = new Materials( 308, TextureSet.SET_DULL , 1.0F, 0, 0, 1|2 , 200, 0, 0, 0, "RedAlloy" , "Red Alloy" , 0, 0, 500, 0, false, false, 3, 5, 1, Dyes.dyeRed , 2, Arrays.asList(new MaterialStack(Copper, 1), new MaterialStack(Redstone, 4)), Collections.singletonList(new TC_AspectStack(TC_Aspects.MACHINA, 3))); - public static Materials CobaltBrass = new Materials( 343, TextureSet.SET_METALLIC , 8.0F, 256, 2, 1|2 |64|128 , 180, 180, 160, 0, "CobaltBrass" , "Cobalt Brass" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Brass, 7), new MaterialStack(Aluminium, 1), new MaterialStack(Cobalt, 1))); - public static Materials TricalciumPhosphate = new Materials( 534, TextureSet.SET_FLINT , 1.0F, 0, 2, 1|4|8|16 , 255, 255, 0, 0, "TricalciumPhosphate" , "Tricalcium Phosphate" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Calcium, 3), new MaterialStack(Phosphate, 2))); - public static Materials Basalt = new Materials( 844, TextureSet.SET_ROUGH , 1.0F, 64, 1, 1 |64|128 , 30, 20, 20, 0, "Basalt" , "Basalt" , 0, 0, -1, 0, false, false, 2, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Olivine, 1), new MaterialStack(Calcite, 3), new MaterialStack(Flint, 8), new MaterialStack(DarkAsh, 4)), Collections.singletonList(new TC_AspectStack(TC_Aspects.TENEBRAE, 1))); - public static Materials GarnetRed = new Materials( 527, TextureSet.SET_RUBY , 7.0F, 128, 2, 1 |4|8 |64 , 200, 80, 80, 127, "GarnetRed" , "Red Garnet" , 0, 0, -1, 0, false, true, 4, 1, 1, Dyes.dyeRed , 2, Arrays.asList(new MaterialStack(Pyrope, 3), new MaterialStack(Almandine, 5), new MaterialStack(Spessartine, 8)), Collections.singletonList(new TC_AspectStack(TC_Aspects.VITREUS, 3))); - public static Materials GarnetYellow = new Materials( 528, TextureSet.SET_RUBY , 7.0F, 128, 2, 1 |4|8 |64 , 200, 200, 80, 127, "GarnetYellow" , "Yellow Garnet" , 0, 0, -1, 0, false, true, 4, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Andradite, 5), new MaterialStack(Grossular, 8), new MaterialStack(Uvarovite, 3)), Collections.singletonList(new TC_AspectStack(TC_Aspects.VITREUS, 3))); - public static Materials Marble = new Materials( 845, TextureSet.SET_FINE , 1.0F, 16, 1, 1 |64|128 , 200, 200, 200, 0, "Marble" , "Marble" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Magnesium, 1), new MaterialStack(Calcite, 7)), Collections.singletonList(new TC_AspectStack(TC_Aspects.PERFODIO, 1))); - public static Materials Sugar = new Materials( 803, TextureSet.SET_FINE , 1.0F, 0, 1, 1 , 250, 250, 250, 0, "Sugar" , "Sugar" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Carbon, 2), new MaterialStack(Water, 5), new MaterialStack(Oxygen, 25)), Arrays.asList(new TC_AspectStack(TC_Aspects.HERBA, 1), new TC_AspectStack(TC_Aspects.AQUA, 1), new TC_AspectStack(TC_Aspects.AER, 1))); - public static Materials Thaumium = new Materials( 330, TextureSet.SET_METALLIC , 12.0F, 256, 3, 1|2 |64|128 , 150, 100, 200, 0, "Thaumium" , "Thaumium" , 0, 0, -1, 0, false, false, 5, 2, 1, Dyes.dyePurple , 0, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Magic, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1))); - public static Materials Vinteum = new Materials( 529, TextureSet.SET_METALLIC , 10.0F, 128, 3, 1|2 |8 |64|128 , 100, 200, 255, 0, "Vinteum" , "Vinteum" , 5, 32, -1, 0, false, false, 4, 1, 1, Dyes.dyeLightBlue , 2, Collections.singletonList(new MaterialStack(Thaumium, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 2), new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1))); - public static Materials Vis = new Materials( -1, TextureSet.SET_SHINY , 1.0F, 0, 3, 0 , 128, 0, 255, 0, "Vis" , "Vis" , 5, 32, -1, 0, false, false, 1, 1, 1, Dyes.dyePurple , 2, Collections.singletonList(new MaterialStack(Magic, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.AURAM, 2), new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1))); - public static Materials Redrock = new Materials( 846, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 , 255, 80, 50, 0, "Redrock" , "Redrock" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeRed , 2, Arrays.asList(new MaterialStack(Calcite, 2), new MaterialStack(Flint, 1), new MaterialStack(Clay, 1))); - public static Materials PotassiumFeldspar = new Materials( 847, TextureSet.SET_FINE , 1.0F, 0, 1, 1 , 120, 40, 40, 0, "PotassiumFeldspar" , "Potassium Feldspar" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyePink , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Aluminium, 1), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 8))); - public static Materials Biotite = new Materials( 848, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1 , 20, 30, 20, 0, "Biotite" , "Biotite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeGray , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Magnesium, 3), new MaterialStack(Aluminium, 3), new MaterialStack(Fluorine, 2), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 10))); - public static Materials GraniteBlack = new Materials( 849, TextureSet.SET_ROUGH , 4.0F, 64, 3, 1 |64|128 , 10, 10, 10, 0, "GraniteBlack" , "Black Granite" , 0, 0, -1, 0, false, false, 0, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(SiliconDioxide, 4), new MaterialStack(Biotite, 1)), Collections.singletonList(new TC_AspectStack(TC_Aspects.TUTAMEN, 1))); - public static Materials GraniteRed = new Materials( 850, TextureSet.SET_ROUGH , 4.0F, 64, 3, 1 |64|128 , 255, 0, 128, 0, "GraniteRed" , "Red Granite" , 0, 0, -1, 0, false, false, 0, 1, 1, Dyes.dyeMagenta , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(PotassiumFeldspar, 1), new MaterialStack(Oxygen, 3)), Collections.singletonList(new TC_AspectStack(TC_Aspects.TUTAMEN, 1))); - public static Materials Chrysotile = new Materials( 912, TextureSet.SET_DULL , 32.0F, 10240, 3, 1|2 |8 |64|128 , 110, 140, 110, 0, "Chrysotile" , "Chrysotile" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 2, Collections.singletonList(new MaterialStack(Asbestos, 1))).disableAutoGeneratedBlastFurnaceRecipes().setTurbineMultipliers(280, 280, 1); - public static Materials Realgar = new Materials( 913, TextureSet.SET_DULL , 1.0F, 32, 1, 1|2 |8 |64|128 , 140, 100, 100, 0, "Realgar" , "Realgar" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Arsenic, 4), new MaterialStack(Sulfur,4))); - public static Materials VanadiumMagnetite = new Materials( 923, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 35, 35, 60, 0, "VanadiumMagnetite" , "Vanadium Magnetite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Magnetite, 1), new MaterialStack(Vanadium, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))); // Mixture of Fe3O4 and V2O5 - public static Materials BasalticMineralSand = new Materials( 935, TextureSet.SET_SAND , 1.0F, 0, 1, 1 |8 , 40, 50, 40, 0, "BasalticMineralSand" , "Basaltic Mineral Sand" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Magnetite, 1), new MaterialStack(Basalt, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))); - public static Materials GraniticMineralSand = new Materials( 936, TextureSet.SET_SAND , 1.0F, 0, 1, 1 |8 , 40, 60, 60, 0, "GraniticMineralSand" , "Granitic Mineral Sand" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Magnetite, 1), new MaterialStack(GraniteBlack, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))); - public static Materials GarnetSand = new Materials( 938, TextureSet.SET_SAND , 1.0F, 0, 1, 1 |8 , 200, 100, 0, 0, "GarnetSand" , "Garnet Sand" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(GarnetRed, 1), new MaterialStack(GarnetYellow, 1))); - public static Materials QuartzSand = new Materials( 939, TextureSet.SET_SAND , 1.0F, 0, 1, 1 |8 , 194, 178, 128, 0, "QuartzSand" , "Quartz Sand" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(CertusQuartz, 1), new MaterialStack(Quartzite, 1))); - public static Materials Bastnasite = new Materials( 905, TextureSet.SET_FINE , 1.0F, 0, 2, 1 |8 , 200, 110, 45, 0, "Bastnasite" , "Bastnasite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Cerium, 1), new MaterialStack(Carbon, 1), new MaterialStack(Fluorine, 1), new MaterialStack(Oxygen, 3))); // (Ce, La, Y)CO3F - public static Materials Pentlandite = new Materials( 909, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 165, 150, 5, 0, "Pentlandite" , "Pentlandite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Nickel, 9), new MaterialStack(Sulfur, 8))); // (Fe,Ni)9S8 - public static Materials Spodumene = new Materials( 920, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 190, 170, 170, 0, "Spodumene" , "Spodumene" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Lithium, 1), new MaterialStack(Aluminium, 1), new MaterialStack(Silicon, 2), new MaterialStack(Oxygen, 6))); // LiAl(SiO3)2 - public static Materials Pollucite = new Materials( 919, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 240, 210, 210, 0, "Pollucite" , "Pollucite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Caesium, 2), new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 4), new MaterialStack(Water, 2), new MaterialStack(Oxygen, 12))); // (Cs,Na)2Al2Si4O12 2H2O (also a source of Rb) - public static Materials Tantalite = new Materials( 921, TextureSet.SET_METALLIC , 1.0F, 0, 3, 1 |8 , 145, 80, 40, 0, "Tantalite" , "Tantalite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Manganese, 1), new MaterialStack(Tantalum, 2), new MaterialStack(Oxygen, 6))); // (Fe, Mn)Ta2O6 (also source of Nb) - public static Materials Lepidolite = new Materials( 907, TextureSet.SET_FINE , 1.0F, 0, 2, 1 |8 , 240, 50, 140, 0, "Lepidolite" , "Lepidolite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Lithium, 3), new MaterialStack(Aluminium, 4), new MaterialStack(Fluorine, 2), new MaterialStack(Oxygen, 10))); // K(Li,Al,Rb)3(Al,Si)4O10(F,OH)2 - public static Materials Glauconite = new Materials( 933, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 130, 180, 60, 0, "Glauconite" , "Glauconite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Magnesium, 2), new MaterialStack(Aluminium, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 12))); // (K,Na)(Fe3+,Al,Mg)2(Si,Al)4O10(OH)2 - public static Materials GlauconiteSand = new Materials( 949, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 130, 180, 60, 0, "GlauconiteSand" , "Glauconite Sand" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Magnesium, 2), new MaterialStack(Aluminium, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 12))); // (K,Na)(Fe3+,Al,Mg)2(Si,Al)4O10(OH)2 - public static Materials Vermiculite = new Materials( 932, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 200, 180, 15, 0, "Vermiculite" , "Vermiculite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Iron, 3), new MaterialStack(Aluminium, 4), new MaterialStack(Silicon, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Water, 4), new MaterialStack(Oxygen, 12))); // (Mg+2, Fe+2, Fe+3)3 [(AlSi)4O10] (OH)2 4H2O) - public static Materials Bentonite = new Materials( 927, TextureSet.SET_ROUGH , 1.0F, 0, 2, 1 |8 , 245, 215, 210, 0, "Bentonite" , "Bentonite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Sodium, 1), new MaterialStack(Magnesium, 6), new MaterialStack(Silicon, 12), new MaterialStack(Hydrogen, 6), new MaterialStack(Water, 5), new MaterialStack(Oxygen, 36))); // (Na,Ca)0.33(Al,Mg)2(Si4O10)(OH)2 nH2O - public static Materials FullersEarth = new Materials( 928, TextureSet.SET_FINE , 1.0F, 0, 2, 1 |8 , 160, 160, 120, 0, "FullersEarth" , "Fullers Earth" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Magnesium, 1), new MaterialStack(Silicon, 4), new MaterialStack(Hydrogen, 1), new MaterialStack(Water, 4), new MaterialStack(Oxygen, 11))); // (Mg,Al)2Si4O10(OH) 4(H2O) - public static Materials Pitchblende = new Materials( 873, TextureSet.SET_DULL , 1.0F, 0, 3, 1 |8 , 200, 210, 0, 0, "Pitchblende" , "Pitchblende" , 0, 0, -1, 0, false, false, 5, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Uraninite, 3), new MaterialStack(Thorium, 1), new MaterialStack(Lead, 1))); - public static Materials Monazite = new Materials( 520, TextureSet.SET_DIAMOND , 1.0F, 0, 1, 1 |4|8 , 50, 70, 50, 0, "Monazite" , "Monazite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(RareEarth, 1), new MaterialStack(Phosphate, 1))); // Wikipedia: (Ce, La, Nd, Th, Sm, Gd)PO4 Monazite also smelt-extract to Helium, it is brown like the rare earth Item Monazite sand deposits are inevitably of the monazite-(Ce) composition. Typically, the lanthanides in such monazites contain about 45.8% cerium, about 24% lanthanum, about 17% neodymium, about 5% praseodymium, and minor quantities of samarium, gadolinium, and yttrium. Europium concentrations tend to be low, about 0.05% Thorium content of monazite is variable. - public static Materials Malachite = new Materials( 871, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 5, 95, 5, 0, "Malachite" , "Malachite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(Copper, 2), new MaterialStack(Carbon, 1), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 5))); // Cu2CO3(OH)2 - public static Materials Mirabilite = new Materials( 900, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 240, 250, 210, 0, "Mirabilite" , "Mirabilite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Sodium, 2), new MaterialStack(Sulfur, 1), new MaterialStack(Water, 10), new MaterialStack(Oxygen, 4))); // Na2SO4 10H2O - public static Materials Mica = new Materials( 901, TextureSet.SET_FINE , 1.0F, 0, 1, 1 |8 , 195, 195, 205, 0, "Mica" , "Mica" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Aluminium, 3), new MaterialStack(Silicon, 3), new MaterialStack(Fluorine, 2), new MaterialStack(Oxygen, 10))); // KAl2(AlSi3O10)(F,OH)2 - public static Materials Trona = new Materials( 903, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1 |8 , 135, 135, 95, 0, "Trona" , "Trona" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Sodium, 3), new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 1), new MaterialStack(Water, 2), new MaterialStack(Oxygen, 6))); // Na3(CO3)(HCO3) 2H2O - public static Materials Barite = new Materials( 904, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 230, 235, 255, 0, "Barite" , "Barite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Barium, 1), new MaterialStack(Sulfur, 1), new MaterialStack(Oxygen, 4))); - public static Materials Gypsum = new Materials( 934, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 230, 230, 250, 0, "Gypsum" , "Gypsum" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Sulfur, 1), new MaterialStack(Oxygen, 4), new MaterialStack(Water, 2))); // CaSO4 2H2O - public static Materials Alunite = new Materials( 911, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 225, 180, 65, 0, "Alunite" , "Alunite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Aluminium, 3), new MaterialStack(Silicon, 2), new MaterialStack(Hydrogen, 6), new MaterialStack(Oxygen, 14))); // KAl3(SO4)2(OH)6 - public static Materials Dolomite = new Materials( 914, TextureSet.SET_FLINT , 1.0F, 0, 1, 1 |8 , 225, 205, 205, 0, "Dolomite" , "Dolomite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Magnesium, 1), new MaterialStack(Carbon, 2), new MaterialStack(Oxygen, 6))); // CaMg(CO3)2 - public static Materials Wollastonite = new Materials( 915, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 240, 240, 240, 0, "Wollastonite" , "Wollastonite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Silicon, 1), new MaterialStack(Oxygen, 3))); // CaSiO3 - public static Materials Zeolite = new Materials( 916, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 240, 230, 230, 0, "Zeolite" , "Zeolite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Sodium, 1), new MaterialStack(Calcium, 4), new MaterialStack(Silicon, 27), new MaterialStack(Aluminium, 9), new MaterialStack(Water, 28), new MaterialStack(Oxygen, 72))); // NaCa4(Si27Al9)O72 28(H2O) - public static Materials Kyanite = new Materials( 924, TextureSet.SET_FLINT , 1.0F, 0, 2, 1 |8 , 110, 110, 250, 0, "Kyanite" , "Kyanite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 1), new MaterialStack(Oxygen, 5))); // Al2SiO5 - public static Materials Kaolinite = new Materials( 929, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 245, 235, 235, 0, "Kaolinite" , "Kaolinite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 2), new MaterialStack(Hydrogen, 4), new MaterialStack(Oxygen, 9))); // Al2Si2O5(OH)4 - public static Materials Talc = new Materials( 902, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 90, 180, 90, 0, "Talc" , "Talc" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Magnesium, 3), new MaterialStack(Silicon, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 12))); // H2Mg3(SiO3)4 - public static Materials Soapstone = new Materials( 877, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 95, 145, 95, 0, "Soapstone" , "Soapstone" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Magnesium, 3), new MaterialStack(Silicon, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 12))); // H2Mg3(SiO3)4 - public static Materials Concrete = new Materials( 947, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 , 100, 100, 100, 0, "Concrete" , "Concrete" , 0, 0, 300, 0, false, false, 0, 1, 1, Dyes.dyeGray , 0, Collections.singletonList(new MaterialStack(Stone, 1)), Collections.singletonList(new TC_AspectStack(TC_Aspects.TERRA, 1))); - public static Materials IronMagnetic = new Materials( 354, TextureSet.SET_MAGNETIC , 6.0F, 256, 2, 1|2 |64|128 , 200, 200, 200, 0, "IronMagnetic" , "Magnetic Iron" , 0, 0, -1, 0, false, false, 4, 51, 50, Dyes.dyeGray , 1, Collections.singletonList(new MaterialStack(Iron, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))); - public static Materials SteelMagnetic = new Materials( 355, TextureSet.SET_MAGNETIC , 6.0F, 512, 3, 1|2 |64|128 , 128, 128, 128, 0, "SteelMagnetic" , "Magnetic Steel" , 0, 0, 1000, 1000, true, false, 4, 51, 50, Dyes.dyeGray , 1, Collections.singletonList(new MaterialStack(Steel, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 1), new TC_AspectStack(TC_Aspects.ORDO, 1), new TC_AspectStack(TC_Aspects.MAGNETO, 1))); - public static Materials NeodymiumMagnetic = new Materials( 356, TextureSet.SET_MAGNETIC , 7.0F, 512, 2, 1|2 |64|128 , 100, 100, 100, 0, "NeodymiumMagnetic" , "Magnetic Neodymium" , 0, 0, 1297, 1297, true, false, 4, 51, 50, Dyes.dyeGray , 1, Collections.singletonList(new MaterialStack(Neodymium, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 1), new TC_AspectStack(TC_Aspects.MAGNETO, 3))); - public static Materials SamariumMagnetic = new Materials( 399, TextureSet.SET_MAGNETIC , 1.0F, 0, 2, 1|2 |64|128 , 255, 255, 204, 0, "SamariumMagnetic" , "Magnetic Samarium" , 0, 0, 1345, 1345, true, false, 4, 1, 1, Dyes.dyeWhite , 1, Collections.singletonList(new MaterialStack(Samarium, 1)),Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1), new TC_AspectStack(TC_Aspects.MAGNETO,10))); - public static Materials TungstenCarbide = new Materials( 370, TextureSet.SET_METALLIC , 14.0F, 1280, 4, 1|2 |64|128 , 51, 0, 102, 0, "TungstenCarbide" , "Tungstencarbide" , 0, 0, 2460, 2460, true, false, 4, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Tungsten, 1), new MaterialStack(Carbon, 1))); - public static Materials VanadiumSteel = new Materials( 371, TextureSet.SET_METALLIC , 3.0F, 1920, 3, 1|2 |64|128 , 192, 192, 192, 0, "VanadiumSteel" , "Vanadiumsteel" , 0, 0, 1453, 1453, true, false, 4, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Vanadium, 1), new MaterialStack(Chrome, 1), new MaterialStack(Steel, 7))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials HSSG = new Materials( 372, TextureSet.SET_METALLIC , 10.0F, 4000, 3, 1|2 |64|128 , 153, 153, 0, 0, "HSSG" , "HSS-G" , 0, 0, 4500, 4500, true, false, 4, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(TungstenSteel, 5), new MaterialStack(Chrome, 1), new MaterialStack(Molybdenum, 2), new MaterialStack(Vanadium, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials HSSE = new Materials( 373, TextureSet.SET_METALLIC , 32.0F, 10240, 7, 1|2 |64|128 , 51, 102, 0, 0, "HSSE" , "HSS-E" , 0, 0, 5400, 5400, true, false, 4, 1, 1, Dyes.dyeGreen , 2, Arrays.asList(new MaterialStack(HSSG, 6), new MaterialStack(Cobalt, 1),new MaterialStack(Manganese, 1), new MaterialStack(Silicon, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials HSSS = new Materials( 374, TextureSet.SET_METALLIC , 32.0F, 10240, 8, 1|2 |64|128 , 102, 0, 51, 0, "HSSS" , "HSS-S" , 0, 0, 5400, 5400, true, false, 4, 1, 1, Dyes.dyeRed , 2, Arrays.asList(new MaterialStack(HSSG, 6), new MaterialStack(Iridium, 2), new MaterialStack(Osmium, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials DilutedSulfuricAcid = new MaterialBuilder(640, TextureSet.SET_FLUID , "Diluted Sulfuric Acid").addCell().addFluid().setRGB(192, 120, 32).setColor(Dyes.dyeOrange).setMaterialList(new MaterialStack(SulfuricAcid, 1)).constructMaterial(); - public static Materials EpoxidFiberReinforced = new Materials( 610, TextureSet.SET_DULL ,3.0F, 64, 1, 1|2 |64|128 , 160, 112, 16, 0, "EpoxidFiberReinforced" , "Fiber-Reinforced Epoxy Resin" , 0, 0, 400, 0, false, false, 1, 1, 1, Dyes.dyeBrown , 2, Collections.singletonList(new MaterialStack(Epoxid, 1)), Collections.singletonList(new TC_AspectStack(TC_Aspects.MOTUS, 2))); - public static Materials SodiumCarbonate = new MaterialBuilder(695, TextureSet.SET_QUARTZ, "Sodium Carbonate").setToolSpeed(1.0F).setDurability(64).setToolQuality(1).addDustItems().setRGB(255, 255, 235).setColor(Dyes.dyeWhite).setBlastFurnaceTemp(851 ).setMeltingPoint(851 ).setBlastFurnaceRequired(false).setOreValue(1).setExtraData(1).setMaterialList(new MaterialStack(Sodium, 2), new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 3)).constructMaterial().disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials SodiumAluminate = new MaterialBuilder(696, TextureSet.SET_QUARTZ, "Sodium Aluminate").setToolSpeed(1.0F).setDurability(64).setToolQuality(1).addDustItems().setRGB(255, 235, 255).setColor(Dyes.dyeWhite).setBlastFurnaceTemp(1800).setMeltingPoint(1800).setBlastFurnaceRequired(false).setOreValue(1).setExtraData(0).setMaterialList(new MaterialStack(Sodium, 1), new MaterialStack(Aluminium, 1), new MaterialStack(Oxygen, 2)).constructMaterial().disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Aluminiumoxide = new MaterialBuilder(697, TextureSet.SET_QUARTZ, "Alumina").setToolSpeed(1.0F).setDurability(64).setToolQuality(1).addDustItems().setRGB(235, 255, 255).setColor(Dyes.dyeWhite).setBlastFurnaceTemp(2054).setMeltingPoint(2054).setBlastFurnaceRequired(true).setOreValue(1).setExtraData(0).setMaterialList(new MaterialStack(Aluminium, 2), new MaterialStack(Oxygen, 3)).setAspects(Collections.singletonList(new TC_AspectStack(TC_Aspects.GELUM, 2))).constructMaterial().disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Aluminiumhydroxide = new MaterialBuilder(698, TextureSet.SET_QUARTZ, "Aluminium Hydroxide").setToolSpeed(1.0F).setDurability(64).setToolQuality(1).addDustItems().setRGB(235, 235, 255).setColor(Dyes.dyeWhite).setBlastFurnaceTemp(1200).setMeltingPoint(1200).setBlastFurnaceRequired(true).setOreValue(1).setExtraData(0).setMaterialList(new MaterialStack(Aluminium, 1), new MaterialStack(Oxygen, 3), new MaterialStack(Hydrogen, 3)).setAspects(Collections.singletonList(new TC_AspectStack(TC_Aspects.GELUM, 2))).constructMaterial().disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Cryolite = new MaterialBuilder(699, TextureSet.SET_QUARTZ, "Cryolite").setToolSpeed(1.0F).setDurability(64).setToolQuality(1).addOreItems().setRGB(191, 239, 255).setColor(Dyes.dyeLightBlue).setMeltingPoint(1012).setBlastFurnaceTemp(1012).setExtraData(1).setMaterialList(new MaterialStack(Sodium, 3), new MaterialStack(Aluminium, 1), new MaterialStack(Fluorine, 6)).constructMaterial().disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials RedMud = new MaterialBuilder(743, TextureSet.SET_FLUID, "Red Mud").addCell().addFluid().setRGB(140, 22, 22).setColor(Dyes.dyeRed).constructMaterial(); - - public static Materials Brick = new MaterialBuilder(625, TextureSet.SET_ROUGH , "Brick").addDustItems().setRGB(155, 86, 67).setColor(Dyes.dyeBrown).setExtraData(2).setMaterialList(new MaterialStack(Aluminium, 4), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 6)).constructMaterial(); - public static Materials Fireclay = new MaterialBuilder(626, TextureSet.SET_ROUGH , "Fireclay").addDustItems().setRGB(173, 160, 155).setExtraData(2).setColor(Dyes.dyeBrown).setMaterialList(new MaterialStack(Brick, 1)).constructMaterial(); + public static Materials WoodSealed = new Materials( + 889, + TextureSet.SET_WOOD, + 3.0F, + 24, + 0, + 1 | 2 | 64 | 128, + 80, + 40, + 0, + 0, + "WoodSealed", + "Sealed Wood", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBrown, + 0, + Collections.singletonList(new MaterialStack(Wood, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.ARBOR, 2), new TC_AspectStack(TC_Aspects.FABRICO, 1))); + + public static Materials LiveRoot = new Materials( + 832, + TextureSet.SET_WOOD, + 1.0F, + 0, + 1, + 1, + 220, + 200, + 0, + 0, + "LiveRoot", + "Liveroot", + 5, + 16, + -1, + 0, + false, + false, + 2, + 4, + 3, + Dyes.dyeBrown, + 2, + Arrays.asList(new MaterialStack(Wood, 3), new MaterialStack(Magic, 1)), + Arrays.asList( + new TC_AspectStack(TC_Aspects.ARBOR, 2), + new TC_AspectStack(TC_Aspects.VICTUS, 2), + new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1))); + public static Materials IronWood = new Materials( + 338, + TextureSet.SET_WOOD, + 6.0F, + 384, + 2, + 1 | 2 | 64 | 128, + 150, + 140, + 110, + 0, + "IronWood", + "Ironwood", + 5, + 8, + -1, + 0, + false, + false, + 2, + 19, + 18, + Dyes.dyeBrown, + 2, + Arrays.asList(new MaterialStack(Iron, 9), new MaterialStack(LiveRoot, 9), new MaterialStack(Gold, 1))); + public static Materials Glass = new Materials( + 890, + TextureSet.SET_GLASS, + 1.0F, + 4, + 0, + 1 | 4, + 250, + 250, + 250, + 220, + "Glass", + "Glass", + 0, + 0, + 1500, + 0, + false, + true, + 1, + 1, + 1, + Dyes.dyeWhite, + 2, + Collections.singletonList(new MaterialStack(SiliconDioxide, 1)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.VITREUS, 2))); + public static Materials BorosilicateGlass = new MaterialBuilder(611, TextureSet.SET_GLASS, "Borosilicate Glass") + .addDustItems() + .addMetalItems() + .setRGB(230, 243, 230) + .setColor(Dyes.dyeWhite) + .setMaterialList(new MaterialStack(Boron, 1), new MaterialStack(Glass, 7)) + .addCentrifugeRecipe() + .constructMaterial(); + public static Materials Perlite = new Materials( + 925, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1 | 8, + 30, + 20, + 30, + 0, + "Perlite", + "Perlite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlack, + 2, + Arrays.asList(new MaterialStack(Obsidian, 2), new MaterialStack(Water, 1))); + public static Materials Borax = new Materials( + 941, + TextureSet.SET_FINE, + 1.0F, + 0, + 1, + 1 | 8, + 250, + 250, + 250, + 0, + "Borax", + "Borax", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + 1, + Arrays.asList( + new MaterialStack(Sodium, 2), + new MaterialStack(Boron, 4), + new MaterialStack(Oxygen, 7), + new MaterialStack(Water, 10))); + public static Materials Lignite = new Materials( + 538, + TextureSet.SET_LIGNITE, + 1.0F, + 0, + 0, + 1 | 4 | 8, + 100, + 70, + 70, + 0, + "Lignite", + "Lignite Coal", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlack, + 1, + Arrays.asList(new MaterialStack(Carbon, 3), new MaterialStack(Water, 1))); + public static Materials Olivine = new Materials( + 505, + TextureSet.SET_RUBY, + 7.0F, + 256, + 2, + 1 | 4 | 8 | 64, + 150, + 255, + 150, + 127, + "Olivine", + "Olivine", + 0, + 0, + -1, + 0, + false, + true, + 5, + 1, + 1, + Dyes.dyeLime, + 1, + Arrays.asList( + new MaterialStack(Magnesium, 2), new MaterialStack(Iron, 1), new MaterialStack(SiliconDioxide, 2)), + Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 4), new TC_AspectStack(TC_Aspects.VITREUS, 2))); + public static Materials Opal = new Materials( + 510, + TextureSet.SET_OPAL, + 7.0F, + 256, + 2, + 1 | 4 | 8 | 64, + 0, + 0, + 255, + 0, + "Opal", + "Opal", + 0, + 0, + -1, + 0, + false, + true, + 3, + 1, + 1, + Dyes.dyeBlue, + 1, + Collections.singletonList(new MaterialStack(SiliconDioxide, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 5), new TC_AspectStack(TC_Aspects.VITREUS, 3))); + public static Materials Amethyst = new Materials( + 509, + TextureSet.SET_FLINT, + 7.0F, + 256, + 3, + 1 | 4 | 8 | 64, + 210, + 50, + 210, + 127, + "Amethyst", + "Amethyst", + 0, + 0, + -1, + 0, + false, + true, + 3, + 1, + 1, + Dyes.dyePink, + 1, + Arrays.asList(new MaterialStack(SiliconDioxide, 4), new MaterialStack(Iron, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 6), new TC_AspectStack(TC_Aspects.VITREUS, 4))); + public static Materials Redstone = new Materials( + 810, + TextureSet.SET_ROUGH, + 1.0F, + 0, + 2, + 1 | 8, + 200, + 0, + 0, + 0, + "Redstone", + "Redstone", + 0, + 0, + 500, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeRed, + 2, + Arrays.asList( + new MaterialStack(Silicon, 1), + new MaterialStack(Pyrite, 5), + new MaterialStack(Ruby, 1), + new MaterialStack(Mercury, 3)), + Arrays.asList(new TC_AspectStack(TC_Aspects.MACHINA, 1), new TC_AspectStack(TC_Aspects.POTENTIA, 2))); + public static Materials Lapis = new Materials( + 526, + TextureSet.SET_LAPIS, + 1.0F, + 0, + 1, + 1 | 4 | 8, + 70, + 70, + 220, + 0, + "Lapis", + "Lapis", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeBlue, + 2, + Arrays.asList( + new MaterialStack(Lazurite, 12), + new MaterialStack(Sodalite, 2), + new MaterialStack(Pyrite, 1), + new MaterialStack(Calcite, 1)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.SENSUS, 1))); + public static Materials Blaze = new Materials( + 801, + TextureSet.SET_POWDER, + 2.0F, + 16, + 1, + 1 | 64, + 255, + 200, + 0, + 0, + "Blaze", + "Blaze", + 0, + 0, + 6400, + 0, + false, + false, + 2, + 3, + 2, + Dyes.dyeYellow, + 2, + Arrays.asList(new MaterialStack(DarkAsh, 1), new MaterialStack(Sulfur, 1), new MaterialStack(Magic, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 2), new TC_AspectStack(TC_Aspects.IGNIS, 4))); + public static Materials EnderPearl = new Materials( + 532, + TextureSet.SET_SHINY, + 1.0F, + 16, + 1, + 1 | 4, + 108, + 220, + 200, + 0, + "EnderPearl", + "Enderpearl", + 0, + 0, + -1, + 0, + false, + false, + 1, + 16, + 10, + Dyes.dyeGreen, + 1, + Arrays.asList( + new MaterialStack(Beryllium, 1), + new MaterialStack(Potassium, 4), + new MaterialStack(Nitrogen, 5), + new MaterialStack(Magic, 6)), + Arrays.asList( + new TC_AspectStack(TC_Aspects.ALIENIS, 4), + new TC_AspectStack(TC_Aspects.ITER, 4), + new TC_AspectStack(TC_Aspects.PRAECANTATIO, 2))); + public static Materials EnderEye = new Materials( + 533, + TextureSet.SET_SHINY, + 1.0F, + 16, + 1, + 1 | 4, + 160, + 250, + 230, + 0, + "EnderEye", + "Endereye", + 5, + 10, + -1, + 0, + false, + false, + 1, + 2, + 1, + Dyes.dyeGreen, + 2, + Arrays.asList(new MaterialStack(EnderPearl, 1), new MaterialStack(Blaze, 1)), + Arrays.asList( + new TC_AspectStack(TC_Aspects.SENSUS, 4), + new TC_AspectStack(TC_Aspects.ALIENIS, 4), + new TC_AspectStack(TC_Aspects.ITER, 4), + new TC_AspectStack(TC_Aspects.PRAECANTATIO, 3), + new TC_AspectStack(TC_Aspects.IGNIS, 2))); + public static Materials Flint = new Materials( + 802, + TextureSet.SET_FLINT, + 2.5F, + 128, + 1, + 1 | 64, + 0, + 32, + 64, + 0, + "Flint", + "Flint", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeGray, + 2, + Collections.singletonList(new MaterialStack(SiliconDioxide, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.TERRA, 1), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))); + public static Materials Diatomite = new Materials( + 948, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1 | 8, + 225, + 225, + 225, + 0, + "Diatomite", + "Diatomite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeGray, + 2, + Arrays.asList( + new MaterialStack(Flint, 8), new MaterialStack(BandedIron, 1), new MaterialStack(Sapphire, 1))); + public static Materials VolcanicAsh = new Materials( + 940, + TextureSet.SET_FLINT, + 1.0F, + 0, + 0, + 1, + 60, + 50, + 50, + 0, + "VolcanicAsh", + "Volcanic Ashes", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlack, + 2, + Arrays.asList(new MaterialStack(Flint, 6), new MaterialStack(Iron, 1), new MaterialStack(Magnesium, 1))); + public static Materials Niter = new Materials( + 531, + TextureSet.SET_FLINT, + 1.0F, + 0, + 1, + 1 | 4 | 8, + 255, + 200, + 200, + 0, + "Niter", + "Niter", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyePink, + 2, + Collections.singletonList(new MaterialStack(Saltpeter, 1))); + public static Materials Pyrotheum = new Materials( + 843, + TextureSet.SET_FIERY, + 1.0F, + 0, + 1, + 1, + 255, + 128, + 0, + 0, + "Pyrotheum", + "Pyrotheum", + 2, + 62, + -1, + 0, + false, + false, + 2, + 3, + 1, + Dyes.dyeYellow, + 2, + Arrays.asList(new MaterialStack(Coal, 1), new MaterialStack(Redstone, 1), new MaterialStack(Blaze, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 2), new TC_AspectStack(TC_Aspects.IGNIS, 1))); + public static Materials Cryotheum = new Materials( + 898, + TextureSet.SET_SHINY, + 1.0F, + 0, + 1, + 1, + 0, + 148, + 203, + 0, + "Cryotheum", + "Cryotheum", + 2, + 62, + -1, + 0, + false, + false, + 2, + 3, + 1, + Dyes.dyeLightBlue, + 2, + Arrays.asList( + new MaterialStack(Saltpeter, 1), + new MaterialStack(Redstone, 1), + new MaterialStack(Snow, 1), + new MaterialStack(Blizz, 1)), + Arrays.asList( + new TC_AspectStack(TC_Aspects.PRAECANTATIO, 2), + new TC_AspectStack(TC_Aspects.ELECTRUM, 1), + new TC_AspectStack(TC_Aspects.GELUM, 1))); + public static Materials HydratedCoal = new Materials( + 818, + TextureSet.SET_ROUGH, + 1.0F, + 0, + 1, + 1, + 70, + 70, + 100, + 0, + "HydratedCoal", + "Hydrated Coal", + 0, + 0, + -1, + 0, + false, + false, + 1, + 9, + 8, + Dyes.dyeBlack, + 2, + Arrays.asList(new MaterialStack(Coal, 8), new MaterialStack(Water, 1))); + public static Materials Apatite = new Materials( + 530, + TextureSet.SET_DIAMOND, + 1.0F, + 0, + 1, + 1 | 4 | 8, + 200, + 200, + 255, + 0, + "Apatite", + "Apatite", + 0, + 0, + -1, + 0, + false, + false, + 2, + 1, + 1, + Dyes.dyeCyan, + 1, + Arrays.asList( + new MaterialStack(Calcium, 5), new MaterialStack(Phosphate, 3), new MaterialStack(Chlorine, 1)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.MESSIS, 2))); + public static Materials Alumite = new Materials( + 400, + TextureSet.SET_METALLIC, + 5.0F, + 768, + 2, + 1 | 2 | 64 | 128, + 255, + 105, + 180, + 0, + "Alumite", + "Alumite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyePink, + 2, + Arrays.asList(new MaterialStack(Aluminium, 5), new MaterialStack(Steel, 2), new MaterialStack(Obsidian, 2)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.STRONTIO, 2))); + public static Materials Manyullyn = new Materials( + 386, + TextureSet.SET_SHINY, + 25.0F, + 2048, + 5, + 1 | 2 | 8 | 64 | 128, + 154, + 76, + 185, + 0, + "Manyullyn", + "Manyullyn", + 0, + 0, + 3600, + 3600, + true, + false, + 1, + 1, + 1, + Dyes.dyePurple, + 2, + Arrays.asList(new MaterialStack(Cobalt, 1), new MaterialStack(Ardite, 1)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.STRONTIO, 2))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Steeleaf = new Materials( + 339, + TextureSet.SET_LEAF, + 8.0F, + 768, + 3, + 1 | 2 | 64 | 128, + 50, + 127, + 50, + 0, + "Steeleaf", + "Steeleaf", + 5, + 24, + -1, + 0, + false, + false, + 4, + 1, + 1, + Dyes.dyeGreen, + 2, + Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Magic, 1)), + Arrays.asList( + new TC_AspectStack(TC_Aspects.HERBA, 2), + new TC_AspectStack(TC_Aspects.METALLUM, 2), + new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1))); + public static Materials Knightmetal = new Materials( + 362, + TextureSet.SET_METALLIC, + 8.0F, + 1024, + 3, + 1 | 2 | 64 | 128, + 210, + 240, + 200, + 0, + "Knightmetal", + "Knightmetal", + 5, + 24, + -1, + 0, + false, + false, + 4, + 1, + 1, + Dyes.dyeLime, + 2, + Arrays.asList(new MaterialStack(Steel, 2), new MaterialStack(Magic, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 1), new TC_AspectStack(TC_Aspects.METALLUM, 2))); + public static Materials SterlingSilver = new Materials( + 350, + TextureSet.SET_SHINY, + 13.0F, + 128, + 2, + 1 | 2 | 64 | 128, + 250, + 220, + 225, + 0, + "SterlingSilver", + "Sterling Silver", + 0, + 0, + -1, + 1700, + true, + false, + 4, + 1, + 1, + Dyes.dyeWhite, + 2, + Arrays.asList(new MaterialStack(Copper, 1), new MaterialStack(Silver, 4))); + public static Materials RoseGold = new Materials( + 351, + TextureSet.SET_SHINY, + 14.0F, + 128, + 2, + 1 | 2 | 64 | 128, + 255, + 230, + 30, + 0, + "RoseGold", + "Rose Gold", + 0, + 0, + -1, + 1600, + true, + false, + 4, + 1, + 1, + Dyes.dyeOrange, + 2, + Arrays.asList(new MaterialStack(Copper, 1), new MaterialStack(Gold, 4))); + public static Materials BlackBronze = new Materials( + 352, + TextureSet.SET_DULL, + 12.0F, + 256, + 2, + 1 | 2 | 64 | 128, + 100, + 50, + 125, + 0, + "BlackBronze", + "Black Bronze", + 0, + 0, + -1, + 2000, + true, + false, + 4, + 1, + 1, + Dyes.dyePurple, + 2, + Arrays.asList(new MaterialStack(Gold, 1), new MaterialStack(Silver, 1), new MaterialStack(Copper, 3))); + public static Materials BismuthBronze = new Materials( + 353, + TextureSet.SET_DULL, + 8.0F, + 256, + 2, + 1 | 2 | 64 | 128, + 100, + 125, + 125, + 0, + "BismuthBronze", + "Bismuth Bronze", + 0, + 0, + -1, + 1100, + true, + false, + 4, + 1, + 1, + Dyes.dyeCyan, + 2, + Arrays.asList(new MaterialStack(Bismuth, 1), new MaterialStack(Zinc, 1), new MaterialStack(Copper, 3))); + public static Materials BlackSteel = new Materials( + 334, + TextureSet.SET_METALLIC, + 6.5F, + 768, + 3, + 1 | 2 | 64 | 128, + 100, + 100, + 100, + 0, + "BlackSteel", + "Black Steel", + 0, + 0, + -1, + 1200, + true, + false, + 4, + 1, + 1, + Dyes.dyeBlack, + 2, + Arrays.asList( + new MaterialStack(Nickel, 1), + new MaterialStack(BlackBronze, 1), + new MaterialStack(Steel, 3))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials RedSteel = new Materials( + 348, + TextureSet.SET_METALLIC, + 7.0F, + 896, + 4, + 1 | 2 | 64 | 128, + 140, + 100, + 100, + 0, + "RedSteel", + "Red Steel", + 0, + 0, + -1, + 1300, + true, + false, + 4, + 1, + 1, + Dyes.dyeRed, + 2, + Arrays.asList( + new MaterialStack(SterlingSilver, 1), + new MaterialStack(BismuthBronze, 1), + new MaterialStack(Steel, 2), + new MaterialStack(BlackSteel, 4))); + public static Materials BlueSteel = new Materials( + 349, + TextureSet.SET_METALLIC, + 7.5F, + 1024, + 4, + 1 | 2 | 64 | 128, + 100, + 100, + 140, + 0, + "BlueSteel", + "Blue Steel", + 0, + 0, + -1, + 1400, + true, + false, + 4, + 1, + 1, + Dyes.dyeBlue, + 2, + Arrays.asList( + new MaterialStack(RoseGold, 1), + new MaterialStack(Brass, 1), + new MaterialStack(Steel, 2), + new MaterialStack(BlackSteel, 4))); + public static Materials DamascusSteel = new Materials( + 335, + TextureSet.SET_METALLIC, + 8.0F, + 1280, + 3, + 1 | 2 | 64 | 128, + 110, + 110, + 110, + 0, + "DamascusSteel", + "Damascus Steel", + 0, + 0, + 2000, + 1500, + true, + false, + 4, + 1, + 1, + Dyes.dyeGray, + 2, + Collections.singletonList(new MaterialStack(Steel, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials TungstenSteel = new Materials( + 316, + TextureSet.SET_METALLIC, + 8.0F, + 2560, + 4, + 1 | 2 | 64 | 128, + 100, + 100, + 160, + 0, + "TungstenSteel", + "Tungstensteel", + 0, + 0, + -1, + 3000, + true, + false, + 4, + 1, + 1, + Dyes.dyeBlue, + 2, + Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Tungsten, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials NitroCoalFuel = new Materials( + -1, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16, + 50, + 70, + 50, + 0, + "NitroCoalFuel", + "Nitro-Coalfuel", + 0, + 48, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlack, + 0, + Arrays.asList(new MaterialStack(Glyceryl, 1), new MaterialStack(CoalFuel, 4))); + public static Materials NitroFuel = new Materials( + 709, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16, + 200, + 255, + 0, + 0, + "NitroFuel", + "Cetane-Boosted Diesel", + 0, + 1000, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeLime); + public static Materials RedAlloy = new Materials( + 308, + TextureSet.SET_DULL, + 1.0F, + 0, + 0, + 1 | 2, + 200, + 0, + 0, + 0, + "RedAlloy", + "Red Alloy", + 0, + 0, + 500, + 0, + false, + false, + 3, + 5, + 1, + Dyes.dyeRed, + 2, + Arrays.asList(new MaterialStack(Copper, 1), new MaterialStack(Redstone, 4)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.MACHINA, 3))); + public static Materials CobaltBrass = new Materials( + 343, + TextureSet.SET_METALLIC, + 8.0F, + 256, + 2, + 1 | 2 | 64 | 128, + 180, + 180, + 160, + 0, + "CobaltBrass", + "Cobalt Brass", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeOrange, + 2, + Arrays.asList(new MaterialStack(Brass, 7), new MaterialStack(Aluminium, 1), new MaterialStack(Cobalt, 1))); + public static Materials TricalciumPhosphate = new Materials( + 534, + TextureSet.SET_FLINT, + 1.0F, + 0, + 2, + 1 | 4 | 8 | 16, + 255, + 255, + 0, + 0, + "TricalciumPhosphate", + "Tricalcium Phosphate", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeYellow, + 2, + Arrays.asList(new MaterialStack(Calcium, 3), new MaterialStack(Phosphate, 2))); + public static Materials Basalt = new Materials( + 844, + TextureSet.SET_ROUGH, + 1.0F, + 64, + 1, + 1 | 64 | 128, + 30, + 20, + 20, + 0, + "Basalt", + "Basalt", + 0, + 0, + -1, + 0, + false, + false, + 2, + 1, + 1, + Dyes.dyeBlack, + 2, + Arrays.asList( + new MaterialStack(Olivine, 1), + new MaterialStack(Calcite, 3), + new MaterialStack(Flint, 8), + new MaterialStack(DarkAsh, 4)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.TENEBRAE, 1))); + public static Materials GarnetRed = new Materials( + 527, + TextureSet.SET_RUBY, + 7.0F, + 128, + 2, + 1 | 4 | 8 | 64, + 200, + 80, + 80, + 127, + "GarnetRed", + "Red Garnet", + 0, + 0, + -1, + 0, + false, + true, + 4, + 1, + 1, + Dyes.dyeRed, + 2, + Arrays.asList( + new MaterialStack(Pyrope, 3), new MaterialStack(Almandine, 5), new MaterialStack(Spessartine, 8)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.VITREUS, 3))); + public static Materials GarnetYellow = new Materials( + 528, + TextureSet.SET_RUBY, + 7.0F, + 128, + 2, + 1 | 4 | 8 | 64, + 200, + 200, + 80, + 127, + "GarnetYellow", + "Yellow Garnet", + 0, + 0, + -1, + 0, + false, + true, + 4, + 1, + 1, + Dyes.dyeYellow, + 2, + Arrays.asList( + new MaterialStack(Andradite, 5), new MaterialStack(Grossular, 8), new MaterialStack(Uvarovite, 3)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.VITREUS, 3))); + public static Materials Marble = new Materials( + 845, + TextureSet.SET_FINE, + 1.0F, + 16, + 1, + 1 | 64 | 128, + 200, + 200, + 200, + 0, + "Marble", + "Marble", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + 2, + Arrays.asList(new MaterialStack(Magnesium, 1), new MaterialStack(Calcite, 7)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.PERFODIO, 1))); + public static Materials Sugar = new Materials( + 803, + TextureSet.SET_FINE, + 1.0F, + 0, + 1, + 1, + 250, + 250, + 250, + 0, + "Sugar", + "Sugar", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + 1, + Arrays.asList(new MaterialStack(Carbon, 2), new MaterialStack(Water, 5), new MaterialStack(Oxygen, 25)), + Arrays.asList( + new TC_AspectStack(TC_Aspects.HERBA, 1), + new TC_AspectStack(TC_Aspects.AQUA, 1), + new TC_AspectStack(TC_Aspects.AER, 1))); + public static Materials Thaumium = new Materials( + 330, + TextureSet.SET_METALLIC, + 12.0F, + 256, + 3, + 1 | 2 | 64 | 128, + 150, + 100, + 200, + 0, + "Thaumium", + "Thaumium", + 0, + 0, + -1, + 0, + false, + false, + 5, + 2, + 1, + Dyes.dyePurple, + 0, + Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Magic, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1))); + public static Materials Vinteum = new Materials( + 529, + TextureSet.SET_METALLIC, + 10.0F, + 128, + 3, + 1 | 2 | 8 | 64 | 128, + 100, + 200, + 255, + 0, + "Vinteum", + "Vinteum", + 5, + 32, + -1, + 0, + false, + false, + 4, + 1, + 1, + Dyes.dyeLightBlue, + 2, + Collections.singletonList(new MaterialStack(Thaumium, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.VITREUS, 2), new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1))); + public static Materials Vis = new Materials( + -1, + TextureSet.SET_SHINY, + 1.0F, + 0, + 3, + 0, + 128, + 0, + 255, + 0, + "Vis", + "Vis", + 5, + 32, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyePurple, + 2, + Collections.singletonList(new MaterialStack(Magic, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.AURAM, 2), new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1))); + public static Materials Redrock = new Materials( + 846, + TextureSet.SET_ROUGH, + 1.0F, + 0, + 1, + 1, + 255, + 80, + 50, + 0, + "Redrock", + "Redrock", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeRed, + 2, + Arrays.asList(new MaterialStack(Calcite, 2), new MaterialStack(Flint, 1), new MaterialStack(Clay, 1))); + public static Materials PotassiumFeldspar = new Materials( + 847, + TextureSet.SET_FINE, + 1.0F, + 0, + 1, + 1, + 120, + 40, + 40, + 0, + "PotassiumFeldspar", + "Potassium Feldspar", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyePink, + 1, + Arrays.asList( + new MaterialStack(Potassium, 1), + new MaterialStack(Aluminium, 1), + new MaterialStack(Silicon, 3), + new MaterialStack(Oxygen, 8))); + public static Materials Biotite = new Materials( + 848, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 1, + 1, + 20, + 30, + 20, + 0, + "Biotite", + "Biotite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeGray, + 1, + Arrays.asList( + new MaterialStack(Potassium, 1), + new MaterialStack(Magnesium, 3), + new MaterialStack(Aluminium, 3), + new MaterialStack(Fluorine, 2), + new MaterialStack(Silicon, 3), + new MaterialStack(Oxygen, 10))); + public static Materials GraniteBlack = new Materials( + 849, + TextureSet.SET_ROUGH, + 4.0F, + 64, + 3, + 1 | 64 | 128, + 10, + 10, + 10, + 0, + "GraniteBlack", + "Black Granite", + 0, + 0, + -1, + 0, + false, + false, + 0, + 1, + 1, + Dyes.dyeBlack, + 2, + Arrays.asList(new MaterialStack(SiliconDioxide, 4), new MaterialStack(Biotite, 1)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.TUTAMEN, 1))); + public static Materials GraniteRed = new Materials( + 850, + TextureSet.SET_ROUGH, + 4.0F, + 64, + 3, + 1 | 64 | 128, + 255, + 0, + 128, + 0, + "GraniteRed", + "Red Granite", + 0, + 0, + -1, + 0, + false, + false, + 0, + 1, + 1, + Dyes.dyeMagenta, + 1, + Arrays.asList( + new MaterialStack(Aluminium, 2), + new MaterialStack(PotassiumFeldspar, 1), + new MaterialStack(Oxygen, 3)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.TUTAMEN, 1))); + public static Materials Chrysotile = new Materials( + 912, + TextureSet.SET_DULL, + 32.0F, + 10240, + 3, + 1 | 2 | 8 | 64 | 128, + 110, + 140, + 110, + 0, + "Chrysotile", + "Chrysotile", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + 2, + Collections.singletonList(new MaterialStack(Asbestos, 1))) + .disableAutoGeneratedBlastFurnaceRecipes() + .setTurbineMultipliers(280, 280, 1); + public static Materials Realgar = new Materials( + 913, + TextureSet.SET_DULL, + 1.0F, + 32, + 1, + 1 | 2 | 8 | 64 | 128, + 140, + 100, + 100, + 0, + "Realgar", + "Realgar", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + 2, + Arrays.asList(new MaterialStack(Arsenic, 4), new MaterialStack(Sulfur, 4))); + public static Materials VanadiumMagnetite = new Materials( + 923, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 8, + 35, + 35, + 60, + 0, + "VanadiumMagnetite", + "Vanadium Magnetite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlack, + 2, + Arrays.asList(new MaterialStack(Magnetite, 1), new MaterialStack(Vanadium, 1)), + Arrays.asList( + new TC_AspectStack(TC_Aspects.METALLUM, 2), + new TC_AspectStack(TC_Aspects.MAGNETO, 1))); // Mixture of Fe3O4 and V2O5 + public static Materials BasalticMineralSand = new Materials( + 935, + TextureSet.SET_SAND, + 1.0F, + 0, + 1, + 1 | 8, + 40, + 50, + 40, + 0, + "BasalticMineralSand", + "Basaltic Mineral Sand", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlack, + 2, + Arrays.asList(new MaterialStack(Magnetite, 1), new MaterialStack(Basalt, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))); + public static Materials GraniticMineralSand = new Materials( + 936, + TextureSet.SET_SAND, + 1.0F, + 0, + 1, + 1 | 8, + 40, + 60, + 60, + 0, + "GraniticMineralSand", + "Granitic Mineral Sand", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlack, + 2, + Arrays.asList(new MaterialStack(Magnetite, 1), new MaterialStack(GraniteBlack, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))); + public static Materials GarnetSand = new Materials( + 938, + TextureSet.SET_SAND, + 1.0F, + 0, + 1, + 1 | 8, + 200, + 100, + 0, + 0, + "GarnetSand", + "Garnet Sand", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeOrange, + 2, + Arrays.asList(new MaterialStack(GarnetRed, 1), new MaterialStack(GarnetYellow, 1))); + public static Materials QuartzSand = new Materials( + 939, + TextureSet.SET_SAND, + 1.0F, + 0, + 1, + 1 | 8, + 194, + 178, + 128, + 0, + "QuartzSand", + "Quartz Sand", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + 2, + Arrays.asList(new MaterialStack(CertusQuartz, 1), new MaterialStack(Quartzite, 1))); + public static Materials Bastnasite = new Materials( + 905, + TextureSet.SET_FINE, + 1.0F, + 0, + 2, + 1 | 8, + 200, + 110, + 45, + 0, + "Bastnasite", + "Bastnasite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + 1, + Arrays.asList( + new MaterialStack(Cerium, 1), + new MaterialStack(Carbon, 1), + new MaterialStack(Fluorine, 1), + new MaterialStack(Oxygen, 3))); // (Ce, La, Y)CO3F + public static Materials Pentlandite = new Materials( + 909, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 8, + 165, + 150, + 5, + 0, + "Pentlandite", + "Pentlandite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + 1, + Arrays.asList(new MaterialStack(Nickel, 9), new MaterialStack(Sulfur, 8))); // (Fe,Ni)9S8 + public static Materials Spodumene = new Materials( + 920, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 8, + 190, + 170, + 170, + 0, + "Spodumene", + "Spodumene", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + 1, + Arrays.asList( + new MaterialStack(Lithium, 1), + new MaterialStack(Aluminium, 1), + new MaterialStack(Silicon, 2), + new MaterialStack(Oxygen, 6))); // LiAl(SiO3)2 + public static Materials Pollucite = new Materials( + 919, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 8, + 240, + 210, + 210, + 0, + "Pollucite", + "Pollucite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + 1, + Arrays.asList( + new MaterialStack(Caesium, 2), + new MaterialStack(Aluminium, 2), + new MaterialStack(Silicon, 4), + new MaterialStack(Water, 2), + new MaterialStack(Oxygen, 12))); // (Cs,Na)2Al2Si4O12 2H2O (also a source of Rb) + public static Materials Tantalite = new Materials( + 921, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 3, + 1 | 8, + 145, + 80, + 40, + 0, + "Tantalite", + "Tantalite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + 1, + Arrays.asList( + new MaterialStack(Manganese, 1), + new MaterialStack(Tantalum, 2), + new MaterialStack(Oxygen, 6))); // (Fe, Mn)Ta2O6 (also source of Nb) + public static Materials Lepidolite = new Materials( + 907, + TextureSet.SET_FINE, + 1.0F, + 0, + 2, + 1 | 8, + 240, + 50, + 140, + 0, + "Lepidolite", + "Lepidolite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + 1, + Arrays.asList( + new MaterialStack(Potassium, 1), + new MaterialStack(Lithium, 3), + new MaterialStack(Aluminium, 4), + new MaterialStack(Fluorine, 2), + new MaterialStack(Oxygen, 10))); // K(Li,Al,Rb)3(Al,Si)4O10(F,OH)2 + public static Materials Glauconite = new Materials( + 933, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 8, + 130, + 180, + 60, + 0, + "Glauconite", + "Glauconite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + 1, + Arrays.asList( + new MaterialStack(Potassium, 1), + new MaterialStack(Magnesium, 2), + new MaterialStack(Aluminium, 4), + new MaterialStack(Hydrogen, 2), + new MaterialStack(Oxygen, 12))); // (K,Na)(Fe3+,Al,Mg)2(Si,Al)4O10(OH)2 + public static Materials GlauconiteSand = new Materials( + 949, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 8, + 130, + 180, + 60, + 0, + "GlauconiteSand", + "Glauconite Sand", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + 1, + Arrays.asList( + new MaterialStack(Potassium, 1), + new MaterialStack(Magnesium, 2), + new MaterialStack(Aluminium, 4), + new MaterialStack(Hydrogen, 2), + new MaterialStack(Oxygen, 12))); // (K,Na)(Fe3+,Al,Mg)2(Si,Al)4O10(OH)2 + public static Materials Vermiculite = new Materials( + 932, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 8, + 200, + 180, + 15, + 0, + "Vermiculite", + "Vermiculite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + 1, + Arrays.asList( + new MaterialStack(Iron, 3), + new MaterialStack(Aluminium, 4), + new MaterialStack(Silicon, 4), + new MaterialStack(Hydrogen, 2), + new MaterialStack(Water, 4), + new MaterialStack(Oxygen, 12))); // (Mg+2, Fe+2, Fe+3)3 [(AlSi)4O10] (OH)2 4H2O) + public static Materials Bentonite = new Materials( + 927, + TextureSet.SET_ROUGH, + 1.0F, + 0, + 2, + 1 | 8, + 245, + 215, + 210, + 0, + "Bentonite", + "Bentonite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + 1, + Arrays.asList( + new MaterialStack(Sodium, 1), + new MaterialStack(Magnesium, 6), + new MaterialStack(Silicon, 12), + new MaterialStack(Hydrogen, 6), + new MaterialStack(Water, 5), + new MaterialStack(Oxygen, 36))); // (Na,Ca)0.33(Al,Mg)2(Si4O10)(OH)2 nH2O + public static Materials FullersEarth = new Materials( + 928, + TextureSet.SET_FINE, + 1.0F, + 0, + 2, + 1 | 8, + 160, + 160, + 120, + 0, + "FullersEarth", + "Fullers Earth", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + 1, + Arrays.asList( + new MaterialStack(Magnesium, 1), + new MaterialStack(Silicon, 4), + new MaterialStack(Hydrogen, 1), + new MaterialStack(Water, 4), + new MaterialStack(Oxygen, 11))); // (Mg,Al)2Si4O10(OH) 4(H2O) + public static Materials Pitchblende = new Materials( + 873, + TextureSet.SET_DULL, + 1.0F, + 0, + 3, + 1 | 8, + 200, + 210, + 0, + 0, + "Pitchblende", + "Pitchblende", + 0, + 0, + -1, + 0, + false, + false, + 5, + 1, + 1, + Dyes.dyeYellow, + 2, + Arrays.asList(new MaterialStack(Uraninite, 3), new MaterialStack(Thorium, 1), new MaterialStack(Lead, 1))); + public static Materials Monazite = new Materials( + 520, + TextureSet.SET_DIAMOND, + 1.0F, + 0, + 1, + 1 | 4 | 8, + 50, + 70, + 50, + 0, + "Monazite", + "Monazite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeGreen, + 1, + Arrays.asList( + new MaterialStack(RareEarth, 1), + new MaterialStack( + Phosphate, + 1))); // Wikipedia: (Ce, La, Nd, Th, Sm, Gd)PO4 Monazite also smelt-extract to Helium, it is + // brown like the rare earth Item Monazite sand deposits are inevitably of the + // monazite-(Ce) composition. Typically, the lanthanides in such monazites contain + // about 45.8% cerium, about 24% lanthanum, about 17% neodymium, about 5% + // praseodymium, and minor quantities of samarium, gadolinium, and yttrium. Europium + // concentrations tend to be low, about 0.05% Thorium content of monazite is variable. + public static Materials Malachite = new Materials( + 871, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1 | 8, + 5, + 95, + 5, + 0, + "Malachite", + "Malachite", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeGreen, + 1, + Arrays.asList( + new MaterialStack(Copper, 2), + new MaterialStack(Carbon, 1), + new MaterialStack(Hydrogen, 2), + new MaterialStack(Oxygen, 5))); // Cu2CO3(OH)2 + public static Materials Mirabilite = new Materials( + 900, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 8, + 240, + 250, + 210, + 0, + "Mirabilite", + "Mirabilite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + 1, + Arrays.asList( + new MaterialStack(Sodium, 2), + new MaterialStack(Sulfur, 1), + new MaterialStack(Water, 10), + new MaterialStack(Oxygen, 4))); // Na2SO4 10H2O + public static Materials Mica = new Materials( + 901, + TextureSet.SET_FINE, + 1.0F, + 0, + 1, + 1 | 8, + 195, + 195, + 205, + 0, + "Mica", + "Mica", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + 1, + Arrays.asList( + new MaterialStack(Potassium, 1), + new MaterialStack(Aluminium, 3), + new MaterialStack(Silicon, 3), + new MaterialStack(Fluorine, 2), + new MaterialStack(Oxygen, 10))); // KAl2(AlSi3O10)(F,OH)2 + public static Materials Trona = new Materials( + 903, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 1, + 1 | 8, + 135, + 135, + 95, + 0, + "Trona", + "Trona", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + 1, + Arrays.asList( + new MaterialStack(Sodium, 3), + new MaterialStack(Carbon, 2), + new MaterialStack(Hydrogen, 1), + new MaterialStack(Water, 2), + new MaterialStack(Oxygen, 6))); // Na3(CO3)(HCO3) 2H2O + public static Materials Barite = new Materials( + 904, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 8, + 230, + 235, + 255, + 0, + "Barite", + "Barite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + 1, + Arrays.asList(new MaterialStack(Barium, 1), new MaterialStack(Sulfur, 1), new MaterialStack(Oxygen, 4))); + public static Materials Gypsum = new Materials( + 934, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1 | 8, + 230, + 230, + 250, + 0, + "Gypsum", + "Gypsum", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + 1, + Arrays.asList( + new MaterialStack(Calcium, 1), + new MaterialStack(Sulfur, 1), + new MaterialStack(Oxygen, 4), + new MaterialStack(Water, 2))); // CaSO4 2H2O + public static Materials Alunite = new Materials( + 911, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 2, + 1 | 8, + 225, + 180, + 65, + 0, + "Alunite", + "Alunite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + 1, + Arrays.asList( + new MaterialStack(Potassium, 1), + new MaterialStack(Aluminium, 3), + new MaterialStack(Silicon, 2), + new MaterialStack(Hydrogen, 6), + new MaterialStack(Oxygen, 14))); // KAl3(SO4)2(OH)6 + public static Materials Dolomite = new Materials( + 914, + TextureSet.SET_FLINT, + 1.0F, + 0, + 1, + 1 | 8, + 225, + 205, + 205, + 0, + "Dolomite", + "Dolomite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + 1, + Arrays.asList( + new MaterialStack(Calcium, 1), + new MaterialStack(Magnesium, 1), + new MaterialStack(Carbon, 2), + new MaterialStack(Oxygen, 6))); // CaMg(CO3)2 + public static Materials Wollastonite = new Materials( + 915, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 8, + 240, + 240, + 240, + 0, + "Wollastonite", + "Wollastonite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + 1, + Arrays.asList( + new MaterialStack(Calcium, 1), + new MaterialStack(Silicon, 1), + new MaterialStack(Oxygen, 3))); // CaSiO3 + public static Materials Zeolite = new Materials( + 916, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 8, + 240, + 230, + 230, + 0, + "Zeolite", + "Zeolite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + 1, + Arrays.asList( + new MaterialStack(Sodium, 1), + new MaterialStack(Calcium, 4), + new MaterialStack(Silicon, 27), + new MaterialStack(Aluminium, 9), + new MaterialStack(Water, 28), + new MaterialStack(Oxygen, 72))); // NaCa4(Si27Al9)O72 28(H2O) + public static Materials Kyanite = new Materials( + 924, + TextureSet.SET_FLINT, + 1.0F, + 0, + 2, + 1 | 8, + 110, + 110, + 250, + 0, + "Kyanite", + "Kyanite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + 1, + Arrays.asList( + new MaterialStack(Aluminium, 2), + new MaterialStack(Silicon, 1), + new MaterialStack(Oxygen, 5))); // Al2SiO5 + public static Materials Kaolinite = new Materials( + 929, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 8, + 245, + 235, + 235, + 0, + "Kaolinite", + "Kaolinite", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + 1, + Arrays.asList( + new MaterialStack(Aluminium, 2), + new MaterialStack(Silicon, 2), + new MaterialStack(Hydrogen, 4), + new MaterialStack(Oxygen, 9))); // Al2Si2O5(OH)4 + public static Materials Talc = new Materials( + 902, + TextureSet.SET_DULL, + 1.0F, + 0, + 2, + 1 | 8, + 90, + 180, + 90, + 0, + "Talc", + "Talc", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + 1, + Arrays.asList( + new MaterialStack(Magnesium, 3), + new MaterialStack(Silicon, 4), + new MaterialStack(Hydrogen, 2), + new MaterialStack(Oxygen, 12))); // H2Mg3(SiO3)4 + public static Materials Soapstone = new Materials( + 877, + TextureSet.SET_DULL, + 1.0F, + 0, + 1, + 1 | 8, + 95, + 145, + 95, + 0, + "Soapstone", + "Soapstone", + 0, + 0, + -1, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + 1, + Arrays.asList( + new MaterialStack(Magnesium, 3), + new MaterialStack(Silicon, 4), + new MaterialStack(Hydrogen, 2), + new MaterialStack(Oxygen, 12))); // H2Mg3(SiO3)4 + public static Materials Concrete = new Materials( + 947, + TextureSet.SET_ROUGH, + 1.0F, + 0, + 1, + 1, + 100, + 100, + 100, + 0, + "Concrete", + "Concrete", + 0, + 0, + 300, + 0, + false, + false, + 0, + 1, + 1, + Dyes.dyeGray, + 0, + Collections.singletonList(new MaterialStack(Stone, 1)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.TERRA, 1))); + public static Materials IronMagnetic = new Materials( + 354, + TextureSet.SET_MAGNETIC, + 6.0F, + 256, + 2, + 1 | 2 | 64 | 128, + 200, + 200, + 200, + 0, + "IronMagnetic", + "Magnetic Iron", + 0, + 0, + -1, + 0, + false, + false, + 4, + 51, + 50, + Dyes.dyeGray, + 1, + Collections.singletonList(new MaterialStack(Iron, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))); + public static Materials SteelMagnetic = new Materials( + 355, + TextureSet.SET_MAGNETIC, + 6.0F, + 512, + 3, + 1 | 2 | 64 | 128, + 128, + 128, + 128, + 0, + "SteelMagnetic", + "Magnetic Steel", + 0, + 0, + 1000, + 1000, + true, + false, + 4, + 51, + 50, + Dyes.dyeGray, + 1, + Collections.singletonList(new MaterialStack(Steel, 1)), + Arrays.asList( + new TC_AspectStack(TC_Aspects.METALLUM, 1), + new TC_AspectStack(TC_Aspects.ORDO, 1), + new TC_AspectStack(TC_Aspects.MAGNETO, 1))); + public static Materials NeodymiumMagnetic = new Materials( + 356, + TextureSet.SET_MAGNETIC, + 7.0F, + 512, + 2, + 1 | 2 | 64 | 128, + 100, + 100, + 100, + 0, + "NeodymiumMagnetic", + "Magnetic Neodymium", + 0, + 0, + 1297, + 1297, + true, + false, + 4, + 51, + 50, + Dyes.dyeGray, + 1, + Collections.singletonList(new MaterialStack(Neodymium, 1)), + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 1), new TC_AspectStack(TC_Aspects.MAGNETO, 3))); + public static Materials SamariumMagnetic = new Materials( + 399, + TextureSet.SET_MAGNETIC, + 1.0F, + 0, + 2, + 1 | 2 | 64 | 128, + 255, + 255, + 204, + 0, + "SamariumMagnetic", + "Magnetic Samarium", + 0, + 0, + 1345, + 1345, + true, + false, + 4, + 1, + 1, + Dyes.dyeWhite, + 1, + Collections.singletonList(new MaterialStack(Samarium, 1)), + Arrays.asList( + new TC_AspectStack(TC_Aspects.METALLUM, 2), + new TC_AspectStack(TC_Aspects.RADIO, 1), + new TC_AspectStack(TC_Aspects.MAGNETO, 10))); + public static Materials TungstenCarbide = new Materials( + 370, + TextureSet.SET_METALLIC, + 14.0F, + 1280, + 4, + 1 | 2 | 64 | 128, + 51, + 0, + 102, + 0, + "TungstenCarbide", + "Tungstencarbide", + 0, + 0, + 2460, + 2460, + true, + false, + 4, + 1, + 1, + Dyes.dyeBlack, + 2, + Arrays.asList(new MaterialStack(Tungsten, 1), new MaterialStack(Carbon, 1))); + public static Materials VanadiumSteel = new Materials( + 371, + TextureSet.SET_METALLIC, + 3.0F, + 1920, + 3, + 1 | 2 | 64 | 128, + 192, + 192, + 192, + 0, + "VanadiumSteel", + "Vanadiumsteel", + 0, + 0, + 1453, + 1453, + true, + false, + 4, + 1, + 1, + Dyes.dyeWhite, + 2, + Arrays.asList( + new MaterialStack(Vanadium, 1), new MaterialStack(Chrome, 1), new MaterialStack(Steel, 7))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials HSSG = new Materials( + 372, + TextureSet.SET_METALLIC, + 10.0F, + 4000, + 3, + 1 | 2 | 64 | 128, + 153, + 153, + 0, + 0, + "HSSG", + "HSS-G", + 0, + 0, + 4500, + 4500, + true, + false, + 4, + 1, + 1, + Dyes.dyeYellow, + 2, + Arrays.asList( + new MaterialStack(TungstenSteel, 5), + new MaterialStack(Chrome, 1), + new MaterialStack(Molybdenum, 2), + new MaterialStack(Vanadium, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials HSSE = new Materials( + 373, + TextureSet.SET_METALLIC, + 32.0F, + 10240, + 7, + 1 | 2 | 64 | 128, + 51, + 102, + 0, + 0, + "HSSE", + "HSS-E", + 0, + 0, + 5400, + 5400, + true, + false, + 4, + 1, + 1, + Dyes.dyeGreen, + 2, + Arrays.asList( + new MaterialStack(HSSG, 6), + new MaterialStack(Cobalt, 1), + new MaterialStack(Manganese, 1), + new MaterialStack(Silicon, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials HSSS = new Materials( + 374, + TextureSet.SET_METALLIC, + 32.0F, + 10240, + 8, + 1 | 2 | 64 | 128, + 102, + 0, + 51, + 0, + "HSSS", + "HSS-S", + 0, + 0, + 5400, + 5400, + true, + false, + 4, + 1, + 1, + Dyes.dyeRed, + 2, + Arrays.asList( + new MaterialStack(HSSG, 6), new MaterialStack(Iridium, 2), new MaterialStack(Osmium, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials DilutedSulfuricAcid = new MaterialBuilder( + 640, TextureSet.SET_FLUID, "Diluted Sulfuric Acid") + .addCell() + .addFluid() + .setRGB(192, 120, 32) + .setColor(Dyes.dyeOrange) + .setMaterialList(new MaterialStack(SulfuricAcid, 1)) + .constructMaterial(); + public static Materials EpoxidFiberReinforced = new Materials( + 610, + TextureSet.SET_DULL, + 3.0F, + 64, + 1, + 1 | 2 | 64 | 128, + 160, + 112, + 16, + 0, + "EpoxidFiberReinforced", + "Fiber-Reinforced Epoxy Resin", + 0, + 0, + 400, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBrown, + 2, + Collections.singletonList(new MaterialStack(Epoxid, 1)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.MOTUS, 2))); + public static Materials SodiumCarbonate = new MaterialBuilder(695, TextureSet.SET_QUARTZ, "Sodium Carbonate") + .setToolSpeed(1.0F) + .setDurability(64) + .setToolQuality(1) + .addDustItems() + .setRGB(255, 255, 235) + .setColor(Dyes.dyeWhite) + .setBlastFurnaceTemp(851) + .setMeltingPoint(851) + .setBlastFurnaceRequired(false) + .setOreValue(1) + .setExtraData(1) + .setMaterialList(new MaterialStack(Sodium, 2), new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 3)) + .constructMaterial() + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials SodiumAluminate = new MaterialBuilder(696, TextureSet.SET_QUARTZ, "Sodium Aluminate") + .setToolSpeed(1.0F) + .setDurability(64) + .setToolQuality(1) + .addDustItems() + .setRGB(255, 235, 255) + .setColor(Dyes.dyeWhite) + .setBlastFurnaceTemp(1800) + .setMeltingPoint(1800) + .setBlastFurnaceRequired(false) + .setOreValue(1) + .setExtraData(0) + .setMaterialList( + new MaterialStack(Sodium, 1), new MaterialStack(Aluminium, 1), new MaterialStack(Oxygen, 2)) + .constructMaterial() + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Aluminiumoxide = new MaterialBuilder(697, TextureSet.SET_QUARTZ, "Alumina") + .setToolSpeed(1.0F) + .setDurability(64) + .setToolQuality(1) + .addDustItems() + .setRGB(235, 255, 255) + .setColor(Dyes.dyeWhite) + .setBlastFurnaceTemp(2054) + .setMeltingPoint(2054) + .setBlastFurnaceRequired(true) + .setOreValue(1) + .setExtraData(0) + .setMaterialList(new MaterialStack(Aluminium, 2), new MaterialStack(Oxygen, 3)) + .setAspects(Collections.singletonList(new TC_AspectStack(TC_Aspects.GELUM, 2))) + .constructMaterial() + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Aluminiumhydroxide = new MaterialBuilder(698, TextureSet.SET_QUARTZ, "Aluminium Hydroxide") + .setToolSpeed(1.0F) + .setDurability(64) + .setToolQuality(1) + .addDustItems() + .setRGB(235, 235, 255) + .setColor(Dyes.dyeWhite) + .setBlastFurnaceTemp(1200) + .setMeltingPoint(1200) + .setBlastFurnaceRequired(true) + .setOreValue(1) + .setExtraData(0) + .setMaterialList( + new MaterialStack(Aluminium, 1), new MaterialStack(Oxygen, 3), new MaterialStack(Hydrogen, 3)) + .setAspects(Collections.singletonList(new TC_AspectStack(TC_Aspects.GELUM, 2))) + .constructMaterial() + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Cryolite = new MaterialBuilder(699, TextureSet.SET_QUARTZ, "Cryolite") + .setToolSpeed(1.0F) + .setDurability(64) + .setToolQuality(1) + .addOreItems() + .setRGB(191, 239, 255) + .setColor(Dyes.dyeLightBlue) + .setMeltingPoint(1012) + .setBlastFurnaceTemp(1012) + .setExtraData(1) + .setMaterialList( + new MaterialStack(Sodium, 3), new MaterialStack(Aluminium, 1), new MaterialStack(Fluorine, 6)) + .constructMaterial() + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials RedMud = new MaterialBuilder(743, TextureSet.SET_FLUID, "Red Mud") + .addCell() + .addFluid() + .setRGB(140, 22, 22) + .setColor(Dyes.dyeRed) + .constructMaterial(); + + public static Materials Brick = new MaterialBuilder(625, TextureSet.SET_ROUGH, "Brick") + .addDustItems() + .setRGB(155, 86, 67) + .setColor(Dyes.dyeBrown) + .setExtraData(2) + .setMaterialList( + new MaterialStack(Aluminium, 4), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 6)) + .constructMaterial(); + public static Materials Fireclay = new MaterialBuilder(626, TextureSet.SET_ROUGH, "Fireclay") + .addDustItems() + .setRGB(173, 160, 155) + .setExtraData(2) + .setColor(Dyes.dyeBrown) + .setMaterialList(new MaterialStack(Brick, 1)) + .constructMaterial(); // Polybenzimidazole stuff - public static Materials PotassiumNitrade = new MaterialBuilder(590, TextureSet.SET_DULL , "Potassium Nitrate").setName("PotassiumNitrate").addDustItems().setRGB(129, 34, 141).setColor(Dyes.dyePurple).setMaterialList(new MaterialStack(Potassium, 1), new MaterialStack(Nitrogen, 1), new MaterialStack(Oxygen, 3)).addElectrolyzerRecipe().constructMaterial(); - public static Materials ChromiumTrioxide = new MaterialBuilder(591, TextureSet.SET_DULL , "Chromium Trioxide").setName("Chromiumtrioxide").addDustItems().setRGB(255, 228, 225).setColor(Dyes.dyePink).setMaterialList(new MaterialStack(Chrome, 1), new MaterialStack(Oxygen, 3)).addElectrolyzerRecipe().constructMaterial(); - public static Materials Nitrochlorobenzene = new MaterialBuilder(592, TextureSet.SET_FLUID , "2-Nitrochlorobenzene").addCell().addFluid().setRGB(143, 181, 26).setColor(Dyes.dyeLime).setMaterialList(new MaterialStack(Carbon, 6), new MaterialStack(Hydrogen, 4), new MaterialStack(Chlorine, 1), new MaterialStack(Nitrogen, 1), new MaterialStack(Oxygen, 2)).constructMaterial(); - public static Materials Dimethylbenzene = new MaterialBuilder(593, TextureSet.SET_FLUID , "1,2-Dimethylbenzen").setName("Dimethylbenzene").addCell().addFluid().setRGB(102, 156, 64).setColor(Dyes.dyeLime).setMeltingPoint(248).setMaterialList(new MaterialStack(Carbon, 8), new MaterialStack(Hydrogen, 10)).addElectrolyzerRecipe().constructMaterial(); - public static Materials Potassiumdichromate = new MaterialBuilder(594, TextureSet.SET_DULL , "Potassium Dichromate").setName("PotassiumDichromate").addDustItems().setRGB(255, 8, 127).setColor(Dyes.dyePink).setMaterialList(new MaterialStack(Potassium, 2), new MaterialStack(Chrome, 2), new MaterialStack(Oxygen, 7)).addElectrolyzerRecipe().constructMaterial(); - public static Materials PhthalicAcid = new MaterialBuilder(595, TextureSet.SET_FLUID , "Phthalic Acid").setName("phtalicacid").addCell().addFluid().setRGB(54, 133, 71).setColor(Dyes.dyeOrange).setMaterialList(new MaterialStack(Carbon, 8), new MaterialStack(Hydrogen, 6), new MaterialStack(Oxygen, 4)).constructMaterial(); - public static Materials Dichlorobenzidine = new MaterialBuilder(596, TextureSet.SET_FLUID , "3,3-Dichlorobenzidine").addCell().addFluid().setRGB(161, 222, 166).setColor(Dyes.dyeOrange).setMaterialList(new MaterialStack(Carbon, 12),new MaterialStack(Hydrogen, 10), new MaterialStack(Nitrogen, 2), new MaterialStack(Chlorine, 2)).constructMaterial(); - public static Materials Diaminobenzidin = new MaterialBuilder(597, TextureSet.SET_FLUID , "3,3-Diaminobenzidine").addCell().addFluid().setRGB(51, 125, 89).setColor(Dyes.dyeOrange).setMaterialList(new MaterialStack(Carbon, 12),new MaterialStack(Hydrogen, 14),new MaterialStack(Nitrogen, 4)).constructMaterial(); - public static Materials Diphenylisophthalate = new MaterialBuilder(598, TextureSet.SET_FLUID , "Diphenyl Isophtalate").addCell().addFluid().setRGB(36, 110, 87).setColor(Dyes.dyeOrange).setMaterialList(new MaterialStack(Carbon, 20),new MaterialStack(Hydrogen, 14),new MaterialStack(Oxygen, 4)).constructMaterial(); - public static Materials Polybenzimidazole = new Materials(599, TextureSet.SET_DULL ,3.0F, 64, 1, 1|2 |64|128 , 45, 45, 45, 0, "Polybenzimidazole" , "Polybenzimidazole" , 0, 0, 1450, 0, false, false, 1, 1, 1, Dyes.dyeBlack , 0, Arrays.asList(new MaterialStack(Carbon, 20), new MaterialStack(Nitrogen, 4), new MaterialStack(Hydrogen, 12)), Arrays.asList(new TC_AspectStack(TC_Aspects.ORDO, 2),new TC_AspectStack(TC_Aspects.VOLATUS, 1))); - - //Gasoline - public static Materials MTBEMixture = new MaterialBuilder(983, TextureSet.SET_FLUID , "MTBE Reaction Mixture").addCell().addGas().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).setMaterialList(new MaterialStack(Carbon, 5), new MaterialStack(Hydrogen, 12), new MaterialStack(Oxygen, 1)).constructMaterial(); - public static Materials NitrousOxide = new MaterialBuilder(993, TextureSet.SET_FLUID , "Nitrous Oxide").addCell().addGas().setRGB(125, 200, 255).setColor(Dyes.dyeBlue).setMaterialList(new MaterialStack(Nitrogen, 2), new MaterialStack(Oxygen, 1)).addElectrolyzerRecipe().constructMaterial(); - public static Materials AntiKnock = new MaterialBuilder(994, TextureSet.SET_FLUID , "Anti-Knock Agent").setName("EthylTertButylEther").addCell().addFluid().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).setMaterialList(new MaterialStack(Carbon, 6), new MaterialStack(Hydrogen, 14), new MaterialStack(Oxygen, 1)).constructMaterial(); - public static Materials Octane = new MaterialBuilder(995, TextureSet.SET_FLUID , "Octane").addCell().addFluid().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).setFuelType(MaterialBuilder.DIESEL).setFuelPower(80).setMaterialList(new MaterialStack(Carbon, 8), new MaterialStack(Hydrogen, 18)).constructMaterial(); - public static Materials GasolineRaw = new MaterialBuilder(996, TextureSet.SET_FLUID , "Raw Gasoline").addCell().addFluid().setRGB(255,100,0).setColor(Dyes.dyeOrange).constructMaterial(); - public static Materials GasolineRegular = new MaterialBuilder(997, TextureSet.SET_FLUID , "Gasoline").addCell().addFluid().setRGB(255,165,0).setColor(Dyes.dyeOrange).setFuelType(MaterialBuilder.DIESEL).setFuelPower(576).constructMaterial(); - public static Materials GasolinePremium = new MaterialBuilder(998, TextureSet.SET_FLUID , "High Octane Gasoline").addCell().addFluid().setRGB(255,165,0).setColor(Dyes.dyeOrange).setFuelType(MaterialBuilder.DIESEL).setFuelPower(2500).constructMaterial(); - - //ADDED - public static Materials Electrotine = new Materials( 812, TextureSet.SET_SHINY , 1.0F, 0, 1, 1 |8 , 60, 180, 200, 0, "Electrotine" , "Electrotine" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeCyan , 0, Arrays.asList(new MaterialStack(Redstone, 1), new MaterialStack(Electrum, 1)), Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 2))); - public static Materials Galgadorian = new Materials( 384, TextureSet.SET_METALLIC , 16.0F, 3600, 3, 1|2 |64|128 , 154, 105, 119, 0, "Galgadorian" , "Galgadorian" , 0, 0, 3000, 3000, true, false, 1, 1, 1, Dyes.dyePink ).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials EnhancedGalgadorian = new Materials( 385, TextureSet.SET_METALLIC , 32.0F, 7200, 5, 1|2| 64|128 , 152, 93, 133, 0, "EnhancedGalgadorian" , "Enhanced Galgadorian" , 0, 0, 4500, 4500, true, false, 1, 1, 1, Dyes.dyePink ).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials BloodInfusedIron = new Materials( 977, TextureSet.SET_METALLIC , 10.0F, 384, 2, 1|2 |64|128 , 69, 9, 10, 0, "BloodInfusedIron" , "Blood Infused Iron" , 0, 0, 2400, 0, false, false, 3, 1, 1, Dyes.dyeRed , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 3), new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1))); - public static Materials Shadow = new Materials( 368, TextureSet.SET_METALLIC , 32.0F, 8192, 4, 1|2 |8 |64|128 , 16, 3, 66, 0, "Shadow" , "Shadow Metal" , 0, 0, 1800, 1800, true, false, 3, 4, 3, Dyes.dyeBlue ); + public static Materials PotassiumNitrade = new MaterialBuilder(590, TextureSet.SET_DULL, "Potassium Nitrate") + .setName("PotassiumNitrate") + .addDustItems() + .setRGB(129, 34, 141) + .setColor(Dyes.dyePurple) + .setMaterialList( + new MaterialStack(Potassium, 1), new MaterialStack(Nitrogen, 1), new MaterialStack(Oxygen, 3)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials ChromiumTrioxide = new MaterialBuilder(591, TextureSet.SET_DULL, "Chromium Trioxide") + .setName("Chromiumtrioxide") + .addDustItems() + .setRGB(255, 228, 225) + .setColor(Dyes.dyePink) + .setMaterialList(new MaterialStack(Chrome, 1), new MaterialStack(Oxygen, 3)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials Nitrochlorobenzene = new MaterialBuilder(592, TextureSet.SET_FLUID, "2-Nitrochlorobenzene") + .addCell() + .addFluid() + .setRGB(143, 181, 26) + .setColor(Dyes.dyeLime) + .setMaterialList( + new MaterialStack(Carbon, 6), + new MaterialStack(Hydrogen, 4), + new MaterialStack(Chlorine, 1), + new MaterialStack(Nitrogen, 1), + new MaterialStack(Oxygen, 2)) + .constructMaterial(); + public static Materials Dimethylbenzene = new MaterialBuilder(593, TextureSet.SET_FLUID, "1,2-Dimethylbenzen") + .setName("Dimethylbenzene") + .addCell() + .addFluid() + .setRGB(102, 156, 64) + .setColor(Dyes.dyeLime) + .setMeltingPoint(248) + .setMaterialList(new MaterialStack(Carbon, 8), new MaterialStack(Hydrogen, 10)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials Potassiumdichromate = new MaterialBuilder(594, TextureSet.SET_DULL, "Potassium Dichromate") + .setName("PotassiumDichromate") + .addDustItems() + .setRGB(255, 8, 127) + .setColor(Dyes.dyePink) + .setMaterialList( + new MaterialStack(Potassium, 2), new MaterialStack(Chrome, 2), new MaterialStack(Oxygen, 7)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials PhthalicAcid = new MaterialBuilder(595, TextureSet.SET_FLUID, "Phthalic Acid") + .setName("phtalicacid") + .addCell() + .addFluid() + .setRGB(54, 133, 71) + .setColor(Dyes.dyeOrange) + .setMaterialList(new MaterialStack(Carbon, 8), new MaterialStack(Hydrogen, 6), new MaterialStack(Oxygen, 4)) + .constructMaterial(); + public static Materials Dichlorobenzidine = new MaterialBuilder(596, TextureSet.SET_FLUID, "3,3-Dichlorobenzidine") + .addCell() + .addFluid() + .setRGB(161, 222, 166) + .setColor(Dyes.dyeOrange) + .setMaterialList( + new MaterialStack(Carbon, 12), + new MaterialStack(Hydrogen, 10), + new MaterialStack(Nitrogen, 2), + new MaterialStack(Chlorine, 2)) + .constructMaterial(); + public static Materials Diaminobenzidin = new MaterialBuilder(597, TextureSet.SET_FLUID, "3,3-Diaminobenzidine") + .addCell() + .addFluid() + .setRGB(51, 125, 89) + .setColor(Dyes.dyeOrange) + .setMaterialList( + new MaterialStack(Carbon, 12), new MaterialStack(Hydrogen, 14), new MaterialStack(Nitrogen, 4)) + .constructMaterial(); + public static Materials Diphenylisophthalate = new MaterialBuilder( + 598, TextureSet.SET_FLUID, "Diphenyl Isophtalate") + .addCell() + .addFluid() + .setRGB(36, 110, 87) + .setColor(Dyes.dyeOrange) + .setMaterialList( + new MaterialStack(Carbon, 20), new MaterialStack(Hydrogen, 14), new MaterialStack(Oxygen, 4)) + .constructMaterial(); + public static Materials Polybenzimidazole = new Materials( + 599, + TextureSet.SET_DULL, + 3.0F, + 64, + 1, + 1 | 2 | 64 | 128, + 45, + 45, + 45, + 0, + "Polybenzimidazole", + "Polybenzimidazole", + 0, + 0, + 1450, + 0, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlack, + 0, + Arrays.asList( + new MaterialStack(Carbon, 20), new MaterialStack(Nitrogen, 4), new MaterialStack(Hydrogen, 12)), + Arrays.asList(new TC_AspectStack(TC_Aspects.ORDO, 2), new TC_AspectStack(TC_Aspects.VOLATUS, 1))); + + // Gasoline + public static Materials MTBEMixture = new MaterialBuilder(983, TextureSet.SET_FLUID, "MTBE Reaction Mixture") + .addCell() + .addGas() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeWhite) + .setMaterialList( + new MaterialStack(Carbon, 5), new MaterialStack(Hydrogen, 12), new MaterialStack(Oxygen, 1)) + .constructMaterial(); + public static Materials NitrousOxide = new MaterialBuilder(993, TextureSet.SET_FLUID, "Nitrous Oxide") + .addCell() + .addGas() + .setRGB(125, 200, 255) + .setColor(Dyes.dyeBlue) + .setMaterialList(new MaterialStack(Nitrogen, 2), new MaterialStack(Oxygen, 1)) + .addElectrolyzerRecipe() + .constructMaterial(); + public static Materials AntiKnock = new MaterialBuilder(994, TextureSet.SET_FLUID, "Anti-Knock Agent") + .setName("EthylTertButylEther") + .addCell() + .addFluid() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeWhite) + .setMaterialList( + new MaterialStack(Carbon, 6), new MaterialStack(Hydrogen, 14), new MaterialStack(Oxygen, 1)) + .constructMaterial(); + public static Materials Octane = new MaterialBuilder(995, TextureSet.SET_FLUID, "Octane") + .addCell() + .addFluid() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeWhite) + .setFuelType(MaterialBuilder.DIESEL) + .setFuelPower(80) + .setMaterialList(new MaterialStack(Carbon, 8), new MaterialStack(Hydrogen, 18)) + .constructMaterial(); + public static Materials GasolineRaw = new MaterialBuilder(996, TextureSet.SET_FLUID, "Raw Gasoline") + .addCell() + .addFluid() + .setRGB(255, 100, 0) + .setColor(Dyes.dyeOrange) + .constructMaterial(); + public static Materials GasolineRegular = new MaterialBuilder(997, TextureSet.SET_FLUID, "Gasoline") + .addCell() + .addFluid() + .setRGB(255, 165, 0) + .setColor(Dyes.dyeOrange) + .setFuelType(MaterialBuilder.DIESEL) + .setFuelPower(576) + .constructMaterial(); + public static Materials GasolinePremium = new MaterialBuilder(998, TextureSet.SET_FLUID, "High Octane Gasoline") + .addCell() + .addFluid() + .setRGB(255, 165, 0) + .setColor(Dyes.dyeOrange) + .setFuelType(MaterialBuilder.DIESEL) + .setFuelPower(2500) + .constructMaterial(); + + // ADDED + public static Materials Electrotine = new Materials( + 812, + TextureSet.SET_SHINY, + 1.0F, + 0, + 1, + 1 | 8, + 60, + 180, + 200, + 0, + "Electrotine", + "Electrotine", + 0, + 0, + -1, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeCyan, + 0, + Arrays.asList(new MaterialStack(Redstone, 1), new MaterialStack(Electrum, 1)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 2))); + public static Materials Galgadorian = new Materials( + 384, + TextureSet.SET_METALLIC, + 16.0F, + 3600, + 3, + 1 | 2 | 64 | 128, + 154, + 105, + 119, + 0, + "Galgadorian", + "Galgadorian", + 0, + 0, + 3000, + 3000, + true, + false, + 1, + 1, + 1, + Dyes.dyePink) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials EnhancedGalgadorian = new Materials( + 385, + TextureSet.SET_METALLIC, + 32.0F, + 7200, + 5, + 1 | 2 | 64 | 128, + 152, + 93, + 133, + 0, + "EnhancedGalgadorian", + "Enhanced Galgadorian", + 0, + 0, + 4500, + 4500, + true, + false, + 1, + 1, + 1, + Dyes.dyePink) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials BloodInfusedIron = new Materials( + 977, + TextureSet.SET_METALLIC, + 10.0F, + 384, + 2, + 1 | 2 | 64 | 128, + 69, + 9, + 10, + 0, + "BloodInfusedIron", + "Blood Infused Iron", + 0, + 0, + 2400, + 0, + false, + false, + 3, + 1, + 1, + Dyes.dyeRed, + Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 3), new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1))); + public static Materials Shadow = new Materials( + 368, + TextureSet.SET_METALLIC, + 32.0F, + 8192, + 4, + 1 | 2 | 8 | 64 | 128, + 16, + 3, + 66, + 0, + "Shadow", + "Shadow Metal", + 0, + 0, + 1800, + 1800, + true, + false, + 3, + 4, + 3, + Dyes.dyeBlue); /** * Galaxy Space 1.10 compat from Version 2.6 */ - public static Materials Ledox = new Materials( 390, TextureSet.SET_SHINY , 15.0F, 1024, 4, 1|2 |8 |64|128 , 0, 116, 255, 0, "Ledox" , "Ledox" , 0, 0, -1, 0, false, false, 4, 1, 1, Dyes.dyeBlue ); - public static Materials Quantium = new Materials( 391, TextureSet.SET_SHINY , 18.0F, 2048, 4, 1|2 |8 |64|128 , 0, 209, 11, 0, "Quantium" , "Quantium" , 0, 0, 9900, 9900, true, false, 4, 1, 1, Dyes.dyeLime ); - public static Materials Mytryl = new Materials( 387, TextureSet.SET_SHINY , 8.0F, 512, 4, 1|2 |8 |64|128 , 242, 100, 4, 0, "Mytryl" , "Mytryl" , 0, 0, 3600, 3600, true, false, 4, 1, 1, Dyes.dyeOrange ); - public static Materials BlackPlutonium = new Materials( 388, TextureSet.SET_DULL , 36.0F, 8192, 8, 1|2 |8 |64|128 , 50, 50, 50, 0, "BlackPlutonium" , "Black Plutonium" , 0, 0, 9000, 9000, true, false, 4, 1, 1, Dyes.dyeBlack ).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials CallistoIce = new Materials( 389, TextureSet.SET_SHINY , 9.0F, 1024, 4, 1|2 |8 |64|128 , 30, 177, 255, 0, "CallistoIce" , "Callisto Ice" , 0, 0, -1, 0, false, false, 4, 1, 1, Dyes.dyeLightBlue ); - public static Materials Duralumin = new Materials( 392, TextureSet.SET_SHINY , 16.0F, 512, 3, 1|2 |8 |64|128 , 235, 209, 160, 0, "Duralumin" , "Duralumin" , 0, 0, 1600, 1600, true, false, 4, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Aluminium, 6), new MaterialStack(Copper, 1), new MaterialStack(Manganese, 1), new MaterialStack(Magnesium, 1))); - public static Materials Oriharukon = new Materials( 393, TextureSet.SET_SHINY , 32.0F, 10240, 5, 1|2 |8 |64|128 , 103, 125, 104, 0, "Oriharukon" , "Oriharukon" , 0, 0, 5400, 5400, true, false, 4, 1, 1, Dyes.dyeLime , Element.Oh, Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2),new TC_AspectStack(TC_Aspects.LUCRUM, 2), new TC_AspectStack(TC_Aspects.ALIENIS, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials MysteriousCrystal = new Materials( 398, TextureSet.SET_SHINY , 8.0F, 256, 6, 1|2 |8 |64|128 , 22, 133, 108, 0, "MysteriousCrystal" , "Mysterious Crystal" , 0, 0, 7200, 7200, true, false, 4, 1, 1, Dyes.dyeCyan ).disableAutoGeneratedBlastFurnaceRecipes(); - - //\/HAD TO MOVE DOWN SECTION - public static Materials RedstoneAlloy = new Materials( 381, TextureSet.SET_METALLIC , 3.0F, 128, 2, 1|2 |64|128 , 181, 51, 51, 0, "RedstoneAlloy" , "Redstone Alloy" , 0, 0, 671, 1000, true, false, 1, 1, 1, Dyes.dyeRed , 1, Arrays.asList(new MaterialStack(Redstone, 1), new MaterialStack(Silicon, 1), new MaterialStack(Coal, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Soularium = new Materials( 379, TextureSet.SET_METALLIC , 8.0F, 256, 2, 1|2 |64|128 , 65, 46, 29, 0, "Soularium" , "Soularium" , 0, 0, 800, 1000, true, false, 3, 1, 1, Dyes.dyeBrown , 1, Arrays.asList(new MaterialStack(SoulSand, 1), new MaterialStack(Gold, 1), new MaterialStack(Ash, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials ConductiveIron = new Materials( 369, TextureSet.SET_METALLIC , 6.0F, 256, 3, 1|2 |64|128 , 217, 178, 171, 0, "ConductiveIron" , "Conductive Iron" , 0, 0, -1, 1200, true, false, 4, 1, 1, Dyes.dyeRed , 1, Arrays.asList(new MaterialStack(RedstoneAlloy, 1), new MaterialStack(Iron, 1), new MaterialStack(Silver, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials ElectricalSteel = new Materials( 365, TextureSet.SET_METALLIC , 6.0F, 512, 2, 1|2 |64|128 , 185, 185, 185, 0, "ElectricalSteel" , "Electrical Steel" , 0, 0, 1811, 1000, true, false, 4, 1, 1, Dyes.dyeGray , 1, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Coal, 1), new MaterialStack(Silicon, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials EnergeticAlloy = new Materials( 366, TextureSet.SET_METALLIC , 12.0F, 1024, 3, 1|2 |64|128 , 255, 170, 81, 0, "EnergeticAlloy" , "Energetic Alloy" , 0, 0, -1, 2200, true, false, 3, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(ConductiveIron, 1), new MaterialStack(Gold, 1), new MaterialStack(BlackSteel, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials VibrantAlloy = new Materials( 367, TextureSet.SET_METALLIC , 18.0F, 4048, 4, 1|2 |64|128 , 157, 188, 53, 0, "VibrantAlloy" , "Vibrant Alloy" , 0, 0, 3300, 3300, true, false, 4, 1, 1, Dyes.dyeLime , 1, Arrays.asList(new MaterialStack(EnergeticAlloy, 1), new MaterialStack(EnderEye, 1), new MaterialStack(Chrome, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials PulsatingIron = new Materials( 378, TextureSet.SET_METALLIC , 6.0F, 256, 3, 1|2 |64|128 , 128, 246, 155, 0, "PulsatingIron" , "Pulsating Iron" , 0, 0, -1, 1800, true, false, 4, 1, 1, Dyes.dyeLime , 1, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(EnderPearl, 1), new MaterialStack(RedstoneAlloy, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials DarkSteel = new Materials( 364, TextureSet.SET_METALLIC , 8.0F, 512, 3, 1|2 |64|128 , 80, 70, 80, 0, "DarkSteel" , "Dark Steel" , 0, 0, -1, 1800, true, false, 3, 1, 1, Dyes.dyePurple , 1, Arrays.asList(new MaterialStack(ElectricalSteel, 1), new MaterialStack(Coal, 1), new MaterialStack(Obsidian, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials EndSteel = new Materials( 401, TextureSet.SET_METALLIC , 12.0F, 2000, 4, 1|2 |64|128 , 223, 217, 165, 0, "EndSteel" , "End Steel" , 0, 0, 940, 3600, true, false, 3, 1, 1, Dyes.dyeYellow , 1, Arrays.asList(new MaterialStack(DarkSteel, 1), new MaterialStack(Tungsten, 1), new MaterialStack(Endstone, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials CrudeSteel = new Materials( 402, TextureSet.SET_METALLIC , 2.0F, 64, 2, 1|2 |64|128 , 163, 158, 154, 0, "CrudeSteel" , "Clay Compound" , 0, 0, -1, 1000, false,false, 4, 1, 1, Dyes.dyeGray , 1, Arrays.asList(new MaterialStack(Stone, 1), new MaterialStack(Clay, 1), new MaterialStack(Flint, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials CrystallineAlloy = new Materials( 403, TextureSet.SET_METALLIC , 18.0F, 768, 4, 1|2 |64|128 , 114, 197, 197, 0, "CrystallineAlloy" , "Crystalline Alloy" , 0, 0, 4500, 4500, true, false, 4, 1, 1, Dyes.dyeCyan , 1, Arrays.asList(new MaterialStack(Gold, 1), new MaterialStack(Diamond, 1), new MaterialStack(PulsatingIron, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials MelodicAlloy = new Materials( 404, TextureSet.SET_METALLIC , 24.0F, 1024, 5, 1|2 |64|128 , 136, 98, 136, 0, "MelodicAlloy" , "Melodic Alloy" , 0, 0, 5400, 5400, true, false, 4, 1, 1, Dyes.dyeMagenta , 1, Arrays.asList(new MaterialStack(EndSteel, 1), new MaterialStack(EnderEye, 1), new MaterialStack(Oriharukon, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials StellarAlloy = new Materials( 405, TextureSet.SET_METALLIC , 96.0F, 10240, 7, 1|2 |64|128 , 217, 220, 203, 0, "StellarAlloy" , "Stellar Alloy" , 0, 0, 7200, 7200, true, false, 4, 1, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(NetherStar, 1), new MaterialStack(MelodicAlloy, 1), new MaterialStack(Naquadah, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials CrystallinePinkSlime = new Materials( 406, TextureSet.SET_METALLIC , 6.0F, 128, 3, 1|2 |64|128 , 231, 158, 219, 0, "CrystallinePinkSlime" , "Crystalline Pink Slime" , 0, 0, 5000, 5000, true, false, 4, 1, 1, Dyes.dyePink , 1, Arrays.asList(new MaterialStack(CrystallineAlloy, 1), new MaterialStack(Diamond, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials EnergeticSilver = new Materials( 407, TextureSet.SET_METALLIC , 8.0F, 512, 3, 1|2 |64|128 , 149, 183, 205, 0, "EnergeticSilver" , "Energetic Silver" , 0, 0, -1, 2200, true, false, 4, 1, 1, Dyes.dyeLightBlue , 1, Arrays.asList(new MaterialStack(Silver, 1), new MaterialStack(ConductiveIron, 1), new MaterialStack(BlackSteel, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials VividAlloy = new Materials( 408, TextureSet.SET_METALLIC , 12.0F, 768, 4, 1|2 |64|128 , 70, 188, 219, 0, "VividAlloy" , "Vivid Alloy" , 0, 0, 3300, 3300, true, false, 4, 1, 1, Dyes.dyeBlue , 1, Arrays.asList(new MaterialStack(EnergeticSilver, 1), new MaterialStack(EnderEye, 1), new MaterialStack(Chrome, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Enderium = new Materials( 321, TextureSet.SET_DULL , 8.0F, 1500, 3, 1|2 |64|128 , 89, 145, 135, 0, "Enderium" , "Enderium" , 0, 0, 4500, 4500, true, false, 1, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(EnderiumBase, 2), new MaterialStack(Thaumium, 1), new MaterialStack(EnderPearl, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ALIENIS, 1))).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Mithril = new Materials( 331, TextureSet.SET_SHINY , 32.0F, 64, 2, 1|2 |8 |64 , 255, 255, 210, 0, "Mithril" , "Mithril" , 0, 0, -1, 0, false, false, 4, 3, 2, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Platinum, 2), new MaterialStack(Thaumium, 1))).disableAutoGeneratedBlastFurnaceRecipes().setTurbineMultipliers(22, 1, 1); - public static Materials BlueAlloy = new Materials( 309, TextureSet.SET_DULL , 1.0F, 0, 0, 1|2 , 100, 180, 255, 0, "BlueAlloy" , "Blue Alloy" , 0, 0, -1, 0, false, false, 3, 5, 1, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Silver, 1), new MaterialStack(Electrotine, 4)), Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 3))); - public static Materials ShadowIron = new Materials( 336, TextureSet.SET_METALLIC , 32.0F, 10240, 2, 1|2 |8 |64 , 120, 120, 120, 0, "ShadowIron" , "Shadow Iron" , 0, 0, -1, 0, false, false, 3, 4, 3, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Thaumium, 3))).disableAutoGeneratedBlastFurnaceRecipes().setTurbineMultipliers(1, 76, 1); - public static Materials ShadowSteel = new Materials( 337, TextureSet.SET_METALLIC , 6.0F, 768, 4, 1|2 |64 , 90, 90, 90, 0, "ShadowSteel" , "Shadow Steel" , 0, 0, -1, 1700, true, false, 4, 4, 3, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Thaumium, 3))); - public static Materials AstralSilver = new Materials( 333, TextureSet.SET_SHINY , 10.0F, 64, 2, 1|2 |64 , 230, 230, 255, 0, "AstralSilver" , "Astral Silver" , 0, 0, -1, 0, false, false, 4, 3, 2, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Silver, 2), new MaterialStack(Thaumium, 1))); - - /** + public static Materials Ledox = new Materials( + 390, + TextureSet.SET_SHINY, + 15.0F, + 1024, + 4, + 1 | 2 | 8 | 64 | 128, + 0, + 116, + 255, + 0, + "Ledox", + "Ledox", + 0, + 0, + -1, + 0, + false, + false, + 4, + 1, + 1, + Dyes.dyeBlue); + + public static Materials Quantium = new Materials( + 391, + TextureSet.SET_SHINY, + 18.0F, + 2048, + 4, + 1 | 2 | 8 | 64 | 128, + 0, + 209, + 11, + 0, + "Quantium", + "Quantium", + 0, + 0, + 9900, + 9900, + true, + false, + 4, + 1, + 1, + Dyes.dyeLime); + public static Materials Mytryl = new Materials( + 387, + TextureSet.SET_SHINY, + 8.0F, + 512, + 4, + 1 | 2 | 8 | 64 | 128, + 242, + 100, + 4, + 0, + "Mytryl", + "Mytryl", + 0, + 0, + 3600, + 3600, + true, + false, + 4, + 1, + 1, + Dyes.dyeOrange); + public static Materials BlackPlutonium = new Materials( + 388, + TextureSet.SET_DULL, + 36.0F, + 8192, + 8, + 1 | 2 | 8 | 64 | 128, + 50, + 50, + 50, + 0, + "BlackPlutonium", + "Black Plutonium", + 0, + 0, + 9000, + 9000, + true, + false, + 4, + 1, + 1, + Dyes.dyeBlack) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials CallistoIce = new Materials( + 389, + TextureSet.SET_SHINY, + 9.0F, + 1024, + 4, + 1 | 2 | 8 | 64 | 128, + 30, + 177, + 255, + 0, + "CallistoIce", + "Callisto Ice", + 0, + 0, + -1, + 0, + false, + false, + 4, + 1, + 1, + Dyes.dyeLightBlue); + public static Materials Duralumin = new Materials( + 392, + TextureSet.SET_SHINY, + 16.0F, + 512, + 3, + 1 | 2 | 8 | 64 | 128, + 235, + 209, + 160, + 0, + "Duralumin", + "Duralumin", + 0, + 0, + 1600, + 1600, + true, + false, + 4, + 1, + 1, + Dyes.dyeOrange, + 2, + Arrays.asList( + new MaterialStack(Aluminium, 6), + new MaterialStack(Copper, 1), + new MaterialStack(Manganese, 1), + new MaterialStack(Magnesium, 1))); + public static Materials Oriharukon = new Materials( + 393, + TextureSet.SET_SHINY, + 32.0F, + 10240, + 5, + 1 | 2 | 8 | 64 | 128, + 103, + 125, + 104, + 0, + "Oriharukon", + "Oriharukon", + 0, + 0, + 5400, + 5400, + true, + false, + 4, + 1, + 1, + Dyes.dyeLime, + Element.Oh, + Arrays.asList( + new TC_AspectStack(TC_Aspects.METALLUM, 2), + new TC_AspectStack(TC_Aspects.LUCRUM, 2), + new TC_AspectStack(TC_Aspects.ALIENIS, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials MysteriousCrystal = new Materials( + 398, + TextureSet.SET_SHINY, + 8.0F, + 256, + 6, + 1 | 2 | 8 | 64 | 128, + 22, + 133, + 108, + 0, + "MysteriousCrystal", + "Mysterious Crystal", + 0, + 0, + 7200, + 7200, + true, + false, + 4, + 1, + 1, + Dyes.dyeCyan) + .disableAutoGeneratedBlastFurnaceRecipes(); + + // \/HAD TO MOVE DOWN SECTION + public static Materials RedstoneAlloy = new Materials( + 381, + TextureSet.SET_METALLIC, + 3.0F, + 128, + 2, + 1 | 2 | 64 | 128, + 181, + 51, + 51, + 0, + "RedstoneAlloy", + "Redstone Alloy", + 0, + 0, + 671, + 1000, + true, + false, + 1, + 1, + 1, + Dyes.dyeRed, + 1, + Arrays.asList( + new MaterialStack(Redstone, 1), new MaterialStack(Silicon, 1), new MaterialStack(Coal, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Soularium = new Materials( + 379, + TextureSet.SET_METALLIC, + 8.0F, + 256, + 2, + 1 | 2 | 64 | 128, + 65, + 46, + 29, + 0, + "Soularium", + "Soularium", + 0, + 0, + 800, + 1000, + true, + false, + 3, + 1, + 1, + Dyes.dyeBrown, + 1, + Arrays.asList( + new MaterialStack(SoulSand, 1), new MaterialStack(Gold, 1), new MaterialStack(Ash, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials ConductiveIron = new Materials( + 369, + TextureSet.SET_METALLIC, + 6.0F, + 256, + 3, + 1 | 2 | 64 | 128, + 217, + 178, + 171, + 0, + "ConductiveIron", + "Conductive Iron", + 0, + 0, + -1, + 1200, + true, + false, + 4, + 1, + 1, + Dyes.dyeRed, + 1, + Arrays.asList( + new MaterialStack(RedstoneAlloy, 1), + new MaterialStack(Iron, 1), + new MaterialStack(Silver, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials ElectricalSteel = new Materials( + 365, + TextureSet.SET_METALLIC, + 6.0F, + 512, + 2, + 1 | 2 | 64 | 128, + 185, + 185, + 185, + 0, + "ElectricalSteel", + "Electrical Steel", + 0, + 0, + 1811, + 1000, + true, + false, + 4, + 1, + 1, + Dyes.dyeGray, + 1, + Arrays.asList( + new MaterialStack(Steel, 1), new MaterialStack(Coal, 1), new MaterialStack(Silicon, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials EnergeticAlloy = new Materials( + 366, + TextureSet.SET_METALLIC, + 12.0F, + 1024, + 3, + 1 | 2 | 64 | 128, + 255, + 170, + 81, + 0, + "EnergeticAlloy", + "Energetic Alloy", + 0, + 0, + -1, + 2200, + true, + false, + 3, + 1, + 1, + Dyes.dyeOrange, + 1, + Arrays.asList( + new MaterialStack(ConductiveIron, 1), + new MaterialStack(Gold, 1), + new MaterialStack(BlackSteel, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials VibrantAlloy = new Materials( + 367, + TextureSet.SET_METALLIC, + 18.0F, + 4048, + 4, + 1 | 2 | 64 | 128, + 157, + 188, + 53, + 0, + "VibrantAlloy", + "Vibrant Alloy", + 0, + 0, + 3300, + 3300, + true, + false, + 4, + 1, + 1, + Dyes.dyeLime, + 1, + Arrays.asList( + new MaterialStack(EnergeticAlloy, 1), + new MaterialStack(EnderEye, 1), + new MaterialStack(Chrome, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials PulsatingIron = new Materials( + 378, + TextureSet.SET_METALLIC, + 6.0F, + 256, + 3, + 1 | 2 | 64 | 128, + 128, + 246, + 155, + 0, + "PulsatingIron", + "Pulsating Iron", + 0, + 0, + -1, + 1800, + true, + false, + 4, + 1, + 1, + Dyes.dyeLime, + 1, + Arrays.asList( + new MaterialStack(Iron, 1), + new MaterialStack(EnderPearl, 1), + new MaterialStack(RedstoneAlloy, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials DarkSteel = new Materials( + 364, + TextureSet.SET_METALLIC, + 8.0F, + 512, + 3, + 1 | 2 | 64 | 128, + 80, + 70, + 80, + 0, + "DarkSteel", + "Dark Steel", + 0, + 0, + -1, + 1800, + true, + false, + 3, + 1, + 1, + Dyes.dyePurple, + 1, + Arrays.asList( + new MaterialStack(ElectricalSteel, 1), + new MaterialStack(Coal, 1), + new MaterialStack(Obsidian, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials EndSteel = new Materials( + 401, + TextureSet.SET_METALLIC, + 12.0F, + 2000, + 4, + 1 | 2 | 64 | 128, + 223, + 217, + 165, + 0, + "EndSteel", + "End Steel", + 0, + 0, + 940, + 3600, + true, + false, + 3, + 1, + 1, + Dyes.dyeYellow, + 1, + Arrays.asList( + new MaterialStack(DarkSteel, 1), + new MaterialStack(Tungsten, 1), + new MaterialStack(Endstone, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials CrudeSteel = new Materials( + 402, + TextureSet.SET_METALLIC, + 2.0F, + 64, + 2, + 1 | 2 | 64 | 128, + 163, + 158, + 154, + 0, + "CrudeSteel", + "Clay Compound", + 0, + 0, + -1, + 1000, + false, + false, + 4, + 1, + 1, + Dyes.dyeGray, + 1, + Arrays.asList(new MaterialStack(Stone, 1), new MaterialStack(Clay, 1), new MaterialStack(Flint, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials CrystallineAlloy = new Materials( + 403, + TextureSet.SET_METALLIC, + 18.0F, + 768, + 4, + 1 | 2 | 64 | 128, + 114, + 197, + 197, + 0, + "CrystallineAlloy", + "Crystalline Alloy", + 0, + 0, + 4500, + 4500, + true, + false, + 4, + 1, + 1, + Dyes.dyeCyan, + 1, + Arrays.asList( + new MaterialStack(Gold, 1), + new MaterialStack(Diamond, 1), + new MaterialStack(PulsatingIron, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials MelodicAlloy = new Materials( + 404, + TextureSet.SET_METALLIC, + 24.0F, + 1024, + 5, + 1 | 2 | 64 | 128, + 136, + 98, + 136, + 0, + "MelodicAlloy", + "Melodic Alloy", + 0, + 0, + 5400, + 5400, + true, + false, + 4, + 1, + 1, + Dyes.dyeMagenta, + 1, + Arrays.asList( + new MaterialStack(EndSteel, 1), + new MaterialStack(EnderEye, 1), + new MaterialStack(Oriharukon, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials StellarAlloy = new Materials( + 405, + TextureSet.SET_METALLIC, + 96.0F, + 10240, + 7, + 1 | 2 | 64 | 128, + 217, + 220, + 203, + 0, + "StellarAlloy", + "Stellar Alloy", + 0, + 0, + 7200, + 7200, + true, + false, + 4, + 1, + 1, + Dyes.dyeWhite, + 1, + Arrays.asList( + new MaterialStack(NetherStar, 1), + new MaterialStack(MelodicAlloy, 1), + new MaterialStack(Naquadah, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials CrystallinePinkSlime = new Materials( + 406, + TextureSet.SET_METALLIC, + 6.0F, + 128, + 3, + 1 | 2 | 64 | 128, + 231, + 158, + 219, + 0, + "CrystallinePinkSlime", + "Crystalline Pink Slime", + 0, + 0, + 5000, + 5000, + true, + false, + 4, + 1, + 1, + Dyes.dyePink, + 1, + Arrays.asList(new MaterialStack(CrystallineAlloy, 1), new MaterialStack(Diamond, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials EnergeticSilver = new Materials( + 407, + TextureSet.SET_METALLIC, + 8.0F, + 512, + 3, + 1 | 2 | 64 | 128, + 149, + 183, + 205, + 0, + "EnergeticSilver", + "Energetic Silver", + 0, + 0, + -1, + 2200, + true, + false, + 4, + 1, + 1, + Dyes.dyeLightBlue, + 1, + Arrays.asList( + new MaterialStack(Silver, 1), + new MaterialStack(ConductiveIron, 1), + new MaterialStack(BlackSteel, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials VividAlloy = new Materials( + 408, + TextureSet.SET_METALLIC, + 12.0F, + 768, + 4, + 1 | 2 | 64 | 128, + 70, + 188, + 219, + 0, + "VividAlloy", + "Vivid Alloy", + 0, + 0, + 3300, + 3300, + true, + false, + 4, + 1, + 1, + Dyes.dyeBlue, + 1, + Arrays.asList( + new MaterialStack(EnergeticSilver, 1), + new MaterialStack(EnderEye, 1), + new MaterialStack(Chrome, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Enderium = new Materials( + 321, + TextureSet.SET_DULL, + 8.0F, + 1500, + 3, + 1 | 2 | 64 | 128, + 89, + 145, + 135, + 0, + "Enderium", + "Enderium", + 0, + 0, + 4500, + 4500, + true, + false, + 1, + 1, + 1, + Dyes.dyeGreen, + 1, + Arrays.asList( + new MaterialStack(EnderiumBase, 2), + new MaterialStack(Thaumium, 1), + new MaterialStack(EnderPearl, 1)), + Arrays.asList( + new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ALIENIS, 1))) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Mithril = new Materials( + 331, + TextureSet.SET_SHINY, + 32.0F, + 64, + 2, + 1 | 2 | 8 | 64, + 255, + 255, + 210, + 0, + "Mithril", + "Mithril", + 0, + 0, + -1, + 0, + false, + false, + 4, + 3, + 2, + Dyes.dyeLightBlue, + 2, + Arrays.asList(new MaterialStack(Platinum, 2), new MaterialStack(Thaumium, 1))) + .disableAutoGeneratedBlastFurnaceRecipes() + .setTurbineMultipliers(22, 1, 1); + public static Materials BlueAlloy = new Materials( + 309, + TextureSet.SET_DULL, + 1.0F, + 0, + 0, + 1 | 2, + 100, + 180, + 255, + 0, + "BlueAlloy", + "Blue Alloy", + 0, + 0, + -1, + 0, + false, + false, + 3, + 5, + 1, + Dyes.dyeLightBlue, + 2, + Arrays.asList(new MaterialStack(Silver, 1), new MaterialStack(Electrotine, 4)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 3))); + public static Materials ShadowIron = new Materials( + 336, + TextureSet.SET_METALLIC, + 32.0F, + 10240, + 2, + 1 | 2 | 8 | 64, + 120, + 120, + 120, + 0, + "ShadowIron", + "Shadow Iron", + 0, + 0, + -1, + 0, + false, + false, + 3, + 4, + 3, + Dyes.dyeBlack, + 2, + Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Thaumium, 3))) + .disableAutoGeneratedBlastFurnaceRecipes() + .setTurbineMultipliers(1, 76, 1); + public static Materials ShadowSteel = new Materials( + 337, + TextureSet.SET_METALLIC, + 6.0F, + 768, + 4, + 1 | 2 | 64, + 90, + 90, + 90, + 0, + "ShadowSteel", + "Shadow Steel", + 0, + 0, + -1, + 1700, + true, + false, + 4, + 4, + 3, + Dyes.dyeBlack, + 2, + Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Thaumium, 3))); + public static Materials AstralSilver = new Materials( + 333, + TextureSet.SET_SHINY, + 10.0F, + 64, + 2, + 1 | 2 | 64, + 230, + 230, + 255, + 0, + "AstralSilver", + "Astral Silver", + 0, + 0, + -1, + 0, + false, + false, + 4, + 3, + 2, + Dyes.dyeWhite, + 2, + Arrays.asList(new MaterialStack(Silver, 2), new MaterialStack(Thaumium, 1))); + + /** * Op materials (draconic evolution above) */ - //TODO: add other op materials? maybe some new ores or new only fusion made op materials from op materials??? like neutronium bedrockium alloy etc. - public static Materials InfinityCatalyst = new Materials( 394, TextureSet.SET_SHINY , 64.0F,1310720, 10, 1|2 |8 |64|128 , 255, 255, 255, 0, "InfinityCatalyst" , "Infinity Catalyst" , 5, 500000, 10800, 10800, true, false, 20, 1, 1, Dyes.dyeLightGray ); - public static Materials Infinity = new Materials( 397, new TextureSet("infinity", true), 256.0F,2621440, 17, 1|2 |64|128 , 255, 255, 255, 0, "Infinity" , "Infinity" , 5, 5000000, 10800, 10800, true, false, 40, 1, 1, Dyes.dyeLightGray ); - public static Materials Bedrockium = new MaterialBuilder(395,TextureSet.SET_DULL, "Bedrockium").addOreItems().addDustItems().addMetalItems().setDurability(327680).setToolSpeed(8f).setToolQuality(9).setRGB(50,50,50).setName("Bedrockium").setBlastFurnaceRequired(true).setBlastFurnaceTemp(9900).setMeltingPoint(9900).setColor(Dyes.dyeBlack).setOreValue(4).setDensityDivider(1).setDensityMultiplier(1).constructMaterial(); - public static Materials Trinium = new Materials( 868, TextureSet.SET_SHINY , 128.0F, 51200, 8, 1|2 |8 |64|128 , 200, 200, 210, 0, "Trinium" , "Trinium" , 0, 0, 7200, 7200, true, false, 4, 1, 1, Dyes.dyeLightGray ).disableAutoGeneratedBlastFurnaceRecipes(); - public static Materials Ichorium = new Materials( 978, TextureSet.SET_SHINY , 32.0F, 850000, 12, 1|2 |8 |32|64|128 , 211, 120, 6, 0, "Ichorium" , "Ichorium" , 5, 250000, 9000, 9000, true, false, 4, 1, 1, Dyes.dyeOrange ).setTurbineMultipliers(30, 30, 3); - public static Materials CosmicNeutronium = new Materials( 982, TextureSet.SET_SHINY , 96.0F, 163840, 12, 1|2 |8 |32|64|128 , 50, 50, 50, 0, "CosmicNeutronium" , "Cosmic Neutronium" , 0, 0, 9900, 9900, true, false, 4, 1, 1, Dyes.dyeBlack ); + // TODO: add other op materials? maybe some new ores or new only fusion made op materials from op materials??? like + // neutronium bedrockium alloy etc. + public static Materials InfinityCatalyst = new Materials( + 394, + TextureSet.SET_SHINY, + 64.0F, + 1310720, + 10, + 1 | 2 | 8 | 64 | 128, + 255, + 255, + 255, + 0, + "InfinityCatalyst", + "Infinity Catalyst", + 5, + 500000, + 10800, + 10800, + true, + false, + 20, + 1, + 1, + Dyes.dyeLightGray); + + public static Materials Infinity = new Materials( + 397, + new TextureSet("infinity", true), + 256.0F, + 2621440, + 17, + 1 | 2 | 64 | 128, + 255, + 255, + 255, + 0, + "Infinity", + "Infinity", + 5, + 5000000, + 10800, + 10800, + true, + false, + 40, + 1, + 1, + Dyes.dyeLightGray); + public static Materials Bedrockium = new MaterialBuilder(395, TextureSet.SET_DULL, "Bedrockium") + .addOreItems() + .addDustItems() + .addMetalItems() + .setDurability(327680) + .setToolSpeed(8f) + .setToolQuality(9) + .setRGB(50, 50, 50) + .setName("Bedrockium") + .setBlastFurnaceRequired(true) + .setBlastFurnaceTemp(9900) + .setMeltingPoint(9900) + .setColor(Dyes.dyeBlack) + .setOreValue(4) + .setDensityDivider(1) + .setDensityMultiplier(1) + .constructMaterial(); + public static Materials Trinium = new Materials( + 868, + TextureSet.SET_SHINY, + 128.0F, + 51200, + 8, + 1 | 2 | 8 | 64 | 128, + 200, + 200, + 210, + 0, + "Trinium", + "Trinium", + 0, + 0, + 7200, + 7200, + true, + false, + 4, + 1, + 1, + Dyes.dyeLightGray) + .disableAutoGeneratedBlastFurnaceRecipes(); + public static Materials Ichorium = new Materials( + 978, + TextureSet.SET_SHINY, + 32.0F, + 850000, + 12, + 1 | 2 | 8 | 32 | 64 | 128, + 211, + 120, + 6, + 0, + "Ichorium", + "Ichorium", + 5, + 250000, + 9000, + 9000, + true, + false, + 4, + 1, + 1, + Dyes.dyeOrange) + .setTurbineMultipliers(30, 30, 3); + public static Materials CosmicNeutronium = new Materials( + 982, + TextureSet.SET_SHINY, + 96.0F, + 163840, + 12, + 1 | 2 | 8 | 32 | 64 | 128, + 50, + 50, + 50, + 0, + "CosmicNeutronium", + "Cosmic Neutronium", + 0, + 0, + 9900, + 9900, + true, + false, + 4, + 1, + 1, + Dyes.dyeBlack); // Superconductor base. - public static Materials Pentacadmiummagnesiumhexaoxid = new Materials( 987, TextureSet.SET_SHINY , 1.0F, 0, 3, 1|2 , 85, 85, 85, 0, "Pentacadmiummagnesiumhexaoxid" , "Superconductor Base MV" , 0, 0, 2500, 2500, true, false, 1, 1, 1, Dyes.dyeGray , 1, Arrays.asList(new MaterialStack(Cadmium, 5), new MaterialStack(Magnesium, 1), new MaterialStack(Oxygen, 6)), Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 3))); - public static Materials Titaniumonabariumdecacoppereikosaoxid = new Materials( 988, TextureSet.SET_METALLIC , 1.0F, 0, 3, 1|2 , 51, 25, 0, 0, "Titaniumonabariumdecacoppereikosaoxid" , "Superconductor Base HV" , 0, 0, 3300, 3300, true, false, 1, 1, 1, Dyes.dyeBrown , 1, Arrays.asList(new MaterialStack(Titanium, 1), new MaterialStack(Barium, 9), new MaterialStack(Copper, 10), new MaterialStack(Oxygen, 20)), Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 6))); - public static Materials Uraniumtriplatinid = new Materials( 989, TextureSet.SET_SHINY , 1.0F, 0, 3, 1|2 , 0,135, 0, 0, "Uraniumtriplatinid" , "Superconductor Base EV" , 0, 0, 4400, 4400, true, false, 1, 1, 1, Dyes.dyeLime , 1, Arrays.asList(new MaterialStack(Uranium, 1), new MaterialStack(Platinum, 3)), Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 9))); - public static Materials Vanadiumtriindinid = new Materials( 990, TextureSet.SET_SHINY , 1.0F, 0, 3, 1|2 , 51, 0, 51, 0, "Vanadiumtriindinid" , "Superconductor Base IV" , 0, 0, 5200, 5200, true, false, 1, 1, 1, Dyes.dyeMagenta , 1, Arrays.asList(new MaterialStack(Vanadium , 1), new MaterialStack(Indium, 3)), Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 12))); - public static Materials Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid = new Materials( 991, TextureSet.SET_METALLIC , 1.0F, 0, 3, 1|2 , 153, 76, 0, 0, "Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid" , "Superconductor Base LuV" , 0, 0, 6000, 6000, true, false, 1, 1, 1, Dyes.dyeBrown , 1, Arrays.asList(new MaterialStack(Indium, 4), new MaterialStack(Tin, 2), new MaterialStack(Barium, 2), new MaterialStack(Titanium, 1), new MaterialStack(Copper, 7), new MaterialStack(Oxygen, 14)), Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 15))); - public static Materials Tetranaquadahdiindiumhexaplatiumosminid = new Materials( 992, TextureSet.SET_METALLIC , 1.0F, 0, 3, 1|2 , 10, 10, 10, 0, "Tetranaquadahdiindiumhexaplatiumosminid" , "Superconductor Base ZPM" , 0, 0, 9000, 9000, true, false, 1, 1, 1, Dyes.dyeBlack , 1, Arrays.asList(new MaterialStack(Naquadah, 4), new MaterialStack(Indium, 2), new MaterialStack(Palladium, 6), new MaterialStack(Osmium, 1)), Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 18))); - public static Materials Longasssuperconductornameforuvwire = new Materials( 986, TextureSet.SET_METALLIC , 1.0F, 0, 3, 1|2 , 224,210, 7, 0, "Longasssuperconductornameforuvwire" , "Superconductor Base UV" , 0, 0, 9900, 9900, true, false, 1, 1, 1, Dyes.dyeYellow , 1, Arrays.asList(new MaterialStack(Naquadria, 4), new MaterialStack(Osmiridium, 3), new MaterialStack(Europium, 1), new MaterialStack(Samarium, 1)), Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 21))); - public static Materials Longasssuperconductornameforuhvwire = new Materials( 985, TextureSet.SET_SHINY , 1.0F, 0, 3, 1|2 , 38,129, 189, 0, "Longasssuperconductornameforuhvwire" , "Superconductor Base UHV" , 0, 0, 10800, 10800, true, false, 1, 1, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Draconium, 6), new MaterialStack(CosmicNeutronium, 7), new MaterialStack(Tritanium, 5), new MaterialStack(Americium, 6)), Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 24))); - public static Materials SuperconductorUEVBase = new Materials( 974, TextureSet.SET_SHINY , 1.0F, 0, 3, 1|2 , 174, 8, 8, 0, "SuperconductorUEVBase" , "Superconductor Base UEV" , 0, 0, 11700, 11800, true, false, 1, 1, 1, Dyes.dyeWhite, Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 27))); - public static Materials SuperconductorUIVBase = new Materials( 131, TextureSet.SET_SHINY , 1.0F, 0, 3, 1|2 , 229, 88, 177, 0, "SuperconductorUIVBase" , "Superconductor Base UIV" , 0, 0, 12700, 12700, true, false, 1, 1, 1, Dyes.dyeWhite, Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 34))); - public static Materials SuperconductorUMVBase = new Materials( 134, TextureSet.SET_SHINY , 1.0F, 0, 3, 1|2 , 181, 38, 205, 0, "SuperconductorUMVBase" , "Superconductor Base UMV" , 0, 0, 13600, 13600, true, false, 1, 1, 1, Dyes.dyeWhite, Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 40))); + public static Materials Pentacadmiummagnesiumhexaoxid = new Materials( + 987, + TextureSet.SET_SHINY, + 1.0F, + 0, + 3, + 1 | 2, + 85, + 85, + 85, + 0, + "Pentacadmiummagnesiumhexaoxid", + "Superconductor Base MV", + 0, + 0, + 2500, + 2500, + true, + false, + 1, + 1, + 1, + Dyes.dyeGray, + 1, + Arrays.asList(new MaterialStack(Cadmium, 5), new MaterialStack(Magnesium, 1), new MaterialStack(Oxygen, 6)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 3))); + public static Materials Titaniumonabariumdecacoppereikosaoxid = new Materials( + 988, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 3, + 1 | 2, + 51, + 25, + 0, + 0, + "Titaniumonabariumdecacoppereikosaoxid", + "Superconductor Base HV", + 0, + 0, + 3300, + 3300, + true, + false, + 1, + 1, + 1, + Dyes.dyeBrown, + 1, + Arrays.asList( + new MaterialStack(Titanium, 1), + new MaterialStack(Barium, 9), + new MaterialStack(Copper, 10), + new MaterialStack(Oxygen, 20)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 6))); + public static Materials Uraniumtriplatinid = new Materials( + 989, + TextureSet.SET_SHINY, + 1.0F, + 0, + 3, + 1 | 2, + 0, + 135, + 0, + 0, + "Uraniumtriplatinid", + "Superconductor Base EV", + 0, + 0, + 4400, + 4400, + true, + false, + 1, + 1, + 1, + Dyes.dyeLime, + 1, + Arrays.asList(new MaterialStack(Uranium, 1), new MaterialStack(Platinum, 3)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 9))); + public static Materials Vanadiumtriindinid = new Materials( + 990, + TextureSet.SET_SHINY, + 1.0F, + 0, + 3, + 1 | 2, + 51, + 0, + 51, + 0, + "Vanadiumtriindinid", + "Superconductor Base IV", + 0, + 0, + 5200, + 5200, + true, + false, + 1, + 1, + 1, + Dyes.dyeMagenta, + 1, + Arrays.asList(new MaterialStack(Vanadium, 1), new MaterialStack(Indium, 3)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 12))); + public static Materials Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid = new Materials( + 991, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 3, + 1 | 2, + 153, + 76, + 0, + 0, + "Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid", + "Superconductor Base LuV", + 0, + 0, + 6000, + 6000, + true, + false, + 1, + 1, + 1, + Dyes.dyeBrown, + 1, + Arrays.asList( + new MaterialStack(Indium, 4), + new MaterialStack(Tin, 2), + new MaterialStack(Barium, 2), + new MaterialStack(Titanium, 1), + new MaterialStack(Copper, 7), + new MaterialStack(Oxygen, 14)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 15))); + public static Materials Tetranaquadahdiindiumhexaplatiumosminid = new Materials( + 992, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 3, + 1 | 2, + 10, + 10, + 10, + 0, + "Tetranaquadahdiindiumhexaplatiumosminid", + "Superconductor Base ZPM", + 0, + 0, + 9000, + 9000, + true, + false, + 1, + 1, + 1, + Dyes.dyeBlack, + 1, + Arrays.asList( + new MaterialStack(Naquadah, 4), + new MaterialStack(Indium, 2), + new MaterialStack(Palladium, 6), + new MaterialStack(Osmium, 1)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 18))); + public static Materials Longasssuperconductornameforuvwire = new Materials( + 986, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 3, + 1 | 2, + 224, + 210, + 7, + 0, + "Longasssuperconductornameforuvwire", + "Superconductor Base UV", + 0, + 0, + 9900, + 9900, + true, + false, + 1, + 1, + 1, + Dyes.dyeYellow, + 1, + Arrays.asList( + new MaterialStack(Naquadria, 4), + new MaterialStack(Osmiridium, 3), + new MaterialStack(Europium, 1), + new MaterialStack(Samarium, 1)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 21))); + public static Materials Longasssuperconductornameforuhvwire = new Materials( + 985, + TextureSet.SET_SHINY, + 1.0F, + 0, + 3, + 1 | 2, + 38, + 129, + 189, + 0, + "Longasssuperconductornameforuhvwire", + "Superconductor Base UHV", + 0, + 0, + 10800, + 10800, + true, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + 1, + Arrays.asList( + new MaterialStack(Draconium, 6), + new MaterialStack(CosmicNeutronium, 7), + new MaterialStack(Tritanium, 5), + new MaterialStack(Americium, 6)), + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 24))); + public static Materials SuperconductorUEVBase = new Materials( + 974, + TextureSet.SET_SHINY, + 1.0F, + 0, + 3, + 1 | 2, + 174, + 8, + 8, + 0, + "SuperconductorUEVBase", + "Superconductor Base UEV", + 0, + 0, + 11700, + 11800, + true, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 27))); + public static Materials SuperconductorUIVBase = new Materials( + 131, + TextureSet.SET_SHINY, + 1.0F, + 0, + 3, + 1 | 2, + 229, + 88, + 177, + 0, + "SuperconductorUIVBase", + "Superconductor Base UIV", + 0, + 0, + 12700, + 12700, + true, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 34))); + public static Materials SuperconductorUMVBase = new Materials( + 134, + TextureSet.SET_SHINY, + 1.0F, + 0, + 3, + 1 | 2, + 181, + 38, + 205, + 0, + "SuperconductorUMVBase", + "Superconductor Base UMV", + 0, + 0, + 13600, + 13600, + true, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 40))); // Superconductors. - public static Materials SuperconductorMV = new Materials( -1, TextureSet.SET_SHINY , 1.0F, 0, 0, 0 , 85, 85, 85, 0, "SuperconductorMV" , "Superconductor MV" , 0, 0, -1, -1, false, false, 1, 1, 1, Dyes.dyeGray , Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 6))); - public static Materials SuperconductorHV = new Materials( -1, TextureSet.SET_SHINY , 1.0F, 0, 0, 0 , 51, 25, 0, 0, "SuperconductorHV" , "Superconductor HV" , 0, 0, -1, -1, false, false, 1, 1, 1, Dyes.dyeBrown , Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 12))); - public static Materials SuperconductorEV = new Materials( -1, TextureSet.SET_SHINY , 1.0F, 0, 0, 0 , 0,135, 0, 0, "SuperconductorEV" , "Superconductor EV" , 0, 0, -1, -1, false, false, 1, 1, 1, Dyes.dyeLime , Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 18))); - public static Materials SuperconductorIV = new Materials( -1, TextureSet.SET_SHINY , 1.0F, 0, 0, 0 , 51, 0, 51, 0, "SuperconductorIV" , "Superconductor IV" , 0, 0, -1, -1, false, false, 1, 1, 1, Dyes.dyeMagenta , Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 24))); - public static Materials SuperconductorLuV = new Materials( -1, TextureSet.SET_SHINY , 1.0F, 0, 0, 0 , 153, 76, 0, 0, "SuperconductorLuV" , "Superconductor LuV" , 0, 0, -1, -1, false, false, 1, 1, 1, Dyes.dyeBrown , Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 30))); - public static Materials SuperconductorZPM = new Materials( -1, TextureSet.SET_SHINY , 1.0F, 0, 0, 0 , 10, 10, 10, 0, "SuperconductorZPM" , "Superconductor ZPM" , 0, 0, -1, -1, false, false, 1, 1, 1, Dyes.dyeBlack , Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 36))); - public static Materials SuperconductorUV = new Materials( -1, TextureSet.SET_SHINY , 1.0F, 0, 0, 0 , 224,210, 7, 0, "SuperconductorUV" , "Superconductor UV" , 0, 0, -1, -1, false, false, 1, 1, 1, Dyes.dyeYellow , Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 42))); - public static Materials SuperconductorUHV = new Materials( -1, TextureSet.SET_SHINY , 1.0F, 0, 0, 0 , 38,129, 189, 0, "Superconductor" , "Superconductor UHV" , 0, 0, -1, -1, false, false, 1, 1, 1, Dyes.dyeWhite , Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 48))); - public static Materials SuperconductorUEV = new Materials( -1, TextureSet.SET_SHINY , 1.0F, 0, 0, 0 , 174, 8, 8, 0, "SuperconductorUEV" , "Superconductor UEV" , 0, 0, -1, -1, false, false, 1, 1, 1, Dyes.dyeWhite , Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 54))); - public static Materials SuperconductorUIV = new Materials( -1, TextureSet.SET_SHINY , 1.0F, 0, 0, 0 , 229, 88, 177, 0, "SuperconductorUIV" , "Superconductor UIV" , 0, 0, -1, -1, false, false, 1, 1, 1, Dyes.dyeWhite , Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 60))); - public static Materials SuperconductorUMV = new Materials( -1, TextureSet.SET_SHINY , 1.0F, 0, 0, 0 , 181, 38, 205, 0, "SuperconductorUMV" , "Superconductor UMV" , 0, 0, -1, -1, false, false, 1, 1, 1, Dyes.dyeWhite , Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 66))); - - public static Materials SuperCoolant = new MaterialBuilder( -1, TextureSet.SET_DULL,"Super Coolant").setRGB(2, 91, 111).addFluid().constructMaterial().setLiquidTemperature(1); - - public static Materials DimensionallyTranscendentCrudeCatalyst = new Materials( 748, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 10, 20, 20, 1, "DimensionallyTranscendentCrudeCatalyst" , "Dimensionally Transcendent Crude Catalyst" , 0, 0, 100000000, 1, false, true, 1, 1, 1, Dyes.dyeCyan).setHasCorrespondingFluid(true); - public static Materials DimensionallyTranscendentProsaicCatalyst = new Materials( 747, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 10, 20, 20, 1, "DimensionallyTranscendentProsaicCatalyst" , "Dimensionally Transcendent Prosaic Catalyst" , 0, 0, 100000000, 1, false, true, 1, 1, 1, Dyes.dyeGreen).setHasCorrespondingFluid(true); - public static Materials DimensionallyTranscendentResplendentCatalyst = new Materials( 746, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 10, 20, 20, 1, "DimensionallyTranscendentResplendentCatalyst" , "Dimensionally Transcendent Resplendent Catalyst" , 0, 0, 100000000, 1, false, true, 1, 1, 1, Dyes.dyeLime).setHasCorrespondingFluid(true); - public static Materials DimensionallyTranscendentExoticCatalyst = new Materials( 745, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 10, 20, 20, 1, "DimensionallyTranscendentExoticCatalyst" , "Dimensionally Transcendent Exotic Catalyst" , 0, 0, 100000000, 1, false, true, 1, 1, 1, Dyes.dyeMagenta).setHasCorrespondingFluid(true); + public static Materials SuperconductorMV = new Materials( + -1, + TextureSet.SET_SHINY, + 1.0F, + 0, + 0, + 0, + 85, + 85, + 85, + 0, + "SuperconductorMV", + "Superconductor MV", + 0, + 0, + -1, + -1, + false, + false, + 1, + 1, + 1, + Dyes.dyeGray, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 6))); + public static Materials SuperconductorHV = new Materials( + -1, + TextureSet.SET_SHINY, + 1.0F, + 0, + 0, + 0, + 51, + 25, + 0, + 0, + "SuperconductorHV", + "Superconductor HV", + 0, + 0, + -1, + -1, + false, + false, + 1, + 1, + 1, + Dyes.dyeBrown, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 12))); + public static Materials SuperconductorEV = new Materials( + -1, + TextureSet.SET_SHINY, + 1.0F, + 0, + 0, + 0, + 0, + 135, + 0, + 0, + "SuperconductorEV", + "Superconductor EV", + 0, + 0, + -1, + -1, + false, + false, + 1, + 1, + 1, + Dyes.dyeLime, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 18))); + public static Materials SuperconductorIV = new Materials( + -1, + TextureSet.SET_SHINY, + 1.0F, + 0, + 0, + 0, + 51, + 0, + 51, + 0, + "SuperconductorIV", + "Superconductor IV", + 0, + 0, + -1, + -1, + false, + false, + 1, + 1, + 1, + Dyes.dyeMagenta, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 24))); + public static Materials SuperconductorLuV = new Materials( + -1, + TextureSet.SET_SHINY, + 1.0F, + 0, + 0, + 0, + 153, + 76, + 0, + 0, + "SuperconductorLuV", + "Superconductor LuV", + 0, + 0, + -1, + -1, + false, + false, + 1, + 1, + 1, + Dyes.dyeBrown, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 30))); + public static Materials SuperconductorZPM = new Materials( + -1, + TextureSet.SET_SHINY, + 1.0F, + 0, + 0, + 0, + 10, + 10, + 10, + 0, + "SuperconductorZPM", + "Superconductor ZPM", + 0, + 0, + -1, + -1, + false, + false, + 1, + 1, + 1, + Dyes.dyeBlack, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 36))); + public static Materials SuperconductorUV = new Materials( + -1, + TextureSet.SET_SHINY, + 1.0F, + 0, + 0, + 0, + 224, + 210, + 7, + 0, + "SuperconductorUV", + "Superconductor UV", + 0, + 0, + -1, + -1, + false, + false, + 1, + 1, + 1, + Dyes.dyeYellow, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 42))); + public static Materials SuperconductorUHV = new Materials( + -1, + TextureSet.SET_SHINY, + 1.0F, + 0, + 0, + 0, + 38, + 129, + 189, + 0, + "Superconductor", + "Superconductor UHV", + 0, + 0, + -1, + -1, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 48))); + public static Materials SuperconductorUEV = new Materials( + -1, + TextureSet.SET_SHINY, + 1.0F, + 0, + 0, + 0, + 174, + 8, + 8, + 0, + "SuperconductorUEV", + "Superconductor UEV", + 0, + 0, + -1, + -1, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 54))); + public static Materials SuperconductorUIV = new Materials( + -1, + TextureSet.SET_SHINY, + 1.0F, + 0, + 0, + 0, + 229, + 88, + 177, + 0, + "SuperconductorUIV", + "Superconductor UIV", + 0, + 0, + -1, + -1, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 60))); + public static Materials SuperconductorUMV = new Materials( + -1, + TextureSet.SET_SHINY, + 1.0F, + 0, + 0, + 0, + 181, + 38, + 205, + 0, + "SuperconductorUMV", + "Superconductor UMV", + 0, + 0, + -1, + -1, + false, + false, + 1, + 1, + 1, + Dyes.dyeWhite, + Collections.singletonList(new TC_AspectStack(TC_Aspects.ELECTRUM, 66))); - public static Materials ExcitedDTCC = new Materials( 109, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 10, 20, 20, 1, "ExcitedDTCC" , "Excited Dimensionally Transcendent Crude Catalyst" , -1, -1, 500000000, 1, false, true, 1, 1, 1, Dyes.dyeCyan); - public static Materials ExcitedDTPC = new Materials( 113, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 35, 59, 41, 1, "ExcitedDTPC" , "Excited Dimensionally Transcendent Prosaic Catalyst" , -1, -1, 500000000, 1, false, true, 1, 1, 1, Dyes.dyeGreen); - public static Materials ExcitedDTRC = new Materials( 121, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 38, 20, 56, 1, "ExcitedDTRC" , "Excited Dimensionally Transcendent Resplendent Catalyst" , -1, -1, 500000000, 1, false, true, 1, 1, 1, Dyes.dyeLime); - public static Materials ExcitedDTEC = new Materials( 126, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 240, 240, 41, 1, "ExcitedDTEC" , "Excited Dimensionally Transcendent Exotic Catalyst" , -1, -1, 500000000, 1, false, true, 1, 1, 1, Dyes.dyeMagenta); + public static Materials SuperCoolant = new MaterialBuilder(-1, TextureSet.SET_DULL, "Super Coolant") + .setRGB(2, 91, 111) + .addFluid() + .constructMaterial() + .setLiquidTemperature(1); - public static Materials DimensionallyTranscendentResidue = new Materials( 589, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 0, 0, 0, 1, "DimensionallyTranscendentResidue" , "Dimensionally Transcendent Residue" , -1, -1, 25, 1, false, true, 1, 1, 1, Dyes.dyeBlack); + public static Materials DimensionallyTranscendentCrudeCatalyst = new Materials( + 748, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16, + 10, + 20, + 20, + 1, + "DimensionallyTranscendentCrudeCatalyst", + "Dimensionally Transcendent Crude Catalyst", + 0, + 0, + 100000000, + 1, + false, + true, + 1, + 1, + 1, + Dyes.dyeCyan) + .setHasCorrespondingFluid(true); + public static Materials DimensionallyTranscendentProsaicCatalyst = new Materials( + 747, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16, + 10, + 20, + 20, + 1, + "DimensionallyTranscendentProsaicCatalyst", + "Dimensionally Transcendent Prosaic Catalyst", + 0, + 0, + 100000000, + 1, + false, + true, + 1, + 1, + 1, + Dyes.dyeGreen) + .setHasCorrespondingFluid(true); + public static Materials DimensionallyTranscendentResplendentCatalyst = new Materials( + 746, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16, + 10, + 20, + 20, + 1, + "DimensionallyTranscendentResplendentCatalyst", + "Dimensionally Transcendent Resplendent Catalyst", + 0, + 0, + 100000000, + 1, + false, + true, + 1, + 1, + 1, + Dyes.dyeLime) + .setHasCorrespondingFluid(true); + public static Materials DimensionallyTranscendentExoticCatalyst = new Materials( + 745, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16, + 10, + 20, + 20, + 1, + "DimensionallyTranscendentExoticCatalyst", + "Dimensionally Transcendent Exotic Catalyst", + 0, + 0, + 100000000, + 1, + false, + true, + 1, + 1, + 1, + Dyes.dyeMagenta) + .setHasCorrespondingFluid(true); - public static Materials SpaceTime = new Materials( 588, new TextureSet("spacetime", true) , 320.0F, 4*2621440, 25, 1|2|64|128, 255, 255, 255, 0, "SpaceTime" , "SpaceTime" , -1, -1, 0, 0, false, true, 2, 1, 1, Dyes._NULL , Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))); - public static Materials TranscendentMetal = new Materials( 581, new TextureSet("transcendentmetal", true) , 290.0F, 3*2621440, 22, 1|2|64|128, 50, 50, 50,255, "TranscendentMetal" , "Transcendent Metal" , -1, -1, 0, 3000, true, true, 200, 1000, 1000, Dyes.dyeBlack , Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))).disableAutoGeneratedBlastFurnaceRecipes().disableAutoGeneratedVacuumFreezerRecipe(); + public static Materials ExcitedDTCC = new Materials( + 109, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16, + 10, + 20, + 20, + 1, + "ExcitedDTCC", + "Excited Dimensionally Transcendent Crude Catalyst", + -1, + -1, + 500000000, + 1, + false, + true, + 1, + 1, + 1, + Dyes.dyeCyan); + public static Materials ExcitedDTPC = new Materials( + 113, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16, + 35, + 59, + 41, + 1, + "ExcitedDTPC", + "Excited Dimensionally Transcendent Prosaic Catalyst", + -1, + -1, + 500000000, + 1, + false, + true, + 1, + 1, + 1, + Dyes.dyeGreen); + public static Materials ExcitedDTRC = new Materials( + 121, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16, + 38, + 20, + 56, + 1, + "ExcitedDTRC", + "Excited Dimensionally Transcendent Resplendent Catalyst", + -1, + -1, + 500000000, + 1, + false, + true, + 1, + 1, + 1, + Dyes.dyeLime); + public static Materials ExcitedDTEC = new Materials( + 126, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16, + 240, + 240, + 41, + 1, + "ExcitedDTEC", + "Excited Dimensionally Transcendent Exotic Catalyst", + -1, + -1, + 500000000, + 1, + false, + true, + 1, + 1, + 1, + Dyes.dyeMagenta); + public static Materials DimensionallyTranscendentResidue = new Materials( + 589, + TextureSet.SET_FLUID, + 1.0F, + 0, + 2, + 16, + 0, + 0, + 0, + 1, + "DimensionallyTranscendentResidue", + "Dimensionally Transcendent Residue", + -1, + -1, + 25, + 1, + false, + true, + 1, + 1, + 1, + Dyes.dyeBlack); + public static Materials SpaceTime = new Materials( + 588, + new TextureSet("spacetime", true), + 320.0F, + 4 * 2621440, + 25, + 1 | 2 | 64 | 128, + 255, + 255, + 255, + 0, + "SpaceTime", + "SpaceTime", + -1, + -1, + 0, + 0, + false, + true, + 2, + 1, + 1, + Dyes._NULL, + Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))); + public static Materials TranscendentMetal = new Materials( + 581, + new TextureSet("transcendentmetal", true), + 290.0F, + 3 * 2621440, + 22, + 1 | 2 | 64 | 128, + 50, + 50, + 50, + 255, + "TranscendentMetal", + "Transcendent Metal", + -1, + -1, + 0, + 3000, + true, + true, + 200, + 1000, + 1000, + Dyes.dyeBlack, + Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))) + .disableAutoGeneratedBlastFurnaceRecipes() + .disableAutoGeneratedVacuumFreezerRecipe(); static { MaterialsBotania.init(); } - static { MaterialsKevlar.init(); } @@ -900,12 +16893,19 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { * @deprecated Use {@link #SuperconductorUHV} instead */ @Deprecated - public static Materials Superconductor = new Materials(SuperconductorUHV, true);// new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Superconductor" , "Superconductor" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Arrays.asList(new TC_AspectStack(TC_Aspects.ELECTRUM, 9))); + public static Materials Superconductor = new Materials( + SuperconductorUHV, true); // new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 + // , 255, 255, 255, 0, "Superconductor" , "Superconductor" , 0, + // 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , Arrays.asList(new + // TC_AspectStack(TC_Aspects.ELECTRUM, 9))); + @Deprecated public static Materials Nikolite = new Materials(Electrotine, false); + @Deprecated public static Materials Phosphor = new Materials(Phosphorus, false); - private static Materials[] MATERIALS_ARRAY = new Materials[]{}; + + private static Materials[] MATERIALS_ARRAY = new Materials[] {}; static { initSubTags(); @@ -924,23 +16924,16 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { overrideChemicalFormulars(); } - public final short[] - mRGBa = new short[]{255, 255, 255, 0}, - mMoltenRGBa = new short[]{255, 255, 255, 0}; + public final short[] mRGBa = new short[] {255, 255, 255, 0}, mMoltenRGBa = new short[] {255, 255, 255, 0}; public TextureSet mIconSet; public GT_GeneratedMaterial_Renderer renderer; public List<MaterialStack> mMaterialList = new ArrayList<>(); - public List<Materials> - mOreByProducts = new ArrayList<>(), - mOreReRegistrations = new ArrayList<>(); + public List<Materials> mOreByProducts = new ArrayList<>(), mOreReRegistrations = new ArrayList<>(); public List<TC_Aspects.TC_AspectStack> mAspects = new ArrayList<>(); public ArrayList<ItemStack> mMaterialItems = new ArrayList<>(); public Collection<SubTag> mSubTags = new LinkedHashSet<>(); - public Enchantment - mEnchantmentTools = null, - mEnchantmentArmors = null; - public boolean - mUnificatable, + public Enchantment mEnchantmentTools = null, mEnchantmentArmors = null; + public boolean mUnificatable, mBlastFurnaceRequired = false, mAutoGenerateBlastFurnaceRecipes = true, mAutoGenerateVacuumFreezerRecipes = true, @@ -949,14 +16942,9 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { mHasPlasma = false, mHasGas = false, mCustomOre = false; - public byte - mEnchantmentToolsLevel = 0, - mEnchantmentArmorsLevel = 0, - mToolQuality = 0; - public short - mBlastFurnaceTemp = 0; - public int - mMeltingPoint = 0, + public byte mEnchantmentToolsLevel = 0, mEnchantmentArmorsLevel = 0, mToolQuality = 0; + public short mBlastFurnaceTemp = 0; + public int mMeltingPoint = 0, mGasTemp = 0, mMetaItemSubID, mTypes = 0, @@ -971,14 +16959,12 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { mDensityMultiplier = 1, mDensityDivider = 1; public long mDensity = M; - public float - mToolSpeed = 1.0F, + public float mToolSpeed = 1.0F, mHeatDamage = 0.0F, mSteamMultiplier = 1.0F, mGasMultiplier = 1.0F, mPlasmaMultiplier = 1.0F; - public String - mChemicalFormula = "?", + public String mChemicalFormula = "?", mName, mDefaultLocalName, mCustomID = "null", @@ -986,36 +16972,57 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { mLocalizedName = "null"; public Dyes mColor = Dyes._NULL; public Element mElement = null; - public Materials - mDirectSmelting = this, + public Materials mDirectSmelting = this, mOreReplacement = this, mMacerateInto = this, mSmeltInto = this, mArcSmeltInto = this, mHandleMaterial = this, mMaterialInto; - public Fluid - mSolid = null, - mFluid = null, - mGas = null, - mPlasma = null; + public Fluid mSolid = null, mFluid = null, mGas = null, mPlasma = null; /** * This Fluid is used as standard Unit for Molten Materials. 1296 is a Molten Block, that means 144 is one Material Unit worth of fluid. */ public Fluid mStandardMoltenFluid = null; - private boolean - hasCorrespondingFluid = false, - hasCorrespondingGas = false, - canBeCracked = false; - private Fluid[] - hydroCrackedFluids = new Fluid[3], - steamCrackedFluids = new Fluid[3]; - public Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aDurability, int aToolQuality, boolean aUnificatable, String aName, String aDefaultLocalName) { - this(aMetaItemSubID, aIconSet, aToolSpeed, aDurability, aToolQuality, aUnificatable, aName, aDefaultLocalName, "ore", false, "null"); + private boolean hasCorrespondingFluid = false, hasCorrespondingGas = false, canBeCracked = false; + private Fluid[] hydroCrackedFluids = new Fluid[3], steamCrackedFluids = new Fluid[3]; + + public Materials( + int aMetaItemSubID, + TextureSet aIconSet, + float aToolSpeed, + int aDurability, + int aToolQuality, + boolean aUnificatable, + String aName, + String aDefaultLocalName) { + this( + aMetaItemSubID, + aIconSet, + aToolSpeed, + aDurability, + aToolQuality, + aUnificatable, + aName, + aDefaultLocalName, + "ore", + false, + "null"); } - public Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aDurability, int aToolQuality, boolean aUnificatable, String aName, String aDefaultLocalName, String aConfigSection, boolean aCustomOre, String aCustomID) { + public Materials( + int aMetaItemSubID, + TextureSet aIconSet, + float aToolSpeed, + int aDurability, + int aToolQuality, + boolean aUnificatable, + String aName, + String aDefaultLocalName, + String aConfigSection, + boolean aCustomOre, + String aCustomID) { mMetaItemSubID = aMetaItemSubID; mDefaultLocalName = aDefaultLocalName; mName = aName; @@ -1036,19 +17043,113 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { mDefaultLocalName = aMaterialInto.mDefaultLocalName; mName = aMaterialInto.mName; mMaterialInto = aMaterialInto.mMaterialInto; - if (aReRegisterIntoThis) - mMaterialInto.mOreReRegistrations.add(this); + if (aReRegisterIntoThis) mMaterialInto.mOreReRegistrations.add(this); mChemicalFormula = aMaterialInto.mChemicalFormula; mMetaItemSubID = -1; mIconSet = TextureSet.SET_NONE; } - public Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aDurability, int aToolQuality, int aTypes, int aR, int aG, int aB, int aA, String aName, String aDefaultLocalName, int aFuelType, int aFuelPower, int aMeltingPoint, int aBlastFurnaceTemp, boolean aBlastFurnaceRequired, boolean aTransparent, int aOreValue, int aDensityMultiplier, int aDensityDivider, Dyes aColor) { - this(aMetaItemSubID, aIconSet, aToolSpeed, aDurability, aToolQuality, aTypes, aR, aG, aB, aA, aName, aDefaultLocalName, aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor, "ore", false, "null"); + public Materials( + int aMetaItemSubID, + TextureSet aIconSet, + float aToolSpeed, + int aDurability, + int aToolQuality, + int aTypes, + int aR, + int aG, + int aB, + int aA, + String aName, + String aDefaultLocalName, + int aFuelType, + int aFuelPower, + int aMeltingPoint, + int aBlastFurnaceTemp, + boolean aBlastFurnaceRequired, + boolean aTransparent, + int aOreValue, + int aDensityMultiplier, + int aDensityDivider, + Dyes aColor) { + this( + aMetaItemSubID, + aIconSet, + aToolSpeed, + aDurability, + aToolQuality, + aTypes, + aR, + aG, + aB, + aA, + aName, + aDefaultLocalName, + aFuelType, + aFuelPower, + aMeltingPoint, + aBlastFurnaceTemp, + aBlastFurnaceRequired, + aTransparent, + aOreValue, + aDensityMultiplier, + aDensityDivider, + aColor, + "ore", + false, + "null"); } - public Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aDurability, int aToolQuality, int aTypes, int aR, int aG, int aB, int aA, String aName, String aDefaultLocalName, int aFuelType, int aFuelPower, int aMeltingPoint, int aBlastFurnaceTemp, boolean aBlastFurnaceRequired, boolean aTransparent, int aOreValue, int aDensityMultiplier, int aDensityDivider, Dyes aColor, String aConfigSection) { - this(aMetaItemSubID, aIconSet, aToolSpeed, aDurability, aToolQuality, aTypes, aR, aG, aB, aA, aName, aDefaultLocalName, aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor, aConfigSection, false, "null"); + public Materials( + int aMetaItemSubID, + TextureSet aIconSet, + float aToolSpeed, + int aDurability, + int aToolQuality, + int aTypes, + int aR, + int aG, + int aB, + int aA, + String aName, + String aDefaultLocalName, + int aFuelType, + int aFuelPower, + int aMeltingPoint, + int aBlastFurnaceTemp, + boolean aBlastFurnaceRequired, + boolean aTransparent, + int aOreValue, + int aDensityMultiplier, + int aDensityDivider, + Dyes aColor, + String aConfigSection) { + this( + aMetaItemSubID, + aIconSet, + aToolSpeed, + aDurability, + aToolQuality, + aTypes, + aR, + aG, + aB, + aA, + aName, + aDefaultLocalName, + aFuelType, + aFuelPower, + aMeltingPoint, + aBlastFurnaceTemp, + aBlastFurnaceRequired, + aTransparent, + aOreValue, + aDensityMultiplier, + aDensityDivider, + aColor, + aConfigSection, + false, + "null"); } /** @@ -1073,8 +17174,44 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { * @param aBlastFurnaceRequired If this requires a Blast Furnace. * @param aColor Vanilla MC Wool Color which comes the closest to this. */ - public Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aDurability, int aToolQuality, int aTypes, int aR, int aG, int aB, int aA, String aName, String aDefaultLocalName, int aFuelType, int aFuelPower, int aMeltingPoint, int aBlastFurnaceTemp, boolean aBlastFurnaceRequired, boolean aTransparent, int aOreValue, int aDensityMultiplier, int aDensityDivider, Dyes aColor, String aConfigSection, boolean aCustomOre, String aCustomID) { - this(aMetaItemSubID, aIconSet, aToolSpeed, aDurability, aToolQuality, true, aName, aDefaultLocalName, aConfigSection, aCustomOre, aCustomID); + public Materials( + int aMetaItemSubID, + TextureSet aIconSet, + float aToolSpeed, + int aDurability, + int aToolQuality, + int aTypes, + int aR, + int aG, + int aB, + int aA, + String aName, + String aDefaultLocalName, + int aFuelType, + int aFuelPower, + int aMeltingPoint, + int aBlastFurnaceTemp, + boolean aBlastFurnaceRequired, + boolean aTransparent, + int aOreValue, + int aDensityMultiplier, + int aDensityDivider, + Dyes aColor, + String aConfigSection, + boolean aCustomOre, + String aCustomID) { + this( + aMetaItemSubID, + aIconSet, + aToolSpeed, + aDurability, + aToolQuality, + true, + aName, + aDefaultLocalName, + aConfigSection, + aCustomOre, + aCustomID); mMeltingPoint = aMeltingPoint; mBlastFurnaceRequired = aBlastFurnaceRequired; mBlastFurnaceTemp = (short) aBlastFurnaceTemp; @@ -1091,21 +17228,109 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { mRGBa[2] = mMoltenRGBa[2] = (short) aB; mRGBa[3] = mMoltenRGBa[3] = (short) aA; mTypes = aTypes; - if (mColor != null) - add(SubTag.HAS_COLOR); - if (mTransparent) - add(SubTag.TRANSPARENT); - if ((mTypes & 2) != 0) - add(SubTag.SMELTING_TO_FLUID); + if (mColor != null) add(SubTag.HAS_COLOR); + if (mTransparent) add(SubTag.TRANSPARENT); + if ((mTypes & 2) != 0) add(SubTag.SMELTING_TO_FLUID); } - public Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aDurability, int aToolQuality, int aTypes, int aR, int aG, int aB, int aA, String aName, String aDefaultLocalName, int aFuelType, int aFuelPower, int aMeltingPoint, int aBlastFurnaceTemp, boolean aBlastFurnaceRequired, boolean aTransparent, int aOreValue, int aDensityMultiplier, int aDensityDivider, Dyes aColor, List<TC_Aspects.TC_AspectStack> aAspects) { - this(aMetaItemSubID, aIconSet, aToolSpeed, aDurability, aToolQuality, aTypes, aR, aG, aB, aA, aName, aDefaultLocalName, aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor); + public Materials( + int aMetaItemSubID, + TextureSet aIconSet, + float aToolSpeed, + int aDurability, + int aToolQuality, + int aTypes, + int aR, + int aG, + int aB, + int aA, + String aName, + String aDefaultLocalName, + int aFuelType, + int aFuelPower, + int aMeltingPoint, + int aBlastFurnaceTemp, + boolean aBlastFurnaceRequired, + boolean aTransparent, + int aOreValue, + int aDensityMultiplier, + int aDensityDivider, + Dyes aColor, + List<TC_Aspects.TC_AspectStack> aAspects) { + this( + aMetaItemSubID, + aIconSet, + aToolSpeed, + aDurability, + aToolQuality, + aTypes, + aR, + aG, + aB, + aA, + aName, + aDefaultLocalName, + aFuelType, + aFuelPower, + aMeltingPoint, + aBlastFurnaceTemp, + aBlastFurnaceRequired, + aTransparent, + aOreValue, + aDensityMultiplier, + aDensityDivider, + aColor); mAspects.addAll(aAspects); } - public Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aDurability, int aToolQuality, int aTypes, int aR, int aG, int aB, int aA, String aName, String aDefaultLocalName, int aFuelType, int aFuelPower, int aMeltingPoint, int aBlastFurnaceTemp, boolean aBlastFurnaceRequired, boolean aTransparent, int aOreValue, int aDensityMultiplier, int aDensityDivider, Dyes aColor, Element aElement, List<TC_Aspects.TC_AspectStack> aAspects) { - this(aMetaItemSubID, aIconSet, aToolSpeed, aDurability, aToolQuality, aTypes, aR, aG, aB, aA, aName, aDefaultLocalName, aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor); + public Materials( + int aMetaItemSubID, + TextureSet aIconSet, + float aToolSpeed, + int aDurability, + int aToolQuality, + int aTypes, + int aR, + int aG, + int aB, + int aA, + String aName, + String aDefaultLocalName, + int aFuelType, + int aFuelPower, + int aMeltingPoint, + int aBlastFurnaceTemp, + boolean aBlastFurnaceRequired, + boolean aTransparent, + int aOreValue, + int aDensityMultiplier, + int aDensityDivider, + Dyes aColor, + Element aElement, + List<TC_Aspects.TC_AspectStack> aAspects) { + this( + aMetaItemSubID, + aIconSet, + aToolSpeed, + aDurability, + aToolQuality, + aTypes, + aR, + aG, + aB, + aA, + aName, + aDefaultLocalName, + aFuelType, + aFuelPower, + aMeltingPoint, + aBlastFurnaceTemp, + aBlastFurnaceRequired, + aTransparent, + aOreValue, + aDensityMultiplier, + aDensityDivider, + aColor); mElement = aElement; mElement.mLinkedMaterials.add(this); if (aElement == Element._NULL) { @@ -1117,18 +17342,116 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { mAspects.addAll(aAspects); } - public Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aDurability, int aToolQuality, int aTypes, int aR, int aG, int aB, int aA, String aName, String aDefaultLocalName, int aFuelType, int aFuelPower, int aMeltingPoint, int aBlastFurnaceTemp, boolean aBlastFurnaceRequired, boolean aTransparent, int aOreValue, int aDensityMultiplier, int aDensityDivider, Dyes aColor, int aExtraData, List<MaterialStack> aMaterialList) { - this(aMetaItemSubID, aIconSet, aToolSpeed, aDurability, aToolQuality, aTypes, aR, aG, aB, aA, aName, aDefaultLocalName, aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor, aExtraData, aMaterialList, null); + public Materials( + int aMetaItemSubID, + TextureSet aIconSet, + float aToolSpeed, + int aDurability, + int aToolQuality, + int aTypes, + int aR, + int aG, + int aB, + int aA, + String aName, + String aDefaultLocalName, + int aFuelType, + int aFuelPower, + int aMeltingPoint, + int aBlastFurnaceTemp, + boolean aBlastFurnaceRequired, + boolean aTransparent, + int aOreValue, + int aDensityMultiplier, + int aDensityDivider, + Dyes aColor, + int aExtraData, + List<MaterialStack> aMaterialList) { + this( + aMetaItemSubID, + aIconSet, + aToolSpeed, + aDurability, + aToolQuality, + aTypes, + aR, + aG, + aB, + aA, + aName, + aDefaultLocalName, + aFuelType, + aFuelPower, + aMeltingPoint, + aBlastFurnaceTemp, + aBlastFurnaceRequired, + aTransparent, + aOreValue, + aDensityMultiplier, + aDensityDivider, + aColor, + aExtraData, + aMaterialList, + null); } - public Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aDurability, int aToolQuality, int aTypes, int aR, int aG, int aB, int aA, String aName, String aDefaultLocalName, int aFuelType, int aFuelPower, int aMeltingPoint, int aBlastFurnaceTemp, boolean aBlastFurnaceRequired, boolean aTransparent, int aOreValue, int aDensityMultiplier, int aDensityDivider, Dyes aColor, int aExtraData, List<MaterialStack> aMaterialList, List<TC_Aspects.TC_AspectStack> aAspects) { - this(aMetaItemSubID, aIconSet, aToolSpeed, aDurability, aToolQuality, aTypes, aR, aG, aB, aA, aName, aDefaultLocalName, aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor); + public Materials( + int aMetaItemSubID, + TextureSet aIconSet, + float aToolSpeed, + int aDurability, + int aToolQuality, + int aTypes, + int aR, + int aG, + int aB, + int aA, + String aName, + String aDefaultLocalName, + int aFuelType, + int aFuelPower, + int aMeltingPoint, + int aBlastFurnaceTemp, + boolean aBlastFurnaceRequired, + boolean aTransparent, + int aOreValue, + int aDensityMultiplier, + int aDensityDivider, + Dyes aColor, + int aExtraData, + List<MaterialStack> aMaterialList, + List<TC_Aspects.TC_AspectStack> aAspects) { + this( + aMetaItemSubID, + aIconSet, + aToolSpeed, + aDurability, + aToolQuality, + aTypes, + aR, + aG, + aB, + aA, + aName, + aDefaultLocalName, + aFuelType, + aFuelPower, + aMeltingPoint, + aBlastFurnaceTemp, + aBlastFurnaceRequired, + aTransparent, + aOreValue, + aDensityMultiplier, + aDensityDivider, + aColor); mExtraData = aExtraData; mMaterialList.addAll(aMaterialList); - mChemicalFormula = mMaterialList.stream().map(MaterialStack::toString).collect(Collectors.joining()).replaceAll("_", "-"); + mChemicalFormula = mMaterialList.stream() + .map(MaterialStack::toString) + .collect(Collectors.joining()) + .replaceAll("_", "-"); - int tAmountOfComponents = 0, - tMeltingPoint = 0; + int tAmountOfComponents = 0, tMeltingPoint = 0; for (MaterialStack tMaterial : mMaterialList) { tAmountOfComponents += tMaterial.mAmount; if (tMaterial.mMaterial.mMeltingPoint > 0) @@ -1138,8 +17461,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { tAspect.addToAspectList(mAspects); } - if (mMeltingPoint < 0) - mMeltingPoint = (short) (tMeltingPoint / tAmountOfComponents); + if (mMeltingPoint < 0) mMeltingPoint = (short) (tMeltingPoint / tAmountOfComponents); tAmountOfComponents *= aDensityMultiplier; tAmountOfComponents /= aDensityDivider; @@ -1151,7 +17473,9 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { private static void setSmeltingInto() { SamariumMagnetic.setSmeltingInto(Samarium).setMaceratingInto(Samarium).setArcSmeltingInto(Samarium); - NeodymiumMagnetic.setSmeltingInto(Neodymium).setMaceratingInto(Neodymium).setArcSmeltingInto(Neodymium); + NeodymiumMagnetic.setSmeltingInto(Neodymium) + .setMaceratingInto(Neodymium) + .setArcSmeltingInto(Neodymium); SteelMagnetic.setSmeltingInto(Steel).setMaceratingInto(Steel).setArcSmeltingInto(Steel); Iron.setSmeltingInto(Iron).setMaceratingInto(Iron).setArcSmeltingInto(WroughtIron); AnyIron.setSmeltingInto(Iron).setMaceratingInto(Iron).setArcSmeltingInto(WroughtIron); @@ -1160,7 +17484,9 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { IronMagnetic.setSmeltingInto(Iron).setMaceratingInto(Iron).setArcSmeltingInto(WroughtIron); Copper.setSmeltingInto(Copper).setMaceratingInto(Copper).setArcSmeltingInto(AnnealedCopper); AnyCopper.setSmeltingInto(Copper).setMaceratingInto(Copper).setArcSmeltingInto(AnnealedCopper); - AnnealedCopper.setSmeltingInto(AnnealedCopper).setMaceratingInto(AnnealedCopper).setArcSmeltingInto(AnnealedCopper); + AnnealedCopper.setSmeltingInto(AnnealedCopper) + .setMaceratingInto(AnnealedCopper) + .setArcSmeltingInto(AnnealedCopper); Netherrack.setSmeltingInto(NetherBrick); MeatRaw.setSmeltingInto(MeatCooked); Sand.setSmeltingInto(Glass); @@ -1175,9 +17501,15 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } private static void setDirectSmelting() { - Cinnabar.setDirectSmelting(Mercury).add(SubTag.INDUCTIONSMELTING_LOW_OUTPUT).add(SubTag.SMELTING_TO_GEM); - Tetrahedrite.setDirectSmelting(Copper).add(SubTag.INDUCTIONSMELTING_LOW_OUTPUT).add(SubTag.DONT_ADD_DEFAULT_BBF_RECIPE); - Chalcopyrite.setDirectSmelting(Copper).add(SubTag.INDUCTIONSMELTING_LOW_OUTPUT).add(SubTag.DONT_ADD_DEFAULT_BBF_RECIPE); + Cinnabar.setDirectSmelting(Mercury) + .add(SubTag.INDUCTIONSMELTING_LOW_OUTPUT) + .add(SubTag.SMELTING_TO_GEM); + Tetrahedrite.setDirectSmelting(Copper) + .add(SubTag.INDUCTIONSMELTING_LOW_OUTPUT) + .add(SubTag.DONT_ADD_DEFAULT_BBF_RECIPE); + Chalcopyrite.setDirectSmelting(Copper) + .add(SubTag.INDUCTIONSMELTING_LOW_OUTPUT) + .add(SubTag.DONT_ADD_DEFAULT_BBF_RECIPE); Malachite.setDirectSmelting(Copper).add(SubTag.INDUCTIONSMELTING_LOW_OUTPUT); Pentlandite.setDirectSmelting(Nickel).add(SubTag.INDUCTIONSMELTING_LOW_OUTPUT); Sphalerite.setDirectSmelting(Zinc).add(SubTag.INDUCTIONSMELTING_LOW_OUTPUT); @@ -1616,25 +17948,18 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { Longasssuperconductornameforuvwire.mChemicalFormula = "Nq*\u2084(Ir\u2083Os)\u2083EuSm"; Longasssuperconductornameforuhvwire.mChemicalFormula = "D\u2086(SpNt)\u2087Tn\u2085Am\u2086"; SuperconductorUEVBase.mChemicalFormula = "D*\u2085If*\u2085(✦◆✦)(⚷⚙⚷ Ni4Ti6)"; - SuperconductorUIVBase.mChemicalFormula = "(C\u2081\u2084Os\u2081\u2081O\u2087Ag\u2083SpH\u2082O)\u2084?\u2081\u2080(Fs⚶)\u2086(⌘☯☯⌘)\u2085"; - SuperconductorUMVBase.mChemicalFormula = "?\u2086Or\u2083(Hy⚶)\u2081\u2081(((CW)\u2087Ti\u2083)\u2083???)\u2085۞\u2082"; + SuperconductorUIVBase.mChemicalFormula = + "(C\u2081\u2084Os\u2081\u2081O\u2087Ag\u2083SpH\u2082O)\u2084?\u2081\u2080(Fs⚶)\u2086(⌘☯☯⌘)\u2085"; + SuperconductorUMVBase.mChemicalFormula = + "?\u2086Or\u2083(Hy⚶)\u2081\u2081(((CW)\u2087Ti\u2083)\u2083???)\u2085۞\u2082"; Diatomite.mChemicalFormula = "(SiO\u2082)\u2088Fe\u2082O\u2083(Al\u2082O\u2083)"; } private static void initSubTags() { - SubTag.ELECTROMAGNETIC_SEPERATION_NEODYMIUM.addTo( - Bastnasite, - Monazite, - Forcicium, - Forcillium - ); + SubTag.ELECTROMAGNETIC_SEPERATION_NEODYMIUM.addTo(Bastnasite, Monazite, Forcicium, Forcillium); SubTag.ELECTROMAGNETIC_SEPERATION_GOLD.addTo( - Magnetite, - VanadiumMagnetite, - BasalticMineralSand, - GraniticMineralSand - ); + Magnetite, VanadiumMagnetite, BasalticMineralSand, GraniticMineralSand); SubTag.ELECTROMAGNETIC_SEPERATION_IRON.addTo( YellowLimonite, @@ -1652,46 +17977,20 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { Manganese, Chrome, Chromite, - Andradite - ); + Andradite); SubTag.BLASTFURNACE_CALCITE_DOUBLE.addTo( - Pyrite, - BrownLimonite, - YellowLimonite, - BasalticMineralSand, - GraniticMineralSand, - Magnetite) - ; + Pyrite, BrownLimonite, YellowLimonite, BasalticMineralSand, GraniticMineralSand, Magnetite); - SubTag.BLASTFURNACE_CALCITE_TRIPLE.addTo( - Iron, - PigIron, - DeepIron, - ShadowIron, - WroughtIron, - MeteoricIron - ); + SubTag.BLASTFURNACE_CALCITE_TRIPLE.addTo(Iron, PigIron, DeepIron, ShadowIron, WroughtIron, MeteoricIron); - SubTag.WASHING_MERCURY.addTo( - Gold, - Osmium, - Mithril, - Platinum, - Cooperite, - AstralSilver - ); + SubTag.WASHING_MERCURY.addTo(Gold, Osmium, Mithril, Platinum, Cooperite, AstralSilver); SubTag.WASHING_MERCURY_99_PERCENT.addTo(Silver); - SubTag.WASHING_SODIUMPERSULFATE.addTo( - Zinc, - Nickel, - Copper, - Cobalt, - Cobaltite, - Tetrahedrite); - SubTag.METAL.addTo(AnyIron, + SubTag.WASHING_SODIUMPERSULFATE.addTo(Zinc, Nickel, Copper, Cobalt, Cobaltite, Tetrahedrite); + SubTag.METAL.addTo( + AnyIron, AnyCopper, AnyBronze, Metal, @@ -1711,7 +18010,6 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { Gadolinium, Gallium, Gold, - Holmium, Indium, Iridium, @@ -1732,7 +18030,6 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { Platinum, Plutonium, Plutonium241, - Praseodymium, Promethium, Rubidium, @@ -1753,7 +18050,6 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { Vanadium, Ytterbium, Yttrium, - Zinc, Flerovium, PhasedIron, @@ -1773,7 +18069,6 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { CrudeSteel, EndSteel, PulsatingIron, - DarkThaumium, Adamantium, Amordrine, @@ -1785,7 +18080,6 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { Celenegil, Ceruclase, DarkIron, - Desh, Desichalkos, Duranium, @@ -1805,7 +18099,6 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { Mercassium, MeteoricIron, BloodInfusedIron, - MeteoricSteel, Naquadah, NaquadahAlloy, @@ -1914,7 +18207,8 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { RedstoneAlloy, Bedrockium); - SubTag.FOOD.addTo(MeatRaw, + SubTag.FOOD.addTo( + MeatRaw, MeatCooked, Ice, Water, @@ -1933,14 +18227,19 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { SeedOilHemp, Wheat, Sugar, - FreshWater - ); + FreshWater); -// TranscendentMetal.add(SubTag.NO_SMELTING); + // TranscendentMetal.add(SubTag.NO_SMELTING); Wood.add(SubTag.WOOD, SubTag.FLAMMABLE, SubTag.NO_SMELTING, SubTag.NO_SMASHING); WoodSealed.add(SubTag.WOOD, SubTag.FLAMMABLE, SubTag.NO_SMELTING, SubTag.NO_SMASHING, SubTag.NO_WORKING); Peanutwood.add(SubTag.WOOD, SubTag.FLAMMABLE, SubTag.NO_SMELTING, SubTag.NO_SMASHING); - LiveRoot.add(SubTag.WOOD, SubTag.FLAMMABLE, SubTag.NO_SMELTING, SubTag.NO_SMASHING, SubTag.MAGICAL, SubTag.MORTAR_GRINDABLE); + LiveRoot.add( + SubTag.WOOD, + SubTag.FLAMMABLE, + SubTag.NO_SMELTING, + SubTag.NO_SMASHING, + SubTag.MAGICAL, + SubTag.MORTAR_GRINDABLE); IronWood.add(SubTag.WOOD, SubTag.FLAMMABLE, SubTag.MAGICAL, SubTag.MORTAR_GRINDABLE); Steeleaf.add(SubTag.WOOD, SubTag.FLAMMABLE, SubTag.MAGICAL, SubTag.MORTAR_GRINDABLE, SubTag.NO_SMELTING); @@ -1982,7 +18281,12 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { Concrete.add(SubTag.STONE, SubTag.NO_SMASHING, SubTag.SMELTING_TO_FLUID); ConstructionFoam.add(SubTag.STONE, SubTag.NO_SMASHING, SubTag.EXPLOSIVE, SubTag.NO_SMELTING); - Redstone.add(SubTag.STONE, SubTag.NO_SMASHING, SubTag.UNBURNABLE, SubTag.SMELTING_TO_FLUID, SubTag.PULVERIZING_CINNABAR); + Redstone.add( + SubTag.STONE, + SubTag.NO_SMASHING, + SubTag.UNBURNABLE, + SubTag.SMELTING_TO_FLUID, + SubTag.PULVERIZING_CINNABAR); Glowstone.add(SubTag.STONE, SubTag.NO_SMASHING, SubTag.UNBURNABLE, SubTag.SMELTING_TO_FLUID); Electrotine.add(SubTag.STONE, SubTag.NO_SMASHING, SubTag.UNBURNABLE, SubTag.SMELTING_TO_FLUID); Teslatite.add(SubTag.STONE, SubTag.NO_SMASHING, SubTag.UNBURNABLE, SubTag.SMELTING_TO_FLUID); @@ -2050,12 +18354,14 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { Monazite.add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE); Quartzite.add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE, SubTag.QUARTZ); Quartz.add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE, SubTag.QUARTZ); - SiliconDioxide.add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE, SubTag.QUARTZ); + SiliconDioxide.add( + SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE, SubTag.QUARTZ); Dilithium.add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE, SubTag.QUARTZ); NetherQuartz.add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE, SubTag.QUARTZ); CertusQuartz.add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE, SubTag.QUARTZ); Fluix.add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE, SubTag.QUARTZ); - TricalciumPhosphate.add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.FLAMMABLE, SubTag.EXPLOSIVE); + TricalciumPhosphate.add( + SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.FLAMMABLE, SubTag.EXPLOSIVE); Phosphate.add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.FLAMMABLE, SubTag.EXPLOSIVE); InfusedAir.add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.MAGICAL, SubTag.UNBURNABLE); InfusedFire.add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.MAGICAL, SubTag.UNBURNABLE); @@ -2068,7 +18374,15 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { NetherStar.add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.MAGICAL, SubTag.UNBURNABLE); EnderPearl.add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.MAGICAL, SubTag.PEARL); EnderEye.add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.MAGICAL, SubTag.PEARL); - Firestone.add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE, SubTag.MAGICAL, SubTag.QUARTZ, SubTag.UNBURNABLE, SubTag.BURNING); + Firestone.add( + SubTag.CRYSTAL, + SubTag.NO_SMASHING, + SubTag.NO_SMELTING, + SubTag.CRYSTALLISABLE, + SubTag.MAGICAL, + SubTag.QUARTZ, + SubTag.UNBURNABLE, + SubTag.BURNING); Forcicium.add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE, SubTag.MAGICAL); Forcillium.add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_SMELTING, SubTag.CRYSTALLISABLE, SubTag.MAGICAL); Force.add(SubTag.CRYSTAL, SubTag.MAGICAL, SubTag.UNBURNABLE); @@ -2091,7 +18405,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { SuperconductorIV.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); SuperconductorLuV.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); SuperconductorZPM.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); - //SuperconductorUV .add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); + // SuperconductorUV .add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); SuperconductorUHV.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); Blaze.add(SubTag.MAGICAL, SubTag.SMELTING_TO_FLUID, SubTag.MORTAR_GRINDABLE, SubTag.UNBURNABLE, SubTag.BURNING); @@ -2104,26 +18418,26 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { Mithril.add(SubTag.MAGICAL); Carbon.add(SubTag.NO_SMELTING); - } public static void init() { new ProcessingConfig(); - if (!GT_Mod.gregtechproxy.mEnableAllMaterials) - new ProcessingModSupport(); - mMaterialHandlers.forEach(IMaterialHandler::onMaterialsInit);//This is where addon mods can add/manipulate materials - initMaterialProperties(); //No more material addition or manipulation should be done past this point! - MATERIALS_ARRAY = MATERIALS_MAP.values().toArray(new Materials[0]); //Generate standard object array. This is a lot faster to loop over. + if (!GT_Mod.gregtechproxy.mEnableAllMaterials) new ProcessingModSupport(); + mMaterialHandlers.forEach( + IMaterialHandler::onMaterialsInit); // This is where addon mods can add/manipulate materials + initMaterialProperties(); // No more material addition or manipulation should be done past this point! + MATERIALS_ARRAY = MATERIALS_MAP + .values() + .toArray(new Materials[0]); // Generate standard object array. This is a lot faster to loop over. VALUES = Arrays.asList(MATERIALS_ARRAY); if (!Loader.isModLoaded(MOD_ID_DC) && !GT_Mod.gregtechproxy.mEnableAllComponents) OrePrefixes.initMaterialComponents(); else { - OrePrefixes.ingotHot.mDisabledItems.addAll( - Arrays.stream(Materials.values()).parallel() - .filter(OrePrefixes.ingotHot::doGenerateItem) - .filter(m -> m.mBlastFurnaceTemp < 1750 && m.mAutoGenerateBlastFurnaceRecipes) - .collect(Collectors.toSet()) - ); + OrePrefixes.ingotHot.mDisabledItems.addAll(Arrays.stream(Materials.values()) + .parallel() + .filter(OrePrefixes.ingotHot::doGenerateItem) + .filter(m -> m.mBlastFurnaceTemp < 1750 && m.mAutoGenerateBlastFurnaceRecipes) + .collect(Collectors.toSet())); OrePrefixes.ingotHot.disableComponent(Materials.Reinforced); OrePrefixes.ingotHot.disableComponent(Materials.ConductiveIron); OrePrefixes.ingotHot.disableComponent(Materials.FierySteel); @@ -2144,7 +18458,6 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } fillGeneratedMaterialsMap(); - } private static void fillGeneratedMaterialsMap() { @@ -2155,10 +18468,12 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { if (GregTech_API.sGeneratedMaterials[aMaterial.mMetaItemSubID] == null) { GregTech_API.sGeneratedMaterials[aMaterial.mMetaItemSubID] = aMaterial; } else - throw new IllegalArgumentException("The Material Index " + aMaterial.mMetaItemSubID + " for " + aMaterial.mName + " is already used!"); + throw new IllegalArgumentException("The Material Index " + aMaterial.mMetaItemSubID + + " for " + aMaterial.mName + " is already used!"); } } else - throw new IllegalArgumentException("The Material Index " + aMaterial.mMetaItemSubID + " for " + aMaterial.mName + " is/over the maximum of 1000"); + throw new IllegalArgumentException("The Material Index " + aMaterial.mMetaItemSubID + " for " + + aMaterial.mName + " is/over the maximum of 1000"); } } } @@ -2169,24 +18484,42 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } private static void addTemperatureValues(Materials aMaterial, String aConfigPath) { - aMaterial.mMeltingPoint = GregTech_API.sMaterialProperties.get(aConfigPath, "MeltingPoint", aMaterial.mMeltingPoint); - aMaterial.mBlastFurnaceRequired = GregTech_API.sMaterialProperties.get(aConfigPath, "BlastFurnaceRequired", aMaterial.mBlastFurnaceRequired); - aMaterial.mBlastFurnaceTemp = (short) GregTech_API.sMaterialProperties.get(aConfigPath, "BlastFurnaceTemp", aMaterial.mBlastFurnaceTemp); + aMaterial.mMeltingPoint = + GregTech_API.sMaterialProperties.get(aConfigPath, "MeltingPoint", aMaterial.mMeltingPoint); + aMaterial.mBlastFurnaceRequired = GregTech_API.sMaterialProperties.get( + aConfigPath, "BlastFurnaceRequired", aMaterial.mBlastFurnaceRequired); + aMaterial.mBlastFurnaceTemp = (short) + GregTech_API.sMaterialProperties.get(aConfigPath, "BlastFurnaceTemp", aMaterial.mBlastFurnaceTemp); aMaterial.mGasTemp = GregTech_API.sMaterialProperties.get(aConfigPath, "GasTemp", aMaterial.mGasTemp); - aMaterial.setHeatDamage((float) GregTech_API.sMaterialProperties.get(aConfigPath, "HeatDamage", aMaterial.mHeatDamage)); + aMaterial.setHeatDamage( + (float) GregTech_API.sMaterialProperties.get(aConfigPath, "HeatDamage", aMaterial.mHeatDamage)); } private static void addDensityValues(Materials aMaterial, String aConfigPath) { - aMaterial.mDensityMultiplier = GregTech_API.sMaterialProperties.get(aConfigPath, "DensityMultiplier", aMaterial.mDensityMultiplier); - aMaterial.mDensityDivider = GregTech_API.sMaterialProperties.get(aConfigPath, "DensityDivider", aMaterial.mDensityDivider); - aMaterial.mDensity = (long) GregTech_API.sMaterialProperties.get(aConfigPath, "Density", ((double) M * aMaterial.mDensityMultiplier) / (aMaterial.mDensityDivider != 0 ? aMaterial.mDensityDivider : 1)); + aMaterial.mDensityMultiplier = + GregTech_API.sMaterialProperties.get(aConfigPath, "DensityMultiplier", aMaterial.mDensityMultiplier); + aMaterial.mDensityDivider = + GregTech_API.sMaterialProperties.get(aConfigPath, "DensityDivider", aMaterial.mDensityDivider); + aMaterial.mDensity = (long) GregTech_API.sMaterialProperties.get( + aConfigPath, + "Density", + ((double) M * aMaterial.mDensityMultiplier) + / (aMaterial.mDensityDivider != 0 ? aMaterial.mDensityDivider : 1)); } private static void addColorValues(Materials aMaterial, String aConfigPath) { - aMaterial.mTransparent = GregTech_API.sMaterialProperties.get(aConfigPath, "Transparent", aMaterial.mTransparent); - String aColor = GregTech_API.sMaterialProperties.get(aConfigPath, "DyeColor", aMaterial.mColor == Dyes._NULL ? "None" : aMaterial.mColor.toString()); + aMaterial.mTransparent = + GregTech_API.sMaterialProperties.get(aConfigPath, "Transparent", aMaterial.mTransparent); + String aColor = GregTech_API.sMaterialProperties.get( + aConfigPath, "DyeColor", aMaterial.mColor == Dyes._NULL ? "None" : aMaterial.mColor.toString()); aMaterial.mColor = aColor.equals("None") ? Dyes._NULL : Dyes.get(aColor); - String[] aRGBA = GregTech_API.sMaterialProperties.get(aConfigPath, "MatRGBA", aMaterial.mRGBa[0] + "," + aMaterial.mRGBa[1] + "," + aMaterial.mRGBa[2] + "," + aMaterial.mRGBa[3] + ",").split(","); + String[] aRGBA = GregTech_API.sMaterialProperties + .get( + aConfigPath, + "MatRGBA", + aMaterial.mRGBa[0] + "," + aMaterial.mRGBa[1] + "," + aMaterial.mRGBa[2] + "," + + aMaterial.mRGBa[3] + ",") + .split(","); aMaterial.mRGBa[0] = Short.parseShort(aRGBA[0]); aMaterial.mRGBa[1] = Short.parseShort(aRGBA[1]); aMaterial.mRGBa[2] = Short.parseShort(aRGBA[2]); @@ -2194,33 +18527,62 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } private static void addToolValues(Materials aMaterial, String aConfigPath) { - aMaterial.mDurability = GregTech_API.sMaterialProperties.get(aConfigPath, "ToolDurability", aMaterial.mDurability); - aMaterial.mToolSpeed = (float) GregTech_API.sMaterialProperties.get(aConfigPath, "ToolSpeed", aMaterial.mToolSpeed); - aMaterial.mToolQuality = (byte) GregTech_API.sMaterialProperties.get(aConfigPath, "ToolQuality", aMaterial.mToolQuality); + aMaterial.mDurability = + GregTech_API.sMaterialProperties.get(aConfigPath, "ToolDurability", aMaterial.mDurability); + aMaterial.mToolSpeed = + (float) GregTech_API.sMaterialProperties.get(aConfigPath, "ToolSpeed", aMaterial.mToolSpeed); + aMaterial.mToolQuality = + (byte) GregTech_API.sMaterialProperties.get(aConfigPath, "ToolQuality", aMaterial.mToolQuality); // Moved from GT_Proxy? (Not sure) - aMaterial.mHandleMaterial = (aMaterial == Desh ? aMaterial.mHandleMaterial : aMaterial == Diamond || aMaterial == Thaumium ? Wood : aMaterial.contains(SubTag.BURNING) ? Blaze : aMaterial.contains(SubTag.MAGICAL) && aMaterial.contains(SubTag.CRYSTAL) && Loader.isModLoaded(GT_Values.MOD_ID_TC) ? Thaumium : aMaterial.getMass() > Element.Tc.getMass() * 2 ? TungstenSteel : aMaterial.getMass() > Element.Tc.getMass() ? Steel : Wood); + aMaterial.mHandleMaterial = (aMaterial == Desh + ? aMaterial.mHandleMaterial + : aMaterial == Diamond || aMaterial == Thaumium + ? Wood + : aMaterial.contains(SubTag.BURNING) + ? Blaze + : aMaterial.contains(SubTag.MAGICAL) + && aMaterial.contains(SubTag.CRYSTAL) + && Loader.isModLoaded(GT_Values.MOD_ID_TC) + ? Thaumium + : aMaterial.getMass() > Element.Tc.getMass() * 2 + ? TungstenSteel + : aMaterial.getMass() > Element.Tc.getMass() ? Steel : Wood); } private static void addEnchantmentValues(Materials aMaterial, String aConfigPath) { - aMaterial.mEnchantmentToolsLevel = (byte) GregTech_API.sMaterialProperties.get(aConfigPath, "EnchantmentLevel", aMaterial.mEnchantmentToolsLevel); - String aEnchantmentName = GregTech_API.sMaterialProperties.get(aConfigPath, "Enchantment", aMaterial.mEnchantmentTools != null ? aMaterial.mEnchantmentTools.getName() : ""); + aMaterial.mEnchantmentToolsLevel = (byte) + GregTech_API.sMaterialProperties.get(aConfigPath, "EnchantmentLevel", aMaterial.mEnchantmentToolsLevel); + String aEnchantmentName = GregTech_API.sMaterialProperties.get( + aConfigPath, + "Enchantment", + aMaterial.mEnchantmentTools != null ? aMaterial.mEnchantmentTools.getName() : ""); if (aMaterial.mEnchantmentTools != null && !aEnchantmentName.equals(aMaterial.mEnchantmentTools.getName())) - IntStream.range(0, Enchantment.enchantmentsList.length).filter(i -> aEnchantmentName.equals(Enchantment.enchantmentsList[i].getName())).forEach(i -> aMaterial.mEnchantmentTools = Enchantment.enchantmentsList[i]); + IntStream.range(0, Enchantment.enchantmentsList.length) + .filter(i -> aEnchantmentName.equals(Enchantment.enchantmentsList[i].getName())) + .forEach(i -> aMaterial.mEnchantmentTools = Enchantment.enchantmentsList[i]); } private static void addProcessingIntoValues(Materials aMaterial, String aConfigPath) { - aMaterial.mSmeltInto = MATERIALS_MAP.get(GregTech_API.sMaterialProperties.get(aConfigPath, "MaterialSmeltInto", aMaterial.mSmeltInto.mName)); - aMaterial.mMacerateInto = MATERIALS_MAP.get(GregTech_API.sMaterialProperties.get(aConfigPath, "MaterialMacerateInto", aMaterial.mMacerateInto.mName)); - aMaterial.mArcSmeltInto = MATERIALS_MAP.get(GregTech_API.sMaterialProperties.get(aConfigPath, "MaterialArcSmeltInto", aMaterial.mArcSmeltInto.mName)); - aMaterial.mDirectSmelting = MATERIALS_MAP.get(GregTech_API.sMaterialProperties.get(aConfigPath, "MaterialDirectSmeltInto", aMaterial.mDirectSmelting.mName)); - aMaterial.mAutoGenerateBlastFurnaceRecipes = GregTech_API.sMaterialProperties.get(aConfigPath, "AutoGenerateBlastFurnaceRecipes", aMaterial.mAutoGenerateBlastFurnaceRecipes); + aMaterial.mSmeltInto = MATERIALS_MAP.get( + GregTech_API.sMaterialProperties.get(aConfigPath, "MaterialSmeltInto", aMaterial.mSmeltInto.mName)); + aMaterial.mMacerateInto = MATERIALS_MAP.get(GregTech_API.sMaterialProperties.get( + aConfigPath, "MaterialMacerateInto", aMaterial.mMacerateInto.mName)); + aMaterial.mArcSmeltInto = MATERIALS_MAP.get(GregTech_API.sMaterialProperties.get( + aConfigPath, "MaterialArcSmeltInto", aMaterial.mArcSmeltInto.mName)); + aMaterial.mDirectSmelting = MATERIALS_MAP.get(GregTech_API.sMaterialProperties.get( + aConfigPath, "MaterialDirectSmeltInto", aMaterial.mDirectSmelting.mName)); + aMaterial.mAutoGenerateBlastFurnaceRecipes = GregTech_API.sMaterialProperties.get( + aConfigPath, "AutoGenerateBlastFurnaceRecipes", aMaterial.mAutoGenerateBlastFurnaceRecipes); } private static void addMultiplierValues(Materials aMaterial, String aConfigPath) { aMaterial.mOreValue = GregTech_API.sMaterialProperties.get(aConfigPath, "OreValue", aMaterial.mOreValue); - aMaterial.setOreMultiplier(GregTech_API.sMaterialProperties.get(aConfigPath, "OreMultiplier", aMaterial.mOreMultiplier)); - aMaterial.setSmeltingMultiplier(GregTech_API.sMaterialProperties.get(aConfigPath, "OreSmeltingMultiplier", aMaterial.mSmeltingMultiplier)); - aMaterial.setByProductMultiplier(GregTech_API.sMaterialProperties.get(aConfigPath, "OreByProductMultiplier", aMaterial.mByProductMultiplier)); + aMaterial.setOreMultiplier( + GregTech_API.sMaterialProperties.get(aConfigPath, "OreMultiplier", aMaterial.mOreMultiplier)); + aMaterial.setSmeltingMultiplier(GregTech_API.sMaterialProperties.get( + aConfigPath, "OreSmeltingMultiplier", aMaterial.mSmeltingMultiplier)); + aMaterial.setByProductMultiplier(GregTech_API.sMaterialProperties.get( + aConfigPath, "OreByProductMultiplier", aMaterial.mByProductMultiplier)); } private static void addHasGasFluid(Materials aMaterial, String aConfigPath) { @@ -2232,21 +18594,32 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } aMaterial.mHasGas = GregTech_API.sMaterialProperties.get(aConfigPath, "AddGas", aMaterial.mHasGas); if (aMaterial.mHasGas) { - GT_Mod.gregtechproxy.addFluid(aMaterial.mName.toLowerCase(), aMaterial.mDefaultLocalName, aMaterial, 2, aMaterial.mGasTemp); + GT_Mod.gregtechproxy.addFluid( + aMaterial.mName.toLowerCase(), aMaterial.mDefaultLocalName, aMaterial, 2, aMaterial.mGasTemp); } } } private static void addInternalStuff(Materials aMaterial, String aConfigPath) { - aMaterial.mMetaItemSubID = GregTech_API.sMaterialProperties.get(aConfigPath, "MaterialID", aMaterial.mCustomOre ? -1 : aMaterial.mMetaItemSubID); - aMaterial.mTypes = GregTech_API.sMaterialProperties.get(aConfigPath, "MaterialTypes", aMaterial.mCustomOre ? 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 : aMaterial.mTypes); - aMaterial.mUnificatable = GregTech_API.sMaterialProperties.get(aConfigPath, "Unificatable", aMaterial.mUnificatable); - aMaterial.mHasParentMod = GregTech_API.sMaterialProperties.get(aConfigPath, "HasParentMod", aMaterial.mHasParentMod); + aMaterial.mMetaItemSubID = GregTech_API.sMaterialProperties.get( + aConfigPath, "MaterialID", aMaterial.mCustomOre ? -1 : aMaterial.mMetaItemSubID); + aMaterial.mTypes = GregTech_API.sMaterialProperties.get( + aConfigPath, + "MaterialTypes", + aMaterial.mCustomOre ? 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 : aMaterial.mTypes); + aMaterial.mUnificatable = + GregTech_API.sMaterialProperties.get(aConfigPath, "Unificatable", aMaterial.mUnificatable); + aMaterial.mHasParentMod = + GregTech_API.sMaterialProperties.get(aConfigPath, "HasParentMod", aMaterial.mHasParentMod); } private static void addLocalisation(Materials aMaterial, String aConfigPath) { - aMaterial.mDefaultLocalName = GregTech_API.sMaterialProperties.get(aConfigPath, "MaterialName", aMaterial.mCustomOre ? "CustomOre" + aMaterial.mCustomID : aMaterial.mDefaultLocalName); - aMaterial.mChemicalFormula = GregTech_API.sMaterialProperties.get(aConfigPath, "ChemicalFormula", aMaterial.mChemicalFormula); + aMaterial.mDefaultLocalName = GregTech_API.sMaterialProperties.get( + aConfigPath, + "MaterialName", + aMaterial.mCustomOre ? "CustomOre" + aMaterial.mCustomID : aMaterial.mDefaultLocalName); + aMaterial.mChemicalFormula = + GregTech_API.sMaterialProperties.get(aConfigPath, "ChemicalFormula", aMaterial.mChemicalFormula); } private static String getConfigPath(Materials aMaterial) { @@ -2256,15 +18629,22 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { private static void addHarvestLevelNerfs(Materials aMaterial, String aConfigPath) { /* Moved the harvest level changes from GT_Mod to have fewer things iterating over MATERIALS_ARRAY */ - if (GT_Mod.gregtechproxy.mChangeHarvestLevels && aMaterial.mToolQuality > 0 && aMaterial.mMetaItemSubID < GT_Mod.gregtechproxy.mHarvestLevel.length && aMaterial.mMetaItemSubID >= 0) { - GT_Mod.gregtechproxy.mHarvestLevel[aMaterial.mMetaItemSubID] = GregTech_API.sMaterialProperties.get(aConfigPath, "HarvestLevel", aMaterial.mToolQuality); + if (GT_Mod.gregtechproxy.mChangeHarvestLevels + && aMaterial.mToolQuality > 0 + && aMaterial.mMetaItemSubID < GT_Mod.gregtechproxy.mHarvestLevel.length + && aMaterial.mMetaItemSubID >= 0) { + GT_Mod.gregtechproxy.mHarvestLevel[aMaterial.mMetaItemSubID] = + GregTech_API.sMaterialProperties.get(aConfigPath, "HarvestLevel", aMaterial.mToolQuality); } } private static void addHarvestLevels() { - GT_Mod.gregtechproxy.mChangeHarvestLevels = GregTech_API.sMaterialProperties.get("harvestlevel", "ActivateHarvestLevelChange", false); - GT_Mod.gregtechproxy.mMaxHarvestLevel = Math.min(15, GregTech_API.sMaterialProperties.get("harvestlevel", "MaxHarvestLevel", 7)); - GT_Mod.gregtechproxy.mGraniteHavestLevel = GregTech_API.sMaterialProperties.get("harvestlevel", "GraniteHarvestLevel", 3); + GT_Mod.gregtechproxy.mChangeHarvestLevels = + GregTech_API.sMaterialProperties.get("harvestlevel", "ActivateHarvestLevelChange", false); + GT_Mod.gregtechproxy.mMaxHarvestLevel = + Math.min(15, GregTech_API.sMaterialProperties.get("harvestlevel", "MaxHarvestLevel", 7)); + GT_Mod.gregtechproxy.mGraniteHavestLevel = + GregTech_API.sMaterialProperties.get("harvestlevel", "GraniteHarvestLevel", 3); } public static void initMaterialProperties() { @@ -2296,13 +18676,20 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { private static void AspectCalculation(Materials aMaterial, String aConfigPath) { - String aDefaultAspectString = aMaterial.mAspects.stream().map(aAspectStack -> aAspectStack.mAspect.toString()).collect(Collectors.joining(",", ",", "")); - String aDefaultAspectAmountString = aMaterial.mAspects.stream().map(aAspectStack -> String.valueOf(aAspectStack.mAmount)).collect(Collectors.joining(",", ",", "")); + String aDefaultAspectString = aMaterial.mAspects.stream() + .map(aAspectStack -> aAspectStack.mAspect.toString()) + .collect(Collectors.joining(",", ",", "")); + String aDefaultAspectAmountString = aMaterial.mAspects.stream() + .map(aAspectStack -> String.valueOf(aAspectStack.mAmount)) + .collect(Collectors.joining(",", ",", "")); - String aConfigAspectString = GregTech_API.sMaterialProperties.get(aConfigPath, "ListTCAspects", aDefaultAspectString); - String aConfigAspectAmountString = GregTech_API.sMaterialProperties.get(aConfigPath, "ListTCAspectAmounts", aDefaultAspectAmountString); + String aConfigAspectString = + GregTech_API.sMaterialProperties.get(aConfigPath, "ListTCAspects", aDefaultAspectString); + String aConfigAspectAmountString = + GregTech_API.sMaterialProperties.get(aConfigPath, "ListTCAspectAmounts", aDefaultAspectAmountString); - if (!aConfigAspectString.equals(aDefaultAspectString) || !aConfigAspectAmountString.equals(aDefaultAspectAmountString)) { + if (!aConfigAspectString.equals(aDefaultAspectString) + || !aConfigAspectAmountString.equals(aDefaultAspectAmountString)) { aMaterial.mAspects.clear(); if (aConfigAspectString.length() > 0) { String[] aAspects = aConfigAspectString.split(","); @@ -2318,23 +18705,34 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } private static void OreReRegistrationsCalculation(Materials aMaterial, String aConfigPath) { - String aDefaultMatReRegString = aMaterial.mOreReRegistrations.stream().map(aTag -> aTag.mName).collect(Collectors.joining(",", ",", "")); - String aConfigMatMatReRegString = GregTech_API.sMaterialProperties.get(aConfigPath, "ListMaterialReRegistrations", aDefaultMatReRegString); + String aDefaultMatReRegString = aMaterial.mOreReRegistrations.stream() + .map(aTag -> aTag.mName) + .collect(Collectors.joining(",", ",", "")); + String aConfigMatMatReRegString = GregTech_API.sMaterialProperties.get( + aConfigPath, "ListMaterialReRegistrations", aDefaultMatReRegString); if (!aConfigMatMatReRegString.equals(aDefaultMatReRegString)) { aMaterial.mOreReRegistrations.clear(); if (aConfigMatMatReRegString.length() > 0) { - Arrays.stream(aConfigMatMatReRegString.split(",")).map(MATERIALS_MAP::get).filter(Objects::nonNull).forEach(aMat -> aMaterial.mOreReRegistrations.add(aMat)); + Arrays.stream(aConfigMatMatReRegString.split(",")) + .map(MATERIALS_MAP::get) + .filter(Objects::nonNull) + .forEach(aMat -> aMaterial.mOreReRegistrations.add(aMat)); } } } private static void OreByProductsCalculation(Materials aMaterial, String aConfigPath) { - String aDefaultMatByProString = aMaterial.mOreByProducts.stream().map(aTag -> aTag.mName).collect(Collectors.joining(",", ",", "")); - String aConfigMatByProString = GregTech_API.sMaterialProperties.get(aConfigPath, "ListMaterialByProducts", aDefaultMatByProString); + String aDefaultMatByProString = + aMaterial.mOreByProducts.stream().map(aTag -> aTag.mName).collect(Collectors.joining(",", ",", "")); + String aConfigMatByProString = + GregTech_API.sMaterialProperties.get(aConfigPath, "ListMaterialByProducts", aDefaultMatByProString); if (!aConfigMatByProString.equals(aDefaultMatByProString)) { aMaterial.mOreByProducts.clear(); if (aConfigMatByProString.length() > 0) { - Arrays.stream(aConfigMatByProString.split(",")).map(MATERIALS_MAP::get).filter(Objects::nonNull).forEach(aMat -> aMaterial.mOreByProducts.add(aMat)); + Arrays.stream(aConfigMatByProString.split(",")) + .map(MATERIALS_MAP::get) + .filter(Objects::nonNull) + .forEach(aMat -> aMaterial.mOreByProducts.add(aMat)); } } } @@ -2345,12 +18743,16 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { * If the config string is different from the default, we then want to clear the Materials SubTags and insert new ones from the config string. */ private static void SubTagCalculation(Materials aMaterial, String aConfigPath) { - String aDefaultTagString = aMaterial.mSubTags.stream().map(aTag -> aTag.mName).collect(Collectors.joining(",", ",", "")); + String aDefaultTagString = + aMaterial.mSubTags.stream().map(aTag -> aTag.mName).collect(Collectors.joining(",", ",", "")); String aConfigTagString = GregTech_API.sMaterialProperties.get(aConfigPath, "ListSubTags", aDefaultTagString); if (!aConfigTagString.equals(aDefaultTagString)) { aMaterial.mSubTags.clear(); if (aConfigTagString.length() > 0) { - Arrays.stream(aConfigTagString.split(",")).map(SubTag.sSubTags::get).filter(Objects::nonNull).forEach(aTag -> aMaterial.mSubTags.add(aTag)); + Arrays.stream(aConfigTagString.split(",")) + .map(SubTag.sSubTags::get) + .filter(Objects::nonNull) + .forEach(aTag -> aMaterial.mSubTags.add(aTag)); } } } @@ -2379,8 +18781,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials get(String aMaterialName) { Materials aMaterial = getMaterialsMap().get(aMaterialName); - if (aMaterial != null) - return aMaterial; + if (aMaterial != null) return aMaterial; return Materials._NULL; } @@ -2392,16 +18793,14 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { * Adds a Class implementing IMaterialRegistrator to the master list */ public static boolean add(IMaterialHandler aRegistrator) { - if (aRegistrator == null) - return false; + if (aRegistrator == null) return false; return mMaterialHandlers.add(aRegistrator); } public static String getLocalizedNameForItem(String aFormat, int aMaterialID) { if (aMaterialID >= 0 && aMaterialID < 1000) { Materials aMaterial = GregTech_API.sGeneratedMaterials[aMaterialID]; - if (aMaterial != null) - return aMaterial.getLocalizedNameForItem(aFormat); + if (aMaterial != null) return aMaterial.getLocalizedNameForItem(aFormat); } return aFormat; } @@ -2436,17 +18835,14 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } public boolean isRadioactive() { - if (mElement != null) - return mElement.mHalfLifeSeconds >= 0; + if (mElement != null) return mElement.mHalfLifeSeconds >= 0; return mMaterialList.stream().map(stack -> stack.mMaterial).anyMatch(Materials::isRadioactive); } public long getProtons() { - if (mElement != null) - return mElement.getProtons(); - if (mMaterialList.size() == 0) - return Element.Tc.getProtons(); + if (mElement != null) return mElement.getProtons(); + if (mMaterialList.size() == 0) return Element.Tc.getProtons(); long rAmount = 0, tAmount = 0; for (MaterialStack tMaterial : mMaterialList) { tAmount += tMaterial.mAmount; @@ -2456,10 +18852,8 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } public long getNeutrons() { - if (mElement != null) - return mElement.getNeutrons(); - if (mMaterialList.size() == 0) - return Element.Tc.getNeutrons(); + if (mElement != null) return mElement.getNeutrons(); + if (mMaterialList.size() == 0) return Element.Tc.getNeutrons(); long rAmount = 0, tAmount = 0; for (MaterialStack tMaterial : mMaterialList) { tAmount += tMaterial.mAmount; @@ -2469,10 +18863,8 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } public long getMass() { - if (mElement != null) - return mElement.getMass(); - if (mMaterialList.size() == 0) - return Element.Tc.getMass(); + if (mElement != null) return mElement.getMass(); + if (mMaterialList.size() == 0) return Element.Tc.getMass(); long rAmount = 0, tAmount = 0; for (MaterialStack tMaterial : mMaterialList) { tAmount += tMaterial.mAmount; @@ -2498,10 +18890,12 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } public String getToolTip(long aMultiplier, boolean aShowQuestionMarks) { - if (!aShowQuestionMarks && mChemicalFormula.equals("?")) - return ""; + if (!aShowQuestionMarks && mChemicalFormula.equals("?")) return ""; if (aMultiplier >= M * 2 && !mMaterialList.isEmpty()) { - return ((mElement != null || (mMaterialList.size() < 2 && mMaterialList.get(0).mAmount == 1)) ? mChemicalFormula : "(" + mChemicalFormula + ")") + aMultiplier; + return ((mElement != null || (mMaterialList.size() < 2 && mMaterialList.get(0).mAmount == 1)) + ? mChemicalFormula + : "(" + mChemicalFormula + ")") + + aMultiplier; } return mChemicalFormula; } @@ -2510,8 +18904,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { * Adds an ItemStack to this Material. */ public Materials add(ItemStack aStack) { - if (aStack != null && !contains(aStack)) - mMaterialItems.add(aStack); + if (aStack != null && !contains(aStack)) mMaterialItems.add(aStack); return this; } @@ -2519,17 +18912,16 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { * This is used to determine if any of the ItemStacks belongs to this Material. */ public boolean contains(ItemStack... aStacks) { - if (aStacks == null || aStacks.length == 0) - return false; - return mMaterialItems.stream().anyMatch(tStack -> Arrays.stream(aStacks).anyMatch(aStack -> GT_Utility.areStacksEqual(aStack, tStack, !tStack.hasTagCompound()))); + if (aStacks == null || aStacks.length == 0) return false; + return mMaterialItems.stream().anyMatch(tStack -> Arrays.stream(aStacks) + .anyMatch(aStack -> GT_Utility.areStacksEqual(aStack, tStack, !tStack.hasTagCompound()))); } /** * This is used to determine if an ItemStack belongs to this Material. */ public boolean remove(ItemStack aStack) { - if (aStack == null) - return false; + if (aStack == null) return false; boolean temp = false; int mMaterialItems_sS = mMaterialItems.size(); for (int i = 0; i < mMaterialItems_sS; i++) @@ -2585,8 +18977,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { */ @SuppressWarnings("UnusedReturnValue") // Maintains signature public Materials addOreByProduct(Materials aMaterial) { - if (!mOreByProducts.contains(aMaterial.mMaterialInto)) - mOreByProducts.add(aMaterial.mMaterialInto); + if (!mOreByProducts.contains(aMaterial.mMaterialInto)) mOreByProducts.add(aMaterial.mMaterialInto); return this; } @@ -2595,9 +18986,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { * Is used for more precise Ore grinding, so that it is possible to choose between certain kinds of Materials. */ public Materials addOreByProducts(Materials... aMaterials) { - for (Materials tMaterial : aMaterials) - if (tMaterial != null) - addOreByProduct(tMaterial); + for (Materials tMaterial : aMaterials) if (tMaterial != null) addOreByProduct(tMaterial); return this; } @@ -2606,8 +18995,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { * Lapis Ore for example gives about 6 drops. */ public Materials setOreMultiplier(int aOreMultiplier) { - if (aOreMultiplier > 0) - mOreMultiplier = aOreMultiplier; + if (aOreMultiplier > 0) mOreMultiplier = aOreMultiplier; return this; } @@ -2616,8 +19004,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { */ @SuppressWarnings("UnusedReturnValue") // Maintains signature public Materials setByProductMultiplier(int aByProductMultiplier) { - if (aByProductMultiplier > 0) - mByProductMultiplier = aByProductMultiplier; + if (aByProductMultiplier > 0) mByProductMultiplier = aByProductMultiplier; return this; } @@ -2626,8 +19013,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { * Lapis Ore for example gives about 6 drops. */ public Materials setSmeltingMultiplier(int aSmeltingMultiplier) { - if (aSmeltingMultiplier > 0) - mSmeltingMultiplier = aSmeltingMultiplier; + if (aSmeltingMultiplier > 0) mSmeltingMultiplier = aSmeltingMultiplier; return this; } @@ -2635,8 +19021,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { * This Ore should be molten directly into an Ingot of this Material instead of an Ingot of itself. */ public Materials setDirectSmelting(Materials aMaterial) { - if (aMaterial != null) - mDirectSmelting = aMaterial.mMaterialInto.mDirectSmelting; + if (aMaterial != null) mDirectSmelting = aMaterial.mMaterialInto.mDirectSmelting; return this; } @@ -2646,8 +19031,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { */ @SuppressWarnings("UnusedReturnValue") // Maintains signature public Materials setOreReplacement(Materials aMaterial) { - if (aMaterial != null) - mOreReplacement = aMaterial.mMaterialInto.mOreReplacement; + if (aMaterial != null) mOreReplacement = aMaterial.mMaterialInto.mOreReplacement; return this; } @@ -2655,8 +19039,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { * This Material smelts always into an instance of aMaterial. Used for Magnets. */ public Materials setSmeltingInto(Materials aMaterial) { - if (aMaterial != null) - mSmeltInto = aMaterial.mMaterialInto.mSmeltInto; + if (aMaterial != null) mSmeltInto = aMaterial.mMaterialInto.mSmeltInto; return this; } @@ -2665,8 +19048,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { */ @SuppressWarnings("UnusedReturnValue") // Maintains signature public Materials setArcSmeltingInto(Materials aMaterial) { - if (aMaterial != null) - mArcSmeltInto = aMaterial.mMaterialInto.mArcSmeltInto; + if (aMaterial != null) mArcSmeltInto = aMaterial.mMaterialInto.mArcSmeltInto; return this; } @@ -2674,8 +19056,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { * This Material macerates always into an instance of aMaterial. */ public Materials setMaceratingInto(Materials aMaterial) { - if (aMaterial != null) - mMacerateInto = aMaterial.mMaterialInto.mMacerateInto; + if (aMaterial != null) mMacerateInto = aMaterial.mMaterialInto.mMacerateInto; return this; } @@ -2693,32 +19074,27 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } public FluidStack getSolid(long aAmount) { - if (mSolid == null) - return null; + if (mSolid == null) return null; return new GT_FluidStack(mSolid, (int) aAmount); } public FluidStack getFluid(long aAmount) { - if (mFluid == null) - return null; + if (mFluid == null) return null; return new GT_FluidStack(mFluid, (int) aAmount); } public FluidStack getGas(long aAmount) { - if (mGas == null) - return null; + if (mGas == null) return null; return new GT_FluidStack(mGas, (int) aAmount); } public FluidStack getPlasma(long aAmount) { - if (mPlasma == null) - return null; + if (mPlasma == null) return null; return new GT_FluidStack(mPlasma, (int) aAmount); } public FluidStack getMolten(long aAmount) { - if (mStandardMoltenFluid == null) - return null; + if (mStandardMoltenFluid == null) return null; return new GT_FluidStack(mStandardMoltenFluid, (int) aAmount); } @@ -2733,11 +19109,13 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } public String getDefaultLocalizedNameForItem(String aFormat) { - return String.format(aFormat.replace("%s", "%temp").replace("%material", "%s"), this.mDefaultLocalName).replace("%temp", "%s"); + return String.format(aFormat.replace("%s", "%temp").replace("%material", "%s"), this.mDefaultLocalName) + .replace("%temp", "%s"); } public String getLocalizedNameForItem(String aFormat) { - return String.format(aFormat.replace("%s", "%temp").replace("%material", "%s"), this.mLocalizedName).replace("%temp", "%s"); + return String.format(aFormat.replace("%s", "%temp").replace("%material", "%s"), this.mLocalizedName) + .replace("%temp", "%s"); } public boolean hasCorrespondingFluid() { @@ -2841,7 +19219,9 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { ** @return true if Materials is a proper soldering fluid */ public boolean isProperSolderingFluid() { - return mStandardMoltenFluid != null && contains(SubTag.SOLDERING_MATERIAL) && !(GregTech_API.mUseOnlyGoodSolderingMaterials && !contains(SubTag.SOLDERING_MATERIAL_GOOD)); + return mStandardMoltenFluid != null + && contains(SubTag.SOLDERING_MATERIAL) + && !(GregTech_API.mUseOnlyGoodSolderingMaterials && !contains(SubTag.SOLDERING_MATERIAL_GOOD)); } public ItemStack getCells(int amount) { @@ -2879,5 +19259,4 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public ItemStack getPlates(int amount) { return GT_OreDictUnificator.get(OrePrefixes.plate, this, amount); } - } diff --git a/src/main/java/gregtech/api/enums/MaterialsBotania.java b/src/main/java/gregtech/api/enums/MaterialsBotania.java index c05e8c27db..f1ddb7e5d8 100644 --- a/src/main/java/gregtech/api/enums/MaterialsBotania.java +++ b/src/main/java/gregtech/api/enums/MaterialsBotania.java @@ -1,23 +1,193 @@ package gregtech.api.enums; -import gregtech.api.enums.TC_Aspects.TC_AspectStack; +import static gregtech.api.enums.OrePrefixes.*; +import gregtech.api.enums.TC_Aspects.TC_AspectStack; import java.util.Arrays; -import static gregtech.api.enums.OrePrefixes.*; - public class MaterialsBotania { // Botania materials. - public static Materials Manasteel = new MaterialBuilder(201, TextureSet.SET_METALLIC, "Manasteel").setName("Manasteel").setRGBA(150,219,252,255).addDustItems().addMetalItems().addToolHeadItems().addGearItems().setToolSpeed(8.0F).setDurability(5120).setToolQuality(4).setMeltingPoint(1500).setBlastFurnaceTemp(1500).setBlastFurnaceRequired(true).setAspects(Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 3), new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1))).constructMaterial(); - public static Materials Terrasteel = new MaterialBuilder(202, TextureSet.SET_METALLIC, "Terrasteel").setName("Terrasteel").setRGBA(76, 191, 38, 255).addDustItems().addMetalItems().addToolHeadItems().addGearItems().setToolSpeed(32.0F).setDurability(10240).setToolQuality(5).setMeltingPoint(5400).setBlastFurnaceTemp(5400).setBlastFurnaceRequired(true).setAspects(Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.TERRA, 1), new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1))).constructMaterial(); - public static Materials ElvenElementium = new MaterialBuilder(203, TextureSet.SET_METALLIC, "Elven Elementium").setName("ElvenElementium").setRGBA(219, 37, 205, 255).addDustItems().addMetalItems().addToolHeadItems().addGearItems().setToolSpeed(20.0F).setDurability(32768).setToolQuality(7).setMeltingPoint(7200).setBlastFurnaceTemp(7200).setBlastFurnaceRequired(true).setAspects(Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 3), new TC_AspectStack(TC_Aspects.PRAECANTATIO, 2), new TC_AspectStack(TC_Aspects.AURAM, 1))).constructMaterial(); - public static Materials Livingrock = new MaterialBuilder(204, new TextureSet("Livingrock", true) , "Livingrock").setName("Livingrock").addDustItems().addToolHeadItems().addGearItems().setToolSpeed(1.0F).setDurability(0).setToolQuality(3).setOreValue(3).setDensityMultiplier(1).setDensityDivider(1).setAspects(Arrays.asList(new TC_AspectStack(TC_Aspects.TERRA, 2), new TC_AspectStack(TC_Aspects.VICTUS, 2))).constructMaterial(); - public static Materials GaiaSpirit = new Materials( 205, new TextureSet("GaiaSpirit", true), 32.0F, 850000, 12, 1|2|64|128, 255, 255, 255, 0, "GaiaSpirit" , "Gaia Spirit" , -1, -1, 0, 0, false, true, 2, 1, 1, Dyes._NULL , Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 27), new TC_AspectStack(TC_Aspects.AURAM, 24), new TC_AspectStack(TC_Aspects.VICTUS, 24), new TC_AspectStack(TC_Aspects.METALLUM, 1))); - public static Materials Livingwood = new MaterialBuilder(206, new TextureSet("Livingwood", true) , "Livingwood").setName("Livingwood").addDustItems().addMetalItems().addToolHeadItems().addGearItems().setToolSpeed(1.0F).setDurability(0).setToolQuality(3).setOreValue(3).setDensityMultiplier(1).setDensityDivider(1).setAspects(Arrays.asList(new TC_AspectStack(TC_Aspects.ARBOR, 4), new TC_AspectStack(TC_Aspects.VICTUS, 2))).constructMaterial(); - public static Materials Dreamwood = new MaterialBuilder(207, new TextureSet("Dreamwood", true) , "Dreamwood").setName("Dreamwood").addDustItems().addMetalItems().addToolHeadItems().addGearItems().setToolSpeed(1.0F).setDurability(0).setToolQuality(3).setOreValue(3).setDensityMultiplier(1).setDensityDivider(1).setAspects(Arrays.asList(new TC_AspectStack(TC_Aspects.ARBOR, 4), new TC_AspectStack(TC_Aspects.AURAM, 2), new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1))).constructMaterial(); - public static Materials ManaDiamond = new Materials( 208, TextureSet.SET_DIAMOND, 16.0F, 2560, 8, 1|4, 38, 237, 224, 255, "ManaDiamond" , "Mana Diamond" , -1, -1, 0, 0, false, true, 2, 1, 1, Dyes._NULL , Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 4), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4), new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 4))); - public static Materials BotaniaDragonstone = new Materials( 209, TextureSet.SET_DIAMOND, 24.0F, 3840, 12, 1|4, 242, 44, 239, 255, "BotaniaDragonstone" , "Dragonstone" , -1, -1, 0, 0, false, true, 2, 1, 1, Dyes._NULL , Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 6), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 6), new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 4))); + public static Materials Manasteel = new MaterialBuilder(201, TextureSet.SET_METALLIC, "Manasteel") + .setName("Manasteel") + .setRGBA(150, 219, 252, 255) + .addDustItems() + .addMetalItems() + .addToolHeadItems() + .addGearItems() + .setToolSpeed(8.0F) + .setDurability(5120) + .setToolQuality(4) + .setMeltingPoint(1500) + .setBlastFurnaceTemp(1500) + .setBlastFurnaceRequired(true) + .setAspects(Arrays.asList( + new TC_AspectStack(TC_Aspects.METALLUM, 3), new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1))) + .constructMaterial(); + public static Materials Terrasteel = new MaterialBuilder(202, TextureSet.SET_METALLIC, "Terrasteel") + .setName("Terrasteel") + .setRGBA(76, 191, 38, 255) + .addDustItems() + .addMetalItems() + .addToolHeadItems() + .addGearItems() + .setToolSpeed(32.0F) + .setDurability(10240) + .setToolQuality(5) + .setMeltingPoint(5400) + .setBlastFurnaceTemp(5400) + .setBlastFurnaceRequired(true) + .setAspects(Arrays.asList( + new TC_AspectStack(TC_Aspects.METALLUM, 2), + new TC_AspectStack(TC_Aspects.TERRA, 1), + new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1))) + .constructMaterial(); + public static Materials ElvenElementium = new MaterialBuilder(203, TextureSet.SET_METALLIC, "Elven Elementium") + .setName("ElvenElementium") + .setRGBA(219, 37, 205, 255) + .addDustItems() + .addMetalItems() + .addToolHeadItems() + .addGearItems() + .setToolSpeed(20.0F) + .setDurability(32768) + .setToolQuality(7) + .setMeltingPoint(7200) + .setBlastFurnaceTemp(7200) + .setBlastFurnaceRequired(true) + .setAspects(Arrays.asList( + new TC_AspectStack(TC_Aspects.METALLUM, 3), + new TC_AspectStack(TC_Aspects.PRAECANTATIO, 2), + new TC_AspectStack(TC_Aspects.AURAM, 1))) + .constructMaterial(); + public static Materials Livingrock = new MaterialBuilder(204, new TextureSet("Livingrock", true), "Livingrock") + .setName("Livingrock") + .addDustItems() + .addToolHeadItems() + .addGearItems() + .setToolSpeed(1.0F) + .setDurability(0) + .setToolQuality(3) + .setOreValue(3) + .setDensityMultiplier(1) + .setDensityDivider(1) + .setAspects( + Arrays.asList(new TC_AspectStack(TC_Aspects.TERRA, 2), new TC_AspectStack(TC_Aspects.VICTUS, 2))) + .constructMaterial(); + public static Materials GaiaSpirit = new Materials( + 205, + new TextureSet("GaiaSpirit", true), + 32.0F, + 850000, + 12, + 1 | 2 | 64 | 128, + 255, + 255, + 255, + 0, + "GaiaSpirit", + "Gaia Spirit", + -1, + -1, + 0, + 0, + false, + true, + 2, + 1, + 1, + Dyes._NULL, + Arrays.asList( + new TC_AspectStack(TC_Aspects.PRAECANTATIO, 27), + new TC_AspectStack(TC_Aspects.AURAM, 24), + new TC_AspectStack(TC_Aspects.VICTUS, 24), + new TC_AspectStack(TC_Aspects.METALLUM, 1))); + public static Materials Livingwood = new MaterialBuilder(206, new TextureSet("Livingwood", true), "Livingwood") + .setName("Livingwood") + .addDustItems() + .addMetalItems() + .addToolHeadItems() + .addGearItems() + .setToolSpeed(1.0F) + .setDurability(0) + .setToolQuality(3) + .setOreValue(3) + .setDensityMultiplier(1) + .setDensityDivider(1) + .setAspects( + Arrays.asList(new TC_AspectStack(TC_Aspects.ARBOR, 4), new TC_AspectStack(TC_Aspects.VICTUS, 2))) + .constructMaterial(); + public static Materials Dreamwood = new MaterialBuilder(207, new TextureSet("Dreamwood", true), "Dreamwood") + .setName("Dreamwood") + .addDustItems() + .addMetalItems() + .addToolHeadItems() + .addGearItems() + .setToolSpeed(1.0F) + .setDurability(0) + .setToolQuality(3) + .setOreValue(3) + .setDensityMultiplier(1) + .setDensityDivider(1) + .setAspects(Arrays.asList( + new TC_AspectStack(TC_Aspects.ARBOR, 4), + new TC_AspectStack(TC_Aspects.AURAM, 2), + new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1))) + .constructMaterial(); + public static Materials ManaDiamond = new Materials( + 208, + TextureSet.SET_DIAMOND, + 16.0F, + 2560, + 8, + 1 | 4, + 38, + 237, + 224, + 255, + "ManaDiamond", + "Mana Diamond", + -1, + -1, + 0, + 0, + false, + true, + 2, + 1, + 1, + Dyes._NULL, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 4), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 4))); + public static Materials BotaniaDragonstone = new Materials( + 209, + TextureSet.SET_DIAMOND, + 24.0F, + 3840, + 12, + 1 | 4, + 242, + 44, + 239, + 255, + "BotaniaDragonstone", + "Dragonstone", + -1, + -1, + 0, + 0, + false, + true, + 2, + 1, + 1, + Dyes._NULL, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 6), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 6), + new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 4))); public static void init() { GaiaSpirit.mChemicalFormula = "Gs"; diff --git a/src/main/java/gregtech/api/enums/MaterialsKevlar.java b/src/main/java/gregtech/api/enums/MaterialsKevlar.java index 05f5252432..7ff50efeb5 100644 --- a/src/main/java/gregtech/api/enums/MaterialsKevlar.java +++ b/src/main/java/gregtech/api/enums/MaterialsKevlar.java @@ -1,59 +1,558 @@ package gregtech.api.enums; import gregtech.api.objects.MaterialStack; - import java.util.Arrays; public class MaterialsKevlar { - public static Materials DiphenylmethaneDiisocyanate = new MaterialBuilder(796, TextureSet.SET_DULL, "4,4'-Diphenylmethane Diisocyanate").setName("DiphenylmethaneDiisocyanate").addDustItems().setRGB(255, 230, 50).setColor(Dyes.dyeYellow).setMeltingPoint(310).setMaterialList(new MaterialStack(Materials.Carbon, 15), new MaterialStack(Materials.Hydrogen, 10), new MaterialStack(Materials.Nitrogen, 2), new MaterialStack(Materials.Oxygen, 2)).setAspects(Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 1), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1))).constructMaterial();//C15H10N2O2 - public static Materials DiaminodiphenylmethanMixture = new MaterialBuilder(795, TextureSet.SET_FLUID, "Diaminodiphenylmethane Mixture").setName("DiaminodiphenylmethanMixture").addCell().addFluid().setRGB(255, 243, 122).setColor(Dyes.dyeYellow).setMeltingPoint(365).setMaterialList(new MaterialStack(Materials.Carbon, 13), new MaterialStack(Materials.Hydrogen, 14), new MaterialStack(Materials.Nitrogen, 2)).setAspects(Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1))).constructMaterial();//C13H14N2 - public static Materials DiphenylmethaneDiisocyanateMixture = new MaterialBuilder(794, TextureSet.SET_FLUID, "Diphenylmethane Diisocyanate Mixture").setName("DiphenylmethaneDiisocyanateMixture").addCell().addFluid().setRGB(255, 230, 50).setColor(Dyes.dyeYellow).setMeltingPoint(310).setMaterialList(new MaterialStack(Materials.Carbon, 15), new MaterialStack(Materials.Hydrogen, 10), new MaterialStack(Materials.Nitrogen, 2), new MaterialStack(Materials.Oxygen, 2)).setAspects(Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1))).constructMaterial();//C15H10N2O2 - public static Materials Butyraldehyde = new MaterialBuilder(793, TextureSet.SET_FLUID, "Butyraldehyde").setName("Butyraldehyde").addCell().addFluid().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).setMeltingPoint(176).setMaterialList(new MaterialStack(Materials.Carbon, 4), new MaterialStack(Materials.Hydrogen, 8), new MaterialStack(Materials.Oxygen, 1)).setAspects(Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1))).constructMaterial();//C4H8O - public static Materials Isobutyraldehyde = new MaterialBuilder(792, TextureSet.SET_FLUID, "Isobutyraldehyde").setName("Isobutyraldehyde").addCell().addFluid().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).setMeltingPoint(208).setExtraData(1).setMaterialList(new MaterialStack(Materials.Carbon, 4), new MaterialStack(Materials.Hydrogen, 8), new MaterialStack(Materials.Oxygen, 1)).setAspects(Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1))).constructMaterial();//C4H8O - public static Materials NickelTetracarbonyl = new MaterialBuilder(791, TextureSet.SET_FLUID, "Nickel Tetracarbonyl").setName("NickelTetracarbonyl").addCell().addFluid().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).setMeltingPoint(256).setMaterialList(new MaterialStack(Materials.Carbon, 4), new MaterialStack(Materials.Nickel, 1), new MaterialStack(Materials.Oxygen, 4)).setAspects(Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1))).constructMaterial();//C4NiO4 - public static Materials KevlarCatalyst = new MaterialBuilder(790, TextureSet.SET_DULL, "Polyurethane Catalyst A").setName("PolyurethaneCatalystADust").addDustItems().setRGB(50, 50, 50).setColor(Dyes.dyeBlack).setMeltingPoint(300).setAspects(Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1), new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1))).constructMaterial(); - public static Materials EthyleneOxide = new MaterialBuilder(789, TextureSet.SET_FLUID, "Ethylene Oxide").setName("EthyleneOxide").addCell().addGas().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).setMeltingPoint(160).setMaterialList(new MaterialStack(Materials.Carbon, 2), new MaterialStack(Materials.Hydrogen, 4), new MaterialStack(Materials.Oxygen, 1)).setAspects(Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1))).constructMaterial();//C2H4O - public static Materials SiliconOil = new MaterialBuilder(788, TextureSet.SET_FLUID, "Silicon Oil").setName("SiliconOil").addCell().addFluid().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).setMeltingPoint(473).setAspects(Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1))).constructMaterial(); - public static Materials Ethyleneglycol = new MaterialBuilder(787, TextureSet.SET_FLUID, "Ethylene Glycol").setName("EthyleneGlycol").addCell().addFluid().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).setMeltingPoint(260).setMaterialList(new MaterialStack(Materials.Carbon, 2), new MaterialStack(Materials.Hydrogen, 6), new MaterialStack(Materials.Oxygen, 2)).setAspects(Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1))).constructMaterial();//C2H6O2 - public static Materials Acetaldehyde = new MaterialBuilder(786, TextureSet.SET_FLUID, "Acetaldehyde").setName("Acetaldehyde").addCell().addGas().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).setMeltingPoint(150).setMaterialList(new MaterialStack(Materials.Carbon, 2), new MaterialStack(Materials.Hydrogen, 4), new MaterialStack(Materials.Oxygen, 1)).setAspects(Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1))).constructMaterial();//C2H4O - public static Materials Pentaerythritol = new MaterialBuilder(785, TextureSet.SET_DULL, "Pentaerythritol").setName("Pentaerythritol").addDustItems().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).setMeltingPoint(533).setMaterialList(new MaterialStack(Materials.Carbon, 5), new MaterialStack(Materials.Hydrogen, 12), new MaterialStack(Materials.Oxygen, 4)).setAspects(Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 1), new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1))).constructMaterial();//C5H12O4 - public static Materials PolyurethaneResin = new MaterialBuilder(784, TextureSet.SET_FLUID, "Polyurethane Resin").setName("PolyurethaneResin").addCell().addFluid().setRGB(230, 230, 120).setColor(Dyes.dyeYellow).constructMaterial(); - public static Materials NMethylIIPyrrolidone = new MaterialBuilder(783, TextureSet.SET_FLUID, "N-Methyl-2-pyrrolidone").setName("NMethylpyrolidone").addCell().addFluid().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).setMeltingPoint(249).setMaterialList(new MaterialStack(Materials.Carbon, 5), new MaterialStack(Materials.Hydrogen, 9), new MaterialStack(Materials.Nitrogen, 1), new MaterialStack(Materials.Oxygen, 1)).setAspects(Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 1), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1))).constructMaterial();//C5H9NO - public static Materials TerephthaloylChloride = new MaterialBuilder(782, TextureSet.SET_POWDER, "Terephthaloyl Chloride").setName("TerephthaloylChloride").addDustItems().setRGB(0,255,12).setColor(Dyes.dyeGreen).setMeltingPoint(355).setMaterialList(new MaterialStack(Materials.Carbon, 8), new MaterialStack(Materials.Hydrogen, 4), new MaterialStack(Materials.Chlorine, 2), new MaterialStack(Materials.Oxygen, 2)).setAspects(Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 1), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1))).constructMaterial();//C8H4Cl2O2 - public static Materials Acetylene = new MaterialBuilder(781, TextureSet.SET_FLUID, "Acetylene").setName("Acetylene").addCell().addGas().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).setMeltingPoint(192).setMaterialList(new MaterialStack(Materials.Carbon, 2), new MaterialStack(Materials.Hydrogen, 2)).constructMaterial();//C2H2 TODO Add to JUPITER Athmosphere and Enceladus and to moon of Saturn - public static Materials IVNitroaniline = new MaterialBuilder(780, TextureSet.SET_FLUID, "4-Nitroaniline").setName("4Nitroaniline").addCell().addFluid().setRGB(255, 135, 51).setColor(Dyes.dyeOrange).setMeltingPoint(420).setMaterialList(new MaterialStack(Materials.Carbon, 6), new MaterialStack(Materials.Hydrogen, 6), new MaterialStack(Materials.Nitrogen, 2), new MaterialStack(Materials.Oxygen, 2)).setAspects(Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 1), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1))).constructMaterial();//C6H6N2O2 - public static Materials ParaPhenylenediamine = new MaterialBuilder(779, TextureSet.SET_POWDER, "para-Phenylenediamine").setName("pPhenylenediamine").addDustItems().setRGB(251,236,93).setColor(Dyes.dyeYellow).setMeltingPoint(293).setMaterialList(new MaterialStack(Materials.Carbon, 6), new MaterialStack(Materials.Hydrogen, 8), new MaterialStack(Materials.Nitrogen, 2)).setAspects(Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 1), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1))).constructMaterial();//C6H6N2 - public static Materials Methylamine = new MaterialBuilder(778, TextureSet.SET_FLUID, "Methylamine").setName("Methylamine").addCell().addGas().setRGB(65, 68, 105).setColor(Dyes.dyeGray).setMeltingPoint(180).setExtraData(1).setMaterialList(new MaterialStack(Materials.Carbon, 1), new MaterialStack(Materials.Hydrogen, 5), new MaterialStack(Materials.Nitrogen, 1)).constructMaterial();//CH5N - public static Materials Trimethylamine = new MaterialBuilder(777, TextureSet.SET_FLUID, "Trimethylamine").setName("Trimethylamine").addCell().addGas().setRGB(105, 68, 105).setColor(Dyes.dyeGray).setMeltingPoint(156).setExtraData(1).setMaterialList(new MaterialStack(Materials.Carbon, 3), new MaterialStack(Materials.Hydrogen, 9), new MaterialStack(Materials.Nitrogen, 1)).constructMaterial();//C3H9N - public static Materials GammaButyrolactone = new MaterialBuilder(776, TextureSet.SET_FLUID, "gamma-Butyrolactone").setName("GammaButyrolactone").addCell().addFluid().setRGB(255, 255, 151).setColor(Dyes.dyeYellow).setMeltingPoint(229).setMaterialList(new MaterialStack(Materials.Carbon, 4), new MaterialStack(Materials.Hydrogen, 6), new MaterialStack(Materials.Oxygen, 2)).constructMaterial();//C4H6O2 - public static Materials CalciumCarbide = new MaterialBuilder(775, TextureSet.SET_DULL, "Calcium Carbide").setName("CacliumCarbide").addDustItems().setRGB(235, 235, 235).setColor(Dyes.dyeGray).setMeltingPoint(2430).setMaterialList(new MaterialStack(Materials.Calcium, 1), new MaterialStack(Materials.Carbon, 2)).constructMaterial();//CaC2 - public static Materials LiquidCrystalKevlar = new MaterialBuilder(774, TextureSet.SET_FLUID, "Liquid Crystal Kevlar").setName("LiquidCrystalKevlar").addCell().addFluid().setRGB(240, 240, 120).setColor(Dyes.dyeYellow).constructMaterial();//[-CO-C6H4-CO-NH-C6H4-NH-]n - public static Materials IIButinIIVdiol = new MaterialBuilder(773, TextureSet.SET_POWDER, "2-Butin-1,4-diol").setName("2Butin14diol").addDustItems().setRGB(247, 247, 180).setColor(Dyes.dyeYellow).setMeltingPoint(331).setMaterialList(new MaterialStack(Materials.Carbon, 4), new MaterialStack(Materials.Hydrogen, 6), new MaterialStack(Materials.Oxygen, 2)).constructMaterial();//C4H6O2 - public static Materials NickelAluminide = new MaterialBuilder(772, TextureSet.SET_METALLIC, "Nickel Aluminide").setName("NickelAluminide").addDustItems().addMetalItems().setRGB(230, 230, 230).setColor(Dyes.dyeGray).setMeltingPoint(1668).setBlastFurnaceTemp(1668).setBlastFurnaceRequired(true).setMaterialList(new MaterialStack(Materials.Nickel, 1), new MaterialStack(Materials.Aluminium, 3)).constructMaterial().disableAutoGeneratedBlastFurnaceRecipes();//NiAl3 - public static Materials RaneyNickelActivated = new MaterialBuilder(771, TextureSet.SET_POWDER, "Raney Nickel").setName("RaneyNickelActivated").addDustItems().setRGB(230, 230, 230).setColor(Dyes.dyeGray).setMeltingPoint(1955).setMaterialList(new MaterialStack(Materials.Nickel, 1), new MaterialStack(Materials.Aluminium, 1)).constructMaterial();//NiAl - public static Materials BismuthIIIOxide = new MaterialBuilder(769, TextureSet.SET_POWDER, "Bismuth Oxide").setName("BismuthIIIOxide").addDustItems().setRGB(50, 50, 50).setColor(Dyes.dyeBlack).setMeltingPoint(1090).setMaterialList(new MaterialStack(Materials.Bismuth, 2), new MaterialStack(Materials.Oxygen, 3)).constructMaterial();//Bi2O3 - public static Materials ThionylChloride = new MaterialBuilder(768, TextureSet.SET_FLUID, "Thionyl Chloride").setName("ThionylChloride").addCell().addFluid().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).constructMaterial();//SOCl2 - public static Materials SulfurDichloride = new MaterialBuilder(767, TextureSet.SET_FLUID, "Sulfur Dichloride").setName("SulfurDichloride").addCell().addFluid().setRGB(200, 0, 0).setColor(Dyes.dyeRed).constructMaterial();//SCl2 - public static Materials DimethylTerephthalate = new MaterialBuilder(766, TextureSet.SET_FLUID, "Dimethyl Terephthalate").setName("DimethylTerephthalate").addCell().addFluid().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).setMeltingPoint(415).setMaterialList(new MaterialStack(Materials.Carbon, 10), new MaterialStack(Materials.Hydrogen, 10), new MaterialStack(Materials.Oxygen, 4)).constructMaterial();//C10H10O4 - public static Materials Kevlar = new MaterialBuilder(765, TextureSet.SET_DULL, "Kevlar").setName("Kevlar").addDustItems().addMetalItems().addGearItems().setRGB(240, 240, 120).setColor(Dyes.dyeYellow).constructMaterial(); - public static Materials TerephthalicAcid = new MaterialBuilder(764, TextureSet.SET_FLUID, "Terephthalic Acid").setName("TerephthalicAcid").addCell().addFluid().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).setMeltingPoint(480).setMaterialList(new MaterialStack(Materials.Carbon, 8L), new MaterialStack(Materials.Hydrogen, 6),new MaterialStack(Materials.Oxygen, 4)).constructMaterial();//C9H6O6 - public static Materials IIIDimethylbenzene = new MaterialBuilder(763, TextureSet.SET_FLUID ,"1,3-Dimethylbenzen").addCell().addFluid().setRGB(112, 146, 74).setColor(Dyes.dyeLime).setMeltingPoint(225).setMaterialList(new MaterialStack(Materials.Carbon, 8), new MaterialStack(Materials.Hydrogen, 10)).addElectrolyzerRecipe().constructMaterial();//C8H10 - public static Materials IVDimethylbenzene = new MaterialBuilder(762, TextureSet.SET_FLUID , "1,4-Dimethylbenzen").addCell().addFluid().setRGB(122, 136, 84).setColor(Dyes.dyeLime).setMeltingPoint(286).setMaterialList(new MaterialStack(Materials.Carbon, 8), new MaterialStack(Materials.Hydrogen, 10)).addElectrolyzerRecipe().constructMaterial();//C8H10 - public static Materials CobaltIINaphthenate = new MaterialBuilder(761, TextureSet.SET_DULL, "Cobalt II Naphthenate").setName("Cobalt(II)Naphthenate").addDustItems().setRGB(143, 95, 39).setColor(Dyes.dyeBrown).setMeltingPoint(413).setMaterialList(new MaterialStack(Materials.Cobalt, 1), new MaterialStack(Materials.Carbon, 22),new MaterialStack(Materials.Hydrogen, 14), new MaterialStack(Materials.Oxygen, 4)).constructMaterial();//CoC22H14O4 - public static Materials NaphthenicAcid = new MaterialBuilder(760, TextureSet.SET_FLUID ,"Naphthenic Acid").setName("NaphthenicAcid").addCell().addFluid().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).constructMaterial(); - public static Materials CobaltIIHydroxide = new MaterialBuilder(759, TextureSet.SET_POWDER, "Cobalt II Hydroxide").setName("CobaltIIHydroxide").addDustItems().setRGB(229, 140, 239).setColor(Dyes.dyePurple).setMeltingPoint(441).setMaterialList(new MaterialStack(Materials.Cobalt, 1), new MaterialStack(Materials.Hydrogen, 2),new MaterialStack(Materials.Oxygen, 2)).constructMaterial();//CoH2O2 - public static Materials CobaltIIAcetate = new MaterialBuilder(758, TextureSet.SET_POWDER, "Cobalt II Acetate").setName("Cobalt(II)Acetate").addDustItems().setRGB(219, 162, 229).setColor(Dyes.dyePurple).setMeltingPoint(413).setMaterialList(new MaterialStack(Materials.Carbon, 4L), new MaterialStack(Materials.Hydrogen, 6), new MaterialStack(Materials.Cobalt, 1), new MaterialStack(Materials.Oxygen, 4)).constructMaterial();//C4H6CoO4 - public static Materials CobaltIINitrate = new MaterialBuilder(757, TextureSet.SET_POWDER, "Cobalt II Nitrate").setName("Cobalt(II)Nitrate").addDustItems().setRGB(170, 0, 0).setColor(Dyes.dyeRed).setMeltingPoint(373).setMaterialList(new MaterialStack(Materials.Cobalt, 1), new MaterialStack(Materials.Nitrogen, 2), new MaterialStack(Materials.Oxygen, 6)).constructMaterial();//Co(NO3)2 - public static Materials OrganorhodiumCatalyst = new MaterialBuilder(756, TextureSet.SET_POWDER, "Organorhodium Catalyst").setName("OrganorhodiumCatalyst").addDustItems().setRGB(170, 0, 0).setColor(Dyes.dyeRed).setMeltingPoint(373).setMaterialList(new MaterialStack(Materials.Cobalt, 1), new MaterialStack(Materials.NitricAcid, 2)).constructMaterial();//RhHCO(P(C6H5)3)3 - public static Materials SodiumBorohydride = new MaterialBuilder(755, TextureSet.SET_POWDER, "Sodium Borohydride").setName("SodiumBorohydride").addDustItems().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).setMeltingPoint(673).setMaterialList(new MaterialStack(Materials.Sodium, 1), new MaterialStack(Materials.Boron, 1), new MaterialStack(Materials.Hydrogen, 4)).constructMaterial();//NaBH4 - public static Materials RhodiumChloride = new MaterialBuilder(754, TextureSet.SET_POWDER, "Rhodium Chloride").setName("RhodiumChloride").addDustItems().setRGB(128,0,0).setColor(Dyes.dyeRed).setMeltingPoint(723).constructMaterial();//RHCL3 - public static Materials Triphenylphosphene = new MaterialBuilder(753, TextureSet.SET_POWDER, "Triphenylphosphine").setName("Triphenylphosphene").addDustItems().setRGB(255,255,255).setColor(Dyes.dyeWhite).setMeltingPoint(353).setMaterialList(new MaterialStack(Materials.Carbon, 18L), new MaterialStack(Materials.Hydrogen, 15L), new MaterialStack(Materials.Phosphorus, 1L)).constructMaterial();//C18H15P - public static Materials PhosphorusTrichloride = new MaterialBuilder(752, TextureSet.SET_FLUID ,"Phosphorus Trichloride").setName("PhosphorusTrichloride").addCell().addFluid().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).setMeltingPoint(179).setMaterialList(new MaterialStack(Materials.Phosphorus, 1L), new MaterialStack(Materials.Chlorine, 3L)).constructMaterial();//PCL3 - public static Materials SodiumHydride = new MaterialBuilder(751, TextureSet.SET_POWDER, "Sodium Hydride").setName("SodiumHydride").addDustItems().setRGB(192,192,192).setColor(Dyes.dyeLightGray).setMeltingPoint(911).setMaterialList(new MaterialStack(Materials.Sodium, 1L), new MaterialStack(Materials.Hydrogen, 1L)).constructMaterial();//NaH - public static Materials TrimethylBorate = new MaterialBuilder(750, TextureSet.SET_FLUID ,"Trimethyl Borate").setName("TrimethylBorate").addCell().addFluid().setRGB(255, 255, 255).setColor(Dyes.dyeWhite).setMeltingPoint(239).setMaterialList(new MaterialStack(Materials.Carbon, 3L), new MaterialStack(Materials.Hydrogen, 9L), new MaterialStack(Materials.Boron, 1L), new MaterialStack(Materials.Oxygen, 3L)).constructMaterial();//C3H9BO3 - public static Materials SodiumMethoxide = new MaterialBuilder(749, TextureSet.SET_POWDER, "Sodium Methoxide").setName("SodiumMethoxide").addDustItems().setRGB(255,255,255).setColor(Dyes.dyeWhite).setMeltingPoint(400).setMaterialList(new MaterialStack(Materials.Carbon, 1L), new MaterialStack(Materials.Hydrogen, 3L),new MaterialStack(Materials.Oxygen, 1L),new MaterialStack(Materials.Sodium, 1L)).constructMaterial();//CH3NaO + public static Materials DiphenylmethaneDiisocyanate = new MaterialBuilder( + 796, TextureSet.SET_DULL, "4,4'-Diphenylmethane Diisocyanate") + .setName("DiphenylmethaneDiisocyanate") + .addDustItems() + .setRGB(255, 230, 50) + .setColor(Dyes.dyeYellow) + .setMeltingPoint(310) + .setMaterialList( + new MaterialStack(Materials.Carbon, 15), + new MaterialStack(Materials.Hydrogen, 10), + new MaterialStack(Materials.Nitrogen, 2), + new MaterialStack(Materials.Oxygen, 2)) + .setAspects(Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 1), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1))) + .constructMaterial(); // C15H10N2O2 + public static Materials DiaminodiphenylmethanMixture = new MaterialBuilder( + 795, TextureSet.SET_FLUID, "Diaminodiphenylmethane Mixture") + .setName("DiaminodiphenylmethanMixture") + .addCell() + .addFluid() + .setRGB(255, 243, 122) + .setColor(Dyes.dyeYellow) + .setMeltingPoint(365) + .setMaterialList( + new MaterialStack(Materials.Carbon, 13), + new MaterialStack(Materials.Hydrogen, 14), + new MaterialStack(Materials.Nitrogen, 2)) + .setAspects(Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1))) + .constructMaterial(); // C13H14N2 + public static Materials DiphenylmethaneDiisocyanateMixture = new MaterialBuilder( + 794, TextureSet.SET_FLUID, "Diphenylmethane Diisocyanate Mixture") + .setName("DiphenylmethaneDiisocyanateMixture") + .addCell() + .addFluid() + .setRGB(255, 230, 50) + .setColor(Dyes.dyeYellow) + .setMeltingPoint(310) + .setMaterialList( + new MaterialStack(Materials.Carbon, 15), + new MaterialStack(Materials.Hydrogen, 10), + new MaterialStack(Materials.Nitrogen, 2), + new MaterialStack(Materials.Oxygen, 2)) + .setAspects(Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1))) + .constructMaterial(); // C15H10N2O2 + public static Materials Butyraldehyde = new MaterialBuilder(793, TextureSet.SET_FLUID, "Butyraldehyde") + .setName("Butyraldehyde") + .addCell() + .addFluid() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeWhite) + .setMeltingPoint(176) + .setMaterialList( + new MaterialStack(Materials.Carbon, 4), + new MaterialStack(Materials.Hydrogen, 8), + new MaterialStack(Materials.Oxygen, 1)) + .setAspects(Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1))) + .constructMaterial(); // C4H8O + public static Materials Isobutyraldehyde = new MaterialBuilder(792, TextureSet.SET_FLUID, "Isobutyraldehyde") + .setName("Isobutyraldehyde") + .addCell() + .addFluid() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeWhite) + .setMeltingPoint(208) + .setExtraData(1) + .setMaterialList( + new MaterialStack(Materials.Carbon, 4), + new MaterialStack(Materials.Hydrogen, 8), + new MaterialStack(Materials.Oxygen, 1)) + .setAspects(Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1))) + .constructMaterial(); // C4H8O + public static Materials NickelTetracarbonyl = new MaterialBuilder(791, TextureSet.SET_FLUID, "Nickel Tetracarbonyl") + .setName("NickelTetracarbonyl") + .addCell() + .addFluid() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeWhite) + .setMeltingPoint(256) + .setMaterialList( + new MaterialStack(Materials.Carbon, 4), + new MaterialStack(Materials.Nickel, 1), + new MaterialStack(Materials.Oxygen, 4)) + .setAspects(Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1))) + .constructMaterial(); // C4NiO4 + public static Materials KevlarCatalyst = new MaterialBuilder(790, TextureSet.SET_DULL, "Polyurethane Catalyst A") + .setName("PolyurethaneCatalystADust") + .addDustItems() + .setRGB(50, 50, 50) + .setColor(Dyes.dyeBlack) + .setMeltingPoint(300) + .setAspects(Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1))) + .constructMaterial(); + public static Materials EthyleneOxide = new MaterialBuilder(789, TextureSet.SET_FLUID, "Ethylene Oxide") + .setName("EthyleneOxide") + .addCell() + .addGas() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeWhite) + .setMeltingPoint(160) + .setMaterialList( + new MaterialStack(Materials.Carbon, 2), + new MaterialStack(Materials.Hydrogen, 4), + new MaterialStack(Materials.Oxygen, 1)) + .setAspects(Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1))) + .constructMaterial(); // C2H4O + public static Materials SiliconOil = new MaterialBuilder(788, TextureSet.SET_FLUID, "Silicon Oil") + .setName("SiliconOil") + .addCell() + .addFluid() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeWhite) + .setMeltingPoint(473) + .setAspects(Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1))) + .constructMaterial(); + public static Materials Ethyleneglycol = new MaterialBuilder(787, TextureSet.SET_FLUID, "Ethylene Glycol") + .setName("EthyleneGlycol") + .addCell() + .addFluid() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeWhite) + .setMeltingPoint(260) + .setMaterialList( + new MaterialStack(Materials.Carbon, 2), + new MaterialStack(Materials.Hydrogen, 6), + new MaterialStack(Materials.Oxygen, 2)) + .setAspects(Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1))) + .constructMaterial(); // C2H6O2 + public static Materials Acetaldehyde = new MaterialBuilder(786, TextureSet.SET_FLUID, "Acetaldehyde") + .setName("Acetaldehyde") + .addCell() + .addGas() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeWhite) + .setMeltingPoint(150) + .setMaterialList( + new MaterialStack(Materials.Carbon, 2), + new MaterialStack(Materials.Hydrogen, 4), + new MaterialStack(Materials.Oxygen, 1)) + .setAspects(Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1))) + .constructMaterial(); // C2H4O + public static Materials Pentaerythritol = new MaterialBuilder(785, TextureSet.SET_DULL, "Pentaerythritol") + .setName("Pentaerythritol") + .addDustItems() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeWhite) + .setMeltingPoint(533) + .setMaterialList( + new MaterialStack(Materials.Carbon, 5), + new MaterialStack(Materials.Hydrogen, 12), + new MaterialStack(Materials.Oxygen, 4)) + .setAspects(Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 1), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1))) + .constructMaterial(); // C5H12O4 + public static Materials PolyurethaneResin = new MaterialBuilder(784, TextureSet.SET_FLUID, "Polyurethane Resin") + .setName("PolyurethaneResin") + .addCell() + .addFluid() + .setRGB(230, 230, 120) + .setColor(Dyes.dyeYellow) + .constructMaterial(); + public static Materials NMethylIIPyrrolidone = new MaterialBuilder( + 783, TextureSet.SET_FLUID, "N-Methyl-2-pyrrolidone") + .setName("NMethylpyrolidone") + .addCell() + .addFluid() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeWhite) + .setMeltingPoint(249) + .setMaterialList( + new MaterialStack(Materials.Carbon, 5), + new MaterialStack(Materials.Hydrogen, 9), + new MaterialStack(Materials.Nitrogen, 1), + new MaterialStack(Materials.Oxygen, 1)) + .setAspects(Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 1), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1))) + .constructMaterial(); // C5H9NO + public static Materials TerephthaloylChloride = new MaterialBuilder( + 782, TextureSet.SET_POWDER, "Terephthaloyl Chloride") + .setName("TerephthaloylChloride") + .addDustItems() + .setRGB(0, 255, 12) + .setColor(Dyes.dyeGreen) + .setMeltingPoint(355) + .setMaterialList( + new MaterialStack(Materials.Carbon, 8), + new MaterialStack(Materials.Hydrogen, 4), + new MaterialStack(Materials.Chlorine, 2), + new MaterialStack(Materials.Oxygen, 2)) + .setAspects(Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 1), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1))) + .constructMaterial(); // C8H4Cl2O2 + public static Materials Acetylene = new MaterialBuilder(781, TextureSet.SET_FLUID, "Acetylene") + .setName("Acetylene") + .addCell() + .addGas() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeWhite) + .setMeltingPoint(192) + .setMaterialList(new MaterialStack(Materials.Carbon, 2), new MaterialStack(Materials.Hydrogen, 2)) + .constructMaterial(); // C2H2 TODO Add to JUPITER Athmosphere and Enceladus and to moon of Saturn + public static Materials IVNitroaniline = new MaterialBuilder(780, TextureSet.SET_FLUID, "4-Nitroaniline") + .setName("4Nitroaniline") + .addCell() + .addFluid() + .setRGB(255, 135, 51) + .setColor(Dyes.dyeOrange) + .setMeltingPoint(420) + .setMaterialList( + new MaterialStack(Materials.Carbon, 6), + new MaterialStack(Materials.Hydrogen, 6), + new MaterialStack(Materials.Nitrogen, 2), + new MaterialStack(Materials.Oxygen, 2)) + .setAspects(Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 1), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1))) + .constructMaterial(); // C6H6N2O2 + public static Materials ParaPhenylenediamine = new MaterialBuilder( + 779, TextureSet.SET_POWDER, "para-Phenylenediamine") + .setName("pPhenylenediamine") + .addDustItems() + .setRGB(251, 236, 93) + .setColor(Dyes.dyeYellow) + .setMeltingPoint(293) + .setMaterialList( + new MaterialStack(Materials.Carbon, 6), + new MaterialStack(Materials.Hydrogen, 8), + new MaterialStack(Materials.Nitrogen, 2)) + .setAspects(Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 1), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1))) + .constructMaterial(); // C6H6N2 + public static Materials Methylamine = new MaterialBuilder(778, TextureSet.SET_FLUID, "Methylamine") + .setName("Methylamine") + .addCell() + .addGas() + .setRGB(65, 68, 105) + .setColor(Dyes.dyeGray) + .setMeltingPoint(180) + .setExtraData(1) + .setMaterialList( + new MaterialStack(Materials.Carbon, 1), + new MaterialStack(Materials.Hydrogen, 5), + new MaterialStack(Materials.Nitrogen, 1)) + .constructMaterial(); // CH5N + public static Materials Trimethylamine = new MaterialBuilder(777, TextureSet.SET_FLUID, "Trimethylamine") + .setName("Trimethylamine") + .addCell() + .addGas() + .setRGB(105, 68, 105) + .setColor(Dyes.dyeGray) + .setMeltingPoint(156) + .setExtraData(1) + .setMaterialList( + new MaterialStack(Materials.Carbon, 3), + new MaterialStack(Materials.Hydrogen, 9), + new MaterialStack(Materials.Nitrogen, 1)) + .constructMaterial(); // C3H9N + public static Materials GammaButyrolactone = new MaterialBuilder(776, TextureSet.SET_FLUID, "gamma-Butyrolactone") + .setName("GammaButyrolactone") + .addCell() + .addFluid() + .setRGB(255, 255, 151) + .setColor(Dyes.dyeYellow) + .setMeltingPoint(229) + .setMaterialList( + new MaterialStack(Materials.Carbon, 4), + new MaterialStack(Materials.Hydrogen, 6), + new MaterialStack(Materials.Oxygen, 2)) + .constructMaterial(); // C4H6O2 + public static Materials CalciumCarbide = new MaterialBuilder(775, TextureSet.SET_DULL, "Calcium Carbide") + .setName("CacliumCarbide") + .addDustItems() + .setRGB(235, 235, 235) + .setColor(Dyes.dyeGray) + .setMeltingPoint(2430) + .setMaterialList(new MaterialStack(Materials.Calcium, 1), new MaterialStack(Materials.Carbon, 2)) + .constructMaterial(); // CaC2 + public static Materials LiquidCrystalKevlar = new MaterialBuilder( + 774, TextureSet.SET_FLUID, "Liquid Crystal Kevlar") + .setName("LiquidCrystalKevlar") + .addCell() + .addFluid() + .setRGB(240, 240, 120) + .setColor(Dyes.dyeYellow) + .constructMaterial(); // [-CO-C6H4-CO-NH-C6H4-NH-]n + public static Materials IIButinIIVdiol = new MaterialBuilder(773, TextureSet.SET_POWDER, "2-Butin-1,4-diol") + .setName("2Butin14diol") + .addDustItems() + .setRGB(247, 247, 180) + .setColor(Dyes.dyeYellow) + .setMeltingPoint(331) + .setMaterialList( + new MaterialStack(Materials.Carbon, 4), + new MaterialStack(Materials.Hydrogen, 6), + new MaterialStack(Materials.Oxygen, 2)) + .constructMaterial(); // C4H6O2 + public static Materials NickelAluminide = new MaterialBuilder(772, TextureSet.SET_METALLIC, "Nickel Aluminide") + .setName("NickelAluminide") + .addDustItems() + .addMetalItems() + .setRGB(230, 230, 230) + .setColor(Dyes.dyeGray) + .setMeltingPoint(1668) + .setBlastFurnaceTemp(1668) + .setBlastFurnaceRequired(true) + .setMaterialList(new MaterialStack(Materials.Nickel, 1), new MaterialStack(Materials.Aluminium, 3)) + .constructMaterial() + .disableAutoGeneratedBlastFurnaceRecipes(); // NiAl3 + public static Materials RaneyNickelActivated = new MaterialBuilder(771, TextureSet.SET_POWDER, "Raney Nickel") + .setName("RaneyNickelActivated") + .addDustItems() + .setRGB(230, 230, 230) + .setColor(Dyes.dyeGray) + .setMeltingPoint(1955) + .setMaterialList(new MaterialStack(Materials.Nickel, 1), new MaterialStack(Materials.Aluminium, 1)) + .constructMaterial(); // NiAl + public static Materials BismuthIIIOxide = new MaterialBuilder(769, TextureSet.SET_POWDER, "Bismuth Oxide") + .setName("BismuthIIIOxide") + .addDustItems() + .setRGB(50, 50, 50) + .setColor(Dyes.dyeBlack) + .setMeltingPoint(1090) + .setMaterialList(new MaterialStack(Materials.Bismuth, 2), new MaterialStack(Materials.Oxygen, 3)) + .constructMaterial(); // Bi2O3 + public static Materials ThionylChloride = new MaterialBuilder(768, TextureSet.SET_FLUID, "Thionyl Chloride") + .setName("ThionylChloride") + .addCell() + .addFluid() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeWhite) + .constructMaterial(); // SOCl2 + public static Materials SulfurDichloride = new MaterialBuilder(767, TextureSet.SET_FLUID, "Sulfur Dichloride") + .setName("SulfurDichloride") + .addCell() + .addFluid() + .setRGB(200, 0, 0) + .setColor(Dyes.dyeRed) + .constructMaterial(); // SCl2 + public static Materials DimethylTerephthalate = new MaterialBuilder( + 766, TextureSet.SET_FLUID, "Dimethyl Terephthalate") + .setName("DimethylTerephthalate") + .addCell() + .addFluid() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeWhite) + .setMeltingPoint(415) + .setMaterialList( + new MaterialStack(Materials.Carbon, 10), + new MaterialStack(Materials.Hydrogen, 10), + new MaterialStack(Materials.Oxygen, 4)) + .constructMaterial(); // C10H10O4 + public static Materials Kevlar = new MaterialBuilder(765, TextureSet.SET_DULL, "Kevlar") + .setName("Kevlar") + .addDustItems() + .addMetalItems() + .addGearItems() + .setRGB(240, 240, 120) + .setColor(Dyes.dyeYellow) + .constructMaterial(); + public static Materials TerephthalicAcid = new MaterialBuilder(764, TextureSet.SET_FLUID, "Terephthalic Acid") + .setName("TerephthalicAcid") + .addCell() + .addFluid() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeWhite) + .setMeltingPoint(480) + .setMaterialList( + new MaterialStack(Materials.Carbon, 8L), + new MaterialStack(Materials.Hydrogen, 6), + new MaterialStack(Materials.Oxygen, 4)) + .constructMaterial(); // C9H6O6 + public static Materials IIIDimethylbenzene = new MaterialBuilder(763, TextureSet.SET_FLUID, "1,3-Dimethylbenzen") + .addCell() + .addFluid() + .setRGB(112, 146, 74) + .setColor(Dyes.dyeLime) + .setMeltingPoint(225) + .setMaterialList(new MaterialStack(Materials.Carbon, 8), new MaterialStack(Materials.Hydrogen, 10)) + .addElectrolyzerRecipe() + .constructMaterial(); // C8H10 + public static Materials IVDimethylbenzene = new MaterialBuilder(762, TextureSet.SET_FLUID, "1,4-Dimethylbenzen") + .addCell() + .addFluid() + .setRGB(122, 136, 84) + .setColor(Dyes.dyeLime) + .setMeltingPoint(286) + .setMaterialList(new MaterialStack(Materials.Carbon, 8), new MaterialStack(Materials.Hydrogen, 10)) + .addElectrolyzerRecipe() + .constructMaterial(); // C8H10 + public static Materials CobaltIINaphthenate = new MaterialBuilder(761, TextureSet.SET_DULL, "Cobalt II Naphthenate") + .setName("Cobalt(II)Naphthenate") + .addDustItems() + .setRGB(143, 95, 39) + .setColor(Dyes.dyeBrown) + .setMeltingPoint(413) + .setMaterialList( + new MaterialStack(Materials.Cobalt, 1), + new MaterialStack(Materials.Carbon, 22), + new MaterialStack(Materials.Hydrogen, 14), + new MaterialStack(Materials.Oxygen, 4)) + .constructMaterial(); // CoC22H14O4 + public static Materials NaphthenicAcid = new MaterialBuilder(760, TextureSet.SET_FLUID, "Naphthenic Acid") + .setName("NaphthenicAcid") + .addCell() + .addFluid() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeWhite) + .constructMaterial(); + public static Materials CobaltIIHydroxide = new MaterialBuilder(759, TextureSet.SET_POWDER, "Cobalt II Hydroxide") + .setName("CobaltIIHydroxide") + .addDustItems() + .setRGB(229, 140, 239) + .setColor(Dyes.dyePurple) + .setMeltingPoint(441) + .setMaterialList( + new MaterialStack(Materials.Cobalt, 1), + new MaterialStack(Materials.Hydrogen, 2), + new MaterialStack(Materials.Oxygen, 2)) + .constructMaterial(); // CoH2O2 + public static Materials CobaltIIAcetate = new MaterialBuilder(758, TextureSet.SET_POWDER, "Cobalt II Acetate") + .setName("Cobalt(II)Acetate") + .addDustItems() + .setRGB(219, 162, 229) + .setColor(Dyes.dyePurple) + .setMeltingPoint(413) + .setMaterialList( + new MaterialStack(Materials.Carbon, 4L), + new MaterialStack(Materials.Hydrogen, 6), + new MaterialStack(Materials.Cobalt, 1), + new MaterialStack(Materials.Oxygen, 4)) + .constructMaterial(); // C4H6CoO4 + public static Materials CobaltIINitrate = new MaterialBuilder(757, TextureSet.SET_POWDER, "Cobalt II Nitrate") + .setName("Cobalt(II)Nitrate") + .addDustItems() + .setRGB(170, 0, 0) + .setColor(Dyes.dyeRed) + .setMeltingPoint(373) + .setMaterialList( + new MaterialStack(Materials.Cobalt, 1), + new MaterialStack(Materials.Nitrogen, 2), + new MaterialStack(Materials.Oxygen, 6)) + .constructMaterial(); // Co(NO3)2 + public static Materials OrganorhodiumCatalyst = new MaterialBuilder( + 756, TextureSet.SET_POWDER, "Organorhodium Catalyst") + .setName("OrganorhodiumCatalyst") + .addDustItems() + .setRGB(170, 0, 0) + .setColor(Dyes.dyeRed) + .setMeltingPoint(373) + .setMaterialList(new MaterialStack(Materials.Cobalt, 1), new MaterialStack(Materials.NitricAcid, 2)) + .constructMaterial(); // RhHCO(P(C6H5)3)3 + public static Materials SodiumBorohydride = new MaterialBuilder(755, TextureSet.SET_POWDER, "Sodium Borohydride") + .setName("SodiumBorohydride") + .addDustItems() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeWhite) + .setMeltingPoint(673) + .setMaterialList( + new MaterialStack(Materials.Sodium, 1), + new MaterialStack(Materials.Boron, 1), + new MaterialStack(Materials.Hydrogen, 4)) + .constructMaterial(); // NaBH4 + public static Materials RhodiumChloride = new MaterialBuilder(754, TextureSet.SET_POWDER, "Rhodium Chloride") + .setName("RhodiumChloride") + .addDustItems() + .setRGB(128, 0, 0) + .setColor(Dyes.dyeRed) + .setMeltingPoint(723) + .constructMaterial(); // RHCL3 + public static Materials Triphenylphosphene = new MaterialBuilder(753, TextureSet.SET_POWDER, "Triphenylphosphine") + .setName("Triphenylphosphene") + .addDustItems() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeWhite) + .setMeltingPoint(353) + .setMaterialList( + new MaterialStack(Materials.Carbon, 18L), + new MaterialStack(Materials.Hydrogen, 15L), + new MaterialStack(Materials.Phosphorus, 1L)) + .constructMaterial(); // C18H15P + public static Materials PhosphorusTrichloride = new MaterialBuilder( + 752, TextureSet.SET_FLUID, "Phosphorus Trichloride") + .setName("PhosphorusTrichloride") + .addCell() + .addFluid() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeWhite) + .setMeltingPoint(179) + .setMaterialList(new MaterialStack(Materials.Phosphorus, 1L), new MaterialStack(Materials.Chlorine, 3L)) + .constructMaterial(); // PCL3 + public static Materials SodiumHydride = new MaterialBuilder(751, TextureSet.SET_POWDER, "Sodium Hydride") + .setName("SodiumHydride") + .addDustItems() + .setRGB(192, 192, 192) + .setColor(Dyes.dyeLightGray) + .setMeltingPoint(911) + .setMaterialList(new MaterialStack(Materials.Sodium, 1L), new MaterialStack(Materials.Hydrogen, 1L)) + .constructMaterial(); // NaH + public static Materials TrimethylBorate = new MaterialBuilder(750, TextureSet.SET_FLUID, "Trimethyl Borate") + .setName("TrimethylBorate") + .addCell() + .addFluid() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeWhite) + .setMeltingPoint(239) + .setMaterialList( + new MaterialStack(Materials.Carbon, 3L), + new MaterialStack(Materials.Hydrogen, 9L), + new MaterialStack(Materials.Boron, 1L), + new MaterialStack(Materials.Oxygen, 3L)) + .constructMaterial(); // C3H9BO3 + public static Materials SodiumMethoxide = new MaterialBuilder(749, TextureSet.SET_POWDER, "Sodium Methoxide") + .setName("SodiumMethoxide") + .addDustItems() + .setRGB(255, 255, 255) + .setColor(Dyes.dyeWhite) + .setMeltingPoint(400) + .setMaterialList( + new MaterialStack(Materials.Carbon, 1L), + new MaterialStack(Materials.Hydrogen, 3L), + new MaterialStack(Materials.Oxygen, 1L), + new MaterialStack(Materials.Sodium, 1L)) + .constructMaterial(); // CH3NaO - //H3RhCl6 + // H3RhCl6 /** * called by Materials. Can be safely called multiple times. exists to allow Materials ensure this class is initialized diff --git a/src/main/java/gregtech/api/enums/OreDictNames.java b/src/main/java/gregtech/api/enums/OreDictNames.java index d1c84f7119..8bb86b5249 100644 --- a/src/main/java/gregtech/api/enums/OreDictNames.java +++ b/src/main/java/gregtech/api/enums/OreDictNames.java @@ -1,6 +1,5 @@ package gregtech.api.enums; - public enum OreDictNames { craftingAnvil, craftingBook, diff --git a/src/main/java/gregtech/api/enums/OrePrefixes.java b/src/main/java/gregtech/api/enums/OrePrefixes.java index 0811fdac40..6e727bd7af 100644 --- a/src/main/java/gregtech/api/enums/OrePrefixes.java +++ b/src/main/java/gregtech/api/enums/OrePrefixes.java @@ -1,5 +1,7 @@ package gregtech.api.enums; +import static gregtech.api.enums.GT_Values.*; + import com.google.common.collect.ImmutableList; import gregtech.api.GregTech_API; import gregtech.api.enums.TC_Aspects.TC_AspectStack; @@ -15,231 +17,2853 @@ import gregtech.api.objects.MaterialStack; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_Utility; import gregtech.loaders.materialprocessing.ProcessingModSupport; -import net.minecraft.item.ItemStack; - import java.util.*; - -import static gregtech.api.enums.GT_Values.*; +import net.minecraft.item.ItemStack; public enum OrePrefixes { - @Deprecated pulp("Pulps", "", "", false, false, false, false, false, false, false, false, false, false, B[0] | B[1] | B[2] | B[3], -1, 64, -1), - @Deprecated leaves("Leaves", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), - @Deprecated sapling("Saplings", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), - @Deprecated itemDust("Dusts", "", "", false, false, false, false, false, false, false, false, false, false, B[0] | B[1] | B[2] | B[3], -1, 64, -1), - oreBlackgranite("Black Granite Ores", "Granite ", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64, -1), // In case of an End-Ores Mod. Ore -> Material is a Oneway Operation! - oreRedgranite("Red Granite Ores", "Granite ", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64, -1), // In case of an End-Ores Mod. Ore -> Material is a Oneway Operation! - oreMarble("Marble Ores", "Marble ", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64, -1), // In case of an End-Ores Mod. Ore -> Material is a Oneway Operation! - oreBasalt("Basalt Ores", "Basalt ", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64, -1), // In case of an End-Ores Mod. Ore -> Material is a Oneway Operation! - oreNetherrack("Netherrack Ores", "Nether ", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64, -1), // Prefix of the Nether-Ores Mod. Causes Ores to double. Ore -> Material is a Oneway Operation! - oreNether("Nether Ores", "Nether ", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64, -1), // Prefix of the Nether-Ores Mod. Causes Ores to double. Ore -> Material is a Oneway Operation! - @Deprecated denseore("Dense Ores", "", "", false, false, false, false, false, true, false, false, false, true, B[3], -1, 64, -1), - oreDense("Dense Ores", "Dense ", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64, -1), // Prefix of the Dense-Ores Mod. Causes Ores to double. Ore -> Material is a Oneway Operation! - oreRich("Rich Ores", "Rich ", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64, -1), // Prefix of TFC - oreNormal("Normal Ores", "Normal ", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64, -1), // Prefix of TFC - oreSmall("Small Ores", "Small ", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64, 67), // Prefix of Railcraft. - orePoor("Poor Ores", "Poor ", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64, -1), // Prefix of Railcraft. - oreEndstone("Endstone Ores", "End ", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64, -1), // In case of an End-Ores Mod. Ore -> Material is a Oneway Operation! - oreEnd("End Ores", "End ", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64, -1), // In case of an End-Ores Mod. Ore -> Material is a Oneway Operation! - @Deprecated oreGem("Ores", "", "", false, false, false, false, false, true, false, false, false, true, B[3], -1, 64, -1), - ore("Ores", "", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64, 68), // Regular Ore Prefix. Ore -> Material is a Oneway Operation! Introduced by Eloraam - crushedCentrifuged("Centrifuged Ores", "Centrifuged ", " Ore", true, true, false, false, false, false, false, true, false, true, B[3], -1, 64, 7), - crushedPurified("Purified Ores", "Purified ", " Ore", true, true, false, false, false, false, false, true, false, true, B[3], -1, 64, 6), - crushed("Crushed Ores", "Crushed ", " Ore", true, true, false, false, false, false, false, true, false, true, B[3], -1, 64, 5), - shard("Crystallised Shards", "", "", true, true, false, false, false, false, false, false, false, true, B[3], -1, 64, -1), // Introduced by Mekanism + @Deprecated + pulp( + "Pulps", + "", + "", + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + B[0] | B[1] | B[2] | B[3], + -1, + 64, + -1), + @Deprecated + leaves("Leaves", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), + @Deprecated + sapling("Saplings", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), + @Deprecated + itemDust( + "Dusts", + "", + "", + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + B[0] | B[1] | B[2] | B[3], + -1, + 64, + -1), + oreBlackgranite( + "Black Granite Ores", + "Granite ", + " Ore", + true, + true, + false, + false, + false, + true, + false, + false, + false, + true, + B[3], + -1, + 64, + -1), // In case of an End-Ores Mod. Ore -> Material is a Oneway Operation! + oreRedgranite( + "Red Granite Ores", + "Granite ", + " Ore", + true, + true, + false, + false, + false, + true, + false, + false, + false, + true, + B[3], + -1, + 64, + -1), // In case of an End-Ores Mod. Ore -> Material is a Oneway Operation! + oreMarble( + "Marble Ores", + "Marble ", + " Ore", + true, + true, + false, + false, + false, + true, + false, + false, + false, + true, + B[3], + -1, + 64, + -1), // In case of an End-Ores Mod. Ore -> Material is a Oneway Operation! + oreBasalt( + "Basalt Ores", + "Basalt ", + " Ore", + true, + true, + false, + false, + false, + true, + false, + false, + false, + true, + B[3], + -1, + 64, + -1), // In case of an End-Ores Mod. Ore -> Material is a Oneway Operation! + oreNetherrack( + "Netherrack Ores", + "Nether ", + " Ore", + true, + true, + false, + false, + false, + true, + false, + false, + false, + true, + B[3], + -1, + 64, + -1), // Prefix of the Nether-Ores Mod. Causes Ores to double. Ore -> Material is a Oneway Operation! + oreNether( + "Nether Ores", + "Nether ", + " Ore", + true, + true, + false, + false, + false, + true, + false, + false, + false, + true, + B[3], + -1, + 64, + -1), // Prefix of the Nether-Ores Mod. Causes Ores to double. Ore -> Material is a Oneway Operation! + @Deprecated + denseore( + "Dense Ores", "", "", false, false, false, false, false, true, false, false, false, true, B[3], -1, 64, -1), + oreDense( + "Dense Ores", + "Dense ", + " Ore", + true, + true, + false, + false, + false, + true, + false, + false, + false, + true, + B[3], + -1, + 64, + -1), // Prefix of the Dense-Ores Mod. Causes Ores to double. Ore -> Material is a Oneway Operation! + oreRich( + "Rich Ores", + "Rich ", + " Ore", + true, + true, + false, + false, + false, + true, + false, + false, + false, + true, + B[3], + -1, + 64, + -1), // Prefix of TFC + oreNormal( + "Normal Ores", + "Normal ", + " Ore", + true, + true, + false, + false, + false, + true, + false, + false, + false, + true, + B[3], + -1, + 64, + -1), // Prefix of TFC + oreSmall( + "Small Ores", + "Small ", + " Ore", + true, + true, + false, + false, + false, + true, + false, + false, + false, + true, + B[3], + -1, + 64, + 67), // Prefix of Railcraft. + orePoor( + "Poor Ores", + "Poor ", + " Ore", + true, + true, + false, + false, + false, + true, + false, + false, + false, + true, + B[3], + -1, + 64, + -1), // Prefix of Railcraft. + oreEndstone( + "Endstone Ores", + "End ", + " Ore", + true, + true, + false, + false, + false, + true, + false, + false, + false, + true, + B[3], + -1, + 64, + -1), // In case of an End-Ores Mod. Ore -> Material is a Oneway Operation! + oreEnd( + "End Ores", + "End ", + " Ore", + true, + true, + false, + false, + false, + true, + false, + false, + false, + true, + B[3], + -1, + 64, + -1), // In case of an End-Ores Mod. Ore -> Material is a Oneway Operation! + @Deprecated + oreGem("Ores", "", "", false, false, false, false, false, true, false, false, false, true, B[3], -1, 64, -1), + ore( + "Ores", "", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64, + 68), // Regular Ore Prefix. Ore -> Material is a Oneway Operation! Introduced by Eloraam + crushedCentrifuged( + "Centrifuged Ores", + "Centrifuged ", + " Ore", + true, + true, + false, + false, + false, + false, + false, + true, + false, + true, + B[3], + -1, + 64, + 7), + crushedPurified( + "Purified Ores", + "Purified ", + " Ore", + true, + true, + false, + false, + false, + false, + false, + true, + false, + true, + B[3], + -1, + 64, + 6), + crushed( + "Crushed Ores", + "Crushed ", + " Ore", + true, + true, + false, + false, + false, + false, + false, + true, + false, + true, + B[3], + -1, + 64, + 5), + shard( + "Crystallised Shards", + "", + "", + true, + true, + false, + false, + false, + false, + false, + false, + false, + true, + B[3], + -1, + 64, + -1), // Introduced by Mekanism clump("Clumps", "", "", true, true, false, false, false, false, false, false, false, true, B[3], -1, 64, -1), - reduced("Reduced Gravels", "", "", true, true, false, false, false, false, false, false, false, true, B[3], -1, 64, -1), - crystalline("Crystallised Metals", "", "", true, true, false, false, false, false, false, false, false, true, B[3], -1, 64, -1), - cleanGravel("Clean Gravels", "", "", true, true, false, false, false, false, false, false, false, true, B[3], -1, 64, -1), - dirtyGravel("Dirty Gravels", "", "", true, true, false, false, false, false, false, false, false, true, B[3], -1, 64, -1), - ingotQuintuple("5x Ingots", "Quintuple ", " Ingot", true, true, false, false, false, false, true, true, false, false, B[1], M * 5, 12, 16), // A quintuple Ingot. - ingotQuadruple("4x Ingots", "Quadruple ", " Ingot", true, true, false, false, false, false, true, true, false, false, B[1], M * 4, 16, 15), // A quadruple Ingot. - @Deprecated ingotQuad("4x Ingots", "Quadruple ", " Ingot", false, false, false, false, false, false, false, false, false, false, B[1], -1, 16, 15), - ingotTriple("3x Ingots", "Triple ", " Ingot", true, true, false, false, false, false, true, false, false, false, B[1], M * 3, 21, 14), // A triple Ingot. - ingotDouble("2x Ingots", "Double ", " Ingot", true, true, false, false, false, false, true, true, false, false, B[1], M * 2, 32, 13), // A double Ingot. Introduced by TerraFirmaCraft - ingotHot("Hot Ingots", "Hot ", " Ingot", true, true, false, false, false, false, false, true, false, false, B[1], M * 1, 64, 12), // A hot Ingot, which has to be cooled down by a Vacuum Freezer. - ingot("Ingots", "", " Ingot", true, true, false, false, false, false, false, true, false, false, B[1], M * 1, 64, 11), // A regular Ingot. Introduced by Eloraam - gemChipped("Chipped Gemstones", "Chipped ", "", true, true, true, false, false, false, true, true, false, false, B[2], M / 4, 64, 59), // A regular Gem worth one small Dust. Introduced by TerraFirmaCraft - gemFlawed("Flawed Gemstones", "Flawed ", "", true, true, true, false, false, false, true, true, false, false, B[2], M / 2, 64, 60), // A regular Gem worth two small Dusts. Introduced by TerraFirmaCraft - gemFlawless("Flawless Gemstones", "Flawless ", "", true, true, true, false, false, false, true, true, false, false, B[2], M * 2, 32, 61), // A regular Gem worth two Dusts. Introduced by TerraFirmaCraft - gemExquisite("Exquisite Gemstones", "Exquisite ", "", true, true, true, false, false, false, true, true, false, false, B[2], M * 4, 16, 62), // A regular Gem worth four Dusts. Introduced by TerraFirmaCraft - gem("Gemstones", "", "", true, true, true, false, false, false, true, true, false, false, B[2], M * 1, 64, 8), // A regular Gem worth one Dust. Introduced by Eloraam - @Deprecated dustDirty("Impure Dusts", "", "", false, false, false, false, false, false, false, false, false, true, B[3], -1, 64, 3), - dustTiny("Tiny Dusts", "Tiny Pile of ", " Dust", true, true, false, false, false, false, false, true, false, false, B[0] | B[1] | B[2] | B[3], M / 9, 64, 0), // 1/9th of a Dust. - dustSmall("Small Dusts", "Small Pile of ", " Dust", true, true, false, false, false, false, false, true, false, false, B[0] | B[1] | B[2] | B[3], M / 4, 64, 1), // 1/4th of a Dust. - dustImpure("Impure Dusts", "Impure Pile of ", " Dust", true, true, false, false, false, false, false, true, false, true, B[3], M * 1, 64, 3), // Dust with impurities. 1 Unit of Main Material and 1/9 - 1/4 Unit of secondary Material - dustRefined("Refined Dusts", "Refined Pile of ", " Dust", true, true, false, false, false, false, false, true, false, true, B[3], M * 1, 64, 2), - dustPure("Purified Dusts", "Purified Pile of ", " Dust", true, true, false, false, false, false, false, true, false, true, B[3], M * 1, 64, 4), - dust("Dusts", "", " Dust", true, true, false, false, false, false, false, true, false, false, B[0] | B[1] | B[2] | B[3], M * 1, 64, 2), // Pure Dust worth of one Ingot or Gem. Introduced by Alblaka. - nugget("Nuggets", "", " Nugget", true, true, false, false, false, false, false, true, false, false, B[1], M / 9, 64, 9), // A Nugget. Introduced by Eloraam - plateAlloy("Alloy Plates", "", "", true, false, false, false, false, false, false, false, false, false, B[1], -1, 64, 17), // Special Alloys have this prefix. - plateSteamcraft("Steamcraft Plates", "", "", false, false, false, false, false, false, false, false, false, false, B[1], -1, 64, 17), - plateDense("Dense Plates", "Dense ", " Plate", true, true, false, false, false, false, true, true, false, false, B[1], M * 9, 8, 22), // 9 Plates combined in one Item. - plateQuintuple("5x Plates", "Quintuple ", " Plate", true, true, false, false, false, false, true, true, false, false, B[1], M * 5, 12, 21), - plateQuadruple("4x Plates", "Quadruple ", " Plate", true, true, false, false, false, false, true, true, false, false, B[1], M * 4, 16, 20), - @Deprecated plateQuad("4x Plates", "", "", false, false, false, false, false, false, false, false, false, false, B[1], -1, 16, 20), - plateTriple("3x Plates", "Triple ", " Plate", true, true, false, false, false, false, true, true, false, false, B[1], M * 3, 21, 19), - plateDouble("2x Plates", "Double ", " Plate", true, true, false, false, false, false, true, true, false, false, B[1], M * 2, 32, 18), - plate("Plates", "", " Plate", true, true, false, false, false, false, true, true, false, false, B[1] | B[2], M * 1, 64, 17), // Regular Plate made of one Ingot/Dust. Introduced by Calclavia - itemCasing("Casings", "", " Casing", true, true, false, false, false, false, true, true, false, false, B[1] | B[2], M / 2, 64, 10), // Casing made of 1/2 Ingot/Dust - foil("Foils", "", " Foil", true, true, false, false, false, false, true, true, false, false, B[1], M / 4, 64, 29), // Foil made of 1/4 Ingot/Dust. - stickLong("Long Sticks/Rods", "Long ", " Rod", true, true, false, false, false, false, true, true, false, false, B[1] | B[2], M * 1, 64, 54), // Stick made of an Ingot. - stick("Sticks/Rods", "", " Rod", true, true, false, false, false, false, true, true, false, false, B[1] | B[2], M / 2, 64, 23), // Stick made of half an Ingot. Introduced by Eloraam - round("Rounds", "", " Round", true, true, false, false, false, false, true, true, false, false, B[1], M / 9, 64, 25), // consisting out of one Nugget. - bolt("Bolts", "", " Bolt", true, true, false, false, false, false, true, true, false, false, B[1] | B[2], M / 8, 64, 26), // consisting out of 1/8 Ingot or 1/4 Stick. - comb("Combs", "", " Comb", false, false, false, false, false, false, false, true, false, false, B[1] | B[2], M, 64, 101), // contain dusts - screw("Screws", "", " Screw", true, true, false, false, false, false, true, true, false, false, B[1] | B[2], M / 9, 64, 27), // consisting out of a Bolt. - ring("Rings", "", " Ring", true, true, false, false, false, false, true, true, false, false, B[1], M / 4, 64, 28), // consisting out of 1/2 Stick. - springSmall("Small Springs", "Small ", " Spring", true, true, false, false, false, false, true, true, false, false, B[1], M / 4, 64, 55), // consisting out of 1 Fine Wire. - spring("Springs", "", " Spring", true, true, false, false, false, false, true, true, false, false, B[1], M * 1, 64, 56), // consisting out of 2 Sticks. - wireFine("Fine Wires", "Fine ", " Wire", true, true, false, false, false, false, true, true, false, false, B[1], M / 8, 64, 51), // consisting out of 1/8 Ingot or 1/4 Wire. - rotor("Rotors", "", " Rotor", true, true, false, false, false, false, true, true, false, false, B[7], M * 4 + M / 4, 16, 53), // consisting out of 4 Plates, 1 Ring and 1 Screw. - gearGtSmall("Small Gears", "Small ", " Gear", true, true, false, false, false, false, true, true, false, false, B[7], M * 1, 64, 52), - gearGt("Gears", "", " Gear", true, true, false, false, false, false, true, true, false, false, B[7], M * 4, 16, 63), // Introduced by me because BuildCraft has ruined the gear Prefix... - lens("Lenses", "", " Lens", true, true, false, false, false, false, true, true, false, false, B[2], (M * 3) / 4, 64, 24), // 3/4 of a Plate or Gem used to shape a Lense. Normally only used on Transparent Materials. - crateGtDust("Crates of Dust", "Crate of ", " Dust", true, true, false, true, false, false, false, true, false, false, B[0] | B[1] | B[2] | B[3], -1, 64, 96), // consisting out of 16 Dusts. - crateGtPlate("Crates of Plates", "Crate of ", " Plate", true, true, false, true, false, false, false, true, false, false, B[1] | B[2], -1, 64, 99), // consisting out of 16 Plates. - crateGtIngot("Crates of Ingots", "Crate of ", " Ingot", true, true, false, true, false, false, false, true, false, false, B[1], -1, 64, 97), // consisting out of 16 Ingots. - crateGtGem("Crates of Gems", "Crate of ", " Gem", true, true, false, true, false, false, false, true, false, false, B[2], -1, 64, 98), // consisting out of 16 Gems. - cellPlasma("Cells of Plasma", "", " Plasma Cell" , true, true, true, true, false, false, false, true, false, false, B[5], M * 1, 64, 31), // Hot Cell full of Plasma, which can be used in the Plasma Generator. - cellMolten("Cells of Molten stuff", "Molten ", " Cell", true, true, true, true, false, false, false, true, false, false, 0, M * 1, 64, 31), // Hot Cell full of molten stuff, which can be used in the Plasma Generator. - cell("Cells", "", " Cell", true, true, true, true, false, false, true, true, false, false, B[4] | B[8], M * 1, 64, 30), // Regular Gas/Fluid Cell. Introduced by Calclavia - bucket("Buckets", "", " Bucket", true, true, true, true, false, false, true, false, false, false, B[4] | B[8], M * 1, 16, -1), // A vanilla Iron Bucket filled with the Material. - bucketClay("Clay Buckets", "", " Clay Bucket", true, true, true, true, false, false, true, false, false, false, B[4] | B[8], M * 1, 16, -1), // An Iguana Tweaks Clay Bucket filled with the Material. - bottle("Bottles", "", " Bottle", true, true, true, true, false, false, false, false, false, false, B[4] | B[8], -1, 16, -1), // Glass Bottle containing a Fluid. - capsule("Capsules", "", " Capsule", false, true, true, true, false, false, false, false, false, false, B[4] | B[8], M * 1, 16, -1), - crystal("Crystals", "", " Crystal", false, true, false, false, false, false, true, false, false, false, B[2], M * 1, 64, -1), - bulletGtSmall("Small Bullets", "Small ", " Bullet", true, true, false, false, true, false, true, false, true, false, B[6] | B[8], M / 9, 64, -1), - bulletGtMedium("Medium Bullets", "Medium ", " Bullet", true, true, false, false, true, false, true, false, true, false, B[6] | B[8], M / 6, 64, -1), - bulletGtLarge("Large Bullets", "Large ", " Bullet", true, true, false, false, true, false, true, false, true, false, B[6] | B[8], M / 3, 64, -1), - arrowGtWood("Regular Arrows", "", " Arrow", true, true, false, false, true, false, true, false, true, false, B[6], M / 4, 64, 57), // Arrow made of 1/4 Ingot/Dust + Wooden Stick. - arrowGtPlastic("Light Arrows", "Light ", " Arrow", true, true, false, false, true, false, true, false, true, false, B[6], M / 4, 64, 58), // Arrow made of 1/4 Ingot/Dust + Plastic Stick. + reduced( + "Reduced Gravels", + "", + "", + true, + true, + false, + false, + false, + false, + false, + false, + false, + true, + B[3], + -1, + 64, + -1), + crystalline( + "Crystallised Metals", + "", + "", + true, + true, + false, + false, + false, + false, + false, + false, + false, + true, + B[3], + -1, + 64, + -1), + cleanGravel( + "Clean Gravels", + "", + "", + true, + true, + false, + false, + false, + false, + false, + false, + false, + true, + B[3], + -1, + 64, + -1), + dirtyGravel( + "Dirty Gravels", + "", + "", + true, + true, + false, + false, + false, + false, + false, + false, + false, + true, + B[3], + -1, + 64, + -1), + ingotQuintuple( + "5x Ingots", + "Quintuple ", + " Ingot", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[1], + M * 5, + 12, + 16), // A quintuple Ingot. + ingotQuadruple( + "4x Ingots", + "Quadruple ", + " Ingot", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[1], + M * 4, + 16, + 15), // A quadruple Ingot. + @Deprecated + ingotQuad( + "4x Ingots", + "Quadruple ", + " Ingot", + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + B[1], + -1, + 16, + 15), + ingotTriple( + "3x Ingots", + "Triple ", + " Ingot", + true, + true, + false, + false, + false, + false, + true, + false, + false, + false, + B[1], + M * 3, + 21, + 14), // A triple Ingot. + ingotDouble( + "2x Ingots", + "Double ", + " Ingot", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[1], + M * 2, + 32, + 13), // A double Ingot. Introduced by TerraFirmaCraft + ingotHot( + "Hot Ingots", + "Hot ", + " Ingot", + true, + true, + false, + false, + false, + false, + false, + true, + false, + false, + B[1], + M * 1, + 64, + 12), // A hot Ingot, which has to be cooled down by a Vacuum Freezer. + ingot( + "Ingots", "", " Ingot", true, true, false, false, false, false, false, true, false, false, B[1], M * 1, 64, + 11), // A regular Ingot. Introduced by Eloraam + gemChipped( + "Chipped Gemstones", + "Chipped ", + "", + true, + true, + true, + false, + false, + false, + true, + true, + false, + false, + B[2], + M / 4, + 64, + 59), // A regular Gem worth one small Dust. Introduced by TerraFirmaCraft + gemFlawed( + "Flawed Gemstones", + "Flawed ", + "", + true, + true, + true, + false, + false, + false, + true, + true, + false, + false, + B[2], + M / 2, + 64, + 60), // A regular Gem worth two small Dusts. Introduced by TerraFirmaCraft + gemFlawless( + "Flawless Gemstones", + "Flawless ", + "", + true, + true, + true, + false, + false, + false, + true, + true, + false, + false, + B[2], + M * 2, + 32, + 61), // A regular Gem worth two Dusts. Introduced by TerraFirmaCraft + gemExquisite( + "Exquisite Gemstones", + "Exquisite ", + "", + true, + true, + true, + false, + false, + false, + true, + true, + false, + false, + B[2], + M * 4, + 16, + 62), // A regular Gem worth four Dusts. Introduced by TerraFirmaCraft + gem( + "Gemstones", + "", + "", + true, + true, + true, + false, + false, + false, + true, + true, + false, + false, + B[2], + M * 1, + 64, + 8), // A regular Gem worth one Dust. Introduced by Eloraam + @Deprecated + dustDirty( + "Impure Dusts", + "", + "", + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + B[3], + -1, + 64, + 3), + dustTiny( + "Tiny Dusts", + "Tiny Pile of ", + " Dust", + true, + true, + false, + false, + false, + false, + false, + true, + false, + false, + B[0] | B[1] | B[2] | B[3], + M / 9, + 64, + 0), // 1/9th of a Dust. + dustSmall( + "Small Dusts", + "Small Pile of ", + " Dust", + true, + true, + false, + false, + false, + false, + false, + true, + false, + false, + B[0] | B[1] | B[2] | B[3], + M / 4, + 64, + 1), // 1/4th of a Dust. + dustImpure( + "Impure Dusts", + "Impure Pile of ", + " Dust", + true, + true, + false, + false, + false, + false, + false, + true, + false, + true, + B[3], + M * 1, + 64, + 3), // Dust with impurities. 1 Unit of Main Material and 1/9 - 1/4 Unit of secondary Material + dustRefined( + "Refined Dusts", + "Refined Pile of ", + " Dust", + true, + true, + false, + false, + false, + false, + false, + true, + false, + true, + B[3], + M * 1, + 64, + 2), + dustPure( + "Purified Dusts", + "Purified Pile of ", + " Dust", + true, + true, + false, + false, + false, + false, + false, + true, + false, + true, + B[3], + M * 1, + 64, + 4), + dust( + "Dusts", + "", + " Dust", + true, + true, + false, + false, + false, + false, + false, + true, + false, + false, + B[0] | B[1] | B[2] | B[3], + M * 1, + 64, + 2), // Pure Dust worth of one Ingot or Gem. Introduced by Alblaka. + nugget( + "Nuggets", "", " Nugget", true, true, false, false, false, false, false, true, false, false, B[1], M / 9, + 64, 9), // A Nugget. Introduced by Eloraam + plateAlloy( + "Alloy Plates", + "", + "", + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + B[1], + -1, + 64, + 17), // Special Alloys have this prefix. + plateSteamcraft( + "Steamcraft Plates", + "", + "", + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + B[1], + -1, + 64, + 17), + plateDense( + "Dense Plates", + "Dense ", + " Plate", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[1], + M * 9, + 8, + 22), // 9 Plates combined in one Item. + plateQuintuple( + "5x Plates", + "Quintuple ", + " Plate", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[1], + M * 5, + 12, + 21), + plateQuadruple( + "4x Plates", + "Quadruple ", + " Plate", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[1], + M * 4, + 16, + 20), + @Deprecated + plateQuad( + "4x Plates", + "", + "", + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + B[1], + -1, + 16, + 20), + plateTriple( + "3x Plates", + "Triple ", + " Plate", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[1], + M * 3, + 21, + 19), + plateDouble( + "2x Plates", + "Double ", + " Plate", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[1], + M * 2, + 32, + 18), + plate( + "Plates", + "", + " Plate", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[1] | B[2], + M * 1, + 64, + 17), // Regular Plate made of one Ingot/Dust. Introduced by Calclavia + itemCasing( + "Casings", + "", + " Casing", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[1] | B[2], + M / 2, + 64, + 10), // Casing made of 1/2 Ingot/Dust + foil( + "Foils", "", " Foil", true, true, false, false, false, false, true, true, false, false, B[1], M / 4, 64, + 29), // Foil made of 1/4 Ingot/Dust. + stickLong( + "Long Sticks/Rods", + "Long ", + " Rod", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[1] | B[2], + M * 1, + 64, + 54), // Stick made of an Ingot. + stick( + "Sticks/Rods", + "", + " Rod", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[1] | B[2], + M / 2, + 64, + 23), // Stick made of half an Ingot. Introduced by Eloraam + round( + "Rounds", "", " Round", true, true, false, false, false, false, true, true, false, false, B[1], M / 9, 64, + 25), // consisting out of one Nugget. + bolt( + "Bolts", + "", + " Bolt", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[1] | B[2], + M / 8, + 64, + 26), // consisting out of 1/8 Ingot or 1/4 Stick. + comb( + "Combs", + "", + " Comb", + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + B[1] | B[2], + M, + 64, + 101), // contain dusts + screw( + "Screws", + "", + " Screw", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[1] | B[2], + M / 9, + 64, + 27), // consisting out of a Bolt. + ring( + "Rings", "", " Ring", true, true, false, false, false, false, true, true, false, false, B[1], M / 4, 64, + 28), // consisting out of 1/2 Stick. + springSmall( + "Small Springs", + "Small ", + " Spring", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[1], + M / 4, + 64, + 55), // consisting out of 1 Fine Wire. + spring( + "Springs", "", " Spring", true, true, false, false, false, false, true, true, false, false, B[1], M * 1, 64, + 56), // consisting out of 2 Sticks. + wireFine( + "Fine Wires", + "Fine ", + " Wire", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[1], + M / 8, + 64, + 51), // consisting out of 1/8 Ingot or 1/4 Wire. + rotor( + "Rotors", + "", + " Rotor", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[7], + M * 4 + M / 4, + 16, + 53), // consisting out of 4 Plates, 1 Ring and 1 Screw. + gearGtSmall( + "Small Gears", + "Small ", + " Gear", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[7], + M * 1, + 64, + 52), + gearGt( + "Gears", "", " Gear", true, true, false, false, false, false, true, true, false, false, B[7], M * 4, 16, + 63), // Introduced by me because BuildCraft has ruined the gear Prefix... + lens( + "Lenses", + "", + " Lens", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[2], + (M * 3) / 4, + 64, + 24), // 3/4 of a Plate or Gem used to shape a Lense. Normally only used on Transparent Materials. + crateGtDust( + "Crates of Dust", + "Crate of ", + " Dust", + true, + true, + false, + true, + false, + false, + false, + true, + false, + false, + B[0] | B[1] | B[2] | B[3], + -1, + 64, + 96), // consisting out of 16 Dusts. + crateGtPlate( + "Crates of Plates", + "Crate of ", + " Plate", + true, + true, + false, + true, + false, + false, + false, + true, + false, + false, + B[1] | B[2], + -1, + 64, + 99), // consisting out of 16 Plates. + crateGtIngot( + "Crates of Ingots", + "Crate of ", + " Ingot", + true, + true, + false, + true, + false, + false, + false, + true, + false, + false, + B[1], + -1, + 64, + 97), // consisting out of 16 Ingots. + crateGtGem( + "Crates of Gems", + "Crate of ", + " Gem", + true, + true, + false, + true, + false, + false, + false, + true, + false, + false, + B[2], + -1, + 64, + 98), // consisting out of 16 Gems. + cellPlasma( + "Cells of Plasma", + "", + " Plasma Cell", + true, + true, + true, + true, + false, + false, + false, + true, + false, + false, + B[5], + M * 1, + 64, + 31), // Hot Cell full of Plasma, which can be used in the Plasma Generator. + cellMolten( + "Cells of Molten stuff", + "Molten ", + " Cell", + true, + true, + true, + true, + false, + false, + false, + true, + false, + false, + 0, + M * 1, + 64, + 31), // Hot Cell full of molten stuff, which can be used in the Plasma Generator. + cell( + "Cells", + "", + " Cell", + true, + true, + true, + true, + false, + false, + true, + true, + false, + false, + B[4] | B[8], + M * 1, + 64, + 30), // Regular Gas/Fluid Cell. Introduced by Calclavia + bucket( + "Buckets", + "", + " Bucket", + true, + true, + true, + true, + false, + false, + true, + false, + false, + false, + B[4] | B[8], + M * 1, + 16, + -1), // A vanilla Iron Bucket filled with the Material. + bucketClay( + "Clay Buckets", + "", + " Clay Bucket", + true, + true, + true, + true, + false, + false, + true, + false, + false, + false, + B[4] | B[8], + M * 1, + 16, + -1), // An Iguana Tweaks Clay Bucket filled with the Material. + bottle( + "Bottles", + "", + " Bottle", + true, + true, + true, + true, + false, + false, + false, + false, + false, + false, + B[4] | B[8], + -1, + 16, + -1), // Glass Bottle containing a Fluid. + capsule( + "Capsules", + "", + " Capsule", + false, + true, + true, + true, + false, + false, + false, + false, + false, + false, + B[4] | B[8], + M * 1, + 16, + -1), + crystal( + "Crystals", + "", + " Crystal", + false, + true, + false, + false, + false, + false, + true, + false, + false, + false, + B[2], + M * 1, + 64, + -1), + bulletGtSmall( + "Small Bullets", + "Small ", + " Bullet", + true, + true, + false, + false, + true, + false, + true, + false, + true, + false, + B[6] | B[8], + M / 9, + 64, + -1), + bulletGtMedium( + "Medium Bullets", + "Medium ", + " Bullet", + true, + true, + false, + false, + true, + false, + true, + false, + true, + false, + B[6] | B[8], + M / 6, + 64, + -1), + bulletGtLarge( + "Large Bullets", + "Large ", + " Bullet", + true, + true, + false, + false, + true, + false, + true, + false, + true, + false, + B[6] | B[8], + M / 3, + 64, + -1), + arrowGtWood( + "Regular Arrows", + "", + " Arrow", + true, + true, + false, + false, + true, + false, + true, + false, + true, + false, + B[6], + M / 4, + 64, + 57), // Arrow made of 1/4 Ingot/Dust + Wooden Stick. + arrowGtPlastic( + "Light Arrows", + "Light ", + " Arrow", + true, + true, + false, + false, + true, + false, + true, + false, + true, + false, + B[6], + M / 4, + 64, + 58), // Arrow made of 1/4 Ingot/Dust + Plastic Stick. arrow("Arrows", "", "", false, false, true, false, false, false, false, false, true, false, B[6], -1, 64, 57), - toolHeadArrow("Arrow Heads", "", " Arrow Head", true, true, false, false, false, false, true, true, false, false, B[6], M / 4, 64, 46), // consisting out of 1/4 Ingot. - toolHeadSword("Sword Blades", "", " Sword Blade", true, true, false, false, false, false, true, true, false, false, B[6], M * 2, 16, 32), // consisting out of 2 Ingots. - toolHeadPickaxe("Pickaxe Heads", "", " Pickaxe Head", true, true, false, false, false, false, true, true, false, false, B[6], M * 3, 16, 33), // consisting out of 3 Ingots. - toolHeadShovel("Shovel Heads", "", " Shovel Head", true, true, false, false, false, false, true, true, false, false, B[6], M * 1, 16, 34), // consisting out of 1 Ingots. - toolHeadUniversalSpade("Universal Spade Heads", "", " Universal Spade Head", true, true, false, false, false, false, true, true, false, false, B[6], M * 1, 16, 43), // consisting out of 1 Ingots. - toolHeadAxe("Axe Heads", "", " Axe Head", true, true, false, false, false, false, true, true, false, false, B[6], M * 3, 16, 35), // consisting out of 3 Ingots. - toolHeadHoe("Hoe Heads", "", " Hoe Head", true, true, false, false, false, false, true, true, false, false, B[6], M * 2, 16, 36), // consisting out of 2 Ingots. - toolHeadSense("Sense Blades", "", " Sense Blade", true, true, false, false, false, false, true, true, false, false, B[6], M * 3, 16, 44), // consisting out of 3 Ingots. - toolHeadFile("File Heads", "", " File Head", true, true, false, false, false, false, true, true, false, false, B[6], M * 2, 16, 38), // consisting out of 2 Ingots. - toolHeadHammer("Hammer Heads", "", " Hammer Head", true, true, false, false, false, false, true, true, false, false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. - toolHeadPlow("Plow Heads", "", " Plow Head", true, true, false, false, false, false, true, true, false, false, B[6], M * 4, 16, 45), // consisting out of 4 Ingots. - toolHeadSaw("Saw Blades", "", " Saw Blade", true, true, false, false, false, false, true, true, false, false, B[6], M * 2, 16, 39), // consisting out of 2 Ingots. - toolHeadBuzzSaw("Buzzsaw Blades", "", " Buzzsaw Blade", true, true, false, false, false, false, true, true, false, false, B[6], M * 4, 16, 48), // consisting out of 4 Ingots. - toolHeadScrewdriver("Screwdriver Tips", "", " Screwdriver Tip", true, true, false, false, false, false, true, false, false, false, B[6], M * 1, 16, 47), // consisting out of 1 Ingots. - toolHeadDrill("Drill Tips", "", " Drill Tip", true, true, false, false, false, false, true, true, false, false, B[6], M * 4, 16, 40), // consisting out of 4 Ingots. - toolHeadChainsaw("Chainsaw Tips", "", " Chainsaw Tip", true, true, false, false, false, false, true, true, false, false, B[6], M * 2, 16, 41), // consisting out of 2 Ingots. - toolHeadWrench("Wrench Tips", "", " Wrench Tip", true, true, false, false, false, false, true, true, false, false, B[6], M * 4, 16, 42), // consisting out of 4 Ingots. - turbineBlade("Turbine Blades", "", " Turbine Blade", true, true, false, false, false, false, true, true, false, false, B[6], M * 6, 64, 100), // consisting out of 6 Ingots. - toolSword("Swords", "", "", false, true, false, false, false, false, true, false, true, false, B[6], M * 2, 1, -1), // vanilly Sword - toolPickaxe("Pickaxes", "", "", false, true, false, false, false, false, true, false, true, false, B[6], M * 3, 1, -1), // vanilly Pickaxe - toolShovel("Shovels", "", "", false, true, false, false, false, false, true, false, true, false, B[6], M * 1, 1, -1), // vanilly Shovel - toolAxe("Axes", "", "", false, true, false, false, false, false, true, false, true, false, B[6], M * 3, 1, -1), // vanilly Axe - toolHoe("Hoes", "", "", false, true, false, false, false, false, true, false, true, false, B[6], M * 2, 1, -1), // vanilly Hoe - toolShears("Shears", "", "", false, true, false, false, false, false, true, false, true, false, B[6], M * 2, 1, -1), // vanilly Shears - tool("Tools", "", "", false, false, false, false, false, false, false, false, true, false, B[6], -1, 1, -1), // toolPot, toolSkillet, toolSaucepan, toolBakeware, toolCuttingboard, toolMortarandpestle, toolMixingbowl, toolJuicer - compressedCobblestone("9^X Compressed Cobblestones", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), - compressedStone("9^X Compressed Stones", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), - compressedDirt("9^X Compressed Dirt", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), - compressedGravel("9^X Compressed Gravel", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), - compressedSand("9^X Compressed Sand", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), - compressed("Compressed Materials", "Compressed ", "", true, true, false, false, false, false, true, false, false, false, 0, M * 3, 64, -1), // Compressed Material, worth 1 Unit. Introduced by Galacticraft + toolHeadArrow( + "Arrow Heads", + "", + " Arrow Head", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[6], + M / 4, + 64, + 46), // consisting out of 1/4 Ingot. + toolHeadSword( + "Sword Blades", + "", + " Sword Blade", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[6], + M * 2, + 16, + 32), // consisting out of 2 Ingots. + toolHeadPickaxe( + "Pickaxe Heads", + "", + " Pickaxe Head", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[6], + M * 3, + 16, + 33), // consisting out of 3 Ingots. + toolHeadShovel( + "Shovel Heads", + "", + " Shovel Head", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[6], + M * 1, + 16, + 34), // consisting out of 1 Ingots. + toolHeadUniversalSpade( + "Universal Spade Heads", + "", + " Universal Spade Head", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[6], + M * 1, + 16, + 43), // consisting out of 1 Ingots. + toolHeadAxe( + "Axe Heads", + "", + " Axe Head", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[6], + M * 3, + 16, + 35), // consisting out of 3 Ingots. + toolHeadHoe( + "Hoe Heads", + "", + " Hoe Head", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[6], + M * 2, + 16, + 36), // consisting out of 2 Ingots. + toolHeadSense( + "Sense Blades", + "", + " Sense Blade", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[6], + M * 3, + 16, + 44), // consisting out of 3 Ingots. + toolHeadFile( + "File Heads", + "", + " File Head", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[6], + M * 2, + 16, + 38), // consisting out of 2 Ingots. + toolHeadHammer( + "Hammer Heads", + "", + " Hammer Head", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[6], + M * 6, + 16, + 37), // consisting out of 6 Ingots. + toolHeadPlow( + "Plow Heads", + "", + " Plow Head", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[6], + M * 4, + 16, + 45), // consisting out of 4 Ingots. + toolHeadSaw( + "Saw Blades", + "", + " Saw Blade", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[6], + M * 2, + 16, + 39), // consisting out of 2 Ingots. + toolHeadBuzzSaw( + "Buzzsaw Blades", + "", + " Buzzsaw Blade", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[6], + M * 4, + 16, + 48), // consisting out of 4 Ingots. + toolHeadScrewdriver( + "Screwdriver Tips", + "", + " Screwdriver Tip", + true, + true, + false, + false, + false, + false, + true, + false, + false, + false, + B[6], + M * 1, + 16, + 47), // consisting out of 1 Ingots. + toolHeadDrill( + "Drill Tips", + "", + " Drill Tip", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[6], + M * 4, + 16, + 40), // consisting out of 4 Ingots. + toolHeadChainsaw( + "Chainsaw Tips", + "", + " Chainsaw Tip", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[6], + M * 2, + 16, + 41), // consisting out of 2 Ingots. + toolHeadWrench( + "Wrench Tips", + "", + " Wrench Tip", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[6], + M * 4, + 16, + 42), // consisting out of 4 Ingots. + turbineBlade( + "Turbine Blades", + "", + " Turbine Blade", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[6], + M * 6, + 64, + 100), // consisting out of 6 Ingots. + toolSword( + "Swords", "", "", false, true, false, false, false, false, true, false, true, false, B[6], M * 2, 1, + -1), // vanilly Sword + toolPickaxe( + "Pickaxes", + "", + "", + false, + true, + false, + false, + false, + false, + true, + false, + true, + false, + B[6], + M * 3, + 1, + -1), // vanilly Pickaxe + toolShovel( + "Shovels", "", "", false, true, false, false, false, false, true, false, true, false, B[6], M * 1, 1, + -1), // vanilly Shovel + toolAxe( + "Axes", "", "", false, true, false, false, false, false, true, false, true, false, B[6], M * 3, 1, + -1), // vanilly Axe + toolHoe( + "Hoes", "", "", false, true, false, false, false, false, true, false, true, false, B[6], M * 2, 1, + -1), // vanilly Hoe + toolShears( + "Shears", "", "", false, true, false, false, false, false, true, false, true, false, B[6], M * 2, 1, + -1), // vanilly Shears + tool( + "Tools", "", "", false, false, false, false, false, false, false, false, true, false, B[6], -1, 1, + -1), // toolPot, toolSkillet, toolSaucepan, toolBakeware, toolCuttingboard, toolMortarandpestle, + // toolMixingbowl, toolJuicer + compressedCobblestone( + "9^X Compressed Cobblestones", + "", + "", + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + 0, + -1, + 64, + -1), + compressedStone( + "9^X Compressed Stones", + "", + "", + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + 0, + -1, + 64, + -1), + compressedDirt( + "9^X Compressed Dirt", + "", + "", + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + 0, + -1, + 64, + -1), + compressedGravel( + "9^X Compressed Gravel", + "", + "", + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + 0, + -1, + 64, + -1), + compressedSand( + "9^X Compressed Sand", + "", + "", + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + 0, + -1, + 64, + -1), + compressed( + "Compressed Materials", + "Compressed ", + "", + true, + true, + false, + false, + false, + false, + true, + false, + false, + false, + 0, + M * 3, + 64, + -1), // Compressed Material, worth 1 Unit. Introduced by Galacticraft glass("Glasses", "", "", false, false, true, false, true, false, false, false, false, false, 0, -1, 64, -1), paneGlass("Glass Panes", "", "", false, false, true, false, false, true, false, false, false, false, 0, -1, 64, -1), - blockGlass("Glass Blocks", "", "", false, false, true, false, false, true, false, false, false, false, 0, -1, 64, -1), + blockGlass( + "Glass Blocks", "", "", false, false, true, false, false, true, false, false, false, false, 0, -1, 64, -1), blockWool("Wool Blocks", "", "", false, false, true, false, false, true, false, false, false, false, 0, -1, 64, -1), - block_("Random Blocks", "", "", false, false, false, false, false, true, false, false, false, false, 0, -1, 64, -1), // IGNORE - block("Storage Blocks", "Block of ", "", true, true, false, false, false, true, true, false, false, false, 0, M * 9, 64, 71), // Storage Block consisting out of 9 Ingots/Gems/Dusts. Introduced by CovertJaguar - craftingTool("Crafting Tools", "", "", false, false, false, false, false, false, false, false, true, false, 0, -1, 64, -1), // Special Prefix used mainly for the Crafting Handler. - crafting("Crafting Ingredients", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Special Prefix used mainly for the Crafting Handler. - craft("Crafting Stuff?", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Special Prefix used mainly for the Crafting Handler. - log("Logs", "", "", false, false, false, false, false, true, false, false, false, false, 0, -1, 64, -1), // Prefix used for Logs. Usually as "logWood". Introduced by Eloraam - slab("Slabs", "", "", false, false, false, false, false, true, false, false, false, false, 0, -1, 64, -1), // Prefix used for Slabs. Usually as "slabWood" or "slabStone". Introduced by SirSengir - stair("Stairs", "", "", false, false, false, false, false, true, false, false, false, false, 0, -1, 64, -1), // Prefix used for Stairs. Usually as "stairWood" or "stairStone". Introduced by SirSengir - fence("Fences", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Prefix used for Fences. Usually as "fenceWood". Introduced by Forge - plank("Planks", "", "", false, false, false, false, false, true, false, false, false, false, 0, -1, 64, -1), // Prefix for Planks. Usually "plankWood". Introduced by Eloraam - treeSapling("Saplings", "", "", false, false, true, false, false, true, false, false, false, false, 0, -1, 64, -1), // Prefix for Saplings. - treeLeaves("Leaves", "", "", false, false, true, false, false, true, false, false, false, false, 0, -1, 64, -1), // Prefix for Leaves. - tree("Tree Parts", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Prefix for Tree Parts. - stoneCobble("Cobblestones", "", "", false, false, true, false, false, true, false, false, false, false, 0, -1, 64, -1), // Cobblestone Prefix for all Cobblestones. - stoneSmooth("Smoothstones", "", "", false, false, true, false, false, true, false, false, false, false, 0, -1, 64, -1), // Smoothstone Prefix. - stoneMossyBricks("mossy Stone Bricks", "", "", false, false, true, false, false, true, false, false, false, false, 0, -1, 64, -1), // Mossy Stone Bricks. - stoneMossy("Mossy Stones", "", "", false, false, true, false, false, true, false, false, false, false, 0, -1, 64, -1), // Mossy Cobble. - @Deprecated stoneBricksMossy("Mossy Stone Bricks", "", "", false, false, false, false, false, true, false, false, false, false, 0, -1, 64, -1), - stoneBricks("Stone Bricks", "", "", false, false, true, false, false, true, false, false, false, false, 0, -1, 64, -1), // Stone Bricks. - @Deprecated stoneBrick("Stone Bricks", "", "", false, false, false, false, false, true, false, false, false, false, 0, -1, 64, -1), - stoneCracked("Cracked Stones", "", "", false, false, true, false, false, true, false, false, false, false, 0, -1, 64, -1), // Cracked Bricks. - stoneChiseled("Chiseled Stones", "", "", false, false, true, false, false, true, false, false, false, false, 0, -1, 64, -1), // Chiseled Stone. - stone("Stones", "", "", false, true, true, false, true, true, false, false, false, false, 0, -1, 64, -1), // Prefix to determine which kind of Rock this is. - cobblestone("Cobblestones", "", "", false, true, true, false, false, true, false, false, false, false, 0, -1, 64, -1), - rock("Rocks", "", "", false, true, true, false, true, true, false, false, false, false, 0, -1, 64, -1), // Prefix to determine which kind of Rock this is. + block_( + "Random Blocks", + "", + "", + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + 0, + -1, + 64, + -1), // IGNORE + block( + "Storage Blocks", + "Block of ", + "", + true, + true, + false, + false, + false, + true, + true, + false, + false, + false, + 0, + M * 9, + 64, + 71), // Storage Block consisting out of 9 Ingots/Gems/Dusts. Introduced by CovertJaguar + craftingTool( + "Crafting Tools", + "", + "", + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + 0, + -1, + 64, + -1), // Special Prefix used mainly for the Crafting Handler. + crafting( + "Crafting Ingredients", + "", + "", + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + 0, + -1, + 64, + -1), // Special Prefix used mainly for the Crafting Handler. + craft( + "Crafting Stuff?", + "", + "", + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + 0, + -1, + 64, + -1), // Special Prefix used mainly for the Crafting Handler. + log( + "Logs", "", "", false, false, false, false, false, true, false, false, false, false, 0, -1, 64, + -1), // Prefix used for Logs. Usually as "logWood". Introduced by Eloraam + slab( + "Slabs", "", "", false, false, false, false, false, true, false, false, false, false, 0, -1, 64, + -1), // Prefix used for Slabs. Usually as "slabWood" or "slabStone". Introduced by SirSengir + stair( + "Stairs", "", "", false, false, false, false, false, true, false, false, false, false, 0, -1, 64, + -1), // Prefix used for Stairs. Usually as "stairWood" or "stairStone". Introduced by SirSengir + fence( + "Fences", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, + -1), // Prefix used for Fences. Usually as "fenceWood". Introduced by Forge + plank( + "Planks", "", "", false, false, false, false, false, true, false, false, false, false, 0, -1, 64, + -1), // Prefix for Planks. Usually "plankWood". Introduced by Eloraam + treeSapling( + "Saplings", + "", + "", + false, + false, + true, + false, + false, + true, + false, + false, + false, + false, + 0, + -1, + 64, + -1), // Prefix for Saplings. + treeLeaves( + "Leaves", "", "", false, false, true, false, false, true, false, false, false, false, 0, -1, 64, + -1), // Prefix for Leaves. + tree( + "Tree Parts", + "", + "", + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + 0, + -1, + 64, + -1), // Prefix for Tree Parts. + stoneCobble( + "Cobblestones", + "", + "", + false, + false, + true, + false, + false, + true, + false, + false, + false, + false, + 0, + -1, + 64, + -1), // Cobblestone Prefix for all Cobblestones. + stoneSmooth( + "Smoothstones", + "", + "", + false, + false, + true, + false, + false, + true, + false, + false, + false, + false, + 0, + -1, + 64, + -1), // Smoothstone Prefix. + stoneMossyBricks( + "mossy Stone Bricks", + "", + "", + false, + false, + true, + false, + false, + true, + false, + false, + false, + false, + 0, + -1, + 64, + -1), // Mossy Stone Bricks. + stoneMossy( + "Mossy Stones", + "", + "", + false, + false, + true, + false, + false, + true, + false, + false, + false, + false, + 0, + -1, + 64, + -1), // Mossy Cobble. + @Deprecated + stoneBricksMossy( + "Mossy Stone Bricks", + "", + "", + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + 0, + -1, + 64, + -1), + stoneBricks( + "Stone Bricks", + "", + "", + false, + false, + true, + false, + false, + true, + false, + false, + false, + false, + 0, + -1, + 64, + -1), // Stone Bricks. + @Deprecated + stoneBrick( + "Stone Bricks", "", "", false, false, false, false, false, true, false, false, false, false, 0, -1, 64, -1), + stoneCracked( + "Cracked Stones", + "", + "", + false, + false, + true, + false, + false, + true, + false, + false, + false, + false, + 0, + -1, + 64, + -1), // Cracked Bricks. + stoneChiseled( + "Chiseled Stones", + "", + "", + false, + false, + true, + false, + false, + true, + false, + false, + false, + false, + 0, + -1, + 64, + -1), // Chiseled Stone. + stone( + "Stones", "", "", false, true, true, false, true, true, false, false, false, false, 0, -1, 64, + -1), // Prefix to determine which kind of Rock this is. + cobblestone( + "Cobblestones", "", "", false, true, true, false, false, true, false, false, false, false, 0, -1, 64, -1), + rock( + "Rocks", "", "", false, true, true, false, true, true, false, false, false, false, 0, -1, 64, + -1), // Prefix to determine which kind of Rock this is. record("Records", "", "", false, false, true, false, false, false, false, false, false, false, 0, -1, 1, -1), rubble("Rubbles", "", "", true, true, true, false, false, false, false, false, false, false, 0, -1, 64, -1), scraps("Scraps", "", "", true, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), scrap("Scraps", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), - item_("Items", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // IGNORE - item("Items", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Random Item. Introduced by Alblaka - book("Books", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Used for Books of any kind. - paper("Papers", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Used for Papers of any kind. - dye("Dyes", "", "", false, false, true, false, false, false, false, false, false, false, 0, -1, 64, -1), // Used for the 16 dyes. Introduced by Eloraam - stainedClay("Stained Clays", "", "", false, false, true, false, false, true, false, false, false, false, 0, -1, 64, -1), // Used for the 16 colors of Stained Clay. Introduced by Forge - armorHelmet("Helmets", "", "", false, true, false, false, false, false, true, false, true, false, B[6], M * 5, 1, -1), // vanilly Helmet - armorChestplate("Chestplates", "", "", false, true, false, false, false, false, true, false, true, false, B[6], M * 8, 1, -1), // vanilly Chestplate - armorLeggings("Leggings", "", "", false, true, false, false, false, false, true, false, true, false, B[6], M * 7, 1, -1), // vanilly Pants - armorBoots("Boots", "", "", false, true, false, false, false, false, true, false, true, false, B[6], M * 4, 1, -1), // vanilly Boots + item_( + "Items", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, + -1), // IGNORE + item( + "Items", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, + -1), // Random Item. Introduced by Alblaka + book( + "Books", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, + -1), // Used for Books of any kind. + paper( + "Papers", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, + -1), // Used for Papers of any kind. + dye( + "Dyes", "", "", false, false, true, false, false, false, false, false, false, false, 0, -1, 64, + -1), // Used for the 16 dyes. Introduced by Eloraam + stainedClay( + "Stained Clays", + "", + "", + false, + false, + true, + false, + false, + true, + false, + false, + false, + false, + 0, + -1, + 64, + -1), // Used for the 16 colors of Stained Clay. Introduced by Forge + armorHelmet( + "Helmets", "", "", false, true, false, false, false, false, true, false, true, false, B[6], M * 5, 1, + -1), // vanilly Helmet + armorChestplate( + "Chestplates", + "", + "", + false, + true, + false, + false, + false, + false, + true, + false, + true, + false, + B[6], + M * 8, + 1, + -1), // vanilly Chestplate + armorLeggings( + "Leggings", + "", + "", + false, + true, + false, + false, + false, + false, + true, + false, + true, + false, + B[6], + M * 7, + 1, + -1), // vanilly Pants + armorBoots( + "Boots", "", "", false, true, false, false, false, false, true, false, true, false, B[6], M * 4, 1, + -1), // vanilly Boots armor("Armor Parts", "", "", false, false, false, false, false, false, false, false, true, false, B[6], -1, 1, -1), frameGt("Frame Boxes", "", "", true, true, false, false, true, false, true, false, false, false, 0, M * 2, 64, 83), - pipeTiny("Tiny Pipes", "Tiny ", " Pipe", true, true, false, false, true, false, true, false, false, false, 0, M / 2, 64, 78), - pipeSmall("Small Pipes", "Small ", " Pipe", true, true, false, false, true, false, true, false, false, false, 0, M * 1, 64, 79), - pipeMedium("Medium Pipes", "Medium ", " Pipe", true, true, false, false, true, false, true, false, false, false, 0, M * 3, 64, 80), - pipeLarge("Large pipes", "Large ", " Pipe", true, true, false, false, true, false, true, false, false, false, 0, M * 6, 64, 81), - pipeHuge("Huge Pipes", "Huge ", " Pipe", true, true, false, false, true, false, true, false, false, false, 0, M * 12, 64, 82), - pipeQuadruple("Quadruple Pipes", "Quadruple ", " Pipe", true, true, false, false, true, false, true, false, false, false, 0, M *12, 64, 84), - pipeNonuple("Nonuple Pipes", "Nonuple ", " Pipe", true, true, false, false, true, false, true, false, false, false, 0, M * 9, 64, 85), - pipeRestrictiveTiny("Tiny Restrictive Pipes", "Tiny Restrictive ", " Pipe", true, true, false, false, true, false, true, false, false, false, 0, M / 2, 64, 78), - pipeRestrictiveSmall("Small Restrictive Pipes", "Small Restrictive ", " Pipe", true, true, false, false, true, false, true, false, false, false, 0, M * 1, 64, 79), - pipeRestrictiveMedium("Medium Restrictive Pipes", "Medium Restrictive ", " Pipe", true, true, false, false, true, false, true, false, false, false, 0, M * 3, 64, 80), - pipeRestrictiveLarge("Large Restrictive Pipes", "Large Restrictive ", " Pipe", true, true, false, false, true, false, true, false, false, false, 0, M * 6, 64, 81), - pipeRestrictiveHuge("Huge Restrictive Pipes", "Huge Restrictive ", " Pipe", true, true, false, false, true, false, true, false, false, false, 0, M * 12, 64, 82), + pipeTiny( + "Tiny Pipes", + "Tiny ", + " Pipe", + true, + true, + false, + false, + true, + false, + true, + false, + false, + false, + 0, + M / 2, + 64, + 78), + pipeSmall( + "Small Pipes", + "Small ", + " Pipe", + true, + true, + false, + false, + true, + false, + true, + false, + false, + false, + 0, + M * 1, + 64, + 79), + pipeMedium( + "Medium Pipes", + "Medium ", + " Pipe", + true, + true, + false, + false, + true, + false, + true, + false, + false, + false, + 0, + M * 3, + 64, + 80), + pipeLarge( + "Large pipes", + "Large ", + " Pipe", + true, + true, + false, + false, + true, + false, + true, + false, + false, + false, + 0, + M * 6, + 64, + 81), + pipeHuge( + "Huge Pipes", + "Huge ", + " Pipe", + true, + true, + false, + false, + true, + false, + true, + false, + false, + false, + 0, + M * 12, + 64, + 82), + pipeQuadruple( + "Quadruple Pipes", + "Quadruple ", + " Pipe", + true, + true, + false, + false, + true, + false, + true, + false, + false, + false, + 0, + M * 12, + 64, + 84), + pipeNonuple( + "Nonuple Pipes", + "Nonuple ", + " Pipe", + true, + true, + false, + false, + true, + false, + true, + false, + false, + false, + 0, + M * 9, + 64, + 85), + pipeRestrictiveTiny( + "Tiny Restrictive Pipes", + "Tiny Restrictive ", + " Pipe", + true, + true, + false, + false, + true, + false, + true, + false, + false, + false, + 0, + M / 2, + 64, + 78), + pipeRestrictiveSmall( + "Small Restrictive Pipes", + "Small Restrictive ", + " Pipe", + true, + true, + false, + false, + true, + false, + true, + false, + false, + false, + 0, + M * 1, + 64, + 79), + pipeRestrictiveMedium( + "Medium Restrictive Pipes", + "Medium Restrictive ", + " Pipe", + true, + true, + false, + false, + true, + false, + true, + false, + false, + false, + 0, + M * 3, + 64, + 80), + pipeRestrictiveLarge( + "Large Restrictive Pipes", + "Large Restrictive ", + " Pipe", + true, + true, + false, + false, + true, + false, + true, + false, + false, + false, + 0, + M * 6, + 64, + 81), + pipeRestrictiveHuge( + "Huge Restrictive Pipes", + "Huge Restrictive ", + " Pipe", + true, + true, + false, + false, + true, + false, + true, + false, + false, + false, + 0, + M * 12, + 64, + 82), pipe("Pipes", "", " Pipe", true, false, false, false, false, false, false, false, false, false, 0, -1, 64, 77), - wireGt16("16x Wires", "16x ", " Wire", true, true, false, false, false, false, true, false, false, false, 0, M * 8, 64, -1), - wireGt12("12x Wires", "12x ", " Wire", true, true, false, false, false, false, true, false, false, false, 0, M * 6, 64, -1), - wireGt08("8x Wires", "8x ", " Wire", true, true, false, false, false, false, true, false, false, false, 0, M * 4, 64, -1), - wireGt04("4x Wires", "4x ", " Wire", true, true, false, false, false, false, true, false, false, false, 0, M * 2, 64, -1), - wireGt02("2x Wires", "2x ", " Wire", true, true, false, false, false, false, true, false, false, false, 0, M * 1, 64, -1), - wireGt01("1x Wires", "1x ", " Wire", true, true, false, false, false, false, true, false, false, false, 0, M / 2, 64, -1), - cableGt16("16x Cables", "16x ", " Cable", true, true, false, false, false, false, true, false, false, false, 0, M * 8, 64, -1), - cableGt12("12x Cables", "12x ", " Cable", true, true, false, false, false, false, true, false, false, false, 0, M * 6, 64, -1), - cableGt08("8x Cables", "8x ", " Cable", true, true, false, false, false, false, true, false, false, false, 0, M * 4, 64, -1), - cableGt04("4x Cables", "4x ", " Cable", true, true, false, false, false, false, true, false, false, false, 0, M * 2, 64, -1), - cableGt02("2x Cables", "2x ", " Cable", true, true, false, false, false, false, true, false, false, false, 0, M * 1, 64, -1), - cableGt01("1x Cables", "1x ", " Cable", true, true, false, false, false, false, true, false, false, false, 0, M / 2, 64, -1), + wireGt16( + "16x Wires", + "16x ", + " Wire", + true, + true, + false, + false, + false, + false, + true, + false, + false, + false, + 0, + M * 8, + 64, + -1), + wireGt12( + "12x Wires", + "12x ", + " Wire", + true, + true, + false, + false, + false, + false, + true, + false, + false, + false, + 0, + M * 6, + 64, + -1), + wireGt08( + "8x Wires", + "8x ", + " Wire", + true, + true, + false, + false, + false, + false, + true, + false, + false, + false, + 0, + M * 4, + 64, + -1), + wireGt04( + "4x Wires", + "4x ", + " Wire", + true, + true, + false, + false, + false, + false, + true, + false, + false, + false, + 0, + M * 2, + 64, + -1), + wireGt02( + "2x Wires", + "2x ", + " Wire", + true, + true, + false, + false, + false, + false, + true, + false, + false, + false, + 0, + M * 1, + 64, + -1), + wireGt01( + "1x Wires", + "1x ", + " Wire", + true, + true, + false, + false, + false, + false, + true, + false, + false, + false, + 0, + M / 2, + 64, + -1), + cableGt16( + "16x Cables", + "16x ", + " Cable", + true, + true, + false, + false, + false, + false, + true, + false, + false, + false, + 0, + M * 8, + 64, + -1), + cableGt12( + "12x Cables", + "12x ", + " Cable", + true, + true, + false, + false, + false, + false, + true, + false, + false, + false, + 0, + M * 6, + 64, + -1), + cableGt08( + "8x Cables", + "8x ", + " Cable", + true, + true, + false, + false, + false, + false, + true, + false, + false, + false, + 0, + M * 4, + 64, + -1), + cableGt04( + "4x Cables", + "4x ", + " Cable", + true, + true, + false, + false, + false, + false, + true, + false, + false, + false, + 0, + M * 2, + 64, + -1), + cableGt02( + "2x Cables", + "2x ", + " Cable", + true, + true, + false, + false, + false, + false, + true, + false, + false, + false, + 0, + M * 1, + 64, + -1), + cableGt01( + "1x Cables", + "1x ", + " Cable", + true, + true, + false, + false, + false, + false, + true, + false, + false, + false, + 0, + M / 2, + 64, + -1), /* Electric Components. * - * usual Materials for this are: - * Primitive (Tier 1) - * Basic (Tier 2) as used by UE as well : IC2 Circuit and RE-Battery - * Good (Tier 3) - * Advanced (Tier 4) as used by UE as well : Advanced Circuit, Advanced Battery and Lithium Battery - * Data (Tier 5) : Data Storage Circuit - * Elite (Tier 6) as used by UE as well : Energy Crystal and Data Control Circuit - * Master (Tier 7) : Energy Flow Circuit and Lapotron Crystal - * Ultimate (Tier 8) : Data Orb and Lapotronic Energy Orb - * Infinite (Cheaty) - */ - batterySingleuse("Single Use Batteries", "", "", false, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), - battery("Reusable Batteries", "", "", false, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Introduced by Calclavia - circuit("Circuits", "", "", true, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Introduced by Calclavia - chipset("Chipsets", "", "", true, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Introduced by Buildcraft - computer("Computers", "", "", true, true, false, false, true, false, false, false, false, false, 0, -1, 64, -1), // A whole Computer. "computerMaster" = ComputerCube + * usual Materials for this are: + * Primitive (Tier 1) + * Basic (Tier 2) as used by UE as well : IC2 Circuit and RE-Battery + * Good (Tier 3) + * Advanced (Tier 4) as used by UE as well : Advanced Circuit, Advanced Battery and Lithium Battery + * Data (Tier 5) : Data Storage Circuit + * Elite (Tier 6) as used by UE as well : Energy Crystal and Data Control Circuit + * Master (Tier 7) : Energy Flow Circuit and Lapotron Crystal + * Ultimate (Tier 8) : Data Orb and Lapotronic Energy Orb + * Infinite (Cheaty) + */ + batterySingleuse( + "Single Use Batteries", + "", + "", + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + 0, + -1, + 64, + -1), + battery( + "Reusable Batteries", + "", + "", + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + 0, + -1, + 64, + -1), // Introduced by Calclavia + circuit( + "Circuits", + "", + "", + true, + true, + false, + false, + false, + false, + false, + false, + false, + false, + 0, + -1, + 64, + -1), // Introduced by Calclavia + chipset( + "Chipsets", + "", + "", + true, + true, + false, + false, + false, + false, + false, + false, + false, + false, + 0, + -1, + 64, + -1), // Introduced by Buildcraft + computer( + "Computers", + "", + "", + true, + true, + false, + false, + true, + false, + false, + false, + false, + false, + 0, + -1, + 64, + -1), // A whole Computer. "computerMaster" = ComputerCube // random known prefixes without special abilities. skull("Skulls", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), plating("Platings", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), dinosaur("Dinosaurs", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), - travelgear("Travel Gear", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), + travelgear( + "Travel Gear", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), bauble("Baubles", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), cluster("Clusters", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), grafter("Grafters", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), @@ -254,7 +2878,9 @@ public enum OrePrefixes { grass("Grasses", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), gravel("Gravels", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), mushroom("Mushrooms", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), - wood("Woods", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Introduced by Eloraam + wood( + "Woods", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, + -1), // Introduced by Eloraam drop("Drops", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), fuel("Fuels", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), panel("Panels", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), @@ -263,21 +2889,42 @@ public enum OrePrefixes { wire("Wires", "", "", false, false, false, false, true, false, false, false, false, false, 0, -1, 64, -1), seed("Seeds", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), reed("Reeds", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), - sheetDouble("2x Sheets", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), + sheetDouble( + "2x Sheets", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), sheet("Sheets", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), crop("Crops", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), plant("Plants", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), coin("Coins", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), lumar("Lumars", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), - ground("Grounded Stuff", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), + ground( + "Grounded Stuff", + "", + "", + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + 0, + -1, + 64, + -1), cable("Cables", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), - component("Components", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), + component( + "Components", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), wax("Waxes", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), wall("Walls", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), tube("Tubes", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), list("Lists", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), food("Foods", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), - gear("Gears", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Introduced by SirSengir + gear( + "Gears", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, + -1), // Introduced by SirSengir coral("Corals", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), flower("Flowers", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), storage("Storages", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), @@ -294,10 +2941,28 @@ public enum OrePrefixes { bit("Bits", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), shears("Shears", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), turbine("Turbines", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), - fertilizer("Fertilizers", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), + fertilizer( + "Fertilizers", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), chest("Chests", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), raw("Raw Things", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), - stainedGlass("Stained Glasses", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), + stainedGlass( + "Stained Glasses", + "", + "", + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + 0, + -1, + 64, + -1), mystic("Mystic Stuff", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), mana("Mana Stuff", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), rune("Runes", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), @@ -306,12 +2971,30 @@ public enum OrePrefixes { powder("Powders", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), soulsand("Soulsands", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), obsidian("Obsidians", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), - glowstone("Glowstones", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), + glowstone( + "Glowstones", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), beans("Beans", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), br("br", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), essence("Essences", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), alloy("Alloys", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), - cooking("Cooked Things", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), + cooking( + "Cooked Things", + "", + "", + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + 0, + -1, + 64, + -1), elven("Elven Stuff", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), reactor("Reactors", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), mffs("MFFS", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), @@ -320,26 +3003,185 @@ public enum OrePrefixes { liquid("Liquids", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), bars("Bars", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), bar("Bars", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), - toolHeadMallet("Mallet Heads", "", " Mallet Head", true, true, false, false, false, false, true, true, false, false, B[6], M * 6, 16, 127), // Reverse Head consisting out of 6 Ingots. - handleMallet("Mallet Handle", "", " Handle", true, true, false, false, false, false, true, true, false, false, B[1] | B[2], M / 2, 64, 126), // Reverse Stick made of half an Ingot. Introduced by Eloraam + toolHeadMallet( + "Mallet Heads", + "", + " Mallet Head", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[6], + M * 6, + 16, + 127), // Reverse Head consisting out of 6 Ingots. + handleMallet( + "Mallet Handle", + "", + " Handle", + true, + true, + false, + false, + false, + false, + true, + true, + false, + false, + B[1] | B[2], + M / 2, + 64, + 126), // Reverse Stick made of half an Ingot. Introduced by Eloraam // Cracked fluids - cellHydroCracked1("Cells", "Lightly Hydro-Cracked ", " Cell", true, true, true, true, false, false, false, true, false, false, 0, M * 1, 64, 30), - cellHydroCracked2("Cells", "Moderately Hydro-Cracked ", " Cell", true, true, true, true, false, false, false, true, false, false, 0, M * 1, 64, 30), - cellHydroCracked3("Cells", "Severely Hydro-Cracked ", " Cell", true, true, true, true, false, false, false, true, false, false, 0, M * 1, 64, 30), - cellSteamCracked1("Cells", "Lightly Steam-Cracked ", " Cell", true, true, true, true, false, false, false, true, false, false, 0, M * 1, 64, 30), - cellSteamCracked2("Cells", "Moderately Steam-Cracked ", " Cell", true, true, true, true, false, false, false, true, false, false, 0, M * 1, 64, 30), - cellSteamCracked3("Cells", "Severely Steam-Cracked ", " Cell", true, true, true, true, false, false, false, true, false, false, 0, M * 1, 64, 30), + cellHydroCracked1( + "Cells", + "Lightly Hydro-Cracked ", + " Cell", + true, + true, + true, + true, + false, + false, + false, + true, + false, + false, + 0, + M * 1, + 64, + 30), + cellHydroCracked2( + "Cells", + "Moderately Hydro-Cracked ", + " Cell", + true, + true, + true, + true, + false, + false, + false, + true, + false, + false, + 0, + M * 1, + 64, + 30), + cellHydroCracked3( + "Cells", + "Severely Hydro-Cracked ", + " Cell", + true, + true, + true, + true, + false, + false, + false, + true, + false, + false, + 0, + M * 1, + 64, + 30), + cellSteamCracked1( + "Cells", + "Lightly Steam-Cracked ", + " Cell", + true, + true, + true, + true, + false, + false, + false, + true, + false, + false, + 0, + M * 1, + 64, + 30), + cellSteamCracked2( + "Cells", + "Moderately Steam-Cracked ", + " Cell", + true, + true, + true, + true, + false, + false, + false, + true, + false, + false, + 0, + M * 1, + 64, + 30), + cellSteamCracked3( + "Cells", + "Severely Steam-Cracked ", + " Cell", + true, + true, + true, + true, + false, + false, + false, + true, + false, + false, + 0, + M * 1, + 64, + 30), - componentCircuit("Circuit Parts", "", "", true, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), + componentCircuit( + "Circuit Parts", "", "", true, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), - apiaryUpgrade("Industrial Apiary Upgrade", "", "", false, false, true, false, false, false, false, false, true, false, 0, -1, 64, -1); + apiaryUpgrade( + "Industrial Apiary Upgrade", + "", + "", + false, + false, + true, + false, + false, + false, + false, + false, + true, + false, + 0, + -1, + 64, + -1); - public static final ImmutableList<OrePrefixes> CELL_TYPES = - ImmutableList.of( - cell, cellMolten, cellPlasma, - cellHydroCracked1, cellHydroCracked2, cellHydroCracked3, - cellSteamCracked1, cellSteamCracked2, cellSteamCracked3); + public static final ImmutableList<OrePrefixes> CELL_TYPES = ImmutableList.of( + cell, + cellMolten, + cellPlasma, + cellHydroCracked1, + cellHydroCracked2, + cellHydroCracked3, + cellSteamCracked1, + cellSteamCracked2, + cellSteamCracked3); public static volatile int VERSION = 509; @@ -357,10 +3199,20 @@ public enum OrePrefixes { stoneBricksMossy.mPrefixInto = stoneMossyBricks; ingotHot.mHeatDamage = 3.0F; - cellMolten.mHeatDamage=3; + cellMolten.mHeatDamage = 3; cellPlasma.mHeatDamage = 6.0F; - block.ignoreMaterials(Materials.Ice, Materials.Snow, Materials.Concrete, Materials.Glass, Materials.Glowstone, Materials.DarkIron, Materials.Marble, Materials.Quartz, Materials.CertusQuartz, Materials.Limestone); + block.ignoreMaterials( + Materials.Ice, + Materials.Snow, + Materials.Concrete, + Materials.Glass, + Materials.Glowstone, + Materials.DarkIron, + Materials.Marble, + Materials.Quartz, + Materials.CertusQuartz, + Materials.Limestone); ingot.ignoreMaterials(Materials.Brick, Materials.NetherBrick); dust.addFamiliarPrefix(dustTiny); @@ -376,9 +3228,7 @@ public enum OrePrefixes { for (OrePrefixes tPrefix1 : values()) if (tPrefix1.name().startsWith("ore")) for (OrePrefixes tPrefix2 : values()) - if (tPrefix2.name().startsWith("ore")) - tPrefix1.addFamiliarPrefix(tPrefix2); - + if (tPrefix2.name().startsWith("ore")) tPrefix1.addFamiliarPrefix(tPrefix2); // These are only the important ones. gem.mNotGeneratedItems.add(Materials.Coal); @@ -397,9 +3247,9 @@ public enum OrePrefixes { dust.mNotGeneratedItems.add(Materials.Gunpowder); dust.mNotGeneratedItems.add(Materials.Sugar); dust.mNotGeneratedItems.add(Materials.Blaze); - //dust.mNotGeneratedItems.add(Materials.Ichorium); - //dustSmall.mNotGeneratedItems.add(Materials.Ichorium); - //dustTiny.mNotGeneratedItems.add(Materials.Ichorium); + // dust.mNotGeneratedItems.add(Materials.Ichorium); + // dustSmall.mNotGeneratedItems.add(Materials.Ichorium); + // dustTiny.mNotGeneratedItems.add(Materials.Ichorium); stick.mNotGeneratedItems.add(Materials.Wood); stick.mNotGeneratedItems.add(Materials.Bone); stick.mNotGeneratedItems.add(Materials.Blaze); @@ -409,7 +3259,7 @@ public enum OrePrefixes { ingot.mNotGeneratedItems.add(Materials.BrickNether); ingot.mNotGeneratedItems.add(Materials.WoodSealed); ingot.mNotGeneratedItems.add(Materials.Wood); - //ingot.mNotGeneratedItems.add(Materials.Ichorium); + // ingot.mNotGeneratedItems.add(Materials.Ichorium); nugget.mNotGeneratedItems.add(Materials.Gold); plate.mNotGeneratedItems.add(Materials.Paper); cell.mNotGeneratedItems.add(Materials.Empty); @@ -438,7 +3288,7 @@ public enum OrePrefixes { block.mNotGeneratedItems.add(Materials.Coal); toolHeadArrow.mNotGeneratedItems.add(Materials.Glass); - //----- + // ----- dustImpure.mGeneratedItems.add(Materials.GraniteRed); dustImpure.mGeneratedItems.add(Materials.GraniteBlack); @@ -475,7 +3325,7 @@ public enum OrePrefixes { stickLong.mGeneratedItems.add(Materials.Blaze); - //----- + // ----- dust.mGeneratedItems.addAll(dustPure.mGeneratedItems); dust.mGeneratedItems.addAll(dustImpure.mGeneratedItems); @@ -487,32 +3337,73 @@ public enum OrePrefixes { crateGtGem.mGeneratedItems.addAll(gem.mGeneratedItems); crateGtPlate.mGeneratedItems.addAll(plate.mGeneratedItems); itemCasing.mGeneratedItems.addAll(itemCasing.mGeneratedItems); - //----- + // ----- - toolHeadFile.mCondition = new ICondition.And<ISubTagContainer>(new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING), new ICondition.Not<ISubTagContainer>(SubTag.BOUNCY)); - toolHeadSaw.mCondition = new ICondition.And<ISubTagContainer>(new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING), new ICondition.Not<ISubTagContainer>(SubTag.BOUNCY)); - toolHeadDrill.mCondition = new ICondition.And<ISubTagContainer>(new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING), new ICondition.Not<ISubTagContainer>(SubTag.BOUNCY)); - toolHeadChainsaw.mCondition = new ICondition.And<ISubTagContainer>(new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING), new ICondition.Not<ISubTagContainer>(SubTag.BOUNCY)); - toolHeadWrench.mCondition = new ICondition.And<ISubTagContainer>(new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING), new ICondition.Not<ISubTagContainer>(SubTag.BOUNCY)); - toolHeadBuzzSaw.mCondition = new ICondition.And<ISubTagContainer>(new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING), new ICondition.Not<ISubTagContainer>(SubTag.BOUNCY)); - turbineBlade.mCondition = new ICondition.And<ISubTagContainer>(new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING), new ICondition.Not<ISubTagContainer>(SubTag.BOUNCY)); + toolHeadFile.mCondition = new ICondition.And<ISubTagContainer>( + new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING), + new ICondition.Not<ISubTagContainer>(SubTag.BOUNCY)); + toolHeadSaw.mCondition = new ICondition.And<ISubTagContainer>( + new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING), + new ICondition.Not<ISubTagContainer>(SubTag.BOUNCY)); + toolHeadDrill.mCondition = new ICondition.And<ISubTagContainer>( + new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING), + new ICondition.Not<ISubTagContainer>(SubTag.BOUNCY)); + toolHeadChainsaw.mCondition = new ICondition.And<ISubTagContainer>( + new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING), + new ICondition.Not<ISubTagContainer>(SubTag.BOUNCY)); + toolHeadWrench.mCondition = new ICondition.And<ISubTagContainer>( + new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING), + new ICondition.Not<ISubTagContainer>(SubTag.BOUNCY)); + toolHeadBuzzSaw.mCondition = new ICondition.And<ISubTagContainer>( + new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING), + new ICondition.Not<ISubTagContainer>(SubTag.BOUNCY)); + turbineBlade.mCondition = new ICondition.And<ISubTagContainer>( + new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING), + new ICondition.Not<ISubTagContainer>(SubTag.BOUNCY)); rotor.mCondition = new ICondition.Nor<ISubTagContainer>(SubTag.CRYSTAL, SubTag.STONE, SubTag.BOUNCY); - spring.mCondition = new ICondition.Or<ISubTagContainer>(SubTag.STRETCHY, SubTag.BOUNCY, new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING)); - springSmall.mCondition = new ICondition.Or<ISubTagContainer>(SubTag.STRETCHY, SubTag.BOUNCY, new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING)); + spring.mCondition = new ICondition.Or<ISubTagContainer>( + SubTag.STRETCHY, SubTag.BOUNCY, new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING)); + springSmall.mCondition = new ICondition.Or<ISubTagContainer>( + SubTag.STRETCHY, SubTag.BOUNCY, new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING)); - gemChipped.mCondition = new ICondition.And<ISubTagContainer>(SubTag.TRANSPARENT, SubTag.CRYSTAL, new ICondition.Not<ISubTagContainer>(SubTag.QUARTZ), new ICondition.Not<ISubTagContainer>(SubTag.PEARL), new ICondition.Not<ISubTagContainer>(SubTag.MAGICAL)); - gemFlawed.mCondition = new ICondition.And<ISubTagContainer>(SubTag.TRANSPARENT, SubTag.CRYSTAL, new ICondition.Not<ISubTagContainer>(SubTag.QUARTZ), new ICondition.Not<ISubTagContainer>(SubTag.PEARL), new ICondition.Not<ISubTagContainer>(SubTag.MAGICAL)); - gemFlawless.mCondition = new ICondition.And<ISubTagContainer>(SubTag.TRANSPARENT, SubTag.CRYSTAL, new ICondition.Not<ISubTagContainer>(SubTag.QUARTZ), new ICondition.Not<ISubTagContainer>(SubTag.PEARL), new ICondition.Not<ISubTagContainer>(SubTag.MAGICAL)); - gemExquisite.mCondition = new ICondition.And<ISubTagContainer>(SubTag.TRANSPARENT, SubTag.CRYSTAL, new ICondition.Not<ISubTagContainer>(SubTag.QUARTZ), new ICondition.Not<ISubTagContainer>(SubTag.PEARL), new ICondition.Not<ISubTagContainer>(SubTag.MAGICAL)); + gemChipped.mCondition = new ICondition.And<ISubTagContainer>( + SubTag.TRANSPARENT, + SubTag.CRYSTAL, + new ICondition.Not<ISubTagContainer>(SubTag.QUARTZ), + new ICondition.Not<ISubTagContainer>(SubTag.PEARL), + new ICondition.Not<ISubTagContainer>(SubTag.MAGICAL)); + gemFlawed.mCondition = new ICondition.And<ISubTagContainer>( + SubTag.TRANSPARENT, + SubTag.CRYSTAL, + new ICondition.Not<ISubTagContainer>(SubTag.QUARTZ), + new ICondition.Not<ISubTagContainer>(SubTag.PEARL), + new ICondition.Not<ISubTagContainer>(SubTag.MAGICAL)); + gemFlawless.mCondition = new ICondition.And<ISubTagContainer>( + SubTag.TRANSPARENT, + SubTag.CRYSTAL, + new ICondition.Not<ISubTagContainer>(SubTag.QUARTZ), + new ICondition.Not<ISubTagContainer>(SubTag.PEARL), + new ICondition.Not<ISubTagContainer>(SubTag.MAGICAL)); + gemExquisite.mCondition = new ICondition.And<ISubTagContainer>( + SubTag.TRANSPARENT, + SubTag.CRYSTAL, + new ICondition.Not<ISubTagContainer>(SubTag.QUARTZ), + new ICondition.Not<ISubTagContainer>(SubTag.PEARL), + new ICondition.Not<ISubTagContainer>(SubTag.MAGICAL)); - lens.mCondition = new ICondition.Or<ISubTagContainer>(SubTag.MAGICAL, new ICondition.And<ISubTagContainer>(SubTag.TRANSPARENT, SubTag.HAS_COLOR)); + lens.mCondition = new ICondition.Or<ISubTagContainer>( + SubTag.MAGICAL, new ICondition.And<ISubTagContainer>(SubTag.TRANSPARENT, SubTag.HAS_COLOR)); - plateDouble.mCondition = new ICondition.Or<ISubTagContainer>(SubTag.PAPER, new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING)); - plateTriple.mCondition = new ICondition.Or<ISubTagContainer>(SubTag.PAPER, new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING)); - plateQuadruple.mCondition = new ICondition.Or<ISubTagContainer>(SubTag.PAPER, new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING)); - plateQuintuple.mCondition = new ICondition.Or<ISubTagContainer>(SubTag.PAPER, new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING)); + plateDouble.mCondition = new ICondition.Or<ISubTagContainer>( + SubTag.PAPER, new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING)); + plateTriple.mCondition = new ICondition.Or<ISubTagContainer>( + SubTag.PAPER, new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING)); + plateQuadruple.mCondition = new ICondition.Or<ISubTagContainer>( + SubTag.PAPER, new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING)); + plateQuintuple.mCondition = new ICondition.Or<ISubTagContainer>( + SubTag.PAPER, new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING)); plateDense.mCondition = new ICondition.Not<ISubTagContainer>(SubTag.NO_SMASHING); @@ -523,7 +3414,7 @@ public enum OrePrefixes { wireFine.mCondition = SubTag.METAL; - //----- + // ----- pipeRestrictiveTiny.mSecondaryMaterial = new MaterialStack(Materials.Steel, ring.mMaterialAmount); pipeRestrictiveSmall.mSecondaryMaterial = new MaterialStack(Materials.Steel, ring.mMaterialAmount * 2); @@ -538,7 +3429,8 @@ public enum OrePrefixes { cableGt01.mSecondaryMaterial = new MaterialStack(Materials.Rubber, plate.mMaterialAmount); bucket.mSecondaryMaterial = new MaterialStack(Materials.Iron, ingot.mMaterialAmount * 3); bucketClay.mSecondaryMaterial = new MaterialStack(Materials.Clay, dust.mMaterialAmount * 5); - CELL_TYPES.forEach(prefix -> prefix.mSecondaryMaterial = new MaterialStack(Materials.Tin, plate.mMaterialAmount * 2)); + CELL_TYPES.forEach( + prefix -> prefix.mSecondaryMaterial = new MaterialStack(Materials.Tin, plate.mMaterialAmount * 2)); oreRedgranite.mSecondaryMaterial = new MaterialStack(Materials.GraniteRed, dust.mMaterialAmount); oreBlackgranite.mSecondaryMaterial = new MaterialStack(Materials.GraniteBlack, dust.mMaterialAmount); oreNetherrack.mSecondaryMaterial = new MaterialStack(Materials.Netherrack, dust.mMaterialAmount); @@ -555,8 +3447,10 @@ public enum OrePrefixes { ore.mSecondaryMaterial = new MaterialStack(Materials.Stone, dust.mMaterialAmount); crushed.mSecondaryMaterial = new MaterialStack(Materials.Stone, dust.mMaterialAmount); toolHeadDrill.mSecondaryMaterial = new MaterialStack(Materials.Steel, plate.mMaterialAmount * 4); - toolHeadChainsaw.mSecondaryMaterial = new MaterialStack(Materials.Steel, plate.mMaterialAmount * 4 + ring.mMaterialAmount * 2); - toolHeadWrench.mSecondaryMaterial = new MaterialStack(Materials.Steel, ring.mMaterialAmount + screw.mMaterialAmount * 2); + toolHeadChainsaw.mSecondaryMaterial = + new MaterialStack(Materials.Steel, plate.mMaterialAmount * 4 + ring.mMaterialAmount * 2); + toolHeadWrench.mSecondaryMaterial = + new MaterialStack(Materials.Steel, ring.mMaterialAmount + screw.mMaterialAmount * 2); arrowGtWood.mSecondaryMaterial = new MaterialStack(Materials.Wood, stick.mMaterialAmount); arrowGtPlastic.mSecondaryMaterial = new MaterialStack(Materials.Plastic, stick.mMaterialAmount); bulletGtSmall.mSecondaryMaterial = new MaterialStack(Materials.Brass, ingot.mMaterialAmount / 9); @@ -567,7 +3461,16 @@ public enum OrePrefixes { public final ArrayList<ItemStack> mPrefixedItems = new GT_ArrayList<>(false, 16); public final short mTextureIndex; public final String mRegularLocalName, mLocalizedMaterialPre, mLocalizedMaterialPost; - public final boolean mIsUsedForOreProcessing, mIsEnchantable, mIsUnificatable, mIsMaterialBased, mIsSelfReferencing, mIsContainer, mDontUnificateActively, mIsUsedForBlocks, mAllowNormalRecycling, mGenerateDefaultItem; + public final boolean mIsUsedForOreProcessing, + mIsEnchantable, + mIsUnificatable, + mIsMaterialBased, + mIsSelfReferencing, + mIsContainer, + mDontUnificateActively, + mIsUsedForBlocks, + mAllowNormalRecycling, + mGenerateDefaultItem; public final List<TC_AspectStack> mAspects = new ArrayList<TC_AspectStack>(); public final Collection<OrePrefixes> mFamiliarPrefixes = new HashSet<OrePrefixes>(); /** @@ -577,7 +3480,11 @@ public enum OrePrefixes { * Negative = Undefined Amount */ public final long mMaterialAmount; - public final Collection<Materials> mDisabledItems = new HashSet<Materials>(), mNotGeneratedItems = new HashSet<Materials>(), mIgnoredMaterials = new HashSet<Materials>(), mGeneratedItems = new HashSet<Materials>(); + + public final Collection<Materials> mDisabledItems = new HashSet<Materials>(), + mNotGeneratedItems = new HashSet<Materials>(), + mIgnoredMaterials = new HashSet<Materials>(), + mGeneratedItems = new HashSet<Materials>(); private final ArrayList<IOreRecipeRegistrator> mOreProcessing = new ArrayList<IOreRecipeRegistrator>(); public ItemStack mContainerItem = null; public ICondition<ISubTagContainer> mCondition = null; @@ -586,13 +3493,83 @@ public enum OrePrefixes { public OrePrefixes mPrefixInto = this; public float mHeatDamage = 0.0F; // Negative for Frost Damage private final GT_HashSet<GT_ItemStack2> mContainsTestCache = new GT_HashSet<>(512, 0.5f); - public static List<OrePrefixes> mPreventableComponents = new LinkedList<>(Arrays.asList(OrePrefixes.gem, OrePrefixes.ingotHot, OrePrefixes.ingotDouble, OrePrefixes.ingotTriple, OrePrefixes.ingotQuadruple, OrePrefixes.ingotQuintuple, OrePrefixes.plate, OrePrefixes.plateDouble, OrePrefixes.plateTriple, OrePrefixes.plateQuadruple, OrePrefixes.plateQuintuple, OrePrefixes.plateDense, OrePrefixes.stick, OrePrefixes.round, OrePrefixes.bolt, OrePrefixes.screw, OrePrefixes.ring, OrePrefixes.foil, OrePrefixes.toolHeadSword, OrePrefixes.toolHeadPickaxe, OrePrefixes.toolHeadShovel, OrePrefixes.toolHeadAxe, OrePrefixes.toolHeadHoe, OrePrefixes.toolHeadHammer, OrePrefixes.toolHeadFile, OrePrefixes.toolHeadSaw, OrePrefixes.toolHeadDrill, OrePrefixes.toolHeadChainsaw, OrePrefixes.toolHeadWrench, OrePrefixes.toolHeadUniversalSpade, OrePrefixes.toolHeadSense, OrePrefixes.toolHeadPlow, OrePrefixes.toolHeadArrow, OrePrefixes.toolHeadBuzzSaw, OrePrefixes.turbineBlade, OrePrefixes.wireFine, OrePrefixes.gearGtSmall, OrePrefixes.rotor, OrePrefixes.stickLong, OrePrefixes.springSmall, OrePrefixes.spring, OrePrefixes.arrowGtWood, OrePrefixes.arrowGtPlastic, OrePrefixes.gemChipped, OrePrefixes.gemFlawed, OrePrefixes.gemFlawless, OrePrefixes.gemExquisite, OrePrefixes.gearGt, OrePrefixes.crateGtDust, OrePrefixes.crateGtIngot, OrePrefixes.crateGtGem, OrePrefixes.crateGtPlate, OrePrefixes.itemCasing)); + public static List<OrePrefixes> mPreventableComponents = new LinkedList<>(Arrays.asList( + OrePrefixes.gem, + OrePrefixes.ingotHot, + OrePrefixes.ingotDouble, + OrePrefixes.ingotTriple, + OrePrefixes.ingotQuadruple, + OrePrefixes.ingotQuintuple, + OrePrefixes.plate, + OrePrefixes.plateDouble, + OrePrefixes.plateTriple, + OrePrefixes.plateQuadruple, + OrePrefixes.plateQuintuple, + OrePrefixes.plateDense, + OrePrefixes.stick, + OrePrefixes.round, + OrePrefixes.bolt, + OrePrefixes.screw, + OrePrefixes.ring, + OrePrefixes.foil, + OrePrefixes.toolHeadSword, + OrePrefixes.toolHeadPickaxe, + OrePrefixes.toolHeadShovel, + OrePrefixes.toolHeadAxe, + OrePrefixes.toolHeadHoe, + OrePrefixes.toolHeadHammer, + OrePrefixes.toolHeadFile, + OrePrefixes.toolHeadSaw, + OrePrefixes.toolHeadDrill, + OrePrefixes.toolHeadChainsaw, + OrePrefixes.toolHeadWrench, + OrePrefixes.toolHeadUniversalSpade, + OrePrefixes.toolHeadSense, + OrePrefixes.toolHeadPlow, + OrePrefixes.toolHeadArrow, + OrePrefixes.toolHeadBuzzSaw, + OrePrefixes.turbineBlade, + OrePrefixes.wireFine, + OrePrefixes.gearGtSmall, + OrePrefixes.rotor, + OrePrefixes.stickLong, + OrePrefixes.springSmall, + OrePrefixes.spring, + OrePrefixes.arrowGtWood, + OrePrefixes.arrowGtPlastic, + OrePrefixes.gemChipped, + OrePrefixes.gemFlawed, + OrePrefixes.gemFlawless, + OrePrefixes.gemExquisite, + OrePrefixes.gearGt, + OrePrefixes.crateGtDust, + OrePrefixes.crateGtIngot, + OrePrefixes.crateGtGem, + OrePrefixes.crateGtPlate, + OrePrefixes.itemCasing)); /** * Yes this Value can be changed to add Bits for the MetaGenerated-Item-Check. */ public int mMaterialGenerationBits = 0; - OrePrefixes(String aRegularLocalName, String aLocalizedMaterialPre, String aLocalizedMaterialPost, boolean aIsUnificatable, boolean aIsMaterialBased, boolean aIsSelfReferencing, boolean aIsContainer, boolean aDontUnificateActively, boolean aIsUsedForBlocks, boolean aAllowNormalRecycling, boolean aGenerateDefaultItem, boolean aIsEnchantable, boolean aIsUsedForOreProcessing, int aMaterialGenerationBits, long aMaterialAmount, int aDefaultStackSize, int aTextureindex) { + OrePrefixes( + String aRegularLocalName, + String aLocalizedMaterialPre, + String aLocalizedMaterialPost, + boolean aIsUnificatable, + boolean aIsMaterialBased, + boolean aIsSelfReferencing, + boolean aIsContainer, + boolean aDontUnificateActively, + boolean aIsUsedForBlocks, + boolean aAllowNormalRecycling, + boolean aGenerateDefaultItem, + boolean aIsEnchantable, + boolean aIsUsedForOreProcessing, + int aMaterialGenerationBits, + long aMaterialAmount, + int aDefaultStackSize, + int aTextureindex) { mIsUnificatable = aIsUnificatable; mIsMaterialBased = aIsMaterialBased; mIsSelfReferencing = aIsSelfReferencing; @@ -649,46 +3626,80 @@ public enum OrePrefixes { public static void initMaterialComponents() { boolean enablePerItemSettings = GregTech_API.sMaterialComponents.get("general", "enablePerItemSettings", false); - boolean enableUnusedIngotHot = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedIngotHot", false); - boolean enableUnusedPlates = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedPlates", false); - boolean enableUnusedDoubleIngots = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedDoubleIngots", false); - boolean enableUnusedTripleIngots = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedTripleIngots", false); - boolean enableUnusedQuadIngots = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedQuadIngots", false); - boolean enableUnusedQuinIngots = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedQuinIngots", false); - boolean enableUnusedDoublePlates = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedDoublePlates", false); - boolean enableUnusedTriplePlates = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedTriplePlates", false); - boolean enableUnusedQuadPlates = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedQuadPlates", false); - boolean enableUnusedQuinPlates = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedQuinPlates", false); - boolean enableUnusedDensePlates = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedDensePlates", false); - boolean enableUnusedGears = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedGears", false); - boolean enableUnusedSmallGears = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedSmallGears", false); - boolean enableUnusedRings = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedRings", false); - boolean enableUnusedSprings = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedSprings", false); - boolean enableUnusedSmallSprings = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedSmallSprings", false); - boolean enableUnusedRounds = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedRounds", false); - boolean enableUnusedRotors = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedRotors", false); - boolean enableUnusedFineWires = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedFineWires", false); + boolean enableUnusedIngotHot = + GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedIngotHot", false); + boolean enableUnusedPlates = + GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedPlates", false); + boolean enableUnusedDoubleIngots = + GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedDoubleIngots", false); + boolean enableUnusedTripleIngots = + GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedTripleIngots", false); + boolean enableUnusedQuadIngots = + GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedQuadIngots", false); + boolean enableUnusedQuinIngots = + GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedQuinIngots", false); + boolean enableUnusedDoublePlates = + GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedDoublePlates", false); + boolean enableUnusedTriplePlates = + GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedTriplePlates", false); + boolean enableUnusedQuadPlates = + GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedQuadPlates", false); + boolean enableUnusedQuinPlates = + GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedQuinPlates", false); + boolean enableUnusedDensePlates = + GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedDensePlates", false); + boolean enableUnusedGears = + GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedGears", false); + boolean enableUnusedSmallGears = + GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedSmallGears", false); + boolean enableUnusedRings = + GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedRings", false); + boolean enableUnusedSprings = + GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedSprings", false); + boolean enableUnusedSmallSprings = + GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedSmallSprings", false); + boolean enableUnusedRounds = + GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedRounds", false); + boolean enableUnusedRotors = + GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedRotors", false); + boolean enableUnusedFineWires = + GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedFineWires", false); boolean enableUnusedFoil = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedFoil", false); - boolean enableUnusedArrows = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedArrowHeads", false); - boolean enableUnusedCrates = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedCrates", false); - boolean enableUnusedBolts = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedBolts", false); - boolean enableUnusedScrews = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedScrews", false); + boolean enableUnusedArrows = + GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedArrowHeads", false); + boolean enableUnusedCrates = + GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedCrates", false); + boolean enableUnusedBolts = + GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedBolts", false); + boolean enableUnusedScrews = + GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedScrews", false); boolean enableUnusedRods = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedRods", false); - boolean enableUnusedLongRods = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedLongRods", false); + boolean enableUnusedLongRods = + GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedLongRods", false); boolean enableUnusedGems = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedGems", false); - boolean enableUnusedItemCasing = GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedItemCasing", false); + boolean enableUnusedItemCasing = + GregTech_API.sMaterialComponents.get("globalcomponents", "enableUnusedItemCasing", false); - //TODO possibly use OrePrefix mNotGeneratedItems/mGeneratedItems instead of a static List for every material instance? - //TODO Make sure stuff like gem plates / standard plates / paper plates all generate with the current condition + // TODO possibly use OrePrefix mNotGeneratedItems/mGeneratedItems instead of a static List for every material + // instance? + // TODO Make sure stuff like gem plates / standard plates / paper plates all generate with the current condition for (Materials aMaterial : Materials.values()) { if (aMaterial.mMetaItemSubID > 0) { - if (aMaterial.mBlastFurnaceTemp <= 1750) ingotHot.mDisabledItems.add(aMaterial); //Moved HotIngot code from GT_MetaGenerated_Item_01 so all this is in once place + if (aMaterial.mBlastFurnaceTemp <= 1750) + ingotHot.mDisabledItems.add( + aMaterial); // Moved HotIngot code from GT_MetaGenerated_Item_01 so all this is in once + // place if (!enableUnusedSprings && (aMaterial != Materials.Titanium)) spring.mDisabledItems.add(aMaterial); if (!enableUnusedSmallSprings) springSmall.mDisabledItems.add(aMaterial); - if (!enableUnusedRounds && !(aMaterial == Materials.HSSE || aMaterial == Materials.Neutronium || aMaterial == Materials.HSSG)) round.mDisabledItems.add(aMaterial); + if (!enableUnusedRounds + && !(aMaterial == Materials.HSSE + || aMaterial == Materials.Neutronium + || aMaterial == Materials.HSSG)) round.mDisabledItems.add(aMaterial); if (!enableUnusedCrates) { - if (!(aMaterial == Materials.DamascusSteel || aMaterial == Materials.Steel || aMaterial == Materials.Bronze || aMaterial == Materials.Manganese)) - crateGtIngot.mDisabledItems.add(aMaterial); + if (!(aMaterial == Materials.DamascusSteel + || aMaterial == Materials.Steel + || aMaterial == Materials.Bronze + || aMaterial == Materials.Manganese)) crateGtIngot.mDisabledItems.add(aMaterial); if (!(aMaterial == Materials.Neodymium || aMaterial == Materials.Chrome)) crateGtDust.mDisabledItems.add(aMaterial); crateGtGem.mDisabledItems.add(aMaterial); @@ -700,98 +3711,283 @@ public enum OrePrefixes { if (!(aMaterial == Materials.DamascusSteel || aMaterial == Materials.SterlingSilver)) arrowGtWood.mDisabledItems.add(aMaterial); } - //Plates - if (!enableUnusedPlates && ((aMaterial.mTypes & 0x40) == 0) && !(aMaterial == Materials.Silicon || aMaterial == Materials.Zinc || - aMaterial == Materials.Europium || aMaterial == Materials.Americium || aMaterial == Materials.RedAlloy || aMaterial == Materials.SolderingAlloy || aMaterial == Materials.BatteryAlloy || - aMaterial == Materials.AnnealedCopper || aMaterial == Materials.Firestone || aMaterial == Materials.VanadiumGallium || aMaterial == Materials.YttriumBariumCuprate || - aMaterial == Materials.NiobiumTitanium || aMaterial == Materials.CertusQuartz || aMaterial == Materials.NetherQuartz || aMaterial == Materials.Lazurite || aMaterial == Materials.Lapis || - aMaterial == Materials.Paper || aMaterial == Materials.Jasper || aMaterial == Materials.Dilithium || aMaterial == Materials.Forcicium || aMaterial == Materials.Forcillium || - aMaterial == Materials.EnderPearl || aMaterial == Materials.EnderEye || aMaterial == Materials.Glass || aMaterial == Materials.Copper || aMaterial == Materials.Tin || aMaterial == Materials.Redstone || - aMaterial == Materials.Sodalite || aMaterial == Materials.Gallium || aMaterial == Materials.GalliumArsenide || aMaterial == Materials.IndiumGalliumPhosphide)) - plate.mDisabledItems.add(aMaterial); + // Plates + if (!enableUnusedPlates + && ((aMaterial.mTypes & 0x40) == 0) + && !(aMaterial == Materials.Silicon + || aMaterial == Materials.Zinc + || aMaterial == Materials.Europium + || aMaterial == Materials.Americium + || aMaterial == Materials.RedAlloy + || aMaterial == Materials.SolderingAlloy + || aMaterial == Materials.BatteryAlloy + || aMaterial == Materials.AnnealedCopper + || aMaterial == Materials.Firestone + || aMaterial == Materials.VanadiumGallium + || aMaterial == Materials.YttriumBariumCuprate + || aMaterial == Materials.NiobiumTitanium + || aMaterial == Materials.CertusQuartz + || aMaterial == Materials.NetherQuartz + || aMaterial == Materials.Lazurite + || aMaterial == Materials.Lapis + || aMaterial == Materials.Paper + || aMaterial == Materials.Jasper + || aMaterial == Materials.Dilithium + || aMaterial == Materials.Forcicium + || aMaterial == Materials.Forcillium + || aMaterial == Materials.EnderPearl + || aMaterial == Materials.EnderEye + || aMaterial == Materials.Glass + || aMaterial == Materials.Copper + || aMaterial == Materials.Tin + || aMaterial == Materials.Redstone + || aMaterial == Materials.Sodalite + || aMaterial == Materials.Gallium + || aMaterial == Materials.GalliumArsenide + || aMaterial == Materials.IndiumGalliumPhosphide)) plate.mDisabledItems.add(aMaterial); if (!enableUnusedIngotHot) { ingotHot.mDisabledItems.add(aMaterial); } - //Ingot/Plate Storage + // Ingot/Plate Storage if (!enableUnusedDoubleIngots) ingotDouble.mDisabledItems.add(aMaterial); if (!enableUnusedTripleIngots) ingotTriple.mDisabledItems.add(aMaterial); if (!enableUnusedQuadIngots) ingotQuadruple.mDisabledItems.add(aMaterial); if (!enableUnusedQuinIngots) ingotQuintuple.mDisabledItems.add(aMaterial); - if (!enableUnusedDoublePlates && ((aMaterial.mTypes & 0x40) == 0) && !(aMaterial == Materials.Paper || aMaterial == Materials.Aluminium || aMaterial == Materials.Steel || aMaterial == Materials.TungstenSteel)) - plateDouble.mDisabledItems.add(aMaterial); - if (!enableUnusedTriplePlates && !(aMaterial == Materials.Paper)) plateTriple.mDisabledItems.add(aMaterial); - if (!enableUnusedQuadPlates && !(aMaterial == Materials.Paper)) plateQuadruple.mDisabledItems.add(aMaterial); - if (!enableUnusedQuinPlates && !(aMaterial == Materials.Paper)) plateQuintuple.mDisabledItems.add(aMaterial); - if (!(enableUnusedDensePlates || GregTech_API.mGTPlusPlus) && !(aMaterial == Materials.Iron || aMaterial == Materials.Copper || aMaterial == Materials.Lead || aMaterial == Materials.Paper || aMaterial == Materials.Thaumium || aMaterial == Materials.Titanium)) - plateDense.mDisabledItems.add(aMaterial); - //Rotors - if (!enableUnusedRotors && !(aMaterial == Materials.Titanium || aMaterial == Materials.Chrome || aMaterial == Materials.Tin || aMaterial == Materials.Osmium || - aMaterial == Materials.Iridium || aMaterial == Materials.Bronze || aMaterial == Materials.Steel || aMaterial == Materials.StainlessSteel || - aMaterial == Materials.TungstenSteel || aMaterial == Materials.HSSG || aMaterial == Materials.HSSE || aMaterial == Materials.Neutronium)) - rotor.mDisabledItems.add(aMaterial); - //Rings - if (!enableUnusedRings && !(aMaterial == Materials.Titanium || aMaterial == Materials.Chrome || aMaterial == Materials.Iron || aMaterial == Materials.Tin || - aMaterial == Materials.Osmium || aMaterial == Materials.Iridium || aMaterial == Materials.Bronze || aMaterial == Materials.WroughtIron || - aMaterial == Materials.Steel || aMaterial == Materials.StainlessSteel || aMaterial == Materials.PigIron || aMaterial == Materials.TungstenSteel || - aMaterial == Materials.Rubber || aMaterial == Materials.HSSE || aMaterial == Materials.Neutronium || aMaterial == Materials.HSSG || aMaterial == Materials.Aluminium || - aMaterial == Materials.Invar || aMaterial == Materials.Brass || aMaterial == Materials.Paper || aMaterial == Materials.Silicone || aMaterial == Materials.StyreneButadieneRubber)) - ring.mDisabledItems.add(aMaterial); - //Foil - if (!enableUnusedFoil && !(aMaterial == Materials.Zinc || aMaterial == Materials.Aluminium || aMaterial == Materials.Silicon || aMaterial == Materials.Gold || - aMaterial == Materials.Electrum || aMaterial == Materials.Platinum || aMaterial == Materials.Osmiridium || aMaterial == Materials.Osmium || - aMaterial == Materials.AnnealedCopper || aMaterial == Materials.Steel || aMaterial == Materials.Copper || aMaterial == Materials.YttriumBariumCuprate - || aMaterial == Materials.VanadiumGallium || aMaterial == Materials.NiobiumTitanium || aMaterial == Materials.Naquadah || aMaterial == Materials.Manganese || - aMaterial == Materials.Plastic || aMaterial == Materials.Silicone || aMaterial == Materials.PolyvinylChloride || aMaterial == Materials.PolyphenyleneSulfide || - aMaterial == Materials.Nichrome || aMaterial == Materials.BlackSteel || aMaterial == Materials.Titanium || aMaterial == Materials.TungstenSteel || - aMaterial == Materials.Tungsten || aMaterial == Materials.HSSG || aMaterial == Materials.NaquadahAlloy || aMaterial == Materials.Duranium || - aMaterial == Materials.Europium || aMaterial == Materials.Bedrockium)) - - foil.mDisabledItems.add(aMaterial); - //Fine Wire - if (!enableUnusedFineWires && !(aMaterial == Materials.Steel || aMaterial == Materials.AnnealedCopper || aMaterial == Materials.Platinum || aMaterial == Materials.Osmium || - aMaterial == Materials.Tin || aMaterial == Materials.Lead || aMaterial == Materials.SolderingAlloy || aMaterial == Materials.Copper || aMaterial == Materials.Electrum || - aMaterial == Materials.Gold || aMaterial == Materials.RedAlloy || aMaterial == Materials.Graphene || aMaterial == Materials.NiobiumTitanium || aMaterial == Materials.YttriumBariumCuprate || aMaterial == Materials.BloodInfusedIron)) - wireFine.mDisabledItems.add(aMaterial); - //Gears - if (!enableUnusedGears && !(aMaterial == Materials.Aluminium || aMaterial == Materials.Titanium || aMaterial == Materials.Iron || aMaterial == Materials.Copper || - aMaterial == Materials.Tin || aMaterial == Materials.Gold || aMaterial == Materials.Stone || aMaterial == Materials.Bronze || - aMaterial == Materials.Steel || aMaterial == Materials.StainlessSteel || aMaterial == Materials.TungstenSteel || aMaterial == Materials.CobaltBrass || - aMaterial == Materials.Diamond || aMaterial == Materials.Wood || aMaterial == Materials.HSSG || aMaterial == Materials.HSSE || aMaterial == Materials.Neutronium)) - gearGt.mDisabledItems.add(aMaterial); - //Small Gears - if (!enableUnusedSmallGears && !(aMaterial == Materials.Aluminium || aMaterial == Materials.Titanium || aMaterial == Materials.Steel || aMaterial == Materials.StainlessSteel || - aMaterial == Materials.TungstenSteel || aMaterial == Materials.HSSG || aMaterial == Materials.HSSE || aMaterial == Materials.Neutronium || aMaterial == Materials.VanadiumGallium || aMaterial == Materials.Naquadah)) - gearGtSmall.mDisabledItems.add(aMaterial); - //Bolts - if (!enableUnusedBolts && ((aMaterial.mTypes & 0x40) == 0) && !(aMaterial == Materials.Titanium || aMaterial == Materials.Chrome || aMaterial == Materials.Iron || - aMaterial == Materials.Tin || aMaterial == Materials.Osmium || aMaterial == Materials.Iridium || aMaterial == Materials.Neutronium || - aMaterial == Materials.Bronze || aMaterial == Materials.WroughtIron || aMaterial == Materials.Steel || aMaterial == Materials.StainlessSteel || - aMaterial == Materials.PigIron || aMaterial == Materials.TungstenSteel || aMaterial == Materials.Tungsten || aMaterial == Materials.HSSE || aMaterial == Materials.HSSG)) - bolt.mDisabledItems.add(aMaterial); - //Screws - if (!enableUnusedScrews && ((aMaterial.mTypes & 0x40) == 0) && !(aMaterial == Materials.Titanium || aMaterial == Materials.Chrome || aMaterial == Materials.Iron || - aMaterial == Materials.Tin || aMaterial == Materials.Osmium || aMaterial == Materials.Iridium || aMaterial == Materials.Neutronium || - aMaterial == Materials.Bronze || aMaterial == Materials.WroughtIron || aMaterial == Materials.Steel || aMaterial == Materials.StainlessSteel || - aMaterial == Materials.PigIron || aMaterial == Materials.TungstenSteel || aMaterial == Materials.HSSE || aMaterial == Materials.HSSG)) - screw.mDisabledItems.add(aMaterial); - //Rods - if (!enableUnusedRods && ((aMaterial.mTypes & 0x40) == 0) && !(aMaterial == Materials.Titanium || aMaterial == Materials.Chrome || aMaterial == Materials.Iron || - aMaterial == Materials.Tin || aMaterial == Materials.Osmium || aMaterial == Materials.Iridium || aMaterial == Materials.Neutronium || - aMaterial == Materials.Bronze || aMaterial == Materials.WroughtIron || aMaterial == Materials.Steel || aMaterial == Materials.StainlessSteel || - aMaterial == Materials.PigIron || aMaterial == Materials.TungstenSteel || aMaterial == Materials.HSSE || aMaterial == Materials.HSSG || - aMaterial == Materials.Aluminium || aMaterial == Materials.Copper || aMaterial == Materials.Neodymium || aMaterial == Materials.Europium || - aMaterial == Materials.Platinum || aMaterial == Materials.Gold || aMaterial == Materials.Uranium235 || aMaterial == Materials.Plutonium241 || - aMaterial == Materials.Americium || aMaterial == Materials.Neutronium || aMaterial == Materials.Bronze || aMaterial == Materials.Brass || - aMaterial == Materials.Electrum || aMaterial == Materials.NaquadahEnriched || aMaterial == Materials.CobaltBrass || aMaterial == Materials.IronMagnetic || - aMaterial == Materials.SteelMagnetic || aMaterial == Materials.NeodymiumMagnetic || aMaterial == Materials.Samarium || aMaterial == Materials.SamariumMagnetic || aMaterial == Materials.VanadiumGallium || aMaterial == Materials.Diamond || - aMaterial == Materials.Wood || aMaterial == Materials.Plastic || aMaterial == Materials.Lead || aMaterial == Materials.SolderingAlloy || aMaterial == Materials.Lapis || - aMaterial == Materials.Lazurite || aMaterial == Materials.Sodalite|| aMaterial == Materials.PolyvinylChloride)) - stick.mDisabledItems.add(aMaterial); - //Long Rods - if (!enableUnusedLongRods && ((aMaterial.mTypes & 0x40) == 0) && !(aMaterial == Materials.Titanium || aMaterial == Materials.NeodymiumMagnetic || aMaterial == Materials.SamariumMagnetic || aMaterial == Materials.HSSG || aMaterial == Materials.HSSE || - aMaterial == Materials.Neutronium || aMaterial == Materials.Americium || aMaterial == Materials.WroughtIron || aMaterial == Materials.Magnalium || - aMaterial == Materials.TungstenSteel)) - stickLong.mDisabledItems.add(aMaterial); + if (!enableUnusedDoublePlates + && ((aMaterial.mTypes & 0x40) == 0) + && !(aMaterial == Materials.Paper + || aMaterial == Materials.Aluminium + || aMaterial == Materials.Steel + || aMaterial == Materials.TungstenSteel)) plateDouble.mDisabledItems.add(aMaterial); + if (!enableUnusedTriplePlates && !(aMaterial == Materials.Paper)) + plateTriple.mDisabledItems.add(aMaterial); + if (!enableUnusedQuadPlates && !(aMaterial == Materials.Paper)) + plateQuadruple.mDisabledItems.add(aMaterial); + if (!enableUnusedQuinPlates && !(aMaterial == Materials.Paper)) + plateQuintuple.mDisabledItems.add(aMaterial); + if (!(enableUnusedDensePlates || GregTech_API.mGTPlusPlus) + && !(aMaterial == Materials.Iron + || aMaterial == Materials.Copper + || aMaterial == Materials.Lead + || aMaterial == Materials.Paper + || aMaterial == Materials.Thaumium + || aMaterial == Materials.Titanium)) plateDense.mDisabledItems.add(aMaterial); + // Rotors + if (!enableUnusedRotors + && !(aMaterial == Materials.Titanium + || aMaterial == Materials.Chrome + || aMaterial == Materials.Tin + || aMaterial == Materials.Osmium + || aMaterial == Materials.Iridium + || aMaterial == Materials.Bronze + || aMaterial == Materials.Steel + || aMaterial == Materials.StainlessSteel + || aMaterial == Materials.TungstenSteel + || aMaterial == Materials.HSSG + || aMaterial == Materials.HSSE + || aMaterial == Materials.Neutronium)) rotor.mDisabledItems.add(aMaterial); + // Rings + if (!enableUnusedRings + && !(aMaterial == Materials.Titanium + || aMaterial == Materials.Chrome + || aMaterial == Materials.Iron + || aMaterial == Materials.Tin + || aMaterial == Materials.Osmium + || aMaterial == Materials.Iridium + || aMaterial == Materials.Bronze + || aMaterial == Materials.WroughtIron + || aMaterial == Materials.Steel + || aMaterial == Materials.StainlessSteel + || aMaterial == Materials.PigIron + || aMaterial == Materials.TungstenSteel + || aMaterial == Materials.Rubber + || aMaterial == Materials.HSSE + || aMaterial == Materials.Neutronium + || aMaterial == Materials.HSSG + || aMaterial == Materials.Aluminium + || aMaterial == Materials.Invar + || aMaterial == Materials.Brass + || aMaterial == Materials.Paper + || aMaterial == Materials.Silicone + || aMaterial == Materials.StyreneButadieneRubber)) ring.mDisabledItems.add(aMaterial); + // Foil + if (!enableUnusedFoil + && !(aMaterial == Materials.Zinc + || aMaterial == Materials.Aluminium + || aMaterial == Materials.Silicon + || aMaterial == Materials.Gold + || aMaterial == Materials.Electrum + || aMaterial == Materials.Platinum + || aMaterial == Materials.Osmiridium + || aMaterial == Materials.Osmium + || aMaterial == Materials.AnnealedCopper + || aMaterial == Materials.Steel + || aMaterial == Materials.Copper + || aMaterial == Materials.YttriumBariumCuprate + || aMaterial == Materials.VanadiumGallium + || aMaterial == Materials.NiobiumTitanium + || aMaterial == Materials.Naquadah + || aMaterial == Materials.Manganese + || aMaterial == Materials.Plastic + || aMaterial == Materials.Silicone + || aMaterial == Materials.PolyvinylChloride + || aMaterial == Materials.PolyphenyleneSulfide + || aMaterial == Materials.Nichrome + || aMaterial == Materials.BlackSteel + || aMaterial == Materials.Titanium + || aMaterial == Materials.TungstenSteel + || aMaterial == Materials.Tungsten + || aMaterial == Materials.HSSG + || aMaterial == Materials.NaquadahAlloy + || aMaterial == Materials.Duranium + || aMaterial == Materials.Europium + || aMaterial == Materials.Bedrockium)) foil.mDisabledItems.add(aMaterial); + // Fine Wire + if (!enableUnusedFineWires + && !(aMaterial == Materials.Steel + || aMaterial == Materials.AnnealedCopper + || aMaterial == Materials.Platinum + || aMaterial == Materials.Osmium + || aMaterial == Materials.Tin + || aMaterial == Materials.Lead + || aMaterial == Materials.SolderingAlloy + || aMaterial == Materials.Copper + || aMaterial == Materials.Electrum + || aMaterial == Materials.Gold + || aMaterial == Materials.RedAlloy + || aMaterial == Materials.Graphene + || aMaterial == Materials.NiobiumTitanium + || aMaterial == Materials.YttriumBariumCuprate + || aMaterial == Materials.BloodInfusedIron)) wireFine.mDisabledItems.add(aMaterial); + // Gears + if (!enableUnusedGears + && !(aMaterial == Materials.Aluminium + || aMaterial == Materials.Titanium + || aMaterial == Materials.Iron + || aMaterial == Materials.Copper + || aMaterial == Materials.Tin + || aMaterial == Materials.Gold + || aMaterial == Materials.Stone + || aMaterial == Materials.Bronze + || aMaterial == Materials.Steel + || aMaterial == Materials.StainlessSteel + || aMaterial == Materials.TungstenSteel + || aMaterial == Materials.CobaltBrass + || aMaterial == Materials.Diamond + || aMaterial == Materials.Wood + || aMaterial == Materials.HSSG + || aMaterial == Materials.HSSE + || aMaterial == Materials.Neutronium)) gearGt.mDisabledItems.add(aMaterial); + // Small Gears + if (!enableUnusedSmallGears + && !(aMaterial == Materials.Aluminium + || aMaterial == Materials.Titanium + || aMaterial == Materials.Steel + || aMaterial == Materials.StainlessSteel + || aMaterial == Materials.TungstenSteel + || aMaterial == Materials.HSSG + || aMaterial == Materials.HSSE + || aMaterial == Materials.Neutronium + || aMaterial == Materials.VanadiumGallium + || aMaterial == Materials.Naquadah)) gearGtSmall.mDisabledItems.add(aMaterial); + // Bolts + if (!enableUnusedBolts + && ((aMaterial.mTypes & 0x40) == 0) + && !(aMaterial == Materials.Titanium + || aMaterial == Materials.Chrome + || aMaterial == Materials.Iron + || aMaterial == Materials.Tin + || aMaterial == Materials.Osmium + || aMaterial == Materials.Iridium + || aMaterial == Materials.Neutronium + || aMaterial == Materials.Bronze + || aMaterial == Materials.WroughtIron + || aMaterial == Materials.Steel + || aMaterial == Materials.StainlessSteel + || aMaterial == Materials.PigIron + || aMaterial == Materials.TungstenSteel + || aMaterial == Materials.Tungsten + || aMaterial == Materials.HSSE + || aMaterial == Materials.HSSG)) bolt.mDisabledItems.add(aMaterial); + // Screws + if (!enableUnusedScrews + && ((aMaterial.mTypes & 0x40) == 0) + && !(aMaterial == Materials.Titanium + || aMaterial == Materials.Chrome + || aMaterial == Materials.Iron + || aMaterial == Materials.Tin + || aMaterial == Materials.Osmium + || aMaterial == Materials.Iridium + || aMaterial == Materials.Neutronium + || aMaterial == Materials.Bronze + || aMaterial == Materials.WroughtIron + || aMaterial == Materials.Steel + || aMaterial == Materials.StainlessSteel + || aMaterial == Materials.PigIron + || aMaterial == Materials.TungstenSteel + || aMaterial == Materials.HSSE + || aMaterial == Materials.HSSG)) screw.mDisabledItems.add(aMaterial); + // Rods + if (!enableUnusedRods + && ((aMaterial.mTypes & 0x40) == 0) + && !(aMaterial == Materials.Titanium + || aMaterial == Materials.Chrome + || aMaterial == Materials.Iron + || aMaterial == Materials.Tin + || aMaterial == Materials.Osmium + || aMaterial == Materials.Iridium + || aMaterial == Materials.Neutronium + || aMaterial == Materials.Bronze + || aMaterial == Materials.WroughtIron + || aMaterial == Materials.Steel + || aMaterial == Materials.StainlessSteel + || aMaterial == Materials.PigIron + || aMaterial == Materials.TungstenSteel + || aMaterial == Materials.HSSE + || aMaterial == Materials.HSSG + || aMaterial == Materials.Aluminium + || aMaterial == Materials.Copper + || aMaterial == Materials.Neodymium + || aMaterial == Materials.Europium + || aMaterial == Materials.Platinum + || aMaterial == Materials.Gold + || aMaterial == Materials.Uranium235 + || aMaterial == Materials.Plutonium241 + || aMaterial == Materials.Americium + || aMaterial == Materials.Neutronium + || aMaterial == Materials.Bronze + || aMaterial == Materials.Brass + || aMaterial == Materials.Electrum + || aMaterial == Materials.NaquadahEnriched + || aMaterial == Materials.CobaltBrass + || aMaterial == Materials.IronMagnetic + || aMaterial == Materials.SteelMagnetic + || aMaterial == Materials.NeodymiumMagnetic + || aMaterial == Materials.Samarium + || aMaterial == Materials.SamariumMagnetic + || aMaterial == Materials.VanadiumGallium + || aMaterial == Materials.Diamond + || aMaterial == Materials.Wood + || aMaterial == Materials.Plastic + || aMaterial == Materials.Lead + || aMaterial == Materials.SolderingAlloy + || aMaterial == Materials.Lapis + || aMaterial == Materials.Lazurite + || aMaterial == Materials.Sodalite + || aMaterial == Materials.PolyvinylChloride)) stick.mDisabledItems.add(aMaterial); + // Long Rods + if (!enableUnusedLongRods + && ((aMaterial.mTypes & 0x40) == 0) + && !(aMaterial == Materials.Titanium + || aMaterial == Materials.NeodymiumMagnetic + || aMaterial == Materials.SamariumMagnetic + || aMaterial == Materials.HSSG + || aMaterial == Materials.HSSE + || aMaterial == Materials.Neutronium + || aMaterial == Materials.Americium + || aMaterial == Materials.WroughtIron + || aMaterial == Materials.Magnalium + || aMaterial == Materials.TungstenSteel)) stickLong.mDisabledItems.add(aMaterial); if (!enableUnusedGems && ((aMaterial.mTypes & 0x04) == 0)) { gem.mDisabledItems.add(aMaterial); @@ -800,10 +3996,10 @@ public enum OrePrefixes { gemFlawed.mDisabledItems.add(aMaterial); gemExquisite.mDisabledItems.add(aMaterial); } - //itemCasing + // itemCasing if (!enableUnusedItemCasing) itemCasing.mDisabledItems.add(aMaterial); - } } + } for (IMaterialHandler aRegistrator : Materials.mMaterialHandlers) { aRegistrator.onComponentInit(); } @@ -814,13 +4010,18 @@ public enum OrePrefixes { } if (enablePerItemSettings) { StringBuilder aConfigPathSB = new StringBuilder(); - aConfigPathSB.append("materialcomponents.").append(aMaterial.mConfigSection).append(".").append(aMaterial.mName); + aConfigPathSB + .append("materialcomponents.") + .append(aMaterial.mConfigSection) + .append(".") + .append(aMaterial.mName); String aConfigPath = aConfigPathSB.toString(); for (OrePrefixes aPrefix : mPreventableComponents) { - boolean aEnableComponent = GregTech_API.sMaterialComponents.get(aConfigPath, aPrefix.toString(), !aPrefix.mDisabledItems.contains(aMaterial)); - if (!aEnableComponent) { //Disable component if false and is not already in disabled list + boolean aEnableComponent = GregTech_API.sMaterialComponents.get( + aConfigPath, aPrefix.toString(), !aPrefix.mDisabledItems.contains(aMaterial)); + if (!aEnableComponent) { // Disable component if false and is not already in disabled list aPrefix.disableComponent(aMaterial); - } else if (aEnableComponent) { //Enable component if true and is not already in enabled list + } else if (aEnableComponent) { // Enable component if true and is not already in enabled list aPrefix.enableComponent(aMaterial); } } @@ -842,8 +4043,8 @@ public enum OrePrefixes { for (OrePrefixes tPrefix : values()) if (aOre.startsWith(tPrefix.toString())) { if (tPrefix == oreNether && aOre.equals("oreNetherQuartz")) return ore; - if (tPrefix == oreNether && aOre.equals("oreNetherStar")) return ore; - if (tPrefix == oreBasalt && aOre.equals("oreBasalticMineralSand")) return ore; + if (tPrefix == oreNether && aOre.equals("oreNetherStar")) return ore; + if (tPrefix == oreBasalt && aOre.equals("oreBasalticMineralSand")) return ore; if (tPrefix == stickLong && aOre.equals("stickLongasssuperconductornameforuvwire")) return stick; if (tPrefix == stickLong && aOre.equals("stickLongasssuperconductornameforuhvwire")) return stick; return tPrefix; @@ -911,8 +4112,8 @@ public enum OrePrefixes { public boolean containsUnCached(ItemStack aStack) { // In case someone needs this - for (ItemStack tStack : mPrefixedItems){ - if (GT_Utility.areStacksEqual(aStack, tStack, !tStack.hasTagCompound())){ + for (ItemStack tStack : mPrefixedItems) { + if (GT_Utility.areStacksEqual(aStack, tStack, !tStack.hasTagCompound())) { return true; } } @@ -920,7 +4121,13 @@ public enum OrePrefixes { } public boolean doGenerateItem(Materials aMaterial) { - return aMaterial != null && aMaterial != Materials._NULL && ((aMaterial.mTypes & mMaterialGenerationBits) != 0 || mGeneratedItems.contains(aMaterial) /*|| mDynamicItems.contains(aMaterial)*/) && !mNotGeneratedItems.contains(aMaterial) && !mDisabledItems.contains(aMaterial) && (mCondition == null || mCondition.isTrue(aMaterial)); + return aMaterial != null + && aMaterial != Materials._NULL + && ((aMaterial.mTypes & mMaterialGenerationBits) != 0 + || mGeneratedItems.contains(aMaterial) /*|| mDynamicItems.contains(aMaterial)*/) + && !mNotGeneratedItems.contains(aMaterial) + && !mDisabledItems.contains(aMaterial) + && (mCondition == null || mCondition.isTrue(aMaterial)); } public boolean ignoreMaterials(Materials... aMaterials) { @@ -944,10 +4151,15 @@ public enum OrePrefixes { } public void processOre(Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - if (aMaterial != null && (aMaterial != Materials._NULL || mIsSelfReferencing || !mIsMaterialBased) && GT_Utility.isStackValid(aStack)) { - //if (Materials.mPreventableComponents.contains(this) && !this.mDynamicItems.contains(aMaterial)) return; + if (aMaterial != null + && (aMaterial != Materials._NULL || mIsSelfReferencing || !mIsMaterialBased) + && GT_Utility.isStackValid(aStack)) { + // if (Materials.mPreventableComponents.contains(this) && !this.mDynamicItems.contains(aMaterial)) return; for (IOreRecipeRegistrator tRegistrator : mOreProcessing) { - if (D2) GT_Log.ore.println("Processing '" + aOreDictName + "' with the Prefix '" + name() + "' and the Material '" + aMaterial.mName + "' at " + GT_Utility.getClassName(tRegistrator)); + if (D2) + GT_Log.ore.println( + "Processing '" + aOreDictName + "' with the Prefix '" + name() + "' and the Material '" + + aMaterial.mName + "' at " + GT_Utility.getClassName(tRegistrator)); tRegistrator.registerOre(this, aMaterial, aOreDictName, aModName, GT_Utility.copyAmount(1, aStack)); } } @@ -959,7 +4171,7 @@ public enum OrePrefixes { } public String getDefaultLocalNameForItem(Materials aMaterial) { - return aMaterial.getDefaultLocalizedNameForItem(getDefaultLocalNameFormatForItem(aMaterial)); + return aMaterial.getDefaultLocalizedNameForItem(getDefaultLocalNameFormatForItem(aMaterial)); } @SuppressWarnings("incomplete-switch") @@ -1038,12 +4250,18 @@ public enum OrePrefixes { case "Paper": if (name().startsWith("dust")) return mLocalizedMaterialPre + "Chad"; switch (this) { - case plate: return "Sheet of Paper"; - case plateDouble: return "Paperboard"; - case plateTriple: return "Carton"; - case plateQuadruple: return "Cardboard"; - case plateQuintuple: return "Thick Cardboard"; - case plateDense: return "Strong Cardboard"; + case plate: + return "Sheet of Paper"; + case plateDouble: + return "Paperboard"; + case plateTriple: + return "Carton"; + case plateQuadruple: + return "Cardboard"; + case plateQuintuple: + return "Thick Cardboard"; + case plateDense: + return "Strong Cardboard"; } break; case "MeatRaw": @@ -1096,10 +4314,8 @@ public enum OrePrefixes { case "InfusedWater": if (name().startsWith("gem")) return mLocalizedMaterialPre + "Shard of " + "%material"; if (name().startsWith("crystal")) return mLocalizedMaterialPre + "Shard of " + "%material"; - if (name().startsWith("plate")) - return mLocalizedMaterialPre + "%material" + " Crystal Plate"; - if (name().startsWith("dust")) - return mLocalizedMaterialPre + "%material" + " Crystal Powder"; + if (name().startsWith("plate")) return mLocalizedMaterialPre + "%material" + " Crystal Plate"; + if (name().startsWith("dust")) return mLocalizedMaterialPre + "%material" + " Crystal Powder"; switch (this) { case crushedCentrifuged: case crushedPurified: diff --git a/src/main/java/gregtech/api/enums/ParticleFX.java b/src/main/java/gregtech/api/enums/ParticleFX.java index c07b1303b3..985ef3e4a8 100644 --- a/src/main/java/gregtech/api/enums/ParticleFX.java +++ b/src/main/java/gregtech/api/enums/ParticleFX.java @@ -50,4 +50,3 @@ public enum ParticleFX { return this.identifier; } } - diff --git a/src/main/java/gregtech/api/enums/SoundResource.java b/src/main/java/gregtech/api/enums/SoundResource.java index d0bfdc6a6b..193aad3002 100644 --- a/src/main/java/gregtech/api/enums/SoundResource.java +++ b/src/main/java/gregtech/api/enums/SoundResource.java @@ -1,14 +1,13 @@ package gregtech.api.enums; -import com.google.common.collect.Maps; -import net.minecraft.util.ResourceLocation; +import static gregtech.api.enums.GT_Values.MOD_ID_IC2; +import com.google.common.collect.Maps; import java.util.EnumSet; import java.util.Locale; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; - -import static gregtech.api.enums.GT_Values.MOD_ID_IC2; +import net.minecraft.util.ResourceLocation; /** * Enumerates known sounds with id and resource-location @@ -17,7 +16,6 @@ import static gregtech.api.enums.GT_Values.MOD_ID_IC2; * a plausible yet unimplemented network packet weight optimization.</p> */ public enum SoundResource { - RANDOM_BREAK(0, "random.break"), RANDOM_ANVIL_USE(1, "random.anvil_use"), RANDOM_ANVIL_BREAK(2, "random.anvil_break"), @@ -296,8 +294,8 @@ public enum SoundResource { EnumSet.allOf(SoundResource.class).forEach(sound -> { if (sound.id >= 0) ID_SOUND_MAP.put(sound.id, sound); }); - EnumSet.allOf(SoundResource.class).forEach(sound -> - RESOURCE_STR_SOUND_MAP.put(sound.resourceLocation.toString(), sound)); + EnumSet.allOf(SoundResource.class) + .forEach(sound -> RESOURCE_STR_SOUND_MAP.put(sound.resourceLocation.toString(), sound)); } /** diff --git a/src/main/java/gregtech/api/enums/SubTag.java b/src/main/java/gregtech/api/enums/SubTag.java index 681358f8f1..b1999de89b 100644 --- a/src/main/java/gregtech/api/enums/SubTag.java +++ b/src/main/java/gregtech/api/enums/SubTag.java @@ -2,7 +2,6 @@ package gregtech.api.enums; import gregtech.api.interfaces.ICondition; import gregtech.api.interfaces.ISubTagContainer; - import java.util.Collection; import java.util.HashMap; import java.util.HashSet; @@ -29,13 +28,13 @@ public final class SubTag implements ICondition<ISubTagContainer> { * Add this to your Material if you want to have its Ore Calcite heated in a Blast Furnace for more output. Already listed are: * Iron, Pyrite, PigIron, DeepIron, ShadowIron, WroughtIron and MeteoricIron. */ - public static final SubTag BLASTFURNACE_CALCITE_DOUBLE = getNewSubTag("BLASTFURNACE_CALCITE_DOUBLE"), BLASTFURNACE_CALCITE_TRIPLE = getNewSubTag("BLASTFURNACE_CALCITE_TRIPLE"); + public static final SubTag BLASTFURNACE_CALCITE_DOUBLE = getNewSubTag("BLASTFURNACE_CALCITE_DOUBLE"), + BLASTFURNACE_CALCITE_TRIPLE = getNewSubTag("BLASTFURNACE_CALCITE_TRIPLE"); /** * Add this to a material with Direct Smelting to prevent the automatic generation of a Bricked/Bronze Blast Furnace recipe. Already listed are: * Chalcopyrite, Tetrahedrite */ - public static final SubTag DONT_ADD_DEFAULT_BBF_RECIPE = getNewSubTag("DONT_ADD_DEFAULT_BBF_RECIPE"); /** @@ -54,9 +53,9 @@ public final class SubTag implements ICondition<ISubTagContainer> { */ public static final SubTag WASHING_MERCURY = getNewSubTag("WASHING_MERCURY"); /** - * Add this to your Material if you want to have its Ore Mercury washed with 99% output chance. Already listed are: - * Silver - */ + * Add this to your Material if you want to have its Ore Mercury washed with 99% output chance. Already listed are: + * Silver + */ public static final SubTag WASHING_MERCURY_99_PERCENT = getNewSubTag("WASHING_MERCURY_99_PERCENT"); /** * Add this to your Material if you want to have its Ore electromagnetically separated to give Gold. @@ -69,7 +68,8 @@ public final class SubTag implements ICondition<ISubTagContainer> { /** * Add this to your Material if you want to have its Ore electromagnetically separated to give Neodymium. */ - public static final SubTag ELECTROMAGNETIC_SEPERATION_NEODYMIUM = getNewSubTag("ELECTROMAGNETIC_SEPERATION_NEODYMIUM"); + public static final SubTag ELECTROMAGNETIC_SEPERATION_NEODYMIUM = + getNewSubTag("ELECTROMAGNETIC_SEPERATION_NEODYMIUM"); /** * Add this to your Material if you want to have its Ore giving Cinnabar Crystals on Pulverization. Already listed are: * Redstone @@ -239,6 +239,7 @@ public final class SubTag implements ICondition<ISubTagContainer> { * Projectile Tag for Arrows */ public static final SubTag PROJECTILE_ARROW = getNewSubTag("PROJECTILE_ARROW"); + public final Collection<ISubTagContainer> mRelevantTaggedItems = new HashSet<>(1); private SubTag(String aName) { @@ -248,9 +249,7 @@ public final class SubTag implements ICondition<ISubTagContainer> { } public static SubTag getNewSubTag(String aName) { - for (SubTag tSubTag : sSubTags.values()) - if (tSubTag.mName.equals(aName)) - return tSubTag; + for (SubTag tSubTag : sSubTags.values()) if (tSubTag.mName.equals(aName)) return tSubTag; return new SubTag(aName); } @@ -269,9 +268,7 @@ public final class SubTag implements ICondition<ISubTagContainer> { public SubTag addTo(ISubTagContainer... aContainers) { if (aContainers != null) - for (ISubTagContainer aContainer : aContainers) - if (aContainer != null) - aContainer.add(this); + for (ISubTagContainer aContainer : aContainers) if (aContainer != null) aContainer.add(this); return this; } diff --git a/src/main/java/gregtech/api/enums/TC_Aspects.java b/src/main/java/gregtech/api/enums/TC_Aspects.java index 582ffb86f6..cb578cf870 100644 --- a/src/main/java/gregtech/api/enums/TC_Aspects.java +++ b/src/main/java/gregtech/api/enums/TC_Aspects.java @@ -62,6 +62,7 @@ public enum TC_Aspects { * The Thaumcraft Aspect Object of the Mod itself. */ public Object mAspect; + public int mValue; TC_Aspects(int aValue) { @@ -72,7 +73,6 @@ public enum TC_Aspects { public TC_Aspects mAspect; public long mAmount; - public TC_AspectStack(TC_Aspects aAspect, long aAmount) { mAspect = aAspect; mAmount = aAmount; diff --git a/src/main/java/gregtech/api/enums/TextureSet.java b/src/main/java/gregtech/api/enums/TextureSet.java index c9ae82ca61..78864e1ca5 100644 --- a/src/main/java/gregtech/api/enums/TextureSet.java +++ b/src/main/java/gregtech/api/enums/TextureSet.java @@ -1,12 +1,12 @@ package gregtech.api.enums; + import gregtech.api.interfaces.IIconContainer; public class TextureSet { public boolean is_custom = false; - public static final TextureSet - SET_NONE = new TextureSet("NONE"), + public static final TextureSet SET_NONE = new TextureSet("NONE"), SET_DULL = new TextureSet("DULL"), SET_RUBY = new TextureSet("RUBY"), SET_OPAL = new TextureSet("OPAL"), @@ -37,8 +37,7 @@ public class TextureSet { /** * For the Indices of OrePrefixes you need to look into the OrePrefix Enum. */ - public static final short - INDEX_wire = 69, + public static final short INDEX_wire = 69, INDEX_foil = 70, INDEX_block1 = 71, INDEX_block2 = 72, diff --git a/src/main/java/gregtech/api/enums/Textures.java b/src/main/java/gregtech/api/enums/Textures.java index 666098b079..238ab4bf58 100644 --- a/src/main/java/gregtech/api/enums/Textures.java +++ b/src/main/java/gregtech/api/enums/Textures.java @@ -1,23 +1,22 @@ package gregtech.api.enums; +import static gregtech.api.enums.GT_Values.RES_PATH_BLOCK; +import static gregtech.api.enums.GT_Values.RES_PATH_ITEM; + import gregtech.api.GregTech_API; import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.ITexture; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; +import java.util.HashMap; +import java.util.Map; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; -import java.util.HashMap; -import java.util.Map; - -import static gregtech.api.enums.GT_Values.RES_PATH_BLOCK; -import static gregtech.api.enums.GT_Values.RES_PATH_ITEM; - public class Textures { public enum BlockIcons implements IIconContainer, Runnable { - //ADDED + // ADDED MACHINE_UEV_SIDE, MACHINE_UIV_SIDE, @@ -310,7 +309,7 @@ public class Textures { MACHINE_CASING_FIREBOX_STEEL, MACHINE_CASING_FIREBOX_TUNGSTENSTEEL, MACHINE_CASING_ENGINE_INTAKE, - MACHINE_CASING_EXTREME_ENGINE_INTAKE, //changed color in a terrible way + MACHINE_CASING_EXTREME_ENGINE_INTAKE, // changed color in a terrible way MACHINE_CASING_CHEMICALLY_INERT, MACHINE_COIL_CUPRONICKEL, @@ -1267,8 +1266,7 @@ public class Textures { OVERLAY_ME_INPUT_HATCH, OVERLAY_ME_INPUT_HATCH_ACTIVE, OVERLAY_ME_CRAFTING_HATCH, - OVERLAY_ME_CRAFTING_HATCH_ACTIVE - ; + OVERLAY_ME_CRAFTING_HATCH_ACTIVE; /** * Icon for Fresh CFoam @@ -1280,674 +1278,699 @@ public class Textures { * 1 - 16 = Colors */ public static final ITexture[][] HARDENEDFOAMS = { - new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.CONSTRUCTION_FOAM.mRGBa)}, - new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[0].mRGBa)}, - new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[1].mRGBa)}, - new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[2].mRGBa)}, - new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[3].mRGBa)}, - new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[4].mRGBa)}, - new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[5].mRGBa)}, - new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[6].mRGBa)}, - new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[7].mRGBa)}, - new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[8].mRGBa)}, - new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[9].mRGBa)}, - new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[10].mRGBa)}, - new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[11].mRGBa)}, - new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[12].mRGBa)}, - new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[13].mRGBa)}, - new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[14].mRGBa)}, - new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[15].mRGBa)} + new ITexture[] {TextureFactory.of(CFOAM_HARDENED, Dyes.CONSTRUCTION_FOAM.mRGBa)}, + new ITexture[] {TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[0].mRGBa)}, + new ITexture[] {TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[1].mRGBa)}, + new ITexture[] {TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[2].mRGBa)}, + new ITexture[] {TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[3].mRGBa)}, + new ITexture[] {TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[4].mRGBa)}, + new ITexture[] {TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[5].mRGBa)}, + new ITexture[] {TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[6].mRGBa)}, + new ITexture[] {TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[7].mRGBa)}, + new ITexture[] {TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[8].mRGBa)}, + new ITexture[] {TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[9].mRGBa)}, + new ITexture[] {TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[10].mRGBa)}, + new ITexture[] {TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[11].mRGBa)}, + new ITexture[] {TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[12].mRGBa)}, + new ITexture[] {TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[13].mRGBa)}, + new ITexture[] {TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[14].mRGBa)}, + new ITexture[] {TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[15].mRGBa)} }; /** * Machine Casings by Tier * 0 = 8V, 1 = LV, 2 = MV, 3 = HV, 4 = EV, 5 = IV, 6 = IV, 7 = IV, 8 = IV, 9 = IV */ public static final IIconContainer[] - MACHINECASINGS_SIDE = { - MACHINE_8V_SIDE, - MACHINE_LV_SIDE, - MACHINE_MV_SIDE, - MACHINE_HV_SIDE, - MACHINE_EV_SIDE, - MACHINE_IV_SIDE, - MACHINE_LuV_SIDE, - MACHINE_ZPM_SIDE, - MACHINE_UV_SIDE, - MACHINE_MAX_SIDE, - MACHINE_UEV_SIDE, - MACHINE_UIV_SIDE, - MACHINE_UMV_SIDE, - MACHINE_UXV_SIDE, - MACHINE_MAXV_SIDE, - }, - MACHINECASINGS_TOP = { - MACHINE_8V_TOP, - MACHINE_LV_TOP, - MACHINE_MV_TOP, - MACHINE_HV_TOP, - MACHINE_EV_TOP, - MACHINE_IV_TOP, - MACHINE_LuV_TOP, - MACHINE_ZPM_TOP, - MACHINE_UV_TOP, - MACHINE_MAX_TOP, - MACHINE_UEV_TOP, - MACHINE_UIV_TOP, - MACHINE_UMV_TOP, - MACHINE_UXV_TOP, - MACHINE_MAXV_TOP, - }, - MACHINECASINGS_BOTTOM = { - MACHINE_8V_BOTTOM, - MACHINE_LV_BOTTOM, - MACHINE_MV_BOTTOM, - MACHINE_HV_BOTTOM, - MACHINE_EV_BOTTOM, - MACHINE_IV_BOTTOM, - MACHINE_LuV_BOTTOM, - MACHINE_ZPM_BOTTOM, - MACHINE_UV_BOTTOM, - MACHINE_MAX_BOTTOM, - MACHINE_UEV_BOTTOM, - MACHINE_UIV_BOTTOM, - MACHINE_UMV_BOTTOM, - MACHINE_UXV_BOTTOM, - MACHINE_MAXV_BOTTOM, - - }, - GRANITES = { - GRANITE_BLACK_STONE, - GRANITE_BLACK_COBBLE, - GRANITE_BLACK_COBBLE_MOSSY, - GRANITE_BLACK_BRICKS, - GRANITE_BLACK_BRICKS_CRACKED, - GRANITE_BLACK_BRICKS_MOSSY, - GRANITE_BLACK_BRICKS_CHISELED, - GRANITE_BLACK_SMOOTH, - GRANITE_RED_STONE, - GRANITE_RED_COBBLE, - GRANITE_RED_COBBLE_MOSSY, - GRANITE_RED_BRICKS, - GRANITE_RED_BRICKS_CRACKED, - GRANITE_RED_BRICKS_MOSSY, - GRANITE_RED_BRICKS_CHISELED, - GRANITE_RED_SMOOTH, - }, - CONCRETES = { - CONCRETE_DARK_STONE, - CONCRETE_DARK_COBBLE, - CONCRETE_DARK_COBBLE_MOSSY, - CONCRETE_DARK_BRICKS, - CONCRETE_DARK_BRICKS_CRACKED, - CONCRETE_DARK_BRICKS_MOSSY, - CONCRETE_DARK_BRICKS_CHISELED, - CONCRETE_DARK_SMOOTH, - CONCRETE_LIGHT_STONE, - CONCRETE_LIGHT_COBBLE, - CONCRETE_LIGHT_COBBLE_MOSSY, - CONCRETE_LIGHT_BRICKS, - CONCRETE_LIGHT_BRICKS_CRACKED, - CONCRETE_LIGHT_BRICKS_MOSSY, - CONCRETE_LIGHT_BRICKS_CHISELED, - CONCRETE_LIGHT_SMOOTH, - }, - STONES = { - MARBLE_STONE, - MARBLE_COBBLE, - MARBLE_COBBLE_MOSSY, - MARBLE_BRICKS, - MARBLE_BRICKS_CRACKED, - MARBLE_BRICKS_MOSSY, - MARBLE_BRICKS_CHISELED, - MARBLE_SMOOTH, - BASALT_STONE, - BASALT_COBBLE, - BASALT_COBBLE_MOSSY, - BASALT_BRICKS, - BASALT_BRICKS_CRACKED, - BASALT_BRICKS_MOSSY, - BASALT_BRICKS_CHISELED, - BASALT_SMOOTH, - }, - TURBINE = { - LARGETURBINE_ST1, - LARGETURBINE_ST2, - LARGETURBINE_ST3, - LARGETURBINE_ST4, - LARGETURBINE_ST5, - LARGETURBINE_ST6, - LARGETURBINE_ST7, - LARGETURBINE_ST8, - LARGETURBINE_ST9 - }, - TURBINE_ACTIVE = { - LARGETURBINE_ST_ACTIVE1, - LARGETURBINE_ST_ACTIVE2, - LARGETURBINE_ST_ACTIVE3, - LARGETURBINE_ST_ACTIVE4, - LARGETURBINE_ST_ACTIVE5, - LARGETURBINE_ST_ACTIVE6, - LARGETURBINE_ST_ACTIVE7, - LARGETURBINE_ST_ACTIVE8, - LARGETURBINE_ST_ACTIVE9 - }, - TURBINE_EMPTY = { - LARGETURBINE_ST_EMPTY1, - LARGETURBINE_ST_EMPTY2, - LARGETURBINE_ST_EMPTY3, - LARGETURBINE_ST_EMPTY4, - LARGETURBINE_ST_EMPTY5, - LARGETURBINE_ST_EMPTY6, - LARGETURBINE_ST_EMPTY7, - LARGETURBINE_ST_EMPTY8, - LARGETURBINE_ST_EMPTY9 - }, - TURBINE1 = { - LARGETURBINE_SS1, - LARGETURBINE_SS2, - LARGETURBINE_SS3, - LARGETURBINE_SS4, - LARGETURBINE_SS5, - LARGETURBINE_SS6, - LARGETURBINE_SS7, - LARGETURBINE_SS8, - LARGETURBINE_SS9 - }, - TURBINE_ACTIVE1 = { - LARGETURBINE_SS_ACTIVE1, - LARGETURBINE_SS_ACTIVE2, - LARGETURBINE_SS_ACTIVE3, - LARGETURBINE_SS_ACTIVE4, - LARGETURBINE_SS_ACTIVE5, - LARGETURBINE_SS_ACTIVE6, - LARGETURBINE_SS_ACTIVE7, - LARGETURBINE_SS_ACTIVE8, - LARGETURBINE_SS_ACTIVE9 - }, - TURBINE_EMPTY1 = { - LARGETURBINE_SS_EMPTY1, - LARGETURBINE_SS_EMPTY2, - LARGETURBINE_SS_EMPTY3, - LARGETURBINE_SS_EMPTY4, - LARGETURBINE_SS_EMPTY5, - LARGETURBINE_SS_EMPTY6, - LARGETURBINE_SS_EMPTY7, - LARGETURBINE_SS_EMPTY8, - LARGETURBINE_SS_EMPTY9 - }, - TURBINE2 = { - LARGETURBINE_TI1, - LARGETURBINE_TI2, - LARGETURBINE_TI3, - LARGETURBINE_TI4, - LARGETURBINE_TI5, - LARGETURBINE_TI6, - LARGETURBINE_TI7, - LARGETURBINE_TI8, - LARGETURBINE_TI9 - }, - TURBINE_ACTIVE2 = { - LARGETURBINE_TI_ACTIVE1, - LARGETURBINE_TI_ACTIVE2, - LARGETURBINE_TI_ACTIVE3, - LARGETURBINE_TI_ACTIVE4, - LARGETURBINE_TI_ACTIVE5, - LARGETURBINE_TI_ACTIVE6, - LARGETURBINE_TI_ACTIVE7, - LARGETURBINE_TI_ACTIVE8, - LARGETURBINE_TI_ACTIVE9 - }, - TURBINE_EMPTY2 = { - LARGETURBINE_TI_EMPTY1, - LARGETURBINE_TI_EMPTY2, - LARGETURBINE_TI_EMPTY3, - LARGETURBINE_TI_EMPTY4, - LARGETURBINE_TI_EMPTY5, - LARGETURBINE_TI_EMPTY6, - LARGETURBINE_TI_EMPTY7, - LARGETURBINE_TI_EMPTY8, - LARGETURBINE_TI_EMPTY9 - }, - TURBINE3 = { - LARGETURBINE_TU1, - LARGETURBINE_TU2, - LARGETURBINE_TU3, - LARGETURBINE_TU4, - LARGETURBINE_TU5, - LARGETURBINE_TU6, - LARGETURBINE_TU7, - LARGETURBINE_TU8, - LARGETURBINE_TU9 - }, - TURBINE_ACTIVE3 = { - LARGETURBINE_TU_ACTIVE1, - LARGETURBINE_TU_ACTIVE2, - LARGETURBINE_TU_ACTIVE3, - LARGETURBINE_TU_ACTIVE4, - LARGETURBINE_TU_ACTIVE5, - LARGETURBINE_TU_ACTIVE6, - LARGETURBINE_TU_ACTIVE7, - LARGETURBINE_TU_ACTIVE8, - LARGETURBINE_TU_ACTIVE9 - }, - TURBINE_EMPTY3 = { - LARGETURBINE_TU_EMPTY1, - LARGETURBINE_TU_EMPTY2, - LARGETURBINE_TU_EMPTY3, - LARGETURBINE_TU_EMPTY4, - LARGETURBINE_TU_EMPTY5, - LARGETURBINE_TU_EMPTY6, - LARGETURBINE_TU_EMPTY7, - LARGETURBINE_TU_EMPTY8, - LARGETURBINE_TU_EMPTY9 - }, - TURBINEADVGAS = { - LARGETURBINE_ADVGAS1, - LARGETURBINE_ADVGAS2, - LARGETURBINE_ADVGAS3, - LARGETURBINE_ADVGAS4, - LARGETURBINE_ADVGAS5, - LARGETURBINE_ADVGAS6, - LARGETURBINE_ADVGAS7, - LARGETURBINE_ADVGAS8, - LARGETURBINE_ADVGAS9 - }, - TURBINE_ADVGASACTIVE = { - LARGETURBINE_ADVGAS_ACTIVE1, - LARGETURBINE_ADVGAS_ACTIVE2, - LARGETURBINE_ADVGAS_ACTIVE3, - LARGETURBINE_ADVGAS_ACTIVE4, - LARGETURBINE_ADVGAS_ACTIVE5, - LARGETURBINE_ADVGAS_ACTIVE6, - LARGETURBINE_ADVGAS_ACTIVE7, - LARGETURBINE_ADVGAS_ACTIVE8, - LARGETURBINE_ADVGAS_ACTIVE9 - }, - TURBINE_ADVGASEMPTY = { - LARGETURBINE_ADVGAS_EMPTY1, - LARGETURBINE_ADVGAS_EMPTY2, - LARGETURBINE_ADVGAS_EMPTY3, - LARGETURBINE_ADVGAS_EMPTY4, - LARGETURBINE_ADVGAS_EMPTY5, - LARGETURBINE_ADVGAS_EMPTY6, - LARGETURBINE_ADVGAS_EMPTY7, - LARGETURBINE_ADVGAS_EMPTY8, - LARGETURBINE_ADVGAS_EMPTY9 - }, - CONNECTED_HULLS = { - CONCRETE_DARK_STONE, - FUSIONI_1, - FUSIONI_2, - FUSIONI_3, - FUSIONI_4, - FUSIONI_5, - FUSIONI_6, - FUSIONI_7, - FUSIONI_8, - FUSIONI_9, - FUSIONI_10, - FUSIONI_11, - FUSIONI_12, - FUSIONII_1, - FUSIONII_2, - FUSIONII_3, - FUSIONII_4, - FUSIONII_5, - FUSIONII_6, - FUSIONII_7, - FUSIONII_8, - FUSIONII_9, - FUSIONII_10, - FUSIONII_11, - FUSIONII_12, - }, - STORAGE_BLOCKS1 = { - BLOCK_ADAMANTIUM, - BLOCK_ALUMINIUM, - BLOCK_AMERICIUM, - BLOCK_ANNEALEDCOPPER, - BLOCK_ANTIMONY, - BLOCK_ARSENIC, - BLOCK_ASTRALSILVER, - BLOCK_BATTERYALLOY, - BLOCK_BERYLLIUM, - BLOCK_BISMUTH, - BLOCK_BISMUTHBRONZE, - BLOCK_BLACKBRONZE, - BLOCK_BLACKSTEEL, - BLOCK_BLUEALLOY, - BLOCK_BLUESTEEL, - BLOCK_BRASS - }, - STORAGE_BLOCKS2 = { - BLOCK_BRONZE, - BLOCK_CAESIUM, - BLOCK_CERIUM, - BLOCK_CHROME, - BLOCK_CHROMIUMDIOXIDE, - BLOCK_COBALT, - BLOCK_COBALTBRASS, - BLOCK_COPPER, - BLOCK_CUPRONICKEL, - BLOCK_DAMASCUSSTEEL, - BLOCK_DARKIRON, - BLOCK_DEEPIRON, - BLOCK_DESH, - BLOCK_DURANIUM, - BLOCK_DYSPROSIUM, - BLOCK_ELECTRUM - }, - STORAGE_BLOCKS3 = { - BLOCK_ELECTRUMFLUX, - BLOCK_ENDERIUM, - BLOCK_ERBIUM, - BLOCK_EUROPIUM, - BLOCK_FIERYSTEEL, - BLOCK_GADOLINIUM, - BLOCK_GALLIUM, - BLOCK_HOLMIUM, - BLOCK_HSLA, - BLOCK_INDIUM, - BLOCK_INFUSEDGOLD, - BLOCK_INVAR, - BLOCK_IRIDIUM, - BLOCK_IRONMAGNETIC, - BLOCK_IRONWOOD, - BLOCK_KANTHAL - }, - STORAGE_BLOCKS4 = { - BLOCK_KNIGHTMETAL, - BLOCK_LANTHANUM, - BLOCK_LEAD, - BLOCK_LUTETIUM, - BLOCK_MAGNALIUM, - BLOCK_MAGNESIUM, - BLOCK_MANGANESE, - BLOCK_METEORICIRON, - BLOCK_METEORICSTEEL, - BLOCK_TRINIUM, - BLOCK_MITHRIL, - BLOCK_MOLYBDENUM, - BLOCK_NAQUADAH, - BLOCK_NAQUADAHALLOY, - BLOCK_NAQUADAHENRICHED, - BLOCK_NAQUADRIA - }, - STORAGE_BLOCKS5 = { - BLOCK_NEODYMIUM, - BLOCK_NEODYMIUMMAGNETIC, - BLOCK_NEUTRONIUM, - BLOCK_NICHROME, - BLOCK_NICKEL, - BLOCK_NIOBIUM, - BLOCK_NIOBIUMNITRIDE, - BLOCK_NIOBIUMTITANIUM, - BLOCK_OSMIRIDIUM, - BLOCK_OSMIUM, - BLOCK_PALLADIUM, - BLOCK_PIGIRON, - BLOCK_PLATINUM, - BLOCK_PLUTONIUM, - BLOCK_PLUTONIUM241, - BLOCK_PRASEODYMIUM - }, - STORAGE_BLOCKS6 = { - BLOCK_PROMETHIUM, - BLOCK_REDALLOY, - BLOCK_REDSTEEL, - BLOCK_ROSEGOLD, - BLOCK_RUBIDIUM, - BLOCK_SAMARIUM, - BLOCK_SCANDIUM, - BLOCK_SHADOWIRON, - BLOCK_SHADOWSTEEL, - BLOCK_SILICON, - BLOCK_SILVER, - BLOCK_SOLDERINGALLOY, - BLOCK_STAINLESSSTEEL, - BLOCK_STEEL, - BLOCK_STEELMAGNETIC, - BLOCK_STERLINGSILVER - }, - STORAGE_BLOCKS7 = { - BLOCK_SUNNARIUM, - BLOCK_TANTALUM, - BLOCK_TELLURIUM, - BLOCK_TERBIUM, - BLOCK_THAUMIUM, - BLOCK_THORIUM, - BLOCK_THULIUM, - BLOCK_TIN, - BLOCK_TINALLOY, - BLOCK_TITANIUM, - BLOCK_TRITANIUM, - BLOCK_TUNGSTEN, - BLOCK_TUNGSTENSTEEL, - BLOCK_ULTIMET, - BLOCK_URANIUM, - BLOCK_URANIUM235 - }, - STORAGE_BLOCKS8 = { - BLOCK_VANADIUM, - BLOCK_VANADIUMGALLIUM, - BLOCK_WROUGHTIRON, - BLOCK_YTTRBIUM, - BLOCK_YTTRIUM, - BLOCK_YTTRIUMBARIUMCUPRATE, - BLOCK_ZINC, - BLOCK_TUNGSTENCARBIDE, - BLOCK_VANADIUMSTEEL, - BLOCK_HSSG, - BLOCK_HSSE, - BLOCK_HSSS, - BLOCK_STEELEAF, - BLOCK_ICHORIUM, - BLOCK_FIRESTONE, - BLOCK_SHADOW - }, - STORAGE_BLOCKS9 = { - BLOCK_AERCRYSTAL, - BLOCK_AMBER, - BLOCK_AMETHYST, - BLOCK_AQUACRYSTAL, - BLOCK_BLUETOPAZ, - BLOCK_CERTUSQUARTZ, - BLOCK_DILITHIUM, - BLOCK_ENDEREYE, - BLOCK_ENDERPEARL, - BLOCK_FOOLSRUBY, - BLOCK_FORCE, - BLOCK_FORCICIUM, - BLOCK_FORCILLIUM, - BLOCK_GREENSAPPHIRE, - BLOCK_IGNISCRYSTAL, - BLOCK_JASPER - }, - STORAGE_BLOCKS10 = { - BLOCK_LAZURITE, - BLOCK_LIGNITE, - BLOCK_MONAZITE, - BLOCK_NITER, - BLOCK_OLIVINE, - BLOCK_OPAL, - BLOCK_ORDOCRYSTAL, - BLOCK_PERDITIOCRYSTAL, - BLOCK_PHOSPHORUS, - BLOCK_QUARTZITE, - BLOCK_REDGARNET, - BLOCK_RUBY, - BLOCK_SAPPHIRE, - BLOCK_SODALITE, - BLOCK_TANZANITE, - BLOCK_TERRACRYSTAL - }, - STORAGE_BLOCKS11 = { - BLOCK_TOPAZ, - BLOCK_VINTEUM, - BLOCK_YELLOWGARNET, - BLOCK_NETHERSTAR, - BLOCK_CHARCOAL, - BLOCK_BLAZE, - }, - STORAGE_BLOCKS12 = { - BLOCK_CRYOLITE, - BLOCK_SILICONSG, - BLOCK_NICKELALUMINIUM, - BLOCK_SPACETIME - }; + MACHINECASINGS_SIDE = + { + MACHINE_8V_SIDE, + MACHINE_LV_SIDE, + MACHINE_MV_SIDE, + MACHINE_HV_SIDE, + MACHINE_EV_SIDE, + MACHINE_IV_SIDE, + MACHINE_LuV_SIDE, + MACHINE_ZPM_SIDE, + MACHINE_UV_SIDE, + MACHINE_MAX_SIDE, + MACHINE_UEV_SIDE, + MACHINE_UIV_SIDE, + MACHINE_UMV_SIDE, + MACHINE_UXV_SIDE, + MACHINE_MAXV_SIDE, + }, + MACHINECASINGS_TOP = + { + MACHINE_8V_TOP, + MACHINE_LV_TOP, + MACHINE_MV_TOP, + MACHINE_HV_TOP, + MACHINE_EV_TOP, + MACHINE_IV_TOP, + MACHINE_LuV_TOP, + MACHINE_ZPM_TOP, + MACHINE_UV_TOP, + MACHINE_MAX_TOP, + MACHINE_UEV_TOP, + MACHINE_UIV_TOP, + MACHINE_UMV_TOP, + MACHINE_UXV_TOP, + MACHINE_MAXV_TOP, + }, + MACHINECASINGS_BOTTOM = + { + MACHINE_8V_BOTTOM, + MACHINE_LV_BOTTOM, + MACHINE_MV_BOTTOM, + MACHINE_HV_BOTTOM, + MACHINE_EV_BOTTOM, + MACHINE_IV_BOTTOM, + MACHINE_LuV_BOTTOM, + MACHINE_ZPM_BOTTOM, + MACHINE_UV_BOTTOM, + MACHINE_MAX_BOTTOM, + MACHINE_UEV_BOTTOM, + MACHINE_UIV_BOTTOM, + MACHINE_UMV_BOTTOM, + MACHINE_UXV_BOTTOM, + MACHINE_MAXV_BOTTOM, + }, + GRANITES = + { + GRANITE_BLACK_STONE, + GRANITE_BLACK_COBBLE, + GRANITE_BLACK_COBBLE_MOSSY, + GRANITE_BLACK_BRICKS, + GRANITE_BLACK_BRICKS_CRACKED, + GRANITE_BLACK_BRICKS_MOSSY, + GRANITE_BLACK_BRICKS_CHISELED, + GRANITE_BLACK_SMOOTH, + GRANITE_RED_STONE, + GRANITE_RED_COBBLE, + GRANITE_RED_COBBLE_MOSSY, + GRANITE_RED_BRICKS, + GRANITE_RED_BRICKS_CRACKED, + GRANITE_RED_BRICKS_MOSSY, + GRANITE_RED_BRICKS_CHISELED, + GRANITE_RED_SMOOTH, + }, + CONCRETES = + { + CONCRETE_DARK_STONE, + CONCRETE_DARK_COBBLE, + CONCRETE_DARK_COBBLE_MOSSY, + CONCRETE_DARK_BRICKS, + CONCRETE_DARK_BRICKS_CRACKED, + CONCRETE_DARK_BRICKS_MOSSY, + CONCRETE_DARK_BRICKS_CHISELED, + CONCRETE_DARK_SMOOTH, + CONCRETE_LIGHT_STONE, + CONCRETE_LIGHT_COBBLE, + CONCRETE_LIGHT_COBBLE_MOSSY, + CONCRETE_LIGHT_BRICKS, + CONCRETE_LIGHT_BRICKS_CRACKED, + CONCRETE_LIGHT_BRICKS_MOSSY, + CONCRETE_LIGHT_BRICKS_CHISELED, + CONCRETE_LIGHT_SMOOTH, + }, + STONES = + { + MARBLE_STONE, + MARBLE_COBBLE, + MARBLE_COBBLE_MOSSY, + MARBLE_BRICKS, + MARBLE_BRICKS_CRACKED, + MARBLE_BRICKS_MOSSY, + MARBLE_BRICKS_CHISELED, + MARBLE_SMOOTH, + BASALT_STONE, + BASALT_COBBLE, + BASALT_COBBLE_MOSSY, + BASALT_BRICKS, + BASALT_BRICKS_CRACKED, + BASALT_BRICKS_MOSSY, + BASALT_BRICKS_CHISELED, + BASALT_SMOOTH, + }, + TURBINE = + { + LARGETURBINE_ST1, + LARGETURBINE_ST2, + LARGETURBINE_ST3, + LARGETURBINE_ST4, + LARGETURBINE_ST5, + LARGETURBINE_ST6, + LARGETURBINE_ST7, + LARGETURBINE_ST8, + LARGETURBINE_ST9 + }, + TURBINE_ACTIVE = + { + LARGETURBINE_ST_ACTIVE1, + LARGETURBINE_ST_ACTIVE2, + LARGETURBINE_ST_ACTIVE3, + LARGETURBINE_ST_ACTIVE4, + LARGETURBINE_ST_ACTIVE5, + LARGETURBINE_ST_ACTIVE6, + LARGETURBINE_ST_ACTIVE7, + LARGETURBINE_ST_ACTIVE8, + LARGETURBINE_ST_ACTIVE9 + }, + TURBINE_EMPTY = + { + LARGETURBINE_ST_EMPTY1, + LARGETURBINE_ST_EMPTY2, + LARGETURBINE_ST_EMPTY3, + LARGETURBINE_ST_EMPTY4, + LARGETURBINE_ST_EMPTY5, + LARGETURBINE_ST_EMPTY6, + LARGETURBINE_ST_EMPTY7, + LARGETURBINE_ST_EMPTY8, + LARGETURBINE_ST_EMPTY9 + }, + TURBINE1 = + { + LARGETURBINE_SS1, + LARGETURBINE_SS2, + LARGETURBINE_SS3, + LARGETURBINE_SS4, + LARGETURBINE_SS5, + LARGETURBINE_SS6, + LARGETURBINE_SS7, + LARGETURBINE_SS8, + LARGETURBINE_SS9 + }, + TURBINE_ACTIVE1 = + { + LARGETURBINE_SS_ACTIVE1, + LARGETURBINE_SS_ACTIVE2, + LARGETURBINE_SS_ACTIVE3, + LARGETURBINE_SS_ACTIVE4, + LARGETURBINE_SS_ACTIVE5, + LARGETURBINE_SS_ACTIVE6, + LARGETURBINE_SS_ACTIVE7, + LARGETURBINE_SS_ACTIVE8, + LARGETURBINE_SS_ACTIVE9 + }, + TURBINE_EMPTY1 = + { + LARGETURBINE_SS_EMPTY1, + LARGETURBINE_SS_EMPTY2, + LARGETURBINE_SS_EMPTY3, + LARGETURBINE_SS_EMPTY4, + LARGETURBINE_SS_EMPTY5, + LARGETURBINE_SS_EMPTY6, + LARGETURBINE_SS_EMPTY7, + LARGETURBINE_SS_EMPTY8, + LARGETURBINE_SS_EMPTY9 + }, + TURBINE2 = + { + LARGETURBINE_TI1, + LARGETURBINE_TI2, + LARGETURBINE_TI3, + LARGETURBINE_TI4, + LARGETURBINE_TI5, + LARGETURBINE_TI6, + LARGETURBINE_TI7, + LARGETURBINE_TI8, + LARGETURBINE_TI9 + }, + TURBINE_ACTIVE2 = + { + LARGETURBINE_TI_ACTIVE1, + LARGETURBINE_TI_ACTIVE2, + LARGETURBINE_TI_ACTIVE3, + LARGETURBINE_TI_ACTIVE4, + LARGETURBINE_TI_ACTIVE5, + LARGETURBINE_TI_ACTIVE6, + LARGETURBINE_TI_ACTIVE7, + LARGETURBINE_TI_ACTIVE8, + LARGETURBINE_TI_ACTIVE9 + }, + TURBINE_EMPTY2 = + { + LARGETURBINE_TI_EMPTY1, + LARGETURBINE_TI_EMPTY2, + LARGETURBINE_TI_EMPTY3, + LARGETURBINE_TI_EMPTY4, + LARGETURBINE_TI_EMPTY5, + LARGETURBINE_TI_EMPTY6, + LARGETURBINE_TI_EMPTY7, + LARGETURBINE_TI_EMPTY8, + LARGETURBINE_TI_EMPTY9 + }, + TURBINE3 = + { + LARGETURBINE_TU1, + LARGETURBINE_TU2, + LARGETURBINE_TU3, + LARGETURBINE_TU4, + LARGETURBINE_TU5, + LARGETURBINE_TU6, + LARGETURBINE_TU7, + LARGETURBINE_TU8, + LARGETURBINE_TU9 + }, + TURBINE_ACTIVE3 = + { + LARGETURBINE_TU_ACTIVE1, + LARGETURBINE_TU_ACTIVE2, + LARGETURBINE_TU_ACTIVE3, + LARGETURBINE_TU_ACTIVE4, + LARGETURBINE_TU_ACTIVE5, + LARGETURBINE_TU_ACTIVE6, + LARGETURBINE_TU_ACTIVE7, + LARGETURBINE_TU_ACTIVE8, + LARGETURBINE_TU_ACTIVE9 + }, + TURBINE_EMPTY3 = + { + LARGETURBINE_TU_EMPTY1, + LARGETURBINE_TU_EMPTY2, + LARGETURBINE_TU_EMPTY3, + LARGETURBINE_TU_EMPTY4, + LARGETURBINE_TU_EMPTY5, + LARGETURBINE_TU_EMPTY6, + LARGETURBINE_TU_EMPTY7, + LARGETURBINE_TU_EMPTY8, + LARGETURBINE_TU_EMPTY9 + }, + TURBINEADVGAS = + { + LARGETURBINE_ADVGAS1, + LARGETURBINE_ADVGAS2, + LARGETURBINE_ADVGAS3, + LARGETURBINE_ADVGAS4, + LARGETURBINE_ADVGAS5, + LARGETURBINE_ADVGAS6, + LARGETURBINE_ADVGAS7, + LARGETURBINE_ADVGAS8, + LARGETURBINE_ADVGAS9 + }, + TURBINE_ADVGASACTIVE = + { + LARGETURBINE_ADVGAS_ACTIVE1, + LARGETURBINE_ADVGAS_ACTIVE2, + LARGETURBINE_ADVGAS_ACTIVE3, + LARGETURBINE_ADVGAS_ACTIVE4, + LARGETURBINE_ADVGAS_ACTIVE5, + LARGETURBINE_ADVGAS_ACTIVE6, + LARGETURBINE_ADVGAS_ACTIVE7, + LARGETURBINE_ADVGAS_ACTIVE8, + LARGETURBINE_ADVGAS_ACTIVE9 + }, + TURBINE_ADVGASEMPTY = + { + LARGETURBINE_ADVGAS_EMPTY1, + LARGETURBINE_ADVGAS_EMPTY2, + LARGETURBINE_ADVGAS_EMPTY3, + LARGETURBINE_ADVGAS_EMPTY4, + LARGETURBINE_ADVGAS_EMPTY5, + LARGETURBINE_ADVGAS_EMPTY6, + LARGETURBINE_ADVGAS_EMPTY7, + LARGETURBINE_ADVGAS_EMPTY8, + LARGETURBINE_ADVGAS_EMPTY9 + }, + CONNECTED_HULLS = + { + CONCRETE_DARK_STONE, + FUSIONI_1, + FUSIONI_2, + FUSIONI_3, + FUSIONI_4, + FUSIONI_5, + FUSIONI_6, + FUSIONI_7, + FUSIONI_8, + FUSIONI_9, + FUSIONI_10, + FUSIONI_11, + FUSIONI_12, + FUSIONII_1, + FUSIONII_2, + FUSIONII_3, + FUSIONII_4, + FUSIONII_5, + FUSIONII_6, + FUSIONII_7, + FUSIONII_8, + FUSIONII_9, + FUSIONII_10, + FUSIONII_11, + FUSIONII_12, + }, + STORAGE_BLOCKS1 = + { + BLOCK_ADAMANTIUM, + BLOCK_ALUMINIUM, + BLOCK_AMERICIUM, + BLOCK_ANNEALEDCOPPER, + BLOCK_ANTIMONY, + BLOCK_ARSENIC, + BLOCK_ASTRALSILVER, + BLOCK_BATTERYALLOY, + BLOCK_BERYLLIUM, + BLOCK_BISMUTH, + BLOCK_BISMUTHBRONZE, + BLOCK_BLACKBRONZE, + BLOCK_BLACKSTEEL, + BLOCK_BLUEALLOY, + BLOCK_BLUESTEEL, + BLOCK_BRASS + }, + STORAGE_BLOCKS2 = + { + BLOCK_BRONZE, + BLOCK_CAESIUM, + BLOCK_CERIUM, + BLOCK_CHROME, + BLOCK_CHROMIUMDIOXIDE, + BLOCK_COBALT, + BLOCK_COBALTBRASS, + BLOCK_COPPER, + BLOCK_CUPRONICKEL, + BLOCK_DAMASCUSSTEEL, + BLOCK_DARKIRON, + BLOCK_DEEPIRON, + BLOCK_DESH, + BLOCK_DURANIUM, + BLOCK_DYSPROSIUM, + BLOCK_ELECTRUM + }, + STORAGE_BLOCKS3 = + { + BLOCK_ELECTRUMFLUX, + BLOCK_ENDERIUM, + BLOCK_ERBIUM, + BLOCK_EUROPIUM, + BLOCK_FIERYSTEEL, + BLOCK_GADOLINIUM, + BLOCK_GALLIUM, + BLOCK_HOLMIUM, + BLOCK_HSLA, + BLOCK_INDIUM, + BLOCK_INFUSEDGOLD, + BLOCK_INVAR, + BLOCK_IRIDIUM, + BLOCK_IRONMAGNETIC, + BLOCK_IRONWOOD, + BLOCK_KANTHAL + }, + STORAGE_BLOCKS4 = + { + BLOCK_KNIGHTMETAL, + BLOCK_LANTHANUM, + BLOCK_LEAD, + BLOCK_LUTETIUM, + BLOCK_MAGNALIUM, + BLOCK_MAGNESIUM, + BLOCK_MANGANESE, + BLOCK_METEORICIRON, + BLOCK_METEORICSTEEL, + BLOCK_TRINIUM, + BLOCK_MITHRIL, + BLOCK_MOLYBDENUM, + BLOCK_NAQUADAH, + BLOCK_NAQUADAHALLOY, + BLOCK_NAQUADAHENRICHED, + BLOCK_NAQUADRIA + }, + STORAGE_BLOCKS5 = + { + BLOCK_NEODYMIUM, + BLOCK_NEODYMIUMMAGNETIC, + BLOCK_NEUTRONIUM, + BLOCK_NICHROME, + BLOCK_NICKEL, + BLOCK_NIOBIUM, + BLOCK_NIOBIUMNITRIDE, + BLOCK_NIOBIUMTITANIUM, + BLOCK_OSMIRIDIUM, + BLOCK_OSMIUM, + BLOCK_PALLADIUM, + BLOCK_PIGIRON, + BLOCK_PLATINUM, + BLOCK_PLUTONIUM, + BLOCK_PLUTONIUM241, + BLOCK_PRASEODYMIUM + }, + STORAGE_BLOCKS6 = + { + BLOCK_PROMETHIUM, + BLOCK_REDALLOY, + BLOCK_REDSTEEL, + BLOCK_ROSEGOLD, + BLOCK_RUBIDIUM, + BLOCK_SAMARIUM, + BLOCK_SCANDIUM, + BLOCK_SHADOWIRON, + BLOCK_SHADOWSTEEL, + BLOCK_SILICON, + BLOCK_SILVER, + BLOCK_SOLDERINGALLOY, + BLOCK_STAINLESSSTEEL, + BLOCK_STEEL, + BLOCK_STEELMAGNETIC, + BLOCK_STERLINGSILVER + }, + STORAGE_BLOCKS7 = + { + BLOCK_SUNNARIUM, + BLOCK_TANTALUM, + BLOCK_TELLURIUM, + BLOCK_TERBIUM, + BLOCK_THAUMIUM, + BLOCK_THORIUM, + BLOCK_THULIUM, + BLOCK_TIN, + BLOCK_TINALLOY, + BLOCK_TITANIUM, + BLOCK_TRITANIUM, + BLOCK_TUNGSTEN, + BLOCK_TUNGSTENSTEEL, + BLOCK_ULTIMET, + BLOCK_URANIUM, + BLOCK_URANIUM235 + }, + STORAGE_BLOCKS8 = + { + BLOCK_VANADIUM, + BLOCK_VANADIUMGALLIUM, + BLOCK_WROUGHTIRON, + BLOCK_YTTRBIUM, + BLOCK_YTTRIUM, + BLOCK_YTTRIUMBARIUMCUPRATE, + BLOCK_ZINC, + BLOCK_TUNGSTENCARBIDE, + BLOCK_VANADIUMSTEEL, + BLOCK_HSSG, + BLOCK_HSSE, + BLOCK_HSSS, + BLOCK_STEELEAF, + BLOCK_ICHORIUM, + BLOCK_FIRESTONE, + BLOCK_SHADOW + }, + STORAGE_BLOCKS9 = + { + BLOCK_AERCRYSTAL, + BLOCK_AMBER, + BLOCK_AMETHYST, + BLOCK_AQUACRYSTAL, + BLOCK_BLUETOPAZ, + BLOCK_CERTUSQUARTZ, + BLOCK_DILITHIUM, + BLOCK_ENDEREYE, + BLOCK_ENDERPEARL, + BLOCK_FOOLSRUBY, + BLOCK_FORCE, + BLOCK_FORCICIUM, + BLOCK_FORCILLIUM, + BLOCK_GREENSAPPHIRE, + BLOCK_IGNISCRYSTAL, + BLOCK_JASPER + }, + STORAGE_BLOCKS10 = + { + BLOCK_LAZURITE, + BLOCK_LIGNITE, + BLOCK_MONAZITE, + BLOCK_NITER, + BLOCK_OLIVINE, + BLOCK_OPAL, + BLOCK_ORDOCRYSTAL, + BLOCK_PERDITIOCRYSTAL, + BLOCK_PHOSPHORUS, + BLOCK_QUARTZITE, + BLOCK_REDGARNET, + BLOCK_RUBY, + BLOCK_SAPPHIRE, + BLOCK_SODALITE, + BLOCK_TANZANITE, + BLOCK_TERRACRYSTAL + }, + STORAGE_BLOCKS11 = + { + BLOCK_TOPAZ, + BLOCK_VINTEUM, + BLOCK_YELLOWGARNET, + BLOCK_NETHERSTAR, + BLOCK_CHARCOAL, + BLOCK_BLAZE, + }, + STORAGE_BLOCKS12 = {BLOCK_CRYOLITE, BLOCK_SILICONSG, BLOCK_NICKELALUMINIUM, BLOCK_SPACETIME}; public static final ITexture[] HIDDEN_TEXTURE = { TextureFactory.builder().addIcon(HIDDEN_FACE).stdOrient().build() }; - public static final ITexture[] ERROR_RENDERING = { - TextureFactory.of(RENDERING_ERROR) - }; + public static final ITexture[] ERROR_RENDERING = {TextureFactory.of(RENDERING_ERROR)}; public static final ITexture[] OVERLAYS_ENERGY_IN = { - TextureFactory.of(OVERLAY_ENERGY_IN, new short[]{180, 180, 180, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN, new short[]{220, 220, 220, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN, new short[]{255, 100, 0, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN, new short[]{255, 255, 30, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN, new short[]{128, 128, 128, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN, new short[]{240, 240, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN, new short[]{220, 220, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN, new short[]{200, 200, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN, new short[]{180, 180, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN, new short[]{160, 160, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN, new short[]{140, 140, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN, new short[]{120, 120, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN, new short[]{100, 100, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN, new short[]{80, 80, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN, new short[]{60, 60, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN, new short[]{40, 40, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] {180, 180, 180, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] {220, 220, 220, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] {255, 100, 0, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] {255, 255, 30, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] {128, 128, 128, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] {240, 240, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] {220, 220, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] {200, 200, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] {180, 180, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] {160, 160, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] {140, 140, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] {120, 120, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] {100, 100, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] {80, 80, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] {60, 60, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] {40, 40, 245, 0}), }; public static ITexture[] OVERLAYS_ENERGY_OUT = { - TextureFactory.of(OVERLAY_ENERGY_OUT, new short[]{180, 180, 180, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT, new short[]{220, 220, 220, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT, new short[]{255, 100, 0, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT, new short[]{255, 255, 30, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT, new short[]{128, 128, 128, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT, new short[]{240, 240, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT, new short[]{220, 220, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT, new short[]{200, 200, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT, new short[]{180, 180, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT, new short[]{160, 160, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT, new short[]{140, 140, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT, new short[]{120, 120, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT, new short[]{100, 100, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT, new short[]{80, 80, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT, new short[]{60, 60, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT, new short[]{40, 40, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] {180, 180, 180, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] {220, 220, 220, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] {255, 100, 0, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] {255, 255, 30, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] {128, 128, 128, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] {240, 240, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] {220, 220, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] {200, 200, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] {180, 180, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] {160, 160, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] {140, 140, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] {120, 120, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] {100, 100, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] {80, 80, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] {60, 60, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] {40, 40, 245, 0}), }; public static final ITexture[] OVERLAYS_ENERGY_IN_MULTI = { - TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[]{180, 180, 180, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[]{220, 220, 220, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[]{255, 100, 0, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[]{255, 255, 30, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[]{128, 128, 128, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[]{240, 240, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[]{220, 220, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[]{200, 200, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[]{180, 180, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[]{160, 160, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[]{140, 140, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[]{120, 120, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[]{100, 100, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[]{80, 80, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[]{60, 60, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[]{40, 40, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] {180, 180, 180, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] {220, 220, 220, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] {255, 100, 0, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] {255, 255, 30, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] {128, 128, 128, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] {240, 240, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] {220, 220, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] {200, 200, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] {180, 180, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] {160, 160, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] {140, 140, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] {120, 120, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] {100, 100, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] {80, 80, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] {60, 60, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] {40, 40, 245, 0}), }; public static final ITexture[] OVERLAYS_ENERGY_IN_MULTI_WIRELESS_ON = { - TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[]{255, 255, 255, 0}), - TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[]{255, 255, 255, 0}), - TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[]{255, 255, 255, 0}), - TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[]{255, 255, 255, 0}), - TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[]{255, 255, 255, 0}), - TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[]{255, 255, 255, 0}), - TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[]{255, 255, 255, 0}), - TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[]{255, 255, 255, 0}), - TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[]{255, 255, 255, 0}), - TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[]{255, 255, 255, 0}), - TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[]{255, 255, 255, 0}), - TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[]{255, 255, 255, 0}), - TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[]{255, 255, 255, 0}), - TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[]{255, 255, 255, 0}), - TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[]{255, 255, 255, 0}), - TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[]{255, 255, 255, 0}), + TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[] {255, 255, 255, 0}), + TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[] {255, 255, 255, 0}), + TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[] {255, 255, 255, 0}), + TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[] {255, 255, 255, 0}), + TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[] {255, 255, 255, 0}), + TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[] {255, 255, 255, 0}), + TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[] {255, 255, 255, 0}), + TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[] {255, 255, 255, 0}), + TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[] {255, 255, 255, 0}), + TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[] {255, 255, 255, 0}), + TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[] {255, 255, 255, 0}), + TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[] {255, 255, 255, 0}), + TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[] {255, 255, 255, 0}), + TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[] {255, 255, 255, 0}), + TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[] {255, 255, 255, 0}), + TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS, new short[] {255, 255, 255, 0}), }; public static final ITexture[] OVERLAYS_ENERGY_IN_MULTI_WIRELESS_OFF = { - TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[]{0, 0, 0, 0}), - TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[]{0, 0, 0, 0}), - TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[]{0, 0, 0, 0}), - TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[]{0, 0, 0, 0}), - TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[]{0, 0, 0, 0}), - TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[]{0, 0, 0, 0}), - TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[]{0, 0, 0, 0}), - TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[]{0, 0, 0, 0}), - TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[]{0, 0, 0, 0}), - TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[]{0, 0, 0, 0}), - TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[]{0, 0, 0, 0}), - TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[]{0, 0, 0, 0}), - TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[]{0, 0, 0, 0}), - TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[]{0, 0, 0, 0}), - TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[]{0, 0, 0, 0}), - TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[]{0, 0, 0, 0}), + TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[] {0, 0, 0, 0}), + TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[] {0, 0, 0, 0}), + TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[] {0, 0, 0, 0}), + TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[] {0, 0, 0, 0}), + TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[] {0, 0, 0, 0}), + TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[] {0, 0, 0, 0}), + TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[] {0, 0, 0, 0}), + TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[] {0, 0, 0, 0}), + TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[] {0, 0, 0, 0}), + TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[] {0, 0, 0, 0}), + TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[] {0, 0, 0, 0}), + TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[] {0, 0, 0, 0}), + TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[] {0, 0, 0, 0}), + TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[] {0, 0, 0, 0}), + TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[] {0, 0, 0, 0}), + TextureFactory.of(OVERLAY_ENERGY_OFF_WIRELESS, new short[] {0, 0, 0, 0}), }; public static final ITexture[] OVERLAYS_ENERGY_OUT_MULTI = { - TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[]{180, 180, 180, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[]{220, 220, 220, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[]{255, 100, 0, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[]{255, 255, 30, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[]{128, 128, 128, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[]{240, 240, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[]{220, 220, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[]{200, 200, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[]{180, 180, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[]{160, 160, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[]{140, 140, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[]{120, 120, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[]{100, 100, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[]{80, 80, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[]{60, 60, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[]{40, 40, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] {180, 180, 180, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] {220, 220, 220, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] {255, 100, 0, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] {255, 255, 30, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] {128, 128, 128, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] {240, 240, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] {220, 220, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] {200, 200, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] {180, 180, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] {160, 160, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] {140, 140, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] {120, 120, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] {100, 100, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] {80, 80, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] {60, 60, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] {40, 40, 245, 0}), }; public static final ITexture[] OVERLAYS_ENERGY_IN_POWER = { - TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[]{180, 180, 180, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[]{220, 220, 220, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[]{255, 100, 0, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[]{255, 255, 30, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[]{128, 128, 128, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[]{240, 240, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[]{220, 220, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[]{200, 200, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[]{180, 180, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[]{160, 160, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[]{140, 140, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[]{120, 120, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[]{100, 100, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[]{80, 80, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[]{60, 60, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[]{40, 40, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] {180, 180, 180, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] {220, 220, 220, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] {255, 100, 0, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] {255, 255, 30, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] {128, 128, 128, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] {240, 240, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] {220, 220, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] {200, 200, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] {180, 180, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] {160, 160, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] {140, 140, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] {120, 120, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] {100, 100, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] {80, 80, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] {60, 60, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] {40, 40, 245, 0}), }; public static final ITexture[] OVERLAYS_ENERGY_OUT_POWER = { - TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[]{180, 180, 180, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[]{220, 220, 220, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[]{255, 100, 0, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[]{255, 255, 30, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[]{128, 128, 128, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[]{240, 240, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[]{220, 220, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[]{200, 200, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[]{180, 180, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[]{160, 160, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[]{140, 140, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[]{120, 120, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[]{100, 100, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[]{80, 80, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[]{60, 60, 245, 0}), - TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[]{40, 40, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] {180, 180, 180, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] {220, 220, 220, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] {255, 100, 0, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] {255, 255, 30, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] {128, 128, 128, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] {240, 240, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] {220, 220, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] {200, 200, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] {180, 180, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] {160, 160, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] {140, 140, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] {120, 120, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] {100, 100, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] {80, 80, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] {60, 60, 245, 0}), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] {40, 40, 245, 0}), }; public static final ITexture[] LOCKERS = { TextureFactory.of(OVERLAY_LOCKER_000), @@ -1969,7 +1992,8 @@ public class Textures { * USE casingTexturePages[page] instead of CASING_BLOCKS since it is casingTexturePages[0] */ @Deprecated - public static ITexture[] CASING_BLOCKS = new ITexture[128];//original variable still limited to 128 + public static ITexture[] CASING_BLOCKS = new ITexture[128]; // original variable still limited to 128 + public static ITexture[][] MACHINE_CASINGS = new ITexture[15][17]; /** * by Default pages are null @@ -1980,7 +2004,9 @@ public class Textures { * page 12: 0-127 GlodBlock * page 42: 0-126 glee8e, 127 KekzTech LSC base */ - public static ITexture[][] casingTexturePages = new ITexture[128][];//page holder so we don't make an short long array + public static ITexture[][] casingTexturePages = + new ITexture[128][]; // page holder so we don't make an short long array + public static final int ERROR_TEXTURE_INDEX = (1 << 7) + 97; private static final Map<ITexture, Integer> reverseMap = new HashMap<>(); @@ -1988,11 +2014,12 @@ public class Textures { for (byte i = 0; i < MACHINE_CASINGS.length; i++) for (byte j = 0; j < MACHINE_CASINGS[i].length; j++) MACHINE_CASINGS[i][j] = TextureFactory.of( - MACHINECASINGS_BOTTOM[i], - MACHINECASINGS_TOP[i], - MACHINECASINGS_SIDE[i], Dyes.getModulation(j - 1, Dyes.MACHINE_METAL.mRGBa)); + MACHINECASINGS_BOTTOM[i], + MACHINECASINGS_TOP[i], + MACHINECASINGS_SIDE[i], + Dyes.getModulation(j - 1, Dyes.MACHINE_METAL.mRGBa)); casingTexturePages[0] = new ITexture[128]; - //adds some known pages, modders also can do it... + // adds some known pages, modders also can do it... GT_Utility.addTexturePage((byte) 1); GT_Utility.addTexturePage((byte) 8); setCasingTextureForId(ERROR_TEXTURE_INDEX, ERROR_RENDERING[0]); @@ -2071,7 +2098,6 @@ public class Textures { public ResourceLocation getTextureFile() { return TextureMap.locationBlocksTexture; } - } } @@ -2122,30 +2148,31 @@ public class Textures { TURBINE_SMALL, TURBINE_LARGE, TURBINE_HUGE; - public static final IIconContainer[] - DURABILITY_BAR = { - DURABILITY_BAR_0, - DURABILITY_BAR_1, - DURABILITY_BAR_2, - DURABILITY_BAR_3, - DURABILITY_BAR_4, - DURABILITY_BAR_5, - DURABILITY_BAR_6, - DURABILITY_BAR_7, - DURABILITY_BAR_8, - }, - ENERGY_BAR = { - ENERGY_BAR_0, - ENERGY_BAR_1, - ENERGY_BAR_2, - ENERGY_BAR_3, - ENERGY_BAR_4, - ENERGY_BAR_5, - ENERGY_BAR_6, - ENERGY_BAR_7, - ENERGY_BAR_8, - }; + DURABILITY_BAR = + { + DURABILITY_BAR_0, + DURABILITY_BAR_1, + DURABILITY_BAR_2, + DURABILITY_BAR_3, + DURABILITY_BAR_4, + DURABILITY_BAR_5, + DURABILITY_BAR_6, + DURABILITY_BAR_7, + DURABILITY_BAR_8, + }, + ENERGY_BAR = + { + ENERGY_BAR_0, + ENERGY_BAR_1, + ENERGY_BAR_2, + ENERGY_BAR_3, + ENERGY_BAR_4, + ENERGY_BAR_5, + ENERGY_BAR_6, + ENERGY_BAR_7, + ENERGY_BAR_8, + }; public static final ITexture[] ERROR_RENDERING = {TextureFactory.of(RENDERING_ERROR)}; diff --git a/src/main/java/gregtech/api/enums/Tier.java b/src/main/java/gregtech/api/enums/Tier.java index c812fd6c08..bef43f92ae 100644 --- a/src/main/java/gregtech/api/enums/Tier.java +++ b/src/main/java/gregtech/api/enums/Tier.java @@ -7,64 +7,470 @@ import static gregtech.api.enums.GT_Values.V; */ public class Tier { public static final Tier[] - ELECTRIC = new Tier[]{ - new Tier(SubTag.ENERGY_ELECTRICITY, 0, V[0], 1, 1, 1, Materials.WroughtIron, ItemList.Hull_ULV, OrePrefixes.cableGt01.get(Materials.Lead), OrePrefixes.cableGt04.get(Materials.Lead), OrePrefixes.circuit.get(Materials.Primitive), OrePrefixes.circuit.get(Materials.Basic)), - new Tier(SubTag.ENERGY_ELECTRICITY, 1, V[1], 1, 1, 1, Materials.Steel, ItemList.Hull_LV, OrePrefixes.cableGt01.get(Materials.Tin), OrePrefixes.cableGt04.get(Materials.Tin), OrePrefixes.circuit.get(Materials.Basic), OrePrefixes.circuit.get(Materials.Good)), - new Tier(SubTag.ENERGY_ELECTRICITY, 2, V[2], 1, 1, 1, Materials.Aluminium, ItemList.Hull_MV, OrePrefixes.cableGt01.get(Materials.AnyCopper), OrePrefixes.cableGt04.get(Materials.AnyCopper), OrePrefixes.circuit.get(Materials.Good), OrePrefixes.circuit.get(Materials.Advanced)), - new Tier(SubTag.ENERGY_ELECTRICITY, 3, V[3], 1, 1, 1, Materials.StainlessSteel, ItemList.Hull_HV, OrePrefixes.cableGt01.get(Materials.Gold), OrePrefixes.cableGt04.get(Materials.Gold), OrePrefixes.circuit.get(Materials.Advanced), OrePrefixes.circuit.get(Materials.Data)), - new Tier(SubTag.ENERGY_ELECTRICITY, 4, V[4], 1, 1, 1, Materials.Titanium, ItemList.Hull_EV, OrePrefixes.cableGt01.get(Materials.Aluminium), OrePrefixes.cableGt04.get(Materials.Aluminium), OrePrefixes.circuit.get(Materials.Data), OrePrefixes.circuit.get(Materials.Elite)), - new Tier(SubTag.ENERGY_ELECTRICITY, 5, V[5], 1, 1, 1, Materials.TungstenSteel, ItemList.Hull_IV, OrePrefixes.cableGt01.get(Materials.Platinum), OrePrefixes.cableGt04.get(Materials.Platinum), OrePrefixes.circuit.get(Materials.Elite), OrePrefixes.circuit.get(Materials.Master)), - new Tier(SubTag.ENERGY_ELECTRICITY, 6, V[6], 1, 1, 1, Materials.Chrome, ItemList.Hull_LuV, OrePrefixes.cableGt01.get(Materials.NiobiumTitanium), OrePrefixes.cableGt04.get(Materials.NiobiumTitanium), OrePrefixes.circuit.get(Materials.Master), OrePrefixes.circuit.get(Materials.Ultimate)), - new Tier(SubTag.ENERGY_ELECTRICITY, 7, V[7], 1, 1, 1, Materials.Iridium, ItemList.Hull_ZPM, OrePrefixes.cableGt01.get(Materials.Naquadah), OrePrefixes.cableGt04.get(Materials.Naquadah), OrePrefixes.circuit.get(Materials.Ultimate), OrePrefixes.circuit.get(Materials.Superconductor)), - new Tier(SubTag.ENERGY_ELECTRICITY, 8, V[8], 1, 1, 1, Materials.Osmium, ItemList.Hull_UV, OrePrefixes.cableGt04.get(Materials.NaquadahAlloy), OrePrefixes.wireGt01.get(Materials.SuperconductorUHV), OrePrefixes.circuit.get(Materials.Superconductor), OrePrefixes.circuit.get(Materials.Infinite)), - new Tier(SubTag.ENERGY_ELECTRICITY, 9, V[9], 1, 1, 1, Materials.Neutronium, ItemList.Hull_MAX, OrePrefixes.wireGt01.get(Materials.SuperconductorUHV), OrePrefixes.wireGt04.get(Materials.SuperconductorUHV), OrePrefixes.circuit.get(Materials.Infinite), OrePrefixes.circuit.get(Materials.Infinite)), - new Tier(SubTag.ENERGY_ELECTRICITY,10, V[10], 1, 1, 1, Materials.Neutronium, ItemList.Hull_MAX, OrePrefixes.wireGt01.get(Materials.SuperconductorUHV), OrePrefixes.wireGt04.get(Materials.SuperconductorUHV), OrePrefixes.circuit.get(Materials.Infinite), OrePrefixes.circuit.get(Materials.Infinite)), - new Tier(SubTag.ENERGY_ELECTRICITY,11, V[11], 1, 1, 1, Materials.Neutronium, ItemList.Hull_MAX, OrePrefixes.wireGt01.get(Materials.SuperconductorUHV), OrePrefixes.wireGt04.get(Materials.SuperconductorUHV), OrePrefixes.circuit.get(Materials.Infinite), OrePrefixes.circuit.get(Materials.Infinite)), - new Tier(SubTag.ENERGY_ELECTRICITY,12, V[12], 1, 1, 1, Materials.Neutronium, ItemList.Hull_MAX, OrePrefixes.wireGt01.get(Materials.SuperconductorUHV), OrePrefixes.wireGt04.get(Materials.SuperconductorUHV), OrePrefixes.circuit.get(Materials.Infinite), OrePrefixes.circuit.get(Materials.Infinite)), - new Tier(SubTag.ENERGY_ELECTRICITY,13, V[13], 1, 1, 1, Materials.Neutronium, ItemList.Hull_MAX, OrePrefixes.wireGt01.get(Materials.SuperconductorUHV), OrePrefixes.wireGt04.get(Materials.SuperconductorUHV), OrePrefixes.circuit.get(Materials.Infinite), OrePrefixes.circuit.get(Materials.Infinite)), - new Tier(SubTag.ENERGY_ELECTRICITY,14, V[14], 1, 1, 1, Materials.Neutronium, ItemList.Hull_MAX, OrePrefixes.wireGt01.get(Materials.SuperconductorUHV), OrePrefixes.wireGt04.get(Materials.SuperconductorUHV), OrePrefixes.circuit.get(Materials.Infinite), OrePrefixes.circuit.get(Materials.Infinite)), - new Tier(SubTag.ENERGY_ELECTRICITY,15, V[15], 1, 1, 1, Materials.Neutronium, ItemList.Hull_MAX, OrePrefixes.wireGt01.get(Materials.SuperconductorUHV), OrePrefixes.wireGt04.get(Materials.SuperconductorUHV), OrePrefixes.circuit.get(Materials.Infinite), OrePrefixes.circuit.get(Materials.Infinite)), + ELECTRIC = + new Tier[] { + new Tier( + SubTag.ENERGY_ELECTRICITY, + 0, + V[0], + 1, + 1, + 1, + Materials.WroughtIron, + ItemList.Hull_ULV, + OrePrefixes.cableGt01.get(Materials.Lead), + OrePrefixes.cableGt04.get(Materials.Lead), + OrePrefixes.circuit.get(Materials.Primitive), + OrePrefixes.circuit.get(Materials.Basic)), + new Tier( + SubTag.ENERGY_ELECTRICITY, + 1, + V[1], + 1, + 1, + 1, + Materials.Steel, + ItemList.Hull_LV, + OrePrefixes.cableGt01.get(Materials.Tin), + OrePrefixes.cableGt04.get(Materials.Tin), + OrePrefixes.circuit.get(Materials.Basic), + OrePrefixes.circuit.get(Materials.Good)), + new Tier( + SubTag.ENERGY_ELECTRICITY, + 2, + V[2], + 1, + 1, + 1, + Materials.Aluminium, + ItemList.Hull_MV, + OrePrefixes.cableGt01.get(Materials.AnyCopper), + OrePrefixes.cableGt04.get(Materials.AnyCopper), + OrePrefixes.circuit.get(Materials.Good), + OrePrefixes.circuit.get(Materials.Advanced)), + new Tier( + SubTag.ENERGY_ELECTRICITY, + 3, + V[3], + 1, + 1, + 1, + Materials.StainlessSteel, + ItemList.Hull_HV, + OrePrefixes.cableGt01.get(Materials.Gold), + OrePrefixes.cableGt04.get(Materials.Gold), + OrePrefixes.circuit.get(Materials.Advanced), + OrePrefixes.circuit.get(Materials.Data)), + new Tier( + SubTag.ENERGY_ELECTRICITY, + 4, + V[4], + 1, + 1, + 1, + Materials.Titanium, + ItemList.Hull_EV, + OrePrefixes.cableGt01.get(Materials.Aluminium), + OrePrefixes.cableGt04.get(Materials.Aluminium), + OrePrefixes.circuit.get(Materials.Data), + OrePrefixes.circuit.get(Materials.Elite)), + new Tier( + SubTag.ENERGY_ELECTRICITY, + 5, + V[5], + 1, + 1, + 1, + Materials.TungstenSteel, + ItemList.Hull_IV, + OrePrefixes.cableGt01.get(Materials.Platinum), + OrePrefixes.cableGt04.get(Materials.Platinum), + OrePrefixes.circuit.get(Materials.Elite), + OrePrefixes.circuit.get(Materials.Master)), + new Tier( + SubTag.ENERGY_ELECTRICITY, + 6, + V[6], + 1, + 1, + 1, + Materials.Chrome, + ItemList.Hull_LuV, + OrePrefixes.cableGt01.get(Materials.NiobiumTitanium), + OrePrefixes.cableGt04.get(Materials.NiobiumTitanium), + OrePrefixes.circuit.get(Materials.Master), + OrePrefixes.circuit.get(Materials.Ultimate)), + new Tier( + SubTag.ENERGY_ELECTRICITY, + 7, + V[7], + 1, + 1, + 1, + Materials.Iridium, + ItemList.Hull_ZPM, + OrePrefixes.cableGt01.get(Materials.Naquadah), + OrePrefixes.cableGt04.get(Materials.Naquadah), + OrePrefixes.circuit.get(Materials.Ultimate), + OrePrefixes.circuit.get(Materials.Superconductor)), + new Tier( + SubTag.ENERGY_ELECTRICITY, + 8, + V[8], + 1, + 1, + 1, + Materials.Osmium, + ItemList.Hull_UV, + OrePrefixes.cableGt04.get(Materials.NaquadahAlloy), + OrePrefixes.wireGt01.get(Materials.SuperconductorUHV), + OrePrefixes.circuit.get(Materials.Superconductor), + OrePrefixes.circuit.get(Materials.Infinite)), + new Tier( + SubTag.ENERGY_ELECTRICITY, + 9, + V[9], + 1, + 1, + 1, + Materials.Neutronium, + ItemList.Hull_MAX, + OrePrefixes.wireGt01.get(Materials.SuperconductorUHV), + OrePrefixes.wireGt04.get(Materials.SuperconductorUHV), + OrePrefixes.circuit.get(Materials.Infinite), + OrePrefixes.circuit.get(Materials.Infinite)), + new Tier( + SubTag.ENERGY_ELECTRICITY, + 10, + V[10], + 1, + 1, + 1, + Materials.Neutronium, + ItemList.Hull_MAX, + OrePrefixes.wireGt01.get(Materials.SuperconductorUHV), + OrePrefixes.wireGt04.get(Materials.SuperconductorUHV), + OrePrefixes.circuit.get(Materials.Infinite), + OrePrefixes.circuit.get(Materials.Infinite)), + new Tier( + SubTag.ENERGY_ELECTRICITY, + 11, + V[11], + 1, + 1, + 1, + Materials.Neutronium, + ItemList.Hull_MAX, + OrePrefixes.wireGt01.get(Materials.SuperconductorUHV), + OrePrefixes.wireGt04.get(Materials.SuperconductorUHV), + OrePrefixes.circuit.get(Materials.Infinite), + OrePrefixes.circuit.get(Materials.Infinite)), + new Tier( + SubTag.ENERGY_ELECTRICITY, + 12, + V[12], + 1, + 1, + 1, + Materials.Neutronium, + ItemList.Hull_MAX, + OrePrefixes.wireGt01.get(Materials.SuperconductorUHV), + OrePrefixes.wireGt04.get(Materials.SuperconductorUHV), + OrePrefixes.circuit.get(Materials.Infinite), + OrePrefixes.circuit.get(Materials.Infinite)), + new Tier( + SubTag.ENERGY_ELECTRICITY, + 13, + V[13], + 1, + 1, + 1, + Materials.Neutronium, + ItemList.Hull_MAX, + OrePrefixes.wireGt01.get(Materials.SuperconductorUHV), + OrePrefixes.wireGt04.get(Materials.SuperconductorUHV), + OrePrefixes.circuit.get(Materials.Infinite), + OrePrefixes.circuit.get(Materials.Infinite)), + new Tier( + SubTag.ENERGY_ELECTRICITY, + 14, + V[14], + 1, + 1, + 1, + Materials.Neutronium, + ItemList.Hull_MAX, + OrePrefixes.wireGt01.get(Materials.SuperconductorUHV), + OrePrefixes.wireGt04.get(Materials.SuperconductorUHV), + OrePrefixes.circuit.get(Materials.Infinite), + OrePrefixes.circuit.get(Materials.Infinite)), + new Tier( + SubTag.ENERGY_ELECTRICITY, + 15, + V[15], + 1, + 1, + 1, + Materials.Neutronium, + ItemList.Hull_MAX, + OrePrefixes.wireGt01.get(Materials.SuperconductorUHV), + OrePrefixes.wireGt04.get(Materials.SuperconductorUHV), + OrePrefixes.circuit.get(Materials.Infinite), + OrePrefixes.circuit.get(Materials.Infinite)), - //READ GT_VALUES CLASS BEFORE YOU START ADDING STUFF TO TIERS 8+ - and probably dont do it in GT but in GTNH core mod - that way we shouldnt need to set the tier class - }, ROTATIONAL = new Tier[]{ - new Tier(SubTag.ENERGY_ROTATIONAL, 1, 32, 1, 1, 1, Materials.Wood, OrePrefixes.frameGt.get(Materials.Wood), OrePrefixes.stick.get(Materials.Wood), OrePrefixes.ingot.get(Materials.Wood), OrePrefixes.gearGt.get(Materials.Wood), OrePrefixes.gearGt.get(Materials.Stone)), - new Tier(SubTag.ENERGY_ROTATIONAL, 1, 32, 1, 2, 2, Materials.WoodSealed, OrePrefixes.frameGt.get(Materials.WoodSealed), OrePrefixes.stick.get(Materials.WoodSealed), OrePrefixes.ingot.get(Materials.WoodSealed), OrePrefixes.gearGt.get(Materials.WoodSealed), OrePrefixes.gearGt.get(Materials.Stone)), - new Tier(SubTag.ENERGY_ROTATIONAL, 2, 128, 1, 1, 1, Materials.Stone, OrePrefixes.frameGt.get(Materials.Stone), OrePrefixes.stick.get(Materials.Stone), OrePrefixes.ingot.get(Materials.Stone), OrePrefixes.gearGt.get(Materials.Stone), OrePrefixes.gearGt.get(Materials.Bronze)), - new Tier(SubTag.ENERGY_ROTATIONAL, 2, 128, 1, 2, 2, Materials.IronWood, OrePrefixes.frameGt.get(Materials.IronWood), OrePrefixes.stick.get(Materials.IronWood), OrePrefixes.ingot.get(Materials.IronWood), OrePrefixes.gearGt.get(Materials.IronWood), OrePrefixes.gearGt.get(Materials.Bronze)), - new Tier(SubTag.ENERGY_ROTATIONAL, 3, 512, 1, 1, 1, Materials.Bronze, OrePrefixes.frameGt.get(Materials.Bronze), OrePrefixes.stick.get(Materials.Bronze), OrePrefixes.ingot.get(Materials.Bronze), OrePrefixes.gearGt.get(Materials.Bronze), OrePrefixes.gearGt.get(Materials.Steel)), - new Tier(SubTag.ENERGY_ROTATIONAL, 3, 512, 1, 2, 2, Materials.Brass, OrePrefixes.frameGt.get(Materials.Brass), OrePrefixes.stick.get(Materials.Brass), OrePrefixes.ingot.get(Materials.Brass), OrePrefixes.gearGt.get(Materials.Brass), OrePrefixes.gearGt.get(Materials.Steel)), - new Tier(SubTag.ENERGY_ROTATIONAL, 4, 2048, 1, 1, 1, Materials.Steel, OrePrefixes.frameGt.get(Materials.Steel), OrePrefixes.stick.get(Materials.Steel), OrePrefixes.ingot.get(Materials.Steel), OrePrefixes.gearGt.get(Materials.Steel), OrePrefixes.gearGt.get(Materials.TungstenSteel)), - new Tier(SubTag.ENERGY_ROTATIONAL, 4, 2048, 1, 2, 2, Materials.Titanium, OrePrefixes.frameGt.get(Materials.Titanium), OrePrefixes.stick.get(Materials.Titanium), OrePrefixes.ingot.get(Materials.Titanium), OrePrefixes.gearGt.get(Materials.Titanium), OrePrefixes.gearGt.get(Materials.TungstenSteel)), - new Tier(SubTag.ENERGY_ROTATIONAL, 5, 8192, 1, 1, 1, Materials.TungstenSteel, OrePrefixes.frameGt.get(Materials.TungstenSteel), OrePrefixes.stick.get(Materials.TungstenSteel), OrePrefixes.ingot.get(Materials.TungstenSteel), OrePrefixes.gearGt.get(Materials.TungstenSteel), OrePrefixes.gearGt.get(Materials.Iridium)), - new Tier(SubTag.ENERGY_ROTATIONAL, 6, 32768, 1, 1, 1, Materials.Iridium, OrePrefixes.frameGt.get(Materials.Iridium), OrePrefixes.stick.get(Materials.Iridium), OrePrefixes.ingot.get(Materials.Iridium), OrePrefixes.gearGt.get(Materials.Iridium), OrePrefixes.gearGt.get(Materials.Neutronium)), - new Tier(SubTag.ENERGY_ROTATIONAL, 9, Integer.MAX_VALUE-7, 1, 1, 1, Materials.Neutronium, OrePrefixes.frameGt.get(Materials.Neutronium), OrePrefixes.stick.get(Materials.Neutronium), OrePrefixes.ingot.get(Materials.Neutronium), OrePrefixes.gearGt.get(Materials.Neutronium), OrePrefixes.gearGt.get(Materials.Neutronium)), - }, STEAM = new Tier[]{ - new Tier(SubTag.ENERGY_STEAM, 1, 32, 1, 1, 1, Materials.Bronze, OrePrefixes.frameGt.get(Materials.Bronze), OrePrefixes.pipeMedium.get(Materials.Bronze), OrePrefixes.pipeHuge.get(Materials.Bronze), OrePrefixes.pipeMedium.get(Materials.Bronze), OrePrefixes.pipeLarge.get(Materials.Bronze)), - new Tier(SubTag.ENERGY_STEAM, 2, 128, 1, 1, 1, Materials.Steel, OrePrefixes.frameGt.get(Materials.Steel), OrePrefixes.pipeMedium.get(Materials.Steel), OrePrefixes.pipeHuge.get(Materials.Steel), OrePrefixes.pipeMedium.get(Materials.Steel), OrePrefixes.pipeLarge.get(Materials.Steel)), - new Tier(SubTag.ENERGY_STEAM, 3, 512, 1, 1, 1, Materials.Titanium, OrePrefixes.frameGt.get(Materials.Titanium), OrePrefixes.pipeMedium.get(Materials.Titanium), OrePrefixes.pipeHuge.get(Materials.Titanium), OrePrefixes.pipeMedium.get(Materials.Titanium), OrePrefixes.pipeLarge.get(Materials.Titanium)), - new Tier(SubTag.ENERGY_STEAM, 4, 2048, 1, 1, 1, Materials.TungstenSteel, OrePrefixes.frameGt.get(Materials.TungstenSteel), OrePrefixes.pipeMedium.get(Materials.TungstenSteel), OrePrefixes.pipeHuge.get(Materials.TungstenSteel), OrePrefixes.pipeMedium.get(Materials.TungstenSteel), OrePrefixes.pipeLarge.get(Materials.TungstenSteel)), - new Tier(SubTag.ENERGY_STEAM, 5, 8192, 1, 1, 1, Materials.Iridium, OrePrefixes.frameGt.get(Materials.Iridium), OrePrefixes.pipeMedium.get(Materials.Iridium), OrePrefixes.pipeHuge.get(Materials.Iridium), OrePrefixes.pipeMedium.get(Materials.Iridium), OrePrefixes.pipeLarge.get(Materials.Iridium)), - new Tier(SubTag.ENERGY_STEAM, 9, Integer.MAX_VALUE - 7, 1, 1, 1, Materials.Neutronium, OrePrefixes.frameGt.get(Materials.Neutronium), OrePrefixes.pipeMedium.get(Materials.Neutronium), OrePrefixes.pipeHuge.get(Materials.Neutronium), OrePrefixes.pipeMedium.get(Materials.Neutronium), OrePrefixes.pipeLarge.get(Materials.Neutronium)), - }; + // READ GT_VALUES CLASS BEFORE YOU START ADDING STUFF TO TIERS 8+ - and probably dont do it in + // GT but in GTNH core mod - that way we shouldnt need to set the tier class + }, + ROTATIONAL = + new Tier[] { + new Tier( + SubTag.ENERGY_ROTATIONAL, + 1, + 32, + 1, + 1, + 1, + Materials.Wood, + OrePrefixes.frameGt.get(Materials.Wood), + OrePrefixes.stick.get(Materials.Wood), + OrePrefixes.ingot.get(Materials.Wood), + OrePrefixes.gearGt.get(Materials.Wood), + OrePrefixes.gearGt.get(Materials.Stone)), + new Tier( + SubTag.ENERGY_ROTATIONAL, + 1, + 32, + 1, + 2, + 2, + Materials.WoodSealed, + OrePrefixes.frameGt.get(Materials.WoodSealed), + OrePrefixes.stick.get(Materials.WoodSealed), + OrePrefixes.ingot.get(Materials.WoodSealed), + OrePrefixes.gearGt.get(Materials.WoodSealed), + OrePrefixes.gearGt.get(Materials.Stone)), + new Tier( + SubTag.ENERGY_ROTATIONAL, + 2, + 128, + 1, + 1, + 1, + Materials.Stone, + OrePrefixes.frameGt.get(Materials.Stone), + OrePrefixes.stick.get(Materials.Stone), + OrePrefixes.ingot.get(Materials.Stone), + OrePrefixes.gearGt.get(Materials.Stone), + OrePrefixes.gearGt.get(Materials.Bronze)), + new Tier( + SubTag.ENERGY_ROTATIONAL, + 2, + 128, + 1, + 2, + 2, + Materials.IronWood, + OrePrefixes.frameGt.get(Materials.IronWood), + OrePrefixes.stick.get(Materials.IronWood), + OrePrefixes.ingot.get(Materials.IronWood), + OrePrefixes.gearGt.get(Materials.IronWood), + OrePrefixes.gearGt.get(Materials.Bronze)), + new Tier( + SubTag.ENERGY_ROTATIONAL, + 3, + 512, + 1, + 1, + 1, + Materials.Bronze, + OrePrefixes.frameGt.get(Materials.Bronze), + OrePrefixes.stick.get(Materials.Bronze), + OrePrefixes.ingot.get(Materials.Bronze), + OrePrefixes.gearGt.get(Materials.Bronze), + OrePrefixes.gearGt.get(Materials.Steel)), + new Tier( + SubTag.ENERGY_ROTATIONAL, + 3, + 512, + 1, + 2, + 2, + Materials.Brass, + OrePrefixes.frameGt.get(Materials.Brass), + OrePrefixes.stick.get(Materials.Brass), + OrePrefixes.ingot.get(Materials.Brass), + OrePrefixes.gearGt.get(Materials.Brass), + OrePrefixes.gearGt.get(Materials.Steel)), + new Tier( + SubTag.ENERGY_ROTATIONAL, + 4, + 2048, + 1, + 1, + 1, + Materials.Steel, + OrePrefixes.frameGt.get(Materials.Steel), + OrePrefixes.stick.get(Materials.Steel), + OrePrefixes.ingot.get(Materials.Steel), + OrePrefixes.gearGt.get(Materials.Steel), + OrePrefixes.gearGt.get(Materials.TungstenSteel)), + new Tier( + SubTag.ENERGY_ROTATIONAL, + 4, + 2048, + 1, + 2, + 2, + Materials.Titanium, + OrePrefixes.frameGt.get(Materials.Titanium), + OrePrefixes.stick.get(Materials.Titanium), + OrePrefixes.ingot.get(Materials.Titanium), + OrePrefixes.gearGt.get(Materials.Titanium), + OrePrefixes.gearGt.get(Materials.TungstenSteel)), + new Tier( + SubTag.ENERGY_ROTATIONAL, + 5, + 8192, + 1, + 1, + 1, + Materials.TungstenSteel, + OrePrefixes.frameGt.get(Materials.TungstenSteel), + OrePrefixes.stick.get(Materials.TungstenSteel), + OrePrefixes.ingot.get(Materials.TungstenSteel), + OrePrefixes.gearGt.get(Materials.TungstenSteel), + OrePrefixes.gearGt.get(Materials.Iridium)), + new Tier( + SubTag.ENERGY_ROTATIONAL, + 6, + 32768, + 1, + 1, + 1, + Materials.Iridium, + OrePrefixes.frameGt.get(Materials.Iridium), + OrePrefixes.stick.get(Materials.Iridium), + OrePrefixes.ingot.get(Materials.Iridium), + OrePrefixes.gearGt.get(Materials.Iridium), + OrePrefixes.gearGt.get(Materials.Neutronium)), + new Tier( + SubTag.ENERGY_ROTATIONAL, + 9, + Integer.MAX_VALUE - 7, + 1, + 1, + 1, + Materials.Neutronium, + OrePrefixes.frameGt.get(Materials.Neutronium), + OrePrefixes.stick.get(Materials.Neutronium), + OrePrefixes.ingot.get(Materials.Neutronium), + OrePrefixes.gearGt.get(Materials.Neutronium), + OrePrefixes.gearGt.get(Materials.Neutronium)), + }, + STEAM = + new Tier[] { + new Tier( + SubTag.ENERGY_STEAM, + 1, + 32, + 1, + 1, + 1, + Materials.Bronze, + OrePrefixes.frameGt.get(Materials.Bronze), + OrePrefixes.pipeMedium.get(Materials.Bronze), + OrePrefixes.pipeHuge.get(Materials.Bronze), + OrePrefixes.pipeMedium.get(Materials.Bronze), + OrePrefixes.pipeLarge.get(Materials.Bronze)), + new Tier( + SubTag.ENERGY_STEAM, + 2, + 128, + 1, + 1, + 1, + Materials.Steel, + OrePrefixes.frameGt.get(Materials.Steel), + OrePrefixes.pipeMedium.get(Materials.Steel), + OrePrefixes.pipeHuge.get(Materials.Steel), + OrePrefixes.pipeMedium.get(Materials.Steel), + OrePrefixes.pipeLarge.get(Materials.Steel)), + new Tier( + SubTag.ENERGY_STEAM, + 3, + 512, + 1, + 1, + 1, + Materials.Titanium, + OrePrefixes.frameGt.get(Materials.Titanium), + OrePrefixes.pipeMedium.get(Materials.Titanium), + OrePrefixes.pipeHuge.get(Materials.Titanium), + OrePrefixes.pipeMedium.get(Materials.Titanium), + OrePrefixes.pipeLarge.get(Materials.Titanium)), + new Tier( + SubTag.ENERGY_STEAM, + 4, + 2048, + 1, + 1, + 1, + Materials.TungstenSteel, + OrePrefixes.frameGt.get(Materials.TungstenSteel), + OrePrefixes.pipeMedium.get(Materials.TungstenSteel), + OrePrefixes.pipeHuge.get(Materials.TungstenSteel), + OrePrefixes.pipeMedium.get(Materials.TungstenSteel), + OrePrefixes.pipeLarge.get(Materials.TungstenSteel)), + new Tier( + SubTag.ENERGY_STEAM, + 5, + 8192, + 1, + 1, + 1, + Materials.Iridium, + OrePrefixes.frameGt.get(Materials.Iridium), + OrePrefixes.pipeMedium.get(Materials.Iridium), + OrePrefixes.pipeHuge.get(Materials.Iridium), + OrePrefixes.pipeMedium.get(Materials.Iridium), + OrePrefixes.pipeLarge.get(Materials.Iridium)), + new Tier( + SubTag.ENERGY_STEAM, + 9, + Integer.MAX_VALUE - 7, + 1, + 1, + 1, + Materials.Neutronium, + OrePrefixes.frameGt.get(Materials.Neutronium), + OrePrefixes.pipeMedium.get(Materials.Neutronium), + OrePrefixes.pipeHuge.get(Materials.Neutronium), + OrePrefixes.pipeMedium.get(Materials.Neutronium), + OrePrefixes.pipeLarge.get(Materials.Neutronium)), + }; /** * Used for Crafting Recipes */ - public final Object - mHullObject, - mConductingObject, - mLargerConductingObject, - mManagingObject, - mBetterManagingObject; + public final Object mHullObject, mConductingObject, mLargerConductingObject, mManagingObject, mBetterManagingObject; + private final SubTag mType; private final byte mRank; - private final long - mPrimaryValue, - mSecondaryValue, - mSpeedMultiplier, - mEnergyCostMultiplier; + private final long mPrimaryValue, mSecondaryValue, mSpeedMultiplier, mEnergyCostMultiplier; private final Materials mMaterial; - public Tier(SubTag aType, int aRank, long aPrimaryValue, long aSecondaryValue, long aSpeedMultiplier, long aEnergyCostMultiplier, Materials aMaterial, Object aHullObject, Object aConductingObject, Object aLargerConductingObject, Object aManagingObject, Object aBetterManagingObject) { + public Tier( + SubTag aType, + int aRank, + long aPrimaryValue, + long aSecondaryValue, + long aSpeedMultiplier, + long aEnergyCostMultiplier, + Materials aMaterial, + Object aHullObject, + Object aConductingObject, + Object aLargerConductingObject, + Object aManagingObject, + Object aBetterManagingObject) { mType = aType; mRank = (byte) aRank; mPrimaryValue = aPrimaryValue; diff --git a/src/main/java/gregtech/api/enums/ToolDictNames.java b/src/main/java/gregtech/api/enums/ToolDictNames.java index d41c63c717..27e297de5e 100644 --- a/src/main/java/gregtech/api/enums/ToolDictNames.java +++ b/src/main/java/gregtech/api/enums/ToolDictNames.java @@ -32,7 +32,7 @@ public enum ToolDictNames { public static boolean contains(String aName) { if (!aName.startsWith("craftingTool")) return false; - for (ToolDictNames tool: ToolDictNames.values()) { + for (ToolDictNames tool : ToolDictNames.values()) { if (tool.toString().equals(aName)) { return true; } diff --git a/src/main/java/gregtech/api/events/BlockScanningEvent.java b/src/main/java/gregtech/api/events/BlockScanningEvent.java index 93c4f6881c..85d2e3e07a 100644 --- a/src/main/java/gregtech/api/events/BlockScanningEvent.java +++ b/src/main/java/gregtech/api/events/BlockScanningEvent.java @@ -1,14 +1,13 @@ package gregtech.api.events; import cpw.mods.fml.common.eventhandler.Cancelable; +import java.util.ArrayList; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.event.world.WorldEvent; -import java.util.ArrayList; - @Cancelable public class BlockScanningEvent extends WorldEvent { @@ -25,7 +24,20 @@ public class BlockScanningEvent extends WorldEvent { */ public int mEUCost = 0; - public BlockScanningEvent(World aWorld, EntityPlayer aPlayer, int aX, int aY, int aZ, byte aSide, int aScanLevel, Block aBlock, TileEntity aTileEntity, ArrayList<String> aList, float aClickX, float aClickY, float aClickZ) { + public BlockScanningEvent( + World aWorld, + EntityPlayer aPlayer, + int aX, + int aY, + int aZ, + byte aSide, + int aScanLevel, + Block aBlock, + TileEntity aTileEntity, + ArrayList<String> aList, + float aClickX, + float aClickY, + float aClickZ) { super(aWorld); mPlayer = aPlayer; mScanLevel = aScanLevel; diff --git a/src/main/java/gregtech/api/fluid/FluidTankGT.java b/src/main/java/gregtech/api/fluid/FluidTankGT.java index 5df9e2638a..93b3c87575 100644 --- a/src/main/java/gregtech/api/fluid/FluidTankGT.java +++ b/src/main/java/gregtech/api/fluid/FluidTankGT.java @@ -1,16 +1,15 @@ package gregtech.api.fluid; +import static com.google.common.primitives.Ints.saturatedCast; + import gregtech.api.util.GT_Utility; +import java.util.Map; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidTank; -import java.util.Map; - -import static com.google.common.primitives.Ints.saturatedCast; - public class FluidTankGT implements IFluidTank { public final FluidTankGT[] AS_ARRAY = new FluidTankGT[] {this}; private FluidStack mFluid; @@ -18,6 +17,7 @@ public class FluidTankGT implements IFluidTank { private boolean mPreventDraining = false, mVoidExcess = false, mChangedFluids = false; /** HashMap of adjustable Tank Sizes based on Fluids if needed. */ private Map<String, Long> mAdjustableCapacity = null; + private long mAdjustableMultiplier = 1; /** Gives you a Tank Index in case there is multiple Tanks on a TileEntity that cares. */ public int mIndex = 0; @@ -102,7 +102,7 @@ public class FluidTankGT implements IFluidTank { @Override public FluidStack drain(int aDrained, boolean aDoDrain) { if (isEmpty() || aDrained <= 0) return null; - if (mAmount < aDrained) aDrained = (int)mAmount; + if (mAmount < aDrained) aDrained = (int) mAmount; final FluidStack rFluid = new FluidStack(mFluid, aDrained); if (aDoDrain) { mAmount -= aDrained; @@ -190,11 +190,20 @@ public class FluidTankGT implements IFluidTank { } else mAmount = tCapacity; return mVoidExcess ? aFluid.amount : (int) tFilled; } - return saturatedCast(isEmpty() ? mVoidExcess ? aFluid.amount : Math.min(capacity(aFluid), aFluid.amount) : contains(aFluid) ? mVoidExcess ? aFluid.amount : Math.min(capacity(aFluid) - mAmount, aFluid.amount) : 0); + return saturatedCast( + isEmpty() + ? mVoidExcess ? aFluid.amount : Math.min(capacity(aFluid), aFluid.amount) + : contains(aFluid) + ? mVoidExcess ? aFluid.amount : Math.min(capacity(aFluid) - mAmount, aFluid.amount) + : 0); } public boolean canFillAll(FluidStack aFluid) { - return aFluid == null || aFluid.amount <= 0 || (isEmpty() ? mVoidExcess || aFluid.amount <= capacity(aFluid) : contains(aFluid) && (mVoidExcess || mAmount + aFluid.amount <= capacity(aFluid))); + return aFluid == null + || aFluid.amount <= 0 + || (isEmpty() + ? mVoidExcess || aFluid.amount <= capacity(aFluid) + : contains(aFluid) && (mVoidExcess || mAmount + aFluid.amount <= capacity(aFluid))); } public boolean canFillAll(long aAmount) { @@ -341,23 +350,22 @@ public class FluidTankGT implements IFluidTank { } public long capacity(FluidStack aFluid) { - if(mAdjustableCapacity == null || aFluid == null) - return mCapacity; + if (mAdjustableCapacity == null || aFluid == null) return mCapacity; return capacity(aFluid.getFluid()); } public long capacity(Fluid aFluid) { - if(mAdjustableCapacity == null || aFluid == null) - return mCapacity; + if (mAdjustableCapacity == null || aFluid == null) return mCapacity; return capacity(aFluid.getName()); } public long capacity(String aFluid) { - if( mAdjustableCapacity == null || aFluid == null) - return mCapacity; + if (mAdjustableCapacity == null || aFluid == null) return mCapacity; final Long tSize = mAdjustableCapacity.get(aFluid); - return tSize == null ? Math.max(mAmount, mCapacity) : Math.max(tSize * mAdjustableMultiplier, Math.max(mAmount, mCapacity)); + return tSize == null + ? Math.max(mAmount, mCapacity) + : Math.max(tSize * mAdjustableMultiplier, Math.max(mAmount, mCapacity)); } public boolean isHalf() { @@ -440,5 +448,4 @@ public class FluidTankGT implements IFluidTank { public FluidTankInfo getInfo() { return new FluidTankInfo(isEmpty() ? null : mFluid.copy(), saturatedCast(capacity())); } - } diff --git a/src/main/java/gregtech/api/graphs/GenerateNodeMap.java b/src/main/java/gregtech/api/graphs/GenerateNodeMap.java index 4d1b7a7461..c0ee8b9490 100644 --- a/src/main/java/gregtech/api/graphs/GenerateNodeMap.java +++ b/src/main/java/gregtech/api/graphs/GenerateNodeMap.java @@ -1,19 +1,17 @@ package gregtech.api.graphs; +import static gregtech.api.util.GT_Utility.getOppositeSide; + import gregtech.api.graphs.consumers.ConsumerNode; import gregtech.api.graphs.paths.NodePath; import gregtech.api.metatileentity.BaseMetaPipeEntity; import gregtech.api.metatileentity.MetaPipeEntity; -import net.minecraft.tileentity.TileEntity; - import java.util.ArrayList; import java.util.HashSet; - -import static gregtech.api.util.GT_Utility.getOppositeSide; - +import net.minecraft.tileentity.TileEntity; // generates the node map -abstract public class GenerateNodeMap { +public abstract class GenerateNodeMap { // clearing the node map to make sure it is gone on reset public static void clearNodeMap(Node aNode, int aReturnNodeValue) { if (aNode.mTileEntity instanceof BaseMetaPipeEntity) { @@ -33,8 +31,7 @@ abstract public class GenerateNodeMap { } Node tNextNode = aNode.mNeighbourNodes[i]; if (tNextNode == null) continue; - if (tNextNode.mNodeValue != aReturnNodeValue) - clearNodeMap(tNextNode, aNode.mNodeValue); + if (tNextNode.mNodeValue != aReturnNodeValue) clearNodeMap(tNextNode, aNode.mNodeValue); aNode.mNeighbourNodes[i] = null; } } @@ -49,8 +46,13 @@ abstract public class GenerateNodeMap { } // gets the next node - protected void generateNextNode(BaseMetaPipeEntity aPipe, Node aPipeNode, byte aInvalidSide, int aNextNodeValue, - ArrayList<ConsumerNode> tConsumers, HashSet<Node> tNodeMap) { + protected void generateNextNode( + BaseMetaPipeEntity aPipe, + Node aPipeNode, + byte aInvalidSide, + int aNextNodeValue, + ArrayList<ConsumerNode> tConsumers, + HashSet<Node> tNodeMap) { MetaPipeEntity tMetaPipe = (MetaPipeEntity) aPipe.getMetaTileEntity(); for (byte i = 0; i < 6; i++) { if (i == aInvalidSide) { @@ -61,8 +63,14 @@ abstract public class GenerateNodeMap { ArrayList<MetaPipeEntity> tNewPipes = new ArrayList<>(); Pair nextTileEntity = getNextValidTileEntity(tNextTileEntity, tNewPipes, i, tNodeMap); if (nextTileEntity != null) { - Node tNextNode = generateNode(nextTileEntity.mTileEntity, aPipeNode, aNextNodeValue + 1, tNewPipes, - nextTileEntity.mSide, tConsumers, tNodeMap); + Node tNextNode = generateNode( + nextTileEntity.mTileEntity, + aPipeNode, + aNextNodeValue + 1, + tNewPipes, + nextTileEntity.mSide, + tConsumers, + tNodeMap); if (tNextNode != null) { aNextNodeValue = tNextNode.mHighestNodeValue; aPipeNode.mHighestNodeValue = tNextNode.mHighestNodeValue; @@ -77,8 +85,14 @@ abstract public class GenerateNodeMap { } // on a valid tile entity create a new node - protected Node generateNode(TileEntity aTileEntity, Node aPreviousNode, int aNextNodeValue, ArrayList<MetaPipeEntity> aPipes, - int aSide, ArrayList<ConsumerNode> aConsumers, HashSet<Node> aNodeMap) { + protected Node generateNode( + TileEntity aTileEntity, + Node aPreviousNode, + int aNextNodeValue, + ArrayList<MetaPipeEntity> aPipes, + int aSide, + ArrayList<ConsumerNode> aConsumers, + HashSet<Node> aNodeMap) { if (aTileEntity.isInvalid()) return null; byte tSideOp = getOppositeSide(aSide); byte tInvalidSide = aPreviousNode == null ? -1 : tSideOp; @@ -96,7 +110,7 @@ abstract public class GenerateNodeMap { } tPipe.setNode(tPipeNode); aNodeMap.add(tPipeNode); - tPipeNode.mSelfPath = getNewPath(new MetaPipeEntity[]{tMetaPipe}); + tPipeNode.mSelfPath = getNewPath(new MetaPipeEntity[] {tMetaPipe}); tThisNode = tPipeNode; if (tInvalidSide > -1) { tPipeNode.mNeighbourNodes[tInvalidSide] = aPreviousNode; @@ -123,14 +137,14 @@ abstract public class GenerateNodeMap { } // go over the pipes until we see a valid tile entity that needs a node - protected Pair getNextValidTileEntity(TileEntity aTileEntity, ArrayList<MetaPipeEntity> aPipes, byte aSide, HashSet<Node> aNodeMap) { + protected Pair getNextValidTileEntity( + TileEntity aTileEntity, ArrayList<MetaPipeEntity> aPipes, byte aSide, HashSet<Node> aNodeMap) { if (isPipe(aTileEntity)) { BaseMetaPipeEntity tPipe = (BaseMetaPipeEntity) aTileEntity; MetaPipeEntity tMetaPipe = (MetaPipeEntity) tPipe.getMetaTileEntity(); Node tNode = tPipe.getNode(); if (tNode != null) { - if (aNodeMap.contains(tNode)) - return null; + if (aNodeMap.contains(tNode)) return null; } int tConnections = getNumberOfConnections(tMetaPipe); if (tConnections == 2) { @@ -161,13 +175,15 @@ abstract public class GenerateNodeMap { } // checks if the tile entity is a consumer and add to the list - abstract protected boolean addConsumer(TileEntity aTileEntity, byte aSide, int aNodeValue, ArrayList<ConsumerNode> aConsumers); + protected abstract boolean addConsumer( + TileEntity aTileEntity, byte aSide, int aNodeValue, ArrayList<ConsumerNode> aConsumers); // get correct pathClass that you need for your node network protected abstract NodePath getNewPath(MetaPipeEntity[] aPipes); // used for if you need to use dead ends for something can be null - protected Node getEmptyNode(int aNodeValue, byte aSide, TileEntity aTileEntity, ArrayList<ConsumerNode> aConsumers) { + protected Node getEmptyNode( + int aNodeValue, byte aSide, TileEntity aTileEntity, ArrayList<ConsumerNode> aConsumers) { return null; } diff --git a/src/main/java/gregtech/api/graphs/GenerateNodeMapPower.java b/src/main/java/gregtech/api/graphs/GenerateNodeMapPower.java index bb7a1f58e1..293a46502a 100644 --- a/src/main/java/gregtech/api/graphs/GenerateNodeMapPower.java +++ b/src/main/java/gregtech/api/graphs/GenerateNodeMapPower.java @@ -16,11 +16,10 @@ import gregtech.api.metatileentity.BaseMetaTileEntity; import gregtech.api.metatileentity.MetaPipeEntity; import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Cable; import ic2.api.energy.tile.IEnergySink; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; - import java.util.ArrayList; import java.util.HashSet; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; // node map generator for power distribution public class GenerateNodeMapPower extends GenerateNodeMap { @@ -30,11 +29,13 @@ public class GenerateNodeMapPower extends GenerateNodeMap { @Override protected boolean isPipe(TileEntity aTileEntity) { - return super.isPipe(aTileEntity) && ((BaseMetaPipeEntity) aTileEntity).getMetaTileEntity() instanceof GT_MetaPipeEntity_Cable; + return super.isPipe(aTileEntity) + && ((BaseMetaPipeEntity) aTileEntity).getMetaTileEntity() instanceof GT_MetaPipeEntity_Cable; } @Override - protected boolean addConsumer(TileEntity aTileEntity, byte aSide, int aNodeValue, ArrayList<ConsumerNode> aConsumers) { + protected boolean addConsumer( + TileEntity aTileEntity, byte aSide, int aNodeValue, ArrayList<ConsumerNode> aConsumers) { if (aTileEntity instanceof BaseMetaTileEntity) { BaseMetaTileEntity tBaseTileEntity = (BaseMetaTileEntity) aTileEntity; if (tBaseTileEntity.inputEnergyFrom(aSide, false)) { @@ -62,12 +63,14 @@ public class GenerateNodeMapPower extends GenerateNodeMap { tNextTo = aTileEntity.getWorldObj().getTileEntity(dX, dY, dZ); if (((IEnergySink) aTileEntity).acceptsEnergyFrom(tNextTo, ForgeDirection.getOrientation(aSide))) { - ConsumerNode tConsumerNode = new NodeEnergySink(aNodeValue, (IEnergySink) aTileEntity, aSide, aConsumers); + ConsumerNode tConsumerNode = + new NodeEnergySink(aNodeValue, (IEnergySink) aTileEntity, aSide, aConsumers); aConsumers.add(tConsumerNode); return true; } } else if (GregTech_API.mOutputRF && aTileEntity instanceof IEnergyReceiver) { - ConsumerNode tConsumerNode = new NodeEnergyReceiver(aNodeValue, (IEnergyReceiver) aTileEntity, aSide, aConsumers); + ConsumerNode tConsumerNode = + new NodeEnergyReceiver(aNodeValue, (IEnergyReceiver) aTileEntity, aSide, aConsumers); aConsumers.add(tConsumerNode); return true; } @@ -79,9 +82,10 @@ public class GenerateNodeMapPower extends GenerateNodeMap { return new PowerNodePath(aPipes); } - //used to apply voltage on dead ends + // used to apply voltage on dead ends @Override - protected Node getEmptyNode(int aNodeValue, byte aSide, TileEntity aTileEntity, ArrayList<ConsumerNode> aConsumers) { + protected Node getEmptyNode( + int aNodeValue, byte aSide, TileEntity aTileEntity, ArrayList<ConsumerNode> aConsumers) { Node tNode = new EmptyPowerConsumer(aNodeValue, aTileEntity, aSide, aConsumers); aConsumers.add((ConsumerNode) tNode); return tNode; diff --git a/src/main/java/gregtech/api/graphs/Lock.java b/src/main/java/gregtech/api/graphs/Lock.java index 0ba43b83de..e89cc8b25c 100644 --- a/src/main/java/gregtech/api/graphs/Lock.java +++ b/src/main/java/gregtech/api/graphs/Lock.java @@ -1,8 +1,7 @@ package gregtech.api.graphs; -import net.minecraft.tileentity.TileEntity; - import java.util.ArrayList; +import net.minecraft.tileentity.TileEntity; public class Lock { protected ArrayList<TileEntity> tiles = new ArrayList<>(); @@ -25,7 +24,7 @@ public class Lock { return !tiles.isEmpty(); } - //i want to check for the exact object not equals + // i want to check for the exact object not equals protected int contains(TileEntity tileEntity) { for (int i = 0; i < tiles.size(); i++) { if (tiles.get(i) == tileEntity) { diff --git a/src/main/java/gregtech/api/graphs/Node.java b/src/main/java/gregtech/api/graphs/Node.java index be499dea0d..f6a3ebe2d2 100644 --- a/src/main/java/gregtech/api/graphs/Node.java +++ b/src/main/java/gregtech/api/graphs/Node.java @@ -2,11 +2,10 @@ package gregtech.api.graphs; import gregtech.api.graphs.consumers.ConsumerNode; import gregtech.api.graphs.paths.NodePath; +import java.util.ArrayList; import net.minecraft.server.MinecraftServer; import net.minecraft.tileentity.TileEntity; -import java.util.ArrayList; - // base Node class public class Node { public Node(int aNodeValue, TileEntity aTileEntity, ArrayList<ConsumerNode> aConsumers) { @@ -18,7 +17,6 @@ public class Node { mCreationTime = MinecraftServer.getServer().getTickCounter(); } - public final TileEntity mTileEntity; public Node[] mNeighbourNodes = new Node[6]; public NodePath[] mNodePaths = new NodePath[6]; diff --git a/src/main/java/gregtech/api/graphs/NodeList.java b/src/main/java/gregtech/api/graphs/NodeList.java index fb8afe68fa..8a018e2123 100644 --- a/src/main/java/gregtech/api/graphs/NodeList.java +++ b/src/main/java/gregtech/api/graphs/NodeList.java @@ -4,21 +4,18 @@ package gregtech.api.graphs; public class NodeList { Node[] mNodes; int mCounter = 0; + public NodeList(Node[] mNodes) { this.mNodes = mNodes; } Node getNextNode() { - if (++mCounter < mNodes.length) - return mNodes[mCounter]; - else - return null; + if (++mCounter < mNodes.length) return mNodes[mCounter]; + else return null; } Node getNode() { - if (mCounter < mNodes.length) - return mNodes[mCounter]; - else - return null; + if (mCounter < mNodes.length) return mNodes[mCounter]; + else return null; } } diff --git a/src/main/java/gregtech/api/graphs/PowerNode.java b/src/main/java/gregtech/api/graphs/PowerNode.java index 82c97d3901..c81d436861 100644 --- a/src/main/java/gregtech/api/graphs/PowerNode.java +++ b/src/main/java/gregtech/api/graphs/PowerNode.java @@ -1,13 +1,13 @@ package gregtech.api.graphs; import gregtech.api.graphs.consumers.ConsumerNode; -import net.minecraft.tileentity.TileEntity; - import java.util.ArrayList; +import net.minecraft.tileentity.TileEntity; // base node for power networks -public class PowerNode extends Node{ +public class PowerNode extends Node { public boolean mHadVoltage = false; + public PowerNode(int aNodeValue, TileEntity aTileEntity, ArrayList<ConsumerNode> aConsumers) { super(aNodeValue, aTileEntity, aConsumers); } diff --git a/src/main/java/gregtech/api/graphs/PowerNodes.java b/src/main/java/gregtech/api/graphs/PowerNodes.java index e5d0e56699..759002dbdb 100644 --- a/src/main/java/gregtech/api/graphs/PowerNodes.java +++ b/src/main/java/gregtech/api/graphs/PowerNodes.java @@ -22,7 +22,8 @@ import gregtech.api.graphs.paths.PowerNodePath; */ public class PowerNodes { // check if the looked for node is next to or get the next node that is closer to it - static public long powerNode(Node aCurrentNode, Node aPreviousNode, NodeList aConsumers, long aVoltage, long aMaxAmps) { + public static long powerNode( + Node aCurrentNode, Node aPreviousNode, NodeList aConsumers, long aVoltage, long aMaxAmps) { long tAmpsUsed = 0; ConsumerNode tConsumer = (ConsumerNode) aConsumers.getNode(); int tLoopProtection = 0; @@ -39,7 +40,8 @@ public class PowerNodes { break; } else { if (aPreviousNode == tNextNode) return tAmpsUsed; - tAmpsUsed += processNextNode(aCurrentNode, tNextNode, aConsumers, j, aMaxAmps - tAmpsUsed, aVoltage); + tAmpsUsed += processNextNode( + aCurrentNode, tNextNode, aConsumers, j, aMaxAmps - tAmpsUsed, aVoltage); tConsumer = (ConsumerNode) aConsumers.getNode(); break; } @@ -52,7 +54,8 @@ public class PowerNodes { if (tNextNode == null) continue; if (tNextNode.mNodeValue > aCurrentNode.mNodeValue && tNextNode.mNodeValue < tTargetNodeValue) { if (tNextNode == aPreviousNode) return tAmpsUsed; - tAmpsUsed += processNextNodeAbove(aCurrentNode, tNextNode, aConsumers, side, aMaxAmps - tAmpsUsed, aVoltage); + tAmpsUsed += processNextNodeAbove( + aCurrentNode, tNextNode, aConsumers, side, aMaxAmps - tAmpsUsed, aVoltage); tConsumer = (ConsumerNode) aConsumers.getNode(); break; } else if (tNextNode.mNodeValue == tTargetNodeValue) { @@ -74,7 +77,8 @@ public class PowerNodes { // checking if target node is next to it or has a higher value then current node value // these functions are different to either go down or up the stack - protected static long powerNodeAbove(Node aCurrentNode, Node aPreviousNode, NodeList aConsumers, long aVoltage, long aMaxAmps) { + protected static long powerNodeAbove( + Node aCurrentNode, Node aPreviousNode, NodeList aConsumers, long aVoltage, long aMaxAmps) { long tAmpsUsed = 0; int tLoopProtection = 0; ConsumerNode tConsumer = (ConsumerNode) aConsumers.getNode(); @@ -88,7 +92,8 @@ public class PowerNodes { if (tNextNode == null) continue; if (tNextNode.mNodeValue > aCurrentNode.mNodeValue && tNextNode.mNodeValue < tTargetNodeValue) { if (tNextNode == aPreviousNode) return tAmpsUsed; - tAmpsUsed += processNextNodeAbove(aCurrentNode, tNextNode, aConsumers, side, aMaxAmps - tAmpsUsed, aVoltage); + tAmpsUsed += processNextNodeAbove( + aCurrentNode, tNextNode, aConsumers, side, aMaxAmps - tAmpsUsed, aVoltage); tConsumer = (ConsumerNode) aConsumers.getNode(); break; } else if (tNextNode.mNodeValue == tTargetNodeValue) { @@ -108,7 +113,8 @@ public class PowerNodes { return tAmpsUsed; } - protected static long processNextNode(Node aCurrentNode, Node aNextNode, NodeList aConsumers, int aSide, long aMaxAmps, long aVoltage) { + protected static long processNextNode( + Node aCurrentNode, Node aNextNode, NodeList aConsumers, int aSide, long aMaxAmps, long aVoltage) { if (aCurrentNode.locks[aSide].isLocked()) { aConsumers.getNextNode(); return 0; @@ -124,12 +130,12 @@ public class PowerNodes { tVoltLoss += tPath.getLoss(); long tAmps = powerNode(aNextNode, aCurrentNode, aConsumers, aVoltage - tVoltLoss, aMaxAmps); tPath.addAmps(tAmps); - if (tSelfPath != null) - tSelfPath.addAmps(tAmps); + if (tSelfPath != null) tSelfPath.addAmps(tAmps); return tAmps; } - protected static long processNextNodeAbove(Node aCurrentNode, Node aNextNode, NodeList aConsumers, int aSide, long aMaxAmps, long aVoltage) { + protected static long processNextNodeAbove( + Node aCurrentNode, Node aNextNode, NodeList aConsumers, int aSide, long aMaxAmps, long aVoltage) { if (aCurrentNode.locks[aSide].isLocked()) { aConsumers.getNextNode(); return 0; @@ -145,12 +151,12 @@ public class PowerNodes { tVoltLoss += tPath.getLoss(); long tAmps = powerNodeAbove(aNextNode, aCurrentNode, aConsumers, aVoltage - tVoltLoss, aMaxAmps); tPath.addAmps(tAmps); - if (tSelfPath != null) - tSelfPath.addAmps(tAmps); + if (tSelfPath != null) tSelfPath.addAmps(tAmps); return tAmps; } - protected static long processNodeInject(Node aCurrentNode, ConsumerNode aConsumer, int aSide, long aMaxAmps, long aVoltage) { + protected static long processNodeInject( + Node aCurrentNode, ConsumerNode aConsumer, int aSide, long aMaxAmps, long aVoltage) { if (aCurrentNode.locks[aSide].isLocked()) return 0; final PowerNodePath tPath = (PowerNodePath) aCurrentNode.mNodePaths[aSide]; final PowerNodePath tSelfPath = (PowerNodePath) aCurrentNode.mSelfPath; @@ -163,8 +169,7 @@ public class PowerNodes { tVoltLoss += tPath.getLoss(); long tAmps = aConsumer.injectEnergy(aVoltage - tVoltLoss, aMaxAmps); tPath.addAmps(tAmps); - if (tSelfPath != null) - tSelfPath.addAmps(tAmps); + if (tSelfPath != null) tSelfPath.addAmps(tAmps); return tAmps; } } diff --git a/src/main/java/gregtech/api/graphs/consumers/ConsumerNode.java b/src/main/java/gregtech/api/graphs/consumers/ConsumerNode.java index e060c5c094..78b3c51928 100644 --- a/src/main/java/gregtech/api/graphs/consumers/ConsumerNode.java +++ b/src/main/java/gregtech/api/graphs/consumers/ConsumerNode.java @@ -1,15 +1,15 @@ package gregtech.api.graphs.consumers; import gregtech.api.graphs.Node; -import net.minecraft.tileentity.TileEntity; - import java.util.ArrayList; +import net.minecraft.tileentity.TileEntity; // node attached to a tile entity that can consume stuff from the network public class ConsumerNode extends Node { public byte mSide; + public ConsumerNode(int aNodeValue, TileEntity aTileEntity, byte aSide, ArrayList<ConsumerNode> aConsumers) { - super(aNodeValue,aTileEntity,aConsumers); + super(aNodeValue, aTileEntity, aConsumers); this.mSide = aSide; } diff --git a/src/main/java/gregtech/api/graphs/consumers/EmptyPowerConsumer.java b/src/main/java/gregtech/api/graphs/consumers/EmptyPowerConsumer.java index 29f4fe8893..d5ff76c12b 100644 --- a/src/main/java/gregtech/api/graphs/consumers/EmptyPowerConsumer.java +++ b/src/main/java/gregtech/api/graphs/consumers/EmptyPowerConsumer.java @@ -2,12 +2,11 @@ package gregtech.api.graphs.consumers; import gregtech.api.graphs.paths.PowerNodePath; import gregtech.api.metatileentity.BaseMetaPipeEntity; -import net.minecraft.tileentity.TileEntity; - import java.util.ArrayList; +import net.minecraft.tileentity.TileEntity; -//this is here to apply voltage to dead ends -public class EmptyPowerConsumer extends ConsumerNode{ +// this is here to apply voltage to dead ends +public class EmptyPowerConsumer extends ConsumerNode { public EmptyPowerConsumer(int aNodeValue, TileEntity aTileEntity, byte aSide, ArrayList<ConsumerNode> aConsumers) { super(aNodeValue, aTileEntity, aSide, aConsumers); } @@ -20,8 +19,8 @@ public class EmptyPowerConsumer extends ConsumerNode{ @Override public int injectEnergy(long aVoltage, long aMaxAmps) { BaseMetaPipeEntity tPipe = (BaseMetaPipeEntity) mTileEntity; - PowerNodePath tPath =(PowerNodePath) tPipe.getNodePath(); - tPath.applyVoltage(aVoltage,true); + PowerNodePath tPath = (PowerNodePath) tPipe.getNodePath(); + tPath.applyVoltage(aVoltage, true); return 0; } } diff --git a/src/main/java/gregtech/api/graphs/consumers/NodeEnergyConnected.java b/src/main/java/gregtech/api/graphs/consumers/NodeEnergyConnected.java index 0b3c8e31fa..30582332e7 100644 --- a/src/main/java/gregtech/api/graphs/consumers/NodeEnergyConnected.java +++ b/src/main/java/gregtech/api/graphs/consumers/NodeEnergyConnected.java @@ -1,13 +1,13 @@ package gregtech.api.graphs.consumers; import gregtech.api.interfaces.tileentity.IEnergyConnected; -import net.minecraft.tileentity.TileEntity; - import java.util.ArrayList; +import net.minecraft.tileentity.TileEntity; public class NodeEnergyConnected extends ConsumerNode { - public NodeEnergyConnected(int aNodeValue, IEnergyConnected aTileEntity, byte aSide, ArrayList<ConsumerNode> aConsumers) { - super(aNodeValue,(TileEntity) aTileEntity, aSide, aConsumers); + public NodeEnergyConnected( + int aNodeValue, IEnergyConnected aTileEntity, byte aSide, ArrayList<ConsumerNode> aConsumers) { + super(aNodeValue, (TileEntity) aTileEntity, aSide, aConsumers); } @Override @@ -17,6 +17,6 @@ public class NodeEnergyConnected extends ConsumerNode { @Override public int injectEnergy(long aVoltage, long aMaxAmps) { - return (int) ((IEnergyConnected)mTileEntity).injectEnergyUnits(mSide,aVoltage,aMaxAmps); + return (int) ((IEnergyConnected) mTileEntity).injectEnergyUnits(mSide, aVoltage, aMaxAmps); } } diff --git a/src/main/java/gregtech/api/graphs/consumers/NodeEnergyReceiver.java b/src/main/java/gregtech/api/graphs/consumers/NodeEnergyReceiver.java index bd9e75945b..9c5e3f8aab 100644 --- a/src/main/java/gregtech/api/graphs/consumers/NodeEnergyReceiver.java +++ b/src/main/java/gregtech/api/graphs/consumers/NodeEnergyReceiver.java @@ -1,5 +1,7 @@ package gregtech.api.graphs.consumers; +import static gregtech.api.enums.GT_Values.V; + import cofh.api.energy.IEnergyReceiver; import gregtech.GT_Mod; import gregtech.api.GregTech_API; @@ -7,19 +9,18 @@ import gregtech.api.enums.SoundResource; import gregtech.api.util.GT_Utility; import gregtech.api.util.WorldSpawnedEventBuilder; import gregtech.common.GT_Pollution; +import java.util.ArrayList; import net.minecraft.init.Blocks; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import java.util.ArrayList; - -import static gregtech.api.enums.GT_Values.V; - -//consumer for RF machines +// consumer for RF machines public class NodeEnergyReceiver extends ConsumerNode { int mRestRF = 0; - public NodeEnergyReceiver(int aNodeValue, IEnergyReceiver aTileEntity, byte aSide, ArrayList<ConsumerNode> aConsumers) { + + public NodeEnergyReceiver( + int aNodeValue, IEnergyReceiver aTileEntity, byte aSide, ArrayList<ConsumerNode> aConsumers) { super(aNodeValue, (TileEntity) aTileEntity, aSide, aConsumers); } @@ -37,44 +38,82 @@ public class NodeEnergyReceiver extends ConsumerNode { mRestRF -= consumed; return ampsUsed; } - if (GregTech_API.mRFExplosions && GregTech_API.sMachineExplosions && - ((IEnergyReceiver) mTileEntity).getMaxEnergyStored(tDirection) < rfOut * 600L) { + if (GregTech_API.mRFExplosions + && GregTech_API.sMachineExplosions + && ((IEnergyReceiver) mTileEntity).getMaxEnergyStored(tDirection) < rfOut * 600L) { explode(rfOut); } return 0; } - //copied from IEnergyConnected + // copied from IEnergyConnected private void explode(int aRfOut) { if (aRfOut > 32L * GregTech_API.mEUtoRF / 100L) { int aExplosionPower = aRfOut; - float tStrength = - aExplosionPower < V[0] ? 1.0F : - aExplosionPower < V[1] ? 2.0F : - aExplosionPower < V[2] ? 3.0F : - aExplosionPower < V[3] ? 4.0F : - aExplosionPower < V[4] ? 5.0F : - aExplosionPower < V[4] * 2 ? 6.0F : - aExplosionPower < V[5] ? 7.0F : - aExplosionPower < V[6] ? 8.0F : - aExplosionPower < V[7] ? 9.0F : - aExplosionPower < V[8] ? 10.0F : - aExplosionPower < V[8] * 2 ? 11.0F : - aExplosionPower < V[9] ? 12.0F : - aExplosionPower < V[10] ? 13.0F : - aExplosionPower < V[11] ? 14.0F : - aExplosionPower < V[12] ? 15.0F : - aExplosionPower < V[12] * 2 ? 16.0F : - aExplosionPower < V[13] ? 17.0F : - aExplosionPower < V[14] ? 18.0F : - aExplosionPower < V[15] ? 19.0F : 20.0F; + float tStrength = aExplosionPower < V[0] + ? 1.0F + : aExplosionPower < V[1] + ? 2.0F + : aExplosionPower < V[2] + ? 3.0F + : aExplosionPower < V[3] + ? 4.0F + : aExplosionPower < V[4] + ? 5.0F + : aExplosionPower < V[4] * 2 + ? 6.0F + : aExplosionPower < V[5] + ? 7.0F + : aExplosionPower < V[6] + ? 8.0F + : aExplosionPower < V[7] + ? 9.0F + : aExplosionPower < V[8] + ? 10.0F + : aExplosionPower < V[8] * 2 + ? 11.0F + : aExplosionPower + < V[ + 9] + ? 12.0F + : aExplosionPower + < V[ + 10] + ? 13.0F + : aExplosionPower + < V[ + 11] + ? 14.0F + : aExplosionPower + < V[ + 12] + ? 15.0F + : aExplosionPower + < V[ + 12] + * 2 + ? 16.0F + : aExplosionPower + < V[ + 13] + ? 17.0F + : aExplosionPower + < V[ + 14] + ? 18.0F + : aExplosionPower + < V[ + 15] + ? 19.0F + : 20.0F; int tX = mTileEntity.xCoord, tY = mTileEntity.yCoord, tZ = mTileEntity.zCoord; World tWorld = mTileEntity.getWorldObj(); GT_Utility.sendSoundToPlayers(tWorld, SoundResource.IC2_MACHINES_MACHINE_OVERLOAD, 1.0F, -1, tX, tY, tZ); tWorld.setBlock(tX, tY, tZ, Blocks.air); if (GregTech_API.sMachineExplosions) if (GT_Mod.gregtechproxy.mPollution) - GT_Pollution.addPollution(tWorld.getChunkFromBlockCoords(tX, tZ), GT_Mod.gregtechproxy.mPollutionOnExplosion); + GT_Pollution.addPollution( + tWorld.getChunkFromBlockCoords(tX, tZ), GT_Mod.gregtechproxy.mPollutionOnExplosion); new WorldSpawnedEventBuilder.ExplosionEffectEventBuilder() .setStrength(tStrength) diff --git a/src/main/java/gregtech/api/graphs/consumers/NodeEnergySink.java b/src/main/java/gregtech/api/graphs/consumers/NodeEnergySink.java index d2c54e284f..95b16883af 100644 --- a/src/main/java/gregtech/api/graphs/consumers/NodeEnergySink.java +++ b/src/main/java/gregtech/api/graphs/consumers/NodeEnergySink.java @@ -1,11 +1,10 @@ package gregtech.api.graphs.consumers; import ic2.api.energy.tile.IEnergySink; +import java.util.ArrayList; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -import java.util.ArrayList; - // consumer for IC2 machines public class NodeEnergySink extends ConsumerNode { public NodeEnergySink(int nodeValue, IEnergySink tileEntity, byte side, ArrayList<ConsumerNode> consumers) { @@ -20,9 +19,10 @@ public class NodeEnergySink extends ConsumerNode { @Override public int injectEnergy(long aVoltage, long aMaxAmps) { int tUsedAmps = 0; - while (aMaxAmps > tUsedAmps && ((IEnergySink) mTileEntity).getDemandedEnergy() > 0 && - ((IEnergySink) mTileEntity).injectEnergy(ForgeDirection.getOrientation(mSide), aVoltage, aVoltage) < aVoltage) - tUsedAmps++; + while (aMaxAmps > tUsedAmps + && ((IEnergySink) mTileEntity).getDemandedEnergy() > 0 + && ((IEnergySink) mTileEntity).injectEnergy(ForgeDirection.getOrientation(mSide), aVoltage, aVoltage) + < aVoltage) tUsedAmps++; return tUsedAmps; } } diff --git a/src/main/java/gregtech/api/graphs/consumers/NodeGTBaseMetaTile.java b/src/main/java/gregtech/api/graphs/consumers/NodeGTBaseMetaTile.java index e9736df7f4..e367a5294e 100644 --- a/src/main/java/gregtech/api/graphs/consumers/NodeGTBaseMetaTile.java +++ b/src/main/java/gregtech/api/graphs/consumers/NodeGTBaseMetaTile.java @@ -6,13 +6,14 @@ import java.util.ArrayList; // consumer for gt machines public class NodeGTBaseMetaTile extends ConsumerNode { - public NodeGTBaseMetaTile(int aNodeValue, BaseMetaTileEntity aTileEntity, byte aSide, ArrayList<ConsumerNode> aConsumers) { + public NodeGTBaseMetaTile( + int aNodeValue, BaseMetaTileEntity aTileEntity, byte aSide, ArrayList<ConsumerNode> aConsumers) { super(aNodeValue, aTileEntity, aSide, aConsumers); } @Override public int injectEnergy(long aVoltage, long aMaxAmps) { - return (int)((IEnergyConnected) mTileEntity).injectEnergyUnits(mSide,aVoltage, aMaxAmps); + return (int) ((IEnergyConnected) mTileEntity).injectEnergyUnits(mSide, aVoltage, aMaxAmps); } @Override diff --git a/src/main/java/gregtech/api/graphs/paths/NodePath.java b/src/main/java/gregtech/api/graphs/paths/NodePath.java index 3a4bbed8c6..d5a179b24b 100644 --- a/src/main/java/gregtech/api/graphs/paths/NodePath.java +++ b/src/main/java/gregtech/api/graphs/paths/NodePath.java @@ -4,7 +4,7 @@ import gregtech.api.graphs.Lock; import gregtech.api.metatileentity.BaseMetaPipeEntity; import gregtech.api.metatileentity.MetaPipeEntity; -//to contain all info about the path between nodes +// to contain all info about the path between nodes public class NodePath { protected MetaPipeEntity[] mPipes; public Lock lock = new Lock(); diff --git a/src/main/java/gregtech/api/graphs/paths/PowerNodePath.java b/src/main/java/gregtech/api/graphs/paths/PowerNodePath.java index d18d6bcdd3..3ab8c7fe03 100644 --- a/src/main/java/gregtech/api/graphs/paths/PowerNodePath.java +++ b/src/main/java/gregtech/api/graphs/paths/PowerNodePath.java @@ -16,7 +16,6 @@ public class PowerNodePath extends NodePath { int mTick = 0; boolean mCountUp = true; - public PowerNodePath(MetaPipeEntity[] aCables) { super(aCables); } diff --git a/src/main/java/gregtech/api/gui/GT_Container.java b/src/main/java/gregtech/api/gui/GT_Container.java index 843d34c1f3..b5aebf87f2 100644 --- a/src/main/java/gregtech/api/gui/GT_Container.java +++ b/src/main/java/gregtech/api/gui/GT_Container.java @@ -4,6 +4,7 @@ import gregtech.api.interfaces.IFluidAccess; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_Utility; +import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; @@ -14,8 +15,6 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidContainerItem; -import java.util.List; - /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! * <p/> @@ -109,8 +108,10 @@ public class GT_Container extends Container { if (aSlotIndex >= 0) { if (inventorySlots.get(aSlotIndex) == null || inventorySlots.get(aSlotIndex) instanceof GT_Slot_Holo) return null; - if (!(inventorySlots.get(aSlotIndex) instanceof GT_Slot_Armor)) if (aSlotIndex < getAllSlotCount()) - if (aSlotIndex < getSlotStartIndex() || aSlotIndex >= getSlotStartIndex() + getSlotCount()) return null; + if (!(inventorySlots.get(aSlotIndex) instanceof GT_Slot_Armor)) + if (aSlotIndex < getAllSlotCount()) + if (aSlotIndex < getSlotStartIndex() || aSlotIndex >= getSlotStartIndex() + getSlotCount()) + return null; } try { @@ -137,7 +138,8 @@ public class GT_Container extends Container { aPlayerInventory.setItemStack(null); } if (aMouseclick == 1) { - aPlayer.dropPlayerItemWithRandomChoice(aPlayerInventory.getItemStack().splitStack(1), true); + aPlayer.dropPlayerItemWithRandomChoice( + aPlayerInventory.getItemStack().splitStack(1), true); if (aPlayerInventory.getItemStack().stackSize == 0) { aPlayerInventory.setItemStack(null); } @@ -187,7 +189,9 @@ public class GT_Container extends Container { } aSlot.onPickupFromSlot(aPlayer, aPlayerInventory.getItemStack()); } else if (aSlot.isItemValid(mouseStack)) { - if (tTempStack.getItem() == mouseStack.getItem() && tTempStack.getItemDamage() == mouseStack.getItemDamage() && ItemStack.areItemStackTagsEqual(tTempStack, mouseStack)) { + if (tTempStack.getItem() == mouseStack.getItem() + && tTempStack.getItemDamage() == mouseStack.getItemDamage() + && ItemStack.areItemStackTagsEqual(tTempStack, mouseStack)) { tTempStackSize = aMouseclick == 0 ? mouseStack.stackSize : 1; if (tTempStackSize > aSlot.getSlotStackLimit() - tTempStack.stackSize) { tTempStackSize = aSlot.getSlotStackLimit() - tTempStack.stackSize; @@ -204,10 +208,15 @@ public class GT_Container extends Container { aSlot.putStack(mouseStack); aPlayerInventory.setItemStack(tTempStack); } - } else if (tTempStack.getItem() == mouseStack.getItem() && mouseStack.getMaxStackSize() > 1 && (!tTempStack.getHasSubtypes() || tTempStack.getItemDamage() == mouseStack.getItemDamage()) && ItemStack.areItemStackTagsEqual(tTempStack, mouseStack)) { + } else if (tTempStack.getItem() == mouseStack.getItem() + && mouseStack.getMaxStackSize() > 1 + && (!tTempStack.getHasSubtypes() + || tTempStack.getItemDamage() == mouseStack.getItemDamage()) + && ItemStack.areItemStackTagsEqual(tTempStack, mouseStack)) { tTempStackSize = tTempStack.stackSize; - if (tTempStackSize > 0 && tTempStackSize + mouseStack.stackSize <= mouseStack.getMaxStackSize()) { + if (tTempStackSize > 0 + && tTempStackSize + mouseStack.stackSize <= mouseStack.getMaxStackSize()) { mouseStack.stackSize += tTempStackSize; tTempStack = aSlot.decrStackSize(tTempStackSize); @@ -231,7 +240,8 @@ public class GT_Container extends Container { if (aSlot.canTakeStack(aPlayer)) { // get the stack at the specified hotbar slot. tTempStack = aPlayerInventory.getStackInSlot(aMouseclick); - boolean canSwap = tTempStack == null || aSlot.inventory == aPlayerInventory && aSlot.isItemValid(tTempStack); + boolean canSwap = + tTempStack == null || aSlot.inventory == aPlayerInventory && aSlot.isItemValid(tTempStack); tTempStackSize = -1; if (!canSwap) { @@ -260,7 +270,10 @@ public class GT_Container extends Container { aSlot.putStack(tTempStack); } } - } else if (aShifthold == 3 && aPlayer.capabilities.isCreativeMode && aPlayerInventory.getItemStack() == null && aSlotIndex >= 0) { + } else if (aShifthold == 3 + && aPlayer.capabilities.isCreativeMode + && aPlayerInventory.getItemStack() == null + && aSlotIndex >= 0) { aSlot = (Slot) this.inventorySlots.get(aSlotIndex); if (aSlot != null && aSlot.getHasStack()) { tTempStack = GT_Utility.copyOrNull(aSlot.getStack()); @@ -278,19 +291,26 @@ public class GT_Container extends Container { mTileEntity.markDirty(); - //null checks and checks if the item can be stacked (maxStackSize > 1) - if (getSlotCount() > 0 && slotObject != null && slotObject.getHasStack() && !(slotObject instanceof GT_Slot_Holo)) { + // null checks and checks if the item can be stacked (maxStackSize > 1) + if (getSlotCount() > 0 + && slotObject != null + && slotObject.getHasStack() + && !(slotObject instanceof GT_Slot_Holo)) { ItemStack stackInSlot = slotObject.getStack(); stack = GT_Utility.copyOrNull(stackInSlot); - //TileEntity -> Player + // TileEntity -> Player if (aSlotIndex < getAllSlotCount()) { if (doesBindPlayerInventory()) if (!mergeItemStack(stackInSlot, getAllSlotCount(), getAllSlotCount() + 36, true)) { return null; } - //Player -> TileEntity - } else if (!mergeItemStack(stackInSlot, getShiftClickStartIndex(), getShiftClickStartIndex() + getShiftClickSlotCount(), false)) { + // Player -> TileEntity + } else if (!mergeItemStack( + stackInSlot, + getShiftClickStartIndex(), + getShiftClickStartIndex() + getShiftClickSlotCount(), + false)) { return null; } @@ -321,10 +341,17 @@ public class GT_Container extends Container { ItemStack itemStack; if (aStack.isStackable()) { - while (aStack.stackSize > 0 && (!reverseOrder && slotIndex < aSlotCount || reverseOrder && slotIndex >= aStartIndex)) { + while (aStack.stackSize > 0 + && (!reverseOrder && slotIndex < aSlotCount || reverseOrder && slotIndex >= aStartIndex)) { slot = (Slot) this.inventorySlots.get(slotIndex); itemStack = slot.getStack(); - if (!(slot instanceof GT_Slot_Holo) && !(slot instanceof GT_Slot_Output) && slot.isItemValid(aStack) && itemStack != null && itemStack.getItem() == aStack.getItem() && (!aStack.getHasSubtypes() || aStack.getItemDamage() == itemStack.getItemDamage()) && ItemStack.areItemStackTagsEqual(aStack, itemStack)) { + if (!(slot instanceof GT_Slot_Holo) + && !(slot instanceof GT_Slot_Output) + && slot.isItemValid(aStack) + && itemStack != null + && itemStack.getItem() == aStack.getItem() + && (!aStack.getHasSubtypes() || aStack.getItemDamage() == itemStack.getItemDamage()) + && ItemStack.areItemStackTagsEqual(aStack, itemStack)) { int combinedStackSize = itemStack.stackSize + aStack.stackSize; if (itemStack.stackSize < mTileEntity.getInventoryStackLimit()) { if (combinedStackSize <= aStack.getMaxStackSize()) { @@ -569,14 +596,18 @@ public class GT_Container extends Container { return true; } - protected static ItemStack handleFluidSlotClick(IFluidAccess aFluidAccess, EntityPlayer aPlayer, boolean aProcessFullStack, boolean aCanDrain, boolean aCanFill) { + protected static ItemStack handleFluidSlotClick( + IFluidAccess aFluidAccess, + EntityPlayer aPlayer, + boolean aProcessFullStack, + boolean aCanDrain, + boolean aCanFill) { ItemStack tStackHeld = aPlayer.inventory.getItemStack(); ItemStack tStackSizedOne = GT_Utility.copyAmount(1, tStackHeld); if (tStackSizedOne == null || tStackHeld.stackSize == 0) return null; FluidStack tInputFluid = aFluidAccess.get(); FluidStack tFluidHeld = GT_Utility.getFluidForFilledItem(tStackSizedOne, true); - if (tFluidHeld != null && tFluidHeld.amount <= 0) - tFluidHeld = null; + if (tFluidHeld != null && tFluidHeld.amount <= 0) tFluidHeld = null; if (tInputFluid == null) { // tank empty, consider fill only from now on if (!aCanFill) @@ -639,19 +670,17 @@ public class GT_Container extends Container { } replaceCursorItemStack(aPlayer, tFilledContainer); } - if (tTankStack.amount <= 0) - aFluidAccess.set(null); + if (tTankStack.amount <= 0) aFluidAccess.set(null); return tFilledContainer; } - protected static ItemStack fillFluid(IFluidAccess aFluidAccess, EntityPlayer aPlayer, FluidStack aFluidHeld, boolean aProcessFullStack) { + protected static ItemStack fillFluid( + IFluidAccess aFluidAccess, EntityPlayer aPlayer, FluidStack aFluidHeld, boolean aProcessFullStack) { // we are not using aMachine.fill() here any more, so we need to check for fluid type here ourselves - if (aFluidAccess.get() != null && !aFluidAccess.get().isFluidEqual(aFluidHeld)) - return null; + if (aFluidAccess.get() != null && !aFluidAccess.get().isFluidEqual(aFluidHeld)) return null; ItemStack tStackHeld = aPlayer.inventory.getItemStack(); ItemStack tStackSizedOne = GT_Utility.copyAmount(1, tStackHeld); - if (tStackSizedOne == null) - return null; + if (tStackSizedOne == null) return null; int tFreeSpace = aFluidAccess.getCapacity() - (aFluidAccess.get() != null ? aFluidAccess.get().amount : 0); if (tFreeSpace <= 0) @@ -715,5 +744,4 @@ public class GT_Container extends Container { GT_Utility.addItemToPlayerInventory(aPlayer, tStackResult); } } - } diff --git a/src/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java b/src/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java index 97ee1d85a3..f2774bbd38 100644 --- a/src/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java +++ b/src/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java @@ -1,13 +1,12 @@ package gregtech.api.gui; -import java.util.List; - import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.interfaces.metatileentity.IConfigurationCircuitSupport; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Utility; +import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.ICrafting; @@ -31,8 +30,7 @@ public class GT_ContainerMetaTile_Machine extends GT_Container { mInput = 0, mID = 0, mDisplayErrorCode = 0; - public long mEnergyLong = 0, - mStorageLong = 0; + public long mEnergyLong = 0, mStorageLong = 0; private int oActive = 0, oMaxProgressTime = 0, oProgressTime = 0, @@ -44,12 +42,10 @@ public class GT_ContainerMetaTile_Machine extends GT_Container { oInput = 0, oID = 0, oDisplayErrorCode = 0; - private long oEnergyLong = 0, - oStorageLong = 0; + private long oEnergyLong = 0, oStorageLong = 0; protected int mTimer = 0; protected Runnable circuitSlotClickCallback; - public GT_ContainerMetaTile_Machine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(aInventoryPlayer, aTileEntity); @@ -57,31 +53,32 @@ public class GT_ContainerMetaTile_Machine extends GT_Container { if (mTileEntity != null && mTileEntity.getMetaTileEntity() != null) { addSlots(aInventoryPlayer); - if (doesBindPlayerInventory()) - bindPlayerInventory(aInventoryPlayer); + if (doesBindPlayerInventory()) bindPlayerInventory(aInventoryPlayer); detectAndSendChanges(); } else { aInventoryPlayer.player.openContainer = aInventoryPlayer.player.inventoryContainer; } } - public GT_ContainerMetaTile_Machine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, boolean doesBindInventory) { + public GT_ContainerMetaTile_Machine( + InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, boolean doesBindInventory) { super(aInventoryPlayer, aTileEntity); mTileEntity = aTileEntity; if (mTileEntity != null && mTileEntity.getMetaTileEntity() != null) { addSlots(aInventoryPlayer); - if (doesBindPlayerInventory() && doesBindInventory) - bindPlayerInventory(aInventoryPlayer); + if (doesBindPlayerInventory() && doesBindInventory) bindPlayerInventory(aInventoryPlayer); detectAndSendChanges(); } else { aInventoryPlayer.player.openContainer = aInventoryPlayer.player.inventoryContainer; } } + protected void addCircuitSlot() { if (mTileEntity.getMetaTileEntity() instanceof IConfigurationCircuitSupport) { - IConfigurationCircuitSupport ccs = (IConfigurationCircuitSupport)mTileEntity.getMetaTileEntity(); - GT_Slot_Render slotCircuit = new GT_Slot_Render(mTileEntity, ccs.getCircuitSlot(), ccs.getCircuitSlotX(), ccs.getCircuitSlotY()); + IConfigurationCircuitSupport ccs = (IConfigurationCircuitSupport) mTileEntity.getMetaTileEntity(); + GT_Slot_Render slotCircuit = + new GT_Slot_Render(mTileEntity, ccs.getCircuitSlot(), ccs.getCircuitSlotX(), ccs.getCircuitSlotY()); addSlotToContainer(slotCircuit); slotCircuit.setEnabled(ccs.allowSelectCircuit()); } @@ -95,8 +92,7 @@ public class GT_ContainerMetaTile_Machine extends GT_Container { @Override public void detectAndSendChanges() { super.detectAndSendChanges(); - if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) - return; + if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) return; mStorage = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getEUCapacity()); mStorageLong = mTileEntity.getEUCapacity(); mEnergy = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getStoredEU()); @@ -261,17 +257,17 @@ public class GT_ContainerMetaTile_Machine extends GT_Container { public void setCircuitSlotClickCallback(Runnable circuitSlotClickCallback) { this.circuitSlotClickCallback = circuitSlotClickCallback; } + @Override public ItemStack slotClick(int aSlotNumber, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { if (mTileEntity.getMetaTileEntity() instanceof IConfigurationCircuitSupport) { IMetaTileEntity machine = mTileEntity.getMetaTileEntity(); - IConfigurationCircuitSupport ccs = (IConfigurationCircuitSupport)machine; + IConfigurationCircuitSupport ccs = (IConfigurationCircuitSupport) machine; if (ccs.allowSelectCircuit() && aSlotNumber == ccs.getCircuitGUISlot() && aMouseclick < 2) { ItemStack newCircuit; if (aShifthold == 1) { if (aMouseclick == 0) { - if (circuitSlotClickCallback != null) - circuitSlotClickCallback.run(); + if (circuitSlotClickCallback != null) circuitSlotClickCallback.run(); return null; } else { // clear @@ -282,7 +278,9 @@ public class GT_ContainerMetaTile_Machine extends GT_Container { List<ItemStack> tCircuits = ccs.getConfigurationCircuits(); int index = GT_Utility.findMatchingStackInList(tCircuits, cursorStack); if (index < 0) { - int curIndex = GT_Utility.findMatchingStackInList(tCircuits, machine.getStackInSlot(ccs.getCircuitSlot())) + 1; + int curIndex = GT_Utility.findMatchingStackInList( + tCircuits, machine.getStackInSlot(ccs.getCircuitSlot())) + + 1; if (aMouseclick == 0) { curIndex += 1; } else { diff --git a/src/main/java/gregtech/api/gui/GT_Container_2by2_Fluid.java b/src/main/java/gregtech/api/gui/GT_Container_2by2_Fluid.java index f8f4e3c886..35ed089c97 100644 --- a/src/main/java/gregtech/api/gui/GT_Container_2by2_Fluid.java +++ b/src/main/java/gregtech/api/gui/GT_Container_2by2_Fluid.java @@ -38,15 +38,18 @@ public class GT_Container_2by2_Fluid extends GT_ContainerMetaTile_Machine { * I'd imagine this lag to become only more severe when playing MP over ethernet, which would have much more latency * than a memory connection */ - GT_MetaTileEntity_Hatch_MultiInput tTank = (GT_MetaTileEntity_Hatch_MultiInput) mTileEntity.getMetaTileEntity(); + GT_MetaTileEntity_Hatch_MultiInput tTank = + (GT_MetaTileEntity_Hatch_MultiInput) mTileEntity.getMetaTileEntity(); tTank.setDrainableStack(GT_Utility.getFluidFromDisplayStack(tTank.getStackInSlot(2))); } - GT_MetaTileEntity_Hatch_MultiInput tTank = (GT_MetaTileEntity_Hatch_MultiInput) mTileEntity.getMetaTileEntity(); + GT_MetaTileEntity_Hatch_MultiInput tTank = + (GT_MetaTileEntity_Hatch_MultiInput) mTileEntity.getMetaTileEntity(); MultiFluidAccess tDrainableAccess = MultiFluidAccess.from(tTank, aSlotIndex); ItemStack tStackHeld = aPlayer.inventory.getItemStack(); FluidStack tFluidHeld = GT_Utility.getFluidForFilledItem(tStackHeld, true); if (tDrainableAccess.isMatch(tFluidHeld, aSlotIndex)) - return handleFluidSlotClick(tDrainableAccess, aPlayer, aMouseclick == 0, true, !tTank.isDrainableStackSeparate()); + return handleFluidSlotClick( + tDrainableAccess, aPlayer, aMouseclick == 0, true, !tTank.isDrainableStackSeparate()); } return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); } diff --git a/src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java b/src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java index 6db6d45a89..fc0b3270d2 100644 --- a/src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java +++ b/src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java @@ -1,23 +1,20 @@ package gregtech.api.gui; +import static gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine.OTHER_SLOT_COUNT; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.interfaces.IFluidAccess; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; -import gregtech.api.util.GT_Utility; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import java.util.List; - -import static gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine.OTHER_SLOT_COUNT; - /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! * <p/> @@ -25,10 +22,7 @@ import static gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Basi */ public class GT_Container_BasicMachine extends GT_Container_BasicTank { - public boolean - mFluidTransfer = false, - mItemTransfer = false, - mStuttering = false; + public boolean mFluidTransfer = false, mItemTransfer = false, mStuttering = false; GT_Slot_Holo slotFluidTransferToggle; GT_Slot_Holo slotItemTransferToggle; @@ -198,9 +192,7 @@ public class GT_Container_BasicMachine extends GT_Container_BasicTank { addSlotToContainer(slotBattery = new Slot(mTileEntity, 1, 80, 63)); addSlotToContainer(slotSpecial = new Slot(mTileEntity, 3, 125, 63)); addSlotToContainer(slotFluidInput = new GT_Slot_Render(mTileEntity, tStartIndex++, 53, 63)); - slotFluidInput.setEnabled(recipes != null - ? (recipes.hasFluidInputs()) - : (machine.getCapacity() != 0)); + slotFluidInput.setEnabled(recipes != null ? (recipes.hasFluidInputs()) : (machine.getCapacity() != 0)); } @Override @@ -220,19 +212,25 @@ public class GT_Container_BasicMachine extends GT_Container_BasicTank { } return null; default: - if (aSlotNumber == OTHER_SLOT_COUNT + 1 + machine.mInputSlotCount + machine.mOutputItems.length && aMouseclick < 2) { + if (aSlotNumber == OTHER_SLOT_COUNT + 1 + machine.mInputSlotCount + machine.mOutputItems.length + && aMouseclick < 2) { if (mTileEntity.isClientSide()) { // see parent class slotClick for an explanation on why doing this - GT_MetaTileEntity_BasicTank tTank = (GT_MetaTileEntity_BasicTank) mTileEntity.getMetaTileEntity(); + GT_MetaTileEntity_BasicTank tTank = + (GT_MetaTileEntity_BasicTank) mTileEntity.getMetaTileEntity(); tTank.setFillableStack(GT_Utility.getFluidFromDisplayStack(tTank.getStackInSlot(2))); } GT_MetaTileEntity_BasicTank tTank = (GT_MetaTileEntity_BasicTank) mTileEntity.getMetaTileEntity(); BasicTankFluidAccess tFillableAccess = BasicTankFluidAccess.from(tTank, true); GT_Recipe_Map recipes = machine.getRecipeList(); - //If the machine has recipes but no fluid inputs, disallow filling this slot with fluids. - ItemStack tToken = handleFluidSlotClick(tFillableAccess, aPlayer, aMouseclick == 0, true, (recipes == null || recipes.hasFluidInputs())); - if (mTileEntity.isServerSide() && tToken != null) - mTileEntity.markInventoryBeenModified(); + // If the machine has recipes but no fluid inputs, disallow filling this slot with fluids. + ItemStack tToken = handleFluidSlotClick( + tFillableAccess, + aPlayer, + aMouseclick == 0, + true, + (recipes == null || recipes.hasFluidInputs())); + if (mTileEntity.isServerSide() && tToken != null) mTileEntity.markInventoryBeenModified(); return tToken; } else { return super.slotClick(aSlotNumber, aMouseclick, aShifthold, aPlayer); diff --git a/src/main/java/gregtech/api/gui/GT_Container_BasicTank.java b/src/main/java/gregtech/api/gui/GT_Container_BasicTank.java index d294b60ca9..23769ab0cc 100644 --- a/src/main/java/gregtech/api/gui/GT_Container_BasicTank.java +++ b/src/main/java/gregtech/api/gui/GT_Container_BasicTank.java @@ -55,7 +55,8 @@ public class GT_Container_BasicTank extends GT_ContainerMetaTile_Machine { } GT_MetaTileEntity_BasicTank tTank = (GT_MetaTileEntity_BasicTank) mTileEntity.getMetaTileEntity(); BasicTankFluidAccess tDrainableAccess = BasicTankFluidAccess.from(tTank, false); - return handleFluidSlotClick(tDrainableAccess, aPlayer, aMouseclick == 0, true, !tTank.isDrainableStackSeparate()); + return handleFluidSlotClick( + tDrainableAccess, aPlayer, aMouseclick == 0, true, !tTank.isDrainableStackSeparate()); } return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); } @@ -66,8 +67,7 @@ public class GT_Container_BasicTank extends GT_ContainerMetaTile_Machine { if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) return; if (((GT_MetaTileEntity_BasicTank) mTileEntity.getMetaTileEntity()).mFluid != null) mContent = ((GT_MetaTileEntity_BasicTank) mTileEntity.getMetaTileEntity()).mFluid.amount; - else - mContent = 0; + else mContent = 0; for (Object crafter : this.crafters) { ICrafting player = (ICrafting) crafter; if (mTimer % 500 == 0 || oContent != mContent) { @@ -114,10 +114,8 @@ public class GT_Container_BasicTank extends GT_ContainerMetaTile_Machine { @Override public void set(FluidStack stack) { - if (mIsFillableStack) - mTank.setFillableStack(stack); - else - mTank.setDrainableStack(stack); + if (mIsFillableStack) mTank.setFillableStack(stack); + else mTank.setDrainableStack(stack); } @Override diff --git a/src/main/java/gregtech/api/gui/GT_Container_MaintenanceHatch.java b/src/main/java/gregtech/api/gui/GT_Container_MaintenanceHatch.java index c3758486ba..fcaf618b56 100644 --- a/src/main/java/gregtech/api/gui/GT_Container_MaintenanceHatch.java +++ b/src/main/java/gregtech/api/gui/GT_Container_MaintenanceHatch.java @@ -19,13 +19,11 @@ public class GT_Container_MaintenanceHatch extends GT_ContainerMetaTile_Machine @Override public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { - if (aSlotIndex != 0) - return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + if (aSlotIndex != 0) return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); ItemStack tStack = aPlayer.inventory.getItemStack(); if (tStack != null) { ((GT_MetaTileEntity_Hatch_Maintenance) mTileEntity.getMetaTileEntity()).onToolClick(tStack, aPlayer); - if (tStack.stackSize <= 0) - aPlayer.inventory.setItemStack(null); + if (tStack.stackSize <= 0) aPlayer.inventory.setItemStack(null); } return null; } diff --git a/src/main/java/gregtech/api/gui/GT_Container_MultiMachine.java b/src/main/java/gregtech/api/gui/GT_Container_MultiMachine.java index f5e9a83d19..722057950b 100644 --- a/src/main/java/gregtech/api/gui/GT_Container_MultiMachine.java +++ b/src/main/java/gregtech/api/gui/GT_Container_MultiMachine.java @@ -14,7 +14,8 @@ public class GT_Container_MultiMachine extends GT_ContainerMetaTile_Machine { super(aInventoryPlayer, aTileEntity); } - public GT_Container_MultiMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, boolean bindInventory) { + public GT_Container_MultiMachine( + InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, boolean bindInventory) { super(aInventoryPlayer, aTileEntity, bindInventory); } diff --git a/src/main/java/gregtech/api/gui/GT_Container_SpecialFilter.java b/src/main/java/gregtech/api/gui/GT_Container_SpecialFilter.java index fef857a7ae..0622f52865 100644 --- a/src/main/java/gregtech/api/gui/GT_Container_SpecialFilter.java +++ b/src/main/java/gregtech/api/gui/GT_Container_SpecialFilter.java @@ -48,51 +48,58 @@ public class GT_Container_SpecialFilter extends GT_ContainerMetaTile_Machine { return null; } if (aSlotIndex == 9) { - ((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()).clickTypeIcon(aMouseclick != 0, aPlayer.inventory.getItemStack()); + ((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()) + .clickTypeIcon(aMouseclick != 0, aPlayer.inventory.getItemStack()); return null; } if (aSlotIndex == 10) { - ((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()).bOutput); + ((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()).bOutput = + (!((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()).bOutput); if (((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()).bOutput) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("116","Emit Energy to Outputside")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("116", "Emit Energy to Outputside")); } else { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("117","Don't emit Energy")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("117", "Don't emit Energy")); } return null; } if (aSlotIndex == 11) { - ((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull); + ((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = + (!((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull); if (((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("122","Emit Redstone if slots contain something")); + GT_Utility.sendChatToPlayer( + aPlayer, GT_Utility.trans("122", "Emit Redstone if slots contain something")); } else { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("123","Don't emit Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("123", "Don't emit Redstone")); } return null; } if (aSlotIndex == 12) { - ((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()).bInvert = (!((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()).bInvert); + ((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()).bInvert = + (!((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()).bInvert); if (((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()).bInvert) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("120","Invert Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("120", "Invert Redstone")); } else { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("121","Don't invert Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("121", "Don't invert Redstone")); } return null; } if (aSlotIndex == 13) { - ((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()).bInvertFilter = (!((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()).bInvertFilter); + ((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()).bInvertFilter = + (!((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()).bInvertFilter); if (((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()).bInvertFilter) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("124","Invert Filter")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("124", "Invert Filter")); } else { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("125","Don't invert Filter")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("125", "Don't invert Filter")); } return null; } if (aSlotIndex == 14) { - ((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()).bNBTAllowed = (!((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()).bNBTAllowed); + ((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()).bNBTAllowed = + (!((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()).bNBTAllowed); if (((GT_MetaTileEntity_SpecialFilter) this.mTileEntity.getMetaTileEntity()).bNBTAllowed) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("126","Ignore NBT")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("126", "Ignore NBT")); } else { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("127","NBT has to match")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("127", "NBT has to match")); } return null; } diff --git a/src/main/java/gregtech/api/gui/GT_GUIColorOverride.java b/src/main/java/gregtech/api/gui/GT_GUIColorOverride.java index c2a833503e..63c7b224b5 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIColorOverride.java +++ b/src/main/java/gregtech/api/gui/GT_GUIColorOverride.java @@ -1,24 +1,25 @@ package gregtech.api.gui; -import gregtech.api.util.ColorsMetadataSection; import gregtech.api.GregTech_API; +import gregtech.api.util.ColorsMetadataSection; +import java.io.IOException; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.IResource; import net.minecraft.util.ResourceLocation; -import java.io.IOException; - public class GT_GUIColorOverride { private ColorsMetadataSection cmSection; public GT_GUIColorOverride(String guiTexturePath) { try { - IResource ir = Minecraft.getMinecraft().getResourceManager().getResource(new ResourceLocation(guiTexturePath)); + IResource ir = + Minecraft.getMinecraft().getResourceManager().getResource(new ResourceLocation(guiTexturePath)); if (ir.hasMetadata()) { cmSection = (ColorsMetadataSection) ir.getMetadata("colors"); } - } catch (IOException ignore) {} + } catch (IOException ignore) { + } } public int getTextColorOrDefault(String textType, int defaultColor) { diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer.java b/src/main/java/gregtech/api/gui/GT_GUIContainer.java index 5d3f0a59a1..281f910d8c 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer.java @@ -1,6 +1,7 @@ package gregtech.api.gui; -import gregtech.api.gui.GT_GUIColorOverride; +import static gregtech.GT_Mod.GT_FML_LOGGER; + import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.Tessellator; import net.minecraft.inventory.Container; @@ -8,10 +9,6 @@ import net.minecraft.inventory.Slot; import net.minecraft.util.ResourceLocation; import org.lwjgl.input.Mouse; -import java.io.IOException; - -import static gregtech.GT_Mod.GT_FML_LOGGER; - /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! * <p/> @@ -79,11 +76,9 @@ public class GT_GUIContainer extends GuiContainer { super.handleMouseInput(); } - protected void onMouseWheel(int mx, int my, int delta) { - } + protected void onMouseWheel(int mx, int my, int delta) {} - public boolean isMouseOverSlot(int slotIndex, int mx, int my) - { + public boolean isMouseOverSlot(int slotIndex, int mx, int my) { int size = inventorySlots.inventorySlots.size(); if (slotIndex < 0 || slotIndex >= size) { // slot does not exist somehow. log and carry on diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java b/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java index 8a744aee60..0752324678 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java @@ -17,16 +17,13 @@ import gregtech.api.net.GT_Packet_SetConfigurationCircuit; import gregtech.api.util.GT_TooltipDataCache; import gregtech.api.util.GT_Util; import gregtech.api.util.GT_Utility; - +import java.util.List; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import net.minecraft.util.StatCollector; - -import java.util.List; - import org.lwjgl.opengl.GL11; /** @@ -46,27 +43,22 @@ public class GT_GUIContainerMetaTile_Machine extends GT_GUIContainer implements // Cover Tabs support. Subclasses can override display position, style and visuals by overriding setupCoverTabs public GT_GuiCoverTabLine coverTabs; - private static final int - COVER_TAB_LEFT = -16, - COVER_TAB_TOP = 1, - COVER_TAB_HEIGHT = 20, - COVER_TAB_WIDTH = 18, - COVER_TAB_SPACING = 2; - private static final DisplayStyle - COVER_TAB_X_DIR = DisplayStyle.NONE, - COVER_TAB_Y_DIR = DisplayStyle.NORMAL; - private static final GT_GuiTabIconSet TAB_ICONSET = new GT_GuiTabIconSet( - GT_GuiIcon.TAB_NORMAL, - GT_GuiIcon.TAB_HIGHLIGHT, - GT_GuiIcon.TAB_DISABLED); + private static final int COVER_TAB_LEFT = -16, + COVER_TAB_TOP = 1, + COVER_TAB_HEIGHT = 20, + COVER_TAB_WIDTH = 18, + COVER_TAB_SPACING = 2; + private static final DisplayStyle COVER_TAB_X_DIR = DisplayStyle.NONE, COVER_TAB_Y_DIR = DisplayStyle.NORMAL; + private static final GT_GuiTabIconSet TAB_ICONSET = + new GT_GuiTabIconSet(GT_GuiIcon.TAB_NORMAL, GT_GuiIcon.TAB_HIGHLIGHT, GT_GuiIcon.TAB_DISABLED); public GT_GUIContainerMetaTile_Machine(GT_ContainerMetaTile_Machine aContainer, String aGUIbackground) { super(aContainer, aGUIbackground); mContainer = aContainer; DisplayStyle preferredDisplayStyle = GT_Mod.gregtechproxy.mCoverTabsVisible - ? (GT_Mod.gregtechproxy.mCoverTabsFlipped ? DisplayStyle.INVERSE : DisplayStyle.NORMAL) - : DisplayStyle.NONE; + ? (GT_Mod.gregtechproxy.mCoverTabsFlipped ? DisplayStyle.INVERSE : DisplayStyle.NORMAL) + : DisplayStyle.NONE; setupCoverTabs(preferredDisplayStyle); // Only setup tooltips if they're currently enabled. @@ -78,8 +70,8 @@ public class GT_GUIContainerMetaTile_Machine extends GT_GUIContainer implements mContainer.setCircuitSlotClickCallback(this::openSelectCircuitDialog); } - public GT_GUIContainerMetaTile_Machine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, - String aGUIbackground) { + public GT_GUIContainerMetaTile_Machine( + InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aGUIbackground) { this(new GT_ContainerMetaTile_Machine(aInventoryPlayer, aTileEntity), aGUIbackground); } @@ -88,18 +80,18 @@ public class GT_GUIContainerMetaTile_Machine extends GT_GUIContainer implements */ protected void setupCoverTabs(DisplayStyle preferredDisplayStyle) { coverTabs = new GT_GuiCoverTabLine( - this, - COVER_TAB_LEFT, - COVER_TAB_TOP, - COVER_TAB_HEIGHT, - COVER_TAB_WIDTH, - COVER_TAB_SPACING, - COVER_TAB_X_DIR, - COVER_TAB_Y_DIR, - preferredDisplayStyle, - getTabBackground(), - getMachine().getBaseMetaTileEntity(), - getColorization()); + this, + COVER_TAB_LEFT, + COVER_TAB_TOP, + COVER_TAB_HEIGHT, + COVER_TAB_WIDTH, + COVER_TAB_SPACING, + COVER_TAB_X_DIR, + COVER_TAB_Y_DIR, + preferredDisplayStyle, + getTabBackground(), + getMachine().getBaseMetaTileEntity(), + getColorization()); } @Override @@ -152,15 +144,14 @@ public class GT_GUIContainerMetaTile_Machine extends GT_GUIContainer implements /** * @return This machine's MetaTileEntity */ - private MetaTileEntity getMachine() { - return (MetaTileEntity ) mContainer.mTileEntity.getMetaTileEntity(); + private MetaTileEntity getMachine() { + return (MetaTileEntity) mContainer.mTileEntity.getMetaTileEntity(); } // Tabs support @Override - protected void mouseClicked(int mouseX, int mouseY, int mouseButton) - { + protected void mouseClicked(int mouseX, int mouseY, int mouseButton) { super.mouseClicked(mouseX, mouseY, mouseButton); // Check for clicked tabs coverTabs.onMouseClicked(mouseX, mouseY, mouseButton); @@ -188,11 +179,12 @@ public class GT_GUIContainerMetaTile_Machine extends GT_GUIContainer implements */ protected void setupTooltips() { if (mContainer.mTileEntity.getMetaTileEntity() instanceof IConfigurationCircuitSupport) { - IConfigurationCircuitSupport ccs = (IConfigurationCircuitSupport)mContainer.mTileEntity.getMetaTileEntity(); + IConfigurationCircuitSupport ccs = + (IConfigurationCircuitSupport) mContainer.mTileEntity.getMetaTileEntity(); if (ccs.allowSelectCircuit()) - addToolTip(new GT_GuiSlotTooltip(mContainer.getSlot(ccs.getCircuitGUISlot()), mTooltipCache.getData(GHOST_CIRCUIT_TOOLTIP))); + addToolTip(new GT_GuiSlotTooltip( + mContainer.getSlot(ccs.getCircuitGUISlot()), mTooltipCache.getData(GHOST_CIRCUIT_TOOLTIP))); } - } // GT_IToolTipRenderer and GT_ITabRenderer implementations @@ -200,30 +192,37 @@ public class GT_GUIContainerMetaTile_Machine extends GT_GUIContainer implements public void drawHoveringText(List text, int mouseX, int mouseY, FontRenderer font) { super.drawHoveringText(text, mouseX, mouseY, font); } + @Override public int getGuiTop() { return guiTop; } + @Override public int getGuiLeft() { return guiLeft; } + @Override public int getXSize() { return xSize; } + @Override public FontRenderer getFontRenderer() { return fontRendererObj; } + @Override public RenderItem getItemRenderer() { return itemRender; } + @Override public void addToolTip(GT_GuiTooltip toolTip) { mTooltipManager.addToolTip(toolTip); } + @Override public boolean removeToolTip(GT_GuiTooltip toolTip) { return mTooltipManager.removeToolTip(toolTip); @@ -232,11 +231,11 @@ public class GT_GUIContainerMetaTile_Machine extends GT_GUIContainer implements @Override protected void onMouseWheel(int mx, int my, int delta) { if (mContainer.mTileEntity.getMetaTileEntity() instanceof IConfigurationCircuitSupport) { - IConfigurationCircuitSupport ccs = (IConfigurationCircuitSupport)mContainer.mTileEntity.getMetaTileEntity(); + IConfigurationCircuitSupport ccs = + (IConfigurationCircuitSupport) mContainer.mTileEntity.getMetaTileEntity(); Slot slotCircuit = mContainer.getSlot(ccs.getCircuitGUISlot()); - if (slotCircuit != null && func_146978_c(slotCircuit.xDisplayPosition, - slotCircuit.yDisplayPosition, 16, 16, mx, my)) - { + if (slotCircuit != null + && func_146978_c(slotCircuit.xDisplayPosition, slotCircuit.yDisplayPosition, 16, 16, mx, my)) { // emulate click handleMouseClick(slotCircuit, -1, delta > 0 ? 1 : 0, 0); return; @@ -247,23 +246,22 @@ public class GT_GUIContainerMetaTile_Machine extends GT_GUIContainer implements private void openSelectCircuitDialog() { IMetaTileEntity machine = mContainer.mTileEntity.getMetaTileEntity(); - IConfigurationCircuitSupport ccs = (IConfigurationCircuitSupport)machine; + IConfigurationCircuitSupport ccs = (IConfigurationCircuitSupport) machine; List<ItemStack> circuits = ccs.getConfigurationCircuits(); mc.displayGuiScreen(new GT_GUIDialogSelectItem( - StatCollector.translateToLocal("GT5U.machines.select_circuit"), - machine.getStackForm(0), - this, - this::onCircuitSelected, - circuits, - GT_Utility.findMatchingStackInList(circuits, - machine.getStackInSlot(ccs.getCircuitSlot())))); + StatCollector.translateToLocal("GT5U.machines.select_circuit"), + machine.getStackForm(0), + this, + this::onCircuitSelected, + circuits, + GT_Utility.findMatchingStackInList(circuits, machine.getStackInSlot(ccs.getCircuitSlot())))); } private void onCircuitSelected(ItemStack selected) { GT_Values.NW.sendToServer(new GT_Packet_SetConfigurationCircuit(mContainer.mTileEntity, selected)); // we will not do any validation on client side // it doesn't get to actually decide what inventory contains anyway - IConfigurationCircuitSupport ccs = (IConfigurationCircuitSupport)mContainer.mTileEntity.getMetaTileEntity(); + IConfigurationCircuitSupport ccs = (IConfigurationCircuitSupport) mContainer.mTileEntity.getMetaTileEntity(); mContainer.mTileEntity.setInventorySlotContents(ccs.getCircuitSlot(), selected); } } diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_1by1.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_1by1.java index 7e85cb60f0..16ef27c941 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_1by1.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_1by1.java @@ -1,12 +1,12 @@ package gregtech.api.gui; +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; + import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.InventoryPlayer; -import static gregtech.api.enums.GT_Values.RES_PATH_GUI; - public class GT_GUIContainer_1by1 extends GT_GUIContainerMetaTile_Machine { - + private final String mName; private final int textColor = this.getTextColorOrDefault("title", 0x404040); @@ -15,7 +15,8 @@ public class GT_GUIContainer_1by1 extends GT_GUIContainerMetaTile_Machine { mName = aName; } - public GT_GUIContainer_1by1(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) { + public GT_GUIContainer_1by1( + InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) { super(new GT_Container_1by1(aInventoryPlayer, aTileEntity), RES_PATH_GUI + aBackground + "1by1.png"); mName = aName; } diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_2by2.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_2by2.java index acefe12459..909a5b0d6a 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_2by2.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_2by2.java @@ -1,10 +1,10 @@ package gregtech.api.gui; +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; + import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.InventoryPlayer; -import static gregtech.api.enums.GT_Values.RES_PATH_GUI; - public class GT_GUIContainer_2by2 extends GT_GUIContainerMetaTile_Machine { private final String mName; @@ -15,7 +15,8 @@ public class GT_GUIContainer_2by2 extends GT_GUIContainerMetaTile_Machine { mName = aName; } - public GT_GUIContainer_2by2(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) { + public GT_GUIContainer_2by2( + InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) { super(new GT_Container_2by2(aInventoryPlayer, aTileEntity), RES_PATH_GUI + aBackground + "2by2.png"); mName = aName; } diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_2by2_Fluid.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_2by2_Fluid.java index afabaa0a80..d896349f0a 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_2by2_Fluid.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_2by2_Fluid.java @@ -1,11 +1,11 @@ package gregtech.api.gui; +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; + import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.StatCollector; -import static gregtech.api.enums.GT_Values.RES_PATH_GUI; - public class GT_GUIContainer_2by2_Fluid extends GT_GUIContainerMetaTile_Machine { private final String mName; @@ -29,5 +29,4 @@ public class GT_GUIContainer_2by2_Fluid extends GT_GUIContainerMetaTile_Machine int y = (height - ySize) / 2; drawTexturedModalRect(x, y, 0, 0, xSize, ySize); } - } diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_3by3.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_3by3.java index c2911fc67f..97caa08946 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_3by3.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_3by3.java @@ -1,10 +1,10 @@ package gregtech.api.gui; +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; + import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.InventoryPlayer; -import static gregtech.api.enums.GT_Values.RES_PATH_GUI; - public class GT_GUIContainer_3by3 extends GT_GUIContainerMetaTile_Machine { private final String mName; @@ -15,7 +15,8 @@ public class GT_GUIContainer_3by3 extends GT_GUIContainerMetaTile_Machine { mName = aName; } - public GT_GUIContainer_3by3(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) { + public GT_GUIContainer_3by3( + InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) { super(new GT_Container_3by3(aInventoryPlayer, aTileEntity), RES_PATH_GUI + aBackground + "3by3.png"); mName = aName; } diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_4by4.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_4by4.java index b28129eede..40441e3093 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_4by4.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_4by4.java @@ -1,10 +1,10 @@ package gregtech.api.gui; +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; + import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.InventoryPlayer; -import static gregtech.api.enums.GT_Values.RES_PATH_GUI; - public class GT_GUIContainer_4by4 extends GT_GUIContainerMetaTile_Machine { private final String mName; @@ -15,7 +15,8 @@ public class GT_GUIContainer_4by4 extends GT_GUIContainerMetaTile_Machine { mName = aName; } - public GT_GUIContainer_4by4(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) { + public GT_GUIContainer_4by4( + InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) { super(new GT_Container_4by4(aInventoryPlayer, aTileEntity), RES_PATH_GUI + aBackground + "4by4.png"); mName = aName; } diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicMachine.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicMachine.java index 338d9e14a2..35dcf047a7 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicMachine.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicMachine.java @@ -1,27 +1,23 @@ package gregtech.api.gui; +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; + import gregtech.api.enums.GT_Values; import gregtech.api.gui.widgets.GT_GuiIcon; +import gregtech.api.gui.widgets.GT_GuiSlotTooltip; +import gregtech.api.gui.widgets.GT_GuiSmartTooltip; +import gregtech.api.gui.widgets.GT_GuiSmartTooltip.TooltipVisibilityProvider; import gregtech.api.gui.widgets.GT_GuiTabLine.GT_GuiTabIconSet; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Steel; -import gregtech.api.gui.widgets.GT_GuiSlotTooltip; -import gregtech.api.gui.widgets.GT_GuiSmartTooltip; -import gregtech.api.gui.widgets.GT_GuiSmartTooltip.TooltipVisibilityProvider; -import gregtech.api.net.GT_Packet_SetConfigurationCircuit; -import gregtech.common.power.Power; -import gregtech.api.util.GT_Utility; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.common.power.Power; import gregtech.nei.NEI_TransferRectHost; +import java.awt.Rectangle; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; import net.minecraft.util.StatCollector; -import java.awt.Rectangle; - -import static gregtech.api.enums.GT_Values.RES_PATH_GUI; - /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! * <p/> @@ -32,45 +28,47 @@ import static gregtech.api.enums.GT_Values.RES_PATH_GUI; */ public class GT_GUIContainer_BasicMachine extends GT_GUIContainerMetaTile_Machine implements NEI_TransferRectHost { private static final int NEEDS_STEAM_VENTING = 64; - private final static GT_GuiTabIconSet TAB_ICONSET_BRONZE = new GT_GuiTabIconSet( - GT_GuiIcon.TAB_NORMAL_BRONZE, - GT_GuiIcon.TAB_HIGHLIGHT_BRONZE, - GT_GuiIcon.TAB_DISABLED_BRONZE); - private final static GT_GuiTabIconSet TAB_ICONSET_STEEL = new GT_GuiTabIconSet( - GT_GuiIcon.TAB_NORMAL_STEEL, - GT_GuiIcon.TAB_HIGHLIGHT_STEEL, - GT_GuiIcon.TAB_DISABLED_STEEL); + private static final GT_GuiTabIconSet TAB_ICONSET_BRONZE = new GT_GuiTabIconSet( + GT_GuiIcon.TAB_NORMAL_BRONZE, GT_GuiIcon.TAB_HIGHLIGHT_BRONZE, GT_GuiIcon.TAB_DISABLED_BRONZE); + private static final GT_GuiTabIconSet TAB_ICONSET_STEEL = new GT_GuiTabIconSet( + GT_GuiIcon.TAB_NORMAL_STEEL, GT_GuiIcon.TAB_HIGHLIGHT_STEEL, GT_GuiIcon.TAB_DISABLED_STEEL); private final int textColor = this.getTextColorOrDefault("title", 0x404040); - public final String - mName, - mNEI; - public final byte - mProgressBarDirection, - mProgressBarAmount; - + public final String mName, mNEI; + public final byte mProgressBarDirection, mProgressBarAmount; + // Tooltip localization keys - private static final String - BATTERY_SLOT_TOOLTIP = "GT5U.machines.battery_slot.tooltip", - BATTERY_SLOT_TOOLTIP_ALT = "GT5U.machines.battery_slot.tooltip.alternative", - UNUSED_SLOT_TOOLTIP = "GT5U.machines.unused_slot.tooltip", - SPECIAL_SLOT_TOOLTIP = "GT5U.machines.special_slot.tooltip", - FLUID_INPUT_TOOLTIP = "GT5U.machines.fluid_input_slot.tooltip", - FLUID_OUTPUT_TOOLTIP = "GT5U.machines.fluid_output_slot.tooltip", - STALLED_STUTTERING_TOOLTIP = "GT5U.machines.stalled_stuttering.tooltip", - STALLED_VENT_TOOLTIP = "GT5U.machines.stalled_vent.tooltip", - FLUID_TRANSFER_TOOLTIP = "GT5U.machines.fluid_transfer.tooltip", - ITEM_TRANSFER_TOOLTIP = "GT5U.machines.item_transfer.tooltip", - POWER_SOURCE_KEY = "GT5U.machines.powersource."; - - public GT_GUIContainer_BasicMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, - String aTextureFile, String aNEI) { + private static final String BATTERY_SLOT_TOOLTIP = "GT5U.machines.battery_slot.tooltip", + BATTERY_SLOT_TOOLTIP_ALT = "GT5U.machines.battery_slot.tooltip.alternative", + UNUSED_SLOT_TOOLTIP = "GT5U.machines.unused_slot.tooltip", + SPECIAL_SLOT_TOOLTIP = "GT5U.machines.special_slot.tooltip", + FLUID_INPUT_TOOLTIP = "GT5U.machines.fluid_input_slot.tooltip", + FLUID_OUTPUT_TOOLTIP = "GT5U.machines.fluid_output_slot.tooltip", + STALLED_STUTTERING_TOOLTIP = "GT5U.machines.stalled_stuttering.tooltip", + STALLED_VENT_TOOLTIP = "GT5U.machines.stalled_vent.tooltip", + FLUID_TRANSFER_TOOLTIP = "GT5U.machines.fluid_transfer.tooltip", + ITEM_TRANSFER_TOOLTIP = "GT5U.machines.item_transfer.tooltip", + POWER_SOURCE_KEY = "GT5U.machines.powersource."; + + public GT_GUIContainer_BasicMachine( + InventoryPlayer aInventoryPlayer, + IGregTechTileEntity aTileEntity, + String aName, + String aTextureFile, + String aNEI) { this(aInventoryPlayer, aTileEntity, aName, aTextureFile, aNEI, (byte) 0, (byte) 1); } - public GT_GUIContainer_BasicMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, - String aTextureFile, String aNEI, byte aProgressBarDirection, byte aProgressBarAmount) { - super(new GT_Container_BasicMachine(aInventoryPlayer, aTileEntity), - RES_PATH_GUI + "basicmachines/" + aTextureFile); + public GT_GUIContainer_BasicMachine( + InventoryPlayer aInventoryPlayer, + IGregTechTileEntity aTileEntity, + String aName, + String aTextureFile, + String aNEI, + byte aProgressBarDirection, + byte aProgressBarAmount) { + super( + new GT_Container_BasicMachine(aInventoryPlayer, aTileEntity), + RES_PATH_GUI + "basicmachines/" + aTextureFile); mProgressBarDirection = aProgressBarDirection; mProgressBarAmount = (byte) Math.max(1, aProgressBarAmount); mName = aName; @@ -92,11 +90,14 @@ public class GT_GUIContainer_BasicMachine extends GT_GUIContainerMetaTile_Machin if (machine.isSteampowered()) { batterySlotTooltipKey = UNUSED_SLOT_TOOLTIP; batterySlotTooltipArgs = new String[0]; - addToolTip(new GT_GuiSmartTooltip(tProblemArea, new TooltipVisibilityProvider() { - public boolean shouldShowTooltip() { - return hasErrorCode(NEEDS_STEAM_VENTING); - } - }, mTooltipCache.getData(STALLED_VENT_TOOLTIP))); + addToolTip(new GT_GuiSmartTooltip( + tProblemArea, + new TooltipVisibilityProvider() { + public boolean shouldShowTooltip() { + return hasErrorCode(NEEDS_STEAM_VENTING); + } + }, + mTooltipCache.getData(STALLED_VENT_TOOLTIP))); } else { String pTier1 = powerTierName(machine.mTier); if (machine.mTier == GT_Values.VN.length - 1) { @@ -106,29 +107,36 @@ public class GT_GUIContainer_BasicMachine extends GT_GUIContainerMetaTile_Machin batterySlotTooltipKey = BATTERY_SLOT_TOOLTIP; batterySlotTooltipArgs = new String[] {pTier1, powerTierName((byte) (machine.mTier + 1))}; } - addToolTip(new GT_GuiSlotTooltip( container.slotFluidTransferToggle, - mTooltipCache.getData(FLUID_TRANSFER_TOOLTIP))); - addToolTip(new GT_GuiSlotTooltip( container.slotItemTransferToggle, - mTooltipCache.getData(ITEM_TRANSFER_TOOLTIP))); - } + addToolTip(new GT_GuiSlotTooltip( + container.slotFluidTransferToggle, mTooltipCache.getData(FLUID_TRANSFER_TOOLTIP))); + addToolTip(new GT_GuiSlotTooltip( + container.slotItemTransferToggle, mTooltipCache.getData(ITEM_TRANSFER_TOOLTIP))); + } if (recipes != null && recipes.hasFluidInputs()) { - addToolTip(new GT_GuiSlotTooltip(container.slotFluidInput, - mTooltipCache.getData(FLUID_INPUT_TOOLTIP, machine.getCapacity()))); + addToolTip(new GT_GuiSlotTooltip( + container.slotFluidInput, mTooltipCache.getData(FLUID_INPUT_TOOLTIP, machine.getCapacity()))); } if (recipes != null && recipes.hasFluidOutputs()) { - addToolTip(new GT_GuiSlotTooltip(container.slotFluidOutput, - mTooltipCache.getData(FLUID_OUTPUT_TOOLTIP, machine.getCapacity()))); + addToolTip(new GT_GuiSlotTooltip( + container.slotFluidOutput, mTooltipCache.getData(FLUID_OUTPUT_TOOLTIP, machine.getCapacity()))); } - addToolTip( new GT_GuiSlotTooltip(getContainer().slotBattery, - mTooltipCache.getData(batterySlotTooltipKey, batterySlotTooltipArgs))); - addToolTip(new GT_GuiSlotTooltip(container.slotSpecial, mTooltipCache.getData( - recipes != null && recipes.usesSpecialSlot() ? SPECIAL_SLOT_TOOLTIP : UNUSED_SLOT_TOOLTIP))); - addToolTip(new GT_GuiSmartTooltip(tProblemArea, new TooltipVisibilityProvider() { + addToolTip(new GT_GuiSlotTooltip( + getContainer().slotBattery, mTooltipCache.getData(batterySlotTooltipKey, batterySlotTooltipArgs))); + addToolTip(new GT_GuiSlotTooltip( + container.slotSpecial, + mTooltipCache.getData( + recipes != null && recipes.usesSpecialSlot() ? SPECIAL_SLOT_TOOLTIP : UNUSED_SLOT_TOOLTIP))); + addToolTip(new GT_GuiSmartTooltip( + tProblemArea, + new TooltipVisibilityProvider() { public boolean shouldShowTooltip() { return container.mStuttering && !hasErrorCode(NEEDS_STEAM_VENTING); } - }, mTooltipCache.getData(STALLED_STUTTERING_TOOLTIP, StatCollector.translateToLocal( - POWER_SOURCE_KEY + (machine.isSteampowered() ? "steam" : "power"))))); + }, + mTooltipCache.getData( + STALLED_STUTTERING_TOOLTIP, + StatCollector.translateToLocal( + POWER_SOURCE_KEY + (machine.isSteampowered() ? "steam" : "power"))))); } /** @@ -158,19 +166,23 @@ public class GT_GUIContainer_BasicMachine extends GT_GUIContainerMetaTile_Machin drawTexturedModalRect(x, y, 0, 0, xSize, ySize); if (mContainer != null) { if (!getMachine().isSteampowered()) { - if (getContainer().mFluidTransfer) - drawTexturedModalRect(x + 7, y + 62, 176, 18, 18, 18); - if (getContainer().mItemTransfer) - drawTexturedModalRect(x + 25, y + 62, 176, 36, 18, 18); + if (getContainer().mFluidTransfer) drawTexturedModalRect(x + 7, y + 62, 176, 18, 18, 18); + if (getContainer().mItemTransfer) drawTexturedModalRect(x + 25, y + 62, 176, 36, 18, 18); } - if (getContainer().mStuttering) - drawTexturedModalRect(x + 79, y + 44, 176, 54, 18, 18); + if (getContainer().mStuttering) drawTexturedModalRect(x + 79, y + 44, 176, 54, 18, 18); if (mContainer.mMaxProgressTime > 0) { int tSize = mProgressBarDirection < 2 ? 20 : 18; - int tProgress = Math.max(1, Math.min(tSize * mProgressBarAmount, (mContainer.mProgressTime > 0 ? 1 : 0) - + mContainer.mProgressTime * tSize * mProgressBarAmount / mContainer.mMaxProgressTime)) - % (tSize + 1); + int tProgress = Math.max( + 1, + Math.min( + tSize * mProgressBarAmount, + (mContainer.mProgressTime > 0 ? 1 : 0) + + mContainer.mProgressTime + * tSize + * mProgressBarAmount + / mContainer.mMaxProgressTime)) + % (tSize + 1); switch (mProgressBarDirection) { // yes, my OCD was mad at me before I did the Tabs. case 0: @@ -210,7 +222,8 @@ public class GT_GUIContainer_BasicMachine extends GT_GUIContainerMetaTile_Machin protected GT_GuiTabIconSet getTabBackground() { if (getMachine().isSteampowered()) { return getMachine() instanceof GT_MetaTileEntity_BasicMachine_Steel - ? TAB_ICONSET_STEEL : TAB_ICONSET_BRONZE; + ? TAB_ICONSET_STEEL + : TAB_ICONSET_BRONZE; } return super.getTabBackground(); } @@ -243,7 +256,7 @@ public class GT_GUIContainer_BasicMachine extends GT_GUIContainerMetaTile_Machin @Override public Object[] getNeiTransferRectArgs() { - return new Object[]{getMachine().getPower()}; + return new Object[] {getMachine().getPower()}; } @Override diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicTank.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicTank.java index a24060aaa4..034525c338 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicTank.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicTank.java @@ -1,19 +1,18 @@ package gregtech.api.gui; +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; + import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.StatCollector; -import static gregtech.api.enums.GT_Values.RES_PATH_GUI; - public class GT_GUIContainer_BasicTank extends GT_GUIContainerMetaTile_Machine { private final String mName; - private final int - textColor = this.getTextColorOrDefault("text", 0xFAFAFF), - textColorTitle = this.getTextColorOrDefault("title", 0x404040), - textColorValue = this.getTextColorOrDefault("value", 0xFAFAFF); + private final int textColor = this.getTextColorOrDefault("text", 0xFAFAFF), + textColorTitle = this.getTextColorOrDefault("title", 0x404040), + textColorValue = this.getTextColorOrDefault("value", 0xFAFAFF); public GT_GUIContainer_BasicTank(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { super(new GT_Container_BasicTank(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "BasicTank.png"); @@ -22,11 +21,16 @@ public class GT_GUIContainer_BasicTank extends GT_GUIContainerMetaTile_Machine { @Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { - fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, ySize - 96 + 2, textColorTitle); + fontRendererObj.drawString( + StatCollector.translateToLocal("container.inventory"), 8, ySize - 96 + 2, textColorTitle); fontRendererObj.drawString(mName, 8, 6, textColorTitle); if (mContainer != null) { fontRendererObj.drawString("Liquid Amount", 10, 20, textColor); - fontRendererObj.drawString(GT_Utility.parseNumberToString(((GT_Container_BasicTank) mContainer).mContent), 10, 30, textColorValue); + fontRendererObj.drawString( + GT_Utility.parseNumberToString(((GT_Container_BasicTank) mContainer).mContent), + 10, + 30, + textColorValue); } } diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_MaintenanceHatch.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_MaintenanceHatch.java index fe3c47fa95..07ca031345 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_MaintenanceHatch.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_MaintenanceHatch.java @@ -1,15 +1,13 @@ package gregtech.api.gui; +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; + import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.InventoryPlayer; -import static gregtech.api.enums.GT_Values.RES_PATH_GUI; - public class GT_GUIContainer_MaintenanceHatch extends GT_GUIContainerMetaTile_Machine { - private final int - textColor = this.getTextColorOrDefault("text", 0x404040), - textColorTitle = this.getTextColorOrDefault("title", 0x404040); - + private final int textColor = this.getTextColorOrDefault("text", 0x404040), + textColorTitle = this.getTextColorOrDefault("title", 0x404040); public GT_GUIContainer_MaintenanceHatch(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(new GT_Container_MaintenanceHatch(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "Maintenance.png"); diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java index 69a3d26b2e..98268cd667 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java @@ -1,5 +1,7 @@ package gregtech.api.gui; +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; + import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; @@ -9,9 +11,6 @@ import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeTurbin import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; -import static gregtech.api.enums.GT_Values.RES_PATH_GUI; - - /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! * <p/> @@ -22,12 +21,14 @@ import static gregtech.api.enums.GT_Values.RES_PATH_GUI; public class GT_GUIContainer_MultiMachine extends GT_GUIContainerMetaTile_Machine { String mName = ""; - private final int - textColor = this.getTextColorOrDefault("text", 0xFAFAFF), - textColorTitle = this.getTextColorOrDefault("title", 0xFAFAFF); - - public GT_GUIContainer_MultiMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aTextureFile) { - super(new GT_Container_MultiMachine(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "multimachines/" + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile)); + private final int textColor = this.getTextColorOrDefault("text", 0xFAFAFF), + textColorTitle = this.getTextColorOrDefault("title", 0xFAFAFF); + + public GT_GUIContainer_MultiMachine( + InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aTextureFile) { + super( + new GT_Container_MultiMachine(aInventoryPlayer, aTileEntity), + RES_PATH_GUI + "multimachines/" + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile)); mName = aName; } @@ -74,8 +75,9 @@ public class GT_GUIContainer_MultiMachine extends GT_GUIContainerMetaTile_Machin line_counter += 8; } - - if (mContainer != null) {//(mWrench ? 0 : 1) | (mScrewdriver ? 0 : 2) | (mSoftHammer ? 0 : 4) | (mHardHammer ? 0 : 8) | (mSolderingTool ? 0 : 16) | (mCrowbar ? 0 : 32) | (mMachine ? 0 : 64)); + if (mContainer + != null) { // (mWrench ? 0 : 1) | (mScrewdriver ? 0 : 2) | (mSoftHammer ? 0 : 4) | (mHardHammer ? 0 : 8) + // | (mSolderingTool ? 0 : 16) | (mCrowbar ? 0 : 32) | (mMachine ? 0 : 64)); if ((mContainer.mDisplayErrorCode & 1) != 0) { fontRendererObj.drawString(GT_Utility.trans("132", "Pipe is loose."), 10, line_counter, textColor); line_counter += 8; @@ -92,46 +94,60 @@ public class GT_GUIContainer_MultiMachine extends GT_GUIContainerMetaTile_Machin } if ((mContainer.mDisplayErrorCode & 8) != 0) { - fontRendererObj.drawString(GT_Utility.trans("135", "Platings are dented."), 10, line_counter, textColor); + fontRendererObj.drawString( + GT_Utility.trans("135", "Platings are dented."), 10, line_counter, textColor); line_counter += 8; } if ((mContainer.mDisplayErrorCode & 16) != 0) { - fontRendererObj.drawString(GT_Utility.trans("136", "Circuitry burned out."), 10, line_counter, textColor); + fontRendererObj.drawString( + GT_Utility.trans("136", "Circuitry burned out."), 10, line_counter, textColor); line_counter += 8; } if ((mContainer.mDisplayErrorCode & 32) != 0) { - fontRendererObj.drawString(GT_Utility.trans("137", "That doesn't belong there."), 10, line_counter, textColor); + fontRendererObj.drawString( + GT_Utility.trans("137", "That doesn't belong there."), 10, line_counter, textColor); line_counter += 8; } if ((mContainer.mDisplayErrorCode & 64) != 0) { - fontRendererObj.drawString(GT_Utility.trans("138", "Incomplete Structure."), 10, line_counter, textColor); + fontRendererObj.drawString( + GT_Utility.trans("138", "Incomplete Structure."), 10, line_counter, textColor); line_counter += 8; } if (mContainer.mDisplayErrorCode == 0) { if (mContainer.mActive == 0) { - fontRendererObj.drawString(GT_Utility.trans("139", "Hit with Soft Mallet"), 10, line_counter, textColor); + fontRendererObj.drawString( + GT_Utility.trans("139", "Hit with Soft Mallet"), 10, line_counter, textColor); line_counter += 8; - fontRendererObj.drawString(GT_Utility.trans("140", "to (re-)start the Machine"), 10, line_counter, textColor); + fontRendererObj.drawString( + GT_Utility.trans("140", "to (re-)start the Machine"), 10, line_counter, textColor); line_counter += 8; - fontRendererObj.drawString(GT_Utility.trans("141", "if it doesn't start."), 10, line_counter, textColor); + fontRendererObj.drawString( + GT_Utility.trans("141", "if it doesn't start."), 10, line_counter, textColor); line_counter += 8; } else { - fontRendererObj.drawString(GT_Utility.trans("142", "Running perfectly."), 10, line_counter, textColor); + fontRendererObj.drawString( + GT_Utility.trans("142", "Running perfectly."), 10, line_counter, textColor); line_counter += 8; } if (mContainer.mTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_DrillerBase) { ItemStack tItem = mContainer.mTileEntity.getMetaTileEntity().getStackInSlot(1); - if (tItem == null || !GT_Utility.areStacksEqual(tItem, GT_ModHandler.getIC2Item("miningPipe", 1L))) { - fontRendererObj.drawString(GT_Utility.trans("143", "Missing Mining Pipe"), 10, line_counter, textColor); + if (tItem == null + || !GT_Utility.areStacksEqual(tItem, GT_ModHandler.getIC2Item("miningPipe", 1L))) { + fontRendererObj.drawString( + GT_Utility.trans("143", "Missing Mining Pipe"), 10, line_counter, textColor); } } else if (mContainer.mTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_LargeTurbine) { ItemStack tItem = mContainer.mTileEntity.getMetaTileEntity().getStackInSlot(1); - if (tItem == null || !(tItem.getItem() == GT_MetaGenerated_Tool_01.INSTANCE && tItem.getItemDamage() >= 170 && tItem.getItemDamage() <= 177)) { - fontRendererObj.drawString(GT_Utility.trans("144", "Missing Turbine Rotor"), 10, line_counter, textColor); + if (tItem == null + || !(tItem.getItem() == GT_MetaGenerated_Tool_01.INSTANCE + && tItem.getItemDamage() >= 170 + && tItem.getItemDamage() <= 177)) { + fontRendererObj.drawString( + GT_Utility.trans("144", "Missing Turbine Rotor"), 10, line_counter, textColor); } } } diff --git a/src/main/java/gregtech/api/gui/GT_GUICover.java b/src/main/java/gregtech/api/gui/GT_GUICover.java index 4f61c95dd3..635a27d6ef 100644 --- a/src/main/java/gregtech/api/gui/GT_GUICover.java +++ b/src/main/java/gregtech/api/gui/GT_GUICover.java @@ -31,19 +31,18 @@ public abstract class GT_GUICover extends GT_GUIScreen { public void setParentGuiId(int parentGuiId) { this.parentGuiId = parentGuiId; } - @Override public void closeScreen() { // If this cover was given a guiId, tell the server to open it for us when this GUI closes. if (parentGuiId != -1 && tile.isUseableByPlayer(mc.thePlayer)) { GT_Values.NW.sendToServer(new GT_Packet_GtTileEntityGuiRequest( - tile.getXCoord(), - tile.getYCoord(), - tile.getZCoord(), - parentGuiId, - tile.getWorld().provider.dimensionId, - mc.thePlayer.getEntityId())); + tile.getXCoord(), + tile.getYCoord(), + tile.getZCoord(), + parentGuiId, + tile.getWorld().provider.dimensionId, + mc.thePlayer.getEntityId())); } else { this.mc.displayGuiScreen(null); this.mc.setIngameFocus(); diff --git a/src/main/java/gregtech/api/gui/GT_GUIDialogSelectItem.java b/src/main/java/gregtech/api/gui/GT_GUIDialogSelectItem.java index 0aec243967..c077b02bf7 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIDialogSelectItem.java +++ b/src/main/java/gregtech/api/gui/GT_GUIDialogSelectItem.java @@ -4,215 +4,227 @@ import gregtech.api.gui.widgets.GT_GuiFakeItemButton; import gregtech.api.gui.widgets.GT_GuiIcon; import gregtech.api.gui.widgets.GT_GuiIconButton; import gregtech.api.util.GT_Utility; +import java.util.ArrayList; +import java.util.List; +import java.util.function.Consumer; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; import net.minecraft.item.ItemStack; import net.minecraft.util.StatCollector; -import java.util.ArrayList; -import java.util.List; -import java.util.function.Consumer; - public class GT_GUIDialogSelectItem extends GT_GUIScreen { - public static final int UNSELECTED = -1; - private static final int cols = 9; - private static final int rows = 3; - private final int textColor = this.getTextColorOrDefault("text",0xff555555); - private final GuiScreen parent; - private final Consumer<ItemStack> selectedCallback; - // passed in stack - private final List<ItemStack> stacks; - // all slots not including btnCurrent - private final List<GT_GuiFakeItemButton> slots = new ArrayList<>(); - // the currently selected slot content - private final GT_GuiFakeItemButton btnCurrent = new GT_GuiFakeItemButton(this, 8, 25, GT_GuiIcon.SLOT_DARKGRAY).setMimicSlot(true); - private final boolean noDeselect; - private int selected; - private int scroll = 0; - private GT_GuiIconButton btnUp; - private GT_GuiIconButton btnDown; - - - public GT_GUIDialogSelectItem(String header, ItemStack headerItem, GuiScreen parent, Consumer<ItemStack> selectedCallback, List<ItemStack> stacks) { - this(header, headerItem, parent, selectedCallback, stacks, UNSELECTED); - } - - public GT_GUIDialogSelectItem(String header, ItemStack headerItem, GuiScreen parent, Consumer<ItemStack> selectedCallback, List<ItemStack> stacks, int selected) { - this(header, headerItem, parent, selectedCallback, stacks, selected, false); - } - - /** - * Open a dialog to select an item from given list. Given callback may be called zero or more times depending on user action. - * @param header Header text - * @param headerItem ItemStack to use as Dialog icon - * @param parent open which GUIScreen when this dialog is closed. use null if it has no parent. - * @param selectedCallback callback upon selected - * @param stacks list to choose from - * @param selected preselected item. Use {@link #UNSELECTED} for unselected. Invalid selected will be clamped to 0 or highest index - * @param noDeselect true if player cannot deselect, false otherwise. If this is set to true, selectedCallback is guaranteed to be called with a nonnull stack - */ - public GT_GUIDialogSelectItem(String header, ItemStack headerItem, GuiScreen parent, Consumer<ItemStack> selectedCallback, List<ItemStack> stacks, int selected, boolean noDeselect) { - super(176, 107, header); - this.noDeselect = noDeselect; - if (headerItem != null) - this.headerIcon.setItem(headerItem); - this.parent = parent; - this.selectedCallback = selectedCallback; - this.stacks = stacks; - - if (stacks.size() > rows * cols) { - btnUp = new GT_GuiIconButton(this, 0, 134, 25, GT_GuiIcon.GREEN_ARROW_UP); - btnDown = new GT_GuiIconButton(this, 1, 152, 25, GT_GuiIcon.GREEN_ARROW_DOWN); - } - - for (int i = 0; i < rows; i++) { - for (int j = 0; j < cols; j++) { - slots.add(new GT_GuiFakeItemButton(this, 8 + 18 * j, 44 + 18 * i, GT_GuiIcon.SLOT_GRAY).setMimicSlot(true)); - } - } - - setSelected(noDeselect ? Math.max(0, selected) : selected); - ensureSelectedDisplayed(); - } - - @Override - protected void onInitGui(int guiLeft, int guiTop, int gui_width, int gui_height) { - btnCurrent.setX(8 + 2 + fontRendererObj.getStringWidth(StatCollector.translateToLocal("GT5U.gui.select.current"))); - } - - @Override - public void closeScreen() { - selectedCallback.accept(getCandidate(getSelected())); - mc.displayGuiScreen(parent); - if (parent == null) - mc.setIngameFocus(); - } - - @Override - public void buttonClicked(GuiButton button) { - switch (button.id) { - case 0: - setScroll(scroll - 1); - return; - case 1: - setScroll(scroll + 1); - return; - } - super.buttonClicked(button); - } - - @Override - public void drawExtras(int mouseX, int mouseY, float parTicks) { - int y = 25 + (18 - getFontRenderer().FONT_HEIGHT) / 2; - getFontRenderer().drawString(StatCollector.translateToLocal("GT5U.gui.select.current"), 8, y, textColor); - super.drawExtras(mouseX, mouseY, parTicks); - } - - @Override - public void mouseClicked(int x, int y, int button) { - int mx = x - guiLeft, my = y - guiTop; - if (button == 0) { - if (btnCurrent.getBounds().contains(mx, my)) { - ensureSelectedDisplayed(); - return; - } - - for (int i = 0, slotsSize = slots.size(); i < slotsSize; i++) { - GT_GuiFakeItemButton slot = slots.get(i); - if (slot.getBounds().contains(mx, my)) { - setSelected(slotIndexToListIndex(i)); - return; - } - } - } else if (button == 1 && getSelected() >= 0) { - if (btnCurrent.getBounds().contains(mx, my)) { - setSelected(UNSELECTED); - return; - } - GT_GuiFakeItemButton slot = getSlot(listIndexToSlotIndex(getSelected())); - if (slot != null && slot.getBounds().contains(mx, my)) { - setSelected(UNSELECTED); - } - } - super.mouseClicked(x, y, button); - } - - @Override - public void onMouseWheel(int x, int y, int delta) { - if (delta < 0) - setScroll(scroll + 1); - else if (delta > 0) - setScroll(scroll - 1); - } - - private void fillSlots() { - for (int i = 0, j = scroll * cols; i < slots.size(); i++, j++) { - slots.get(i) - .setItem(getCandidate(j)) - .setBgIcon(j == getSelected() ? GT_GuiIcon.SLOT_DARKGRAY : GT_GuiIcon.SLOT_GRAY); - } - } - - private void ensureSelectedDisplayed() { - if (getSelected() < scroll * cols) { - setScroll(getSelected() / cols); - } else if (getSelected() > (scroll + rows) * cols) { - setScroll((getSelected() - (rows - 1) * cols) / cols); - } else { - // called nonetheless to update button enabled states - setScroll(scroll); - } - } - - private int slotIndexToListIndex(int index) { - int mapped = scroll * cols + index; - return mapped >= stacks.size() ? UNSELECTED : mapped; - } - - private int listIndexToSlotIndex(int index) { - return index - scroll * cols; - } - - public int getSelected() { - return selected; - } - - public void setSelected(int selected) { - if (selected == this.selected) return; - int newSelected = GT_Utility.clamp(selected, UNSELECTED, stacks.size() - 1); - - if (noDeselect && newSelected == UNSELECTED) - return; - - GT_GuiFakeItemButton selectedSlot = getSlot(this.selected); - if (selectedSlot != null) - selectedSlot.setBgIcon(GT_GuiIcon.SLOT_GRAY); - - this.selected = newSelected; - - btnCurrent.setItem(getCandidate(this.selected)); - - selectedSlot = getSlot(this.selected); - if (selectedSlot != null) - selectedSlot.setBgIcon(GT_GuiIcon.SLOT_DARKGRAY); - } - - private void setScroll(int scroll) { - if (stacks.size() > rows * cols) { - int lo = 0; - int hi = (stacks.size() - rows * cols) / cols + 1; - this.scroll = GT_Utility.clamp(scroll, lo, hi); - btnUp.enabled = this.scroll != lo; - btnDown.enabled = this.scroll != hi; - } - fillSlots(); - } - - private ItemStack getCandidate(int listIndex) { - return listIndex < 0 || listIndex >= stacks.size() ? null : stacks.get(listIndex); - } - - private GT_GuiFakeItemButton getSlot(int slotIndex) { - return slotIndex < 0 || slotIndex >= slots.size() ? null : slots.get(slotIndex); - } + public static final int UNSELECTED = -1; + private static final int cols = 9; + private static final int rows = 3; + private final int textColor = this.getTextColorOrDefault("text", 0xff555555); + private final GuiScreen parent; + private final Consumer<ItemStack> selectedCallback; + // passed in stack + private final List<ItemStack> stacks; + // all slots not including btnCurrent + private final List<GT_GuiFakeItemButton> slots = new ArrayList<>(); + // the currently selected slot content + private final GT_GuiFakeItemButton btnCurrent = + new GT_GuiFakeItemButton(this, 8, 25, GT_GuiIcon.SLOT_DARKGRAY).setMimicSlot(true); + private final boolean noDeselect; + private int selected; + private int scroll = 0; + private GT_GuiIconButton btnUp; + private GT_GuiIconButton btnDown; + + public GT_GUIDialogSelectItem( + String header, + ItemStack headerItem, + GuiScreen parent, + Consumer<ItemStack> selectedCallback, + List<ItemStack> stacks) { + this(header, headerItem, parent, selectedCallback, stacks, UNSELECTED); + } + + public GT_GUIDialogSelectItem( + String header, + ItemStack headerItem, + GuiScreen parent, + Consumer<ItemStack> selectedCallback, + List<ItemStack> stacks, + int selected) { + this(header, headerItem, parent, selectedCallback, stacks, selected, false); + } + + /** + * Open a dialog to select an item from given list. Given callback may be called zero or more times depending on user action. + * @param header Header text + * @param headerItem ItemStack to use as Dialog icon + * @param parent open which GUIScreen when this dialog is closed. use null if it has no parent. + * @param selectedCallback callback upon selected + * @param stacks list to choose from + * @param selected preselected item. Use {@link #UNSELECTED} for unselected. Invalid selected will be clamped to 0 or highest index + * @param noDeselect true if player cannot deselect, false otherwise. If this is set to true, selectedCallback is guaranteed to be called with a nonnull stack + */ + public GT_GUIDialogSelectItem( + String header, + ItemStack headerItem, + GuiScreen parent, + Consumer<ItemStack> selectedCallback, + List<ItemStack> stacks, + int selected, + boolean noDeselect) { + super(176, 107, header); + this.noDeselect = noDeselect; + if (headerItem != null) this.headerIcon.setItem(headerItem); + this.parent = parent; + this.selectedCallback = selectedCallback; + this.stacks = stacks; + + if (stacks.size() > rows * cols) { + btnUp = new GT_GuiIconButton(this, 0, 134, 25, GT_GuiIcon.GREEN_ARROW_UP); + btnDown = new GT_GuiIconButton(this, 1, 152, 25, GT_GuiIcon.GREEN_ARROW_DOWN); + } + + for (int i = 0; i < rows; i++) { + for (int j = 0; j < cols; j++) { + slots.add(new GT_GuiFakeItemButton(this, 8 + 18 * j, 44 + 18 * i, GT_GuiIcon.SLOT_GRAY) + .setMimicSlot(true)); + } + } + + setSelected(noDeselect ? Math.max(0, selected) : selected); + ensureSelectedDisplayed(); + } + + @Override + protected void onInitGui(int guiLeft, int guiTop, int gui_width, int gui_height) { + btnCurrent.setX( + 8 + 2 + fontRendererObj.getStringWidth(StatCollector.translateToLocal("GT5U.gui.select.current"))); + } + + @Override + public void closeScreen() { + selectedCallback.accept(getCandidate(getSelected())); + mc.displayGuiScreen(parent); + if (parent == null) mc.setIngameFocus(); + } + + @Override + public void buttonClicked(GuiButton button) { + switch (button.id) { + case 0: + setScroll(scroll - 1); + return; + case 1: + setScroll(scroll + 1); + return; + } + super.buttonClicked(button); + } + + @Override + public void drawExtras(int mouseX, int mouseY, float parTicks) { + int y = 25 + (18 - getFontRenderer().FONT_HEIGHT) / 2; + getFontRenderer().drawString(StatCollector.translateToLocal("GT5U.gui.select.current"), 8, y, textColor); + super.drawExtras(mouseX, mouseY, parTicks); + } + + @Override + public void mouseClicked(int x, int y, int button) { + int mx = x - guiLeft, my = y - guiTop; + if (button == 0) { + if (btnCurrent.getBounds().contains(mx, my)) { + ensureSelectedDisplayed(); + return; + } + + for (int i = 0, slotsSize = slots.size(); i < slotsSize; i++) { + GT_GuiFakeItemButton slot = slots.get(i); + if (slot.getBounds().contains(mx, my)) { + setSelected(slotIndexToListIndex(i)); + return; + } + } + } else if (button == 1 && getSelected() >= 0) { + if (btnCurrent.getBounds().contains(mx, my)) { + setSelected(UNSELECTED); + return; + } + GT_GuiFakeItemButton slot = getSlot(listIndexToSlotIndex(getSelected())); + if (slot != null && slot.getBounds().contains(mx, my)) { + setSelected(UNSELECTED); + } + } + super.mouseClicked(x, y, button); + } + + @Override + public void onMouseWheel(int x, int y, int delta) { + if (delta < 0) setScroll(scroll + 1); + else if (delta > 0) setScroll(scroll - 1); + } + + private void fillSlots() { + for (int i = 0, j = scroll * cols; i < slots.size(); i++, j++) { + slots.get(i) + .setItem(getCandidate(j)) + .setBgIcon(j == getSelected() ? GT_GuiIcon.SLOT_DARKGRAY : GT_GuiIcon.SLOT_GRAY); + } + } + + private void ensureSelectedDisplayed() { + if (getSelected() < scroll * cols) { + setScroll(getSelected() / cols); + } else if (getSelected() > (scroll + rows) * cols) { + setScroll((getSelected() - (rows - 1) * cols) / cols); + } else { + // called nonetheless to update button enabled states + setScroll(scroll); + } + } + + private int slotIndexToListIndex(int index) { + int mapped = scroll * cols + index; + return mapped >= stacks.size() ? UNSELECTED : mapped; + } + + private int listIndexToSlotIndex(int index) { + return index - scroll * cols; + } + + public int getSelected() { + return selected; + } + + public void setSelected(int selected) { + if (selected == this.selected) return; + int newSelected = GT_Utility.clamp(selected, UNSELECTED, stacks.size() - 1); + + if (noDeselect && newSelected == UNSELECTED) return; + + GT_GuiFakeItemButton selectedSlot = getSlot(this.selected); + if (selectedSlot != null) selectedSlot.setBgIcon(GT_GuiIcon.SLOT_GRAY); + + this.selected = newSelected; + + btnCurrent.setItem(getCandidate(this.selected)); + + selectedSlot = getSlot(this.selected); + if (selectedSlot != null) selectedSlot.setBgIcon(GT_GuiIcon.SLOT_DARKGRAY); + } + + private void setScroll(int scroll) { + if (stacks.size() > rows * cols) { + int lo = 0; + int hi = (stacks.size() - rows * cols) / cols + 1; + this.scroll = GT_Utility.clamp(scroll, lo, hi); + btnUp.enabled = this.scroll != lo; + btnDown.enabled = this.scroll != hi; + } + fillSlots(); + } + + private ItemStack getCandidate(int listIndex) { + return listIndex < 0 || listIndex >= stacks.size() ? null : stacks.get(listIndex); + } + + private GT_GuiFakeItemButton getSlot(int slotIndex) { + return slotIndex < 0 || slotIndex >= slots.size() ? null : slots.get(slotIndex); + } } diff --git a/src/main/java/gregtech/api/gui/GT_GUIScreen.java b/src/main/java/gregtech/api/gui/GT_GUIScreen.java index 1efaddea35..281be1e55d 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIScreen.java +++ b/src/main/java/gregtech/api/gui/GT_GUIScreen.java @@ -1,13 +1,14 @@ package gregtech.api.gui; import gregtech.api.enums.Dyes; -import gregtech.api.gui.GT_GUIColorOverride; import gregtech.api.gui.widgets.GT_GuiFakeItemButton; import gregtech.api.gui.widgets.GT_GuiIntegerTextBox; import gregtech.api.gui.widgets.GT_GuiTooltip; import gregtech.api.gui.widgets.GT_GuiTooltipManager; import gregtech.api.gui.widgets.GT_GuiTooltipManager.GT_IToolTipRenderer; import gregtech.api.interfaces.IGuiScreen; +import java.util.ArrayList; +import java.util.List; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; @@ -19,316 +20,305 @@ import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - public abstract class GT_GUIScreen extends GuiScreen implements GT_IToolTipRenderer, IGuiScreen { - protected GT_GuiTooltipManager ttManager = new GT_GuiTooltipManager(); + protected GT_GuiTooltipManager ttManager = new GT_GuiTooltipManager(); - protected int gui_width = 176; - protected int gui_height = 107; - protected int guiTop, guiLeft; - protected boolean drawButtons = true; + protected int gui_width = 176; + protected int gui_height = 107; + protected int guiTop, guiLeft; + protected boolean drawButtons = true; private ResourceLocation mGUIbackgroundLocation; - private GuiButton selectedButton; + private GuiButton selectedButton; private GT_GUIColorOverride colorOverride; private final int textColor; - private final static String guiTexturePath = "gregtech:textures/gui/GuiCover.png"; + private static final String guiTexturePath = "gregtech:textures/gui/GuiCover.png"; - public String header; - public GT_GuiFakeItemButton headerIcon; + public String header; + public GT_GuiFakeItemButton headerIcon; - protected List<IGuiElement> elements = new ArrayList<>(); - protected List<GT_GuiIntegerTextBox> textBoxes = new ArrayList<>(); + protected List<IGuiElement> elements = new ArrayList<>(); + protected List<GT_GuiIntegerTextBox> textBoxes = new ArrayList<>(); - public GT_GUIScreen(int width, int height, String header) { + public GT_GUIScreen(int width, int height, String header) { this.gui_width = width; - this.gui_height = height; - this.header = header; - this.headerIcon = new GT_GuiFakeItemButton(this, 5, 5, null); + this.gui_height = height; + this.header = header; + this.headerIcon = new GT_GuiFakeItemButton(this, 5, 5, null); this.mGUIbackgroundLocation = new ResourceLocation(guiTexturePath); this.colorOverride = new GT_GUIColorOverride(guiTexturePath); this.textColor = getTextColorOrDefault("title", 0xFF222222); - } + } - @Override - public void initGui() { - guiLeft = (this.width - this.gui_width) / 2; - guiTop = (this.height - this.gui_height) / 2; + @Override + public void initGui() { + guiLeft = (this.width - this.gui_width) / 2; + guiTop = (this.height - this.gui_height) / 2; - for (IGuiElement element : elements) { - if (element instanceof GuiButton) - buttonList.add(element); - if (element instanceof GT_GuiIntegerTextBox) - textBoxes.add((GT_GuiIntegerTextBox) element); - } + for (IGuiElement element : elements) { + if (element instanceof GuiButton) buttonList.add(element); + if (element instanceof GT_GuiIntegerTextBox) textBoxes.add((GT_GuiIntegerTextBox) element); + } - onInitGui(guiLeft, guiTop, gui_width, gui_height); + onInitGui(guiLeft, guiTop, gui_width, gui_height); - for (IGuiElement element : elements) { - element.onInit(); - } - super.initGui(); - } + for (IGuiElement element : elements) { + element.onInit(); + } + super.initGui(); + } - protected abstract void onInitGui(int guiLeft, int guiTop, int gui_width, int gui_height); + protected abstract void onInitGui(int guiLeft, int guiTop, int gui_width, int gui_height); protected int getTextColorOrDefault(String textType, int defaultColor) { return colorOverride.getTextColorOrDefault(textType, defaultColor); } - public void onMouseWheel(int x, int y, int delta) { - } - - @Override - public void handleMouseInput() { - int delta = Mouse.getEventDWheel(); - if (delta != 0) { - int i = Mouse.getEventX() * this.width / this.mc.displayWidth; - int j = this.height - Mouse.getEventY() * this.height / this.mc.displayHeight - 1; - onMouseWheel(i, j, delta); - } - super.handleMouseInput(); - } - - @Override - public void drawScreen(int mouseX, int mouseY, float parTicks) { - drawDefaultBackground(); - - drawBackground(mouseX, mouseY, parTicks); - - RenderHelper.disableStandardItemLighting(); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glDisable(GL11.GL_DEPTH_TEST); - GL11.glDisable(GL12.GL_RESCALE_NORMAL); - if (drawButtons) { - RenderHelper.enableGUIStandardItemLighting(); - for (IGuiElement e : elements) - e.draw(mouseX, mouseY, parTicks); - } - GL11.glEnable(GL12.GL_RESCALE_NORMAL); - - GL11.glPushMatrix(); - GL11.glTranslatef(guiLeft, guiTop, 0.0F); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - - GL11.glDisable(GL11.GL_LIGHTING); - drawForegroundLayer(mouseX, mouseY, parTicks); - GL11.glEnable(GL11.GL_LIGHTING); - - GL11.glPopMatrix(); - - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glEnable(GL11.GL_DEPTH_TEST); - RenderHelper.enableStandardItemLighting(); - } - - public void drawForegroundLayer(int mouseX, int mouseY, float parTicks) { - drawExtras(mouseX, mouseY, parTicks); - ttManager.onTick(this, mouseX, mouseY); - } - - public void drawBackground(int mouseX, int mouseY, float parTicks) { - short[] color = Dyes.MACHINE_METAL.getRGBA(); - GL11.glColor3ub((byte) color[0], (byte) color[1], (byte) color[2]); - this.mc.renderEngine.bindTexture(mGUIbackgroundLocation); - drawTexturedModalRect(guiLeft, guiTop, 0,0, gui_width, gui_height); - } - - public void drawExtras(int mouseX, int mouseY, float parTicks) { - this.fontRendererObj.drawString(header, 25, 9, textColor); - } - - @Override - public boolean doesGuiPauseGame() - { - return false; - } - - public void closeScreen() { - this.mc.displayGuiScreen(null); - this.mc.setIngameFocus(); - } - - @Override - public void updateScreen() { - super.updateScreen(); - for (GuiTextField f : textBoxes) { - f.updateCursorCounter(); - } - } - - @Override - public void mouseClicked(int x, int y, int button) { - for (GT_GuiIntegerTextBox tBox : textBoxes) { - boolean hadFocus = tBox.isFocused(); - if (tBox.isEnabled() || hadFocus) - tBox.mouseClicked(x,y,button); - - if (tBox.isFocused() && button == 1 && tBox.isEnabled()) //rightclick -> lcear it - tBox.setText("0"); - else if (hadFocus && !tBox.isFocused()) - applyTextBox(tBox); - } - super.mouseClicked(x, y, button); - } - - @Override - public void keyTyped(char c, int key) { - GT_GuiIntegerTextBox focusedTextBox = null; - for (GT_GuiIntegerTextBox textBox : textBoxes) { - if (textBox.isFocused()) - focusedTextBox = textBox; - } - - if (key == 1) { //esc - if(focusedTextBox != null) { - resetTextBox(focusedTextBox); - setFocusedTextBox(null); - return; - } else { - closeScreen(); - // don't fall through to parent - return; - } - } - - if (c == '\t') { //tab - for (int i = 0; i < textBoxes.size(); i++) { - GT_GuiIntegerTextBox box = textBoxes.get(i); - if (box.isFocused()) { - applyTextBox(box); - setFocusedTextBox(((i+1) < textBoxes.size()) ? textBoxes.get(i+1) : null); - return; - } - } - if (!textBoxes.isEmpty()) - setFocusedTextBox(textBoxes.get(0)); - return; - } - - if (focusedTextBox != null && focusedTextBox.textboxKeyTyped(c, key)){ - return; - } - - if (key == 28 && focusedTextBox != null) { // enter - applyTextBox(focusedTextBox); - setFocusedTextBox(null); - return; - } - - if (key == this.mc.gameSettings.keyBindInventory.getKeyCode()) { - if (focusedTextBox != null) { - applyTextBox(focusedTextBox); - setFocusedTextBox(null); - return; - } - closeScreen(); - return; - } - super.keyTyped(c, key); - } - - /** - * Button - */ - - @Override - public void actionPerformed(GuiButton button) { - selectedButton = button; - } - - @Override - public void clearSelectedButton() { - selectedButton = null; - } - @Override - public GuiButton getSelectedButton(){return selectedButton;} - - @Override - public void buttonClicked(GuiButton button) { - - } - - /** - * TextBoxes - */ - private void setFocusedTextBox(GT_GuiIntegerTextBox boxToFocus) { - for (GT_GuiIntegerTextBox textBox : textBoxes) { - textBox.setFocused(textBox.equals(boxToFocus) && textBox.isEnabled()); - } - } - - /** - * Given textbox's value might have changed. - */ - public void applyTextBox(GT_GuiIntegerTextBox box) { - - } - - /** - * Reset the given textbox to the last valid value, <b>NOT</b> 0. - */ - public void resetTextBox(GT_GuiIntegerTextBox box) { - - } - - /** - * GT_IToolTipRenderer - */ - @Override - public void drawHoveringText(List text, int mouseX, int mouseY, FontRenderer render) { - super.drawHoveringText(text, mouseX, mouseY, render); - } - @Override - public FontRenderer getFontRenderer() { - return super.fontRendererObj; - } - @Override - public void addToolTip(GT_GuiTooltip toolTip) { - ttManager.addToolTip(toolTip); - } - @Override - public boolean removeToolTip(GT_GuiTooltip toolTip) { - return ttManager.removeToolTip(toolTip); - } - - /** - * Junk - */ - @Override - public int getGuiTop() { - return guiTop; - } - @Override - public int getGuiLeft() { - return guiLeft; - } - @Override - public int getXSize() { - return gui_width; - } - @Override - public int getYSize() { - return gui_height; - } - - @Override - public RenderItem getItemRenderer() { - return itemRender; - } - - @Override - public void addElement(IGuiElement element) { - if (elements.contains(element)) - return; - elements.add(element); - } - @Override - public boolean removeElement(IGuiElement element) { - return elements.remove(element); - } + public void onMouseWheel(int x, int y, int delta) {} + + @Override + public void handleMouseInput() { + int delta = Mouse.getEventDWheel(); + if (delta != 0) { + int i = Mouse.getEventX() * this.width / this.mc.displayWidth; + int j = this.height - Mouse.getEventY() * this.height / this.mc.displayHeight - 1; + onMouseWheel(i, j, delta); + } + super.handleMouseInput(); + } + + @Override + public void drawScreen(int mouseX, int mouseY, float parTicks) { + drawDefaultBackground(); + + drawBackground(mouseX, mouseY, parTicks); + + RenderHelper.disableStandardItemLighting(); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_DEPTH_TEST); + GL11.glDisable(GL12.GL_RESCALE_NORMAL); + if (drawButtons) { + RenderHelper.enableGUIStandardItemLighting(); + for (IGuiElement e : elements) e.draw(mouseX, mouseY, parTicks); + } + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + + GL11.glPushMatrix(); + GL11.glTranslatef(guiLeft, guiTop, 0.0F); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + + GL11.glDisable(GL11.GL_LIGHTING); + drawForegroundLayer(mouseX, mouseY, parTicks); + GL11.glEnable(GL11.GL_LIGHTING); + + GL11.glPopMatrix(); + + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glEnable(GL11.GL_DEPTH_TEST); + RenderHelper.enableStandardItemLighting(); + } + + public void drawForegroundLayer(int mouseX, int mouseY, float parTicks) { + drawExtras(mouseX, mouseY, parTicks); + ttManager.onTick(this, mouseX, mouseY); + } + + public void drawBackground(int mouseX, int mouseY, float parTicks) { + short[] color = Dyes.MACHINE_METAL.getRGBA(); + GL11.glColor3ub((byte) color[0], (byte) color[1], (byte) color[2]); + this.mc.renderEngine.bindTexture(mGUIbackgroundLocation); + drawTexturedModalRect(guiLeft, guiTop, 0, 0, gui_width, gui_height); + } + + public void drawExtras(int mouseX, int mouseY, float parTicks) { + this.fontRendererObj.drawString(header, 25, 9, textColor); + } + + @Override + public boolean doesGuiPauseGame() { + return false; + } + + public void closeScreen() { + this.mc.displayGuiScreen(null); + this.mc.setIngameFocus(); + } + + @Override + public void updateScreen() { + super.updateScreen(); + for (GuiTextField f : textBoxes) { + f.updateCursorCounter(); + } + } + + @Override + public void mouseClicked(int x, int y, int button) { + for (GT_GuiIntegerTextBox tBox : textBoxes) { + boolean hadFocus = tBox.isFocused(); + if (tBox.isEnabled() || hadFocus) tBox.mouseClicked(x, y, button); + + if (tBox.isFocused() && button == 1 && tBox.isEnabled()) // rightclick -> lcear it + tBox.setText("0"); + else if (hadFocus && !tBox.isFocused()) applyTextBox(tBox); + } + super.mouseClicked(x, y, button); + } + + @Override + public void keyTyped(char c, int key) { + GT_GuiIntegerTextBox focusedTextBox = null; + for (GT_GuiIntegerTextBox textBox : textBoxes) { + if (textBox.isFocused()) focusedTextBox = textBox; + } + + if (key == 1) { // esc + if (focusedTextBox != null) { + resetTextBox(focusedTextBox); + setFocusedTextBox(null); + return; + } else { + closeScreen(); + // don't fall through to parent + return; + } + } + + if (c == '\t') { // tab + for (int i = 0; i < textBoxes.size(); i++) { + GT_GuiIntegerTextBox box = textBoxes.get(i); + if (box.isFocused()) { + applyTextBox(box); + setFocusedTextBox(((i + 1) < textBoxes.size()) ? textBoxes.get(i + 1) : null); + return; + } + } + if (!textBoxes.isEmpty()) setFocusedTextBox(textBoxes.get(0)); + return; + } + + if (focusedTextBox != null && focusedTextBox.textboxKeyTyped(c, key)) { + return; + } + + if (key == 28 && focusedTextBox != null) { // enter + applyTextBox(focusedTextBox); + setFocusedTextBox(null); + return; + } + + if (key == this.mc.gameSettings.keyBindInventory.getKeyCode()) { + if (focusedTextBox != null) { + applyTextBox(focusedTextBox); + setFocusedTextBox(null); + return; + } + closeScreen(); + return; + } + super.keyTyped(c, key); + } + + /** + * Button + */ + @Override + public void actionPerformed(GuiButton button) { + selectedButton = button; + } + + @Override + public void clearSelectedButton() { + selectedButton = null; + } + + @Override + public GuiButton getSelectedButton() { + return selectedButton; + } + + @Override + public void buttonClicked(GuiButton button) {} + + /** + * TextBoxes + */ + private void setFocusedTextBox(GT_GuiIntegerTextBox boxToFocus) { + for (GT_GuiIntegerTextBox textBox : textBoxes) { + textBox.setFocused(textBox.equals(boxToFocus) && textBox.isEnabled()); + } + } + + /** + * Given textbox's value might have changed. + */ + public void applyTextBox(GT_GuiIntegerTextBox box) {} + + /** + * Reset the given textbox to the last valid value, <b>NOT</b> 0. + */ + public void resetTextBox(GT_GuiIntegerTextBox box) {} + + /** + * GT_IToolTipRenderer + */ + @Override + public void drawHoveringText(List text, int mouseX, int mouseY, FontRenderer render) { + super.drawHoveringText(text, mouseX, mouseY, render); + } + + @Override + public FontRenderer getFontRenderer() { + return super.fontRendererObj; + } + + @Override + public void addToolTip(GT_GuiTooltip toolTip) { + ttManager.addToolTip(toolTip); + } + + @Override + public boolean removeToolTip(GT_GuiTooltip toolTip) { + return ttManager.removeToolTip(toolTip); + } + + /** + * Junk + */ + @Override + public int getGuiTop() { + return guiTop; + } + + @Override + public int getGuiLeft() { + return guiLeft; + } + + @Override + public int getXSize() { + return gui_width; + } + + @Override + public int getYSize() { + return gui_height; + } + + @Override + public RenderItem getItemRenderer() { + return itemRender; + } + + @Override + public void addElement(IGuiElement element) { + if (elements.contains(element)) return; + elements.add(element); + } + + @Override + public boolean removeElement(IGuiElement element) { + return elements.remove(element); + } } diff --git a/src/main/java/gregtech/api/gui/GT_Slot_Holo.java b/src/main/java/gregtech/api/gui/GT_Slot_Holo.java index ea1b8b82f8..bf5f8886b3 100644 --- a/src/main/java/gregtech/api/gui/GT_Slot_Holo.java +++ b/src/main/java/gregtech/api/gui/GT_Slot_Holo.java @@ -10,12 +10,17 @@ import net.minecraft.item.ItemStack; public class GT_Slot_Holo extends Slot { public final int mSlotIndex; public boolean mEnabled = true; - public boolean - mCanInsertItem, - mCanStackItem; + public boolean mCanInsertItem, mCanStackItem; public int mMaxStacksize = 127; - public GT_Slot_Holo(IInventory inventory, int slotIndex, int xPos, int yPos, boolean aCanInsertItem, boolean aCanStackItem, int aMaxStacksize) { + public GT_Slot_Holo( + IInventory inventory, + int slotIndex, + int xPos, + int yPos, + boolean aCanInsertItem, + boolean aCanStackItem, + int aMaxStacksize) { super(inventory, slotIndex, xPos, yPos); mCanInsertItem = aCanInsertItem; mCanStackItem = aCanStackItem; @@ -40,8 +45,7 @@ public class GT_Slot_Holo extends Slot { @Override public ItemStack decrStackSize(int amount) { - if (!mCanStackItem) - return null; + if (!mCanStackItem) return null; return super.decrStackSize(amount); } @@ -71,8 +75,7 @@ public class GT_Slot_Holo extends Slot { */ @Override @SideOnly(Side.CLIENT) - public boolean func_111238_b() - { + public boolean func_111238_b() { return isEnabled(); } } diff --git a/src/main/java/gregtech/api/gui/GT_Slot_Holo_ME.java b/src/main/java/gregtech/api/gui/GT_Slot_Holo_ME.java index 08a11d29f4..205a6d74dc 100644 --- a/src/main/java/gregtech/api/gui/GT_Slot_Holo_ME.java +++ b/src/main/java/gregtech/api/gui/GT_Slot_Holo_ME.java @@ -3,7 +3,8 @@ package gregtech.api.gui; import net.minecraft.inventory.IInventory; public class GT_Slot_Holo_ME extends GT_Slot_Holo { - public GT_Slot_Holo_ME(IInventory inventory, int slotIndex, int xPos, int yPos, boolean aCanInsertItem, boolean aCanStackItem) { + public GT_Slot_Holo_ME( + IInventory inventory, int slotIndex, int xPos, int yPos, boolean aCanInsertItem, boolean aCanStackItem) { super(inventory, slotIndex, xPos, yPos, aCanInsertItem, aCanStackItem, Integer.MAX_VALUE); } } diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java index 8f729771f6..525618589b 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java @@ -1,36 +1,34 @@ package gregtech.api.gui.widgets; -import java.awt.Rectangle; -import java.util.List; - -import org.lwjgl.opengl.GL11; - import codechicken.nei.api.API; import codechicken.nei.api.INEIGuiAdapter; -import gregtech.api.enums.Dyes; import gregtech.api.enums.GT_Values; import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.net.GT_Packet_GtTileEntityGuiRequest; import gregtech.common.GT_Proxy; +import java.awt.Rectangle; +import java.util.List; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; +import org.lwjgl.opengl.GL11; /** * Let's you access a GregTech IGregTechTileEntity's covers as tabs on the GUI's sides */ public class GT_GuiCoverTabLine extends GT_GuiTabLine { // Names of the block a cover could be on - private final static String[] SIDES = new String[]{ + private static final String[] SIDES = new String[] { "GT5U.interface.coverTabs.down", "GT5U.interface.coverTabs.up", "GT5U.interface.coverTabs.north", "GT5U.interface.coverTabs.south", "GT5U.interface.coverTabs.west", - "GT5U.interface.coverTabs.east"}; + "GT5U.interface.coverTabs.east" + }; // Not sure there's a point in JIT translation but that's what this is private String[] translatedSides; @@ -39,7 +37,7 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine { /** * Let's you access an IGregTechTileEntity's covers as tabs on the GUI's sides - * + * * @param gui GT_ITabRenderer gui which this tab line attaches to * @param tabLineLeft left position of the tab line in relation to the gui * @param tabLineTop top position of the tab line in relation to the gui @@ -56,9 +54,19 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine { * @param tile The IGregTechTileEntity the covers of which we are accessing * @param colorization The colorization of the GUI we are adding tabs to */ - public GT_GuiCoverTabLine(GT_GUIContainerMetaTile_Machine gui, int tabLineLeft, int tabLineTop, int tabHeight, - int tabWidth, int tabSpacing, DisplayStyle xDir, DisplayStyle yDir, DisplayStyle displayMode, - GT_GuiTabIconSet tabBackground, IGregTechTileEntity tile, int colorization) { + public GT_GuiCoverTabLine( + GT_GUIContainerMetaTile_Machine gui, + int tabLineLeft, + int tabLineTop, + int tabHeight, + int tabWidth, + int tabSpacing, + DisplayStyle xDir, + DisplayStyle yDir, + DisplayStyle displayMode, + GT_GuiTabIconSet tabBackground, + IGregTechTileEntity tile, + int colorization) { super(gui, 6, tabLineLeft, tabLineTop, tabHeight, tabWidth, tabSpacing, xDir, yDir, displayMode, tabBackground); this.tile = tile; this.colorization = colorization; @@ -76,12 +84,13 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine { addCoverToTabs(tSide, cover); } } - } + } @Override protected void drawBackground(float parTicks, int mouseX, int mouseY) { // Apply this tile's coloration to draw the background - GL11.glColor3ub((byte) ((colorization >> 16) & 0xFF), (byte) ((colorization >> 8) & 0xFF), (byte) (colorization & 0xFF)); + GL11.glColor3ub((byte) ((colorization >> 16) & 0xFF), (byte) ((colorization >> 8) & 0xFF), (byte) + (colorization & 0xFF)); super.drawBackground(parTicks, mouseX, mouseY); } @@ -89,13 +98,13 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine { protected void tabClicked(int tabId, int mouseButton) { if (mouseButton == 0 && mTabs[tabId].enabled) { GT_Values.NW.sendToServer(new GT_Packet_GtTileEntityGuiRequest( - this.tile.getXCoord(), - this.tile.getYCoord(), - this.tile.getZCoord(), - tabId + GT_Proxy.GUI_ID_COVER_SIDE_BASE, - this.tile.getWorld().provider.dimensionId, - Minecraft.getMinecraft().thePlayer.getEntityId(), - 0)); + this.tile.getXCoord(), + this.tile.getYCoord(), + this.tile.getZCoord(), + tabId + GT_Proxy.GUI_ID_COVER_SIDE_BASE, + this.tile.getWorld().provider.dimensionId, + Minecraft.getMinecraft().thePlayer.getEntityId(), + 0)); } } @@ -108,7 +117,6 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine { boolean enabled = this.tile.getCoverBehaviorAtSideNew(side).hasCoverGUI(); this.setTab(side, cover, null, getTooltipForCoverTab(side, cover, enabled)); this.setTabEnabled(side, enabled); - } /** @@ -119,12 +127,13 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine { * @return This cover tab's tooltip */ private String[] getTooltipForCoverTab(byte side, ItemStack cover, boolean enabled) { - List<String> tooltip = cover.getTooltip(Minecraft.getMinecraft().thePlayer, true); - tooltip.set(0, + List<String> tooltip = cover.getTooltip(Minecraft.getMinecraft().thePlayer, true); + tooltip.set( + 0, (enabled ? EnumChatFormatting.UNDERLINE : EnumChatFormatting.DARK_GRAY) - + getSideDescription(side) - + (enabled ? EnumChatFormatting.RESET + ": " : ": " + EnumChatFormatting.RESET) - + tooltip.get(0)); + + getSideDescription(side) + + (enabled ? EnumChatFormatting.RESET + ": " : ": " + EnumChatFormatting.RESET) + + tooltip.get(0)); return tooltip.toArray(new String[0]); } @@ -138,7 +147,7 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine { if (this.translatedSides[side] == null) { this.translatedSides[side] = StatCollector.translateToLocal(SIDES[side]); } - return this.translatedSides[side] ; + return this.translatedSides[side]; } return null; } @@ -146,7 +155,7 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine { /** * Hide any NEI slots that would intersect with a cover tab */ - static class CoverTabLineNEIHandler extends INEIGuiAdapter{ + static class CoverTabLineNEIHandler extends INEIGuiAdapter { @Override public boolean hideItemPanelSlot(GuiContainer gui, int x, int y, int w, int h) { Rectangle neiSlotArea = new Rectangle(x, y, w, h); @@ -155,7 +164,7 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine { if (!tabLine.visible) { return false; } - for (int i = 0; i < tabLine.mTabs.length; i++ ) { + for (int i = 0; i < tabLine.mTabs.length; i++) { if (tabLine.mTabs[i] != null && tabLine.mTabs[i].getBounds().intersects(neiSlotArea)) { return true; } @@ -164,6 +173,7 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine { return false; } } + static { API.registerNEIGuiHandler(new CoverTabLineNEIHandler()); } diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiFakeItemButton.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiFakeItemButton.java index 045730dd7f..7a57c49515 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiFakeItemButton.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiFakeItemButton.java @@ -3,15 +3,14 @@ package gregtech.api.gui.widgets; import codechicken.lib.gui.GuiDraw; import gregtech.api.interfaces.IGuiScreen; import gregtech.api.util.GT_UtilityClient; +import java.awt.*; +import java.util.List; import net.minecraft.client.Minecraft; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; -import java.awt.*; -import java.util.List; - public class GT_GuiFakeItemButton implements IGuiScreen.IGuiElement { private GT_GuiIcon bgIcon; @@ -42,14 +41,13 @@ public class GT_GuiFakeItemButton implements IGuiScreen.IGuiElement { this.gui = gui; this.bgIcon = bgIcon; item = null; - rectangle = new Rectangle(x, y, 18, 18); + rectangle = new Rectangle(x, y, 18, 18); gui.addElement(this); } public GT_GuiFakeItemButton setItem(ItemStack i) { item = i; - if (getMimicSlot()) - updateTooltip(); + if (getMimicSlot()) updateTooltip(); return this; } @@ -57,7 +55,7 @@ public class GT_GuiFakeItemButton implements IGuiScreen.IGuiElement { itemTooltips = item == null ? null : GT_UtilityClient.getTooltip(item, true); } - public ItemStack getItem(){ + public ItemStack getItem() { return item; } @@ -95,8 +93,7 @@ public class GT_GuiFakeItemButton implements IGuiScreen.IGuiElement { @Override public void onRemoved() { - if (mimicSlot) - gui.removeToolTip(tooltip); + if (mimicSlot) gui.removeToolTip(tooltip); } @Override @@ -106,8 +103,8 @@ public class GT_GuiFakeItemButton implements IGuiScreen.IGuiElement { GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - if (bgIcon != null){ - GT_GuiIcon.render(bgIcon, xPosition-1, yPosition-1, 18, 18,0,true); + if (bgIcon != null) { + GT_GuiIcon.render(bgIcon, xPosition - 1, yPosition - 1, 18, 18, 0, true); } if (item != null) { @@ -115,10 +112,15 @@ public class GT_GuiFakeItemButton implements IGuiScreen.IGuiElement { GL11.glPushAttrib(GL11.GL_ENABLE_BIT); GL11.glEnable(GL12.GL_RESCALE_NORMAL); } - gui.getItemRenderer().renderItemAndEffectIntoGUI(gui.getFontRenderer(), Minecraft.getMinecraft().getTextureManager(), item, xPosition, yPosition); - - if (item.getItem() instanceof ItemBlock) - GL11.glPopAttrib(); + gui.getItemRenderer() + .renderItemAndEffectIntoGUI( + gui.getFontRenderer(), + Minecraft.getMinecraft().getTextureManager(), + item, + xPosition, + yPosition); + + if (item.getItem() instanceof ItemBlock) GL11.glPopAttrib(); } if (getMimicSlot()) diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiIcon.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiIcon.java index 0d6c2da243..37e1a6d960 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiIcon.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiIcon.java @@ -1,61 +1,59 @@ package gregtech.api.gui.widgets; -import java.util.Arrays; - import gregtech.api.interfaces.IGuiIcon; +import java.util.Arrays; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.Tessellator; import net.minecraft.util.ResourceLocation; -public enum GT_GuiIcon implements IGuiIcon{ - BUTTON_NORMAL (0, 0, 0), - BUTTON_DOWN (0, 32, 0), - BUTTON_HIGHLIGHT (0, 32*2, 0), - BUTTON_HIGHLIGHT_DOWN (0, 32*3, 0), - BUTTON_DISABLED (0, 32*4, 0), - - DISABLE (0, 0, 32), - REDSTONE_OFF (0, 32, 32), - REDSTONE_ON (0, 32*2, 32), - CHECKMARK (0, 32*3, 32), - CROSS (0, 32*4, 32), - WHITELIST (0, 32*5, 32), - BLACKLIST (0, 32*6, 32), - PROGRESS (0, 32*7, 32), - - EXPORT (0, 0, 32*2), - IMPORT (0, 32, 32*2), - ALLOW_INPUT (0, 32*2, 32*2), - BLOCK_INPUT (0, 32*3, 32*2), - GREEN_ARROW_UP (0, 32*4, 32*2), - GREEN_ARROW_DOWN (0, 32*5, 32*2), - CYCLIC (0, 32*6, 32*2), - - SLOT_DARKGRAY (1, 176,0,18,18), - SLOT_GRAY (1, 176,18,18,18), - - TAB_NORMAL (2, 0, 0,18,20), - TAB_HIGHLIGHT (2, 18, 0,18,20), - TAB_DISABLED (2, 18*2, 0,18,20), - TAB_NORMAL_BRONZE (2, 0, 20,18,20), - TAB_HIGHLIGHT_BRONZE (2, 18, 20,18,20), - TAB_DISABLED_BRONZE (2, 18*2, 20,18,20), - TAB_NORMAL_STEEL (2, 0,2*20,18,20), - TAB_HIGHLIGHT_STEEL (2, 18,2*20,18,20), - TAB_DISABLED_STEEL (2, 18*2,2*20,18,20), - TAB_NORMAL_BRICK (2, 0,3*20,18,20), - TAB_HIGHLIGHT_BRICK (2, 18,3*20,18,20), - TAB_DISABLED_BRICK (2, 18*2,3*20,18,20), - TAB_INFO_GRAY (2, 220, 0,18,20), - TAB_INFO_BLUE (2,220+18, 0,18,20), -; - +public enum GT_GuiIcon implements IGuiIcon { + BUTTON_NORMAL(0, 0, 0), + BUTTON_DOWN(0, 32, 0), + BUTTON_HIGHLIGHT(0, 32 * 2, 0), + BUTTON_HIGHLIGHT_DOWN(0, 32 * 3, 0), + BUTTON_DISABLED(0, 32 * 4, 0), + + DISABLE(0, 0, 32), + REDSTONE_OFF(0, 32, 32), + REDSTONE_ON(0, 32 * 2, 32), + CHECKMARK(0, 32 * 3, 32), + CROSS(0, 32 * 4, 32), + WHITELIST(0, 32 * 5, 32), + BLACKLIST(0, 32 * 6, 32), + PROGRESS(0, 32 * 7, 32), + + EXPORT(0, 0, 32 * 2), + IMPORT(0, 32, 32 * 2), + ALLOW_INPUT(0, 32 * 2, 32 * 2), + BLOCK_INPUT(0, 32 * 3, 32 * 2), + GREEN_ARROW_UP(0, 32 * 4, 32 * 2), + GREEN_ARROW_DOWN(0, 32 * 5, 32 * 2), + CYCLIC(0, 32 * 6, 32 * 2), + + SLOT_DARKGRAY(1, 176, 0, 18, 18), + SLOT_GRAY(1, 176, 18, 18, 18), + + TAB_NORMAL(2, 0, 0, 18, 20), + TAB_HIGHLIGHT(2, 18, 0, 18, 20), + TAB_DISABLED(2, 18 * 2, 0, 18, 20), + TAB_NORMAL_BRONZE(2, 0, 20, 18, 20), + TAB_HIGHLIGHT_BRONZE(2, 18, 20, 18, 20), + TAB_DISABLED_BRONZE(2, 18 * 2, 20, 18, 20), + TAB_NORMAL_STEEL(2, 0, 2 * 20, 18, 20), + TAB_HIGHLIGHT_STEEL(2, 18, 2 * 20, 18, 20), + TAB_DISABLED_STEEL(2, 18 * 2, 2 * 20, 18, 20), + TAB_NORMAL_BRICK(2, 0, 3 * 20, 18, 20), + TAB_HIGHLIGHT_BRICK(2, 18, 3 * 20, 18, 20), + TAB_DISABLED_BRICK(2, 18 * 2, 3 * 20, 18, 20), + TAB_INFO_GRAY(2, 220, 0, 18, 20), + TAB_INFO_BLUE(2, 220 + 18, 0, 18, 20), + ; private static final int T_SIZE = 256; private static ResourceLocation[] TEXTURES = { - new ResourceLocation("gregtech", "textures/gui/GuiButtons.png"), - new ResourceLocation("gregtech", "textures/gui/GuiCover.png"), - new ResourceLocation("gregtech", "textures/gui/GuiTabs.png"), + new ResourceLocation("gregtech", "textures/gui/GuiButtons.png"), + new ResourceLocation("gregtech", "textures/gui/GuiCover.png"), + new ResourceLocation("gregtech", "textures/gui/GuiTabs.png"), }; public final int x, y, width, height; @@ -72,25 +70,34 @@ public enum GT_GuiIcon implements IGuiIcon{ } GT_GuiIcon(int texID, int x, int y) { - this(texID, x, y,32,32,null); + this(texID, x, y, 32, 32, null); } + GT_GuiIcon(int texID, int x, int y, int width, int height) { - this(texID, x, y, width, height,null); + this(texID, x, y, width, height, null); } - public static void render(IGuiIcon icon, double x, double y, double width, double height, double zLevel, - boolean doDraw) { + + public static void render( + IGuiIcon icon, double x, double y, double width, double height, double zLevel, boolean doDraw) { render(icon, x, y, width, height, zLevel, doDraw, false); } - public static void render(IGuiIcon icon, double x, double y, double width, double height, double zLevel, - boolean doDraw, boolean flipHoritontally) { + public static void render( + IGuiIcon icon, + double x, + double y, + double width, + double height, + double zLevel, + boolean doDraw, + boolean flipHoritontally) { Tessellator tess = Tessellator.instance; if (doDraw) { Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURES[icon.getTexId()]); tess.startDrawingQuads(); } double minU = (double) (icon.getX() + (flipHoritontally ? icon.getWidth() : 0)) / T_SIZE; - double maxU = (double) (icon.getX() + (flipHoritontally ? 0: icon.getWidth())) / T_SIZE; + double maxU = (double) (icon.getX() + (flipHoritontally ? 0 : icon.getWidth())) / T_SIZE; double minV = (double) icon.getY() / T_SIZE; double maxV = (double) (icon.getY() + icon.getHeight()) / T_SIZE; tess.addVertexWithUV(x, y + height, zLevel, minU, maxV); @@ -98,11 +105,9 @@ public enum GT_GuiIcon implements IGuiIcon{ tess.addVertexWithUV(x + width, y + 0, zLevel, maxU, minV); tess.addVertexWithUV(x, y + 0, zLevel, minU, minV); - if (icon.getOverlay() != null) - render(icon.getOverlay(), x, y, width, height, zLevel, false); + if (icon.getOverlay() != null) render(icon.getOverlay(), x, y, width, height, zLevel, false); - if (doDraw) - tess.draw(); + if (doDraw) tess.draw(); } /** diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiIconButton.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiIconButton.java index 9de9b03df4..fd9a879902 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiIconButton.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiIconButton.java @@ -1,10 +1,10 @@ package gregtech.api.gui.widgets; import gregtech.api.interfaces.IGuiScreen; +import java.awt.Rectangle; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import org.lwjgl.opengl.GL11; -import java.awt.Rectangle; public class GT_GuiIconButton extends GuiButton implements IGuiScreen.IGuiElement { public static final int DEFAULT_WIDTH = 16; @@ -16,7 +16,6 @@ public class GT_GuiIconButton extends GuiButton implements IGuiScreen.IGuiElemen private GT_GuiTooltip tooltip; - public GT_GuiIconButton(IGuiScreen gui, int id, int x, int y, GT_GuiIcon icon) { super(id, x, y, DEFAULT_WIDTH, DEFAULT_HEIGHT, ""); this.gui = gui; @@ -28,8 +27,7 @@ public class GT_GuiIconButton extends GuiButton implements IGuiScreen.IGuiElemen @Override public void onInit() { - if (tooltip != null) - gui.addToolTip(tooltip); + if (tooltip != null) gui.addToolTip(tooltip); xPosition = x0 + gui.getGuiLeft(); yPosition = y0 + gui.getGuiTop(); } @@ -41,12 +39,14 @@ public class GT_GuiIconButton extends GuiButton implements IGuiScreen.IGuiElemen @Override public void drawButton(Minecraft mc, int mouseX, int mouseY) { - if (this.tooltip != null) - this.tooltip.enabled = true; + if (this.tooltip != null) this.tooltip.enabled = true; if (this.visible) { - //moused over - this.field_146123_n = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + width && mouseY < this.yPosition + height; + // moused over + this.field_146123_n = mouseX >= this.xPosition + && mouseY >= this.yPosition + && mouseX < this.xPosition + width + && mouseY < this.yPosition + height; mouseDragged(mc, mouseX, mouseY); @@ -56,17 +56,15 @@ public class GT_GuiIconButton extends GuiButton implements IGuiScreen.IGuiElemen int x = xPosition; int y = yPosition; - if(!this.field_146123_n) { - // GL11.glColor4f(200F/255F, 210F/255F, 1, 1); - } - else - GL11.glColor4f(1, 1, 1, 1); + if (!this.field_146123_n) { + // GL11.glColor4f(200F/255F, 210F/255F, 1, 1); + } else GL11.glColor4f(1, 1, 1, 1); GT_GuiIcon.render(getButtonTexture(this.field_146123_n), x, y, width, height, 0, true); GL11.glColor4f(1, 1, 1, 1); if (icon != null) { - GT_GuiIcon.render(icon, x, y, width, height , 0, true); + GT_GuiIcon.render(icon, x, y, width, height, 0, true); } GL11.glPopAttrib(); @@ -76,13 +74,11 @@ public class GT_GuiIconButton extends GuiButton implements IGuiScreen.IGuiElemen @Override public void mouseReleased(int mouseX, int mouseY) { this.gui.clearSelectedButton(); - if(mousePressed(Minecraft.getMinecraft(), mouseX, mouseY)) - this.gui.buttonClicked(this); + if (mousePressed(Minecraft.getMinecraft(), mouseX, mouseY)) this.gui.buttonClicked(this); } public GT_GuiIcon getButtonTexture(boolean mouseOver) { - if (!enabled) - return GT_GuiIcon.BUTTON_DISABLED; + if (!enabled) return GT_GuiIcon.BUTTON_DISABLED; if (this.equals(this.gui.getSelectedButton())) return mouseOver ? GT_GuiIcon.BUTTON_HIGHLIGHT_DOWN : GT_GuiIcon.BUTTON_DOWN; @@ -92,6 +88,7 @@ public class GT_GuiIconButton extends GuiButton implements IGuiScreen.IGuiElemen public GT_GuiIcon getIcon() { return icon; } + public GT_GuiIconButton setIcon(GT_GuiIcon icon) { this.icon = icon; return this; @@ -102,10 +99,8 @@ public class GT_GuiIconButton extends GuiButton implements IGuiScreen.IGuiElemen } public GT_GuiIconButton setTooltipText(String... text) { - if (tooltip == null) - tooltip = new GT_GuiTooltip(getBounds(), text); - else - tooltip.setToolTipText(text); + if (tooltip == null) tooltip = new GT_GuiTooltip(getBounds(), text); + else tooltip.setToolTipText(text); return this; } diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiIconCheckButton.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiIconCheckButton.java index e7b6b9971d..113b19711b 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiIconCheckButton.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiIconCheckButton.java @@ -13,7 +13,15 @@ public class GT_GuiIconCheckButton extends GT_GuiIconButton { this(gui, id, x, y, checkedIcon, normalIcon, null, null); } - public GT_GuiIconCheckButton(IGuiScreen gui, int id, int x, int y, GT_GuiIcon checkedIcon, GT_GuiIcon normalIcon, String checkedTooltip, String normalTooltip) { + public GT_GuiIconCheckButton( + IGuiScreen gui, + int id, + int x, + int y, + GT_GuiIcon checkedIcon, + GT_GuiIcon normalIcon, + String checkedTooltip, + String normalTooltip) { super(gui, id, x, y, normalIcon); this.checkedIcon = checkedIcon; this.normalIcon = normalIcon; @@ -23,8 +31,7 @@ public class GT_GuiIconCheckButton extends GT_GuiIconButton { @Override public GT_GuiIcon getButtonTexture(boolean mouseOver) { - if (!enabled) - return GT_GuiIcon.BUTTON_DISABLED; + if (!enabled) return GT_GuiIcon.BUTTON_DISABLED; if (this.equals(super.gui.getSelectedButton())) return mouseOver ? GT_GuiIcon.BUTTON_HIGHLIGHT_DOWN : GT_GuiIcon.BUTTON_DOWN; return mouseOver ? GT_GuiIcon.BUTTON_HIGHLIGHT : GT_GuiIcon.BUTTON_NORMAL; diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiIntegerTextBox.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiIntegerTextBox.java index e2ba53e4c9..3e2ac1e296 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiIntegerTextBox.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiIntegerTextBox.java @@ -1,11 +1,10 @@ package gregtech.api.gui.widgets; import gregtech.api.interfaces.IGuiScreen; +import java.awt.*; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiTextField; -import java.awt.*; - public class GT_GuiIntegerTextBox extends GuiTextField implements IGuiScreen.IGuiElement { private final int x0, y0; private final IGuiScreen gui; @@ -44,7 +43,17 @@ public class GT_GuiIntegerTextBox extends GuiTextField implements IGuiScreen.IGu @Override public boolean textboxKeyTyped(char c, int key) { - if (validChar(c, key) || c == 1 || c == 3 || c == 22 || c == 24 || key == 14 || key == 199 || key == 203 || key == 205 || key == 207 || key == 211) { + if (validChar(c, key) + || c == 1 + || c == 3 + || c == 22 + || c == 24 + || key == 14 + || key == 199 + || key == 203 + || key == 205 + || key == 207 + || key == 211) { return super.textboxKeyTyped(c, key); } return false; diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiSlotTooltip.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiSlotTooltip.java index 1fb25ecb1a..105e919149 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiSlotTooltip.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiSlotTooltip.java @@ -1,8 +1,7 @@ package gregtech.api.gui.widgets; -import java.awt.Rectangle; - import gregtech.api.util.GT_TooltipDataCache.TooltipData; +import java.awt.Rectangle; import net.minecraft.inventory.Slot; public class GT_GuiSlotTooltip extends GT_GuiTooltip { diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiSmartTooltip.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiSmartTooltip.java index d4f7df6d2c..2bb28fb929 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiSmartTooltip.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiSmartTooltip.java @@ -1,13 +1,13 @@ package gregtech.api.gui.widgets; +import gregtech.api.util.GT_TooltipDataCache.TooltipData; import java.awt.Rectangle; -import gregtech.api.util.GT_TooltipDataCache.TooltipData; +public class GT_GuiSmartTooltip extends GT_GuiTooltip { + public interface TooltipVisibilityProvider { + boolean shouldShowTooltip(); + } -public class GT_GuiSmartTooltip extends GT_GuiTooltip{ - public interface TooltipVisibilityProvider { - boolean shouldShowTooltip(); - } private final TooltipVisibilityProvider visibilityProvider; public GT_GuiSmartTooltip(Rectangle bounds, TooltipVisibilityProvider visibilityProvider, TooltipData data) { @@ -21,5 +21,4 @@ public class GT_GuiSmartTooltip extends GT_GuiTooltip{ // If disabled by super, stay disabled. this.enabled = this.enabled && this.visibilityProvider.shouldShowTooltip(); } - } diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiTab.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiTab.java index 60672db880..1bb2f6dbb7 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiTab.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiTab.java @@ -1,16 +1,14 @@ package gregtech.api.gui.widgets; -import java.awt.Rectangle; - -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL12; - import gregtech.api.gui.widgets.GT_GuiTabLine.GT_GuiTabIconSet; import gregtech.api.gui.widgets.GT_GuiTabLine.GT_ITabRenderer; import gregtech.api.interfaces.IGuiIcon; +import java.awt.Rectangle; import net.minecraft.client.Minecraft; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; /** * A tab to be attached to a tab line @@ -18,10 +16,7 @@ import net.minecraft.item.ItemStack; public class GT_GuiTab { private static final int SLOT_SIZE = 18; - public boolean - visible = true, - mousedOver, - enabled = true; + public boolean visible = true, mousedOver, enabled = true; private Rectangle bounds; private GT_GuiTabIconSet tabBackground; @@ -33,7 +28,7 @@ public class GT_GuiTab { /** * A tab to be attached to a tab line - * + * * @param gui IGregTechTileEntity the tab line this tab belongs to is attached to * @param id both the ID and position in the tab line of this tab * @param bounds bounds of this tab @@ -43,8 +38,15 @@ public class GT_GuiTab { * @param tooltipText tooltip of this tab * @param flipHorizontally whether to draw this tab on the right side of the IGregTechTileEntity */ - public GT_GuiTab( GT_ITabRenderer gui, int id, Rectangle bounds, GT_GuiTabIconSet tabBackground, ItemStack item, - IGuiIcon overlay, String[] tooltipText, boolean flipHorizontally) { + public GT_GuiTab( + GT_ITabRenderer gui, + int id, + Rectangle bounds, + GT_GuiTabIconSet tabBackground, + ItemStack item, + IGuiIcon overlay, + String[] tooltipText, + boolean flipHorizontally) { this.gui = gui; this.bounds = bounds; this.item = item; @@ -56,13 +58,13 @@ public class GT_GuiTab { this.flipHorizontally = flipHorizontally; } - public GT_GuiTab( GT_ITabRenderer gui, int id, Rectangle bounds, GT_GuiTabIconSet tabBackground) { + public GT_GuiTab(GT_ITabRenderer gui, int id, Rectangle bounds, GT_GuiTabIconSet tabBackground) { this(gui, id, bounds, tabBackground, null, null, null, false); } /** * Set this tab's tooltip text - * + * * @param text * @return This tab for chaining */ @@ -70,8 +72,7 @@ public class GT_GuiTab { if (tooltip == null) { tooltip = new GT_GuiTooltip(bounds, text); gui.addToolTip(tooltip); - } - else { + } else { tooltip.setToolTipText(text); } return this; @@ -86,21 +87,28 @@ public class GT_GuiTab { /** * Draw the background texture for this tab - * + * * @param mouseX * @param mouseY * @param parTicks */ public void drawBackground(int mouseX, int mouseY, float parTicks) { if (this.visible) { - GT_GuiIcon.render(getBackgroundTexture(), bounds.x, bounds.y, bounds.width, bounds.height, 1, true, - this.flipHorizontally); + GT_GuiIcon.render( + getBackgroundTexture(), + bounds.x, + bounds.y, + bounds.width, + bounds.height, + 1, + true, + this.flipHorizontally); } } /** * Draw overlay textures and items atop the background texture - * + * * @param mouseX * @param mouseY * @param parTicks @@ -119,19 +127,22 @@ public class GT_GuiTab { } if (item != null) { GL11.glPushAttrib(GL11.GL_ENABLE_BIT); - + if (item.getItem() instanceof ItemBlock) { GL11.glPushAttrib(GL11.GL_ENABLE_BIT); GL11.glEnable(GL12.GL_RESCALE_NORMAL); } int margin = (bounds.height - SLOT_SIZE); - gui.getItemRenderer().renderItemAndEffectIntoGUI(gui.getFontRenderer(), - Minecraft.getMinecraft().getTextureManager(), item, - bounds.x + (this.flipHorizontally ? 0 : margin), bounds.y + margin); - - if (item.getItem() instanceof ItemBlock) - GL11.glPopAttrib(); - + gui.getItemRenderer() + .renderItemAndEffectIntoGUI( + gui.getFontRenderer(), + Minecraft.getMinecraft().getTextureManager(), + item, + bounds.x + (this.flipHorizontally ? 0 : margin), + bounds.y + margin); + + if (item.getItem() instanceof ItemBlock) GL11.glPopAttrib(); + GL11.glPopAttrib(); } } @@ -141,8 +152,7 @@ public class GT_GuiTab { * @return the texture this tab should currently use as it's background */ protected IGuiIcon getBackgroundTexture() { - if (!enabled) - return tabBackground.disabled; + if (!enabled) return tabBackground.disabled; return mousedOver ? tabBackground.highlight : tabBackground.normal; } @@ -156,11 +166,11 @@ public class GT_GuiTab { /** * Reposition this tab on the screen - * + * * @param xPos * @param yPos */ public void setPosition(int xPos, int yPos) { - this.bounds = new Rectangle( xPos, yPos, bounds.width, bounds.height); + this.bounds = new Rectangle(xPos, yPos, bounds.width, bounds.height); } } diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiTabLine.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiTabLine.java index e7ac596dee..ff0ccc2ac1 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiTabLine.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiTabLine.java @@ -1,13 +1,11 @@ package gregtech.api.gui.widgets; -import java.awt.Rectangle; - -import org.lwjgl.opengl.GL11; - import gregtech.api.interfaces.IGuiIcon; +import java.awt.Rectangle; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.item.ItemStack; +import org.lwjgl.opengl.GL11; /** * Draws clickable and configurable tabs on the left or right side of another GUI @@ -20,11 +18,11 @@ public class GT_GuiTabLine { public IGuiIcon disabled; public IGuiIcon normal; public IGuiIcon highlight; - + public GT_GuiTabIconSet(IGuiIcon normalIcon, IGuiIcon highlightIcon, IGuiIcon disabledIcon) { - this. normal = normalIcon; - this. highlight = highlightIcon; - this. disabled = disabledIcon; + this.normal = normalIcon; + this.highlight = highlightIcon; + this.disabled = disabledIcon; } } @@ -32,11 +30,12 @@ public class GT_GuiTabLine { * Controls the rendering style of the tab line */ public static enum DisplayStyle { - NONE((byte)0), - NORMAL((byte)1), - INVERSE((byte)-1); + NONE((byte) 0), + NORMAL((byte) 1), + INVERSE((byte) -1); private byte value; + DisplayStyle(byte value) { this.value = value; } @@ -52,43 +51,37 @@ public class GT_GuiTabLine { */ public interface GT_ITabRenderer { int getGuiLeft(); + int getGuiTop(); + int getXSize(); RenderItem getItemRenderer(); + FontRenderer getFontRenderer(); - void addToolTip(GT_GuiTooltip tooltip); + void addToolTip(GT_GuiTooltip tooltip); + boolean removeToolTip(GT_GuiTooltip tooltip); } // The tabs are arranged according to their index in this array protected final GT_GuiTab[] mTabs; - private int - tabLineLeft, - tabLineTop, - tabHeight, - tabWidth, - tabSpacing; - + private int tabLineLeft, tabLineTop, tabHeight, tabWidth, tabSpacing; + // In which direction to draw the tab line - private DisplayStyle - xDir, - yDir; + private DisplayStyle xDir, yDir; // Whether to display on the right side of the GT_ITabRenderer instead of left - protected boolean - flipHorizontally, - visible; + protected boolean flipHorizontally, visible; private GT_GuiTabIconSet tabBackground; private GT_ITabRenderer gui; - /** * Draws clickable and configurable tabs on the left or right side of a GT_ITabRenderer - * + * * @param gui GT_ITabRenderer gui which this tab line attaches to * @param numTabs number of tab positions in this tab line * @param tabLineLeft left position of the tab line in relation to the gui @@ -104,8 +97,18 @@ public class GT_GuiTabLine { * (NORMAL), on it's right side (INVERSE) or not at all (NONE) * @param tabBackground the set of textures used to draw this tab line's tab backgrounds */ - public GT_GuiTabLine(GT_ITabRenderer gui, int numTabs, int tabLineLeft, int tabLineTop, int tabHeight, int tabWidth, - int tabSpacing, DisplayStyle xDir, DisplayStyle yDir, DisplayStyle displayMode, GT_GuiTabIconSet tabBackground) { + public GT_GuiTabLine( + GT_ITabRenderer gui, + int numTabs, + int tabLineLeft, + int tabLineTop, + int tabHeight, + int tabWidth, + int tabSpacing, + DisplayStyle xDir, + DisplayStyle yDir, + DisplayStyle displayMode, + GT_GuiTabIconSet tabBackground) { this.gui = gui; this.mTabs = new GT_GuiTab[numTabs]; this.tabLineLeft = tabLineLeft; @@ -123,34 +126,37 @@ public class GT_GuiTabLine { /** * Creates a new tab at the specified position with the given parameters. * This class handles the positioning. - * + * * @param tabId * @param item * @param overlay * @param text */ public void setTab(int tabId, ItemStack item, IGuiIcon overlay, String[] text) { - mTabs[tabId] = new GT_GuiTab( this.gui, tabId, getBoundsForTab(tabId), - this.tabBackground, item, overlay, text, this.flipHorizontally); + mTabs[tabId] = new GT_GuiTab( + this.gui, + tabId, + getBoundsForTab(tabId), + this.tabBackground, + item, + overlay, + text, + this.flipHorizontally); } /** * Get the bounds a given tab should occupy - * + * * @param tabId * @return */ protected Rectangle getBoundsForTab(int tabId) { - return new Rectangle ( - getTabX(tabId), - getTabY(tabId), - this.tabWidth, - this.tabHeight); + return new Rectangle(getTabX(tabId), getTabY(tabId), this.tabWidth, this.tabHeight); } /** * Enable or disable a tab. Disabled tabs have a dark background. - * + * * @param tabId * @param value */ @@ -159,13 +165,12 @@ public class GT_GuiTabLine { mTabs[tabId].enabled = value; } } - /** * Draw the tabs for this tab bar * GT_ITabRenderer must call this method on drawGuiContainerBackgroundLayer * or on drawScreen. - * + * * @param parTicks * @param mouseX * @param mouseY @@ -183,7 +188,7 @@ public class GT_GuiTabLine { /** * Draw the tab's backgrounds first - * + * * @param parTicks * @param mouseX * @param mouseY @@ -198,7 +203,7 @@ public class GT_GuiTabLine { /** * Draw anything that overlays the tab's background texture - * + * * @param parTicks * @param mouseX * @param mouseY @@ -214,13 +219,13 @@ public class GT_GuiTabLine { /** * Call tabClick for every tab that was clicked. * GT_ITabRenderer must call this method on mouseClicked. - * + * * @param mouseX * @param mouseY * @param mouseButton */ public void onMouseClicked(int mouseX, int mouseY, int mouseButton) { - for(int tabId = 0; tabId < mTabs.length; tabId++) { + for (int tabId = 0; tabId < mTabs.length; tabId++) { if (mTabs[tabId] != null && mTabs[tabId].getBounds().contains(mouseX, mouseY)) { tabClicked(tabId, mouseButton); return; @@ -230,11 +235,11 @@ public class GT_GuiTabLine { /** * Act on a tab being clicked. - * + * * @param tabId * @param mouseButton */ - protected void tabClicked(int tabId, int mouseButton) { } + protected void tabClicked(int tabId, int mouseButton) {} /** * Reposition ourselves whenever the GT_ITabRenderer does so. @@ -250,18 +255,19 @@ public class GT_GuiTabLine { /** * Get the proper X position for a given tab - * + * * @param tabId * @return */ private int getTabX(int tabId) { - return this.gui.getGuiLeft() + (flipHorizontally ? (gui.getXSize() - tabLineLeft - tabWidth) : tabLineLeft) - + (tabId * (tabWidth + tabSpacing) * xDir.getValue()); + return this.gui.getGuiLeft() + + (flipHorizontally ? (gui.getXSize() - tabLineLeft - tabWidth) : tabLineLeft) + + (tabId * (tabWidth + tabSpacing) * xDir.getValue()); } /** * Get the proper Y position for a given tab - * + * * @param tabId * @return */ diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiTooltip.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiTooltip.java index 21648b74fe..ab755eb2c3 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiTooltip.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiTooltip.java @@ -1,15 +1,13 @@ package gregtech.api.gui.widgets; +import gregtech.api.util.GT_TooltipDataCache.TooltipData; import java.awt.Rectangle; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; -import java.util.Objects; - import org.lwjgl.input.Keyboard; -import gregtech.api.util.GT_TooltipDataCache.TooltipData; public class GT_GuiTooltip { protected Rectangle bounds; @@ -20,7 +18,7 @@ public class GT_GuiTooltip { /** * Used to create a tooltip that will appear over the specified bounds. * This will initially be a "static" tooltip that doesn't respect verbosity levels or respond to the shift key. - * + * * @param bounds * @param text */ @@ -32,7 +30,7 @@ public class GT_GuiTooltip { /** * Used to create a tooltip that will appear over the specified bounds. * This will initially be a "dynamic" tooltip that respects verbosity levels and responds to the shift key. - * + * * @param bounds * @param data */ @@ -43,10 +41,10 @@ public class GT_GuiTooltip { } private TooltipData sanitizeTooltipData(TooltipData data) { - if (data.text == null){ + if (data.text == null) { data.text = Arrays.asList(new String[0]); } - if (data.shiftText == null){ + if (data.shiftText == null) { data.shiftText = Arrays.asList(new String[0]); } return data; @@ -65,12 +63,11 @@ public class GT_GuiTooltip { /** * Called once this tooltip has been determined to be enabled */ - protected void updateText() { - } + protected void updateText() {} /** * Used to set a "static" tooltip that doesn't respect verbosity levels or respond to the shift key - * + * * @param text */ public void setToolTipText(String... text) { @@ -80,17 +77,17 @@ public class GT_GuiTooltip { /** * Used to set a "dynamic" tooltip that respects verbosity levels and responds to the shift key - * + * * @param data */ public void setToolTipText(TooltipData data) { // Trust that the tooltips have already been formatted and colored, just make sure it has no nulls this.data = sanitizeTooltipData(data); } - + /** * Apply tooltip colors in case the text doesn't contain them and return as tooltip data - * + * * @param text * @return colored tooltip lines as list */ @@ -100,18 +97,15 @@ public class GT_GuiTooltip { list = new ArrayList<>(text.length); for (int i = 0; i < text.length; i++) { if (text[i] == null) continue; - if (list.isEmpty()) - list.add("\u00a7f" + text[i]); - else - list.add("\u00a77" + text[i]); + if (list.isEmpty()) list.add("\u00a7f" + text[i]); + else list.add("\u00a77" + text[i]); } } else { list = Collections.emptyList(); } - return new TooltipData(list, list) ; + return new TooltipData(list, list); } - public List<String> getToolTipText() { return this.displayedText; } diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiTooltipManager.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiTooltipManager.java index abee1774f9..1c31670071 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiTooltipManager.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiTooltipManager.java @@ -1,16 +1,19 @@ package gregtech.api.gui.widgets; -import net.minecraft.client.gui.FontRenderer; - import java.util.ArrayList; import java.util.List; +import net.minecraft.client.gui.FontRenderer; public class GT_GuiTooltipManager { public interface GT_IToolTipRenderer { int getGuiLeft(); + int getGuiTop(); + int getXSize(); + FontRenderer getFontRenderer(); + void drawHoveringText(List<String> text, int mouseX, int mouseY, FontRenderer font); } @@ -29,8 +32,8 @@ public class GT_GuiTooltipManager { } public final void onTick(GT_IToolTipRenderer render, int mouseX, int mouseY) { - if ((Math.abs(mouseX-lastMouseX) < 2 ) && (Math.abs(mouseY-lastMouseY) < 2 )) { - mouseStopped = Math.min(mouseStopped+1, 50); + if ((Math.abs(mouseX - lastMouseX) < 2) && (Math.abs(mouseY - lastMouseY) < 2)) { + mouseStopped = Math.min(mouseStopped + 1, 50); } else { mouseStopped = 0; } @@ -43,7 +46,9 @@ public class GT_GuiTooltipManager { for (GT_GuiTooltip tip : tips) { // Give the tooltip the opportunity to decide whether they should be enabled tip.onTick(); - if (tip.enabled && (!tip.isDelayed() || mouseStopped > DELAY) && tip.getBounds().contains(mouseX, mouseY)) { + if (tip.enabled + && (!tip.isDelayed() || mouseStopped > DELAY) + && tip.getBounds().contains(mouseX, mouseY)) { tip.updateText(); drawTooltip(tip, mouseX, mouseY, render); break; @@ -53,10 +58,9 @@ public class GT_GuiTooltipManager { private void drawTooltip(GT_GuiTooltip tip, int mouseX, int mouseY, GT_IToolTipRenderer render) { List<String> text = tip.getToolTipText(); - if (text == null) - return; + if (text == null) return; - if (mouseX > render.getGuiLeft() + render.getXSize()/2) { + if (mouseX > render.getGuiLeft() + render.getXSize() / 2) { int maxWidth = 0; for (String s : text) { int w = render.getFontRenderer().getStringWidth(s); @@ -69,5 +73,4 @@ public class GT_GuiTooltipManager { render.drawHoveringText(text, mouseX, mouseY, render.getFontRenderer()); } - } diff --git a/src/main/java/gregtech/api/interfaces/IBlockContainer.java b/src/main/java/gregtech/api/interfaces/IBlockContainer.java index 7949ae90ce..89bda5de12 100644 --- a/src/main/java/gregtech/api/interfaces/IBlockContainer.java +++ b/src/main/java/gregtech/api/interfaces/IBlockContainer.java @@ -4,5 +4,6 @@ import net.minecraft.block.Block; public interface IBlockContainer { Block getBlock(); + byte getMeta(); } diff --git a/src/main/java/gregtech/api/interfaces/IDebugableBlock.java b/src/main/java/gregtech/api/interfaces/IDebugableBlock.java index 35ca68336e..063f713fe4 100644 --- a/src/main/java/gregtech/api/interfaces/IDebugableBlock.java +++ b/src/main/java/gregtech/api/interfaces/IDebugableBlock.java @@ -1,8 +1,7 @@ package gregtech.api.interfaces; -import net.minecraft.entity.player.EntityPlayer; - import java.util.ArrayList; +import net.minecraft.entity.player.EntityPlayer; /** * You are allowed to include this File in your Download, as i will not change it. diff --git a/src/main/java/gregtech/api/interfaces/IGlobalWirelessEnergy.java b/src/main/java/gregtech/api/interfaces/IGlobalWirelessEnergy.java index cec499c5d3..cc825f9d1a 100644 --- a/src/main/java/gregtech/api/interfaces/IGlobalWirelessEnergy.java +++ b/src/main/java/gregtech/api/interfaces/IGlobalWirelessEnergy.java @@ -1,8 +1,5 @@ package gregtech.api.interfaces; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; - import java.io.File; import java.io.IOException; import java.math.BigInteger; @@ -13,6 +10,8 @@ import java.util.HashMap; import java.util.List; import java.util.UUID; import java.util.stream.Collectors; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.world.World; // If you are adding very late-game content feel free to tap into this interface. // The eventual goal is to bypass laser/dynamo stuff and have energy deposited directly from ultra-endgame @@ -50,22 +49,22 @@ public interface IGlobalWirelessEnergy { default void saveGlobalEnergyInfo(String world_name) { // Replace chars because of bug in forge that doesn't understand MC converts . to _ upon world creation. - world_name = world_name.replace('.','_'); + world_name = world_name.replace('.', '_'); createStorageIfNotExist(world_name); saveGlobalEnergyMap(world_name); saveGlobalEnergyName(world_name); saveGlobalEnergyTeam(world_name); - } default void saveGlobalEnergyMap(String world_name) { try { - List<String> lines = GlobalEnergy.entrySet() - .stream() - .map(entry -> entry.getKey() + ":" + entry.getValue()) - .collect(Collectors.toList()); + List<String> lines = GlobalEnergy.entrySet().stream() + .map(entry -> entry.getKey() + ":" + entry.getValue()) + .collect(Collectors.toList()); - Path path = Paths.get("./saves/" + world_name + "/" + GlobalEnergyFolderName + "/" + GlobalEnergyMapFileName + ".txt").toAbsolutePath(); + Path path = Paths.get("./saves/" + world_name + "/" + GlobalEnergyFolderName + "/" + GlobalEnergyMapFileName + + ".txt") + .toAbsolutePath(); Files.write(path, lines); } catch (IOException e) { @@ -75,12 +74,13 @@ public interface IGlobalWirelessEnergy { default void saveGlobalEnergyName(String world_name) { try { - List<String> lines = GlobalEnergyName.entrySet() - .stream() - .map(entry -> entry.getKey() + ":" + entry.getValue()) - .collect(Collectors.toList()); + List<String> lines = GlobalEnergyName.entrySet().stream() + .map(entry -> entry.getKey() + ":" + entry.getValue()) + .collect(Collectors.toList()); - Path path = Paths.get("./saves/" + world_name + "/" + GlobalEnergyFolderName + "/" + GlobalEnergyNameFileName + ".txt").toAbsolutePath(); + Path path = Paths.get("./saves/" + world_name + "/" + GlobalEnergyFolderName + "/" + + GlobalEnergyNameFileName + ".txt") + .toAbsolutePath(); Files.write(path, lines); } catch (IOException e) { @@ -90,12 +90,13 @@ public interface IGlobalWirelessEnergy { default void saveGlobalEnergyTeam(String world_name) { try { - List<String> lines = GlobalEnergyTeam.entrySet() - .stream() - .map(entry -> entry.getKey() + ":" + entry.getValue()) - .collect(Collectors.toList()); + List<String> lines = GlobalEnergyTeam.entrySet().stream() + .map(entry -> entry.getKey() + ":" + entry.getValue()) + .collect(Collectors.toList()); - Path path = Paths.get("./saves/" + world_name + "/" + GlobalEnergyFolderName + "/" + GlobalEnergyTeamFileName + ".txt").toAbsolutePath(); + Path path = Paths.get("./saves/" + world_name + "/" + GlobalEnergyFolderName + "/" + + GlobalEnergyTeamFileName + ".txt") + .toAbsolutePath(); Files.write(path, lines); } catch (IOException e) { @@ -107,7 +108,7 @@ public interface IGlobalWirelessEnergy { default void loadGlobalEnergyInfo(World world) { // Replace chars because of bug in forge that doesn't understand MC converts . to _ upon world creation. - String world_name = world.getWorldInfo().getWorldName().replace('.','_'); + String world_name = world.getWorldInfo().getWorldName().replace('.', '_'); PrivateGlobalEnergy.WorldName = world_name; createStorageIfNotExist(world_name); loadGlobalEnergyMap(world); @@ -117,10 +118,12 @@ public interface IGlobalWirelessEnergy { default void loadGlobalEnergyMap(World world) { try { - Path path = Paths.get("./saves/" + world.getWorldInfo().getWorldName() + "/" + GlobalEnergyFolderName + "/" + GlobalEnergyMapFileName + ".txt").toAbsolutePath(); + Path path = Paths.get("./saves/" + world.getWorldInfo().getWorldName() + "/" + GlobalEnergyFolderName + "/" + + GlobalEnergyMapFileName + ".txt") + .toAbsolutePath(); String[] data; - for(String line : Files.readAllLines(path)) { + for (String line : Files.readAllLines(path)) { data = line.split(":"); String UUID = data[0]; @@ -135,11 +138,12 @@ public interface IGlobalWirelessEnergy { default void loadGlobalEnergyName(World world) { try { - Path path = Paths.get("./saves/" + world.getWorldInfo().getWorldName() + "/" - + GlobalEnergyFolderName + "/" + GlobalEnergyNameFileName + ".txt").toAbsolutePath(); + Path path = Paths.get("./saves/" + world.getWorldInfo().getWorldName() + "/" + GlobalEnergyFolderName + "/" + + GlobalEnergyNameFileName + ".txt") + .toAbsolutePath(); String[] data; - for(String line : Files.readAllLines(path)) { + for (String line : Files.readAllLines(path)) { data = line.split(":"); GlobalEnergyName.put(data[0], data[1]); @@ -151,11 +155,12 @@ public interface IGlobalWirelessEnergy { default void loadGlobalEnergyTeam(World world) { try { - Path path = Paths.get("./saves/" + world.getWorldInfo().getWorldName() + "/" - + GlobalEnergyFolderName + "/" + GlobalEnergyTeamFileName + ".txt").toAbsolutePath(); + Path path = Paths.get("./saves/" + world.getWorldInfo().getWorldName() + "/" + GlobalEnergyFolderName + "/" + + GlobalEnergyTeamFileName + ".txt") + .toAbsolutePath(); String[] data; - for(String line : Files.readAllLines(path)) { + for (String line : Files.readAllLines(path)) { data = line.split(":"); GlobalEnergyName.put(data[0], data[1]); @@ -168,7 +173,8 @@ public interface IGlobalWirelessEnergy { // ------------------ default void createStorageIfNotExist(String world_name) { - Path folder_path = Paths.get("./saves/" + world_name + "/" + GlobalEnergyFolderName).toAbsolutePath(); + Path folder_path = Paths.get("./saves/" + world_name + "/" + GlobalEnergyFolderName) + .toAbsolutePath(); // Create folder for storing global energy network info. try { @@ -188,7 +194,6 @@ public interface IGlobalWirelessEnergy { } catch (IOException e) { e.printStackTrace(); } - } // Adds a user to the energy map if they do not already exist. Otherwise, do nothing. Will also check if the user @@ -299,7 +304,6 @@ public interface IGlobalWirelessEnergy { GlobalEnergyName.clear(); GlobalEnergyTeam.clear(); } - } class PrivateGlobalEnergy { diff --git a/src/main/java/gregtech/api/interfaces/IGuiIcon.java b/src/main/java/gregtech/api/interfaces/IGuiIcon.java index 2167270e6c..3204c35b4e 100644 --- a/src/main/java/gregtech/api/interfaces/IGuiIcon.java +++ b/src/main/java/gregtech/api/interfaces/IGuiIcon.java @@ -5,9 +5,14 @@ package gregtech.api.interfaces; */ public interface IGuiIcon { int getX(); + int getY(); + int getWidth(); + int getHeight(); + int getTexId(); + IGuiIcon getOverlay(); } diff --git a/src/main/java/gregtech/api/interfaces/IGuiScreen.java b/src/main/java/gregtech/api/interfaces/IGuiScreen.java index 5f1ae9cd2b..2f12781a77 100644 --- a/src/main/java/gregtech/api/interfaces/IGuiScreen.java +++ b/src/main/java/gregtech/api/interfaces/IGuiScreen.java @@ -5,12 +5,13 @@ import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.renderer.entity.RenderItem; - public interface IGuiScreen { interface IGuiElement { void onInit(); + default void onRemoved() {} + void draw(int mouseX, int mouseY, float parTicks); } @@ -19,18 +20,24 @@ public interface IGuiScreen { boolean removeToolTip(GT_GuiTooltip toolTip); GuiButton getSelectedButton(); + void clearSelectedButton(); + void buttonClicked(GuiButton button); int getGuiLeft(); + int getGuiTop(); int getXSize(); + int getYSize(); void addElement(IGuiElement element); + boolean removeElement(IGuiElement element); RenderItem getItemRenderer(); + FontRenderer getFontRenderer(); } diff --git a/src/main/java/gregtech/api/interfaces/IHatchElement.java b/src/main/java/gregtech/api/interfaces/IHatchElement.java index 22dbbdf013..e1f68963e0 100644 --- a/src/main/java/gregtech/api/interfaces/IHatchElement.java +++ b/src/main/java/gregtech/api/interfaces/IHatchElement.java @@ -6,7 +6,6 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_StructureUtility; import gregtech.api.util.IGT_HatchAdder; - import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -56,22 +55,23 @@ public interface IHatchElement<T> { default <T2 extends T> IStructureElement<T2> newAny(int aCasingIndex, int aDot) { if (aCasingIndex < 0 || aDot < 0) throw new IllegalArgumentException(); return GT_StructureUtility.<T2>buildHatchAdder() - .anyOf(this) - .casingIndex(aCasingIndex) - .dot(aDot) - .continueIfSuccess() - .build(); + .anyOf(this) + .casingIndex(aCasingIndex) + .dot(aDot) + .continueIfSuccess() + .build(); } - default <T2 extends T> IStructureElement<T2> newAny(int aCasingIndex, int aDot, BiPredicate<? super T2, ? super IGregTechTileEntity> aShouldSkip) { + default <T2 extends T> IStructureElement<T2> newAny( + int aCasingIndex, int aDot, BiPredicate<? super T2, ? super IGregTechTileEntity> aShouldSkip) { if (aCasingIndex < 0 || aDot < 0 || aShouldSkip == null) throw new IllegalArgumentException(); return GT_StructureUtility.<T2>buildHatchAdder() - .anyOf(this) - .casingIndex(aCasingIndex) - .dot(aDot) - .shouldSkip(aShouldSkip) - .continueIfSuccess() - .build(); + .anyOf(this) + .casingIndex(aCasingIndex) + .dot(aDot) + .shouldSkip(aShouldSkip) + .continueIfSuccess() + .build(); } default <T2 extends T> IHatchElement<T2> or(IHatchElement<? super T2> fallback) { @@ -93,9 +93,9 @@ class HatchElementEither<T> implements IHatchElement<T> { public List<? extends Class<? extends IMetaTileEntity>> mteClasses() { if (mMteClasses == null) mMteClasses = ImmutableList.<Class<? extends IMetaTileEntity>>builder() - .addAll(first.mteClasses()) - .addAll(second.mteClasses()) - .build(); + .addAll(first.mteClasses()) + .addAll(second.mteClasses()) + .build(); return mMteClasses; } @@ -106,8 +106,7 @@ class HatchElementEither<T> implements IHatchElement<T> { @Override public String name() { - if (name == null) - name = first.name() + " or " + second.name(); + if (name == null) name = first.name() + " or " + second.name(); return name; } @@ -124,7 +123,12 @@ class HatchElement<T> implements IHatchElement<T> { private final IHatchElement<? super T> mBacking; private final ToLongFunction<? super T> mCount; - public HatchElement(List<Class<? extends IMetaTileEntity>> aMteClasses, IGT_HatchAdder<? super T> aAdder, String aName, ToLongFunction<? super T> aCount, IHatchElement<? super T> aBacking) { + public HatchElement( + List<Class<? extends IMetaTileEntity>> aMteClasses, + IGT_HatchAdder<? super T> aAdder, + String aName, + ToLongFunction<? super T> aCount, + IHatchElement<? super T> aBacking) { this.mClasses = aMteClasses; this.mAdder = aAdder; this.mName = aName; diff --git a/src/main/java/gregtech/api/interfaces/IHeatingCoil.java b/src/main/java/gregtech/api/interfaces/IHeatingCoil.java index c8ceccf941..f30145165b 100644 --- a/src/main/java/gregtech/api/interfaces/IHeatingCoil.java +++ b/src/main/java/gregtech/api/interfaces/IHeatingCoil.java @@ -1,18 +1,18 @@ package gregtech.api.interfaces; import gregtech.api.enums.HeatingCoilLevel; -import net.minecraft.item.ItemStack; - import java.util.function.Consumer; +import net.minecraft.item.ItemStack; public interface IHeatingCoil { HeatingCoilLevel getCoilHeat(int meta); + default HeatingCoilLevel getCoilHeat(ItemStack stack) { return getCoilHeat(stack.getItemDamage()); } void setOnCoilCheck(Consumer<IHeatingCoil> callback); + Consumer<IHeatingCoil> getOnCoilCheck(); } - diff --git a/src/main/java/gregtech/api/interfaces/IIconContainer.java b/src/main/java/gregtech/api/interfaces/IIconContainer.java index 4682955603..8090ce7cb9 100644 --- a/src/main/java/gregtech/api/interfaces/IIconContainer.java +++ b/src/main/java/gregtech/api/interfaces/IIconContainer.java @@ -1,12 +1,12 @@ package gregtech.api.interfaces; +import static gregtech.api.enums.GT_Values.UNCOLORED_RBGA; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; -import static gregtech.api.enums.GT_Values.UNCOLORED_RBGA; - public interface IIconContainer { /** * @return A regular Icon. @@ -26,7 +26,8 @@ public interface IIconContainer { @SideOnly(Side.CLIENT) default int getIconPasses() { return 1; - }; + } + ; /** * @return the Default Texture File for this Icon. @@ -35,13 +36,12 @@ public interface IIconContainer { ResourceLocation getTextureFile(); @SideOnly(Side.CLIENT) - default public short[] getIconColor(int aRenderPass) { + public default short[] getIconColor(int aRenderPass) { return UNCOLORED_RBGA; } @SideOnly(Side.CLIENT) - default public boolean isUsingColorModulation(int aRenderPass) { + public default boolean isUsingColorModulation(int aRenderPass) { return aRenderPass == 0; } - } diff --git a/src/main/java/gregtech/api/interfaces/IItemBehaviour.java b/src/main/java/gregtech/api/interfaces/IItemBehaviour.java index 85916ae0d7..9a513c2af5 100644 --- a/src/main/java/gregtech/api/interfaces/IItemBehaviour.java +++ b/src/main/java/gregtech/api/interfaces/IItemBehaviour.java @@ -2,6 +2,7 @@ package gregtech.api.interfaces; import gregtech.api.enums.SubTag; import gregtech.api.items.GT_MetaBase_Item; +import java.util.List; import net.minecraft.dispenser.IBlockSource; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -11,14 +12,34 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -import java.util.List; - public interface IItemBehaviour<E extends Item> { boolean onLeftClickEntity(E aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity); - boolean onItemUse(E aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ); - - boolean onItemUseFirst(E aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ); + boolean onItemUse( + E aItem, + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ); + + boolean onItemUseFirst( + E aItem, + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ); ItemStack onItemRightClick(E aItem, ItemStack aStack, World aWorld, EntityPlayer aPlayer); @@ -34,7 +55,9 @@ public interface IItemBehaviour<E extends Item> { boolean hasProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack); - EntityArrow getProjectile(E aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ); + EntityArrow getProjectile( + E aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ); - EntityArrow getProjectile(E aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed); + EntityArrow getProjectile( + E aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed); } diff --git a/src/main/java/gregtech/api/interfaces/INetworkUpdatableItem.java b/src/main/java/gregtech/api/interfaces/INetworkUpdatableItem.java index 2e102e937c..de251017a1 100644 --- a/src/main/java/gregtech/api/interfaces/INetworkUpdatableItem.java +++ b/src/main/java/gregtech/api/interfaces/INetworkUpdatableItem.java @@ -11,13 +11,13 @@ import net.minecraft.nbt.NBTTagCompound; * Usual NBT tag size limit applies. */ public interface INetworkUpdatableItem { - /** - * Receive update from client. Runs on server thread. - * @param stack Stack being updated - * @param player player holding the stack - * @param tag received data - * @return true if this stack should be kept inside the player inventory. - * false if this stack should vanish (i.e. slot content set to null) - */ - boolean receive(ItemStack stack, EntityPlayerMP player, NBTTagCompound tag); + /** + * Receive update from client. Runs on server thread. + * @param stack Stack being updated + * @param player player holding the stack + * @param tag received data + * @return true if this stack should be kept inside the player inventory. + * false if this stack should vanish (i.e. slot content set to null) + */ + boolean receive(ItemStack stack, EntityPlayerMP player, NBTTagCompound tag); } diff --git a/src/main/java/gregtech/api/interfaces/IProjectileItem.java b/src/main/java/gregtech/api/interfaces/IProjectileItem.java index 913339ef05..9441e2991b 100644 --- a/src/main/java/gregtech/api/interfaces/IProjectileItem.java +++ b/src/main/java/gregtech/api/interfaces/IProjectileItem.java @@ -20,5 +20,6 @@ public interface IProjectileItem { /** * @return an Arrow Entity to be spawned. If null then this is not an Arrow. Note: Other Projectiles still extend EntityArrow */ - EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed); + EntityArrow getProjectile( + SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed); } diff --git a/src/main/java/gregtech/api/interfaces/ITexture.java b/src/main/java/gregtech/api/interfaces/ITexture.java index b05f31d14f..e2445a8204 100644 --- a/src/main/java/gregtech/api/interfaces/ITexture.java +++ b/src/main/java/gregtech/api/interfaces/ITexture.java @@ -18,7 +18,7 @@ public interface ITexture { void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); boolean isValidTexture(); - + /** * @return {@code true} if this texture is from the old package */ diff --git a/src/main/java/gregtech/api/interfaces/IToolStats.java b/src/main/java/gregtech/api/interfaces/IToolStats.java index a96e12c1ce..b2e170445c 100644 --- a/src/main/java/gregtech/api/interfaces/IToolStats.java +++ b/src/main/java/gregtech/api/interfaces/IToolStats.java @@ -1,6 +1,7 @@ package gregtech.api.interfaces; import gregtech.api.items.GT_MetaGenerated_Tool; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.Entity; @@ -11,8 +12,6 @@ import net.minecraft.util.DamageSource; import net.minecraft.world.World; import net.minecraftforge.event.world.BlockEvent; -import java.util.List; - /** * The Stats for GT Tools. Not including any Material Modifiers. * <p/> @@ -138,7 +137,18 @@ public interface IToolStats { * * @return the Amount of modified Items. */ - int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent); + int convertBlockDrops( + List<ItemStack> aDrops, + ItemStack aStack, + EntityPlayer aPlayer, + Block aBlock, + int aX, + int aY, + int aZ, + byte aMetaData, + int aFortune, + boolean aSilkTouch, + BlockEvent.HarvestDropsEvent aEvent); /** * @return Returns a broken Version of the Item. @@ -159,5 +169,6 @@ public interface IToolStats { short[] getRGBa(boolean aIsToolHead, ItemStack aStack); - float getMiningSpeed(Block aBlock, byte aMetaData, float aDefault, EntityPlayer aPlayer, World worldObj, int aX, int aY, int aZ); + float getMiningSpeed( + Block aBlock, byte aMetaData, float aDefault, EntityPlayer aPlayer, World worldObj, int aX, int aY, int aZ); } diff --git a/src/main/java/gregtech/api/interfaces/internal/IGT_Mod.java b/src/main/java/gregtech/api/interfaces/internal/IGT_Mod.java index 22947b746d..19e7a56aad 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IGT_Mod.java +++ b/src/main/java/gregtech/api/interfaces/internal/IGT_Mod.java @@ -30,7 +30,7 @@ public interface IGT_Mod { */ EntityPlayer getThePlayer(); - //---------- Internal Usage Only ---------- + // ---------- Internal Usage Only ---------- /** * works only ClientSide otherwise returns 0 diff --git a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java index add54205ee..d29dc96316 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java +++ b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java @@ -10,7 +10,13 @@ public interface IGT_RecipeAdder { * Does not work anymore! */ @Deprecated - boolean addFusionReactorRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aFusionDurationInTicks, int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion); + boolean addFusionReactorRecipe( + ItemStack aInput1, + ItemStack aInput2, + ItemStack aOutput1, + int aFusionDurationInTicks, + int aFusionEnergyPerTick, + int aEnergyNeededForStartingFusion); /** * Adds a FusionreactorRecipe @@ -23,9 +29,14 @@ public interface IGT_RecipeAdder { * @param aEnergyNeededForStartingFusion = EU needed for heating the Reactor up (must be >= 0) * @return true if the Recipe got added, otherwise false. */ - @Deprecated - boolean addFusionReactorRecipe(FluidStack aInput1, FluidStack aInput2, FluidStack aOutput1, int aFusionDurationInTicks, int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion); + boolean addFusionReactorRecipe( + FluidStack aInput1, + FluidStack aInput2, + FluidStack aOutput1, + int aFusionDurationInTicks, + int aFusionEnergyPerTick, + int aEnergyNeededForStartingFusion); /** * Adds a Fusion Reactor Recipe @@ -37,7 +48,12 @@ public interface IGT_RecipeAdder { * @param aEnergyNeededForStartingFusion : EU needed to initialize the fusion reaction. (must be >= 0). * @return true if the recipe got added, otherwise false. */ - boolean addFusionReactorRecipe(FluidStack[] FluidInputArray, FluidStack[] FluidOutputArray, int aFusionDurationInTicks, int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion); + boolean addFusionReactorRecipe( + FluidStack[] FluidInputArray, + FluidStack[] FluidOutputArray, + int aFusionDurationInTicks, + int aFusionEnergyPerTick, + int aEnergyNeededForStartingFusion); /** * Adds a Centrifuge Recipe @@ -49,9 +65,28 @@ public interface IGT_RecipeAdder { * @param aOutput4 can be null * @param aDuration must be > 0 */ - boolean addCentrifugeRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration); - - boolean addCentrifugeRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration, int aEUt); + boolean addCentrifugeRecipe( + ItemStack aInput1, + int aInput2, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + ItemStack aOutput4, + ItemStack aOutput5, + ItemStack aOutput6, + int aDuration); + + boolean addCentrifugeRecipe( + ItemStack aInput1, + int aInput2, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + ItemStack aOutput4, + ItemStack aOutput5, + ItemStack aOutput6, + int aDuration, + int aEUt); /** * Adds a Centrifuge Recipe @@ -63,9 +98,36 @@ public interface IGT_RecipeAdder { * @param aOutput4 can be null * @param aDuration must be > 0 */ - boolean addCentrifugeRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt); - - boolean addCentrifugeRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt, boolean aCleanroom); + boolean addCentrifugeRecipe( + ItemStack aInput1, + ItemStack aInput2, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + ItemStack aOutput4, + ItemStack aOutput5, + ItemStack aOutput6, + int[] aChances, + int aDuration, + int aEUt); + + boolean addCentrifugeRecipe( + ItemStack aInput1, + ItemStack aInput2, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + ItemStack aOutput4, + ItemStack aOutput5, + ItemStack aOutput6, + int[] aChances, + int aDuration, + int aEUt, + boolean aCleanroom); /** * @param aInput1 must be != null @@ -86,7 +148,17 @@ public interface IGT_RecipeAdder { * @param aDuration must be > 0 * @param aEUt should be > 0 */ - boolean addElectrolyzerRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration, int aEUt); + boolean addElectrolyzerRecipe( + ItemStack aInput1, + int aInput2, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + ItemStack aOutput4, + ItemStack aOutput5, + ItemStack aOutput6, + int aDuration, + int aEUt); /** * Adds a Electrolyzer Recipe @@ -99,7 +171,20 @@ public interface IGT_RecipeAdder { * @param aDuration must be > 0 * @param aEUt should be > 0 */ - boolean addElectrolyzerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt); + boolean addElectrolyzerRecipe( + ItemStack aInput1, + ItemStack aInput2, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + ItemStack aOutput4, + ItemStack aOutput5, + ItemStack aOutput6, + int[] aChances, + int aDuration, + int aEUt); /** * Adds a Chemical Recipe @@ -121,7 +206,13 @@ public interface IGT_RecipeAdder { * @param aOutput must be != null * @param aDuration must be > 0 */ - boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration); + boolean addChemicalRecipe( + ItemStack aInput1, + ItemStack aInput2, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput, + int aDuration); /** * Adds a Chemical Recipe @@ -133,8 +224,15 @@ public interface IGT_RecipeAdder { * @param aOutput2 must be != null * @param aDuration must be > 0 */ - boolean addChemicalRecipeForBasicMachineOnly(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick); - + boolean addChemicalRecipeForBasicMachineOnly( + ItemStack aInput1, + ItemStack aInput2, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput, + ItemStack aOutput2, + int aDuration, + int aEUtick); /** * Adds a Chemical Recipe @@ -145,7 +243,14 @@ public interface IGT_RecipeAdder { * @param aOutput2 must be != null * @param aDuration must be > 0 */ - boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration); + boolean addChemicalRecipe( + ItemStack aInput1, + ItemStack aInput2, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput, + ItemStack aOutput2, + int aDuration); /** * Adds Recipes for creating a radically polymerized polymer from a base Material (for example Ethylene -> Polyethylene) @@ -165,9 +270,25 @@ public interface IGT_RecipeAdder { * @param aDuration must be > 0 * @param aEUtick must be > 0 */ - boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUtick); - - boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick, boolean aCleanroom); + boolean addChemicalRecipe( + ItemStack aInput1, + ItemStack aInput2, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput, + int aDuration, + int aEUtick); + + boolean addChemicalRecipe( + ItemStack aInput1, + ItemStack aInput2, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput, + ItemStack aOutput2, + int aDuration, + int aEUtick, + boolean aCleanroom); /** * Adds a Chemical Recipe @@ -179,7 +300,15 @@ public interface IGT_RecipeAdder { * @param aDuration must be > 0 * @param aEUtick must be > 0 */ - boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick); + boolean addChemicalRecipe( + ItemStack aInput1, + ItemStack aInput2, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput, + ItemStack aOutput2, + int aDuration, + int aEUtick); /** * Adds a Chemical Recipe that only exists in the Large Chemical Reactor @@ -194,9 +323,13 @@ public interface IGT_RecipeAdder { * <br>aOutputs and aFluidOutputs must contain at least one valid output. * */ - - boolean addMultiblockChemicalRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUtick); - + boolean addMultiblockChemicalRecipe( + ItemStack[] aInputs, + FluidStack[] aFluidInputs, + FluidStack[] aFluidOutputs, + ItemStack[] aOutputs, + int aDuration, + int aEUtick); /** * Adds a Blast Furnace Recipe @@ -210,7 +343,14 @@ public interface IGT_RecipeAdder { * @param aLevel should be > 0 is the minimum Heat Level needed for this Recipe */ @Deprecated - boolean addBlastRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, int aLevel); + boolean addBlastRecipe( + ItemStack aInput1, + ItemStack aInput2, + ItemStack aOutput1, + ItemStack aOutput2, + int aDuration, + int aEUt, + int aLevel); /** * Adds a Blast Furnace Recipe @@ -223,9 +363,31 @@ public interface IGT_RecipeAdder { * @param aEUt should be > 0 * @param aLevel should be > 0 is the minimum Heat Level needed for this Recipe */ - boolean addBlastRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, int aLevel); - - boolean addBlastRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4,int aDuration, int aEUt, int aLevel); + boolean addBlastRecipe( + ItemStack aInput1, + ItemStack aInput2, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput1, + ItemStack aOutput2, + int aDuration, + int aEUt, + int aLevel); + + boolean addBlastRecipe( + ItemStack aInput1, + ItemStack aInput2, + ItemStack aInput3, + ItemStack aInput4, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + ItemStack aOutput4, + int aDuration, + int aEUt, + int aLevel); /** * Adds a Plasma Forge Recipe @@ -238,10 +400,22 @@ public interface IGT_RecipeAdder { * @param aEUt Should be > 0. EU/t. * @param coil_heat_level Should be > 0. Heat of the coils used. */ - boolean addPlasmaForgeRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, ItemStack[] OutputItemArray, FluidStack[] FluidOutputArray, int aDuration, int aEUt, int coil_heat_level); - - boolean addPrimitiveBlastRecipe(ItemStack aInput1, ItemStack aInput2, int aCoalAmount, ItemStack aOutput1, ItemStack aOutput2, int aDuration); + boolean addPlasmaForgeRecipe( + ItemStack[] ItemInputArray, + FluidStack[] FluidInputArray, + ItemStack[] OutputItemArray, + FluidStack[] FluidOutputArray, + int aDuration, + int aEUt, + int coil_heat_level); + boolean addPrimitiveBlastRecipe( + ItemStack aInput1, + ItemStack aInput2, + int aCoalAmount, + ItemStack aOutput1, + ItemStack aOutput2, + int aDuration); /** * Adds a Canning Machine Recipe @@ -251,7 +425,8 @@ public interface IGT_RecipeAdder { * @param aDuration must be > 0, 100 ticks is standard. * @param aEUt should be > 0, 1 EU/t is standard. */ - boolean addCannerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt); + boolean addCannerRecipe( + ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt); /** * Adds an Alloy Smelter Recipe @@ -264,8 +439,8 @@ public interface IGT_RecipeAdder { */ boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt); - boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt, boolean hidden); - + boolean addAlloySmelterRecipe( + ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt, boolean hidden); /** * Adds a CNC-Machine Recipe @@ -297,7 +472,8 @@ public interface IGT_RecipeAdder { * @param aEUt should be > 0 * */ - boolean addAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt); + boolean addAssemblerRecipe( + ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt); /** * Adds an Assembler Recipe @@ -307,16 +483,43 @@ public interface IGT_RecipeAdder { * @param aDuration must be > 0 * @param aEUt should be > 0 */ - boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt); - - boolean addAssemblerRecipe(ItemStack aInput1, Object aOreDict, int aAmount, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt); - - boolean addAssemblerRecipe(ItemStack[] aInputs, Object aOreDict, int aAmount, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt); - - boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt, boolean aCleanroom); - - boolean addAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt, boolean aCleanroom); - + boolean addAssemblerRecipe( + ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt); + + boolean addAssemblerRecipe( + ItemStack aInput1, + Object aOreDict, + int aAmount, + FluidStack aFluidInput, + ItemStack aOutput1, + int aDuration, + int aEUt); + + boolean addAssemblerRecipe( + ItemStack[] aInputs, + Object aOreDict, + int aAmount, + FluidStack aFluidInput, + ItemStack aOutput1, + int aDuration, + int aEUt); + + boolean addAssemblerRecipe( + ItemStack aInput1, + ItemStack aInput2, + FluidStack aFluidInput, + ItemStack aOutput1, + int aDuration, + int aEUt, + boolean aCleanroom); + + boolean addAssemblerRecipe( + ItemStack[] aInputs, + FluidStack aFluidInput, + ItemStack aOutput1, + int aDuration, + int aEUt, + boolean aCleanroom); /** * Adds an Circuit Assembler Recipe @@ -327,9 +530,16 @@ public interface IGT_RecipeAdder { * @param aDuration must be > 0 * @param aEUt should be > 0 */ - boolean addCircuitAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput, int aDuration, int aEUt); + boolean addCircuitAssemblerRecipe( + ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput, int aDuration, int aEUt); - boolean addCircuitAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput, int aDuration, int aEUt, boolean aCleanroom); + boolean addCircuitAssemblerRecipe( + ItemStack[] aInputs, + FluidStack aFluidInput, + ItemStack aOutput, + int aDuration, + int aEUt, + boolean aCleanroom); /** * Adds an Assemblyline Recipe @@ -340,7 +550,14 @@ public interface IGT_RecipeAdder { * @param aDuration must be > 0 * @param aEUt should be > 0 */ - boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput1, int aDuration, int aEUt); + boolean addAssemblylineRecipe( + ItemStack aResearchItem, + int aResearchTime, + ItemStack[] aInputs, + FluidStack[] aFluidInputs, + ItemStack aOutput1, + int aDuration, + int aEUt); /** * Adds a Assemblyline Recipe @@ -349,7 +566,14 @@ public interface IGT_RecipeAdder { * ItemStack[] for multiple equivalent items; * {OreDict, amount} for oredict. */ - boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, Object[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput1, int aDuration, int aEUt); + boolean addAssemblylineRecipe( + ItemStack aResearchItem, + int aResearchTime, + Object[] aInputs, + FluidStack[] aFluidInputs, + ItemStack aOutput1, + int aDuration, + int aEUt); /** * Adds a Forge Hammer Recipe @@ -423,9 +647,24 @@ public interface IGT_RecipeAdder { * @param aEUt should be > 0 * @return */ - boolean addOreWasherRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, FluidStack aFluidInput, int aDuration, int aEUt); - - boolean addOreWasherRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, FluidStack aFluidInput, int[] aChances, int aDuration, int aEUt); + boolean addOreWasherRecipe( + ItemStack aInput, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + FluidStack aFluidInput, + int aDuration, + int aEUt); + + boolean addOreWasherRecipe( + ItemStack aInput, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + FluidStack aFluidInput, + int[] aChances, + int aDuration, + int aEUt); /** * Adds an Implosion Compressor Recipe @@ -447,7 +686,13 @@ public interface IGT_RecipeAdder { * @param aOutput3 can be null * @param aOutput4 can be null */ - boolean addGrinderRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4); + boolean addGrinderRecipe( + ItemStack aInput1, + ItemStack aInput2, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + ItemStack aOutput4); /** * Adds a Distillation Tower Recipe @@ -456,20 +701,44 @@ public interface IGT_RecipeAdder { * @param aOutputs must be != null 1-5 Fluids * @param aOutput2 can be null */ - boolean addDistillationTowerRecipe(FluidStack aInput, FluidStack[] aOutputs, ItemStack aOutput2, int aDuration, int aEUt); - boolean addDistillationTowerRecipe(FluidStack aInput, ItemStack[] aCircuit, FluidStack[] aOutputs, ItemStack aOutput2, int aDuration, int aEUt); + boolean addDistillationTowerRecipe( + FluidStack aInput, FluidStack[] aOutputs, ItemStack aOutput2, int aDuration, int aEUt); - boolean addSimpleArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt); + boolean addDistillationTowerRecipe( + FluidStack aInput, + ItemStack[] aCircuit, + FluidStack[] aOutputs, + ItemStack aOutput2, + int aDuration, + int aEUt); - boolean addPlasmaArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt); + boolean addSimpleArcFurnaceRecipe( + ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt); - boolean addPlasmaArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, FluidStack aFluidPutput, int[] aChances, int aDuration, int aEUt); + boolean addPlasmaArcFurnaceRecipe( + ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt); + boolean addPlasmaArcFurnaceRecipe( + ItemStack aInput, + FluidStack aFluidInput, + ItemStack[] aOutputs, + FluidStack aFluidPutput, + int[] aChances, + int aDuration, + int aEUt); /** * Adds a Distillation Tower Recipe */ - boolean addDistillationRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, int aDuration, int aEUt); + boolean addDistillationRecipe( + ItemStack aInput1, + int aInput2, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + ItemStack aOutput4, + int aDuration, + int aEUt); /** * Adds a Lathe Machine Recipe @@ -479,18 +748,28 @@ public interface IGT_RecipeAdder { /** * Adds a Cutter Recipe */ - boolean addCutterRecipe(ItemStack aInput, FluidStack aLubricant, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt); + boolean addCutterRecipe( + ItemStack aInput, FluidStack aLubricant, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt); /** * Adds Cutter Recipes with default Lubricants */ boolean addCutterRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt); - boolean addCutterRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, boolean aCleanroom); + boolean addCutterRecipe( + ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, boolean aCleanroom); - boolean addCutterRecipe(ItemStack aInput, ItemStack aCircuit, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt); + boolean addCutterRecipe( + ItemStack aInput, ItemStack aCircuit, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt); - boolean addCutterRecipe(ItemStack aInput, ItemStack aCircuit, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, boolean aCleanroom); + boolean addCutterRecipe( + ItemStack aInput, + ItemStack aCircuit, + ItemStack aOutput1, + ItemStack aOutput2, + int aDuration, + int aEUt, + boolean aCleanroom); boolean addCutterRecipe(ItemStack[] aInputs, ItemStack[] aOutputs, int aDuration, int aEUt, int aSpecial); @@ -508,14 +787,23 @@ public interface IGT_RecipeAdder { * @param aEUt should be > 0 * @return */ - boolean addThermalCentrifugeRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int aDuration, int aEUt); + boolean addThermalCentrifugeRecipe( + ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int aDuration, int aEUt); - boolean addThermalCentrifugeRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt); + boolean addThermalCentrifugeRecipe( + ItemStack aInput, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + int[] aChances, + int aDuration, + int aEUt); /** * Adds an Unboxing Recipe */ - boolean addUnboxingRecipe(ItemStack aFullBox, ItemStack aContainedItem, ItemStack aEmptyBox, int aDuration, int aEUt); + boolean addUnboxingRecipe( + ItemStack aFullBox, ItemStack aContainedItem, ItemStack aEmptyBox, int aDuration, int aEUt); /** * Adds a Vacuum Freezer Recipe @@ -530,7 +818,13 @@ public interface IGT_RecipeAdder { boolean addVacuumFreezerRecipe(FluidStack aInput1, FluidStack aOutput1, int aDuration, int aEUt); - boolean addVacuumFreezerRecipe(ItemStack[] aItemInput, FluidStack[] aFluidInput, ItemStack[] aItemOutput, FluidStack[] aFluidOutput, int aDuration, int aEUt); + boolean addVacuumFreezerRecipe( + ItemStack[] aItemInput, + FluidStack[] aFluidInput, + ItemStack[] aItemOutput, + FluidStack[] aFluidOutput, + int aDuration, + int aEUt); /** * Adds a Fuel for My Generators @@ -552,9 +846,11 @@ public interface IGT_RecipeAdder { */ boolean addBrewingRecipe(ItemStack aIngredient, Fluid aInput, Fluid aOutput, boolean aHidden); - boolean addBrewingRecipe(ItemStack aIngredient, Fluid aInput, Fluid aOutput, int aDuration, int aEUt, boolean aHidden); + boolean addBrewingRecipe( + ItemStack aIngredient, Fluid aInput, Fluid aOutput, int aDuration, int aEUt, boolean aHidden); - boolean addBrewingRecipeCustom(ItemStack aIngredient, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden); + boolean addBrewingRecipeCustom( + ItemStack aIngredient, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden); /** * Adds a Recipe for the Fermenter @@ -571,14 +867,29 @@ public interface IGT_RecipeAdder { /** * Adds a Recipe for the Distillery */ + boolean addDistilleryRecipe( + ItemStack aCircuit, + FluidStack aInput, + FluidStack aOutput, + ItemStack aSolidOutput, + int aDuration, + int aEUt, + boolean aHidden); - boolean addDistilleryRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, ItemStack aSolidOutput, int aDuration, int aEUt, boolean aHidden); + boolean addDistilleryRecipe( + ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden); - boolean addDistilleryRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden); + boolean addDistilleryRecipe( + int circuitConfig, + FluidStack aInput, + FluidStack aOutput, + ItemStack aSolidOutput, + int aDuration, + int aEUt, + boolean aHidden); - boolean addDistilleryRecipe(int circuitConfig, FluidStack aInput, FluidStack aOutput, ItemStack aSolidOutput, int aDuration, int aEUt, boolean aHidden); - - boolean addDistilleryRecipe(int aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden); + boolean addDistilleryRecipe( + int aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden); /** * Adds a Recipe for the Fluid Solidifier @@ -588,36 +899,75 @@ public interface IGT_RecipeAdder { /** * Adds a Recipe for Fluid Smelting */ - boolean addFluidSmelterRecipe(ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, int aDuration, int aEUt); + boolean addFluidSmelterRecipe( + ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, int aDuration, int aEUt); /** * Adds a Recipe for Fluid Smelting */ - boolean addFluidSmelterRecipe(ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, int aDuration, int aEUt, boolean hidden); + boolean addFluidSmelterRecipe( + ItemStack aInput, + ItemStack aRemains, + FluidStack aOutput, + int aChance, + int aDuration, + int aEUt, + boolean hidden); /** * Adds a Recipe for Fluid Extraction */ - boolean addFluidExtractionRecipe(ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, int aDuration, int aEUt); + boolean addFluidExtractionRecipe( + ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, int aDuration, int aEUt); /** * Adds a Recipe for the Fluid Canner */ boolean addFluidCannerRecipe(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput); - boolean addFluidCannerRecipe(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput, int aDuration, int aEUt); + boolean addFluidCannerRecipe( + ItemStack aInput, + ItemStack aOutput, + FluidStack aFluidInput, + FluidStack aFluidOutput, + int aDuration, + int aEUt); /** * Adds a Recipe for the Chemical Bath */ - boolean addChemicalBathRecipe(ItemStack aInput, FluidStack aBathingFluid, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt); - - boolean addChemicalBathRecipe(ItemStack aInput, FluidStack aBathingFluid, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt); + boolean addChemicalBathRecipe( + ItemStack aInput, + FluidStack aBathingFluid, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + int[] aChances, + int aDuration, + int aEUt); + + boolean addChemicalBathRecipe( + ItemStack aInput, + FluidStack aBathingFluid, + FluidStack aFluidOutput, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + int[] aChances, + int aDuration, + int aEUt); /** * Adds a Recipe for the Electromagnetic Separator */ - boolean addElectromagneticSeparatorRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt); + boolean addElectromagneticSeparatorRecipe( + ItemStack aInput, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + int[] aChances, + int aDuration, + int aEUt); /** * Adds a Recipe for the Extractor @@ -627,55 +977,168 @@ public interface IGT_RecipeAdder { /** * Adds a Recipe for the Printer */ - boolean addPrinterRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aSpecialSlot, ItemStack aOutput, int aDuration, int aEUt); + boolean addPrinterRecipe( + ItemStack aInput, FluidStack aFluid, ItemStack aSpecialSlot, ItemStack aOutput, int aDuration, int aEUt); /** * Adds a Recipe for the Autoclave */ - boolean addAutoclaveRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt); - - boolean addAutoclaveRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom); - - boolean addAutoclaveRecipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom); - - boolean addAutoclaveRecipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluidIn, FluidStack aFluidOut, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom); - - boolean addAutoclaveSpaceRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom); - - boolean addAutoclaveSpaceRecipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom); - - - boolean addAutoclave4Recipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluidIn, FluidStack aFluidOut, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, boolean aCleanroom); + boolean addAutoclaveRecipe( + ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt); + + boolean addAutoclaveRecipe( + ItemStack aInput, + FluidStack aFluid, + ItemStack aOutput, + int aChance, + int aDuration, + int aEUt, + boolean aCleanroom); + + boolean addAutoclaveRecipe( + ItemStack aInput, + ItemStack aCircuit, + FluidStack aFluid, + ItemStack aOutput, + int aChance, + int aDuration, + int aEUt, + boolean aCleanroom); + + boolean addAutoclaveRecipe( + ItemStack aInput, + ItemStack aCircuit, + FluidStack aFluidIn, + FluidStack aFluidOut, + ItemStack aOutput, + int aChance, + int aDuration, + int aEUt, + boolean aCleanroom); + + boolean addAutoclaveSpaceRecipe( + ItemStack aInput, + FluidStack aFluid, + ItemStack aOutput, + int aChance, + int aDuration, + int aEUt, + boolean aCleanroom); + + boolean addAutoclaveSpaceRecipe( + ItemStack aInput, + ItemStack aCircuit, + FluidStack aFluid, + ItemStack aOutput, + int aChance, + int aDuration, + int aEUt, + boolean aCleanroom); + + boolean addAutoclave4Recipe( + ItemStack aInput, + ItemStack aCircuit, + FluidStack aFluidIn, + FluidStack aFluidOut, + ItemStack[] aOutputs, + int[] aChances, + int aDuration, + int aEUt, + boolean aCleanroom); /** * Adds a Recipe for the Mixer */ @Deprecated - boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt); + boolean addMixerRecipe( + ItemStack aInput1, + ItemStack aInput2, + ItemStack aInput3, + ItemStack aInput4, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput, + int aDuration, + int aEUt); @Deprecated - boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, ItemStack aInput5, ItemStack aInput6, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt); + boolean addMixerRecipe( + ItemStack aInput1, + ItemStack aInput2, + ItemStack aInput3, + ItemStack aInput4, + ItemStack aInput5, + ItemStack aInput6, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput, + int aDuration, + int aEUt); @Deprecated - boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, ItemStack aInput5, ItemStack aInput6, ItemStack aInput7, ItemStack aInput8, ItemStack aInput9, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt); + boolean addMixerRecipe( + ItemStack aInput1, + ItemStack aInput2, + ItemStack aInput3, + ItemStack aInput4, + ItemStack aInput5, + ItemStack aInput6, + ItemStack aInput7, + ItemStack aInput8, + ItemStack aInput9, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput, + int aDuration, + int aEUt); @Deprecated - boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, ItemStack aInput5, ItemStack aInput6, ItemStack aInput7, ItemStack aInput8, ItemStack aInput9, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, int aDuration, int aEUt); + boolean addMixerRecipe( + ItemStack aInput1, + ItemStack aInput2, + ItemStack aInput3, + ItemStack aInput4, + ItemStack aInput5, + ItemStack aInput6, + ItemStack aInput7, + ItemStack aInput8, + ItemStack aInput9, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + ItemStack aOutput4, + int aDuration, + int aEUt); // Use me only from now on! - boolean addMixerRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, ItemStack[] ItemOutputArray, FluidStack[] FluidOutputArray, int aDuration, int aEUt); + boolean addMixerRecipe( + ItemStack[] ItemInputArray, + FluidStack[] FluidInputArray, + ItemStack[] ItemOutputArray, + FluidStack[] FluidOutputArray, + int aDuration, + int aEUt); /** * Adds a Recipe for the Laser Engraver. */ @Deprecated - boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt); + boolean addLaserEngraverRecipe( + ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt); /** * Adds a Recipe for the Laser Engraver. */ @Deprecated - boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt, boolean aCleanroom); + boolean addLaserEngraverRecipe( + ItemStack aItemToEngrave, + ItemStack aLens, + ItemStack aEngravedItem, + int aDuration, + int aEUt, + boolean aCleanroom); /** * Adds a Generalised Laser Engraver Recipe. @@ -688,12 +1151,20 @@ public interface IGT_RecipeAdder { * @param aEUt Should be > 0. EU/t. * @param aCleanroom Boolean for usage of cleanroom in recipe. */ - boolean addLaserEngraverRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, ItemStack[] OutputItemArray, FluidStack[] FluidOutputArray, int aDuration, int aEUt, boolean aCleanroom); + boolean addLaserEngraverRecipe( + ItemStack[] ItemInputArray, + FluidStack[] FluidInputArray, + ItemStack[] OutputItemArray, + FluidStack[] FluidOutputArray, + int aDuration, + int aEUt, + boolean aCleanroom); /** * Adds a Recipe for the Forming Press */ - boolean addFormingPressRecipe(ItemStack aItemToImprint, ItemStack aForm, ItemStack aImprintedItem, int aDuration, int aEUt); + boolean addFormingPressRecipe( + ItemStack aItemToImprint, ItemStack aForm, ItemStack aImprintedItem, int aDuration, int aEUt); /** * Adds a Recipe for the Sifter. (up to 9 Outputs) @@ -708,8 +1179,8 @@ public interface IGT_RecipeAdder { /** * Adds a Recipe for the Arc Furnace. (up to 4 Outputs) */ - boolean addArcFurnaceRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, boolean hidden); - + boolean addArcFurnaceRecipe( + ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, boolean hidden); /** * Adds a Recipe for the GT Pulveriser. (up to 4 Outputs) @@ -719,7 +1190,8 @@ public interface IGT_RecipeAdder { /** * Adds a Recipe for the GT Pulveriser. (up to 4 Outputs) */ - boolean addPulveriserRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, boolean hidden); + boolean addPulveriserRecipe( + ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, boolean hidden); /** * Adds a Distillation Tower Recipe @@ -729,9 +1201,16 @@ public interface IGT_RecipeAdder { * @param aOutputs must be != null 1-5 Fluids * @param aOutput2 can be null */ - boolean addUniversalDistillationRecipe(FluidStack aInput, FluidStack[] aOutputs, ItemStack aOutput2, int aDuration, int aEUt); + boolean addUniversalDistillationRecipe( + FluidStack aInput, FluidStack[] aOutputs, ItemStack aOutput2, int aDuration, int aEUt); - boolean addUniversalDistillationRecipewithCircuit(FluidStack aInput, ItemStack[] aCircuit, FluidStack[] aOutputs, ItemStack aOutput2, int aDuration, int aEUt); + boolean addUniversalDistillationRecipewithCircuit( + FluidStack aInput, + ItemStack[] aCircuit, + FluidStack[] aOutputs, + ItemStack aOutput2, + int aDuration, + int aEUt); /** * Adds Pyrolyse Recipe @@ -743,7 +1222,14 @@ public interface IGT_RecipeAdder { * @param aDuration * @param aEUt */ - boolean addPyrolyseRecipe(ItemStack aInput, FluidStack aFluidInput, int intCircuit, ItemStack aOutput, FluidStack aFluidOutput, int aDuration, int aEUt); + boolean addPyrolyseRecipe( + ItemStack aInput, + FluidStack aFluidInput, + int intCircuit, + ItemStack aOutput, + FluidStack aFluidOutput, + int aDuration, + int aEUt); /** * Adds Oil Cracking Recipe @@ -753,7 +1239,6 @@ public interface IGT_RecipeAdder { * @param aDuration * @param aEUt */ - @Deprecated boolean addCrackingRecipe(FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt); @@ -767,8 +1252,8 @@ public interface IGT_RecipeAdder { * @param aDuration * @param aEUt */ - - boolean addCrackingRecipe(int circuitConfig, FluidStack aInput, FluidStack aInput2, FluidStack aOutput, int aDuration, int aEUt); + boolean addCrackingRecipe( + int circuitConfig, FluidStack aInput, FluidStack aInput2, FluidStack aOutput, int aDuration, int aEUt); /** * Adds a Sound to the Sonictron9001 @@ -780,5 +1265,14 @@ public interface IGT_RecipeAdder { */ boolean addSonictronSound(ItemStack aItemStack, String aSoundName); - boolean addChemicalBathRecipe(ItemStack aInput, FluidStack aBathingFluid, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt); + boolean addChemicalBathRecipe( + ItemStack aInput, + FluidStack aBathingFluid, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + FluidStack aFluidOutput, + int[] aChances, + int aDuration, + int aEUt); } diff --git a/src/main/java/gregtech/api/interfaces/internal/IThaumcraftCompat.java b/src/main/java/gregtech/api/interfaces/internal/IThaumcraftCompat.java index 34de41f381..330b9326c2 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IThaumcraftCompat.java +++ b/src/main/java/gregtech/api/interfaces/internal/IThaumcraftCompat.java @@ -2,14 +2,12 @@ package gregtech.api.interfaces.internal; import gregtech.api.enums.TC_Aspects; import gregtech.api.enums.TC_Aspects.TC_AspectStack; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; -import java.util.List; - public interface IThaumcraftCompat { - int - RESEARCH_TYPE_NORMAL = 0, + int RESEARCH_TYPE_NORMAL = 0, RESEARCH_TYPE_SECONDARY = 1, RESEARCH_TYPE_FREE = 2, RESEARCH_TYPE_HIDDEN = 4, @@ -21,8 +19,7 @@ public interface IThaumcraftCompat { /** * The Research Keys of GT */ - String - IRON_TO_STEEL = "GT_IRON_TO_STEEL", + String IRON_TO_STEEL = "GT_IRON_TO_STEEL", FILL_WATER_BUCKET = "GT_FILL_WATER_BUCKET", WOOD_TO_CHARCOAL = "GT_WOOD_TO_CHARCOAL", TRANSZINC = "GT_TRANSZINC", @@ -50,7 +47,26 @@ public interface IThaumcraftCompat { Object addCrucibleRecipe(String aResearch, Object aInput, ItemStack aOutput, List<TC_AspectStack> aAspects); - Object addInfusionRecipe(String aResearch, ItemStack aMainInput, ItemStack[] aSideInputs, ItemStack aOutput, int aInstability, List<TC_Aspects.TC_AspectStack> aAspects); + Object addInfusionRecipe( + String aResearch, + ItemStack aMainInput, + ItemStack[] aSideInputs, + ItemStack aOutput, + int aInstability, + List<TC_Aspects.TC_AspectStack> aAspects); - Object addResearch(String aResearch, String aName, String aText, String[] aParentResearches, String aCategory, ItemStack aIcon, int aComplexity, int aType, int aX, int aY, List<TC_AspectStack> aAspects, ItemStack[] aResearchTriggers, Object[] aPages); + Object addResearch( + String aResearch, + String aName, + String aText, + String[] aParentResearches, + String aCategory, + ItemStack aIcon, + int aComplexity, + int aType, + int aX, + int aY, + List<TC_AspectStack> aAspects, + ItemStack[] aResearchTriggers, + Object[] aPages); } diff --git a/src/main/java/gregtech/api/interfaces/internal/IUETileEntity.java b/src/main/java/gregtech/api/interfaces/internal/IUETileEntity.java index b62740f610..821aa35f50 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IUETileEntity.java +++ b/src/main/java/gregtech/api/interfaces/internal/IUETileEntity.java @@ -1,6 +1,5 @@ package gregtech.api.interfaces.internal; - public interface IUETileEntity /*extends IElectrical*/ { // } diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IConfigurationCircuitSupport.java b/src/main/java/gregtech/api/interfaces/metatileentity/IConfigurationCircuitSupport.java index 7d6923e93f..59a70b450d 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IConfigurationCircuitSupport.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IConfigurationCircuitSupport.java @@ -1,11 +1,9 @@ package gregtech.api.interfaces.metatileentity; +import gregtech.api.GregTech_API; import java.util.List; - import net.minecraft.item.ItemStack; -import gregtech.api.GregTech_API; - /** * Implement this interface if your metatileentity supports configuration circuits * to resolve recipe conflicts. @@ -23,7 +21,7 @@ public interface IConfigurationCircuitSupport { * This list is unmodifiable. Its elements are not supposed to be modified in any way! */ default List<ItemStack> getConfigurationCircuits() { - return GregTech_API.getConfigurationCircuitList(100); + return GregTech_API.getConfigurationCircuitList(100); } /** @@ -41,5 +39,6 @@ public interface IConfigurationCircuitSupport { } int getCircuitSlotX(); + int getCircuitSlotY(); } diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java b/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java index cffcb4c4ab..84c991ade9 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IConnectable.java @@ -4,17 +4,17 @@ package gregtech.api.interfaces.metatileentity; * For pipes, wires, and other MetaTiles which need to be decided whether they should connect to the block at each side. */ public interface IConnectable { - int NO_CONNECTION = 0b00000000; - int CONNECTED_DOWN = 0b00000001; - int CONNECTED_UP = 0b00000010; - int CONNECTED_NORTH = 0b00000100; - int CONNECTED_SOUTH = 0b00001000; - int CONNECTED_WEST = 0b00010000; - int CONNECTED_EAST = 0b00100000; - int CONNECTED_ALL = 0b00111111; - int HAS_FRESHFOAM = 0b01000000; + int NO_CONNECTION = 0b00000000; + int CONNECTED_DOWN = 0b00000001; + int CONNECTED_UP = 0b00000010; + int CONNECTED_NORTH = 0b00000100; + int CONNECTED_SOUTH = 0b00001000; + int CONNECTED_WEST = 0b00010000; + int CONNECTED_EAST = 0b00100000; + int CONNECTED_ALL = 0b00111111; + int HAS_FRESHFOAM = 0b01000000; int HAS_HARDENEDFOAM = 0b10000000; - int HAS_FOAM = 0b11000000; + int HAS_FOAM = 0b11000000; /** * Try to connect to the Block at the specified side diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMachineCallback.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMachineCallback.java index e9ca4125a2..a1c00ebc97 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IMachineCallback.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMachineCallback.java @@ -2,6 +2,8 @@ package gregtech.api.interfaces.metatileentity; public interface IMachineCallback<Machinetype extends IMetaTileEntity> { Machinetype getCallbackBase(); + void setCallbackBase(Machinetype callback); + Class<?> getType(); } diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java index 65848fe96f..c9d23e1f71 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java @@ -9,6 +9,9 @@ import gregtech.api.interfaces.tileentity.IGregtechWailaProvider; import gregtech.api.interfaces.tileentity.IMachineBlockUpdateable; import gregtech.api.objects.GT_ItemStack; import gregtech.api.util.GT_Config; +import java.io.File; +import java.util.ArrayList; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.texture.IIconRegister; @@ -24,16 +27,18 @@ import net.minecraft.world.World; import net.minecraftforge.fluids.IFluidHandler; import net.minecraftforge.fluids.IFluidTank; -import java.io.File; -import java.util.ArrayList; -import java.util.List; - /** * Warning, this Interface has just been made to be able to add multiple kinds of MetaTileEntities (Cables, Pipes, Transformers, but not the regular Blocks) * <p/> * Don't implement this yourself and expect it to work. Extend @MetaTileEntity itself. */ -public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHandler, IGearEnergyTileEntity, IMachineBlockUpdateable, IGregtechWailaProvider { +public interface IMetaTileEntity + extends ISidedInventory, + IFluidTank, + IFluidHandler, + IGearEnergyTileEntity, + IMachineBlockUpdateable, + IGregtechWailaProvider { /** * This determines the BaseMetaTileEntity belonging to this MetaTileEntity by using the Meta ID of the Block itself. * <p/> @@ -143,7 +148,8 @@ public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHand /** * When a Player rightclicks the Facing with a soldering iron. */ - boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ); + boolean onSolderingToolRightClick( + byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ); /** * Called right before this Machine explodes @@ -241,7 +247,8 @@ public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHand * * @return */ - boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ); + boolean onRightclick( + IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ); /** * a Player leftclicks the Machine @@ -317,7 +324,8 @@ public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHand /** * returns the DebugLog */ - ArrayList<String> getSpecialDebugInfo(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, int aLogLevel, ArrayList<String> aList); + ArrayList<String> getSpecialDebugInfo( + IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, int aLogLevel, ArrayList<String> aList); /** * get a small Description @@ -338,12 +346,18 @@ public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHand * @param aActive if the Machine is currently active (use this instead of calling mBaseMetaTileEntity.mActive!!!). Note: In case of Pipes this means if this Side is connected to something or not. * @param aRedstone if the Machine is currently outputting a RedstoneSignal (use this instead of calling mBaseMetaTileEntity.mRedstone!!!) */ - ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone); + ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone); /** * The Textures used for the Item rendering. Return null if you want the regular 3D Block Rendering. */ - //public ITexture[] getItemTexture(ItemStack aStack); + // public ITexture[] getItemTexture(ItemStack aStack); /** * Register Icons here. This gets called when the Icons get initialized by the Base Block @@ -389,7 +403,14 @@ public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHand boolean allowGeneralRedstoneOutput(); - void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List<AxisAlignedBB> outputAABB, Entity collider); + void addCollisionBoxesToList( + World aWorld, + int aX, + int aY, + int aZ, + AxisAlignedBB inputAABB, + List<AxisAlignedBB> outputAABB, + Entity collider); AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ); @@ -420,7 +441,7 @@ public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHand * just return in should recurse since we are already in meta tile... */ @Override - default boolean isMachineBlockUpdateRecursive(){ + default boolean isMachineBlockUpdateRecursive() { return true; } @@ -433,5 +454,4 @@ public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHand default void onRandomDisplayTick(IGregTechTileEntity aBaseMetaTileEntity) { /* do nothing */ } - } diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityCable.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityCable.java index 85237ac4f4..6b83ab4dba 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityCable.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityCable.java @@ -1,13 +1,13 @@ package gregtech.api.interfaces.metatileentity; -import net.minecraft.tileentity.TileEntity; - import java.util.ArrayList; import java.util.HashSet; +import net.minecraft.tileentity.TileEntity; public interface IMetaTileEntityCable extends IMetaTileEntity { @Deprecated - long transferElectricity(byte aSide, long aVoltage, long aAmperage, ArrayList<TileEntity> aAlreadyPassedTileEntityList); + long transferElectricity( + byte aSide, long aVoltage, long aAmperage, ArrayList<TileEntity> aAlreadyPassedTileEntityList); default long transferElectricity(byte aSide, long aVoltage, long aAmperage, HashSet<TileEntity> aAlreadyPassedSet) { return transferElectricity(aSide, aVoltage, aAmperage, new ArrayList<>(aAlreadyPassedSet)); diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java index 90933b501f..1b1ce36871 100644 --- a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java +++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java @@ -3,7 +3,6 @@ package gregtech.api.interfaces.metatileentity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.BaseMetaPipeEntity; import gregtech.api.util.GT_Utility; - import java.util.Map; public interface IMetaTileEntityItemPipe extends IMetaTileEntity { @@ -48,18 +47,30 @@ public interface IMetaTileEntityItemPipe extends IMetaTileEntity { /** * @return a List of connected Item Pipes */ - public static Map<IMetaTileEntityItemPipe, Long> scanPipes(IMetaTileEntityItemPipe aMetaTileEntity, Map<IMetaTileEntityItemPipe, Long> aMap, long aStep, boolean aSuckItems, boolean aIgnoreCapacity) { + public static Map<IMetaTileEntityItemPipe, Long> scanPipes( + IMetaTileEntityItemPipe aMetaTileEntity, + Map<IMetaTileEntityItemPipe, Long> aMap, + long aStep, + boolean aSuckItems, + boolean aIgnoreCapacity) { aStep += aMetaTileEntity.getStepSize(); if (aIgnoreCapacity || aMetaTileEntity.pipeCapacityCheck()) if (aMap.get(aMetaTileEntity) == null || aMap.get(aMetaTileEntity) > aStep) { IGregTechTileEntity aBaseMetaTileEntity = aMetaTileEntity.getBaseMetaTileEntity(); aMap.put(aMetaTileEntity, aStep); for (byte i = 0, j = 0; i < 6; i++) { - if (aMetaTileEntity instanceof IConnectable && !((IConnectable) aMetaTileEntity).isConnectedAtSide(i)) - continue; + if (aMetaTileEntity instanceof IConnectable + && !((IConnectable) aMetaTileEntity).isConnectedAtSide(i)) continue; j = GT_Utility.getOppositeSide(i); if (aSuckItems) { - if (aBaseMetaTileEntity.getCoverBehaviorAtSideNew(i).letsItemsIn(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getComplexCoverDataAtSide(i), -2, aBaseMetaTileEntity)) { + if (aBaseMetaTileEntity + .getCoverBehaviorAtSideNew(i) + .letsItemsIn( + i, + aBaseMetaTileEntity.getCoverIDAtSide(i), + aBaseMetaTileEntity.getComplexCoverDataAtSide(i), + -2, + aBaseMetaTileEntity)) { IGregTechTileEntity tItemPipe = aBaseMetaTileEntity.getIGregTechTileEntityAtSide(i); if (aBaseMetaTileEntity.getColorization() >= 0) { byte tColor = tItemPipe.getColorization(); @@ -69,13 +80,33 @@ public interface IMetaTileEntityItemPipe extends IMetaTileEntity { } if (tItemPipe instanceof BaseMetaPipeEntity) { IMetaTileEntity tMetaTileEntity = tItemPipe.getMetaTileEntity(); - if (tMetaTileEntity instanceof IMetaTileEntityItemPipe && tItemPipe.getCoverBehaviorAtSideNew(j).letsItemsOut(j, tItemPipe.getCoverIDAtSide(j), tItemPipe.getComplexCoverDataAtSide(j), -2, tItemPipe)) { - scanPipes((IMetaTileEntityItemPipe) tMetaTileEntity, aMap, aStep, aSuckItems, aIgnoreCapacity); + if (tMetaTileEntity instanceof IMetaTileEntityItemPipe + && tItemPipe + .getCoverBehaviorAtSideNew(j) + .letsItemsOut( + j, + tItemPipe.getCoverIDAtSide(j), + tItemPipe.getComplexCoverDataAtSide(j), + -2, + tItemPipe)) { + scanPipes( + (IMetaTileEntityItemPipe) tMetaTileEntity, + aMap, + aStep, + aSuckItems, + aIgnoreCapacity); } } } } else { - if (aBaseMetaTileEntity.getCoverBehaviorAtSideNew(i).letsItemsOut(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getComplexCoverDataAtSide(i), -2, aBaseMetaTileEntity)) { + if (aBaseMetaTileEntity + .getCoverBehaviorAtSideNew(i) + .letsItemsOut( + i, + aBaseMetaTileEntity.getCoverIDAtSide(i), + aBaseMetaTileEntity.getComplexCoverDataAtSide(i), + -2, + aBaseMetaTileEntity)) { IGregTechTileEntity tItemPipe = aBaseMetaTileEntity.getIGregTechTileEntityAtSide(i); if (tItemPipe != null) { if (aBaseMetaTileEntity.getColorization() >= 0) { @@ -86,8 +117,21 @@ public interface IMetaTileEntityItemPipe extends IMetaTileEntity { } if (tItemPipe instanceof BaseMetaPipeEntity) { IMetaTileEntity tMetaTileEntity = tItemPipe.getMetaTileEntity(); - if (tMetaTileEntity instanceof IMetaTileEntityItemPipe && tItemPipe.getCoverBehaviorAtSideNew(j).letsItemsIn(j, tItemPipe.getCoverIDAtSide(j), tItemPipe.getComplexCoverDataAtSide(j), -2, tItemPipe)) { - scanPipes((IMetaTileEntityItemPipe) tMetaTileEntity, aMap, aStep, aSuckItems, aIgnoreCapacity); + if (tMetaTileEntity instanceof IMetaTileEntityItemPipe + && tItemPipe + .getCoverBehaviorAtSideNew(j) + .letsItemsIn( + j, + tItemPipe.getCoverIDAtSide(j), + tItemPipe.getComplexCoverDataAtSide(j), + -2, + tItemPipe)) { + scanPipes( + (IMetaTileEntityItemPipe) tMetaTileEntity, + aMap, + aStep, + aSuckItems, + aIgnoreCapacity); } } } diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IBasicEnergyContainer.java b/src/main/java/gregtech/api/interfaces/tileentity/IBasicEnergyContainer.java index ca3db3354e..7b0bc9c690 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IBasicEnergyContainer.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IBasicEnergyContainer.java @@ -80,12 +80,16 @@ public interface IBasicEnergyContainer extends IEnergyConnected { /** * returns the amount of Steam contained in this Block, in EU units! */ - default long getStoredSteam() { return 0; } + default long getStoredSteam() { + return 0; + } /** * returns the amount of Steam containable in this Block, in EU units! */ - default long getSteamCapacity() { return 0; } + default long getSteamCapacity() { + return 0; + } /** * Increases stored Energy. Energy Base Value is in EU, even though it's Steam! @@ -96,5 +100,7 @@ public interface IBasicEnergyContainer extends IEnergyConnected { * <p/> * And yes, you can't directly decrease the Steam of a Machine. That is done by decreaseStoredEnergyUnits */ - default boolean increaseStoredSteam(long aEnergy, boolean aIgnoreTooMuchEnergy) { return false; } + default boolean increaseStoredSteam(long aEnergy, boolean aIgnoreTooMuchEnergy) { + return false; + } } diff --git a/src/main/java/gregtech/api/interfaces/tileentity/ICoverable.java b/src/main/java/gregtech/api/interfaces/tileentity/ICoverable.java index e496479bed..6beb34a305 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/ICoverable.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/ICoverable.java @@ -22,8 +22,11 @@ public interface ICoverable extends IRedstoneTileEntity, IHasInventory, IBasicEn } void setCoverIdAndDataAtSide(byte aSide, int aId, ISerializableObject aData); + void setCoverIDAtSide(byte aSide, int aID); + boolean setCoverIDAtSideNoUpdate(byte aSide, int aID); + void setCoverItemAtSide(byte aSide, ItemStack aCover); @Deprecated @@ -71,7 +74,8 @@ public interface ICoverable extends IRedstoneTileEntity, IHasInventory, IBasicEn * Receiving a packet with cover data. * @param aPlayer the player who made the change */ - default void receiveCoverData(byte aCoverSide, int aCoverID, ISerializableObject aCoverData, EntityPlayerMP aPlayer) { + default void receiveCoverData( + byte aCoverSide, int aCoverID, ISerializableObject aCoverData, EntityPlayerMP aPlayer) { if (aCoverData instanceof ISerializableObject.LegacyCoverData) receiveCoverData(aCoverSide, aCoverID, ((ISerializableObject.LegacyCoverData) aCoverData).get()); } diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IDebugableTileEntity.java b/src/main/java/gregtech/api/interfaces/tileentity/IDebugableTileEntity.java index 0063eb57c6..4e3b03d970 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IDebugableTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IDebugableTileEntity.java @@ -1,8 +1,7 @@ package gregtech.api.interfaces.tileentity; -import net.minecraft.entity.player.EntityPlayer; - import java.util.ArrayList; +import net.minecraft.entity.player.EntityPlayer; public interface IDebugableTileEntity { /** diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java index 702f19a89d..c1ecc2b153 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java @@ -63,15 +63,21 @@ public interface IEnergyConnected extends IColoredTileEntity, IHasWorldObjectAnd final byte tColor = ((IEnergyConnected) tTileEntity).getColorization(); if (tColor >= 0 && tColor != aEmitter.getColorization()) continue; } - rUsedAmperes += ((IEnergyConnected) tTileEntity).injectEnergyUnits(j, aVoltage, aAmperage - rUsedAmperes); + rUsedAmperes += ((IEnergyConnected) tTileEntity) + .injectEnergyUnits(j, aVoltage, aAmperage - rUsedAmperes); } else if (tTileEntity instanceof IEnergySink) { - if (((IEnergySink) tTileEntity).acceptsEnergyFrom((TileEntity) aEmitter, ForgeDirection.getOrientation(j))) { - while (aAmperage > rUsedAmperes && ((IEnergySink) tTileEntity).getDemandedEnergy() > 0 && ((IEnergySink) tTileEntity).injectEnergy(ForgeDirection.getOrientation(j), aVoltage, aVoltage) < aVoltage) - rUsedAmperes++; + if (((IEnergySink) tTileEntity) + .acceptsEnergyFrom((TileEntity) aEmitter, ForgeDirection.getOrientation(j))) { + while (aAmperage > rUsedAmperes + && ((IEnergySink) tTileEntity).getDemandedEnergy() > 0 + && ((IEnergySink) tTileEntity) + .injectEnergy(ForgeDirection.getOrientation(j), aVoltage, aVoltage) + < aVoltage) rUsedAmperes++; } } else if (GregTech_API.mOutputRF && tTileEntity instanceof IEnergyReceiver) { - final ForgeDirection tDirection = ForgeDirection.getOrientation(i).getOpposite(); + final ForgeDirection tDirection = + ForgeDirection.getOrientation(i).getOpposite(); final int rfOut = GT_Utility.safeInt(aVoltage * GregTech_API.mEUtoRF / 100); if (((IEnergyReceiver) tTileEntity).receiveEnergy(tDirection, rfOut, true) == rfOut) { ((IEnergyReceiver) tTileEntity).receiveEnergy(tDirection, rfOut, false); diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IExperimentalEnergyTileEntity.java b/src/main/java/gregtech/api/interfaces/tileentity/IExperimentalEnergyTileEntity.java index 2a8172a775..936de80b3e 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IExperimentalEnergyTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IExperimentalEnergyTileEntity.java @@ -50,12 +50,16 @@ public interface IExperimentalEnergyTileEntity extends IColoredTileEntity, IHasW Class tClass = cofh.api.energy.IEnergyReceiver.class; tClass.getCanonicalName(); RF_ENERGY = true; - } catch (Throwable e) {/**/} + } catch (Throwable e) { + /**/ + } try { Class tClass = ic2.api.energy.tile.IEnergySink.class; tClass.getCanonicalName(); IC_ENERGY = true; - } catch (Throwable e) {/**/} + } catch (Throwable e) { + /**/ + } CHECK_ALL = false; } } @@ -65,7 +69,8 @@ public interface IExperimentalEnergyTileEntity extends IColoredTileEntity, IHasW * * @return the amount of used secondary value. */ - public static final long emitEnergyToNetwork(SubTag aEnergyType, long aPrimary, long aSecondary, IExperimentalEnergyTileEntity aEmitter) { + public static final long emitEnergyToNetwork( + SubTag aEnergyType, long aPrimary, long aSecondary, IExperimentalEnergyTileEntity aEmitter) { long rUsedSecondary = 0; checkAvailabilities(); for (byte i = 0, j = 0; i < 6 && aSecondary > rUsedSecondary; i++) @@ -77,14 +82,25 @@ public interface IExperimentalEnergyTileEntity extends IColoredTileEntity, IHasW byte tColor = ((IExperimentalEnergyTileEntity) tTileEntity).getColorization(); if (tColor >= 0 && tColor != aEmitter.getColorization()) continue; } - rUsedSecondary += ((IExperimentalEnergyTileEntity) tTileEntity).injectEnergy(aEnergyType, j, aPrimary, aSecondary - rUsedSecondary); - } else if (IC_ENERGY && aEnergyType == SubTag.ENERGY_ELECTRICITY && tTileEntity instanceof IEnergySink) { - if (((IEnergySink) tTileEntity).acceptsEnergyFrom((TileEntity) aEmitter, ForgeDirection.getOrientation(j))) { - while (aSecondary > rUsedSecondary && ((IEnergySink) tTileEntity).getDemandedEnergy() > 0 && ((IEnergySink) tTileEntity).injectEnergy(ForgeDirection.getOrientation(j), aPrimary, aPrimary) < aPrimary) - rUsedSecondary++; + rUsedSecondary += ((IExperimentalEnergyTileEntity) tTileEntity) + .injectEnergy(aEnergyType, j, aPrimary, aSecondary - rUsedSecondary); + } else if (IC_ENERGY + && aEnergyType == SubTag.ENERGY_ELECTRICITY + && tTileEntity instanceof IEnergySink) { + if (((IEnergySink) tTileEntity) + .acceptsEnergyFrom((TileEntity) aEmitter, ForgeDirection.getOrientation(j))) { + while (aSecondary > rUsedSecondary + && ((IEnergySink) tTileEntity).getDemandedEnergy() > 0 + && ((IEnergySink) tTileEntity) + .injectEnergy(ForgeDirection.getOrientation(j), aPrimary, aPrimary) + < aPrimary) rUsedSecondary++; } - } else if (RF_ENERGY && aEnergyType == SubTag.ENERGY_REDSTONE_FLUX && tTileEntity instanceof IEnergyReceiver && ((IEnergyReceiver) tTileEntity).canConnectEnergy(ForgeDirection.getOrientation(j))) { - rUsedSecondary += ((IEnergyReceiver) tTileEntity).receiveEnergy(ForgeDirection.getOrientation(j), (int) aSecondary, false); + } else if (RF_ENERGY + && aEnergyType == SubTag.ENERGY_REDSTONE_FLUX + && tTileEntity instanceof IEnergyReceiver + && ((IEnergyReceiver) tTileEntity).canConnectEnergy(ForgeDirection.getOrientation(j))) { + rUsedSecondary += ((IEnergyReceiver) tTileEntity) + .receiveEnergy(ForgeDirection.getOrientation(j), (int) aSecondary, false); } } return rUsedSecondary; diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IGTEnet.java b/src/main/java/gregtech/api/interfaces/tileentity/IGTEnet.java index cd4810eba6..77b894fea7 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IGTEnet.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IGTEnet.java @@ -5,16 +5,15 @@ public interface IGTEnet { /** * @return true if this Device consumes Energy at all */ - default boolean isEnetInput() { - return false; + default boolean isEnetInput() { + return false; } - + /** - * + * * @return true if this Device emits Energy at all */ - default boolean isEnetOutput() { + default boolean isEnetOutput() { return false; } - } diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IGregTechTileEntity.java b/src/main/java/gregtech/api/interfaces/tileentity/IGregTechTileEntity.java index 94b93434e2..253deae29b 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IGregTechTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IGregTechTileEntity.java @@ -5,6 +5,9 @@ import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.interfaces.IDescribable; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.common.blocks.GT_Block_Machines; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -13,10 +16,6 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; import net.minecraftforge.fluids.IFluidHandler; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - /** * A simple compound Interface for all my TileEntities. * <p/> @@ -24,7 +23,18 @@ import java.util.UUID; * <p/> * It can cause Problems to include this Interface! */ -public interface IGregTechTileEntity extends ITexturedTileEntity, IGearEnergyTileEntity, ICoverable, IFluidHandler, ITurnable, IGregTechDeviceInformation, IUpgradableMachine, IDigitalChest, IDescribable, IMachineBlockUpdateable, IGregtechWailaProvider { +public interface IGregTechTileEntity + extends ITexturedTileEntity, + IGearEnergyTileEntity, + ICoverable, + IFluidHandler, + ITurnable, + IGregTechDeviceInformation, + IUpgradableMachine, + IDigitalChest, + IDescribable, + IMachineBlockUpdateable, + IGregtechWailaProvider { /** * gets the Error displayed on the GUI */ @@ -133,7 +143,14 @@ public interface IGregTechTileEntity extends ITexturedTileEntity, IGearEnergyTil */ int getLightOpacity(); - void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List<AxisAlignedBB> outputAABB, Entity collider); + void addCollisionBoxesToList( + World aWorld, + int aX, + int aY, + int aZ, + AxisAlignedBB inputAABB, + List<AxisAlignedBB> outputAABB, + Entity collider); AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ); @@ -143,8 +160,8 @@ public interface IGregTechTileEntity extends ITexturedTileEntity, IGearEnergyTil * Checks validity of meta tile and delegates to it */ @Override - default void onMachineBlockUpdate(){ - if(!isDead() && getMetaTileEntity() != null && getMetaTileEntity().getBaseMetaTileEntity() == this){ + default void onMachineBlockUpdate() { + if (!isDead() && getMetaTileEntity() != null && getMetaTileEntity().getBaseMetaTileEntity() == this) { getMetaTileEntity().onMachineBlockUpdate(); } } @@ -154,12 +171,15 @@ public interface IGregTechTileEntity extends ITexturedTileEntity, IGearEnergyTil */ @Override default boolean isMachineBlockUpdateRecursive() { - return !isDead() && getMetaTileEntity() != null && - getMetaTileEntity().getBaseMetaTileEntity() == this && - getMetaTileEntity().isMachineBlockUpdateRecursive(); + return !isDead() + && getMetaTileEntity() != null + && getMetaTileEntity().getBaseMetaTileEntity() == this + && getMetaTileEntity().isMachineBlockUpdateRecursive(); } - default void setShutdownStatus(boolean newStatus) {return;} + default void setShutdownStatus(boolean newStatus) { + return; + } /** * A randomly called display update to be able to add particles or other items for display diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IGregtechWailaProvider.java b/src/main/java/gregtech/api/interfaces/tileentity/IGregtechWailaProvider.java index ee3da0fa6f..a463cc91df 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IGregtechWailaProvider.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IGregtechWailaProvider.java @@ -1,5 +1,6 @@ package gregtech.api.interfaces.tileentity; +import java.util.List; import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; import net.minecraft.entity.player.EntityPlayerMP; @@ -8,10 +9,16 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import java.util.List; - public interface IGregtechWailaProvider { - default void getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {} + default void getWailaBody( + ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {} - default void getWailaNBTData(final EntityPlayerMP player, final TileEntity tile, final NBTTagCompound tag, final World world, int x, int y, int z) {} + default void getWailaNBTData( + final EntityPlayerMP player, + final TileEntity tile, + final NBTTagCompound tag, + final World world, + int x, + int y, + int z) {} } diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IIC2Enet.java b/src/main/java/gregtech/api/interfaces/tileentity/IIC2Enet.java index ee3516dfac..2593f1f3b5 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IIC2Enet.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IIC2Enet.java @@ -13,5 +13,4 @@ public interface IIC2Enet { * Update the ic2 enet */ void doEnetUpdate(); - } diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IMachineBlockUpdateable.java b/src/main/java/gregtech/api/interfaces/tileentity/IMachineBlockUpdateable.java index 31590f3d57..b8ce51a212 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IMachineBlockUpdateable.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IMachineBlockUpdateable.java @@ -17,7 +17,7 @@ public interface IMachineBlockUpdateable { /** * Should recurse? */ - default boolean isMachineBlockUpdateRecursive(){ + default boolean isMachineBlockUpdateRecursive() { return true; } } diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IMachineProgress.java b/src/main/java/gregtech/api/interfaces/tileentity/IMachineProgress.java index 0c342b8cfc..54fa90218a 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IMachineProgress.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IMachineProgress.java @@ -49,7 +49,9 @@ public interface IMachineProgress extends IHasWorldObjectAndCoords { * used to control Machines via Redstone Signal Strength by special Covers * In case of 0 the Machine is very likely doing nothing, or is just not being controlled at all. */ - default byte getWorkDataValue() { return 0; } + default byte getWorkDataValue() { + return 0; + } /** * used to control Machines via Redstone Signal Strength by special Covers @@ -73,5 +75,4 @@ public interface IMachineProgress extends IHasWorldObjectAndCoords { default boolean wasShutdown() { return false; } - } diff --git a/src/main/java/gregtech/api/interfaces/tileentity/ITurnable.java b/src/main/java/gregtech/api/interfaces/tileentity/ITurnable.java index 8c8ce443b0..e05fd44637 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/ITurnable.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/ITurnable.java @@ -1,6 +1,5 @@ package gregtech.api.interfaces.tileentity; - import static gregtech.api.enums.GT_Values.ALL_VALID_SIDES; /** @@ -38,7 +37,7 @@ public interface ITurnable { */ default boolean[] getValidFacings() { final boolean[] validFacings = new boolean[6]; - for(byte facing : ALL_VALID_SIDES) { + for (byte facing : ALL_VALID_SIDES) { validFacings[facing] = isValidFacing(facing); } return validFacings; diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IUpgradableMachine.java b/src/main/java/gregtech/api/interfaces/tileentity/IUpgradableMachine.java index 0d027f6e30..cc59a4af34 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IUpgradableMachine.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IUpgradableMachine.java @@ -1,6 +1,5 @@ package gregtech.api.interfaces.tileentity; - /** * To access my Machines a bit easier */ diff --git a/src/main/java/gregtech/api/items/GT_Block_LongDistancePipe.java b/src/main/java/gregtech/api/items/GT_Block_LongDistancePipe.java index 2a20ac4972..d37f0479ef 100644 --- a/src/main/java/gregtech/api/items/GT_Block_LongDistancePipe.java +++ b/src/main/java/gregtech/api/items/GT_Block_LongDistancePipe.java @@ -9,6 +9,7 @@ import gregtech.api.interfaces.IIconContainer; import gregtech.api.util.GT_LanguageManager; import gregtech.common.blocks.GT_Item_LongDistancePipe; import gregtech.common.blocks.GT_Material_Machines; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -22,24 +23,26 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import java.util.List; - public class GT_Block_LongDistancePipe extends GT_Generic_Block { public IIconContainer[] mIcons; + public GT_Block_LongDistancePipe() { super(GT_Item_LongDistancePipe.class, "gt.block.longdistancepipe", new GT_Material_Machines()); setStepSound(soundTypeMetal); setCreativeTab(GregTech_API.TAB_GREGTECH); GregTech_API.registerMachineBlock(this, -1); - GT_LanguageManager.addStringLocalization(getUnlocalizedName()+".0.name", "Long Distance Fluid Pipeline Pipe"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName()+".1.name", "Long Distance Item Pipeline Pipe"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Long Distance Fluid Pipeline Pipe"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Long Distance Item Pipeline Pipe"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + 32767 + ".name", "Any Sub Block of this"); ItemList.Long_Distance_Pipeline_Fluid_Pipe.set(new ItemStack(this, 1, 0)); ItemList.Long_Distance_Pipeline_Item_Pipe.set(new ItemStack(this, 1, 1)); - mIcons = new IIconContainer[]{Textures.BlockIcons.LONG_DISTANCE_PIPE_FLUID, Textures.BlockIcons.LONG_DISTANCE_PIPE_ITEM}; + mIcons = new IIconContainer[] { + Textures.BlockIcons.LONG_DISTANCE_PIPE_FLUID, Textures.BlockIcons.LONG_DISTANCE_PIPE_ITEM + }; } + @Override public void onBlockAdded(World aWorld, int aX, int aY, int aZ) { super.onBlockAdded(aWorld, aX, aY, aZ); @@ -47,11 +50,13 @@ public class GT_Block_LongDistancePipe extends GT_Generic_Block { GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); } } + @Override public void breakBlock(World aWorld, int aX, int aY, int aZ, Block aBlock, int aMetaData) { GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); super.breakBlock(aWorld, aX, aY, aZ, aBlock, aMetaData); } + @Override public String getHarvestTool(int aMeta) { return "wrench"; @@ -72,7 +77,6 @@ public class GT_Block_LongDistancePipe extends GT_Generic_Block { return Blocks.iron_block.getExplosionResistance(aTNT); } - @Override public String getUnlocalizedName() { return this.mUnlocalizedName; @@ -90,8 +94,7 @@ public class GT_Block_LongDistancePipe extends GT_Generic_Block { @Override @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister aIconRegister) { - } + public void registerBlockIcons(IIconRegister aIconRegister) {} @Override public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) { diff --git a/src/main/java/gregtech/api/items/GT_BreederCell_Item.java b/src/main/java/gregtech/api/items/GT_BreederCell_Item.java index bb65a9a057..c30987183b 100644 --- a/src/main/java/gregtech/api/items/GT_BreederCell_Item.java +++ b/src/main/java/gregtech/api/items/GT_BreederCell_Item.java @@ -5,6 +5,8 @@ import gregtech.api.util.GT_Utility; import ic2.api.reactor.IReactor; import ic2.api.reactor.IReactorComponent; import ic2.core.IC2Potion; +import java.util.List; +import java.util.function.Supplier; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -12,9 +14,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; -import java.util.List; -import java.util.function.Supplier; - /** * A {@link ic2.core.item.reactor.ItemReactorLithiumCell}, but can be used to produce anything! * @@ -25,7 +24,14 @@ public class GT_BreederCell_Item extends GT_Generic_Item implements IReactorComp protected final int mHeatBonusMultiplier; protected ItemStack mProduct; - public GT_BreederCell_Item(String aUnlocalized, String aEnglish, String aEnglishTooltip, int aHeatBonusStep, int aHeatBonusMultiplier, int aRequiredPulse, Supplier<ItemStack> aProduct) { + public GT_BreederCell_Item( + String aUnlocalized, + String aEnglish, + String aEnglishTooltip, + int aHeatBonusStep, + int aHeatBonusMultiplier, + int aRequiredPulse, + Supplier<ItemStack> aProduct) { super(aUnlocalized, aEnglish, aEnglishTooltip); this.mHeatBonusStep = aHeatBonusStep; this.mHeatBonusMultiplier = aHeatBonusMultiplier; @@ -61,9 +67,11 @@ public class GT_BreederCell_Item extends GT_Generic_Item implements IReactorComp color2 = EnumChatFormatting.WHITE; break; } - aList.add(String.format(transItem("020", "Progress: %s/%s"), "" + color2 + aStack.getItemDamage() + EnumChatFormatting.RESET, "" + getMaxDamage())); - if (aStack.getItemDamage() > 0) - aList.add(EnumChatFormatting.RED + transItem("021", "Radiation Hazard")); + aList.add(String.format( + transItem("020", "Progress: %s/%s"), + "" + color2 + aStack.getItemDamage() + EnumChatFormatting.RESET, + "" + getMaxDamage())); + if (aStack.getItemDamage() > 0) aList.add(EnumChatFormatting.RED + transItem("021", "Radiation Hazard")); } @Override @@ -72,17 +80,22 @@ public class GT_BreederCell_Item extends GT_Generic_Item implements IReactorComp } @Override - public void processChamber(IReactor reactor, ItemStack yourStack, int x, int y, boolean heatrun) { - } + public void processChamber(IReactor reactor, ItemStack yourStack, int x, int y, boolean heatrun) {} @Override - public boolean acceptUraniumPulse(IReactor reactor, ItemStack yourStack, ItemStack pulsingStack, int youX, int youY, int pulseX, int pulseY, boolean heatrun) { + public boolean acceptUraniumPulse( + IReactor reactor, + ItemStack yourStack, + ItemStack pulsingStack, + int youX, + int youY, + int pulseX, + int pulseY, + boolean heatrun) { if (heatrun) { int myLevel = getNewDamage(reactor, yourStack); - if (myLevel >= getMaxDamage()) - reactor.setItemAt(youX, youY, mProduct.copy()); - else - yourStack.setItemDamage(myLevel); + if (myLevel >= getMaxDamage()) reactor.setItemAt(youX, youY, mProduct.copy()); + else yourStack.setItemDamage(myLevel); } return true; diff --git a/src/main/java/gregtech/api/items/GT_CoolantCellIC_Item.java b/src/main/java/gregtech/api/items/GT_CoolantCellIC_Item.java index 106897efd7..eb37b50ea6 100644 --- a/src/main/java/gregtech/api/items/GT_CoolantCellIC_Item.java +++ b/src/main/java/gregtech/api/items/GT_CoolantCellIC_Item.java @@ -1,23 +1,27 @@ package gregtech.api.items; - import ic2.api.reactor.IReactor; import ic2.api.reactor.IReactorComponent; import net.minecraft.item.ItemStack; -public class GT_CoolantCellIC_Item - extends GT_CoolantCell_Item - implements IReactorComponent { +public class GT_CoolantCellIC_Item extends GT_CoolantCell_Item implements IReactorComponent { public GT_CoolantCellIC_Item(String aUnlocalized, String aEnglish, int aMaxStore) { super(aUnlocalized, aEnglish, aMaxStore); } @Override - public void processChamber(IReactor aReactor, ItemStack aStack, int x, int y, boolean aHeatRun) { - } + public void processChamber(IReactor aReactor, ItemStack aStack, int x, int y, boolean aHeatRun) {} @Override - public boolean acceptUraniumPulse(IReactor aReactor, ItemStack aStack, ItemStack pulsingStack, int youX, int youY, int pulseX, int pulseY, boolean aHeatRun) { + public boolean acceptUraniumPulse( + IReactor aReactor, + ItemStack aStack, + ItemStack pulsingStack, + int youX, + int youY, + int pulseX, + int pulseY, + boolean aHeatRun) { return false; } diff --git a/src/main/java/gregtech/api/items/GT_CoolantCell_Item.java b/src/main/java/gregtech/api/items/GT_CoolantCell_Item.java index 12a075d181..116786532b 100644 --- a/src/main/java/gregtech/api/items/GT_CoolantCell_Item.java +++ b/src/main/java/gregtech/api/items/GT_CoolantCell_Item.java @@ -2,16 +2,14 @@ package gregtech.api.items; import gregtech.api.GregTech_API; import ic2.core.util.StackUtil; +import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; -import java.util.List; - -public class GT_CoolantCell_Item - extends GT_Generic_Item { +public class GT_CoolantCell_Item extends GT_Generic_Item { protected int heatStorage; public GT_CoolantCell_Item(String aUnlocalized, String aEnglish, int aMaxStore) { @@ -51,22 +49,33 @@ public class GT_CoolantCell_Item @Override public void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) { - super.addAdditionalToolTips(aList, aStack, aPlayer); + super.addAdditionalToolTips(aList, aStack, aPlayer); int rHeat = getHeatOfStack(aStack) * 10 / this.heatStorage; EnumChatFormatting color; switch (rHeat) { - case 0: color = EnumChatFormatting.BLUE; break; - case 1: - case 2: color = EnumChatFormatting.GREEN; break; - case 3: - case 4: - case 5: - case 6: color = EnumChatFormatting.YELLOW; break; - case 7: - case 8: color = EnumChatFormatting.RED; break; - default: color = EnumChatFormatting.DARK_RED; break; + case 0: + color = EnumChatFormatting.BLUE; + break; + case 1: + case 2: + color = EnumChatFormatting.GREEN; + break; + case 3: + case 4: + case 5: + case 6: + color = EnumChatFormatting.YELLOW; + break; + case 7: + case 8: + color = EnumChatFormatting.RED; + break; + default: + color = EnumChatFormatting.DARK_RED; + break; } - aList.add(EnumChatFormatting.WHITE + String.format(transItem("000", "Stored Heat: %s"), "" + color + getHeatOfStack(aStack))); + aList.add(EnumChatFormatting.WHITE + + String.format(transItem("000", "Stored Heat: %s"), "" + color + getHeatOfStack(aStack))); switch (getControlTagOfStack(aStack)) { case 1: aList.add(StatCollector.translateToLocal("ic2.reactoritem.heatwarning.line1")); diff --git a/src/main/java/gregtech/api/items/GT_EnergyArmor_Item.java b/src/main/java/gregtech/api/items/GT_EnergyArmor_Item.java index 904215b68a..7b4ac6afb8 100644 --- a/src/main/java/gregtech/api/items/GT_EnergyArmor_Item.java +++ b/src/main/java/gregtech/api/items/GT_EnergyArmor_Item.java @@ -1,11 +1,16 @@ package gregtech.api.items; +import static gregtech.api.enums.GT_Values.RES_PATH_ITEM; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTech_API; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.EntityLivingBase; @@ -23,19 +28,25 @@ import net.minecraftforge.common.ISpecialArmor; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.LivingFallEvent; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -import static gregtech.api.enums.GT_Values.RES_PATH_ITEM; - public class GT_EnergyArmor_Item extends ItemArmor implements ISpecialArmor { public static Map jumpChargeMap = new ConcurrentHashMap(); public int mCharge, mTransfer, mTier, mDamageEnergyCost, mSpecials; public boolean mChargeProvider; public double mArmorAbsorbtionPercentage; - public GT_EnergyArmor_Item(int aID, String aUnlocalized, String aEnglish, int aCharge, int aTransfer, int aTier, int aDamageEnergyCost, int aSpecials, double aArmorAbsorbtionPercentage, boolean aChargeProvider, int aType, int aArmorIndex) { + public GT_EnergyArmor_Item( + int aID, + String aUnlocalized, + String aEnglish, + int aCharge, + int aTransfer, + int aTier, + int aDamageEnergyCost, + int aSpecials, + double aArmorAbsorbtionPercentage, + boolean aChargeProvider, + int aType, + int aArmorIndex) { super(ArmorMaterial.DIAMOND, aArmorIndex, aType); setMaxStackSize(1); setMaxDamage(100); @@ -112,7 +123,8 @@ public class GT_EnergyArmor_Item extends ItemArmor implements ISpecialArmor { } if (!aPlayer.worldObj.isRemote && (mSpecials & 4) != 0) { - if (GT_ModHandler.canUseElectricItem(aStack, 50000) && aPlayer.getFoodStats().needFood()) { + if (GT_ModHandler.canUseElectricItem(aStack, 50000) + && aPlayer.getFoodStats().needFood()) { aPlayer.getFoodStats().addStats(1, 0.0F); GT_ModHandler.useElectricItem(aStack, 50000, aPlayer); } @@ -134,7 +146,8 @@ public class GT_EnergyArmor_Item extends ItemArmor implements ISpecialArmor { } if (!aPlayer.worldObj.isRemote && (mSpecials & 128) != 0) { - float jumpCharge = jumpChargeMap.containsKey(aPlayer) ? ((Float) jumpChargeMap.get(aPlayer)).floatValue() : 1.0F; + float jumpCharge = + jumpChargeMap.containsKey(aPlayer) ? ((Float) jumpChargeMap.get(aPlayer)).floatValue() : 1.0F; if (GT_ModHandler.canUseElectricItem(aStack, 1000) && aPlayer.onGround && jumpCharge < 1.0F) { jumpCharge = 1.0F; @@ -159,7 +172,10 @@ public class GT_EnergyArmor_Item extends ItemArmor implements ISpecialArmor { } if ((mSpecials & 256) != 0) { - if (GT_ModHandler.canUseElectricItem(aStack, 100) && aPlayer.isSprinting() && (aPlayer.onGround && Math.abs(aPlayer.motionX) + Math.abs(aPlayer.motionZ) > 0.10000000149011612D || aPlayer.isInWater())) { + if (GT_ModHandler.canUseElectricItem(aStack, 100) + && aPlayer.isSprinting() + && (aPlayer.onGround && Math.abs(aPlayer.motionX) + Math.abs(aPlayer.motionZ) > 0.10000000149011612D + || aPlayer.isInWater())) { GT_ModHandler.useElectricItem(aStack, 100, aPlayer); float bonus = 0.22F; @@ -167,7 +183,6 @@ public class GT_EnergyArmor_Item extends ItemArmor implements ISpecialArmor { GT_ModHandler.useElectricItem(aStack, 100, aPlayer); bonus = 0.1F; - if (aPlayer.motionY > 0) { aPlayer.motionY += 0.10000000149011612D; } @@ -187,13 +202,14 @@ public class GT_EnergyArmor_Item extends ItemArmor implements ISpecialArmor { } if (!aPlayer.worldObj.isRemote && (mSpecials & (16 | 32)) != 0) { - //if (GregTech_API.sWorldTickCounter%20==0) { + // if (GregTech_API.sWorldTickCounter%20==0) { ItemStack tTargetChargeItem = aStack, tTargetDechargeItem = aStack; if (GT_ModHandler.chargeElectricItem(tTargetChargeItem, 1, Integer.MAX_VALUE, true, true) < 1) { tTargetChargeItem = aPlayer.inventory.armorInventory[2]; } - if (GT_ModHandler.dischargeElectricItem(tTargetDechargeItem, 10, Integer.MAX_VALUE, true, true, true) < 10) { + if (GT_ModHandler.dischargeElectricItem(tTargetDechargeItem, 10, Integer.MAX_VALUE, true, true, true) + < 10) { tTargetDechargeItem = aPlayer.inventory.armorInventory[2]; } @@ -201,18 +217,22 @@ public class GT_EnergyArmor_Item extends ItemArmor implements ISpecialArmor { tTargetChargeItem = null; } - if (aPlayer.worldObj.isDaytime() && aPlayer.worldObj.canBlockSeeTheSky(MathHelper.floor_double(aPlayer.posX), MathHelper.floor_double(aPlayer.posY + 1), MathHelper.floor_double(aPlayer.posZ))) { + if (aPlayer.worldObj.isDaytime() + && aPlayer.worldObj.canBlockSeeTheSky( + MathHelper.floor_double(aPlayer.posX), + MathHelper.floor_double(aPlayer.posY + 1), + MathHelper.floor_double(aPlayer.posZ))) { if ((mSpecials & 32) != 0 && tTargetChargeItem != null) { GT_ModHandler.chargeElectricItem(tTargetChargeItem, 20, Integer.MAX_VALUE, true, false); } } else { - /* TODO: - if ((mSpecials & 16) != 0 && tTargetDechargeItem != null && GT_ModHandler.canUseElectricItem(tTargetDechargeItem, 10)) { - if (aPlayer.worldObj.getBlock ((int)aPlayer.posX, (int)aPlayer.posY+1, (int)aPlayer.posZ) == Blocks.air) - aPlayer.worldObj.setBlock ((int)aPlayer.posX, (int)aPlayer.posY+1, (int)aPlayer.posZ, GregTech_API.sBlockList[3]); - GT_ModHandler.useElectricItem(tTargetDechargeItem, 10, aPlayer); - }*/ - //} + /* TODO: + if ((mSpecials & 16) != 0 && tTargetDechargeItem != null && GT_ModHandler.canUseElectricItem(tTargetDechargeItem, 10)) { + if (aPlayer.worldObj.getBlock ((int)aPlayer.posX, (int)aPlayer.posY+1, (int)aPlayer.posZ) == Blocks.air) + aPlayer.worldObj.setBlock ((int)aPlayer.posX, (int)aPlayer.posY+1, (int)aPlayer.posZ, GregTech_API.sBlockList[3]); + GT_ModHandler.useElectricItem(tTargetDechargeItem, 10, aPlayer); + }*/ + // } } } } @@ -285,7 +305,9 @@ public class GT_EnergyArmor_Item extends ItemArmor implements ISpecialArmor { if (armor != null && armor.getItem() == this && (mSpecials & 2) != 0) { int distanceFactor = (int) event.distance - 3; int energyCost = (this.mDamageEnergyCost * distanceFactor) / 4; - if (energyCost <= GT_ModHandler.dischargeElectricItem(armor, Integer.MAX_VALUE, Integer.MAX_VALUE, true, true, true)) { + if (energyCost + <= GT_ModHandler.dischargeElectricItem( + armor, Integer.MAX_VALUE, Integer.MAX_VALUE, true, true, true)) { GT_ModHandler.dischargeElectricItem(armor, energyCost, Integer.MAX_VALUE, true, false, true); event.setCanceled(true); break; @@ -296,8 +318,17 @@ public class GT_EnergyArmor_Item extends ItemArmor implements ISpecialArmor { } @Override - public ISpecialArmor.ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slotIndex) { - return new ISpecialArmor.ArmorProperties((source == DamageSource.fall && (mSpecials & 2) != 0) ? 10 : 0, getBaseAbsorptionRatio() * mArmorAbsorbtionPercentage, mDamageEnergyCost > 0 ? 25 * GT_ModHandler.dischargeElectricItem(armor, Integer.MAX_VALUE, Integer.MAX_VALUE, true, true, true) / mDamageEnergyCost : 0); + public ISpecialArmor.ArmorProperties getProperties( + EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slotIndex) { + return new ISpecialArmor.ArmorProperties( + (source == DamageSource.fall && (mSpecials & 2) != 0) ? 10 : 0, + getBaseAbsorptionRatio() * mArmorAbsorbtionPercentage, + mDamageEnergyCost > 0 + ? 25 + * GT_ModHandler.dischargeElectricItem( + armor, Integer.MAX_VALUE, Integer.MAX_VALUE, true, true, true) + / mDamageEnergyCost + : 0); } @Override @@ -306,8 +337,10 @@ public class GT_EnergyArmor_Item extends ItemArmor implements ISpecialArmor { } @Override - public void damageArmor(EntityLivingBase entity, ItemStack itemStack, DamageSource source, int damage, int slotIndex) { - GT_ModHandler.dischargeElectricItem(itemStack, damage * mDamageEnergyCost, Integer.MAX_VALUE, true, false, true); + public void damageArmor( + EntityLivingBase entity, ItemStack itemStack, DamageSource source, int damage, int slotIndex) { + GT_ModHandler.dischargeElectricItem( + itemStack, damage * mDamageEnergyCost, Integer.MAX_VALUE, true, false, true); } private double getBaseAbsorptionRatio() { diff --git a/src/main/java/gregtech/api/items/GT_Generic_Block.java b/src/main/java/gregtech/api/items/GT_Generic_Block.java index 37d1e0c7d5..912841c145 100644 --- a/src/main/java/gregtech/api/items/GT_Generic_Block.java +++ b/src/main/java/gregtech/api/items/GT_Generic_Block.java @@ -1,13 +1,13 @@ package gregtech.api.items; +import static gregtech.api.enums.GT_Values.W; + import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.util.GT_LanguageManager; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.item.ItemBlock; -import static gregtech.api.enums.GT_Values.W; - public class GT_Generic_Block extends Block { protected final String mUnlocalizedName; diff --git a/src/main/java/gregtech/api/items/GT_Generic_Item.java b/src/main/java/gregtech/api/items/GT_Generic_Item.java index 796a414c78..347913e470 100644 --- a/src/main/java/gregtech/api/items/GT_Generic_Item.java +++ b/src/main/java/gregtech/api/items/GT_Generic_Item.java @@ -1,5 +1,8 @@ package gregtech.api.items; +import static gregtech.api.enums.GT_Values.MOD_ID; +import static gregtech.api.enums.GT_Values.RES_PATH_ITEM; + import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -10,6 +13,7 @@ import gregtech.api.util.GT_Config; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; +import java.util.List; import net.minecraft.block.BlockDispenser; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.dispenser.BehaviorDefaultDispenseItem; @@ -26,11 +30,6 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.IIcon; import net.minecraft.world.World; -import java.util.List; - -import static gregtech.api.enums.GT_Values.MOD_ID; -import static gregtech.api.enums.GT_Values.RES_PATH_ITEM; - /** * Extended by most Items, also used as a fallback Item, to prevent the accidental deletion when Errors occur. */ @@ -42,12 +41,14 @@ public class GT_Generic_Item extends Item implements IProjectileItem { this(aUnlocalized, aEnglish, aEnglishTooltip, true); } - public GT_Generic_Item(String aUnlocalized, String aEnglish, String aEnglishTooltip, boolean aWriteToolTipIntoLangFile) { + public GT_Generic_Item( + String aUnlocalized, String aEnglish, String aEnglishTooltip, boolean aWriteToolTipIntoLangFile) { super(); mName = "gt." + aUnlocalized; GT_LanguageManager.addStringLocalization(mName + ".name", aEnglish); if (GT_Utility.isStringValid(aEnglishTooltip)) - GT_LanguageManager.addStringLocalization(mTooltip = mName + ".tooltip_main", aEnglishTooltip, aWriteToolTipIntoLangFile); + GT_LanguageManager.addStringLocalization( + mTooltip = mName + ".tooltip_main", aEnglishTooltip, aWriteToolTipIntoLangFile); else mTooltip = null; setCreativeTab(GregTech_API.TAB_GREGTECH); GameRegistry.registerItem(this, mName, MOD_ID); @@ -120,12 +121,14 @@ public class GT_Generic_Item extends Item implements IProjectileItem { } @Override - public EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ) { + public EntityArrow getProjectile( + SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ) { return null; } @Override - public EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed) { + public EntityArrow getProjectile( + SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed) { return null; } @@ -145,12 +148,12 @@ public class GT_Generic_Item extends Item implements IProjectileItem { } @Deprecated - public String trans(String aKey, String aEnglish){ - return transItem(aKey, aEnglish); + public String trans(String aKey, String aEnglish) { + return transItem(aKey, aEnglish); } - public String transItem(String aKey, String aEnglish){ - return GT_LanguageManager.addStringLocalization("Item_DESCRIPTION_Index_"+aKey, aEnglish, false); + public String transItem(String aKey, String aEnglish) { + return GT_LanguageManager.addStringLocalization("Item_DESCRIPTION_Index_" + aKey, aEnglish, false); } public static class GT_Item_Dispense extends BehaviorProjectileDispense { diff --git a/src/main/java/gregtech/api/items/GT_MetaBase_Item.java b/src/main/java/gregtech/api/items/GT_MetaBase_Item.java index e0a70c093c..bf2b0d2d96 100644 --- a/src/main/java/gregtech/api/items/GT_MetaBase_Item.java +++ b/src/main/java/gregtech/api/items/GT_MetaBase_Item.java @@ -1,5 +1,8 @@ package gregtech.api.items; +import static gregtech.api.enums.GT_Values.D1; +import static gregtech.api.enums.GT_Values.V; + import gregtech.api.enums.SubTag; import gregtech.api.interfaces.IItemBehaviour; import gregtech.api.util.GT_LanguageManager; @@ -10,6 +13,9 @@ import ic2.api.item.ElectricItem; import ic2.api.item.IElectricItem; import ic2.api.item.IElectricItemManager; import ic2.api.item.ISpecialElectricItem; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ConcurrentHashMap; import net.minecraft.dispenser.IBlockSource; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -24,16 +30,11 @@ import net.minecraft.world.World; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidContainerItem; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.ConcurrentHashMap; - -import static gregtech.api.enums.GT_Values.D1; -import static gregtech.api.enums.GT_Values.V; - -public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpecialElectricItem, IElectricItemManager, IFluidContainerItem { +public abstract class GT_MetaBase_Item extends GT_Generic_Item + implements ISpecialElectricItem, IElectricItemManager, IFluidContainerItem { /* ---------- CONSTRUCTOR AND MEMBER VARIABLES ---------- */ - private final ConcurrentHashMap<Short, ArrayList<IItemBehaviour<GT_MetaBase_Item>>> mItemBehaviors = new ConcurrentHashMap<Short, ArrayList<IItemBehaviour<GT_MetaBase_Item>>>(); + private final ConcurrentHashMap<Short, ArrayList<IItemBehaviour<GT_MetaBase_Item>>> mItemBehaviors = + new ConcurrentHashMap<Short, ArrayList<IItemBehaviour<GT_MetaBase_Item>>>(); /** * Creates the Item using these Parameters. @@ -57,7 +58,8 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci */ public final GT_MetaBase_Item addItemBehavior(int aMetaValue, IItemBehaviour<GT_MetaBase_Item> aBehavior) { if (aMetaValue < 0 || aMetaValue >= 32766 || aBehavior == null) return this; - ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.computeIfAbsent((short) aMetaValue, k -> new ArrayList<>(1)); + ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = + mItemBehaviors.computeIfAbsent((short) aMetaValue, k -> new ArrayList<>(1)); tList.add(aBehavior); return this; } @@ -69,44 +71,51 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci @Override public boolean hasProjectile(SubTag aProjectileType, ItemStack aStack) { ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short) getDamage(aStack)); - if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) - if (tBehavior.hasProjectile(this, aProjectileType, aStack)) return true; + if (tList != null) + for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) + if (tBehavior.hasProjectile(this, aProjectileType, aStack)) return true; return super.hasProjectile(aProjectileType, aStack); } @Override - public EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ) { + public EntityArrow getProjectile( + SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ) { ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short) getDamage(aStack)); - if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) { - EntityArrow rArrow = tBehavior.getProjectile(this, aProjectileType, aStack, aWorld, aX, aY, aZ); - if (rArrow != null) return rArrow; - } + if (tList != null) + for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) { + EntityArrow rArrow = tBehavior.getProjectile(this, aProjectileType, aStack, aWorld, aX, aY, aZ); + if (rArrow != null) return rArrow; + } return super.getProjectile(aProjectileType, aStack, aWorld, aX, aY, aZ); } @Override - public EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed) { + public EntityArrow getProjectile( + SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed) { ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short) getDamage(aStack)); - if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) { - EntityArrow rArrow = tBehavior.getProjectile(this, aProjectileType, aStack, aWorld, aEntity, aSpeed); - if (rArrow != null) return rArrow; - } + if (tList != null) + for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) { + EntityArrow rArrow = tBehavior.getProjectile(this, aProjectileType, aStack, aWorld, aEntity, aSpeed); + if (rArrow != null) return rArrow; + } return super.getProjectile(aProjectileType, aStack, aWorld, aEntity, aSpeed); } @Override public ItemStack onDispense(IBlockSource aSource, ItemStack aStack) { ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short) getDamage(aStack)); - if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) - if (tBehavior.canDispense(this, aSource, aStack)) return tBehavior.onDispense(this, aSource, aStack); + if (tList != null) + for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) + if (tBehavior.canDispense(this, aSource, aStack)) return tBehavior.onDispense(this, aSource, aStack); return super.onDispense(aSource, aStack); } @Override public boolean isItemStackUsable(ItemStack aStack) { ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short) getDamage(aStack)); - if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) - if (!tBehavior.isItemStackUsable(this, aStack)) return false; + if (tList != null) + for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) + if (!tBehavior.isItemStackUsable(this, aStack)) return false; return super.isItemStackUsable(aStack); } @@ -115,11 +124,13 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci use(aStack, 0, aPlayer); isItemStackUsable(aStack); ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short) getDamage(aStack)); - try { if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) - if (tBehavior.onLeftClickEntity(this, aStack, aPlayer, aEntity)) { - if (aStack.stackSize <= 0) aPlayer.destroyCurrentEquippedItem(); - return true; - } + try { + if (tList != null) + for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) + if (tBehavior.onLeftClickEntity(this, aStack, aPlayer, aEntity)) { + if (aStack.stackSize <= 0) aPlayer.destroyCurrentEquippedItem(); + return true; + } if (aStack.stackSize <= 0) { aPlayer.destroyCurrentEquippedItem(); return false; @@ -131,15 +142,27 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci } @Override - public boolean onItemUse(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUse( + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { use(aStack, 0, aPlayer); isItemStackUsable(aStack); ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short) getDamage(aStack)); - try { if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) - if (tBehavior.onItemUse(this, aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ)) { - if (aStack.stackSize <= 0) aPlayer.destroyCurrentEquippedItem(); - return true; - } + try { + if (tList != null) + for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) + if (tBehavior.onItemUse(this, aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ)) { + if (aStack.stackSize <= 0) aPlayer.destroyCurrentEquippedItem(); + return true; + } if (aStack.stackSize <= 0) { aPlayer.destroyCurrentEquippedItem(); return false; @@ -151,15 +174,27 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci } @Override - public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUseFirst( + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { use(aStack, 0, aPlayer); isItemStackUsable(aStack); ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short) getDamage(aStack)); - try { if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) - if (tBehavior.onItemUseFirst(this, aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ)) { - if (aStack.stackSize <= 0) aPlayer.destroyCurrentEquippedItem(); - return true; - } + try { + if (tList != null) + for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) + if (tBehavior.onItemUseFirst(this, aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ)) { + if (aStack.stackSize <= 0) aPlayer.destroyCurrentEquippedItem(); + return true; + } if (aStack.stackSize <= 0) { aPlayer.destroyCurrentEquippedItem(); return false; @@ -175,8 +210,10 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci use(aStack, 0, aPlayer); isItemStackUsable(aStack); ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short) getDamage(aStack)); - try { if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) - aStack = tBehavior.onItemRightClick(this, aStack, aWorld, aPlayer); + try { + if (tList != null) + for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) + aStack = tBehavior.onItemRightClick(this, aStack, aWorld, aPlayer); } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); } @@ -190,17 +227,34 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci for (String tString : tStrings) if (GT_Utility.isStringValid(tString) && !tKey.equals(tString)) aList.add(tString); - Long[] - tStats = getElectricStats(aStack); + Long[] tStats = getElectricStats(aStack); if (tStats != null) { if (tStats[3] > 0) { - aList.add(EnumChatFormatting.AQUA + String.format(transItem("009", "Contains %s EU Tier: %s"), GT_Utility.formatNumbers(tStats[3]), "" + (tStats[2] >= 0 ? tStats[2] : 0)) + EnumChatFormatting.GRAY); + aList.add(EnumChatFormatting.AQUA + + String.format( + transItem("009", "Contains %s EU Tier: %s"), + GT_Utility.formatNumbers(tStats[3]), + "" + (tStats[2] >= 0 ? tStats[2] : 0)) + + EnumChatFormatting.GRAY); } else { long tCharge = getRealCharge(aStack); if (tStats[3] == -2 && tCharge <= 0) { - aList.add(EnumChatFormatting.AQUA + transItem("010", "Empty. You should recycle it properly.") + EnumChatFormatting.GRAY); + aList.add(EnumChatFormatting.AQUA + + transItem("010", "Empty. You should recycle it properly.") + + EnumChatFormatting.GRAY); } else { - aList.add(String.valueOf(EnumChatFormatting.AQUA) + String.format(transItem("011", "%s / %s EU - Voltage: %s"), GT_Utility.formatNumbers(tCharge), GT_Utility.formatNumbers(Math.abs(tStats[0])), "" + V[(int) (tStats[2] >= 0 ? tStats[2] < V.length ? tStats[2] : V.length - 1 : 1)]) + EnumChatFormatting.GRAY); + aList.add(String.valueOf(EnumChatFormatting.AQUA) + + String.format( + transItem("011", "%s / %s EU - Voltage: %s"), + GT_Utility.formatNumbers(tCharge), + GT_Utility.formatNumbers(Math.abs(tStats[0])), + "" + + V[ + (int) + (tStats[2] >= 0 + ? tStats[2] < V.length ? tStats[2] : V.length - 1 + : 1)]) + + EnumChatFormatting.GRAY); } } } @@ -208,13 +262,21 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci tStats = getFluidContainerStats(aStack); if (tStats != null && tStats[0] > 0) { FluidStack tFluid = getFluidContent(aStack); - aList.add(EnumChatFormatting.BLUE + ((tFluid == null ? transItem("012", "No Fluids Contained") : GT_Utility.getFluidName(tFluid, true))) + EnumChatFormatting.GRAY); - aList.add(EnumChatFormatting.BLUE + String.format(transItem("013", "%sL / %sL"), "" + (tFluid == null ? 0 : tFluid.amount), "" + tStats[0]) + EnumChatFormatting.GRAY); + aList.add(EnumChatFormatting.BLUE + + ((tFluid == null + ? transItem("012", "No Fluids Contained") + : GT_Utility.getFluidName(tFluid, true))) + + EnumChatFormatting.GRAY); + aList.add(EnumChatFormatting.BLUE + + String.format( + transItem("013", "%sL / %sL"), "" + (tFluid == null ? 0 : tFluid.amount), "" + tStats[0]) + + EnumChatFormatting.GRAY); } ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short) getDamage(aStack)); - if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) - aList = tBehavior.getAdditionalToolTips(this, aList, aStack); + if (tList != null) + for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) + aList = tBehavior.getAdditionalToolTips(this, aList, aStack); addAdditionalToolTips(aList, aStack, aPlayer); } @@ -222,8 +284,9 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci @Override public void onUpdate(ItemStack aStack, World aWorld, Entity aPlayer, int aTimer, boolean aIsInHand) { ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short) getDamage(aStack)); - if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) - tBehavior.onUpdate(this, aStack, aWorld, aPlayer, aTimer, aIsInHand); + if (tList != null) + for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) + tBehavior.onUpdate(this, aStack, aWorld, aPlayer, aTimer, aIsInHand); } @Override @@ -248,20 +311,37 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci } @Override - public final double charge(ItemStack aStack, double aCharge, int aTier, boolean aIgnoreTransferLimit, boolean aSimulate) { + public final double charge( + ItemStack aStack, double aCharge, int aTier, boolean aIgnoreTransferLimit, boolean aSimulate) { Long[] tStats = getElectricStats(aStack); - if (tStats == null || tStats[2] > aTier || !(tStats[3] == -1 || tStats[3] == -3 || (tStats[3] < 0 && aCharge == Integer.MAX_VALUE)) || aStack.stackSize != 1) - return 0; - //REALLY?? THIS IS THE CULPRIT THAT CHARGES ITEMS AT INSTANT!!! - //long tChargeBefore = getRealCharge(aStack), tNewCharge = aCharge == Integer.MAX_VALUE ? Long.MAX_VALUE : Math.min(Math.abs(tStats[0]), tChargeBefore + (aIgnoreTransferLimit ? (long) aCharge : Math.min(tStats[1], (long) aCharge))); + if (tStats == null + || tStats[2] > aTier + || !(tStats[3] == -1 || tStats[3] == -3 || (tStats[3] < 0 && aCharge == Integer.MAX_VALUE)) + || aStack.stackSize != 1) return 0; + // REALLY?? THIS IS THE CULPRIT THAT CHARGES ITEMS AT INSTANT!!! + // long tChargeBefore = getRealCharge(aStack), tNewCharge = aCharge == Integer.MAX_VALUE ? Long.MAX_VALUE : + // Math.min(Math.abs(tStats[0]), tChargeBefore + (aIgnoreTransferLimit ? (long) aCharge : Math.min(tStats[1], + // (long) aCharge))); long tTransfer = aIgnoreTransferLimit ? (long) aCharge : Math.min(tStats[1], (long) aCharge); - long tChargeBefore = getRealCharge(aStack), tNewCharge = Math.min(Math.abs(tStats[0]), Long.MAX_VALUE - tTransfer >= tChargeBefore ? tChargeBefore + tTransfer : Long.MAX_VALUE); + long tChargeBefore = getRealCharge(aStack), + tNewCharge = + Math.min( + Math.abs(tStats[0]), + Long.MAX_VALUE - tTransfer >= tChargeBefore + ? tChargeBefore + tTransfer + : Long.MAX_VALUE); if (!aSimulate) setCharge(aStack, tNewCharge); return tNewCharge - tChargeBefore; } @Override - public final double discharge(ItemStack aStack, double aCharge, int aTier, boolean aIgnoreTransferLimit, boolean aBatteryAlike, boolean aSimulate) { + public final double discharge( + ItemStack aStack, + double aCharge, + int aTier, + boolean aIgnoreTransferLimit, + boolean aBatteryAlike, + boolean aSimulate) { Long[] tStats = getElectricStats(aStack); if (tStats == null || tStats[2] > aTier) return 0; if (aBatteryAlike && !canProvideEnergy(aStack)) return 0; @@ -270,7 +350,14 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci if (!aSimulate) aStack.stackSize--; return tStats[3]; } - long tChargeBefore = getRealCharge(aStack), tNewCharge = Math.max(0, tChargeBefore - (aIgnoreTransferLimit ? (long) aCharge : Math.min(tStats[1], (long) aCharge))); + long tChargeBefore = getRealCharge(aStack), + tNewCharge = + Math.max( + 0, + tChargeBefore + - (aIgnoreTransferLimit + ? (long) aCharge + : Math.min(tStats[1], (long) aCharge))); if (!aSimulate) setCharge(aStack, tNewCharge); return tChargeBefore - tNewCharge; } @@ -308,7 +395,13 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci if (GT_ModHandler.isElectricItem(tArmor)) { IElectricItem tArmorItem = (IElectricItem) tArmor.getItem(); if (tArmorItem.canProvideEnergy(tArmor) && tArmorItem.getTier(tArmor) >= getTier(aStack)) { - double tCharge = ElectricItem.manager.discharge(tArmor, charge(aStack, Integer.MAX_VALUE - 1, Integer.MAX_VALUE, true, true), Integer.MAX_VALUE, true, true, false); + double tCharge = ElectricItem.manager.discharge( + tArmor, + charge(aStack, Integer.MAX_VALUE - 1, Integer.MAX_VALUE, true, true), + Integer.MAX_VALUE, + true, + true, + false); if (tCharge > 0) { charge(aStack, tCharge, Integer.MAX_VALUE, true, false); if (aPlayer instanceof EntityPlayer) { @@ -464,8 +557,11 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci } Long[] tStats = getFluidContainerStats(aStack); - if (tStats == null || tStats[0] <= 0 || aFluid == null || aFluid.getFluid().getID() <= 0 || aFluid.amount <= 0) - return 0; + if (tStats == null + || tStats[0] <= 0 + || aFluid == null + || aFluid.getFluid().getID() <= 0 + || aFluid.amount <= 0) return 0; FluidStack tFluid = getFluidContent(aStack); @@ -509,10 +605,10 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci if (tFluid != null && maxDrain >= tFluid.amount) { ItemStack tStack = GT_Utility.getContainerItem(aStack, false); if (tStack == null) { - if(doDrain) aStack.stackSize = 0; + if (doDrain) aStack.stackSize = 0; return tFluid; } - if(doDrain) { + if (doDrain) { aStack.setItemDamage(tStack.getItemDamage()); aStack.func_150996_a(tStack.getItem()); } @@ -558,10 +654,11 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci @Override public int getItemStackLimit(ItemStack aStack) { Long[] tStats = getElectricStats(aStack); - if (tStats != null && (tStats[3] == -1 || tStats[3] == -2 || tStats[3] == -3) && getRealCharge(aStack) > 0) return 1; + if (tStats != null && (tStats[3] == -1 || tStats[3] == -2 || tStats[3] == -3) && getRealCharge(aStack) > 0) + return 1; tStats = getFluidContainerStats(aStack); if (tStats != null) return (int) (long) tStats[1]; - if(getDamage(aStack)==32763)return 1; + if (getDamage(aStack) == 32763) return 1; return 64; } diff --git a/src/main/java/gregtech/api/items/GT_MetaGenerated_Item.java b/src/main/java/gregtech/api/items/GT_MetaGenerated_Item.java index 2743f35e3b..bf472101de 100644 --- a/src/main/java/gregtech/api/items/GT_MetaGenerated_Item.java +++ b/src/main/java/gregtech/api/items/GT_MetaGenerated_Item.java @@ -1,5 +1,7 @@ package gregtech.api.items; +import static gregtech.api.enums.GT_Values.*; + import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Optional; import cpw.mods.fml.relauncher.Side; @@ -19,6 +21,11 @@ import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.common.render.items.GT_GeneratedMaterial_Renderer; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.BitSet; +import java.util.List; +import java.util.concurrent.ConcurrentHashMap; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; @@ -31,14 +38,6 @@ import net.minecraft.world.World; import squeek.applecore.api.food.FoodValues; import squeek.applecore.api.food.IEdible; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.BitSet; -import java.util.List; -import java.util.concurrent.ConcurrentHashMap; - -import static gregtech.api.enums.GT_Values.*; - /** * @author Gregorius Techneticies * <p/> @@ -59,9 +58,10 @@ public abstract class GT_MetaGenerated_Item extends GT_MetaBase_Item implements * <p/> * You can also use the unlocalized Name gotten from getUnlocalizedName() as Key if you want to get a specific Item. */ - public static final ConcurrentHashMap<String, GT_MetaGenerated_Item> sInstances = new ConcurrentHashMap<String, GT_MetaGenerated_Item>(); + public static final ConcurrentHashMap<String, GT_MetaGenerated_Item> sInstances = + new ConcurrentHashMap<String, GT_MetaGenerated_Item>(); - /* ---------- CONSTRUCTOR AND MEMBER VARIABLES ---------- */ + /* ---------- CONSTRUCTOR AND MEMBER VARIABLES ---------- */ public final short mOffset, mItemAmount; public final BitSet mEnabledItems; @@ -132,7 +132,15 @@ public abstract class GT_MetaGenerated_Item extends GT_MetaBase_Item implements if (((IFoodStat) tRandomData).getFoodAction(this, rStack) == EnumAction.eat) { int tFoodValue = ((IFoodStat) tRandomData).getFoodLevel(this, rStack, null); if (tFoodValue > 0) - RA.addCannerRecipe(rStack, ItemList.IC2_Food_Can_Empty.get(tFoodValue), ((IFoodStat) tRandomData).isRotten(this, rStack, null) ? ItemList.IC2_Food_Can_Spoiled.get(tFoodValue) : ItemList.IC2_Food_Can_Filled.get(tFoodValue), null, tFoodValue * 100, 1); + RA.addCannerRecipe( + rStack, + ItemList.IC2_Food_Can_Empty.get(tFoodValue), + ((IFoodStat) tRandomData).isRotten(this, rStack, null) + ? ItemList.IC2_Food_Can_Spoiled.get(tFoodValue) + : ItemList.IC2_Food_Can_Filled.get(tFoodValue), + null, + tFoodValue * 100, + 1); } tUseOreDict = false; } @@ -208,13 +216,22 @@ public abstract class GT_MetaGenerated_Item extends GT_MetaBase_Item implements * Use -3 if you want to make this Battery charge/discharge-able. * @return the Item itself for convenience in constructing. */ - public final GT_MetaGenerated_Item setElectricStats(int aMetaValue, long aMaxCharge, long aTransferLimit, long aTier, long aSpecialData, boolean aUseAnimations) { + public final GT_MetaGenerated_Item setElectricStats( + int aMetaValue, + long aMaxCharge, + long aTransferLimit, + long aTier, + long aSpecialData, + boolean aUseAnimations) { if (aMetaValue < 0 || aMetaValue >= mOffset + mEnabledItems.length()) return this; if (aMaxCharge == 0) mElectricStats.remove((short) aMetaValue); else { - mElectricStats.put((short) aMetaValue, new Long[]{aMaxCharge, Math.max(0, aTransferLimit), Math.max(-1, aTier), aSpecialData}); + mElectricStats.put( + (short) aMetaValue, + new Long[] {aMaxCharge, Math.max(0, aTransferLimit), Math.max(-1, aTier), aSpecialData}); if (aMetaValue >= mOffset && aUseAnimations) - mIconList[aMetaValue - mOffset] = Arrays.copyOf(mIconList[aMetaValue - mOffset], Math.max(9, mIconList[aMetaValue - mOffset].length)); + mIconList[aMetaValue - mOffset] = Arrays.copyOf( + mIconList[aMetaValue - mOffset], Math.max(9, mIconList[aMetaValue - mOffset].length)); } return this; } @@ -229,7 +246,7 @@ public abstract class GT_MetaGenerated_Item extends GT_MetaBase_Item implements public final GT_MetaGenerated_Item setFluidContainerStats(int aMetaValue, long aCapacity, long aStacksize) { if (aMetaValue < 0 || aMetaValue >= mOffset + mEnabledItems.length()) return this; if (aCapacity < 0) mElectricStats.remove((short) aMetaValue); - else mFluidContainerStats.put((short) aMetaValue, new Long[]{aCapacity, Math.max(1, aStacksize)}); + else mFluidContainerStats.put((short) aMetaValue, new Long[] {aCapacity, Math.max(1, aStacksize)}); return this; } @@ -261,7 +278,7 @@ public abstract class GT_MetaGenerated_Item extends GT_MetaBase_Item implements return null; } - /* ---------- INTERNAL OVERRIDES ---------- */ + /* ---------- INTERNAL OVERRIDES ---------- */ @Override public ItemStack onItemRightClick(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { @@ -287,9 +304,15 @@ public abstract class GT_MetaGenerated_Item extends GT_MetaBase_Item implements IFoodStat tStat = mFoodStats.get((short) getDamage(aStack)); if (tStat != null) { if (Loader.isModLoaded(MOD_ID_APC)) { - aPlayer.getFoodStats().func_151686_a((ItemFood) GT_Utility.callConstructor("squeek.applecore.api.food.ItemFoodProxy.ItemFoodProxy", 0, null, true, this), aStack); + aPlayer.getFoodStats() + .func_151686_a( + (ItemFood) GT_Utility.callConstructor( + "squeek.applecore.api.food.ItemFoodProxy.ItemFoodProxy", 0, null, true, this), + aStack); } else { - aPlayer.getFoodStats().addStats(tStat.getFoodLevel(this, aStack, aPlayer), tStat.getSaturation(this, aStack, aPlayer)); + aPlayer.getFoodStats() + .addStats( + tStat.getFoodLevel(this, aStack, aPlayer), tStat.getSaturation(this, aStack, aPlayer)); } tStat.onEaten(this, aStack, aPlayer); } @@ -300,7 +323,9 @@ public abstract class GT_MetaGenerated_Item extends GT_MetaBase_Item implements @Optional.Method(modid = MOD_ID_APC) public FoodValues getFoodValues(ItemStack aStack) { IFoodStat tStat = mFoodStats.get((short) getDamage(aStack)); - return tStat == null ? null : new FoodValues(tStat.getFoodLevel(this, aStack, null), tStat.getSaturation(this, aStack, null)); + return tStat == null + ? null + : new FoodValues(tStat.getFoodLevel(this, aStack, null), tStat.getSaturation(this, aStack, null)); } @Override @@ -331,9 +356,11 @@ public abstract class GT_MetaGenerated_Item extends GT_MetaBase_Item implements for (short i = 0; i < j; i++) if (mEnabledItems.get(i)) { for (byte k = 1; k < mIconList[i].length; k++) { - mIconList[i][k] = aIconRegister.registerIcon(RES_PATH_ITEM + (GT_Config.troll ? "troll" : getUnlocalizedName() + "/" + i + "/" + k)); + mIconList[i][k] = aIconRegister.registerIcon( + RES_PATH_ITEM + (GT_Config.troll ? "troll" : getUnlocalizedName() + "/" + i + "/" + k)); } - mIconList[i][0] = aIconRegister.registerIcon(RES_PATH_ITEM + (GT_Config.troll ? "troll" : getUnlocalizedName() + "/" + i)); + mIconList[i][0] = aIconRegister.registerIcon( + RES_PATH_ITEM + (GT_Config.troll ? "troll" : getUnlocalizedName() + "/" + i)); } } diff --git a/src/main/java/gregtech/api/items/GT_MetaGenerated_Item_X01.java b/src/main/java/gregtech/api/items/GT_MetaGenerated_Item_X01.java index f04b4a3345..62aae22e24 100644 --- a/src/main/java/gregtech/api/items/GT_MetaGenerated_Item_X01.java +++ b/src/main/java/gregtech/api/items/GT_MetaGenerated_Item_X01.java @@ -1,5 +1,7 @@ package gregtech.api.items; +import static gregtech.api.enums.GT_Values.M; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTech_API; @@ -9,15 +11,12 @@ import gregtech.api.interfaces.IIconContainer; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; +import java.util.List; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; -import java.util.List; - -import static gregtech.api.enums.GT_Values.M; - /** * @author Gregorius Techneticies * <p/> @@ -45,7 +44,9 @@ public abstract class GT_MetaGenerated_Item_X01 extends GT_MetaGenerated_Item { public GT_MetaGenerated_Item_X01(String aUnlocalized, OrePrefixes aGeneratedPrefix, int aIconSetIndex) { super(aUnlocalized, (short) 32000, (short) 766); mPrefix = aGeneratedPrefix; - mIconSetIndex = aIconSetIndex >= 0 ? aIconSetIndex : aGeneratedPrefix.mTextureIndex >= 0 ? aGeneratedPrefix.mTextureIndex : 0; + mIconSetIndex = aIconSetIndex >= 0 + ? aIconSetIndex + : aGeneratedPrefix.mTextureIndex >= 0 ? aGeneratedPrefix.mTextureIndex : 0; for (int i = 0; i < GregTech_API.sGeneratedMaterials.length; i++) { OrePrefixes tPrefix = mPrefix; @@ -54,8 +55,13 @@ public abstract class GT_MetaGenerated_Item_X01 extends GT_MetaGenerated_Item { if (tMaterial == null) continue; if (mPrefix.doGenerateItem(tMaterial)) { ItemStack tStack = new ItemStack(this, 1, i); - GT_LanguageManager.addStringLocalization(getUnlocalizedName(tStack) + ".name", GT_LanguageManager.i18nPlaceholder ? getDefaultLocalizationFormat(tPrefix, tMaterial, i) : getDefaultLocalization(tPrefix, tMaterial, i)); - GT_LanguageManager.addStringLocalization(getUnlocalizedName(tStack) + ".tooltip", tMaterial.getToolTip(tPrefix.mMaterialAmount / M)); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName(tStack) + ".name", + GT_LanguageManager.i18nPlaceholder + ? getDefaultLocalizationFormat(tPrefix, tMaterial, i) + : getDefaultLocalization(tPrefix, tMaterial, i)); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName(tStack) + ".tooltip", tMaterial.getToolTip(tPrefix.mMaterialAmount / M)); String tOreName = getOreDictString(tPrefix, tMaterial); tPrefix = OrePrefixes.getOrePrefix(tOreName); if (tPrefix != null && tPrefix.mIsUnificatable) { @@ -67,7 +73,7 @@ public abstract class GT_MetaGenerated_Item_X01 extends GT_MetaGenerated_Item { } } - /* ---------- OVERRIDEABLE FUNCTIONS ---------- */ + /* ---------- OVERRIDEABLE FUNCTIONS ---------- */ /** * @param aPrefix the OreDict Prefix @@ -110,15 +116,14 @@ public abstract class GT_MetaGenerated_Item_X01 extends GT_MetaGenerated_Item { return aMaterial.mIconSet.mTextures[mIconSetIndex]; } - /* ---------- INTERNAL OVERRIDES ---------- */ + /* ---------- INTERNAL OVERRIDES ---------- */ @Override public String getItemStackDisplayName(ItemStack aStack) { - String aName = super.getItemStackDisplayName(aStack); - int aDamage = aStack.getItemDamage(); - if (aDamage < 32000 && aDamage >= 0) - return Materials.getLocalizedNameForItem(aName, aDamage % 1000); - return aName; + String aName = super.getItemStackDisplayName(aStack); + int aDamage = aStack.getItemDamage(); + if (aDamage < 32000 && aDamage >= 0) return Materials.getLocalizedNameForItem(aName, aDamage % 1000); + return aName; } @Override @@ -136,19 +141,27 @@ public abstract class GT_MetaGenerated_Item_X01 extends GT_MetaGenerated_Item { @Override public short[] getRGBa(ItemStack aStack) { int aMetaData = getDamage(aStack); - return aMetaData < GregTech_API.sGeneratedMaterials.length && GregTech_API.sGeneratedMaterials[aMetaData] != null ? GregTech_API.sGeneratedMaterials[aMetaData].mRGBa : Materials._NULL.mRGBa; + return aMetaData < GregTech_API.sGeneratedMaterials.length + && GregTech_API.sGeneratedMaterials[aMetaData] != null + ? GregTech_API.sGeneratedMaterials[aMetaData].mRGBa + : Materials._NULL.mRGBa; } @Override public final IIconContainer getIconContainer(int aMetaData) { - return aMetaData < GregTech_API.sGeneratedMaterials.length && GregTech_API.sGeneratedMaterials[aMetaData] != null ? getIconContainer(aMetaData, GregTech_API.sGeneratedMaterials[aMetaData]) : null; + return aMetaData < GregTech_API.sGeneratedMaterials.length + && GregTech_API.sGeneratedMaterials[aMetaData] != null + ? getIconContainer(aMetaData, GregTech_API.sGeneratedMaterials[aMetaData]) + : null; } @Override @SideOnly(Side.CLIENT) public final void getSubItems(Item aItem, CreativeTabs aCreativeTab, List aList) { for (int i = 0; i < GregTech_API.sGeneratedMaterials.length; i++) - if (mPrefix.doGenerateItem(GregTech_API.sGeneratedMaterials[i]) && doesShowInCreative(mPrefix, GregTech_API.sGeneratedMaterials[i], GregTech_API.sDoShowAllItemsInCreative)) { + if (mPrefix.doGenerateItem(GregTech_API.sGeneratedMaterials[i]) + && doesShowInCreative( + mPrefix, GregTech_API.sGeneratedMaterials[i], GregTech_API.sDoShowAllItemsInCreative)) { ItemStack tStack = new ItemStack(this, 1, i); isItemStackUsable(tStack); aList.add(tStack); @@ -166,12 +179,16 @@ public abstract class GT_MetaGenerated_Item_X01 extends GT_MetaGenerated_Item { if (tIcon != null) return tIcon.getIcon(); return null; } - return aMetaData >= mOffset && aMetaData - mOffset < mIconList.length ? mIconList[aMetaData - mOffset][0] : null; + return aMetaData >= mOffset && aMetaData - mOffset < mIconList.length + ? mIconList[aMetaData - mOffset][0] + : null; } @Override public int getItemStackLimit(ItemStack aStack) { - return getDamage(aStack) < mOffset ? Math.min(super.getItemStackLimit(aStack), mPrefix.mDefaultStackSize) : super.getItemStackLimit(aStack); + return getDamage(aStack) < mOffset + ? Math.min(super.getItemStackLimit(aStack), mPrefix.mDefaultStackSize) + : super.getItemStackLimit(aStack); } @Override diff --git a/src/main/java/gregtech/api/items/GT_MetaGenerated_Item_X32.java b/src/main/java/gregtech/api/items/GT_MetaGenerated_Item_X32.java index 645764defb..c0f7b6b3c9 100644 --- a/src/main/java/gregtech/api/items/GT_MetaGenerated_Item_X32.java +++ b/src/main/java/gregtech/api/items/GT_MetaGenerated_Item_X32.java @@ -1,5 +1,7 @@ package gregtech.api.items; +import static gregtech.api.enums.GT_Values.M; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTech_API; @@ -11,16 +13,13 @@ import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.common.render.items.GT_GeneratedMaterial_Renderer; +import java.util.Arrays; +import java.util.List; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; -import java.util.Arrays; -import java.util.List; - -import static gregtech.api.enums.GT_Values.M; - /** * @author Gregorius Techneticies * <p/> @@ -54,14 +53,22 @@ public abstract class GT_MetaGenerated_Item_X32 extends GT_MetaGenerated_Item { if (tMaterial == null) continue; if (doesMaterialAllowGeneration(tPrefix, tMaterial)) { ItemStack tStack = new ItemStack(this, 1, i); - GT_LanguageManager.addStringLocalization(getUnlocalizedName(tStack) + ".name", GT_LanguageManager.i18nPlaceholder ? getDefaultLocalizationFormat(tPrefix, tMaterial, i) : getDefaultLocalization(tPrefix, tMaterial, i)); - GT_LanguageManager.addStringLocalization(getUnlocalizedName(tStack) + ".tooltip", tMaterial.getToolTip(tPrefix.mMaterialAmount / M)); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName(tStack) + ".name", + GT_LanguageManager.i18nPlaceholder + ? getDefaultLocalizationFormat(tPrefix, tMaterial, i) + : getDefaultLocalization(tPrefix, tMaterial, i)); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName(tStack) + ".tooltip", tMaterial.getToolTip(tPrefix.mMaterialAmount / M)); if (tPrefix.mIsUnificatable) { GT_OreDictUnificator.set(tPrefix, tMaterial, tStack); } else { GT_OreDictUnificator.registerOre(tPrefix.get(tMaterial), tStack); } - if ((tPrefix == OrePrefixes.stick || tPrefix == OrePrefixes.wireFine || tPrefix == OrePrefixes.ingot) && (tMaterial == Materials.Lead || tMaterial == Materials.Tin || tMaterial == Materials.SolderingAlloy)) { + if ((tPrefix == OrePrefixes.stick || tPrefix == OrePrefixes.wireFine || tPrefix == OrePrefixes.ingot) + && (tMaterial == Materials.Lead + || tMaterial == Materials.Tin + || tMaterial == Materials.SolderingAlloy)) { GregTech_API.sSolderingMetalList.add(tStack); GT_ModHandler.registerBoxableItemToToolBox(tStack); } @@ -69,7 +76,7 @@ public abstract class GT_MetaGenerated_Item_X32 extends GT_MetaGenerated_Item { } } - /* ---------- OVERRIDEABLE FUNCTIONS ---------- */ + /* ---------- OVERRIDEABLE FUNCTIONS ---------- */ /** * @return the Color Modulation the Material is going to be rendered with. @@ -86,12 +93,13 @@ public abstract class GT_MetaGenerated_Item_X32 extends GT_MetaGenerated_Item { * @return if this Item should be generated and visible. */ public boolean doesMaterialAllowGeneration(OrePrefixes aPrefix, Materials aMaterial) { - // You have to check for at least these Conditions in every Case! So add a super Call like the following for this before executing your Code: + // You have to check for at least these Conditions in every Case! So add a super Call like the following for + // this before executing your Code: // if (!super.doesMaterialAllowGeneration(aPrefix, aMaterial)) return false; return aPrefix != null && aMaterial != null && aPrefix.doGenerateItem(aMaterial); } - /* ---------- OVERRIDEABLE FUNCTIONS ---------- */ + /* ---------- OVERRIDEABLE FUNCTIONS ---------- */ /** * @param aPrefix the OreDict Prefix @@ -119,7 +127,10 @@ public abstract class GT_MetaGenerated_Item_X32 extends GT_MetaGenerated_Item { * @return an Icon Container for the Item Display. */ public final IIconContainer getIconContainer(int aMetaData, Materials aMaterial) { - return mGeneratedPrefixList[aMetaData / 1000] != null && mGeneratedPrefixList[aMetaData / 1000].mTextureIndex >= 0 ? aMaterial.mIconSet.mTextures[mGeneratedPrefixList[aMetaData / 1000].mTextureIndex] : null; + return mGeneratedPrefixList[aMetaData / 1000] != null + && mGeneratedPrefixList[aMetaData / 1000].mTextureIndex >= 0 + ? aMaterial.mIconSet.mTextures[mGeneratedPrefixList[aMetaData / 1000].mTextureIndex] + : null; } /** @@ -132,15 +143,14 @@ public abstract class GT_MetaGenerated_Item_X32 extends GT_MetaGenerated_Item { return true; } - /* ---------- INTERNAL OVERRIDES ---------- */ + /* ---------- INTERNAL OVERRIDES ---------- */ @Override public String getItemStackDisplayName(ItemStack aStack) { - String aName = super.getItemStackDisplayName(aStack); - int aDamage = aStack.getItemDamage(); - if (aDamage < 32000 && aDamage >= 0) - return Materials.getLocalizedNameForItem(aName, aDamage % 1000); - return aName; + String aName = super.getItemStackDisplayName(aStack); + int aDamage = aStack.getItemDamage(); + if (aDamage < 32000 && aDamage >= 0) return Materials.getLocalizedNameForItem(aName, aDamage % 1000); + return aName; } @Override @@ -158,12 +168,16 @@ public abstract class GT_MetaGenerated_Item_X32 extends GT_MetaGenerated_Item { @Override public final IIconContainer getIconContainer(int aMetaData) { - return GregTech_API.sGeneratedMaterials[aMetaData % 1000] == null ? null : getIconContainer(aMetaData, GregTech_API.sGeneratedMaterials[aMetaData % 1000]); + return GregTech_API.sGeneratedMaterials[aMetaData % 1000] == null + ? null + : getIconContainer(aMetaData, GregTech_API.sGeneratedMaterials[aMetaData % 1000]); } @Override public GT_GeneratedMaterial_Renderer getMaterialRenderer(int aMetaData) { - return GregTech_API.sGeneratedMaterials[aMetaData % 1000] == null ? null : GregTech_API.sGeneratedMaterials[aMetaData % 1000].renderer; + return GregTech_API.sGeneratedMaterials[aMetaData % 1000] == null + ? null + : GregTech_API.sGeneratedMaterials[aMetaData % 1000].renderer; } @Override @@ -173,7 +187,8 @@ public abstract class GT_MetaGenerated_Item_X32 extends GT_MetaGenerated_Item { OrePrefixes aPrefix = mGeneratedPrefixList[i / 1000]; Materials aMaterial = GregTech_API.sGeneratedMaterials[i % 1000]; if (aPrefix != null && aMaterial != null) { - if (doesMaterialAllowGeneration(aPrefix, aMaterial) && doesShowInCreative(aPrefix, aMaterial, GregTech_API.sDoShowAllItemsInCreative)) { + if (doesMaterialAllowGeneration(aPrefix, aMaterial) + && doesShowInCreative(aPrefix, aMaterial, GregTech_API.sDoShowAllItemsInCreative)) { ItemStack tStack = new ItemStack(this, 1, i); isItemStackUsable(tStack); aList.add(tStack); diff --git a/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java b/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java index 7d94d73293..a7d31332a8 100644 --- a/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java +++ b/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java @@ -1,5 +1,9 @@ package gregtech.api.items; +import static gregtech.api.enums.GT_Values.MOD_ID_FR; +import static gregtech.api.enums.GT_Values.MOD_ID_RC; +import static gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeTurbine_Steam.calculateLooseFlow; + import buildcraft.api.tools.IToolWrench; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Optional; @@ -19,6 +23,11 @@ import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.common.tools.GT_Tool_Turbine; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map.Entry; +import java.util.concurrent.ConcurrentHashMap; import mods.railcraft.api.core.items.IToolCrowbar; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; @@ -46,31 +55,29 @@ import net.minecraftforge.common.IShearable; import net.minecraftforge.event.entity.player.PlayerEvent; import net.minecraftforge.event.world.BlockEvent; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map.Entry; -import java.util.concurrent.ConcurrentHashMap; - -import static gregtech.api.enums.GT_Values.MOD_ID_FR; -import static gregtech.api.enums.GT_Values.MOD_ID_RC; -import static gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeTurbine_Steam.calculateLooseFlow; - /** * This is an example on how you can create a Tool ItemStack, in this case a Bismuth Wrench: * GT_MetaGenerated_Tool.sInstances.get("gt.metatool.01").getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH, 1, Materials.Bismuth, Materials.Bismuth, null); */ -@Optional.InterfaceList(value = {@Optional.Interface(iface = "forestry.api.arboriculture.IToolGrafter", modid = MOD_ID_FR), @Optional.Interface(iface = "mods.railcraft.api.core.items.IToolCrowbar", modid = MOD_ID_RC), @Optional.Interface(iface = "buildcraft.api.tools.IToolWrench", modid = "BuildCraft"), @Optional.Interface(iface = "crazypants.enderio.api.tool.ITool", modid = "EnderIO")}) -public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item implements IDamagableItem, IToolGrafter, IToolCrowbar, IToolWrench, ITool { +@Optional.InterfaceList( + value = { + @Optional.Interface(iface = "forestry.api.arboriculture.IToolGrafter", modid = MOD_ID_FR), + @Optional.Interface(iface = "mods.railcraft.api.core.items.IToolCrowbar", modid = MOD_ID_RC), + @Optional.Interface(iface = "buildcraft.api.tools.IToolWrench", modid = "BuildCraft"), + @Optional.Interface(iface = "crazypants.enderio.api.tool.ITool", modid = "EnderIO") + }) +public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item + implements IDamagableItem, IToolGrafter, IToolCrowbar, IToolWrench, ITool { /** * All instances of this Item Class are listed here. * This gets used to register the Renderer to all Items of this Type, if useStandardMetaItemRenderer() returns true. * <p/> * You can also use the unlocalized Name gotten from getUnlocalizedName() as Key if you want to get a specific Item. */ - public static final ConcurrentHashMap<String, GT_MetaGenerated_Tool> sInstances = new ConcurrentHashMap<String, GT_MetaGenerated_Tool>(); + public static final ConcurrentHashMap<String, GT_MetaGenerated_Tool> sInstances = + new ConcurrentHashMap<String, GT_MetaGenerated_Tool>(); - /* ---------- CONSTRUCTOR AND MEMBER VARIABLES ---------- */ + /* ---------- CONSTRUCTOR AND MEMBER VARIABLES ---------- */ public final ConcurrentHashMap<Short, IToolStats> mToolStats = new ConcurrentHashMap<Short, IToolStats>(); @@ -86,7 +93,7 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item implements sInstances.put(getUnlocalizedName(), this); } - /* ---------- FOR ADDING CUSTOM ITEMS INTO THE REMAINING 766 RANGE ---------- */ + /* ---------- FOR ADDING CUSTOM ITEMS INTO THE REMAINING 766 RANGE ---------- */ public static final Materials getPrimaryMaterial(ItemStack aStack) { NBTTagCompound aNBT = aStack.getTagCompound(); @@ -106,7 +113,7 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item implements return Materials._NULL; } - /* ---------- INTERNAL OVERRIDES ---------- */ + /* ---------- INTERNAL OVERRIDES ---------- */ public static final long getToolMaxDamage(ItemStack aStack) { NBTTagCompound aNBT = aStack.getTagCompound(); @@ -148,13 +155,16 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item implements * @param aOreDictNamesAndAspects The OreDict Names you want to give the Item. Also used to assign Thaumcraft Aspects. * @return An ItemStack containing the newly created Item, but without specific Stats. */ - public final ItemStack addTool(int aID, String aEnglish, String aToolTip, IToolStats aToolStats, Object... aOreDictNamesAndAspects) { + public final ItemStack addTool( + int aID, String aEnglish, String aToolTip, IToolStats aToolStats, Object... aOreDictNamesAndAspects) { if (aToolTip == null) aToolTip = ""; if (aID >= 0 && aID < 32766 && aID % 2 == 0) { GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + aID + ".name", aEnglish); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + aID + ".tooltip", aToolTip); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (aID + 1) + ".name", aEnglish + " (Empty)"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (aID + 1) + ".tooltip", "You need to recharge it"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + "." + (aID + 1) + ".name", aEnglish + " (Empty)"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + "." + (aID + 1) + ".tooltip", "You need to recharge it"); mToolStats.put((short) aID, aToolStats); mToolStats.put((short) (aID + 1), aToolStats); aToolStats.onStatsAddedToTool(this, aID); @@ -163,8 +173,7 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item implements for (Object tOreDictNameOrAspect : aOreDictNamesAndAspects) { if (tOreDictNameOrAspect instanceof TC_AspectStack) ((TC_AspectStack) tOreDictNameOrAspect).addToAspectList(tAspects); - else - GT_OreDictUnificator.registerOre(tOreDictNameOrAspect, rStack); + else GT_OreDictUnificator.registerOre(tOreDictNameOrAspect, rStack); } if (GregTech_API.sThaumcraftCompat != null) GregTech_API.sThaumcraftCompat.registerThaumcraftAspectsToItem(rStack, tAspects, false); @@ -183,14 +192,17 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item implements * @param aSecondaryMaterial Secondary (Rod/Handle) Material of this Tool * @param aElectricArray The Electric Stats of this Tool (or null if not electric) */ - public final ItemStack getToolWithStats(int aToolID, int aAmount, Materials aPrimaryMaterial, Materials aSecondaryMaterial, long[] aElectricArray) { + public final ItemStack getToolWithStats( + int aToolID, int aAmount, Materials aPrimaryMaterial, Materials aSecondaryMaterial, long[] aElectricArray) { ItemStack rStack = new ItemStack(this, aAmount, aToolID); IToolStats tToolStats = getToolStats(rStack); if (tToolStats != null) { NBTTagCompound tMainNBT = new NBTTagCompound(), tToolNBT = new NBTTagCompound(); if (aPrimaryMaterial != null) { tToolNBT.setString("PrimaryMaterial", aPrimaryMaterial.mName); - tToolNBT.setLong("MaxDamage", 100L * (long) (aPrimaryMaterial.mDurability * tToolStats.getMaxDurabilityMultiplier())); + tToolNBT.setLong( + "MaxDamage", + 100L * (long) (aPrimaryMaterial.mDurability * tToolStats.getMaxDurabilityMultiplier())); } if (aSecondaryMaterial != null) tToolNBT.setString("SecondaryMaterial", aSecondaryMaterial.mName); @@ -213,49 +225,86 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item implements * Called by the Block Harvesting Event within the GT_Proxy */ @Mod.EventHandler - public void onHarvestBlockEvent(ArrayList<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + public void onHarvestBlockEvent( + ArrayList<ItemStack> aDrops, + ItemStack aStack, + EntityPlayer aPlayer, + Block aBlock, + int aX, + int aY, + int aZ, + byte aMetaData, + int aFortune, + boolean aSilkTouch, + BlockEvent.HarvestDropsEvent aEvent) { IToolStats tStats = getToolStats(aStack); if (isItemStackUsable(aStack) && getDigSpeed(aStack, aBlock, aMetaData) > 0.0F) - doDamage(aStack, tStats.convertBlockDrops(aDrops, aStack, aPlayer, aBlock, aX, aY, aZ, aMetaData, aFortune, aSilkTouch, aEvent) * tStats.getToolDamagePerDropConversion()); + doDamage( + aStack, + tStats.convertBlockDrops( + aDrops, + aStack, + aPlayer, + aBlock, + aX, + aY, + aZ, + aMetaData, + aFortune, + aSilkTouch, + aEvent) + * tStats.getToolDamagePerDropConversion()); } @Mod.EventHandler - public float onBlockBreakSpeedEvent(float aDefault, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, PlayerEvent.BreakSpeed aEvent) - { - IToolStats tStats = getToolStats(aStack); - return tStats == null ? aDefault : tStats.getMiningSpeed(aBlock, aMetaData, aDefault, aPlayer, aPlayer.worldObj, aX, aY, aZ); - } - - @Override - public boolean onBlockStartBreak(ItemStack aStack, int aX, int aY, int aZ, EntityPlayer aPlayer) - { - if(aPlayer.worldObj.isRemote){ - return false; - } - IToolStats tStats = getToolStats(aStack); - Block aBlock = aPlayer.worldObj.getBlock(aX, aY, aZ); - if (tStats.isChainsaw()&&(aBlock instanceof IShearable)) - { - IShearable target = (IShearable)aBlock; - if ((target.isShearable(aStack, aPlayer.worldObj, aX, aY, aZ))) - { - ArrayList<ItemStack> drops = target.onSheared(aStack, aPlayer.worldObj, aX, aY, aZ, EnchantmentHelper.getEnchantmentLevel(Enchantment.fortune.effectId, aStack)); - for (ItemStack stack : drops) - { - float f = 0.7F; - double d = itemRand.nextFloat() * f + (1.0F - f) * 0.5D; - double d1 = itemRand.nextFloat() * f + (1.0F - f) * 0.5D; - double d2 = itemRand.nextFloat() * f + (1.0F - f) * 0.5D; - EntityItem entityitem = new EntityItem(aPlayer.worldObj, aX + d, aY + d1, aZ + d2, stack); - entityitem.delayBeforeCanPickup = 10; - aPlayer.worldObj.spawnEntityInWorld(entityitem); - } - aPlayer.addStat(net.minecraft.stats.StatList.mineBlockStatArray[Block.getIdFromBlock(aBlock)], 1); - onBlockDestroyed(aStack, aPlayer.worldObj, aBlock, aX, aY, aZ, aPlayer); + public float onBlockBreakSpeedEvent( + float aDefault, + ItemStack aStack, + EntityPlayer aPlayer, + Block aBlock, + int aX, + int aY, + int aZ, + byte aMetaData, + PlayerEvent.BreakSpeed aEvent) { + IToolStats tStats = getToolStats(aStack); + return tStats == null + ? aDefault + : tStats.getMiningSpeed(aBlock, aMetaData, aDefault, aPlayer, aPlayer.worldObj, aX, aY, aZ); + } + + @Override + public boolean onBlockStartBreak(ItemStack aStack, int aX, int aY, int aZ, EntityPlayer aPlayer) { + if (aPlayer.worldObj.isRemote) { + return false; } - return false; - } - return super.onBlockStartBreak(aStack, aX, aY, aZ, aPlayer); + IToolStats tStats = getToolStats(aStack); + Block aBlock = aPlayer.worldObj.getBlock(aX, aY, aZ); + if (tStats.isChainsaw() && (aBlock instanceof IShearable)) { + IShearable target = (IShearable) aBlock; + if ((target.isShearable(aStack, aPlayer.worldObj, aX, aY, aZ))) { + ArrayList<ItemStack> drops = target.onSheared( + aStack, + aPlayer.worldObj, + aX, + aY, + aZ, + EnchantmentHelper.getEnchantmentLevel(Enchantment.fortune.effectId, aStack)); + for (ItemStack stack : drops) { + float f = 0.7F; + double d = itemRand.nextFloat() * f + (1.0F - f) * 0.5D; + double d1 = itemRand.nextFloat() * f + (1.0F - f) * 0.5D; + double d2 = itemRand.nextFloat() * f + (1.0F - f) * 0.5D; + EntityItem entityitem = new EntityItem(aPlayer.worldObj, aX + d, aY + d1, aZ + d2, stack); + entityitem.delayBeforeCanPickup = 10; + aPlayer.worldObj.spawnEntityInWorld(entityitem); + } + aPlayer.addStat(net.minecraft.stats.StatList.mineBlockStatArray[Block.getIdFromBlock(aBlock)], 1); + onBlockDestroyed(aStack, aPlayer.worldObj, aBlock, aX, aY, aZ, aPlayer); + } + return false; + } + return super.onBlockStartBreak(aStack, aX, aY, aZ, aPlayer); } @Override @@ -265,17 +314,46 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item implements GT_Utility.doSoundAtClient(tStats.getEntityHitSound(), 1, 1.0F); if (super.onLeftClickEntity(aStack, aPlayer, aEntity)) return true; if (aEntity.canAttackWithItem() && !aEntity.hitByEntity(aPlayer)) { - float tMagicDamage = tStats.getMagicDamageAgainstEntity(aEntity instanceof EntityLivingBase ? EnchantmentHelper.getEnchantmentModifierLiving(aPlayer, (EntityLivingBase) aEntity) : 0.0F, aEntity, aStack, aPlayer), tDamage = tStats.getNormalDamageAgainstEntity((float) aPlayer.getEntityAttribute(SharedMonsterAttributes.attackDamage).getAttributeValue() + getToolCombatDamage(aStack), aEntity, aStack, aPlayer); + float + tMagicDamage = + tStats.getMagicDamageAgainstEntity( + aEntity instanceof EntityLivingBase + ? EnchantmentHelper.getEnchantmentModifierLiving( + aPlayer, (EntityLivingBase) aEntity) + : 0.0F, + aEntity, + aStack, + aPlayer), + tDamage = + tStats.getNormalDamageAgainstEntity( + (float) aPlayer.getEntityAttribute(SharedMonsterAttributes.attackDamage) + .getAttributeValue() + + getToolCombatDamage(aStack), + aEntity, + aStack, + aPlayer); if (tDamage + tMagicDamage > 0.0F) { - boolean tCriticalHit = aPlayer.fallDistance > 0.0F && !aPlayer.onGround && !aPlayer.isOnLadder() && !aPlayer.isInWater() && !aPlayer.isPotionActive(Potion.blindness) && aPlayer.ridingEntity == null && aEntity instanceof EntityLivingBase; + boolean tCriticalHit = aPlayer.fallDistance > 0.0F + && !aPlayer.onGround + && !aPlayer.isOnLadder() + && !aPlayer.isInWater() + && !aPlayer.isPotionActive(Potion.blindness) + && aPlayer.ridingEntity == null + && aEntity instanceof EntityLivingBase; if (tCriticalHit && tDamage > 0.0F) tDamage *= 1.5F; tDamage += tMagicDamage; if (aEntity.attackEntityFrom(tStats.getDamageSource(aPlayer, aEntity), tDamage)) { if (aEntity instanceof EntityLivingBase) aEntity.setFire(EnchantmentHelper.getFireAspectModifier(aPlayer) * 4); - int tKnockcack = (aPlayer.isSprinting() ? 1 : 0) + (aEntity instanceof EntityLivingBase ? EnchantmentHelper.getKnockbackModifier(aPlayer, (EntityLivingBase) aEntity) : 0); + int tKnockcack = (aPlayer.isSprinting() ? 1 : 0) + + (aEntity instanceof EntityLivingBase + ? EnchantmentHelper.getKnockbackModifier(aPlayer, (EntityLivingBase) aEntity) + : 0); if (tKnockcack > 0) { - aEntity.addVelocity(-MathHelper.sin(aPlayer.rotationYaw * (float) Math.PI / 180.0F) * tKnockcack * 0.5F, 0.1D, MathHelper.cos(aPlayer.rotationYaw * (float) Math.PI / 180.0F) * tKnockcack * 0.5F); + aEntity.addVelocity( + -MathHelper.sin(aPlayer.rotationYaw * (float) Math.PI / 180.0F) * tKnockcack * 0.5F, + 0.1D, + MathHelper.cos(aPlayer.rotationYaw * (float) Math.PI / 180.0F) * tKnockcack * 0.5F); aPlayer.motionX *= 0.6D; aPlayer.motionZ *= 0.6D; aPlayer.setSprinting(false); @@ -289,7 +367,8 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item implements EnchantmentHelper.func_151385_b(aPlayer, aEntity); if (aEntity instanceof EntityLivingBase) aPlayer.addStat(StatList.damageDealtStat, Math.round(tDamage * 10.0F)); - aEntity.hurtResistantTime = Math.max(1, tStats.getHurtResistanceTime(aEntity.hurtResistantTime, aEntity)); + aEntity.hurtResistantTime = + Math.max(1, tStats.getHurtResistanceTime(aEntity.hurtResistantTime, aEntity)); aPlayer.addExhaustion(0.3F); doDamage(aStack, tStats.getToolDamagePerEntityAttack()); } @@ -326,9 +405,8 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item implements ItemStack tStack = new ItemStack(this, 1, i); isItemStackUsable(tStack); aList.add(tStack); - aList.add(getToolWithStats(i,1,Materials.Neutronium,Materials.Neutronium,null)); + aList.add(getToolWithStats(i, 1, Materials.Neutronium, Materials.Neutronium, null)); } - } } @@ -357,63 +435,207 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item implements // Optimal Flow -> toolSpeed // EU/t -> toolCombatDamage, toolSpeed // Overflow Tier -> toolQuality - int aBaseEff=(int)(5+getToolCombatDamage(aStack))*1000; - int aOptFlow=GT_Utility.safeInt((long)Math.max(Float.MIN_NORMAL, ((GT_MetaGenerated_Tool) aStack.getItem()).getToolStats(aStack).getSpeedMultiplier() * ((GT_MetaGenerated_Tool) aStack.getItem()).getPrimaryMaterial(aStack).mToolSpeed * 50)); - aList.add(tOffset + 0, EnumChatFormatting.GRAY + String.format(transItem("001", "Durability: %s/%s"), "" + EnumChatFormatting.GREEN + (tMaxDamage - getToolDamage(aStack)) + " ", " " + tMaxDamage) + EnumChatFormatting.GRAY); - aList.add(tOffset + 1, EnumChatFormatting.GRAY + String.format(transItem("002", "%s lvl %s"), tMaterial.mLocalizedName + EnumChatFormatting.YELLOW, "" + getHarvestLevel(aStack, "")) + EnumChatFormatting.GRAY); - aList.add(tOffset + 2, EnumChatFormatting.WHITE + String.format(transItem("005", "Turbine Efficiency: %s"), "" + EnumChatFormatting.BLUE + (50.0F + (10.0F * getToolCombatDamage(aStack)))) + "%" + EnumChatFormatting.GRAY); - aList.add(tOffset + 3, EnumChatFormatting.WHITE + String.format(transItem("006", "Optimal Steam flow: %s L/t"), "" + EnumChatFormatting.GOLD + GT_Utility.safeInt((long) (Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * (1000 * getPrimaryMaterial(aStack).mSteamMultiplier / 20)))) + EnumChatFormatting.GRAY)); - aList.add(tOffset + 4, EnumChatFormatting.WHITE + String.format(transItem("900", "Energy from Optimal Steam Flow: %s EU/t"), "" + EnumChatFormatting.GOLD + GT_Utility.safeInt((long) (Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * (1000 * getPrimaryMaterial(aStack).mSteamMultiplier / 20)) * (50.0F + (10.0F * getToolCombatDamage(aStack))) / 200)) + EnumChatFormatting.GRAY)); + int aBaseEff = (int) (5 + getToolCombatDamage(aStack)) * 1000; + int aOptFlow = GT_Utility.safeInt((long) Math.max( + Float.MIN_NORMAL, + ((GT_MetaGenerated_Tool) aStack.getItem()) + .getToolStats(aStack) + .getSpeedMultiplier() + * ((GT_MetaGenerated_Tool) aStack.getItem()).getPrimaryMaterial(aStack).mToolSpeed + * 50)); + aList.add( + tOffset + 0, + EnumChatFormatting.GRAY + + String.format( + transItem("001", "Durability: %s/%s"), + "" + EnumChatFormatting.GREEN + (tMaxDamage - getToolDamage(aStack)) + " ", + " " + tMaxDamage) + + EnumChatFormatting.GRAY); + aList.add( + tOffset + 1, + EnumChatFormatting.GRAY + + String.format( + transItem("002", "%s lvl %s"), + tMaterial.mLocalizedName + EnumChatFormatting.YELLOW, + "" + getHarvestLevel(aStack, "")) + + EnumChatFormatting.GRAY); + aList.add( + tOffset + 2, + EnumChatFormatting.WHITE + + String.format( + transItem("005", "Turbine Efficiency: %s"), + "" + EnumChatFormatting.BLUE + (50.0F + (10.0F * getToolCombatDamage(aStack)))) + + "%" + EnumChatFormatting.GRAY); + aList.add( + tOffset + 3, + EnumChatFormatting.WHITE + + String.format( + transItem("006", "Optimal Steam flow: %s L/t"), + "" + EnumChatFormatting.GOLD + + GT_Utility.safeInt((long) (Math.max( + Float.MIN_NORMAL, + tStats.getSpeedMultiplier() + * getPrimaryMaterial(aStack).mToolSpeed + * (1000 + * getPrimaryMaterial(aStack).mSteamMultiplier + / 20)))) + + EnumChatFormatting.GRAY)); + aList.add( + tOffset + 4, + EnumChatFormatting.WHITE + + String.format( + transItem("900", "Energy from Optimal Steam Flow: %s EU/t"), + "" + EnumChatFormatting.GOLD + + GT_Utility.safeInt((long) (Math.max( + Float.MIN_NORMAL, + tStats.getSpeedMultiplier() + * getPrimaryMaterial(aStack).mToolSpeed + * (1000 + * getPrimaryMaterial(aStack) + .mSteamMultiplier + / 20)) + * (50.0F + (10.0F * getToolCombatDamage(aStack))) + / 200)) + + EnumChatFormatting.GRAY)); { long[] calculatedFlow = calculateLooseFlow(aOptFlow, aBaseEff); int aOptFlowLoose = (int) calculatedFlow[0]; int aBaseEffLoose = (int) calculatedFlow[1]; - aList.add(tOffset + 5, EnumChatFormatting.AQUA + String.format(transItem("500", "Turbine Efficiency (Loose): %s"), "" + EnumChatFormatting.BLUE + aBaseEffLoose / 100 + "%" + EnumChatFormatting.GRAY)); - aList.add(tOffset + 6, EnumChatFormatting.AQUA + String.format(transItem("501", "Optimal Steam flow (Loose): %s L/t"), "" + EnumChatFormatting.GOLD + (aOptFlowLoose * getPrimaryMaterial(aStack).mSteamMultiplier) + EnumChatFormatting.GRAY)); - aList.add(tOffset + 7, EnumChatFormatting.AQUA + String.format(transItem("901", "Energy from Optimal Steam Flow (Loose): %s EU/t"), "" + EnumChatFormatting.GOLD + (aOptFlowLoose * getPrimaryMaterial(aStack).mSteamMultiplier/ 10000) * (aBaseEffLoose / 2) + EnumChatFormatting.GRAY)); - aList.add(tOffset + 8, EnumChatFormatting.GRAY + "(Superheated Steam EU values are 2x those of Steam)"); - - + aList.add( + tOffset + 5, + EnumChatFormatting.AQUA + + String.format( + transItem("500", "Turbine Efficiency (Loose): %s"), + "" + EnumChatFormatting.BLUE + aBaseEffLoose / 100 + "%" + + EnumChatFormatting.GRAY)); + aList.add( + tOffset + 6, + EnumChatFormatting.AQUA + + String.format( + transItem("501", "Optimal Steam flow (Loose): %s L/t"), + "" + EnumChatFormatting.GOLD + + (aOptFlowLoose * getPrimaryMaterial(aStack).mSteamMultiplier) + + EnumChatFormatting.GRAY)); + aList.add( + tOffset + 7, + EnumChatFormatting.AQUA + + String.format( + transItem("901", "Energy from Optimal Steam Flow (Loose): %s EU/t"), + "" + EnumChatFormatting.GOLD + + (aOptFlowLoose + * getPrimaryMaterial(aStack).mSteamMultiplier + / 10000) + * (aBaseEffLoose / 2) + + EnumChatFormatting.GRAY)); + aList.add( + tOffset + 8, + EnumChatFormatting.GRAY + "(Superheated Steam EU values are 2x those of Steam)"); } - aList.add(tOffset + 9, EnumChatFormatting.LIGHT_PURPLE + String.format(transItem("007", "Energy from Optimal Gas Flow: %s EU/t"), "" + EnumChatFormatting.GOLD + GT_Utility.safeInt((long) (Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 50 * getPrimaryMaterial(aStack).mGasMultiplier) * (50.0F + (10.0F * getToolCombatDamage(aStack))) / 100)) + EnumChatFormatting.GRAY)); - aList.add(tOffset + 10, EnumChatFormatting.LIGHT_PURPLE + String.format(transItem("008", "Energy from Optimal Plasma Flow: %s EU/t"), "" + EnumChatFormatting.GOLD + GT_Utility.safeInt((long) (Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 2000 * getPrimaryMaterial(aStack).mPlasmaMultiplier) * (50.0F + (10.0F * getToolCombatDamage(aStack))) * (1.05 / 100))) + EnumChatFormatting.GRAY)); - aList.add(tOffset + 12, EnumChatFormatting.GRAY + "(EU/t values include efficiency and are not 100% accurate)"); + aList.add( + tOffset + 9, + EnumChatFormatting.LIGHT_PURPLE + + String.format( + transItem("007", "Energy from Optimal Gas Flow: %s EU/t"), + "" + EnumChatFormatting.GOLD + + GT_Utility.safeInt((long) (Math.max( + Float.MIN_NORMAL, + tStats.getSpeedMultiplier() + * getPrimaryMaterial(aStack).mToolSpeed + * 50 + * getPrimaryMaterial(aStack).mGasMultiplier) + * (50.0F + (10.0F * getToolCombatDamage(aStack))) + / 100)) + + EnumChatFormatting.GRAY)); + aList.add( + tOffset + 10, + EnumChatFormatting.LIGHT_PURPLE + + String.format( + transItem("008", "Energy from Optimal Plasma Flow: %s EU/t"), + "" + EnumChatFormatting.GOLD + + GT_Utility.safeInt((long) (Math.max( + Float.MIN_NORMAL, + tStats.getSpeedMultiplier() + * getPrimaryMaterial(aStack).mToolSpeed + * 2000 + * getPrimaryMaterial(aStack).mPlasmaMultiplier) + * (50.0F + (10.0F * getToolCombatDamage(aStack))) + * (1.05 / 100))) + + EnumChatFormatting.GRAY)); + aList.add( + tOffset + 12, + EnumChatFormatting.GRAY + "(EU/t values include efficiency and are not 100% accurate)"); int toolQualityLevel = GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolQuality; int overflowMultiplier = 0; if (toolQualityLevel >= 6) { overflowMultiplier = 3; - } - else if (toolQualityLevel >= 3) { + } else if (toolQualityLevel >= 3) { overflowMultiplier = 2; - } - else { + } else { overflowMultiplier = 1; } - aList.add(tOffset + 11, EnumChatFormatting.LIGHT_PURPLE + String.format(transItem("502", "Overflow Efficiency Tier: %s"), "" + EnumChatFormatting.GOLD + overflowMultiplier + EnumChatFormatting.GRAY)); + aList.add( + tOffset + 11, + EnumChatFormatting.LIGHT_PURPLE + + String.format( + transItem("502", "Overflow Efficiency Tier: %s"), + "" + EnumChatFormatting.GOLD + overflowMultiplier + EnumChatFormatting.GRAY)); } else { - aList.add(tOffset + 0, EnumChatFormatting.WHITE + String.format(transItem("001", "Durability: %s/%s"), "" + EnumChatFormatting.GREEN + (tMaxDamage - getToolDamage(aStack)) + " ", " " + tMaxDamage) + EnumChatFormatting.GRAY); - aList.add(tOffset + 1, EnumChatFormatting.WHITE + String.format(transItem("002", "%s lvl %s"), tMaterial.mLocalizedName + EnumChatFormatting.YELLOW, "" + getHarvestLevel(aStack, "")) + EnumChatFormatting.GRAY); - aList.add(tOffset + 2, EnumChatFormatting.WHITE + String.format(transItem("003", "Attack Damage: %s"), "" + EnumChatFormatting.BLUE + getToolCombatDamage(aStack)) + EnumChatFormatting.GRAY); - aList.add(tOffset + 3, EnumChatFormatting.WHITE + String.format(transItem("004", "Mining Speed: %s"), "" + EnumChatFormatting.GOLD + Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed)) + EnumChatFormatting.GRAY); + aList.add( + tOffset + 0, + EnumChatFormatting.WHITE + + String.format( + transItem("001", "Durability: %s/%s"), + "" + EnumChatFormatting.GREEN + (tMaxDamage - getToolDamage(aStack)) + " ", + " " + tMaxDamage) + + EnumChatFormatting.GRAY); + aList.add( + tOffset + 1, + EnumChatFormatting.WHITE + + String.format( + transItem("002", "%s lvl %s"), + tMaterial.mLocalizedName + EnumChatFormatting.YELLOW, + "" + getHarvestLevel(aStack, "")) + + EnumChatFormatting.GRAY); + aList.add( + tOffset + 2, + EnumChatFormatting.WHITE + + String.format( + transItem("003", "Attack Damage: %s"), + "" + EnumChatFormatting.BLUE + getToolCombatDamage(aStack)) + + EnumChatFormatting.GRAY); + aList.add( + tOffset + 3, + EnumChatFormatting.WHITE + + String.format( + transItem("004", "Mining Speed: %s"), + "" + EnumChatFormatting.GOLD + + Math.max( + Float.MIN_NORMAL, + tStats.getSpeedMultiplier() + * getPrimaryMaterial(aStack).mToolSpeed)) + + EnumChatFormatting.GRAY); NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag("GT.ToolStats"); - if (aNBT != null && aNBT.hasKey("Heat")){ - int tHeat = aNBT.getInteger("Heat"); - long tWorldTime = aPlayer.getEntityWorld().getWorldTime(); - if(aNBT.hasKey("HeatTime")){ - long tHeatTime = aNBT.getLong("HeatTime"); - if(tWorldTime>(tHeatTime+10)){ - tHeat = (int) (tHeat - ((tWorldTime-tHeatTime)/10)); - if(tHeat<300&&tHeat>-10000)tHeat=300; - } - aNBT.setLong("HeatTime", tWorldTime); - if(tHeat>-10000)aNBT.setInteger("Heat", tHeat); - } - - aList.add(tOffset + 3, EnumChatFormatting.RED + "Heat: " + aNBT.getInteger("Heat")+" K" + EnumChatFormatting.GRAY); + if (aNBT != null && aNBT.hasKey("Heat")) { + int tHeat = aNBT.getInteger("Heat"); + long tWorldTime = aPlayer.getEntityWorld().getWorldTime(); + if (aNBT.hasKey("HeatTime")) { + long tHeatTime = aNBT.getLong("HeatTime"); + if (tWorldTime > (tHeatTime + 10)) { + tHeat = (int) (tHeat - ((tWorldTime - tHeatTime) / 10)); + if (tHeat < 300 && tHeat > -10000) tHeat = 300; + } + aNBT.setLong("HeatTime", tWorldTime); + if (tHeat > -10000) aNBT.setInteger("Heat", tHeat); + } + + aList.add( + tOffset + 3, + EnumChatFormatting.RED + "Heat: " + aNBT.getInteger("Heat") + " K" + + EnumChatFormatting.GRAY); } } } @@ -431,7 +653,12 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item implements if (aNBT != null) { aNBT = aNBT.getCompoundTag("GT.ToolStats"); if (aNBT != null && aNBT.getBoolean("Electric")) - return new Long[]{aNBT.getLong("MaxCharge"), aNBT.getLong("Voltage"), aNBT.getLong("Tier"), aNBT.getLong("SpecialData")}; + return new Long[] { + aNBT.getLong("MaxCharge"), + aNBT.getLong("Voltage"), + aNBT.getLong("Tier"), + aNBT.getLong("SpecialData") + }; } return null; } @@ -458,7 +685,6 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item implements if (tStats == null || GT_Utility.setStack(aStack, tStats.getBrokenItem(aStack)) == null) { if (tStats != null) GT_Utility.doSoundAtClient(tStats.getBreakingSound(), 1, 1.0F); if (aStack.stackSize > 0) aStack.stackSize--; - } } return true; @@ -485,7 +711,9 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item implements if (!isItemStackUsable(aStack)) return 0.0F; IToolStats tStats = getToolStats(aStack); if (tStats == null || Math.max(0, getHarvestLevel(aStack, "")) < aBlock.getHarvestLevel(aMetaData)) return 0.0F; - return tStats.isMinableBlock(aBlock, (byte) aMetaData) ? Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed) : 0.0F; + return tStats.isMinableBlock(aBlock, (byte) aMetaData) + ? Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed) + : 0.0F; } @Override @@ -500,12 +728,14 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item implements } @Override - public boolean onBlockDestroyed(ItemStack aStack, World aWorld, Block aBlock, int aX, int aY, int aZ, EntityLivingBase aPlayer) { + public boolean onBlockDestroyed( + ItemStack aStack, World aWorld, Block aBlock, int aX, int aY, int aZ, EntityLivingBase aPlayer) { if (!isItemStackUsable(aStack)) return false; IToolStats tStats = getToolStats(aStack); if (tStats == null) return false; GT_Utility.doSoundAtClient(tStats.getMiningSound(), 1, 1.0F); - doDamage(aStack, (int) Math.max(1, aBlock.getBlockHardness(aWorld, aX, aY, aZ) * tStats.getToolDamagePerBlockBreak())); + doDamage(aStack, (int) + Math.max(1, aBlock.getBlockHardness(aWorld, aX, aY, aZ) * tStats.getToolDamagePerBlockBreak())); return getDigSpeed(aStack, aBlock, aWorld.getBlockMetadata(aX, aY, aZ)) > 0.0F; } @@ -527,7 +757,7 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item implements doDamage(aStack, tStats.getToolDamagePerContainerCraft()); aStack = aStack.stackSize > 0 ? aStack : null; if (playSound && GT_Mod.gregtechproxy.mTicksUntilNextCraftSound <= 0) { - GT_Mod.gregtechproxy.mTicksUntilNextCraftSound = 10; + GT_Mod.gregtechproxy.mTicksUntilNextCraftSound = 10; String sound = (aStack == null) ? tStats.getBreakingSound() : tStats.getCraftingSound(); GT_Utility.doSoundAtClient(sound, 1, 1.0F); } @@ -546,7 +776,9 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item implements @Override public float getSaplingModifier(ItemStack aStack, World aWorld, EntityPlayer aPlayer, int aX, int aY, int aZ) { IToolStats tStats = getToolStats(aStack); - return tStats != null && tStats.isGrafter() ? Math.min(100.0F, (1 + getHarvestLevel(aStack, "")) * 20.0F) : 0.0F; + return tStats != null && tStats.isGrafter() + ? Math.min(100.0F, (1 + getHarvestLevel(aStack, "")) * 20.0F) + : 0.0F; } @Override @@ -562,42 +794,41 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item implements if (tStats != null) doDamage(aStack, tStats.getToolDamagePerEntityAttack()); } - @Override - public boolean canWrench(EntityPlayer player, int x, int y, int z) { - if(player==null)return false; - if(player.getCurrentEquippedItem()==null)return false; + @Override + public boolean canWrench(EntityPlayer player, int x, int y, int z) { + if (player == null) return false; + if (player.getCurrentEquippedItem() == null) return false; if (!isItemStackUsable(player.getCurrentEquippedItem())) return false; IToolStats tStats = getToolStats(player.getCurrentEquippedItem()); return tStats != null && tStats.isWrench(); - } + } - @Override - public void wrenchUsed(EntityPlayer player, int x, int y, int z) { - if(player==null)return; - if(player.getCurrentEquippedItem()==null)return; + @Override + public void wrenchUsed(EntityPlayer player, int x, int y, int z) { + if (player == null) return; + if (player.getCurrentEquippedItem() == null) return; IToolStats tStats = getToolStats(player.getCurrentEquippedItem()); if (tStats != null) doDamage(player.getCurrentEquippedItem(), tStats.getToolDamagePerEntityAttack()); - } - - @Override - public boolean canUse(ItemStack stack, EntityPlayer player, int x, int y, int z){ - return canWrench(player, x, y, z); - } - - @Override - public void used(ItemStack stack, EntityPlayer player, int x, int y, int z){ - wrenchUsed(player, x, y, z); - } - - @Override - public boolean shouldHideFacades(ItemStack stack, EntityPlayer player) { - if(player==null)return false; - if(player.getCurrentEquippedItem()==null)return false; - if (!isItemStackUsable(player.getCurrentEquippedItem())) return false; - IToolStats tStats = getToolStats(player.getCurrentEquippedItem()); - return tStats.isWrench(); - } + } + + @Override + public boolean canUse(ItemStack stack, EntityPlayer player, int x, int y, int z) { + return canWrench(player, x, y, z); + } + + @Override + public void used(ItemStack stack, EntityPlayer player, int x, int y, int z) { + wrenchUsed(player, x, y, z); + } + @Override + public boolean shouldHideFacades(ItemStack stack, EntityPlayer player) { + if (player == null) return false; + if (player.getCurrentEquippedItem() == null) return false; + if (!isItemStackUsable(player.getCurrentEquippedItem())) return false; + IToolStats tStats = getToolStats(player.getCurrentEquippedItem()); + return tStats.isWrench(); + } @Override public boolean canLink(EntityPlayer aPlayer, ItemStack aStack, EntityMinecart cart) { @@ -671,10 +902,14 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item implements for (int i = 0; i < tEnchants.length; i++) if (tLevels[i] > 0) { Integer tLevel = tMap.get(tEnchants[i].effectId); - tMap.put(tEnchants[i].effectId, tLevel == null ? tLevels[i] : tLevel == tLevels[i] ? tLevel + 1 : Math.max(tLevel, tLevels[i])); + tMap.put( + tEnchants[i].effectId, + tLevel == null ? tLevels[i] : tLevel == tLevels[i] ? tLevel + 1 : Math.max(tLevel, tLevels[i])); } for (Entry<Integer, Integer> tEntry : tMap.entrySet()) { - if (tEntry.getKey() == 33 || (tEntry.getKey() == 20 && tEntry.getValue() > 2) || tEntry.getKey() == Enchantment_Radioactivity.INSTANCE.effectId) + if (tEntry.getKey() == 33 + || (tEntry.getKey() == 20 && tEntry.getValue() > 2) + || tEntry.getKey() == Enchantment_Radioactivity.INSTANCE.effectId) tResult.put(tEntry.getKey(), tEntry.getValue()); else switch (Enchantment.enchantmentsList[tEntry.getKey()].type) { diff --git a/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java b/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java index 7950672ec2..894c03db90 100644 --- a/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java +++ b/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java @@ -1,20 +1,16 @@ package gregtech.api.items; - import gregtech.api.GregTech_API; import gregtech.api.util.GT_Utility; import ic2.api.reactor.IReactor; import ic2.api.reactor.IReactorComponent; import ic2.core.IC2Potion; -import ic2.core.item.armor.ItemArmorHazmat; +import java.util.ArrayList; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -import java.util.ArrayList; - - public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implements IReactorComponent { public final int numberOfCells; public final float sEnergy; @@ -23,7 +19,16 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement public final ItemStack sDepleted; public final boolean sMox; - public GT_RadioactiveCellIC_Item(String aUnlocalized, String aEnglish, int aCellcount, int maxDamage, float aEnergy, int aRadiation, float aHeat, ItemStack aDepleted, boolean aMox) { + public GT_RadioactiveCellIC_Item( + String aUnlocalized, + String aEnglish, + int aCellcount, + int maxDamage, + float aEnergy, + int aRadiation, + float aHeat, + ItemStack aDepleted, + boolean aMox) { super(aUnlocalized, aEnglish, aCellcount); setMaxStackSize(64); this.maxDmg = maxDamage; @@ -33,13 +38,14 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement this.sHeat = aHeat; this.sDepleted = aDepleted; this.sMox = aMox; - } private static int checkPulseable(IReactor reactor, int x, int y, ItemStack me, int mex, int mey, boolean heatrun) { ItemStack other = reactor.getItemAt(x, y); - if ((other != null) && ((other.getItem() instanceof IReactorComponent)) && - (((IReactorComponent) other.getItem()).acceptUraniumPulse(reactor, other, me, x, y, mex, mey, heatrun))) { + if ((other != null) + && ((other.getItem() instanceof IReactorComponent)) + && (((IReactorComponent) other.getItem()) + .acceptUraniumPulse(reactor, other, me, x, y, mex, mey, heatrun))) { return 1; } return 0; @@ -56,16 +62,22 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement for (int i = 0; i < pulses; i++) { acceptUraniumPulse(reactor, yourStack, yourStack, x, y, x, y, heatrun); } - checkPulseable(reactor, x - 1, y, yourStack, x, y, heatrun);checkPulseable(reactor, x + 1, y, yourStack, x, y, heatrun);checkPulseable(reactor, x, y - 1, yourStack, x, y, heatrun);checkPulseable(reactor, x, y + 1, yourStack, x, y, heatrun); + checkPulseable(reactor, x - 1, y, yourStack, x, y, heatrun); + checkPulseable(reactor, x + 1, y, yourStack, x, y, heatrun); + checkPulseable(reactor, x, y - 1, yourStack, x, y, heatrun); + checkPulseable(reactor, x, y + 1, yourStack, x, y, heatrun); } else { - pulses += checkPulseable(reactor, x - 1, y, yourStack, x, y, heatrun) + checkPulseable(reactor, x + 1, y, yourStack, x, y, heatrun) + checkPulseable(reactor, x, y - 1, yourStack, x, y, heatrun) + checkPulseable(reactor, x, y + 1, yourStack, x, y, heatrun); + pulses += checkPulseable(reactor, x - 1, y, yourStack, x, y, heatrun) + + checkPulseable(reactor, x + 1, y, yourStack, x, y, heatrun) + + checkPulseable(reactor, x, y - 1, yourStack, x, y, heatrun) + + checkPulseable(reactor, x, y + 1, yourStack, x, y, heatrun); -// int heat = sumUp(pulses) * 4; + // int heat = sumUp(pulses) * 4; int heat = triangularNumber(pulses) * 4; - + heat = getFinalHeat(reactor, yourStack, x, y, heat); - + ArrayList<ItemStackCoord> heatAcceptors = new ArrayList(); checkHeatAcceptor(reactor, x - 1, y, heatAcceptors); checkHeatAcceptor(reactor, x + 1, y, heatAcceptors); @@ -76,7 +88,13 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement int dheat = heat / heatAcceptors.size(); heat -= dheat; - dheat = ((IReactorComponent) ((ItemStackCoord) heatAcceptors.get(0)).stack.getItem()).alterHeat(reactor, ((ItemStackCoord) heatAcceptors.get(0)).stack, ((ItemStackCoord) heatAcceptors.get(0)).x, ((ItemStackCoord) heatAcceptors.get(0)).y, dheat); + dheat = ((IReactorComponent) ((ItemStackCoord) heatAcceptors.get(0)).stack.getItem()) + .alterHeat( + reactor, + ((ItemStackCoord) heatAcceptors.get(0)).stack, + ((ItemStackCoord) heatAcceptors.get(0)).x, + ((ItemStackCoord) heatAcceptors.get(0)).y, + dheat); heat += dheat; heatAcceptors.remove(0); } @@ -86,41 +104,49 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement } } if (getDamageOfStack(yourStack) >= getMaxDamageEx() - 1) { - reactor.setItemAt(x, y, sDepleted.copy()); + reactor.setItemAt(x, y, sDepleted.copy()); } else if (heatrun) { damageItemStack(yourStack, 1); } } - - protected int getFinalHeat(IReactor reactor, ItemStack stack, int x, int y, int heat) - { - if (sMox&&reactor.isFluidCooled()) - { - float breedereffectiveness = (float)reactor.getHeat() / (float)reactor.getMaxHeat(); - if (breedereffectiveness > 0.5D) { - heat *= 2; + + protected int getFinalHeat(IReactor reactor, ItemStack stack, int x, int y, int heat) { + if (sMox && reactor.isFluidCooled()) { + float breedereffectiveness = (float) reactor.getHeat() / (float) reactor.getMaxHeat(); + if (breedereffectiveness > 0.5D) { + heat *= 2; + } } - } - return heat; + return heat; } private void checkHeatAcceptor(IReactor reactor, int x, int y, ArrayList<ItemStackCoord> heatAcceptors) { ItemStack thing = reactor.getItemAt(x, y); - if ((thing != null) && ((thing.getItem() instanceof IReactorComponent)) && - (((IReactorComponent) thing.getItem()).canStoreHeat(reactor, thing, x, y))) { + if ((thing != null) + && ((thing.getItem() instanceof IReactorComponent)) + && (((IReactorComponent) thing.getItem()).canStoreHeat(reactor, thing, x, y))) { heatAcceptors.add(new ItemStackCoord(thing, x, y)); } } @Override - public boolean acceptUraniumPulse(IReactor reactor, ItemStack yourStack, ItemStack pulsingStack, int youX, int youY, int pulseX, int pulseY, boolean heatrun) { - if (!heatrun) { - if(sMox){ - float breedereffectiveness = (float)reactor.getHeat() / (float)reactor.getMaxHeat(); - float ReaktorOutput = 1.5F * breedereffectiveness + 1.0F; - reactor.addOutput(ReaktorOutput * this.sEnergy); - }else{ - reactor.addOutput((float) (1.0F * this.sEnergy));} + public boolean acceptUraniumPulse( + IReactor reactor, + ItemStack yourStack, + ItemStack pulsingStack, + int youX, + int youY, + int pulseX, + int pulseY, + boolean heatrun) { + if (!heatrun) { + if (sMox) { + float breedereffectiveness = (float) reactor.getHeat() / (float) reactor.getMaxHeat(); + float ReaktorOutput = 1.5F * breedereffectiveness + 1.0F; + reactor.addOutput(ReaktorOutput * this.sEnergy); + } else { + reactor.addOutput((float) (1.0F * this.sEnergy)); + } } return true; } @@ -154,7 +180,7 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement public void onUpdate(ItemStack stack, World world, Entity entity, int slotIndex, boolean isCurrentItem) { if (this.sRadiation > 0 && (entity instanceof EntityLivingBase)) { EntityLivingBase entityLiving = (EntityLivingBase) entity; - if (!GregTech_API.mIC2Classic&&!GT_Utility.isWearingFullRadioHazmat(entityLiving)) { + if (!GregTech_API.mIC2Classic && !GT_Utility.isWearingFullRadioHazmat(entityLiving)) { IC2Potion.radiation.applyTo(entityLiving, sRadiation * 20, sRadiation * 10); } } diff --git a/src/main/java/gregtech/api/items/GT_RadioactiveCell_Item.java b/src/main/java/gregtech/api/items/GT_RadioactiveCell_Item.java index e9c48991de..cff5bf38a8 100644 --- a/src/main/java/gregtech/api/items/GT_RadioactiveCell_Item.java +++ b/src/main/java/gregtech/api/items/GT_RadioactiveCell_Item.java @@ -3,15 +3,13 @@ package gregtech.api.items; import gregtech.common.items.GT_DepletetCell_Item; import ic2.api.item.IBoxable; import ic2.core.util.StackUtil; +import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; -import java.util.List; - -public class GT_RadioactiveCell_Item - extends GT_Generic_Item implements IBoxable{ +public class GT_RadioactiveCell_Item extends GT_Generic_Item implements IBoxable { protected int cellCount; protected int maxDmg; protected int dura; @@ -41,9 +39,8 @@ public class GT_RadioactiveCell_Item return b; } - protected static int triangularNumber(int x) - { - return (x * x + x) / 2; + protected static int triangularNumber(int x) { + return (x * x + x) / 2; } protected boolean outputPulseForStack(ItemStack aStack) { @@ -53,7 +50,7 @@ public class GT_RadioactiveCell_Item aStack.setTagCompound(tNBT); } tNBT.setInteger("output", tNBT.getInteger("output") + 1); - return false;//(this.pulserate > 0) || (tNBT.getInteger("output") % -this.pulserate == 0); + return false; // (this.pulserate > 0) || (tNBT.getInteger("output") % -this.pulserate == 0); } protected boolean incrementPulseForStack(ItemStack aStack) { @@ -63,7 +60,7 @@ public class GT_RadioactiveCell_Item aStack.setTagCompound(tNBT); } tNBT.setInteger("pulse", tNBT.getInteger("pulse") + 1); - return false;//(this.pulserate > 0) || (tNBT.getInteger("pulse") % -this.pulserate == 0); + return false; // (this.pulserate > 0) || (tNBT.getInteger("pulse") % -this.pulserate == 0); } protected void setDurabilityForStack(ItemStack aStack, int aDurability) { @@ -76,7 +73,7 @@ public class GT_RadioactiveCell_Item } public int getMaxNuclearDurability() { - return 0;//return this.maxDelay; + return 0; // return this.maxDelay; } public int func_77619_b() { @@ -133,24 +130,35 @@ public class GT_RadioactiveCell_Item @Override public void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) { - super.addAdditionalToolTips(aList, aStack, aPlayer); - //aList.add("Time left: " + (this.maxDelay - getDurabilityOfStack(aStack)) + " secs"); + super.addAdditionalToolTips(aList, aStack, aPlayer); + // aList.add("Time left: " + (this.maxDelay - getDurabilityOfStack(aStack)) + " secs"); int rDmg = getDurabilityOfStack(aStack) * 6 / this.maxDmg; EnumChatFormatting color2; switch (rDmg) { - case 0: - case 1: color2 = EnumChatFormatting.WHITE; break; - case 2: - case 3: - case 4: color2 = EnumChatFormatting.GRAY; break; - default: color2 = EnumChatFormatting.DARK_GRAY; break; + case 0: + case 1: + color2 = EnumChatFormatting.WHITE; + break; + case 2: + case 3: + case 4: + color2 = EnumChatFormatting.GRAY; + break; + default: + color2 = EnumChatFormatting.DARK_GRAY; + break; } - EnumChatFormatting color1 = this instanceof GT_DepletetCell_Item ? color2 = EnumChatFormatting.DARK_GRAY : EnumChatFormatting.WHITE; - aList.add(color1 + String.format(transItem("001", "Durability: %s/%s"), "" + color2 + (this.maxDmg - getDurabilityOfStack(aStack)) + color1, "" + this.maxDmg)); + EnumChatFormatting color1 = + this instanceof GT_DepletetCell_Item ? color2 = EnumChatFormatting.DARK_GRAY : EnumChatFormatting.WHITE; + aList.add(color1 + + String.format( + transItem("001", "Durability: %s/%s"), + "" + color2 + (this.maxDmg - getDurabilityOfStack(aStack)) + color1, + "" + this.maxDmg)); } - @Override - public boolean canBeStoredInToolbox(ItemStack itemstack) { - return true; - } + @Override + public boolean canBeStoredInToolbox(ItemStack itemstack) { + return true; + } } diff --git a/src/main/java/gregtech/api/items/GT_SolderingTool_Item.java b/src/main/java/gregtech/api/items/GT_SolderingTool_Item.java index 7725785276..7dfe0409a1 100644 --- a/src/main/java/gregtech/api/items/GT_SolderingTool_Item.java +++ b/src/main/java/gregtech/api/items/GT_SolderingTool_Item.java @@ -1,36 +1,56 @@ package gregtech.api.items; +import static gregtech.api.enums.GT_Values.W; + import gregtech.api.GregTech_API; import gregtech.api.enums.ToolDictNames; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_OreDictUnificator; +import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -import java.util.List; - -import static gregtech.api.enums.GT_Values.W; - public class GT_SolderingTool_Item extends GT_Tool_Item { - public GT_SolderingTool_Item(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage, int aDischargedGTID) { - super(aUnlocalized, aEnglish, "To repair and construct Circuitry", aMaxDamage, aEntityDamage, true, -1, aDischargedGTID); + public GT_SolderingTool_Item( + String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage, int aDischargedGTID) { + super( + aUnlocalized, + aEnglish, + "To repair and construct Circuitry", + aMaxDamage, + aEntityDamage, + true, + -1, + aDischargedGTID); GT_OreDictUnificator.registerOre(ToolDictNames.craftingToolSolderingIron, new ItemStack(this, 1, W)); GregTech_API.registerSolderingTool(new ItemStack(this, 1, W)); -// setCraftingSound(GregTech_API.sSoundList.get(103)); -// setBreakingSound(GregTech_API.sSoundList.get(103)); -// setEntityHitSound(GregTech_API.sSoundList.get(103)); -// setUsageAmounts(1, 1, 1); + // setCraftingSound(GregTech_API.sSoundList.get(103)); + // setBreakingSound(GregTech_API.sSoundList.get(103)); + // setEntityHitSound(GregTech_API.sSoundList.get(103)); + // setUsageAmounts(1, 1, 1); } @Override public void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) { - aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_1", "Sets the Strength of outputted Redstone")); - aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_2", "Needs Soldering Metal in Inventory!")); + aList.add(GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".tooltip_1", "Sets the Strength of outputted Redstone")); + aList.add(GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".tooltip_2", "Needs Soldering Metal in Inventory!")); } @Override - public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUseFirst( + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { super.onItemUseFirst(aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ); if (aWorld.isRemote) { return false; diff --git a/src/main/java/gregtech/api/items/GT_Spray_Bug_Item.java b/src/main/java/gregtech/api/items/GT_Spray_Bug_Item.java index 5b697748da..23bf3d87ad 100644 --- a/src/main/java/gregtech/api/items/GT_Spray_Bug_Item.java +++ b/src/main/java/gregtech/api/items/GT_Spray_Bug_Item.java @@ -11,7 +11,7 @@ import net.minecraft.world.World; public class GT_Spray_Bug_Item extends GT_Tool_Item { public GT_Spray_Bug_Item(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage) { - super(aUnlocalized, aEnglish, "A very 'buggy' Spray", aMaxDamage, aEntityDamage, true);/* + super(aUnlocalized, aEnglish, "A very 'buggy' Spray", aMaxDamage, aEntityDamage, true); /* addToEffectiveList(EntityCaveSpider.class.getName()); addToEffectiveList(EntitySpider.class.getName()); addToEffectiveList("EntityTFHedgeSpider"); @@ -41,14 +41,24 @@ public class GT_Spray_Bug_Item extends GT_Tool_Item { } */ @Override - public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUseFirst( + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { super.onItemUseFirst(aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ); if (aWorld.isRemote) { return false; } Block aBlock = aWorld.getBlock(aX, aY, aZ); if (aBlock == null) return false; -// byte aMeta = (byte)aWorld.getBlockMetadata(aX, aY, aZ); + // byte aMeta = (byte)aWorld.getBlockMetadata(aX, aY, aZ); TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); try { @@ -60,7 +70,9 @@ public class GT_Spray_Bug_Item extends GT_Tool_Item { return true; } } - } catch (Throwable e) {/*Do nothing*/} + } catch (Throwable e) { + /*Do nothing*/ + } return false; } diff --git a/src/main/java/gregtech/api/items/GT_Spray_Foam_Item.java b/src/main/java/gregtech/api/items/GT_Spray_Foam_Item.java index 58bfafdffb..c2d4ff1231 100644 --- a/src/main/java/gregtech/api/items/GT_Spray_Foam_Item.java +++ b/src/main/java/gregtech/api/items/GT_Spray_Foam_Item.java @@ -1,5 +1,7 @@ package gregtech.api.items; +import static gregtech.api.enums.GT_Values.D1; + import gregtech.api.enums.SoundResource; import gregtech.api.metatileentity.BaseMetaPipeEntity; import gregtech.api.util.GT_Log; @@ -14,11 +16,9 @@ import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import static gregtech.api.enums.GT_Values.D1; - public class GT_Spray_Foam_Item extends GT_Tool_Item { public GT_Spray_Foam_Item(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage) { - super(aUnlocalized, aEnglish, "Precision Spray", aMaxDamage, aEntityDamage, true);/* + super(aUnlocalized, aEnglish, "Precision Spray", aMaxDamage, aEntityDamage, true); /* setCraftingSound(Sounds.IC2_TOOLS_PAINTER); setBreakingSound(Sounds.IC2_TOOLS_PAINTER); setEntityHitSound(Sounds.IC2_TOOLS_PAINTER); @@ -57,7 +57,17 @@ public class GT_Spray_Foam_Item extends GT_Tool_Item { } */ @Override - public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUseFirst( + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { super.onItemUseFirst(aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ); if (aPlayer.isSneaking()) return false; if (aWorld.isRemote) { @@ -65,7 +75,7 @@ public class GT_Spray_Foam_Item extends GT_Tool_Item { } Block aBlock = aWorld.getBlock(aX, aY, aZ); if (aBlock == null) return false; -// byte aMeta = (byte)aWorld.getBlockMetadata(aX, aY, aZ); + // byte aMeta = (byte)aWorld.getBlockMetadata(aX, aY, aZ); TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); try { @@ -121,7 +131,8 @@ public class GT_Spray_Foam_Item extends GT_Tool_Item { } switch (0) { case 0: - if (GT_Utility.isBlockAir(aWorld, aX, aY, aZ) && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) { + if (GT_Utility.isBlockAir(aWorld, aX, aY, aZ) + && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) { GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_PAINTER, 1.0F, -1, aX, aY, aZ); aWorld.setBlock(aX, aY, aZ, GT_Utility.getBlockFromStack(tStack), tStack.getItemDamage(), 3); return true; @@ -129,9 +140,12 @@ public class GT_Spray_Foam_Item extends GT_Tool_Item { break; case 1: for (byte i = 0; i < 4; i++) { - if (GT_Utility.isBlockAir(aWorld, aX, aY, aZ) && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) { - GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_PAINTER, 1.0F, -1, aX, aY, aZ); - aWorld.setBlock(aX, aY, aZ, GT_Utility.getBlockFromStack(tStack), tStack.getItemDamage(), 3); + if (GT_Utility.isBlockAir(aWorld, aX, aY, aZ) + && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) { + GT_Utility.sendSoundToPlayers( + aWorld, SoundResource.IC2_TOOLS_PAINTER, 1.0F, -1, aX, aY, aZ); + aWorld.setBlock( + aX, aY, aZ, GT_Utility.getBlockFromStack(tStack), tStack.getItemDamage(), 3); } else { if (i == 0) return false; break; @@ -153,10 +167,21 @@ public class GT_Spray_Foam_Item extends GT_Tool_Item { for (byte i = 0; i < 3; i++) for (byte j = 0; j < 3; j++) { - if (GT_Utility.isBlockAir(aWorld, aX + (tXFactor ? i : 0), aY + (!tXFactor && tYFactor ? i : 0) + (!tZFactor && tYFactor ? j : 0), aZ + (tZFactor ? j : 0))) { + if (GT_Utility.isBlockAir( + aWorld, + aX + (tXFactor ? i : 0), + aY + (!tXFactor && tYFactor ? i : 0) + (!tZFactor && tYFactor ? j : 0), + aZ + (tZFactor ? j : 0))) { if (GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) { - GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_PAINTER, 1.0F, -1, aX, aY, aZ); - aWorld.setBlock(aX + (tXFactor ? i : 0), aY + (!tXFactor && tYFactor ? i : 0) + (!tZFactor && tYFactor ? j : 0), aZ + (tZFactor ? j : 0), GT_Utility.getBlockFromStack(tStack), tStack.getItemDamage(), 3); + GT_Utility.sendSoundToPlayers( + aWorld, SoundResource.IC2_TOOLS_PAINTER, 1.0F, -1, aX, aY, aZ); + aWorld.setBlock( + aX + (tXFactor ? i : 0), + aY + (!tXFactor && tYFactor ? i : 0) + (!tZFactor && tYFactor ? j : 0), + aZ + (tZFactor ? j : 0), + GT_Utility.getBlockFromStack(tStack), + tStack.getItemDamage(), + 3); temp = true; } else { break; diff --git a/src/main/java/gregtech/api/items/GT_Spray_Hardener_Item.java b/src/main/java/gregtech/api/items/GT_Spray_Hardener_Item.java index 4c8d64b5ee..bbcd170db0 100644 --- a/src/main/java/gregtech/api/items/GT_Spray_Hardener_Item.java +++ b/src/main/java/gregtech/api/items/GT_Spray_Hardener_Item.java @@ -1,5 +1,7 @@ package gregtech.api.items; +import static gregtech.api.enums.GT_Values.D1; + import gregtech.api.enums.SoundResource; import gregtech.api.metatileentity.BaseMetaPipeEntity; import gregtech.api.util.GT_Log; @@ -12,11 +14,9 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import static gregtech.api.enums.GT_Values.D1; - public class GT_Spray_Hardener_Item extends GT_Tool_Item { public GT_Spray_Hardener_Item(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage) { - super(aUnlocalized, aEnglish, "Construction Foam Hardener", aMaxDamage, aEntityDamage, true);/* + super(aUnlocalized, aEnglish, "Construction Foam Hardener", aMaxDamage, aEntityDamage, true); /* setCraftingSound(Sounds.IC2_TOOLS_PAINTER); setBreakingSound(Sounds.IC2_TOOLS_PAINTER); setEntityHitSound(Sounds.IC2_TOOLS_PAINTER); @@ -24,14 +24,24 @@ public class GT_Spray_Hardener_Item extends GT_Tool_Item { } @Override - public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUseFirst( + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { super.onItemUseFirst(aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ); if (aWorld.isRemote) { return false; } Block aBlock = aWorld.getBlock(aX, aY, aZ); if (aBlock == null) return false; -// byte aMeta = (byte)aWorld.getBlockMetadata(aX, aY, aZ); + // byte aMeta = (byte)aWorld.getBlockMetadata(aX, aY, aZ); TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); try { @@ -49,8 +59,12 @@ public class GT_Spray_Hardener_Item extends GT_Tool_Item { if (D1) e.printStackTrace(GT_Log.err); } - ItemStack tStack1 = GT_ModHandler.getIC2Item("constructionFoam", 1), tStack2 = GT_ModHandler.getIC2Item("constructionFoamWall", 1); - if (tStack1 != null && tStack1.isItemEqual(new ItemStack(aBlock)) && tStack2 != null && tStack2.getItem() instanceof ItemBlock) { + ItemStack tStack1 = GT_ModHandler.getIC2Item("constructionFoam", 1), + tStack2 = GT_ModHandler.getIC2Item("constructionFoamWall", 1); + if (tStack1 != null + && tStack1.isItemEqual(new ItemStack(aBlock)) + && tStack2 != null + && tStack2.getItem() instanceof ItemBlock) { if (GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) { GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_PAINTER, 1.0F, -1, aX, aY, aZ); aWorld.setBlock(aX, aY, aZ, GT_Utility.getBlockFromStack(tStack2), 7, 3); @@ -58,10 +72,12 @@ public class GT_Spray_Hardener_Item extends GT_Tool_Item { return true; } - if (aTileEntity instanceof BaseMetaPipeEntity && (((BaseMetaPipeEntity) aTileEntity).mConnections & -64) == 64) { + if (aTileEntity instanceof BaseMetaPipeEntity + && (((BaseMetaPipeEntity) aTileEntity).mConnections & -64) == 64) { if (GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) { GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_PAINTER, 1.0F, -1, aX, aY, aZ); - ((BaseMetaPipeEntity) aTileEntity).mConnections = (byte) ((((BaseMetaPipeEntity) aTileEntity).mConnections & ~64) | -128); + ((BaseMetaPipeEntity) aTileEntity).mConnections = + (byte) ((((BaseMetaPipeEntity) aTileEntity).mConnections & ~64) | -128); } return true; } diff --git a/src/main/java/gregtech/api/items/GT_Spray_Hydration_Item.java b/src/main/java/gregtech/api/items/GT_Spray_Hydration_Item.java index 13ecdea3fa..e219220034 100644 --- a/src/main/java/gregtech/api/items/GT_Spray_Hydration_Item.java +++ b/src/main/java/gregtech/api/items/GT_Spray_Hydration_Item.java @@ -12,7 +12,7 @@ import net.minecraft.world.World; public class GT_Spray_Hydration_Item extends GT_Tool_Item { public GT_Spray_Hydration_Item(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage) { - super(aUnlocalized, aEnglish, "To hydrate Crops and similar", aMaxDamage, aEntityDamage, true);/* + super(aUnlocalized, aEnglish, "To hydrate Crops and similar", aMaxDamage, aEntityDamage, true); /* setCraftingSound(Sounds.IC2_TOOLS_PAINTER); setBreakingSound(Sounds.IC2_TOOLS_PAINTER); setEntityHitSound(Sounds.IC2_TOOLS_PAINTER); @@ -20,14 +20,24 @@ public class GT_Spray_Hydration_Item extends GT_Tool_Item { } @Override - public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUseFirst( + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { super.onItemUseFirst(aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ); if (aWorld.isRemote) { return false; } Block aBlock = aWorld.getBlock(aX, aY, aZ); if (aBlock == null) return false; -// byte aMeta = (byte)aWorld.getBlockMetadata(aX, aY, aZ); + // byte aMeta = (byte)aWorld.getBlockMetadata(aX, aY, aZ); TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); try { @@ -39,10 +49,13 @@ public class GT_Spray_Hydration_Item extends GT_Tool_Item { } return true; } - } catch (Throwable e) {/*Do nothing*/} + } catch (Throwable e) { + /*Do nothing*/ + } if (aTileEntity instanceof IGregTechTileEntity) { - if (((IGregTechTileEntity) aTileEntity).getColorization() >= 0 && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) { + if (((IGregTechTileEntity) aTileEntity).getColorization() >= 0 + && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) { ((IGregTechTileEntity) aTileEntity).setColorization((byte) -1); GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_PAINTER, 1.0F, -1, aX, aY, aZ); } diff --git a/src/main/java/gregtech/api/items/GT_Spray_Ice_Item.java b/src/main/java/gregtech/api/items/GT_Spray_Ice_Item.java index ddd9062d73..cb21ce60b6 100644 --- a/src/main/java/gregtech/api/items/GT_Spray_Ice_Item.java +++ b/src/main/java/gregtech/api/items/GT_Spray_Ice_Item.java @@ -1,10 +1,13 @@ package gregtech.api.items; +import static gregtech.api.enums.GT_Values.W; + import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.SoundResource; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; +import java.util.Arrays; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -12,13 +15,9 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import java.util.Arrays; - -import static gregtech.api.enums.GT_Values.W; - public class GT_Spray_Ice_Item extends GT_Tool_Item { public GT_Spray_Ice_Item(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage) { - super(aUnlocalized, aEnglish, "Very effective against Slimes", aMaxDamage, aEntityDamage, true);/* + super(aUnlocalized, aEnglish, "Very effective against Slimes", aMaxDamage, aEntityDamage, true); /* addToEffectiveList(EntitySlime.class.getName()); addToEffectiveList("BlueSlime"); addToEffectiveList("SlimeClone"); @@ -31,22 +30,36 @@ public class GT_Spray_Ice_Item extends GT_Tool_Item { setEntityHitSound(Sounds.IC2_TOOLS_PAINTER); setUsageAmounts(4, 16, 1);*/ - for (Object tName : Arrays.asList(OrePrefixes.bucket.get(Materials.Water), OrePrefixes.cell.get(Materials.Water), OrePrefixes.capsule.get(Materials.Water))) { - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.ice, 1, 0), new Object[]{new ItemStack(this, 1, W), tName}); + for (Object tName : Arrays.asList( + OrePrefixes.bucket.get(Materials.Water), + OrePrefixes.cell.get(Materials.Water), + OrePrefixes.capsule.get(Materials.Water))) { + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Blocks.ice, 1, 0), new Object[] {new ItemStack(this, 1, W), tName}); } } - /* - @Override - public void onHitEntity(Entity aEntity) { - if (aEntity instanceof EntityLiving) { - ((EntityLiving)aEntity).addPotionEffect(new PotionEffect(Potion.weakness.getId(), 400, 2, false)); - ((EntityLiving)aEntity).addPotionEffect(new PotionEffect(Potion.moveSlowdown.getId(), 400, 2, false)); - } - } - */ + /* + @Override + public void onHitEntity(Entity aEntity) { + if (aEntity instanceof EntityLiving) { + ((EntityLiving)aEntity).addPotionEffect(new PotionEffect(Potion.weakness.getId(), 400, 2, false)); + ((EntityLiving)aEntity).addPotionEffect(new PotionEffect(Potion.moveSlowdown.getId(), 400, 2, false)); + } + } + */ @Override - public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUseFirst( + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { super.onItemUseFirst(aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ); if (aWorld.isRemote) { return false; @@ -57,7 +70,7 @@ public class GT_Spray_Ice_Item extends GT_Tool_Item { Block aBlock = aWorld.getBlock(aX, aY, aZ); if (aBlock == null) return false; byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ); -// TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); + // TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (aBlock == Blocks.water || aBlock == Blocks.flowing_water) { if (aMeta == 0 && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) { diff --git a/src/main/java/gregtech/api/items/GT_Spray_Pepper_Item.java b/src/main/java/gregtech/api/items/GT_Spray_Pepper_Item.java index 890ce9e8e9..355017b2ff 100644 --- a/src/main/java/gregtech/api/items/GT_Spray_Pepper_Item.java +++ b/src/main/java/gregtech/api/items/GT_Spray_Pepper_Item.java @@ -1,16 +1,15 @@ package gregtech.api.items; import gregtech.api.util.GT_LanguageManager; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -import java.util.List; - public class GT_Spray_Pepper_Item extends GT_Tool_Item { public GT_Spray_Pepper_Item(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage) { - super(aUnlocalized, aEnglish, "To defend yourself against Bears", aMaxDamage, aEntityDamage, true);/* + super(aUnlocalized, aEnglish, "To defend yourself against Bears", aMaxDamage, aEntityDamage, true); /* setCraftingSound(GregTech_API.sSoundList.get(102)); setBreakingSound(GregTech_API.sSoundList.get(102)); setEntityHitSound(GregTech_API.sSoundList.get(102)); @@ -19,32 +18,45 @@ public class GT_Spray_Pepper_Item extends GT_Tool_Item { @Override public void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) { - aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_1", "especially Pedobears, Care Bears,")); - aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_2", "Confession Bears, Bear Grylls")); - aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_3", "And ofcourse Man-Bear-Pig")); + aList.add(GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".tooltip_1", "especially Pedobears, Care Bears,")); + aList.add(GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".tooltip_2", "Confession Bears, Bear Grylls")); + aList.add(GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".tooltip_3", "And ofcourse Man-Bear-Pig")); + } + /* + @Override + public void onHitEntity(Entity aEntity) { + if (aEntity instanceof EntityLiving) { + ((EntityLiving)aEntity).addPotionEffect(new PotionEffect(Potion.blindness.getId(), 1200, 2, false)); + ((EntityLiving)aEntity).addPotionEffect(new PotionEffect(Potion.poison.getId(), 120, 2, false)); + ((EntityLiving)aEntity).addPotionEffect(new PotionEffect(Potion.weakness.getId(), 200, 2, false)); + ((EntityLiving)aEntity).addPotionEffect(new PotionEffect(Potion.confusion.getId(), 600, 2, false)); + } } - /* - @Override - public void onHitEntity(Entity aEntity) { - if (aEntity instanceof EntityLiving) { - ((EntityLiving)aEntity).addPotionEffect(new PotionEffect(Potion.blindness.getId(), 1200, 2, false)); - ((EntityLiving)aEntity).addPotionEffect(new PotionEffect(Potion.poison.getId(), 120, 2, false)); - ((EntityLiving)aEntity).addPotionEffect(new PotionEffect(Potion.weakness.getId(), 200, 2, false)); - ((EntityLiving)aEntity).addPotionEffect(new PotionEffect(Potion.confusion.getId(), 600, 2, false)); - } - } - */ + */ @Override - public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUseFirst( + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { super.onItemUseFirst(aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ); if (aWorld.isRemote) { return false; } Block aBlock = aWorld.getBlock(aX, aY, aZ); if (aBlock == null) return false; -// byte aMeta = (byte)aWorld.getBlockMetadata(aX, aY, aZ); -// TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); + // byte aMeta = (byte)aWorld.getBlockMetadata(aX, aY, aZ); + // TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); return false; } diff --git a/src/main/java/gregtech/api/items/GT_Tool_Item.java b/src/main/java/gregtech/api/items/GT_Tool_Item.java index 736c7e4b13..78df3c9171 100644 --- a/src/main/java/gregtech/api/items/GT_Tool_Item.java +++ b/src/main/java/gregtech/api/items/GT_Tool_Item.java @@ -7,16 +7,54 @@ import net.minecraft.item.ItemStack; * This is just a basic Tool, which has normal durability and could break Blocks. */ public class GT_Tool_Item extends GT_Generic_Item { - public GT_Tool_Item(String aUnlocalized, String aEnglish, String aTooltip, int aMaxDamage, int aEntityDamage, boolean aSwingIfUsed) { + public GT_Tool_Item( + String aUnlocalized, + String aEnglish, + String aTooltip, + int aMaxDamage, + int aEntityDamage, + boolean aSwingIfUsed) { this(aUnlocalized, aEnglish, aTooltip, aMaxDamage, aEntityDamage, aSwingIfUsed, -1, -1); } - public GT_Tool_Item(String aUnlocalized, String aEnglish, String aTooltip, int aMaxDamage, int aEntityDamage, boolean aSwingIfUsed, int aChargedGTID, int aDisChargedGTID) { - this(aUnlocalized, aEnglish, aTooltip, aMaxDamage, aEntityDamage, aSwingIfUsed, aChargedGTID, aDisChargedGTID, 0, 0.0F); + public GT_Tool_Item( + String aUnlocalized, + String aEnglish, + String aTooltip, + int aMaxDamage, + int aEntityDamage, + boolean aSwingIfUsed, + int aChargedGTID, + int aDisChargedGTID) { + this( + aUnlocalized, + aEnglish, + aTooltip, + aMaxDamage, + aEntityDamage, + aSwingIfUsed, + aChargedGTID, + aDisChargedGTID, + 0, + 0.0F); } - public GT_Tool_Item(String aUnlocalized, String aEnglish, String aTooltip, int aMaxDamage, int aEntityDamage, boolean aSwingIfUsed, int aChargedGTID, int aDisChargedGTID, int aToolQuality, float aToolStrength) { - super(aUnlocalized, aEnglish, aTooltip, aTooltip != null && !aTooltip.equals("Doesn't work as intended, this is a Bug")); + public GT_Tool_Item( + String aUnlocalized, + String aEnglish, + String aTooltip, + int aMaxDamage, + int aEntityDamage, + boolean aSwingIfUsed, + int aChargedGTID, + int aDisChargedGTID, + int aToolQuality, + float aToolStrength) { + super( + aUnlocalized, + aEnglish, + aTooltip, + aTooltip != null && !aTooltip.equals("Doesn't work as intended, this is a Bug")); setMaxDamage(aMaxDamage); setMaxStackSize(1); setNoRepair(); diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java index 16a8ec8cca..0fdaa90c1a 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java @@ -1,5 +1,8 @@ package gregtech.api.metatileentity; +import static gregtech.GT_Mod.GT_FML_LOGGER; +import static gregtech.api.enums.GT_Values.NW; + import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.SoundResource; @@ -19,6 +22,7 @@ import gregtech.api.util.GT_Log; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; +import java.util.*; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; @@ -35,22 +39,24 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; -import java.util.*; - -import static gregtech.GT_Mod.GT_FML_LOGGER; -import static gregtech.api.enums.GT_Values.NW; - /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! * <p/> * This is the main TileEntity for EVERYTHING. */ -public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTechTileEntity, IPipeRenderedTileEntity, IDebugableTileEntity { +public class BaseMetaPipeEntity extends CommonMetaTileEntity + implements IGregTechTileEntity, IPipeRenderedTileEntity, IDebugableTileEntity { public byte mConnections = IConnectable.NO_CONNECTION; protected MetaPipeEntity mMetaTileEntity; private final int[] mTimeStatistics = new int[GregTech_API.TICKS_FOR_LAG_AVERAGING]; private boolean mWorkUpdate = false, mWorks = true; - private byte mColor = 0, oColor = 0, oStrongRedstone = 0, oRedstoneData = 63, oTextureData = 0, oUpdateData = 0, mLagWarningCount = 0; + private byte mColor = 0, + oColor = 0, + oStrongRedstone = 0, + oRedstoneData = 63, + oTextureData = 0, + oUpdateData = 0, + mLagWarningCount = 0; private int oX = 0, oY = 0, oZ = 0, mTimeStatisticsIndex = 0; protected Node node; protected NodePath nodePath; @@ -100,8 +106,7 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec } } - public BaseMetaPipeEntity() { - } + public BaseMetaPipeEntity() {} @Override public void writeToNBT(NBTTagCompound aNBT) { @@ -141,7 +146,7 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec mColor = aNBT.getByte("mColor"); mWorks = !aNBT.getBoolean("mWorks"); - if (mSidedRedstone.length != 6) mSidedRedstone = new byte[]{0, 0, 0, 0, 0, 0}; + if (mSidedRedstone.length != 6) mSidedRedstone = new byte[] {0, 0, 0, 0, 0, 0}; readCoverNBT(aNBT); loadMetaTileNBT(aNBT); @@ -164,8 +169,7 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec oX = xCoord; oY = yCoord; oZ = zCoord; - if (isServerSide()) - checkDropCover(); + if (isServerSide()) checkDropCover(); else { requestCoverDataIfNeeded(); } @@ -186,15 +190,16 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec } } if (isServerSide() && mTickTimer > 10) { - if (!doCoverThings()) - return; + if (!doCoverThings()) return; final byte oldConnections = mConnections; // Mask-out connection direction bits to keep only Foam related connections mConnections = (byte) (mMetaTileEntity.mConnections | (mConnections & ~IConnectable.CONNECTED_ALL)); // If foam not hardened, tries roll chance to harden - if ((mConnections & IConnectable.HAS_FOAM) == IConnectable.HAS_FRESHFOAM && getRandomNumber(1000) == 0) { - mConnections = (byte) ((mConnections & ~IConnectable.HAS_FRESHFOAM) | IConnectable.HAS_HARDENEDFOAM); + if ((mConnections & IConnectable.HAS_FOAM) == IConnectable.HAS_FRESHFOAM + && getRandomNumber(1000) == 0) { + mConnections = + (byte) ((mConnections & ~IConnectable.HAS_FRESHFOAM) | IConnectable.HAS_HARDENEDFOAM); } if (mTickTimer > 12 && oldConnections != mConnections) GregTech_API.causeCableUpdate(worldObj, xCoord, yCoord, zCoord); @@ -230,7 +235,12 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec byte tData = mMetaTileEntity.getUpdateData(); if (tData != oUpdateData) sendBlockEvent((byte) 1, oUpdateData = tData); if (mColor != oColor) sendBlockEvent((byte) 2, oColor = mColor); - tData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0)); + tData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) + | ((mSidedRedstone[1] > 0) ? 2 : 0) + | ((mSidedRedstone[2] > 0) ? 4 : 0) + | ((mSidedRedstone[3] > 0) ? 8 : 0) + | ((mSidedRedstone[4] > 0) ? 16 : 0) + | ((mSidedRedstone[5] > 0) ? 32 : 0)); if (tData != oRedstoneData) sendBlockEvent((byte) 3, oRedstoneData = tData); } @@ -249,9 +259,16 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec if (isServerSide() && hasValidMetaTileEntity()) { tTime = System.nanoTime() - tTime; if (mTimeStatistics.length > 0) - mTimeStatistics[mTimeStatisticsIndex = (mTimeStatisticsIndex + 1) % mTimeStatistics.length] = (int) tTime; - if (tTime > 0 && tTime > (GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING* 1000000L) && mTickTimer > 1000 && getMetaTileEntity().doTickProfilingMessageDuringThisTick() && mLagWarningCount++ < 10) - GT_FML_LOGGER.warn("WARNING: Possible Lag Source at ["+xCoord+","+yCoord+","+zCoord+"] in Dimension "+worldObj.provider.dimensionId+" with "+tTime+" ns caused by an instance of "+getMetaTileEntity().getClass()); + mTimeStatistics[mTimeStatisticsIndex = (mTimeStatisticsIndex + 1) % mTimeStatistics.length] = + (int) tTime; + if (tTime > 0 + && tTime > (GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING * 1000000L) + && mTickTimer > 1000 + && getMetaTileEntity().doTickProfilingMessageDuringThisTick() + && mLagWarningCount++ < 10) + GT_FML_LOGGER.warn("WARNING: Possible Lag Source at [" + xCoord + "," + yCoord + "," + zCoord + + "] in Dimension " + worldObj.provider.dimensionId + " with " + tTime + + " ns caused by an instance of " + getMetaTileEntity().getClass()); } mWorkUpdate = mInventoryChanged = false; @@ -260,20 +277,46 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec private void sendClientData() { if (mSendClientData) { NW.sendPacketToAllPlayersInRange( - worldObj, - new GT_Packet_TileEntity( - xCoord, (short) yCoord, zCoord, mID, mCoverSides[0], mCoverSides[1], mCoverSides[2], mCoverSides[3], mCoverSides[4], mCoverSides[5], oTextureData = mConnections, - oUpdateData = hasValidMetaTileEntity() ? mMetaTileEntity.getUpdateData() : 0, - oRedstoneData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0)), - oColor = mColor - ), xCoord, zCoord - ); + worldObj, + new GT_Packet_TileEntity( + xCoord, + (short) yCoord, + zCoord, + mID, + mCoverSides[0], + mCoverSides[1], + mCoverSides[2], + mCoverSides[3], + mCoverSides[4], + mCoverSides[5], + oTextureData = mConnections, + oUpdateData = hasValidMetaTileEntity() ? mMetaTileEntity.getUpdateData() : 0, + oRedstoneData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) + | ((mSidedRedstone[1] > 0) ? 2 : 0) + | ((mSidedRedstone[2] > 0) ? 4 : 0) + | ((mSidedRedstone[3] > 0) ? 8 : 0) + | ((mSidedRedstone[4] > 0) ? 16 : 0) + | ((mSidedRedstone[5] > 0) ? 32 : 0)), + oColor = mColor), + xCoord, + zCoord); mSendClientData = false; } sendCoverDataIfNeeded(); } - public final void receiveMetaTileEntityData(short aID, int aCover0, int aCover1, int aCover2, int aCover3, int aCover4, int aCover5, byte aTextureData, byte aUpdateData, byte aRedstoneData, byte aColorData) { + public final void receiveMetaTileEntityData( + short aID, + int aCover0, + int aCover1, + int aCover2, + int aCover3, + int aCover4, + int aCover5, + byte aTextureData, + byte aUpdateData, + byte aRedstoneData, + byte aColorData) { issueTextureUpdate(); if (aID > 0 && mID != aID) { mID = aID; @@ -347,7 +390,13 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec public ArrayList<String> getDebugInfo(EntityPlayer aPlayer, int aLogLevel) { final ArrayList<String> tList = new ArrayList<>(); if (aLogLevel > 3) { - tList.add("Meta-ID: " + EnumChatFormatting.BLUE+ mID +EnumChatFormatting.RESET + (hasValidMetaTileEntity() ? EnumChatFormatting.GREEN+" valid"+EnumChatFormatting.RESET : EnumChatFormatting.RED+" invalid"+EnumChatFormatting.RESET) + (mMetaTileEntity == null ? EnumChatFormatting.RED+" MetaTileEntity == null!"+EnumChatFormatting.RESET : " ")); + tList.add("Meta-ID: " + EnumChatFormatting.BLUE + mID + EnumChatFormatting.RESET + + (hasValidMetaTileEntity() + ? EnumChatFormatting.GREEN + " valid" + EnumChatFormatting.RESET + : EnumChatFormatting.RED + " invalid" + EnumChatFormatting.RESET) + + (mMetaTileEntity == null + ? EnumChatFormatting.RED + " MetaTileEntity == null!" + EnumChatFormatting.RESET + : " ")); } if (aLogLevel > 1) { if (mTimeStatistics.length > 0) { @@ -359,21 +408,27 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec tWorstTime = tTime; } } - tList.add("Average CPU-load of ~" + (tAverageTime / mTimeStatistics.length) + "ns since " + mTimeStatistics.length + " ticks with worst time of " + tWorstTime + "ns."); + tList.add("Average CPU-load of ~" + (tAverageTime / mTimeStatistics.length) + "ns since " + + mTimeStatistics.length + " ticks with worst time of " + tWorstTime + "ns."); } if (mLagWarningCount > 0) { - tList.add("Caused " + (mLagWarningCount >= 10 ? "more than 10" : mLagWarningCount) + " Lag Spike Warnings (anything taking longer than " + GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING + "ms) on the Server."); + tList.add("Caused " + (mLagWarningCount >= 10 ? "more than 10" : mLagWarningCount) + + " Lag Spike Warnings (anything taking longer than " + + GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING + "ms) on the Server."); } if (mMetaTileEntity != null) { - tList.add("Is" + (mMetaTileEntity.isAccessAllowed(aPlayer) ? " " : EnumChatFormatting.RED+" not "+EnumChatFormatting.RESET) + "accessible for you"); + tList.add("Is" + + (mMetaTileEntity.isAccessAllowed(aPlayer) + ? " " + : EnumChatFormatting.RED + " not " + EnumChatFormatting.RESET) + + "accessible for you"); } } - if(joinedIc2Enet) - tList.add("Joined IC2 ENet"); + if (joinedIc2Enet) tList.add("Joined IC2 ENet"); - return mMetaTileEntity != null ? - mMetaTileEntity.getSpecialDebugInfo(this, aPlayer, aLogLevel, tList) : - new ArrayList<>(); + return mMetaTileEntity != null + ? mMetaTileEntity.getSpecialDebugInfo(this, aPlayer, aLogLevel, tList) + : new ArrayList<>(); } @Override @@ -382,7 +437,6 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec return false; } - @Override public byte getBackFacing() { return GT_Utility.getOppositeSide(getFrontFacing()); @@ -415,7 +469,8 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec markDirty(); mInventoryChanged = true; if (canAccessData()) - mMetaTileEntity.setInventorySlotContents(aIndex, worldObj.isRemote ? aStack : GT_OreDictUnificator.setStack(true, aStack)); + mMetaTileEntity.setInventorySlotContents( + aIndex, worldObj.isRemote ? aStack : GT_OreDictUnificator.setStack(true, aStack)); } @Override @@ -432,14 +487,22 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec } @Override - public void openInventory() {/*Do nothing*/} + public void openInventory() { + /*Do nothing*/ + } @Override - public void closeInventory() {/*Do nothing*/} + public void closeInventory() { + /*Do nothing*/ + } @Override public boolean isUseableByPlayer(EntityPlayer aPlayer) { - return hasValidMetaTileEntity() && mTickTimer > 40 && getTileEntityOffset(0, 0, 0) == this && aPlayer.getDistanceSq(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5) < 64 && mMetaTileEntity.isAccessAllowed(aPlayer); + return hasValidMetaTileEntity() + && mTickTimer > 40 + && getTileEntityOffset(0, 0, 0) == this + && aPlayer.getDistanceSq(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5) < 64 + && mMetaTileEntity.isAccessAllowed(aPlayer); } @Override @@ -541,7 +604,9 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec } @Override - public void setWorkDataValue(byte aValue) {/*Do nothing*/} + public void setWorkDataValue(byte aValue) { + /*Do nothing*/ + } @Override public int getMetaTileID() { @@ -559,7 +624,9 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec } @Override - public void setActive(boolean aActive) {/*Do nothing*/} + public void setActive(boolean aActive) { + /*Do nothing*/ + } @Override public long getTimer() { @@ -636,11 +703,10 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec return 0; } - @Override public ITexture[] getTexture(Block aBlock, byte aSide) { ITexture rIcon = getCoverTexture(aSide); - if (rIcon != null) return new ITexture[]{rIcon}; + if (rIcon != null) return new ITexture[] {rIcon}; return getTextureUncovered(aSide); } @@ -664,11 +730,18 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec if ((mConnections & IConnectable.HAS_HARDENEDFOAM) != 0) return Textures.BlockIcons.HARDENEDFOAMS[mColor]; if ((mConnections & IConnectable.HAS_FOAM) != 0) return Textures.BlockIcons.ERROR_RENDERING; byte tConnections = mConnections; - if (tConnections == IConnectable.CONNECTED_WEST || tConnections == IConnectable.CONNECTED_EAST) tConnections = (byte) (IConnectable.CONNECTED_WEST | IConnectable.CONNECTED_EAST); - else if (tConnections == IConnectable.CONNECTED_DOWN || tConnections == IConnectable.CONNECTED_UP) tConnections = (byte) (IConnectable.CONNECTED_DOWN | IConnectable.CONNECTED_UP); - else if (tConnections == IConnectable.CONNECTED_NORTH || tConnections == IConnectable.CONNECTED_SOUTH) tConnections = (byte) (IConnectable.CONNECTED_NORTH | IConnectable.CONNECTED_SOUTH); + if (tConnections == IConnectable.CONNECTED_WEST || tConnections == IConnectable.CONNECTED_EAST) + tConnections = (byte) (IConnectable.CONNECTED_WEST | IConnectable.CONNECTED_EAST); + else if (tConnections == IConnectable.CONNECTED_DOWN || tConnections == IConnectable.CONNECTED_UP) + tConnections = (byte) (IConnectable.CONNECTED_DOWN | IConnectable.CONNECTED_UP); + else if (tConnections == IConnectable.CONNECTED_NORTH || tConnections == IConnectable.CONNECTED_SOUTH) + tConnections = (byte) (IConnectable.CONNECTED_NORTH | IConnectable.CONNECTED_SOUTH); if (hasValidMetaTileEntity()) - return mMetaTileEntity.getTexture(this, aSide, tConnections, (byte) (mColor - 1), + return mMetaTileEntity.getTexture( + this, + aSide, + tConnections, + (byte) (mColor - 1), tConnections == 0 || (tConnections & (1 << aSide)) != 0, getOutputRedstoneSignal(aSide) > 0); return Textures.BlockIcons.ERROR_RENDERING; @@ -679,7 +752,6 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec return mMetaTileEntity != null && mMetaTileEntity.getBaseMetaTileEntity() == this; } - @Override public void doExplosion(long aAmount) { if (canAccessData()) { @@ -697,12 +769,11 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec for (byte i = 0; i < mCoverSides.length; i++) { if (mCoverSides[i] != 0) { if (mCoverData[i] != null) // this really shouldn't be null if a cover is there already, but whatever - tNBT.setTag(COVER_DATA_NBT_KEYS[i], mCoverData[i].saveDataToNBT()); + tNBT.setTag(COVER_DATA_NBT_KEYS[i], mCoverData[i].saveDataToNBT()); hasCover = true; } } - if (hasCover) - tNBT.setIntArray("mCoverSides", mCoverSides); + if (hasCover) tNBT.setIntArray("mCoverSides", mCoverSides); if (hasValidMetaTileEntity()) mMetaTileEntity.setItemNBT(tNBT); if (!tNBT.hasNoTags()) rStack.setTagCompound(tNBT); return new ArrayList<>(Collections.singletonList(rStack)); @@ -711,9 +782,10 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec @Override public boolean onRightclick(EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) { if (isClientSide()) { - //Configure Cover, sneak can also be: screwdriver, wrench, side cutter, soldering iron + // Configure Cover, sneak can also be: screwdriver, wrench, side cutter, soldering iron if (aPlayer.isSneaking()) { - byte tSide = (getCoverIDAtSide(aSide) == 0) ? GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ) : aSide; + byte tSide = + (getCoverIDAtSide(aSide) == 0) ? GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ) : aSide; return (getCoverBehaviorAtSideNew(tSide).hasCoverGUI()); } else if (getCoverBehaviorAtSideNew(aSide).onCoverRightclickClient(aSide, this, aPlayer, aX, aY, aZ)) { return true; @@ -722,7 +794,8 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec if (isServerSide()) { ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem(); if (tCurrentItem != null) { - if (getColorization() >= 0 && GT_Utility.areStacksEqual(new ItemStack(Items.water_bucket, 1), tCurrentItem)) { + if (getColorization() >= 0 + && GT_Utility.areStacksEqual(new ItemStack(Items.water_bucket, 1), tCurrentItem)) { mMetaTileEntity.markDirty(); tCurrentItem.func_150996_a(Items.bucket); setColorization((byte) -1); @@ -733,33 +806,59 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec if (mMetaTileEntity.onWrenchRightClick(aSide, tSide, aPlayer, aX, aY, aZ)) { mMetaTileEntity.markDirty(); GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer); - GT_Utility.sendSoundToPlayers(worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); + GT_Utility.sendSoundToPlayers( + worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); } return true; } if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sScrewdriverList)) { if (getCoverIDAtSide(aSide) == 0 && getCoverIDAtSide(tSide) != 0) { if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 200, aPlayer)) { - setCoverDataAtSide(tSide, getCoverBehaviorAtSideNew(tSide).onCoverScrewdriverClick(tSide, getCoverIDAtSide(tSide), getComplexCoverDataAtSide(tSide), this, aPlayer, 0.5F, 0.5F, 0.5F)); + setCoverDataAtSide( + tSide, + getCoverBehaviorAtSideNew(tSide) + .onCoverScrewdriverClick( + tSide, + getCoverIDAtSide(tSide), + getComplexCoverDataAtSide(tSide), + this, + aPlayer, + 0.5F, + 0.5F, + 0.5F)); mMetaTileEntity.onScrewdriverRightClick(tSide, aPlayer, aX, aY, aZ); mMetaTileEntity.markDirty(); - GT_Utility.sendSoundToPlayers(worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); + GT_Utility.sendSoundToPlayers( + worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); } } else { if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer)) { - setCoverDataAtSide(aSide, getCoverBehaviorAtSideNew(aSide).onCoverScrewdriverClick(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this, aPlayer, aX, aY, aZ)); + setCoverDataAtSide( + aSide, + getCoverBehaviorAtSideNew(aSide) + .onCoverScrewdriverClick( + aSide, + getCoverIDAtSide(aSide), + getComplexCoverDataAtSide(aSide), + this, + aPlayer, + aX, + aY, + aZ)); mMetaTileEntity.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); mMetaTileEntity.markDirty(); - GT_Utility.sendSoundToPlayers(worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); + GT_Utility.sendSoundToPlayers( + worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); } } return true; } if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sHardHammerList)) { - //if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer)) { - // GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(1), 1.0F, -1, xCoord, yCoord, zCoord); - //} + // if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer)) { + // GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(1), 1.0F, -1, xCoord, yCoord, + // zCoord); + // } return true; } @@ -768,8 +867,14 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec if (mWorks) disableWorking(); else enableWorking(); mMetaTileEntity.markDirty(); - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("090","Machine Processing: ") + (isAllowedToWork() ? GT_Utility.trans("088","Enabled") : GT_Utility.trans("087","Disabled"))); - GT_Utility.sendSoundToPlayers(worldObj, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1, xCoord, yCoord, zCoord); + GT_Utility.sendChatToPlayer( + aPlayer, + GT_Utility.trans("090", "Machine Processing: ") + + (isAllowedToWork() + ? GT_Utility.trans("088", "Enabled") + : GT_Utility.trans("087", "Disabled"))); + GT_Utility.sendSoundToPlayers( + worldObj, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1, xCoord, yCoord, zCoord); } return true; } @@ -777,23 +882,33 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWireCutterList)) { if (mMetaTileEntity.onWireCutterRightClick(aSide, tSide, aPlayer, aX, aY, aZ)) { mMetaTileEntity.markDirty(); - //logic handled internally - GT_Utility.sendSoundToPlayers(worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); + // logic handled internally + GT_Utility.sendSoundToPlayers( + worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); } doEnetUpdate(); return true; } if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSolderingToolList)) { - if (mMetaTileEntity.onSolderingToolRightClick(aSide, tSide, aPlayer, aX, aY, aZ)) { + if (mMetaTileEntity.onSolderingToolRightClick(aSide, tSide, aPlayer, aX, aY, aZ)) { mMetaTileEntity.markDirty(); - //logic handled internally - GT_Utility.sendSoundToPlayers(worldObj, SoundResource.IC2_TOOLS_BATTERY_USE, 1.0F, -1, xCoord, yCoord, zCoord); + // logic handled internally + GT_Utility.sendSoundToPlayers( + worldObj, SoundResource.IC2_TOOLS_BATTERY_USE, 1.0F, -1, xCoord, yCoord, zCoord); } else if (GT_ModHandler.useSolderingIron(tCurrentItem, aPlayer)) { mMetaTileEntity.markDirty(); mStrongRedstone ^= (1 << tSide); - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("091","Redstone Output at Side ") + tSide + GT_Utility.trans("092"," set to: ") + ((mStrongRedstone & (1 << tSide)) != 0 ? GT_Utility.trans("093","Strong") : GT_Utility.trans("094","Weak"))); - GT_Utility.sendSoundToPlayers(worldObj, SoundResource.IC2_TOOLS_BATTERY_USE, 3.0F, -1, xCoord, yCoord, zCoord); + GT_Utility.sendChatToPlayer( + aPlayer, + GT_Utility.trans("091", "Redstone Output at Side ") + + tSide + + GT_Utility.trans("092", " set to: ") + + ((mStrongRedstone & (1 << tSide)) != 0 + ? GT_Utility.trans("093", "Strong") + : GT_Utility.trans("094", "Weak"))); + GT_Utility.sendSoundToPlayers( + worldObj, SoundResource.IC2_TOOLS_BATTERY_USE, 3.0F, -1, xCoord, yCoord, zCoord); issueBlockUpdate(); } doEnetUpdate(); @@ -805,43 +920,59 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec if (getCoverIDAtSide(coverSide) == 0) { if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sCovers.keySet())) { - if (GregTech_API.getCoverBehaviorNew(tCurrentItem).isCoverPlaceable(coverSide, tCurrentItem, this) && - mMetaTileEntity.allowCoverOnSide(coverSide, new GT_ItemStack(tCurrentItem))) - { + if (GregTech_API.getCoverBehaviorNew(tCurrentItem) + .isCoverPlaceable(coverSide, tCurrentItem, this) + && mMetaTileEntity.allowCoverOnSide(coverSide, new GT_ItemStack(tCurrentItem))) { setCoverItemAtSide(coverSide, tCurrentItem); mMetaTileEntity.markDirty(); if (!aPlayer.capabilities.isCreativeMode) tCurrentItem.stackSize--; - GT_Utility.sendSoundToPlayers(worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); + GT_Utility.sendSoundToPlayers( + worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); } return true; } } else { if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sCrowbarList)) { if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer)) { - GT_Utility.sendSoundToPlayers(worldObj, SoundResource.RANDOM_BREAK, 1.0F, -1, xCoord, yCoord, zCoord); + GT_Utility.sendSoundToPlayers( + worldObj, SoundResource.RANDOM_BREAK, 1.0F, -1, xCoord, yCoord, zCoord); dropCover(coverSide, aSide, false); mMetaTileEntity.markDirty(); } return true; } } - } - else if (aPlayer.isSneaking()) { //Sneak click, no tool -> open cover config or turn back. + } else if (aPlayer.isSneaking()) { // Sneak click, no tool -> open cover config or turn back. aSide = (getCoverIDAtSide(aSide) == 0) ? GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ) : aSide; - return getCoverIDAtSide(aSide) > 0 && getCoverBehaviorAtSideNew(aSide).onCoverShiftRightClick(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this, aPlayer); + return getCoverIDAtSide(aSide) > 0 + && getCoverBehaviorAtSideNew(aSide) + .onCoverShiftRightClick( + aSide, + getCoverIDAtSide(aSide), + getComplexCoverDataAtSide(aSide), + this, + aPlayer); } - if (getCoverBehaviorAtSideNew(aSide).onCoverRightClick(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this, aPlayer, aX, aY, aZ)) - return true; + if (getCoverBehaviorAtSideNew(aSide) + .onCoverRightClick( + aSide, + getCoverIDAtSide(aSide), + getComplexCoverDataAtSide(aSide), + this, + aPlayer, + aX, + aY, + aZ)) return true; } - if (!getCoverBehaviorAtSideNew(aSide).isGUIClickable(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this)) - return false; + if (!getCoverBehaviorAtSideNew(aSide) + .isGUIClickable(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this)) return false; try { if (!aPlayer.isSneaking() && hasValidMetaTileEntity()) { boolean handled = mMetaTileEntity.onRightclick(this, aPlayer, aSide, aX, aY, aZ); - if(handled) { + if (handled) { mMetaTileEntity.markDirty(); } return handled; @@ -896,8 +1027,21 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec */ @Override public int[] getAccessibleSlotsFromSide(int aSide) { - if (canAccessData() && (getCoverBehaviorAtSideNew((byte) aSide).letsItemsOut((byte) aSide, getCoverIDAtSide((byte) aSide), getComplexCoverDataAtSide((byte) aSide), -1, this) || getCoverBehaviorAtSideNew((byte) aSide).letsItemsIn((byte) aSide, getCoverIDAtSide((byte) aSide), getComplexCoverDataAtSide((byte) aSide), -1, this))) - return mMetaTileEntity.getAccessibleSlotsFromSide(aSide); + if (canAccessData() + && (getCoverBehaviorAtSideNew((byte) aSide) + .letsItemsOut( + (byte) aSide, + getCoverIDAtSide((byte) aSide), + getComplexCoverDataAtSide((byte) aSide), + -1, + this) + || getCoverBehaviorAtSideNew((byte) aSide) + .letsItemsIn( + (byte) aSide, + getCoverIDAtSide((byte) aSide), + getComplexCoverDataAtSide((byte) aSide), + -1, + this))) return mMetaTileEntity.getAccessibleSlotsFromSide(aSide); return GT_Values.emptyIntArray; } @@ -906,7 +1050,15 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec */ @Override public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { - return canAccessData() && getCoverBehaviorAtSideNew((byte) aSide).letsItemsIn((byte) aSide, getCoverIDAtSide((byte) aSide), getComplexCoverDataAtSide((byte) aSide), aIndex, this) && mMetaTileEntity.canInsertItem(aIndex, aStack, aSide); + return canAccessData() + && getCoverBehaviorAtSideNew((byte) aSide) + .letsItemsIn( + (byte) aSide, + getCoverIDAtSide((byte) aSide), + getComplexCoverDataAtSide((byte) aSide), + aIndex, + this) + && mMetaTileEntity.canInsertItem(aIndex, aStack, aSide); } /** @@ -914,7 +1066,15 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec */ @Override public boolean canExtractItem(int aIndex, ItemStack aStack, int aSide) { - return canAccessData() && getCoverBehaviorAtSideNew((byte) aSide).letsItemsOut((byte) aSide, getCoverIDAtSide((byte) aSide), getComplexCoverDataAtSide((byte) aSide), aIndex, this) && mMetaTileEntity.canExtractItem(aIndex, aStack, aSide); + return canAccessData() + && getCoverBehaviorAtSideNew((byte) aSide) + .letsItemsOut( + (byte) aSide, + getCoverIDAtSide((byte) aSide), + getComplexCoverDataAtSide((byte) aSide), + aIndex, + this) + && mMetaTileEntity.canExtractItem(aIndex, aStack, aSide); } @Override @@ -997,9 +1157,7 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec } @Override - public void setOwnerUuid(UUID uuid) { - - } + public void setOwnerUuid(UUID uuid) {} @Override public byte getComparatorValue(byte aSide) { @@ -1039,42 +1197,63 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec } private boolean canMoveFluidOnSide(ForgeDirection aSide, Fluid aFluid, boolean isFill) { - if (aSide == ForgeDirection.UNKNOWN) - return true; + if (aSide == ForgeDirection.UNKNOWN) return true; IFluidHandler tTileEntity = getITankContainerAtSide((byte) aSide.ordinal()); - // Only require a connection if there's something to connect to - Allows fluid cells & buckets to interact with the pipe - if (tTileEntity != null && !mMetaTileEntity.isConnectedAtSide((byte) aSide.ordinal())) - return false; - - if(isFill && mMetaTileEntity.isLiquidInput((byte) aSide.ordinal()) - && getCoverBehaviorAtSideNew((byte) aSide.ordinal()).letsFluidIn((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getComplexCoverDataAtSide((byte) aSide.ordinal()), aFluid, this)) - return true; - - if (!isFill && mMetaTileEntity.isLiquidOutput((byte) aSide.ordinal()) - && getCoverBehaviorAtSideNew((byte) aSide.ordinal()).letsFluidOut((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getComplexCoverDataAtSide((byte) aSide.ordinal()),aFluid, this)) - return true; + // Only require a connection if there's something to connect to - Allows fluid cells & buckets to interact with + // the pipe + if (tTileEntity != null && !mMetaTileEntity.isConnectedAtSide((byte) aSide.ordinal())) return false; + + if (isFill + && mMetaTileEntity.isLiquidInput((byte) aSide.ordinal()) + && getCoverBehaviorAtSideNew((byte) aSide.ordinal()) + .letsFluidIn( + (byte) aSide.ordinal(), + getCoverIDAtSide((byte) aSide.ordinal()), + getComplexCoverDataAtSide((byte) aSide.ordinal()), + aFluid, + this)) return true; + + if (!isFill + && mMetaTileEntity.isLiquidOutput((byte) aSide.ordinal()) + && getCoverBehaviorAtSideNew((byte) aSide.ordinal()) + .letsFluidOut( + (byte) aSide.ordinal(), + getCoverIDAtSide((byte) aSide.ordinal()), + getComplexCoverDataAtSide((byte) aSide.ordinal()), + aFluid, + this)) return true; return false; } @Override public int fill(ForgeDirection aSide, FluidStack aFluidStack, boolean doFill) { - if (mTickTimer > 5 && canAccessData() && canMoveFluidOnSide(aSide, aFluidStack == null ? null : aFluidStack.getFluid(), true)) + if (mTickTimer > 5 + && canAccessData() + && canMoveFluidOnSide(aSide, aFluidStack == null ? null : aFluidStack.getFluid(), true)) return mMetaTileEntity.fill(aSide, aFluidStack, doFill); return 0; } @Override public FluidStack drain(ForgeDirection aSide, int maxDrain, boolean doDrain) { - if (mTickTimer > 5 && canAccessData() && canMoveFluidOnSide(aSide, mMetaTileEntity.getFluid() == null ? null : mMetaTileEntity.getFluid().getFluid(), false)) - return mMetaTileEntity.drain(aSide, maxDrain, doDrain); + if (mTickTimer > 5 + && canAccessData() + && canMoveFluidOnSide( + aSide, + mMetaTileEntity.getFluid() == null + ? null + : mMetaTileEntity.getFluid().getFluid(), + false)) return mMetaTileEntity.drain(aSide, maxDrain, doDrain); return null; } @Override public FluidStack drain(ForgeDirection aSide, FluidStack aFluidStack, boolean doDrain) { - if (mTickTimer > 5 && canAccessData() && canMoveFluidOnSide(aSide, aFluidStack == null ? null : aFluidStack.getFluid(), false)) + if (mTickTimer > 5 + && canAccessData() + && canMoveFluidOnSide(aSide, aFluidStack == null ? null : aFluidStack.getFluid(), false)) return mMetaTileEntity.drain(aSide, aFluidStack, doDrain); return null; } @@ -1096,15 +1275,26 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec @Override public FluidTankInfo[] getTankInfo(ForgeDirection aSide) { if (canAccessData() - && (aSide == ForgeDirection.UNKNOWN - || (mMetaTileEntity.isLiquidInput((byte) aSide.ordinal()) - && getCoverBehaviorAtSideNew((byte) aSide.ordinal()).letsFluidIn((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getComplexCoverDataAtSide((byte) aSide.ordinal()), null, this)) - || (mMetaTileEntity.isLiquidOutput((byte) aSide.ordinal()) && getCoverBehaviorAtSideNew((byte) aSide.ordinal()).letsFluidOut((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getComplexCoverDataAtSide((byte) aSide.ordinal()), null, this)) - // Doesn't need to be connected to get Tank Info -- otherwise things can't connect - ) - ) - return mMetaTileEntity.getTankInfo(aSide); - return new FluidTankInfo[]{}; + && (aSide == ForgeDirection.UNKNOWN + || (mMetaTileEntity.isLiquidInput((byte) aSide.ordinal()) + && getCoverBehaviorAtSideNew((byte) aSide.ordinal()) + .letsFluidIn( + (byte) aSide.ordinal(), + getCoverIDAtSide((byte) aSide.ordinal()), + getComplexCoverDataAtSide((byte) aSide.ordinal()), + null, + this)) + || (mMetaTileEntity.isLiquidOutput((byte) aSide.ordinal()) + && getCoverBehaviorAtSideNew((byte) aSide.ordinal()) + .letsFluidOut( + (byte) aSide.ordinal(), + getCoverIDAtSide((byte) aSide.ordinal()), + getComplexCoverDataAtSide((byte) aSide.ordinal()), + null, + this)) + // Doesn't need to be connected to get Tank Info -- otherwise things can't connect + )) return mMetaTileEntity.getTankInfo(aSide); + return new FluidTankInfo[] {}; } @Override @@ -1117,7 +1307,9 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec return true; } aStack = GT_OreDictUnificator.get(aStack); - if (GT_Utility.areStacksEqual(tStack, aStack) && tStack.stackSize + aStack.stackSize <= Math.min(aStack.getMaxStackSize(), getInventoryStackLimit())) { + if (GT_Utility.areStacksEqual(tStack, aStack) + && tStack.stackSize + aStack.stackSize + <= Math.min(aStack.getMaxStackSize(), getInventoryStackLimit())) { markDirty(); tStack.stackSize += aStack.stackSize; return true; @@ -1183,7 +1375,7 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec public String[] getInfoData() { { if (canAccessData()) return getMetaTileEntity().getInfoData(); - return new String[]{}; + return new String[] {}; } } @@ -1196,7 +1388,8 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec if (canAccessData()) { final IMetaTileEntity meta = getMetaTileEntity(); if (meta instanceof MetaPipeEntity) { - // Trigger a checking of connections in case someone placed down a block that the pipe/wire shouldn't be connected to. + // Trigger a checking of connections in case someone placed down a block that the pipe/wire shouldn't be + // connected to. // However; don't do it immediately in case the world isn't finished loading // (This caused issues with AE2 GTEU p2p connections. ((MetaPipeEntity) meta).setCheckConnections(); @@ -1210,7 +1403,14 @@ public class BaseMetaPipeEntity extends CommonMetaTileEntity implements IGregTec } @Override - public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List<AxisAlignedBB> outputAABB, Entity collider) { + public void addCollisionBoxesToList( + World aWorld, + int aX, + int aY, + int aZ, + AxisAlignedBB inputAABB, + List<AxisAlignedBB> outputAABB, + Entity collider) { mMetaTileEntity.addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider); } diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java index b68715770c..911c1cabcb 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -1,5 +1,10 @@ package gregtech.api.metatileentity; +import static gregtech.GT_Mod.GT_FML_LOGGER; +import static gregtech.api.enums.GT_Values.NW; +import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; + import appeng.api.networking.IGridNode; import appeng.api.networking.security.IActionHost; import appeng.api.util.AECableType; @@ -9,11 +14,9 @@ import appeng.me.helpers.IGridProxyable; import appeng.tile.TileEvent; import appeng.tile.events.TileEventType; import com.gtnewhorizon.structurelib.alignment.IAlignment; -import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; import com.gtnewhorizon.structurelib.alignment.IAlignmentProvider; import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; import com.gtnewhorizon.structurelib.alignment.constructable.IConstructableProvider; -import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing; import cpw.mods.fml.common.Optional; import cpw.mods.fml.relauncher.ReflectionHelper; import gregtech.GT_Mod; @@ -38,6 +41,9 @@ import gregtech.api.objects.GT_ItemStack; import gregtech.api.util.*; import gregtech.common.GT_Pollution; import ic2.api.Direction; +import java.lang.reflect.Field; +import java.util.*; +import javax.annotation.Nullable; import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; import net.minecraft.block.Block; @@ -61,27 +67,34 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; -import javax.annotation.Nullable; -import java.lang.reflect.Field; -import java.util.*; - -import static gregtech.GT_Mod.GT_FML_LOGGER; -import static gregtech.api.enums.GT_Values.NW; -import static gregtech.api.enums.GT_Values.V; -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; - /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! * <p/> * This is the main TileEntity for EVERYTHING. */ -@Optional.InterfaceList(value = { - @Optional.Interface(iface = "appeng.api.networking.security.IActionHost", modid = "appliedenergistics2", striprefs = true), - @Optional.Interface(iface = "appeng.me.helpers.IGridProxyable", modid = "appliedenergistics2", striprefs = true)}) -public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTechTileEntity, IActionHost, IGridProxyable, IAlignmentProvider, IConstructableProvider, IDebugableTileEntity, IGregtechWailaProvider { - private static final Field ENTITY_ITEM_HEALTH_FIELD = ReflectionHelper.findField(EntityItem.class, "health", "field_70291_e"); - private final boolean[] mActiveEUInputs = new boolean[]{false, false, false, false, false, false}; - private final boolean[] mActiveEUOutputs = new boolean[]{false, false, false, false, false, false}; +@Optional.InterfaceList( + value = { + @Optional.Interface( + iface = "appeng.api.networking.security.IActionHost", + modid = "appliedenergistics2", + striprefs = true), + @Optional.Interface( + iface = "appeng.me.helpers.IGridProxyable", + modid = "appliedenergistics2", + striprefs = true) + }) +public class BaseMetaTileEntity extends CommonMetaTileEntity + implements IGregTechTileEntity, + IActionHost, + IGridProxyable, + IAlignmentProvider, + IConstructableProvider, + IDebugableTileEntity, + IGregtechWailaProvider { + private static final Field ENTITY_ITEM_HEALTH_FIELD = + ReflectionHelper.findField(EntityItem.class, "health", "field_70291_e"); + private final boolean[] mActiveEUInputs = new boolean[] {false, false, false, false, false, false}; + private final boolean[] mActiveEUOutputs = new boolean[] {false, false, false, false, false, false}; private final int[] mTimeStatistics = new int[GregTech_API.TICKS_FOR_LAG_AVERAGING]; public long mLastSoundTick = 0; public boolean mWasShutdown = false; @@ -89,12 +102,29 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec protected long mStoredEnergy = 0, mStoredSteam = 0; protected int mAverageEUInputIndex = 0, mAverageEUOutputIndex = 0; protected boolean mReleaseEnergy = false; - protected long[] mAverageEUInput = new long[]{0, 0, 0, 0, 0}, mAverageEUOutput = new long[]{0, 0, 0, 0, 0}; - private boolean mHasEnoughEnergy = true, mRunningThroughTick = false, mInputDisabled = false, mOutputDisabled = false, mMuffler = false, mLockUpgrade = false; + protected long[] mAverageEUInput = new long[] {0, 0, 0, 0, 0}, mAverageEUOutput = new long[] {0, 0, 0, 0, 0}; + private boolean mHasEnoughEnergy = true, + mRunningThroughTick = false, + mInputDisabled = false, + mOutputDisabled = false, + mMuffler = false, + mLockUpgrade = false; private boolean mActive = false, mWorkUpdate = false, mSteamConverter = false, mWorks = true; private boolean oRedstone = false; - private byte mColor = 0, oColor = 0, oStrongRedstone = 0, oRedstoneData = 63, oTextureData = 0, oUpdateData = 0, oTexturePage = 0; - private byte oLightValueClient = -1, oLightValue = -1, mLightValue = 0, mOtherUpgrades = 0, mFacing = 0, oFacing = 0, mWorkData = 0; + private byte mColor = 0, + oColor = 0, + oStrongRedstone = 0, + oRedstoneData = 63, + oTextureData = 0, + oUpdateData = 0, + oTexturePage = 0; + private byte oLightValueClient = -1, + oLightValue = -1, + mLightValue = 0, + mOtherUpgrades = 0, + mFacing = 0, + oFacing = 0, + mWorkData = 0; private int mDisplayErrorCode = 0, oX = 0, oY = 0, oZ = 0, mTimeStatisticsIndex = 0, mLagWarningCount = 0; private long oOutput = 0, mAcceptedAmperes = Long.MAX_VALUE; private long mLastCheckTick = 0; @@ -103,8 +133,7 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec private NBTTagCompound mRecipeStuff = new NBTTagCompound(); private int cableUpdateDelay = 30; - public BaseMetaTileEntity() { - } + public BaseMetaTileEntity() {} @Override public void writeToNBT(NBTTagCompound aNBT) { @@ -152,7 +181,9 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec if (aID > 0) mID = aID; else mID = mID > 0 ? mID : 0; if (mID != 0) createNewMetatileEntity(mID); - mSidedRedstone = (hasValidMetaTileEntity() && mMetaTileEntity.hasSidedRedstoneOutputBehavior() ? new byte[]{0, 0, 0, 0, 0, 0} : new byte[]{15, 15, 15, 15, 15, 15}); + mSidedRedstone = (hasValidMetaTileEntity() && mMetaTileEntity.hasSidedRedstoneOutputBehavior() + ? new byte[] {0, 0, 0, 0, 0, 0} + : new byte[] {15, 15, 15, 15, 15, 15}); } else { if (aID <= 0) mID = (short) aNBT.getInteger("mID"); else mID = aID; @@ -175,7 +206,8 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec mWorks = !aNBT.getBoolean("mWorks"); mInputDisabled = aNBT.getBoolean("mInputDisabled"); mOutputDisabled = aNBT.getBoolean("mOutputDisabled"); - mOtherUpgrades = (byte) (aNBT.getByte("mOtherUpgrades") + aNBT.getByte("mBatteries") + aNBT.getByte("mLiBatteries")); + mOtherUpgrades = + (byte) (aNBT.getByte("mOtherUpgrades") + aNBT.getByte("mBatteries") + aNBT.getByte("mLiBatteries")); mRecipeStuff = aNBT.getCompoundTag("GT.CraftingComponents"); final int nbtVersion = aNBT.getInteger("nbtVersion"); @@ -184,11 +216,11 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec } if (mCoverData == null || mCoverData.length != 6) mCoverData = new ISerializableObject[6]; - if (mCoverSides.length != 6) mCoverSides = new int[]{0, 0, 0, 0, 0, 0}; + if (mCoverSides.length != 6) mCoverSides = new int[] {0, 0, 0, 0, 0, 0}; if (mSidedRedstone.length != 6) if (hasValidMetaTileEntity() && mMetaTileEntity.hasSidedRedstoneOutputBehavior()) - mSidedRedstone = new byte[]{0, 0, 0, 0, 0, 0}; - else mSidedRedstone = new byte[]{15, 15, 15, 15, 15, 15}; + mSidedRedstone = new byte[] {0, 0, 0, 0, 0, 0}; + else mSidedRedstone = new byte[] {15, 15, 15, 15, 15, 15}; updateCoverBehavior(); } @@ -205,14 +237,29 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec * Called when trying to charge Items */ public void chargeItem(ItemStack aStack) { - decreaseStoredEU(GT_ModHandler.chargeElectricItem(aStack, (int) Math.min(Integer.MAX_VALUE, getStoredEU()), (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getOutputTier()), false, false), true); + decreaseStoredEU( + GT_ModHandler.chargeElectricItem( + aStack, + (int) Math.min(Integer.MAX_VALUE, getStoredEU()), + (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getOutputTier()), + false, + false), + true); } /** * Called when trying to discharge Items */ public void dischargeItem(ItemStack aStack) { - increaseStoredEnergyUnits(GT_ModHandler.dischargeElectricItem(aStack, (int) Math.min(Integer.MAX_VALUE, getEUCapacity() - getStoredEU()), (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getInputTier()), false, false, false), true); + increaseStoredEnergyUnits( + GT_ModHandler.dischargeElectricItem( + aStack, + (int) Math.min(Integer.MAX_VALUE, getEUCapacity() - getStoredEU()), + (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getInputTier()), + false, + false, + false), + true); } protected boolean isRainPossible() { @@ -274,7 +321,7 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec if (mNeedsUpdate) { worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - //worldObj.func_147479_m(xCoord, yCoord, zCoord); + // worldObj.func_147479_m(xCoord, yCoord, zCoord); mNeedsUpdate = false; } } @@ -340,12 +387,15 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec } } - if (mMetaTileEntity.isEnetOutput() && oOutput > 0) { - final long tOutputVoltage = Math.max(oOutput, oOutput + (1L << Math.max(0, GT_Utility.getTier(oOutput) - 1))); - final long tUsableAmperage = Math.min(getOutputAmperage(), (getStoredEU() - mMetaTileEntity.getMinimumStoredEU()) / tOutputVoltage); + final long tOutputVoltage = + Math.max(oOutput, oOutput + (1L << Math.max(0, GT_Utility.getTier(oOutput) - 1))); + final long tUsableAmperage = Math.min( + getOutputAmperage(), + (getStoredEU() - mMetaTileEntity.getMinimumStoredEU()) / tOutputVoltage); if (tUsableAmperage > 0) { - final long tEU = tOutputVoltage * Util.emitEnergyToNetwork(oOutput, tUsableAmperage, this); + final long tEU = + tOutputVoltage * Util.emitEnergyToNetwork(oOutput, tUsableAmperage, this); mAverageEUOutput[mAverageEUOutputIndex] += tEU; decreaseStoredEU(tEU, true); } @@ -362,26 +412,46 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec } if (getRandomNumber(1000) == 0 && isRainPossible()) { - final int precipitationHeightAtSide2 = worldObj.getPrecipitationHeight(xCoord, zCoord - 1); - final int precipitationHeightAtSide3 = worldObj.getPrecipitationHeight(xCoord, zCoord + 1); - final int precipitationHeightAtSide4 = worldObj.getPrecipitationHeight(xCoord - 1, zCoord); - final int precipitationHeightAtSide5 = worldObj.getPrecipitationHeight(xCoord + 1, zCoord); - - if ((getCoverIDAtSide((byte) 1) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord) - 2 < yCoord) - || (getCoverIDAtSide((byte) 2) == 0 && precipitationHeightAtSide2 - 1 < yCoord && precipitationHeightAtSide2 > -1) - || (getCoverIDAtSide((byte) 3) == 0 && precipitationHeightAtSide3 - 1 < yCoord && precipitationHeightAtSide3 > -1) - || (getCoverIDAtSide((byte) 4) == 0 && precipitationHeightAtSide4 - 1 < yCoord && precipitationHeightAtSide4 > -1) - || (getCoverIDAtSide((byte) 5) == 0 && precipitationHeightAtSide5 - 1 < yCoord && precipitationHeightAtSide5 > -1)) { + final int precipitationHeightAtSide2 = + worldObj.getPrecipitationHeight(xCoord, zCoord - 1); + final int precipitationHeightAtSide3 = + worldObj.getPrecipitationHeight(xCoord, zCoord + 1); + final int precipitationHeightAtSide4 = + worldObj.getPrecipitationHeight(xCoord - 1, zCoord); + final int precipitationHeightAtSide5 = + worldObj.getPrecipitationHeight(xCoord + 1, zCoord); + + if ((getCoverIDAtSide((byte) 1) == 0 + && worldObj.getPrecipitationHeight(xCoord, zCoord) - 2 < yCoord) + || (getCoverIDAtSide((byte) 2) == 0 + && precipitationHeightAtSide2 - 1 < yCoord + && precipitationHeightAtSide2 > -1) + || (getCoverIDAtSide((byte) 3) == 0 + && precipitationHeightAtSide3 - 1 < yCoord + && precipitationHeightAtSide3 > -1) + || (getCoverIDAtSide((byte) 4) == 0 + && precipitationHeightAtSide4 - 1 < yCoord + && precipitationHeightAtSide4 > -1) + || (getCoverIDAtSide((byte) 5) == 0 + && precipitationHeightAtSide5 - 1 < yCoord + && precipitationHeightAtSide5 > -1)) { if (GregTech_API.sMachineRainExplosions && worldObj.isRaining()) { if (getRandomNumber(10) == 0) { try { - GT_Mod.achievements.issueAchievement(this.getWorldObj().getPlayerEntityByName(mOwnerName), "badweather"); + GT_Mod.achievements.issueAchievement( + this.getWorldObj().getPlayerEntityByName(mOwnerName), + "badweather"); } catch (Exception ignored) { } - GT_Log.exp.println("Machine at: " + this.getXCoord() + " | " + this.getYCoord() + " | " + this.getZCoord() + " DIMID: " + this.worldObj.provider.dimensionId + " explosion due to rain!"); + GT_Log.exp.println("Machine at: " + this.getXCoord() + " | " + + this.getYCoord() + " | " + this.getZCoord() + " DIMID: " + + this.worldObj.provider.dimensionId + " explosion due to rain!"); doEnergyExplosion(); } else { - GT_Log.exp.println("Machine at: " + this.getXCoord() + " | " + this.getYCoord() + " | " + this.getZCoord() + " DIMID: " + this.worldObj.provider.dimensionId + " set to Fire due to rain!"); + GT_Log.exp.println("Machine at: " + this.getXCoord() + " | " + + this.getYCoord() + " | " + this.getZCoord() + " DIMID: " + + this.worldObj.provider.dimensionId + + " set to Fire due to rain!"); setOnFire(); } } @@ -389,12 +459,18 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec mRunningThroughTick = false; return; } - if (GregTech_API.sMachineThunderExplosions && worldObj.isThundering() && getRandomNumber(3) == 0) { + if (GregTech_API.sMachineThunderExplosions + && worldObj.isThundering() + && getRandomNumber(3) == 0) { try { - GT_Mod.achievements.issueAchievement(this.getWorldObj().getPlayerEntityByName(mOwnerName), "badweather"); + GT_Mod.achievements.issueAchievement( + this.getWorldObj().getPlayerEntityByName(mOwnerName), "badweather"); } catch (Exception ignored) { } - GT_Log.exp.println("Machine at: " + this.getXCoord() + " | " + this.getYCoord() + " | " + this.getZCoord() + " DIMID: " + this.worldObj.provider.dimensionId + " explosion due to Thunderstorm!"); + GT_Log.exp.println("Machine at: " + this.getXCoord() + " | " + this.getYCoord() + + " | " + this.getZCoord() + " DIMID: " + + this.worldObj.provider.dimensionId + + " explosion due to Thunderstorm!"); doEnergyExplosion(); } } @@ -409,12 +485,21 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec } if (aSideServer) { if (mMetaTileEntity.dechargerSlotCount() > 0 && getStoredEU() < getEUCapacity()) { - for (int i = mMetaTileEntity.dechargerSlotStartIndex(), k = mMetaTileEntity.dechargerSlotCount() + i; i < k; i++) { + for (int i = mMetaTileEntity.dechargerSlotStartIndex(), + k = mMetaTileEntity.dechargerSlotCount() + i; + i < k; + i++) { if (mMetaTileEntity.mInventory[i] != null && getStoredEU() < getEUCapacity()) { dischargeItem(mMetaTileEntity.mInventory[i]); if (ic2.api.info.Info.itemEnergy.getEnergyValue(mMetaTileEntity.mInventory[i]) > 0) { - if ((getStoredEU() + ic2.api.info.Info.itemEnergy.getEnergyValue(mMetaTileEntity.mInventory[i])) < getEUCapacity()) { - increaseStoredEnergyUnits((long) ic2.api.info.Info.itemEnergy.getEnergyValue(mMetaTileEntity.mInventory[i]), false); + if ((getStoredEU() + + ic2.api.info.Info.itemEnergy.getEnergyValue( + mMetaTileEntity.mInventory[i])) + < getEUCapacity()) { + increaseStoredEnergyUnits( + (long) ic2.api.info.Info.itemEnergy.getEnergyValue( + mMetaTileEntity.mInventory[i]), + false); mMetaTileEntity.mInventory[i].stackSize--; mInventoryChanged = true; } @@ -429,7 +514,10 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec } if (aSideServer) { if (mMetaTileEntity.rechargerSlotCount() > 0 && getStoredEU() > 0) { - for (int i = mMetaTileEntity.rechargerSlotStartIndex(), k = mMetaTileEntity.rechargerSlotCount() + i; i < k; i++) { + for (int i = mMetaTileEntity.rechargerSlotStartIndex(), + k = mMetaTileEntity.rechargerSlotCount() + i; + i < k; + i++) { if (getStoredEU() > 0 && mMetaTileEntity.mInventory[i] != null) { chargeItem(mMetaTileEntity.mInventory[i]); if (mMetaTileEntity.mInventory[i].stackSize <= 0) { @@ -460,7 +548,11 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec } if (mTickTimer > 10) { - byte tData = (byte) ((mFacing & 7) | (mActive ? 8 : 0) | (mRedstone ? 16 : 0) | (mLockUpgrade ? 32 : 0) | (mWorks ? 64 : 0)); + byte tData = (byte) ((mFacing & 7) + | (mActive ? 8 : 0) + | (mRedstone ? 16 : 0) + | (mLockUpgrade ? 32 : 0) + | (mWorks ? 64 : 0)); if (tData != oTextureData) sendBlockEvent(GregTechTileClientEvents.CHANGE_COMMON_DATA, oTextureData = tData); @@ -470,10 +562,16 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec if (mMetaTileEntity instanceof GT_MetaTileEntity_Hatch) { tData = ((GT_MetaTileEntity_Hatch) mMetaTileEntity).getTexturePage(); if (tData != oTexturePage) - sendBlockEvent(GregTechTileClientEvents.CHANGE_CUSTOM_DATA, (byte) ((oTexturePage = tData) | 0x80));//set last bit as a flag for page + sendBlockEvent(GregTechTileClientEvents.CHANGE_CUSTOM_DATA, (byte) + ((oTexturePage = tData) | 0x80)); // set last bit as a flag for page } if (mColor != oColor) sendBlockEvent(GregTechTileClientEvents.CHANGE_COLOR, oColor = mColor); - tData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0)); + tData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) + | ((mSidedRedstone[1] > 0) ? 2 : 0) + | ((mSidedRedstone[2] > 0) ? 4 : 0) + | ((mSidedRedstone[3] > 0) ? 8 : 0) + | ((mSidedRedstone[4] > 0) ? 16 : 0) + | ((mSidedRedstone[5] > 0) ? 32 : 0)); if (tData != oRedstoneData) sendBlockEvent(GregTechTileClientEvents.CHANGE_REDSTONE_OUTPUT, oRedstoneData = tData); if (mLightValue != oLightValue) { @@ -505,16 +603,24 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec if (aSideServer && hasValidMetaTileEntity()) { tTime = System.nanoTime() - tTime; if (mTimeStatistics.length > 0) - mTimeStatistics[mTimeStatisticsIndex = (mTimeStatisticsIndex + 1) % mTimeStatistics.length] = (int) tTime; - if (tTime > 0 && tTime > (GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING * 1000000L) && mTickTimer > 1000 && getMetaTileEntity().doTickProfilingMessageDuringThisTick() && mLagWarningCount++ < 10) - GT_FML_LOGGER.warn("WARNING: Possible Lag Source at [" + xCoord + ", " + yCoord + ", " + zCoord + "] in Dimension " + worldObj.provider.dimensionId + " with " + tTime + "ns caused by an instance of " + getMetaTileEntity().getClass()); + mTimeStatistics[mTimeStatisticsIndex = (mTimeStatisticsIndex + 1) % mTimeStatistics.length] = + (int) tTime; + if (tTime > 0 + && tTime > (GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING * 1000000L) + && mTickTimer > 1000 + && getMetaTileEntity().doTickProfilingMessageDuringThisTick() + && mLagWarningCount++ < 10) + GT_FML_LOGGER.warn("WARNING: Possible Lag Source at [" + xCoord + ", " + yCoord + ", " + zCoord + + "] in Dimension " + worldObj.provider.dimensionId + " with " + tTime + + "ns caused by an instance of " + getMetaTileEntity().getClass()); } mWorkUpdate = mInventoryChanged = mRunningThroughTick = false; } @Override - public void getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { + public void getWailaBody( + ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { if (hasValidMetaTileEntity() && getMetaTileEntity() != null) { getMetaTileEntity().getWailaBody(itemStack, currenttip, accessor, config); } @@ -522,7 +628,8 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec } @Override - public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, int z) { + public void getWailaNBTData( + EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, int z) { super.getWailaNBTData(player, tile, tag, world, x, y, z); if (hasValidMetaTileEntity() && getMetaTileEntity() != null) { getMetaTileEntity().getWailaNBTData(player, tile, tag, world, x, y, z); @@ -532,22 +639,55 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec private void sendClientData() { if (mSendClientData) { NW.sendPacketToAllPlayersInRange( - worldObj, - new GT_Packet_TileEntity( - xCoord, (short) yCoord, zCoord, mID, mCoverSides[0], mCoverSides[1], mCoverSides[2], mCoverSides[3], mCoverSides[4], mCoverSides[5], - oTextureData = (byte) ((mFacing & 7) | (mActive ? 8 : 0) | (mRedstone ? 16 : 0) | (mLockUpgrade ? 32 : 0) | (mWorks ? 64 : 0)), - oTexturePage = (hasValidMetaTileEntity() && mMetaTileEntity instanceof GT_MetaTileEntity_Hatch) ? ((GT_MetaTileEntity_Hatch) mMetaTileEntity).getTexturePage() : 0, - oUpdateData = hasValidMetaTileEntity() ? mMetaTileEntity.getUpdateData() : 0, - oRedstoneData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0)), - oColor = mColor), - xCoord, zCoord - ); + worldObj, + new GT_Packet_TileEntity( + xCoord, + (short) yCoord, + zCoord, + mID, + mCoverSides[0], + mCoverSides[1], + mCoverSides[2], + mCoverSides[3], + mCoverSides[4], + mCoverSides[5], + oTextureData = (byte) ((mFacing & 7) + | (mActive ? 8 : 0) + | (mRedstone ? 16 : 0) + | (mLockUpgrade ? 32 : 0) + | (mWorks ? 64 : 0)), + oTexturePage = + (hasValidMetaTileEntity() && mMetaTileEntity instanceof GT_MetaTileEntity_Hatch) + ? ((GT_MetaTileEntity_Hatch) mMetaTileEntity).getTexturePage() + : 0, + oUpdateData = hasValidMetaTileEntity() ? mMetaTileEntity.getUpdateData() : 0, + oRedstoneData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) + | ((mSidedRedstone[1] > 0) ? 2 : 0) + | ((mSidedRedstone[2] > 0) ? 4 : 0) + | ((mSidedRedstone[3] > 0) ? 8 : 0) + | ((mSidedRedstone[4] > 0) ? 16 : 0) + | ((mSidedRedstone[5] > 0) ? 32 : 0)), + oColor = mColor), + xCoord, + zCoord); mSendClientData = false; } sendCoverDataIfNeeded(); } - public final void receiveMetaTileEntityData(short aID, int aCover0, int aCover1, int aCover2, int aCover3, int aCover4, int aCover5, byte aTextureData, byte aTexturePage, byte aUpdateData, byte aRedstoneData, byte aColorData) { + public final void receiveMetaTileEntityData( + short aID, + int aCover0, + int aCover1, + int aCover2, + int aCover3, + int aCover4, + int aCover5, + byte aTextureData, + byte aTexturePage, + byte aUpdateData, + byte aRedstoneData, + byte aColorData) { issueTextureUpdate(); if (mID != aID && aID > 0) { mID = aID; @@ -569,11 +709,33 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec } @Deprecated - public final void receiveMetaTileEntityData(short aID, int aCover0, int aCover1, int aCover2, int aCover3, int aCover4, int aCover5, byte aTextureData, byte aUpdateData, byte aRedstoneData, byte aColorData) { - receiveMetaTileEntityData(aID, aCover0, aCover1, aCover2, aCover3, aCover4, aCover5, aTextureData, (byte) 0, aUpdateData, aRedstoneData, aColorData); + public final void receiveMetaTileEntityData( + short aID, + int aCover0, + int aCover1, + int aCover2, + int aCover3, + int aCover4, + int aCover5, + byte aTextureData, + byte aUpdateData, + byte aRedstoneData, + byte aColorData) { + receiveMetaTileEntityData( + aID, + aCover0, + aCover1, + aCover2, + aCover3, + aCover4, + aCover5, + aTextureData, + (byte) 0, + aUpdateData, + aRedstoneData, + aColorData); } - @Override public boolean receiveClientEvent(int aEventID, int aValue) { super.receiveClientEvent(aEventID, aValue); @@ -582,7 +744,8 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec try { mMetaTileEntity.receiveClientEvent((byte) aEventID, (byte) aValue); } catch (Throwable e) { - GT_Log.err.println("Encountered Exception while receiving Data from the Server, the Client should've been crashed by now, but I prevented that. Please report immediately to GregTech Intergalactical!!!"); + GT_Log.err.println( + "Encountered Exception while receiving Data from the Server, the Client should've been crashed by now, but I prevented that. Please report immediately to GregTech Intergalactical!!!"); e.printStackTrace(GT_Log.err); } } @@ -594,15 +757,15 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec mFacing = (byte) (aValue & 7); mActive = ((aValue & 8) != 0); mRedstone = ((aValue & 16) != 0); - //mLockUpgrade = ((aValue&32) != 0); + // mLockUpgrade = ((aValue&32) != 0); mWorks = ((aValue & 64) != 0); break; case GregTechTileClientEvents.CHANGE_CUSTOM_DATA: if (hasValidMetaTileEntity()) { - if ((aValue & 0x80) == 0) //Is texture index - mMetaTileEntity.onValueUpdate((byte) (aValue & 0x7F)); - else if (mMetaTileEntity instanceof GT_MetaTileEntity_Hatch)//is texture page and hatch - ((GT_MetaTileEntity_Hatch) mMetaTileEntity).onTexturePageUpdate((byte) (aValue & 0x7F)); + if ((aValue & 0x80) == 0) // Is texture index + mMetaTileEntity.onValueUpdate((byte) (aValue & 0x7F)); + else if (mMetaTileEntity instanceof GT_MetaTileEntity_Hatch) // is texture page and hatch + ((GT_MetaTileEntity_Hatch) mMetaTileEntity).onTexturePageUpdate((byte) (aValue & 0x7F)); } break; case GregTechTileClientEvents.CHANGE_COLOR: @@ -641,7 +804,13 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec public ArrayList<String> getDebugInfo(EntityPlayer aPlayer, int aLogLevel) { final ArrayList<String> tList = new ArrayList<>(); if (aLogLevel > 2) { - tList.add("Meta-ID: " + EnumChatFormatting.BLUE + mID + EnumChatFormatting.RESET + (canAccessData() ? EnumChatFormatting.GREEN + " valid" + EnumChatFormatting.RESET : EnumChatFormatting.RED + " invalid" + EnumChatFormatting.RESET) + (mMetaTileEntity == null ? EnumChatFormatting.RED + " MetaTileEntity == null!" + EnumChatFormatting.RESET : " ")); + tList.add("Meta-ID: " + EnumChatFormatting.BLUE + mID + EnumChatFormatting.RESET + + (canAccessData() + ? EnumChatFormatting.GREEN + " valid" + EnumChatFormatting.RESET + : EnumChatFormatting.RED + " invalid" + EnumChatFormatting.RESET) + + (mMetaTileEntity == null + ? EnumChatFormatting.RED + " MetaTileEntity == null!" + EnumChatFormatting.RESET + : " ")); } if (aLogLevel > 1) { if (mTimeStatistics.length > 0) { @@ -653,27 +822,40 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec tWorstTime = tTime; } // Uncomment this line to print out tick-by-tick times. - //tList.add("tTime " + tTime); + // tList.add("tTime " + tTime); } - tList.add("Average CPU load of ~" + GT_Utility.formatNumbers(tAverageTime / mTimeStatistics.length) + "ns over " + GT_Utility.formatNumbers(mTimeStatistics.length) + " ticks with worst time of " + GT_Utility.formatNumbers(tWorstTime) + "ns."); - tList.add("Recorded " + GT_Utility.formatNumbers(mMetaTileEntity.mSoundRequests) + " sound requests in " + GT_Utility.formatNumbers(mTickTimer - mLastCheckTick) + " ticks."); + tList.add("Average CPU load of ~" + GT_Utility.formatNumbers(tAverageTime / mTimeStatistics.length) + + "ns over " + GT_Utility.formatNumbers(mTimeStatistics.length) + " ticks with worst time of " + + GT_Utility.formatNumbers(tWorstTime) + "ns."); + tList.add("Recorded " + GT_Utility.formatNumbers(mMetaTileEntity.mSoundRequests) + " sound requests in " + + GT_Utility.formatNumbers(mTickTimer - mLastCheckTick) + " ticks."); mLastCheckTick = mTickTimer; mMetaTileEntity.mSoundRequests = 0; } if (mLagWarningCount > 0) { - tList.add("Caused " + (mLagWarningCount >= 10 ? "more than 10" : mLagWarningCount) + " Lag Spike Warnings (anything taking longer than " + GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING + "ms) on the Server."); + tList.add("Caused " + (mLagWarningCount >= 10 ? "more than 10" : mLagWarningCount) + + " Lag Spike Warnings (anything taking longer than " + + GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING + "ms) on the Server."); } - tList.add("Is" + (mMetaTileEntity.isAccessAllowed(aPlayer) ? " " : EnumChatFormatting.RED + " not " + EnumChatFormatting.RESET) + "accessible for you"); + tList.add("Is" + + (mMetaTileEntity.isAccessAllowed(aPlayer) + ? " " + : EnumChatFormatting.RED + " not " + EnumChatFormatting.RESET) + + "accessible for you"); } if (aLogLevel > 0) { if (getSteamCapacity() > 0 && hasSteamEngineUpgrade()) - tList.add(GT_Utility.formatNumbers(getStoredSteam()) + " of " + GT_Utility.formatNumbers(getSteamCapacity()) + " Steam"); - tList.add("Machine is " + (mActive ? EnumChatFormatting.GREEN + "active" + EnumChatFormatting.RESET : EnumChatFormatting.RED + "inactive" + EnumChatFormatting.RESET)); + tList.add(GT_Utility.formatNumbers(getStoredSteam()) + " of " + + GT_Utility.formatNumbers(getSteamCapacity()) + " Steam"); + tList.add("Machine is " + + (mActive + ? EnumChatFormatting.GREEN + "active" + EnumChatFormatting.RESET + : EnumChatFormatting.RED + "inactive" + EnumChatFormatting.RESET)); if (!mHasEnoughEnergy) - tList.add(EnumChatFormatting.RED + "ATTENTION: This Device needs more power." + EnumChatFormatting.RESET); + tList.add( + EnumChatFormatting.RED + "ATTENTION: This Device needs more power." + EnumChatFormatting.RESET); } - if (joinedIc2Enet) - tList.add("Joined IC2 ENet"); + if (joinedIc2Enet) tList.add("Joined IC2 ENet"); return mMetaTileEntity.getSpecialDebugInfo(this, aPlayer, aLogLevel, tList); } @@ -729,7 +911,8 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec mInventoryChanged = true; if (canAccessData()) { markDirty(); - mMetaTileEntity.setInventorySlotContents(aIndex, worldObj.isRemote ? aStack : GT_OreDictUnificator.setStack(true, aStack)); + mMetaTileEntity.setInventorySlotContents( + aIndex, worldObj.isRemote ? aStack : GT_OreDictUnificator.setStack(true, aStack)); } } @@ -758,9 +941,12 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec @Override public boolean isUseableByPlayer(EntityPlayer aPlayer) { - return canAccessData() && playerOwnsThis(aPlayer, false) && mTickTimer > 40 && - getTileEntityOffset(0, 0, 0) == this && - aPlayer.getDistanceSq(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5) < 64 && mMetaTileEntity.isAccessAllowed(aPlayer); + return canAccessData() + && playerOwnsThis(aPlayer, false) + && mTickTimer > 40 + && getTileEntityOffset(0, 0, 0) == this + && aPlayer.getDistanceSq(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5) < 64 + && mMetaTileEntity.isAccessAllowed(aPlayer); } @Override @@ -774,8 +960,7 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec tileEntityInvalid = false; leaveEnet(); if (canAccessData()) { - if (GregTech_API.mAE2) - invalidateAE(); + if (GregTech_API.mAE2) invalidateAE(); mMetaTileEntity.onRemoval(); mMetaTileEntity.setBaseMetaTileEntity(null); } @@ -785,8 +970,7 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec @Override public void onChunkUnload() { super.onChunkUnload(); - if (GregTech_API.mAE2) - onChunkUnloadAE(); + if (GregTech_API.mAE2) onChunkUnloadAE(); } @Override @@ -898,7 +1082,9 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec @Override public boolean decreaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooLessEnergy) { if (!canAccessData()) return false; - return mHasEnoughEnergy = decreaseStoredEU(aEnergy, aIgnoreTooLessEnergy) || decreaseStoredSteam(aEnergy, false) || (aIgnoreTooLessEnergy && (decreaseStoredSteam(aEnergy, true))); + return mHasEnoughEnergy = decreaseStoredEU(aEnergy, aIgnoreTooLessEnergy) + || decreaseStoredSteam(aEnergy, false) + || (aIgnoreTooLessEnergy && (decreaseStoredSteam(aEnergy, true))); } @Override @@ -1039,9 +1225,10 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec @Override public ITexture[] getTexture(Block aBlock, byte aSide) { final ITexture coverTexture = getCoverTexture(aSide); - final ITexture[] textureUncovered = hasValidMetaTileEntity() ? - mMetaTileEntity.getTexture(this, aSide, mFacing, (byte) (mColor - 1), mActive, getOutputRedstoneSignal(aSide) > 0) : - Textures.BlockIcons.ERROR_RENDERING; + final ITexture[] textureUncovered = hasValidMetaTileEntity() + ? mMetaTileEntity.getTexture( + this, aSide, mFacing, (byte) (mColor - 1), mActive, getOutputRedstoneSignal(aSide) > 0) + : Textures.BlockIcons.ERROR_RENDERING; final ITexture[] textureCovered; if (coverTexture != null) { textureCovered = Arrays.copyOf(textureUncovered, textureUncovered.length + 1); @@ -1054,8 +1241,8 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec private boolean isEnergyInputSide(byte aSide) { if (aSide >= 0 && aSide < 6) { - if (!getCoverBehaviorAtSideNew(aSide).letsEnergyIn(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this)) - return false; + if (!getCoverBehaviorAtSideNew(aSide) + .letsEnergyIn(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this)) return false; if (isInvalid() || mReleaseEnergy) return false; if (canAccessData() && mMetaTileEntity.isElectric() && mMetaTileEntity.isEnetInput()) return mMetaTileEntity.isInputFacing(aSide); @@ -1065,7 +1252,8 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec private boolean isEnergyOutputSide(byte aSide) { if (aSide >= 0 && aSide < 6) { - if (!getCoverBehaviorAtSideNew(aSide).letsEnergyOut(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this)) + if (!getCoverBehaviorAtSideNew(aSide) + .letsEnergyOut(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this)) return false; if (isInvalid() || mReleaseEnergy) return mReleaseEnergy; if (canAccessData() && mMetaTileEntity.isElectric() && mMetaTileEntity.isEnetOutput()) @@ -1133,7 +1321,10 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec setOwnerName(aPlayer.getDisplayName()); setOwnerUuid(aPlayer.getUniqueID()); } else - return !privateAccess() || aPlayer.getDisplayName().equals("Player") || mOwnerName.equals("Player") || mOwnerName.equals(aPlayer.getDisplayName()); + return !privateAccess() + || aPlayer.getDisplayName().equals("Player") + || mOwnerName.equals("Player") + || mOwnerName.equals(aPlayer.getDisplayName()); return true; } @@ -1144,10 +1335,15 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec public void doEnergyExplosion() { if (getUniversalEnergyCapacity() > 0 && getUniversalEnergyStored() >= getUniversalEnergyCapacity() / 5) { - GT_Log.exp.println("Energy Explosion, injected " + getUniversalEnergyStored() + "EU >= " + getUniversalEnergyCapacity() / 5D + "Capacity of the Machine!"); - - doExplosion(oOutput * (getUniversalEnergyStored() >= getUniversalEnergyCapacity() ? 4 : getUniversalEnergyStored() >= getUniversalEnergyCapacity() / 2 ? 2 : 1)); - GT_Mod.achievements.issueAchievement(this.getWorldObj().getPlayerEntityByName(mOwnerName), "electricproblems"); + GT_Log.exp.println("Energy Explosion, injected " + getUniversalEnergyStored() + "EU >= " + + getUniversalEnergyCapacity() / 5D + "Capacity of the Machine!"); + + doExplosion(oOutput + * (getUniversalEnergyStored() >= getUniversalEnergyCapacity() + ? 4 + : getUniversalEnergyStored() >= getUniversalEnergyCapacity() / 2 ? 2 : 1)); + GT_Mod.achievements.issueAchievement( + this.getWorldObj().getPlayerEntityByName(mOwnerName), "electricproblems"); } } @@ -1189,9 +1385,15 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec public void dropItems(ItemStack tItem) { if (tItem == null) return; - final EntityItem tItemEntity = new EntityItem(this.worldObj, this.xCoord + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, this.yCoord + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, this.zCoord + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, new ItemStack(tItem.getItem(), tItem.stackSize, tItem.getItemDamage())); + final EntityItem tItemEntity = new EntityItem( + this.worldObj, + this.xCoord + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, + this.yCoord + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, + this.zCoord + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, + new ItemStack(tItem.getItem(), tItem.stackSize, tItem.getItemDamage())); if (tItem.hasTagCompound()) { - tItemEntity.getEntityItem().setTagCompound((NBTTagCompound) tItem.getTagCompound().copy()); + tItemEntity.getEntityItem().setTagCompound((NBTTagCompound) + tItem.getTagCompound().copy()); } tItemEntity.motionX = (XSTR_INSTANCE.nextGaussian() * 0.0500000007450581D); tItemEntity.motionY = (XSTR_INSTANCE.nextGaussian() * 0.0500000007450581D + 0.2000000029802322D); @@ -1199,8 +1401,7 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec tItemEntity.hurtResistantTime = 999999; tItemEntity.lifespan = 60000; try { - if (ENTITY_ITEM_HEALTH_FIELD != null) - ENTITY_ITEM_HEALTH_FIELD.setInt(tItemEntity, 99999999); + if (ENTITY_ITEM_HEALTH_FIELD != null) ENTITY_ITEM_HEALTH_FIELD.setInt(tItemEntity, 99999999); } catch (Exception ignored) { } this.worldObj.spawnEntityInWorld(tItemEntity); @@ -1232,34 +1433,43 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec @Override public boolean onRightclick(EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) { if (isClientSide()) { - //Configure Cover, sneak can also be: screwdriver, wrench, side cutter, soldering iron + // Configure Cover, sneak can also be: screwdriver, wrench, side cutter, soldering iron if (aPlayer.isSneaking()) { - final byte tSide = (getCoverIDAtSide(aSide) == 0) ? GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ) : aSide; + final byte tSide = + (getCoverIDAtSide(aSide) == 0) ? GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ) : aSide; return (getCoverBehaviorAtSideNew(tSide).hasCoverGUI()); } else if (getCoverBehaviorAtSideNew(aSide).onCoverRightclickClient(aSide, this, aPlayer, aX, aY, aZ)) { return true; } - if (!getCoverBehaviorAtSideNew(aSide).isGUIClickable(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this)) + if (!getCoverBehaviorAtSideNew(aSide) + .isGUIClickable(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this)) return false; } if (isServerSide()) { if (!privateAccess() || aPlayer.getDisplayName().equalsIgnoreCase(getOwnerName())) { final ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem(); if (tCurrentItem != null) { - if (getColorization() >= 0 && GT_Utility.areStacksEqual(new ItemStack(Items.water_bucket, 1), tCurrentItem)) { + if (getColorization() >= 0 + && GT_Utility.areStacksEqual(new ItemStack(Items.water_bucket, 1), tCurrentItem)) { tCurrentItem.func_150996_a(Items.bucket); setColorization((byte) (getColorization() >= 16 ? -2 : -1)); return true; } if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWrenchList)) { - if (aPlayer.isSneaking() && mMetaTileEntity instanceof GT_MetaTileEntity_BasicMachine && ((GT_MetaTileEntity_BasicMachine) mMetaTileEntity).setMainFacing(GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ))) { + if (aPlayer.isSneaking() + && mMetaTileEntity instanceof GT_MetaTileEntity_BasicMachine + && ((GT_MetaTileEntity_BasicMachine) mMetaTileEntity) + .setMainFacing(GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ))) { GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer); - GT_Utility.sendSoundToPlayers(worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); + GT_Utility.sendSoundToPlayers( + worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); cableUpdateDelay = 10; - } else if (mMetaTileEntity.onWrenchRightClick(aSide, GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ), aPlayer, aX, aY, aZ)) { + } else if (mMetaTileEntity.onWrenchRightClick( + aSide, GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ), aPlayer, aX, aY, aZ)) { GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer); - GT_Utility.sendSoundToPlayers(worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); + GT_Utility.sendSoundToPlayers( + worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); cableUpdateDelay = 10; } return true; @@ -1267,9 +1477,21 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sScrewdriverList)) { if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 200, aPlayer)) { - setCoverDataAtSide(aSide, getCoverBehaviorAtSideNew(aSide).onCoverScrewdriverClick(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this, aPlayer, aX, aY, aZ)); + setCoverDataAtSide( + aSide, + getCoverBehaviorAtSideNew(aSide) + .onCoverScrewdriverClick( + aSide, + getCoverIDAtSide(aSide), + getComplexCoverDataAtSide(aSide), + this, + aPlayer, + aX, + aY, + aZ)); mMetaTileEntity.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); - GT_Utility.sendSoundToPlayers(worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); + GT_Utility.sendSoundToPlayers( + worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); } return true; } @@ -1278,8 +1500,18 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer)) { mInputDisabled = !mInputDisabled; if (mInputDisabled) mOutputDisabled = !mOutputDisabled; - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("086", "Auto-Input: ") + (mInputDisabled ? GT_Utility.trans("087", "Disabled") : GT_Utility.trans("088", "Enabled") + GT_Utility.trans("089", " Auto-Output: ") + (mOutputDisabled ? GT_Utility.trans("087", "Disabled") : GT_Utility.trans("088", "Enabled")))); - GT_Utility.sendSoundToPlayers(worldObj, SoundResource.RANDOM_ANVIL_USE, 1.0F, -1, xCoord, yCoord, zCoord); + GT_Utility.sendChatToPlayer( + aPlayer, + GT_Utility.trans("086", "Auto-Input: ") + + (mInputDisabled + ? GT_Utility.trans("087", "Disabled") + : GT_Utility.trans("088", "Enabled") + + GT_Utility.trans("089", " Auto-Output: ") + + (mOutputDisabled + ? GT_Utility.trans("087", "Disabled") + : GT_Utility.trans("088", "Enabled")))); + GT_Utility.sendSoundToPlayers( + worldObj, SoundResource.RANDOM_ANVIL_USE, 1.0F, -1, xCoord, yCoord, zCoord); } return true; } @@ -1289,12 +1521,23 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec if (mWorks) disableWorking(); else enableWorking(); { - String tChat = GT_Utility.trans("090", "Machine Processing: ") + (isAllowedToWork() ? GT_Utility.trans("088", "Enabled") : GT_Utility.trans("087", "Disabled")); - if (getMetaTileEntity() != null && getMetaTileEntity().hasAlternativeModeText()) + String tChat = GT_Utility.trans("090", "Machine Processing: ") + + (isAllowedToWork() + ? GT_Utility.trans("088", "Enabled") + : GT_Utility.trans("087", "Disabled")); + if (getMetaTileEntity() != null + && getMetaTileEntity().hasAlternativeModeText()) tChat = getMetaTileEntity().getAlternativeModeText(); GT_Utility.sendChatToPlayer(aPlayer, tChat); } - GT_Utility.sendSoundToPlayers(worldObj, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1, xCoord, yCoord, zCoord); + GT_Utility.sendSoundToPlayers( + worldObj, + SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, + 1.0F, + -1, + xCoord, + yCoord, + zCoord); } return true; } @@ -1302,12 +1545,21 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSolderingToolList)) { final byte tSide = GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ); if (mMetaTileEntity.onSolderingToolRightClick(aSide, tSide, aPlayer, aX, aY, aZ)) { - //logic handled internally - GT_Utility.sendSoundToPlayers(worldObj, SoundResource.IC2_TOOLS_BATTERY_USE, 1.0F, -1, xCoord, yCoord, zCoord); + // logic handled internally + GT_Utility.sendSoundToPlayers( + worldObj, SoundResource.IC2_TOOLS_BATTERY_USE, 1.0F, -1, xCoord, yCoord, zCoord); } else if (GT_ModHandler.useSolderingIron(tCurrentItem, aPlayer)) { mStrongRedstone ^= (1 << tSide); - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("091", "Redstone Output at Side ") + tSide + GT_Utility.trans("092", " set to: ") + ((mStrongRedstone & (1 << tSide)) != 0 ? GT_Utility.trans("093", "Strong") : GT_Utility.trans("094", "Weak"))); - GT_Utility.sendSoundToPlayers(worldObj, SoundResource.IC2_TOOLS_BATTERY_USE, 3.0F, -1, xCoord, yCoord, zCoord); + GT_Utility.sendChatToPlayer( + aPlayer, + GT_Utility.trans("091", "Redstone Output at Side ") + + tSide + + GT_Utility.trans("092", " set to: ") + + ((mStrongRedstone & (1 << tSide)) != 0 + ? GT_Utility.trans("093", "Strong") + : GT_Utility.trans("094", "Weak"))); + GT_Utility.sendSoundToPlayers( + worldObj, SoundResource.IC2_TOOLS_BATTERY_USE, 3.0F, -1, xCoord, yCoord, zCoord); issueBlockUpdate(); } doEnetUpdate(); @@ -1318,8 +1570,9 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWireCutterList)) { final byte tSide = GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ); if (mMetaTileEntity.onWireCutterRightClick(aSide, tSide, aPlayer, aX, aY, aZ)) { - //logic handled internally - GT_Utility.sendSoundToPlayers(worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); + // logic handled internally + GT_Utility.sendSoundToPlayers( + worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); } doEnetUpdate(); cableUpdateDelay = 10; @@ -1331,38 +1584,60 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec if (getCoverIDAtSide(coverSide) == 0) { if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sCovers.keySet())) { - if (GregTech_API.getCoverBehaviorNew(tCurrentItem).isCoverPlaceable(coverSide, tCurrentItem, this) && - mMetaTileEntity.allowCoverOnSide(coverSide, new GT_ItemStack(tCurrentItem))) { + if (GregTech_API.getCoverBehaviorNew(tCurrentItem) + .isCoverPlaceable(coverSide, tCurrentItem, this) + && mMetaTileEntity.allowCoverOnSide(coverSide, new GT_ItemStack(tCurrentItem))) { setCoverItemAtSide(coverSide, tCurrentItem); if (!aPlayer.capabilities.isCreativeMode) tCurrentItem.stackSize--; - GT_Utility.sendSoundToPlayers(worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); + GT_Utility.sendSoundToPlayers( + worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); } return true; } } else { if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sCrowbarList)) { if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer)) { - GT_Utility.sendSoundToPlayers(worldObj, SoundResource.RANDOM_BREAK, 1.0F, -1, xCoord, yCoord, zCoord); + GT_Utility.sendSoundToPlayers( + worldObj, SoundResource.RANDOM_BREAK, 1.0F, -1, xCoord, yCoord, zCoord); dropCover(coverSide, aSide, false); } return true; } } - } else if (aPlayer.isSneaking()) { //Sneak click, no tool -> open cover config if possible. - aSide = (getCoverIDAtSide(aSide) == 0) ? GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ) : aSide; - return getCoverIDAtSide(aSide) > 0 && getCoverBehaviorAtSideNew(aSide).onCoverShiftRightClick(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this, aPlayer); + } else if (aPlayer.isSneaking()) { // Sneak click, no tool -> open cover config if possible. + aSide = (getCoverIDAtSide(aSide) == 0) + ? GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ) + : aSide; + return getCoverIDAtSide(aSide) > 0 + && getCoverBehaviorAtSideNew(aSide) + .onCoverShiftRightClick( + aSide, + getCoverIDAtSide(aSide), + getComplexCoverDataAtSide(aSide), + this, + aPlayer); } - if (getCoverBehaviorAtSideNew(aSide).onCoverRightClick(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this, aPlayer, aX, aY, aZ)) - return true; - - if (!getCoverBehaviorAtSideNew(aSide).isGUIClickable(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this)) + if (getCoverBehaviorAtSideNew(aSide) + .onCoverRightClick( + aSide, + getCoverIDAtSide(aSide), + getComplexCoverDataAtSide(aSide), + this, + aPlayer, + aX, + aY, + aZ)) return true; + + if (!getCoverBehaviorAtSideNew(aSide) + .isGUIClickable(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this)) return false; if (isUpgradable() && tCurrentItem != null) { if (ItemList.Upgrade_Muffler.isStackEqual(aPlayer.inventory.getCurrentItem())) { if (addMufflerUpgrade()) { - GT_Utility.sendSoundToPlayers(worldObj, SoundResource.RANDOM_CLICK, 1.0F, -1, xCoord, yCoord, zCoord); + GT_Utility.sendSoundToPlayers( + worldObj, SoundResource.RANDOM_CLICK, 1.0F, -1, xCoord, yCoord, zCoord); if (!aPlayer.capabilities.isCreativeMode) aPlayer.inventory.getCurrentItem().stackSize--; } return true; @@ -1372,7 +1647,8 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec mLockUpgrade = true; setOwnerName(aPlayer.getDisplayName()); setOwnerUuid(aPlayer.getUniqueID()); - GT_Utility.sendSoundToPlayers(worldObj, SoundResource.RANDOM_CLICK, 1.0F, -1, xCoord, yCoord, zCoord); + GT_Utility.sendSoundToPlayers( + worldObj, SoundResource.RANDOM_CLICK, 1.0F, -1, xCoord, yCoord, zCoord); if (!aPlayer.capabilities.isCreativeMode) aPlayer.inventory.getCurrentItem().stackSize--; } return true; @@ -1385,7 +1661,8 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec if (!aPlayer.isSneaking() && hasValidMetaTileEntity()) return mMetaTileEntity.onRightclick(this, aPlayer, aSide, aX, aY, aZ); } catch (Throwable e) { - GT_Log.err.println("Encountered Exception while rightclicking TileEntity, the Game should've crashed now, but I prevented that. Please report immediately to GregTech Intergalactical!!!"); + GT_Log.err.println( + "Encountered Exception while rightclicking TileEntity, the Game should've crashed now, but I prevented that. Please report immediately to GregTech Intergalactical!!!"); e.printStackTrace(GT_Log.err); } @@ -1397,7 +1674,8 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec try { if (aPlayer != null && hasValidMetaTileEntity()) mMetaTileEntity.onLeftclick(this, aPlayer); } catch (Throwable e) { - GT_Log.err.println("Encountered Exception while leftclicking TileEntity, the Game should've crashed now, but I prevented that. Please report immediately to GregTech Intergalactical!!!"); + GT_Log.err.println( + "Encountered Exception while leftclicking TileEntity, the Game should've crashed now, but I prevented that. Please report immediately to GregTech Intergalactical!!!"); e.printStackTrace(GT_Log.err); } } @@ -1439,8 +1717,21 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec */ @Override public int[] getAccessibleSlotsFromSide(int aSide) { - if (canAccessData() && (getCoverBehaviorAtSideNew((byte) aSide).letsItemsOut((byte) aSide, getCoverIDAtSide((byte) aSide), getComplexCoverDataAtSide((byte) aSide), -1, this) || getCoverBehaviorAtSideNew((byte) aSide).letsItemsIn((byte) aSide, getCoverIDAtSide((byte) aSide), getComplexCoverDataAtSide((byte) aSide), -1, this))) - return mMetaTileEntity.getAccessibleSlotsFromSide(aSide); + if (canAccessData() + && (getCoverBehaviorAtSideNew((byte) aSide) + .letsItemsOut( + (byte) aSide, + getCoverIDAtSide((byte) aSide), + getComplexCoverDataAtSide((byte) aSide), + -1, + this) + || getCoverBehaviorAtSideNew((byte) aSide) + .letsItemsIn( + (byte) aSide, + getCoverIDAtSide((byte) aSide), + getComplexCoverDataAtSide((byte) aSide), + -1, + this))) return mMetaTileEntity.getAccessibleSlotsFromSide(aSide); return GT_Values.emptyIntArray; } @@ -1449,7 +1740,16 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec */ @Override public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { - return canAccessData() && (mRunningThroughTick || !mInputDisabled) && getCoverBehaviorAtSideNew((byte) aSide).letsItemsIn((byte) aSide, getCoverIDAtSide((byte) aSide), getComplexCoverDataAtSide((byte) aSide), aIndex, this) && mMetaTileEntity.canInsertItem(aIndex, aStack, aSide); + return canAccessData() + && (mRunningThroughTick || !mInputDisabled) + && getCoverBehaviorAtSideNew((byte) aSide) + .letsItemsIn( + (byte) aSide, + getCoverIDAtSide((byte) aSide), + getComplexCoverDataAtSide((byte) aSide), + aIndex, + this) + && mMetaTileEntity.canInsertItem(aIndex, aStack, aSide); } /** @@ -1457,7 +1757,16 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec */ @Override public boolean canExtractItem(int aIndex, ItemStack aStack, int aSide) { - return canAccessData() && (mRunningThroughTick || !mOutputDisabled) && getCoverBehaviorAtSideNew((byte) aSide).letsItemsOut((byte) aSide, getCoverIDAtSide((byte) aSide), getComplexCoverDataAtSide((byte) aSide), aIndex, this) && mMetaTileEntity.canExtractItem(aIndex, aStack, aSide); + return canAccessData() + && (mRunningThroughTick || !mOutputDisabled) + && getCoverBehaviorAtSideNew((byte) aSide) + .letsItemsOut( + (byte) aSide, + getCoverIDAtSide((byte) aSide), + getComplexCoverDataAtSide((byte) aSide), + aIndex, + this) + && mMetaTileEntity.canExtractItem(aIndex, aStack, aSide); } @Override @@ -1471,7 +1780,6 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec return mMetaTileEntity.allowGeneralRedstoneOutput() ? mSidedRedstone[aSide] : 0; } - @Override public boolean isSteamEngineUpgradable() { return isUpgradable() && !hasSteamEngineUpgrade() && getSteamCapacity() > 0; @@ -1546,22 +1854,17 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec @Override public long getAverageElectricInput() { long rEU = 0; - for (int i = 0; i < mAverageEUInput.length; ++i) - if (i != mAverageEUInputIndex) - rEU += mAverageEUInput[i]; + for (int i = 0; i < mAverageEUInput.length; ++i) if (i != mAverageEUInputIndex) rEU += mAverageEUInput[i]; return rEU / (mAverageEUInput.length - 1); } @Override public long getAverageElectricOutput() { long rEU = 0; - for (int i = 0; i < mAverageEUOutput.length; ++i) - if (i != mAverageEUOutputIndex) - rEU += mAverageEUOutput[i]; + for (int i = 0; i < mAverageEUOutput.length; ++i) if (i != mAverageEUOutputIndex) rEU += mAverageEUOutput[i]; return rEU / (mAverageEUOutput.length - 1); } - @Override protected void updateOutputRedstoneSignal(byte aSide) { if (mMetaTileEntity.hasSidedRedstoneOutputBehavior()) { @@ -1598,7 +1901,6 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec return canAccessData() ? mMetaTileEntity.getComparatorValue(aSide) : 0; } - @Override public ItemStack decrStackSize(int aIndex, int aAmount) { if (canAccessData()) { @@ -1610,14 +1912,27 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec @Override public long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage) { - if (!canAccessData() || !mMetaTileEntity.isElectric() || !inputEnergyFrom(aSide) || aAmperage <= 0 || aVoltage <= 0 || getStoredEU() >= getEUCapacity() || mMetaTileEntity.maxAmperesIn() <= mAcceptedAmperes) - return 0; + if (!canAccessData() + || !mMetaTileEntity.isElectric() + || !inputEnergyFrom(aSide) + || aAmperage <= 0 + || aVoltage <= 0 + || getStoredEU() >= getEUCapacity() + || mMetaTileEntity.maxAmperesIn() <= mAcceptedAmperes) return 0; if (aVoltage > getInputVoltage()) { - GT_Log.exp.println("Energy Explosion, injected " + aVoltage + "EU/t in a " + getInputVoltage() + "EU/t Machine!"); + GT_Log.exp.println( + "Energy Explosion, injected " + aVoltage + "EU/t in a " + getInputVoltage() + "EU/t Machine!"); doExplosion(aVoltage); return 0; } - if (increaseStoredEnergyUnits(aVoltage * (aAmperage = Math.min(aAmperage, Math.min(mMetaTileEntity.maxAmperesIn() - mAcceptedAmperes, 1 + ((getEUCapacity() - getStoredEU()) / aVoltage)))), true)) { + if (increaseStoredEnergyUnits( + aVoltage + * (aAmperage = Math.min( + aAmperage, + Math.min( + mMetaTileEntity.maxAmperesIn() - mAcceptedAmperes, + 1 + ((getEUCapacity() - getStoredEU()) / aVoltage)))), + true)) { mAverageEUInput[mAverageEUInputIndex] += aVoltage * aAmperage; mAcceptedAmperes += aAmperage; return aAmperage; @@ -1627,8 +1942,10 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec @Override public boolean drainEnergyUnits(byte aSide, long aVoltage, long aAmperage) { - if (!canAccessData() || !mMetaTileEntity.isElectric() || !outputsEnergyTo(aSide) || getStoredEU() - (aVoltage * aAmperage) < mMetaTileEntity.getMinimumStoredEU()) - return false; + if (!canAccessData() + || !mMetaTileEntity.isElectric() + || !outputsEnergyTo(aSide) + || getStoredEU() - (aVoltage * aAmperage) < mMetaTileEntity.getMinimumStoredEU()) return false; if (decreaseStoredEU(aVoltage * aAmperage, false)) { mAverageEUOutput[mAverageEUOutputIndex] += aVoltage * aAmperage; return true; @@ -1650,81 +1967,90 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec @Override public int fill(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { - if (mTickTimer > 5 && canAccessData() && - (mRunningThroughTick || !mInputDisabled) && - ( - aSide == ForgeDirection.UNKNOWN || - ( - mMetaTileEntity.isLiquidInput((byte) aSide.ordinal()) && - getCoverBehaviorAtSideNew((byte) aSide.ordinal()).letsFluidIn((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getComplexCoverDataAtSide((byte) aSide.ordinal()), aFluid == null ? null : aFluid.getFluid(), this) - ) - ) - ) - return mMetaTileEntity.fill(aSide, aFluid, doFill); + if (mTickTimer > 5 + && canAccessData() + && (mRunningThroughTick || !mInputDisabled) + && (aSide == ForgeDirection.UNKNOWN + || (mMetaTileEntity.isLiquidInput((byte) aSide.ordinal()) + && getCoverBehaviorAtSideNew((byte) aSide.ordinal()) + .letsFluidIn( + (byte) aSide.ordinal(), + getCoverIDAtSide((byte) aSide.ordinal()), + getComplexCoverDataAtSide((byte) aSide.ordinal()), + aFluid == null ? null : aFluid.getFluid(), + this)))) return mMetaTileEntity.fill(aSide, aFluid, doFill); return 0; } @Override public FluidStack drain(ForgeDirection aSide, int maxDrain, boolean doDrain) { - if (mTickTimer > 5 && canAccessData() && - (mRunningThroughTick || !mOutputDisabled) && - ( - aSide == ForgeDirection.UNKNOWN || - ( - mMetaTileEntity.isLiquidOutput((byte) aSide.ordinal()) && - getCoverBehaviorAtSideNew((byte) aSide.ordinal()).letsFluidOut((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getComplexCoverDataAtSide((byte) aSide.ordinal()), mMetaTileEntity.getFluid() == null ? null : mMetaTileEntity.getFluid().getFluid(), this) - ) - ) - ) - return mMetaTileEntity.drain(aSide, maxDrain, doDrain); + if (mTickTimer > 5 + && canAccessData() + && (mRunningThroughTick || !mOutputDisabled) + && (aSide == ForgeDirection.UNKNOWN + || (mMetaTileEntity.isLiquidOutput((byte) aSide.ordinal()) + && getCoverBehaviorAtSideNew((byte) aSide.ordinal()) + .letsFluidOut( + (byte) aSide.ordinal(), + getCoverIDAtSide((byte) aSide.ordinal()), + getComplexCoverDataAtSide((byte) aSide.ordinal()), + mMetaTileEntity.getFluid() == null + ? null + : mMetaTileEntity + .getFluid() + .getFluid(), + this)))) return mMetaTileEntity.drain(aSide, maxDrain, doDrain); return null; } @Override public FluidStack drain(ForgeDirection aSide, FluidStack aFluid, boolean doDrain) { - if (mTickTimer > 5 && canAccessData() && - (mRunningThroughTick || !mOutputDisabled) && - ( - aSide == ForgeDirection.UNKNOWN || - ( - mMetaTileEntity.isLiquidOutput((byte) aSide.ordinal()) && - getCoverBehaviorAtSideNew((byte) aSide.ordinal()).letsFluidOut((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getComplexCoverDataAtSide((byte) aSide.ordinal()), aFluid == null ? null : aFluid.getFluid(), this) - ) - ) - ) - return mMetaTileEntity.drain(aSide, aFluid, doDrain); + if (mTickTimer > 5 + && canAccessData() + && (mRunningThroughTick || !mOutputDisabled) + && (aSide == ForgeDirection.UNKNOWN + || (mMetaTileEntity.isLiquidOutput((byte) aSide.ordinal()) + && getCoverBehaviorAtSideNew((byte) aSide.ordinal()) + .letsFluidOut( + (byte) aSide.ordinal(), + getCoverIDAtSide((byte) aSide.ordinal()), + getComplexCoverDataAtSide((byte) aSide.ordinal()), + aFluid == null ? null : aFluid.getFluid(), + this)))) return mMetaTileEntity.drain(aSide, aFluid, doDrain); return null; } @Override public boolean canFill(ForgeDirection aSide, Fluid aFluid) { - if (mTickTimer > 5 && canAccessData() && - (mRunningThroughTick || !mInputDisabled) && - ( - aSide == ForgeDirection.UNKNOWN || - ( - mMetaTileEntity.isLiquidInput((byte) aSide.ordinal()) && - getCoverBehaviorAtSideNew((byte) aSide.ordinal()).letsFluidIn((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getComplexCoverDataAtSide((byte) aSide.ordinal()), aFluid, this) - ) - ) - ) - return mMetaTileEntity.canFill(aSide, aFluid); + if (mTickTimer > 5 + && canAccessData() + && (mRunningThroughTick || !mInputDisabled) + && (aSide == ForgeDirection.UNKNOWN + || (mMetaTileEntity.isLiquidInput((byte) aSide.ordinal()) + && getCoverBehaviorAtSideNew((byte) aSide.ordinal()) + .letsFluidIn( + (byte) aSide.ordinal(), + getCoverIDAtSide((byte) aSide.ordinal()), + getComplexCoverDataAtSide((byte) aSide.ordinal()), + aFluid, + this)))) return mMetaTileEntity.canFill(aSide, aFluid); return false; } @Override public boolean canDrain(ForgeDirection aSide, Fluid aFluid) { - if (mTickTimer > 5 && canAccessData() && - (mRunningThroughTick || !mOutputDisabled) && - ( - aSide == ForgeDirection.UNKNOWN || - ( - mMetaTileEntity.isLiquidOutput((byte) aSide.ordinal()) && - getCoverBehaviorAtSideNew((byte) aSide.ordinal()).letsFluidOut((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getComplexCoverDataAtSide((byte) aSide.ordinal()), aFluid, this) - ) - ) - ) - return mMetaTileEntity.canDrain(aSide, aFluid); + if (mTickTimer > 5 + && canAccessData() + && (mRunningThroughTick || !mOutputDisabled) + && (aSide == ForgeDirection.UNKNOWN + || (mMetaTileEntity.isLiquidOutput((byte) aSide.ordinal()) + && getCoverBehaviorAtSideNew((byte) aSide.ordinal()) + .letsFluidOut( + (byte) aSide.ordinal(), + getCoverIDAtSide((byte) aSide.ordinal()), + getComplexCoverDataAtSide((byte) aSide.ordinal()), + aFluid, + this)))) return mMetaTileEntity.canDrain(aSide, aFluid); return false; } @@ -1732,17 +2058,25 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec public FluidTankInfo[] getTankInfo(ForgeDirection aSide) { final byte tSide = (byte) aSide.ordinal(); - if (canAccessData() && - ( - aSide == ForgeDirection.UNKNOWN || - ( - mMetaTileEntity.isLiquidInput(tSide) && getCoverBehaviorAtSideNew(tSide).letsFluidIn(tSide, getCoverIDAtSide(tSide), getComplexCoverDataAtSide(tSide), null, this)) || - (mMetaTileEntity.isLiquidOutput(tSide) && getCoverBehaviorAtSideNew(tSide).letsFluidOut(tSide, getCoverIDAtSide(tSide), getComplexCoverDataAtSide(tSide), null, this) - ) - ) - ) - return mMetaTileEntity.getTankInfo(aSide); - return new FluidTankInfo[]{}; + if (canAccessData() + && (aSide == ForgeDirection.UNKNOWN + || (mMetaTileEntity.isLiquidInput(tSide) + && getCoverBehaviorAtSideNew(tSide) + .letsFluidIn( + tSide, + getCoverIDAtSide(tSide), + getComplexCoverDataAtSide(tSide), + null, + this)) + || (mMetaTileEntity.isLiquidOutput(tSide) + && getCoverBehaviorAtSideNew(tSide) + .letsFluidOut( + tSide, + getCoverIDAtSide(tSide), + getComplexCoverDataAtSide(tSide), + null, + this)))) return mMetaTileEntity.getTankInfo(aSide); + return new FluidTankInfo[] {}; } public double getOutputEnergyUnitsPerTick() { @@ -1771,7 +2105,9 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec } public double getOfferedEnergy() { - return (canAccessData() && getStoredEU() - mMetaTileEntity.getMinimumStoredEU() >= oOutput) ? Math.max(0, oOutput) : 0; + return (canAccessData() && getStoredEU() - mMetaTileEntity.getMinimumStoredEU() >= oOutput) + ? Math.max(0, oOutput) + : 0; } public void drawEnergy(double amount) { @@ -1785,10 +2121,8 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec public int addEnergy(int aEnergy) { if (!canAccessData()) return 0; - if (aEnergy > 0) - increaseStoredEnergyUnits(aEnergy, true); - else - decreaseStoredEU(-aEnergy, true); + if (aEnergy > 0) increaseStoredEnergyUnits(aEnergy, true); + else decreaseStoredEU(-aEnergy, true); return (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getEUVar()); } @@ -1852,7 +2186,9 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec return true; } aStack = GT_OreDictUnificator.get(aStack); - if (GT_Utility.areStacksEqual(tStack, aStack) && tStack.stackSize + aStack.stackSize <= Math.min(aStack.getMaxStackSize(), getInventoryStackLimit())) { + if (GT_Utility.areStacksEqual(tStack, aStack) + && tStack.stackSize + aStack.stackSize + <= Math.min(aStack.getMaxStackSize(), getInventoryStackLimit())) { tStack.stackSize += aStack.stackSize; markDirty(); return true; @@ -1894,7 +2230,7 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec public String[] getInfoData() { { if (canAccessData()) return getMetaTileEntity().getInfoData(); - return new String[]{}; + return new String[] {}; } } @@ -1904,7 +2240,14 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec } @Override - public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List<AxisAlignedBB> outputAABB, Entity collider) { + public void addCollisionBoxesToList( + World aWorld, + int aX, + int aY, + int aZ, + AxisAlignedBB inputAABB, + List<AxisAlignedBB> outputAABB, + Entity collider) { mMetaTileEntity.addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider); } @@ -1935,9 +2278,10 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec final int chemistryUpdateVersion = GT_Mod.calculateTotalGTVersion(509, 31); final int configCircuitAdditionVersion = GT_Mod.calculateTotalGTVersion(509, 40); // 4 is old GT_MetaTileEntity_BasicMachine.OTHER_SLOT_COUNT - if (nbtVersion < configCircuitAdditionVersion && getMetaTileEntity() instanceof GT_MetaTileEntity_BasicMachine && slotIndex >= 4) - slotIndex += 1; - if (mID >= 211 && mID <= 218) {//Assembler + if (nbtVersion < configCircuitAdditionVersion + && getMetaTileEntity() instanceof GT_MetaTileEntity_BasicMachine + && slotIndex >= 4) slotIndex += 1; + if (mID >= 211 && mID <= 218) { // Assembler if (nbtVersion < chemistryUpdateVersion) { oldInputSize = 2; oldOutputSize = 1; @@ -1947,8 +2291,7 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec newInputSize = 6; newOutputSize = 1; - - } else if (mID >= 421 && mID <= 428) {//Chemical Reactor + } else if (mID >= 421 && mID <= 428) { // Chemical Reactor if (nbtVersion < chemistryUpdateVersion) { oldInputSize = 2; oldOutputSize = 1; @@ -1958,7 +2301,7 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec newInputSize = 2; newOutputSize = 2; - } else if (mID >= 531 && mID <= 538) {//Distillery + } else if (mID >= 531 && mID <= 538) { // Distillery if (nbtVersion < chemistryUpdateVersion) { oldInputSize = 1; oldOutputSize = 0; @@ -1967,7 +2310,7 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec } newInputSize = 1; newOutputSize = 1; - } else if (mID >= 581 && mID <= 588) {//Mixer + } else if (mID >= 581 && mID <= 588) { // Mixer if (nbtVersion < chemistryUpdateVersion) { oldInputSize = 4; oldOutputSize = 1; @@ -1994,8 +2337,7 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec @Override @Optional.Method(modid = "appliedenergistics2") public IGridNode getGridNode(ForgeDirection forgeDirection) { - if (mFacing != forgeDirection.ordinal()) - return null; + if (mFacing != forgeDirection.ordinal()) return null; final AENetworkProxy gp = getProxy(); return gp != null ? gp.getNode() : null; } @@ -2008,8 +2350,7 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec @Override @Optional.Method(modid = "appliedenergistics2") - public void securityBreak() { - } + public void securityBreak() {} @Override @Optional.Method(modid = "appliedenergistics2") @@ -2033,38 +2374,33 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec @Override @Optional.Method(modid = "appliedenergistics2") public void gridChanged() { - if (mMetaTileEntity != null) - mMetaTileEntity.gridChanged(); + if (mMetaTileEntity != null) mMetaTileEntity.gridChanged(); } @TileEvent(TileEventType.WORLD_NBT_READ) @Optional.Method(modid = "appliedenergistics2") public void readFromNBT_AENetwork(final NBTTagCompound data) { final AENetworkProxy gp = getProxy(); - if (gp != null) - getProxy().readFromNBT(data); + if (gp != null) getProxy().readFromNBT(data); } @TileEvent(TileEventType.WORLD_NBT_WRITE) @Optional.Method(modid = "appliedenergistics2") public void writeToNBT_AENetwork(final NBTTagCompound data) { final AENetworkProxy gp = getProxy(); - if (gp != null) - gp.writeToNBT(data); + if (gp != null) gp.writeToNBT(data); } @Optional.Method(modid = "appliedenergistics2") void onChunkUnloadAE() { final AENetworkProxy gp = getProxy(); - if (gp != null) - gp.onChunkUnload(); + if (gp != null) gp.onChunkUnload(); } @Optional.Method(modid = "appliedenergistics2") void invalidateAE() { final AENetworkProxy gp = getProxy(); - if (gp != null) - gp.invalidate(); + if (gp != null) gp.invalidate(); } @Override @@ -2079,8 +2415,9 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec @Override public IAlignment getAlignment() { - return getMetaTileEntity() instanceof IAlignmentProvider ? ((IAlignmentProvider) getMetaTileEntity()).getAlignment() : - getMetaTileEntity() instanceof IAlignment ? (IAlignment) getMetaTileEntity() : null; + return getMetaTileEntity() instanceof IAlignmentProvider + ? ((IAlignmentProvider) getMetaTileEntity()).getAlignment() + : getMetaTileEntity() instanceof IAlignment ? (IAlignment) getMetaTileEntity() : null; } @Nullable diff --git a/src/main/java/gregtech/api/metatileentity/BaseTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseTileEntity.java index 8e6206f612..1f6fb0c68d 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseTileEntity.java @@ -1,14 +1,22 @@ package gregtech.api.metatileentity; +import static gregtech.api.enums.GT_Values.ALL_VALID_SIDES; +import static gregtech.api.enums.GT_Values.COMPASS_DIRECTIONS; +import static gregtech.api.enums.GT_Values.GT; +import static gregtech.api.enums.GT_Values.NW; +import static gregtech.api.enums.GT_Values.SIDE_DOWN; +import static gregtech.api.enums.GT_Values.SIDE_UP; + import gregtech.api.interfaces.tileentity.IGTEnet; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords; import gregtech.api.interfaces.tileentity.IIC2Enet; import gregtech.api.net.GT_Packet_Block_Event; -import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Utility; import ic2.api.energy.event.EnergyTileLoadEvent; import ic2.api.energy.event.EnergyTileUnloadEvent; +import java.util.Arrays; +import java.util.concurrent.ThreadLocalRandom; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; @@ -25,16 +33,6 @@ import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.IFluidHandler; -import java.util.Arrays; -import java.util.concurrent.ThreadLocalRandom; - -import static gregtech.api.enums.GT_Values.ALL_VALID_SIDES; -import static gregtech.api.enums.GT_Values.COMPASS_DIRECTIONS; -import static gregtech.api.enums.GT_Values.GT; -import static gregtech.api.enums.GT_Values.NW; -import static gregtech.api.enums.GT_Values.SIDE_DOWN; -import static gregtech.api.enums.GT_Values.SIDE_UP; - /** * The Functions my old TileEntities and my BaseMetaTileEntities have in common. * <p/> @@ -63,17 +61,17 @@ public abstract class BaseTileEntity extends TileEntity implements IHasWorldObje private final ChunkCoordinates mReturnedCoordinates = new ChunkCoordinates(); public static byte getSideForPlayerPlacing(Entity aPlayer, byte aDefaultFacing, boolean[] aAllowedFacings) { - if(aPlayer != null) { + if (aPlayer != null) { if (aPlayer.rotationPitch >= 65 && aAllowedFacings[SIDE_UP]) return SIDE_UP; if (aPlayer.rotationPitch <= -65 && aAllowedFacings[SIDE_DOWN]) return SIDE_DOWN; - final byte rFacing = COMPASS_DIRECTIONS[MathHelper.floor_double(0.5D + 4.0F * aPlayer.rotationYaw / 360.0F) & 0x3]; + final byte rFacing = + COMPASS_DIRECTIONS[MathHelper.floor_double(0.5D + 4.0F * aPlayer.rotationYaw / 360.0F) & 0x3]; if (aAllowedFacings[rFacing]) return rFacing; } for (final byte tSide : ALL_VALID_SIDES) if (aAllowedFacings[tSide]) return tSide; return aDefaultFacing; } - private void clearNullMarkersFromTileEntityBuffer() { for (int i = 0; i < mBufferedTileEntities.length; i++) if (mBufferedTileEntities[i] == this) mBufferedTileEntities[i] = null; @@ -364,7 +362,9 @@ public abstract class BaseTileEntity extends TileEntity implements IHasWorldObje public Block getBlock(ChunkCoordinates aCoords) { if (worldObj == null) return Blocks.air; - if (ignoreUnloadedChunks && crossedChunkBorder(aCoords) && !worldObj.blockExists(aCoords.posX, aCoords.posY, aCoords.posZ)) return Blocks.air; + if (ignoreUnloadedChunks + && crossedChunkBorder(aCoords) + && !worldObj.blockExists(aCoords.posX, aCoords.posY, aCoords.posZ)) return Blocks.air; return worldObj.getBlock(aCoords.posX, aCoords.posY, aCoords.posZ); } @@ -426,7 +426,9 @@ public abstract class BaseTileEntity extends TileEntity implements IHasWorldObje mBufferedTileEntities[aSide] = null; return getTileEntityAtSide(aSide); } - if (mBufferedTileEntities[aSide].xCoord == tX && mBufferedTileEntities[aSide].yCoord == tY && mBufferedTileEntities[aSide].zCoord == tZ) { + if (mBufferedTileEntities[aSide].xCoord == tX + && mBufferedTileEntities[aSide].yCoord == tY + && mBufferedTileEntities[aSide].zCoord == tZ) { return mBufferedTileEntities[aSide]; } return null; @@ -482,8 +484,11 @@ public abstract class BaseTileEntity extends TileEntity implements IHasWorldObje worldObj.notifyBlockOfNeighborChange(x1, y1, z1, thisBlock); // update if it was / is strong powered. - if (((((mStrongRedstone | oStrongRedstone) >>> dir.ordinal()) & 1) != 0 ) && getBlock(x1, y1, z1).isNormalCube()) { - final int skipUpdateSide = dir.getOpposite().ordinal(); //Don't update this block. Still updates diagonal blocks twice if conditions meet. + if (((((mStrongRedstone | oStrongRedstone) >>> dir.ordinal()) & 1) != 0) + && getBlock(x1, y1, z1).isNormalCube()) { + final int skipUpdateSide = dir.getOpposite() + .ordinal(); // Don't update this block. Still updates diagonal blocks twice if conditions + // meet. for (final ForgeDirection dir2 : ForgeDirection.VALID_DIRECTIONS) { final int x2 = x1 + dir2.offsetX, y2 = y1 + dir2.offsetY, z2 = z1 + dir2.offsetZ; @@ -497,7 +502,8 @@ public abstract class BaseTileEntity extends TileEntity implements IHasWorldObje @Override public final void sendBlockEvent(byte aID, byte aValue) { - NW.sendPacketToAllPlayersInRange(worldObj, new GT_Packet_Block_Event(xCoord, (short) yCoord, zCoord, aID, aValue), xCoord, zCoord); + NW.sendPacketToAllPlayersInRange( + worldObj, new GT_Packet_Block_Event(xCoord, (short) yCoord, zCoord, aID, aValue), xCoord, zCoord); } protected boolean crossedChunkBorder(int aX, int aZ) { @@ -520,14 +526,14 @@ public abstract class BaseTileEntity extends TileEntity implements IHasWorldObje public void markDirty() { // Avoid sending neighbor updates, just mark the chunk as dirty to make sure it gets saved final Chunk chunk = worldObj.getChunkFromBlockCoords(xCoord, zCoord); - if(chunk != null) { + if (chunk != null) { chunk.setChunkModified(); } } @Deprecated - public String trans(String aKey, String aEnglish){ - return GT_Utility.trans(aKey, aEnglish); + public String trans(String aKey, String aEnglish) { + return GT_Utility.trans(aKey, aEnglish); } /* @@ -537,8 +543,8 @@ public abstract class BaseTileEntity extends TileEntity implements IHasWorldObje protected boolean joinedIc2Enet = false; protected void createIc2Sink() { - if(ic2EnergySink == null && isServerSide() && shouldJoinIc2Enet()) { - ic2EnergySink = new TileIC2EnergySink((IGregTechTileEntity)this); + if (ic2EnergySink == null && isServerSide() && shouldJoinIc2Enet()) { + ic2EnergySink = new TileIC2EnergySink((IGregTechTileEntity) this); } } @@ -551,7 +557,7 @@ public abstract class BaseTileEntity extends TileEntity implements IHasWorldObje protected void joinEnet() { if (joinedIc2Enet || !shouldJoinIc2Enet()) return; - if(ic2EnergySink == null) createIc2Sink(); + if (ic2EnergySink == null) createIc2Sink(); if (ic2EnergySink != null) { MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(ic2EnergySink)); @@ -565,5 +571,4 @@ public abstract class BaseTileEntity extends TileEntity implements IHasWorldObje MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(ic2EnergySink)); } } - } diff --git a/src/main/java/gregtech/api/metatileentity/CommonMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/CommonMetaTileEntity.java index 766110d227..7e35f2e2c1 100644 --- a/src/main/java/gregtech/api/metatileentity/CommonMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/CommonMetaTileEntity.java @@ -1,5 +1,7 @@ package gregtech.api.metatileentity; +import static gregtech.GT_Mod.GT_FML_LOGGER; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -12,9 +14,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.network.Packet; -import static gregtech.GT_Mod.GT_FML_LOGGER; -import static gregtech.api.enums.GT_Values.ALL_SIDES; - public abstract class CommonMetaTileEntity extends CoverableTileEntity implements IGregTechTileEntity { protected boolean mNeedsBlockUpdate = true, mNeedsUpdate = true, mSendClientData = false, mInventoryChanged = false; @@ -30,6 +29,7 @@ public abstract class CommonMetaTileEntity extends CoverableTileEntity implement } return false; } + protected void saveMetaTileNBT(NBTTagCompound aNBT) { try { if (hasValidMetaTileEntity()) { @@ -158,5 +158,4 @@ public abstract class CommonMetaTileEntity extends CoverableTileEntity implement final IMetaTileEntity meta = getMetaTileEntity(); return meta != null && meta.shouldJoinIc2Enet(); } - } diff --git a/src/main/java/gregtech/api/metatileentity/CoverableTileEntity.java b/src/main/java/gregtech/api/metatileentity/CoverableTileEntity.java index f7104c9b93..6c61ae8599 100644 --- a/src/main/java/gregtech/api/metatileentity/CoverableTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/CoverableTileEntity.java @@ -1,10 +1,16 @@ package gregtech.api.metatileentity; +import static gregtech.api.enums.GT_Values.ALL_VALID_SIDES; +import static gregtech.api.enums.GT_Values.E; +import static gregtech.api.enums.GT_Values.NW; +import static gregtech.api.util.GT_LanguageManager.FACES; +import static gregtech.api.util.GT_LanguageManager.getTranslation; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.tileentity.IGregtechWailaProvider; import gregtech.api.net.GT_Packet_RequestCoverData; import gregtech.api.net.GT_Packet_SendCoverData; @@ -14,6 +20,10 @@ import gregtech.api.util.GT_CoverBehaviorBase; import gregtech.api.util.ISerializableObject; import gregtech.common.GT_Client; import gregtech.common.covers.GT_Cover_Fluidfilter; +import java.util.Arrays; +import java.util.List; +import java.util.Objects; +import java.util.stream.IntStream; import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; import net.minecraft.entity.item.EntityItem; @@ -25,27 +35,26 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidRegistry; -import java.util.Arrays; -import java.util.Objects; -import java.util.stream.IntStream; -import java.util.List; - -import static gregtech.api.enums.GT_Values.ALL_VALID_SIDES; -import static gregtech.api.enums.GT_Values.E; -import static gregtech.api.enums.GT_Values.NW; -import static gregtech.api.util.GT_LanguageManager.FACES; -import static gregtech.api.util.GT_LanguageManager.getTranslation; - public abstract class CoverableTileEntity extends BaseTileEntity implements ICoverable, IGregtechWailaProvider { - public static final String[] COVER_DATA_NBT_KEYS = Arrays.stream(ForgeDirection.VALID_DIRECTIONS).mapToInt(Enum::ordinal).mapToObj(i -> "mCoverData" + i).toArray(String[]::new); - protected final GT_CoverBehaviorBase<?>[] mCoverBehaviors = new GT_CoverBehaviorBase<?>[]{GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior}; - protected byte[] mSidedRedstone = new byte[]{15, 15, 15, 15, 15, 15}; + public static final String[] COVER_DATA_NBT_KEYS = Arrays.stream(ForgeDirection.VALID_DIRECTIONS) + .mapToInt(Enum::ordinal) + .mapToObj(i -> "mCoverData" + i) + .toArray(String[]::new); + protected final GT_CoverBehaviorBase<?>[] mCoverBehaviors = new GT_CoverBehaviorBase<?>[] { + GregTech_API.sNoBehavior, + GregTech_API.sNoBehavior, + GregTech_API.sNoBehavior, + GregTech_API.sNoBehavior, + GregTech_API.sNoBehavior, + GregTech_API.sNoBehavior + }; + protected byte[] mSidedRedstone = new byte[] {15, 15, 15, 15, 15, 15}; protected boolean mRedstone = false; protected byte mStrongRedstone = 0; - protected int[] mCoverSides = new int[]{0, 0, 0, 0, 0, 0}; + protected int[] mCoverSides = new int[] {0, 0, 0, 0, 0, 0}; protected ISerializableObject[] mCoverData = new ISerializableObject[6]; - protected final boolean[] mCoverNeedUpdate = new boolean[]{false, false, false, false, false, false}; + protected final boolean[] mCoverNeedUpdate = new boolean[] {false, false, false, false, false, false}; protected short mID = 0; public long mTickTimer = 0; @@ -60,18 +69,18 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov if (mStrongRedstone > 0) aNBT.setByte("mStrongRedstone", mStrongRedstone); if (hasCover) aNBT.setIntArray("mCoverSides", mCoverSides); - if(!isDrop) { + if (!isDrop) { aNBT.setByteArray("mRedstoneSided", mSidedRedstone); aNBT.setBoolean("mRedstone", mRedstone); } - } - protected void readCoverNBT(NBTTagCompound aNBT) { - mCoverSides = aNBT.hasKey("mCoverSides") ? aNBT.getIntArray("mCoverSides") : new int[]{0, 0, 0, 0, 0, 0}; + mCoverSides = aNBT.hasKey("mCoverSides") ? aNBT.getIntArray("mCoverSides") : new int[] {0, 0, 0, 0, 0, 0}; mRedstone = aNBT.getBoolean("mRedstone"); - mSidedRedstone = aNBT.hasKey("mRedstoneSided") ? aNBT.getByteArray("mRedstoneSided") : new byte[]{15, 15, 15, 15, 15, 15}; + mSidedRedstone = aNBT.hasKey("mRedstoneSided") + ? aNBT.getByteArray("mRedstoneSided") + : new byte[] {15, 15, 15, 15, 15, 15}; mStrongRedstone = aNBT.getByte("mStrongRedstone"); for (byte i = 0; i < 6; i++) mCoverBehaviors[i] = GregTech_API.getCoverBehaviorNew(mCoverSides[i]); @@ -81,10 +90,11 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov if (aNBT.hasKey("mCoverData", 11) && aNBT.getIntArray("mCoverData").length == 6) { final int[] tOldData = aNBT.getIntArray("mCoverData"); for (int i = 0; i < tOldData.length; i++) { - if(mCoverBehaviors[i] instanceof GT_Cover_Fluidfilter) { + if (mCoverBehaviors[i] instanceof GT_Cover_Fluidfilter) { final String filterKey = String.format("fluidFilter%d", i); if (aNBT.hasKey(filterKey)) { - mCoverData[i] = mCoverBehaviors[i].createDataObject((tOldData[i] & 7) | (FluidRegistry.getFluidID(aNBT.getString(filterKey)) << 3)); + mCoverData[i] = mCoverBehaviors[i].createDataObject( + (tOldData[i] & 7) | (FluidRegistry.getFluidID(aNBT.getString(filterKey)) << 3)); } } else if (mCoverBehaviors[i] != null && mCoverBehaviors[i] != GregTech_API.sNoBehavior) { mCoverData[i] = mCoverBehaviors[i].createDataObject(tOldData[i]); @@ -92,18 +102,17 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov } } else { // no old data - for (byte i = 0; i<6; i++) { + for (byte i = 0; i < 6; i++) { if (mCoverBehaviors[i] == null) continue; if (aNBT.hasKey(COVER_DATA_NBT_KEYS[i])) mCoverData[i] = mCoverBehaviors[i].createDataObject(aNBT.getTag(COVER_DATA_NBT_KEYS[i])); - else - mCoverData[i] = mCoverBehaviors[i].createDataObject(); + else mCoverData[i] = mCoverBehaviors[i].createDataObject(); if (mCoverBehaviors[i].isDataNeededOnClient(i, mCoverSides[i], mCoverData[i], this)) issueCoverUpdate(i); } } - } + public abstract boolean isStillValid(); protected boolean doCoverThings() { @@ -112,8 +121,12 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov final GT_CoverBehaviorBase<?> tCover = getCoverBehaviorAtSideNew(i); final int tCoverTickRate = tCover.getTickRate(i, getCoverIDAtSide(i), mCoverData[i], this); if (tCoverTickRate > 0 && mTickTimer % tCoverTickRate == 0) { - final byte tRedstone = tCover.isRedstoneSensitive(i, getCoverIDAtSide(i), mCoverData[i], this, mTickTimer) ? getInputRedstoneSignal(i) : 0; - mCoverData[i] = tCover.doCoverThings(i, tRedstone, getCoverIDAtSide(i), mCoverData[i], this, mTickTimer); + final byte tRedstone = + tCover.isRedstoneSensitive(i, getCoverIDAtSide(i), mCoverData[i], this, mTickTimer) + ? getInputRedstoneSignal(i) + : 0; + mCoverData[i] = + tCover.doCoverThings(i, tRedstone, getCoverIDAtSide(i), mCoverData[i], this, mTickTimer); if (!isStillValid()) return false; } } @@ -126,43 +139,50 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov protected void checkDropCover() { for (byte i : ALL_VALID_SIDES) if (getCoverIDAtSide(i) != 0) - if (!allowCoverOnSide(i, new GT_ItemStack(getCoverIDAtSide(i)))) - dropCover(i, i, true); + if (!allowCoverOnSide(i, new GT_ItemStack(getCoverIDAtSide(i)))) dropCover(i, i, true); } protected void updateCoverBehavior() { - for (byte i : ALL_VALID_SIDES) - mCoverBehaviors[i] = GregTech_API.getCoverBehaviorNew(mCoverSides[i]); + for (byte i : ALL_VALID_SIDES) mCoverBehaviors[i] = GregTech_API.getCoverBehaviorNew(mCoverSides[i]); } @Override public void issueCoverUpdate(byte aSide) { - // If we've got a null worldObj we're getting called as a part of readingNBT from a non tickable MultiTileEntity on chunk load before the world is set + // If we've got a null worldObj we're getting called as a part of readingNBT from a non tickable MultiTileEntity + // on chunk load before the world is set // so we'll want to send a cover update. - if (worldObj == null || (isServerSide() && getCoverBehaviorAtSideNew(aSide).isDataNeededOnClient(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this))) + if (worldObj == null + || (isServerSide() + && getCoverBehaviorAtSideNew(aSide) + .isDataNeededOnClient( + aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this))) mCoverNeedUpdate[aSide] = true; } - public final ITexture getCoverTexture(byte aSide) { - if (getCoverIDAtSide(aSide) == 0) return null; - if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x1) != 0) { - return Textures.BlockIcons.HIDDEN_TEXTURE[0]; // See through - } - final ITexture coverTexture = getCoverBehaviorAtSideNew(aSide).getSpecialCoverTexture(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this); - return coverTexture != null ? coverTexture : GregTech_API.sCovers.get(new GT_ItemStack(getCoverIDAtSide(aSide))); + public final ITexture getCoverTexture(byte aSide) { + if (getCoverIDAtSide(aSide) == 0) return null; + if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x1) != 0) { + return Textures.BlockIcons.HIDDEN_TEXTURE[0]; // See through + } + final ITexture coverTexture = getCoverBehaviorAtSideNew(aSide) + .getSpecialCoverTexture(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this); + return coverTexture != null + ? coverTexture + : GregTech_API.sCovers.get(new GT_ItemStack(getCoverIDAtSide(aSide))); } protected void requestCoverDataIfNeeded() { - if(worldObj == null || !worldObj.isRemote) return; + if (worldObj == null || !worldObj.isRemote) return; for (byte i : ALL_VALID_SIDES) { - if (getCoverBehaviorAtSideNew(i).isDataNeededOnClient(i, getCoverIDAtSide(i), getComplexCoverDataAtSide(i), this)) + if (getCoverBehaviorAtSideNew(i) + .isDataNeededOnClient(i, getCoverIDAtSide(i), getComplexCoverDataAtSide(i), this)) NW.sendToServer(new GT_Packet_RequestCoverData(i, getCoverIDAtSide(i), this)); } } @Override public void setCoverIdAndDataAtSide(byte aSide, int aId, ISerializableObject aData) { - if(setCoverIDAtSideNoUpdate(aSide, aId)) { + if (setCoverIDAtSideNoUpdate(aSide, aId)) { setCoverDataAtSide(aSide, aData); issueCoverUpdate(aSide); issueBlockUpdate(); @@ -199,11 +219,12 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov @Override public void setCoverDataAtSide(byte aSide, ISerializableObject aData) { - if (aSide >= 0 && aSide < 6 && getCoverBehaviorAtSideNew(aSide) != null && getCoverBehaviorAtSideNew(aSide).cast(aData) != null) - mCoverData[aSide] = aData; + if (aSide >= 0 + && aSide < 6 + && getCoverBehaviorAtSideNew(aSide) != null + && getCoverBehaviorAtSideNew(aSide).cast(aData) != null) mCoverData[aSide] = aData; } - @Override @Deprecated public GT_CoverBehavior getCoverBehaviorAtSide(byte aSide) { @@ -225,7 +246,8 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov @Override public ItemStack getCoverItemAtSide(byte aSide) { - return getCoverBehaviorAtSideNew(aSide).getDisplayStack(getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide)); + return getCoverBehaviorAtSideNew(aSide) + .getDisplayStack(getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide)); } @Override @@ -248,25 +270,32 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov @Override public ISerializableObject getComplexCoverDataAtSide(byte aSide) { - if (aSide >= 0 && aSide < 6 && getCoverBehaviorAtSideNew(aSide) != null) - return mCoverData[aSide]; + if (aSide >= 0 && aSide < 6 && getCoverBehaviorAtSideNew(aSide) != null) return mCoverData[aSide]; return GregTech_API.sNoBehavior.createDataObject(); } @Override public GT_CoverBehaviorBase<?> getCoverBehaviorAtSideNew(byte aSide) { - if (aSide >= 0 && aSide < 6) - return mCoverBehaviors[aSide]; + if (aSide >= 0 && aSide < 6) return mCoverBehaviors[aSide]; return GregTech_API.sNoBehavior; } @Override public boolean dropCover(byte aSide, byte aDroppedSide, boolean aForced) { - if (getCoverBehaviorAtSideNew(aSide).onCoverRemoval(aSide, getCoverIDAtSide(aSide), mCoverData[aSide], this, aForced) || aForced) { - final ItemStack tStack = getCoverBehaviorAtSideNew(aSide).getDrop(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this); + if (getCoverBehaviorAtSideNew(aSide) + .onCoverRemoval(aSide, getCoverIDAtSide(aSide), mCoverData[aSide], this, aForced) + || aForced) { + final ItemStack tStack = getCoverBehaviorAtSideNew(aSide) + .getDrop(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this); if (tStack != null) { - getCoverBehaviorAtSideNew(aSide).onDropped(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this); - final EntityItem tEntity = new EntityItem(worldObj, getOffsetX(aDroppedSide, 1) + 0.5, getOffsetY(aDroppedSide, 1) + 0.5, getOffsetZ(aDroppedSide, 1) + 0.5, tStack); + getCoverBehaviorAtSideNew(aSide) + .onDropped(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this); + final EntityItem tEntity = new EntityItem( + worldObj, + getOffsetX(aDroppedSide, 1) + 0.5, + getOffsetY(aDroppedSide, 1) + 0.5, + getOffsetZ(aDroppedSide, 1) + 0.5, + tStack); tEntity.motionX = 0; tEntity.motionY = 0; tEntity.motionZ = 0; @@ -295,10 +324,10 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov setOutputRedstoneSignal(aSide, aStrength); } - @Override public void setInternalOutputRedstoneSignal(byte aSide, byte aStrength) { - if (!getCoverBehaviorAtSideNew(aSide).manipulatesSidedRedstoneOutput(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this)) + if (!getCoverBehaviorAtSideNew(aSide) + .manipulatesSidedRedstoneOutput(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this)) setOutputRedstoneSignal(aSide, aStrength); } @@ -314,12 +343,17 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov @Override public byte getStrongestRedstone() { - return (byte) IntStream.range(1, 6).map(i -> getInternalInputRedstoneSignal((byte) i)).max().orElse(0); + return (byte) IntStream.range(1, 6) + .map(i -> getInternalInputRedstoneSignal((byte) i)) + .max() + .orElse(0); } @Override public byte getStrongOutputRedstoneSignal(byte aSide) { - return aSide >= 0 && aSide < 6 && (mStrongRedstone & (1 << aSide)) != 0 ? (byte) (mSidedRedstone[aSide] & 15) : 0; + return aSide >= 0 && aSide < 6 && (mStrongRedstone & (1 << aSide)) != 0 + ? (byte) (mSidedRedstone[aSide] & 15) + : 0; } @Override @@ -329,17 +363,30 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov @Override public byte getInternalInputRedstoneSignal(byte aSide) { - return (byte) (getCoverBehaviorAtSideNew(aSide).getRedstoneInput(aSide, getInputRedstoneSignal(aSide), getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this) & 15); + return (byte) (getCoverBehaviorAtSideNew(aSide) + .getRedstoneInput( + aSide, + getInputRedstoneSignal(aSide), + getCoverIDAtSide(aSide), + getComplexCoverDataAtSide(aSide), + this) + & 15); } @Override public byte getInputRedstoneSignal(byte aSide) { - return (byte) (worldObj.getIndirectPowerLevelTo(getOffsetX(aSide, 1), getOffsetY(aSide, 1), getOffsetZ(aSide, 1), aSide) & 15); + return (byte) (worldObj.getIndirectPowerLevelTo( + getOffsetX(aSide, 1), getOffsetY(aSide, 1), getOffsetZ(aSide, 1), aSide) + & 15); } @Override public byte getOutputRedstoneSignal(byte aSide) { - return getCoverBehaviorAtSideNew(aSide).manipulatesSidedRedstoneOutput(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this) ? mSidedRedstone[aSide] : getGeneralRS(aSide); + return getCoverBehaviorAtSideNew(aSide) + .manipulatesSidedRedstoneOutput( + aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this) + ? mSidedRedstone[aSide] + : getGeneralRS(aSide); } protected void updateOutputRedstoneSignal(byte aSide) { @@ -348,13 +395,13 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov @Override public void receiveCoverData(byte aCoverSide, int aCoverID, int aCoverData) { - if ((aCoverSide >= 0 && aCoverSide < 6)) - setCoverIDAtSideNoUpdate(aCoverSide, aCoverID); + if ((aCoverSide >= 0 && aCoverSide < 6)) setCoverIDAtSideNoUpdate(aCoverSide, aCoverID); setCoverDataAtSide(aCoverSide, aCoverData); } @Override - public void receiveCoverData(byte aCoverSide, int aCoverID, ISerializableObject aCoverData, EntityPlayerMP aPlayer) { + public void receiveCoverData( + byte aCoverSide, int aCoverID, ISerializableObject aCoverData, EntityPlayerMP aPlayer) { if ((aCoverSide >= 0 && aCoverSide < 6)) { setCoverIDAtSideNoUpdate(aCoverSide, aCoverID); setCoverDataAtSide(aCoverSide, aCoverData); @@ -365,24 +412,25 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov } protected void sendCoverDataIfNeeded() { - if(worldObj == null || worldObj.isRemote) return; + if (worldObj == null || worldObj.isRemote) return; final int mCoverNeedUpdateLength = mCoverNeedUpdate.length; for (byte i = 0; i < mCoverNeedUpdateLength; i++) { if (mCoverNeedUpdate[i]) { NW.sendPacketToAllPlayersInRange( worldObj, new GT_Packet_SendCoverData(i, getCoverIDAtSide(i), getComplexCoverDataAtSide(i), this), - xCoord, zCoord - ); + xCoord, + zCoord); mCoverNeedUpdate[i] = false; } } } @Override - public void getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { + public void getWailaBody( + ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { final NBTTagCompound tag = accessor.getNBTData(); - final byte side = (byte)accessor.getSide().ordinal(); + final byte side = (byte) accessor.getSide().ordinal(); final int[] coverSides = tag.getIntArray("mCoverSides"); // Not all data is available on the client, so get it from the NBT packet @@ -391,7 +439,8 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov final GT_CoverBehaviorBase<?> behavior = GregTech_API.getCoverBehaviorNew(coverId); if (behavior != null && behavior != GregTech_API.sNoBehavior) { if (tag.hasKey(CoverableTileEntity.COVER_DATA_NBT_KEYS[side])) { - final ISerializableObject dataObject = behavior.createDataObject(tag.getTag(CoverableTileEntity.COVER_DATA_NBT_KEYS[side])); + final ISerializableObject dataObject = + behavior.createDataObject(tag.getTag(CoverableTileEntity.COVER_DATA_NBT_KEYS[side])); final ItemStack coverStack = behavior.getDisplayStack(coverId, dataObject); if (coverStack != null) currenttip.add(String.format("Cover: %s", coverStack.getDisplayName())); final String behaviorDesc = behavior.getDescription(side, coverId, dataObject, null); @@ -405,11 +454,13 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov } @Override - public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, int z) { + public void getWailaNBTData( + EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, int z) { // No super implementation // super.getWailaNBTData(player, tile, tag, world, x, y, z); - // While we have some cover data on the client (enough to render it); we don't have all the information we want, such as + // While we have some cover data on the client (enough to render it); we don't have all the information we want, + // such as // details on the fluid filter, so send it all here. writeCoverNBT(tag, false); } @@ -420,7 +471,7 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov * @param aList - List to add the information to */ public static void addInstalledCoversInformation(NBTTagCompound aNBT, List<String> aList) { - if (aNBT.hasKey("mCoverSides")){ + if (aNBT.hasKey("mCoverSides")) { final int[] mCoverSides = aNBT.getIntArray("mCoverSides"); if (mCoverSides != null && mCoverSides.length == 6) { for (byte tSide : ALL_VALID_SIDES) { @@ -429,10 +480,12 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov final GT_CoverBehaviorBase<?> behavior = GregTech_API.getCoverBehaviorNew(coverId); if (behavior == null || behavior == GregTech_API.sNoBehavior) continue; if (!aNBT.hasKey(CoverableTileEntity.COVER_DATA_NBT_KEYS[tSide])) continue; - final ISerializableObject dataObject = behavior.createDataObject(aNBT.getTag(CoverableTileEntity.COVER_DATA_NBT_KEYS[tSide])); + final ISerializableObject dataObject = + behavior.createDataObject(aNBT.getTag(CoverableTileEntity.COVER_DATA_NBT_KEYS[tSide])); final ItemStack coverStack = behavior.getDisplayStack(coverId, dataObject); if (coverStack != null) { - aList.add(String.format("Cover on %s side: %s", getTranslation(FACES[tSide]), coverStack.getDisplayName())); + aList.add(String.format( + "Cover on %s side: %s", getTranslation(FACES[tSide]), coverStack.getDisplayName())); } } } diff --git a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java index 9d07b1f9ba..96cca4ba1d 100644 --- a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java +++ b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java @@ -1,5 +1,8 @@ package gregtech.api.metatileentity; +import static gregtech.api.enums.GT_Values.GT; +import static gregtech.api.enums.GT_Values.V; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gnu.trove.list.TIntList; @@ -13,6 +16,10 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.objects.GT_ItemStack; import gregtech.api.util.*; import gregtech.common.GT_Client; +import java.io.File; +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.texture.IIconRegister; @@ -32,14 +39,6 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; -import java.io.File; -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; - -import static gregtech.api.enums.GT_Values.GT; -import static gregtech.api.enums.GT_Values.V; - /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! * <p/> @@ -59,11 +58,13 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { * This variable tells, which directions the Block is connected to. It is a Bitmask. */ public byte mConnections = 0; + protected boolean mCheckConnections = false; /** * Only assigned for the MetaTileEntity in the List! Also only used to get the localized Name for the ItemStack and for getInvName. */ public String mName; + public boolean doTickProfilingInThisTick = true; /** * accessibility to this Field is no longer given, see below @@ -83,7 +84,7 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { * } */ public MetaPipeEntity(int aID, String aBasicName, String aRegionalName, int aInvSlotCount) { - this(aID, aBasicName, aRegionalName, aInvSlotCount, true); + this(aID, aBasicName, aRegionalName, aInvSlotCount, true); } public MetaPipeEntity(int aID, String aBasicName, String aRegionalName, int aInvSlotCount, boolean aAddInfo) { @@ -101,13 +102,13 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { mInventory = new ItemStack[aInvSlotCount]; if (aAddInfo && GT.isClientSide()) { - addInfo(aID); + addInfo(aID); } } protected final void addInfo(int aID) { - if(!GT.isClientSide()) return; - + if (!GT.isClientSide()) return; + ItemStack tStack = new ItemStack(GregTech_API.sBlockMachines, 1, aID); tStack.getItem().addInformation(tStack, null, new ArrayList<String>(), true); } @@ -153,7 +154,10 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { @Override public ItemStack getStackForm(long aAmount) { - return new ItemStack(GregTech_API.sBlockMachines, (int) aAmount, getBaseMetaTileEntity().getMetaTileID()); + return new ItemStack( + GregTech_API.sBlockMachines, + (int) aAmount, + getBaseMetaTileEntity().getMetaTileID()); } public boolean isCoverOnSide(BaseMetaPipeEntity aPipe, EntityLivingBase aEntity) { @@ -183,32 +187,44 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { if (aSide < 6 && mBaseMetaTileEntity.getCoverIDAtSide(aSide) > 0) { tCovered = true; } - if(isConnectedAtSide(aSide)){ - tCovered = true; + if (isConnectedAtSide(aSide)) { + tCovered = true; } - //GT_FML_LOGGER.info("Cover: "+mBaseMetaTileEntity.getCoverIDAtSide(aSide)); - //toDo: filter cover ids that actually protect against temperature (rubber/plastic maybe?, more like asbestos) + // GT_FML_LOGGER.info("Cover: "+mBaseMetaTileEntity.getCoverIDAtSide(aSide)); + // toDo: filter cover ids that actually protect against temperature (rubber/plastic maybe?, more like asbestos) return tCovered; } @Override - public void onServerStart() {/*Do nothing*/} + public void onServerStart() { + /*Do nothing*/ + } @Override - public void onWorldSave(File aSaveDirectory) {/*Do nothing*/} + public void onWorldSave(File aSaveDirectory) { + /*Do nothing*/ + } @Override - public void onWorldLoad(File aSaveDirectory) {/*Do nothing*/} + public void onWorldLoad(File aSaveDirectory) { + /*Do nothing*/ + } @Override - public void onConfigLoad(GT_Config aConfig) {/*Do nothing*/} + public void onConfigLoad(GT_Config aConfig) { + /*Do nothing*/ + } @Override - public void setItemNBT(NBTTagCompound aNBT) {/*Do nothing*/} + public void setItemNBT(NBTTagCompound aNBT) { + /*Do nothing*/ + } @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister aBlockIconRegister) {/*Do nothing*/} + public void registerIcons(IIconRegister aBlockIconRegister) { + /*Do nothing*/ + } @Override public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) { @@ -216,31 +232,42 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { } @Override - public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {/*Do nothing*/} + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + /*Do nothing*/ + } @Override - public boolean onWrenchRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public boolean onWrenchRightClick( + byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { return false; } @Override - public boolean onWireCutterRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public boolean onWireCutterRightClick( + byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { return false; } @Override - public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public boolean onSolderingToolRightClick( + byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { return false; } @Override - public void onExplosion() {/*Do nothing*/} + public void onExplosion() { + /*Do nothing*/ + } @Override - public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) {/*Do nothing*/} + public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { + /*Do nothing*/ + } @Override - public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {/*Do nothing*/} + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + /*Do nothing*/ + } @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { @@ -254,38 +281,53 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { } @Override - public void inValidate() {/*Do nothing*/} + public void inValidate() { + /*Do nothing*/ + } @Override - public void onRemoval() {/*Do nothing*/} + public void onRemoval() { + /*Do nothing*/ + } @Override - public void initDefaultModes(NBTTagCompound aNBT) {/*Do nothing*/} + public void initDefaultModes(NBTTagCompound aNBT) { + /*Do nothing*/ + } /** * When a GUI is opened */ - public void onOpenGUI() {/*Do nothing*/} + public void onOpenGUI() { + /*Do nothing*/ + } /** * When a GUI is closed */ - public void onCloseGUI() {/*Do nothing*/} + public void onCloseGUI() { + /*Do nothing*/ + } /** * a Player rightclicks the Machine * Sneaky rightclicks are not getting passed to this! */ @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) { + public boolean onRightclick( + IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) { return false; } @Override - public void onLeftclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {/*Do nothing*/} + public void onLeftclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + /*Do nothing*/ + } @Override - public void onValueUpdate(byte aValue) {/*Do nothing*/} + public void onValueUpdate(byte aValue) { + /*Do nothing*/ + } @Override public byte getUpdateData() { @@ -293,13 +335,19 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { } @Override - public void doSound(byte aIndex, double aX, double aY, double aZ) {/*Do nothing*/} + public void doSound(byte aIndex, double aX, double aY, double aZ) { + /*Do nothing*/ + } @Override - public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {/*Do nothing*/} + public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { + /*Do nothing*/ + } @Override - public void stopSoundLoop(byte aValue, double aX, double aY, double aZ) {/*Do nothing*/} + public void stopSoundLoop(byte aValue, double aX, double aY, double aZ) { + /*Do nothing*/ + } @Override public final void sendSound(byte aIndex) { @@ -340,7 +388,8 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { } @Override - public ArrayList<String> getSpecialDebugInfo(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, int aLogLevel, ArrayList<String> aList) { + public ArrayList<String> getSpecialDebugInfo( + IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, int aLogLevel, ArrayList<String> aList) { return aList; } @@ -415,10 +464,14 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { } @Override - public void onMachineBlockUpdate() {/*Do nothing*/} + public void onMachineBlockUpdate() { + /*Do nothing*/ + } @Override - public void receiveClientEvent(byte aEventID, byte aValue) {/*Do nothing*/} + public void receiveClientEvent(byte aEventID, byte aValue) { + /*Do nothing*/ + } @Override public boolean isSimpleMachine() { @@ -452,7 +505,7 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { @Override public String[] getInfoData() { - return new String[]{}; + return new String[] {}; } public boolean isDigitalChest() { @@ -463,7 +516,9 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { return null; } - public void setItemCount(int aCount) {/*Do nothing*/} + public void setItemCount(int aCount) { + /*Do nothing*/ + } public int getMaxItemCount() { return 0; @@ -522,21 +577,59 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { public int[] getAccessibleSlotsFromSide(int aSide) { TIntList tList = new TIntArrayList(); IGregTechTileEntity tTileEntity = getBaseMetaTileEntity(); - boolean tSkip = tTileEntity.getCoverBehaviorAtSideNew((byte) aSide).letsItemsIn((byte) aSide, tTileEntity.getCoverIDAtSide((byte) aSide), tTileEntity.getComplexCoverDataAtSide((byte) aSide), -2, tTileEntity) || tTileEntity.getCoverBehaviorAtSideNew((byte) aSide).letsItemsOut((byte) aSide, tTileEntity.getCoverIDAtSide((byte) aSide), tTileEntity.getComplexCoverDataAtSide((byte) aSide), -2, tTileEntity); + boolean tSkip = tTileEntity + .getCoverBehaviorAtSideNew((byte) aSide) + .letsItemsIn( + (byte) aSide, + tTileEntity.getCoverIDAtSide((byte) aSide), + tTileEntity.getComplexCoverDataAtSide((byte) aSide), + -2, + tTileEntity) + || tTileEntity + .getCoverBehaviorAtSideNew((byte) aSide) + .letsItemsOut( + (byte) aSide, + tTileEntity.getCoverIDAtSide((byte) aSide), + tTileEntity.getComplexCoverDataAtSide((byte) aSide), + -2, + tTileEntity); for (int i = 0; i < getSizeInventory(); i++) - if (isValidSlot(i) && (tSkip || tTileEntity.getCoverBehaviorAtSideNew((byte) aSide).letsItemsOut((byte) aSide, tTileEntity.getCoverIDAtSide((byte) aSide), tTileEntity.getComplexCoverDataAtSide((byte) aSide), i, tTileEntity) || tTileEntity.getCoverBehaviorAtSideNew((byte) aSide).letsItemsIn((byte) aSide, tTileEntity.getCoverIDAtSide((byte) aSide), tTileEntity.getComplexCoverDataAtSide((byte) aSide), i, tTileEntity))) - tList.add(i); + if (isValidSlot(i) + && (tSkip + || tTileEntity + .getCoverBehaviorAtSideNew((byte) aSide) + .letsItemsOut( + (byte) aSide, + tTileEntity.getCoverIDAtSide((byte) aSide), + tTileEntity.getComplexCoverDataAtSide((byte) aSide), + i, + tTileEntity) + || tTileEntity + .getCoverBehaviorAtSideNew((byte) aSide) + .letsItemsIn( + (byte) aSide, + tTileEntity.getCoverIDAtSide((byte) aSide), + tTileEntity.getComplexCoverDataAtSide((byte) aSide), + i, + tTileEntity))) tList.add(i); return tList.toArray(); } @Override public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { - return isValidSlot(aIndex) && aStack != null && aIndex < mInventory.length && (mInventory[aIndex] == null || GT_Utility.areStacksEqual(aStack, mInventory[aIndex])) && allowPutStack(getBaseMetaTileEntity(), aIndex, (byte) aSide, aStack); + return isValidSlot(aIndex) + && aStack != null + && aIndex < mInventory.length + && (mInventory[aIndex] == null || GT_Utility.areStacksEqual(aStack, mInventory[aIndex])) + && allowPutStack(getBaseMetaTileEntity(), aIndex, (byte) aSide, aStack); } @Override public boolean canExtractItem(int aIndex, ItemStack aStack, int aSide) { - return isValidSlot(aIndex) && aStack != null && aIndex < mInventory.length && allowPullStack(getBaseMetaTileEntity(), aIndex, (byte) aSide, aStack); + return isValidSlot(aIndex) + && aStack != null + && aIndex < mInventory.length + && allowPullStack(getBaseMetaTileEntity(), aIndex, (byte) aSide, aStack); } @Override @@ -551,8 +644,8 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { @Override public FluidTankInfo[] getTankInfo(ForgeDirection aSide) { - if (getCapacity() <= 0 && !getBaseMetaTileEntity().hasSteamEngineUpgrade()) return new FluidTankInfo[]{}; - return new FluidTankInfo[]{getInfo()}; + if (getCapacity() <= 0 && !getBaseMetaTileEntity().hasSteamEngineUpgrade()) return new FluidTankInfo[] {}; + return new FluidTankInfo[] {getInfo()}; } public int fill_default(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { @@ -683,30 +776,66 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { @Override public void doExplosion(long aExplosionPower) { - float tStrength = - aExplosionPower < V[0] ? 1.0F : - aExplosionPower < V[1] ? 2.0F : - aExplosionPower < V[2] ? 3.0F : - aExplosionPower < V[3] ? 4.0F : - aExplosionPower < V[4] ? 5.0F : - aExplosionPower < V[4] * 2 ? 6.0F : - aExplosionPower < V[5] ? 7.0F : - aExplosionPower < V[6] ? 8.0F : - aExplosionPower < V[7] ? 9.0F : - aExplosionPower < V[8] ? 10.0F : - aExplosionPower < V[8] * 2 ? 11.0F : - aExplosionPower < V[9] ? 12.0F : - aExplosionPower < V[10] ? 13.0F : - aExplosionPower < V[11] ? 14.0F : - aExplosionPower < V[12] ? 15.0F : - aExplosionPower < V[12] * 2 ? 16.0F : - aExplosionPower < V[13] ? 17.0F : - aExplosionPower < V[14] ? 18.0F : - aExplosionPower < V[15] ? 19.0F : 20.0F; - int tX = getBaseMetaTileEntity().getXCoord(), tY = getBaseMetaTileEntity().getYCoord(), tZ = getBaseMetaTileEntity().getZCoord(); + float tStrength = aExplosionPower < V[0] + ? 1.0F + : aExplosionPower < V[1] + ? 2.0F + : aExplosionPower < V[2] + ? 3.0F + : aExplosionPower < V[3] + ? 4.0F + : aExplosionPower < V[4] + ? 5.0F + : aExplosionPower < V[4] * 2 + ? 6.0F + : aExplosionPower < V[5] + ? 7.0F + : aExplosionPower < V[6] + ? 8.0F + : aExplosionPower < V[7] + ? 9.0F + : aExplosionPower < V[8] + ? 10.0F + : aExplosionPower < V[8] * 2 + ? 11.0F + : aExplosionPower < V[9] + ? 12.0F + : aExplosionPower + < V[ + 10] + ? 13.0F + : aExplosionPower + < V[ + 11] + ? 14.0F + : aExplosionPower + < V[ + 12] + ? 15.0F + : aExplosionPower + < V[ + 12] + * 2 + ? 16.0F + : aExplosionPower + < V[ + 13] + ? 17.0F + : aExplosionPower + < V[ + 14] + ? 18.0F + : aExplosionPower + < V[ + 15] + ? 19.0F + : 20.0F; + int tX = getBaseMetaTileEntity().getXCoord(), + tY = getBaseMetaTileEntity().getYCoord(), + tZ = getBaseMetaTileEntity().getZCoord(); World tWorld = getBaseMetaTileEntity().getWorld(); tWorld.setBlock(tX, tY, tZ, Blocks.air); - if (GregTech_API.sMachineExplosions){ + if (GregTech_API.sMachineExplosions) { new WorldSpawnedEventBuilder.ExplosionEffectEventBuilder() .setStrength(tStrength) .setSmoking(true) @@ -722,7 +851,14 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { } @Override - public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List<AxisAlignedBB> outputAABB, Entity collider) { + public void addCollisionBoxesToList( + World aWorld, + int aX, + int aY, + int aZ, + AxisAlignedBB inputAABB, + List<AxisAlignedBB> outputAABB, + Entity collider) { AxisAlignedBB axisalignedbb1 = getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); if (axisalignedbb1 != null && inputAABB.intersectsWith(axisalignedbb1)) outputAABB.add(axisalignedbb1); } @@ -743,23 +879,23 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { } @Override - public boolean allowGeneralRedstoneOutput(){ + public boolean allowGeneralRedstoneOutput() { return false; } - @Override - public boolean hasAlternativeModeText() { - return false; - } + @Override + public boolean hasAlternativeModeText() { + return false; + } - @Override - public String getAlternativeModeText() { - return ""; - } + @Override + public String getAlternativeModeText() { + return ""; + } @Deprecated - public String trans(String aKey, String aEnglish){ - return GT_Utility.trans(aKey, aEnglish); + public String trans(String aKey, String aEnglish) { + return GT_Utility.trans(aKey, aEnglish); } private boolean connectableColor(TileEntity tTileEntity) { @@ -776,13 +912,13 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { return true; } - @Override - public int connect(byte aSide) { - if (aSide >= 6) return 0; + @Override + public int connect(byte aSide) { + if (aSide >= 6) return 0; - final byte tSide = GT_Utility.getOppositeSide(aSide); - final IGregTechTileEntity baseMetaTile = getBaseMetaTileEntity(); - if (baseMetaTile == null || !baseMetaTile.isServerSide()) return 0; + final byte tSide = GT_Utility.getOppositeSide(aSide); + final IGregTechTileEntity baseMetaTile = getBaseMetaTileEntity(); + if (baseMetaTile == null || !baseMetaTile.isServerSide()) return 0; final GT_CoverBehaviorBase<?> coverBehavior = baseMetaTile.getCoverBehaviorAtSideNew(aSide); final int coverId = baseMetaTile.getCoverIDAtSide(aSide); @@ -796,30 +932,36 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { TileEntity tTileEntity = baseMetaTile.getTileEntityAtSide(aSide); if (!connectableColor(tTileEntity)) return 0; - if ((alwaysLookConnected || letsIn || letsOut)) { + if ((alwaysLookConnected || letsIn || letsOut)) { // Are we trying to connect to a pipe? let's do it! - IMetaTileEntity tPipe = tTileEntity instanceof IGregTechTileEntity ? ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() : null; - if (getClass().isInstance(tPipe) || (tPipe != null && tPipe.getClass().isInstance(this))) { + IMetaTileEntity tPipe = tTileEntity instanceof IGregTechTileEntity + ? ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() + : null; + if (getClass().isInstance(tPipe) + || (tPipe != null && tPipe.getClass().isInstance(this))) { connectAtSide(aSide); if (!((MetaPipeEntity) tPipe).isConnectedAtSide(tSide)) { // Make sure pipes all get together -- connect back to us if we're connecting to a pipe ((MetaPipeEntity) tPipe).connect(tSide); } return 1; - } - else if((getGT6StyleConnection() && baseMetaTile.getAirAtSide(aSide)) || canConnect(aSide, tTileEntity)) { - // Allow open connections to Air, if the GT6 style pipe/cables are enabled, so that it'll connect to the next block placed down next to it + } else if ((getGT6StyleConnection() && baseMetaTile.getAirAtSide(aSide)) + || canConnect(aSide, tTileEntity)) { + // Allow open connections to Air, if the GT6 style pipe/cables are enabled, so that it'll connect to the + // next block placed down next to it connectAtSide(aSide); return 1; } - if (!baseMetaTile.getWorld().getChunkProvider().chunkExists(baseMetaTile.getOffsetX(aSide, 1) >> 4, baseMetaTile.getOffsetZ(aSide, 1) >> 4)) { + if (!baseMetaTile + .getWorld() + .getChunkProvider() + .chunkExists(baseMetaTile.getOffsetX(aSide, 1) >> 4, baseMetaTile.getOffsetZ(aSide, 1) >> 4)) { // Target chunk unloaded return -1; } - } - return 0; - } + return 0; + } protected void checkConnections() { // Verify connections around us. If GT6 style cables are not enabled then revert to old behavior and try @@ -832,32 +974,54 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { mCheckConnections = false; } - private void connectAtSide(byte aSide) { + private void connectAtSide(byte aSide) { mConnections |= (1 << aSide); } - @Override - public void disconnect(byte aSide) { - if (aSide >= 6) return; - mConnections &= ~(1 << aSide); - byte tSide = GT_Utility.getOppositeSide(aSide); - IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSide(aSide); - IMetaTileEntity tPipe = tTileEntity == null ? null : tTileEntity.getMetaTileEntity(); - if ((this.getClass().isInstance(tPipe) || (tPipe != null && tPipe.getClass().isInstance(this))) && ((MetaPipeEntity) tPipe).isConnectedAtSide(tSide)) - ((MetaPipeEntity) tPipe).disconnect(tSide); - } + @Override + public void disconnect(byte aSide) { + if (aSide >= 6) return; + mConnections &= ~(1 << aSide); + byte tSide = GT_Utility.getOppositeSide(aSide); + IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSide(aSide); + IMetaTileEntity tPipe = tTileEntity == null ? null : tTileEntity.getMetaTileEntity(); + if ((this.getClass().isInstance(tPipe) + || (tPipe != null && tPipe.getClass().isInstance(this))) + && ((MetaPipeEntity) tPipe).isConnectedAtSide(tSide)) ((MetaPipeEntity) tPipe).disconnect(tSide); + } - @Override + @Override public boolean isConnectedAtSide(int aSide) { - return (mConnections & (1 << aSide)) != 0; - } + return (mConnections & (1 << aSide)) != 0; + } + + public boolean letsIn( + GT_CoverBehavior coverBehavior, byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return false; + } + public boolean letsOut( + GT_CoverBehavior coverBehavior, byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return false; + } - public boolean letsIn(GT_CoverBehavior coverBehavior, byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return false; } - public boolean letsOut(GT_CoverBehavior coverBehavior, byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return false; } + public boolean letsIn( + GT_CoverBehaviorBase<?> coverBehavior, + byte aSide, + int aCoverID, + ISerializableObject aCoverVariable, + ICoverable aTileEntity) { + return false; + } - public boolean letsIn(GT_CoverBehaviorBase<?> coverBehavior, byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { return false; } - public boolean letsOut(GT_CoverBehaviorBase<?> coverBehavior, byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { return false; } + public boolean letsOut( + GT_CoverBehaviorBase<?> coverBehavior, + byte aSide, + int aCoverID, + ISerializableObject aCoverVariable, + ICoverable aTileEntity) { + return false; + } public boolean canConnect(byte aSide, TileEntity tTileEntity) { return false; @@ -877,6 +1041,5 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { return false; } - public void reloadLocks() { - } + public void reloadLocks() {} } diff --git a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java index 13ea66e7d2..1e77057be9 100644 --- a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java @@ -1,5 +1,7 @@ package gregtech.api.metatileentity; +import static gregtech.api.enums.GT_Values.V; + import appeng.api.networking.energy.IEnergyGrid; import appeng.api.networking.pathing.IPathingGrid; import appeng.api.util.AECableType; @@ -23,6 +25,10 @@ import gregtech.api.util.GT_Log; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; import gregtech.common.GT_Client; +import java.io.File; +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; import net.minecraft.block.Block; @@ -44,13 +50,6 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; -import java.io.File; -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; - -import static gregtech.api.enums.GT_Values.V; - /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! * <p/> @@ -71,6 +70,7 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac * The Inventory of the MetaTileEntity. Amount of Slots can be larger than 256. HAYO! */ public final ItemStack[] mInventory; + public boolean doTickProfilingInThisTick = true; private MetaTileEntity mCallBackTile; @@ -80,7 +80,7 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac */ private IGregTechTileEntity mBaseMetaTileEntity; - public long mSoundRequests=0; + public long mSoundRequests = 0; /** * This registers your Machine at the List. @@ -145,7 +145,10 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac @Override public ItemStack getStackForm(long aAmount) { - return new ItemStack(GregTech_API.sBlockMachines, (int) aAmount, getBaseMetaTileEntity().getMetaTileID()); + return new ItemStack( + GregTech_API.sBlockMachines, + (int) aAmount, + getBaseMetaTileEntity().getMetaTileID()); } public String getLocalName() { @@ -153,23 +156,35 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac } @Override - public void onServerStart() {/*Do nothing*/} + public void onServerStart() { + /*Do nothing*/ + } @Override - public void onWorldSave(File aSaveDirectory) {/*Do nothing*/} + public void onWorldSave(File aSaveDirectory) { + /*Do nothing*/ + } @Override - public void onWorldLoad(File aSaveDirectory) {/*Do nothing*/} + public void onWorldLoad(File aSaveDirectory) { + /*Do nothing*/ + } @Override - public void onConfigLoad(GT_Config aConfig) {/*Do nothing*/} + public void onConfigLoad(GT_Config aConfig) { + /*Do nothing*/ + } @Override - public void setItemNBT(NBTTagCompound aNBT) {/*Do nothing*/} + public void setItemNBT(NBTTagCompound aNBT) { + /*Do nothing*/ + } @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister aBlockIconRegister) {/*Do nothing*/} + public void registerIcons(IIconRegister aBlockIconRegister) { + /*Do nothing*/ + } @Override public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) { @@ -177,10 +192,13 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac } @Override - public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {/*Do nothing*/} + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + /*Do nothing*/ + } @Override - public boolean onWrenchRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public boolean onWrenchRightClick( + byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (getBaseMetaTileEntity().isValidFacing(aWrenchingSide)) { getBaseMetaTileEntity().setFrontFacing(aWrenchingSide); return true; @@ -189,39 +207,54 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac } @Override - public boolean onWireCutterRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if(!aPlayer.isSneaking()) return false; + public boolean onWireCutterRightClick( + byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (!aPlayer.isSneaking()) return false; byte tSide = GT_Utility.getOppositeSide(aWrenchingSide); TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityAtSide(aWrenchingSide); - if ((tTileEntity instanceof IGregTechTileEntity) && (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() instanceof GT_MetaPipeEntity_Cable)) { + if ((tTileEntity instanceof IGregTechTileEntity) + && (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() instanceof GT_MetaPipeEntity_Cable)) { // The tile entity we're facing is a cable, let's try to connect to it - return ((IGregTechTileEntity) tTileEntity).getMetaTileEntity().onWireCutterRightClick(aWrenchingSide, tSide, aPlayer, aX, aY, aZ); + return ((IGregTechTileEntity) tTileEntity) + .getMetaTileEntity() + .onWireCutterRightClick(aWrenchingSide, tSide, aPlayer, aX, aY, aZ); } return false; } @Override - public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if(!aPlayer.isSneaking()) return false; + public boolean onSolderingToolRightClick( + byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (!aPlayer.isSneaking()) return false; byte tSide = GT_Utility.getOppositeSide(aWrenchingSide); TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityAtSide(aWrenchingSide); - if ((tTileEntity instanceof IGregTechTileEntity) && (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() instanceof GT_MetaPipeEntity_Cable)) { + if ((tTileEntity instanceof IGregTechTileEntity) + && (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() instanceof GT_MetaPipeEntity_Cable)) { // The tile entity we're facing is a cable, let's try to connect to it - return ((IGregTechTileEntity) tTileEntity).getMetaTileEntity().onSolderingToolRightClick(aWrenchingSide, tSide, aPlayer, aX, aY, aZ); + return ((IGregTechTileEntity) tTileEntity) + .getMetaTileEntity() + .onSolderingToolRightClick(aWrenchingSide, tSide, aPlayer, aX, aY, aZ); } return false; } @Override public void onExplosion() { - GT_Log.exp.println("Machine at "+this.getBaseMetaTileEntity().getXCoord()+" | "+this.getBaseMetaTileEntity().getYCoord()+" | "+this.getBaseMetaTileEntity().getZCoord()+" DIMID: "+ this.getBaseMetaTileEntity().getWorld().provider.dimensionId+ " exploded."); + GT_Log.exp.println("Machine at " + this.getBaseMetaTileEntity().getXCoord() + " | " + + this.getBaseMetaTileEntity().getYCoord() + " | " + + this.getBaseMetaTileEntity().getZCoord() + " DIMID: " + + this.getBaseMetaTileEntity().getWorld().provider.dimensionId + " exploded."); } @Override - public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) {/*Do nothing*/} + public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { + /*Do nothing*/ + } @Override - public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {/*Do nothing*/} + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + /*Do nothing*/ + } @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { @@ -235,23 +268,33 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac } @Override - public void inValidate() {/*Do nothing*/} + public void inValidate() { + /*Do nothing*/ + } @Override - public void onRemoval() {/*Do nothing*/} + public void onRemoval() { + /*Do nothing*/ + } @Override - public void initDefaultModes(NBTTagCompound aNBT) {/*Do nothing*/} + public void initDefaultModes(NBTTagCompound aNBT) { + /*Do nothing*/ + } /** * When a GUI is opened */ - public void onOpenGUI() {/*Do nothing*/} + public void onOpenGUI() { + /*Do nothing*/ + } /** * When a GUI is closed */ - public void onCloseGUI() {/*Do nothing*/} + public void onCloseGUI() { + /*Do nothing*/ + } /** * a Player rightclicks the Machine @@ -262,15 +305,20 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac } @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) { + public boolean onRightclick( + IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) { return onRightclick(aBaseMetaTileEntity, aPlayer); } @Override - public void onLeftclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {/*Do nothing*/} + public void onLeftclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + /*Do nothing*/ + } @Override - public void onValueUpdate(byte aValue) {/*Do nothing*/} + public void onValueUpdate(byte aValue) { + /*Do nothing*/ + } @Override public byte getUpdateData() { @@ -278,13 +326,19 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac } @Override - public void doSound(byte aIndex, double aX, double aY, double aZ) {/*Do nothing*/} + public void doSound(byte aIndex, double aX, double aY, double aZ) { + /*Do nothing*/ + } @Override - public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {/*Do nothing*/} + public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { + /*Do nothing*/ + } @Override - public void stopSoundLoop(byte aValue, double aX, double aY, double aZ) {/*Do nothing*/} + public void stopSoundLoop(byte aValue, double aX, double aY, double aZ) { + /*Do nothing*/ + } @Override public MetaTileEntity getCallbackBase() { @@ -460,7 +514,7 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac * This is used to set the internal Steam Energy to the given Parameter. */ public void setSteamVar(long aSteam) { - if(((BaseMetaTileEntity) mBaseMetaTileEntity).mStoredSteam != aSteam){ + if (((BaseMetaTileEntity) mBaseMetaTileEntity).mStoredSteam != aSteam) { markDirty(); ((BaseMetaTileEntity) mBaseMetaTileEntity).mStoredSteam = aSteam; } @@ -531,7 +585,8 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac } @Override - public ArrayList<String> getSpecialDebugInfo(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, int aLogLevel, ArrayList<String> aList) { + public ArrayList<String> getSpecialDebugInfo( + IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, int aLogLevel, ArrayList<String> aList) { return aList; } @@ -585,10 +640,14 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac } @Override - public void onMachineBlockUpdate() {/*Do nothing*/} + public void onMachineBlockUpdate() { + /*Do nothing*/ + } @Override - public void receiveClientEvent(byte aEventID, byte aValue) {/*Do nothing*/} + public void receiveClientEvent(byte aEventID, byte aValue) { + /*Do nothing*/ + } @Override public boolean isSimpleMachine() { @@ -641,13 +700,17 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac /** * When the Facing gets changed. */ - public void onFacingChange() {/*Do nothing*/} + public void onFacingChange() { + /*Do nothing*/ + } /** * if the IC2 Teleporter can drain from this. */ public boolean isTeleporterCompatible() { - return isEnetOutput() && getBaseMetaTileEntity().getOutputVoltage() >= 128 && getBaseMetaTileEntity().getUniversalEnergyCapacity() >= 500000; + return isEnetOutput() + && getBaseMetaTileEntity().getOutputVoltage() >= 128 + && getBaseMetaTileEntity().getUniversalEnergyCapacity() >= 500000; } /** @@ -680,7 +743,7 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac @Override public String[] getInfoData() { - return new String[]{}; + return new String[] {}; } public boolean isDigitalChest() { @@ -691,7 +754,9 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac return null; } - public void setItemCount(int aCount) {/*Do nothing*/} + public void setItemCount(int aCount) { + /*Do nothing*/ + } public int getMaxItemCount() { return 0; @@ -712,14 +777,13 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac public void setInventorySlotContents(int aIndex, ItemStack aStack) { markDirty(); if (this instanceof IConfigurationCircuitSupport) { - IConfigurationCircuitSupport ccs = (IConfigurationCircuitSupport)this; + IConfigurationCircuitSupport ccs = (IConfigurationCircuitSupport) this; if (ccs.allowSelectCircuit() && aIndex == ccs.getCircuitSlot() && aStack != null) { mInventory[aIndex] = GT_Utility.copyAmount(0, aStack); return; } } - if (aIndex >= 0 && aIndex < mInventory.length) - mInventory[aIndex] = aStack; + if (aIndex >= 0 && aIndex < mInventory.length) mInventory[aIndex] = aStack; } @Override @@ -747,8 +811,7 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac if (setStackToZeroInsteadOfNull(aIndex)) { tStack.stackSize = 0; markDirty(); - } - else setInventorySlotContents(aIndex, null); + } else setInventorySlotContents(aIndex, null); } else { rStack = tStack.splitStack(aAmount); markDirty(); @@ -763,21 +826,59 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac public int[] getAccessibleSlotsFromSide(int aSide) { TIntList tList = new TIntArrayList(); IGregTechTileEntity tTileEntity = getBaseMetaTileEntity(); - boolean tSkip = tTileEntity.getCoverBehaviorAtSideNew((byte) aSide).letsItemsIn((byte) aSide, tTileEntity.getCoverIDAtSide((byte) aSide), tTileEntity.getComplexCoverDataAtSide((byte) aSide), -2, tTileEntity) || tTileEntity.getCoverBehaviorAtSideNew((byte) aSide).letsItemsOut((byte) aSide, tTileEntity.getCoverIDAtSide((byte) aSide), tTileEntity.getComplexCoverDataAtSide((byte) aSide), -2, tTileEntity); + boolean tSkip = tTileEntity + .getCoverBehaviorAtSideNew((byte) aSide) + .letsItemsIn( + (byte) aSide, + tTileEntity.getCoverIDAtSide((byte) aSide), + tTileEntity.getComplexCoverDataAtSide((byte) aSide), + -2, + tTileEntity) + || tTileEntity + .getCoverBehaviorAtSideNew((byte) aSide) + .letsItemsOut( + (byte) aSide, + tTileEntity.getCoverIDAtSide((byte) aSide), + tTileEntity.getComplexCoverDataAtSide((byte) aSide), + -2, + tTileEntity); for (int i = 0; i < getSizeInventory(); i++) - if (isValidSlot(i) && (tSkip || tTileEntity.getCoverBehaviorAtSideNew((byte) aSide).letsItemsOut((byte) aSide, tTileEntity.getCoverIDAtSide((byte) aSide), tTileEntity.getComplexCoverDataAtSide((byte) aSide), i, tTileEntity) || tTileEntity.getCoverBehaviorAtSideNew((byte) aSide).letsItemsIn((byte) aSide, tTileEntity.getCoverIDAtSide((byte) aSide), tTileEntity.getComplexCoverDataAtSide((byte) aSide), i, tTileEntity))) - tList.add(i); + if (isValidSlot(i) + && (tSkip + || tTileEntity + .getCoverBehaviorAtSideNew((byte) aSide) + .letsItemsOut( + (byte) aSide, + tTileEntity.getCoverIDAtSide((byte) aSide), + tTileEntity.getComplexCoverDataAtSide((byte) aSide), + i, + tTileEntity) + || tTileEntity + .getCoverBehaviorAtSideNew((byte) aSide) + .letsItemsIn( + (byte) aSide, + tTileEntity.getCoverIDAtSide((byte) aSide), + tTileEntity.getComplexCoverDataAtSide((byte) aSide), + i, + tTileEntity))) tList.add(i); return tList.toArray(); } @Override public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { - return isValidSlot(aIndex) && aStack != null && aIndex < mInventory.length && (mInventory[aIndex] == null || GT_Utility.areStacksEqual(aStack, mInventory[aIndex])) && allowPutStack(getBaseMetaTileEntity(), aIndex, (byte) aSide, aStack); + return isValidSlot(aIndex) + && aStack != null + && aIndex < mInventory.length + && (mInventory[aIndex] == null || GT_Utility.areStacksEqual(aStack, mInventory[aIndex])) + && allowPutStack(getBaseMetaTileEntity(), aIndex, (byte) aSide, aStack); } @Override public boolean canExtractItem(int aIndex, ItemStack aStack, int aSide) { - return isValidSlot(aIndex) && aStack != null && aIndex < mInventory.length && allowPullStack(getBaseMetaTileEntity(), aIndex, (byte) aSide, aStack); + return isValidSlot(aIndex) + && aStack != null + && aIndex < mInventory.length + && allowPullStack(getBaseMetaTileEntity(), aIndex, (byte) aSide, aStack); } @Override @@ -792,8 +893,8 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac @Override public FluidTankInfo[] getTankInfo(ForgeDirection aSide) { - if (getCapacity() <= 0 && !getBaseMetaTileEntity().hasSteamEngineUpgrade()) return new FluidTankInfo[]{}; - return new FluidTankInfo[]{getInfo()}; + if (getCapacity() <= 0 && !getBaseMetaTileEntity().hasSteamEngineUpgrade()) return new FluidTankInfo[] {}; + return new FluidTankInfo[] {getInfo()}; } public int fill_default(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { @@ -804,7 +905,12 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac @Override public int fill(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { if (getBaseMetaTileEntity().hasSteamEngineUpgrade() && GT_ModHandler.isSteam(aFluid) && aFluid.amount > 1) { - int tSteam = (int) Math.min(Integer.MAX_VALUE, Math.min(aFluid.amount / 2, getBaseMetaTileEntity().getSteamCapacity() - getBaseMetaTileEntity().getStoredSteam())); + int tSteam = (int) Math.min( + Integer.MAX_VALUE, + Math.min( + aFluid.amount / 2, + getBaseMetaTileEntity().getSteamCapacity() + - getBaseMetaTileEntity().getStoredSteam())); if (tSteam > 0) { markDirty(); if (doFill) getBaseMetaTileEntity().increaseStoredSteam(tSteam, true); @@ -909,7 +1015,7 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac public void onColorChangeServer(byte aColor) { final IGregTechTileEntity meta = getBaseMetaTileEntity(); final int aX = meta.getXCoord(), aY = meta.getYCoord(), aZ = meta.getZCoord(); - for (byte aSide = 0; aSide < 6 ; aSide++ ) { + for (byte aSide = 0; aSide < 6; aSide++) { // Flag surrounding pipes/cables to revaluate their connection with us if we got painted final TileEntity tTileEntity = meta.getTileEntityAtSide(aSide); if ((tTileEntity instanceof BaseMetaPipeEntity)) { @@ -937,27 +1043,63 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac @Override public void doExplosion(long aExplosionPower) { - float tStrength = - aExplosionPower < V[0] ? 1.0F : - aExplosionPower < V[1] ? 2.0F : - aExplosionPower < V[2] ? 3.0F : - aExplosionPower < V[3] ? 4.0F : - aExplosionPower < V[4] ? 5.0F : - aExplosionPower < V[4] * 2 ? 6.0F : - aExplosionPower < V[5] ? 7.0F : - aExplosionPower < V[6] ? 8.0F : - aExplosionPower < V[7] ? 9.0F : - aExplosionPower < V[8] ? 10.0F : - aExplosionPower < V[8] * 2 ? 11.0F : - aExplosionPower < V[9] ? 12.0F : - aExplosionPower < V[10] ? 13.0F : - aExplosionPower < V[11] ? 14.0F : - aExplosionPower < V[12] ? 15.0F : - aExplosionPower < V[12] * 2 ? 16.0F : - aExplosionPower < V[13] ? 17.0F : - aExplosionPower < V[14] ? 18.0F : - aExplosionPower < V[15] ? 19.0F : 20.0F; - int tX = getBaseMetaTileEntity().getXCoord(), tY = getBaseMetaTileEntity().getYCoord(), tZ = getBaseMetaTileEntity().getZCoord(); + float tStrength = aExplosionPower < V[0] + ? 1.0F + : aExplosionPower < V[1] + ? 2.0F + : aExplosionPower < V[2] + ? 3.0F + : aExplosionPower < V[3] + ? 4.0F + : aExplosionPower < V[4] + ? 5.0F + : aExplosionPower < V[4] * 2 + ? 6.0F + : aExplosionPower < V[5] + ? 7.0F + : aExplosionPower < V[6] + ? 8.0F + : aExplosionPower < V[7] + ? 9.0F + : aExplosionPower < V[8] + ? 10.0F + : aExplosionPower < V[8] * 2 + ? 11.0F + : aExplosionPower < V[9] + ? 12.0F + : aExplosionPower + < V[ + 10] + ? 13.0F + : aExplosionPower + < V[ + 11] + ? 14.0F + : aExplosionPower + < V[ + 12] + ? 15.0F + : aExplosionPower + < V[ + 12] + * 2 + ? 16.0F + : aExplosionPower + < V[ + 13] + ? 17.0F + : aExplosionPower + < V[ + 14] + ? 18.0F + : aExplosionPower + < V[ + 15] + ? 19.0F + : 20.0F; + int tX = getBaseMetaTileEntity().getXCoord(), + tY = getBaseMetaTileEntity().getYCoord(), + tZ = getBaseMetaTileEntity().getZCoord(); World tWorld = getBaseMetaTileEntity().getWorld(); GT_Utility.sendSoundToPlayers(tWorld, SoundResource.IC2_MACHINES_MACHINE_OVERLOAD, 1.0F, -1, tX, tY, tZ); tWorld.setBlock(tX, tY, tZ, Blocks.air); @@ -971,7 +1113,14 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac } @Override - public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List<AxisAlignedBB> outputAABB, Entity collider) { + public void addCollisionBoxesToList( + World aWorld, + int aX, + int aY, + int aZ, + AxisAlignedBB inputAABB, + List<AxisAlignedBB> outputAABB, + Entity collider) { AxisAlignedBB axisalignedbb1 = getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); if (axisalignedbb1 != null && inputAABB.intersectsWith(axisalignedbb1)) outputAABB.add(axisalignedbb1); } @@ -992,29 +1141,33 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac } @Override - public boolean allowGeneralRedstoneOutput(){ - return false; + public boolean allowGeneralRedstoneOutput() { + return false; } @Deprecated - public String trans(String aKey, String aEnglish){ - return GT_Utility.trans(aKey, aEnglish); + public String trans(String aKey, String aEnglish) { + return GT_Utility.trans(aKey, aEnglish); } @Override - public boolean hasAlternativeModeText(){ - return false; + public boolean hasAlternativeModeText() { + return false; } @Override - public String getAlternativeModeText(){ - return ""; + public String getAlternativeModeText() { + return ""; } @Override - public boolean shouldJoinIc2Enet() { return false; } + public boolean shouldJoinIc2Enet() { + return false; + } - public boolean shouldTriggerBlockUpdate() { return false; } + public boolean shouldTriggerBlockUpdate() { + return false; + } @Optional.Method(modid = "appliedenergistics2") public AECableType getCableConnectionType(ForgeDirection forgeDirection) { @@ -1030,33 +1183,32 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac public void gridChanged() {} @Override - public void getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { - currenttip.add(String.format("Facing: %s", ForgeDirection.getOrientation(mBaseMetaTileEntity.getFrontFacing()).name())); + public void getWailaBody( + ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { + currenttip.add(String.format( + "Facing: %s", + ForgeDirection.getOrientation(mBaseMetaTileEntity.getFrontFacing()) + .name())); } @Override - public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, int z) { + public void getWailaNBTData( + EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, int z) { /* Empty */ } @Optional.Method(modid = "appliedenergistics2") protected String getAEDiagnostics() { try { - if (getProxy() == null) - return "(proxy)"; - if (getProxy().getNode() == null) - return "(node)"; - if (getProxy().getNode().getGrid() == null) - return "(grid)"; - if (!getProxy().getNode().meetsChannelRequirements()) - return "(channels)"; + if (getProxy() == null) return "(proxy)"; + if (getProxy().getNode() == null) return "(node)"; + if (getProxy().getNode().getGrid() == null) return "(grid)"; + if (!getProxy().getNode().meetsChannelRequirements()) return "(channels)"; IPathingGrid pg = getProxy().getNode().getGrid().getCache(IPathingGrid.class); - if (!pg.isNetworkBooting()) - return "(booting)"; + if (!pg.isNetworkBooting()) return "(booting)"; IEnergyGrid eg = getProxy().getNode().getGrid().getCache(IEnergyGrid.class); - if (!eg.isNetworkPowered()) - return "(power)"; - } catch(Throwable ex) { + if (!eg.isNetworkPowered()) return "(power)"; + } catch (Throwable ex) { ex.printStackTrace(); } return ""; diff --git a/src/main/java/gregtech/api/metatileentity/TileIC2EnergySink.java b/src/main/java/gregtech/api/metatileentity/TileIC2EnergySink.java index 16af004957..661dad730f 100644 --- a/src/main/java/gregtech/api/metatileentity/TileIC2EnergySink.java +++ b/src/main/java/gregtech/api/metatileentity/TileIC2EnergySink.java @@ -44,19 +44,18 @@ public class TileIC2EnergySink extends TileEntity implements IEnergySink { */ @Override public double getDemandedEnergy() { - if(cableMeta != null) { - // We don't want everything to join the enet (treating the cable as a conductor) so we join it as a ink. We don't want to traverse all cables - // connected to this (like we would during distribution) to see if it actually needs any EU... so we just always say we want it all. If there - // are more than two things attached, and one of them is a GT cable that doesn't have anywhere to send it's energy, the distribution will be a bit + if (cableMeta != null) { + // We don't want everything to join the enet (treating the cable as a conductor) so we join it as a ink. We + // don't want to traverse all cables + // connected to this (like we would during distribution) to see if it actually needs any EU... so we just + // always say we want it all. If there + // are more than two things attached, and one of them is a GT cable that doesn't have anywhere to send it's + // energy, the distribution will be a bit // weird. In that case only use one cable, or use a transformer. return (cableMeta.mVoltage * cableMeta.mAmperage); - } - else - return myMeta.getEUCapacity() - myMeta.getStoredEU(); + } else return myMeta.getEUCapacity() - myMeta.getStoredEU(); } - - /** * Determine the tier of this energy sink. * 1 = LV, 2 = MV, 3 = HV, 4 = EV etc. @@ -82,20 +81,26 @@ public class TileIC2EnergySink extends TileEntity implements IEnergySink { @Override public double injectEnergy(ForgeDirection directionFrom, double amount, double voltage) { - final long amps =(long)Math.max(amount / (cableMeta != null ? cableMeta.mVoltage : myMeta.getInputVoltage() * 1.0), 1.0); - final long euPerAmp = (long)(amount / (amps * 1.0)); + final long amps = (long) + Math.max(amount / (cableMeta != null ? cableMeta.mVoltage : myMeta.getInputVoltage() * 1.0), 1.0); + final long euPerAmp = (long) (amount / (amps * 1.0)); final IMetaTileEntity metaTile = myMeta.getMetaTileEntity(); if (metaTile == null) return amount; final long usedAmps; - if(cableMeta != null) { - usedAmps = ((IMetaTileEntityCable) metaTile).transferElectricity((byte) directionFrom.ordinal(), Math.min(euPerAmp, cableMeta.mVoltage), amps, Sets.newHashSet((TileEntity) myMeta)); - - } - else - usedAmps = myMeta.injectEnergyUnits((byte) directionFrom.ordinal(), Math.min(euPerAmp, myMeta.getInputVoltage()), amps); - return amount - ( usedAmps * euPerAmp); + if (cableMeta != null) { + usedAmps = ((IMetaTileEntityCable) metaTile) + .transferElectricity( + (byte) directionFrom.ordinal(), + Math.min(euPerAmp, cableMeta.mVoltage), + amps, + Sets.newHashSet((TileEntity) myMeta)); + + } else + usedAmps = myMeta.injectEnergyUnits( + (byte) directionFrom.ordinal(), Math.min(euPerAmp, myMeta.getInputVoltage()), amps); + return amount - (usedAmps * euPerAmp); // transferElectricity for cables } @@ -112,11 +117,9 @@ public class TileIC2EnergySink extends TileEntity implements IEnergySink { @Override public boolean acceptsEnergyFrom(TileEntity emitter, ForgeDirection direction) { final IMetaTileEntity metaTile = myMeta.getMetaTileEntity(); - if(metaTile instanceof IMetaTileEntityCable && (direction == ForgeDirection.UNKNOWN || ((IConnectable)metaTile).isConnectedAtSide(direction.ordinal()))) - return true; - else - return myMeta.inputEnergyFrom((byte) direction.ordinal(), false); - + if (metaTile instanceof IMetaTileEntityCable + && (direction == ForgeDirection.UNKNOWN + || ((IConnectable) metaTile).isConnectedAtSide(direction.ordinal()))) return true; + else return myMeta.inputEnergyFrom((byte) direction.ordinal(), false); } - } diff --git a/src/main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java b/src/main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java index 431ed3cc30..be1904aaf5 100644 --- a/src/main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java +++ b/src/main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java @@ -1,5 +1,7 @@ package gregtech.api.metatileentity.examples; +import static gregtech.api.enums.Textures.BlockIcons.*; + import gregtech.api.enums.SoundResource; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -10,45 +12,84 @@ import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; import net.minecraft.item.ItemStack; -import static gregtech.api.enums.Textures.BlockIcons.*; - /** * This Example Implementation still works, however I use something completely different in my own Code. */ public class GT_MetaTileEntity_E_Furnace extends GT_MetaTileEntity_BasicMachine { public GT_MetaTileEntity_E_Furnace(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, "Not like using a Commodore 64", 1, 1, "E_Furnace.png", "smelting", + super( + aID, + aName, + aNameRegional, + aTier, + 1, + "Not like using a Commodore 64", + 1, + 1, + "E_Furnace.png", + "smelting", TextureFactory.of( TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE), - TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_FURNACE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_STEAM_FURNACE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_FURNACE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_STEAM_FURNACE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_FURNACE_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_STEAM_FURNACE_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE), - TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_FURNACE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_STEAM_FURNACE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_GLOW).glow().build())); + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_GLOW) + .glow() + .build())); } - public GT_MetaTileEntity_E_Furnace(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + public GT_MetaTileEntity_E_Furnace( + String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } - public GT_MetaTileEntity_E_Furnace(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + public GT_MetaTileEntity_E_Furnace( + String aName, + int aTier, + String[] aDescription, + ITexture[][][] aTextures, + String aGUIName, + String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } @@ -69,14 +110,17 @@ public class GT_MetaTileEntity_E_Furnace extends GT_MetaTileEntity_BasicMachine } @Override - protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) && GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(64, aStack), false, null) != null; + protected boolean allowPutStackValidated( + IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) + && GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(64, aStack), false, null) != null; } @Override public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { super.startSoundLoop(aIndex, aX, aY, aZ); - if (aIndex == 1) GT_Utility.doSoundAtClient(SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, 10, 1.0F, aX, aY, aZ); + if (aIndex == 1) + GT_Utility.doSoundAtClient(SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, 10, 1.0F, aX, aY, aZ); } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java index e92f61f1b9..fd3fe175c9 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java @@ -1,5 +1,7 @@ package gregtech.api.metatileentity.implementations; +import static gregtech.api.enums.GT_Values.VN; + import cofh.api.energy.IEnergyReceiver; import cpw.mods.fml.common.Loader; import gregtech.GT_Mod; @@ -34,6 +36,9 @@ import ic2.api.energy.tile.IEnergySink; import ic2.api.energy.tile.IEnergySource; import ic2.api.energy.tile.IEnergyTile; import ic2.api.reactor.IReactorChamber; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -45,27 +50,37 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; - -import static gregtech.api.enums.GT_Values.VN; - public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTileEntityCable { public final float mThickNess; public final Materials mMaterial; public final long mCableLossPerMeter, mAmperage, mVoltage; public final boolean mInsulated, mCanShock; - public int mTransferredAmperage = 0, mTransferredAmperageLast20 = 0,mTransferredAmperageLast20OK=0,mTransferredAmperageOK=0; - public long mTransferredVoltageLast20 = 0, mTransferredVoltage = 0,mTransferredVoltageLast20OK=0,mTransferredVoltageOK=0; + public int mTransferredAmperage = 0, + mTransferredAmperageLast20 = 0, + mTransferredAmperageLast20OK = 0, + mTransferredAmperageOK = 0; + public long mTransferredVoltageLast20 = 0, + mTransferredVoltage = 0, + mTransferredVoltageLast20OK = 0, + mTransferredVoltageOK = 0; public long mRestRF; public int mOverheat; - public static short mMaxOverheat=(short) (GT_Mod.gregtechproxy.mWireHeatingTicks * 100); + public static short mMaxOverheat = (short) (GT_Mod.gregtechproxy.mWireHeatingTicks * 100); private int[] lastAmperage; private long lastWorldTick; - public GT_MetaPipeEntity_Cable(int aID, String aName, String aNameRegional, float aThickNess, Materials aMaterial, long aCableLossPerMeter, long aAmperage, long aVoltage, boolean aInsulated, boolean aCanShock) { + public GT_MetaPipeEntity_Cable( + int aID, + String aName, + String aNameRegional, + float aThickNess, + Materials aMaterial, + long aCableLossPerMeter, + long aAmperage, + long aVoltage, + boolean aInsulated, + boolean aCanShock) { super(aID, aName, aNameRegional, 0); mThickNess = aThickNess; mMaterial = aMaterial; @@ -76,7 +91,15 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile mCableLossPerMeter = aCableLossPerMeter; } - public GT_MetaPipeEntity_Cable(String aName, float aThickNess, Materials aMaterial, long aCableLossPerMeter, long aAmperage, long aVoltage, boolean aInsulated, boolean aCanShock) { + public GT_MetaPipeEntity_Cable( + String aName, + float aThickNess, + Materials aMaterial, + long aCableLossPerMeter, + long aAmperage, + long aVoltage, + boolean aInsulated, + boolean aCanShock) { super(aName, 0); mThickNess = aThickNess; mMaterial = aMaterial; @@ -94,36 +117,88 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaPipeEntity_Cable(mName, mThickNess, mMaterial, mCableLossPerMeter, mAmperage, mVoltage, mInsulated, mCanShock); + return new GT_MetaPipeEntity_Cable( + mName, mThickNess, mMaterial, mCableLossPerMeter, mAmperage, mVoltage, mInsulated, mCanShock); } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aConnections, + byte aColorIndex, + boolean aConnected, + boolean aRedstone) { if (!mInsulated) - return new ITexture[]{TextureFactory.of(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], Dyes.getModulation(aColorIndex, mMaterial.mRGBa) )}; + return new ITexture[] { + TextureFactory.of( + mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], + Dyes.getModulation(aColorIndex, mMaterial.mRGBa)) + }; if (aConnected) { float tThickNess = getThickNess(); if (tThickNess < 0.124F) - return new ITexture[]{TextureFactory.of(Textures.BlockIcons.INSULATION_FULL, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; - if (tThickNess < 0.374F)//0.375 x1 - return new ITexture[]{TextureFactory.of(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), TextureFactory.of(Textures.BlockIcons.INSULATION_TINY, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; - if (tThickNess < 0.499F)//0.500 x2 - return new ITexture[]{TextureFactory.of(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), TextureFactory.of(Textures.BlockIcons.INSULATION_SMALL, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; - if (tThickNess < 0.624F)//0.625 x4 - return new ITexture[]{TextureFactory.of(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), TextureFactory.of(Textures.BlockIcons.INSULATION_MEDIUM, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; - if (tThickNess < 0.749F)//0.750 x8 - return new ITexture[]{TextureFactory.of(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), TextureFactory.of(Textures.BlockIcons.INSULATION_MEDIUM_PLUS, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; - if (tThickNess < 0.874F)//0.825 x12 - return new ITexture[]{TextureFactory.of(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), TextureFactory.of(Textures.BlockIcons.INSULATION_LARGE, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; - return new ITexture[]{TextureFactory.of(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), TextureFactory.of(Textures.BlockIcons.INSULATION_HUGE, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; + return new ITexture[] { + TextureFactory.of( + Textures.BlockIcons.INSULATION_FULL, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) + }; + if (tThickNess < 0.374F) // 0.375 x1 + return new ITexture[] { + TextureFactory.of(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), + TextureFactory.of( + Textures.BlockIcons.INSULATION_TINY, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) + }; + if (tThickNess < 0.499F) // 0.500 x2 + return new ITexture[] { + TextureFactory.of(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), + TextureFactory.of( + Textures.BlockIcons.INSULATION_SMALL, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) + }; + if (tThickNess < 0.624F) // 0.625 x4 + return new ITexture[] { + TextureFactory.of(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), + TextureFactory.of( + Textures.BlockIcons.INSULATION_MEDIUM, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) + }; + if (tThickNess < 0.749F) // 0.750 x8 + return new ITexture[] { + TextureFactory.of(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), + TextureFactory.of( + Textures.BlockIcons.INSULATION_MEDIUM_PLUS, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) + }; + if (tThickNess < 0.874F) // 0.825 x12 + return new ITexture[] { + TextureFactory.of(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), + TextureFactory.of( + Textures.BlockIcons.INSULATION_LARGE, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) + }; + return new ITexture[] { + TextureFactory.of(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), + TextureFactory.of( + Textures.BlockIcons.INSULATION_HUGE, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) + }; } - return new ITexture[]{TextureFactory.of(Textures.BlockIcons.INSULATION_FULL, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; + return new ITexture[] { + TextureFactory.of( + Textures.BlockIcons.INSULATION_FULL, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) + }; } @Override public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity aEntity) { - if (mCanShock && (((BaseMetaPipeEntity) getBaseMetaTileEntity()).mConnections & -128) == 0 && aEntity instanceof EntityLivingBase && !isCoverOnSide((BaseMetaPipeEntity) getBaseMetaTileEntity(), (EntityLivingBase) aEntity)) - GT_Utility.applyElectricityDamage((EntityLivingBase) aEntity, mTransferredVoltageLast20, mTransferredAmperageLast20); + if (mCanShock + && (((BaseMetaPipeEntity) getBaseMetaTileEntity()).mConnections & -128) == 0 + && aEntity instanceof EntityLivingBase + && !isCoverOnSide((BaseMetaPipeEntity) getBaseMetaTileEntity(), (EntityLivingBase) aEntity)) + GT_Utility.applyElectricityDamage( + (EntityLivingBase) aEntity, mTransferredVoltageLast20, mTransferredAmperageLast20); } @Override @@ -158,34 +233,37 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile @Override public long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage) { - if (!isConnectedAtSide(aSide) && aSide != 6) - return 0; - if (!getBaseMetaTileEntity().getCoverBehaviorAtSideNew(aSide).letsEnergyIn(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getComplexCoverDataAtSide(aSide), getBaseMetaTileEntity())) - return 0; + if (!isConnectedAtSide(aSide) && aSide != 6) return 0; + if (!getBaseMetaTileEntity() + .getCoverBehaviorAtSideNew(aSide) + .letsEnergyIn( + aSide, + getBaseMetaTileEntity().getCoverIDAtSide(aSide), + getBaseMetaTileEntity().getComplexCoverDataAtSide(aSide), + getBaseMetaTileEntity())) return 0; HashSet<TileEntity> nul = null; - return transferElectricity(aSide, aVoltage, aAmperage,nul); + return transferElectricity(aSide, aVoltage, aAmperage, nul); } @Override @Deprecated - public long transferElectricity(byte aSide, long aVoltage, long aAmperage, ArrayList<TileEntity> aAlreadyPassedTileEntityList) { + public long transferElectricity( + byte aSide, long aVoltage, long aAmperage, ArrayList<TileEntity> aAlreadyPassedTileEntityList) { return transferElectricity(aSide, aVoltage, aAmperage, new HashSet<>(aAlreadyPassedTileEntityList)); } @Override public long transferElectricity(byte aSide, long aVoltage, long aAmperage, HashSet<TileEntity> aAlreadyPassedSet) { if (!getBaseMetaTileEntity().isServerSide() || !isConnectedAtSide(aSide) && aSide != 6) return 0; - BaseMetaPipeEntity tBase =(BaseMetaPipeEntity) getBaseMetaTileEntity(); - if (!(tBase.getNode() instanceof PowerNode)) - return 0; - PowerNode tNode =(PowerNode) tBase.getNode(); + BaseMetaPipeEntity tBase = (BaseMetaPipeEntity) getBaseMetaTileEntity(); + if (!(tBase.getNode() instanceof PowerNode)) return 0; + PowerNode tNode = (PowerNode) tBase.getNode(); if (tNode != null) { int tPlace = 0; Node[] tToPower = new Node[tNode.mConsumers.size()]; if (tNode.mHadVoltage) { for (ConsumerNode consumer : tNode.mConsumers) { - if (consumer.needsEnergy()) - tToPower[tPlace++] = consumer; + if (consumer.needsEnergy()) tToPower[tPlace++] = consumer; } } else { tNode.mHadVoltage = true; @@ -193,35 +271,39 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile tToPower[tPlace++] = consumer; } } - return PowerNodes.powerNode(tNode,null,new NodeList(tToPower),(int)aVoltage,(int)aAmperage); + return PowerNodes.powerNode(tNode, null, new NodeList(tToPower), (int) aVoltage, (int) aAmperage); } return 0; } @Override public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { - if(aBaseMetaTileEntity.isServerSide()) { + if (aBaseMetaTileEntity.isServerSide()) { lastAmperage = new int[16]; - lastWorldTick = aBaseMetaTileEntity.getWorld().getTotalWorldTime() - 1;//sets initial value -1 since it is in the same tick as first on post tick + lastWorldTick = aBaseMetaTileEntity.getWorld().getTotalWorldTime() + - 1; // sets initial value -1 since it is in the same tick as first on post tick } } - @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPostTick(aBaseMetaTileEntity, aTick); - if (aTick%20 == 0 && aBaseMetaTileEntity.isServerSide() && (!GT_Mod.gregtechproxy.gt6Cable || mCheckConnections)) { + if (aTick % 20 == 0 + && aBaseMetaTileEntity.isServerSide() + && (!GT_Mod.gregtechproxy.gt6Cable || mCheckConnections)) { checkConnections(); } } @Override - public boolean onWireCutterRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (GT_Mod.gregtechproxy.gt6Cable && GT_ModHandler.damageOrDechargeItem(aPlayer.inventory.getCurrentItem(), 1, 500, aPlayer)) { - if(isConnectedAtSide(aWrenchingSide)) { + public boolean onWireCutterRightClick( + byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (GT_Mod.gregtechproxy.gt6Cable + && GT_ModHandler.damageOrDechargeItem(aPlayer.inventory.getCurrentItem(), 1, 500, aPlayer)) { + if (isConnectedAtSide(aWrenchingSide)) { disconnect(aWrenchingSide); GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("215", "Disconnected")); - }else if(!GT_Mod.gregtechproxy.costlyCableConnection){ + } else if (!GT_Mod.gregtechproxy.costlyCableConnection) { if (connect(aWrenchingSide) > 0) GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("214", "Connected")); } @@ -231,8 +313,10 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile } @Override - public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (GT_Mod.gregtechproxy.gt6Cable && GT_ModHandler.damageOrDechargeItem(aPlayer.inventory.getCurrentItem(), 1, 500, aPlayer)) { + public boolean onSolderingToolRightClick( + byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (GT_Mod.gregtechproxy.gt6Cable + && GT_ModHandler.damageOrDechargeItem(aPlayer.inventory.getCurrentItem(), 1, 500, aPlayer)) { if (isConnectedAtSide(aWrenchingSide)) { disconnect(aWrenchingSide); GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("215", "Disconnected")); @@ -246,26 +330,37 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile } @Override - public boolean letsIn(GT_CoverBehavior coverBehavior, byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + public boolean letsIn( + GT_CoverBehavior coverBehavior, byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return coverBehavior.letsEnergyIn(aSide, aCoverID, aCoverVariable, aTileEntity); } @Override - public boolean letsOut(GT_CoverBehavior coverBehavior, byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + public boolean letsOut( + GT_CoverBehavior coverBehavior, byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return coverBehavior.letsEnergyOut(aSide, aCoverID, aCoverVariable, aTileEntity); } @Override - public boolean letsIn(GT_CoverBehaviorBase<?> coverBehavior, byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public boolean letsIn( + GT_CoverBehaviorBase<?> coverBehavior, + byte aSide, + int aCoverID, + ISerializableObject aCoverVariable, + ICoverable aTileEntity) { return coverBehavior.letsEnergyIn(aSide, aCoverID, aCoverVariable, aTileEntity); } @Override - public boolean letsOut(GT_CoverBehaviorBase<?> coverBehavior, byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public boolean letsOut( + GT_CoverBehaviorBase<?> coverBehavior, + byte aSide, + int aCoverID, + ISerializableObject aCoverVariable, + ICoverable aTileEntity) { return coverBehavior.letsEnergyOut(aSide, aCoverID, aCoverVariable, aTileEntity); } - @Override public boolean canConnect(byte aSide, TileEntity tTileEntity) { final IGregTechTileEntity baseMetaTile = getBaseMetaTileEntity(); @@ -274,20 +369,21 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile final ForgeDirection tDir = ForgeDirection.getOrientation(tSide); // GT Machine handling - if ((tTileEntity instanceof IEnergyConnected) && - (((IEnergyConnected) tTileEntity).inputEnergyFrom(tSide, false) || ((IEnergyConnected) tTileEntity).outputsEnergyTo(tSide, false))) - return true; + if ((tTileEntity instanceof IEnergyConnected) + && (((IEnergyConnected) tTileEntity).inputEnergyFrom(tSide, false) + || ((IEnergyConnected) tTileEntity).outputsEnergyTo(tSide, false))) return true; // Solar Panel Compat if (coverBehavior instanceof GT_Cover_SolarPanel) return true; - // ((tIsGregTechTileEntity && tIsTileEntityCable) && (tAlwaysLookConnected || tLetEnergyIn || tLetEnergyOut) ) --> Not needed - if (Loader.isModLoaded("GalacticraftCore") && GT_GC_Compat.canConnect(tTileEntity,tDir)) - return true; + // ((tIsGregTechTileEntity && tIsTileEntityCable) && (tAlwaysLookConnected || tLetEnergyIn || tLetEnergyOut) ) + // --> Not needed + if (Loader.isModLoaded("GalacticraftCore") && GT_GC_Compat.canConnect(tTileEntity, tDir)) return true; // AE2-p2p Compat if (GT_Mod.gregtechproxy.mAE2Integration) { - if (tTileEntity instanceof appeng.tile.powersink.IC2 && ((appeng.tile.powersink.IC2)tTileEntity).acceptsEnergyFrom((TileEntity)baseMetaTile, tDir)) + if (tTileEntity instanceof appeng.tile.powersink.IC2 + && ((appeng.tile.powersink.IC2) tTileEntity).acceptsEnergyFrom((TileEntity) baseMetaTile, tDir)) return true; } @@ -298,12 +394,14 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile if (tTileEntity instanceof IReactorChamber) ic2Energy = (TileEntity) ((IReactorChamber) tTileEntity).getReactor(); else - ic2Energy = (tTileEntity == null || tTileEntity instanceof IEnergyTile || EnergyNet.instance == null) ? tTileEntity : - EnergyNet.instance.getTileEntity(tTileEntity.getWorldObj(), tTileEntity.xCoord, tTileEntity.yCoord, tTileEntity.zCoord); + ic2Energy = (tTileEntity == null || tTileEntity instanceof IEnergyTile || EnergyNet.instance == null) + ? tTileEntity + : EnergyNet.instance.getTileEntity( + tTileEntity.getWorldObj(), tTileEntity.xCoord, tTileEntity.yCoord, tTileEntity.zCoord); // IC2 Sink Compat - if ((ic2Energy instanceof IEnergySink) && ((IEnergySink) ic2Energy).acceptsEnergyFrom((TileEntity) baseMetaTile, tDir)) - return true; + if ((ic2Energy instanceof IEnergySink) + && ((IEnergySink) ic2Energy).acceptsEnergyFrom((TileEntity) baseMetaTile, tDir)) return true; // IC2 Source Compat if (GT_Mod.gregtechproxy.ic2EnergySourceCompat && (ic2Energy instanceof IEnergySource)) { @@ -313,11 +411,14 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile } } // RF Output Compat - if (GregTech_API.mOutputRF && tTileEntity instanceof IEnergyReceiver && ((IEnergyReceiver) tTileEntity).canConnectEnergy(tDir)) - return true; + if (GregTech_API.mOutputRF + && tTileEntity instanceof IEnergyReceiver + && ((IEnergyReceiver) tTileEntity).canConnectEnergy(tDir)) return true; // RF Input Compat - return GregTech_API.mInputRF && (tTileEntity instanceof IEnergyEmitter && ((IEnergyEmitter) tTileEntity).emitsEnergyTo((TileEntity) baseMetaTile, tDir)); + return GregTech_API.mInputRF + && (tTileEntity instanceof IEnergyEmitter + && ((IEnergyEmitter) tTileEntity).emitsEnergyTo((TileEntity) baseMetaTile, tDir)); } @Override @@ -326,7 +427,6 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile return GT_Mod.gregtechproxy.gt6Cable; } - @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return false; @@ -339,29 +439,32 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile @Override public String[] getDescription() { - return new String[]{ - "Max Voltage: %%%" + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mVoltage) + " (" + GT_Values.TIER_COLORS[GT_Utility.getTier(mVoltage)] + VN[GT_Utility.getTier(mVoltage)] + EnumChatFormatting.GREEN + ")" + EnumChatFormatting.GRAY, - "Max Amperage: %%%" + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(mAmperage) + EnumChatFormatting.GRAY, - "Loss/Meter/Ampere: %%%" + EnumChatFormatting.RED + GT_Utility.formatNumbers(mCableLossPerMeter) + EnumChatFormatting.GRAY + "%%% EU-Volt" + return new String[] { + "Max Voltage: %%%" + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mVoltage) + " (" + + GT_Values.TIER_COLORS[GT_Utility.getTier(mVoltage)] + VN[GT_Utility.getTier(mVoltage)] + + EnumChatFormatting.GREEN + ")" + EnumChatFormatting.GRAY, + "Max Amperage: %%%" + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(mAmperage) + + EnumChatFormatting.GRAY, + "Loss/Meter/Ampere: %%%" + EnumChatFormatting.RED + GT_Utility.formatNumbers(mCableLossPerMeter) + + EnumChatFormatting.GRAY + "%%% EU-Volt" }; } @Override public float getThickNess() { - if(GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x1) != 0) return 0.0625F; + if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x1) != 0) return 0.0625F; return mThickNess; } @Override public void saveNBTData(NBTTagCompound aNBT) { - if (GT_Mod.gregtechproxy.gt6Cable) - aNBT.setByte("mConnections", mConnections); + if (GT_Mod.gregtechproxy.gt6Cable) aNBT.setByte("mConnections", mConnections); } @Override public void loadNBTData(NBTTagCompound aNBT) { if (GT_Mod.gregtechproxy.gt6Cable) { - mConnections = aNBT.getByte("mConnections"); + mConnections = aNBT.getByte("mConnections"); } } @@ -373,73 +476,98 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile @Override public String[] getInfoData() { BaseMetaPipeEntity base = (BaseMetaPipeEntity) getBaseMetaTileEntity(); - PowerNodePath path =(PowerNodePath) base.getNodePath(); + PowerNodePath path = (PowerNodePath) base.getNodePath(); long amps = 0; long volts = 0; if (path != null) { amps = path.getAmps(); volts = path.getVoltage(this); } - return new String[]{ - //EnumChatFormatting.BLUE + mName + EnumChatFormatting.RESET, - "Heat: " + - EnumChatFormatting.RED + GT_Utility.formatNumbers(mOverheat) + EnumChatFormatting.RESET + " / " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(mMaxOverheat) + EnumChatFormatting.RESET, - "Max Load (1t):", - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(amps) + EnumChatFormatting.RESET + " A / " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(mAmperage) + EnumChatFormatting.RESET + " A", - "Max EU/p (1t):", - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(volts) + EnumChatFormatting.RESET + " EU / " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(mVoltage) + EnumChatFormatting.RESET + " EU", - "Max Load (20t): " + - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mTransferredAmperageLast20OK) + EnumChatFormatting.RESET + " A", - "Max EU/p (20t): " + - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mTransferredVoltageLast20OK) + EnumChatFormatting.RESET + " EU" + return new String[] { + // EnumChatFormatting.BLUE + mName + EnumChatFormatting.RESET, + "Heat: " + EnumChatFormatting.RED + + GT_Utility.formatNumbers(mOverheat) + EnumChatFormatting.RESET + " / " + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(mMaxOverheat) + EnumChatFormatting.RESET, + "Max Load (1t):", + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(amps) + EnumChatFormatting.RESET + " A / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(mAmperage) + EnumChatFormatting.RESET + " A", + "Max EU/p (1t):", + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(volts) + EnumChatFormatting.RESET + " EU / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(mVoltage) + EnumChatFormatting.RESET + " EU", + "Max Load (20t): " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mTransferredAmperageLast20OK) + + EnumChatFormatting.RESET + " A", + "Max EU/p (20t): " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mTransferredVoltageLast20OK) + + EnumChatFormatting.RESET + " EU" }; } @Override public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { - if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x2) != 0) - return AxisAlignedBB.getBoundingBox(aX, aY, aZ, aX + 1, aY + 1, aZ + 1); - else - return getActualCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); + if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x2) != 0) + return AxisAlignedBB.getBoundingBox(aX, aY, aZ, aX + 1, aY + 1, aZ + 1); + else return getActualCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); } private AxisAlignedBB getActualCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { - float tSpace = (1f - mThickNess)/2; - float tSide0 = tSpace; - float tSide1 = 1f - tSpace; - float tSide2 = tSpace; - float tSide3 = 1f - tSpace; - float tSide4 = tSpace; - float tSide5 = 1f - tSpace; - - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 0) != 0){tSide0=tSide2=tSide4=0;tSide3=tSide5=1;} - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 1) != 0){tSide2=tSide4=0;tSide1=tSide3=tSide5=1;} - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 2) != 0){tSide0=tSide2=tSide4=0;tSide1=tSide5=1;} - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 3) != 0){tSide0=tSide4=0;tSide1=tSide3=tSide5=1;} - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 4) != 0){tSide0=tSide2=tSide4=0;tSide1=tSide3=1;} - if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 5) != 0){tSide0=tSide2=0;tSide1=tSide3=tSide5=1;} - - byte tConn = ((BaseMetaPipeEntity) getBaseMetaTileEntity()).mConnections; - if((tConn & (1 << ForgeDirection.DOWN.ordinal()) ) != 0) tSide0 = 0f; - if((tConn & (1 << ForgeDirection.UP.ordinal()) ) != 0) tSide1 = 1f; - if((tConn & (1 << ForgeDirection.NORTH.ordinal())) != 0) tSide2 = 0f; - if((tConn & (1 << ForgeDirection.SOUTH.ordinal())) != 0) tSide3 = 1f; - if((tConn & (1 << ForgeDirection.WEST.ordinal()) ) != 0) tSide4 = 0f; - if((tConn & (1 << ForgeDirection.EAST.ordinal()) ) != 0) tSide5 = 1f; - - return AxisAlignedBB.getBoundingBox(aX + tSide4, aY + tSide0, aZ + tSide2, aX + tSide5, aY + tSide1, aZ + tSide3); - } + float tSpace = (1f - mThickNess) / 2; + float tSide0 = tSpace; + float tSide1 = 1f - tSpace; + float tSide2 = tSpace; + float tSide3 = 1f - tSpace; + float tSide4 = tSpace; + float tSide5 = 1f - tSpace; + + if (getBaseMetaTileEntity().getCoverIDAtSide((byte) 0) != 0) { + tSide0 = tSide2 = tSide4 = 0; + tSide3 = tSide5 = 1; + } + if (getBaseMetaTileEntity().getCoverIDAtSide((byte) 1) != 0) { + tSide2 = tSide4 = 0; + tSide1 = tSide3 = tSide5 = 1; + } + if (getBaseMetaTileEntity().getCoverIDAtSide((byte) 2) != 0) { + tSide0 = tSide2 = tSide4 = 0; + tSide1 = tSide5 = 1; + } + if (getBaseMetaTileEntity().getCoverIDAtSide((byte) 3) != 0) { + tSide0 = tSide4 = 0; + tSide1 = tSide3 = tSide5 = 1; + } + if (getBaseMetaTileEntity().getCoverIDAtSide((byte) 4) != 0) { + tSide0 = tSide2 = tSide4 = 0; + tSide1 = tSide3 = 1; + } + if (getBaseMetaTileEntity().getCoverIDAtSide((byte) 5) != 0) { + tSide0 = tSide2 = 0; + tSide1 = tSide3 = tSide5 = 1; + } - @Override - public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List<AxisAlignedBB> outputAABB, Entity collider) { - super.addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider); - if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x2) != 0) { - AxisAlignedBB aabb = getActualCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); - if (inputAABB.intersectsWith(aabb)) outputAABB.add(aabb); - } + byte tConn = ((BaseMetaPipeEntity) getBaseMetaTileEntity()).mConnections; + if ((tConn & (1 << ForgeDirection.DOWN.ordinal())) != 0) tSide0 = 0f; + if ((tConn & (1 << ForgeDirection.UP.ordinal())) != 0) tSide1 = 1f; + if ((tConn & (1 << ForgeDirection.NORTH.ordinal())) != 0) tSide2 = 0f; + if ((tConn & (1 << ForgeDirection.SOUTH.ordinal())) != 0) tSide3 = 1f; + if ((tConn & (1 << ForgeDirection.WEST.ordinal())) != 0) tSide4 = 0f; + if ((tConn & (1 << ForgeDirection.EAST.ordinal())) != 0) tSide5 = 1f; + + return AxisAlignedBB.getBoundingBox( + aX + tSide4, aY + tSide0, aZ + tSide2, aX + tSide5, aY + tSide1, aZ + tSide3); + } + + @Override + public void addCollisionBoxesToList( + World aWorld, + int aX, + int aY, + int aZ, + AxisAlignedBB inputAABB, + List<AxisAlignedBB> outputAABB, + Entity collider) { + super.addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider); + if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x2) != 0) { + AxisAlignedBB aabb = getActualCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); + if (inputAABB.intersectsWith(aabb)) outputAABB.add(aabb); + } } @Override @@ -448,15 +576,20 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile if (mConnections != 0) { final IGregTechTileEntity baseMeta = getBaseMetaTileEntity(); - for( byte aSide = 0 ; aSide < 6 ; aSide++) if(isConnectedAtSide(aSide)) { - final TileEntity tTileEntity = baseMeta.getTileEntityAtSide(aSide); - final TileEntity tEmitter = (tTileEntity == null || tTileEntity instanceof IEnergyTile || EnergyNet.instance == null) ? tTileEntity : - EnergyNet.instance.getTileEntity(tTileEntity.getWorldObj(), tTileEntity.xCoord, tTileEntity.yCoord, tTileEntity.zCoord); - - if (tEmitter instanceof IEnergyEmitter) - return true; - - } + for (byte aSide = 0; aSide < 6; aSide++) + if (isConnectedAtSide(aSide)) { + final TileEntity tTileEntity = baseMeta.getTileEntityAtSide(aSide); + final TileEntity tEmitter = + (tTileEntity == null || tTileEntity instanceof IEnergyTile || EnergyNet.instance == null) + ? tTileEntity + : EnergyNet.instance.getTileEntity( + tTileEntity.getWorldObj(), + tTileEntity.xCoord, + tTileEntity.yCoord, + tTileEntity.zCoord); + + if (tEmitter instanceof IEnergyEmitter) return true; + } } return false; } @@ -471,7 +604,8 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile if (coverBehavior instanceof GT_Cover_None) continue; final int coverId = pipe.getCoverIDAtSide(i); ISerializableObject coverData = pipe.getComplexCoverDataAtSide(i); - if (!letsIn(coverBehavior, i, coverId, coverData, pipe) || !letsOut(coverBehavior, i, coverId, coverData, pipe)) { + if (!letsIn(coverBehavior, i, coverId, coverData, pipe) + || !letsOut(coverBehavior, i, coverId, coverData, pipe)) { pipe.addToLock(pipe, i); } else { pipe.removeFromLock(pipe, i); @@ -486,7 +620,8 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile if (coverBehavior instanceof GT_Cover_None) continue; final int coverId = pipe.getCoverIDAtSide(i); ISerializableObject coverData = pipe.getComplexCoverDataAtSide(i); - if (!letsIn(coverBehavior, i, coverId, coverData, pipe) || !letsOut(coverBehavior, i, coverId, coverData, pipe)) { + if (!letsIn(coverBehavior, i, coverId, coverData, pipe) + || !letsOut(coverBehavior, i, coverId, coverData, pipe)) { dontAllow = true; } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java index 5f91c2acd1..d25f92b58b 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java @@ -1,10 +1,13 @@ package gregtech.api.metatileentity.implementations; +import static gregtech.api.enums.GT_Values.D1; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; + import cpw.mods.fml.common.Optional; import gregtech.GT_Mod; import gregtech.api.GregTech_API; -import gregtech.api.enums.ParticleFX; import gregtech.api.enums.*; +import gregtech.api.enums.ParticleFX; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.ICoverable; @@ -17,6 +20,8 @@ import gregtech.api.util.WorldSpawnedEventBuilder.ParticleEventBuilder; import gregtech.common.GT_Client; import gregtech.common.covers.GT_Cover_Drain; import gregtech.common.covers.GT_Cover_FluidRegulator; +import java.util.ArrayList; +import java.util.List; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -32,12 +37,6 @@ import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; import org.apache.commons.lang3.tuple.MutableTriple; -import java.util.ArrayList; -import java.util.List; - -import static gregtech.api.enums.GT_Values.D1; -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; - public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { public final float mThickNess; public final Materials mMaterial; @@ -50,11 +49,28 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { */ public byte mDisableInput = 0; - public GT_MetaPipeEntity_Fluid(int aID, String aName, String aNameRegional, float aThickNess, Materials aMaterial, int aCapacity, int aHeatResistance, boolean aGasProof) { + public GT_MetaPipeEntity_Fluid( + int aID, + String aName, + String aNameRegional, + float aThickNess, + Materials aMaterial, + int aCapacity, + int aHeatResistance, + boolean aGasProof) { this(aID, aName, aNameRegional, aThickNess, aMaterial, aCapacity, aHeatResistance, aGasProof, 1); } - public GT_MetaPipeEntity_Fluid(int aID, String aName, String aNameRegional, float aThickNess, Materials aMaterial, int aCapacity, int aHeatResistance, boolean aGasProof, int aFluidTypes) { + public GT_MetaPipeEntity_Fluid( + int aID, + String aName, + String aNameRegional, + float aThickNess, + Materials aMaterial, + int aCapacity, + int aHeatResistance, + boolean aGasProof, + int aFluidTypes) { super(aID, aName, aNameRegional, 0, false); mThickNess = aThickNess; mMaterial = aMaterial; @@ -67,11 +83,24 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { } @Deprecated - public GT_MetaPipeEntity_Fluid(String aName, float aThickNess, Materials aMaterial, int aCapacity, int aHeatResistance, boolean aGasProof) { + public GT_MetaPipeEntity_Fluid( + String aName, + float aThickNess, + Materials aMaterial, + int aCapacity, + int aHeatResistance, + boolean aGasProof) { this(aName, aThickNess, aMaterial, aCapacity, aHeatResistance, aGasProof, 1); } - public GT_MetaPipeEntity_Fluid(String aName, float aThickNess, Materials aMaterial, int aCapacity, int aHeatResistance, boolean aGasProof, int aFluidTypes) { + public GT_MetaPipeEntity_Fluid( + String aName, + float aThickNess, + Materials aMaterial, + int aCapacity, + int aHeatResistance, + boolean aGasProof, + int aFluidTypes) { super(aName, 0); mThickNess = aThickNess; mMaterial = aMaterial; @@ -89,14 +118,27 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaPipeEntity_Fluid(mName, mThickNess, mMaterial, mCapacity, mHeatResistance, mGasProof, mPipeAmount); + return new GT_MetaPipeEntity_Fluid( + mName, mThickNess, mMaterial, mCapacity, mHeatResistance, mGasProof, mPipeAmount); } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aConnections, + byte aColorIndex, + boolean aConnected, + boolean aRedstone) { float tThickNess = getThickNess(); if (mDisableInput == 0) - return new ITexture[]{aConnected ? getBaseTexture(tThickNess, mPipeAmount, mMaterial, aColorIndex) : TextureFactory.of(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; + return new ITexture[] { + aConnected + ? getBaseTexture(tThickNess, mPipeAmount, mMaterial, aColorIndex) + : TextureFactory.of( + mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], + Dyes.getModulation(aColorIndex, mMaterial.mRGBa)) + }; byte tMask = 0; byte[][] sRestrictionArray = { {2, 3, 5, 4}, @@ -108,30 +150,51 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { }; if (aSide >= 0 && aSide < 6) { for (byte i = 0; i < 4; i++) if (isInputDisabledAtSide(sRestrictionArray[aSide][i])) tMask |= 1 << i; - //Full block size renderer flips side 5 and 2 textures, flip restrictor textures to compensate - if (aSide == 5 || aSide == 2) - if (tMask > 3 && tMask < 12) - tMask = (byte) (tMask ^ 12); - } - return new ITexture[]{aConnected ? getBaseTexture(tThickNess, mPipeAmount, mMaterial, aColorIndex) : TextureFactory.of(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), getRestrictorTexture(tMask)}; + // Full block size renderer flips side 5 and 2 textures, flip restrictor textures to compensate + if (aSide == 5 || aSide == 2) if (tMask > 3 && tMask < 12) tMask = (byte) (tMask ^ 12); + } + return new ITexture[] { + aConnected + ? getBaseTexture(tThickNess, mPipeAmount, mMaterial, aColorIndex) + : TextureFactory.of( + mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], + Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), + getRestrictorTexture(tMask) + }; } protected static ITexture getBaseTexture(float aThickNess, int aPipeAmount, Materials aMaterial, byte aColorIndex) { if (aPipeAmount >= 9) - return TextureFactory.of(aMaterial.mIconSet.mTextures[OrePrefixes.pipeNonuple.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + return TextureFactory.of( + aMaterial.mIconSet.mTextures[OrePrefixes.pipeNonuple.mTextureIndex], + Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); if (aPipeAmount >= 4) - return TextureFactory.of(aMaterial.mIconSet.mTextures[OrePrefixes.pipeQuadruple.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + return TextureFactory.of( + aMaterial.mIconSet.mTextures[OrePrefixes.pipeQuadruple.mTextureIndex], + Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); if (aThickNess < 0.124F) - return TextureFactory.of(aMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + return TextureFactory.of( + aMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], + Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); if (aThickNess < 0.374F) - return TextureFactory.of(aMaterial.mIconSet.mTextures[OrePrefixes.pipeTiny.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + return TextureFactory.of( + aMaterial.mIconSet.mTextures[OrePrefixes.pipeTiny.mTextureIndex], + Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); if (aThickNess < 0.499F) - return TextureFactory.of(aMaterial.mIconSet.mTextures[OrePrefixes.pipeSmall.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + return TextureFactory.of( + aMaterial.mIconSet.mTextures[OrePrefixes.pipeSmall.mTextureIndex], + Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); if (aThickNess < 0.749F) - return TextureFactory.of(aMaterial.mIconSet.mTextures[OrePrefixes.pipeMedium.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + return TextureFactory.of( + aMaterial.mIconSet.mTextures[OrePrefixes.pipeMedium.mTextureIndex], + Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); if (aThickNess < 0.874F) - return TextureFactory.of(aMaterial.mIconSet.mTextures[OrePrefixes.pipeLarge.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); - return TextureFactory.of(aMaterial.mIconSet.mTextures[OrePrefixes.pipeHuge.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + return TextureFactory.of( + aMaterial.mIconSet.mTextures[OrePrefixes.pipeLarge.mTextureIndex], + Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + return TextureFactory.of( + aMaterial.mIconSet.mTextures[OrePrefixes.pipeHuge.mTextureIndex], + Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); } protected static ITexture getRestrictorTexture(byte aMask) { @@ -236,14 +299,19 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { @Override public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity aEntity) { - if ((((BaseMetaPipeEntity) getBaseMetaTileEntity()).mConnections & -128) == 0 && aEntity instanceof EntityLivingBase) { + if ((((BaseMetaPipeEntity) getBaseMetaTileEntity()).mConnections & -128) == 0 + && aEntity instanceof EntityLivingBase) { for (FluidStack tFluid : mFluids) { if (tFluid != null) { int tTemperature = tFluid.getFluid().getTemperature(tFluid); - if (tTemperature > 320 && !isCoverOnSide((BaseMetaPipeEntity) getBaseMetaTileEntity(), (EntityLivingBase) aEntity)) { + if (tTemperature > 320 + && !isCoverOnSide( + (BaseMetaPipeEntity) getBaseMetaTileEntity(), (EntityLivingBase) aEntity)) { GT_Utility.applyHeatDamage((EntityLivingBase) aEntity, (tTemperature - 300) / 50.0F); break; - } else if (tTemperature < 260 && !isCoverOnSide((BaseMetaPipeEntity) getBaseMetaTileEntity(), (EntityLivingBase) aEntity)) { + } else if (tTemperature < 260 + && !isCoverOnSide( + (BaseMetaPipeEntity) getBaseMetaTileEntity(), (EntityLivingBase) aEntity)) { GT_Utility.applyFrostDamage((EntityLivingBase) aEntity, (270 - tTemperature) / 25.0F); break; } @@ -278,7 +346,6 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { } oLastReceivedFrom = mLastReceivedFrom; - } } @@ -291,21 +358,36 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { if (tTemperature > mHeatResistance) { if (aBaseMetaTileEntity.getRandomNumber(100) == 0) { // Poof - GT_Log.exp.println("Set Pipe to Fire due to to low heat resistance at " + aBaseMetaTileEntity.getXCoord() + " | " + aBaseMetaTileEntity.getYCoord() + " | " + aBaseMetaTileEntity.getZCoord() + " DIMID: " + aBaseMetaTileEntity.getWorld().provider.dimensionId); + GT_Log.exp.println( + "Set Pipe to Fire due to to low heat resistance at " + aBaseMetaTileEntity.getXCoord() + + " | " + aBaseMetaTileEntity.getYCoord() + " | " + aBaseMetaTileEntity.getZCoord() + + " DIMID: " + aBaseMetaTileEntity.getWorld().provider.dimensionId); aBaseMetaTileEntity.setToFire(); return true; } // Mmhmm, Fire aBaseMetaTileEntity.setOnFire(); - GT_Log.exp.println("Set Blocks around Pipe to Fire due to to low heat resistance at " + aBaseMetaTileEntity.getXCoord() + " | " + aBaseMetaTileEntity.getYCoord() + " | " + aBaseMetaTileEntity.getZCoord() + " DIMID: " + aBaseMetaTileEntity.getWorld().provider.dimensionId); - + GT_Log.exp.println("Set Blocks around Pipe to Fire due to to low heat resistance at " + + aBaseMetaTileEntity.getXCoord() + " | " + aBaseMetaTileEntity.getYCoord() + " | " + + aBaseMetaTileEntity.getZCoord() + " DIMID: " + + aBaseMetaTileEntity.getWorld().provider.dimensionId); } if (!mGasProof && tFluid.getFluid().isGaseous(tFluid)) { tFluid.amount -= 5; sendSound((byte) 9); if (tTemperature > 320) { try { - for (EntityLivingBase tLiving : (ArrayList<EntityLivingBase>) getBaseMetaTileEntity().getWorld().getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(getBaseMetaTileEntity().getXCoord() - 2, getBaseMetaTileEntity().getYCoord() - 2, getBaseMetaTileEntity().getZCoord() - 2, getBaseMetaTileEntity().getXCoord() + 3, getBaseMetaTileEntity().getYCoord() + 3, getBaseMetaTileEntity().getZCoord() + 3))) { + for (EntityLivingBase tLiving : (ArrayList<EntityLivingBase>) getBaseMetaTileEntity() + .getWorld() + .getEntitiesWithinAABB( + EntityLivingBase.class, + AxisAlignedBB.getBoundingBox( + getBaseMetaTileEntity().getXCoord() - 2, + getBaseMetaTileEntity().getYCoord() - 2, + getBaseMetaTileEntity().getZCoord() - 2, + getBaseMetaTileEntity().getXCoord() + 3, + getBaseMetaTileEntity().getYCoord() + 3, + getBaseMetaTileEntity().getZCoord() + 3))) { GT_Utility.applyHeatDamage(tLiving, (tTemperature - 300) / 25.0F); } } catch (Throwable e) { @@ -313,7 +395,17 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { } } else if (tTemperature < 260) { try { - for (EntityLivingBase tLiving : (ArrayList<EntityLivingBase>) getBaseMetaTileEntity().getWorld().getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(getBaseMetaTileEntity().getXCoord() - 2, getBaseMetaTileEntity().getYCoord() - 2, getBaseMetaTileEntity().getZCoord() - 2, getBaseMetaTileEntity().getXCoord() + 3, getBaseMetaTileEntity().getYCoord() + 3, getBaseMetaTileEntity().getZCoord() + 3))) { + for (EntityLivingBase tLiving : (ArrayList<EntityLivingBase>) getBaseMetaTileEntity() + .getWorld() + .getEntitiesWithinAABB( + EntityLivingBase.class, + AxisAlignedBB.getBoundingBox( + getBaseMetaTileEntity().getXCoord() - 2, + getBaseMetaTileEntity().getYCoord() - 2, + getBaseMetaTileEntity().getZCoord() - 2, + getBaseMetaTileEntity().getXCoord() + 3, + getBaseMetaTileEntity().getYCoord() + 3, + getBaseMetaTileEntity().getZCoord() + 3))) { GT_Utility.applyFrostDamage(tLiving, (270 - tTemperature) / 12.5F); } } catch (Throwable e) { @@ -341,9 +433,25 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { final IFluidHandler tTank = aBaseMetaTileEntity.getITankContainerAtSide(aSide); final IGregTechTileEntity gTank = tTank instanceof IGregTechTileEntity ? (IGregTechTileEntity) tTank : null; - if (isConnectedAtSide(aSide) && tTank != null && (mLastReceivedFrom & (1 << aSide)) == 0 && - getBaseMetaTileEntity().getCoverBehaviorAtSideNew(aSide).letsFluidOut(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getComplexCoverDataAtSide(aSide), tFluid.getFluid(), getBaseMetaTileEntity()) && - (gTank == null || gTank.getCoverBehaviorAtSideNew(tSide).letsFluidIn(tSide, gTank.getCoverIDAtSide(tSide), gTank.getComplexCoverDataAtSide(tSide), tFluid.getFluid(), gTank))) { + if (isConnectedAtSide(aSide) + && tTank != null + && (mLastReceivedFrom & (1 << aSide)) == 0 + && getBaseMetaTileEntity() + .getCoverBehaviorAtSideNew(aSide) + .letsFluidOut( + aSide, + getBaseMetaTileEntity().getCoverIDAtSide(aSide), + getBaseMetaTileEntity().getComplexCoverDataAtSide(aSide), + tFluid.getFluid(), + getBaseMetaTileEntity()) + && (gTank == null + || gTank.getCoverBehaviorAtSideNew(tSide) + .letsFluidIn( + tSide, + gTank.getCoverIDAtSide(tSide), + gTank.getComplexCoverDataAtSide(tSide), + tFluid.getFluid(), + gTank))) { if (tTank.fill(ForgeDirection.getOrientation(tSide), tFluid, false) > 0) { tTanks.add(new MutableTriple<>(tTank, ForgeDirection.getOrientation(tSide), 0)); } @@ -366,9 +474,12 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { // Now distribute for (MutableTriple<IFluidHandler, ForgeDirection, Integer> tEntry : tTanks) { if (availableCapacity > tAmount) - tEntry.right = (int) Math.floor(tEntry.right * tAmount / availableCapacity); // Distribue fluids based on percentage available space at destination + tEntry.right = (int) Math.floor(tEntry.right + * tAmount + / availableCapacity); // Distribue fluids based on percentage available space at destination if (tEntry.right == 0) - tEntry.right = (int) Math.min(1, tAmount); // If the percent is not enough to give at least 1L, try to give 1L + tEntry.right = + (int) Math.min(1, tAmount); // If the percent is not enough to give at least 1L, try to give 1L if (tEntry.right <= 0) continue; int tFilledAmount = tEntry.left.fill(tEntry.middle, drainFromIndex(tEntry.right, false, index), false); @@ -377,11 +488,11 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { if (mFluids[index] == null || mFluids[index].amount <= 0) return; } - } @Override - public boolean onWrenchRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public boolean onWrenchRightClick( + byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (GT_Mod.gregtechproxy.gt6Pipe) { byte tSide = GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ); byte tMask = (byte) (1 << tSide); @@ -389,16 +500,14 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { if (isInputDisabledAtSide(tSide)) { mDisableInput &= ~tMask; GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("212", "Input enabled")); - if (!isConnectedAtSide(tSide)) - connect(tSide); + if (!isConnectedAtSide(tSide)) connect(tSide); } else { mDisableInput |= tMask; GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("213", "Input disabled")); } } else { if (!isConnectedAtSide(tSide)) { - if (connect(tSide) > 0) - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("214", "Connected")); + if (connect(tSide) > 0) GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("214", "Connected")); } else { disconnect(tSide); GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("215", "Disconnected")); @@ -410,37 +519,49 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { } @Override - public boolean letsIn(GT_CoverBehavior coverBehavior, byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + public boolean letsIn( + GT_CoverBehavior coverBehavior, byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return coverBehavior.letsFluidIn(aSide, aCoverID, aCoverVariable, null, aTileEntity); } @Override - public boolean letsOut(GT_CoverBehavior coverBehavior, byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + public boolean letsOut( + GT_CoverBehavior coverBehavior, byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return coverBehavior.letsFluidOut(aSide, aCoverID, aCoverVariable, null, aTileEntity); } @Override - public boolean letsIn(GT_CoverBehaviorBase<?> coverBehavior, byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public boolean letsIn( + GT_CoverBehaviorBase<?> coverBehavior, + byte aSide, + int aCoverID, + ISerializableObject aCoverVariable, + ICoverable aTileEntity) { return coverBehavior.letsFluidIn(aSide, aCoverID, aCoverVariable, null, aTileEntity); } @Override - public boolean letsOut(GT_CoverBehaviorBase<?> coverBehavior, byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public boolean letsOut( + GT_CoverBehaviorBase<?> coverBehavior, + byte aSide, + int aCoverID, + ISerializableObject aCoverVariable, + ICoverable aTileEntity) { return coverBehavior.letsFluidOut(aSide, aCoverID, aCoverVariable, null, aTileEntity); } @Override public boolean canConnect(byte aSide, TileEntity tTileEntity) { - if (tTileEntity == null) - return false; + if (tTileEntity == null) return false; - final byte tSide = (byte) ForgeDirection.getOrientation(aSide).getOpposite().ordinal(); + final byte tSide = + (byte) ForgeDirection.getOrientation(aSide).getOpposite().ordinal(); final IGregTechTileEntity baseMetaTile = getBaseMetaTileEntity(); - if (baseMetaTile == null) - return false; + if (baseMetaTile == null) return false; final GT_CoverBehaviorBase<?> coverBehavior = baseMetaTile.getCoverBehaviorAtSideNew(aSide); - final IGregTechTileEntity gTileEntity = (tTileEntity instanceof IGregTechTileEntity) ? (IGregTechTileEntity) tTileEntity : null; + final IGregTechTileEntity gTileEntity = + (tTileEntity instanceof IGregTechTileEntity) ? (IGregTechTileEntity) tTileEntity : null; if (coverBehavior instanceof GT_Cover_Drain || (GregTech_API.mTConstruct && isTConstructFaucet(tTileEntity))) return true; @@ -451,9 +572,9 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { final FluidTankInfo[] tInfo = fTileEntity.getTankInfo(ForgeDirection.getOrientation(tSide)); if (tInfo != null) { return tInfo.length > 0 - || (GregTech_API.mTranslocator && isTranslocator(tTileEntity)) - || gTileEntity != null && gTileEntity.getCoverBehaviorAtSideNew(tSide) instanceof GT_Cover_FluidRegulator; - + || (GregTech_API.mTranslocator && isTranslocator(tTileEntity)) + || gTileEntity != null + && gTileEntity.getCoverBehaviorAtSideNew(tSide) instanceof GT_Cover_FluidRegulator; } } return false; @@ -484,20 +605,17 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { GT_Utility.doSoundAtClient(SoundResource.RANDOM_FIZZ, 5, 1.0F, aX, aY, aZ); new ParticleEventBuilder() - .setIdentifier(ParticleFX.CLOUD) - .setWorld(getBaseMetaTileEntity().getWorld()) - .<ParticleEventBuilder>times(6, (x, i) -> x - .setMotion( - ForgeDirection.getOrientation(i).offsetX / 5.0, - ForgeDirection.getOrientation(i).offsetY / 5.0, - ForgeDirection.getOrientation(i).offsetZ / 5.0 - ) - .setPosition( - aX - 0.5 + XSTR_INSTANCE.nextFloat(), - aY - 0.5 + XSTR_INSTANCE.nextFloat(), - aZ - 0.5 + XSTR_INSTANCE.nextFloat() - ).run() - ); + .setIdentifier(ParticleFX.CLOUD) + .setWorld(getBaseMetaTileEntity().getWorld()) + .<ParticleEventBuilder>times(6, (x, i) -> x.setMotion( + ForgeDirection.getOrientation(i).offsetX / 5.0, + ForgeDirection.getOrientation(i).offsetY / 5.0, + ForgeDirection.getOrientation(i).offsetZ / 5.0) + .setPosition( + aX - 0.5 + XSTR_INSTANCE.nextFloat(), + aY - 0.5 + XSTR_INSTANCE.nextFloat(), + aZ - 0.5 + XSTR_INSTANCE.nextFloat()) + .run()); } } @@ -509,18 +627,16 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { @Override public FluidTankInfo getInfo() { for (FluidStack tFluid : mFluids) { - if (tFluid != null) - return new FluidTankInfo(tFluid, mCapacity * 20); + if (tFluid != null) return new FluidTankInfo(tFluid, mCapacity * 20); } return new FluidTankInfo(null, mCapacity * 20); } @Override public FluidTankInfo[] getTankInfo(ForgeDirection aSide) { - if (getCapacity() <= 0 && !getBaseMetaTileEntity().hasSteamEngineUpgrade()) return new FluidTankInfo[]{}; + if (getCapacity() <= 0 && !getBaseMetaTileEntity().hasSteamEngineUpgrade()) return new FluidTankInfo[] {}; ArrayList<FluidTankInfo> tList = new ArrayList<>(); - for (FluidStack tFluid : mFluids) - tList.add(new FluidTankInfo(tFluid, mCapacity * 20)); + for (FluidStack tFluid : mFluids) tList.add(new FluidTankInfo(tFluid, mCapacity * 20)); return tList.toArray(new FluidTankInfo[mPipeAmount]); } @@ -537,8 +653,7 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { @Override public final FluidStack getFluid() { for (FluidStack tFluid : mFluids) { - if (tFluid != null) - return tFluid; + if (tFluid != null) return tFluid; } return null; } @@ -547,8 +662,7 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { public final int getFluidAmount() { int rAmount = 0; for (FluidStack tFluid : mFluids) { - if (tFluid != null) - rAmount += tFluid.amount; + if (tFluid != null) rAmount += tFluid.amount; } return rAmount; } @@ -611,8 +725,7 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { public final FluidStack drain(int maxDrain, boolean doDrain) { FluidStack drained; for (int i = 0; i < mPipeAmount; i++) { - if ((drained = drainFromIndex(maxDrain, doDrain, i)) != null) - return drained; + if ((drained = drainFromIndex(maxDrain, doDrain, i)) != null) return drained; } return null; } @@ -626,8 +739,7 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { } int used = maxDrain; - if (mFluids[index].amount < used) - used = mFluids[index].amount; + if (mFluids[index].amount < used) used = mFluids[index].amount; if (doDrain) { mFluids[index].amount -= used; @@ -651,14 +763,18 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { @Override public String[] getDescription() { if (mPipeAmount == 1) { - return new String[]{ - EnumChatFormatting.BLUE + "Fluid Capacity: %%%" + GT_Utility.formatNumbers(mCapacity * 20L) + "%%% L/sec" + EnumChatFormatting.GRAY, - EnumChatFormatting.RED + "Heat Limit: %%%" + GT_Utility.formatNumbers(mHeatResistance) + "%%% K" + EnumChatFormatting.GRAY + return new String[] { + EnumChatFormatting.BLUE + "Fluid Capacity: %%%" + GT_Utility.formatNumbers(mCapacity * 20L) + + "%%% L/sec" + EnumChatFormatting.GRAY, + EnumChatFormatting.RED + "Heat Limit: %%%" + GT_Utility.formatNumbers(mHeatResistance) + "%%% K" + + EnumChatFormatting.GRAY }; } else { - return new String[]{ - EnumChatFormatting.BLUE + "Fluid Capacity: %%%" + GT_Utility.formatNumbers(mCapacity * 20L) + "%%% L/sec" + EnumChatFormatting.GRAY, - EnumChatFormatting.RED + "Heat Limit: %%%" + GT_Utility.formatNumbers(mHeatResistance) + "%%% K" + EnumChatFormatting.GRAY, + return new String[] { + EnumChatFormatting.BLUE + "Fluid Capacity: %%%" + GT_Utility.formatNumbers(mCapacity * 20L) + + "%%% L/sec" + EnumChatFormatting.GRAY, + EnumChatFormatting.RED + "Heat Limit: %%%" + GT_Utility.formatNumbers(mHeatResistance) + "%%% K" + + EnumChatFormatting.GRAY, EnumChatFormatting.AQUA + "Pipe Amount: %%%" + mPipeAmount + EnumChatFormatting.GRAY }; } @@ -688,8 +804,7 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x2) != 0) return AxisAlignedBB.getBoundingBox(aX, aY, aZ, aX + 1, aY + 1, aZ + 1); - else - return getActualCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); + else return getActualCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); } private AxisAlignedBB getActualCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { @@ -734,11 +849,19 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { if ((tConn & (1 << ForgeDirection.WEST.ordinal())) != 0) tSide4 = 0f; if ((tConn & (1 << ForgeDirection.EAST.ordinal())) != 0) tSide5 = 1f; - return AxisAlignedBB.getBoundingBox(aX + tSide4, aY + tSide0, aZ + tSide2, aX + tSide5, aY + tSide1, aZ + tSide3); + return AxisAlignedBB.getBoundingBox( + aX + tSide4, aY + tSide0, aZ + tSide2, aX + tSide5, aY + tSide1, aZ + tSide3); } @Override - public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List<AxisAlignedBB> outputAABB, Entity collider) { + public void addCollisionBoxesToList( + World aWorld, + int aX, + int aY, + int aZ, + AxisAlignedBB inputAABB, + List<AxisAlignedBB> outputAABB, + Entity collider) { super.addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider); if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x2) != 0) { AxisAlignedBB aabb = getActualCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); @@ -748,12 +871,10 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { @Override public FluidStack drain(ForgeDirection aSide, FluidStack aFluid, boolean doDrain) { - if (aFluid == null) - return null; + if (aFluid == null) return null; for (int i = 0; i < mFluids.length; ++i) { final FluidStack f = mFluids[i]; - if (f == null || !f.isFluidEqual(aFluid)) - continue; + if (f == null || !f.isFluidEqual(aFluid)) continue; return drainFromIndex(aFluid.amount, doDrain, i); } return null; diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Frame.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Frame.java index e1677b1deb..dce130325c 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Frame.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Frame.java @@ -1,5 +1,7 @@ package gregtech.api.metatileentity.implementations; +import static gregtech.api.enums.GT_Values.RA; + import gregtech.api.enums.Dyes; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -16,12 +18,9 @@ import gregtech.api.util.GT_OreDictUnificator; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import static gregtech.api.enums.GT_Values.RA; - public class GT_MetaPipeEntity_Frame extends MetaPipeEntity { private static final String localizedDescFormat = GT_LanguageManager.addStringLocalization( - "gt.blockmachines.gt_frame.desc.format", - "Just something you can put covers on."); + "gt.blockmachines.gt_frame.desc.format", "Just something you can put covers on."); public final Materials mMaterial; public GT_MetaPipeEntity_Frame(int aID, String aName, String aNameRegional, Materials aMaterial) { @@ -29,8 +28,16 @@ public class GT_MetaPipeEntity_Frame extends MetaPipeEntity { mMaterial = aMaterial; GT_OreDictUnificator.registerOre(OrePrefixes.frameGt, aMaterial, getStackForm(1)); - GT_ModHandler.addCraftingRecipe(getStackForm(2), RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SSS", "SwS", "SSS", 'S', OrePrefixes.stick.get(mMaterial)}); - RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 4), ItemList.Circuit_Integrated.getWithDamage(0, 4), getStackForm(1), 64, 8); + GT_ModHandler.addCraftingRecipe( + getStackForm(2), + RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] {"SSS", "SwS", "SSS", 'S', OrePrefixes.stick.get(mMaterial)}); + RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 4), + ItemList.Circuit_Integrated.getWithDamage(0, 4), + getStackForm(1), + 64, + 8); } public GT_MetaPipeEntity_Frame(String aName, Materials aMaterial) { @@ -49,8 +56,18 @@ public class GT_MetaPipeEntity_Frame extends MetaPipeEntity { } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) { - return new ITexture[]{TextureFactory.of(mMaterial.mIconSet.mTextures[OrePrefixes.frameGt.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aConnections, + byte aColorIndex, + boolean aConnected, + boolean aRedstone) { + return new ITexture[] { + TextureFactory.of( + mMaterial.mIconSet.mTextures[OrePrefixes.frameGt.mTextureIndex], + Dyes.getModulation(aColorIndex, mMaterial.mRGBa)) + }; } @Override @@ -84,26 +101,36 @@ public class GT_MetaPipeEntity_Frame extends MetaPipeEntity { } @Override - public final void saveNBTData(NBTTagCompound aNBT) {/*Do nothing*/} + public final void saveNBTData(NBTTagCompound aNBT) { + /*Do nothing*/ + } @Override - public final void loadNBTData(NBTTagCompound aNBT) {/*Do nothing*/} + public final void loadNBTData(NBTTagCompound aNBT) { + /*Do nothing*/ + } @Override - public final boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + public final boolean allowPutStack( + IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return false; } @Override - public final boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + public final boolean allowPullStack( + IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return false; } @Override - public int connect(byte aSide) {return 0;} + public int connect(byte aSide) { + return 0; + } @Override - public void disconnect(byte aSide) {/* Do nothing*/} + public void disconnect(byte aSide) { + /* Do nothing*/ + } @Override public boolean isMachineBlockUpdateRecursive() { diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java index 218e064f71..c919187927 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java @@ -1,5 +1,7 @@ package gregtech.api.metatileentity.implementations; +import static gregtech.api.enums.Textures.BlockIcons.PIPE_RESTRICTOR; + import gregtech.GT_Mod; import gregtech.api.enums.Dyes; import gregtech.api.enums.GT_Values; @@ -18,6 +20,9 @@ import gregtech.api.util.GT_CoverBehaviorBase; import gregtech.api.util.GT_Utility; import gregtech.api.util.ISerializableObject; import gregtech.common.GT_Client; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; @@ -31,12 +36,6 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import static gregtech.api.enums.Textures.BlockIcons.PIPE_RESTRICTOR; - public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileEntityItemPipe { public final float mThickNess; public final Materials mMaterial; @@ -47,7 +46,16 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE public boolean mIsRestrictive = false; private int[] cacheSides; - public GT_MetaPipeEntity_Item(int aID, String aName, String aNameRegional, float aThickNess, Materials aMaterial, int aInvSlotCount, int aStepSize, boolean aIsRestrictive, int aTickTime) { + public GT_MetaPipeEntity_Item( + int aID, + String aName, + String aNameRegional, + float aThickNess, + Materials aMaterial, + int aInvSlotCount, + int aStepSize, + boolean aIsRestrictive, + int aTickTime) { super(aID, aName, aNameRegional, aInvSlotCount, false); mIsRestrictive = aIsRestrictive; mThickNess = aThickNess; @@ -57,11 +65,26 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE addInfo(aID); } - public GT_MetaPipeEntity_Item(int aID, String aName, String aNameRegional, float aThickNess, Materials aMaterial, int aInvSlotCount, int aStepSize, boolean aIsRestrictive) { + public GT_MetaPipeEntity_Item( + int aID, + String aName, + String aNameRegional, + float aThickNess, + Materials aMaterial, + int aInvSlotCount, + int aStepSize, + boolean aIsRestrictive) { this(aID, aName, aNameRegional, aThickNess, aMaterial, aInvSlotCount, aStepSize, aIsRestrictive, 20); } - public GT_MetaPipeEntity_Item(String aName, float aThickNess, Materials aMaterial, int aInvSlotCount, int aStepSize, boolean aIsRestrictive, int aTickTime) { + public GT_MetaPipeEntity_Item( + String aName, + float aThickNess, + Materials aMaterial, + int aInvSlotCount, + int aStepSize, + boolean aIsRestrictive, + int aTickTime) { super(aName, aInvSlotCount); mIsRestrictive = aIsRestrictive; mThickNess = aThickNess; @@ -77,43 +100,113 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaPipeEntity_Item(mName, mThickNess, mMaterial, mInventory.length, mStepSize, mIsRestrictive, mTickTime); + return new GT_MetaPipeEntity_Item( + mName, mThickNess, mMaterial, mInventory.length, mStepSize, mIsRestrictive, mTickTime); } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aConnections, + byte aColorIndex, + boolean aConnected, + boolean aRedstone) { if (mIsRestrictive) { if (aConnected) { float tThickNess = getThickNess(); if (tThickNess < 0.124F) - return new ITexture[]{TextureFactory.of(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), TextureFactory.of(PIPE_RESTRICTOR)}; - if (tThickNess < 0.374F)//0.375 - return new ITexture[]{TextureFactory.of(mMaterial.mIconSet.mTextures[OrePrefixes.pipeTiny.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), TextureFactory.of(PIPE_RESTRICTOR)}; - if (tThickNess < 0.499F)//0.500 - return new ITexture[]{TextureFactory.of(mMaterial.mIconSet.mTextures[OrePrefixes.pipeSmall.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), TextureFactory.of(PIPE_RESTRICTOR)}; - if (tThickNess < 0.749F)//0.750 - return new ITexture[]{TextureFactory.of(mMaterial.mIconSet.mTextures[OrePrefixes.pipeMedium.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), TextureFactory.of(PIPE_RESTRICTOR)}; - if (tThickNess < 0.874F)//0.825 - return new ITexture[]{TextureFactory.of(mMaterial.mIconSet.mTextures[OrePrefixes.pipeLarge.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), TextureFactory.of(PIPE_RESTRICTOR)}; - return new ITexture[]{TextureFactory.of(mMaterial.mIconSet.mTextures[OrePrefixes.pipeHuge.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), TextureFactory.of(PIPE_RESTRICTOR)}; + return new ITexture[] { + TextureFactory.of( + mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], + Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), + TextureFactory.of(PIPE_RESTRICTOR) + }; + if (tThickNess < 0.374F) // 0.375 + return new ITexture[] { + TextureFactory.of( + mMaterial.mIconSet.mTextures[OrePrefixes.pipeTiny.mTextureIndex], + Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), + TextureFactory.of(PIPE_RESTRICTOR) + }; + if (tThickNess < 0.499F) // 0.500 + return new ITexture[] { + TextureFactory.of( + mMaterial.mIconSet.mTextures[OrePrefixes.pipeSmall.mTextureIndex], + Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), + TextureFactory.of(PIPE_RESTRICTOR) + }; + if (tThickNess < 0.749F) // 0.750 + return new ITexture[] { + TextureFactory.of( + mMaterial.mIconSet.mTextures[OrePrefixes.pipeMedium.mTextureIndex], + Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), + TextureFactory.of(PIPE_RESTRICTOR) + }; + if (tThickNess < 0.874F) // 0.825 + return new ITexture[] { + TextureFactory.of( + mMaterial.mIconSet.mTextures[OrePrefixes.pipeLarge.mTextureIndex], + Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), + TextureFactory.of(PIPE_RESTRICTOR) + }; + return new ITexture[] { + TextureFactory.of( + mMaterial.mIconSet.mTextures[OrePrefixes.pipeHuge.mTextureIndex], + Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), + TextureFactory.of(PIPE_RESTRICTOR) + }; } - return new ITexture[]{TextureFactory.of(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), TextureFactory.of(PIPE_RESTRICTOR)}; + return new ITexture[] { + TextureFactory.of( + mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], + Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), + TextureFactory.of(PIPE_RESTRICTOR) + }; } if (aConnected) { float tThickNess = getThickNess(); if (tThickNess < 0.124F) - return new ITexture[]{TextureFactory.of(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; - if (tThickNess < 0.374F)//0.375 - return new ITexture[]{TextureFactory.of(mMaterial.mIconSet.mTextures[OrePrefixes.pipeTiny.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; - if (tThickNess < 0.499F)//0.500 - return new ITexture[]{TextureFactory.of(mMaterial.mIconSet.mTextures[OrePrefixes.pipeSmall.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; - if (tThickNess < 0.749F)//0.750 - return new ITexture[]{TextureFactory.of(mMaterial.mIconSet.mTextures[OrePrefixes.pipeMedium.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; - if (tThickNess < 0.874F)//0.825 - return new ITexture[]{TextureFactory.of(mMaterial.mIconSet.mTextures[OrePrefixes.pipeLarge.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; - return new ITexture[]{TextureFactory.of(mMaterial.mIconSet.mTextures[OrePrefixes.pipeHuge.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; + return new ITexture[] { + TextureFactory.of( + mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], + Dyes.getModulation(aColorIndex, mMaterial.mRGBa)) + }; + if (tThickNess < 0.374F) // 0.375 + return new ITexture[] { + TextureFactory.of( + mMaterial.mIconSet.mTextures[OrePrefixes.pipeTiny.mTextureIndex], + Dyes.getModulation(aColorIndex, mMaterial.mRGBa)) + }; + if (tThickNess < 0.499F) // 0.500 + return new ITexture[] { + TextureFactory.of( + mMaterial.mIconSet.mTextures[OrePrefixes.pipeSmall.mTextureIndex], + Dyes.getModulation(aColorIndex, mMaterial.mRGBa)) + }; + if (tThickNess < 0.749F) // 0.750 + return new ITexture[] { + TextureFactory.of( + mMaterial.mIconSet.mTextures[OrePrefixes.pipeMedium.mTextureIndex], + Dyes.getModulation(aColorIndex, mMaterial.mRGBa)) + }; + if (tThickNess < 0.874F) // 0.825 + return new ITexture[] { + TextureFactory.of( + mMaterial.mIconSet.mTextures[OrePrefixes.pipeLarge.mTextureIndex], + Dyes.getModulation(aColorIndex, mMaterial.mRGBa)) + }; + return new ITexture[] { + TextureFactory.of( + mMaterial.mIconSet.mTextures[OrePrefixes.pipeHuge.mTextureIndex], + Dyes.getModulation(aColorIndex, mMaterial.mRGBa)) + }; } - return new ITexture[]{TextureFactory.of(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; + return new ITexture[] { + TextureFactory.of( + mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], + Dyes.getModulation(aColorIndex, mMaterial.mRGBa)) + }; } @Override @@ -149,8 +242,7 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE @Override public void saveNBTData(NBTTagCompound aNBT) { aNBT.setByte("mLastReceivedFrom", mLastReceivedFrom); - if (GT_Mod.gregtechproxy.gt6Pipe) - aNBT.setByte("mConnections", mConnections); + if (GT_Mod.gregtechproxy.gt6Pipe) aNBT.setByte("mConnections", mConnections); } @Override @@ -177,7 +269,9 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE for (boolean temp = true; temp && !isInventoryEmpty() && pipeCapacityCheck(); ) { temp = false; tPipeList.clear(); - for (IMetaTileEntityItemPipe tTileEntity : GT_Utility.sortMapByValuesAcending(IMetaTileEntityItemPipe.Util.scanPipes(this, new HashMap<>(), 0, false, false)).keySet()) { + for (IMetaTileEntityItemPipe tTileEntity : GT_Utility.sortMapByValuesAcending( + IMetaTileEntityItemPipe.Util.scanPipes(this, new HashMap<>(), 0, false, false)) + .keySet()) { if (temp) break; tPipeList.add(tTileEntity); while (!temp && !isInventoryEmpty() && tTileEntity.sendItemStack(aBaseMetaTileEntity)) @@ -193,15 +287,15 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE } @Override - public boolean onWrenchRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public boolean onWrenchRightClick( + byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (GT_Mod.gregtechproxy.gt6Pipe) { byte tSide = GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ); if (isConnectedAtSide(tSide)) { disconnect(tSide); GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("215", "Disconnected")); } else { - if (connect(tSide) > 0) - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("214", "Connected")); + if (connect(tSide) > 0) GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("214", "Connected")); } return true; } @@ -209,22 +303,34 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE } @Override - public boolean letsIn(GT_CoverBehavior coverBehavior, byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + public boolean letsIn( + GT_CoverBehavior coverBehavior, byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return coverBehavior.letsItemsIn(aSide, aCoverID, aCoverVariable, -1, aTileEntity); } @Override - public boolean letsOut(GT_CoverBehavior coverBehavior, byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + public boolean letsOut( + GT_CoverBehavior coverBehavior, byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return coverBehavior.letsItemsOut(aSide, aCoverID, aCoverVariable, -1, aTileEntity); } @Override - public boolean letsIn(GT_CoverBehaviorBase<?> coverBehavior, byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public boolean letsIn( + GT_CoverBehaviorBase<?> coverBehavior, + byte aSide, + int aCoverID, + ISerializableObject aCoverVariable, + ICoverable aTileEntity) { return coverBehavior.letsItemsIn(aSide, aCoverID, aCoverVariable, -1, aTileEntity); } @Override - public boolean letsOut(GT_CoverBehaviorBase<?> coverBehavior, byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public boolean letsOut( + GT_CoverBehaviorBase<?> coverBehavior, + byte aSide, + int aCoverID, + ISerializableObject aCoverVariable, + ICoverable aTileEntity) { return coverBehavior.letsItemsOut(aSide, aCoverID, aCoverVariable, -1, aTileEntity); } @@ -235,7 +341,8 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE final byte tSide = GT_Utility.getOppositeSide(aSide); boolean connectable = GT_Utility.isConnectableNonInventoryPipe(tTileEntity, tSide); - final IGregTechTileEntity gTileEntity = (tTileEntity instanceof IGregTechTileEntity) ? (IGregTechTileEntity) tTileEntity : null; + final IGregTechTileEntity gTileEntity = + (tTileEntity instanceof IGregTechTileEntity) ? (IGregTechTileEntity) tTileEntity : null; if (gTileEntity != null) { if (gTileEntity.getMetaTileEntity() == null) return false; if (gTileEntity.getMetaTileEntity().connectsToItemPipe(tSide)) return true; @@ -261,7 +368,6 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE return GT_Mod.gregtechproxy.gt6Pipe; } - @Override public boolean incrementTransferCounter(int aIncrement) { mTransferredItems += aIncrement; @@ -274,7 +380,8 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE byte tOffset = (byte) getBaseMetaTileEntity().getRandomNumber(6), tSide = 0; for (byte i = 0; i < 6; i++) { tSide = (byte) ((i + tOffset) % 6); - if (isConnectedAtSide(tSide) && (isInventoryEmpty() || (tSide != mLastReceivedFrom || aSender != getBaseMetaTileEntity()))) { + if (isConnectedAtSide(tSide) + && (isInventoryEmpty() || (tSide != mLastReceivedFrom || aSender != getBaseMetaTileEntity()))) { if (insertItemStackIntoTileEntity(aSender, tSide)) return true; } } @@ -284,11 +391,31 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE @Override public boolean insertItemStackIntoTileEntity(Object aSender, byte aSide) { - if (getBaseMetaTileEntity().getCoverBehaviorAtSideNew(aSide).letsItemsOut(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getComplexCoverDataAtSide(aSide), -1, getBaseMetaTileEntity())) { + if (getBaseMetaTileEntity() + .getCoverBehaviorAtSideNew(aSide) + .letsItemsOut( + aSide, + getBaseMetaTileEntity().getCoverIDAtSide(aSide), + getBaseMetaTileEntity().getComplexCoverDataAtSide(aSide), + -1, + getBaseMetaTileEntity())) { TileEntity tInventory = getBaseMetaTileEntity().getTileEntityAtSide(aSide); if (tInventory != null && !(tInventory instanceof BaseMetaPipeEntity)) { - if ((!(tInventory instanceof TileEntityHopper) && !(tInventory instanceof TileEntityDispenser)) || getBaseMetaTileEntity().getMetaIDAtSide(aSide) != GT_Utility.getOppositeSide(aSide)) { - return GT_Utility.moveMultipleItemStacks(aSender, tInventory, (byte) 6, GT_Utility.getOppositeSide(aSide), null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1, 1) > 0; + if ((!(tInventory instanceof TileEntityHopper) && !(tInventory instanceof TileEntityDispenser)) + || getBaseMetaTileEntity().getMetaIDAtSide(aSide) != GT_Utility.getOppositeSide(aSide)) { + return GT_Utility.moveMultipleItemStacks( + aSender, + tInventory, + (byte) 6, + GT_Utility.getOppositeSide(aSide), + null, + false, + (byte) 64, + (byte) 1, + (byte) 64, + (byte) 1, + 1) + > 0; } } } @@ -333,10 +460,24 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE @Override public int[] getAccessibleSlotsFromSide(int aSide) { IGregTechTileEntity tTileEntity = getBaseMetaTileEntity(); - boolean tAllow = tTileEntity.getCoverBehaviorAtSideNew((byte) aSide).letsItemsIn((byte) aSide, tTileEntity.getCoverIDAtSide((byte) aSide), tTileEntity.getComplexCoverDataAtSide((byte) aSide), -2, tTileEntity) || tTileEntity.getCoverBehaviorAtSideNew((byte) aSide).letsItemsOut((byte) aSide, tTileEntity.getCoverIDAtSide((byte) aSide), tTileEntity.getComplexCoverDataAtSide((byte) aSide), -2, tTileEntity); + boolean tAllow = tTileEntity + .getCoverBehaviorAtSideNew((byte) aSide) + .letsItemsIn( + (byte) aSide, + tTileEntity.getCoverIDAtSide((byte) aSide), + tTileEntity.getComplexCoverDataAtSide((byte) aSide), + -2, + tTileEntity) + || tTileEntity + .getCoverBehaviorAtSideNew((byte) aSide) + .letsItemsOut( + (byte) aSide, + tTileEntity.getCoverIDAtSide((byte) aSide), + tTileEntity.getComplexCoverDataAtSide((byte) aSide), + -2, + tTileEntity); if (tAllow) { - if (cacheSides == null) - cacheSides = super.getAccessibleSlotsFromSide(aSide); + if (cacheSides == null) cacheSides = super.getAccessibleSlotsFromSide(aSide); return cacheSides; } else { return GT_Values.emptyIntArray; @@ -358,11 +499,20 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE @Override public String[] getDescription() { if (mTickTime == 20) - return new String[]{"Item Capacity: %%%" + getMaxPipeCapacity() + "%%% Stacks/sec", "Routing Value: %%%" + GT_Utility.formatNumbers(mStepSize)}; + return new String[] { + "Item Capacity: %%%" + getMaxPipeCapacity() + "%%% Stacks/sec", + "Routing Value: %%%" + GT_Utility.formatNumbers(mStepSize) + }; else if (mTickTime % 20 == 0) - return new String[]{"Item Capacity: %%%" + getMaxPipeCapacity() + "%%% Stacks/%%%" + (mTickTime / 20) + "%%% sec", "Routing Value: %%%" + GT_Utility.formatNumbers(mStepSize)}; + return new String[] { + "Item Capacity: %%%" + getMaxPipeCapacity() + "%%% Stacks/%%%" + (mTickTime / 20) + "%%% sec", + "Routing Value: %%%" + GT_Utility.formatNumbers(mStepSize) + }; else - return new String[]{"Item Capacity: %%%" + getMaxPipeCapacity() + "%%% Stacks/%%%" + mTickTime + "%%% ticks", "Routing Value: %%%" + GT_Utility.formatNumbers(mStepSize)}; + return new String[] { + "Item Capacity: %%%" + getMaxPipeCapacity() + "%%% Stacks/%%%" + mTickTime + "%%% ticks", + "Routing Value: %%%" + GT_Utility.formatNumbers(mStepSize) + }; } private boolean isInventoryEmpty() { @@ -380,8 +530,7 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x2) != 0) return AxisAlignedBB.getBoundingBox(aX, aY, aZ, aX + 1, aY + 1, aZ + 1); - else - return getActualCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); + else return getActualCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); } private AxisAlignedBB getActualCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { @@ -426,11 +575,19 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE if ((tConn & (1 << ForgeDirection.WEST.ordinal())) != 0) tSide4 = 0f; if ((tConn & (1 << ForgeDirection.EAST.ordinal())) != 0) tSide5 = 1f; - return AxisAlignedBB.getBoundingBox(aX + tSide4, aY + tSide0, aZ + tSide2, aX + tSide5, aY + tSide1, aZ + tSide3); + return AxisAlignedBB.getBoundingBox( + aX + tSide4, aY + tSide0, aZ + tSide2, aX + tSide5, aY + tSide1, aZ + tSide3); } @Override - public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List<AxisAlignedBB> outputAABB, Entity collider) { + public void addCollisionBoxesToList( + World aWorld, + int aX, + int aY, + int aZ, + AxisAlignedBB inputAABB, + List<AxisAlignedBB> outputAABB, + Entity collider) { super.addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider); if (GT_Mod.instance.isClientSide() && (GT_Client.hideValue & 0x2) != 0) { AxisAlignedBB aabb = getActualCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java index 1a81e4d570..67c3c672ae 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java @@ -1,5 +1,7 @@ package gregtech.api.metatileentity.implementations; +import static gregtech.api.enums.GT_Values.V; + import gregtech.api.enums.Textures; import gregtech.api.gui.*; import gregtech.api.interfaces.ITexture; @@ -15,8 +17,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; -import static gregtech.api.enums.GT_Values.V; - /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! * <p/> @@ -30,38 +30,54 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier private long mStored = 0; private long mMax = 0; - public GT_MetaTileEntity_BasicBatteryBuffer(int aID, String aName, String aNameRegional, int aTier, String aDescription, int aSlotCount) { + public GT_MetaTileEntity_BasicBatteryBuffer( + int aID, String aName, String aNameRegional, int aTier, String aDescription, int aSlotCount) { super(aID, aName, aNameRegional, aTier, aSlotCount, aDescription); } - public GT_MetaTileEntity_BasicBatteryBuffer(String aName, int aTier, String aDescription, ITexture[][][] aTextures, int aSlotCount) { + public GT_MetaTileEntity_BasicBatteryBuffer( + String aName, int aTier, String aDescription, ITexture[][][] aTextures, int aSlotCount) { super(aName, aTier, aSlotCount, aDescription, aTextures); } - public GT_MetaTileEntity_BasicBatteryBuffer(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, int aSlotCount) { + public GT_MetaTileEntity_BasicBatteryBuffer( + String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, int aSlotCount) { super(aName, aTier, aSlotCount, aDescription, aTextures); } @Override public String[] getDescription() { - String[] desc = new String[mDescriptionArray.length + 1]; - System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length); - desc[mDescriptionArray.length] = mInventory.length + " Slots"; - return desc; + String[] desc = new String[mDescriptionArray.length + 1]; + System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length); + desc[mDescriptionArray.length] = mInventory.length + " Slots"; + return desc; } @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[2][17][]; for (byte i = -1; i < 16; i++) { - rTextures[0][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1]}; - rTextures[1][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], mInventory.length==16 ? Textures.BlockIcons.OVERLAYS_ENERGY_OUT_POWER[mTier] : mInventory.length > 4 ? Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier] : Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier]}; + rTextures[0][i + 1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1]}; + rTextures[1][i + 1] = new ITexture[] { + Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], + mInventory.length == 16 + ? Textures.BlockIcons.OVERLAYS_ENERGY_OUT_POWER[mTier] + : mInventory.length > 4 + ? Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier] + : Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier] + }; } return rTextures; } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { return mTextures[aSide == aFacing ? 1 : 0][aColorIndex + 1]; } @@ -247,14 +263,15 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { if (GT_ModHandler.isElectricItem(aStack) && aStack.getUnlocalizedName().startsWith("gt.metaitem.01.")) { String name = aStack.getUnlocalizedName(); - if (name.equals("gt.metaitem.01.32510") || - name.equals("gt.metaitem.01.32511") || - name.equals("gt.metaitem.01.32520") || - name.equals("gt.metaitem.01.32521") || - name.equals("gt.metaitem.01.32530") || - name.equals("gt.metaitem.01.32531")) { - if(ic2.api.item.ElectricItem.manager.getCharge(aStack)==0){ - return true;} + if (name.equals("gt.metaitem.01.32510") + || name.equals("gt.metaitem.01.32511") + || name.equals("gt.metaitem.01.32520") + || name.equals("gt.metaitem.01.32521") + || name.equals("gt.metaitem.01.32530") + || name.equals("gt.metaitem.01.32531")) { + if (ic2.api.item.ElectricItem.manager.getCharge(aStack) == 0) { + return true; + } } } return false; @@ -265,7 +282,7 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier if (!GT_Utility.isStackValid(aStack)) { return false; } - if (mInventory[aIndex]==null && GT_ModHandler.isElectricItem(aStack, this.mTier)) { + if (mInventory[aIndex] == null && GT_ModHandler.isElectricItem(aStack, this.mTier)) { return true; } return false; @@ -277,8 +294,8 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier } public long[] getStoredEnergy() { - boolean scaleOverflow =false; - boolean storedOverflow = false; + boolean scaleOverflow = false; + boolean storedOverflow = false; long tScale = getBaseMetaTileEntity().getEUCapacity(); long tStored = getBaseMetaTileEntity().getStoredEU(); long tStep = 0; @@ -289,10 +306,14 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier if (aStack.getItem() instanceof GT_MetaBase_Item) { Long[] stats = ((GT_MetaBase_Item) aStack.getItem()).getElectricStats(aStack); if (stats != null) { - if(stats[0]>Long.MAX_VALUE/2){scaleOverflow=true;} + if (stats[0] > Long.MAX_VALUE / 2) { + scaleOverflow = true; + } tScale = tScale + stats[0]; tStep = ((GT_MetaBase_Item) aStack.getItem()).getRealCharge(aStack); - if(tStep > Long.MAX_VALUE/2){storedOverflow=true;} + if (tStep > Long.MAX_VALUE / 2) { + storedOverflow = true; + } tStored = tStored + tStep; } } else if (aStack.getItem() instanceof IElectricItem) { @@ -301,11 +322,14 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier } } } - } - if(scaleOverflow){tScale=Long.MAX_VALUE;} - if(storedOverflow){tStored=Long.MAX_VALUE;} - return new long[]{tStored, tScale}; + if (scaleOverflow) { + tScale = Long.MAX_VALUE; + } + if (storedOverflow) { + tStored = Long.MAX_VALUE; + } + return new long[] {tStored, tScale}; } @Override @@ -317,15 +341,16 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier count = 0; } - return new String[]{ - EnumChatFormatting.BLUE+getLocalName()+EnumChatFormatting.RESET, - "Stored Items:", - EnumChatFormatting.GREEN+GT_Utility.formatNumbers(mStored) +EnumChatFormatting.RESET+ " EU / "+ - EnumChatFormatting.YELLOW+GT_Utility.formatNumbers(mMax) +EnumChatFormatting.RESET+ " EU", - "Average input:", - GT_Utility.formatNumbers(getBaseMetaTileEntity().getAverageElectricInput())+" EU/t", - "Average output:", - GT_Utility.formatNumbers(getBaseMetaTileEntity().getAverageElectricOutput())+" EU/t"}; + return new String[] { + EnumChatFormatting.BLUE + getLocalName() + EnumChatFormatting.RESET, + "Stored Items:", + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mStored) + EnumChatFormatting.RESET + " EU / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(mMax) + EnumChatFormatting.RESET + " EU", + "Average input:", + GT_Utility.formatNumbers(getBaseMetaTileEntity().getAverageElectricInput()) + " EU/t", + "Average output:", + GT_Utility.formatNumbers(getBaseMetaTileEntity().getAverageElectricOutput()) + " EU/t" + }; } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java index 8a626460fb..091c364b4f 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java @@ -1,5 +1,7 @@ package gregtech.api.metatileentity.implementations; +import static gregtech.api.enums.GT_Values.V; + import gregtech.api.enums.ItemList; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.Textures; @@ -18,14 +20,14 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidContainerItem; import net.minecraftforge.fluids.IFluidHandler; -import static gregtech.api.enums.GT_Values.V; - public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity_BasicTank { - public GT_MetaTileEntity_BasicGenerator(int aID, String aName, String aNameRegional, int aTier, String aDescription, ITexture... aTextures) { + public GT_MetaTileEntity_BasicGenerator( + int aID, String aName, String aNameRegional, int aTier, String aDescription, ITexture... aTextures) { super(aID, aName, aNameRegional, aTier, 3, aDescription, aTextures); } - public GT_MetaTileEntity_BasicGenerator(int aID, String aName, String aNameRegional, int aTier, String[] aDescription, ITexture... aTextures) { + public GT_MetaTileEntity_BasicGenerator( + int aID, String aName, String aNameRegional, int aTier, String[] aDescription, ITexture... aTextures) { super(aID, aName, aNameRegional, aTier, 3, aDescription, aTextures); } @@ -56,8 +58,21 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { + return mTextures[ + (aActive ? 5 : 0) + + (aSide == aFacing + ? 0 + : aSide == GT_Utility.getOppositeSide(aFacing) + ? 1 + : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][ + aColorIndex + 1]; } @Override @@ -76,23 +91,23 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity } public ITexture[] getFront(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; } public ITexture[] getBack(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; } public ITexture[] getBottom(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; } public ITexture[] getTop(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; } public ITexture[] getSides(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; } public ITexture[] getFrontActive(byte aColor) { @@ -158,7 +173,7 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity @Override public boolean doesFillContainers() { return getBaseMetaTileEntity().isAllowedToWork(); - //return false; + // return false; } @Override @@ -193,7 +208,7 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity @Override public boolean isLiquidOutput(byte aSide) { - //return super.isLiquidOutput(aSide); + // return super.isLiquidOutput(aSide); return false; } @@ -206,39 +221,50 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity } else { if (mInventory[getStackDisplaySlot()] == null) mInventory[getStackDisplaySlot()] = new ItemStack(Blocks.fire, 1); - mInventory[getStackDisplaySlot()].setStackDisplayName("Draining internal buffer: " + GT_Utility.formatNumbers(aBaseMetaTileEntity.getUniversalEnergyStored() - getMinimumStoredEU()) + " EU"); + mInventory[getStackDisplaySlot()].setStackDisplayName("Draining internal buffer: " + + GT_Utility.formatNumbers( + aBaseMetaTileEntity.getUniversalEnergyStored() - getMinimumStoredEU()) + + " EU"); } } else { long tFuelValue = getFuelValue(mFluid), tConsumed = consumedFluidPerOperation(mFluid); if (tFuelValue > 0 && tConsumed > 0 && mFluid.amount >= tConsumed) { - long tFluidAmountToUse = Math.min(mFluid.amount / tConsumed, (maxEUStore() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue); - //long tFluidAmountToUse = Math.min(mFluid.amount / tConsumed, (maxEUOutput() * 20 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue);//TODO CHECK - if (tFluidAmountToUse > 0 && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)) { + long tFluidAmountToUse = Math.min( + mFluid.amount / tConsumed, + (maxEUStore() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue); + // long tFluidAmountToUse = Math.min(mFluid.amount / tConsumed, (maxEUOutput() * 20 + + // getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue);//TODO CHECK + if (tFluidAmountToUse > 0 + && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)) { // divided by two because this is called every 10 ticks, not 20 - GT_Pollution.addPollution(getBaseMetaTileEntity(),getPollution()/2); + GT_Pollution.addPollution(getBaseMetaTileEntity(), getPollution() / 2); mFluid.amount -= tFluidAmountToUse * tConsumed; } } } - if (mInventory[getInputSlot()] != null && aBaseMetaTileEntity.getUniversalEnergyStored() < (maxEUOutput() * 20 + getMinimumStoredEU()) && ((GT_Utility.getFluidForFilledItem(mInventory[getInputSlot()], true) != null) || solidFuelOverride(mInventory[getInputSlot()]))) { + if (mInventory[getInputSlot()] != null + && aBaseMetaTileEntity.getUniversalEnergyStored() < (maxEUOutput() * 20 + getMinimumStoredEU()) + && ((GT_Utility.getFluidForFilledItem(mInventory[getInputSlot()], true) != null) + || solidFuelOverride(mInventory[getInputSlot()]))) { long tFuelValue = getFuelValue(mInventory[getInputSlot()]); if (tFuelValue <= 0) tFuelValue = getFuelValue(mInventory[getInputSlot()], true); - //System.out.println(" tFuelValue : " + tFuelValue ); + // System.out.println(" tFuelValue : " + tFuelValue ); if (tFuelValue > 0) { ItemStack tEmptyContainer = getEmptyContainer(mInventory[getInputSlot()]); if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), tEmptyContainer)) { aBaseMetaTileEntity.increaseStoredEnergyUnits(tFuelValue, true); aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); // divided by two because this is called every 10 ticks, not 20 - GT_Pollution.addPollution(getBaseMetaTileEntity(),getPollution()/2); + GT_Pollution.addPollution(getBaseMetaTileEntity(), getPollution() / 2); } } } } if (aBaseMetaTileEntity.isServerSide()) - aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.getUniversalEnergyStored() >= maxEUOutput() + getMinimumStoredEU()); + aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() + && aBaseMetaTileEntity.getUniversalEnergyStored() >= maxEUOutput() + getMinimumStoredEU()); } /** @@ -246,18 +272,24 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity * @return if the stack is a solid fuel */ public boolean solidFuelOverride(ItemStack stack) { - //this could be used for a coal generator for example aswell... + // this could be used for a coal generator for example aswell... ItemData association = GT_OreDictUnificator.getAssociation(stack); - //if it is a gregtech Item, make sure its not a VOLUMETRIC_FLASK or any type of cell, else do vanilla checks + // if it is a gregtech Item, make sure its not a VOLUMETRIC_FLASK or any type of cell, else do vanilla checks if (association != null) { - return !OrePrefixes.CELL_TYPES.contains(association.mPrefix) && - !GT_Utility.areStacksEqual(ItemList.VOLUMETRIC_FLASK.get(1L), stack, true); + return !OrePrefixes.CELL_TYPES.contains(association.mPrefix) + && !GT_Utility.areStacksEqual(ItemList.VOLUMETRIC_FLASK.get(1L), stack, true); } else { - return stack != null && //when the stack is null its not a solid - stack.getItem() != null && //when the item in the stack is null its not a solid - !(stack.getItem() instanceof IFluidContainerItem) && //when the item is a fluid container its not a solid... - !(stack.getItem() instanceof IFluidHandler) && //when the item is a fluid handler its not a solid... - !stack.getItem().getUnlocalizedName().contains("bucket"); //since we cant really check for buckets... + return stack != null + && // when the stack is null its not a solid + stack.getItem() != null + && // when the item in the stack is null its not a solid + !(stack.getItem() instanceof IFluidContainerItem) + && // when the item is a fluid container its not a solid... + !(stack.getItem() instanceof IFluidHandler) + && // when the item is a fluid handler its not a solid... + !stack.getItem() + .getUnlocalizedName() + .contains("bucket"); // since we cant really check for buckets... } } @@ -309,7 +341,9 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack) && (getFuelValue(aStack, true) > 0 || getFuelValue(GT_Utility.getFluidForFilledItem(aStack, true), true) > 0); + return super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack) + && (getFuelValue(aStack, true) > 0 + || getFuelValue(GT_Utility.getFluidForFilledItem(aStack, true), true) > 0); } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull.java index f6535d2ddc..31420386ee 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull.java @@ -1,5 +1,7 @@ package gregtech.api.metatileentity.implementations; +import static gregtech.api.enums.GT_Values.V; + import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -7,22 +9,30 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import static gregtech.api.enums.GT_Values.V; - public class GT_MetaTileEntity_BasicHull extends GT_MetaTileEntity_BasicTank { - public GT_MetaTileEntity_BasicHull(int aID, String aName, String aNameRegional, int aTier, String aDescription, ITexture... aTextures) { + public GT_MetaTileEntity_BasicHull( + int aID, String aName, String aNameRegional, int aTier, String aDescription, ITexture... aTextures) { super(aID, aName, aNameRegional, aTier, 1, aDescription, aTextures); } - public GT_MetaTileEntity_BasicHull(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription, ITexture... aTextures) { + public GT_MetaTileEntity_BasicHull( + int aID, + String aName, + String aNameRegional, + int aTier, + int aInvSlotCount, + String aDescription, + ITexture... aTextures) { super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures); } - public GT_MetaTileEntity_BasicHull(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_BasicHull( + String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } - - public GT_MetaTileEntity_BasicHull(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + + public GT_MetaTileEntity_BasicHull( + String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @@ -107,7 +117,13 @@ public class GT_MetaTileEntity_BasicHull extends GT_MetaTileEntity_BasicTank { } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aConnected, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aConnected, + boolean aRedstone) { return mTextures[Math.min(2, aSide) + (aSide == aFacing ? 3 : 0)][aColorIndex + 1]; } @@ -115,12 +131,18 @@ public class GT_MetaTileEntity_BasicHull extends GT_MetaTileEntity_BasicTank { public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[6][17][]; for (byte i = -1; i < 16; i++) { - rTextures[0][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1]}; - rTextures[1][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1]}; - rTextures[2][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1]}; - rTextures[3][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier]}; - rTextures[4][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier]}; - rTextures[5][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier]}; + rTextures[0][i + 1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1]}; + rTextures[1][i + 1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1]}; + rTextures[2][i + 1] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1]}; + rTextures[3][i + 1] = new ITexture[] { + Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier] + }; + rTextures[4][i + 1] = new ITexture[] { + Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier] + }; + rTextures[5][i + 1] = new ITexture[] { + Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier] + }; } return rTextures; } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull_NonElectric.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull_NonElectric.java index 54fe2b32a6..716d9d2c12 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull_NonElectric.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull_NonElectric.java @@ -4,20 +4,29 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; public abstract class GT_MetaTileEntity_BasicHull_NonElectric extends GT_MetaTileEntity_BasicHull { - public GT_MetaTileEntity_BasicHull_NonElectric(int aID, String aName, String aNameRegional, int aTier, String aDescription) { + public GT_MetaTileEntity_BasicHull_NonElectric( + int aID, String aName, String aNameRegional, int aTier, String aDescription) { super(aID, aName, aNameRegional, aTier, aDescription); } - public GT_MetaTileEntity_BasicHull_NonElectric(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_BasicHull_NonElectric( + String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, 1, aDescription, aTextures); } - public GT_MetaTileEntity_BasicHull_NonElectric(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_BasicHull_NonElectric( + String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, 1, aDescription, aTextures); } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aConnections, + byte aColorIndex, + boolean aConnected, + boolean aRedstone) { return mTextures[Math.min(2, aSide)][aColorIndex + 1]; } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java index ce5c1b9ee4..25c7c2991e 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java @@ -1,5 +1,11 @@ package gregtech.api.metatileentity.implementations; +import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.GT_Values.debugCleanroom; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_OUT; +import static gregtech.api.util.GT_Utility.moveMultipleItemStacks; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; @@ -16,6 +22,8 @@ import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.common.power.BasicMachineEUPower; import gregtech.common.power.Power; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_Cleanroom; +import java.util.Arrays; +import java.util.List; import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; import net.minecraft.entity.player.EntityPlayer; @@ -32,34 +40,32 @@ import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; -import java.util.Arrays; -import java.util.List; - -import static gregtech.api.enums.GT_Values.V; -import static gregtech.api.enums.GT_Values.debugCleanroom; -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_OUT; -import static gregtech.api.util.GT_Utility.moveMultipleItemStacks; - /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! * <p/> * This is the main construct for my Basic Machines such as the Automatic Extractor * Extend this class to make a simple Machine */ -public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_BasicTank implements IConfigurationCircuitSupport { +public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_BasicTank + implements IConfigurationCircuitSupport { /** * return values for checkRecipe() */ - protected static final int - DID_NOT_FIND_RECIPE = 0, + protected static final int DID_NOT_FIND_RECIPE = 0, FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS = 1, FOUND_AND_SUCCESSFULLY_USED_RECIPE = 2; + public static final int OTHER_SLOT_COUNT = 5; public final ItemStack[] mOutputItems; public final int mInputSlotCount, mAmperage; - public boolean mAllowInputFromOutputSide = false, mFluidTransfer = false, mItemTransfer = false, mHasBeenUpdated = false, mStuttering = false, mCharge = false, mDecharge = false; + public boolean mAllowInputFromOutputSide = false, + mFluidTransfer = false, + mItemTransfer = false, + mHasBeenUpdated = false, + mStuttering = false, + mCharge = false, + mDecharge = false; public boolean mDisableFilter = true; public boolean mDisableMultiStack = true; public int mMainFacing = -1, mProgresstime = 0, mMaxProgresstime = 0, mEUt = 0, mOutputBlocked = 0; @@ -71,6 +77,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B * Contains the Recipe which has been previously used, or null if there was no previous Recipe, which could have been buffered */ protected GT_Recipe mLastRecipe = null; + private FluidStack mFluidOut; /** @@ -90,8 +97,26 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B * 12 = SideFacingPipeActive * 13 = SideFacingPipeInactive */ - public GT_MetaTileEntity_BasicMachine(int aID, String aName, String aNameRegional, int aTier, int aAmperage, String aDescription, int aInputSlotCount, int aOutputSlotCount, String aGUIName, String aNEIName, ITexture... aOverlays) { - super(aID, aName, aNameRegional, aTier, OTHER_SLOT_COUNT + aInputSlotCount + aOutputSlotCount + 1, aDescription, aOverlays); + public GT_MetaTileEntity_BasicMachine( + int aID, + String aName, + String aNameRegional, + int aTier, + int aAmperage, + String aDescription, + int aInputSlotCount, + int aOutputSlotCount, + String aGUIName, + String aNEIName, + ITexture... aOverlays) { + super( + aID, + aName, + aNameRegional, + aTier, + OTHER_SLOT_COUNT + aInputSlotCount + aOutputSlotCount + 1, + aDescription, + aOverlays); mInputSlotCount = Math.max(0, aInputSlotCount); mOutputItems = new ItemStack[Math.max(0, aOutputSlotCount)]; mAmperage = aAmperage; @@ -100,8 +125,26 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B mPower = buildPower(); } - public GT_MetaTileEntity_BasicMachine(int aID, String aName, String aNameRegional, int aTier, int aAmperage, String[] aDescription, int aInputSlotCount, int aOutputSlotCount, String aGUIName, String aNEIName, ITexture... aOverlays) { - super(aID, aName, aNameRegional, aTier, OTHER_SLOT_COUNT + aInputSlotCount + aOutputSlotCount + 1, aDescription, aOverlays); + public GT_MetaTileEntity_BasicMachine( + int aID, + String aName, + String aNameRegional, + int aTier, + int aAmperage, + String[] aDescription, + int aInputSlotCount, + int aOutputSlotCount, + String aGUIName, + String aNEIName, + ITexture... aOverlays) { + super( + aID, + aName, + aNameRegional, + aTier, + OTHER_SLOT_COUNT + aInputSlotCount + aOutputSlotCount + 1, + aDescription, + aOverlays); mInputSlotCount = Math.max(0, aInputSlotCount); mOutputItems = new ItemStack[Math.max(0, aOutputSlotCount)]; mAmperage = aAmperage; @@ -109,7 +152,17 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B mNEIName = aNEIName; mPower = buildPower(); } - public GT_MetaTileEntity_BasicMachine(String aName, int aTier, int aAmperage, String aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, String aGUIName, String aNEIName) { + + public GT_MetaTileEntity_BasicMachine( + String aName, + int aTier, + int aAmperage, + String aDescription, + ITexture[][][] aTextures, + int aInputSlotCount, + int aOutputSlotCount, + String aGUIName, + String aNEIName) { super(aName, aTier, OTHER_SLOT_COUNT + aInputSlotCount + aOutputSlotCount + 1, aDescription, aTextures); mInputSlotCount = Math.max(0, aInputSlotCount); mOutputItems = new ItemStack[Math.max(0, aOutputSlotCount)]; @@ -119,7 +172,16 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B mPower = buildPower(); } - public GT_MetaTileEntity_BasicMachine(String aName, int aTier, int aAmperage, String[] aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, String aGUIName, String aNEIName) { + public GT_MetaTileEntity_BasicMachine( + String aName, + int aTier, + int aAmperage, + String[] aDescription, + ITexture[][][] aTextures, + int aInputSlotCount, + int aOutputSlotCount, + String aGUIName, + String aNEIName) { super(aName, aTier, OTHER_SLOT_COUNT + aInputSlotCount + aOutputSlotCount + 1, aDescription, aTextures); mInputSlotCount = Math.max(0, aInputSlotCount); mOutputItems = new ItemStack[Math.max(0, aOutputSlotCount)]; @@ -137,18 +199,18 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B } protected boolean isValidMainFacing(byte aSide) { - return aSide > 1; + return aSide > 1; } - public boolean setMainFacing(byte aSide){ - if (!isValidMainFacing(aSide)) return false; - mMainFacing = aSide; - if(getBaseMetaTileEntity().getFrontFacing() == mMainFacing){ - getBaseMetaTileEntity().setFrontFacing(GT_Utility.getOppositeSide(aSide)); - } + public boolean setMainFacing(byte aSide) { + if (!isValidMainFacing(aSide)) return false; + mMainFacing = aSide; + if (getBaseMetaTileEntity().getFrontFacing() == mMainFacing) { + getBaseMetaTileEntity().setFrontFacing(GT_Utility.getOppositeSide(aSide)); + } onFacingChange(); onMachineBlockUpdate(); - return true; + return true; } @Override @@ -157,10 +219,11 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B aTextures = Arrays.copyOf(aTextures, 14); for (int i = 0; i < aTextures.length; i++) - if (aTextures[i] != null) for (byte c = -1; c < 16; c++) { - if (rTextures[i][c + 1] == null) - rTextures[i][c + 1] = new ITexture[]{MACHINE_CASINGS[mTier][c + 1], aTextures[i]}; - } + if (aTextures[i] != null) + for (byte c = -1; c < 16; c++) { + if (rTextures[i][c + 1] == null) + rTextures[i][c + 1] = new ITexture[] {MACHINE_CASINGS[mTier][c + 1], aTextures[i]}; + } for (byte c = -1; c < 16; c++) { if (rTextures[0][c + 1] == null) rTextures[0][c + 1] = getSideFacingActive(c); @@ -182,8 +245,28 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return mTextures[mMainFacing < 2 ? aSide == aFacing ? aActive ? 2 : 3 : aSide == 0 ? aActive ? 6 : 7 : aSide == 1 ? aActive ? 4 : 5 : aActive ? 0 : 1 : aSide == mMainFacing ? aActive ? 2 : 3 : (showPipeFacing() && aSide == aFacing) ? aSide == 0 ? aActive ? 8 : 9 : aSide == 1 ? aActive ? 10 : 11 : aActive ? 12 : 13 : aSide == 0 ? aActive ? 6 : 7 : aSide == 1 ? aActive ? 4 : 5 : aActive ? 0 : 1][aColorIndex + 1]; + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { + return mTextures[ + mMainFacing < 2 + ? aSide == aFacing + ? aActive ? 2 : 3 + : aSide == 0 ? aActive ? 6 : 7 : aSide == 1 ? aActive ? 4 : 5 : aActive ? 0 : 1 + : aSide == mMainFacing + ? aActive ? 2 : 3 + : (showPipeFacing() && aSide == aFacing) + ? aSide == 0 + ? aActive ? 8 : 9 + : aSide == 1 ? aActive ? 10 : 11 : aActive ? 12 : 13 + : aSide == 0 + ? aActive ? 6 : 7 + : aSide == 1 ? aActive ? 4 : 5 : aActive ? 0 : 1][ + aColorIndex + 1]; } @Override @@ -208,7 +291,10 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B @Override public boolean isValidSlot(int aIndex) { - return aIndex > 0 && super.isValidSlot(aIndex) && aIndex != getCircuitSlot() && aIndex != OTHER_SLOT_COUNT + mInputSlotCount + mOutputItems.length; + return aIndex > 0 + && super.isValidSlot(aIndex) + && aIndex != getCircuitSlot() + && aIndex != OTHER_SLOT_COUNT + mInputSlotCount + mOutputItems.length; } @Override @@ -238,7 +324,9 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B @Override public boolean isLiquidInput(byte aSide) { - return aSide != mMainFacing && (mAllowInputFromOutputSide || aSide != getBaseMetaTileEntity().getFrontFacing()); + return aSide != mMainFacing + && (mAllowInputFromOutputSide + || aSide != getBaseMetaTileEntity().getFrontFacing()); } @Override @@ -268,7 +356,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B @Override public long maxAmperesIn() { - return ((long)mEUt * 2L) / V[mTier] + 1L; + return ((long) mEUt * 2L) / V[mTier] + 1L; } @Override @@ -329,7 +417,8 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B @Override public boolean isFluidInputAllowed(FluidStack aFluid) { - return getFillableStack() != null || (getRecipeList() != null && getRecipeList().containsInput(aFluid)); + return getFillableStack() != null + || (getRecipeList() != null && getRecipeList().containsInput(aFluid)); } @Override @@ -392,17 +481,17 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B @Override public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { if (aBaseMetaTileEntity.isClientSide()) return true; - if(!GT_Mod.gregtechproxy.mForceFreeFace) { - aBaseMetaTileEntity.openGUI(aPlayer); - return true; + if (!GT_Mod.gregtechproxy.mForceFreeFace) { + aBaseMetaTileEntity.openGUI(aPlayer); + return true; } - for(byte i=0;i < 6; i++){ - if(aBaseMetaTileEntity.getAirAtSide(i)){ - aBaseMetaTileEntity.openGUI(aPlayer); - return true; - } + for (byte i = 0; i < 6; i++) { + if (aBaseMetaTileEntity.getAirAtSide(i)) { + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } } - GT_Utility.sendChatToPlayer(aPlayer,"No free Side!"); + GT_Utility.sendChatToPlayer(aPlayer, "No free Side!"); return true; } @@ -413,14 +502,22 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), mGUIName, GT_Utility.isStringValid(mNEIName) ? mNEIName : getRecipeList() != null ? getRecipeList().mUnlocalizedName : ""); + return new GT_GUIContainer_BasicMachine( + aPlayerInventory, + aBaseMetaTileEntity, + getLocalName(), + mGUIName, + GT_Utility.isStringValid(mNEIName) + ? mNEIName + : getRecipeList() != null ? getRecipeList().mUnlocalizedName : ""); } @Override public void initDefaultModes(NBTTagCompound aNBT) { mMainFacing = -1; if (!getBaseMetaTileEntity().getWorld().isRemote) { - GT_ClientPreference tPreference = GT_Mod.gregtechproxy.getClientPreference(getBaseMetaTileEntity().getOwnerUuid()); + GT_ClientPreference tPreference = GT_Mod.gregtechproxy.getClientPreference( + getBaseMetaTileEntity().getOwnerUuid()); if (tPreference != null) { mDisableFilter = !tPreference.isSingleBlockInitialFilterEnabled(); mDisableMultiStack = !tPreference.isSingleBlockInitialMultiStackEnabled(); @@ -487,8 +584,8 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B if (++mProgresstime >= mMaxProgresstime) { for (int i = 0; i < mOutputItems.length; i++) for (int j = 0; j < mOutputItems.length; j++) - if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot() + ((j + i) % mOutputItems.length), mOutputItems[i])) - break; + if (aBaseMetaTileEntity.addStackToSlot( + getOutputSlot() + ((j + i) % mOutputItems.length), mOutputItems[i])) break; if (mOutputFluid != null) if (getDrainableStack() == null) setDrainableStack(mOutputFluid.copy()); else if (mOutputFluid.isFluidEqual(getDrainableStack())) @@ -503,8 +600,11 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B endProcess(); } if (mProgresstime > 5) mStuttering = false; - //XSTR aXSTR = new XSTR(); - //if(GT_Mod.gregtechproxy.mAprilFool && aXSTR.nextInt(5000)==0)GT_Utility.sendSoundToPlayers(aBaseMetaTileEntity.getWorld(), GregTech_API.sSoundList.get(5), 10.0F, -1.0F, aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(),aBaseMetaTileEntity.getZCoord()); + // XSTR aXSTR = new XSTR(); + // if(GT_Mod.gregtechproxy.mAprilFool && + // aXSTR.nextInt(5000)==0)GT_Utility.sendSoundToPlayers(aBaseMetaTileEntity.getWorld(), + // GregTech_API.sSoundList.get(5), 10.0F, -1.0F, aBaseMetaTileEntity.getXCoord(), + // aBaseMetaTileEntity.getYCoord(),aBaseMetaTileEntity.getZCoord()); } else { if (!mStuttering) { stutterProcess(); @@ -518,38 +618,72 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B boolean tRemovedOutputFluid = false; - if (doesAutoOutputFluids() && getDrainableStack() != null && aBaseMetaTileEntity.getFrontFacing() != mMainFacing && (tSucceeded || aTick % 20 == 0)) { + if (doesAutoOutputFluids() + && getDrainableStack() != null + && aBaseMetaTileEntity.getFrontFacing() != mMainFacing + && (tSucceeded || aTick % 20 == 0)) { IFluidHandler tTank = aBaseMetaTileEntity.getITankContainerAtSide(aBaseMetaTileEntity.getFrontFacing()); if (tTank != null) { FluidStack tDrained = drain(1000, false); if (tDrained != null) { - int tFilledAmount = tTank.fill(ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), tDrained, false); + int tFilledAmount = tTank.fill( + ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), tDrained, false); if (tFilledAmount > 0) - tTank.fill(ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), drain(tFilledAmount, true), true); + tTank.fill( + ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), + drain(tFilledAmount, true), + true); } } if (getDrainableStack() == null) tRemovedOutputFluid = true; } - if (doesAutoOutput() && !isOutputEmpty() && aBaseMetaTileEntity.getFrontFacing() != mMainFacing && (tSucceeded || mOutputBlocked % 300 == 1 || aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0)) { + if (doesAutoOutput() + && !isOutputEmpty() + && aBaseMetaTileEntity.getFrontFacing() != mMainFacing + && (tSucceeded + || mOutputBlocked % 300 == 1 + || aBaseMetaTileEntity.hasInventoryBeenModified() + || aTick % 600 == 0)) { TileEntity tTileEntity2 = aBaseMetaTileEntity.getTileEntityAtSide(aBaseMetaTileEntity.getFrontFacing()); long tStoredEnergy = aBaseMetaTileEntity.getUniversalEnergyStored(); - int tMaxStacks = (int)(tStoredEnergy/64L); - if (tMaxStacks > mOutputItems.length) - tMaxStacks = mOutputItems.length; - - moveMultipleItemStacks(aBaseMetaTileEntity, tTileEntity2, aBaseMetaTileEntity.getFrontFacing(), aBaseMetaTileEntity.getBackFacing(), null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1,tMaxStacks); -// for (int i = 0, tCosts = 1; i < mOutputItems.length && tCosts > 0 && aBaseMetaTileEntity.isUniversalEnergyStored(128); i++) { -// tCosts = GT_Utility.moveOneItemStack(aBaseMetaTileEntity, tTileEntity2, aBaseMetaTileEntity.getFrontFacing(), aBaseMetaTileEntity.getBackFacing(), null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1); -// if (tCosts > 0) aBaseMetaTileEntity.decreaseStoredEnergyUnits(tCosts, true); -// } + int tMaxStacks = (int) (tStoredEnergy / 64L); + if (tMaxStacks > mOutputItems.length) tMaxStacks = mOutputItems.length; + + moveMultipleItemStacks( + aBaseMetaTileEntity, + tTileEntity2, + aBaseMetaTileEntity.getFrontFacing(), + aBaseMetaTileEntity.getBackFacing(), + null, + false, + (byte) 64, + (byte) 1, + (byte) 64, + (byte) 1, + tMaxStacks); + // for (int i = 0, tCosts = 1; i < mOutputItems.length && tCosts > 0 && + // aBaseMetaTileEntity.isUniversalEnergyStored(128); i++) { + // tCosts = GT_Utility.moveOneItemStack(aBaseMetaTileEntity, tTileEntity2, + // aBaseMetaTileEntity.getFrontFacing(), aBaseMetaTileEntity.getBackFacing(), null, false, (byte) 64, + // (byte) 1, (byte) 64, (byte) 1); + // if (tCosts > 0) aBaseMetaTileEntity.decreaseStoredEnergyUnits(tCosts, true); + // } } - if (mOutputBlocked != 0) if (isOutputEmpty()) mOutputBlocked = 0; - else mOutputBlocked++; + if (mOutputBlocked != 0) + if (isOutputEmpty()) mOutputBlocked = 0; + else mOutputBlocked++; if (allowToCheckRecipe()) { - if (mMaxProgresstime <= 0 && aBaseMetaTileEntity.isAllowedToWork() && (tRemovedOutputFluid || tSucceeded || aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) && hasEnoughEnergyToCheckRecipe()) { + if (mMaxProgresstime <= 0 + && aBaseMetaTileEntity.isAllowedToWork() + && (tRemovedOutputFluid + || tSucceeded + || aBaseMetaTileEntity.hasInventoryBeenModified() + || aTick % 600 == 0 + || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) + && hasEnoughEnergyToCheckRecipe()) { if (checkRecipe() == FOUND_AND_SUCCESSFULLY_USED_RECIPE) { if (mInventory[3] != null && mInventory[3].stackSize <= 0) mInventory[3] = null; for (int i = getInputSlot(), j = i + mInputSlotCount; i < j; i++) @@ -584,7 +718,8 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B // Value | Class | Field // 1 | GT_MetaTileEntity_BasicMachine | mStuttering // 64 | GT_MetaTileEntity_BasicMachine_Bronze | mNeedsSteamVenting - aBaseMetaTileEntity.setErrorDisplayID((aBaseMetaTileEntity.getErrorDisplayID() & ~127));// | (mStuttering ? 1 : 0)); + aBaseMetaTileEntity.setErrorDisplayID( + (aBaseMetaTileEntity.getErrorDisplayID() & ~127)); // | (mStuttering ? 1 : 0)); } protected void doDisplayThings() { @@ -606,7 +741,8 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B if (ItemList.Display_Fluid.isStackEqual(mInventory[tDisplayStackSlot], true, true)) mInventory[tDisplayStackSlot] = null; } else { - mInventory[tDisplayStackSlot] = GT_Utility.getFluidDisplayStack(getFillableStack(), true, !displaysStackSize()); + mInventory[tDisplayStackSlot] = + GT_Utility.getFluidDisplayStack(getFillableStack(), true, !displaysStackSize()); } } } @@ -649,14 +785,20 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B } protected boolean canOutput(GT_Recipe aRecipe) { - return aRecipe != null && (aRecipe.mNeedsEmptyOutput ? isOutputEmpty() && getDrainableStack() == null : canOutput(aRecipe.getFluidOutput(0)) && canOutput(aRecipe.mOutputs)); + return aRecipe != null + && (aRecipe.mNeedsEmptyOutput + ? isOutputEmpty() && getDrainableStack() == null + : canOutput(aRecipe.getFluidOutput(0)) && canOutput(aRecipe.mOutputs)); } protected boolean canOutput(ItemStack... aOutputs) { if (aOutputs == null) return true; ItemStack[] tOutputSlots = getAllOutputs(); for (int i = 0; i < tOutputSlots.length && i < aOutputs.length; i++) - if (tOutputSlots[i] != null && aOutputs[i] != null && (!GT_Utility.areStacksEqual(tOutputSlots[i], aOutputs[i], false) || tOutputSlots[i].stackSize + aOutputs[i].stackSize > tOutputSlots[i].getMaxStackSize())) { + if (tOutputSlots[i] != null + && aOutputs[i] != null + && (!GT_Utility.areStacksEqual(tOutputSlots[i], aOutputs[i], false) + || tOutputSlots[i].stackSize + aOutputs[i].stackSize > tOutputSlots[i].getMaxStackSize())) { mOutputBlocked++; return false; } @@ -664,7 +806,11 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B } protected boolean canOutput(FluidStack aOutput) { - return getDrainableStack() == null || aOutput == null || (getDrainableStack().isFluidEqual(aOutput) && (getDrainableStack().amount <= 0 || getDrainableStack().amount + aOutput.amount <= getCapacity())); + return getDrainableStack() == null + || aOutput == null + || (getDrainableStack().isFluidEqual(aOutput) + && (getDrainableStack().amount <= 0 + || getDrainableStack().amount + aOutput.amount <= getCapacity())); } protected ItemStack getInputAt(int aIndex) { @@ -675,8 +821,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B int tRealInputSlotCount = this.mInputSlotCount + (allowSelectCircuit() ? 1 : 0); ItemStack[] rInputs = new ItemStack[tRealInputSlotCount]; for (int i = 0; i < mInputSlotCount; i++) rInputs[i] = getInputAt(i); - if (allowSelectCircuit()) - rInputs[mInputSlotCount] = getStackInSlot(getCircuitSlot()); + if (allowSelectCircuit()) rInputs[mInputSlotCount] = getStackInSlot(getCircuitSlot()); return rInputs; } @@ -771,17 +916,21 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B @Override public String[] getInfoData() { - return new String[]{ - EnumChatFormatting.BLUE + mNEIName + EnumChatFormatting.RESET, - "Progress:", - EnumChatFormatting.GREEN + GT_Utility.formatNumbers((mProgresstime/20)) + EnumChatFormatting.RESET +" s / " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(mMaxProgresstime / 20) + EnumChatFormatting.RESET + " s", - "Stored Energy:", - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(getBaseMetaTileEntity().getStoredEU()) + EnumChatFormatting.RESET + " EU / " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(getBaseMetaTileEntity().getEUCapacity()) + EnumChatFormatting.RESET + " EU", - "Probably uses: " + - EnumChatFormatting.RED + GT_Utility.formatNumbers(mEUt) + EnumChatFormatting.RESET + " EU/t at " + - EnumChatFormatting.RED + GT_Utility.formatNumbers(mEUt == 0 ? 0 : mAmperage) + EnumChatFormatting.RESET +" A" + return new String[] { + EnumChatFormatting.BLUE + mNEIName + EnumChatFormatting.RESET, + "Progress:", + EnumChatFormatting.GREEN + GT_Utility.formatNumbers((mProgresstime / 20)) + EnumChatFormatting.RESET + + " s / " + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(mMaxProgresstime / 20) + + EnumChatFormatting.RESET + " s", + "Stored Energy:", + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(getBaseMetaTileEntity().getStoredEU()) + EnumChatFormatting.RESET + + " EU / " + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(getBaseMetaTileEntity().getEUCapacity()) + EnumChatFormatting.RESET + + " EU", + "Probably uses: " + EnumChatFormatting.RED + + GT_Utility.formatNumbers(mEUt) + EnumChatFormatting.RESET + " EU/t at " + EnumChatFormatting.RED + + GT_Utility.formatNumbers(mEUt == 0 ? 0 : mAmperage) + EnumChatFormatting.RESET + " A" }; } @@ -793,24 +942,31 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aSide == getBaseMetaTileEntity().getFrontFacing() || aSide == mMainFacing) { - if (aPlayer.isSneaking()){ + if (aPlayer.isSneaking()) { mDisableFilter = !mDisableFilter; - GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("GT5U.hatch.disableFilter." + mDisableFilter)); + GT_Utility.sendChatToPlayer( + aPlayer, StatCollector.translateToLocal("GT5U.hatch.disableFilter." + mDisableFilter)); } else { mAllowInputFromOutputSide = !mAllowInputFromOutputSide; - GT_Utility.sendChatToPlayer(aPlayer, mAllowInputFromOutputSide ? GT_Utility.trans("095", "Input from Output Side allowed") : GT_Utility.trans("096", "Input from Output Side forbidden")); + GT_Utility.sendChatToPlayer( + aPlayer, + mAllowInputFromOutputSide + ? GT_Utility.trans("095", "Input from Output Side allowed") + : GT_Utility.trans("096", "Input from Output Side forbidden")); } } } @Override - public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if(!aPlayer.isSneaking()) return false; + public boolean onSolderingToolRightClick( + byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (!aPlayer.isSneaking()) return false; boolean click = super.onSolderingToolRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ); if (click) return true; if (aWrenchingSide != mMainFacing) return false; mDisableMultiStack = !mDisableMultiStack; - GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("GT5U.hatch.disableMultiStack." + mDisableMultiStack)); + GT_Utility.sendChatToPlayer( + aPlayer, StatCollector.translateToLocal("GT5U.hatch.disableMultiStack." + mDisableMultiStack)); return true; } @@ -818,7 +974,12 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) { if (aSide != mMainFacing) return true; GT_CoverBehaviorBase<?> tBehavior = GregTech_API.getCoverBehaviorNew(aCoverID.toStack()); - return tBehavior.isGUIClickable(aSide, GT_Utility.stackToInt(aCoverID.toStack()), tBehavior.createDataObject(), getBaseMetaTileEntity());} + return tBehavior.isGUIClickable( + aSide, + GT_Utility.stackToInt(aCoverID.toStack()), + tBehavior.createDataObject(), + getBaseMetaTileEntity()); + } @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { @@ -827,10 +988,13 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - if (aSide == mMainFacing || aIndex < getInputSlot() || aIndex >= getInputSlot() + mInputSlotCount || (!mAllowInputFromOutputSide && aSide == aBaseMetaTileEntity.getFrontFacing())) - return false; + if (aSide == mMainFacing + || aIndex < getInputSlot() + || aIndex >= getInputSlot() + mInputSlotCount + || (!mAllowInputFromOutputSide && aSide == aBaseMetaTileEntity.getFrontFacing())) return false; for (int i = getInputSlot(), j = i + mInputSlotCount; i < j; i++) - if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(aStack), mInventory[i]) && mDisableMultiStack) return i == aIndex; + if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(aStack), mInventory[i]) && mDisableMultiStack) + return i == aIndex; return mDisableFilter || allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack); } @@ -839,7 +1003,8 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B * If mDisableMultiStack is false, before execution of this method it is ensured there is no such kind of item inside any input slots already. * Otherwise, you don't need to check for it anyway. */ - protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + protected boolean allowPutStackValidated( + IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return !mDisableMultiStack || mInventory[aIndex] == null; } @@ -866,7 +1031,9 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B } @Override - public int getCircuitGUISlot() { return 3; } + public int getCircuitGUISlot() { + return 3; + } @Override public List<ItemStack> getConfigurationCircuits() { @@ -893,16 +1060,15 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B return checkRecipe(false); } - public static boolean isValidForLowGravity(GT_Recipe tRecipe, int dimId){ - return //TODO check or get a better solution - DimensionManager.getProvider(dimId).getClass().getName().contains("Orbit") || - DimensionManager.getProvider(dimId).getClass().getName().endsWith("Space") || - DimensionManager.getProvider(dimId).getClass().getName().endsWith("Asteroids") || - DimensionManager.getProvider(dimId).getClass().getName().endsWith("SS") || - DimensionManager.getProvider(dimId).getClass().getName().contains("SpaceStation"); + public static boolean isValidForLowGravity(GT_Recipe tRecipe, int dimId) { + return // TODO check or get a better solution + DimensionManager.getProvider(dimId).getClass().getName().contains("Orbit") + || DimensionManager.getProvider(dimId).getClass().getName().endsWith("Space") + || DimensionManager.getProvider(dimId).getClass().getName().endsWith("Asteroids") + || DimensionManager.getProvider(dimId).getClass().getName().endsWith("SS") + || DimensionManager.getProvider(dimId).getClass().getName().contains("SpaceStation"); } - /** * * @param skipOC disables OverclockedNess calculation and check - if you do you must implement your own method... @@ -910,43 +1076,53 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B * FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS = 1, * FOUND_AND_SUCCESSFULLY_USED_RECIPE = 2; */ - public int checkRecipe(boolean skipOC){ + public int checkRecipe(boolean skipOC) { GT_Recipe_Map tMap = getRecipeList(); if (tMap == null) return DID_NOT_FIND_RECIPE; - GT_Recipe tRecipe = tMap.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[mTier], new FluidStack[]{getFillableStack()}, getSpecialSlot(), getAllInputs()); + GT_Recipe tRecipe = tMap.findRecipe( + getBaseMetaTileEntity(), + mLastRecipe, + false, + V[mTier], + new FluidStack[] {getFillableStack()}, + getSpecialSlot(), + getAllInputs()); if (tRecipe == null) return DID_NOT_FIND_RECIPE; - if (GT_Mod.gregtechproxy.mLowGravProcessing && (tRecipe.mSpecialValue == -100 || tRecipe.mSpecialValue == -300) && - !isValidForLowGravity(tRecipe,getBaseMetaTileEntity().getWorld().provider.dimensionId)) + if (GT_Mod.gregtechproxy.mLowGravProcessing + && (tRecipe.mSpecialValue == -100 || tRecipe.mSpecialValue == -300) + && !isValidForLowGravity(tRecipe, getBaseMetaTileEntity().getWorld().provider.dimensionId)) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; if (tRecipe.mCanBeBuffered) mLastRecipe = tRecipe; if (!canOutput(tRecipe)) { mOutputBlocked++; return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; } - if (tRecipe.mSpecialValue == -200 && (getCallbackBase() == null || !(getCallbackBase() instanceof GT_MetaTileEntity_Cleanroom) || ((GT_MetaTileEntity_Cleanroom) getCallbackBase()).mEfficiency == 0)) + if (tRecipe.mSpecialValue == -200 + && (getCallbackBase() == null + || !(getCallbackBase() instanceof GT_MetaTileEntity_Cleanroom) + || ((GT_MetaTileEntity_Cleanroom) getCallbackBase()).mEfficiency == 0)) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; - if (!tRecipe.isRecipeInputEqual(true, new FluidStack[]{getFillableStack()}, getAllInputs())) + if (!tRecipe.isRecipeInputEqual(true, new FluidStack[] {getFillableStack()}, getAllInputs())) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; for (int i = 0; i < mOutputItems.length; i++) if (getBaseMetaTileEntity().getRandomNumber(10000) < tRecipe.getOutputChance(i)) mOutputItems[i] = tRecipe.getOutput(i); if (tRecipe.mSpecialValue == -200 || tRecipe.mSpecialValue == -300) for (int i = 0; i < mOutputItems.length; i++) - if (mOutputItems[i] != null && getBaseMetaTileEntity().getRandomNumber(10000) > ((GT_MetaTileEntity_Cleanroom) getCallbackBase()).mEfficiency) - { - if (debugCleanroom) { - GT_Log.out.println( - "BasicMachine: Voiding output due to efficiency failure. mEfficiency = " + - ((GT_MetaTileEntity_Cleanroom) getCallbackBase()).mEfficiency - ); - } + if (mOutputItems[i] != null + && getBaseMetaTileEntity().getRandomNumber(10000) + > ((GT_MetaTileEntity_Cleanroom) getCallbackBase()).mEfficiency) { + if (debugCleanroom) { + GT_Log.out.println("BasicMachine: Voiding output due to efficiency failure. mEfficiency = " + + ((GT_MetaTileEntity_Cleanroom) getCallbackBase()).mEfficiency); + } mOutputItems[i] = null; } mOutputFluid = tRecipe.getFluidOutput(0); - if(!skipOC){ + if (!skipOC) { calculateOverclockedNess(tRecipe); - //In case recipe is too OP for that machine + // In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; } @@ -954,75 +1130,79 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B } public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1]}; + return new ITexture[] {MACHINE_CASINGS[mTier][aColor + 1]}; } public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1]}; + return new ITexture[] {MACHINE_CASINGS[mTier][aColor + 1]}; } public ITexture[] getFrontFacingActive(byte aColor) { - return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1]}; + return new ITexture[] {MACHINE_CASINGS[mTier][aColor + 1]}; } public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1]}; + return new ITexture[] {MACHINE_CASINGS[mTier][aColor + 1]}; } public ITexture[] getTopFacingActive(byte aColor) { - return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1]}; + return new ITexture[] {MACHINE_CASINGS[mTier][aColor + 1]}; } public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1]}; + return new ITexture[] {MACHINE_CASINGS[mTier][aColor + 1]}; } public ITexture[] getBottomFacingActive(byte aColor) { - return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1]}; + return new ITexture[] {MACHINE_CASINGS[mTier][aColor + 1]}; } public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1]}; + return new ITexture[] {MACHINE_CASINGS[mTier][aColor + 1]}; } public ITexture[] getBottomFacingPipeActive(byte aColor) { - return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; + return new ITexture[] {MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; } public ITexture[] getBottomFacingPipeInactive(byte aColor) { - return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; + return new ITexture[] {MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; } public ITexture[] getTopFacingPipeActive(byte aColor) { - return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; + return new ITexture[] {MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; } public ITexture[] getTopFacingPipeInactive(byte aColor) { - return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; + return new ITexture[] {MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; } public ITexture[] getSideFacingPipeActive(byte aColor) { - return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; + return new ITexture[] {MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; } public ITexture[] getSideFacingPipeInactive(byte aColor) { - return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; + return new ITexture[] {MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; } @Override - public void getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { + public void getWailaBody( + ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { final NBTTagCompound tag = accessor.getNBTData(); - currenttip.add(String.format("Progress: %d s / %d s", tag.getInteger("progressSingleBlock"), tag.getInteger("maxProgressSingleBlock"))); + currenttip.add(String.format( + "Progress: %d s / %d s", + tag.getInteger("progressSingleBlock"), tag.getInteger("maxProgressSingleBlock"))); super.getWailaBody(itemStack, currenttip, accessor, config); } @Override - public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, int z) { + public void getWailaNBTData( + EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, int z) { super.getWailaNBTData(player, tile, tag, world, x, y, z); tag.setInteger("progressSingleBlock", mProgresstime / 20); - tag.setInteger("maxProgressSingleBlock", mMaxProgresstime / 20); + tag.setInteger("maxProgressSingleBlock", mMaxProgresstime / 20); } public Power getPower() { diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Bronze.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Bronze.java index f185a9c246..aa893c0bc2 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Bronze.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Bronze.java @@ -1,8 +1,12 @@ package gregtech.api.metatileentity.implementations; +import static gregtech.api.enums.GT_Values.D1; +import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; + import gregtech.api.GregTech_API; -import gregtech.api.enums.ParticleFX; import gregtech.api.enums.Dyes; +import gregtech.api.enums.ParticleFX; import gregtech.api.enums.SoundResource; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -14,17 +18,12 @@ import gregtech.api.util.GT_Utility; import gregtech.api.util.WorldSpawnedEventBuilder.ParticleEventBuilder; import gregtech.common.power.Power; import gregtech.common.power.SteamPower; +import java.util.ArrayList; import net.minecraft.entity.EntityLivingBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; import net.minecraftforge.common.util.ForgeDirection; -import java.util.ArrayList; - -import static gregtech.api.enums.GT_Values.D1; -import static gregtech.api.enums.Textures.BlockIcons.*; -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; - /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! * <p/> @@ -35,15 +34,44 @@ public abstract class GT_MetaTileEntity_BasicMachine_Bronze extends GT_MetaTileE private static final int NEEDS_STEAM_VENTING = 64; public boolean mNeedsSteamVenting = false; - public GT_MetaTileEntity_BasicMachine_Bronze(int aID, String aName, String aNameRegional, String aDescription, int aInputSlotCount, int aOutputSlotCount, boolean aHighPressure) { - super(aID, aName, aNameRegional, aHighPressure ? 2 : 1, 0, aDescription, aInputSlotCount, aOutputSlotCount, "", ""); - } - - public GT_MetaTileEntity_BasicMachine_Bronze(String aName, String aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, boolean aHighPressure) { + public GT_MetaTileEntity_BasicMachine_Bronze( + int aID, + String aName, + String aNameRegional, + String aDescription, + int aInputSlotCount, + int aOutputSlotCount, + boolean aHighPressure) { + super( + aID, + aName, + aNameRegional, + aHighPressure ? 2 : 1, + 0, + aDescription, + aInputSlotCount, + aOutputSlotCount, + "", + ""); + } + + public GT_MetaTileEntity_BasicMachine_Bronze( + String aName, + String aDescription, + ITexture[][][] aTextures, + int aInputSlotCount, + int aOutputSlotCount, + boolean aHighPressure) { super(aName, aHighPressure ? 2 : 1, 0, aDescription, aTextures, aInputSlotCount, aOutputSlotCount, "", ""); } - public GT_MetaTileEntity_BasicMachine_Bronze(String aName, String[] aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, boolean aHighPressure) { + public GT_MetaTileEntity_BasicMachine_Bronze( + String aName, + String[] aDescription, + ITexture[][][] aTextures, + int aInputSlotCount, + int aOutputSlotCount, + boolean aHighPressure) { super(aName, aHighPressure ? 2 : 1, 0, aDescription, aTextures, aInputSlotCount, aOutputSlotCount, "", ""); } @@ -140,11 +168,53 @@ public abstract class GT_MetaTileEntity_BasicMachine_Bronze extends GT_MetaTileE @Override public boolean allowToCheckRecipe() { - if (mNeedsSteamVenting && getBaseMetaTileEntity().getCoverIDAtSide(getBaseMetaTileEntity().getFrontFacing()) == 0 && !GT_Utility.hasBlockHitBox(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 1), getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 1), getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 1))) { + if (mNeedsSteamVenting + && getBaseMetaTileEntity() + .getCoverIDAtSide(getBaseMetaTileEntity().getFrontFacing()) + == 0 + && !GT_Utility.hasBlockHitBox( + getBaseMetaTileEntity().getWorld(), + getBaseMetaTileEntity() + .getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 1), + getBaseMetaTileEntity() + .getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 1), + getBaseMetaTileEntity() + .getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 1))) { sendSound((byte) 9); mNeedsSteamVenting = false; try { - for (EntityLivingBase tLiving : (ArrayList<EntityLivingBase>) getBaseMetaTileEntity().getWorld().getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 1), getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 1), getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 1), getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 1) + 1, getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 1) + 1, getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 1) + 1))) { + for (EntityLivingBase tLiving : (ArrayList<EntityLivingBase>) getBaseMetaTileEntity() + .getWorld() + .getEntitiesWithinAABB( + EntityLivingBase.class, + AxisAlignedBB.getBoundingBox( + getBaseMetaTileEntity() + .getOffsetX( + getBaseMetaTileEntity().getFrontFacing(), 1), + getBaseMetaTileEntity() + .getOffsetY( + getBaseMetaTileEntity().getFrontFacing(), 1), + getBaseMetaTileEntity() + .getOffsetZ( + getBaseMetaTileEntity().getFrontFacing(), 1), + getBaseMetaTileEntity() + .getOffsetX( + getBaseMetaTileEntity() + .getFrontFacing(), + 1) + + 1, + getBaseMetaTileEntity() + .getOffsetY( + getBaseMetaTileEntity() + .getFrontFacing(), + 1) + + 1, + getBaseMetaTileEntity() + .getOffsetZ( + getBaseMetaTileEntity() + .getFrontFacing(), + 1) + + 1))) { GT_Utility.applyHeatDamage(tLiving, getSteamDamage()); } } catch (Throwable e) { @@ -156,8 +226,12 @@ public abstract class GT_MetaTileEntity_BasicMachine_Bronze extends GT_MetaTileE @Override public int checkRecipe() { - GT_Recipe tRecipe = getRecipeList().findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[mTier], null, getAllInputs()); - if ((tRecipe != null) && (canOutput(tRecipe.mOutputs)) && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) { + GT_Recipe tRecipe = getRecipeList() + .findRecipe( + getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[mTier], null, getAllInputs()); + if ((tRecipe != null) + && (canOutput(tRecipe.mOutputs)) + && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) { this.mOutputItems[0] = tRecipe.getOutput(0); calculateOverclockedNess(tRecipe); return 2; @@ -184,20 +258,26 @@ public abstract class GT_MetaTileEntity_BasicMachine_Bronze extends GT_MetaTileE GT_Utility.doSoundAtClient(SoundResource.RANDOM_FIZZ, 5, 1.0F, aX, aY, aZ); new ParticleEventBuilder() - .setIdentifier(ParticleFX.CLOUD) - .setWorld(getBaseMetaTileEntity().getWorld()) - .setMotion( - ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing()).offsetX / 5.0, - ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing()).offsetY / 5.0, - ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing()).offsetZ / 5.0 - ) - .<ParticleEventBuilder>times(8, x -> x - .setPosition( - aX - 0.5 + XSTR_INSTANCE.nextFloat(), - aY - 0.5 + XSTR_INSTANCE.nextFloat(), - aZ - 0.5 + XSTR_INSTANCE.nextFloat() - ).run() - ); + .setIdentifier(ParticleFX.CLOUD) + .setWorld(getBaseMetaTileEntity().getWorld()) + .setMotion( + ForgeDirection.getOrientation( + getBaseMetaTileEntity().getFrontFacing()) + .offsetX + / 5.0, + ForgeDirection.getOrientation( + getBaseMetaTileEntity().getFrontFacing()) + .offsetY + / 5.0, + ForgeDirection.getOrientation( + getBaseMetaTileEntity().getFrontFacing()) + .offsetZ + / 5.0) + .<ParticleEventBuilder>times(8, x -> x.setPosition( + aX - 0.5 + XSTR_INSTANCE.nextFloat(), + aY - 0.5 + XSTR_INSTANCE.nextFloat(), + aZ - 0.5 + XSTR_INSTANCE.nextFloat()) + .run()); } } @@ -208,7 +288,8 @@ public abstract class GT_MetaTileEntity_BasicMachine_Bronze extends GT_MetaTileE @Override public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) { - return GregTech_API.getCoverBehaviorNew(aCoverID.toStack()).isSimpleCover() && super.allowCoverOnSide(aSide, aCoverID); + return GregTech_API.getCoverBehaviorNew(aCoverID.toStack()).isSimpleCover() + && super.allowCoverOnSide(aSide, aCoverID); } public float getSteamDamage() { @@ -217,71 +298,133 @@ public abstract class GT_MetaTileEntity_BasicMachine_Bronze extends GT_MetaTileE @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)) + }; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)) + }; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)) + }; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)) + }; } @Override public ITexture[] getTopFacingActive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_TOP : MACHINE_BRONZE_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_BRONZEBRICKS_TOP : MACHINE_BRONZE_TOP, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)) + }; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_TOP : MACHINE_BRONZE_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_BRONZEBRICKS_TOP : MACHINE_BRONZE_TOP, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)) + }; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_BOTTOM : MACHINE_BRONZE_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_BRONZEBRICKS_BOTTOM : MACHINE_BRONZE_BOTTOM, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)) + }; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_BOTTOM : MACHINE_BRONZE_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_BRONZEBRICKS_BOTTOM : MACHINE_BRONZE_BOTTOM, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)) + }; } @Override public ITexture[] getBottomFacingPipeActive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_BOTTOM : MACHINE_BRONZE_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_BRONZEBRICKS_BOTTOM : MACHINE_BRONZE_BOTTOM, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), + TextureFactory.of(OVERLAY_PIPE_OUT) + }; } @Override public ITexture[] getBottomFacingPipeInactive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_BOTTOM : MACHINE_BRONZE_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_BRONZEBRICKS_BOTTOM : MACHINE_BRONZE_BOTTOM, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), + TextureFactory.of(OVERLAY_PIPE_OUT) + }; } @Override public ITexture[] getTopFacingPipeActive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_TOP : MACHINE_BRONZE_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_BRONZEBRICKS_TOP : MACHINE_BRONZE_TOP, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), + TextureFactory.of(OVERLAY_PIPE_OUT) + }; } @Override public ITexture[] getTopFacingPipeInactive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_TOP : MACHINE_BRONZE_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_BRONZEBRICKS_TOP : MACHINE_BRONZE_TOP, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), + TextureFactory.of(OVERLAY_PIPE_OUT) + }; } @Override public ITexture[] getSideFacingPipeActive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), + TextureFactory.of(OVERLAY_PIPE_OUT) + }; } @Override public ITexture[] getSideFacingPipeInactive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), + TextureFactory.of(OVERLAY_PIPE_OUT) + }; } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java index b09639e292..419ab1fb14 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java @@ -1,10 +1,16 @@ package gregtech.api.metatileentity.implementations; +import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.GT_Values.VN; +import static gregtech.api.enums.GT_Values.W; +import static gregtech.api.enums.GT_Values.ticksBetweenSounds; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; + import cpw.mods.fml.common.Loader; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.ParticleFX; import gregtech.api.enums.*; +import gregtech.api.enums.ParticleFX; import gregtech.api.enums.Textures.BlockIcons.CustomIcon; import gregtech.api.gui.GT_Container_BasicMachine; import gregtech.api.gui.GT_GUIContainer_BasicMachine; @@ -19,6 +25,7 @@ import gregtech.api.util.GT_Utility; import gregtech.api.util.WorldSpawnedEventBuilder; import gregtech.api.util.WorldSpawnedEventBuilder.ParticleEventBuilder; import ic2.core.Ic2Items; +import java.util.Locale; import net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.init.Blocks; @@ -28,14 +35,6 @@ import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; -import java.util.Locale; - -import static gregtech.api.enums.GT_Values.V; -import static gregtech.api.enums.GT_Values.VN; -import static gregtech.api.enums.GT_Values.W; -import static gregtech.api.enums.GT_Values.ticksBetweenSounds; -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; - /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! * <p/> @@ -51,36 +50,99 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ private final byte mGUIParameterA, mGUIParameterB; public GT_MetaTileEntity_BasicMachine_GT_Recipe( - int aID, String aName, String aNameRegional, int aTier, String aDescription, GT_Recipe.GT_Recipe_Map aRecipes, - int aInputSlots, int aOutputSlots, int aTankCapacity, int aGUIParameterA, int aGUIParameterB, String aGUIName, ResourceLocation aSound, boolean aSharedTank, - boolean aRequiresFluidForFiltering, SpecialEffects aSpecialEffect, String aOverlays, Object[] aRecipe - ) { - super(aID, aName, aNameRegional, aTier, aRecipes.mAmperage, aDescription, aInputSlots, aOutputSlots, aGUIName, aRecipes.mNEIName, + int aID, + String aName, + String aNameRegional, + int aTier, + String aDescription, + GT_Recipe.GT_Recipe_Map aRecipes, + int aInputSlots, + int aOutputSlots, + int aTankCapacity, + int aGUIParameterA, + int aGUIParameterB, + String aGUIName, + ResourceLocation aSound, + boolean aSharedTank, + boolean aRequiresFluidForFiltering, + SpecialEffects aSpecialEffect, + String aOverlays, + Object[] aRecipe) { + super( + aID, + aName, + aNameRegional, + aTier, + aRecipes.mAmperage, + aDescription, + aInputSlots, + aOutputSlots, + aGUIName, + aRecipes.mNEIName, TextureFactory.of( - TextureFactory.of(new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_SIDE_ACTIVE")), - TextureFactory.builder().addIcon((new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_SIDE_ACTIVE_GLOW"))).glow().build()), + TextureFactory.of(new CustomIcon( + "basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_SIDE_ACTIVE")), + TextureFactory.builder() + .addIcon((new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + + "/OVERLAY_SIDE_ACTIVE_GLOW"))) + .glow() + .build()), TextureFactory.of( - TextureFactory.of(new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_SIDE")), - TextureFactory.builder().addIcon((new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_SIDE_GLOW"))).glow().build()), + TextureFactory.of(new CustomIcon( + "basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_SIDE")), + TextureFactory.builder() + .addIcon((new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + + "/OVERLAY_SIDE_GLOW"))) + .glow() + .build()), TextureFactory.of( - TextureFactory.of(new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_FRONT_ACTIVE")), - TextureFactory.builder().addIcon((new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_FRONT_ACTIVE_GLOW"))).glow().build()), + TextureFactory.of(new CustomIcon( + "basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_FRONT_ACTIVE")), + TextureFactory.builder() + .addIcon((new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + + "/OVERLAY_FRONT_ACTIVE_GLOW"))) + .glow() + .build()), TextureFactory.of( - TextureFactory.of(new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_FRONT")), - TextureFactory.builder().addIcon((new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_FRONT_GLOW"))).glow().build()), + TextureFactory.of(new CustomIcon( + "basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_FRONT")), + TextureFactory.builder() + .addIcon((new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + + "/OVERLAY_FRONT_GLOW"))) + .glow() + .build()), TextureFactory.of( - TextureFactory.of(new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_TOP_ACTIVE")), - TextureFactory.builder().addIcon((new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_TOP_ACTIVE_GLOW"))).glow().build()), + TextureFactory.of(new CustomIcon( + "basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_TOP_ACTIVE")), + TextureFactory.builder() + .addIcon((new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + + "/OVERLAY_TOP_ACTIVE_GLOW"))) + .glow() + .build()), TextureFactory.of( - TextureFactory.of(new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_TOP")), - TextureFactory.builder().addIcon((new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_TOP_GLOW"))).glow().build()), + TextureFactory.of(new CustomIcon( + "basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_TOP")), + TextureFactory.builder() + .addIcon((new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + + "/OVERLAY_TOP_GLOW"))) + .glow() + .build()), TextureFactory.of( - TextureFactory.of(new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_BOTTOM_ACTIVE")), - TextureFactory.builder().addIcon((new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_BOTTOM_ACTIVE_GLOW"))).glow().build()), + TextureFactory.of(new CustomIcon( + "basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_BOTTOM_ACTIVE")), + TextureFactory.builder() + .addIcon((new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + + "/OVERLAY_BOTTOM_ACTIVE_GLOW"))) + .glow() + .build()), TextureFactory.of( - TextureFactory.of(new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_BOTTOM")), - TextureFactory.builder().addIcon((new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_BOTTOM_GLOW"))).glow().build()) - ); + TextureFactory.of(new CustomIcon( + "basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_BOTTOM")), + TextureFactory.builder() + .addIcon((new CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + + "/OVERLAY_BOTTOM_GLOW"))) + .glow() + .build())); this.mSharedTank = aSharedTank; this.mTankCapacity = aTankCapacity; this.mSpecialEffect = aSpecialEffect; @@ -90,8 +152,7 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ this.mGUIParameterA = (byte) aGUIParameterA; this.mGUIParameterB = (byte) aGUIParameterB; - - //TODO: CHECK + // TODO: CHECK if (aRecipe != null) { for (int i = 3; i < aRecipe.length; i++) { if (aRecipe[i] == GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT) { @@ -128,12 +189,12 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ case 6: case 7: case 8: - if (Loader.isModLoaded("bartworks")) {//todo remove via provider pattern on all enums? + if (Loader.isModLoaded("bartworks")) { // todo remove via provider pattern on all enums? aRecipe[i] = "blockGlass" + VN[aTier]; break; } default: - if (Loader.isModLoaded("bartworks")) {//todo remove via provider pattern on all enums? + if (Loader.isModLoaded("bartworks")) { // todo remove via provider pattern on all enums? aRecipe[i] = "blockGlass" + VN[8]; } else { aRecipe[i] = Ic2Items.reinforcedGlass; @@ -700,26 +761,57 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ throw new IllegalArgumentException("MISSING TIER MAPPING FOR: " + aRecipe[i] + " AT TIER " + mTier); } - if ( - !GT_ModHandler.addCraftingRecipe( + if (!GT_ModHandler.addCraftingRecipe( getStackForm(1), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, aRecipe - ) - ) { - throw new IllegalArgumentException("INVALID CRAFTING RECIPE FOR: " + getStackForm(1).getDisplayName()); + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.BUFFERED + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + aRecipe)) { + throw new IllegalArgumentException( + "INVALID CRAFTING RECIPE FOR: " + getStackForm(1).getDisplayName()); } } } public GT_MetaTileEntity_BasicMachine_GT_Recipe( - int aID, String aName, String aNameRegional, int aTier, String aDescription, GT_Recipe.GT_Recipe_Map aRecipes, - int aInputSlots, int aOutputSlots, int aTankCapacity, int aGUIParameterA, int aGUIParameterB, String aGUIName, SoundResource aSound, boolean aSharedTank, - boolean aRequiresFluidForFiltering, SpecialEffects aSpecialEffect, String aOverlays, Object[] aRecipe - ) { + int aID, + String aName, + String aNameRegional, + int aTier, + String aDescription, + GT_Recipe.GT_Recipe_Map aRecipes, + int aInputSlots, + int aOutputSlots, + int aTankCapacity, + int aGUIParameterA, + int aGUIParameterB, + String aGUIName, + SoundResource aSound, + boolean aSharedTank, + boolean aRequiresFluidForFiltering, + SpecialEffects aSpecialEffect, + String aOverlays, + Object[] aRecipe) { this( - aID, aName, aNameRegional, aTier, aDescription, aRecipes, - aInputSlots, aOutputSlots, aTankCapacity, aGUIParameterA, aGUIParameterB, aGUIName, aSound.resourceLocation, aSharedTank, - aRequiresFluidForFiltering, aSpecialEffect, aOverlays, aRecipe); + aID, + aName, + aNameRegional, + aTier, + aDescription, + aRecipes, + aInputSlots, + aOutputSlots, + aTankCapacity, + aGUIParameterA, + aGUIParameterB, + aGUIName, + aSound.resourceLocation, + aSharedTank, + aRequiresFluidForFiltering, + aSpecialEffect, + aOverlays, + aRecipe); } /** @@ -731,20 +823,63 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ */ @Deprecated public GT_MetaTileEntity_BasicMachine_GT_Recipe( - int aID, String aName, String aNameRegional, int aTier, String aDescription, GT_Recipe.GT_Recipe_Map aRecipes, - int aInputSlots, int aOutputSlots, int aTankCapacity, int aGUIParameterA, int aGUIParameterB, String aGUIName, String aSound, boolean aSharedTank, - boolean aRequiresFluidForFiltering, int aSpecialEffect, String aOverlays, Object[] aRecipe - ) { - this(aID, aName, aNameRegional, aTier, aDescription, aRecipes, - aInputSlots, aOutputSlots, aTankCapacity, aGUIParameterA, aGUIParameterB, aGUIName, new ResourceLocation(aSound), aSharedTank, - aRequiresFluidForFiltering, SpecialEffects.fromId(aSpecialEffect), aOverlays, aRecipe); + int aID, + String aName, + String aNameRegional, + int aTier, + String aDescription, + GT_Recipe.GT_Recipe_Map aRecipes, + int aInputSlots, + int aOutputSlots, + int aTankCapacity, + int aGUIParameterA, + int aGUIParameterB, + String aGUIName, + String aSound, + boolean aSharedTank, + boolean aRequiresFluidForFiltering, + int aSpecialEffect, + String aOverlays, + Object[] aRecipe) { + this( + aID, + aName, + aNameRegional, + aTier, + aDescription, + aRecipes, + aInputSlots, + aOutputSlots, + aTankCapacity, + aGUIParameterA, + aGUIParameterB, + aGUIName, + new ResourceLocation(aSound), + aSharedTank, + aRequiresFluidForFiltering, + SpecialEffects.fromId(aSpecialEffect), + aOverlays, + aRecipe); } public GT_MetaTileEntity_BasicMachine_GT_Recipe( - String aName, int aTier, String aDescription, GT_Recipe.GT_Recipe_Map aRecipes, int aInputSlots, int aOutputSlots, int aTankCapacity, int aAmperage, - int aGUIParameterA, int aGUIParameterB, ITexture[][][] aTextures, String aGUIName, String aNEIName, String aSound, boolean aSharedTank, - boolean aRequiresFluidForFiltering, int aSpecialEffect - ) { + String aName, + int aTier, + String aDescription, + GT_Recipe.GT_Recipe_Map aRecipes, + int aInputSlots, + int aOutputSlots, + int aTankCapacity, + int aAmperage, + int aGUIParameterA, + int aGUIParameterB, + ITexture[][][] aTextures, + String aGUIName, + String aNEIName, + String aSound, + boolean aSharedTank, + boolean aRequiresFluidForFiltering, + int aSpecialEffect) { super(aName, aTier, aAmperage, aDescription, aTextures, aInputSlots, aOutputSlots, aGUIName, aNEIName); this.mSharedTank = aSharedTank; this.mTankCapacity = aTankCapacity; @@ -757,10 +892,23 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ } public GT_MetaTileEntity_BasicMachine_GT_Recipe( - String aName, int aTier, String[] aDescription, GT_Recipe.GT_Recipe_Map aRecipes, int aInputSlots, int aOutputSlots, int aTankCapacity, int aAmperage, - int aGUIParameterA, int aGUIParameterB, ITexture[][][] aTextures, String aGUIName, String aNEIName, String aSound, boolean aSharedTank, - boolean aRequiresFluidForFiltering, int aSpecialEffect - ) { + String aName, + int aTier, + String[] aDescription, + GT_Recipe.GT_Recipe_Map aRecipes, + int aInputSlots, + int aOutputSlots, + int aTankCapacity, + int aAmperage, + int aGUIParameterA, + int aGUIParameterB, + ITexture[][][] aTextures, + String aGUIName, + String aNEIName, + String aSound, + boolean aSharedTank, + boolean aRequiresFluidForFiltering, + int aSpecialEffect) { super(aName, aTier, aAmperage, aDescription, aTextures, aInputSlots, aOutputSlots, aGUIName, aNEIName); this.mSharedTank = aSharedTank; this.mTankCapacity = aTankCapacity; @@ -775,10 +923,23 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_BasicMachine_GT_Recipe( - this.mName, this.mTier, this.mDescriptionArray, this.mRecipes, this.mInputSlotCount, this.mOutputItems == null ? 0 : this.mOutputItems.length, - this.mTankCapacity, this.mAmperage, this.mGUIParameterA, this.mGUIParameterB, this.mTextures, this.mGUIName, this.mNEIName, this.mSoundResourceLocation.toString(), - this.mSharedTank, this.mRequiresFluidForFiltering, this.mSpecialEffect.ordinal() - ); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mRecipes, + this.mInputSlotCount, + this.mOutputItems == null ? 0 : this.mOutputItems.length, + this.mTankCapacity, + this.mAmperage, + this.mGUIParameterA, + this.mGUIParameterB, + this.mTextures, + this.mGUIName, + this.mNEIName, + this.mSoundResourceLocation.toString(), + this.mSharedTank, + this.mRequiresFluidForFiltering, + this.mSpecialEffect.ordinal()); } @Override @@ -789,61 +950,74 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_BasicMachine( - aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), this.mGUIName, - GT_Utility.isStringValid(this.mNEIName) ? this.mNEIName : this.getRecipeList() != null ? this.getRecipeList().mUnlocalizedName : "", - this.mGUIParameterA, this.mGUIParameterB - ); + aPlayerInventory, + aBaseMetaTileEntity, + this.getLocalName(), + this.mGUIName, + GT_Utility.isStringValid(this.mNEIName) + ? this.mNEIName + : this.getRecipeList() != null ? this.getRecipeList().mUnlocalizedName : "", + this.mGUIParameterA, + this.mGUIParameterB); } @Override - protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + protected boolean allowPutStackValidated( + IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { if (!super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack)) return false; switch (this.mInputSlotCount) { case 0: return false; case 1: if (this.getFillableStack() == null) - return !this.mRequiresFluidForFiltering && this.getRecipeList().containsInput(aStack); + return !this.mRequiresFluidForFiltering + && this.getRecipeList().containsInput(aStack); else - return this.getRecipeList().findRecipe( - this.getBaseMetaTileEntity(), this.mLastRecipe, true, true, V[this.mTier], new FluidStack[]{this.getFillableStack()}, - this.getSpecialSlot(), appendSelectedCircuit(aStack) - ) != null; + return this.getRecipeList() + .findRecipe( + this.getBaseMetaTileEntity(), + this.mLastRecipe, + true, + true, + V[this.mTier], + new FluidStack[] {this.getFillableStack()}, + this.getSpecialSlot(), + appendSelectedCircuit(aStack)) + != null; case 2: - - return ( - !this.mRequiresFluidForFiltering || this.getFillableStack() != null) && - ( - ( - (this.getInputAt(0) != null && this.getInputAt(1) != null) || - ( - this.getInputAt(0) == null && this.getInputAt(1) == null ? - this.getRecipeList().containsInput(aStack) : - ( - this.getRecipeList().containsInput(aStack) && - this.getRecipeList().findRecipe( - this.getBaseMetaTileEntity(), this.mLastRecipe, true, true, V[this.mTier], - new FluidStack[]{this.getFillableStack()}, - this.getSpecialSlot(), aIndex == this.getInputSlot() ? - appendSelectedCircuit(aStack, this.getInputAt(1)) : - appendSelectedCircuit(this.getInputAt(0), aStack) - ) != null - ) - ) - ) - ); + return (!this.mRequiresFluidForFiltering || this.getFillableStack() != null) + && (((this.getInputAt(0) != null && this.getInputAt(1) != null) + || (this.getInputAt(0) == null && this.getInputAt(1) == null + ? this.getRecipeList().containsInput(aStack) + : (this.getRecipeList().containsInput(aStack) + && this.getRecipeList() + .findRecipe( + this.getBaseMetaTileEntity(), + this.mLastRecipe, + true, + true, + V[this.mTier], + new FluidStack[] {this.getFillableStack()}, + this.getSpecialSlot(), + aIndex == this.getInputSlot() + ? appendSelectedCircuit( + aStack, this.getInputAt(1)) + : appendSelectedCircuit( + this.getInputAt(0), aStack)) + != null)))); default: { int tID = this.getBaseMetaTileEntity().getMetaTileID(); - if (tID >= 211 && tID <= 218 || tID >= 1180 && tID <= 1187 || tID >= 10780 && tID <= 10786) { //assembler lv-iv; circuit asseblers lv - uv; assemblers luv-uev + if (tID >= 211 && tID <= 218 + || tID >= 1180 && tID <= 1187 + || tID >= 10780 + && tID <= 10786) { // assembler lv-iv; circuit asseblers lv - uv; assemblers luv-uev if (GT_Utility.isStackValid(aStack)) for (int oreID : OreDictionary.getOreIDs(aStack)) { - if (OreDictionary.getOreName(oreID).startsWith("circuit")) - return true; + if (OreDictionary.getOreName(oreID).startsWith("circuit")) return true; } } return this.getRecipeList().containsInput(aStack); } - } } @@ -859,23 +1033,21 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ //noinspection SwitchStatementWithTooFewBranches switch (this.mSpecialEffect) { case TOP_SMOKE: - final byte topFacing = (byte) ForgeDirection.UP.ordinal(); if (aBaseMetaTileEntity.getFrontFacing() != topFacing - && aBaseMetaTileEntity.getCoverIDAtSide(topFacing) == 0 - && !aBaseMetaTileEntity.getOpacityAtSide(topFacing)) { + && aBaseMetaTileEntity.getCoverIDAtSide(topFacing) == 0 + && !aBaseMetaTileEntity.getOpacityAtSide(topFacing)) { new WorldSpawnedEventBuilder.ParticleEventBuilder() - .setMotion(0.0D, 0.0D, 0.0D) - .setIdentifier(ParticleFX.SMOKE) - .setPosition( - aBaseMetaTileEntity.getXCoord() + 0.8F - XSTR_INSTANCE.nextFloat() * 0.6F, - aBaseMetaTileEntity.getYCoord() + 0.9F + XSTR_INSTANCE.nextFloat() * 0.2F, - aBaseMetaTileEntity.getZCoord() + 0.8F - XSTR_INSTANCE.nextFloat() * 0.6F - ) - .setWorld(aBaseMetaTileEntity.getWorld()) - .run(); + .setMotion(0.0D, 0.0D, 0.0D) + .setIdentifier(ParticleFX.SMOKE) + .setPosition( + aBaseMetaTileEntity.getXCoord() + 0.8F - XSTR_INSTANCE.nextFloat() * 0.6F, + aBaseMetaTileEntity.getYCoord() + 0.9F + XSTR_INSTANCE.nextFloat() * 0.2F, + aBaseMetaTileEntity.getZCoord() + 0.8F - XSTR_INSTANCE.nextFloat() * 0.6F) + .setWorld(aBaseMetaTileEntity.getWorld()) + .run(); } break; default: @@ -902,8 +1074,8 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ final byte mainFacing = (byte) this.mMainFacing; if (mainFacing > 1 - && aBaseMetaTileEntity.getCoverIDAtSide(mainFacing) == 0 - && !aBaseMetaTileEntity.getOpacityAtSide(mainFacing)) { + && aBaseMetaTileEntity.getCoverIDAtSide(mainFacing) == 0 + && !aBaseMetaTileEntity.getOpacityAtSide(mainFacing)) { final double oX = aBaseMetaTileEntity.getXCoord(); final double oY = aBaseMetaTileEntity.getYCoord(); @@ -938,8 +1110,7 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ mZ = .05D; } - ParticleEventBuilder particleEventBuilder = - (new ParticleEventBuilder()) + ParticleEventBuilder particleEventBuilder = (new ParticleEventBuilder()) .setMotion(mX, 0, mZ) .setPosition(x, y, z) .setWorld(getBaseMetaTileEntity().getWorld()); @@ -1001,7 +1172,31 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ return !this.mSharedTank; } - public enum X {PUMP, WIRE, WIRE4, HULL, PIPE, GLASS, PLATE, MOTOR, ROTOR, SENSOR, PISTON, CIRCUIT, EMITTER, CONVEYOR, ROBOT_ARM, COIL_HEATING, COIL_ELECTRIC, STICK_MAGNETIC, STICK_DISTILLATION, BETTER_CIRCUIT, FIELD_GENERATOR, COIL_HEATING_DOUBLE, STICK_ELECTROMAGNETIC} + public enum X { + PUMP, + WIRE, + WIRE4, + HULL, + PIPE, + GLASS, + PLATE, + MOTOR, + ROTOR, + SENSOR, + PISTON, + CIRCUIT, + EMITTER, + CONVEYOR, + ROBOT_ARM, + COIL_HEATING, + COIL_ELECTRIC, + STICK_MAGNETIC, + STICK_DISTILLATION, + BETTER_CIRCUIT, + FIELD_GENERATOR, + COIL_HEATING_DOUBLE, + STICK_ELECTROMAGNETIC + } /** * Special Effects @@ -1011,11 +1206,7 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ TOP_SMOKE, MAIN_RANDOM_SPARKS; - static final SpecialEffects[] VALID_SPECIAL_EFFECTS = { - NONE, - TOP_SMOKE, - MAIN_RANDOM_SPARKS - }; + static final SpecialEffects[] VALID_SPECIAL_EFFECTS = {NONE, TOP_SMOKE, MAIN_RANDOM_SPARKS}; static SpecialEffects fromId(int id) { return id >= 0 && id < VALID_SPECIAL_EFFECTS.length ? VALID_SPECIAL_EFFECTS[id] : NONE; diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Steel.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Steel.java index a58cf6345d..d69ab3aa14 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Steel.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Steel.java @@ -1,11 +1,5 @@ package gregtech.api.metatileentity.implementations; -import gregtech.api.enums.Dyes; -import gregtech.api.interfaces.ITexture; -import gregtech.api.render.TextureFactory; -import gregtech.common.power.Power; -import gregtech.common.power.SteamPower; - import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM; import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE; import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEELBRICKS_TOP; @@ -14,6 +8,11 @@ import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEEL_SIDE; import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEEL_TOP; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_OUT; +import gregtech.api.enums.Dyes; +import gregtech.api.interfaces.ITexture; +import gregtech.api.render.TextureFactory; +import gregtech.common.power.Power; +import gregtech.common.power.SteamPower; /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! @@ -22,15 +21,34 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_OUT; * Extend this class to make a simple Machine */ public abstract class GT_MetaTileEntity_BasicMachine_Steel extends GT_MetaTileEntity_BasicMachine_Bronze { - public GT_MetaTileEntity_BasicMachine_Steel(int aID, String aName, String aNameRegional, String aDescription, int aInputSlotCount, int aOutputSlotCount, boolean aHighPressure) { + public GT_MetaTileEntity_BasicMachine_Steel( + int aID, + String aName, + String aNameRegional, + String aDescription, + int aInputSlotCount, + int aOutputSlotCount, + boolean aHighPressure) { super(aID, aName, aNameRegional, aDescription, aInputSlotCount, aOutputSlotCount, aHighPressure); } - public GT_MetaTileEntity_BasicMachine_Steel(String aName, String aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, boolean aHighPressure) { + public GT_MetaTileEntity_BasicMachine_Steel( + String aName, + String aDescription, + ITexture[][][] aTextures, + int aInputSlotCount, + int aOutputSlotCount, + boolean aHighPressure) { super(aName, aDescription, aTextures, aInputSlotCount, aOutputSlotCount, aHighPressure); } - - public GT_MetaTileEntity_BasicMachine_Steel(String aName, String[] aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, boolean aHighPressure) { + + public GT_MetaTileEntity_BasicMachine_Steel( + String aName, + String[] aDescription, + ITexture[][][] aTextures, + int aInputSlotCount, + int aOutputSlotCount, + boolean aHighPressure) { super(aName, aDescription, aTextures, aInputSlotCount, aOutputSlotCount, aHighPressure); } @@ -41,71 +59,133 @@ public abstract class GT_MetaTileEntity_BasicMachine_Steel extends GT_MetaTileEn @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)) + }; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)) + }; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)) + }; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)) + }; } @Override public ITexture[] getTopFacingActive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_TOP : MACHINE_STEEL_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_STEELBRICKS_TOP : MACHINE_STEEL_TOP, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)) + }; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_TOP : MACHINE_STEEL_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_STEELBRICKS_TOP : MACHINE_STEEL_TOP, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)) + }; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_BOTTOM : MACHINE_STEEL_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_STEELBRICKS_BOTTOM : MACHINE_STEEL_BOTTOM, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)) + }; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_BOTTOM : MACHINE_STEEL_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_STEELBRICKS_BOTTOM : MACHINE_STEEL_BOTTOM, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)) + }; } @Override public ITexture[] getBottomFacingPipeActive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_BOTTOM : MACHINE_STEEL_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_STEELBRICKS_BOTTOM : MACHINE_STEEL_BOTTOM, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), + TextureFactory.of(OVERLAY_PIPE_OUT) + }; } @Override public ITexture[] getBottomFacingPipeInactive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_BOTTOM : MACHINE_STEEL_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_STEELBRICKS_BOTTOM : MACHINE_STEEL_BOTTOM, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), + TextureFactory.of(OVERLAY_PIPE_OUT) + }; } @Override public ITexture[] getTopFacingPipeActive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_TOP : MACHINE_STEEL_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_STEELBRICKS_TOP : MACHINE_STEEL_TOP, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), + TextureFactory.of(OVERLAY_PIPE_OUT) + }; } @Override public ITexture[] getTopFacingPipeInactive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_TOP : MACHINE_STEEL_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_STEELBRICKS_TOP : MACHINE_STEEL_TOP, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), + TextureFactory.of(OVERLAY_PIPE_OUT) + }; } @Override public ITexture[] getSideFacingPipeActive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), + TextureFactory.of(OVERLAY_PIPE_OUT) + }; } @Override public ITexture[] getSideFacingPipeInactive(byte aColor) { - return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)}; + return new ITexture[] { + TextureFactory.of( + isBricked() ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, + Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), + TextureFactory.of(OVERLAY_PIPE_OUT) + }; } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java index bc031e0e6f..c1b734baf6 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java @@ -19,7 +19,8 @@ import net.minecraftforge.fluids.FluidTankInfo; * * This is the main construct for my generic Tanks. Filling and emptying behavior have to be implemented manually */ -public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_TieredMachineBlock implements IHasFluidDisplayItem { +public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_TieredMachineBlock + implements IHasFluidDisplayItem { public FluidStack mFluid; protected int mOpenerCount; @@ -27,19 +28,35 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier /** * @param aInvSlotCount should be 3 */ - public GT_MetaTileEntity_BasicTank(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription, ITexture... aTextures) { + public GT_MetaTileEntity_BasicTank( + int aID, + String aName, + String aNameRegional, + int aTier, + int aInvSlotCount, + String aDescription, + ITexture... aTextures) { super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures); } - public GT_MetaTileEntity_BasicTank(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String[] aDescription, ITexture... aTextures) { + public GT_MetaTileEntity_BasicTank( + int aID, + String aName, + String aNameRegional, + int aTier, + int aInvSlotCount, + String[] aDescription, + ITexture... aTextures) { super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures); } - public GT_MetaTileEntity_BasicTank(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_BasicTank( + String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } - public GT_MetaTileEntity_BasicTank(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_BasicTank( + String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @@ -138,8 +155,7 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier public void onOpenGUI() { super.onOpenGUI(); mOpenerCount++; - if (mOpenerCount == 1) - updateFluidDisplayItem(); + if (mOpenerCount == 1) updateFluidDisplayItem(); } @Override @@ -154,23 +170,29 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier if (isFluidChangingAllowed() && getFillableStack() != null && getFillableStack().amount <= 0) setFillableStack(null); - if (mOpenerCount > 0) - updateFluidDisplayItem(); + if (mOpenerCount > 0) updateFluidDisplayItem(); if (doesEmptyContainers()) { FluidStack tFluid = GT_Utility.getFluidForFilledItem(mInventory[getInputSlot()], true); if (tFluid != null && isFluidInputAllowed(tFluid)) { if (getFillableStack() == null) { if (isFluidInputAllowed(tFluid) && tFluid.amount <= getCapacity()) { - if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), GT_Utility.getContainerForFilledItem(mInventory[getInputSlot()], true), 1)) { + if (aBaseMetaTileEntity.addStackToSlot( + getOutputSlot(), + GT_Utility.getContainerForFilledItem(mInventory[getInputSlot()], true), + 1)) { setFillableStack(tFluid.copy()); this.onEmptyingContainerWhenEmpty(); aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); } } } else { - if (tFluid.isFluidEqual(getFillableStack()) && ((long)tFluid.amount + getFillableStack().amount) <= (long)getCapacity()) { - if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), GT_Utility.getContainerForFilledItem(mInventory[getInputSlot()], true), 1)) { + if (tFluid.isFluidEqual(getFillableStack()) + && ((long) tFluid.amount + getFillableStack().amount) <= (long) getCapacity()) { + if (aBaseMetaTileEntity.addStackToSlot( + getOutputSlot(), + GT_Utility.getContainerForFilledItem(mInventory[getInputSlot()], true), + 1)) { getFillableStack().amount += tFluid.amount; aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); } @@ -180,7 +202,8 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier } if (doesFillContainers()) { - ItemStack tOutput = GT_Utility.fillFluidContainer(getDrainableStack(), mInventory[getInputSlot()], false, true); + ItemStack tOutput = + GT_Utility.fillFluidContainer(getDrainableStack(), mInventory[getInputSlot()], false, true); if (tOutput != null && aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), tOutput, 1)) { FluidStack tFluid = GT_Utility.getFluidForFilledItem(tOutput, true); aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); @@ -198,7 +221,8 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier if (ItemList.Display_Fluid.isStackEqual(mInventory[getStackDisplaySlot()], true, true)) mInventory[getStackDisplaySlot()] = null; } else { - mInventory[getStackDisplaySlot()] = GT_Utility.getFluidDisplayStack(getDisplayedFluid(), true, !displaysStackSize()); + mInventory[getStackDisplaySlot()] = + GT_Utility.getFluidDisplayStack(getDisplayedFluid(), true, !displaysStackSize()); } } } @@ -215,8 +239,11 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier @Override public int fill(FluidStack aFluid, boolean doFill) { - if (aFluid == null || aFluid.getFluid().getID() <= 0 || aFluid.amount <= 0 || !canTankBeFilled() || !isFluidInputAllowed(aFluid)) - return 0; + if (aFluid == null + || aFluid.getFluid().getID() <= 0 + || aFluid.amount <= 0 + || !canTankBeFilled() + || !isFluidInputAllowed(aFluid)) return 0; if (getFillableStack() == null || getFillableStack().getFluid().getID() <= 0) { if (aFluid.amount <= getCapacity()) { @@ -234,8 +261,7 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier return getCapacity(); } - if (!getFillableStack().isFluidEqual(aFluid)) - return 0; + if (!getFillableStack().isFluidEqual(aFluid)) return 0; int space = getCapacity() - getFillableStack().amount; if (aFluid.amount <= space) { @@ -245,8 +271,7 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier } return aFluid.amount; } - if (doFill) - getFillableStack().amount = getCapacity(); + if (doFill) getFillableStack().amount = getCapacity(); return space; } @@ -260,8 +285,7 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier } int used = maxDrain; - if (getDrainableStack().amount < used) - used = getDrainableStack().amount; + if (getDrainableStack().amount < used) used = getDrainableStack().amount; if (doDrain) { getDrainableStack().amount -= used; @@ -281,14 +305,14 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier @Override public FluidTankInfo[] getTankInfo(ForgeDirection aSide) { - if (getCapacity() <= 0 && !getBaseMetaTileEntity().hasSteamEngineUpgrade()) return new FluidTankInfo[]{}; + if (getCapacity() <= 0 && !getBaseMetaTileEntity().hasSteamEngineUpgrade()) return new FluidTankInfo[] {}; if (isDrainableStackSeparate()) { - return new FluidTankInfo[]{ - new FluidTankInfo(getFillableStack(), getCapacity()), - new FluidTankInfo(getDrainableStack(), getCapacity()) + return new FluidTankInfo[] { + new FluidTankInfo(getFillableStack(), getCapacity()), + new FluidTankInfo(getDrainableStack(), getCapacity()) }; } else { - return new FluidTankInfo[]{new FluidTankInfo(this)}; + return new FluidTankInfo[] {new FluidTankInfo(this)}; } } @@ -302,7 +326,7 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier return aIndex == getInputSlot(); } - protected void onEmptyingContainerWhenEmpty(){ - //Do nothing + protected void onEmptyingContainerWhenEmpty() { + // Do nothing } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java index 32067744d5..e249be541e 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java @@ -1,19 +1,18 @@ package gregtech.api.metatileentity.implementations; +import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.Textures.BlockIcons.*; + import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; +import java.util.*; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; -import java.util.*; - -import static gregtech.api.enums.GT_Values.V; -import static gregtech.api.enums.Textures.BlockIcons.*; - public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredMachineBlock { private static final int OUTPUT_INDEX = 0; private static final int ARROW_RIGHT_INDEX = 1; @@ -24,22 +23,30 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM public int mMaxStackSize = 64; public static int MAX = 8; - public boolean bOutput = false, bRedstoneIfFull = false, bInvert = false, bStockingMode = false, bSortStacks = false; + public boolean bOutput = false, + bRedstoneIfFull = false, + bInvert = false, + bStockingMode = false, + bSortStacks = false; public int mSuccess = 0, mTargetStackSize = 0; - public GT_MetaTileEntity_Buffer(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription) { + public GT_MetaTileEntity_Buffer( + int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription) { super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription); } - public GT_MetaTileEntity_Buffer(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String[] aDescription) { - super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription); + public GT_MetaTileEntity_Buffer( + int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String[] aDescription) { + super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription); } - public GT_MetaTileEntity_Buffer(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_Buffer( + String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } - public GT_MetaTileEntity_Buffer(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_Buffer( + String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @@ -61,18 +68,24 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM TextureFactory.of(ARROW_RIGHT), TextureFactory.builder().addIcon(ARROW_RIGHT_GLOW).glow().build()); for (int i = 0; i < rTextures[0].length; i++) { - rTextures[OUTPUT_INDEX][i] = new ITexture[]{MACHINE_CASINGS[mTier][i], tOut}; - rTextures[ARROW_RIGHT_INDEX][i] = new ITexture[]{MACHINE_CASINGS[mTier][i], tRight, tIcon}; - rTextures[ARROW_DOWN_INDEX][i] = new ITexture[]{MACHINE_CASINGS[mTier][i], tDown, tIcon}; - rTextures[ARROW_LEFT_INDEX][i] = new ITexture[]{MACHINE_CASINGS[mTier][i], tLeft, tIcon}; - rTextures[ARROW_UP_INDEX][i] = new ITexture[]{MACHINE_CASINGS[mTier][i], tUp, tIcon}; - rTextures[FRONT_INDEX][i] = new ITexture[]{MACHINE_CASINGS[mTier][i], tIcon}; + rTextures[OUTPUT_INDEX][i] = new ITexture[] {MACHINE_CASINGS[mTier][i], tOut}; + rTextures[ARROW_RIGHT_INDEX][i] = new ITexture[] {MACHINE_CASINGS[mTier][i], tRight, tIcon}; + rTextures[ARROW_DOWN_INDEX][i] = new ITexture[] {MACHINE_CASINGS[mTier][i], tDown, tIcon}; + rTextures[ARROW_LEFT_INDEX][i] = new ITexture[] {MACHINE_CASINGS[mTier][i], tLeft, tIcon}; + rTextures[ARROW_UP_INDEX][i] = new ITexture[] {MACHINE_CASINGS[mTier][i], tUp, tIcon}; + rTextures[FRONT_INDEX][i] = new ITexture[] {MACHINE_CASINGS[mTier][i], tIcon}; } return rTextures; } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { int colorIndex = aColorIndex + 1; ForgeDirection side = ForgeDirection.VALID_DIRECTIONS[aSide]; ForgeDirection facing = ForgeDirection.VALID_DIRECTIONS[aFacing]; @@ -237,9 +250,9 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM if (aNBT.hasKey("bStockingMode")) { // Adding new key to existing NBT, need to protect if it is not there. bStockingMode = aNBT.getBoolean("bStockingMode"); } - if (aNBT.hasKey("bSortStacks")) { - bSortStacks = aNBT.getBoolean("bSortStacks"); - } + if (aNBT.hasKey("bSortStacks")) { + bSortStacks = aNBT.getBoolean("bSortStacks"); + } mTargetStackSize = aNBT.getInteger("mTargetStackSize"); } @@ -253,18 +266,22 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aSide == getBaseMetaTileEntity().getBackFacing()) { - mTargetStackSize = (byte) ((mTargetStackSize + (aPlayer.isSneaking()? -1 : 1)) % 65); - if(mTargetStackSize <0){mTargetStackSize = mMaxStackSize;} + mTargetStackSize = (byte) ((mTargetStackSize + (aPlayer.isSneaking() ? -1 : 1)) % 65); + if (mTargetStackSize < 0) { + mTargetStackSize = mMaxStackSize; + } if (mTargetStackSize == 0) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("098","Do not regulate Item Stack Size")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("098", "Do not regulate Item Stack Size")); } else { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("099","Regulate Item Stack Size to: ") + mTargetStackSize); + GT_Utility.sendChatToPlayer( + aPlayer, GT_Utility.trans("099", "Regulate Item Stack Size to: ") + mTargetStackSize); } } } @Override - public boolean onWrenchRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public boolean onWrenchRightClick( + byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { aWrenchingSide = GT_Utility.getOppositeSide(aWrenchingSide); if (getBaseMetaTileEntity().isValidFacing(aWrenchingSide)) { getBaseMetaTileEntity().setFrontFacing(aWrenchingSide); @@ -282,20 +299,22 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM break; } } - if (bInvert) - hasEmptySlots = !hasEmptySlots; + if (bInvert) hasEmptySlots = !hasEmptySlots; for (byte b = 0; b < 6; b++) aBaseMetaTileEntity.setInternalOutputRedstoneSignal(b, hasEmptySlots ? (byte) 0 : (byte) 15); - } - else { - for(byte b = 0;b<6;b++) - aBaseMetaTileEntity.setInternalOutputRedstoneSignal(b, (byte)0); + } else { + for (byte b = 0; b < 6; b++) aBaseMetaTileEntity.setInternalOutputRedstoneSignal(b, (byte) 0); } } @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { - if (aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.isServerSide() && (aBaseMetaTileEntity.hasWorkJustBeenEnabled() || aBaseMetaTileEntity.hasInventoryBeenModified() || aTimer % 200 == 0 || mSuccess > 0)) { + if (aBaseMetaTileEntity.isAllowedToWork() + && aBaseMetaTileEntity.isServerSide() + && (aBaseMetaTileEntity.hasWorkJustBeenEnabled() + || aBaseMetaTileEntity.hasInventoryBeenModified() + || aTimer % 200 == 0 + || mSuccess > 0)) { mSuccess--; updateSlots(); moveItems(aBaseMetaTileEntity, aTimer); @@ -305,8 +324,7 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM @Override public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { - for(byte b = 0;b<6;b++) - aBaseMetaTileEntity.setInternalOutputRedstoneSignal(b,(byte)0); + for (byte b = 0; b < 6; b++) aBaseMetaTileEntity.setInternalOutputRedstoneSignal(b, (byte) 0); } protected void moveItems(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { @@ -314,15 +332,37 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM } protected void moveItems(IGregTechTileEntity aBaseMetaTileEntity, long aTimer, int stacks) { - int tCost; - if (bStockingMode) - tCost = GT_Utility.moveMultipleItemStacks(aBaseMetaTileEntity, aBaseMetaTileEntity.getTileEntityAtSide(aBaseMetaTileEntity.getBackFacing()), aBaseMetaTileEntity.getBackFacing(), aBaseMetaTileEntity.getFrontFacing(), null, false, mTargetStackSize == 0 ? 64 : (byte) mTargetStackSize, mTargetStackSize == 0 ? 1 : (byte) mTargetStackSize, (byte) 64, (byte) 1, stacks); - else - tCost = GT_Utility.moveMultipleItemStacks(aBaseMetaTileEntity, aBaseMetaTileEntity.getTileEntityAtSide(aBaseMetaTileEntity.getBackFacing()), aBaseMetaTileEntity.getBackFacing(), aBaseMetaTileEntity.getFrontFacing(), null, false, (byte) 64, (byte) 1, mTargetStackSize == 0 ? 64 : (byte) mTargetStackSize, mTargetStackSize == 0 ? 1 : (byte) mTargetStackSize, stacks); - - if (tCost > 0 || aBaseMetaTileEntity.hasInventoryBeenModified()) { - mSuccess = 50; - } + int tCost; + if (bStockingMode) + tCost = GT_Utility.moveMultipleItemStacks( + aBaseMetaTileEntity, + aBaseMetaTileEntity.getTileEntityAtSide(aBaseMetaTileEntity.getBackFacing()), + aBaseMetaTileEntity.getBackFacing(), + aBaseMetaTileEntity.getFrontFacing(), + null, + false, + mTargetStackSize == 0 ? 64 : (byte) mTargetStackSize, + mTargetStackSize == 0 ? 1 : (byte) mTargetStackSize, + (byte) 64, + (byte) 1, + stacks); + else + tCost = GT_Utility.moveMultipleItemStacks( + aBaseMetaTileEntity, + aBaseMetaTileEntity.getTileEntityAtSide(aBaseMetaTileEntity.getBackFacing()), + aBaseMetaTileEntity.getBackFacing(), + aBaseMetaTileEntity.getFrontFacing(), + null, + false, + (byte) 64, + (byte) 1, + mTargetStackSize == 0 ? 64 : (byte) mTargetStackSize, + mTargetStackSize == 0 ? 1 : (byte) mTargetStackSize, + stacks); + + if (tCost > 0 || aBaseMetaTileEntity.hasInventoryBeenModified()) { + mSuccess = 50; + } } @Override @@ -336,15 +376,14 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM } @Override - public boolean allowGeneralRedstoneOutput(){ - return true; + public boolean allowGeneralRedstoneOutput() { + return true; } public void updateSlots() { for (int i = 0; i < mInventory.length; i++) if (mInventory[i] != null && mInventory[i].stackSize <= 0) mInventory[i] = null; - if (bSortStacks) - fillStacksIntoFirstSlots(); + if (bSortStacks) fillStacksIntoFirstSlots(); } protected void fillStacksIntoFirstSlots() { @@ -353,24 +392,20 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM List<GT_Utility.ItemId> order = new ArrayList<>(mInventory.length); List<Integer> validSlots = new ArrayList<>(mInventory.length); for (int i = 0; i < mInventory.length - 1; i++) { - if (!isValidSlot(i)) - continue; + if (!isValidSlot(i)) continue; validSlots.add(i); ItemStack s = mInventory[i]; - if(s == null) - continue; + if (s == null) continue; GT_Utility.ItemId sID = GT_Utility.ItemId.createNoCopy(s); slots.merge(sID, s.stackSize, Integer::sum); - if(!stacks.containsKey(sID)) - stacks.put(sID, s); + if (!stacks.containsKey(sID)) stacks.put(sID, s); order.add(sID); mInventory[i] = null; } int slotindex = 0; for (GT_Utility.ItemId sID : order) { int toSet = slots.get(sID); - if (toSet == 0) - continue; + if (toSet == 0) continue; int slot = validSlots.get(slotindex); slotindex++; mInventory[slot] = stacks.get(sID).copy(); @@ -381,14 +416,15 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM } @Override - public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public boolean onSolderingToolRightClick( + byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aPlayer.isSneaking()) { // I was so proud of all this but I literally just copied code from OutputBus bSortStacks = !bSortStacks; - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("200", "Sort mode: " + (bSortStacks ? "Enabled" : "Disabled"))); + GT_Utility.sendChatToPlayer( + aPlayer, GT_Utility.trans("200", "Sort mode: " + (bSortStacks ? "Enabled" : "Disabled"))); return true; } - return super.onSolderingToolRightClick(aSide,aWrenchingSide,aPlayer,aX,aY,aZ); + return super.onSolderingToolRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ); } - } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_CubicMultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_CubicMultiBlockBase.java index c2212e331e..e9e2e8f575 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_CubicMultiBlockBase.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_CubicMultiBlockBase.java @@ -1,5 +1,11 @@ package gregtech.api.metatileentity.implementations; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.lazy; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.enums.GT_HatchElement.*; + import com.google.common.collect.ImmutableList; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IItemSource; @@ -9,17 +15,10 @@ import com.gtnewhorizon.structurelib.structure.StructureDefinition; import gregtech.api.interfaces.IHatchElement; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_StructureUtility; +import java.util.List; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; -import java.util.List; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.lazy; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.enums.GT_HatchElement.*; - /** * A simple 3x3x3 hollow cubic multiblock, that can be arbitrarily rotated, made of a single type of machine casing and accepts hatches everywhere. * Controller will be placed in front center of the structure. @@ -35,100 +34,102 @@ import static gregtech.api.enums.GT_HatchElement.*; * * @param <T> */ -public abstract class GT_MetaTileEntity_CubicMultiBlockBase<T extends GT_MetaTileEntity_CubicMultiBlockBase<T>> extends GT_MetaTileEntity_EnhancedMultiBlockBase<T> implements ISurvivalConstructable { - protected static final String STRUCTURE_PIECE_MAIN = "main"; - protected static final ClassValue<IStructureDefinition<GT_MetaTileEntity_CubicMultiBlockBase<?>>> STRUCTURE_DEFINITION = new ClassValue<IStructureDefinition<GT_MetaTileEntity_CubicMultiBlockBase<?>>>() { - @Override - protected IStructureDefinition<GT_MetaTileEntity_CubicMultiBlockBase<?>> computeValue(Class<?> type) { - return StructureDefinition.<GT_MetaTileEntity_CubicMultiBlockBase<?>>builder() - .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][]{ - {"hhh", "hhh", "hhh"}, - {"h~h", "h-h", "hhh"}, - {"hhh", "hhh", "hhh"}, - })) - .addElement('h', ofChain( - lazy( - t -> GT_StructureUtility.<GT_MetaTileEntity_CubicMultiBlockBase<?>>buildHatchAdder() - .atLeastList(t.getAllowedHatches()) - .casingIndex(t.getHatchTextureIndex()) - .dot(1) - .build() - ), - onElementPass( - GT_MetaTileEntity_CubicMultiBlockBase::onCorrectCasingAdded, - lazy(GT_MetaTileEntity_CubicMultiBlockBase::getCasingElement) - ) - )) - .build(); - } - }; - private int mCasingAmount = 0; - - protected GT_MetaTileEntity_CubicMultiBlockBase(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - } +public abstract class GT_MetaTileEntity_CubicMultiBlockBase<T extends GT_MetaTileEntity_CubicMultiBlockBase<T>> + extends GT_MetaTileEntity_EnhancedMultiBlockBase<T> implements ISurvivalConstructable { + protected static final String STRUCTURE_PIECE_MAIN = "main"; + protected static final ClassValue<IStructureDefinition<GT_MetaTileEntity_CubicMultiBlockBase<?>>> + STRUCTURE_DEFINITION = new ClassValue<IStructureDefinition<GT_MetaTileEntity_CubicMultiBlockBase<?>>>() { + @Override + protected IStructureDefinition<GT_MetaTileEntity_CubicMultiBlockBase<?>> computeValue(Class<?> type) { + return StructureDefinition.<GT_MetaTileEntity_CubicMultiBlockBase<?>>builder() + .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] { + {"hhh", "hhh", "hhh"}, + {"h~h", "h-h", "hhh"}, + {"hhh", "hhh", "hhh"}, + })) + .addElement( + 'h', + ofChain( + lazy(t -> + GT_StructureUtility + .<GT_MetaTileEntity_CubicMultiBlockBase<?>>buildHatchAdder() + .atLeastList(t.getAllowedHatches()) + .casingIndex(t.getHatchTextureIndex()) + .dot(1) + .build()), + onElementPass( + GT_MetaTileEntity_CubicMultiBlockBase::onCorrectCasingAdded, + lazy(GT_MetaTileEntity_CubicMultiBlockBase::getCasingElement)))) + .build(); + } + }; + private int mCasingAmount = 0; + + protected GT_MetaTileEntity_CubicMultiBlockBase(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } - protected GT_MetaTileEntity_CubicMultiBlockBase(String aName) { - super(aName); - } + protected GT_MetaTileEntity_CubicMultiBlockBase(String aName) { + super(aName); + } - /** - * Create a simple 3x3x3 hollow cubic structure made of a single type of machine casing and accepts hatches everywhere. - * <p> - * The created definition contains a single piece named {@link #STRUCTURE_PIECE_MAIN}. - */ - @Override - @SuppressWarnings("unchecked") - public IStructureDefinition<T> getStructureDefinition() { - return (IStructureDefinition<T>) STRUCTURE_DEFINITION.get(getClass()); - } + /** + * Create a simple 3x3x3 hollow cubic structure made of a single type of machine casing and accepts hatches everywhere. + * <p> + * The created definition contains a single piece named {@link #STRUCTURE_PIECE_MAIN}. + */ + @Override + @SuppressWarnings("unchecked") + public IStructureDefinition<T> getStructureDefinition() { + return (IStructureDefinition<T>) STRUCTURE_DEFINITION.get(getClass()); + } - @Override - public void construct(ItemStack aStack, boolean aHintsOnly) { - buildPiece(STRUCTURE_PIECE_MAIN, aStack, aHintsOnly, 1, 1, 0); - } + @Override + public void construct(ItemStack aStack, boolean aHintsOnly) { + buildPiece(STRUCTURE_PIECE_MAIN, aStack, aHintsOnly, 1, 1, 0); + } @Override public int survivalConstruct(ItemStack stackSize, int elementBudget, IItemSource source, EntityPlayerMP actor) { if (mMachine) return -1; - return survivialBuildPiece(STRUCTURE_PIECE_MAIN, stackSize, 1, 1, 0, elementBudget, source, actor,false, true); + return survivialBuildPiece(STRUCTURE_PIECE_MAIN, stackSize, 1, 1, 0, elementBudget, source, actor, false, true); } @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasingAmount = 0; - return checkPiece(STRUCTURE_PIECE_MAIN, 1, 1, 0) && - mCasingAmount >= getRequiredCasingCount() && - checkHatches(aBaseMetaTileEntity, aStack); - } + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasingAmount = 0; + return checkPiece(STRUCTURE_PIECE_MAIN, 1, 1, 0) + && mCasingAmount >= getRequiredCasingCount() + && checkHatches(aBaseMetaTileEntity, aStack); + } - /** - * Called by {@link #checkMachine(IGregTechTileEntity, ItemStack)} to check if all required hatches are present. - * <p> - * Default implementation requires EXACTLY ONE maintenance hatch to be present, and ignore all other conditions. - * - * @param aBaseMetaTileEntity the tile entity of self - * @param aStack The item stack inside the controller - * @return true if the test passes, false otherwise - */ - protected boolean checkHatches(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - return mMaintenanceHatches.size() == 1; - } + /** + * Called by {@link #checkMachine(IGregTechTileEntity, ItemStack)} to check if all required hatches are present. + * <p> + * Default implementation requires EXACTLY ONE maintenance hatch to be present, and ignore all other conditions. + * + * @param aBaseMetaTileEntity the tile entity of self + * @param aStack The item stack inside the controller + * @return true if the test passes, false otherwise + */ + protected boolean checkHatches(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + return mMaintenanceHatches.size() == 1; + } - protected abstract IStructureElement<GT_MetaTileEntity_CubicMultiBlockBase<?>> getCasingElement(); + protected abstract IStructureElement<GT_MetaTileEntity_CubicMultiBlockBase<?>> getCasingElement(); protected List<IHatchElement<? super GT_MetaTileEntity_CubicMultiBlockBase<?>>> getAllowedHatches() { return ImmutableList.of(InputHatch, OutputHatch, InputBus, OutputBus, Muffler, Maintenance, Energy); } - /** - * The hatch's texture index. - */ - protected abstract int getHatchTextureIndex(); + /** + * The hatch's texture index. + */ + protected abstract int getHatchTextureIndex(); - protected abstract int getRequiredCasingCount(); + protected abstract int getRequiredCasingCount(); - protected void onCorrectCasingAdded() { - mCasingAmount++; - } + protected void onCorrectCasingAdded() { + mCasingAmount++; + } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_EnhancedMultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_EnhancedMultiBlockBase.java index 1e85933522..76787fcd32 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_EnhancedMultiBlockBase.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_EnhancedMultiBlockBase.java @@ -19,7 +19,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; - /** * Enhanced multiblock base class, featuring following improvement over {@link GT_MetaTileEntity_MultiBlockBase} * <p> @@ -28,149 +27,225 @@ import net.minecraftforge.common.util.ForgeDirection; * * @param <T> type of this */ -public abstract class GT_MetaTileEntity_EnhancedMultiBlockBase<T extends GT_MetaTileEntity_EnhancedMultiBlockBase<T>> extends GT_MetaTileEntity_TooltipMultiBlockBase implements IAlignment, IConstructable { - private ExtendedFacing mExtendedFacing = ExtendedFacing.DEFAULT; - private IAlignmentLimits mLimits = getInitialAlignmentLimits(); - - protected GT_MetaTileEntity_EnhancedMultiBlockBase(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - } - - protected GT_MetaTileEntity_EnhancedMultiBlockBase(String aName) { - super(aName); - } - - @Override - public ExtendedFacing getExtendedFacing() { - return mExtendedFacing; - } - - @Override - public void setExtendedFacing(ExtendedFacing newExtendedFacing) { - if (mExtendedFacing != newExtendedFacing) { - if(mMachine) - stopMachine(); - mExtendedFacing = newExtendedFacing; - final IGregTechTileEntity base = getBaseMetaTileEntity(); - mMachine = false; - mUpdated = false; - mUpdate = 100; - if (getBaseMetaTileEntity().isServerSide()) { - StructureLibAPI.sendAlignment((IAlignmentProvider) base, - new NetworkRegistry.TargetPoint(base.getWorld().provider.dimensionId, base.getXCoord(), base.getYCoord(), base.getZCoord(), 512)); - } else { - base.issueTextureUpdate(); - } - } - } - - @Override - public final boolean isFacingValid(byte aFacing) { - return canSetToDirectionAny(ForgeDirection.getOrientation(aFacing)); - } - - @Override - public boolean onWrenchRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (aWrenchingSide != getBaseMetaTileEntity().getFrontFacing()) - return super.onWrenchRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ); - if (aPlayer.isSneaking()) { - // we won't be allowing horizontal flips, as it can be perfectly emulated by rotating twice and flipping horizontally - // allowing an extra round of flip make it hard to draw meaningful flip markers in GT_Proxy#drawGrid - toolSetFlip(getFlip().isHorizontallyFlipped() ? Flip.NONE : Flip.HORIZONTAL); - } else { - toolSetRotation(null); - } - return true; - } - - @Override - public void onFacingChange() { - toolSetDirection(ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing())); - } - - @Override - public IAlignmentLimits getAlignmentLimits() { - return mLimits; - } - - protected void setAlignmentLimits(IAlignmentLimits mLimits) { - this.mLimits = mLimits; - } - - /** - * Due to limitation of Java type system, you might need to do an unchecked cast. - * HOWEVER, the returned IStructureDefinition is expected to be evaluated against current instance only, and should - * not be used against other instances, even for those of the same class. - */ - public abstract IStructureDefinition<T> getStructureDefinition(); - - protected abstract GT_Multiblock_Tooltip_Builder createTooltip(); - - @Override - public String[] getStructureDescription(ItemStack stackSize) { - return getTooltip().getStructureHint(); - } - - protected IAlignmentLimits getInitialAlignmentLimits() { - return (d, r, f) -> !f.isVerticallyFliped(); - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setByte("eRotation", (byte) mExtendedFacing.getRotation().getIndex()); - aNBT.setByte("eFlip", (byte) mExtendedFacing.getFlip().getIndex()); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - mExtendedFacing = ExtendedFacing.of(ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing()), - Rotation.byIndex(aNBT.getByte("eRotation")), - Flip.byIndex(aNBT.getByte("eFlip"))); - } - - @SuppressWarnings("unchecked") - private IStructureDefinition<GT_MetaTileEntity_EnhancedMultiBlockBase<T>> getCastedStructureDefinition() { - return (IStructureDefinition<GT_MetaTileEntity_EnhancedMultiBlockBase<T>>) getStructureDefinition(); - } - - /** - * Explanation of the world coordinate these offset means: - * - * Imagine you stand in front of the controller, with controller facing towards you not rotated or flipped. - * - * The horizontalOffset would be the number of blocks on the left side of the controller, not counting controller itself. - * The verticalOffset would be the number of blocks on the top side of the controller, not counting controller itself. - * The depthOffset would be the number of blocks between you and controller, not counting controller itself. - * - * All these offsets can be negative. - */ - protected final boolean checkPiece(String piece, int horizontalOffset, int verticalOffset, int depthOffset) { - final IGregTechTileEntity tTile = getBaseMetaTileEntity(); - return getCastedStructureDefinition().check(this, piece, tTile.getWorld(), getExtendedFacing(), tTile.getXCoord(), tTile.getYCoord(), tTile.getZCoord(), horizontalOffset, verticalOffset, depthOffset, !mMachine); - } - - protected final boolean buildPiece(String piece, ItemStack trigger, boolean hintOnly, int horizontalOffset, int verticalOffset, int depthOffset) { +public abstract class GT_MetaTileEntity_EnhancedMultiBlockBase<T extends GT_MetaTileEntity_EnhancedMultiBlockBase<T>> + extends GT_MetaTileEntity_TooltipMultiBlockBase implements IAlignment, IConstructable { + private ExtendedFacing mExtendedFacing = ExtendedFacing.DEFAULT; + private IAlignmentLimits mLimits = getInitialAlignmentLimits(); + + protected GT_MetaTileEntity_EnhancedMultiBlockBase(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + protected GT_MetaTileEntity_EnhancedMultiBlockBase(String aName) { + super(aName); + } + + @Override + public ExtendedFacing getExtendedFacing() { + return mExtendedFacing; + } + + @Override + public void setExtendedFacing(ExtendedFacing newExtendedFacing) { + if (mExtendedFacing != newExtendedFacing) { + if (mMachine) stopMachine(); + mExtendedFacing = newExtendedFacing; + final IGregTechTileEntity base = getBaseMetaTileEntity(); + mMachine = false; + mUpdated = false; + mUpdate = 100; + if (getBaseMetaTileEntity().isServerSide()) { + StructureLibAPI.sendAlignment( + (IAlignmentProvider) base, + new NetworkRegistry.TargetPoint( + base.getWorld().provider.dimensionId, + base.getXCoord(), + base.getYCoord(), + base.getZCoord(), + 512)); + } else { + base.issueTextureUpdate(); + } + } + } + + @Override + public final boolean isFacingValid(byte aFacing) { + return canSetToDirectionAny(ForgeDirection.getOrientation(aFacing)); + } + + @Override + public boolean onWrenchRightClick( + byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (aWrenchingSide != getBaseMetaTileEntity().getFrontFacing()) + return super.onWrenchRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ); + if (aPlayer.isSneaking()) { + // we won't be allowing horizontal flips, as it can be perfectly emulated by rotating twice and flipping + // horizontally + // allowing an extra round of flip make it hard to draw meaningful flip markers in GT_Proxy#drawGrid + toolSetFlip(getFlip().isHorizontallyFlipped() ? Flip.NONE : Flip.HORIZONTAL); + } else { + toolSetRotation(null); + } + return true; + } + + @Override + public void onFacingChange() { + toolSetDirection(ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing())); + } + + @Override + public IAlignmentLimits getAlignmentLimits() { + return mLimits; + } + + protected void setAlignmentLimits(IAlignmentLimits mLimits) { + this.mLimits = mLimits; + } + + /** + * Due to limitation of Java type system, you might need to do an unchecked cast. + * HOWEVER, the returned IStructureDefinition is expected to be evaluated against current instance only, and should + * not be used against other instances, even for those of the same class. + */ + public abstract IStructureDefinition<T> getStructureDefinition(); + + protected abstract GT_Multiblock_Tooltip_Builder createTooltip(); + + @Override + public String[] getStructureDescription(ItemStack stackSize) { + return getTooltip().getStructureHint(); + } + + protected IAlignmentLimits getInitialAlignmentLimits() { + return (d, r, f) -> !f.isVerticallyFliped(); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setByte("eRotation", (byte) mExtendedFacing.getRotation().getIndex()); + aNBT.setByte("eFlip", (byte) mExtendedFacing.getFlip().getIndex()); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + mExtendedFacing = ExtendedFacing.of( + ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing()), + Rotation.byIndex(aNBT.getByte("eRotation")), + Flip.byIndex(aNBT.getByte("eFlip"))); + } + + @SuppressWarnings("unchecked") + private IStructureDefinition<GT_MetaTileEntity_EnhancedMultiBlockBase<T>> getCastedStructureDefinition() { + return (IStructureDefinition<GT_MetaTileEntity_EnhancedMultiBlockBase<T>>) getStructureDefinition(); + } + + /** + * Explanation of the world coordinate these offset means: + * + * Imagine you stand in front of the controller, with controller facing towards you not rotated or flipped. + * + * The horizontalOffset would be the number of blocks on the left side of the controller, not counting controller itself. + * The verticalOffset would be the number of blocks on the top side of the controller, not counting controller itself. + * The depthOffset would be the number of blocks between you and controller, not counting controller itself. + * + * All these offsets can be negative. + */ + protected final boolean checkPiece(String piece, int horizontalOffset, int verticalOffset, int depthOffset) { final IGregTechTileEntity tTile = getBaseMetaTileEntity(); - return getCastedStructureDefinition().buildOrHints(this, trigger, piece, tTile.getWorld(), getExtendedFacing(), tTile.getXCoord(), tTile.getYCoord(), tTile.getZCoord(), horizontalOffset, verticalOffset, depthOffset, hintOnly); + return getCastedStructureDefinition() + .check( + this, + piece, + tTile.getWorld(), + getExtendedFacing(), + tTile.getXCoord(), + tTile.getYCoord(), + tTile.getZCoord(), + horizontalOffset, + verticalOffset, + depthOffset, + !mMachine); } - protected final int survivialBuildPiece(String piece, ItemStack trigger, int horizontalOffset, int verticalOffset, int depthOffset, int elementsBudget, IItemSource source, EntityPlayerMP actor, boolean check) { + protected final boolean buildPiece( + String piece, + ItemStack trigger, + boolean hintOnly, + int horizontalOffset, + int verticalOffset, + int depthOffset) { final IGregTechTileEntity tTile = getBaseMetaTileEntity(); - return getCastedStructureDefinition().survivalBuild(this, trigger, piece, tTile.getWorld(), getExtendedFacing(), tTile.getXCoord(), tTile.getYCoord(), tTile.getZCoord(), horizontalOffset, verticalOffset, depthOffset, elementsBudget, source, actor, check); + return getCastedStructureDefinition() + .buildOrHints( + this, + trigger, + piece, + tTile.getWorld(), + getExtendedFacing(), + tTile.getXCoord(), + tTile.getYCoord(), + tTile.getZCoord(), + horizontalOffset, + verticalOffset, + depthOffset, + hintOnly); } - protected final int survivialBuildPiece(String piece, ItemStack trigger, int horizontalOffset, int verticalOffset, int depthOffset, int elementsBudget, IItemSource source, EntityPlayerMP actor, boolean check, boolean checkIfPlaced) { - int built = survivialBuildPiece(piece, trigger, horizontalOffset, verticalOffset, depthOffset, elementsBudget, source, actor, check); + protected final int survivialBuildPiece( + String piece, + ItemStack trigger, + int horizontalOffset, + int verticalOffset, + int depthOffset, + int elementsBudget, + IItemSource source, + EntityPlayerMP actor, + boolean check) { + final IGregTechTileEntity tTile = getBaseMetaTileEntity(); + return getCastedStructureDefinition() + .survivalBuild( + this, + trigger, + piece, + tTile.getWorld(), + getExtendedFacing(), + tTile.getXCoord(), + tTile.getYCoord(), + tTile.getZCoord(), + horizontalOffset, + verticalOffset, + depthOffset, + elementsBudget, + source, + actor, + check); + } + + protected final int survivialBuildPiece( + String piece, + ItemStack trigger, + int horizontalOffset, + int verticalOffset, + int depthOffset, + int elementsBudget, + IItemSource source, + EntityPlayerMP actor, + boolean check, + boolean checkIfPlaced) { + int built = survivialBuildPiece( + piece, trigger, horizontalOffset, verticalOffset, depthOffset, elementsBudget, source, actor, check); if (checkIfPlaced && built > 0) checkStructure(true, getBaseMetaTileEntity()); return built; } - @Override - public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { - super.onFirstTick(aBaseMetaTileEntity); - if (aBaseMetaTileEntity.isClientSide()) - StructureLibAPI.queryAlignment((IAlignmentProvider) aBaseMetaTileEntity); - } + @Override + public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { + super.onFirstTick(aBaseMetaTileEntity); + if (aBaseMetaTileEntity.isClientSide()) + StructureLibAPI.queryAlignment((IAlignmentProvider) aBaseMetaTileEntity); + } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java index 82dbc3afd9..a92849a6d2 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java @@ -15,22 +15,39 @@ public abstract class GT_MetaTileEntity_Hatch extends GT_MetaTileEntity_BasicTan */ @Deprecated public byte mMachineBlock = 0; + private byte mTexturePage = 0; private byte actualTexture = 0; - public GT_MetaTileEntity_Hatch(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription, ITexture... aTextures) { + public GT_MetaTileEntity_Hatch( + int aID, + String aName, + String aNameRegional, + int aTier, + int aInvSlotCount, + String aDescription, + ITexture... aTextures) { super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures); } - public GT_MetaTileEntity_Hatch(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String[] aDescription, ITexture... aTextures) { + public GT_MetaTileEntity_Hatch( + int aID, + String aName, + String aNameRegional, + int aTier, + int aInvSlotCount, + String[] aDescription, + ITexture... aTextures) { super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures); } - public GT_MetaTileEntity_Hatch(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_Hatch( + String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } - public GT_MetaTileEntity_Hatch(String aName, int aTier, int aInvSlotCount, String []aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_Hatch( + String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @@ -48,30 +65,35 @@ public abstract class GT_MetaTileEntity_Hatch extends GT_MetaTileEntity_BasicTan public abstract ITexture[] getTexturesInactive(ITexture aBaseTexture); @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - int textureIndex = actualTexture | (mTexturePage << 7);//Shift seven since one page is 128 textures! - int texturePointer = (byte) (actualTexture & 0x7F);//just to be sure, from my testing the 8th bit cannot be set clientside + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { + int textureIndex = actualTexture | (mTexturePage << 7); // Shift seven since one page is 128 textures! + int texturePointer = + (byte) (actualTexture & 0x7F); // just to be sure, from my testing the 8th bit cannot be set clientside try { if (aSide != aFacing) { if (textureIndex > 0) - return new ITexture[]{Textures.BlockIcons.casingTexturePages[mTexturePage][texturePointer]}; - else - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1]}; + return new ITexture[] {Textures.BlockIcons.casingTexturePages[mTexturePage][texturePointer]}; + else return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1]}; } else { if (textureIndex > 0) { if (aActive) return getTexturesActive(Textures.BlockIcons.casingTexturePages[mTexturePage][texturePointer]); else - return getTexturesInactive(Textures.BlockIcons.casingTexturePages[mTexturePage][texturePointer]); + return getTexturesInactive( + Textures.BlockIcons.casingTexturePages[mTexturePage][texturePointer]); } else { - if (aActive) - return getTexturesActive(Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1]); - else - return getTexturesInactive(Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1]); + if (aActive) return getTexturesActive(Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1]); + else return getTexturesInactive(Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1]); } } } catch (NullPointerException npe) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[0][0]}; + return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[0][0]}; } } @@ -85,21 +107,21 @@ public abstract class GT_MetaTileEntity_Hatch extends GT_MetaTileEntity_BasicTan @Override public void loadNBTData(NBTTagCompound aNBT) { super.loadNBTData(aNBT); - actualTexture=aNBT.getByte("mMachineBlock"); - mTexturePage=aNBT.getByte("mTexturePage"); + actualTexture = aNBT.getByte("mMachineBlock"); + mTexturePage = aNBT.getByte("mTexturePage"); - if(mTexturePage!=0 && GT_Values.GT.isServerSide()) - actualTexture|=0x80;//<- lets just hope no one needs the correct value for that on server - mMachineBlock=actualTexture; + if (mTexturePage != 0 && GT_Values.GT.isServerSide()) + actualTexture |= 0x80; // <- lets just hope no one needs the correct value for that on server + mMachineBlock = actualTexture; } /** * Sets texture with page and index, called on add to machine list * @param id (page<<7)+index of the texture */ - public final void updateTexture(int id){ + public final void updateTexture(int id) { onValueUpdate((byte) id); - onTexturePageUpdate((byte) (id>>7)); + onTexturePageUpdate((byte) (id >> 7)); } /** @@ -108,34 +130,35 @@ public abstract class GT_MetaTileEntity_Hatch extends GT_MetaTileEntity_BasicTan * @param index index of texure */ @Deprecated - public final void updateTexture(byte page, byte index){ + public final void updateTexture(byte page, byte index) { onValueUpdate(index); onTexturePageUpdate(page); } @Override public final void onValueUpdate(byte aValue) { - actualTexture=(byte)(aValue & 0x7F); - mMachineBlock=actualTexture; - mTexturePage=0; + actualTexture = (byte) (aValue & 0x7F); + mMachineBlock = actualTexture; + mTexturePage = 0; } @Override public final byte getUpdateData() { - return (byte)(actualTexture & 0x7F); + return (byte) (actualTexture & 0x7F); } public final void onTexturePageUpdate(byte aValue) { - mTexturePage = (byte)(aValue & 0x7F); - if(mTexturePage!=0 && getBaseMetaTileEntity().isServerSide()) {//just to be sure - mMachineBlock|=0x80;//<- lets just hope no one needs the correct value for that on server - actualTexture=mMachineBlock; + mTexturePage = (byte) (aValue & 0x7F); + if (mTexturePage != 0 && getBaseMetaTileEntity().isServerSide()) { // just to be sure + mMachineBlock |= 0x80; // <- lets just hope no one needs the correct value for that on server + actualTexture = mMachineBlock; } - //set last bit to allow working of the page reset-er to 0 in rare case when texture id is the same but page changes to 0 + // set last bit to allow working of the page reset-er to 0 in rare case when texture id is the same but page + // changes to 0 } public final byte getTexturePage() { - return (byte)(mTexturePage & 0x7F); + return (byte) (mTexturePage & 0x7F); } @Override @@ -169,16 +192,22 @@ public abstract class GT_MetaTileEntity_Hatch extends GT_MetaTileEntity_BasicTan } @Override - public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {//in that method since it is usually not overriden, especially for hatches. - if(actualTexture!=mMachineBlock){//revert to page 0 on edition of the field - old code way - actualTexture=(byte)(mMachineBlock & 0x7F); - mMachineBlock=actualTexture;//clear last bit in mMachineBlock since now we are at page 0 after the direct field change - mTexturePage=0;//assuming old code only supports page 0 + public void onPreTick( + IGregTechTileEntity aBaseMetaTileEntity, + long aTick) { // in that method since it is usually not overriden, especially for hatches. + if (actualTexture != mMachineBlock) { // revert to page 0 on edition of the field - old code way + actualTexture = (byte) (mMachineBlock & 0x7F); + mMachineBlock = + actualTexture; // clear last bit in mMachineBlock since now we are at page 0 after the direct field + // change + mTexturePage = 0; // assuming old code only supports page 0 } super.onPreTick(aBaseMetaTileEntity, aTick); } - //To change to other page -> use the setter method -> updateTexture + // To change to other page -> use the setter method -> updateTexture - public int getCircuitSlot() { return -1; } + public int getCircuitSlot() { + return -1; + } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DataAccess.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DataAccess.java index ab6ba80f1b..bc4b82477d 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DataAccess.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DataAccess.java @@ -1,5 +1,7 @@ package gregtech.api.metatileentity.implementations; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_DATA_ACCESS; + import gregtech.api.gui.GT_Container_2by2; import gregtech.api.gui.GT_Container_4by4; import gregtech.api.gui.GT_GUIContainer_2by2; @@ -14,33 +16,32 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_DATA_ACCESS; - public class GT_MetaTileEntity_Hatch_DataAccess extends GT_MetaTileEntity_Hatch { - private int timeout=4; + private int timeout = 4; public GT_MetaTileEntity_Hatch_DataAccess(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 16, new String[]{ - "Data Access for Multiblocks", - "Adds " + (aTier == 4 ? 4 : 16) + " extra slots for Data Sticks"}); + super(aID, aName, aNameRegional, aTier, 16, new String[] { + "Data Access for Multiblocks", "Adds " + (aTier == 4 ? 4 : 16) + " extra slots for Data Sticks" + }); } public GT_MetaTileEntity_Hatch_DataAccess(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aTier == 4 ? 4 : 16, aDescription, aTextures); } - public GT_MetaTileEntity_Hatch_DataAccess(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_Hatch_DataAccess( + String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aTier == 4 ? 4 : 16, aDescription, aTextures); } @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_DATA_ACCESS)}; + return new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_DATA_ACCESS)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_DATA_ACCESS)}; + return new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_DATA_ACCESS)}; } @Override @@ -89,21 +90,24 @@ public class GT_MetaTileEntity_Hatch_DataAccess extends GT_MetaTileEntity_Hatch public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { switch (mTier) { case 4: - return new GT_GUIContainer_2by2(aPlayerInventory, aBaseMetaTileEntity, "Data Access Hatch", "DataAccess"); + return new GT_GUIContainer_2by2( + aPlayerInventory, aBaseMetaTileEntity, "Data Access Hatch", "DataAccess"); default: - return new GT_GUIContainer_4by4(aPlayerInventory, aBaseMetaTileEntity, "Data Access Hatch", "DataAccess"); + return new GT_GUIContainer_4by4( + aPlayerInventory, aBaseMetaTileEntity, "Data Access Hatch", "DataAccess"); } } @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return mTier>=8 && !aBaseMetaTileEntity.isActive(); + return mTier >= 8 && !aBaseMetaTileEntity.isActive(); } @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return mTier>=8 && !aBaseMetaTileEntity.isActive(); + return mTier >= 8 && !aBaseMetaTileEntity.isActive(); } + @Override public int getInventoryStackLimit() { return 1; @@ -117,12 +121,11 @@ public class GT_MetaTileEntity_Hatch_DataAccess extends GT_MetaTileEntity_Hatch aBaseMetaTileEntity.setActive(false); } } - } - public void setActive(boolean mActive){ + public void setActive(boolean mActive) { getBaseMetaTileEntity().setActive(mActive); - timeout=mActive?4:0; + timeout = mActive ? 4 : 0; } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Dynamo.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Dynamo.java index ae2aea8e4a..e9ba5ec512 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Dynamo.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Dynamo.java @@ -1,5 +1,7 @@ package gregtech.api.metatileentity.implementations; +import static gregtech.api.enums.GT_Values.V; + import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -7,14 +9,15 @@ import gregtech.api.metatileentity.MetaTileEntity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import static gregtech.api.enums.GT_Values.V; - public class GT_MetaTileEntity_Hatch_Dynamo extends GT_MetaTileEntity_Hatch { public GT_MetaTileEntity_Hatch_Dynamo(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 0, new String[]{"Generating electric Energy from Multiblocks", "Puts out up to 1 Amp"}); + super(aID, aName, aNameRegional, aTier, 0, new String[] { + "Generating electric Energy from Multiblocks", "Puts out up to 1 Amp" + }); } - public GT_MetaTileEntity_Hatch_Dynamo(int aID, String aName, String aNameRegional, int aTier, String[] aDescription) { + public GT_MetaTileEntity_Hatch_Dynamo( + int aID, String aName, String aNameRegional, int aTier, String[] aDescription) { super(aID, aName, aNameRegional, aTier, 0, aDescription); } @@ -28,12 +31,12 @@ public class GT_MetaTileEntity_Hatch_Dynamo extends GT_MetaTileEntity_Hatch { @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier]}; + return new ITexture[] {aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier]}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier]}; + return new ITexture[] {aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier]}; } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy.java index a6bdc6726c..acc302e903 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy.java @@ -1,5 +1,7 @@ package gregtech.api.metatileentity.implementations; +import static gregtech.api.enums.GT_Values.V; + import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -7,16 +9,17 @@ import gregtech.api.metatileentity.MetaTileEntity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import static gregtech.api.enums.GT_Values.V; - public class GT_MetaTileEntity_Hatch_Energy extends GT_MetaTileEntity_Hatch { - public GT_MetaTileEntity_Hatch_Energy(int aID, String aName, String aNameRegional, int aTier, String[] aDescription) { + public GT_MetaTileEntity_Hatch_Energy( + int aID, String aName, String aNameRegional, int aTier, String[] aDescription) { super(aID, aName, aNameRegional, aTier, 0, aDescription); } public GT_MetaTileEntity_Hatch_Energy(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 0, new String[]{"Energy Injector for Multiblocks", "Accepts up to 2 Amps"}); + super(aID, aName, aNameRegional, aTier, 0, new String[] { + "Energy Injector for Multiblocks", "Accepts up to 2 Amps" + }); } public GT_MetaTileEntity_Hatch_Energy(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { @@ -27,18 +30,19 @@ public class GT_MetaTileEntity_Hatch_Energy extends GT_MetaTileEntity_Hatch { super(aName, aTier, 0, aDescription, aTextures); } - public GT_MetaTileEntity_Hatch_Energy(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_Hatch_Energy( + String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, 0, aDescription, aTextures); } @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier]}; + return new ITexture[] {aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier]}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier]}; + return new ITexture[] {aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier]}; } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java index 99c89e091a..cb2c869edc 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java @@ -1,5 +1,8 @@ package gregtech.api.metatileentity.implementations; +import static gregtech.api.enums.Textures.BlockIcons.FLUID_IN_SIGN; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_IN; + import gregtech.GT_Mod; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -12,23 +15,21 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.fluids.FluidStack; -import static gregtech.api.enums.Textures.BlockIcons.FLUID_IN_SIGN; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_IN; - public class GT_MetaTileEntity_Hatch_Input extends GT_MetaTileEntity_Hatch { public GT_Recipe_Map mRecipeMap = null; public GT_MetaTileEntity_Hatch_Input(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 3, new String[]{ - "Fluid Input for Multiblocks", - "Capacity: " + GT_Utility.formatNumbers(8000*(1<<aTier)) + "L"}); + super(aID, aName, aNameRegional, aTier, 3, new String[] { + "Fluid Input for Multiblocks", "Capacity: " + GT_Utility.formatNumbers(8000 * (1 << aTier)) + "L" + }); } public GT_MetaTileEntity_Hatch_Input(int aID, int aSlot, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, aSlot, new String[]{ + super(aID, aName, aNameRegional, aTier, aSlot, new String[] { "Fluid Input for Multiblocks", - "Capacity: " + GT_Utility.formatNumbers(8000*(1<<aTier) / aSlot) + "L", - "Can hold " + aSlot + " types of fluid."}); + "Capacity: " + GT_Utility.formatNumbers(8000 * (1 << aTier) / aSlot) + "L", + "Can hold " + aSlot + " types of fluid." + }); } public GT_MetaTileEntity_Hatch_Input(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { @@ -39,22 +40,23 @@ public class GT_MetaTileEntity_Hatch_Input extends GT_MetaTileEntity_Hatch { super(aName, aTier, 3, aDescription, aTextures); } - public GT_MetaTileEntity_Hatch_Input(String aName, int aSlots, int aTier, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_Hatch_Input( + String aName, int aSlots, int aTier, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aSlots, aDescription, aTextures); } @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch ? - new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(FLUID_IN_SIGN)} : - new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN)}; + return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch + ? new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(FLUID_IN_SIGN)} + : new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch ? - new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(FLUID_IN_SIGN)} : - new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN)}; + return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch + ? new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(FLUID_IN_SIGN)} + : new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN)}; } @Override @@ -80,8 +82,7 @@ public class GT_MetaTileEntity_Hatch_Input extends GT_MetaTileEntity_Hatch { @Override public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); - if (mRecipeMap != null) - aNBT.setString("recipeMap", mRecipeMap.mUniqueIdentifier); + if (mRecipeMap != null) aNBT.setString("recipeMap", mRecipeMap.mUniqueIdentifier); } @Override @@ -99,7 +100,7 @@ public class GT_MetaTileEntity_Hatch_Input extends GT_MetaTileEntity_Hatch { @Override public boolean doesFillContainers() { - //return true; + // return true; return false; } @@ -145,12 +146,16 @@ public class GT_MetaTileEntity_Hatch_Input extends GT_MetaTileEntity_Hatch { @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return aSide == aBaseMetaTileEntity.getFrontFacing() && aIndex == 0 && (mRecipeMap == null || mRecipeMap.containsInput(aStack) || mRecipeMap.containsInput(GT_Utility.getFluidForFilledItem(aStack, true))); + return aSide == aBaseMetaTileEntity.getFrontFacing() + && aIndex == 0 + && (mRecipeMap == null + || mRecipeMap.containsInput(aStack) + || mRecipeMap.containsInput(GT_Utility.getFluidForFilledItem(aStack, true))); } @Override public int getCapacity() { - return 8000*(1<<mTier); + return 8000 * (1 << mTier); } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java index ba6e1698b1..f37befb63b 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java @@ -1,5 +1,7 @@ package gregtech.api.metatileentity.implementations; +import static gregtech.api.enums.Textures.BlockIcons.*; + import gregtech.GT_Mod; import gregtech.api.gui.*; import gregtech.api.interfaces.ITexture; @@ -12,18 +14,15 @@ import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; import gregtech.api.util.extensions.ArrayExt; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.StatCollector; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import static gregtech.api.enums.Textures.BlockIcons.*; - public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch implements IConfigurationCircuitSupport { public GT_Recipe_Map mRecipeMap = null; public boolean disableSort; @@ -34,19 +33,27 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch im this(id, name, nameRegional, tier, getSlots(tier) + 1); } - protected GT_MetaTileEntity_Hatch_InputBus(int id, String name, String nameRegional, int tier, int slots, String[] description) { + protected GT_MetaTileEntity_Hatch_InputBus( + int id, String name, String nameRegional, int tier, int slots, String[] description) { super(id, name, nameRegional, tier, slots, description); } public GT_MetaTileEntity_Hatch_InputBus(int id, String name, String nameRegional, int tier, int slots) { - super(id, name, nameRegional, tier, slots, ArrayExt.of( - "Item Input for Multiblocks", - "Shift + right click with screwdriver to turn Sort mode on/off", - "Capacity: " + slots + " stack" + (slots >= 2 ? "s" : ""))); + super( + id, + name, + nameRegional, + tier, + slots, + ArrayExt.of( + "Item Input for Multiblocks", + "Shift + right click with screwdriver to turn Sort mode on/off", + "Capacity: " + slots + " stack" + (slots >= 2 ? "s" : ""))); } @Deprecated - // having too many constructors is bad, don't be so lazy, use GT_MetaTileEntity_Hatch_InputBus(String, int, String[], ITexture[][][]) + // having too many constructors is bad, don't be so lazy, use GT_MetaTileEntity_Hatch_InputBus(String, int, + // String[], ITexture[][][]) public GT_MetaTileEntity_Hatch_InputBus(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { this(aName, aTier, ArrayExt.of(aDescription), aTextures); } @@ -55,22 +62,23 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch im this(aName, aTier, getSlots(aTier) + 1, aDescription, aTextures); } - public GT_MetaTileEntity_Hatch_InputBus(String aName, int aTier, int aSlots, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_Hatch_InputBus( + String aName, int aTier, int aSlots, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aSlots, aDescription, aTextures); } @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch ? - new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(ITEM_IN_SIGN)} : - new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN)}; + return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch + ? new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(ITEM_IN_SIGN)} + : new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch ? - new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(ITEM_IN_SIGN)} : - new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN)}; + return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch + ? new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(ITEM_IN_SIGN)} + : new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN)}; } @Override @@ -129,13 +137,12 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch im return 63; } - @Override public void initDefaultModes(NBTTagCompound aNBT) { if (!getBaseMetaTileEntity().getWorld().isRemote) { - GT_ClientPreference tPreference = GT_Mod.gregtechproxy.getClientPreference(getBaseMetaTileEntity().getOwnerUuid()); - if (tPreference != null) - disableFilter = !tPreference.isInputBusInitialFilterEnabled(); + GT_ClientPreference tPreference = GT_Mod.gregtechproxy.getClientPreference( + getBaseMetaTileEntity().getOwnerUuid()); + if (tPreference != null) disableFilter = !tPreference.isInputBusInitialFilterEnabled(); } } @@ -164,10 +171,8 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch im public void updateSlots() { for (int i = 0; i < mInventory.length - 1; i++) - if (mInventory[i] != null && mInventory[i].stackSize <= 0) - mInventory[i] = null; - if (!disableSort) - fillStacksIntoFirstSlots(); + if (mInventory[i] != null && mInventory[i].stackSize <= 0) mInventory[i] = null; + if (!disableSort) fillStacksIntoFirstSlots(); } protected void fillStacksIntoFirstSlots() { @@ -177,24 +182,20 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch im List<GT_Utility.ItemId> order = new ArrayList<>(L); List<Integer> validSlots = new ArrayList<>(L); for (int i = 0; i < L; i++) { - if (!isValidSlot(i)) - continue; + if (!isValidSlot(i)) continue; validSlots.add(i); ItemStack s = mInventory[i]; - if(s == null) - continue; + if (s == null) continue; GT_Utility.ItemId sID = GT_Utility.ItemId.createNoCopy(s); slots.merge(sID, s.stackSize, Integer::sum); - if(!stacks.containsKey(sID)) - stacks.put(sID, s); + if (!stacks.containsKey(sID)) stacks.put(sID, s); order.add(sID); mInventory[i] = null; } int slotindex = 0; for (GT_Utility.ItemId sID : order) { int toSet = slots.get(sID); - if (toSet == 0) - continue; + if (toSet == 0) continue; int slot = validSlots.get(slotindex); slotindex++; mInventory[slot] = stacks.get(sID).copy(); @@ -210,8 +211,7 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch im aNBT.setBoolean("disableSort", disableSort); aNBT.setBoolean("disableFilter", disableFilter); aNBT.setBoolean("disableLimited", disableLimited); - if (mRecipeMap != null) - aNBT.setString("recipeMap", mRecipeMap.mUniqueIdentifier); + if (mRecipeMap != null) aNBT.setString("recipeMap", mRecipeMap.mUniqueIdentifier); } @Override @@ -219,60 +219,64 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch im super.loadNBTData(aNBT); disableSort = aNBT.getBoolean("disableSort"); disableFilter = aNBT.getBoolean("disableFilter"); - if(aNBT.hasKey("disableLimited")) - disableLimited = aNBT.getBoolean("disableLimited"); + if (aNBT.hasKey("disableLimited")) disableLimited = aNBT.getBoolean("disableLimited"); mRecipeMap = GT_Recipe_Map.sIndexedMappings.getOrDefault(aNBT.getString("recipeMap"), null); } @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (!getBaseMetaTileEntity().getCoverBehaviorAtSideNew(aSide).isGUIClickable(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getComplexCoverDataAtSide(aSide), getBaseMetaTileEntity())) - return; + if (!getBaseMetaTileEntity() + .getCoverBehaviorAtSideNew(aSide) + .isGUIClickable( + aSide, + getBaseMetaTileEntity().getCoverIDAtSide(aSide), + getBaseMetaTileEntity().getComplexCoverDataAtSide(aSide), + getBaseMetaTileEntity())) return; if (aPlayer.isSneaking()) { - if(disableSort) { + if (disableSort) { disableSort = false; } else { - if(disableLimited) { + if (disableLimited) { disableLimited = false; } else { disableSort = true; disableLimited = true; } } - GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("GT5U.hatch.disableSort." + disableSort) + " " + - StatCollector.translateToLocal("GT5U.hatch.disableLimited." + disableLimited)); + GT_Utility.sendChatToPlayer( + aPlayer, + StatCollector.translateToLocal("GT5U.hatch.disableSort." + disableSort) + " " + + StatCollector.translateToLocal("GT5U.hatch.disableLimited." + disableLimited)); } else { disableFilter = !disableFilter; - GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("GT5U.hatch.disableFilter." + disableFilter)); + GT_Utility.sendChatToPlayer( + aPlayer, StatCollector.translateToLocal("GT5U.hatch.disableFilter." + disableFilter)); } } @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - if (aIndex == getCircuitSlot()) - return false; + if (aIndex == getCircuitSlot()) return false; return aSide == getBaseMetaTileEntity().getFrontFacing(); } @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return aSide == getBaseMetaTileEntity().getFrontFacing() && aIndex != getCircuitSlot() + return aSide == getBaseMetaTileEntity().getFrontFacing() + && aIndex != getCircuitSlot() && (mRecipeMap == null || disableFilter || mRecipeMap.containsInput(aStack)) && (disableLimited || limitedAllowPutStack(aIndex, aStack)); } protected boolean limitedAllowPutStack(int aIndex, ItemStack aStack) { for (int i = 0; i < getSizeInventory(); i++) - if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get_nocopy(aStack), mInventory[i])) - return i == aIndex; + if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get_nocopy(aStack), mInventory[i])) return i == aIndex; return mInventory[aIndex] == null; } - public void startRecipeProcessing() { - } + public void startRecipeProcessing() {} - public void endRecipeProcessing() { - } + public void endRecipeProcessing() {} @Override public boolean allowSelectCircuit() { @@ -280,5 +284,7 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch im } @Override - public int getCircuitSlot() { return getSlots(mTier); } + public int getCircuitSlot() { + return getSlots(mTier); + } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java index bdfd06c92f..fada5a9b7c 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java @@ -1,5 +1,12 @@ package gregtech.api.metatileentity.implementations; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_AUTOMAINTENANCE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_AUTOMAINTENANCE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_AUTOMAINTENANCE_IDLE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_AUTOMAINTENANCE_IDLE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_DUCTTAPE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_MAINTENANCE; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; @@ -27,16 +34,15 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.FakePlayer; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_AUTOMAINTENANCE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_AUTOMAINTENANCE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_AUTOMAINTENANCE_IDLE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_AUTOMAINTENANCE_IDLE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_DUCTTAPE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_MAINTENANCE; - public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch { private static ItemStack[] sAutoMaintenanceInputs; - public boolean mWrench = false, mScrewdriver = false, mSoftHammer = false, mHardHammer = false, mSolderingTool = false, mCrowbar = false, mAuto; + public boolean mWrench = false, + mScrewdriver = false, + mSoftHammer = false, + mHardHammer = false, + mSolderingTool = false, + mCrowbar = false, + mAuto; public GT_MetaTileEntity_Hatch_Maintenance(int aID, String aName, String aNameRegional, int aTier) { super(aID, aName, aNameRegional, aTier, 1, "For maintaining Multiblocks"); @@ -48,24 +54,26 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch mAuto = aAuto; } - public GT_MetaTileEntity_Hatch_Maintenance(String aName, int aTier, String aDescription, ITexture[][][] aTextures, boolean aAuto) { + public GT_MetaTileEntity_Hatch_Maintenance( + String aName, int aTier, String aDescription, ITexture[][][] aTextures, boolean aAuto) { super(aName, aTier, aAuto ? 4 : 1, aDescription, aTextures); mAuto = aAuto; } - public GT_MetaTileEntity_Hatch_Maintenance(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, boolean aAuto) { + public GT_MetaTileEntity_Hatch_Maintenance( + String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, boolean aAuto) { super(aName, aTier, aAuto ? 4 : 1, aDescription, aTextures); mAuto = aAuto; } private static ItemStack[] getAutoMaintenanceInputs() { if (sAutoMaintenanceInputs == null) - sAutoMaintenanceInputs = new ItemStack[]{ - ItemList.Duct_Tape.get(4), - GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Lubricant, 2), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 4), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 2) - }; + sAutoMaintenanceInputs = new ItemStack[] { + ItemList.Duct_Tape.get(4), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Lubricant, 2), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 4), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 2) + }; return sAutoMaintenanceInputs; } @@ -88,25 +96,31 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - if (mAuto) return new ITexture[]{ + if (mAuto) + return new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_AUTOMAINTENANCE_IDLE), - TextureFactory.builder().addIcon(OVERLAY_AUTOMAINTENANCE_IDLE_GLOW).glow().build()}; - return new ITexture[]{ - aBaseTexture, - TextureFactory.of(OVERLAY_MAINTENANCE)}; + TextureFactory.builder() + .addIcon(OVERLAY_AUTOMAINTENANCE_IDLE_GLOW) + .glow() + .build() + }; + return new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_MAINTENANCE)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - if (mAuto) return new ITexture[]{ + if (mAuto) + return new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_AUTOMAINTENANCE), - TextureFactory.builder().addIcon(OVERLAY_AUTOMAINTENANCE_GLOW).glow().build()}; - return new ITexture[]{ - aBaseTexture, - TextureFactory.of(OVERLAY_MAINTENANCE), - TextureFactory.of(OVERLAY_DUCTTAPE)}; + TextureFactory.builder() + .addIcon(OVERLAY_AUTOMAINTENANCE_GLOW) + .glow() + .build() + }; + return new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_MAINTENANCE), TextureFactory.of(OVERLAY_DUCTTAPE) + }; } @Override @@ -142,17 +156,17 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch } @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) { - if (aBaseMetaTileEntity.isClientSide()) - return true; + public boolean onRightclick( + IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) { + if (aBaseMetaTileEntity.isClientSide()) return true; if (aSide == aBaseMetaTileEntity.getFrontFacing()) { // only allow OC robot fake player - if (aPlayer instanceof FakePlayer && !aPlayer.getGameProfile().getName().endsWith(".robot")) - return false; - if (aPlayer.getCurrentEquippedItem() != null && aPlayer.getCurrentEquippedItem().getItem() instanceof ItemToolbox) + if (aPlayer instanceof FakePlayer + && !aPlayer.getGameProfile().getName().endsWith(".robot")) return false; + if (aPlayer.getCurrentEquippedItem() != null + && aPlayer.getCurrentEquippedItem().getItem() instanceof ItemToolbox) applyToolbox(aPlayer.getCurrentEquippedItem(), aPlayer); - else - aBaseMetaTileEntity.openGUI(aPlayer); + else aBaseMetaTileEntity.openGUI(aPlayer); return true; } return false; @@ -175,21 +189,20 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch if (mInventory[i] != null && mInventory[i].stackSize <= 0) mInventory[i] = null; } - @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPostTick(aBaseMetaTileEntity, aTick); - if(aBaseMetaTileEntity.isServerSide() && mAuto && aTick % 100L ==0L){ + if (aBaseMetaTileEntity.isServerSide() && mAuto && aTick % 100L == 0L) { aBaseMetaTileEntity.setActive(!isRecipeInputEqual(false)); } } - public boolean autoMaintainance(){ + public boolean autoMaintainance() { return isRecipeInputEqual(true); } public boolean isRecipeInputEqual(boolean aDecreaseStacksizeBySuccess) { - ItemStack[] mInputs= getAutoMaintenanceInputs(); + ItemStack[] mInputs = getAutoMaintenanceInputs(); int amt; @@ -198,7 +211,9 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch amt = tStack.stackSize; boolean temp = true; for (ItemStack aStack : mInventory) { - if ((GT_Utility.areUnificationsEqual(aStack, tStack, true) || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(false, aStack), tStack, true))) { + if ((GT_Utility.areUnificationsEqual(aStack, tStack, true) + || GT_Utility.areUnificationsEqual( + GT_OreDictUnificator.get(false, aStack), tStack, true))) { amt -= aStack.stackSize; if (amt < 1) { temp = false; @@ -215,7 +230,9 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch if (tStack != null) { amt = tStack.stackSize; for (ItemStack aStack : mInventory) { - if ((GT_Utility.areUnificationsEqual(aStack, tStack, true) || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(false, aStack), tStack, true))) { + if ((GT_Utility.areUnificationsEqual(aStack, tStack, true) + || GT_Utility.areUnificationsEqual( + GT_OreDictUnificator.get(false, aStack), tStack, true))) { if (aStack.stackSize < amt) { amt -= aStack.stackSize; aStack.stackSize = 0; @@ -244,20 +261,25 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch // Allow IC2 Toolbox with tools to function for maint issues. if (aStack.getItem() instanceof ItemToolbox && aPlayer instanceof EntityPlayer) { - applyToolbox(aStack, (EntityPlayer)aPlayer); + applyToolbox(aStack, (EntityPlayer) aPlayer); return; } - if (GT_Utility.isStackInList(aStack, GregTech_API.sWrenchList) && !mWrench && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) - mWrench = true; - if (GT_Utility.isStackInList(aStack, GregTech_API.sScrewdriverList) && !mScrewdriver && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) - mScrewdriver = true; - if (GT_Utility.isStackInList(aStack, GregTech_API.sSoftHammerList) && !mSoftHammer && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) - mSoftHammer = true; - if (GT_Utility.isStackInList(aStack, GregTech_API.sHardHammerList) && !mHardHammer && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) - mHardHammer = true; - if (GT_Utility.isStackInList(aStack, GregTech_API.sCrowbarList) && !mCrowbar && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) - mCrowbar = true; + if (GT_Utility.isStackInList(aStack, GregTech_API.sWrenchList) + && !mWrench + && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) mWrench = true; + if (GT_Utility.isStackInList(aStack, GregTech_API.sScrewdriverList) + && !mScrewdriver + && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) mScrewdriver = true; + if (GT_Utility.isStackInList(aStack, GregTech_API.sSoftHammerList) + && !mSoftHammer + && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) mSoftHammer = true; + if (GT_Utility.isStackInList(aStack, GregTech_API.sHardHammerList) + && !mHardHammer + && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) mHardHammer = true; + if (GT_Utility.isStackInList(aStack, GregTech_API.sCrowbarList) + && !mCrowbar + && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) mCrowbar = true; if (!mSolderingTool && GT_ModHandler.useSolderingIron(aStack, aPlayer, aToolboxInventory)) mSolderingTool = true; if (GT_OreDictUnificator.isItemStackInstanceOf(aStack, "craftingDuctTape")) { @@ -281,7 +303,7 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch private void applyToolbox(ItemStack aStack, EntityPlayer aPlayer) { ItemToolbox aToolbox = (ItemToolbox) aStack.getItem(); IHasGui aToolboxGUI = aToolbox.getInventory(aPlayer, aStack); - for (int i = 0; i < aToolboxGUI.getSizeInventory(); i ++) { + for (int i = 0; i < aToolboxGUI.getSizeInventory(); i++) { if (aToolboxGUI.getStackInSlot(i) != null) { onToolClick(aToolboxGUI.getStackInSlot(i), aPlayer, aToolboxGUI); if (aToolboxGUI.getStackInSlot(i) != null && aToolboxGUI.getStackInSlot(i).stackSize <= 0) @@ -299,10 +321,12 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { if (mAuto && GT_Mod.gregtechproxy.mAMHInteraction) { for (int i = 0; i < getSizeInventory(); i++) - if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(false, aStack), GT_OreDictUnificator.get(false, getStackInSlot(i)))) + if (GT_Utility.areStacksEqual( + GT_OreDictUnificator.get(false, aStack), GT_OreDictUnificator.get(false, getStackInSlot(i)))) return i == aIndex; for (ItemStack tInput : getAutoMaintenanceInputs()) - if (GT_Utility.areUnificationsEqual(tInput, aStack, true) || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(false, aStack), tInput, true)) + if (GT_Utility.areUnificationsEqual(tInput, aStack, true) + || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(false, aStack), tInput, true)) return true; } return false; diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java index 6d59b4ff7f..d65370901b 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java @@ -1,5 +1,8 @@ package gregtech.api.metatileentity.implementations; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_MUFFLER; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.GT_Mod; @@ -12,24 +15,19 @@ import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.WorldSpawnedEventBuilder; import gregtech.common.GT_Pollution; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_Cleanroom; +import java.util.Arrays; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import java.util.Arrays; - -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_MUFFLER; -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; - @SuppressWarnings("unused") // Unused API is expected within scope public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { private static final String localizedDescFormat = GT_LanguageManager.addStringLocalization( "gt.blockmachines.hatch.muffler.desc.format", - "Outputs the Pollution (Might cause ... things)%n" + - "DO NOT OBSTRUCT THE OUTPUT!%n" + - "Reduces Pollution to %d%%%n" + - "Recovers %d%% of CO2/CO/SO2"); + "Outputs the Pollution (Might cause ... things)%n" + "DO NOT OBSTRUCT THE OUTPUT!%n" + + "Reduces Pollution to %d%%%n" + + "Recovers %d%% of CO2/CO/SO2"); private final int pollutionReduction = calculatePollutionReduction(100); private final int pollutionRecover = 100 - pollutionReduction; private final String[] description = String.format(localizedDescFormat, pollutionReduction, pollutionRecover) @@ -41,7 +39,7 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { } public GT_MetaTileEntity_Hatch_Muffler(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - this(aName, aTier, new String[]{aDescription}, aTextures); + this(aName, aTier, new String[] {aDescription}, aTextures); } public GT_MetaTileEntity_Hatch_Muffler(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { @@ -56,12 +54,12 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_MUFFLER)}; + return new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_MUFFLER)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_MUFFLER)}; + return new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_MUFFLER)}; } @Override @@ -154,16 +152,25 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { .setMotion(xSpd, ySpd, zSpd); if (chk1) { - events.setPosition(xPos + ran1 * 0.5F, yPos + XSTR_INSTANCE.nextFloat() * 0.5F, zPos + XSTR_INSTANCE.nextFloat() * 0.5F) - .run(); + events.setPosition( + xPos + ran1 * 0.5F, + yPos + XSTR_INSTANCE.nextFloat() * 0.5F, + zPos + XSTR_INSTANCE.nextFloat() * 0.5F) + .run(); } if (chk2) { - events.setPosition(xPos + ran2 * 0.5F, yPos + XSTR_INSTANCE.nextFloat() * 0.5F, zPos + XSTR_INSTANCE.nextFloat() * 0.5F) - .run(); + events.setPosition( + xPos + ran2 * 0.5F, + yPos + XSTR_INSTANCE.nextFloat() * 0.5F, + zPos + XSTR_INSTANCE.nextFloat() * 0.5F) + .run(); } if (chk3) { - events.setPosition(xPos + ran3 * 0.5F, yPos + XSTR_INSTANCE.nextFloat() * 0.5F, zPos + XSTR_INSTANCE.nextFloat() * 0.5F) - .run(); + events.setPosition( + xPos + ran3 * 0.5F, + yPos + XSTR_INSTANCE.nextFloat() * 0.5F, + zPos + XSTR_INSTANCE.nextFloat() * 0.5F) + .run(); } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_MultiInput.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_MultiInput.java index b16ec3c7c7..74c6ca2b96 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_MultiInput.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_MultiInput.java @@ -1,5 +1,7 @@ package gregtech.api.metatileentity.implementations; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_INPUT_HATCH_2x2; + import gregtech.api.enums.ItemList; import gregtech.api.gui.GT_Container_2by2_Fluid; import gregtech.api.gui.GT_GUIContainer_2by2_Fluid; @@ -14,8 +16,6 @@ import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_INPUT_HATCH_2x2; - public class GT_MetaTileEntity_Hatch_MultiInput extends GT_MetaTileEntity_Hatch_Input { public FluidStack[] mStoredFluid; @@ -27,7 +27,8 @@ public class GT_MetaTileEntity_Hatch_MultiInput extends GT_MetaTileEntity_Hatch_ mCapacityPer = 8000 * (1 << aTier) / aSlot; } - public GT_MetaTileEntity_Hatch_MultiInput(String aName, int aSlot, int aTier, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_Hatch_MultiInput( + String aName, int aSlot, int aTier, String[] aDescription, ITexture[][][] aTextures) { super(aName, aSlot, aTier, aDescription, aTextures); this.mStoredFluid = new FluidStack[aSlot]; mCapacityPer = 8000 * (1 << aTier) / aSlot; @@ -67,12 +68,12 @@ public class GT_MetaTileEntity_Hatch_MultiInput extends GT_MetaTileEntity_Hatch_ @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_INPUT_HATCH_2x2)}; + return new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_INPUT_HATCH_2x2)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_INPUT_HATCH_2x2)}; + return new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_INPUT_HATCH_2x2)}; } public int getMaxType() { @@ -82,8 +83,7 @@ public class GT_MetaTileEntity_Hatch_MultiInput extends GT_MetaTileEntity_Hatch_ @Override public FluidStack getFluid() { for (FluidStack tFluid : mStoredFluid) { - if (tFluid != null && tFluid.amount > 0) - return tFluid; + if (tFluid != null && tFluid.amount > 0) return tFluid; } return null; } @@ -108,8 +108,7 @@ public class GT_MetaTileEntity_Hatch_MultiInput extends GT_MetaTileEntity_Hatch_ public int getFirstEmptySlot() { for (int i = 0; i < mStoredFluid.length; i++) { - if (mStoredFluid[i] == null || mStoredFluid[i].amount <= 0) - return i; + if (mStoredFluid[i] == null || mStoredFluid[i].amount <= 0) return i; } return -1; } @@ -117,8 +116,7 @@ public class GT_MetaTileEntity_Hatch_MultiInput extends GT_MetaTileEntity_Hatch_ public boolean hasFluid(FluidStack aFluid) { if (aFluid == null) return false; for (FluidStack tFluid : mStoredFluid) { - if (aFluid.isFluidEqual(tFluid)) - return true; + if (aFluid.isFluidEqual(tFluid)) return true; } return false; } @@ -126,8 +124,7 @@ public class GT_MetaTileEntity_Hatch_MultiInput extends GT_MetaTileEntity_Hatch_ public int getFluidSlot(FluidStack tFluid) { if (tFluid == null) return -1; for (int i = 0; i < mStoredFluid.length; i++) { - if (tFluid.equals(mStoredFluid[i])) - return i; + if (tFluid.equals(mStoredFluid[i])) return i; } return -1; } @@ -161,8 +158,11 @@ public class GT_MetaTileEntity_Hatch_MultiInput extends GT_MetaTileEntity_Hatch_ @Override public int fill(FluidStack aFluid, boolean doFill) { - if (aFluid == null || aFluid.getFluid().getID() <= 0 || aFluid.amount <= 0 || !canTankBeFilled() || !isFluidInputAllowed(aFluid)) - return 0; + if (aFluid == null + || aFluid.getFluid().getID() <= 0 + || aFluid.amount <= 0 + || !canTankBeFilled() + || !isFluidInputAllowed(aFluid)) return 0; if (!hasFluid(aFluid) && getFirstEmptySlot() != -1) { int tFilled = Math.min(aFluid.amount, mCapacityPer); if (doFill) { @@ -261,7 +261,7 @@ public class GT_MetaTileEntity_Hatch_MultiInput extends GT_MetaTileEntity_Hatch_ @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aBaseMetaTileEntity.isServerSide() && mStoredFluid != null) { - for (int i = 0; i < getMaxType(); i ++) { + for (int i = 0; i < getMaxType(); i++) { if (mStoredFluid[i] != null && mStoredFluid[i].amount <= 0) { mStoredFluid[i] = null; } @@ -277,12 +277,10 @@ public class GT_MetaTileEntity_Hatch_MultiInput extends GT_MetaTileEntity_Hatch_ @Override public void updateFluidDisplayItem() { - for (int i = 0; i < 4; i ++) { + for (int i = 0; i < 4; i++) { if (getFluid(i) == null || getFluid(i).amount <= 0) { - if (ItemList.Display_Fluid.isStackEqual(mInventory[i], true, true)) - mInventory[i] = null; - } - else { + if (ItemList.Display_Fluid.isStackEqual(mInventory[i], true, true)) mInventory[i] = null; + } else { mInventory[i] = GT_Utility.getFluidDisplayStack(getFluid(i), true, !displaysStackSize()); } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java index 7e04a5581f..43ccd2db7c 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java @@ -1,5 +1,8 @@ package gregtech.api.metatileentity.implementations; +import static gregtech.api.enums.Textures.BlockIcons.FLUID_OUT_SIGN; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_OUT; + import gregtech.GT_Mod; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -17,21 +20,19 @@ import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.*; -import static gregtech.api.enums.Textures.BlockIcons.FLUID_OUT_SIGN; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_OUT; - public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { private String lockedFluidName = null; private EntityPlayer playerThatLockedfluid = null; public byte mMode = 0; public GT_MetaTileEntity_Hatch_Output(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 4, new String[]{ - "Fluid Output for Multiblocks", - "Capacity: " + GT_Utility.formatNumbers(8000*(1<<aTier)) + "L", - "Right click with screwdriver to restrict output", - "Can be restricted to put out Items and/or Steam/No Steam/1 specific Fluid", - "Restricted Output Hatches are given priority for Multiblock Fluid output"}); + super(aID, aName, aNameRegional, aTier, 4, new String[] { + "Fluid Output for Multiblocks", + "Capacity: " + GT_Utility.formatNumbers(8000 * (1 << aTier)) + "L", + "Right click with screwdriver to restrict output", + "Can be restricted to put out Items and/or Steam/No Steam/1 specific Fluid", + "Restricted Output Hatches are given priority for Multiblock Fluid output" + }); } public GT_MetaTileEntity_Hatch_Output(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { @@ -44,16 +45,16 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch ? - new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT), TextureFactory.of(FLUID_OUT_SIGN)} : - new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT)}; + return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch + ? new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT), TextureFactory.of(FLUID_OUT_SIGN)} + : new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch ? - new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT), TextureFactory.of(FLUID_OUT_SIGN)} : - new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT)}; + return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch + ? new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT), TextureFactory.of(FLUID_OUT_SIGN)} + : new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT)}; } @Override @@ -92,13 +93,24 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPostTick(aBaseMetaTileEntity, aTick); if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && mFluid != null) { - IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(aBaseMetaTileEntity.getFrontFacing()); + IFluidHandler tTileEntity = + aBaseMetaTileEntity.getITankContainerAtSide(aBaseMetaTileEntity.getFrontFacing()); if (tTileEntity != null) { - FluidStack tDrained = aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()), Math.max(1, mFluid.amount), false); + FluidStack tDrained = aBaseMetaTileEntity.drain( + ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()), + Math.max(1, mFluid.amount), + false); if (tDrained != null) { - int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), tDrained, false); + int tFilledAmount = tTileEntity.fill( + ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), tDrained, false); if (tFilledAmount > 0) { - tTileEntity.fill(ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()), tFilledAmount, true), true); + tTileEntity.fill( + ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), + aBaseMetaTileEntity.drain( + ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()), + tFilledAmount, + true), + true); } } } @@ -109,7 +121,8 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); aNBT.setByte("mMode", mMode); - if(lockedFluidName!=null && lockedFluidName.length()!=0) aNBT.setString("lockedFluidName", lockedFluidName); + if (lockedFluidName != null && lockedFluidName.length() != 0) + aNBT.setString("lockedFluidName", lockedFluidName); else aNBT.removeTag("lockedFluidName"); } @@ -120,7 +133,8 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { lockedFluidName = aNBT.getString("lockedFluidName"); lockedFluidName = lockedFluidName.length() == 0 ? null : lockedFluidName; if (GT_Utility.getFluidFromUnlocalizedName(lockedFluidName) != null) { - lockedFluidName = GT_Utility.getFluidFromUnlocalizedName(lockedFluidName).getName(); + lockedFluidName = + GT_Utility.getFluidFromUnlocalizedName(lockedFluidName).getName(); } } @@ -163,8 +177,7 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { // Because getStackDisplaySlot() only allow return one int, this place I only can manually set. if (tLockedFluid != null) { mInventory[3] = GT_Utility.getFluidDisplayStack(tLockedFluid, false, true); - } - else { + } else { mInventory[3] = null; } } @@ -198,13 +211,18 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { @Override public int getCapacity() { - return 8000*(1<<mTier); + return 8000 * (1 << mTier); } @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (!getBaseMetaTileEntity().getCoverBehaviorAtSideNew(aSide).isGUIClickable(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getComplexCoverDataAtSide(aSide), getBaseMetaTileEntity())) - return; + if (!getBaseMetaTileEntity() + .getCoverBehaviorAtSideNew(aSide) + .isGUIClickable( + aSide, + getBaseMetaTileEntity().getCoverIDAtSide(aSide), + getBaseMetaTileEntity().getComplexCoverDataAtSide(aSide), + getBaseMetaTileEntity())) return; if (aPlayer.isSneaking()) { mMode = (byte) ((mMode + 9) % 10); } else { @@ -213,85 +231,112 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { String inBrackets; switch (mMode) { case 0: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("108","Outputs misc. Fluids, Steam and Items")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("108", "Outputs misc. Fluids, Steam and Items")); this.setLockedFluidName(null); break; case 1: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("109","Outputs Steam and Items")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("109", "Outputs Steam and Items")); this.setLockedFluidName(null); break; case 2: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("110","Outputs Steam and misc. Fluids")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("110", "Outputs Steam and misc. Fluids")); this.setLockedFluidName(null); break; case 3: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("111","Outputs Steam")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("111", "Outputs Steam")); this.setLockedFluidName(null); break; case 4: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("112","Outputs misc. Fluids and Items")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("112", "Outputs misc. Fluids and Items")); this.setLockedFluidName(null); break; case 5: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("113","Outputs only Items")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("113", "Outputs only Items")); this.setLockedFluidName(null); break; case 6: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("114","Outputs only misc. Fluids")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("114", "Outputs only misc. Fluids")); this.setLockedFluidName(null); break; case 7: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("115","Outputs nothing")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("115", "Outputs nothing")); this.setLockedFluidName(null); break; case 8: playerThatLockedfluid = aPlayer; if (mFluid == null) { this.setLockedFluidName(null); - inBrackets = GT_Utility.trans("115.3","currently none, will be locked to the next that is put in (or use fluid cell to lock)"); + inBrackets = GT_Utility.trans( + "115.3", + "currently none, will be locked to the next that is put in (or use fluid cell to lock)"); } else { this.setLockedFluidName(this.getDrainableStack().getFluid().getName()); inBrackets = this.getDrainableStack().getLocalizedName(); } - GT_Utility.sendChatToPlayer(aPlayer, String.format("%s (%s)", GT_Utility.trans("151.1", "Outputs items and 1 specific Fluid"), inBrackets)); + GT_Utility.sendChatToPlayer( + aPlayer, + String.format( + "%s (%s)", + GT_Utility.trans("151.1", "Outputs items and 1 specific Fluid"), inBrackets)); break; case 9: playerThatLockedfluid = aPlayer; if (mFluid == null) { this.setLockedFluidName(null); - inBrackets = GT_Utility.trans("115.3","currently none, will be locked to the next that is put in (or use fluid cell to lock)"); + inBrackets = GT_Utility.trans( + "115.3", + "currently none, will be locked to the next that is put in (or use fluid cell to lock)"); } else { this.setLockedFluidName(this.getDrainableStack().getFluid().getName()); inBrackets = this.getDrainableStack().getLocalizedName(); } - GT_Utility.sendChatToPlayer(aPlayer, String.format("%s (%s)", GT_Utility.trans("151.2", "Outputs 1 specific Fluid"), inBrackets)); + GT_Utility.sendChatToPlayer( + aPlayer, + String.format("%s (%s)", GT_Utility.trans("151.2", "Outputs 1 specific Fluid"), inBrackets)); break; } } private boolean tryToLockHatch(EntityPlayer aPlayer, byte aSide) { - if (!getBaseMetaTileEntity().getCoverBehaviorAtSideNew(aSide).isGUIClickable(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getComplexCoverDataAtSide(aSide), getBaseMetaTileEntity())) - return false; - if (!isFluidLocked()) - return false; + if (!getBaseMetaTileEntity() + .getCoverBehaviorAtSideNew(aSide) + .isGUIClickable( + aSide, + getBaseMetaTileEntity().getCoverIDAtSide(aSide), + getBaseMetaTileEntity().getComplexCoverDataAtSide(aSide), + getBaseMetaTileEntity())) return false; + if (!isFluidLocked()) return false; ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem(); - if (tCurrentItem == null) - return false; + if (tCurrentItem == null) return false; FluidStack tFluid = FluidContainerRegistry.getFluidForFilledItem(tCurrentItem); if (tFluid == null && tCurrentItem.getItem() instanceof IFluidContainerItem) - tFluid = ((IFluidContainerItem)tCurrentItem.getItem()).getFluid(tCurrentItem); + tFluid = ((IFluidContainerItem) tCurrentItem.getItem()).getFluid(tCurrentItem); if (tFluid != null) { - if (getLockedFluidName() != null && !getLockedFluidName().equals(tFluid.getFluid().getName())) { - GT_Utility.sendChatToPlayer(aPlayer, String.format("%s %s", GT_Utility.trans("151.3", - "Hatch is locked to a different fluid. To change the locking, empty it and made it locked to the next fluid with a screwdriver. Currently locked to") - , StatCollector.translateToLocal(getLockedFluidName()))); - } - else { + if (getLockedFluidName() != null + && !getLockedFluidName().equals(tFluid.getFluid().getName())) { + GT_Utility.sendChatToPlayer( + aPlayer, + String.format( + "%s %s", + GT_Utility.trans( + "151.3", + "Hatch is locked to a different fluid. To change the locking, empty it and made it locked to the next fluid with a screwdriver. Currently locked to"), + StatCollector.translateToLocal(getLockedFluidName()))); + } else { setLockedFluidName(tFluid.getFluid().getName()); if (mMode == 8) - GT_Utility.sendChatToPlayer(aPlayer, String.format("%s (%s)", GT_Utility.trans("151.1", "Outputs items and 1 specific Fluid"), tFluid.getLocalizedName())); + GT_Utility.sendChatToPlayer( + aPlayer, + String.format( + "%s (%s)", + GT_Utility.trans("151.1", "Outputs items and 1 specific Fluid"), + tFluid.getLocalizedName())); else - GT_Utility.sendChatToPlayer(aPlayer, String.format("%s (%s)", GT_Utility.trans("151.2", "Outputs 1 specific Fluid"), tFluid.getLocalizedName())); + GT_Utility.sendChatToPlayer( + aPlayer, + String.format( + "%s (%s)", + GT_Utility.trans("151.2", "Outputs 1 specific Fluid"), tFluid.getLocalizedName())); } return true; } @@ -303,9 +348,9 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { } @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) { - if (tryToLockHatch(aPlayer, aSide)) - return true; + public boolean onRightclick( + IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) { + if (tryToLockHatch(aPlayer, aSide)) return true; return super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ); } @@ -342,7 +387,10 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { protected void onEmptyingContainerWhenEmpty() { if (this.lockedFluidName == null && this.mFluid != null) { this.setLockedFluidName(this.mFluid.getFluid().getName()); - GT_Utility.sendChatToPlayer(playerThatLockedfluid, String.format(GT_Utility.trans("151.4","Sucessfully locked Fluid to %s"), mFluid.getLocalizedName())); + GT_Utility.sendChatToPlayer( + playerThatLockedfluid, + String.format( + GT_Utility.trans("151.4", "Sucessfully locked Fluid to %s"), mFluid.getLocalizedName())); } } @@ -353,13 +401,20 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { @Override public String[] getInfoData() { - return new String[]{ - EnumChatFormatting.BLUE + "Output Hatch" + EnumChatFormatting.RESET, - "Stored Fluid:", - EnumChatFormatting.GOLD + (mFluid == null ? "No Fluid" : mFluid.getLocalizedName()) + EnumChatFormatting.RESET, - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mFluid == null ? 0 : mFluid.amount) + " L" + EnumChatFormatting.RESET + " " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(getCapacity()) + " L"+ EnumChatFormatting.RESET, - (!isFluidLocked() || lockedFluidName == null) ? "Not Locked" : ("Locked to " + StatCollector.translateToLocal(FluidRegistry.getFluidStack(lockedFluidName, 1).getUnlocalizedName())) + return new String[] { + EnumChatFormatting.BLUE + "Output Hatch" + EnumChatFormatting.RESET, + "Stored Fluid:", + EnumChatFormatting.GOLD + + (mFluid == null ? "No Fluid" : mFluid.getLocalizedName()) + + EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mFluid == null ? 0 : mFluid.amount) + " L" + + EnumChatFormatting.RESET + " " + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(getCapacity()) + " L" + EnumChatFormatting.RESET, + (!isFluidLocked() || lockedFluidName == null) + ? "Not Locked" + : ("Locked to " + + StatCollector.translateToLocal(FluidRegistry.getFluidStack(lockedFluidName, 1) + .getUnlocalizedName())) }; } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java index 8ee2f48b2d..5b08f7ae69 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java @@ -1,5 +1,9 @@ package gregtech.api.metatileentity.implementations; +import static gregtech.api.enums.Textures.BlockIcons.ITEM_OUT_SIGN; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_OUT; +import static gregtech.api.util.GT_Utility.moveMultipleItemStacks; + import gregtech.GT_Mod; import gregtech.api.gui.*; import gregtech.api.interfaces.ITexture; @@ -13,31 +17,36 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; -import static gregtech.api.enums.Textures.BlockIcons.ITEM_OUT_SIGN; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_OUT; -import static gregtech.api.util.GT_Utility.moveMultipleItemStacks; - public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch { public GT_MetaTileEntity_Hatch_OutputBus(int aID, String aName, String aNameRegional, int aTier) { this(aID, aName, aNameRegional, aTier, getSlots(aTier)); } public GT_MetaTileEntity_Hatch_OutputBus(int id, String name, String nameRegional, int tier, int slots) { - super(id, name, nameRegional, tier, slots, ArrayExt.of( - "Item Output for Multiblocks", - "Capacity: " + getSlots(tier) + " stack" + (getSlots(tier) >= 2 ? "s" : ""))); - } - - public GT_MetaTileEntity_Hatch_OutputBus(int aID, String aName, String aNameRegional, int aTier, String[] aDescription) { + super( + id, + name, + nameRegional, + tier, + slots, + ArrayExt.of( + "Item Output for Multiblocks", + "Capacity: " + getSlots(tier) + " stack" + (getSlots(tier) >= 2 ? "s" : ""))); + } + + public GT_MetaTileEntity_Hatch_OutputBus( + int aID, String aName, String aNameRegional, int aTier, String[] aDescription) { super(aID, aName, aNameRegional, aTier, getSlots(aTier), aDescription); } - public GT_MetaTileEntity_Hatch_OutputBus(int aID, String aName, String aNameRegional, int aTier, String[] aDescription, int inventorySize) { + public GT_MetaTileEntity_Hatch_OutputBus( + int aID, String aName, String aNameRegional, int aTier, String[] aDescription, int inventorySize) { super(aID, aName, aNameRegional, aTier, inventorySize, aDescription); } @Deprecated - // having too many constructors is bad, don't be so lazy, use GT_MetaTileEntity_Hatch_OutputBus(String, int, String[], ITexture[][][]) + // having too many constructors is bad, don't be so lazy, use GT_MetaTileEntity_Hatch_OutputBus(String, int, + // String[], ITexture[][][]) public GT_MetaTileEntity_Hatch_OutputBus(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { this(aName, aTier, getSlots(aTier), ArrayExt.of(aDescription), aTextures); } @@ -46,22 +55,23 @@ public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch { super(aName, aTier, getSlots(aTier), aDescription, aTextures); } - public GT_MetaTileEntity_Hatch_OutputBus(String name, int tier, int slots, String[] description, ITexture[][][] textures) { + public GT_MetaTileEntity_Hatch_OutputBus( + String name, int tier, int slots, String[] description, ITexture[][][] textures) { super(name, tier, slots, description, textures); } @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch ? - new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT), TextureFactory.of(ITEM_OUT_SIGN)} : - new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT)}; + return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch + ? new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT), TextureFactory.of(ITEM_OUT_SIGN)} + : new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch ? - new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT), TextureFactory.of(ITEM_OUT_SIGN)} : - new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT)}; + return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch + ? new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT), TextureFactory.of(ITEM_OUT_SIGN)} + : new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT)}; } @Override @@ -144,9 +154,9 @@ public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch { mInventory[i] = aStack.splitStack(getInventoryStackLimit()); } else { int tRealStackLimit = Math.min(getInventoryStackLimit(), tSlot.getMaxStackSize()); - if (tSlot.stackSize < tRealStackLimit && - tSlot.isItemEqual(aStack) && - ItemStack.areItemStackTagsEqual(tSlot, aStack)) { + if (tSlot.stackSize < tRealStackLimit + && tSlot.isItemEqual(aStack) + && ItemStack.areItemStackTagsEqual(tSlot, aStack)) { if (aStack.stackSize + tSlot.stackSize <= tRealStackLimit) { mInventory[i].stackSize += aStack.stackSize; return true; @@ -174,15 +184,27 @@ public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch { @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPostTick(aBaseMetaTileEntity, aTick); - if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && (aTick&0x7)==0) { - IInventory tTileEntity =aBaseMetaTileEntity.getIInventoryAtSide(aBaseMetaTileEntity.getFrontFacing()); - if(tTileEntity!=null){ - moveMultipleItemStacks(aBaseMetaTileEntity,tTileEntity,aBaseMetaTileEntity.getFrontFacing(),aBaseMetaTileEntity.getBackFacing(),null,false,(byte)64,(byte)1,(byte)64,(byte)1,mInventory.length); + if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && (aTick & 0x7) == 0) { + IInventory tTileEntity = aBaseMetaTileEntity.getIInventoryAtSide(aBaseMetaTileEntity.getFrontFacing()); + if (tTileEntity != null) { + moveMultipleItemStacks( + aBaseMetaTileEntity, + tTileEntity, + aBaseMetaTileEntity.getFrontFacing(), + aBaseMetaTileEntity.getBackFacing(), + null, + false, + (byte) 64, + (byte) 1, + (byte) 64, + (byte) 1, + mInventory.length); for (int i = 0; i < mInventory.length; i++) if (mInventory[i] != null && mInventory[i].stackSize <= 0) mInventory[i] = null; -// GT_Utility.moveOneItemStack(aBaseMetaTileEntity, tTileEntity, -// aBaseMetaTileEntity.getFrontFacing(), aBaseMetaTileEntity.getBackFacing(), -// null, false, (byte) 64, (byte) 1, (byte)( 64 * aBaseMetaTileEntity.getSizeInventory()), (byte) 1); + // GT_Utility.moveOneItemStack(aBaseMetaTileEntity, tTileEntity, + // aBaseMetaTileEntity.getFrontFacing(), aBaseMetaTileEntity.getBackFacing(), + // null, false, (byte) 64, (byte) 1, (byte)( 64 * + // aBaseMetaTileEntity.getSizeInventory()), (byte) 1); } } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java index e29499b0b1..bd8daabfb9 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java @@ -1,5 +1,10 @@ package gregtech.api.metatileentity.implementations; +import static gregtech.api.enums.GT_Values.*; +import static mcp.mobius.waila.api.SpecialChars.GREEN; +import static mcp.mobius.waila.api.SpecialChars.RED; +import static mcp.mobius.waila.api.SpecialChars.RESET; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; @@ -18,6 +23,8 @@ import gregtech.api.util.GT_Single_Recipe_Check; import gregtech.api.util.GT_Utility; import gregtech.common.GT_Pollution; import gregtech.common.items.GT_MetaGenerated_Tool_01; +import java.util.ArrayList; +import java.util.List; import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; import net.minecraft.entity.player.EntityPlayer; @@ -32,20 +39,26 @@ import net.minecraft.world.World; import net.minecraftforge.fluids.FluidStack; import org.lwjgl.input.Keyboard; -import java.util.ArrayList; -import java.util.List; - -import static gregtech.api.enums.GT_Values.*; -import static mcp.mobius.waila.api.SpecialChars.GREEN; -import static mcp.mobius.waila.api.SpecialChars.RED; -import static mcp.mobius.waila.api.SpecialChars.RESET; - public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { public static boolean disableMaintenance; - public boolean mMachine = false, mWrench = false, mScrewdriver = false, mSoftHammer = false, mHardHammer = false, mSolderingTool = false, mCrowbar = false, mRunningOnLoad = false; + public boolean mMachine = false, + mWrench = false, + mScrewdriver = false, + mSoftHammer = false, + mHardHammer = false, + mSolderingTool = false, + mCrowbar = false, + mRunningOnLoad = false; public boolean mStructureChanged = false; - public int mPollution = 0, mProgresstime = 0, mMaxProgresstime = 0, mEUt = 0, mEfficiencyIncrease = 0, mStartUpCheck = 100, mRuntime = 0, mEfficiency = 0; + public int mPollution = 0, + mProgresstime = 0, + mMaxProgresstime = 0, + mEUt = 0, + mEfficiencyIncrease = 0, + mStartUpCheck = 100, + mRuntime = 0, + mEfficiency = 0; public volatile boolean mUpdated = false; public int mUpdate = 0; public ItemStack[] mOutputItems = null; @@ -69,21 +82,29 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { public GT_MetaTileEntity_MultiBlockBase(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, 2); - GT_MetaTileEntity_MultiBlockBase.disableMaintenance = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false); - this.damageFactorLow = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorLow", 5); - this.damageFactorHigh = (float) GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorHigh", 0.6f); + GT_MetaTileEntity_MultiBlockBase.disableMaintenance = GregTech_API.sMachineFile.get( + ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false); + this.damageFactorLow = + GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorLow", 5); + this.damageFactorHigh = (float) GregTech_API.sMachineFile.get( + ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorHigh", 0.6f); this.mNEI = ""; } public GT_MetaTileEntity_MultiBlockBase(String aName) { super(aName, 2); - GT_MetaTileEntity_MultiBlockBase.disableMaintenance = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false); - this.damageFactorLow = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorLow", 5); - this.damageFactorHigh = (float) GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorHigh", 0.6f); + GT_MetaTileEntity_MultiBlockBase.disableMaintenance = GregTech_API.sMachineFile.get( + ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false); + this.damageFactorLow = + GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorLow", 5); + this.damageFactorHigh = (float) GregTech_API.sMachineFile.get( + ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorHigh", 0.6f); } public static boolean isValidMetaTileEntity(MetaTileEntity aMetaTileEntity) { - return aMetaTileEntity.getBaseMetaTileEntity() != null && aMetaTileEntity.getBaseMetaTileEntity().getMetaTileEntity() == aMetaTileEntity && !aMetaTileEntity.getBaseMetaTileEntity().isDead(); + return aMetaTileEntity.getBaseMetaTileEntity() != null + && aMetaTileEntity.getBaseMetaTileEntity().getMetaTileEntity() == aMetaTileEntity + && !aMetaTileEntity.getBaseMetaTileEntity().isDead(); } @Override @@ -106,7 +127,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { if (supportsSingleRecipeLocking()) { mLockedToSingleRecipe = !mLockedToSingleRecipe; if (mLockedToSingleRecipe) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("223", "Single recipe locking enabled. Will lock to next recipe.")); + GT_Utility.sendChatToPlayer( + aPlayer, GT_Utility.trans("223", "Single recipe locking enabled. Will lock to next recipe.")); } else { GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("220", "Single recipe locking disabled.")); mSingleRecipeCheck = null; @@ -234,7 +256,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MultiblockDisplay.png"); + return new GT_GUIContainer_MultiMachine( + aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MultiblockDisplay.png"); } @Override @@ -274,7 +297,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { } public boolean checkStructure(boolean aForceReset, IGregTechTileEntity aBaseMetaTileEntity) { - if(!aBaseMetaTileEntity.isServerSide()) return mMachine; + if (!aBaseMetaTileEntity.isServerSide()) return mMachine; // Only trigger an update if forced (from onPostTick, generally), or if the structure has changed if ((mStructureChanged || aForceReset)) { clearHatches(); @@ -307,9 +330,16 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { stopMachine(); } } - aBaseMetaTileEntity.setErrorDisplayID((aBaseMetaTileEntity.getErrorDisplayID() & ~127) | (mWrench ? 0 : 1) | (mScrewdriver ? 0 : 2) | (mSoftHammer ? 0 : 4) | (mHardHammer ? 0 : 8) | (mSolderingTool ? 0 : 16) | (mCrowbar ? 0 : 32) | (mMachine ? 0 : 64)); + aBaseMetaTileEntity.setErrorDisplayID((aBaseMetaTileEntity.getErrorDisplayID() & ~127) + | (mWrench ? 0 : 1) + | (mScrewdriver ? 0 : 2) + | (mSoftHammer ? 0 : 4) + | (mHardHammer ? 0 : 8) + | (mSolderingTool ? 0 : 16) + | (mCrowbar ? 0 : 32) + | (mMachine ? 0 : 64)); aBaseMetaTileEntity.setActive(mMaxProgresstime > 0); - boolean active=aBaseMetaTileEntity.isActive() && mPollution>0; + boolean active = aBaseMetaTileEntity.isActive() && mPollution > 0; for (GT_MetaTileEntity_Hatch_Muffler aMuffler : mMufflerHatches) { IGregTechTileEntity iGTTileEntity = aMuffler.getBaseMetaTileEntity(); if (iGTTileEntity != null && !iGTTileEntity.isDead()) { @@ -332,7 +362,9 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { } for (GT_MetaTileEntity_Hatch_Maintenance tHatch : mMaintenanceHatches) { if (isValidMetaTileEntity(tHatch)) { - if (tHatch.mAuto && !( mWrench && mScrewdriver && mSoftHammer && mHardHammer && mSolderingTool && mCrowbar)) tHatch.autoMaintainance(); + if (tHatch.mAuto + && !(mWrench && mScrewdriver && mSoftHammer && mHardHammer && mSolderingTool && mCrowbar)) + tHatch.autoMaintainance(); if (tHatch.mWrench) mWrench = true; if (tHatch.mScrewdriver) mScrewdriver = true; if (tHatch.mSoftHammer) mSoftHammer = true; @@ -350,8 +382,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { } } - protected boolean checkRecipe() - { + protected boolean checkRecipe() { startRecipeProcessing(); boolean result = checkRecipe(mInventory[1]); endRecipeProcessing(); @@ -366,19 +397,27 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { stopMachine(); } if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) { - if (mOutputItems != null) for (ItemStack tStack : mOutputItems) - if (tStack != null) { - try { - GT_Mod.achievements.issueAchivementHatch( - aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), tStack); - } catch (Exception ignored) { + if (mOutputItems != null) + for (ItemStack tStack : mOutputItems) + if (tStack != null) { + try { + GT_Mod.achievements.issueAchivementHatch( + aBaseMetaTileEntity + .getWorld() + .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), + tStack); + } catch (Exception ignored) { + } + addOutput(tStack); } - addOutput(tStack); - } if (mOutputFluids != null) { addFluidOutputs(mOutputFluids); } - mEfficiency = Math.max(0, Math.min(mEfficiency + mEfficiencyIncrease, getMaxEfficiency(mInventory[1]) - ((getIdealStatus() - getRepairStatus()) * 1000))); + mEfficiency = Math.max( + 0, + Math.min( + mEfficiency + mEfficiencyIncrease, + getMaxEfficiency(mInventory[1]) - ((getIdealStatus() - getRepairStatus()) * 1000))); mOutputItems = null; mProgresstime = 0; mMaxProgresstime = 0; @@ -389,7 +428,11 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { if (mOutputFluids != null && mOutputFluids.length > 0) { if (mOutputFluids.length > 1) { try { - GT_Mod.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "oilplant"); + GT_Mod.achievements.issueAchievement( + aBaseMetaTileEntity + .getWorld() + .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), + "oilplant"); } catch (Exception ignored) { } } @@ -397,7 +440,9 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { } } } else { - if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled() || aBaseMetaTileEntity.hasInventoryBeenModified()) { + if (aTick % 100 == 0 + || aBaseMetaTileEntity.hasWorkJustBeenEnabled() + || aBaseMetaTileEntity.hasInventoryBeenModified()) { if (aBaseMetaTileEntity.isAllowedToWork()) { if (checkRecipe()) { @@ -465,15 +510,15 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { /** * Gets the pollution this Device outputs to a Muffler per tick (10000 = one Pullution Block) */ - public int getPollutionPerTick(ItemStack aStack){ - return getPollutionPerSecond(aStack)/20; + public int getPollutionPerTick(ItemStack aStack) { + return getPollutionPerSecond(aStack) / 20; } /** * Gets the pollution produced per second by this multiblock, default to 0. Override this with * its actual value in the code of the multiblock. */ - public int getPollutionPerSecond(ItemStack aStack){ + public int getPollutionPerSecond(ItemStack aStack) { return 0; } @@ -503,18 +548,22 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { } public int getRepairStatus() { - return (mWrench ? 1 : 0) + (mScrewdriver ? 1 : 0) + (mSoftHammer ? 1 : 0) + (mHardHammer ? 1 : 0) + (mSolderingTool ? 1 : 0) + (mCrowbar ? 1 : 0); + return (mWrench ? 1 : 0) + + (mScrewdriver ? 1 : 0) + + (mSoftHammer ? 1 : 0) + + (mHardHammer ? 1 : 0) + + (mSolderingTool ? 1 : 0) + + (mCrowbar ? 1 : 0); } public int getIdealStatus() { return 6; } - public int getCurrentEfficiency(ItemStack itemStack) { - int maxEff = getMaxEfficiency(itemStack); - return maxEff - (getIdealStatus() - getRepairStatus()) * maxEff / 10; - } + int maxEff = getMaxEfficiency(itemStack); + return maxEff - (getIdealStatus() - getRepairStatus()) * maxEff / 10; + } public boolean doRandomMaintenanceDamage() { if (!isCorrectMachinePart(mInventory[1]) || getRepairStatus() == 0) { @@ -545,10 +594,18 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { break; } } - if (mInventory[1] != null && getBaseMetaTileEntity().getRandomNumber(2) == 0 && !mInventory[1].getUnlocalizedName().startsWith("gt.blockmachines.basicmachine.")) { + if (mInventory[1] != null + && getBaseMetaTileEntity().getRandomNumber(2) == 0 + && !mInventory[1].getUnlocalizedName().startsWith("gt.blockmachines.basicmachine.")) { if (mInventory[1].getItem() instanceof GT_MetaGenerated_Tool_01) { NBTTagCompound tNBT = mInventory[1].getTagCompound(); - ((GT_MetaGenerated_Tool) mInventory[1].getItem()).doDamage(mInventory[1], (long)getDamageToComponent(mInventory[1]) * (long) Math.min(mEUt / this.damageFactorLow, Math.pow(mEUt, this.damageFactorHigh))); + ((GT_MetaGenerated_Tool) mInventory[1].getItem()) + .doDamage( + mInventory[1], + (long) getDamageToComponent(mInventory[1]) + * (long) Math.min( + mEUt / this.damageFactorLow, + Math.pow(mEUt, this.damageFactorHigh))); if (mInventory[1].stackSize == 0) mInventory[1] = null; } } @@ -558,18 +615,30 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { public void explodeMultiblock() { - GT_Log.exp.println("MultiBlockExplosion at: " +this.getBaseMetaTileEntity().getXCoord()+" | "+this.getBaseMetaTileEntity().getYCoord()+" | "+this.getBaseMetaTileEntity().getZCoord()+" DIMID: "+ this.getBaseMetaTileEntity().getWorld().provider.dimensionId+"."); + GT_Log.exp.println( + "MultiBlockExplosion at: " + this.getBaseMetaTileEntity().getXCoord() + " | " + + this.getBaseMetaTileEntity().getYCoord() + " | " + + this.getBaseMetaTileEntity().getZCoord() + " DIMID: " + + this.getBaseMetaTileEntity().getWorld().provider.dimensionId + "."); GT_Pollution.addPollution(getBaseMetaTileEntity(), GT_Mod.gregtechproxy.mPollutionOnExplosion); mInventory[1] = null; - for (MetaTileEntity tTileEntity : mInputBusses) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); - for (MetaTileEntity tTileEntity : mOutputBusses) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); - for (MetaTileEntity tTileEntity : mInputHatches) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); - for (MetaTileEntity tTileEntity : mOutputHatches) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); - for (MetaTileEntity tTileEntity : mDynamoHatches) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); - for (MetaTileEntity tTileEntity : mMufflerHatches) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); - for (MetaTileEntity tTileEntity : mEnergyHatches) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); - for (MetaTileEntity tTileEntity : mMaintenanceHatches) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); + for (MetaTileEntity tTileEntity : mInputBusses) + tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); + for (MetaTileEntity tTileEntity : mOutputBusses) + tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); + for (MetaTileEntity tTileEntity : mInputHatches) + tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); + for (MetaTileEntity tTileEntity : mOutputHatches) + tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); + for (MetaTileEntity tTileEntity : mDynamoHatches) + tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); + for (MetaTileEntity tTileEntity : mMufflerHatches) + tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); + for (MetaTileEntity tTileEntity : mEnergyHatches) + tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); + for (MetaTileEntity tTileEntity : mMaintenanceHatches) + tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); getBaseMetaTileEntity().doExplosion(V[8]); } @@ -582,13 +651,14 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { } return false; } + public boolean addEnergyOutputMultipleDynamos(long aEU, boolean aAllowMixedVoltageDynamos) { int injected = 0; long totalOutput = 0; long aFirstVoltageFound = -1; boolean aFoundMixedDynamos = false; for (GT_MetaTileEntity_Hatch_Dynamo aDynamo : mDynamoHatches) { - if( aDynamo == null ) { + if (aDynamo == null) { return false; } if (isValidMetaTileEntity(aDynamo)) { @@ -597,8 +667,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { // Check against voltage to check when hatch mixing if (aFirstVoltageFound == -1) { aFirstVoltageFound = aVoltage; - } - else { + } else { if (aFirstVoltageFound != aVoltage) { aFoundMixedDynamos = true; } @@ -623,14 +692,14 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { aVoltage = aDynamo.maxEUOutput(); aAmpsToInject = (int) (leftToInject / aVoltage); aRemainder = (int) (leftToInject - (aAmpsToInject * aVoltage)); - ampsOnCurrentHatch= (int) Math.min(aDynamo.maxAmperesOut(), aAmpsToInject); + ampsOnCurrentHatch = (int) Math.min(aDynamo.maxAmperesOut(), aAmpsToInject); for (int i = 0; i < ampsOnCurrentHatch; i++) { aDynamo.getBaseMetaTileEntity().increaseStoredEnergyUnits(aVoltage, false); } - injected+=aVoltage*ampsOnCurrentHatch; - if(aRemainder>0 && ampsOnCurrentHatch<aDynamo.maxAmperesOut()){ + injected += aVoltage * ampsOnCurrentHatch; + if (aRemainder > 0 && ampsOnCurrentHatch < aDynamo.maxAmperesOut()) { aDynamo.getBaseMetaTileEntity().increaseStoredEnergyUnits(aRemainder, false); - injected+=aRemainder; + injected += aRemainder; } } } @@ -640,7 +709,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { public long getMaxInputVoltage() { long rVoltage = 0; for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) - if (isValidMetaTileEntity(tHatch)) rVoltage += tHatch.getBaseMetaTileEntity().getInputVoltage(); + if (isValidMetaTileEntity(tHatch)) + rVoltage += tHatch.getBaseMetaTileEntity().getInputVoltage(); return rVoltage; } @@ -652,23 +722,24 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { * @param maxInputVoltage - Multiblock Max input voltage * @param perfectOC - If the Multiblock OCs perfectly, i.e. the large Chemical Reactor */ - protected void calculateOverclockedNessMultiInternal(int aEUt, int aDuration, int mAmperage, long maxInputVoltage, boolean perfectOC) { + protected void calculateOverclockedNessMultiInternal( + int aEUt, int aDuration, int mAmperage, long maxInputVoltage, boolean perfectOC) { byte mTier = (byte) Math.max(0, GT_Utility.getTier(maxInputVoltage)); - if(mTier == 0){ - //Long time calculation - long xMaxProgresstime = ((long)aDuration)<<1; - if(xMaxProgresstime > Integer.MAX_VALUE - 1){ - //make impossible if too long + if (mTier == 0) { + // Long time calculation + long xMaxProgresstime = ((long) aDuration) << 1; + if (xMaxProgresstime > Integer.MAX_VALUE - 1) { + // make impossible if too long mEUt = Integer.MAX_VALUE - 1; mMaxProgresstime = Integer.MAX_VALUE - 1; - }else{ + } else { mEUt = aEUt >> 2; - mMaxProgresstime= (int) xMaxProgresstime; + mMaxProgresstime = (int) xMaxProgresstime; } - }else{ - //Long EUt calculation + } else { + // Long EUt calculation long xEUt = aEUt; - //Isnt too low EUt check? + // Isnt too low EUt check? long tempEUt = Math.max(xEUt, V[1]); mMaxProgresstime = aDuration; @@ -676,41 +747,35 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { final int ocTimeShift = perfectOC ? 2 : 1; while (tempEUt <= V[mTier - 1] * mAmperage) { - tempEUt <<= 2;//this actually controls overclocking - //xEUt *= 4;//this is effect of everclocking + tempEUt <<= 2; // this actually controls overclocking + // xEUt *= 4;//this is effect of everclocking int oldTime = mMaxProgresstime; - mMaxProgresstime >>= ocTimeShift;//this is effect of overclocking - if (mMaxProgresstime <1) - { - if(oldTime == 1) - break; - xEUt *= oldTime * (perfectOC ? 1:2); + mMaxProgresstime >>= ocTimeShift; // this is effect of overclocking + if (mMaxProgresstime < 1) { + if (oldTime == 1) break; + xEUt *= oldTime * (perfectOC ? 1 : 2); break; - } - else - { + } else { xEUt <<= 2; } } - if(xEUt > Integer.MAX_VALUE - 1) { + if (xEUt > Integer.MAX_VALUE - 1) { mEUt = Integer.MAX_VALUE - 1; mMaxProgresstime = Integer.MAX_VALUE - 1; } else { mEUt = (int) xEUt; - if(mEUt == 0) - mEUt = 1; - if(mMaxProgresstime == 0) - mMaxProgresstime = 1;//set time to 1 tick + if (mEUt == 0) mEUt = 1; + if (mMaxProgresstime == 0) mMaxProgresstime = 1; // set time to 1 tick } } } protected void calculateOverclockedNessMulti(int aEUt, int aDuration, int mAmperage, long maxInputVoltage) { - calculateOverclockedNessMultiInternal(aEUt,aDuration,mAmperage,maxInputVoltage,false); + calculateOverclockedNessMultiInternal(aEUt, aDuration, mAmperage, maxInputVoltage, false); } protected void calculatePerfectOverclockedNessMulti(int aEUt, int aDuration, int mAmperage, long maxInputVoltage) { - calculateOverclockedNessMultiInternal(aEUt,aDuration,mAmperage,maxInputVoltage,true); + calculateOverclockedNessMultiInternal(aEUt, aDuration, mAmperage, maxInputVoltage, true); } public boolean drainEnergyInput(long aEU) { @@ -722,27 +787,33 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { return false; } - protected static boolean dumpFluid(List<GT_MetaTileEntity_Hatch_Output> aOutputHatches, FluidStack copiedFluidStack, boolean restrictiveHatchesOnly){ + protected static boolean dumpFluid( + List<GT_MetaTileEntity_Hatch_Output> aOutputHatches, + FluidStack copiedFluidStack, + boolean restrictiveHatchesOnly) { for (GT_MetaTileEntity_Hatch_Output tHatch : aOutputHatches) { - if (!isValidMetaTileEntity(tHatch) || (restrictiveHatchesOnly && tHatch.mMode == 0)) { - continue; - } - if (GT_ModHandler.isSteam(copiedFluidStack)) { - if (!tHatch.outputsSteam()) { - continue; - } - } else { - if (!tHatch.outputsLiquids()) { - continue; - } - if (tHatch.isFluidLocked() && tHatch.getLockedFluidName() != null && !tHatch.getLockedFluidName().equals(copiedFluidStack.getFluid().getName())) { - continue; - } - } + if (!isValidMetaTileEntity(tHatch) || (restrictiveHatchesOnly && tHatch.mMode == 0)) { + continue; + } + if (GT_ModHandler.isSteam(copiedFluidStack)) { + if (!tHatch.outputsSteam()) { + continue; + } + } else { + if (!tHatch.outputsLiquids()) { + continue; + } + if (tHatch.isFluidLocked() + && tHatch.getLockedFluidName() != null + && !tHatch.getLockedFluidName() + .equals(copiedFluidStack.getFluid().getName())) { + continue; + } + } int tAmount = tHatch.fill(copiedFluidStack, false); if (tAmount >= copiedFluidStack.amount) { - boolean filled = tHatch.fill(copiedFluidStack, true) >= copiedFluidStack.amount; - tHatch.onEmptyingContainerWhenEmpty(); + boolean filled = tHatch.fill(copiedFluidStack, true) >= copiedFluidStack.amount; + tHatch.onEmptyingContainerWhenEmpty(); return filled; } else if (tAmount > 0) { copiedFluidStack.amount = copiedFluidStack.amount - tHatch.fill(copiedFluidStack, true); @@ -755,7 +826,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { public boolean addOutput(FluidStack aLiquid) { if (aLiquid == null) return false; FluidStack copiedFluidStack = aLiquid.copy(); - if (!dumpFluid(mOutputHatches, copiedFluidStack, true)){ + if (!dumpFluid(mOutputHatches, copiedFluidStack, true)) { dumpFluid(mOutputHatches, copiedFluidStack, false); } return false; @@ -763,7 +834,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { protected void addFluidOutputs(FluidStack[] mOutputFluids2) { for (FluidStack outputFluidStack : mOutputFluids2) { - addOutput(outputFluidStack); + addOutput(outputFluidStack); } } @@ -780,8 +851,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { return tLiquid != null && tLiquid.amount >= aLiquid.amount; } } - } - else { + } else { FluidStack tLiquid = tHatch.getFluid(); if (tLiquid != null && tLiquid.isFluidEqual(aLiquid)) { tLiquid = tHatch.drain(aLiquid.amount, false); @@ -824,7 +894,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) { tHatch.mRecipeMap = getRecipeMap(); if (isValidMetaTileEntity(tHatch)) { - if (GT_Utility.areStacksEqual(aStack, tHatch.getBaseMetaTileEntity().getStackInSlot(0))) { + if (GT_Utility.areStacksEqual( + aStack, tHatch.getBaseMetaTileEntity().getStackInSlot(0))) { if (tHatch.getBaseMetaTileEntity().getStackInSlot(0).stackSize >= aStack.stackSize) { tHatch.getBaseMetaTileEntity().decrStackSize(0, aStack.stackSize); return true; @@ -836,7 +907,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { tHatch.mRecipeMap = getRecipeMap(); if (isValidMetaTileEntity(tHatch)) { for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { - if (GT_Utility.areStacksEqual(aStack, tHatch.getBaseMetaTileEntity().getStackInSlot(i))) { + if (GT_Utility.areStacksEqual( + aStack, tHatch.getBaseMetaTileEntity().getStackInSlot(i))) { if (tHatch.getBaseMetaTileEntity().getStackInSlot(i).stackSize >= aStack.stackSize) { tHatch.getBaseMetaTileEntity().decrStackSize(i, aStack.stackSize); return true; @@ -850,11 +922,11 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { public ArrayList<ItemStack> getStoredOutputs() { ArrayList<ItemStack> rList = new ArrayList<>(); -// for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) { -// if (isValidMetaTileEntity(tHatch)) { -// rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(1)); -// } -// } + // for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) { + // if (isValidMetaTileEntity(tHatch)) { + // rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(1)); + // } + // } for (GT_MetaTileEntity_Hatch_OutputBus tHatch : mOutputBusses) { if (isValidMetaTileEntity(tHatch)) { for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { @@ -873,15 +945,14 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { if (isValidMetaTileEntity(tHatch)) { for (FluidStack tFluid : ((GT_MetaTileEntity_Hatch_MultiInput) tHatch).getStoredFluid()) { if (tFluid != null) { - //GT_Log.out.print("mf: " + tFluid + "\n"); + // GT_Log.out.print("mf: " + tFluid + "\n"); rList.add(tFluid); } } } - } - else { + } else { if (isValidMetaTileEntity(tHatch) && tHatch.getFillableStack() != null) { - //GT_Log.out.print("sf: " + tHatch.getFillableStack() + "\n"); + // GT_Log.out.print("sf: " + tHatch.getFillableStack() + "\n"); rList.add(tHatch.getFillableStack()); } } @@ -900,7 +971,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { } } } - if(getStackInSlot(1) != null && getStackInSlot(1).getUnlocalizedName().startsWith("gt.integrated_circuit")) + if (getStackInSlot(1) != null && getStackInSlot(1).getUnlocalizedName().startsWith("gt.integrated_circuit")) rList.add(getStackInSlot(1)); return rList; } @@ -916,19 +987,18 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { if (isValidMetaTileEntity(tHatch)) tHatch.updateSlots(); } - protected void startRecipeProcessing() - { + protected void startRecipeProcessing() { for (GT_MetaTileEntity_Hatch_InputBus tHatch : mInputBusses) if (isValidMetaTileEntity(tHatch)) tHatch.startRecipeProcessing(); } - protected void endRecipeProcessing() - { + protected void endRecipeProcessing() { for (GT_MetaTileEntity_Hatch_InputBus tHatch : mInputBusses) if (isValidMetaTileEntity(tHatch)) tHatch.endRecipeProcessing(); } - protected static <T extends GT_MetaTileEntity_Hatch> T identifyHatch(IGregTechTileEntity aTileEntity, int aBaseCasingIndex, Class<T> clazz) { + protected static <T extends GT_MetaTileEntity_Hatch> T identifyHatch( + IGregTechTileEntity aTileEntity, int aBaseCasingIndex, Class<T> clazz) { if (aTileEntity == null) return null; IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); if (!clazz.isInstance(aMetaTileEntity)) return null; @@ -995,7 +1065,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { if (aTileEntity == null) return false; IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); if (aMetaTileEntity == null) return false; - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch && GT_ExoticEnergyInputHelper.isExoticEnergyInput(aMetaTileEntity)) { + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch + && GT_ExoticEnergyInputHelper.isExoticEnergyInput(aMetaTileEntity)) { GT_MetaTileEntity_Hatch hatch = (GT_MetaTileEntity_Hatch) aMetaTileEntity; hatch.updateTexture(aBaseCasingIndex); return mExoticEnergyHatches.add(hatch); @@ -1026,13 +1097,13 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { } public boolean addInputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - return addInputBusToMachineList(aTileEntity, aBaseCasingIndex) || - addInputHatchToMachineList(aTileEntity, aBaseCasingIndex); + return addInputBusToMachineList(aTileEntity, aBaseCasingIndex) + || addInputHatchToMachineList(aTileEntity, aBaseCasingIndex); } public boolean addOutputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - return addOutputBusToMachineList(aTileEntity, aBaseCasingIndex) || - addOutputHatchToMachineList(aTileEntity, aBaseCasingIndex); + return addOutputBusToMachineList(aTileEntity, aBaseCasingIndex) + || addOutputHatchToMachineList(aTileEntity, aBaseCasingIndex); } public boolean addInputBusToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { @@ -1083,41 +1154,45 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { @Override public String[] getInfoData() { - int mPollutionReduction=0; + int mPollutionReduction = 0; for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) { if (isValidMetaTileEntity(tHatch)) { - mPollutionReduction=Math.max(tHatch.calculatePollutionReduction(100),mPollutionReduction); + mPollutionReduction = Math.max(tHatch.calculatePollutionReduction(100), mPollutionReduction); } } - long storedEnergy=0; - long maxEnergy=0; - for(GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) { + long storedEnergy = 0; + long maxEnergy = 0; + for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) { if (isValidMetaTileEntity(tHatch)) { - storedEnergy+=tHatch.getBaseMetaTileEntity().getStoredEU(); - maxEnergy+=tHatch.getBaseMetaTileEntity().getEUCapacity(); + storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU(); + maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity(); } } - return new String[]{ - /* 1*/ StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mProgresstime/20) + EnumChatFormatting.RESET + " s / " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(mMaxProgresstime/20) + EnumChatFormatting.RESET + " s", - /* 2*/ StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", - /* 3*/ StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " + - EnumChatFormatting.RED + GT_Utility.formatNumbers(-mEUt) + EnumChatFormatting.RESET + " EU/t", - /* 4*/ StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(getMaxInputVoltage()) + EnumChatFormatting.RESET + " EU/t(*2A) " + - StatCollector.translateToLocal("GT5U.machines.tier") + ": " + - EnumChatFormatting.YELLOW + VN[GT_Utility.getTier(getMaxInputVoltage())] + EnumChatFormatting.RESET, - /* 5*/ StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " + - EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + " " + - StatCollector.translateToLocal("GT5U.multiblock.efficiency") + ": " + - EnumChatFormatting.YELLOW + Float.toString(mEfficiency / 100.0F) + EnumChatFormatting.RESET + " %", - /* 6*/ StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + - EnumChatFormatting.GREEN + mPollutionReduction + EnumChatFormatting.RESET + " %" + return new String[] { + /* 1*/ StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(mProgresstime / 20) + EnumChatFormatting.RESET + " s / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(mMaxProgresstime / 20) + EnumChatFormatting.RESET + " s", + /* 2*/ StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", + /* 3*/ StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " + EnumChatFormatting.RED + + GT_Utility.formatNumbers(-mEUt) + EnumChatFormatting.RESET + " EU/t", + /* 4*/ StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(getMaxInputVoltage()) + EnumChatFormatting.RESET + " EU/t(*2A) " + + StatCollector.translateToLocal("GT5U.machines.tier") + + ": " + EnumChatFormatting.YELLOW + + VN[GT_Utility.getTier(getMaxInputVoltage())] + EnumChatFormatting.RESET, + /* 5*/ StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " + EnumChatFormatting.RED + + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + " " + + StatCollector.translateToLocal("GT5U.multiblock.efficiency") + + ": " + EnumChatFormatting.YELLOW + + Float.toString(mEfficiency / 100.0F) + EnumChatFormatting.RESET + " %", + /* 6*/ StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + EnumChatFormatting.GREEN + + mPollutionReduction + EnumChatFormatting.RESET + " %" }; } @@ -1136,14 +1211,13 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { return false; } - protected ItemStack[] getCompactedInputs(){ - //TODO: repalce method with a cleaner one + protected ItemStack[] getCompactedInputs() { + // TODO: repalce method with a cleaner one ArrayList<ItemStack> tInputList = getStoredInputs(); int tInputList_sS = tInputList.size(); for (int i = 0; i < tInputList_sS - 1; i++) { for (int j = i + 1; j < tInputList_sS; j++) { - if (!GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) - continue; + if (!GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) continue; if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) { tInputList.remove(j--); tInputList_sS = tInputList.size(); @@ -1157,14 +1231,13 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { return tInputList.toArray(new ItemStack[0]); } - protected FluidStack[] getCompactedFluids(){ - //TODO: repalce method with a cleaner one + protected FluidStack[] getCompactedFluids() { + // TODO: repalce method with a cleaner one ArrayList<FluidStack> tFluidList = getStoredFluids(); int tFluidList_sS = tFluidList.size(); for (int i = 0; i < tFluidList_sS - 1; i++) { for (int j = i + 1; j < tFluidList_sS; j++) { - if (!GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) - continue; + if (!GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) continue; if (tFluidList.get(i).amount >= tFluidList.get(j).amount) { tFluidList.remove(j--); @@ -1180,31 +1253,32 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { } @Override - public void getWailaBody(ItemStack itemStack, List<String> currentTip, IWailaDataAccessor accessor, IWailaConfigHandler config) { + public void getWailaBody( + ItemStack itemStack, List<String> currentTip, IWailaDataAccessor accessor, IWailaConfigHandler config) { final NBTTagCompound tag = accessor.getNBTData(); - if(tag.getBoolean("incompleteStructure")) { + if (tag.getBoolean("incompleteStructure")) { currentTip.add(RED + "** INCOMPLETE STRUCTURE **" + RESET); } currentTip.add((tag.getBoolean("hasProblems") ? (RED + "** HAS PROBLEMS **") : GREEN + "Running Fine") + RESET - + " Efficiency: " + tag.getFloat("efficiency") + "%"); - - currentTip.add(String.format("Progress: %d s / %d s", tag.getInteger("progress"), tag.getInteger("maxProgress"))); + + " Efficiency: " + tag.getFloat("efficiency") + "%"); + currentTip.add( + String.format("Progress: %d s / %d s", tag.getInteger("progress"), tag.getInteger("maxProgress"))); super.getWailaBody(itemStack, currentTip, accessor, config); } @Override - public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, int z) { + public void getWailaNBTData( + EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, int z) { super.getWailaNBTData(player, tile, tag, world, x, y, z); tag.setBoolean("hasProblems", (getIdealStatus() - getRepairStatus()) > 0); tag.setFloat("efficiency", mEfficiency / 100.0F); - tag.setInteger("progress", mProgresstime/20); - tag.setInteger("maxProgress", mMaxProgresstime/20); + tag.setInteger("progress", mProgresstime / 20); + tag.setInteger("maxProgress", mMaxProgresstime / 20); tag.setBoolean("incompleteStructure", (getBaseMetaTileEntity().getErrorDisplayID() & 64) != 0); - } public List<GT_MetaTileEntity_Hatch> getExoticEnergyHatches() { diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SpecialFilter.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SpecialFilter.java index f5d43faffc..44d40e5a67 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SpecialFilter.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SpecialFilter.java @@ -14,16 +14,19 @@ public abstract class GT_MetaTileEntity_SpecialFilter extends GT_MetaTileEntity_ public boolean bNBTAllowed = false; public boolean bInvertFilter = false; - public GT_MetaTileEntity_SpecialFilter(int aID, String aName, String aNameRegional, int aTier, String[] aDescription) { + public GT_MetaTileEntity_SpecialFilter( + int aID, String aName, String aNameRegional, int aTier, String[] aDescription) { // 9 buffer slot, 1 representation slot, 1 holo slot. last seems not needed... super(aID, aName, aNameRegional, aTier, 11, aDescription); } - public GT_MetaTileEntity_SpecialFilter(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_SpecialFilter( + String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } - public GT_MetaTileEntity_SpecialFilter(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_SpecialFilter( + String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @@ -60,7 +63,9 @@ public abstract class GT_MetaTileEntity_SpecialFilter extends GT_MetaTileEntity_ @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && ((this.bNBTAllowed) || (!aStack.hasTagCompound())) && (this.isStackAllowed(aStack) != this.bInvertFilter); + return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) + && ((this.bNBTAllowed) || (!aStack.hasTagCompound())) + && (this.isStackAllowed(aStack) != this.bInvertFilter); } protected abstract boolean isStackAllowed(ItemStack aStack); diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java index fa040bf5cb..a4d6fc0e6b 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java @@ -1,11 +1,11 @@ package gregtech.api.metatileentity.implementations; +import static gregtech.api.enums.GT_Values.GT; + import gregtech.api.interfaces.ITexture; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_Cleanroom; -import static gregtech.api.enums.GT_Values.GT; - public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntity { /** * Value between [0 - 9] to describe the Tier of this Machine. @@ -26,17 +26,31 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit */ public final ITexture[][][] mTextures; - public GT_MetaTileEntity_TieredMachineBlock(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription, ITexture... aTextures) { + public GT_MetaTileEntity_TieredMachineBlock( + int aID, + String aName, + String aNameRegional, + int aTier, + int aInvSlotCount, + String aDescription, + ITexture... aTextures) { super(aID, aName, aNameRegional, aInvSlotCount); mTier = (byte) Math.max(0, Math.min(aTier, 14)); - mDescriptionArray = aDescription == null ? new String[0] : new String[]{aDescription}; + mDescriptionArray = aDescription == null ? new String[0] : new String[] {aDescription}; mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : ""; // must always be the last call! if (GT.isClientSide()) mTextures = getTextureSet(aTextures); else mTextures = null; } - public GT_MetaTileEntity_TieredMachineBlock(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String[] aDescription, ITexture... aTextures) { + public GT_MetaTileEntity_TieredMachineBlock( + int aID, + String aName, + String aNameRegional, + int aTier, + int aInvSlotCount, + String[] aDescription, + ITexture... aTextures) { super(aID, aName, aNameRegional, aInvSlotCount); mTier = (byte) Math.max(0, Math.min(aTier, 15)); mDescriptionArray = aDescription == null ? new String[0] : aDescription; @@ -52,15 +66,17 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit return GT_MetaTileEntity_Cleanroom.class; } - public GT_MetaTileEntity_TieredMachineBlock(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_TieredMachineBlock( + String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aInvSlotCount); mTier = (byte) aTier; - mDescriptionArray = aDescription == null ? new String[0] : new String[]{aDescription}; + mDescriptionArray = aDescription == null ? new String[0] : new String[] {aDescription}; mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : ""; mTextures = aTextures; } - public GT_MetaTileEntity_TieredMachineBlock(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_TieredMachineBlock( + String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { super(aName, aInvSlotCount); mTier = (byte) aTier; mDescriptionArray = aDescription == null ? new String[0] : aDescription; diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TooltipMultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TooltipMultiBlockBase.java index f77875db02..e564c65d21 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TooltipMultiBlockBase.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TooltipMultiBlockBase.java @@ -3,15 +3,16 @@ package gregtech.api.metatileentity.implementations; import gregtech.api.GregTech_API; import gregtech.api.interfaces.ISecondaryDescribable; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import org.lwjgl.input.Keyboard; - import java.util.concurrent.atomic.AtomicReferenceArray; +import org.lwjgl.input.Keyboard; /** * A multiblock with tooltip {@link GT_Multiblock_Tooltip_Builder} */ -public abstract class GT_MetaTileEntity_TooltipMultiBlockBase extends GT_MetaTileEntity_MultiBlockBase implements ISecondaryDescribable { - private static final AtomicReferenceArray<GT_Multiblock_Tooltip_Builder> tooltips = new AtomicReferenceArray<>(GregTech_API.METATILEENTITIES.length); +public abstract class GT_MetaTileEntity_TooltipMultiBlockBase extends GT_MetaTileEntity_MultiBlockBase + implements ISecondaryDescribable { + private static final AtomicReferenceArray<GT_Multiblock_Tooltip_Builder> tooltips = + new AtomicReferenceArray<>(GregTech_API.METATILEENTITIES.length); public GT_MetaTileEntity_TooltipMultiBlockBase(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Transformer.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Transformer.java index fdef48a86e..4bd5905ac5 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Transformer.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Transformer.java @@ -1,5 +1,12 @@ package gregtech.api.metatileentity.implementations; +import static gregtech.api.enums.GT_Values.V; +import static mcp.mobius.waila.api.SpecialChars.BLUE; +import static mcp.mobius.waila.api.SpecialChars.GOLD; +import static mcp.mobius.waila.api.SpecialChars.GREEN; +import static mcp.mobius.waila.api.SpecialChars.RED; +import static mcp.mobius.waila.api.SpecialChars.RESET; + import cofh.api.energy.IEnergyProvider; import cofh.api.energy.IEnergyStorage; import crazypants.enderio.machine.capbank.TileCapBank; @@ -13,6 +20,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Utility; +import java.util.List; import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; import net.minecraft.entity.player.EntityPlayer; @@ -23,15 +31,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import java.util.List; - -import static gregtech.api.enums.GT_Values.V; -import static mcp.mobius.waila.api.SpecialChars.RESET; -import static mcp.mobius.waila.api.SpecialChars.GOLD; -import static mcp.mobius.waila.api.SpecialChars.BLUE; -import static mcp.mobius.waila.api.SpecialChars.GREEN; -import static mcp.mobius.waila.api.SpecialChars.RED; - /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! * <p/> @@ -55,25 +54,57 @@ public class GT_MetaTileEntity_Transformer extends GT_MetaTileEntity_TieredMachi public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[12][17][]; for (byte i = -1; i < 16; i++) { - rTextures[ 0][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT [mTier]}; - rTextures[ 1][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT [mTier]}; - rTextures[ 2][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT [mTier]}; - rTextures[ 3][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI [mTier]}; - rTextures[ 4][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI [mTier]}; - rTextures[ 5][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI [mTier]}; - rTextures[ 6][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_IN [mTier]}; - rTextures[ 7][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_IN [mTier]}; - rTextures[ 8][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_IN [mTier]}; - rTextures[ 9][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier]}; - rTextures[10][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier]}; - rTextures[11][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier]}; + rTextures[0][i + 1] = new ITexture[] { + Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier] + }; + rTextures[1][i + 1] = new ITexture[] { + Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier] + }; + rTextures[2][i + 1] = new ITexture[] { + Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier] + }; + rTextures[3][i + 1] = new ITexture[] { + Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier] + }; + rTextures[4][i + 1] = new ITexture[] { + Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier] + }; + rTextures[5][i + 1] = new ITexture[] { + Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier] + }; + rTextures[6][i + 1] = new ITexture[] { + Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_IN[mTier] + }; + rTextures[7][i + 1] = new ITexture[] { + Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_IN[mTier] + }; + rTextures[8][i + 1] = new ITexture[] { + Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_IN[mTier] + }; + rTextures[9][i + 1] = new ITexture[] { + Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier] + }; + rTextures[10][i + 1] = new ITexture[] { + Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier] + }; + rTextures[11][i + 1] = new ITexture[] { + Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier] + }; } return rTextures; } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return mTextures[Math.min(2, aSide) + (aSide == aFacing ? 3 : 0) + (aBaseMetaTileEntity.isAllowedToWork() ? 0 : 6)][aColorIndex + 1]; + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { + return mTextures[ + Math.min(2, aSide) + (aSide == aFacing ? 3 : 0) + (aBaseMetaTileEntity.isAllowedToWork() ? 0 : 6)][ + aColorIndex + 1]; } @Override @@ -108,7 +139,9 @@ public class GT_MetaTileEntity_Transformer extends GT_MetaTileEntity_TieredMachi @Override public boolean isInputFacing(byte aSide) { - return getBaseMetaTileEntity().isAllowedToWork() ? aSide == getBaseMetaTileEntity().getFrontFacing() : aSide != getBaseMetaTileEntity().getFrontFacing(); + return getBaseMetaTileEntity().isAllowedToWork() + ? aSide == getBaseMetaTileEntity().getFrontFacing() + : aSide != getBaseMetaTileEntity().getFrontFacing(); } @Override @@ -158,22 +191,42 @@ public class GT_MetaTileEntity_Transformer extends GT_MetaTileEntity_TieredMachi for (byte i = 0; i < 6 && aBaseMetaTileEntity.getStoredEU() < aBaseMetaTileEntity.getEUCapacity(); i++) if (aBaseMetaTileEntity.inputEnergyFrom(i)) { TileEntity tTileEntity = aBaseMetaTileEntity.getTileEntityAtSide(i); - if (tTileEntity instanceof IEnergyProvider && ((IEnergyProvider) tTileEntity).extractEnergy(ForgeDirection.getOrientation(GT_Utility.getOppositeSide(i)), 1, true) == 1) { - long tEU = (long) ((IEnergyProvider) tTileEntity).extractEnergy(ForgeDirection.getOrientation(GT_Utility.getOppositeSide(i)), GT_Utility.safeInt(maxEUInput() * 100L / GregTech_API.mRFtoEU), false); + if (tTileEntity instanceof IEnergyProvider + && ((IEnergyProvider) tTileEntity) + .extractEnergy( + ForgeDirection.getOrientation(GT_Utility.getOppositeSide(i)), + 1, + true) + == 1) { + long tEU = (long) ((IEnergyProvider) tTileEntity) + .extractEnergy( + ForgeDirection.getOrientation(GT_Utility.getOppositeSide(i)), + GT_Utility.safeInt(maxEUInput() * 100L / GregTech_API.mRFtoEU), + false); tEU = tEU * GregTech_API.mRFtoEU / 100; aBaseMetaTileEntity.injectEnergyUnits((byte) 6, Math.min(tEU, maxEUInput()), 1); - } else if (tTileEntity instanceof IEnergyStorage && ((IEnergyStorage) tTileEntity).extractEnergy(1, true) == 1) { - long tEU = (long) ((IEnergyStorage) tTileEntity).extractEnergy(GT_Utility.safeInt(maxEUInput() * 100L / GregTech_API.mRFtoEU), false); + } else if (tTileEntity instanceof IEnergyStorage + && ((IEnergyStorage) tTileEntity).extractEnergy(1, true) == 1) { + long tEU = (long) ((IEnergyStorage) tTileEntity) + .extractEnergy(GT_Utility.safeInt(maxEUInput() * 100L / GregTech_API.mRFtoEU), false); tEU = tEU * GregTech_API.mRFtoEU / 100; aBaseMetaTileEntity.injectEnergyUnits((byte) 6, Math.min(tEU, maxEUInput()), 1); - } else if (GregTech_API.meIOLoaded && tTileEntity instanceof IPowerContainer && ((IPowerContainer) tTileEntity).getEnergyStored() > 0) { + } else if (GregTech_API.meIOLoaded + && tTileEntity instanceof IPowerContainer + && ((IPowerContainer) tTileEntity).getEnergyStored() > 0) { int storedRF = ((IPowerContainer) tTileEntity).getEnergyStored(); - int extractRF = GT_Utility.safeInt(maxEUInput() * 100L / GregTech_API.mRFtoEU); + int extractRF = GT_Utility.safeInt(maxEUInput() * 100L / GregTech_API.mRFtoEU); long tEU = 0; if (tTileEntity instanceof TileCapBank) { ICapBankNetwork network = ((TileCapBank) tTileEntity).getNetwork(); if (network != null && network.getEnergyStoredL() > 0) { - tEU = Math.min((Math.min(Math.min(network.getEnergyStoredL(), storedRF - extractRF), network.getMaxOutput())) * (long)GregTech_API.mRFtoEU / 100L, maxEUInput()); + tEU = Math.min( + (Math.min( + Math.min(network.getEnergyStoredL(), storedRF - extractRF), + network.getMaxOutput())) + * (long) GregTech_API.mRFtoEU + / 100L, + maxEUInput()); network.addEnergy(GT_Utility.safeInt(-(tEU * 100 / GregTech_API.mRFtoEU))); } } else { @@ -182,7 +235,7 @@ public class GT_MetaTileEntity_Transformer extends GT_MetaTileEntity_TieredMachi tEU = maxEUInput(); } else { ((IPowerContainer) tTileEntity).setEnergyStored(0); - tEU = storedRF * (long)GregTech_API.mRFtoEU / 100L; + tEU = storedRF * (long) GregTech_API.mRFtoEU / 100L; } } aBaseMetaTileEntity.injectEnergyUnits((byte) 6, Math.min(tEU, maxEUInput()), 1); @@ -212,22 +265,23 @@ public class GT_MetaTileEntity_Transformer extends GT_MetaTileEntity_TieredMachi } @Override - public boolean hasAlternativeModeText(){ - return true; + public boolean hasAlternativeModeText() { + return true; } @Override - public String getAlternativeModeText(){ - return - (getBaseMetaTileEntity().isAllowedToWork() ? GT_Utility.trans("145","Step Down, In: ") : GT_Utility.trans("146","Step Up, In: ")) + - maxEUInput() + - GT_Utility.trans("148","V ") + - maxAmperesIn() + - GT_Utility.trans("147","A, Out: ") + - maxEUOutput() + - GT_Utility.trans("148","V ") + - maxAmperesOut() + - GT_Utility.trans("149","A"); + public String getAlternativeModeText() { + return (getBaseMetaTileEntity().isAllowedToWork() + ? GT_Utility.trans("145", "Step Down, In: ") + : GT_Utility.trans("146", "Step Up, In: ")) + + maxEUInput() + + GT_Utility.trans("148", "V ") + + maxAmperesIn() + + GT_Utility.trans("147", "A, Out: ") + + maxEUOutput() + + GT_Utility.trans("148", "V ") + + maxAmperesOut() + + GT_Utility.trans("149", "A"); } @Override @@ -236,58 +290,50 @@ public class GT_MetaTileEntity_Transformer extends GT_MetaTileEntity_TieredMachi } @Override - public void getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { + public void getWailaBody( + ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { final int facing = getBaseMetaTileEntity().getFrontFacing(); final NBTTagCompound tag = accessor.getNBTData(); - final int side = (byte)accessor.getSide().ordinal(); + final int side = (byte) accessor.getSide().ordinal(); final boolean allowedToWork = tag.getBoolean("isAllowedToWork"); final byte inputTier = GT_Utility.getTier(tag.getLong("maxEUInput")); final byte outputTier = GT_Utility.getTier(tag.getLong("maxEUOutput")); - currenttip.add( - String.format( + currenttip.add(String.format( "%s %s(%dA) -> %s(%dA)", (allowedToWork ? (GREEN + "Step Down") : (RED + "Step Up")) + RESET, GT_Mod.gregtechproxy.mWailaTransformerVoltageTier - ? GT_Values.TIER_COLORS[inputTier] + GT_Values.VN[inputTier] + RESET - : tag.getLong("maxEUInput"), + ? GT_Values.TIER_COLORS[inputTier] + GT_Values.VN[inputTier] + RESET + : tag.getLong("maxEUInput"), tag.getLong("maxAmperesIn"), GT_Mod.gregtechproxy.mWailaTransformerVoltageTier - ? GT_Values.TIER_COLORS[outputTier] + GT_Values.VN[outputTier] + RESET - : tag.getLong("maxEUOutput"), - tag.getLong("maxAmperesOut") - ) - ); + ? GT_Values.TIER_COLORS[outputTier] + GT_Values.VN[outputTier] + RESET + : tag.getLong("maxEUOutput"), + tag.getLong("maxAmperesOut"))); if ((side == facing && allowedToWork) || (side != facing && !allowedToWork)) { - currenttip.add( - String.format( + currenttip.add(String.format( GOLD + "Input:" + RESET + " %s(%dA)", GT_Mod.gregtechproxy.mWailaTransformerVoltageTier - ? GT_Values.TIER_COLORS[inputTier] + GT_Values.VN[inputTier] + RESET - : tag.getLong("maxEUInput"), - tag.getLong("maxAmperesIn") - ) - ); + ? GT_Values.TIER_COLORS[inputTier] + GT_Values.VN[inputTier] + RESET + : tag.getLong("maxEUInput"), + tag.getLong("maxAmperesIn"))); } else { - currenttip.add( - String.format( + currenttip.add(String.format( BLUE + "Output:" + RESET + " %s(%dA)", GT_Mod.gregtechproxy.mWailaTransformerVoltageTier - ? GT_Values.TIER_COLORS[outputTier] + GT_Values.VN[outputTier] + RESET - : tag.getLong("maxEUOutput"), - tag.getLong("maxAmperesOut") - ) - ); + ? GT_Values.TIER_COLORS[outputTier] + GT_Values.VN[outputTier] + RESET + : tag.getLong("maxEUOutput"), + tag.getLong("maxAmperesOut"))); } super.getWailaBody(itemStack, currenttip, accessor, config); - } @Override - public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, int z) { + public void getWailaNBTData( + EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, int z) { super.getWailaNBTData(player, tile, tag, world, x, y, z); tag.setBoolean("isAllowedToWork", getBaseMetaTileEntity().isAllowedToWork()); tag.setLong("maxEUInput", maxEUInput()); @@ -295,6 +341,4 @@ public class GT_MetaTileEntity_Transformer extends GT_MetaTileEntity_TieredMachi tag.setLong("maxEUOutput", maxEUOutput()); tag.setLong("maxAmperesOut", maxAmperesOut()); } - - } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Wireless_Dynamo.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Wireless_Dynamo.java index bfc9b2118e..3fd496e960 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Wireless_Dynamo.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Wireless_Dynamo.java @@ -1,25 +1,25 @@ package gregtech.api.metatileentity.implementations; +import static gregtech.api.enums.GT_Values.*; + import gregtech.api.enums.Textures; import gregtech.api.interfaces.IGlobalWirelessEnergy; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.interfaces.tileentity.IWirelessEnergyHatchInformation; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import static gregtech.GT_Mod.gregtechproxy; -import static gregtech.api.enums.GT_Values.*; - -public class GT_MetaTileEntity_Wireless_Dynamo extends GT_MetaTileEntity_Hatch_Dynamo implements IGlobalWirelessEnergy, IWirelessEnergyHatchInformation { +public class GT_MetaTileEntity_Wireless_Dynamo extends GT_MetaTileEntity_Hatch_Dynamo + implements IGlobalWirelessEnergy, IWirelessEnergyHatchInformation { private String owner_uuid; private String owner_name; - public GT_MetaTileEntity_Wireless_Dynamo(String aName, byte aTier, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_Wireless_Dynamo( + String aName, byte aTier, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @@ -29,12 +29,12 @@ public class GT_MetaTileEntity_Wireless_Dynamo extends GT_MetaTileEntity_Hatch_D @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI_WIRELESS_ON[mTier]}; + return new ITexture[] {aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI_WIRELESS_ON[mTier]}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI_WIRELESS_ON[mTier]}; + return new ITexture[] {aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI_WIRELESS_ON[mTier]}; } @Override @@ -125,11 +125,9 @@ public class GT_MetaTileEntity_Wireless_Dynamo extends GT_MetaTileEntity_Hatch_D owner_name = aBaseMetaTileEntity.getOwnerName(); // Attempt to load in map from file. - if (GlobalEnergy.size() == 0) - loadGlobalEnergyInfo(aBaseMetaTileEntity.getWorld()); + if (GlobalEnergy.size() == 0) loadGlobalEnergyInfo(aBaseMetaTileEntity.getWorld()); strongCheckOrAddUser(owner_uuid, owner_name); - } // Every ticks_between_energy_addition ticks change the energy content of the machine. @@ -140,4 +138,3 @@ public class GT_MetaTileEntity_Wireless_Dynamo extends GT_MetaTileEntity_Hatch_D } } } - diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Wireless_Hatch.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Wireless_Hatch.java index 035147ca0b..baffde6f3f 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Wireless_Hatch.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Wireless_Hatch.java @@ -1,24 +1,23 @@ package gregtech.api.metatileentity.implementations; +import static gregtech.api.enums.GT_Values.*; + import gregtech.api.enums.Textures; import gregtech.api.interfaces.IGlobalWirelessEnergy; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.interfaces.tileentity.IWirelessEnergyHatchInformation; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.util.GT_Utility; +import java.math.BigInteger; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import java.math.BigInteger; - -import static gregtech.GT_Mod.gregtechproxy; -import static gregtech.api.enums.GT_Values.*; - -public class GT_MetaTileEntity_Wireless_Hatch extends GT_MetaTileEntity_Hatch_Energy implements IGlobalWirelessEnergy, IWirelessEnergyHatchInformation { +public class GT_MetaTileEntity_Wireless_Hatch extends GT_MetaTileEntity_Hatch_Energy + implements IGlobalWirelessEnergy, IWirelessEnergyHatchInformation { - private final BigInteger eu_transferred_per_operation = BigInteger.valueOf(2 * V[mTier] * ticks_between_energy_addition); + private final BigInteger eu_transferred_per_operation = + BigInteger.valueOf(2 * V[mTier] * ticks_between_energy_addition); private final long eu_transferred_per_operation_long = eu_transferred_per_operation.longValue(); private String owner_uuid; @@ -43,12 +42,12 @@ public class GT_MetaTileEntity_Wireless_Hatch extends GT_MetaTileEntity_Hatch_En @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI_WIRELESS_ON[mTier]}; + return new ITexture[] {aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI_WIRELESS_ON[mTier]}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI_WIRELESS_ON[mTier]}; + return new ITexture[] {aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI_WIRELESS_ON[mTier]}; } @Override @@ -131,8 +130,7 @@ public class GT_MetaTileEntity_Wireless_Hatch extends GT_MetaTileEntity_Hatch_En owner_name = aBaseMetaTileEntity.getOwnerName(); // Attempt to load in map from file. - if (GlobalEnergy.size() == 0) - loadGlobalEnergyInfo(aBaseMetaTileEntity.getWorld()); + if (GlobalEnergy.size() == 0) loadGlobalEnergyInfo(aBaseMetaTileEntity.getWorld()); strongCheckOrAddUser(owner_uuid, owner_name); @@ -140,7 +138,8 @@ public class GT_MetaTileEntity_Wireless_Hatch extends GT_MetaTileEntity_Hatch_En setEUVar(eu_transferred_per_operation_long); } - // This is set up in a way to be as optimised as possible. If a user has a relatively plentiful energy network + // This is set up in a way to be as optimised as possible. If a user has a relatively plentiful energy + // network // it should make no difference to them. Minimising the number of operations on BigInteger is essential. // Every ticks_between_energy_addition add eu_transferred_per_operation to internal EU storage from network. diff --git a/src/main/java/gregtech/api/multitileentity/MultiTileEntityBlock.java b/src/main/java/gregtech/api/multitileentity/MultiTileEntityBlock.java index 7129fd0aab..876fa50f0b 100644 --- a/src/main/java/gregtech/api/multitileentity/MultiTileEntityBlock.java +++ b/src/main/java/gregtech/api/multitileentity/MultiTileEntityBlock.java @@ -1,5 +1,12 @@ package gregtech.api.multitileentity; +import static gregtech.api.enums.GT_Values.OFFX; +import static gregtech.api.enums.GT_Values.OFFY; +import static gregtech.api.enums.GT_Values.OFFZ; +import static gregtech.api.util.GT_Util.LAST_BROKEN_TILEENTITY; +import static gregtech.api.util.GT_Util.getTileEntity; +import static gregtech.api.util.GT_Util.setTileEntity; + import com.cricketcraft.chisel.api.IFacade; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; @@ -30,6 +37,11 @@ import gregtech.api.util.GT_Util; import gregtech.api.util.GT_Utility; import gregtech.common.render.GT_Renderer_Block; import gregtech.common.render.IRenderedBlock; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.minecraft.block.Block; import net.minecraft.block.ITileEntityProvider; import net.minecraft.block.material.Material; @@ -55,23 +67,11 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.event.ForgeEventFactory; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static gregtech.api.enums.GT_Values.OFFX; -import static gregtech.api.enums.GT_Values.OFFY; -import static gregtech.api.enums.GT_Values.OFFZ; -import static gregtech.api.util.GT_Util.LAST_BROKEN_TILEENTITY; -import static gregtech.api.util.GT_Util.getTileEntity; -import static gregtech.api.util.GT_Util.setTileEntity; - /* * MultiTileEntityBlock ported from GT6 */ -public class MultiTileEntityBlock extends Block implements IDebugableBlock, ITileEntityProvider, IRenderedBlock, IFacade { +public class MultiTileEntityBlock extends Block + implements IDebugableBlock, ITileEntityProvider, IRenderedBlock, IFacade { protected static final Map<String, MultiTileEntityBlock> MULTI_BLOCK_MAP = new HashMap<>(); private static boolean LOCK = false; @@ -79,9 +79,18 @@ public class MultiTileEntityBlock extends Block implements IDebugableBlock, ITil protected final int mHarvestLevelOffset, mHarvestLevelMinimum, mHarvestLevelMaximum; protected final boolean mOpaque, mNormalCube; - public static String getName(String aMaterialName, SoundType aSoundType, String aTool, int aHarvestLevelOffset, int aHarvestLevelMinimum, int aHarvestLevelMaximum, boolean aOpaque, boolean aNormalCube) { - return "gt.block.multiblock." + aMaterialName + "." + aSoundType.soundName + "." + aTool + "." + aHarvestLevelOffset + "." + aHarvestLevelMinimum + "." + aHarvestLevelMaximum + "." + aOpaque + "." + aNormalCube; - + public static String getName( + String aMaterialName, + SoundType aSoundType, + String aTool, + int aHarvestLevelOffset, + int aHarvestLevelMinimum, + int aHarvestLevelMaximum, + boolean aOpaque, + boolean aNormalCube) { + return "gt.block.multiblock." + aMaterialName + "." + aSoundType.soundName + "." + aTool + "." + + aHarvestLevelOffset + "." + aHarvestLevelMinimum + "." + aHarvestLevelMaximum + "." + aOpaque + "." + + aNormalCube; } /** * @param aMaterialName the Name of the vanilla Material Field. In case this is not a vanilla Material, insert the Name you want to give your own Material instead. @@ -95,17 +104,65 @@ public class MultiTileEntityBlock extends Block implements IDebugableBlock, ITil * @param aNormalCube if this Block is a normal Cube (for Redstone Stuff). */ public static MultiTileEntityBlock getOrCreate( - String aModID, String aMaterialName, Material aMaterial, SoundType aSoundType, String aTool, int aHarvestLevelOffset, int aHarvestLevelMinimum, - int aHarvestLevelMaximum, boolean aOpaque, boolean aNormalCube - ) { - final MultiTileEntityBlock rBlock = MULTI_BLOCK_MAP.get(aModID + ":" + getName(aMaterialName, aSoundType, aTool = aTool.toLowerCase(), aHarvestLevelOffset, aHarvestLevelMinimum, aHarvestLevelMaximum, aOpaque, aNormalCube)); - return rBlock == null ? new MultiTileEntityBlock(aModID, aMaterialName, aMaterial, aSoundType, aTool, aHarvestLevelOffset, aHarvestLevelMinimum, aHarvestLevelMaximum, aOpaque, aNormalCube) : rBlock; - } - protected MultiTileEntityBlock(String aModID, String aMaterialName, Material aMaterial, SoundType aSoundType, String aTool, int aHarvestLevelOffset, int aHarvestLevelMinimum, int aHarvestLevelMaximum, boolean aOpaque, boolean aNormalCube) { + String aModID, + String aMaterialName, + Material aMaterial, + SoundType aSoundType, + String aTool, + int aHarvestLevelOffset, + int aHarvestLevelMinimum, + int aHarvestLevelMaximum, + boolean aOpaque, + boolean aNormalCube) { + final MultiTileEntityBlock rBlock = MULTI_BLOCK_MAP.get(aModID + ":" + + getName( + aMaterialName, + aSoundType, + aTool = aTool.toLowerCase(), + aHarvestLevelOffset, + aHarvestLevelMinimum, + aHarvestLevelMaximum, + aOpaque, + aNormalCube)); + return rBlock == null + ? new MultiTileEntityBlock( + aModID, + aMaterialName, + aMaterial, + aSoundType, + aTool, + aHarvestLevelOffset, + aHarvestLevelMinimum, + aHarvestLevelMaximum, + aOpaque, + aNormalCube) + : rBlock; + } + + protected MultiTileEntityBlock( + String aModID, + String aMaterialName, + Material aMaterial, + SoundType aSoundType, + String aTool, + int aHarvestLevelOffset, + int aHarvestLevelMinimum, + int aHarvestLevelMaximum, + boolean aOpaque, + boolean aNormalCube) { super(aMaterial); - if(GregTech_API.sPreloadFinished) throw new IllegalStateException("Blocks can only be initialized within preInit!"); - - mNameInternal = getName(aMaterialName, aSoundType, aTool, aHarvestLevelOffset, aHarvestLevelMinimum, aHarvestLevelMaximum, aOpaque, aNormalCube); + if (GregTech_API.sPreloadFinished) + throw new IllegalStateException("Blocks can only be initialized within preInit!"); + + mNameInternal = getName( + aMaterialName, + aSoundType, + aTool, + aHarvestLevelOffset, + aHarvestLevelMinimum, + aHarvestLevelMaximum, + aOpaque, + aNormalCube); GameRegistry.registerBlock(this, ItemBlock.class, mNameInternal); MULTI_BLOCK_MAP.put(aModID + ":" + mNameInternal, this); @@ -121,16 +178,17 @@ public class MultiTileEntityBlock extends Block implements IDebugableBlock, ITil opaque = isOpaqueCube(); lightOpacity = isOpaqueCube() ? 255 : 0; - } @Override public final void breakBlock(World aWorld, int aX, int aY, int aZ, Block aBlock, int aMetaData) { final TileEntity aTileEntity = getTileEntity(aWorld, aX, aY, aZ, true); if (aTileEntity != null) LAST_BROKEN_TILEENTITY.set(aTileEntity); - if (aTileEntity == null || !aTileEntity.shouldRefresh(this, aBlock, aMetaData, aMetaData, aWorld, aX, aY, aZ)) return; - if (aTileEntity instanceof IMTE_BreakBlock && ((IMTE_BreakBlock)aTileEntity).breakBlock()) return; - if (aTileEntity instanceof IMTE_HasMultiBlockMachineRelevantData && ((IMTE_HasMultiBlockMachineRelevantData)aTileEntity).hasMultiBlockMachineRelevantData()) + if (aTileEntity == null || !aTileEntity.shouldRefresh(this, aBlock, aMetaData, aMetaData, aWorld, aX, aY, aZ)) + return; + if (aTileEntity instanceof IMTE_BreakBlock && ((IMTE_BreakBlock) aTileEntity).breakBlock()) return; + if (aTileEntity instanceof IMTE_HasMultiBlockMachineRelevantData + && ((IMTE_HasMultiBlockMachineRelevantData) aTileEntity).hasMultiBlockMachineRelevantData()) GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); aWorld.removeTileEntity(aX, aY, aZ); @@ -146,7 +204,7 @@ public class MultiTileEntityBlock extends Block implements IDebugableBlock, ITil } @Override - public final boolean func_149730_j/*isFullBlock*/() { + public final boolean func_149730_j /*isFullBlock*/() { return mOpaque; } @@ -168,7 +226,9 @@ public class MultiTileEntityBlock extends Block implements IDebugableBlock, ITil @Override public final float getBlockHardness(World aWorld, int aX, int aY, int aZ) { final TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return aTileEntity instanceof IMTE_GetBlockHardness ? ((IMTE_GetBlockHardness) aTileEntity).getBlockHardness() : 1.0F; + return aTileEntity instanceof IMTE_GetBlockHardness + ? ((IMTE_GetBlockHardness) aTileEntity).getBlockHardness() + : 1.0F; } @SideOnly(Side.CLIENT) @@ -185,31 +245,35 @@ public class MultiTileEntityBlock extends Block implements IDebugableBlock, ITil @Override @SuppressWarnings("unchecked") - public final void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB aAABB, List aList, Entity aEntity) { + public final void addCollisionBoxesToList( + World aWorld, int aX, int aY, int aZ, AxisAlignedBB aAABB, List aList, Entity aEntity) { final TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (aTileEntity instanceof IMultiTileEntity) ((IMultiTileEntity) aTileEntity).addCollisionBoxesToList(aAABB, aList, aEntity); + if (aTileEntity instanceof IMultiTileEntity) + ((IMultiTileEntity) aTileEntity).addCollisionBoxesToList(aAABB, aList, aEntity); else super.addCollisionBoxesToList(aWorld, aX, aY, aZ, aAABB, aList, aEntity); } @Override public final AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { final TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return aTileEntity instanceof IMultiTileEntity ? ((IMultiTileEntity) aTileEntity).getCollisionBoundingBoxFromPool() - : aTileEntity == null ? null : super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); + return aTileEntity instanceof IMultiTileEntity + ? ((IMultiTileEntity) aTileEntity).getCollisionBoundingBoxFromPool() + : aTileEntity == null ? null : super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); } @Override public final AxisAlignedBB getSelectedBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { final TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return aTileEntity instanceof IMultiTileEntity ? ((IMultiTileEntity) aTileEntity).getSelectedBoundingBoxFromPool() - : super.getSelectedBoundingBoxFromPool(aWorld, aX, aY, aZ); + return aTileEntity instanceof IMultiTileEntity + ? ((IMultiTileEntity) aTileEntity).getSelectedBoundingBoxFromPool() + : super.getSelectedBoundingBoxFromPool(aWorld, aX, aY, aZ); } @Override public void setBlockBoundsBasedOnState(IBlockAccess blockAccess, int aX, int aY, int aZ) { final TileEntity aTileEntity = blockAccess.getTileEntity(aX, aY, aZ); if (aTileEntity instanceof IMultiTileEntity) { - ((IMultiTileEntity)aTileEntity).setBlockBoundsBasedOnState(this); + ((IMultiTileEntity) aTileEntity).setBlockBoundsBasedOnState(this); return; } super.setBlockBoundsBasedOnState(blockAccess, aX, aY, aZ); @@ -221,11 +285,13 @@ public class MultiTileEntityBlock extends Block implements IDebugableBlock, ITil } @Override - public final void onNeighborChange(IBlockAccess aWorld, int aX, int aY, int aZ, int aTileX, int aTileY, int aTileZ) { + public final void onNeighborChange( + IBlockAccess aWorld, int aX, int aY, int aZ, int aTileX, int aTileY, int aTileZ) { final TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (!LOCK) { LOCK = true; - if (aTileEntity instanceof BaseTileEntity) ((BaseTileEntity) aTileEntity).onAdjacentBlockChange(aTileX, aTileY, aTileZ); + if (aTileEntity instanceof BaseTileEntity) + ((BaseTileEntity) aTileEntity).onAdjacentBlockChange(aTileX, aTileY, aTileZ); LOCK = false; } } @@ -238,7 +304,8 @@ public class MultiTileEntityBlock extends Block implements IDebugableBlock, ITil if (aTileEntity instanceof BaseTileEntity) ((BaseTileEntity) aTileEntity).onAdjacentBlockChange(aX, aY, aZ); LOCK = false; } - if (aTileEntity instanceof IMTE_OnNeighborBlockChange) ((IMTE_OnNeighborBlockChange) aTileEntity).onNeighborBlockChange(aWorld, aBlock); + if (aTileEntity instanceof IMTE_OnNeighborBlockChange) + ((IMTE_OnNeighborBlockChange) aTileEntity).onNeighborBlockChange(aWorld, aBlock); if (aTileEntity == null) aWorld.setBlockToAir(aX, aY, aZ); } @@ -251,8 +318,11 @@ public class MultiTileEntityBlock extends Block implements IDebugableBlock, ITil @Override public float getPlayerRelativeBlockHardness(EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) { final TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return aTileEntity instanceof IMultiTileEntity && ((IMultiTileEntity) aTileEntity).privateAccess() && !((IMultiTileEntity) aTileEntity).playerOwnsThis(aPlayer, true) ? -1.0F - : super.getPlayerRelativeBlockHardness(aPlayer, aWorld, aX, aY, aZ); + return aTileEntity instanceof IMultiTileEntity + && ((IMultiTileEntity) aTileEntity).privateAccess() + && !((IMultiTileEntity) aTileEntity).playerOwnsThis(aPlayer, true) + ? -1.0F + : super.getPlayerRelativeBlockHardness(aPlayer, aWorld, aX, aY, aZ); } @Override @@ -263,42 +333,54 @@ public class MultiTileEntityBlock extends Block implements IDebugableBlock, ITil } @Override - public boolean onBlockActivated(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer, int aSide, float aHitX, float aHitY, float aHitZ) { + public boolean onBlockActivated( + World aWorld, + int aX, + int aY, + int aZ, + EntityPlayer aPlayer, + int aSide, + float aHitX, + float aHitY, + float aHitZ) { final TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (aPlayer != null && ItemList.TC_Thaumometer.isStackEqual(aPlayer.getHeldItem(), true, true)) return false; - return aTileEntity instanceof IMultiTileEntity && ((IMultiTileEntity) aTileEntity).onBlockActivated(aPlayer, (byte)aSide, aHitX, aHitY, aHitZ); + return aTileEntity instanceof IMultiTileEntity + && ((IMultiTileEntity) aTileEntity).onBlockActivated(aPlayer, (byte) aSide, aHitX, aHitY, aHitZ); } @Override public final int isProvidingWeakPower(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) { final TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return aTileEntity instanceof IMTE_IsProvidingWeakPower ? ((IMTE_IsProvidingWeakPower) aTileEntity).isProvidingWeakPower((byte)aSide) : - super.isProvidingWeakPower(aWorld, aX, aY, aZ, aSide); + return aTileEntity instanceof IMTE_IsProvidingWeakPower + ? ((IMTE_IsProvidingWeakPower) aTileEntity).isProvidingWeakPower((byte) aSide) + : super.isProvidingWeakPower(aWorld, aX, aY, aZ, aSide); } @Override public final int isProvidingStrongPower(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) { final TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return aTileEntity instanceof IMTE_IsProvidingStrongPower ? ((IMTE_IsProvidingStrongPower) aTileEntity).isProvidingStrongPower((byte)aSide) - : super.isProvidingStrongPower(aWorld, aX, aY, aZ, aSide); + return aTileEntity instanceof IMTE_IsProvidingStrongPower + ? ((IMTE_IsProvidingStrongPower) aTileEntity).isProvidingStrongPower((byte) aSide) + : super.isProvidingStrongPower(aWorld, aX, aY, aZ, aSide); } - @Override public final boolean shouldCheckWeakPower(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) { final TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return aTileEntity instanceof IMTE_ShouldCheckWeakPower ? ((IMTE_ShouldCheckWeakPower) aTileEntity).shouldCheckWeakPower((byte)aSide) - : isNormalCube(aWorld, aX, aY, aZ); + return aTileEntity instanceof IMTE_ShouldCheckWeakPower + ? ((IMTE_ShouldCheckWeakPower) aTileEntity).shouldCheckWeakPower((byte) aSide) + : isNormalCube(aWorld, aX, aY, aZ); } @Override public final boolean getWeakChanges(IBlockAccess aWorld, int aX, int aY, int aZ) { final TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return aTileEntity instanceof IMTE_GetWeakChanges ? ((IMTE_GetWeakChanges) aTileEntity).getWeakChanges() - : super.getWeakChanges(aWorld, aX, aY, aZ); + return aTileEntity instanceof IMTE_GetWeakChanges + ? ((IMTE_GetWeakChanges) aTileEntity).getWeakChanges() + : super.getWeakChanges(aWorld, aX, aY, aZ); } - @Override public final void harvestBlock(World aWorld, EntityPlayer aPlayer, int aX, int aY, int aZ, int aMeta) { if (aPlayer == null) aPlayer = harvesters.get(); @@ -310,8 +392,10 @@ public class MultiTileEntityBlock extends Block implements IDebugableBlock, ITil final TileEntity aTileEntity = getTileEntity(aWorld, aX, aY, aZ, true); if (aTileEntity instanceof IMultiTileEntity) { final ArrayList<ItemStack> tList = ((IMultiTileEntity) aTileEntity).getDrops(aFortune, aSilkTouch); - aChance = ForgeEventFactory.fireBlockHarvesting(tList, aWorld, this, aX, aY, aZ, aMeta, aFortune, aChance, aSilkTouch, aPlayer); - for (ItemStack tStack : tList) if (XSTR.XSTR_INSTANCE.nextFloat() <= aChance) dropBlockAsItem(aWorld, aX, aY, aZ, tStack); + aChance = ForgeEventFactory.fireBlockHarvesting( + tList, aWorld, this, aX, aY, aZ, aMeta, aFortune, aChance, aSilkTouch, aPlayer); + for (ItemStack tStack : tList) + if (XSTR.XSTR_INSTANCE.nextFloat() <= aChance) dropBlockAsItem(aWorld, aX, aY, aZ, tStack); } } @@ -355,7 +439,9 @@ public class MultiTileEntityBlock extends Block implements IDebugableBlock, ITil @Override public final boolean shouldSideBeRendered(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) { final TileEntity aTileEntity = aWorld.getTileEntity(aX - OFFX[aSide], aY - OFFY[aSide], aZ - OFFZ[aSide]); - return aTileEntity instanceof IMultiTileEntity ? ((IMultiTileEntity) aTileEntity).shouldSideBeRendered((byte)aSide) : super.shouldSideBeRendered(aWorld, aX, aY, aZ, aSide); + return aTileEntity instanceof IMultiTileEntity + ? ((IMultiTileEntity) aTileEntity).shouldSideBeRendered((byte) aSide) + : super.shouldSideBeRendered(aWorld, aX, aY, aZ, aSide); } @Override @@ -365,13 +451,16 @@ public class MultiTileEntityBlock extends Block implements IDebugableBlock, ITil final byte aSide = (byte) side; final CoverableTileEntity tile = (CoverableTileEntity) tTileEntity; if (side != -1) { - final Block facadeBlock = tile.getCoverBehaviorAtSideNew(aSide).getFacadeBlock(aSide, tile.getCoverIDAtSide(aSide), tile.getComplexCoverDataAtSide(aSide), tile); + final Block facadeBlock = tile.getCoverBehaviorAtSideNew(aSide) + .getFacadeBlock( + aSide, tile.getCoverIDAtSide(aSide), tile.getComplexCoverDataAtSide(aSide), tile); if (facadeBlock != null) return facadeBlock; } else { // we do not allow more than one type of facade per block, so no need to check every side // see comment in gregtech.common.covers.GT_Cover_FacadeBase.isCoverPlaceable for (byte i = 0; i < 6; i++) { - final Block facadeBlock = tile.getCoverBehaviorAtSideNew(i).getFacadeBlock(i, tile.getCoverIDAtSide(i), tile.getComplexCoverDataAtSide(i), tile); + final Block facadeBlock = tile.getCoverBehaviorAtSideNew(i) + .getFacadeBlock(i, tile.getCoverIDAtSide(i), tile.getComplexCoverDataAtSide(i), tile); if (facadeBlock != null) { return facadeBlock; } @@ -388,16 +477,22 @@ public class MultiTileEntityBlock extends Block implements IDebugableBlock, ITil final byte aSide = (byte) side; final CoverableTileEntity tile = (CoverableTileEntity) tTileEntity; if (side != -1) { - final Block facadeBlock = tile.getCoverBehaviorAtSideNew(aSide).getFacadeBlock(aSide, tile.getCoverIDAtSide(aSide), tile.getComplexCoverDataAtSide(aSide), tile); + final Block facadeBlock = tile.getCoverBehaviorAtSideNew(aSide) + .getFacadeBlock( + aSide, tile.getCoverIDAtSide(aSide), tile.getComplexCoverDataAtSide(aSide), tile); if (facadeBlock != null) - return tile.getCoverBehaviorAtSideNew(aSide).getFacadeMeta(aSide, tile.getCoverIDAtSide(aSide), tile.getComplexCoverDataAtSide(aSide), tile); + return tile.getCoverBehaviorAtSideNew(aSide) + .getFacadeMeta( + aSide, tile.getCoverIDAtSide(aSide), tile.getComplexCoverDataAtSide(aSide), tile); } else { // we do not allow more than one type of facade per block, so no need to check every side // see comment in gregtech.common.covers.GT_Cover_FacadeBase.isCoverPlaceable for (byte i = 0; i < 6; i++) { - final Block facadeBlock = tile.getCoverBehaviorAtSideNew(i).getFacadeBlock(i, tile.getCoverIDAtSide(i), tile.getComplexCoverDataAtSide(i), tile); + final Block facadeBlock = tile.getCoverBehaviorAtSideNew(i) + .getFacadeBlock(i, tile.getCoverIDAtSide(i), tile.getComplexCoverDataAtSide(i), tile); if (facadeBlock != null) { - return tile.getCoverBehaviorAtSideNew(i).getFacadeMeta(i, tile.getCoverIDAtSide(i), tile.getComplexCoverDataAtSide(i), tile); + return tile.getCoverBehaviorAtSideNew(i) + .getFacadeMeta(i, tile.getCoverIDAtSide(i), tile.getComplexCoverDataAtSide(i), tile); } } } @@ -432,7 +527,9 @@ public class MultiTileEntityBlock extends Block implements IDebugableBlock, ITil } @Override - public final void getSubBlocks(Item aItem, CreativeTabs aCreativeTab, List aList) {/**/} + public final void getSubBlocks(Item aItem, CreativeTabs aCreativeTab, List aList) { + /**/ + } @Override public boolean hasComparatorInputOverride() { @@ -442,13 +539,18 @@ public class MultiTileEntityBlock extends Block implements IDebugableBlock, ITil @Override public final int getComparatorInputOverride(World aWorld, int aX, int aY, int aZ, int aSide) { final TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return aTileEntity instanceof IMTE_GetComparatorInputOverride ? ((IMTE_GetComparatorInputOverride) aTileEntity).getComparatorInputOverride((byte)aSide) - : aTileEntity instanceof IMTE_IsProvidingWeakPower ? ((IMTE_IsProvidingWeakPower) aTileEntity).isProvidingWeakPower(GT_Utility.getOppositeSide(aSide)) - : super.getComparatorInputOverride(aWorld, aX, aY, aZ, aSide); + return aTileEntity instanceof IMTE_GetComparatorInputOverride + ? ((IMTE_GetComparatorInputOverride) aTileEntity).getComparatorInputOverride((byte) aSide) + : aTileEntity instanceof IMTE_IsProvidingWeakPower + ? ((IMTE_IsProvidingWeakPower) aTileEntity) + .isProvidingWeakPower(GT_Utility.getOppositeSide(aSide)) + : super.getComparatorInputOverride(aWorld, aX, aY, aZ, aSide); } @Override - public final void registerBlockIcons(IIconRegister aIconRegister) {/**/} + public final void registerBlockIcons(IIconRegister aIconRegister) { + /**/ + } @Override public final boolean isNormalCube(IBlockAccess aWorld, int aX, int aY, int aZ) { @@ -458,7 +560,10 @@ public class MultiTileEntityBlock extends Block implements IDebugableBlock, ITil @Override public final boolean isSideSolid(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection aSide) { final TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return aTileEntity instanceof IMultiTileEntity ? ((IMultiTileEntity) aTileEntity).isSideSolid((byte)(aSide != null ? aSide.ordinal() : GT_Values.SIDE_UNKNOWN)) : mOpaque; + return aTileEntity instanceof IMultiTileEntity + ? ((IMultiTileEntity) aTileEntity) + .isSideSolid((byte) (aSide != null ? aSide.ordinal() : GT_Values.SIDE_UNKNOWN)) + : mOpaque; } @Override @@ -484,7 +589,8 @@ public class MultiTileEntityBlock extends Block implements IDebugableBlock, ITil } @Override - public final ArrayList<ItemStack> getDrops(World aWorld, int aX, int aY, int aZ, int aUnusableMetaData, int aFortune) { + public final ArrayList<ItemStack> getDrops( + World aWorld, int aX, int aY, int aZ, int aUnusableMetaData, int aFortune) { final TileEntity aTileEntity = getTileEntity(aWorld, aX, aY, aZ, true); if (aTileEntity instanceof IMultiTileEntity) return ((IMultiTileEntity) aTileEntity).getDrops(aFortune, false); return new ArrayList<>(); @@ -496,10 +602,20 @@ public class MultiTileEntityBlock extends Block implements IDebugableBlock, ITil } @Override - public final float getExplosionResistance(Entity aExploder, World aWorld, int aX, int aY, int aZ, double aExplosionX, double aExplosionY, double aExplosionZ) { + public final float getExplosionResistance( + Entity aExploder, + World aWorld, + int aX, + int aY, + int aZ, + double aExplosionX, + double aExplosionY, + double aExplosionZ) { final TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return aTileEntity instanceof IMultiTileEntity ? ((IMultiTileEntity) aTileEntity).getExplosionResistance(aExploder, aExplosionX, aExplosionY, aExplosionZ) - : 1.0F; + return aTileEntity instanceof IMultiTileEntity + ? ((IMultiTileEntity) aTileEntity) + .getExplosionResistance(aExploder, aExplosionX, aExplosionY, aExplosionZ) + : 1.0F; } @Override @@ -508,10 +624,11 @@ public class MultiTileEntityBlock extends Block implements IDebugableBlock, ITil final TileEntity aTileEntity = getTileEntity(aWorld, aX, aY, aZ, true); if (aTileEntity != null) LAST_BROKEN_TILEENTITY.set(aTileEntity); if (aTileEntity instanceof IMultiTileEntity) { - GT_Log.exp.printf("Explosion at : %d | %d | %d DIMID: %s due to near explosion!%n", aX, aY, aZ, aWorld.provider.dimensionId); + GT_Log.exp.printf( + "Explosion at : %d | %d | %d DIMID: %s due to near explosion!%n", + aX, aY, aZ, aWorld.provider.dimensionId); ((IMultiTileEntity) aTileEntity).onExploded(aExplosion); - } - else aWorld.setBlockToAir(aX, aY, aZ); + } else aWorld.setBlockToAir(aX, aY, aZ); } @Override @@ -522,7 +639,8 @@ public class MultiTileEntityBlock extends Block implements IDebugableBlock, ITil @Override public final boolean recolourBlock(World aWorld, int aX, int aY, int aZ, ForgeDirection aSide, int aColor) { final TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return aTileEntity instanceof IMultiTileEntity && ((IMultiTileEntity) aTileEntity).recolourBlock((byte)aSide.ordinal(), (byte) aColor); + return aTileEntity instanceof IMultiTileEntity + && ((IMultiTileEntity) aTileEntity).recolourBlock((byte) aSide.ordinal(), (byte) aColor); } @Override @@ -540,9 +658,9 @@ public class MultiTileEntityBlock extends Block implements IDebugableBlock, ITil return getHarvestTool(aMeta).equals(aType); } - @Override - public final ItemStack getPickBlock(MovingObjectPosition aTarget, World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer) { + public final ItemStack getPickBlock( + MovingObjectPosition aTarget, World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer) { final TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); return aTileEntity instanceof IMultiTileEntity ? ((IMultiTileEntity) aTileEntity).getPickBlock(aTarget) : null; } @@ -553,17 +671,32 @@ public class MultiTileEntityBlock extends Block implements IDebugableBlock, ITil return aTileEntity instanceof IMultiTileEntity ? ((IMultiTileEntity) aTileEntity).getPickBlock(aTarget) : null; } - public final void receiveMultiTileEntityData( - IBlockAccess aWorld, int aX, short aY, int aZ, short aRID, short aID, int aCover0, int aCover1, int aCover2, int aCover3, int aCover4, int aCover5, - byte aTextureData, byte aTexturePage, byte aUpdateData, byte aRedstoneData, byte aColorData - ) { + IBlockAccess aWorld, + int aX, + short aY, + int aZ, + short aRID, + short aID, + int aCover0, + int aCover1, + int aCover2, + int aCover3, + int aCover4, + int aCover5, + byte aTextureData, + byte aTexturePage, + byte aUpdateData, + byte aRedstoneData, + byte aColorData) { if (!(aWorld instanceof World)) return; final IMultiTileEntity te; TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (!(aTileEntity instanceof IMultiTileEntity) || ((IMultiTileEntity) aTileEntity).getMultiTileEntityRegistryID() != aRID || ((IMultiTileEntity) aTileEntity).getMultiTileEntityID() != aID) { + if (!(aTileEntity instanceof IMultiTileEntity) + || ((IMultiTileEntity) aTileEntity).getMultiTileEntityRegistryID() != aRID + || ((IMultiTileEntity) aTileEntity).getMultiTileEntityID() != aID) { final MultiTileEntityRegistry tRegistry = MultiTileEntityRegistry.getRegistry(aRID); if (tRegistry == null) return; @@ -574,18 +707,17 @@ public class MultiTileEntityBlock extends Block implements IDebugableBlock, ITil te = (IMultiTileEntity) aTileEntity; boolean updated; - updated = te.setCoverIDAtSideNoUpdate((byte) 0, aCover0); + updated = te.setCoverIDAtSideNoUpdate((byte) 0, aCover0); updated |= te.setCoverIDAtSideNoUpdate((byte) 1, aCover1); updated |= te.setCoverIDAtSideNoUpdate((byte) 2, aCover2); updated |= te.setCoverIDAtSideNoUpdate((byte) 3, aCover3); updated |= te.setCoverIDAtSideNoUpdate((byte) 4, aCover4); updated |= te.setCoverIDAtSideNoUpdate((byte) 5, aCover5); - if(updated) { + if (updated) { te.issueBlockUpdate(); } - te.receiveClientEvent(GregTechTileClientEvents.CHANGE_COMMON_DATA, aTextureData); te.receiveClientEvent(GregTechTileClientEvents.CHANGE_CUSTOM_DATA, aUpdateData & 0x7F); te.receiveClientEvent(GregTechTileClientEvents.CHANGE_CUSTOM_DATA, aTexturePage | 0x80); @@ -593,12 +725,13 @@ public class MultiTileEntityBlock extends Block implements IDebugableBlock, ITil te.receiveClientEvent(GregTechTileClientEvents.CHANGE_REDSTONE_OUTPUT, aRedstoneData); } - @Override public final TileEntity createTileEntity(World aWorld, int aMeta) { return null; } @Override - public TileEntity createNewTileEntity(World world, int i) { return null; } + public TileEntity createNewTileEntity(World world, int i) { + return null; + } } diff --git a/src/main/java/gregtech/api/multitileentity/MultiTileEntityBlockInternal.java b/src/main/java/gregtech/api/multitileentity/MultiTileEntityBlockInternal.java index 852ffa3c8e..f388944bb4 100644 --- a/src/main/java/gregtech/api/multitileentity/MultiTileEntityBlockInternal.java +++ b/src/main/java/gregtech/api/multitileentity/MultiTileEntityBlockInternal.java @@ -1,5 +1,8 @@ package gregtech.api.multitileentity; +import static gregtech.GT_Mod.GT_FML_LOGGER; +import static gregtech.api.util.GT_Util.setTileEntity; + import gregtech.api.GregTech_API; import gregtech.api.interfaces.ITexture; import gregtech.api.multitileentity.interfaces.IMultiTileEntity; @@ -17,9 +20,6 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import static gregtech.GT_Mod.GT_FML_LOGGER; -import static gregtech.api.util.GT_Util.setTileEntity; - public class MultiTileEntityBlockInternal extends Block implements IRenderedBlock { public MultiTileEntityRegistry mMultiTileEntityRegistry; @@ -28,47 +28,73 @@ public class MultiTileEntityBlockInternal extends Block implements IRenderedBloc } @Override - public void registerBlockIcons(IIconRegister aIconRegister) { /* Do Nothing */ } + public void registerBlockIcons(IIconRegister aIconRegister) { + /* Do Nothing */ + } @Override public int getRenderType() { return GT_Renderer_Block.INSTANCE == null ? super.getRenderType() : GT_Renderer_Block.INSTANCE.mRenderID; } - @Override public final String getUnlocalizedName() {return mMultiTileEntityRegistry.mNameInternal;} - @Override public final String getLocalizedName() {return StatCollector.translateToLocal(mMultiTileEntityRegistry.mNameInternal + ".name");} - public boolean placeBlock(World aWorld, int aX, int aY, int aZ, byte aSide, short aMetaData, NBTTagCompound aNBT, boolean aCauseBlockUpdates, boolean aForcePlacement) { - final MultiTileEntityContainer aMTEContainer = mMultiTileEntityRegistry.getNewTileEntityContainer(aWorld, aX, aY, aZ, aMetaData, aNBT); + @Override + public final String getUnlocalizedName() { + return mMultiTileEntityRegistry.mNameInternal; + } + + @Override + public final String getLocalizedName() { + return StatCollector.translateToLocal(mMultiTileEntityRegistry.mNameInternal + ".name"); + } + + public boolean placeBlock( + World aWorld, + int aX, + int aY, + int aZ, + byte aSide, + short aMetaData, + NBTTagCompound aNBT, + boolean aCauseBlockUpdates, + boolean aForcePlacement) { + final MultiTileEntityContainer aMTEContainer = + mMultiTileEntityRegistry.getNewTileEntityContainer(aWorld, aX, aY, aZ, aMetaData, aNBT); if (aMTEContainer == null) return false; final Block tReplacedBlock = aWorld.getBlock(aX, aY, aZ); - // This is some complicated bullshit Greg had to do to make his MTEs work right. // Set Block with reverse MetaData first. - aWorld.setBlock(aX, aY, aZ, aMTEContainer.mBlock, 15-aMTEContainer.mBlockMetaData, 2); - // Make sure the Block has been set, yes I know setBlock has a true/false return value, but guess what, it is not reliable in 0.0001% of cases! -Greg - if (aWorld.getBlock(aX, aY, aZ) != aMTEContainer.mBlock) {aWorld.setBlock(aX, aY, aZ, Blocks.air, 0, 0); return false;} + aWorld.setBlock(aX, aY, aZ, aMTEContainer.mBlock, 15 - aMTEContainer.mBlockMetaData, 2); + // Make sure the Block has been set, yes I know setBlock has a true/false return value, but guess what, it is + // not reliable in 0.0001% of cases! -Greg + if (aWorld.getBlock(aX, aY, aZ) != aMTEContainer.mBlock) { + aWorld.setBlock(aX, aY, aZ, Blocks.air, 0, 0); + return false; + } // TileEntity should not refresh yet! -Greg - ((IMultiTileEntity)aMTEContainer.mTileEntity).setShouldRefresh(false); + ((IMultiTileEntity) aMTEContainer.mTileEntity).setShouldRefresh(false); // Fake-Set the TileEntity first, bypassing a lot of checks. -Greg setTileEntity(aWorld, aX, aY, aZ, (TileEntity) aMTEContainer.mTileEntity, false); // Now set the Block with the REAL MetaData. -Greg setTileEntity(aWorld, aX, aY, aZ, aMTEContainer.mBlock, aMTEContainer.mBlockMetaData, 0, false); // When the TileEntity is set now it SHOULD refresh! -Greg - ((IMultiTileEntity)aMTEContainer.mTileEntity).setShouldRefresh(true); + ((IMultiTileEntity) aMTEContainer.mTileEntity).setShouldRefresh(true); // But make sure again that the Block we have set was actually set properly, because 0.0001%! -Greg - if (aWorld.getBlock(aX, aY, aZ) != aMTEContainer.mBlock) {aWorld.setBlock(aX, aY, aZ, Blocks.air, 0, 0); return false;} + if (aWorld.getBlock(aX, aY, aZ) != aMTEContainer.mBlock) { + aWorld.setBlock(aX, aY, aZ, Blocks.air, 0, 0); + return false; + } // And finally properly set the TileEntity for real! -Greg setTileEntity(aWorld, aX, aY, aZ, (TileEntity) aMTEContainer.mTileEntity, aCauseBlockUpdates); // Yep, all this just to set one Block and its TileEntity properly... -Greg - try { if (aMTEContainer.mTileEntity instanceof IMTE_HasMultiBlockMachineRelevantData) { - if (((IMTE_HasMultiBlockMachineRelevantData)aMTEContainer.mTileEntity).hasMultiBlockMachineRelevantData()) GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); + if (((IMTE_HasMultiBlockMachineRelevantData) aMTEContainer.mTileEntity) + .hasMultiBlockMachineRelevantData()) GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); } - } catch(Throwable e) { + } catch (Throwable e) { GT_FML_LOGGER.error("causeMachineUpdate", e); } @@ -77,20 +103,19 @@ public class MultiTileEntityBlockInternal extends Block implements IRenderedBloc aWorld.notifyBlockChange(aX, aY, aZ, tReplacedBlock); aWorld.func_147453_f(aX, aY, aZ, aMTEContainer.mBlock); } - } catch(Throwable e) { + } catch (Throwable e) { GT_FML_LOGGER.error("aCauseBlockUpdates", e); } try { - ((IMultiTileEntity)aMTEContainer.mTileEntity).onTileEntityPlaced(); - } catch(Throwable e) { + ((IMultiTileEntity) aMTEContainer.mTileEntity).onTileEntityPlaced(); + } catch (Throwable e) { GT_FML_LOGGER.error("onTileEntityPlaced", e); } - try { - aWorld.func_147451_t/*updateAllLightTypes*/(aX, aY, aZ); - } catch(Throwable e) { + aWorld.func_147451_t /*updateAllLightTypes*/(aX, aY, aZ); + } catch (Throwable e) { GT_FML_LOGGER.error("updateAllLightTypes", e); } return true; @@ -125,7 +150,7 @@ public class MultiTileEntityBlockInternal extends Block implements IRenderedBloc @Override public IRenderedBlock passRenderingToObject(ItemStack aStack) { final TileEntity tTileEntity = mMultiTileEntityRegistry.getNewTileEntity(aStack); - return tTileEntity instanceof IRenderedBlock ? (IRenderedBlock)tTileEntity : null; + return tTileEntity instanceof IRenderedBlock ? (IRenderedBlock) tTileEntity : null; } @Override diff --git a/src/main/java/gregtech/api/multitileentity/MultiTileEntityClassContainer.java b/src/main/java/gregtech/api/multitileentity/MultiTileEntityClassContainer.java index 563d2fc462..c66ec30481 100644 --- a/src/main/java/gregtech/api/multitileentity/MultiTileEntityClassContainer.java +++ b/src/main/java/gregtech/api/multitileentity/MultiTileEntityClassContainer.java @@ -1,16 +1,14 @@ package gregtech.api.multitileentity; +import static gregtech.api.enums.GT_Values.NBT; + import gregtech.api.enums.Materials; import gregtech.api.multitileentity.base.BaseMultiTileEntity; import gregtech.api.util.GT_Util; -import net.minecraft.block.material.Material; +import java.lang.ref.WeakReference; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.Tuple; -import java.lang.ref.WeakReference; - -import static gregtech.api.enums.GT_Values.NBT; - public class MultiTileEntityClassContainer { private final WeakReference<MultiTileEntityRegistry> mRegistry; private String mLocalized; @@ -27,8 +25,8 @@ public class MultiTileEntityClassContainer { public byte mStackSize = 64; public boolean mHidden = false; - - public MultiTileEntityClassContainer(MultiTileEntityRegistry aRegistry, int aID, Class<? extends BaseMultiTileEntity> aClass) { + public MultiTileEntityClassContainer( + MultiTileEntityRegistry aRegistry, int aID, Class<? extends BaseMultiTileEntity> aClass) { /* Start the Builder */ mRegistry = new WeakReference<>(aRegistry); mID = (short) aID; @@ -41,9 +39,16 @@ public class MultiTileEntityClassContainer { final MultiTileEntityRegistry registry = mRegistry.get(); if (mParameters.hasKey(NBT.MATERIAL) && !mParameters.hasKey(NBT.COLOR)) - mParameters.setInteger(NBT.COLOR, GT_Util.getRGBInt(Materials.get(mParameters.getString(NBT.MATERIAL)).getRGBA())); - - try {mCanonicalTileEntity = mClass.newInstance();} catch (Throwable e) {throw new IllegalArgumentException(e);} + mParameters.setInteger( + NBT.COLOR, + GT_Util.getRGBInt( + Materials.get(mParameters.getString(NBT.MATERIAL)).getRGBA())); + + try { + mCanonicalTileEntity = mClass.newInstance(); + } catch (Throwable e) { + throw new IllegalArgumentException(e); + } mCanonicalTileEntity.initFromNBT(mParameters, mID, (short) -1); return registry != null && registry.add(this.mLocalized, this.mCategoryName, this) != null; @@ -86,8 +91,7 @@ public class MultiTileEntityClassContainer { public MultiTileEntityClassContainer material(Materials aMaterial) { // Sets the material, and the color from the material, if not already set mParameters.setString(NBT.MATERIAL, aMaterial.toString()); - if (!mParameters.hasKey(NBT.COLOR)) - mParameters.setInteger(NBT.COLOR, GT_Util.getRGBInt(aMaterial.getRGBA())); + if (!mParameters.hasKey(NBT.COLOR)) mParameters.setInteger(NBT.COLOR, GT_Util.getRGBInt(aMaterial.getRGBA())); return this; } @@ -116,5 +120,4 @@ public class MultiTileEntityClassContainer { mParameters = GT_Util.fuseNBT(mParameters, GT_Util.makeNBT(aTags)); return this; } - } diff --git a/src/main/java/gregtech/api/multitileentity/MultiTileEntityContainer.java b/src/main/java/gregtech/api/multitileentity/MultiTileEntityContainer.java index 1c037a45e1..b209c95990 100644 --- a/src/main/java/gregtech/api/multitileentity/MultiTileEntityContainer.java +++ b/src/main/java/gregtech/api/multitileentity/MultiTileEntityContainer.java @@ -1,11 +1,11 @@ package gregtech.api.multitileentity; +import static gregtech.api.util.GT_Util.setTileEntity; + import gregtech.api.multitileentity.interfaces.IMultiTileEntity; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import static gregtech.api.util.GT_Util.setTileEntity; - public class MultiTileEntityContainer { public final TileEntity mTileEntity; public final MultiTileEntityBlock mBlock; @@ -16,12 +16,13 @@ public class MultiTileEntityContainer { mTileEntity = aTileEntity; mBlock = aBlock; } + public void setMultiTile(World aWorld, int aX, int aY, int aZ) { // This is some complicated Bullshit Greg had to do to make his MTEs work right. - ((IMultiTileEntity)mTileEntity).setShouldRefresh(false); + ((IMultiTileEntity) mTileEntity).setShouldRefresh(false); setTileEntity(aWorld, aX, aY, aZ, mTileEntity, false); setTileEntity(aWorld, aX, aY, aZ, mBlock, mBlockMetaData, 0, false); - ((IMultiTileEntity)mTileEntity).setShouldRefresh(true); + ((IMultiTileEntity) mTileEntity).setShouldRefresh(true); setTileEntity(aWorld, aX, aY, aZ, mTileEntity, true); } } diff --git a/src/main/java/gregtech/api/multitileentity/MultiTileEntityItemInternal.java b/src/main/java/gregtech/api/multitileentity/MultiTileEntityItemInternal.java index 897dbf7991..4d7c6be262 100644 --- a/src/main/java/gregtech/api/multitileentity/MultiTileEntityItemInternal.java +++ b/src/main/java/gregtech/api/multitileentity/MultiTileEntityItemInternal.java @@ -1,5 +1,8 @@ package gregtech.api.multitileentity; +import static gregtech.GT_Mod.GT_FML_LOGGER; +import static gregtech.api.enums.GT_Values.SIDE_TOP; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTech_API; @@ -8,11 +11,12 @@ import gregtech.api.metatileentity.CoverableTileEntity; import gregtech.api.multitileentity.interfaces.IItemUpdatable; import gregtech.api.multitileentity.interfaces.IMultiTileEntity; import gregtech.api.multitileentity.interfaces.IMultiTileEntity.IMTE_AddToolTips; +import gregtech.api.multitileentity.interfaces.IMultiTileEntity.IMTE_CanPlace; import gregtech.api.multitileentity.interfaces.IMultiTileEntity.IMTE_GetMaxStackSize; import gregtech.api.multitileentity.interfaces.IMultiTileEntity.IMTE_HasMultiBlockMachineRelevantData; -import gregtech.api.multitileentity.interfaces.IMultiTileEntity.IMTE_OnlyPlaceableWhenSneaking; import gregtech.api.multitileentity.interfaces.IMultiTileEntity.IMTE_IgnoreEntityCollisionWhenPlacing; -import gregtech.api.multitileentity.interfaces.IMultiTileEntity.IMTE_CanPlace; +import gregtech.api.multitileentity.interfaces.IMultiTileEntity.IMTE_OnlyPlaceableWhenSneaking; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.BlockSnow; import net.minecraft.client.renderer.texture.IIconRegister; @@ -30,12 +34,6 @@ import net.minecraft.world.World; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidContainerItem; -import java.util.List; - -import static gregtech.GT_Mod.GT_FML_LOGGER; -import static gregtech.api.enums.GT_Values.SIDE_TOP; -import static gregtech.api.util.GT_Util.setTileEntity; - public class MultiTileEntityItemInternal extends ItemBlock implements IFluidContainerItem, IItemUpdatable { public final MultiTileEntityBlockInternal mBlock; @@ -43,12 +41,14 @@ public class MultiTileEntityItemInternal extends ItemBlock implements IFluidCont super(aBlock); setMaxDamage(0); setHasSubtypes(true); - mBlock = (MultiTileEntityBlockInternal)aBlock; + mBlock = (MultiTileEntityBlockInternal) aBlock; } + @Override @SuppressWarnings("unchecked") public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { - final MultiTileEntityContainer tTileEntityContainer = mBlock.mMultiTileEntityRegistry.getNewTileEntityContainer(aStack); + final MultiTileEntityContainer tTileEntityContainer = + mBlock.mMultiTileEntityRegistry.getNewTileEntityContainer(aStack); if (tTileEntityContainer == null) { aList.add("INVALID ITEM!"); return; @@ -65,14 +65,14 @@ public class MultiTileEntityItemInternal extends ItemBlock implements IFluidCont // TODO: Add anything else relevant } - @Override @SideOnly(Side.CLIENT) @SuppressWarnings("unchecked") public void getSubItems(Item aItem, CreativeTabs aTab, List aList) { for (MultiTileEntityClassContainer tClass : mBlock.mMultiTileEntityRegistry.mRegistrations) { if (!tClass.mHidden) { - if (((IMultiTileEntity) tClass.mCanonicalTileEntity).getSubItems(mBlock, aItem, aTab, aList, tClass.mID)) { + if (((IMultiTileEntity) tClass.mCanonicalTileEntity) + .getSubItems(mBlock, aItem, aTab, aList, tClass.mID)) { aList.add(mBlock.mMultiTileEntityRegistry.getItem(tClass.mID)); } } @@ -80,48 +80,85 @@ public class MultiTileEntityItemInternal extends ItemBlock implements IFluidCont } @Override - public boolean onItemUse(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float aHitX, float aHitY, float aHitZ) { + public boolean onItemUse( + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float aHitX, + float aHitY, + float aHitZ) { if (aY < 0 || aY > aWorld.getHeight()) return false; try { final Block tClickedBlock = aWorld.getBlock(aX, aY, aZ); if (tClickedBlock instanceof BlockSnow && (aWorld.getBlockMetadata(aX, aY, aZ) & 7) < 1) { aSide = SIDE_TOP; - } else if (tClickedBlock != Blocks.vine && tClickedBlock != Blocks.tallgrass && tClickedBlock != Blocks.deadbush && !tClickedBlock.isReplaceable(aWorld, aX, aY, aZ)) { + } else if (tClickedBlock != Blocks.vine + && tClickedBlock != Blocks.tallgrass + && tClickedBlock != Blocks.deadbush + && !tClickedBlock.isReplaceable(aWorld, aX, aY, aZ)) { aX += GT_Values.OFFX[aSide]; aY += GT_Values.OFFY[aSide]; aZ += GT_Values.OFFZ[aSide]; } final Block tReplacedBlock = aWorld.getBlock(aX, aY, aZ); - if (!tReplacedBlock.isReplaceable(aWorld, aX, aY, aZ) || !mBlock.canReplace(aWorld, aX, aY, aZ, aSide, aStack)) return false; - if (aStack.stackSize == 0 || (aPlayer != null && !aPlayer.canPlayerEdit(aX, aY, aZ, aSide, aStack))) return false; + if (!tReplacedBlock.isReplaceable(aWorld, aX, aY, aZ) + || !mBlock.canReplace(aWorld, aX, aY, aZ, aSide, aStack)) return false; + if (aStack.stackSize == 0 || (aPlayer != null && !aPlayer.canPlayerEdit(aX, aY, aZ, aSide, aStack))) + return false; - final MultiTileEntityContainer aMTEContainer = mBlock.mMultiTileEntityRegistry.getNewTileEntityContainer(aWorld, aX, aY, aZ, aStack); + final MultiTileEntityContainer aMTEContainer = + mBlock.mMultiTileEntityRegistry.getNewTileEntityContainer(aWorld, aX, aY, aZ, aStack); if (aMTEContainer != null - && (aPlayer == null || aPlayer.isSneaking() || !(aMTEContainer.mTileEntity instanceof IMTE_OnlyPlaceableWhenSneaking) || !((IMTE_OnlyPlaceableWhenSneaking) aMTEContainer.mTileEntity).onlyPlaceableWhenSneaking()) - && ( - aWorld.checkNoEntityCollision(AxisAlignedBB.getBoundingBox(aX, aY, aZ, aX+1, aY+1, aZ+1)) - || (aMTEContainer.mTileEntity instanceof IMTE_IgnoreEntityCollisionWhenPlacing && ((IMTE_IgnoreEntityCollisionWhenPlacing)aMTEContainer.mTileEntity).ignoreEntityCollisionWhenPlacing(aStack, aPlayer, aWorld, aX, aY, aZ, (byte)aSide, aHitX, aHitY, aHitZ)) - ) - && (!(aMTEContainer.mTileEntity instanceof IMTE_CanPlace) || ((IMTE_CanPlace)aMTEContainer.mTileEntity).canPlace(aStack, aPlayer, aWorld, aX, aY, aZ, (byte)aSide, aHitX, aHitY, aHitZ)) - && aWorld.setBlock(aX, aY, aZ, aMTEContainer.mBlock, 15 - aMTEContainer.mBlockMetaData, 2)) - { + && (aPlayer == null + || aPlayer.isSneaking() + || !(aMTEContainer.mTileEntity instanceof IMTE_OnlyPlaceableWhenSneaking) + || !((IMTE_OnlyPlaceableWhenSneaking) aMTEContainer.mTileEntity) + .onlyPlaceableWhenSneaking()) + && (aWorld.checkNoEntityCollision(AxisAlignedBB.getBoundingBox(aX, aY, aZ, aX + 1, aY + 1, aZ + 1)) + || (aMTEContainer.mTileEntity instanceof IMTE_IgnoreEntityCollisionWhenPlacing + && ((IMTE_IgnoreEntityCollisionWhenPlacing) aMTEContainer.mTileEntity) + .ignoreEntityCollisionWhenPlacing( + aStack, + aPlayer, + aWorld, + aX, + aY, + aZ, + (byte) aSide, + aHitX, + aHitY, + aHitZ))) + && (!(aMTEContainer.mTileEntity instanceof IMTE_CanPlace) + || ((IMTE_CanPlace) aMTEContainer.mTileEntity) + .canPlace(aStack, aPlayer, aWorld, aX, aY, aZ, (byte) aSide, aHitX, aHitY, aHitZ)) + && aWorld.setBlock(aX, aY, aZ, aMTEContainer.mBlock, 15 - aMTEContainer.mBlockMetaData, 2)) { aMTEContainer.setMultiTile(aWorld, aX, aY, aZ); try { - if (((IMultiTileEntity) aMTEContainer.mTileEntity).onPlaced(aStack, aPlayer, aWorld, aX, aY, aZ, (byte) aSide, aHitX, aHitY, aHitZ)) { + if (((IMultiTileEntity) aMTEContainer.mTileEntity) + .onPlaced(aStack, aPlayer, aWorld, aX, aY, aZ, (byte) aSide, aHitX, aHitY, aHitZ)) { aWorld.playSoundEffect( - aX + 0.5, aY + 0.5, aZ + 0.5, aMTEContainer.mBlock.stepSound.func_150496_b(), (aMTEContainer.mBlock.stepSound.getVolume() + 1) / 2, - aMTEContainer.mBlock.stepSound.getPitch() * 0.8F - ); + aX + 0.5, + aY + 0.5, + aZ + 0.5, + aMTEContainer.mBlock.stepSound.func_150496_b(), + (aMTEContainer.mBlock.stepSound.getVolume() + 1) / 2, + aMTEContainer.mBlock.stepSound.getPitch() * 0.8F); } } catch (Throwable e) { GT_FML_LOGGER.error("onPlaced", e); } try { - if (aMTEContainer.mTileEntity instanceof IMTE_HasMultiBlockMachineRelevantData && (((IMTE_HasMultiBlockMachineRelevantData) aMTEContainer.mTileEntity).hasMultiBlockMachineRelevantData())) { - GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); + if (aMTEContainer.mTileEntity instanceof IMTE_HasMultiBlockMachineRelevantData + && (((IMTE_HasMultiBlockMachineRelevantData) aMTEContainer.mTileEntity) + .hasMultiBlockMachineRelevantData())) { + GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); } } catch (Throwable e) { GT_FML_LOGGER.error("causeMachineUpdate", e); @@ -129,18 +166,18 @@ public class MultiTileEntityItemInternal extends ItemBlock implements IFluidCont try { if (!aWorld.isRemote) { aWorld.notifyBlockChange(aX, aY, aZ, tReplacedBlock); - aWorld.func_147453_f/*updateNeighborsAboutBlockChange*/(aX, aY, aZ, aMTEContainer.mBlock); + aWorld.func_147453_f /*updateNeighborsAboutBlockChange*/(aX, aY, aZ, aMTEContainer.mBlock); } } catch (Throwable e) { GT_FML_LOGGER.error("notifyBlockChange", e); } try { - ((IMultiTileEntity)aMTEContainer.mTileEntity).onTileEntityPlaced(); + ((IMultiTileEntity) aMTEContainer.mTileEntity).onTileEntityPlaced(); } catch (Throwable e) { GT_FML_LOGGER.error("onTileEntityPlaced", e); } try { - aWorld.func_147451_t/*updateAllLightTypes*/(aX, aY, aZ); + aWorld.func_147451_t /*updateAllLightTypes*/(aX, aY, aZ); } catch (Throwable e) { GT_FML_LOGGER.error("updateAllLightTypes", e); } @@ -158,18 +195,21 @@ public class MultiTileEntityItemInternal extends ItemBlock implements IFluidCont public void updateItemStack(ItemStack aStack) { final MultiTileEntityClassContainer tContainer = mBlock.mMultiTileEntityRegistry.getClassContainer(aStack); if (tContainer == null) return; - final MultiTileEntityContainer tTileEntityContainer = mBlock.mMultiTileEntityRegistry.getNewTileEntityContainer(aStack); + final MultiTileEntityContainer tTileEntityContainer = + mBlock.mMultiTileEntityRegistry.getNewTileEntityContainer(aStack); if (tTileEntityContainer != null && tTileEntityContainer.mTileEntity instanceof IItemUpdatable) { - ((IItemUpdatable)tTileEntityContainer.mTileEntity).updateItemStack(aStack); + ((IItemUpdatable) tTileEntityContainer.mTileEntity).updateItemStack(aStack); } } + @Override public void updateItemStack(ItemStack aStack, World aWorld, int aX, int aY, int aZ) { final MultiTileEntityClassContainer tContainer = mBlock.mMultiTileEntityRegistry.getClassContainer(aStack); if (tContainer == null) return; - final MultiTileEntityContainer tTileEntityContainer = mBlock.mMultiTileEntityRegistry.getNewTileEntityContainer(aStack); + final MultiTileEntityContainer tTileEntityContainer = + mBlock.mMultiTileEntityRegistry.getNewTileEntityContainer(aStack); if (tTileEntityContainer != null && tTileEntityContainer.mTileEntity instanceof IItemUpdatable) { - ((IItemUpdatable)tTileEntityContainer.mTileEntity).updateItemStack(aStack, aWorld, aX, aY, aZ); + ((IItemUpdatable) tTileEntityContainer.mTileEntity).updateItemStack(aStack, aWorld, aX, aY, aZ); } } @@ -177,9 +217,11 @@ public class MultiTileEntityItemInternal extends ItemBlock implements IFluidCont public int getItemStackLimit(ItemStack aStack) { final MultiTileEntityClassContainer tContainer = mBlock.mMultiTileEntityRegistry.getClassContainer(aStack); if (tContainer == null) return 1; - final MultiTileEntityContainer tTileEntityContainer = mBlock.mMultiTileEntityRegistry.getNewTileEntityContainer(aStack); + final MultiTileEntityContainer tTileEntityContainer = + mBlock.mMultiTileEntityRegistry.getNewTileEntityContainer(aStack); if (tTileEntityContainer != null && tTileEntityContainer.mTileEntity instanceof IMTE_GetMaxStackSize) { - return ((IMTE_GetMaxStackSize)tTileEntityContainer.mTileEntity).getMaxStackSize(aStack, tContainer.mStackSize); + return ((IMTE_GetMaxStackSize) tTileEntityContainer.mTileEntity) + .getMaxStackSize(aStack, tContainer.mStackSize); } return tContainer.mStackSize; } @@ -191,9 +233,10 @@ public class MultiTileEntityItemInternal extends ItemBlock implements IFluidCont @Override public FluidStack getFluid(ItemStack aStack) { - final MultiTileEntityContainer tTileEntityContainer = mBlock.mMultiTileEntityRegistry.getNewTileEntityContainer(aStack); + final MultiTileEntityContainer tTileEntityContainer = + mBlock.mMultiTileEntityRegistry.getNewTileEntityContainer(aStack); if (tTileEntityContainer != null && tTileEntityContainer.mTileEntity instanceof IFluidContainerItem) { - final FluidStack rFluid = ((IFluidContainerItem)tTileEntityContainer.mTileEntity).getFluid(aStack); + final FluidStack rFluid = ((IFluidContainerItem) tTileEntityContainer.mTileEntity).getFluid(aStack); updateItemStack(aStack); return rFluid; } @@ -202,9 +245,10 @@ public class MultiTileEntityItemInternal extends ItemBlock implements IFluidCont @Override public int getCapacity(ItemStack aStack) { - final MultiTileEntityContainer tTileEntityContainer = mBlock.mMultiTileEntityRegistry.getNewTileEntityContainer(aStack); + final MultiTileEntityContainer tTileEntityContainer = + mBlock.mMultiTileEntityRegistry.getNewTileEntityContainer(aStack); if (tTileEntityContainer != null && tTileEntityContainer.mTileEntity instanceof IFluidContainerItem) { - final int rCapacity = ((IFluidContainerItem)tTileEntityContainer.mTileEntity).getCapacity(aStack); + final int rCapacity = ((IFluidContainerItem) tTileEntityContainer.mTileEntity).getCapacity(aStack); updateItemStack(aStack); return rCapacity; } @@ -213,9 +257,10 @@ public class MultiTileEntityItemInternal extends ItemBlock implements IFluidCont @Override public int fill(ItemStack aStack, FluidStack aFluid, boolean aDoFill) { - final MultiTileEntityContainer tTileEntityContainer = mBlock.mMultiTileEntityRegistry.getNewTileEntityContainer(aStack); + final MultiTileEntityContainer tTileEntityContainer = + mBlock.mMultiTileEntityRegistry.getNewTileEntityContainer(aStack); if (tTileEntityContainer != null && tTileEntityContainer.mTileEntity instanceof IFluidContainerItem) { - final int tFilled = ((IFluidContainerItem)tTileEntityContainer.mTileEntity).fill(aStack, aFluid, aDoFill); + final int tFilled = ((IFluidContainerItem) tTileEntityContainer.mTileEntity).fill(aStack, aFluid, aDoFill); updateItemStack(aStack); return tFilled; } @@ -224,9 +269,11 @@ public class MultiTileEntityItemInternal extends ItemBlock implements IFluidCont @Override public FluidStack drain(ItemStack aStack, int aMaxDrain, boolean aDoDrain) { - final MultiTileEntityContainer tTileEntityContainer = mBlock.mMultiTileEntityRegistry.getNewTileEntityContainer(aStack); + final MultiTileEntityContainer tTileEntityContainer = + mBlock.mMultiTileEntityRegistry.getNewTileEntityContainer(aStack); if (tTileEntityContainer != null && tTileEntityContainer.mTileEntity instanceof IFluidContainerItem) { - final FluidStack rFluid = ((IFluidContainerItem)tTileEntityContainer.mTileEntity).drain(aStack, aMaxDrain, aDoDrain); + final FluidStack rFluid = + ((IFluidContainerItem) tTileEntityContainer.mTileEntity).drain(aStack, aMaxDrain, aDoDrain); updateItemStack(aStack); return rFluid; } @@ -234,7 +281,8 @@ public class MultiTileEntityItemInternal extends ItemBlock implements IFluidCont } @Override - public boolean func_150936_a/*canPlaceAtSide*/(World aWorld, int aX, int aY, int aZ, int aSide, EntityPlayer aPlayer, ItemStack aStack) { + public boolean func_150936_a /*canPlaceAtSide*/( + World aWorld, int aX, int aY, int aZ, int aSide, EntityPlayer aPlayer, ItemStack aStack) { return true; } @@ -273,7 +321,7 @@ public class MultiTileEntityItemInternal extends ItemBlock implements IFluidCont @Override public final boolean getShareTag() { - return true; // just to be sure + return true; // just to be sure } @Override diff --git a/src/main/java/gregtech/api/multitileentity/MultiTileEntityRegistry.java b/src/main/java/gregtech/api/multitileentity/MultiTileEntityRegistry.java index 0bb9af1daa..b212a51384 100644 --- a/src/main/java/gregtech/api/multitileentity/MultiTileEntityRegistry.java +++ b/src/main/java/gregtech/api/multitileentity/MultiTileEntityRegistry.java @@ -1,5 +1,7 @@ package gregtech.api.multitileentity; +import static gregtech.GT_Mod.GT_FML_LOGGER; + import appeng.core.CreativeTab; import com.gtnewhorizon.gtnhlib.util.map.ItemStackMap; import cpw.mods.fml.common.registry.GameRegistry; @@ -10,6 +12,11 @@ import gregtech.api.multitileentity.interfaces.IMultiTileEntity; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Util; import gregtech.api.util.GT_Utility; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; import net.minecraft.block.Block; import net.minecraft.init.Items; import net.minecraft.item.Item; @@ -20,14 +27,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; - -import static gregtech.GT_Mod.GT_FML_LOGGER; - public class MultiTileEntityRegistry { private static final HashMap<String, MultiTileEntityRegistry> NAMED_REGISTRIES = new HashMap<>(); @@ -42,7 +41,8 @@ public class MultiTileEntityRegistry { public final String mNameInternal; public final MultiTileEntityBlockInternal mBlock; - private static MultiTileEntityBlockInternal regblock(String aNameInternal, MultiTileEntityBlockInternal aBlock, Class<? extends ItemBlock> aItemClass) { + private static MultiTileEntityBlockInternal regblock( + String aNameInternal, MultiTileEntityBlockInternal aBlock, Class<? extends ItemBlock> aItemClass) { GameRegistry.registerBlock(aBlock, aItemClass == null ? ItemBlock.class : aItemClass, aNameInternal); return aBlock; } @@ -57,7 +57,8 @@ public class MultiTileEntityRegistry { /** * @param aNameInternal the internal Name of the Item */ - public MultiTileEntityRegistry(String aNameInternal, MultiTileEntityBlockInternal aBlock, Class<? extends ItemBlock> aItemClass) { + public MultiTileEntityRegistry( + String aNameInternal, MultiTileEntityBlockInternal aBlock, Class<? extends ItemBlock> aItemClass) { this(aNameInternal, regblock(aNameInternal, aBlock, aItemClass)); } @@ -65,7 +66,9 @@ public class MultiTileEntityRegistry { * @param aNameInternal the internal Name of the Item */ public MultiTileEntityRegistry(String aNameInternal, MultiTileEntityBlockInternal aBlock) { - if (!GregTech_API.sPreloadStarted || GregTech_API.sPreloadFinished) throw new IllegalStateException("The MultiTileEntity Registry must be initialised during Preload Phase and not before"); + if (!GregTech_API.sPreloadStarted || GregTech_API.sPreloadFinished) + throw new IllegalStateException( + "The MultiTileEntity Registry must be initialised during Preload Phase and not before"); mNameInternal = aNameInternal; mBlock = aBlock; mBlock.mMultiTileEntityRegistry = this; @@ -84,6 +87,7 @@ public class MultiTileEntityRegistry { public static MultiTileEntityRegistry getRegistry(int aRegistryID) { return REGISTRIES.get(new ItemStack(Item.getItemById(aRegistryID), 1, GT_Values.W)); } + public static MultiTileEntityRegistry getRegistry(String aRegistryName) { return NAMED_REGISTRIES.get(aRegistryName); } @@ -116,18 +120,23 @@ public class MultiTileEntityRegistry { tFailed = true; } if (mRegistry.containsKey(aClassContainer.mID)) { - GT_FML_LOGGER.error("MULTI-TILE REGISTRY ERROR: Class Container uses occupied MetaData! (" + aClassContainer.mID + ")"); + GT_FML_LOGGER.error("MULTI-TILE REGISTRY ERROR: Class Container uses occupied MetaData! (" + + aClassContainer.mID + ")"); tFailed = true; } } if (tFailed) { GT_FML_LOGGER.error("MULTI-TILE REGISTRY ERROR: STACKTRACE START"); - int i = 0; for (StackTraceElement tElement : new Exception().getStackTrace()) if (i++<5 && !tElement.getClassName().startsWith("sun")) GT_FML_LOGGER.error("\tat " + tElement); else break; + int i = 0; + for (StackTraceElement tElement : new Exception().getStackTrace()) + if (i++ < 5 && !tElement.getClassName().startsWith("sun")) GT_FML_LOGGER.error("\tat " + tElement); + else break; GT_FML_LOGGER.error("MULTI-TILE REGISTRY ERROR: STACKTRACE END"); return null; } - GT_LanguageManager.addStringLocalization(mNameInternal+"."+aClassContainer.mID+".name", aLocalised, false); + GT_LanguageManager.addStringLocalization( + mNameInternal + "." + aClassContainer.mID + ".name", aLocalised, false); mRegistry.put(aClassContainer.mID, aClassContainer); mLastRegisteredID = aClassContainer.mID; mRegistrations.add(aClassContainer); @@ -135,34 +144,49 @@ public class MultiTileEntityRegistry { if (sRegisteredTileEntities.add(aClassContainer.mCanonicalTileEntity.getClass())) { aClassContainer.mCanonicalTileEntity.onRegistrationFirst(this, aClassContainer.mID); } -// // TODO: Recipe -// if (aRecipe != null && aRecipe.length > 1) { -// if (aRecipe[0] instanceof Object[]) aRecipe = (Object[])aRecipe[0]; -// if (aRecipe.length > 2) CR.shaped(getItem(aClassContainer.mID), CR.DEF_REV_NCC, aRecipe); -// } -// // A simple special case to make it easier to add a Machine to Recipe Lists without having to worry about anything. -// String tRecipeMapName = aClassContainer.mParameters.getString(NBT_RECIPEMAP); -// if (GT_Utility.isStringValid(tRecipeMapName)) {RecipeMap tMap = RecipeMap.RECIPE_MAPS.get(tRecipeMapName); if (tMap != null) tMap.mRecipeMachineList.add(getItem(aClassContainer.mID));} -// tRecipeMapName = aClassContainer.mParameters.getString(NBT_FUELMAP); -// if (GT_Utility.isStringValid(tRecipeMapName)) {RecipeMap tMap = RecipeMap.RECIPE_MAPS.get(tRecipeMapName); if (tMap != null) tMap.mRecipeMachineList.add(getItem(aClassContainer.mID));} -// + // // TODO: Recipe + // if (aRecipe != null && aRecipe.length > 1) { + // if (aRecipe[0] instanceof Object[]) aRecipe = (Object[])aRecipe[0]; + // if (aRecipe.length > 2) CR.shaped(getItem(aClassContainer.mID), CR.DEF_REV_NCC, aRecipe); + // } + // // A simple special case to make it easier to add a Machine to Recipe Lists without having to worry + // about anything. + // String tRecipeMapName = aClassContainer.mParameters.getString(NBT_RECIPEMAP); + // if (GT_Utility.isStringValid(tRecipeMapName)) {RecipeMap tMap = + // RecipeMap.RECIPE_MAPS.get(tRecipeMapName); if (tMap != null) + // tMap.mRecipeMachineList.add(getItem(aClassContainer.mID));} + // tRecipeMapName = aClassContainer.mParameters.getString(NBT_FUELMAP); + // if (GT_Utility.isStringValid(tRecipeMapName)) {RecipeMap tMap = + // RecipeMap.RECIPE_MAPS.get(tRecipeMapName); if (tMap != null) + // tMap.mRecipeMachineList.add(getItem(aClassContainer.mID));} + // return getItem(aClassContainer.mID); } public short mLastRegisteredID = GT_Values.W; + public ItemStack getItem() { + return getItem(mLastRegisteredID, 1, null); + } - public ItemStack getItem() {return getItem(mLastRegisteredID, 1, null);} - public ItemStack getItem(int aID) {return getItem(aID, 1, null);} - public ItemStack getItem(int aID, NBTTagCompound aNBT) {return getItem(aID, 1, aNBT);} - public ItemStack getItem(int aID, long aAmount) {return getItem(aID, aAmount, null);} + public ItemStack getItem(int aID) { + return getItem(aID, 1, null); + } + + public ItemStack getItem(int aID, NBTTagCompound aNBT) { + return getItem(aID, 1, aNBT); + } + + public ItemStack getItem(int aID, long aAmount) { + return getItem(aID, aAmount, null); + } public ItemStack getItem(int aID, long aAmount, NBTTagCompound aNBT) { - final ItemStack rStack = new ItemStack(mBlock, (int)aAmount, aID); + final ItemStack rStack = new ItemStack(mBlock, (int) aAmount, aID); if (aNBT == null || aNBT.hasNoTags()) { aNBT = new NBTTagCompound(); final MultiTileEntityContainer tTileEntityContainer = getNewTileEntityContainer(aID, aNBT); - if (tTileEntityContainer != null) ((IMultiTileEntity)tTileEntityContainer.mTileEntity).writeItemNBT(aNBT); + if (tTileEntityContainer != null) ((IMultiTileEntity) tTileEntityContainer.mTileEntity).writeItemNBT(aNBT); } rStack.setTagCompound(aNBT); return rStack; @@ -185,16 +209,26 @@ public class MultiTileEntityRegistry { return tContainer == null ? null : (TileEntity) tContainer.mTileEntity; } - public MultiTileEntityContainer getNewTileEntityContainer(World aWorld, int aX, int aY, int aZ, int aID, NBTTagCompound aNBT) { + public MultiTileEntityContainer getNewTileEntityContainer( + World aWorld, int aX, int aY, int aZ, int aID, NBTTagCompound aNBT) { final MultiTileEntityClassContainer tClass = mRegistry.get((short) aID); if (tClass == null || tClass.mBlock == null) return null; - final MultiTileEntityContainer rContainer = new MultiTileEntityContainer((TileEntity) GT_Utility.callConstructor(tClass.mClass, -1, null, true), tClass.mBlock, tClass.mBlockMetaData); + final MultiTileEntityContainer rContainer = new MultiTileEntityContainer( + (TileEntity) GT_Utility.callConstructor(tClass.mClass, -1, null, true), + tClass.mBlock, + tClass.mBlockMetaData); if (rContainer.mTileEntity == null) return null; rContainer.mTileEntity.setWorldObj(aWorld); rContainer.mTileEntity.xCoord = aX; rContainer.mTileEntity.yCoord = aY; rContainer.mTileEntity.zCoord = aZ; - ((IMultiTileEntity) rContainer.mTileEntity).initFromNBT(aNBT == null || aNBT.hasNoTags() ? tClass.mParameters : GT_Util.fuseNBT(aNBT, tClass.mParameters), (short) aID, (short) Block.getIdFromBlock(mBlock)); + ((IMultiTileEntity) rContainer.mTileEntity) + .initFromNBT( + aNBT == null || aNBT.hasNoTags() + ? tClass.mParameters + : GT_Util.fuseNBT(aNBT, tClass.mParameters), + (short) aID, + (short) Block.getIdFromBlock(mBlock)); return rContainer; } @@ -204,12 +238,14 @@ public class MultiTileEntityRegistry { } public TileEntity getNewTileEntity(ItemStack aStack) { - final MultiTileEntityContainer tContainer = getNewTileEntityContainer(null, 0, 0, 0, Items.feather.getDamage(aStack), aStack.getTagCompound()); + final MultiTileEntityContainer tContainer = + getNewTileEntityContainer(null, 0, 0, 0, Items.feather.getDamage(aStack), aStack.getTagCompound()); return tContainer == null ? null : tContainer.mTileEntity; } public TileEntity getNewTileEntity(World aWorld, int aX, int aY, int aZ, ItemStack aStack) { - final MultiTileEntityContainer tContainer = getNewTileEntityContainer(aWorld, aX, aY, aZ, Items.feather.getDamage(aStack), aStack.getTagCompound()); + final MultiTileEntityContainer tContainer = + getNewTileEntityContainer(aWorld, aX, aY, aZ, Items.feather.getDamage(aStack), aStack.getTagCompound()); return tContainer == null ? null : tContainer.mTileEntity; } @@ -224,5 +260,4 @@ public class MultiTileEntityRegistry { public MultiTileEntityContainer getNewTileEntityContainer(int aID, NBTTagCompound aNBT) { return getNewTileEntityContainer(null, 0, 0, 0, aID, aNBT); } - } diff --git a/src/main/java/gregtech/api/multitileentity/base/BaseMultiTileEntity.java b/src/main/java/gregtech/api/multitileentity/base/BaseMultiTileEntity.java index 50c43c9764..18dc310bb7 100644 --- a/src/main/java/gregtech/api/multitileentity/base/BaseMultiTileEntity.java +++ b/src/main/java/gregtech/api/multitileentity/base/BaseMultiTileEntity.java @@ -1,5 +1,12 @@ package gregtech.api.multitileentity.base; +import static gregtech.GT_Mod.GT_FML_LOGGER; +import static gregtech.api.enums.GT_Values.NBT; +import static gregtech.api.enums.GT_Values.OPOS; +import static gregtech.api.enums.GT_Values.SIDE_WEST; +import static gregtech.api.enums.GT_Values.VALID_SIDES; +import static gregtech.api.enums.GT_Values.emptyIconContainerArray; + import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -14,10 +21,10 @@ import gregtech.api.interfaces.tileentity.IGregtechWailaProvider; import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords; import gregtech.api.metatileentity.CoverableTileEntity; import gregtech.api.metatileentity.GregTechTileClientEvents; -import gregtech.api.multitileentity.interfaces.IMultiTileEntity; import gregtech.api.multitileentity.MultiTileEntityBlockInternal; import gregtech.api.multitileentity.MultiTileEntityClassContainer; import gregtech.api.multitileentity.MultiTileEntityRegistry; +import gregtech.api.multitileentity.interfaces.IMultiTileEntity; import gregtech.api.net.GT_Packet_New; import gregtech.api.net.GT_Packet_TileEntity; import gregtech.api.objects.GT_ItemStack; @@ -29,8 +36,10 @@ import gregtech.api.util.GT_Util; import gregtech.api.util.GT_Utility; import gregtech.api.util.ISerializableObject; import gregtech.common.render.GT_MultiTexture; -import gregtech.common.render.GT_RenderedTexture; import gregtech.common.render.IRenderedBlock; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; import net.minecraft.block.Block; @@ -57,35 +66,27 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidTank; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - -import static gregtech.GT_Mod.GT_FML_LOGGER; -import static gregtech.api.enums.GT_Values.emptyIconContainerArray; -import static gregtech.api.enums.GT_Values.NBT; -import static gregtech.api.enums.GT_Values.OPOS; -import static gregtech.api.enums.GT_Values.SIDE_WEST; -import static gregtech.api.enums.GT_Values.VALID_SIDES; - -public abstract class BaseMultiTileEntity extends CoverableTileEntity implements IMultiTileEntity, IHasWorldObjectAndCoords, IRenderedBlock, IGregtechWailaProvider { +public abstract class BaseMultiTileEntity extends CoverableTileEntity + implements IMultiTileEntity, IHasWorldObjectAndCoords, IRenderedBlock, IGregtechWailaProvider { public IIconContainer[] mTextures = emptyIconContainerArray; -// public IIconContainer[] mTexturesFront = emptyIconContainerArray; + // public IIconContainer[] mTexturesFront = emptyIconContainerArray; // Makes a Bounding Box without having to constantly specify the Offset Coordinates. protected static final float[] PX_BOX = {0, 0, 0, 1, 1, 1}; public Materials mMaterial = Materials._NULL; - protected final boolean mIsTicking; // If this TileEntity is ticking at all + protected final boolean mIsTicking; // If this TileEntity is ticking at all - protected boolean mShouldRefresh = true; // This Variable checks if this TileEntity should refresh when the Block is being set. That way you can turn this check off any time you need it. - protected boolean mDoesBlockUpdate = false; // This Variable is for a buffered Block Update. - protected boolean mForceFullSelectionBoxes = false; // This Variable is for forcing the Selection Box to be full. + protected boolean mShouldRefresh = + true; // This Variable checks if this TileEntity should refresh when the Block is being set. That way you + // can turn this check off any time you need it. + protected boolean mDoesBlockUpdate = false; // This Variable is for a buffered Block Update. + protected boolean mForceFullSelectionBoxes = false; // This Variable is for forcing the Selection Box to be full. protected boolean mNeedsUpdate = false; protected boolean mInventoryChanged = false; protected boolean mIsPainted = false; - protected byte mFacing = SIDE_WEST; // Default to WEST, so it renders facing Left in the inventory + protected byte mFacing = SIDE_WEST; // Default to WEST, so it renders facing Left in the inventory protected byte mColor; protected int mRGBa = GT_Values.UNCOLORED; private short mMTEID = GT_Values.W, mMTERegistry = GT_Values.W; @@ -127,18 +128,19 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements // Loading the registry final String textureName = aNBT.getString(NBT.TEXTURE); mTextures = new IIconContainer[] { - new Textures.BlockIcons.CustomIcon("multitileentity/base/"+textureName+"/bottom"), - new Textures.BlockIcons.CustomIcon("multitileentity/base/"+textureName+"/top"), - new Textures.BlockIcons.CustomIcon("multitileentity/base/"+textureName+"/side"), + new Textures.BlockIcons.CustomIcon("multitileentity/base/" + textureName + "/bottom"), + new Textures.BlockIcons.CustomIcon("multitileentity/base/" + textureName + "/top"), + new Textures.BlockIcons.CustomIcon("multitileentity/base/" + textureName + "/side"), }; } @Override public void copyTextures() { // Loading an instance - final TileEntity tCanonicalTileEntity = MultiTileEntityRegistry.getCanonicalTileEntity(getMultiTileEntityRegistryID(), getMultiTileEntityID()); - if(tCanonicalTileEntity instanceof BaseMultiTileEntity) - mTextures = ((BaseMultiTileEntity)tCanonicalTileEntity).mTextures; + final TileEntity tCanonicalTileEntity = + MultiTileEntityRegistry.getCanonicalTileEntity(getMultiTileEntityRegistryID(), getMultiTileEntityID()); + if (tCanonicalTileEntity instanceof BaseMultiTileEntity) + mTextures = ((BaseMultiTileEntity) tCanonicalTileEntity).mTextures; } @Override @@ -153,7 +155,8 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements if (tRegistry != null) { final MultiTileEntityClassContainer tClass = tRegistry.getClassContainer(mMTEID); if (tClass != null) { - // Add the Default Parameters. Useful for things that differ between different tiers/types of the same machine + // Add the Default Parameters. Useful for things that differ between different tiers/types of the + // same machine aNBT = GT_Util.fuseNBT(aNBT, tClass.mParameters); } } @@ -163,7 +166,8 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements if (aNBT.hasKey("y")) yCoord = aNBT.getInteger("y"); if (aNBT.hasKey("z")) zCoord = aNBT.getInteger("z"); // read the custom Name. - if (aNBT.hasKey(NBT.DISPAY)) mCustomName = aNBT.getCompoundTag(NBT.DISPAY).getString(NBT.CUSTOM_NAME); + if (aNBT.hasKey(NBT.DISPAY)) + mCustomName = aNBT.getCompoundTag(NBT.DISPAY).getString(NBT.CUSTOM_NAME); // And now everything else. try { @@ -173,7 +177,7 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements mOwnerName = aNBT.getString(NBT.OWNER); try { mOwnerUuid = UUID.fromString(aNBT.getString(NBT.OWNER_UUID)); - } catch (IllegalArgumentException e){ + } catch (IllegalArgumentException e) { mOwnerUuid = null; } if (aNBT.hasKey(NBT.LOCK_UPGRADE)) mLockUpgrade = aNBT.getBoolean(NBT.LOCK_UPGRADE); @@ -182,15 +186,15 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements readCoverNBT(aNBT); readMultiTileNBT(aNBT); - if(GregTech_API.sBlockIcons == null && aNBT.hasKey(NBT.TEXTURE)) { + if (GregTech_API.sBlockIcons == null && aNBT.hasKey(NBT.TEXTURE)) { loadTextureNBT(aNBT); } else { copyTextures(); } if (mCoverData == null || mCoverData.length != 6) mCoverData = new ISerializableObject[6]; - if (mCoverSides.length != 6) mCoverSides = new int[]{0, 0, 0, 0, 0, 0}; - if (mSidedRedstone.length != 6) mSidedRedstone = new byte[]{15, 15, 15, 15, 15, 15}; + if (mCoverSides.length != 6) mCoverSides = new int[] {0, 0, 0, 0, 0, 0}; + if (mSidedRedstone.length != 6) mSidedRedstone = new byte[] {15, 15, 15, 15, 15, 15}; updateCoverBehavior(); @@ -246,7 +250,6 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements return aNBT; } - @Override public long getTimer() { return 0; @@ -259,7 +262,9 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements @Override public TileEntity getTileEntity(int aX, int aY, int aZ) { - if (worldObj == null || (ignoreUnloadedChunks && crossedChunkBorder(aX, aZ) && !worldObj.blockExists(aX, aY, aZ))) return null; + if (worldObj == null + || (ignoreUnloadedChunks && crossedChunkBorder(aX, aZ) && !worldObj.blockExists(aX, aY, aZ))) + return null; return GT_Util.getTileEntity(worldObj, aX, aY, aZ, true); } @@ -269,7 +274,8 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements } @Override - public boolean shouldRefresh(Block aOldBlock, Block aNewBlock, int aOldMeta, int aNewMeta, World aWorld, int aX, int aY, int aZ) { + public boolean shouldRefresh( + Block aOldBlock, Block aNewBlock, int aOldMeta, int aNewMeta, World aWorld, int aX, int aY, int aZ) { return mShouldRefresh || aOldBlock != aNewBlock; } @@ -282,13 +288,22 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements public void doBlockUpdate() { final Block tBlock = getBlock(getCoords()); worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, tBlock); - if (this instanceof IMTE_IsProvidingStrongPower) for (byte tSide : GT_Values.ALL_VALID_SIDES) { - if (getBlockAtSide(tSide).isNormalCube(worldObj, xCoord + GT_Values.OFFX[tSide], yCoord + GT_Values.OFFY[tSide], zCoord + GT_Values.OFFZ[tSide])) { - worldObj.notifyBlocksOfNeighborChange( - xCoord + GT_Values.OFFX[tSide], yCoord + GT_Values.OFFY[tSide], zCoord + GT_Values.OFFZ[tSide], tBlock, OPOS[tSide] - ); + if (this instanceof IMTE_IsProvidingStrongPower) + for (byte tSide : GT_Values.ALL_VALID_SIDES) { + if (getBlockAtSide(tSide) + .isNormalCube( + worldObj, + xCoord + GT_Values.OFFX[tSide], + yCoord + GT_Values.OFFY[tSide], + zCoord + GT_Values.OFFZ[tSide])) { + worldObj.notifyBlocksOfNeighborChange( + xCoord + GT_Values.OFFX[tSide], + yCoord + GT_Values.OFFY[tSide], + zCoord + GT_Values.OFFZ[tSide], + tBlock, + OPOS[tSide]); + } } - } mDoesBlockUpdate = false; } @@ -297,7 +312,9 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements final TileEntity tTileEntity = getTileEntityAtSideAndDistance(aSide, 1); // TODO: check to an interface // if (getBlockAtSide(aSide) == Blocks.glass) return false; - return tTileEntity instanceof IMultiTileEntity ? !((IMultiTileEntity) tTileEntity).isSurfaceOpaque(OPOS[aSide]) : !getBlockAtSide(aSide).isOpaqueCube(); + return tTileEntity instanceof IMultiTileEntity + ? !((IMultiTileEntity) tTileEntity).isSurfaceOpaque(OPOS[aSide]) + : !getBlockAtSide(aSide).isOpaqueCube(); } @Override @@ -317,37 +334,55 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements return this; } - @Override public int getRenderPasses(Block aBlock) {return 1;} - @Override public boolean usesRenderPass(int aRenderPass) {return true;} - @Override public boolean setBlockBounds(Block aBlock, int aRenderPass) {return false;} - @Override public boolean renderItem(Block aBlock, RenderBlocks aRenderer) {return false;} - @Override public boolean renderBlock(Block aBlock, RenderBlocks aRenderer, IBlockAccess aWorld, int aX, int aY, int aZ) {return false;} + @Override + public int getRenderPasses(Block aBlock) { + return 1; + } + + @Override + public boolean usesRenderPass(int aRenderPass) { + return true; + } + + @Override + public boolean setBlockBounds(Block aBlock, int aRenderPass) { + return false; + } + + @Override + public boolean renderItem(Block aBlock, RenderBlocks aRenderer) { + return false; + } + + @Override + public boolean renderBlock(Block aBlock, RenderBlocks aRenderer, IBlockAccess aWorld, int aX, int aY, int aZ) { + return false; + } @Override public ITexture[] getTexture(Block aBlock, byte aSide) { return getTexture(aBlock, aSide, 1, VALID_SIDES); } - @Override public final ITexture[] getTexture(Block aBlock, byte aSide, int aRenderPass, boolean[] aShouldSideBeRendered) { + @Override + public final ITexture[] getTexture(Block aBlock, byte aSide, int aRenderPass, boolean[] aShouldSideBeRendered) { if (!aShouldSideBeRendered[aSide]) return null; final ITexture coverTexture = getCoverTexture(aSide); final ITexture[] textureUncovered = getTexture(aBlock, aSide, true, aRenderPass); if (coverTexture != null) { - return new ITexture[]{ - GT_MultiTexture.get(textureUncovered), - coverTexture - }; + return new ITexture[] {GT_MultiTexture.get(textureUncovered), coverTexture}; } else { return textureUncovered; } } - @Override public ITexture[] getTexture(Block aBlock, byte aSide, boolean isActive, int aRenderPass) { + @Override + public ITexture[] getTexture(Block aBlock, byte aSide, boolean isActive, int aRenderPass) { // Top, bottom or side - aSide = (byte)Math.min(aSide, 2); - return new ITexture[]{TextureFactory.of(mTextures[aSide], GT_Util.getRGBaArray(mRGBa))}; + aSide = (byte) Math.min(aSide, 2); + return new ITexture[] {TextureFactory.of(mTextures[aSide], GT_Util.getRGBaArray(mRGBa))}; } @Override @@ -403,7 +438,7 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements */ @Override public boolean setMainFacing(byte aSide) { - if(!isValidFacing(aSide)) return false; + if (!isValidFacing(aSide)) return false; mFacing = aSide; issueClientUpdate(); @@ -450,20 +485,35 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements public AxisAlignedBB box(double[] aBox) { return AxisAlignedBB.getBoundingBox( - xCoord + aBox[0], yCoord + aBox[1], zCoord + aBox[2], xCoord + aBox[3], yCoord + aBox[4], zCoord + aBox[5] - ); - } - - public boolean box(AxisAlignedBB aAABB, List<AxisAlignedBB> aList, double aMinX, double aMinY, double aMinZ, double aMaxX, double aMaxY, double aMaxZ) { + xCoord + aBox[0], + yCoord + aBox[1], + zCoord + aBox[2], + xCoord + aBox[3], + yCoord + aBox[4], + zCoord + aBox[5]); + } + + public boolean box( + AxisAlignedBB aAABB, + List<AxisAlignedBB> aList, + double aMinX, + double aMinY, + double aMinZ, + double aMaxX, + double aMaxY, + double aMaxZ) { final AxisAlignedBB tBox = box(aMinX, aMinY, aMinZ, aMaxX, aMaxY, aMaxZ); return tBox.intersectsWith(aAABB) && aList.add(tBox); } @Override - public void onFacingChange() {/*Do nothing*/} + public void onFacingChange() { + /*Do nothing*/ + } public AxisAlignedBB box(double aMinX, double aMinY, double aMinZ, double aMaxX, double aMaxY, double aMaxZ) { - return AxisAlignedBB.getBoundingBox(xCoord + aMinX, yCoord + aMinY, zCoord + aMinZ, xCoord + aMaxX, yCoord + aMaxY, zCoord + aMaxZ); + return AxisAlignedBB.getBoundingBox( + xCoord + aMinX, yCoord + aMinY, zCoord + aMinZ, xCoord + aMaxX, yCoord + aMaxY, zCoord + aMaxZ); } @Override @@ -477,7 +527,9 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements } @Override - public void onMachineBlockUpdate() {/*Do nothing*/} + public void onMachineBlockUpdate() { + /*Do nothing*/ + } public boolean box(AxisAlignedBB aAABB, List<AxisAlignedBB> aList, float[] aBox) { final AxisAlignedBB tBox = box(aBox[0], aBox[1], aBox[2], aBox[3], aBox[4], aBox[5]); @@ -490,7 +542,13 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements } public AxisAlignedBB box(float[] aBox) { - return AxisAlignedBB.getBoundingBox(xCoord + aBox[0], yCoord + aBox[1], zCoord + aBox[2], xCoord + aBox[3], yCoord + aBox[4], zCoord + aBox[5]); + return AxisAlignedBB.getBoundingBox( + xCoord + aBox[0], + yCoord + aBox[1], + zCoord + aBox[2], + xCoord + aBox[3], + yCoord + aBox[4], + zCoord + aBox[5]); } public boolean box(Block aBlock) { @@ -513,16 +571,15 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements } public boolean box(Block aBlock, double[] aBox) { - aBlock.setBlockBounds((float) aBox[0], (float) aBox[1], (float) aBox[2], (float) aBox[3], (float) aBox[4], (float) aBox[5]); + aBlock.setBlockBounds( + (float) aBox[0], (float) aBox[1], (float) aBox[2], (float) aBox[3], (float) aBox[4], (float) aBox[5]); return true; } - protected void markBlockForUpdate() { worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - //worldObj.func_147479_m(xCoord, yCoord, zCoord); + // worldObj.func_147479_m(xCoord, yCoord, zCoord); mNeedsUpdate = false; - } public boolean box(Block aBlock, float[] aBox) { @@ -535,7 +592,8 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements /* empty */ } - public boolean box(Block aBlock, double aMinX, double aMinY, double aMinZ, double aMaxX, double aMaxY, double aMaxZ) { + public boolean box( + Block aBlock, double aMinX, double aMinY, double aMinZ, double aMaxX, double aMaxY, double aMaxZ) { aBlock.setBlockBounds((float) aMinX, (float) aMinY, (float) aMinZ, (float) aMaxX, (float) aMaxY, (float) aMaxZ); return true; } @@ -612,9 +670,7 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements } @Override - public void onBlockAdded() { - - } + public void onBlockAdded() {} @Override public String getOwnerName() { @@ -639,7 +695,17 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements } @Override - public boolean onPlaced(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, byte aSide, float aHitX, float aHitY, float aHitZ) { + public boolean onPlaced( + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + byte aSide, + float aHitX, + float aHitY, + float aHitZ) { mFacing = getSideForPlayerPlacing(aPlayer, mFacing, getValidFacings()); onFacingChange(); return true; @@ -658,23 +724,26 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements public boolean onBlockActivated(EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) { try { return allowRightclick(aPlayer) && onRightClick(aPlayer, aSide, aX, aY, aZ); - } catch(Throwable e) { + } catch (Throwable e) { e.printStackTrace(GT_Log.err); return true; } } + @Override public boolean onRightClick(EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) { if (isClientSide()) { - //Configure Cover, sneak can also be: screwdriver, wrench, side cutter, soldering iron + // Configure Cover, sneak can also be: screwdriver, wrench, side cutter, soldering iron if (aPlayer.isSneaking()) { - final byte tSide = (getCoverIDAtSide(aSide) == 0) ? GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ) : aSide; + final byte tSide = + (getCoverIDAtSide(aSide) == 0) ? GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ) : aSide; return (getCoverBehaviorAtSideNew(tSide).hasCoverGUI()); } else if (getCoverBehaviorAtSideNew(aSide).onCoverRightclickClient(aSide, this, aPlayer, aX, aY, aZ)) { return true; } - if (!getCoverBehaviorAtSideNew(aSide).isGUIClickable(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this)) + if (!getCoverBehaviorAtSideNew(aSide) + .isGUIClickable(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this)) return false; } if (isServerSide()) { @@ -682,27 +751,35 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements final ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem(); final byte wrenchSide = GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ); - if(tCurrentItem != null) { - if (getColorization() >= 0 && GT_Utility.areStacksEqual(new ItemStack(Items.water_bucket, 1), tCurrentItem)) { + if (tCurrentItem != null) { + if (getColorization() >= 0 + && GT_Utility.areStacksEqual(new ItemStack(Items.water_bucket, 1), tCurrentItem)) { // TODO (Colorization) } - if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWrenchList)) return onWrenchRightClick(aPlayer, tCurrentItem, wrenchSide, aX, aY, aZ); - if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sScrewdriverList)) return onScrewdriverRightClick(aPlayer, tCurrentItem, wrenchSide, aX, aY, aZ); - if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sHardHammerList)) return onHammerRightClick(aPlayer, tCurrentItem, wrenchSide, aX, aY, aZ); - if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSoftHammerList)) return onMalletRightClick(aPlayer, tCurrentItem, wrenchSide, aX, aY, aZ); - if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSolderingToolList)) return onSolderingRightClick(aPlayer, tCurrentItem, wrenchSide, aX, aY, aZ); - if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWireCutterList)) return onWireCutterRightClick(aPlayer, tCurrentItem, wrenchSide, aX, aY, aZ); + if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWrenchList)) + return onWrenchRightClick(aPlayer, tCurrentItem, wrenchSide, aX, aY, aZ); + if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sScrewdriverList)) + return onScrewdriverRightClick(aPlayer, tCurrentItem, wrenchSide, aX, aY, aZ); + if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sHardHammerList)) + return onHammerRightClick(aPlayer, tCurrentItem, wrenchSide, aX, aY, aZ); + if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSoftHammerList)) + return onMalletRightClick(aPlayer, tCurrentItem, wrenchSide, aX, aY, aZ); + if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSolderingToolList)) + return onSolderingRightClick(aPlayer, tCurrentItem, wrenchSide, aX, aY, aZ); + if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWireCutterList)) + return onWireCutterRightClick(aPlayer, tCurrentItem, wrenchSide, aX, aY, aZ); final byte coverSide = getCoverIDAtSide(aSide) == 0 ? wrenchSide : aSide; if (getCoverIDAtSide(coverSide) == 0) { if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sCovers.keySet())) { - if (GregTech_API.getCoverBehaviorNew(tCurrentItem).isCoverPlaceable(coverSide, tCurrentItem, this) && - allowCoverOnSide(coverSide, new GT_ItemStack(tCurrentItem))) - { + if (GregTech_API.getCoverBehaviorNew(tCurrentItem) + .isCoverPlaceable(coverSide, tCurrentItem, this) + && allowCoverOnSide(coverSide, new GT_ItemStack(tCurrentItem))) { setCoverItemAtSide(coverSide, tCurrentItem); if (!aPlayer.capabilities.isCreativeMode) tCurrentItem.stackSize--; - GT_Utility.sendSoundToPlayers(worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); + GT_Utility.sendSoundToPlayers( + worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); issueClientUpdate(); } sendCoverDataIfNeeded(); @@ -711,63 +788,97 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements } else { if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sCrowbarList)) { if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer)) { - GT_Utility.sendSoundToPlayers(worldObj, SoundResource.RANDOM_BREAK, 1.0F, -1, xCoord, yCoord, zCoord); + GT_Utility.sendSoundToPlayers( + worldObj, SoundResource.RANDOM_BREAK, 1.0F, -1, xCoord, yCoord, zCoord); dropCover(coverSide, aSide, false); } sendCoverDataIfNeeded(); return true; } } - } else if (aPlayer.isSneaking()) { //Sneak click, no tool -> open cover config if possible. - aSide = (getCoverIDAtSide(aSide) == 0) ? GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ) : aSide; - return getCoverIDAtSide(aSide) > 0 && getCoverBehaviorAtSideNew(aSide).onCoverShiftRightClick(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this, aPlayer); + } else if (aPlayer.isSneaking()) { // Sneak click, no tool -> open cover config if possible. + aSide = (getCoverIDAtSide(aSide) == 0) + ? GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ) + : aSide; + return getCoverIDAtSide(aSide) > 0 + && getCoverBehaviorAtSideNew(aSide) + .onCoverShiftRightClick( + aSide, + getCoverIDAtSide(aSide), + getComplexCoverDataAtSide(aSide), + this, + aPlayer); } - if (getCoverBehaviorAtSideNew(aSide).onCoverRightClick(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this, aPlayer, aX, aY, aZ)) - return true; - - if (!getCoverBehaviorAtSideNew(aSide).isGUIClickable(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this)) + if (getCoverBehaviorAtSideNew(aSide) + .onCoverRightClick( + aSide, + getCoverIDAtSide(aSide), + getComplexCoverDataAtSide(aSide), + this, + aPlayer, + aX, + aY, + aZ)) return true; + + if (!getCoverBehaviorAtSideNew(aSide) + .isGUIClickable(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this)) return false; - - } } return false; } - public boolean onWrenchRightClick(EntityPlayer aPlayer, ItemStack tCurrentItem, byte wrenchSide, float aX, float aY, float aZ) { - if(setMainFacing(wrenchSide)) { + public boolean onWrenchRightClick( + EntityPlayer aPlayer, ItemStack tCurrentItem, byte wrenchSide, float aX, float aY, float aZ) { + if (setMainFacing(wrenchSide)) { GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer); GT_Utility.sendSoundToPlayers(worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); } return true; } - public boolean onScrewdriverRightClick(EntityPlayer aPlayer, ItemStack tCurrentItem, byte wrenchSide, float aX, float aY, float aZ) { + public boolean onScrewdriverRightClick( + EntityPlayer aPlayer, ItemStack tCurrentItem, byte wrenchSide, float aX, float aY, float aZ) { if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 200, aPlayer)) { - setCoverDataAtSide(wrenchSide, getCoverBehaviorAtSideNew(wrenchSide).onCoverScrewdriverClick(wrenchSide, getCoverIDAtSide(wrenchSide), getComplexCoverDataAtSide(wrenchSide), this, aPlayer, aX, aY, aZ)); + setCoverDataAtSide( + wrenchSide, + getCoverBehaviorAtSideNew(wrenchSide) + .onCoverScrewdriverClick( + wrenchSide, + getCoverIDAtSide(wrenchSide), + getComplexCoverDataAtSide(wrenchSide), + this, + aPlayer, + aX, + aY, + aZ)); // TODO: Update connections! GT_Utility.sendSoundToPlayers(worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord); } return true; } - public boolean onHammerRightClick(EntityPlayer aPlayer, ItemStack tCurrentItem, byte wrenchSide, float aX, float aY, float aZ) { + public boolean onHammerRightClick( + EntityPlayer aPlayer, ItemStack tCurrentItem, byte wrenchSide, float aX, float aY, float aZ) { return true; } - public boolean onMalletRightClick(EntityPlayer aPlayer, ItemStack tCurrentItem, byte wrenchSide, float aX, float aY, float aZ) { + public boolean onMalletRightClick( + EntityPlayer aPlayer, ItemStack tCurrentItem, byte wrenchSide, float aX, float aY, float aZ) { return true; } - public boolean onSolderingRightClick(EntityPlayer aPlayer, ItemStack tCurrentItem, byte wrenchSide, float aX, float aY, float aZ) { + public boolean onSolderingRightClick( + EntityPlayer aPlayer, ItemStack tCurrentItem, byte wrenchSide, float aX, float aY, float aZ) { return true; } - public boolean onWireCutterRightClick(EntityPlayer aPlayer, ItemStack tCurrentItem, byte wrenchSide, float aX, float aY, float aZ) { + public boolean onWireCutterRightClick( + EntityPlayer aPlayer, ItemStack tCurrentItem, byte wrenchSide, float aX, float aY, float aZ) { return true; } @@ -783,9 +894,7 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements } @Override - public void onExploded(Explosion aExplosion) { - - } + public void onExploded(Explosion aExplosion) {} @Override public boolean isSideSolid(byte aSide) { @@ -800,28 +909,26 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements return rList; } - @Override - public boolean getSubItems(MultiTileEntityBlockInternal aBlock, Item aItem, CreativeTabs aTab, List<ItemStack> aList, short aID) { + public boolean getSubItems( + MultiTileEntityBlockInternal aBlock, Item aItem, CreativeTabs aTab, List<ItemStack> aList, short aID) { return true; } - @Override public boolean recolourBlock(byte aSide, byte aColor) { -// if (aColor > 15 || aColor < -1) aColor = -1; -// if(paint((byte) (aColor + 1))) { -//// updateClientData(); -//// causeBlockUpdate(); -// return true; -// } -// if (unpaint()) {updateClientData(); causeBlockUpdate(); return T;} -// mColor = (byte) (aColor + 1); -//// if (canAccessData()) mMetaTileEntity.onColorChangeServer(aColor); + // if (aColor > 15 || aColor < -1) aColor = -1; + // if(paint((byte) (aColor + 1))) { + //// updateClientData(); + //// causeBlockUpdate(); + // return true; + // } + // if (unpaint()) {updateClientData(); causeBlockUpdate(); return T;} + // mColor = (byte) (aColor + 1); + //// if (canAccessData()) mMetaTileEntity.onColorChangeServer(aColor); return false; } - @Override public boolean playerOwnsThis(EntityPlayer aPlayer, boolean aCheckPrecicely) { if (aCheckPrecicely || privateAccess() || (mOwnerName.length() == 0)) @@ -829,8 +936,10 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements setOwnerName(aPlayer.getDisplayName()); setOwnerUuid(aPlayer.getUniqueID()); } else - return !privateAccess() || aPlayer.getDisplayName().equals("Player") || mOwnerName.equals("Player") || mOwnerName.equals( - aPlayer.getDisplayName()); + return !privateAccess() + || aPlayer.getDisplayName().equals("Player") + || mOwnerName.equals("Player") + || mOwnerName.equals(aPlayer.getDisplayName()); return true; } @@ -848,15 +957,27 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements */ public GT_Packet_New getClientDataPacket() { return new GT_Packet_TileEntity( - xCoord, (short) yCoord, zCoord, - getMultiTileEntityRegistryID(), getMultiTileEntityID(), - mCoverSides[0], mCoverSides[1], mCoverSides[2], mCoverSides[3], mCoverSides[4], mCoverSides[5], - (byte) ((mFacing & 7) | (mRedstone ? 16 : 0)), - (byte) getTextureData(), /*getTexturePage()*/ - (byte) 0, /*getUpdateData()*/ - (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0)), - mColor - ); + xCoord, + (short) yCoord, + zCoord, + getMultiTileEntityRegistryID(), + getMultiTileEntityID(), + mCoverSides[0], + mCoverSides[1], + mCoverSides[2], + mCoverSides[3], + mCoverSides[4], + mCoverSides[5], + (byte) ((mFacing & 7) | (mRedstone ? 16 : 0)), + (byte) getTextureData(), /*getTexturePage()*/ + (byte) 0, /*getUpdateData()*/ + (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) + | ((mSidedRedstone[1] > 0) ? 2 : 0) + | ((mSidedRedstone[2] > 0) ? 4 : 0) + | ((mSidedRedstone[3] > 0) ? 8 : 0) + | ((mSidedRedstone[4] > 0) ? 16 : 0) + | ((mSidedRedstone[5] > 0) ? 32 : 0)), + mColor); } @Override @@ -866,29 +987,34 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements } @Override - public void getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { + public void getWailaBody( + ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { super.getWailaBody(itemStack, currenttip, accessor, config); - currenttip.add(String.format("Facing: %s", ForgeDirection.getOrientation(getFrontFacing()).name())); + currenttip.add(String.format( + "Facing: %s", ForgeDirection.getOrientation(getFrontFacing()).name())); } @Override - public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, int z) { + public void getWailaNBTData( + EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, int z) { super.getWailaNBTData(player, tile, tag, world, x, y, z); } - @Override - public void sendClientData( EntityPlayerMP aPlayer) { - if(worldObj == null || worldObj.isRemote) return; + public void sendClientData(EntityPlayerMP aPlayer) { + if (worldObj == null || worldObj.isRemote) return; final GT_Packet_New tPacket = getClientDataPacket(); - if(aPlayer == null) { + if (aPlayer == null) { GT_Values.NW.sendPacketToAllPlayersInRange(worldObj, tPacket, getXCoord(), getZCoord()); } else { GT_Values.NW.sendToPlayer(tPacket, aPlayer); } sendCoverDataIfNeeded(); } - public void setTextureData(byte aValue) {/*Do nothing*/} + + public void setTextureData(byte aValue) { + /*Do nothing*/ + } @Override public boolean receiveClientEvent(int aEventID, int aValue) { @@ -898,15 +1024,15 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements switch (aEventID) { case GregTechTileClientEvents.CHANGE_COMMON_DATA: mFacing = (byte) (aValue & 7); - //mActive = ((aValue & 8) != 0); + // mActive = ((aValue & 8) != 0); mRedstone = ((aValue & 16) != 0); - //mLockUpgrade = ((aValue&32) != 0); - //mWorks = ((aValue & 64) != 0); + // mLockUpgrade = ((aValue&32) != 0); + // mWorks = ((aValue & 64) != 0); break; case GregTechTileClientEvents.CHANGE_CUSTOM_DATA: if ((aValue & 0x80) != 0) // Is texture index - setTextureData((byte) (aValue & 0x7F)); - //else if (mMetaTileEntity instanceof GT_MetaTileEntity_Hatch)//is texture page and hatch + setTextureData((byte) (aValue & 0x7F)); + // else if (mMetaTileEntity instanceof GT_MetaTileEntity_Hatch)//is texture page and hatch // ((GT_MetaTileEntity_Hatch) mMetaTileEntity).onTexturePageUpdate((byte) (aValue & 0x7F)); break; case GregTechTileClientEvents.CHANGE_COLOR: @@ -921,21 +1047,21 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements mSidedRedstone[4] = (byte) ((aValue & 16) == 16 ? 15 : 0); mSidedRedstone[5] = (byte) ((aValue & 32) == 32 ? 15 : 0); break; -// case GregTechTileClientEvents.DO_SOUND: -// if (mTickTimer > 20) -// doSound((byte) aValue, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5); -// break; -// case GregTechTileClientEvents.START_SOUND_LOOP: -// if (mTickTimer > 20) -// startSoundLoop((byte) aValue, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5); -// break; -// case GregTechTileClientEvents.STOP_SOUND_LOOP: -// if (mTickTimer > 20) -// stopSoundLoop((byte) aValue, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5); -// break; -// case GregTechTileClientEvents.CHANGE_LIGHT: -// mLightValue = (byte) aValue; -// break; + // case GregTechTileClientEvents.DO_SOUND: + // if (mTickTimer > 20) + // doSound((byte) aValue, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5); + // break; + // case GregTechTileClientEvents.START_SOUND_LOOP: + // if (mTickTimer > 20) + // startSoundLoop((byte) aValue, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5); + // break; + // case GregTechTileClientEvents.STOP_SOUND_LOOP: + // if (mTickTimer > 20) + // stopSoundLoop((byte) aValue, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5); + // break; + // case GregTechTileClientEvents.CHANGE_LIGHT: + // mLightValue = (byte) aValue; + // break; } } return true; @@ -950,10 +1076,10 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements public ArrayList<String> getDebugInfo(EntityPlayer aPlayer, int aLogLevel) { final ArrayList<String> tList = new ArrayList<>(); if (aLogLevel > 2) { - tList.add("MultiTileRegistry-ID: " + EnumChatFormatting.BLUE + mMTERegistry + EnumChatFormatting.RESET + " MultiTile-ID: " + EnumChatFormatting.BLUE + mMTEID + EnumChatFormatting.RESET); + tList.add("MultiTileRegistry-ID: " + EnumChatFormatting.BLUE + mMTERegistry + EnumChatFormatting.RESET + + " MultiTile-ID: " + EnumChatFormatting.BLUE + mMTEID + EnumChatFormatting.RESET); } - if(joinedIc2Enet) - tList.add("Joined IC2 ENet"); + if (joinedIc2Enet) tList.add("Joined IC2 ENet"); addDebugInfo(aPlayer, aLogLevel, tList); @@ -967,33 +1093,48 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements /** * Fluid - A Default implementation of the Fluid Tank behaviour, so that every TileEntity can use this to simplify its Code. */ - protected IFluidTank getFluidTankFillable(byte aSide, FluidStack aFluidToFill) {return null;} - protected IFluidTank getFluidTankDrainable(byte aSide, FluidStack aFluidToDrain) {return null;} - protected IFluidTank[] getFluidTanks(byte aSide) { return GT_Values.emptyFluidTank; } + protected IFluidTank getFluidTankFillable(byte aSide, FluidStack aFluidToFill) { + return null; + } - public boolean isLiquidInput(byte aSide) {return true;} + protected IFluidTank getFluidTankDrainable(byte aSide, FluidStack aFluidToDrain) { + return null; + } - public boolean isLiquidOutput(byte aSide) {return true;} + protected IFluidTank[] getFluidTanks(byte aSide) { + return GT_Values.emptyFluidTank; + } + + public boolean isLiquidInput(byte aSide) { + return true; + } + + public boolean isLiquidOutput(byte aSide) { + return true; + } @Override public int fill(ForgeDirection aDirection, FluidStack aFluid, boolean aDoFill) { if (aFluid == null || aFluid.amount <= 0) return 0; - final IFluidTank tTank = getFluidTankFillable((byte)aDirection.ordinal(), aFluid); + final IFluidTank tTank = getFluidTankFillable((byte) aDirection.ordinal(), aFluid); return (tTank == null) ? 0 : tTank.fill(aFluid, aDoFill); } @Override public FluidStack drain(ForgeDirection aDirection, FluidStack aFluid, boolean aDoDrain) { if (aFluid == null || aFluid.amount <= 0) return null; - final IFluidTank tTank = getFluidTankDrainable((byte)aDirection.ordinal(), aFluid); - if (tTank == null || tTank.getFluid() == null || tTank.getFluidAmount() == 0 || !tTank.getFluid().isFluidEqual(aFluid)) return null; + final IFluidTank tTank = getFluidTankDrainable((byte) aDirection.ordinal(), aFluid); + if (tTank == null + || tTank.getFluid() == null + || tTank.getFluidAmount() == 0 + || !tTank.getFluid().isFluidEqual(aFluid)) return null; return tTank.drain(aFluid.amount, aDoDrain); } @Override public FluidStack drain(ForgeDirection aDirection, int aAmountToDrain, boolean aDoDrain) { if (aAmountToDrain <= 0) return null; - final IFluidTank tTank = getFluidTankDrainable((byte)aDirection.ordinal(), null); + final IFluidTank tTank = getFluidTankDrainable((byte) aDirection.ordinal(), null); if (tTank == null || tTank.getFluid() == null || tTank.getFluidAmount() == 0) return null; return tTank.drain(aAmountToDrain, aDoDrain); } @@ -1001,20 +1142,20 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements @Override public boolean canFill(ForgeDirection aDirection, Fluid aFluid) { if (aFluid == null) return false; - final IFluidTank tTank = getFluidTankFillable((byte)aDirection.ordinal(), new FluidStack(aFluid, 0)); + final IFluidTank tTank = getFluidTankFillable((byte) aDirection.ordinal(), new FluidStack(aFluid, 0)); return tTank != null && (tTank.getFluid() == null || tTank.getFluid().getFluid() == aFluid); } @Override public boolean canDrain(ForgeDirection aDirection, Fluid aFluid) { if (aFluid == null) return false; - final IFluidTank tTank = getFluidTankDrainable((byte)aDirection.ordinal(), new FluidStack(aFluid, 0)); + final IFluidTank tTank = getFluidTankDrainable((byte) aDirection.ordinal(), new FluidStack(aFluid, 0)); return tTank != null && (tTank.getFluid() != null && tTank.getFluid().getFluid() == aFluid); } @Override public FluidTankInfo[] getTankInfo(ForgeDirection aDirection) { - final IFluidTank[] tTanks = getFluidTanks((byte)aDirection.ordinal()); + final IFluidTank[] tTanks = getFluidTanks((byte) aDirection.ordinal()); if (tTanks == null || tTanks.length <= 0) return GT_Values.emptyFluidTankInfo; final FluidTankInfo[] rInfo = new FluidTankInfo[tTanks.length]; for (int i = 0; i < tTanks.length; i++) rInfo[i] = new FluidTankInfo(tTanks[i]); @@ -1024,69 +1165,210 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements /** * Energy - Do nothing by Default */ - @Override public boolean isUniversalEnergyStored(long aEnergyAmount) { return false; } - @Override public long getUniversalEnergyStored() { return 0; } - @Override public long getUniversalEnergyCapacity() { return 0; } - @Override public long getOutputAmperage() { return 0; } - @Override public long getOutputVoltage() { return 0; } - @Override public long getInputAmperage() { return 0; } - @Override public long getInputVoltage() { return 0; } - @Override public boolean decreaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooLessEnergy) { return false; } - @Override public boolean increaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooMuchEnergy) { return false; } - @Override public boolean drainEnergyUnits(byte aSide, long aVoltage, long aAmperage) { return false; } - @Override public long getAverageElectricInput() { return 0; } - @Override public long getAverageElectricOutput() { return 0; } - @Override public long getStoredEU() { return 0; } - @Override public long getEUCapacity() { return 0; } - @Override public long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage) { return 0; } - @Override public boolean inputEnergyFrom(byte aSide) { return false; } - @Override public boolean outputsEnergyTo(byte aSide) { return false; } + @Override + public boolean isUniversalEnergyStored(long aEnergyAmount) { + return false; + } + + @Override + public long getUniversalEnergyStored() { + return 0; + } + + @Override + public long getUniversalEnergyCapacity() { + return 0; + } + + @Override + public long getOutputAmperage() { + return 0; + } + + @Override + public long getOutputVoltage() { + return 0; + } + + @Override + public long getInputAmperage() { + return 0; + } + + @Override + public long getInputVoltage() { + return 0; + } + + @Override + public boolean decreaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooLessEnergy) { + return false; + } + + @Override + public boolean increaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooMuchEnergy) { + return false; + } + + @Override + public boolean drainEnergyUnits(byte aSide, long aVoltage, long aAmperage) { + return false; + } + + @Override + public long getAverageElectricInput() { + return 0; + } + + @Override + public long getAverageElectricOutput() { + return 0; + } + + @Override + public long getStoredEU() { + return 0; + } + + @Override + public long getEUCapacity() { + return 0; + } + + @Override + public long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage) { + return 0; + } + + @Override + public boolean inputEnergyFrom(byte aSide) { + return false; + } + + @Override + public boolean outputsEnergyTo(byte aSide) { + return false; + } /** * Inventory - Do nothing by default */ - @Override public void openInventory() { /* Do nothing */ } - @Override public void closeInventory() { /* Do nothing */ } - @Override public boolean hasInventoryBeenModified() { return false; } - @Override public boolean isValidSlot(int aIndex) { return false; } - @Override public boolean addStackToSlot(int aIndex, ItemStack aStack) { return false; } - @Override public boolean addStackToSlot(int aIndex, ItemStack aStack, int aAmount) { return false; } - @Override public int[] getAccessibleSlotsFromSide(int aSide) { return GT_Values.emptyIntArray; } - @Override public boolean canInsertItem(int aSlot, ItemStack aStack, int aSide) { return false; } - @Override public boolean canExtractItem(int aSlot, ItemStack aStack, int aSide) { return false; } - @Override public int getSizeInventory() { return 0; } - @Override public ItemStack getStackInSlot(int aSlot) { return null; } - @Override public ItemStack decrStackSize(int aSlot, int aDecrement) { return null; } - @Override public ItemStack getStackInSlotOnClosing(int aSlot) { return null; } - @Override public void setInventorySlotContents(int aSlot, ItemStack aStack) { /* Do nothing */ } - @Override public int getInventoryStackLimit() { return 0; } - @Override public boolean isItemValidForSlot(int aSlot, ItemStack aStack) { return false; } - @Override public void markInventoryBeenModified() { mInventoryChanged = true; } + @Override + public void openInventory() { + /* Do nothing */ + } + @Override + public void closeInventory() { + /* Do nothing */ + } + + @Override + public boolean hasInventoryBeenModified() { + return false; + } + + @Override + public boolean isValidSlot(int aIndex) { + return false; + } + + @Override + public boolean addStackToSlot(int aIndex, ItemStack aStack) { + return false; + } + + @Override + public boolean addStackToSlot(int aIndex, ItemStack aStack, int aAmount) { + return false; + } + + @Override + public int[] getAccessibleSlotsFromSide(int aSide) { + return GT_Values.emptyIntArray; + } + + @Override + public boolean canInsertItem(int aSlot, ItemStack aStack, int aSide) { + return false; + } + + @Override + public boolean canExtractItem(int aSlot, ItemStack aStack, int aSide) { + return false; + } + + @Override + public int getSizeInventory() { + return 0; + } + + @Override + public ItemStack getStackInSlot(int aSlot) { + return null; + } + + @Override + public ItemStack decrStackSize(int aSlot, int aDecrement) { + return null; + } + + @Override + public ItemStack getStackInSlotOnClosing(int aSlot) { + return null; + } + + @Override + public void setInventorySlotContents(int aSlot, ItemStack aStack) { + /* Do nothing */ + } + + @Override + public int getInventoryStackLimit() { + return 0; + } + + @Override + public boolean isItemValidForSlot(int aSlot, ItemStack aStack) { + return false; + } + + @Override + public void markInventoryBeenModified() { + mInventoryChanged = true; + } /* * Cover Helpers */ public boolean coverLetsFluidIn(byte aSide, Fluid aFluid) { - return getCoverBehaviorAtSideNew(aSide).letsFluidIn(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), aFluid, this); + return getCoverBehaviorAtSideNew(aSide) + .letsFluidIn(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), aFluid, this); } + public boolean coverLetsFluidOut(byte aSide, Fluid aFluid) { - return getCoverBehaviorAtSideNew(aSide).letsFluidOut(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), aFluid, this); + return getCoverBehaviorAtSideNew(aSide) + .letsFluidOut(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), aFluid, this); } public boolean coverLetsEnergyIn(byte aSide) { - return getCoverBehaviorAtSideNew(aSide).letsEnergyIn(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this); + return getCoverBehaviorAtSideNew(aSide) + .letsEnergyIn(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this); } + public boolean coverLetsEnergyOut(byte aSide) { - return getCoverBehaviorAtSideNew(aSide).letsEnergyOut(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this); + return getCoverBehaviorAtSideNew(aSide) + .letsEnergyOut(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this); } public boolean coverLetsItemsIn(byte aSide, int aSlot) { - return getCoverBehaviorAtSideNew(aSide).letsItemsIn(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), aSlot, this); + return getCoverBehaviorAtSideNew(aSide) + .letsItemsIn(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), aSlot, this); } + public boolean coverLetsItemsOut(byte aSide, int aSlot) { - return getCoverBehaviorAtSideNew(aSide).letsItemsOut(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), aSlot,this); + return getCoverBehaviorAtSideNew(aSide) + .letsItemsOut(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), aSlot, this); } - } diff --git a/src/main/java/gregtech/api/multitileentity/base/BaseNontickableMultiTileEntity.java b/src/main/java/gregtech/api/multitileentity/base/BaseNontickableMultiTileEntity.java index 2e689a6bae..bc6f2439ea 100644 --- a/src/main/java/gregtech/api/multitileentity/base/BaseNontickableMultiTileEntity.java +++ b/src/main/java/gregtech/api/multitileentity/base/BaseNontickableMultiTileEntity.java @@ -1,20 +1,22 @@ package gregtech.api.multitileentity.base; + +import static gregtech.api.enums.GT_Values.NW; + import gregtech.api.net.GT_Packet_SendCoverData; import gregtech.api.util.ISerializableObject; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.network.Packet; -import static gregtech.api.enums.GT_Values.NW; - public abstract class BaseNontickableMultiTileEntity extends BaseMultiTileEntity { boolean mConstructed = false; // Keeps track of whether this TE has been constructed and placed in the world + public BaseNontickableMultiTileEntity() { super(false); } @Override public void issueClientUpdate() { - if(worldObj != null && !worldObj.isRemote) sendClientData(null); + if (worldObj != null && !worldObj.isRemote) sendClientData(null); } @Override @@ -30,26 +32,26 @@ public abstract class BaseNontickableMultiTileEntity extends BaseMultiTileEntity @Override public void issueCoverUpdate(byte aSide) { - if(!mConstructed) { + if (!mConstructed) { // Queue these up and send them with the description packet super.issueCoverUpdate(aSide); } else { // Otherwise, send the data right away NW.sendPacketToAllPlayersInRange( - worldObj, - new GT_Packet_SendCoverData(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this), - xCoord, zCoord - ); + worldObj, + new GT_Packet_SendCoverData(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this), + xCoord, + zCoord); // Just in case mCoverNeedUpdate[aSide] = false; } } @Override - public void receiveCoverData(byte aCoverSide, int aCoverID, ISerializableObject aCoverData, EntityPlayerMP aPlayer) { + public void receiveCoverData( + byte aCoverSide, int aCoverID, ISerializableObject aCoverData, EntityPlayerMP aPlayer) { super.receiveCoverData(aCoverSide, aCoverID, aCoverData, aPlayer); // We don't get ticked so issue the texture update right away issueTextureUpdate(); } - } diff --git a/src/main/java/gregtech/api/multitileentity/base/BaseTickableMultiTileEntity.java b/src/main/java/gregtech/api/multitileentity/base/BaseTickableMultiTileEntity.java index c8bc04557f..4945fbc62e 100644 --- a/src/main/java/gregtech/api/multitileentity/base/BaseTickableMultiTileEntity.java +++ b/src/main/java/gregtech/api/multitileentity/base/BaseTickableMultiTileEntity.java @@ -1,5 +1,7 @@ package gregtech.api.multitileentity.base; +import static gregtech.GT_Mod.GT_FML_LOGGER; + import gregtech.api.multitileentity.interfaces.IMultiTileEntity.IMTE_OnNeighborBlockChange; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_Util; @@ -7,8 +9,6 @@ import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.world.World; -import static gregtech.GT_Mod.GT_FML_LOGGER; - public abstract class BaseTickableMultiTileEntity extends BaseMultiTileEntity implements IMTE_OnNeighborBlockChange { /** Variable for seeing if the Tick Function is called right now. */ public boolean mIsRunningTick = false; @@ -19,7 +19,6 @@ public abstract class BaseTickableMultiTileEntity extends BaseMultiTileEntity im /** Variable for updating Data to the Client */ private boolean mSendClientData = false; - public BaseTickableMultiTileEntity() { super(true); } @@ -42,7 +41,7 @@ public abstract class BaseTickableMultiTileEntity extends BaseMultiTileEntity im if (!isServerSide) { if (mNeedsUpdate) { worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - //worldObj.func_147479_m(xCoord, yCoord, zCoord); + // worldObj.func_147479_m(xCoord, yCoord, zCoord); mNeedsUpdate = false; } } @@ -84,16 +83,24 @@ public abstract class BaseTickableMultiTileEntity extends BaseMultiTileEntity im } /** The first part of the Tick. */ - public void onPreTick(long aTick, boolean isServerSide) { /*Do nothing*/ } + public void onPreTick(long aTick, boolean isServerSide) { + /*Do nothing*/ + } /** The regular Tick. */ - public void onTick(long aTimer, boolean isServerSide) { /*Do nothing*/ } + public void onTick(long aTimer, boolean isServerSide) { + /*Do nothing*/ + } /** The absolute last part of the Tick. */ - public void onPostTick(long aTick, boolean isServerSide) { /*Do nothing*/ } + public void onPostTick(long aTick, boolean isServerSide) { + /*Do nothing*/ + } /** Gets called when there is an Exception happening during one of the Tick Functions. */ - public void onTickFailed(long aTimer, boolean isServerSide) { /*Do nothing*/ } + public void onTickFailed(long aTimer, boolean isServerSide) { + /*Do nothing*/ + } @Override public void onNeighborBlockChange(World aWorld, Block aBlock) { @@ -109,5 +116,4 @@ public abstract class BaseTickableMultiTileEntity extends BaseMultiTileEntity im public byte getComparatorValue(byte aSide) { return 0; } - } diff --git a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockController.java b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockController.java index 95b369847f..74d1252eeb 100644 --- a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockController.java +++ b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockController.java @@ -3,17 +3,19 @@ package gregtech.api.multitileentity.interfaces; import net.minecraft.util.ChunkCoordinates; import net.minecraftforge.fluids.FluidStack; -public interface IMultiBlockController extends IMultiTileEntity, IMultiBlockFluidHandler, IMultiBlockInventory, IMultiBlockEnergy { +public interface IMultiBlockController + extends IMultiTileEntity, IMultiBlockFluidHandler, IMultiBlockInventory, IMultiBlockEnergy { boolean checkStructure(boolean aForceReset); /** Set the structure as having changed, and trigger an update */ void onStructureChange(); - @Override ChunkCoordinates getCoords(); + @Override + ChunkCoordinates getCoords(); FluidStack getDrainableFluid(byte aSide); boolean isLiquidInput(byte aSide); - boolean isLiquidOutput(byte aSide); + boolean isLiquidOutput(byte aSide); } diff --git a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockEnergy.java b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockEnergy.java index 3e9892d3bd..4ffd725df5 100644 --- a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockEnergy.java +++ b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockEnergy.java @@ -3,21 +3,37 @@ package gregtech.api.multitileentity.interfaces; import gregtech.api.multitileentity.multiblock.base.MultiBlockPart; interface IMultiBlockEnergy { - boolean isUniversalEnergyStored (MultiBlockPart aPart, long aEnergyAmount); - long getUniversalEnergyStored (MultiBlockPart aPart); - long getUniversalEnergyCapacity (MultiBlockPart aPart); - long getOutputAmperage (MultiBlockPart aPart); - long getOutputVoltage (MultiBlockPart aPart); - long getInputAmperage (MultiBlockPart aPart); - long getInputVoltage (MultiBlockPart aPart); - boolean decreaseStoredEnergyUnits (MultiBlockPart aPart, long aEnergy, boolean aIgnoreTooLittleEnergy); - boolean increaseStoredEnergyUnits (MultiBlockPart aPart, long aEnergy, boolean aIgnoreTooMuchEnergy); - boolean drainEnergyUnits (MultiBlockPart aPart, byte aSide, long aVoltage, long aAmperage); - long injectEnergyUnits (MultiBlockPart aPart, byte aSide, long aVoltage, long aAmperage); - long getAverageElectricInput (MultiBlockPart aPart); - long getAverageElectricOutput (MultiBlockPart aPart); - long getStoredEU (MultiBlockPart aPart); - long getEUCapacity (MultiBlockPart aPart); - boolean inputEnergyFrom (MultiBlockPart aPart, byte aSide); - boolean outputsEnergyTo (MultiBlockPart aPart, byte aSide); + boolean isUniversalEnergyStored(MultiBlockPart aPart, long aEnergyAmount); + + long getUniversalEnergyStored(MultiBlockPart aPart); + + long getUniversalEnergyCapacity(MultiBlockPart aPart); + + long getOutputAmperage(MultiBlockPart aPart); + + long getOutputVoltage(MultiBlockPart aPart); + + long getInputAmperage(MultiBlockPart aPart); + + long getInputVoltage(MultiBlockPart aPart); + + boolean decreaseStoredEnergyUnits(MultiBlockPart aPart, long aEnergy, boolean aIgnoreTooLittleEnergy); + + boolean increaseStoredEnergyUnits(MultiBlockPart aPart, long aEnergy, boolean aIgnoreTooMuchEnergy); + + boolean drainEnergyUnits(MultiBlockPart aPart, byte aSide, long aVoltage, long aAmperage); + + long injectEnergyUnits(MultiBlockPart aPart, byte aSide, long aVoltage, long aAmperage); + + long getAverageElectricInput(MultiBlockPart aPart); + + long getAverageElectricOutput(MultiBlockPart aPart); + + long getStoredEU(MultiBlockPart aPart); + + long getEUCapacity(MultiBlockPart aPart); + + boolean inputEnergyFrom(MultiBlockPart aPart, byte aSide); + + boolean outputsEnergyTo(MultiBlockPart aPart, byte aSide); } diff --git a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockFluidHandler.java b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockFluidHandler.java index 4935ad49ab..e5d2e4f691 100644 --- a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockFluidHandler.java +++ b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockFluidHandler.java @@ -7,10 +7,15 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; public interface IMultiBlockFluidHandler { - int fill (MultiBlockPart aPart, ForgeDirection aDirection, FluidStack aFluid, boolean aDoFill); - FluidStack drain (MultiBlockPart aPart, ForgeDirection aDirection, FluidStack aFluid, boolean aDoDrain); - FluidStack drain (MultiBlockPart aPart, ForgeDirection aDirection, int aAmountToDrain, boolean aDoDrain); - boolean canFill (MultiBlockPart aPart, ForgeDirection aDirection, Fluid aFluid); - boolean canDrain (MultiBlockPart aPart, ForgeDirection aDirection, Fluid aFluid); - FluidTankInfo[] getTankInfo (MultiBlockPart aPart, ForgeDirection aDirection); + int fill(MultiBlockPart aPart, ForgeDirection aDirection, FluidStack aFluid, boolean aDoFill); + + FluidStack drain(MultiBlockPart aPart, ForgeDirection aDirection, FluidStack aFluid, boolean aDoDrain); + + FluidStack drain(MultiBlockPart aPart, ForgeDirection aDirection, int aAmountToDrain, boolean aDoDrain); + + boolean canFill(MultiBlockPart aPart, ForgeDirection aDirection, Fluid aFluid); + + boolean canDrain(MultiBlockPart aPart, ForgeDirection aDirection, Fluid aFluid); + + FluidTankInfo[] getTankInfo(MultiBlockPart aPart, ForgeDirection aDirection); } diff --git a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockInventory.java b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockInventory.java index 4df5a11cc0..7e3777fe90 100644 --- a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockInventory.java +++ b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiBlockInventory.java @@ -5,24 +5,43 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; public interface IMultiBlockInventory { - boolean hasInventoryBeenModified (MultiBlockPart aPart); - boolean isValidSlot (MultiBlockPart aPart, int aIndex); - boolean addStackToSlot (MultiBlockPart aPart, int aIndex, ItemStack aStack); - boolean addStackToSlot (MultiBlockPart aPart, int aIndex, ItemStack aStack, int aAmount); - int[] getAccessibleSlotsFromSide (MultiBlockPart aPart, byte aSide); - boolean canInsertItem (MultiBlockPart aPart, int aSlot, ItemStack aStack, byte aSide); - boolean canExtractItem (MultiBlockPart aPart, int aSlot, ItemStack aStack, byte aSide); - int getSizeInventory (MultiBlockPart aPart); - ItemStack getStackInSlot (MultiBlockPart aPart, int aSlot); - ItemStack decrStackSize (MultiBlockPart aPart, int aSlot, int aDecrement); - ItemStack getStackInSlotOnClosing (MultiBlockPart aPart, int aSlot); - void setInventorySlotContents (MultiBlockPart aPart, int aSlot, ItemStack aStack); - String getInventoryName (MultiBlockPart aPart); - boolean hasCustomInventoryName (MultiBlockPart aPart); - int getInventoryStackLimit (MultiBlockPart aPart); - void markDirty (MultiBlockPart aPart); - boolean isUseableByPlayer (MultiBlockPart aPart, EntityPlayer aPlayer); - void openInventory (MultiBlockPart aPart); - void closeInventory (MultiBlockPart aPart); - boolean isItemValidForSlot (MultiBlockPart aPart, int aSlot, ItemStack aStack); + boolean hasInventoryBeenModified(MultiBlockPart aPart); + + boolean isValidSlot(MultiBlockPart aPart, int aIndex); + + boolean addStackToSlot(MultiBlockPart aPart, int aIndex, ItemStack aStack); + + boolean addStackToSlot(MultiBlockPart aPart, int aIndex, ItemStack aStack, int aAmount); + + int[] getAccessibleSlotsFromSide(MultiBlockPart aPart, byte aSide); + + boolean canInsertItem(MultiBlockPart aPart, int aSlot, ItemStack aStack, byte aSide); + + boolean canExtractItem(MultiBlockPart aPart, int aSlot, ItemStack aStack, byte aSide); + + int getSizeInventory(MultiBlockPart aPart); + + ItemStack getStackInSlot(MultiBlockPart aPart, int aSlot); + + ItemStack decrStackSize(MultiBlockPart aPart, int aSlot, int aDecrement); + + ItemStack getStackInSlotOnClosing(MultiBlockPart aPart, int aSlot); + + void setInventorySlotContents(MultiBlockPart aPart, int aSlot, ItemStack aStack); + + String getInventoryName(MultiBlockPart aPart); + + boolean hasCustomInventoryName(MultiBlockPart aPart); + + int getInventoryStackLimit(MultiBlockPart aPart); + + void markDirty(MultiBlockPart aPart); + + boolean isUseableByPlayer(MultiBlockPart aPart, EntityPlayer aPlayer); + + void openInventory(MultiBlockPart aPart); + + void closeInventory(MultiBlockPart aPart); + + boolean isItemValidForSlot(MultiBlockPart aPart, int aSlot, ItemStack aStack); } diff --git a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiTileEntity.java b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiTileEntity.java index d601d8abd2..f5278d47b4 100644 --- a/src/main/java/gregtech/api/multitileentity/interfaces/IMultiTileEntity.java +++ b/src/main/java/gregtech/api/multitileentity/interfaces/IMultiTileEntity.java @@ -1,5 +1,7 @@ package gregtech.api.multitileentity.interfaces; +import static gregtech.api.enums.GT_Values.MOD_ID_APC; + import cpw.mods.fml.common.Optional; import gregtech.api.interfaces.tileentity.IBasicEnergyContainer; import gregtech.api.interfaces.tileentity.ICoverable; @@ -12,6 +14,9 @@ import gregtech.api.interfaces.tileentity.ITurnable; import gregtech.api.multitileentity.MultiTileEntityBlockInternal; import gregtech.api.multitileentity.MultiTileEntityItemInternal; import gregtech.api.multitileentity.MultiTileEntityRegistry; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; import net.minecraft.block.Block; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; @@ -26,18 +31,22 @@ import net.minecraft.world.Explosion; import net.minecraft.world.World; import net.minecraftforge.fluids.IFluidHandler; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - -import static gregtech.api.enums.GT_Values.MOD_ID_APC; - /* * Heavily inspired by GT6 */ -public interface IMultiTileEntity extends IHasWorldObjectAndCoords, ICoverable, ITurnable, IHasInventory, IEnergyConnected, IBasicEnergyContainer, IFluidHandler, ITexturedTileEntity, IDebugableTileEntity { +public interface IMultiTileEntity + extends IHasWorldObjectAndCoords, + ICoverable, + ITurnable, + IHasInventory, + IEnergyConnected, + IBasicEnergyContainer, + IFluidHandler, + ITexturedTileEntity, + IDebugableTileEntity { /** Those two IDs HAVE to be saved inside the NBT of the TileEntity itself. They get set by the Registry itself, when the TileEntity is placed. */ short getMultiTileEntityID(); + short getMultiTileEntityRegistryID(); /** Called by the Registry with the default NBT Parameters and the two IDs you have to save, when the TileEntity is created. aNBT may be null, take that into account if you decide to call the regular readFromNBT Function from here. */ void initFromNBT(NBTTagCompound aNBT, short aMTEID, short aMTERegistry); @@ -45,6 +54,7 @@ public interface IMultiTileEntity extends IHasWorldObjectAndCoords, ICoverable, NBTTagCompound writeItemNBT(NBTTagCompound aNBT); /** Sets the Item Display Name. Use null to reset it. */ void setCustomName(String aName); + String getCustomName(); /** return the internal Name of this TileEntity to be registered. */ @@ -61,21 +71,29 @@ public interface IMultiTileEntity extends IHasWorldObjectAndCoords, ICoverable, boolean isDead(); void loadTextureNBT(NBTTagCompound aNBT); + void copyTextures(); void issueClientUpdate(); - void sendClientData( EntityPlayerMP aPlayer); + + void sendClientData(EntityPlayerMP aPlayer); + boolean receiveClientEvent(int aEventID, int aValue); void setShouldRefresh(boolean aShouldRefresh); void addCollisionBoxesToList(AxisAlignedBB aAABB, List<AxisAlignedBB> aList, Entity aEntity); + AxisAlignedBB getCollisionBoundingBoxFromPool(); + AxisAlignedBB getSelectedBoundingBoxFromPool(); + void setBlockBoundsBasedOnState(Block aBlock); void onBlockAdded(); + boolean playerOwnsThis(EntityPlayer aPlayer, boolean aCheckPrecicely); + boolean privateAccess(); /** @return the amount of Time this TileEntity has been loaded. */ @@ -104,8 +122,11 @@ public interface IMultiTileEntity extends IHasWorldObjectAndCoords, ICoverable, * Paintable Support */ boolean unpaint(); + boolean isPainted(); + boolean paint(int aRGB); + int getPaint(); /** @@ -113,19 +134,28 @@ public interface IMultiTileEntity extends IHasWorldObjectAndCoords, ICoverable, * @return Whether the facing was changed */ boolean setMainFacing(byte aSide); + boolean isFacingValid(byte aFacing); - void onFacingChange(); - @Override default void setFrontFacing(byte aSide) { setMainFacing(aSide); } + void onFacingChange(); + @Override + default void setFrontFacing(byte aSide) { + setMainFacing(aSide); + } boolean shouldTriggerBlockUpdate(); + void onMachineBlockUpdate(); boolean allowInteraction(Entity aEntity); - default void onLeftClick(EntityPlayer aPlayer) { /* do nothing */ } + + default void onLeftClick(EntityPlayer aPlayer) { + /* do nothing */ + } boolean onBlockActivated(EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ); + boolean onRightClick(EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ); ArrayList<ItemStack> getDrops(int aFortune, boolean aSilkTouch); @@ -133,13 +163,16 @@ public interface IMultiTileEntity extends IHasWorldObjectAndCoords, ICoverable, boolean isSideSolid(byte aSide); float getExplosionResistance(Entity aExploder, double aExplosionX, double aExplosionY, double aExplosionZ); + float getExplosionResistance(); + void onExploded(Explosion aExplosion); boolean recolourBlock(byte aSide, byte aColor); /** Adds to the Creative Tab. return false to prevent it from being added. */ - boolean getSubItems(MultiTileEntityBlockInternal aBlock, Item aItem, CreativeTabs aTab, List<ItemStack> aList, short aID); + boolean getSubItems( + MultiTileEntityBlockInternal aBlock, Item aItem, CreativeTabs aTab, List<ItemStack> aList, short aID); ItemStack getPickBlock(MovingObjectPosition aTarget); @@ -147,9 +180,19 @@ public interface IMultiTileEntity extends IHasWorldObjectAndCoords, ICoverable, boolean isSurfaceOpaque(byte aSide); - boolean onPlaced(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, byte aSide, float aHitX, float aHitY, float aHitZ); + boolean onPlaced( + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + byte aSide, + float aHitX, + float aHitY, + float aHitZ); -// ItemStack getPickBlock(MovingObjectPosition aTarget); + // ItemStack getPickBlock(MovingObjectPosition aTarget); /* * Various Sub Interfaces from GT6 @@ -177,7 +220,6 @@ public interface IMultiTileEntity extends IHasWorldObjectAndCoords, ICoverable, boolean getWeakChanges(); } - interface IMTE_GetComparatorInputOverride extends IMultiTileEntity { int getComparatorInputOverride(byte aSide); } @@ -208,15 +250,34 @@ public interface IMultiTileEntity extends IHasWorldObjectAndCoords, ICoverable, interface IMTE_IgnoreEntityCollisionWhenPlacing extends IMultiTileEntity { /** Return true to ignore the Player standing in the way of placing this Block; useful for things like pipes/wires. */ - boolean ignoreEntityCollisionWhenPlacing(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, byte aSide, float aHitX, float aHitY, float aHitZ); + boolean ignoreEntityCollisionWhenPlacing( + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + byte aSide, + float aHitX, + float aHitY, + float aHitZ); } interface IMTE_CanPlace extends IMultiTileEntity { /** Return false if this TileEntity cannot be placed at that Location. */ - boolean canPlace(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, byte aSide, float aHitX, float aHitY, float aHitZ); + boolean canPlace( + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + byte aSide, + float aHitX, + float aHitY, + float aHitZ); } - interface IMTE_GetMaxStackSize extends IMultiTileEntity { /** Gets the Max Stacksize of this Item. */ byte getMaxStackSize(ItemStack aStack, byte aDefault); @@ -226,5 +287,4 @@ public interface IMultiTileEntity extends IHasWorldObjectAndCoords, ICoverable, /** Adds ToolTips to the Item. */ void addToolTips(List<String> aList, ItemStack aStack, boolean aF3_H); } - } diff --git a/src/main/java/gregtech/api/multitileentity/machine/MultiTileBasicMachine.java b/src/main/java/gregtech/api/multitileentity/machine/MultiTileBasicMachine.java index 9fcbaa235f..767026b286 100644 --- a/src/main/java/gregtech/api/multitileentity/machine/MultiTileBasicMachine.java +++ b/src/main/java/gregtech/api/multitileentity/machine/MultiTileBasicMachine.java @@ -1,5 +1,8 @@ package gregtech.api.multitileentity.machine; +import static com.google.common.primitives.Ints.saturatedCast; +import static gregtech.api.enums.GT_Values.emptyIconContainerArray; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.GT_Values.NBT; import gregtech.api.enums.Textures; @@ -8,7 +11,6 @@ import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.ITexture; import gregtech.api.multitileentity.MultiTileEntityRegistry; import gregtech.api.multitileentity.base.BaseTickableMultiTileEntity; -import gregtech.api.multitileentity.multiblock.base.MultiBlockPart; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Util; import gregtech.api.util.GT_Utility; @@ -21,10 +23,7 @@ import net.minecraft.tileentity.TileEntity; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidTank; -import static com.google.common.primitives.Ints.saturatedCast; -import static gregtech.api.enums.GT_Values.emptyIconContainerArray; - -public class MultiTileBasicMachine extends BaseTickableMultiTileEntity { +public class MultiTileBasicMachine extends BaseTickableMultiTileEntity { private static final String TEXTURE_LOCATION = "multitileentity/machines/"; public IIconContainer[] mTexturesInactive = emptyIconContainerArray; public IIconContainer[] mTexturesActive = emptyIconContainerArray; @@ -43,14 +42,13 @@ public class MultiTileBasicMachine extends BaseTickableMultiTileEntity { return "gt.multitileentity.machine.basic"; } - @Override public void writeMultiTileNBT(NBTTagCompound aNBT) { super.writeMultiTileNBT(aNBT); if (mParallel > 0) aNBT.setInteger(NBT.PARALLEL, mParallel); if (mActive) aNBT.setBoolean(NBT.ACTIVE, mActive); - } + @Override public void readMultiTileNBT(NBTTagCompound aNBT) { super.readMultiTileNBT(aNBT); @@ -58,7 +56,7 @@ public class MultiTileBasicMachine extends BaseTickableMultiTileEntity { if (aNBT.hasKey(NBT.ACTIVE)) mActive = aNBT.getBoolean(NBT.ACTIVE); mInventory = getDefaultInventory(aNBT); - if(mInventory != null) { + if (mInventory != null) { final NBTTagList tList = aNBT.getTagList(NBT.INV_LIST, 10); for (int i = 0; i < tList.tagCount(); i++) { final NBTTagCompound tNBT = tList.getCompoundTagAt(i); @@ -75,19 +73,25 @@ public class MultiTileBasicMachine extends BaseTickableMultiTileEntity { mOutputFluids = new FluidStack[getFluidOutputCount()]; mOutputItems = new ItemStack[getItemOutputCount()]; - // TODO: See if we need the adjustable map here `.setCapacity(mRecipes, mParallel * 2L)` in place of the `setCapacityMultiplier` - for (int i = 0; i < mTanksInput.length; i++) mTanksInput[i] = new FluidTankGT(tCapacity).setCapacityMultiplier(mParallel * 2L).readFromNBT(aNBT, NBT.TANK_IN + i); - for (int i = 0; i < mTanksOutput.length; i++) mTanksOutput[i] = new FluidTankGT().readFromNBT(aNBT, NBT.TANK_OUT + i); - for (int i = 0; i < mOutputFluids.length; i++) mOutputFluids[i] = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag(NBT.FLUID_OUT + "." + i)); - for (int i = 0; i < mOutputItems.length; i++) mOutputItems[i] = ItemStack.loadItemStackFromNBT(aNBT.getCompoundTag(NBT.INV_OUT + "." + i)); - + // TODO: See if we need the adjustable map here `.setCapacity(mRecipes, mParallel * 2L)` in place of the + // `setCapacityMultiplier` + for (int i = 0; i < mTanksInput.length; i++) + mTanksInput[i] = new FluidTankGT(tCapacity) + .setCapacityMultiplier(mParallel * 2L) + .readFromNBT(aNBT, NBT.TANK_IN + i); + for (int i = 0; i < mTanksOutput.length; i++) + mTanksOutput[i] = new FluidTankGT().readFromNBT(aNBT, NBT.TANK_OUT + i); + for (int i = 0; i < mOutputFluids.length; i++) + mOutputFluids[i] = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag(NBT.FLUID_OUT + "." + i)); + for (int i = 0; i < mOutputItems.length; i++) + mOutputItems[i] = ItemStack.loadItemStackFromNBT(aNBT.getCompoundTag(NBT.INV_OUT + "." + i)); } @Override public void loadTextureNBT(NBTTagCompound aNBT) { // Loading the registry final String textureName = aNBT.getString(NBT.TEXTURE); - mTextures = new IIconContainer[]{ + mTextures = new IIconContainer[] { new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/bottom"), new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/top"), new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/left"), @@ -95,7 +99,7 @@ public class MultiTileBasicMachine extends BaseTickableMultiTileEntity { new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/right"), new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/side") }; - mTexturesInactive = new IIconContainer[]{ + mTexturesInactive = new IIconContainer[] { new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/overlay/inactive/bottom"), new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/overlay/inactive/top"), new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/overlay/inactive/left"), @@ -103,7 +107,7 @@ public class MultiTileBasicMachine extends BaseTickableMultiTileEntity { new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/overlay/inactive/right"), new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/overlay/inactive/back") }; - mTexturesActive = new IIconContainer[]{ + mTexturesActive = new IIconContainer[] { new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/overlay/active/bottom"), new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/overlay/active/top"), new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/overlay/active/left"), @@ -111,38 +115,35 @@ public class MultiTileBasicMachine extends BaseTickableMultiTileEntity { new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/overlay/active/right"), new Textures.BlockIcons.CustomIcon(TEXTURE_LOCATION + textureName + "/overlay/active/back") }; - } @Override public void copyTextures() { // Loading an instance - final TileEntity tCanonicalTileEntity = MultiTileEntityRegistry.getCanonicalTileEntity(getMultiTileEntityRegistryID(), getMultiTileEntityID()); - if(tCanonicalTileEntity instanceof MultiTileBasicMachine){ - mTextures = ((MultiTileBasicMachine)tCanonicalTileEntity).mTextures; - mTexturesInactive = ((MultiTileBasicMachine)tCanonicalTileEntity).mTexturesInactive; - mTexturesActive = ((MultiTileBasicMachine)tCanonicalTileEntity).mTexturesActive; + final TileEntity tCanonicalTileEntity = + MultiTileEntityRegistry.getCanonicalTileEntity(getMultiTileEntityRegistryID(), getMultiTileEntityID()); + if (tCanonicalTileEntity instanceof MultiTileBasicMachine) { + mTextures = ((MultiTileBasicMachine) tCanonicalTileEntity).mTextures; + mTexturesInactive = ((MultiTileBasicMachine) tCanonicalTileEntity).mTexturesInactive; + mTexturesActive = ((MultiTileBasicMachine) tCanonicalTileEntity).mTexturesActive; } else { mTextures = mTexturesInactive = mTexturesActive = emptyIconContainerArray; } } - - @Override public ITexture[] getTexture(Block aBlock, byte aSide, boolean isActive, int aRenderPass) { - return new ITexture[]{ + return new ITexture[] { TextureFactory.of(mTextures[GT_Values.FACING_ROTATIONS[mFacing][aSide]], GT_Util.getRGBaArray(mRGBa)), - TextureFactory.of((mActive ? mTexturesActive : mTexturesInactive)[GT_Values.FACING_ROTATIONS[mFacing][aSide]]) + TextureFactory.of( + (mActive ? mTexturesActive : mTexturesInactive)[GT_Values.FACING_ROTATIONS[mFacing][aSide]]) }; } - /* * Fluids */ - /** * The number of fluid (input) slots available for this machine */ @@ -162,29 +163,26 @@ public class MultiTileBasicMachine extends BaseTickableMultiTileEntity { return tSize > 0 ? new ItemStack[tSize] : GT_Values.emptyItemStackArray; } - @Override - public void setLightValue(byte aLightValue) { - - } + public void setLightValue(byte aLightValue) {} @Override public String getInventoryName() { final String name = getCustomName(); - if(name != null) return name; + if (name != null) return name; final MultiTileEntityRegistry tRegistry = MultiTileEntityRegistry.getRegistry(getMultiTileEntityRegistryID()); return tRegistry == null ? getClass().getName() : tRegistry.getLocal(getMultiTileEntityID()); } - @Override public boolean isUseableByPlayer(EntityPlayer aPlayer) { - return playerOwnsThis(aPlayer, false) && mTickTimer > 40 && - getTileEntityOffset(0, 0, 0) == this && - aPlayer.getDistanceSq(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5) < 64 && allowInteraction(aPlayer); + return playerOwnsThis(aPlayer, false) + && mTickTimer > 40 + && getTileEntityOffset(0, 0, 0) == this + && aPlayer.getDistanceSq(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5) < 64 + && allowInteraction(aPlayer); } - @Override public boolean isLiquidInput(byte aSide) { return aSide != mFacing; @@ -195,20 +193,19 @@ public class MultiTileBasicMachine extends BaseTickableMultiTileEntity { return aSide != mFacing; } - @Override protected IFluidTank[] getFluidTanks(byte aSide) { final boolean fluidInput = isLiquidInput(aSide); final boolean fluidOutput = isLiquidOutput(aSide); - if(fluidInput && fluidOutput) { - final IFluidTank[] rTanks = new IFluidTank[ mTanksInput.length + mTanksOutput.length]; + if (fluidInput && fluidOutput) { + final IFluidTank[] rTanks = new IFluidTank[mTanksInput.length + mTanksOutput.length]; System.arraycopy(mTanksInput, 0, rTanks, 0, mTanksInput.length); System.arraycopy(mTanksOutput, 0, rTanks, mTanksInput.length, mTanksOutput.length); return rTanks; - } else if(fluidInput) { + } else if (fluidInput) { return mTanksInput; - } else if(fluidOutput) { + } else if (fluidOutput) { return mTanksOutput; } return GT_Values.emptyFluidTank; @@ -216,19 +213,19 @@ public class MultiTileBasicMachine extends BaseTickableMultiTileEntity { @Override public IFluidTank getFluidTankFillable(byte aSide, FluidStack aFluidToFill) { - if(!isLiquidInput(aSide)) return null; + if (!isLiquidInput(aSide)) return null; for (FluidTankGT tankGT : mTanksInput) if (tankGT.contains(aFluidToFill)) return tankGT; -// if (!mRecipes.containsInput(aFluidToFill, this, slot(mRecipes.mInputItemsCount + mRecipes.mOutputItemsCount))) return null; + // if (!mRecipes.containsInput(aFluidToFill, this, slot(mRecipes.mInputItemsCount + + // mRecipes.mOutputItemsCount))) return null; for (FluidTankGT fluidTankGT : mTanksInput) if (fluidTankGT.isEmpty()) return fluidTankGT; return null; } @Override protected IFluidTank getFluidTankDrainable(byte aSide, FluidStack aFluidToDrain) { - if(!isLiquidOutput(aSide)) return null; + if (!isLiquidOutput(aSide)) return null; for (FluidTankGT fluidTankGT : mTanksOutput) - if (aFluidToDrain == null ? fluidTankGT.has() : fluidTankGT.contains(aFluidToDrain)) - return fluidTankGT; + if (aFluidToDrain == null ? fluidTankGT.has() : fluidTankGT.contains(aFluidToDrain)) return fluidTankGT; return null; } @@ -282,7 +279,6 @@ public class MultiTileBasicMachine extends BaseTickableMultiTileEntity { return 1; } - public boolean isEnergyInputSide(byte aSide) { return true; } @@ -295,8 +291,9 @@ public class MultiTileBasicMachine extends BaseTickableMultiTileEntity { public boolean inputEnergyFrom(byte aSide) { if (aSide == GT_Values.SIDE_UNKNOWN) return true; if (aSide >= 0 && aSide < 6) { - if(isInvalid()) return false; - if (!getCoverBehaviorAtSideNew(aSide).letsEnergyIn(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this)) return false; + if (isInvalid()) return false; + if (!getCoverBehaviorAtSideNew(aSide) + .letsEnergyIn(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this)) return false; if (isEnetInput()) return isEnergyInputSide(aSide); } return false; @@ -307,7 +304,9 @@ public class MultiTileBasicMachine extends BaseTickableMultiTileEntity { if (aSide == GT_Values.SIDE_UNKNOWN) return true; if (aSide >= 0 && aSide < 6) { if (isInvalid()) return false; - if (!getCoverBehaviorAtSideNew(aSide).letsEnergyOut(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this)) return false; + if (!getCoverBehaviorAtSideNew(aSide) + .letsEnergyOut(aSide, getCoverIDAtSide(aSide), getComplexCoverDataAtSide(aSide), this)) + return false; if (isEnetOutput()) return isEnergyOutputSide(aSide); } return false; @@ -317,7 +316,8 @@ public class MultiTileBasicMachine extends BaseTickableMultiTileEntity { * Inventory */ - @Override public boolean hasInventoryBeenModified() { + @Override + public boolean hasInventoryBeenModified() { return mInventoryChanged; } @@ -344,5 +344,4 @@ public class MultiTileBasicMachine extends BaseTickableMultiTileEntity { public int getItemOutputCount() { return 2; } - } diff --git a/src/main/java/gregtech/api/multitileentity/multiblock/base/MultiBlockController.java b/src/main/java/gregtech/api/multitileentity/multiblock/base/MultiBlockController.java index afd8f9577f..bb01f0b4fa 100644 --- a/src/main/java/gregtech/api/multitileentity/multiblock/base/MultiBlockController.java +++ b/src/main/java/gregtech/api/multitileentity/multiblock/base/MultiBlockController.java @@ -1,5 +1,8 @@ package gregtech.api.multitileentity.multiblock.base; +import static gregtech.GT_Mod.GT_FML_LOGGER; +import static gregtech.api.enums.GT_Values.NBT; + import com.gtnewhorizon.structurelib.StructureLibAPI; import com.gtnewhorizon.structurelib.alignment.IAlignment; import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; @@ -29,12 +32,16 @@ import gregtech.api.multitileentity.machine.MultiTileBasicMachine; import gregtech.api.objects.GT_ItemStack; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Utility; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; -import net.minecraft.util.Tuple; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; @@ -45,26 +52,23 @@ import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.commons.lang3.tuple.Pair; import org.lwjgl.input.Keyboard; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -import static gregtech.GT_Mod.GT_FML_LOGGER; -import static gregtech.api.enums.GT_Values.NBT; - public abstract class MultiBlockController<T extends MultiBlockController<T>> extends MultiTileBasicMachine - implements IAlignment, IConstructable, IMultiBlockController, IDescribable, IMachineProgress, IMultiBlockFluidHandler, IMultiBlockInventory, IMTE_AddToolTips -{ + implements IAlignment, + IConstructable, + IMultiBlockController, + IDescribable, + IMachineProgress, + IMultiBlockFluidHandler, + IMultiBlockInventory, + IMTE_AddToolTips { private static final Map<Integer, GT_Multiblock_Tooltip_Builder> tooltip = new ConcurrentHashMap<>(); protected BuildState buildState = new BuildState(); - // The 0th slot is the default inventory of the MultiBlock; any other has been added by an Inventory Extender of sorts + // The 0th slot is the default inventory of the MultiBlock; any other has been added by an Inventory Extender of + // sorts protected List<ItemStack[]> multiBlockInventory = new ArrayList<>(); - private int mMaxProgresstime = 0, mProgresstime = 0; private boolean mStructureOkay = false, mStructureChanged = false; private boolean mWorks = true, mWorkUpdate = false, mWasShutdown = false, mActive = false; @@ -76,7 +80,6 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex /** Meta ID of the required casing */ public abstract short getCasingMeta(); - /** * Create the tooltip for this multi block controller. */ @@ -106,7 +109,6 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex */ public abstract boolean checkRecipe(ItemStack aStack); - @Override public void writeMultiTileNBT(NBTTagCompound aNBT) { super.writeMultiTileNBT(aNBT); @@ -120,16 +122,16 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex public void readMultiTileNBT(NBTTagCompound aNBT) { super.readMultiTileNBT(aNBT); - // Multiblock inventories are a collection of inventories. The first inventory is the default internal inventory, + // Multiblock inventories are a collection of inventories. The first inventory is the default internal + // inventory, // and the others are added by inventory extending blocks. - if(mInventory != null) multiBlockInventory.add(mInventory); + if (mInventory != null) multiBlockInventory.add(mInventory); mStructureOkay = aNBT.getBoolean(NBT.STRUCTURE_OK); mExtendedFacing = ExtendedFacing.of( - ForgeDirection.getOrientation(getFrontFacing()), - Rotation.byIndex(aNBT.getByte(NBT.ROTATION)), - Flip.byIndex(aNBT.getByte(NBT.FLIP)) - ); + ForgeDirection.getOrientation(getFrontFacing()), + Rotation.byIndex(aNBT.getByte(NBT.ROTATION)), + Flip.byIndex(aNBT.getByte(NBT.FLIP))); } @Override @@ -157,18 +159,17 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex protected GT_Multiblock_Tooltip_Builder getTooltip() { return createTooltip(); -// final int tooltipId = getToolTipID(); -// final GT_Multiblock_Tooltip_Builder tt = tooltip.get(tooltipId); -// if (tt == null) { -// return tooltip.computeIfAbsent(tooltipId, k -> createTooltip()); -// } -// return tt; + // final int tooltipId = getToolTipID(); + // final GT_Multiblock_Tooltip_Builder tt = tooltip.get(tooltipId); + // if (tt == null) { + // return tooltip.computeIfAbsent(tooltipId, k -> createTooltip()); + // } + // return tt; } - @Override public boolean checkStructure(boolean aForceReset) { - if(!isServerSide()) return mStructureOkay; + if (!isServerSide()) return mStructureOkay; // Only trigger an update if forced (from onPostTick, generally), or if the structure has changed if ((mStructureChanged || aForceReset)) { @@ -199,21 +200,46 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex * All these offsets can be negative. */ protected final boolean checkPiece(String piece, int horizontalOffset, int verticalOffset, int depthOffset) { - return getCastedStructureDefinition().check( - this, piece, getWorld(), getExtendedFacing(), getXCoord(), getYCoord(), getZCoord(), horizontalOffset, verticalOffset, - depthOffset, !mStructureOkay - ); + return getCastedStructureDefinition() + .check( + this, + piece, + getWorld(), + getExtendedFacing(), + getXCoord(), + getYCoord(), + getZCoord(), + horizontalOffset, + verticalOffset, + depthOffset, + !mStructureOkay); } public final boolean buildPiece(String piece, ItemStack trigger, boolean hintsOnly, Vec3Impl offset) { return buildPiece(piece, trigger, hintsOnly, offset.get0(), offset.get1(), offset.get2()); } - protected final boolean buildPiece(String piece, ItemStack trigger, boolean hintOnly, int horizontalOffset, int verticalOffset, int depthOffset) { - return getCastedStructureDefinition().buildOrHints( - this, trigger, piece, getWorld(), getExtendedFacing(), getXCoord(), getYCoord(), getZCoord(), horizontalOffset, - verticalOffset, depthOffset, hintOnly - ); + protected final boolean buildPiece( + String piece, + ItemStack trigger, + boolean hintOnly, + int horizontalOffset, + int verticalOffset, + int depthOffset) { + return getCastedStructureDefinition() + .buildOrHints( + this, + trigger, + piece, + getWorld(), + getExtendedFacing(), + getXCoord(), + getYCoord(), + getZCoord(), + horizontalOffset, + verticalOffset, + depthOffset, + hintOnly); } @SuppressWarnings("unchecked") @@ -230,13 +256,14 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex public void setExtendedFacing(ExtendedFacing newExtendedFacing) { if (mExtendedFacing != newExtendedFacing) { onStructureChange(); - if (mStructureOkay) - stopMachine(); + if (mStructureOkay) stopMachine(); mExtendedFacing = newExtendedFacing; mStructureOkay = false; if (isServerSide()) { StructureLibAPI.sendAlignment( - this, new NetworkRegistry.TargetPoint(getWorld().provider.dimensionId, getXCoord(), getYCoord(), getZCoord(), 512)); + this, + new NetworkRegistry.TargetPoint( + getWorld().provider.dimensionId, getXCoord(), getYCoord(), getZCoord(), 512)); } else { issueTextureUpdate(); } @@ -244,11 +271,13 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex } @Override - public boolean onWrenchRightClick(EntityPlayer aPlayer, ItemStack tCurrentItem, byte wrenchSide, float aX, float aY, float aZ) { + public boolean onWrenchRightClick( + EntityPlayer aPlayer, ItemStack tCurrentItem, byte wrenchSide, float aX, float aY, float aZ) { if (wrenchSide != getFrontFacing()) return super.onWrenchRightClick(aPlayer, tCurrentItem, wrenchSide, aX, aY, aZ); if (aPlayer.isSneaking()) { - // we won't be allowing horizontal flips, as it can be perfectly emulated by rotating twice and flipping horizontally + // we won't be allowing horizontal flips, as it can be perfectly emulated by rotating twice and flipping + // horizontally // allowing an extra round of flip make it hard to draw meaningful flip markers in GT_Proxy#drawGrid toolSetFlip(getFlip().isHorizontallyFlipped() ? Flip.NONE : Flip.HORIZONTAL); } else { @@ -260,10 +289,8 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex @Override public void onFirstTick(boolean aIsServerSide) { super.onFirstTick(aIsServerSide); - if (aIsServerSide) - checkStructure(true); - else - StructureLibAPI.queryAlignment(this); + if (aIsServerSide) checkStructure(true); + else StructureLibAPI.queryAlignment(this); } @Override @@ -325,8 +352,7 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex @Override public FluidStack getDrainableFluid(byte aSide) { final IFluidTank tank = getFluidTankDrainable(aSide, null); - return tank == null ? null : tank.getFluid(); - + return tank == null ? null : tank.getFluid(); } /** @@ -393,6 +419,7 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex * Utility class to keep track of the build state of a multiblock */ boolean building = false; + Vec3Impl currentOffset; public void startBuilding(Vec3Impl structureOffset) { @@ -437,7 +464,7 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex public <S> IStructureElement<S> addMultiTileCasing(int aRegistryID, int aBlockMeta, int aModes) { return new IStructureElement<S>() { - private final short[] DEFAULT = new short[]{255, 255, 255, 0}; + private final short[] DEFAULT = new short[] {255, 255, 255, 0}; private IIcon[] mIcons = null; @Override @@ -446,7 +473,8 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex if (!(tileEntity instanceof MultiBlockPart)) return false; final MultiBlockPart part = (MultiBlockPart) tileEntity; - if (aRegistryID != part.getMultiTileEntityRegistryID() || aBlockMeta != part.getMultiTileEntityID()) return false; + if (aRegistryID != part.getMultiTileEntityRegistryID() || aBlockMeta != part.getMultiTileEntityID()) + return false; final IMultiBlockController tTarget = part.getTarget(false); if (tTarget != null && tTarget != MultiBlockController.this) return false; @@ -460,27 +488,28 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex if (mIcons == null) { mIcons = new IIcon[6]; Arrays.fill(mIcons, TextureSet.SET_NONE.mTextures[OrePrefixes.block.mTextureIndex].getIcon()); -// Arrays.fill(mIcons, getTexture(aCasing); -// for (int i = 0; i < 6; i++) { -// mIcons[i] = aCasing.getIcon(i, aMeta); -// } + // Arrays.fill(mIcons, getTexture(aCasing); + // for (int i = 0; i < 6; i++) { + // mIcons[i] = aCasing.getIcon(i, aMeta); + // } } final short[] RGBA = DEFAULT; StructureLibAPI.hintParticleTinted(world, x, y, z, mIcons, RGBA); -// StructureLibAPI.hintParticle(world, x, y, z, aCasing, aMeta); + // StructureLibAPI.hintParticle(world, x, y, z, aCasing, aMeta); return true; } @Override public boolean placeBlock(S t, World world, int x, int y, int z, ItemStack trigger) { final MultiTileEntityRegistry tRegistry = MultiTileEntityRegistry.getRegistry(aRegistryID); - final MultiTileEntityContainer tContainer = tRegistry.getNewTileEntityContainer(world, x, y, z, aBlockMeta, null); - if(tContainer == null) { + final MultiTileEntityContainer tContainer = + tRegistry.getNewTileEntityContainer(world, x, y, z, aBlockMeta, null); + if (tContainer == null) { GT_FML_LOGGER.error("NULL CONTAINER"); return false; } - final IMultiTileEntity te = ((IMultiTileEntity)tContainer.mTileEntity); - if(!(te instanceof MultiBlockPart)) { + final IMultiTileEntity te = ((IMultiTileEntity) tContainer.mTileEntity); + if (!(te instanceof MultiBlockPart)) { GT_FML_LOGGER.error("Not a multiblock part"); return false; } @@ -501,15 +530,22 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex /** * Fluid - MultiBlock related Fluid Tank behaviour. */ + protected IFluidTank getFluidTankFillable(MultiBlockPart aPart, byte aSide, FluidStack aFluidToFill) { + return getFluidTankFillable(aSide, aFluidToFill); + } - protected IFluidTank getFluidTankFillable(MultiBlockPart aPart, byte aSide, FluidStack aFluidToFill) {return getFluidTankFillable(aSide, aFluidToFill);} - protected IFluidTank getFluidTankDrainable(MultiBlockPart aPart, byte aSide, FluidStack aFluidToDrain) {return getFluidTankDrainable(aSide, aFluidToDrain);} - protected IFluidTank[] getFluidTanks(MultiBlockPart aPart, byte aSide) {return getFluidTanks(aSide);} + protected IFluidTank getFluidTankDrainable(MultiBlockPart aPart, byte aSide, FluidStack aFluidToDrain) { + return getFluidTankDrainable(aSide, aFluidToDrain); + } + + protected IFluidTank[] getFluidTanks(MultiBlockPart aPart, byte aSide) { + return getFluidTanks(aSide); + } @Override public int fill(MultiBlockPart aPart, ForgeDirection aDirection, FluidStack aFluid, boolean aDoFill) { if (aFluid == null || aFluid.amount <= 0) return 0; - final IFluidTank tTank = getFluidTankFillable(aPart, (byte)aDirection.ordinal(), aFluid); + final IFluidTank tTank = getFluidTankFillable(aPart, (byte) aDirection.ordinal(), aFluid); if (tTank == null) return 0; final int rFilledAmount = tTank.fill(aFluid, aDoFill); if (rFilledAmount > 0 && aDoFill) mInventoryChanged = true; @@ -519,8 +555,11 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex @Override public FluidStack drain(MultiBlockPart aPart, ForgeDirection aDirection, FluidStack aFluid, boolean aDoDrain) { if (aFluid == null || aFluid.amount <= 0) return null; - final IFluidTank tTank = getFluidTankDrainable(aPart, (byte)aDirection.ordinal(), aFluid); - if (tTank == null || tTank.getFluid() == null || tTank.getFluidAmount() == 0 || !tTank.getFluid().isFluidEqual(aFluid)) return null; + final IFluidTank tTank = getFluidTankDrainable(aPart, (byte) aDirection.ordinal(), aFluid); + if (tTank == null + || tTank.getFluid() == null + || tTank.getFluidAmount() == 0 + || !tTank.getFluid().isFluidEqual(aFluid)) return null; final FluidStack rDrained = tTank.drain(aFluid.amount, aDoDrain); if (rDrained != null && aDoDrain) markInventoryBeenModified(); return rDrained; @@ -529,7 +568,7 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex @Override public FluidStack drain(MultiBlockPart aPart, ForgeDirection aDirection, int aAmountToDrain, boolean aDoDrain) { if (aAmountToDrain <= 0) return null; - final IFluidTank tTank = getFluidTankDrainable(aPart, (byte)aDirection.ordinal(), null); + final IFluidTank tTank = getFluidTankDrainable(aPart, (byte) aDirection.ordinal(), null); if (tTank == null || tTank.getFluid() == null || tTank.getFluidAmount() == 0) return null; final FluidStack rDrained = tTank.drain(aAmountToDrain, aDoDrain); if (rDrained != null && aDoDrain) markInventoryBeenModified(); @@ -539,20 +578,20 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex @Override public boolean canFill(MultiBlockPart aPart, ForgeDirection aDirection, Fluid aFluid) { if (aFluid == null) return false; - final IFluidTank tTank = getFluidTankFillable(aPart, (byte)aDirection.ordinal(), new FluidStack(aFluid, 0)); + final IFluidTank tTank = getFluidTankFillable(aPart, (byte) aDirection.ordinal(), new FluidStack(aFluid, 0)); return tTank != null && (tTank.getFluid() == null || tTank.getFluid().getFluid() == aFluid); } @Override public boolean canDrain(MultiBlockPart aPart, ForgeDirection aDirection, Fluid aFluid) { if (aFluid == null) return false; - final IFluidTank tTank = getFluidTankDrainable(aPart, (byte)aDirection.ordinal(), new FluidStack(aFluid, 0)); + final IFluidTank tTank = getFluidTankDrainable(aPart, (byte) aDirection.ordinal(), new FluidStack(aFluid, 0)); return tTank != null && (tTank.getFluid() != null && tTank.getFluid().getFluid() == aFluid); } @Override public FluidTankInfo[] getTankInfo(MultiBlockPart aPart, ForgeDirection aDirection) { - final IFluidTank[] tTanks = getFluidTanks(aPart, (byte)aDirection.ordinal()); + final IFluidTank[] tTanks = getFluidTanks(aPart, (byte) aDirection.ordinal()); if (tTanks == null || tTanks.length <= 0) return GT_Values.emptyFluidTankInfo; final FluidTankInfo[] rInfo = new FluidTankInfo[tTanks.length]; for (int i = 0; i < tTanks.length; i++) rInfo[i] = new FluidTankInfo(tTanks[i]); @@ -562,7 +601,6 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex /** * Energy - MultiBlock related Energy behavior */ - @Override public boolean isUniversalEnergyStored(MultiBlockPart aPart, long aEnergyAmount) { return getUniversalEnergyStored(aPart) >= aEnergyAmount; @@ -642,7 +680,7 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex public boolean inputEnergyFrom(MultiBlockPart aPart, byte aSide) { if (aSide == GT_Values.SIDE_UNKNOWN) return true; if (aSide >= 0 && aSide < 6) { - if(isInvalid()) return false; + if (isInvalid()) return false; if (isEnetInput()) return isEnergyInputSide(aSide); } return false; @@ -661,8 +699,6 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex /** * Item - MultiBlock related Item behaviour. */ - - @Override public boolean hasInventoryBeenModified(MultiBlockPart aPart) { // TODO: MultiInventory - Figure this out based on locked & the part @@ -688,7 +724,7 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex if (lockedInventory != -1) return new ImmutablePair<>(multiBlockInventory.get(lockedInventory), aSlot); int start = 0; - for(ItemStack[] inv : multiBlockInventory) { + for (ItemStack[] inv : multiBlockInventory) { if (aSlot > start && aSlot < start + inv.length) { return new ImmutablePair<>(inv, aSlot - start); } @@ -703,42 +739,43 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex final int lockedInventory = aPart.getLockedInventory(); int start = 0; - if(lockedInventory == -1) { + if (lockedInventory == -1) { for (ItemStack[] inv : multiBlockInventory) { for (int i = start; i < inv.length + start; i++) tList.add(i); start += inv.length; } } else { final int len = multiBlockInventory.get(lockedInventory).length; - for(int i = 0; i < len ; i++) tList.add(i); + for (int i = 0; i < len; i++) tList.add(i); } return tList.toArray(); } - @Override public boolean canInsertItem(MultiBlockPart aPart, int aSlot, ItemStack aStack, byte aSide) { final int lockedInventory = aPart.getLockedInventory(), tSlot; final ItemStack[] inv; - if(lockedInventory == -1) { + if (lockedInventory == -1) { final Pair<ItemStack[], Integer> tInv = getInventory(lockedInventory, aSlot); - if(tInv == null) return false; + if (tInv == null) return false; inv = tInv.getLeft(); tSlot = tInv.getRight(); } else { inv = multiBlockInventory.get(lockedInventory); tSlot = aSlot; } - return inv[tSlot] == null || GT_Utility.areStacksEqual(aStack, inv[tSlot]); //&& allowPutStack(getBaseMetaTileEntity(), aIndex, (byte) aSide, aStack) + return inv[tSlot] == null + || GT_Utility.areStacksEqual( + aStack, inv[tSlot]); // && allowPutStack(getBaseMetaTileEntity(), aIndex, (byte) aSide, aStack) } @Override public boolean canExtractItem(MultiBlockPart aPart, int aSlot, ItemStack aStack, byte aSide) { final int lockedInventory = aPart.getLockedInventory(), tSlot; final ItemStack[] inv; - if(lockedInventory == -1) { + if (lockedInventory == -1) { final Pair<ItemStack[], Integer> tInv = getInventory(lockedInventory, aSlot); - if(tInv == null) return false; + if (tInv == null) return false; inv = tInv.getLeft(); tSlot = tInv.getRight(); } else { @@ -751,7 +788,7 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex @Override public int getSizeInventory(MultiBlockPart aPart) { final int lockedInventory = aPart.getLockedInventory(); - if(lockedInventory == -1) { + if (lockedInventory == -1) { int len = 0; for (ItemStack[] inv : multiBlockInventory) len += inv.length; return len; @@ -764,9 +801,9 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex public ItemStack getStackInSlot(MultiBlockPart aPart, int aSlot) { final int lockedInventory = aPart.getLockedInventory(), tSlot; final ItemStack[] inv; - if(lockedInventory == -1) { + if (lockedInventory == -1) { final Pair<ItemStack[], Integer> tInv = getInventory(lockedInventory, aSlot); - if(tInv == null) return null; + if (tInv == null) return null; inv = tInv.getLeft(); tSlot = tInv.getRight(); } else { @@ -785,8 +822,7 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex setInventorySlotContents(aSlot, null); } else { rStack = tStack.splitStack(aDecrement); - if (tStack.stackSize == 0) - setInventorySlotContents(aSlot, null); + if (tStack.stackSize == 0) setInventorySlotContents(aSlot, null); } } return rStack; @@ -833,7 +869,8 @@ public abstract class MultiBlockController<T extends MultiBlockController<T>> ex @Override public void markDirty(MultiBlockPart aPart) { // TODO: MultiInventory - Consider the part? - markDirty(); markInventoryBeenModified(); + markDirty(); + markInventoryBeenModified(); } @Override diff --git a/src/main/java/gregtech/api/multitileentity/multiblock/base/MultiBlockPart.java b/src/main/java/gregtech/api/multitileentity/multiblock/base/MultiBlockPart.java index 6c36798197..628992a931 100644 --- a/src/main/java/gregtech/api/multitileentity/multiblock/base/MultiBlockPart.java +++ b/src/main/java/gregtech/api/multitileentity/multiblock/base/MultiBlockPart.java @@ -1,20 +1,36 @@ package gregtech.api.multitileentity.multiblock.base; +import static com.google.common.math.LongMath.log2; +import static gregtech.api.enums.GT_Values.ALL_VALID_SIDES; +import static gregtech.api.enums.GT_Values.B; +import static gregtech.api.enums.GT_Values.NBT; +import static gregtech.api.enums.GT_Values.SIDE_UNKNOWN; +import static gregtech.api.enums.Textures.BlockIcons.FLUID_IN_SIGN; +import static gregtech.api.enums.Textures.BlockIcons.FLUID_OUT_SIGN; +import static gregtech.api.enums.Textures.BlockIcons.ITEM_IN_SIGN; +import static gregtech.api.enums.Textures.BlockIcons.ITEM_OUT_SIGN; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ENERGY_IN_MULTI; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ENERGY_OUT_MULTI; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_IN; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_OUT; +import static org.apache.commons.lang3.ObjectUtils.firstNonNull; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.ITexture; import gregtech.api.multitileentity.MultiTileEntityRegistry; -import gregtech.api.multitileentity.base.BaseMultiTileEntity; import gregtech.api.multitileentity.base.BaseNontickableMultiTileEntity; import gregtech.api.multitileentity.interfaces.IMultiBlockController; import gregtech.api.multitileentity.interfaces.IMultiTileEntity.IMTE_BreakBlock; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_CoverBehaviorBase; -import gregtech.api.util.GT_Util; import gregtech.api.util.GT_Utility; import gregtech.api.util.ISerializableObject; -import gregtech.common.render.GT_MultiTexture; +import java.math.RoundingMode; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; import net.minecraft.block.Block; @@ -29,44 +45,23 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; -import java.math.RoundingMode; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import static com.google.common.math.LongMath.log2; -import static gregtech.api.enums.GT_Values.ALL_VALID_SIDES; -import static gregtech.api.enums.GT_Values.B; -import static gregtech.api.enums.GT_Values.NBT; -import static gregtech.api.enums.GT_Values.SIDE_UNKNOWN; -import static gregtech.api.enums.Textures.BlockIcons.FLUID_IN_SIGN; -import static gregtech.api.enums.Textures.BlockIcons.FLUID_OUT_SIGN; -import static gregtech.api.enums.Textures.BlockIcons.ITEM_IN_SIGN; -import static gregtech.api.enums.Textures.BlockIcons.ITEM_OUT_SIGN; -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ENERGY_IN_MULTI; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ENERGY_OUT_MULTI; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_IN; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_OUT; -import static org.apache.commons.lang3.ObjectUtils.firstNonNull; - public class MultiBlockPart extends BaseNontickableMultiTileEntity implements IMTE_BreakBlock { - public static final int - NOTHING = 0, - ENERGY_IN = B[0], - ENERGY_OUT = B[1], - FLUID_IN = B[2], - FLUID_OUT = B[3], - ITEM_IN = B[4], - ITEM_OUT = B[5]; + public static final int NOTHING = 0, + ENERGY_IN = B[0], + ENERGY_OUT = B[1], + FLUID_IN = B[2], + FLUID_OUT = B[3], + ITEM_IN = B[4], + ITEM_OUT = B[5]; - protected final List<Integer> BASIC_MODES = new ArrayList<>(Arrays.asList(NOTHING, ENERGY_IN, ENERGY_OUT, FLUID_IN, FLUID_OUT, ITEM_IN, ITEM_OUT)); + protected final List<Integer> BASIC_MODES = + new ArrayList<>(Arrays.asList(NOTHING, ENERGY_IN, ENERGY_OUT, FLUID_IN, FLUID_OUT, ITEM_IN, ITEM_OUT)); protected ChunkCoordinates mTargetPos = null; protected IMultiBlockController mTarget = null; - protected int mAllowedModes = NOTHING; // BITMASK - Modes allowed for this part - protected byte mMode = 0; // Mode selected for this part + protected int mAllowedModes = NOTHING; // BITMASK - Modes allowed for this part + protected byte mMode = 0; // Mode selected for this part /** * What Part Tier is this part? All Basic Casings are Tier 1, and will allow: @@ -89,7 +84,7 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity implements IM @Override protected void addDebugInfo(EntityPlayer aPlayer, int aLogLevel, ArrayList<String> tList) { final IMultiBlockController controller = getTarget(false); - if(controller != null) { + if (controller != null) { tList.add("Has controller"); } else { tList.add("No Controller"); @@ -98,7 +93,8 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity implements IM } @Override - public void getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { + public void getWailaBody( + ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { super.getWailaBody(itemStack, currenttip, accessor, config); currenttip.add(String.format("Mode: %s", getModeName(mMode))); } @@ -109,17 +105,15 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity implements IM if (worldObj.blockExists(mTargetPos.posX, mTargetPos.posY, mTargetPos.posZ)) { final TileEntity te = worldObj.getTileEntity(mTargetPos.posX, mTargetPos.posY, mTargetPos.posZ); if (te instanceof IMultiBlockController) { - mTarget = (IMultiBlockController)te; + mTarget = (IMultiBlockController) te; } else { mTargetPos = null; } } } - if(aCheckValidity) { + if (aCheckValidity) { return mTarget != null && mTarget.checkStructure(false) ? mTarget : null; - } - else - return mTarget; + } else return mTarget; } @Override @@ -127,9 +121,9 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity implements IM if (aNBT.hasKey(NBT.ALLOWED_MODES)) mAllowedModes = aNBT.getInteger(NBT.ALLOWED_MODES); if (aNBT.hasKey(NBT.MODE)) mMode = aNBT.getByte(NBT.MODE); if (aNBT.hasKey(NBT.TARGET)) { - mTargetPos = new ChunkCoordinates(aNBT.getInteger(NBT.TARGET_X), aNBT.getShort(NBT.TARGET_Y), aNBT.getInteger(NBT.TARGET_Z)); + mTargetPos = new ChunkCoordinates( + aNBT.getInteger(NBT.TARGET_X), aNBT.getShort(NBT.TARGET_Y), aNBT.getInteger(NBT.TARGET_Z)); } - } @Override @@ -139,7 +133,7 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity implements IM if (mTargetPos != null) { aNBT.setBoolean(NBT.TARGET, true); aNBT.setInteger(NBT.TARGET_X, mTargetPos.posX); - aNBT.setShort(NBT.TARGET_Y, (short)mTargetPos.posY); + aNBT.setShort(NBT.TARGET_Y, (short) mTargetPos.posY); aNBT.setInteger(NBT.TARGET_Z, mTargetPos.posZ); } } @@ -155,9 +149,8 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity implements IM * Returns true if the part has any of the modes provided, and that mode is the currently selected mode */ public boolean modeSelected(int... aModes) { - for(int aMode : aModes) { - if (hasMode(aMode) && mMode == getModeOrdinal(aMode)) - return true; + for (int aMode : aModes) { + if (hasMode(aMode) && mMode == getModeOrdinal(aMode)) return true; } return false; } @@ -174,10 +167,10 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity implements IM for (byte tSide : ALL_VALID_SIDES) { final TileEntity te = getTileEntityAtSide(tSide); if (te instanceof MultiBlockPart) { - final IMultiBlockController tController = ((MultiBlockPart)te).getTarget(false); + final IMultiBlockController tController = ((MultiBlockPart) te).getTarget(false); if (tController != null) tController.onStructureChange(); } else if (te instanceof IMultiBlockController) { - ((IMultiBlockController)te).onStructureChange(); + ((IMultiBlockController) te).onStructureChange(); } } } @@ -192,51 +185,55 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity implements IM mMode = aData; } - @Override public void loadTextureNBT(NBTTagCompound aNBT) { // Loading the registry final String textureName = aNBT.getString(NBT.TEXTURE); mTextures = new IIconContainer[] { - new Textures.BlockIcons.CustomIcon("multitileentity/multiblockparts/"+textureName+"/bottom"), - new Textures.BlockIcons.CustomIcon("multitileentity/multiblockparts/"+textureName+"/top"), - new Textures.BlockIcons.CustomIcon("multitileentity/multiblockparts/"+textureName+"/side"), - new Textures.BlockIcons.CustomIcon("multitileentity/multiblockparts/"+textureName+"/overlay/bottom"), - new Textures.BlockIcons.CustomIcon("multitileentity/multiblockparts/"+textureName+"/overlay/top"), - new Textures.BlockIcons.CustomIcon("multitileentity/multiblockparts/"+textureName+"/overlay/side") + new Textures.BlockIcons.CustomIcon("multitileentity/multiblockparts/" + textureName + "/bottom"), + new Textures.BlockIcons.CustomIcon("multitileentity/multiblockparts/" + textureName + "/top"), + new Textures.BlockIcons.CustomIcon("multitileentity/multiblockparts/" + textureName + "/side"), + new Textures.BlockIcons.CustomIcon("multitileentity/multiblockparts/" + textureName + "/overlay/bottom"), + new Textures.BlockIcons.CustomIcon("multitileentity/multiblockparts/" + textureName + "/overlay/top"), + new Textures.BlockIcons.CustomIcon("multitileentity/multiblockparts/" + textureName + "/overlay/side") }; } @Override public void copyTextures() { // Loading an instance - final TileEntity tCanonicalTileEntity = MultiTileEntityRegistry.getCanonicalTileEntity(getMultiTileEntityRegistryID(), getMultiTileEntityID()); - if(tCanonicalTileEntity instanceof MultiBlockPart) - mTextures = ((MultiBlockPart)tCanonicalTileEntity).mTextures; + final TileEntity tCanonicalTileEntity = + MultiTileEntityRegistry.getCanonicalTileEntity(getMultiTileEntityRegistryID(), getMultiTileEntityID()); + if (tCanonicalTileEntity instanceof MultiBlockPart) + mTextures = ((MultiBlockPart) tCanonicalTileEntity).mTextures; } - @Override public ITexture[] getTexture(Block aBlock, byte aSide, boolean isActive, int aRenderPass) { // For normal parts - texture comes from BaseMTE; overlay based on current mode // TODO(MTE) - For Advanced parts they might come from somewhere else final ITexture baseTexture = TextureFactory.of(super.getTexture(aBlock, aSide, isActive, aRenderPass)); - if(mMode != 0 && aSide == mFacing) { - if(mMode == getModeOrdinal(ITEM_IN)) - return new ITexture[]{ baseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(ITEM_IN_SIGN) }; - if(mMode == getModeOrdinal(ITEM_OUT)) - return new ITexture[]{ baseTexture, TextureFactory.of(OVERLAY_PIPE_OUT), TextureFactory.of(ITEM_OUT_SIGN) }; - if(mMode == getModeOrdinal(FLUID_IN)) - return new ITexture[]{ baseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(FLUID_IN_SIGN) }; - if(mMode == getModeOrdinal(FLUID_OUT)) - return new ITexture[]{ baseTexture, TextureFactory.of(OVERLAY_PIPE_OUT), TextureFactory.of(FLUID_OUT_SIGN) }; - if(mMode == getModeOrdinal(ENERGY_IN)) - return new ITexture[]{ baseTexture, TextureFactory.of(OVERLAY_ENERGY_IN_MULTI)}; - if(mMode == getModeOrdinal(ENERGY_OUT)) - return new ITexture[]{ baseTexture, TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI)}; - + if (mMode != 0 && aSide == mFacing) { + if (mMode == getModeOrdinal(ITEM_IN)) + return new ITexture[] {baseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(ITEM_IN_SIGN) + }; + if (mMode == getModeOrdinal(ITEM_OUT)) + return new ITexture[] { + baseTexture, TextureFactory.of(OVERLAY_PIPE_OUT), TextureFactory.of(ITEM_OUT_SIGN) + }; + if (mMode == getModeOrdinal(FLUID_IN)) + return new ITexture[] {baseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(FLUID_IN_SIGN) + }; + if (mMode == getModeOrdinal(FLUID_OUT)) + return new ITexture[] { + baseTexture, TextureFactory.of(OVERLAY_PIPE_OUT), TextureFactory.of(FLUID_OUT_SIGN) + }; + if (mMode == getModeOrdinal(ENERGY_IN)) + return new ITexture[] {baseTexture, TextureFactory.of(OVERLAY_ENERGY_IN_MULTI)}; + if (mMode == getModeOrdinal(ENERGY_OUT)) + return new ITexture[] {baseTexture, TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI)}; } - return new ITexture[]{ baseTexture }; + return new ITexture[] {baseTexture}; } @Override @@ -245,46 +242,38 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity implements IM } protected String getModeName(int aMode) { - if(aMode == NOTHING) - return "Nothing"; - if(aMode == getModeOrdinal(ITEM_IN)) - return "Item Input"; - if(aMode == getModeOrdinal(ITEM_OUT)) - return "Item Output"; - if(aMode == getModeOrdinal(FLUID_IN)) - return "Fluid Input"; - if(aMode == getModeOrdinal(FLUID_OUT)) - return "Fluid Output"; - if(aMode == getModeOrdinal(ENERGY_IN)) - return "Energy Input"; - if(aMode == getModeOrdinal(ENERGY_OUT)) - return "Energy Output"; + if (aMode == NOTHING) return "Nothing"; + if (aMode == getModeOrdinal(ITEM_IN)) return "Item Input"; + if (aMode == getModeOrdinal(ITEM_OUT)) return "Item Output"; + if (aMode == getModeOrdinal(FLUID_IN)) return "Fluid Input"; + if (aMode == getModeOrdinal(FLUID_OUT)) return "Fluid Output"; + if (aMode == getModeOrdinal(ENERGY_IN)) return "Energy Input"; + if (aMode == getModeOrdinal(ENERGY_OUT)) return "Energy Output"; return "Unknown"; } protected byte getModeOrdinal(int aMode) { // log2 returns the bit position of the only bit set, add 1 to account for 0 being NOTHING // NOTE: Must be a power of 2 (single bit) - return (byte)(log2(aMode, RoundingMode.UNNECESSARY) + 1); + return (byte) (log2(aMode, RoundingMode.UNNECESSARY) + 1); } + protected byte getNextAllowedMode(List<Integer> allowedModes) { - if(mAllowedModes == NOTHING) - return NOTHING; + if (mAllowedModes == NOTHING) return NOTHING; final int numModes = allowedModes.size(); - for(byte i = 1 ; i <= numModes ; i++) { - final byte curMode = (byte)((mMode + i) % numModes); - if(curMode == NOTHING || hasMode(1 << (curMode - 1))) - return curMode; + for (byte i = 1; i <= numModes; i++) { + final byte curMode = (byte) ((mMode + i) % numModes); + if (curMode == NOTHING || hasMode(1 << (curMode - 1))) return curMode; } // Nothing valid found return 0; } @Override - public boolean onMalletRightClick(EntityPlayer aPlayer, ItemStack tCurrentItem, byte wrenchSide, float aX, float aY, float aZ) { - if(mAllowedModes == NOTHING) - return true; + public boolean onMalletRightClick( + EntityPlayer aPlayer, ItemStack tCurrentItem, byte wrenchSide, float aX, float aY, float aZ) { + if (mAllowedModes == NOTHING) return true; mMode = getNextAllowedMode(BASIC_MODES); GT_Utility.sendChatToPlayer(aPlayer, "Mode set to `" + getModeName(mMode) + "' (" + mMode + ")"); @@ -293,17 +282,15 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity implements IM } @Override - public void setLightValue(byte aLightValue) { - - } + public void setLightValue(byte aLightValue) {} @Override public byte getComparatorValue(byte aSide) { return 0; } - - @Override public String getTileEntityName() { + @Override + public String getTileEntityName() { return "gt.multitileentity.multiblock.part"; } @@ -318,8 +305,9 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity implements IM @Override public int fill(ForgeDirection aDirection, FluidStack aFluidStack, boolean aDoFill) { if (!modeSelected(FLUID_IN)) return 0; - final byte aSide = (byte)aDirection.ordinal(); - if(aDirection != ForgeDirection.UNKNOWN && (aSide != mFacing || !coverLetsFluidIn(aSide, aFluidStack == null ? null : aFluidStack.getFluid()))) + final byte aSide = (byte) aDirection.ordinal(); + if (aDirection != ForgeDirection.UNKNOWN + && (aSide != mFacing || !coverLetsFluidIn(aSide, aFluidStack == null ? null : aFluidStack.getFluid()))) return 0; final IMultiBlockController controller = getTarget(true); return controller == null ? 0 : controller.fill(this, aDirection, aFluidStack, aDoFill); @@ -328,8 +316,9 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity implements IM @Override public FluidStack drain(ForgeDirection aDirection, FluidStack aFluidStack, boolean aDoDrain) { if (!modeSelected(FLUID_OUT)) return null; - final byte aSide = (byte)aDirection.ordinal(); - if(aDirection != ForgeDirection.UNKNOWN && (aSide != mFacing || !coverLetsFluidOut(aSide, aFluidStack == null ? null : aFluidStack.getFluid()))) + final byte aSide = (byte) aDirection.ordinal(); + if (aDirection != ForgeDirection.UNKNOWN + && (aSide != mFacing || !coverLetsFluidOut(aSide, aFluidStack == null ? null : aFluidStack.getFluid()))) return null; final IMultiBlockController controller = getTarget(true); return controller == null ? null : controller.drain(this, aDirection, aFluidStack, aDoDrain); @@ -338,11 +327,12 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity implements IM @Override public FluidStack drain(ForgeDirection aDirection, int aAmountToDrain, boolean aDoDrain) { if (!modeSelected(FLUID_OUT)) return null; - final byte aSide = (byte)aDirection.ordinal(); + final byte aSide = (byte) aDirection.ordinal(); final IMultiBlockController controller = getTarget(true); if (controller == null) return null; final FluidStack aFluidStack = controller.getDrainableFluid(aSide); - if(aDirection != ForgeDirection.UNKNOWN && (aSide != mFacing || !coverLetsFluidOut(aSide, aFluidStack == null ? null : aFluidStack.getFluid()))) + if (aDirection != ForgeDirection.UNKNOWN + && (aSide != mFacing || !coverLetsFluidOut(aSide, aFluidStack == null ? null : aFluidStack.getFluid()))) return null; return controller.drain(this, aDirection, aAmountToDrain, aDoDrain); } @@ -350,8 +340,8 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity implements IM @Override public boolean canFill(ForgeDirection aDirection, Fluid aFluid) { if (!modeSelected(FLUID_IN)) return false; - final byte aSide = (byte)aDirection.ordinal(); - if(aDirection != ForgeDirection.UNKNOWN && (aSide != mFacing || !coverLetsFluidIn(aSide, aFluid))) + final byte aSide = (byte) aDirection.ordinal(); + if (aDirection != ForgeDirection.UNKNOWN && (aSide != mFacing || !coverLetsFluidIn(aSide, aFluid))) return false; final IMultiBlockController controller = getTarget(true); return controller != null && controller.canFill(this, aDirection, aFluid); @@ -360,8 +350,8 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity implements IM @Override public boolean canDrain(ForgeDirection aDirection, Fluid aFluid) { if (!modeSelected(FLUID_OUT)) return false; - final byte aSide = (byte)aDirection.ordinal(); - if(aDirection != ForgeDirection.UNKNOWN && (aSide != mFacing || !coverLetsFluidOut(aSide, aFluid))) + final byte aSide = (byte) aDirection.ordinal(); + if (aDirection != ForgeDirection.UNKNOWN && (aSide != mFacing || !coverLetsFluidOut(aSide, aFluid))) return false; final IMultiBlockController controller = getTarget(true); return controller != null && controller.canDrain(this, aDirection, aFluid); @@ -370,16 +360,18 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity implements IM @Override public FluidTankInfo[] getTankInfo(ForgeDirection aDirection) { final byte aSide = (byte) aDirection.ordinal(); - if (!modeSelected(FLUID_IN, FLUID_OUT) || (aSide != SIDE_UNKNOWN && aSide != mFacing)) return GT_Values.emptyFluidTankInfo; + if (!modeSelected(FLUID_IN, FLUID_OUT) || (aSide != SIDE_UNKNOWN && aSide != mFacing)) + return GT_Values.emptyFluidTankInfo; final IMultiBlockController controller = getTarget(true); - if(controller == null) return GT_Values.emptyFluidTankInfo; + if (controller == null) return GT_Values.emptyFluidTankInfo; final GT_CoverBehaviorBase<?> tCover = getCoverBehaviorAtSideNew(aSide); final int coverId = getCoverIDAtSide(aSide); final ISerializableObject complexCoverData = getComplexCoverDataAtSide(aSide); - if((controller.isLiquidInput(aSide) && tCover.letsFluidIn(aSide, coverId, complexCoverData, null, controller)) || - (controller.isLiquidOutput(aSide) && tCover.letsFluidOut(aSide, coverId, complexCoverData, null, controller))) + if ((controller.isLiquidInput(aSide) && tCover.letsFluidIn(aSide, coverId, complexCoverData, null, controller)) + || (controller.isLiquidOutput(aSide) + && tCover.letsFluidOut(aSide, coverId, complexCoverData, null, controller))) return controller.getTankInfo(this, aDirection); return GT_Values.emptyFluidTankInfo; @@ -388,7 +380,6 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity implements IM /** * Energy - Depending on the part type - proxy to the multiblock controller, if we have one */ - @Override public boolean isEnetInput() { return modeSelected(ENERGY_IN); @@ -404,7 +395,6 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity implements IM if (!modeSelected(ENERGY_OUT, ENERGY_IN)) return false; final IMultiBlockController controller = getTarget(true); return controller != null && controller.isUniversalEnergyStored(this, aEnergyAmount); - } @Override @@ -453,37 +443,41 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity implements IM public boolean decreaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooLittleEnergy) { if (!modeSelected(ENERGY_IN)) return false; final IMultiBlockController controller = getTarget(true); - return controller != null && hasMode(ENERGY_OUT) && controller.decreaseStoredEnergyUnits(this, aEnergy, aIgnoreTooLittleEnergy); + return controller != null + && hasMode(ENERGY_OUT) + && controller.decreaseStoredEnergyUnits(this, aEnergy, aIgnoreTooLittleEnergy); } @Override public boolean increaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooMuchEnergy) { if (!modeSelected(ENERGY_IN)) return false; final IMultiBlockController controller = getTarget(true); - return controller != null && hasMode(ENERGY_IN) && controller.increaseStoredEnergyUnits(this, aEnergy, aIgnoreTooMuchEnergy); + return controller != null + && hasMode(ENERGY_IN) + && controller.increaseStoredEnergyUnits(this, aEnergy, aIgnoreTooMuchEnergy); } @Override public boolean drainEnergyUnits(byte aSide, long aVoltage, long aAmperage) { - if(!modeSelected(ENERGY_OUT) || (mFacing != SIDE_UNKNOWN && (mFacing != aSide || !coverLetsEnergyOut(aSide)))) return false; + if (!modeSelected(ENERGY_OUT) || (mFacing != SIDE_UNKNOWN && (mFacing != aSide || !coverLetsEnergyOut(aSide)))) + return false; final IMultiBlockController controller = getTarget(true); return controller != null && controller.drainEnergyUnits(this, aSide, aVoltage, aAmperage); } - @Override public long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage) { - if (!modeSelected(ENERGY_IN) || (mFacing != SIDE_UNKNOWN && (mFacing != aSide || !coverLetsEnergyIn(aSide)))) return 0; + if (!modeSelected(ENERGY_IN) || (mFacing != SIDE_UNKNOWN && (mFacing != aSide || !coverLetsEnergyIn(aSide)))) + return 0; final IMultiBlockController controller = getTarget(true); return controller != null ? controller.injectEnergyUnits(this, aSide, aVoltage, aAmperage) : 0; } - @Override public long getAverageElectricInput() { if (!modeSelected(ENERGY_IN)) return 0; final IMultiBlockController controller = getTarget(true); - return controller != null? controller.getAverageElectricInput(this) : 0; + return controller != null ? controller.getAverageElectricInput(this) : 0; } @Override @@ -509,13 +503,16 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity implements IM @Override public boolean inputEnergyFrom(byte aSide) { - if (!modeSelected(ENERGY_IN) || (mFacing != SIDE_UNKNOWN && (mFacing != aSide || !coverLetsEnergyIn(aSide)))) return false; + if (!modeSelected(ENERGY_IN) || (mFacing != SIDE_UNKNOWN && (mFacing != aSide || !coverLetsEnergyIn(aSide)))) + return false; final IMultiBlockController controller = getTarget(true); return controller != null && controller.inputEnergyFrom(this, aSide); } + @Override public boolean outputsEnergyTo(byte aSide) { - if(!modeSelected(ENERGY_OUT) || (mFacing != SIDE_UNKNOWN && (mFacing != aSide || !coverLetsEnergyOut(aSide)))) return false; + if (!modeSelected(ENERGY_OUT) || (mFacing != SIDE_UNKNOWN && (mFacing != aSide || !coverLetsEnergyOut(aSide)))) + return false; final IMultiBlockController controller = getTarget(true); return controller != null && controller.outputsEnergyTo(this, aSide); } @@ -525,7 +522,6 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity implements IM /** * Inventory - Depending on the part type - proxy to the multiblock controller, if we have one */ - @Override public boolean hasInventoryBeenModified() { final IMultiBlockController controller = getTarget(true); @@ -552,23 +548,28 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity implements IM return (controller != null && controller.addStackToSlot(this, aIndex, aStack, aAmount)); } - @Override public int[] getAccessibleSlotsFromSide(int aSide) { - if (!modeSelected(ITEM_IN, ITEM_OUT) || (mFacing != SIDE_UNKNOWN && mFacing != aSide)) return GT_Values.emptyIntArray; + if (!modeSelected(ITEM_IN, ITEM_OUT) || (mFacing != SIDE_UNKNOWN && mFacing != aSide)) + return GT_Values.emptyIntArray; final IMultiBlockController controller = getTarget(true); return controller != null ? controller.getAccessibleSlotsFromSide(this, (byte) aSide) : GT_Values.emptyIntArray; } @Override public boolean canInsertItem(int aSlot, ItemStack aStack, int aSide) { - if (!modeSelected(ITEM_IN) || (mFacing != SIDE_UNKNOWN && (mFacing != aSide || !coverLetsItemsIn((byte)aSide, aSlot)))) return false; + if (!modeSelected(ITEM_IN) + || (mFacing != SIDE_UNKNOWN && (mFacing != aSide || !coverLetsItemsIn((byte) aSide, aSlot)))) + return false; final IMultiBlockController controller = getTarget(true); return (controller != null && controller.canInsertItem(this, aSlot, aStack, (byte) aSide)); } + @Override public boolean canExtractItem(int aSlot, ItemStack aStack, int aSide) { - if (!modeSelected(ITEM_OUT) || (mFacing != SIDE_UNKNOWN && (mFacing != aSide || !coverLetsItemsOut((byte)aSide, aSlot)))) return false; + if (!modeSelected(ITEM_OUT) + || (mFacing != SIDE_UNKNOWN && (mFacing != aSide || !coverLetsItemsOut((byte) aSide, aSlot)))) + return false; final IMultiBlockController controller = getTarget(true); return (controller != null && controller.canExtractItem(this, aSlot, aStack, (byte) aSide)); } @@ -603,14 +604,13 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity implements IM @Override public void setInventorySlotContents(int aSlot, ItemStack aStack) { final IMultiBlockController controller = getTarget(true); - if(controller != null) controller.setInventorySlotContents(this, aSlot, aStack); + if (controller != null) controller.setInventorySlotContents(this, aSlot, aStack); } @Override public String getInventoryName() { final IMultiBlockController controller = getTarget(true); - if(controller != null) - return controller.getInventoryName(this); + if (controller != null) return controller.getInventoryName(this); return firstNonNull(getCustomName(), getTileEntityName()); } @@ -620,7 +620,6 @@ public class MultiBlockPart extends BaseNontickableMultiTileEntity implements IM return controller != null ? controller.getInventoryStackLimit(this) : 0; } - @Override public boolean isItemValidForSlot(int aSlot, ItemStack aStack) { final IMultiBlockController controller = getTarget(true); diff --git a/src/main/java/gregtech/api/multitileentity/multiblock/base/MultiBlock_Stackable.java b/src/main/java/gregtech/api/multitileentity/multiblock/base/MultiBlock_Stackable.java index f19d3156fa..92931bc4db 100644 --- a/src/main/java/gregtech/api/multitileentity/multiblock/base/MultiBlock_Stackable.java +++ b/src/main/java/gregtech/api/multitileentity/multiblock/base/MultiBlock_Stackable.java @@ -1,7 +1,6 @@ package gregtech.api.multitileentity.multiblock.base; import com.gtnewhorizon.structurelib.util.Vec3Impl; - import net.minecraft.item.ItemStack; public abstract class MultiBlock_Stackable<T extends MultiBlock_Stackable<T>> extends MultiBlockController<T> { @@ -25,7 +24,7 @@ public abstract class MultiBlock_Stackable<T extends MultiBlock_Stackable<T>> ex buildPiece(STACKABLE_MIDDLE, trigger, hintsOnly, buildState.getCurrentOffset()); buildState.addOffset(getPerStackOffset()); } - if(hasTop()) { + if (hasTop()) { buildState.addOffset(getAfterLastStackOffset()); buildPiece(STACKABLE_TOP, trigger, hintsOnly, buildState.stopBuilding()); } else { @@ -86,8 +85,7 @@ public abstract class MultiBlock_Stackable<T extends MultiBlock_Stackable<T>> ex int stackCount = 0; buildState.startBuilding(getStartingStructureOffset()); - if (!checkPiece(STACKABLE_BOTTOM, buildState.getCurrentOffset())) - return buildState.failBuilding(); + if (!checkPiece(STACKABLE_BOTTOM, buildState.getCurrentOffset())) return buildState.failBuilding(); buildState.addOffset(getStartingStackOffset()); @@ -99,8 +97,7 @@ public abstract class MultiBlock_Stackable<T extends MultiBlock_Stackable<T>> ex break; } } - if (stackCount < getMinStacks()) - return buildState.failBuilding(); + if (stackCount < getMinStacks()) return buildState.failBuilding(); buildState.addOffset(getAfterLastStackOffset()); return checkPiece(STACKABLE_TOP, buildState.stopBuilding()); @@ -110,5 +107,4 @@ public abstract class MultiBlock_Stackable<T extends MultiBlock_Stackable<T>> ex public boolean checkRecipe(ItemStack aStack) { return false; } - } diff --git a/src/main/java/gregtech/api/multitileentity/multiblock/casing/CasingBehaviorBase.java b/src/main/java/gregtech/api/multitileentity/multiblock/casing/CasingBehaviorBase.java index 8c507db88c..b4b69e0b21 100644 --- a/src/main/java/gregtech/api/multitileentity/multiblock/casing/CasingBehaviorBase.java +++ b/src/main/java/gregtech/api/multitileentity/multiblock/casing/CasingBehaviorBase.java @@ -13,5 +13,4 @@ package gregtech.api.multitileentity.multiblock.casing; * - etc, etc. * */ -public class CasingBehaviorBase { -} +public class CasingBehaviorBase {} diff --git a/src/main/java/gregtech/api/net/GT_Packet_Block_Event.java b/src/main/java/gregtech/api/net/GT_Packet_Block_Event.java index 9060144e22..dd7657e95d 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_Block_Event.java +++ b/src/main/java/gregtech/api/net/GT_Packet_Block_Event.java @@ -37,7 +37,8 @@ public class GT_Packet_Block_Event extends GT_Packet_New { @Override public GT_Packet_New decode(ByteArrayDataInput aData) { - return new GT_Packet_Block_Event(aData.readInt(), aData.readShort(), aData.readInt(), aData.readByte(), aData.readByte()); + return new GT_Packet_Block_Event( + aData.readInt(), aData.readShort(), aData.readInt(), aData.readByte(), aData.readByte()); } @Override diff --git a/src/main/java/gregtech/api/net/GT_Packet_ClientPreference.java b/src/main/java/gregtech/api/net/GT_Packet_ClientPreference.java index 5f2549d13c..f692a4c88a 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_ClientPreference.java +++ b/src/main/java/gregtech/api/net/GT_Packet_ClientPreference.java @@ -36,8 +36,7 @@ public class GT_Packet_ClientPreference extends GT_Packet_New { @Override public void process(IBlockAccess aWorld) { - if (mPlayer != null) - GT_Mod.gregtechproxy.setClientPreference(mPlayer.getUniqueID(), mPreference); + if (mPlayer != null) GT_Mod.gregtechproxy.setClientPreference(mPlayer.getUniqueID(), mPreference); } @Override @@ -49,6 +48,7 @@ public class GT_Packet_ClientPreference extends GT_Packet_New { @Override public GT_Packet_New decode(ByteArrayDataInput aData) { - return new GT_Packet_ClientPreference(new GT_ClientPreference(aData.readBoolean(), aData.readBoolean(), aData.readBoolean())); + return new GT_Packet_ClientPreference( + new GT_ClientPreference(aData.readBoolean(), aData.readBoolean(), aData.readBoolean())); } } diff --git a/src/main/java/gregtech/api/net/GT_Packet_GtTileEntityGuiRequest.java b/src/main/java/gregtech/api/net/GT_Packet_GtTileEntityGuiRequest.java index bf412c4400..9f32ad4bae 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_GtTileEntityGuiRequest.java +++ b/src/main/java/gregtech/api/net/GT_Packet_GtTileEntityGuiRequest.java @@ -1,7 +1,6 @@ package gregtech.api.net; import com.google.common.io.ByteArrayDataInput; - import gregtech.api.enums.GT_Values; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.common.GT_Proxy; @@ -17,7 +16,6 @@ import net.minecraftforge.common.DimensionManager; */ public class GT_Packet_GtTileEntityGuiRequest extends GT_Packet_New { - protected int mX; protected short mY; protected int mZ; @@ -31,7 +29,8 @@ public class GT_Packet_GtTileEntityGuiRequest extends GT_Packet_New { super(true); } - public GT_Packet_GtTileEntityGuiRequest(int mX, short mY, int mZ, int guiId, int dimID, int playerID, int parentGuiId) { + public GT_Packet_GtTileEntityGuiRequest( + int mX, short mY, int mZ, int guiId, int dimID, int playerID, int parentGuiId) { super(false); this.mX = mX; this.mY = mY; @@ -69,12 +68,9 @@ public class GT_Packet_GtTileEntityGuiRequest extends GT_Packet_New { aData.readInt(), aData.readShort(), aData.readInt(), - aData.readInt(), - aData.readInt(), aData.readInt(), - aData.readInt()); } @@ -91,22 +87,23 @@ public class GT_Packet_GtTileEntityGuiRequest extends GT_Packet_New { if (!(tile instanceof IGregTechTileEntity) || ((IGregTechTileEntity) tile).isDead()) return; IGregTechTileEntity gtTile = ((IGregTechTileEntity) tile); - EntityPlayerMP player = (EntityPlayerMP) world.getEntityByID(playerId); + EntityPlayerMP player = (EntityPlayerMP) world.getEntityByID(playerId); // If the requested Gui ID corresponds to a cover, send the cover data to the client so they can open it. - if (GT_Proxy.GUI_ID_COVER_SIDE_BASE <= guiId && guiId < GT_Proxy.GUI_ID_COVER_SIDE_BASE+6) { + if (GT_Proxy.GUI_ID_COVER_SIDE_BASE <= guiId && guiId < GT_Proxy.GUI_ID_COVER_SIDE_BASE + 6) { byte coverSide = (byte) (guiId - GT_Proxy.GUI_ID_COVER_SIDE_BASE); GT_Packet_TileEntityCoverGUI packet = new GT_Packet_TileEntityCoverGUI( - this.mX, this.mY, this.mZ, - coverSide, - gtTile.getCoverIDAtSide(coverSide), - gtTile.getComplexCoverDataAtSide(coverSide), - this.dimId, - this.playerId, - parentGuiId); + this.mX, + this.mY, + this.mZ, + coverSide, + gtTile.getCoverIDAtSide(coverSide), + gtTile.getComplexCoverDataAtSide(coverSide), + this.dimId, + this.playerId, + parentGuiId); GT_Values.NW.sendToPlayer(packet, player); } else if (guiId == 0) { gtTile.openGUI(player); } } - } diff --git a/src/main/java/gregtech/api/net/GT_Packet_New.java b/src/main/java/gregtech/api/net/GT_Packet_New.java index 10beae0e4d..f4e6f2a0e2 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_New.java +++ b/src/main/java/gregtech/api/net/GT_Packet_New.java @@ -1,29 +1,28 @@ package gregtech.api.net; import com.google.common.io.ByteArrayDataInput; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; @SuppressWarnings("deprecation") public abstract class GT_Packet_New extends GT_Packet { - public GT_Packet_New(boolean aIsReference) { - super(aIsReference); - } + public GT_Packet_New(boolean aIsReference) { + super(aIsReference); + } - @Override - @Deprecated - public final byte[] encode() { - ByteBuf tOut = Unpooled.buffer(); - encode(tOut); - byte[] bytes = new byte[tOut.readableBytes()]; - tOut.readBytes(bytes); - return bytes; - } + @Override + @Deprecated + public final byte[] encode() { + ByteBuf tOut = Unpooled.buffer(); + encode(tOut); + byte[] bytes = new byte[tOut.readableBytes()]; + tOut.readBytes(bytes); + return bytes; + } - @Override - public abstract void encode(ByteBuf aOut); + @Override + public abstract void encode(ByteBuf aOut); - @Override - public abstract GT_Packet_New decode(ByteArrayDataInput aData); + @Override + public abstract GT_Packet_New decode(ByteArrayDataInput aData); } diff --git a/src/main/java/gregtech/api/net/GT_Packet_Pollution.java b/src/main/java/gregtech/api/net/GT_Packet_Pollution.java index 20efe41679..b79ce20e39 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_Pollution.java +++ b/src/main/java/gregtech/api/net/GT_Packet_Pollution.java @@ -27,10 +27,7 @@ public class GT_Packet_Pollution extends GT_Packet_New { @Override public GT_Packet_New decode(ByteArrayDataInput aData) { - return new GT_Packet_Pollution( - new ChunkCoordIntPair(aData.readInt(), aData.readInt()), - aData.readInt() - ); + return new GT_Packet_Pollution(new ChunkCoordIntPair(aData.readInt(), aData.readInt()), aData.readInt()); } @Override diff --git a/src/main/java/gregtech/api/net/GT_Packet_RequestCoverData.java b/src/main/java/gregtech/api/net/GT_Packet_RequestCoverData.java index cdb744ee32..8084a772bb 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_RequestCoverData.java +++ b/src/main/java/gregtech/api/net/GT_Packet_RequestCoverData.java @@ -1,11 +1,8 @@ package gregtech.api.net; import com.google.common.io.ByteArrayDataInput; -import gregtech.api.GregTech_API; import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.CoverableTileEntity; -import gregtech.api.util.ISerializableObject; import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.network.INetHandler; @@ -41,6 +38,7 @@ public class GT_Packet_RequestCoverData extends GT_Packet_New { this.side = coverSide; this.coverID = coverID; } + public GT_Packet_RequestCoverData(byte coverSide, int coverID, ICoverable tile) { super(false); this.mX = tile.getXCoord(); @@ -69,13 +67,7 @@ public class GT_Packet_RequestCoverData extends GT_Packet_New { @Override public GT_Packet_New decode(ByteArrayDataInput aData) { return new GT_Packet_RequestCoverData( - aData.readInt(), - aData.readShort(), - aData.readInt(), - - aData.readByte(), - aData.readInt() - ); + aData.readInt(), aData.readShort(), aData.readInt(), aData.readByte(), aData.readInt()); } @Override @@ -88,7 +80,7 @@ public class GT_Packet_RequestCoverData extends GT_Packet_New { @Override public void process(IBlockAccess aWorld) { if (mPlayer == null) // impossible, but who knows - return; + return; World world = DimensionManager.getWorld(mPlayer.dimension); if (world != null) { final TileEntity tile = world.getTileEntity(mX, mY, mZ); diff --git a/src/main/java/gregtech/api/net/GT_Packet_SendCoverData.java b/src/main/java/gregtech/api/net/GT_Packet_SendCoverData.java index 820f4e18d5..ab8b230077 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_SendCoverData.java +++ b/src/main/java/gregtech/api/net/GT_Packet_SendCoverData.java @@ -25,7 +25,8 @@ public class GT_Packet_SendCoverData extends GT_Packet_New { super(true); } - public GT_Packet_SendCoverData(int mX, short mY, int mZ, byte coverSide, int coverID, ISerializableObject coverData) { + public GT_Packet_SendCoverData( + int mX, short mY, int mZ, byte coverSide, int coverID, ISerializableObject coverData) { super(false); this.mX = mX; this.mY = mY; @@ -35,6 +36,7 @@ public class GT_Packet_SendCoverData extends GT_Packet_New { this.coverID = coverID; this.coverData = coverData; } + public GT_Packet_SendCoverData(byte coverSide, int coverID, ISerializableObject coverData, ICoverable tile) { super(false); this.mX = tile.getXCoord(); @@ -69,11 +71,9 @@ public class GT_Packet_SendCoverData extends GT_Packet_New { aData.readInt(), aData.readShort(), aData.readInt(), - aData.readByte(), coverId = aData.readInt(), - GregTech_API.getCoverBehaviorNew(coverId).createDataObject().readFromPacket(aData, null) - ); + GregTech_API.getCoverBehaviorNew(coverId).createDataObject().readFromPacket(aData, null)); } @Override diff --git a/src/main/java/gregtech/api/net/GT_Packet_SetConfigurationCircuit.java b/src/main/java/gregtech/api/net/GT_Packet_SetConfigurationCircuit.java index 1cfe59743c..0561b18ac1 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_SetConfigurationCircuit.java +++ b/src/main/java/gregtech/api/net/GT_Packet_SetConfigurationCircuit.java @@ -5,7 +5,6 @@ import cpw.mods.fml.common.network.ByteBufUtils; import gregtech.api.interfaces.metatileentity.IConfigurationCircuitSupport; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; import gregtech.api.util.GT_Utility; import gregtech.api.util.ISerializableObject; import io.netty.buffer.ByteBuf; @@ -20,7 +19,6 @@ import net.minecraftforge.common.DimensionManager; /** * Client -> Server: Update machine configuration data */ - public class GT_Packet_SetConfigurationCircuit extends GT_Packet_New { protected int mX; protected short mY; @@ -97,6 +95,7 @@ public class GT_Packet_SetConfigurationCircuit extends GT_Packet_New { machine.getConfigurationCircuits().stream() .filter(stack -> GT_Utility.areStacksEqual(stack, circuit)) .findFirst() - .ifPresent(stack -> ((IGregTechTileEntity) tile).setInventorySlotContents(machine.getCircuitSlot(), stack)); + .ifPresent(stack -> + ((IGregTechTileEntity) tile).setInventorySlotContents(machine.getCircuitSlot(), stack)); } } diff --git a/src/main/java/gregtech/api/net/GT_Packet_SetLockedFluid.java b/src/main/java/gregtech/api/net/GT_Packet_SetLockedFluid.java index 911d48223b..d100dd6055 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_SetLockedFluid.java +++ b/src/main/java/gregtech/api/net/GT_Packet_SetLockedFluid.java @@ -18,76 +18,76 @@ import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; public class GT_Packet_SetLockedFluid extends GT_Packet_New { - protected int mX; - protected short mY; - protected int mZ; - - protected int mFluidID; - - private EntityPlayerMP mPlayer; - - public GT_Packet_SetLockedFluid() { - super(true); - } - - public GT_Packet_SetLockedFluid(IGregTechTileEntity aTile, FluidStack aSource) { - this(aTile.getXCoord(), aTile.getYCoord(), aTile.getZCoord(), aSource.getFluidID()); - } - - public GT_Packet_SetLockedFluid(int x, short y, int z, int aFluidID) { - super(false); - - this.mX = x; - this.mY = y; - this.mZ = z; - - this.mFluidID = aFluidID; - } - - @Override - public byte getPacketID() { - return 14; - } - - @Override - public void encode(ByteBuf aOut) { - aOut.writeInt(mX); - aOut.writeShort(mY); - aOut.writeInt(mZ); - - aOut.writeInt(mFluidID); - } - - @Override - public void setINetHandler(INetHandler aHandler) { - if (aHandler instanceof NetHandlerPlayServer) { - mPlayer = ((NetHandlerPlayServer) aHandler).playerEntity; - } - } - - @Override - public GT_Packet_New decode(ByteArrayDataInput aData) { - return new GT_Packet_SetLockedFluid( - aData.readInt(), - aData.readShort(), - aData.readInt(), - - aData.readInt()); - } - - @Override - public void process(IBlockAccess aWorld) { - if (mPlayer == null) return; - World world = mPlayer.worldObj; - TileEntity tile = world.getTileEntity(mX, mY, mZ); - if (!(tile instanceof IGregTechTileEntity) || ((IGregTechTileEntity) tile).isDead()) return; - IMetaTileEntity mte = ((IGregTechTileEntity) tile).getMetaTileEntity(); - if (!(mte instanceof GT_MetaTileEntity_Hatch_Output)) return; - Fluid tFluid = FluidRegistry.getFluid(mFluidID); - if (tFluid == null) return; + protected int mX; + protected short mY; + protected int mZ; + + protected int mFluidID; + + private EntityPlayerMP mPlayer; + + public GT_Packet_SetLockedFluid() { + super(true); + } + + public GT_Packet_SetLockedFluid(IGregTechTileEntity aTile, FluidStack aSource) { + this(aTile.getXCoord(), aTile.getYCoord(), aTile.getZCoord(), aSource.getFluidID()); + } + + public GT_Packet_SetLockedFluid(int x, short y, int z, int aFluidID) { + super(false); + + this.mX = x; + this.mY = y; + this.mZ = z; + + this.mFluidID = aFluidID; + } + + @Override + public byte getPacketID() { + return 14; + } + + @Override + public void encode(ByteBuf aOut) { + aOut.writeInt(mX); + aOut.writeShort(mY); + aOut.writeInt(mZ); + + aOut.writeInt(mFluidID); + } + + @Override + public void setINetHandler(INetHandler aHandler) { + if (aHandler instanceof NetHandlerPlayServer) { + mPlayer = ((NetHandlerPlayServer) aHandler).playerEntity; + } + } + + @Override + public GT_Packet_New decode(ByteArrayDataInput aData) { + return new GT_Packet_SetLockedFluid(aData.readInt(), aData.readShort(), aData.readInt(), aData.readInt()); + } + + @Override + public void process(IBlockAccess aWorld) { + if (mPlayer == null) return; + World world = mPlayer.worldObj; + TileEntity tile = world.getTileEntity(mX, mY, mZ); + if (!(tile instanceof IGregTechTileEntity) || ((IGregTechTileEntity) tile).isDead()) return; + IMetaTileEntity mte = ((IGregTechTileEntity) tile).getMetaTileEntity(); + if (!(mte instanceof GT_MetaTileEntity_Hatch_Output)) return; + Fluid tFluid = FluidRegistry.getFluid(mFluidID); + if (tFluid == null) return; GT_MetaTileEntity_Hatch_Output hatch = (GT_MetaTileEntity_Hatch_Output) mte; hatch.setLockedFluidName(tFluid.getName()); hatch.mMode = 9; - GT_Utility.sendChatToPlayer(mPlayer, String.format(GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_151.4", "Sucessfully locked Fluid to %s", false), new FluidStack(tFluid, 1).getLocalizedName())); - } + GT_Utility.sendChatToPlayer( + mPlayer, + String.format( + GT_LanguageManager.addStringLocalization( + "Interaction_DESCRIPTION_Index_151.4", "Sucessfully locked Fluid to %s", false), + new FluidStack(tFluid, 1).getLocalizedName())); + } } diff --git a/src/main/java/gregtech/api/net/GT_Packet_Sound.java b/src/main/java/gregtech/api/net/GT_Packet_Sound.java index be66400609..ae779efc75 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_Sound.java +++ b/src/main/java/gregtech/api/net/GT_Packet_Sound.java @@ -5,10 +5,9 @@ import gregtech.api.util.GT_Log; import gregtech.api.util.GT_Utility; import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBufOutputStream; -import net.minecraft.world.IBlockAccess; - import java.io.DataOutput; import java.io.IOException; +import net.minecraft.world.IBlockAccess; public class GT_Packet_Sound extends GT_Packet_New { private int mX, mZ; @@ -48,7 +47,13 @@ public class GT_Packet_Sound extends GT_Packet_New { @Override public GT_Packet_New decode(ByteArrayDataInput aData) { - return new GT_Packet_Sound(aData.readUTF(), aData.readFloat(), aData.readFloat(), aData.readInt(), aData.readShort(), aData.readInt()); + return new GT_Packet_Sound( + aData.readUTF(), + aData.readFloat(), + aData.readFloat(), + aData.readInt(), + aData.readShort(), + aData.readInt()); } @Override diff --git a/src/main/java/gregtech/api/net/GT_Packet_TileEntity.java b/src/main/java/gregtech/api/net/GT_Packet_TileEntity.java index 970b0ca156..f805fee76c 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_TileEntity.java +++ b/src/main/java/gregtech/api/net/GT_Packet_TileEntity.java @@ -19,7 +19,23 @@ public class GT_Packet_TileEntity extends GT_Packet_New { } // For multi tiles - public GT_Packet_TileEntity(int aX, short aY, int aZ, short aRID, short aID, int aC0, int aC1, int aC2, int aC3, int aC4, int aC5, byte aTexture, byte aTexturePage, byte aUpdate, byte aRedstone, byte aColor) { + public GT_Packet_TileEntity( + int aX, + short aY, + int aZ, + short aRID, + short aID, + int aC0, + int aC1, + int aC2, + int aC3, + int aC4, + int aC5, + byte aTexture, + byte aTexturePage, + byte aUpdate, + byte aRedstone, + byte aColor) { super(false); mX = aX; mY = aY; @@ -33,19 +49,64 @@ public class GT_Packet_TileEntity extends GT_Packet_New { mRID = aRID; mID = aID; mTexture = aTexture; - mTexturePage=aTexturePage; + mTexturePage = aTexturePage; mUpdate = aUpdate; mRedstone = aRedstone; mColor = aColor; } // For meta tiles - public GT_Packet_TileEntity(int aX, short aY, int aZ, short aID, int aC0, int aC1, int aC2, int aC3, int aC4, int aC5, byte aTexture, byte aTexturePage, byte aUpdate, byte aRedstone, byte aColor) { - this(aX, aY, aZ, (short) 0, aID, aC0, aC1, aC2, aC3, aC4, aC5, aTexture, aTexturePage, aUpdate, aRedstone, aColor); + public GT_Packet_TileEntity( + int aX, + short aY, + int aZ, + short aID, + int aC0, + int aC1, + int aC2, + int aC3, + int aC4, + int aC5, + byte aTexture, + byte aTexturePage, + byte aUpdate, + byte aRedstone, + byte aColor) { + this( + aX, + aY, + aZ, + (short) 0, + aID, + aC0, + aC1, + aC2, + aC3, + aC4, + aC5, + aTexture, + aTexturePage, + aUpdate, + aRedstone, + aColor); } // For pipes - public GT_Packet_TileEntity(int aX, short aY, int aZ, short aID, int aC0, int aC1, int aC2, int aC3, int aC4, int aC5, byte aTexture, byte aUpdate, byte aRedstone, byte aColor) { + public GT_Packet_TileEntity( + int aX, + short aY, + int aZ, + short aID, + int aC0, + int aC1, + int aC2, + int aC3, + int aC4, + int aC5, + byte aTexture, + byte aUpdate, + byte aRedstone, + byte aColor) { this(aX, aY, aZ, (short) 0, aID, aC0, aC1, aC2, aC3, aC4, aC5, aTexture, (byte) 0, aUpdate, aRedstone, aColor); } @@ -75,15 +136,26 @@ public class GT_Packet_TileEntity extends GT_Packet_New { @Override public GT_Packet_New decode(ByteArrayDataInput aData) { return new GT_Packet_TileEntity( - // Coords - aData.readInt(), aData.readShort(), aData.readInt(), - // Registry & ID - aData.readShort(), aData.readShort(), - // Covers - aData.readInt(), aData.readInt(), aData.readInt(), aData.readInt(), aData.readInt(), aData.readInt(), - // Everything else - aData.readByte(), aData.readByte(), aData.readByte(), aData.readByte(), aData.readByte() - ); + // Coords + aData.readInt(), + aData.readShort(), + aData.readInt(), + // Registry & ID + aData.readShort(), + aData.readShort(), + // Covers + aData.readInt(), + aData.readInt(), + aData.readInt(), + aData.readInt(), + aData.readInt(), + aData.readInt(), + // Everything else + aData.readByte(), + aData.readByte(), + aData.readByte(), + aData.readByte(), + aData.readByte()); } @Override @@ -92,11 +164,33 @@ public class GT_Packet_TileEntity extends GT_Packet_New { final TileEntity tTileEntity = aWorld.getTileEntity(mX, mY, mZ); final Block tBlock; if (tTileEntity instanceof BaseMetaTileEntity) - ((BaseMetaTileEntity) tTileEntity).receiveMetaTileEntityData(mID, mC0, mC1, mC2, mC3, mC4, mC5, mTexture, mTexturePage, mUpdate, mRedstone, mColor); + ((BaseMetaTileEntity) tTileEntity) + .receiveMetaTileEntityData( + mID, mC0, mC1, mC2, mC3, mC4, mC5, mTexture, mTexturePage, mUpdate, mRedstone, mColor); else if (tTileEntity instanceof BaseMetaPipeEntity) - ((BaseMetaPipeEntity) tTileEntity).receiveMetaTileEntityData(mID, mC0, mC1, mC2, mC3, mC4, mC5, mTexture, mUpdate, mRedstone, mColor); + ((BaseMetaPipeEntity) tTileEntity) + .receiveMetaTileEntityData( + mID, mC0, mC1, mC2, mC3, mC4, mC5, mTexture, mUpdate, mRedstone, mColor); else if ((tBlock = aWorld.getBlock(mX, mY, mZ)) instanceof MultiTileEntityBlock) { - ((MultiTileEntityBlock)tBlock).receiveMultiTileEntityData(aWorld, mX, mY, mZ, mRID, mID, mC0, mC1, mC2, mC3, mC4, mC5, mTexture, mTexturePage, mUpdate, mRedstone, mColor); + ((MultiTileEntityBlock) tBlock) + .receiveMultiTileEntityData( + aWorld, + mX, + mY, + mZ, + mRID, + mID, + mC0, + mC1, + mC2, + mC3, + mC4, + mC5, + mTexture, + mTexturePage, + mUpdate, + mRedstone, + mColor); } } } diff --git a/src/main/java/gregtech/api/net/GT_Packet_TileEntityCover.java b/src/main/java/gregtech/api/net/GT_Packet_TileEntityCover.java index 8035030f19..6989acca9e 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_TileEntityCover.java +++ b/src/main/java/gregtech/api/net/GT_Packet_TileEntityCover.java @@ -36,6 +36,7 @@ public class GT_Packet_TileEntityCover extends GT_Packet_New { this.dimID = dimID; } + public GT_Packet_TileEntityCover(byte coverSide, int coverID, int coverData, ICoverable tile) { super(false); this.mX = tile.getXCoord(); @@ -73,11 +74,9 @@ public class GT_Packet_TileEntityCover extends GT_Packet_New { aData.readInt(), aData.readShort(), aData.readInt(), - aData.readByte(), aData.readInt(), aData.readInt(), - aData.readInt()); } diff --git a/src/main/java/gregtech/api/net/GT_Packet_TileEntityCoverGUI.java b/src/main/java/gregtech/api/net/GT_Packet_TileEntityCoverGUI.java index 687bceb726..e190648bef 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_TileEntityCoverGUI.java +++ b/src/main/java/gregtech/api/net/GT_Packet_TileEntityCoverGUI.java @@ -34,8 +34,8 @@ public class GT_Packet_TileEntityCoverGUI extends GT_Packet_New { super(true); } - public GT_Packet_TileEntityCoverGUI(int mX, short mY, int mZ, byte coverSide, int coverID, int coverData, int dimID, - int playerID) { + public GT_Packet_TileEntityCoverGUI( + int mX, short mY, int mZ, byte coverSide, int coverID, int coverData, int dimID, int playerID) { super(false); this.mX = mX; this.mY = mY; @@ -50,8 +50,15 @@ public class GT_Packet_TileEntityCoverGUI extends GT_Packet_New { this.parentGuiId = -1; } - public GT_Packet_TileEntityCoverGUI(int mX, short mY, int mZ, byte coverSide, int coverID, - ISerializableObject coverData, int dimID, int playerID) { + public GT_Packet_TileEntityCoverGUI( + int mX, + short mY, + int mZ, + byte coverSide, + int coverID, + ISerializableObject coverData, + int dimID, + int playerID) { super(false); this.mX = mX; this.mY = mY; @@ -65,8 +72,16 @@ public class GT_Packet_TileEntityCoverGUI extends GT_Packet_New { this.parentGuiId = -1; } - public GT_Packet_TileEntityCoverGUI(int mX, short mY, int mZ, byte coverSide, int coverID, - ISerializableObject coverData, int dimID, int playerID, int parentGuiId) { + public GT_Packet_TileEntityCoverGUI( + int mX, + short mY, + int mZ, + byte coverSide, + int coverID, + ISerializableObject coverData, + int dimID, + int playerID, + int parentGuiId) { super(false); this.mX = mX; this.mY = mY; @@ -80,8 +95,8 @@ public class GT_Packet_TileEntityCoverGUI extends GT_Packet_New { this.parentGuiId = parentGuiId; } - - public GT_Packet_TileEntityCoverGUI(byte side, int coverID, int coverData, ICoverable tile, EntityPlayerMP aPlayer) { + public GT_Packet_TileEntityCoverGUI( + byte side, int coverID, int coverData, ICoverable tile, EntityPlayerMP aPlayer) { super(false); this.mX = tile.getXCoord(); @@ -111,8 +126,8 @@ public class GT_Packet_TileEntityCoverGUI extends GT_Packet_New { this.parentGuiId = -1; } - public GT_Packet_TileEntityCoverGUI(byte side, int coverID, ISerializableObject coverData, ICoverable tile, - EntityPlayerMP aPlayer) { + public GT_Packet_TileEntityCoverGUI( + byte side, int coverID, ISerializableObject coverData, ICoverable tile, EntityPlayerMP aPlayer) { super(false); this.mX = tile.getXCoord(); this.mY = tile.getYCoord(); @@ -155,14 +170,11 @@ public class GT_Packet_TileEntityCoverGUI extends GT_Packet_New { aData.readInt(), aData.readShort(), aData.readInt(), - aData.readByte(), coverID = aData.readInt(), GregTech_API.getCoverBehaviorNew(coverID).createDataObject().readFromPacket(aData, null), - aData.readInt(), aData.readInt(), - aData.readInt()); } @@ -170,12 +182,12 @@ public class GT_Packet_TileEntityCoverGUI extends GT_Packet_New { public void process(IBlockAccess aWorld) { if (aWorld instanceof World) { // Using EntityPlayer instead of EntityClientPlayerMP so both client and server can load this - EntityPlayer thePlayer = ((EntityPlayer) ((World)aWorld).getEntityByID(playerID)); + EntityPlayer thePlayer = ((EntityPlayer) ((World) aWorld).getEntityByID(playerID)); TileEntity tile = aWorld.getTileEntity(mX, mY, mZ); if (tile instanceof IGregTechTileEntity && !((IGregTechTileEntity) tile).isDead()) { IGregTechTileEntity gtTile = ((IGregTechTileEntity) tile); - gtTile.setCoverDataAtSide(side, coverData); //Set it client side to read later. - + gtTile.setCoverDataAtSide(side, coverData); // Set it client side to read later. + GuiScreen gui = (GuiScreen) getCoverGUI(side, thePlayer, thePlayer.worldObj, gtTile); // If it's one of this mod's covers, tell it to exit to the GUI with the specified ID (-1 is ignored) if (gui instanceof GT_GUICover) { @@ -198,7 +210,12 @@ public class GT_Packet_TileEntityCoverGUI extends GT_Packet_New { GT_CoverBehaviorBase<?> cover = aGtTile.getCoverBehaviorAtSideNew(aSide); if (cover.hasCoverGUI()) { return cover.getClientGUI( - aSide, aGtTile.getCoverIDAtSide(aSide), aGtTile.getComplexCoverDataAtSide(aSide), aGtTile, aPlayer, aWorld); + aSide, + aGtTile.getCoverIDAtSide(aSide), + aGtTile.getComplexCoverDataAtSide(aSide), + aGtTile, + aPlayer, + aWorld); } return null; } diff --git a/src/main/java/gregtech/api/net/GT_Packet_TileEntityCoverNew.java b/src/main/java/gregtech/api/net/GT_Packet_TileEntityCoverNew.java index f600fb1d82..2b2338d4ce 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_TileEntityCoverNew.java +++ b/src/main/java/gregtech/api/net/GT_Packet_TileEntityCoverNew.java @@ -17,7 +17,6 @@ import net.minecraftforge.common.DimensionManager; /** * Client -> Server: Update cover data */ - public class GT_Packet_TileEntityCoverNew extends GT_Packet_New { protected int mX; protected short mY; @@ -33,7 +32,8 @@ public class GT_Packet_TileEntityCoverNew extends GT_Packet_New { super(true); } - public GT_Packet_TileEntityCoverNew(int mX, short mY, int mZ, byte coverSide, int coverID, ISerializableObject coverData, int dimID) { + public GT_Packet_TileEntityCoverNew( + int mX, short mY, int mZ, byte coverSide, int coverID, ISerializableObject coverData, int dimID) { super(false); this.mX = mX; this.mY = mY; @@ -45,6 +45,7 @@ public class GT_Packet_TileEntityCoverNew extends GT_Packet_New { this.dimID = dimID; } + public GT_Packet_TileEntityCoverNew(byte coverSide, int coverID, ISerializableObject coverData, ICoverable tile) { super(false); this.mX = tile.getXCoord(); @@ -90,18 +91,16 @@ public class GT_Packet_TileEntityCoverNew extends GT_Packet_New { aData.readInt(), aData.readShort(), aData.readInt(), - aData.readByte(), coverId = aData.readInt(), GregTech_API.getCoverBehaviorNew(coverId).createDataObject().readFromPacket(aData, mPlayer), - aData.readInt()); } @Override public void process(IBlockAccess aWorld) { if (mPlayer == null) // impossible, but who knows - return; + return; World world = DimensionManager.getWorld(dimID); if (world != null) { TileEntity tile = world.getTileEntity(mX, mY, mZ); diff --git a/src/main/java/gregtech/api/net/GT_Packet_UpdateItem.java b/src/main/java/gregtech/api/net/GT_Packet_UpdateItem.java index 537f62ccec..db94051946 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_UpdateItem.java +++ b/src/main/java/gregtech/api/net/GT_Packet_UpdateItem.java @@ -16,46 +16,46 @@ import net.minecraft.world.IBlockAccess; * Client -> Server: send arbitrary data to server and update the currently held item. */ public class GT_Packet_UpdateItem extends GT_Packet_New { - private NBTTagCompound tag; - private EntityPlayerMP mPlayer; - - public GT_Packet_UpdateItem() { - super(true); - } - - public GT_Packet_UpdateItem(NBTTagCompound tag) { - super(false); - this.tag = tag; - } - - @Override - public byte getPacketID() { - return 13; - } - - @Override - public void setINetHandler(INetHandler aHandler) { - if (aHandler instanceof NetHandlerPlayServer) { - mPlayer = ((NetHandlerPlayServer) aHandler).playerEntity; - } - } - - @Override - public void encode(ByteBuf aOut) { - ByteBufUtils.writeTag(aOut, tag); - } - - @Override - public GT_Packet_New decode(ByteArrayDataInput aData) { - return new GT_Packet_UpdateItem(ISerializableObject.readCompoundTagFromGreggyByteBuf(aData)); - } - - @Override - public void process(IBlockAccess aWorld) { - if (mPlayer == null) return; - ItemStack stack = mPlayer.inventory.getCurrentItem(); - if (stack != null && stack.getItem() instanceof INetworkUpdatableItem) { - ((INetworkUpdatableItem) stack.getItem()).receive(stack, mPlayer, tag); - } - } + private NBTTagCompound tag; + private EntityPlayerMP mPlayer; + + public GT_Packet_UpdateItem() { + super(true); + } + + public GT_Packet_UpdateItem(NBTTagCompound tag) { + super(false); + this.tag = tag; + } + + @Override + public byte getPacketID() { + return 13; + } + + @Override + public void setINetHandler(INetHandler aHandler) { + if (aHandler instanceof NetHandlerPlayServer) { + mPlayer = ((NetHandlerPlayServer) aHandler).playerEntity; + } + } + + @Override + public void encode(ByteBuf aOut) { + ByteBufUtils.writeTag(aOut, tag); + } + + @Override + public GT_Packet_New decode(ByteArrayDataInput aData) { + return new GT_Packet_UpdateItem(ISerializableObject.readCompoundTagFromGreggyByteBuf(aData)); + } + + @Override + public void process(IBlockAccess aWorld) { + if (mPlayer == null) return; + ItemStack stack = mPlayer.inventory.getCurrentItem(); + if (stack != null && stack.getItem() instanceof INetworkUpdatableItem) { + ((INetworkUpdatableItem) stack.getItem()).receive(stack, mPlayer, tag); + } + } } diff --git a/src/main/java/gregtech/api/net/GT_Packet_WirelessRedstoneCover.java b/src/main/java/gregtech/api/net/GT_Packet_WirelessRedstoneCover.java index 3ce0b48821..3d18c9d204 100644 --- a/src/main/java/gregtech/api/net/GT_Packet_WirelessRedstoneCover.java +++ b/src/main/java/gregtech/api/net/GT_Packet_WirelessRedstoneCover.java @@ -25,13 +25,15 @@ public class GT_Packet_WirelessRedstoneCover extends GT_Packet_TileEntityCover { super(); } - public GT_Packet_WirelessRedstoneCover(int mX, short mY, int mZ, byte coverSide, int coverID, int dimID, int publicChannel, int checkBoxValue) { + public GT_Packet_WirelessRedstoneCover( + int mX, short mY, int mZ, byte coverSide, int coverID, int dimID, int publicChannel, int checkBoxValue) { super(mX, mY, mZ, coverSide, coverID, 0, dimID); mPublicChannel = publicChannel; mCheckBoxValue = checkBoxValue; } - public GT_Packet_WirelessRedstoneCover(byte coverSide, int coverID, ICoverable tile, int publicChannel, int checkBoxValue) { + public GT_Packet_WirelessRedstoneCover( + byte coverSide, int coverID, ICoverable tile, int publicChannel, int checkBoxValue) { super(coverSide, coverID, 0, tile); mPublicChannel = publicChannel; mCheckBoxValue = checkBoxValue; @@ -70,12 +72,9 @@ public class GT_Packet_WirelessRedstoneCover extends GT_Packet_TileEntityCover { aData.readInt(), aData.readShort(), aData.readInt(), - aData.readByte(), aData.readInt(), - aData.readInt(), - aData.readInt(), aData.readInt()); } @@ -86,7 +85,8 @@ public class GT_Packet_WirelessRedstoneCover extends GT_Packet_TileEntityCover { if (world != null && world.blockExists(mX, mY, mZ)) { TileEntity tile = world.getTileEntity(mX, mY, mZ); if (tile instanceof IGregTechTileEntity && !((IGregTechTileEntity) tile).isDead()) { - int tPrivateChannel = (mCheckBoxValue > 0) ? mPlayer.getUniqueID().hashCode() & PRIVATE_MASK : 0; + int tPrivateChannel = + (mCheckBoxValue > 0) ? mPlayer.getUniqueID().hashCode() & PRIVATE_MASK : 0; int tCoverData = tPrivateChannel | (mCheckBoxValue & CHECKBOX_MASK) | (mPublicChannel & PUBLIC_MASK); ((IGregTechTileEntity) tile).receiveCoverData(side, coverID, tCoverData); } diff --git a/src/main/java/gregtech/api/objects/AE2DigitalChestHandler.java b/src/main/java/gregtech/api/objects/AE2DigitalChestHandler.java index ad51d307fe..1fe4536085 100644 --- a/src/main/java/gregtech/api/objects/AE2DigitalChestHandler.java +++ b/src/main/java/gregtech/api/objects/AE2DigitalChestHandler.java @@ -6,18 +6,31 @@ import gregtech.common.tileentities.storage.GT_MetaTileEntity_DigitalChestBase; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -@Optional.Interface(iface = "appeng.api.storage.IExternalStorageHandler", modid = "appliedenergistics2", striprefs = true) +@Optional.Interface( + iface = "appeng.api.storage.IExternalStorageHandler", + modid = "appliedenergistics2", + striprefs = true) public class AE2DigitalChestHandler implements appeng.api.storage.IExternalStorageHandler { @Override @Optional.Method(modid = "appliedenergistics2") - public boolean canHandle(final TileEntity te, final ForgeDirection d, final appeng.api.storage.StorageChannel chan, final appeng.api.networking.security.BaseActionSource mySrc) { - return chan == appeng.api.storage.StorageChannel.ITEMS && te instanceof BaseMetaTileEntity && ((BaseMetaTileEntity) te).getMetaTileEntity() instanceof GT_MetaTileEntity_DigitalChestBase; + public boolean canHandle( + final TileEntity te, + final ForgeDirection d, + final appeng.api.storage.StorageChannel chan, + final appeng.api.networking.security.BaseActionSource mySrc) { + return chan == appeng.api.storage.StorageChannel.ITEMS + && te instanceof BaseMetaTileEntity + && ((BaseMetaTileEntity) te).getMetaTileEntity() instanceof GT_MetaTileEntity_DigitalChestBase; } @Override @Optional.Method(modid = "appliedenergistics2") - public appeng.api.storage.IMEInventory getInventory(final TileEntity te, final ForgeDirection d, final appeng.api.storage.StorageChannel chan, final appeng.api.networking.security.BaseActionSource src) { + public appeng.api.storage.IMEInventory getInventory( + final TileEntity te, + final ForgeDirection d, + final appeng.api.storage.StorageChannel chan, + final appeng.api.networking.security.BaseActionSource src) { if (chan == appeng.api.storage.StorageChannel.ITEMS) { return ((GT_MetaTileEntity_DigitalChestBase) (((BaseMetaTileEntity) te).getMetaTileEntity())); } diff --git a/src/main/java/gregtech/api/objects/CollectorUtils.java b/src/main/java/gregtech/api/objects/CollectorUtils.java index 3f89ad0773..41ca5e1e05 100644 --- a/src/main/java/gregtech/api/objects/CollectorUtils.java +++ b/src/main/java/gregtech/api/objects/CollectorUtils.java @@ -20,10 +20,13 @@ public class CollectorUtils { * @return a merge function which always throw {@code IllegalStateException} */ public static <T> BinaryOperator<T> throwingMerger() { - return (u,v) -> { throw new IllegalStateException(String.format("Duplicate key %s", u)); }; + return (u, v) -> { + throw new IllegalStateException(String.format("Duplicate key %s", u)); + }; } - public static <K, V, E extends Map.Entry<K, V>, M extends Map<K, V>> Collector<E, ?, M> entriesToMap(Supplier<M> mapSupplier) { + public static <K, V, E extends Map.Entry<K, V>, M extends Map<K, V>> Collector<E, ?, M> entriesToMap( + Supplier<M> mapSupplier) { return Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, CollectorUtils.throwingMerger(), mapSupplier); } } diff --git a/src/main/java/gregtech/api/objects/ElementStack.java b/src/main/java/gregtech/api/objects/ElementStack.java index d241276103..29f043188c 100644 --- a/src/main/java/gregtech/api/objects/ElementStack.java +++ b/src/main/java/gregtech/api/objects/ElementStack.java @@ -17,7 +17,11 @@ public class ElementStack implements Cloneable { @Override public ElementStack clone() { - try { return (ElementStack) super.clone(); } catch (Exception e) { return new ElementStack(mElement, mAmount); } + try { + return (ElementStack) super.clone(); + } catch (Exception e) { + return new ElementStack(mElement, mAmount); + } } @Override @@ -26,7 +30,10 @@ public class ElementStack implements Cloneable { if (aObject == null) return false; if (aObject instanceof Element) return aObject == mElement; if (aObject instanceof ElementStack) - return ((ElementStack) aObject).mElement == mElement && (mAmount < 0 || ((ElementStack) aObject).mAmount < 0 || ((ElementStack) aObject).mAmount == mAmount); + return ((ElementStack) aObject).mElement == mElement + && (mAmount < 0 + || ((ElementStack) aObject).mAmount < 0 + || ((ElementStack) aObject).mAmount == mAmount); return false; } diff --git a/src/main/java/gregtech/api/objects/GT_ArrayList.java b/src/main/java/gregtech/api/objects/GT_ArrayList.java index a9efd8d0a0..fe6bd4a214 100644 --- a/src/main/java/gregtech/api/objects/GT_ArrayList.java +++ b/src/main/java/gregtech/api/objects/GT_ArrayList.java @@ -1,7 +1,6 @@ package gregtech.api.objects; import com.google.common.collect.Collections2; - import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -21,13 +20,27 @@ public class GT_ArrayList<E> extends ArrayList<E> { public GT_ArrayList(boolean aAllowNulls, E... aArray) { super(Arrays.asList(aArray)); mAllowNulls = aAllowNulls; - if (!mAllowNulls) {size_sS=size(); for (int i = 0; i < size_sS; i++) if (get(i) == null) {remove(i--);size_sS=size();}} + if (!mAllowNulls) { + size_sS = size(); + for (int i = 0; i < size_sS; i++) + if (get(i) == null) { + remove(i--); + size_sS = size(); + } + } } public GT_ArrayList(boolean aAllowNulls, Collection<? extends E> aList) { super(aList); mAllowNulls = aAllowNulls; - if (!mAllowNulls) {size_sS=size(); for (int i = 0; i < size_sS; i++) if (get(i) == null) {remove(i--);size_sS=size();}} + if (!mAllowNulls) { + size_sS = size(); + for (int i = 0; i < size_sS; i++) + if (get(i) == null) { + remove(i--); + size_sS = size(); + } + } } @Override diff --git a/src/main/java/gregtech/api/objects/GT_ChunkManager.java b/src/main/java/gregtech/api/objects/GT_ChunkManager.java index 2f1d2c3381..e06834fe1f 100644 --- a/src/main/java/gregtech/api/objects/GT_ChunkManager.java +++ b/src/main/java/gregtech/api/objects/GT_ChunkManager.java @@ -1,12 +1,16 @@ package gregtech.api.objects; +import com.google.common.collect.ArrayListMultimap; +import com.google.common.collect.ListMultimap; import gregtech.GT_Mod; import gregtech.api.enums.GT_Values; import gregtech.api.interfaces.IChunkLoader; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Log; -import com.google.common.collect.ArrayListMultimap; -import com.google.common.collect.ListMultimap; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.ChunkCoordIntPair; @@ -14,27 +18,24 @@ import net.minecraft.world.World; import net.minecraftforge.common.ForgeChunkManager; import net.minecraftforge.common.ForgeChunkManager.Ticket; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - // This class handles re-initializing chunks after a server restart -public class GT_ChunkManager implements ForgeChunkManager.OrderedLoadingCallback, ForgeChunkManager.PlayerOrderedLoadingCallback { +public class GT_ChunkManager + implements ForgeChunkManager.OrderedLoadingCallback, ForgeChunkManager.PlayerOrderedLoadingCallback { private Map<TileEntity, Ticket> registeredTickets = new HashMap<>(); public static GT_ChunkManager instance = new GT_ChunkManager(); public static void init() { ForgeChunkManager.setForcedChunkLoadingCallback(GT_Mod.instance, instance); - //MinecraftForge.EVENT_BUS.register(instance); + // MinecraftForge.EVENT_BUS.register(instance); } @Override public void ticketsLoaded(List<Ticket> tickets, World world) {} - // Determine if tickets should be kept. Based on if the ticket is a machine or working chunk ticket. Working chunk tickets are tossed - // and re-created when the machine re-activates. Machine tickets are kept only if the config alwaysReloadChunkloaders is true. Otherwise + // Determine if tickets should be kept. Based on if the ticket is a machine or working chunk ticket. Working chunk + // tickets are tossed + // and re-created when the machine re-activates. Machine tickets are kept only if the config + // alwaysReloadChunkloaders is true. Otherwise // machine chunks are tossed and re-created only when the machine re-activates, similar to a Passive Anchor. @Override public List<Ticket> ticketsLoaded(List<Ticket> tickets, World world, int maxTicketCount) { @@ -46,23 +47,30 @@ public class GT_ChunkManager implements ForgeChunkManager.OrderedLoadingCallback int z = ticket.getModData().getInteger("OwnerZ"); if (y > 0) { TileEntity tile = world.getTileEntity(x, y, z); - if (tile != null && tile instanceof IGregTechTileEntity && ((IGregTechTileEntity)tile).isAllowedToWork()) { + if (tile != null + && tile instanceof IGregTechTileEntity + && ((IGregTechTileEntity) tile).isAllowedToWork()) { ForgeChunkManager.forceChunk(ticket, new ChunkCoordIntPair(x >> 4, z >> 4)); if (!registeredTickets.containsKey(tile)) { registeredTickets.put(tile, ticket); - if (((IGregTechTileEntity)tile).getMetaTileEntity() instanceof IChunkLoader) - ForgeChunkManager.forceChunk(ticket, ((IChunkLoader)((IGregTechTileEntity)tile).getMetaTileEntity()).getActiveChunk()); + if (((IGregTechTileEntity) tile).getMetaTileEntity() instanceof IChunkLoader) + ForgeChunkManager.forceChunk( + ticket, + ((IChunkLoader) ((IGregTechTileEntity) tile).getMetaTileEntity()) + .getActiveChunk()); validTickets.add(ticket); } } } } } - return validTickets ; + return validTickets; } - // Determine if player tickets should be kept. This is where a ticket list per player would be created and maintained. When - // a player join event occurs, their name/UUID/whatevs is compared against tickets on this list and those tickets reactivated. + // Determine if player tickets should be kept. This is where a ticket list per player would be created and + // maintained. When + // a player join event occurs, their name/UUID/whatevs is compared against tickets on this list and those tickets + // reactivated. // Since that info would be maintained/dealt with on a per-player startup, the list returned back to Forge is empty. @Override public ListMultimap<String, Ticket> playerTicketsLoaded(ListMultimap<String, Ticket> tickets, World world) { @@ -73,27 +81,29 @@ public class GT_ChunkManager implements ForgeChunkManager.OrderedLoadingCallback // Request a chunk to be loaded for this machine // may pass null chunk to load just the machine itself, if "alwaysReloadChunkloaders" is enabled in config public static boolean requestPlayerChunkLoad(TileEntity owner, ChunkCoordIntPair chunkXZ, String player) { - if (!GT_Values.enableChunkloaders) - return false; - if (!GT_Values.alwaysReloadChunkloaders && chunkXZ == null) - return false; + if (!GT_Values.enableChunkloaders) return false; + if (!GT_Values.alwaysReloadChunkloaders && chunkXZ == null) return false; if (GT_Values.debugChunkloaders && chunkXZ != null) - GT_Log.out.println("GT_ChunkManager: Chunk request: (" + chunkXZ.chunkXPos + ", " + chunkXZ.chunkZPos + ")"); + GT_Log.out.println( + "GT_ChunkManager: Chunk request: (" + chunkXZ.chunkXPos + ", " + chunkXZ.chunkZPos + ")"); if (instance.registeredTickets.containsKey(owner)) { ForgeChunkManager.forceChunk(instance.registeredTickets.get(owner), chunkXZ); } else { Ticket ticket; if (player.equals("")) - ticket = ForgeChunkManager.requestTicket(GT_Mod.instance, owner.getWorldObj(), ForgeChunkManager.Type.NORMAL); + ticket = ForgeChunkManager.requestTicket( + GT_Mod.instance, owner.getWorldObj(), ForgeChunkManager.Type.NORMAL); else - ticket = ForgeChunkManager.requestPlayerTicket(GT_Mod.instance, player, owner.getWorldObj(), ForgeChunkManager.Type.NORMAL); + ticket = ForgeChunkManager.requestPlayerTicket( + GT_Mod.instance, player, owner.getWorldObj(), ForgeChunkManager.Type.NORMAL); if (ticket == null) { if (GT_Values.debugChunkloaders) GT_Log.out.println("GT_ChunkManager: ForgeChunkManager.requestTicket failed"); return false; } if (GT_Values.debugChunkloaders) - GT_Log.out.println("GT_ChunkManager: ticket issued for machine at: (" + owner.xCoord + ", " + owner.yCoord + ", " + owner.zCoord + ")" ); + GT_Log.out.println("GT_ChunkManager: ticket issued for machine at: (" + owner.xCoord + ", " + + owner.yCoord + ", " + owner.zCoord + ")"); NBTTagCompound tag = ticket.getModData(); tag.setInteger("OwnerX", owner.xCoord); tag.setInteger("OwnerY", owner.yCoord); @@ -111,25 +121,26 @@ public class GT_ChunkManager implements ForgeChunkManager.OrderedLoadingCallback } public static void releaseChunk(TileEntity owner, ChunkCoordIntPair chunkXZ) { - if (!GT_Values.enableChunkloaders) - return; + if (!GT_Values.enableChunkloaders) return; Ticket ticket = instance.registeredTickets.get(owner); if (ticket != null) { if (GT_Values.debugChunkloaders) - GT_Log.out.println("GT_ChunkManager: Chunk release: (" + chunkXZ.chunkXPos + ", " + chunkXZ.chunkZPos + ")"); + GT_Log.out.println( + "GT_ChunkManager: Chunk release: (" + chunkXZ.chunkXPos + ", " + chunkXZ.chunkZPos + ")"); ForgeChunkManager.unforceChunk(ticket, chunkXZ); } } public static void releaseTicket(TileEntity owner) { - if (!GT_Values.enableChunkloaders) - return; + if (!GT_Values.enableChunkloaders) return; Ticket ticket = instance.registeredTickets.get(owner); if (ticket != null) { if (GT_Values.debugChunkloaders) { - GT_Log.out.println("GT_ChunkManager: ticket released by machine at: (" + owner.xCoord + ", " + owner.yCoord + ", " + owner.zCoord + ")" ); + GT_Log.out.println("GT_ChunkManager: ticket released by machine at: (" + owner.xCoord + ", " + + owner.yCoord + ", " + owner.zCoord + ")"); for (ChunkCoordIntPair chunk : ticket.getChunkList()) - GT_Log.out.println("GT_ChunkManager: Chunk release: (" + chunk.chunkXPos + ", " + chunk.chunkZPos + ")"); + GT_Log.out.println( + "GT_ChunkManager: Chunk release: (" + chunk.chunkXPos + ", " + chunk.chunkZPos + ")"); } ForgeChunkManager.releaseTicket(ticket); instance.registeredTickets.remove(owner); @@ -139,9 +150,9 @@ public class GT_ChunkManager implements ForgeChunkManager.OrderedLoadingCallback public static void printTickets() { GT_Log.out.println("GT_ChunkManager: Start forced chunks dump:"); instance.registeredTickets.forEach((machine, ticket) -> { - GT_Log.out.print("GT_ChunkManager: Chunks forced by the machine at (" + machine.xCoord + ", " + machine.yCoord + ", " + machine.zCoord + ")"); - if (ticket.isPlayerTicket()) - GT_Log.out.print(" Owner: " + ticket.getPlayerName()); + GT_Log.out.print("GT_ChunkManager: Chunks forced by the machine at (" + machine.xCoord + ", " + + machine.yCoord + ", " + machine.zCoord + ")"); + if (ticket.isPlayerTicket()) GT_Log.out.print(" Owner: " + ticket.getPlayerName()); GT_Log.out.print(" :"); for (ChunkCoordIntPair c : ticket.getChunkList()) { GT_Log.out.print("("); diff --git a/src/main/java/gregtech/api/objects/GT_CopiedBlockTexture.java b/src/main/java/gregtech/api/objects/GT_CopiedBlockTexture.java index 317cc04066..cfecc9d736 100644 --- a/src/main/java/gregtech/api/objects/GT_CopiedBlockTexture.java +++ b/src/main/java/gregtech/api/objects/GT_CopiedBlockTexture.java @@ -4,14 +4,14 @@ import gregtech.api.enums.Dyes; import gregtech.api.interfaces.ITexture; import net.minecraft.block.Block; - /** * @deprecated Replaced by the {@link gregtech.api.render.TextureFactory} API. */ @Deprecated public class GT_CopiedBlockTexture extends gregtech.common.render.GT_CopiedBlockTexture implements ITexture { // Backwards Compat - @Deprecated public short[] mRGBa; + @Deprecated + public short[] mRGBa; public GT_CopiedBlockTexture(Block aBlock, int aSide, int aMeta, short[] aRGBa, boolean aAllowAlpha) { super(aBlock, aSide, aMeta, aRGBa, aAllowAlpha); diff --git a/src/main/java/gregtech/api/objects/GT_Cover_Default.java b/src/main/java/gregtech/api/objects/GT_Cover_Default.java index 79db764449..a975de9759 100644 --- a/src/main/java/gregtech/api/objects/GT_Cover_Default.java +++ b/src/main/java/gregtech/api/objects/GT_Cover_Default.java @@ -20,9 +20,22 @@ public class GT_Cover_Default extends GT_CoverBehavior { } @Override - public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public int onCoverScrewdriverclick( + byte aSide, + int aCoverID, + int aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { aCoverVariable = ((aCoverVariable + 1) & 15); - GT_Utility.sendChatToPlayer(aPlayer, ((aCoverVariable & 1) != 0 ? GT_Utility.trans("128", "Redstone ") : "") + ((aCoverVariable & 2) != 0 ? GT_Utility.trans("129", "Energy ") : "") + ((aCoverVariable & 4) != 0 ? GT_Utility.trans("130", "Fluids ") : "") + ((aCoverVariable & 8) != 0 ? GT_Utility.trans("131", "Items ") : "")); + GT_Utility.sendChatToPlayer( + aPlayer, + ((aCoverVariable & 1) != 0 ? GT_Utility.trans("128", "Redstone ") : "") + + ((aCoverVariable & 2) != 0 ? GT_Utility.trans("129", "Energy ") : "") + + ((aCoverVariable & 4) != 0 ? GT_Utility.trans("130", "Fluids ") : "") + + ((aCoverVariable & 8) != 0 ? GT_Utility.trans("131", "Items ") : "")); return aCoverVariable; } diff --git a/src/main/java/gregtech/api/objects/GT_Cover_None.java b/src/main/java/gregtech/api/objects/GT_Cover_None.java index 073b51511d..dac48449d1 100644 --- a/src/main/java/gregtech/api/objects/GT_Cover_None.java +++ b/src/main/java/gregtech/api/objects/GT_Cover_None.java @@ -1,5 +1,7 @@ package gregtech.api.objects; +import static gregtech.api.enums.GT_Values.E; + import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.util.GT_CoverBehavior; import gregtech.api.util.ISerializableObject; @@ -8,15 +10,12 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.fluids.Fluid; -import static gregtech.api.enums.GT_Values.E; - public class GT_Cover_None extends GT_CoverBehavior { /** * This is the Dummy, if there is no Cover */ - public GT_Cover_None() { - } + public GT_Cover_None() {} @Override public float getBlastProofLevel(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { @@ -69,22 +68,33 @@ public class GT_Cover_None extends GT_CoverBehavior { } @Override - public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + public boolean manipulatesSidedRedstoneOutput( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return false; } @Override - public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public boolean onCoverRightclick( + byte aSide, + int aCoverID, + int aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { return false; } @Override - public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) { + public boolean onCoverRemoval( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) { return true; } @Override - public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public int doCoverThings( + byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { return 0; } @@ -94,132 +104,214 @@ public class GT_Cover_None extends GT_CoverBehavior { } @Override - protected boolean isRedstoneSensitiveImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, long aTimer) { + protected boolean isRedstoneSensitiveImpl( + byte aSide, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + ICoverable aTileEntity, + long aTimer) { return false; } @Override - protected ISerializableObject.LegacyCoverData doCoverThingsImpl(byte aSide, byte aInputRedstone, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, long aTimer) { + protected ISerializableObject.LegacyCoverData doCoverThingsImpl( + byte aSide, + byte aInputRedstone, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + ICoverable aTileEntity, + long aTimer) { return aCoverVariable; } @Override - protected boolean onCoverRightClickImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + protected boolean onCoverRightClickImpl( + byte aSide, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { return false; } @Override - protected ISerializableObject.LegacyCoverData onCoverScrewdriverClickImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + protected ISerializableObject.LegacyCoverData onCoverScrewdriverClickImpl( + byte aSide, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { return aCoverVariable; } @Override - protected boolean onCoverShiftRightClickImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer) { + protected boolean onCoverShiftRightClickImpl( + byte aSide, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer) { return false; } @Override - protected Object getClientGUIImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, World aWorld) { + protected Object getClientGUIImpl( + byte aSide, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + World aWorld) { return null; } @Override - protected boolean onCoverRemovalImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, boolean aForced) { + protected boolean onCoverRemovalImpl( + byte aSide, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + ICoverable aTileEntity, + boolean aForced) { return true; } @Override - protected String getDescriptionImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected String getDescriptionImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return E; } @Override - protected float getBlastProofLevelImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected float getBlastProofLevelImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return 10.0F; } @Override - protected boolean letsRedstoneGoInImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected boolean letsRedstoneGoInImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return true; } @Override - protected boolean letsRedstoneGoOutImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected boolean letsRedstoneGoOutImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return true; } @Override - protected boolean letsFibreGoInImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected boolean letsFibreGoInImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return true; } @Override - protected boolean letsFibreGoOutImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected boolean letsFibreGoOutImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return true; } @Override - protected boolean letsEnergyInImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected boolean letsEnergyInImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return true; } @Override - protected boolean letsEnergyOutImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected boolean letsEnergyOutImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return true; } @Override - protected boolean letsFluidInImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + protected boolean letsFluidInImpl( + byte aSide, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + Fluid aFluid, + ICoverable aTileEntity) { return true; } @Override - protected boolean letsFluidOutImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + protected boolean letsFluidOutImpl( + byte aSide, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + Fluid aFluid, + ICoverable aTileEntity) { return true; } @Override - protected boolean letsItemsInImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, int aSlot, ICoverable aTileEntity) { + protected boolean letsItemsInImpl( + byte aSide, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + int aSlot, + ICoverable aTileEntity) { return true; } @Override - protected boolean letsItemsOutImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, int aSlot, ICoverable aTileEntity) { + protected boolean letsItemsOutImpl( + byte aSide, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + int aSlot, + ICoverable aTileEntity) { return true; } @Override - protected boolean isGUIClickableImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected boolean isGUIClickableImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return true; } @Override - protected boolean manipulatesSidedRedstoneOutputImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected boolean manipulatesSidedRedstoneOutputImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return false; } @Override - protected boolean alwaysLookConnectedImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected boolean alwaysLookConnectedImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return false; } @Override - protected byte getRedstoneInputImpl(byte aSide, byte aInputRedstone, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected byte getRedstoneInputImpl( + byte aSide, + byte aInputRedstone, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + ICoverable aTileEntity) { return aInputRedstone; } @Override - protected int getTickRateImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected int getTickRateImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return 0; } @Override - protected byte getLensColorImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected byte getLensColorImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return -1; } @Override - protected ItemStack getDropImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected ItemStack getDropImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return null; } } diff --git a/src/main/java/gregtech/api/objects/GT_Fluid.java b/src/main/java/gregtech/api/objects/GT_Fluid.java index 4f5c2a3ca2..52b58d38cc 100644 --- a/src/main/java/gregtech/api/objects/GT_Fluid.java +++ b/src/main/java/gregtech/api/objects/GT_Fluid.java @@ -1,10 +1,10 @@ package gregtech.api.objects; +import static gregtech.api.enums.GT_Values.RES_PATH_BLOCK; + import gregtech.api.GregTech_API; import net.minecraftforge.fluids.Fluid; -import static gregtech.api.enums.GT_Values.RES_PATH_BLOCK; - public class GT_Fluid extends Fluid implements Runnable { public final String mTextureName; private final short[] mRGBa; @@ -18,7 +18,9 @@ public class GT_Fluid extends Fluid implements Runnable { @Override public int getColor() { - return (Math.max(0, Math.min(255, mRGBa[0])) << 16) | (Math.max(0, Math.min(255, mRGBa[1])) << 8) | Math.max(0, Math.min(255, mRGBa[2])); + return (Math.max(0, Math.min(255, mRGBa[0])) << 16) + | (Math.max(0, Math.min(255, mRGBa[1])) << 8) + | Math.max(0, Math.min(255, mRGBa[2])); } @Override diff --git a/src/main/java/gregtech/api/objects/GT_FluidStack.java b/src/main/java/gregtech/api/objects/GT_FluidStack.java index 8771b504cf..8f796430e5 100644 --- a/src/main/java/gregtech/api/objects/GT_FluidStack.java +++ b/src/main/java/gregtech/api/objects/GT_FluidStack.java @@ -3,27 +3,29 @@ package gregtech.api.objects; import gregtech.api.GregTech_API; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_Utility; -import net.minecraftforge.common.ForgeVersion; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; - import java.util.Collection; import java.util.Collections; import java.util.Map; import java.util.WeakHashMap; +import net.minecraftforge.common.ForgeVersion; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; /** * Because Forge fucked this one up royally. */ public class GT_FluidStack extends FluidStack { - private static final Collection<GT_FluidStack> sAllFluidStacks = Collections.newSetFromMap(new WeakHashMap<>(10000)); + private static final Collection<GT_FluidStack> sAllFluidStacks = + Collections.newSetFromMap(new WeakHashMap<>(10000)); private static volatile boolean lock = false; private Fluid mFluid; public GT_FluidStack(Fluid aFluid, int aAmount) { super(aFluid, aAmount); mFluid = aFluid; - if(!GregTech_API.mServerStarted){sAllFluidStacks.add(this);} + if (!GregTech_API.mServerStarted) { + sAllFluidStacks.add(this); + } } public GT_FluidStack(FluidStack aFluid) { @@ -35,13 +37,16 @@ public class GT_FluidStack extends FluidStack { try { while (lock) { Thread.sleep(1); - }} catch (InterruptedException e) {} + } + } catch (InterruptedException e) { + } lock = true; for (GT_FluidStack tFluid : sAllFluidStacks) tFluid.fixFluidIDForFucksSake(); try { - for (Map<Fluid, ?> tMap : GregTech_API.sFluidMappings) - GT_Utility.reMap(tMap); - } catch (Throwable e) {e.printStackTrace(GT_Log.err);} + for (Map<Fluid, ?> tMap : GregTech_API.sFluidMappings) GT_Utility.reMap(tMap); + } catch (Throwable e) { + e.printStackTrace(GT_Log.err); + } lock = false; } } @@ -72,6 +77,7 @@ public class GT_FluidStack extends FluidStack { @Override public String toString() { - return String.format("GT_FluidStack: %s x %s, ID:%s", this.amount, this.getFluid().getName(), this.getFluidID()); + return String.format( + "GT_FluidStack: %s x %s, ID:%s", this.amount, this.getFluid().getName(), this.getFluidID()); } } diff --git a/src/main/java/gregtech/api/objects/GT_HashSet.java b/src/main/java/gregtech/api/objects/GT_HashSet.java index c0a8e3994d..01c4b00995 100644 --- a/src/main/java/gregtech/api/objects/GT_HashSet.java +++ b/src/main/java/gregtech/api/objects/GT_HashSet.java @@ -2,9 +2,8 @@ package gregtech.api.objects; import gregtech.api.GregTech_API; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; - import java.util.*; +import net.minecraft.item.ItemStack; public class GT_HashSet<E extends GT_ItemStack> extends AbstractSet<E> { private static final Object OBJECT = new Object(); diff --git a/src/main/java/gregtech/api/objects/GT_ItemStack.java b/src/main/java/gregtech/api/objects/GT_ItemStack.java index 3e25454fa1..a6c892c4f9 100644 --- a/src/main/java/gregtech/api/objects/GT_ItemStack.java +++ b/src/main/java/gregtech/api/objects/GT_ItemStack.java @@ -22,7 +22,10 @@ public class GT_ItemStack { } public GT_ItemStack(ItemStack aStack, boolean wildcard) { - this(aStack == null ? null : aStack.getItem(), aStack == null ? 0 : aStack.stackSize, aStack == null ? 0 : wildcard ? GT_Values.W : Items.feather.getDamage(aStack)); + this( + aStack == null ? null : aStack.getItem(), + aStack == null ? 0 : aStack.stackSize, + aStack == null ? 0 : wildcard ? GT_Values.W : Items.feather.getDamage(aStack)); } public GT_ItemStack(int aHashCode) { diff --git a/src/main/java/gregtech/api/objects/GT_MultiTexture.java b/src/main/java/gregtech/api/objects/GT_MultiTexture.java index 51ab7615b4..82df899135 100644 --- a/src/main/java/gregtech/api/objects/GT_MultiTexture.java +++ b/src/main/java/gregtech/api/objects/GT_MultiTexture.java @@ -5,7 +5,7 @@ import gregtech.api.interfaces.ITexture; /** * <p>Lets Multiple ITextures Render overlay over each other.<</p> * <p>I should have done this much earlier...</p> - * @deprecated Replaced by the {@link gregtech.api.render.TextureFactory} API. + * @deprecated Replaced by the {@link gregtech.api.render.TextureFactory} API. */ @Deprecated public class GT_MultiTexture extends gregtech.common.render.GT_MultiTexture implements ITexture { diff --git a/src/main/java/gregtech/api/objects/GT_RenderedTexture.java b/src/main/java/gregtech/api/objects/GT_RenderedTexture.java index 1f123274f4..4c17afde17 100644 --- a/src/main/java/gregtech/api/objects/GT_RenderedTexture.java +++ b/src/main/java/gregtech/api/objects/GT_RenderedTexture.java @@ -6,8 +6,10 @@ import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.ITexture; @Deprecated -public class GT_RenderedTexture extends gregtech.common.render.GT_RenderedTexture implements ITexture, IColorModulationContainer { - @Deprecated public short[] mRGBa; +public class GT_RenderedTexture extends gregtech.common.render.GT_RenderedTexture + implements ITexture, IColorModulationContainer { + @Deprecated + public short[] mRGBa; public GT_RenderedTexture(IIconContainer aIcon, short[] aRGBa, boolean aAllowAlpha) { super(aIcon, aRGBa, aAllowAlpha, false, true, false); diff --git a/src/main/java/gregtech/api/objects/GT_SidedTexture.java b/src/main/java/gregtech/api/objects/GT_SidedTexture.java index 3c699a3f4b..25b941e968 100644 --- a/src/main/java/gregtech/api/objects/GT_SidedTexture.java +++ b/src/main/java/gregtech/api/objects/GT_SidedTexture.java @@ -9,21 +9,44 @@ import gregtech.api.interfaces.ITexture; * @deprecated Replaced by the {@link gregtech.api.render.TextureFactory} API. */ @Deprecated -public class GT_SidedTexture extends gregtech.common.render.GT_SidedTexture implements ITexture, IColorModulationContainer { - @Deprecated public short[] mRGBa; +public class GT_SidedTexture extends gregtech.common.render.GT_SidedTexture + implements ITexture, IColorModulationContainer { + @Deprecated + public short[] mRGBa; - public GT_SidedTexture(IIconContainer aIcon0, IIconContainer aIcon1, IIconContainer aIcon2, IIconContainer aIcon3, IIconContainer aIcon4, IIconContainer aIcon5, short[] aRGBa, boolean aAllowAlpha) { + public GT_SidedTexture( + IIconContainer aIcon0, + IIconContainer aIcon1, + IIconContainer aIcon2, + IIconContainer aIcon3, + IIconContainer aIcon4, + IIconContainer aIcon5, + short[] aRGBa, + boolean aAllowAlpha) { super(aIcon0, aIcon1, aIcon2, aIcon3, aIcon4, aIcon5, aRGBa, aAllowAlpha); // Backwards Compat GT_SidedTexture.this.mRGBa = aRGBa; } - public GT_SidedTexture(IIconContainer aIcon0, IIconContainer aIcon1, IIconContainer aIcon2, IIconContainer aIcon3, IIconContainer aIcon4, IIconContainer aIcon5, short[] aRGBa) { + public GT_SidedTexture( + IIconContainer aIcon0, + IIconContainer aIcon1, + IIconContainer aIcon2, + IIconContainer aIcon3, + IIconContainer aIcon4, + IIconContainer aIcon5, + short[] aRGBa) { this(aIcon0, aIcon1, aIcon2, aIcon3, aIcon4, aIcon5, aRGBa, true); } - public GT_SidedTexture(IIconContainer aIcon0, IIconContainer aIcon1, IIconContainer aIcon2, IIconContainer aIcon3, IIconContainer aIcon4, IIconContainer aIcon5) { + public GT_SidedTexture( + IIconContainer aIcon0, + IIconContainer aIcon1, + IIconContainer aIcon2, + IIconContainer aIcon3, + IIconContainer aIcon4, + IIconContainer aIcon5) { this(aIcon0, aIcon1, aIcon2, aIcon3, aIcon4, aIcon5, Dyes._NULL.mRGBa); } diff --git a/src/main/java/gregtech/api/objects/GT_StdRenderedTexture.java b/src/main/java/gregtech/api/objects/GT_StdRenderedTexture.java index 0dd405c792..3966b060a3 100644 --- a/src/main/java/gregtech/api/objects/GT_StdRenderedTexture.java +++ b/src/main/java/gregtech/api/objects/GT_StdRenderedTexture.java @@ -15,7 +15,7 @@ import net.minecraftforge.common.util.ForgeDirection; * @deprecated Replaced by the {@link gregtech.api.render.TextureFactory} API. */ @Deprecated -public class GT_StdRenderedTexture extends GT_RenderedTexture{ +public class GT_StdRenderedTexture extends GT_RenderedTexture { @SuppressWarnings("unused") public GT_StdRenderedTexture(IIconContainer aIcon, short[] aRGBa, boolean aAllowAlpha) { @@ -34,8 +34,7 @@ public class GT_StdRenderedTexture extends GT_RenderedTexture{ @Override public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { LightingHelper lighting = new LightingHelper(aRenderer); - lighting.setupLightingYNeg(aBlock, aX, aY, aZ) - .setupColor(ForgeDirection.DOWN.ordinal(), mRGBa); + lighting.setupLightingYNeg(aBlock, aX, aY, aZ).setupColor(ForgeDirection.DOWN.ordinal(), mRGBa); aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, mIconContainer.getIcon()); if (mIconContainer.getOverlayIcon() != null) { lighting.setupColor(ForgeDirection.DOWN.ordinal(), 0xffffff); diff --git a/src/main/java/gregtech/api/objects/GT_UO_Dimension.java b/src/main/java/gregtech/api/objects/GT_UO_Dimension.java index 0d05e6d229..f449478860 100644 --- a/src/main/java/gregtech/api/objects/GT_UO_Dimension.java +++ b/src/main/java/gregtech/api/objects/GT_UO_Dimension.java @@ -2,48 +2,47 @@ package gregtech.api.objects; import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; -import net.minecraftforge.common.config.ConfigCategory; - import java.util.Random; +import net.minecraftforge.common.config.ConfigCategory; public class GT_UO_Dimension { - private BiMap<String, GT_UO_Fluid> fFluids; - private int maxChance; - public String Dimension = "null"; + private BiMap<String, GT_UO_Fluid> fFluids; + private int maxChance; + public String Dimension = "null"; + + public GT_UO_Dimension(ConfigCategory aConfigCategory) { // TODO CONFIGURE + fFluids = HashBiMap.create(); + if (aConfigCategory.containsKey("Dimension")) { + aConfigCategory.get("Dimension").comment = "Dimension ID or Class Name"; + Dimension = aConfigCategory.get("Dimension").getString(); + } + maxChance = 0; + // GT_FML_LOGGER.info("GT UO "+aConfigCategory.getName()+" Dimension:"+Dimension); + for (int i = 0; i < aConfigCategory.getChildren().size(); i++) { + GT_UO_Fluid fluid = new GT_UO_Fluid( + (ConfigCategory) aConfigCategory.getChildren().toArray()[i]); + fFluids.put(fluid.Registry, fluid); + maxChance += fluid.Chance; + } + } - public GT_UO_Dimension(ConfigCategory aConfigCategory) {//TODO CONFIGURE - fFluids = HashBiMap.create(); - if (aConfigCategory.containsKey("Dimension")) - { - aConfigCategory.get("Dimension").comment = "Dimension ID or Class Name"; - Dimension = aConfigCategory.get("Dimension").getString(); - } - maxChance = 0; - //GT_FML_LOGGER.info("GT UO "+aConfigCategory.getName()+" Dimension:"+Dimension); - for (int i = 0 ; i < aConfigCategory.getChildren().size(); i++) { - GT_UO_Fluid fluid = new GT_UO_Fluid((ConfigCategory)aConfigCategory.getChildren().toArray()[i]); - fFluids.put(fluid.Registry, fluid); - maxChance += fluid.Chance; - } - } - - public GT_UO_Fluid getRandomFluid (Random aRandom) { - int random = aRandom.nextInt(1000); - for (BiMap.Entry<String, GT_UO_Fluid> fl : fFluids.entrySet()) { - int chance = fl.getValue().Chance*1000/maxChance; - if (random<=chance) return fl.getValue(); - //GT_FML_LOGGER.info("GT UO "+fl.getValue().Registry+" Chance:"+chance+" Random:"+random); - random-=chance; - } - return null; - } + public GT_UO_Fluid getRandomFluid(Random aRandom) { + int random = aRandom.nextInt(1000); + for (BiMap.Entry<String, GT_UO_Fluid> fl : fFluids.entrySet()) { + int chance = fl.getValue().Chance * 1000 / maxChance; + if (random <= chance) return fl.getValue(); + // GT_FML_LOGGER.info("GT UO "+fl.getValue().Registry+" Chance:"+chance+" Random:"+random); + random -= chance; + } + return null; + } - public String getUOFluidKey(GT_UO_Fluid uoFluid) { - return fFluids.inverse().get(uoFluid); - } + public String getUOFluidKey(GT_UO_Fluid uoFluid) { + return fFluids.inverse().get(uoFluid); + } - public GT_UO_Fluid getUOFluid(String key) { - return fFluids.get(key); - } + public GT_UO_Fluid getUOFluid(String key) { + return fFluids.get(key); + } } diff --git a/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java b/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java index a2cd2354d8..44b56938b4 100644 --- a/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java +++ b/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java @@ -8,74 +8,85 @@ import net.minecraftforge.common.config.Configuration; public class GT_UO_DimensionList { - private Configuration fConfig; - private String fCategory; - private BiMap<String, GT_UO_Dimension> fDimensionList; + private Configuration fConfig; + private String fCategory; + private BiMap<String, GT_UO_Dimension> fDimensionList; - public int[] blackList =new int[0]; - - public GT_UO_DimensionList() { - fDimensionList = HashBiMap.create(); - } + public int[] blackList = new int[0]; - public GT_UO_Dimension GetDimension(int aDimension) { - if(CheckBlackList(aDimension)) return null; - if (fDimensionList.containsKey(Integer.toString(aDimension))) - return fDimensionList.get(Integer.toString(aDimension)); - for (BiMap.Entry <String, GT_UO_Dimension> dl : fDimensionList.entrySet()) - if (DimensionManager.getProvider(aDimension).getClass().getName().contains(dl.getValue().Dimension)) - return dl.getValue(); - return fDimensionList.get("Default"); - } + public GT_UO_DimensionList() { + fDimensionList = HashBiMap.create(); + } - private boolean CheckBlackList(int aDimensionId){ - try { - return java.util.Arrays.binarySearch(blackList, aDimensionId) >= 0; - } catch (Exception e) { - e.printStackTrace(); - return false; - } - } - - public void SetConfigValues(String aDimensionName, String aDimension, String aName, String aRegistry, int aMinAmount, int aMaxAmount, int aChance, int aDecreasePerOperationAmount) { - String Category = fCategory+"."+aDimensionName; - fConfig.get(Category, "Dimension", aDimension).getString(); - Category+="."+aName; - fConfig.get(Category, "Registry", aRegistry).getString(); - fConfig.get(Category, "MinAmount", aMinAmount).getInt(aMinAmount); - fConfig.get(Category, "MaxAmount", aMaxAmount).getInt(aMaxAmount); - fConfig.get(Category, "Chance", aChance).getInt(aChance); - fConfig.get(Category, "DecreasePerOperationAmount", aDecreasePerOperationAmount).getInt(aDecreasePerOperationAmount); - //IT IS IN BUCKETS!!! - } - - public void SetDafultValues() { - SetConfigValues("Overworld", "0", "gas_natural_gas", "gas_natural_gas", 0, 700, 20, 7); - SetConfigValues("Overworld", "0", "liquid_light_oil", "liquid_light_oil", 0, 650, 20, 6); - SetConfigValues("Overworld", "0", "liquid_medium_oil", "liquid_medium_oil", 0, 600, 20, 5); - SetConfigValues("Overworld", "0", "liquid_heavy_oil", "liquid_heavy_oil", 0, 550, 20, 4); - SetConfigValues("Overworld", "0", "oil", "oil", 0, 600, 20, 5); - SetConfigValues("Moon", "Moon", "helium-3", "helium-3", 24, 128, 100, 1); - } - - public void getConfig(Configuration aConfig, String aCategory) { - fCategory=aCategory; - fConfig = aConfig; - if (!fConfig.hasCategory(fCategory)) - SetDafultValues(); + public GT_UO_Dimension GetDimension(int aDimension) { + if (CheckBlackList(aDimension)) return null; + if (fDimensionList.containsKey(Integer.toString(aDimension))) + return fDimensionList.get(Integer.toString(aDimension)); + for (BiMap.Entry<String, GT_UO_Dimension> dl : fDimensionList.entrySet()) + if (DimensionManager.getProvider(aDimension).getClass().getName().contains(dl.getValue().Dimension)) + return dl.getValue(); + return fDimensionList.get("Default"); + } - fConfig.setCategoryComment(fCategory, "Config Underground Fluids (Delete this Category for regenerate)"); - fConfig.setCategoryComment(fCategory+".Default", "Set Default Generating (Use this Category for Default settings)"); - fConfig.setCategoryComment(fCategory+".Overworld", "Set Overworld Generating"); - fConfig.setCategoryComment(fCategory+".Moon", "Set Moon Generating"); - - blackList = new int[]{-1,1}; - blackList = aConfig.get(fCategory, "DimBlackList", blackList, "Dimension IDs Black List").getIntList(); - java.util.Arrays.sort(blackList); - - for (int i = 0 ; i < fConfig.getCategory(fCategory).getChildren().size(); i++) { - GT_UO_Dimension Dimension = new GT_UO_Dimension((ConfigCategory)fConfig.getCategory(fCategory).getChildren().toArray()[i]); - fDimensionList.put(Dimension.Dimension, Dimension); - } - } + private boolean CheckBlackList(int aDimensionId) { + try { + return java.util.Arrays.binarySearch(blackList, aDimensionId) >= 0; + } catch (Exception e) { + e.printStackTrace(); + return false; + } + } + + public void SetConfigValues( + String aDimensionName, + String aDimension, + String aName, + String aRegistry, + int aMinAmount, + int aMaxAmount, + int aChance, + int aDecreasePerOperationAmount) { + String Category = fCategory + "." + aDimensionName; + fConfig.get(Category, "Dimension", aDimension).getString(); + Category += "." + aName; + fConfig.get(Category, "Registry", aRegistry).getString(); + fConfig.get(Category, "MinAmount", aMinAmount).getInt(aMinAmount); + fConfig.get(Category, "MaxAmount", aMaxAmount).getInt(aMaxAmount); + fConfig.get(Category, "Chance", aChance).getInt(aChance); + fConfig.get(Category, "DecreasePerOperationAmount", aDecreasePerOperationAmount) + .getInt(aDecreasePerOperationAmount); + // IT IS IN BUCKETS!!! + } + + public void SetDafultValues() { + SetConfigValues("Overworld", "0", "gas_natural_gas", "gas_natural_gas", 0, 700, 20, 7); + SetConfigValues("Overworld", "0", "liquid_light_oil", "liquid_light_oil", 0, 650, 20, 6); + SetConfigValues("Overworld", "0", "liquid_medium_oil", "liquid_medium_oil", 0, 600, 20, 5); + SetConfigValues("Overworld", "0", "liquid_heavy_oil", "liquid_heavy_oil", 0, 550, 20, 4); + SetConfigValues("Overworld", "0", "oil", "oil", 0, 600, 20, 5); + SetConfigValues("Moon", "Moon", "helium-3", "helium-3", 24, 128, 100, 1); + } + + public void getConfig(Configuration aConfig, String aCategory) { + fCategory = aCategory; + fConfig = aConfig; + if (!fConfig.hasCategory(fCategory)) SetDafultValues(); + + fConfig.setCategoryComment(fCategory, "Config Underground Fluids (Delete this Category for regenerate)"); + fConfig.setCategoryComment( + fCategory + ".Default", "Set Default Generating (Use this Category for Default settings)"); + fConfig.setCategoryComment(fCategory + ".Overworld", "Set Overworld Generating"); + fConfig.setCategoryComment(fCategory + ".Moon", "Set Moon Generating"); + + blackList = new int[] {-1, 1}; + blackList = aConfig.get(fCategory, "DimBlackList", blackList, "Dimension IDs Black List") + .getIntList(); + java.util.Arrays.sort(blackList); + + for (int i = 0; i < fConfig.getCategory(fCategory).getChildren().size(); i++) { + GT_UO_Dimension Dimension = new GT_UO_Dimension((ConfigCategory) + fConfig.getCategory(fCategory).getChildren().toArray()[i]); + fDimensionList.put(Dimension.Dimension, Dimension); + } + } } diff --git a/src/main/java/gregtech/api/objects/GT_UO_Fluid.java b/src/main/java/gregtech/api/objects/GT_UO_Fluid.java index d06772dc1e..36f98d6cae 100644 --- a/src/main/java/gregtech/api/objects/GT_UO_Fluid.java +++ b/src/main/java/gregtech/api/objects/GT_UO_Fluid.java @@ -1,61 +1,61 @@ package gregtech.api.objects; +import static gregtech.common.GT_UndergroundOil.DIVIDER; + +import java.util.Random; import net.minecraftforge.common.config.ConfigCategory; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; -import java.util.Random; +public class GT_UO_Fluid { + public String Registry = "null"; + public int MaxAmount = 0; + public int MinAmount = 0; + public int Chance = 0; + public int DecreasePerOperationAmount = 5; -import static gregtech.common.GT_UndergroundOil.DIVIDER; + public GT_UO_Fluid(ConfigCategory aConfigCategory) { // TODO CONFIGURE + if (aConfigCategory.containsKey("Registry")) { + aConfigCategory.get("Registry").comment = "Fluid registry name"; + Registry = aConfigCategory.get("Registry").getString(); + } + if (aConfigCategory.containsKey("MaxAmount")) { + aConfigCategory.get("MaxAmount").comment = + "Max amount generation (per operation, sets the VeinData) 80000 MAX"; + MaxAmount = aConfigCategory.get("MaxAmount").getInt(0); + } + if (aConfigCategory.containsKey("MinAmount")) { + aConfigCategory.get("MinAmount").comment = "Min amount generation (per operation, sets the VeinData) 0 MIN"; + MinAmount = aConfigCategory.get("MinAmount").getInt(0); + } + if (aConfigCategory.containsKey("Chance")) { + aConfigCategory.get("Chance").comment = + "Chance generating (weighted chance!, there will be a fluid in chunk always!)"; + Chance = aConfigCategory.get("Chance").getInt(0); + } + if (aConfigCategory.containsKey("DecreasePerOperationAmount")) { + aConfigCategory.get("DecreasePerOperationAmount").comment = + "Decrease per operation (actual fluid gained works like (Litre)VeinData/5000)"; + DecreasePerOperationAmount = + aConfigCategory.get("DecreasePerOperationAmount").getInt(5); + } + // GT_FML_LOGGER.info("GT UO "+aConfigCategory.getName()+" Fluid:"+Registry+" Max:"+MaxAmount+" + // Min:"+MinAmount+" Chance:"+Chance); + } -public class GT_UO_Fluid { - public String Registry = "null"; - public int MaxAmount = 0; - public int MinAmount = 0; - public int Chance = 0; - public int DecreasePerOperationAmount = 5; + public Fluid getFluid() { + try { + return FluidRegistry.getFluid(this.Registry); + } catch (Exception e) { + return null; + } + } - public GT_UO_Fluid(ConfigCategory aConfigCategory) {//TODO CONFIGURE - if (aConfigCategory.containsKey("Registry")) - { - aConfigCategory.get("Registry").comment = "Fluid registry name"; - Registry = aConfigCategory.get("Registry").getString(); - } - if (aConfigCategory.containsKey("MaxAmount")) - { - aConfigCategory.get("MaxAmount").comment = "Max amount generation (per operation, sets the VeinData) 80000 MAX"; - MaxAmount = aConfigCategory.get("MaxAmount").getInt(0); - } - if (aConfigCategory.containsKey("MinAmount")) - { - aConfigCategory.get("MinAmount").comment = "Min amount generation (per operation, sets the VeinData) 0 MIN"; - MinAmount = aConfigCategory.get("MinAmount").getInt(0); - } - if (aConfigCategory.containsKey("Chance")) - { - aConfigCategory.get("Chance").comment = "Chance generating (weighted chance!, there will be a fluid in chunk always!)"; - Chance = aConfigCategory.get("Chance").getInt(0); - } - if (aConfigCategory.containsKey("DecreasePerOperationAmount")) - { - aConfigCategory.get("DecreasePerOperationAmount").comment = "Decrease per operation (actual fluid gained works like (Litre)VeinData/5000)"; - DecreasePerOperationAmount = aConfigCategory.get("DecreasePerOperationAmount").getInt(5); - } - //GT_FML_LOGGER.info("GT UO "+aConfigCategory.getName()+" Fluid:"+Registry+" Max:"+MaxAmount+" Min:"+MinAmount+" Chance:"+Chance); - } - - public Fluid getFluid(){ - try { - return FluidRegistry.getFluid(this.Registry); - } catch (Exception e) { - return null; - } - } - - public int getRandomAmount(Random aRandom){//generates some random ass number that correlates to extraction speeds - int div = (int)Math.floor(Math.pow((MaxAmount-MinAmount)*100.d*DIVIDER, 0.2d)); - int min = (int)Math.floor(Math.pow(MinAmount*100.d*DIVIDER, 0.2d)); - double amount = min+aRandom.nextInt(div)+aRandom.nextDouble(); - return (int) (Math.pow(amount, 5) / 100);//reverses the computation above - } + public int getRandomAmount( + Random aRandom) { // generates some random ass number that correlates to extraction speeds + int div = (int) Math.floor(Math.pow((MaxAmount - MinAmount) * 100.d * DIVIDER, 0.2d)); + int min = (int) Math.floor(Math.pow(MinAmount * 100.d * DIVIDER, 0.2d)); + double amount = min + aRandom.nextInt(div) + aRandom.nextDouble(); + return (int) (Math.pow(amount, 5) / 100); // reverses the computation above + } } diff --git a/src/main/java/gregtech/api/objects/ItemData.java b/src/main/java/gregtech/api/objects/ItemData.java index ce77d222aa..cf3c2b5c14 100644 --- a/src/main/java/gregtech/api/objects/ItemData.java +++ b/src/main/java/gregtech/api/objects/ItemData.java @@ -2,9 +2,8 @@ package gregtech.api.objects; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; -import net.minecraft.item.ItemStack; - import java.util.*; +import net.minecraft.item.ItemStack; public class ItemData { private static final MaterialStack[] EMPTY_MATERIALSTACK_ARRAY = new MaterialStack[0]; @@ -20,7 +19,9 @@ public class ItemData { mPrefix = aPrefix; mMaterial = aMaterial == null ? null : new MaterialStack(aMaterial, aPrefix.mMaterialAmount); mBlackListed = aBlackListed; - mByProducts = aPrefix.mSecondaryMaterial == null || aPrefix.mSecondaryMaterial.mMaterial == null ? EMPTY_MATERIALSTACK_ARRAY : new MaterialStack[]{aPrefix.mSecondaryMaterial.clone()}; + mByProducts = aPrefix.mSecondaryMaterial == null || aPrefix.mSecondaryMaterial.mMaterial == null + ? EMPTY_MATERIALSTACK_ARRAY + : new MaterialStack[] {aPrefix.mSecondaryMaterial.clone()}; } public ItemData(OrePrefixes aPrefix, Materials aMaterial) { @@ -34,7 +35,8 @@ public class ItemData { if (aByProducts == null) { mByProducts = EMPTY_MATERIALSTACK_ARRAY; } else { - MaterialStack[] tByProducts = aByProducts.length < 1 ? EMPTY_MATERIALSTACK_ARRAY : new MaterialStack[aByProducts.length]; + MaterialStack[] tByProducts = + aByProducts.length < 1 ? EMPTY_MATERIALSTACK_ARRAY : new MaterialStack[aByProducts.length]; int j = 0; for (int i = 0; i < aByProducts.length; i++) if (aByProducts[i] != null && aByProducts[i].mMaterial != null) diff --git a/src/main/java/gregtech/api/objects/MaterialStack.java b/src/main/java/gregtech/api/objects/MaterialStack.java index e4c135cc73..3e68105f0e 100644 --- a/src/main/java/gregtech/api/objects/MaterialStack.java +++ b/src/main/java/gregtech/api/objects/MaterialStack.java @@ -18,7 +18,11 @@ public class MaterialStack implements Cloneable { @Override public MaterialStack clone() { - try { return (MaterialStack) super.clone(); } catch (Exception e) { return new MaterialStack(mMaterial, mAmount); } + try { + return (MaterialStack) super.clone(); + } catch (Exception e) { + return new MaterialStack(mMaterial, mAmount); + } } @Override @@ -27,34 +31,38 @@ public class MaterialStack implements Cloneable { if (aObject == null) return false; if (aObject instanceof Materials) return aObject == mMaterial; if (aObject instanceof MaterialStack) - return ((MaterialStack) aObject).mMaterial == mMaterial && (mAmount < 0 || ((MaterialStack) aObject).mAmount < 0 || ((MaterialStack) aObject).mAmount == mAmount); + return ((MaterialStack) aObject).mMaterial == mMaterial + && (mAmount < 0 + || ((MaterialStack) aObject).mAmount < 0 + || ((MaterialStack) aObject).mAmount == mAmount); return false; } @Override public String toString() { - String temp1 = "", temp2 = mMaterial.getToolTip(true), temp3 = "", temp4 = ""; - if (mAmount > 1) { - temp4 = GT_Utility.toSubscript(mAmount); - - if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) { + String temp1 = "", temp2 = mMaterial.getToolTip(true), temp3 = "", temp4 = ""; + if (mAmount > 1) { + temp4 = GT_Utility.toSubscript(mAmount); + + if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) { temp1 = "("; temp3 = ")"; - } - } - return String.valueOf(new StringBuilder().append(temp1).append(temp2).append(temp3).append(temp4)); + } + } + return String.valueOf( + new StringBuilder().append(temp1).append(temp2).append(temp3).append(temp4)); } - private boolean isMaterialListComplex(MaterialStack materialStack){ - if (materialStack.mMaterial.mMaterialList.size() > 1) { - return true; - } - if (materialStack.mMaterial.mMaterialList.size() == 0) { - return false; - } - return isMaterialListComplex(materialStack.mMaterial.mMaterialList.get(0)); + private boolean isMaterialListComplex(MaterialStack materialStack) { + if (materialStack.mMaterial.mMaterialList.size() > 1) { + return true; + } + if (materialStack.mMaterial.mMaterialList.size() == 0) { + return false; + } + return isMaterialListComplex(materialStack.mMaterial.mMaterialList.get(0)); } - + @Override public int hashCode() { return mMaterial.hashCode(); diff --git a/src/main/java/gregtech/api/objects/ObjMap.java b/src/main/java/gregtech/api/objects/ObjMap.java index 0db6083cfe..0a3b3a8fbe 100644 --- a/src/main/java/gregtech/api/objects/ObjMap.java +++ b/src/main/java/gregtech/api/objects/ObjMap.java @@ -5,8 +5,7 @@ import java.util.Arrays; /** * Object-2-object map based on IntIntMap4a */ -public class ObjMap<K, V> -{ +public class ObjMap<K, V> { private static final Object FREE_KEY = new Object(); private static final Object REMOVED_KEY = new Object(); @@ -15,6 +14,7 @@ public class ObjMap<K, V> /** Value for the null key (if inserted into a map) */ private Object m_nullValue; + private boolean m_hasNull; /** Fill factor, must be between (0 and 1) */ @@ -28,159 +28,120 @@ public class ObjMap<K, V> /** Mask to wrap the actual array pointer */ private int m_mask2; - public ObjMap( final int size, final float fillFactor ) - { - if ( fillFactor <= 0 || fillFactor >= 1 ) - throw new IllegalArgumentException( "FillFactor must be in (0, 1)" ); - if ( size <= 0 ) - throw new IllegalArgumentException( "Size must be positive!" ); + public ObjMap(final int size, final float fillFactor) { + if (fillFactor <= 0 || fillFactor >= 1) throw new IllegalArgumentException("FillFactor must be in (0, 1)"); + if (size <= 0) throw new IllegalArgumentException("Size must be positive!"); final int capacity = arraySize(size, fillFactor); m_mask = capacity - 1; m_mask2 = capacity * 2 - 1; m_fillFactor = fillFactor; m_data = new Object[capacity * 2]; - Arrays.fill( m_data, FREE_KEY ); + Arrays.fill(m_data, FREE_KEY); m_threshold = (int) (capacity * fillFactor); } @SuppressWarnings("unchecked") - public V get( final K key ) - { - if ( key == null ) - return (V) m_nullValue; //we null it on remove, so safe not to check a flag here + public V get(final K key) { + if (key == null) return (V) m_nullValue; // we null it on remove, so safe not to check a flag here int ptr = (key.hashCode() & m_mask) << 1; - Object k = m_data[ ptr ]; + Object k = m_data[ptr]; - if ( k == FREE_KEY ) - return null; //end of chain already - if ( k.equals( key ) ) //we check FREE and REMOVED prior to this call - return (V) m_data[ ptr + 1 ]; - while ( true ) - { - ptr = (ptr + 2) & m_mask2; //that's next index - k = m_data[ ptr ]; - if ( k == FREE_KEY ) - return null; - if ( k.equals( key ) ) - return (V) m_data[ ptr + 1 ]; + if (k == FREE_KEY) return null; // end of chain already + if (k.equals(key)) // we check FREE and REMOVED prior to this call + return (V) m_data[ptr + 1]; + while (true) { + ptr = (ptr + 2) & m_mask2; // that's next index + k = m_data[ptr]; + if (k == FREE_KEY) return null; + if (k.equals(key)) return (V) m_data[ptr + 1]; } } @SuppressWarnings("unchecked") - public V put( final K key, final V value ) - { - if ( key == null ) - return insertNullKey(value); + public V put(final K key, final V value) { + if (key == null) return insertNullKey(value); int ptr = getStartIndex(key) << 1; Object k = m_data[ptr]; - if ( k == FREE_KEY ) //end of chain already + if (k == FREE_KEY) // end of chain already { - m_data[ ptr ] = key; - m_data[ ptr + 1 ] = value; - if ( m_size >= m_threshold ) - rehash( m_data.length * 2 ); //size is set inside - else - ++m_size; + m_data[ptr] = key; + m_data[ptr + 1] = value; + if (m_size >= m_threshold) rehash(m_data.length * 2); // size is set inside + else ++m_size; return null; - } - else if ( k.equals( key ) ) //we check FREE and REMOVED prior to this call + } else if (k.equals(key)) // we check FREE and REMOVED prior to this call { - final Object ret = m_data[ ptr + 1 ]; - m_data[ ptr + 1 ] = value; + final Object ret = m_data[ptr + 1]; + m_data[ptr + 1] = value; return (V) ret; } int firstRemoved = -1; - if ( k == REMOVED_KEY ) - firstRemoved = ptr; //we may find a key later - - while ( true ) - { - ptr = ( ptr + 2 ) & m_mask2; //that's next index calculation - k = m_data[ ptr ]; - if ( k == FREE_KEY ) - { - if ( firstRemoved != -1 ) - ptr = firstRemoved; - m_data[ ptr ] = key; - m_data[ ptr + 1 ] = value; - if ( m_size >= m_threshold ) - rehash( m_data.length * 2 ); //size is set inside - else - ++m_size; + if (k == REMOVED_KEY) firstRemoved = ptr; // we may find a key later + + while (true) { + ptr = (ptr + 2) & m_mask2; // that's next index calculation + k = m_data[ptr]; + if (k == FREE_KEY) { + if (firstRemoved != -1) ptr = firstRemoved; + m_data[ptr] = key; + m_data[ptr + 1] = value; + if (m_size >= m_threshold) rehash(m_data.length * 2); // size is set inside + else ++m_size; return null; - } - else if ( k.equals( key ) ) - { - final Object ret = m_data[ ptr + 1 ]; - m_data[ ptr + 1 ] = value; + } else if (k.equals(key)) { + final Object ret = m_data[ptr + 1]; + m_data[ptr + 1] = value; return (V) ret; - } - else if ( k == REMOVED_KEY ) - { - if ( firstRemoved == -1 ) - firstRemoved = ptr; + } else if (k == REMOVED_KEY) { + if (firstRemoved == -1) firstRemoved = ptr; } } } @SuppressWarnings("unchecked") - public V remove( final K key ) - { - if ( key == null ) - return removeNullKey(); + public V remove(final K key) { + if (key == null) return removeNullKey(); int ptr = getStartIndex(key) << 1; - Object k = m_data[ ptr ]; - if ( k == FREE_KEY ) - return null; //end of chain already - else if ( k.equals( key ) ) //we check FREE and REMOVED prior to this call + Object k = m_data[ptr]; + if (k == FREE_KEY) return null; // end of chain already + else if (k.equals(key)) // we check FREE and REMOVED prior to this call { --m_size; - if ( m_data[ ( ptr + 2 ) & m_mask2 ] == FREE_KEY ) - m_data[ ptr ] = FREE_KEY; - else - m_data[ ptr ] = REMOVED_KEY; - final V ret = (V) m_data[ ptr + 1 ]; - m_data[ ptr + 1 ] = null; + if (m_data[(ptr + 2) & m_mask2] == FREE_KEY) m_data[ptr] = FREE_KEY; + else m_data[ptr] = REMOVED_KEY; + final V ret = (V) m_data[ptr + 1]; + m_data[ptr + 1] = null; return ret; } - while ( true ) - { - ptr = ( ptr + 2 ) & m_mask2; //that's next index calculation - k = m_data[ ptr ]; - if ( k == FREE_KEY ) - return null; - else if ( k.equals( key ) ) - { + while (true) { + ptr = (ptr + 2) & m_mask2; // that's next index calculation + k = m_data[ptr]; + if (k == FREE_KEY) return null; + else if (k.equals(key)) { --m_size; - if ( m_data[ ( ptr + 2 ) & m_mask2 ] == FREE_KEY ) - m_data[ ptr ] = FREE_KEY; - else - m_data[ ptr ] = REMOVED_KEY; - final V ret = (V) m_data[ ptr + 1 ]; - m_data[ ptr + 1 ] = null; + if (m_data[(ptr + 2) & m_mask2] == FREE_KEY) m_data[ptr] = FREE_KEY; + else m_data[ptr] = REMOVED_KEY; + final V ret = (V) m_data[ptr + 1]; + m_data[ptr + 1] = null; return ret; } } } @SuppressWarnings("unchecked") - private V insertNullKey(final V value) - { - if ( m_hasNull ) - { + private V insertNullKey(final V value) { + if (m_hasNull) { final Object ret = m_nullValue; m_nullValue = value; return (V) ret; - } - else - { + } else { m_nullValue = value; ++m_size; return null; @@ -188,94 +149,87 @@ public class ObjMap<K, V> } @SuppressWarnings("unchecked") - private V removeNullKey() - { - if ( m_hasNull ) - { + private V removeNullKey() { + if (m_hasNull) { final Object ret = m_nullValue; m_nullValue = null; m_hasNull = false; --m_size; return (V) ret; - } - else - { + } else { return null; } } - public int size() - { + public int size() { return m_size; } @SuppressWarnings("unchecked") - private void rehash( final int newCapacity ) - { - m_threshold = (int) (newCapacity/2 * m_fillFactor); - m_mask = newCapacity/2 - 1; + private void rehash(final int newCapacity) { + m_threshold = (int) (newCapacity / 2 * m_fillFactor); + m_mask = newCapacity / 2 - 1; m_mask2 = newCapacity - 1; final int oldCapacity = m_data.length; final Object[] oldData = m_data; - m_data = new Object[ newCapacity ]; - Arrays.fill( m_data, FREE_KEY ); + m_data = new Object[newCapacity]; + Arrays.fill(m_data, FREE_KEY); m_size = m_hasNull ? 1 : 0; - for ( int i = 0; i < oldCapacity; i += 2 ) { - final Object oldKey = oldData[ i ]; - if( oldKey != FREE_KEY && oldKey != REMOVED_KEY ) - put( (K)oldKey, (V)oldData[ i + 1 ]); + for (int i = 0; i < oldCapacity; i += 2) { + final Object oldKey = oldData[i]; + if (oldKey != FREE_KEY && oldKey != REMOVED_KEY) put((K) oldKey, (V) oldData[i + 1]); } } - public int getStartIndex( final Object key ) - { - //key is not null here + public int getStartIndex(final Object key) { + // key is not null here return key.hashCode() & m_mask; } - + /** Taken from FastUtil implementation */ /** Return the least power of two greater than or equal to the specified value. - * - * <p>Note that this function will return 1 when the argument is 0. - * - * @param x a long integer smaller than or equal to 2<sup>62</sup>. - * @return the least power of two greater than or equal to the specified value. - */ - public static long nextPowerOfTwo( long x ) { - if ( x == 0 ) return 1; - x--; - x |= x >> 1; - x |= x >> 2; - x |= x >> 4; - x |= x >> 8; - x |= x >> 16; - return ( x | x >> 32 ) + 1; - } + * + * <p>Note that this function will return 1 when the argument is 0. + * + * @param x a long integer smaller than or equal to 2<sup>62</sup>. + * @return the least power of two greater than or equal to the specified value. + */ + public static long nextPowerOfTwo(long x) { + if (x == 0) return 1; + x--; + x |= x >> 1; + x |= x >> 2; + x |= x >> 4; + x |= x >> 8; + x |= x >> 16; + return (x | x >> 32) + 1; + } /** Returns the least power of two smaller than or equal to 2<sup>30</sup> and larger than or equal to <code>Math.ceil( expected / f )</code>. - * - * @param expected the expected number of elements in a hash table. - * @param f the load factor. - * @return the minimum possible size for a backing array. - * @throws IllegalArgumentException if the necessary size is larger than 2<sup>30</sup>. - */ - public static int arraySize( final int expected, final float f ) { - final long s = Math.max( 2, nextPowerOfTwo( (long)Math.ceil( expected / f ) ) ); - if ( s > (1 << 30) ) throw new IllegalArgumentException( "Too large (" + expected + " expected elements with load factor " + f + ")" ); - return (int)s; - } - - //taken from FastUtil + * + * @param expected the expected number of elements in a hash table. + * @param f the load factor. + * @return the minimum possible size for a backing array. + * @throws IllegalArgumentException if the necessary size is larger than 2<sup>30</sup>. + */ + public static int arraySize(final int expected, final float f) { + final long s = Math.max(2, nextPowerOfTwo((long) Math.ceil(expected / f))); + if (s > (1 << 30)) + throw new IllegalArgumentException( + "Too large (" + expected + " expected elements with load factor " + f + ")"); + return (int) s; + } + + // taken from FastUtil private static final int INT_PHI = 0x9E3779B9; - public static int phiMix( final int x ) { - final int h = x * INT_PHI; - return h ^ (h >> 16); -} - + public static int phiMix(final int x) { + final int h = x * INT_PHI; + return h ^ (h >> 16); + } } diff --git a/src/main/java/gregtech/api/objects/ReverseShapedRecipe.java b/src/main/java/gregtech/api/objects/ReverseShapedRecipe.java index cb9e7d4d83..60a5c13d74 100644 --- a/src/main/java/gregtech/api/objects/ReverseShapedRecipe.java +++ b/src/main/java/gregtech/api/objects/ReverseShapedRecipe.java @@ -1,16 +1,15 @@ package gregtech.api.objects; +import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes; + import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Disassembler; -import net.minecraft.item.ItemStack; - import java.util.Collections; import java.util.LinkedList; import java.util.Optional; import java.util.Queue; - -import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes; +import net.minecraft.item.ItemStack; public class ReverseShapedRecipe { private static Queue<ReverseShapedRecipe> reverseRecipes = new LinkedList<>(); @@ -30,11 +29,11 @@ public class ReverseShapedRecipe { public static void runReverseRecipes() { for (ReverseShapedRecipe x : reverseRecipes) { Optional<GT_Recipe> recipeOptional = GT_Utility.reverseShapedRecipe(x.aResult, x.aRecipe); - if (!recipeOptional.isPresent()) - continue; + if (!recipeOptional.isPresent()) continue; GT_Recipe recipe = recipeOptional.get(); ItemStack[] replacement = new ItemStack[recipe.mOutputs.length]; - GT_MetaTileEntity_Disassembler.handleRecipeTransformation(recipe.mOutputs, replacement, Collections.singleton(recipe.mOutputs)); + GT_MetaTileEntity_Disassembler.handleRecipeTransformation( + recipe.mOutputs, replacement, Collections.singleton(recipe.mOutputs)); recipe.mOutputs = replacement; sDisassemblerRecipes.add(recipe); diff --git a/src/main/java/gregtech/api/objects/ReverseShapelessRecipe.java b/src/main/java/gregtech/api/objects/ReverseShapelessRecipe.java index 1c5e27d246..6593dc60d8 100644 --- a/src/main/java/gregtech/api/objects/ReverseShapelessRecipe.java +++ b/src/main/java/gregtech/api/objects/ReverseShapelessRecipe.java @@ -1,16 +1,15 @@ package gregtech.api.objects; +import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes; + import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Disassembler; -import net.minecraft.item.ItemStack; - import java.util.Collections; import java.util.LinkedList; import java.util.Optional; import java.util.Queue; - -import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes; +import net.minecraft.item.ItemStack; public class ReverseShapelessRecipe { private static Queue<ReverseShapelessRecipe> reverseRecipes = new LinkedList<>(); @@ -30,11 +29,11 @@ public class ReverseShapelessRecipe { public static void runReverseRecipes() { for (ReverseShapelessRecipe x : reverseRecipes) { Optional<GT_Recipe> recipeOptional = GT_Utility.reverseShapelessRecipe(x.aResult, x.aRecipe); - if (!recipeOptional.isPresent()) - continue; + if (!recipeOptional.isPresent()) continue; GT_Recipe recipe = recipeOptional.get(); ItemStack[] replacement = new ItemStack[recipe.mOutputs.length]; - GT_MetaTileEntity_Disassembler.handleRecipeTransformation(recipe.mOutputs, replacement, Collections.singleton(recipe.mOutputs)); + GT_MetaTileEntity_Disassembler.handleRecipeTransformation( + recipe.mOutputs, replacement, Collections.singleton(recipe.mOutputs)); recipe.mOutputs = replacement; sDisassemblerRecipes.add(recipe); diff --git a/src/main/java/gregtech/api/objects/XSTR.java b/src/main/java/gregtech/api/objects/XSTR.java index a2c4906345..b5ed4a00b4 100644 --- a/src/main/java/gregtech/api/objects/XSTR.java +++ b/src/main/java/gregtech/api/objects/XSTR.java @@ -23,7 +23,6 @@ package gregtech.api.objects; * This code is released under the GNU Lesser General Public License Version 3 * http://www.gnu.org/licenses/lgpl-3.0.txt */ - import java.util.Random; import java.util.concurrent.atomic.AtomicLong; @@ -41,21 +40,21 @@ public class XSTR extends Random { private static final long GAMMA = 0x9e3779b97f4a7c15L; private static final int PROBE_INCREMENT = 0x9e3779b9; private static final long SEEDER_INCREMENT = 0xbb67ae8584caa73bL; - private static final double DOUBLE_UNIT = 0x1.0p-53; // 1.0 / (1L << 53) - private static final float FLOAT_UNIT = 0x1.0p-24f; // 1.0f / (1 << 24) + private static final double DOUBLE_UNIT = 0x1.0p-53; // 1.0 / (1L << 53) + private static final float FLOAT_UNIT = 0x1.0p-24f; // 1.0f / (1 << 24) private static final AtomicLong seedUniquifier = new AtomicLong(8682522807148012L); - public static final XSTR XSTR_INSTANCE=new XSTR(){ + public static final XSTR XSTR_INSTANCE = new XSTR() { @Override public synchronized void setSeed(long seed) { - if(!Thread.currentThread().getStackTrace()[2].getClassName().equals(Random.class.getName())) + if (!Thread.currentThread().getStackTrace()[2].getClassName().equals(Random.class.getName())) throw new NoSuchMethodError("This is meant to be shared!, leave seed state alone!"); } }; /* - MODIFIED BY: Robotia - Modification: Implemented Random class seed generator - */ + MODIFIED BY: Robotia + Modification: Implemented Random class seed generator + */ /** * Creates a new pseudo random number generator. The seed is initialized to * the current time, as if by @@ -68,7 +67,7 @@ public class XSTR extends Random { private static long seedUniquifier() { // L'Ecuyer, "Tables of Linear Congruential Generators of // Different Sizes and Good Lattice Structure", 1999 - for (;;) { + for (; ; ) { long current = seedUniquifier.get(); long next = current * 181783497276652981L; if (seedUniquifier.compareAndSet(current, next)) { @@ -86,6 +85,7 @@ public class XSTR extends Random { public XSTR(long seed) { this.seed = seed; } + @Override public boolean nextBoolean() { return next(1) != 0; @@ -93,7 +93,7 @@ public class XSTR extends Random { @Override public double nextDouble() { - return (((long)(next(26)) << 27) + next(27)) * DOUBLE_UNIT; + return (((long) (next(26)) << 27) + next(27)) * DOUBLE_UNIT; } /** * Returns the current state of the seed, can be used to clone the object @@ -142,8 +142,10 @@ public class XSTR extends Random { x &= ((1L << nbits) - 1); return (int) x; } + boolean haveNextNextGaussian = false; double nextNextGaussian = 0; + @Override public synchronized double nextGaussian() { // See Knuth, ACP, Section 3.4.1 Algorithm C. @@ -157,7 +159,7 @@ public class XSTR extends Random { v2 = 2 * nextDouble() - 1; // between -1 and 1 s = v1 * v1 + v2 * v2; } while (s >= 1 || s == 0); - double multiplier = StrictMath.sqrt(-2 * StrictMath.log(s)/s); + double multiplier = StrictMath.sqrt(-2 * StrictMath.log(s) / s); nextNextGaussian = v2 * multiplier; haveNextNextGaussian = true; return v1 * multiplier; @@ -220,9 +222,9 @@ public class XSTR extends Random { */ @Override public int nextInt(int bound) { - //if (bound <= 0) { - //throw new RuntimeException("BadBound"); - //} + // if (bound <= 0) { + // throw new RuntimeException("BadBound"); + // } /*int r = next(31); int m = bound - 1; @@ -236,7 +238,7 @@ public class XSTR extends Random { ; } return r;*/ - //speedup, new nextInt ~+40% + // speedup, new nextInt ~+40% last = seed ^ (seed << 21); last ^= (last >>> 35); last ^= (last << 4); @@ -244,6 +246,7 @@ public class XSTR extends Random { int out = (int) last % bound; return (out < 0) ? -out : out; } + @Override public int nextInt() { return next(32); @@ -257,15 +260,14 @@ public class XSTR extends Random { @Override public long nextLong() { // it's okay that the bottom word remains signed. - return ((long)(next(32)) << 32) + next(32); + return ((long) (next(32)) << 32) + next(32); } @Override public void nextBytes(byte[] bytes_arr) { for (int iba = 0, lenba = bytes_arr.length; iba < lenba; ) - for (int rndba = nextInt(), - nba = Math.min(lenba - iba, Integer.SIZE/Byte.SIZE); - nba-- > 0; rndba >>= Byte.SIZE) - bytes_arr[iba++] = (byte)rndba; + for (int rndba = nextInt(), nba = Math.min(lenba - iba, Integer.SIZE / Byte.SIZE); + nba-- > 0; + rndba >>= Byte.SIZE) bytes_arr[iba++] = (byte) rndba; } } diff --git a/src/main/java/gregtech/api/render/TextureFactory.java b/src/main/java/gregtech/api/render/TextureFactory.java index 8c67cd6740..4ff1a05707 100644 --- a/src/main/java/gregtech/api/render/TextureFactory.java +++ b/src/main/java/gregtech/api/render/TextureFactory.java @@ -49,10 +49,19 @@ public final class TextureFactory { * @param rgba The {@code short[]} RGBA tint for all sides. * @return The instance of an {@link ITexture} implementation */ - public static ITexture of(final IIconContainer bottom, final IIconContainer top, final IIconContainer north, - final IIconContainer south, final IIconContainer west, final IIconContainer east, - final short[] rgba) { - return builder().addIcon(bottom, top, north, south, west, east).setRGBA(rgba).setAllowAlpha(true).build(); + public static ITexture of( + final IIconContainer bottom, + final IIconContainer top, + final IIconContainer north, + final IIconContainer south, + final IIconContainer west, + final IIconContainer east, + final short[] rgba) { + return builder() + .addIcon(bottom, top, north, south, west, east) + .setRGBA(rgba) + .setAllowAlpha(true) + .build(); } /** @@ -64,9 +73,13 @@ public final class TextureFactory { * @param rgba The {@code short[]} RGBA tint for all sides. * @return The instance of an {@link ITexture} implementation */ - public static ITexture of(final IIconContainer bottom, final IIconContainer top, final IIconContainer sides, - final short[] rgba) { - return builder().addIcon(bottom, top, sides, sides, sides, sides).setRGBA(rgba).setAllowAlpha(true).build(); + public static ITexture of( + final IIconContainer bottom, final IIconContainer top, final IIconContainer sides, final short[] rgba) { + return builder() + .addIcon(bottom, top, sides, sides, sides, sides) + .setRGBA(rgba) + .setAllowAlpha(true) + .build(); } /** @@ -78,7 +91,11 @@ public final class TextureFactory { * @return The instance of an {@link ITexture} implementation */ public static ITexture of(final IIconContainer iconContainer, final short[] rgba, final boolean allowAlpha) { - return builder().addIcon(iconContainer).setRGBA(rgba).setAllowAlpha(allowAlpha).build(); + return builder() + .addIcon(iconContainer) + .setRGBA(rgba) + .setAllowAlpha(allowAlpha) + .build(); } public static ITexture of(final IIconContainer iconContainer, final short[] rgba) { @@ -100,7 +117,11 @@ public final class TextureFactory { * @return The instance of an {@link ITexture} implementation */ public static ITexture of(final Block block, final int meta, final ForgeDirection side, final short[] rgba) { - return builder().setFromBlock(block, meta).setFromSide(side).setRGBA(rgba).build(); + return builder() + .setFromBlock(block, meta) + .setFromSide(side) + .setRGBA(rgba) + .build(); } public static ITexture of(final Block block, final int meta, final ForgeDirection side) { diff --git a/src/main/java/gregtech/api/threads/GT_Runnable_Cable_Update.java b/src/main/java/gregtech/api/threads/GT_Runnable_Cable_Update.java index 7093184533..9ae94d1c80 100644 --- a/src/main/java/gregtech/api/threads/GT_Runnable_Cable_Update.java +++ b/src/main/java/gregtech/api/threads/GT_Runnable_Cable_Update.java @@ -30,8 +30,8 @@ public class GT_Runnable_Cable_Update extends GT_Runnable_MachineBlockUpdate { GT_Proxy.TICK_LOCK.lock(); try { - //we dont want to go over cables that are in unloaded chunks - //keeping the lock just to make sure no CME happens + // we dont want to go over cables that are in unloaded chunks + // keeping the lock just to make sure no CME happens if (world.blockExists(aCoords.posX, aCoords.posY, aCoords.posZ)) { tTileEntity = world.getTileEntity(aCoords.posX, aCoords.posY, aCoords.posZ); } else { @@ -47,23 +47,27 @@ public class GT_Runnable_Cable_Update extends GT_Runnable_MachineBlockUpdate { // Now see if we should add the nearby blocks to the queue: // only add blocks the cable is connected to - if (tTileEntity instanceof BaseMetaPipeEntity && - ((BaseMetaPipeEntity) tTileEntity).getMetaTileEntity() instanceof GT_MetaPipeEntity_Cable) - { + if (tTileEntity instanceof BaseMetaPipeEntity + && ((BaseMetaPipeEntity) tTileEntity).getMetaTileEntity() instanceof GT_MetaPipeEntity_Cable) { ChunkCoordinates tCoords; - for (byte i = 0;i<6;i++) { - if (((GT_MetaPipeEntity_Cable) ((BaseMetaPipeEntity) tTileEntity).getMetaTileEntity()).isConnectedAtSide(i)) { + for (byte i = 0; i < 6; i++) { + if (((GT_MetaPipeEntity_Cable) ((BaseMetaPipeEntity) tTileEntity).getMetaTileEntity()) + .isConnectedAtSide(i)) { ForgeDirection offset = ForgeDirection.getOrientation(i); - if (visited.add(tCoords = new ChunkCoordinates(aCoords.posX + offset.offsetX, - aCoords.posY + offset.offsetY, aCoords.posZ + offset.offsetZ))) - tQueue.add(tCoords); + if (visited.add( + tCoords = new ChunkCoordinates( + aCoords.posX + offset.offsetX, + aCoords.posY + offset.offsetY, + aCoords.posZ + offset.offsetZ))) tQueue.add(tCoords); } } } } } catch (Exception e) { GT_Mod.GT_FML_LOGGER.error( - "Well this update was broken... " + mCoords + ", mWorld={" + world.getProviderName() + " @dimId " + world.provider.dimensionId + "}", e); + "Well this update was broken... " + mCoords + ", mWorld={" + world.getProviderName() + " @dimId " + + world.provider.dimensionId + "}", + e); } } } diff --git a/src/main/java/gregtech/api/threads/GT_Runnable_MachineBlockUpdate.java b/src/main/java/gregtech/api/threads/GT_Runnable_MachineBlockUpdate.java index 4b4c01345a..371c3316f3 100644 --- a/src/main/java/gregtech/api/threads/GT_Runnable_MachineBlockUpdate.java +++ b/src/main/java/gregtech/api/threads/GT_Runnable_MachineBlockUpdate.java @@ -4,10 +4,6 @@ import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.interfaces.tileentity.IMachineBlockUpdateable; import gregtech.common.GT_Proxy; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.world.World; - import java.util.HashSet; import java.util.LinkedList; import java.util.Queue; @@ -16,6 +12,9 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ChunkCoordinates; +import net.minecraft.world.World; public class GT_Runnable_MachineBlockUpdate implements Runnable { // used by runner thread @@ -23,7 +22,7 @@ public class GT_Runnable_MachineBlockUpdate implements Runnable { protected final World world; protected final Set<ChunkCoordinates> visited = new HashSet<>(80); protected final Queue<ChunkCoordinates> tQueue = new LinkedList<>(); - + // Threading private static final ThreadFactory THREAD_FACTORY = r -> { Thread thread = new Thread(r); @@ -65,7 +64,8 @@ public class GT_Runnable_MachineBlockUpdate implements Runnable { } public static void initExecutorService() { - EXECUTOR_SERVICE = Executors.newFixedThreadPool(Math.max(1, (Runtime.getRuntime().availableProcessors() * 2 / 3)), THREAD_FACTORY); + EXECUTOR_SERVICE = Executors.newFixedThreadPool( + Math.max(1, (Runtime.getRuntime().availableProcessors() * 2 / 3)), THREAD_FACTORY); } public static void shutdownExecutorService() { @@ -77,7 +77,8 @@ public class GT_Runnable_MachineBlockUpdate implements Runnable { EXECUTOR_SERVICE.shutdownNow(); // Cancel currently executing tasks // Wait a while for tasks to respond to being cancelled if (!EXECUTOR_SERVICE.awaitTermination(60, TimeUnit.SECONDS)) { - GT_Mod.GT_FML_LOGGER.error("Well this didn't terminated well... GT_Runnable_MachineBlockUpdate.shutdownExecutorService"); + GT_Mod.GT_FML_LOGGER.error( + "Well this didn't terminated well... GT_Runnable_MachineBlockUpdate.shutdownExecutorService"); } } } catch (InterruptedException ie) { @@ -86,11 +87,11 @@ public class GT_Runnable_MachineBlockUpdate implements Runnable { EXECUTOR_SERVICE.shutdownNow(); // Preserve interrupt status Thread.currentThread().interrupt(); - }catch (Exception e){ + } catch (Exception e) { GT_Mod.GT_FML_LOGGER.error("Well this didn't terminated well...", e); // (Re-)Cancel in case EXECUTOR_SERVICE.shutdownNow(); - }finally { + } finally { GT_Mod.GT_FML_LOGGER.info("Leaving... GT_Runnable_MachineBlockUpdate.shutdownExecutorService"); } } @@ -102,17 +103,21 @@ public class GT_Runnable_MachineBlockUpdate implements Runnable { final ChunkCoordinates aCoords = tQueue.poll(); final TileEntity tTileEntity; final boolean isMachineBlock; - - // This might load a chunk... which might load a TileEntity... which might get added to `loadedTileEntityList`... which might be in the process - // of being iterated over during `UpdateEntities()`... which might cause a ConcurrentModificationException. So, lock that shit. + + // This might load a chunk... which might load a TileEntity... which might get added to + // `loadedTileEntityList`... which might be in the process + // of being iterated over during `UpdateEntities()`... which might cause a + // ConcurrentModificationException. So, lock that shit. GT_Proxy.TICK_LOCK.lock(); try { tTileEntity = world.getTileEntity(aCoords.posX, aCoords.posY, aCoords.posZ); - isMachineBlock = GregTech_API.isMachineBlock(world.getBlock(aCoords.posX, aCoords.posY, aCoords.posZ), world.getBlockMetadata(aCoords.posX, aCoords.posY, aCoords.posZ)); + isMachineBlock = GregTech_API.isMachineBlock( + world.getBlock(aCoords.posX, aCoords.posY, aCoords.posZ), + world.getBlockMetadata(aCoords.posX, aCoords.posY, aCoords.posZ)); } finally { GT_Proxy.TICK_LOCK.unlock(); } - + // See if the block itself needs an update if (tTileEntity instanceof IMachineBlockUpdateable) ((IMachineBlockUpdateable) tTileEntity).onMachineBlockUpdate(); @@ -121,24 +126,31 @@ public class GT_Runnable_MachineBlockUpdate implements Runnable { // 1) If we've visited less than 5 blocks, then yes // 2) If the tile says we should recursively updated (pipes don't, machine blocks do) // 3) If the block at the coordinates is marked as a machine block - if (visited.size() < 5 - || (tTileEntity instanceof IMachineBlockUpdateable && ((IMachineBlockUpdateable) tTileEntity).isMachineBlockUpdateRecursive()) - || isMachineBlock) - { + if (visited.size() < 5 + || (tTileEntity instanceof IMachineBlockUpdateable + && ((IMachineBlockUpdateable) tTileEntity).isMachineBlockUpdateRecursive()) + || isMachineBlock) { ChunkCoordinates tCoords; - - if (visited.add(tCoords = new ChunkCoordinates(aCoords.posX + 1, aCoords.posY, aCoords.posZ))) tQueue.add(tCoords); - if (visited.add(tCoords = new ChunkCoordinates(aCoords.posX - 1, aCoords.posY, aCoords.posZ))) tQueue.add(tCoords); - if (visited.add(tCoords = new ChunkCoordinates(aCoords.posX, aCoords.posY + 1, aCoords.posZ))) tQueue.add(tCoords); - if (visited.add(tCoords = new ChunkCoordinates(aCoords.posX, aCoords.posY - 1, aCoords.posZ))) tQueue.add(tCoords); - if (visited.add(tCoords = new ChunkCoordinates(aCoords.posX, aCoords.posY, aCoords.posZ + 1))) tQueue.add(tCoords); - if (visited.add(tCoords = new ChunkCoordinates(aCoords.posX, aCoords.posY, aCoords.posZ - 1))) tQueue.add(tCoords); + + if (visited.add(tCoords = new ChunkCoordinates(aCoords.posX + 1, aCoords.posY, aCoords.posZ))) + tQueue.add(tCoords); + if (visited.add(tCoords = new ChunkCoordinates(aCoords.posX - 1, aCoords.posY, aCoords.posZ))) + tQueue.add(tCoords); + if (visited.add(tCoords = new ChunkCoordinates(aCoords.posX, aCoords.posY + 1, aCoords.posZ))) + tQueue.add(tCoords); + if (visited.add(tCoords = new ChunkCoordinates(aCoords.posX, aCoords.posY - 1, aCoords.posZ))) + tQueue.add(tCoords); + if (visited.add(tCoords = new ChunkCoordinates(aCoords.posX, aCoords.posY, aCoords.posZ + 1))) + tQueue.add(tCoords); + if (visited.add(tCoords = new ChunkCoordinates(aCoords.posX, aCoords.posY, aCoords.posZ - 1))) + tQueue.add(tCoords); } } } catch (Exception e) { GT_Mod.GT_FML_LOGGER.error( - "Well this update was broken... " + mCoords + ", mWorld={" + world.getProviderName() + " @dimId " + world.provider.dimensionId + "}", e); + "Well this update was broken... " + mCoords + ", mWorld={" + world.getProviderName() + " @dimId " + + world.provider.dimensionId + "}", + e); } } - } diff --git a/src/main/java/gregtech/api/threads/GT_Runnable_Sound.java b/src/main/java/gregtech/api/threads/GT_Runnable_Sound.java index 441d46ad58..99aa638f87 100644 --- a/src/main/java/gregtech/api/threads/GT_Runnable_Sound.java +++ b/src/main/java/gregtech/api/threads/GT_Runnable_Sound.java @@ -11,7 +11,15 @@ public class GT_Runnable_Sound implements Runnable { private final ResourceLocation mSoundResourceLocation; private final float mSoundStrength, mSoundModulation; - public GT_Runnable_Sound(World aWorld, int aX, int aY, int aZ, int aTimeUntilNextSound, ResourceLocation aSoundResourceLocation, float aSoundStrength, float aSoundModulation) { + public GT_Runnable_Sound( + World aWorld, + int aX, + int aY, + int aZ, + int aTimeUntilNextSound, + ResourceLocation aSoundResourceLocation, + float aSoundStrength, + float aSoundModulation) { mWorld = aWorld; mX = aX; mY = aY; @@ -26,8 +34,24 @@ public class GT_Runnable_Sound implements Runnable { * @deprecated Use {@link #GT_Runnable_Sound(World, int, int, int, int, ResourceLocation, float, float)} */ @Deprecated - public GT_Runnable_Sound(World aWorld, int aX, int aY, int aZ, int aTimeUntilNextSound, String aSoundName, float aSoundStrength, float aSoundModulation) { - this(aWorld, aX, aY, aZ, aTimeUntilNextSound, new ResourceLocation(aSoundName), aSoundStrength, aSoundModulation); + public GT_Runnable_Sound( + World aWorld, + int aX, + int aY, + int aZ, + int aTimeUntilNextSound, + String aSoundName, + float aSoundStrength, + float aSoundModulation) { + this( + aWorld, + aX, + aY, + aZ, + aTimeUntilNextSound, + new ResourceLocation(aSoundName), + aSoundStrength, + aSoundModulation); } @Override @@ -38,6 +62,8 @@ public class GT_Runnable_Sound implements Runnable { return; mWorld.playSound(mX, mY, mZ, mSoundResourceLocation.toString(), mSoundStrength, mSoundModulation, false); GT_Utility.sPlayedSoundMap.put(tSound, mTimeUntilNextSound); - } catch (Throwable e) {/**/} + } catch (Throwable e) { + /**/ + } } } diff --git a/src/main/java/gregtech/api/util/ColorsMetadataSection.java b/src/main/java/gregtech/api/util/ColorsMetadataSection.java index 2851435061..9f1c4f3ffe 100644 --- a/src/main/java/gregtech/api/util/ColorsMetadataSection.java +++ b/src/main/java/gregtech/api/util/ColorsMetadataSection.java @@ -2,10 +2,8 @@ package gregtech.api.util; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import java.util.Map; import java.util.HashMap; -import gregtech.api.util.GT_Log; -import gregtech.api.GregTech_API; +import java.util.Map; import net.minecraft.client.resources.data.IMetadataSection; @SideOnly(Side.CLIENT) @@ -16,7 +14,8 @@ public class ColorsMetadataSection implements IMetadataSection { private final Map<String, String> hexGuiTints; private final boolean guiTintEnabled; - public ColorsMetadataSection(Map<String, String> hexTextColorMap, Map<String, String> hexGuiTintMap, boolean guiTintEnabled) { + public ColorsMetadataSection( + Map<String, String> hexTextColorMap, Map<String, String> hexGuiTintMap, boolean guiTintEnabled) { this.hexTextColors = hexTextColorMap; this.textColors = convertHexMapToIntMap(hexTextColorMap); @@ -26,16 +25,15 @@ public class ColorsMetadataSection implements IMetadataSection { this.guiTintEnabled = guiTintEnabled; } - private Map<String, Integer> convertHexMapToIntMap(Map <String, String> hexMap) { + private Map<String, Integer> convertHexMapToIntMap(Map<String, String> hexMap) { Map<String, Integer> intMap = new HashMap<>(); for (String key : hexMap.keySet()) { int colorValue = -1; String hex = hexMap.get(key); try { - if (!hex.isEmpty()) colorValue = Integer.parseUnsignedInt(hex,16); - } - catch (final NumberFormatException e) { + if (!hex.isEmpty()) colorValue = Integer.parseUnsignedInt(hex, 16); + } catch (final NumberFormatException e) { GT_Log.err.println("Couldn't format color correctly of " + key + " -> " + hex); } intMap.put(key, colorValue); @@ -51,7 +49,7 @@ public class ColorsMetadataSection implements IMetadataSection { return sColorInMap(key, this.hexGuiTints) ? defaultColor : this.guiTints.get(key); } - private boolean sColorInMap(String key, Map<String,String> hexMap) { + private boolean sColorInMap(String key, Map<String, String> hexMap) { return hexMap.containsKey(key) && hexMap.get(key).isEmpty(); } diff --git a/src/main/java/gregtech/api/util/ColorsMetadataSectionSerializer.java b/src/main/java/gregtech/api/util/ColorsMetadataSectionSerializer.java index 4de8463685..718ff81854 100644 --- a/src/main/java/gregtech/api/util/ColorsMetadataSectionSerializer.java +++ b/src/main/java/gregtech/api/util/ColorsMetadataSectionSerializer.java @@ -7,26 +7,29 @@ import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import java.lang.reflect.Type; -import java.util.Map; -import java.util.HashMap; import gregtech.api.GregTech_API; import gregtech.api.enums.Dyes; -import net.minecraft.util.JsonUtils; +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.Map; import net.minecraft.client.resources.data.BaseMetadataSectionSerializer; +import net.minecraft.util.JsonUtils; @SideOnly(Side.CLIENT) public class ColorsMetadataSectionSerializer extends BaseMetadataSectionSerializer implements JsonSerializer { - public ColorsMetadataSection deserialize(JsonElement metadataColors, Type type, JsonDeserializationContext context) { + public ColorsMetadataSection deserialize( + JsonElement metadataColors, Type type, JsonDeserializationContext context) { // Default values boolean enableGuiTint = GregTech_API.sColoredGUI; Map<String, String> hexGuiTintMap = new HashMap<String, String>(); - Map<String, String> hexTextColorMap = new HashMap<String, String>() {{ - put("title", ""); - put("text", ""); - put("value", ""); - put("nei", ""); - }}; + Map<String, String> hexTextColorMap = new HashMap<String, String>() { + { + put("title", ""); + put("text", ""); + put("value", ""); + put("nei", ""); + } + }; JsonObject jsonObject = JsonUtils.getJsonElementAsJsonObject(metadataColors, "metadata section"); if (jsonObject.has("textColor")) { @@ -38,7 +41,8 @@ public class ColorsMetadataSectionSerializer extends BaseMetadataSectionSerializ if (jsonObject.has("guiTint")) { JsonObject guiTints = JsonUtils.func_152754_s(jsonObject, "guiTint"); - enableGuiTint = JsonUtils.getJsonObjectBooleanFieldValueOrDefault(guiTints, "enableGuiTintWhenPainted", true); + enableGuiTint = + JsonUtils.getJsonObjectBooleanFieldValueOrDefault(guiTints, "enableGuiTintWhenPainted", true); for (Dyes dye : Dyes.values()) { hexGuiTintMap.put(dye.mName, GT_Util.toHexString(dye.getRGBA())); @@ -46,7 +50,9 @@ public class ColorsMetadataSectionSerializer extends BaseMetadataSectionSerializ for (String key : hexGuiTintMap.keySet()) { if (enableGuiTint) { - hexGuiTintMap.replace(key, JsonUtils.getJsonObjectStringFieldValueOrDefault(guiTints, key, hexGuiTintMap.get(key))); + hexGuiTintMap.replace( + key, + JsonUtils.getJsonObjectStringFieldValueOrDefault(guiTints, key, hexGuiTintMap.get(key))); } else { hexGuiTintMap.replace(key, GT_Util.toHexString(Dyes.dyeWhite.getRGBA())); } diff --git a/src/main/java/gregtech/api/util/GT_ApiaryUpgrade.java b/src/main/java/gregtech/api/util/GT_ApiaryUpgrade.java index e74b68111a..4cbd014cbc 100644 --- a/src/main/java/gregtech/api/util/GT_ApiaryUpgrade.java +++ b/src/main/java/gregtech/api/util/GT_ApiaryUpgrade.java @@ -3,13 +3,12 @@ package gregtech.api.util; import cpw.mods.fml.common.Loader; import gregtech.api.enums.OrePrefixes; import gregtech.common.items.GT_MetaGenerated_Item_03; +import java.util.*; +import java.util.function.Consumer; import net.bdew.gendustry.api.ApiaryModifiers; import net.bdew.gendustry.api.items.IApiaryUpgrade; import net.minecraft.item.ItemStack; -import java.util.*; -import java.util.function.Consumer; - public enum GT_ApiaryUpgrade { speed1(UNIQUE_INDEX.SPEED_UPGRADE, 32200, 1, 1), speed2(UNIQUE_INDEX.SPEED_UPGRADE, 32201, 1, 2), @@ -22,15 +21,17 @@ public enum GT_ApiaryUpgrade { speed8upgraded(UNIQUE_INDEX.SPEED_UPGRADE, 32208, 1, 8), ; - private enum UNIQUE_INDEX{ + private enum UNIQUE_INDEX { SPEED_UPGRADE, ; - void apply(Consumer<GT_ApiaryUpgrade> fn){ + + void apply(Consumer<GT_ApiaryUpgrade> fn) { UNIQUE_UPGRADE_LIST.get(this).forEach(fn); } } - private static final EnumMap<UNIQUE_INDEX, ArrayList<GT_ApiaryUpgrade>> UNIQUE_UPGRADE_LIST = new EnumMap<>(UNIQUE_INDEX.class); + private static final EnumMap<UNIQUE_INDEX, ArrayList<GT_ApiaryUpgrade>> UNIQUE_UPGRADE_LIST = + new EnumMap<>(UNIQUE_INDEX.class); private int meta = 0; private int maxnumber = 1; @@ -40,9 +41,10 @@ public enum GT_ApiaryUpgrade { private final UNIQUE_INDEX unique_index; private final HashMap<GT_Utility.ItemId, ItemStack> additionalGendustryUpgrades = new HashMap<>(); - private final HashSet<GT_Utility.ItemId> blacklistedUpgrades = new HashSet<>(); // additionalGendustryUpgrades are blacklisted by default + private final HashSet<GT_Utility.ItemId> blacklistedUpgrades = + new HashSet<>(); // additionalGendustryUpgrades are blacklisted by default - GT_ApiaryUpgrade(UNIQUE_INDEX unique_index, int meta, int maxnumber, int maxspeedmodifier){ + GT_ApiaryUpgrade(UNIQUE_INDEX unique_index, int meta, int maxnumber, int maxspeedmodifier) { this.unique_index = unique_index; this.meta = meta; this.maxnumber = maxnumber; @@ -50,11 +52,14 @@ public enum GT_ApiaryUpgrade { this.id = GT_Utility.ItemId.createNoCopy(get(1)); } - private void setup_static_variables(){ + private void setup_static_variables() { quickLookup.put(this.meta, this); ArrayList<GT_ApiaryUpgrade> un = UNIQUE_UPGRADE_LIST.get(this.unique_index); - if(un != null) - un.forEach((u) -> { u.blacklistedUpgrades.add(this.id); this.blacklistedUpgrades.add(u.id); }); + if (un != null) + un.forEach((u) -> { + u.blacklistedUpgrades.add(this.id); + this.blacklistedUpgrades.add(u.id); + }); else { un = new ArrayList<>(1); UNIQUE_UPGRADE_LIST.put(this.unique_index, un); @@ -62,45 +67,43 @@ public enum GT_ApiaryUpgrade { un.add(this); } - public static GT_ApiaryUpgrade getUpgrade(ItemStack s){ - if(s == null) - return null; - if(!isUpgrade(s)) - return null; + public static GT_ApiaryUpgrade getUpgrade(ItemStack s) { + if (s == null) return null; + if (!isUpgrade(s)) return null; return quickLookup.get(s.getItemDamage()); } - public boolean isAllowedToWorkWith(ItemStack s){ + public boolean isAllowedToWorkWith(ItemStack s) { GT_Utility.ItemId id = GT_Utility.ItemId.createNoCopy(s); return !additionalGendustryUpgrades.containsKey(id) && !blacklistedUpgrades.contains(id); } - public int getMaxNumber(){ + public int getMaxNumber() { return maxnumber; } - public void applyModifiers(ApiaryModifiers mods, ItemStack s){ - additionalGendustryUpgrades.forEach((k, u) -> ((IApiaryUpgrade)u.getItem()).applyModifiers(mods, u)); + public void applyModifiers(ApiaryModifiers mods, ItemStack s) { + additionalGendustryUpgrades.forEach((k, u) -> ((IApiaryUpgrade) u.getItem()).applyModifiers(mods, u)); } - public ItemStack get(int count){ + public ItemStack get(int count) { return new ItemStack(GT_MetaGenerated_Item_03.INSTANCE, count, meta); } - public static boolean isUpgrade(ItemStack s){ + public static boolean isUpgrade(ItemStack s) { return OrePrefixes.apiaryUpgrade.contains(s); } - public int applyMaxSpeedModifier(int maxspeed){ + public int applyMaxSpeedModifier(int maxspeed) { return Math.max(maxspeed, maxspeedmodifier); } private static final HashMap<Integer, GT_ApiaryUpgrade> quickLookup = new HashMap<>(); - static{ + static { EnumSet.allOf(GT_ApiaryUpgrade.class).forEach(GT_ApiaryUpgrade::setup_static_variables); - if(Loader.isModLoaded("gendustry")) { + if (Loader.isModLoaded("gendustry")) { ItemStack s = GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 8L, 0); GT_Utility.ItemId a = GT_Utility.ItemId.createNoCopy(s); speed8upgraded.additionalGendustryUpgrades.put(a, s); diff --git a/src/main/java/gregtech/api/util/GT_AssemblyLineUtils.java b/src/main/java/gregtech/api/util/GT_AssemblyLineUtils.java index 4f9036f2c7..f20a78d494 100644 --- a/src/main/java/gregtech/api/util/GT_AssemblyLineUtils.java +++ b/src/main/java/gregtech/api/util/GT_AssemblyLineUtils.java @@ -2,17 +2,17 @@ package gregtech.api.util; import static gregtech.GT_Mod.GT_FML_LOGGER; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Objects; - import cpw.mods.fml.common.FMLCommonHandler; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.objects.GT_ItemStack; import gregtech.api.util.GT_Recipe.GT_Recipe_AssemblyLine; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Objects; +import javax.annotation.Nonnull; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; @@ -20,509 +20,514 @@ import net.minecraft.nbt.NBTTagString; import net.minecraftforge.common.util.Constants.NBT; import net.minecraftforge.fluids.FluidStack; -import javax.annotation.Nonnull; - public class GT_AssemblyLineUtils { - /** - * A cache of Recipes using the Output as Key. - */ - private static HashMap<GT_ItemStack, GT_Recipe_AssemblyLine> sRecipeCacheByOutput = new HashMap<GT_ItemStack, GT_Recipe_AssemblyLine>(); - /** - * A cache of Recipes using the Recipe Hash String as Key. - */ - private static HashMap<String, GT_Recipe_AssemblyLine> sRecipeCacheByRecipeHash = new HashMap<String, GT_Recipe_AssemblyLine>(); - - - - /** - * Checks the DataStick for deprecated/invalid recipes, updating them as required. - * @param aDataStick - The DataStick to process - * @return Is this DataStick now valid with a current recipe? - */ - public static GT_Recipe_AssemblyLine processDataStick(ItemStack aDataStick) { - if (!isItemDataStick(aDataStick)) { - return null; - } - if (doesDataStickNeedUpdate(aDataStick)) { - ItemStack aStickOutput = getDataStickOutput(aDataStick); - if (aStickOutput != null) { - GT_Recipe_AssemblyLine aIntendedRecipe = findAssemblyLineRecipeByOutput(aStickOutput); - if (aIntendedRecipe != null && setAssemblyLineRecipeOnDataStick(aDataStick, aIntendedRecipe)) - return aIntendedRecipe; - } - } - return null; - } - - - /** - * Finds an Assembly Line recipe from a DataStick. - * @param aDataStick - The DataStick to check. - * @return The GT_Recipe_AssemblyLine recipe contained on the DataStick, if any. - */ - public static GT_Recipe_AssemblyLine findAssemblyLineRecipeFromDataStick(ItemStack aDataStick) { - return findAssemblyLineRecipeFromDataStick(aDataStick, false).getRecipe(); - } - - /** - * Finds an Assembly Line recipe from a DataStick. - * @param aDataStick - The DataStick to check. - * @param aReturnBuiltRecipe - Do we return a GT_Recipe_AssemblyLine built from the data on the Data Stick instead of searching the Recipe Map? - * @return The GT_Recipe_AssemblyLine recipe contained on the DataStick, if any. - */ - @Nonnull - public static LookupResult findAssemblyLineRecipeFromDataStick(ItemStack aDataStick, boolean aReturnBuiltRecipe) { - if (!isItemDataStick(aDataStick) || !doesDataStickHaveOutput(aDataStick)) { - return LookupResultType.INVALID_STICK.getResult(); - } - List<ItemStack> aInputs = new ArrayList<>(15); - ItemStack aOutput = getDataStickOutput(aDataStick); - List<List<ItemStack>> mOreDictAlt = new ArrayList<>(15); - List<FluidStack> aFluidInputs = new ArrayList<>(4); - - NBTTagCompound aTag = aDataStick.getTagCompound(); - if (aTag == null) { - return LookupResultType.INVALID_STICK.getResult(); - } - - //Get From Cache - if (doesDataStickHaveRecipeHash(aDataStick)) { - GT_Recipe_AssemblyLine aRecipeFromCache = sRecipeCacheByRecipeHash.get(getHashFromDataStack(aDataStick)); - if (aRecipeFromCache != null && GT_Utility.areStacksEqual(aOutput, aRecipeFromCache.mOutput)) { - return LookupResultType.VALID_STACK_AND_VALID_HASH.getResult(aRecipeFromCache); - } // else: no cache, or the old recipe run into a hash collision with a different new recipe - } - - for (int i = 0; i < 15; i++) { - int count = aTag.getInteger("a" + i); - if (!aTag.hasKey("" + i) && count <= 0) { - continue; - } - - List<ItemStack> tAltCurrent = new ArrayList<>(); - for (int j = 0; j < count; j++) { - ItemStack tLoaded = GT_Utility.loadItem(aTag, "a" + i + ":" + j); - if (tLoaded == null) { - continue; - } - tAltCurrent.add(tLoaded); - if (GT_Values.D1) { - GT_FML_LOGGER.info("Item Alt " + i + " : " + tLoaded.getUnlocalizedName()); - } - } - mOreDictAlt.add(tAltCurrent); - ItemStack tLoaded = GT_Utility.loadItem(aTag, "" + i); - if (tLoaded == null) { - continue; - } - aInputs.add(tLoaded); - if (GT_Values.D1) { - GT_FML_LOGGER.info("Item " + i + " : " + tLoaded.getUnlocalizedName()); - } - } - - if (GT_Values.D1) { - GT_FML_LOGGER.info("All Items done, start fluid check"); - } - for (int i = 0; i < 4; i++) { - if (!aTag.hasKey("f" + i)) continue; - FluidStack tLoaded = GT_Utility.loadFluid(aTag, "f" + i); - if (tLoaded == null) continue; - aFluidInputs.add(tLoaded); - if (GT_Values.D1) { - GT_FML_LOGGER.info("Fluid " + i + " " + tLoaded.getUnlocalizedName()); - } - } - if (!aTag.hasKey("output") || !aTag.hasKey("time") || aTag.getInteger("time") <= 0 || !aTag.hasKey("eu") || !GT_Utility.isStackValid(aOutput)) { - return LookupResultType.INVALID_STICK.getResult(); - } - if (GT_Values.D1) { - GT_FML_LOGGER.info("Found Data Stick recipe"); - } - - int aTime = aTag.getInteger("time"); - int aEU = aTag.getInteger("eu"); - - // Try build a recipe instance - if (aReturnBuiltRecipe) { - return LookupResultType.VALID_STACK_AND_VALID_HASH.getResult(new GT_Recipe_AssemblyLine(null, 0, aInputs.toArray(new ItemStack[0]), aFluidInputs.toArray(new FluidStack[0]), aOutput, aTime, aEU)); - } - - - for (GT_Recipe_AssemblyLine aRecipe : GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes) { - if (aRecipe.mEUt != aEU || aRecipe.mDuration != aTime) continue; - if (!GT_Utility.areStacksEqual(aOutput, aRecipe.mOutput, true)) continue; - if (!GT_Utility.areStackListsEqual(Arrays.asList(aRecipe.mInputs), aInputs, false, true)) continue; - if (!Objects.equals(Arrays.asList(aRecipe.mFluidInputs), aFluidInputs)) continue; - if (!areStacksEqual(aRecipe.mOreDictAlt, mOreDictAlt)) continue; - - // Cache it - String aRecipeHash = generateRecipeHash(aRecipe); - sRecipeCacheByRecipeHash.put(aRecipeHash, aRecipe); - sRecipeCacheByOutput.put(new GT_ItemStack(aRecipe.mOutput), aRecipe); - if (doesDataStickHaveRecipeHash(aDataStick)) { - String aStickHash = getHashFromDataStack(aDataStick); - if (aRecipeHash.equals(aStickHash)) - return LookupResultType.VALID_STACK_AND_VALID_HASH.getResult(aRecipe); - } - return LookupResultType.VALID_STACK_AND_VALID_RECIPE.getResult(aRecipe); - } - return LookupResultType.VALID_STACK_BUT_INVALID_RECIPE.getResult(); - } - - private static boolean areStacksEqual(ItemStack[][] lhs, List<List<ItemStack>> rhs) { - for (int i = 0; i < lhs.length; i++) { - if (!areStacksEqual(lhs[i], rhs.get(i))) - return false; - } - return true; - } - - private static boolean areStacksEqual(ItemStack[] lhs, List<ItemStack> rhs) { - return lhs == null ? rhs.isEmpty() : !rhs.isEmpty() && GT_Utility.areStackListsEqual(Arrays.asList(lhs), rhs, false, true); - } - - - /** - * Finds a GT_Recipe_AssemblyLine based on the expected output ItemStack. - * @param aOutput - The Output of a GT_Recipe_AssemblyLine. - * @return First found GT_Recipe_AssemblyLine with matching output. - */ - public static GT_Recipe_AssemblyLine findAssemblyLineRecipeByOutput(ItemStack aOutput) { - if (aOutput == null) { - return null; - } - - // Check the cache - GT_ItemStack aCacheStack = new GT_ItemStack(aOutput); - GT_Recipe_AssemblyLine aRecipeFromCache = sRecipeCacheByOutput.get(aCacheStack); - if (aRecipeFromCache != null) { - return aRecipeFromCache; - } - - // Iterate all recipes and return the first matching based on Output. - for (GT_Recipe_AssemblyLine aRecipe : GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes) { - ItemStack aRecipeOutput = aRecipe.mOutput; - if (GT_Utility.areStacksEqual(aRecipeOutput, aOutput)) { - // Cache it to prevent future iterations of all recipes - sRecipeCacheByOutput.put(aCacheStack, aRecipe); - sRecipeCacheByRecipeHash.put(generateRecipeHash(aRecipe), aRecipe); - return aRecipe; - } - } - return null; - } - - /** - * @param aRecipe - The recipe to generate a Recipe Hash String from. - * @return The Recipe Hash String. - */ - public static String generateRecipeHash(GT_Recipe_AssemblyLine aRecipe) { - String aHash = "Invalid.Recipe.Hash"; - if (aRecipe != null) { - aHash = "Hash."+aRecipe.getPersistentHash(); - } - return aHash; - } - - /** - * @param aRecipe - The recipe to add to internal caches - * @throws IllegalArgumentException if given recipe collide with any existing recipe in the cache - */ - public static void addRecipeToCache(GT_Recipe_AssemblyLine aRecipe) { - if (aRecipe != null) { - String aHash = "Hash." + aRecipe.getPersistentHash(); - GT_Recipe_AssemblyLine existing = sRecipeCacheByOutput.put(new GT_ItemStack(aRecipe.mOutput), aRecipe); - if (existing != null) - throw new IllegalArgumentException("Duplicate assline recipe for " + aRecipe.mOutput); - existing = sRecipeCacheByRecipeHash.put(aHash, aRecipe); - if (existing != null && !existing.equals(aRecipe)) - throw new IllegalArgumentException("Recipe hash collision for " + aRecipe + " and " + existing); - } - } - - /** - * @param aHash - Recipe hash String, may be null but will just be treated as invalid. - * @return Is this Recipe Hash String valid? - */ - public static boolean isValidHash(String aHash) { - if (aHash != null && aHash.length() > 0) { - // persistent hash can never be 0 - return !aHash.equals("Invalid.Recipe.Hash") && !aHash.equals("Hash.0"); - } - return false; - } - - /** - * @param aStack - The ItemStack to check. - * @return Is this ItemStack a Data Stick? - */ - public static boolean isItemDataStick(ItemStack aStack) { - return GT_Utility.isStackValid(aStack) && ItemList.Tool_DataStick.isStackEqual(aStack, false, true); - } - - /** - * @param aDataStick - The Data Stick to check. - * @return Does this Data Stick have a valid output ItemStack? - */ - public static boolean doesDataStickHaveOutput(ItemStack aDataStick) { - if (isItemDataStick(aDataStick) && aDataStick.hasTagCompound() && aDataStick.getTagCompound().hasKey("output")) { - return true; - } - return false; - } - - /** - * @param aDataStick - The Data Stick to check. - * @return Does this Data Stick need recipe data updated. - */ - public static boolean doesDataStickNeedUpdate(ItemStack aDataStick) { - if (isItemDataStick(aDataStick) && doesDataStickHaveRecipeHash(aDataStick)) { - String aStickHash = getHashFromDataStack(aDataStick); - if (isValidHash(aStickHash) && doesDataStickHaveOutput(aDataStick)) { - ItemStack aStickOutput = getDataStickOutput(aDataStick); - GT_Recipe_AssemblyLine aIntendedRecipe = findAssemblyLineRecipeByOutput(aStickOutput); - if (aStickHash.equals(generateRecipeHash(aIntendedRecipe))) { - return false; - } - } - } - return true; - } - - /** - * @param aDataStick - The Data Stick to check. - * @return Does this have a Recipe Hash String at all? - */ - public static boolean doesDataStickHaveRecipeHash(ItemStack aDataStick) { - if (isItemDataStick(aDataStick) && aDataStick.hasTagCompound()) { - NBTTagCompound aNBT = aDataStick.getTagCompound(); - if (aNBT.hasKey("Data.Recipe.Hash") && !aNBT.getString("Data.Recipe.Hash").equals("Hash.0")) { - return true; - } - } - return false; - } - - /** - * Get the Output ItemStack from a Data Stick. - * @param aDataStick - The Data Stick to check. - * @return Output ItemStack contained on the Data Stick. - */ - public static ItemStack getDataStickOutput(ItemStack aDataStick) { - if (doesDataStickHaveOutput(aDataStick)) { - ItemStack aOutput = GT_Utility.loadItem(aDataStick.getTagCompound(), "output"); - return aOutput; - } - return null; - } - - /** - * @param aDataStick - The Data Stick to process. - * @return The stored Recipe Hash String on the Data Stick, will return an invalid Hash if one is not found. <p> - * The hash will be guaranteed to pass isValidHash(). <p> - * Will not return Null. - */ - public static String getHashFromDataStack(ItemStack aDataStick) { - if (isItemDataStick(aDataStick) && aDataStick.hasTagCompound()) { - NBTTagCompound aNBT = aDataStick.getTagCompound(); - if (aNBT.hasKey("Data.Recipe.Hash", NBT.TAG_STRING)) { - String hash = aNBT.getString("Data.Recipe.Hash"); - if (isValidHash(hash)) - return hash; - } - } - return "Invalid.Recipe.Hash"; - } - - /** - * - * @param aDataStick - The Data Stick to update. - * @param aRecipeHash - The Recipe Hash String to update with. - * @return Did we update the Recipe Hash String on the Data Stick? - */ - public static boolean setRecipeHashOnDataStick(ItemStack aDataStick, String aRecipeHash) { - if (isItemDataStick(aDataStick) && aDataStick.hasTagCompound()) { - NBTTagCompound aNBT = aDataStick.getTagCompound(); - aNBT.setString("Data.Recipe.Hash", aRecipeHash); - aDataStick.setTagCompound(aNBT); - return true; - } - return false; - } - - /** - * - * @param aDataStick - The Data Stick to update. - * @param aNewRecipe - The New GT_Recipe_AssemblyLine recipe to update it with. - * @return Did we set the new recipe data & Recipe Hash String on the Data Stick? - */ - public static boolean setAssemblyLineRecipeOnDataStick(ItemStack aDataStick, GT_Recipe_AssemblyLine aNewRecipe) { - if (isItemDataStick(aDataStick)) { - String s = aNewRecipe.mOutput.getDisplayName(); - if (FMLCommonHandler.instance().getEffectiveSide().isServer()) { - s = GT_Assemblyline_Server.lServerNames.get(aNewRecipe.mOutput.getDisplayName()); - if (s == null) { - s = aNewRecipe.mOutput.getDisplayName(); - } - } - - String aHash = generateRecipeHash(aNewRecipe); - if (GT_Values.D1) { - GT_Recipe_AssemblyLine aOldRecipe = findAssemblyLineRecipeFromDataStick(aDataStick, true).recipe; - GT_FML_LOGGER.info("Updating data stick: "+aDataStick.getDisplayName()+" | Old Recipe Hash: "+generateRecipeHash(aOldRecipe)+", New Recipe Hash: "+aHash); - } - - String author = "Assembling Line Recipe Generator"; - String displayName = null; - if (aDataStick.hasTagCompound()) { - NBTTagCompound tag = aDataStick.getTagCompound(); - if (tag.hasKey("author", NBT.TAG_STRING)) { - author = tag.getString("author"); - } - if (tag.hasKey("display", NBT.TAG_COMPOUND)) { - NBTTagCompound displayTag = tag.getCompoundTag("display"); - if (displayTag.hasKey("Name", NBT.TAG_STRING)) - displayName = displayTag.getString("Name"); - } - } - - //remove possible old NBTTagCompound - aDataStick.setTagCompound(new NBTTagCompound()); - if (displayName != null) - aDataStick.setStackDisplayName(displayName); - if (GT_Values.D1) { - GT_Utility.ItemNBT.setBookTitle(aDataStick, s + " Construction Data ("+aHash+")"); - } - else { - GT_Utility.ItemNBT.setBookTitle(aDataStick, s + " Construction Data"); - } - - NBTTagCompound tNBT = aDataStick.getTagCompound(); - if (tNBT == null) { - tNBT = new NBTTagCompound(); - } - - tNBT.setTag("output", aNewRecipe.mOutput.writeToNBT(new NBTTagCompound())); - tNBT.setInteger("time", aNewRecipe.mDuration); - tNBT.setInteger("eu", aNewRecipe.mEUt); - for (int i = 0; i < aNewRecipe.mInputs.length; i++) { - tNBT.setTag("" + i, aNewRecipe.mInputs[i].writeToNBT(new NBTTagCompound())); - } - for (int i = 0; i < aNewRecipe.mOreDictAlt.length; i++) { - if (aNewRecipe.mOreDictAlt[i] != null && aNewRecipe.mOreDictAlt[i].length > 0) { - tNBT.setInteger("a" + i, aNewRecipe.mOreDictAlt[i].length); - for (int j = 0; j < aNewRecipe.mOreDictAlt[i].length; j++) { - tNBT.setTag("a" + i + ":" + j, aNewRecipe.mOreDictAlt[i][j].writeToNBT(new NBTTagCompound())); - } - } - } - for (int i = 0; i < aNewRecipe.mFluidInputs.length; i++) { - tNBT.setTag("f" + i, aNewRecipe.mFluidInputs[i].writeToNBT(new NBTTagCompound())); - } - tNBT.setString("author", author); - NBTTagList tNBTList = new NBTTagList(); - s = aNewRecipe.mOutput.getDisplayName(); - if (FMLCommonHandler.instance().getEffectiveSide().isServer()) { - s = GT_Assemblyline_Server.lServerNames.get(aNewRecipe.mOutput.getDisplayName()); - if (s == null) - s = aNewRecipe.mOutput.getDisplayName(); - } - tNBTList.appendTag(new NBTTagString("Construction plan for " + aNewRecipe.mOutput.stackSize + " " + s + ". Needed EU/t: " + aNewRecipe.mEUt + " Production time: " + (aNewRecipe.mDuration / 20))); - for (int i = 0; i < aNewRecipe.mInputs.length; i++) { - if (aNewRecipe.mOreDictAlt[i] != null) { - int count = 0; - StringBuilder tBuilder = new StringBuilder("Input Bus " + (i + 1) + ": "); - for (ItemStack tStack : aNewRecipe.mOreDictAlt[i]) { - if (tStack != null) { - s = tStack.getDisplayName(); - if (FMLCommonHandler.instance().getEffectiveSide().isServer()) { - s = GT_Assemblyline_Server.lServerNames.get(tStack.getDisplayName()); - if (s == null) - s = tStack.getDisplayName(); - } - - - tBuilder.append(count == 0 ? "" : "\nOr ").append(tStack.stackSize).append(" ").append(s); - count++; - } - } - if (count > 0) tNBTList.appendTag(new NBTTagString(tBuilder.toString())); - } else if (aNewRecipe.mInputs[i] != null) { - s = aNewRecipe.mInputs[i].getDisplayName(); - if (FMLCommonHandler.instance().getEffectiveSide().isServer()) { - s = GT_Assemblyline_Server.lServerNames.get(aNewRecipe.mInputs[i].getDisplayName()); - if (s == null) - s = aNewRecipe.mInputs[i].getDisplayName(); - } - tNBTList.appendTag(new NBTTagString("Input Bus " + (i + 1) + ": " + aNewRecipe.mInputs[i].stackSize + " " + s)); - } - } - for (int i = 0; i < aNewRecipe.mFluidInputs.length; i++) { - if (aNewRecipe.mFluidInputs[i] != null) { - s = aNewRecipe.mFluidInputs[i].getLocalizedName(); - if (FMLCommonHandler.instance().getEffectiveSide().isServer()) { - s = GT_Assemblyline_Server.lServerNames.get(aNewRecipe.mFluidInputs[i].getLocalizedName()); - if (s == null) - s = aNewRecipe.mFluidInputs[i].getLocalizedName(); - } - tNBTList.appendTag(new NBTTagString("Input Hatch " + (i + 1) + ": " + aNewRecipe.mFluidInputs[i].amount + "L " + s)); - } - } - tNBT.setTag("pages", tNBTList); - tNBT.setLong("lastUpdate", System.currentTimeMillis()); - aDataStick.setTagCompound(tNBT); - // Set recipe hash - setRecipeHashOnDataStick(aDataStick, aHash); - return true; - } - return false; - } - - public enum LookupResultType { - INVALID_STICK(true), - VALID_STACK_BUT_INVALID_RECIPE(true), - VALID_STACK_AND_VALID_RECIPE(false), - VALID_STACK_AND_VALID_HASH(false); - - private final boolean recipeNull; - private LookupResult singletonResult; - - LookupResultType(boolean recipeNull) { - this.recipeNull = recipeNull; - } - - public LookupResult getResult() { - if (!recipeNull) - throw new IllegalArgumentException("This result type require a nonnull recipe"); - if (singletonResult == null) - singletonResult = new LookupResult(null, this); - return singletonResult; - } - - public LookupResult getResult(GT_Recipe_AssemblyLine recipe) { - if ((recipe == null) != recipeNull) - throw new IllegalArgumentException("This result type does not allow given input"); - return new LookupResult(recipe, this); - } - } - - public static class LookupResult { - private final GT_Recipe_AssemblyLine recipe; - private final LookupResultType type; - - LookupResult(GT_Recipe_AssemblyLine recipe, LookupResultType type) { - this.recipe = recipe; - this.type = type; - } - - public GT_Recipe_AssemblyLine getRecipe() { - return recipe; - } - - public LookupResultType getType() { - return type; - } - } + /** + * A cache of Recipes using the Output as Key. + */ + private static HashMap<GT_ItemStack, GT_Recipe_AssemblyLine> sRecipeCacheByOutput = + new HashMap<GT_ItemStack, GT_Recipe_AssemblyLine>(); + /** + * A cache of Recipes using the Recipe Hash String as Key. + */ + private static HashMap<String, GT_Recipe_AssemblyLine> sRecipeCacheByRecipeHash = + new HashMap<String, GT_Recipe_AssemblyLine>(); + + /** + * Checks the DataStick for deprecated/invalid recipes, updating them as required. + * @param aDataStick - The DataStick to process + * @return Is this DataStick now valid with a current recipe? + */ + public static GT_Recipe_AssemblyLine processDataStick(ItemStack aDataStick) { + if (!isItemDataStick(aDataStick)) { + return null; + } + if (doesDataStickNeedUpdate(aDataStick)) { + ItemStack aStickOutput = getDataStickOutput(aDataStick); + if (aStickOutput != null) { + GT_Recipe_AssemblyLine aIntendedRecipe = findAssemblyLineRecipeByOutput(aStickOutput); + if (aIntendedRecipe != null && setAssemblyLineRecipeOnDataStick(aDataStick, aIntendedRecipe)) + return aIntendedRecipe; + } + } + return null; + } + + /** + * Finds an Assembly Line recipe from a DataStick. + * @param aDataStick - The DataStick to check. + * @return The GT_Recipe_AssemblyLine recipe contained on the DataStick, if any. + */ + public static GT_Recipe_AssemblyLine findAssemblyLineRecipeFromDataStick(ItemStack aDataStick) { + return findAssemblyLineRecipeFromDataStick(aDataStick, false).getRecipe(); + } + + /** + * Finds an Assembly Line recipe from a DataStick. + * @param aDataStick - The DataStick to check. + * @param aReturnBuiltRecipe - Do we return a GT_Recipe_AssemblyLine built from the data on the Data Stick instead of searching the Recipe Map? + * @return The GT_Recipe_AssemblyLine recipe contained on the DataStick, if any. + */ + @Nonnull + public static LookupResult findAssemblyLineRecipeFromDataStick(ItemStack aDataStick, boolean aReturnBuiltRecipe) { + if (!isItemDataStick(aDataStick) || !doesDataStickHaveOutput(aDataStick)) { + return LookupResultType.INVALID_STICK.getResult(); + } + List<ItemStack> aInputs = new ArrayList<>(15); + ItemStack aOutput = getDataStickOutput(aDataStick); + List<List<ItemStack>> mOreDictAlt = new ArrayList<>(15); + List<FluidStack> aFluidInputs = new ArrayList<>(4); + + NBTTagCompound aTag = aDataStick.getTagCompound(); + if (aTag == null) { + return LookupResultType.INVALID_STICK.getResult(); + } + + // Get From Cache + if (doesDataStickHaveRecipeHash(aDataStick)) { + GT_Recipe_AssemblyLine aRecipeFromCache = sRecipeCacheByRecipeHash.get(getHashFromDataStack(aDataStick)); + if (aRecipeFromCache != null && GT_Utility.areStacksEqual(aOutput, aRecipeFromCache.mOutput)) { + return LookupResultType.VALID_STACK_AND_VALID_HASH.getResult(aRecipeFromCache); + } // else: no cache, or the old recipe run into a hash collision with a different new recipe + } + + for (int i = 0; i < 15; i++) { + int count = aTag.getInteger("a" + i); + if (!aTag.hasKey("" + i) && count <= 0) { + continue; + } + + List<ItemStack> tAltCurrent = new ArrayList<>(); + for (int j = 0; j < count; j++) { + ItemStack tLoaded = GT_Utility.loadItem(aTag, "a" + i + ":" + j); + if (tLoaded == null) { + continue; + } + tAltCurrent.add(tLoaded); + if (GT_Values.D1) { + GT_FML_LOGGER.info("Item Alt " + i + " : " + tLoaded.getUnlocalizedName()); + } + } + mOreDictAlt.add(tAltCurrent); + ItemStack tLoaded = GT_Utility.loadItem(aTag, "" + i); + if (tLoaded == null) { + continue; + } + aInputs.add(tLoaded); + if (GT_Values.D1) { + GT_FML_LOGGER.info("Item " + i + " : " + tLoaded.getUnlocalizedName()); + } + } + + if (GT_Values.D1) { + GT_FML_LOGGER.info("All Items done, start fluid check"); + } + for (int i = 0; i < 4; i++) { + if (!aTag.hasKey("f" + i)) continue; + FluidStack tLoaded = GT_Utility.loadFluid(aTag, "f" + i); + if (tLoaded == null) continue; + aFluidInputs.add(tLoaded); + if (GT_Values.D1) { + GT_FML_LOGGER.info("Fluid " + i + " " + tLoaded.getUnlocalizedName()); + } + } + if (!aTag.hasKey("output") + || !aTag.hasKey("time") + || aTag.getInteger("time") <= 0 + || !aTag.hasKey("eu") + || !GT_Utility.isStackValid(aOutput)) { + return LookupResultType.INVALID_STICK.getResult(); + } + if (GT_Values.D1) { + GT_FML_LOGGER.info("Found Data Stick recipe"); + } + + int aTime = aTag.getInteger("time"); + int aEU = aTag.getInteger("eu"); + + // Try build a recipe instance + if (aReturnBuiltRecipe) { + return LookupResultType.VALID_STACK_AND_VALID_HASH.getResult(new GT_Recipe_AssemblyLine( + null, + 0, + aInputs.toArray(new ItemStack[0]), + aFluidInputs.toArray(new FluidStack[0]), + aOutput, + aTime, + aEU)); + } + + for (GT_Recipe_AssemblyLine aRecipe : GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes) { + if (aRecipe.mEUt != aEU || aRecipe.mDuration != aTime) continue; + if (!GT_Utility.areStacksEqual(aOutput, aRecipe.mOutput, true)) continue; + if (!GT_Utility.areStackListsEqual(Arrays.asList(aRecipe.mInputs), aInputs, false, true)) continue; + if (!Objects.equals(Arrays.asList(aRecipe.mFluidInputs), aFluidInputs)) continue; + if (!areStacksEqual(aRecipe.mOreDictAlt, mOreDictAlt)) continue; + + // Cache it + String aRecipeHash = generateRecipeHash(aRecipe); + sRecipeCacheByRecipeHash.put(aRecipeHash, aRecipe); + sRecipeCacheByOutput.put(new GT_ItemStack(aRecipe.mOutput), aRecipe); + if (doesDataStickHaveRecipeHash(aDataStick)) { + String aStickHash = getHashFromDataStack(aDataStick); + if (aRecipeHash.equals(aStickHash)) + return LookupResultType.VALID_STACK_AND_VALID_HASH.getResult(aRecipe); + } + return LookupResultType.VALID_STACK_AND_VALID_RECIPE.getResult(aRecipe); + } + return LookupResultType.VALID_STACK_BUT_INVALID_RECIPE.getResult(); + } + + private static boolean areStacksEqual(ItemStack[][] lhs, List<List<ItemStack>> rhs) { + for (int i = 0; i < lhs.length; i++) { + if (!areStacksEqual(lhs[i], rhs.get(i))) return false; + } + return true; + } + + private static boolean areStacksEqual(ItemStack[] lhs, List<ItemStack> rhs) { + return lhs == null + ? rhs.isEmpty() + : !rhs.isEmpty() && GT_Utility.areStackListsEqual(Arrays.asList(lhs), rhs, false, true); + } + + /** + * Finds a GT_Recipe_AssemblyLine based on the expected output ItemStack. + * @param aOutput - The Output of a GT_Recipe_AssemblyLine. + * @return First found GT_Recipe_AssemblyLine with matching output. + */ + public static GT_Recipe_AssemblyLine findAssemblyLineRecipeByOutput(ItemStack aOutput) { + if (aOutput == null) { + return null; + } + + // Check the cache + GT_ItemStack aCacheStack = new GT_ItemStack(aOutput); + GT_Recipe_AssemblyLine aRecipeFromCache = sRecipeCacheByOutput.get(aCacheStack); + if (aRecipeFromCache != null) { + return aRecipeFromCache; + } + + // Iterate all recipes and return the first matching based on Output. + for (GT_Recipe_AssemblyLine aRecipe : GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes) { + ItemStack aRecipeOutput = aRecipe.mOutput; + if (GT_Utility.areStacksEqual(aRecipeOutput, aOutput)) { + // Cache it to prevent future iterations of all recipes + sRecipeCacheByOutput.put(aCacheStack, aRecipe); + sRecipeCacheByRecipeHash.put(generateRecipeHash(aRecipe), aRecipe); + return aRecipe; + } + } + return null; + } + + /** + * @param aRecipe - The recipe to generate a Recipe Hash String from. + * @return The Recipe Hash String. + */ + public static String generateRecipeHash(GT_Recipe_AssemblyLine aRecipe) { + String aHash = "Invalid.Recipe.Hash"; + if (aRecipe != null) { + aHash = "Hash." + aRecipe.getPersistentHash(); + } + return aHash; + } + + /** + * @param aRecipe - The recipe to add to internal caches + * @throws IllegalArgumentException if given recipe collide with any existing recipe in the cache + */ + public static void addRecipeToCache(GT_Recipe_AssemblyLine aRecipe) { + if (aRecipe != null) { + String aHash = "Hash." + aRecipe.getPersistentHash(); + GT_Recipe_AssemblyLine existing = sRecipeCacheByOutput.put(new GT_ItemStack(aRecipe.mOutput), aRecipe); + if (existing != null) throw new IllegalArgumentException("Duplicate assline recipe for " + aRecipe.mOutput); + existing = sRecipeCacheByRecipeHash.put(aHash, aRecipe); + if (existing != null && !existing.equals(aRecipe)) + throw new IllegalArgumentException("Recipe hash collision for " + aRecipe + " and " + existing); + } + } + + /** + * @param aHash - Recipe hash String, may be null but will just be treated as invalid. + * @return Is this Recipe Hash String valid? + */ + public static boolean isValidHash(String aHash) { + if (aHash != null && aHash.length() > 0) { + // persistent hash can never be 0 + return !aHash.equals("Invalid.Recipe.Hash") && !aHash.equals("Hash.0"); + } + return false; + } + + /** + * @param aStack - The ItemStack to check. + * @return Is this ItemStack a Data Stick? + */ + public static boolean isItemDataStick(ItemStack aStack) { + return GT_Utility.isStackValid(aStack) && ItemList.Tool_DataStick.isStackEqual(aStack, false, true); + } + + /** + * @param aDataStick - The Data Stick to check. + * @return Does this Data Stick have a valid output ItemStack? + */ + public static boolean doesDataStickHaveOutput(ItemStack aDataStick) { + if (isItemDataStick(aDataStick) + && aDataStick.hasTagCompound() + && aDataStick.getTagCompound().hasKey("output")) { + return true; + } + return false; + } + + /** + * @param aDataStick - The Data Stick to check. + * @return Does this Data Stick need recipe data updated. + */ + public static boolean doesDataStickNeedUpdate(ItemStack aDataStick) { + if (isItemDataStick(aDataStick) && doesDataStickHaveRecipeHash(aDataStick)) { + String aStickHash = getHashFromDataStack(aDataStick); + if (isValidHash(aStickHash) && doesDataStickHaveOutput(aDataStick)) { + ItemStack aStickOutput = getDataStickOutput(aDataStick); + GT_Recipe_AssemblyLine aIntendedRecipe = findAssemblyLineRecipeByOutput(aStickOutput); + if (aStickHash.equals(generateRecipeHash(aIntendedRecipe))) { + return false; + } + } + } + return true; + } + + /** + * @param aDataStick - The Data Stick to check. + * @return Does this have a Recipe Hash String at all? + */ + public static boolean doesDataStickHaveRecipeHash(ItemStack aDataStick) { + if (isItemDataStick(aDataStick) && aDataStick.hasTagCompound()) { + NBTTagCompound aNBT = aDataStick.getTagCompound(); + if (aNBT.hasKey("Data.Recipe.Hash") + && !aNBT.getString("Data.Recipe.Hash").equals("Hash.0")) { + return true; + } + } + return false; + } + + /** + * Get the Output ItemStack from a Data Stick. + * @param aDataStick - The Data Stick to check. + * @return Output ItemStack contained on the Data Stick. + */ + public static ItemStack getDataStickOutput(ItemStack aDataStick) { + if (doesDataStickHaveOutput(aDataStick)) { + ItemStack aOutput = GT_Utility.loadItem(aDataStick.getTagCompound(), "output"); + return aOutput; + } + return null; + } + + /** + * @param aDataStick - The Data Stick to process. + * @return The stored Recipe Hash String on the Data Stick, will return an invalid Hash if one is not found. <p> + * The hash will be guaranteed to pass isValidHash(). <p> + * Will not return Null. + */ + public static String getHashFromDataStack(ItemStack aDataStick) { + if (isItemDataStick(aDataStick) && aDataStick.hasTagCompound()) { + NBTTagCompound aNBT = aDataStick.getTagCompound(); + if (aNBT.hasKey("Data.Recipe.Hash", NBT.TAG_STRING)) { + String hash = aNBT.getString("Data.Recipe.Hash"); + if (isValidHash(hash)) return hash; + } + } + return "Invalid.Recipe.Hash"; + } + + /** + * + * @param aDataStick - The Data Stick to update. + * @param aRecipeHash - The Recipe Hash String to update with. + * @return Did we update the Recipe Hash String on the Data Stick? + */ + public static boolean setRecipeHashOnDataStick(ItemStack aDataStick, String aRecipeHash) { + if (isItemDataStick(aDataStick) && aDataStick.hasTagCompound()) { + NBTTagCompound aNBT = aDataStick.getTagCompound(); + aNBT.setString("Data.Recipe.Hash", aRecipeHash); + aDataStick.setTagCompound(aNBT); + return true; + } + return false; + } + + /** + * + * @param aDataStick - The Data Stick to update. + * @param aNewRecipe - The New GT_Recipe_AssemblyLine recipe to update it with. + * @return Did we set the new recipe data & Recipe Hash String on the Data Stick? + */ + public static boolean setAssemblyLineRecipeOnDataStick(ItemStack aDataStick, GT_Recipe_AssemblyLine aNewRecipe) { + if (isItemDataStick(aDataStick)) { + String s = aNewRecipe.mOutput.getDisplayName(); + if (FMLCommonHandler.instance().getEffectiveSide().isServer()) { + s = GT_Assemblyline_Server.lServerNames.get(aNewRecipe.mOutput.getDisplayName()); + if (s == null) { + s = aNewRecipe.mOutput.getDisplayName(); + } + } + + String aHash = generateRecipeHash(aNewRecipe); + if (GT_Values.D1) { + GT_Recipe_AssemblyLine aOldRecipe = findAssemblyLineRecipeFromDataStick(aDataStick, true).recipe; + GT_FML_LOGGER.info("Updating data stick: " + aDataStick.getDisplayName() + " | Old Recipe Hash: " + + generateRecipeHash(aOldRecipe) + ", New Recipe Hash: " + aHash); + } + + String author = "Assembling Line Recipe Generator"; + String displayName = null; + if (aDataStick.hasTagCompound()) { + NBTTagCompound tag = aDataStick.getTagCompound(); + if (tag.hasKey("author", NBT.TAG_STRING)) { + author = tag.getString("author"); + } + if (tag.hasKey("display", NBT.TAG_COMPOUND)) { + NBTTagCompound displayTag = tag.getCompoundTag("display"); + if (displayTag.hasKey("Name", NBT.TAG_STRING)) displayName = displayTag.getString("Name"); + } + } + + // remove possible old NBTTagCompound + aDataStick.setTagCompound(new NBTTagCompound()); + if (displayName != null) aDataStick.setStackDisplayName(displayName); + if (GT_Values.D1) { + GT_Utility.ItemNBT.setBookTitle(aDataStick, s + " Construction Data (" + aHash + ")"); + } else { + GT_Utility.ItemNBT.setBookTitle(aDataStick, s + " Construction Data"); + } + + NBTTagCompound tNBT = aDataStick.getTagCompound(); + if (tNBT == null) { + tNBT = new NBTTagCompound(); + } + + tNBT.setTag("output", aNewRecipe.mOutput.writeToNBT(new NBTTagCompound())); + tNBT.setInteger("time", aNewRecipe.mDuration); + tNBT.setInteger("eu", aNewRecipe.mEUt); + for (int i = 0; i < aNewRecipe.mInputs.length; i++) { + tNBT.setTag("" + i, aNewRecipe.mInputs[i].writeToNBT(new NBTTagCompound())); + } + for (int i = 0; i < aNewRecipe.mOreDictAlt.length; i++) { + if (aNewRecipe.mOreDictAlt[i] != null && aNewRecipe.mOreDictAlt[i].length > 0) { + tNBT.setInteger("a" + i, aNewRecipe.mOreDictAlt[i].length); + for (int j = 0; j < aNewRecipe.mOreDictAlt[i].length; j++) { + tNBT.setTag("a" + i + ":" + j, aNewRecipe.mOreDictAlt[i][j].writeToNBT(new NBTTagCompound())); + } + } + } + for (int i = 0; i < aNewRecipe.mFluidInputs.length; i++) { + tNBT.setTag("f" + i, aNewRecipe.mFluidInputs[i].writeToNBT(new NBTTagCompound())); + } + tNBT.setString("author", author); + NBTTagList tNBTList = new NBTTagList(); + s = aNewRecipe.mOutput.getDisplayName(); + if (FMLCommonHandler.instance().getEffectiveSide().isServer()) { + s = GT_Assemblyline_Server.lServerNames.get(aNewRecipe.mOutput.getDisplayName()); + if (s == null) s = aNewRecipe.mOutput.getDisplayName(); + } + tNBTList.appendTag(new NBTTagString("Construction plan for " + aNewRecipe.mOutput.stackSize + " " + s + + ". Needed EU/t: " + aNewRecipe.mEUt + " Production time: " + (aNewRecipe.mDuration / 20))); + for (int i = 0; i < aNewRecipe.mInputs.length; i++) { + if (aNewRecipe.mOreDictAlt[i] != null) { + int count = 0; + StringBuilder tBuilder = new StringBuilder("Input Bus " + (i + 1) + ": "); + for (ItemStack tStack : aNewRecipe.mOreDictAlt[i]) { + if (tStack != null) { + s = tStack.getDisplayName(); + if (FMLCommonHandler.instance().getEffectiveSide().isServer()) { + s = GT_Assemblyline_Server.lServerNames.get(tStack.getDisplayName()); + if (s == null) s = tStack.getDisplayName(); + } + + tBuilder.append(count == 0 ? "" : "\nOr ") + .append(tStack.stackSize) + .append(" ") + .append(s); + count++; + } + } + if (count > 0) tNBTList.appendTag(new NBTTagString(tBuilder.toString())); + } else if (aNewRecipe.mInputs[i] != null) { + s = aNewRecipe.mInputs[i].getDisplayName(); + if (FMLCommonHandler.instance().getEffectiveSide().isServer()) { + s = GT_Assemblyline_Server.lServerNames.get(aNewRecipe.mInputs[i].getDisplayName()); + if (s == null) s = aNewRecipe.mInputs[i].getDisplayName(); + } + tNBTList.appendTag(new NBTTagString( + "Input Bus " + (i + 1) + ": " + aNewRecipe.mInputs[i].stackSize + " " + s)); + } + } + for (int i = 0; i < aNewRecipe.mFluidInputs.length; i++) { + if (aNewRecipe.mFluidInputs[i] != null) { + s = aNewRecipe.mFluidInputs[i].getLocalizedName(); + if (FMLCommonHandler.instance().getEffectiveSide().isServer()) { + s = GT_Assemblyline_Server.lServerNames.get(aNewRecipe.mFluidInputs[i].getLocalizedName()); + if (s == null) s = aNewRecipe.mFluidInputs[i].getLocalizedName(); + } + tNBTList.appendTag(new NBTTagString( + "Input Hatch " + (i + 1) + ": " + aNewRecipe.mFluidInputs[i].amount + "L " + s)); + } + } + tNBT.setTag("pages", tNBTList); + tNBT.setLong("lastUpdate", System.currentTimeMillis()); + aDataStick.setTagCompound(tNBT); + // Set recipe hash + setRecipeHashOnDataStick(aDataStick, aHash); + return true; + } + return false; + } + + public enum LookupResultType { + INVALID_STICK(true), + VALID_STACK_BUT_INVALID_RECIPE(true), + VALID_STACK_AND_VALID_RECIPE(false), + VALID_STACK_AND_VALID_HASH(false); + + private final boolean recipeNull; + private LookupResult singletonResult; + + LookupResultType(boolean recipeNull) { + this.recipeNull = recipeNull; + } + + public LookupResult getResult() { + if (!recipeNull) throw new IllegalArgumentException("This result type require a nonnull recipe"); + if (singletonResult == null) singletonResult = new LookupResult(null, this); + return singletonResult; + } + + public LookupResult getResult(GT_Recipe_AssemblyLine recipe) { + if ((recipe == null) != recipeNull) + throw new IllegalArgumentException("This result type does not allow given input"); + return new LookupResult(recipe, this); + } + } + + public static class LookupResult { + private final GT_Recipe_AssemblyLine recipe; + private final LookupResultType type; + + LookupResult(GT_Recipe_AssemblyLine recipe, LookupResultType type) { + this.recipe = recipe; + this.type = type; + } + + public GT_Recipe_AssemblyLine getRecipe() { + return recipe; + } + + public LookupResultType getType() { + return type; + } + } } diff --git a/src/main/java/gregtech/api/util/GT_Assemblyline_Server.java b/src/main/java/gregtech/api/util/GT_Assemblyline_Server.java index fa838abec1..15d11cda63 100644 --- a/src/main/java/gregtech/api/util/GT_Assemblyline_Server.java +++ b/src/main/java/gregtech/api/util/GT_Assemblyline_Server.java @@ -1,345 +1,415 @@ package gregtech.api.util; -import java.io.File; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; - import cpw.mods.fml.common.event.FMLPreInitializationEvent; import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.enums.MaterialsBotania; +import java.io.File; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; import net.minecraftforge.common.config.ConfigCategory; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.config.Property; public class GT_Assemblyline_Server { + public static LinkedHashMap<String, String> lServerNames = new LinkedHashMap<String, String>(); + private static LinkedHashMap<String, String> internal2 = new LinkedHashMap<String, String>(), + internal3 = new LinkedHashMap<String, String>(), + internal4 = new LinkedHashMap<String, String>(); + private static HashMap<String, Property> internal = new HashMap<String, Property>(); - public static LinkedHashMap<String, String> lServerNames = new LinkedHashMap<String, String>(); - private static LinkedHashMap<String, String> internal2 = new LinkedHashMap<String, String>(), internal3 = new LinkedHashMap<String, String>(), internal4 = new LinkedHashMap<String, String>(); - private static HashMap<String, Property> internal = new HashMap<String, Property>(); - - public static void fillMap(FMLPreInitializationEvent aEvent) { + public static void fillMap(FMLPreInitializationEvent aEvent) { - String s = new String(aEvent.getModConfigurationDirectory().getAbsolutePath()); - s = s.substring(0, aEvent.getModConfigurationDirectory().getAbsolutePath().length() - 6); - s = s + "GregTech.lang"; - File f = new File(s); - s = ""; - Configuration conf = new Configuration(f); + String s = new String(aEvent.getModConfigurationDirectory().getAbsolutePath()); + s = s.substring( + 0, aEvent.getModConfigurationDirectory().getAbsolutePath().length() - 6); + s = s + "GregTech.lang"; + File f = new File(s); + s = ""; + Configuration conf = new Configuration(f); - ConfigCategory cat = conf.getCategory("languagefile"); - internal.putAll(cat.getValues()); - for (Map.Entry<String, Property> entry : internal.entrySet()) { - try { - s = entry.getValue().getString().replaceAll("%", ""); + ConfigCategory cat = conf.getCategory("languagefile"); + internal.putAll(cat.getValues()); + for (Map.Entry<String, Property> entry : internal.entrySet()) { + try { + s = entry.getValue().getString().replaceAll("%", ""); - if (entry.getKey().contains("metaitem") && s.contains("material")) - internal2.put(entry.getKey(), s); - else if (entry.getKey().contains("blockmachines") && s.contains("material")) - internal3.put(entry.getKey(), s); - else if ((entry.getKey().contains("blockores") || (entry.getKey().contains("blockmetal") || entry.getKey().contains("blockgem"))) && s.contains("material")) - internal4.put(entry.getKey(), s); - else - lServerNames.put(entry.getKey(), s); - } catch (Exception ignored) { - } - } - for (Map.Entry<String, String> entry : internal2.entrySet()) { - try { - if (entry.getKey().contains("name")) { - int i = Integer.parseInt(entry.getKey().substring("gt.metaitem.01.".length(), entry.getKey().length() - ".name".length())); - i = i % 1000; - if (GregTech_API.sGeneratedMaterials[i] != null) - lServerNames.put(entry.getKey(), entry.getValue().replace("material", GregTech_API.sGeneratedMaterials[i].toString())); - else - lServerNames.put(entry.getKey(), null); - } - } catch (Exception ignored) { - } - } - for (Map.Entry<String, String> entry : internal3.entrySet()) { - try { - if (entry.getKey().contains("cable")) - lServerNames.put(entry.getKey(), entry.getValue().replace("material", entry.getKey().substring("gt.blockmachines.cable.".length(), entry.getKey().length() - ".01.name".length()))); - else if (entry.getKey().contains("gt_frame_")) - lServerNames.put(entry.getKey(), entry.getValue().replace("material", entry.getKey().substring("gt.blockmachines.gt_frame_".length(), entry.getKey().length() - ".name".length()))); - else if (entry.getKey().contains("gt_pipe_")) { - if ( - !entry.getKey().contains("_huge") && - !entry.getKey().contains("_large") && - !entry.getKey().contains("_nonuple") && - !entry.getKey().contains("_quadruple") && - !entry.getKey().contains("_small") && - !entry.getKey().contains("_tiny") - ) - lServerNames.put(entry.getKey(), entry.getValue().replace("material", entry.getKey().substring("gt.blockmachines.gt_pipe_".length(), entry.getKey().length() - ".name".length()))); - else if (entry.getKey().contains("_huge") || entry.getKey().contains("_tiny")) - lServerNames.put(entry.getKey(), entry.getValue().replace("material", entry.getKey().substring("gt.blockmachines.gt_pipe_".length(), entry.getKey().length() - "_tiny.name".length()))); - else if (entry.getKey().contains("_large") || entry.getKey().contains("_small")) - lServerNames.put(entry.getKey(), entry.getValue().replace("material", entry.getKey().substring("gt.blockmachines.gt_pipe_".length(), entry.getKey().length() - "_large.name".length()))); - else if (entry.getKey().contains("_nonuple")) - lServerNames.put(entry.getKey(), entry.getValue().replace("material", entry.getKey().substring("gt.blockmachines.gt_pipe_".length(), entry.getKey().length() - "_nonuple.name".length()))); - else if (entry.getKey().contains("_quadruple")) - lServerNames.put(entry.getKey(), entry.getValue().replace("material", entry.getKey().substring("gt.blockmachines.gt_pipe_".length(), entry.getKey().length() - "_quadruple.name".length()))); - } else if (entry.getKey().contains("wire")) - lServerNames.put(entry.getKey(), entry.getValue().replace("material", entry.getKey().substring("gt.blockmachines.wire.".length(), entry.getKey().length() - ".01.name".length()))); - else - lServerNames.put(entry.getKey(), entry.getValue()); - } catch (Exception ignored) { - } - } - for (Map.Entry<String, String> entry : internal4.entrySet()) { - try { - if (entry.getKey().contains("blockores")) { - int i = Integer.parseInt(entry.getKey().substring("gt.blockores.".length(), entry.getKey().length() - ".name".length())); - i = i % 1000; - if (GregTech_API.sGeneratedMaterials[i] != null) - lServerNames.put(entry.getKey(), entry.getValue().replace("material", GregTech_API.sGeneratedMaterials[i].toString())); - else - lServerNames.put(entry.getKey(), null); - } else if (entry.getKey().contains("blockmetal")) { - Materials[] mMats = null; - String t = entry.getKey().substring("gt.blockmetal".length()); - t = t.substring(0, 1); - int i = Integer.parseInt(t); - switch (i) { - case 1: - mMats = new Materials[]{ - Materials.Adamantium, - Materials.Aluminium, - Materials.Americium, - Materials.AnnealedCopper, - Materials.Antimony, - Materials.Arsenic, - Materials.AstralSilver, - Materials.BatteryAlloy, - Materials.Beryllium, - Materials.Bismuth, - Materials.BismuthBronze, - Materials.BlackBronze, - Materials.BlackSteel, - Materials.BlueAlloy, - Materials.BlueSteel, - Materials.Brass - }; - break; - case 2: - mMats = new Materials[]{ - Materials.Bronze, - Materials.Caesium, - Materials.Cerium, - Materials.Chrome, - Materials.ChromiumDioxide, - Materials.Cobalt, - Materials.CobaltBrass, - Materials.Copper, - Materials.Cupronickel, - Materials.DamascusSteel, - Materials.DarkIron, - Materials.DeepIron, - Materials.Desh, - Materials.Duranium, - Materials.Dysprosium, - Materials.Electrum - }; - break; - case 3: - mMats = new Materials[]{ - Materials.ElectrumFlux, - Materials.Enderium, - Materials.Erbium, - Materials.Europium, - Materials.FierySteel, - Materials.Gadolinium, - Materials.Gallium, - Materials.Holmium, - Materials.HSLA, - Materials.Indium, - Materials.InfusedGold, - Materials.Invar, - Materials.Iridium, - Materials.IronMagnetic, - Materials.IronWood, - Materials.Kanthal - }; - break; - case 4: - mMats = new Materials[]{ - Materials.Knightmetal, - Materials.Lanthanum, - Materials.Lead, - Materials.Lutetium, - Materials.Magnalium, - Materials.Magnesium, - Materials.Manganese, - Materials.MeteoricIron, - Materials.MeteoricSteel, - Materials.Trinium, - Materials.Mithril, - Materials.Molybdenum, - Materials.Naquadah, - Materials.NaquadahAlloy, - Materials.NaquadahEnriched, - Materials.Naquadria - }; - break; - case 5: - mMats = new Materials[]{ - Materials.Neodymium, - Materials.NeodymiumMagnetic, - Materials.Neutronium, - Materials.Nichrome, - Materials.Nickel, - Materials.Niobium, - Materials.NiobiumNitride, - Materials.NiobiumTitanium, - Materials.Osmiridium, - Materials.Osmium, - Materials.Palladium, - Materials.PigIron, - Materials.Platinum, - Materials.Plutonium, - Materials.Plutonium241, - Materials.Praseodymium - }; - break; - case 6: - mMats = new Materials[]{ - Materials.Promethium, - Materials.RedAlloy, - Materials.RedSteel, - Materials.RoseGold, - Materials.Rubidium, - Materials.Samarium, - Materials.Scandium, - Materials.ShadowIron, - Materials.ShadowSteel, - Materials.Silicon, - Materials.Silver, - Materials.SolderingAlloy, - Materials.StainlessSteel, - Materials.Steel, - Materials.SteelMagnetic, - Materials.SterlingSilver - }; - break; - case 7: - mMats = new Materials[]{ - Materials.Sunnarium, - Materials.Tantalum, - Materials.Tellurium, - Materials.Terbium, - Materials.Thaumium, - Materials.Thorium, - Materials.Thulium, - Materials.Tin, - Materials.TinAlloy, - Materials.Titanium, - Materials.Tritanium, - Materials.Tungsten, - Materials.TungstenSteel, - Materials.Ultimet, - Materials.Uranium, - Materials.Uranium235 - }; - break; - case 8: - mMats = new Materials[]{ - Materials.Vanadium, - Materials.VanadiumGallium, - Materials.WroughtIron, - Materials.Ytterbium, - Materials.Yttrium, - Materials.YttriumBariumCuprate, - Materials.Zinc, - Materials.TungstenCarbide, - Materials.VanadiumSteel, - Materials.HSSG, - Materials.HSSE, - Materials.HSSS, - Materials.Steeleaf, - Materials.Ichorium, - Materials.Firestone - }; - break; - } - t = entry.getKey().substring("gt.blockmetal1.".length(), entry.getKey().length() - ".name".length()); - i = Integer.parseInt(t); - lServerNames.put(entry.getKey(), "Block of " + mMats[i].toString()); - mMats = null; - } else if (entry.getKey().contains("blockgem")) { - Materials[] mMats = null; - String t = entry.getKey().substring("gt.blockgem".length()); - t = t.substring(0, 1); - int i = Integer.parseInt(t); - switch (i) { - case 1: - mMats = new Materials[]{ - Materials.InfusedAir, - Materials.Amber, - Materials.Amethyst, - Materials.InfusedWater, - Materials.BlueTopaz, - Materials.CertusQuartz, - Materials.Dilithium, - Materials.EnderEye, - Materials.EnderPearl, - Materials.FoolsRuby, - Materials.Force, - Materials.Forcicium, - Materials.Forcillium, - Materials.GreenSapphire, - Materials.InfusedFire, - Materials.Jasper, - MaterialsBotania.ManaDiamond, - MaterialsBotania.BotaniaDragonstone + if (entry.getKey().contains("metaitem") && s.contains("material")) internal2.put(entry.getKey(), s); + else if (entry.getKey().contains("blockmachines") && s.contains("material")) + internal3.put(entry.getKey(), s); + else if ((entry.getKey().contains("blockores") + || (entry.getKey().contains("blockmetal") + || entry.getKey().contains("blockgem"))) + && s.contains("material")) internal4.put(entry.getKey(), s); + else lServerNames.put(entry.getKey(), s); + } catch (Exception ignored) { + } + } + for (Map.Entry<String, String> entry : internal2.entrySet()) { + try { + if (entry.getKey().contains("name")) { + int i = Integer.parseInt(entry.getKey() + .substring( + "gt.metaitem.01.".length(), entry.getKey().length() - ".name".length())); + i = i % 1000; + if (GregTech_API.sGeneratedMaterials[i] != null) + lServerNames.put( + entry.getKey(), + entry.getValue().replace("material", GregTech_API.sGeneratedMaterials[i].toString())); + else lServerNames.put(entry.getKey(), null); + } + } catch (Exception ignored) { + } + } + for (Map.Entry<String, String> entry : internal3.entrySet()) { + try { + if (entry.getKey().contains("cable")) + lServerNames.put( + entry.getKey(), + entry.getValue() + .replace( + "material", + entry.getKey() + .substring( + "gt.blockmachines.cable.".length(), + entry.getKey().length() - ".01.name".length()))); + else if (entry.getKey().contains("gt_frame_")) + lServerNames.put( + entry.getKey(), + entry.getValue() + .replace( + "material", + entry.getKey() + .substring( + "gt.blockmachines.gt_frame_".length(), + entry.getKey().length() - ".name".length()))); + else if (entry.getKey().contains("gt_pipe_")) { + if (!entry.getKey().contains("_huge") + && !entry.getKey().contains("_large") + && !entry.getKey().contains("_nonuple") + && !entry.getKey().contains("_quadruple") + && !entry.getKey().contains("_small") + && !entry.getKey().contains("_tiny")) + lServerNames.put( + entry.getKey(), + entry.getValue() + .replace( + "material", + entry.getKey() + .substring( + "gt.blockmachines.gt_pipe_".length(), + entry.getKey().length() - ".name".length()))); + else if (entry.getKey().contains("_huge") || entry.getKey().contains("_tiny")) + lServerNames.put( + entry.getKey(), + entry.getValue() + .replace( + "material", + entry.getKey() + .substring( + "gt.blockmachines.gt_pipe_".length(), + entry.getKey().length() - "_tiny.name".length()))); + else if (entry.getKey().contains("_large") || entry.getKey().contains("_small")) + lServerNames.put( + entry.getKey(), + entry.getValue() + .replace( + "material", + entry.getKey() + .substring( + "gt.blockmachines.gt_pipe_".length(), + entry.getKey().length() - "_large.name".length()))); + else if (entry.getKey().contains("_nonuple")) + lServerNames.put( + entry.getKey(), + entry.getValue() + .replace( + "material", + entry.getKey() + .substring( + "gt.blockmachines.gt_pipe_".length(), + entry.getKey().length() - "_nonuple.name".length()))); + else if (entry.getKey().contains("_quadruple")) + lServerNames.put( + entry.getKey(), + entry.getValue() + .replace( + "material", + entry.getKey() + .substring( + "gt.blockmachines.gt_pipe_".length(), + entry.getKey().length() - "_quadruple.name".length()))); + } else if (entry.getKey().contains("wire")) + lServerNames.put( + entry.getKey(), + entry.getValue() + .replace( + "material", + entry.getKey() + .substring( + "gt.blockmachines.wire.".length(), + entry.getKey().length() - ".01.name".length()))); + else lServerNames.put(entry.getKey(), entry.getValue()); + } catch (Exception ignored) { + } + } + for (Map.Entry<String, String> entry : internal4.entrySet()) { + try { + if (entry.getKey().contains("blockores")) { + int i = Integer.parseInt(entry.getKey() + .substring("gt.blockores.".length(), entry.getKey().length() - ".name".length())); + i = i % 1000; + if (GregTech_API.sGeneratedMaterials[i] != null) + lServerNames.put( + entry.getKey(), + entry.getValue().replace("material", GregTech_API.sGeneratedMaterials[i].toString())); + else lServerNames.put(entry.getKey(), null); + } else if (entry.getKey().contains("blockmetal")) { + Materials[] mMats = null; + String t = entry.getKey().substring("gt.blockmetal".length()); + t = t.substring(0, 1); + int i = Integer.parseInt(t); + switch (i) { + case 1: + mMats = new Materials[] { + Materials.Adamantium, + Materials.Aluminium, + Materials.Americium, + Materials.AnnealedCopper, + Materials.Antimony, + Materials.Arsenic, + Materials.AstralSilver, + Materials.BatteryAlloy, + Materials.Beryllium, + Materials.Bismuth, + Materials.BismuthBronze, + Materials.BlackBronze, + Materials.BlackSteel, + Materials.BlueAlloy, + Materials.BlueSteel, + Materials.Brass + }; + break; + case 2: + mMats = new Materials[] { + Materials.Bronze, + Materials.Caesium, + Materials.Cerium, + Materials.Chrome, + Materials.ChromiumDioxide, + Materials.Cobalt, + Materials.CobaltBrass, + Materials.Copper, + Materials.Cupronickel, + Materials.DamascusSteel, + Materials.DarkIron, + Materials.DeepIron, + Materials.Desh, + Materials.Duranium, + Materials.Dysprosium, + Materials.Electrum + }; + break; + case 3: + mMats = new Materials[] { + Materials.ElectrumFlux, + Materials.Enderium, + Materials.Erbium, + Materials.Europium, + Materials.FierySteel, + Materials.Gadolinium, + Materials.Gallium, + Materials.Holmium, + Materials.HSLA, + Materials.Indium, + Materials.InfusedGold, + Materials.Invar, + Materials.Iridium, + Materials.IronMagnetic, + Materials.IronWood, + Materials.Kanthal + }; + break; + case 4: + mMats = new Materials[] { + Materials.Knightmetal, + Materials.Lanthanum, + Materials.Lead, + Materials.Lutetium, + Materials.Magnalium, + Materials.Magnesium, + Materials.Manganese, + Materials.MeteoricIron, + Materials.MeteoricSteel, + Materials.Trinium, + Materials.Mithril, + Materials.Molybdenum, + Materials.Naquadah, + Materials.NaquadahAlloy, + Materials.NaquadahEnriched, + Materials.Naquadria + }; + break; + case 5: + mMats = new Materials[] { + Materials.Neodymium, + Materials.NeodymiumMagnetic, + Materials.Neutronium, + Materials.Nichrome, + Materials.Nickel, + Materials.Niobium, + Materials.NiobiumNitride, + Materials.NiobiumTitanium, + Materials.Osmiridium, + Materials.Osmium, + Materials.Palladium, + Materials.PigIron, + Materials.Platinum, + Materials.Plutonium, + Materials.Plutonium241, + Materials.Praseodymium + }; + break; + case 6: + mMats = new Materials[] { + Materials.Promethium, + Materials.RedAlloy, + Materials.RedSteel, + Materials.RoseGold, + Materials.Rubidium, + Materials.Samarium, + Materials.Scandium, + Materials.ShadowIron, + Materials.ShadowSteel, + Materials.Silicon, + Materials.Silver, + Materials.SolderingAlloy, + Materials.StainlessSteel, + Materials.Steel, + Materials.SteelMagnetic, + Materials.SterlingSilver + }; + break; + case 7: + mMats = new Materials[] { + Materials.Sunnarium, + Materials.Tantalum, + Materials.Tellurium, + Materials.Terbium, + Materials.Thaumium, + Materials.Thorium, + Materials.Thulium, + Materials.Tin, + Materials.TinAlloy, + Materials.Titanium, + Materials.Tritanium, + Materials.Tungsten, + Materials.TungstenSteel, + Materials.Ultimet, + Materials.Uranium, + Materials.Uranium235 + }; + break; + case 8: + mMats = new Materials[] { + Materials.Vanadium, + Materials.VanadiumGallium, + Materials.WroughtIron, + Materials.Ytterbium, + Materials.Yttrium, + Materials.YttriumBariumCuprate, + Materials.Zinc, + Materials.TungstenCarbide, + Materials.VanadiumSteel, + Materials.HSSG, + Materials.HSSE, + Materials.HSSS, + Materials.Steeleaf, + Materials.Ichorium, + Materials.Firestone + }; + break; + } + t = entry.getKey() + .substring( + "gt.blockmetal1.".length(), entry.getKey().length() - ".name".length()); + i = Integer.parseInt(t); + lServerNames.put(entry.getKey(), "Block of " + mMats[i].toString()); + mMats = null; + } else if (entry.getKey().contains("blockgem")) { + Materials[] mMats = null; + String t = entry.getKey().substring("gt.blockgem".length()); + t = t.substring(0, 1); + int i = Integer.parseInt(t); + switch (i) { + case 1: + mMats = new Materials[] { + Materials.InfusedAir, + Materials.Amber, + Materials.Amethyst, + Materials.InfusedWater, + Materials.BlueTopaz, + Materials.CertusQuartz, + Materials.Dilithium, + Materials.EnderEye, + Materials.EnderPearl, + Materials.FoolsRuby, + Materials.Force, + Materials.Forcicium, + Materials.Forcillium, + Materials.GreenSapphire, + Materials.InfusedFire, + Materials.Jasper, + MaterialsBotania.ManaDiamond, + MaterialsBotania.BotaniaDragonstone + }; + break; + case 2: + mMats = new Materials[] { + Materials.Lazurite, + Materials.Lignite, + Materials.Monazite, + Materials.Niter, + Materials.Olivine, + Materials.Opal, + Materials.InfusedOrder, + Materials.InfusedEntropy, + Materials.Phosphorus, + Materials.Quartzite, + Materials.GarnetRed, + Materials.Ruby, + Materials.Sapphire, + Materials.Sodalite, + Materials.Tanzanite, + Materials.InfusedEarth + }; + break; + case 3: + mMats = new Materials[] { + Materials.Topaz, + Materials.Vinteum, + Materials.GarnetYellow, + Materials.NetherStar, + Materials.Charcoal, + Materials.Blaze }; - break; - case 2: - mMats = new Materials[]{ - Materials.Lazurite, - Materials.Lignite, - Materials.Monazite, - Materials.Niter, - Materials.Olivine, - Materials.Opal, - Materials.InfusedOrder, - Materials.InfusedEntropy, - Materials.Phosphorus, - Materials.Quartzite, - Materials.GarnetRed, - Materials.Ruby, - Materials.Sapphire, - Materials.Sodalite, - Materials.Tanzanite, - Materials.InfusedEarth - }; - break; - case 3: - mMats = new Materials[]{ - Materials.Topaz, - Materials.Vinteum, - Materials.GarnetYellow, - Materials.NetherStar, - Materials.Charcoal, - Materials.Blaze - }; - break; - } - t = entry.getKey().substring("gt.blockgem1.".length(), entry.getKey().length() - ".name".length()); - i = Integer.parseInt(t); - lServerNames.put(entry.getKey(), "Block of " + mMats[i].toString()); - mMats = null; - } - } catch (Exception ignored) { - } - } + break; + } + t = entry.getKey() + .substring("gt.blockgem1.".length(), entry.getKey().length() - ".name".length()); + i = Integer.parseInt(t); + lServerNames.put(entry.getKey(), "Block of " + mMats[i].toString()); + mMats = null; + } + } catch (Exception ignored) { + } + } - internal = null; - internal2 = null; - internal3 = null; - internal4 = null; - } + internal = null; + internal2 = null; + internal3 = null; + internal4 = null; + } } diff --git a/src/main/java/gregtech/api/util/GT_BaseCrop.java b/src/main/java/gregtech/api/util/GT_BaseCrop.java index 97f8db0547..930badfdba 100644 --- a/src/main/java/gregtech/api/util/GT_BaseCrop.java +++ b/src/main/java/gregtech/api/util/GT_BaseCrop.java @@ -1,5 +1,7 @@ package gregtech.api.util; +import static gregtech.api.enums.GT_Values.E; + import cpw.mods.fml.common.Loader; import gregtech.GT_Mod; import gregtech.api.GregTech_API; @@ -12,6 +14,8 @@ import gregtech.common.blocks.GT_TileEntity_Ores; import ic2.api.crops.CropCard; import ic2.api.crops.Crops; import ic2.api.crops.ICropTile; +import java.util.ArrayList; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -19,15 +23,15 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import speiger.src.crops.api.ICropCardInfo; -import java.util.ArrayList; -import java.util.List; - -import static gregtech.api.enums.GT_Values.E; - public class GT_BaseCrop extends CropCard implements ICropCardInfo { public static ArrayList<GT_BaseCrop> sCropList = new ArrayList<GT_BaseCrop>(); private String mName = E, mDiscoveredBy = "Gregorius Techneticies", mAttributes[]; - private int mTier = 0, mMaxSize = 0, mAfterHarvestSize = 0, mHarvestSize = 0, mStats[] = new int[5], mGrowthSpeed = 0; + private int mTier = 0, + mMaxSize = 0, + mAfterHarvestSize = 0, + mHarvestSize = 0, + mStats[] = new int[5], + mGrowthSpeed = 0; private ItemStack mDrop = null, mSpecialDrops[] = null; private Materials mBlock = null; private static boolean bIc2NeiLoaded = Loader.isModLoaded("Ic2Nei"); @@ -45,8 +49,43 @@ public class GT_BaseCrop extends CropCard implements ICropCardInfo { * @param aGrowthSpeed how fast the Crop grows. if < 0 then its set to Tier*300 * @param aHarvestSize the size the Crop needs to be harvested. forced to be between 2 and max size */ - public GT_BaseCrop(int aID, String aCropName, String aDiscoveredBy, ItemStack aBaseSeed, int aTier, int aMaxSize, int aGrowthSpeed, int aAfterHarvestSize, int aHarvestSize, int aStatChemical, int aStatFood, int aStatDefensive, int aStatColor, int aStatWeed, String[] aAttributes, ItemStack aDrop, ItemStack[] aSpecialDrops) { - new GT_BaseCrop(aID, aCropName, aDiscoveredBy, aBaseSeed, aTier, aMaxSize, aGrowthSpeed, aAfterHarvestSize, aHarvestSize, aStatChemical, aStatFood, aStatDefensive, aStatColor, aStatWeed, aAttributes, null, aDrop, aSpecialDrops); + public GT_BaseCrop( + int aID, + String aCropName, + String aDiscoveredBy, + ItemStack aBaseSeed, + int aTier, + int aMaxSize, + int aGrowthSpeed, + int aAfterHarvestSize, + int aHarvestSize, + int aStatChemical, + int aStatFood, + int aStatDefensive, + int aStatColor, + int aStatWeed, + String[] aAttributes, + ItemStack aDrop, + ItemStack[] aSpecialDrops) { + new GT_BaseCrop( + aID, + aCropName, + aDiscoveredBy, + aBaseSeed, + aTier, + aMaxSize, + aGrowthSpeed, + aAfterHarvestSize, + aHarvestSize, + aStatChemical, + aStatFood, + aStatDefensive, + aStatColor, + aStatWeed, + aAttributes, + null, + aDrop, + aSpecialDrops); } /** @@ -63,7 +102,25 @@ public class GT_BaseCrop extends CropCard implements ICropCardInfo { * @param aHarvestSize the size the Crop needs to be harvested. forced to be between 2 and max size * @param aBlock the block below needed for crop to grow. If null no block needed */ - public GT_BaseCrop(int aID, String aCropName, String aDiscoveredBy, ItemStack aBaseSeed, int aTier, int aMaxSize, int aGrowthSpeed, int aAfterHarvestSize, int aHarvestSize, int aStatChemical, int aStatFood, int aStatDefensive, int aStatColor, int aStatWeed, String[] aAttributes, Materials aBlock, ItemStack aDrop, ItemStack[] aSpecialDrops) { + public GT_BaseCrop( + int aID, + String aCropName, + String aDiscoveredBy, + ItemStack aBaseSeed, + int aTier, + int aMaxSize, + int aGrowthSpeed, + int aAfterHarvestSize, + int aHarvestSize, + int aStatChemical, + int aStatFood, + int aStatDefensive, + int aStatColor, + int aStatWeed, + String[] aAttributes, + Materials aBlock, + ItemStack aDrop, + ItemStack[] aSpecialDrops) { mName = aCropName; aID = GT_Config.addIDConfig(ConfigCategories.IDs.crops, mName.replaceAll(" ", "_"), aID); if (aDiscoveredBy != null && !aDiscoveredBy.equals(E)) mDiscoveredBy = aDiscoveredBy; @@ -81,15 +138,21 @@ public class GT_BaseCrop extends CropCard implements ICropCardInfo { mStats[4] = aStatWeed; mAttributes = aAttributes; mBlock = aBlock; - if(GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.crops, aCropName, true)){ - if (!Crops.instance.registerCrop(this, aID)) - throw new GT_ItsNotMyFaultException("Make sure the Crop ID is valid!"); - if (aBaseSeed != null) Crops.instance.registerBaseSeed(aBaseSeed, this, 1, 1, 1, 1); - sCropList.add(this);} + if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.crops, aCropName, true)) { + if (!Crops.instance.registerCrop(this, aID)) + throw new GT_ItsNotMyFaultException("Make sure the Crop ID is valid!"); + if (aBaseSeed != null) Crops.instance.registerBaseSeed(aBaseSeed, this, 1, 1, 1, 1); + sCropList.add(this); + } } if (bIc2NeiLoaded) { try { - Class.forName("speiger.src.crops.api.CropPluginAPI").getMethod("registerCropInfo", Class.forName("speiger.src.crops.api.ICropCardInfo")).invoke(Class.forName("speiger.src.crops.api.CropPluginAPI").getField("instance"), this); + Class.forName("speiger.src.crops.api.CropPluginAPI") + .getMethod("registerCropInfo", Class.forName("speiger.src.crops.api.ICropCardInfo")) + .invoke( + Class.forName("speiger.src.crops.api.CropPluginAPI") + .getField("instance"), + this); } catch (IllegalAccessException ex) { bIc2NeiLoaded = false; } catch (IllegalArgumentException ex) { @@ -176,7 +239,10 @@ public class GT_BaseCrop extends CropCard implements ICropCardInfo { @Override public ItemStack getGain(ICropTile aCrop) { int tDrop = 0; - if (mSpecialDrops != null && (tDrop = java.util.concurrent.ThreadLocalRandom.current().nextInt(0, (mSpecialDrops.length*2) + 2)) < mSpecialDrops.length && mSpecialDrops[tDrop] != null) { + if (mSpecialDrops != null + && (tDrop = java.util.concurrent.ThreadLocalRandom.current().nextInt(0, (mSpecialDrops.length * 2) + 2)) + < mSpecialDrops.length + && mSpecialDrops[tDrop] != null) { return GT_Utility.copyOrNull(mSpecialDrops[tDrop]); } return GT_Utility.copyOrNull(mDrop); @@ -198,11 +264,15 @@ public class GT_BaseCrop extends CropCard implements ICropCardInfo { return false; } for (int i = 1; i < this.getrootslength(aCrop); i++) { - Block tBlock = aCrop.getWorld().getBlock(aCrop.getLocation().posX, aCrop.getLocation().posY - i, aCrop.getLocation().posZ); + Block tBlock = aCrop.getWorld() + .getBlock(aCrop.getLocation().posX, aCrop.getLocation().posY - i, aCrop.getLocation().posZ); if ((tBlock instanceof GT_Block_Ores_Abstract)) { - TileEntity tTileEntity = aCrop.getWorld().getTileEntity(aCrop.getLocation().posX, aCrop.getLocation().posY - i, aCrop.getLocation().posZ); + TileEntity tTileEntity = aCrop.getWorld() + .getTileEntity( + aCrop.getLocation().posX, aCrop.getLocation().posY - i, aCrop.getLocation().posZ); if ((tTileEntity instanceof GT_TileEntity_Ores)) { - Materials tMaterial = GregTech_API.sGeneratedMaterials[(((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000)]; + Materials tMaterial = + GregTech_API.sGeneratedMaterials[(((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000)]; if ((tMaterial != null) && (tMaterial != Materials._NULL)) { if (tMaterial == mBlock) { return true; @@ -212,24 +282,33 @@ public class GT_BaseCrop extends CropCard implements ICropCardInfo { } } } else { - int tMetaID = aCrop.getWorld().getBlockMetadata(aCrop.getLocation().posX, aCrop.getLocation().posY - i, aCrop.getLocation().posZ); + int tMetaID = aCrop.getWorld() + .getBlockMetadata( + aCrop.getLocation().posX, aCrop.getLocation().posY - i, aCrop.getLocation().posZ); ItemData tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(tBlock, 1, tMetaID)); - if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore")) && (tAssotiation.mMaterial.mMaterial == mBlock)) { + if ((tAssotiation != null) + && (tAssotiation.mPrefix.toString().startsWith("ore")) + && (tAssotiation.mMaterial.mMaterial == mBlock)) { return true; } - if ((tAssotiation != null) && (tAssotiation.mPrefix == OrePrefixes.block) && (tAssotiation.mMaterial.mMaterial == mBlock)) { + if ((tAssotiation != null) + && (tAssotiation.mPrefix == OrePrefixes.block) + && (tAssotiation.mMaterial.mMaterial == mBlock)) { return true; } } -// Block block = aCrop.getWorld().getBlock(aCrop.getLocation().posX, aCrop.getLocation().posY - i, aCrop.getLocation().posZ); -// if (block.isAir(aCrop.getWorld(), aCrop.getLocation().posX, aCrop.getLocation().posY - i, aCrop.getLocation().posZ)) { -// return false; -// } -// if (block == mBlock) { -// int tMeta = aCrop.getWorld().getBlockMetadata(aCrop.getLocation().posX, aCrop.getLocation().posY - i, aCrop.getLocation().posZ); -// if(mMeta < 0 || tMeta == mMeta){ -// return true;} -// } + // Block block = aCrop.getWorld().getBlock(aCrop.getLocation().posX, aCrop.getLocation().posY - i, + // aCrop.getLocation().posZ); + // if (block.isAir(aCrop.getWorld(), aCrop.getLocation().posX, aCrop.getLocation().posY - i, + // aCrop.getLocation().posZ)) { + // return false; + // } + // if (block == mBlock) { + // int tMeta = aCrop.getWorld().getBlockMetadata(aCrop.getLocation().posX, aCrop.getLocation().posY - + // i, aCrop.getLocation().posZ); + // if(mMeta < 0 || tMeta == mMeta){ + // return true;} + // } } return false; } @@ -238,7 +317,8 @@ public class GT_BaseCrop extends CropCard implements ICropCardInfo { public List<String> getCropInformation() { if (mBlock != null) { ArrayList<String> result = new ArrayList<String>(1); - result.add(String.format("Requires %s Ore or Block of %s as soil block to reach full growth.", mBlock.mName, mBlock.mName)); + result.add(String.format( + "Requires %s Ore or Block of %s as soil block to reach full growth.", mBlock.mName, mBlock.mName)); return result; } return null; @@ -251,5 +331,4 @@ public class GT_BaseCrop extends CropCard implements ICropCardInfo { } return GT_Utility.copyOrNull(mDrop); } - } diff --git a/src/main/java/gregtech/api/util/GT_BlockMap.java b/src/main/java/gregtech/api/util/GT_BlockMap.java index cd98aae2bd..9b71abbdc3 100644 --- a/src/main/java/gregtech/api/util/GT_BlockMap.java +++ b/src/main/java/gregtech/api/util/GT_BlockMap.java @@ -2,132 +2,131 @@ package gregtech.api.util; import gnu.trove.map.TByteObjectMap; import gnu.trove.map.hash.TByteObjectHashMap; -import net.minecraft.block.Block; - import java.util.HashMap; import java.util.Map; import java.util.function.BiFunction; +import net.minecraft.block.Block; public class GT_BlockMap<V> { - public static final byte WILDCARD = -1; - private final Map<Block, TByteObjectMap<V>> backing = new HashMap<>(); - private int size = 0; + public static final byte WILDCARD = -1; + private final Map<Block, TByteObjectMap<V>> backing = new HashMap<>(); + private int size = 0; - private TByteObjectMap<V> getSubmap(Block block) { - return backing.computeIfAbsent(block, b -> new TByteObjectHashMap<>()); - } + private TByteObjectMap<V> getSubmap(Block block) { + return backing.computeIfAbsent(block, b -> new TByteObjectHashMap<>()); + } - /** - * Associate a value with that union key - * - * @param block block - * @param meta meta - * @return old mapping, or null if that doesn't exist - */ - public V put(Block block, byte meta, V value) { - V v = getSubmap(block).put(meta, value); - if (v == null) size++; - return v; - } + /** + * Associate a value with that union key + * + * @param block block + * @param meta meta + * @return old mapping, or null if that doesn't exist + */ + public V put(Block block, byte meta, V value) { + V v = getSubmap(block).put(meta, value); + if (v == null) size++; + return v; + } - /** - * Associate a value with that union key ONLY IF there isn't a prior EXACT mapping - * - * @param block block - * @param meta meta - * @return old mapping, or null if that doesn't exist - */ - public V putIfAbsent(Block block, byte meta, V value) { - V v = getSubmap(block).putIfAbsent(meta, value); - if (v == null) size++; - return v; - } + /** + * Associate a value with that union key ONLY IF there isn't a prior EXACT mapping + * + * @param block block + * @param meta meta + * @return old mapping, or null if that doesn't exist + */ + public V putIfAbsent(Block block, byte meta, V value) { + V v = getSubmap(block).putIfAbsent(meta, value); + if (v == null) size++; + return v; + } - /** - * Associate a value with that union key ONLY IF there isn't a prior EXACT mapping - * - * @param block block - * @param meta meta - * @return old mapping, or null if that doesn't exist - */ - public V computeIfAbsent(Block block, byte meta, BiFunction<Block, Byte, V> function) { - TByteObjectMap<V> submap = getSubmap(block); - V v = submap.get(meta); - if (v == null) { - v = function.apply(block, meta); - submap.put(meta, v); - size++; - } - return v; - } + /** + * Associate a value with that union key ONLY IF there isn't a prior EXACT mapping + * + * @param block block + * @param meta meta + * @return old mapping, or null if that doesn't exist + */ + public V computeIfAbsent(Block block, byte meta, BiFunction<Block, Byte, V> function) { + TByteObjectMap<V> submap = getSubmap(block); + V v = submap.get(meta); + if (v == null) { + v = function.apply(block, meta); + submap.put(meta, v); + size++; + } + return v; + } - /** - * Contains an associated value - * - * @param block block - * @param meta meta - * @return current mapping OR wildcard of that mapping exists - */ - public boolean containsKey(Block block, byte meta) { - TByteObjectMap<V> submap = backing.get(block); - if (submap == null) return false; - return submap.containsKey(meta) || submap.containsKey(WILDCARD); - } + /** + * Contains an associated value + * + * @param block block + * @param meta meta + * @return current mapping OR wildcard of that mapping exists + */ + public boolean containsKey(Block block, byte meta) { + TByteObjectMap<V> submap = backing.get(block); + if (submap == null) return false; + return submap.containsKey(meta) || submap.containsKey(WILDCARD); + } - /** - * Get the associated value - * - * @param block block - * @param meta meta - * @return current mapping OR wildcard of that block. null if neither exists - */ - public V get(Block block, byte meta) { - TByteObjectMap<V> submap = backing.get(block); - if (submap == null) return null; - V v = submap.get(meta); - if (v != null) return v; - return submap.get(WILDCARD); - } + /** + * Get the associated value + * + * @param block block + * @param meta meta + * @return current mapping OR wildcard of that block. null if neither exists + */ + public V get(Block block, byte meta) { + TByteObjectMap<V> submap = backing.get(block); + if (submap == null) return null; + V v = submap.get(meta); + if (v != null) return v; + return submap.get(WILDCARD); + } - /** - * Remove a mapping - * - * @param block block - * @param meta meta - * @return old value, or null if none - */ - public V remove(Block block, byte meta) { - TByteObjectMap<V> submap = backing.get(block); - if (submap == null) return null; - V v = submap.remove(meta); - if (v != null) { - size--; - if (submap.isEmpty()) backing.remove(block); - } - return v; - } + /** + * Remove a mapping + * + * @param block block + * @param meta meta + * @return old value, or null if none + */ + public V remove(Block block, byte meta) { + TByteObjectMap<V> submap = backing.get(block); + if (submap == null) return null; + V v = submap.remove(meta); + if (v != null) { + size--; + if (submap.isEmpty()) backing.remove(block); + } + return v; + } - /** - * Size of all mappings - * - * @return size - */ - public int size() { - return size; - } + /** + * Size of all mappings + * + * @return size + */ + public int size() { + return size; + } - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; - GT_BlockMap<?> that = (GT_BlockMap<?>) o; + GT_BlockMap<?> that = (GT_BlockMap<?>) o; - return backing.equals(that.backing); - } + return backing.equals(that.backing); + } - @Override - public int hashCode() { - return backing.hashCode(); - } + @Override + public int hashCode() { + return backing.hashCode(); + } } diff --git a/src/main/java/gregtech/api/util/GT_BlockSet.java b/src/main/java/gregtech/api/util/GT_BlockSet.java index 3c9905a757..94f3c3944a 100644 --- a/src/main/java/gregtech/api/util/GT_BlockSet.java +++ b/src/main/java/gregtech/api/util/GT_BlockSet.java @@ -3,36 +3,36 @@ package gregtech.api.util; import net.minecraft.block.Block; public class GT_BlockSet { - private final GT_BlockMap<Object> backing = new GT_BlockMap<>(); + private final GT_BlockMap<Object> backing = new GT_BlockMap<>(); - public boolean add(Block block, byte meta) { - return backing.put(block, meta, this) != this; - } + public boolean add(Block block, byte meta) { + return backing.put(block, meta, this) != this; + } - public boolean contains(Block block, byte meta) { - return backing.get(block, meta) == this; - } + public boolean contains(Block block, byte meta) { + return backing.get(block, meta) == this; + } - public boolean remove(Block block, byte meta) { - return backing.remove(block, meta) == this; - } + public boolean remove(Block block, byte meta) { + return backing.remove(block, meta) == this; + } - public int size() { - return backing.size(); - } + public int size() { + return backing.size(); + } - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; - GT_BlockSet that = (GT_BlockSet) o; + GT_BlockSet that = (GT_BlockSet) o; - return backing.equals(that.backing); - } + return backing.equals(that.backing); + } - @Override - public int hashCode() { - return backing.hashCode(); - } + @Override + public int hashCode() { + return backing.hashCode(); + } } diff --git a/src/main/java/gregtech/api/util/GT_CLS_Compat.java b/src/main/java/gregtech/api/util/GT_CLS_Compat.java index 83b292d274..fd01ccd00e 100644 --- a/src/main/java/gregtech/api/util/GT_CLS_Compat.java +++ b/src/main/java/gregtech/api/util/GT_CLS_Compat.java @@ -5,16 +5,14 @@ import gregtech.GT_Mod; import gregtech.api.enums.Materials; import gregtech.common.GT_Proxy; import gregtech.loaders.postload.GT_PostLoad; - import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.Collection; import java.util.Optional; import java.util.Set; -import java.util.function.Function; import java.util.function.Consumer; - +import java.util.function.Function; @SuppressWarnings("rawtypes, unchecked, deprecation") public class GT_CLS_Compat { @@ -31,7 +29,7 @@ public class GT_CLS_Compat { private static Field progressBarStep; static { - //CLS + // CLS try { alexiilMinecraftDisplayer = Class.forName("alexiil.mods.load.MinecraftDisplayer"); alexiilProgressDisplayer = Class.forName("alexiil.mods.load.ProgressDisplayer"); @@ -53,7 +51,6 @@ public class GT_CLS_Compat { } catch (NoSuchMethodException | NoSuchFieldException ex) { GT_Mod.GT_FML_LOGGER.catching(ex); } - }); Optional.ofNullable(alexiilProgressDisplayer).ifPresent(e -> { @@ -72,10 +69,14 @@ public class GT_CLS_Compat { } } - private GT_CLS_Compat() { - } + private GT_CLS_Compat() {} - private static <T> void registerAndReportProgression(String materialsType, Collection<T> materials, ProgressManager.ProgressBar progressBar, Function<T,Object> getName, Consumer<T> action) { + private static <T> void registerAndReportProgression( + String materialsType, + Collection<T> materials, + ProgressManager.ProgressBar progressBar, + Function<T, Object> getName, + Consumer<T> action) { int sizeStep = materials.size(); final long progressionReportsEvery = 100; final long bakingMsgEvery = 1000; @@ -90,7 +91,7 @@ public class GT_CLS_Compat { nextProgressionReportAt = now + progressionReportsEvery; String materialName = getName.apply(m).toString(); try { - displayProgress.invoke(null, materialName, (float)currentStep / sizeStep); + displayProgress.invoke(null, materialName, (float) currentStep / sizeStep); } catch (IllegalAccessException | InvocationTargetException iae) { GT_Mod.GT_FML_LOGGER.error("While updating progression", iae); } @@ -103,11 +104,13 @@ public class GT_CLS_Compat { } if (nextBakingMsgAt < now) { nextBakingMsgAt = now + bakingMsgEvery; - GT_Mod.GT_FML_LOGGER.info(String.format("%s - Baking: %d%%", materialsType, (Integer)(currentStep * 100 / sizeStep))); + GT_Mod.GT_FML_LOGGER.info( + String.format("%s - Baking: %d%%", materialsType, (Integer) (currentStep * 100 / sizeStep))); } action.accept(m); currentStep += 1; - }; + } + ; GT_Mod.GT_FML_LOGGER.info(String.format("%s - Baking: Done", materialsType)); try { progressBarStep.set(progressBar, currentStep); @@ -116,35 +119,38 @@ public class GT_CLS_Compat { } } - public static void stepMaterialsCLS(Collection<GT_Proxy.OreDictEventContainer> mEvents, ProgressManager.ProgressBar progressBar) throws IllegalAccessException, InvocationTargetException { + public static void stepMaterialsCLS( + Collection<GT_Proxy.OreDictEventContainer> mEvents, ProgressManager.ProgressBar progressBar) + throws IllegalAccessException, InvocationTargetException { try { isRegisteringGTmaterials.set(null, true); } catch (IllegalArgumentException | IllegalAccessException e) { GT_Mod.GT_FML_LOGGER.catching(e); } - registerAndReportProgression("GregTech materials", mEvents, progressBar, - m -> m.mMaterial, - m -> GT_Proxy.registerRecipes(m) - ); + registerAndReportProgression( + "GregTech materials", mEvents, progressBar, m -> m.mMaterial, m -> GT_Proxy.registerRecipes(m)); ProgressManager.pop(progressBar); isRegisteringGTmaterials.set(null, false); - } + } - public static void doActualRegistrationCLS(ProgressManager.ProgressBar progressBar, Set<Materials> replacedVanillaItemsSet) throws InvocationTargetException, IllegalAccessException { + public static void doActualRegistrationCLS( + ProgressManager.ProgressBar progressBar, Set<Materials> replacedVanillaItemsSet) + throws InvocationTargetException, IllegalAccessException { try { - isReplacingVanillaMaterials.set(null, true); - } catch (IllegalArgumentException | IllegalAccessException e) { + isReplacingVanillaMaterials.set(null, true); + } catch (IllegalArgumentException | IllegalAccessException e) { GT_Mod.GT_FML_LOGGER.catching(e); } - registerAndReportProgression("Vanilla materials", replacedVanillaItemsSet, progressBar, - m -> m.mDefaultLocalName, - m -> GT_PostLoad.doActualRegistration(m) - ); + registerAndReportProgression( + "Vanilla materials", + replacedVanillaItemsSet, + progressBar, + m -> m.mDefaultLocalName, + m -> GT_PostLoad.doActualRegistration(m)); } public static void pushToDisplayProgress() throws InvocationTargetException, IllegalAccessException { isReplacingVanillaMaterials.set(null, false); displayProgress.invoke(null, "Post Initialization: loading GregTech", getLastPercent.invoke(null)); } - } diff --git a/src/main/java/gregtech/api/util/GT_ChunkAssociatedData.java b/src/main/java/gregtech/api/util/GT_ChunkAssociatedData.java index bb589daa80..38b147e318 100644 --- a/src/main/java/gregtech/api/util/GT_ChunkAssociatedData.java +++ b/src/main/java/gregtech/api/util/GT_ChunkAssociatedData.java @@ -3,14 +3,6 @@ package gregtech.api.util; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import gregtech.api.enums.GT_Values; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.world.ChunkCoordIntPair; -import net.minecraft.world.World; -import net.minecraft.world.chunk.Chunk; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.world.WorldEvent; -import org.apache.commons.io.FileUtils; - -import javax.annotation.ParametersAreNonnullByDefault; import java.io.DataInput; import java.io.DataInputStream; import java.io.DataOutput; @@ -36,6 +28,13 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; import java.util.stream.Stream; +import javax.annotation.ParametersAreNonnullByDefault; +import net.minecraft.world.ChunkCoordIntPair; +import net.minecraft.world.World; +import net.minecraft.world.chunk.Chunk; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.world.WorldEvent; +import org.apache.commons.io.FileUtils; /** * A utility to save all kinds of data that is a function of any chunk. @@ -57,400 +56,413 @@ import java.util.stream.Stream; */ @ParametersAreNonnullByDefault public abstract class GT_ChunkAssociatedData<T extends GT_ChunkAssociatedData.IData> { - private static final Map<String, GT_ChunkAssociatedData<?>> instances = new ConcurrentHashMap<>(); - private static final int IO_PARALLELISM = Math.min(8, Math.max(1, Runtime.getRuntime().availableProcessors() * 2 / 3)); - private static final ExecutorService IO_WORKERS = Executors.newWorkStealingPool(IO_PARALLELISM); - private static final Pattern FILE_PATTERN = Pattern.compile("(.+)\\.(-?\\d+)\\.(-?\\d+)\\.dat"); - - static { - // register event handler - new EventHandler(); - } - - protected final String mId; - protected final Class<T> elementtype; - private final int regionLength; - private final int version; - private final boolean saveDefaults; - /** - * Data is stored as a `(world id -> (super region id -> super region data))` hash map. - * where super region's size is determined by regionSize. - * Here it is called super region, to not confuse with vanilla's regions. - */ - private final Map<Integer, Map<ChunkCoordIntPair, SuperRegion>> masterMap = new ConcurrentHashMap<>(); - - /** - * Initialize this instance. - * - * @param aId An arbitrary, but globally unique identifier for what this data is - * @param elementType The class of this element type. Used to create arrays. - * @param regionLength The length of one super region. Each super region will contain {@code regionLength * regionLength} chunks - * @param version An integer marking the version of this data. Useful later when the data's serialized form changed. - */ - protected GT_ChunkAssociatedData(String aId, Class<T> elementType, int regionLength, byte version, boolean saveDefaults) { - if (regionLength * regionLength > Short.MAX_VALUE || regionLength <= 0) - throw new IllegalArgumentException("Region invalid: " + regionLength); - if (!IData.class.isAssignableFrom(elementType)) - throw new IllegalArgumentException("Data type invalid"); - if (aId.contains(".")) - throw new IllegalArgumentException("ID cannot contains dot"); - this.mId = aId; - this.elementtype = elementType; - this.regionLength = regionLength; - this.version = version; - this.saveDefaults = saveDefaults; - if (instances.putIfAbsent(aId, this) != null) - throw new IllegalArgumentException("Duplicate GT_ChunkAssociatedData: " + aId); - } - - private ChunkCoordIntPair getRegionID(int aChunkX, int aChunkZ) { - return new ChunkCoordIntPair(Math.floorDiv(aChunkX, regionLength), Math.floorDiv(aChunkZ, regionLength)); - } - - /** - * Get a reference to data of the chunk that tile entity is in. - * The returned reference should be mutable. - */ - public final T get(IGregTechTileEntity tileEntity) { - return get(tileEntity.getWorld(), tileEntity.getXCoord() >> 4, tileEntity.getZCoord() >> 4); - } - - public final T get(Chunk chunk) { - return get(chunk.worldObj, chunk.xPosition, chunk.zPosition); - } - - public final T get(World world, ChunkCoordIntPair coord) { - return get(world, coord.chunkXPos, coord.chunkZPos); - } - - public final T get(World world, int chunkX, int chunkZ) { - SuperRegion region = masterMap.computeIfAbsent(world.provider.dimensionId, ignored -> new ConcurrentHashMap<>()) - .computeIfAbsent(getRegionID(chunkX, chunkZ), c -> new SuperRegion(world, c)); - return region.get(Math.floorMod(chunkX, regionLength), Math.floorMod(chunkZ, regionLength)); - } - - protected final void set(World world, int chunkX, int chunkZ, T data) { - SuperRegion region = masterMap.computeIfAbsent(world.provider.dimensionId, ignored -> new ConcurrentHashMap<>()) - .computeIfAbsent(getRegionID(chunkX, chunkZ), c -> new SuperRegion(world, c)); - region.set(Math.floorMod(chunkX, regionLength), Math.floorMod(chunkZ, regionLength), data); - } - - protected final boolean isCreated(int dimId, int chunkX, int chunkZ) { - Map<ChunkCoordIntPair, SuperRegion> dimData = masterMap.getOrDefault(dimId, null); - if (dimData == null) return false; - - SuperRegion region = dimData.getOrDefault(getRegionID(chunkX, chunkZ), null); - if (region == null) return false; - - return region.isCreated(Math.floorMod(chunkX, regionLength), Math.floorMod(chunkZ, regionLength)); - } - - public void clear() { - if (GT_Values.debugWorldData) { - long dirtyRegionCount = masterMap.values().stream() - .flatMap(m -> m.values().stream()) - .filter(SuperRegion::isDirty) - .count(); - if (dirtyRegionCount > 0) - GT_Log.out.println("Clearing ChunkAssociatedData with " + dirtyRegionCount + " regions dirty. Data might have been lost!"); - } - masterMap.clear(); - } - - public void save() { - saveRegions(masterMap.values().stream().flatMap(m -> m.values().stream())); - } - - public void save(World world) { - Map<ChunkCoordIntPair, SuperRegion> map = masterMap.get(world.provider.dimensionId); - if (map != null) - saveRegions(map.values().stream()); - } - - private void saveRegions(Stream<SuperRegion> stream) { - stream.filter(r -> r.isDirty()) - .map(c -> (Runnable) c::save) - .map(r -> CompletableFuture.runAsync(r, IO_WORKERS)) - .reduce(CompletableFuture::allOf) - .ifPresent(f -> { - try { - f.get(); - } catch (Exception e) { - GT_Log.err.println("Data save error: " + mId); - e.printStackTrace(GT_Log.err); - } - }); - } - - protected abstract void writeElement(DataOutput output, T element, World world, int chunkX, int chunkZ) throws IOException; - - protected abstract T readElement(DataInput input, int version, World world, int chunkX, int chunkZ) throws IOException; - - protected abstract T createElement(World world, int chunkX, int chunkZ); - - /** - * Clear all mappings, regardless of whether they are dirty - */ - public static void clearAll() { - for (GT_ChunkAssociatedData<?> d : instances.values()) d.clear(); - } - - /** - * Save all mappings - */ - public static void saveAll() { - for (GT_ChunkAssociatedData<?> d : instances.values()) d.save(); - } - - /** - * Load data for all chunks for a given world. - * Current data for that world will be discarded. If this is what you intended, call {@link #save(World)} beforehand. - * <p> - * Be aware of the memory consumption though. - */ - protected void loadAll(World w) { - if (GT_Values.debugWorldData && masterMap.containsKey(w.provider.dimensionId)) - GT_Log.err.println("Reloading ChunkAssociatedData " + mId + " for world " + w.provider.dimensionId + " discards old data!"); - if (!getSaveDirectory(w).isDirectory()) - // nothing to load... - return; - try { - Map<ChunkCoordIntPair, SuperRegion> worldData = Files.list(getSaveDirectory(w).toPath()) - .map(f -> { - Matcher matcher = FILE_PATTERN.matcher(f.getFileName().toString()); - return matcher.matches() ? matcher : null; - }) - .filter(Objects::nonNull) - .filter(m -> mId.equals(m.group(1))) - .map(m -> CompletableFuture.supplyAsync(() -> new SuperRegion(w, Integer.parseInt(m.group(2)), Integer.parseInt(m.group(3))), IO_WORKERS)) - .map(f -> { - try { - return f.get(); - } catch (Exception e) { - GT_Log.err.println("Error loading region"); - e.printStackTrace(GT_Log.err); - return null; - } - }) - .filter(Objects::nonNull) - .collect(Collectors.toMap(SuperRegion::getCoord, Function.identity())); - masterMap.put(w.provider.dimensionId, worldData); - } catch (IOException e) { - GT_Log.err.println("Error loading all region"); - e.printStackTrace(GT_Log.err); - } - } - - protected File getSaveDirectory(World w) { - File base; - if (w.provider.getSaveFolder() == null) - base = w.getSaveHandler().getWorldDirectory(); - else - base = new File(w.getSaveHandler().getWorldDirectory(), w.provider.getSaveFolder()); - return new File(base, "gregtech"); - } - - public interface IData { - /** - * @return Whether the data is different from chunk default - */ - boolean isSameAsDefault(); - } - - protected final class SuperRegion { - private final T[] data = createData(); - private final File backingStorage; - private final WeakReference<World> world; - /** - * Be aware, this means region coord, not bottom-left chunk coord - */ - private final ChunkCoordIntPair coord; - - private SuperRegion(World world, int regionX, int regionZ) { - this.world = new WeakReference<>(world); - this.coord = new ChunkCoordIntPair(regionX, regionZ); - backingStorage = new File(getSaveDirectory(world), String.format("%s.%d.%d.dat", mId, regionX, regionZ)); - if (backingStorage.isFile()) - load(); - } - - private SuperRegion(World world, ChunkCoordIntPair regionCoord) { - this.world = new WeakReference<>(world); - this.coord = regionCoord; - backingStorage = new File(getSaveDirectory(world), String.format("%s.%d.%d.dat", mId, regionCoord.chunkXPos, regionCoord.chunkZPos)); - if (backingStorage.isFile()) - load(); - } - - @SuppressWarnings("unchecked") - private T[] createData() { - return (T[]) Array.newInstance(elementtype, regionLength * regionLength); - } - - public T get(int subRegionX, int subRegionZ) { - int index = getIndex(subRegionX, subRegionZ); - T datum = data[index]; - if (datum == null) { - World world = Objects.requireNonNull(this.world.get()); - T newElem = createElement(world, coord.chunkXPos * regionLength + subRegionX, coord.chunkZPos * regionLength + subRegionZ); - data[index] = newElem; - return newElem; - } - return datum; - } - - public void set(int subRegionX, int subRegionZ, T data) { - this.data[getIndex(subRegionX, subRegionZ)] = data; - } - - public boolean isCreated(int subRegionX, int subRegionZ) { - return this.data[getIndex(subRegionX, subRegionZ)] != null; - } - - public ChunkCoordIntPair getCoord() { - return coord; - } - - private int getIndex(int subRegionX, int subRegionY) { - return subRegionX * regionLength + subRegionY; - } - - private int getChunkX(int index) { - return index / regionLength + coord.chunkXPos * regionLength; - } - - private int getChunkZ(int index) { - return index % regionLength + coord.chunkZPos * regionLength; - } - - public boolean isDirty() { - for (T datum : data) { - if (datum != null && !datum.isSameAsDefault()) - return true; - } - return false; - } - - public void save() { - try { - save0(); - } catch (IOException e) { - GT_Log.err.println("Error saving data " + backingStorage.getPath()); - e.printStackTrace(GT_Log.err); - } - } - - private void save0() throws IOException { - //noinspection ResultOfMethodCallIgnored - backingStorage.getParentFile().mkdirs(); - File tmpFile = getTmpFile(); - World world = Objects.requireNonNull(this.world.get(), "Attempting to save region of another world!"); - try (DataOutputStream output = new DataOutputStream(new FileOutputStream(tmpFile))) { - int ptr = 0; - boolean nullRange = data[0] == null; - // write a magic byte as storage format version - output.writeByte(0); - // write a magic byte as data format version - output.writeByte(version); - output.writeBoolean(nullRange); - while (ptr < data.length) { - // work out how long is this range - int rangeStart = ptr; - while (ptr < data.length && (data[ptr] == null || (!saveDefaults && data[ptr].isSameAsDefault())) == nullRange) - ptr++; - // write range length - output.writeShort(ptr - rangeStart); - if (!nullRange) - // write element data - for (int i = rangeStart; i < ptr; i++) - writeElement(output, data[i], world, getChunkX(ptr), getChunkZ(ptr)); - // or not - nullRange = !nullRange; - } - } - // first try to replace the destination file - // since atomic operation, no need to keep the backup in place - try { - Files.move(tmpFile.toPath(), backingStorage.toPath(), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.ATOMIC_MOVE); - } catch (AtomicMoveNotSupportedException ignored) { - // in case some dumb system/jre combination would cause this - // or if **somehow** two file inside the same directory belongs two separate filesystem - FileUtils.copyFile(tmpFile, backingStorage); - } - } - - public void load() { - try { - loadFromFile(backingStorage); - } catch (IOException | RuntimeException e) { - GT_Log.err.println("Primary storage file broken in " + backingStorage.getPath()); - e.printStackTrace(GT_Log.err); - // in case the primary storage is broken - try { - loadFromFile(getTmpFile()); - } catch (IOException | RuntimeException e2) { - GT_Log.err.println("Backup storage file broken in " + backingStorage.getPath()); - e2.printStackTrace(GT_Log.err); - } - } - } - - private void loadFromFile(File file) throws IOException { - World world = Objects.requireNonNull(this.world.get(), "Attempting to load region of another world!"); - try (DataInputStream input = new DataInputStream(new FileInputStream(file))) { - byte b = input.readByte(); - switch (b) { - case 0: - loadV0(input, world); - break; - default: - GT_Log.err.printf("Unknown ChunkAssociatedData version %d\n", b); - } - } - } - - private void loadV0(DataInput input, World world) throws IOException { - int version = input.readByte(); - boolean nullRange = input.readBoolean(); - int ptr = 0; - while (ptr != data.length) { - int rangeEnd = ptr + input.readUnsignedShort(); - if (!nullRange) { - for (; ptr < rangeEnd; ptr++) { - data[ptr] = readElement(input, version, world, getChunkX(ptr), getChunkZ(ptr)); - } - } else { - Arrays.fill(data, ptr, rangeEnd, null); - ptr = rangeEnd; - } - nullRange = !nullRange; - } - } - - private File getTmpFile() { - return new File(backingStorage.getParentFile(), backingStorage.getName() + ".tmp"); - } - } - - public static class EventHandler { - private EventHandler() { - MinecraftForge.EVENT_BUS.register(this); - } - - @SubscribeEvent - public void onWorldSave(WorldEvent.Save e) { - for (GT_ChunkAssociatedData<?> d : instances.values()) { - d.save(e.world); - } - } - - @SubscribeEvent - public void onWorldUnload(WorldEvent.Unload e) { - for (GT_ChunkAssociatedData<?> d : instances.values()) { - // there is no need to explicitly do a save here - // forge will send a WorldEvent.Save on server thread before this event is distributed - d.masterMap.remove(e.world.provider.dimensionId); - } - } - } + private static final Map<String, GT_ChunkAssociatedData<?>> instances = new ConcurrentHashMap<>(); + private static final int IO_PARALLELISM = + Math.min(8, Math.max(1, Runtime.getRuntime().availableProcessors() * 2 / 3)); + private static final ExecutorService IO_WORKERS = Executors.newWorkStealingPool(IO_PARALLELISM); + private static final Pattern FILE_PATTERN = Pattern.compile("(.+)\\.(-?\\d+)\\.(-?\\d+)\\.dat"); + + static { + // register event handler + new EventHandler(); + } + + protected final String mId; + protected final Class<T> elementtype; + private final int regionLength; + private final int version; + private final boolean saveDefaults; + /** + * Data is stored as a `(world id -> (super region id -> super region data))` hash map. + * where super region's size is determined by regionSize. + * Here it is called super region, to not confuse with vanilla's regions. + */ + private final Map<Integer, Map<ChunkCoordIntPair, SuperRegion>> masterMap = new ConcurrentHashMap<>(); + + /** + * Initialize this instance. + * + * @param aId An arbitrary, but globally unique identifier for what this data is + * @param elementType The class of this element type. Used to create arrays. + * @param regionLength The length of one super region. Each super region will contain {@code regionLength * regionLength} chunks + * @param version An integer marking the version of this data. Useful later when the data's serialized form changed. + */ + protected GT_ChunkAssociatedData( + String aId, Class<T> elementType, int regionLength, byte version, boolean saveDefaults) { + if (regionLength * regionLength > Short.MAX_VALUE || regionLength <= 0) + throw new IllegalArgumentException("Region invalid: " + regionLength); + if (!IData.class.isAssignableFrom(elementType)) throw new IllegalArgumentException("Data type invalid"); + if (aId.contains(".")) throw new IllegalArgumentException("ID cannot contains dot"); + this.mId = aId; + this.elementtype = elementType; + this.regionLength = regionLength; + this.version = version; + this.saveDefaults = saveDefaults; + if (instances.putIfAbsent(aId, this) != null) + throw new IllegalArgumentException("Duplicate GT_ChunkAssociatedData: " + aId); + } + + private ChunkCoordIntPair getRegionID(int aChunkX, int aChunkZ) { + return new ChunkCoordIntPair(Math.floorDiv(aChunkX, regionLength), Math.floorDiv(aChunkZ, regionLength)); + } + + /** + * Get a reference to data of the chunk that tile entity is in. + * The returned reference should be mutable. + */ + public final T get(IGregTechTileEntity tileEntity) { + return get(tileEntity.getWorld(), tileEntity.getXCoord() >> 4, tileEntity.getZCoord() >> 4); + } + + public final T get(Chunk chunk) { + return get(chunk.worldObj, chunk.xPosition, chunk.zPosition); + } + + public final T get(World world, ChunkCoordIntPair coord) { + return get(world, coord.chunkXPos, coord.chunkZPos); + } + + public final T get(World world, int chunkX, int chunkZ) { + SuperRegion region = masterMap + .computeIfAbsent(world.provider.dimensionId, ignored -> new ConcurrentHashMap<>()) + .computeIfAbsent(getRegionID(chunkX, chunkZ), c -> new SuperRegion(world, c)); + return region.get(Math.floorMod(chunkX, regionLength), Math.floorMod(chunkZ, regionLength)); + } + + protected final void set(World world, int chunkX, int chunkZ, T data) { + SuperRegion region = masterMap + .computeIfAbsent(world.provider.dimensionId, ignored -> new ConcurrentHashMap<>()) + .computeIfAbsent(getRegionID(chunkX, chunkZ), c -> new SuperRegion(world, c)); + region.set(Math.floorMod(chunkX, regionLength), Math.floorMod(chunkZ, regionLength), data); + } + + protected final boolean isCreated(int dimId, int chunkX, int chunkZ) { + Map<ChunkCoordIntPair, SuperRegion> dimData = masterMap.getOrDefault(dimId, null); + if (dimData == null) return false; + + SuperRegion region = dimData.getOrDefault(getRegionID(chunkX, chunkZ), null); + if (region == null) return false; + + return region.isCreated(Math.floorMod(chunkX, regionLength), Math.floorMod(chunkZ, regionLength)); + } + + public void clear() { + if (GT_Values.debugWorldData) { + long dirtyRegionCount = masterMap.values().stream() + .flatMap(m -> m.values().stream()) + .filter(SuperRegion::isDirty) + .count(); + if (dirtyRegionCount > 0) + GT_Log.out.println("Clearing ChunkAssociatedData with " + dirtyRegionCount + + " regions dirty. Data might have been lost!"); + } + masterMap.clear(); + } + + public void save() { + saveRegions(masterMap.values().stream().flatMap(m -> m.values().stream())); + } + + public void save(World world) { + Map<ChunkCoordIntPair, SuperRegion> map = masterMap.get(world.provider.dimensionId); + if (map != null) saveRegions(map.values().stream()); + } + + private void saveRegions(Stream<SuperRegion> stream) { + stream.filter(r -> r.isDirty()) + .map(c -> (Runnable) c::save) + .map(r -> CompletableFuture.runAsync(r, IO_WORKERS)) + .reduce(CompletableFuture::allOf) + .ifPresent(f -> { + try { + f.get(); + } catch (Exception e) { + GT_Log.err.println("Data save error: " + mId); + e.printStackTrace(GT_Log.err); + } + }); + } + + protected abstract void writeElement(DataOutput output, T element, World world, int chunkX, int chunkZ) + throws IOException; + + protected abstract T readElement(DataInput input, int version, World world, int chunkX, int chunkZ) + throws IOException; + + protected abstract T createElement(World world, int chunkX, int chunkZ); + + /** + * Clear all mappings, regardless of whether they are dirty + */ + public static void clearAll() { + for (GT_ChunkAssociatedData<?> d : instances.values()) d.clear(); + } + + /** + * Save all mappings + */ + public static void saveAll() { + for (GT_ChunkAssociatedData<?> d : instances.values()) d.save(); + } + + /** + * Load data for all chunks for a given world. + * Current data for that world will be discarded. If this is what you intended, call {@link #save(World)} beforehand. + * <p> + * Be aware of the memory consumption though. + */ + protected void loadAll(World w) { + if (GT_Values.debugWorldData && masterMap.containsKey(w.provider.dimensionId)) + GT_Log.err.println("Reloading ChunkAssociatedData " + mId + " for world " + w.provider.dimensionId + + " discards old data!"); + if (!getSaveDirectory(w).isDirectory()) + // nothing to load... + return; + try { + Map<ChunkCoordIntPair, SuperRegion> worldData = Files.list( + getSaveDirectory(w).toPath()) + .map(f -> { + Matcher matcher = FILE_PATTERN.matcher(f.getFileName().toString()); + return matcher.matches() ? matcher : null; + }) + .filter(Objects::nonNull) + .filter(m -> mId.equals(m.group(1))) + .map(m -> CompletableFuture.supplyAsync( + () -> new SuperRegion(w, Integer.parseInt(m.group(2)), Integer.parseInt(m.group(3))), + IO_WORKERS)) + .map(f -> { + try { + return f.get(); + } catch (Exception e) { + GT_Log.err.println("Error loading region"); + e.printStackTrace(GT_Log.err); + return null; + } + }) + .filter(Objects::nonNull) + .collect(Collectors.toMap(SuperRegion::getCoord, Function.identity())); + masterMap.put(w.provider.dimensionId, worldData); + } catch (IOException e) { + GT_Log.err.println("Error loading all region"); + e.printStackTrace(GT_Log.err); + } + } + + protected File getSaveDirectory(World w) { + File base; + if (w.provider.getSaveFolder() == null) base = w.getSaveHandler().getWorldDirectory(); + else base = new File(w.getSaveHandler().getWorldDirectory(), w.provider.getSaveFolder()); + return new File(base, "gregtech"); + } + + public interface IData { + /** + * @return Whether the data is different from chunk default + */ + boolean isSameAsDefault(); + } + + protected final class SuperRegion { + private final T[] data = createData(); + private final File backingStorage; + private final WeakReference<World> world; + /** + * Be aware, this means region coord, not bottom-left chunk coord + */ + private final ChunkCoordIntPair coord; + + private SuperRegion(World world, int regionX, int regionZ) { + this.world = new WeakReference<>(world); + this.coord = new ChunkCoordIntPair(regionX, regionZ); + backingStorage = new File(getSaveDirectory(world), String.format("%s.%d.%d.dat", mId, regionX, regionZ)); + if (backingStorage.isFile()) load(); + } + + private SuperRegion(World world, ChunkCoordIntPair regionCoord) { + this.world = new WeakReference<>(world); + this.coord = regionCoord; + backingStorage = new File( + getSaveDirectory(world), + String.format("%s.%d.%d.dat", mId, regionCoord.chunkXPos, regionCoord.chunkZPos)); + if (backingStorage.isFile()) load(); + } + + @SuppressWarnings("unchecked") + private T[] createData() { + return (T[]) Array.newInstance(elementtype, regionLength * regionLength); + } + + public T get(int subRegionX, int subRegionZ) { + int index = getIndex(subRegionX, subRegionZ); + T datum = data[index]; + if (datum == null) { + World world = Objects.requireNonNull(this.world.get()); + T newElem = createElement( + world, + coord.chunkXPos * regionLength + subRegionX, + coord.chunkZPos * regionLength + subRegionZ); + data[index] = newElem; + return newElem; + } + return datum; + } + + public void set(int subRegionX, int subRegionZ, T data) { + this.data[getIndex(subRegionX, subRegionZ)] = data; + } + + public boolean isCreated(int subRegionX, int subRegionZ) { + return this.data[getIndex(subRegionX, subRegionZ)] != null; + } + + public ChunkCoordIntPair getCoord() { + return coord; + } + + private int getIndex(int subRegionX, int subRegionY) { + return subRegionX * regionLength + subRegionY; + } + + private int getChunkX(int index) { + return index / regionLength + coord.chunkXPos * regionLength; + } + + private int getChunkZ(int index) { + return index % regionLength + coord.chunkZPos * regionLength; + } + + public boolean isDirty() { + for (T datum : data) { + if (datum != null && !datum.isSameAsDefault()) return true; + } + return false; + } + + public void save() { + try { + save0(); + } catch (IOException e) { + GT_Log.err.println("Error saving data " + backingStorage.getPath()); + e.printStackTrace(GT_Log.err); + } + } + + private void save0() throws IOException { + //noinspection ResultOfMethodCallIgnored + backingStorage.getParentFile().mkdirs(); + File tmpFile = getTmpFile(); + World world = Objects.requireNonNull(this.world.get(), "Attempting to save region of another world!"); + try (DataOutputStream output = new DataOutputStream(new FileOutputStream(tmpFile))) { + int ptr = 0; + boolean nullRange = data[0] == null; + // write a magic byte as storage format version + output.writeByte(0); + // write a magic byte as data format version + output.writeByte(version); + output.writeBoolean(nullRange); + while (ptr < data.length) { + // work out how long is this range + int rangeStart = ptr; + while (ptr < data.length + && (data[ptr] == null || (!saveDefaults && data[ptr].isSameAsDefault())) == nullRange) + ptr++; + // write range length + output.writeShort(ptr - rangeStart); + if (!nullRange) + // write element data + for (int i = rangeStart; i < ptr; i++) + writeElement(output, data[i], world, getChunkX(ptr), getChunkZ(ptr)); + // or not + nullRange = !nullRange; + } + } + // first try to replace the destination file + // since atomic operation, no need to keep the backup in place + try { + Files.move( + tmpFile.toPath(), + backingStorage.toPath(), + StandardCopyOption.REPLACE_EXISTING, + StandardCopyOption.ATOMIC_MOVE); + } catch (AtomicMoveNotSupportedException ignored) { + // in case some dumb system/jre combination would cause this + // or if **somehow** two file inside the same directory belongs two separate filesystem + FileUtils.copyFile(tmpFile, backingStorage); + } + } + + public void load() { + try { + loadFromFile(backingStorage); + } catch (IOException | RuntimeException e) { + GT_Log.err.println("Primary storage file broken in " + backingStorage.getPath()); + e.printStackTrace(GT_Log.err); + // in case the primary storage is broken + try { + loadFromFile(getTmpFile()); + } catch (IOException | RuntimeException e2) { + GT_Log.err.println("Backup storage file broken in " + backingStorage.getPath()); + e2.printStackTrace(GT_Log.err); + } + } + } + + private void loadFromFile(File file) throws IOException { + World world = Objects.requireNonNull(this.world.get(), "Attempting to load region of another world!"); + try (DataInputStream input = new DataInputStream(new FileInputStream(file))) { + byte b = input.readByte(); + switch (b) { + case 0: + loadV0(input, world); + break; + default: + GT_Log.err.printf("Unknown ChunkAssociatedData version %d\n", b); + } + } + } + + private void loadV0(DataInput input, World world) throws IOException { + int version = input.readByte(); + boolean nullRange = input.readBoolean(); + int ptr = 0; + while (ptr != data.length) { + int rangeEnd = ptr + input.readUnsignedShort(); + if (!nullRange) { + for (; ptr < rangeEnd; ptr++) { + data[ptr] = readElement(input, version, world, getChunkX(ptr), getChunkZ(ptr)); + } + } else { + Arrays.fill(data, ptr, rangeEnd, null); + ptr = rangeEnd; + } + nullRange = !nullRange; + } + } + + private File getTmpFile() { + return new File(backingStorage.getParentFile(), backingStorage.getName() + ".tmp"); + } + } + + public static class EventHandler { + private EventHandler() { + MinecraftForge.EVENT_BUS.register(this); + } + + @SubscribeEvent + public void onWorldSave(WorldEvent.Save e) { + for (GT_ChunkAssociatedData<?> d : instances.values()) { + d.save(e.world); + } + } + + @SubscribeEvent + public void onWorldUnload(WorldEvent.Unload e) { + for (GT_ChunkAssociatedData<?> d : instances.values()) { + // there is no need to explicitly do a save here + // forge will send a WorldEvent.Save on server thread before this event is distributed + d.masterMap.remove(e.world.provider.dimensionId); + } + } + } } diff --git a/src/main/java/gregtech/api/util/GT_CircuitryBehavior.java b/src/main/java/gregtech/api/util/GT_CircuitryBehavior.java index f25b88728d..b7ded54d64 100644 --- a/src/main/java/gregtech/api/util/GT_CircuitryBehavior.java +++ b/src/main/java/gregtech/api/util/GT_CircuitryBehavior.java @@ -33,7 +33,14 @@ public abstract class GT_CircuitryBehavior { */ public static final boolean getAnyRedstone(IRedstoneCircuitBlock aRedstoneCircuitBlock) { for (byte i = 0; i < 6; i++) { - if (i != aRedstoneCircuitBlock.getOutputFacing() && aRedstoneCircuitBlock.getCover(i).letsRedstoneGoIn(i, aRedstoneCircuitBlock.getCoverID(i), aRedstoneCircuitBlock.getCoverVariable(i), aRedstoneCircuitBlock.getOwnTileEntity())) { + if (i != aRedstoneCircuitBlock.getOutputFacing() + && aRedstoneCircuitBlock + .getCover(i) + .letsRedstoneGoIn( + i, + aRedstoneCircuitBlock.getCoverID(i), + aRedstoneCircuitBlock.getCoverVariable(i), + aRedstoneCircuitBlock.getOwnTileEntity())) { if (aRedstoneCircuitBlock.getInputRedstone(i) > 0) { return true; } @@ -47,7 +54,14 @@ public abstract class GT_CircuitryBehavior { */ public static final boolean getAllRedstone(IRedstoneCircuitBlock aRedstoneCircuitBlock) { for (byte i = 0; i < 6; i++) { - if (i != aRedstoneCircuitBlock.getOutputFacing() && aRedstoneCircuitBlock.getCover(i).letsRedstoneGoIn(i, aRedstoneCircuitBlock.getCoverID(i), aRedstoneCircuitBlock.getCoverVariable(i), aRedstoneCircuitBlock.getOwnTileEntity())) { + if (i != aRedstoneCircuitBlock.getOutputFacing() + && aRedstoneCircuitBlock + .getCover(i) + .letsRedstoneGoIn( + i, + aRedstoneCircuitBlock.getCoverID(i), + aRedstoneCircuitBlock.getCoverVariable(i), + aRedstoneCircuitBlock.getOwnTileEntity())) { if (aRedstoneCircuitBlock.getInputRedstone(i) == 0) { return false; } @@ -62,7 +76,14 @@ public abstract class GT_CircuitryBehavior { public static final boolean getOneRedstone(IRedstoneCircuitBlock aRedstoneCircuitBlock) { int tRedstoneAmount = 0; for (byte i = 0; i < 6; i++) { - if (i != aRedstoneCircuitBlock.getOutputFacing() && aRedstoneCircuitBlock.getCover(i).letsRedstoneGoIn(i, aRedstoneCircuitBlock.getCoverID(i), aRedstoneCircuitBlock.getCoverVariable(i), aRedstoneCircuitBlock.getOwnTileEntity())) { + if (i != aRedstoneCircuitBlock.getOutputFacing() + && aRedstoneCircuitBlock + .getCover(i) + .letsRedstoneGoIn( + i, + aRedstoneCircuitBlock.getCoverID(i), + aRedstoneCircuitBlock.getCoverVariable(i), + aRedstoneCircuitBlock.getOwnTileEntity())) { if (aRedstoneCircuitBlock.getInputRedstone(i) > 0) { tRedstoneAmount++; } @@ -77,7 +98,14 @@ public abstract class GT_CircuitryBehavior { public static final byte getStrongestRedstone(IRedstoneCircuitBlock aRedstoneCircuitBlock) { byte tRedstoneAmount = 0; for (byte i = 0; i < 6; i++) { - if (i != aRedstoneCircuitBlock.getOutputFacing() && aRedstoneCircuitBlock.getCover(i).letsRedstoneGoIn(i, aRedstoneCircuitBlock.getCoverID(i), aRedstoneCircuitBlock.getCoverVariable(i), aRedstoneCircuitBlock.getOwnTileEntity())) { + if (i != aRedstoneCircuitBlock.getOutputFacing() + && aRedstoneCircuitBlock + .getCover(i) + .letsRedstoneGoIn( + i, + aRedstoneCircuitBlock.getCoverID(i), + aRedstoneCircuitBlock.getCoverVariable(i), + aRedstoneCircuitBlock.getOwnTileEntity())) { tRedstoneAmount = (byte) Math.max(tRedstoneAmount, aRedstoneCircuitBlock.getInputRedstone(i)); } } @@ -95,7 +123,14 @@ public abstract class GT_CircuitryBehavior { if (!getAnyRedstone(aRedstoneCircuitBlock)) return 0; byte tRedstoneAmount = 15; for (byte i = 0; i < 6; i++) { - if (i != aRedstoneCircuitBlock.getOutputFacing() && aRedstoneCircuitBlock.getCover(i).letsRedstoneGoIn(i, aRedstoneCircuitBlock.getCoverID(i), aRedstoneCircuitBlock.getCoverVariable(i), aRedstoneCircuitBlock.getOwnTileEntity())) { + if (i != aRedstoneCircuitBlock.getOutputFacing() + && aRedstoneCircuitBlock + .getCover(i) + .letsRedstoneGoIn( + i, + aRedstoneCircuitBlock.getCoverID(i), + aRedstoneCircuitBlock.getCoverVariable(i), + aRedstoneCircuitBlock.getOwnTileEntity())) { if (aRedstoneCircuitBlock.getInputRedstone(i) > 0) tRedstoneAmount = (byte) Math.min(tRedstoneAmount, aRedstoneCircuitBlock.getInputRedstone(i)); } @@ -110,7 +145,14 @@ public abstract class GT_CircuitryBehavior { if (!getAnyRedstone(aRedstoneCircuitBlock)) return 0; byte tRedstoneAmount = 15; for (byte i = 0; i < 6; i++) { - if (i != aRedstoneCircuitBlock.getOutputFacing() && aRedstoneCircuitBlock.getCover(i).letsRedstoneGoIn(i, aRedstoneCircuitBlock.getCoverID(i), aRedstoneCircuitBlock.getCoverVariable(i), aRedstoneCircuitBlock.getOwnTileEntity())) { + if (i != aRedstoneCircuitBlock.getOutputFacing() + && aRedstoneCircuitBlock + .getCover(i) + .letsRedstoneGoIn( + i, + aRedstoneCircuitBlock.getCoverID(i), + aRedstoneCircuitBlock.getCoverVariable(i), + aRedstoneCircuitBlock.getOwnTileEntity())) { tRedstoneAmount = (byte) Math.min(tRedstoneAmount, aRedstoneCircuitBlock.getInputRedstone(i)); } } @@ -134,7 +176,6 @@ public abstract class GT_CircuitryBehavior { */ public abstract void validateParameters(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock); - /**************************** * Useful Utility Functions * ****************************/ @@ -150,7 +191,8 @@ public abstract class GT_CircuitryBehavior { /** * If the ItemStack should be displayed. Parameters are between 0 and 3. */ - public abstract boolean displayItemStack(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex); + public abstract boolean displayItemStack( + int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock, int aIndex); /** * The Name of the Gate for the GUI diff --git a/src/main/java/gregtech/api/util/GT_ClientPreference.java b/src/main/java/gregtech/api/util/GT_ClientPreference.java index 26c7fa3da5..de3051fd37 100644 --- a/src/main/java/gregtech/api/util/GT_ClientPreference.java +++ b/src/main/java/gregtech/api/util/GT_ClientPreference.java @@ -5,7 +5,8 @@ public class GT_ClientPreference { private final boolean mSingleBlockInitialMultiStack; private final boolean mInputBusInitialFilter; - public GT_ClientPreference(boolean mSingleBlockInitialFilter, boolean mSingleBlockInitialMultiStack, boolean mInputBusInitialFilter) { + public GT_ClientPreference( + boolean mSingleBlockInitialFilter, boolean mSingleBlockInitialMultiStack, boolean mInputBusInitialFilter) { this.mSingleBlockInitialFilter = mSingleBlockInitialFilter; this.mSingleBlockInitialMultiStack = mSingleBlockInitialMultiStack; this.mInputBusInitialFilter = mInputBusInitialFilter; @@ -13,7 +14,8 @@ public class GT_ClientPreference { public GT_ClientPreference(GT_Config aClientDataFile) { this.mSingleBlockInitialFilter = aClientDataFile.get("preference", "mSingleBlockInitialFilter", false); - this.mSingleBlockInitialMultiStack = aClientDataFile.get("preference", "mSingleBlockInitialAllowMultiStack", false); + this.mSingleBlockInitialMultiStack = + aClientDataFile.get("preference", "mSingleBlockInitialAllowMultiStack", false); this.mInputBusInitialFilter = aClientDataFile.get("preference", "mInputBusInitialFilter", true); } diff --git a/src/main/java/gregtech/api/util/GT_Config.java b/src/main/java/gregtech/api/util/GT_Config.java index 4a0b15408f..362be0fe01 100644 --- a/src/main/java/gregtech/api/util/GT_Config.java +++ b/src/main/java/gregtech/api/util/GT_Config.java @@ -1,13 +1,13 @@ package gregtech.api.util; +import static gregtech.api.enums.GT_Values.E; + import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import net.minecraft.item.ItemStack; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.config.Property; -import static gregtech.api.enums.GT_Values.E; - public class GT_Config implements Runnable { public static boolean troll = false; @@ -21,8 +21,7 @@ public class GT_Config implements Runnable { GregTech_API.sAfterGTPreload.add(this); // in case of crash on startup GregTech_API.sAfterGTLoad.add(this); // in case of crash on startup GregTech_API.sAfterGTPostload.add(this); - if (GT_Values.lateConfigSave) - GregTech_API.sFirstWorldTick.add(this); + if (GT_Values.lateConfigSave) GregTech_API.sFirstWorldTick.add(this); } private static boolean shouldSave() { @@ -31,7 +30,8 @@ public class GT_Config implements Runnable { public static int addIDConfig(Object aCategory, String aName, int aDefault) { if (GT_Utility.isStringInvalid(aName)) return aDefault; - Property tProperty = sConfigFileIDs.get(aCategory.toString().replaceAll("\\|", "."), aName.replaceAll("\\|", "."), aDefault); + Property tProperty = + sConfigFileIDs.get(aCategory.toString().replaceAll("\\|", "."), aName.replaceAll("\\|", "."), aDefault); int rResult = tProperty.getInt(aDefault); if (!tProperty.wasRead() && shouldSave()) sConfigFileIDs.save(); return rResult; @@ -43,7 +43,9 @@ public class GT_Config implements Runnable { if (rName != null) return rName.toString(); try { if (GT_Utility.isStringValid(rName = aStack.getUnlocalizedName())) return rName.toString(); - } catch (Throwable e) {/*Do nothing*/} + } catch (Throwable e) { + /*Do nothing*/ + } String sName = aStack.getItem().toString(); String[] tmp = sName.split("@"); if (tmp.length > 0) sName = tmp[0]; @@ -57,7 +59,8 @@ public class GT_Config implements Runnable { public boolean get(Object aCategory, String aName, boolean aDefault) { if (GT_Utility.isStringInvalid(aName)) return aDefault; - Property tProperty = mConfig.get(aCategory.toString().replaceAll("\\|", "_"), (aName + "_" + aDefault).replaceAll("\\|", "_"), aDefault); + Property tProperty = mConfig.get( + aCategory.toString().replaceAll("\\|", "_"), (aName + "_" + aDefault).replaceAll("\\|", "_"), aDefault); boolean rResult = tProperty.getBoolean(aDefault); if (!tProperty.wasRead() && shouldSave()) mConfig.save(); return rResult; @@ -69,7 +72,8 @@ public class GT_Config implements Runnable { public int get(Object aCategory, String aName, int aDefault) { if (GT_Utility.isStringInvalid(aName)) return aDefault; - Property tProperty = mConfig.get(aCategory.toString().replaceAll("\\|", "_"), (aName + "_" + aDefault).replaceAll("\\|", "_"), aDefault); + Property tProperty = mConfig.get( + aCategory.toString().replaceAll("\\|", "_"), (aName + "_" + aDefault).replaceAll("\\|", "_"), aDefault); int rResult = tProperty.getInt(aDefault); if (!tProperty.wasRead() && shouldSave()) mConfig.save(); return rResult; @@ -81,7 +85,8 @@ public class GT_Config implements Runnable { public double get(Object aCategory, String aName, double aDefault) { if (GT_Utility.isStringInvalid(aName)) return aDefault; - Property tProperty = mConfig.get(aCategory.toString().replaceAll("\\|", "_"), (aName + "_" + aDefault).replaceAll("\\|", "_"), aDefault); + Property tProperty = mConfig.get( + aCategory.toString().replaceAll("\\|", "_"), (aName + "_" + aDefault).replaceAll("\\|", "_"), aDefault); double rResult = tProperty.getDouble(aDefault); if (!tProperty.wasRead() && shouldSave()) mConfig.save(); return rResult; @@ -93,7 +98,8 @@ public class GT_Config implements Runnable { public String get(Object aCategory, String aName, String aDefault) { if (GT_Utility.isStringInvalid(aName)) return aDefault; - Property tProperty = mConfig.get(aCategory.toString().replaceAll("\\|", "_"), (aName + "_" + aDefault).replaceAll("\\|", "_"), aDefault); + Property tProperty = mConfig.get( + aCategory.toString().replaceAll("\\|", "_"), (aName + "_" + aDefault).replaceAll("\\|", "_"), aDefault); String rResult = tProperty.getString(); if (!tProperty.wasRead() && shouldSave()) mConfig.save(); return rResult; @@ -105,13 +111,13 @@ public class GT_Config implements Runnable { public String[] get(Object aCategory, String aName, String... aDefault) { if (GT_Utility.isStringInvalid(aName)) return aDefault; - Property tProperty = mConfig.get(aCategory.toString().replaceAll("\\|", "_"), aName.replaceAll("\\|", "_"), aDefault); + Property tProperty = + mConfig.get(aCategory.toString().replaceAll("\\|", "_"), aName.replaceAll("\\|", "_"), aDefault); String[] rResult = tProperty.getStringList(); if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) mConfig.save(); return rResult; } - @Override public void run() { mConfig.save(); diff --git a/src/main/java/gregtech/api/util/GT_CoverBehavior.java b/src/main/java/gregtech/api/util/GT_CoverBehavior.java index 9972331eb3..de1514c956 100644 --- a/src/main/java/gregtech/api/util/GT_CoverBehavior.java +++ b/src/main/java/gregtech/api/util/GT_CoverBehavior.java @@ -1,5 +1,7 @@ package gregtech.api.util; +import static gregtech.api.enums.GT_Values.E; + import gregtech.api.enums.GT_Values; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.net.GT_Packet_TileEntityCoverGUI; @@ -9,8 +11,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.fluids.Fluid; -import static gregtech.api.enums.GT_Values.E; - /** * For Covers with a special behavior. Has fixed storage format of 4 byte. Not very convenient... */ @@ -39,151 +39,234 @@ public abstract class GT_CoverBehavior extends GT_CoverBehaviorBase<ISerializabl } @Override - protected boolean isRedstoneSensitiveImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, long aTimer) { + protected boolean isRedstoneSensitiveImpl( + byte aSide, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + ICoverable aTileEntity, + long aTimer) { return isRedstoneSensitive(aSide, aCoverID, aCoverVariable.get(), aTileEntity, aTimer); } @Override - protected ISerializableObject.LegacyCoverData doCoverThingsImpl(byte aSide, byte aInputRedstone, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, long aTimer) { - if (aCoverVariable == null) - aCoverVariable = new ISerializableObject.LegacyCoverData(); + protected ISerializableObject.LegacyCoverData doCoverThingsImpl( + byte aSide, + byte aInputRedstone, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + ICoverable aTileEntity, + long aTimer) { + if (aCoverVariable == null) aCoverVariable = new ISerializableObject.LegacyCoverData(); aCoverVariable.set(doCoverThings(aSide, aInputRedstone, aCoverID, aCoverVariable.get(), aTileEntity, aTimer)); return aCoverVariable; } @Override - protected boolean onCoverRightClickImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + protected boolean onCoverRightClickImpl( + byte aSide, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { return onCoverRightclick(aSide, aCoverID, convert(aCoverVariable), aTileEntity, aPlayer, aX, aY, aZ); } @Override - protected ISerializableObject.LegacyCoverData onCoverScrewdriverClickImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (aCoverVariable == null) - aCoverVariable = new ISerializableObject.LegacyCoverData(); - aCoverVariable.set(onCoverScrewdriverclick(aSide, aCoverID, convert(aCoverVariable), aTileEntity, aPlayer, aX, aY, aZ)); + protected ISerializableObject.LegacyCoverData onCoverScrewdriverClickImpl( + byte aSide, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { + if (aCoverVariable == null) aCoverVariable = new ISerializableObject.LegacyCoverData(); + aCoverVariable.set( + onCoverScrewdriverclick(aSide, aCoverID, convert(aCoverVariable), aTileEntity, aPlayer, aX, aY, aZ)); return aCoverVariable; } @Override - protected boolean onCoverShiftRightClickImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer) { + protected boolean onCoverShiftRightClickImpl( + byte aSide, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer) { return onCoverShiftRightclick(aSide, aCoverID, convert(aCoverVariable), aTileEntity, aPlayer); } @Override - protected Object getClientGUIImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, World aWorld) { + protected Object getClientGUIImpl( + byte aSide, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + World aWorld) { return getClientGUI(aSide, aCoverID, convert(aCoverVariable), aTileEntity); } @Override - protected boolean onCoverRemovalImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, boolean aForced) { + protected boolean onCoverRemovalImpl( + byte aSide, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + ICoverable aTileEntity, + boolean aForced) { return onCoverRemoval(aSide, aCoverID, convert(aCoverVariable), aTileEntity, aForced); } @Override - protected String getDescriptionImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected String getDescriptionImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return getDescription(aSide, aCoverID, convert(aCoverVariable), aTileEntity); } @Override - protected float getBlastProofLevelImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected float getBlastProofLevelImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return getBlastProofLevel(aSide, aCoverID, convert(aCoverVariable), aTileEntity); } @Override - protected boolean letsRedstoneGoInImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected boolean letsRedstoneGoInImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return letsRedstoneGoIn(aSide, aCoverID, convert(aCoverVariable), aTileEntity); } @Override - protected boolean letsRedstoneGoOutImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected boolean letsRedstoneGoOutImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return letsRedstoneGoOut(aSide, aCoverID, convert(aCoverVariable), aTileEntity); } @Override - protected boolean letsFibreGoInImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected boolean letsFibreGoInImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return letsFibreGoIn(aSide, aCoverID, convert(aCoverVariable), aTileEntity); } @Override - protected boolean letsFibreGoOutImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected boolean letsFibreGoOutImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return letsFibreGoOut(aSide, aCoverID, convert(aCoverVariable), aTileEntity); } @Override - protected boolean letsEnergyInImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected boolean letsEnergyInImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return letsEnergyIn(aSide, aCoverID, convert(aCoverVariable), aTileEntity); } @Override - protected boolean letsEnergyOutImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected boolean letsEnergyOutImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return letsEnergyOut(aSide, aCoverID, convert(aCoverVariable), aTileEntity); } @Override - protected boolean letsFluidInImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + protected boolean letsFluidInImpl( + byte aSide, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + Fluid aFluid, + ICoverable aTileEntity) { return letsFluidIn(aSide, aCoverID, convert(aCoverVariable), aFluid, aTileEntity); } @Override - protected boolean letsFluidOutImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + protected boolean letsFluidOutImpl( + byte aSide, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + Fluid aFluid, + ICoverable aTileEntity) { return letsFluidOut(aSide, aCoverID, convert(aCoverVariable), aFluid, aTileEntity); } @Override - protected boolean letsItemsInImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, int aSlot, ICoverable aTileEntity) { + protected boolean letsItemsInImpl( + byte aSide, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + int aSlot, + ICoverable aTileEntity) { return letsItemsIn(aSide, aCoverID, convert(aCoverVariable), aSlot, aTileEntity); } @Override - protected boolean letsItemsOutImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, int aSlot, ICoverable aTileEntity) { + protected boolean letsItemsOutImpl( + byte aSide, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + int aSlot, + ICoverable aTileEntity) { return letsItemsOut(aSide, aCoverID, convert(aCoverVariable), aSlot, aTileEntity); } @Override - protected boolean isGUIClickableImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected boolean isGUIClickableImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return isGUIClickable(aSide, aCoverID, convert(aCoverVariable), aTileEntity); } @Override - protected boolean manipulatesSidedRedstoneOutputImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected boolean manipulatesSidedRedstoneOutputImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return manipulatesSidedRedstoneOutput(aSide, aCoverID, convert(aCoverVariable), aTileEntity); } @Override - protected boolean alwaysLookConnectedImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected boolean alwaysLookConnectedImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return alwaysLookConnected(aSide, aCoverID, convert(aCoverVariable), aTileEntity); } @Override - protected byte getRedstoneInputImpl(byte aSide, byte aInputRedstone, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected byte getRedstoneInputImpl( + byte aSide, + byte aInputRedstone, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + ICoverable aTileEntity) { return getRedstoneInput(aSide, aInputRedstone, aCoverID, convert(aCoverVariable), aTileEntity); } @Override - protected int getTickRateImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected int getTickRateImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return getTickRate(aSide, aCoverID, convert(aCoverVariable), aTileEntity); } @Override - protected byte getLensColorImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected byte getLensColorImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return getLensColor(aSide, aCoverID, convert(aCoverVariable), aTileEntity); } @Override - protected ItemStack getDropImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { + protected ItemStack getDropImpl( + byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity) { return getDrop(aSide, aCoverID, convert(aCoverVariable), aTileEntity); } // endregion - public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public boolean isRedstoneSensitive( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { return true; } /** * Called by updateEntity inside the covered TileEntity. aCoverVariable is the Value you returned last time. */ - public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public int doCoverThings( + byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { return aCoverVariable; } @@ -192,7 +275,15 @@ public abstract class GT_CoverBehavior extends GT_CoverBehaviorBase<ISerializabl * <p/> * return true, if something actually happens. */ - public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public boolean onCoverRightclick( + byte aSide, + int aCoverID, + int aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { return false; } @@ -201,17 +292,29 @@ public abstract class GT_CoverBehavior extends GT_CoverBehaviorBase<ISerializabl * <p/> * return the new Value of the Cover Variable */ - public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public int onCoverScrewdriverclick( + byte aSide, + int aCoverID, + int aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { return aCoverVariable; } /** * Called when someone shift-rightclicks this Cover with no tool. Doesn't call @onCoverRightclick in this Case. */ - public boolean onCoverShiftRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer) { - if(hasCoverGUI() && aPlayer instanceof EntityPlayerMP) { + public boolean onCoverShiftRightclick( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer) { + if (hasCoverGUI() && aPlayer instanceof EntityPlayerMP) { lastPlayer = aPlayer; - GT_Values.NW.sendToPlayer(new GT_Packet_TileEntityCoverGUI(aSide, aCoverID, aCoverVariable, aTileEntity, (EntityPlayerMP) aPlayer), (EntityPlayerMP) aPlayer); + GT_Values.NW.sendToPlayer( + new GT_Packet_TileEntityCoverGUI( + aSide, aCoverID, aCoverVariable, aTileEntity, (EntityPlayerMP) aPlayer), + (EntityPlayerMP) aPlayer); return true; } return false; @@ -225,7 +328,8 @@ public abstract class GT_CoverBehavior extends GT_CoverBehaviorBase<ISerializabl * Removes the Cover if this returns true, or if aForced is true. * Doesn't get called when the Machine Block is getting broken, only if you break the Cover away from the Machine. */ - public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) { + public boolean onCoverRemoval( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) { return true; } @@ -327,7 +431,8 @@ public abstract class GT_CoverBehavior extends GT_CoverBehaviorBase<ISerializabl /** * Needs to return true for Covers, which have a Redstone Output on their Facing. */ - public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + public boolean manipulatesSidedRedstoneOutput( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return false; } @@ -343,7 +448,8 @@ public abstract class GT_CoverBehavior extends GT_CoverBehaviorBase<ISerializabl * Returns the original Redstone per default. * The Cover should @letsRedstoneGoIn or the aInputRedstone Parameter is always 0. */ - public byte getRedstoneInput(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + public byte getRedstoneInput( + byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return letsRedstoneGoIn(aSide, aCoverID, aCoverVariable, aTileEntity) ? aInputRedstone : 0; } diff --git a/src/main/java/gregtech/api/util/GT_CoverBehaviorBase.java b/src/main/java/gregtech/api/util/GT_CoverBehaviorBase.java index 1c72f9c9d9..470a250ee7 100644 --- a/src/main/java/gregtech/api/util/GT_CoverBehaviorBase.java +++ b/src/main/java/gregtech/api/util/GT_CoverBehaviorBase.java @@ -1,5 +1,7 @@ package gregtech.api.util; +import static gregtech.api.enums.GT_Values.E; + import gregtech.api.enums.GT_Values; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.ICoverable; @@ -14,8 +16,6 @@ import net.minecraft.nbt.NBTTagInt; import net.minecraft.world.World; import net.minecraftforge.fluids.Fluid; -import static gregtech.api.enums.GT_Values.E; - /** * For Covers with a special behavior. * @@ -46,8 +46,7 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { } public final T cast(ISerializableObject aData) { - if (typeToken.isInstance(aData)) - return forceCast(aData); + if (typeToken.isInstance(aData)) return forceCast(aData); return null; } @@ -66,7 +65,8 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { * in case of CTM * @return null if none, otherwise return facade target block */ - public final Block getFacadeBlock(byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public final Block getFacadeBlock( + byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { return getFacadeBlockImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity); } @@ -75,7 +75,8 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { * in case of CTM * @return 0 if none, otherwise return facade target meta */ - public final int getFacadeMeta(byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public final int getFacadeMeta( + byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { return getFacadeMetaImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity); } @@ -83,14 +84,15 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { * Get the display stack. Default to {@code int2Stack(aCoverID)} */ public final ItemStack getDisplayStack(int aCoverID, ISerializableObject aCoverVariable) { - return getDisplayStackImpl(aCoverID,forceCast(aCoverVariable)); + return getDisplayStackImpl(aCoverID, forceCast(aCoverVariable)); } /** * Get the special cover texture associated with this cover. Return null if one should use the texture passed to * {@link gregtech.api.GregTech_API#registerCover(ItemStack, ITexture, GT_CoverBehaviorBase)} or its overloads. */ - public final ITexture getSpecialCoverTexture(byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public final ITexture getSpecialCoverTexture( + byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { return getSpecialCoverTextureImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity); } @@ -100,14 +102,16 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { * Note if you want to sync the data afterwards you will have to manually do it by calling {@link ICoverable#issueCoverUpdate(byte)} * This option only affects the initial sync. */ - public final boolean isDataNeededOnClient(byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public final boolean isDataNeededOnClient( + byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { return isDataNeededOnClientImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity); } /** * Called upon receiving data from network. Use {@link ICoverable#isClientSide()} to determine the side. */ - public final void onDataChanged(byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public final void onDataChanged( + byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { onDataChangedImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity); } @@ -118,14 +122,21 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { onDroppedImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity); } - public final boolean isRedstoneSensitive(byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity, long aTimer) { + public final boolean isRedstoneSensitive( + byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity, long aTimer) { return isRedstoneSensitiveImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity, aTimer); } /** * Called by updateEntity inside the covered TileEntity. aCoverVariable is the Value you returned last time. */ - public final T doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity, long aTimer) { + public final T doCoverThings( + byte aSide, + byte aInputRedstone, + int aCoverID, + ISerializableObject aCoverVariable, + ICoverable aTileEntity, + long aTimer) { return doCoverThingsImpl(aSide, aInputRedstone, aCoverID, forceCast(aCoverVariable), aTileEntity, aTimer); } @@ -134,7 +145,15 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { * <p/> * return true, if something actually happens. */ - public final boolean onCoverRightClick(byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public final boolean onCoverRightClick( + byte aSide, + int aCoverID, + ISerializableObject aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { return onCoverRightClickImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity, aPlayer, aX, aY, aZ); } @@ -143,18 +162,38 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { * <p/> * return the new Value of the Cover Variable */ - public final T onCoverScrewdriverClick(byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { - return onCoverScrewdriverClickImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity, aPlayer, aX, aY, aZ); + public final T onCoverScrewdriverClick( + byte aSide, + int aCoverID, + ISerializableObject aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { + return onCoverScrewdriverClickImpl( + aSide, aCoverID, forceCast(aCoverVariable), aTileEntity, aPlayer, aX, aY, aZ); } /** * Called when someone shift-rightclicks this Cover with no tool. Doesn't call @onCoverRightclick in this Case. */ - public final boolean onCoverShiftRightClick(byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer) { + public final boolean onCoverShiftRightClick( + byte aSide, + int aCoverID, + ISerializableObject aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer) { return onCoverShiftRightClickImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity, aPlayer); } - public final Object getClientGUI(byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, World aWorld) { + public final Object getClientGUI( + byte aSide, + int aCoverID, + ISerializableObject aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + World aWorld) { return getClientGUIImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity, aPlayer, aWorld); } @@ -162,21 +201,24 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { * Removes the Cover if this returns true, or if aForced is true. * Doesn't get called when the Machine Block is getting broken, only if you break the Cover away from the Machine. */ - public final boolean onCoverRemoval(byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity, boolean aForced) { + public final boolean onCoverRemoval( + byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity, boolean aForced) { return onCoverRemovalImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity, aForced); } /** * Gives a small Text for the status of the Cover. */ - public final String getDescription(byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public final String getDescription( + byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { return getDescriptionImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity); } /** * How Blast Proof the Cover is. 30 is normal. */ - public final float getBlastProofLevel(byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public final float getBlastProofLevel( + byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { return getBlastProofLevelImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity); } @@ -185,14 +227,16 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { * <p/> * This is just Informative so that Machines know if their Redstone Input is blocked or not */ - public final boolean letsRedstoneGoIn(byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public final boolean letsRedstoneGoIn( + byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { return letsRedstoneGoInImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity); } /** * If it lets RS-Signals out of the Block */ - public final boolean letsRedstoneGoOut(byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public final boolean letsRedstoneGoOut( + byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { return letsRedstoneGoOutImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity); } @@ -201,77 +245,88 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { * <p/> * This is just Informative so that Machines know if their Redstone Input is blocked or not */ - public final boolean letsFibreGoIn(byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public final boolean letsFibreGoIn( + byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { return letsFibreGoInImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity); } /** * If it lets Fibre-Signals out of the Block */ - public final boolean letsFibreGoOut(byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public final boolean letsFibreGoOut( + byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { return letsFibreGoOutImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity); } /** * If it lets Energy into the Block */ - public final boolean letsEnergyIn(byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public final boolean letsEnergyIn( + byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { return letsEnergyInImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity); } /** * If it lets Energy out of the Block */ - public final boolean letsEnergyOut(byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public final boolean letsEnergyOut( + byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { return letsEnergyOutImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity); } /** * If it lets Liquids into the Block, aFluid can be null meaning if this is generally allowing Fluids or not. */ - public final boolean letsFluidIn(byte aSide, int aCoverID, ISerializableObject aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + public final boolean letsFluidIn( + byte aSide, int aCoverID, ISerializableObject aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return letsFluidInImpl(aSide, aCoverID, forceCast(aCoverVariable), aFluid, aTileEntity); } /** * If it lets Liquids out of the Block, aFluid can be null meaning if this is generally allowing Fluids or not. */ - public final boolean letsFluidOut(byte aSide, int aCoverID, ISerializableObject aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + public final boolean letsFluidOut( + byte aSide, int aCoverID, ISerializableObject aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return letsFluidOutImpl(aSide, aCoverID, forceCast(aCoverVariable), aFluid, aTileEntity); } /** * If it lets Items into the Block, aSlot = -1 means if it is generally accepting Items (return false for no reaction at all), aSlot = -2 means if it would accept for all Slots Impl(return true to skip the Checks for each Slot). */ - public final boolean letsItemsIn(byte aSide, int aCoverID, ISerializableObject aCoverVariable, int aSlot, ICoverable aTileEntity) { + public final boolean letsItemsIn( + byte aSide, int aCoverID, ISerializableObject aCoverVariable, int aSlot, ICoverable aTileEntity) { return letsItemsInImpl(aSide, aCoverID, forceCast(aCoverVariable), aSlot, aTileEntity); } /** * If it lets Items out of the Block, aSlot = -1 means if it is generally accepting Items (return false for no reaction at all), aSlot = -2 means if it would accept for all Slots Impl(return true to skip the Checks for each Slot). */ - public final boolean letsItemsOut(byte aSide, int aCoverID, ISerializableObject aCoverVariable, int aSlot, ICoverable aTileEntity) { + public final boolean letsItemsOut( + byte aSide, int aCoverID, ISerializableObject aCoverVariable, int aSlot, ICoverable aTileEntity) { return letsItemsOutImpl(aSide, aCoverID, forceCast(aCoverVariable), aSlot, aTileEntity); } /** * If it lets you rightclick the Machine normally */ - public final boolean isGUIClickable(byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public final boolean isGUIClickable( + byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { return isGUIClickableImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity); } /** * Needs to return true for Covers, which have a Redstone Output on their Facing. */ - public final boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public final boolean manipulatesSidedRedstoneOutput( + byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { return manipulatesSidedRedstoneOutputImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity); } /** * if this Cover should let Pipe Connections look connected even if it is not the case. */ - public final boolean alwaysLookConnected(byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public final boolean alwaysLookConnected( + byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { return alwaysLookConnectedImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity); } @@ -280,7 +335,8 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { * Returns the original Redstone per default. * The Cover should @letsRedstoneGoIn or the aInputRedstone Parameter is always 0. */ - public final byte getRedstoneInput(byte aSide, byte aInputRedstone, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public final byte getRedstoneInput( + byte aSide, byte aInputRedstone, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { return getRedstoneInputImpl(aSide, aInputRedstone, aCoverID, forceCast(aCoverVariable), aTileEntity); } @@ -293,18 +349,19 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { return getTickRateImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity); } - /** * The MC Color of this Lens. -1 for no Color (meaning this isn't a Lens then). */ - public final byte getLensColor(byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public final byte getLensColor( + byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { return getLensColorImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity); } /** * @return the ItemStack dropped by this Cover */ - public final ItemStack getDrop(byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { + public final ItemStack getDrop( + byte aSide, int aCoverID, ISerializableObject aCoverVariable, ICoverable aTileEntity) { return getDropImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity); } // endregion @@ -331,21 +388,20 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { return false; } - protected void onDataChangedImpl(byte aSide, int aCoverID, T aCoverVariable, ICoverable aTileEntity) { - } - + protected void onDataChangedImpl(byte aSide, int aCoverID, T aCoverVariable, ICoverable aTileEntity) {} - protected void onDroppedImpl(byte aSide, int aCoverID, T aCoverVariable, ICoverable aTileEntity) { - } + protected void onDroppedImpl(byte aSide, int aCoverID, T aCoverVariable, ICoverable aTileEntity) {} - protected boolean isRedstoneSensitiveImpl(byte aSide, int aCoverID, T aCoverVariable, ICoverable aTileEntity, long aTimer) { + protected boolean isRedstoneSensitiveImpl( + byte aSide, int aCoverID, T aCoverVariable, ICoverable aTileEntity, long aTimer) { return true; } /** * Called by updateEntity inside the covered TileEntity. aCoverVariable is the Value you returned last time. */ - protected T doCoverThingsImpl(byte aSide, byte aInputRedstone, int aCoverID, T aCoverVariable, ICoverable aTileEntity, long aTimer) { + protected T doCoverThingsImpl( + byte aSide, byte aInputRedstone, int aCoverID, T aCoverVariable, ICoverable aTileEntity, long aTimer) { return aCoverVariable; } @@ -354,7 +410,15 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { * <p/> * return true, if something actually happens. */ - protected boolean onCoverRightClickImpl(byte aSide, int aCoverID, T aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + protected boolean onCoverRightClickImpl( + byte aSide, + int aCoverID, + T aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { return false; } @@ -363,23 +427,36 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { * <p/> * return the new Value of the Cover Variable */ - protected T onCoverScrewdriverClickImpl(byte aSide, int aCoverID, T aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + protected T onCoverScrewdriverClickImpl( + byte aSide, + int aCoverID, + T aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { return aCoverVariable; } /** * Called when someone shift-rightclicks this Cover with no tool. Doesn't call @onCoverRightclick in this Case. */ - protected boolean onCoverShiftRightClickImpl(byte aSide, int aCoverID, T aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer) { + protected boolean onCoverShiftRightClickImpl( + byte aSide, int aCoverID, T aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer) { if (hasCoverGUI() && aPlayer instanceof EntityPlayerMP) { lastPlayer = aPlayer; - GT_Values.NW.sendToPlayer(new GT_Packet_TileEntityCoverGUI(aSide, aCoverID, aCoverVariable, aTileEntity, (EntityPlayerMP) aPlayer), (EntityPlayerMP) aPlayer); + GT_Values.NW.sendToPlayer( + new GT_Packet_TileEntityCoverGUI( + aSide, aCoverID, aCoverVariable, aTileEntity, (EntityPlayerMP) aPlayer), + (EntityPlayerMP) aPlayer); return true; } return false; } - protected Object getClientGUIImpl(byte aSide, int aCoverID, T aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, World aWorld) { + protected Object getClientGUIImpl( + byte aSide, int aCoverID, T aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, World aWorld) { return null; } @@ -387,7 +464,8 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { * Removes the Cover if this returns true, or if aForced is true. * Doesn't get called when the Machine Block is getting broken, only if you break the Cover away from the Machine. */ - protected boolean onCoverRemovalImpl(byte aSide, int aCoverID, T aCoverVariable, ICoverable aTileEntity, boolean aForced) { + protected boolean onCoverRemovalImpl( + byte aSide, int aCoverID, T aCoverVariable, ICoverable aTileEntity, boolean aForced) { return true; } @@ -454,14 +532,16 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { /** * If it lets Liquids into the Block, aFluid can be null meaning if this is generally allowing Fluids or not. */ - protected boolean letsFluidInImpl(byte aSide, int aCoverID, T aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + protected boolean letsFluidInImpl( + byte aSide, int aCoverID, T aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return false; } /** * If it lets Liquids out of the Block, aFluid can be null meaning if this is generally allowing Fluids or not. */ - protected boolean letsFluidOutImpl(byte aSide, int aCoverID, T aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + protected boolean letsFluidOutImpl( + byte aSide, int aCoverID, T aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return false; } @@ -489,7 +569,8 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { /** * Needs to return true for Covers, which have a Redstone Output on their Facing. */ - protected boolean manipulatesSidedRedstoneOutputImpl(byte aSide, int aCoverID, T aCoverVariable, ICoverable aTileEntity) { + protected boolean manipulatesSidedRedstoneOutputImpl( + byte aSide, int aCoverID, T aCoverVariable, ICoverable aTileEntity) { return false; } @@ -505,7 +586,8 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { * Returns the original Redstone per default. * The Cover should @letsRedstoneGoIn or the aInputRedstone Parameter is always 0. */ - protected byte getRedstoneInputImpl(byte aSide, byte aInputRedstone, int aCoverID, T aCoverVariable, ICoverable aTileEntity) { + protected byte getRedstoneInputImpl( + byte aSide, byte aInputRedstone, int aCoverID, T aCoverVariable, ICoverable aTileEntity) { return letsRedstoneGoIn(aSide, aCoverID, aCoverVariable, aTileEntity) ? aInputRedstone : 0; } @@ -518,7 +600,6 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { return 0; } - /** * The MC Color of this Lens. -1 for no Color (meaning this isn't a Lens then). */ @@ -533,7 +614,7 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { return GT_OreDictUnificator.get(true, aTileEntity.getCoverItemAtSide(aSide)); } - //endregion + // endregion // region no data @@ -561,7 +642,8 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> { * <p/> * return true, if something actually happens. */ - public boolean onCoverRightclickClient(byte aSide, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public boolean onCoverRightclickClient( + byte aSide, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { return false; } diff --git a/src/main/java/gregtech/api/util/GT_ExoticEnergyInputHelper.java b/src/main/java/gregtech/api/util/GT_ExoticEnergyInputHelper.java index 01614a0704..76cdb13f78 100644 --- a/src/main/java/gregtech/api/util/GT_ExoticEnergyInputHelper.java +++ b/src/main/java/gregtech/api/util/GT_ExoticEnergyInputHelper.java @@ -1,75 +1,77 @@ package gregtech.api.util; +import static gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity; + import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; - import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; -import static gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity; - public class GT_ExoticEnergyInputHelper { - /** - * The Valid Types of TecTech Hatch List. - */ - private static final List<Class<? extends GT_MetaTileEntity_Hatch>> sExoticEnergyHatchType = new ArrayList<>(); + /** + * The Valid Types of TecTech Hatch List. + */ + private static final List<Class<? extends GT_MetaTileEntity_Hatch>> sExoticEnergyHatchType = new ArrayList<>(); - static { - tryRegister("com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti"); - tryRegister("com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyTunnel"); - } + static { + tryRegister("com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti"); + tryRegister("com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyTunnel"); + } - public static void register(Class<? extends GT_MetaTileEntity_Hatch> clazz) { - if (!GT_MetaTileEntity_Hatch.class.isAssignableFrom(clazz)) - throw new IllegalArgumentException(clazz.getName() + " is not a subclass of " + GT_MetaTileEntity_Hatch.class.getName()); - sExoticEnergyHatchType.add(clazz); - } + public static void register(Class<? extends GT_MetaTileEntity_Hatch> clazz) { + if (!GT_MetaTileEntity_Hatch.class.isAssignableFrom(clazz)) + throw new IllegalArgumentException( + clazz.getName() + " is not a subclass of " + GT_MetaTileEntity_Hatch.class.getName()); + sExoticEnergyHatchType.add(clazz); + } - @SuppressWarnings("unchecked") + @SuppressWarnings("unchecked") public static void tryRegister(String className) { - Class<?> clazz; - try { - clazz = Class.forName(className); - } catch (ClassNotFoundException e) { - return; - } - if (!GT_MetaTileEntity_Hatch.class.isAssignableFrom(clazz)) - throw new IllegalArgumentException(clazz.getName() + " is not a subclass of " + GT_MetaTileEntity_Hatch.class.getName()); - sExoticEnergyHatchType.add((Class<? extends GT_MetaTileEntity_Hatch>) clazz); - } + Class<?> clazz; + try { + clazz = Class.forName(className); + } catch (ClassNotFoundException e) { + return; + } + if (!GT_MetaTileEntity_Hatch.class.isAssignableFrom(clazz)) + throw new IllegalArgumentException( + clazz.getName() + " is not a subclass of " + GT_MetaTileEntity_Hatch.class.getName()); + sExoticEnergyHatchType.add((Class<? extends GT_MetaTileEntity_Hatch>) clazz); + } - public static boolean drainEnergy(long aEU, Collection<? extends GT_MetaTileEntity_Hatch> hatches) { - for (GT_MetaTileEntity_Hatch tHatch : hatches) { - long tDrain = Math.min(tHatch.getBaseMetaTileEntity().getStoredEU(), aEU); - tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(tDrain, false); - aEU -= tDrain; - } - return aEU <= 0; - } + public static boolean drainEnergy(long aEU, Collection<? extends GT_MetaTileEntity_Hatch> hatches) { + for (GT_MetaTileEntity_Hatch tHatch : hatches) { + long tDrain = Math.min(tHatch.getBaseMetaTileEntity().getStoredEU(), aEU); + tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(tDrain, false); + aEU -= tDrain; + } + return aEU <= 0; + } - public static boolean isExoticEnergyInput(IMetaTileEntity aHatch) { - for (Class<?> clazz : sExoticEnergyHatchType) { - if (clazz.isInstance(aHatch)) - return true; - } - return false; - } + public static boolean isExoticEnergyInput(IMetaTileEntity aHatch) { + for (Class<?> clazz : sExoticEnergyHatchType) { + if (clazz.isInstance(aHatch)) return true; + } + return false; + } - public static long getMaxInputVoltageMulti(Collection<? extends GT_MetaTileEntity_Hatch> hatches) { - long rVoltage = 0; - for (GT_MetaTileEntity_Hatch tHatch : hatches) - if (isValidMetaTileEntity(tHatch)) rVoltage += tHatch.getBaseMetaTileEntity().getInputVoltage(); - return rVoltage; - } + public static long getMaxInputVoltageMulti(Collection<? extends GT_MetaTileEntity_Hatch> hatches) { + long rVoltage = 0; + for (GT_MetaTileEntity_Hatch tHatch : hatches) + if (isValidMetaTileEntity(tHatch)) + rVoltage += tHatch.getBaseMetaTileEntity().getInputVoltage(); + return rVoltage; + } - public static long getMaxInputAmpsMulti(Collection<? extends GT_MetaTileEntity_Hatch> hatches) { - long rAmp = 0; - for (GT_MetaTileEntity_Hatch tHatch : hatches) - if (isValidMetaTileEntity(tHatch)) rAmp += tHatch.getBaseMetaTileEntity().getInputAmperage(); - return rAmp; - } + public static long getMaxInputAmpsMulti(Collection<? extends GT_MetaTileEntity_Hatch> hatches) { + long rAmp = 0; + for (GT_MetaTileEntity_Hatch tHatch : hatches) + if (isValidMetaTileEntity(tHatch)) + rAmp += tHatch.getBaseMetaTileEntity().getInputAmperage(); + return rAmp; + } public static List<Class<? extends GT_MetaTileEntity_Hatch>> getAllClasses() { return Collections.unmodifiableList(sExoticEnergyHatchType); diff --git a/src/main/java/gregtech/api/util/GT_FoodStat.java b/src/main/java/gregtech/api/util/GT_FoodStat.java index 87c38a8073..f9a0f50c5f 100644 --- a/src/main/java/gregtech/api/util/GT_FoodStat.java +++ b/src/main/java/gregtech/api/util/GT_FoodStat.java @@ -32,7 +32,15 @@ public class GT_FoodStat implements IFoodStat { * Level of the Effect. [0, 1, 2] are for [I, II, III] * The likelihood that this Potion Effect takes place upon being eaten [1 - 100] */ - public GT_FoodStat(int aFoodLevel, float aSaturation, EnumAction aAction, ItemStack aEmptyContainer, boolean aAlwaysEdible, boolean aInvisibleParticles, boolean aIsRotten, int... aPotionEffects) { + public GT_FoodStat( + int aFoodLevel, + float aSaturation, + EnumAction aAction, + ItemStack aEmptyContainer, + boolean aAlwaysEdible, + boolean aInvisibleParticles, + boolean aIsRotten, + int... aPotionEffects) { mFoodLevel = aFoodLevel; mSaturation = aSaturation; mAction = aAction == null ? EnumAction.eat : aAction; @@ -84,7 +92,8 @@ public class GT_FoodStat implements IFoodStat { } for (int i = 3; i < mPotionEffects.length; i += 4) { if (aPlayer.worldObj.rand.nextInt(100) < mPotionEffects[i]) { - aPlayer.addPotionEffect(new PotionEffect(mPotionEffects[i - 3], mPotionEffects[i - 2], mPotionEffects[i - 1], mInvisibleParticles)); + aPlayer.addPotionEffect(new PotionEffect( + mPotionEffects[i - 3], mPotionEffects[i - 2], mPotionEffects[i - 1], mInvisibleParticles)); } } if (mExplosive) { diff --git a/src/main/java/gregtech/api/util/GT_Forestry_Compat.java b/src/main/java/gregtech/api/util/GT_Forestry_Compat.java index c59e551373..6e73c099cb 100644 --- a/src/main/java/gregtech/api/util/GT_Forestry_Compat.java +++ b/src/main/java/gregtech/api/util/GT_Forestry_Compat.java @@ -6,44 +6,124 @@ import forestry.api.recipes.RecipeManagers; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; +import java.util.Map; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; -import java.util.Map; - public class GT_Forestry_Compat { - - public static void populateFakeNeiRecipes(){ + + public static void populateFakeNeiRecipes() { if (ItemList.FR_Bee_Drone.get(1L) != null) { - GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Bee_Drone.getWildcard(1L)}, new ItemStack[]{ItemList.FR_Bee_Drone.getWithName(1L, "Scanned Drone")}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0); + GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe( + false, + new ItemStack[] {ItemList.FR_Bee_Drone.getWildcard(1L)}, + new ItemStack[] {ItemList.FR_Bee_Drone.getWithName(1L, "Scanned Drone")}, + null, + new FluidStack[] {Materials.Honey.getFluid(100L)}, + null, + 500, + 2, + 0); } if (ItemList.FR_Bee_Princess.get(1L) != null) { - GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Bee_Princess.getWildcard(1L)}, new ItemStack[]{ItemList.FR_Bee_Princess.getWithName(1L, "Scanned Princess")}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0); + GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe( + false, + new ItemStack[] {ItemList.FR_Bee_Princess.getWildcard(1L)}, + new ItemStack[] {ItemList.FR_Bee_Princess.getWithName(1L, "Scanned Princess")}, + null, + new FluidStack[] {Materials.Honey.getFluid(100L)}, + null, + 500, + 2, + 0); } if (ItemList.FR_Bee_Queen.get(1L) != null) { - GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Bee_Queen.getWildcard(1L)}, new ItemStack[]{ItemList.FR_Bee_Queen.getWithName(1L, "Scanned Queen")}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0); + GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe( + false, + new ItemStack[] {ItemList.FR_Bee_Queen.getWildcard(1L)}, + new ItemStack[] {ItemList.FR_Bee_Queen.getWithName(1L, "Scanned Queen")}, + null, + new FluidStack[] {Materials.Honey.getFluid(100L)}, + null, + 500, + 2, + 0); } if (ItemList.FR_Tree_Sapling.get(1L) != null) { - GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Tree_Sapling.getWildcard(1L)}, new ItemStack[]{ItemList.FR_Tree_Sapling.getWithName(1L, "Scanned Sapling")}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0); + GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe( + false, + new ItemStack[] {ItemList.FR_Tree_Sapling.getWildcard(1L)}, + new ItemStack[] {ItemList.FR_Tree_Sapling.getWithName(1L, "Scanned Sapling")}, + null, + new FluidStack[] {Materials.Honey.getFluid(100L)}, + null, + 500, + 2, + 0); } if (ItemList.FR_Butterfly.get(1L) != null) { - GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Butterfly.getWildcard(1L)}, new ItemStack[]{ItemList.FR_Butterfly.getWithName(1L, "Scanned Butterfly")}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0); + GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe( + false, + new ItemStack[] {ItemList.FR_Butterfly.getWildcard(1L)}, + new ItemStack[] {ItemList.FR_Butterfly.getWithName(1L, "Scanned Butterfly")}, + null, + new FluidStack[] {Materials.Honey.getFluid(100L)}, + null, + 500, + 2, + 0); } if (ItemList.FR_Larvae.get(1L) != null) { - GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Larvae.getWildcard(1L)}, new ItemStack[]{ItemList.FR_Larvae.getWithName(1L, "Scanned Larvae")}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0); + GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe( + false, + new ItemStack[] {ItemList.FR_Larvae.getWildcard(1L)}, + new ItemStack[] {ItemList.FR_Larvae.getWithName(1L, "Scanned Larvae")}, + null, + new FluidStack[] {Materials.Honey.getFluid(100L)}, + null, + 500, + 2, + 0); } if (ItemList.FR_Serum.get(1L) != null) { - GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Serum.getWildcard(1L)}, new ItemStack[]{ItemList.FR_Serum.getWithName(1L, "Scanned Serum")}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0); + GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe( + false, + new ItemStack[] {ItemList.FR_Serum.getWildcard(1L)}, + new ItemStack[] {ItemList.FR_Serum.getWithName(1L, "Scanned Serum")}, + null, + new FluidStack[] {Materials.Honey.getFluid(100L)}, + null, + 500, + 2, + 0); } if (ItemList.FR_Caterpillar.get(1L) != null) { - GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Caterpillar.getWildcard(1L)}, new ItemStack[]{ItemList.FR_Caterpillar.getWithName(1L, "Scanned Caterpillar")}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0); + GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe( + false, + new ItemStack[] {ItemList.FR_Caterpillar.getWildcard(1L)}, + new ItemStack[] {ItemList.FR_Caterpillar.getWithName(1L, "Scanned Caterpillar")}, + null, + new FluidStack[] {Materials.Honey.getFluid(100L)}, + null, + 500, + 2, + 0); } if (ItemList.FR_PollenFertile.get(1L) != null) { - GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_PollenFertile.getWildcard(1L)}, new ItemStack[]{ItemList.FR_PollenFertile.getWithName(1L, "Scanned Pollen")}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0); + GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe( + false, + new ItemStack[] {ItemList.FR_PollenFertile.getWildcard(1L)}, + new ItemStack[] {ItemList.FR_PollenFertile.getWithName(1L, "Scanned Pollen")}, + null, + new FluidStack[] {Materials.Honey.getFluid(100L)}, + null, + 500, + 2, + 0); } } - - public static void transferCentrifugeRecipes(){ + + public static void transferCentrifugeRecipes() { try { for (ICentrifugeRecipe tRecipe : RecipeManagers.centrifugeManager.recipes()) { Map<ItemStack, Float> outputs = tRecipe.getAllProducts(); @@ -55,7 +135,8 @@ public class GT_Forestry_Compat { tOutputs[i] = entry.getKey().copy(); i++; } - GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(true, new ItemStack[]{tRecipe.getInput()}, tOutputs, null, tChances, null, null, 128, 5, 0); + GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe( + true, new ItemStack[] {tRecipe.getInput()}, tOutputs, null, tChances, null, null, 128, 5, 0); } } catch (Throwable e) { if (GT_Values.D1) { @@ -63,12 +144,22 @@ public class GT_Forestry_Compat { } } } - - public static void transferSqueezerRecipes(){ + + public static void transferSqueezerRecipes() { try { for (ISqueezerRecipe tRecipe : RecipeManagers.squeezerManager.recipes()) { if ((tRecipe.getResources().length == 1) && (tRecipe.getFluidOutput() != null)) { - GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes.addRecipe(true, new ItemStack[]{tRecipe.getResources()[0]}, new ItemStack[]{tRecipe.getRemnants()}, null, new int[]{(int) (tRecipe.getRemnantsChance() * 10000)}, null, new FluidStack[]{tRecipe.getFluidOutput()}, 32, 8, 0); + GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes.addRecipe( + true, + new ItemStack[] {tRecipe.getResources()[0]}, + new ItemStack[] {tRecipe.getRemnants()}, + null, + new int[] {(int) (tRecipe.getRemnantsChance() * 10000)}, + null, + new FluidStack[] {tRecipe.getFluidOutput()}, + 32, + 8, + 0); } } } catch (Throwable e) { diff --git a/src/main/java/gregtech/api/util/GT_GC_Compat.java b/src/main/java/gregtech/api/util/GT_GC_Compat.java index 8131e3affb..60e0e2649d 100644 --- a/src/main/java/gregtech/api/util/GT_GC_Compat.java +++ b/src/main/java/gregtech/api/util/GT_GC_Compat.java @@ -15,16 +15,20 @@ public class GT_GC_Compat { public static long insertEnergyInto(TileEntity tTileEntity, long aVoltage, ForgeDirection tDirection) { // GC Compat if (GregTech_API.mGalacticraft && tTileEntity instanceof IEnergyHandlerGC) { - if (!(tTileEntity instanceof IConnector) || ((IConnector)tTileEntity).canConnect(tDirection, NetworkType.POWER)) { + if (!(tTileEntity instanceof IConnector) + || ((IConnector) tTileEntity).canConnect(tDirection, NetworkType.POWER)) { EnergySource eSource = new EnergySourceAdjacent(tDirection); - float tSizeToReceive = aVoltage * EnergyConfigHandler.IC2_RATIO, tStored = ((IEnergyHandlerGC)tTileEntity).getEnergyStoredGC(eSource); - if (tSizeToReceive >= tStored || tSizeToReceive <= ((IEnergyHandlerGC)tTileEntity).getMaxEnergyStoredGC(eSource) - tStored) { - float tReceived = ((IEnergyHandlerGC)tTileEntity).receiveEnergyGC(eSource, tSizeToReceive, false); + float tSizeToReceive = aVoltage * EnergyConfigHandler.IC2_RATIO, + tStored = ((IEnergyHandlerGC) tTileEntity).getEnergyStoredGC(eSource); + if (tSizeToReceive >= tStored + || tSizeToReceive <= ((IEnergyHandlerGC) tTileEntity).getMaxEnergyStoredGC(eSource) - tStored) { + float tReceived = ((IEnergyHandlerGC) tTileEntity).receiveEnergyGC(eSource, tSizeToReceive, false); if (tReceived > 0) { tSizeToReceive -= tReceived; while (tSizeToReceive > 0) { - tReceived = ((IEnergyHandlerGC)tTileEntity).receiveEnergyGC(eSource, tSizeToReceive, false); + tReceived = + ((IEnergyHandlerGC) tTileEntity).receiveEnergyGC(eSource, tSizeToReceive, false); if (tReceived < 1) break; tSizeToReceive -= tReceived; } @@ -37,11 +41,12 @@ public class GT_GC_Compat { return 2; } - public static boolean canConnect(TileEntity tTileEntity,ForgeDirection tDirection){ + public static boolean canConnect(TileEntity tTileEntity, ForgeDirection tDirection) { // GC Compat - if (GregTech_API.mGalacticraft && tTileEntity instanceof IEnergyHandlerGC && (!(tTileEntity instanceof IConnector) || ((IConnector)tTileEntity).canConnect(tDirection, NetworkType.POWER))) - return true; + if (GregTech_API.mGalacticraft + && tTileEntity instanceof IEnergyHandlerGC + && (!(tTileEntity instanceof IConnector) + || ((IConnector) tTileEntity).canConnect(tDirection, NetworkType.POWER))) return true; return false; } - } diff --git a/src/main/java/gregtech/api/util/GT_HatchElementBuilder.java b/src/main/java/gregtech/api/util/GT_HatchElementBuilder.java index 35a132da68..98f4f39297 100644 --- a/src/main/java/gregtech/api/util/GT_HatchElementBuilder.java +++ b/src/main/java/gregtech/api/util/GT_HatchElementBuilder.java @@ -1,5 +1,7 @@ package gregtech.api.util; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; + import com.gtnewhorizon.structurelib.StructureLibAPI; import com.gtnewhorizon.structurelib.structure.*; import com.gtnewhorizon.structurelib.util.ItemStackPredicate; @@ -10,6 +12,9 @@ import gregtech.api.interfaces.IHatchElement; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.common.blocks.GT_Item_Machines; +import java.util.*; +import java.util.function.*; +import java.util.stream.Collectors; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; @@ -18,16 +23,8 @@ import net.minecraft.util.ChatComponentTranslation; import net.minecraft.util.IChatComponent; import net.minecraft.world.World; -import java.util.*; -import java.util.function.*; -import java.util.stream.Collectors; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; - public class GT_HatchElementBuilder<T> { - private interface Builtin { - } + private interface Builtin {} private IGT_HatchAdder<? super T> mAdder; private int mCasingIndex = -1; @@ -39,8 +36,7 @@ public class GT_HatchElementBuilder<T> { private boolean mCacheHint; private boolean mNoStop; - private GT_HatchElementBuilder() { - } + private GT_HatchElementBuilder() {} public static <T> GT_HatchElementBuilder<T> builder() { return new GT_HatchElementBuilder<>(); @@ -55,9 +51,18 @@ public class GT_HatchElementBuilder<T> { @SafeVarargs public final GT_HatchElementBuilder<T> anyOf(IHatchElement<? super T>... elements) { if (elements == null || elements.length == 0) throw new IllegalArgumentException(); - return adder(Arrays.stream(elements).map(e -> e.adder().rebrand()).reduce(IGT_HatchAdder::orElse).get()) - .hatchClasses(Arrays.stream(elements).map(IHatchElement::mteClasses).flatMap(Collection::stream).collect(Collectors.toList())) - .cacheHint(() -> Arrays.stream(elements).map(IHatchElement::name).sorted().collect(Collectors.joining(" or ", "of type ", ""))); + return adder(Arrays.stream(elements) + .map(e -> e.adder().rebrand()) + .reduce(IGT_HatchAdder::orElse) + .get()) + .hatchClasses(Arrays.stream(elements) + .map(IHatchElement::mteClasses) + .flatMap(Collection::stream) + .collect(Collectors.toList())) + .cacheHint(() -> Arrays.stream(elements) + .map(IHatchElement::name) + .sorted() + .collect(Collectors.joining(" or ", "of type ", ""))); } /** @@ -69,7 +74,8 @@ public class GT_HatchElementBuilder<T> { @SafeVarargs public final GT_HatchElementBuilder<T> atLeast(IHatchElement<? super T>... elements) { if (elements == null || elements.length == 0) throw new IllegalArgumentException(); - return atLeast(Arrays.stream(elements).collect(Collectors.groupingBy(Function.identity(), LinkedHashMap::new, Collectors.counting()))); + return atLeast(Arrays.stream(elements) + .collect(Collectors.groupingBy(Function.identity(), LinkedHashMap::new, Collectors.counting()))); } /** @@ -80,7 +86,8 @@ public class GT_HatchElementBuilder<T> { */ public final GT_HatchElementBuilder<T> atLeastList(List<IHatchElement<? super T>> elements) { if (elements == null || elements.isEmpty()) throw new IllegalArgumentException(); - return atLeast(elements.stream().collect(Collectors.groupingBy(Function.identity(), LinkedHashMap::new, Collectors.counting()))); + return atLeast(elements.stream() + .collect(Collectors.groupingBy(Function.identity(), LinkedHashMap::new, Collectors.counting()))); } /** @@ -90,20 +97,32 @@ public class GT_HatchElementBuilder<T> { public final GT_HatchElementBuilder<T> atLeast(Map<IHatchElement<? super T>, ? extends Number> elements) { if (elements == null || elements.isEmpty() || elements.containsKey(null) || elements.containsValue(null)) throw new IllegalArgumentException(); - List<Class<? extends IMetaTileEntity>> list = elements.keySet().stream().map(IHatchElement::mteClasses).flatMap(Collection::stream).collect(Collectors.toList()); + List<Class<? extends IMetaTileEntity>> list = elements.keySet().stream() + .map(IHatchElement::mteClasses) + .flatMap(Collection::stream) + .collect(Collectors.toList()); // map cannot be null or empty, so assert Optional isPresent - return adder(elements.keySet().stream().map(e -> e.adder().rebrand()).reduce(IGT_HatchAdder::orElse).orElseThrow(AssertionError::new)) - .hatchItemFilter(obj -> GT_StructureUtility.filterByMTEClass(elements.entrySet().stream() - .filter(entry -> entry.getKey().count(obj) < entry.getValue().longValue()) - .flatMap(entry -> entry.getKey().mteClasses().stream()) - .collect(Collectors.toList()))) - .shouldReject(obj -> elements.entrySet().stream().allMatch(e-> e.getKey().count(obj) >= e.getValue().longValue())) - .shouldSkip((BiPredicate<? super T, ? super IGregTechTileEntity> & Builtin) (c, t) -> t != null && list.stream().anyMatch(clazz -> clazz.isInstance(t.getMetaTileEntity()))) - .cacheHint(() -> elements.keySet().stream().map(IHatchElement::name).sorted().collect(Collectors.joining(" or ", "of type ", ""))); + return adder(elements.keySet().stream() + .map(e -> e.adder().rebrand()) + .reduce(IGT_HatchAdder::orElse) + .orElseThrow(AssertionError::new)) + .hatchItemFilter(obj -> GT_StructureUtility.filterByMTEClass(elements.entrySet().stream() + .filter(entry -> + entry.getKey().count(obj) < entry.getValue().longValue()) + .flatMap(entry -> entry.getKey().mteClasses().stream()) + .collect(Collectors.toList()))) + .shouldReject(obj -> elements.entrySet().stream() + .allMatch(e -> e.getKey().count(obj) >= e.getValue().longValue())) + .shouldSkip((BiPredicate<? super T, ? super IGregTechTileEntity> & Builtin) + (c, t) -> t != null && list.stream().anyMatch(clazz -> clazz.isInstance(t.getMetaTileEntity()))) + .cacheHint(() -> elements.keySet().stream() + .map(IHatchElement::name) + .sorted() + .collect(Collectors.joining(" or ", "of type ", ""))); } - //endregion + // endregion - //region primitives + // region primitives public GT_HatchElementBuilder<T> adder(IGT_HatchAdder<? super T> aAdder) { if (aAdder == null) throw new IllegalArgumentException(); @@ -132,9 +151,10 @@ public class GT_HatchElementBuilder<T> { return this; } - // avoid loooooong lines like - // shouldSkip((BiPredicate<.....> & Builtin) (c, t) -> ....) - // private <P extends BiPredicate<? super T, ? super IGregTechTileEntity> & Builtin> GT_HatchElementBuilder<T> shouldSkipInternal(P aShouldSkip) { + // avoid loooooong lines like + // shouldSkip((BiPredicate<.....> & Builtin) (c, t) -> ....) + // private <P extends BiPredicate<? super T, ? super IGregTechTileEntity> & Builtin> GT_HatchElementBuilder<T> + // shouldSkipInternal(P aShouldSkip) { // if (mShouldSkip == null) mShouldSkip = aShouldSkip; // return this; // } @@ -146,26 +166,30 @@ public class GT_HatchElementBuilder<T> { return this; } - public GT_HatchElementBuilder<T> hatchItemFilter(Function<? super T, ? extends Predicate<ItemStack>> aHatchItemFilter) { + public GT_HatchElementBuilder<T> hatchItemFilter( + Function<? super T, ? extends Predicate<ItemStack>> aHatchItemFilter) { if (aHatchItemFilter == null) throw new IllegalArgumentException(); mHatchItemFilter = (t, s) -> aHatchItemFilter.apply(t); return this; } - public GT_HatchElementBuilder<T> hatchItemFilterAnd(Function<? super T, ? extends Predicate<ItemStack>> aHatchItemFilter) { + public GT_HatchElementBuilder<T> hatchItemFilterAnd( + Function<? super T, ? extends Predicate<ItemStack>> aHatchItemFilter) { if (aHatchItemFilter == null) throw new IllegalArgumentException(); BiFunction<? super T, ItemStack, ? extends Predicate<ItemStack>> tOldFilter = mHatchItemFilter; mHatchItemFilter = (t, s) -> tOldFilter.apply(t, s).and(aHatchItemFilter.apply(t)); return this; } - public GT_HatchElementBuilder<T> hatchItemFilter(BiFunction<? super T, ItemStack, ? extends Predicate<ItemStack>> aHatchItemFilter) { + public GT_HatchElementBuilder<T> hatchItemFilter( + BiFunction<? super T, ItemStack, ? extends Predicate<ItemStack>> aHatchItemFilter) { if (aHatchItemFilter == null) throw new IllegalArgumentException(); mHatchItemFilter = aHatchItemFilter; return this; } - public GT_HatchElementBuilder<T> hatchItemFilterAnd(BiFunction<? super T, ItemStack, ? extends Predicate<ItemStack>> aHatchItemFilter) { + public GT_HatchElementBuilder<T> hatchItemFilterAnd( + BiFunction<? super T, ItemStack, ? extends Predicate<ItemStack>> aHatchItemFilter) { if (aHatchItemFilter == null) throw new IllegalArgumentException(); BiFunction<? super T, ItemStack, ? extends Predicate<ItemStack>> tOldFilter = mHatchItemFilter; mHatchItemFilter = (t, s) -> tOldFilter.apply(t, s).and(aHatchItemFilter.apply(t, s)); @@ -208,8 +232,9 @@ public class GT_HatchElementBuilder<T> { // region intermediate public GT_HatchElementBuilder<T> hatchClass(Class<? extends IMetaTileEntity> clazz) { return hatchItemFilter(c -> is -> clazz.isInstance(GT_Item_Machines.getMetaTileEntity(is))) - .cacheHint(() -> "of class " + clazz.getSimpleName()) - .shouldSkip((BiPredicate<? super T, ? super IGregTechTileEntity> & Builtin) (c, t) -> clazz.isInstance(t.getMetaTileEntity())); + .cacheHint(() -> "of class " + clazz.getSimpleName()) + .shouldSkip((BiPredicate<? super T, ? super IGregTechTileEntity> & Builtin) + (c, t) -> clazz.isInstance(t.getMetaTileEntity())); } @SafeVarargs @@ -220,26 +245,39 @@ public class GT_HatchElementBuilder<T> { public final GT_HatchElementBuilder<T> hatchClasses(List<? extends Class<? extends IMetaTileEntity>> classes) { List<? extends Class<? extends IMetaTileEntity>> list = new ArrayList<>(classes); return hatchItemFilter(obj -> GT_StructureUtility.filterByMTEClass(list)) - .cacheHint(() -> list.stream().map(Class::getSimpleName).sorted().collect(Collectors.joining(" or ", "of class ", ""))) - .shouldSkip((BiPredicate<? super T, ? super IGregTechTileEntity> & Builtin) (c, t) -> t != null && list.stream().anyMatch(clazz -> clazz.isInstance(t.getMetaTileEntity()))); + .cacheHint(() -> list.stream() + .map(Class::getSimpleName) + .sorted() + .collect(Collectors.joining(" or ", "of class ", ""))) + .shouldSkip((BiPredicate<? super T, ? super IGregTechTileEntity> & Builtin) (c, t) -> + t != null && list.stream().anyMatch(clazz -> clazz.isInstance(t.getMetaTileEntity()))); } public GT_HatchElementBuilder<T> hatchId(int aId) { - return hatchItemFilter(c -> is -> GT_Utility.isStackValid(is) && is.getItem() instanceof GT_Item_Machines && is.getItemDamage() == aId) - .cacheHint(() -> "of id " + aId) - .shouldSkip((BiPredicate<? super T, ? super IGregTechTileEntity> & Builtin) (c, t) -> t != null && t.getMetaTileID() == aId); + return hatchItemFilter(c -> is -> GT_Utility.isStackValid(is) + && is.getItem() instanceof GT_Item_Machines + && is.getItemDamage() == aId) + .cacheHint(() -> "of id " + aId) + .shouldSkip((BiPredicate<? super T, ? super IGregTechTileEntity> & Builtin) + (c, t) -> t != null && t.getMetaTileID() == aId); } public GT_HatchElementBuilder<T> hatchIds(int... aIds) { if (aIds == null || aIds.length == 0) throw new IllegalArgumentException(); if (aIds.length == 1) return hatchId(aIds[0]); TIntCollection coll = aIds.length < 16 ? new TIntArrayList(aIds) : new TIntHashSet(aIds); - return hatchItemFilter(c -> is -> GT_Utility.isStackValid(is) && is.getItem() instanceof GT_Item_Machines && coll.contains(is.getItemDamage())) - .cacheHint(() -> Arrays.stream(coll.toArray()).sorted().mapToObj(String::valueOf).collect(Collectors.joining(" or ", "of id ", ""))) - .shouldSkip((BiPredicate<? super T, ? super IGregTechTileEntity> & Builtin) (c, t) -> t != null && coll.contains(t.getMetaTileID())); + return hatchItemFilter(c -> is -> GT_Utility.isStackValid(is) + && is.getItem() instanceof GT_Item_Machines + && coll.contains(is.getItemDamage())) + .cacheHint(() -> Arrays.stream(coll.toArray()) + .sorted() + .mapToObj(String::valueOf) + .collect(Collectors.joining(" or ", "of id ", ""))) + .shouldSkip((BiPredicate<? super T, ? super IGregTechTileEntity> & Builtin) + (c, t) -> t != null && coll.contains(t.getMetaTileID())); } - //endregion + // endregion @SuppressWarnings("unchecked") @SafeVarargs @@ -265,7 +303,8 @@ public class GT_HatchElementBuilder<T> { @Override public boolean check(T t, World world, int x, int y, int z) { TileEntity tileEntity = world.getTileEntity(x, y, z); - return tileEntity instanceof IGregTechTileEntity && mAdder.apply(t, (IGregTechTileEntity) tileEntity, (short) mCasingIndex); + return tileEntity instanceof IGregTechTileEntity + && mAdder.apply(t, (IGregTechTileEntity) tileEntity, (short) mCasingIndex); } @Override @@ -281,7 +320,8 @@ public class GT_HatchElementBuilder<T> { @Override public boolean check(T t, World world, int x, int y, int z) { TileEntity tileEntity = world.getTileEntity(x, y, z); - return tileEntity instanceof IGregTechTileEntity && mAdder.apply(t, (IGregTechTileEntity) tileEntity, (short) mCasingIndex); + return tileEntity instanceof IGregTechTileEntity + && mAdder.apply(t, (IGregTechTileEntity) tileEntity, (short) mCasingIndex); } @Override @@ -312,14 +352,22 @@ public class GT_HatchElementBuilder<T> { } @Override - public PlaceResult survivalPlaceBlock(T t, World world, int x, int y, int z, ItemStack trigger, IItemSource s, EntityPlayerMP actor, Consumer<IChatComponent> chatter) { + public PlaceResult survivalPlaceBlock( + T t, + World world, + int x, + int y, + int z, + ItemStack trigger, + IItemSource s, + EntityPlayerMP actor, + Consumer<IChatComponent> chatter) { if (mShouldSkip != null) { TileEntity tileEntity = world.getTileEntity(x, y, z); - if (tileEntity instanceof IGregTechTileEntity && mShouldSkip.test(t, (IGregTechTileEntity) tileEntity)) - return PlaceResult.SKIP; + if (tileEntity instanceof IGregTechTileEntity + && mShouldSkip.test(t, (IGregTechTileEntity) tileEntity)) return PlaceResult.SKIP; } - if (!StructureLibAPI.isBlockTriviallyReplaceable(world, x, y, z, actor)) - return PlaceResult.REJECT; + if (!StructureLibAPI.isBlockTriviallyReplaceable(world, x, y, z, actor)) return PlaceResult.REJECT; if (mReject != null && mReject.test(t)) return PlaceResult.REJECT; ItemStack taken = s.takeOne(mHatchItemFilter.apply(t, trigger), true); if (GT_Utility.isStackInvalid(taken)) { @@ -327,7 +375,11 @@ public class GT_HatchElementBuilder<T> { chatter.accept(new ChatComponentTranslation("GT5U.autoplace.error.no_hatch", type)); return PlaceResult.REJECT; } - return StructureUtility.survivalPlaceBlock(taken, ItemStackPredicate.NBTMode.IGNORE, null, true, world, x, y, z, s, actor) == PlaceResult.ACCEPT ? (mNoStop ? PlaceResult.ACCEPT : PlaceResult.ACCEPT_STOP) : PlaceResult.REJECT; + return StructureUtility.survivalPlaceBlock( + taken, ItemStackPredicate.NBTMode.IGNORE, null, true, world, x, y, z, s, actor) + == PlaceResult.ACCEPT + ? (mNoStop ? PlaceResult.ACCEPT : PlaceResult.ACCEPT_STOP) + : PlaceResult.REJECT; } }; } diff --git a/src/main/java/gregtech/api/util/GT_ItsNotMyFaultException.java b/src/main/java/gregtech/api/util/GT_ItsNotMyFaultException.java index f742be20cb..174b4618e8 100644 --- a/src/main/java/gregtech/api/util/GT_ItsNotMyFaultException.java +++ b/src/main/java/gregtech/api/util/GT_ItsNotMyFaultException.java @@ -11,6 +11,7 @@ public class GT_ItsNotMyFaultException extends RuntimeException { @Override public String toString() { - return "The GregTech-Addon has a Problem.\nIT'S NOT MY FAULT!!! Below is how to fix it.\n" + mError + "\nDO NOT COME TO ME WITH THIS CRASH. YOU CAUSED IT YOURSELF, AND I TOLD YOU HOW TO FIX IT!!!"; + return "The GregTech-Addon has a Problem.\nIT'S NOT MY FAULT!!! Below is how to fix it.\n" + mError + + "\nDO NOT COME TO ME WITH THIS CRASH. YOU CAUSED IT YOURSELF, AND I TOLD YOU HOW TO FIX IT!!!"; } } diff --git a/src/main/java/gregtech/api/util/GT_LanguageManager.java b/src/main/java/gregtech/api/util/GT_LanguageManager.java index d6cd1553eb..50d0deeee7 100644 --- a/src/main/java/gregtech/api/util/GT_LanguageManager.java +++ b/src/main/java/gregtech/api/util/GT_LanguageManager.java @@ -1,57 +1,57 @@ package gregtech.api.util; +import static gregtech.api.enums.GT_Values.E; + import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.relauncher.ReflectionHelper; import gregtech.api.GregTech_API; - +import java.lang.reflect.Field; +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.StatCollector; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.config.Property; -import java.lang.reflect.Field; -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; - -import static gregtech.api.enums.GT_Values.E; - public class GT_LanguageManager { - public static final HashMap<String, String> TEMPMAP = new HashMap<>(), BUFFERMAP = new HashMap<>(), LANGMAP = new HashMap<>(); + public static final HashMap<String, String> TEMPMAP = new HashMap<>(), + BUFFERMAP = new HashMap<>(), + LANGMAP = new HashMap<>(); public static Configuration sEnglishFile; - public static String sLanguage = "en_US"; + public static String sLanguage = "en_US"; public static boolean sUseEnglishFile = false; public static boolean i18nPlaceholder = true; - public static String - FACE_ANY = "gt.lang.face.any", - FACE_BOTTOM = "gt.lang.face.bottom", - FACE_TOP = "gt.lang.face.top", - FACE_LEFT = "gt.lang.face.left", - FACE_FRONT = "gt.lang.face.front", - FACE_RIGHT = "gt.lang.face.right", - FACE_BACK = "gt.lang.face.back", - FACE_NONE = "gt.lang.face.none"; + public static String FACE_ANY = "gt.lang.face.any", + FACE_BOTTOM = "gt.lang.face.bottom", + FACE_TOP = "gt.lang.face.top", + FACE_LEFT = "gt.lang.face.left", + FACE_FRONT = "gt.lang.face.front", + FACE_RIGHT = "gt.lang.face.right", + FACE_BACK = "gt.lang.face.back", + FACE_NONE = "gt.lang.face.none"; - public static String[] - FACES = {FACE_BOTTOM, FACE_TOP, FACE_LEFT, FACE_FRONT, FACE_RIGHT, FACE_BACK, FACE_NONE}; + public static String[] FACES = {FACE_BOTTOM, FACE_TOP, FACE_LEFT, FACE_FRONT, FACE_RIGHT, FACE_BACK, FACE_NONE}; private static Map<String, String> stringTranslateLanguageList = null; static { try { - Field fieldStringTranslateLanguageList = ReflectionHelper.findField(net.minecraft.util.StringTranslate.class, "languageList", "field_74816_c"); - Field fieldStringTranslateInstance = ReflectionHelper.findField(net.minecraft.util.StringTranslate.class, "instance", "field_74817_a"); + Field fieldStringTranslateLanguageList = ReflectionHelper.findField( + net.minecraft.util.StringTranslate.class, "languageList", "field_74816_c"); + Field fieldStringTranslateInstance = + ReflectionHelper.findField(net.minecraft.util.StringTranslate.class, "instance", "field_74817_a"); //noinspection unchecked - stringTranslateLanguageList = (Map<String, String>) fieldStringTranslateLanguageList.get(fieldStringTranslateInstance.get(null)); + stringTranslateLanguageList = + (Map<String, String>) fieldStringTranslateLanguageList.get(fieldStringTranslateInstance.get(null)); } catch (Exception e) { e.printStackTrace(); } } - - public static String addStringLocalization(String aKey, String aEnglish) { + public static String addStringLocalization(String aKey, String aEnglish) { return addStringLocalization(aKey, aEnglish, true); } @@ -67,7 +67,7 @@ public class GT_LanguageManager { TEMPMAP.put(aKey.trim(), aEnglish); LanguageRegistry.instance().injectLanguage(sLanguage, TEMPMAP); TEMPMAP.clear(); - if(sUseEnglishFile && !aWriteIntoLangFile){ + if (sUseEnglishFile && !aWriteIntoLangFile) { if (!LANGMAP.containsKey(aKey)) { Property tProperty = sEnglishFile.get("LanguageFile", aKey, aEnglish); aEnglish = tProperty.getString(); @@ -92,7 +92,9 @@ public class GT_LanguageManager { } Property tProperty = sEnglishFile.get("LanguageFile", aKey.trim(), aEnglish); if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) sEnglishFile.save(); - if (sEnglishFile.get("EnableLangFile", "UseThisFileAsLanguageFile", false).getBoolean(false)){ + if (sEnglishFile + .get("EnableLangFile", "UseThisFileAsLanguageFile", false) + .getBoolean(false)) { aEnglish = tProperty.getString(); sUseEnglishFile = true; } @@ -104,9 +106,9 @@ public class GT_LanguageManager { if (aKey == null) return E; String tTrimmedKey = aKey.trim(), rTranslation; if (sUseEnglishFile) { - rTranslation = LanguageRegistry.instance().getStringLocalization(tTrimmedKey); + rTranslation = LanguageRegistry.instance().getStringLocalization(tTrimmedKey); } else { - rTranslation = StatCollector.translateToLocal(tTrimmedKey); + rTranslation = StatCollector.translateToLocal(tTrimmedKey); } if (GT_Utility.isStringInvalid(rTranslation)) { rTranslation = StatCollector.translateToLocal(tTrimmedKey); @@ -151,235 +153,240 @@ public class GT_LanguageManager { return aStack.getUnlocalizedName() + ".name"; } - public static void writePlaceholderStrings(){ - addStringLocalization("Interaction_DESCRIPTION_Index_001", "Puts out into adjacent Slot #"); - addStringLocalization("Interaction_DESCRIPTION_Index_002", "Grabs in for own Slot #"); - addStringLocalization("Interaction_DESCRIPTION_Index_003", "Normal"); - addStringLocalization("Interaction_DESCRIPTION_Index_004", "Inverted"); - addStringLocalization("Interaction_DESCRIPTION_Index_005", "No Work at all"); - addStringLocalization("Interaction_DESCRIPTION_Index_006", "Export"); - addStringLocalization("Interaction_DESCRIPTION_Index_007", "Import"); - addStringLocalization("Interaction_DESCRIPTION_Index_008", "Export (conditional)"); - addStringLocalization("Interaction_DESCRIPTION_Index_009", "Import (conditional)"); - addStringLocalization("Interaction_DESCRIPTION_Index_010", "Export (invert cond)"); - addStringLocalization("Interaction_DESCRIPTION_Index_011", "Import (invert cond)"); - addStringLocalization("Interaction_DESCRIPTION_Index_012", "Export allow Input"); - addStringLocalization("Interaction_DESCRIPTION_Index_013", "Import allow Output"); - addStringLocalization("Interaction_DESCRIPTION_Index_014", "Export allow Input (conditional)"); - addStringLocalization("Interaction_DESCRIPTION_Index_015", "Import allow Output (conditional)"); - addStringLocalization("Interaction_DESCRIPTION_Index_016", "Export allow Input (invert cond)"); - addStringLocalization("Interaction_DESCRIPTION_Index_017", "Import allow Output (invert cond)"); - addStringLocalization("Interaction_DESCRIPTION_Index_018", "Normal"); - addStringLocalization("Interaction_DESCRIPTION_Index_019", "Inverted"); - addStringLocalization("Interaction_DESCRIPTION_Index_020", "Ready to work"); - addStringLocalization("Interaction_DESCRIPTION_Index_021", "Not ready to work"); - addStringLocalization("Interaction_DESCRIPTION_Index_022", "Import"); - addStringLocalization("Interaction_DESCRIPTION_Index_023", "Import (conditional)"); - addStringLocalization("Interaction_DESCRIPTION_Index_024", "Import (invert cond)"); - addStringLocalization("Interaction_DESCRIPTION_Index_025", "Keep Liquids Away"); - addStringLocalization("Interaction_DESCRIPTION_Index_026", "Keep Liquids Away (conditional)"); - addStringLocalization("Interaction_DESCRIPTION_Index_027", "Keep Liquids Away (invert cond)"); - addStringLocalization("Interaction_DESCRIPTION_Index_028", "Allow"); - addStringLocalization("Interaction_DESCRIPTION_Index_029", "Allow (conditional)"); - addStringLocalization("Interaction_DESCRIPTION_Index_030", "Disallow (conditional)"); - addStringLocalization("Interaction_DESCRIPTION_Index_031", "Normal Universal Storage"); - addStringLocalization("Interaction_DESCRIPTION_Index_032", "Inverted Universal Storage"); - addStringLocalization("Interaction_DESCRIPTION_Index_033", "Normal Electricity Storage"); - addStringLocalization("Interaction_DESCRIPTION_Index_034", "Inverted Electricity Storage"); - addStringLocalization("Interaction_DESCRIPTION_Index_035", "Normal Steam Storage"); - addStringLocalization("Interaction_DESCRIPTION_Index_036", "Inverted Steam Storage"); - addStringLocalization("Interaction_DESCRIPTION_Index_037", "Normal Average Electric Input"); - addStringLocalization("Interaction_DESCRIPTION_Index_038", "Inverted Average Electric Input"); - addStringLocalization("Interaction_DESCRIPTION_Index_039", "Normal Average Electric Output"); - addStringLocalization("Interaction_DESCRIPTION_Index_040", "Inverted Average Electric Output"); - addStringLocalization("Interaction_DESCRIPTION_Index_041", "Normal Electricity Storage(Including Batteries)"); - addStringLocalization("Interaction_DESCRIPTION_Index_042", "Inverted Electricity Storage(Including Batteries)"); - addStringLocalization("Interaction_DESCRIPTION_Index_043", "Allow input, no output"); - addStringLocalization("Interaction_DESCRIPTION_Index_044", "Deny input, no output"); - addStringLocalization("Interaction_DESCRIPTION_Index_045", "Allow input, permit any output"); - addStringLocalization("Interaction_DESCRIPTION_Index_046", "Deny input, permit any output"); - addStringLocalization("Interaction_DESCRIPTION_Index_047", "Filter Fluid: "); - addStringLocalization("Interaction_DESCRIPTION_Index_048", "Pump speed: "); - addStringLocalization("Interaction_DESCRIPTION_Index_049", "L/tick "); - addStringLocalization("Interaction_DESCRIPTION_Index_050", "L/sec"); - addStringLocalization("Interaction_DESCRIPTION_Index_051", "Normal"); - addStringLocalization("Interaction_DESCRIPTION_Index_052", "Inverted"); - addStringLocalization("Interaction_DESCRIPTION_Index_053", "Slot: "); - addStringLocalization("Interaction_DESCRIPTION_Index_054", "Inverted"); - addStringLocalization("Interaction_DESCRIPTION_Index_055", "Normal"); - addStringLocalization("Interaction_DESCRIPTION_Index_056", "Emit if 1 Maintenance Needed"); - addStringLocalization("Interaction_DESCRIPTION_Index_057", "Emit if 1 Maintenance Needed(inverted)"); - addStringLocalization("Interaction_DESCRIPTION_Index_058", "Emit if 2 Maintenance Needed"); - addStringLocalization("Interaction_DESCRIPTION_Index_059", "Emit if 2 Maintenance Needed(inverted)"); - addStringLocalization("Interaction_DESCRIPTION_Index_060", "Emit if 3 Maintenance Needed"); - addStringLocalization("Interaction_DESCRIPTION_Index_061", "Emit if 3 Maintenance Needed(inverted)"); - addStringLocalization("Interaction_DESCRIPTION_Index_062", "Emit if 4 Maintenance Needed"); - addStringLocalization("Interaction_DESCRIPTION_Index_063", "Emit if 4 Maintenance Needed(inverted)"); - addStringLocalization("Interaction_DESCRIPTION_Index_064", "Emit if 5 Maintenance Needed"); - addStringLocalization("Interaction_DESCRIPTION_Index_065", "Emit if 5 Maintenance Needed(inverted)"); - addStringLocalization("Interaction_DESCRIPTION_Index_066", "Emit if rotor needs maintenance"); - addStringLocalization("Interaction_DESCRIPTION_Index_067", "Emit if rotor needs maintenance(inverted)"); - addStringLocalization("Interaction_DESCRIPTION_Index_068", "Emit if any Player is close"); - addStringLocalization("Interaction_DESCRIPTION_Index_069", "Emit if other player is close"); - addStringLocalization("Interaction_DESCRIPTION_Index_070", "Emit if you are close"); - addStringLocalization("Interaction_DESCRIPTION_Index_071", "Conducts strongest Input"); - addStringLocalization("Interaction_DESCRIPTION_Index_072", "Conducts from bottom Input"); - addStringLocalization("Interaction_DESCRIPTION_Index_073", "Conducts from top Input"); - addStringLocalization("Interaction_DESCRIPTION_Index_074", "Conducts from north Input"); - addStringLocalization("Interaction_DESCRIPTION_Index_075", "Conducts from south Input"); - addStringLocalization("Interaction_DESCRIPTION_Index_076", "Conducts from west Input"); - addStringLocalization("Interaction_DESCRIPTION_Index_077", "Conducts from east Input"); - addStringLocalization("Interaction_DESCRIPTION_Index_078", "Signal = "); - addStringLocalization("Interaction_DESCRIPTION_Index_079", "Conditional Signal = "); - addStringLocalization("Interaction_DESCRIPTION_Index_080", "Inverted Conditional Signal = "); - addStringLocalization("Interaction_DESCRIPTION_Index_081", "Frequency: "); - addStringLocalization("Interaction_DESCRIPTION_Index_082", "Open if work enabled"); - addStringLocalization("Interaction_DESCRIPTION_Index_083", "Open if work disabled"); - addStringLocalization("Interaction_DESCRIPTION_Index_084", "Only Output allowed"); - addStringLocalization("Interaction_DESCRIPTION_Index_085", "Only Input allowed"); - addStringLocalization("Interaction_DESCRIPTION_Index_086", "Auto-Input: "); - addStringLocalization("Interaction_DESCRIPTION_Index_087", "Disabled"); - addStringLocalization("Interaction_DESCRIPTION_Index_088", "Enabled"); - addStringLocalization("Interaction_DESCRIPTION_Index_089", " Auto-Output: "); - addStringLocalization("Interaction_DESCRIPTION_Index_090", "Machine Processing: "); - addStringLocalization("Interaction_DESCRIPTION_Index_091", "Redstone Output at Side "); - addStringLocalization("Interaction_DESCRIPTION_Index_092", " set to: "); - addStringLocalization("Interaction_DESCRIPTION_Index_093", "Strong"); - addStringLocalization("Interaction_DESCRIPTION_Index_094", "Weak"); - addStringLocalization("Interaction_DESCRIPTION_Index_095", "Input from Output Side allowed"); - addStringLocalization("Interaction_DESCRIPTION_Index_096", "Input from Output Side forbidden"); - addStringLocalization("Interaction_DESCRIPTION_Index_097", "It's dangerous to go alone! Take this."); - addStringLocalization("Interaction_DESCRIPTION_Index_098", "Do not regulate Item Stack Size"); - addStringLocalization("Interaction_DESCRIPTION_Index_099", "Regulate Item Stack Size to: "); - addStringLocalization("Interaction_DESCRIPTION_Index_100", "This is ");//Spartaaaaaaa!!! - addStringLocalization("Interaction_DESCRIPTION_Index_101", " Ore."); - addStringLocalization("Interaction_DESCRIPTION_Index_102", "There is Lava behind this Rock."); - addStringLocalization("Interaction_DESCRIPTION_Index_103", "There is a Liquid behind this Rock."); - addStringLocalization("Interaction_DESCRIPTION_Index_104", "There is an Air Pocket behind this Rock."); - addStringLocalization("Interaction_DESCRIPTION_Index_105", "Material is changing behind this Rock."); - addStringLocalization("Interaction_DESCRIPTION_Index_106", "Found traces of "); - addStringLocalization("Interaction_DESCRIPTION_Index_107", "No Ores found."); - addStringLocalization("Interaction_DESCRIPTION_Index_108", "Outputs Liquids, Steam and Items"); - addStringLocalization("Interaction_DESCRIPTION_Index_109", "Outputs Steam and Items"); - addStringLocalization("Interaction_DESCRIPTION_Index_110", "Outputs Steam and Liquids"); - addStringLocalization("Interaction_DESCRIPTION_Index_111", "Outputs Steam"); - addStringLocalization("Interaction_DESCRIPTION_Index_112", "Outputs Liquids and Items"); - addStringLocalization("Interaction_DESCRIPTION_Index_113", "Outputs only Items"); - addStringLocalization("Interaction_DESCRIPTION_Index_114", "Outputs only Liquids"); - addStringLocalization("Interaction_DESCRIPTION_Index_115", "Outputs nothing"); - addStringLocalization("Interaction_DESCRIPTION_Index_116", "Emit Energy to Outputside"); - addStringLocalization("Interaction_DESCRIPTION_Index_117", "Don't emit Energy"); - addStringLocalization("Interaction_DESCRIPTION_Index_118", "Emit Redstone if no Slot is free"); - addStringLocalization("Interaction_DESCRIPTION_Index_119", "Don't emit Redstone"); - addStringLocalization("Interaction_DESCRIPTION_Index_120", "Invert Redstone"); - addStringLocalization("Interaction_DESCRIPTION_Index_121", "Don't invert Redstone"); - addStringLocalization("Interaction_DESCRIPTION_Index_122", "Emit Redstone if slots contain something"); - addStringLocalization("Interaction_DESCRIPTION_Index_123", "Don't emit Redstone"); - addStringLocalization("Interaction_DESCRIPTION_Index_124", "Invert Filter"); - addStringLocalization("Interaction_DESCRIPTION_Index_125", "Don't invert Filter"); - addStringLocalization("Interaction_DESCRIPTION_Index_126", "Ignore NBT"); - addStringLocalization("Interaction_DESCRIPTION_Index_127", "NBT has to match"); - addStringLocalization("Interaction_DESCRIPTION_Index_128", "Redstone "); - addStringLocalization("Interaction_DESCRIPTION_Index_129", "Energy "); - addStringLocalization("Interaction_DESCRIPTION_Index_130", "Fluids "); - addStringLocalization("Interaction_DESCRIPTION_Index_131", "Items "); - addStringLocalization("Interaction_DESCRIPTION_Index_132", "Pipe is loose."); - addStringLocalization("Interaction_DESCRIPTION_Index_133", "Screws are loose."); - addStringLocalization("Interaction_DESCRIPTION_Index_134", "Something is stuck."); - addStringLocalization("Interaction_DESCRIPTION_Index_135", "Platings are dented."); - addStringLocalization("Interaction_DESCRIPTION_Index_136", "Circuitry burned out."); - addStringLocalization("Interaction_DESCRIPTION_Index_137", "That doesn't belong there."); - addStringLocalization("Interaction_DESCRIPTION_Index_138", "Incomplete Structure."); - addStringLocalization("Interaction_DESCRIPTION_Index_139", "Hit with Soft Hammer"); - addStringLocalization("Interaction_DESCRIPTION_Index_140", "to (re-)start the Machine"); - addStringLocalization("Interaction_DESCRIPTION_Index_141", "if it doesn't start."); - addStringLocalization("Interaction_DESCRIPTION_Index_142", "Running perfectly."); - addStringLocalization("Interaction_DESCRIPTION_Index_143", "Missing Mining Pipe"); - addStringLocalization("Interaction_DESCRIPTION_Index_144", "Missing Turbine Rotor"); - addStringLocalization("Interaction_DESCRIPTION_Index_145", "Step Down, In: "); - addStringLocalization("Interaction_DESCRIPTION_Index_146", "Step Up, In: "); - addStringLocalization("Interaction_DESCRIPTION_Index_147", "Amp, Out: "); - addStringLocalization("Interaction_DESCRIPTION_Index_148", " V at "); - addStringLocalization("Interaction_DESCRIPTION_Index_149", " Amp"); - addStringLocalization("Interaction_DESCRIPTION_Index_150", "Chance: "); - addStringLocalization("Interaction_DESCRIPTION_Index_151", "Does not get consumed in the process"); - addStringLocalization("Interaction_DESCRIPTION_Index_152", "Total: "); - addStringLocalization("Interaction_DESCRIPTION_Index_153", "Usage: "); - addStringLocalization("Interaction_DESCRIPTION_Index_154", "Voltage: "); - addStringLocalization("Interaction_DESCRIPTION_Index_155", "Amperage: "); - addStringLocalization("Interaction_DESCRIPTION_Index_156", "Voltage: unspecified"); - addStringLocalization("Interaction_DESCRIPTION_Index_157", "Amperage: unspecified"); - addStringLocalization("Interaction_DESCRIPTION_Index_158", "Time: "); - addStringLocalization("Interaction_DESCRIPTION_Index_159", "Needs Low Gravity"); - addStringLocalization("Interaction_DESCRIPTION_Index_160", "Needs Cleanroom"); - addStringLocalization("Interaction_DESCRIPTION_Index_161", " secs"); - addStringLocalization("Interaction_DESCRIPTION_Index_162", "Name: "); - addStringLocalization("Interaction_DESCRIPTION_Index_163", " MetaData: "); - addStringLocalization("Interaction_DESCRIPTION_Index_164", "Hardness: "); - addStringLocalization("Interaction_DESCRIPTION_Index_165", " Blast Resistance: "); - addStringLocalization("Interaction_DESCRIPTION_Index_166", "Is valid Beacon Pyramid Material"); - addStringLocalization("Interaction_DESCRIPTION_Index_167", "Tank "); - addStringLocalization("Interaction_DESCRIPTION_Index_168", "Heat: "); - addStringLocalization("Interaction_DESCRIPTION_Index_169", " HEM: "); - addStringLocalization("Interaction_DESCRIPTION_Index_170", " Base EU Output: "); - addStringLocalization("Interaction_DESCRIPTION_Index_171", "Facing: "); - addStringLocalization("Interaction_DESCRIPTION_Index_172", " / Chance: "); - addStringLocalization("Interaction_DESCRIPTION_Index_173", "You can remove this with a Wrench"); - addStringLocalization("Interaction_DESCRIPTION_Index_174", "You can NOT remove this with a Wrench"); - addStringLocalization("Interaction_DESCRIPTION_Index_175", "Conduction Loss: "); - addStringLocalization("Interaction_DESCRIPTION_Index_176", "Contained Energy: "); - addStringLocalization("Interaction_DESCRIPTION_Index_177", "Has Muffler Upgrade"); - addStringLocalization("Interaction_DESCRIPTION_Index_178", "Progress: "); - addStringLocalization("Interaction_DESCRIPTION_Index_179", "Max IN: "); - addStringLocalization("Interaction_DESCRIPTION_Index_180", " EU"); - addStringLocalization("Interaction_DESCRIPTION_Index_181", "Max OUT: "); - addStringLocalization("Interaction_DESCRIPTION_Index_182", " EU at "); - addStringLocalization("Interaction_DESCRIPTION_Index_183", " Amperes"); - addStringLocalization("Interaction_DESCRIPTION_Index_184", "Energy: "); - addStringLocalization("Interaction_DESCRIPTION_Index_185", "EU"); - addStringLocalization("Interaction_DESCRIPTION_Index_186", "Owned by: "); - addStringLocalization("Interaction_DESCRIPTION_Index_187", "Type -- Crop-Name: "); - addStringLocalization("Interaction_DESCRIPTION_Index_188", " Growth: "); - addStringLocalization("Interaction_DESCRIPTION_Index_189", " Gain: "); - addStringLocalization("Interaction_DESCRIPTION_Index_190", " Resistance: "); - addStringLocalization("Interaction_DESCRIPTION_Index_191", "Plant -- Fertilizer: "); - addStringLocalization("Interaction_DESCRIPTION_Index_192", " Water: "); - addStringLocalization("Interaction_DESCRIPTION_Index_193", " Weed-Ex: "); - addStringLocalization("Interaction_DESCRIPTION_Index_194", " Scan-Level: "); - addStringLocalization("Interaction_DESCRIPTION_Index_195", "Environment -- Nutrients: "); - addStringLocalization("Interaction_DESCRIPTION_Index_196", " Humidity: "); - addStringLocalization("Interaction_DESCRIPTION_Index_197", " Air-Quality: "); - addStringLocalization("Interaction_DESCRIPTION_Index_198", "Attributes:"); - addStringLocalization("Interaction_DESCRIPTION_Index_199", "Discovered by: "); - addStringLocalization("Interaction_DESCRIPTION_Index_200", " L"); - addStringLocalization("Interaction_DESCRIPTION_Index_201", "Nothing"); - addStringLocalization("Interaction_DESCRIPTION_Index_202", "Pollution in Chunk: "); - addStringLocalization("Interaction_DESCRIPTION_Index_203", " gibbl"); - addStringLocalization("Interaction_DESCRIPTION_Index_204", "No Pollution in Chunk! HAYO!"); - addStringLocalization("Interaction_DESCRIPTION_Index_205", " of "); - addStringLocalization("Interaction_DESCRIPTION_Index_206", "Scan for Assembly Line"); -// addStringLocalization("Interaction_DESCRIPTION_Index_207", "Grab"); -// addStringLocalization("Interaction_DESCRIPTION_Index_208", "Grab"); -// addStringLocalization("Interaction_DESCRIPTION_Index_209", "Grab"); -// addStringLocalization("Interaction_DESCRIPTION_Index_210", "Grab"); - addStringLocalization("Interaction_DESCRIPTION_Index_211", "Items per side: "); - addStringLocalization("Interaction_DESCRIPTION_Index_212", "Input enabled"); + public static void writePlaceholderStrings() { + addStringLocalization("Interaction_DESCRIPTION_Index_001", "Puts out into adjacent Slot #"); + addStringLocalization("Interaction_DESCRIPTION_Index_002", "Grabs in for own Slot #"); + addStringLocalization("Interaction_DESCRIPTION_Index_003", "Normal"); + addStringLocalization("Interaction_DESCRIPTION_Index_004", "Inverted"); + addStringLocalization("Interaction_DESCRIPTION_Index_005", "No Work at all"); + addStringLocalization("Interaction_DESCRIPTION_Index_006", "Export"); + addStringLocalization("Interaction_DESCRIPTION_Index_007", "Import"); + addStringLocalization("Interaction_DESCRIPTION_Index_008", "Export (conditional)"); + addStringLocalization("Interaction_DESCRIPTION_Index_009", "Import (conditional)"); + addStringLocalization("Interaction_DESCRIPTION_Index_010", "Export (invert cond)"); + addStringLocalization("Interaction_DESCRIPTION_Index_011", "Import (invert cond)"); + addStringLocalization("Interaction_DESCRIPTION_Index_012", "Export allow Input"); + addStringLocalization("Interaction_DESCRIPTION_Index_013", "Import allow Output"); + addStringLocalization("Interaction_DESCRIPTION_Index_014", "Export allow Input (conditional)"); + addStringLocalization("Interaction_DESCRIPTION_Index_015", "Import allow Output (conditional)"); + addStringLocalization("Interaction_DESCRIPTION_Index_016", "Export allow Input (invert cond)"); + addStringLocalization("Interaction_DESCRIPTION_Index_017", "Import allow Output (invert cond)"); + addStringLocalization("Interaction_DESCRIPTION_Index_018", "Normal"); + addStringLocalization("Interaction_DESCRIPTION_Index_019", "Inverted"); + addStringLocalization("Interaction_DESCRIPTION_Index_020", "Ready to work"); + addStringLocalization("Interaction_DESCRIPTION_Index_021", "Not ready to work"); + addStringLocalization("Interaction_DESCRIPTION_Index_022", "Import"); + addStringLocalization("Interaction_DESCRIPTION_Index_023", "Import (conditional)"); + addStringLocalization("Interaction_DESCRIPTION_Index_024", "Import (invert cond)"); + addStringLocalization("Interaction_DESCRIPTION_Index_025", "Keep Liquids Away"); + addStringLocalization("Interaction_DESCRIPTION_Index_026", "Keep Liquids Away (conditional)"); + addStringLocalization("Interaction_DESCRIPTION_Index_027", "Keep Liquids Away (invert cond)"); + addStringLocalization("Interaction_DESCRIPTION_Index_028", "Allow"); + addStringLocalization("Interaction_DESCRIPTION_Index_029", "Allow (conditional)"); + addStringLocalization("Interaction_DESCRIPTION_Index_030", "Disallow (conditional)"); + addStringLocalization("Interaction_DESCRIPTION_Index_031", "Normal Universal Storage"); + addStringLocalization("Interaction_DESCRIPTION_Index_032", "Inverted Universal Storage"); + addStringLocalization("Interaction_DESCRIPTION_Index_033", "Normal Electricity Storage"); + addStringLocalization("Interaction_DESCRIPTION_Index_034", "Inverted Electricity Storage"); + addStringLocalization("Interaction_DESCRIPTION_Index_035", "Normal Steam Storage"); + addStringLocalization("Interaction_DESCRIPTION_Index_036", "Inverted Steam Storage"); + addStringLocalization("Interaction_DESCRIPTION_Index_037", "Normal Average Electric Input"); + addStringLocalization("Interaction_DESCRIPTION_Index_038", "Inverted Average Electric Input"); + addStringLocalization("Interaction_DESCRIPTION_Index_039", "Normal Average Electric Output"); + addStringLocalization("Interaction_DESCRIPTION_Index_040", "Inverted Average Electric Output"); + addStringLocalization("Interaction_DESCRIPTION_Index_041", "Normal Electricity Storage(Including Batteries)"); + addStringLocalization("Interaction_DESCRIPTION_Index_042", "Inverted Electricity Storage(Including Batteries)"); + addStringLocalization("Interaction_DESCRIPTION_Index_043", "Allow input, no output"); + addStringLocalization("Interaction_DESCRIPTION_Index_044", "Deny input, no output"); + addStringLocalization("Interaction_DESCRIPTION_Index_045", "Allow input, permit any output"); + addStringLocalization("Interaction_DESCRIPTION_Index_046", "Deny input, permit any output"); + addStringLocalization("Interaction_DESCRIPTION_Index_047", "Filter Fluid: "); + addStringLocalization("Interaction_DESCRIPTION_Index_048", "Pump speed: "); + addStringLocalization("Interaction_DESCRIPTION_Index_049", "L/tick "); + addStringLocalization("Interaction_DESCRIPTION_Index_050", "L/sec"); + addStringLocalization("Interaction_DESCRIPTION_Index_051", "Normal"); + addStringLocalization("Interaction_DESCRIPTION_Index_052", "Inverted"); + addStringLocalization("Interaction_DESCRIPTION_Index_053", "Slot: "); + addStringLocalization("Interaction_DESCRIPTION_Index_054", "Inverted"); + addStringLocalization("Interaction_DESCRIPTION_Index_055", "Normal"); + addStringLocalization("Interaction_DESCRIPTION_Index_056", "Emit if 1 Maintenance Needed"); + addStringLocalization("Interaction_DESCRIPTION_Index_057", "Emit if 1 Maintenance Needed(inverted)"); + addStringLocalization("Interaction_DESCRIPTION_Index_058", "Emit if 2 Maintenance Needed"); + addStringLocalization("Interaction_DESCRIPTION_Index_059", "Emit if 2 Maintenance Needed(inverted)"); + addStringLocalization("Interaction_DESCRIPTION_Index_060", "Emit if 3 Maintenance Needed"); + addStringLocalization("Interaction_DESCRIPTION_Index_061", "Emit if 3 Maintenance Needed(inverted)"); + addStringLocalization("Interaction_DESCRIPTION_Index_062", "Emit if 4 Maintenance Needed"); + addStringLocalization("Interaction_DESCRIPTION_Index_063", "Emit if 4 Maintenance Needed(inverted)"); + addStringLocalization("Interaction_DESCRIPTION_Index_064", "Emit if 5 Maintenance Needed"); + addStringLocalization("Interaction_DESCRIPTION_Index_065", "Emit if 5 Maintenance Needed(inverted)"); + addStringLocalization("Interaction_DESCRIPTION_Index_066", "Emit if rotor needs maintenance"); + addStringLocalization("Interaction_DESCRIPTION_Index_067", "Emit if rotor needs maintenance(inverted)"); + addStringLocalization("Interaction_DESCRIPTION_Index_068", "Emit if any Player is close"); + addStringLocalization("Interaction_DESCRIPTION_Index_069", "Emit if other player is close"); + addStringLocalization("Interaction_DESCRIPTION_Index_070", "Emit if you are close"); + addStringLocalization("Interaction_DESCRIPTION_Index_071", "Conducts strongest Input"); + addStringLocalization("Interaction_DESCRIPTION_Index_072", "Conducts from bottom Input"); + addStringLocalization("Interaction_DESCRIPTION_Index_073", "Conducts from top Input"); + addStringLocalization("Interaction_DESCRIPTION_Index_074", "Conducts from north Input"); + addStringLocalization("Interaction_DESCRIPTION_Index_075", "Conducts from south Input"); + addStringLocalization("Interaction_DESCRIPTION_Index_076", "Conducts from west Input"); + addStringLocalization("Interaction_DESCRIPTION_Index_077", "Conducts from east Input"); + addStringLocalization("Interaction_DESCRIPTION_Index_078", "Signal = "); + addStringLocalization("Interaction_DESCRIPTION_Index_079", "Conditional Signal = "); + addStringLocalization("Interaction_DESCRIPTION_Index_080", "Inverted Conditional Signal = "); + addStringLocalization("Interaction_DESCRIPTION_Index_081", "Frequency: "); + addStringLocalization("Interaction_DESCRIPTION_Index_082", "Open if work enabled"); + addStringLocalization("Interaction_DESCRIPTION_Index_083", "Open if work disabled"); + addStringLocalization("Interaction_DESCRIPTION_Index_084", "Only Output allowed"); + addStringLocalization("Interaction_DESCRIPTION_Index_085", "Only Input allowed"); + addStringLocalization("Interaction_DESCRIPTION_Index_086", "Auto-Input: "); + addStringLocalization("Interaction_DESCRIPTION_Index_087", "Disabled"); + addStringLocalization("Interaction_DESCRIPTION_Index_088", "Enabled"); + addStringLocalization("Interaction_DESCRIPTION_Index_089", " Auto-Output: "); + addStringLocalization("Interaction_DESCRIPTION_Index_090", "Machine Processing: "); + addStringLocalization("Interaction_DESCRIPTION_Index_091", "Redstone Output at Side "); + addStringLocalization("Interaction_DESCRIPTION_Index_092", " set to: "); + addStringLocalization("Interaction_DESCRIPTION_Index_093", "Strong"); + addStringLocalization("Interaction_DESCRIPTION_Index_094", "Weak"); + addStringLocalization("Interaction_DESCRIPTION_Index_095", "Input from Output Side allowed"); + addStringLocalization("Interaction_DESCRIPTION_Index_096", "Input from Output Side forbidden"); + addStringLocalization("Interaction_DESCRIPTION_Index_097", "It's dangerous to go alone! Take this."); + addStringLocalization("Interaction_DESCRIPTION_Index_098", "Do not regulate Item Stack Size"); + addStringLocalization("Interaction_DESCRIPTION_Index_099", "Regulate Item Stack Size to: "); + addStringLocalization("Interaction_DESCRIPTION_Index_100", "This is "); // Spartaaaaaaa!!! + addStringLocalization("Interaction_DESCRIPTION_Index_101", " Ore."); + addStringLocalization("Interaction_DESCRIPTION_Index_102", "There is Lava behind this Rock."); + addStringLocalization("Interaction_DESCRIPTION_Index_103", "There is a Liquid behind this Rock."); + addStringLocalization("Interaction_DESCRIPTION_Index_104", "There is an Air Pocket behind this Rock."); + addStringLocalization("Interaction_DESCRIPTION_Index_105", "Material is changing behind this Rock."); + addStringLocalization("Interaction_DESCRIPTION_Index_106", "Found traces of "); + addStringLocalization("Interaction_DESCRIPTION_Index_107", "No Ores found."); + addStringLocalization("Interaction_DESCRIPTION_Index_108", "Outputs Liquids, Steam and Items"); + addStringLocalization("Interaction_DESCRIPTION_Index_109", "Outputs Steam and Items"); + addStringLocalization("Interaction_DESCRIPTION_Index_110", "Outputs Steam and Liquids"); + addStringLocalization("Interaction_DESCRIPTION_Index_111", "Outputs Steam"); + addStringLocalization("Interaction_DESCRIPTION_Index_112", "Outputs Liquids and Items"); + addStringLocalization("Interaction_DESCRIPTION_Index_113", "Outputs only Items"); + addStringLocalization("Interaction_DESCRIPTION_Index_114", "Outputs only Liquids"); + addStringLocalization("Interaction_DESCRIPTION_Index_115", "Outputs nothing"); + addStringLocalization("Interaction_DESCRIPTION_Index_116", "Emit Energy to Outputside"); + addStringLocalization("Interaction_DESCRIPTION_Index_117", "Don't emit Energy"); + addStringLocalization("Interaction_DESCRIPTION_Index_118", "Emit Redstone if no Slot is free"); + addStringLocalization("Interaction_DESCRIPTION_Index_119", "Don't emit Redstone"); + addStringLocalization("Interaction_DESCRIPTION_Index_120", "Invert Redstone"); + addStringLocalization("Interaction_DESCRIPTION_Index_121", "Don't invert Redstone"); + addStringLocalization("Interaction_DESCRIPTION_Index_122", "Emit Redstone if slots contain something"); + addStringLocalization("Interaction_DESCRIPTION_Index_123", "Don't emit Redstone"); + addStringLocalization("Interaction_DESCRIPTION_Index_124", "Invert Filter"); + addStringLocalization("Interaction_DESCRIPTION_Index_125", "Don't invert Filter"); + addStringLocalization("Interaction_DESCRIPTION_Index_126", "Ignore NBT"); + addStringLocalization("Interaction_DESCRIPTION_Index_127", "NBT has to match"); + addStringLocalization("Interaction_DESCRIPTION_Index_128", "Redstone "); + addStringLocalization("Interaction_DESCRIPTION_Index_129", "Energy "); + addStringLocalization("Interaction_DESCRIPTION_Index_130", "Fluids "); + addStringLocalization("Interaction_DESCRIPTION_Index_131", "Items "); + addStringLocalization("Interaction_DESCRIPTION_Index_132", "Pipe is loose."); + addStringLocalization("Interaction_DESCRIPTION_Index_133", "Screws are loose."); + addStringLocalization("Interaction_DESCRIPTION_Index_134", "Something is stuck."); + addStringLocalization("Interaction_DESCRIPTION_Index_135", "Platings are dented."); + addStringLocalization("Interaction_DESCRIPTION_Index_136", "Circuitry burned out."); + addStringLocalization("Interaction_DESCRIPTION_Index_137", "That doesn't belong there."); + addStringLocalization("Interaction_DESCRIPTION_Index_138", "Incomplete Structure."); + addStringLocalization("Interaction_DESCRIPTION_Index_139", "Hit with Soft Hammer"); + addStringLocalization("Interaction_DESCRIPTION_Index_140", "to (re-)start the Machine"); + addStringLocalization("Interaction_DESCRIPTION_Index_141", "if it doesn't start."); + addStringLocalization("Interaction_DESCRIPTION_Index_142", "Running perfectly."); + addStringLocalization("Interaction_DESCRIPTION_Index_143", "Missing Mining Pipe"); + addStringLocalization("Interaction_DESCRIPTION_Index_144", "Missing Turbine Rotor"); + addStringLocalization("Interaction_DESCRIPTION_Index_145", "Step Down, In: "); + addStringLocalization("Interaction_DESCRIPTION_Index_146", "Step Up, In: "); + addStringLocalization("Interaction_DESCRIPTION_Index_147", "Amp, Out: "); + addStringLocalization("Interaction_DESCRIPTION_Index_148", " V at "); + addStringLocalization("Interaction_DESCRIPTION_Index_149", " Amp"); + addStringLocalization("Interaction_DESCRIPTION_Index_150", "Chance: "); + addStringLocalization("Interaction_DESCRIPTION_Index_151", "Does not get consumed in the process"); + addStringLocalization("Interaction_DESCRIPTION_Index_152", "Total: "); + addStringLocalization("Interaction_DESCRIPTION_Index_153", "Usage: "); + addStringLocalization("Interaction_DESCRIPTION_Index_154", "Voltage: "); + addStringLocalization("Interaction_DESCRIPTION_Index_155", "Amperage: "); + addStringLocalization("Interaction_DESCRIPTION_Index_156", "Voltage: unspecified"); + addStringLocalization("Interaction_DESCRIPTION_Index_157", "Amperage: unspecified"); + addStringLocalization("Interaction_DESCRIPTION_Index_158", "Time: "); + addStringLocalization("Interaction_DESCRIPTION_Index_159", "Needs Low Gravity"); + addStringLocalization("Interaction_DESCRIPTION_Index_160", "Needs Cleanroom"); + addStringLocalization("Interaction_DESCRIPTION_Index_161", " secs"); + addStringLocalization("Interaction_DESCRIPTION_Index_162", "Name: "); + addStringLocalization("Interaction_DESCRIPTION_Index_163", " MetaData: "); + addStringLocalization("Interaction_DESCRIPTION_Index_164", "Hardness: "); + addStringLocalization("Interaction_DESCRIPTION_Index_165", " Blast Resistance: "); + addStringLocalization("Interaction_DESCRIPTION_Index_166", "Is valid Beacon Pyramid Material"); + addStringLocalization("Interaction_DESCRIPTION_Index_167", "Tank "); + addStringLocalization("Interaction_DESCRIPTION_Index_168", "Heat: "); + addStringLocalization("Interaction_DESCRIPTION_Index_169", " HEM: "); + addStringLocalization("Interaction_DESCRIPTION_Index_170", " Base EU Output: "); + addStringLocalization("Interaction_DESCRIPTION_Index_171", "Facing: "); + addStringLocalization("Interaction_DESCRIPTION_Index_172", " / Chance: "); + addStringLocalization("Interaction_DESCRIPTION_Index_173", "You can remove this with a Wrench"); + addStringLocalization("Interaction_DESCRIPTION_Index_174", "You can NOT remove this with a Wrench"); + addStringLocalization("Interaction_DESCRIPTION_Index_175", "Conduction Loss: "); + addStringLocalization("Interaction_DESCRIPTION_Index_176", "Contained Energy: "); + addStringLocalization("Interaction_DESCRIPTION_Index_177", "Has Muffler Upgrade"); + addStringLocalization("Interaction_DESCRIPTION_Index_178", "Progress: "); + addStringLocalization("Interaction_DESCRIPTION_Index_179", "Max IN: "); + addStringLocalization("Interaction_DESCRIPTION_Index_180", " EU"); + addStringLocalization("Interaction_DESCRIPTION_Index_181", "Max OUT: "); + addStringLocalization("Interaction_DESCRIPTION_Index_182", " EU at "); + addStringLocalization("Interaction_DESCRIPTION_Index_183", " Amperes"); + addStringLocalization("Interaction_DESCRIPTION_Index_184", "Energy: "); + addStringLocalization("Interaction_DESCRIPTION_Index_185", "EU"); + addStringLocalization("Interaction_DESCRIPTION_Index_186", "Owned by: "); + addStringLocalization("Interaction_DESCRIPTION_Index_187", "Type -- Crop-Name: "); + addStringLocalization("Interaction_DESCRIPTION_Index_188", " Growth: "); + addStringLocalization("Interaction_DESCRIPTION_Index_189", " Gain: "); + addStringLocalization("Interaction_DESCRIPTION_Index_190", " Resistance: "); + addStringLocalization("Interaction_DESCRIPTION_Index_191", "Plant -- Fertilizer: "); + addStringLocalization("Interaction_DESCRIPTION_Index_192", " Water: "); + addStringLocalization("Interaction_DESCRIPTION_Index_193", " Weed-Ex: "); + addStringLocalization("Interaction_DESCRIPTION_Index_194", " Scan-Level: "); + addStringLocalization("Interaction_DESCRIPTION_Index_195", "Environment -- Nutrients: "); + addStringLocalization("Interaction_DESCRIPTION_Index_196", " Humidity: "); + addStringLocalization("Interaction_DESCRIPTION_Index_197", " Air-Quality: "); + addStringLocalization("Interaction_DESCRIPTION_Index_198", "Attributes:"); + addStringLocalization("Interaction_DESCRIPTION_Index_199", "Discovered by: "); + addStringLocalization("Interaction_DESCRIPTION_Index_200", " L"); + addStringLocalization("Interaction_DESCRIPTION_Index_201", "Nothing"); + addStringLocalization("Interaction_DESCRIPTION_Index_202", "Pollution in Chunk: "); + addStringLocalization("Interaction_DESCRIPTION_Index_203", " gibbl"); + addStringLocalization("Interaction_DESCRIPTION_Index_204", "No Pollution in Chunk! HAYO!"); + addStringLocalization("Interaction_DESCRIPTION_Index_205", " of "); + addStringLocalization("Interaction_DESCRIPTION_Index_206", "Scan for Assembly Line"); + // addStringLocalization("Interaction_DESCRIPTION_Index_207", "Grab"); + // addStringLocalization("Interaction_DESCRIPTION_Index_208", "Grab"); + // addStringLocalization("Interaction_DESCRIPTION_Index_209", "Grab"); + // addStringLocalization("Interaction_DESCRIPTION_Index_210", "Grab"); + addStringLocalization("Interaction_DESCRIPTION_Index_211", "Items per side: "); + addStringLocalization("Interaction_DESCRIPTION_Index_212", "Input enabled"); addStringLocalization("Interaction_DESCRIPTION_Index_213", "Input disabled"); addStringLocalization("Interaction_DESCRIPTION_Index_214", "Connected"); addStringLocalization("Interaction_DESCRIPTION_Index_215", "Disconnected"); - addStringLocalization("Interaction_DESCRIPTION_Index_216", "Deprecated Recipe"); - addStringLocalization("Interaction_DESCRIPTION_Index_217", "Stocking mode. Keeps this many items in destination input slots. This mode can be server unfriendly."); - addStringLocalization("Interaction_DESCRIPTION_Index_218", "Transfer size mode. Add exactly this many items in destination input slots as long as there is room."); - addStringLocalization("Interaction_DESCRIPTION_Index_219", "Extended Facing:"); - addStringLocalization("Interaction_DESCRIPTION_Index_220", "Single recipe locking disabled."); - addStringLocalization("Interaction_DESCRIPTION_Index_221", "Item threshold"); - addStringLocalization("Interaction_DESCRIPTION_Index_222", "Fluid threshold"); - addStringLocalization("Interaction_DESCRIPTION_Index_223", "Single recipe locking enabled. Will lock to next recipe."); + addStringLocalization("Interaction_DESCRIPTION_Index_216", "Deprecated Recipe"); + addStringLocalization( + "Interaction_DESCRIPTION_Index_217", + "Stocking mode. Keeps this many items in destination input slots. This mode can be server unfriendly."); + addStringLocalization( + "Interaction_DESCRIPTION_Index_218", + "Transfer size mode. Add exactly this many items in destination input slots as long as there is room."); + addStringLocalization("Interaction_DESCRIPTION_Index_219", "Extended Facing:"); + addStringLocalization("Interaction_DESCRIPTION_Index_220", "Single recipe locking disabled."); + addStringLocalization("Interaction_DESCRIPTION_Index_221", "Item threshold"); + addStringLocalization("Interaction_DESCRIPTION_Index_222", "Fluid threshold"); + addStringLocalization( + "Interaction_DESCRIPTION_Index_223", "Single recipe locking enabled. Will lock to next recipe."); addStringLocalization("Interaction_DESCRIPTION_Index_224", " ticks"); addStringLocalization("Interaction_DESCRIPTION_Index_500", "Fitting: Loose - More Flow"); - addStringLocalization("Interaction_DESCRIPTION_Index_501", "Fitting: Tight - More Efficiency"); + addStringLocalization("Interaction_DESCRIPTION_Index_501", "Fitting: Tight - More Efficiency"); - addStringLocalization("Item_DESCRIPTION_Index_000", "Stored Heat: %s"); + addStringLocalization("Item_DESCRIPTION_Index_000", "Stored Heat: %s"); addStringLocalization("Item_DESCRIPTION_Index_001", "Durability: %s/%s"); addStringLocalization("Item_DESCRIPTION_Index_002", "%s lvl %s"); addStringLocalization("Item_DESCRIPTION_Index_003", "Attack Damage: %s"); @@ -401,14 +408,14 @@ public class GT_LanguageManager { addStringLocalization("Item_DESCRIPTION_Index_500", "Turbine Efficiency (Loose): %s"); addStringLocalization("Item_DESCRIPTION_Index_501", "Optimal Steam flow (Loose): %s L/t"); - addStringLocalization(FACE_ANY, "Any Side"); - addStringLocalization(FACE_BOTTOM, "Bottom"); - addStringLocalization(FACE_TOP, "Top"); - addStringLocalization(FACE_LEFT, "Left"); - addStringLocalization(FACE_FRONT, "Front"); - addStringLocalization(FACE_RIGHT, "Right"); - addStringLocalization(FACE_BACK, "Back"); - addStringLocalization(FACE_NONE, "None"); + addStringLocalization(FACE_ANY, "Any Side"); + addStringLocalization(FACE_BOTTOM, "Bottom"); + addStringLocalization(FACE_TOP, "Top"); + addStringLocalization(FACE_LEFT, "Left"); + addStringLocalization(FACE_FRONT, "Front"); + addStringLocalization(FACE_RIGHT, "Right"); + addStringLocalization(FACE_BACK, "Back"); + addStringLocalization(FACE_NONE, "None"); } private static void addToMCLangList(String aKey, String aEnglish) { diff --git a/src/main/java/gregtech/api/util/GT_Log.java b/src/main/java/gregtech/api/util/GT_Log.java index 888f471317..49f44b968b 100644 --- a/src/main/java/gregtech/api/util/GT_Log.java +++ b/src/main/java/gregtech/api/util/GT_Log.java @@ -28,7 +28,9 @@ public class GT_Log { public LogBuffer() { super(new OutputStream() { @Override - public void write(int arg0) {/*Do nothing*/} + public void write(int arg0) { + /*Do nothing*/ + } }); } diff --git a/src/main/java/gregtech/api/util/GT_ModHandler.java b/src/main/java/gregtech/api/util/GT_ModHandler.java index 1af913f4ee..f861f2afc7 100644 --- a/src/main/java/gregtech/api/util/GT_ModHandler.java +++ b/src/main/java/gregtech/api/util/GT_ModHandler.java @@ -1,5 +1,15 @@ package gregtech.api.util; +import static gregtech.GT_Mod.GT_FML_LOGGER; +import static gregtech.api.enums.GT_Values.B; +import static gregtech.api.enums.GT_Values.D1; +import static gregtech.api.enums.GT_Values.DW; +import static gregtech.api.enums.GT_Values.E; +import static gregtech.api.enums.GT_Values.M; +import static gregtech.api.enums.GT_Values.RA; +import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.GT_Values.W; + import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; @@ -22,6 +32,18 @@ import ic2.api.reactor.IReactorComponent; import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeInputItemStack; import ic2.api.recipe.RecipeOutput; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Objects; +import java.util.Set; +import java.util.stream.Collectors; import net.minecraft.block.Block; import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.EntityLivingBase; @@ -47,29 +69,6 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Set; -import java.util.stream.Collectors; - -import static gregtech.GT_Mod.GT_FML_LOGGER; -import static gregtech.api.enums.GT_Values.B; -import static gregtech.api.enums.GT_Values.D1; -import static gregtech.api.enums.GT_Values.DW; -import static gregtech.api.enums.GT_Values.E; -import static gregtech.api.enums.GT_Values.M; -import static gregtech.api.enums.GT_Values.RA; -import static gregtech.api.enums.GT_Values.V; -import static gregtech.api.enums.GT_Values.W; - /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! * <p/> @@ -81,11 +80,11 @@ public class GT_ModHandler { public static final List<IRecipe> sSingleNonBlockDamagableRecipeList = new ArrayList<>(1000); private static final Map<String, ItemStack> sIC2ItemMap = new HashMap<>(); - private static final List<IRecipe> sAllRecipeList = new ArrayList<>(5000), sBufferRecipeList = new ArrayList<>(1000); + private static final List<IRecipe> sAllRecipeList = new ArrayList<>(5000), + sBufferRecipeList = new ArrayList<>(1000); private static final List<ItemStack> delayedRemovalByOutput = new ArrayList<>(); private static final List<InventoryCrafting> delayedRemovalByRecipe = new ArrayList<>(); - public static volatile int VERSION = 509; public static Collection<String> sNativeRecipeClasses = new HashSet<>(), sSpecialRecipeClasses = new HashSet<>(); public static GT_HashSet<GT_ItemStack> sNonReplaceableItems = new GT_HashSet<>(); @@ -103,52 +102,51 @@ public class GT_ModHandler { private static final boolean sSingleNonBlockDamagableRecipeList_create = true; private static final ItemStack sMt1 = new ItemStack(Blocks.dirt, 1, 0), sMt2 = new ItemStack(Blocks.dirt, 1, 0); private static final String s_H = "h", s_F = "f", s_I = "I", s_P = "P", s_R = "R"; - private static final ItemStack[][] - sShapes1 = new ItemStack[][]{ - {sMt1, null, sMt1, sMt1, sMt1, sMt1, null, sMt1, null}, - {sMt1, null, sMt1, sMt1, null, sMt1, sMt1, sMt1, sMt1}, - {null, sMt1, null, sMt1, sMt1, sMt1, sMt1, null, sMt1}, - {sMt1, sMt1, sMt1, sMt1, null, sMt1, null, null, null}, - {sMt1, null, sMt1, sMt1, sMt1, sMt1, sMt1, sMt1, sMt1}, - {sMt1, sMt1, sMt1, sMt1, null, sMt1, sMt1, null, sMt1}, - {null, null, null, sMt1, null, sMt1, sMt1, null, sMt1}, - {null, sMt1, null, null, sMt1, null, null, sMt2, null}, - {sMt1, sMt1, sMt1, null, sMt2, null, null, sMt2, null}, - {null, sMt1, null, null, sMt2, null, null, sMt2, null}, - {sMt1, sMt1, null, sMt1, sMt2, null, null, sMt2, null}, - {null, sMt1, sMt1, null, sMt2, sMt1, null, sMt2, null}, - {sMt1, sMt1, null, null, sMt2, null, null, sMt2, null}, - {null, sMt1, sMt1, null, sMt2, null, null, sMt2, null}, - {null, sMt1, null, sMt1, null, null, null, sMt1, sMt2}, - {null, sMt1, null, null, null, sMt1, sMt2, sMt1, null}, - {null, sMt1, null, sMt1, null, sMt1, null, null, sMt2}, - {null, sMt1, null, sMt1, null, sMt1, sMt2, null, null}, - {null, sMt2, null, null, sMt1, null, null, sMt1, null}, - {null, sMt2, null, null, sMt2, null, sMt1, sMt1, sMt1}, - {null, sMt2, null, null, sMt2, null, null, sMt1, null}, - {null, sMt2, null, sMt1, sMt2, null, sMt1, sMt1, null}, - {null, sMt2, null, null, sMt2, sMt1, null, sMt1, sMt1}, - {null, sMt2, null, null, sMt2, null, sMt1, sMt1, null}, - {sMt1, null, null, null, sMt2, null, null, null, sMt2}, - {null, null, sMt1, null, sMt2, null, sMt2, null, null}, - {sMt1, null, null, null, sMt2, null, null, null, null}, - {null, null, sMt1, null, sMt2, null, null, null, null}, - {sMt1, sMt2, null, null, null, null, null, null, null}, - {sMt2, sMt1, null, null, null, null, null, null, null}, - {sMt1, null, null, sMt2, null, null, null, null, null}, - {sMt2, null, null, sMt1, null, null, null, null, null}, - {sMt1, sMt1, sMt1, sMt1, sMt1, sMt1, null, sMt2, null}, - {sMt1, sMt1, null, sMt1, sMt1, sMt2, sMt1, sMt1, null}, - {null, sMt1, sMt1, sMt2, sMt1, sMt1, null, sMt1, sMt1}, - {null, sMt2, null, sMt1, sMt1, sMt1, sMt1, sMt1, sMt1}, - {sMt1, sMt1, sMt1, sMt1, sMt2, sMt1, null, sMt2, null}, - {sMt1, sMt1, null, sMt1, sMt2, sMt2, sMt1, sMt1, null}, - {null, sMt1, sMt1, sMt2, sMt2, sMt1, null, sMt1, sMt1}, - {null, sMt2, null, sMt1, sMt2, sMt1, sMt1, sMt1, sMt1}, - {sMt1, null, null, null, sMt1, null, null, null, null}, - {null, sMt1, null, sMt1, null, null, null, null, null}, - {sMt1, sMt1, null, sMt2, null, sMt1, sMt2, null, null}, - {null, sMt1, sMt1, sMt1, null, sMt2, null, null, sMt2} + private static final ItemStack[][] sShapes1 = new ItemStack[][] { + {sMt1, null, sMt1, sMt1, sMt1, sMt1, null, sMt1, null}, + {sMt1, null, sMt1, sMt1, null, sMt1, sMt1, sMt1, sMt1}, + {null, sMt1, null, sMt1, sMt1, sMt1, sMt1, null, sMt1}, + {sMt1, sMt1, sMt1, sMt1, null, sMt1, null, null, null}, + {sMt1, null, sMt1, sMt1, sMt1, sMt1, sMt1, sMt1, sMt1}, + {sMt1, sMt1, sMt1, sMt1, null, sMt1, sMt1, null, sMt1}, + {null, null, null, sMt1, null, sMt1, sMt1, null, sMt1}, + {null, sMt1, null, null, sMt1, null, null, sMt2, null}, + {sMt1, sMt1, sMt1, null, sMt2, null, null, sMt2, null}, + {null, sMt1, null, null, sMt2, null, null, sMt2, null}, + {sMt1, sMt1, null, sMt1, sMt2, null, null, sMt2, null}, + {null, sMt1, sMt1, null, sMt2, sMt1, null, sMt2, null}, + {sMt1, sMt1, null, null, sMt2, null, null, sMt2, null}, + {null, sMt1, sMt1, null, sMt2, null, null, sMt2, null}, + {null, sMt1, null, sMt1, null, null, null, sMt1, sMt2}, + {null, sMt1, null, null, null, sMt1, sMt2, sMt1, null}, + {null, sMt1, null, sMt1, null, sMt1, null, null, sMt2}, + {null, sMt1, null, sMt1, null, sMt1, sMt2, null, null}, + {null, sMt2, null, null, sMt1, null, null, sMt1, null}, + {null, sMt2, null, null, sMt2, null, sMt1, sMt1, sMt1}, + {null, sMt2, null, null, sMt2, null, null, sMt1, null}, + {null, sMt2, null, sMt1, sMt2, null, sMt1, sMt1, null}, + {null, sMt2, null, null, sMt2, sMt1, null, sMt1, sMt1}, + {null, sMt2, null, null, sMt2, null, sMt1, sMt1, null}, + {sMt1, null, null, null, sMt2, null, null, null, sMt2}, + {null, null, sMt1, null, sMt2, null, sMt2, null, null}, + {sMt1, null, null, null, sMt2, null, null, null, null}, + {null, null, sMt1, null, sMt2, null, null, null, null}, + {sMt1, sMt2, null, null, null, null, null, null, null}, + {sMt2, sMt1, null, null, null, null, null, null, null}, + {sMt1, null, null, sMt2, null, null, null, null, null}, + {sMt2, null, null, sMt1, null, null, null, null, null}, + {sMt1, sMt1, sMt1, sMt1, sMt1, sMt1, null, sMt2, null}, + {sMt1, sMt1, null, sMt1, sMt1, sMt2, sMt1, sMt1, null}, + {null, sMt1, sMt1, sMt2, sMt1, sMt1, null, sMt1, sMt1}, + {null, sMt2, null, sMt1, sMt1, sMt1, sMt1, sMt1, sMt1}, + {sMt1, sMt1, sMt1, sMt1, sMt2, sMt1, null, sMt2, null}, + {sMt1, sMt1, null, sMt1, sMt2, sMt2, sMt1, sMt1, null}, + {null, sMt1, sMt1, sMt2, sMt2, sMt1, null, sMt1, sMt1}, + {null, sMt2, null, sMt1, sMt2, sMt1, sMt1, sMt1, sMt1}, + {sMt1, null, null, null, sMt1, null, null, null, null}, + {null, sMt1, null, sMt1, null, null, null, null, null}, + {sMt1, sMt1, null, sMt2, null, sMt1, sMt2, null, null}, + {null, sMt1, sMt1, sMt1, null, sMt2, null, null, sMt2} }; public static List<Integer> sSingleNonBlockDamagableRecipeList_validsShapes1 = new ArrayList<>(44); public static boolean sSingleNonBlockDamagableRecipeList_validsShapes1_update = false; @@ -220,8 +218,8 @@ public class GT_ModHandler { * Returns a Liquid Stack with given amount of distilled Water. */ public static FluidStack getDistilledWater(long aAmount) { - FluidStack tFluid = FluidRegistry.getFluidStack("ic2distilledwater", (int) aAmount); - if(tFluid==null)tFluid = getWater(aAmount); + FluidStack tFluid = FluidRegistry.getFluidStack("ic2distilledwater", (int) aAmount); + if (tFluid == null) tFluid = getWater(aAmount); return tFluid; } @@ -252,14 +250,14 @@ public class GT_ModHandler { * Returns if that Liquid is Any Steam (including other mods) */ public static boolean isAnySteam(FluidStack aFluid) { - return(aFluid != null && (isSteam(aFluid) || sAnySteamFluidIDs.contains(aFluid.getFluidID()))); + return (aFluid != null && (isSteam(aFluid) || sAnySteamFluidIDs.contains(aFluid.getFluidID()))); } /** * Returns if that Liquid is Super Heated Steam (including other mods) */ public static boolean isSuperHeatedSteam(FluidStack aFluid) { - return(aFluid != null && sSuperHeatedSteamFluidIDs.contains(aFluid.getFluidID())); + return (aFluid != null && sSuperHeatedSteamFluidIDs.contains(aFluid.getFluidID())); } /** @@ -300,7 +298,8 @@ public class GT_ModHandler { return ItemList.Cell_Water.get(aAmount); } - public static ItemStack getLavaCell(long aAmount) { return ItemList.Cell_Lava.get(aAmount); + public static ItemStack getLavaCell(long aAmount) { + return ItemList.Cell_Lava.get(aAmount); } /** @@ -347,12 +346,15 @@ public class GT_ModHandler { */ public static ItemStack getIC2Item(String aItem, long aAmount, ItemStack aReplacement) { if (GT_Utility.isStringInvalid(aItem) || !GregTech_API.sPreloadStarted) return null; - //if (D1) GT_Log.out.println("Requested the Item '" + aItem + "' from the IC2-API"); - if (!sIC2ItemMap.containsKey(aItem)) try { - ItemStack tStack = IC2Items.getItem(aItem); - sIC2ItemMap.put(aItem, tStack); - if (tStack == null && D1) GT_Log.err.println(aItem + " is not found in the IC2 Items!"); - } catch (Throwable e) {/*Do nothing*/} + // if (D1) GT_Log.out.println("Requested the Item '" + aItem + "' from the IC2-API"); + if (!sIC2ItemMap.containsKey(aItem)) + try { + ItemStack tStack = IC2Items.getItem(aItem); + sIC2ItemMap.put(aItem, tStack); + if (tStack == null && D1) GT_Log.err.println(aItem + " is not found in the IC2 Items!"); + } catch (Throwable e) { + /*Do nothing*/ + } return GT_Utility.copyAmount(aAmount, sIC2ItemMap.get(aItem), aReplacement); } @@ -442,8 +444,12 @@ public class GT_ModHandler { public static boolean addValuableOre(Block aBlock, int aMeta, int aValue) { if (aValue <= 0) return false; try { - Class.forName("ic2.core.IC2").getMethod("addValuableOre", IRecipeInput.class, int.class).invoke(null, new RecipeInputItemStack(new ItemStack(aBlock, 1, aMeta)), aValue); - } catch (Throwable e) {/*Do nothing*/} + Class.forName("ic2.core.IC2") + .getMethod("addValuableOre", IRecipeInput.class, int.class) + .invoke(null, new RecipeInputItemStack(new ItemStack(aBlock, 1, aMeta)), aValue); + } catch (Throwable e) { + /*Do nothing*/ + } return true; } @@ -458,9 +464,25 @@ public class GT_ModHandler { aChance = (float) GregTech_API.sRecipeFile.get(ConfigCategories.Machines.scrapboxdrops, aOutput, aChance); if (aChance <= 0) return false; try { - GT_Utility.callMethod(GT_Utility.getFieldContent("ic2.api.recipe.Recipes", "scrapboxDrops", true, true), "addDrop", true, false, true, GT_Utility.copyOrNull(aOutput), aChance); - GT_Utility.callMethod(GT_Utility.getFieldContent("ic2.api.recipe.Recipes", "scrapboxDrops", true, true), "addRecipe", true, true, false, GT_Utility.copyOrNull(aOutput), aChance); - } catch (Throwable e) {/*Do nothing*/} + GT_Utility.callMethod( + GT_Utility.getFieldContent("ic2.api.recipe.Recipes", "scrapboxDrops", true, true), + "addDrop", + true, + false, + true, + GT_Utility.copyOrNull(aOutput), + aChance); + GT_Utility.callMethod( + GT_Utility.getFieldContent("ic2.api.recipe.Recipes", "scrapboxDrops", true, true), + "addRecipe", + true, + true, + false, + GT_Utility.copyOrNull(aOutput), + aChance); + } catch (Throwable e) { + /*Do nothing*/ + } return true; } @@ -471,7 +493,9 @@ public class GT_ModHandler { if (aRecycledStack == null) return false; try { ic2.api.recipe.Recipes.recyclerBlacklist.add(new RecipeInputItemStack(aRecycledStack)); - } catch (Throwable e) {/*Do nothing*/} + } catch (Throwable e) { + /*Do nothing*/ + } return true; } @@ -494,33 +518,39 @@ public class GT_ModHandler { boolean temp = false; if (aInput.stackSize == 1 && addSmeltingRecipe(aInput, aOutput)) temp = true; return (RA.addAlloySmelterRecipe( - aInput, - OrePrefixes.ingot.contains(aOutput) ? ItemList.Shape_Mold_Ingot.get(0) : OrePrefixes.block.contains(aOutput) ? ItemList.Shape_Mold_Block.get(0) : OrePrefixes.nugget.contains(aOutput) ? ItemList.Shape_Mold_Nugget.get(0) : null, - aOutput, - 130, - 3, - hidden - )); + aInput, + OrePrefixes.ingot.contains(aOutput) + ? ItemList.Shape_Mold_Ingot.get(0) + : OrePrefixes.block.contains(aOutput) + ? ItemList.Shape_Mold_Block.get(0) + : OrePrefixes.nugget.contains(aOutput) ? ItemList.Shape_Mold_Nugget.get(0) : null, + aOutput, + 130, + 3, + hidden)); } /** * LiquidTransposer Recipe for both directions */ - public static boolean addLiquidTransposerRecipe(ItemStack aEmptyContainer, FluidStack aLiquid, ItemStack aFullContainer, int aMJ) { + public static boolean addLiquidTransposerRecipe( + ItemStack aEmptyContainer, FluidStack aLiquid, ItemStack aFullContainer, int aMJ) { return true; } /** * LiquidTransposer Recipe for filling Containers */ - public static boolean addLiquidTransposerFillRecipe(ItemStack aEmptyContainer, FluidStack aLiquid, ItemStack aFullContainer, int aMJ) { + public static boolean addLiquidTransposerFillRecipe( + ItemStack aEmptyContainer, FluidStack aLiquid, ItemStack aFullContainer, int aMJ) { return true; } /** * LiquidTransposer Recipe for emptying Containers */ - public static boolean addLiquidTransposerEmptyRecipe(ItemStack aFullContainer, FluidStack aLiquid, ItemStack aEmptyContainer, int aMJ) { + public static boolean addLiquidTransposerEmptyRecipe( + ItemStack aFullContainer, FluidStack aLiquid, ItemStack aEmptyContainer, int aMJ) { return true; } @@ -538,8 +568,8 @@ public class GT_ModHandler { /** * RC-BlastFurnace Recipes */ - @Deprecated - public static boolean addRCBlastFurnaceRecipe(ItemStack aInput, ItemStack aOutput, int aTime) { + @Deprecated + public static boolean addRCBlastFurnaceRecipe(ItemStack aInput, ItemStack aOutput, int aTime) { return true; } @@ -551,7 +581,8 @@ public class GT_ModHandler { return addPulverisationRecipe(aInput, aOutput1, aOutput2, 100, false); } - public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aChance) { + public static boolean addPulverisationRecipe( + ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aChance) { return addPulverisationRecipe(aInput, aOutput1, aOutput2, aChance, false); } @@ -559,34 +590,49 @@ public class GT_ModHandler { return addPulverisationRecipe(aInput, aOutput1, null, 0, aOverwrite); } - public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, boolean aOverwrite) { + public static boolean addPulverisationRecipe( + ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, boolean aOverwrite) { return addPulverisationRecipe(aInput, aOutput1, aOutput2, 100, aOverwrite); } - public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aChance, boolean aOverwrite) { + public static boolean addPulverisationRecipe( + ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aChance, boolean aOverwrite) { return addPulverisationRecipe(aInput, aOutput1, aOutput2, aChance, null, 0, aOverwrite); } /** * Adds Several Pulverizer-Type Recipes. */ - public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aChance2, ItemStack aOutput3, int aChance3, boolean aOverwrite) { + public static boolean addPulverisationRecipe( + ItemStack aInput, + ItemStack aOutput1, + ItemStack aOutput2, + int aChance2, + ItemStack aOutput3, + int aChance3, + boolean aOverwrite) { aOutput1 = GT_OreDictUnificator.get(true, aOutput1); aOutput2 = GT_OreDictUnificator.get(true, aOutput2); if (GT_Utility.isStackInvalid(aInput) || GT_Utility.isStackInvalid(aOutput1)) return false; if (GT_Utility.getContainerItem(aInput, false) == null) { - RA.addPulveriserRecipe(aInput, new ItemStack[]{aOutput1, aOutput2, aOutput3}, new int[]{10000, aChance2 <= 0 ? 1000 : 100 * aChance2, aChance3 <= 0 ? 1000 : 100 * aChance3}, 400, 2); + RA.addPulveriserRecipe( + aInput, + new ItemStack[] {aOutput1, aOutput2, aOutput3}, + new int[] {10000, aChance2 <= 0 ? 1000 : 100 * aChance2, aChance3 <= 0 ? 1000 : 100 * aChance3}, + 400, + 2); } return true; } - public static boolean addPulverisationRecipe(ItemStack aInputItem, ItemStack[] aOutputArray, int[] aChanceArray, int aEUt, int aRecipeDurationInTicks) { + public static boolean addPulverisationRecipe( + ItemStack aInputItem, ItemStack[] aOutputArray, int[] aChanceArray, int aEUt, int aRecipeDurationInTicks) { ItemStack[] aUnifiedOutputArray = new ItemStack[aOutputArray.length]; int counter = 0; - for (ItemStack item: aOutputArray) { + for (ItemStack item : aOutputArray) { aUnifiedOutputArray[counter] = GT_OreDictUnificator.get(true, item); counter++; } @@ -596,11 +642,13 @@ public class GT_ModHandler { return true; } - public static boolean addImmersiveEngineeringRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aChance2, ItemStack aOutput3, int aChance3){ - return true; + public static boolean addImmersiveEngineeringRecipe( + ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aChance2, ItemStack aOutput3, int aChance3) { + return true; } - public static boolean addMagneticraftRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aChance2, ItemStack aOutput3, int aChance3){ + public static boolean addMagneticraftRecipe( + ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aChance2, ItemStack aOutput3, int aChance3) { return true; } @@ -614,7 +662,13 @@ public class GT_ModHandler { /** * Induction Smelter Recipes and Alloy Smelter Recipes */ - public static boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt, boolean aAllowSecondaryInputEmpty) { + public static boolean addAlloySmelterRecipe( + ItemStack aInput1, + ItemStack aInput2, + ItemStack aOutput1, + int aDuration, + int aEUt, + boolean aAllowSecondaryInputEmpty) { if (aInput1 == null || (aInput2 == null && !aAllowSecondaryInputEmpty) || aOutput1 == null) return false; aOutput1 = GT_OreDictUnificator.get(true, aOutput1); return RA.addAlloySmelterRecipe(aInput1, aInput2, aOutput1, aDuration, aEUt); @@ -623,7 +677,8 @@ public class GT_ModHandler { /** * Induction Smelter Recipes for TE */ - public static boolean addInductionSmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, int aEnergy, int aChance) { + public static boolean addInductionSmelterRecipe( + ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, int aEnergy, int aChance) { return true; } @@ -640,31 +695,73 @@ public class GT_ModHandler { /** * Adds GT versions of the IC2 recipes from the supplied IC2RecipeList. */ - public static void addIC2RecipesToGT(Map<IRecipeInput, RecipeOutput> aIC2RecipeList, GT_Recipe.GT_Recipe_Map aGTRecipeMap, boolean aAddGTRecipe, boolean aRemoveIC2Recipe, boolean aExcludeGTIC2Items) { + public static void addIC2RecipesToGT( + Map<IRecipeInput, RecipeOutput> aIC2RecipeList, + GT_Recipe.GT_Recipe_Map aGTRecipeMap, + boolean aAddGTRecipe, + boolean aRemoveIC2Recipe, + boolean aExcludeGTIC2Items) { Map<ItemStack, ItemStack> aRecipesToRemove = new HashMap<>(); for (Entry<IRecipeInput, RecipeOutput> iRecipeInputRecipeOutputEntry : aIC2RecipeList.entrySet()) { if ((iRecipeInputRecipeOutputEntry.getValue()).items.size() > 0) { for (ItemStack tStack : (iRecipeInputRecipeOutputEntry.getKey()).getInputs()) { if (GT_Utility.isStackValid(tStack)) { - if (aAddGTRecipe && (aGTRecipeMap.findRecipe(null, false, Long.MAX_VALUE, null, tStack) == null)) { + if (aAddGTRecipe + && (aGTRecipeMap.findRecipe(null, false, Long.MAX_VALUE, null, tStack) == null)) { try { - if (aExcludeGTIC2Items && ((tStack.getUnlocalizedName().contains("gt.metaitem.01") || tStack.getUnlocalizedName().contains("gt.blockores") || tStack.getUnlocalizedName().contains("ic2.itemCrushed") || tStack.getUnlocalizedName().contains("ic2.itemPurifiedCrushed")))) + if (aExcludeGTIC2Items + && ((tStack.getUnlocalizedName().contains("gt.metaitem.01") + || tStack.getUnlocalizedName().contains("gt.blockores") + || tStack.getUnlocalizedName().contains("ic2.itemCrushed") + || tStack.getUnlocalizedName().contains("ic2.itemPurifiedCrushed")))) continue; switch (aGTRecipeMap.mUnlocalizedName) { case "gt.recipe.macerator": case "gt.recipe.extractor": case "gt.recipe.compressor": - aGTRecipeMap.addRecipe(true, new ItemStack[]{GT_Utility.copyAmount((iRecipeInputRecipeOutputEntry.getKey()).getAmount(), tStack)}, (ItemStack[]) (iRecipeInputRecipeOutputEntry.getValue()).items.toArray(), null, null, null, null, 300, 2, 0); + aGTRecipeMap.addRecipe( + true, + new ItemStack[] { + GT_Utility.copyAmount( + (iRecipeInputRecipeOutputEntry.getKey()).getAmount(), + tStack) + }, + (ItemStack[]) + (iRecipeInputRecipeOutputEntry.getValue()).items.toArray(), + null, + null, + null, + null, + 300, + 2, + 0); break; case "gt.recipe.thermalcentrifuge": - aGTRecipeMap.addRecipe(true, new ItemStack[]{GT_Utility.copyAmount((iRecipeInputRecipeOutputEntry.getKey()).getAmount(), tStack)}, (ItemStack[]) (iRecipeInputRecipeOutputEntry.getValue()).items.toArray(), null, null, null, null, 500, 48, 0); + aGTRecipeMap.addRecipe( + true, + new ItemStack[] { + GT_Utility.copyAmount( + (iRecipeInputRecipeOutputEntry.getKey()).getAmount(), + tStack) + }, + (ItemStack[]) + (iRecipeInputRecipeOutputEntry.getValue()).items.toArray(), + null, + null, + null, + null, + 500, + 48, + 0); break; } } catch (Exception e) { System.err.println(e); } } - if (aRemoveIC2Recipe) aRecipesToRemove.put(tStack, ((RecipeOutput) iRecipeInputRecipeOutputEntry.getValue()).items.get(0)); + if (aRemoveIC2Recipe) + aRecipesToRemove.put( + tStack, ((RecipeOutput) iRecipeInputRecipeOutputEntry.getValue()).items.get(0)); } } } @@ -675,42 +772,54 @@ public class GT_ModHandler { public static Map<IRecipeInput, RecipeOutput> getExtractorRecipeList() { try { return ic2.api.recipe.Recipes.extractor.getRecipes(); - } catch (Throwable e) {/*Do nothing*/} + } catch (Throwable e) { + /*Do nothing*/ + } return sExtractorRecipes; } public static Map<IRecipeInput, RecipeOutput> getCompressorRecipeList() { try { return ic2.api.recipe.Recipes.compressor.getRecipes(); - } catch (Throwable e) {/*Do nothing*/} + } catch (Throwable e) { + /*Do nothing*/ + } return sCompressorRecipes; } public static Map<IRecipeInput, RecipeOutput> getMaceratorRecipeList() { try { return ic2.api.recipe.Recipes.macerator.getRecipes(); - } catch (Throwable e) {/*Do nothing*/} + } catch (Throwable e) { + /*Do nothing*/ + } return sMaceratorRecipes; } public static Map<IRecipeInput, RecipeOutput> getThermalCentrifugeRecipeList() { try { return ic2.api.recipe.Recipes.centrifuge.getRecipes(); - } catch (Throwable e) {/*Do nothing*/} + } catch (Throwable e) { + /*Do nothing*/ + } return sThermalCentrifugeRecipes; } public static Map<IRecipeInput, RecipeOutput> getOreWashingRecipeList() { try { return ic2.api.recipe.Recipes.oreWashing.getRecipes(); - } catch (Throwable e) {/*Do nothing*/} + } catch (Throwable e) { + /*Do nothing*/ + } return sOreWashingRecipes; } public static Map<IRecipeInput, RecipeOutput> getMassFabricatorList() { try { return ic2.api.recipe.Recipes.matterAmplifier.getRecipes(); - } catch (Throwable e) {/*Do nothing*/} + } catch (Throwable e) { + /*Do nothing*/ + } return sMassfabRecipes; } @@ -720,14 +829,27 @@ public class GT_ModHandler { public static boolean addThermalCentrifugeRecipe(ItemStack aInput, int[] aChances, int aHeat, Object... aOutput) { if (aInput == null || aOutput == null || aOutput.length <= 0 || aOutput[0] == null) return false; if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.thermalcentrifuge, aInput, true)) return false; - RA.addThermalCentrifugeRecipe(aInput, aOutput.length >= 1 ? (ItemStack)aOutput[0] : null, aOutput.length >= 2 ? (ItemStack)aOutput[1] : null, aOutput.length >= 3 ? (ItemStack)aOutput[2] : null, aChances, 500, 48); + RA.addThermalCentrifugeRecipe( + aInput, + aOutput.length >= 1 ? (ItemStack) aOutput[0] : null, + aOutput.length >= 2 ? (ItemStack) aOutput[1] : null, + aOutput.length >= 3 ? (ItemStack) aOutput[2] : null, + aChances, + 500, + 48); return true; } public static boolean addThermalCentrifugeRecipe(ItemStack aInput, int aHeat, Object... aOutput) { if (aInput == null || aOutput == null || aOutput.length <= 0 || aOutput[0] == null) return false; if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.thermalcentrifuge, aInput, true)) return false; - RA.addThermalCentrifugeRecipe(aInput, aOutput.length >= 1 ? (ItemStack)aOutput[0] : null, aOutput.length >= 2 ? (ItemStack)aOutput[1] : null, aOutput.length >= 3 ? (ItemStack)aOutput[2] : null, 500, 48); + RA.addThermalCentrifugeRecipe( + aInput, + aOutput.length >= 1 ? (ItemStack) aOutput[0] : null, + aOutput.length >= 2 ? (ItemStack) aOutput[1] : null, + aOutput.length >= 3 ? (ItemStack) aOutput[2] : null, + 500, + 48); return true; } @@ -737,16 +859,46 @@ public class GT_ModHandler { public static boolean addOreWasherRecipe(ItemStack aInput, int[] aChances, int aWaterAmount, Object... aOutput) { if (aInput == null || aOutput == null || aOutput.length <= 0 || aOutput[0] == null) return false; if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.orewashing, aInput, true)) return false; - RA.addOreWasherRecipe(aInput, (ItemStack)aOutput[0], (ItemStack)aOutput[1], (ItemStack)aOutput[2], GT_ModHandler.getWater(aWaterAmount), aChances, 500, 16); - RA.addOreWasherRecipe(aInput, (ItemStack)aOutput[0], (ItemStack)aOutput[1], (ItemStack)aOutput[2], GT_ModHandler.getDistilledWater(aWaterAmount / 5), aChances, 300, 16); + RA.addOreWasherRecipe( + aInput, + (ItemStack) aOutput[0], + (ItemStack) aOutput[1], + (ItemStack) aOutput[2], + GT_ModHandler.getWater(aWaterAmount), + aChances, + 500, + 16); + RA.addOreWasherRecipe( + aInput, + (ItemStack) aOutput[0], + (ItemStack) aOutput[1], + (ItemStack) aOutput[2], + GT_ModHandler.getDistilledWater(aWaterAmount / 5), + aChances, + 300, + 16); return true; } public static boolean addOreWasherRecipe(ItemStack aInput, int aWaterAmount, Object... aOutput) { if (aInput == null || aOutput == null || aOutput.length <= 0 || aOutput[0] == null) return false; if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.orewashing, aInput, true)) return false; - RA.addOreWasherRecipe(aInput, (ItemStack)aOutput[0], (ItemStack)aOutput[1], (ItemStack)aOutput[2], GT_ModHandler.getWater(aWaterAmount), 500, 16); - RA.addOreWasherRecipe(aInput, (ItemStack)aOutput[0], (ItemStack)aOutput[1], (ItemStack)aOutput[2], GT_ModHandler.getDistilledWater(aWaterAmount / 5), 300, 16); + RA.addOreWasherRecipe( + aInput, + (ItemStack) aOutput[0], + (ItemStack) aOutput[1], + (ItemStack) aOutput[2], + GT_ModHandler.getWater(aWaterAmount), + 500, + 16); + RA.addOreWasherRecipe( + aInput, + (ItemStack) aOutput[0], + (ItemStack) aOutput[1], + (ItemStack) aOutput[2], + GT_ModHandler.getDistilledWater(aWaterAmount / 5), + 300, + 16); return true; } @@ -770,8 +922,11 @@ public class GT_ModHandler { try { NBTTagCompound tNBT = new NBTTagCompound(); tNBT.setInteger("amplification", aValue); - GT_Utility.callMethod(ic2.api.recipe.Recipes.matterAmplifier, "addRecipe", false, false, false, aAmplifier, tNBT); - } catch (Throwable e) {/*Do nothing*/} + GT_Utility.callMethod( + ic2.api.recipe.Recipes.matterAmplifier, "addRecipe", false, false, false, aAmplifier, tNBT); + } catch (Throwable e) { + /*Do nothing*/ + } return true; } @@ -782,7 +937,9 @@ public class GT_ModHandler { aResult = GT_OreDictUnificator.get(true, aResult); if (aResult == null || aRecipe == null || aResult.stackSize <= 0) return false; try { - mods.railcraft.api.crafting.RailcraftCraftingManager.rollingMachine.getRecipeList().add(new ShapedOreRecipe(GT_Utility.copyOrNull(aResult), aRecipe)); + mods.railcraft.api.crafting.RailcraftCraftingManager.rollingMachine + .getRecipeList() + .add(new ShapedOreRecipe(GT_Utility.copyOrNull(aResult), aRecipe)); } catch (Throwable e) { return addCraftingRecipe(GT_Utility.copyOrNull(aResult), aRecipe); } @@ -804,8 +961,26 @@ public class GT_ModHandler { /** * Shapeless Crafting Recipes. Deletes conflicting Recipes too. */ - public static boolean addCraftingRecipe(ItemStack aResult, Enchantment[] aEnchantmentsAdded, int[] aEnchantmentLevelsAdded, Object[] aRecipe) { - return addCraftingRecipe(aResult, aEnchantmentsAdded, aEnchantmentLevelsAdded, false, true, false, false, false, false, false, false, false, false, false, false, true, aRecipe); + public static boolean addCraftingRecipe( + ItemStack aResult, Enchantment[] aEnchantmentsAdded, int[] aEnchantmentLevelsAdded, Object[] aRecipe) { + return addCraftingRecipe( + aResult, + aEnchantmentsAdded, + aEnchantmentLevelsAdded, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + aRecipe); } /** @@ -862,47 +1037,46 @@ public class GT_ModHandler { */ public static boolean addCraftingRecipe(ItemStack aResult, long aBitMask, Object[] aRecipe) { return addCraftingRecipe( - aResult, - new Enchantment[0], - new int[0], - (aBitMask & RecipeBits.MIRRORED) != 0, - (aBitMask & RecipeBits.BUFFERED) != 0, - (aBitMask & RecipeBits.KEEPNBT) != 0, - (aBitMask & RecipeBits.DISMANTLEABLE) != 0, - (aBitMask & RecipeBits.NOT_REMOVABLE) == 0, - (aBitMask & RecipeBits.REVERSIBLE) != 0, - (aBitMask & RecipeBits.DELETE_ALL_OTHER_RECIPES) != 0, - (aBitMask & RecipeBits.DELETE_ALL_OTHER_RECIPES_IF_SAME_NBT) != 0, - (aBitMask & RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES) != 0, - (aBitMask & RecipeBits.DELETE_ALL_OTHER_NATIVE_RECIPES) != 0, - (aBitMask & RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS) == 0, - (aBitMask & RecipeBits.ONLY_ADD_IF_THERE_IS_ANOTHER_RECIPE_FOR_IT) != 0, - (aBitMask & RecipeBits.ONLY_ADD_IF_RESULT_IS_NOT_NULL) != 0, - aRecipe); + aResult, + new Enchantment[0], + new int[0], + (aBitMask & RecipeBits.MIRRORED) != 0, + (aBitMask & RecipeBits.BUFFERED) != 0, + (aBitMask & RecipeBits.KEEPNBT) != 0, + (aBitMask & RecipeBits.DISMANTLEABLE) != 0, + (aBitMask & RecipeBits.NOT_REMOVABLE) == 0, + (aBitMask & RecipeBits.REVERSIBLE) != 0, + (aBitMask & RecipeBits.DELETE_ALL_OTHER_RECIPES) != 0, + (aBitMask & RecipeBits.DELETE_ALL_OTHER_RECIPES_IF_SAME_NBT) != 0, + (aBitMask & RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES) != 0, + (aBitMask & RecipeBits.DELETE_ALL_OTHER_NATIVE_RECIPES) != 0, + (aBitMask & RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS) == 0, + (aBitMask & RecipeBits.ONLY_ADD_IF_THERE_IS_ANOTHER_RECIPE_FOR_IT) != 0, + (aBitMask & RecipeBits.ONLY_ADD_IF_RESULT_IS_NOT_NULL) != 0, + aRecipe); } /** * Internal realisation of the Crafting Recipe adding Process. */ private static boolean addCraftingRecipe( - ItemStack aResult, - Enchantment[] aEnchantmentsAdded, - int[] aEnchantmentLevelsAdded, - boolean aMirrored, - boolean aBuffered, - boolean aKeepNBT, - boolean aDismantleable, - boolean aRemovable, - boolean aReversible, - boolean aRemoveAllOthersWithSameOutput, - boolean aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT, - boolean aRemoveAllOtherShapedsWithSameOutput, - boolean aRemoveAllOtherNativeRecipes, - boolean aCheckForCollisions, - boolean aOnlyAddIfThereIsAnyRecipeOutputtingThis, - boolean aOnlyAddIfResultIsNotNull, - Object[] aRecipe - ) { + ItemStack aResult, + Enchantment[] aEnchantmentsAdded, + int[] aEnchantmentLevelsAdded, + boolean aMirrored, + boolean aBuffered, + boolean aKeepNBT, + boolean aDismantleable, + boolean aRemovable, + boolean aReversible, + boolean aRemoveAllOthersWithSameOutput, + boolean aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT, + boolean aRemoveAllOtherShapedsWithSameOutput, + boolean aRemoveAllOtherNativeRecipes, + boolean aCheckForCollisions, + boolean aOnlyAddIfThereIsAnyRecipeOutputtingThis, + boolean aOnlyAddIfResultIsNotNull, + Object[] aRecipe) { aResult = GT_OreDictUnificator.get(true, aResult); if (aOnlyAddIfResultIsNotNull && aResult == null) return false; if (aResult != null && Items.feather.getDamage(aResult) == W) Items.feather.setDamage(aResult, 0); @@ -912,12 +1086,13 @@ public class GT_ModHandler { boolean tThereWasARecipe = false; for (byte i = 0; i < aRecipe.length; i++) { - if (aRecipe[i] instanceof IItemContainer) - aRecipe[i] = ((IItemContainer) aRecipe[i]).get(1); - else if (aRecipe[i] instanceof Enum) - aRecipe[i] = ((Enum) aRecipe[i]).name(); - else if (!(aRecipe[i] == null || aRecipe[i] instanceof ItemStack || aRecipe[i] instanceof ItemData || aRecipe[i] instanceof String || aRecipe[i] instanceof Character)) - aRecipe[i] = aRecipe[i].toString(); + if (aRecipe[i] instanceof IItemContainer) aRecipe[i] = ((IItemContainer) aRecipe[i]).get(1); + else if (aRecipe[i] instanceof Enum) aRecipe[i] = ((Enum) aRecipe[i]).name(); + else if (!(aRecipe[i] == null + || aRecipe[i] instanceof ItemStack + || aRecipe[i] instanceof ItemData + || aRecipe[i] instanceof String + || aRecipe[i] instanceof Character)) aRecipe[i] = aRecipe[i].toString(); } try { @@ -1011,7 +1186,8 @@ public class GT_ModHandler { for (; idx < aRecipe.length; idx += 2) { if (aRecipe[idx] == null || aRecipe[idx + 1] == null) { if (D1) { - GT_Log.err.println("WARNING: Missing Item for shaped Recipe: " + (aResult == null ? "null" : aResult.getDisplayName())); + GT_Log.err.println("WARNING: Missing Item for shaped Recipe: " + + (aResult == null ? "null" : aResult.getDisplayName())); for (Object tContent : aRecipe) GT_Log.err.println(tContent); } return false; @@ -1084,8 +1260,7 @@ public class GT_ModHandler { } if (tDoWeCareIfThereWasARecipe || !aBuffered) tThereWasARecipe = removeRecipe(tRecipe) != null || tThereWasARecipe; - else - removeRecipeDelayed(tRecipe); + else removeRecipeDelayed(tRecipe); } } catch (Throwable e) { e.printStackTrace(GT_Log.err); @@ -1093,21 +1268,30 @@ public class GT_ModHandler { if (aResult == null || aResult.stackSize <= 0) return false; - if (aRemoveAllOthersWithSameOutput || aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT || aRemoveAllOtherShapedsWithSameOutput || aRemoveAllOtherNativeRecipes) { - if(tDoWeCareIfThereWasARecipe || !aBuffered) - tThereWasARecipe = removeRecipeByOutput(aResult, !aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT, aRemoveAllOtherShapedsWithSameOutput, aRemoveAllOtherNativeRecipes) || tThereWasARecipe; - else - removeRecipeByOutputDelayed(aResult); + if (aRemoveAllOthersWithSameOutput + || aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT + || aRemoveAllOtherShapedsWithSameOutput + || aRemoveAllOtherNativeRecipes) { + if (tDoWeCareIfThereWasARecipe || !aBuffered) + tThereWasARecipe = removeRecipeByOutput( + aResult, + !aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT, + aRemoveAllOtherShapedsWithSameOutput, + aRemoveAllOtherNativeRecipes) + || tThereWasARecipe; + else removeRecipeByOutputDelayed(aResult); } if (aOnlyAddIfThereIsAnyRecipeOutputtingThis && !tDoWeCareIfThereWasARecipe && !tThereWasARecipe) { - ArrayList<IRecipe> tList = (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList(); - int tList_sS=tList.size(); + ArrayList<IRecipe> tList = + (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList(); + int tList_sS = tList.size(); for (int i = 0; i < tList_sS && !tThereWasARecipe; i++) { IRecipe tRecipe = tList.get(i); if (sSpecialRecipeClasses.contains(tRecipe.getClass().getName())) continue; if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(tRecipe.getRecipeOutput()), aResult, true)) { - tList.remove(i--); tList_sS=tList.size(); + tList.remove(i--); + tList_sS = tList.size(); tThereWasARecipe = true; } } @@ -1120,9 +1304,25 @@ public class GT_ModHandler { if (tThereWasARecipe || !aOnlyAddIfThereIsAnyRecipeOutputtingThis) { if (sBufferCraftingRecipes && aBuffered) - sBufferRecipeList.add(new GT_Shaped_Recipe(GT_Utility.copyOrNull(aResult), aDismantleable, aRemovable, aKeepNBT, aEnchantmentsAdded, aEnchantmentLevelsAdded, aRecipe).setMirrored(aMirrored)); + sBufferRecipeList.add(new GT_Shaped_Recipe( + GT_Utility.copyOrNull(aResult), + aDismantleable, + aRemovable, + aKeepNBT, + aEnchantmentsAdded, + aEnchantmentLevelsAdded, + aRecipe) + .setMirrored(aMirrored)); else - GameRegistry.addRecipe(new GT_Shaped_Recipe(GT_Utility.copyOrNull(aResult), aDismantleable, aRemovable, aKeepNBT, aEnchantmentsAdded, aEnchantmentLevelsAdded, aRecipe).setMirrored(aMirrored)); + GameRegistry.addRecipe(new GT_Shaped_Recipe( + GT_Utility.copyOrNull(aResult), + aDismantleable, + aRemovable, + aKeepNBT, + aEnchantmentsAdded, + aEnchantmentLevelsAdded, + aRecipe) + .setMirrored(aMirrored)); } return true; } @@ -1130,37 +1330,56 @@ public class GT_ModHandler { /** * Shapeless Crafting Recipes. Deletes conflicting Recipes too. */ - public static boolean addShapelessEnchantingRecipe(ItemStack aResult, Enchantment[] aEnchantmentsAdded, int[] aEnchantmentLevelsAdded, Object[] aRecipe) { - return addShapelessCraftingRecipe(aResult, aEnchantmentsAdded, aEnchantmentLevelsAdded, true, false, false, false, aRecipe); + public static boolean addShapelessEnchantingRecipe( + ItemStack aResult, Enchantment[] aEnchantmentsAdded, int[] aEnchantmentLevelsAdded, Object[] aRecipe) { + return addShapelessCraftingRecipe( + aResult, aEnchantmentsAdded, aEnchantmentLevelsAdded, true, false, false, false, aRecipe); } /** * Shapeless Crafting Recipes. Deletes conflicting Recipes too. */ public static boolean addShapelessCraftingRecipe(ItemStack aResult, Object[] aRecipe) { - return addShapelessCraftingRecipe(aResult, RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | RecipeBits.BUFFERED, aRecipe); + return addShapelessCraftingRecipe( + aResult, RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | RecipeBits.BUFFERED, aRecipe); } /** * Shapeless Crafting Recipes. Deletes conflicting Recipes too. */ public static boolean addShapelessCraftingRecipe(ItemStack aResult, long aBitMask, Object[] aRecipe) { - return addShapelessCraftingRecipe(aResult, new Enchantment[0], new int[0], (aBitMask & RecipeBits.BUFFERED) != 0, (aBitMask & RecipeBits.KEEPNBT) != 0, (aBitMask & RecipeBits.DISMANTLEABLE) != 0, (aBitMask & RecipeBits.NOT_REMOVABLE) == 0, aRecipe); + return addShapelessCraftingRecipe( + aResult, + new Enchantment[0], + new int[0], + (aBitMask & RecipeBits.BUFFERED) != 0, + (aBitMask & RecipeBits.KEEPNBT) != 0, + (aBitMask & RecipeBits.DISMANTLEABLE) != 0, + (aBitMask & RecipeBits.NOT_REMOVABLE) == 0, + aRecipe); } /** * Shapeless Crafting Recipes. Deletes conflicting Recipes too. */ - private static boolean addShapelessCraftingRecipe(ItemStack aResult, Enchantment[] aEnchantmentsAdded, int[] aEnchantmentLevelsAdded, boolean aBuffered, boolean aKeepNBT, boolean aDismantleable, boolean aRemovable, Object[] aRecipe) { + private static boolean addShapelessCraftingRecipe( + ItemStack aResult, + Enchantment[] aEnchantmentsAdded, + int[] aEnchantmentLevelsAdded, + boolean aBuffered, + boolean aKeepNBT, + boolean aDismantleable, + boolean aRemovable, + Object[] aRecipe) { aResult = GT_OreDictUnificator.get(true, aResult); if (aRecipe == null || aRecipe.length <= 0) return false; for (byte i = 0; i < aRecipe.length; i++) { - if (aRecipe[i] instanceof IItemContainer) - aRecipe[i] = ((IItemContainer) aRecipe[i]).get(1); - else if (aRecipe[i] instanceof Enum) - aRecipe[i] = ((Enum) aRecipe[i]).name(); - else if (!(aRecipe[i] == null || aRecipe[i] instanceof ItemStack || aRecipe[i] instanceof String || aRecipe[i] instanceof Character)) - aRecipe[i] = aRecipe[i].toString(); + if (aRecipe[i] instanceof IItemContainer) aRecipe[i] = ((IItemContainer) aRecipe[i]).get(1); + else if (aRecipe[i] instanceof Enum) aRecipe[i] = ((Enum) aRecipe[i]).name(); + else if (!(aRecipe[i] == null + || aRecipe[i] instanceof ItemStack + || aRecipe[i] instanceof String + || aRecipe[i] instanceof Character)) aRecipe[i] = aRecipe[i].toString(); } try { ItemStack[] tRecipe = new ItemStack[9]; @@ -1168,7 +1387,8 @@ public class GT_ModHandler { for (Object tObject : aRecipe) { if (tObject == null) { if (D1) - GT_Log.err.println("WARNING: Missing Item for shapeless Recipe: " + (aResult == null ? "null" : aResult.getDisplayName())); + GT_Log.err.println("WARNING: Missing Item for shapeless Recipe: " + + (aResult == null ? "null" : aResult.getDisplayName())); for (Object tContent : aRecipe) GT_Log.err.println(tContent); return false; } @@ -1180,10 +1400,8 @@ public class GT_ModHandler { } i++; } - if (sBufferCraftingRecipes && aBuffered) - removeRecipeDelayed(tRecipe); - else - removeRecipe(tRecipe); + if (sBufferCraftingRecipes && aBuffered) removeRecipeDelayed(tRecipe); + else removeRecipe(tRecipe); } catch (Throwable e) { e.printStackTrace(GT_Log.err); } @@ -1196,9 +1414,23 @@ public class GT_ModHandler { GT_Utility.updateItemStack(aResult); if (sBufferCraftingRecipes && aBuffered) - sBufferRecipeList.add(new GT_Shapeless_Recipe(GT_Utility.copyOrNull(aResult), aDismantleable, aRemovable, aKeepNBT, aEnchantmentsAdded, aEnchantmentLevelsAdded, aRecipe)); + sBufferRecipeList.add(new GT_Shapeless_Recipe( + GT_Utility.copyOrNull(aResult), + aDismantleable, + aRemovable, + aKeepNBT, + aEnchantmentsAdded, + aEnchantmentLevelsAdded, + aRecipe)); else - GameRegistry.addRecipe(new GT_Shapeless_Recipe(GT_Utility.copyOrNull(aResult), aDismantleable, aRemovable, aKeepNBT, aEnchantmentsAdded, aEnchantmentLevelsAdded, aRecipe)); + GameRegistry.addRecipe(new GT_Shapeless_Recipe( + GT_Utility.copyOrNull(aResult), + aDismantleable, + aRemovable, + aKeepNBT, + aEnchantmentsAdded, + aEnchantmentLevelsAdded, + aRecipe)); return true; } @@ -1228,28 +1460,37 @@ public class GT_ModHandler { if (Arrays.stream(aRecipe).noneMatch(Objects::nonNull)) return null; ItemStack rReturn = null; - InventoryCrafting aCrafting = new InventoryCrafting(new Container() { - @Override - public boolean canInteractWith(EntityPlayer player) { - return false; - } - }, 3, 3); + InventoryCrafting aCrafting = new InventoryCrafting( + new Container() { + @Override + public boolean canInteractWith(EntityPlayer player) { + return false; + } + }, + 3, + 3); for (int i = 0; i < aRecipe.length && i < 9; i++) aCrafting.setInventorySlotContents(i, aRecipe[i]); - ArrayList<IRecipe> tList = (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList(); - int tList_sS=tList.size(); + ArrayList<IRecipe> tList = + (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList(); + int tList_sS = tList.size(); try { for (int i = 0; i < tList_sS; i++) { for (; i < tList_sS; i++) { - if ((!(tList.get(i) instanceof IGT_CraftingRecipe) || ((IGT_CraftingRecipe) tList.get(i)).isRemovable()) && tList.get(i).matches(aCrafting, DW)) { + if ((!(tList.get(i) instanceof IGT_CraftingRecipe) + || ((IGT_CraftingRecipe) tList.get(i)).isRemovable()) + && tList.get(i).matches(aCrafting, DW)) { rReturn = tList.get(i).getCraftingResult(aCrafting); - if (rReturn != null) tList.remove(i--); tList_sS=tList.size(); + if (rReturn != null) tList.remove(i--); + tList_sS = tList.size(); } } - }} catch (Throwable e) {e.printStackTrace(GT_Log.err);} + } + } catch (Throwable e) { + e.printStackTrace(GT_Log.err); + } return rReturn; } - public static void removeRecipeDelayed(ItemStack... aRecipe) { if (!sBufferCraftingRecipes) { removeRecipe(aRecipe); @@ -1259,42 +1500,50 @@ public class GT_ModHandler { if (aRecipe == null) return; if (Arrays.stream(aRecipe).noneMatch(Objects::nonNull)) return; - InventoryCrafting aCrafting = new InventoryCrafting(new Container() { - @Override - public boolean canInteractWith(EntityPlayer player) { - return false; - } - }, 3, 3); + InventoryCrafting aCrafting = new InventoryCrafting( + new Container() { + @Override + public boolean canInteractWith(EntityPlayer player) { + return false; + } + }, + 3, + 3); for (int i = 0; i < aRecipe.length && i < 9; i++) aCrafting.setInventorySlotContents(i, aRecipe[i]); delayedRemovalByRecipe.add(aCrafting); } @SuppressWarnings("unchecked") public static void bulkRemoveByRecipe(List<InventoryCrafting> toRemove) { - ArrayList<IRecipe> tList = (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList(); - GT_FML_LOGGER.info("BulkRemoveByRecipe: tList: " + tList.size() + " toRemove: " + toRemove.size() ); + ArrayList<IRecipe> tList = + (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList(); + GT_FML_LOGGER.info("BulkRemoveByRecipe: tList: " + tList.size() + " toRemove: " + toRemove.size()); - Set<IRecipe> tListToRemove = tList.parallelStream().filter(tRecipe -> { - if ((tRecipe instanceof IGT_CraftingRecipe) && !((IGT_CraftingRecipe) tRecipe).isRemovable()) return false; - return toRemove.stream().anyMatch(aCrafting -> tRecipe.matches(aCrafting, DW)); - }).collect(Collectors.toSet()); + Set<IRecipe> tListToRemove = tList.parallelStream() + .filter(tRecipe -> { + if ((tRecipe instanceof IGT_CraftingRecipe) && !((IGT_CraftingRecipe) tRecipe).isRemovable()) + return false; + return toRemove.stream().anyMatch(aCrafting -> tRecipe.matches(aCrafting, DW)); + }) + .collect(Collectors.toSet()); tList.removeIf(tListToRemove::contains); } public static boolean removeRecipeByOutputDelayed(ItemStack aOutput) { - if (sBufferCraftingRecipes) - return delayedRemovalByOutput.add(aOutput); - else - return removeRecipeByOutput(aOutput); + if (sBufferCraftingRecipes) return delayedRemovalByOutput.add(aOutput); + else return removeRecipeByOutput(aOutput); } - public static boolean removeRecipeByOutputDelayed (ItemStack aOutput, boolean aIgnoreNBT, boolean aNotRemoveShapelessRecipes, boolean aOnlyRemoveNativeHandlers) { + public static boolean removeRecipeByOutputDelayed( + ItemStack aOutput, + boolean aIgnoreNBT, + boolean aNotRemoveShapelessRecipes, + boolean aOnlyRemoveNativeHandlers) { if (sBufferCraftingRecipes && (aIgnoreNBT && !aNotRemoveShapelessRecipes && !aOnlyRemoveNativeHandlers)) // Too lazy to handle deferred versions of the parameters that aren't used very often return delayedRemovalByOutput.add(aOutput); - else - return removeRecipeByOutput(aOutput, aIgnoreNBT, aNotRemoveShapelessRecipes, aOnlyRemoveNativeHandlers); + else return removeRecipeByOutput(aOutput, aIgnoreNBT, aNotRemoveShapelessRecipes, aOnlyRemoveNativeHandlers); } public static boolean removeRecipeByOutput(ItemStack aOutput) { @@ -1307,27 +1556,31 @@ public class GT_ModHandler { * @param aOutput The output of the Recipe. * @return if it has removed at least one Recipe. */ - public static boolean removeRecipeByOutput(ItemStack aOutput, boolean aIgnoreNBT, boolean aNotRemoveShapelessRecipes, boolean aOnlyRemoveNativeHandlers) { + public static boolean removeRecipeByOutput( + ItemStack aOutput, + boolean aIgnoreNBT, + boolean aNotRemoveShapelessRecipes, + boolean aOnlyRemoveNativeHandlers) { if (aOutput == null) return false; boolean rReturn = false; - ArrayList<IRecipe> tList = (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList(); + ArrayList<IRecipe> tList = + (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList(); aOutput = GT_OreDictUnificator.get(aOutput); - int tList_sS=tList.size(); + int tList_sS = tList.size(); for (int i = 0; i < tList_sS; i++) { IRecipe tRecipe = tList.get(i); - if (aNotRemoveShapelessRecipes && (tRecipe instanceof ShapelessRecipes || tRecipe instanceof ShapelessOreRecipe)) - continue; + if (aNotRemoveShapelessRecipes + && (tRecipe instanceof ShapelessRecipes || tRecipe instanceof ShapelessOreRecipe)) continue; if (aOnlyRemoveNativeHandlers) { if (!sNativeRecipeClasses.contains(tRecipe.getClass().getName())) continue; } else { if (sSpecialRecipeClasses.contains(tRecipe.getClass().getName())) continue; } ItemStack tStack = tRecipe.getRecipeOutput(); - if ( - (!(tRecipe instanceof IGT_CraftingRecipe) || ((IGT_CraftingRecipe) tRecipe).isRemovable()) - && GT_Utility.areStacksEqual(GT_OreDictUnificator.get(tStack), aOutput, aIgnoreNBT) - ) { - tList.remove(i--); tList_sS=tList.size(); + if ((!(tRecipe instanceof IGT_CraftingRecipe) || ((IGT_CraftingRecipe) tRecipe).isRemovable()) + && GT_Utility.areStacksEqual(GT_OreDictUnificator.get(tStack), aOutput, aIgnoreNBT)) { + tList.remove(i--); + tList_sS = tList.size(); rReturn = true; } } @@ -1335,18 +1588,23 @@ public class GT_ModHandler { } public static boolean bulkRemoveRecipeByOutput(List<ItemStack> toRemove) { - ArrayList<IRecipe> tList = (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList(); + ArrayList<IRecipe> tList = + (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList(); - Set<ItemStack> setToRemove = toRemove.parallelStream().map(GT_OreDictUnificator::get_nocopy).collect(Collectors.toSet()); + Set<ItemStack> setToRemove = + toRemove.parallelStream().map(GT_OreDictUnificator::get_nocopy).collect(Collectors.toSet()); - GT_FML_LOGGER.info("BulkRemoveRecipeByOutput: tList: " + tList.size() + " setToRemove: " + setToRemove.size() ); + GT_FML_LOGGER.info("BulkRemoveRecipeByOutput: tList: " + tList.size() + " setToRemove: " + setToRemove.size()); - Set<IRecipe> tListToRemove = tList.parallelStream().filter(tRecipe -> { - if ((tRecipe instanceof IGT_CraftingRecipe) && !((IGT_CraftingRecipe) tRecipe).isRemovable()) return false; - if (sSpecialRecipeClasses.contains(tRecipe.getClass().getName())) return false; - final ItemStack tStack = GT_OreDictUnificator.get_nocopy(tRecipe.getRecipeOutput()); - return setToRemove.stream().anyMatch(aOutput -> GT_Utility.areStacksEqual(tStack, aOutput, true)); - }).collect(Collectors.toSet()); + Set<IRecipe> tListToRemove = tList.parallelStream() + .filter(tRecipe -> { + if ((tRecipe instanceof IGT_CraftingRecipe) && !((IGT_CraftingRecipe) tRecipe).isRemovable()) + return false; + if (sSpecialRecipeClasses.contains(tRecipe.getClass().getName())) return false; + final ItemStack tStack = GT_OreDictUnificator.get_nocopy(tRecipe.getRecipeOutput()); + return setToRemove.stream().anyMatch(aOutput -> GT_Utility.areStacksEqual(tStack, aOutput, true)); + }) + .collect(Collectors.toSet()); tList.removeIf(tListToRemove::contains); return true; @@ -1369,12 +1627,15 @@ public class GT_ModHandler { } } if (!temp) return null; - InventoryCrafting aCrafting = new InventoryCrafting(new Container() { - @Override - public boolean canInteractWith(EntityPlayer player) { - return false; - } - }, 3, 3); + InventoryCrafting aCrafting = new InventoryCrafting( + new Container() { + @Override + public boolean canInteractWith(EntityPlayer player) { + return false; + } + }, + 3, + 3); for (int i = 0; i < 9 && i < aRecipe.length; i++) aCrafting.setInventorySlotContents(i, aRecipe[i]); List<IRecipe> tList = CraftingManager.getInstance().getRecipeList(); synchronized (sAllRecipeList) { @@ -1407,8 +1668,14 @@ public class GT_ModHandler { if (tIndex == 2) { assert tStack1 != null && tStack2 != null; - if (tStack1.getItem() == tStack2.getItem() && tStack1.stackSize == 1 && tStack2.stackSize == 1 && tStack1.getItem().isRepairable()) { - int tNewDamage = tStack1.getMaxDamage() + tStack1.getItemDamage() - tStack2.getItemDamage() + tStack1.getMaxDamage() / 20; + if (tStack1.getItem() == tStack2.getItem() + && tStack1.stackSize == 1 + && tStack2.stackSize == 1 + && tStack1.getItem().isRepairable()) { + int tNewDamage = tStack1.getMaxDamage() + + tStack1.getItemDamage() + - tStack2.getItemDamage() + + tStack1.getMaxDamage() / 20; return new ItemStack(tStack1.getItem(), 1, tNewDamage < 0 ? 0 : tNewDamage); } } @@ -1425,7 +1692,7 @@ public class GT_ModHandler { } public static ItemStack getRecipeOutputNoOreDict(ItemStack... aRecipe) { - return getRecipeOutput(false,false, aRecipe); + return getRecipeOutput(false, false, aRecipe); } public static ItemStack getRecipeOutput(boolean aUncopiedStack, ItemStack... aRecipe) { @@ -1440,14 +1707,18 @@ public class GT_ModHandler { public static ItemStack getRecipeOutput(boolean aUncopiedStack, boolean allowOreDict, ItemStack... aRecipe) { if (aRecipe == null || Arrays.stream(aRecipe).noneMatch(Objects::nonNull)) return null; - InventoryCrafting aCrafting = new InventoryCrafting(new Container() { - @Override - public boolean canInteractWith(EntityPlayer player) { - return false; - } - }, 3, 3); + InventoryCrafting aCrafting = new InventoryCrafting( + new Container() { + @Override + public boolean canInteractWith(EntityPlayer player) { + return false; + } + }, + 3, + 3); for (int i = 0; i < 9 && i < aRecipe.length; i++) aCrafting.setInventorySlotContents(i, aRecipe[i]); - ArrayList<IRecipe> tList = (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList(); + ArrayList<IRecipe> tList = + (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList(); boolean found = false; for (IRecipe iRecipe : tList) { @@ -1464,7 +1735,8 @@ public class GT_ModHandler { if (tOutput == null || tOutput.stackSize <= 0) { // Seriously, who would ever do that shit? if (!GregTech_API.sPostloadFinished) - throw new GT_ItsNotMyFaultException("Seems another Mod added a Crafting Recipe with null Output. Tell the Developer of said Mod to fix that."); + throw new GT_ItsNotMyFaultException( + "Seems another Mod added a Crafting Recipe with null Output. Tell the Developer of said Mod to fix that."); } else { if (aUncopiedStack) return tOutput; return GT_Utility.copyOrNull(tOutput); @@ -1483,15 +1755,26 @@ public class GT_ModHandler { if (!GregTech_API.sPostloadStarted || GregTech_API.sPostloadFinished) sSingleNonBlockDamagableRecipeList.clear(); if (sSingleNonBlockDamagableRecipeList.isEmpty()) { - for (IRecipe tRecipe : (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList()) { + for (IRecipe tRecipe : + (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList()) { ItemStack tStack = tRecipe.getRecipeOutput(); - if (GT_Utility.isStackValid(tStack) && tStack.getMaxStackSize() == 1 && tStack.getMaxDamage() > 0 && !(tStack.getItem() instanceof ItemBlock) && !(tStack.getItem() instanceof IReactorComponent) && !isElectricItem(tStack) && !GT_Utility.isStackInList(tStack, sNonReplaceableItems)) { + if (GT_Utility.isStackValid(tStack) + && tStack.getMaxStackSize() == 1 + && tStack.getMaxDamage() > 0 + && !(tStack.getItem() instanceof ItemBlock) + && !(tStack.getItem() instanceof IReactorComponent) + && !isElectricItem(tStack) + && !GT_Utility.isStackInList(tStack, sNonReplaceableItems)) { if (!(tRecipe instanceof ShapelessRecipes || tRecipe instanceof ShapelessOreRecipe)) { if (tRecipe instanceof ShapedOreRecipe) { boolean temp = true; for (Object tObject : ((ShapedOreRecipe) tRecipe).getInput()) if (tObject != null) { - if (tObject instanceof ItemStack && (((ItemStack) tObject).getItem() == null || ((ItemStack) tObject).getMaxStackSize() < 2 || ((ItemStack) tObject).getMaxDamage() > 0 || ((ItemStack) tObject).getItem() instanceof ItemBlock)) { + if (tObject instanceof ItemStack + && (((ItemStack) tObject).getItem() == null + || ((ItemStack) tObject).getMaxStackSize() < 2 + || ((ItemStack) tObject).getMaxDamage() > 0 + || ((ItemStack) tObject).getItem() instanceof ItemBlock)) { temp = false; break; } @@ -1504,7 +1787,11 @@ public class GT_ModHandler { } else if (tRecipe instanceof ShapedRecipes) { boolean temp = true; for (ItemStack tObject : ((ShapedRecipes) tRecipe).recipeItems) { - if (tObject != null && (tObject.getItem() == null || tObject.getMaxStackSize() < 2 || tObject.getMaxDamage() > 0 || tObject.getItem() instanceof ItemBlock)) { + if (tObject != null + && (tObject.getItem() == null + || tObject.getMaxStackSize() < 2 + || tObject.getMaxDamage() > 0 + || tObject.getItem() instanceof ItemBlock)) { temp = false; break; } @@ -1516,7 +1803,11 @@ public class GT_ModHandler { } } } - GT_Log.out.println("GT_Mod: Created a List of Tool Recipes containing " + sSingleNonBlockDamagableRecipeList.size() + " Recipes for recycling." + (sSingleNonBlockDamagableRecipeList.size() > 1024 ? " Scanning all these Recipes is the reason for the startup Lag you receive right now." : E)); + GT_Log.out.println("GT_Mod: Created a List of Tool Recipes containing " + + sSingleNonBlockDamagableRecipeList.size() + " Recipes for recycling." + + (sSingleNonBlockDamagableRecipeList.size() > 1024 + ? " Scanning all these Recipes is the reason for the startup Lag you receive right now." + : E)); } List<ItemStack> rList = getRecipeOutputs(sSingleNonBlockDamagableRecipeList, true, aRecipe); if (!GregTech_API.sPostloadStarted || GregTech_API.sPostloadFinished) @@ -1542,20 +1833,22 @@ public class GT_ModHandler { public static List<ItemStack> getRecipeOutputsBuffered(ItemStack... aRecipe) { if (bufferedRecipes == null) - bufferedRecipes = (List<IRecipe>) CraftingManager.getInstance().getRecipeList().stream().filter( - tRecipe -> !(tRecipe instanceof ShapelessRecipes) && !(tRecipe instanceof ShapelessOreRecipe) && !(tRecipe instanceof IGT_CraftingRecipe) - ) - .filter(tRecipe -> - { - try { - ItemStack tOutput = ((IRecipe) tRecipe).getRecipeOutput(); - if (tOutput.stackSize == 1 && tOutput.getMaxDamage() > 0 && tOutput.getMaxStackSize() == 1) { - return true; - } - } catch (Exception ignored) { - } - return false; - }) + bufferedRecipes = (List<IRecipe>) CraftingManager.getInstance().getRecipeList().stream() + .filter(tRecipe -> !(tRecipe instanceof ShapelessRecipes) + && !(tRecipe instanceof ShapelessOreRecipe) + && !(tRecipe instanceof IGT_CraftingRecipe)) + .filter(tRecipe -> { + try { + ItemStack tOutput = ((IRecipe) tRecipe).getRecipeOutput(); + if (tOutput.stackSize == 1 + && tOutput.getMaxDamage() > 0 + && tOutput.getMaxStackSize() == 1) { + return true; + } + } catch (Exception ignored) { + } + return false; + }) .collect(Collectors.toList()); return getRecipeOutputs(bufferedRecipes, false, aRecipe); } @@ -1566,59 +1859,66 @@ public class GT_ModHandler { */ public static List<ItemStack> getRecipeOutputs(List<IRecipe> aList, boolean aDeleteFromList, ItemStack... aRecipe) { List<ItemStack> rList = new ArrayList<>(); - if (aRecipe == null || Arrays.stream(aRecipe).noneMatch(Objects::nonNull)) - return rList; - InventoryCrafting aCrafting = new InventoryCrafting(new Container() { - @Override - public boolean canInteractWith(EntityPlayer player) { - return false; - } - }, 3, 3); - for (int i = 0; i < 9 && i < aRecipe.length; i++) - aCrafting.setInventorySlotContents(i, aRecipe[i]); + if (aRecipe == null || Arrays.stream(aRecipe).noneMatch(Objects::nonNull)) return rList; + InventoryCrafting aCrafting = new InventoryCrafting( + new Container() { + @Override + public boolean canInteractWith(EntityPlayer player) { + return false; + } + }, + 3, + 3); + for (int i = 0; i < 9 && i < aRecipe.length; i++) aCrafting.setInventorySlotContents(i, aRecipe[i]); if (!aDeleteFromList) { HashSet<ItemStack> stacks = new HashSet<>(); - aList.stream().filter( - tRecipe -> { - if (tRecipe instanceof ShapelessRecipes || tRecipe instanceof ShapelessOreRecipe || tRecipe instanceof IGT_CraftingRecipe) - return false; + aList.stream() + .filter(tRecipe -> { + if (tRecipe instanceof ShapelessRecipes + || tRecipe instanceof ShapelessOreRecipe + || tRecipe instanceof IGT_CraftingRecipe) return false; try { return tRecipe.matches(aCrafting, DW); } catch (Throwable e) { e.printStackTrace(GT_Log.err); return false; } - } - ).forEach(tRecipe -> stacks.add(tRecipe.getCraftingResult(aCrafting))); - rList = stacks.stream().filter(tOutput -> tOutput.stackSize == 1 && tOutput.getMaxDamage() > 0 && tOutput.getMaxStackSize() == 1).collect(Collectors.toList()); - } else for (Iterator<IRecipe> iterator = aList.iterator(); iterator.hasNext(); ) { - IRecipe tRecipe = iterator.next(); - boolean matched = false; - - try { - matched = tRecipe.matches(aCrafting, DW); - } catch (Throwable e) { - e.printStackTrace(GT_Log.err); - } - if (matched) { - ItemStack tOutput = tRecipe.getCraftingResult(aCrafting); + }) + .forEach(tRecipe -> stacks.add(tRecipe.getCraftingResult(aCrafting))); + rList = stacks.stream() + .filter(tOutput -> + tOutput.stackSize == 1 && tOutput.getMaxDamage() > 0 && tOutput.getMaxStackSize() == 1) + .collect(Collectors.toList()); + } else + for (Iterator<IRecipe> iterator = aList.iterator(); iterator.hasNext(); ) { + IRecipe tRecipe = iterator.next(); + boolean matched = false; - if (tOutput == null || tOutput.stackSize <= 0) { - // Seriously, who would ever do that shit? - if (!GregTech_API.sPostloadFinished) - throw new GT_ItsNotMyFaultException("Seems another Mod added a Crafting Recipe with null Output. Tell the Developer of said Mod to fix that."); - continue; + try { + matched = tRecipe.matches(aCrafting, DW); + } catch (Throwable e) { + e.printStackTrace(GT_Log.err); + } + if (matched) { + ItemStack tOutput = tRecipe.getCraftingResult(aCrafting); + + if (tOutput == null || tOutput.stackSize <= 0) { + // Seriously, who would ever do that shit? + if (!GregTech_API.sPostloadFinished) + throw new GT_ItsNotMyFaultException( + "Seems another Mod added a Crafting Recipe with null Output. Tell the Developer of said Mod to fix that."); + continue; + } + if (tOutput.stackSize != 1) continue; + if (tOutput.getMaxDamage() <= 0) continue; + if (tOutput.getMaxStackSize() != 1) continue; + if (tRecipe instanceof ShapelessRecipes) continue; + if (tRecipe instanceof ShapelessOreRecipe) continue; + if (tRecipe instanceof IGT_CraftingRecipe) continue; + rList.add(GT_Utility.copyOrNull(tOutput)); + iterator.remove(); } - if (tOutput.stackSize != 1) continue; - if (tOutput.getMaxDamage() <= 0) continue; - if (tOutput.getMaxStackSize() != 1) continue; - if (tRecipe instanceof ShapelessRecipes) continue; - if (tRecipe instanceof ShapelessOreRecipe) continue; - if (tRecipe instanceof IGT_CraftingRecipe) continue; - rList.add(GT_Utility.copyOrNull(tOutput)); - iterator.remove(); } - } return rList; } @@ -1627,7 +1927,8 @@ public class GT_ModHandler { */ @Deprecated public static ItemStack getMaceratorOutput(ItemStack aInput, boolean aRemoveInput, ItemStack aOutputSlot) { - return GT_Utility.copyOrNull(getMachineOutput(aInput, getMaceratorRecipeList(), aRemoveInput, new NBTTagCompound(), aOutputSlot)[0]); + return GT_Utility.copyOrNull( + getMachineOutput(aInput, getMaceratorRecipeList(), aRemoveInput, new NBTTagCompound(), aOutputSlot)[0]); } /** @@ -1635,7 +1936,8 @@ public class GT_ModHandler { */ @Deprecated public static ItemStack getExtractorOutput(ItemStack aInput, boolean aRemoveInput, ItemStack aOutputSlot) { - return GT_Utility.copyOrNull(getMachineOutput(aInput, getExtractorRecipeList(), aRemoveInput, new NBTTagCompound(), aOutputSlot)[0]); + return GT_Utility.copyOrNull( + getMachineOutput(aInput, getExtractorRecipeList(), aRemoveInput, new NBTTagCompound(), aOutputSlot)[0]); } /** @@ -1643,18 +1945,21 @@ public class GT_ModHandler { */ @Deprecated public static ItemStack getCompressorOutput(ItemStack aInput, boolean aRemoveInput, ItemStack aOutputSlot) { - return GT_Utility.copyOrNull(getMachineOutput(aInput, getCompressorRecipeList(), aRemoveInput, new NBTTagCompound(), aOutputSlot)[0]); + return GT_Utility.copyOrNull(getMachineOutput( + aInput, getCompressorRecipeList(), aRemoveInput, new NBTTagCompound(), aOutputSlot)[0]); } /** * Used in my own Furnace. */ public static ItemStack getSmeltingOutput(ItemStack aInput, boolean aRemoveInput, ItemStack aOutputSlot) { - if (aInput == null || aInput.stackSize < 1) - return null; + if (aInput == null || aInput.stackSize < 1) return null; ItemStack rStack = GT_OreDictUnificator.get(FurnaceRecipes.smelting().getSmeltingResult(aInput)); - if (rStack != null && (aOutputSlot == null || (GT_Utility.areStacksEqual(rStack, aOutputSlot) && rStack.stackSize + aOutputSlot.stackSize <= aOutputSlot.getMaxStackSize()))) { + if (rStack != null + && (aOutputSlot == null + || (GT_Utility.areStacksEqual(rStack, aOutputSlot) + && rStack.stackSize + aOutputSlot.stackSize <= aOutputSlot.getMaxStackSize()))) { if (aRemoveInput) aInput.stackSize--; return rStack; } @@ -1666,7 +1971,12 @@ public class GT_ModHandler { * <p/> * Checks also if there is enough Space in the Output Slots. */ - public static ItemStack[] getMachineOutput(ItemStack aInput, Map<IRecipeInput, RecipeOutput> aRecipeList, boolean aRemoveInput, NBTTagCompound rRecipeMetaData, ItemStack... aOutputSlots) { + public static ItemStack[] getMachineOutput( + ItemStack aInput, + Map<IRecipeInput, RecipeOutput> aRecipeList, + boolean aRemoveInput, + NBTTagCompound rRecipeMetaData, + ItemStack... aOutputSlots) { if (aOutputSlots == null || aOutputSlots.length <= 0) return new ItemStack[0]; if (aInput == null) return new ItemStack[aOutputSlots.length]; try { @@ -1679,7 +1989,10 @@ public class GT_ModHandler { rRecipeMetaData.setTag("return", tEntry.getValue().metadata); for (byte i = 0; i < aOutputSlots.length && i < tList.length; i++) { if (tList[i] != null) { - if (aOutputSlots[i] == null || (GT_Utility.areStacksEqual(tList[i], aOutputSlots[i]) && tList[i].stackSize + aOutputSlots[i].stackSize <= aOutputSlots[i].getMaxStackSize())) { + if (aOutputSlots[i] == null + || (GT_Utility.areStacksEqual(tList[i], aOutputSlots[i]) + && tList[i].stackSize + aOutputSlots[i].stackSize + <= aOutputSlots[i].getMaxStackSize())) { rList[i] = GT_Utility.copyOrNull(tList[i]); } else { return new ItemStack[aOutputSlots.length]; @@ -1711,10 +2024,14 @@ public class GT_ModHandler { if (ic2.api.recipe.Recipes.recyclerWhitelist.isEmpty()) return ic2.api.recipe.Recipes.recyclerBlacklist.contains(aInput) ? null : ItemList.IC2_Scrap.get(1); return ic2.api.recipe.Recipes.recyclerWhitelist.contains(aInput) ? ItemList.IC2_Scrap.get(1) : null; - } catch (Throwable e) {/*Do nothing*/} + } catch (Throwable e) { + /*Do nothing*/ + } try { return ic2.api.recipe.Recipes.recyclerBlacklist.contains(aInput) ? null : ItemList.IC2_Scrap.get(1); - } catch (Throwable e) {/*Do nothing*/} + } catch (Throwable e) { + /*Do nothing*/ + } return null; } @@ -1732,7 +2049,8 @@ public class GT_ModHandler { * * @return the actually used Energy. */ - public static int chargeElectricItem(ItemStack aStack, int aCharge, int aTier, boolean aIgnoreLimit, boolean aSimulate) { + public static int chargeElectricItem( + ItemStack aStack, int aCharge, int aTier, boolean aIgnoreLimit, boolean aSimulate) { try { if (isElectricItem(aStack)) { int tTier = ((ic2.api.item.IElectricItem) aStack.getItem()).getTier(aStack); @@ -1740,12 +2058,15 @@ public class GT_ModHandler { if (!aIgnoreLimit && tTier >= 0) aCharge = (int) Math.min(aCharge, V[Math.max(0, Math.min(V.length - 1, tTier))]); if (aCharge > 0) { - int rCharge = (int) Math.max(0.0, ic2.api.item.ElectricItem.manager.charge(aStack, aCharge, tTier, true, aSimulate)); + int rCharge = (int) Math.max( + 0.0, ic2.api.item.ElectricItem.manager.charge(aStack, aCharge, tTier, true, aSimulate)); return rCharge + (rCharge * 4 > aTier ? aTier : 0); } } } - } catch (Throwable e) {/*Do nothing*/} + } catch (Throwable e) { + /*Do nothing*/ + } return 0; } @@ -1756,22 +2077,43 @@ public class GT_ModHandler { * * @return the Energy got from the Item. */ - public static int dischargeElectricItem(ItemStack aStack, int aCharge, int aTier, boolean aIgnoreLimit, boolean aSimulate, boolean aIgnoreDischargability) { + public static int dischargeElectricItem( + ItemStack aStack, + int aCharge, + int aTier, + boolean aIgnoreLimit, + boolean aSimulate, + boolean aIgnoreDischargability) { try { -// if (isElectricItem(aStack) && (aIgnoreDischargability || ((ic2.api.item.IElectricItem)aStack.getItem()).canProvideEnergy(aStack))) { + // if (isElectricItem(aStack) && (aIgnoreDischargability || + // ((ic2.api.item.IElectricItem)aStack.getItem()).canProvideEnergy(aStack))) { if (isElectricItem(aStack)) { int tTier = ((ic2.api.item.IElectricItem) aStack.getItem()).getTier(aStack); if (tTier < 0 || tTier == aTier || aTier == Integer.MAX_VALUE) { if (!aIgnoreLimit && tTier >= 0) - aCharge = (int) Math.min(aCharge, V[Math.max(0, Math.min(V.length - 1, tTier))] + B[Math.max(0, Math.min(V.length - 1, tTier))]); + aCharge = (int) Math.min( + aCharge, + V[Math.max(0, Math.min(V.length - 1, tTier))] + + B[Math.max(0, Math.min(V.length - 1, tTier))]); if (aCharge > 0) { -// int rCharge = Math.max(0, ic2.api.item.ElectricItem.manager.discharge(aStack, aCharge + (aCharge * 4 > aTier ? aTier : 0), tTier, T, aSimulate)); - int rCharge = (int) Math.max(0, ic2.api.item.ElectricItem.manager.discharge(aStack, aCharge + (aCharge * 4 > aTier ? aTier : 0), tTier, true, !aIgnoreDischargability, aSimulate)); + // int rCharge = Math.max(0, ic2.api.item.ElectricItem.manager.discharge(aStack, aCharge + + // (aCharge * 4 > aTier ? aTier : 0), tTier, T, aSimulate)); + int rCharge = (int) Math.max( + 0, + ic2.api.item.ElectricItem.manager.discharge( + aStack, + aCharge + (aCharge * 4 > aTier ? aTier : 0), + tTier, + true, + !aIgnoreDischargability, + aSimulate)); return rCharge - (rCharge * 4 > aTier ? aTier : 0); } } } - } catch (Throwable e) {/*Do nothing*/} + } catch (Throwable e) { + /*Do nothing*/ + } return 0; } @@ -1785,7 +2127,9 @@ public class GT_ModHandler { if (isElectricItem(aStack)) { return ic2.api.item.ElectricItem.manager.canUse(aStack, aCharge); } - } catch (Throwable e) {/*Do nothing*/} + } catch (Throwable e) { + /*Do nothing*/ + } return false; } @@ -1802,7 +2146,9 @@ public class GT_ModHandler { return ic2.api.item.ElectricItem.manager.use(aStack, aCharge, aPlayer); } } - } catch (Throwable e) {/*Do nothing*/} + } catch (Throwable e) { + /*Do nothing*/ + } return false; } @@ -1820,7 +2166,8 @@ public class GT_ModHandler { if (aPlayer != null && aPlayer instanceof EntityPlayer) { return GT_ModHandler.useElectricItem(aStack, aDecharge, (EntityPlayer) aPlayer); } - return GT_ModHandler.dischargeElectricItem(aStack, aDecharge, Integer.MAX_VALUE, true, false, true) >= aDecharge; + return GT_ModHandler.dischargeElectricItem(aStack, aDecharge, Integer.MAX_VALUE, true, false, true) + >= aDecharge; } } else if (aStack.getItem().isDamageable()) { if (aPlayer == null) { @@ -1854,11 +2201,13 @@ public class GT_ModHandler { if (tPlayer.capabilities.isCreativeMode) return true; if (isElectricItem(aStack) && ic2.api.item.ElectricItem.manager.getCharge(aStack) > 1000.0d) { if (consumeSolderingMaterial(tPlayer) - || (aExternalInventory != null && consumeSolderingMaterial(aExternalInventory))) { - if (canUseElectricItem(aStack, 10000)) { + || (aExternalInventory != null && consumeSolderingMaterial(aExternalInventory))) { + if (canUseElectricItem(aStack, 10000)) { return GT_ModHandler.useElectricItem(aStack, 10000, (EntityPlayer) aPlayer); } - GT_ModHandler.useElectricItem(aStack, (int) ic2.api.item.ElectricItem.manager.getCharge(aStack), (EntityPlayer) aPlayer); + GT_ModHandler.useElectricItem( + aStack, (int) ic2.api.item.ElectricItem.manager.getCharge(aStack), (EntityPlayer) + aPlayer); return false; } } @@ -1875,7 +2224,7 @@ public class GT_ModHandler { } public static boolean consumeSolderingMaterial(EntityPlayer aPlayer) { - if (aPlayer.capabilities.isCreativeMode) return true; + if (aPlayer.capabilities.isCreativeMode) return true; if (consumeSolderingMaterial(aPlayer.inventory)) { if (aPlayer.inventoryContainer != null) { aPlayer.inventoryContainer.detectAndSendChanges(); @@ -1914,7 +2263,9 @@ public class GT_ModHandler { if (isElectricItem(aStack)) { return ((ic2.api.item.IElectricItem) aStack.getItem()).canProvideEnergy(aStack); } - } catch (Throwable e) {/*Do nothing*/} + } catch (Throwable e) { + /*Do nothing*/ + } return false; } @@ -1923,15 +2274,23 @@ public class GT_ModHandler { */ public static boolean isElectricItem(ItemStack aStack) { try { - return aStack != null && aStack.getItem() instanceof ic2.api.item.IElectricItem && ((IElectricItem) aStack.getItem()).getTier(aStack) < Integer.MAX_VALUE; - } catch (Throwable e) {/*Do nothing*/} + return aStack != null + && aStack.getItem() instanceof ic2.api.item.IElectricItem + && ((IElectricItem) aStack.getItem()).getTier(aStack) < Integer.MAX_VALUE; + } catch (Throwable e) { + /*Do nothing*/ + } return false; } public static boolean isElectricItem(ItemStack aStack, byte aTier) { try { - return aStack != null && aStack.getItem() instanceof ic2.api.item.IElectricItem && ((IElectricItem) aStack.getItem()).getTier(aStack) == aTier; - } catch (Throwable e) {/*Do nothing*/} + return aStack != null + && aStack.getItem() instanceof ic2.api.item.IElectricItem + && ((IElectricItem) aStack.getItem()).getTier(aStack) == aTier; + } catch (Throwable e) { + /*Do nothing*/ + } return false; } @@ -1942,7 +2301,9 @@ public class GT_ModHandler { if (aStack != null) { try { ic2.api.item.ItemWrapper.registerBoxable(aStack.getItem(), (IBoxable) sBoxableWrapper); - } catch (Throwable ignored) {/*Do nothing*/} + } catch (Throwable ignored) { + /*Do nothing*/ + } sBoxableItems.add(new GT_ItemStack(aStack)); } } @@ -2042,58 +2403,56 @@ public class GT_ModHandler { * Copy of the original Helper Class of Thermal Expansion, just to make sure it works even when other Mods include TE-APIs */ public static class ThermalExpansion { - public static void addFurnaceRecipe(int energy, ItemStack input, ItemStack output) { + public static void addFurnaceRecipe(int energy, ItemStack input, ItemStack output) {} - } - - public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput) { - } - - public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput) { - } + public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput) {} - public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) { - } + public static void addPulverizerRecipe( + int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput) {} - public static void addSawmillRecipe(int energy, ItemStack input, ItemStack primaryOutput) { - } + public static void addPulverizerRecipe( + int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) {} - public static void addSawmillRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput) { - } + public static void addSawmillRecipe(int energy, ItemStack input, ItemStack primaryOutput) {} - public static void addSawmillRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) { - - } + public static void addSawmillRecipe( + int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput) {} - public static void addSmelterRecipe(int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack primaryOutput) { - } + public static void addSawmillRecipe( + int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) {} - public static void addSmelterRecipe(int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack primaryOutput, ItemStack secondaryOutput) { - } + public static void addSmelterRecipe( + int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack primaryOutput) {} - public static void addSmelterRecipe(int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) { + public static void addSmelterRecipe( + int energy, + ItemStack primaryInput, + ItemStack secondaryInput, + ItemStack primaryOutput, + ItemStack secondaryOutput) {} - } + public static void addSmelterRecipe( + int energy, + ItemStack primaryInput, + ItemStack secondaryInput, + ItemStack primaryOutput, + ItemStack secondaryOutput, + int secondaryChance) {} - public static void addSmelterBlastOre(Materials aMaterial) { - } + public static void addSmelterBlastOre(Materials aMaterial) {} - public static void addCrucibleRecipe(int energy, ItemStack input, FluidStack output) { - } + public static void addCrucibleRecipe(int energy, ItemStack input, FluidStack output) {} - public static void addTransposerFill(int energy, ItemStack input, ItemStack output, FluidStack fluid, boolean reversible) { - } + public static void addTransposerFill( + int energy, ItemStack input, ItemStack output, FluidStack fluid, boolean reversible) {} - public static void addTransposerExtract(int energy, ItemStack input, ItemStack output, FluidStack fluid, int chance, boolean reversible) { - } + public static void addTransposerExtract( + int energy, ItemStack input, ItemStack output, FluidStack fluid, int chance, boolean reversible) {} - public static void addMagmaticFuel(String fluidName, int energy) { - } + public static void addMagmaticFuel(String fluidName, int energy) {} - public static void addCompressionFuel(String fluidName, int energy) { - } + public static void addCompressionFuel(String fluidName, int energy) {} - public static void addCoolant(String fluidName, int energy) { - } + public static void addCoolant(String fluidName, int energy) {} } } diff --git a/src/main/java/gregtech/api/util/GT_Multiblock_Tooltip_Builder.java b/src/main/java/gregtech/api/util/GT_Multiblock_Tooltip_Builder.java index 197d2bdaa5..626ca2690f 100644 --- a/src/main/java/gregtech/api/util/GT_Multiblock_Tooltip_Builder.java +++ b/src/main/java/gregtech/api/util/GT_Multiblock_Tooltip_Builder.java @@ -3,16 +3,14 @@ package gregtech.api.util; import com.google.common.collect.Multimaps; import com.google.common.collect.SetMultimap; import com.gtnewhorizon.structurelib.StructureLibAPI; -import gregtech.api.enums.Materials; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; - import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.stream.IntStream; import java.util.stream.Stream; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; /** * This makes it easier to build multi tooltips, with a standardized format. <br> @@ -38,433 +36,437 @@ import java.util.stream.Stream; * Originally created by kekzdealer */ public class GT_Multiblock_Tooltip_Builder { - private static final String TAB = " "; - private static final String COLON = ": "; - private static final String SEPARATOR = ", "; - - private final List<String> iLines; - private final List<String> sLines; - private final List<String> hLines; - private final SetMultimap<Integer, String> hBlocks; - - private String[] iArray; - private String[] sArray; - private String[] hArray; - - //Localized tooltips - private static final String TT_machineType = StatCollector.translateToLocal("GT5U.MBTT.MachineType"); - private static final String TT_dimensions = StatCollector.translateToLocal("GT5U.MBTT.Dimensions"); - private static final String TT_hollow = StatCollector.translateToLocal("GT5U.MBTT.Hollow"); - private static final String TT_structure = StatCollector.translateToLocal("GT5U.MBTT.Structure"); - private static final String TT_controller = StatCollector.translateToLocal("GT5U.MBTT.Controller"); - private static final String TT_minimum = StatCollector.translateToLocal("GT5U.MBTT.Minimum"); - private static final String TT_maintenancehatch = StatCollector.translateToLocal("GT5U.MBTT.MaintenanceHatch"); - private static final String TT_energyhatch = StatCollector.translateToLocal("GT5U.MBTT.EnergyHatch"); - private static final String TT_dynamohatch = StatCollector.translateToLocal("GT5U.MBTT.DynamoHatch"); - private static final String TT_mufflerhatch = StatCollector.translateToLocal("GT5U.MBTT.MufflerHatch"); - private static final String TT_inputbus = StatCollector.translateToLocal("GT5U.MBTT.InputBus"); - private static final String TT_inputhatch = StatCollector.translateToLocal("GT5U.MBTT.InputHatch"); - private static final String TT_outputbus = StatCollector.translateToLocal("GT5U.MBTT.OutputBus"); - private static final String TT_outputhatch = StatCollector.translateToLocal("GT5U.MBTT.OutputHatch"); - private static final String TT_causes = StatCollector.translateToLocal("GT5U.MBTT.Causes"); - private static final String TT_pps = StatCollector.translateToLocal("GT5U.MBTT.PPS"); - private static final String TT_hold = StatCollector.translateToLocal("GT5U.MBTT.Hold"); - private static final String TT_todisplay = StatCollector.translateToLocal("GT5U.MBTT.Display"); - private static final String TT_structurehint = StatCollector.translateToLocal("GT5U.MBTT.StructureHint"); - private static final String TT_mod = StatCollector.translateToLocal("GT5U.MBTT.Mod"); - private static final String TT_air = StatCollector.translateToLocal("GT5U.MBTT.Air"); - private static final String[] TT_dots = IntStream.range(0, 16).mapToObj(i -> StatCollector.translateToLocal("structurelib.blockhint." + i + ".name")).toArray(String[]::new); - - public GT_Multiblock_Tooltip_Builder() { - iLines = new LinkedList<>(); - sLines = new LinkedList<>(); - hLines = new LinkedList<>(); - hBlocks = Multimaps.newSetMultimap(new HashMap<>(), HashSet::new); - hBlocks.put(StructureLibAPI.HINT_BLOCK_META_AIR, TT_air); - } - - /** - * Add a line telling you what the machine type is. Usually, this will be the name of a SB version.<br> - * Machine Type: machine - * - * @param machine - * Name of the machine type - * - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addMachineType(String machine) { - iLines.add(TT_machineType + COLON + EnumChatFormatting.YELLOW + machine + EnumChatFormatting.RESET); - return this; - } - - /** - * Add a basic line of information about this structure - * - * @param info - * The line to be added. - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addInfo(String info) { - iLines.add(info); - return this; - } - - /** - * Add a separator line like this:<br> - * ----------------------------------------- - * - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addSeparator() { - iLines.add("-----------------------------------------"); - return this; - } - - /** - * Add a line telling how much this machine pollutes. - * - * @param pollution - * Amount of pollution per second when active - * - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addPollutionAmount(int pollution) { - iLines.add(TT_causes + COLON + EnumChatFormatting.DARK_PURPLE + pollution + " " + EnumChatFormatting.GRAY + TT_pps); - return this; - } - - /** - * Begin adding structural information by adding a line about the structure's dimensions - * and then inserting a "Structure:" line. - * - * @param w - * Structure width. - * @param h - * Structure height. - * @param l - * Structure depth/length. - * @param hollow - * T/F, adds a (hollow) comment if true - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder beginStructureBlock(int w, int h, int l, boolean hollow) { - if (hollow) { - sLines.add(TT_dimensions + COLON + w + "x" + h + "x" + l + " (WxHxL) " + TT_hollow); - } - else { - sLines.add(TT_dimensions + COLON + w + "x" + h + "x" + l + " (WxHxL)"); - } - sLines.add(TT_structure + COLON); - return this; - } - - /** - * Begin adding structural information by adding a line about the structure's dimensions<br> - * and then inserting a "Structure:" line. Variable version displays min and max - * - * @param wmin - * Structure min width. - * @param wmax - * Structure max width. - * @param hmin - * Structure min height. - * @param hmax - * Structure max height. - * @param lmin - * Structure min depth/length. - * @param lmax - * Structure max depth/length. - * @param hollow - * T/F, adds a (hollow) comment if true - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder beginVariableStructureBlock(int wmin, int wmax, int hmin, int hmax, int lmin, int lmax, boolean hollow) { - if (hollow) { - sLines.add(TT_dimensions + COLON + wmin + "-" + wmax + "x" + hmin + "-" + hmax + "x" + lmin + "-" + lmax + " (WxHxL) " + TT_hollow); - } - else { - sLines.add(TT_dimensions + COLON + wmin + "-" + wmax + "x" + hmin + "-" + hmax + "x" + lmin + "-" + lmax + " (WxHxL)"); - } - sLines.add(TT_structure + COLON); - return this; - } - - /** - * Add a line of information about the structure:<br> - * (indent)Controller: info - * @param info - * Positional information. - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addController(String info) { - sLines.add(TAB + TT_controller + COLON + info); - return this; - } - - /** - * Add a line of information about the structure:<br> - * (indent)minCountx casingName (minimum) - * @param casingName - * Name of the Casing. - * @param minCount - * Minimum needed for valid structure check. - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addCasingInfo(String casingName, int minCount) { - sLines.add(TAB + minCount +"x " + casingName + " " + TT_minimum); - return this; - } - - /** - * Use this method to add a structural part that isn't covered by the other methods.<br> - * (indent)name: info - * @param name - * Name of the hatch or other component. - * @param info - * Positional information. - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addOtherStructurePart(String name, String info) { - sLines.add(TAB + name + COLON + info); - return this; - } - - /** - * Add a line of information about the structure:<br> - * (indent)Maintenance Hatch: info - * @param info - * Positional information. - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addMaintenanceHatch(String info) { - sLines.add(TAB + TT_maintenancehatch + COLON + info); - return this; - } - - /** - * Add a line of information about the structure:<br> - * (indent)Muffler Hatch: info - * @param info - * Location where the hatch goes - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addMufflerHatch(String info) { - sLines.add(TAB + TT_mufflerhatch + COLON + info); - return this; - } - - /** - * Add a line of information about the structure:<br> - * (indent)Energy Hatch: info - * @param info - * Positional information. - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addEnergyHatch(String info) { - sLines.add(TAB + TT_energyhatch + COLON + info); - return this; - } - - /** - * Add a line of information about the structure:<br> - * (indent)Dynamo Hatch: info - * @param info - * Positional information. - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addDynamoHatch(String info) { - sLines.add(TAB + TT_dynamohatch + COLON + info); - return this; - } - - /** - * Add a line of information about the structure:<br> - * (indent)Input Bus: info - * @param info - * Location where the bus goes - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addInputBus(String info) { - sLines.add(TAB + TT_inputbus + COLON + info); - return this; - } - - /** - * Add a line of information about the structure:<br> - * (indent)Input Hatch: info - * @param info - * Location where the hatch goes - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addInputHatch(String info) { - sLines.add(TAB + TT_inputhatch + COLON + info); - return this; - } - - /** - * Add a line of information about the structure:<br> - * (indent)Output Bus: info - * @param info - * Location where the bus goes - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addOutputBus(String info) { - sLines.add(TAB + TT_outputbus + COLON + info); - return this; - } - - /** - * Add a line of information about the structure:<br> - * (indent)Output Hatch: info - * @param info - * Location where the bus goes - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addOutputHatch(String info) { - sLines.add(TAB + TT_outputhatch + COLON + info); - return this; - } - - /** - * Use this method to add a structural part that isn't covered by the other methods.<br> - * (indent)name: info - * @param name - * Name of the hatch or other component. - * @param info - * Positional information. - * @param dots - * The valid locations for this part when asked to display hints - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addOtherStructurePart(String name, String info, int... dots) { - sLines.add(TAB + name + COLON + info); - for (int dot : dots) hBlocks.put(dot, name); - return this; - } - - /** - * Add a line of information about the structure:<br> - * (indent)Maintenance Hatch: info - * - * @param info Positional information. - * @param dots The valid locations for this part when asked to display hints - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addMaintenanceHatch(String info, int... dots) { - sLines.add(TAB + TT_maintenancehatch + COLON + info); - for (int dot : dots) hBlocks.put(dot, TT_maintenancehatch); - return this; - } - - /** - * Add a line of information about the structure:<br> - * (indent)Muffler Hatch: info - * - * @param info Location where the hatch goes - * @param dots The valid locations for this part when asked to display hints - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addMufflerHatch(String info, int... dots) { - sLines.add(TAB + TT_mufflerhatch + COLON + info); - for (int dot : dots) hBlocks.put(dot, TT_mufflerhatch); - return this; - } - - /** - * Add a line of information about the structure:<br> - * (indent)Energy Hatch: info - * - * @param info Positional information. - * @param dots The valid locations for this part when asked to display hints - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addEnergyHatch(String info, int... dots) { - sLines.add(TAB + TT_energyhatch + COLON + info); - for (int dot : dots) hBlocks.put(dot, TT_energyhatch); - return this; - } - - /** - * Add a line of information about the structure:<br> - * (indent)Dynamo Hatch: info - * - * @param info Positional information. - * @param dots The valid locations for this part when asked to display hints - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addDynamoHatch(String info, int... dots) { - sLines.add(TAB + TT_dynamohatch + COLON + info); - for (int dot : dots) hBlocks.put(dot, TT_dynamohatch); - return this; - } - - /** - * Add a line of information about the structure:<br> - * (indent)Input Bus: info - * - * @param info Location where the bus goes - * @param dots The valid locations for this part when asked to display hints - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addInputBus(String info, int... dots) { - sLines.add(TAB + TT_inputbus + COLON + info); - for (int dot : dots) hBlocks.put(dot, TT_inputbus); - return this; - } - - /** - * Add a line of information about the structure:<br> - * (indent)Input Hatch: info - * - * @param info Location where the hatch goes - * @param dots The valid locations for this part when asked to display hints - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addInputHatch(String info, int... dots) { - sLines.add(TAB + TT_inputhatch + COLON + info); - for (int dot : dots) hBlocks.put(dot, TT_inputhatch); - return this; - } - - /** - * Add a line of information about the structure:<br> - * (indent)Output Bus: info - * - * @param info Location where the bus goes - * @param dots The valid locations for this part when asked to display hints - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addOutputBus(String info, int... dots) { - sLines.add(TAB + TT_outputbus + COLON + info); - for (int dot : dots) hBlocks.put(dot, TT_outputbus); - return this; - } - - /** - * Add a line of information about the structure:<br> - * (indent)Output Hatch: info - * - * @param info Location where the bus goes - * @param dots The valid locations for this part when asked to display hints - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addOutputHatch(String info, int... dots) { - sLines.add(TAB + TT_outputhatch + COLON + info); - for (int dot : dots) hBlocks.put(dot, TT_outputhatch); - return this; - } - - /** - * Use this method to add non-standard structural info.<br> - * (indent)info - * @param info - * The line to be added. - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addStructureInfo(String info) { - sLines.add(TAB + info); - return this; - } + private static final String TAB = " "; + private static final String COLON = ": "; + private static final String SEPARATOR = ", "; + + private final List<String> iLines; + private final List<String> sLines; + private final List<String> hLines; + private final SetMultimap<Integer, String> hBlocks; + + private String[] iArray; + private String[] sArray; + private String[] hArray; + + // Localized tooltips + private static final String TT_machineType = StatCollector.translateToLocal("GT5U.MBTT.MachineType"); + private static final String TT_dimensions = StatCollector.translateToLocal("GT5U.MBTT.Dimensions"); + private static final String TT_hollow = StatCollector.translateToLocal("GT5U.MBTT.Hollow"); + private static final String TT_structure = StatCollector.translateToLocal("GT5U.MBTT.Structure"); + private static final String TT_controller = StatCollector.translateToLocal("GT5U.MBTT.Controller"); + private static final String TT_minimum = StatCollector.translateToLocal("GT5U.MBTT.Minimum"); + private static final String TT_maintenancehatch = StatCollector.translateToLocal("GT5U.MBTT.MaintenanceHatch"); + private static final String TT_energyhatch = StatCollector.translateToLocal("GT5U.MBTT.EnergyHatch"); + private static final String TT_dynamohatch = StatCollector.translateToLocal("GT5U.MBTT.DynamoHatch"); + private static final String TT_mufflerhatch = StatCollector.translateToLocal("GT5U.MBTT.MufflerHatch"); + private static final String TT_inputbus = StatCollector.translateToLocal("GT5U.MBTT.InputBus"); + private static final String TT_inputhatch = StatCollector.translateToLocal("GT5U.MBTT.InputHatch"); + private static final String TT_outputbus = StatCollector.translateToLocal("GT5U.MBTT.OutputBus"); + private static final String TT_outputhatch = StatCollector.translateToLocal("GT5U.MBTT.OutputHatch"); + private static final String TT_causes = StatCollector.translateToLocal("GT5U.MBTT.Causes"); + private static final String TT_pps = StatCollector.translateToLocal("GT5U.MBTT.PPS"); + private static final String TT_hold = StatCollector.translateToLocal("GT5U.MBTT.Hold"); + private static final String TT_todisplay = StatCollector.translateToLocal("GT5U.MBTT.Display"); + private static final String TT_structurehint = StatCollector.translateToLocal("GT5U.MBTT.StructureHint"); + private static final String TT_mod = StatCollector.translateToLocal("GT5U.MBTT.Mod"); + private static final String TT_air = StatCollector.translateToLocal("GT5U.MBTT.Air"); + private static final String[] TT_dots = IntStream.range(0, 16) + .mapToObj(i -> StatCollector.translateToLocal("structurelib.blockhint." + i + ".name")) + .toArray(String[]::new); + + public GT_Multiblock_Tooltip_Builder() { + iLines = new LinkedList<>(); + sLines = new LinkedList<>(); + hLines = new LinkedList<>(); + hBlocks = Multimaps.newSetMultimap(new HashMap<>(), HashSet::new); + hBlocks.put(StructureLibAPI.HINT_BLOCK_META_AIR, TT_air); + } + + /** + * Add a line telling you what the machine type is. Usually, this will be the name of a SB version.<br> + * Machine Type: machine + * + * @param machine + * Name of the machine type + * + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addMachineType(String machine) { + iLines.add(TT_machineType + COLON + EnumChatFormatting.YELLOW + machine + EnumChatFormatting.RESET); + return this; + } + + /** + * Add a basic line of information about this structure + * + * @param info + * The line to be added. + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addInfo(String info) { + iLines.add(info); + return this; + } + + /** + * Add a separator line like this:<br> + * ----------------------------------------- + * + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addSeparator() { + iLines.add("-----------------------------------------"); + return this; + } + + /** + * Add a line telling how much this machine pollutes. + * + * @param pollution + * Amount of pollution per second when active + * + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addPollutionAmount(int pollution) { + iLines.add(TT_causes + COLON + EnumChatFormatting.DARK_PURPLE + pollution + " " + EnumChatFormatting.GRAY + + TT_pps); + return this; + } + + /** + * Begin adding structural information by adding a line about the structure's dimensions + * and then inserting a "Structure:" line. + * + * @param w + * Structure width. + * @param h + * Structure height. + * @param l + * Structure depth/length. + * @param hollow + * T/F, adds a (hollow) comment if true + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder beginStructureBlock(int w, int h, int l, boolean hollow) { + if (hollow) { + sLines.add(TT_dimensions + COLON + w + "x" + h + "x" + l + " (WxHxL) " + TT_hollow); + } else { + sLines.add(TT_dimensions + COLON + w + "x" + h + "x" + l + " (WxHxL)"); + } + sLines.add(TT_structure + COLON); + return this; + } + + /** + * Begin adding structural information by adding a line about the structure's dimensions<br> + * and then inserting a "Structure:" line. Variable version displays min and max + * + * @param wmin + * Structure min width. + * @param wmax + * Structure max width. + * @param hmin + * Structure min height. + * @param hmax + * Structure max height. + * @param lmin + * Structure min depth/length. + * @param lmax + * Structure max depth/length. + * @param hollow + * T/F, adds a (hollow) comment if true + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder beginVariableStructureBlock( + int wmin, int wmax, int hmin, int hmax, int lmin, int lmax, boolean hollow) { + if (hollow) { + sLines.add(TT_dimensions + COLON + wmin + "-" + wmax + "x" + hmin + "-" + hmax + "x" + lmin + "-" + lmax + + " (WxHxL) " + TT_hollow); + } else { + sLines.add(TT_dimensions + COLON + wmin + "-" + wmax + "x" + hmin + "-" + hmax + "x" + lmin + "-" + lmax + + " (WxHxL)"); + } + sLines.add(TT_structure + COLON); + return this; + } + + /** + * Add a line of information about the structure:<br> + * (indent)Controller: info + * @param info + * Positional information. + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addController(String info) { + sLines.add(TAB + TT_controller + COLON + info); + return this; + } + + /** + * Add a line of information about the structure:<br> + * (indent)minCountx casingName (minimum) + * @param casingName + * Name of the Casing. + * @param minCount + * Minimum needed for valid structure check. + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addCasingInfo(String casingName, int minCount) { + sLines.add(TAB + minCount + "x " + casingName + " " + TT_minimum); + return this; + } + + /** + * Use this method to add a structural part that isn't covered by the other methods.<br> + * (indent)name: info + * @param name + * Name of the hatch or other component. + * @param info + * Positional information. + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addOtherStructurePart(String name, String info) { + sLines.add(TAB + name + COLON + info); + return this; + } + + /** + * Add a line of information about the structure:<br> + * (indent)Maintenance Hatch: info + * @param info + * Positional information. + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addMaintenanceHatch(String info) { + sLines.add(TAB + TT_maintenancehatch + COLON + info); + return this; + } + + /** + * Add a line of information about the structure:<br> + * (indent)Muffler Hatch: info + * @param info + * Location where the hatch goes + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addMufflerHatch(String info) { + sLines.add(TAB + TT_mufflerhatch + COLON + info); + return this; + } + + /** + * Add a line of information about the structure:<br> + * (indent)Energy Hatch: info + * @param info + * Positional information. + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addEnergyHatch(String info) { + sLines.add(TAB + TT_energyhatch + COLON + info); + return this; + } + + /** + * Add a line of information about the structure:<br> + * (indent)Dynamo Hatch: info + * @param info + * Positional information. + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addDynamoHatch(String info) { + sLines.add(TAB + TT_dynamohatch + COLON + info); + return this; + } + + /** + * Add a line of information about the structure:<br> + * (indent)Input Bus: info + * @param info + * Location where the bus goes + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addInputBus(String info) { + sLines.add(TAB + TT_inputbus + COLON + info); + return this; + } + + /** + * Add a line of information about the structure:<br> + * (indent)Input Hatch: info + * @param info + * Location where the hatch goes + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addInputHatch(String info) { + sLines.add(TAB + TT_inputhatch + COLON + info); + return this; + } + + /** + * Add a line of information about the structure:<br> + * (indent)Output Bus: info + * @param info + * Location where the bus goes + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addOutputBus(String info) { + sLines.add(TAB + TT_outputbus + COLON + info); + return this; + } + + /** + * Add a line of information about the structure:<br> + * (indent)Output Hatch: info + * @param info + * Location where the bus goes + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addOutputHatch(String info) { + sLines.add(TAB + TT_outputhatch + COLON + info); + return this; + } + + /** + * Use this method to add a structural part that isn't covered by the other methods.<br> + * (indent)name: info + * @param name + * Name of the hatch or other component. + * @param info + * Positional information. + * @param dots + * The valid locations for this part when asked to display hints + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addOtherStructurePart(String name, String info, int... dots) { + sLines.add(TAB + name + COLON + info); + for (int dot : dots) hBlocks.put(dot, name); + return this; + } + + /** + * Add a line of information about the structure:<br> + * (indent)Maintenance Hatch: info + * + * @param info Positional information. + * @param dots The valid locations for this part when asked to display hints + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addMaintenanceHatch(String info, int... dots) { + sLines.add(TAB + TT_maintenancehatch + COLON + info); + for (int dot : dots) hBlocks.put(dot, TT_maintenancehatch); + return this; + } + + /** + * Add a line of information about the structure:<br> + * (indent)Muffler Hatch: info + * + * @param info Location where the hatch goes + * @param dots The valid locations for this part when asked to display hints + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addMufflerHatch(String info, int... dots) { + sLines.add(TAB + TT_mufflerhatch + COLON + info); + for (int dot : dots) hBlocks.put(dot, TT_mufflerhatch); + return this; + } + + /** + * Add a line of information about the structure:<br> + * (indent)Energy Hatch: info + * + * @param info Positional information. + * @param dots The valid locations for this part when asked to display hints + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addEnergyHatch(String info, int... dots) { + sLines.add(TAB + TT_energyhatch + COLON + info); + for (int dot : dots) hBlocks.put(dot, TT_energyhatch); + return this; + } + + /** + * Add a line of information about the structure:<br> + * (indent)Dynamo Hatch: info + * + * @param info Positional information. + * @param dots The valid locations for this part when asked to display hints + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addDynamoHatch(String info, int... dots) { + sLines.add(TAB + TT_dynamohatch + COLON + info); + for (int dot : dots) hBlocks.put(dot, TT_dynamohatch); + return this; + } + + /** + * Add a line of information about the structure:<br> + * (indent)Input Bus: info + * + * @param info Location where the bus goes + * @param dots The valid locations for this part when asked to display hints + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addInputBus(String info, int... dots) { + sLines.add(TAB + TT_inputbus + COLON + info); + for (int dot : dots) hBlocks.put(dot, TT_inputbus); + return this; + } + + /** + * Add a line of information about the structure:<br> + * (indent)Input Hatch: info + * + * @param info Location where the hatch goes + * @param dots The valid locations for this part when asked to display hints + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addInputHatch(String info, int... dots) { + sLines.add(TAB + TT_inputhatch + COLON + info); + for (int dot : dots) hBlocks.put(dot, TT_inputhatch); + return this; + } + + /** + * Add a line of information about the structure:<br> + * (indent)Output Bus: info + * + * @param info Location where the bus goes + * @param dots The valid locations for this part when asked to display hints + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addOutputBus(String info, int... dots) { + sLines.add(TAB + TT_outputbus + COLON + info); + for (int dot : dots) hBlocks.put(dot, TT_outputbus); + return this; + } + + /** + * Add a line of information about the structure:<br> + * (indent)Output Hatch: info + * + * @param info Location where the bus goes + * @param dots The valid locations for this part when asked to display hints + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addOutputHatch(String info, int... dots) { + sLines.add(TAB + TT_outputhatch + COLON + info); + for (int dot : dots) hBlocks.put(dot, TT_outputhatch); + return this; + } + + /** + * Use this method to add non-standard structural info.<br> + * (indent)info + * @param info + * The line to be added. + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addStructureInfo(String info) { + sLines.add(TAB + info); + return this; + } /** * Use this method to add non-standard structural info.<br> @@ -478,57 +480,62 @@ public class GT_Multiblock_Tooltip_Builder { return this; } - /** - * Use this method to add non-standard structural hint. This info will appear before the standard structural hint. - * @param info - * The line to be added. This should be an entry into minecraft's localization system. - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addStructureHint(String info) { - hLines.add(StatCollector.translateToLocal(info)); - return this; - } - - /** - * Use this method to add an entry to standard structural hint without creating a corresponding line in structure information - * @param name - * The name of block This should be an entry into minecraft's localization system. - * @param dots - * Possible locations of this block - * @return Instance this method was called on. - */ - public GT_Multiblock_Tooltip_Builder addStructureHint(String name, int... dots) { - for (int dot : dots) hBlocks.put(dot, StatCollector.translateToLocal(name)); - return this; - } - - /** - * Call at the very end.<br> - * Adds a final line with the mod name and information on how to display the structure guidelines.<br> - * Ends the building process. - * - * @param mod - * Name of the mod that adds this multiblock machine - */ - public void toolTipFinisher(String mod) { - iLines.add(TT_hold + " " + EnumChatFormatting.BOLD + "[LSHIFT]" + EnumChatFormatting.RESET + EnumChatFormatting.GRAY + " " + TT_todisplay); - iLines.add(TT_mod + COLON + EnumChatFormatting.GREEN + mod + EnumChatFormatting.GRAY); - hLines.add(TT_structurehint); - iArray = iLines.toArray(new String[0]); - sArray = sLines.toArray(new String[0]); - // e.getKey() - 1 because 1 dot is meta 0. - hArray = Stream.concat(hLines.stream(), hBlocks.asMap().entrySet().stream().map(e -> TT_dots[e.getKey() - 1] + COLON + String.join(SEPARATOR, e.getValue()))).toArray(String[]::new); - } - - public String[] getInformation() { - return iArray; - } - - public String[] getStructureInformation() { - return sArray; - } - - public String[] getStructureHint() { - return hArray; - } + /** + * Use this method to add non-standard structural hint. This info will appear before the standard structural hint. + * @param info + * The line to be added. This should be an entry into minecraft's localization system. + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addStructureHint(String info) { + hLines.add(StatCollector.translateToLocal(info)); + return this; + } + + /** + * Use this method to add an entry to standard structural hint without creating a corresponding line in structure information + * @param name + * The name of block This should be an entry into minecraft's localization system. + * @param dots + * Possible locations of this block + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addStructureHint(String name, int... dots) { + for (int dot : dots) hBlocks.put(dot, StatCollector.translateToLocal(name)); + return this; + } + + /** + * Call at the very end.<br> + * Adds a final line with the mod name and information on how to display the structure guidelines.<br> + * Ends the building process. + * + * @param mod + * Name of the mod that adds this multiblock machine + */ + public void toolTipFinisher(String mod) { + iLines.add(TT_hold + " " + EnumChatFormatting.BOLD + "[LSHIFT]" + EnumChatFormatting.RESET + + EnumChatFormatting.GRAY + " " + TT_todisplay); + iLines.add(TT_mod + COLON + EnumChatFormatting.GREEN + mod + EnumChatFormatting.GRAY); + hLines.add(TT_structurehint); + iArray = iLines.toArray(new String[0]); + sArray = sLines.toArray(new String[0]); + // e.getKey() - 1 because 1 dot is meta 0. + hArray = Stream.concat( + hLines.stream(), + hBlocks.asMap().entrySet().stream() + .map(e -> TT_dots[e.getKey() - 1] + COLON + String.join(SEPARATOR, e.getValue()))) + .toArray(String[]::new); + } + + public String[] getInformation() { + return iArray; + } + + public String[] getStructureInformation() { + return sArray; + } + + public String[] getStructureHint() { + return hArray; + } } diff --git a/src/main/java/gregtech/api/util/GT_OreDictUnificator.java b/src/main/java/gregtech/api/util/GT_OreDictUnificator.java index a017cf3bb0..81038645e9 100644 --- a/src/main/java/gregtech/api/util/GT_OreDictUnificator.java +++ b/src/main/java/gregtech/api/util/GT_OreDictUnificator.java @@ -1,5 +1,9 @@ package gregtech.api.util; +import static gregtech.api.enums.GT_Values.E; +import static gregtech.api.enums.GT_Values.M; +import static gregtech.api.enums.GT_Values.W; + import gregtech.api.GregTech_API; import gregtech.api.enums.Dyes; import gregtech.api.enums.Materials; @@ -9,21 +13,16 @@ import gregtech.api.objects.GT_HashSet; import gregtech.api.objects.GT_ItemStack; import gregtech.api.objects.ItemData; import gregtech.api.objects.MaterialStack; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; - -import javax.annotation.Nullable; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; - -import static gregtech.api.enums.GT_Values.E; -import static gregtech.api.enums.GT_Values.M; -import static gregtech.api.enums.GT_Values.W; +import javax.annotation.Nullable; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! @@ -69,14 +68,23 @@ public class GT_OreDictUnificator { set(aPrefix, aMaterial, aStack, true, false); } - public static void set(OrePrefixes aPrefix, Materials aMaterial, ItemStack aStack, boolean aOverwrite, boolean aAlreadyRegistered) { - if (aMaterial == null || aPrefix == null || GT_Utility.isStackInvalid(aStack) || Items.feather.getDamage(aStack) == W) - return; + public static void set( + OrePrefixes aPrefix, + Materials aMaterial, + ItemStack aStack, + boolean aOverwrite, + boolean aAlreadyRegistered) { + if (aMaterial == null + || aPrefix == null + || GT_Utility.isStackInvalid(aStack) + || Items.feather.getDamage(aStack) == W) return; isAddingOre++; aStack = GT_Utility.copyAmount(1, aStack); if (!aAlreadyRegistered) registerOre(aPrefix.get(aMaterial), aStack); addAssociation(aPrefix, aMaterial, aStack, isBlacklisted(aStack)); - if (aOverwrite || GT_Utility.isStackInvalid(sName2StackMap.get(aPrefix.get(aMaterial).toString()))) + if (aOverwrite + || GT_Utility.isStackInvalid( + sName2StackMap.get(aPrefix.get(aMaterial).toString()))) sName2StackMap.put(aPrefix.get(aMaterial).toString(), aStack); isAddingOre--; } @@ -101,12 +109,19 @@ public class GT_OreDictUnificator { } public static ItemStack get(OrePrefixes aPrefix, Object aMaterial, ItemStack aReplacement, long aAmount) { - //if (Materials.mDefaultComponents.contains(aPrefix) && !aPrefix.mDynamicItems.contains((Materials)aMaterial)) aPrefix.mDynamicItems.add((Materials) aMaterial); - if (OrePrefixes.mPreventableComponents.contains(aPrefix) && aPrefix.mDisabledItems.contains(aMaterial)) return aReplacement; + // if (Materials.mDefaultComponents.contains(aPrefix) && !aPrefix.mDynamicItems.contains((Materials)aMaterial)) + // aPrefix.mDynamicItems.add((Materials) aMaterial); + if (OrePrefixes.mPreventableComponents.contains(aPrefix) && aPrefix.mDisabledItems.contains(aMaterial)) + return aReplacement; return get(aPrefix.get(aMaterial), aReplacement, aAmount, false, true); } - public static ItemStack get(Object aName, ItemStack aReplacement, long aAmount, boolean aMentionPossibleTypos, boolean aNoInvalidAmounts) { + public static ItemStack get( + Object aName, + ItemStack aReplacement, + long aAmount, + boolean aMentionPossibleTypos, + boolean aNoInvalidAmounts) { if (aNoInvalidAmounts && aAmount < 1) return null; final ItemStack stackFromName = sName2StackMap.get(aName.toString()); if (stackFromName != null) return GT_Utility.copyAmount(aAmount, stackFromName); @@ -154,8 +169,9 @@ public class GT_OreDictUnificator { if (GT_Utility.isStackInvalid(aStack)) return null; ItemData tPrefixMaterial = getAssociation(aStack); ItemStack rStack = null; - if (tPrefixMaterial == null || !tPrefixMaterial.hasValidPrefixMaterialData() || (aUseBlackList && tPrefixMaterial.mBlackListed)) - return GT_Utility.copyOrNull(aStack); + if (tPrefixMaterial == null + || !tPrefixMaterial.hasValidPrefixMaterialData() + || (aUseBlackList && tPrefixMaterial.mBlackListed)) return GT_Utility.copyOrNull(aStack); if (aUseBlackList && !GregTech_API.sUnificationEntriesRegistered && isBlacklisted(aStack)) { tPrefixMaterial.mBlackListed = true; return GT_Utility.copyOrNull(aStack); @@ -174,15 +190,16 @@ public class GT_OreDictUnificator { public static ItemStack get_nocopy(ItemStack aStack) { return get_nocopy(true, aStack); } - + /** Doesn't copy the returned stack or set quantity. Be careful and do not mutate it; * intended only to optimize comparisons */ static ItemStack get_nocopy(boolean aUseBlackList, ItemStack aStack) { if (GT_Utility.isStackInvalid(aStack)) return null; ItemData tPrefixMaterial = getAssociation(aStack); ItemStack rStack = null; - if (tPrefixMaterial == null || !tPrefixMaterial.hasValidPrefixMaterialData() || (aUseBlackList && tPrefixMaterial.mBlackListed)) - return aStack; + if (tPrefixMaterial == null + || !tPrefixMaterial.hasValidPrefixMaterialData() + || (aUseBlackList && tPrefixMaterial.mBlackListed)) return aStack; if (aUseBlackList && !GregTech_API.sUnificationEntriesRegistered && isBlacklisted(aStack)) { tPrefixMaterial.mBlackListed = true; return aStack; @@ -205,18 +222,14 @@ public class GT_OreDictUnificator { ItemStack rStack = null; if (tPrefixMaterial == null || !tPrefixMaterial.hasValidPrefixMaterialData()) return GT_Utility.areStacksEqual(aStack, unified_tStack, true); - else if(tPrefixMaterial.mBlackListed) { - if (GT_Utility.areStacksEqual(aStack, unified_tStack, true)) - return true; - else - alreadyCompared = true; + else if (tPrefixMaterial.mBlackListed) { + if (GT_Utility.areStacksEqual(aStack, unified_tStack, true)) return true; + else alreadyCompared = true; } if (!alreadyCompared && !GregTech_API.sUnificationEntriesRegistered && isBlacklisted(aStack)) { tPrefixMaterial.mBlackListed = true; - if (GT_Utility.areStacksEqual(aStack, unified_tStack, true)) - return true; - else - alreadyCompared = true; + if (GT_Utility.areStacksEqual(aStack, unified_tStack, true)) return true; + else alreadyCompared = true; } if (tPrefixMaterial.mUnificationTarget == null) tPrefixMaterial.mUnificationTarget = sName2StackMap.get(tPrefixMaterial.toString()); @@ -247,25 +260,22 @@ public class GT_OreDictUnificator { } } } - ItemStack[] aStacks = {}; - if (obj instanceof ItemStack) - aStacks = new ItemStack[]{(ItemStack) obj}; - else if (obj instanceof ItemStack[]) - aStacks = (ItemStack[]) obj; - else if (obj instanceof List) aStacks = (ItemStack[]) - ((List)obj).toArray(new ItemStack[0]); - List<ItemStack> rList = new ArrayList<>(); - for (ItemStack aStack : aStacks) { - rList.add(aStack); - List<ItemStack> tList = sUnificationTable.get(new GT_ItemStack(aStack)); - if (tList != null) { - for (ItemStack tStack : tList) { - ItemStack tStack1 = GT_Utility.copyAmount(aStack.stackSize, tStack); - rList.add(tStack1); - } - } - } - return rList; + ItemStack[] aStacks = {}; + if (obj instanceof ItemStack) aStacks = new ItemStack[] {(ItemStack) obj}; + else if (obj instanceof ItemStack[]) aStacks = (ItemStack[]) obj; + else if (obj instanceof List) aStacks = (ItemStack[]) ((List) obj).toArray(new ItemStack[0]); + List<ItemStack> rList = new ArrayList<>(); + for (ItemStack aStack : aStacks) { + rList.add(aStack); + List<ItemStack> tList = sUnificationTable.get(new GT_ItemStack(aStack)); + if (tList != null) { + for (ItemStack tStack : tList) { + ItemStack tStack1 = GT_Utility.copyAmount(aStack.stackSize, tStack); + rList.add(tStack1); + } + } + } + return rList; } public static void addItemData(ItemStack aStack, ItemData aData) { @@ -276,8 +286,9 @@ public class GT_OreDictUnificator { if (GT_Utility.isStackInvalid(aStack) || aData == null) return; ItemData tData = getItemData(aStack); if (tData == null || !tData.hasValidPrefixMaterialData()) { - if (tData != null) for (Object tObject : tData.mExtraData) - if (!aData.mExtraData.contains(tObject)) aData.mExtraData.add(tObject); + if (tData != null) + for (Object tObject : tData.mExtraData) + if (!aData.mExtraData.contains(tObject)) aData.mExtraData.add(tObject); if (aStack.stackSize > 1) { if (aData.mMaterial != null) aData.mMaterial.mAmount /= aStack.stackSize; for (MaterialStack tMaterial : aData.mByProducts) tMaterial.mAmount /= aStack.stackSize; @@ -285,9 +296,13 @@ public class GT_OreDictUnificator { } sItemStack2DataMap.put(new GT_ItemStack(aStack), aData); if (aData.hasValidMaterialData()) { - long tValidMaterialAmount = aData.mMaterial.mMaterial.contains(SubTag.NO_RECYCLING) ? 0 : aData.mMaterial.mAmount >= 0 ? aData.mMaterial.mAmount : M; + long tValidMaterialAmount = aData.mMaterial.mMaterial.contains(SubTag.NO_RECYCLING) + ? 0 + : aData.mMaterial.mAmount >= 0 ? aData.mMaterial.mAmount : M; for (MaterialStack tMaterial : aData.mByProducts) - tValidMaterialAmount += tMaterial.mMaterial.contains(SubTag.NO_RECYCLING) ? 0 : tMaterial.mAmount >= 0 ? tMaterial.mAmount : M; + tValidMaterialAmount += tMaterial.mMaterial.contains(SubTag.NO_RECYCLING) + ? 0 + : tMaterial.mAmount >= 0 ? tMaterial.mAmount : M; if (tValidMaterialAmount < M) GT_ModHandler.addToRecyclerBlackList(aStack); } if (mRunThroughTheList) { @@ -295,7 +310,8 @@ public class GT_OreDictUnificator { mRunThroughTheList = false; for (Entry<GT_ItemStack, ItemData> tEntry : sItemStack2DataMap.entrySet()) if (!tEntry.getValue().hasValidPrefixData() || tEntry.getValue().mPrefix.mAllowNormalRecycling) - GT_RecipeRegistrator.registerMaterialRecycling(tEntry.getKey().toStack(), tEntry.getValue()); + GT_RecipeRegistrator.registerMaterialRecycling( + tEntry.getKey().toStack(), tEntry.getValue()); } } else { if (!aData.hasValidPrefixData() || aData.mPrefix.mAllowNormalRecycling) @@ -307,11 +323,13 @@ public class GT_OreDictUnificator { } } - public static void addAssociation(OrePrefixes aPrefix, Materials aMaterial, ItemStack aStack, boolean aBlackListed) { - if (aPrefix == null || aMaterial == null || GT_Utility.isStackInvalid(aStack)) - return; - if (Items.feather.getDamage(aStack) == W) for (byte i = 0; i < 16; i++) - setItemData(GT_Utility.copyAmountAndMetaData(1, i, aStack), new ItemData(aPrefix, aMaterial, aBlackListed)); + public static void addAssociation( + OrePrefixes aPrefix, Materials aMaterial, ItemStack aStack, boolean aBlackListed) { + if (aPrefix == null || aMaterial == null || GT_Utility.isStackInvalid(aStack)) return; + if (Items.feather.getDamage(aStack) == W) + for (byte i = 0; i < 16; i++) + setItemData( + GT_Utility.copyAmountAndMetaData(1, i, aStack), new ItemData(aPrefix, aMaterial, aBlackListed)); setItemData(aStack, new ItemData(aPrefix, aMaterial, aBlackListed)); } @@ -335,12 +353,9 @@ public class GT_OreDictUnificator { } public static boolean isItemStackDye(ItemStack aStack) { - if (GT_Utility.isStackInvalid(aStack)) - return false; + if (GT_Utility.isStackInvalid(aStack)) return false; - for (Dyes tDye : Dyes.VALUES) - if (isItemStackInstanceOf(aStack, tDye.toString())) - return true; + for (Dyes tDye : Dyes.VALUES) if (isItemStackInstanceOf(aStack, tDye.toString())) return true; return false; } @@ -350,17 +365,14 @@ public class GT_OreDictUnificator { } public static boolean registerOre(Object aName, ItemStack aStack) { - if (aName == null || GT_Utility.isStackInvalid(aStack)) - return false; + if (aName == null || GT_Utility.isStackInvalid(aStack)) return false; String tName = aName.toString(); - if (GT_Utility.isStringInvalid(tName)) - return false; + if (GT_Utility.isStringInvalid(tName)) return false; for (ItemStack itemStack : getOresImmutable(tName)) - if (GT_Utility.areStacksEqual(itemStack, aStack, true)) - return false; + if (GT_Utility.areStacksEqual(itemStack, aStack, true)) return false; isRegisteringOre++; OreDictionary.registerOre(tName, GT_Utility.copyAmount(1, aStack)); @@ -377,8 +389,7 @@ public class GT_OreDictUnificator { } public static void resetUnificationEntries() { - for (ItemData tPrefixMaterial : sItemStack2DataMap.values()) - tPrefixMaterial.mUnificationTarget = null; + for (ItemData tPrefixMaterial : sItemStack2DataMap.values()) tPrefixMaterial.mUnificationTarget = null; } public static ItemStack getGem(MaterialStack aMaterial) { @@ -391,8 +402,7 @@ public class GT_OreDictUnificator { public static ItemStack getGem(Materials aMaterial, long aMaterialAmount) { ItemStack rStack = null; - if (((aMaterialAmount >= M))) - rStack = get(OrePrefixes.gem, aMaterial, aMaterialAmount / M); + if (((aMaterialAmount >= M))) rStack = get(OrePrefixes.gem, aMaterial, aMaterialAmount / M); if (rStack == null) { if ((((aMaterialAmount * 2) % M == 0) || aMaterialAmount >= M * 16)) rStack = get(OrePrefixes.gemFlawed, aMaterial, (aMaterialAmount * 2) / M); @@ -491,7 +501,9 @@ public class GT_OreDictUnificator { */ public static List<ItemStack> getOresImmutable(@Nullable Object aOreName) { String aName = aOreName == null ? E : aOreName.toString(); - - return GT_Utility.isStringValid(aName) ? Collections.unmodifiableList(OreDictionary.getOres(aName)) : Collections.emptyList(); + + return GT_Utility.isStringValid(aName) + ? Collections.unmodifiableList(OreDictionary.getOres(aName)) + : Collections.emptyList(); } } diff --git a/src/main/java/gregtech/api/util/GT_PlayedSound.java b/src/main/java/gregtech/api/util/GT_PlayedSound.java index fa27bbb9d4..87743517d0 100644 --- a/src/main/java/gregtech/api/util/GT_PlayedSound.java +++ b/src/main/java/gregtech/api/util/GT_PlayedSound.java @@ -1,9 +1,9 @@ package gregtech.api.util; -import net.minecraft.util.ResourceLocation; - import static gregtech.api.enums.GT_Values.E; +import net.minecraft.util.ResourceLocation; + public class GT_PlayedSound { public final String mSoundName; public final int mX, mY, mZ; @@ -27,7 +27,10 @@ public class GT_PlayedSound { @Override public boolean equals(Object aObject) { if (aObject instanceof GT_PlayedSound) { - return ((GT_PlayedSound) aObject).mX == mX && ((GT_PlayedSound) aObject).mY == mY && ((GT_PlayedSound) aObject).mZ == mZ && ((GT_PlayedSound) aObject).mSoundName.equals(mSoundName); + return ((GT_PlayedSound) aObject).mX == mX + && ((GT_PlayedSound) aObject).mY == mY + && ((GT_PlayedSound) aObject).mZ == mZ + && ((GT_PlayedSound) aObject).mSoundName.equals(mSoundName); } return false; } diff --git a/src/main/java/gregtech/api/util/GT_ProcessingArray_Manager.java b/src/main/java/gregtech/api/util/GT_ProcessingArray_Manager.java index 0005f20869..548795cc49 100644 --- a/src/main/java/gregtech/api/util/GT_ProcessingArray_Manager.java +++ b/src/main/java/gregtech/api/util/GT_ProcessingArray_Manager.java @@ -1,20 +1,19 @@ package gregtech.api.util; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; - import java.util.HashMap; public class GT_ProcessingArray_Manager { private static final HashMap<String, GT_Recipe_Map> mRecipeSaves = new HashMap<String, GT_Recipe_Map>(); - //Adds recipe Maps to the PA using the machines unlocalized name. - //Example: basicmachine.electrolyzer, with its recipe map will add the electrolyzer's recipe map to the PA + // Adds recipe Maps to the PA using the machines unlocalized name. + // Example: basicmachine.electrolyzer, with its recipe map will add the electrolyzer's recipe map to the PA public static void addRecipeMapToPA(String aMachineName, GT_Recipe_Map aMap) { if (aMachineName != null) { mRecipeSaves.put(aMachineName, aMap); } } - //Allows the PA to extract the recipe map for the machine inside it. + // Allows the PA to extract the recipe map for the machine inside it. public static GT_Recipe_Map giveRecipeMap(String aMachineName) { if (aMachineName != null) { return mRecipeSaves.get(aMachineName); diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java index 9e46839f8c..5ec8ad16a2 100644 --- a/src/main/java/gregtech/api/util/GT_Recipe.java +++ b/src/main/java/gregtech/api/util/GT_Recipe.java @@ -1,5 +1,7 @@ package gregtech.api.util; +import static gregtech.api.enums.GT_Values.*; + import codechicken.nei.PositionedStack; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.ModContainer; @@ -16,6 +18,8 @@ import gregtech.api.util.extensions.ArrayExt; import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Replicator; import gregtech.nei.GT_NEI_DefaultHandler.FixedPositionedStack; import ic2.core.Ic2Items; +import java.util.*; +import java.util.concurrent.atomic.AtomicInteger; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; @@ -27,12 +31,6 @@ import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidContainerItem; -import java.util.*; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.stream.Collectors; - -import static gregtech.api.enums.GT_Values.*; - /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! * <p/> @@ -60,6 +58,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * An Item that needs to be inside the Special Slot, like for example the Copy Slot inside the Printer. This is only useful for Fake Recipes in NEI, since findRecipe() and containsInput() don't give a shit about this Field. Lists are also possible. */ public Object mSpecialItems; + public int mDuration, mEUt, mSpecialValue; /** * Use this to just disable a specific Recipe, but the Configuration enables that already for every single Recipe. @@ -113,19 +112,23 @@ public class GT_Recipe implements Comparable<GT_Recipe> { reloadOwner(); } - public GT_Recipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecialItems, int[] aChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { - if (aInputs == null) - aInputs = new ItemStack[0]; - if (aOutputs == null) - aOutputs = new ItemStack[0]; - if (aFluidInputs == null) - aFluidInputs = new FluidStack[0]; - if (aFluidOutputs == null) - aFluidOutputs = new FluidStack[0]; - if (aChances == null) - aChances = new int[aOutputs.length]; - if (aChances.length < aOutputs.length) - aChances = Arrays.copyOf(aChances, aOutputs.length); + public GT_Recipe( + boolean aOptimize, + ItemStack[] aInputs, + ItemStack[] aOutputs, + Object aSpecialItems, + int[] aChances, + FluidStack[] aFluidInputs, + FluidStack[] aFluidOutputs, + int aDuration, + int aEUt, + int aSpecialValue) { + if (aInputs == null) aInputs = new ItemStack[0]; + if (aOutputs == null) aOutputs = new ItemStack[0]; + if (aFluidInputs == null) aFluidInputs = new FluidStack[0]; + if (aFluidOutputs == null) aFluidOutputs = new FluidStack[0]; + if (aChances == null) aChances = new int[aOutputs.length]; + if (aChances.length < aOutputs.length) aChances = Arrays.copyOf(aChances, aOutputs.length); aInputs = ArrayExt.withoutTrailingNulls(aInputs, ItemStack[]::new); aOutputs = ArrayExt.withoutTrailingNulls(aOutputs, ItemStack[]::new); @@ -135,16 +138,11 @@ public class GT_Recipe implements Comparable<GT_Recipe> { GT_OreDictUnificator.setStackArray(true, aInputs); GT_OreDictUnificator.setStackArray(true, aOutputs); - for (ItemStack tStack : aOutputs) - GT_Utility.updateItemStack(tStack); + for (ItemStack tStack : aOutputs) GT_Utility.updateItemStack(tStack); - for (int i = 0; i < aChances.length; i++) - if (aChances[i] <= 0) - aChances[i] = 10000; - for (int i = 0; i < aFluidInputs.length; i++) - aFluidInputs[i] = new GT_FluidStack(aFluidInputs[i]); - for (int i = 0; i < aFluidOutputs.length; i++) - aFluidOutputs[i] = new GT_FluidStack(aFluidOutputs[i]); + for (int i = 0; i < aChances.length; i++) if (aChances[i] <= 0) aChances[i] = 10000; + for (int i = 0; i < aFluidInputs.length; i++) aFluidInputs[i] = new GT_FluidStack(aFluidInputs[i]); + for (int i = 0; i < aFluidOutputs.length; i++) aFluidOutputs[i] = new GT_FluidStack(aFluidOutputs[i]); for (ItemStack aInput : aInputs) if (aInput != null && Items.feather.getDamage(aInput) != W) @@ -186,12 +184,9 @@ public class GT_Recipe implements Comparable<GT_Recipe> { break; } if (temp) { - for (ItemStack itemStack : tList) - itemStack.stackSize /= i; - for (FluidStack aFluidInput : aFluidInputs) - aFluidInput.amount /= i; - for (FluidStack aFluidOutput : aFluidOutputs) - aFluidOutput.amount /= i; + for (ItemStack itemStack : tList) itemStack.stackSize /= i; + for (FluidStack aFluidInput : aFluidInputs) aFluidInput.amount /= i; + for (FluidStack aFluidOutput : aFluidOutputs) aFluidOutput.amount /= i; aDuration /= i; } } @@ -206,7 +201,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> { mDuration = aDuration; mSpecialValue = aSpecialValue; mEUt = aEUt; -// checkCellBalance(); + // checkCellBalance(); reloadOwner(); } @@ -220,33 +215,50 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } // aSpecialValue = EU per Liter! If there is no Liquid for this Object, then it gets multiplied with 1000! - public GT_Recipe(ItemStack aInput1, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, int aSpecialValue, int aType) { - this(true, new ItemStack[]{aInput1}, new ItemStack[]{aOutput1, aOutput2, aOutput3, aOutput4}, null, null, null, null, 0, 0, Math.max(1, aSpecialValue)); + public GT_Recipe( + ItemStack aInput1, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + ItemStack aOutput4, + int aSpecialValue, + int aType) { + this( + true, + new ItemStack[] {aInput1}, + new ItemStack[] {aOutput1, aOutput2, aOutput3, aOutput4}, + null, + null, + null, + null, + 0, + 0, + Math.max(1, aSpecialValue)); if (mInputs.length > 0 && aSpecialValue > 0) { switch (aType) { - // Diesel Generator + // Diesel Generator case 0: GT_Recipe_Map.sDieselFuels.addRecipe(this); GT_Recipe_Map.sLargeBoilerFakeFuels.addDieselRecipe(this); break; - // Gas Turbine + // Gas Turbine case 1: GT_Recipe_Map.sTurbineFuels.addRecipe(this); break; - // Thermal Generator + // Thermal Generator case 2: GT_Recipe_Map.sHotFuels.addRecipe(this); break; - // Plasma Generator + // Plasma Generator case 4: GT_Recipe_Map.sPlasmaFuels.addRecipe(this); break; - // Magic Generator + // Magic Generator case 5: GT_Recipe_Map.sMagicFuels.addRecipe(this); break; - // Fluid Generator. Usually 3. Every wrong Type ends up in the Semifluid Generator + // Fluid Generator. Usually 3. Every wrong Type ends up in the Semifluid Generator default: GT_Recipe_Map.sDenseLiquidFuels.addRecipe(this); GT_Recipe_Map.sLargeBoilerFakeFuels.addDenseLiquidRecipe(this); @@ -255,85 +267,221 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } } - public GT_Recipe(FluidStack aInput1, FluidStack aInput2, FluidStack aOutput1, int aDuration, int aEUt, int aSpecialValue) { - this(true, null, null, null, null, new FluidStack[]{aInput1, aInput2}, new FluidStack[]{aOutput1}, Math.max(aDuration, 1), aEUt, Math.max(Math.min(aSpecialValue, 160000000), 0)); + public GT_Recipe( + FluidStack aInput1, FluidStack aInput2, FluidStack aOutput1, int aDuration, int aEUt, int aSpecialValue) { + this( + true, + null, + null, + null, + null, + new FluidStack[] {aInput1, aInput2}, + new FluidStack[] {aOutput1}, + Math.max(aDuration, 1), + aEUt, + Math.max(Math.min(aSpecialValue, 160000000), 0)); if (mInputs.length > 1) { GT_Recipe_Map.sFusionRecipes.addRecipe(this); } } public GT_Recipe(ItemStack aInput1, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt) { - this(true, new ItemStack[]{aInput1}, new ItemStack[]{aOutput1, aOutput2}, null, null, null, null, aDuration, aEUt, 0); + this( + true, + new ItemStack[] {aInput1}, + new ItemStack[] {aOutput1, aOutput2}, + null, + null, + null, + null, + aDuration, + aEUt, + 0); if (mInputs.length > 0 && mOutputs[0] != null) { GT_Recipe_Map.sLatheRecipes.addRecipe(this); } } - public GT_Recipe(ItemStack aInput1, int aCellAmount, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, int aDuration, int aEUt) { - this(true, new ItemStack[]{aInput1, aCellAmount > 0 ? ItemList.Cell_Empty.get(Math.min(64, Math.max(1, aCellAmount))) : null}, new ItemStack[]{aOutput1, aOutput2, aOutput3, aOutput4}, null, null, null, null, Math.max(aDuration, 1), Math.max(aEUt, 1), 0); + public GT_Recipe( + ItemStack aInput1, + int aCellAmount, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + ItemStack aOutput4, + int aDuration, + int aEUt) { + this( + true, + new ItemStack[] { + aInput1, aCellAmount > 0 ? ItemList.Cell_Empty.get(Math.min(64, Math.max(1, aCellAmount))) : null + }, + new ItemStack[] {aOutput1, aOutput2, aOutput3, aOutput4}, + null, + null, + null, + null, + Math.max(aDuration, 1), + Math.max(aEUt, 1), + 0); if (mInputs.length > 0 && mOutputs[0] != null) { GT_Recipe_Map.sDistillationRecipes.addRecipe(this); } } public GT_Recipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2) { - this(true, new ItemStack[]{aInput1, GT_ModHandler.getIC2Item("industrialTnt", aInput2 > 0 ? Math.min(aInput2, 64) : 1, new ItemStack(Blocks.tnt, aInput2 > 0 ? Math.min(aInput2, 64) : 1))}, new ItemStack[]{aOutput1, aOutput2}, null, null, null, null, 20, 30, 0); + this( + true, + new ItemStack[] { + aInput1, + GT_ModHandler.getIC2Item( + "industrialTnt", + aInput2 > 0 ? Math.min(aInput2, 64) : 1, + new ItemStack(Blocks.tnt, aInput2 > 0 ? Math.min(aInput2, 64) : 1)) + }, + new ItemStack[] {aOutput1, aOutput2}, + null, + null, + null, + null, + 20, + 30, + 0); if (mInputs.length > 0 && mOutputs[0] != null) { GT_Recipe_Map.sImplosionRecipes.addRecipe(this); } } public GT_Recipe(int aEUt, int aDuration, ItemStack aInput1, ItemStack aOutput1) { - this(true, new ItemStack[]{aInput1, ItemList.Circuit_Integrated.getWithDamage(0, aInput1.stackSize)}, new ItemStack[]{aOutput1}, null, null, null, null, Math.max(aDuration, 1), Math.max(aEUt, 1), 0); + this( + true, + new ItemStack[] {aInput1, ItemList.Circuit_Integrated.getWithDamage(0, aInput1.stackSize)}, + new ItemStack[] {aOutput1}, + null, + null, + null, + null, + Math.max(aDuration, 1), + Math.max(aEUt, 1), + 0); if (mInputs.length > 0 && mOutputs[0] != null) { GT_Recipe_Map.sBenderRecipes.addRecipe(this); } } public GT_Recipe(ItemStack aInput1, ItemStack aInput2, int aEUt, int aDuration, ItemStack aOutput1) { - this(true, aInput2 == null ? new ItemStack[]{aInput1} : new ItemStack[]{aInput1, aInput2}, new ItemStack[]{aOutput1}, null, null, null, null, Math.max(aDuration, 1), Math.max(aEUt, 1), 0); + this( + true, + aInput2 == null ? new ItemStack[] {aInput1} : new ItemStack[] {aInput1, aInput2}, + new ItemStack[] {aOutput1}, + null, + null, + null, + null, + Math.max(aDuration, 1), + Math.max(aEUt, 1), + 0); if (mInputs.length > 0 && mOutputs[0] != null) { GT_Recipe_Map.sAlloySmelterRecipes.addRecipe(this); } } - public GT_Recipe(ItemStack aInput1, int aEUt, ItemStack aInput2, int aDuration, ItemStack aOutput1, ItemStack aOutput2) { - this(true, aInput2 == null ? new ItemStack[]{aInput1} : new ItemStack[]{aInput1, aInput2}, new ItemStack[]{aOutput1, aOutput2}, null, null, null, null, Math.max(aDuration, 1), Math.max(aEUt, 1), 0); + public GT_Recipe( + ItemStack aInput1, int aEUt, ItemStack aInput2, int aDuration, ItemStack aOutput1, ItemStack aOutput2) { + this( + true, + aInput2 == null ? new ItemStack[] {aInput1} : new ItemStack[] {aInput1, aInput2}, + new ItemStack[] {aOutput1, aOutput2}, + null, + null, + null, + null, + Math.max(aDuration, 1), + Math.max(aEUt, 1), + 0); if (mInputs.length > 0 && mOutputs[0] != null) { GT_Recipe_Map.sCannerRecipes.addRecipe(this); } } public GT_Recipe(ItemStack aInput1, ItemStack aOutput1, int aDuration) { - this(true, new ItemStack[]{aInput1}, new ItemStack[]{aOutput1}, null, null, null, null, Math.max(aDuration, 1), 120, 0); + this( + true, + new ItemStack[] {aInput1}, + new ItemStack[] {aOutput1}, + null, + null, + null, + null, + Math.max(aDuration, 1), + 120, + 0); if (mInputs.length > 0 && mOutputs[0] != null) { GT_Recipe_Map.sVacuumRecipes.addRecipe(this); } } public GT_Recipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt, int VACUUM) { - this(true, new ItemStack[]{aInput1}, new ItemStack[]{aOutput1}, null, null, null, null, Math.max(aDuration, 1), aEUt, 0); + this( + true, + new ItemStack[] {aInput1}, + new ItemStack[] {aOutput1}, + null, + null, + null, + null, + Math.max(aDuration, 1), + aEUt, + 0); if (mInputs.length > 0 && mOutputs[0] != null) { GT_Recipe_Map.sVacuumRecipes.addRecipe(this); } } public GT_Recipe(FluidStack aInput1, FluidStack aOutput1, int aDuration, int aEUt) { - this(false, null, null, null, null, new FluidStack[]{aInput1}, new FluidStack[]{aOutput1}, Math.max(aDuration, 1), aEUt, 0); + this( + false, + null, + null, + null, + null, + new FluidStack[] {aInput1}, + new FluidStack[] {aOutput1}, + Math.max(aDuration, 1), + aEUt, + 0); if (mFluidInputs.length > 0 && mFluidOutputs[0] != null) { GT_Recipe_Map.sVacuumRecipes.addRecipe(this); } } - //Dummy GT_Recipe maker... - public GT_Recipe(ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecialItems, int[] aChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue){ - this(true, aInputs, aOutputs, aSpecialItems, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue); + // Dummy GT_Recipe maker... + public GT_Recipe( + ItemStack[] aInputs, + ItemStack[] aOutputs, + Object aSpecialItems, + int[] aChances, + FluidStack[] aFluidInputs, + FluidStack[] aFluidOutputs, + int aDuration, + int aEUt, + int aSpecialValue) { + this( + true, + aInputs, + aOutputs, + aSpecialItems, + aChances, + aFluidInputs, + aFluidOutputs, + aDuration, + aEUt, + aSpecialValue); } public static void reInit() { GT_Log.out.println("GT_Mod: Re-Unificating Recipes."); - for (GT_Recipe_Map tMapEntry : GT_Recipe_Map.sMappings) - tMapEntry.reInit(); + for (GT_Recipe_Map tMapEntry : GT_Recipe_Map.sMappings) tMapEntry.reInit(); } // ----- @@ -388,7 +536,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { return new GT_Recipe(this); } - public boolean isRecipeInputEqual(boolean aDecreaseStacksizeBySuccess, FluidStack[] aFluidInputs, ItemStack... aInputs) { + public boolean isRecipeInputEqual( + boolean aDecreaseStacksizeBySuccess, FluidStack[] aFluidInputs, ItemStack... aInputs) { return isRecipeInputEqual(aDecreaseStacksizeBySuccess, false, aFluidInputs, aInputs); } @@ -411,7 +560,11 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * WARNING: Do not call this method with both {@code aDecreaseStacksizeBySuccess} and {@code aDontCheckStackSizes} set to {@code true}! * You'll get weird behavior. */ - public boolean isRecipeInputEqual(boolean aDecreaseStacksizeBySuccess, boolean aDontCheckStackSizes, FluidStack[] aFluidInputs, ItemStack... aInputs) { + public boolean isRecipeInputEqual( + boolean aDecreaseStacksizeBySuccess, + boolean aDontCheckStackSizes, + FluidStack[] aFluidInputs, + ItemStack... aInputs) { if (mInputs.length > 0 && aInputs == null) return false; if (mFluidInputs.length > 0 && aFluidInputs == null) return false; @@ -473,9 +626,12 @@ public class GT_Recipe implements Comparable<GT_Recipe> { ItemStack providedItem = aInputs[i]; if (GT_OreDictUnificator.isInputStackEqual(providedItem, unifiedItemCost)) { if (GTppRecipeHelper) { // Please see JavaDoc on GTppRecipeHelper for why this is here. - if (GT_Utility.areStacksEqual(providedItem, Ic2Items.FluidCell.copy(), true) || GT_Utility.areStacksEqual(providedItem, ItemList.Tool_DataStick.get(1L), true) || GT_Utility.areStacksEqual(providedItem, ItemList.Tool_DataOrb.get(1L), true)) { - if (!GT_Utility.areStacksEqual(providedItem, recipeItemCost, false)) - continue; + if (GT_Utility.areStacksEqual(providedItem, Ic2Items.FluidCell.copy(), true) + || GT_Utility.areStacksEqual( + providedItem, ItemList.Tool_DataStick.get(1L), true) + || GT_Utility.areStacksEqual( + providedItem, ItemList.Tool_DataOrb.get(1L), true)) { + if (!GT_Utility.areStacksEqual(providedItem, recipeItemCost, false)) continue; } } @@ -559,8 +715,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { */ @SuppressWarnings("DeprecatedIsStillUsed") @Deprecated - public ArrayList<PositionedStack> getInputPositionedStacks(){ - return null; + public ArrayList<PositionedStack> getInputPositionedStacks() { + return null; } /** @@ -568,21 +724,20 @@ public class GT_Recipe implements Comparable<GT_Recipe> { */ @SuppressWarnings("DeprecatedIsStillUsed") @Deprecated - public ArrayList<PositionedStack> getOutputPositionedStacks(){ - return null; + public ArrayList<PositionedStack> getOutputPositionedStacks() { + return null; } public void reloadOwner() { setOwner(Loader.instance().activeModContainer()); - final List<String> excludedClasses = Arrays.asList( - "java.lang.Thread", - "gregtech.api.util.GT_Recipe", - "gregtech.common.GT_RecipeAdder"); + final List<String> excludedClasses = + Arrays.asList("java.lang.Thread", "gregtech.api.util.GT_Recipe", "gregtech.common.GT_RecipeAdder"); if (GT_Mod.gregtechproxy.mNEIRecipeOwnerStackTrace) { List<StackTraceElement> toAdd = new ArrayList<>(); for (StackTraceElement stackTrace : Thread.currentThread().getStackTrace()) { - if (excludedClasses.stream().noneMatch(c -> stackTrace.getClassName().contains(c))) { + if (excludedClasses.stream() + .noneMatch(c -> stackTrace.getClassName().contains(c))) { toAdd.add(stackTrace); } } @@ -609,14 +764,14 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } } - public static class GT_Recipe_AssemblyLine{ - public static final ArrayList<GT_Recipe_AssemblyLine> sAssemblylineRecipes = new ArrayList<GT_Recipe_AssemblyLine>(); + public static class GT_Recipe_AssemblyLine { + public static final ArrayList<GT_Recipe_AssemblyLine> sAssemblylineRecipes = + new ArrayList<GT_Recipe_AssemblyLine>(); static { if (!Boolean.getBoolean("com.gtnh.gt5u.ignore-invalid-assline-recipe")) GregTech_API.sFirstWorldTick.add(GT_Recipe_AssemblyLine::checkInvalidRecipes); - else - GT_Log.out.println("NOT CHECKING INVALID ASSLINE RECIPE."); + else GT_Log.out.println("NOT CHECKING INVALID ASSLINE RECIPE."); } private static void checkInvalidRecipes() { @@ -629,7 +784,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } } if (invalidCount > 0) - throw new RuntimeException("There are " + invalidCount + " invalid assembly line recipe(s)! Check GregTech.log for details!"); + throw new RuntimeException("There are " + invalidCount + + " invalid assembly line recipe(s)! Check GregTech.log for details!"); } public ItemStack mResearchItem; @@ -647,8 +803,23 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * * if you set one yourself, it will give you one of the RunetimeExceptions! */ - public GT_Recipe_AssemblyLine(ItemStack aResearchItem, int aResearchTime, ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput, int aDuration, int aEUt) { - this(aResearchItem, aResearchTime, aInputs, aFluidInputs, aOutput, aDuration, aEUt, new ItemStack[aInputs.length][]); + public GT_Recipe_AssemblyLine( + ItemStack aResearchItem, + int aResearchTime, + ItemStack[] aInputs, + FluidStack[] aFluidInputs, + ItemStack aOutput, + int aDuration, + int aEUt) { + this( + aResearchItem, + aResearchTime, + aInputs, + aFluidInputs, + aOutput, + aDuration, + aEUt, + new ItemStack[aInputs.length][]); int tPersistentHash = 1; for (ItemStack tInput : aInputs) tPersistentHash = tPersistentHash * 31 + GT_Utility.persistentHash(tInput, true, false); @@ -667,94 +838,97 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * * if you don't set one yourself, it will break a lot of stuff! */ - public GT_Recipe_AssemblyLine(ItemStack aResearchItem, int aResearchTime, ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput, int aDuration, int aEUt, ItemStack[][] aAlt) { - mResearchItem = aResearchItem; - mResearchTime = aResearchTime; - mInputs = aInputs; - mFluidInputs = aFluidInputs; - mOutput = aOutput; - mDuration = aDuration; - mEUt = aEUt; - mOreDictAlt = aAlt; + public GT_Recipe_AssemblyLine( + ItemStack aResearchItem, + int aResearchTime, + ItemStack[] aInputs, + FluidStack[] aFluidInputs, + ItemStack aOutput, + int aDuration, + int aEUt, + ItemStack[][] aAlt) { + mResearchItem = aResearchItem; + mResearchTime = aResearchTime; + mInputs = aInputs; + mFluidInputs = aFluidInputs; + mOutput = aOutput; + mDuration = aDuration; + mEUt = aEUt; + mOreDictAlt = aAlt; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + GT_ItemStack[] thisInputs = new GT_ItemStack[this.mInputs.length]; + int totalInputStackSize = 0; + for (int i = 0; i < this.mInputs.length; i++) { + thisInputs[i] = new GT_ItemStack(this.mInputs[i]); + totalInputStackSize += thisInputs[i].mStackSize; + } + int inputHash = Arrays.deepHashCode(thisInputs); + int inputFluidHash = Arrays.deepHashCode(this.mFluidInputs); + GT_ItemStack thisOutput = new GT_ItemStack(mOutput); + GT_ItemStack thisResearch = new GT_ItemStack(mResearchItem); + int miscRecipeDataHash = Arrays.deepHashCode( + new Object[] {totalInputStackSize, mDuration, mEUt, thisOutput, thisResearch, mResearchTime}); + result = prime * result + inputFluidHash; + result = prime * result + inputHash; + result = prime * result + miscRecipeDataHash; + return result; } @Override - public int hashCode() { - final int prime = 31; - int result = 1; - GT_ItemStack[] thisInputs = new GT_ItemStack[this.mInputs.length]; - int totalInputStackSize = 0; - for (int i=0;i<this.mInputs.length;i++) { - thisInputs[i] = new GT_ItemStack(this.mInputs[i]); - totalInputStackSize += thisInputs[i].mStackSize; - } - int inputHash = Arrays.deepHashCode(thisInputs); - int inputFluidHash = Arrays.deepHashCode(this.mFluidInputs); - GT_ItemStack thisOutput = new GT_ItemStack(mOutput); - GT_ItemStack thisResearch = new GT_ItemStack(mResearchItem); - int miscRecipeDataHash = Arrays.deepHashCode(new Object[] { - totalInputStackSize, - mDuration, mEUt, - thisOutput, - thisResearch, - mResearchTime - }); - result = prime * result + inputFluidHash; - result = prime * result + inputHash; - result = prime * result + miscRecipeDataHash; - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!(obj instanceof GT_Recipe_AssemblyLine)) { - return false; - } - GT_Recipe_AssemblyLine other = (GT_Recipe_AssemblyLine) obj; - if (this.mInputs.length != other.mInputs.length) { - return false; - } - if (this.mFluidInputs.length != other.mFluidInputs.length) { - return false; - } - // Check Outputs Match - GT_ItemStack output1 = new GT_ItemStack(this.mOutput); - GT_ItemStack output2 = new GT_ItemStack(other.mOutput); - if (!output1.equals(output2)) { - return false; - } - // Check Scanned Item Match - GT_ItemStack scan1 = new GT_ItemStack(this.mResearchItem); - GT_ItemStack scan2 = new GT_ItemStack(other.mResearchItem); - if (!scan1.equals(scan2)) { - return false; - } - // Check Items Match - GT_ItemStack[] thisInputs = new GT_ItemStack[this.mInputs.length]; - GT_ItemStack[] otherInputs = new GT_ItemStack[other.mInputs.length]; - for (int i=0;i<thisInputs.length;i++) { - thisInputs[i] = new GT_ItemStack(this.mInputs[i]); - otherInputs[i] = new GT_ItemStack(other.mInputs[i]); - } - for (int i=0;i<thisInputs.length;i++) { - if (!thisInputs[i].equals(otherInputs[i]) || thisInputs[i].mStackSize != otherInputs[i].mStackSize) { - return false; - } - } - // Check Fluids Match - for (int i=0;i<this.mFluidInputs.length;i++) { - if (!this.mFluidInputs[i].isFluidStackIdentical(other.mFluidInputs[i])) { - return false; - } - } - - return this.mDuration == other.mDuration - && this.mEUt == other.mEUt - && this.mResearchTime == other.mResearchTime; - } + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof GT_Recipe_AssemblyLine)) { + return false; + } + GT_Recipe_AssemblyLine other = (GT_Recipe_AssemblyLine) obj; + if (this.mInputs.length != other.mInputs.length) { + return false; + } + if (this.mFluidInputs.length != other.mFluidInputs.length) { + return false; + } + // Check Outputs Match + GT_ItemStack output1 = new GT_ItemStack(this.mOutput); + GT_ItemStack output2 = new GT_ItemStack(other.mOutput); + if (!output1.equals(output2)) { + return false; + } + // Check Scanned Item Match + GT_ItemStack scan1 = new GT_ItemStack(this.mResearchItem); + GT_ItemStack scan2 = new GT_ItemStack(other.mResearchItem); + if (!scan1.equals(scan2)) { + return false; + } + // Check Items Match + GT_ItemStack[] thisInputs = new GT_ItemStack[this.mInputs.length]; + GT_ItemStack[] otherInputs = new GT_ItemStack[other.mInputs.length]; + for (int i = 0; i < thisInputs.length; i++) { + thisInputs[i] = new GT_ItemStack(this.mInputs[i]); + otherInputs[i] = new GT_ItemStack(other.mInputs[i]); + } + for (int i = 0; i < thisInputs.length; i++) { + if (!thisInputs[i].equals(otherInputs[i]) || thisInputs[i].mStackSize != otherInputs[i].mStackSize) { + return false; + } + } + // Check Fluids Match + for (int i = 0; i < this.mFluidInputs.length; i++) { + if (!this.mFluidInputs[i].isFluidStackIdentical(other.mFluidInputs[i])) { + return false; + } + } + + return this.mDuration == other.mDuration + && this.mEUt == other.mEUt + && this.mResearchTime == other.mResearchTime; + } public int getPersistentHash() { if (mPersistentHash == 0) @@ -764,16 +938,15 @@ public class GT_Recipe implements Comparable<GT_Recipe> { @Override public String toString() { - return "GT_Recipe_AssemblyLine{" + - "mResearchItem=" + mResearchItem + - ", mResearchTime=" + mResearchTime + - ", mInputs=" + Arrays.toString(mInputs) + - ", mFluidInputs=" + Arrays.toString(mFluidInputs) + - ", mOutput=" + mOutput + - ", mDuration=" + mDuration + - ", mEUt=" + mEUt + - ", mOreDictAlt=" + Arrays.toString(mOreDictAlt) + - '}'; + return "GT_Recipe_AssemblyLine{" + "mResearchItem=" + + mResearchItem + ", mResearchTime=" + + mResearchTime + ", mInputs=" + + Arrays.toString(mInputs) + ", mFluidInputs=" + + Arrays.toString(mFluidInputs) + ", mOutput=" + + mOutput + ", mDuration=" + + mDuration + ", mEUt=" + + mEUt + ", mOreDictAlt=" + + Arrays.toString(mOreDictAlt) + '}'; } /** @@ -782,12 +955,9 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * @throws IllegalStateException if the persistent hash has been set already */ public void setPersistentHash(int aPersistentHash) { - if (this.mPersistentHash != 0) - throw new IllegalStateException("Cannot set persistent hash twice!"); - if (aPersistentHash == 0) - this.mPersistentHash = 1; - else - this.mPersistentHash = aPersistentHash; + if (this.mPersistentHash != 0) throw new IllegalStateException("Cannot set persistent hash twice!"); + if (aPersistentHash == 0) this.mPersistentHash = 1; + else this.mPersistentHash = aPersistentHash; } } @@ -801,53 +971,716 @@ public class GT_Recipe implements Comparable<GT_Recipe> { */ public static final Map<String, GT_Recipe_Map> sIndexedMappings = new HashMap<>(); - public static final GT_Recipe_Map sOreWasherRecipes = new GT_Recipe_Map(new HashSet<>(500), "gt.recipe.orewasher", "Ore Washing Plant", null, RES_PATH_GUI + "basicmachines/OreWasher", 1, 3, 1, 1, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sThermalCentrifugeRecipes = new GT_Recipe_Map(new HashSet<>(1000), "gt.recipe.thermalcentrifuge", "Thermal Centrifuge", null, RES_PATH_GUI + "basicmachines/ThermalCentrifuge", 1, 3, 1, 0, 2, E, 1, E, true, true); - public static final GT_Recipe_Map sCompressorRecipes = new GT_Recipe_Map(new HashSet<>(750), "gt.recipe.compressor", "Compressor", null, RES_PATH_GUI + "basicmachines/Compressor", 1, 1, 1, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sExtractorRecipes = new GT_Recipe_Map(new HashSet<>(250), "gt.recipe.extractor", "Extractor", null, RES_PATH_GUI + "basicmachines/Extractor", 1, 1, 1, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sRecyclerRecipes = new GT_Recipe_Map_Recycler(new HashSet<>(0), "ic.recipe.recycler", "Recycler", "ic2.recycler", RES_PATH_GUI + "basicmachines/Recycler", 1, 1, 1, 0, 1, E, 1, E, true, false); - public static final GT_Recipe_Map sFurnaceRecipes = new GT_Recipe_Map_Furnace(new HashSet<>(0), "mc.recipe.furnace", "Furnace", "smelting", RES_PATH_GUI + "basicmachines/E_Furnace", 1, 1, 1, 0, 1, E, 1, E, true, false); - public static final GT_Recipe_Map sMicrowaveRecipes = new GT_Recipe_Map_Microwave(new HashSet<>(0), "gt.recipe.microwave", "Microwave", "smelting", RES_PATH_GUI + "basicmachines/E_Furnace", 1, 1, 1, 0, 1, E, 1, E, true, false); + public static final GT_Recipe_Map sOreWasherRecipes = new GT_Recipe_Map( + new HashSet<>(500), + "gt.recipe.orewasher", + "Ore Washing Plant", + null, + RES_PATH_GUI + "basicmachines/OreWasher", + 1, + 3, + 1, + 1, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sThermalCentrifugeRecipes = new GT_Recipe_Map( + new HashSet<>(1000), + "gt.recipe.thermalcentrifuge", + "Thermal Centrifuge", + null, + RES_PATH_GUI + "basicmachines/ThermalCentrifuge", + 1, + 3, + 1, + 0, + 2, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sCompressorRecipes = new GT_Recipe_Map( + new HashSet<>(750), + "gt.recipe.compressor", + "Compressor", + null, + RES_PATH_GUI + "basicmachines/Compressor", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sExtractorRecipes = new GT_Recipe_Map( + new HashSet<>(250), + "gt.recipe.extractor", + "Extractor", + null, + RES_PATH_GUI + "basicmachines/Extractor", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sRecyclerRecipes = new GT_Recipe_Map_Recycler( + new HashSet<>(0), + "ic.recipe.recycler", + "Recycler", + "ic2.recycler", + RES_PATH_GUI + "basicmachines/Recycler", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + false); + public static final GT_Recipe_Map sFurnaceRecipes = new GT_Recipe_Map_Furnace( + new HashSet<>(0), + "mc.recipe.furnace", + "Furnace", + "smelting", + RES_PATH_GUI + "basicmachines/E_Furnace", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + false); + public static final GT_Recipe_Map sMicrowaveRecipes = new GT_Recipe_Map_Microwave( + new HashSet<>(0), + "gt.recipe.microwave", + "Microwave", + "smelting", + RES_PATH_GUI + "basicmachines/E_Furnace", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + false); /** Set {@code aSpecialValue = -100} to bypass the disassembler tier check and default recipe duration. */ - public static final GT_Recipe_Map sDisassemblerRecipes = new GT_Recipe_Map(new HashSet<>(250), "gt.recipe.disassembler", "Disassembler", null, RES_PATH_GUI + "basicmachines/Disassembler", 1, 9, 1, 0, 1, E, 1, E, true, false); - public static final GT_Recipe_Map sScannerFakeRecipes = new GT_Recipe_Map(new HashSet<>(300), "gt.recipe.scanner", "Scanner", null, RES_PATH_GUI + "basicmachines/Scanner", 1, 1, 1, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sRockBreakerFakeRecipes = new GT_Recipe_Map(new HashSet<>(200), "gt.recipe.rockbreaker", "Rock Breaker", null, RES_PATH_GUI + "basicmachines/RockBreaker", 1, 1, 0, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sByProductList = new GT_Recipe_Map(new HashSet<>(1000), "gt.recipe.byproductlist", "Ore Byproduct List", null, RES_PATH_GUI + "basicmachines/Default", 1, 6, 1, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sReplicatorFakeRecipes = new ReplicatorFakeMap(new HashSet<>(100), "gt.recipe.replicator", "Replicator", null, RES_PATH_GUI + "basicmachines/Replicator", 0, 1, 0, 1, 1, E, 1, E, true, true); - //public static final GT_Recipe_Map sAssemblylineFakeRecipes = new GT_Recipe_Map(new HashSet<>(30), "gt.recipe.scanner", "Scanner", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 1, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sAssemblylineVisualRecipes = new GT_Recipe_Map(new HashSet<>(110), "gt.recipe.fakeAssemblylineProcess", "Assemblyline Process", null, RES_PATH_GUI + "FakeAssemblyline", 1, 1, 1, 0, 1, E, 1, E, true, false); - public static final GT_Recipe_Map sPlasmaArcFurnaceRecipes = new GT_Recipe_Map(new HashSet<>(20000), "gt.recipe.plasmaarcfurnace", "Plasma Arc Furnace", null, RES_PATH_GUI + "basicmachines/PlasmaArcFurnace", 1, 4, 1, 1, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sArcFurnaceRecipes = new GT_Recipe_Map(new HashSet<>(20000), "gt.recipe.arcfurnace", "Arc Furnace", null, RES_PATH_GUI + "basicmachines/ArcFurnace", 1, 4, 1, 1, 3, E, 1, E, true, true); - public static final GT_Recipe_Map sPrinterRecipes = new GT_Recipe_Map_Printer(new HashSet<>(5), "gt.recipe.printer", "Printer", null, RES_PATH_GUI + "basicmachines/Printer", 1, 1, 1, 1, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sSifterRecipes = new GT_Recipe_Map(new HashSet<>(105), "gt.recipe.sifter", "Sifter", null, RES_PATH_GUI + "basicmachines/Sifter", 1, 9, 0, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sPressRecipes = new GT_Recipe_Map_FormingPress(new HashSet<>(300), "gt.recipe.press", "Forming Press", null, RES_PATH_GUI + "basicmachines/Press", 2, 1, 2, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sLaserEngraverRecipes = new GT_Recipe_Map(new HashSet<>(810), "gt.recipe.laserengraver", "Precision Laser Engraver", null, RES_PATH_GUI + "basicmachines/LaserEngraverNEI", 2, 1, 0, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sMixerRecipes = new GT_Recipe_Map(new HashSet<>(900), "gt.recipe.mixer", "Mixer", null, RES_PATH_GUI + "basicmachines/Mixer6", 9, 4, 1, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sAutoclaveRecipes = new GT_Recipe_Map(new HashSet<>(300), "gt.recipe.autoclave", "Autoclave", null, RES_PATH_GUI + "basicmachines/Autoclave4", 2, 4, 1, 1, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sElectroMagneticSeparatorRecipes = new GT_Recipe_Map(new HashSet<>(50), "gt.recipe.electromagneticseparator", "Electromagnetic Separator", null, RES_PATH_GUI + "basicmachines/ElectromagneticSeparator", 1, 3, 1, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sPolarizerRecipes = new GT_Recipe_Map(new HashSet<>(300), "gt.recipe.polarizer", "Electromagnetic Polarizer", null, RES_PATH_GUI + "basicmachines/Polarizer", 1, 1, 1, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sMaceratorRecipes = new GT_Recipe_Map_Macerator(new HashSet<>(16600), "gt.recipe.macerator", "Pulverization", null, RES_PATH_GUI + "basicmachines/Macerator4", 1, 4, 1, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sChemicalBathRecipes = new GT_Recipe_Map(new HashSet<>(2550), "gt.recipe.chemicalbath", "Chemical Bath", null, RES_PATH_GUI + "basicmachines/ChemicalBath", 1, 3, 1, 1, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sFluidCannerRecipes = new GT_Recipe_Map_FluidCanner(new HashSet<>(2100), "gt.recipe.fluidcanner", "Fluid Canning Machine", null, RES_PATH_GUI + "basicmachines/FluidCanner", 1, 1, 1, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sBrewingRecipes = new GT_Recipe_Map(new HashSet<>(450), "gt.recipe.brewer", "Brewing Machine", null, RES_PATH_GUI + "basicmachines/PotionBrewer", 1, 0, 1, 1, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sFluidHeaterRecipes = new GT_Recipe_Map(new HashSet<>(10), "gt.recipe.fluidheater", "Fluid Heater", null, RES_PATH_GUI + "basicmachines/FluidHeater", 1, 0, 1, 1, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sDistilleryRecipes = new GT_Recipe_Map(new HashSet<>(400), "gt.recipe.distillery", "Distillery", null, RES_PATH_GUI + "basicmachines/Distillery", 1, 1, 1, 1, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sFermentingRecipes = new GT_Recipe_Map(new HashSet<>(50), "gt.recipe.fermenter", "Fermenter", null, RES_PATH_GUI + "basicmachines/Fermenter", 0, 0, 0, 1, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sFluidSolidficationRecipes = new GT_Recipe_Map(new HashSet<>(35000), "gt.recipe.fluidsolidifier", "Fluid Solidifier", null, RES_PATH_GUI + "basicmachines/FluidSolidifier", 1, 1, 1, 1, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sFluidExtractionRecipes = new GT_Recipe_Map(new HashSet<>(15000), "gt.recipe.fluidextractor", "Fluid Extractor", null, RES_PATH_GUI + "basicmachines/FluidExtractor", 1, 1, 1, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sBoxinatorRecipes = new GT_Recipe_Map(new HashSet<>(2500), "gt.recipe.packager", "Packager", null, RES_PATH_GUI + "basicmachines/Packager", 2, 1, 2, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sUnboxinatorRecipes = new GT_Recipe_Map_Unboxinator(new HashSet<>(2500), "gt.recipe.unpackager", "Unpackager", null, RES_PATH_GUI + "basicmachines/Unpackager", 1, 2, 1, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sFusionRecipes = new GT_Recipe_Map(new HashSet<>(50), "gt.recipe.fusionreactor", "Fusion Reactor", null, RES_PATH_GUI + "basicmachines/FusionReactor", 0, 0, 0, 2, 1, "Start: ", 1, " EU", true, true); - public static final GT_Recipe_Map sComplexFusionRecipes = new GT_Recipe_Map_ComplexFusion(new HashSet<>(50), "gt.recipe.complexfusionreactor", "Complex Fusion Reactor", null, RES_PATH_GUI + "basicmachines/ComplexFusionReactor", 3, 0, 0, 2, 1, "Start: ", 1, " EU", true, true); - public static final GT_Recipe_Map sCentrifugeRecipes = new GT_Recipe_Map(new HashSet<>(1200), "gt.recipe.centrifuge", "Centrifuge", null, RES_PATH_GUI + "basicmachines/Centrifuge", 2, 6, 0, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sElectrolyzerRecipes = new GT_Recipe_Map(new HashSet<>(300), "gt.recipe.electrolyzer", "Electrolyzer", null, RES_PATH_GUI + "basicmachines/Electrolyzer", 2, 6, 0, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sBlastRecipes = new GT_Recipe_Map(new HashSet<>(800), "gt.recipe.blastfurnace", "Blast Furnace", null, RES_PATH_GUI + "basicmachines/Default", 6, 6, 1, 0, 1, "Heat Capacity: ", 1, " K", false, true); - public static final GT_Recipe_Map sPlasmaForgeRecipes = new GT_Recipe_Map_PlasmaForge(new HashSet<>(20), "gt.recipe.plasmaforge", "DTPF", null, RES_PATH_GUI + "basicmachines/PlasmaForge", 1, 1, 0, 0, 1, "Heat Capacity: ", 1, " K", false, true); - public static final GT_Recipe_Map sPrimitiveBlastRecipes = new GT_Recipe_Map(new HashSet<>(200), "gt.recipe.primitiveblastfurnace", "Primitive Blast Furnace", null, RES_PATH_GUI + "basicmachines/Default", 3, 3, 1, 0, 1, E, 1, E, false, true); - public static final GT_Recipe_Map sImplosionRecipes = new GT_Recipe_Map(new HashSet<>(900), "gt.recipe.implosioncompressor", "Implosion Compressor", null, RES_PATH_GUI + "basicmachines/Default", 2, 2, 2, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sVacuumRecipes = new GT_Recipe_Map(new HashSet<>(305), "gt.recipe.vacuumfreezer", "Vacuum Freezer", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, E, 1, E, false, true); - public static final GT_Recipe_Map sChemicalRecipes = new GT_Recipe_Map(new HashSet<>(1170), "gt.recipe.chemicalreactor", "Chemical Reactor", null, RES_PATH_GUI + "basicmachines/ChemicalReactor", 2, 2, 1, 0, 1, E, 1, E, true, true); + public static final GT_Recipe_Map sDisassemblerRecipes = new GT_Recipe_Map( + new HashSet<>(250), + "gt.recipe.disassembler", + "Disassembler", + null, + RES_PATH_GUI + "basicmachines/Disassembler", + 1, + 9, + 1, + 0, + 1, + E, + 1, + E, + true, + false); + + public static final GT_Recipe_Map sScannerFakeRecipes = new GT_Recipe_Map( + new HashSet<>(300), + "gt.recipe.scanner", + "Scanner", + null, + RES_PATH_GUI + "basicmachines/Scanner", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sRockBreakerFakeRecipes = new GT_Recipe_Map( + new HashSet<>(200), + "gt.recipe.rockbreaker", + "Rock Breaker", + null, + RES_PATH_GUI + "basicmachines/RockBreaker", + 1, + 1, + 0, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sByProductList = new GT_Recipe_Map( + new HashSet<>(1000), + "gt.recipe.byproductlist", + "Ore Byproduct List", + null, + RES_PATH_GUI + "basicmachines/Default", + 1, + 6, + 1, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sReplicatorFakeRecipes = new ReplicatorFakeMap( + new HashSet<>(100), + "gt.recipe.replicator", + "Replicator", + null, + RES_PATH_GUI + "basicmachines/Replicator", + 0, + 1, + 0, + 1, + 1, + E, + 1, + E, + true, + true); + // public static final GT_Recipe_Map sAssemblylineFakeRecipes = new GT_Recipe_Map(new HashSet<>(30), + // "gt.recipe.scanner", "Scanner", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 1, 0, 1, E, 1, E, true, + // true); + public static final GT_Recipe_Map sAssemblylineVisualRecipes = new GT_Recipe_Map( + new HashSet<>(110), + "gt.recipe.fakeAssemblylineProcess", + "Assemblyline Process", + null, + RES_PATH_GUI + "FakeAssemblyline", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + false); + public static final GT_Recipe_Map sPlasmaArcFurnaceRecipes = new GT_Recipe_Map( + new HashSet<>(20000), + "gt.recipe.plasmaarcfurnace", + "Plasma Arc Furnace", + null, + RES_PATH_GUI + "basicmachines/PlasmaArcFurnace", + 1, + 4, + 1, + 1, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sArcFurnaceRecipes = new GT_Recipe_Map( + new HashSet<>(20000), + "gt.recipe.arcfurnace", + "Arc Furnace", + null, + RES_PATH_GUI + "basicmachines/ArcFurnace", + 1, + 4, + 1, + 1, + 3, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sPrinterRecipes = new GT_Recipe_Map_Printer( + new HashSet<>(5), + "gt.recipe.printer", + "Printer", + null, + RES_PATH_GUI + "basicmachines/Printer", + 1, + 1, + 1, + 1, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sSifterRecipes = new GT_Recipe_Map( + new HashSet<>(105), + "gt.recipe.sifter", + "Sifter", + null, + RES_PATH_GUI + "basicmachines/Sifter", + 1, + 9, + 0, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sPressRecipes = new GT_Recipe_Map_FormingPress( + new HashSet<>(300), + "gt.recipe.press", + "Forming Press", + null, + RES_PATH_GUI + "basicmachines/Press", + 2, + 1, + 2, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sLaserEngraverRecipes = new GT_Recipe_Map( + new HashSet<>(810), + "gt.recipe.laserengraver", + "Precision Laser Engraver", + null, + RES_PATH_GUI + "basicmachines/LaserEngraverNEI", + 2, + 1, + 0, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sMixerRecipes = new GT_Recipe_Map( + new HashSet<>(900), + "gt.recipe.mixer", + "Mixer", + null, + RES_PATH_GUI + "basicmachines/Mixer6", + 9, + 4, + 1, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sAutoclaveRecipes = new GT_Recipe_Map( + new HashSet<>(300), + "gt.recipe.autoclave", + "Autoclave", + null, + RES_PATH_GUI + "basicmachines/Autoclave4", + 2, + 4, + 1, + 1, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sElectroMagneticSeparatorRecipes = new GT_Recipe_Map( + new HashSet<>(50), + "gt.recipe.electromagneticseparator", + "Electromagnetic Separator", + null, + RES_PATH_GUI + "basicmachines/ElectromagneticSeparator", + 1, + 3, + 1, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sPolarizerRecipes = new GT_Recipe_Map( + new HashSet<>(300), + "gt.recipe.polarizer", + "Electromagnetic Polarizer", + null, + RES_PATH_GUI + "basicmachines/Polarizer", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sMaceratorRecipes = new GT_Recipe_Map_Macerator( + new HashSet<>(16600), + "gt.recipe.macerator", + "Pulverization", + null, + RES_PATH_GUI + "basicmachines/Macerator4", + 1, + 4, + 1, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sChemicalBathRecipes = new GT_Recipe_Map( + new HashSet<>(2550), + "gt.recipe.chemicalbath", + "Chemical Bath", + null, + RES_PATH_GUI + "basicmachines/ChemicalBath", + 1, + 3, + 1, + 1, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sFluidCannerRecipes = new GT_Recipe_Map_FluidCanner( + new HashSet<>(2100), + "gt.recipe.fluidcanner", + "Fluid Canning Machine", + null, + RES_PATH_GUI + "basicmachines/FluidCanner", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sBrewingRecipes = new GT_Recipe_Map( + new HashSet<>(450), + "gt.recipe.brewer", + "Brewing Machine", + null, + RES_PATH_GUI + "basicmachines/PotionBrewer", + 1, + 0, + 1, + 1, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sFluidHeaterRecipes = new GT_Recipe_Map( + new HashSet<>(10), + "gt.recipe.fluidheater", + "Fluid Heater", + null, + RES_PATH_GUI + "basicmachines/FluidHeater", + 1, + 0, + 1, + 1, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sDistilleryRecipes = new GT_Recipe_Map( + new HashSet<>(400), + "gt.recipe.distillery", + "Distillery", + null, + RES_PATH_GUI + "basicmachines/Distillery", + 1, + 1, + 1, + 1, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sFermentingRecipes = new GT_Recipe_Map( + new HashSet<>(50), + "gt.recipe.fermenter", + "Fermenter", + null, + RES_PATH_GUI + "basicmachines/Fermenter", + 0, + 0, + 0, + 1, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sFluidSolidficationRecipes = new GT_Recipe_Map( + new HashSet<>(35000), + "gt.recipe.fluidsolidifier", + "Fluid Solidifier", + null, + RES_PATH_GUI + "basicmachines/FluidSolidifier", + 1, + 1, + 1, + 1, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sFluidExtractionRecipes = new GT_Recipe_Map( + new HashSet<>(15000), + "gt.recipe.fluidextractor", + "Fluid Extractor", + null, + RES_PATH_GUI + "basicmachines/FluidExtractor", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sBoxinatorRecipes = new GT_Recipe_Map( + new HashSet<>(2500), + "gt.recipe.packager", + "Packager", + null, + RES_PATH_GUI + "basicmachines/Packager", + 2, + 1, + 2, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sUnboxinatorRecipes = new GT_Recipe_Map_Unboxinator( + new HashSet<>(2500), + "gt.recipe.unpackager", + "Unpackager", + null, + RES_PATH_GUI + "basicmachines/Unpackager", + 1, + 2, + 1, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sFusionRecipes = new GT_Recipe_Map( + new HashSet<>(50), + "gt.recipe.fusionreactor", + "Fusion Reactor", + null, + RES_PATH_GUI + "basicmachines/FusionReactor", + 0, + 0, + 0, + 2, + 1, + "Start: ", + 1, + " EU", + true, + true); + public static final GT_Recipe_Map sComplexFusionRecipes = new GT_Recipe_Map_ComplexFusion( + new HashSet<>(50), + "gt.recipe.complexfusionreactor", + "Complex Fusion Reactor", + null, + RES_PATH_GUI + "basicmachines/ComplexFusionReactor", + 3, + 0, + 0, + 2, + 1, + "Start: ", + 1, + " EU", + true, + true); + public static final GT_Recipe_Map sCentrifugeRecipes = new GT_Recipe_Map( + new HashSet<>(1200), + "gt.recipe.centrifuge", + "Centrifuge", + null, + RES_PATH_GUI + "basicmachines/Centrifuge", + 2, + 6, + 0, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sElectrolyzerRecipes = new GT_Recipe_Map( + new HashSet<>(300), + "gt.recipe.electrolyzer", + "Electrolyzer", + null, + RES_PATH_GUI + "basicmachines/Electrolyzer", + 2, + 6, + 0, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sBlastRecipes = new GT_Recipe_Map( + new HashSet<>(800), + "gt.recipe.blastfurnace", + "Blast Furnace", + null, + RES_PATH_GUI + "basicmachines/Default", + 6, + 6, + 1, + 0, + 1, + "Heat Capacity: ", + 1, + " K", + false, + true); + public static final GT_Recipe_Map sPlasmaForgeRecipes = new GT_Recipe_Map_PlasmaForge( + new HashSet<>(20), + "gt.recipe.plasmaforge", + "DTPF", + null, + RES_PATH_GUI + "basicmachines/PlasmaForge", + 1, + 1, + 0, + 0, + 1, + "Heat Capacity: ", + 1, + " K", + false, + true); + public static final GT_Recipe_Map sPrimitiveBlastRecipes = new GT_Recipe_Map( + new HashSet<>(200), + "gt.recipe.primitiveblastfurnace", + "Primitive Blast Furnace", + null, + RES_PATH_GUI + "basicmachines/Default", + 3, + 3, + 1, + 0, + 1, + E, + 1, + E, + false, + true); + public static final GT_Recipe_Map sImplosionRecipes = new GT_Recipe_Map( + new HashSet<>(900), + "gt.recipe.implosioncompressor", + "Implosion Compressor", + null, + RES_PATH_GUI + "basicmachines/Default", + 2, + 2, + 2, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sVacuumRecipes = new GT_Recipe_Map( + new HashSet<>(305), + "gt.recipe.vacuumfreezer", + "Vacuum Freezer", + null, + RES_PATH_GUI + "basicmachines/Default", + 1, + 1, + 0, + 0, + 1, + E, + 1, + E, + false, + true); + public static final GT_Recipe_Map sChemicalRecipes = new GT_Recipe_Map( + new HashSet<>(1170), + "gt.recipe.chemicalreactor", + "Chemical Reactor", + null, + RES_PATH_GUI + "basicmachines/ChemicalReactor", + 2, + 2, + 1, + 0, + 1, + E, + 1, + E, + true, + true); public static final GT_Recipe_Map sMultiblockChemicalRecipes = new GT_Recipe_Map_LargeChemicalReactor(); public static final GT_Recipe_Map sDistillationRecipes = new GT_Recipe_Map_DistillationTower(); public static final GT_Recipe_Map_OilCracker sCrackingRecipes = new GT_Recipe_Map_OilCracker(); @@ -856,44 +1689,468 @@ public class GT_Recipe implements Comparable<GT_Recipe> { */ @Deprecated public static final GT_Recipe_Map sCrakingRecipes = sCrackingRecipes; - public static final GT_Recipe_Map sPyrolyseRecipes = new GT_Recipe_Map(new HashSet<>(150), "gt.recipe.pyro", "Pyrolyse Oven", null, RES_PATH_GUI + "basicmachines/Default", 2, 1, 1, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sWiremillRecipes = new GT_Recipe_Map(new HashSet<>(450), "gt.recipe.wiremill", "Wiremill", null, RES_PATH_GUI + "basicmachines/Wiremill", 1, 1, 1, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sBenderRecipes = new GT_Recipe_Map(new HashSet<>(5000), "gt.recipe.metalbender", "Bending Machine", null, RES_PATH_GUI + "basicmachines/Bender", 2, 1, 2, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sAlloySmelterRecipes = new GT_Recipe_Map(new HashSet<>(12000), "gt.recipe.alloysmelter", "Alloy Smelter", null, RES_PATH_GUI + "basicmachines/AlloySmelter", 2, 1, 2, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sAssemblerRecipes = new GT_Recipe_Map_Assembler(new HashSet<>(8200), "gt.recipe.assembler", "Assembler", null, RES_PATH_GUI + "basicmachines/Assembler2", 9, 1, 1, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sCircuitAssemblerRecipes = new GT_Recipe_Map_Assembler(new HashSet<>(605), "gt.recipe.circuitassembler", "Circuit Assembler", null, RES_PATH_GUI + "basicmachines/CircuitAssembler", 6, 1, 1, 0, 1, E, 1, E, true, true, !Loader.isModLoaded("neicustomdiagram")); - public static final GT_Recipe_Map sCannerRecipes = new GT_Recipe_Map(new HashSet<>(900), "gt.recipe.canner", "Canning Machine", null, RES_PATH_GUI + "basicmachines/Canner", 2, 2, 1, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sCNCRecipes = new GT_Recipe_Map(new HashSet<>(100), "gt.recipe.cncmachine", "CNC Machine", null, RES_PATH_GUI + "basicmachines/Default", 2, 1, 2, 1, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sLatheRecipes = new GT_Recipe_Map(new HashSet<>(1150), "gt.recipe.lathe", "Lathe", null, RES_PATH_GUI + "basicmachines/Lathe", 1, 2, 1, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sCutterRecipes = new GT_Recipe_Map(new HashSet<>(5125), "gt.recipe.cuttingsaw", "Cutting Machine", null, RES_PATH_GUI + "basicmachines/Cutter4", 2, 4, 1, 1, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sSlicerRecipes = new GT_Recipe_Map(new HashSet<>(20), "gt.recipe.slicer", "Slicing Machine", null, RES_PATH_GUI + "basicmachines/Slicer", 2, 1, 2, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sExtruderRecipes = new GT_Recipe_Map(new HashSet<>(13000), "gt.recipe.extruder", "Extruder", null, RES_PATH_GUI + "basicmachines/Extruder", 2, 1, 2, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sHammerRecipes = new GT_Recipe_Map(new HashSet<>(3800), "gt.recipe.hammer", "Forge Hammer", null, RES_PATH_GUI + "basicmachines/Hammer", 1, 1, 1, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sAmplifiers = new GT_Recipe_Map(new HashSet<>(2), "gt.recipe.uuamplifier", "Amplifabricator", null, RES_PATH_GUI + "basicmachines/Amplifabricator", 1, 0, 1, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sMassFabFakeRecipes = new GT_Recipe_Map(new HashSet<>(2), "gt.recipe.massfab", "Mass Fabrication", null, RES_PATH_GUI + "basicmachines/Massfabricator", 1, 0, 1, 0, 8, E, 1, E, true, true); - public static final GT_Recipe_Map_Fuel sDieselFuels = new GT_Recipe_Map_Fuel(new HashSet<>(20), "gt.recipe.dieselgeneratorfuel", "Combustion Generator Fuels", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true); - public static final GT_Recipe_Map_Fuel sExtremeDieselFuels = new GT_Recipe_Map_Fuel(new HashSet<>(20), "gt.recipe.extremedieselgeneratorfuel", "Extreme Diesel Engine Fuel", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true); - public static final GT_Recipe_Map_Fuel sTurbineFuels = new GT_Recipe_Map_Fuel(new HashSet<>(25), "gt.recipe.gasturbinefuel", "Gas Turbine Fuel", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true); - public static final GT_Recipe_Map_Fuel sHotFuels = new GT_Recipe_Map_Fuel(new HashSet<>(10), "gt.recipe.thermalgeneratorfuel", "Thermal Generator Fuels", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, false); - public static final GT_Recipe_Map_Fuel sDenseLiquidFuels = new GT_Recipe_Map_Fuel(new HashSet<>(15), "gt.recipe.semifluidboilerfuels", "Semifluid Boiler Fuels", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true); - public static final GT_Recipe_Map_Fuel sPlasmaFuels = new GT_Recipe_Map_Fuel(new HashSet<>(100), "gt.recipe.plasmageneratorfuels", "Plasma Generator Fuels", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true); - public static final GT_Recipe_Map_Fuel sMagicFuels = new GT_Recipe_Map_Fuel(new HashSet<>(100), "gt.recipe.magicfuels", "Magic Energy Absorber Fuels", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true); - public static final GT_Recipe_Map_Fuel sSmallNaquadahReactorFuels = new GT_Recipe_Map_Fuel(new HashSet<>(1), "gt.recipe.smallnaquadahreactor", "Naquadah Reactor MkI", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true); - public static final GT_Recipe_Map_Fuel sLargeNaquadahReactorFuels = new GT_Recipe_Map_Fuel(new HashSet<>(1), "gt.recipe.largenaquadahreactor", "Naquadah Reactor MkII", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true); - public static final GT_Recipe_Map_Fuel sHugeNaquadahReactorFuels = new GT_Recipe_Map_Fuel(new HashSet<>(1), "gt.recipe.fluidnaquadahreactor", "Naquadah Reactor MkIII", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true); - public static final GT_Recipe_Map_Fuel sExtremeNaquadahReactorFuels = new GT_Recipe_Map_Fuel(new HashSet<>(1), "gt.recipe.hugenaquadahreactor", "Naquadah Reactor MkIV", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true); - public static final GT_Recipe_Map_Fuel sUltraHugeNaquadahReactorFuels = new GT_Recipe_Map_Fuel(new HashSet<>(1), "gt.recipe.extrahugenaquadahreactor", "Naquadah Reactor MkV", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true); - public static final GT_Recipe_Map_Fuel sFluidNaquadahReactorFuels = new GT_Recipe_Map_Fuel(new HashSet<>(1), "gt.recipe.fluidfuelnaquadahreactor", "Fluid Naquadah Reactor", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true); - public static final GT_Recipe_Map_LargeBoilerFakeFuels sLargeBoilerFakeFuels = new GT_Recipe_Map_LargeBoilerFakeFuels(); + + public static final GT_Recipe_Map sPyrolyseRecipes = new GT_Recipe_Map( + new HashSet<>(150), + "gt.recipe.pyro", + "Pyrolyse Oven", + null, + RES_PATH_GUI + "basicmachines/Default", + 2, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sWiremillRecipes = new GT_Recipe_Map( + new HashSet<>(450), + "gt.recipe.wiremill", + "Wiremill", + null, + RES_PATH_GUI + "basicmachines/Wiremill", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sBenderRecipes = new GT_Recipe_Map( + new HashSet<>(5000), + "gt.recipe.metalbender", + "Bending Machine", + null, + RES_PATH_GUI + "basicmachines/Bender", + 2, + 1, + 2, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sAlloySmelterRecipes = new GT_Recipe_Map( + new HashSet<>(12000), + "gt.recipe.alloysmelter", + "Alloy Smelter", + null, + RES_PATH_GUI + "basicmachines/AlloySmelter", + 2, + 1, + 2, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sAssemblerRecipes = new GT_Recipe_Map_Assembler( + new HashSet<>(8200), + "gt.recipe.assembler", + "Assembler", + null, + RES_PATH_GUI + "basicmachines/Assembler2", + 9, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sCircuitAssemblerRecipes = new GT_Recipe_Map_Assembler( + new HashSet<>(605), + "gt.recipe.circuitassembler", + "Circuit Assembler", + null, + RES_PATH_GUI + "basicmachines/CircuitAssembler", + 6, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true, + !Loader.isModLoaded("neicustomdiagram")); + public static final GT_Recipe_Map sCannerRecipes = new GT_Recipe_Map( + new HashSet<>(900), + "gt.recipe.canner", + "Canning Machine", + null, + RES_PATH_GUI + "basicmachines/Canner", + 2, + 2, + 1, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sCNCRecipes = new GT_Recipe_Map( + new HashSet<>(100), + "gt.recipe.cncmachine", + "CNC Machine", + null, + RES_PATH_GUI + "basicmachines/Default", + 2, + 1, + 2, + 1, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sLatheRecipes = new GT_Recipe_Map( + new HashSet<>(1150), + "gt.recipe.lathe", + "Lathe", + null, + RES_PATH_GUI + "basicmachines/Lathe", + 1, + 2, + 1, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sCutterRecipes = new GT_Recipe_Map( + new HashSet<>(5125), + "gt.recipe.cuttingsaw", + "Cutting Machine", + null, + RES_PATH_GUI + "basicmachines/Cutter4", + 2, + 4, + 1, + 1, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sSlicerRecipes = new GT_Recipe_Map( + new HashSet<>(20), + "gt.recipe.slicer", + "Slicing Machine", + null, + RES_PATH_GUI + "basicmachines/Slicer", + 2, + 1, + 2, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sExtruderRecipes = new GT_Recipe_Map( + new HashSet<>(13000), + "gt.recipe.extruder", + "Extruder", + null, + RES_PATH_GUI + "basicmachines/Extruder", + 2, + 1, + 2, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sHammerRecipes = new GT_Recipe_Map( + new HashSet<>(3800), + "gt.recipe.hammer", + "Forge Hammer", + null, + RES_PATH_GUI + "basicmachines/Hammer", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sAmplifiers = new GT_Recipe_Map( + new HashSet<>(2), + "gt.recipe.uuamplifier", + "Amplifabricator", + null, + RES_PATH_GUI + "basicmachines/Amplifabricator", + 1, + 0, + 1, + 0, + 1, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map sMassFabFakeRecipes = new GT_Recipe_Map( + new HashSet<>(2), + "gt.recipe.massfab", + "Mass Fabrication", + null, + RES_PATH_GUI + "basicmachines/Massfabricator", + 1, + 0, + 1, + 0, + 8, + E, + 1, + E, + true, + true); + public static final GT_Recipe_Map_Fuel sDieselFuels = new GT_Recipe_Map_Fuel( + new HashSet<>(20), + "gt.recipe.dieselgeneratorfuel", + "Combustion Generator Fuels", + null, + RES_PATH_GUI + "basicmachines/Default", + 1, + 1, + 0, + 0, + 1, + "Fuel Value: ", + 1000, + " EU", + true, + true); + public static final GT_Recipe_Map_Fuel sExtremeDieselFuels = new GT_Recipe_Map_Fuel( + new HashSet<>(20), + "gt.recipe.extremedieselgeneratorfuel", + "Extreme Diesel Engine Fuel", + null, + RES_PATH_GUI + "basicmachines/Default", + 1, + 1, + 0, + 0, + 1, + "Fuel Value: ", + 1000, + " EU", + true, + true); + public static final GT_Recipe_Map_Fuel sTurbineFuels = new GT_Recipe_Map_Fuel( + new HashSet<>(25), + "gt.recipe.gasturbinefuel", + "Gas Turbine Fuel", + null, + RES_PATH_GUI + "basicmachines/Default", + 1, + 1, + 0, + 0, + 1, + "Fuel Value: ", + 1000, + " EU", + true, + true); + public static final GT_Recipe_Map_Fuel sHotFuels = new GT_Recipe_Map_Fuel( + new HashSet<>(10), + "gt.recipe.thermalgeneratorfuel", + "Thermal Generator Fuels", + null, + RES_PATH_GUI + "basicmachines/Default", + 1, + 1, + 0, + 0, + 1, + "Fuel Value: ", + 1000, + " EU", + true, + false); + public static final GT_Recipe_Map_Fuel sDenseLiquidFuels = new GT_Recipe_Map_Fuel( + new HashSet<>(15), + "gt.recipe.semifluidboilerfuels", + "Semifluid Boiler Fuels", + null, + RES_PATH_GUI + "basicmachines/Default", + 1, + 1, + 0, + 0, + 1, + "Fuel Value: ", + 1000, + " EU", + true, + true); + public static final GT_Recipe_Map_Fuel sPlasmaFuels = new GT_Recipe_Map_Fuel( + new HashSet<>(100), + "gt.recipe.plasmageneratorfuels", + "Plasma Generator Fuels", + null, + RES_PATH_GUI + "basicmachines/Default", + 1, + 1, + 0, + 0, + 1, + "Fuel Value: ", + 1000, + " EU", + true, + true); + public static final GT_Recipe_Map_Fuel sMagicFuels = new GT_Recipe_Map_Fuel( + new HashSet<>(100), + "gt.recipe.magicfuels", + "Magic Energy Absorber Fuels", + null, + RES_PATH_GUI + "basicmachines/Default", + 1, + 1, + 0, + 0, + 1, + "Fuel Value: ", + 1000, + " EU", + true, + true); + public static final GT_Recipe_Map_Fuel sSmallNaquadahReactorFuels = new GT_Recipe_Map_Fuel( + new HashSet<>(1), + "gt.recipe.smallnaquadahreactor", + "Naquadah Reactor MkI", + null, + RES_PATH_GUI + "basicmachines/Default", + 1, + 1, + 0, + 0, + 1, + "Fuel Value: ", + 1000, + " EU", + true, + true); + public static final GT_Recipe_Map_Fuel sLargeNaquadahReactorFuels = new GT_Recipe_Map_Fuel( + new HashSet<>(1), + "gt.recipe.largenaquadahreactor", + "Naquadah Reactor MkII", + null, + RES_PATH_GUI + "basicmachines/Default", + 1, + 1, + 0, + 0, + 1, + "Fuel Value: ", + 1000, + " EU", + true, + true); + public static final GT_Recipe_Map_Fuel sHugeNaquadahReactorFuels = new GT_Recipe_Map_Fuel( + new HashSet<>(1), + "gt.recipe.fluidnaquadahreactor", + "Naquadah Reactor MkIII", + null, + RES_PATH_GUI + "basicmachines/Default", + 1, + 1, + 0, + 0, + 1, + "Fuel Value: ", + 1000, + " EU", + true, + true); + public static final GT_Recipe_Map_Fuel sExtremeNaquadahReactorFuels = new GT_Recipe_Map_Fuel( + new HashSet<>(1), + "gt.recipe.hugenaquadahreactor", + "Naquadah Reactor MkIV", + null, + RES_PATH_GUI + "basicmachines/Default", + 1, + 1, + 0, + 0, + 1, + "Fuel Value: ", + 1000, + " EU", + true, + true); + public static final GT_Recipe_Map_Fuel sUltraHugeNaquadahReactorFuels = new GT_Recipe_Map_Fuel( + new HashSet<>(1), + "gt.recipe.extrahugenaquadahreactor", + "Naquadah Reactor MkV", + null, + RES_PATH_GUI + "basicmachines/Default", + 1, + 1, + 0, + 0, + 1, + "Fuel Value: ", + 1000, + " EU", + true, + true); + public static final GT_Recipe_Map_Fuel sFluidNaquadahReactorFuels = new GT_Recipe_Map_Fuel( + new HashSet<>(1), + "gt.recipe.fluidfuelnaquadahreactor", + "Fluid Naquadah Reactor", + null, + RES_PATH_GUI + "basicmachines/Default", + 1, + 1, + 0, + 0, + 1, + "Fuel Value: ", + 1000, + " EU", + true, + true); + public static final GT_Recipe_Map_LargeBoilerFakeFuels sLargeBoilerFakeFuels = + new GT_Recipe_Map_LargeBoilerFakeFuels(); /** * HashMap of Recipes based on their Items */ - public final Map<GT_ItemStack, Collection<GT_Recipe>> mRecipeItemMap = new /*Concurrent*/HashMap<>(); + public final Map<GT_ItemStack, Collection<GT_Recipe>> mRecipeItemMap = new /*Concurrent*/ HashMap<>(); /** * HashMap of Recipes based on their Fluids */ - public final Map<Fluid, Collection<GT_Recipe>> mRecipeFluidMap = new /*Concurrent*/HashMap<>(); + public final Map<Fluid, Collection<GT_Recipe>> mRecipeFluidMap = new /*Concurrent*/ HashMap<>(); + public final HashSet<String> mRecipeFluidNameMap = new HashSet<>(); /** * The List of all Recipes @@ -911,8 +2168,14 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * GUI used for NEI Display. Usually the GUI of the Machine itself */ public final String mNEIGUIPath; + public final String mNEISpecialValuePre, mNEISpecialValuePost; - public final int mUsualInputCount, mUsualOutputCount, mNEISpecialValueMultiplier, mMinimalInputItems, mMinimalInputFluids, mAmperage; + public final int mUsualInputCount, + mUsualOutputCount, + mNEISpecialValueMultiplier, + mMinimalInputItems, + mMinimalInputFluids, + mAmperage; public final boolean mNEIAllowed, mShowVoltageAmperageInNEI, mNEIUnificateOutput; /** @@ -946,7 +2209,23 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * @param aNEIAllowed if NEI is allowed to display this Recipe Handler in general. * @param aNEIUnificateOutput if NEI generate oredict equivalents */ - public GT_Recipe_Map(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed, boolean aNEIUnificateOutput) { + public GT_Recipe_Map( + Collection<GT_Recipe> aRecipeList, + String aUnlocalizedName, + String aLocalName, + String aNEIName, + String aNEIGUIPath, + int aUsualInputCount, + int aUsualOutputCount, + int aMinimalInputItems, + int aMinimalInputFluids, + int aAmperage, + String aNEISpecialValuePre, + int aNEISpecialValueMultiplier, + String aNEISpecialValuePost, + boolean aShowVoltageAmperageInNEI, + boolean aNEIAllowed, + boolean aNEIUnificateOutput) { sMappings.add(this); mNEIAllowed = aNEIAllowed; mShowVoltageAmperageInNEI = aShowVoltageAmperageInNEI; @@ -965,37 +2244,136 @@ public class GT_Recipe implements Comparable<GT_Recipe> { GregTech_API.sFluidMappings.add(mRecipeFluidMap); GregTech_API.sItemStackMappings.add(mRecipeItemMap); GT_LanguageManager.addStringLocalization(mUnlocalizedName = aUnlocalizedName, aLocalName); - mUniqueIdentifier = String.format("%s_%d_%d_%d_%d_%d", aUnlocalizedName, aAmperage, aUsualInputCount, aUsualOutputCount, aMinimalInputFluids, aMinimalInputItems); + mUniqueIdentifier = String.format( + "%s_%d_%d_%d_%d_%d", + aUnlocalizedName, + aAmperage, + aUsualInputCount, + aUsualOutputCount, + aMinimalInputFluids, + aMinimalInputItems); if (sIndexedMappings.put(mUniqueIdentifier, this) != null) throw new IllegalArgumentException("Duplicate recipe map registered: " + mUniqueIdentifier); } - public GT_Recipe_Map(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) { - this(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed, true); - } - - public GT_Recipe addRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { - return addRecipe(new GT_Recipe(aOptimize, aInputs, aOutputs, aSpecial, aOutputChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue)); - } - - public GT_Recipe addRecipe(int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { - return addRecipe(new GT_Recipe(false, null, null, null, aOutputChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue), false, false, false); - } - - public GT_Recipe addRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { - return addRecipe(new GT_Recipe(aOptimize, aInputs, aOutputs, aSpecial, null, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue)); + public GT_Recipe_Map( + Collection<GT_Recipe> aRecipeList, + String aUnlocalizedName, + String aLocalName, + String aNEIName, + String aNEIGUIPath, + int aUsualInputCount, + int aUsualOutputCount, + int aMinimalInputItems, + int aMinimalInputFluids, + int aAmperage, + String aNEISpecialValuePre, + int aNEISpecialValueMultiplier, + String aNEISpecialValuePost, + boolean aShowVoltageAmperageInNEI, + boolean aNEIAllowed) { + this( + aRecipeList, + aUnlocalizedName, + aLocalName, + aNEIName, + aNEIGUIPath, + aUsualInputCount, + aUsualOutputCount, + aMinimalInputItems, + aMinimalInputFluids, + aAmperage, + aNEISpecialValuePre, + aNEISpecialValueMultiplier, + aNEISpecialValuePost, + aShowVoltageAmperageInNEI, + aNEIAllowed, + true); + } + + public GT_Recipe addRecipe( + boolean aOptimize, + ItemStack[] aInputs, + ItemStack[] aOutputs, + Object aSpecial, + int[] aOutputChances, + FluidStack[] aFluidInputs, + FluidStack[] aFluidOutputs, + int aDuration, + int aEUt, + int aSpecialValue) { + return addRecipe(new GT_Recipe( + aOptimize, + aInputs, + aOutputs, + aSpecial, + aOutputChances, + aFluidInputs, + aFluidOutputs, + aDuration, + aEUt, + aSpecialValue)); + } + + public GT_Recipe addRecipe( + int[] aOutputChances, + FluidStack[] aFluidInputs, + FluidStack[] aFluidOutputs, + int aDuration, + int aEUt, + int aSpecialValue) { + return addRecipe( + new GT_Recipe( + false, + null, + null, + null, + aOutputChances, + aFluidInputs, + aFluidOutputs, + aDuration, + aEUt, + aSpecialValue), + false, + false, + false); + } + + public GT_Recipe addRecipe( + boolean aOptimize, + ItemStack[] aInputs, + ItemStack[] aOutputs, + Object aSpecial, + FluidStack[] aFluidInputs, + FluidStack[] aFluidOutputs, + int aDuration, + int aEUt, + int aSpecialValue) { + return addRecipe(new GT_Recipe( + aOptimize, + aInputs, + aOutputs, + aSpecial, + null, + aFluidInputs, + aFluidOutputs, + aDuration, + aEUt, + aSpecialValue)); } public GT_Recipe addRecipe(GT_Recipe aRecipe) { return addRecipe(aRecipe, true, false, false); } - protected GT_Recipe addRecipe(GT_Recipe aRecipe, boolean aCheckForCollisions, boolean aFakeRecipe, boolean aHidden) { + protected GT_Recipe addRecipe( + GT_Recipe aRecipe, boolean aCheckForCollisions, boolean aFakeRecipe, boolean aHidden) { aRecipe.mHidden = aHidden; aRecipe.mFakeRecipe = aFakeRecipe; if (aRecipe.mFluidInputs.length < mMinimalInputFluids && aRecipe.mInputs.length < mMinimalInputItems) return null; - if (aCheckForCollisions && findRecipe(null, false, true, Long.MAX_VALUE, aRecipe.mFluidInputs, aRecipe.mInputs) != null) + if (aCheckForCollisions + && findRecipe(null, false, true, Long.MAX_VALUE, aRecipe.mFluidInputs, aRecipe.mInputs) != null) return null; return add(aRecipe); } @@ -1003,22 +2381,114 @@ public class GT_Recipe implements Comparable<GT_Recipe> { /** * Only used for fake Recipe Handlers to show something in NEI, do not use this for adding actual Recipes! findRecipe wont find fake Recipes, containsInput WILL find fake Recipes */ - public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { - return addFakeRecipe(aCheckForCollisions, new GT_Recipe(false, aInputs, aOutputs, aSpecial, aOutputChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue)); + public GT_Recipe addFakeRecipe( + boolean aCheckForCollisions, + ItemStack[] aInputs, + ItemStack[] aOutputs, + Object aSpecial, + int[] aOutputChances, + FluidStack[] aFluidInputs, + FluidStack[] aFluidOutputs, + int aDuration, + int aEUt, + int aSpecialValue) { + return addFakeRecipe( + aCheckForCollisions, + new GT_Recipe( + false, + aInputs, + aOutputs, + aSpecial, + aOutputChances, + aFluidInputs, + aFluidOutputs, + aDuration, + aEUt, + aSpecialValue)); } /** * Only used for fake Recipe Handlers to show something in NEI, do not use this for adding actual Recipes! findRecipe wont find fake Recipes, containsInput WILL find fake Recipes */ - public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { - return addFakeRecipe(aCheckForCollisions, new GT_Recipe(false, aInputs, aOutputs, aSpecial, null, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue)); - } - public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue,boolean hidden) { - return addFakeRecipe(aCheckForCollisions, new GT_Recipe(false, aInputs, aOutputs, aSpecial, null, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue),hidden); - } - - public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue, ItemStack[][] aAlt ,boolean hidden) { - return addFakeRecipe(aCheckForCollisions, new GT_Recipe_WithAlt(false, aInputs, aOutputs, aSpecial, null, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue, aAlt),hidden); + public GT_Recipe addFakeRecipe( + boolean aCheckForCollisions, + ItemStack[] aInputs, + ItemStack[] aOutputs, + Object aSpecial, + FluidStack[] aFluidInputs, + FluidStack[] aFluidOutputs, + int aDuration, + int aEUt, + int aSpecialValue) { + return addFakeRecipe( + aCheckForCollisions, + new GT_Recipe( + false, + aInputs, + aOutputs, + aSpecial, + null, + aFluidInputs, + aFluidOutputs, + aDuration, + aEUt, + aSpecialValue)); + } + + public GT_Recipe addFakeRecipe( + boolean aCheckForCollisions, + ItemStack[] aInputs, + ItemStack[] aOutputs, + Object aSpecial, + FluidStack[] aFluidInputs, + FluidStack[] aFluidOutputs, + int aDuration, + int aEUt, + int aSpecialValue, + boolean hidden) { + return addFakeRecipe( + aCheckForCollisions, + new GT_Recipe( + false, + aInputs, + aOutputs, + aSpecial, + null, + aFluidInputs, + aFluidOutputs, + aDuration, + aEUt, + aSpecialValue), + hidden); + } + + public GT_Recipe addFakeRecipe( + boolean aCheckForCollisions, + ItemStack[] aInputs, + ItemStack[] aOutputs, + Object aSpecial, + FluidStack[] aFluidInputs, + FluidStack[] aFluidOutputs, + int aDuration, + int aEUt, + int aSpecialValue, + ItemStack[][] aAlt, + boolean hidden) { + return addFakeRecipe( + aCheckForCollisions, + new GT_Recipe_WithAlt( + false, + aInputs, + aOutputs, + aSpecial, + null, + aFluidInputs, + aFluidOutputs, + aDuration, + aEUt, + aSpecialValue, + aAlt), + hidden); } /** @@ -1027,7 +2497,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, GT_Recipe aRecipe) { return addRecipe(aRecipe, aCheckForCollisions, true, false); } - public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, GT_Recipe aRecipe,boolean hidden) { + + public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, GT_Recipe aRecipe, boolean hidden) { return addRecipe(aRecipe, aCheckForCollisions, true, hidden); } @@ -1035,7 +2506,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { mRecipeList.add(aRecipe); for (FluidStack aFluid : aRecipe.mFluidInputs) { if (aFluid != null) { - Collection<GT_Recipe> tList = mRecipeFluidMap.computeIfAbsent(aFluid.getFluid(), k -> new HashSet<>(1)); + Collection<GT_Recipe> tList = + mRecipeFluidMap.computeIfAbsent(aFluid.getFluid(), k -> new HashSet<>(1)); tList.add(aRecipe); mRecipeFluidNameMap.add(aFluid.getFluid().getName()); } @@ -1062,7 +2534,9 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * @return if this Item is a valid Input for any for the Recipes */ public boolean containsInput(ItemStack aStack) { - return aStack != null && (mRecipeItemMap.containsKey(new GT_ItemStack(aStack)) || mRecipeItemMap.containsKey(new GT_ItemStack(aStack, true))); + return aStack != null + && (mRecipeItemMap.containsKey(new GT_ItemStack(aStack)) + || mRecipeItemMap.containsKey(new GT_ItemStack(aStack, true))); } /** @@ -1076,27 +2550,60 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * @return if this Fluid is a valid Input for any for the Recipes */ public boolean containsInput(Fluid aFluid) { - return aFluid != null && mRecipeFluidNameMap.contains(aFluid.getName()); + return aFluid != null && mRecipeFluidNameMap.contains(aFluid.getName()); } - public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack... aInputs) { + public GT_Recipe findRecipe( + IHasWorldObjectAndCoords aTileEntity, + boolean aNotUnificated, + long aVoltage, + FluidStack[] aFluids, + ItemStack... aInputs) { return findRecipe(aTileEntity, null, aNotUnificated, aVoltage, aFluids, null, aInputs); } - public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, boolean aNotUnificated, boolean aDontCheckStackSizes, long aVoltage, FluidStack[] aFluids, ItemStack... aInputs) { - return findRecipe(aTileEntity, null, aNotUnificated, aDontCheckStackSizes, aVoltage, aFluids, null, aInputs); - } - - public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack... aInputs) { + public GT_Recipe findRecipe( + IHasWorldObjectAndCoords aTileEntity, + boolean aNotUnificated, + boolean aDontCheckStackSizes, + long aVoltage, + FluidStack[] aFluids, + ItemStack... aInputs) { + return findRecipe( + aTileEntity, null, aNotUnificated, aDontCheckStackSizes, aVoltage, aFluids, null, aInputs); + } + + public GT_Recipe findRecipe( + IHasWorldObjectAndCoords aTileEntity, + GT_Recipe aRecipe, + boolean aNotUnificated, + long aVoltage, + FluidStack[] aFluids, + ItemStack... aInputs) { return findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, null, aInputs); } - public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, boolean aDontCheckStackSizes, long aVoltage, FluidStack[] aFluids, ItemStack... aInputs) { - return findRecipe(aTileEntity, aRecipe, aNotUnificated, aDontCheckStackSizes, aVoltage, aFluids, null, aInputs); - } - - public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) { - return findRecipe(aTileEntity, aRecipe, aNotUnificated, false, aVoltage, aFluids, aSpecialSlot, aInputs); + public GT_Recipe findRecipe( + IHasWorldObjectAndCoords aTileEntity, + GT_Recipe aRecipe, + boolean aNotUnificated, + boolean aDontCheckStackSizes, + long aVoltage, + FluidStack[] aFluids, + ItemStack... aInputs) { + return findRecipe( + aTileEntity, aRecipe, aNotUnificated, aDontCheckStackSizes, aVoltage, aFluids, null, aInputs); + } + + public GT_Recipe findRecipe( + IHasWorldObjectAndCoords aTileEntity, + GT_Recipe aRecipe, + boolean aNotUnificated, + long aVoltage, + FluidStack[] aFluids, + ItemStack aSpecialSlot, + ItemStack... aInputs) { + return findRecipe(aTileEntity, aRecipe, aNotUnificated, false, aVoltage, aFluids, aSpecialSlot, aInputs); } /** * finds a Recipe matching the aFluid and ItemStack Inputs. @@ -1111,12 +2618,22 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * @param aInputs the Item Inputs * @return the Recipe it has found or null for no matching Recipe */ - public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, boolean aDontCheckStackSizes, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) { + public GT_Recipe findRecipe( + IHasWorldObjectAndCoords aTileEntity, + GT_Recipe aRecipe, + boolean aNotUnificated, + boolean aDontCheckStackSizes, + long aVoltage, + FluidStack[] aFluids, + ItemStack aSpecialSlot, + ItemStack... aInputs) { // No Recipes? Well, nothing to be found then. if (mRecipeList.isEmpty()) return null; - // Some Recipe Classes require a certain amount of Inputs of certain kinds. Like "at least 1 Fluid + 1 Stack" or "at least 2 Stacks" before they start searching for Recipes. - // This improves Performance massively, especially if people leave things like Circuits, Molds or Shapes in their Machines to select Sub Recipes. + // Some Recipe Classes require a certain amount of Inputs of certain kinds. Like "at least 1 Fluid + 1 + // Stack" or "at least 2 Stacks" before they start searching for Recipes. + // This improves Performance massively, especially if people leave things like Circuits, Molds or Shapes in + // their Machines to select Sub Recipes. if (GregTech_API.sPostloadFinished) { if (mMinimalInputFluids > 0) { if (aFluids == null) return null; @@ -1128,7 +2645,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> { if (aInputs == null) return null; int tAmount = 0; for (ItemStack aInput : aInputs) if (aInput != null) tAmount++; - if (tAmount < mMinimalInputItems) return null; + if (tAmount < mMinimalInputItems) return null; } } @@ -1137,32 +2654,41 @@ public class GT_Recipe implements Comparable<GT_Recipe> { // Check the Recipe which has been used last time in order to not have to search for it again, if possible. if (aRecipe != null) - if (!aRecipe.mFakeRecipe && aRecipe.mCanBeBuffered && aRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) + if (!aRecipe.mFakeRecipe + && aRecipe.mCanBeBuffered + && aRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) return aRecipe.mEnabled && aVoltage * mAmperage >= aRecipe.mEUt ? aRecipe : null; // Now look for the Recipes inside the Item HashMaps, but only when the Recipes usually have Items. - if (mUsualInputCount > 0 && aInputs != null) for (ItemStack tStack : aInputs) - if (tStack != null) { - Collection<GT_Recipe> - tRecipes = mRecipeItemMap.get(new GT_ItemStack(tStack)); - if (tRecipes != null) for (GT_Recipe tRecipe : tRecipes) - if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) - return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null; - tRecipes = mRecipeItemMap.get(new GT_ItemStack(tStack, true)); - if (tRecipes != null) for (GT_Recipe tRecipe : tRecipes) - if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) - return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null; - } + if (mUsualInputCount > 0 && aInputs != null) + for (ItemStack tStack : aInputs) + if (tStack != null) { + Collection<GT_Recipe> tRecipes = mRecipeItemMap.get(new GT_ItemStack(tStack)); + if (tRecipes != null) + for (GT_Recipe tRecipe : tRecipes) + if (!tRecipe.mFakeRecipe + && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) + return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null; + tRecipes = mRecipeItemMap.get(new GT_ItemStack(tStack, true)); + if (tRecipes != null) + for (GT_Recipe tRecipe : tRecipes) + if (!tRecipe.mFakeRecipe + && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) + return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null; + } - // If the minimal Amount of Items for the Recipe is 0, then it could be a Fluid-Only Recipe, so check that Map too. - if (mMinimalInputItems == 0 && aFluids != null) for (FluidStack aFluid : aFluids) - if (aFluid != null) { - Collection<GT_Recipe> - tRecipes = mRecipeFluidMap.get(aFluid.getFluid()); - if (tRecipes != null) for (GT_Recipe tRecipe : tRecipes) - if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) - return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null; - } + // If the minimal Amount of Items for the Recipe is 0, then it could be a Fluid-Only Recipe, so check that + // Map too. + if (mMinimalInputItems == 0 && aFluids != null) + for (FluidStack aFluid : aFluids) + if (aFluid != null) { + Collection<GT_Recipe> tRecipes = mRecipeFluidMap.get(aFluid.getFluid()); + if (tRecipes != null) + for (GT_Recipe tRecipe : tRecipes) + if (!tRecipe.mFakeRecipe + && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) + return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null; + } // And nothing has been found. return null; @@ -1203,7 +2729,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * Overriding this method and getOutputPositionedStacks allows custom NEI stack placement * @return A list of input stacks */ - public ArrayList<PositionedStack> getInputPositionedStacks(GT_Recipe recipe){ + public ArrayList<PositionedStack> getInputPositionedStacks(GT_Recipe recipe) { return null; } @@ -1211,12 +2737,11 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * Overriding this method and getInputPositionedStacks allows custom NEI stack placement * @return A list of output stacks */ - public ArrayList<PositionedStack> getOutputPositionedStacks(GT_Recipe recipe){ + public ArrayList<PositionedStack> getOutputPositionedStacks(GT_Recipe recipe) { return null; } - public void addRecipe(Object o, FluidStack[] fluidInputArray, FluidStack[] fluidOutputArray) { - } + public void addRecipe(Object o, FluidStack[] fluidInputArray, FluidStack[] fluidOutputArray) {} } // ----------------------------------------------------------------------------------------------------------------- @@ -1227,8 +2752,38 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * Abstract Class for general Recipe Handling of non GT Recipes */ public abstract static class GT_Recipe_Map_NonGTRecipes extends GT_Recipe_Map { - public GT_Recipe_Map_NonGTRecipes(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) { - super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); + public GT_Recipe_Map_NonGTRecipes( + Collection<GT_Recipe> aRecipeList, + String aUnlocalizedName, + String aLocalName, + String aNEIName, + String aNEIGUIPath, + int aUsualInputCount, + int aUsualOutputCount, + int aMinimalInputItems, + int aMinimalInputFluids, + int aAmperage, + String aNEISpecialValuePre, + int aNEISpecialValueMultiplier, + String aNEISpecialValuePost, + boolean aShowVoltageAmperageInNEI, + boolean aNEIAllowed) { + super( + aRecipeList, + aUnlocalizedName, + aLocalName, + aNEIName, + aNEIGUIPath, + aUsualInputCount, + aUsualOutputCount, + aMinimalInputItems, + aMinimalInputFluids, + aAmperage, + aNEISpecialValuePre, + aNEISpecialValueMultiplier, + aNEISpecialValuePost, + aShowVoltageAmperageInNEI, + aNEIAllowed); } @Override @@ -1247,12 +2802,31 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } @Override - public GT_Recipe addRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { + public GT_Recipe addRecipe( + boolean aOptimize, + ItemStack[] aInputs, + ItemStack[] aOutputs, + Object aSpecial, + int[] aOutputChances, + FluidStack[] aFluidInputs, + FluidStack[] aFluidOutputs, + int aDuration, + int aEUt, + int aSpecialValue) { return null; } @Override - public GT_Recipe addRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { + public GT_Recipe addRecipe( + boolean aOptimize, + ItemStack[] aInputs, + ItemStack[] aOutputs, + Object aSpecial, + FluidStack[] aFluidInputs, + FluidStack[] aFluidOutputs, + int aDuration, + int aEUt, + int aSpecialValue) { return null; } @@ -1262,17 +2836,46 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } @Override - public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { + public GT_Recipe addFakeRecipe( + boolean aCheckForCollisions, + ItemStack[] aInputs, + ItemStack[] aOutputs, + Object aSpecial, + int[] aOutputChances, + FluidStack[] aFluidInputs, + FluidStack[] aFluidOutputs, + int aDuration, + int aEUt, + int aSpecialValue) { return null; } @Override - public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { + public GT_Recipe addFakeRecipe( + boolean aCheckForCollisions, + ItemStack[] aInputs, + ItemStack[] aOutputs, + Object aSpecial, + FluidStack[] aFluidInputs, + FluidStack[] aFluidOutputs, + int aDuration, + int aEUt, + int aSpecialValue) { return null; } @Override - public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue,boolean hidden) { + public GT_Recipe addFakeRecipe( + boolean aCheckForCollisions, + ItemStack[] aInputs, + ItemStack[] aOutputs, + Object aSpecial, + FluidStack[] aFluidInputs, + FluidStack[] aFluidOutputs, + int aDuration, + int aEUt, + int aSpecialValue, + boolean hidden) { return null; } @@ -1287,7 +2890,9 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } @Override - public void reInit() {/**/} + public void reInit() { + /**/ + } @Override protected GT_Recipe addToItemMap(GT_Recipe aRecipe) { @@ -1300,8 +2905,39 @@ public class GT_Recipe implements Comparable<GT_Recipe> { */ public static class GT_Recipe_Map_Fuel extends GT_Recipe_Map { private final Map<String, GT_Recipe> mRecipesByFluidInput = new HashMap<>(); - public GT_Recipe_Map_Fuel(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) { - super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); + + public GT_Recipe_Map_Fuel( + Collection<GT_Recipe> aRecipeList, + String aUnlocalizedName, + String aLocalName, + String aNEIName, + String aNEIGUIPath, + int aUsualInputCount, + int aUsualOutputCount, + int aMinimalInputItems, + int aMinimalInputFluids, + int aAmperage, + String aNEISpecialValuePre, + int aNEISpecialValueMultiplier, + String aNEISpecialValuePost, + boolean aShowVoltageAmperageInNEI, + boolean aNEIAllowed) { + super( + aRecipeList, + aUnlocalizedName, + aLocalName, + aNEIName, + aNEIGUIPath, + aUsualInputCount, + aUsualOutputCount, + aMinimalInputItems, + aMinimalInputFluids, + aAmperage, + aNEISpecialValuePre, + aNEISpecialValueMultiplier, + aNEISpecialValuePost, + aShowVoltageAmperageInNEI, + aNEIAllowed); } public GT_Recipe addFuel(ItemStack aInput, ItemStack aOutput, int aFuelValueInEU) { @@ -1316,27 +2952,50 @@ public class GT_Recipe implements Comparable<GT_Recipe> { return addFuel(null, null, aFluidInput, aFluidOutput, 10000, aFuelValueInEU); } - public GT_Recipe addFuel(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput, int aFuelValueInEU) { + public GT_Recipe addFuel( + ItemStack aInput, + ItemStack aOutput, + FluidStack aFluidInput, + FluidStack aFluidOutput, + int aFuelValueInEU) { return addFuel(aInput, aOutput, aFluidInput, aFluidOutput, 10000, aFuelValueInEU); } - public GT_Recipe addFuel(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput, int aChance, int aFuelValueInEU) { - return addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput}, null, new int[]{aChance}, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, 0, 0, aFuelValueInEU); + public GT_Recipe addFuel( + ItemStack aInput, + ItemStack aOutput, + FluidStack aFluidInput, + FluidStack aFluidOutput, + int aChance, + int aFuelValueInEU) { + return addRecipe( + true, + new ItemStack[] {aInput}, + new ItemStack[] {aOutput}, + null, + new int[] {aChance}, + new FluidStack[] {aFluidInput}, + new FluidStack[] {aFluidOutput}, + 0, + 0, + aFuelValueInEU); } @Override public GT_Recipe add(GT_Recipe aRecipe) { aRecipe = super.add(aRecipe); - if (aRecipe.mInputs != null && GT_Utility.getNonnullElementCount(aRecipe.mInputs) == 1 && - (aRecipe.mFluidInputs == null || GT_Utility.getNonnullElementCount(aRecipe.mFluidInputs) == 0)) { + if (aRecipe.mInputs != null + && GT_Utility.getNonnullElementCount(aRecipe.mInputs) == 1 + && (aRecipe.mFluidInputs == null || GT_Utility.getNonnullElementCount(aRecipe.mFluidInputs) == 0)) { FluidStack tFluid = GT_Utility.getFluidForFilledItem(aRecipe.mInputs[0], true); if (tFluid != null) { tFluid.amount = 0; mRecipesByFluidInput.put(tFluid.getUnlocalizedName(), aRecipe); } - } else if ((aRecipe.mInputs == null || GT_Utility.getNonnullElementCount(aRecipe.mInputs) == 0) && - aRecipe.mFluidInputs != null && GT_Utility.getNonnullElementCount(aRecipe.mFluidInputs) == 1 && - aRecipe.mFluidInputs[0] != null) { + } else if ((aRecipe.mInputs == null || GT_Utility.getNonnullElementCount(aRecipe.mInputs) == 0) + && aRecipe.mFluidInputs != null + && GT_Utility.getNonnullElementCount(aRecipe.mFluidInputs) == 1 + && aRecipe.mFluidInputs[0] != null) { mRecipesByFluidInput.put(aRecipe.mFluidInputs[0].getUnlocalizedName(), aRecipe); } return aRecipe; @@ -1351,16 +3010,65 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * Special Class for Furnace Recipe handling. */ public static class GT_Recipe_Map_Furnace extends GT_Recipe_Map_NonGTRecipes { - public GT_Recipe_Map_Furnace(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) { - super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); + public GT_Recipe_Map_Furnace( + Collection<GT_Recipe> aRecipeList, + String aUnlocalizedName, + String aLocalName, + String aNEIName, + String aNEIGUIPath, + int aUsualInputCount, + int aUsualOutputCount, + int aMinimalInputItems, + int aMinimalInputFluids, + int aAmperage, + String aNEISpecialValuePre, + int aNEISpecialValueMultiplier, + String aNEISpecialValuePost, + boolean aShowVoltageAmperageInNEI, + boolean aNEIAllowed) { + super( + aRecipeList, + aUnlocalizedName, + aLocalName, + aNEIName, + aNEIGUIPath, + aUsualInputCount, + aUsualOutputCount, + aMinimalInputItems, + aMinimalInputFluids, + aAmperage, + aNEISpecialValuePre, + aNEISpecialValueMultiplier, + aNEISpecialValuePost, + aShowVoltageAmperageInNEI, + aNEIAllowed); } @Override - public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) { + public GT_Recipe findRecipe( + IHasWorldObjectAndCoords aTileEntity, + GT_Recipe aRecipe, + boolean aNotUnificated, + long aVoltage, + FluidStack[] aFluids, + ItemStack aSpecialSlot, + ItemStack... aInputs) { if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null) return null; if (aRecipe != null && aRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) return aRecipe; ItemStack tOutput = GT_ModHandler.getSmeltingOutput(aInputs[0], false, null); - return tOutput == null ? null : new GT_Recipe(false, new ItemStack[]{GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[]{tOutput}, null, null, null, null, 128, 4, 0); + return tOutput == null + ? null + : new GT_Recipe( + false, + new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, + new ItemStack[] {tOutput}, + null, + null, + null, + null, + 128, + 4, + 0); } @Override @@ -1373,42 +3081,96 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * Special Class for Microwave Recipe handling. */ public static class GT_Recipe_Map_Microwave extends GT_Recipe_Map_NonGTRecipes { - public GT_Recipe_Map_Microwave(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) { - super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); + public GT_Recipe_Map_Microwave( + Collection<GT_Recipe> aRecipeList, + String aUnlocalizedName, + String aLocalName, + String aNEIName, + String aNEIGUIPath, + int aUsualInputCount, + int aUsualOutputCount, + int aMinimalInputItems, + int aMinimalInputFluids, + int aAmperage, + String aNEISpecialValuePre, + int aNEISpecialValueMultiplier, + String aNEISpecialValuePost, + boolean aShowVoltageAmperageInNEI, + boolean aNEIAllowed) { + super( + aRecipeList, + aUnlocalizedName, + aLocalName, + aNEIName, + aNEIGUIPath, + aUsualInputCount, + aUsualOutputCount, + aMinimalInputItems, + aMinimalInputFluids, + aAmperage, + aNEISpecialValuePre, + aNEISpecialValueMultiplier, + aNEISpecialValuePost, + aShowVoltageAmperageInNEI, + aNEIAllowed); } @Override - public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) { + public GT_Recipe findRecipe( + IHasWorldObjectAndCoords aTileEntity, + GT_Recipe aRecipe, + boolean aNotUnificated, + long aVoltage, + FluidStack[] aFluids, + ItemStack aSpecialSlot, + ItemStack... aInputs) { if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null) return null; if (aRecipe != null && aRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) return aRecipe; ItemStack tOutput = GT_ModHandler.getSmeltingOutput(aInputs[0], false, null); if (GT_Utility.areStacksEqual(aInputs[0], new ItemStack(Items.book, 1, W))) { - return new GT_Recipe(false, new ItemStack[]{GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[]{GT_Utility.getWrittenBook("Manual_Microwave", ItemList.Book_Written_03.get(1))}, null, null, null, null, 32, 4, 0); + return new GT_Recipe( + false, + new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, + new ItemStack[] {GT_Utility.getWrittenBook("Manual_Microwave", ItemList.Book_Written_03.get(1)) + }, + null, + null, + null, + null, + 32, + 4, + 0); } - // Check Container Item of Input since it is around the Input, then the Input itself, then Container Item of Output and last check the Output itself - for (ItemStack tStack : new ItemStack[]{GT_Utility.getContainerItem(aInputs[0], true), aInputs[0], GT_Utility.getContainerItem(tOutput, true), tOutput}) + // Check Container Item of Input since it is around the Input, then the Input itself, then Container Item of + // Output and last check the Output itself + for (ItemStack tStack : new ItemStack[] { + GT_Utility.getContainerItem(aInputs[0], true), + aInputs[0], + GT_Utility.getContainerItem(tOutput, true), + tOutput + }) if (tStack != null) { if (GT_Utility.areStacksEqual(tStack, new ItemStack(Blocks.netherrack, 1, W), true) || GT_Utility.areStacksEqual(tStack, new ItemStack(Blocks.tnt, 1, W), true) || GT_Utility.areStacksEqual(tStack, new ItemStack(Items.egg, 1, W), true) || GT_Utility.areStacksEqual(tStack, new ItemStack(Items.firework_charge, 1, W), true) || GT_Utility.areStacksEqual(tStack, new ItemStack(Items.fireworks, 1, W), true) - || GT_Utility.areStacksEqual(tStack, new ItemStack(Items.fire_charge, 1, W), true) - ) { + || GT_Utility.areStacksEqual(tStack, new ItemStack(Items.fire_charge, 1, W), true)) { if (aTileEntity instanceof IGregTechTileEntity) { - GT_Log.exp.println("Microwave Explosion due to TNT || EGG || FIREWORKCHARGE || FIREWORK || FIRE CHARGE"); + GT_Log.exp.println( + "Microwave Explosion due to TNT || EGG || FIREWORKCHARGE || FIREWORK || FIRE CHARGE"); ((IGregTechTileEntity) aTileEntity).doExplosion(aVoltage * 4); } return null; } ItemData tData = GT_OreDictUnificator.getItemData(tStack); - if (tData != null) { if (tData.mMaterial != null && tData.mMaterial.mMaterial != null) { - if (tData.mMaterial.mMaterial.contains(SubTag.METAL) || tData.mMaterial.mMaterial.contains(SubTag.EXPLOSIVE)) { + if (tData.mMaterial.mMaterial.contains(SubTag.METAL) + || tData.mMaterial.mMaterial.contains(SubTag.EXPLOSIVE)) { if (aTileEntity instanceof IGregTechTileEntity) { GT_Log.exp.println("Microwave Explosion due to METAL insertion"); ((IGregTechTileEntity) aTileEntity).doExplosion(aVoltage * 4); @@ -1425,7 +3187,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } for (MaterialStack tMaterial : tData.mByProducts) if (tMaterial != null) { - if (tMaterial.mMaterial.contains(SubTag.METAL) || tMaterial.mMaterial.contains(SubTag.EXPLOSIVE)) { + if (tMaterial.mMaterial.contains(SubTag.METAL) + || tMaterial.mMaterial.contains(SubTag.EXPLOSIVE)) { if (aTileEntity instanceof IGregTechTileEntity) { GT_Log.exp.println("Microwave Explosion due to METAL insertion"); ((IGregTechTileEntity) aTileEntity).doExplosion(aVoltage * 4); @@ -1448,10 +3211,21 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } return null; } - } - return tOutput == null ? null : new GT_Recipe(false, new ItemStack[]{GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[]{tOutput}, null, null, null, null, 32, 4, 0); + return tOutput == null + ? null + : new GT_Recipe( + false, + new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, + new ItemStack[] {tOutput}, + null, + null, + null, + null, + 32, + 4, + 0); } @Override @@ -1464,21 +3238,69 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * Special Class for Unboxinator handling. */ public static class GT_Recipe_Map_Unboxinator extends GT_Recipe_Map { - public GT_Recipe_Map_Unboxinator(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) { - super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); + public GT_Recipe_Map_Unboxinator( + Collection<GT_Recipe> aRecipeList, + String aUnlocalizedName, + String aLocalName, + String aNEIName, + String aNEIGUIPath, + int aUsualInputCount, + int aUsualOutputCount, + int aMinimalInputItems, + int aMinimalInputFluids, + int aAmperage, + String aNEISpecialValuePre, + int aNEISpecialValueMultiplier, + String aNEISpecialValuePost, + boolean aShowVoltageAmperageInNEI, + boolean aNEIAllowed) { + super( + aRecipeList, + aUnlocalizedName, + aLocalName, + aNEIName, + aNEIGUIPath, + aUsualInputCount, + aUsualOutputCount, + aMinimalInputItems, + aMinimalInputFluids, + aAmperage, + aNEISpecialValuePre, + aNEISpecialValueMultiplier, + aNEISpecialValuePost, + aShowVoltageAmperageInNEI, + aNEIAllowed); } @Override - public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) { + public GT_Recipe findRecipe( + IHasWorldObjectAndCoords aTileEntity, + GT_Recipe aRecipe, + boolean aNotUnificated, + long aVoltage, + FluidStack[] aFluids, + ItemStack aSpecialSlot, + ItemStack... aInputs) { if (aInputs == null || aInputs.length <= 0 || !ItemList.IC2_Scrapbox.isStackEqual(aInputs[0], false, true)) return super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs); ItemStack tOutput = GT_ModHandler.getRandomScrapboxDrop(); if (tOutput == null) return super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs); - GT_Recipe rRecipe = new GT_Recipe(false, new ItemStack[]{ItemList.IC2_Scrapbox.get(1)}, new ItemStack[]{tOutput}, null, null, null, null, 16, 1, 0); + GT_Recipe rRecipe = new GT_Recipe( + false, + new ItemStack[] {ItemList.IC2_Scrapbox.get(1)}, + new ItemStack[] {tOutput}, + null, + null, + null, + null, + 16, + 1, + 0); // It is not allowed to be buffered due to the random Output rRecipe.mCanBeBuffered = false; - // Due to its randomness it is not good if there are Items in the Output Slot, because those Items could manipulate the outcome. + // Due to its randomness it is not good if there are Items in the Output Slot, because those Items could + // manipulate the outcome. rRecipe.mNeedsEmptyOutput = true; return rRecipe; } @@ -1493,25 +3315,86 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * Special Class for Fluid Canner handling. */ public static class GT_Recipe_Map_FluidCanner extends GT_Recipe_Map { - public GT_Recipe_Map_FluidCanner(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) { - super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); + public GT_Recipe_Map_FluidCanner( + Collection<GT_Recipe> aRecipeList, + String aUnlocalizedName, + String aLocalName, + String aNEIName, + String aNEIGUIPath, + int aUsualInputCount, + int aUsualOutputCount, + int aMinimalInputItems, + int aMinimalInputFluids, + int aAmperage, + String aNEISpecialValuePre, + int aNEISpecialValueMultiplier, + String aNEISpecialValuePost, + boolean aShowVoltageAmperageInNEI, + boolean aNEIAllowed) { + super( + aRecipeList, + aUnlocalizedName, + aLocalName, + aNEIName, + aNEIGUIPath, + aUsualInputCount, + aUsualOutputCount, + aMinimalInputItems, + aMinimalInputFluids, + aAmperage, + aNEISpecialValuePre, + aNEISpecialValueMultiplier, + aNEISpecialValuePost, + aShowVoltageAmperageInNEI, + aNEIAllowed); } @Override - public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) { - GT_Recipe rRecipe = super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs); - if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null || rRecipe != null || !GregTech_API.sPostloadFinished) - return rRecipe; + public GT_Recipe findRecipe( + IHasWorldObjectAndCoords aTileEntity, + GT_Recipe aRecipe, + boolean aNotUnificated, + long aVoltage, + FluidStack[] aFluids, + ItemStack aSpecialSlot, + ItemStack... aInputs) { + GT_Recipe rRecipe = + super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs); + if (aInputs == null + || aInputs.length <= 0 + || aInputs[0] == null + || rRecipe != null + || !GregTech_API.sPostloadFinished) return rRecipe; if (aFluids != null && aFluids.length > 0 && aFluids[0] != null) { ItemStack tOutput = GT_Utility.fillFluidContainer(aFluids[0], aInputs[0], false, true); FluidStack tFluid = GT_Utility.getFluidForFilledItem(tOutput, true); if (tFluid != null) - rRecipe = new GT_Recipe(false, new ItemStack[]{GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[]{tOutput}, null, null, new FluidStack[]{tFluid}, null, Math.max(tFluid.amount / 64, 16), 1, 0); + rRecipe = new GT_Recipe( + false, + new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, + new ItemStack[] {tOutput}, + null, + null, + new FluidStack[] {tFluid}, + null, + Math.max(tFluid.amount / 64, 16), + 1, + 0); } if (rRecipe == null) { FluidStack tFluid = GT_Utility.getFluidForFilledItem(aInputs[0], true); if (tFluid != null) - rRecipe = new GT_Recipe(false, new ItemStack[]{GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[]{GT_Utility.getContainerItem(aInputs[0], true)}, null, null, null, new FluidStack[]{tFluid}, Math.max(tFluid.amount / 64, 16), 1, 0); + rRecipe = new GT_Recipe( + false, + new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, + new ItemStack[] {GT_Utility.getContainerItem(aInputs[0], true)}, + null, + null, + null, + new FluidStack[] {tFluid}, + Math.max(tFluid.amount / 64, 16), + 1, + 0); } if (rRecipe != null) rRecipe.mCanBeBuffered = false; return rRecipe; @@ -1519,7 +3402,10 @@ public class GT_Recipe implements Comparable<GT_Recipe> { @Override public boolean containsInput(ItemStack aStack) { - return aStack != null && (super.containsInput(aStack) || (aStack.getItem() instanceof IFluidContainerItem && ((IFluidContainerItem) aStack.getItem()).getCapacity(aStack) > 0)); + return aStack != null + && (super.containsInput(aStack) + || (aStack.getItem() instanceof IFluidContainerItem + && ((IFluidContainerItem) aStack.getItem()).getCapacity(aStack) > 0)); } @Override @@ -1537,15 +3423,64 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * Special Class for Recycler Recipe handling. */ public static class GT_Recipe_Map_Recycler extends GT_Recipe_Map_NonGTRecipes { - public GT_Recipe_Map_Recycler(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) { - super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); + public GT_Recipe_Map_Recycler( + Collection<GT_Recipe> aRecipeList, + String aUnlocalizedName, + String aLocalName, + String aNEIName, + String aNEIGUIPath, + int aUsualInputCount, + int aUsualOutputCount, + int aMinimalInputItems, + int aMinimalInputFluids, + int aAmperage, + String aNEISpecialValuePre, + int aNEISpecialValueMultiplier, + String aNEISpecialValuePost, + boolean aShowVoltageAmperageInNEI, + boolean aNEIAllowed) { + super( + aRecipeList, + aUnlocalizedName, + aLocalName, + aNEIName, + aNEIGUIPath, + aUsualInputCount, + aUsualOutputCount, + aMinimalInputItems, + aMinimalInputFluids, + aAmperage, + aNEISpecialValuePre, + aNEISpecialValueMultiplier, + aNEISpecialValuePost, + aShowVoltageAmperageInNEI, + aNEIAllowed); } @Override - public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) { + public GT_Recipe findRecipe( + IHasWorldObjectAndCoords aTileEntity, + GT_Recipe aRecipe, + boolean aNotUnificated, + long aVoltage, + FluidStack[] aFluids, + ItemStack aSpecialSlot, + ItemStack... aInputs) { if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null) return null; if (aRecipe != null && aRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) return aRecipe; - return new GT_Recipe(false, new ItemStack[]{GT_Utility.copyAmount(1, aInputs[0])}, GT_ModHandler.getRecyclerOutput(GT_Utility.copyAmount(64, aInputs[0]), 0) == null ? null : new ItemStack[]{ItemList.IC2_Scrap.get(1)}, null, new int[]{1250}, null, null, 45, 1, 0); + return new GT_Recipe( + false, + new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, + GT_ModHandler.getRecyclerOutput(GT_Utility.copyAmount(64, aInputs[0]), 0) == null + ? null + : new ItemStack[] {ItemList.IC2_Scrap.get(1)}, + null, + new int[] {1250}, + null, + null, + 45, + 1, + 0); } @Override @@ -1558,22 +3493,87 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * Special Class for Compressor Recipe handling. */ public static class GT_Recipe_Map_Compressor extends GT_Recipe_Map_NonGTRecipes { - public GT_Recipe_Map_Compressor(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) { - super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); + public GT_Recipe_Map_Compressor( + Collection<GT_Recipe> aRecipeList, + String aUnlocalizedName, + String aLocalName, + String aNEIName, + String aNEIGUIPath, + int aUsualInputCount, + int aUsualOutputCount, + int aMinimalInputItems, + int aMinimalInputFluids, + int aAmperage, + String aNEISpecialValuePre, + int aNEISpecialValueMultiplier, + String aNEISpecialValuePost, + boolean aShowVoltageAmperageInNEI, + boolean aNEIAllowed) { + super( + aRecipeList, + aUnlocalizedName, + aLocalName, + aNEIName, + aNEIGUIPath, + aUsualInputCount, + aUsualOutputCount, + aMinimalInputItems, + aMinimalInputFluids, + aAmperage, + aNEISpecialValuePre, + aNEISpecialValueMultiplier, + aNEISpecialValuePost, + aShowVoltageAmperageInNEI, + aNEIAllowed); } @Override - public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) { + public GT_Recipe findRecipe( + IHasWorldObjectAndCoords aTileEntity, + GT_Recipe aRecipe, + boolean aNotUnificated, + long aVoltage, + FluidStack[] aFluids, + ItemStack aSpecialSlot, + ItemStack... aInputs) { if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null) return null; if (aRecipe != null && aRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) return aRecipe; ItemStack tComparedInput = GT_Utility.copyOrNull(aInputs[0]); - ItemStack[] tOutputItems = GT_ModHandler.getMachineOutput(tComparedInput, ic2.api.recipe.Recipes.compressor.getRecipes(), true, new NBTTagCompound(), null, null, null); - return GT_Utility.arrayContainsNonNull(tOutputItems) ? new GT_Recipe(false, new ItemStack[]{GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0])}, tOutputItems, null, null, null, null, 400, 2, 0) : null; + ItemStack[] tOutputItems = GT_ModHandler.getMachineOutput( + tComparedInput, + ic2.api.recipe.Recipes.compressor.getRecipes(), + true, + new NBTTagCompound(), + null, + null, + null); + return GT_Utility.arrayContainsNonNull(tOutputItems) + ? new GT_Recipe( + false, + new ItemStack[] { + GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0]) + }, + tOutputItems, + null, + null, + null, + null, + 400, + 2, + 0) + : null; } @Override public boolean containsInput(ItemStack aStack) { - return GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput(GT_Utility.copyAmount(64, aStack), ic2.api.recipe.Recipes.compressor.getRecipes(), false, new NBTTagCompound(), null, null, null)); + return GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput( + GT_Utility.copyAmount(64, aStack), + ic2.api.recipe.Recipes.compressor.getRecipes(), + false, + new NBTTagCompound(), + null, + null, + null)); } } @@ -1581,22 +3581,87 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * Special Class for Extractor Recipe handling. */ public static class GT_Recipe_Map_Extractor extends GT_Recipe_Map_NonGTRecipes { - public GT_Recipe_Map_Extractor(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) { - super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); + public GT_Recipe_Map_Extractor( + Collection<GT_Recipe> aRecipeList, + String aUnlocalizedName, + String aLocalName, + String aNEIName, + String aNEIGUIPath, + int aUsualInputCount, + int aUsualOutputCount, + int aMinimalInputItems, + int aMinimalInputFluids, + int aAmperage, + String aNEISpecialValuePre, + int aNEISpecialValueMultiplier, + String aNEISpecialValuePost, + boolean aShowVoltageAmperageInNEI, + boolean aNEIAllowed) { + super( + aRecipeList, + aUnlocalizedName, + aLocalName, + aNEIName, + aNEIGUIPath, + aUsualInputCount, + aUsualOutputCount, + aMinimalInputItems, + aMinimalInputFluids, + aAmperage, + aNEISpecialValuePre, + aNEISpecialValueMultiplier, + aNEISpecialValuePost, + aShowVoltageAmperageInNEI, + aNEIAllowed); } @Override - public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) { + public GT_Recipe findRecipe( + IHasWorldObjectAndCoords aTileEntity, + GT_Recipe aRecipe, + boolean aNotUnificated, + long aVoltage, + FluidStack[] aFluids, + ItemStack aSpecialSlot, + ItemStack... aInputs) { if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null) return null; if (aRecipe != null && aRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) return aRecipe; ItemStack tComparedInput = GT_Utility.copyOrNull(aInputs[0]); - ItemStack[] tOutputItems = GT_ModHandler.getMachineOutput(tComparedInput, ic2.api.recipe.Recipes.extractor.getRecipes(), true, new NBTTagCompound(), null, null, null); - return GT_Utility.arrayContainsNonNull(tOutputItems) ? new GT_Recipe(false, new ItemStack[]{GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0])}, tOutputItems, null, null, null, null, 400, 2, 0) : null; + ItemStack[] tOutputItems = GT_ModHandler.getMachineOutput( + tComparedInput, + ic2.api.recipe.Recipes.extractor.getRecipes(), + true, + new NBTTagCompound(), + null, + null, + null); + return GT_Utility.arrayContainsNonNull(tOutputItems) + ? new GT_Recipe( + false, + new ItemStack[] { + GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0]) + }, + tOutputItems, + null, + null, + null, + null, + 400, + 2, + 0) + : null; } @Override public boolean containsInput(ItemStack aStack) { - return GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput(GT_Utility.copyAmount(64, aStack), ic2.api.recipe.Recipes.extractor.getRecipes(), false, new NBTTagCompound(), null, null, null)); + return GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput( + GT_Utility.copyAmount(64, aStack), + ic2.api.recipe.Recipes.extractor.getRecipes(), + false, + new NBTTagCompound(), + null, + null, + null)); } } @@ -1604,22 +3669,87 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * Special Class for Thermal Centrifuge Recipe handling. */ public static class GT_Recipe_Map_ThermalCentrifuge extends GT_Recipe_Map_NonGTRecipes { - public GT_Recipe_Map_ThermalCentrifuge(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) { - super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); + public GT_Recipe_Map_ThermalCentrifuge( + Collection<GT_Recipe> aRecipeList, + String aUnlocalizedName, + String aLocalName, + String aNEIName, + String aNEIGUIPath, + int aUsualInputCount, + int aUsualOutputCount, + int aMinimalInputItems, + int aMinimalInputFluids, + int aAmperage, + String aNEISpecialValuePre, + int aNEISpecialValueMultiplier, + String aNEISpecialValuePost, + boolean aShowVoltageAmperageInNEI, + boolean aNEIAllowed) { + super( + aRecipeList, + aUnlocalizedName, + aLocalName, + aNEIName, + aNEIGUIPath, + aUsualInputCount, + aUsualOutputCount, + aMinimalInputItems, + aMinimalInputFluids, + aAmperage, + aNEISpecialValuePre, + aNEISpecialValueMultiplier, + aNEISpecialValuePost, + aShowVoltageAmperageInNEI, + aNEIAllowed); } @Override - public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) { + public GT_Recipe findRecipe( + IHasWorldObjectAndCoords aTileEntity, + GT_Recipe aRecipe, + boolean aNotUnificated, + long aVoltage, + FluidStack[] aFluids, + ItemStack aSpecialSlot, + ItemStack... aInputs) { if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null) return null; if (aRecipe != null && aRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) return aRecipe; ItemStack tComparedInput = GT_Utility.copyOrNull(aInputs[0]); - ItemStack[] tOutputItems = GT_ModHandler.getMachineOutput(tComparedInput, ic2.api.recipe.Recipes.centrifuge.getRecipes(), true, new NBTTagCompound(), null, null, null); - return GT_Utility.arrayContainsNonNull(tOutputItems) ? new GT_Recipe(false, new ItemStack[]{GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0])}, tOutputItems, null, null, null, null, 400, 48, 0) : null; + ItemStack[] tOutputItems = GT_ModHandler.getMachineOutput( + tComparedInput, + ic2.api.recipe.Recipes.centrifuge.getRecipes(), + true, + new NBTTagCompound(), + null, + null, + null); + return GT_Utility.arrayContainsNonNull(tOutputItems) + ? new GT_Recipe( + false, + new ItemStack[] { + GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0]) + }, + tOutputItems, + null, + null, + null, + null, + 400, + 48, + 0) + : null; } @Override public boolean containsInput(ItemStack aStack) { - return GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput(GT_Utility.copyAmount(64, aStack), ic2.api.recipe.Recipes.centrifuge.getRecipes(), false, new NBTTagCompound(), null, null, null)); + return GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput( + GT_Utility.copyAmount(64, aStack), + ic2.api.recipe.Recipes.centrifuge.getRecipes(), + false, + new NBTTagCompound(), + null, + null, + null)); } } @@ -1627,24 +3757,97 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * Special Class for Ore Washer Recipe handling. */ public static class GT_Recipe_Map_OreWasher extends GT_Recipe_Map_NonGTRecipes { - public GT_Recipe_Map_OreWasher(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) { - super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); + public GT_Recipe_Map_OreWasher( + Collection<GT_Recipe> aRecipeList, + String aUnlocalizedName, + String aLocalName, + String aNEIName, + String aNEIGUIPath, + int aUsualInputCount, + int aUsualOutputCount, + int aMinimalInputItems, + int aMinimalInputFluids, + int aAmperage, + String aNEISpecialValuePre, + int aNEISpecialValueMultiplier, + String aNEISpecialValuePost, + boolean aShowVoltageAmperageInNEI, + boolean aNEIAllowed) { + super( + aRecipeList, + aUnlocalizedName, + aLocalName, + aNEIName, + aNEIGUIPath, + aUsualInputCount, + aUsualOutputCount, + aMinimalInputItems, + aMinimalInputFluids, + aAmperage, + aNEISpecialValuePre, + aNEISpecialValueMultiplier, + aNEISpecialValuePost, + aShowVoltageAmperageInNEI, + aNEIAllowed); } @Override - public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) { - if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null || aFluids == null || aFluids.length < 1 || !GT_ModHandler.isWater(aFluids[0])) - return null; + public GT_Recipe findRecipe( + IHasWorldObjectAndCoords aTileEntity, + GT_Recipe aRecipe, + boolean aNotUnificated, + long aVoltage, + FluidStack[] aFluids, + ItemStack aSpecialSlot, + ItemStack... aInputs) { + if (aInputs == null + || aInputs.length <= 0 + || aInputs[0] == null + || aFluids == null + || aFluids.length < 1 + || !GT_ModHandler.isWater(aFluids[0])) return null; if (aRecipe != null && aRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) return aRecipe; ItemStack tComparedInput = GT_Utility.copyOrNull(aInputs[0]); NBTTagCompound aRecipeMetaData = new NBTTagCompound(); - ItemStack[] tOutputItems = GT_ModHandler.getMachineOutput(tComparedInput, ic2.api.recipe.Recipes.oreWashing.getRecipes(), true, aRecipeMetaData, null, null, null); - return GT_Utility.arrayContainsNonNull(tOutputItems) ? new GT_Recipe(false, new ItemStack[]{GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0])}, tOutputItems, null, null, new FluidStack[]{new FluidStack(aFluids[0].getFluid(), ((NBTTagCompound) aRecipeMetaData.getTag("return")).getInteger("amount"))}, null, 400, 16, 0) : null; + ItemStack[] tOutputItems = GT_ModHandler.getMachineOutput( + tComparedInput, + ic2.api.recipe.Recipes.oreWashing.getRecipes(), + true, + aRecipeMetaData, + null, + null, + null); + return GT_Utility.arrayContainsNonNull(tOutputItems) + ? new GT_Recipe( + false, + new ItemStack[] { + GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0]) + }, + tOutputItems, + null, + null, + new FluidStack[] { + new FluidStack( + aFluids[0].getFluid(), + ((NBTTagCompound) aRecipeMetaData.getTag("return")).getInteger("amount")) + }, + null, + 400, + 16, + 0) + : null; } @Override public boolean containsInput(ItemStack aStack) { - return GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput(GT_Utility.copyAmount(64, aStack), ic2.api.recipe.Recipes.oreWashing.getRecipes(), false, new NBTTagCompound(), null, null, null)); + return GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput( + GT_Utility.copyAmount(64, aStack), + ic2.api.recipe.Recipes.oreWashing.getRecipes(), + false, + new NBTTagCompound(), + null, + null, + null)); } @Override @@ -1662,37 +3865,117 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * Special Class for Macerator/RockCrusher Recipe handling. */ public static class GT_Recipe_Map_Macerator extends GT_Recipe_Map { - public GT_Recipe_Map_Macerator(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) { - super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); + public GT_Recipe_Map_Macerator( + Collection<GT_Recipe> aRecipeList, + String aUnlocalizedName, + String aLocalName, + String aNEIName, + String aNEIGUIPath, + int aUsualInputCount, + int aUsualOutputCount, + int aMinimalInputItems, + int aMinimalInputFluids, + int aAmperage, + String aNEISpecialValuePre, + int aNEISpecialValueMultiplier, + String aNEISpecialValuePost, + boolean aShowVoltageAmperageInNEI, + boolean aNEIAllowed) { + super( + aRecipeList, + aUnlocalizedName, + aLocalName, + aNEIName, + aNEIGUIPath, + aUsualInputCount, + aUsualOutputCount, + aMinimalInputItems, + aMinimalInputFluids, + aAmperage, + aNEISpecialValuePre, + aNEISpecialValueMultiplier, + aNEISpecialValuePost, + aShowVoltageAmperageInNEI, + aNEIAllowed); } @Override - public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) { + public GT_Recipe findRecipe( + IHasWorldObjectAndCoords aTileEntity, + GT_Recipe aRecipe, + boolean aNotUnificated, + long aVoltage, + FluidStack[] aFluids, + ItemStack aSpecialSlot, + ItemStack... aInputs) { if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null || !GregTech_API.sPostloadFinished) return super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs); aRecipe = super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs); if (aRecipe != null) return aRecipe; try { - List<ItemStack> tRecipeOutputs = mods.railcraft.api.crafting.RailcraftCraftingManager.rockCrusher.getRecipe(GT_Utility.copyAmount(1, aInputs[0])).getRandomizedOuputs(); + List<ItemStack> tRecipeOutputs = mods.railcraft.api.crafting.RailcraftCraftingManager.rockCrusher + .getRecipe(GT_Utility.copyAmount(1, aInputs[0])) + .getRandomizedOuputs(); if (tRecipeOutputs != null) { - aRecipe = new GT_Recipe(false, new ItemStack[]{GT_Utility.copyAmount(1, aInputs[0])}, tRecipeOutputs.toArray(new ItemStack[0]), null, null, null, null, 800, 2, 0); + aRecipe = new GT_Recipe( + false, + new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, + tRecipeOutputs.toArray(new ItemStack[0]), + null, + null, + null, + null, + 800, + 2, + 0); aRecipe.mCanBeBuffered = false; aRecipe.mNeedsEmptyOutput = true; return aRecipe; } } catch (NoClassDefFoundError e) { if (D1) GT_Log.err.println("Railcraft Not loaded"); - } catch (NullPointerException e) {/**/} + } catch (NullPointerException e) { + /**/ + } ItemStack tComparedInput = GT_Utility.copyOrNull(aInputs[0]); - ItemStack[] tOutputItems = GT_ModHandler.getMachineOutput(tComparedInput, ic2.api.recipe.Recipes.macerator.getRecipes(), true, new NBTTagCompound(), null, null, null); - return GT_Utility.arrayContainsNonNull(tOutputItems) ? new GT_Recipe(false, new ItemStack[]{GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0])}, tOutputItems, null, null, null, null, 400, 2, 0) : null; + ItemStack[] tOutputItems = GT_ModHandler.getMachineOutput( + tComparedInput, + ic2.api.recipe.Recipes.macerator.getRecipes(), + true, + new NBTTagCompound(), + null, + null, + null); + return GT_Utility.arrayContainsNonNull(tOutputItems) + ? new GT_Recipe( + false, + new ItemStack[] { + GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0]) + }, + tOutputItems, + null, + null, + null, + null, + 400, + 2, + 0) + : null; } @Override public boolean containsInput(ItemStack aStack) { - return super.containsInput(aStack) || GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput(GT_Utility.copyAmount(64, aStack), ic2.api.recipe.Recipes.macerator.getRecipes(), false, new NBTTagCompound(), null, null, null)); + return super.containsInput(aStack) + || GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput( + GT_Utility.copyAmount(64, aStack), + ic2.api.recipe.Recipes.macerator.getRecipes(), + false, + new NBTTagCompound(), + null, + null, + null)); } } @@ -1701,62 +3984,135 @@ public class GT_Recipe implements Comparable<GT_Recipe> { */ public static class GT_Recipe_Map_Assembler extends GT_Recipe_Map { - public GT_Recipe_Map_Assembler(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed, boolean aNEIUnificateOutput) { - super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed, aNEIUnificateOutput); - } - - public GT_Recipe_Map_Assembler(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) { - this(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed, true); + public GT_Recipe_Map_Assembler( + Collection<GT_Recipe> aRecipeList, + String aUnlocalizedName, + String aLocalName, + String aNEIName, + String aNEIGUIPath, + int aUsualInputCount, + int aUsualOutputCount, + int aMinimalInputItems, + int aMinimalInputFluids, + int aAmperage, + String aNEISpecialValuePre, + int aNEISpecialValueMultiplier, + String aNEISpecialValuePost, + boolean aShowVoltageAmperageInNEI, + boolean aNEIAllowed, + boolean aNEIUnificateOutput) { + super( + aRecipeList, + aUnlocalizedName, + aLocalName, + aNEIName, + aNEIGUIPath, + aUsualInputCount, + aUsualOutputCount, + aMinimalInputItems, + aMinimalInputFluids, + aAmperage, + aNEISpecialValuePre, + aNEISpecialValueMultiplier, + aNEISpecialValuePost, + aShowVoltageAmperageInNEI, + aNEIAllowed, + aNEIUnificateOutput); + } + + public GT_Recipe_Map_Assembler( + Collection<GT_Recipe> aRecipeList, + String aUnlocalizedName, + String aLocalName, + String aNEIName, + String aNEIGUIPath, + int aUsualInputCount, + int aUsualOutputCount, + int aMinimalInputItems, + int aMinimalInputFluids, + int aAmperage, + String aNEISpecialValuePre, + int aNEISpecialValueMultiplier, + String aNEISpecialValuePost, + boolean aShowVoltageAmperageInNEI, + boolean aNEIAllowed) { + this( + aRecipeList, + aUnlocalizedName, + aLocalName, + aNEIName, + aNEIGUIPath, + aUsualInputCount, + aUsualOutputCount, + aMinimalInputItems, + aMinimalInputFluids, + aAmperage, + aNEISpecialValuePre, + aNEISpecialValueMultiplier, + aNEISpecialValuePost, + aShowVoltageAmperageInNEI, + aNEIAllowed, + true); } @Override - public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) { + public GT_Recipe findRecipe( + IHasWorldObjectAndCoords aTileEntity, + GT_Recipe aRecipe, + boolean aNotUnificated, + long aVoltage, + FluidStack[] aFluids, + ItemStack aSpecialSlot, + ItemStack... aInputs) { GT_Recipe rRecipe = super.findRecipe(aTileEntity, aRecipe, true, aVoltage, aFluids, aSpecialSlot, aInputs); -/* + /* - Doesnt work, keep it as a reminder tho + Doesnt work, keep it as a reminder tho - if (rRecipe == null){ - Set<ItemStack> aInputs2 = new TreeSet<ItemStack>(); - for (ItemStack aInput : aInputs) { - aInputs2.add(aInput); - } + if (rRecipe == null){ + Set<ItemStack> aInputs2 = new TreeSet<ItemStack>(); + for (ItemStack aInput : aInputs) { + aInputs2.add(aInput); + } - for (ItemStack aInput : aInputs) { - aInputs2.remove(aInput); - int[] oredictIDs = OreDictionary.getOreIDs(aInput); - if ( oredictIDs.length > 1){ - for (final int i : oredictIDs){ - final ItemStack[] oredictIS = (ItemStack[]) OreDictionary.getOres(OreDictionary.getOreName(i)).toArray(); - if (oredictIS != null && oredictIS.length > 1){ - for (final ItemStack IS : oredictIS){ - aInputs2.add(IS); - ItemStack[] temp = (ItemStack[]) aInputs2.toArray(); - rRecipe = super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot,temp); - if(rRecipe!= null){ - break; + for (ItemStack aInput : aInputs) { + aInputs2.remove(aInput); + int[] oredictIDs = OreDictionary.getOreIDs(aInput); + if ( oredictIDs.length > 1){ + for (final int i : oredictIDs){ + final ItemStack[] oredictIS = (ItemStack[]) OreDictionary.getOres(OreDictionary.getOreName(i)).toArray(); + if (oredictIS != null && oredictIS.length > 1){ + for (final ItemStack IS : oredictIS){ + aInputs2.add(IS); + ItemStack[] temp = (ItemStack[]) aInputs2.toArray(); + rRecipe = super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot,temp); + if(rRecipe!= null){ + break; + } + else { + aInputs2.remove(IS); + } + } + if(rRecipe!= null) + break; + } } - else { - aInputs2.remove(IS); - } - } + if(rRecipe!= null) + break; + }else + aInputs2.add(aInput); if(rRecipe!= null) - break; + break; } } - if(rRecipe!= null) - break; - }else - aInputs2.add(aInput); - if(rRecipe!= null) - break; - } - } -*/ - if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null || rRecipe == null || !GregTech_API.sPostloadFinished) - return rRecipe; + */ + if (aInputs == null + || aInputs.length <= 0 + || aInputs[0] == null + || rRecipe == null + || !GregTech_API.sPostloadFinished) return rRecipe; for (ItemStack aInput : aInputs) { if (ItemList.Paper_Printed_Pages.isStackEqual(aInput, false, true)) { @@ -1764,28 +4120,74 @@ public class GT_Recipe implements Comparable<GT_Recipe> { rRecipe.mCanBeBuffered = false; rRecipe.mOutputs[0].setTagCompound(aInput.getTagCompound()); } - } return rRecipe; } - } /** * Special Class for Forming Press handling. */ public static class GT_Recipe_Map_FormingPress extends GT_Recipe_Map { - public GT_Recipe_Map_FormingPress(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) { - super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); + public GT_Recipe_Map_FormingPress( + Collection<GT_Recipe> aRecipeList, + String aUnlocalizedName, + String aLocalName, + String aNEIName, + String aNEIGUIPath, + int aUsualInputCount, + int aUsualOutputCount, + int aMinimalInputItems, + int aMinimalInputFluids, + int aAmperage, + String aNEISpecialValuePre, + int aNEISpecialValueMultiplier, + String aNEISpecialValuePost, + boolean aShowVoltageAmperageInNEI, + boolean aNEIAllowed) { + super( + aRecipeList, + aUnlocalizedName, + aLocalName, + aNEIName, + aNEIGUIPath, + aUsualInputCount, + aUsualOutputCount, + aMinimalInputItems, + aMinimalInputFluids, + aAmperage, + aNEISpecialValuePre, + aNEISpecialValueMultiplier, + aNEISpecialValuePost, + aShowVoltageAmperageInNEI, + aNEIAllowed); } @Override - public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, boolean aDontCheckStackSizes, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) { - GT_Recipe rRecipe = super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aDontCheckStackSizes, aVoltage, aFluids, aSpecialSlot, aInputs); - if (aInputs == null || aInputs.length < 2 || aInputs[0] == null || aInputs[1] == null || !GregTech_API.sPostloadFinished) - return rRecipe; - if (rRecipe == null) - return findRenamingRecipe(aInputs); + public GT_Recipe findRecipe( + IHasWorldObjectAndCoords aTileEntity, + GT_Recipe aRecipe, + boolean aNotUnificated, + boolean aDontCheckStackSizes, + long aVoltage, + FluidStack[] aFluids, + ItemStack aSpecialSlot, + ItemStack... aInputs) { + GT_Recipe rRecipe = super.findRecipe( + aTileEntity, + aRecipe, + aNotUnificated, + aDontCheckStackSizes, + aVoltage, + aFluids, + aSpecialSlot, + aInputs); + if (aInputs == null + || aInputs.length < 2 + || aInputs[0] == null + || aInputs[1] == null + || !GregTech_API.sPostloadFinished) return rRecipe; + if (rRecipe == null) return findRenamingRecipe(aInputs); for (ItemStack aMold : aInputs) { if (ItemList.Shape_Mold_Credit.isStackEqual(aMold, false, true)) { NBTTagCompound tNBT = aMold.getTagCompound(); @@ -1803,17 +4205,15 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } private ItemStack findNameMoldIndex(ItemStack[] inputs) { - for (ItemStack stack: inputs) { - if (ItemList.Shape_Mold_Name.isStackEqual(stack, false, true)) - return stack; + for (ItemStack stack : inputs) { + if (ItemList.Shape_Mold_Name.isStackEqual(stack, false, true)) return stack; } return null; } private ItemStack findStackToRename(ItemStack[] inputs, ItemStack mold) { - for (ItemStack stack: inputs) { - if (stack == mold || stack == null) - continue; + for (ItemStack stack : inputs) { + if (stack == mold || stack == null) continue; return stack; } return null; @@ -1821,17 +4221,22 @@ public class GT_Recipe implements Comparable<GT_Recipe> { private GT_Recipe findRenamingRecipe(ItemStack[] inputs) { ItemStack mold = findNameMoldIndex(inputs); - if (mold == null) - return null; + if (mold == null) return null; ItemStack input = findStackToRename(inputs, mold); - if (input == null) - return null; + if (input == null) return null; ItemStack output = GT_Utility.copyAmount(1, input); output.setStackDisplayName(mold.getDisplayName()); - GT_Recipe recipe = new GT_Recipe(false, - new ItemStack[]{ ItemList.Shape_Mold_Name.get(0), GT_Utility.copyAmount(1, input) }, - new ItemStack[]{ output }, - null, null, null, null, 128, 8, 0); + GT_Recipe recipe = new GT_Recipe( + false, + new ItemStack[] {ItemList.Shape_Mold_Name.get(0), GT_Utility.copyAmount(1, input)}, + new ItemStack[] {output}, + null, + null, + null, + null, + 128, + 8, + 0); recipe.mCanBeBuffered = false; return recipe; } @@ -1841,15 +4246,58 @@ public class GT_Recipe implements Comparable<GT_Recipe> { * Special Class for Printer handling. */ public static class GT_Recipe_Map_Printer extends GT_Recipe_Map { - public GT_Recipe_Map_Printer(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) { - super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); + public GT_Recipe_Map_Printer( + Collection<GT_Recipe> aRecipeList, + String aUnlocalizedName, + String aLocalName, + String aNEIName, + String aNEIGUIPath, + int aUsualInputCount, + int aUsualOutputCount, + int aMinimalInputItems, + int aMinimalInputFluids, + int aAmperage, + String aNEISpecialValuePre, + int aNEISpecialValueMultiplier, + String aNEISpecialValuePost, + boolean aShowVoltageAmperageInNEI, + boolean aNEIAllowed) { + super( + aRecipeList, + aUnlocalizedName, + aLocalName, + aNEIName, + aNEIGUIPath, + aUsualInputCount, + aUsualOutputCount, + aMinimalInputItems, + aMinimalInputFluids, + aAmperage, + aNEISpecialValuePre, + aNEISpecialValueMultiplier, + aNEISpecialValuePost, + aShowVoltageAmperageInNEI, + aNEIAllowed); } @Override - public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) { - GT_Recipe rRecipe = super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs); - if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null || aFluids == null || aFluids.length <= 0 || aFluids[0] == null || !GregTech_API.sPostloadFinished) - return rRecipe; + public GT_Recipe findRecipe( + IHasWorldObjectAndCoords aTileEntity, + GT_Recipe aRecipe, + boolean aNotUnificated, + long aVoltage, + FluidStack[] aFluids, + ItemStack aSpecialSlot, + ItemStack... aInputs) { + GT_Recipe rRecipe = + super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs); + if (aInputs == null + || aInputs.length <= 0 + || aInputs[0] == null + || aFluids == null + || aFluids.length <= 0 + || aFluids[0] == null + || !GregTech_API.sPostloadFinished) return rRecipe; Dyes aDye = null; for (Dyes tDye : Dyes.VALUES) @@ -1861,20 +4309,61 @@ public class GT_Recipe implements Comparable<GT_Recipe> { if (aDye == null) return rRecipe; if (rRecipe == null) { - ItemStack - tOutput = GT_ModHandler.getAllRecipeOutput(aTileEntity == null ? null : aTileEntity.getWorld(), aInputs[0], aInputs[0], aInputs[0], aInputs[0], ItemList.DYE_ONLY_ITEMS[aDye.mIndex].get(1), aInputs[0], aInputs[0], aInputs[0], aInputs[0]); + ItemStack tOutput = GT_ModHandler.getAllRecipeOutput( + aTileEntity == null ? null : aTileEntity.getWorld(), + aInputs[0], + aInputs[0], + aInputs[0], + aInputs[0], + ItemList.DYE_ONLY_ITEMS[aDye.mIndex].get(1), + aInputs[0], + aInputs[0], + aInputs[0], + aInputs[0]); if (tOutput != null) - return addRecipe(new GT_Recipe(true, new ItemStack[]{GT_Utility.copyAmount(8, aInputs[0])}, new ItemStack[]{tOutput}, null, null, new FluidStack[]{new FluidStack(aFluids[0].getFluid(), (int) L)}, null, 256, 2, 0), false, false, true); - - tOutput = GT_ModHandler.getAllRecipeOutput(aTileEntity == null ? null : aTileEntity.getWorld(), aInputs[0], ItemList.DYE_ONLY_ITEMS[aDye.mIndex].get(1)); + return addRecipe( + new GT_Recipe( + true, + new ItemStack[] {GT_Utility.copyAmount(8, aInputs[0])}, + new ItemStack[] {tOutput}, + null, + null, + new FluidStack[] {new FluidStack(aFluids[0].getFluid(), (int) L)}, + null, + 256, + 2, + 0), + false, + false, + true); + + tOutput = GT_ModHandler.getAllRecipeOutput( + aTileEntity == null ? null : aTileEntity.getWorld(), + aInputs[0], + ItemList.DYE_ONLY_ITEMS[aDye.mIndex].get(1)); if (tOutput != null) - return addRecipe(new GT_Recipe(true, new ItemStack[]{GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[]{tOutput}, null, null, new FluidStack[]{new FluidStack(aFluids[0].getFluid(), (int) L)}, null, 32, 2, 0), false, false, true); + return addRecipe( + new GT_Recipe( + true, + new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, + new ItemStack[] {tOutput}, + null, + null, + new FluidStack[] {new FluidStack(aFluids[0].getFluid(), (int) L)}, + null, + 32, + 2, + 0), + false, + false, + true); } else { if (aInputs[0].getItem() == Items.paper) { if (!ItemList.Tool_DataStick.isStackEqual(aSpecialSlot, false, true)) return null; NBTTagCompound tNBT = aSpecialSlot.getTagCompound(); - if (tNBT == null || GT_Utility.isStringInvalid(tNBT.getString("title")) || GT_Utility.isStringInvalid(tNBT.getString("author"))) - return null; + if (tNBT == null + || GT_Utility.isStringInvalid(tNBT.getString("title")) + || GT_Utility.isStringInvalid(tNBT.getString("author"))) return null; rRecipe = rRecipe.copy(); rRecipe.mCanBeBuffered = false; @@ -1898,7 +4387,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { rRecipe = rRecipe.copy(); rRecipe.mCanBeBuffered = false; - rRecipe.mOutputs[0].setTagCompound(GT_Utility.getNBTContainingString(new NBTTagCompound(), "GT.PunchCardData", tNBT.getString("GT.PunchCardData"))); + rRecipe.mOutputs[0].setTagCompound(GT_Utility.getNBTContainingString( + new NBTTagCompound(), "GT.PunchCardData", tNBT.getString("GT.PunchCardData"))); return rRecipe; } } @@ -1923,33 +4413,54 @@ public class GT_Recipe implements Comparable<GT_Recipe> { public static class GT_Recipe_Map_LargeBoilerFakeFuels extends GT_Recipe_Map { - private static final List<String> ALLOWED_SOLID_FUELS = Arrays.asList(GregTech_API.sMachineFile.mConfig.getStringList( - "LargeBoiler.allowedFuels", - ConfigCategories.machineconfig.toString(), - new String[] {"gregtech:gt.blockreinforced:6", "gregtech:gt.blockreinforced:7"}, - "Allowed fuels for the Large Titanium Boiler and Large Tungstensteel Boiler")); + private static final List<String> ALLOWED_SOLID_FUELS = + Arrays.asList(GregTech_API.sMachineFile.mConfig.getStringList( + "LargeBoiler.allowedFuels", + ConfigCategories.machineconfig.toString(), + new String[] {"gregtech:gt.blockreinforced:6", "gregtech:gt.blockreinforced:7"}, + "Allowed fuels for the Large Titanium Boiler and Large Tungstensteel Boiler")); public GT_Recipe_Map_LargeBoilerFakeFuels() { - super(new HashSet<>(55), "gt.recipe.largeboilerfakefuels", "Large Boiler", null, RES_PATH_GUI + "basicmachines/Default", 1, 0, 1, 0, 1, E, 1, E, true, true); - GT_Recipe explanatoryRecipe = new GT_Recipe(true, new ItemStack[]{}, new ItemStack[]{}, null, null, null, null, 1, 1, 1); - explanatoryRecipe.setNeiDesc("Not all solid fuels are listed.", "Any item that burns in a", "vanilla furnace will burn in", "a Large Bronze or Steel Boiler."); + super( + new HashSet<>(55), + "gt.recipe.largeboilerfakefuels", + "Large Boiler", + null, + RES_PATH_GUI + "basicmachines/Default", + 1, + 0, + 1, + 0, + 1, + E, + 1, + E, + true, + true); + GT_Recipe explanatoryRecipe = + new GT_Recipe(true, new ItemStack[] {}, new ItemStack[] {}, null, null, null, null, 1, 1, 1); + explanatoryRecipe.setNeiDesc( + "Not all solid fuels are listed.", + "Any item that burns in a", + "vanilla furnace will burn in", + "a Large Bronze or Steel Boiler."); addRecipe(explanatoryRecipe); } public static boolean isAllowedSolidFuel(ItemStack stack) { - return isAllowedSolidFuel(Item.itemRegistry.getNameForObject(stack.getItem()), stack.getItemDamage()); + return isAllowedSolidFuel(Item.itemRegistry.getNameForObject(stack.getItem()), stack.getItemDamage()); } public static boolean isAllowedSolidFuel(String itemRegistryName, int meta) { - return ALLOWED_SOLID_FUELS.contains(itemRegistryName + ":" + meta); + return ALLOWED_SOLID_FUELS.contains(itemRegistryName + ":" + meta); } public static boolean addAllowedSolidFuel(ItemStack stack) { - return addAllowedSolidFuel(Item.itemRegistry.getNameForObject(stack.getItem()), stack.getItemDamage()); + return addAllowedSolidFuel(Item.itemRegistry.getNameForObject(stack.getItem()), stack.getItemDamage()); } public static boolean addAllowedSolidFuel(String itemregistryName, int meta) { - return ALLOWED_SOLID_FUELS.add(itemregistryName + ":" + meta); + return ALLOWED_SOLID_FUELS.add(itemregistryName + ":" + meta); } public GT_Recipe addDenseLiquidRecipe(GT_Recipe recipe) { @@ -1969,48 +4480,61 @@ public class GT_Recipe implements Comparable<GT_Recipe> { public GT_Recipe addSolidRecipe(ItemStack fuelItemStack) { boolean allowedFuel = false; if (fuelItemStack != null) { - String registryName = Item.itemRegistry.getNameForObject(fuelItemStack.getItem()); - allowedFuel = ALLOWED_SOLID_FUELS.contains(registryName + ":" + fuelItemStack.getItemDamage()); + String registryName = Item.itemRegistry.getNameForObject(fuelItemStack.getItem()); + allowedFuel = ALLOWED_SOLID_FUELS.contains(registryName + ":" + fuelItemStack.getItemDamage()); } - return addRecipe(new GT_Recipe(true, new ItemStack[]{fuelItemStack}, new ItemStack[]{}, null, null, null, null, 1, 0, GT_ModHandler.getFuelValue(fuelItemStack) / 1600), ((double) GT_ModHandler.getFuelValue(fuelItemStack)) / 1600, allowedFuel); + return addRecipe( + new GT_Recipe( + true, + new ItemStack[] {fuelItemStack}, + new ItemStack[] {}, + null, + null, + null, + null, + 1, + 0, + GT_ModHandler.getFuelValue(fuelItemStack) / 1600), + ((double) GT_ModHandler.getFuelValue(fuelItemStack)) / 1600, + allowedFuel); } private GT_Recipe addRecipe(GT_Recipe recipe, double baseBurnTime, boolean isAllowedFuel) { - recipe = new GT_Recipe(recipe); - //Some recipes will have a burn time like 15.9999999 and % always rounds down - double floatErrorCorrection = 0.0001; - - double bronzeBurnTime = baseBurnTime * 2 + floatErrorCorrection; - bronzeBurnTime -= bronzeBurnTime % 0.05; - double steelBurnTime = baseBurnTime + floatErrorCorrection; - steelBurnTime -= steelBurnTime % 0.05; - double titaniumBurnTime = baseBurnTime * 0.3 + floatErrorCorrection; - titaniumBurnTime -= titaniumBurnTime % 0.05; - double tungstensteelBurnTime = baseBurnTime * 0.15 + floatErrorCorrection; - tungstensteelBurnTime -= tungstensteelBurnTime % 0.05; + recipe = new GT_Recipe(recipe); + // Some recipes will have a burn time like 15.9999999 and % always rounds down + double floatErrorCorrection = 0.0001; + + double bronzeBurnTime = baseBurnTime * 2 + floatErrorCorrection; + bronzeBurnTime -= bronzeBurnTime % 0.05; + double steelBurnTime = baseBurnTime + floatErrorCorrection; + steelBurnTime -= steelBurnTime % 0.05; + double titaniumBurnTime = baseBurnTime * 0.3 + floatErrorCorrection; + titaniumBurnTime -= titaniumBurnTime % 0.05; + double tungstensteelBurnTime = baseBurnTime * 0.15 + floatErrorCorrection; + tungstensteelBurnTime -= tungstensteelBurnTime % 0.05; if (isAllowedFuel) { - recipe.setNeiDesc("Burn time in seconds:", + recipe.setNeiDesc( + "Burn time in seconds:", String.format("Bronze Boiler: %.4f", bronzeBurnTime), String.format("Steel Boiler: %.4f", steelBurnTime), String.format("Titanium Boiler: %.4f", titaniumBurnTime), String.format("Tungstensteel Boiler: %.4f", tungstensteelBurnTime)); - } - - else { - recipe.setNeiDesc("Burn time in seconds:", + } else { + recipe.setNeiDesc( + "Burn time in seconds:", String.format("Bronze Boiler: %.4f", bronzeBurnTime), String.format("Steel Boiler: %.4f", steelBurnTime), "Titanium Boiler: Not allowed", "Tungstenst. Boiler: Not allowed"); } - return super.addRecipe(recipe); - } + return super.addRecipe(recipe); + } private GT_Recipe addRecipe(GT_Recipe recipe, double baseBurnTime) { recipe = new GT_Recipe(recipe); - //Some recipes will have a burn time like 15.9999999 and % always rounds down + // Some recipes will have a burn time like 15.9999999 and % always rounds down double floatErrorCorrection = 0.0001; double bronzeBurnTime = baseBurnTime * 2 + floatErrorCorrection; @@ -2018,7 +4542,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { double steelBurnTime = baseBurnTime + floatErrorCorrection; steelBurnTime -= steelBurnTime % 0.05; - recipe.setNeiDesc("Burn time in seconds:", + recipe.setNeiDesc( + "Burn time in seconds:", String.format("Bronze Boiler: %.4f", bronzeBurnTime), String.format("Steel Boiler: %.4f", steelBurnTime), "Titanium Boiler: Not allowed", @@ -2026,7 +4551,6 @@ public class GT_Recipe implements Comparable<GT_Recipe> { return super.addRecipe(recipe); } - } public static class GT_Recipe_Map_LargeChemicalReactor extends GT_Recipe_Map { @@ -2035,11 +4559,36 @@ public class GT_Recipe implements Comparable<GT_Recipe> { private static final int FLUID_OUTPUT_COUNT = 6; public GT_Recipe_Map_LargeChemicalReactor() { - super(new HashSet<>(1000), "gt.recipe.largechemicalreactor", "Large Chemical Reactor", null, RES_PATH_GUI + "basicmachines/LCRNEI", 2, OUTPUT_COUNT, 0, 0, 1, E, 1, E, true, true); + super( + new HashSet<>(1000), + "gt.recipe.largechemicalreactor", + "Large Chemical Reactor", + null, + RES_PATH_GUI + "basicmachines/LCRNEI", + 2, + OUTPUT_COUNT, + 0, + 0, + 1, + E, + 1, + E, + true, + true); } @Override - public GT_Recipe addRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { + public GT_Recipe addRecipe( + boolean aOptimize, + ItemStack[] aInputs, + ItemStack[] aOutputs, + Object aSpecial, + int[] aOutputChances, + FluidStack[] aFluidInputs, + FluidStack[] aFluidOutputs, + int aDuration, + int aEUt, + int aSpecialValue) { aOptimize = false; ArrayList<ItemStack> adjustedInputs = new ArrayList<>(); ArrayList<ItemStack> adjustedOutputs = new ArrayList<>(); @@ -2055,23 +4604,27 @@ public class GT_Recipe implements Comparable<GT_Recipe> { for (ItemStack input : aInputs) { FluidStack inputFluidContent = FluidContainerRegistry.getFluidForFilledItem(input); if (inputFluidContent != null) { - inputFluidContent.amount *= input.stackSize; + inputFluidContent.amount *= input.stackSize; if (inputFluidContent.getFluid().getName().equals("ic2steam")) { inputFluidContent = GT_ModHandler.getSteam(inputFluidContent.amount); } - adjustedFluidInputs.add(inputFluidContent); - } else { - ItemData itemData = GT_OreDictUnificator.getItemData(input); - if (itemData != null && itemData.hasValidPrefixMaterialData() && itemData.mMaterial.mMaterial == Materials.Empty) { - continue; - } else { - if (itemData != null && itemData.hasValidPrefixMaterialData() && itemData.mPrefix == OrePrefixes.cell) { - ItemStack dustStack = itemData.mMaterial.mMaterial.getDust(input.stackSize); - if (dustStack != null) { - adjustedInputs.add(dustStack); - } else { - adjustedInputs.add(input); - } + adjustedFluidInputs.add(inputFluidContent); + } else { + ItemData itemData = GT_OreDictUnificator.getItemData(input); + if (itemData != null + && itemData.hasValidPrefixMaterialData() + && itemData.mMaterial.mMaterial == Materials.Empty) { + continue; + } else { + if (itemData != null + && itemData.hasValidPrefixMaterialData() + && itemData.mPrefix == OrePrefixes.cell) { + ItemStack dustStack = itemData.mMaterial.mMaterial.getDust(input.stackSize); + if (dustStack != null) { + adjustedInputs.add(dustStack); + } else { + adjustedInputs.add(input); + } } else { adjustedInputs.add(input); } @@ -2095,14 +4648,16 @@ public class GT_Recipe implements Comparable<GT_Recipe> { for (ItemStack output : aOutputs) { FluidStack outputFluidContent = FluidContainerRegistry.getFluidForFilledItem(output); if (outputFluidContent != null) { - outputFluidContent.amount *= output.stackSize; + outputFluidContent.amount *= output.stackSize; if (outputFluidContent.getFluid().getName().equals("ic2steam")) { outputFluidContent = GT_ModHandler.getSteam(outputFluidContent.amount); } - adjustedFluidOutputs.add(outputFluidContent); + adjustedFluidOutputs.add(outputFluidContent); } else { ItemData itemData = GT_OreDictUnificator.getItemData(output); - if (!(itemData != null && itemData.hasValidPrefixMaterialData() && itemData.mMaterial.mMaterial == Materials.Empty)) { + if (!(itemData != null + && itemData.hasValidPrefixMaterialData() + && itemData.mMaterial.mMaterial == Materials.Empty)) { adjustedOutputs.add(output); } } @@ -2114,7 +4669,17 @@ public class GT_Recipe implements Comparable<GT_Recipe> { aOutputs = adjustedOutputs.toArray(new ItemStack[0]); aFluidOutputs = adjustedFluidOutputs.toArray(new FluidStack[0]); - return super.addRecipe(aOptimize, aInputs, aOutputs, aSpecial, aOutputChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue); + return super.addRecipe( + aOptimize, + aInputs, + aOutputs, + aSpecial, + aOutputChances, + aFluidInputs, + aFluidOutputs, + aDuration, + aEUt, + aSpecialValue); } @Override @@ -2129,32 +4694,37 @@ public class GT_Recipe implements Comparable<GT_Recipe> { for (int i = 0; i < itemLimit; i++, j++) { if (recipe.mInputs == null || (recipe.mInputs[i] == null && (i == 0 && itemLimit == 1))) { if (recipe.mOutputs != null && recipe.mOutputs.length > 0 && recipe.mOutputs[0] != null) - GT_Log.out.println("recipe " + recipe + " Output 0:" + recipe.mOutputs[0].getDisplayName() + " has errored!"); - else - GT_Log.out.println("recipe " + recipe + " has errored!"); + GT_Log.out.println("recipe " + recipe + " Output 0:" + recipe.mOutputs[0].getDisplayName() + + " has errored!"); + else GT_Log.out.println("recipe " + recipe + " has errored!"); new Exception("Recipe Fixme").printStackTrace(GT_Log.out); } - if ((recipe.mInputs != null && recipe.mInputs[i] != null) || !GT_Values.allow_broken_recipemap) - inputStacks.add(new FixedPositionedStack(recipe.mInputs[i].copy(), 48 - j % 3 * 18, (j >= 3 ? 5 : 23))); + inputStacks.add( + new FixedPositionedStack(recipe.mInputs[i].copy(), 48 - j % 3 * 18, (j >= 3 ? 5 : 23))); else - inputStacks.add(new FixedPositionedStack(new ItemStack(Items.command_block_minecart), 48 - j % 3 * 18, (j >= 3 ? 5 : 23))); + inputStacks.add(new FixedPositionedStack( + new ItemStack(Items.command_block_minecart), 48 - j % 3 * 18, (j >= 3 ? 5 : 23))); } for (int i = 0; i < fluidLimit; i++, j++) { if (recipe.mFluidInputs == null || recipe.mFluidInputs[i] == null) { if (recipe.mOutputs != null && recipe.mOutputs.length > 0 && recipe.mOutputs[0] != null) - GT_Log.out.println("recipe " + recipe + " Output 0:" + recipe.mOutputs[0].getDisplayName() + " has errored!"); - else - GT_Log.out.println("recipe " + recipe + " has errored!"); + GT_Log.out.println("recipe " + recipe + " Output 0:" + recipe.mOutputs[0].getDisplayName() + + " has errored!"); + else GT_Log.out.println("recipe " + recipe + " has errored!"); new Exception("Recipe Fixme").printStackTrace(GT_Log.out); } - if ((recipe.mFluidInputs != null && recipe.mFluidInputs[i] != null) || !GT_Values.allow_broken_recipemap) - inputStacks.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(recipe.mFluidInputs[i], true), 48 - j % 3 * 18, (j >= 3 ? 5 : 23))); + if ((recipe.mFluidInputs != null && recipe.mFluidInputs[i] != null) + || !GT_Values.allow_broken_recipemap) + inputStacks.add(new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(recipe.mFluidInputs[i], true), + 48 - j % 3 * 18, + (j >= 3 ? 5 : 23))); } return inputStacks; @@ -2169,24 +4739,44 @@ public class GT_Recipe implements Comparable<GT_Recipe> { int j = 0; for (int i = 0; i < itemLimit; i++, j++) { - outputStacks.add(new FixedPositionedStack(recipe.mOutputs[i].copy(), 102 + j % 3 * 18, (j >= 3 ? 5 : 23))); + outputStacks.add( + new FixedPositionedStack(recipe.mOutputs[i].copy(), 102 + j % 3 * 18, (j >= 3 ? 5 : 23))); } for (int i = 0; i < fluidLimit; i++, j++) { - outputStacks.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(recipe.mFluidOutputs[i], true), 102 + j % 3 * 18, (j >= 3 ? 5 : 23))); + outputStacks.add(new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(recipe.mFluidOutputs[i], true), + 102 + j % 3 * 18, + (j >= 3 ? 5 : 23))); } return outputStacks; } } - public static class GT_Recipe_Map_DistillationTower extends GT_Recipe_Map { - private static final int TOTAL_INPUT_COUNT = 6; - private static final int FLUID_OUTPUT_COUNT = 11; - private static final int ROW_SIZE = 3; - public GT_Recipe_Map_DistillationTower() { - super(new HashSet<>(110), "gt.recipe.distillationtower", "Distillation Tower", null, RES_PATH_GUI + "basicmachines/DistillationTower", 2, 4, 0, 0, 1, E, 1, E, true, true); - } + public static class GT_Recipe_Map_DistillationTower extends GT_Recipe_Map { + private static final int TOTAL_INPUT_COUNT = 6; + private static final int FLUID_OUTPUT_COUNT = 11; + private static final int ROW_SIZE = 3; + + public GT_Recipe_Map_DistillationTower() { + super( + new HashSet<>(110), + "gt.recipe.distillationtower", + "Distillation Tower", + null, + RES_PATH_GUI + "basicmachines/DistillationTower", + 2, + 4, + 0, + 0, + 1, + E, + 1, + E, + true, + true); + } @Override public ArrayList<PositionedStack> getInputPositionedStacks(GT_Recipe recipe) { @@ -2200,33 +4790,40 @@ public class GT_Recipe implements Comparable<GT_Recipe> { for (int i = 0; i < itemLimit; i++, j++) { if (recipe.mInputs == null || (recipe.mInputs[i] == null && (i == 0 && itemLimit == 1))) { if (recipe.mOutputs != null && recipe.mOutputs.length > 0 && recipe.mOutputs[0] != null) - GT_Log.out.println("recipe " + recipe + " Output 0:" + recipe.mOutputs[0].getDisplayName() + " has errored!"); - else - GT_Log.out.println("recipe " + recipe + " has errored!"); + GT_Log.out.println("recipe " + recipe + " Output 0:" + recipe.mOutputs[0].getDisplayName() + + " has errored!"); + else GT_Log.out.println("recipe " + recipe + " has errored!"); new Exception("Recipe Fixme").printStackTrace(GT_Log.out); } if ((recipe.mInputs != null && recipe.mInputs[i] != null) || !GT_Values.allow_broken_recipemap) - inputStacks.add(new FixedPositionedStack(recipe.mInputs[i].copy(), 48 - j % 3 * 18, (j >= 3 ? 5 : 23))); + inputStacks.add( + new FixedPositionedStack(recipe.mInputs[i].copy(), 48 - j % 3 * 18, (j >= 3 ? 5 : 23))); else - inputStacks.add(new FixedPositionedStack(new ItemStack(Items.command_block_minecart), 48 - j % 3 * 18, (j >= 3 ? 5 : 23))); + inputStacks.add(new FixedPositionedStack( + new ItemStack(Items.command_block_minecart), 48 - j % 3 * 18, (j >= 3 ? 5 : 23))); } for (int i = 0; i < fluidLimit; i++, j++) { if (recipe.mFluidInputs == null || recipe.mFluidInputs[i] == null) { if (recipe.mOutputs != null && recipe.mOutputs.length > 0 && recipe.mOutputs[0] != null) - GT_Log.out.println("recipe " + recipe + " Output 0:" + recipe.mOutputs[0].getDisplayName() + " has errored!"); - else - GT_Log.out.println("recipe " + recipe + " has errored!"); + GT_Log.out.println("recipe " + recipe + " Output 0:" + recipe.mOutputs[0].getDisplayName() + + " has errored!"); + else GT_Log.out.println("recipe " + recipe + " has errored!"); new Exception("Recipe Fixme").printStackTrace(GT_Log.out); } - if ((recipe.mFluidInputs != null && recipe.mFluidInputs[i] != null) || !GT_Values.allow_broken_recipemap) - inputStacks.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(recipe.mFluidInputs[i], true), 48 - j % 3 * 18, (j >= 3 ? 5 : 23))); + if ((recipe.mFluidInputs != null && recipe.mFluidInputs[i] != null) + || !GT_Values.allow_broken_recipemap) + inputStacks.add(new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(recipe.mFluidInputs[i], true), + 48 - j % 3 * 18, + (j >= 3 ? 5 : 23))); } return inputStacks; } + @Override public ArrayList<PositionedStack> getOutputPositionedStacks(GT_Recipe recipe) { int fluidLimit = Math.min(recipe.mFluidOutputs.length, FLUID_OUTPUT_COUNT); @@ -2238,8 +4835,9 @@ public class GT_Recipe implements Comparable<GT_Recipe> { for (int i = 0; i < fluidLimit; i++) { int x = 102 + ((i + 1) % ROW_SIZE) * 18; - int y = 52 - ((i + 1) / ROW_SIZE) * 18; - outputStacks.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(recipe.mFluidOutputs[i], true), x, y)); + int y = 52 - ((i + 1) / ROW_SIZE) * 18; + outputStacks.add( + new FixedPositionedStack(GT_Utility.getFluidDisplayStack(recipe.mFluidOutputs[i], true), x, y)); } return outputStacks; } @@ -2247,14 +4845,30 @@ public class GT_Recipe implements Comparable<GT_Recipe> { public static class GT_Recipe_Map_OilCracker extends GT_Recipe_Map { private final Set<String> mValidCatalystFluidNames = new HashSet<>(); + public GT_Recipe_Map_OilCracker() { - super(new HashSet<>(70), "gt.recipe.craker", "Oil Cracker", null, RES_PATH_GUI + "basicmachines/OilCracker", 1, 1, 1, 2, 1, E, 1, E, true, true); + super( + new HashSet<>(70), + "gt.recipe.craker", + "Oil Cracker", + null, + RES_PATH_GUI + "basicmachines/OilCracker", + 1, + 1, + 1, + 2, + 1, + E, + 1, + E, + true, + true); } @Override public GT_Recipe add(GT_Recipe aRecipe) { GT_Recipe ret = super.add(aRecipe); - if (ret != null && ret.mFluidInputs != null && ret.mFluidInputs.length>1 && ret.mFluidInputs[1] != null) { + if (ret != null && ret.mFluidInputs != null && ret.mFluidInputs.length > 1 && ret.mFluidInputs[1] != null) { mValidCatalystFluidNames.add(ret.mFluidInputs[1].getFluid().getName()); } return ret; @@ -2267,60 +4881,158 @@ public class GT_Recipe implements Comparable<GT_Recipe> { public static class GT_Recipe_WithAlt extends GT_Recipe { - ItemStack[][] mOreDictAlt; - - public GT_Recipe_WithAlt(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecialItems, int[] aChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue, ItemStack[][] aAlt) { - super(aOptimize, aInputs, aOutputs, aSpecialItems, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue); - mOreDictAlt = aAlt; - } - - - public Object getAltRepresentativeInput(int aIndex) { - if (aIndex < 0) return null; - if (aIndex < mOreDictAlt.length) { - if (mOreDictAlt[aIndex] != null && mOreDictAlt[aIndex].length > 0) { - ItemStack[] rStacks = new ItemStack[mOreDictAlt[aIndex].length]; - for (int i = 0; i < mOreDictAlt[aIndex].length; i++) { - rStacks[i] = GT_Utility.copyOrNull(mOreDictAlt[aIndex][i]); - } - return rStacks; - } - } - if (aIndex >= mInputs.length) return null; - return GT_Utility.copyOrNull(mInputs[aIndex]); - } - + ItemStack[][] mOreDictAlt; + + public GT_Recipe_WithAlt( + boolean aOptimize, + ItemStack[] aInputs, + ItemStack[] aOutputs, + Object aSpecialItems, + int[] aChances, + FluidStack[] aFluidInputs, + FluidStack[] aFluidOutputs, + int aDuration, + int aEUt, + int aSpecialValue, + ItemStack[][] aAlt) { + super( + aOptimize, + aInputs, + aOutputs, + aSpecialItems, + aChances, + aFluidInputs, + aFluidOutputs, + aDuration, + aEUt, + aSpecialValue); + mOreDictAlt = aAlt; + } + + public Object getAltRepresentativeInput(int aIndex) { + if (aIndex < 0) return null; + if (aIndex < mOreDictAlt.length) { + if (mOreDictAlt[aIndex] != null && mOreDictAlt[aIndex].length > 0) { + ItemStack[] rStacks = new ItemStack[mOreDictAlt[aIndex].length]; + for (int i = 0; i < mOreDictAlt[aIndex].length; i++) { + rStacks[i] = GT_Utility.copyOrNull(mOreDictAlt[aIndex][i]); + } + return rStacks; + } + } + if (aIndex >= mInputs.length) return null; + return GT_Utility.copyOrNull(mInputs[aIndex]); + } } private static class ReplicatorFakeMap extends GT_Recipe_Map { - public ReplicatorFakeMap(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) { - super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); + public ReplicatorFakeMap( + Collection<GT_Recipe> aRecipeList, + String aUnlocalizedName, + String aLocalName, + String aNEIName, + String aNEIGUIPath, + int aUsualInputCount, + int aUsualOutputCount, + int aMinimalInputItems, + int aMinimalInputFluids, + int aAmperage, + String aNEISpecialValuePre, + int aNEISpecialValueMultiplier, + String aNEISpecialValuePost, + boolean aShowVoltageAmperageInNEI, + boolean aNEIAllowed) { + super( + aRecipeList, + aUnlocalizedName, + aLocalName, + aNEIName, + aNEIGUIPath, + aUsualInputCount, + aUsualOutputCount, + aMinimalInputItems, + aMinimalInputFluids, + aAmperage, + aNEISpecialValuePre, + aNEISpecialValueMultiplier, + aNEISpecialValuePost, + aShowVoltageAmperageInNEI, + aNEIAllowed); } @Override - public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { + public GT_Recipe addFakeRecipe( + boolean aCheckForCollisions, + ItemStack[] aInputs, + ItemStack[] aOutputs, + Object aSpecial, + FluidStack[] aFluidInputs, + FluidStack[] aFluidOutputs, + int aDuration, + int aEUt, + int aSpecialValue) { AtomicInteger ai = new AtomicInteger(); Optional.ofNullable(GT_OreDictUnificator.getAssociation(aOutputs[0])) .map(itemData -> itemData.mMaterial) .map(materialsStack -> materialsStack.mMaterial) .map(materials -> materials.mElement) .map(Element::getMass) - .ifPresent(e -> - { - aFluidInputs[0].amount = (int) GT_MetaTileEntity_Replicator.cubicFluidMultiplier(e); - ai.set(GT_Utility.safeInt(aFluidInputs[0].amount * 512L, 1)); - } - ); - return addFakeRecipe(aCheckForCollisions, new GT_Recipe(false, aInputs, aOutputs, aSpecial, null, aFluidInputs, aFluidOutputs, ai.get(), aEUt, aSpecialValue)); + .ifPresent(e -> { + aFluidInputs[0].amount = (int) GT_MetaTileEntity_Replicator.cubicFluidMultiplier(e); + ai.set(GT_Utility.safeInt(aFluidInputs[0].amount * 512L, 1)); + }); + return addFakeRecipe( + aCheckForCollisions, + new GT_Recipe( + false, + aInputs, + aOutputs, + aSpecial, + null, + aFluidInputs, + aFluidOutputs, + ai.get(), + aEUt, + aSpecialValue)); } - } public static class GT_Recipe_Map_PlasmaForge extends GT_Recipe_Map { - public GT_Recipe_Map_PlasmaForge(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) { - super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed, true); + public GT_Recipe_Map_PlasmaForge( + Collection<GT_Recipe> aRecipeList, + String aUnlocalizedName, + String aLocalName, + String aNEIName, + String aNEIGUIPath, + int aUsualInputCount, + int aUsualOutputCount, + int aMinimalInputItems, + int aMinimalInputFluids, + int aAmperage, + String aNEISpecialValuePre, + int aNEISpecialValueMultiplier, + String aNEISpecialValuePost, + boolean aShowVoltageAmperageInNEI, + boolean aNEIAllowed) { + super( + aRecipeList, + aUnlocalizedName, + aLocalName, + aNEIName, + aNEIGUIPath, + aUsualInputCount, + aUsualOutputCount, + aMinimalInputItems, + aMinimalInputFluids, + aAmperage, + aNEISpecialValuePre, + aNEISpecialValueMultiplier, + aNEISpecialValuePost, + aShowVoltageAmperageInNEI, + aNEIAllowed, + true); } @Override @@ -2328,15 +5040,19 @@ public class GT_Recipe implements Comparable<GT_Recipe> { ArrayList<PositionedStack> inputStacks = new ArrayList<>(); int i = 0; if (recipe.mInputs != null) { - for (int j = 0; j < recipe.mInputs.length; j ++, i ++) { + for (int j = 0; j < recipe.mInputs.length; j++, i++) { if (recipe.mInputs[j] == NI) continue; - inputStacks.add(new FixedPositionedStack(recipe.mInputs[j].copy(), 12 + 18 * (i % 3), 5 + 18 * (i / 3))); + inputStacks.add( + new FixedPositionedStack(recipe.mInputs[j].copy(), 12 + 18 * (i % 3), 5 + 18 * (i / 3))); } } if (recipe.mFluidInputs != null) { - for (int j = 0; j < recipe.mFluidInputs.length; j ++, i ++) { + for (int j = 0; j < recipe.mFluidInputs.length; j++, i++) { if (recipe.mFluidInputs[j] == NF) continue; - inputStacks.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(recipe.mFluidInputs[j], true), 12 + 18 * (i % 3), 5 + 18 * (i / 3))); + inputStacks.add(new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(recipe.mFluidInputs[j], true), + 12 + 18 * (i % 3), + 5 + 18 * (i / 3))); } } return inputStacks; @@ -2347,15 +5063,19 @@ public class GT_Recipe implements Comparable<GT_Recipe> { ArrayList<PositionedStack> outputStacks = new ArrayList<>(); int i = 0; if (recipe.mOutputs != null) { - for (int j = 0; j < recipe.mOutputs.length; j ++, i ++) { + for (int j = 0; j < recipe.mOutputs.length; j++, i++) { if (recipe.mOutputs[j] == NI) continue; - outputStacks.add(new FixedPositionedStack(recipe.mOutputs[j].copy(), 102 + 18 * (i % 3), 5 + 18 * (i / 3))); + outputStacks.add( + new FixedPositionedStack(recipe.mOutputs[j].copy(), 102 + 18 * (i % 3), 5 + 18 * (i / 3))); } } if (recipe.mFluidOutputs != null) { - for (int j = 0; j < recipe.mFluidOutputs.length; j ++, i ++) { + for (int j = 0; j < recipe.mFluidOutputs.length; j++, i++) { if (recipe.mFluidOutputs[j] == NF) continue; - outputStacks.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(recipe.mFluidOutputs[j], true), 102 + 18 * (i % 3), 5 + 18 * (i / 3))); + outputStacks.add(new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(recipe.mFluidOutputs[j], true), + 102 + 18 * (i % 3), + 5 + 18 * (i / 3))); } } return outputStacks; @@ -2364,13 +5084,64 @@ public class GT_Recipe implements Comparable<GT_Recipe> { public static class GT_Recipe_Map_ComplexFusion extends GT_Recipe_Map { - public GT_Recipe_Map_ComplexFusion(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) { - super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed, true); + public GT_Recipe_Map_ComplexFusion( + Collection<GT_Recipe> aRecipeList, + String aUnlocalizedName, + String aLocalName, + String aNEIName, + String aNEIGUIPath, + int aUsualInputCount, + int aUsualOutputCount, + int aMinimalInputItems, + int aMinimalInputFluids, + int aAmperage, + String aNEISpecialValuePre, + int aNEISpecialValueMultiplier, + String aNEISpecialValuePost, + boolean aShowVoltageAmperageInNEI, + boolean aNEIAllowed) { + super( + aRecipeList, + aUnlocalizedName, + aLocalName, + aNEIName, + aNEIGUIPath, + aUsualInputCount, + aUsualOutputCount, + aMinimalInputItems, + aMinimalInputFluids, + aAmperage, + aNEISpecialValuePre, + aNEISpecialValueMultiplier, + aNEISpecialValuePost, + aShowVoltageAmperageInNEI, + aNEIAllowed, + true); } @Override - public GT_Recipe addRecipe(int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { - return addRecipe(new GT_Recipe(false, null, null, null, aOutputChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue), false, false, false); + public GT_Recipe addRecipe( + int[] aOutputChances, + FluidStack[] aFluidInputs, + FluidStack[] aFluidOutputs, + int aDuration, + int aEUt, + int aSpecialValue) { + return addRecipe( + new GT_Recipe( + false, + null, + null, + null, + aOutputChances, + aFluidInputs, + aFluidOutputs, + aDuration, + aEUt, + aSpecialValue), + false, + false, + false); } @Override @@ -2378,9 +5149,12 @@ public class GT_Recipe implements Comparable<GT_Recipe> { ArrayList<PositionedStack> inputStacks = new ArrayList<>(); int i = 0; if (recipe.mFluidInputs != null) { - for (int j = 0; j < recipe.mFluidInputs.length; j ++, i ++) { + for (int j = 0; j < recipe.mFluidInputs.length; j++, i++) { if (recipe.mFluidInputs[j] == NF) continue; - inputStacks.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(recipe.mFluidInputs[j], true), 3 + 18 * (i % 4), -1 + 18 * (i / 4))); + inputStacks.add(new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(recipe.mFluidInputs[j], true), + 3 + 18 * (i % 4), + -1 + 18 * (i / 4))); } } return inputStacks; @@ -2391,13 +5165,15 @@ public class GT_Recipe implements Comparable<GT_Recipe> { ArrayList<PositionedStack> outputStacks = new ArrayList<>(); int i = 0; if (recipe.mFluidOutputs != null) { - for (int j = 0; j < recipe.mFluidOutputs.length; j ++, i ++) { + for (int j = 0; j < recipe.mFluidOutputs.length; j++, i++) { if (recipe.mFluidOutputs[j] == NF) continue; - outputStacks.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(recipe.mFluidOutputs[j], true), 93 + 18 * (i % 4), -1 + 18 * (i / 4))); + outputStacks.add(new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(recipe.mFluidOutputs[j], true), + 93 + 18 * (i % 4), + -1 + 18 * (i / 4))); } } return outputStacks; } } - } diff --git a/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java b/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java index 9ce949f274..1b1654d8a6 100644 --- a/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java +++ b/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java @@ -1,24 +1,21 @@ package gregtech.api.util; -import com.google.common.base.Stopwatch; +import static gregtech.api.enums.GT_Values.*; +import static gregtech.api.enums.Materials.*; +import static gregtech.api.enums.Materials.Void; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.*; -import gregtech.api.enums.TC_Aspects.TC_AspectStack; -import gregtech.api.interfaces.internal.IThaumcraftCompat; import gregtech.api.objects.ItemData; import gregtech.api.objects.MaterialStack; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; - import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; -import static gregtech.api.enums.GT_Values.*; -import static gregtech.api.enums.Materials.Void; -import static gregtech.api.enums.Materials.*; /** * Class for Automatic Recipe registering. */ @@ -27,118 +24,130 @@ public class GT_RecipeRegistrator { * List of Materials, which are used in the Creation of Sticks. All Rod Materials are automatically added to this List. */ public static final List<Materials> sRodMaterialList = new ArrayList<Materials>(); + private static final ItemStack sMt1 = new ItemStack(Blocks.dirt, 1, 0), sMt2 = new ItemStack(Blocks.dirt, 1, 0); private static final String s_H = "h", s_F = "f", s_I = "I", s_P = "P", s_R = "R"; - private static final RecipeShape[] - sShapes = new RecipeShape[]{ - new RecipeShape(sMt1, null, sMt1, sMt1, sMt1, sMt1, null, sMt1, null), - new RecipeShape(sMt1, null, sMt1, sMt1, null, sMt1, sMt1, sMt1, sMt1), - new RecipeShape(null, sMt1, null, sMt1, sMt1, sMt1, sMt1, null, sMt1), - new RecipeShape(sMt1, sMt1, sMt1, sMt1, null, sMt1, null, null, null), - new RecipeShape(sMt1, null, sMt1, sMt1, sMt1, sMt1, sMt1, sMt1, sMt1), - new RecipeShape(sMt1, sMt1, sMt1, sMt1, null, sMt1, sMt1, null, sMt1), - new RecipeShape(null, null, null, sMt1, null, sMt1, sMt1, null, sMt1), - new RecipeShape(null, sMt1, null, null, sMt1, null, null, sMt2, null), - new RecipeShape(sMt1, sMt1, sMt1, null, sMt2, null, null, sMt2, null), - new RecipeShape(null, sMt1, null, null, sMt2, null, null, sMt2, null), - new RecipeShape(sMt1, sMt1, null, sMt1, sMt2, null, null, sMt2, null), - new RecipeShape(null, sMt1, sMt1, null, sMt2, sMt1, null, sMt2, null), - new RecipeShape(sMt1, sMt1, null, null, sMt2, null, null, sMt2, null), - new RecipeShape(null, sMt1, sMt1, null, sMt2, null, null, sMt2, null), - new RecipeShape(null, sMt1, null, sMt1, null, null, null, sMt1, sMt2), - new RecipeShape(null, sMt1, null, null, null, sMt1, sMt2, sMt1, null), - new RecipeShape(null, sMt1, null, sMt1, null, sMt1, null, null, sMt2), - new RecipeShape(null, sMt1, null, sMt1, null, sMt1, sMt2, null, null), - new RecipeShape(null, sMt2, null, null, sMt1, null, null, sMt1, null), - new RecipeShape(null, sMt2, null, null, sMt2, null, sMt1, sMt1, sMt1), - new RecipeShape(null, sMt2, null, null, sMt2, null, null, sMt1, null), - new RecipeShape(null, sMt2, null, sMt1, sMt2, null, sMt1, sMt1, null), - new RecipeShape(null, sMt2, null, null, sMt2, sMt1, null, sMt1, sMt1), - new RecipeShape(null, sMt2, null, null, sMt2, null, sMt1, sMt1, null), - new RecipeShape(sMt1, null, null, null, sMt2, null, null, null, sMt2), - new RecipeShape(null, null, sMt1, null, sMt2, null, sMt2, null, null), - new RecipeShape(sMt1, null, null, null, sMt2, null, null, null, null), - new RecipeShape(null, null, sMt1, null, sMt2, null, null, null, null), - new RecipeShape(sMt1, sMt2, null, null, null, null, null, null, null), - new RecipeShape(sMt2, sMt1, null, null, null, null, null, null, null), - new RecipeShape(sMt1, null, null, sMt2, null, null, null, null, null), - new RecipeShape(sMt2, null, null, sMt1, null, null, null, null, null), - new RecipeShape(sMt1, sMt1, sMt1, sMt1, sMt1, sMt1, null, sMt2, null), - new RecipeShape(sMt1, sMt1, null, sMt1, sMt1, sMt2, sMt1, sMt1, null), - new RecipeShape(null, sMt1, sMt1, sMt2, sMt1, sMt1, null, sMt1, sMt1), - new RecipeShape(null, sMt2, null, sMt1, sMt1, sMt1, sMt1, sMt1, sMt1), - new RecipeShape(sMt1, sMt1, sMt1, sMt1, sMt2, sMt1, null, sMt2, null), - new RecipeShape(sMt1, sMt1, null, sMt1, sMt2, sMt2, sMt1, sMt1, null), - new RecipeShape(null, sMt1, sMt1, sMt2, sMt2, sMt1, null, sMt1, sMt1), - new RecipeShape(null, sMt2, null, sMt1, sMt2, sMt1, sMt1, sMt1, sMt1), - new RecipeShape(sMt1, null, null, null, sMt1, null, null, null, null), - new RecipeShape(null, sMt1, null, sMt1, null, null, null, null, null), - new RecipeShape(sMt1, sMt1, null, sMt2, null, sMt1, sMt2, null, null), - new RecipeShape(null, sMt1, sMt1, sMt1, null, sMt2, null, null, sMt2) + private static final RecipeShape[] sShapes = new RecipeShape[] { + new RecipeShape(sMt1, null, sMt1, sMt1, sMt1, sMt1, null, sMt1, null), + new RecipeShape(sMt1, null, sMt1, sMt1, null, sMt1, sMt1, sMt1, sMt1), + new RecipeShape(null, sMt1, null, sMt1, sMt1, sMt1, sMt1, null, sMt1), + new RecipeShape(sMt1, sMt1, sMt1, sMt1, null, sMt1, null, null, null), + new RecipeShape(sMt1, null, sMt1, sMt1, sMt1, sMt1, sMt1, sMt1, sMt1), + new RecipeShape(sMt1, sMt1, sMt1, sMt1, null, sMt1, sMt1, null, sMt1), + new RecipeShape(null, null, null, sMt1, null, sMt1, sMt1, null, sMt1), + new RecipeShape(null, sMt1, null, null, sMt1, null, null, sMt2, null), + new RecipeShape(sMt1, sMt1, sMt1, null, sMt2, null, null, sMt2, null), + new RecipeShape(null, sMt1, null, null, sMt2, null, null, sMt2, null), + new RecipeShape(sMt1, sMt1, null, sMt1, sMt2, null, null, sMt2, null), + new RecipeShape(null, sMt1, sMt1, null, sMt2, sMt1, null, sMt2, null), + new RecipeShape(sMt1, sMt1, null, null, sMt2, null, null, sMt2, null), + new RecipeShape(null, sMt1, sMt1, null, sMt2, null, null, sMt2, null), + new RecipeShape(null, sMt1, null, sMt1, null, null, null, sMt1, sMt2), + new RecipeShape(null, sMt1, null, null, null, sMt1, sMt2, sMt1, null), + new RecipeShape(null, sMt1, null, sMt1, null, sMt1, null, null, sMt2), + new RecipeShape(null, sMt1, null, sMt1, null, sMt1, sMt2, null, null), + new RecipeShape(null, sMt2, null, null, sMt1, null, null, sMt1, null), + new RecipeShape(null, sMt2, null, null, sMt2, null, sMt1, sMt1, sMt1), + new RecipeShape(null, sMt2, null, null, sMt2, null, null, sMt1, null), + new RecipeShape(null, sMt2, null, sMt1, sMt2, null, sMt1, sMt1, null), + new RecipeShape(null, sMt2, null, null, sMt2, sMt1, null, sMt1, sMt1), + new RecipeShape(null, sMt2, null, null, sMt2, null, sMt1, sMt1, null), + new RecipeShape(sMt1, null, null, null, sMt2, null, null, null, sMt2), + new RecipeShape(null, null, sMt1, null, sMt2, null, sMt2, null, null), + new RecipeShape(sMt1, null, null, null, sMt2, null, null, null, null), + new RecipeShape(null, null, sMt1, null, sMt2, null, null, null, null), + new RecipeShape(sMt1, sMt2, null, null, null, null, null, null, null), + new RecipeShape(sMt2, sMt1, null, null, null, null, null, null, null), + new RecipeShape(sMt1, null, null, sMt2, null, null, null, null, null), + new RecipeShape(sMt2, null, null, sMt1, null, null, null, null, null), + new RecipeShape(sMt1, sMt1, sMt1, sMt1, sMt1, sMt1, null, sMt2, null), + new RecipeShape(sMt1, sMt1, null, sMt1, sMt1, sMt2, sMt1, sMt1, null), + new RecipeShape(null, sMt1, sMt1, sMt2, sMt1, sMt1, null, sMt1, sMt1), + new RecipeShape(null, sMt2, null, sMt1, sMt1, sMt1, sMt1, sMt1, sMt1), + new RecipeShape(sMt1, sMt1, sMt1, sMt1, sMt2, sMt1, null, sMt2, null), + new RecipeShape(sMt1, sMt1, null, sMt1, sMt2, sMt2, sMt1, sMt1, null), + new RecipeShape(null, sMt1, sMt1, sMt2, sMt2, sMt1, null, sMt1, sMt1), + new RecipeShape(null, sMt2, null, sMt1, sMt2, sMt1, sMt1, sMt1, sMt1), + new RecipeShape(sMt1, null, null, null, sMt1, null, null, null, null), + new RecipeShape(null, sMt1, null, sMt1, null, null, null, null, null), + new RecipeShape(sMt1, sMt1, null, sMt2, null, sMt1, sMt2, null, null), + new RecipeShape(null, sMt1, sMt1, sMt1, null, sMt2, null, null, sMt2) }; - private static final String[][] sShapesA = new String[][]{ - null, - null, - null, - {"Helmet", s_P + s_P + s_P, s_P + s_H + s_P}, - {"ChestPlate", s_P + s_H + s_P, s_P + s_P + s_P, s_P + s_P + s_P}, - {"Pants", s_P + s_P + s_P, s_P + s_H + s_P, s_P + " " + s_P}, - {"Boots", s_P + " " + s_P, s_P + s_H + s_P}, - {"Sword", " " + s_P + " ", s_F + s_P + s_H, " " + s_R + " "}, - {"Pickaxe", s_P + s_I + s_I, s_F + s_R + s_H, " " + s_R + " "}, - {"Shovel", s_F + s_P + s_H, " " + s_R + " ", " " + s_R + " "}, - {"Axe", s_P + s_I + s_H, s_P + s_R + " ", s_F + s_R + " "}, - {"Axe", s_P + s_I + s_H, s_P + s_R + " ", s_F + s_R + " "}, - {"Hoe", s_P + s_I + s_H, s_F + s_R + " ", " " + s_R + " "}, - {"Hoe", s_P + s_I + s_H, s_F + s_R + " ", " " + s_R + " "}, - {"Sickle", " " + s_P + " ", s_P + s_F + " ", s_H + s_P + s_R}, - {"Sickle", " " + s_P + " ", s_P + s_F + " ", s_H + s_P + s_R}, - {"Sickle", " " + s_P + " ", s_P + s_F + " ", s_H + s_P + s_R}, - {"Sickle", " " + s_P + " ", s_P + s_F + " ", s_H + s_P + s_R}, - {"Sword", " " + s_R + " ", s_F + s_P + s_H, " " + s_P + " "}, - {"Pickaxe", " " + s_R + " ", s_F + s_R + s_H, s_P + s_I + s_I}, - {"Shovel", " " + s_R + " ", " " + s_R + " ", s_F + s_P + s_H}, - {"Axe", s_F + s_R + " ", s_P + s_R + " ", s_P + s_I + s_H}, - {"Axe", s_F + s_R + " ", s_P + s_R + " ", s_P + s_I + s_H}, - {"Hoe", " " + s_R + " ", s_F + s_R + " ", s_P + s_I + s_H}, - {"Hoe", " " + s_R + " ", s_F + s_R + " ", s_P + s_I + s_H}, - {"Spear", s_P + s_H + " ", s_F + s_R + " ", " " + " " + s_R}, - {"Spear", s_P + s_H + " ", s_F + s_R + " ", " " + " " + s_R}, - {"Knive", s_H + s_P, s_R + s_F}, - {"Knive", s_F + s_H, s_P + s_R}, - {"Knive", s_F + s_H, s_P + s_R}, - {"Knive", s_P + s_F, s_R + s_H}, - {"Knive", s_P + s_F, s_R + s_H}, - null, - null, - null, - null, - {"WarAxe", s_P + s_P + s_P, s_P + s_R + s_P, s_F + s_R + s_H}, - null, - null, - null, - {"Shears", s_H + s_P, s_P + s_F}, - {"Shears", s_H + s_P, s_P + s_F}, - {"Scythe", s_I + s_P + s_H, s_R + s_F + s_P, s_R + " " + " "}, - {"Scythe", s_H + s_P + s_I, s_P + s_F + s_R, " " + " " + s_R} + private static final String[][] sShapesA = new String[][] { + null, + null, + null, + {"Helmet", s_P + s_P + s_P, s_P + s_H + s_P}, + {"ChestPlate", s_P + s_H + s_P, s_P + s_P + s_P, s_P + s_P + s_P}, + {"Pants", s_P + s_P + s_P, s_P + s_H + s_P, s_P + " " + s_P}, + {"Boots", s_P + " " + s_P, s_P + s_H + s_P}, + {"Sword", " " + s_P + " ", s_F + s_P + s_H, " " + s_R + " "}, + {"Pickaxe", s_P + s_I + s_I, s_F + s_R + s_H, " " + s_R + " "}, + {"Shovel", s_F + s_P + s_H, " " + s_R + " ", " " + s_R + " "}, + {"Axe", s_P + s_I + s_H, s_P + s_R + " ", s_F + s_R + " "}, + {"Axe", s_P + s_I + s_H, s_P + s_R + " ", s_F + s_R + " "}, + {"Hoe", s_P + s_I + s_H, s_F + s_R + " ", " " + s_R + " "}, + {"Hoe", s_P + s_I + s_H, s_F + s_R + " ", " " + s_R + " "}, + {"Sickle", " " + s_P + " ", s_P + s_F + " ", s_H + s_P + s_R}, + {"Sickle", " " + s_P + " ", s_P + s_F + " ", s_H + s_P + s_R}, + {"Sickle", " " + s_P + " ", s_P + s_F + " ", s_H + s_P + s_R}, + {"Sickle", " " + s_P + " ", s_P + s_F + " ", s_H + s_P + s_R}, + {"Sword", " " + s_R + " ", s_F + s_P + s_H, " " + s_P + " "}, + {"Pickaxe", " " + s_R + " ", s_F + s_R + s_H, s_P + s_I + s_I}, + {"Shovel", " " + s_R + " ", " " + s_R + " ", s_F + s_P + s_H}, + {"Axe", s_F + s_R + " ", s_P + s_R + " ", s_P + s_I + s_H}, + {"Axe", s_F + s_R + " ", s_P + s_R + " ", s_P + s_I + s_H}, + {"Hoe", " " + s_R + " ", s_F + s_R + " ", s_P + s_I + s_H}, + {"Hoe", " " + s_R + " ", s_F + s_R + " ", s_P + s_I + s_H}, + {"Spear", s_P + s_H + " ", s_F + s_R + " ", " " + " " + s_R}, + {"Spear", s_P + s_H + " ", s_F + s_R + " ", " " + " " + s_R}, + {"Knive", s_H + s_P, s_R + s_F}, + {"Knive", s_F + s_H, s_P + s_R}, + {"Knive", s_F + s_H, s_P + s_R}, + {"Knive", s_P + s_F, s_R + s_H}, + {"Knive", s_P + s_F, s_R + s_H}, + null, + null, + null, + null, + {"WarAxe", s_P + s_P + s_P, s_P + s_R + s_P, s_F + s_R + s_H}, + null, + null, + null, + {"Shears", s_H + s_P, s_P + s_F}, + {"Shears", s_H + s_P, s_P + s_F}, + {"Scythe", s_I + s_P + s_H, s_R + s_F + s_P, s_R + " " + " "}, + {"Scythe", s_H + s_P + s_I, s_P + s_F + s_R, " " + " " + s_R} }; public static volatile int VERSION = 509; - public static void registerMaterialRecycling(ItemStack aStack, Materials aMaterial, long aMaterialAmount, MaterialStack aByproduct) { + public static void registerMaterialRecycling( + ItemStack aStack, Materials aMaterial, long aMaterialAmount, MaterialStack aByproduct) { if (GT_Utility.isStackInvalid(aStack)) return; if (aByproduct != null) { aByproduct = aByproduct.clone(); aByproduct.mAmount /= aStack.stackSize; } - GT_OreDictUnificator.addItemData(GT_Utility.copyAmount(1, aStack), new ItemData(aMaterial, aMaterialAmount / aStack.stackSize, aByproduct)); + GT_OreDictUnificator.addItemData( + GT_Utility.copyAmount(1, aStack), + new ItemData(aMaterial, aMaterialAmount / aStack.stackSize, aByproduct)); } public static void registerMaterialRecycling(ItemStack aStack, ItemData aData) { - if (GT_Utility.isStackInvalid(aStack) || GT_Utility.areStacksEqual(new ItemStack(Items.blaze_rod), aStack) || aData == null || !aData.hasValidMaterialData() || aData.mMaterial.mAmount <= 0 || GT_Utility.getFluidForFilledItem(aStack, false) != null) - return; + if (GT_Utility.isStackInvalid(aStack) + || GT_Utility.areStacksEqual(new ItemStack(Items.blaze_rod), aStack) + || aData == null + || !aData.hasValidMaterialData() + || aData.mMaterial.mAmount <= 0 + || GT_Utility.getFluidForFilledItem(aStack, false) != null) return; registerReverseMacerating(GT_Utility.copyAmount(1, aStack), aData, aData.mPrefix == null); - registerReverseSmelting(GT_Utility.copyAmount(1, aStack), aData.mMaterial.mMaterial, aData.mMaterial.mAmount, true); - registerReverseFluidSmelting(GT_Utility.copyAmount(1, aStack), aData.mMaterial.mMaterial, aData.mMaterial.mAmount, aData.getByProduct(0)); + registerReverseSmelting( + GT_Utility.copyAmount(1, aStack), aData.mMaterial.mMaterial, aData.mMaterial.mAmount, true); + registerReverseFluidSmelting( + GT_Utility.copyAmount(1, aStack), + aData.mMaterial.mMaterial, + aData.mMaterial.mAmount, + aData.getByProduct(0)); registerReverseArcSmelting(GT_Utility.copyAmount(1, aStack), aData); } @@ -147,17 +156,48 @@ public class GT_RecipeRegistrator { * @param aMaterial the Material. * @param aMaterialAmount the amount of it in Material Units. */ - public static void registerReverseFluidSmelting(ItemStack aStack, Materials aMaterial, long aMaterialAmount, MaterialStack aByproduct) { - if (aStack == null || aMaterial == null || aMaterial.mSmeltInto.mStandardMoltenFluid == null || !aMaterial.contains(SubTag.SMELTING_TO_FLUID) || (L * aMaterialAmount) / (M * aStack.stackSize) <= 0) - return; + public static void registerReverseFluidSmelting( + ItemStack aStack, Materials aMaterial, long aMaterialAmount, MaterialStack aByproduct) { + if (aStack == null + || aMaterial == null + || aMaterial.mSmeltInto.mStandardMoltenFluid == null + || !aMaterial.contains(SubTag.SMELTING_TO_FLUID) + || (L * aMaterialAmount) / (M * aStack.stackSize) <= 0) return; ItemData tData = GT_OreDictUnificator.getItemData(aStack); - boolean tHide = aStack.getUnlocalizedName().startsWith("gt.blockmachines")&&(GT_Mod.gregtechproxy.mHideRecyclingRecipes); - if(GT_Mod.gregtechproxy.mHideRecyclingRecipes&&tData!=null&&tData.hasValidPrefixData()&&!(tData.mPrefix==OrePrefixes.dust||tData.mPrefix==OrePrefixes.ingot||tData.mPrefix==OrePrefixes.block|tData.mPrefix==OrePrefixes.plate)){tHide=true;} -// boolean tHide = (aMaterial != Materials.Iron && aMaterial!= Materials.Redstone)&&(GT_Mod.gregtechproxy.mHideRecyclingRecipes); -// if(tHide && tData!=null&&tData.hasValidPrefixData()&&tData.mPrefix==OrePrefixes.ingot){ -// tHide=false; -// } - RA.addFluidSmelterRecipe(GT_Utility.copyAmount(1, aStack), aByproduct == null ? null : aByproduct.mMaterial.contains(SubTag.NO_SMELTING) || !aByproduct.mMaterial.contains(SubTag.METAL) ? aByproduct.mMaterial.contains(SubTag.FLAMMABLE) ? GT_OreDictUnificator.getDust(Materials.Ash, aByproduct.mAmount / 2) : aByproduct.mMaterial.contains(SubTag.UNBURNABLE) ? GT_OreDictUnificator.getDustOrIngot(aByproduct.mMaterial.mSmeltInto, aByproduct.mAmount) : null : GT_OreDictUnificator.getIngotOrDust(aByproduct.mMaterial.mSmeltInto, aByproduct.mAmount), aMaterial.mSmeltInto.getMolten((L * aMaterialAmount) / (M * aStack.stackSize)), 10000, (int) Math.max(1, (24 * aMaterialAmount) / M), Math.max(8, (int) Math.sqrt(2 * aMaterial.mSmeltInto.mStandardMoltenFluid.getTemperature())), tHide); + boolean tHide = aStack.getUnlocalizedName().startsWith("gt.blockmachines") + && (GT_Mod.gregtechproxy.mHideRecyclingRecipes); + if (GT_Mod.gregtechproxy.mHideRecyclingRecipes + && tData != null + && tData.hasValidPrefixData() + && !(tData.mPrefix == OrePrefixes.dust + || tData.mPrefix == OrePrefixes.ingot + || tData.mPrefix == OrePrefixes.block | tData.mPrefix == OrePrefixes.plate)) { + tHide = true; + } + // boolean tHide = (aMaterial != Materials.Iron && aMaterial!= + // Materials.Redstone)&&(GT_Mod.gregtechproxy.mHideRecyclingRecipes); + // if(tHide && tData!=null&&tData.hasValidPrefixData()&&tData.mPrefix==OrePrefixes.ingot){ + // tHide=false; + // } + RA.addFluidSmelterRecipe( + GT_Utility.copyAmount(1, aStack), + aByproduct == null + ? null + : aByproduct.mMaterial.contains(SubTag.NO_SMELTING) + || !aByproduct.mMaterial.contains(SubTag.METAL) + ? aByproduct.mMaterial.contains(SubTag.FLAMMABLE) + ? GT_OreDictUnificator.getDust(Materials.Ash, aByproduct.mAmount / 2) + : aByproduct.mMaterial.contains(SubTag.UNBURNABLE) + ? GT_OreDictUnificator.getDustOrIngot( + aByproduct.mMaterial.mSmeltInto, aByproduct.mAmount) + : null + : GT_OreDictUnificator.getIngotOrDust( + aByproduct.mMaterial.mSmeltInto, aByproduct.mAmount), + aMaterial.mSmeltInto.getMolten((L * aMaterialAmount) / (M * aStack.stackSize)), + 10000, + (int) Math.max(1, (24 * aMaterialAmount) / M), + Math.max(8, (int) Math.sqrt(2 * aMaterial.mSmeltInto.mStandardMoltenFluid.getTemperature())), + tHide); } /** @@ -166,21 +206,42 @@ public class GT_RecipeRegistrator { * @param aMaterialAmount the amount of it in Material Units. * @param aAllowAlloySmelter if it is allowed to be recycled inside the Alloy Smelter. */ - public static void registerReverseSmelting(ItemStack aStack, Materials aMaterial, long aMaterialAmount, boolean aAllowAlloySmelter) { - if (aStack == null || aMaterial == null || aMaterialAmount <= 0 || aMaterial.contains(SubTag.NO_SMELTING) || (aMaterialAmount > M && aMaterial.contains(SubTag.METAL))) - return; + public static void registerReverseSmelting( + ItemStack aStack, Materials aMaterial, long aMaterialAmount, boolean aAllowAlloySmelter) { + if (aStack == null + || aMaterial == null + || aMaterialAmount <= 0 + || aMaterial.contains(SubTag.NO_SMELTING) + || (aMaterialAmount > M && aMaterial.contains(SubTag.METAL))) return; aMaterialAmount /= aStack.stackSize; - if(aMaterial==Materials.Naquadah||aMaterial==Materials.NaquadahEnriched)return; + if (aMaterial == Materials.Naquadah || aMaterial == Materials.NaquadahEnriched) return; - boolean tHide = (aMaterial != Materials.Iron)&&(GT_Mod.gregtechproxy.mHideRecyclingRecipes); + boolean tHide = (aMaterial != Materials.Iron) && (GT_Mod.gregtechproxy.mHideRecyclingRecipes); if (aAllowAlloySmelter) - GT_ModHandler.addSmeltingAndAlloySmeltingRecipe(GT_Utility.copyAmount(1, aStack), GT_OreDictUnificator.getIngot(aMaterial.mSmeltInto, aMaterialAmount),tHide); + GT_ModHandler.addSmeltingAndAlloySmeltingRecipe( + GT_Utility.copyAmount(1, aStack), + GT_OreDictUnificator.getIngot(aMaterial.mSmeltInto, aMaterialAmount), + tHide); else - GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1, aStack), GT_OreDictUnificator.getIngot(aMaterial.mSmeltInto, aMaterialAmount)); + GT_ModHandler.addSmeltingRecipe( + GT_Utility.copyAmount(1, aStack), + GT_OreDictUnificator.getIngot(aMaterial.mSmeltInto, aMaterialAmount)); } - public static void registerReverseArcSmelting(ItemStack aStack, Materials aMaterial, long aMaterialAmount, MaterialStack aByProduct01, MaterialStack aByProduct02, MaterialStack aByProduct03) { - registerReverseArcSmelting(aStack, new ItemData(aMaterial == null ? null : new MaterialStack(aMaterial, aMaterialAmount), aByProduct01, aByProduct02, aByProduct03)); + public static void registerReverseArcSmelting( + ItemStack aStack, + Materials aMaterial, + long aMaterialAmount, + MaterialStack aByProduct01, + MaterialStack aByProduct02, + MaterialStack aByProduct03) { + registerReverseArcSmelting( + aStack, + new ItemData( + aMaterial == null ? null : new MaterialStack(aMaterial, aMaterialAmount), + aByProduct01, + aByProduct02, + aByProduct03)); } public static void registerReverseArcSmelting(ItemStack aStack, ItemData aData) { @@ -190,10 +251,11 @@ public class GT_RecipeRegistrator { if (!aData.hasValidMaterialData()) return; boolean tIron = false; - for (MaterialStack tMaterial : aData.getAllMaterialStacks()) { - if (tMaterial.mMaterial == Materials.Iron||tMaterial.mMaterial == Materials.Copper || - tMaterial.mMaterial == Materials.WroughtIron||tMaterial.mMaterial == Materials.AnnealedCopper) tIron = true; + if (tMaterial.mMaterial == Materials.Iron + || tMaterial.mMaterial == Materials.Copper + || tMaterial.mMaterial == Materials.WroughtIron + || tMaterial.mMaterial == Materials.AnnealedCopper) tIron = true; if (tMaterial.mMaterial.contains(SubTag.UNBURNABLE)) { tMaterial.mMaterial = tMaterial.mMaterial.mSmeltInto.mArcSmeltInto; @@ -214,20 +276,21 @@ public class GT_RecipeRegistrator { continue; } if (tMaterial.mMaterial.contains(SubTag.METAL)) { - if(GT_Mod.gregtechproxy.mArcSmeltIntoAnnealed){ - tMaterial.mMaterial = tMaterial.mMaterial.mSmeltInto.mArcSmeltInto; - }else{ - tMaterial.mMaterial = tMaterial.mMaterial.mSmeltInto.mSmeltInto; - } + if (GT_Mod.gregtechproxy.mArcSmeltIntoAnnealed) { + tMaterial.mMaterial = tMaterial.mMaterial.mSmeltInto.mArcSmeltInto; + } else { + tMaterial.mMaterial = tMaterial.mMaterial.mSmeltInto.mSmeltInto; + } continue; } tMaterial.mAmount = 0; } aData = new ItemData(aData); - if (aData.mByProducts.length > 3) for (MaterialStack tMaterial : aData.getAllMaterialStacks()){ - if (tMaterial.mMaterial == Materials.Ash) tMaterial.mAmount = 0; - } + if (aData.mByProducts.length > 3) + for (MaterialStack tMaterial : aData.getAllMaterialStacks()) { + if (tMaterial.mMaterial == Materials.Ash) tMaterial.mAmount = 0; + } aData = new ItemData(aData); @@ -238,11 +301,36 @@ public class GT_RecipeRegistrator { tAmount += tMaterial.mAmount * tMaterial.mMaterial.getMass(); boolean tHide = !tIron && GT_Mod.gregtechproxy.mHideRecyclingRecipes; - RA.addArcFurnaceRecipe(aStack, new ItemStack[]{GT_OreDictUnificator.getIngotOrDust(aData.mMaterial), GT_OreDictUnificator.getIngotOrDust(aData.getByProduct(0)), GT_OreDictUnificator.getIngotOrDust(aData.getByProduct(1)), GT_OreDictUnificator.getIngotOrDust(aData.getByProduct(2))}, null, (int) Math.max(16, tAmount / M), 90, tHide); + RA.addArcFurnaceRecipe( + aStack, + new ItemStack[] { + GT_OreDictUnificator.getIngotOrDust(aData.mMaterial), + GT_OreDictUnificator.getIngotOrDust(aData.getByProduct(0)), + GT_OreDictUnificator.getIngotOrDust(aData.getByProduct(1)), + GT_OreDictUnificator.getIngotOrDust(aData.getByProduct(2)) + }, + null, + (int) Math.max(16, tAmount / M), + 90, + tHide); } - public static void registerReverseMacerating(ItemStack aStack, Materials aMaterial, long aMaterialAmount, MaterialStack aByProduct01, MaterialStack aByProduct02, MaterialStack aByProduct03, boolean aAllowHammer) { - registerReverseMacerating(aStack, new ItemData(aMaterial == null ? null : new MaterialStack(aMaterial, aMaterialAmount), aByProduct01, aByProduct02, aByProduct03), aAllowHammer); + public static void registerReverseMacerating( + ItemStack aStack, + Materials aMaterial, + long aMaterialAmount, + MaterialStack aByProduct01, + MaterialStack aByProduct02, + MaterialStack aByProduct03, + boolean aAllowHammer) { + registerReverseMacerating( + aStack, + new ItemData( + aMaterial == null ? null : new MaterialStack(aMaterial, aMaterialAmount), + aByProduct01, + aByProduct02, + aByProduct03), + aAllowHammer); } public static void registerReverseMacerating(ItemStack aStack, ItemData aData, boolean aAllowHammer) { @@ -262,36 +350,50 @@ public class GT_RecipeRegistrator { for (MaterialStack tMaterial : aData.getAllMaterialStacks()) tAmount += tMaterial.mAmount * tMaterial.mMaterial.getMass(); boolean tHide = (aData.mMaterial.mMaterial != Materials.Iron) && (GT_Mod.gregtechproxy.mHideRecyclingRecipes); - RA.addPulveriserRecipe(aStack, new ItemStack[]{GT_OreDictUnificator.getDust(aData.mMaterial), GT_OreDictUnificator.getDust(aData.getByProduct(0)), GT_OreDictUnificator.getDust(aData.getByProduct(1)), GT_OreDictUnificator.getDust(aData.getByProduct(2))}, null, aData.mMaterial.mMaterial==Materials.Marble ? 1 : (int) Math.max(16, tAmount / M), 4, tHide); + RA.addPulveriserRecipe( + aStack, + new ItemStack[] { + GT_OreDictUnificator.getDust(aData.mMaterial), + GT_OreDictUnificator.getDust(aData.getByProduct(0)), + GT_OreDictUnificator.getDust(aData.getByProduct(1)), + GT_OreDictUnificator.getDust(aData.getByProduct(2)) + }, + null, + aData.mMaterial.mMaterial == Materials.Marble ? 1 : (int) Math.max(16, tAmount / M), + 4, + tHide); if (aAllowHammer) - for (MaterialStack tMaterial : aData.getAllMaterialStacks()) - if (tMaterial.mMaterial.contains(SubTag.CRYSTAL) && !tMaterial.mMaterial.contains(SubTag.METAL) && tMaterial.mMaterial != Materials.Glass) { - if (RA.addForgeHammerRecipe(GT_Utility.copyAmount(1, aStack), GT_OreDictUnificator.getDust(aData.mMaterial), 200, 30)) - break; - } + for (MaterialStack tMaterial : aData.getAllMaterialStacks()) + if (tMaterial.mMaterial.contains(SubTag.CRYSTAL) + && !tMaterial.mMaterial.contains(SubTag.METAL) + && tMaterial.mMaterial != Materials.Glass) { + if (RA.addForgeHammerRecipe( + GT_Utility.copyAmount(1, aStack), GT_OreDictUnificator.getDust(aData.mMaterial), 200, 30)) + break; + } } /** * Place Materials which you want to replace in Non-GT-Recipes here (warning HUGHE impact on loading times!) */ private static final Materials[] VANILLA_MATS = { - Cobalt, - Gold, - Iron, - Lead, - FierySteel, - Void, - Bronze, - Diamond, - Ruby, - Sapphire, - Steel, - IronWood, - Steeleaf, - Knightmetal, - Thaumium, - DarkSteel, + Cobalt, + Gold, + Iron, + Lead, + FierySteel, + Void, + Bronze, + Diamond, + Ruby, + Sapphire, + Steel, + IronWood, + Steeleaf, + Knightmetal, + Thaumium, + DarkSteel, }; /** @@ -301,12 +403,12 @@ public class GT_RecipeRegistrator { * @param aPlate the Plate referenced to aMat * @param aRecipeReplacing allows to replace the Recipe with a Plate variant */ - public static synchronized void registerUsagesForMaterials(String aPlate, boolean aRecipeReplacing, ItemStack... aMats) { + public static synchronized void registerUsagesForMaterials( + String aPlate, boolean aRecipeReplacing, ItemStack... aMats) { for (ItemStack aMat : aMats) { aMat = GT_Utility.copyOrNull(aMat); - if (aMat == null) - continue; + if (aMat == null) continue; ItemData aItemData = GT_OreDictUnificator.getItemData(aMat); if (aItemData == null || aItemData.mPrefix != OrePrefixes.ingot) aPlate = null; @@ -320,15 +422,22 @@ public class GT_RecipeRegistrator { sMt2.stackSize = 1; Items.feather.setDamage(sMt2, 0); - if(aItemData != null && aItemData.hasValidPrefixMaterialData()) { + if (aItemData != null && aItemData.hasValidPrefixMaterialData()) { for (RecipeShape tRecipe : sShapes) { for (ItemStack tCrafted : GT_ModHandler.getRecipeOutputsBuffered(tRecipe.shape)) { - GT_OreDictUnificator.addItemData(tCrafted, new ItemData(aItemData.mMaterial.mMaterial, aItemData.mMaterial.mAmount * tRecipe.amount1)); - // GT_Log.out.println("###################################################################################"); + GT_OreDictUnificator.addItemData( + tCrafted, + new ItemData( + aItemData.mMaterial.mMaterial, aItemData.mMaterial.mAmount * tRecipe.amount1)); + // + // GT_Log.out.println("###################################################################################"); // GT_Log.out.println("registerUsagesForMaterials used aPlate: "+aPlate); - // GT_Log.out.println("registerUsagesForMaterials used aPlate: "+aMat.getUnlocalizedName()); - // GT_Log.out.println("registerUsagesForMaterials used aPlate: "+aMat.getDisplayName()); - // GT_Log.out.println("###################################################################################"); + // GT_Log.out.println("registerUsagesForMaterials used aPlate: + // "+aMat.getUnlocalizedName()); + // GT_Log.out.println("registerUsagesForMaterials used aPlate: + // "+aMat.getDisplayName()); + // + // GT_Log.out.println("###################################################################################"); } } } @@ -350,24 +459,66 @@ public class GT_RecipeRegistrator { for (ItemStack tCrafted : GT_ModHandler.getVanillyToolRecipeOutputs(tRecipe.shape)) { if (aItemData != null && aItemData.hasValidPrefixMaterialData()) - GT_OreDictUnificator.addItemData(tCrafted, new ItemData(aItemData.mMaterial.mMaterial, aItemData.mMaterial.mAmount * tRecipe.amount1, new MaterialStack(tMaterial, OrePrefixes.stick.mMaterialAmount * tRecipe.amount2))); + GT_OreDictUnificator.addItemData( + tCrafted, + new ItemData( + aItemData.mMaterial.mMaterial, + aItemData.mMaterial.mAmount * tRecipe.amount1, + new MaterialStack( + tMaterial, OrePrefixes.stick.mMaterialAmount * tRecipe.amount2))); if (aRecipeReplacing && aPlate != null && sShapesA[i] != null && sShapesA[i].length > 1) { assert aItemData != null; - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.recipereplacements, aItemData.mMaterial.mMaterial + "." + sShapesA[i][0], true)) { + if (GregTech_API.sRecipeFile.get( + ConfigCategories.Recipes.recipereplacements, + aItemData.mMaterial.mMaterial + "." + sShapesA[i][0], + true)) { if (null != (tStack = GT_ModHandler.removeRecipe(tRecipe.shape))) { -// GT_Log.out.println("###################################################################################"); -// GT_Log.out.println("registerStickStuff used aPlate: "+aPlate); -// GT_Log.out.println("###################################################################################"); + // + // GT_Log.out.println("###################################################################################"); + // GT_Log.out.println("registerStickStuff used + // aPlate: "+aPlate); + // + // GT_Log.out.println("###################################################################################"); switch (sShapesA[i].length) { case 2: - GT_ModHandler.addCraftingRecipe(tStack, GT_ModHandler.RecipeBits.BUFFERED, new Object[]{sShapesA[i][1], s_P.charAt(0), aPlate, s_R.charAt(0), OrePrefixes.stick.get(tMaterial), s_I.charAt(0), aItemData}); + GT_ModHandler.addCraftingRecipe( + tStack, GT_ModHandler.RecipeBits.BUFFERED, new Object[] { + sShapesA[i][1], + s_P.charAt(0), + aPlate, + s_R.charAt(0), + OrePrefixes.stick.get(tMaterial), + s_I.charAt(0), + aItemData + }); break; case 3: - GT_ModHandler.addCraftingRecipe(tStack, GT_ModHandler.RecipeBits.BUFFERED, new Object[]{sShapesA[i][1], sShapesA[i][2], s_P.charAt(0), aPlate, s_R.charAt(0), OrePrefixes.stick.get(tMaterial), s_I.charAt(0), aItemData}); + GT_ModHandler.addCraftingRecipe( + tStack, GT_ModHandler.RecipeBits.BUFFERED, new Object[] { + sShapesA[i][1], + sShapesA[i][2], + s_P.charAt(0), + aPlate, + s_R.charAt(0), + OrePrefixes.stick.get(tMaterial), + s_I.charAt(0), + aItemData + }); break; default: - GT_ModHandler.addCraftingRecipe(tStack, GT_ModHandler.RecipeBits.BUFFERED, new Object[]{sShapesA[i][1], sShapesA[i][2], sShapesA[i][3], s_P.charAt(0), aPlate, s_R.charAt(0), OrePrefixes.stick.get(tMaterial), s_I.charAt(0), aItemData}); + GT_ModHandler.addCraftingRecipe( + tStack, GT_ModHandler.RecipeBits.BUFFERED, new Object[] { + sShapesA[i][1], + sShapesA[i][2], + sShapesA[i][3], + s_P.charAt(0), + aPlate, + s_R.charAt(0), + OrePrefixes.stick.get(tMaterial), + s_I.charAt(0), + aItemData + }); break; } } @@ -392,8 +543,8 @@ public class GT_RecipeRegistrator { this.shape = shape; for (ItemStack stack : shape) { - if(stack == sMt1) this.amount1++; - if(stack == sMt2) this.amount2++; + if (stack == sMt1) this.amount1++; + if (stack == sMt2) this.amount2++; } } } diff --git a/src/main/java/gregtech/api/util/GT_RenderingWorld.java b/src/main/java/gregtech/api/util/GT_RenderingWorld.java index 920ce76357..173631e99c 100644 --- a/src/main/java/gregtech/api/util/GT_RenderingWorld.java +++ b/src/main/java/gregtech/api/util/GT_RenderingWorld.java @@ -4,6 +4,10 @@ import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.eventhandler.EventPriority; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.tileentity.TileEntity; @@ -16,176 +20,164 @@ import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.event.world.ChunkEvent; import net.minecraftforge.event.world.WorldEvent; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - /** * Provide a fake IBlockAccess to support CTM. Facade are supposed to set these when they are placed/received by client. */ public class GT_RenderingWorld implements IBlockAccess { - private static final GT_RenderingWorld INSTANCE = new GT_RenderingWorld(); - /* - * I do not think this map would ever grow too huge, so I won't go too overcomplicated on this one - */ - private final Map<ChunkPosition, BlockInfo> infos = new HashMap<>(); - private final Map<ChunkCoordIntPair, Set<ChunkPosition>> index = new HashMap<>(); - private IBlockAccess mWorld = Minecraft.getMinecraft().theWorld; - - private GT_RenderingWorld() { - new FMLEventHandler(); - new ForgeEventHandler(); - } - - public static GT_RenderingWorld getInstance() { - return INSTANCE; - } - - public static GT_RenderingWorld getInstance(IBlockAccess aWorld) { - if (aWorld == INSTANCE) - return INSTANCE; - if (aWorld == null) - INSTANCE.mWorld = Minecraft.getMinecraft().theWorld; - else - INSTANCE.mWorld = aWorld; - return INSTANCE; - } - - private void setWorld(IBlockAccess aWorld) { - if (aWorld == null) - mWorld = Minecraft.getMinecraft().theWorld; - else - mWorld = aWorld; - } - - public void register(int x, int y, int z, Block block, int meta) { - ChunkPosition key = new ChunkPosition(x, y, z); - infos.put(key, new BlockInfo(block, meta)); - index.computeIfAbsent(new ChunkCoordIntPair(x >> 4, z >> 4), p -> new HashSet<>()).add(key); - } - - public void unregister(int x, int y, int z, Block block, int meta) { - ChunkPosition key = new ChunkPosition(x, y, z); - if (infos.remove(key, new BlockInfo(block, meta))) { - ChunkCoordIntPair chunkKey = new ChunkCoordIntPair(x >> 4, z >> 4); - Set<ChunkPosition> set = index.get(chunkKey); - set.remove(key); - if (set.isEmpty()) - index.remove(chunkKey); - } - } - - @Override - public Block getBlock(int p_147439_1_, int p_147439_2_, int p_147439_3_) { - BlockInfo blockInfo = infos.get(new ChunkPosition(p_147439_1_, p_147439_2_, p_147439_3_)); - return blockInfo != null ? blockInfo.block : mWorld.getBlock(p_147439_1_, p_147439_2_, p_147439_3_); - } - - @Override - public TileEntity getTileEntity(int p_147438_1_, int p_147438_2_, int p_147438_3_) { - return mWorld.getTileEntity(p_147438_1_, p_147438_2_, p_147438_3_); - } - - @Override - public int getLightBrightnessForSkyBlocks(int p_72802_1_, int p_72802_2_, int p_72802_3_, int p_72802_4_) { - return mWorld.getLightBrightnessForSkyBlocks(p_72802_1_, p_72802_2_, p_72802_3_, p_72802_4_); - } - - @Override - public int getBlockMetadata(int p_72805_1_, int p_72805_2_, int p_72805_3_) { - BlockInfo blockInfo = infos.get(new ChunkPosition(p_72805_1_, p_72805_2_, p_72805_3_)); - return blockInfo != null ? blockInfo.meta : mWorld.getBlockMetadata(p_72805_1_, p_72805_2_, p_72805_3_); - } - - @Override - public int isBlockProvidingPowerTo(int p_72879_1_, int p_72879_2_, int p_72879_3_, int p_72879_4_) { - return mWorld.isBlockProvidingPowerTo(p_72879_1_, p_72879_2_, p_72879_3_, p_72879_4_); - } - - @Override - public boolean isAirBlock(int p_147437_1_, int p_147437_2_, int p_147437_3_) { - return getBlock(p_147437_1_, p_147437_2_, p_147437_3_).isAir(mWorld, p_147437_1_, p_147437_2_, p_147437_3_); - } - - @Override - public BiomeGenBase getBiomeGenForCoords(int p_72807_1_, int p_72807_2_) { - return mWorld.getBiomeGenForCoords(p_72807_1_, p_72807_2_); - } - - @Override - public int getHeight() { - return mWorld.getHeight(); - } - - @Override - public boolean extendedLevelsInChunkCache() { - return mWorld.extendedLevelsInChunkCache(); - } - - @Override - public boolean isSideSolid(int x, int y, int z, ForgeDirection side, boolean _default) { - return getBlock(x, y, z).isSideSolid(this, x, y, z, side); - } - - public class FMLEventHandler { - public FMLEventHandler() { - FMLCommonHandler.instance().bus().register(this); - } - - @SubscribeEvent(priority = EventPriority.HIGHEST) - public void onRenderTickStart(TickEvent.RenderTickEvent e) { - if (e.phase == TickEvent.Phase.START) - mWorld = Minecraft.getMinecraft().theWorld; - } - } - - public class ForgeEventHandler { - private ForgeEventHandler() { - MinecraftForge.EVENT_BUS.register(this); - } - - @SubscribeEvent - public void onChunkUnloaded(ChunkEvent.Unload e) { - if (!e.world.isRemote) return; - Set<ChunkPosition> set = index.remove(e.getChunk().getChunkCoordIntPair()); - if (set != null) - infos.keySet().removeAll(set); - } - - @SubscribeEvent - public void onWorldUnloaded(WorldEvent.Unload e) { - if (!e.world.isRemote) return; - infos.clear(); - index.clear(); - } - } - - private static class BlockInfo { - private final Block block; - private final int meta; - - public BlockInfo(Block block, int meta) { - this.block = block; - this.meta = meta; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - BlockInfo blockInfo = (BlockInfo) o; - - if (meta != blockInfo.meta) return false; - return block != null ? block.equals(blockInfo.block) : blockInfo.block == null; - } - - @Override - public int hashCode() { - int result = block != null ? block.hashCode() : 0; - result = 31 * result + meta; - return result; - } - } + private static final GT_RenderingWorld INSTANCE = new GT_RenderingWorld(); + /* + * I do not think this map would ever grow too huge, so I won't go too overcomplicated on this one + */ + private final Map<ChunkPosition, BlockInfo> infos = new HashMap<>(); + private final Map<ChunkCoordIntPair, Set<ChunkPosition>> index = new HashMap<>(); + private IBlockAccess mWorld = Minecraft.getMinecraft().theWorld; + + private GT_RenderingWorld() { + new FMLEventHandler(); + new ForgeEventHandler(); + } + + public static GT_RenderingWorld getInstance() { + return INSTANCE; + } + + public static GT_RenderingWorld getInstance(IBlockAccess aWorld) { + if (aWorld == INSTANCE) return INSTANCE; + if (aWorld == null) INSTANCE.mWorld = Minecraft.getMinecraft().theWorld; + else INSTANCE.mWorld = aWorld; + return INSTANCE; + } + + private void setWorld(IBlockAccess aWorld) { + if (aWorld == null) mWorld = Minecraft.getMinecraft().theWorld; + else mWorld = aWorld; + } + + public void register(int x, int y, int z, Block block, int meta) { + ChunkPosition key = new ChunkPosition(x, y, z); + infos.put(key, new BlockInfo(block, meta)); + index.computeIfAbsent(new ChunkCoordIntPair(x >> 4, z >> 4), p -> new HashSet<>()) + .add(key); + } + + public void unregister(int x, int y, int z, Block block, int meta) { + ChunkPosition key = new ChunkPosition(x, y, z); + if (infos.remove(key, new BlockInfo(block, meta))) { + ChunkCoordIntPair chunkKey = new ChunkCoordIntPair(x >> 4, z >> 4); + Set<ChunkPosition> set = index.get(chunkKey); + set.remove(key); + if (set.isEmpty()) index.remove(chunkKey); + } + } + + @Override + public Block getBlock(int p_147439_1_, int p_147439_2_, int p_147439_3_) { + BlockInfo blockInfo = infos.get(new ChunkPosition(p_147439_1_, p_147439_2_, p_147439_3_)); + return blockInfo != null ? blockInfo.block : mWorld.getBlock(p_147439_1_, p_147439_2_, p_147439_3_); + } + + @Override + public TileEntity getTileEntity(int p_147438_1_, int p_147438_2_, int p_147438_3_) { + return mWorld.getTileEntity(p_147438_1_, p_147438_2_, p_147438_3_); + } + + @Override + public int getLightBrightnessForSkyBlocks(int p_72802_1_, int p_72802_2_, int p_72802_3_, int p_72802_4_) { + return mWorld.getLightBrightnessForSkyBlocks(p_72802_1_, p_72802_2_, p_72802_3_, p_72802_4_); + } + + @Override + public int getBlockMetadata(int p_72805_1_, int p_72805_2_, int p_72805_3_) { + BlockInfo blockInfo = infos.get(new ChunkPosition(p_72805_1_, p_72805_2_, p_72805_3_)); + return blockInfo != null ? blockInfo.meta : mWorld.getBlockMetadata(p_72805_1_, p_72805_2_, p_72805_3_); + } + + @Override + public int isBlockProvidingPowerTo(int p_72879_1_, int p_72879_2_, int p_72879_3_, int p_72879_4_) { + return mWorld.isBlockProvidingPowerTo(p_72879_1_, p_72879_2_, p_72879_3_, p_72879_4_); + } + + @Override + public boolean isAirBlock(int p_147437_1_, int p_147437_2_, int p_147437_3_) { + return getBlock(p_147437_1_, p_147437_2_, p_147437_3_).isAir(mWorld, p_147437_1_, p_147437_2_, p_147437_3_); + } + + @Override + public BiomeGenBase getBiomeGenForCoords(int p_72807_1_, int p_72807_2_) { + return mWorld.getBiomeGenForCoords(p_72807_1_, p_72807_2_); + } + + @Override + public int getHeight() { + return mWorld.getHeight(); + } + + @Override + public boolean extendedLevelsInChunkCache() { + return mWorld.extendedLevelsInChunkCache(); + } + + @Override + public boolean isSideSolid(int x, int y, int z, ForgeDirection side, boolean _default) { + return getBlock(x, y, z).isSideSolid(this, x, y, z, side); + } + + public class FMLEventHandler { + public FMLEventHandler() { + FMLCommonHandler.instance().bus().register(this); + } + + @SubscribeEvent(priority = EventPriority.HIGHEST) + public void onRenderTickStart(TickEvent.RenderTickEvent e) { + if (e.phase == TickEvent.Phase.START) mWorld = Minecraft.getMinecraft().theWorld; + } + } + + public class ForgeEventHandler { + private ForgeEventHandler() { + MinecraftForge.EVENT_BUS.register(this); + } + + @SubscribeEvent + public void onChunkUnloaded(ChunkEvent.Unload e) { + if (!e.world.isRemote) return; + Set<ChunkPosition> set = index.remove(e.getChunk().getChunkCoordIntPair()); + if (set != null) infos.keySet().removeAll(set); + } + + @SubscribeEvent + public void onWorldUnloaded(WorldEvent.Unload e) { + if (!e.world.isRemote) return; + infos.clear(); + index.clear(); + } + } + + private static class BlockInfo { + private final Block block; + private final int meta; + + public BlockInfo(Block block, int meta) { + this.block = block; + this.meta = meta; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + BlockInfo blockInfo = (BlockInfo) o; + + if (meta != blockInfo.meta) return false; + return block != null ? block.equals(blockInfo.block) : blockInfo.block == null; + } + + @Override + public int hashCode() { + int result = block != null ? block.hashCode() : 0; + result = 31 * result + meta; + return result; + } + } } diff --git a/src/main/java/gregtech/api/util/GT_Shaped_Recipe.java b/src/main/java/gregtech/api/util/GT_Shaped_Recipe.java index 7ecabaffeb..ae8d804ee9 100644 --- a/src/main/java/gregtech/api/util/GT_Shaped_Recipe.java +++ b/src/main/java/gregtech/api/util/GT_Shaped_Recipe.java @@ -15,7 +15,14 @@ public class GT_Shaped_Recipe extends ShapedOreRecipe implements IGT_CraftingRec private final Enchantment[] mEnchantmentsAdded; private final int[] mEnchantmentLevelsAdded; - public GT_Shaped_Recipe(ItemStack aResult, boolean aDismantleAble, boolean aRemovableByGT, boolean aKeepingNBT, Enchantment[] aEnchantmentsAdded, int[] aEnchantmentLevelsAdded, Object... aRecipe) { + public GT_Shaped_Recipe( + ItemStack aResult, + boolean aDismantleAble, + boolean aRemovableByGT, + boolean aKeepingNBT, + Enchantment[] aEnchantmentsAdded, + int[] aEnchantmentLevelsAdded, + Object... aRecipe) { super(aResult, aRecipe); mEnchantmentsAdded = aEnchantmentsAdded; mEnchantmentLevelsAdded = aEnchantmentLevelsAdded; @@ -33,8 +40,10 @@ public class GT_Shaped_Recipe extends ShapedOreRecipe implements IGT_CraftingRec for (int i = 0; i < aGrid.getSizeInventory(); i++) { if (aGrid.getStackInSlot(i) != null) { if (tStack != null) { - if ((tStack.hasTagCompound() != aGrid.getStackInSlot(i).hasTagCompound()) || (tStack.hasTagCompound() && !tStack.getTagCompound().equals(aGrid.getStackInSlot(i).getTagCompound()))) - return false; + if ((tStack.hasTagCompound() != aGrid.getStackInSlot(i).hasTagCompound()) + || (tStack.hasTagCompound() + && !tStack.getTagCompound() + .equals(aGrid.getStackInSlot(i).getTagCompound()))) return false; } tStack = aGrid.getStackInSlot(i); } @@ -51,25 +60,33 @@ public class GT_Shaped_Recipe extends ShapedOreRecipe implements IGT_CraftingRec GT_Utility.updateItemStack(rStack); // Keeping NBT - if (mKeepingNBT) for (int i = 0; i < aGrid.getSizeInventory(); i++) { - if (aGrid.getStackInSlot(i) != null && aGrid.getStackInSlot(i).hasTagCompound()) { - rStack.setTagCompound((NBTTagCompound) aGrid.getStackInSlot(i).getTagCompound().copy()); - break; + if (mKeepingNBT) + for (int i = 0; i < aGrid.getSizeInventory(); i++) { + if (aGrid.getStackInSlot(i) != null + && aGrid.getStackInSlot(i).hasTagCompound()) { + rStack.setTagCompound((NBTTagCompound) + aGrid.getStackInSlot(i).getTagCompound().copy()); + break; + } } - } // Charge Values if (GT_ModHandler.isElectricItem(rStack)) { GT_ModHandler.dischargeElectricItem(rStack, Integer.MAX_VALUE, Integer.MAX_VALUE, true, false, true); int tCharge = 0; for (int i = 0; i < aGrid.getSizeInventory(); i++) - tCharge += GT_ModHandler.dischargeElectricItem(aGrid.getStackInSlot(i), Integer.MAX_VALUE, Integer.MAX_VALUE, true, true, true); + tCharge += GT_ModHandler.dischargeElectricItem( + aGrid.getStackInSlot(i), Integer.MAX_VALUE, Integer.MAX_VALUE, true, true, true); if (tCharge > 0) GT_ModHandler.chargeElectricItem(rStack, tCharge, Integer.MAX_VALUE, true, false); } // Add Enchantments for (int i = 0; i < mEnchantmentsAdded.length; i++) - GT_Utility.ItemNBT.addEnchantment(rStack, mEnchantmentsAdded[i], EnchantmentHelper.getEnchantmentLevel(mEnchantmentsAdded[i].effectId, rStack) + mEnchantmentLevelsAdded[i]); + GT_Utility.ItemNBT.addEnchantment( + rStack, + mEnchantmentsAdded[i], + EnchantmentHelper.getEnchantmentLevel(mEnchantmentsAdded[i].effectId, rStack) + + mEnchantmentLevelsAdded[i]); // Update the Stack again GT_Utility.updateItemStack(rStack); diff --git a/src/main/java/gregtech/api/util/GT_Shapeless_Recipe.java b/src/main/java/gregtech/api/util/GT_Shapeless_Recipe.java index 2718ea3efa..09d8730df5 100644 --- a/src/main/java/gregtech/api/util/GT_Shapeless_Recipe.java +++ b/src/main/java/gregtech/api/util/GT_Shapeless_Recipe.java @@ -15,13 +15,20 @@ public class GT_Shapeless_Recipe extends ShapelessOreRecipe implements IGT_Craft private final Enchantment[] mEnchantmentsAdded; private final int[] mEnchantmentLevelsAdded; - public GT_Shapeless_Recipe(ItemStack aResult, boolean aDismantleAble, boolean aRemovableByGT, boolean aKeepingNBT, Enchantment[] aEnchantmentsAdded, int[] aEnchantmentLevelsAdded, Object... aRecipe) { + public GT_Shapeless_Recipe( + ItemStack aResult, + boolean aDismantleAble, + boolean aRemovableByGT, + boolean aKeepingNBT, + Enchantment[] aEnchantmentsAdded, + int[] aEnchantmentLevelsAdded, + Object... aRecipe) { super(aResult, aRecipe); mEnchantmentsAdded = aEnchantmentsAdded; mEnchantmentLevelsAdded = aEnchantmentLevelsAdded; mRemovableByGT = aRemovableByGT; mKeepingNBT = aKeepingNBT; - if (aDismantleAble){ + if (aDismantleAble) { new ReverseShapelessRecipe(aResult, aRecipe); } } @@ -33,8 +40,10 @@ public class GT_Shapeless_Recipe extends ShapelessOreRecipe implements IGT_Craft for (int i = 0; i < aGrid.getSizeInventory(); i++) { if (aGrid.getStackInSlot(i) != null) { if (tStack != null) { - if ((tStack.hasTagCompound() != aGrid.getStackInSlot(i).hasTagCompound()) || (tStack.hasTagCompound() && !tStack.getTagCompound().equals(aGrid.getStackInSlot(i).getTagCompound()))) - return false; + if ((tStack.hasTagCompound() != aGrid.getStackInSlot(i).hasTagCompound()) + || (tStack.hasTagCompound() + && !tStack.getTagCompound() + .equals(aGrid.getStackInSlot(i).getTagCompound()))) return false; } tStack = aGrid.getStackInSlot(i); } @@ -51,41 +60,51 @@ public class GT_Shapeless_Recipe extends ShapelessOreRecipe implements IGT_Craft GT_Utility.updateItemStack(rStack); // Keeping NBT - if (mKeepingNBT) for (int i = 0; i < aGrid.getSizeInventory(); i++) { - if (aGrid.getStackInSlot(i) != null && aGrid.getStackInSlot(i).hasTagCompound()) { - rStack.setTagCompound((NBTTagCompound) aGrid.getStackInSlot(i).getTagCompound().copy()); - break; + if (mKeepingNBT) + for (int i = 0; i < aGrid.getSizeInventory(); i++) { + if (aGrid.getStackInSlot(i) != null + && aGrid.getStackInSlot(i).hasTagCompound()) { + rStack.setTagCompound((NBTTagCompound) + aGrid.getStackInSlot(i).getTagCompound().copy()); + break; + } } - } // Charge Values if (GT_ModHandler.isElectricItem(rStack)) { GT_ModHandler.dischargeElectricItem(rStack, Integer.MAX_VALUE, Integer.MAX_VALUE, true, false, true); int tCharge = 0; for (int i = 0; i < aGrid.getSizeInventory(); i++) - tCharge += GT_ModHandler.dischargeElectricItem(aGrid.getStackInSlot(i), Integer.MAX_VALUE, Integer.MAX_VALUE, true, true, true); + tCharge += GT_ModHandler.dischargeElectricItem( + aGrid.getStackInSlot(i), Integer.MAX_VALUE, Integer.MAX_VALUE, true, true, true); if (tCharge > 0) GT_ModHandler.chargeElectricItem(rStack, tCharge, Integer.MAX_VALUE, true, false); } // Saving Ingredients inside the Item. -// if (mDismantleable) { -// NBTTagCompound rNBT = rStack.getTagCompound(), tNBT = new NBTTagCompound(); -// if (rNBT == null) rNBT = new NBTTagCompound(); -// for (int i = 0; i < 9; i++) { -// ItemStack tStack = aGrid.getStackInSlot(i); -// if (tStack != null && GT_Utility.getContainerItem(tStack, true) == null && !(tStack.getItem() instanceof GT_MetaGenerated_Tool)) { -// tStack = GT_Utility.copyAmount(1, tStack); -// GT_ModHandler.dischargeElectricItem(tStack, Integer.MAX_VALUE, Integer.MAX_VALUE, true, false, true); -// tNBT.setTag("Ingredient." + i, tStack.writeToNBT(new NBTTagCompound())); -// } -// } -// rNBT.setTag("GT.CraftingComponents", tNBT); -// rStack.setTagCompound(rNBT); -// } + // if (mDismantleable) { + // NBTTagCompound rNBT = rStack.getTagCompound(), tNBT = new NBTTagCompound(); + // if (rNBT == null) rNBT = new NBTTagCompound(); + // for (int i = 0; i < 9; i++) { + // ItemStack tStack = aGrid.getStackInSlot(i); + // if (tStack != null && GT_Utility.getContainerItem(tStack, true) == null && + // !(tStack.getItem() instanceof GT_MetaGenerated_Tool)) { + // tStack = GT_Utility.copyAmount(1, tStack); + // GT_ModHandler.dischargeElectricItem(tStack, Integer.MAX_VALUE, Integer.MAX_VALUE, + // true, false, true); + // tNBT.setTag("Ingredient." + i, tStack.writeToNBT(new NBTTagCompound())); + // } + // } + // rNBT.setTag("GT.CraftingComponents", tNBT); + // rStack.setTagCompound(rNBT); + // } // Add Enchantments for (int i = 0; i < mEnchantmentsAdded.length; i++) - GT_Utility.ItemNBT.addEnchantment(rStack, mEnchantmentsAdded[i], EnchantmentHelper.getEnchantmentLevel(mEnchantmentsAdded[i].effectId, rStack) + mEnchantmentLevelsAdded[i]); + GT_Utility.ItemNBT.addEnchantment( + rStack, + mEnchantmentsAdded[i], + EnchantmentHelper.getEnchantmentLevel(mEnchantmentsAdded[i].effectId, rStack) + + mEnchantmentLevelsAdded[i]); // Update the Stack again GT_Utility.updateItemStack(rStack); diff --git a/src/main/java/gregtech/api/util/GT_Single_Recipe_Check.java b/src/main/java/gregtech/api/util/GT_Single_Recipe_Check.java index 0be96a2e05..5ff631fad6 100644 --- a/src/main/java/gregtech/api/util/GT_Single_Recipe_Check.java +++ b/src/main/java/gregtech/api/util/GT_Single_Recipe_Check.java @@ -3,13 +3,12 @@ package gregtech.api.util; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; - import java.util.HashMap; import java.util.List; import java.util.Map; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; /** Used by machines that are locked to a single recipe, for fast computation. */ public class GT_Single_Recipe_Check { @@ -31,8 +30,10 @@ public class GT_Single_Recipe_Check { this.itemCost = itemCost; this.fluidCost = fluidCost; - this.totalItemCost = itemCost.values().stream().mapToInt(Integer::intValue).sum(); - this.totalFluidCost = fluidCost.values().stream().mapToInt(Integer::intValue).sum(); + this.totalItemCost = + itemCost.values().stream().mapToInt(Integer::intValue).sum(); + this.totalFluidCost = + fluidCost.values().stream().mapToInt(Integer::intValue).sum(); } public GT_Recipe getRecipe() { @@ -51,7 +52,8 @@ public class GT_Single_Recipe_Check { itemMap = new HashMap<>(); for (ItemStack itemStack : multiBlockBase.getStoredInputs()) { itemMap.merge( - GT_Utility.ItemId.createNoCopy(itemStack), itemStack, + GT_Utility.ItemId.createNoCopy(itemStack), + itemStack, (a, b) -> a.stackSize >= b.stackSize ? a : b); } @@ -67,9 +69,7 @@ public class GT_Single_Recipe_Check { if (totalFluidCost > 0) { fluidMap = new HashMap<>(); for (FluidStack fluidStack : multiBlockBase.getStoredFluids()) { - fluidMap.merge( - fluidStack.getFluid(), fluidStack, - (a, b) -> a.amount >= b.amount ? a : b); + fluidMap.merge(fluidStack.getFluid(), fluidStack, (a, b) -> a.amount >= b.amount ? a : b); } for (Map.Entry<Fluid, Integer> entry : fluidCost.entrySet()) { @@ -173,8 +173,7 @@ public class GT_Single_Recipe_Check { return true; } - protected static Map<GT_Utility.ItemId, Integer> buildItemMap( - GT_MetaTileEntity_MultiBlockBase multiBlockBase) { + protected static Map<GT_Utility.ItemId, Integer> buildItemMap(GT_MetaTileEntity_MultiBlockBase multiBlockBase) { Map<GT_Utility.ItemId, Integer> itemMap = new HashMap<>(); for (ItemStack itemStack : multiBlockBase.getStoredInputs()) { itemMap.merge(GT_Utility.ItemId.create(itemStack), itemStack.stackSize, Integer::sum); @@ -182,8 +181,7 @@ public class GT_Single_Recipe_Check { return itemMap; } - protected static Map<Fluid, Integer> buildFluidMap( - GT_MetaTileEntity_MultiBlockBase multiBlockBase) { + protected static Map<Fluid, Integer> buildFluidMap(GT_MetaTileEntity_MultiBlockBase multiBlockBase) { Map<Fluid, Integer> fluidMap = new HashMap<>(); for (FluidStack fluidStack : multiBlockBase.getStoredFluids()) { fluidMap.merge(fluidStack.getFluid(), fluidStack.amount, Integer::sum); @@ -251,6 +249,4 @@ public class GT_Single_Recipe_Check { multiBlockBase, recipe, itemCostBuilder.build(), fluidCostBuilder.build()); } } - - } diff --git a/src/main/java/gregtech/api/util/GT_Single_Recipe_Check_Processing_Array.java b/src/main/java/gregtech/api/util/GT_Single_Recipe_Check_Processing_Array.java index 871cb642c4..585460842d 100644 --- a/src/main/java/gregtech/api/util/GT_Single_Recipe_Check_Processing_Array.java +++ b/src/main/java/gregtech/api/util/GT_Single_Recipe_Check_Processing_Array.java @@ -2,14 +2,13 @@ package gregtech.api.util; import com.google.common.collect.ImmutableMap; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; - import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; /** Processing Array-specialized version of {@link gregtech.api.util.GT_Single_Recipe_Check}. */ public class GT_Single_Recipe_Check_Processing_Array extends GT_Single_Recipe_Check { @@ -94,12 +93,8 @@ public class GT_Single_Recipe_Check_Processing_Array extends GT_Single_Recipe_Ch if (consumeInputs) { if (totalItemCost > 0) { int remainingItemCost = totalItemCost * finalParallel; - Map<GT_Utility.ItemId, Integer> runningItemCost = - itemCost.entrySet().stream() - .collect( - Collectors.toMap( - Map.Entry::getKey, - entry -> entry.getValue() * finalParallel)); + Map<GT_Utility.ItemId, Integer> runningItemCost = itemCost.entrySet().stream() + .collect(Collectors.toMap(Map.Entry::getKey, entry -> entry.getValue() * finalParallel)); for (ItemStack itemStack : items) { GT_Utility.ItemId key = GT_Utility.ItemId.createNoCopy(itemStack); @@ -117,12 +112,8 @@ public class GT_Single_Recipe_Check_Processing_Array extends GT_Single_Recipe_Ch if (totalFluidCost > 0) { int remainingFluidCost = totalFluidCost * finalParallel; - Map<Fluid, Integer> runningFluidCost = - fluidCost.entrySet().stream() - .collect( - Collectors.toMap( - Map.Entry::getKey, - entry -> entry.getValue() * finalParallel)); + Map<Fluid, Integer> runningFluidCost = fluidCost.entrySet().stream() + .collect(Collectors.toMap(Map.Entry::getKey, entry -> entry.getValue() * finalParallel)); for (FluidStack fluidStack : fluids) { Fluid key = fluidStack.getFluid(); @@ -205,8 +196,12 @@ public class GT_Single_Recipe_Check_Processing_Array extends GT_Single_Recipe_Ch } return new GT_Single_Recipe_Check_Processing_Array( - multiBlockBase, recipe, itemCostBuilder.build(), fluidCostBuilder.build(), - recipeAmperage, multiBlockBase.mInventory[1].copy()); + multiBlockBase, + recipe, + itemCostBuilder.build(), + fluidCostBuilder.build(), + recipeAmperage, + multiBlockBase.mInventory[1].copy()); } } } diff --git a/src/main/java/gregtech/api/util/GT_SpawnEventHandler.java b/src/main/java/gregtech/api/util/GT_SpawnEventHandler.java index 9edb64a196..38c43da7c2 100644 --- a/src/main/java/gregtech/api/util/GT_SpawnEventHandler.java +++ b/src/main/java/gregtech/api/util/GT_SpawnEventHandler.java @@ -4,15 +4,14 @@ import cpw.mods.fml.common.eventhandler.Event; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import gregtech.api.metatileentity.BaseMetaTileEntity; import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_MonsterRepellent; +import java.util.List; +import java.util.concurrent.CopyOnWriteArrayList; import net.minecraft.entity.EnumCreatureType; import net.minecraft.entity.monster.EntitySlime; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.LivingSpawnEvent.CheckSpawn; -import java.util.List; -import java.util.concurrent.CopyOnWriteArrayList; - public class GT_SpawnEventHandler { public static volatile List<int[]> mobReps = new CopyOnWriteArrayList<>(); @@ -23,8 +22,9 @@ public class GT_SpawnEventHandler { @SubscribeEvent public void denyMobSpawn(CheckSpawn event) { - if (event.entityLiving instanceof EntitySlime && !(((EntitySlime) event.entityLiving).getCustomNameTag().length() > 0)) { - if(event.getResult() == Event.Result.ALLOW) event.setResult(Event.Result.DEFAULT); + if (event.entityLiving instanceof EntitySlime + && !(((EntitySlime) event.entityLiving).getCustomNameTag().length() > 0)) { + if (event.getResult() == Event.Result.ALLOW) event.setResult(Event.Result.DEFAULT); } if (event.getResult() == Event.Result.ALLOW) { @@ -35,13 +35,17 @@ public class GT_SpawnEventHandler { for (int[] rep : mobReps) { if (rep[3] == event.entity.worldObj.provider.dimensionId) { TileEntity tTile = event.entity.worldObj.getTileEntity(rep[0], rep[1], rep[2]); - if (tTile instanceof BaseMetaTileEntity && ((BaseMetaTileEntity) tTile).getMetaTileEntity() instanceof GT_MetaTileEntity_MonsterRepellent) { - int r = ((GT_MetaTileEntity_MonsterRepellent) ((BaseMetaTileEntity) tTile).getMetaTileEntity()).mRange; + if (tTile instanceof BaseMetaTileEntity + && ((BaseMetaTileEntity) tTile).getMetaTileEntity() + instanceof GT_MetaTileEntity_MonsterRepellent) { + int r = ((GT_MetaTileEntity_MonsterRepellent) ((BaseMetaTileEntity) tTile).getMetaTileEntity()) + .mRange; double dx = rep[0] + 0.5F - event.entity.posX; double dy = rep[1] + 0.5F - event.entity.posY; double dz = rep[2] + 0.5F - event.entity.posZ; if ((dx * dx + dz * dz + dy * dy) <= Math.pow(r, 2)) { - if(event.entityLiving instanceof EntitySlime) ((EntitySlime) event.entityLiving).setCustomNameTag("DoNotSpawnSlimes"); + if (event.entityLiving instanceof EntitySlime) + ((EntitySlime) event.entityLiving).setCustomNameTag("DoNotSpawnSlimes"); event.setResult(Event.Result.DENY); } } diff --git a/src/main/java/gregtech/api/util/GT_StructureUtility.java b/src/main/java/gregtech/api/util/GT_StructureUtility.java index dc3112621e..ef7724db0a 100644 --- a/src/main/java/gregtech/api/util/GT_StructureUtility.java +++ b/src/main/java/gregtech/api/util/GT_StructureUtility.java @@ -15,11 +15,13 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.BaseMetaPipeEntity; import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Frame; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; import gregtech.common.blocks.GT_Block_Casings5; import gregtech.common.blocks.GT_Item_Machines; +import java.util.Arrays; +import java.util.List; +import java.util.function.*; +import javax.annotation.Nonnull; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.init.Items; @@ -32,11 +34,6 @@ import net.minecraft.util.IChatComponent; import net.minecraft.util.IIcon; import net.minecraft.world.World; -import javax.annotation.Nonnull; -import java.util.Arrays; -import java.util.List; -import java.util.function.*; - public class GT_StructureUtility { // private static final Map<Class<?>, String> customNames = new HashMap<>(); private GT_StructureUtility() { @@ -47,7 +44,8 @@ public class GT_StructureUtility { return aTile != null && clazz.isInstance(aTile.getMetaTileEntity()); } - public static <T> IStructureElementNoPlacement<T> ofHatchAdder(IGT_HatchAdder<T> aHatchAdder, int aTextureIndex, int aDots) { + public static <T> IStructureElementNoPlacement<T> ofHatchAdder( + IGT_HatchAdder<T> aHatchAdder, int aTextureIndex, int aDots) { return ofHatchAdder(aHatchAdder, aTextureIndex, StructureLibAPI.getBlockHint(), aDots - 1); } @@ -85,16 +83,37 @@ public class GT_StructureUtility { if (!GT_Utility.isStackValid(tFrameStack) || !(tFrameStack.getItem() instanceof ItemBlock)) return false; ItemBlock tFrameStackItem = (ItemBlock) tFrameStack.getItem(); - return tFrameStackItem.placeBlockAt(tFrameStack, null, world, x, y, z, 6, 0, 0, 0, Items.feather.getDamage(tFrameStack)); + return tFrameStackItem.placeBlockAt( + tFrameStack, null, world, x, y, z, 6, 0, 0, 0, Items.feather.getDamage(tFrameStack)); } @Override - public PlaceResult survivalPlaceBlock(T t, World world, int x, int y, int z, ItemStack trigger, IItemSource s, EntityPlayerMP actor, Consumer<IChatComponent> chatter) { + public PlaceResult survivalPlaceBlock( + T t, + World world, + int x, + int y, + int z, + ItemStack trigger, + IItemSource s, + EntityPlayerMP actor, + Consumer<IChatComponent> chatter) { if (check(t, world, x, y, z)) return PlaceResult.SKIP; ItemStack tFrameStack = GT_OreDictUnificator.get(OrePrefixes.frameGt, aFrameMaterial, 1); if (!GT_Utility.isStackValid(tFrameStack) || !(tFrameStack.getItem() instanceof ItemBlock)) return PlaceResult.REJECT; // honestly, this is more like a programming error or pack issue - return StructureUtility.survivalPlaceBlock(tFrameStack, ItemStackPredicate.NBTMode.IGNORE_KNOWN_INSIGNIFICANT_TAGS, null, false, world, x, y, z, s, actor, chatter); + return StructureUtility.survivalPlaceBlock( + tFrameStack, + ItemStackPredicate.NBTMode.IGNORE_KNOWN_INSIGNIFICANT_TAGS, + null, + false, + world, + x, + y, + z, + s, + actor, + chatter); } }; } @@ -110,7 +129,8 @@ public class GT_StructureUtility { return GT_HatchElementBuilder.builder(); } - public static <T> IStructureElementNoPlacement<T> ofHatchAdder(IGT_HatchAdder<T> aHatchAdder, int aTextureIndex, Block aHintBlock, int aHintMeta) { + public static <T> IStructureElementNoPlacement<T> ofHatchAdder( + IGT_HatchAdder<T> aHatchAdder, int aTextureIndex, Block aHintBlock, int aHintMeta) { if (aHatchAdder == null || aHintBlock == null) { throw new IllegalArgumentException(); } @@ -118,7 +138,8 @@ public class GT_StructureUtility { @Override public boolean check(T t, World world, int x, int y, int z) { TileEntity tileEntity = world.getTileEntity(x, y, z); - return tileEntity instanceof IGregTechTileEntity && aHatchAdder.apply(t, (IGregTechTileEntity) tileEntity, (short) aTextureIndex); + return tileEntity instanceof IGregTechTileEntity + && aHatchAdder.apply(t, (IGregTechTileEntity) tileEntity, (short) aTextureIndex); } @Override @@ -129,7 +150,14 @@ public class GT_StructureUtility { }; } - public static <T> IStructureElement<T> ofHatchAdder(IGT_HatchAdder<T> aHatchAdder, int aTextureIndex, Block aHintBlock, int aHintMeta, BiPredicate<T, IGregTechTileEntity> shouldSkip, Function<T, Class<? extends IMetaTileEntity>> aMetaId, final IStructureElement.PlaceResult acceptType) { + public static <T> IStructureElement<T> ofHatchAdder( + IGT_HatchAdder<T> aHatchAdder, + int aTextureIndex, + Block aHintBlock, + int aHintMeta, + BiPredicate<T, IGregTechTileEntity> shouldSkip, + Function<T, Class<? extends IMetaTileEntity>> aMetaId, + final IStructureElement.PlaceResult acceptType) { if (aHatchAdder == null) { throw new IllegalArgumentException(); } @@ -137,7 +165,8 @@ public class GT_StructureUtility { @Override public boolean check(T t, World world, int x, int y, int z) { TileEntity tileEntity = world.getTileEntity(x, y, z); - return tileEntity instanceof IGregTechTileEntity && aHatchAdder.apply(t, (IGregTechTileEntity) tileEntity, (short) aTextureIndex); + return tileEntity instanceof IGregTechTileEntity + && aHatchAdder.apply(t, (IGregTechTileEntity) tileEntity, (short) aTextureIndex); } @Override @@ -153,29 +182,45 @@ public class GT_StructureUtility { } @Override - public PlaceResult survivalPlaceBlock(T t, World world, int x, int y, int z, ItemStack trigger, IItemSource s, EntityPlayerMP actor, Consumer<IChatComponent> chatter) { + public PlaceResult survivalPlaceBlock( + T t, + World world, + int x, + int y, + int z, + ItemStack trigger, + IItemSource s, + EntityPlayerMP actor, + Consumer<IChatComponent> chatter) { if (shouldSkip != null) { TileEntity tileEntity = world.getTileEntity(x, y, z); - if (tileEntity instanceof IGregTechTileEntity && shouldSkip.test(t, (IGregTechTileEntity) tileEntity)) - return PlaceResult.SKIP; + if (tileEntity instanceof IGregTechTileEntity + && shouldSkip.test(t, (IGregTechTileEntity) tileEntity)) return PlaceResult.SKIP; } - if (!StructureLibAPI.isBlockTriviallyReplaceable(world, x, y, z, actor)) - return PlaceResult.REJECT; + if (!StructureLibAPI.isBlockTriviallyReplaceable(world, x, y, z, actor)) return PlaceResult.REJECT; Class<? extends IMetaTileEntity> clazz = aMetaId.apply(t); if (clazz == null) return PlaceResult.REJECT; ItemStack taken = s.takeOne(is -> clazz.isInstance(GT_Item_Machines.getMetaTileEntity(is)), true); if (GT_Utility.isStackInvalid(taken)) { - chatter.accept(new ChatComponentTranslation("GT5U.autoplace.error.no_mte.class_name", clazz.getSimpleName())); + chatter.accept(new ChatComponentTranslation( + "GT5U.autoplace.error.no_mte.class_name", clazz.getSimpleName())); return PlaceResult.REJECT; } - if (StructureUtility.survivalPlaceBlock(taken, ItemStackPredicate.NBTMode.IGNORE, null, true, world, x, y, z, s, actor) == PlaceResult.ACCEPT) - return acceptType; + if (StructureUtility.survivalPlaceBlock( + taken, ItemStackPredicate.NBTMode.IGNORE, null, true, world, x, y, z, s, actor) + == PlaceResult.ACCEPT) return acceptType; return PlaceResult.REJECT; } }; } - public static <T> IStructureElement<T> ofHatchAdder(IGT_HatchAdder<T> aHatchAdder, int aTextureIndex, Block aHintBlock, int aHintMeta, BiPredicate<T, IGregTechTileEntity> shouldSkip, ToIntFunction<T> aMetaId) { + public static <T> IStructureElement<T> ofHatchAdder( + IGT_HatchAdder<T> aHatchAdder, + int aTextureIndex, + Block aHintBlock, + int aHintMeta, + BiPredicate<T, IGregTechTileEntity> shouldSkip, + ToIntFunction<T> aMetaId) { if (aHatchAdder == null) { throw new IllegalArgumentException(); } @@ -183,7 +228,8 @@ public class GT_StructureUtility { @Override public boolean check(T t, World world, int x, int y, int z) { TileEntity tileEntity = world.getTileEntity(x, y, z); - return tileEntity instanceof IGregTechTileEntity && aHatchAdder.apply(t, (IGregTechTileEntity) tileEntity, (short) aTextureIndex); + return tileEntity instanceof IGregTechTileEntity + && aHatchAdder.apply(t, (IGregTechTileEntity) tileEntity, (short) aTextureIndex); } @Override @@ -199,14 +245,22 @@ public class GT_StructureUtility { } @Override - public PlaceResult survivalPlaceBlock(T t, World world, int x, int y, int z, ItemStack trigger, IItemSource s, EntityPlayerMP actor, Consumer<IChatComponent> chatter) { + public PlaceResult survivalPlaceBlock( + T t, + World world, + int x, + int y, + int z, + ItemStack trigger, + IItemSource s, + EntityPlayerMP actor, + Consumer<IChatComponent> chatter) { if (shouldSkip != null) { TileEntity tileEntity = world.getTileEntity(x, y, z); - if (tileEntity instanceof IGregTechTileEntity && shouldSkip.test(t, (IGregTechTileEntity) tileEntity)) - return PlaceResult.SKIP; + if (tileEntity instanceof IGregTechTileEntity + && shouldSkip.test(t, (IGregTechTileEntity) tileEntity)) return PlaceResult.SKIP; } - if (!StructureLibAPI.isBlockTriviallyReplaceable(world, x, y, z, actor)) - return PlaceResult.REJECT; + if (!StructureLibAPI.isBlockTriviallyReplaceable(world, x, y, z, actor)) return PlaceResult.REJECT; GT_Item_Machines item = (GT_Item_Machines) Item.getItemFromBlock(GregTech_API.sBlockMachines); int meta = aMetaId.applyAsInt(t); if (meta < 0) return PlaceResult.REJECT; @@ -215,16 +269,28 @@ public class GT_StructureUtility { chatter.accept(new ChatComponentTranslation("GT5U.autoplace.error.no_mte.id", meta)); return PlaceResult.REJECT; } - return StructureUtility.survivalPlaceBlock(taken, ItemStackPredicate.NBTMode.IGNORE, null, true, world, x, y, z, s, actor) == PlaceResult.ACCEPT ? PlaceResult.ACCEPT_STOP : PlaceResult.REJECT; + return StructureUtility.survivalPlaceBlock( + taken, ItemStackPredicate.NBTMode.IGNORE, null, true, world, x, y, z, s, actor) + == PlaceResult.ACCEPT + ? PlaceResult.ACCEPT_STOP + : PlaceResult.REJECT; } }; } - public static <T> IStructureElement<T> ofHatchAdderOptional(IGT_HatchAdder<T> aHatchAdder, int textureIndex, int dots, Block placeCasing, int placeCasingMeta) { - return ofHatchAdderOptional(aHatchAdder, textureIndex, StructureLibAPI.getBlockHint(), dots - 1, placeCasing, placeCasingMeta); + public static <T> IStructureElement<T> ofHatchAdderOptional( + IGT_HatchAdder<T> aHatchAdder, int textureIndex, int dots, Block placeCasing, int placeCasingMeta) { + return ofHatchAdderOptional( + aHatchAdder, textureIndex, StructureLibAPI.getBlockHint(), dots - 1, placeCasing, placeCasingMeta); } - public static <T> IStructureElement<T> ofHatchAdderOptional(IGT_HatchAdder<T> aHatchAdder, int aTextureIndex, Block aHintBlock, int hintMeta, Block placeCasing, int placeCasingMeta) { + public static <T> IStructureElement<T> ofHatchAdderOptional( + IGT_HatchAdder<T> aHatchAdder, + int aTextureIndex, + Block aHintBlock, + int hintMeta, + Block placeCasing, + int placeCasingMeta) { if (aHatchAdder == null || aHintBlock == null) { throw new IllegalArgumentException(); } @@ -233,9 +299,9 @@ public class GT_StructureUtility { public boolean check(T t, World world, int x, int y, int z) { TileEntity tileEntity = world.getTileEntity(x, y, z); Block worldBlock = world.getBlock(x, y, z); - return (tileEntity instanceof IGregTechTileEntity && - aHatchAdder.apply(t, (IGregTechTileEntity) tileEntity, (short) aTextureIndex)) || - (worldBlock == placeCasing && worldBlock.getDamageValue(world, x, y, z) == placeCasingMeta); + return (tileEntity instanceof IGregTechTileEntity + && aHatchAdder.apply(t, (IGregTechTileEntity) tileEntity, (short) aTextureIndex)) + || (worldBlock == placeCasing && worldBlock.getDamageValue(world, x, y, z) == placeCasingMeta); } @Override @@ -251,9 +317,19 @@ public class GT_StructureUtility { } @Override - public PlaceResult survivalPlaceBlock(T t, World world, int x, int y, int z, ItemStack trigger, IItemSource s, EntityPlayerMP actor, Consumer<IChatComponent> chatter) { + public PlaceResult survivalPlaceBlock( + T t, + World world, + int x, + int y, + int z, + ItemStack trigger, + IItemSource s, + EntityPlayerMP actor, + Consumer<IChatComponent> chatter) { if (check(t, world, x, y, z)) return PlaceResult.SKIP; - return StructureUtility.survivalPlaceBlock(placeCasing, placeCasingMeta, world, x, y, z, s, actor, chatter); + return StructureUtility.survivalPlaceBlock( + placeCasing, placeCasingMeta, world, x, y, z, s, actor, chatter); } }; } @@ -263,11 +339,14 @@ public class GT_StructureUtility { * * @see #ofCoil(BiPredicate, Function) */ - public static <T> IStructureElement<T> ofCoil(BiConsumer<T, HeatingCoilLevel> aHeatingCoilSetter, Function<T, HeatingCoilLevel> aHeatingCoilGetter) { - return ofCoil((t, l) -> { - aHeatingCoilSetter.accept(t, l); - return true; - }, aHeatingCoilGetter); + public static <T> IStructureElement<T> ofCoil( + BiConsumer<T, HeatingCoilLevel> aHeatingCoilSetter, Function<T, HeatingCoilLevel> aHeatingCoilGetter) { + return ofCoil( + (t, l) -> { + aHeatingCoilSetter.accept(t, l); + return true; + }, + aHeatingCoilGetter); } /** @@ -279,7 +358,8 @@ public class GT_StructureUtility { * If the setter returns false then it assumes the coil is rejected. * @param aHeatingCoilGetter Get the current heating level. Null means no coil recorded yet. */ - public static <T> IStructureElement<T> ofCoil(BiPredicate<T, HeatingCoilLevel> aHeatingCoilSetter, Function<T, HeatingCoilLevel> aHeatingCoilGetter) { + public static <T> IStructureElement<T> ofCoil( + BiPredicate<T, HeatingCoilLevel> aHeatingCoilSetter, Function<T, HeatingCoilLevel> aHeatingCoilGetter) { if (aHeatingCoilSetter == null || aHeatingCoilGetter == null) { throw new IllegalArgumentException(); } @@ -287,10 +367,9 @@ public class GT_StructureUtility { @Override public boolean check(T t, World world, int x, int y, int z) { Block block = world.getBlock(x, y, z); - if (!(block instanceof IHeatingCoil)) - return false; + if (!(block instanceof IHeatingCoil)) return false; HeatingCoilLevel existingLevel = aHeatingCoilGetter.apply(t), - newLevel = ((IHeatingCoil) block).getCoilHeat(world.getBlockMetadata(x, y, z)); + newLevel = ((IHeatingCoil) block).getCoilHeat(world.getBlockMetadata(x, y, z)); if (existingLevel == null || existingLevel == HeatingCoilLevel.None) { return aHeatingCoilSetter.test(t, newLevel); } else { @@ -309,7 +388,8 @@ public class GT_StructureUtility { } private HeatingCoilLevel getHeatFromHint(ItemStack trigger) { - return HeatingCoilLevel.getFromTier((byte) Math.min(HeatingCoilLevel.getMaxTier() , Math.max(0, trigger.stackSize - 1))); + return HeatingCoilLevel.getFromTier( + (byte) Math.min(HeatingCoilLevel.getMaxTier(), Math.max(0, trigger.stackSize - 1))); } @Override @@ -318,11 +398,23 @@ public class GT_StructureUtility { } @Override - public PlaceResult survivalPlaceBlock(T t, World world, int x, int y, int z, ItemStack trigger, IItemSource s, EntityPlayerMP actor, Consumer<IChatComponent> chatter) { + public PlaceResult survivalPlaceBlock( + T t, + World world, + int x, + int y, + int z, + ItemStack trigger, + IItemSource s, + EntityPlayerMP actor, + Consumer<IChatComponent> chatter) { Block block = world.getBlock(x, y, z); - boolean isCoil = block instanceof IHeatingCoil && ((IHeatingCoil) block).getCoilHeat(world.getBlockMetadata(x, y, z)) == getHeatFromHint(trigger); + boolean isCoil = block instanceof IHeatingCoil + && ((IHeatingCoil) block).getCoilHeat(world.getBlockMetadata(x, y, z)) + == getHeatFromHint(trigger); if (isCoil) return PlaceResult.SKIP; - return StructureUtility.survivalPlaceBlock(GregTech_API.sBlockCasings5, getMetaFromHint(trigger), world, x, y, z, s, actor, chatter); + return StructureUtility.survivalPlaceBlock( + GregTech_API.sBlockCasings5, getMetaFromHint(trigger), world, x, y, z, s, actor, chatter); } }; } @@ -339,9 +431,9 @@ public class GT_StructureUtility { public static Predicate<ItemStack> filterByMTETier(int aMinTier, int aMaxTier) { return is -> { IMetaTileEntity tile = GT_Item_Machines.getMetaTileEntity(is); - return tile instanceof GT_MetaTileEntity_TieredMachineBlock && - ((GT_MetaTileEntity_TieredMachineBlock) tile).mTier <= aMaxTier && - ((GT_MetaTileEntity_TieredMachineBlock) tile).mTier >= aMinTier; + return tile instanceof GT_MetaTileEntity_TieredMachineBlock + && ((GT_MetaTileEntity_TieredMachineBlock) tile).mTier <= aMaxTier + && ((GT_MetaTileEntity_TieredMachineBlock) tile).mTier >= aMinTier; }; } } diff --git a/src/main/java/gregtech/api/util/GT_ToolHarvestHelper.java b/src/main/java/gregtech/api/util/GT_ToolHarvestHelper.java index 271b361da0..7416289c79 100644 --- a/src/main/java/gregtech/api/util/GT_ToolHarvestHelper.java +++ b/src/main/java/gregtech/api/util/GT_ToolHarvestHelper.java @@ -1,61 +1,57 @@ -package gregtech.api.util;
-
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-
-public class GT_ToolHarvestHelper {
-
- public static boolean isAppropriateTool(Block aBlock, byte aMetaData, String... tTools) {
-
- if (aBlock == null || tTools == null) {
- return false;
- }
- String targetTool = aBlock.getHarvestTool(aMetaData);
- return !isStringEmpty(targetTool) && isArrayContains(targetTool, tTools);
- }
-
- public static boolean isAppropriateMaterial(Block aBlock, Material... tMats) {
- if (aBlock == null || tMats == null) {
- return false;
- }
- return isArrayContains(aBlock.getMaterial(), tMats);
- }
-
-
- public static boolean isSpecialBlock(Block aBlock, Block... tBlocks) {
- if (aBlock == null || tBlocks == null) {
- return false;
- }
- return isArrayContains(aBlock, tBlocks);
- }
-
-
- public static <T> boolean isArrayContains(T obj, T[] list) {
-
- if (obj == null || list == null) {
- return false;
- }
-
- for (T iObj : list) {
- if (obj == iObj || obj.equals(iObj)) {
- return true;
- }
- }
- return false;
- }
-
- public static boolean isStringEmpty(String s) {
- return s == null || s.length() == 0;
- }
-
- public static boolean hasNull(Object... obj) {
- for (Object iObj : obj) {
- if (iObj == null) {
- return true;
- }
- }
- return false;
- }
-
-
-}
+package gregtech.api.util; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; + +public class GT_ToolHarvestHelper { + + public static boolean isAppropriateTool(Block aBlock, byte aMetaData, String... tTools) { + + if (aBlock == null || tTools == null) { + return false; + } + String targetTool = aBlock.getHarvestTool(aMetaData); + return !isStringEmpty(targetTool) && isArrayContains(targetTool, tTools); + } + + public static boolean isAppropriateMaterial(Block aBlock, Material... tMats) { + if (aBlock == null || tMats == null) { + return false; + } + return isArrayContains(aBlock.getMaterial(), tMats); + } + + public static boolean isSpecialBlock(Block aBlock, Block... tBlocks) { + if (aBlock == null || tBlocks == null) { + return false; + } + return isArrayContains(aBlock, tBlocks); + } + + public static <T> boolean isArrayContains(T obj, T[] list) { + + if (obj == null || list == null) { + return false; + } + + for (T iObj : list) { + if (obj == iObj || obj.equals(iObj)) { + return true; + } + } + return false; + } + + public static boolean isStringEmpty(String s) { + return s == null || s.length() == 0; + } + + public static boolean hasNull(Object... obj) { + for (Object iObj : obj) { + if (iObj == null) { + return true; + } + } + return false; + } +} diff --git a/src/main/java/gregtech/api/util/GT_TooltipDataCache.java b/src/main/java/gregtech/api/util/GT_TooltipDataCache.java index 4309958b82..15f7b69248 100644 --- a/src/main/java/gregtech/api/util/GT_TooltipDataCache.java +++ b/src/main/java/gregtech/api/util/GT_TooltipDataCache.java @@ -1,11 +1,10 @@ package gregtech.api.util; +import gregtech.GT_Mod; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; - -import gregtech.GT_Mod; import net.minecraft.util.StatCollector; public class GT_TooltipDataCache { @@ -19,6 +18,7 @@ public class GT_TooltipDataCache { this.shiftText = shiftText; } } + private final Map<String, TooltipData> fetchedTooltipData = new HashMap<>(); /** @@ -48,14 +48,16 @@ public class GT_TooltipDataCache { List<String> lines = getAllLines(key, args); int normalLines = lines.size(); if (Math.max(GT_Mod.gregtechproxy.mTooltipVerbosity, GT_Mod.gregtechproxy.mTooltipShiftVerbosity) >= 3) { - lines.addAll(getAllLines(key + ".extended", args)); // Are extended lines enabled? If so add them to the lines + lines.addAll( + getAllLines(key + ".extended", args)); // Are extended lines enabled? If so add them to the lines } if (lines.size() == 0) { lines.add(key); // Fallback in case no lines could be found at all } return new TooltipData( - lines.subList(0, getVerbosityIndex(GT_Mod.gregtechproxy.mTooltipVerbosity, normalLines, lines.size())), - lines.subList(0, getVerbosityIndex(GT_Mod.gregtechproxy.mTooltipShiftVerbosity, normalLines, lines.size()))); + lines.subList(0, getVerbosityIndex(GT_Mod.gregtechproxy.mTooltipVerbosity, normalLines, lines.size())), + lines.subList( + 0, getVerbosityIndex(GT_Mod.gregtechproxy.mTooltipShiftVerbosity, normalLines, lines.size()))); } /** @@ -65,7 +67,7 @@ public class GT_TooltipDataCache { * @param args arguments for string formatting (prefer using positional arguments) * @return The lines for the key and all of it's subkeys */ - private List<String> getAllLines(String key, Object... args) { + private List<String> getAllLines(String key, Object... args) { List<String> lines = new ArrayList<String>(); String keyToLookup = key; int i = 1; // First loop has no .number postfix diff --git a/src/main/java/gregtech/api/util/GT_Util.java b/src/main/java/gregtech/api/util/GT_Util.java index 2d1a1e389d..9de1726162 100644 --- a/src/main/java/gregtech/api/util/GT_Util.java +++ b/src/main/java/gregtech/api/util/GT_Util.java @@ -20,10 +20,11 @@ public class GT_Util { } public static NBTTagCompound fuseNBT(NBTTagCompound aNBT1, NBTTagCompound aNBT2) { - if (aNBT1 == null) return aNBT2 == null ? new NBTTagCompound() : (NBTTagCompound)aNBT2.copy(); - final NBTTagCompound rNBT = (NBTTagCompound)aNBT1.copy(); + if (aNBT1 == null) return aNBT2 == null ? new NBTTagCompound() : (NBTTagCompound) aNBT2.copy(); + final NBTTagCompound rNBT = (NBTTagCompound) aNBT1.copy(); if (aNBT2 == null) return rNBT; - for (Object tKey : aNBT2.func_150296_c/*getKeySet*/()) if (!rNBT.hasKey(tKey.toString())) rNBT.setTag(tKey.toString(), aNBT2.getTag(tKey.toString())); + for (Object tKey : aNBT2.func_150296_c /*getKeySet*/()) + if (!rNBT.hasKey(tKey.toString())) rNBT.setTag(tKey.toString(), aNBT2.getTag(tKey.toString())); return rNBT; } @@ -32,29 +33,22 @@ public class GT_Util { */ public static NBTTagCompound makeNBT(Tuple... aTags) { final NBTTagCompound rNBT = new NBTTagCompound(); - for(Tuple t : aTags) { + for (Tuple t : aTags) { if (t.getSecond() == null) continue; - if (t.getSecond() instanceof Boolean) - rNBT.setBoolean(t.getFirst().toString(), (Boolean) t.getSecond()); - else if (t.getSecond() instanceof Byte) - rNBT.setByte(t.getFirst().toString(), (Byte) t.getSecond()); - else if (t.getSecond() instanceof Short) - rNBT.setShort(t.getFirst().toString(), (Short) t.getSecond()); + if (t.getSecond() instanceof Boolean) rNBT.setBoolean(t.getFirst().toString(), (Boolean) t.getSecond()); + else if (t.getSecond() instanceof Byte) rNBT.setByte(t.getFirst().toString(), (Byte) t.getSecond()); + else if (t.getSecond() instanceof Short) rNBT.setShort(t.getFirst().toString(), (Short) t.getSecond()); else if (t.getSecond() instanceof Integer) rNBT.setInteger(t.getFirst().toString(), (Integer) t.getSecond()); - else if (t.getSecond() instanceof Long) - rNBT.setLong(t.getFirst().toString(), (Long) t.getSecond()); - else if (t.getSecond() instanceof Float) - rNBT.setFloat(t.getFirst().toString(), (Float) t.getSecond()); + else if (t.getSecond() instanceof Long) rNBT.setLong(t.getFirst().toString(), (Long) t.getSecond()); + else if (t.getSecond() instanceof Float) rNBT.setFloat(t.getFirst().toString(), (Float) t.getSecond()); else if (t.getSecond() instanceof Double) rNBT.setDouble(t.getFirst().toString(), (Double) t.getSecond()); else if (t.getSecond() instanceof String) rNBT.setString(t.getFirst().toString(), (String) t.getSecond()); - else if (t.getSecond() instanceof NBTBase) - rNBT.setTag(t.getFirst().toString(), (NBTBase) t.getSecond()); - else - rNBT.setString(t.getFirst().toString(), t.getSecond().toString()); + else if (t.getSecond() instanceof NBTBase) rNBT.setTag(t.getFirst().toString(), (NBTBase) t.getSecond()); + else rNBT.setString(t.getFirst().toString(), t.getSecond().toString()); } return rNBT; @@ -66,37 +60,41 @@ public class GT_Util { public static TileEntity getTileEntity(World aWorld, int aX, int aY, int aZ, boolean aLoadUnloadedChunks) { if (aLoadUnloadedChunks || aWorld.blockExists(aX, aY, aZ)) { TileEntity rTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (rTileEntity instanceof IMultiTileEntity && ((IMultiTileEntity)rTileEntity).isDead()) return null; + if (rTileEntity instanceof IMultiTileEntity && ((IMultiTileEntity) rTileEntity).isDead()) return null; if (rTileEntity != null) return rTileEntity; rTileEntity = LAST_BROKEN_TILEENTITY.get(); - if (rTileEntity != null && rTileEntity.xCoord == aX && rTileEntity.yCoord == aY && rTileEntity.zCoord == aZ) return rTileEntity; + if (rTileEntity != null && rTileEntity.xCoord == aX && rTileEntity.yCoord == aY && rTileEntity.zCoord == aZ) + return rTileEntity; } return null; } /** Sets the TileEntity at the passed position, with the option of turning adjacent TileEntity updates off. */ - public static TileEntity setTileEntity(World aWorld, int aX, int aY, int aZ, TileEntity aTileEntity, boolean aCauseTileEntityUpdates) { - if (aCauseTileEntityUpdates) aWorld.setTileEntity(aX, aY, aZ, aTileEntity); else { + public static TileEntity setTileEntity( + World aWorld, int aX, int aY, int aZ, TileEntity aTileEntity, boolean aCauseTileEntityUpdates) { + if (aCauseTileEntityUpdates) aWorld.setTileEntity(aX, aY, aZ, aTileEntity); + else { Chunk tChunk = aWorld.getChunkFromChunkCoords(aX >> 4, aZ >> 4); if (tChunk != null) { aWorld.addTileEntity(aTileEntity); - tChunk.func_150812_a/*setBlockTileEntityInChunk*/(aX & 15, aY, aZ & 15, aTileEntity); + tChunk.func_150812_a /*setBlockTileEntityInChunk*/(aX & 15, aY, aZ & 15, aTileEntity); tChunk.setChunkModified(); } } return aTileEntity; } - public static boolean setTileEntity(World aWorld, int aX, int aY, int aZ, Block aBlock, short aMeta, long aFlags, boolean aRemoveGrassBelow) { + public static boolean setTileEntity( + World aWorld, int aX, int aY, int aZ, Block aBlock, short aMeta, long aFlags, boolean aRemoveGrassBelow) { if (aRemoveGrassBelow) { - final Block tBlock = aWorld.getBlock(aX, aY-1, aZ); - if (tBlock == Blocks.grass || tBlock == Blocks.mycelium) aWorld.setBlock(aX, aY-1, aZ, Blocks.dirt, 0, (byte)aFlags); + final Block tBlock = aWorld.getBlock(aX, aY - 1, aZ); + if (tBlock == Blocks.grass || tBlock == Blocks.mycelium) + aWorld.setBlock(aX, aY - 1, aZ, Blocks.dirt, 0, (byte) aFlags); } - return aWorld.setBlock(aX, aY, aZ, aBlock, aMeta, (byte)aFlags); + return aWorld.setBlock(aX, aY, aZ, aBlock, aMeta, (byte) aFlags); } - - public static TileEntity getTileEntity (World aWorld, ChunkCoordinates aCoords, boolean aLoadUnloadedChunks) { + public static TileEntity getTileEntity(World aWorld, ChunkCoordinates aCoords, boolean aLoadUnloadedChunks) { return getTileEntity(aWorld, aCoords.posX, aCoords.posY, aCoords.posZ, aLoadUnloadedChunks); } @@ -108,7 +106,8 @@ public class GT_Util { aWorld.getBlockMetadata(aX, 0, aZ); aChunk = aWorld.getChunkFromBlockCoords(aX, aZ); if (aChunk == null) { - GT_Log.err.println("Some important Chunk does not exist for some reason at Coordinates X: " + aX + " and Z: " + aZ); + GT_Log.err.println("Some important Chunk does not exist for some reason at Coordinates X: " + aX + + " and Z: " + aZ); return false; } } @@ -117,11 +116,19 @@ public class GT_Util { } /** Marks a Chunk dirty so it is saved */ public static boolean markChunkDirty(Object aTileEntity) { - return aTileEntity instanceof TileEntity && markChunkDirty(((TileEntity)aTileEntity).getWorldObj(), ((TileEntity)aTileEntity).xCoord, ((TileEntity)aTileEntity).zCoord); + return aTileEntity instanceof TileEntity + && markChunkDirty( + ((TileEntity) aTileEntity).getWorldObj(), + ((TileEntity) aTileEntity).xCoord, + ((TileEntity) aTileEntity).zCoord); } public static int mixRGBInt(int aRGB1, int aRGB2) { - return getRGBInt(new short[] {(short)((getR(aRGB1) + getR(aRGB2)) >> 1), (short)((getG(aRGB1) + getG(aRGB2)) >> 1), (short)((getB(aRGB1) + getB(aRGB2)) >> 1)}); + return getRGBInt(new short[] { + (short) ((getR(aRGB1) + getR(aRGB2)) >> 1), + (short) ((getG(aRGB1) + getG(aRGB2)) >> 1), + (short) ((getB(aRGB1) + getB(aRGB2)) >> 1) + }); } public static int getRGBInt(short[] aColors) { @@ -145,12 +152,27 @@ public class GT_Util { } public static short[] getRGBaArray(int aColors) { - return new short[] {(short)((aColors >>> 16) & 255), (short)((aColors >>> 8) & 255), (short)(aColors & 255), (short)((aColors >>> 24) & 255)}; + return new short[] { + (short) ((aColors >>> 16) & 255), + (short) ((aColors >>> 8) & 255), + (short) (aColors & 255), + (short) ((aColors >>> 24) & 255) + }; + } + + public static short getR(int aColors) { + return (short) ((aColors >>> 16) & 255); } - public static short getR(int aColors) {return (short)((aColors >>> 16) & 255);} - public static short getG(int aColors) {return (short)((aColors >>> 8) & 255);} - public static short getB(int aColors) {return (short) (aColors & 255);} - public static short getA(int aColors) {return (short)((aColors >>> 24) & 255);} + public static short getG(int aColors) { + return (short) ((aColors >>> 8) & 255); + } + public static short getB(int aColors) { + return (short) (aColors & 255); + } + + public static short getA(int aColors) { + return (short) ((aColors >>> 24) & 255); + } } diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index b03c3ab13e..dc192a7d57 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1,5 +1,16 @@ package gregtech.api.util; +import static gregtech.GT_Mod.GT_FML_LOGGER; +import static gregtech.api.enums.GT_Values.D1; +import static gregtech.api.enums.GT_Values.E; +import static gregtech.api.enums.GT_Values.GT; +import static gregtech.api.enums.GT_Values.L; +import static gregtech.api.enums.GT_Values.M; +import static gregtech.api.enums.GT_Values.NW; +import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.GT_Values.W; +import static gregtech.common.GT_UndergroundOil.undergroundOilReadInformation; + import cofh.api.transport.IItemDuct; import com.google.auto.value.AutoValue; import com.google.common.base.Suppliers; @@ -42,6 +53,32 @@ import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeInputItemStack; import ic2.api.recipe.RecipeInputOreDict; import ic2.api.recipe.RecipeOutput; +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.math.BigInteger; +import java.math.RoundingMode; +import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Objects; +import java.util.Optional; +import java.util.UUID; +import java.util.function.Function; +import java.util.function.IntFunction; +import java.util.function.Supplier; +import javax.annotation.Nullable; import net.minecraft.block.Block; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; @@ -92,44 +129,6 @@ import net.minecraftforge.fluids.IFluidContainerItem; import net.minecraftforge.fluids.IFluidHandler; import net.minecraftforge.oredict.OreDictionary; -import javax.annotation.Nullable; -import java.lang.reflect.Constructor; -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.math.BigInteger; -import java.math.RoundingMode; -import java.text.DecimalFormat; -import java.text.DecimalFormatSymbols; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Optional; -import java.util.UUID; -import java.util.function.Function; -import java.util.function.IntFunction; -import java.util.function.Supplier; - -import static gregtech.GT_Mod.GT_FML_LOGGER; -import static gregtech.api.enums.GT_Values.D1; -import static gregtech.api.enums.GT_Values.E; -import static gregtech.api.enums.GT_Values.GT; -import static gregtech.api.enums.GT_Values.L; -import static gregtech.api.enums.GT_Values.M; -import static gregtech.api.enums.GT_Values.NW; -import static gregtech.api.enums.GT_Values.V; -import static gregtech.api.enums.GT_Values.W; -import static gregtech.common.GT_UndergroundOil.undergroundOilReadInformation; - /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! * <p/> @@ -137,24 +136,28 @@ import static gregtech.common.GT_UndergroundOil.undergroundOilReadInformation; */ public class GT_Utility { /** Formats a number with group separator and at most 2 fraction digits. */ - private static final Map<Locale, DecimalFormat> decimalFormatters=new HashMap<>(); + private static final Map<Locale, DecimalFormat> decimalFormatters = new HashMap<>(); /** * Forge screwed the Fluid Registry up again, so I make my own, which is also much more efficient than the stupid Stuff over there. */ private static final List<FluidContainerData> sFluidContainerList = new ArrayList<>(); - private static final Map<GT_ItemStack, FluidContainerData> sFilledContainerToData = new /*Concurrent*/HashMap<>(); - private static final Map<GT_ItemStack, Map<Fluid, FluidContainerData>> sEmptyContainerToFluidToData = new /*Concurrent*/HashMap<>(); + + private static final Map<GT_ItemStack, FluidContainerData> sFilledContainerToData = new /*Concurrent*/ HashMap<>(); + private static final Map<GT_ItemStack, Map<Fluid, FluidContainerData>> sEmptyContainerToFluidToData = + new /*Concurrent*/ HashMap<>(); private static final Map<Fluid, List<ItemStack>> sFluidToContainers = new HashMap<>(); private static final Map<String, Fluid> sFluidUnlocalizedNameToFluid = new HashMap<>(); /** Must use {@code Supplier} here because the ore prefixes have not yet been registered at class load time. */ private static final Map<OrePrefixes, Supplier<ItemStack>> sOreToCobble = new HashMap<>(); - private final static Map<Integer, Boolean> sOreTable = new HashMap<>(); + + private static final Map<Integer, Boolean> sOreTable = new HashMap<>(); public static volatile int VERSION = 509; public static boolean TE_CHECK = false, BC_CHECK = false, CHECK_ALL = true, RF_CHECK = false; - public static Map<GT_PlayedSound, Integer> sPlayedSoundMap = new /*Concurrent*/HashMap<>(); + public static Map<GT_PlayedSound, Integer> sPlayedSoundMap = new /*Concurrent*/ HashMap<>(); private static int sBookCount = 0; - public static UUID defaultUuid = null; // maybe default non-null? UUID.fromString("00000000-0000-0000-0000-000000000000"); + public static UUID defaultUuid = + null; // maybe default non-null? UUID.fromString("00000000-0000-0000-0000-000000000000"); static { GregTech_API.sItemStackMappings.add(sFilledContainerToData); @@ -162,41 +165,33 @@ public class GT_Utility { // 1 is the magic index to get the cobblestone block. // See: GT_Block_Stones.java, GT_Block_Granites.java - Function<Materials, Supplier<ItemStack>> materialToCobble = - m -> Suppliers.memoize(() -> GT_OreDictUnificator.getOres(OrePrefixes.stone, m).get(1))::get; - sOreToCobble.put( - OrePrefixes.oreBlackgranite, - materialToCobble.apply(Materials.GraniteBlack)); - sOreToCobble.put( - OrePrefixes.oreRedgranite, - materialToCobble.apply(Materials.GraniteRed)); - sOreToCobble.put( - OrePrefixes.oreMarble, - materialToCobble.apply(Materials.Marble)); - sOreToCobble.put( - OrePrefixes.oreBasalt, - materialToCobble.apply(Materials.Basalt)); - sOreToCobble.put( - OrePrefixes.oreNetherrack, - () -> new ItemStack(Blocks.netherrack)); - sOreToCobble.put( - OrePrefixes.oreEndstone, - () -> new ItemStack(Blocks.end_stone)); - } - - public static int safeInt(long number, int margin){ - return number>Integer.MAX_VALUE-margin ? Integer.MAX_VALUE-margin :(int)number; - } - - public static int safeInt(long number){ - return number> V[V.length-1] ? safeInt(V[V.length-1],1) : number<Integer.MIN_VALUE ? Integer.MIN_VALUE : (int)number; + Function<Materials, Supplier<ItemStack>> materialToCobble = m -> Suppliers.memoize( + () -> GT_OreDictUnificator.getOres(OrePrefixes.stone, m).get(1))::get; + sOreToCobble.put(OrePrefixes.oreBlackgranite, materialToCobble.apply(Materials.GraniteBlack)); + sOreToCobble.put(OrePrefixes.oreRedgranite, materialToCobble.apply(Materials.GraniteRed)); + sOreToCobble.put(OrePrefixes.oreMarble, materialToCobble.apply(Materials.Marble)); + sOreToCobble.put(OrePrefixes.oreBasalt, materialToCobble.apply(Materials.Basalt)); + sOreToCobble.put(OrePrefixes.oreNetherrack, () -> new ItemStack(Blocks.netherrack)); + sOreToCobble.put(OrePrefixes.oreEndstone, () -> new ItemStack(Blocks.end_stone)); + } + + public static int safeInt(long number, int margin) { + return number > Integer.MAX_VALUE - margin ? Integer.MAX_VALUE - margin : (int) number; + } + + public static int safeInt(long number) { + return number > V[V.length - 1] + ? safeInt(V[V.length - 1], 1) + : number < Integer.MIN_VALUE ? Integer.MIN_VALUE : (int) number; } public static Field getPublicField(Object aObject, String aField) { Field rField = null; try { rField = aObject.getClass().getDeclaredField(aField); - } catch (Throwable e) {/*Do nothing*/} + } catch (Throwable e) { + /*Do nothing*/ + } return rField; } @@ -205,7 +200,9 @@ public class GT_Utility { try { rField = aObject.getClass().getDeclaredField(aField); rField.setAccessible(true); - } catch (Throwable e) {/*Do nothing*/} + } catch (Throwable e) { + /*Do nothing*/ + } return rField; } @@ -214,7 +211,9 @@ public class GT_Utility { try { rField = aObject.getDeclaredField(aField); rField.setAccessible(true); - } catch (Throwable e) {/*Do nothing*/} + } catch (Throwable e) { + /*Do nothing*/ + } return rField; } @@ -223,7 +222,9 @@ public class GT_Utility { try { rMethod = aObject.getMethod(aMethod, aParameterTypes); rMethod.setAccessible(true); - } catch (Throwable e) {/*Do nothing*/} + } catch (Throwable e) { + /*Do nothing*/ + } return rMethod; } @@ -232,13 +233,19 @@ public class GT_Utility { try { rMethod = aObject.getClass().getMethod(aMethod, aParameterTypes); rMethod.setAccessible(true); - } catch (Throwable e) {/*Do nothing*/} + } catch (Throwable e) { + /*Do nothing*/ + } return rMethod; } public static Field getField(Object aObject, String aField, boolean aPrivate, boolean aLogErrors) { try { - Field tField = (aObject instanceof Class) ? ((Class) aObject).getDeclaredField(aField) : (aObject instanceof String) ? Class.forName((String) aObject).getDeclaredField(aField) : aObject.getClass().getDeclaredField(aField); + Field tField = (aObject instanceof Class) + ? ((Class) aObject).getDeclaredField(aField) + : (aObject instanceof String) + ? Class.forName((String) aObject).getDeclaredField(aField) + : aObject.getClass().getDeclaredField(aField); if (aPrivate) tField.setAccessible(true); return tField; } catch (Throwable e) { @@ -249,7 +256,11 @@ public class GT_Utility { public static Object getFieldContent(Object aObject, String aField, boolean aPrivate, boolean aLogErrors) { try { - Field tField = (aObject instanceof Class) ? ((Class) aObject).getDeclaredField(aField) : (aObject instanceof String) ? Class.forName((String) aObject).getDeclaredField(aField) : aObject.getClass().getDeclaredField(aField); + Field tField = (aObject instanceof Class) + ? ((Class) aObject).getDeclaredField(aField) + : (aObject instanceof String) + ? Class.forName((String) aObject).getDeclaredField(aField) + : aObject.getClass().getDeclaredField(aField); if (aPrivate) tField.setAccessible(true); return tField.get(aObject instanceof Class || aObject instanceof String ? null : aObject); } catch (Throwable e) { @@ -266,7 +277,13 @@ public class GT_Utility { return callMethod(aObject, aMethod, true, false, true, aParameters); } - public static Object callMethod(Object aObject, String aMethod, boolean aPrivate, boolean aUseUpperCasedDataTypes, boolean aLogErrors, Object... aParameters) { + public static Object callMethod( + Object aObject, + String aMethod, + boolean aPrivate, + boolean aUseUpperCasedDataTypes, + boolean aLogErrors, + Object... aParameters) { try { Class<?>[] tParameterTypes = new Class<?>[aParameters.length]; for (byte i = 0; i < aParameters.length; i++) { @@ -287,7 +304,9 @@ public class GT_Utility { } } - Method tMethod = (aObject instanceof Class) ? ((Class) aObject).getMethod(aMethod, tParameterTypes) : aObject.getClass().getMethod(aMethod, tParameterTypes); + Method tMethod = (aObject instanceof Class) + ? ((Class) aObject).getMethod(aMethod, tParameterTypes) + : aObject.getClass().getMethod(aMethod, tParameterTypes); if (aPrivate) tMethod.setAccessible(true); return tMethod.invoke(aObject, aParameters); } catch (Throwable e) { @@ -296,22 +315,34 @@ public class GT_Utility { return null; } - public static Object callConstructor(String aClass, int aConstructorIndex, Object aReplacementObject, boolean aLogErrors, Object... aParameters) { + public static Object callConstructor( + String aClass, + int aConstructorIndex, + Object aReplacementObject, + boolean aLogErrors, + Object... aParameters) { try { - return callConstructor(Class.forName(aClass), aConstructorIndex, aReplacementObject, aLogErrors, aParameters); + return callConstructor( + Class.forName(aClass), aConstructorIndex, aReplacementObject, aLogErrors, aParameters); } catch (Throwable e) { if (aLogErrors) e.printStackTrace(GT_Log.err); } return aReplacementObject; } - public static Object callConstructor(Class<?> aClass, int aConstructorIndex, Object aReplacementObject, boolean aLogErrors, Object... aParameters) { + public static Object callConstructor( + Class<?> aClass, + int aConstructorIndex, + Object aReplacementObject, + boolean aLogErrors, + Object... aParameters) { if (aConstructorIndex < 0) { try { for (Constructor<?> tConstructor : aClass.getConstructors()) { try { return tConstructor.newInstance(aParameters); - } catch (Throwable ignored) {} + } catch (Throwable ignored) { + } } } catch (Throwable e) { if (aLogErrors) e.printStackTrace(GT_Log.err); @@ -346,8 +377,7 @@ public class GT_Utility { } } - if (tPotionHashmap != null) - return ((HashMap) tPotionHashmap.get(aPlayer)).get(aPotionIndex) != null; + if (tPotionHashmap != null) return ((HashMap) tPotionHashmap.get(aPlayer)).get(aPotionIndex) != null; } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); } @@ -356,7 +386,9 @@ public class GT_Utility { public static String getClassName(Object aObject) { if (aObject == null) return "null"; - return aObject.getClass().getName().substring(aObject.getClass().getName().lastIndexOf(".") + 1); + return aObject.getClass() + .getName() + .substring(aObject.getClass().getName().lastIndexOf(".") + 1); } public static void removePotion(EntityLivingBase aPlayer, int aPotionIndex) { @@ -385,7 +417,8 @@ public class GT_Utility { for (int i = 0; i < 4; i++) { if (aPlayer.inventory.armorInventory[i] != null) { if (aPlayer.inventory.armorInventory[i].getItem() instanceof GT_EnergyArmor_Item) { - if ((((GT_EnergyArmor_Item) aPlayer.inventory.armorInventory[i].getItem()).mSpecials & 512) != 0) { + if ((((GT_EnergyArmor_Item) aPlayer.inventory.armorInventory[i].getItem()).mSpecials & 512) + != 0) { if (GT_ModHandler.canUseElectricItem(aPlayer.inventory.armorInventory[i], 10000)) { return true; } @@ -400,8 +433,10 @@ public class GT_Utility { return false; } - public static ItemStack suckOneItemStackAt(World aWorld, double aX, double aY, double aZ, double aL, double aH, double aW) { - for (EntityItem tItem : (ArrayList<EntityItem>) aWorld.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(aX, aY, aZ, aX + aL, aY + aH, aZ + aW))) { + public static ItemStack suckOneItemStackAt( + World aWorld, double aX, double aY, double aZ, double aL, double aH, double aW) { + for (EntityItem tItem : (ArrayList<EntityItem>) aWorld.getEntitiesWithinAABB( + EntityItem.class, AxisAlignedBB.getBoundingBox(aX, aY, aZ, aX + aL, aY + aH, aZ + aW))) { if (!tItem.isDead) { aWorld.removeEntity(tItem); tItem.setDead(); @@ -433,17 +468,23 @@ public class GT_Utility { Class tClass = IItemDuct.class; tClass.getCanonicalName(); TE_CHECK = true; - } catch (Throwable e) {/**/} + } catch (Throwable e) { + /**/ + } try { Class tClass = buildcraft.api.transport.IPipeTile.class; tClass.getCanonicalName(); BC_CHECK = true; - } catch (Throwable e) {/**/} + } catch (Throwable e) { + /**/ + } try { Class tClass = cofh.api.energy.IEnergyReceiver.class; tClass.getCanonicalName(); RF_CHECK = true; - } catch (Throwable e) {/**/} + } catch (Throwable e) { + /**/ + } CHECK_ALL = false; } } @@ -453,7 +494,8 @@ public class GT_Utility { checkAvailabilities(); if (TE_CHECK && aTileEntity instanceof IItemDuct) return true; if (BC_CHECK && aTileEntity instanceof buildcraft.api.transport.IPipeTile) - return ((buildcraft.api.transport.IPipeTile) aTileEntity).isPipeConnected(ForgeDirection.getOrientation(aSide)); + return ((buildcraft.api.transport.IPipeTile) aTileEntity) + .isPipeConnected(ForgeDirection.getOrientation(aSide)); return GregTech_API.mTranslocator && aTileEntity instanceof codechicken.translocator.TileItemTranslocator; } /** @@ -461,8 +503,31 @@ public class GT_Utility { * * @return the Amount of moved Items */ - public static byte moveStackIntoPipe(IInventory aTileEntity1, Object aTileEntity2, int[] aGrabSlots, int aGrabFrom, int aPutTo, List<ItemStack> aFilter, boolean aInvertFilter, byte aMaxTargetStackSize, byte aMinTargetStackSize, byte aMaxMoveAtOnce, byte aMinMoveAtOnce) { - return moveStackIntoPipe(aTileEntity1, aTileEntity2, aGrabSlots, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, true); + public static byte moveStackIntoPipe( + IInventory aTileEntity1, + Object aTileEntity2, + int[] aGrabSlots, + int aGrabFrom, + int aPutTo, + List<ItemStack> aFilter, + boolean aInvertFilter, + byte aMaxTargetStackSize, + byte aMinTargetStackSize, + byte aMaxMoveAtOnce, + byte aMinMoveAtOnce) { + return moveStackIntoPipe( + aTileEntity1, + aTileEntity2, + aGrabSlots, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + true); } /** @@ -470,21 +535,45 @@ public class GT_Utility { * * @return the Amount of moved Items */ - public static byte moveStackIntoPipe(IInventory aTileEntity1, Object aTileEntity2, int[] aGrabSlots, int aGrabFrom, int aPutTo, List<ItemStack> aFilter, boolean aInvertFilter, byte aMaxTargetStackSize, byte aMinTargetStackSize, byte aMaxMoveAtOnce, byte aMinMoveAtOnce, boolean dropItem) { - if (aTileEntity1 == null || aMaxTargetStackSize <= 0 || aMinTargetStackSize <= 0 || aMinTargetStackSize > aMaxTargetStackSize || aMaxMoveAtOnce <= 0 || aMinMoveAtOnce > aMaxMoveAtOnce) - return 0; + public static byte moveStackIntoPipe( + IInventory aTileEntity1, + Object aTileEntity2, + int[] aGrabSlots, + int aGrabFrom, + int aPutTo, + List<ItemStack> aFilter, + boolean aInvertFilter, + byte aMaxTargetStackSize, + byte aMinTargetStackSize, + byte aMaxMoveAtOnce, + byte aMinMoveAtOnce, + boolean dropItem) { + if (aTileEntity1 == null + || aMaxTargetStackSize <= 0 + || aMinTargetStackSize <= 0 + || aMinTargetStackSize > aMaxTargetStackSize + || aMaxMoveAtOnce <= 0 + || aMinMoveAtOnce > aMaxMoveAtOnce) return 0; if (aTileEntity2 != null) { checkAvailabilities(); if (TE_CHECK && aTileEntity2 instanceof IItemDuct) { for (int aGrabSlot : aGrabSlots) { if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(aGrabSlot), true, aInvertFilter)) { - if (isAllowedToTakeFromSlot(aTileEntity1, aGrabSlot, (byte) aGrabFrom, aTileEntity1.getStackInSlot(aGrabSlot))) { - if (Math.max(aMinMoveAtOnce, aMinTargetStackSize) <= aTileEntity1.getStackInSlot(aGrabSlot).stackSize) { - ItemStack tStack = copyAmount(Math.min(aTileEntity1.getStackInSlot(aGrabSlot).stackSize, Math.min(aMaxMoveAtOnce, aMaxTargetStackSize)), aTileEntity1.getStackInSlot(aGrabSlot)); - ItemStack rStack = ((IItemDuct) aTileEntity2).insertItem(ForgeDirection.getOrientation(aPutTo), copyOrNull(tStack)); - byte tMovedItemCount = (byte) (tStack.stackSize - (rStack == null ? 0 : rStack.stackSize)); - if (tMovedItemCount >= 1/*Math.max(aMinMoveAtOnce, aMinTargetStackSize)*/) { - //((cofh.api.transport.IItemConduit)aTileEntity2).insertItem(ForgeDirection.getOrientation(aPutTo), copyAmount(tMovedItemCount, tStack), F); + if (isAllowedToTakeFromSlot( + aTileEntity1, aGrabSlot, (byte) aGrabFrom, aTileEntity1.getStackInSlot(aGrabSlot))) { + if (Math.max(aMinMoveAtOnce, aMinTargetStackSize) + <= aTileEntity1.getStackInSlot(aGrabSlot).stackSize) { + ItemStack tStack = copyAmount( + Math.min( + aTileEntity1.getStackInSlot(aGrabSlot).stackSize, + Math.min(aMaxMoveAtOnce, aMaxTargetStackSize)), + aTileEntity1.getStackInSlot(aGrabSlot)); + ItemStack rStack = ((IItemDuct) aTileEntity2) + .insertItem(ForgeDirection.getOrientation(aPutTo), copyOrNull(tStack)); + byte tMovedItemCount = + (byte) (tStack.stackSize - (rStack == null ? 0 : rStack.stackSize)); + if (tMovedItemCount >= 1 /*Math.max(aMinMoveAtOnce, aMinTargetStackSize)*/) { + // ((cofh.api.transport.IItemConduit)aTileEntity2).insertItem(ForgeDirection.getOrientation(aPutTo), copyAmount(tMovedItemCount, tStack), F); aTileEntity1.decrStackSize(aGrabSlot, tMovedItemCount); aTileEntity1.markDirty(); return tMovedItemCount; @@ -498,12 +587,23 @@ public class GT_Utility { if (BC_CHECK && aTileEntity2 instanceof buildcraft.api.transport.IPipeTile) { for (int aGrabSlot : aGrabSlots) { if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(aGrabSlot), true, aInvertFilter)) { - if (isAllowedToTakeFromSlot(aTileEntity1, aGrabSlot, (byte) aGrabFrom, aTileEntity1.getStackInSlot(aGrabSlot))) { - if (Math.max(aMinMoveAtOnce, aMinTargetStackSize) <= aTileEntity1.getStackInSlot(aGrabSlot).stackSize) { - ItemStack tStack = copyAmount(Math.min(aTileEntity1.getStackInSlot(aGrabSlot).stackSize, Math.min(aMaxMoveAtOnce, aMaxTargetStackSize)), aTileEntity1.getStackInSlot(aGrabSlot)); - byte tMovedItemCount = (byte) ((buildcraft.api.transport.IPipeTile) aTileEntity2).injectItem(copyOrNull(tStack), false, ForgeDirection.getOrientation(aPutTo)); + if (isAllowedToTakeFromSlot( + aTileEntity1, aGrabSlot, (byte) aGrabFrom, aTileEntity1.getStackInSlot(aGrabSlot))) { + if (Math.max(aMinMoveAtOnce, aMinTargetStackSize) + <= aTileEntity1.getStackInSlot(aGrabSlot).stackSize) { + ItemStack tStack = copyAmount( + Math.min( + aTileEntity1.getStackInSlot(aGrabSlot).stackSize, + Math.min(aMaxMoveAtOnce, aMaxTargetStackSize)), + aTileEntity1.getStackInSlot(aGrabSlot)); + byte tMovedItemCount = (byte) ((buildcraft.api.transport.IPipeTile) aTileEntity2) + .injectItem(copyOrNull(tStack), false, ForgeDirection.getOrientation(aPutTo)); if (tMovedItemCount >= Math.max(aMinMoveAtOnce, aMinTargetStackSize)) { - tMovedItemCount = (byte) (((buildcraft.api.transport.IPipeTile) aTileEntity2).injectItem(copyAmount(tMovedItemCount, tStack), true, ForgeDirection.getOrientation(aPutTo))); + tMovedItemCount = (byte) (((buildcraft.api.transport.IPipeTile) aTileEntity2) + .injectItem( + copyAmount(tMovedItemCount, tStack), + true, + ForgeDirection.getOrientation(aPutTo))); aTileEntity1.decrStackSize(aGrabSlot, tMovedItemCount); aTileEntity1.markDirty(); return tMovedItemCount; @@ -517,15 +617,30 @@ public class GT_Utility { } ForgeDirection tDirection = ForgeDirection.getOrientation(aGrabFrom); - if (aTileEntity1 instanceof TileEntity && tDirection != ForgeDirection.UNKNOWN && tDirection.getOpposite() == ForgeDirection.getOrientation(aPutTo)) { - int tX = ((TileEntity) aTileEntity1).xCoord + tDirection.offsetX, tY = ((TileEntity) aTileEntity1).yCoord + tDirection.offsetY, tZ = ((TileEntity) aTileEntity1).zCoord + tDirection.offsetZ; + if (aTileEntity1 instanceof TileEntity + && tDirection != ForgeDirection.UNKNOWN + && tDirection.getOpposite() == ForgeDirection.getOrientation(aPutTo)) { + int tX = ((TileEntity) aTileEntity1).xCoord + tDirection.offsetX, + tY = ((TileEntity) aTileEntity1).yCoord + tDirection.offsetY, + tZ = ((TileEntity) aTileEntity1).zCoord + tDirection.offsetZ; if (!hasBlockHitBox(((TileEntity) aTileEntity1).getWorldObj(), tX, tY, tZ) && dropItem) { for (int aGrabSlot : aGrabSlots) { if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(aGrabSlot), true, aInvertFilter)) { - if (isAllowedToTakeFromSlot(aTileEntity1, aGrabSlot, (byte) aGrabFrom, aTileEntity1.getStackInSlot(aGrabSlot))) { - if (Math.max(aMinMoveAtOnce, aMinTargetStackSize) <= aTileEntity1.getStackInSlot(aGrabSlot).stackSize) { - ItemStack tStack = copyAmount(Math.min(aTileEntity1.getStackInSlot(aGrabSlot).stackSize, Math.min(aMaxMoveAtOnce, aMaxTargetStackSize)), aTileEntity1.getStackInSlot(aGrabSlot)); - EntityItem tEntity = new EntityItem(((TileEntity) aTileEntity1).getWorldObj(), tX + 0.5, tY + 0.5, tZ + 0.5, tStack); + if (isAllowedToTakeFromSlot( + aTileEntity1, aGrabSlot, (byte) aGrabFrom, aTileEntity1.getStackInSlot(aGrabSlot))) { + if (Math.max(aMinMoveAtOnce, aMinTargetStackSize) + <= aTileEntity1.getStackInSlot(aGrabSlot).stackSize) { + ItemStack tStack = copyAmount( + Math.min( + aTileEntity1.getStackInSlot(aGrabSlot).stackSize, + Math.min(aMaxMoveAtOnce, aMaxTargetStackSize)), + aTileEntity1.getStackInSlot(aGrabSlot)); + EntityItem tEntity = new EntityItem( + ((TileEntity) aTileEntity1).getWorldObj(), + tX + 0.5, + tY + 0.5, + tZ + 0.5, + tStack); tEntity.motionX = tEntity.motionY = tEntity.motionZ = 0; ((TileEntity) aTileEntity1).getWorldObj().spawnEntityInWorld(tEntity); aTileEntity1.decrStackSize(aGrabSlot, tStack.stackSize); @@ -545,18 +660,42 @@ public class GT_Utility { * * @return the Amount of moved Items */ - public static byte moveStackFromSlotAToSlotB(IInventory aTileEntity1, IInventory aTileEntity2, int aGrabFrom, int aPutTo, byte aMaxTargetStackSize, byte aMinTargetStackSize, byte aMaxMoveAtOnce, byte aMinMoveAtOnce) { - if (aTileEntity1 == null || aTileEntity2 == null || aMaxTargetStackSize <= 0 || aMinTargetStackSize <= 0 || aMinTargetStackSize > aMaxTargetStackSize || aMaxMoveAtOnce <= 0 || aMinMoveAtOnce > aMaxMoveAtOnce) - return 0; - - ItemStack tStack1 = aTileEntity1.getStackInSlot(aGrabFrom), tStack2 = aTileEntity2.getStackInSlot(aPutTo), tStack3 = null; + public static byte moveStackFromSlotAToSlotB( + IInventory aTileEntity1, + IInventory aTileEntity2, + int aGrabFrom, + int aPutTo, + byte aMaxTargetStackSize, + byte aMinTargetStackSize, + byte aMaxMoveAtOnce, + byte aMinMoveAtOnce) { + if (aTileEntity1 == null + || aTileEntity2 == null + || aMaxTargetStackSize <= 0 + || aMinTargetStackSize <= 0 + || aMinTargetStackSize > aMaxTargetStackSize + || aMaxMoveAtOnce <= 0 + || aMinMoveAtOnce > aMaxMoveAtOnce) return 0; + + ItemStack tStack1 = aTileEntity1.getStackInSlot(aGrabFrom), + tStack2 = aTileEntity2.getStackInSlot(aPutTo), + tStack3 = null; if (tStack1 != null) { if (tStack2 != null && !areStacksEqual(tStack1, tStack2)) return 0; tStack3 = copyOrNull(tStack1); - aMaxTargetStackSize = (byte) Math.min(aMaxTargetStackSize, Math.min(tStack3.getMaxStackSize(), Math.min(tStack2 == null ? Integer.MAX_VALUE : tStack2.getMaxStackSize(), aTileEntity2.getInventoryStackLimit()))); - tStack3.stackSize = Math.min(tStack3.stackSize, aMaxTargetStackSize - (tStack2 == null ? 0 : tStack2.stackSize)); + aMaxTargetStackSize = (byte) Math.min( + aMaxTargetStackSize, + Math.min( + tStack3.getMaxStackSize(), + Math.min( + tStack2 == null ? Integer.MAX_VALUE : tStack2.getMaxStackSize(), + aTileEntity2.getInventoryStackLimit()))); + tStack3.stackSize = + Math.min(tStack3.stackSize, aMaxTargetStackSize - (tStack2 == null ? 0 : tStack2.stackSize)); if (tStack3.stackSize > aMaxMoveAtOnce) tStack3.stackSize = aMaxMoveAtOnce; - if (tStack3.stackSize + (tStack2 == null ? 0 : tStack2.stackSize) >= Math.min(tStack3.getMaxStackSize(), aMinTargetStackSize) && tStack3.stackSize >= aMinMoveAtOnce) { + if (tStack3.stackSize + (tStack2 == null ? 0 : tStack2.stackSize) + >= Math.min(tStack3.getMaxStackSize(), aMinTargetStackSize) + && tStack3.stackSize >= aMinMoveAtOnce) { tStack3 = aTileEntity1.decrStackSize(aGrabFrom, tStack3.stackSize); aTileEntity1.markDirty(); if (tStack3 != null) { @@ -587,7 +726,8 @@ public class GT_Utility { return true; } - public static boolean isAllowedToPutIntoSlot(IInventory aTileEntity, int aSlot, byte aSide, ItemStack aStack, byte aMaxStackSize) { + public static boolean isAllowedToPutIntoSlot( + IInventory aTileEntity, int aSlot, byte aSide, ItemStack aStack, byte aMaxStackSize) { ItemStack tStack = aTileEntity.getStackInSlot(aSlot); if (tStack != null && (!areStacksEqual(tStack, aStack) || tStack.stackSize >= tStack.getMaxStackSize())) return false; @@ -599,8 +739,8 @@ public class GT_Utility { || isAllowedToPutIntoSlot(aTileEntity, aSlot, (byte) 4, aStack, aMaxStackSize) || isAllowedToPutIntoSlot(aTileEntity, aSlot, (byte) 5, aStack, aMaxStackSize); } - if (aTileEntity instanceof ISidedInventory && !((ISidedInventory) aTileEntity).canInsertItem(aSlot, aStack, aSide)) - return false; + if (aTileEntity instanceof ISidedInventory + && !((ISidedInventory) aTileEntity).canInsertItem(aSlot, aStack, aSide)) return false; return aSlot < aTileEntity.getSizeInventory() && aTileEntity.isItemValidForSlot(aSlot, aStack); } @@ -609,31 +749,70 @@ public class GT_Utility { * * @return the Amount of moved Items */ - - public static int moveMultipleItemStacks(Object aTileEntity1, Object aTileEntity2, byte aGrabFrom, byte aPutTo, List<ItemStack> aFilter, boolean aInvertFilter, byte aMaxTargetStackSize, byte aMinTargetStackSize, byte aMaxMoveAtOnce, byte aMinMoveAtOnce,int aStackAmount) { - if (aTileEntity1 instanceof IInventory) - return moveMultipleItemStacks((IInventory) aTileEntity1, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce,aStackAmount, true); + public static int moveMultipleItemStacks( + Object aTileEntity1, + Object aTileEntity2, + byte aGrabFrom, + byte aPutTo, + List<ItemStack> aFilter, + boolean aInvertFilter, + byte aMaxTargetStackSize, + byte aMinTargetStackSize, + byte aMaxMoveAtOnce, + byte aMinMoveAtOnce, + int aStackAmount) { + if (aTileEntity1 instanceof IInventory) + return moveMultipleItemStacks( + (IInventory) aTileEntity1, + aTileEntity2, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + aStackAmount, + true); return 0; } - public static int moveMultipleItemStacks(IInventory aTileEntity1, Object aTileEntity2, byte aGrabFrom, byte aPutTo, List<ItemStack> aFilter, boolean aInvertFilter, byte aMaxTargetStackSize, byte aMinTargetStackSize, byte aMaxMoveAtOnce, byte aMinMoveAtOnce,int aMaxStackTransfer, boolean aDoCheckChests) { - if (aTileEntity1 == null || aMaxTargetStackSize <= 0 || aMinTargetStackSize <= 0 || aMaxMoveAtOnce <= 0 || aMinTargetStackSize > aMaxTargetStackSize || aMinMoveAtOnce > aMaxMoveAtOnce || aMaxStackTransfer == 0) - return 0; + public static int moveMultipleItemStacks( + IInventory aTileEntity1, + Object aTileEntity2, + byte aGrabFrom, + byte aPutTo, + List<ItemStack> aFilter, + boolean aInvertFilter, + byte aMaxTargetStackSize, + byte aMinTargetStackSize, + byte aMaxMoveAtOnce, + byte aMinMoveAtOnce, + int aMaxStackTransfer, + boolean aDoCheckChests) { + if (aTileEntity1 == null + || aMaxTargetStackSize <= 0 + || aMinTargetStackSize <= 0 + || aMaxMoveAtOnce <= 0 + || aMinTargetStackSize > aMaxTargetStackSize + || aMinMoveAtOnce > aMaxMoveAtOnce + || aMaxStackTransfer == 0) return 0; // find where to take from int[] tGrabSlots = new int[aTileEntity1.getSizeInventory()]; int tGrabSlotsSize = 0; if (aTileEntity1 instanceof ISidedInventory) { - for(int i : ((ISidedInventory) aTileEntity1).getAccessibleSlotsFromSide(aGrabFrom)) { + for (int i : ((ISidedInventory) aTileEntity1).getAccessibleSlotsFromSide(aGrabFrom)) { ItemStack s = aTileEntity1.getStackInSlot(i); - if (s == null || !isAllowedToTakeFromSlot(aTileEntity1, i, aGrabFrom, s) || s.stackSize < aMinMoveAtOnce || !listContainsItem(aFilter, s, true, aInvertFilter)) - continue; + if (s == null + || !isAllowedToTakeFromSlot(aTileEntity1, i, aGrabFrom, s) + || s.stackSize < aMinMoveAtOnce + || !listContainsItem(aFilter, s, true, aInvertFilter)) continue; tGrabSlots[tGrabSlotsSize++] = i; } - } - else { - for (int i = 0; i < tGrabSlots.length; i++) - { + } else { + for (int i = 0; i < tGrabSlots.length; i++) { ItemStack s = aTileEntity1.getStackInSlot(i); if (s == null || s.stackSize < aMinMoveAtOnce || !listContainsItem(aFilter, s, true, aInvertFilter)) continue; @@ -642,10 +821,21 @@ public class GT_Utility { } // no source, bail out - if(tGrabSlotsSize == 0) { + if (tGrabSlotsSize == 0) { // maybe source is a double chest. check it if (aDoCheckChests && aTileEntity1 instanceof TileEntityChest) - return moveFromAdjacentChests((TileEntityChest) aTileEntity1, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, aMaxStackTransfer); + return moveFromAdjacentChests( + (TileEntityChest) aTileEntity1, + aTileEntity2, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + aMaxStackTransfer); return 0; } @@ -667,32 +857,45 @@ public class GT_Utility { accessibleSlots = ((ISidedInventory) tPutInventory).getAccessibleSlotsFromSide(aPutTo); for (int i = 0; i < tPutInventory.getSizeInventory(); i++) { int slot = i; - if(accessibleSlots != null) - { - if(accessibleSlots.length <= i) - break; + if (accessibleSlots != null) { + if (accessibleSlots.length <= i) break; slot = accessibleSlots[slot]; } ItemStack s = tPutInventory.getStackInSlot(slot); - if(s == null) { + if (s == null) { tPutFreeSlots.add(slot); - } else if((s.stackSize < s.getMaxStackSize() && s.stackSize < tPutInventory.getInventoryStackLimit()) && aMinMoveAtOnce <= s.getMaxStackSize() - s.stackSize) { + } else if ((s.stackSize < s.getMaxStackSize() && s.stackSize < tPutInventory.getInventoryStackLimit()) + && aMinMoveAtOnce <= s.getMaxStackSize() - s.stackSize) { ItemId sID = ItemId.createNoCopy(s); - tPutItems.merge(sID, (Math.min(s.getMaxStackSize(), tPutInventory.getInventoryStackLimit()) - s.stackSize), Integer::sum); + tPutItems.merge( + sID, + (Math.min(s.getMaxStackSize(), tPutInventory.getInventoryStackLimit()) - s.stackSize), + Integer::sum); tPutItemStacks.computeIfAbsent(sID, k -> new ArrayList<>()).add(s); } } // target completely filled, bail out - if(tPutItems.isEmpty() && tPutFreeSlots.isEmpty()) { + if (tPutItems.isEmpty() && tPutFreeSlots.isEmpty()) { // maybe target is a double chest. check it. if (aDoCheckChests && aTileEntity2 instanceof TileEntityChest) - return moveToAdjacentChests(aTileEntity1, (TileEntityChest) aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, aMaxStackTransfer); + return moveToAdjacentChests( + aTileEntity1, + (TileEntityChest) aTileEntity2, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + aMaxStackTransfer); return 0; } // go over source stacks one by one - int tStacksMoved = 0,tTotalItemsMoved = 0; + int tStacksMoved = 0, tTotalItemsMoved = 0; for (int j = 0; j < tGrabSlotsSize; j++) { int grabSlot = tGrabSlots[j]; int tMovedItems; @@ -700,8 +903,7 @@ public class GT_Utility { do { tMovedItems = 0; ItemStack tGrabStack = aTileEntity1.getStackInSlot(grabSlot); - if (tGrabStack == null) - break; + if (tGrabStack == null) break; tStackSize = tGrabStack.stackSize; ItemId sID = ItemId.createNoCopy(tGrabStack); @@ -716,22 +918,23 @@ public class GT_Utility { tMovedItems = toPut; for (int i = 0; i < putStack.size(); i++) { ItemStack s = putStack.get(i); - int sToPut = Math.min(Math.min(Math.min(toPut, s.getMaxStackSize() - s.stackSize), tPutInventory.getInventoryStackLimit() - s.stackSize), aMaxTargetStackSize - s.stackSize); - if (sToPut <= 0) - continue; - if (sToPut < aMinMoveAtOnce) - continue; - if (s.stackSize + sToPut < aMinTargetStackSize) - continue; + int sToPut = Math.min( + Math.min( + Math.min(toPut, s.getMaxStackSize() - s.stackSize), + tPutInventory.getInventoryStackLimit() - s.stackSize), + aMaxTargetStackSize - s.stackSize); + if (sToPut <= 0) continue; + if (sToPut < aMinMoveAtOnce) continue; + if (s.stackSize + sToPut < aMinTargetStackSize) continue; toPut -= sToPut; s.stackSize += sToPut; - if (s.stackSize == s.getMaxStackSize() || s.stackSize == tPutInventory.getInventoryStackLimit()) { + if (s.stackSize == s.getMaxStackSize() + || s.stackSize == tPutInventory.getInventoryStackLimit()) { // this slot is full. remove this stack from candidate list putStack.remove(i); i--; } - if (toPut == 0) - break; + if (toPut == 0) break; } tMovedItems -= toPut; if (tMovedItems > 0) { @@ -740,10 +943,8 @@ public class GT_Utility { // deduct spare space tPutItems.merge(sID, tMovedItems, (a, b) -> a.equals(b) ? null : a - b); - if (tStackSize == 0) - aTileEntity1.setInventorySlotContents(grabSlot, null); - else - tGrabStack.stackSize = tStackSize; + if (tStackSize == 0) aTileEntity1.setInventorySlotContents(grabSlot, null); + else tGrabStack.stackSize = tStackSize; aTileEntity1.markDirty(); tPutInventory.markDirty(); @@ -757,19 +958,31 @@ public class GT_Utility { int tPutSlot = tPutFreeSlots.get(i); if (isAllowedToPutIntoSlot(tPutInventory, tPutSlot, aPutTo, tGrabStack, (byte) 64)) { // allowed, now do moving - int tMoved = moveStackFromSlotAToSlotB(aTileEntity1, tPutInventory, grabSlot, tPutSlot, aMaxTargetStackSize, aMinTargetStackSize, (byte) (aMaxMoveAtOnce - tMovedItems), aMinMoveAtOnce); + int tMoved = moveStackFromSlotAToSlotB( + aTileEntity1, + tPutInventory, + grabSlot, + tPutSlot, + aMaxTargetStackSize, + aMinTargetStackSize, + (byte) (aMaxMoveAtOnce - tMovedItems), + aMinMoveAtOnce); if (tMoved > 0) { ItemStack s = tPutInventory.getStackInSlot(tPutSlot); if (s != null) { // s might be null if tPutInventory is very special, e.g. infinity chest // if s is null, we will not mark this slot as target candidate for anything - int spare = Math.min(s.getMaxStackSize(), tPutInventory.getInventoryStackLimit()) - s.stackSize; + int spare = + Math.min(s.getMaxStackSize(), tPutInventory.getInventoryStackLimit()) + - s.stackSize; if (spare > 0) { ItemId ssID = ItemId.createNoCopy(s); // add back to spare space count tPutItems.merge(ssID, spare, Integer::sum); // add to partially filled slot list - tPutItemStacks.computeIfAbsent(ssID, k -> new ArrayList<>()).add(s); + tPutItemStacks + .computeIfAbsent(ssID, k -> new ArrayList<>()) + .add(s); } // this is no longer free tPutFreeSlots.remove(i); @@ -780,8 +993,7 @@ public class GT_Utility { tTotalItemsMoved += tMoved; tMovedItems += tMoved; tStackSize -= tMoved; - if (tStackSize == 0) - break; + if (tStackSize == 0) break; } } } @@ -789,22 +1001,44 @@ public class GT_Utility { if (tMovedItems > 0) { // check if we have moved enough stacks - if (++tStacksMoved >= aMaxStackTransfer) - return tTotalItemsMoved; + if (++tStacksMoved >= aMaxStackTransfer) return tTotalItemsMoved; } - } while (tMovedItems > 0 && tStackSize > 0); //support inventories that store more than a stack in a slot + } while (tMovedItems > 0 + && tStackSize > 0); // support inventories that store more than a stack in a slot } // check if source is a double chest, if yes, try move from the adjacent as well if (aDoCheckChests && aTileEntity1 instanceof TileEntityChest) { - int tAmount = moveFromAdjacentChests((TileEntityChest) aTileEntity1, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, aMaxStackTransfer - tStacksMoved); - if (tAmount != 0) return tAmount+tTotalItemsMoved; + int tAmount = moveFromAdjacentChests( + (TileEntityChest) aTileEntity1, + aTileEntity2, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + aMaxStackTransfer - tStacksMoved); + if (tAmount != 0) return tAmount + tTotalItemsMoved; } // check if target is a double chest, if yes, try move to the adjacent as well if (aDoCheckChests && aTileEntity2 instanceof TileEntityChest) { - int tAmount = moveToAdjacentChests(aTileEntity1, (TileEntityChest) aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, aMaxStackTransfer - tStacksMoved); - if (tAmount != 0) return tAmount+tTotalItemsMoved; + int tAmount = moveToAdjacentChests( + aTileEntity1, + (TileEntityChest) aTileEntity2, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + aMaxStackTransfer - tStacksMoved); + if (tAmount != 0) return tAmount + tTotalItemsMoved; } return tTotalItemsMoved; @@ -814,61 +1048,224 @@ public class GT_Utility { int tTotalItemsMoved = 0; int tGrabInventorySize = tGrabSlots.length; for (int i = 0; i < tGrabInventorySize; i++) { - int tMoved = moveStackIntoPipe(aTileEntity1, aTileEntity2, tGrabSlots, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, aDoCheckChests); - if (tMoved == 0) - return tTotalItemsMoved; - else - tTotalItemsMoved += tMoved; + int tMoved = moveStackIntoPipe( + aTileEntity1, + aTileEntity2, + tGrabSlots, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + aDoCheckChests); + if (tMoved == 0) return tTotalItemsMoved; + else tTotalItemsMoved += tMoved; } - return 0; + return 0; } - private static int moveToAdjacentChests(IInventory aTileEntity1, TileEntityChest aTargetChest, byte aGrabFrom, byte aPutTo, List<ItemStack> aFilter, boolean aInvertFilter, byte aMaxTargetStackSize, byte aMinTargetStackSize, byte aMaxMoveAtOnce, byte aMinMoveAtOnce, int aMaxStackTransfer) { + private static int moveToAdjacentChests( + IInventory aTileEntity1, + TileEntityChest aTargetChest, + byte aGrabFrom, + byte aPutTo, + List<ItemStack> aFilter, + boolean aInvertFilter, + byte aMaxTargetStackSize, + byte aMinTargetStackSize, + byte aMaxMoveAtOnce, + byte aMinMoveAtOnce, + int aMaxStackTransfer) { if (aTargetChest.adjacentChestChecked) { if (aTargetChest.adjacentChestXNeg != null) { - return moveMultipleItemStacks(aTileEntity1, aTargetChest.adjacentChestXNeg, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, aMaxStackTransfer, false); + return moveMultipleItemStacks( + aTileEntity1, + aTargetChest.adjacentChestXNeg, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + aMaxStackTransfer, + false); } else if (aTargetChest.adjacentChestZNeg != null) { - return moveMultipleItemStacks(aTileEntity1, aTargetChest.adjacentChestZNeg, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, aMaxStackTransfer, false); + return moveMultipleItemStacks( + aTileEntity1, + aTargetChest.adjacentChestZNeg, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + aMaxStackTransfer, + false); } else if (aTargetChest.adjacentChestXPos != null) { - return moveMultipleItemStacks(aTileEntity1, aTargetChest.adjacentChestXPos, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, aMaxStackTransfer, false); + return moveMultipleItemStacks( + aTileEntity1, + aTargetChest.adjacentChestXPos, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + aMaxStackTransfer, + false); } else if (aTargetChest.adjacentChestZPos != null) { - return moveMultipleItemStacks(aTileEntity1, aTargetChest.adjacentChestZPos, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, aMaxStackTransfer, false); + return moveMultipleItemStacks( + aTileEntity1, + aTargetChest.adjacentChestZPos, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + aMaxStackTransfer, + false); } } return 0; } - private static int moveFromAdjacentChests(TileEntityChest aChest, Object aTileEntity2, byte aGrabFrom, byte aPutTo, List<ItemStack> aFilter, boolean aInvertFilter, byte aMaxTargetStackSize, byte aMinTargetStackSize, byte aMaxMoveAtOnce, byte aMinMoveAtOnce, int aMaxStackTransfer) { + private static int moveFromAdjacentChests( + TileEntityChest aChest, + Object aTileEntity2, + byte aGrabFrom, + byte aPutTo, + List<ItemStack> aFilter, + boolean aInvertFilter, + byte aMaxTargetStackSize, + byte aMinTargetStackSize, + byte aMaxMoveAtOnce, + byte aMinMoveAtOnce, + int aMaxStackTransfer) { if (aChest.adjacentChestXNeg != null) { - return moveMultipleItemStacks(aChest.adjacentChestXNeg, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, aMaxStackTransfer, false); + return moveMultipleItemStacks( + aChest.adjacentChestXNeg, + aTileEntity2, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + aMaxStackTransfer, + false); } else if (aChest.adjacentChestZNeg != null) { - return moveMultipleItemStacks(aChest.adjacentChestZNeg, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, aMaxStackTransfer, false); + return moveMultipleItemStacks( + aChest.adjacentChestZNeg, + aTileEntity2, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + aMaxStackTransfer, + false); } else if (aChest.adjacentChestXPos != null) { - return moveMultipleItemStacks(aChest.adjacentChestXPos, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, aMaxStackTransfer, false); + return moveMultipleItemStacks( + aChest.adjacentChestXPos, + aTileEntity2, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + aMaxStackTransfer, + false); } else if (aChest.adjacentChestZPos != null) { - return moveMultipleItemStacks(aChest.adjacentChestZPos, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, aMaxStackTransfer, false); + return moveMultipleItemStacks( + aChest.adjacentChestZPos, + aTileEntity2, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + aMaxStackTransfer, + false); } return 0; } - /** * Moves Stack from Inv-Side to Inv-Side. * * @return the Amount of moved Items */ - public static byte moveOneItemStack(Object aTileEntity1, Object aTileEntity2, byte aGrabFrom, byte aPutTo, List<ItemStack> aFilter, boolean aInvertFilter, byte aMaxTargetStackSize, byte aMinTargetStackSize, byte aMaxMoveAtOnce, byte aMinMoveAtOnce) { + public static byte moveOneItemStack( + Object aTileEntity1, + Object aTileEntity2, + byte aGrabFrom, + byte aPutTo, + List<ItemStack> aFilter, + boolean aInvertFilter, + byte aMaxTargetStackSize, + byte aMinTargetStackSize, + byte aMaxMoveAtOnce, + byte aMinMoveAtOnce) { if (aTileEntity1 instanceof IInventory) - return moveOneItemStack((IInventory) aTileEntity1, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, true); + return moveOneItemStack( + (IInventory) aTileEntity1, + aTileEntity2, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + true); return 0; } /** * This is only because I needed an additional Parameter for the Double Chest Check. */ - private static byte moveOneItemStack(IInventory aTileEntity1, Object aTileEntity2, byte aGrabFrom, byte aPutTo, List<ItemStack> aFilter, boolean aInvertFilter, byte aMaxTargetStackSize, byte aMinTargetStackSize, byte aMaxMoveAtOnce, byte aMinMoveAtOnce, boolean aDoCheckChests) { - if (aTileEntity1 == null || aMaxTargetStackSize <= 0 || aMinTargetStackSize <= 0 || aMaxMoveAtOnce <= 0 || aMinTargetStackSize > aMaxTargetStackSize || aMinMoveAtOnce > aMaxMoveAtOnce) - return 0; + private static byte moveOneItemStack( + IInventory aTileEntity1, + Object aTileEntity2, + byte aGrabFrom, + byte aPutTo, + List<ItemStack> aFilter, + boolean aInvertFilter, + byte aMaxTargetStackSize, + byte aMinTargetStackSize, + byte aMaxMoveAtOnce, + byte aMinMoveAtOnce, + boolean aDoCheckChests) { + if (aTileEntity1 == null + || aMaxTargetStackSize <= 0 + || aMinTargetStackSize <= 0 + || aMaxMoveAtOnce <= 0 + || aMinTargetStackSize > aMaxTargetStackSize + || aMinMoveAtOnce > aMaxMoveAtOnce) return 0; int[] tGrabSlots = null; if (aTileEntity1 instanceof ISidedInventory) @@ -892,12 +1289,22 @@ public class GT_Utility { byte tMovedItemCount = 0; ItemStack tGrabStack = aTileEntity1.getStackInSlot(tGrabSlot); if (listContainsItem(aFilter, tGrabStack, true, aInvertFilter)) { - if (tGrabStack.stackSize >= aMinMoveAtOnce && isAllowedToTakeFromSlot(aTileEntity1, tGrabSlot, aGrabFrom, tGrabStack)) { + if (tGrabStack.stackSize >= aMinMoveAtOnce + && isAllowedToTakeFromSlot(aTileEntity1, tGrabSlot, aGrabFrom, tGrabStack)) { for (int tPutSlot : tPutSlots) { - if (isAllowedToPutIntoSlot((IInventory) aTileEntity2, tPutSlot, aPutTo, tGrabStack, aMaxTargetStackSize)) { - tMovedItemCount += moveStackFromSlotAToSlotB(aTileEntity1, (IInventory) aTileEntity2, tGrabSlot, tPutSlot, aMaxTargetStackSize, aMinTargetStackSize, (byte) (aMaxMoveAtOnce - tMovedItemCount), aMinMoveAtOnce); - if (tMovedItemCount >= aMaxMoveAtOnce || (tMovedItemCount > 0 && aMaxTargetStackSize < 64)) - return tMovedItemCount; + if (isAllowedToPutIntoSlot( + (IInventory) aTileEntity2, tPutSlot, aPutTo, tGrabStack, aMaxTargetStackSize)) { + tMovedItemCount += moveStackFromSlotAToSlotB( + aTileEntity1, + (IInventory) aTileEntity2, + tGrabSlot, + tPutSlot, + aMaxTargetStackSize, + aMinTargetStackSize, + (byte) (aMaxMoveAtOnce - tMovedItemCount), + aMinMoveAtOnce); + if (tMovedItemCount >= aMaxMoveAtOnce + || (tMovedItemCount > 0 && aMaxTargetStackSize < 64)) return tMovedItemCount; } } } @@ -910,13 +1317,57 @@ public class GT_Utility { if (tTileEntity1.adjacentChestChecked) { byte tAmount = 0; if (tTileEntity1.adjacentChestXNeg != null) { - tAmount = moveOneItemStack(tTileEntity1.adjacentChestXNeg, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, false); + tAmount = moveOneItemStack( + tTileEntity1.adjacentChestXNeg, + aTileEntity2, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + false); } else if (tTileEntity1.adjacentChestZNeg != null) { - tAmount = moveOneItemStack(tTileEntity1.adjacentChestZNeg, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, false); + tAmount = moveOneItemStack( + tTileEntity1.adjacentChestZNeg, + aTileEntity2, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + false); } else if (tTileEntity1.adjacentChestXPos != null) { - tAmount = moveOneItemStack(tTileEntity1.adjacentChestXPos, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, false); + tAmount = moveOneItemStack( + tTileEntity1.adjacentChestXPos, + aTileEntity2, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + false); } else if (tTileEntity1.adjacentChestZPos != null) { - tAmount = moveOneItemStack(tTileEntity1.adjacentChestZPos, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, false); + tAmount = moveOneItemStack( + tTileEntity1.adjacentChestZPos, + aTileEntity2, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + false); } if (tAmount != 0) return tAmount; } @@ -926,20 +1377,76 @@ public class GT_Utility { if (tTileEntity2.adjacentChestChecked) { byte tAmount = 0; if (tTileEntity2.adjacentChestXNeg != null) { - tAmount = moveOneItemStack(aTileEntity1, tTileEntity2.adjacentChestXNeg, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, false); + tAmount = moveOneItemStack( + aTileEntity1, + tTileEntity2.adjacentChestXNeg, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + false); } else if (tTileEntity2.adjacentChestZNeg != null) { - tAmount = moveOneItemStack(aTileEntity1, tTileEntity2.adjacentChestZNeg, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, false); + tAmount = moveOneItemStack( + aTileEntity1, + tTileEntity2.adjacentChestZNeg, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + false); } else if (tTileEntity2.adjacentChestXPos != null) { - tAmount = moveOneItemStack(aTileEntity1, tTileEntity2.adjacentChestXPos, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, false); + tAmount = moveOneItemStack( + aTileEntity1, + tTileEntity2.adjacentChestXPos, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + false); } else if (tTileEntity2.adjacentChestZPos != null) { - tAmount = moveOneItemStack(aTileEntity1, tTileEntity2.adjacentChestZPos, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, false); + tAmount = moveOneItemStack( + aTileEntity1, + tTileEntity2.adjacentChestZPos, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + false); } if (tAmount != 0) return tAmount; } } } - return moveStackIntoPipe(aTileEntity1, aTileEntity2, tGrabSlots, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, aDoCheckChests); + return moveStackIntoPipe( + aTileEntity1, + aTileEntity2, + tGrabSlots, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + aDoCheckChests); } /** @@ -947,9 +1454,25 @@ public class GT_Utility { * * @return the Amount of moved Items */ - public static byte moveOneItemStackIntoSlot(Object aTileEntity1, Object aTileEntity2, byte aGrabFrom, int aPutTo, List<ItemStack> aFilter, boolean aInvertFilter, byte aMaxTargetStackSize, byte aMinTargetStackSize, byte aMaxMoveAtOnce, byte aMinMoveAtOnce) { - if (aTileEntity1 == null || !(aTileEntity1 instanceof IInventory) || aPutTo < 0 || aMaxTargetStackSize <= 0 || aMinTargetStackSize <= 0 || aMaxMoveAtOnce <= 0 || aMinTargetStackSize > aMaxTargetStackSize || aMinMoveAtOnce > aMaxMoveAtOnce) - return 0; + public static byte moveOneItemStackIntoSlot( + Object aTileEntity1, + Object aTileEntity2, + byte aGrabFrom, + int aPutTo, + List<ItemStack> aFilter, + boolean aInvertFilter, + byte aMaxTargetStackSize, + byte aMinTargetStackSize, + byte aMaxMoveAtOnce, + byte aMinMoveAtOnce) { + if (aTileEntity1 == null + || !(aTileEntity1 instanceof IInventory) + || aPutTo < 0 + || aMaxTargetStackSize <= 0 + || aMinTargetStackSize <= 0 + || aMaxMoveAtOnce <= 0 + || aMinTargetStackSize > aMaxTargetStackSize + || aMinMoveAtOnce > aMaxMoveAtOnce) return 0; int[] tGrabSlots = null; if (aTileEntity1 instanceof ISidedInventory) @@ -961,10 +1484,28 @@ public class GT_Utility { if (aTileEntity2 instanceof IInventory) { for (int tGrabSlot : tGrabSlots) { - if (listContainsItem(aFilter, ((IInventory) aTileEntity1).getStackInSlot(tGrabSlot), true, aInvertFilter)) { - if (isAllowedToTakeFromSlot((IInventory) aTileEntity1, tGrabSlot, aGrabFrom, ((IInventory) aTileEntity1).getStackInSlot(tGrabSlot))) { - if (isAllowedToPutIntoSlot((IInventory) aTileEntity2, aPutTo, (byte) 6, ((IInventory) aTileEntity1).getStackInSlot(tGrabSlot), aMaxTargetStackSize)) { - byte tMovedItemCount = moveStackFromSlotAToSlotB((IInventory) aTileEntity1, (IInventory) aTileEntity2, tGrabSlot, aPutTo, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce); + if (listContainsItem( + aFilter, ((IInventory) aTileEntity1).getStackInSlot(tGrabSlot), true, aInvertFilter)) { + if (isAllowedToTakeFromSlot( + (IInventory) aTileEntity1, + tGrabSlot, + aGrabFrom, + ((IInventory) aTileEntity1).getStackInSlot(tGrabSlot))) { + if (isAllowedToPutIntoSlot( + (IInventory) aTileEntity2, + aPutTo, + (byte) 6, + ((IInventory) aTileEntity1).getStackInSlot(tGrabSlot), + aMaxTargetStackSize)) { + byte tMovedItemCount = moveStackFromSlotAToSlotB( + (IInventory) aTileEntity1, + (IInventory) aTileEntity2, + tGrabSlot, + aPutTo, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce); if (tMovedItemCount > 0) return tMovedItemCount; } } @@ -972,7 +1513,18 @@ public class GT_Utility { } } - moveStackIntoPipe(((IInventory) aTileEntity1), aTileEntity2, tGrabSlots, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce); + moveStackIntoPipe( + ((IInventory) aTileEntity1), + aTileEntity2, + tGrabSlots, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce); return 0; } @@ -981,13 +1533,39 @@ public class GT_Utility { * * @return the Amount of moved Items */ - public static byte moveFromSlotToSlot(IInventory aTileEntity1, IInventory aTileEntity2, int aGrabFrom, int aPutTo, List<ItemStack> aFilter, boolean aInvertFilter, byte aMaxTargetStackSize, byte aMinTargetStackSize, byte aMaxMoveAtOnce, byte aMinMoveAtOnce) { - if (aTileEntity1 == null || aTileEntity2 == null || aGrabFrom < 0 || aPutTo < 0 || aMaxTargetStackSize <= 0 || aMinTargetStackSize <= 0 || aMaxMoveAtOnce <= 0 || aMinTargetStackSize > aMaxTargetStackSize || aMinMoveAtOnce > aMaxMoveAtOnce) - return 0; + public static byte moveFromSlotToSlot( + IInventory aTileEntity1, + IInventory aTileEntity2, + int aGrabFrom, + int aPutTo, + List<ItemStack> aFilter, + boolean aInvertFilter, + byte aMaxTargetStackSize, + byte aMinTargetStackSize, + byte aMaxMoveAtOnce, + byte aMinMoveAtOnce) { + if (aTileEntity1 == null + || aTileEntity2 == null + || aGrabFrom < 0 + || aPutTo < 0 + || aMaxTargetStackSize <= 0 + || aMinTargetStackSize <= 0 + || aMaxMoveAtOnce <= 0 + || aMinTargetStackSize > aMaxTargetStackSize + || aMinMoveAtOnce > aMaxMoveAtOnce) return 0; if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(aGrabFrom), true, aInvertFilter)) { if (isAllowedToTakeFromSlot(aTileEntity1, aGrabFrom, (byte) 6, aTileEntity1.getStackInSlot(aGrabFrom))) { - if (isAllowedToPutIntoSlot(aTileEntity2, aPutTo, (byte) 6, aTileEntity1.getStackInSlot(aGrabFrom), aMaxTargetStackSize)) { - byte tMovedItemCount = moveStackFromSlotAToSlotB(aTileEntity1, aTileEntity2, aGrabFrom, aPutTo, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce); + if (isAllowedToPutIntoSlot( + aTileEntity2, aPutTo, (byte) 6, aTileEntity1.getStackInSlot(aGrabFrom), aMaxTargetStackSize)) { + byte tMovedItemCount = moveStackFromSlotAToSlotB( + aTileEntity1, + aTileEntity2, + aGrabFrom, + aPutTo, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce); if (tMovedItemCount > 0) return tMovedItemCount; } } @@ -1000,12 +1578,27 @@ public class GT_Utility { * * @return the Amount of moved Items */ - public static byte moveFromSlotToSide(IInventory fromTile, Object toTile, int aGrabFrom, byte aPutTo, List<ItemStack> aFilter, boolean aInvertFilter, byte aMaxTargetStackSize, byte aMinTargetStackSize, byte aMaxMoveAtOnce, byte aMinMoveAtOnce, boolean aDoCheckChests) { - if (fromTile == null || aGrabFrom < 0 || aMinTargetStackSize <= 0 || aMaxMoveAtOnce <= 0 || aMinTargetStackSize > aMaxTargetStackSize || aMinMoveAtOnce > aMaxMoveAtOnce) - return 0; - - if (!listContainsItem(aFilter, fromTile.getStackInSlot(aGrabFrom), true, aInvertFilter) || - !isAllowedToTakeFromSlot(fromTile, aGrabFrom, (byte) 6, fromTile.getStackInSlot(aGrabFrom))) + public static byte moveFromSlotToSide( + IInventory fromTile, + Object toTile, + int aGrabFrom, + byte aPutTo, + List<ItemStack> aFilter, + boolean aInvertFilter, + byte aMaxTargetStackSize, + byte aMinTargetStackSize, + byte aMaxMoveAtOnce, + byte aMinMoveAtOnce, + boolean aDoCheckChests) { + if (fromTile == null + || aGrabFrom < 0 + || aMinTargetStackSize <= 0 + || aMaxMoveAtOnce <= 0 + || aMinTargetStackSize > aMaxTargetStackSize + || aMinMoveAtOnce > aMaxMoveAtOnce) return 0; + + if (!listContainsItem(aFilter, fromTile.getStackInSlot(aGrabFrom), true, aInvertFilter) + || !isAllowedToTakeFromSlot(fromTile, aGrabFrom, (byte) 6, fromTile.getStackInSlot(aGrabFrom))) return 0; if (toTile instanceof IInventory) { @@ -1020,11 +1613,23 @@ public class GT_Utility { byte tMovedItemCount = 0; for (int tPutSlot : tPutSlots) { - if (isAllowedToPutIntoSlot((IInventory) toTile, tPutSlot, aPutTo, fromTile.getStackInSlot(aGrabFrom), aMaxTargetStackSize)) { - tMovedItemCount += moveStackFromSlotAToSlotB(fromTile, (IInventory) toTile, aGrabFrom, tPutSlot, aMaxTargetStackSize, aMinTargetStackSize, (byte) (aMaxMoveAtOnce - tMovedItemCount), aMinMoveAtOnce); + if (isAllowedToPutIntoSlot( + (IInventory) toTile, + tPutSlot, + aPutTo, + fromTile.getStackInSlot(aGrabFrom), + aMaxTargetStackSize)) { + tMovedItemCount += moveStackFromSlotAToSlotB( + fromTile, + (IInventory) toTile, + aGrabFrom, + tPutSlot, + aMaxTargetStackSize, + aMinTargetStackSize, + (byte) (aMaxMoveAtOnce - tMovedItemCount), + aMinMoveAtOnce); if (tMovedItemCount >= aMaxMoveAtOnce) { return tMovedItemCount; - } } } @@ -1034,26 +1639,104 @@ public class GT_Utility { TileEntityChest tTileEntity2 = (TileEntityChest) toTile; if (tTileEntity2.adjacentChestChecked) { if (tTileEntity2.adjacentChestXNeg != null) { - tMovedItemCount = moveFromSlotToSide(fromTile, tTileEntity2.adjacentChestXNeg, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, false); + tMovedItemCount = moveFromSlotToSide( + fromTile, + tTileEntity2.adjacentChestXNeg, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + false); } else if (tTileEntity2.adjacentChestZNeg != null) { - tMovedItemCount = moveFromSlotToSide(fromTile, tTileEntity2.adjacentChestZNeg, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, false); + tMovedItemCount = moveFromSlotToSide( + fromTile, + tTileEntity2.adjacentChestZNeg, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + false); } else if (tTileEntity2.adjacentChestXPos != null) { - tMovedItemCount = moveFromSlotToSide(fromTile, tTileEntity2.adjacentChestXPos, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, false); + tMovedItemCount = moveFromSlotToSide( + fromTile, + tTileEntity2.adjacentChestXPos, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + false); } else if (tTileEntity2.adjacentChestZPos != null) { - tMovedItemCount = moveFromSlotToSide(fromTile, tTileEntity2.adjacentChestZPos, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, false); + tMovedItemCount = moveFromSlotToSide( + fromTile, + tTileEntity2.adjacentChestZPos, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + false); } if (tMovedItemCount > 0) return tMovedItemCount; } } } - return moveStackIntoPipe(fromTile, toTile, new int[]{aGrabFrom}, (byte) 6, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, aDoCheckChests); - } - - public static byte moveFromSlotToSide(IInventory fromTile, Object toTile, int aGrabFrom, byte aPutTo, List<ItemStack> aFilter, boolean aInvertFilter, byte aMaxTargetStackSize, byte aMinTargetStackSize, byte aMaxMoveAtOnce, byte aMinMoveAtOnce) { - return moveFromSlotToSide(fromTile, toTile, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, true); - } - - public static boolean listContainsItem(Collection<ItemStack> aList, ItemStack aStack, boolean aTIfListEmpty, boolean aInvertFilter) { + return moveStackIntoPipe( + fromTile, + toTile, + new int[] {aGrabFrom}, + (byte) 6, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + aDoCheckChests); + } + + public static byte moveFromSlotToSide( + IInventory fromTile, + Object toTile, + int aGrabFrom, + byte aPutTo, + List<ItemStack> aFilter, + boolean aInvertFilter, + byte aMaxTargetStackSize, + byte aMinTargetStackSize, + byte aMaxMoveAtOnce, + byte aMinMoveAtOnce) { + return moveFromSlotToSide( + fromTile, + toTile, + aGrabFrom, + aPutTo, + aFilter, + aInvertFilter, + aMaxTargetStackSize, + aMinTargetStackSize, + aMaxMoveAtOnce, + aMinMoveAtOnce, + true); + } + + public static boolean listContainsItem( + Collection<ItemStack> aList, ItemStack aStack, boolean aTIfListEmpty, boolean aInvertFilter) { if (aStack == null || aStack.stackSize < 1) return false; if (aList == null) return aTIfListEmpty; boolean tEmpty = true; @@ -1071,7 +1754,12 @@ public class GT_Utility { public static boolean areStacksOrToolsEqual(ItemStack aStack1, ItemStack aStack2) { if (aStack1 != null && aStack2 != null && aStack1.getItem() == aStack2.getItem()) { if (aStack1.getItem().isDamageable()) return true; - return ((aStack1.getTagCompound() == null) == (aStack2.getTagCompound() == null)) && (aStack1.getTagCompound() == null || aStack1.getTagCompound().equals(aStack2.getTagCompound())) && (Items.feather.getDamage(aStack1) == Items.feather.getDamage(aStack2) || Items.feather.getDamage(aStack1) == W || Items.feather.getDamage(aStack2) == W); + return ((aStack1.getTagCompound() == null) == (aStack2.getTagCompound() == null)) + && (aStack1.getTagCompound() == null + || aStack1.getTagCompound().equals(aStack2.getTagCompound())) + && (Items.feather.getDamage(aStack1) == Items.feather.getDamage(aStack2) + || Items.feather.getDamage(aStack1) == W + || Items.feather.getDamage(aStack2) == W); } return false; } @@ -1081,7 +1769,12 @@ public class GT_Utility { } public static boolean areFluidsEqual(FluidStack aFluid1, FluidStack aFluid2, boolean aIgnoreNBT) { - return aFluid1 != null && aFluid2 != null && aFluid1.getFluid() == aFluid2.getFluid() && (aIgnoreNBT || ((aFluid1.tag == null) == (aFluid2.tag == null)) && (aFluid1.tag == null || aFluid1.tag.equals(aFluid2.tag))); + return aFluid1 != null + && aFluid2 != null + && aFluid1.getFluid() == aFluid2.getFluid() + && (aIgnoreNBT + || ((aFluid1.tag == null) == (aFluid2.tag == null)) + && (aFluid1.tag == null || aFluid1.tag.equals(aFluid2.tag))); } public static boolean areStacksEqual(ItemStack aStack1, ItemStack aStack2) { @@ -1089,9 +1782,16 @@ public class GT_Utility { } public static boolean areStacksEqual(ItemStack aStack1, ItemStack aStack2, boolean aIgnoreNBT) { - return aStack1 != null && aStack2 != null && aStack1.getItem() == aStack2.getItem() - && (aIgnoreNBT || (((aStack1.getTagCompound() == null) == (aStack2.getTagCompound() == null)) && (aStack1.getTagCompound() == null || aStack1.getTagCompound().equals(aStack2.getTagCompound())))) - && (Items.feather.getDamage(aStack1) == Items.feather.getDamage(aStack2) || Items.feather.getDamage(aStack1) == W || Items.feather.getDamage(aStack2) == W); + return aStack1 != null + && aStack2 != null + && aStack1.getItem() == aStack2.getItem() + && (aIgnoreNBT + || (((aStack1.getTagCompound() == null) == (aStack2.getTagCompound() == null)) + && (aStack1.getTagCompound() == null + || aStack1.getTagCompound().equals(aStack2.getTagCompound())))) + && (Items.feather.getDamage(aStack1) == Items.feather.getDamage(aStack2) + || Items.feather.getDamage(aStack1) == W + || Items.feather.getDamage(aStack2) == W); } /** @@ -1099,23 +1799,24 @@ public class GT_Utility { * * Since ItemStack doesn't override equals and hashCode, you cannot just use Objects.equals */ - public static boolean areStackListsEqual(List<ItemStack> lhs, List<ItemStack> rhs, boolean ignoreStackSize, boolean ignoreNBT) { + public static boolean areStackListsEqual( + List<ItemStack> lhs, List<ItemStack> rhs, boolean ignoreStackSize, boolean ignoreNBT) { if (lhs == null) return rhs == null; if (rhs == null) return false; if (lhs.size() != rhs.size()) return false; for (Iterator<ItemStack> it1 = lhs.iterator(), it2 = rhs.iterator(); it1.hasNext() && it2.hasNext(); ) { - if (!areStacksEqualExtended(it1.next(), it2.next(), ignoreStackSize, ignoreNBT)) - return false; + if (!areStacksEqualExtended(it1.next(), it2.next(), ignoreStackSize, ignoreNBT)) return false; } return true; } - private static boolean areStacksEqualExtended(ItemStack lhs, ItemStack rhs, boolean ignoreStackSize, boolean ignoreNBT) { + private static boolean areStacksEqualExtended( + ItemStack lhs, ItemStack rhs, boolean ignoreStackSize, boolean ignoreNBT) { if (lhs == null) return rhs == null; if (rhs == null) return false; - return lhs.getItem() == rhs.getItem() && - (ignoreNBT || Objects.equals(lhs.stackTagCompound, rhs.stackTagCompound)) && - (ignoreStackSize || lhs.stackSize == rhs.stackSize); + return lhs.getItem() == rhs.getItem() + && (ignoreNBT || Objects.equals(lhs.stackTagCompound, rhs.stackTagCompound)) + && (ignoreStackSize || lhs.stackSize == rhs.stackSize); } public static boolean areUnificationsEqual(ItemStack aStack1, ItemStack aStack2) { @@ -1123,7 +1824,8 @@ public class GT_Utility { } public static boolean areUnificationsEqual(ItemStack aStack1, ItemStack aStack2, boolean aIgnoreNBT) { - return areStacksEqual(GT_OreDictUnificator.get_nocopy(aStack1), GT_OreDictUnificator.get_nocopy(aStack2), aIgnoreNBT); + return areStacksEqual( + GT_OreDictUnificator.get_nocopy(aStack1), GT_OreDictUnificator.get_nocopy(aStack2), aIgnoreNBT); } public static String getFluidName(Fluid aFluid, boolean aLocalized) { @@ -1146,10 +1848,12 @@ public class GT_Utility { sFluidUnlocalizedNameToFluid.clear(); for (FluidContainerData tData : sFluidContainerList) { sFilledContainerToData.put(new GT_ItemStack(tData.filledContainer), tData); - Map<Fluid, FluidContainerData> tFluidToContainer = sEmptyContainerToFluidToData.get(new GT_ItemStack(tData.emptyContainer)); + Map<Fluid, FluidContainerData> tFluidToContainer = + sEmptyContainerToFluidToData.get(new GT_ItemStack(tData.emptyContainer)); List<ItemStack> tContainers = sFluidToContainers.get(tData.fluid.getFluid()); if (tFluidToContainer == null) { - sEmptyContainerToFluidToData.put(new GT_ItemStack(tData.emptyContainer), tFluidToContainer = new /*Concurrent*/HashMap<>()); + sEmptyContainerToFluidToData.put( + new GT_ItemStack(tData.emptyContainer), tFluidToContainer = new /*Concurrent*/ HashMap<>()); GregTech_API.sFluidMappings.add(tFluidToContainer); } tFluidToContainer.put(tData.fluid.getFluid(), tData); @@ -1157,8 +1861,7 @@ public class GT_Utility { tContainers = new ArrayList<>(); tContainers.add(tData.filledContainer); sFluidToContainers.put(tData.fluid.getFluid(), tContainers); - } - else tContainers.add(tData.filledContainer); + } else tContainers.add(tData.filledContainer); } for (Fluid tFluid : FluidRegistry.getRegisteredFluids().values()) { sFluidUnlocalizedNameToFluid.put(tFluid.getUnlocalizedName(), tFluid); @@ -1172,10 +1875,12 @@ public class GT_Utility { public static void addFluidContainerData(FluidContainerData aData) { sFluidContainerList.add(aData); sFilledContainerToData.put(new GT_ItemStack(aData.filledContainer), aData); - Map<Fluid, FluidContainerData> tFluidToContainer = sEmptyContainerToFluidToData.get(new GT_ItemStack(aData.emptyContainer)); + Map<Fluid, FluidContainerData> tFluidToContainer = + sEmptyContainerToFluidToData.get(new GT_ItemStack(aData.emptyContainer)); List<ItemStack> tContainers = sFluidToContainers.get(aData.fluid.getFluid()); if (tFluidToContainer == null) { - sEmptyContainerToFluidToData.put(new GT_ItemStack(aData.emptyContainer), tFluidToContainer = new /*Concurrent*/HashMap<>()); + sEmptyContainerToFluidToData.put( + new GT_ItemStack(aData.emptyContainer), tFluidToContainer = new /*Concurrent*/ HashMap<>()); GregTech_API.sFluidMappings.add(tFluidToContainer); } tFluidToContainer.put(aData.fluid.getFluid(), aData); @@ -1183,8 +1888,7 @@ public class GT_Utility { tContainers = new ArrayList<>(); tContainers.add(aData.filledContainer); sFluidToContainers.put(aData.fluid.getFluid(), tContainers); - } - else tContainers.add(aData.filledContainer); + } else tContainers.add(aData.filledContainer); } public static List<ItemStack> getContainersFromFluid(FluidStack tFluidStack) { @@ -1196,7 +1900,8 @@ public class GT_Utility { return new ArrayList<>(); } - public static ItemStack fillFluidContainer(FluidStack aFluid, ItemStack aStack, boolean aRemoveFluidDirectly, boolean aCheckIFluidContainerItems) { + public static ItemStack fillFluidContainer( + FluidStack aFluid, ItemStack aStack, boolean aRemoveFluidDirectly, boolean aCheckIFluidContainerItems) { if (isStackInvalid(aStack) || aFluid == null) return null; if (GT_ModHandler.isWater(aFluid) && ItemList.Bottle_Empty.isStackEqual(aStack)) { if (aFluid.amount >= 250) { @@ -1205,11 +1910,14 @@ public class GT_Utility { } return null; } - if (aCheckIFluidContainerItems && aStack.getItem() instanceof IFluidContainerItem && ((IFluidContainerItem) aStack.getItem()).getFluid(aStack) == null && ((IFluidContainerItem) aStack.getItem()).getCapacity(aStack) <= aFluid.amount) { + if (aCheckIFluidContainerItems + && aStack.getItem() instanceof IFluidContainerItem + && ((IFluidContainerItem) aStack.getItem()).getFluid(aStack) == null + && ((IFluidContainerItem) aStack.getItem()).getCapacity(aStack) <= aFluid.amount) { if (aRemoveFluidDirectly) - aFluid.amount -= ((IFluidContainerItem) aStack.getItem()).fill(aStack = copyAmount(1, aStack), aFluid, true); - else - ((IFluidContainerItem) aStack.getItem()).fill(aStack = copyAmount(1, aStack), aFluid, true); + aFluid.amount -= + ((IFluidContainerItem) aStack.getItem()).fill(aStack = copyAmount(1, aStack), aFluid, true); + else ((IFluidContainerItem) aStack.getItem()).fill(aStack = copyAmount(1, aStack), aFluid, true); return aStack; } Map<Fluid, FluidContainerData> tFluidToContainer = sEmptyContainerToFluidToData.get(new GT_ItemStack(aStack)); @@ -1247,25 +1955,29 @@ public class GT_Utility { } public static FluidStack getFluidFromDisplayStack(ItemStack aDisplayStack) { - if (!isStackValid(aDisplayStack) || - aDisplayStack.getItem() != ItemList.Display_Fluid.getItem() || - !aDisplayStack.hasTagCompound()) - return null; + if (!isStackValid(aDisplayStack) + || aDisplayStack.getItem() != ItemList.Display_Fluid.getItem() + || !aDisplayStack.hasTagCompound()) return null; Fluid tFluid = FluidRegistry.getFluid(ItemList.Display_Fluid.getItem().getDamage(aDisplayStack)); return new FluidStack(tFluid, (int) aDisplayStack.getTagCompound().getLong("mFluidDisplayAmount")); } public static boolean containsFluid(ItemStack aStack, FluidStack aFluid, boolean aCheckIFluidContainerItems) { if (isStackInvalid(aStack) || aFluid == null) return false; - if (aCheckIFluidContainerItems && aStack.getItem() instanceof IFluidContainerItem && ((IFluidContainerItem) aStack.getItem()).getCapacity(aStack) > 0) - return aFluid.isFluidEqual(((IFluidContainerItem) aStack.getItem()).getFluid(aStack = copyAmount(1, aStack))); + if (aCheckIFluidContainerItems + && aStack.getItem() instanceof IFluidContainerItem + && ((IFluidContainerItem) aStack.getItem()).getCapacity(aStack) > 0) + return aFluid.isFluidEqual( + ((IFluidContainerItem) aStack.getItem()).getFluid(aStack = copyAmount(1, aStack))); FluidContainerData tData = sFilledContainerToData.get(new GT_ItemStack(aStack)); return tData != null && tData.fluid.isFluidEqual(aFluid); } public static FluidStack getFluidForFilledItem(ItemStack aStack, boolean aCheckIFluidContainerItems) { if (isStackInvalid(aStack)) return null; - if (aCheckIFluidContainerItems && aStack.getItem() instanceof IFluidContainerItem && ((IFluidContainerItem) aStack.getItem()).getCapacity(aStack) > 0) + if (aCheckIFluidContainerItems + && aStack.getItem() instanceof IFluidContainerItem + && ((IFluidContainerItem) aStack.getItem()).getCapacity(aStack) > 0) return ((IFluidContainerItem) aStack.getItem()).drain(copyAmount(1, aStack), Integer.MAX_VALUE, true); FluidContainerData tData = sFilledContainerToData.get(new GT_ItemStack(aStack)); return tData == null ? null : tData.fluid.copy(); @@ -1278,7 +1990,9 @@ public class GT_Utility { if (isStackInvalid(aStack)) return null; FluidContainerData tData = sFilledContainerToData.get(new GT_ItemStack(aStack)); if (tData != null) return copyAmount(1, tData.emptyContainer); - if (aCheckIFluidContainerItems && aStack.getItem() instanceof IFluidContainerItem && ((IFluidContainerItem) aStack.getItem()).getCapacity(aStack) > 0) { + if (aCheckIFluidContainerItems + && aStack.getItem() instanceof IFluidContainerItem + && ((IFluidContainerItem) aStack.getItem()).getCapacity(aStack) > 0) { ((IFluidContainerItem) aStack.getItem()).drain(aStack = copyAmount(1, aStack), Integer.MAX_VALUE, true); return aStack; } @@ -1295,10 +2009,14 @@ public class GT_Utility { /** These are all special Cases, in which it is intended to have only GT Blocks outputting those Container Items */ if (ItemList.Cell_Empty.isStackEqual(aStack, false, true)) return null; if (ItemList.IC2_Fuel_Can_Filled.isStackEqual(aStack, false, true)) return ItemList.IC2_Fuel_Can_Empty.get(1); - if (aStack.getItem() == Items.potionitem || aStack.getItem() == Items.experience_bottle || ItemList.TF_Vial_FieryBlood.isStackEqual(aStack) || ItemList.TF_Vial_FieryTears.isStackEqual(aStack)) - return ItemList.Bottle_Empty.get(1); - - if (aCheckIFluidContainerItems && aStack.getItem() instanceof IFluidContainerItem && ((IFluidContainerItem) aStack.getItem()).getCapacity(aStack) > 0) { + if (aStack.getItem() == Items.potionitem + || aStack.getItem() == Items.experience_bottle + || ItemList.TF_Vial_FieryBlood.isStackEqual(aStack) + || ItemList.TF_Vial_FieryTears.isStackEqual(aStack)) return ItemList.Bottle_Empty.get(1); + + if (aCheckIFluidContainerItems + && aStack.getItem() instanceof IFluidContainerItem + && ((IFluidContainerItem) aStack.getItem()).getCapacity(aStack) > 0) { ItemStack tStack = copyAmount(1, aStack); ((IFluidContainerItem) aStack.getItem()).drain(tStack, Integer.MAX_VALUE, true); if (!areStacksEqual(aStack, tStack)) return tStack; @@ -1313,63 +2031,79 @@ public class GT_Utility { return null; } - public static synchronized boolean removeIC2BottleRecipe(ItemStack aContainer, ItemStack aInput, Map<ic2.api.recipe.ICannerBottleRecipeManager.Input, RecipeOutput> aRecipeList, ItemStack aOutput){ - if ((isStackInvalid(aInput) && isStackInvalid(aOutput) && isStackInvalid(aContainer)) || aRecipeList == null) return false; + public static synchronized boolean removeIC2BottleRecipe( + ItemStack aContainer, + ItemStack aInput, + Map<ic2.api.recipe.ICannerBottleRecipeManager.Input, RecipeOutput> aRecipeList, + ItemStack aOutput) { + if ((isStackInvalid(aInput) && isStackInvalid(aOutput) && isStackInvalid(aContainer)) || aRecipeList == null) + return false; boolean rReturn = false; - Iterator<Map.Entry<ic2.api.recipe.ICannerBottleRecipeManager.Input, RecipeOutput>> tIterator = aRecipeList.entrySet().iterator(); + Iterator<Map.Entry<ic2.api.recipe.ICannerBottleRecipeManager.Input, RecipeOutput>> tIterator = + aRecipeList.entrySet().iterator(); aOutput = GT_OreDictUnificator.get(aOutput); while (tIterator.hasNext()) { Map.Entry<ic2.api.recipe.ICannerBottleRecipeManager.Input, RecipeOutput> tEntry = tIterator.next(); if (aInput == null || tEntry.getKey().matches(aContainer, aInput)) { List<ItemStack> tList = tEntry.getValue().items; - if (tList != null) for (ItemStack tOutput : tList) - if (aOutput == null || areStacksEqual(GT_OreDictUnificator.get(tOutput), aOutput)) { - tIterator.remove(); - rReturn = true; - break; - } + if (tList != null) + for (ItemStack tOutput : tList) + if (aOutput == null || areStacksEqual(GT_OreDictUnificator.get(tOutput), aOutput)) { + tIterator.remove(); + rReturn = true; + break; + } } } return rReturn; } - public static synchronized boolean removeSimpleIC2MachineRecipe(ItemStack aInput, Map<IRecipeInput, RecipeOutput> aRecipeList, ItemStack aOutput) { + public static synchronized boolean removeSimpleIC2MachineRecipe( + ItemStack aInput, Map<IRecipeInput, RecipeOutput> aRecipeList, ItemStack aOutput) { if ((isStackInvalid(aInput) && isStackInvalid(aOutput)) || aRecipeList == null) return false; boolean rReturn = false; - Iterator<Map.Entry<IRecipeInput, RecipeOutput>> tIterator = aRecipeList.entrySet().iterator(); + Iterator<Map.Entry<IRecipeInput, RecipeOutput>> tIterator = + aRecipeList.entrySet().iterator(); aOutput = GT_OreDictUnificator.get(aOutput); while (tIterator.hasNext()) { Map.Entry<IRecipeInput, RecipeOutput> tEntry = tIterator.next(); if (aInput == null || tEntry.getKey().matches(aInput)) { List<ItemStack> tList = tEntry.getValue().items; - if (tList != null) for (ItemStack tOutput : tList) - if (aOutput == null || areStacksEqual(GT_OreDictUnificator.get(tOutput), aOutput)) { - tIterator.remove(); - rReturn = true; - break; - } + if (tList != null) + for (ItemStack tOutput : tList) + if (aOutput == null || areStacksEqual(GT_OreDictUnificator.get(tOutput), aOutput)) { + tIterator.remove(); + rReturn = true; + break; + } } } return rReturn; } - public static synchronized void bulkRemoveSimpleIC2MachineRecipe(Map<ItemStack, ItemStack> toRemove, Map<IRecipeInput, RecipeOutput> aRecipeList) { + public static synchronized void bulkRemoveSimpleIC2MachineRecipe( + Map<ItemStack, ItemStack> toRemove, Map<IRecipeInput, RecipeOutput> aRecipeList) { if (aRecipeList == null || aRecipeList.isEmpty()) return; toRemove.entrySet().removeIf(aEntry -> (isStackInvalid(aEntry.getKey()) && isStackInvalid(aEntry.getValue()))); - final Map<ItemStack, ItemStack> finalToRemove = Maps.transformValues(toRemove, GT_OreDictUnificator::get_nocopy); + final Map<ItemStack, ItemStack> finalToRemove = + Maps.transformValues(toRemove, GT_OreDictUnificator::get_nocopy); - aRecipeList.entrySet().removeIf(tEntry -> finalToRemove.entrySet().stream().anyMatch(aEntry -> { - final ItemStack aInput = aEntry.getKey(), aOutput = aEntry.getValue(); - final List<ItemStack> tList = tEntry.getValue().items; + aRecipeList.entrySet().removeIf(tEntry -> finalToRemove.entrySet().stream() + .anyMatch(aEntry -> { + final ItemStack aInput = aEntry.getKey(), aOutput = aEntry.getValue(); + final List<ItemStack> tList = tEntry.getValue().items; - if (tList == null) return false; - if (aInput != null && !tEntry.getKey().matches(aInput)) return false; + if (tList == null) return false; + if (aInput != null && !tEntry.getKey().matches(aInput)) return false; - return tList.stream().anyMatch(tOutput -> (aOutput == null || areStacksEqual(GT_OreDictUnificator.get(tOutput), aOutput))); - })); + return tList.stream() + .anyMatch(tOutput -> + (aOutput == null || areStacksEqual(GT_OreDictUnificator.get(tOutput), aOutput))); + })); } - public static boolean addSimpleIC2MachineRecipe(ItemStack aInput, Map<IRecipeInput, RecipeOutput> aRecipeList, NBTTagCompound aNBT, Object... aOutput) { + public static boolean addSimpleIC2MachineRecipe( + ItemStack aInput, Map<IRecipeInput, RecipeOutput> aRecipeList, NBTTagCompound aNBT, Object... aOutput) { if (isStackInvalid(aInput) || aOutput.length == 0 || aRecipeList == null) return false; ItemData tOreName = GT_OreDictUnificator.getAssociation(aInput); for (Object o : aOutput) { @@ -1379,12 +2113,15 @@ public class GT_Utility { } } ItemStack[] tStack = GT_OreDictUnificator.getStackArray(true, aOutput); - if(tStack.length > 0 && areStacksEqual(aInput, tStack[0]))return false; + if (tStack.length > 0 && areStacksEqual(aInput, tStack[0])) return false; if (tOreName != null) { - if(tOreName.toString().equals("dustAsh")&&tStack[0].getUnlocalizedName().equals("tile.volcanicAsh"))return false; - aRecipeList.put(new RecipeInputOreDict(tOreName.toString(), aInput.stackSize), new RecipeOutput(aNBT, tStack)); + if (tOreName.toString().equals("dustAsh") + && tStack[0].getUnlocalizedName().equals("tile.volcanicAsh")) return false; + aRecipeList.put( + new RecipeInputOreDict(tOreName.toString(), aInput.stackSize), new RecipeOutput(aNBT, tStack)); } else { - aRecipeList.put(new RecipeInputItemStack(copyOrNull(aInput), aInput.stackSize), new RecipeOutput(aNBT, tStack)); + aRecipeList.put( + new RecipeInputItemStack(copyOrNull(aInput), aInput.stackSize), new RecipeOutput(aNBT, tStack)); } return true; } @@ -1412,21 +2149,22 @@ public class GT_Utility { tNBT.setString("author", aAuthor); NBTTagList tNBTList = new NBTTagList(); for (byte i = 0; i < aPages.length; i++) { - aPages[i] = GT_LanguageManager.addStringLocalization("Book." + aTitle + ".Page" + ((i < 10) ? "0" + i : i), aPages[i]); + aPages[i] = GT_LanguageManager.addStringLocalization( + "Book." + aTitle + ".Page" + ((i < 10) ? "0" + i : i), aPages[i]); if (i < 48) { - if (aPages[i].length() < 256) - tNBTList.appendTag(new NBTTagString(aPages[i])); - else - GT_Log.err.println("WARNING: String for written Book too long! -> " + aPages[i]); + if (aPages[i].length() < 256) tNBTList.appendTag(new NBTTagString(aPages[i])); + else GT_Log.err.println("WARNING: String for written Book too long! -> " + aPages[i]); } else { GT_Log.err.println("WARNING: Too much Pages for written Book! -> " + aTitle); break; } } - tNBTList.appendTag(new NBTTagString("Credits to " + aAuthor + " for writing this Book. This was Book Nr. " + sBookCount + " at its creation. Gotta get 'em all!")); + tNBTList.appendTag(new NBTTagString("Credits to " + aAuthor + " for writing this Book. This was Book Nr. " + + sBookCount + " at its creation. Gotta get 'em all!")); tNBT.setTag("pages", tNBTList); rStack.setTagCompound(tNBT); - GT_Log.out.println("GT_Mod: Added Book to Book List - Mapping: '" + aMapping + "' - Name: '" + aTitle + "' - Author: '" + aAuthor + "'"); + GT_Log.out.println("GT_Mod: Added Book to Book List - Mapping: '" + aMapping + "' - Name: '" + aTitle + + "' - Author: '" + aAuthor + "'"); GregTech_API.sBookList.put(aMapping, rStack); return copyOrNull(rStack); } @@ -1440,21 +2178,37 @@ public class GT_Utility { return doSoundAtClient(sound.resourceLocation, aTimeUntilNextSound, aSoundStrength, GT.getThePlayer()); } - public static boolean doSoundAtClient(ResourceLocation aSoundResourceLocation, int aTimeUntilNextSound, float aSoundStrength) { + public static boolean doSoundAtClient( + ResourceLocation aSoundResourceLocation, int aTimeUntilNextSound, float aSoundStrength) { return doSoundAtClient(aSoundResourceLocation, aTimeUntilNextSound, aSoundStrength, GT.getThePlayer()); } - public static boolean doSoundAtClient(String aSoundName, int aTimeUntilNextSound, float aSoundStrength, Entity aEntity) { + public static boolean doSoundAtClient( + String aSoundName, int aTimeUntilNextSound, float aSoundStrength, Entity aEntity) { if (aEntity == null || aSoundName == null) return false; - return doSoundAtClient(aSoundName, aTimeUntilNextSound, aSoundStrength, aEntity.posX, aEntity.posY, aEntity.posZ); + return doSoundAtClient( + aSoundName, aTimeUntilNextSound, aSoundStrength, aEntity.posX, aEntity.posY, aEntity.posZ); } - public static boolean doSoundAtClient(ResourceLocation aSoundResourceLocation, int aTimeUntilNextSound, float aSoundStrength, Entity aEntity) { + public static boolean doSoundAtClient( + ResourceLocation aSoundResourceLocation, int aTimeUntilNextSound, float aSoundStrength, Entity aEntity) { if (aEntity == null) return false; - return doSoundAtClient(aSoundResourceLocation.toString(), aTimeUntilNextSound, aSoundStrength, aEntity.posX, aEntity.posY, aEntity.posZ); + return doSoundAtClient( + aSoundResourceLocation.toString(), + aTimeUntilNextSound, + aSoundStrength, + aEntity.posX, + aEntity.posY, + aEntity.posZ); } - public static boolean doSoundAtClient(ResourceLocation aSoundResourceLocation, int aTimeUntilNextSound, float aSoundStrength, double aX, double aY, double aZ) { + public static boolean doSoundAtClient( + ResourceLocation aSoundResourceLocation, + int aTimeUntilNextSound, + float aSoundStrength, + double aX, + double aY, + double aZ) { return doSoundAtClient(aSoundResourceLocation, aTimeUntilNextSound, aSoundStrength, 1.01818028F, aX, aY, aZ); } @@ -1463,40 +2217,65 @@ public class GT_Utility { * @deprecated Use {@link #doSoundAtClient(ResourceLocation, int, float, double, double, double)} */ @Deprecated - public static boolean doSoundAtClient(String aSoundName, int aTimeUntilNextSound, float aSoundStrength, double aX, double aY, double aZ) { + public static boolean doSoundAtClient( + String aSoundName, int aTimeUntilNextSound, float aSoundStrength, double aX, double aY, double aZ) { if (aSoundName == null) return false; - return doSoundAtClient(new ResourceLocation(aSoundName), aTimeUntilNextSound, aSoundStrength, 1.01818028F, aX, aY, aZ); + return doSoundAtClient( + new ResourceLocation(aSoundName), aTimeUntilNextSound, aSoundStrength, 1.01818028F, aX, aY, aZ); } - public static boolean doSoundAtClient(SoundResource aSound, int aTimeUntilNextSound, float aSoundStrength, double aX, double aY, double aZ) { + public static boolean doSoundAtClient( + SoundResource aSound, int aTimeUntilNextSound, float aSoundStrength, double aX, double aY, double aZ) { return doSoundAtClient(aSound.resourceLocation, aTimeUntilNextSound, aSoundStrength, aX, aY, aZ); } public static boolean doSoundAtClient( - SoundResource aSound, int aTimeUntilNextSound, float aSoundStrength, float aSoundModulation, - double aX, double aY, double aZ) { - return doSoundAtClient(aSound.resourceLocation, aTimeUntilNextSound, aSoundStrength, aSoundModulation, aX, aY, aZ); + SoundResource aSound, + int aTimeUntilNextSound, + float aSoundStrength, + float aSoundModulation, + double aX, + double aY, + double aZ) { + return doSoundAtClient( + aSound.resourceLocation, aTimeUntilNextSound, aSoundStrength, aSoundModulation, aX, aY, aZ); } - public static boolean doSoundAtClient( - ResourceLocation aSoundResourceLocation, int aTimeUntilNextSound, float aSoundStrength, float aSoundModulation, - double aX, double aY, double aZ) { + ResourceLocation aSoundResourceLocation, + int aTimeUntilNextSound, + float aSoundStrength, + float aSoundModulation, + double aX, + double aY, + double aZ) { if (!FMLCommonHandler.instance().getEffectiveSide().isClient() - || GT.getThePlayer() == null - || !GT.getThePlayer().worldObj.isRemote) - return false; + || GT.getThePlayer() == null + || !GT.getThePlayer().worldObj.isRemote) return false; if (GregTech_API.sMultiThreadedSounds) - new Thread(new GT_Runnable_Sound( - GT.getThePlayer().worldObj, - MathHelper.floor_double(aX), MathHelper.floor_double(aY), MathHelper.floor_double(aZ), - aTimeUntilNextSound, aSoundResourceLocation, aSoundStrength, aSoundModulation), "Sound Effect") - .start(); + new Thread( + new GT_Runnable_Sound( + GT.getThePlayer().worldObj, + MathHelper.floor_double(aX), + MathHelper.floor_double(aY), + MathHelper.floor_double(aZ), + aTimeUntilNextSound, + aSoundResourceLocation, + aSoundStrength, + aSoundModulation), + "Sound Effect") + .start(); else new GT_Runnable_Sound( - GT.getThePlayer().worldObj, - MathHelper.floor_double(aX), MathHelper.floor_double(aY), MathHelper.floor_double(aZ), - aTimeUntilNextSound, aSoundResourceLocation, aSoundStrength, aSoundModulation).run(); + GT.getThePlayer().worldObj, + MathHelper.floor_double(aX), + MathHelper.floor_double(aY), + MathHelper.floor_double(aZ), + aTimeUntilNextSound, + aSoundResourceLocation, + aSoundStrength, + aSoundModulation) + .run(); return true; } @@ -1505,20 +2284,36 @@ public class GT_Utility { * @Deprecated Use {@link #doSoundAtClient(ResourceLocation, int, float, float, double, double, double)} */ @Deprecated - public static boolean doSoundAtClient(String aSoundName, int aTimeUntilNextSound, float aSoundStrength, float aSoundModulation, double aX, double aY, double aZ) { + public static boolean doSoundAtClient( + String aSoundName, + int aTimeUntilNextSound, + float aSoundStrength, + float aSoundModulation, + double aX, + double aY, + double aZ) { if (isStringInvalid(aSoundName)) return false; - return doSoundAtClient(new ResourceLocation(aSoundName), aTimeUntilNextSound, aSoundStrength, aSoundModulation, aX, aY, aZ); + return doSoundAtClient( + new ResourceLocation(aSoundName), aTimeUntilNextSound, aSoundStrength, aSoundModulation, aX, aY, aZ); } - public static boolean sendSoundToPlayers(World aWorld, String aSoundName, float aSoundStrength, float aSoundModulation, int aX, int aY, int aZ) { + public static boolean sendSoundToPlayers( + World aWorld, String aSoundName, float aSoundStrength, float aSoundModulation, int aX, int aY, int aZ) { if (isStringInvalid(aSoundName) || aWorld == null || aWorld.isRemote) return false; - NW.sendPacketToAllPlayersInRange(aWorld, new GT_Packet_Sound(aSoundName, aSoundStrength, aSoundModulation, aX, (short) aY, aZ), aX, aZ); + NW.sendPacketToAllPlayersInRange( + aWorld, new GT_Packet_Sound(aSoundName, aSoundStrength, aSoundModulation, aX, (short) aY, aZ), aX, aZ); return true; } - public static boolean sendSoundToPlayers(World aWorld, SoundResource sound, float aSoundStrength, float aSoundModulation, int aX, int aY, int aZ) { + public static boolean sendSoundToPlayers( + World aWorld, SoundResource sound, float aSoundStrength, float aSoundModulation, int aX, int aY, int aZ) { if (aWorld == null || aWorld.isRemote) return false; - NW.sendPacketToAllPlayersInRange(aWorld, new GT_Packet_Sound(sound.resourceLocation.toString(), aSoundStrength, aSoundModulation, aX, (short) aY, aZ), aX, aZ); + NW.sendPacketToAllPlayersInRange( + aWorld, + new GT_Packet_Sound( + sound.resourceLocation.toString(), aSoundStrength, aSoundModulation, aX, (short) aY, aZ), + aX, + aZ); return true; } @@ -1626,15 +2421,21 @@ public class GT_Utility { } public static boolean isStackValid(Object aStack) { - return (aStack instanceof ItemStack) && ((ItemStack) aStack).getItem() != null && ((ItemStack) aStack).stackSize >= 0; + return (aStack instanceof ItemStack) + && ((ItemStack) aStack).getItem() != null + && ((ItemStack) aStack).stackSize >= 0; } public static boolean isStackInvalid(Object aStack) { - return aStack == null || !(aStack instanceof ItemStack) || ((ItemStack) aStack).getItem() == null || ((ItemStack) aStack).stackSize < 0; + return aStack == null + || !(aStack instanceof ItemStack) + || ((ItemStack) aStack).getItem() == null + || ((ItemStack) aStack).stackSize < 0; } public static boolean isDebugItem(ItemStack aStack) { - return /*ItemList.Armor_Cheat.isStackEqual(aStack, T, T) || */areStacksEqual(GT_ModHandler.getIC2Item("debug", 1), aStack, true); + return /*ItemList.Armor_Cheat.isStackEqual(aStack, T, T) || */ areStacksEqual( + GT_ModHandler.getIC2Item("debug", 1), aStack, true); } public static ItemStack updateItemStack(ItemStack aStack) { @@ -1674,20 +2475,24 @@ public class GT_Utility { } public static ItemStack getProjectile(SubTag aProjectileType, IInventory aInventory) { - if (aInventory != null) for (int i = 0, j = aInventory.getSizeInventory(); i < j; i++) { - ItemStack rStack = aInventory.getStackInSlot(i); - if (isStackValid(rStack) && rStack.getItem() instanceof IProjectileItem && ((IProjectileItem) rStack.getItem()).hasProjectile(aProjectileType, rStack)) - return updateItemStack(rStack); - } + if (aInventory != null) + for (int i = 0, j = aInventory.getSizeInventory(); i < j; i++) { + ItemStack rStack = aInventory.getStackInSlot(i); + if (isStackValid(rStack) + && rStack.getItem() instanceof IProjectileItem + && ((IProjectileItem) rStack.getItem()).hasProjectile(aProjectileType, rStack)) + return updateItemStack(rStack); + } return null; } public static void removeNullStacksFromInventory(IInventory aInventory) { - if (aInventory != null) for (int i = 0, j = aInventory.getSizeInventory(); i < j; i++) { - ItemStack tStack = aInventory.getStackInSlot(i); - if (tStack != null && (tStack.stackSize == 0 || tStack.getItem() == null)) - aInventory.setInventorySlotContents(i, null); - } + if (aInventory != null) + for (int i = 0, j = aInventory.getSizeInventory(); i < j; i++) { + ItemStack tStack = aInventory.getStackInSlot(i); + if (tStack != null && (tStack.stackSize == 0 || tStack.getItem() == null)) + aInventory.setInventorySlotContents(i, null); + } } /** @@ -1702,9 +2507,9 @@ public class GT_Utility { * @param page 0 to 127 * @return true if it made empty page, false if one already existed... */ - public static boolean addTexturePage(byte page){ - if(Textures.BlockIcons.casingTexturePages[page]==null){ - Textures.BlockIcons.casingTexturePages[page]=new ITexture[128]; + public static boolean addTexturePage(byte page) { + if (Textures.BlockIcons.casingTexturePages[page] == null) { + Textures.BlockIcons.casingTexturePages[page] = new ITexture[128]; return true; } return false; @@ -1717,11 +2522,11 @@ public class GT_Utility { * @param index 0 to 127 texture index * @return casing texture 0 to 16383 */ - public static int getTextureId(byte page,byte index){ - if(page>=0 && index>=0){ - return (page<<7)+index; + public static int getTextureId(byte page, byte index) { + if (page >= 0 && index >= 0) { + return (page << 7) + index; } - throw new RuntimeException("Index out of range: ["+page+"]["+index+"]"); + throw new RuntimeException("Index out of range: [" + page + "][" + index + "]"); } /** @@ -1732,11 +2537,12 @@ public class GT_Utility { * @param blockMeta meta of the block * @return casing texture 0 to 16383 */ - public static int getTextureId(byte page,byte startIndex,byte blockMeta){ - if(page>=0 && startIndex>=0 && blockMeta>=0 && (startIndex+blockMeta)<=127){ - return (page<<7)+(startIndex+blockMeta); + public static int getTextureId(byte page, byte startIndex, byte blockMeta) { + if (page >= 0 && startIndex >= 0 && blockMeta >= 0 && (startIndex + blockMeta) <= 127) { + return (page << 7) + (startIndex + blockMeta); } - throw new RuntimeException("Index out of range: ["+page+"]["+startIndex+"+"+blockMeta+"="+(startIndex+blockMeta)+"]"); + throw new RuntimeException("Index out of range: [" + page + "][" + startIndex + "+" + blockMeta + "=" + + (startIndex + blockMeta) + "]"); } /** @@ -1744,8 +2550,8 @@ public class GT_Utility { * @return casing texture 0 to 16383 */ @Deprecated - public static int getTextureId(ItemStack stack){ - return getTextureId(Block.getBlockFromItem(stack.getItem()),(byte)stack.getItemDamage()); + public static int getTextureId(ItemStack stack) { + return getTextureId(Block.getBlockFromItem(stack.getItem()), (byte) stack.getItemDamage()); } /** @@ -1768,8 +2574,8 @@ public class GT_Utility { } } } - throw new RuntimeException("Probably missing mapping or different texture class used for: " + - blockFromBlock.getUnlocalizedName() + " meta:" + metaFromBlock); + throw new RuntimeException("Probably missing mapping or different texture class used for: " + + blockFromBlock.getUnlocalizedName() + " meta:" + metaFromBlock); } /** @@ -1881,7 +2687,10 @@ public class GT_Utility { public static float getHeatDamageFromItem(ItemStack aStack) { ItemData tData = GT_OreDictUnificator.getItemData(aStack); - return tData == null ? 0 : (tData.mPrefix == null ? 0 : tData.mPrefix.mHeatDamage) + (tData.hasValidMaterialData() ? tData.mMaterial.mMaterial.mHeatDamage : 0); + return tData == null + ? 0 + : (tData.mPrefix == null ? 0 : tData.mPrefix.mHeatDamage) + + (tData.hasValidMaterialData() ? tData.mMaterial.mMaterial.mHeatDamage : 0); } public static int getRadioactivityLevel(ItemStack aStack) { @@ -1908,7 +2717,10 @@ public class GT_Utility { } private static boolean applyHeatDamage(EntityLivingBase aEntity, float aDamage, DamageSource source) { - if (aDamage > 0 && aEntity != null && aEntity.getActivePotionEffect(Potion.fireResistance) == null && !isWearingFullHeatHazmat(aEntity)) { + if (aDamage > 0 + && aEntity != null + && aEntity.getActivePotionEffect(Potion.fireResistance) == null + && !isWearingFullHeatHazmat(aEntity)) { aEntity.attackEntityFrom(source, aDamage); return true; } @@ -1933,14 +2745,66 @@ public class GT_Utility { } public static boolean applyRadioactivity(EntityLivingBase aEntity, int aLevel, int aAmountOfItems) { - if (aLevel > 0 && aEntity != null && aEntity.getCreatureAttribute() != EnumCreatureAttribute.UNDEAD && aEntity.getCreatureAttribute() != EnumCreatureAttribute.ARTHROPOD && !isWearingFullRadioHazmat(aEntity)) { + if (aLevel > 0 + && aEntity != null + && aEntity.getCreatureAttribute() != EnumCreatureAttribute.UNDEAD + && aEntity.getCreatureAttribute() != EnumCreatureAttribute.ARTHROPOD + && !isWearingFullRadioHazmat(aEntity)) { PotionEffect tEffect = null; - aEntity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, aLevel * 140 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.moveSlowdown)) == null ? 0 : tEffect.getDuration())), Math.max(0, (5 * aLevel) / 7))); - aEntity.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, aLevel * 150 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.digSlowdown)) == null ? 0 : tEffect.getDuration())), Math.max(0, (5 * aLevel) / 7))); - aEntity.addPotionEffect(new PotionEffect(Potion.confusion.id, aLevel * 130 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.confusion)) == null ? 0 : tEffect.getDuration())), Math.max(0, (5 * aLevel) / 7))); - aEntity.addPotionEffect(new PotionEffect(Potion.weakness.id, aLevel * 150 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.weakness)) == null ? 0 : tEffect.getDuration())), Math.max(0, (5 * aLevel) / 7))); - aEntity.addPotionEffect(new PotionEffect(Potion.hunger.id, aLevel * 130 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.hunger)) == null ? 0 : tEffect.getDuration())), Math.max(0, (5 * aLevel) / 7))); - aEntity.addPotionEffect(new PotionEffect(24 /* IC2 Radiation */, aLevel * 180 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.potionTypes[24])) == null ? 0 : tEffect.getDuration())), Math.max(0, (5 * aLevel) / 7))); + aEntity.addPotionEffect(new PotionEffect( + Potion.moveSlowdown.id, + aLevel * 140 * aAmountOfItems + + Math.max( + 0, + ((tEffect = aEntity.getActivePotionEffect(Potion.moveSlowdown)) == null + ? 0 + : tEffect.getDuration())), + Math.max(0, (5 * aLevel) / 7))); + aEntity.addPotionEffect(new PotionEffect( + Potion.digSlowdown.id, + aLevel * 150 * aAmountOfItems + + Math.max( + 0, + ((tEffect = aEntity.getActivePotionEffect(Potion.digSlowdown)) == null + ? 0 + : tEffect.getDuration())), + Math.max(0, (5 * aLevel) / 7))); + aEntity.addPotionEffect(new PotionEffect( + Potion.confusion.id, + aLevel * 130 * aAmountOfItems + + Math.max( + 0, + ((tEffect = aEntity.getActivePotionEffect(Potion.confusion)) == null + ? 0 + : tEffect.getDuration())), + Math.max(0, (5 * aLevel) / 7))); + aEntity.addPotionEffect(new PotionEffect( + Potion.weakness.id, + aLevel * 150 * aAmountOfItems + + Math.max( + 0, + ((tEffect = aEntity.getActivePotionEffect(Potion.weakness)) == null + ? 0 + : tEffect.getDuration())), + Math.max(0, (5 * aLevel) / 7))); + aEntity.addPotionEffect(new PotionEffect( + Potion.hunger.id, + aLevel * 130 * aAmountOfItems + + Math.max( + 0, + ((tEffect = aEntity.getActivePotionEffect(Potion.hunger)) == null + ? 0 + : tEffect.getDuration())), + Math.max(0, (5 * aLevel) / 7))); + aEntity.addPotionEffect(new PotionEffect( + 24 /* IC2 Radiation */, + aLevel * 180 * aAmountOfItems + + Math.max( + 0, + ((tEffect = aEntity.getActivePotionEffect(Potion.potionTypes[24])) == null + ? 0 + : tEffect.getDuration())), + Math.max(0, (5 * aLevel) / 7))); return true; } return false; @@ -2070,7 +2934,8 @@ public class GT_Utility { } public static boolean isStackInList(GT_ItemStack aStack, Collection<GT_ItemStack> aList) { - return aStack != null && (aList.contains(aStack) || aList.contains(new GT_ItemStack(aStack.mItem, aStack.mStackSize, W))); + return aStack != null + && (aList.contains(aStack) || aList.contains(new GT_ItemStack(aStack.mItem, aStack.mStackSize, W))); } /** @@ -2084,7 +2949,9 @@ public class GT_Utility { } public static <X, Y extends Comparable<Y>> LinkedHashMap<X, Y> sortMapByValuesAcending(Map<X, Y> map) { - return map.entrySet().stream().sorted(Entry.comparingByValue()).collect(CollectorUtils.entriesToMap(LinkedHashMap::new)); + return map.entrySet().stream() + .sorted(Entry.comparingByValue()) + .collect(CollectorUtils.entriesToMap(LinkedHashMap::new)); } /** @@ -2093,7 +2960,7 @@ public class GT_Utility { public static <X, Y extends Comparable> LinkedHashMap<X, Y> sortMapByValuesDescending(Map<X, Y> aMap) { List<Map.Entry<X, Y>> tEntrySet = new LinkedList<>(aMap.entrySet()); tEntrySet.sort((aValue1, aValue2) -> { - return aValue2.getValue().compareTo(aValue1.getValue());//FB: RV - RV_NEGATING_RESULT_OF_COMPARETO + return aValue2.getValue().compareTo(aValue1.getValue()); // FB: RV - RV_NEGATING_RESULT_OF_COMPARETO }); LinkedHashMap<X, Y> rMap = new LinkedHashMap<>(); for (Map.Entry<X, Y> tEntry : tEntrySet) rMap.put(tEntry.getKey(), tEntry.getValue()); @@ -2111,7 +2978,10 @@ public class GT_Utility { * Translates a Material Amount into an Amount of Fluid. Second Parameter for things like Bucket Amounts (1000) and similar */ public static long translateMaterialToAmount(long aMaterialAmount, long aAmountPerUnit, boolean aRoundUp) { - return Math.max(0, ((aMaterialAmount * aAmountPerUnit) / M) + (aRoundUp && (aMaterialAmount * aAmountPerUnit) % M > 0 ? 1 : 0)); + return Math.max( + 0, + ((aMaterialAmount * aAmountPerUnit) / M) + + (aRoundUp && (aMaterialAmount * aAmountPerUnit) % M > 0 ? 1 : 0)); } /** @@ -2119,31 +2989,41 @@ public class GT_Utility { * Used for my Teleporter. */ public static boolean isRealDimension(int aDimensionID) { - if(aDimensionID<=1 && aDimensionID>=-1 && !GregTech_API.sDimensionalList.contains(aDimensionID)) return true; - return !GregTech_API.sDimensionalList.contains(aDimensionID) && DimensionManager.isDimensionRegistered(aDimensionID); + if (aDimensionID <= 1 && aDimensionID >= -1 && !GregTech_API.sDimensionalList.contains(aDimensionID)) + return true; + return !GregTech_API.sDimensionalList.contains(aDimensionID) + && DimensionManager.isDimensionRegistered(aDimensionID); } - public static boolean moveEntityToDimensionAtCoords(Entity entity, int aDimension, double aX, double aY, double aZ) { - //Credit goes to BrandonCore Author :!: + public static boolean moveEntityToDimensionAtCoords( + Entity entity, int aDimension, double aX, double aY, double aZ) { + // Credit goes to BrandonCore Author :!: if (entity == null || entity.worldObj.isRemote) return false; if (entity.ridingEntity != null) entity.mountEntity(null); if (entity.riddenByEntity != null) entity.riddenByEntity.mountEntity(null); World startWorld = entity.worldObj; - World destinationWorld = FMLCommonHandler.instance().getMinecraftServerInstance().worldServerForDimension(aDimension); + World destinationWorld = + FMLCommonHandler.instance().getMinecraftServerInstance().worldServerForDimension(aDimension); - if (destinationWorld == null) {return false;} + if (destinationWorld == null) { + return false; + } boolean interDimensional = startWorld.provider.dimensionId != destinationWorld.provider.dimensionId; - if(!interDimensional)return false; - startWorld.updateEntityWithOptionalForce(entity, false);//added + if (!interDimensional) return false; + startWorld.updateEntityWithOptionalForce(entity, false); // added if ((entity instanceof EntityPlayerMP) && interDimensional) { EntityPlayerMP player = (EntityPlayerMP) entity; - player.closeScreen();//added + player.closeScreen(); // added player.dimension = aDimension; - player.playerNetServerHandler.sendPacket(new S07PacketRespawn(player.dimension, player.worldObj.difficultySetting, destinationWorld.getWorldInfo().getTerrainType(), player.theItemInWorldManager.getGameType())); + player.playerNetServerHandler.sendPacket(new S07PacketRespawn( + player.dimension, + player.worldObj.difficultySetting, + destinationWorld.getWorldInfo().getTerrainType(), + player.theItemInWorldManager.getGameType())); ((WorldServer) startWorld).getPlayerManager().removePlayer(player); startWorld.playerEntities.remove(player); @@ -2197,15 +3077,19 @@ public class GT_Utility { if (((entity instanceof EntityPlayerMP)) && interDimensional) { EntityPlayerMP player = (EntityPlayerMP) entity; player.theItemInWorldManager.setWorld((WorldServer) destinationWorld); - player.mcServer.getConfigurationManager().updateTimeAndWeatherForPlayer(player, (WorldServer) destinationWorld); + player.mcServer.getConfigurationManager().updateTimeAndWeatherForPlayer(player, (WorldServer) + destinationWorld); player.mcServer.getConfigurationManager().syncPlayerInventory(player); for (PotionEffect potionEffect : (Iterable<PotionEffect>) player.getActivePotionEffects()) { player.playerNetServerHandler.sendPacket(new S1DPacketEntityEffect(player.getEntityId(), potionEffect)); } - player.playerNetServerHandler.sendPacket(new S1FPacketSetExperience(player.experience, player.experienceTotal, player.experienceLevel)); - FMLCommonHandler.instance().firePlayerChangedDimensionEvent(player, startWorld.provider.dimensionId, destinationWorld.provider.dimensionId); + player.playerNetServerHandler.sendPacket( + new S1FPacketSetExperience(player.experience, player.experienceTotal, player.experienceLevel)); + FMLCommonHandler.instance() + .firePlayerChangedDimensionEvent( + player, startWorld.provider.dimensionId, destinationWorld.provider.dimensionId); } entity.setLocationAndAngles(aX, aY, aZ, entity.rotationYaw, entity.rotationPitch); @@ -2215,10 +3099,21 @@ public class GT_Utility { } public static int getScaleCoordinates(double aValue, int aScale) { - return (int)Math.floor(aValue / aScale); - } - - public static int getCoordinateScan(ArrayList<String> aList, EntityPlayer aPlayer, World aWorld, int aScanLevel, int aX, int aY, int aZ, int aSide, float aClickX, float aClickY, float aClickZ) { + return (int) Math.floor(aValue / aScale); + } + + public static int getCoordinateScan( + ArrayList<String> aList, + EntityPlayer aPlayer, + World aWorld, + int aScanLevel, + int aX, + int aY, + int aZ, + int aSide, + float aClickX, + float aClickY, + float aClickZ) { if (aList == null) return 0; ArrayList<String> tList = new ArrayList<>(); @@ -2228,25 +3123,43 @@ public class GT_Utility { final Block tBlock = aWorld.getBlock(aX, aY, aZ); - tList.add( - "----- X: " + EnumChatFormatting.AQUA + formatNumbers(aX) + EnumChatFormatting.RESET + - " Y: " + EnumChatFormatting.AQUA + formatNumbers(aY) + EnumChatFormatting.RESET + - " Z: " + EnumChatFormatting.AQUA + formatNumbers(aZ) + EnumChatFormatting.RESET + - " D: " + EnumChatFormatting.AQUA + aWorld.provider.dimensionId + EnumChatFormatting.RESET + " -----"); + tList.add("----- X: " + EnumChatFormatting.AQUA + formatNumbers(aX) + EnumChatFormatting.RESET + " Y: " + + EnumChatFormatting.AQUA + formatNumbers(aY) + EnumChatFormatting.RESET + " Z: " + + EnumChatFormatting.AQUA + formatNumbers(aZ) + EnumChatFormatting.RESET + " D: " + + EnumChatFormatting.AQUA + aWorld.provider.dimensionId + EnumChatFormatting.RESET + " -----"); try { if (tTileEntity instanceof IInventory) - tList.add( - GT_Utility.trans("162","Name: ") + EnumChatFormatting.BLUE + ((IInventory) tTileEntity).getInventoryName() + EnumChatFormatting.RESET + - GT_Utility.trans("163"," MetaData: ") + EnumChatFormatting.AQUA + aWorld.getBlockMetadata(aX, aY, aZ) + EnumChatFormatting.RESET); + tList.add(GT_Utility.trans("162", "Name: ") + + EnumChatFormatting.BLUE + + ((IInventory) tTileEntity).getInventoryName() + + EnumChatFormatting.RESET + + GT_Utility.trans("163", " MetaData: ") + + EnumChatFormatting.AQUA + + aWorld.getBlockMetadata(aX, aY, aZ) + + EnumChatFormatting.RESET); else - tList.add( - GT_Utility.trans("162","Name: ") + EnumChatFormatting.BLUE + tBlock.getUnlocalizedName() + EnumChatFormatting.RESET + - GT_Utility.trans("163"," MetaData: ") + EnumChatFormatting.AQUA + aWorld.getBlockMetadata(aX, aY, aZ) + EnumChatFormatting.RESET); - - tList.add( - GT_Utility.trans("164","Hardness: ") + EnumChatFormatting.YELLOW + tBlock.getBlockHardness(aWorld, aX, aY, aZ) + EnumChatFormatting.RESET + - GT_Utility.trans("165"," Blast Resistance: ") + EnumChatFormatting.YELLOW + tBlock.getExplosionResistance(aPlayer, aWorld, aX, aY, aZ, aPlayer.posX, aPlayer.posY, aPlayer.posZ) + EnumChatFormatting.RESET); - if (tBlock.isBeaconBase(aWorld, aX, aY, aZ, aX, aY + 1, aZ)) tList.add(EnumChatFormatting.GOLD + GT_Utility.trans("166","Is valid Beacon Pyramid Material") + EnumChatFormatting.RESET); + tList.add(GT_Utility.trans("162", "Name: ") + + EnumChatFormatting.BLUE + + tBlock.getUnlocalizedName() + + EnumChatFormatting.RESET + + GT_Utility.trans("163", " MetaData: ") + + EnumChatFormatting.AQUA + + aWorld.getBlockMetadata(aX, aY, aZ) + + EnumChatFormatting.RESET); + + tList.add(GT_Utility.trans("164", "Hardness: ") + + EnumChatFormatting.YELLOW + + tBlock.getBlockHardness(aWorld, aX, aY, aZ) + + EnumChatFormatting.RESET + + GT_Utility.trans("165", " Blast Resistance: ") + + EnumChatFormatting.YELLOW + + tBlock.getExplosionResistance( + aPlayer, aWorld, aX, aY, aZ, aPlayer.posX, aPlayer.posY, aPlayer.posZ) + + EnumChatFormatting.RESET); + if (tBlock.isBeaconBase(aWorld, aX, aY, aZ, aX, aY + 1, aZ)) + tList.add(EnumChatFormatting.GOLD + + GT_Utility.trans("166", "Is valid Beacon Pyramid Material") + + EnumChatFormatting.RESET); } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); } @@ -2254,13 +3167,17 @@ public class GT_Utility { try { if (tTileEntity instanceof IFluidHandler) { rEUAmount += 500; - final FluidTankInfo[] tTanks = ((IFluidHandler) tTileEntity).getTankInfo(ForgeDirection.getOrientation(aSide)); - if (tTanks != null) for (byte i = 0; i < tTanks.length; i++) { - tList.add( - GT_Utility.trans("167","Tank ") + i + ": " + - EnumChatFormatting.GREEN + formatNumbers((tTanks[i].fluid == null ? 0 : tTanks[i].fluid.amount)) + EnumChatFormatting.RESET + " L / " + - EnumChatFormatting.YELLOW + formatNumbers(tTanks[i].capacity) + EnumChatFormatting.RESET + " L " + EnumChatFormatting.GOLD + getFluidName(tTanks[i].fluid, true) + EnumChatFormatting.RESET); - } + final FluidTankInfo[] tTanks = + ((IFluidHandler) tTileEntity).getTankInfo(ForgeDirection.getOrientation(aSide)); + if (tTanks != null) + for (byte i = 0; i < tTanks.length; i++) { + tList.add(GT_Utility.trans("167", "Tank ") + i + ": " + EnumChatFormatting.GREEN + + formatNumbers((tTanks[i].fluid == null ? 0 : tTanks[i].fluid.amount)) + + EnumChatFormatting.RESET + " L / " + EnumChatFormatting.YELLOW + + formatNumbers(tTanks[i].capacity) + EnumChatFormatting.RESET + " L " + + EnumChatFormatting.GOLD + getFluidName(tTanks[i].fluid, true) + + EnumChatFormatting.RESET); + } } } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); @@ -2276,12 +3193,17 @@ public class GT_Utility { try { if (tTileEntity instanceof ic2.api.reactor.IReactor) { rEUAmount += 500; + tList.add(GT_Utility.trans("168", "Heat: ") + EnumChatFormatting.GREEN + + formatNumbers(((ic2.api.reactor.IReactor) tTileEntity).getHeat()) + + EnumChatFormatting.RESET + " / " + EnumChatFormatting.YELLOW + + formatNumbers(((ic2.api.reactor.IReactor) tTileEntity).getMaxHeat()) + + EnumChatFormatting.RESET); tList.add( - GT_Utility.trans("168","Heat: ") + EnumChatFormatting.GREEN + formatNumbers(((ic2.api.reactor.IReactor) tTileEntity).getHeat()) + EnumChatFormatting.RESET + " / " + - EnumChatFormatting.YELLOW + formatNumbers(((ic2.api.reactor.IReactor) tTileEntity).getMaxHeat()) + EnumChatFormatting.RESET); - tList.add( - GT_Utility.trans("169","HEM: ") + EnumChatFormatting.YELLOW + ((ic2.api.reactor.IReactor) tTileEntity).getHeatEffectModifier() + EnumChatFormatting.RESET - /* + GT_Utility.trans("170"," Base EU Output: ")/* + ((ic2.api.reactor.IReactor)tTileEntity).getOutput()*/); + GT_Utility.trans("169", "HEM: ") + + EnumChatFormatting.YELLOW + + ((ic2.api.reactor.IReactor) tTileEntity).getHeatEffectModifier() + + EnumChatFormatting.RESET + /* + GT_Utility.trans("170"," Base EU Output: ")/* + ((ic2.api.reactor.IReactor)tTileEntity).getOutput()*/ ); } } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); @@ -2291,7 +3213,10 @@ public class GT_Utility { final IAlignment tAlignment = ((IAlignmentProvider) tTileEntity).getAlignment(); if (tAlignment != null) { rEUAmount += 100; - tList.add(GT_Utility.trans("219", "Extended Facing: ") + EnumChatFormatting.GREEN + tAlignment.getExtendedFacing() + EnumChatFormatting.RESET); + tList.add(GT_Utility.trans("219", "Extended Facing: ") + + EnumChatFormatting.GREEN + + tAlignment.getExtendedFacing() + + EnumChatFormatting.RESET); } } } catch (Throwable e) { @@ -2300,8 +3225,19 @@ public class GT_Utility { try { if (tTileEntity instanceof ic2.api.tile.IWrenchable) { rEUAmount += 100; - tList.add(GT_Utility.trans("171","Facing: ") +EnumChatFormatting.GREEN+ ((ic2.api.tile.IWrenchable) tTileEntity).getFacing() +EnumChatFormatting.RESET+ GT_Utility.trans("172"," / Chance: ") +EnumChatFormatting.YELLOW+ (((ic2.api.tile.IWrenchable) tTileEntity).getWrenchDropRate() * 100) +EnumChatFormatting.RESET+ "%"); - tList.add(((ic2.api.tile.IWrenchable) tTileEntity).wrenchCanRemove(aPlayer) ? EnumChatFormatting.GREEN+ GT_Utility.trans("173","You can remove this with a Wrench") +EnumChatFormatting.RESET : EnumChatFormatting.RED+ GT_Utility.trans("174","You can NOT remove this with a Wrench") +EnumChatFormatting.RESET); + tList.add(GT_Utility.trans("171", "Facing: ") + EnumChatFormatting.GREEN + + ((ic2.api.tile.IWrenchable) tTileEntity).getFacing() + EnumChatFormatting.RESET + + GT_Utility.trans("172", " / Chance: ") + EnumChatFormatting.YELLOW + + (((ic2.api.tile.IWrenchable) tTileEntity).getWrenchDropRate() * 100) + + EnumChatFormatting.RESET + "%"); + tList.add( + ((ic2.api.tile.IWrenchable) tTileEntity).wrenchCanRemove(aPlayer) + ? EnumChatFormatting.GREEN + + GT_Utility.trans("173", "You can remove this with a Wrench") + + EnumChatFormatting.RESET + : EnumChatFormatting.RED + + GT_Utility.trans("174", "You can NOT remove this with a Wrench") + + EnumChatFormatting.RESET); } } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); @@ -2309,7 +3245,10 @@ public class GT_Utility { try { if (tTileEntity instanceof ic2.api.energy.tile.IEnergyConductor) { rEUAmount += 200; - tList.add(GT_Utility.trans("175","Conduction Loss: ") + EnumChatFormatting.YELLOW + ((ic2.api.energy.tile.IEnergyConductor) tTileEntity).getConductionLoss() + EnumChatFormatting.RESET); + tList.add(GT_Utility.trans("175", "Conduction Loss: ") + + EnumChatFormatting.YELLOW + + ((ic2.api.energy.tile.IEnergyConductor) tTileEntity).getConductionLoss() + + EnumChatFormatting.RESET); } } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); @@ -2317,9 +3256,11 @@ public class GT_Utility { try { if (tTileEntity instanceof ic2.api.tile.IEnergyStorage) { rEUAmount += 200; - tList.add( - GT_Utility.trans("176","Contained Energy: ") + EnumChatFormatting.YELLOW + formatNumbers(((ic2.api.tile.IEnergyStorage) tTileEntity).getStored()) + EnumChatFormatting.RESET + " EU / " + - EnumChatFormatting.YELLOW + formatNumbers(((ic2.api.tile.IEnergyStorage) tTileEntity).getCapacity()) + EnumChatFormatting.RESET + " EU"); + tList.add(GT_Utility.trans("176", "Contained Energy: ") + EnumChatFormatting.YELLOW + + formatNumbers(((ic2.api.tile.IEnergyStorage) tTileEntity).getStored()) + + EnumChatFormatting.RESET + " EU / " + EnumChatFormatting.YELLOW + + formatNumbers(((ic2.api.tile.IEnergyStorage) tTileEntity).getCapacity()) + + EnumChatFormatting.RESET + " EU"); } } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); @@ -2327,7 +3268,10 @@ public class GT_Utility { try { if (tTileEntity instanceof IUpgradableMachine) { rEUAmount += 500; - if (((IUpgradableMachine) tTileEntity).hasMufflerUpgrade()) tList.add(EnumChatFormatting.GREEN + GT_Utility.trans("177","Has Muffler Upgrade") + EnumChatFormatting.RESET); + if (((IUpgradableMachine) tTileEntity).hasMufflerUpgrade()) + tList.add(EnumChatFormatting.GREEN + + GT_Utility.trans("177", "Has Muffler Upgrade") + + EnumChatFormatting.RESET); } } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); @@ -2343,8 +3287,10 @@ public class GT_Utility { rEUAmount += 400; int tValue = 0; if (0 < (tValue = ((IMachineProgress) tTileEntity).getMaxProgress())) - tList.add(GT_Utility.trans("178","Progress/Load: ") + EnumChatFormatting.GREEN + formatNumbers(((IMachineProgress) tTileEntity).getProgress()) + EnumChatFormatting.RESET + " / " + - EnumChatFormatting.YELLOW + formatNumbers(tValue) + EnumChatFormatting.RESET); + tList.add(GT_Utility.trans("178", "Progress/Load: ") + EnumChatFormatting.GREEN + + formatNumbers(((IMachineProgress) tTileEntity).getProgress()) + + EnumChatFormatting.RESET + " / " + EnumChatFormatting.YELLOW + formatNumbers(tValue) + + EnumChatFormatting.RESET); } } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); @@ -2352,36 +3298,55 @@ public class GT_Utility { try { if (tTileEntity instanceof ICoverable) { rEUAmount += 300; - final String tString = ((ICoverable) tTileEntity).getCoverBehaviorAtSideNew((byte) aSide).getDescription((byte) aSide, ((ICoverable) tTileEntity).getCoverIDAtSide((byte) aSide), ((ICoverable) tTileEntity).getComplexCoverDataAtSide((byte) aSide), (ICoverable) tTileEntity); + final String tString = ((ICoverable) tTileEntity) + .getCoverBehaviorAtSideNew((byte) aSide) + .getDescription( + (byte) aSide, + ((ICoverable) tTileEntity).getCoverIDAtSide((byte) aSide), + ((ICoverable) tTileEntity).getComplexCoverDataAtSide((byte) aSide), + (ICoverable) tTileEntity); if (tString != null && !tString.equals(E)) tList.add(tString); } } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); } try { - if (tTileEntity instanceof IBasicEnergyContainer && ((IBasicEnergyContainer) tTileEntity).getEUCapacity() > 0) { - tList.add( - GT_Utility.trans("179","Max IN: ") + EnumChatFormatting.RED + formatNumbers(((IBasicEnergyContainer) tTileEntity).getInputVoltage()) + " (" + GT_Values.VN[getTier(((IBasicEnergyContainer) tTileEntity).getInputVoltage())] + ") " + EnumChatFormatting.RESET + - GT_Utility.trans("182"," EU at ") + EnumChatFormatting.RED + formatNumbers(((IBasicEnergyContainer)tTileEntity).getInputAmperage()) + EnumChatFormatting.RESET + GT_Utility.trans("183"," A")); - tList.add( - GT_Utility.trans("181","Max OUT: ") + EnumChatFormatting.RED + formatNumbers(((IBasicEnergyContainer) tTileEntity).getOutputVoltage()) + " (" + GT_Values.VN[getTier(((IBasicEnergyContainer) tTileEntity).getOutputVoltage())] + ") " + EnumChatFormatting.RESET + - GT_Utility.trans("182"," EU at ") + EnumChatFormatting.RED + formatNumbers(((IBasicEnergyContainer) tTileEntity).getOutputAmperage()) + EnumChatFormatting.RESET + GT_Utility.trans("183"," A")); - tList.add( - GT_Utility.trans("184","Energy: ") + EnumChatFormatting.GREEN + formatNumbers(((IBasicEnergyContainer) tTileEntity).getStoredEU()) + EnumChatFormatting.RESET + " EU / " + - EnumChatFormatting.YELLOW + formatNumbers(((IBasicEnergyContainer) tTileEntity).getEUCapacity()) + EnumChatFormatting.RESET + " EU"); + if (tTileEntity instanceof IBasicEnergyContainer + && ((IBasicEnergyContainer) tTileEntity).getEUCapacity() > 0) { + tList.add(GT_Utility.trans("179", "Max IN: ") + EnumChatFormatting.RED + + formatNumbers(((IBasicEnergyContainer) tTileEntity).getInputVoltage()) + " (" + + GT_Values.VN[getTier(((IBasicEnergyContainer) tTileEntity).getInputVoltage())] + ") " + + EnumChatFormatting.RESET + GT_Utility.trans("182", " EU at ") + EnumChatFormatting.RED + + formatNumbers(((IBasicEnergyContainer) tTileEntity).getInputAmperage()) + + EnumChatFormatting.RESET + GT_Utility.trans("183", " A")); + tList.add(GT_Utility.trans("181", "Max OUT: ") + EnumChatFormatting.RED + + formatNumbers(((IBasicEnergyContainer) tTileEntity).getOutputVoltage()) + " (" + + GT_Values.VN[getTier(((IBasicEnergyContainer) tTileEntity).getOutputVoltage())] + ") " + + EnumChatFormatting.RESET + GT_Utility.trans("182", " EU at ") + EnumChatFormatting.RED + + formatNumbers(((IBasicEnergyContainer) tTileEntity).getOutputAmperage()) + + EnumChatFormatting.RESET + GT_Utility.trans("183", " A")); + tList.add(GT_Utility.trans("184", "Energy: ") + EnumChatFormatting.GREEN + + formatNumbers(((IBasicEnergyContainer) tTileEntity).getStoredEU()) + + EnumChatFormatting.RESET + " EU / " + EnumChatFormatting.YELLOW + + formatNumbers(((IBasicEnergyContainer) tTileEntity).getEUCapacity()) + + EnumChatFormatting.RESET + " EU"); } } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); } try { if (tTileEntity instanceof IGregTechTileEntity) { - tList.add(GT_Utility.trans("186","Owned by: ") + EnumChatFormatting.BLUE + ((IGregTechTileEntity) tTileEntity).getOwnerName() + EnumChatFormatting.RESET); + tList.add(GT_Utility.trans("186", "Owned by: ") + + EnumChatFormatting.BLUE + + ((IGregTechTileEntity) tTileEntity).getOwnerName() + + EnumChatFormatting.RESET); } } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); } try { - if (tTileEntity instanceof IGregTechDeviceInformation && ((IGregTechDeviceInformation) tTileEntity).isGivingInformation()) { + if (tTileEntity instanceof IGregTechDeviceInformation + && ((IGregTechDeviceInformation) tTileEntity).isGivingInformation()) { tList.addAll(Arrays.asList(((IGregTechDeviceInformation) tTileEntity).getInfoData())); } } catch (Throwable e) { @@ -2391,32 +3356,40 @@ public class GT_Utility { if (tTileEntity instanceof ic2.api.crops.ICropTile) { rEUAmount += 1000; final ic2.api.crops.ICropTile crop = (ic2.api.crops.ICropTile) tTileEntity; - if (crop.getScanLevel() < 4) - crop.setScanLevel((byte) 4); + if (crop.getScanLevel() < 4) crop.setScanLevel((byte) 4); if (crop.getCrop() != null) { - tList.add(GT_Utility.trans("187", "Type -- Crop-Name: ") + crop.getCrop().name() - + GT_Utility.trans("188", " Growth: ") + crop.getGrowth() - + GT_Utility.trans("189", " Gain: ") + crop.getGain() - + GT_Utility.trans("190", " Resistance: ") + crop.getResistance() - ); + tList.add(GT_Utility.trans("187", "Type -- Crop-Name: ") + + crop.getCrop().name() + + GT_Utility.trans("188", " Growth: ") + + crop.getGrowth() + + GT_Utility.trans("189", " Gain: ") + + crop.getGain() + + GT_Utility.trans("190", " Resistance: ") + + crop.getResistance()); } - tList.add(GT_Utility.trans("191","Plant -- Fertilizer: ") + crop.getNutrientStorage() - + GT_Utility.trans("192"," Water: ") + crop.getHydrationStorage() - + GT_Utility.trans("193"," Weed-Ex: ") + crop.getWeedExStorage() - + GT_Utility.trans("194"," Scan-Level: ") + crop.getScanLevel() - ); - tList.add(GT_Utility.trans("195","Environment -- Nutrients: ") + crop.getNutrients() - + GT_Utility.trans("196"," Humidity: ") + crop.getHumidity() - + GT_Utility.trans("197"," Air-Quality: ") + crop.getAirQuality() - ); + tList.add(GT_Utility.trans("191", "Plant -- Fertilizer: ") + + crop.getNutrientStorage() + + GT_Utility.trans("192", " Water: ") + + crop.getHydrationStorage() + + GT_Utility.trans("193", " Weed-Ex: ") + + crop.getWeedExStorage() + + GT_Utility.trans("194", " Scan-Level: ") + + crop.getScanLevel()); + tList.add(GT_Utility.trans("195", "Environment -- Nutrients: ") + + crop.getNutrients() + + GT_Utility.trans("196", " Humidity: ") + + crop.getHumidity() + + GT_Utility.trans("197", " Air-Quality: ") + + crop.getAirQuality()); if (crop.getCrop() != null) { final StringBuilder tStringB = new StringBuilder(); for (String tAttribute : crop.getCrop().attributes()) { tStringB.append(", ").append(tAttribute); } final String tString = tStringB.toString(); - tList.add(GT_Utility.trans("198","Attributes:") + tString.replaceFirst(",", E)); - tList.add(GT_Utility.trans("199","Discovered by: ") + crop.getCrop().discoveredBy()); + tList.add(GT_Utility.trans("198", "Attributes:") + tString.replaceFirst(",", E)); + tList.add(GT_Utility.trans("199", "Discovered by: ") + + crop.getCrop().discoveredBy()); } } } catch (Throwable e) { @@ -2425,34 +3398,41 @@ public class GT_Utility { try { if (tTileEntity instanceof forestry.arboriculture.tiles.TileLeaves) { - final forestry.arboriculture.tiles.TileLeaves tileLeaves = (forestry.arboriculture.tiles.TileLeaves)tTileEntity; + final forestry.arboriculture.tiles.TileLeaves tileLeaves = + (forestry.arboriculture.tiles.TileLeaves) tTileEntity; final forestry.api.arboriculture.ITree tree = tileLeaves.getTree(); - if (tree != null ) { + if (tree != null) { rEUAmount += 1000; - if (!tree.isAnalyzed()) - tree.analyze(); + if (!tree.isAnalyzed()) tree.analyze(); tree.addTooltip(tList); } } } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); } - } final Chunk currentChunk = aWorld.getChunkFromBlockCoords(aX, aZ); if (aPlayer.capabilities.isCreativeMode) { - final FluidStack tFluid = undergroundOilReadInformation(currentChunk);//-# to only read - if (tFluid!=null) - tList.add(EnumChatFormatting.GOLD + tFluid.getLocalizedName() + EnumChatFormatting.RESET + ": " + EnumChatFormatting.YELLOW + formatNumbers(tFluid.amount) + EnumChatFormatting.RESET + " L"); + final FluidStack tFluid = undergroundOilReadInformation(currentChunk); // -# to only read + if (tFluid != null) + tList.add(EnumChatFormatting.GOLD + tFluid.getLocalizedName() + EnumChatFormatting.RESET + ": " + + EnumChatFormatting.YELLOW + formatNumbers(tFluid.amount) + EnumChatFormatting.RESET + " L"); else - tList.add(EnumChatFormatting.GOLD + GT_Utility.trans("201","Nothing") + EnumChatFormatting.RESET + ": " + EnumChatFormatting.YELLOW + '0' + EnumChatFormatting.RESET + " L"); + tList.add(EnumChatFormatting.GOLD + GT_Utility.trans("201", "Nothing") + EnumChatFormatting.RESET + ": " + + EnumChatFormatting.YELLOW + '0' + EnumChatFormatting.RESET + " L"); } -// if(aPlayer.capabilities.isCreativeMode){ + // if(aPlayer.capabilities.isCreativeMode){ if (GT_Pollution.hasPollution(currentChunk)) { - tList.add(GT_Utility.trans("202", "Pollution in Chunk: ") + EnumChatFormatting.RED + formatNumbers(GT_Pollution.getPollution(currentChunk)) + EnumChatFormatting.RESET + GT_Utility.trans("203", " gibbl")); + tList.add(GT_Utility.trans("202", "Pollution in Chunk: ") + + EnumChatFormatting.RED + + formatNumbers(GT_Pollution.getPollution(currentChunk)) + + EnumChatFormatting.RESET + + GT_Utility.trans("203", " gibbl")); } else { - tList.add(EnumChatFormatting.GREEN + GT_Utility.trans("204", "No Pollution in Chunk! HAYO!") + EnumChatFormatting.RESET); + tList.add(EnumChatFormatting.GREEN + + GT_Utility.trans("204", "No Pollution in Chunk! HAYO!") + + EnumChatFormatting.RESET); } try { @@ -2465,15 +3445,28 @@ public class GT_Utility { if (D1) e.printStackTrace(GT_Log.err); } - final BlockScanningEvent tEvent = new BlockScanningEvent(aWorld, aPlayer, aX, aY, aZ, (byte) aSide, aScanLevel, tBlock, tTileEntity, tList, aClickX, aClickY, aClickZ); + final BlockScanningEvent tEvent = new BlockScanningEvent( + aWorld, + aPlayer, + aX, + aY, + aZ, + (byte) aSide, + aScanLevel, + tBlock, + tTileEntity, + tList, + aClickX, + aClickY, + aClickZ); tEvent.mEUCost = rEUAmount; MinecraftForge.EVENT_BUS.post(tEvent); if (!tEvent.isCanceled()) aList.addAll(tList); return tEvent.mEUCost; } - public static String trans(String aKey, String aEnglish){ - return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_" + aKey, aEnglish, false); + public static String trans(String aKey, String aEnglish) { + return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_" + aKey, aEnglish, false); } /** @@ -2482,19 +3475,19 @@ public class GT_Utility { public static float[] getClickedFacingCoords(byte aSide, float aX, float aY, float aZ) { switch (aSide) { case 0: - return new float[]{Math.min(0.99F, Math.max(0, 1 - aX)), Math.min(0.99F, Math.max(0, aZ))}; + return new float[] {Math.min(0.99F, Math.max(0, 1 - aX)), Math.min(0.99F, Math.max(0, aZ))}; case 1: - return new float[]{Math.min(0.99F, Math.max(0, aX)), Math.min(0.99F, Math.max(0, aZ))}; + return new float[] {Math.min(0.99F, Math.max(0, aX)), Math.min(0.99F, Math.max(0, aZ))}; case 2: - return new float[]{Math.min(0.99F, Math.max(0, 1 - aX)), Math.min(0.99F, Math.max(0, 1 - aY))}; + return new float[] {Math.min(0.99F, Math.max(0, 1 - aX)), Math.min(0.99F, Math.max(0, 1 - aY))}; case 3: - return new float[]{Math.min(0.99F, Math.max(0, aX)), Math.min(0.99F, Math.max(0, 1 - aY))}; + return new float[] {Math.min(0.99F, Math.max(0, aX)), Math.min(0.99F, Math.max(0, 1 - aY))}; case 4: - return new float[]{Math.min(0.99F, Math.max(0, aZ)), Math.min(0.99F, Math.max(0, 1 - aY))}; + return new float[] {Math.min(0.99F, Math.max(0, aZ)), Math.min(0.99F, Math.max(0, 1 - aY))}; case 5: - return new float[]{Math.min(0.99F, Math.max(0, 1 - aZ)), Math.min(0.99F, Math.max(0, 1 - aY))}; + return new float[] {Math.min(0.99F, Math.max(0, 1 - aZ)), Math.min(0.99F, Math.max(0, 1 - aY))}; default: - return new float[]{0.5F, 0.5F}; + return new float[] {0.5F, 0.5F}; } } @@ -2554,15 +3547,15 @@ public class GT_Utility { return -1; } - private static DecimalFormat getDecimalFormat(){ + private static DecimalFormat getDecimalFormat() { return decimalFormatters.computeIfAbsent(Locale.getDefault(Locale.Category.FORMAT), locale -> { - DecimalFormat numberFormat =new DecimalFormat();//uses the necessary locale inside anyway + DecimalFormat numberFormat = new DecimalFormat(); // uses the necessary locale inside anyway numberFormat.setGroupingUsed(true); numberFormat.setMaximumFractionDigits(2); numberFormat.setRoundingMode(RoundingMode.HALF_UP); DecimalFormatSymbols decimalFormatSymbols = numberFormat.getDecimalFormatSymbols(); - decimalFormatSymbols.setGroupingSeparator(',');// Use sensible separator for best clarity. - numberFormat.setDecimalFormatSymbols(decimalFormatSymbols); + decimalFormatSymbols.setGroupingSeparator(','); // Use sensible separator for best clarity. + numberFormat.setDecimalFormatSymbols(decimalFormatSymbols); return numberFormat; }); } @@ -2584,48 +3577,44 @@ public class GT_Utility { */ public static boolean consumeItems(EntityPlayer player, ItemStack stack, Item item, int count) { if (stack != null && stack.getItem() == item && stack.stackSize >= count) { - if ((!player.capabilities.isCreativeMode) && (stack.stackSize != 111)) - stack.stackSize -= count; + if ((!player.capabilities.isCreativeMode) && (stack.stackSize != 111)) stack.stackSize -= count; return true; } return false; - } + } /* * Check if stack has enough items of given gregtech material (will be oredicted) * and subtract from stack, if there's no creative or 111 stack. */ - public static boolean consumeItems(EntityPlayer player, ItemStack stack, gregtech.api.enums.Materials mat, int count) { + public static boolean consumeItems( + EntityPlayer player, ItemStack stack, gregtech.api.enums.Materials mat, int count) { if (stack != null - && GT_OreDictUnificator.getItemData(stack).mMaterial.mMaterial == mat - && stack.stackSize >= count) { - if ((!player.capabilities.isCreativeMode) && (stack.stackSize != 111)) - stack.stackSize -= count; + && GT_OreDictUnificator.getItemData(stack).mMaterial.mMaterial == mat + && stack.stackSize >= count) { + if ((!player.capabilities.isCreativeMode) && (stack.stackSize != 111)) stack.stackSize -= count; return true; - } + } return false; } - public static ArrayList<String> sortByValueToList( Map<String, Integer> map ) { - List<Map.Entry<String, Integer>> list = - new LinkedList<>(map.entrySet()); + public static ArrayList<String> sortByValueToList(Map<String, Integer> map) { + List<Map.Entry<String, Integer>> list = new LinkedList<>(map.entrySet()); list.sort((o1, o2) -> o2.getValue() - o1.getValue()); ArrayList<String> result = new ArrayList<>(); - for (Map.Entry<String, Integer> e : list) - result.add(e.getKey()); + for (Map.Entry<String, Integer> e : list) result.add(e.getKey()); return result; } public static String joinListToString(List<String> list) { StringBuilder result = new StringBuilder(32); - for (String s : list) - result.append(result.length()==0?s:'|'+s); + for (String s : list) result.append(result.length() == 0 ? s : '|' + s); return result.toString(); } - public static ItemStack getIntegratedCircuit(int config){ - return ItemList.Circuit_Integrated.getWithDamage(0, config); + public static ItemStack getIntegratedCircuit(int config) { + return ItemList.Circuit_Integrated.getWithDamage(0, config); } public static float getBlockHardnessAt(World aWorld, int aX, int aY, int aZ) { @@ -2634,7 +3623,9 @@ public class GT_Utility { public static FakePlayer getFakePlayer(IGregTechTileEntity aBaseMetaTileEntity) { if (aBaseMetaTileEntity.getWorld() instanceof WorldServer) { - return FakePlayerFactory.get((WorldServer) aBaseMetaTileEntity.getWorld(), new GameProfile(aBaseMetaTileEntity.getOwnerUuid(), aBaseMetaTileEntity.getOwnerName())); + return FakePlayerFactory.get( + (WorldServer) aBaseMetaTileEntity.getWorld(), + new GameProfile(aBaseMetaTileEntity.getOwnerUuid(), aBaseMetaTileEntity.getOwnerName())); } return null; } @@ -2642,7 +3633,8 @@ public class GT_Utility { public static boolean eraseBlockByFakePlayer(FakePlayer aPlayer, int aX, int aY, int aZ, boolean isSimulate) { if (aPlayer == null) return false; World aWorld = aPlayer.worldObj; - BlockEvent.BreakEvent event = new BlockEvent.BreakEvent(aX, aY, aZ, aWorld, aWorld.getBlock(aX, aY, aZ), aWorld.getBlockMetadata(aX, aY, aZ), aPlayer); + BlockEvent.BreakEvent event = new BlockEvent.BreakEvent( + aX, aY, aZ, aWorld, aWorld.getBlock(aX, aY, aZ), aWorld.getBlockMetadata(aX, aY, aZ), aPlayer); MinecraftForge.EVENT_BUS.post(event); if (!event.isCanceled()) { if (!isSimulate) return aWorld.setBlockToAir(aX, aY, aZ); @@ -2651,10 +3643,12 @@ public class GT_Utility { return false; } - public static boolean setBlockByFakePlayer(FakePlayer aPlayer, int aX, int aY, int aZ, Block aBlock, int aMeta, boolean isSimulate) { + public static boolean setBlockByFakePlayer( + FakePlayer aPlayer, int aX, int aY, int aZ, Block aBlock, int aMeta, boolean isSimulate) { if (aPlayer == null) return false; World aWorld = aPlayer.worldObj; - BlockEvent.PlaceEvent event = ForgeEventFactory.onPlayerBlockPlace(aPlayer, new BlockSnapshot(aWorld, aX, aY, aZ, aBlock, aMeta), ForgeDirection.UNKNOWN); + BlockEvent.PlaceEvent event = ForgeEventFactory.onPlayerBlockPlace( + aPlayer, new BlockSnapshot(aWorld, aX, aY, aZ, aBlock, aMeta), ForgeDirection.UNKNOWN); if (!event.isCanceled()) { if (!isSimulate) return aWorld.setBlock(aX, aY, aZ, aBlock, aMeta, 3); return true; @@ -2662,18 +3656,16 @@ public class GT_Utility { return false; } - public static int findMatchingStackInList(List<ItemStack> aStacks, ItemStack aStack) { - if (isStackInvalid(aStack)) - return -1; + public static int findMatchingStackInList(List<ItemStack> aStacks, ItemStack aStack) { + if (isStackInvalid(aStack)) return -1; for (int i = 0, aStacksSize = aStacks.size(); i < aStacksSize; i++) { ItemStack tStack = aStacks.get(i); - if (areStacksEqual(aStack, tStack)) - return i; + if (areStacksEqual(aStack, tStack)) return i; } return -1; } - public static class ItemNBT { + public static class ItemNBT { public static void setNBT(ItemStack aStack, NBTTagCompound aNBT) { if (aNBT == null) { aStack.setTagCompound(null); @@ -2682,7 +3674,10 @@ public class GT_Utility { ArrayList<String> tTagsToRemove = new ArrayList<>(); for (Object tKey : aNBT.func_150296_c()) { NBTBase tValue = aNBT.getTag((String) tKey); - if (tValue == null || (tValue instanceof NBTPrimitive && ((NBTPrimitive) tValue).func_150291_c() == 0) || (tValue instanceof NBTTagString && isStringInvalid(((NBTTagString) tValue).func_150285_a_()))) + if (tValue == null + || (tValue instanceof NBTPrimitive && ((NBTPrimitive) tValue).func_150291_c() == 0) + || (tValue instanceof NBTTagString + && isStringInvalid(((NBTTagString) tValue).func_150285_a_()))) tTagsToRemove.add((String) tKey); } for (Object tKey : tTagsToRemove) aNBT.removeTag((String) tKey); @@ -2750,11 +3745,15 @@ public class GT_Utility { return tNBT.getString("author"); } - public static void setProspectionData(ItemStack aStack, int aX, int aY, int aZ, int aDim, FluidStack aFluid, String... aOres) { + public static void setProspectionData( + ItemStack aStack, int aX, int aY, int aZ, int aDim, FluidStack aFluid, String... aOres) { NBTTagCompound tNBT = getNBT(aStack); StringBuilder tData = new StringBuilder(aX + "," + aY + "," + aZ + "," + aDim + ","); - if (aFluid!=null) - tData.append(aFluid.amount).append(",").append(aFluid.getLocalizedName()).append(",");//TODO CHECK IF THAT /5000 is needed (Not needed) + if (aFluid != null) + tData.append(aFluid.amount) + .append(",") + .append(aFluid.getLocalizedName()) + .append(","); // TODO CHECK IF THAT /5000 is needed (Not needed) for (String tString : aOres) { tData.append(tString).append(","); } @@ -2765,7 +3764,10 @@ public class GT_Utility { public static void setAdvancedProspectionData( byte aTier, ItemStack aStack, - int aX, short aY, int aZ, int aDim, + int aX, + short aY, + int aZ, + int aDim, ArrayList<String> aOils, ArrayList<String> aOres, int aRadius) { @@ -2784,38 +3786,40 @@ public class GT_Utility { // oils ArrayList<String> tOilsTransformed = new ArrayList<>(aOils.size()); for (String aStr : aOils) { - String[] aStats = aStr.split(","); - tOilsTransformed.add(aStats[0] + ": " + aStats[1] + "L " + aStats[2]); + String[] aStats = aStr.split(","); + tOilsTransformed.add(aStats[0] + ": " + aStats[1] + "L " + aStats[2]); } tNBT.setString("prospection_oils", joinListToString(tOilsTransformed)); - String tOilsPosStr = "X: " + Math.floorDiv(aX, 16*8)*16*8 + " Z: " + Math.floorDiv(aZ, 16*8)*16*8 + "\n"; - int xOff = aX - Math.floorDiv(aX, 16*8)*16*8; - xOff = xOff/16; + String tOilsPosStr = + "X: " + Math.floorDiv(aX, 16 * 8) * 16 * 8 + " Z: " + Math.floorDiv(aZ, 16 * 8) * 16 * 8 + "\n"; + int xOff = aX - Math.floorDiv(aX, 16 * 8) * 16 * 8; + xOff = xOff / 16; int xOffRemain = 7 - xOff; - int zOff = aZ - Math.floorDiv(aZ, 16*8)*16*8; - zOff = zOff/16; + int zOff = aZ - Math.floorDiv(aZ, 16 * 8) * 16 * 8; + zOff = zOff / 16; int zOffRemain = 7 - zOff; - for( ; zOff > 0; zOff-- ) { + for (; zOff > 0; zOff--) { tOilsPosStr = tOilsPosStr.concat("--------\n"); } - for( ; xOff > 0; xOff-- ) { + for (; xOff > 0; xOff--) { tOilsPosStr = tOilsPosStr.concat("-"); } tOilsPosStr = tOilsPosStr.concat("P"); - for( ; xOffRemain > 0; xOffRemain-- ) { + for (; xOffRemain > 0; xOffRemain--) { tOilsPosStr = tOilsPosStr.concat("-"); } tOilsPosStr = tOilsPosStr.concat("\n"); - for( ; zOffRemain > 0; zOffRemain-- ) { + for (; zOffRemain > 0; zOffRemain--) { tOilsPosStr = tOilsPosStr.concat("--------\n"); } - tOilsPosStr = tOilsPosStr.concat( " X: " + (Math.floorDiv(aX, 16*8) + 1)*16*8 + " Z: " + (Math.floorDiv(aZ, 16*8) + 1)*16*8 ); // +1 oilfied to find bottomright of [5] + tOilsPosStr = tOilsPosStr.concat(" X: " + (Math.floorDiv(aX, 16 * 8) + 1) * 16 * 8 + " Z: " + + (Math.floorDiv(aZ, 16 * 8) + 1) * 16 * 8); // +1 oilfied to find bottomright of [5] tNBT.setString("prospection_oils_pos", tOilsPosStr); @@ -2832,13 +3836,18 @@ public class GT_Utility { String tData = tNBT.getString("prospection"); String[] tDataArray = tData.split(","); if (tDataArray.length > 6) { - tNBT.setString("author", " Dim: " + tDataArray[3] + "X: " + tDataArray[0] + " Y: " + tDataArray[1] + " Z: " + tDataArray[2]); + tNBT.setString( + "author", + " Dim: " + tDataArray[3] + "X: " + tDataArray[0] + " Y: " + tDataArray[1] + " Z: " + + tDataArray[2]); NBTTagList tNBTList = new NBTTagList(); StringBuilder tOres = new StringBuilder(" Prospected Ores: "); for (int i = 6; tDataArray.length > i; i++) { tOres.append(tDataArray[i]).append(" "); } - tNBTList.appendTag(new NBTTagString("Tier " + tTier + " Prospecting Data From: X" + tDataArray[0] + " Z:" + tDataArray[2] + " Dim:" + tDataArray[3] + " Produces " + tDataArray[4] + "L " + tDataArray[5] + " " + tOres)); + tNBTList.appendTag(new NBTTagString("Tier " + tTier + " Prospecting Data From: X" + tDataArray[0] + + " Z:" + tDataArray[2] + " Dim:" + tDataArray[3] + " Produces " + tDataArray[4] + "L " + + tDataArray[5] + " " + tOres)); tNBT.setTag("pages", tNBTList); } } else { // advanced prospection data @@ -2855,19 +3864,16 @@ public class GT_Utility { NBTTagList tNBTList = new NBTTagList(); String tPageText = "Prospector report\n" - + tPos + "\n\n" - + "Oils: " + (tOils != null ? tOils.length : 0) + "\n\n" - + "Ores within " + tRadius + " blocks\n\n" - + "Location is center of orevein\n\n" - + "Check NEI to confirm orevein type"; + + tPos + "\n\n" + + "Oils: " + (tOils != null ? tOils.length : 0) + "\n\n" + + "Ores within " + tRadius + " blocks\n\n" + + "Location is center of orevein\n\n" + + "Check NEI to confirm orevein type"; tNBTList.appendTag(new NBTTagString(tPageText)); - if (tOres != null) - fillBookWithList(tNBTList, "Ores Found %s\n\n", "\n", 7, tOres); - + if (tOres != null) fillBookWithList(tNBTList, "Ores Found %s\n\n", "\n", 7, tOres); - if (tOils != null) - fillBookWithList(tNBTList, "Oils%s\n\n", "\n", 9, tOils); + if (tOils != null) fillBookWithList(tNBTList, "Oils%s\n\n", "\n", 9, tOils); tPageText = "Oil notes\n\n" + "Prospects from NW to SE 576 chunks" @@ -2879,26 +3885,27 @@ public class GT_Utility { + "[5] - Prospector in this 8x8 area"; tNBTList.appendTag(new NBTTagString(tPageText)); - tPageText = "Corners of [5] are \n" + - tOilsPosStr + "\n" + - "P - Prospector in 8x8 field"; + tPageText = "Corners of [5] are \n" + tOilsPosStr + "\n" + "P - Prospector in 8x8 field"; tNBTList.appendTag(new NBTTagString(tPageText)); - tNBT.setString("author", tPos.replace("\n"," ")); + tNBT.setString("author", tPos.replace("\n", " ")); tNBT.setTag("pages", tNBTList); } setNBT(aStack, tNBT); } - public static void fillBookWithList(NBTTagList aBook, String aPageHeader, String aListDelimiter, int aItemsPerPage, String[] list) { + public static void fillBookWithList( + NBTTagList aBook, String aPageHeader, String aListDelimiter, int aItemsPerPage, String[] list) { String aPageFormatter = " %d/%d"; int tTotalPages = list.length / aItemsPerPage + (list.length % aItemsPerPage > 0 ? 1 : 0); int tPage = 0; StringBuilder tPageText; do { tPageText = new StringBuilder(); - for (int i = tPage*aItemsPerPage; i < (tPage+1)*aItemsPerPage && i < list.length; i += 1) - tPageText.append((tPageText.length() == 0) ? "" : aListDelimiter).append(list[i]); + for (int i = tPage * aItemsPerPage; i < (tPage + 1) * aItemsPerPage && i < list.length; i += 1) + tPageText + .append((tPageText.length() == 0) ? "" : aListDelimiter) + .append(list[i]); if (tPageText.length() > 0) { String tPageCounter = tTotalPages > 1 ? String.format(aPageFormatter, tPage + 1, tTotalPages) : ""; @@ -2955,7 +3962,9 @@ public class GT_Utility { if (Enchantment.enchantmentsList[short1] != null) aBullshitModifier.calculateModifier(Enchantment.enchantmentsList[short1], short2); } - } catch (Throwable e) {/**/} + } catch (Throwable e) { + /**/ + } } } } @@ -2991,8 +4000,7 @@ public class GT_Utility { public EntityLivingBase mPlayer; public Entity mEntity; - BullshitIteratorA() { - } + BullshitIteratorA() {} @Override public void calculateModifier(Enchantment aEnchantment, int aLevel) { @@ -3004,8 +4012,7 @@ public class GT_Utility { public EntityLivingBase mPlayer; public Entity mEntity; - BullshitIteratorB() { - } + BullshitIteratorB() {} @Override public void calculateModifier(Enchantment aEnchantment, int aLevel) { @@ -3014,27 +4021,31 @@ public class GT_Utility { } } - public static String toSubscript(long no){ - char[] chars=Long.toString(no).toCharArray(); - for(int i=0;i<chars.length;i++){ - chars[i]+=8272; + public static String toSubscript(long no) { + char[] chars = Long.toString(no).toCharArray(); + for (int i = 0; i < chars.length; i++) { + chars[i] += 8272; } return new String(chars); } - public static boolean isPartOfMaterials(ItemStack aStack, Materials aMaterials){ - return GT_OreDictUnificator.getAssociation(aStack) != null && GT_OreDictUnificator.getAssociation(aStack).mMaterial.mMaterial.equals(aMaterials); + public static boolean isPartOfMaterials(ItemStack aStack, Materials aMaterials) { + return GT_OreDictUnificator.getAssociation(aStack) != null + && GT_OreDictUnificator.getAssociation(aStack) + .mMaterial + .mMaterial + .equals(aMaterials); } - public static boolean isPartOfOrePrefix(ItemStack aStack, OrePrefixes aPrefix){ - return GT_OreDictUnificator.getAssociation(aStack) != null && GT_OreDictUnificator.getAssociation(aStack).mPrefix.equals(aPrefix); + public static boolean isPartOfOrePrefix(ItemStack aStack, OrePrefixes aPrefix) { + return GT_OreDictUnificator.getAssociation(aStack) != null + && GT_OreDictUnificator.getAssociation(aStack).mPrefix.equals(aPrefix); } public static final ImmutableSet<String> ORE_BLOCK_CLASSES = ImmutableSet.of( "com.github.bartimaeusnek.bartworks.system.material.BW_MetaGenerated_Ores", "com.github.bartimaeusnek.bartworks.system.material.BW_MetaGenerated_SmallOres", - "gtPlusPlus.core.block.base.BlockBaseOre" - ); + "gtPlusPlus.core.block.base.BlockBaseOre"); public static boolean isOre(Block aBlock, int aMeta) { return (aBlock instanceof GT_Block_Ores_Abstract) @@ -3047,7 +4058,7 @@ public class GT_Utility { if (sOreTable.containsKey(tItem)) { return sOreTable.get(tItem); } - for (int id: OreDictionary.getOreIDs(aStack)) { + for (int id : OreDictionary.getOreIDs(aStack)) { if (OreDictionary.getOreName(id).startsWith("ore")) { sOreTable.put(tItem, true); return true; @@ -3063,9 +4074,11 @@ public class GT_Utility { */ public static ItemStack getCobbleForOre(Block ore, short metaData) { // We need to convert small ores to regular ores because small ores don't have associated ItemData. - // We take the modulus of the metadata by 16000 because that is the magic number to convert small ores to regular ores. + // We take the modulus of the metadata by 16000 because that is the magic number to convert small ores to + // regular ores. // See: GT_TileEntity_Ores.java - ItemData association = GT_OreDictUnificator.getAssociation(new ItemStack(Item.getItemFromBlock(ore), 1, metaData % 16000)); + ItemData association = + GT_OreDictUnificator.getAssociation(new ItemStack(Item.getItemFromBlock(ore), 1, metaData % 16000)); if (association != null) { Supplier<ItemStack> supplier = sOreToCobble.get(association.mPrefix); if (supplier != null) { @@ -3089,9 +4102,8 @@ public class GT_Utility { } else if (o instanceof String) { ItemStack stack = GT_OreDictUnificator.get(o, 1); if (stack == null) { - Optional<ItemStack> oStack = OreDictionary.getOres((String) o) - .stream() - .findAny(); + Optional<ItemStack> oStack = + OreDictionary.getOres((String) o).stream().findAny(); if (oStack.isPresent()) { ItemStack copy = oStack.get().copy(); inputs.add(copy); @@ -3100,29 +4112,17 @@ public class GT_Utility { ItemStack copy = stack.copy(); inputs.add(copy); } - } else if (o instanceof Item) - inputs.add(new ItemStack((Item) o)); - else if (o instanceof Block) - inputs.add(new ItemStack((Block) o)); - else - throw new IllegalStateException("A Recipe contains an invalid input! Output: " + output); + } else if (o instanceof Item) inputs.add(new ItemStack((Item) o)); + else if (o instanceof Block) inputs.add(new ItemStack((Block) o)); + else throw new IllegalStateException("A Recipe contains an invalid input! Output: " + output); } inputs.removeIf(x -> x.getItem() instanceof GT_MetaGenerated_Tool); - return Optional.of( - new GT_Recipe( - false, - new ItemStack[]{output}, - inputs.toArray(new ItemStack[0]), - null, null, - null, null, - 300, 30, 0 - ) - ); + return Optional.of(new GT_Recipe( + false, new ItemStack[] {output}, inputs.toArray(new ItemStack[0]), null, null, null, null, 300, 30, 0)); } - public static Optional<GT_Recipe> reverseShapedRecipe(ItemStack output, Object... aRecipe) { if (output == null) { return Optional.empty(); @@ -3136,17 +4136,13 @@ public class GT_Utility { Object o = aRecipe[i]; if (!startFound) { if (o instanceof String) { - for (Character c : ((String) o).toCharArray()) - amounts.merge(c, 1, (a, b) -> ++a); - } else if (o instanceof Character) - startFound = true; - } else if (!(o instanceof Character)) - ingridients.put((Character) aRecipe[i - 1], o); + for (Character c : ((String) o).toCharArray()) amounts.merge(c, 1, (a, b) -> ++a); + } else if (o instanceof Character) startFound = true; + } else if (!(o instanceof Character)) ingridients.put((Character) aRecipe[i - 1], o); } for (Map.Entry<Character, Object> characterObjectEntry : ingridients.entrySet()) { for (Map.Entry<Character, Integer> characterIntegerEntry : amounts.entrySet()) { - if (characterObjectEntry.getKey() != characterIntegerEntry.getKey()) - continue; + if (characterObjectEntry.getKey() != characterIntegerEntry.getKey()) continue; recipeAsMap.put(characterObjectEntry.getValue(), characterIntegerEntry.getValue()); } } @@ -3164,9 +4160,8 @@ public class GT_Utility { if (ToolDictNames.contains(dictName)) continue; ItemStack stack = GT_OreDictUnificator.get(dictName, null, amount, false, true); if (stack == null) { - Optional<ItemStack> oStack = OreDictionary.getOres(dictName) - .stream() - .findAny(); + Optional<ItemStack> oStack = + OreDictionary.getOres(dictName).stream().findAny(); if (oStack.isPresent()) { ItemStack copy = oStack.get().copy(); copy.stackSize = amount; @@ -3177,27 +4172,16 @@ public class GT_Utility { copy.stackSize = amount; inputs.add(copy); } - } else if (o.getKey() instanceof Item) - inputs.add(new ItemStack((Item) o.getKey(), amount)); - else if (o.getKey() instanceof Block) - inputs.add(new ItemStack((Block) o.getKey(), amount)); - else - throw new IllegalStateException("A Recipe contains an invalid input! Output: " + output); + } else if (o.getKey() instanceof Item) inputs.add(new ItemStack((Item) o.getKey(), amount)); + else if (o.getKey() instanceof Block) inputs.add(new ItemStack((Block) o.getKey(), amount)); + else throw new IllegalStateException("A Recipe contains an invalid input! Output: " + output); } // Remove tools from inputs in case a recipe has one as a direct Item or ItemStack reference inputs.removeIf(x -> x.getItem() instanceof GT_MetaGenerated_Tool); - return Optional.of( - new GT_Recipe( - false, - new ItemStack[]{output}, - inputs.toArray(new ItemStack[0]), - null, null, - null, null, - 300, 30, 0 - ) - ); + return Optional.of(new GT_Recipe( + false, new ItemStack[] {output}, inputs.toArray(new ItemStack[0]), null, null, null, null, 300, 30, 0)); } /** @@ -3224,8 +4208,7 @@ public class GT_Utility { * Hash an item stack for the purpose of storing hash across launches */ public static int persistentHash(ItemStack aStack, boolean aUseStackSize, boolean aUseNBT) { - if (aStack == null) - return 0; + if (aStack == null) return 0; int result = Objects.hashCode(GameRegistry.findUniqueIdentifierFor(aStack.getItem())); result = result * 31 + Items.feather.getDamage(aStack); @@ -3238,8 +4221,7 @@ public class GT_Utility { * Hash an item stack for the purpose of storing hash across launches */ public static int persistentHash(FluidStack aStack, boolean aUseStackSize, boolean aUseNBT) { - if (aStack == null) - return 0; + if (aStack == null) return 0; int base = Objects.hashCode(aStack.getFluid().getName()); if (aUseStackSize) base = base * 31 + aStack.amount; @@ -3248,8 +4230,7 @@ public class GT_Utility { } public static int getCasingTextureIndex(Block block, int meta) { - if (block instanceof IHasIndexedTexture) - return ((IHasIndexedTexture) block).getTextureIndex(meta); + if (block instanceof IHasIndexedTexture) return ((IHasIndexedTexture) block).getTextureIndex(meta); return Textures.BlockIcons.ERROR_TEXTURE_INDEX; } @@ -3262,17 +4243,17 @@ public class GT_Utility { nbt = (NBTTagCompound) nbt.copy(); } - return new AutoValue_GT_Utility_ItemId( - itemStack.getItem(), itemStack.getItemDamage(), nbt); + return new AutoValue_GT_Utility_ItemId(itemStack.getItem(), itemStack.getItemDamage(), nbt); } /** This method does not copy NBT in order to save time. Make sure not to mutate it! */ public static ItemId createNoCopy(ItemStack itemStack) { return new AutoValue_GT_Utility_ItemId( - itemStack.getItem(), itemStack.getItemDamage(), itemStack.getTagCompound()); + itemStack.getItem(), itemStack.getItemDamage(), itemStack.getTagCompound()); } protected abstract Item item(); + protected abstract int metaData(); @Nullable diff --git a/src/main/java/gregtech/api/util/GT_UtilityClient.java b/src/main/java/gregtech/api/util/GT_UtilityClient.java index bb161802ed..8cbf6bf4ad 100644 --- a/src/main/java/gregtech/api/util/GT_UtilityClient.java +++ b/src/main/java/gregtech/api/util/GT_UtilityClient.java @@ -2,45 +2,49 @@ package gregtech.api.util; import com.google.common.collect.Lists; import cpw.mods.fml.relauncher.ReflectionHelper; +import java.lang.reflect.Field; +import java.util.List; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.Tessellator; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import java.lang.reflect.Field; -import java.util.List; - public class GT_UtilityClient { - private static final Field isDrawingField = ReflectionHelper.findField(Tessellator.class, "isDrawing", "field_78415_z"); - - public static boolean isDrawing(Tessellator tess) { - try { - return isDrawingField.getBoolean(tess); - } catch (IllegalAccessException e) { - e.printStackTrace(); - return false; - } - } - + private static final Field isDrawingField = + ReflectionHelper.findField(Tessellator.class, "isDrawing", "field_78415_z"); - @SuppressWarnings("unchecked") - public static List<String> getTooltip(ItemStack aStack, boolean aGuiStyle) { - try { - List<String> tooltip = aStack.getTooltip(Minecraft.getMinecraft().thePlayer, Minecraft.getMinecraft().gameSettings.advancedItemTooltips); - if (aGuiStyle) { - tooltip.set(0, (aStack.getRarity() == null ? EnumRarity.common : aStack.getRarity()).rarityColor +tooltip.get(0)); - for (int i = 1; i < tooltip.size(); i++) { - tooltip.set(i, EnumChatFormatting.GRAY + tooltip.get(i)); - } - } - return tooltip; - } catch (RuntimeException e) { - // Collections.singletonList() can not be added to. we don't want that - if (aGuiStyle) - return Lists.newArrayList((aStack.getRarity() == null ? EnumRarity.common : aStack.getRarity()).rarityColor + aStack.getDisplayName()); - return Lists.newArrayList(aStack.getDisplayName()); - } - } + public static boolean isDrawing(Tessellator tess) { + try { + return isDrawingField.getBoolean(tess); + } catch (IllegalAccessException e) { + e.printStackTrace(); + return false; + } + } + @SuppressWarnings("unchecked") + public static List<String> getTooltip(ItemStack aStack, boolean aGuiStyle) { + try { + List<String> tooltip = aStack.getTooltip( + Minecraft.getMinecraft().thePlayer, Minecraft.getMinecraft().gameSettings.advancedItemTooltips); + if (aGuiStyle) { + tooltip.set( + 0, + (aStack.getRarity() == null ? EnumRarity.common : aStack.getRarity()).rarityColor + + tooltip.get(0)); + for (int i = 1; i < tooltip.size(); i++) { + tooltip.set(i, EnumChatFormatting.GRAY + tooltip.get(i)); + } + } + return tooltip; + } catch (RuntimeException e) { + // Collections.singletonList() can not be added to. we don't want that + if (aGuiStyle) + return Lists.newArrayList( + (aStack.getRarity() == null ? EnumRarity.common : aStack.getRarity()).rarityColor + + aStack.getDisplayName()); + return Lists.newArrayList(aStack.getDisplayName()); + } + } } diff --git a/src/main/java/gregtech/api/util/IGT_HatchAdder.java b/src/main/java/gregtech/api/util/IGT_HatchAdder.java index 16fdd90e62..ecf2921d36 100644 --- a/src/main/java/gregtech/api/util/IGT_HatchAdder.java +++ b/src/main/java/gregtech/api/util/IGT_HatchAdder.java @@ -1,6 +1,5 @@ package gregtech.api.util; - import gregtech.api.interfaces.tileentity.IGregTechTileEntity; public interface IGT_HatchAdder<T> { @@ -22,6 +21,7 @@ public interface IGT_HatchAdder<T> { } default IGT_HatchAdder<T> orElse(IGT_HatchAdder<? super T> fallback) { - return (t, iGregTechTileEntity, aShort) -> IGT_HatchAdder.this.apply(t, iGregTechTileEntity, aShort) || fallback.apply(t, iGregTechTileEntity, aShort); + return (t, iGregTechTileEntity, aShort) -> IGT_HatchAdder.this.apply(t, iGregTechTileEntity, aShort) + || fallback.apply(t, iGregTechTileEntity, aShort); } } diff --git a/src/main/java/gregtech/api/util/ISerializableObject.java b/src/main/java/gregtech/api/util/ISerializableObject.java index 536aea7545..b8014860f8 100644 --- a/src/main/java/gregtech/api/util/ISerializableObject.java +++ b/src/main/java/gregtech/api/util/ISerializableObject.java @@ -2,6 +2,9 @@ package gregtech.api.util; import com.google.common.io.ByteArrayDataInput; import io.netty.buffer.ByteBuf; +import java.io.IOException; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -11,10 +14,6 @@ import net.minecraft.nbt.NBTSizeTracker; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagInt; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import java.io.IOException; - /** * We could well have used {@link java.io.Serializable}, but that's too slow and should generally be avoided * @@ -58,9 +57,8 @@ public interface ISerializableObject { */ static NBTTagCompound readCompoundTagFromGreggyByteBuf(ByteArrayDataInput aBuf) { short size = aBuf.readShort(); - if (size < 0) - return null; - else { + if (size < 0) return null; + else { byte[] buf = new byte[size]; // this is shit, how many copies have we been doing? aBuf.readFully(buf); try { @@ -90,8 +88,7 @@ public interface ISerializableObject { final class LegacyCoverData implements ISerializableObject { private int mData; - public LegacyCoverData() { - } + public LegacyCoverData() {} public LegacyCoverData(int mData) { this.mData = mData; diff --git a/src/main/java/gregtech/api/util/LightingHelper.java b/src/main/java/gregtech/api/util/LightingHelper.java index f131ef74a0..7bffbfd00d 100644 --- a/src/main/java/gregtech/api/util/LightingHelper.java +++ b/src/main/java/gregtech/api/util/LightingHelper.java @@ -42,6 +42,7 @@ public class LightingHelper { * Ambient occlusion values for all four corners of side. */ private float aoTopLeft, aoBottomLeft, aoBottomRight, aoTopRight; + private boolean hasLightnessOverride; private float lightnessOverride; private boolean hasBrightnessOverride; @@ -93,7 +94,7 @@ public class LightingHelper { float green = color[1] / 255.0F; float blue = color[2] / 255.0F; - return new float[]{red, green, blue}; + return new float[] {red, green, blue}; } /** @@ -229,15 +230,21 @@ public class LightingHelper { if (renderBlocks.hasOverrideBlockTexture()) { - renderBlocks.colorRedTopLeft = renderBlocks.colorRedBottomLeft = renderBlocks.colorRedBottomRight = renderBlocks.colorRedTopRight = rgb[0]; - renderBlocks.colorGreenTopLeft = renderBlocks.colorGreenBottomLeft = renderBlocks.colorGreenBottomRight = renderBlocks.colorGreenTopRight = rgb[1]; - renderBlocks.colorBlueTopLeft = renderBlocks.colorBlueBottomLeft = renderBlocks.colorBlueBottomRight = renderBlocks.colorBlueTopRight = rgb[2]; + renderBlocks.colorRedTopLeft = renderBlocks.colorRedBottomLeft = + renderBlocks.colorRedBottomRight = renderBlocks.colorRedTopRight = rgb[0]; + renderBlocks.colorGreenTopLeft = renderBlocks.colorGreenBottomLeft = + renderBlocks.colorGreenBottomRight = renderBlocks.colorGreenTopRight = rgb[1]; + renderBlocks.colorBlueTopLeft = renderBlocks.colorBlueBottomLeft = + renderBlocks.colorBlueBottomRight = renderBlocks.colorBlueTopRight = rgb[2]; } else { - renderBlocks.colorRedTopLeft = renderBlocks.colorRedBottomLeft = renderBlocks.colorRedBottomRight = renderBlocks.colorRedTopRight = rgb[0] * lightness; - renderBlocks.colorGreenTopLeft = renderBlocks.colorGreenBottomLeft = renderBlocks.colorGreenBottomRight = renderBlocks.colorGreenTopRight = rgb[1] * lightness; - renderBlocks.colorBlueTopLeft = renderBlocks.colorBlueBottomLeft = renderBlocks.colorBlueBottomRight = renderBlocks.colorBlueTopRight = rgb[2] * lightness; + renderBlocks.colorRedTopLeft = renderBlocks.colorRedBottomLeft = + renderBlocks.colorRedBottomRight = renderBlocks.colorRedTopRight = rgb[0] * lightness; + renderBlocks.colorGreenTopLeft = renderBlocks.colorGreenBottomLeft = + renderBlocks.colorGreenBottomRight = renderBlocks.colorGreenTopRight = rgb[1] * lightness; + renderBlocks.colorBlueTopLeft = renderBlocks.colorBlueBottomLeft = + renderBlocks.colorBlueBottomRight = renderBlocks.colorBlueTopRight = rgb[2] * lightness; renderBlocks.colorRedTopLeft *= aoTopLeft; renderBlocks.colorGreenTopLeft *= aoTopLeft; @@ -257,7 +264,6 @@ public class LightingHelper { if (hasBrightnessOverride) tessellator.setBrightness(brightnessOverride); tessellator.setColorOpaque_F(rgb[0] * lightness, rgb[1] * lightness, rgb[2] * lightness); - } } @@ -272,7 +278,7 @@ public class LightingHelper { float green = (color >> 8 & 0xff) / 255.0F; float blue = (color & 0xff) / 255.0F; - return new float[]{red, green, blue}; + return new float[] {red, green, blue}; } /** @@ -335,43 +341,150 @@ public class LightingHelper { float ratio = (float) (1.0F - renderBlocks.renderMinX); float aoLightValue = renderBlocks.blockAccess.getBlock(x - 1, y, z).getAmbientOcclusionLightValue(); - renderBlocks.aoBrightnessXYNN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y - 1, z); - renderBlocks.aoBrightnessXZNN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y, z - 1); - renderBlocks.aoBrightnessXZNP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y, z + 1); - renderBlocks.aoBrightnessXYNP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y + 1, z); - renderBlocks.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y - 1, z - 1); - renderBlocks.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y - 1, z + 1); - renderBlocks.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y + 1, z - 1); - renderBlocks.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y + 1, z + 1); - renderBlocks.aoLightValueScratchXYNN = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y - 1, z).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y - 1, z).getAmbientOcclusionLightValue(), ratio); - renderBlocks.aoLightValueScratchXZNN = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y, z - 1).getAmbientOcclusionLightValue(), ratio); - renderBlocks.aoLightValueScratchXZNP = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y, z + 1).getAmbientOcclusionLightValue(), ratio); - renderBlocks.aoLightValueScratchXYNP = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y + 1, z).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y + 1, z).getAmbientOcclusionLightValue(), ratio); - renderBlocks.aoLightValueScratchXYZNNN = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y - 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y - 1, z - 1).getAmbientOcclusionLightValue(), ratio); - renderBlocks.aoLightValueScratchXYZNNP = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y - 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y - 1, z + 1).getAmbientOcclusionLightValue(), ratio); - renderBlocks.aoLightValueScratchXYZNPN = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y + 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y + 1, z - 1).getAmbientOcclusionLightValue(), ratio); - renderBlocks.aoLightValueScratchXYZNPP = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y + 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y + 1, z + 1).getAmbientOcclusionLightValue(), ratio); - - int brightnessMixedXYZNPN = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXZNN, renderBlocks.aoBrightnessXYZNPN, renderBlocks.aoBrightnessXYNP, mixedBrightness); - int brightnessMixedXYZNNN = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXYZNNN, renderBlocks.aoBrightnessXYNN, renderBlocks.aoBrightnessXZNN, mixedBrightness); - int brightnessMixedXYZNNP = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXYNN, renderBlocks.aoBrightnessXYZNNP, renderBlocks.aoBrightnessXZNP, mixedBrightness); - int brightnessMixedXYZNPP = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXZNP, renderBlocks.aoBrightnessXYNP, renderBlocks.aoBrightnessXYZNPP, mixedBrightness); - - float aoMixedXYZNPN = (renderBlocks.aoLightValueScratchXZNN + aoLightValue + renderBlocks.aoLightValueScratchXYZNPN + renderBlocks.aoLightValueScratchXYNP) / 4.0F; - float aoMixedXYZNNN = (renderBlocks.aoLightValueScratchXYZNNN + renderBlocks.aoLightValueScratchXYNN + renderBlocks.aoLightValueScratchXZNN + aoLightValue) / 4.0F; - float aoMixedXYZNNP = (renderBlocks.aoLightValueScratchXYNN + renderBlocks.aoLightValueScratchXYZNNP + aoLightValue + renderBlocks.aoLightValueScratchXZNP) / 4.0F; - float aoMixedXYZNPP = (aoLightValue + renderBlocks.aoLightValueScratchXZNP + renderBlocks.aoLightValueScratchXYNP + renderBlocks.aoLightValueScratchXYZNPP) / 4.0F; - - aoTopLeft = (float) (aoMixedXYZNPP * renderBlocks.renderMaxY * renderBlocks.renderMaxZ + aoMixedXYZNPN * renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMaxZ) + aoMixedXYZNNN * (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMaxZ) + aoMixedXYZNNP * (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMaxZ); - aoBottomLeft = (float) (aoMixedXYZNPP * renderBlocks.renderMaxY * renderBlocks.renderMinZ + aoMixedXYZNPN * renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMinZ) + aoMixedXYZNNN * (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMinZ) + aoMixedXYZNNP * (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMinZ); - aoBottomRight = (float) (aoMixedXYZNPP * renderBlocks.renderMinY * renderBlocks.renderMinZ + aoMixedXYZNPN * renderBlocks.renderMinY * (1.0D - renderBlocks.renderMinZ) + aoMixedXYZNNN * (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMinZ) + aoMixedXYZNNP * (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMinZ); - aoTopRight = (float) (aoMixedXYZNPP * renderBlocks.renderMinY * renderBlocks.renderMaxZ + aoMixedXYZNPN * renderBlocks.renderMinY * (1.0D - renderBlocks.renderMaxZ) + aoMixedXYZNNN * (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMaxZ) + aoMixedXYZNNP * (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMaxZ); - - renderBlocks.brightnessTopLeft = renderBlocks.mixAoBrightness(brightnessMixedXYZNPP, brightnessMixedXYZNPN, brightnessMixedXYZNNN, brightnessMixedXYZNNP, renderBlocks.renderMaxY * renderBlocks.renderMaxZ, renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMaxZ), (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMaxZ), (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMaxZ); - renderBlocks.brightnessBottomLeft = renderBlocks.mixAoBrightness(brightnessMixedXYZNPP, brightnessMixedXYZNPN, brightnessMixedXYZNNN, brightnessMixedXYZNNP, renderBlocks.renderMaxY * renderBlocks.renderMinZ, renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMinZ), (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMinZ), (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMinZ); - renderBlocks.brightnessBottomRight = renderBlocks.mixAoBrightness(brightnessMixedXYZNPP, brightnessMixedXYZNPN, brightnessMixedXYZNNN, brightnessMixedXYZNNP, renderBlocks.renderMinY * renderBlocks.renderMinZ, renderBlocks.renderMinY * (1.0D - renderBlocks.renderMinZ), (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMinZ), (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMinZ); - renderBlocks.brightnessTopRight = renderBlocks.mixAoBrightness(brightnessMixedXYZNPP, brightnessMixedXYZNPN, brightnessMixedXYZNNN, brightnessMixedXYZNNP, renderBlocks.renderMinY * renderBlocks.renderMaxZ, renderBlocks.renderMinY * (1.0D - renderBlocks.renderMaxZ), (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMaxZ), (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMaxZ); - + renderBlocks.aoBrightnessXYNN = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y - 1, z); + renderBlocks.aoBrightnessXZNN = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y, z - 1); + renderBlocks.aoBrightnessXZNP = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y, z + 1); + renderBlocks.aoBrightnessXYNP = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y + 1, z); + renderBlocks.aoBrightnessXYZNNN = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y - 1, z - 1); + renderBlocks.aoBrightnessXYZNNP = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y - 1, z + 1); + renderBlocks.aoBrightnessXYZNPN = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y + 1, z - 1); + renderBlocks.aoBrightnessXYZNPP = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y + 1, z + 1); + renderBlocks.aoLightValueScratchXYNN = getMixedAo( + renderBlocks.blockAccess.getBlock(x - 1, y - 1, z).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x, y - 1, z).getAmbientOcclusionLightValue(), + ratio); + renderBlocks.aoLightValueScratchXZNN = getMixedAo( + renderBlocks.blockAccess.getBlock(x - 1, y, z - 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x, y, z - 1).getAmbientOcclusionLightValue(), + ratio); + renderBlocks.aoLightValueScratchXZNP = getMixedAo( + renderBlocks.blockAccess.getBlock(x - 1, y, z + 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x, y, z + 1).getAmbientOcclusionLightValue(), + ratio); + renderBlocks.aoLightValueScratchXYNP = getMixedAo( + renderBlocks.blockAccess.getBlock(x - 1, y + 1, z).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x, y + 1, z).getAmbientOcclusionLightValue(), + ratio); + renderBlocks.aoLightValueScratchXYZNNN = getMixedAo( + renderBlocks.blockAccess.getBlock(x - 1, y - 1, z - 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x, y - 1, z - 1).getAmbientOcclusionLightValue(), + ratio); + renderBlocks.aoLightValueScratchXYZNNP = getMixedAo( + renderBlocks.blockAccess.getBlock(x - 1, y - 1, z + 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x, y - 1, z + 1).getAmbientOcclusionLightValue(), + ratio); + renderBlocks.aoLightValueScratchXYZNPN = getMixedAo( + renderBlocks.blockAccess.getBlock(x - 1, y + 1, z - 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x, y + 1, z - 1).getAmbientOcclusionLightValue(), + ratio); + renderBlocks.aoLightValueScratchXYZNPP = getMixedAo( + renderBlocks.blockAccess.getBlock(x - 1, y + 1, z + 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x, y + 1, z + 1).getAmbientOcclusionLightValue(), + ratio); + + int brightnessMixedXYZNPN = renderBlocks.getAoBrightness( + renderBlocks.aoBrightnessXZNN, + renderBlocks.aoBrightnessXYZNPN, + renderBlocks.aoBrightnessXYNP, + mixedBrightness); + int brightnessMixedXYZNNN = renderBlocks.getAoBrightness( + renderBlocks.aoBrightnessXYZNNN, + renderBlocks.aoBrightnessXYNN, + renderBlocks.aoBrightnessXZNN, + mixedBrightness); + int brightnessMixedXYZNNP = renderBlocks.getAoBrightness( + renderBlocks.aoBrightnessXYNN, + renderBlocks.aoBrightnessXYZNNP, + renderBlocks.aoBrightnessXZNP, + mixedBrightness); + int brightnessMixedXYZNPP = renderBlocks.getAoBrightness( + renderBlocks.aoBrightnessXZNP, + renderBlocks.aoBrightnessXYNP, + renderBlocks.aoBrightnessXYZNPP, + mixedBrightness); + + float aoMixedXYZNPN = (renderBlocks.aoLightValueScratchXZNN + + aoLightValue + + renderBlocks.aoLightValueScratchXYZNPN + + renderBlocks.aoLightValueScratchXYNP) + / 4.0F; + float aoMixedXYZNNN = (renderBlocks.aoLightValueScratchXYZNNN + + renderBlocks.aoLightValueScratchXYNN + + renderBlocks.aoLightValueScratchXZNN + + aoLightValue) + / 4.0F; + float aoMixedXYZNNP = (renderBlocks.aoLightValueScratchXYNN + + renderBlocks.aoLightValueScratchXYZNNP + + aoLightValue + + renderBlocks.aoLightValueScratchXZNP) + / 4.0F; + float aoMixedXYZNPP = (aoLightValue + + renderBlocks.aoLightValueScratchXZNP + + renderBlocks.aoLightValueScratchXYNP + + renderBlocks.aoLightValueScratchXYZNPP) + / 4.0F; + + aoTopLeft = (float) (aoMixedXYZNPP * renderBlocks.renderMaxY * renderBlocks.renderMaxZ + + aoMixedXYZNPN * renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMaxZ) + + aoMixedXYZNNN * (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMaxZ) + + aoMixedXYZNNP * (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMaxZ); + aoBottomLeft = (float) (aoMixedXYZNPP * renderBlocks.renderMaxY * renderBlocks.renderMinZ + + aoMixedXYZNPN * renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMinZ) + + aoMixedXYZNNN * (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMinZ) + + aoMixedXYZNNP * (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMinZ); + aoBottomRight = (float) (aoMixedXYZNPP * renderBlocks.renderMinY * renderBlocks.renderMinZ + + aoMixedXYZNPN * renderBlocks.renderMinY * (1.0D - renderBlocks.renderMinZ) + + aoMixedXYZNNN * (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMinZ) + + aoMixedXYZNNP * (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMinZ); + aoTopRight = (float) (aoMixedXYZNPP * renderBlocks.renderMinY * renderBlocks.renderMaxZ + + aoMixedXYZNPN * renderBlocks.renderMinY * (1.0D - renderBlocks.renderMaxZ) + + aoMixedXYZNNN * (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMaxZ) + + aoMixedXYZNNP * (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMaxZ); + + renderBlocks.brightnessTopLeft = renderBlocks.mixAoBrightness( + brightnessMixedXYZNPP, + brightnessMixedXYZNPN, + brightnessMixedXYZNNN, + brightnessMixedXYZNNP, + renderBlocks.renderMaxY * renderBlocks.renderMaxZ, + renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMaxZ), + (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMaxZ), + (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMaxZ); + renderBlocks.brightnessBottomLeft = renderBlocks.mixAoBrightness( + brightnessMixedXYZNPP, + brightnessMixedXYZNPN, + brightnessMixedXYZNNN, + brightnessMixedXYZNNP, + renderBlocks.renderMaxY * renderBlocks.renderMinZ, + renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMinZ), + (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMinZ), + (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMinZ); + renderBlocks.brightnessBottomRight = renderBlocks.mixAoBrightness( + brightnessMixedXYZNPP, + brightnessMixedXYZNPN, + brightnessMixedXYZNNN, + brightnessMixedXYZNNP, + renderBlocks.renderMinY * renderBlocks.renderMinZ, + renderBlocks.renderMinY * (1.0D - renderBlocks.renderMinZ), + (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMinZ), + (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMinZ); + renderBlocks.brightnessTopRight = renderBlocks.mixAoBrightness( + brightnessMixedXYZNPP, + brightnessMixedXYZNPN, + brightnessMixedXYZNNN, + brightnessMixedXYZNNP, + renderBlocks.renderMinY * renderBlocks.renderMaxZ, + renderBlocks.renderMinY * (1.0D - renderBlocks.renderMaxZ), + (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMaxZ), + (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMaxZ); } return this; @@ -405,43 +518,150 @@ public class LightingHelper { float aoLightValue = renderBlocks.blockAccess.getBlock(x + 1, y, z).getAmbientOcclusionLightValue(); - renderBlocks.aoBrightnessXYPN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y - 1, z); - renderBlocks.aoBrightnessXZPN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y, z - 1); - renderBlocks.aoBrightnessXZPP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y, z + 1); - renderBlocks.aoBrightnessXYPP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y + 1, z); - renderBlocks.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y - 1, z - 1); - renderBlocks.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y - 1, z + 1); - renderBlocks.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y + 1, z - 1); - renderBlocks.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y + 1, z + 1); - renderBlocks.aoLightValueScratchXYPN = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y - 1, z).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y - 1, z).getAmbientOcclusionLightValue(), renderBlocks.renderMaxX); - renderBlocks.aoLightValueScratchXZPN = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y, z - 1).getAmbientOcclusionLightValue(), renderBlocks.renderMaxX); - renderBlocks.aoLightValueScratchXZPP = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y, z + 1).getAmbientOcclusionLightValue(), renderBlocks.renderMaxX); - renderBlocks.aoLightValueScratchXYPP = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y + 1, z).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y + 1, z).getAmbientOcclusionLightValue(), renderBlocks.renderMaxX); - renderBlocks.aoLightValueScratchXYZPNN = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y - 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y - 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.renderMaxX); - renderBlocks.aoLightValueScratchXYZPNP = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y - 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y - 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.renderMaxX); - renderBlocks.aoLightValueScratchXYZPPN = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y + 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y + 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.renderMaxX); - renderBlocks.aoLightValueScratchXYZPPP = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y + 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y + 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.renderMaxX); - - int brightnessMixedXYZPPP = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXZPP, renderBlocks.aoBrightnessXYPP, renderBlocks.aoBrightnessXYZPPP, mixedBrightness); - int brightnessMixedXYZPNP = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXYPN, renderBlocks.aoBrightnessXYZPNP, renderBlocks.aoBrightnessXZPP, mixedBrightness); - int brightnessMixedXYZPNN = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXYZPNN, renderBlocks.aoBrightnessXYPN, renderBlocks.aoBrightnessXZPN, mixedBrightness); - int brightnessMixedXYZPPN = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXZPN, renderBlocks.aoBrightnessXYZPPN, renderBlocks.aoBrightnessXYPP, mixedBrightness); - - float aoMixedXYZPPP = (aoLightValue + renderBlocks.aoLightValueScratchXZPP + renderBlocks.aoLightValueScratchXYPP + renderBlocks.aoLightValueScratchXYZPPP) / 4.0F; - float aoMixedXYZPNP = (renderBlocks.aoLightValueScratchXYPN + renderBlocks.aoLightValueScratchXYZPNP + aoLightValue + renderBlocks.aoLightValueScratchXZPP) / 4.0F; - float aoMixedXYZPNN = (renderBlocks.aoLightValueScratchXYZPNN + renderBlocks.aoLightValueScratchXYPN + renderBlocks.aoLightValueScratchXZPN + aoLightValue) / 4.0F; - float aoMixedXYZPPN = (renderBlocks.aoLightValueScratchXZPN + aoLightValue + renderBlocks.aoLightValueScratchXYZPPN + renderBlocks.aoLightValueScratchXYPP) / 4.0F; - - aoTopLeft = (float) (aoMixedXYZPNP * (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMaxZ + aoMixedXYZPNN * (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMaxZ) + aoMixedXYZPPN * renderBlocks.renderMinY * (1.0D - renderBlocks.renderMaxZ) + aoMixedXYZPPP * renderBlocks.renderMinY * renderBlocks.renderMaxZ); - aoBottomLeft = (float) (aoMixedXYZPNP * (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMinZ + aoMixedXYZPNN * (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMinZ) + aoMixedXYZPPN * renderBlocks.renderMinY * (1.0D - renderBlocks.renderMinZ) + aoMixedXYZPPP * renderBlocks.renderMinY * renderBlocks.renderMinZ); - aoBottomRight = (float) (aoMixedXYZPNP * (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMinZ + aoMixedXYZPNN * (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMinZ) + aoMixedXYZPPN * renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMinZ) + aoMixedXYZPPP * renderBlocks.renderMaxY * renderBlocks.renderMinZ); - aoTopRight = (float) (aoMixedXYZPNP * (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMaxZ + aoMixedXYZPNN * (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMaxZ) + aoMixedXYZPPN * renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMaxZ) + aoMixedXYZPPP * renderBlocks.renderMaxY * renderBlocks.renderMaxZ); - - renderBlocks.brightnessTopLeft = renderBlocks.mixAoBrightness(brightnessMixedXYZPNP, brightnessMixedXYZPNN, brightnessMixedXYZPPN, brightnessMixedXYZPPP, (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMaxZ, (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMaxZ), renderBlocks.renderMinY * (1.0D - renderBlocks.renderMaxZ), renderBlocks.renderMinY * renderBlocks.renderMaxZ); - renderBlocks.brightnessBottomLeft = renderBlocks.mixAoBrightness(brightnessMixedXYZPNP, brightnessMixedXYZPNN, brightnessMixedXYZPPN, brightnessMixedXYZPPP, (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMinZ, (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMinZ), renderBlocks.renderMinY * (1.0D - renderBlocks.renderMinZ), renderBlocks.renderMinY * renderBlocks.renderMinZ); - renderBlocks.brightnessBottomRight = renderBlocks.mixAoBrightness(brightnessMixedXYZPNP, brightnessMixedXYZPNN, brightnessMixedXYZPPN, brightnessMixedXYZPPP, (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMinZ, (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMinZ), renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMinZ), renderBlocks.renderMaxY * renderBlocks.renderMinZ); - renderBlocks.brightnessTopRight = renderBlocks.mixAoBrightness(brightnessMixedXYZPNP, brightnessMixedXYZPNN, brightnessMixedXYZPPN, brightnessMixedXYZPPP, (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMaxZ, (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMaxZ), renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMaxZ), renderBlocks.renderMaxY * renderBlocks.renderMaxZ); - + renderBlocks.aoBrightnessXYPN = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y - 1, z); + renderBlocks.aoBrightnessXZPN = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y, z - 1); + renderBlocks.aoBrightnessXZPP = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y, z + 1); + renderBlocks.aoBrightnessXYPP = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y + 1, z); + renderBlocks.aoBrightnessXYZPNN = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y - 1, z - 1); + renderBlocks.aoBrightnessXYZPNP = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y - 1, z + 1); + renderBlocks.aoBrightnessXYZPPN = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y + 1, z - 1); + renderBlocks.aoBrightnessXYZPPP = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, xOffset, y + 1, z + 1); + renderBlocks.aoLightValueScratchXYPN = getMixedAo( + renderBlocks.blockAccess.getBlock(x + 1, y - 1, z).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x, y - 1, z).getAmbientOcclusionLightValue(), + renderBlocks.renderMaxX); + renderBlocks.aoLightValueScratchXZPN = getMixedAo( + renderBlocks.blockAccess.getBlock(x + 1, y, z - 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x, y, z - 1).getAmbientOcclusionLightValue(), + renderBlocks.renderMaxX); + renderBlocks.aoLightValueScratchXZPP = getMixedAo( + renderBlocks.blockAccess.getBlock(x + 1, y, z + 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x, y, z + 1).getAmbientOcclusionLightValue(), + renderBlocks.renderMaxX); + renderBlocks.aoLightValueScratchXYPP = getMixedAo( + renderBlocks.blockAccess.getBlock(x + 1, y + 1, z).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x, y + 1, z).getAmbientOcclusionLightValue(), + renderBlocks.renderMaxX); + renderBlocks.aoLightValueScratchXYZPNN = getMixedAo( + renderBlocks.blockAccess.getBlock(x + 1, y - 1, z - 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x, y - 1, z - 1).getAmbientOcclusionLightValue(), + renderBlocks.renderMaxX); + renderBlocks.aoLightValueScratchXYZPNP = getMixedAo( + renderBlocks.blockAccess.getBlock(x + 1, y - 1, z + 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x, y - 1, z + 1).getAmbientOcclusionLightValue(), + renderBlocks.renderMaxX); + renderBlocks.aoLightValueScratchXYZPPN = getMixedAo( + renderBlocks.blockAccess.getBlock(x + 1, y + 1, z - 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x, y + 1, z - 1).getAmbientOcclusionLightValue(), + renderBlocks.renderMaxX); + renderBlocks.aoLightValueScratchXYZPPP = getMixedAo( + renderBlocks.blockAccess.getBlock(x + 1, y + 1, z + 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x, y + 1, z + 1).getAmbientOcclusionLightValue(), + renderBlocks.renderMaxX); + + int brightnessMixedXYZPPP = renderBlocks.getAoBrightness( + renderBlocks.aoBrightnessXZPP, + renderBlocks.aoBrightnessXYPP, + renderBlocks.aoBrightnessXYZPPP, + mixedBrightness); + int brightnessMixedXYZPNP = renderBlocks.getAoBrightness( + renderBlocks.aoBrightnessXYPN, + renderBlocks.aoBrightnessXYZPNP, + renderBlocks.aoBrightnessXZPP, + mixedBrightness); + int brightnessMixedXYZPNN = renderBlocks.getAoBrightness( + renderBlocks.aoBrightnessXYZPNN, + renderBlocks.aoBrightnessXYPN, + renderBlocks.aoBrightnessXZPN, + mixedBrightness); + int brightnessMixedXYZPPN = renderBlocks.getAoBrightness( + renderBlocks.aoBrightnessXZPN, + renderBlocks.aoBrightnessXYZPPN, + renderBlocks.aoBrightnessXYPP, + mixedBrightness); + + float aoMixedXYZPPP = (aoLightValue + + renderBlocks.aoLightValueScratchXZPP + + renderBlocks.aoLightValueScratchXYPP + + renderBlocks.aoLightValueScratchXYZPPP) + / 4.0F; + float aoMixedXYZPNP = (renderBlocks.aoLightValueScratchXYPN + + renderBlocks.aoLightValueScratchXYZPNP + + aoLightValue + + renderBlocks.aoLightValueScratchXZPP) + / 4.0F; + float aoMixedXYZPNN = (renderBlocks.aoLightValueScratchXYZPNN + + renderBlocks.aoLightValueScratchXYPN + + renderBlocks.aoLightValueScratchXZPN + + aoLightValue) + / 4.0F; + float aoMixedXYZPPN = (renderBlocks.aoLightValueScratchXZPN + + aoLightValue + + renderBlocks.aoLightValueScratchXYZPPN + + renderBlocks.aoLightValueScratchXYPP) + / 4.0F; + + aoTopLeft = (float) (aoMixedXYZPNP * (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMaxZ + + aoMixedXYZPNN * (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMaxZ) + + aoMixedXYZPPN * renderBlocks.renderMinY * (1.0D - renderBlocks.renderMaxZ) + + aoMixedXYZPPP * renderBlocks.renderMinY * renderBlocks.renderMaxZ); + aoBottomLeft = (float) (aoMixedXYZPNP * (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMinZ + + aoMixedXYZPNN * (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMinZ) + + aoMixedXYZPPN * renderBlocks.renderMinY * (1.0D - renderBlocks.renderMinZ) + + aoMixedXYZPPP * renderBlocks.renderMinY * renderBlocks.renderMinZ); + aoBottomRight = (float) (aoMixedXYZPNP * (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMinZ + + aoMixedXYZPNN * (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMinZ) + + aoMixedXYZPPN * renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMinZ) + + aoMixedXYZPPP * renderBlocks.renderMaxY * renderBlocks.renderMinZ); + aoTopRight = (float) (aoMixedXYZPNP * (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMaxZ + + aoMixedXYZPNN * (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMaxZ) + + aoMixedXYZPPN * renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMaxZ) + + aoMixedXYZPPP * renderBlocks.renderMaxY * renderBlocks.renderMaxZ); + + renderBlocks.brightnessTopLeft = renderBlocks.mixAoBrightness( + brightnessMixedXYZPNP, + brightnessMixedXYZPNN, + brightnessMixedXYZPPN, + brightnessMixedXYZPPP, + (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMaxZ, + (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMaxZ), + renderBlocks.renderMinY * (1.0D - renderBlocks.renderMaxZ), + renderBlocks.renderMinY * renderBlocks.renderMaxZ); + renderBlocks.brightnessBottomLeft = renderBlocks.mixAoBrightness( + brightnessMixedXYZPNP, + brightnessMixedXYZPNN, + brightnessMixedXYZPPN, + brightnessMixedXYZPPP, + (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMinZ, + (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMinZ), + renderBlocks.renderMinY * (1.0D - renderBlocks.renderMinZ), + renderBlocks.renderMinY * renderBlocks.renderMinZ); + renderBlocks.brightnessBottomRight = renderBlocks.mixAoBrightness( + brightnessMixedXYZPNP, + brightnessMixedXYZPNN, + brightnessMixedXYZPPN, + brightnessMixedXYZPPP, + (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMinZ, + (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMinZ), + renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMinZ), + renderBlocks.renderMaxY * renderBlocks.renderMinZ); + renderBlocks.brightnessTopRight = renderBlocks.mixAoBrightness( + brightnessMixedXYZPNP, + brightnessMixedXYZPNN, + brightnessMixedXYZPPN, + brightnessMixedXYZPPP, + (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMaxZ, + (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMaxZ), + renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMaxZ), + renderBlocks.renderMaxY * renderBlocks.renderMaxZ); } return this; @@ -476,43 +696,150 @@ public class LightingHelper { float ratio = (float) (1.0F - renderBlocks.renderMinY); float aoLightValue = renderBlocks.blockAccess.getBlock(x, y - 1, z).getAmbientOcclusionLightValue(); - renderBlocks.aoBrightnessXYNN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, yOffset, z); - renderBlocks.aoBrightnessYZNN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, yOffset, z - 1); - renderBlocks.aoBrightnessYZNP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, yOffset, z + 1); - renderBlocks.aoBrightnessXYPN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, yOffset, z); - renderBlocks.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, yOffset, z - 1); - renderBlocks.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, yOffset, z + 1); - renderBlocks.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, yOffset, z - 1); - renderBlocks.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, yOffset, z + 1); - renderBlocks.aoLightValueScratchXYNN = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y - 1, z).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x - 1, y, z).getAmbientOcclusionLightValue(), ratio); - renderBlocks.aoLightValueScratchYZNN = getMixedAo(renderBlocks.blockAccess.getBlock(x, y - 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y, z - 1).getAmbientOcclusionLightValue(), ratio); - renderBlocks.aoLightValueScratchYZNP = getMixedAo(renderBlocks.blockAccess.getBlock(x, y - 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y, z + 1).getAmbientOcclusionLightValue(), ratio); - renderBlocks.aoLightValueScratchXYPN = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y - 1, z).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x + 1, y, z).getAmbientOcclusionLightValue(), ratio); - renderBlocks.aoLightValueScratchXYZNNN = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y - 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x - 1, y, z - 1).getAmbientOcclusionLightValue(), ratio); - renderBlocks.aoLightValueScratchXYZNNP = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y - 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x - 1, y, z + 1).getAmbientOcclusionLightValue(), ratio); - renderBlocks.aoLightValueScratchXYZPNN = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y - 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x + 1, y, z - 1).getAmbientOcclusionLightValue(), ratio); - renderBlocks.aoLightValueScratchXYZPNP = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y - 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x + 1, y, z + 1).getAmbientOcclusionLightValue(), ratio); - - int brightnessMixedXYZPNP = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessYZNP, renderBlocks.aoBrightnessXYZPNP, renderBlocks.aoBrightnessXYPN, mixedBrightness); - int brightnessMixedXYZPNN = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessYZNN, renderBlocks.aoBrightnessXYPN, renderBlocks.aoBrightnessXYZPNN, mixedBrightness); - int brightnessMixedXYZNNN = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXYNN, renderBlocks.aoBrightnessXYZNNN, renderBlocks.aoBrightnessYZNN, mixedBrightness); - int brightnessMixedXYZNNP = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXYZNNP, renderBlocks.aoBrightnessXYNN, renderBlocks.aoBrightnessYZNP, mixedBrightness); - - float aoMixedXYZPNP = (renderBlocks.aoLightValueScratchYZNP + aoLightValue + renderBlocks.aoLightValueScratchXYZPNP + renderBlocks.aoLightValueScratchXYPN) / 4.0F; - float aoMixedXYZPNN = (aoLightValue + renderBlocks.aoLightValueScratchYZNN + renderBlocks.aoLightValueScratchXYPN + renderBlocks.aoLightValueScratchXYZPNN) / 4.0F; - float aoMixedXYZNNN = (renderBlocks.aoLightValueScratchXYNN + renderBlocks.aoLightValueScratchXYZNNN + aoLightValue + renderBlocks.aoLightValueScratchYZNN) / 4.0F; - float aoMixedXYZNNP = (renderBlocks.aoLightValueScratchXYZNNP + renderBlocks.aoLightValueScratchXYNN + renderBlocks.aoLightValueScratchYZNP + aoLightValue) / 4.0F; - - aoTopLeft = (float) (aoMixedXYZNNP * renderBlocks.renderMaxZ * (1.0D - renderBlocks.renderMinX) + aoMixedXYZPNP * renderBlocks.renderMaxZ * renderBlocks.renderMinX + aoMixedXYZPNN * (1.0D - renderBlocks.renderMaxZ) * renderBlocks.renderMinX + aoMixedXYZNNN * (1.0D - renderBlocks.renderMaxZ) * (1.0D - renderBlocks.renderMinX)); - aoBottomLeft = (float) (aoMixedXYZNNP * renderBlocks.renderMinZ * (1.0D - renderBlocks.renderMinX) + aoMixedXYZPNP * renderBlocks.renderMinZ * renderBlocks.renderMinX + aoMixedXYZPNN * (1.0D - renderBlocks.renderMinZ) * renderBlocks.renderMinX + aoMixedXYZNNN * (1.0D - renderBlocks.renderMinZ) * (1.0D - renderBlocks.renderMinX)); - aoBottomRight = (float) (aoMixedXYZNNP * renderBlocks.renderMinZ * (1.0D - renderBlocks.renderMaxX) + aoMixedXYZPNP * renderBlocks.renderMinZ * renderBlocks.renderMaxX + aoMixedXYZPNN * (1.0D - renderBlocks.renderMinZ) * renderBlocks.renderMaxX + aoMixedXYZNNN * (1.0D - renderBlocks.renderMinZ) * (1.0D - renderBlocks.renderMaxX)); - aoTopRight = (float) (aoMixedXYZNNP * renderBlocks.renderMaxZ * (1.0D - renderBlocks.renderMaxX) + aoMixedXYZPNP * renderBlocks.renderMaxZ * renderBlocks.renderMaxX + aoMixedXYZPNN * (1.0D - renderBlocks.renderMaxZ) * renderBlocks.renderMaxX + aoMixedXYZNNN * (1.0D - renderBlocks.renderMaxZ) * (1.0D - renderBlocks.renderMaxX)); - - renderBlocks.brightnessTopLeft = renderBlocks.mixAoBrightness(brightnessMixedXYZNNP, brightnessMixedXYZPNP, brightnessMixedXYZPNN, brightnessMixedXYZNNN, renderBlocks.renderMaxZ * (1.0D - renderBlocks.renderMinX), renderBlocks.renderMaxZ * renderBlocks.renderMinX, (1.0D - renderBlocks.renderMaxZ) * renderBlocks.renderMinX, (1.0D - renderBlocks.renderMaxZ) * (1.0D - renderBlocks.renderMinX)); - renderBlocks.brightnessBottomLeft = renderBlocks.mixAoBrightness(brightnessMixedXYZNNP, brightnessMixedXYZPNP, brightnessMixedXYZPNN, brightnessMixedXYZNNN, renderBlocks.renderMinZ * (1.0D - renderBlocks.renderMinX), renderBlocks.renderMinZ * renderBlocks.renderMinX, (1.0D - renderBlocks.renderMinZ) * renderBlocks.renderMinX, (1.0D - renderBlocks.renderMinZ) * (1.0D - renderBlocks.renderMinX)); - renderBlocks.brightnessBottomRight = renderBlocks.mixAoBrightness(brightnessMixedXYZNNP, brightnessMixedXYZPNP, brightnessMixedXYZPNN, brightnessMixedXYZNNN, renderBlocks.renderMinZ * (1.0D - renderBlocks.renderMaxX), renderBlocks.renderMinZ * renderBlocks.renderMaxX, (1.0D - renderBlocks.renderMinZ) * renderBlocks.renderMaxX, (1.0D - renderBlocks.renderMinZ) * (1.0D - renderBlocks.renderMaxX)); - renderBlocks.brightnessTopRight = renderBlocks.mixAoBrightness(brightnessMixedXYZNNP, brightnessMixedXYZPNP, brightnessMixedXYZPNN, brightnessMixedXYZNNN, renderBlocks.renderMaxZ * (1.0D - renderBlocks.renderMaxX), renderBlocks.renderMaxZ * renderBlocks.renderMaxX, (1.0D - renderBlocks.renderMaxZ) * renderBlocks.renderMaxX, (1.0D - renderBlocks.renderMaxZ) * (1.0D - renderBlocks.renderMaxX)); - + renderBlocks.aoBrightnessXYNN = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, yOffset, z); + renderBlocks.aoBrightnessYZNN = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, yOffset, z - 1); + renderBlocks.aoBrightnessYZNP = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, yOffset, z + 1); + renderBlocks.aoBrightnessXYPN = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, yOffset, z); + renderBlocks.aoBrightnessXYZNNN = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, yOffset, z - 1); + renderBlocks.aoBrightnessXYZNNP = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, yOffset, z + 1); + renderBlocks.aoBrightnessXYZPNN = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, yOffset, z - 1); + renderBlocks.aoBrightnessXYZPNP = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, yOffset, z + 1); + renderBlocks.aoLightValueScratchXYNN = getMixedAo( + renderBlocks.blockAccess.getBlock(x - 1, y - 1, z).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x - 1, y, z).getAmbientOcclusionLightValue(), + ratio); + renderBlocks.aoLightValueScratchYZNN = getMixedAo( + renderBlocks.blockAccess.getBlock(x, y - 1, z - 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x, y, z - 1).getAmbientOcclusionLightValue(), + ratio); + renderBlocks.aoLightValueScratchYZNP = getMixedAo( + renderBlocks.blockAccess.getBlock(x, y - 1, z + 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x, y, z + 1).getAmbientOcclusionLightValue(), + ratio); + renderBlocks.aoLightValueScratchXYPN = getMixedAo( + renderBlocks.blockAccess.getBlock(x + 1, y - 1, z).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x + 1, y, z).getAmbientOcclusionLightValue(), + ratio); + renderBlocks.aoLightValueScratchXYZNNN = getMixedAo( + renderBlocks.blockAccess.getBlock(x - 1, y - 1, z - 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x - 1, y, z - 1).getAmbientOcclusionLightValue(), + ratio); + renderBlocks.aoLightValueScratchXYZNNP = getMixedAo( + renderBlocks.blockAccess.getBlock(x - 1, y - 1, z + 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x - 1, y, z + 1).getAmbientOcclusionLightValue(), + ratio); + renderBlocks.aoLightValueScratchXYZPNN = getMixedAo( + renderBlocks.blockAccess.getBlock(x + 1, y - 1, z - 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x + 1, y, z - 1).getAmbientOcclusionLightValue(), + ratio); + renderBlocks.aoLightValueScratchXYZPNP = getMixedAo( + renderBlocks.blockAccess.getBlock(x + 1, y - 1, z + 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x + 1, y, z + 1).getAmbientOcclusionLightValue(), + ratio); + + int brightnessMixedXYZPNP = renderBlocks.getAoBrightness( + renderBlocks.aoBrightnessYZNP, + renderBlocks.aoBrightnessXYZPNP, + renderBlocks.aoBrightnessXYPN, + mixedBrightness); + int brightnessMixedXYZPNN = renderBlocks.getAoBrightness( + renderBlocks.aoBrightnessYZNN, + renderBlocks.aoBrightnessXYPN, + renderBlocks.aoBrightnessXYZPNN, + mixedBrightness); + int brightnessMixedXYZNNN = renderBlocks.getAoBrightness( + renderBlocks.aoBrightnessXYNN, + renderBlocks.aoBrightnessXYZNNN, + renderBlocks.aoBrightnessYZNN, + mixedBrightness); + int brightnessMixedXYZNNP = renderBlocks.getAoBrightness( + renderBlocks.aoBrightnessXYZNNP, + renderBlocks.aoBrightnessXYNN, + renderBlocks.aoBrightnessYZNP, + mixedBrightness); + + float aoMixedXYZPNP = (renderBlocks.aoLightValueScratchYZNP + + aoLightValue + + renderBlocks.aoLightValueScratchXYZPNP + + renderBlocks.aoLightValueScratchXYPN) + / 4.0F; + float aoMixedXYZPNN = (aoLightValue + + renderBlocks.aoLightValueScratchYZNN + + renderBlocks.aoLightValueScratchXYPN + + renderBlocks.aoLightValueScratchXYZPNN) + / 4.0F; + float aoMixedXYZNNN = (renderBlocks.aoLightValueScratchXYNN + + renderBlocks.aoLightValueScratchXYZNNN + + aoLightValue + + renderBlocks.aoLightValueScratchYZNN) + / 4.0F; + float aoMixedXYZNNP = (renderBlocks.aoLightValueScratchXYZNNP + + renderBlocks.aoLightValueScratchXYNN + + renderBlocks.aoLightValueScratchYZNP + + aoLightValue) + / 4.0F; + + aoTopLeft = (float) (aoMixedXYZNNP * renderBlocks.renderMaxZ * (1.0D - renderBlocks.renderMinX) + + aoMixedXYZPNP * renderBlocks.renderMaxZ * renderBlocks.renderMinX + + aoMixedXYZPNN * (1.0D - renderBlocks.renderMaxZ) * renderBlocks.renderMinX + + aoMixedXYZNNN * (1.0D - renderBlocks.renderMaxZ) * (1.0D - renderBlocks.renderMinX)); + aoBottomLeft = (float) (aoMixedXYZNNP * renderBlocks.renderMinZ * (1.0D - renderBlocks.renderMinX) + + aoMixedXYZPNP * renderBlocks.renderMinZ * renderBlocks.renderMinX + + aoMixedXYZPNN * (1.0D - renderBlocks.renderMinZ) * renderBlocks.renderMinX + + aoMixedXYZNNN * (1.0D - renderBlocks.renderMinZ) * (1.0D - renderBlocks.renderMinX)); + aoBottomRight = (float) (aoMixedXYZNNP * renderBlocks.renderMinZ * (1.0D - renderBlocks.renderMaxX) + + aoMixedXYZPNP * renderBlocks.renderMinZ * renderBlocks.renderMaxX + + aoMixedXYZPNN * (1.0D - renderBlocks.renderMinZ) * renderBlocks.renderMaxX + + aoMixedXYZNNN * (1.0D - renderBlocks.renderMinZ) * (1.0D - renderBlocks.renderMaxX)); + aoTopRight = (float) (aoMixedXYZNNP * renderBlocks.renderMaxZ * (1.0D - renderBlocks.renderMaxX) + + aoMixedXYZPNP * renderBlocks.renderMaxZ * renderBlocks.renderMaxX + + aoMixedXYZPNN * (1.0D - renderBlocks.renderMaxZ) * renderBlocks.renderMaxX + + aoMixedXYZNNN * (1.0D - renderBlocks.renderMaxZ) * (1.0D - renderBlocks.renderMaxX)); + + renderBlocks.brightnessTopLeft = renderBlocks.mixAoBrightness( + brightnessMixedXYZNNP, + brightnessMixedXYZPNP, + brightnessMixedXYZPNN, + brightnessMixedXYZNNN, + renderBlocks.renderMaxZ * (1.0D - renderBlocks.renderMinX), + renderBlocks.renderMaxZ * renderBlocks.renderMinX, + (1.0D - renderBlocks.renderMaxZ) * renderBlocks.renderMinX, + (1.0D - renderBlocks.renderMaxZ) * (1.0D - renderBlocks.renderMinX)); + renderBlocks.brightnessBottomLeft = renderBlocks.mixAoBrightness( + brightnessMixedXYZNNP, + brightnessMixedXYZPNP, + brightnessMixedXYZPNN, + brightnessMixedXYZNNN, + renderBlocks.renderMinZ * (1.0D - renderBlocks.renderMinX), + renderBlocks.renderMinZ * renderBlocks.renderMinX, + (1.0D - renderBlocks.renderMinZ) * renderBlocks.renderMinX, + (1.0D - renderBlocks.renderMinZ) * (1.0D - renderBlocks.renderMinX)); + renderBlocks.brightnessBottomRight = renderBlocks.mixAoBrightness( + brightnessMixedXYZNNP, + brightnessMixedXYZPNP, + brightnessMixedXYZPNN, + brightnessMixedXYZNNN, + renderBlocks.renderMinZ * (1.0D - renderBlocks.renderMaxX), + renderBlocks.renderMinZ * renderBlocks.renderMaxX, + (1.0D - renderBlocks.renderMinZ) * renderBlocks.renderMaxX, + (1.0D - renderBlocks.renderMinZ) * (1.0D - renderBlocks.renderMaxX)); + renderBlocks.brightnessTopRight = renderBlocks.mixAoBrightness( + brightnessMixedXYZNNP, + brightnessMixedXYZPNP, + brightnessMixedXYZPNN, + brightnessMixedXYZNNN, + renderBlocks.renderMaxZ * (1.0D - renderBlocks.renderMaxX), + renderBlocks.renderMaxZ * renderBlocks.renderMaxX, + (1.0D - renderBlocks.renderMaxZ) * renderBlocks.renderMaxX, + (1.0D - renderBlocks.renderMaxZ) * (1.0D - renderBlocks.renderMaxX)); } return this; @@ -546,42 +873,150 @@ public class LightingHelper { float aoLightValue = renderBlocks.blockAccess.getBlock(x, y + 1, z).getAmbientOcclusionLightValue(); - renderBlocks.aoBrightnessXYNP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, yOffset, z); - renderBlocks.aoBrightnessXYPP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, yOffset, z); - renderBlocks.aoBrightnessYZPN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, yOffset, z - 1); - renderBlocks.aoBrightnessYZPP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, yOffset, z + 1); - renderBlocks.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, yOffset, z - 1); - renderBlocks.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, yOffset, z - 1); - renderBlocks.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, yOffset, z + 1); - renderBlocks.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, yOffset, z + 1); - renderBlocks.aoLightValueScratchXYNP = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y + 1, z).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x - 1, y, z).getAmbientOcclusionLightValue(), renderBlocks.renderMaxY); - renderBlocks.aoLightValueScratchXYPP = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y + 1, z).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x + 1, y, z).getAmbientOcclusionLightValue(), renderBlocks.renderMaxY); - renderBlocks.aoLightValueScratchYZPN = getMixedAo(renderBlocks.blockAccess.getBlock(x, y + 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y, z - 1).getAmbientOcclusionLightValue(), renderBlocks.renderMaxY); - renderBlocks.aoLightValueScratchYZPP = getMixedAo(renderBlocks.blockAccess.getBlock(x, y + 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y, z + 1).getAmbientOcclusionLightValue(), renderBlocks.renderMaxY); - renderBlocks.aoLightValueScratchXYZNPN = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y + 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x - 1, y, z - 1).getAmbientOcclusionLightValue(), renderBlocks.renderMaxY); - renderBlocks.aoLightValueScratchXYZPPN = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y + 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x + 1, y, z - 1).getAmbientOcclusionLightValue(), renderBlocks.renderMaxY); - renderBlocks.aoLightValueScratchXYZNPP = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y + 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x - 1, y, z + 1).getAmbientOcclusionLightValue(), renderBlocks.renderMaxY); - renderBlocks.aoLightValueScratchXYZPPP = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y + 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x + 1, y, z + 1).getAmbientOcclusionLightValue(), renderBlocks.renderMaxY); - - int brightnessMixedXYZPPP = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessYZPP, renderBlocks.aoBrightnessXYZPPP, renderBlocks.aoBrightnessXYPP, mixedBrightness); - int brightnessMixedXYZPPN = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessYZPN, renderBlocks.aoBrightnessXYPP, renderBlocks.aoBrightnessXYZPPN, mixedBrightness); - int brightnessMixedXYZNPN = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXYNP, renderBlocks.aoBrightnessXYZNPN, renderBlocks.aoBrightnessYZPN, mixedBrightness); - int brightnessMixedXYZNPP = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXYZNPP, renderBlocks.aoBrightnessXYNP, renderBlocks.aoBrightnessYZPP, mixedBrightness); - - float aoMixedXYZPPP = (renderBlocks.aoLightValueScratchYZPP + aoLightValue + renderBlocks.aoLightValueScratchXYZPPP + renderBlocks.aoLightValueScratchXYPP) / 4.0F; - float aoMixedXYZPPN = (aoLightValue + renderBlocks.aoLightValueScratchYZPN + renderBlocks.aoLightValueScratchXYPP + renderBlocks.aoLightValueScratchXYZPPN) / 4.0F; - float aoMixedXYZNPN = (renderBlocks.aoLightValueScratchXYNP + renderBlocks.aoLightValueScratchXYZNPN + aoLightValue + renderBlocks.aoLightValueScratchYZPN) / 4.0F; - float aoMixedXYZNPP = (renderBlocks.aoLightValueScratchXYZNPP + renderBlocks.aoLightValueScratchXYNP + renderBlocks.aoLightValueScratchYZPP + aoLightValue) / 4.0F; - - aoTopLeft /*SE*/ = (float) (aoMixedXYZNPP * renderBlocks.renderMaxZ * (1.0D - renderBlocks.renderMaxX) + aoMixedXYZPPP * renderBlocks.renderMaxZ * renderBlocks.renderMaxX + aoMixedXYZPPN * (1.0D - renderBlocks.renderMaxZ) * renderBlocks.renderMaxX + aoMixedXYZNPN * (1.0D - renderBlocks.renderMaxZ) * (1.0D - renderBlocks.renderMaxX)); - aoBottomLeft /*NE*/ = (float) (aoMixedXYZNPP * renderBlocks.renderMinZ * (1.0D - renderBlocks.renderMaxX) + aoMixedXYZPPP * renderBlocks.renderMinZ * renderBlocks.renderMaxX + aoMixedXYZPPN * (1.0D - renderBlocks.renderMinZ) * renderBlocks.renderMaxX + aoMixedXYZNPN * (1.0D - renderBlocks.renderMinZ) * (1.0D - renderBlocks.renderMaxX)); - aoBottomRight /*NW*/ = (float) (aoMixedXYZNPP * renderBlocks.renderMinZ * (1.0D - renderBlocks.renderMinX) + aoMixedXYZPPP * renderBlocks.renderMinZ * renderBlocks.renderMinX + aoMixedXYZPPN * (1.0D - renderBlocks.renderMinZ) * renderBlocks.renderMinX + aoMixedXYZNPN * (1.0D - renderBlocks.renderMinZ) * (1.0D - renderBlocks.renderMinX)); - aoTopRight /*SW*/ = (float) (aoMixedXYZNPP * renderBlocks.renderMaxZ * (1.0D - renderBlocks.renderMinX) + aoMixedXYZPPP * renderBlocks.renderMaxZ * renderBlocks.renderMinX + aoMixedXYZPPN * (1.0D - renderBlocks.renderMaxZ) * renderBlocks.renderMinX + aoMixedXYZNPN * (1.0D - renderBlocks.renderMaxZ) * (1.0D - renderBlocks.renderMinX)); - - renderBlocks.brightnessTopLeft = renderBlocks.mixAoBrightness(brightnessMixedXYZNPP, brightnessMixedXYZPPP, brightnessMixedXYZPPN, brightnessMixedXYZNPN, renderBlocks.renderMaxZ * (1.0D - renderBlocks.renderMaxX), renderBlocks.renderMaxZ * renderBlocks.renderMaxX, (1.0D - renderBlocks.renderMaxZ) * renderBlocks.renderMaxX, (1.0D - renderBlocks.renderMaxZ) * (1.0D - renderBlocks.renderMaxX)); - renderBlocks.brightnessBottomLeft = renderBlocks.mixAoBrightness(brightnessMixedXYZNPP, brightnessMixedXYZPPP, brightnessMixedXYZPPN, brightnessMixedXYZNPN, renderBlocks.renderMinZ * (1.0D - renderBlocks.renderMaxX), renderBlocks.renderMinZ * renderBlocks.renderMaxX, (1.0D - renderBlocks.renderMinZ) * renderBlocks.renderMaxX, (1.0D - renderBlocks.renderMinZ) * (1.0D - renderBlocks.renderMaxX)); - renderBlocks.brightnessBottomRight = renderBlocks.mixAoBrightness(brightnessMixedXYZNPP, brightnessMixedXYZPPP, brightnessMixedXYZPPN, brightnessMixedXYZNPN, renderBlocks.renderMinZ * (1.0D - renderBlocks.renderMinX), renderBlocks.renderMinZ * renderBlocks.renderMinX, (1.0D - renderBlocks.renderMinZ) * renderBlocks.renderMinX, (1.0D - renderBlocks.renderMinZ) * (1.0D - renderBlocks.renderMinX)); - renderBlocks.brightnessTopRight = renderBlocks.mixAoBrightness(brightnessMixedXYZNPP, brightnessMixedXYZPPP, brightnessMixedXYZPPN, brightnessMixedXYZNPN, renderBlocks.renderMaxZ * (1.0D - renderBlocks.renderMinX), renderBlocks.renderMaxZ * renderBlocks.renderMinX, (1.0D - renderBlocks.renderMaxZ) * renderBlocks.renderMinX, (1.0D - renderBlocks.renderMaxZ) * (1.0D - renderBlocks.renderMinX)); + renderBlocks.aoBrightnessXYNP = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, yOffset, z); + renderBlocks.aoBrightnessXYPP = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, yOffset, z); + renderBlocks.aoBrightnessYZPN = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, yOffset, z - 1); + renderBlocks.aoBrightnessYZPP = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, yOffset, z + 1); + renderBlocks.aoBrightnessXYZNPN = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, yOffset, z - 1); + renderBlocks.aoBrightnessXYZPPN = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, yOffset, z - 1); + renderBlocks.aoBrightnessXYZNPP = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, yOffset, z + 1); + renderBlocks.aoBrightnessXYZPPP = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, yOffset, z + 1); + renderBlocks.aoLightValueScratchXYNP = getMixedAo( + renderBlocks.blockAccess.getBlock(x - 1, y + 1, z).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x - 1, y, z).getAmbientOcclusionLightValue(), + renderBlocks.renderMaxY); + renderBlocks.aoLightValueScratchXYPP = getMixedAo( + renderBlocks.blockAccess.getBlock(x + 1, y + 1, z).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x + 1, y, z).getAmbientOcclusionLightValue(), + renderBlocks.renderMaxY); + renderBlocks.aoLightValueScratchYZPN = getMixedAo( + renderBlocks.blockAccess.getBlock(x, y + 1, z - 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x, y, z - 1).getAmbientOcclusionLightValue(), + renderBlocks.renderMaxY); + renderBlocks.aoLightValueScratchYZPP = getMixedAo( + renderBlocks.blockAccess.getBlock(x, y + 1, z + 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x, y, z + 1).getAmbientOcclusionLightValue(), + renderBlocks.renderMaxY); + renderBlocks.aoLightValueScratchXYZNPN = getMixedAo( + renderBlocks.blockAccess.getBlock(x - 1, y + 1, z - 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x - 1, y, z - 1).getAmbientOcclusionLightValue(), + renderBlocks.renderMaxY); + renderBlocks.aoLightValueScratchXYZPPN = getMixedAo( + renderBlocks.blockAccess.getBlock(x + 1, y + 1, z - 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x + 1, y, z - 1).getAmbientOcclusionLightValue(), + renderBlocks.renderMaxY); + renderBlocks.aoLightValueScratchXYZNPP = getMixedAo( + renderBlocks.blockAccess.getBlock(x - 1, y + 1, z + 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x - 1, y, z + 1).getAmbientOcclusionLightValue(), + renderBlocks.renderMaxY); + renderBlocks.aoLightValueScratchXYZPPP = getMixedAo( + renderBlocks.blockAccess.getBlock(x + 1, y + 1, z + 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x + 1, y, z + 1).getAmbientOcclusionLightValue(), + renderBlocks.renderMaxY); + + int brightnessMixedXYZPPP = renderBlocks.getAoBrightness( + renderBlocks.aoBrightnessYZPP, + renderBlocks.aoBrightnessXYZPPP, + renderBlocks.aoBrightnessXYPP, + mixedBrightness); + int brightnessMixedXYZPPN = renderBlocks.getAoBrightness( + renderBlocks.aoBrightnessYZPN, + renderBlocks.aoBrightnessXYPP, + renderBlocks.aoBrightnessXYZPPN, + mixedBrightness); + int brightnessMixedXYZNPN = renderBlocks.getAoBrightness( + renderBlocks.aoBrightnessXYNP, + renderBlocks.aoBrightnessXYZNPN, + renderBlocks.aoBrightnessYZPN, + mixedBrightness); + int brightnessMixedXYZNPP = renderBlocks.getAoBrightness( + renderBlocks.aoBrightnessXYZNPP, + renderBlocks.aoBrightnessXYNP, + renderBlocks.aoBrightnessYZPP, + mixedBrightness); + + float aoMixedXYZPPP = (renderBlocks.aoLightValueScratchYZPP + + aoLightValue + + renderBlocks.aoLightValueScratchXYZPPP + + renderBlocks.aoLightValueScratchXYPP) + / 4.0F; + float aoMixedXYZPPN = (aoLightValue + + renderBlocks.aoLightValueScratchYZPN + + renderBlocks.aoLightValueScratchXYPP + + renderBlocks.aoLightValueScratchXYZPPN) + / 4.0F; + float aoMixedXYZNPN = (renderBlocks.aoLightValueScratchXYNP + + renderBlocks.aoLightValueScratchXYZNPN + + aoLightValue + + renderBlocks.aoLightValueScratchYZPN) + / 4.0F; + float aoMixedXYZNPP = (renderBlocks.aoLightValueScratchXYZNPP + + renderBlocks.aoLightValueScratchXYNP + + renderBlocks.aoLightValueScratchYZPP + + aoLightValue) + / 4.0F; + + aoTopLeft /*SE*/ = (float) (aoMixedXYZNPP * renderBlocks.renderMaxZ * (1.0D - renderBlocks.renderMaxX) + + aoMixedXYZPPP * renderBlocks.renderMaxZ * renderBlocks.renderMaxX + + aoMixedXYZPPN * (1.0D - renderBlocks.renderMaxZ) * renderBlocks.renderMaxX + + aoMixedXYZNPN * (1.0D - renderBlocks.renderMaxZ) * (1.0D - renderBlocks.renderMaxX)); + aoBottomLeft /*NE*/ = (float) (aoMixedXYZNPP * renderBlocks.renderMinZ * (1.0D - renderBlocks.renderMaxX) + + aoMixedXYZPPP * renderBlocks.renderMinZ * renderBlocks.renderMaxX + + aoMixedXYZPPN * (1.0D - renderBlocks.renderMinZ) * renderBlocks.renderMaxX + + aoMixedXYZNPN * (1.0D - renderBlocks.renderMinZ) * (1.0D - renderBlocks.renderMaxX)); + aoBottomRight /*NW*/ = (float) (aoMixedXYZNPP * renderBlocks.renderMinZ * (1.0D - renderBlocks.renderMinX) + + aoMixedXYZPPP * renderBlocks.renderMinZ * renderBlocks.renderMinX + + aoMixedXYZPPN * (1.0D - renderBlocks.renderMinZ) * renderBlocks.renderMinX + + aoMixedXYZNPN * (1.0D - renderBlocks.renderMinZ) * (1.0D - renderBlocks.renderMinX)); + aoTopRight /*SW*/ = (float) (aoMixedXYZNPP * renderBlocks.renderMaxZ * (1.0D - renderBlocks.renderMinX) + + aoMixedXYZPPP * renderBlocks.renderMaxZ * renderBlocks.renderMinX + + aoMixedXYZPPN * (1.0D - renderBlocks.renderMaxZ) * renderBlocks.renderMinX + + aoMixedXYZNPN * (1.0D - renderBlocks.renderMaxZ) * (1.0D - renderBlocks.renderMinX)); + + renderBlocks.brightnessTopLeft = renderBlocks.mixAoBrightness( + brightnessMixedXYZNPP, + brightnessMixedXYZPPP, + brightnessMixedXYZPPN, + brightnessMixedXYZNPN, + renderBlocks.renderMaxZ * (1.0D - renderBlocks.renderMaxX), + renderBlocks.renderMaxZ * renderBlocks.renderMaxX, + (1.0D - renderBlocks.renderMaxZ) * renderBlocks.renderMaxX, + (1.0D - renderBlocks.renderMaxZ) * (1.0D - renderBlocks.renderMaxX)); + renderBlocks.brightnessBottomLeft = renderBlocks.mixAoBrightness( + brightnessMixedXYZNPP, + brightnessMixedXYZPPP, + brightnessMixedXYZPPN, + brightnessMixedXYZNPN, + renderBlocks.renderMinZ * (1.0D - renderBlocks.renderMaxX), + renderBlocks.renderMinZ * renderBlocks.renderMaxX, + (1.0D - renderBlocks.renderMinZ) * renderBlocks.renderMaxX, + (1.0D - renderBlocks.renderMinZ) * (1.0D - renderBlocks.renderMaxX)); + renderBlocks.brightnessBottomRight = renderBlocks.mixAoBrightness( + brightnessMixedXYZNPP, + brightnessMixedXYZPPP, + brightnessMixedXYZPPN, + brightnessMixedXYZNPN, + renderBlocks.renderMinZ * (1.0D - renderBlocks.renderMinX), + renderBlocks.renderMinZ * renderBlocks.renderMinX, + (1.0D - renderBlocks.renderMinZ) * renderBlocks.renderMinX, + (1.0D - renderBlocks.renderMinZ) * (1.0D - renderBlocks.renderMinX)); + renderBlocks.brightnessTopRight = renderBlocks.mixAoBrightness( + brightnessMixedXYZNPP, + brightnessMixedXYZPPP, + brightnessMixedXYZPPN, + brightnessMixedXYZNPN, + renderBlocks.renderMaxZ * (1.0D - renderBlocks.renderMinX), + renderBlocks.renderMaxZ * renderBlocks.renderMinX, + (1.0D - renderBlocks.renderMaxZ) * renderBlocks.renderMinX, + (1.0D - renderBlocks.renderMaxZ) * (1.0D - renderBlocks.renderMinX)); } return this; @@ -616,43 +1051,150 @@ public class LightingHelper { float ratio = (float) (1.0F - renderBlocks.renderMinZ); float aoLightValue = renderBlocks.blockAccess.getBlock(x, y, z - 1).getAmbientOcclusionLightValue(); - renderBlocks.aoBrightnessXZNN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, y, zOffset); - renderBlocks.aoBrightnessYZNN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, y - 1, zOffset); - renderBlocks.aoBrightnessYZPN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, y + 1, zOffset); - renderBlocks.aoBrightnessXZPN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, y, zOffset); - renderBlocks.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, y - 1, zOffset); - renderBlocks.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, y + 1, zOffset); - renderBlocks.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, y - 1, zOffset); - renderBlocks.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, y + 1, zOffset); - renderBlocks.aoLightValueScratchXZNN = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x - 1, y, z).getAmbientOcclusionLightValue(), ratio); - renderBlocks.aoLightValueScratchYZNN = getMixedAo(renderBlocks.blockAccess.getBlock(x, y - 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y - 1, z).getAmbientOcclusionLightValue(), ratio); - renderBlocks.aoLightValueScratchYZPN = getMixedAo(renderBlocks.blockAccess.getBlock(x, y + 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y + 1, z).getAmbientOcclusionLightValue(), ratio); - renderBlocks.aoLightValueScratchXZPN = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x + 1, y, z).getAmbientOcclusionLightValue(), ratio); - renderBlocks.aoLightValueScratchXYZNNN = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y - 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x - 1, y - 1, z).getAmbientOcclusionLightValue(), ratio); - renderBlocks.aoLightValueScratchXYZNPN = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y + 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x - 1, y + 1, z).getAmbientOcclusionLightValue(), ratio); - renderBlocks.aoLightValueScratchXYZPNN = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y - 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x + 1, y - 1, z).getAmbientOcclusionLightValue(), ratio); - renderBlocks.aoLightValueScratchXYZPPN = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y + 1, z - 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x + 1, y + 1, z).getAmbientOcclusionLightValue(), ratio); - - int brightnessMixedXYZPPN = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessYZPN, renderBlocks.aoBrightnessXZPN, renderBlocks.aoBrightnessXYZPPN, mixedBrightness); - int brightnessMixedXYZPNN = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessYZNN, renderBlocks.aoBrightnessXYZPNN, renderBlocks.aoBrightnessXZPN, mixedBrightness); - int brightnessMixedXYZNNN = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXYZNNN, renderBlocks.aoBrightnessXZNN, renderBlocks.aoBrightnessYZNN, mixedBrightness); - int brightnessMixedXYZNPN = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXZNN, renderBlocks.aoBrightnessXYZNPN, renderBlocks.aoBrightnessYZPN, mixedBrightness); - - float aoMixedXYZPPN = (aoLightValue + renderBlocks.aoLightValueScratchYZPN + renderBlocks.aoLightValueScratchXZPN + renderBlocks.aoLightValueScratchXYZPPN) / 4.0F; - float aoMixedXYZPNN = (renderBlocks.aoLightValueScratchYZNN + aoLightValue + renderBlocks.aoLightValueScratchXYZPNN + renderBlocks.aoLightValueScratchXZPN) / 4.0F; - float aoMixedXYZNNN = (renderBlocks.aoLightValueScratchXYZNNN + renderBlocks.aoLightValueScratchXZNN + renderBlocks.aoLightValueScratchYZNN + aoLightValue) / 4.0F; - float aoMixedXYZNPN = (renderBlocks.aoLightValueScratchXZNN + renderBlocks.aoLightValueScratchXYZNPN + aoLightValue + renderBlocks.aoLightValueScratchYZPN) / 4.0F; - - aoTopLeft = (float) (aoMixedXYZNPN * renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMinX) + aoMixedXYZPPN * renderBlocks.renderMaxY * renderBlocks.renderMinX + aoMixedXYZPNN * (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMinX + aoMixedXYZNNN * (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMinX)); - aoBottomLeft = (float) (aoMixedXYZNPN * renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMaxX) + aoMixedXYZPPN * renderBlocks.renderMaxY * renderBlocks.renderMaxX + aoMixedXYZPNN * (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMaxX + aoMixedXYZNNN * (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMaxX)); - aoBottomRight = (float) (aoMixedXYZNPN * renderBlocks.renderMinY * (1.0D - renderBlocks.renderMaxX) + aoMixedXYZPPN * renderBlocks.renderMinY * renderBlocks.renderMaxX + aoMixedXYZPNN * (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMaxX + aoMixedXYZNNN * (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMaxX)); - aoTopRight = (float) (aoMixedXYZNPN * renderBlocks.renderMinY * (1.0D - renderBlocks.renderMinX) + aoMixedXYZPPN * renderBlocks.renderMinY * renderBlocks.renderMinX + aoMixedXYZPNN * (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMinX + aoMixedXYZNNN * (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMinX)); - - renderBlocks.brightnessTopLeft = renderBlocks.mixAoBrightness(brightnessMixedXYZNPN, brightnessMixedXYZPPN, brightnessMixedXYZPNN, brightnessMixedXYZNNN, renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMinX), renderBlocks.renderMaxY * renderBlocks.renderMinX, (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMinX, (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMinX)); - renderBlocks.brightnessBottomLeft = renderBlocks.mixAoBrightness(brightnessMixedXYZNPN, brightnessMixedXYZPPN, brightnessMixedXYZPNN, brightnessMixedXYZNNN, renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMaxX), renderBlocks.renderMaxY * renderBlocks.renderMaxX, (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMaxX, (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMaxX)); - renderBlocks.brightnessBottomRight = renderBlocks.mixAoBrightness(brightnessMixedXYZNPN, brightnessMixedXYZPPN, brightnessMixedXYZPNN, brightnessMixedXYZNNN, renderBlocks.renderMinY * (1.0D - renderBlocks.renderMaxX), renderBlocks.renderMinY * renderBlocks.renderMaxX, (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMaxX, (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMaxX)); - renderBlocks.brightnessTopRight = renderBlocks.mixAoBrightness(brightnessMixedXYZNPN, brightnessMixedXYZPPN, brightnessMixedXYZPNN, brightnessMixedXYZNNN, renderBlocks.renderMinY * (1.0D - renderBlocks.renderMinX), renderBlocks.renderMinY * renderBlocks.renderMinX, (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMinX, (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMinX)); - + renderBlocks.aoBrightnessXZNN = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, y, zOffset); + renderBlocks.aoBrightnessYZNN = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, y - 1, zOffset); + renderBlocks.aoBrightnessYZPN = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, y + 1, zOffset); + renderBlocks.aoBrightnessXZPN = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, y, zOffset); + renderBlocks.aoBrightnessXYZNNN = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, y - 1, zOffset); + renderBlocks.aoBrightnessXYZNPN = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, y + 1, zOffset); + renderBlocks.aoBrightnessXYZPNN = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, y - 1, zOffset); + renderBlocks.aoBrightnessXYZPPN = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, y + 1, zOffset); + renderBlocks.aoLightValueScratchXZNN = getMixedAo( + renderBlocks.blockAccess.getBlock(x - 1, y, z - 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x - 1, y, z).getAmbientOcclusionLightValue(), + ratio); + renderBlocks.aoLightValueScratchYZNN = getMixedAo( + renderBlocks.blockAccess.getBlock(x, y - 1, z - 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x, y - 1, z).getAmbientOcclusionLightValue(), + ratio); + renderBlocks.aoLightValueScratchYZPN = getMixedAo( + renderBlocks.blockAccess.getBlock(x, y + 1, z - 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x, y + 1, z).getAmbientOcclusionLightValue(), + ratio); + renderBlocks.aoLightValueScratchXZPN = getMixedAo( + renderBlocks.blockAccess.getBlock(x + 1, y, z - 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x + 1, y, z).getAmbientOcclusionLightValue(), + ratio); + renderBlocks.aoLightValueScratchXYZNNN = getMixedAo( + renderBlocks.blockAccess.getBlock(x - 1, y - 1, z - 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x - 1, y - 1, z).getAmbientOcclusionLightValue(), + ratio); + renderBlocks.aoLightValueScratchXYZNPN = getMixedAo( + renderBlocks.blockAccess.getBlock(x - 1, y + 1, z - 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x - 1, y + 1, z).getAmbientOcclusionLightValue(), + ratio); + renderBlocks.aoLightValueScratchXYZPNN = getMixedAo( + renderBlocks.blockAccess.getBlock(x + 1, y - 1, z - 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x + 1, y - 1, z).getAmbientOcclusionLightValue(), + ratio); + renderBlocks.aoLightValueScratchXYZPPN = getMixedAo( + renderBlocks.blockAccess.getBlock(x + 1, y + 1, z - 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x + 1, y + 1, z).getAmbientOcclusionLightValue(), + ratio); + + int brightnessMixedXYZPPN = renderBlocks.getAoBrightness( + renderBlocks.aoBrightnessYZPN, + renderBlocks.aoBrightnessXZPN, + renderBlocks.aoBrightnessXYZPPN, + mixedBrightness); + int brightnessMixedXYZPNN = renderBlocks.getAoBrightness( + renderBlocks.aoBrightnessYZNN, + renderBlocks.aoBrightnessXYZPNN, + renderBlocks.aoBrightnessXZPN, + mixedBrightness); + int brightnessMixedXYZNNN = renderBlocks.getAoBrightness( + renderBlocks.aoBrightnessXYZNNN, + renderBlocks.aoBrightnessXZNN, + renderBlocks.aoBrightnessYZNN, + mixedBrightness); + int brightnessMixedXYZNPN = renderBlocks.getAoBrightness( + renderBlocks.aoBrightnessXZNN, + renderBlocks.aoBrightnessXYZNPN, + renderBlocks.aoBrightnessYZPN, + mixedBrightness); + + float aoMixedXYZPPN = (aoLightValue + + renderBlocks.aoLightValueScratchYZPN + + renderBlocks.aoLightValueScratchXZPN + + renderBlocks.aoLightValueScratchXYZPPN) + / 4.0F; + float aoMixedXYZPNN = (renderBlocks.aoLightValueScratchYZNN + + aoLightValue + + renderBlocks.aoLightValueScratchXYZPNN + + renderBlocks.aoLightValueScratchXZPN) + / 4.0F; + float aoMixedXYZNNN = (renderBlocks.aoLightValueScratchXYZNNN + + renderBlocks.aoLightValueScratchXZNN + + renderBlocks.aoLightValueScratchYZNN + + aoLightValue) + / 4.0F; + float aoMixedXYZNPN = (renderBlocks.aoLightValueScratchXZNN + + renderBlocks.aoLightValueScratchXYZNPN + + aoLightValue + + renderBlocks.aoLightValueScratchYZPN) + / 4.0F; + + aoTopLeft = (float) (aoMixedXYZNPN * renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMinX) + + aoMixedXYZPPN * renderBlocks.renderMaxY * renderBlocks.renderMinX + + aoMixedXYZPNN * (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMinX + + aoMixedXYZNNN * (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMinX)); + aoBottomLeft = (float) (aoMixedXYZNPN * renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMaxX) + + aoMixedXYZPPN * renderBlocks.renderMaxY * renderBlocks.renderMaxX + + aoMixedXYZPNN * (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMaxX + + aoMixedXYZNNN * (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMaxX)); + aoBottomRight = (float) (aoMixedXYZNPN * renderBlocks.renderMinY * (1.0D - renderBlocks.renderMaxX) + + aoMixedXYZPPN * renderBlocks.renderMinY * renderBlocks.renderMaxX + + aoMixedXYZPNN * (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMaxX + + aoMixedXYZNNN * (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMaxX)); + aoTopRight = (float) (aoMixedXYZNPN * renderBlocks.renderMinY * (1.0D - renderBlocks.renderMinX) + + aoMixedXYZPPN * renderBlocks.renderMinY * renderBlocks.renderMinX + + aoMixedXYZPNN * (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMinX + + aoMixedXYZNNN * (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMinX)); + + renderBlocks.brightnessTopLeft = renderBlocks.mixAoBrightness( + brightnessMixedXYZNPN, + brightnessMixedXYZPPN, + brightnessMixedXYZPNN, + brightnessMixedXYZNNN, + renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMinX), + renderBlocks.renderMaxY * renderBlocks.renderMinX, + (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMinX, + (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMinX)); + renderBlocks.brightnessBottomLeft = renderBlocks.mixAoBrightness( + brightnessMixedXYZNPN, + brightnessMixedXYZPPN, + brightnessMixedXYZPNN, + brightnessMixedXYZNNN, + renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMaxX), + renderBlocks.renderMaxY * renderBlocks.renderMaxX, + (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMaxX, + (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMaxX)); + renderBlocks.brightnessBottomRight = renderBlocks.mixAoBrightness( + brightnessMixedXYZNPN, + brightnessMixedXYZPPN, + brightnessMixedXYZPNN, + brightnessMixedXYZNNN, + renderBlocks.renderMinY * (1.0D - renderBlocks.renderMaxX), + renderBlocks.renderMinY * renderBlocks.renderMaxX, + (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMaxX, + (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMaxX)); + renderBlocks.brightnessTopRight = renderBlocks.mixAoBrightness( + brightnessMixedXYZNPN, + brightnessMixedXYZPPN, + brightnessMixedXYZPNN, + brightnessMixedXYZNNN, + renderBlocks.renderMinY * (1.0D - renderBlocks.renderMinX), + renderBlocks.renderMinY * renderBlocks.renderMinX, + (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMinX, + (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMinX)); } return this; @@ -686,42 +1228,150 @@ public class LightingHelper { float aoLightValue = renderBlocks.blockAccess.getBlock(x, y, z + 1).getAmbientOcclusionLightValue(); - renderBlocks.aoBrightnessXZNP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, y, zOffset); - renderBlocks.aoBrightnessXZPP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, y, zOffset); - renderBlocks.aoBrightnessYZNP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, y - 1, zOffset); - renderBlocks.aoBrightnessYZPP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, y + 1, zOffset); - renderBlocks.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, y - 1, zOffset); - renderBlocks.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, y + 1, zOffset); - renderBlocks.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, y - 1, zOffset); - renderBlocks.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, y + 1, zOffset); - renderBlocks.aoLightValueScratchXZNP = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x - 1, y, z).getAmbientOcclusionLightValue(), renderBlocks.renderMaxZ); - renderBlocks.aoLightValueScratchXZPP = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x + 1, y, z).getAmbientOcclusionLightValue(), renderBlocks.renderMaxZ); - renderBlocks.aoLightValueScratchYZNP = getMixedAo(renderBlocks.blockAccess.getBlock(x, y - 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y - 1, z).getAmbientOcclusionLightValue(), renderBlocks.renderMaxZ); - renderBlocks.aoLightValueScratchYZPP = getMixedAo(renderBlocks.blockAccess.getBlock(x, y + 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x, y + 1, z).getAmbientOcclusionLightValue(), renderBlocks.renderMaxZ); - renderBlocks.aoLightValueScratchXYZNNP = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y - 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x - 1, y - 1, z).getAmbientOcclusionLightValue(), renderBlocks.renderMaxZ); - renderBlocks.aoLightValueScratchXYZNPP = getMixedAo(renderBlocks.blockAccess.getBlock(x - 1, y + 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x - 1, y + 1, z).getAmbientOcclusionLightValue(), renderBlocks.renderMaxZ); - renderBlocks.aoLightValueScratchXYZPNP = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y - 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x + 1, y - 1, z).getAmbientOcclusionLightValue(), renderBlocks.renderMaxZ); - renderBlocks.aoLightValueScratchXYZPPP = getMixedAo(renderBlocks.blockAccess.getBlock(x + 1, y + 1, z + 1).getAmbientOcclusionLightValue(), renderBlocks.blockAccess.getBlock(x + 1, y + 1, z).getAmbientOcclusionLightValue(), renderBlocks.renderMaxZ); - - int brightnessMixedXYZNPP = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXZNP, renderBlocks.aoBrightnessXYZNPP, renderBlocks.aoBrightnessYZPP, mixedBrightness); - int brightnessMixedXYZNNP = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessXYZNNP, renderBlocks.aoBrightnessXZNP, renderBlocks.aoBrightnessYZNP, mixedBrightness); - int brightnessMixedXYZPNP = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessYZNP, renderBlocks.aoBrightnessXYZPNP, renderBlocks.aoBrightnessXZPP, mixedBrightness); - int brightnessMixedXYZPPP = renderBlocks.getAoBrightness(renderBlocks.aoBrightnessYZPP, renderBlocks.aoBrightnessXZPP, renderBlocks.aoBrightnessXYZPPP, mixedBrightness); - - float aoMixedXYZNPP = (renderBlocks.aoLightValueScratchXZNP + renderBlocks.aoLightValueScratchXYZNPP + aoLightValue + renderBlocks.aoLightValueScratchYZPP) / 4.0F; - float aoMixedXYZNNP = (renderBlocks.aoLightValueScratchXYZNNP + renderBlocks.aoLightValueScratchXZNP + renderBlocks.aoLightValueScratchYZNP + aoLightValue) / 4.0F; - float aoMixedXYZPNP = (renderBlocks.aoLightValueScratchYZNP + aoLightValue + renderBlocks.aoLightValueScratchXYZPNP + renderBlocks.aoLightValueScratchXZPP) / 4.0F; - float aoMixedXYZPPP = (aoLightValue + renderBlocks.aoLightValueScratchYZPP + renderBlocks.aoLightValueScratchXZPP + renderBlocks.aoLightValueScratchXYZPPP) / 4.0F; - - aoTopLeft = (float) (aoMixedXYZNPP * renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMinX) + aoMixedXYZPPP * renderBlocks.renderMaxY * renderBlocks.renderMinX + aoMixedXYZPNP * (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMinX + aoMixedXYZNNP * (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMinX)); - aoBottomLeft = (float) (aoMixedXYZNPP * renderBlocks.renderMinY * (1.0D - renderBlocks.renderMinX) + aoMixedXYZPPP * renderBlocks.renderMinY * renderBlocks.renderMinX + aoMixedXYZPNP * (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMinX + aoMixedXYZNNP * (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMinX)); - aoBottomRight = (float) (aoMixedXYZNPP * renderBlocks.renderMinY * (1.0D - renderBlocks.renderMaxX) + aoMixedXYZPPP * renderBlocks.renderMinY * renderBlocks.renderMaxX + aoMixedXYZPNP * (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMaxX + aoMixedXYZNNP * (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMaxX)); - aoTopRight = (float) (aoMixedXYZNPP * renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMaxX) + aoMixedXYZPPP * renderBlocks.renderMaxY * renderBlocks.renderMaxX + aoMixedXYZPNP * (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMaxX + aoMixedXYZNNP * (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMaxX)); - - renderBlocks.brightnessTopLeft = renderBlocks.mixAoBrightness(brightnessMixedXYZNPP, brightnessMixedXYZNNP, brightnessMixedXYZPNP, brightnessMixedXYZPPP, renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMinX), (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMinX), (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMinX, renderBlocks.renderMaxY * renderBlocks.renderMinX); - renderBlocks.brightnessBottomLeft = renderBlocks.mixAoBrightness(brightnessMixedXYZNPP, brightnessMixedXYZNNP, brightnessMixedXYZPNP, brightnessMixedXYZPPP, renderBlocks.renderMinY * (1.0D - renderBlocks.renderMinX), (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMinX), (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMinX, renderBlocks.renderMinY * renderBlocks.renderMinX); - renderBlocks.brightnessBottomRight = renderBlocks.mixAoBrightness(brightnessMixedXYZNPP, brightnessMixedXYZNNP, brightnessMixedXYZPNP, brightnessMixedXYZPPP, renderBlocks.renderMinY * (1.0D - renderBlocks.renderMaxX), (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMaxX), (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMaxX, renderBlocks.renderMinY * renderBlocks.renderMaxX); - renderBlocks.brightnessTopRight = renderBlocks.mixAoBrightness(brightnessMixedXYZNPP, brightnessMixedXYZNNP, brightnessMixedXYZPNP, brightnessMixedXYZPPP, renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMaxX), (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMaxX), (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMaxX, renderBlocks.renderMaxY * renderBlocks.renderMaxX); + renderBlocks.aoBrightnessXZNP = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, y, zOffset); + renderBlocks.aoBrightnessXZPP = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, y, zOffset); + renderBlocks.aoBrightnessYZNP = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, y - 1, zOffset); + renderBlocks.aoBrightnessYZPP = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x, y + 1, zOffset); + renderBlocks.aoBrightnessXYZNNP = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, y - 1, zOffset); + renderBlocks.aoBrightnessXYZNPP = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x - 1, y + 1, zOffset); + renderBlocks.aoBrightnessXYZPNP = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, y - 1, zOffset); + renderBlocks.aoBrightnessXYZPPP = + block.getMixedBrightnessForBlock(renderBlocks.blockAccess, x + 1, y + 1, zOffset); + renderBlocks.aoLightValueScratchXZNP = getMixedAo( + renderBlocks.blockAccess.getBlock(x - 1, y, z + 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x - 1, y, z).getAmbientOcclusionLightValue(), + renderBlocks.renderMaxZ); + renderBlocks.aoLightValueScratchXZPP = getMixedAo( + renderBlocks.blockAccess.getBlock(x + 1, y, z + 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x + 1, y, z).getAmbientOcclusionLightValue(), + renderBlocks.renderMaxZ); + renderBlocks.aoLightValueScratchYZNP = getMixedAo( + renderBlocks.blockAccess.getBlock(x, y - 1, z + 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x, y - 1, z).getAmbientOcclusionLightValue(), + renderBlocks.renderMaxZ); + renderBlocks.aoLightValueScratchYZPP = getMixedAo( + renderBlocks.blockAccess.getBlock(x, y + 1, z + 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x, y + 1, z).getAmbientOcclusionLightValue(), + renderBlocks.renderMaxZ); + renderBlocks.aoLightValueScratchXYZNNP = getMixedAo( + renderBlocks.blockAccess.getBlock(x - 1, y - 1, z + 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x - 1, y - 1, z).getAmbientOcclusionLightValue(), + renderBlocks.renderMaxZ); + renderBlocks.aoLightValueScratchXYZNPP = getMixedAo( + renderBlocks.blockAccess.getBlock(x - 1, y + 1, z + 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x - 1, y + 1, z).getAmbientOcclusionLightValue(), + renderBlocks.renderMaxZ); + renderBlocks.aoLightValueScratchXYZPNP = getMixedAo( + renderBlocks.blockAccess.getBlock(x + 1, y - 1, z + 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x + 1, y - 1, z).getAmbientOcclusionLightValue(), + renderBlocks.renderMaxZ); + renderBlocks.aoLightValueScratchXYZPPP = getMixedAo( + renderBlocks.blockAccess.getBlock(x + 1, y + 1, z + 1).getAmbientOcclusionLightValue(), + renderBlocks.blockAccess.getBlock(x + 1, y + 1, z).getAmbientOcclusionLightValue(), + renderBlocks.renderMaxZ); + + int brightnessMixedXYZNPP = renderBlocks.getAoBrightness( + renderBlocks.aoBrightnessXZNP, + renderBlocks.aoBrightnessXYZNPP, + renderBlocks.aoBrightnessYZPP, + mixedBrightness); + int brightnessMixedXYZNNP = renderBlocks.getAoBrightness( + renderBlocks.aoBrightnessXYZNNP, + renderBlocks.aoBrightnessXZNP, + renderBlocks.aoBrightnessYZNP, + mixedBrightness); + int brightnessMixedXYZPNP = renderBlocks.getAoBrightness( + renderBlocks.aoBrightnessYZNP, + renderBlocks.aoBrightnessXYZPNP, + renderBlocks.aoBrightnessXZPP, + mixedBrightness); + int brightnessMixedXYZPPP = renderBlocks.getAoBrightness( + renderBlocks.aoBrightnessYZPP, + renderBlocks.aoBrightnessXZPP, + renderBlocks.aoBrightnessXYZPPP, + mixedBrightness); + + float aoMixedXYZNPP = (renderBlocks.aoLightValueScratchXZNP + + renderBlocks.aoLightValueScratchXYZNPP + + aoLightValue + + renderBlocks.aoLightValueScratchYZPP) + / 4.0F; + float aoMixedXYZNNP = (renderBlocks.aoLightValueScratchXYZNNP + + renderBlocks.aoLightValueScratchXZNP + + renderBlocks.aoLightValueScratchYZNP + + aoLightValue) + / 4.0F; + float aoMixedXYZPNP = (renderBlocks.aoLightValueScratchYZNP + + aoLightValue + + renderBlocks.aoLightValueScratchXYZPNP + + renderBlocks.aoLightValueScratchXZPP) + / 4.0F; + float aoMixedXYZPPP = (aoLightValue + + renderBlocks.aoLightValueScratchYZPP + + renderBlocks.aoLightValueScratchXZPP + + renderBlocks.aoLightValueScratchXYZPPP) + / 4.0F; + + aoTopLeft = (float) (aoMixedXYZNPP * renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMinX) + + aoMixedXYZPPP * renderBlocks.renderMaxY * renderBlocks.renderMinX + + aoMixedXYZPNP * (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMinX + + aoMixedXYZNNP * (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMinX)); + aoBottomLeft = (float) (aoMixedXYZNPP * renderBlocks.renderMinY * (1.0D - renderBlocks.renderMinX) + + aoMixedXYZPPP * renderBlocks.renderMinY * renderBlocks.renderMinX + + aoMixedXYZPNP * (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMinX + + aoMixedXYZNNP * (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMinX)); + aoBottomRight = (float) (aoMixedXYZNPP * renderBlocks.renderMinY * (1.0D - renderBlocks.renderMaxX) + + aoMixedXYZPPP * renderBlocks.renderMinY * renderBlocks.renderMaxX + + aoMixedXYZPNP * (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMaxX + + aoMixedXYZNNP * (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMaxX)); + aoTopRight = (float) (aoMixedXYZNPP * renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMaxX) + + aoMixedXYZPPP * renderBlocks.renderMaxY * renderBlocks.renderMaxX + + aoMixedXYZPNP * (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMaxX + + aoMixedXYZNNP * (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMaxX)); + + renderBlocks.brightnessTopLeft = renderBlocks.mixAoBrightness( + brightnessMixedXYZNPP, + brightnessMixedXYZNNP, + brightnessMixedXYZPNP, + brightnessMixedXYZPPP, + renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMinX), + (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMinX), + (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMinX, + renderBlocks.renderMaxY * renderBlocks.renderMinX); + renderBlocks.brightnessBottomLeft = renderBlocks.mixAoBrightness( + brightnessMixedXYZNPP, + brightnessMixedXYZNNP, + brightnessMixedXYZPNP, + brightnessMixedXYZPPP, + renderBlocks.renderMinY * (1.0D - renderBlocks.renderMinX), + (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMinX), + (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMinX, + renderBlocks.renderMinY * renderBlocks.renderMinX); + renderBlocks.brightnessBottomRight = renderBlocks.mixAoBrightness( + brightnessMixedXYZNPP, + brightnessMixedXYZNNP, + brightnessMixedXYZPNP, + brightnessMixedXYZPPP, + renderBlocks.renderMinY * (1.0D - renderBlocks.renderMaxX), + (1.0D - renderBlocks.renderMinY) * (1.0D - renderBlocks.renderMaxX), + (1.0D - renderBlocks.renderMinY) * renderBlocks.renderMaxX, + renderBlocks.renderMinY * renderBlocks.renderMaxX); + renderBlocks.brightnessTopRight = renderBlocks.mixAoBrightness( + brightnessMixedXYZNPP, + brightnessMixedXYZNNP, + brightnessMixedXYZPNP, + brightnessMixedXYZPPP, + renderBlocks.renderMaxY * (1.0D - renderBlocks.renderMaxX), + (1.0D - renderBlocks.renderMaxY) * (1.0D - renderBlocks.renderMaxX), + (1.0D - renderBlocks.renderMaxY) * renderBlocks.renderMaxX, + renderBlocks.renderMaxY * renderBlocks.renderMaxX); } return this; diff --git a/src/main/java/gregtech/api/util/WorldSpawnedEventBuilder.java b/src/main/java/gregtech/api/util/WorldSpawnedEventBuilder.java index f2bb79657a..50566f79a3 100644 --- a/src/main/java/gregtech/api/util/WorldSpawnedEventBuilder.java +++ b/src/main/java/gregtech/api/util/WorldSpawnedEventBuilder.java @@ -1,14 +1,13 @@ package gregtech.api.util; +import java.util.Objects; +import java.util.function.BiConsumer; +import java.util.function.Consumer; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.Vec3; import net.minecraft.world.World; -import java.util.Objects; -import java.util.function.BiConsumer; -import java.util.function.Consumer; - @SuppressWarnings("unused") public abstract class WorldSpawnedEventBuilder implements Runnable { private static final String ILLEGAL_STATE_STR1 = "Position, identifier and world must be set"; @@ -49,36 +48,46 @@ public abstract class WorldSpawnedEventBuilder implements Runnable { private interface IPositionedWorldSpawnedEvent { Vec3 getPosition(); + IPositionedWorldSpawnedEvent setPosition(Vec3 position); + IPositionedWorldSpawnedEvent setPosition(double x, double y, double z); } private interface IEntityWorldSpawnedEvent { Entity getEntity(); + IEntityWorldSpawnedEvent setEntity(Entity entity); } private interface IEntityPlayerWorldSpawnedEvent { EntityPlayer getEntityPlayer(); + IEntityPlayerWorldSpawnedEvent setEntityPlayer(EntityPlayer entity); } private interface IStringIdentifierWorldSpawnedEvent { - String getIdentifier(); - IStringIdentifierWorldSpawnedEvent setIdentifier(String identifier); - IStringIdentifierWorldSpawnedEvent setIdentifier(Enum<?> identifier); + String getIdentifier(); + + IStringIdentifierWorldSpawnedEvent setIdentifier(String identifier); + + IStringIdentifierWorldSpawnedEvent setIdentifier(Enum<?> identifier); } private interface ISoundWorldSpawnedEvent { float getPitch(); + float getVolume(); + ISoundWorldSpawnedEvent setPitch(float pitch); + ISoundWorldSpawnedEvent setVolume(float volume); } /* Abstract Classes */ - private abstract static class EntityWorldSpawnedEventBuilder extends WorldSpawnedEventBuilder implements IEntityWorldSpawnedEvent { + private abstract static class EntityWorldSpawnedEventBuilder extends WorldSpawnedEventBuilder + implements IEntityWorldSpawnedEvent { private Entity entity; @@ -94,7 +103,8 @@ public abstract class WorldSpawnedEventBuilder implements Runnable { } } - private abstract static class PositionedEntityWorldSpawnedEventBuilder extends EntityWorldSpawnedEventBuilder implements IPositionedWorldSpawnedEvent { + private abstract static class PositionedEntityWorldSpawnedEventBuilder extends EntityWorldSpawnedEventBuilder + implements IPositionedWorldSpawnedEvent { private Vec3 position; @@ -114,10 +124,10 @@ public abstract class WorldSpawnedEventBuilder implements Runnable { this.position = Vec3.createVectorHelper(x, y, z); return this; } - } - private abstract static class PositionedWorldSpawnedEventBuilder extends WorldSpawnedEventBuilder implements IPositionedWorldSpawnedEvent { + private abstract static class PositionedWorldSpawnedEventBuilder extends WorldSpawnedEventBuilder + implements IPositionedWorldSpawnedEvent { private Vec3 position; @Override @@ -138,7 +148,8 @@ public abstract class WorldSpawnedEventBuilder implements Runnable { } } - private abstract static class StringIdentifierPositionedWorldSpawnedEventBuilder extends PositionedWorldSpawnedEventBuilder implements IStringIdentifierWorldSpawnedEvent { + private abstract static class StringIdentifierPositionedWorldSpawnedEventBuilder + extends PositionedWorldSpawnedEventBuilder implements IStringIdentifierWorldSpawnedEvent { private String identifier; @Override @@ -153,13 +164,14 @@ public abstract class WorldSpawnedEventBuilder implements Runnable { } @Override - public StringIdentifierPositionedWorldSpawnedEventBuilder setIdentifier(Enum<?> identifier){ + public StringIdentifierPositionedWorldSpawnedEventBuilder setIdentifier(Enum<?> identifier) { this.identifier = identifier.toString(); return this; } } - private abstract static class SoundStringIdentifierPositionedWorldSpawnedEventBuilder extends StringIdentifierPositionedWorldSpawnedEventBuilder implements ISoundWorldSpawnedEvent { + private abstract static class SoundStringIdentifierPositionedWorldSpawnedEventBuilder + extends StringIdentifierPositionedWorldSpawnedEventBuilder implements ISoundWorldSpawnedEvent { private float pitch; private float volume; @@ -237,11 +249,15 @@ public abstract class WorldSpawnedEventBuilder implements Runnable { if (getPosition() == null || getIdentifier() == null || getMotion() == null || getWorld() == null) throw new IllegalStateException("Position, identifier, motion and world must be set"); - getWorld().spawnParticle( - getIdentifier(), - getPosition().xCoord, getPosition().yCoord, getPosition().zCoord, - getMotion().xCoord, getMotion().yCoord, getMotion().zCoord - ); + getWorld() + .spawnParticle( + getIdentifier(), + getPosition().xCoord, + getPosition().yCoord, + getPosition().zCoord, + getMotion().xCoord, + getMotion().yCoord, + getMotion().zCoord); } } @@ -287,11 +303,14 @@ public abstract class WorldSpawnedEventBuilder implements Runnable { if (getPosition() == null || getIdentifier() == null || getWorld() == null) throw new IllegalStateException(ILLEGAL_STATE_STR1); - getWorld().playSoundEffect( - getPosition().xCoord, getPosition().yCoord, getPosition().zCoord, - getIdentifier(), - getPitch(), getVolume() - ); + getWorld() + .playSoundEffect( + getPosition().xCoord, + getPosition().yCoord, + getPosition().zCoord, + getIdentifier(), + getPitch(), + getVolume()); } } @@ -343,11 +362,15 @@ public abstract class WorldSpawnedEventBuilder implements Runnable { if (getPosition() == null || getIdentifier() == null || getWorld() == null) throw new IllegalStateException(ILLEGAL_STATE_STR1); - getWorld().playSound( - getPosition().xCoord, getPosition().yCoord, getPosition().zCoord, - getIdentifier(), - getPitch(), getVolume(), isProximity() - ); + getWorld() + .playSound( + getPosition().xCoord, + getPosition().yCoord, + getPosition().zCoord, + getIdentifier(), + getPitch(), + getVolume(), + isProximity()); } } @@ -381,10 +404,8 @@ public abstract class WorldSpawnedEventBuilder implements Runnable { if (getPosition() == null || getIdentifier() == null || getWorld() == null) throw new IllegalStateException(ILLEGAL_STATE_STR1); - getWorld().playRecord( - getIdentifier(), - (int) getPosition().xCoord,(int) getPosition().yCoord,(int) getPosition().zCoord - ); + getWorld().playRecord(getIdentifier(), (int) getPosition().xCoord, (int) getPosition().yCoord, (int) + getPosition().zCoord); } } @@ -392,7 +413,6 @@ public abstract class WorldSpawnedEventBuilder implements Runnable { private boolean isFlaming, isSmoking; private float strength; - public float getStrength() { return strength; } @@ -440,14 +460,23 @@ public abstract class WorldSpawnedEventBuilder implements Runnable { if (getPosition() == null || getWorld() == null) throw new IllegalStateException("Position and world must be set"); - getWorld().newExplosion(getEntity(), getPosition().xCoord, getPosition().yCoord, getPosition().zCoord, strength, isFlaming, isSmoking); + getWorld() + .newExplosion( + getEntity(), + getPosition().xCoord, + getPosition().yCoord, + getPosition().zCoord, + strength, + isFlaming, + isSmoking); } } /** * Positional Data is rounded down due to this targeting a block. */ - public static final class ExtinguishFireEffectEventBuilder extends PositionedWorldSpawnedEventBuilder implements IEntityPlayerWorldSpawnedEvent { + public static final class ExtinguishFireEffectEventBuilder extends PositionedWorldSpawnedEventBuilder + implements IEntityPlayerWorldSpawnedEvent { private int side; private EntityPlayer entityPlayer; @@ -492,11 +521,18 @@ public abstract class WorldSpawnedEventBuilder implements Runnable { if (getEntityPlayer() == null || getPosition() == null || getWorld() == null) throw new IllegalStateException("EntityPlayer, position and world must be set"); - getWorld().extinguishFire(getEntityPlayer(), (int) getPosition().xCoord, (int) getPosition().yCoord, (int) getPosition().zCoord, side); + getWorld() + .extinguishFire( + getEntityPlayer(), + (int) getPosition().xCoord, + (int) getPosition().yCoord, + (int) getPosition().zCoord, + side); } } - public static final class SoundAtEntityEventBuilder extends EntityWorldSpawnedEventBuilder implements ISoundWorldSpawnedEvent, IStringIdentifierWorldSpawnedEvent { + public static final class SoundAtEntityEventBuilder extends EntityWorldSpawnedEventBuilder + implements ISoundWorldSpawnedEvent, IStringIdentifierWorldSpawnedEvent { private float pitch; private float volume; @@ -553,14 +589,15 @@ public abstract class WorldSpawnedEventBuilder implements Runnable { @Override public void run() { - if (getWorld() == null || getIdentifier() == null || getEntity() == null) + if (getWorld() == null || getIdentifier() == null || getEntity() == null) throw new IllegalStateException("World, Identifier and entity must be set!"); getWorld().playSoundAtEntity(getEntity(), getIdentifier(), volume, pitch); } } - public static final class SoundToNearExceptEventBuilder extends WorldSpawnedEventBuilder implements ISoundWorldSpawnedEvent, IStringIdentifierWorldSpawnedEvent, IEntityPlayerWorldSpawnedEvent { + public static final class SoundToNearExceptEventBuilder extends WorldSpawnedEventBuilder + implements ISoundWorldSpawnedEvent, IStringIdentifierWorldSpawnedEvent, IEntityPlayerWorldSpawnedEvent { private float pitch; private float volume; @@ -613,7 +650,7 @@ public abstract class WorldSpawnedEventBuilder implements Runnable { @Override public void run() { - if (getWorld() == null || getIdentifier() == null || getEntityPlayer() == null) + if (getWorld() == null || getIdentifier() == null || getEntityPlayer() == null) throw new IllegalStateException("World, Identifier and EntityPlayer must be set!"); getWorld().playSoundAtEntity(getEntityPlayer(), getIdentifier(), volume, pitch); diff --git a/src/main/java/gregtech/api/util/extensions/IteratorExt.java b/src/main/java/gregtech/api/util/extensions/IteratorExt.java index d59bb298a4..8662870921 100644 --- a/src/main/java/gregtech/api/util/extensions/IteratorExt.java +++ b/src/main/java/gregtech/api/util/extensions/IteratorExt.java @@ -1,7 +1,6 @@ package gregtech.api.util.extensions; import gregtech.api.objects.iterators.MergedIterator; - import java.util.Iterator; public class IteratorExt { diff --git a/src/main/java/gregtech/api/world/GT_Worldgen.java b/src/main/java/gregtech/api/world/GT_Worldgen.java index c2bbdd1e21..698ed0d1c9 100644 --- a/src/main/java/gregtech/api/world/GT_Worldgen.java +++ b/src/main/java/gregtech/api/world/GT_Worldgen.java @@ -1,13 +1,12 @@ package gregtech.api.world; import gregtech.api.GregTech_API; -import net.minecraft.world.World; -import net.minecraft.world.chunk.IChunkProvider; - import java.util.List; import java.util.Map; import java.util.Random; import java.util.concurrent.ConcurrentHashMap; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; public abstract class GT_Worldgen { @@ -30,12 +29,30 @@ public abstract class GT_Worldgen { * @param aChunkZ zCoord of the Chunk * @return if the Worldgeneration has been successfully completed */ - public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { + public boolean executeWorldgen( + World aWorld, + Random aRandom, + String aBiome, + int aDimensionType, + int aChunkX, + int aChunkZ, + IChunkProvider aChunkGenerator, + IChunkProvider aChunkProvider) { return false; } - public int executeWorldgenChunkified(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, int seedX, int seedZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { - return 4; // This is for the empty Orevein + public int executeWorldgenChunkified( + World aWorld, + Random aRandom, + String aBiome, + int aDimensionType, + int aChunkX, + int aChunkZ, + int seedX, + int seedZ, + IChunkProvider aChunkGenerator, + IChunkProvider aChunkProvider) { + return 4; // This is for the empty Orevein } /** @@ -47,26 +64,38 @@ public abstract class GT_Worldgen { * @param aChunkZ zCoord of the Chunk * @return if the Worldgeneration has been successfully completed */ - public boolean executeCavegen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { + public boolean executeCavegen( + World aWorld, + Random aRandom, + String aBiome, + int aDimensionType, + int aChunkX, + int aChunkZ, + IChunkProvider aChunkGenerator, + IChunkProvider aChunkProvider) { return false; } /** - * + * * @param aWorld The World Object * @param aDimensionType The Type of Worldgeneration to add. -1 = Nether, 0 = Overworld, +1 = End * @param aAllowedDimensionType The Type of allowed Worldgeneration * @return if generation for this world is allowed for MoronTech (tm) OreGen (ATM (2.0.3.1Dev) only End, Nether, Overworld, Twilight Forest and Deep Dark) */ public boolean isGenerationAllowed(World aWorld, int aDimensionType, int aAllowedDimensionType) { - - if (!((aWorld.provider.getDimensionName().equalsIgnoreCase("Overworld")) || (aWorld.provider.getDimensionName().equalsIgnoreCase("Nether"))||(aWorld.provider.getDimensionName().equalsIgnoreCase("The End"))||(aWorld.provider.getDimensionName().equalsIgnoreCase("Twilight Forest"))||(aWorld.provider.getDimensionName().equalsIgnoreCase("Underdark")))) - return false; - - String aDimName = aWorld.provider.getDimensionName(); + + if (!((aWorld.provider.getDimensionName().equalsIgnoreCase("Overworld")) + || (aWorld.provider.getDimensionName().equalsIgnoreCase("Nether")) + || (aWorld.provider.getDimensionName().equalsIgnoreCase("The End")) + || (aWorld.provider.getDimensionName().equalsIgnoreCase("Twilight Forest")) + || (aWorld.provider.getDimensionName().equalsIgnoreCase("Underdark")))) return false; + + String aDimName = aWorld.provider.getDimensionName(); Boolean tAllowed = mDimensionMap.get(aDimName); if (tAllowed == null) { - boolean tValue = GregTech_API.sWorldgenFile.get("worldgen." + mWorldGenName, aDimName, aDimensionType == aAllowedDimensionType); + boolean tValue = GregTech_API.sWorldgenFile.get( + "worldgen." + mWorldGenName, aDimName, aDimensionType == aAllowedDimensionType); mDimensionMap.put(aDimName, tValue); return tValue; } diff --git a/src/main/java/gregtech/api/world/GT_Worldgen_Ore.java b/src/main/java/gregtech/api/world/GT_Worldgen_Ore.java index 5d82d2798f..c9d1325529 100644 --- a/src/main/java/gregtech/api/world/GT_Worldgen_Ore.java +++ b/src/main/java/gregtech/api/world/GT_Worldgen_Ore.java @@ -1,10 +1,9 @@ package gregtech.api.world; import gregtech.api.GregTech_API; -import net.minecraft.block.Block; - import java.util.ArrayList; import java.util.Collection; +import net.minecraft.block.Block; public abstract class GT_Worldgen_Ore extends GT_Worldgen { public final int mBlockMeta, mAmount, mSize, mMinY, mMaxY, mProbability, mDimensionType; @@ -13,7 +12,19 @@ public abstract class GT_Worldgen_Ore extends GT_Worldgen { public final boolean mAllowToGenerateinVoid; private final String aTextWorldgen = "worldgen."; - public GT_Worldgen_Ore(String aName, boolean aDefault, Block aBlock, int aBlockMeta, int aDimensionType, int aAmount, int aSize, int aProbability, int aMinY, int aMaxY, Collection<String> aBiomeList, boolean aAllowToGenerateinVoid) { + public GT_Worldgen_Ore( + String aName, + boolean aDefault, + Block aBlock, + int aBlockMeta, + int aDimensionType, + int aAmount, + int aSize, + int aProbability, + int aMinY, + int aMaxY, + Collection<String> aBiomeList, + boolean aAllowToGenerateinVoid) { super(aName, GregTech_API.sWorldgenList, aDefault); mDimensionType = aDimensionType; mBlock = aBlock; diff --git a/src/main/java/gregtech/api/world/GT_Worldgen_Ore_SingleBlock.java b/src/main/java/gregtech/api/world/GT_Worldgen_Ore_SingleBlock.java index 7205eef4a5..92c00bc455 100644 --- a/src/main/java/gregtech/api/world/GT_Worldgen_Ore_SingleBlock.java +++ b/src/main/java/gregtech/api/world/GT_Worldgen_Ore_SingleBlock.java @@ -1,25 +1,64 @@ package gregtech.api.world; +import java.util.Collection; +import java.util.Random; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; -import java.util.Collection; -import java.util.Random; - public class GT_Worldgen_Ore_SingleBlock extends GT_Worldgen_Ore { - public GT_Worldgen_Ore_SingleBlock(String aName, boolean aDefault, Block aBlock, int aBlockMeta, int aDimensionType, int aAmount, int aSize, int aProbability, int aMinY, int aMaxY, Collection<String> aBiomeList, boolean aAllowToGenerateinVoid) { - super(aName, aDefault, aBlock, aBlockMeta, aDimensionType, aAmount, aSize, aProbability, aMinY, aMaxY, aBiomeList, aAllowToGenerateinVoid); + public GT_Worldgen_Ore_SingleBlock( + String aName, + boolean aDefault, + Block aBlock, + int aBlockMeta, + int aDimensionType, + int aAmount, + int aSize, + int aProbability, + int aMinY, + int aMaxY, + Collection<String> aBiomeList, + boolean aAllowToGenerateinVoid) { + super( + aName, + aDefault, + aBlock, + aBlockMeta, + aDimensionType, + aAmount, + aSize, + aProbability, + aMinY, + aMaxY, + aBiomeList, + aAllowToGenerateinVoid); } @Override - public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { - if (isGenerationAllowed(aWorld, aDimensionType, mDimensionType) && (mBiomeList.isEmpty() || mBiomeList.contains(aBiome)) && (mProbability <= 1 || aRandom.nextInt(mProbability) == 0)) { + public boolean executeWorldgen( + World aWorld, + Random aRandom, + String aBiome, + int aDimensionType, + int aChunkX, + int aChunkZ, + IChunkProvider aChunkGenerator, + IChunkProvider aChunkProvider) { + if (isGenerationAllowed(aWorld, aDimensionType, mDimensionType) + && (mBiomeList.isEmpty() || mBiomeList.contains(aBiome)) + && (mProbability <= 1 || aRandom.nextInt(mProbability) == 0)) { for (int i = 0; i < mAmount; i++) { - int tX = aChunkX + aRandom.nextInt(16), tY = mMinY + aRandom.nextInt(mMaxY - mMinY), tZ = aChunkZ + aRandom.nextInt(16); + int tX = aChunkX + aRandom.nextInt(16), + tY = mMinY + aRandom.nextInt(mMaxY - mMinY), + tZ = aChunkZ + aRandom.nextInt(16); Block tBlock = aWorld.getBlock(tX, tY, tZ); - if (((mAllowToGenerateinVoid && aWorld.getBlock(tX, tY, tZ).isAir(aWorld, tX, tY, tZ)) || (tBlock != null && (tBlock.isReplaceableOreGen(aWorld, tX, tY, tZ, Blocks.stone) || tBlock.isReplaceableOreGen(aWorld, tX, tY, tZ, Blocks.end_stone) || tBlock.isReplaceableOreGen(aWorld, tX, tY, tZ, Blocks.netherrack))))) { + if (((mAllowToGenerateinVoid && aWorld.getBlock(tX, tY, tZ).isAir(aWorld, tX, tY, tZ)) + || (tBlock != null + && (tBlock.isReplaceableOreGen(aWorld, tX, tY, tZ, Blocks.stone) + || tBlock.isReplaceableOreGen(aWorld, tX, tY, tZ, Blocks.end_stone) + || tBlock.isReplaceableOreGen(aWorld, tX, tY, tZ, Blocks.netherrack))))) { aWorld.setBlock(tX, tY, tZ, mBlock, mBlockMeta, 0); } } diff --git a/src/main/java/gregtech/api/world/GT_Worldgen_Ore_SingleBlock_UnderLava.java b/src/main/java/gregtech/api/world/GT_Worldgen_Ore_SingleBlock_UnderLava.java index 16f6d37555..940f923815 100644 --- a/src/main/java/gregtech/api/world/GT_Worldgen_Ore_SingleBlock_UnderLava.java +++ b/src/main/java/gregtech/api/world/GT_Worldgen_Ore_SingleBlock_UnderLava.java @@ -1,26 +1,66 @@ package gregtech.api.world; +import java.util.Collection; +import java.util.Random; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; -import java.util.Collection; -import java.util.Random; - public class GT_Worldgen_Ore_SingleBlock_UnderLava extends GT_Worldgen_Ore { - public GT_Worldgen_Ore_SingleBlock_UnderLava(String aName, boolean aDefault, Block aBlock, int aBlockMeta, int aDimensionType, int aAmount, int aSize, int aProbability, int aMinY, int aMaxY, Collection<String> aBiomeList, boolean aAllowToGenerateinVoid) { - super(aName, aDefault, aBlock, aBlockMeta, aDimensionType, aAmount, aSize, aProbability, aMinY, aMaxY, aBiomeList, aAllowToGenerateinVoid); + public GT_Worldgen_Ore_SingleBlock_UnderLava( + String aName, + boolean aDefault, + Block aBlock, + int aBlockMeta, + int aDimensionType, + int aAmount, + int aSize, + int aProbability, + int aMinY, + int aMaxY, + Collection<String> aBiomeList, + boolean aAllowToGenerateinVoid) { + super( + aName, + aDefault, + aBlock, + aBlockMeta, + aDimensionType, + aAmount, + aSize, + aProbability, + aMinY, + aMaxY, + aBiomeList, + aAllowToGenerateinVoid); } @Override - public boolean executeCavegen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { - if (isGenerationAllowed(aWorld, aDimensionType, mDimensionType) && (mBiomeList.isEmpty() || mBiomeList.contains(aBiome)) && (mProbability <= 1 || aRandom.nextInt(mProbability) == 0)) { + public boolean executeCavegen( + World aWorld, + Random aRandom, + String aBiome, + int aDimensionType, + int aChunkX, + int aChunkZ, + IChunkProvider aChunkGenerator, + IChunkProvider aChunkProvider) { + if (isGenerationAllowed(aWorld, aDimensionType, mDimensionType) + && (mBiomeList.isEmpty() || mBiomeList.contains(aBiome)) + && (mProbability <= 1 || aRandom.nextInt(mProbability) == 0)) { for (int i = 0; i < mAmount; i++) { - int tX = aChunkX + aRandom.nextInt(16), tY = mMinY + aRandom.nextInt(mMaxY - mMinY), tZ = aChunkZ + aRandom.nextInt(16); + int tX = aChunkX + aRandom.nextInt(16), + tY = mMinY + aRandom.nextInt(mMaxY - mMinY), + tZ = aChunkZ + aRandom.nextInt(16); Block tBlock = aWorld.getBlock(tX, tY, tZ); - if (((mAllowToGenerateinVoid && aWorld.getBlock(tX, tY, tZ).isAir(aWorld, tX, tY, tZ)) || (tBlock != null && (tBlock.isReplaceableOreGen(aWorld, tX, tY, tZ, Blocks.stone) || tBlock.isReplaceableOreGen(aWorld, tX, tY, tZ, Blocks.end_stone) || tBlock.isReplaceableOreGen(aWorld, tX, tY, tZ, Blocks.netherrack))))) { - if (aWorld.getBlock(tX, tY + 1, tZ) == Blocks.lava || aWorld.getBlock(tX, tY, tZ) == Blocks.flowing_lava) + if (((mAllowToGenerateinVoid && aWorld.getBlock(tX, tY, tZ).isAir(aWorld, tX, tY, tZ)) + || (tBlock != null + && (tBlock.isReplaceableOreGen(aWorld, tX, tY, tZ, Blocks.stone) + || tBlock.isReplaceableOreGen(aWorld, tX, tY, tZ, Blocks.end_stone) + || tBlock.isReplaceableOreGen(aWorld, tX, tY, tZ, Blocks.netherrack))))) { + if (aWorld.getBlock(tX, tY + 1, tZ) == Blocks.lava + || aWorld.getBlock(tX, tY, tZ) == Blocks.flowing_lava) aWorld.setBlock(tX, tY, tZ, mBlock, mBlockMeta, 0); } } diff --git a/src/main/java/gregtech/client/GT_GUI_ClientConfig.java b/src/main/java/gregtech/client/GT_GUI_ClientConfig.java index 436be7d1df..6c3c174044 100644 --- a/src/main/java/gregtech/client/GT_GUI_ClientConfig.java +++ b/src/main/java/gregtech/client/GT_GUI_ClientConfig.java @@ -3,42 +3,48 @@ package gregtech.client; import cpw.mods.fml.client.config.GuiConfig; import cpw.mods.fml.client.config.IConfigElement; import gregtech.api.GregTech_API; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; import net.minecraft.client.gui.GuiScreen; import net.minecraftforge.common.config.ConfigCategory; import net.minecraftforge.common.config.ConfigElement; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.config.Property; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - public class GT_GUI_ClientConfig extends GuiConfig { - public GT_GUI_ClientConfig(GuiScreen parentScreen) { - super(parentScreen, getConfigElements(), "gregtech", "client", false, false, getAbridgedConfigPath(GregTech_API.sClientDataFile.mConfig.toString())); - } + public GT_GUI_ClientConfig(GuiScreen parentScreen) { + super( + parentScreen, + getConfigElements(), + "gregtech", + "client", + false, + false, + getAbridgedConfigPath(GregTech_API.sClientDataFile.mConfig.toString())); + } - @SuppressWarnings("rawtypes") - private static List<IConfigElement> getConfigElements() { - final Configuration config = GregTech_API.sClientDataFile.mConfig; - setLanguageKeys(config); - return config.getCategoryNames().stream() - .filter(name -> name.indexOf('.') == -1) - .map(name -> new ConfigElement(config.getCategory(name))) - .collect(Collectors.toList()); - } + @SuppressWarnings("rawtypes") + private static List<IConfigElement> getConfigElements() { + final Configuration config = GregTech_API.sClientDataFile.mConfig; + setLanguageKeys(config); + return config.getCategoryNames().stream() + .filter(name -> name.indexOf('.') == -1) + .map(name -> new ConfigElement(config.getCategory(name))) + .collect(Collectors.toList()); + } - private static void setLanguageKeys(Configuration config) { - for (String categoryName : config.getCategoryNames()) { - ConfigCategory category = config.getCategory(categoryName); - category.setLanguageKey("GT5U.config." + categoryName); - for (Map.Entry<String, Property> entry : category.entrySet()) { - // drop the default value in name - String name = entry.getKey(); - int defaultStart = name.lastIndexOf('_'); - String realName = defaultStart >= 0 ? name.substring(0, defaultStart) : name; - entry.getValue().setLanguageKey(String.format("%s.%s", category.getLanguagekey(), realName)); - } - } - } + private static void setLanguageKeys(Configuration config) { + for (String categoryName : config.getCategoryNames()) { + ConfigCategory category = config.getCategory(categoryName); + category.setLanguageKey("GT5U.config." + categoryName); + for (Map.Entry<String, Property> entry : category.entrySet()) { + // drop the default value in name + String name = entry.getKey(); + int defaultStart = name.lastIndexOf('_'); + String realName = defaultStart >= 0 ? name.substring(0, defaultStart) : name; + entry.getValue().setLanguageKey(String.format("%s.%s", category.getLanguagekey(), realName)); + } + } + } } diff --git a/src/main/java/gregtech/client/GT_GuiFactory.java b/src/main/java/gregtech/client/GT_GuiFactory.java index 6bc489e297..42dd2babb9 100644 --- a/src/main/java/gregtech/client/GT_GuiFactory.java +++ b/src/main/java/gregtech/client/GT_GuiFactory.java @@ -1,29 +1,26 @@ package gregtech.client; import cpw.mods.fml.client.IModGuiFactory; +import java.util.Set; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; -import java.util.Set; - public class GT_GuiFactory implements IModGuiFactory { - @Override - public void initialize(Minecraft minecraftInstance) { - - } + @Override + public void initialize(Minecraft minecraftInstance) {} - @Override - public Class<? extends GuiScreen> mainConfigGuiClass() { - return GT_GUI_ClientConfig.class; - } + @Override + public Class<? extends GuiScreen> mainConfigGuiClass() { + return GT_GUI_ClientConfig.class; + } - @Override - public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() { - return null; - } + @Override + public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() { + return null; + } - @Override - public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element) { - return null; - } + @Override + public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element) { + return null; + } } diff --git a/src/main/java/gregtech/client/GT_TooltipEventHandler.java b/src/main/java/gregtech/client/GT_TooltipEventHandler.java index eccdd7cbc8..858441f996 100644 --- a/src/main/java/gregtech/client/GT_TooltipEventHandler.java +++ b/src/main/java/gregtech/client/GT_TooltipEventHandler.java @@ -1,11 +1,10 @@ package gregtech.client; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.registry.GameRegistry; import java.util.HashMap; import java.util.Map; import java.util.function.Supplier; - -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; @@ -14,174 +13,225 @@ import net.minecraftforge.oredict.OreDictionary; public class GT_TooltipEventHandler { - private static final Map<String, Supplier<String>> tooltipMap = new HashMap<>(); - - private static final String BLACK, DARK_BLUE, DARK_GREEN, DARK_AQUA, DARK_RED, DARK_PURPLE, GOLD, GRAY, DARK_GRAY, BLUE, GREEN, AQUA, RED, LIGHT_PURPLE, YELLOW, WHITE, OBFUSCATED, BOLD, STRIKETHROUGH, UNDERLINE, ITALIC, RESET; - - private static final Supplier<String> NEW_LINE; - - /* - * What you can do: - * - Add simple, unformatted text. - * - Add formatted text. - * Note: you can chain formatting codes but the color must be used first: - * e.g. BLACK + ITALIC will create black, italic text but ITALIC + BLACK will only create black text. - * - add animated text - * - chain multiple static and/or animated text together using chain() - * (Although chaining only static text together is pointless, text() is already able to do that) - * - add multiple lines by using NEW_LINE (either as String or as Supplier<String>) - * Note: formatting only applies for one line - * Note: having a NEW_LINE in animated text results in "skipping" of one formatting since NEW_LINE - * counts as character but is not displayed - * - * Note: adding a tooltip to an item multiple times also creates multiple lines (in the same order they were added) - * - * What you cannot do: - * - add a tooltip depending on NBT, tooltips are only mapped to name and meta - * - * This method is executed on postInit - */ - public static void init() { - - // Tooltip tiers for ALL items given the appropriate tier oredict tag. - addOredictTooltip("ULV", text(WHITE + "ULV-Tier")); - addOredictTooltip("LV" , text(GRAY + "LV-Tier")); - addOredictTooltip("MV" , text(GOLD + "MV-Tier")); - addOredictTooltip("HV" , text(YELLOW + "HV-Tier")); - addOredictTooltip("EV" , text(DARK_GRAY + "EV-Tier")); - addOredictTooltip("IV" , text(GREEN + "IV-Tier")); - addOredictTooltip("LuV", text(LIGHT_PURPLE + "LuV-Tier")); - addOredictTooltip("ZPM", text(AQUA + "ZPM-Tier")); - addOredictTooltip("UV" , text(DARK_GREEN + "UV-Tier")); - addOredictTooltip("UHV", text(DARK_RED + "UHV-Tier")); - addOredictTooltip("UEV", text(DARK_PURPLE + "UEV-Tier")); - addOredictTooltip("UIV", text(DARK_BLUE + BOLD + "UIV-Tier")); - addOredictTooltip("UMV", text(RED + BOLD + UNDERLINE + "UMV-Tier")); - addOredictTooltip("UXV", animatedText("UXV-Tier", 1, 100, DARK_PURPLE + BOLD + UNDERLINE, DARK_RED + UNDERLINE + BOLD)); - addOredictTooltip("MAX", chain( - animatedText("X", 1, 100, LIGHT_PURPLE + BOLD + OBFUSCATED + UNDERLINE, RED + BOLD + OBFUSCATED + UNDERLINE, GOLD + OBFUSCATED + BOLD + UNDERLINE, YELLOW + OBFUSCATED + BOLD + UNDERLINE, GREEN + OBFUSCATED + BOLD + UNDERLINE, AQUA + OBFUSCATED + BOLD + UNDERLINE, BLUE + OBFUSCATED + BOLD + UNDERLINE), - animatedText("MAX-Tier", 1, 100, RED + BOLD + UNDERLINE, GOLD + BOLD + UNDERLINE, YELLOW + BOLD + UNDERLINE, GREEN + BOLD + UNDERLINE, AQUA + BOLD + UNDERLINE, BLUE + BOLD + UNDERLINE, LIGHT_PURPLE + BOLD + UNDERLINE), - animatedText("X", 1, 100, GOLD + OBFUSCATED + BOLD + UNDERLINE, YELLOW + OBFUSCATED + BOLD + UNDERLINE, GREEN + OBFUSCATED + BOLD + UNDERLINE, AQUA + OBFUSCATED + BOLD + UNDERLINE, BLUE + OBFUSCATED + BOLD + UNDERLINE, LIGHT_PURPLE + OBFUSCATED + BOLD + UNDERLINE, RED + OBFUSCATED + BOLD + UNDERLINE) - )); - - } - - @SubscribeEvent - public void renderTooltip(ItemTooltipEvent event) { - Supplier<String> tooltip = tooltipMap.get(getStackIdentifier(event.itemStack)); - if(tooltip != null) { - String text = tooltip.get(); - if(!text.isEmpty()) { - for(String line : text.split("\n")) { - event.toolTip.add(line); - } - } - } - } - - @SafeVarargs - private static Supplier<String> chain(Supplier<String>... parts) { - return () -> { - String s = ""; - for(Supplier<String> text : parts) { - s += text.get(); - } - return s; - }; - } - - private static Supplier<String> text(String text) { - return () -> text; - } - - /** Taken and adapted from <a href=https://github.com/GTNewHorizons/Avaritia/blob/7b7eaed652f6be320b10f33d8f8e6a04e66ca14f/src/main/java/fox/spiteful/avaritia/LudicrousText.java#L19>Avaritia</a>, licensed under MIT */ - private static Supplier<String> animatedText(String text, int posstep, int delay, String... formattingArray) { - if(text == null || text.isEmpty() || formattingArray == null || formattingArray.length == 0) return () -> ""; - - final int finalDelay = delay = delay <= 0 ? delay = 1 : delay; - - return () -> { - StringBuilder sb = new StringBuilder(text.length() * 3); - int offset = (int) ((System.currentTimeMillis() / finalDelay) % formattingArray.length); - for(int i = 0; i < text.length(); i++) { - char c = text.charAt(i); - int indexColorArray = (i * posstep + formattingArray.length - offset) % formattingArray.length; - sb.append(formattingArray[indexColorArray]); - sb.append(c); - } - return sb.toString(); - }; - } - - private static void addOredictTooltip(String oredictName, Supplier<String> tooltip) { - for(ItemStack item : OreDictionary.getOres(oredictName)) { - addItemTooltip(item, tooltip); - } - } - - private static void addItemTooltip(String modID, String registryName, int meta, Supplier<String> tooltip) { - Item item = GameRegistry.findItem(modID, registryName); - if(item == null || meta < 0 || meta >= OreDictionary.WILDCARD_VALUE || tooltip == null) return; - String identifier = item.getUnlocalizedName() + "@" + meta; - Supplier<String> previous = tooltipMap.get(identifier); - if(previous == null) { - tooltipMap.put(identifier, tooltip); - } else { - tooltipMap.put(identifier, chain(previous, NEW_LINE, tooltip)); - } - } - - private static void addItemTooltip(ItemStack item, Supplier<String> tooltip) { - if(item == null || tooltip == null) return; - String identifier = getStackIdentifier(item); - Supplier<String> previous = tooltipMap.get(identifier); - if(previous == null) { - tooltipMap.put(identifier, tooltip); - } else { - tooltipMap.put(identifier, chain(previous, NEW_LINE, tooltip)); - } - } - - private static String getStackIdentifier(ItemStack stack) { - return stack == null ? "" : stack.getItem().getUnlocalizedName() + "@" + stack.getItemDamage(); - } - - static { - AQUA = EnumChatFormatting.AQUA.toString(); - BLACK = EnumChatFormatting.BLACK.toString(); - BLUE = EnumChatFormatting.BLUE.toString(); - BOLD = EnumChatFormatting.BOLD.toString(); - DARK_AQUA = EnumChatFormatting.DARK_AQUA.toString(); - DARK_BLUE = EnumChatFormatting.DARK_BLUE.toString(); - DARK_GRAY = EnumChatFormatting.DARK_GRAY.toString(); - DARK_GREEN = EnumChatFormatting.DARK_GREEN.toString(); - DARK_PURPLE = EnumChatFormatting.DARK_PURPLE.toString(); - DARK_RED = EnumChatFormatting.DARK_RED.toString(); - GOLD = EnumChatFormatting.GOLD.toString(); - GRAY = EnumChatFormatting.GRAY.toString(); - GREEN = EnumChatFormatting.GREEN.toString(); - ITALIC = EnumChatFormatting.ITALIC.toString(); - LIGHT_PURPLE = EnumChatFormatting.LIGHT_PURPLE.toString(); - OBFUSCATED = EnumChatFormatting.OBFUSCATED.toString(); - RED = EnumChatFormatting.RED.toString(); - RESET = EnumChatFormatting.RESET.toString(); - STRIKETHROUGH = EnumChatFormatting.STRIKETHROUGH.toString(); - UNDERLINE = EnumChatFormatting.UNDERLINE.toString(); - WHITE = EnumChatFormatting.WHITE.toString(); - YELLOW = EnumChatFormatting.YELLOW.toString(); - - NEW_LINE = new Supplier<String>() { - - @Override - public String get() { - return "\n"; - } - - @Override - public String toString() { - return "\n"; - } - }; - } - + private static final Map<String, Supplier<String>> tooltipMap = new HashMap<>(); + + private static final String BLACK, + DARK_BLUE, + DARK_GREEN, + DARK_AQUA, + DARK_RED, + DARK_PURPLE, + GOLD, + GRAY, + DARK_GRAY, + BLUE, + GREEN, + AQUA, + RED, + LIGHT_PURPLE, + YELLOW, + WHITE, + OBFUSCATED, + BOLD, + STRIKETHROUGH, + UNDERLINE, + ITALIC, + RESET; + + private static final Supplier<String> NEW_LINE; + + /* + * What you can do: + * - Add simple, unformatted text. + * - Add formatted text. + * Note: you can chain formatting codes but the color must be used first: + * e.g. BLACK + ITALIC will create black, italic text but ITALIC + BLACK will only create black text. + * - add animated text + * - chain multiple static and/or animated text together using chain() + * (Although chaining only static text together is pointless, text() is already able to do that) + * - add multiple lines by using NEW_LINE (either as String or as Supplier<String>) + * Note: formatting only applies for one line + * Note: having a NEW_LINE in animated text results in "skipping" of one formatting since NEW_LINE + * counts as character but is not displayed + * + * Note: adding a tooltip to an item multiple times also creates multiple lines (in the same order they were added) + * + * What you cannot do: + * - add a tooltip depending on NBT, tooltips are only mapped to name and meta + * + * This method is executed on postInit + */ + public static void init() { + + // Tooltip tiers for ALL items given the appropriate tier oredict tag. + addOredictTooltip("ULV", text(WHITE + "ULV-Tier")); + addOredictTooltip("LV", text(GRAY + "LV-Tier")); + addOredictTooltip("MV", text(GOLD + "MV-Tier")); + addOredictTooltip("HV", text(YELLOW + "HV-Tier")); + addOredictTooltip("EV", text(DARK_GRAY + "EV-Tier")); + addOredictTooltip("IV", text(GREEN + "IV-Tier")); + addOredictTooltip("LuV", text(LIGHT_PURPLE + "LuV-Tier")); + addOredictTooltip("ZPM", text(AQUA + "ZPM-Tier")); + addOredictTooltip("UV", text(DARK_GREEN + "UV-Tier")); + addOredictTooltip("UHV", text(DARK_RED + "UHV-Tier")); + addOredictTooltip("UEV", text(DARK_PURPLE + "UEV-Tier")); + addOredictTooltip("UIV", text(DARK_BLUE + BOLD + "UIV-Tier")); + addOredictTooltip("UMV", text(RED + BOLD + UNDERLINE + "UMV-Tier")); + addOredictTooltip( + "UXV", animatedText("UXV-Tier", 1, 100, DARK_PURPLE + BOLD + UNDERLINE, DARK_RED + UNDERLINE + BOLD)); + addOredictTooltip( + "MAX", + chain( + animatedText( + "X", + 1, + 100, + LIGHT_PURPLE + BOLD + OBFUSCATED + UNDERLINE, + RED + BOLD + OBFUSCATED + UNDERLINE, + GOLD + OBFUSCATED + BOLD + UNDERLINE, + YELLOW + OBFUSCATED + BOLD + UNDERLINE, + GREEN + OBFUSCATED + BOLD + UNDERLINE, + AQUA + OBFUSCATED + BOLD + UNDERLINE, + BLUE + OBFUSCATED + BOLD + UNDERLINE), + animatedText( + "MAX-Tier", + 1, + 100, + RED + BOLD + UNDERLINE, + GOLD + BOLD + UNDERLINE, + YELLOW + BOLD + UNDERLINE, + GREEN + BOLD + UNDERLINE, + AQUA + BOLD + UNDERLINE, + BLUE + BOLD + UNDERLINE, + LIGHT_PURPLE + BOLD + UNDERLINE), + animatedText( + "X", + 1, + 100, + GOLD + OBFUSCATED + BOLD + UNDERLINE, + YELLOW + OBFUSCATED + BOLD + UNDERLINE, + GREEN + OBFUSCATED + BOLD + UNDERLINE, + AQUA + OBFUSCATED + BOLD + UNDERLINE, + BLUE + OBFUSCATED + BOLD + UNDERLINE, + LIGHT_PURPLE + OBFUSCATED + BOLD + UNDERLINE, + RED + OBFUSCATED + BOLD + UNDERLINE))); + } + + @SubscribeEvent + public void renderTooltip(ItemTooltipEvent event) { + Supplier<String> tooltip = tooltipMap.get(getStackIdentifier(event.itemStack)); + if (tooltip != null) { + String text = tooltip.get(); + if (!text.isEmpty()) { + for (String line : text.split("\n")) { + event.toolTip.add(line); + } + } + } + } + + @SafeVarargs + private static Supplier<String> chain(Supplier<String>... parts) { + return () -> { + String s = ""; + for (Supplier<String> text : parts) { + s += text.get(); + } + return s; + }; + } + + private static Supplier<String> text(String text) { + return () -> text; + } + + /** Taken and adapted from <a href=https://github.com/GTNewHorizons/Avaritia/blob/7b7eaed652f6be320b10f33d8f8e6a04e66ca14f/src/main/java/fox/spiteful/avaritia/LudicrousText.java#L19>Avaritia</a>, licensed under MIT */ + private static Supplier<String> animatedText(String text, int posstep, int delay, String... formattingArray) { + if (text == null || text.isEmpty() || formattingArray == null || formattingArray.length == 0) return () -> ""; + + final int finalDelay = delay = delay <= 0 ? delay = 1 : delay; + + return () -> { + StringBuilder sb = new StringBuilder(text.length() * 3); + int offset = (int) ((System.currentTimeMillis() / finalDelay) % formattingArray.length); + for (int i = 0; i < text.length(); i++) { + char c = text.charAt(i); + int indexColorArray = (i * posstep + formattingArray.length - offset) % formattingArray.length; + sb.append(formattingArray[indexColorArray]); + sb.append(c); + } + return sb.toString(); + }; + } + + private static void addOredictTooltip(String oredictName, Supplier<String> tooltip) { + for (ItemStack item : OreDictionary.getOres(oredictName)) { + addItemTooltip(item, tooltip); + } + } + + private static void addItemTooltip(String modID, String registryName, int meta, Supplier<String> tooltip) { + Item item = GameRegistry.findItem(modID, registryName); + if (item == null || meta < 0 || meta >= OreDictionary.WILDCARD_VALUE || tooltip == null) return; + String identifier = item.getUnlocalizedName() + "@" + meta; + Supplier<String> previous = tooltipMap.get(identifier); + if (previous == null) { + tooltipMap.put(identifier, tooltip); + } else { + tooltipMap.put(identifier, chain(previous, NEW_LINE, tooltip)); + } + } + + private static void addItemTooltip(ItemStack item, Supplier<String> tooltip) { + if (item == null || tooltip == null) return; + String identifier = getStackIdentifier(item); + Supplier<String> previous = tooltipMap.get(identifier); + if (previous == null) { + tooltipMap.put(identifier, tooltip); + } else { + tooltipMap.put(identifier, chain(previous, NEW_LINE, tooltip)); + } + } + + private static String getStackIdentifier(ItemStack stack) { + return stack == null ? "" : stack.getItem().getUnlocalizedName() + "@" + stack.getItemDamage(); + } + + static { + AQUA = EnumChatFormatting.AQUA.toString(); + BLACK = EnumChatFormatting.BLACK.toString(); + BLUE = EnumChatFormatting.BLUE.toString(); + BOLD = EnumChatFormatting.BOLD.toString(); + DARK_AQUA = EnumChatFormatting.DARK_AQUA.toString(); + DARK_BLUE = EnumChatFormatting.DARK_BLUE.toString(); + DARK_GRAY = EnumChatFormatting.DARK_GRAY.toString(); + DARK_GREEN = EnumChatFormatting.DARK_GREEN.toString(); + DARK_PURPLE = EnumChatFormatting.DARK_PURPLE.toString(); + DARK_RED = EnumChatFormatting.DARK_RED.toString(); + GOLD = EnumChatFormatting.GOLD.toString(); + GRAY = EnumChatFormatting.GRAY.toString(); + GREEN = EnumChatFormatting.GREEN.toString(); + ITALIC = EnumChatFormatting.ITALIC.toString(); + LIGHT_PURPLE = EnumChatFormatting.LIGHT_PURPLE.toString(); + OBFUSCATED = EnumChatFormatting.OBFUSCATED.toString(); + RED = EnumChatFormatting.RED.toString(); + RESET = EnumChatFormatting.RESET.toString(); + STRIKETHROUGH = EnumChatFormatting.STRIKETHROUGH.toString(); + UNDERLINE = EnumChatFormatting.UNDERLINE.toString(); + WHITE = EnumChatFormatting.WHITE.toString(); + YELLOW = EnumChatFormatting.YELLOW.toString(); + + NEW_LINE = new Supplier<String>() { + + @Override + public String get() { + return "\n"; + } + + @Override + public String toString() { + return "\n"; + } + }; + } } diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java index be253742e2..15901703af 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -5,6 +5,8 @@ package gregtech.common; +import static org.lwjgl.opengl.GL11.GL_LINE_LOOP; + import codechicken.lib.vec.Rotation; import codechicken.lib.vec.Scale; import codechicken.lib.vec.Transformation; @@ -31,11 +33,11 @@ import gregtech.api.util.ColorsMetadataSection; import gregtech.api.util.ColorsMetadataSectionSerializer; import gregtech.api.util.GT_ClientPreference; import gregtech.api.util.GT_Log; +import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_PlayedSound; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gregtech.api.util.WorldSpawnedEventBuilder; -import gregtech.api.util.GT_ModHandler; import gregtech.common.entities.GT_Entity_Arrow; import gregtech.common.entities.GT_Entity_Arrow_Potion; import gregtech.common.net.MessageUpdateFluidDisplayItem; @@ -44,6 +46,14 @@ import gregtech.common.render.items.GT_MetaGenerated_Item_Renderer; import gregtech.loaders.ExtraIcons; import gregtech.loaders.preload.GT_PreLoad; import ic2.api.tile.IWrenchable; +import java.net.URL; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Scanner; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.GLAllocation; @@ -63,64 +73,65 @@ import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.oredict.OreDictionary; import org.lwjgl.opengl.GL11; -import java.net.URL; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Scanner; - -import static org.lwjgl.opengl.GL11.GL_LINE_LOOP; - // Referenced classes of package gregtech.common: // GT_Proxy -public class GT_Client extends GT_Proxy - implements Runnable { +public class GT_Client extends GT_Proxy implements Runnable { - public static final String GTNH_CAPE_LIST_URL = "https://raw.githubusercontent.com/GTNewHorizons/CustomGTCapeHook-Cape-List/master/capes.txt"; - public static final String GT_CAPE_LIST_URL = "http://gregtech.overminddl1.com/com/gregoriust/gregtech/supporterlist.txt"; + public static final String GTNH_CAPE_LIST_URL = + "https://raw.githubusercontent.com/GTNewHorizons/CustomGTCapeHook-Cape-List/master/capes.txt"; + public static final String GT_CAPE_LIST_URL = + "http://gregtech.overminddl1.com/com/gregoriust/gregtech/supporterlist.txt"; private static final List<Block> ROTATABLE_VANILLA_BLOCKS; - private static final int[][] GRID_SWITCH_TABLE = new int[][]{ - {0, 5, 3, 1, 2, 4}, - {5, 0, 1, 3, 2, 4}, - {1, 3, 0, 5, 2, 4}, - {3, 1, 5, 0, 2, 4}, - {4, 2, 3, 1, 0, 5}, - {2, 4, 3, 1, 5, 0}, + private static final int[][] GRID_SWITCH_TABLE = new int[][] { + {0, 5, 3, 1, 2, 4}, + {5, 0, 1, 3, 2, 4}, + {1, 3, 0, 5, 2, 4}, + {3, 1, 5, 0, 2, 4}, + {4, 2, 3, 1, 0, 5}, + {2, 4, 3, 1, 5, 0}, }; // don't ask. these "just works" private static final Transformation ROTATION_MARKER_TRANSFORM_CENTER = new Scale(0.5); private static final Transformation[] ROTATION_MARKER_TRANSFORMS_SIDES_TRANSFORMS = { - new Scale(0.25).with(new Translation(0, 0, 0.375)).compile(), - new Scale(0.25).with(new Translation(0.375, 0, 0)).compile(), - new Scale(0.25).with(new Translation(0, 0, -0.375)).compile(), - new Scale(0.25).with(new Translation(-0.375, 0, 0)).compile(), + new Scale(0.25).with(new Translation(0, 0, 0.375)).compile(), + new Scale(0.25).with(new Translation(0.375, 0, 0)).compile(), + new Scale(0.25).with(new Translation(0, 0, -0.375)).compile(), + new Scale(0.25).with(new Translation(-0.375, 0, 0)).compile(), }; private static final int[] ROTATION_MARKER_TRANSFORMS_SIDES = { - -1, -1, 2, 0, 3, 1, - -1, -1, 0, 2, 3, 1, - 0, 2, -1, -1, 3, 1, - 2, 0, -1, -1, 3, 1, - 1, 3, 2, 0, -1, -1, - 3, 1, 2, 0, -1, -1 + -1, -1, 2, 0, 3, 1, + -1, -1, 0, 2, 3, 1, + 0, 2, -1, -1, 3, 1, + 2, 0, -1, -1, 3, 1, + 1, 3, 2, 0, -1, -1, + 3, 1, 2, 0, -1, -1 }; private static final Transformation[] ROTATION_MARKER_TRANSFORMS_CORNER = { - new Scale(0.25).with(new Translation(0.375, 0, 0.375)).compile(), - new Scale(0.25).with(new Translation(-0.375, 0, 0.375)).compile(), - new Scale(0.25).with(new Translation(0.375, 0, -0.375)).compile(), - new Scale(0.25).with(new Translation(-0.375, 0, -0.375)).compile(), + new Scale(0.25).with(new Translation(0.375, 0, 0.375)).compile(), + new Scale(0.25).with(new Translation(-0.375, 0, 0.375)).compile(), + new Scale(0.25).with(new Translation(0.375, 0, -0.375)).compile(), + new Scale(0.25).with(new Translation(-0.375, 0, -0.375)).compile(), }; private static int rotationMarkerDisplayList; private static boolean rotationMarkerDisplayListCompiled = false; static { - ROTATABLE_VANILLA_BLOCKS = Arrays.asList(Blocks.piston, Blocks.sticky_piston, Blocks.furnace, Blocks.lit_furnace, Blocks.dropper, Blocks.dispenser, Blocks.chest, Blocks.trapped_chest, Blocks.ender_chest, Blocks.hopper, - Blocks.pumpkin, Blocks.lit_pumpkin); + ROTATABLE_VANILLA_BLOCKS = Arrays.asList( + Blocks.piston, + Blocks.sticky_piston, + Blocks.furnace, + Blocks.lit_furnace, + Blocks.dropper, + Blocks.dispenser, + Blocks.chest, + Blocks.trapped_chest, + Blocks.ender_chest, + Blocks.hopper, + Blocks.pumpkin, + Blocks.lit_pumpkin); } private final HashSet<String> mCapeList = new HashSet<>(); @@ -147,6 +158,7 @@ public class GT_Client extends GT_Proxy * This is the place to def the value used below **/ private long afterSomeTime; + private boolean mAnimationDirection; private int mLastUpdatedBlockX; private int mLastUpdatedBlockY; @@ -160,38 +172,134 @@ public class GT_Client extends GT_Proxy mCapeRenderer = new GT_CapeRenderer(mCapeList); mAnimationTick = 0L; mAnimationDirection = false; - mPosR = Arrays.asList(Materials.Enderium, Materials.Vinteum, Materials.Uranium235, Materials.InfusedGold, Materials.Plutonium241, Materials.NaquadahEnriched, Materials.Naquadria, Materials.InfusedOrder, Materials.Force, - Materials.Pyrotheum, Materials.Sunnarium, Materials.Glowstone, Materials.Thaumium, Materials.InfusedVis, Materials.InfusedAir, Materials.InfusedFire, Materials.FierySteel, Materials.Firestone); - mPosG = Arrays.asList(Materials.Enderium, Materials.Vinteum, Materials.Uranium235, Materials.InfusedGold, Materials.Plutonium241, Materials.NaquadahEnriched, Materials.Naquadria, Materials.InfusedOrder, Materials.Force, - Materials.Pyrotheum, Materials.Sunnarium, Materials.Glowstone, Materials.InfusedAir, Materials.InfusedEarth); - mPosB = Arrays.asList(Materials.Enderium, Materials.Vinteum, Materials.Uranium235, Materials.InfusedGold, Materials.Plutonium241, Materials.NaquadahEnriched, Materials.Naquadria, Materials.InfusedOrder, Materials.InfusedVis, - Materials.InfusedWater, Materials.Thaumium); + mPosR = Arrays.asList( + Materials.Enderium, + Materials.Vinteum, + Materials.Uranium235, + Materials.InfusedGold, + Materials.Plutonium241, + Materials.NaquadahEnriched, + Materials.Naquadria, + Materials.InfusedOrder, + Materials.Force, + Materials.Pyrotheum, + Materials.Sunnarium, + Materials.Glowstone, + Materials.Thaumium, + Materials.InfusedVis, + Materials.InfusedAir, + Materials.InfusedFire, + Materials.FierySteel, + Materials.Firestone); + mPosG = Arrays.asList( + Materials.Enderium, + Materials.Vinteum, + Materials.Uranium235, + Materials.InfusedGold, + Materials.Plutonium241, + Materials.NaquadahEnriched, + Materials.Naquadria, + Materials.InfusedOrder, + Materials.Force, + Materials.Pyrotheum, + Materials.Sunnarium, + Materials.Glowstone, + Materials.InfusedAir, + Materials.InfusedEarth); + mPosB = Arrays.asList( + Materials.Enderium, + Materials.Vinteum, + Materials.Uranium235, + Materials.InfusedGold, + Materials.Plutonium241, + Materials.NaquadahEnriched, + Materials.Naquadria, + Materials.InfusedOrder, + Materials.InfusedVis, + Materials.InfusedWater, + Materials.Thaumium); mNegR = Arrays.asList(Materials.InfusedEntropy, Materials.NetherStar); mNegG = Arrays.asList(Materials.InfusedEntropy, Materials.NetherStar); mNegB = Arrays.asList(Materials.InfusedEntropy, Materials.NetherStar); - mMoltenPosR = Arrays.asList(Materials.Enderium, Materials.NetherStar, Materials.Vinteum, Materials.Uranium235, Materials.InfusedGold, Materials.Plutonium241, Materials.NaquadahEnriched, Materials.Naquadria, Materials.InfusedOrder, Materials.Force, - Materials.Pyrotheum, Materials.Sunnarium, Materials.Glowstone, Materials.Thaumium, Materials.InfusedVis, Materials.InfusedAir, Materials.InfusedFire, Materials.FierySteel, Materials.Firestone); - mMoltenPosG = Arrays.asList(Materials.Enderium, Materials.NetherStar, Materials.Vinteum, Materials.Uranium235, Materials.InfusedGold, Materials.Plutonium241, Materials.NaquadahEnriched, Materials.Naquadria, Materials.InfusedOrder, Materials.Force, - Materials.Pyrotheum, Materials.Sunnarium, Materials.Glowstone, Materials.InfusedAir, Materials.InfusedEarth); - mMoltenPosB = Arrays.asList(Materials.Enderium, Materials.NetherStar, Materials.Vinteum, Materials.Uranium235, Materials.InfusedGold, Materials.Plutonium241, Materials.NaquadahEnriched, Materials.Naquadria, Materials.InfusedOrder, Materials.InfusedVis, - Materials.InfusedWater, Materials.Thaumium); + mMoltenPosR = Arrays.asList( + Materials.Enderium, + Materials.NetherStar, + Materials.Vinteum, + Materials.Uranium235, + Materials.InfusedGold, + Materials.Plutonium241, + Materials.NaquadahEnriched, + Materials.Naquadria, + Materials.InfusedOrder, + Materials.Force, + Materials.Pyrotheum, + Materials.Sunnarium, + Materials.Glowstone, + Materials.Thaumium, + Materials.InfusedVis, + Materials.InfusedAir, + Materials.InfusedFire, + Materials.FierySteel, + Materials.Firestone); + mMoltenPosG = Arrays.asList( + Materials.Enderium, + Materials.NetherStar, + Materials.Vinteum, + Materials.Uranium235, + Materials.InfusedGold, + Materials.Plutonium241, + Materials.NaquadahEnriched, + Materials.Naquadria, + Materials.InfusedOrder, + Materials.Force, + Materials.Pyrotheum, + Materials.Sunnarium, + Materials.Glowstone, + Materials.InfusedAir, + Materials.InfusedEarth); + mMoltenPosB = Arrays.asList( + Materials.Enderium, + Materials.NetherStar, + Materials.Vinteum, + Materials.Uranium235, + Materials.InfusedGold, + Materials.Plutonium241, + Materials.NaquadahEnriched, + Materials.Naquadria, + Materials.InfusedOrder, + Materials.InfusedVis, + Materials.InfusedWater, + Materials.Thaumium); mMoltenNegR = Collections.singletonList(Materials.InfusedEntropy); mMoltenNegG = Collections.singletonList(Materials.InfusedEntropy); mMoltenNegB = Collections.singletonList(Materials.InfusedEntropy); } - private static boolean checkedForChicken = false; - private static void drawGrid(DrawBlockHighlightEvent aEvent, boolean showCoverConnections, boolean aIsWrench, boolean aIsSneaking) { + private static void drawGrid( + DrawBlockHighlightEvent aEvent, boolean showCoverConnections, boolean aIsWrench, boolean aIsSneaking) { if (!checkedForChicken) { - try {Class.forName("codechicken.lib.vec.Rotation");} catch (ClassNotFoundException e) {return;} + try { + Class.forName("codechicken.lib.vec.Rotation"); + } catch (ClassNotFoundException e) { + return; + } checkedForChicken = true; } GL11.glPushMatrix(); - GL11.glTranslated(-(aEvent.player.lastTickPosX + (aEvent.player.posX - aEvent.player.lastTickPosX) * (double) aEvent.partialTicks), -(aEvent.player.lastTickPosY + (aEvent.player.posY - aEvent.player.lastTickPosY) * (double) aEvent.partialTicks), -(aEvent.player.lastTickPosZ + (aEvent.player.posZ - aEvent.player.lastTickPosZ) * (double) aEvent.partialTicks)); - GL11.glTranslated((float) aEvent.target.blockX + 0.5F, (float) aEvent.target.blockY + 0.5F, (float) aEvent.target.blockZ + 0.5F); + GL11.glTranslated( + -(aEvent.player.lastTickPosX + + (aEvent.player.posX - aEvent.player.lastTickPosX) * (double) aEvent.partialTicks), + -(aEvent.player.lastTickPosY + + (aEvent.player.posY - aEvent.player.lastTickPosY) * (double) aEvent.partialTicks), + -(aEvent.player.lastTickPosZ + + (aEvent.player.posZ - aEvent.player.lastTickPosZ) * (double) aEvent.partialTicks)); + GL11.glTranslated( + (float) aEvent.target.blockX + 0.5F, + (float) aEvent.target.blockY + 0.5F, + (float) aEvent.target.blockZ + 0.5F); final int tSideHit = aEvent.target.sideHit; Rotation.sideRotations[tSideHit].glApply(); // draw grid @@ -207,18 +315,17 @@ public class GT_Client extends GT_Proxy GL11.glVertex3d(+.25D, .0D, +.50D); GL11.glVertex3d(-.25D, .0D, -.50D); GL11.glVertex3d(-.25D, .0D, +.50D); - final TileEntity tTile = aEvent.player.worldObj.getTileEntity(aEvent.target.blockX, aEvent.target.blockY, aEvent.target.blockZ); + final TileEntity tTile = + aEvent.player.worldObj.getTileEntity(aEvent.target.blockX, aEvent.target.blockY, aEvent.target.blockZ); // draw connection indicators byte tConnections = 0; if (tTile instanceof ICoverable) { if (showCoverConnections) { for (byte i = 0; i < 6; i++) { - if (((ICoverable) tTile).getCoverIDAtSide(i) > 0) - tConnections = (byte) (tConnections + (1 << i)); + if (((ICoverable) tTile).getCoverIDAtSide(i) > 0) tConnections = (byte) (tConnections + (1 << i)); } - } else if (tTile instanceof BaseMetaPipeEntity) - tConnections = ((BaseMetaPipeEntity) tTile).mConnections; + } else if (tTile instanceof BaseMetaPipeEntity) tConnections = ((BaseMetaPipeEntity) tTile).mConnections; } if (tConnections > 0) { @@ -280,7 +387,7 @@ public class GT_Client extends GT_Proxy GL11.glEnd(); // draw turning indicator if (aIsWrench && tTile instanceof IAlignmentProvider) { - final IAlignment tAlignment = ((IAlignmentProvider)(tTile)).getAlignment(); + final IAlignment tAlignment = ((IAlignmentProvider) (tTile)).getAlignment(); if (tAlignment != null) { final ForgeDirection direction = tAlignment.getDirection(); if (direction.ordinal() == tSideHit) @@ -290,7 +397,11 @@ public class GT_Client extends GT_Proxy drawExtendedRotationMarker(t, aIsSneaking, true); } } else { - drawExtendedRotationMarker(ROTATION_MARKER_TRANSFORMS_SIDES_TRANSFORMS[ROTATION_MARKER_TRANSFORMS_SIDES[tSideHit * 6 + direction.ordinal()]], aIsSneaking, true); + drawExtendedRotationMarker( + ROTATION_MARKER_TRANSFORMS_SIDES_TRANSFORMS[ + ROTATION_MARKER_TRANSFORMS_SIDES[tSideHit * 6 + direction.ordinal()]], + aIsSneaking, + true); } } } @@ -298,10 +409,8 @@ public class GT_Client extends GT_Proxy } private static void drawExtendedRotationMarker(Transformation transform, boolean sneaking, boolean small) { - if (sneaking) - drawFlipMarker(transform); - else - drawRotationMarker(transform); + if (sneaking) drawFlipMarker(transform); + else drawRotationMarker(transform); } private static void drawRotationMarker(Transformation transform) { @@ -320,10 +429,16 @@ public class GT_Client extends GT_Proxy GL11.glNewList(displayList, GL11.GL_COMPILE); GL11.glBegin(GL_LINE_LOOP); for (int i = 0; i <= ROTATION_MARKER_RESOLUTION; i++) { - GL11.glVertex3d(Math.cos(i * Math.PI * 1.75 / ROTATION_MARKER_RESOLUTION) * 0.4, 0, Math.sin(i * Math.PI * 1.75 / ROTATION_MARKER_RESOLUTION) * 0.4); + GL11.glVertex3d( + Math.cos(i * Math.PI * 1.75 / ROTATION_MARKER_RESOLUTION) * 0.4, + 0, + Math.sin(i * Math.PI * 1.75 / ROTATION_MARKER_RESOLUTION) * 0.4); } - for (int i = ROTATION_MARKER_RESOLUTION; i >=0; i--) { - GL11.glVertex3d(Math.cos(i * Math.PI * 1.75 / ROTATION_MARKER_RESOLUTION) * 0.24, 0, Math.sin(i * Math.PI * 1.75 / ROTATION_MARKER_RESOLUTION) * 0.24); + for (int i = ROTATION_MARKER_RESOLUTION; i >= 0; i--) { + GL11.glVertex3d( + Math.cos(i * Math.PI * 1.75 / ROTATION_MARKER_RESOLUTION) * 0.24, + 0, + Math.sin(i * Math.PI * 1.75 / ROTATION_MARKER_RESOLUTION) * 0.24); } GL11.glVertex3d(0.141114561800, 0, 0); GL11.glVertex3d(0.32, 0, -0.178885438199); @@ -403,22 +518,36 @@ public class GT_Client extends GT_Proxy super.onPreLoad(); MinecraftForge.EVENT_BUS.register(new ExtraIcons()); - Minecraft.getMinecraft().getResourcePackRepository().rprMetadataSerializer.registerMetadataSectionType(new ColorsMetadataSectionSerializer(), ColorsMetadataSection.class); + Minecraft.getMinecraft() + .getResourcePackRepository() + .rprMetadataSerializer + .registerMetadataSectionType(new ColorsMetadataSectionSerializer(), ColorsMetadataSection.class); final String[] arr = { - "renadi", "hanakocz", "MysteryDump", "Flaver4", "x_Fame", "Peluche321", "Goshen_Ithilien", "manf", "Bimgo", "leagris", - "IAmMinecrafter02", "Cerous", "Devilin_Pixy", "Bkarlsson87", "BadAlchemy", "CaballoCraft", "melanclock", "Resursator", "demanzke", "AndrewAmmerlaan", - "Deathlycraft", "Jirajha", "Axlegear", "kei_kouma", "Dracion", "dungi", "Dorfschwein", "Zero Tw0", "mattiagraz85", "sebastiank30", - "Plem", "invultri", "grillo126", "malcanteth", "Malevolence_", "Nicholas_Manuel", "Sirbab", "kehaan", "bpgames123", "semig0d", - "9000bowser", "Sovereignty89", "Kris1432", "xander_cage_", "samuraijp", "bsaa", "SpwnX", "tworf", "Kadah", "kanni", - "Stute", "Hegik", "Onlyme", "t3hero", "Hotchi", "jagoly", "Nullav", "BH5432", "Sibmer", "inceee", - "foxxx0", "Hartok", "TMSama", "Shlnen", "Carsso", "zessirb", "meep310", "Seldron", "yttr1um", "hohounk", - "freebug", "Sylphio", "jmarler", "Saberawr", "r00teniy", "Neonbeta", "yinscape", "voooon24", "Quintine", "peach774", - "lepthymo", "bildeman", "Kremnari", "Aerosalo", "OndraSter", "oscares91", "mr10movie", "Daxx367x2", "EGERTRONx", "aka13_404", - "Abouttabs", "Johnstaal", "djshiny99", "megatronp", "DZCreeper", "Kane_Hart", "Truculent", "vidplace7", "simon6689", "MomoNasty", - "UnknownXLV", "goreacraft", "Fluttermine", "Daddy_Cecil", "MrMaleficus", "TigersFangs", "cublikefoot", "chainman564", "NikitaBuker", "Misha999777", - "25FiveDetail", "AntiCivilBoy", "michaelbrady", "xXxIceFirexXx", "Speedynutty68", "GarretSidzaka", "HallowCharm977", "mastermind1919", "The_Hypersonic", "diamondguy2798", - "zF4ll3nPr3d4t0r", "CrafterOfMines57", "XxELIT3xSNIP3RxX", "SuterusuKusanagi", "xavier0014", "adamros", "alexbegt" + "renadi", "hanakocz", "MysteryDump", "Flaver4", "x_Fame", "Peluche321", "Goshen_Ithilien", "manf", "Bimgo", + "leagris", + "IAmMinecrafter02", "Cerous", "Devilin_Pixy", "Bkarlsson87", "BadAlchemy", "CaballoCraft", "melanclock", + "Resursator", "demanzke", "AndrewAmmerlaan", + "Deathlycraft", "Jirajha", "Axlegear", "kei_kouma", "Dracion", "dungi", "Dorfschwein", "Zero Tw0", + "mattiagraz85", "sebastiank30", + "Plem", "invultri", "grillo126", "malcanteth", "Malevolence_", "Nicholas_Manuel", "Sirbab", "kehaan", + "bpgames123", "semig0d", + "9000bowser", "Sovereignty89", "Kris1432", "xander_cage_", "samuraijp", "bsaa", "SpwnX", "tworf", "Kadah", + "kanni", + "Stute", "Hegik", "Onlyme", "t3hero", "Hotchi", "jagoly", "Nullav", "BH5432", "Sibmer", "inceee", + "foxxx0", "Hartok", "TMSama", "Shlnen", "Carsso", "zessirb", "meep310", "Seldron", "yttr1um", "hohounk", + "freebug", "Sylphio", "jmarler", "Saberawr", "r00teniy", "Neonbeta", "yinscape", "voooon24", "Quintine", + "peach774", + "lepthymo", "bildeman", "Kremnari", "Aerosalo", "OndraSter", "oscares91", "mr10movie", "Daxx367x2", + "EGERTRONx", "aka13_404", + "Abouttabs", "Johnstaal", "djshiny99", "megatronp", "DZCreeper", "Kane_Hart", "Truculent", "vidplace7", + "simon6689", "MomoNasty", + "UnknownXLV", "goreacraft", "Fluttermine", "Daddy_Cecil", "MrMaleficus", "TigersFangs", "cublikefoot", + "chainman564", "NikitaBuker", "Misha999777", + "25FiveDetail", "AntiCivilBoy", "michaelbrady", "xXxIceFirexXx", "Speedynutty68", "GarretSidzaka", + "HallowCharm977", "mastermind1919", "The_Hypersonic", "diamondguy2798", + "zF4ll3nPr3d4t0r", "CrafterOfMines57", "XxELIT3xSNIP3RxX", "SuterusuKusanagi", "xavier0014", "adamros", + "alexbegt" }; for (String tName : arr) { mCapeList.add(tName.toLowerCase()); @@ -449,12 +578,11 @@ public class GT_Client extends GT_Proxy try { for (int i = 1; i < GregTech_API.METATILEENTITIES.length; i++) { try { - if (GregTech_API.METATILEENTITIES[i] != null) { + if (GregTech_API.METATILEENTITIES[i] != null) { GregTech_API.METATILEENTITIES[i].getStackForm(1L).getTooltip(null, true); GT_Log.out.println("META " + i + " " + GregTech_API.METATILEENTITIES[i].getMetaName()); } - } - catch (Throwable e) { + } catch (Throwable e) { e.printStackTrace(GT_Log.err); } } @@ -463,10 +591,9 @@ public class GT_Client extends GT_Proxy } if (Loader.isModLoaded("Avaritia")) { - CosmicItemRendererGT.registerItemWithMeta(Item.getItemFromBlock( GregTech_API.sBlockCasings5), 14); + CosmicItemRendererGT.registerItemWithMeta(Item.getItemFromBlock(GregTech_API.sBlockCasings5), 14); CosmicItemRendererGT.init(); } - } @Override @@ -520,13 +647,38 @@ public class GT_Client extends GT_Proxy mFirstTick = false; GT_Values.NW.sendToServer(new GT_Packet_ClientPreference(mPreference)); - if(!Minecraft.getMinecraft().isSingleplayer()) { - //Check for more IC2 recipes to also catch MineTweaker additions - GT_ModHandler.addIC2RecipesToGT(GT_ModHandler.getMaceratorRecipeList(), GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, true, true, true); - GT_ModHandler.addIC2RecipesToGT(GT_ModHandler.getCompressorRecipeList(), GT_Recipe.GT_Recipe_Map.sCompressorRecipes, true, true, true); - GT_ModHandler.addIC2RecipesToGT(GT_ModHandler.getExtractorRecipeList(), GT_Recipe.GT_Recipe_Map.sExtractorRecipes, true, true, true); - GT_ModHandler.addIC2RecipesToGT(GT_ModHandler.getOreWashingRecipeList(), GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, false, true, true); - GT_ModHandler.addIC2RecipesToGT(GT_ModHandler.getThermalCentrifugeRecipeList(), GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, true, true, true); + if (!Minecraft.getMinecraft().isSingleplayer()) { + // Check for more IC2 recipes to also catch MineTweaker additions + GT_ModHandler.addIC2RecipesToGT( + GT_ModHandler.getMaceratorRecipeList(), + GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, + true, + true, + true); + GT_ModHandler.addIC2RecipesToGT( + GT_ModHandler.getCompressorRecipeList(), + GT_Recipe.GT_Recipe_Map.sCompressorRecipes, + true, + true, + true); + GT_ModHandler.addIC2RecipesToGT( + GT_ModHandler.getExtractorRecipeList(), + GT_Recipe.GT_Recipe_Map.sExtractorRecipes, + true, + true, + true); + GT_ModHandler.addIC2RecipesToGT( + GT_ModHandler.getOreWashingRecipeList(), + GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, + false, + true, + true); + GT_ModHandler.addIC2RecipesToGT( + GT_ModHandler.getThermalCentrifugeRecipeList(), + GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, + true, + true, + true); } } afterSomeTime++; @@ -535,12 +687,16 @@ public class GT_Client extends GT_Proxy StatFileWriter sfw = Minecraft.getMinecraft().thePlayer.getStatFileWriter(); try { for (GT_Recipe recipe : GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList) { - recipe.mHidden = GT_Values.hideAssLineRecipes && !sfw.hasAchievementUnlocked(GT_Mod.achievements.getAchievement(recipe.getOutput(0).getUnlocalizedName())); + recipe.mHidden = GT_Values.hideAssLineRecipes + && !sfw.hasAchievementUnlocked(GT_Mod.achievements.getAchievement( + recipe.getOutput(0).getUnlocalizedName())); } } catch (Exception ignored) { } } - for (Iterator<Map.Entry<GT_PlayedSound, Integer>> iterator = GT_Utility.sPlayedSoundMap.entrySet().iterator(); iterator.hasNext(); ) { + for (Iterator<Map.Entry<GT_PlayedSound, Integer>> iterator = + GT_Utility.sPlayedSoundMap.entrySet().iterator(); + iterator.hasNext(); ) { Map.Entry<GT_PlayedSound, Integer> tEntry = iterator.next(); if (tEntry.getValue() < 0) { iterator.remove(); @@ -551,18 +707,22 @@ public class GT_Client extends GT_Proxy if (!GregTech_API.mServerStarted) GregTech_API.mServerStarted = true; if (GT_Values.updateFluidDisplayItems) { final MovingObjectPosition trace = Minecraft.getMinecraft().objectMouseOver; - if (trace != null && trace.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && - (mLastUpdatedBlockX != trace.blockX && - mLastUpdatedBlockY != trace.blockY && - mLastUpdatedBlockZ != trace.blockZ || afterSomeTime % 10 == 0)) { + if (trace != null + && trace.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK + && (mLastUpdatedBlockX != trace.blockX + && mLastUpdatedBlockY != trace.blockY + && mLastUpdatedBlockZ != trace.blockZ + || afterSomeTime % 10 == 0)) { mLastUpdatedBlockX = trace.blockX; mLastUpdatedBlockY = trace.blockY; mLastUpdatedBlockZ = trace.blockZ; - final TileEntity tileEntity = aEvent.player.worldObj.getTileEntity(trace.blockX, trace.blockY, trace.blockZ); + final TileEntity tileEntity = + aEvent.player.worldObj.getTileEntity(trace.blockX, trace.blockY, trace.blockZ); if (tileEntity instanceof IGregTechTileEntity) { final IGregTechTileEntity gtTile = (IGregTechTileEntity) tileEntity; if (gtTile.getMetaTileEntity() instanceof IHasFluidDisplayItem) { - GT_Values.NW.sendToServer(new MessageUpdateFluidDisplayItem(trace.blockX, trace.blockY, trace.blockZ, gtTile.getWorld().provider.dimensionId)); + GT_Values.NW.sendToServer(new MessageUpdateFluidDisplayItem( + trace.blockX, trace.blockY, trace.blockZ, gtTile.getWorld().provider.dimensionId)); } } } @@ -577,35 +737,36 @@ public class GT_Client extends GT_Proxy // refresh client preference and send to server, since it's the only config we allow changing at runtime. mPreference = new GT_ClientPreference(GregTech_API.sClientDataFile); GT_PreLoad.loadClientConfig(); - if (e.isWorldRunning) - GT_Values.NW.sendToServer(new GT_Packet_ClientPreference(mPreference)); + if (e.isWorldRunning) GT_Values.NW.sendToServer(new GT_Packet_ClientPreference(mPreference)); } } @SubscribeEvent public void onDrawBlockHighlight(DrawBlockHighlightEvent aEvent) { - final Block aBlock = aEvent.player.worldObj.getBlock(aEvent.target.blockX, aEvent.target.blockY, aEvent.target.blockZ); - final TileEntity aTileEntity = aEvent.player.worldObj.getTileEntity(aEvent.target.blockX, aEvent.target.blockY, aEvent.target.blockZ); + final Block aBlock = + aEvent.player.worldObj.getBlock(aEvent.target.blockX, aEvent.target.blockY, aEvent.target.blockZ); + final TileEntity aTileEntity = + aEvent.player.worldObj.getTileEntity(aEvent.target.blockX, aEvent.target.blockY, aEvent.target.blockZ); if (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sWrenchList)) { - if (aTileEntity instanceof ITurnable || ROTATABLE_VANILLA_BLOCKS.contains(aBlock) || aTileEntity instanceof IWrenchable) - drawGrid(aEvent, false, true, aEvent.player.isSneaking()); + if (aTileEntity instanceof ITurnable + || ROTATABLE_VANILLA_BLOCKS.contains(aBlock) + || aTileEntity instanceof IWrenchable) drawGrid(aEvent, false, true, aEvent.player.isSneaking()); return; } - if (!(aTileEntity instanceof ICoverable)) - return; + if (!(aTileEntity instanceof ICoverable)) return; - if (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sWireCutterList) || - GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sSolderingToolList)) { + if (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sWireCutterList) + || GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sSolderingToolList)) { if (((ICoverable) aTileEntity).getCoverIDAtSide((byte) aEvent.target.sideHit) == 0) drawGrid(aEvent, false, false, aEvent.player.isSneaking()); return; } - if ((aEvent.currentItem == null && aEvent.player.isSneaking()) || - GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sCrowbarList) || - GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sScrewdriverList)) { + if ((aEvent.currentItem == null && aEvent.player.isSneaking()) + || GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sCrowbarList) + || GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sScrewdriverList)) { if (((ICoverable) aTileEntity).getCoverIDAtSide((byte) aEvent.target.sideHit) == 0) for (byte i = 0; i < 6; i++) if (((ICoverable) aTileEntity).getCoverIDAtSide(i) > 0) { @@ -710,7 +871,6 @@ public class GT_Client extends GT_Proxy for (Materials tMaterial : mMoltenNegA) { tMaterial.mMoltenRGBa[3] = getSafeRGBValue(tMaterial.mMoltenRGBa[3], -tDirection); } - } } @@ -723,14 +883,12 @@ public class GT_Client extends GT_Proxy @Override public void doSonictronSound(ItemStack aStack, World aWorld, double aX, double aY, double aZ) { - if (GT_Utility.isStackInvalid(aStack)) - return; + if (GT_Utility.isStackInvalid(aStack)) return; String tString = SoundResource.NOTE_HARP.toString(); int i = 0; int j = mSoundItems.size(); do { - if (i >= j) - break; + if (i >= j) break; if (GT_Utility.areStacksEqual(mSoundItems.get(i), aStack)) { tString = mSoundNames.get(i); break; @@ -738,10 +896,8 @@ public class GT_Client extends GT_Proxy i++; } while (true); if (tString.startsWith(SoundResource.RANDOM_EXPLODE.toString())) - if (aStack.stackSize == 3) - tString = SoundResource.RANDOM_FUSE.toString(); - else if (aStack.stackSize == 2) - tString = "random.old_explode"; + if (aStack.stackSize == 3) tString = SoundResource.RANDOM_FUSE.toString(); + else if (aStack.stackSize == 2) tString = "random.old_explode"; if (tString.startsWith("streaming.")) switch (aStack.stackSize) { case 1: // '\001' @@ -804,7 +960,10 @@ public class GT_Client extends GT_Proxy } else { new WorldSpawnedEventBuilder.SoundEventBuilder() .setVolume(3f) - .setPitch(tString.startsWith("note.") ? (float) Math.pow(2D, (double) (aStack.stackSize - 13) / 12D) : 1.0F) + .setPitch( + tString.startsWith("note.") + ? (float) Math.pow(2D, (double) (aStack.stackSize - 13) / 12D) + : 1.0F) .setIdentifier(tString) .setPosition(aX, aY, aZ) .run(); diff --git a/src/main/java/gregtech/common/GT_DummyWorld.java b/src/main/java/gregtech/common/GT_DummyWorld.java index 756e35863f..cfc89c9df6 100644 --- a/src/main/java/gregtech/common/GT_DummyWorld.java +++ b/src/main/java/gregtech/common/GT_DummyWorld.java @@ -1,5 +1,6 @@ package gregtech.common; +import java.io.File; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; @@ -16,67 +17,69 @@ import net.minecraft.world.storage.IPlayerFileData; import net.minecraft.world.storage.ISaveHandler; import net.minecraft.world.storage.WorldInfo; -import java.io.File; - public class GT_DummyWorld extends World { public GT_IteratorRandom mRandom = new GT_IteratorRandom(); public ItemStack mLastSetBlock = null; - public GT_DummyWorld(ISaveHandler saveHandler, String name, WorldProvider worldProvider, WorldSettings worldSettings, Profiler profiler) { + public GT_DummyWorld( + ISaveHandler saveHandler, + String name, + WorldProvider worldProvider, + WorldSettings worldSettings, + Profiler profiler) { super(saveHandler, name, worldSettings, worldProvider, profiler); this.rand = this.mRandom; } public GT_DummyWorld() { - this(new ISaveHandler() { - @Override - public void saveWorldInfoWithPlayer(WorldInfo worldInfo, NBTTagCompound nbtTagCompound) { - } - - @Override - public void saveWorldInfo(WorldInfo worldInfo) { - } - - @Override - public WorldInfo loadWorldInfo() { - return null; - } - - @Override - public IPlayerFileData getSaveHandler() { - return null; - } - - @Override - public File getMapFileFromName(String mapName) { - return null; - } - - @Override - public IChunkLoader getChunkLoader(WorldProvider worldProvider) { - return null; - } - - @Override - public void flush() { - } - - @Override - public void checkSessionLock() { - } - - @Override - public String getWorldDirectoryName() { - return null; - } - - @Override - public File getWorldDirectory() { - return null; - } - }, "DUMMY_DIMENSION", null, - - new WorldSettings(new WorldInfo(new NBTTagCompound())), new Profiler()); + this( + new ISaveHandler() { + @Override + public void saveWorldInfoWithPlayer(WorldInfo worldInfo, NBTTagCompound nbtTagCompound) {} + + @Override + public void saveWorldInfo(WorldInfo worldInfo) {} + + @Override + public WorldInfo loadWorldInfo() { + return null; + } + + @Override + public IPlayerFileData getSaveHandler() { + return null; + } + + @Override + public File getMapFileFromName(String mapName) { + return null; + } + + @Override + public IChunkLoader getChunkLoader(WorldProvider worldProvider) { + return null; + } + + @Override + public void flush() {} + + @Override + public void checkSessionLock() {} + + @Override + public String getWorldDirectoryName() { + return null; + } + + @Override + public File getWorldDirectory() { + return null; + } + }, + "DUMMY_DIMENSION", + null, + new WorldSettings(new WorldInfo(new NBTTagCompound())), + new Profiler()); } @Override diff --git a/src/main/java/gregtech/common/GT_Network.java b/src/main/java/gregtech/common/GT_Network.java index 8db38d86f7..39f50a9e04 100644 --- a/src/main/java/gregtech/common/GT_Network.java +++ b/src/main/java/gregtech/common/GT_Network.java @@ -1,5 +1,7 @@ package gregtech.common; +import static gregtech.GT_Mod.GT_FML_LOGGER; + import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteStreams; import cpw.mods.fml.common.network.FMLEmbeddedChannel; @@ -18,16 +20,13 @@ import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.SimpleChannelInboundHandler; import io.netty.handler.codec.MessageToMessageCodec; +import java.util.EnumMap; +import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.world.World; import net.minecraft.world.chunk.Chunk; -import java.util.EnumMap; -import java.util.List; - -import static gregtech.GT_Mod.GT_FML_LOGGER; - @ChannelHandler.Sharable @SuppressWarnings("deprecation") public class GT_Network extends MessageToMessageCodec<FMLProxyPacket, GT_Packet> implements IGT_NetworkHandler { @@ -35,49 +34,49 @@ public class GT_Network extends MessageToMessageCodec<FMLProxyPacket, GT_Packet> private final GT_Packet[] mSubChannels; public GT_Network() { - this("GregTech", - new GT_Packet_TileEntity(), - new GT_Packet_Sound(), - new GT_Packet_Block_Event(), - new GT_Packet_Ores(), - new GT_Packet_Pollution(), - new MessageSetFlaskCapacity(), - new GT_Packet_TileEntityCover(), - new GT_Packet_TileEntityCoverGUI(), - new MessageUpdateFluidDisplayItem(), - new GT_Packet_ClientPreference(), - new GT_Packet_WirelessRedstoneCover(), - new GT_Packet_TileEntityCoverNew(), - new GT_Packet_SetConfigurationCircuit(), - new GT_Packet_UpdateItem(), - new GT_Packet_SetLockedFluid(), - new GT_Packet_GtTileEntityGuiRequest(), - new GT_Packet_SendCoverData(), - new GT_Packet_RequestCoverData() - ); + this( + "GregTech", + new GT_Packet_TileEntity(), + new GT_Packet_Sound(), + new GT_Packet_Block_Event(), + new GT_Packet_Ores(), + new GT_Packet_Pollution(), + new MessageSetFlaskCapacity(), + new GT_Packet_TileEntityCover(), + new GT_Packet_TileEntityCoverGUI(), + new MessageUpdateFluidDisplayItem(), + new GT_Packet_ClientPreference(), + new GT_Packet_WirelessRedstoneCover(), + new GT_Packet_TileEntityCoverNew(), + new GT_Packet_SetConfigurationCircuit(), + new GT_Packet_UpdateItem(), + new GT_Packet_SetLockedFluid(), + new GT_Packet_GtTileEntityGuiRequest(), + new GT_Packet_SendCoverData(), + new GT_Packet_RequestCoverData()); } - + public GT_Network(String channelName, GT_Packet... packetTypes) { this.mChannel = NetworkRegistry.INSTANCE.newChannel(channelName, this, new HandlerShared()); this.mSubChannels = new GT_Packet[packetTypes.length]; for (GT_Packet packetType : packetTypes) { final int pId = packetType.getPacketID(); - if (this.mSubChannels[pId] == null) - this.mSubChannels[pId] = packetType; - else - throw new IllegalArgumentException("Duplicate Packet ID! " + pId); + if (this.mSubChannels[pId] == null) this.mSubChannels[pId] = packetType; + else throw new IllegalArgumentException("Duplicate Packet ID! " + pId); } } - + @Override protected void encode(ChannelHandlerContext aContext, GT_Packet aPacket, List<Object> aOutput) throws Exception { ByteBuf tBuf = Unpooled.buffer().writeByte(aPacket.getPacketID()); aPacket.encode(tBuf); - aOutput.add(new FMLProxyPacket(tBuf, aContext.channel().attr(NetworkRegistry.FML_CHANNEL).get())); + aOutput.add(new FMLProxyPacket( + tBuf, aContext.channel().attr(NetworkRegistry.FML_CHANNEL).get())); } @Override - protected void decode(ChannelHandlerContext aContext, FMLProxyPacket aPacket, List<Object> aOutput) throws Exception { + protected void decode(ChannelHandlerContext aContext, FMLProxyPacket aPacket, List<Object> aOutput) + throws Exception { ByteArrayDataInput aData = ByteStreams.newDataInput(aPacket.payload().array()); GT_Packet tPacket = this.mSubChannels[aData.readByte()].decode(aData); tPacket.setINetHandler(aPacket.handler()); @@ -94,21 +93,36 @@ public class GT_Network extends MessageToMessageCodec<FMLProxyPacket, GT_Packet> GT_FML_LOGGER.info("player null"); return; } - this.mChannel.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.PLAYER); - this.mChannel.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(aPlayer); + this.mChannel + .get(Side.SERVER) + .attr(FMLOutboundHandler.FML_MESSAGETARGET) + .set(FMLOutboundHandler.OutboundTarget.PLAYER); + this.mChannel + .get(Side.SERVER) + .attr(FMLOutboundHandler.FML_MESSAGETARGETARGS) + .set(aPlayer); this.mChannel.get(Side.SERVER).writeAndFlush(aPacket); } @Override public void sendToAllAround(GT_Packet aPacket, NetworkRegistry.TargetPoint aPosition) { - this.mChannel.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALLAROUNDPOINT); - this.mChannel.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(aPosition); + this.mChannel + .get(Side.SERVER) + .attr(FMLOutboundHandler.FML_MESSAGETARGET) + .set(FMLOutboundHandler.OutboundTarget.ALLAROUNDPOINT); + this.mChannel + .get(Side.SERVER) + .attr(FMLOutboundHandler.FML_MESSAGETARGETARGS) + .set(aPosition); this.mChannel.get(Side.SERVER).writeAndFlush(aPacket); } @Override public void sendToServer(GT_Packet aPacket) { - this.mChannel.get(Side.CLIENT).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.TOSERVER); + this.mChannel + .get(Side.CLIENT) + .attr(FMLOutboundHandler.FML_MESSAGETARGET) + .set(FMLOutboundHandler.OutboundTarget.TOSERVER); this.mChannel.get(Side.CLIENT).writeAndFlush(aPacket); } @@ -121,7 +135,9 @@ public class GT_Network extends MessageToMessageCodec<FMLProxyPacket, GT_Packet> } EntityPlayerMP tPlayer = (EntityPlayerMP) tObject; Chunk tChunk = aWorld.getChunkFromBlockCoords(aX, aZ); - if (tPlayer.getServerForPlayer().getPlayerManager().isPlayerWatchingChunk(tPlayer, tChunk.xPosition, tChunk.zPosition)) { + if (tPlayer.getServerForPlayer() + .getPlayerManager() + .isPlayerWatchingChunk(tPlayer, tChunk.xPosition, tChunk.zPosition)) { sendToPlayer(aPacket, tPlayer); } } diff --git a/src/main/java/gregtech/common/GT_PlayerActivityLogger.java b/src/main/java/gregtech/common/GT_PlayerActivityLogger.java index c6b9cb60d2..49ddb9dc23 100644 --- a/src/main/java/gregtech/common/GT_PlayerActivityLogger.java +++ b/src/main/java/gregtech/common/GT_PlayerActivityLogger.java @@ -2,7 +2,6 @@ package gregtech.common; import gregtech.GT_Mod; import gregtech.api.util.GT_Log; - import java.util.ArrayList; public class GT_PlayerActivityLogger implements Runnable { diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java index 49b33fb1cb..4d726a2a46 100644 --- a/src/main/java/gregtech/common/GT_Pollution.java +++ b/src/main/java/gregtech/common/GT_Pollution.java @@ -1,5 +1,8 @@ package gregtech.common; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; +import static gregtech.common.GT_Proxy.dimensionWisePollution; + import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; import cpw.mods.fml.common.network.NetworkRegistry; @@ -13,6 +16,16 @@ import gregtech.api.util.GT_ChunkAssociatedData; import gregtech.api.util.GT_Utility; import gregtech.common.render.GT_PollutionRenderer; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_Cleanroom; +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.function.Consumer; +import javax.annotation.Nullable; +import javax.annotation.ParametersAreNonnullByDefault; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; @@ -31,445 +44,455 @@ import net.minecraftforge.event.world.ChunkDataEvent; import net.minecraftforge.event.world.ChunkWatchEvent; import net.minecraftforge.event.world.WorldEvent; -import javax.annotation.Nullable; -import javax.annotation.ParametersAreNonnullByDefault; -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.function.Consumer; +public class GT_Pollution { + private static final Storage STORAGE = new Storage(); + /** + * Pollution dispersion until effects start: + * Calculation: ((Limit * 0.01) + 2000) * (4 <- spreading rate) + * <p> + * SMOG(500k) 466.7 pollution/sec + * Poison(750k) 633,3 pollution/sec + * Dying Plants(1mio) 800 pollution/sec + * Sour Rain(1.5mio) 1133.3 pollution/sec + * <p> + * Pollution producers (pollution/sec) + * Bronze Boiler(20) + * Lava Boiler(20) + * High Pressure Boiler(20) + * Bronze Blast Furnace(50) + * Diesel Generator(40/80/160) + * Gas Turbine(20/40/80) + * Charcoal Pile(100) + * <p> + * Large Diesel Engine(320) + * Electric Blast Furnace(100) + * Implosion Compressor(2000) + * Large Boiler(240) + * Large Gas Turbine(160) + * Multi Smelter(100) + * Pyrolyse Oven(400) + * <p> + * Machine Explosion(100,000) + * <p> + * Other Random Shit: lots and lots + * <p> + * Muffler Hatch Pollution reduction: ** inaccurate ** + * LV (0%), MV (30%), HV (52%), EV (66%), IV (76%), LuV (84%), ZPM (89%), UV (92%), MAX (95%) + */ + private List<ChunkCoordIntPair> pollutionList = new ArrayList<>(); // chunks left to process in this cycle + + private final Set<ChunkCoordIntPair> pollutedChunks = + new HashSet<>(); // a global list of all chunks with positive pollution + private int operationsPerTick = 0; // how much chunks should be processed in each cycle + private static final short cycleLen = 1200; + private final World world; + private boolean blank = true; + public static int mPlayerPollution; + + private static int POLLUTIONPACKET_MINVALUE = 1000; + + private static GT_PollutionEventHandler EVENT_HANDLER; + + public GT_Pollution(World world) { + this.world = world; + + if (EVENT_HANDLER == null) { + EVENT_HANDLER = new GT_PollutionEventHandler(); + MinecraftForge.EVENT_BUS.register(EVENT_HANDLER); + } + } + + public static void onWorldTick(TickEvent.WorldTickEvent aEvent) { // called from proxy + // return if pollution disabled + if (!GT_Mod.gregtechproxy.mPollution) return; + if (aEvent.phase == TickEvent.Phase.START) return; + final GT_Pollution pollutionInstance = dimensionWisePollution.get(aEvent.world.provider.dimensionId); + if (pollutionInstance == null) return; + pollutionInstance.tickPollutionInWorld((int) (aEvent.world.getTotalWorldTime() % cycleLen)); + } + + private void tickPollutionInWorld(int aTickID) { // called from method above + // gen data set + if (aTickID == 0 || blank) { + // make a snapshot of what to work on + pollutionList = new ArrayList<>(pollutedChunks); + // set operations per tick + if (pollutionList.size() > 0) operationsPerTick = Math.max(1, pollutionList.size() / cycleLen); + else operationsPerTick = 0; // SANity + blank = false; + } -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; -import static gregtech.common.GT_Proxy.dimensionWisePollution; + for (int chunksProcessed = 0; chunksProcessed < operationsPerTick; chunksProcessed++) { + if (pollutionList.size() == 0) break; // no more stuff to do + ChunkCoordIntPair actualPos = pollutionList.remove(pollutionList.size() - 1); // faster + // get pollution + ChunkData currentData = STORAGE.get(world, actualPos); + int tPollution = currentData.getAmount(); + // remove some + tPollution = (int) (0.9945f * tPollution); + + if (tPollution > 400000) { // Spread Pollution + + ChunkCoordIntPair[] tNeighbors = new ChunkCoordIntPair[4]; // array is faster + tNeighbors[0] = (new ChunkCoordIntPair(actualPos.chunkXPos + 1, actualPos.chunkZPos)); + tNeighbors[1] = (new ChunkCoordIntPair(actualPos.chunkXPos - 1, actualPos.chunkZPos)); + tNeighbors[2] = (new ChunkCoordIntPair(actualPos.chunkXPos, actualPos.chunkZPos + 1)); + tNeighbors[3] = (new ChunkCoordIntPair(actualPos.chunkXPos, actualPos.chunkZPos - 1)); + for (ChunkCoordIntPair neighborPosition : tNeighbors) { + ChunkData neighbor = STORAGE.get(world, neighborPosition); + int neighborPollution = neighbor.getAmount(); + if (neighborPollution * 6 < tPollution * 5) { // MATHEMATICS... + int tDiff = tPollution - neighborPollution; + tDiff = tDiff / 20; + neighborPollution = GT_Utility.safeInt((long) neighborPollution + tDiff); // tNPol += tDiff; + tPollution -= tDiff; + setChunkPollution(neighborPosition, neighborPollution); + } + } + + // Create Pollution effects + // Smog filter TODO + if (tPollution > GT_Mod.gregtechproxy.mPollutionSmogLimit) { + AxisAlignedBB chunk = AxisAlignedBB.getBoundingBox( + actualPos.chunkXPos << 4, + 0, + actualPos.chunkZPos << 4, + (actualPos.chunkXPos << 4) + 16, + 256, + (actualPos.chunkZPos << 4) + 16); + List<EntityLivingBase> tEntitys = world.getEntitiesWithinAABB(EntityLivingBase.class, chunk); + for (EntityLivingBase tEnt : tEntitys) { + if (tEnt instanceof EntityPlayerMP && ((EntityPlayerMP) tEnt).capabilities.isCreativeMode) + continue; + if (!(GT_Utility.isWearingFullGasHazmat(tEnt))) { + switch (XSTR_INSTANCE.nextInt(3)) { + default: + tEnt.addPotionEffect(new PotionEffect( + Potion.digSlowdown.id, + Math.min(tPollution / 1000, 1000), + tPollution / 400000)); + case 1: + tEnt.addPotionEffect(new PotionEffect( + Potion.weakness.id, + Math.min(tPollution / 1000, 1000), + tPollution / 400000)); + case 2: + tEnt.addPotionEffect(new PotionEffect( + Potion.moveSlowdown.id, + Math.min(tPollution / 1000, 1000), + tPollution / 400000)); + } + } + } + + // Poison effects + if (tPollution > GT_Mod.gregtechproxy.mPollutionPoisonLimit) { + // AxisAlignedBB chunk = AxisAlignedBB.getBoundingBox(tPos.chunkPosX*16, 0, tPos.chunkPosZ*16, + // tPos.chunkPosX*16+16, 256, tPos.chunkPosZ*16+16); + // List<EntityLiving> tEntitys = aWorld.getEntitiesWithinAABB(EntityLiving.class, chunk); + for (EntityLivingBase tEnt : tEntitys) { + if (tEnt instanceof EntityPlayerMP && ((EntityPlayerMP) tEnt).capabilities.isCreativeMode) + continue; + if (!GT_Utility.isWearingFullGasHazmat(tEnt)) { + switch (XSTR_INSTANCE.nextInt(4)) { + default: + tEnt.addPotionEffect(new PotionEffect(Potion.hunger.id, tPollution / 500000)); + case 1: + tEnt.addPotionEffect(new PotionEffect( + Potion.confusion.id, Math.min(tPollution / 2000, 1000), 1)); + case 2: + tEnt.addPotionEffect(new PotionEffect( + Potion.poison.id, + Math.min(tPollution / 4000, 1000), + tPollution / 500000)); + case 3: + tEnt.addPotionEffect(new PotionEffect( + Potion.blindness.id, Math.min(tPollution / 2000, 1000), 1)); + } + } + } + + // killing plants + if (tPollution > GT_Mod.gregtechproxy.mPollutionVegetationLimit) { + int f = 20; + for (; f < (tPollution / 25000); f++) { + int x = (actualPos.chunkXPos << 4) + XSTR_INSTANCE.nextInt(16); + int y = 60 + (-f + XSTR_INSTANCE.nextInt(f * 2 + 1)); + int z = (actualPos.chunkZPos << 4) + XSTR_INSTANCE.nextInt(16); + damageBlock(world, x, y, z, tPollution > GT_Mod.gregtechproxy.mPollutionSourRainLimit); + } + } + } + } + } + // Write new pollution to Hashmap !!! + setChunkPollution(actualPos, tPollution); + + // Send new value to players nearby + if (tPollution > POLLUTIONPACKET_MINVALUE) { + NetworkRegistry.TargetPoint point = new NetworkRegistry.TargetPoint( + world.provider.dimensionId, (actualPos.chunkXPos << 4), 64, (actualPos.chunkZPos << 4), 256); + GT_Values.NW.sendToAllAround(new GT_Packet_Pollution(actualPos, tPollution), point); + } + } + } + + private void setChunkPollution(ChunkCoordIntPair coord, int pollution) { + mutatePollution(world, coord.chunkXPos, coord.chunkZPos, c -> c.setAmount(pollution), pollutedChunks); + } + + private static void damageBlock(World world, int x, int y, int z, boolean sourRain) { + if (world.isRemote) return; + Block tBlock = world.getBlock(x, y, z); + int tMeta = world.getBlockMetadata(x, y, z); + if (tBlock == Blocks.air || tBlock == Blocks.stone || tBlock == Blocks.sand || tBlock == Blocks.deadbush) + return; + + if (tBlock == Blocks.leaves || tBlock == Blocks.leaves2 || tBlock.getMaterial() == Material.leaves) + world.setBlockToAir(x, y, z); + if (tBlock == Blocks.reeds) { + tBlock.dropBlockAsItem(world, x, y, z, tMeta, 0); + world.setBlockToAir(x, y, z); + } + if (tBlock == Blocks.tallgrass) world.setBlock(x, y, z, Blocks.deadbush); + if (tBlock == Blocks.vine) { + tBlock.dropBlockAsItem(world, x, y, z, tMeta, 0); + world.setBlockToAir(x, y, z); + } + if (tBlock == Blocks.waterlily + || tBlock == Blocks.wheat + || tBlock == Blocks.cactus + || tBlock.getMaterial() == Material.cactus + || tBlock == Blocks.melon_block + || tBlock == Blocks.melon_stem) { + tBlock.dropBlockAsItem(world, x, y, z, tMeta, 0); + world.setBlockToAir(x, y, z); + } + if (tBlock == Blocks.red_flower + || tBlock == Blocks.yellow_flower + || tBlock == Blocks.carrots + || tBlock == Blocks.potatoes + || tBlock == Blocks.pumpkin + || tBlock == Blocks.pumpkin_stem) { + tBlock.dropBlockAsItem(world, x, y, z, tMeta, 0); + world.setBlockToAir(x, y, z); + } + if (tBlock == Blocks.sapling || tBlock.getMaterial() == Material.plants) + world.setBlock(x, y, z, Blocks.deadbush); + if (tBlock == Blocks.cocoa) { + tBlock.dropBlockAsItem(world, x, y, z, tMeta, 0); + world.setBlockToAir(x, y, z); + } + if (tBlock == Blocks.mossy_cobblestone) world.setBlock(x, y, z, Blocks.cobblestone); + if (tBlock == Blocks.grass || tBlock.getMaterial() == Material.grass) world.setBlock(x, y, z, Blocks.dirt); + if (tBlock == Blocks.farmland || tBlock == Blocks.dirt) { + world.setBlock(x, y, z, Blocks.sand); + } + + if (sourRain + && world.isRaining() + && (tBlock == Blocks.stone || tBlock == Blocks.gravel || tBlock == Blocks.cobblestone) + && world.getBlock(x, y + 1, z) == Blocks.air + && world.canBlockSeeTheSky(x, y, z)) { + if (tBlock == Blocks.stone) { + world.setBlock(x, y, z, Blocks.cobblestone); + } else if (tBlock == Blocks.cobblestone) { + world.setBlock(x, y, z, Blocks.gravel); + } else if (tBlock == Blocks.gravel) { + world.setBlock(x, y, z, Blocks.sand); + } + } + } + private static GT_Pollution getPollutionManager(World world) { + return dimensionWisePollution.computeIfAbsent(world.provider.dimensionId, i -> new GT_Pollution(world)); + } -public class GT_Pollution { - private static final Storage STORAGE = new Storage(); - /** - * Pollution dispersion until effects start: - * Calculation: ((Limit * 0.01) + 2000) * (4 <- spreading rate) - * <p> - * SMOG(500k) 466.7 pollution/sec - * Poison(750k) 633,3 pollution/sec - * Dying Plants(1mio) 800 pollution/sec - * Sour Rain(1.5mio) 1133.3 pollution/sec - * <p> - * Pollution producers (pollution/sec) - * Bronze Boiler(20) - * Lava Boiler(20) - * High Pressure Boiler(20) - * Bronze Blast Furnace(50) - * Diesel Generator(40/80/160) - * Gas Turbine(20/40/80) - * Charcoal Pile(100) - * <p> - * Large Diesel Engine(320) - * Electric Blast Furnace(100) - * Implosion Compressor(2000) - * Large Boiler(240) - * Large Gas Turbine(160) - * Multi Smelter(100) - * Pyrolyse Oven(400) - * <p> - * Machine Explosion(100,000) - * <p> - * Other Random Shit: lots and lots - * <p> - * Muffler Hatch Pollution reduction: ** inaccurate ** - * LV (0%), MV (30%), HV (52%), EV (66%), IV (76%), LuV (84%), ZPM (89%), UV (92%), MAX (95%) - */ - private List<ChunkCoordIntPair> pollutionList = new ArrayList<>();//chunks left to process in this cycle - private final Set<ChunkCoordIntPair> pollutedChunks = new HashSet<>();// a global list of all chunks with positive pollution - private int operationsPerTick = 0;//how much chunks should be processed in each cycle - private static final short cycleLen = 1200; - private final World world; - private boolean blank = true; - public static int mPlayerPollution; - - private static int POLLUTIONPACKET_MINVALUE = 1000; - - private static GT_PollutionEventHandler EVENT_HANDLER; - - public GT_Pollution(World world) { - this.world = world; - - if (EVENT_HANDLER == null) { - EVENT_HANDLER = new GT_PollutionEventHandler(); - MinecraftForge.EVENT_BUS.register(EVENT_HANDLER); - } - } - - public static void onWorldTick(TickEvent.WorldTickEvent aEvent) {//called from proxy - //return if pollution disabled - if (!GT_Mod.gregtechproxy.mPollution) return; - if (aEvent.phase == TickEvent.Phase.START) return; - final GT_Pollution pollutionInstance = dimensionWisePollution.get(aEvent.world.provider.dimensionId); - if (pollutionInstance == null) return; - pollutionInstance.tickPollutionInWorld((int) (aEvent.world.getTotalWorldTime() % cycleLen)); - } - - private void tickPollutionInWorld(int aTickID) {//called from method above - //gen data set - if (aTickID == 0 || blank) { - // make a snapshot of what to work on - pollutionList = new ArrayList<>(pollutedChunks); - //set operations per tick - if (pollutionList.size() > 0) - operationsPerTick = Math.max(1, pollutionList.size() / cycleLen); - else - operationsPerTick = 0; //SANity - blank = false; - } - - for (int chunksProcessed = 0; chunksProcessed < operationsPerTick; chunksProcessed++) { - if (pollutionList.size() == 0) break;//no more stuff to do - ChunkCoordIntPair actualPos = pollutionList.remove(pollutionList.size() - 1);//faster - //get pollution - ChunkData currentData = STORAGE.get(world, actualPos); - int tPollution = currentData.getAmount(); - //remove some - tPollution = (int) (0.9945f * tPollution); - - if (tPollution > 400000) {//Spread Pollution - - ChunkCoordIntPair[] tNeighbors = new ChunkCoordIntPair[4];//array is faster - tNeighbors[0] = (new ChunkCoordIntPair(actualPos.chunkXPos + 1, actualPos.chunkZPos)); - tNeighbors[1] = (new ChunkCoordIntPair(actualPos.chunkXPos - 1, actualPos.chunkZPos)); - tNeighbors[2] = (new ChunkCoordIntPair(actualPos.chunkXPos, actualPos.chunkZPos + 1)); - tNeighbors[3] = (new ChunkCoordIntPair(actualPos.chunkXPos, actualPos.chunkZPos - 1)); - for (ChunkCoordIntPair neighborPosition : tNeighbors) { - ChunkData neighbor = STORAGE.get(world, neighborPosition); - int neighborPollution = neighbor.getAmount(); - if (neighborPollution * 6 < tPollution * 5) {//MATHEMATICS... - int tDiff = tPollution - neighborPollution; - tDiff = tDiff / 20; - neighborPollution = GT_Utility.safeInt((long) neighborPollution + tDiff);//tNPol += tDiff; - tPollution -= tDiff; - setChunkPollution(neighborPosition, neighborPollution); - } - } - - - //Create Pollution effects - //Smog filter TODO - if (tPollution > GT_Mod.gregtechproxy.mPollutionSmogLimit) { - AxisAlignedBB chunk = AxisAlignedBB.getBoundingBox(actualPos.chunkXPos << 4, 0, actualPos.chunkZPos << 4, (actualPos.chunkXPos << 4) + 16, 256, (actualPos.chunkZPos << 4) + 16); - List<EntityLivingBase> tEntitys = world.getEntitiesWithinAABB(EntityLivingBase.class, chunk); - for (EntityLivingBase tEnt : tEntitys) { - if (tEnt instanceof EntityPlayerMP && ((EntityPlayerMP) tEnt).capabilities.isCreativeMode) - continue; - if (!(GT_Utility.isWearingFullGasHazmat(tEnt))) { - switch (XSTR_INSTANCE.nextInt(3)) { - default: - tEnt.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, Math.min(tPollution / 1000, 1000), tPollution / 400000)); - case 1: - tEnt.addPotionEffect(new PotionEffect(Potion.weakness.id, Math.min(tPollution / 1000, 1000), tPollution / 400000)); - case 2: - tEnt.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, Math.min(tPollution / 1000, 1000), tPollution / 400000)); - } - } - } - - - // Poison effects - if (tPollution > GT_Mod.gregtechproxy.mPollutionPoisonLimit) { - //AxisAlignedBB chunk = AxisAlignedBB.getBoundingBox(tPos.chunkPosX*16, 0, tPos.chunkPosZ*16, tPos.chunkPosX*16+16, 256, tPos.chunkPosZ*16+16); - //List<EntityLiving> tEntitys = aWorld.getEntitiesWithinAABB(EntityLiving.class, chunk); - for (EntityLivingBase tEnt : tEntitys) { - if (tEnt instanceof EntityPlayerMP && ((EntityPlayerMP) tEnt).capabilities.isCreativeMode) - continue; - if (!GT_Utility.isWearingFullGasHazmat(tEnt)) { - switch (XSTR_INSTANCE.nextInt(4)) { - default: - tEnt.addPotionEffect(new PotionEffect(Potion.hunger.id, tPollution / 500000)); - case 1: - tEnt.addPotionEffect(new PotionEffect(Potion.confusion.id, Math.min(tPollution / 2000, 1000), 1)); - case 2: - tEnt.addPotionEffect(new PotionEffect(Potion.poison.id, Math.min(tPollution / 4000, 1000), tPollution / 500000)); - case 3: - tEnt.addPotionEffect(new PotionEffect(Potion.blindness.id, Math.min(tPollution / 2000, 1000), 1)); - } - } - } - - - // killing plants - if (tPollution > GT_Mod.gregtechproxy.mPollutionVegetationLimit) { - int f = 20; - for (; f < (tPollution / 25000); f++) { - int x = (actualPos.chunkXPos << 4) + XSTR_INSTANCE.nextInt(16); - int y = 60 + (-f + XSTR_INSTANCE.nextInt(f * 2 + 1)); - int z = (actualPos.chunkZPos << 4) + XSTR_INSTANCE.nextInt(16); - damageBlock(world, x, y, z, tPollution > GT_Mod.gregtechproxy.mPollutionSourRainLimit); - } - } - } - } - } - //Write new pollution to Hashmap !!! - setChunkPollution(actualPos, tPollution); - - //Send new value to players nearby - if (tPollution > POLLUTIONPACKET_MINVALUE) { - NetworkRegistry.TargetPoint point = new NetworkRegistry.TargetPoint(world.provider.dimensionId, (actualPos.chunkXPos << 4), 64, (actualPos.chunkZPos << 4), 256); - GT_Values.NW.sendToAllAround(new GT_Packet_Pollution(actualPos, tPollution), point); - } - } - } - - private void setChunkPollution(ChunkCoordIntPair coord, int pollution) { - mutatePollution(world, coord.chunkXPos, coord.chunkZPos, c -> c.setAmount(pollution), pollutedChunks); - } - - private static void damageBlock(World world, int x, int y, int z, boolean sourRain) { - if (world.isRemote) return; - Block tBlock = world.getBlock(x, y, z); - int tMeta = world.getBlockMetadata(x, y, z); - if (tBlock == Blocks.air || tBlock == Blocks.stone || tBlock == Blocks.sand || tBlock == Blocks.deadbush) - return; - - if (tBlock == Blocks.leaves || tBlock == Blocks.leaves2 || tBlock.getMaterial() == Material.leaves) - world.setBlockToAir(x, y, z); - if (tBlock == Blocks.reeds) { - tBlock.dropBlockAsItem(world, x, y, z, tMeta, 0); - world.setBlockToAir(x, y, z); - } - if (tBlock == Blocks.tallgrass) - world.setBlock(x, y, z, Blocks.deadbush); - if (tBlock == Blocks.vine) { - tBlock.dropBlockAsItem(world, x, y, z, tMeta, 0); - world.setBlockToAir(x, y, z); - } - if (tBlock == Blocks.waterlily || tBlock == Blocks.wheat || tBlock == Blocks.cactus || - tBlock.getMaterial() == Material.cactus || tBlock == Blocks.melon_block || tBlock == Blocks.melon_stem) { - tBlock.dropBlockAsItem(world, x, y, z, tMeta, 0); - world.setBlockToAir(x, y, z); - } - if (tBlock == Blocks.red_flower || tBlock == Blocks.yellow_flower || tBlock == Blocks.carrots || - tBlock == Blocks.potatoes || tBlock == Blocks.pumpkin || tBlock == Blocks.pumpkin_stem) { - tBlock.dropBlockAsItem(world, x, y, z, tMeta, 0); - world.setBlockToAir(x, y, z); - } - if (tBlock == Blocks.sapling || tBlock.getMaterial() == Material.plants) - world.setBlock(x, y, z, Blocks.deadbush); - if (tBlock == Blocks.cocoa) { - tBlock.dropBlockAsItem(world, x, y, z, tMeta, 0); - world.setBlockToAir(x, y, z); - } - if (tBlock == Blocks.mossy_cobblestone) - world.setBlock(x, y, z, Blocks.cobblestone); - if (tBlock == Blocks.grass || tBlock.getMaterial() == Material.grass) - world.setBlock(x, y, z, Blocks.dirt); - if (tBlock == Blocks.farmland || tBlock == Blocks.dirt) { - world.setBlock(x, y, z, Blocks.sand); - } - - if (sourRain && world.isRaining() && (tBlock == Blocks.stone || tBlock == Blocks.gravel || tBlock == Blocks.cobblestone) && - world.getBlock(x, y + 1, z) == Blocks.air && world.canBlockSeeTheSky(x, y, z)) { - if (tBlock == Blocks.stone) { - world.setBlock(x, y, z, Blocks.cobblestone); - } else if (tBlock == Blocks.cobblestone) { - world.setBlock(x, y, z, Blocks.gravel); - } else if (tBlock == Blocks.gravel) { - world.setBlock(x, y, z, Blocks.sand); - } - } - } - - private static GT_Pollution getPollutionManager(World world) { - return dimensionWisePollution.computeIfAbsent(world.provider.dimensionId, i -> new GT_Pollution(world)); - } - - /** @see #addPollution(World, int, int, int) */ - @SuppressWarnings("rawtypes") - public static void addPollution(IGregTechTileEntity te, int aPollution) { - if (!GT_Mod.gregtechproxy.mPollution || aPollution == 0 || te.isClientSide()) return; + /** @see #addPollution(World, int, int, int) */ + @SuppressWarnings("rawtypes") + public static void addPollution(IGregTechTileEntity te, int aPollution) { + if (!GT_Mod.gregtechproxy.mPollution || aPollution == 0 || te.isClientSide()) return; IMetaTileEntity iMetaTileEntity = te.getMetaTileEntity(); - if (iMetaTileEntity instanceof IMachineCallback) { - if (((IMachineCallback) iMetaTileEntity).getCallbackBase() instanceof GT_MetaTileEntity_Cleanroom) { - if (aPollution > 0) { - ((GT_MetaTileEntity_Cleanroom) ((IMachineCallback) iMetaTileEntity).getCallbackBase()).doMaintenanceIssue(); + if (iMetaTileEntity instanceof IMachineCallback) { + if (((IMachineCallback) iMetaTileEntity).getCallbackBase() instanceof GT_MetaTileEntity_Cleanroom) { + if (aPollution > 0) { + ((GT_MetaTileEntity_Cleanroom) ((IMachineCallback) iMetaTileEntity).getCallbackBase()) + .doMaintenanceIssue(); } } } - mutatePollution(te.getWorld(), te.getXCoord() >> 4, te.getZCoord() >> 4, d -> d.changeAmount(aPollution), null); - } - - /** @see #addPollution(World, int, int, int) */ - public static void addPollution(Chunk ch, int aPollution) { - if (!GT_Mod.gregtechproxy.mPollution || aPollution == 0 || ch.worldObj.isRemote) return; - mutatePollution(ch.worldObj, ch.xPosition, ch.zPosition, d -> d.changeAmount(aPollution), null); - } - - /** - * Add some pollution to given chunk. Can pass in negative to remove pollution. - * Will clamp the final pollution number to 0 if it would be changed into negative. - * - * @param w world to modify. do nothing if it's a client world - * @param chunkX chunk coordinate X, i.e. blockX >> 4 - * @param chunkZ chunk coordinate Z, i.e. blockZ >> 4 - * @param aPollution desired delta. Positive means the pollution in chunk would go higher. - */ - public static void addPollution(World w, int chunkX, int chunkZ, int aPollution) { - if (!GT_Mod.gregtechproxy.mPollution || aPollution == 0 || w.isRemote) return; - mutatePollution(w, chunkX, chunkZ, d -> d.changeAmount(aPollution), null); - } - - private static void mutatePollution(World world, int x, int z, Consumer<ChunkData> mutator, @Nullable Set<ChunkCoordIntPair> chunks) { - ChunkData data = STORAGE.get(world, x, z); - boolean hadPollution = data.getAmount() > 0; - mutator.accept(data); - boolean hasPollution = data.getAmount() > 0; - if (hasPollution != hadPollution) { - if (chunks == null) - chunks = getPollutionManager(world).pollutedChunks; - if (hasPollution) - chunks.add(new ChunkCoordIntPair(x, z)); - else - chunks.remove(new ChunkCoordIntPair(x, z)); - } - } - - /** @see #getPollution(World, int, int) */ - public static int getPollution(IGregTechTileEntity te) { - return getPollution(te.getWorld(), te.getXCoord() >> 4, te.getZCoord() >> 4); - } - - /** @see #getPollution(World, int, int) */ - public static int getPollution(Chunk ch) { - return getPollution(ch.worldObj, ch.xPosition, ch.zPosition); - } - - /** - * Get the pollution in specified chunk - * @param w world to look in. can be a client world, but that limits the knowledge to what server side send us - * @param chunkX chunk coordinate X, i.e. blockX >> 4 - * @param chunkZ chunk coordinate Z, i.e. blockZ >> 4 - * @return pollution amount. may be 0 if pollution is disabled, or if it's a client world and server did not send - * us info about this chunk - */ - public static int getPollution(World w, int chunkX, int chunkZ) { - if (!GT_Mod.gregtechproxy.mPollution) - return 0; - if (w.isRemote) - // it really should be querying the client side stuff instead - return GT_PollutionRenderer.getKnownPollution(chunkX << 4, chunkZ << 4); - return STORAGE.get(w, chunkX, chunkZ).getAmount(); - } - - @Deprecated - public static int getPollution(ChunkCoordIntPair aCh, int aDim) { - return getPollution(DimensionManager.getWorld(aDim), aCh.chunkXPos, aCh.chunkZPos); - } - - public static boolean hasPollution(Chunk ch) { - if (!GT_Mod.gregtechproxy.mPollution) - return false; - return STORAGE.isCreated(ch.worldObj, ch.getChunkCoordIntPair()) && STORAGE.get(ch).getAmount() > 0; - } - - //Add compatibility with old code - @Deprecated /*Don't use it... too weird way of passing position*/ - public static void addPollution(World aWorld, ChunkPosition aPos, int aPollution) { - //The abuse of ChunkPosition to store block position and dim... - //is just bad especially when that is both used to store ChunkPos and BlockPos depending on context - addPollution(aWorld.getChunkFromBlockCoords(aPos.chunkPosX, aPos.chunkPosZ), aPollution); - } - - static void migrate(ChunkDataEvent.Load e) { - addPollution(e.getChunk(), e.getData().getInteger("GTPOLLUTION")); - } - - public static class GT_PollutionEventHandler { - @SubscribeEvent - public void chunkWatch(ChunkWatchEvent.Watch event) { - if (!GT_Mod.gregtechproxy.mPollution) return; - World world = event.player.worldObj; - if (STORAGE.isCreated(world, event.chunk)) { - int pollution = STORAGE.get(world, event.chunk).getAmount(); - if (pollution > POLLUTIONPACKET_MINVALUE) - GT_Values.NW.sendToPlayer(new GT_Packet_Pollution(event.chunk, pollution), event.player); - } - } - - @SubscribeEvent - public void onWorldLoad(WorldEvent.Load e) { - // super class loads everything lazily. We force it to load them all. - if (!e.world.isRemote) - STORAGE.loadAll(e.world); - } - } - - @ParametersAreNonnullByDefault - private static final class Storage extends GT_ChunkAssociatedData<ChunkData> { - private Storage() { - super("Pollution", ChunkData.class, 64, (byte) 0, false); - } - - @Override - protected void writeElement(DataOutput output, ChunkData element, World world, int chunkX, int chunkZ) throws IOException { - output.writeInt(element.getAmount()); - } - - @Override - protected ChunkData readElement(DataInput input, int version, World world, int chunkX, int chunkZ) throws IOException { - if (version != 0) - throw new IOException("Region file corrupted"); - ChunkData data = new ChunkData(input.readInt()); - if (data.getAmount() > 0) - getPollutionManager(world).pollutedChunks.add(new ChunkCoordIntPair(chunkX, chunkZ)); - return data; - } - - @Override - protected ChunkData createElement(World world, int chunkX, int chunkZ) { - return new ChunkData(); - } - - @Override - public void loadAll(World w) { - super.loadAll(w); - } - - public boolean isCreated(World world, ChunkCoordIntPair coord) { - return isCreated(world.provider.dimensionId, coord.chunkXPos, coord.chunkZPos); - } - } - - private static final class ChunkData implements GT_ChunkAssociatedData.IData { - public int amount; - - private ChunkData() { - this(0); - } - - private ChunkData(int amount) { - this.amount = Math.max(0, amount); - } - - /** - * Current pollution amount. - */ - public int getAmount() { - return amount; - } - - public void setAmount(int amount) { - this.amount = Math.max(amount, 0); - } - - public void changeAmount(int delta) { - this.amount = Math.max(GT_Utility.safeInt(amount + (long) delta, 0), 0); - } - - @Override - public boolean isSameAsDefault() { - return amount == 0; - } - } + mutatePollution(te.getWorld(), te.getXCoord() >> 4, te.getZCoord() >> 4, d -> d.changeAmount(aPollution), null); + } + + /** @see #addPollution(World, int, int, int) */ + public static void addPollution(Chunk ch, int aPollution) { + if (!GT_Mod.gregtechproxy.mPollution || aPollution == 0 || ch.worldObj.isRemote) return; + mutatePollution(ch.worldObj, ch.xPosition, ch.zPosition, d -> d.changeAmount(aPollution), null); + } + + /** + * Add some pollution to given chunk. Can pass in negative to remove pollution. + * Will clamp the final pollution number to 0 if it would be changed into negative. + * + * @param w world to modify. do nothing if it's a client world + * @param chunkX chunk coordinate X, i.e. blockX >> 4 + * @param chunkZ chunk coordinate Z, i.e. blockZ >> 4 + * @param aPollution desired delta. Positive means the pollution in chunk would go higher. + */ + public static void addPollution(World w, int chunkX, int chunkZ, int aPollution) { + if (!GT_Mod.gregtechproxy.mPollution || aPollution == 0 || w.isRemote) return; + mutatePollution(w, chunkX, chunkZ, d -> d.changeAmount(aPollution), null); + } + + private static void mutatePollution( + World world, int x, int z, Consumer<ChunkData> mutator, @Nullable Set<ChunkCoordIntPair> chunks) { + ChunkData data = STORAGE.get(world, x, z); + boolean hadPollution = data.getAmount() > 0; + mutator.accept(data); + boolean hasPollution = data.getAmount() > 0; + if (hasPollution != hadPollution) { + if (chunks == null) chunks = getPollutionManager(world).pollutedChunks; + if (hasPollution) chunks.add(new ChunkCoordIntPair(x, z)); + else chunks.remove(new ChunkCoordIntPair(x, z)); + } + } + + /** @see #getPollution(World, int, int) */ + public static int getPollution(IGregTechTileEntity te) { + return getPollution(te.getWorld(), te.getXCoord() >> 4, te.getZCoord() >> 4); + } + + /** @see #getPollution(World, int, int) */ + public static int getPollution(Chunk ch) { + return getPollution(ch.worldObj, ch.xPosition, ch.zPosition); + } + + /** + * Get the pollution in specified chunk + * @param w world to look in. can be a client world, but that limits the knowledge to what server side send us + * @param chunkX chunk coordinate X, i.e. blockX >> 4 + * @param chunkZ chunk coordinate Z, i.e. blockZ >> 4 + * @return pollution amount. may be 0 if pollution is disabled, or if it's a client world and server did not send + * us info about this chunk + */ + public static int getPollution(World w, int chunkX, int chunkZ) { + if (!GT_Mod.gregtechproxy.mPollution) return 0; + if (w.isRemote) + // it really should be querying the client side stuff instead + return GT_PollutionRenderer.getKnownPollution(chunkX << 4, chunkZ << 4); + return STORAGE.get(w, chunkX, chunkZ).getAmount(); + } + + @Deprecated + public static int getPollution(ChunkCoordIntPair aCh, int aDim) { + return getPollution(DimensionManager.getWorld(aDim), aCh.chunkXPos, aCh.chunkZPos); + } + + public static boolean hasPollution(Chunk ch) { + if (!GT_Mod.gregtechproxy.mPollution) return false; + return STORAGE.isCreated(ch.worldObj, ch.getChunkCoordIntPair()) + && STORAGE.get(ch).getAmount() > 0; + } + + // Add compatibility with old code + @Deprecated /*Don't use it... too weird way of passing position*/ + public static void addPollution(World aWorld, ChunkPosition aPos, int aPollution) { + // The abuse of ChunkPosition to store block position and dim... + // is just bad especially when that is both used to store ChunkPos and BlockPos depending on context + addPollution(aWorld.getChunkFromBlockCoords(aPos.chunkPosX, aPos.chunkPosZ), aPollution); + } + + static void migrate(ChunkDataEvent.Load e) { + addPollution(e.getChunk(), e.getData().getInteger("GTPOLLUTION")); + } + + public static class GT_PollutionEventHandler { + @SubscribeEvent + public void chunkWatch(ChunkWatchEvent.Watch event) { + if (!GT_Mod.gregtechproxy.mPollution) return; + World world = event.player.worldObj; + if (STORAGE.isCreated(world, event.chunk)) { + int pollution = STORAGE.get(world, event.chunk).getAmount(); + if (pollution > POLLUTIONPACKET_MINVALUE) + GT_Values.NW.sendToPlayer(new GT_Packet_Pollution(event.chunk, pollution), event.player); + } + } + + @SubscribeEvent + public void onWorldLoad(WorldEvent.Load e) { + // super class loads everything lazily. We force it to load them all. + if (!e.world.isRemote) STORAGE.loadAll(e.world); + } + } + + @ParametersAreNonnullByDefault + private static final class Storage extends GT_ChunkAssociatedData<ChunkData> { + private Storage() { + super("Pollution", ChunkData.class, 64, (byte) 0, false); + } + + @Override + protected void writeElement(DataOutput output, ChunkData element, World world, int chunkX, int chunkZ) + throws IOException { + output.writeInt(element.getAmount()); + } + + @Override + protected ChunkData readElement(DataInput input, int version, World world, int chunkX, int chunkZ) + throws IOException { + if (version != 0) throw new IOException("Region file corrupted"); + ChunkData data = new ChunkData(input.readInt()); + if (data.getAmount() > 0) + getPollutionManager(world).pollutedChunks.add(new ChunkCoordIntPair(chunkX, chunkZ)); + return data; + } + + @Override + protected ChunkData createElement(World world, int chunkX, int chunkZ) { + return new ChunkData(); + } + + @Override + public void loadAll(World w) { + super.loadAll(w); + } + + public boolean isCreated(World world, ChunkCoordIntPair coord) { + return isCreated(world.provider.dimensionId, coord.chunkXPos, coord.chunkZPos); + } + } + + private static final class ChunkData implements GT_ChunkAssociatedData.IData { + public int amount; + + private ChunkData() { + this(0); + } + + private ChunkData(int amount) { + this.amount = Math.max(0, amount); + } + + /** + * Current pollution amount. + */ + public int getAmount() { + return amount; + } + + public void setAmount(int amount) { + this.amount = Math.max(amount, 0); + } + + public void changeAmount(int delta) { + this.amount = Math.max(GT_Utility.safeInt(amount + (long) delta, 0), 0); + } + + @Override + public boolean isSameAsDefault() { + return amount == 0; + } + } } diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index b222ba1570..0a529cfa3b 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -1,5 +1,14 @@ package gregtech.common; +import static gregtech.GT_Mod.GT_FML_LOGGER; +import static gregtech.api.enums.GT_Values.MOD_ID_RC; +import static gregtech.api.enums.GT_Values.MOD_ID_TC; +import static gregtech.api.enums.GT_Values.MOD_ID_TE; +import static gregtech.api.enums.GT_Values.MOD_ID_TF; +import static gregtech.api.enums.GT_Values.W; +import static gregtech.api.enums.GT_Values.debugEntityCramming; +import static gregtech.api.util.GT_Util.LAST_BROKEN_TILEENTITY; + import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.IFuelHandler; import cpw.mods.fml.common.Loader; @@ -60,6 +69,25 @@ import gregtech.common.gui.GT_ContainerVolumetricFlask; import gregtech.common.gui.GT_GUIContainerVolumetricFlask; import gregtech.common.items.GT_MetaGenerated_Item_98; import gregtech.common.items.GT_MetaGenerated_Tool_01; +import java.io.File; +import java.lang.reflect.InvocationTargetException; +import java.text.DateFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Date; +import java.util.EnumSet; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.locks.ReentrantLock; +import java.util.stream.Collectors; import net.minecraft.block.Block; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; @@ -110,40 +138,14 @@ import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; import org.apache.commons.lang3.text.WordUtils; -import java.io.File; -import java.lang.reflect.InvocationTargetException; -import java.text.DateFormat; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Date; -import java.util.EnumSet; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.UUID; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; -import java.util.concurrent.locks.ReentrantLock; -import java.util.stream.Collectors; - -import static gregtech.GT_Mod.GT_FML_LOGGER; -import static gregtech.api.enums.GT_Values.MOD_ID_RC; -import static gregtech.api.enums.GT_Values.MOD_ID_TC; -import static gregtech.api.enums.GT_Values.MOD_ID_TE; -import static gregtech.api.enums.GT_Values.MOD_ID_TF; -import static gregtech.api.enums.GT_Values.W; -import static gregtech.api.enums.GT_Values.debugEntityCramming; -import static gregtech.api.util.GT_Util.LAST_BROKEN_TILEENTITY; - - public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IGlobalWirelessEnergy { - private static final EnumSet<OreGenEvent.GenerateMinable.EventType> PREVENTED_ORES = EnumSet.of(OreGenEvent.GenerateMinable.EventType.COAL, - OreGenEvent.GenerateMinable.EventType.IRON, OreGenEvent.GenerateMinable.EventType.GOLD, - OreGenEvent.GenerateMinable.EventType.DIAMOND, OreGenEvent.GenerateMinable.EventType.REDSTONE, OreGenEvent.GenerateMinable.EventType.LAPIS, + private static final EnumSet<OreGenEvent.GenerateMinable.EventType> PREVENTED_ORES = EnumSet.of( + OreGenEvent.GenerateMinable.EventType.COAL, + OreGenEvent.GenerateMinable.EventType.IRON, + OreGenEvent.GenerateMinable.EventType.GOLD, + OreGenEvent.GenerateMinable.EventType.DIAMOND, + OreGenEvent.GenerateMinable.EventType.REDSTONE, + OreGenEvent.GenerateMinable.EventType.LAPIS, OreGenEvent.GenerateMinable.EventType.QUARTZ); public final HashSet<ItemStack> mRegisteredOres = new HashSet<>(10000); public final ArrayList<String> mSoundNames = new ArrayList<>(); @@ -151,48 +153,343 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG public final ArrayList<Integer> mSoundCounts = new ArrayList<>(); private final Collection<OreDictEventContainer> mEvents = new HashSet<>(); private final Collection<String> mIgnoredItems = new HashSet<>(Arrays.asList( - "itemGhastTear", "itemFlint", "itemClay", "itemBucketSaltWater", - "itemBucketFreshWater", "itemBucketWater", "itemRock", "itemReed", "itemArrow", "itemSaw", "itemKnife", "itemHammer", "itemChisel", "itemRubber", - "itemEssence", "itemIlluminatedPanel", "itemSkull", "itemRawRubber", "itemBacon", "itemJetpackAccelerator", "itemLazurite", "itemIridium", - "itemTear", "itemClaw", "itemFertilizer", "itemTar", "itemSlimeball", "itemCoke", "itemBeeswax", "itemBeeQueen", "itemForcicium", "itemForcillium", - "itemRoyalJelly", "itemHoneydew", "itemHoney", "itemPollen", "itemReedTypha", "itemSulfuricAcid", "itemPotash", "itemCompressedCarbon", - "itemBitumen", "itemBioFuel", "itemCokeSugar", "itemCokeCactus", "itemCharcoalSugar", "itemCharcoalCactus", "itemSludge", "itemEnrichedAlloy", - "itemQuicksilver", "itemMercury", "itemOsmium", "itemUltimateCircuit", "itemEnergizedStar", "itemAntimatterMolecule", "itemAntimatterGlob", - "itemCoal", "itemBoat", "itemHerbalMedicineCake", "itemCakeSponge", "itemFishandPumpkinCakeSponge", "itemSoulCleaver", "itemInstantCake", - "itemWhippingCream", "itemGlisteningWhippingCream", "itemCleaver", "itemHerbalMedicineWhippingCream", "itemStrangeWhippingCream", - "itemBlazeCleaver", "itemBakedCakeSponge", "itemMagmaCake", "itemGlisteningCake", "itemOgreCleaver", "itemFishandPumpkinCake", - "itemMagmaWhippingCream", "itemMultimeter", "itemSuperconductor")); - private final Collection<String> mIgnoredNames = new HashSet<>(Arrays.asList("grubBee", "chainLink", "candyCane", "bRedString", "bVial", - "bFlask", "anorthositeSmooth", "migmatiteSmooth", "slateSmooth", "travertineSmooth", "limestoneSmooth", "orthogneissSmooth", "marbleSmooth", - "honeyDrop", "lumpClay", "honeyEqualssugar", "flourEqualswheat", "bluestoneInsulated", "blockWaterstone", "blockSand", "blockTorch", - "blockPumpkin", "blockClothRock", "blockStainedHardenedClay", "blockQuartzPillar", "blockQuartzChiselled", "blockSpawner", "blockCloth", "mobHead", - "mobEgg", "enderFlower", "enderChest", "clayHardened", "dayGemMaterial", "nightGemMaterial", "snowLayer", "bPlaceholder", "hardenedClay", - "eternalLifeEssence", "sandstone", "wheatRice", "transdimBlock", "bambooBasket", "lexicaBotania", "livingwoodTwig", "redstoneCrystal", - "pestleAndMortar", "glowstone", "whiteStone", "stoneSlab", "transdimBlock", "clayBowl", "clayPlate", "ceramicBowl", "ceramicPlate", "ovenRack", - "clayCup", "ceramicCup", "batteryBox", "transmutationStone", "torchRedstoneActive", "coal", "charcoal", "cloth", "cobblestoneSlab", - "stoneBrickSlab", "cobblestoneWall", "stoneBrickWall", "cobblestoneStair", "stoneBrickStair", "blockCloud", "blockDirt", "blockTyrian", - "blockCarpet", "blockFft", "blockLavastone", "blockHolystone", "blockConcrete", "sunnariumPart", "brSmallMachineCyaniteProcessor", "meteoriteCoal", - "blockCobble", "pressOreProcessor", "crusherOreProcessor", "grinderOreProcessor", "blockRubber", "blockHoney", "blockHoneydew", "blockPeat", - "blockRadioactive", "blockSlime", "blockCocoa", "blockSugarCane", "blockLeather", "blockClayBrick", "solarPanelHV", "cableRedNet", "stoneBowl", - "crafterWood", "taintedSoil", "brickXyEngineering", "breederUranium", "wireMill", "chunkLazurite", "aluminumNatural", "aluminiumNatural", - "naturalAluminum", "naturalAluminium", "antimatterMilligram", "antimatterGram", "strangeMatter", "coalGenerator", "electricFurnace", - "unfinishedTank", "valvePart", "aquaRegia", "leatherSeal", "leatherSlimeSeal", "hambone", "slimeball", "clay", "enrichedUranium", "camoPaste", - "antiBlock", "burntQuartz", "salmonRaw", "blockHopper", "blockEnderObsidian", "blockIcestone", "blockMagicWood", "blockEnderCore", "blockHeeEndium", - "oreHeeEndPowder", "oreHeeStardust", "oreHeeIgneousRock", "oreHeeInstabilityOrb", "crystalPureFluix", "shardNether", "gemFluorite", - "stickObsidian", "caveCrystal", "shardCrystal", "dyeCrystal", "shardFire", "shardWater", "shardAir", "shardEarth", "ingotRefinedIron", "blockMarble", "ingotUnstable")); - private final Collection<String> mInvalidNames = new HashSet<>(Arrays.asList("diamondShard", "redstoneRoot", "obsidianStick", "bloodstoneOre", - "universalCable", "bronzeTube", "ironTube", "netherTube", "obbyTube", "infiniteBattery", "eliteBattery", "advancedBattery", "10kEUStore", - "blueDye", "MonazitOre", "quartzCrystal", "whiteLuminiteCrystal", "darkStoneIngot", "invisiumIngot", "demoniteOrb", "enderGem", "starconiumGem", - "osmoniumIngot", "tapaziteGem", "zectiumIngot", "foolsRubyGem", "rubyGem", "meteoriteGem", "adamiteShard", "sapphireGem", "copperIngot", - "ironStick", "goldStick", "diamondStick", "reinforcedStick", "draconicStick", "emeraldStick", "copperStick", "tinStick", "silverStick", - "bronzeStick", "steelStick", "leadStick", "manyullynStick", "arditeStick", "cobaltStick", "aluminiumStick", "alumiteStick", "oilsandsOre", - "copperWire", "superconductorWire", "sulfuricAcid", "conveyorBelt", "ironWire", "aluminumWire", "aluminiumWire", "silverWire", "tinWire", - "dustSiliconSmall", "AluminumOre", "plateHeavyT2", "blockWool", "alloyPlateEnergizedHardened", "gasWood", "alloyPlateEnergized", "SilverOre", - "LeadOre", "TinOre", "CopperOre", "silverOre", "leadOre", "tinOre", "copperOre", "bauxiteOre", "HSLivingmetalIngot", "oilMoving", "oilStill", - "oilBucket", "petroleumOre", "dieselFuel", "diamondNugget", "planks", "wood", "stick", "sticks", "naquadah", "obsidianRod", "stoneRod", - "thaumiumRod", "steelRod", "netherrackRod", "woodRod", "ironRod", "cactusRod", "flintRod", "copperRod", "cobaltRod", "alumiteRod", "blueslimeRod", - "arditeRod", "manyullynRod", "bronzeRod", "boneRod", "slimeRod", "redalloyBundled", "bluestoneBundled", "infusedteslatiteInsulated", - "redalloyInsulated", "infusedteslatiteBundled")); + "itemGhastTear", + "itemFlint", + "itemClay", + "itemBucketSaltWater", + "itemBucketFreshWater", + "itemBucketWater", + "itemRock", + "itemReed", + "itemArrow", + "itemSaw", + "itemKnife", + "itemHammer", + "itemChisel", + "itemRubber", + "itemEssence", + "itemIlluminatedPanel", + "itemSkull", + "itemRawRubber", + "itemBacon", + "itemJetpackAccelerator", + "itemLazurite", + "itemIridium", + "itemTear", + "itemClaw", + "itemFertilizer", + "itemTar", + "itemSlimeball", + "itemCoke", + "itemBeeswax", + "itemBeeQueen", + "itemForcicium", + "itemForcillium", + "itemRoyalJelly", + "itemHoneydew", + "itemHoney", + "itemPollen", + "itemReedTypha", + "itemSulfuricAcid", + "itemPotash", + "itemCompressedCarbon", + "itemBitumen", + "itemBioFuel", + "itemCokeSugar", + "itemCokeCactus", + "itemCharcoalSugar", + "itemCharcoalCactus", + "itemSludge", + "itemEnrichedAlloy", + "itemQuicksilver", + "itemMercury", + "itemOsmium", + "itemUltimateCircuit", + "itemEnergizedStar", + "itemAntimatterMolecule", + "itemAntimatterGlob", + "itemCoal", + "itemBoat", + "itemHerbalMedicineCake", + "itemCakeSponge", + "itemFishandPumpkinCakeSponge", + "itemSoulCleaver", + "itemInstantCake", + "itemWhippingCream", + "itemGlisteningWhippingCream", + "itemCleaver", + "itemHerbalMedicineWhippingCream", + "itemStrangeWhippingCream", + "itemBlazeCleaver", + "itemBakedCakeSponge", + "itemMagmaCake", + "itemGlisteningCake", + "itemOgreCleaver", + "itemFishandPumpkinCake", + "itemMagmaWhippingCream", + "itemMultimeter", + "itemSuperconductor")); + private final Collection<String> mIgnoredNames = new HashSet<>(Arrays.asList( + "grubBee", + "chainLink", + "candyCane", + "bRedString", + "bVial", + "bFlask", + "anorthositeSmooth", + "migmatiteSmooth", + "slateSmooth", + "travertineSmooth", + "limestoneSmooth", + "orthogneissSmooth", + "marbleSmooth", + "honeyDrop", + "lumpClay", + "honeyEqualssugar", + "flourEqualswheat", + "bluestoneInsulated", + "blockWaterstone", + "blockSand", + "blockTorch", + "blockPumpkin", + "blockClothRock", + "blockStainedHardenedClay", + "blockQuartzPillar", + "blockQuartzChiselled", + "blockSpawner", + "blockCloth", + "mobHead", + "mobEgg", + "enderFlower", + "enderChest", + "clayHardened", + "dayGemMaterial", + "nightGemMaterial", + "snowLayer", + "bPlaceholder", + "hardenedClay", + "eternalLifeEssence", + "sandstone", + "wheatRice", + "transdimBlock", + "bambooBasket", + "lexicaBotania", + "livingwoodTwig", + "redstoneCrystal", + "pestleAndMortar", + "glowstone", + "whiteStone", + "stoneSlab", + "transdimBlock", + "clayBowl", + "clayPlate", + "ceramicBowl", + "ceramicPlate", + "ovenRack", + "clayCup", + "ceramicCup", + "batteryBox", + "transmutationStone", + "torchRedstoneActive", + "coal", + "charcoal", + "cloth", + "cobblestoneSlab", + "stoneBrickSlab", + "cobblestoneWall", + "stoneBrickWall", + "cobblestoneStair", + "stoneBrickStair", + "blockCloud", + "blockDirt", + "blockTyrian", + "blockCarpet", + "blockFft", + "blockLavastone", + "blockHolystone", + "blockConcrete", + "sunnariumPart", + "brSmallMachineCyaniteProcessor", + "meteoriteCoal", + "blockCobble", + "pressOreProcessor", + "crusherOreProcessor", + "grinderOreProcessor", + "blockRubber", + "blockHoney", + "blockHoneydew", + "blockPeat", + "blockRadioactive", + "blockSlime", + "blockCocoa", + "blockSugarCane", + "blockLeather", + "blockClayBrick", + "solarPanelHV", + "cableRedNet", + "stoneBowl", + "crafterWood", + "taintedSoil", + "brickXyEngineering", + "breederUranium", + "wireMill", + "chunkLazurite", + "aluminumNatural", + "aluminiumNatural", + "naturalAluminum", + "naturalAluminium", + "antimatterMilligram", + "antimatterGram", + "strangeMatter", + "coalGenerator", + "electricFurnace", + "unfinishedTank", + "valvePart", + "aquaRegia", + "leatherSeal", + "leatherSlimeSeal", + "hambone", + "slimeball", + "clay", + "enrichedUranium", + "camoPaste", + "antiBlock", + "burntQuartz", + "salmonRaw", + "blockHopper", + "blockEnderObsidian", + "blockIcestone", + "blockMagicWood", + "blockEnderCore", + "blockHeeEndium", + "oreHeeEndPowder", + "oreHeeStardust", + "oreHeeIgneousRock", + "oreHeeInstabilityOrb", + "crystalPureFluix", + "shardNether", + "gemFluorite", + "stickObsidian", + "caveCrystal", + "shardCrystal", + "dyeCrystal", + "shardFire", + "shardWater", + "shardAir", + "shardEarth", + "ingotRefinedIron", + "blockMarble", + "ingotUnstable")); + private final Collection<String> mInvalidNames = new HashSet<>(Arrays.asList( + "diamondShard", + "redstoneRoot", + "obsidianStick", + "bloodstoneOre", + "universalCable", + "bronzeTube", + "ironTube", + "netherTube", + "obbyTube", + "infiniteBattery", + "eliteBattery", + "advancedBattery", + "10kEUStore", + "blueDye", + "MonazitOre", + "quartzCrystal", + "whiteLuminiteCrystal", + "darkStoneIngot", + "invisiumIngot", + "demoniteOrb", + "enderGem", + "starconiumGem", + "osmoniumIngot", + "tapaziteGem", + "zectiumIngot", + "foolsRubyGem", + "rubyGem", + "meteoriteGem", + "adamiteShard", + "sapphireGem", + "copperIngot", + "ironStick", + "goldStick", + "diamondStick", + "reinforcedStick", + "draconicStick", + "emeraldStick", + "copperStick", + "tinStick", + "silverStick", + "bronzeStick", + "steelStick", + "leadStick", + "manyullynStick", + "arditeStick", + "cobaltStick", + "aluminiumStick", + "alumiteStick", + "oilsandsOre", + "copperWire", + "superconductorWire", + "sulfuricAcid", + "conveyorBelt", + "ironWire", + "aluminumWire", + "aluminiumWire", + "silverWire", + "tinWire", + "dustSiliconSmall", + "AluminumOre", + "plateHeavyT2", + "blockWool", + "alloyPlateEnergizedHardened", + "gasWood", + "alloyPlateEnergized", + "SilverOre", + "LeadOre", + "TinOre", + "CopperOre", + "silverOre", + "leadOre", + "tinOre", + "copperOre", + "bauxiteOre", + "HSLivingmetalIngot", + "oilMoving", + "oilStill", + "oilBucket", + "petroleumOre", + "dieselFuel", + "diamondNugget", + "planks", + "wood", + "stick", + "sticks", + "naquadah", + "obsidianRod", + "stoneRod", + "thaumiumRod", + "steelRod", + "netherrackRod", + "woodRod", + "ironRod", + "cactusRod", + "flintRod", + "copperRod", + "cobaltRod", + "alumiteRod", + "blueslimeRod", + "arditeRod", + "manyullynRod", + "bronzeRod", + "boneRod", + "slimeRod", + "redalloyBundled", + "bluestoneBundled", + "infusedteslatiteInsulated", + "redalloyInsulated", + "infusedteslatiteBundled")); private final DateFormat mDateFormat = DateFormat.getInstance(); public ArrayList<String> mBufferedPlayerActivity = new ArrayList<>(); public final GT_BlockMap<Boolean> mCTMBlockCache = new GT_BlockMap<>(); @@ -222,7 +519,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG private boolean isFirstServerWorldTick = true; private boolean isFirstWorldTick = true; private boolean mOreDictActivated = false; - public boolean mChangeHarvestLevels=false; + public boolean mChangeHarvestLevels = false; public boolean mNerfedCombs = true; public boolean mNerfedCrops = true; public boolean mGTBees = true; @@ -236,9 +533,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG public int mFlintChance = 30; public int mItemDespawnTime = 6000; public int mUpgradeCount = 4; - public int[] mHarvestLevel= new int[1000]; - public int mGraniteHavestLevel=3; - public int mMaxHarvestLevel=7; + public int[] mHarvestLevel = new int[1000]; + public int mGraniteHavestLevel = 3; + public int mMaxHarvestLevel = 7; public int mWireHeatingTicks = 4; public int mPollutionSmogLimit = 550000; public int mPollutionPoisonLimit = 750000; @@ -255,7 +552,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG public int mPollutionLargeSteelBoilerPerSecond = 2000; public int mPollutionLargeTitaniumBoilerPerSecond = 3000; public int mPollutionLargeTungstenSteelBoilerPerSecond = 4000; - public double mPollutionReleasedByThrottle = 1.0/24.0; // divided by 24 because 24 circuit conf + public double mPollutionReleasedByThrottle = 1.0 / 24.0; // divided by 24 because 24 circuit conf public int mPollutionLargeGasTurbinePerSecond = 300; public int mPollutionMultiSmelterPerSecond = 400; public int mPollutionPyrolyseOvenPerSecond = 300; @@ -263,9 +560,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG public int mPollutionHighPressureLavaBoilerPerSecond = 20; public int mPollutionHighPressureCoalBoilerPerSecond = 30; public int mPollutionBaseDieselGeneratorPerSecond = 200; - public double[] mPollutionDieselGeneratorReleasedByTier = new double[]{0.1, 1.0, 0.9, 0.8}; + public double[] mPollutionDieselGeneratorReleasedByTier = new double[] {0.1, 1.0, 0.9, 0.8}; public int mPollutionBaseGasTurbinePerSecond = 200; - public double[] mPollutionGasTurbineReleasedByTier = new double[]{0.1, 1.0, 0.9, 0.8}; + public double[] mPollutionGasTurbineReleasedByTier = new double[] {0.1, 1.0, 0.9, 0.8}; public final GT_UO_DimensionList mUndergroundOil = new GT_UO_DimensionList(); public int mTicksUntilNextCraftSound = 0; public double mMagneticraftBonusOutputPercent = 0d; @@ -436,29 +733,31 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG oreDictBurnTimes.put("dustTinyDiamond", 11378); } - - public GT_Proxy() { GameRegistry.registerFuelHandler(this); MinecraftForge.EVENT_BUS.register(this); MinecraftForge.ORE_GEN_BUS.register(this); FMLCommonHandler.instance().bus().register(this); - GregTech_API.sThaumcraftCompat = (IThaumcraftCompat) GT_Utility.callConstructor("gregtech.common.GT_ThaumcraftCompat", 0, null, GT_Values.D1, - new Object[0]); - for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) { + GregTech_API.sThaumcraftCompat = (IThaumcraftCompat) + GT_Utility.callConstructor("gregtech.common.GT_ThaumcraftCompat", 0, null, GT_Values.D1, new Object[0]); + for (FluidContainerRegistry.FluidContainerData tData : + FluidContainerRegistry.getRegisteredFluidContainerData()) { onFluidContainerRegistration(new FluidContainerRegistry.FluidContainerRegisterEvent(tData)); } try { for (String tOreName : OreDictionary.getOreNames()) { ItemStack tOreStack; - for (Iterator i$ = OreDictionary.getOres(tOreName).iterator(); i$.hasNext(); registerOre(new OreDictionary.OreRegisterEvent(tOreName, tOreStack))) { + for (Iterator i$ = OreDictionary.getOres(tOreName).iterator(); + i$.hasNext(); + registerOre(new OreDictionary.OreRegisterEvent(tOreName, tOreStack))) { tOreStack = (ItemStack) i$.next(); } } - } catch (Throwable e) {e.printStackTrace(GT_Log.err);} + } catch (Throwable e) { + e.printStackTrace(GT_Log.err); + } } - public void onPreLoad() { GT_Log.out.println("GT_Mod: Preload-Phase started!"); GT_Log.ore.println("GT_Mod: Preload-Phase started!"); @@ -467,7 +766,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG this.mIgnoreTcon = GregTech_API.sOPStuff.get(ConfigCategories.general, "ignoreTConstruct", true); this.mWireHeatingTicks = GregTech_API.sOPStuff.get(ConfigCategories.general, "WireHeatingTicks", 4); NetworkRegistry.INSTANCE.registerGuiHandler(GT_Values.GT, this); - for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) { + for (FluidContainerRegistry.FluidContainerData tData : + FluidContainerRegistry.getRegisteredFluidContainerData()) { if ((tData.filledContainer.getItem() == Items.potionitem) && (tData.filledContainer.getItemDamage() == 0)) { tData.fluid.amount = 0; break; @@ -515,7 +815,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG ItemList.FR_Bee_Drone.set(GT_ModHandler.getModItem(aTextForestry, "beeDroneGE", 1L)); ItemList.FR_Bee_Princess.set(GT_ModHandler.getModItem(aTextForestry, "beePrincessGE", 1L)); ItemList.FR_Bee_Queen.set(GT_ModHandler.getModItem(aTextForestry, "beeQueenGE", 1L)); - ItemList.FR_Tree_Sapling.set(GT_ModHandler.getModItem(aTextForestry, "sapling", 1L, GT_ModHandler.getModItem(aTextForestry, "saplingGE", 1L))); + ItemList.FR_Tree_Sapling.set(GT_ModHandler.getModItem( + aTextForestry, "sapling", 1L, GT_ModHandler.getModItem(aTextForestry, "saplingGE", 1L))); ItemList.FR_Butterfly.set(GT_ModHandler.getModItem(aTextForestry, "butterflyGE", 1L)); ItemList.FR_Larvae.set(GT_ModHandler.getModItem(aTextForestry, "beeLarvaeGE", 1L)); ItemList.FR_Serum.set(GT_ModHandler.getModItem(aTextForestry, "serumGE", 1L)); @@ -529,10 +830,12 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG ItemList.Bottle_Empty.set(new ItemStack(Items.glass_bottle, 1)); ItemList.Cell_Universal_Fluid.set(GT_ModHandler.getIC2Item("FluidCell", 1L)); - ItemList.Cell_Empty.set(GT_ModHandler.getIC2Item("cell", 1L, GT_ModHandler.getIC2Item("cellEmpty", 1L, GT_ModHandler.getIC2Item("emptyCell", 1L)))); + ItemList.Cell_Empty.set(GT_ModHandler.getIC2Item( + "cell", 1L, GT_ModHandler.getIC2Item("cellEmpty", 1L, GT_ModHandler.getIC2Item("emptyCell", 1L)))); ItemList.Cell_Water.set(GT_ModHandler.getIC2Item("waterCell", 1L, GT_ModHandler.getIC2Item("cellWater", 1L))); ItemList.Cell_Lava.set(GT_ModHandler.getIC2Item("lavaCell", 1L, GT_ModHandler.getIC2Item("cellLava", 1L))); - ItemList.Cell_Air.set(GT_ModHandler.getIC2Item("airCell", 1L, GT_ModHandler.getIC2Item("cellAir", 1L, GT_ModHandler.getIC2Item("cellOxygen", 1L)))); + ItemList.Cell_Air.set(GT_ModHandler.getIC2Item( + "airCell", 1L, GT_ModHandler.getIC2Item("cellAir", 1L, GT_ModHandler.getIC2Item("cellOxygen", 1L)))); ItemList.IC2_Item_Casing_Iron.set(GT_ModHandler.getIC2Item("casingiron", 1L)); ItemList.IC2_Item_Casing_Gold.set(GT_ModHandler.getIC2Item("casinggold", 1L)); @@ -542,7 +845,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG ItemList.IC2_Item_Casing_Lead.set(GT_ModHandler.getIC2Item("casinglead", 1L)); ItemList.IC2_Item_Casing_Steel.set(GT_ModHandler.getIC2Item("casingadviron", 1L)); ItemList.IC2_Spray_WeedEx.set(GT_ModHandler.getIC2Item("weedEx", 1L)); - ItemList.IC2_Fuel_Can_Empty.set(GT_ModHandler.getIC2Item("fuelCan", 1L, GT_ModHandler.getIC2Item("fuelCanEmpty", 1L, GT_ModHandler.getIC2Item("emptyFuelCan", 1L)))); + ItemList.IC2_Fuel_Can_Empty.set(GT_ModHandler.getIC2Item( + "fuelCan", + 1L, + GT_ModHandler.getIC2Item("fuelCanEmpty", 1L, GT_ModHandler.getIC2Item("emptyFuelCan", 1L)))); ItemList.IC2_Fuel_Can_Filled.set(GT_ModHandler.getIC2Item("filledFuelCan", 1L)); ItemList.IC2_Mixed_Metal_Ingot.set(GT_ModHandler.getIC2Item("mixedMetalIngot", 1L)); ItemList.IC2_Fertilizer.set(GT_ModHandler.getIC2Item("fertilizer", 1L)); @@ -551,7 +857,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG ItemList.IC2_Hops.set(GT_ModHandler.getIC2Item("hops", 1L)); ItemList.IC2_Resin.set(GT_ModHandler.getIC2Item("resin", 1L)); ItemList.IC2_Plantball.set(GT_ModHandler.getIC2Item("plantBall", 1L)); - ItemList.IC2_PlantballCompressed.set(GT_ModHandler.getIC2Item("compressedPlantBall", 1L, ItemList.IC2_Plantball.get(1L))); + ItemList.IC2_PlantballCompressed.set( + GT_ModHandler.getIC2Item("compressedPlantBall", 1L, ItemList.IC2_Plantball.get(1L))); ItemList.IC2_Crop_Seeds.set(GT_ModHandler.getIC2Item("cropSeed", 1L)); ItemList.IC2_Grin_Powder.set(GT_ModHandler.getIC2Item("grinPowder", 1L)); ItemList.IC2_Energium_Dust.set(GT_ModHandler.getIC2Item("energiumDust", 1L)); @@ -561,7 +868,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG ItemList.IC2_Food_Can_Empty.set(GT_ModHandler.getIC2Item("tinCan", 1L)); ItemList.IC2_Food_Can_Filled.set(GT_ModHandler.getIC2Item("filledTinCan", 1L, 0)); ItemList.IC2_Food_Can_Spoiled.set(GT_ModHandler.getIC2Item("filledTinCan", 1L, 1)); - ItemList.IC2_Industrial_Diamond.set(GT_ModHandler.getIC2Item("industrialDiamond", 1L, new ItemStack(Items.diamond, 1))); + ItemList.IC2_Industrial_Diamond.set( + GT_ModHandler.getIC2Item("industrialDiamond", 1L, new ItemStack(Items.diamond, 1))); ItemList.IC2_Compressed_Coal_Ball.set(GT_ModHandler.getIC2Item("compressedCoalBall", 1L)); ItemList.IC2_Compressed_Coal_Chunk.set(GT_ModHandler.getIC2Item("coalChunk", 1L)); ItemList.IC2_ShaftIron.set(GT_ModHandler.getIC2Item("ironshaft", 1L)); @@ -606,8 +914,6 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG OrePrefixes.cellMolten.mContainerItem = ItemList.Cell_Empty.get(1L); OrePrefixes.cell.mContainerItem = ItemList.Cell_Empty.get(1L); - - GT_ModHandler.sNonReplaceableItems.add(new ItemStack(Items.bow, 1, 32767)); GT_ModHandler.sNonReplaceableItems.add(new ItemStack(Items.fishing_rod, 1, 32767)); GT_ModHandler.sNonReplaceableItems.add(ItemList.IC2_ForgeHammer.getWithDamage(1L, 32767L)); @@ -630,7 +936,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getIC2Item("orangePainter", 1L, 32767)); GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getIC2Item("whitePainter", 1L, 32767)); GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getIC2Item("cfPack", 1L, 32767)); - //GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getIC2Item("jetpack", 1L, 32767)); + // GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getIC2Item("jetpack", 1L, 32767)); GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getIC2Item("treetap", 1L, 32767)); GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getIC2Item("weedEx", 1L, 32767)); GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getIC2Item("staticBoots", 1L, 32767)); @@ -655,8 +961,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(MOD_ID_TF, "item.yetiPlate", 1L, 32767)); GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(MOD_ID_TF, "item.yetiLegs", 1L, 32767)); GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(MOD_ID_TF, "item.yetiBoots", 1L, 32767)); - GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem("appliedenergistics2", "item.ToolCertusQuartzCuttingKnife", 1L, 32767)); - GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem("appliedenergistics2", "item.ToolNetherQuartzCuttingKnife", 1L, 32767)); + GT_ModHandler.sNonReplaceableItems.add( + GT_ModHandler.getModItem("appliedenergistics2", "item.ToolCertusQuartzCuttingKnife", 1L, 32767)); + GT_ModHandler.sNonReplaceableItems.add( + GT_ModHandler.getModItem("appliedenergistics2", "item.ToolNetherQuartzCuttingKnife", 1L, 32767)); GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(aTextForestry, "apiaristHelmet", 1L, 32767)); GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(aTextForestry, "apiaristChest", 1L, 32767)); GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(aTextForestry, "apiaristLegs", 1L, 32767)); @@ -665,11 +973,21 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(aTextForestry, "frameImpregnated", 1L, 32767)); GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(aTextForestry, "frameProven", 1L, 32767)); GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(aTextForestry, "waxCast", 1L, 32767)); - GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem("GalacticraftCore", "item.sensorGlasses", 1L, 32767)); - GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem("IC2NuclearControl", "ItemToolThermometer", 1L, 32767)); - - RecipeSorter.register("gregtech:shaped", GT_Shaped_Recipe.class, RecipeSorter.Category.SHAPED, "after:minecraft:shaped before:minecraft:shapeless"); - RecipeSorter.register("gregtech:shapeless", GT_Shapeless_Recipe.class, RecipeSorter.Category.SHAPELESS, "after:minecraft:shapeless"); + GT_ModHandler.sNonReplaceableItems.add( + GT_ModHandler.getModItem("GalacticraftCore", "item.sensorGlasses", 1L, 32767)); + GT_ModHandler.sNonReplaceableItems.add( + GT_ModHandler.getModItem("IC2NuclearControl", "ItemToolThermometer", 1L, 32767)); + + RecipeSorter.register( + "gregtech:shaped", + GT_Shaped_Recipe.class, + RecipeSorter.Category.SHAPED, + "after:minecraft:shaped before:minecraft:shapeless"); + RecipeSorter.register( + "gregtech:shapeless", + GT_Shapeless_Recipe.class, + RecipeSorter.Category.SHAPELESS, + "after:minecraft:shapeless"); // Register chunk manager with Forge GT_ChunkManager.init(); @@ -678,24 +996,39 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG public void onLoad() { GT_Log.out.println("GT_Mod: Beginning Load-Phase."); GT_Log.ore.println("GT_Mod: Beginning Load-Phase."); - GT_OreDictUnificator.registerOre("cropChilipepper", GT_ModHandler.getModItem("magicalcrops", "magicalcrops_CropProduce", 1L, 2)); - GT_OreDictUnificator.registerOre("cropTomato", GT_ModHandler.getModItem("magicalcrops", "magicalcrops_CropProduce", 1L, 8)); - GT_OreDictUnificator.registerOre("cropGrape", GT_ModHandler.getModItem("magicalcrops", "magicalcrops_CropProduce", 1L, 4)); + GT_OreDictUnificator.registerOre( + "cropChilipepper", GT_ModHandler.getModItem("magicalcrops", "magicalcrops_CropProduce", 1L, 2)); + GT_OreDictUnificator.registerOre( + "cropTomato", GT_ModHandler.getModItem("magicalcrops", "magicalcrops_CropProduce", 1L, 8)); + GT_OreDictUnificator.registerOre( + "cropGrape", GT_ModHandler.getModItem("magicalcrops", "magicalcrops_CropProduce", 1L, 4)); GT_OreDictUnificator.registerOre("cropTea", GT_ModHandler.getModItem("ganyssurface", "teaLeaves", 1L, 0)); // Clay buckets, which don't get registered until Iguana Tweaks pre-init if (Loader.isModLoaded("IguanaTweaksTConstruct")) { - OrePrefixes.bucketClay.mContainerItem = GT_ModHandler.getModItem("IguanaTweaksTConstruct", "clayBucketFired", 1L, 0); - GT_OreDictUnificator.set(OrePrefixes.bucketClay, Materials.Empty, GT_ModHandler.getModItem("IguanaTweaksTConstruct", "clayBucketFired", 1L, 0)); - GT_OreDictUnificator.set(OrePrefixes.bucketClay, Materials.Water, GT_ModHandler.getModItem("IguanaTweaksTConstruct", "clayBucketWater", 1L, 0)); - GT_OreDictUnificator.set(OrePrefixes.bucketClay, Materials.Lava, GT_ModHandler.getModItem("IguanaTweaksTConstruct", "clayBucketLava", 1L, 0)); - GT_OreDictUnificator.set(OrePrefixes.bucketClay, Materials.Milk, GT_ModHandler.getModItem("IguanaTweaksTConstruct", "clayBucketMilk", 1L, 0)); - - FluidContainerRegistry.registerFluidContainer( - new FluidContainerRegistry.FluidContainerData( - Materials.Milk.getFluid(1000L), - GT_OreDictUnificator.get(OrePrefixes.bucketClay, Materials.Milk, 1L), - GT_OreDictUnificator.get(OrePrefixes.bucketClay, Materials.Empty, 1L))); + OrePrefixes.bucketClay.mContainerItem = + GT_ModHandler.getModItem("IguanaTweaksTConstruct", "clayBucketFired", 1L, 0); + GT_OreDictUnificator.set( + OrePrefixes.bucketClay, + Materials.Empty, + GT_ModHandler.getModItem("IguanaTweaksTConstruct", "clayBucketFired", 1L, 0)); + GT_OreDictUnificator.set( + OrePrefixes.bucketClay, + Materials.Water, + GT_ModHandler.getModItem("IguanaTweaksTConstruct", "clayBucketWater", 1L, 0)); + GT_OreDictUnificator.set( + OrePrefixes.bucketClay, + Materials.Lava, + GT_ModHandler.getModItem("IguanaTweaksTConstruct", "clayBucketLava", 1L, 0)); + GT_OreDictUnificator.set( + OrePrefixes.bucketClay, + Materials.Milk, + GT_ModHandler.getModItem("IguanaTweaksTConstruct", "clayBucketMilk", 1L, 0)); + + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + Materials.Milk.getFluid(1000L), + GT_OreDictUnificator.get(OrePrefixes.bucketClay, Materials.Milk, 1L), + GT_OreDictUnificator.get(OrePrefixes.bucketClay, Materials.Empty, 1L))); } // IC2 Hazmat @@ -712,7 +1045,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG addFullHazmatToIC2Item("quantumLeggings"); addFullHazmatToIC2Item("quantumBoots"); - //GraviSuite Hazmat + // GraviSuite Hazmat addFullHazmatToGeneralItem("GraviSuite", "graviChestPlate", 1L); addFullHazmatToGeneralItem("GraviSuite", "advNanoChestPlate", 1L); @@ -736,12 +1069,12 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG addFullHazmatToGeneralItem("DraconicEvolution", "wyvernLeggs", 1L, 0); addFullHazmatToGeneralItem("DraconicEvolution", "wyvernChest", 1L, 0); - //AdvancedSolarPanel + // AdvancedSolarPanel addFullHazmatToGeneralItem("AdvancedSolarPanel", "advanced_solar_helmet", 1L); addFullHazmatToGeneralItem("AdvancedSolarPanel", "hybrid_solar_helmet", 1L); addFullHazmatToGeneralItem("AdvancedSolarPanel", "ultimate_solar_helmet", 1L); - //TaintedMagic Hazmat + // TaintedMagic Hazmat addFullHazmatToGeneralItem("TaintedMagic", "ItemVoidwalkerBoots", 1L); addFullHazmatToGeneralItem("TaintedMagic", "ItemShadowFortressHelmet", 1L); addFullHazmatToGeneralItem("TaintedMagic", "ItemShadowFortressChestplate", 1L); @@ -751,19 +1084,19 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG addFullHazmatToGeneralItem("TaintedMagic", "ItemVoidFortressLeggings", 1L); addFullHazmatToGeneralItem("TaintedMagic", "ItemVoidmetalGoggles", 1L); - //WitchingGadgets Hazmat + // WitchingGadgets Hazmat addFullHazmatToGeneralItem("WitchingGadgets", "item.WG_PrimordialHelm", 1L); addFullHazmatToGeneralItem("WitchingGadgets", "item.WG_PrimordialChest", 1L); addFullHazmatToGeneralItem("WitchingGadgets", "item.WG_PrimordialLegs", 1L); addFullHazmatToGeneralItem("WitchingGadgets", "item.WG_PrimordialBoots", 1L); - //ThaumicTinkerer Hazmat + // ThaumicTinkerer Hazmat addFullHazmatToGeneralItem("ThaumicTinkerer", "ichorclothChestGem", 1L); addFullHazmatToGeneralItem("ThaumicTinkerer", "ichorclothBootsGem", 1L); addFullHazmatToGeneralItem("ThaumicTinkerer", "ichorclothHelmGem", 1L); addFullHazmatToGeneralItem("ThaumicTinkerer", "ichorclothLegsGem", 1L); - //GalaxySpace Hazmat + // GalaxySpace Hazmat addFullHazmatToGeneralItem("GalaxySpace", "item.spacesuit_helmet", 1L); addFullHazmatToGeneralItem("GalaxySpace", "item.spacesuit_helmetglasses", 1L); addFullHazmatToGeneralItem("GalaxySpace", "item.spacesuit_plate", 1L); @@ -772,20 +1105,21 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG addFullHazmatToGeneralItem("GalaxySpace", "item.spacesuit_boots", 1L); addFullHazmatToGeneralItem("GalaxySpace", "item.spacesuit_gravityboots", 1L); - //Extra Hazmat + // Extra Hazmat GregTech_API.sElectroHazmatList.add(new ItemStack(Items.chainmail_helmet, 1, W)); GregTech_API.sElectroHazmatList.add(new ItemStack(Items.chainmail_chestplate, 1, W)); GregTech_API.sElectroHazmatList.add(new ItemStack(Items.chainmail_leggings, 1, W)); GregTech_API.sElectroHazmatList.add(new ItemStack(Items.chainmail_boots, 1, W)); - //Infinity Hazmat + // Infinity Hazmat addFullHazmatToGeneralItem("Avaritia", "Infinity_Helm", 1L); addFullHazmatToGeneralItem("Avaritia", "Infinity_Chest", 1L); addFullHazmatToGeneralItem("Avaritia", "Infinity_Pants", 1L); addFullHazmatToGeneralItem("Avaritia", "Infinity_Shoes", 1L); GregTech_API.sLoadStarted = true; - for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) { + for (FluidContainerRegistry.FluidContainerData tData : + FluidContainerRegistry.getRegisteredFluidContainerData()) { if ((tData.filledContainer.getItem() == Items.potionitem) && (tData.filledContainer.getItemDamage() == 0)) { tData.fluid.amount = 0; break; @@ -794,7 +1128,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG GT_LanguageManager.writePlaceholderStrings(); } - public static long tBits = GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.ONLY_ADD_IF_RESULT_IS_NOT_NULL | GT_ModHandler.RecipeBits.NOT_REMOVABLE; + public static long tBits = GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED + | GT_ModHandler.RecipeBits.ONLY_ADD_IF_RESULT_IS_NOT_NULL + | GT_ModHandler.RecipeBits.NOT_REMOVABLE; + public void onPostLoad() { GT_Log.out.println("GT_Mod: Beginning PostLoad-Phase."); GT_Log.ore.println("GT_Mod: Beginning PostLoad-Phase."); @@ -808,8 +1146,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG GT_MetaGenerated_Item_98.init(); GT_OreDictUnificator.addItemData(new ItemStack(Items.iron_door, 1), new ItemData(Materials.Iron, 21772800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Items.wooden_door, 1, 32767), new ItemData(Materials.Wood, 21772800L)); - for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) { + GT_OreDictUnificator.addItemData( + new ItemStack(Items.wooden_door, 1, 32767), new ItemData(Materials.Wood, 21772800L)); + for (FluidContainerRegistry.FluidContainerData tData : + FluidContainerRegistry.getRegisteredFluidContainerData()) { if ((tData.filledContainer.getItem() == Items.potionitem) && (tData.filledContainer.getItemDamage() == 0)) { tData.fluid.amount = 0; break; @@ -824,44 +1164,74 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } } } - } catch (Throwable e) {e.printStackTrace(GT_Log.err);} + } catch (Throwable e) { + e.printStackTrace(GT_Log.err); + } GT_Log.out.println("GT_Mod: Adding Tool Usage Crafting Recipes for OreDict Items."); for (Materials aMaterial : Materials.values()) { if ((aMaterial.mUnificatable) && (aMaterial.mMaterialInto == aMaterial)) { - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), tBits, new Object[]{"h", "X", - 'X', OrePrefixes.crushedCentrifuged.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), tBits, new Object[]{"h", "X", - 'X', OrePrefixes.crystalline.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), tBits, new Object[]{"h", "X", - 'X', OrePrefixes.crystal.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial.mMacerateInto, 1L), tBits, new Object[]{"h", "X", - 'X', OrePrefixes.crushedPurified.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial.mMacerateInto, 1L), tBits, new Object[]{"h", "X", - 'X', OrePrefixes.cleanGravel.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial.mMacerateInto, 1L), tBits, new Object[]{"h", "X", - 'X', OrePrefixes.reduced.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L), tBits, new Object[]{"h", "X", - 'X', OrePrefixes.clump.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L), tBits, new Object[]{"h", "X", - 'X', OrePrefixes.shard.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L), tBits, new Object[]{"h", "X", - 'X', OrePrefixes.crushed.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L), tBits, new Object[]{"h", "X", - 'X', OrePrefixes.dirtyGravel.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 4L), tBits, - new Object[]{" X ", 'X', OrePrefixes.dust.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 9L), tBits, - new Object[]{"X ", 'X', OrePrefixes.dust.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), tBits, - new Object[]{"XX", "XX", 'X', OrePrefixes.dustSmall.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), tBits, - new Object[]{"XXX", "XXX", "XXX", 'X', OrePrefixes.dustTiny.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), + tBits, + new Object[] {"h", "X", 'X', OrePrefixes.crushedCentrifuged.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), + tBits, + new Object[] {"h", "X", 'X', OrePrefixes.crystalline.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), + tBits, + new Object[] {"h", "X", 'X', OrePrefixes.crystal.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial.mMacerateInto, 1L), + tBits, + new Object[] {"h", "X", 'X', OrePrefixes.crushedPurified.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial.mMacerateInto, 1L), + tBits, + new Object[] {"h", "X", 'X', OrePrefixes.cleanGravel.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial.mMacerateInto, 1L), + tBits, + new Object[] {"h", "X", 'X', OrePrefixes.reduced.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L), + tBits, + new Object[] {"h", "X", 'X', OrePrefixes.clump.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L), + tBits, + new Object[] {"h", "X", 'X', OrePrefixes.shard.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L), + tBits, + new Object[] {"h", "X", 'X', OrePrefixes.crushed.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L), + tBits, + new Object[] {"h", "X", 'X', OrePrefixes.dirtyGravel.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 4L), + tBits, + new Object[] {" X ", 'X', OrePrefixes.dust.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 9L), + tBits, + new Object[] {"X ", 'X', OrePrefixes.dust.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), + tBits, + new Object[] {"XX", "XX", 'X', OrePrefixes.dustSmall.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), + tBits, + new Object[] {"XXX", "XXX", "XXX", 'X', OrePrefixes.dustTiny.get(aMaterial)}); } } } - public void onServerAboutToStart(){ - dimensionWisePollution.clear();//!!! IMPORTANT for map switching... + public void onServerAboutToStart() { + dimensionWisePollution.clear(); // !!! IMPORTANT for map switching... GT_ChunkAssociatedData.clearAll(); } @@ -871,7 +1241,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG this.mUniverse = null; this.isFirstServerWorldTick = true; - for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) { + for (FluidContainerRegistry.FluidContainerData tData : + FluidContainerRegistry.getRegisteredFluidContainerData()) { if ((tData.filledContainer.getItem() == Items.potionitem) && (tData.filledContainer.getItemDamage() == 0)) { tData.fluid.amount = 0; break; @@ -885,14 +1256,17 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } } } - } catch (Throwable e) {e.printStackTrace(GT_Log.err);} + } catch (Throwable e) { + e.printStackTrace(GT_Log.err); + } } public void onServerStarted() { GregTech_API.sWirelessRedstone.clear(); GT_FluidStack.fixAllThoseFuckingFluidIDs(); - GT_Log.out.println("GT_Mod: Cleaning up all OreDict Crafting Recipes, which have an empty List in them, since they are never meeting any Condition."); + GT_Log.out.println( + "GT_Mod: Cleaning up all OreDict Crafting Recipes, which have an empty List in them, since they are never meeting any Condition."); List tList = CraftingManager.getInstance().getRecipeList(); for (int i = 0; i < tList.size(); i++) { if ((tList.get(i) instanceof ShapedOreRecipe)) { @@ -927,16 +1301,17 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } } } - } catch (Throwable e) {e.printStackTrace(GT_Log.err);} + } catch (Throwable e) { + e.printStackTrace(GT_Log.err); + } } this.mUniverse = null; - //GT_ChunkAssociatedData.saveAll(); todo: figure out if this is needed + // GT_ChunkAssociatedData.saveAll(); todo: figure out if this is needed } @SubscribeEvent - public void onClientConnectedToServerEvent(FMLNetworkEvent.ClientConnectedToServerEvent aEvent) { - } + public void onClientConnectedToServerEvent(FMLNetworkEvent.ClientConnectedToServerEvent aEvent) {} public int getReloadCount() { return 0; @@ -944,9 +1319,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG @SubscribeEvent public void onArrowNockEvent(ArrowNockEvent aEvent) { - if ((!aEvent.isCanceled()) && (GT_Utility.isStackValid(aEvent.result)) + if ((!aEvent.isCanceled()) + && (GT_Utility.isStackValid(aEvent.result)) && (GT_Utility.getProjectile(SubTag.PROJECTILE_ARROW, aEvent.entityPlayer.inventory) != null)) { - aEvent.entityPlayer.setItemInUse(aEvent.result, aEvent.result.getItem().getMaxItemUseDuration(aEvent.result)); + aEvent.entityPlayer.setItemInUse( + aEvent.result, aEvent.result.getItem().getMaxItemUseDuration(aEvent.result)); aEvent.setCanceled(true); } } @@ -954,7 +1331,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG @SubscribeEvent public void onArrowLooseEvent(ArrowLooseEvent aEvent) { ItemStack aArrow = GT_Utility.getProjectile(SubTag.PROJECTILE_ARROW, aEvent.entityPlayer.inventory); - if ((!aEvent.isCanceled()) && (GT_Utility.isStackValid(aEvent.bow)) && (aArrow != null) && ((aEvent.bow.getItem() instanceof ItemBow))) { + if ((!aEvent.isCanceled()) + && (GT_Utility.isStackValid(aEvent.bow)) + && (aArrow != null) + && ((aEvent.bow.getItem() instanceof ItemBow))) { float tSpeed = aEvent.charge / 20.0F; tSpeed = (tSpeed * tSpeed + tSpeed * 2.0F) / 3.0F; if (tSpeed < 0.1D) { @@ -963,8 +1343,13 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG if (tSpeed > 1.0D) { tSpeed = 1.0F; } - EntityArrow tArrowEntity = ((IProjectileItem) aArrow.getItem()).getProjectile(SubTag.PROJECTILE_ARROW, aArrow, aEvent.entityPlayer.worldObj, - aEvent.entityPlayer, tSpeed * 2.0F); + EntityArrow tArrowEntity = ((IProjectileItem) aArrow.getItem()) + .getProjectile( + SubTag.PROJECTILE_ARROW, + aArrow, + aEvent.entityPlayer.worldObj, + aEvent.entityPlayer, + tSpeed * 2.0F); if (tSpeed >= 1.0F) { tArrowEntity.setIsCritical(true); } @@ -1007,7 +1392,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG @SubscribeEvent public void onEndermanTeleportEvent(EnderTeleportEvent aEvent) { - if (((aEvent.entityLiving instanceof EntityEnderman)) && (aEvent.entityLiving.getActivePotionEffect(Potion.weakness) != null)) { + if (((aEvent.entityLiving instanceof EntityEnderman)) + && (aEvent.entityLiving.getActivePotionEffect(Potion.weakness) != null)) { aEvent.setCanceled(true); } } @@ -1016,13 +1402,17 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG public void onEntitySpawningEvent(EntityJoinWorldEvent aEvent) { if ((aEvent.entity != null) && (!aEvent.entity.worldObj.isRemote)) { if ((aEvent.entity instanceof EntityItem)) { - ((EntityItem) aEvent.entity).setEntityItemStack(GT_OreDictUnificator.get(((EntityItem) aEvent.entity).getEntityItem())); + ((EntityItem) aEvent.entity) + .setEntityItemStack(GT_OreDictUnificator.get(((EntityItem) aEvent.entity).getEntityItem())); } - if ((this.mSkeletonsShootGTArrows > 0) && (aEvent.entity.getClass() == EntityArrow.class) + if ((this.mSkeletonsShootGTArrows > 0) + && (aEvent.entity.getClass() == EntityArrow.class) && (aEvent.entity.worldObj.rand.nextInt(this.mSkeletonsShootGTArrows) == 0) && ((((EntityArrow) aEvent.entity).shootingEntity instanceof EntitySkeleton))) { - aEvent.entity.worldObj.spawnEntityInWorld(new GT_Entity_Arrow((EntityArrow) aEvent.entity, OrePrefixes.arrowGtWood.mPrefixedItems - .get(aEvent.entity.worldObj.rand.nextInt(OrePrefixes.arrowGtWood.mPrefixedItems.size())))); + aEvent.entity.worldObj.spawnEntityInWorld(new GT_Entity_Arrow( + (EntityArrow) aEvent.entity, + OrePrefixes.arrowGtWood.mPrefixedItems.get( + aEvent.entity.worldObj.rand.nextInt(OrePrefixes.arrowGtWood.mPrefixedItems.size())))); aEvent.entity.setDead(); } } @@ -1030,7 +1420,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG @SubscribeEvent public void onOreGenEvent(OreGenEvent.GenerateMinable aGenerator) { - if ((this.mDisableVanillaOres) && ((aGenerator.generator instanceof WorldGenMinable)) && (PREVENTED_ORES.contains(aGenerator.type))) { + if ((this.mDisableVanillaOres) + && ((aGenerator.generator instanceof WorldGenMinable)) + && (PREVENTED_ORES.contains(aGenerator.type))) { aGenerator.setResult(Result.DENY); } } @@ -1041,18 +1433,28 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG @SubscribeEvent public void onPlayerInteraction(PlayerInteractEvent aEvent) { - if ((aEvent.entityPlayer == null) || (aEvent.entityPlayer.worldObj == null) || (aEvent.action == null) || (aEvent.world.provider == null)) { + if ((aEvent.entityPlayer == null) + || (aEvent.entityPlayer.worldObj == null) + || (aEvent.action == null) + || (aEvent.world.provider == null)) { return; } - if ((!aEvent.entityPlayer.worldObj.isRemote) && (aEvent.action != PlayerInteractEvent.Action.RIGHT_CLICK_AIR) + if ((!aEvent.entityPlayer.worldObj.isRemote) + && (aEvent.action != PlayerInteractEvent.Action.RIGHT_CLICK_AIR) && (GT_Log.pal != null)) { - this.mBufferedPlayerActivity.add(getDataAndTime() + ";" + aEvent.action.name() + ";" + aEvent.entityPlayer.getDisplayName() + ";DIM:" - + aEvent.world.provider.dimensionId + ";" + aEvent.x + ";" + aEvent.y + ";" + aEvent.z + ";|;" + aEvent.x / 10 + ";" + aEvent.y / 10 + ";" - + aEvent.z / 10); + this.mBufferedPlayerActivity.add( + getDataAndTime() + ";" + aEvent.action.name() + ";" + aEvent.entityPlayer.getDisplayName() + ";DIM:" + + aEvent.world.provider.dimensionId + ";" + aEvent.x + ";" + aEvent.y + ";" + aEvent.z + + ";|;" + aEvent.x / 10 + ";" + aEvent.y / 10 + ";" + + aEvent.z / 10); } ItemStack aStack = aEvent.entityPlayer.getCurrentEquippedItem(); - if ((aStack != null) && (aEvent.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) && (aStack.getItem() == Items.flint_and_steel)) { - if ((!aEvent.world.isRemote) && (!aEvent.entityPlayer.capabilities.isCreativeMode) && (aEvent.world.rand.nextInt(100) >= this.mFlintChance)) { + if ((aStack != null) + && (aEvent.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) + && (aStack.getItem() == Items.flint_and_steel)) { + if ((!aEvent.world.isRemote) + && (!aEvent.entityPlayer.capabilities.isCreativeMode) + && (aEvent.world.rand.nextInt(100) >= this.mFlintChance)) { aEvent.setCanceled(true); aStack.damageItem(1, aEvent.entityPlayer); if (aStack.getItemDamage() >= aStack.getMaxDamage()) { @@ -1070,15 +1472,28 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG public void onBlockHarvestingEvent(BlockEvent.HarvestDropsEvent aEvent) { if (aEvent.harvester != null) { if ((!aEvent.world.isRemote) && (GT_Log.pal != null)) { - this.mBufferedPlayerActivity.add(getDataAndTime() + ";HARVEST_BLOCK;" + aEvent.harvester.getDisplayName() + ";DIM:" - + aEvent.world.provider.dimensionId + ";" + aEvent.x + ";" + aEvent.y + ";" + aEvent.z + ";|;" + aEvent.x / 10 + ";" + aEvent.y / 10 - + ";" + aEvent.z / 10); + this.mBufferedPlayerActivity.add( + getDataAndTime() + ";HARVEST_BLOCK;" + aEvent.harvester.getDisplayName() + ";DIM:" + + aEvent.world.provider.dimensionId + ";" + aEvent.x + ";" + aEvent.y + ";" + aEvent.z + + ";|;" + aEvent.x / 10 + ";" + aEvent.y / 10 + + ";" + aEvent.z / 10); } ItemStack aStack = aEvent.harvester.getCurrentEquippedItem(); if (aStack != null) { if ((aStack.getItem() instanceof GT_MetaGenerated_Tool)) { - ((GT_MetaGenerated_Tool) aStack.getItem()).onHarvestBlockEvent(aEvent.drops, aStack, aEvent.harvester, aEvent.block, aEvent.x, aEvent.y, - aEvent.z, (byte) aEvent.blockMetadata, aEvent.fortuneLevel, aEvent.isSilkTouching, aEvent); + ((GT_MetaGenerated_Tool) aStack.getItem()) + .onHarvestBlockEvent( + aEvent.drops, + aStack, + aEvent.harvester, + aEvent.block, + aEvent.x, + aEvent.y, + aEvent.z, + (byte) aEvent.blockMetadata, + aEvent.fortuneLevel, + aEvent.isSilkTouching, + aEvent); } if (EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, aStack) > 2) { try { @@ -1090,7 +1505,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG GT_Utility.setStack(tDrop, tSmeltingOutput); } } - } catch (Throwable e) {e.printStackTrace(GT_Log.err);} + } catch (Throwable e) { + e.printStackTrace(GT_Log.err); + } } } } @@ -1106,13 +1523,17 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } else if (aMod.equals("gregtech")) { aMod = "UNKNOWN"; } - if ((aEvent == null) || (aEvent.Ore == null) || (aEvent.Ore.getItem() == null) || (aEvent.Name == null) || (aEvent.Name.isEmpty()) + if ((aEvent == null) + || (aEvent.Ore == null) + || (aEvent.Ore.getItem() == null) + || (aEvent.Name == null) + || (aEvent.Name.isEmpty()) || (aEvent.Name.replaceAll("_", "").length() - aEvent.Name.length() == 9)) { if (aOriginalMod.equals("gregtech")) { aOriginalMod = "UNKNOWN"; } - GT_Log.ore - .println(aOriginalMod + GT_Log.ore.println( + aOriginalMod + " did something very bad! The registration is too invalid to even be shown properly. This happens only if you register null, invalid Items, empty Strings or even nonexisting Events to the OreDict."); throw new IllegalArgumentException( aOriginalMod @@ -1121,8 +1542,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG try { aEvent.Ore.stackSize = 1; if (this.mIgnoreTcon || aEvent.Ore.getUnlocalizedName().startsWith("item.oreberry")) { - if ((aOriginalMod.toLowerCase(Locale.ENGLISH).contains("xycraft")) || (aOriginalMod.toLowerCase(Locale.ENGLISH).contains("tconstruct")) - || ((aOriginalMod.toLowerCase(Locale.ENGLISH).contains("natura")) && (!aOriginalMod.toLowerCase(Locale.ENGLISH).contains("natural")))) { + if ((aOriginalMod.toLowerCase(Locale.ENGLISH).contains("xycraft")) + || (aOriginalMod.toLowerCase(Locale.ENGLISH).contains("tconstruct")) + || ((aOriginalMod.toLowerCase(Locale.ENGLISH).contains("natura")) + && (!aOriginalMod.toLowerCase(Locale.ENGLISH).contains("natural")))) { if (GT_Values.D1) { GT_Log.ore.println(aMod + " -> " + aEvent.Name + " is getting ignored, because of racism. :P"); } @@ -1130,10 +1553,13 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } } String tModToName = aMod + " -> " + aEvent.Name; - if ((this.mOreDictActivated) || (GregTech_API.sPostloadStarted) || ((this.mSortToTheEnd) && (GregTech_API.sLoadFinished))) { + if ((this.mOreDictActivated) + || (GregTech_API.sPostloadStarted) + || ((this.mSortToTheEnd) && (GregTech_API.sLoadFinished))) { tModToName = aOriginalMod + " --Late--> " + aEvent.Name; } - if (((aEvent.Ore.getItem() instanceof ItemBlock)) || (GT_Utility.getBlockFromStack(aEvent.Ore) != Blocks.air)) { + if (((aEvent.Ore.getItem() instanceof ItemBlock)) + || (GT_Utility.getBlockFromStack(aEvent.Ore) != Blocks.air)) { GT_OreDictUnificator.addToBlacklist(aEvent.Ore); } this.mRegisteredOres.add(aEvent.Ore); @@ -1148,98 +1574,87 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } return; } - }else if(this.mIgnoredNames.contains(aEvent.Name)){ + } else if (this.mIgnoredNames.contains(aEvent.Name)) { GT_Log.ore.println(tModToName + " is getting ignored via hardcode."); return; - } - else if (aEvent.Name.equals("stone")) { + } else if (aEvent.Name.equals("stone")) { GT_OreDictUnificator.registerOre("stoneSmooth", aEvent.Ore); return; - } - else if (aEvent.Name.equals("cobblestone")) { + } else if (aEvent.Name.equals("cobblestone")) { GT_OreDictUnificator.registerOre("stoneCobble", aEvent.Ore); return; - } - else if ((aEvent.Name.contains("|")) || (aEvent.Name.contains("*")) || (aEvent.Name.contains(":")) || (aEvent.Name.contains(".")) + } else if ((aEvent.Name.contains("|")) + || (aEvent.Name.contains("*")) + || (aEvent.Name.contains(":")) + || (aEvent.Name.contains(".")) || (aEvent.Name.contains("$"))) { GT_Log.ore.println(tModToName + " is using a private Prefix and is therefor getting ignored properly."); return; - } - else if (aEvent.Name.equals("copperWire")) { + } else if (aEvent.Name.equals("copperWire")) { GT_OreDictUnificator.registerOre(OreDictNames.craftingWireCopper, aEvent.Ore); - } - else if (aEvent.Name.equals("oreHeeEndrium")) { + } else if (aEvent.Name.equals("oreHeeEndrium")) { GT_OreDictUnificator.registerOre(OrePrefixes.ore, Materials.HeeEndium, aEvent.Ore); - } - else if (aEvent.Name.equals("sheetPlastic")) { + } else if (aEvent.Name.equals("sheetPlastic")) { GT_OreDictUnificator.registerOre(OrePrefixes.plate, Materials.Plastic, aEvent.Ore); - } - else if (aEvent.Name.startsWith("shard")) { + } else if (aEvent.Name.startsWith("shard")) { if (aEvent.Name.equals("shardAir")) { GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedAir, aEvent.Ore); return; - } - else if (aEvent.Name.equals("shardWater")) { + } else if (aEvent.Name.equals("shardWater")) { GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedWater, aEvent.Ore); return; - } - else if (aEvent.Name.equals("shardFire")) { + } else if (aEvent.Name.equals("shardFire")) { GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedFire, aEvent.Ore); return; - } - else if (aEvent.Name.equals("shardEarth")) { + } else if (aEvent.Name.equals("shardEarth")) { GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedEarth, aEvent.Ore); return; - } - else if (aEvent.Name.equals("shardOrder")) { + } else if (aEvent.Name.equals("shardOrder")) { GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedOrder, aEvent.Ore); return; - } - else if (aEvent.Name.equals("shardEntropy")) { + } else if (aEvent.Name.equals("shardEntropy")) { GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedEntropy, aEvent.Ore); return; } } else if (aEvent.Name.equals("fieryIngot")) { GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.FierySteel, aEvent.Ore); return; - } - else if (aEvent.Name.equals("ironwood")) { + } else if (aEvent.Name.equals("ironwood")) { GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.IronWood, aEvent.Ore); return; - } - else if (aEvent.Name.equals("steeleaf")) { + } else if (aEvent.Name.equals("steeleaf")) { GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.Steeleaf, aEvent.Ore); return; - } - else if (aEvent.Name.equals("knightmetal")) { + } else if (aEvent.Name.equals("knightmetal")) { GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.Knightmetal, aEvent.Ore); return; - } - else if (aEvent.Name.equals("compressedAluminum")) { + } else if (aEvent.Name.equals("compressedAluminum")) { GT_OreDictUnificator.registerOre(OrePrefixes.compressed, Materials.Aluminium, aEvent.Ore); return; - } - else if (aEvent.Name.contains(" ")) { - GT_Log.ore.println(tModToName + " is getting re-registered because the OreDict Name containing invalid spaces."); - GT_OreDictUnificator.registerOre(aEvent.Name.replaceAll(" ", ""), GT_Utility.copyAmount(1L, aEvent.Ore)); + } else if (aEvent.Name.contains(" ")) { + GT_Log.ore.println( + tModToName + " is getting re-registered because the OreDict Name containing invalid spaces."); + GT_OreDictUnificator.registerOre( + aEvent.Name.replaceAll(" ", ""), GT_Utility.copyAmount(1L, aEvent.Ore)); aEvent.Ore.setStackDisplayName("Invalid OreDictionary Tag"); return; - } - else if (this.mInvalidNames.contains(aEvent.Name)) { + } else if (this.mInvalidNames.contains(aEvent.Name)) { GT_Log.ore.println(tModToName + " is wrongly registered and therefor getting ignored."); return; } OrePrefixes aPrefix = OrePrefixes.getOrePrefix(aEvent.Name); Materials aMaterial = Materials._NULL; - if ((aPrefix == OrePrefixes.nugget) && (aMod.equals("Thaumcraft")) && (aEvent.Ore.getItem().getUnlocalizedName().contains("ItemResource"))) { + if ((aPrefix == OrePrefixes.nugget) + && (aMod.equals("Thaumcraft")) + && (aEvent.Ore.getItem().getUnlocalizedName().contains("ItemResource"))) { return; } if (aPrefix == null) { if (aEvent.Name.toLowerCase().equals(aEvent.Name)) { GT_Log.ore.println(tModToName + " is invalid due to being solely lowercased."); return; - }else if (aEvent.Name.toUpperCase().equals(aEvent.Name)) { + } else if (aEvent.Name.toUpperCase().equals(aEvent.Name)) { GT_Log.ore.println(tModToName + " is invalid due to being solely uppercased."); return; } else if (Character.isUpperCase(aEvent.Name.charAt(0))) { @@ -1252,7 +1667,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG if (aPrefix != aPrefix.mPrefixInto) { String tNewName = aEvent.Name.replaceFirst(aPrefix.toString(), aPrefix.mPrefixInto.toString()); if (!GT_OreDictUnificator.isRegisteringOres()) { - GT_Log.ore.println(tModToName + " uses a depricated Prefix, and is getting re-registered as " + tNewName); + GT_Log.ore.println( + tModToName + " uses a depricated Prefix, and is getting re-registered as " + tNewName); } GT_OreDictUnificator.registerOre(tNewName, aEvent.Ore); return; @@ -1260,14 +1676,18 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG String tName = aEvent.Name.replaceFirst(aPrefix.toString(), ""); if (tName.length() > 0) { char firstChar = tName.charAt(0); - if (Character.isUpperCase(firstChar) || Character.isLowerCase(firstChar) || firstChar == '_' || Character.isDigit(firstChar)) { + if (Character.isUpperCase(firstChar) + || Character.isLowerCase(firstChar) + || firstChar == '_' + || Character.isDigit(firstChar)) { if (aPrefix.mIsMaterialBased) { aMaterial = Materials.get(tName); if (aMaterial != aMaterial.mMaterialInto) { GT_OreDictUnificator.registerOre(aPrefix, aMaterial.mMaterialInto, aEvent.Ore); if (!GT_OreDictUnificator.isRegisteringOres()) { - GT_Log.ore.println(tModToName + " uses a deprecated Material and is getting re-registered as " - + aPrefix.get(aMaterial.mMaterialInto)); + GT_Log.ore.println( + tModToName + " uses a deprecated Material and is getting re-registered as " + + aPrefix.get(aMaterial.mMaterialInto)); } return; } @@ -1276,22 +1696,30 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } if (aMaterial != Materials._NULL) { Materials tReRegisteredMaterial; - for (Iterator i$ = aMaterial.mOreReRegistrations.iterator(); i$.hasNext(); GT_OreDictUnificator.registerOre(aPrefix, - tReRegisteredMaterial, aEvent.Ore)) { + for (Iterator i$ = aMaterial.mOreReRegistrations.iterator(); + i$.hasNext(); + GT_OreDictUnificator.registerOre(aPrefix, tReRegisteredMaterial, aEvent.Ore)) { tReRegisteredMaterial = (Materials) i$.next(); } aMaterial.add(GT_Utility.copyAmount(1L, aEvent.Ore)); - if (GregTech_API.sThaumcraftCompat != null && aPrefix.doGenerateItem(aMaterial) && !aPrefix.isIgnored(aMaterial)) { + if (GregTech_API.sThaumcraftCompat != null + && aPrefix.doGenerateItem(aMaterial) + && !aPrefix.isIgnored(aMaterial)) { List<TC_AspectStack> tAspects = new ArrayList<>(); for (TC_AspectStack tAspect : aPrefix.mAspects) tAspect.addToAspectList(tAspects); - if (aPrefix.mMaterialAmount >= 3628800 || aPrefix.mMaterialAmount < 0) for (TC_AspectStack tAspect : aMaterial.mAspects) tAspect.addToAspectList(tAspects); - GregTech_API.sThaumcraftCompat.registerThaumcraftAspectsToItem(GT_Utility.copyAmount(1, aEvent.Ore), tAspects, aEvent.Name); + if (aPrefix.mMaterialAmount >= 3628800 || aPrefix.mMaterialAmount < 0) + for (TC_AspectStack tAspect : aMaterial.mAspects) + tAspect.addToAspectList(tAspects); + GregTech_API.sThaumcraftCompat.registerThaumcraftAspectsToItem( + GT_Utility.copyAmount(1, aEvent.Ore), tAspects, aEvent.Name); } switch (aPrefix) { case crystal: - if ((aMaterial == Materials.CertusQuartz) || (aMaterial == Materials.NetherQuartz) || (aMaterial == Materials.Fluix)) { + if ((aMaterial == Materials.CertusQuartz) + || (aMaterial == Materials.NetherQuartz) + || (aMaterial == Materials.Fluix)) { GT_OreDictUnificator.registerOre(OrePrefixes.gem, aMaterial, aEvent.Ore); } break; @@ -1300,16 +1728,28 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG GT_OreDictUnificator.registerOre(Dyes.dyeBlue, aEvent.Ore); } else if (aMaterial == Materials.Lazurite) { GT_OreDictUnificator.registerOre(Dyes.dyeCyan, aEvent.Ore); - } else if (aMaterial == Materials.InfusedAir || aMaterial == Materials.InfusedWater || aMaterial == Materials.InfusedFire || aMaterial == Materials.InfusedEarth || aMaterial == Materials.InfusedOrder || aMaterial == Materials.InfusedEntropy) { - GT_OreDictUnificator.registerOre(aMaterial.mName.replaceFirst("Infused", "shard"), aEvent.Ore); + } else if (aMaterial == Materials.InfusedAir + || aMaterial == Materials.InfusedWater + || aMaterial == Materials.InfusedFire + || aMaterial == Materials.InfusedEarth + || aMaterial == Materials.InfusedOrder + || aMaterial == Materials.InfusedEntropy) { + GT_OreDictUnificator.registerOre( + aMaterial.mName.replaceFirst("Infused", "shard"), aEvent.Ore); } else if (aMaterial == Materials.Chocolate) { GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore); - } else if (aMaterial == Materials.CertusQuartz || aMaterial == Materials.NetherQuartz) { - GT_OreDictUnificator.registerOre(OrePrefixes.item.get(aMaterial), aEvent.Ore); - GT_OreDictUnificator.registerOre(OrePrefixes.crystal, aMaterial, aEvent.Ore); + } else if (aMaterial == Materials.CertusQuartz + || aMaterial == Materials.NetherQuartz) { + GT_OreDictUnificator.registerOre( + OrePrefixes.item.get(aMaterial), aEvent.Ore); + GT_OreDictUnificator.registerOre( + OrePrefixes.crystal, aMaterial, aEvent.Ore); GT_OreDictUnificator.registerOre(OreDictNames.craftingQuartz, aEvent.Ore); - } else if (aMaterial == Materials.Fluix || aMaterial == Materials.Quartz || aMaterial == Materials.Quartzite) { - GT_OreDictUnificator.registerOre(OrePrefixes.crystal, aMaterial, aEvent.Ore); + } else if (aMaterial == Materials.Fluix + || aMaterial == Materials.Quartz + || aMaterial == Materials.Quartzite) { + GT_OreDictUnificator.registerOre( + OrePrefixes.crystal, aMaterial, aEvent.Ore); GT_OreDictUnificator.registerOre(OreDictNames.craftingQuartz, aEvent.Ore); } break; @@ -1317,7 +1757,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG if (aMaterial == Materials.Tin) { GT_OreDictUnificator.registerOre(OreDictNames.craftingWireTin, aEvent.Ore); } else if (aMaterial == Materials.AnyCopper) { - GT_OreDictUnificator.registerOre(OreDictNames.craftingWireCopper, aEvent.Ore); + GT_OreDictUnificator.registerOre( + OreDictNames.craftingWireCopper, aEvent.Ore); } else if (aMaterial == Materials.Gold) { GT_OreDictUnificator.registerOre(OreDictNames.craftingWireGold, aEvent.Ore); } else if (aMaterial == Materials.AnyIron) { @@ -1325,8 +1766,15 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } break; case lens: - if ((aMaterial.contains(SubTag.TRANSPARENT)) && (aMaterial.mColor != Dyes._NULL)) { - GT_OreDictUnificator.registerOre("craftingLens" + aMaterial.mColor.toString().replaceFirst("dye", ""), aEvent.Ore); + if ((aMaterial.contains(SubTag.TRANSPARENT)) + && (aMaterial.mColor != Dyes._NULL)) { + GT_OreDictUnificator.registerOre( + "craftingLens" + + aMaterial + .mColor + .toString() + .replaceFirst("dye", ""), + aEvent.Ore); } break; case plate: @@ -1352,8 +1800,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG GT_RecipeRegistrator.sRodMaterialList.add(aMaterial); } else if (aMaterial == Materials.Wood) { GT_OreDictUnificator.addToBlacklist(aEvent.Ore); - } else if ((aMaterial == Materials.Tin) || (aMaterial == Materials.Lead) || (aMaterial == Materials.SolderingAlloy)) { - GT_OreDictUnificator.registerOre(ToolDictNames.craftingToolSolderingMetal, aEvent.Ore); + } else if ((aMaterial == Materials.Tin) + || (aMaterial == Materials.Lead) + || (aMaterial == Materials.SolderingAlloy)) { + GT_OreDictUnificator.registerOre( + ToolDictNames.craftingToolSolderingMetal, aEvent.Ore); } break; case dust: @@ -1391,20 +1842,44 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG GT_OreDictUnificator.registerOre("steeleaf", aEvent.Ore); } else if (aMaterial == Materials.Knightmetal) { GT_OreDictUnificator.registerOre("knightmetal", aEvent.Ore); - } else if ((aMaterial == Materials.Brass) && (aEvent.Ore.getItemDamage() == 2) - && (aEvent.Ore.getUnlocalizedName().equals("item.ingotBrass")) - && (new ItemStack(aEvent.Ore.getItem(), 1, 0).getUnlocalizedName().contains("red"))) { - GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.RedAlloy, new ItemStack(aEvent.Ore.getItem(), 1, 0)); - GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.BlueAlloy, new ItemStack(aEvent.Ore.getItem(), 1, 1)); - GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.Brass, new ItemStack(aEvent.Ore.getItem(), 1, 2)); + } else if ((aMaterial == Materials.Brass) + && (aEvent.Ore.getItemDamage() == 2) + && (aEvent.Ore + .getUnlocalizedName() + .equals("item.ingotBrass")) + && (new ItemStack(aEvent.Ore.getItem(), 1, 0) + .getUnlocalizedName() + .contains("red"))) { + GT_OreDictUnificator.set( + OrePrefixes.ingot, + Materials.RedAlloy, + new ItemStack(aEvent.Ore.getItem(), 1, 0)); + GT_OreDictUnificator.set( + OrePrefixes.ingot, + Materials.BlueAlloy, + new ItemStack(aEvent.Ore.getItem(), 1, 1)); + GT_OreDictUnificator.set( + OrePrefixes.ingot, + Materials.Brass, + new ItemStack(aEvent.Ore.getItem(), 1, 2)); if (!mDisableIC2Cables) { - GT_Values.RA.addWiremillRecipe(GT_ModHandler.getIC2Item("copperCableItem", 3L), new ItemStack(aEvent.Ore.getItem(), 1, - 8), 400, 1); - GT_Values.RA.addWiremillRecipe(GT_ModHandler.getIC2Item("ironCableItem", 6L), - new ItemStack(aEvent.Ore.getItem(), 1, 9), 400, 2); + GT_Values.RA.addWiremillRecipe( + GT_ModHandler.getIC2Item("copperCableItem", 3L), + new ItemStack(aEvent.Ore.getItem(), 1, 8), + 400, + 1); + GT_Values.RA.addWiremillRecipe( + GT_ModHandler.getIC2Item("ironCableItem", 6L), + new ItemStack(aEvent.Ore.getItem(), 1, 9), + 400, + 2); } - GT_Values.RA.addCutterRecipe(new ItemStack(aEvent.Ore.getItem(), 1, 3), new ItemStack(aEvent.Ore.getItem(), 16, 4), - null, 400, 8); + GT_Values.RA.addCutterRecipe( + new ItemStack(aEvent.Ore.getItem(), 1, 3), + new ItemStack(aEvent.Ore.getItem(), 16, 4), + null, + 400, + 8); } break; default: @@ -1417,12 +1892,18 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG for (Dyes tDye : Dyes.VALUES) { if (aEvent.Name.endsWith(tDye.name().replaceFirst("dye", ""))) { GT_OreDictUnificator.addToBlacklist(aEvent.Ore); - GT_Log.ore.println(tModToName + " Oh man, why the fuck would anyone need a OreDictified Color for this, that is even too much for GregTech... do not report this, this is just a random Comment about how ridiculous this is."); + GT_Log.ore.println( + tModToName + + " Oh man, why the fuck would anyone need a OreDictified Color for this, that is even too much for GregTech... do not report this, this is just a random Comment about how ridiculous this is."); return; } } -// GT_FML_LOGGER.info("Material Name: "+aEvent.Name+ " !!!Unknown Material detected!!! Please report to GregTech Intergalactical for additional compatiblity. This is not an Error, an Issue nor a Lag Source, it is just an Information, which you should pass to me."); -// GT_Log.ore.println(tModToName + " uses an unknown Material. Report this to GregTech."); + // GT_FML_LOGGER.info("Material Name: "+aEvent.Name+ " + // !!!Unknown Material detected!!! Please report to GregTech Intergalactical for + // additional compatiblity. This is not an Error, an Issue nor a Lag Source, it is just + // an Information, which you should pass to me."); + // GT_Log.ore.println(tModToName + " uses an unknown + // Material. Report this to GregTech."); return; } } else { @@ -1505,16 +1986,19 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } @SuppressWarnings("deprecated") - public static void stepMaterialsVanilla(Collection<GT_Proxy.OreDictEventContainer> mEvents, ProgressManager.ProgressBar progressBar){ + public static void stepMaterialsVanilla( + Collection<GT_Proxy.OreDictEventContainer> mEvents, ProgressManager.ProgressBar progressBar) { int size = 5; int sizeStep = mEvents.size() / 20 - 1; GT_Proxy.OreDictEventContainer tEvent; - for (Iterator<GT_Proxy.OreDictEventContainer> i$ = mEvents.iterator(); i$.hasNext(); GT_Proxy.registerRecipes(tEvent)) { + for (Iterator<GT_Proxy.OreDictEventContainer> i$ = mEvents.iterator(); + i$.hasNext(); + GT_Proxy.registerRecipes(tEvent)) { tEvent = i$.next(); sizeStep--; - if(sizeStep == 0) { + if (sizeStep == 0) { GT_FML_LOGGER.info("Baking : " + size + "%", new Object[0]); - sizeStep = mEvents.size()/20-1; + sizeStep = mEvents.size() / 20 - 1; size += 5; } progressBar.step(tEvent.mMaterial == null ? "" : tEvent.mMaterial.toString()); @@ -1525,15 +2009,19 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG @SubscribeEvent public void onLivingUpdate(LivingUpdateEvent aEvent) { if (aEvent.entityLiving.onGround) { - int tX = MathHelper.floor_double(aEvent.entityLiving.posX), tY = MathHelper.floor_double(aEvent.entityLiving.boundingBox.minY-0.001F), tZ = MathHelper.floor_double(aEvent.entityLiving.posZ); + int tX = MathHelper.floor_double(aEvent.entityLiving.posX), + tY = MathHelper.floor_double(aEvent.entityLiving.boundingBox.minY - 0.001F), + tZ = MathHelper.floor_double(aEvent.entityLiving.posZ); Block tBlock = aEvent.entityLiving.worldObj.getBlock(tX, tY, tZ); - if (tBlock instanceof IBlockOnWalkOver) ((IBlockOnWalkOver)tBlock).onWalkOver(aEvent.entityLiving, aEvent.entityLiving.worldObj, tX, tY, tZ); + if (tBlock instanceof IBlockOnWalkOver) + ((IBlockOnWalkOver) tBlock).onWalkOver(aEvent.entityLiving, aEvent.entityLiving.worldObj, tX, tY, tZ); } } @SubscribeEvent public void onFluidContainerRegistration(FluidContainerRegistry.FluidContainerRegisterEvent aFluidEvent) { - if ((aFluidEvent.data.filledContainer.getItem() == Items.potionitem) && (aFluidEvent.data.filledContainer.getItemDamage() == 0)) { + if ((aFluidEvent.data.filledContainer.getItem() == Items.potionitem) + && (aFluidEvent.data.filledContainer.getItemDamage() == 0)) { aFluidEvent.data.fluid.amount = 0; } GT_OreDictUnificator.addToBlacklist(aFluidEvent.data.emptyContainer); @@ -1553,18 +2041,14 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG // Making sure it is being freed up in order to prevent exploits or Garbage Collection mishaps. LAST_BROKEN_TILEENTITY.set(null); - } - } @SubscribeEvent public void onWorldTickEvent(TickEvent.WorldTickEvent aEvent) { - if(aEvent.world.provider.dimensionId == 0) - mTicksUntilNextCraftSound--; + if (aEvent.world.provider.dimensionId == 0) mTicksUntilNextCraftSound--; if (isFirstWorldTick) { - for (Runnable runnable : GregTech_API.sFirstWorldTick) - runnable.run(); + for (Runnable runnable : GregTech_API.sFirstWorldTick) runnable.run(); isFirstWorldTick = false; GT_Values.worldTickHappened = true; } @@ -1582,23 +2066,32 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG tMetaTileEntity.onWorldLoad(tSaveDiretory); } } - } catch (Throwable e) {e.printStackTrace(GT_Log.err);} + } catch (Throwable e) { + e.printStackTrace(GT_Log.err); + } } } - if ((aEvent.world.getTotalWorldTime() % 100L == 0L) && ((this.mItemDespawnTime != 6000) || (this.mMaxEqualEntitiesAtOneSpot > 0))) { + if ((aEvent.world.getTotalWorldTime() % 100L == 0L) + && ((this.mItemDespawnTime != 6000) || (this.mMaxEqualEntitiesAtOneSpot > 0))) { long startTime = System.nanoTime(); - double oldX=0, oldY=0, oldZ=0; - if (debugEntityCramming && (aEvent.world.loadedEntityList.size()!=0)) { + double oldX = 0, oldY = 0, oldZ = 0; + if (debugEntityCramming && (aEvent.world.loadedEntityList.size() != 0)) { GT_Log.out.println("CRAM: Entity list size " + aEvent.world.loadedEntityList.size()); } for (int i = 0; i < aEvent.world.loadedEntityList.size(); i++) { if ((aEvent.world.loadedEntityList.get(i) instanceof Entity)) { Entity tEntity = (Entity) aEvent.world.loadedEntityList.get(i); - if (((tEntity instanceof EntityItem)) && (this.mItemDespawnTime != 6000) && (((EntityItem) tEntity).lifespan == 6000)) { + if (((tEntity instanceof EntityItem)) + && (this.mItemDespawnTime != 6000) + && (((EntityItem) tEntity).lifespan == 6000)) { ((EntityItem) tEntity).lifespan = this.mItemDespawnTime; - } else if (((tEntity instanceof EntityLivingBase)) && (this.mMaxEqualEntitiesAtOneSpot > 0) && (!(tEntity instanceof EntityPlayer)) - && (tEntity.canBePushed()) && (((EntityLivingBase) tEntity).getHealth() > 0.0F)) { - List tList = tEntity.worldObj.getEntitiesWithinAABBExcludingEntity(tEntity, + } else if (((tEntity instanceof EntityLivingBase)) + && (this.mMaxEqualEntitiesAtOneSpot > 0) + && (!(tEntity instanceof EntityPlayer)) + && (tEntity.canBePushed()) + && (((EntityLivingBase) tEntity).getHealth() > 0.0F)) { + List tList = tEntity.worldObj.getEntitiesWithinAABBExcludingEntity( + tEntity, tEntity.boundingBox.expand(0.20000000298023224D, 0.0D, 0.20000000298023224D)); Class tClass = tEntity.getClass(); int tEntityCount = 1; @@ -1613,22 +2106,23 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG if (debugEntityCramming) { // Cheeseball way of not receiving a bunch of spam caused by 1 location // obviously fails if there are crammed entities in more than one spot. - if( tEntity.posX != oldX - && tEntity.posY != oldY - && tEntity.posZ != oldZ ) { - GT_Log.out.println("CRAM: Excess entities: " + tEntityCount + " at X " + tEntity.posX + " Y " + tEntity.posY + " Z " + tEntity.posZ); + if (tEntity.posX != oldX && tEntity.posY != oldY && tEntity.posZ != oldZ) { + GT_Log.out.println("CRAM: Excess entities: " + tEntityCount + " at X " + + tEntity.posX + " Y " + tEntity.posY + " Z " + tEntity.posZ); oldX = tEntity.posX; oldY = tEntity.posY; oldZ = tEntity.posZ; } } - tEntity.attackEntityFrom(DamageSource.inWall, tEntityCount - this.mMaxEqualEntitiesAtOneSpot); + tEntity.attackEntityFrom( + DamageSource.inWall, tEntityCount - this.mMaxEqualEntitiesAtOneSpot); } } } } - if(debugEntityCramming && (aEvent.world.loadedEntityList.size()!=0)) { - GT_Log.out.println("CRAM: Time spent checking " + (System.nanoTime() - startTime )/1000 + " microseconds" ); + if (debugEntityCramming && (aEvent.world.loadedEntityList.size() != 0)) { + GT_Log.out.println( + "CRAM: Time spent checking " + (System.nanoTime() - startTime) / 1000 + " microseconds"); } } @@ -1645,24 +2139,43 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } if (aOre.mPrefix != null) { if (!aOre.mPrefix.isIgnored(aOre.mMaterial)) { - aOre.mPrefix.processOre(aOre.mMaterial == null ? Materials._NULL : aOre.mMaterial, aOre.mEvent.Name, aOre.mModID, GT_Utility.copyAmount(1L, aOre.mEvent.Ore)); + aOre.mPrefix.processOre( + aOre.mMaterial == null ? Materials._NULL : aOre.mMaterial, + aOre.mEvent.Name, + aOre.mModID, + GT_Utility.copyAmount(1L, aOre.mEvent.Ore)); } } else { -// GT_FML_LOGGER.info("Thingy Name: "+ aOre.mEvent.Name+ " !!!Unknown 'Thingy' detected!!! This Object seems to probably not follow a valid OreDictionary Convention, or I missed a Convention. Please report to GregTech Intergalactical for additional compatiblity. This is not an Error, an Issue nor a Lag Source, it is just an Information, which you should pass to me."); + // GT_FML_LOGGER.info("Thingy Name: "+ aOre.mEvent.Name+ " !!!Unknown 'Thingy' detected!!! This + // Object seems to probably not follow a valid OreDictionary Convention, or I missed a Convention. Please + // report to GregTech Intergalactical for additional compatiblity. This is not an Error, an Issue nor a Lag + // Source, it is just an Information, which you should pass to me."); } } @SubscribeEvent public void onPlayerTickEventServer(TickEvent.PlayerTickEvent aEvent) { if ((aEvent.side.isServer()) && (aEvent.phase == TickEvent.Phase.END) && (!aEvent.player.isDead)) { - if ((aEvent.player.ticksExisted % 200 == 0) && (aEvent.player.capabilities.allowEdit) && (!aEvent.player.capabilities.isCreativeMode) + if ((aEvent.player.ticksExisted % 200 == 0) + && (aEvent.player.capabilities.allowEdit) + && (!aEvent.player.capabilities.isCreativeMode) && (this.mSurvivalIntoAdventure)) { aEvent.player.setGameType(GameType.ADVENTURE); aEvent.player.capabilities.allowEdit = false; if (this.mAxeWhenAdventure) { - GT_Utility.sendChatToPlayer(aEvent.player, GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_097", "It's dangerous to go alone! Take this.", false)); - aEvent.player.worldObj.spawnEntityInWorld(new EntityItem(aEvent.player.worldObj, aEvent.player.posX, aEvent.player.posY, - aEvent.player.posZ, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.AXE, 1, Materials.Flint, Materials.Wood, null))); + GT_Utility.sendChatToPlayer( + aEvent.player, + GT_LanguageManager.addStringLocalization( + "Interaction_DESCRIPTION_Index_097", + "It's dangerous to go alone! Take this.", + false)); + aEvent.player.worldObj.spawnEntityInWorld(new EntityItem( + aEvent.player.worldObj, + aEvent.player.posX, + aEvent.player.posY, + aEvent.player.posZ, + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.AXE, 1, Materials.Flint, Materials.Wood, null))); } } boolean tHungerEffect = (this.mHungerEffect) && (aEvent.player.ticksExisted % 2400 == 1200); @@ -1672,7 +2185,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG ItemStack tStack; if ((tStack = aEvent.player.inventory.getStackInSlot(i)) != null) { if (!aEvent.player.capabilities.isCreativeMode) { - GT_Utility.applyRadioactivity(aEvent.player, GT_Utility.getRadioactivityLevel(tStack), tStack.stackSize); + GT_Utility.applyRadioactivity( + aEvent.player, GT_Utility.getRadioactivityLevel(tStack), tStack.stackSize); float tHeat = GT_Utility.getHeatDamageFromItem(tStack); if (tHeat != 0.0F) { if (tHeat > 0.0F) { @@ -1687,24 +2201,33 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } if (this.mInventoryUnification) { - if (tStack.getTagCompound()!= null && (tStack.getTagCompound().getTag("Mate")!= null || tStack.getTagCompound().getTag("Genome")!= null )) { + if (tStack.getTagCompound() != null + && (tStack.getTagCompound().getTag("Mate") != null + || tStack.getTagCompound().getTag("Genome") != null)) { String orgMate = ""; - if(tStack.getTagCompound().getTag("Mate")!= null) - orgMate = (tStack.getTagCompound().getCompoundTag("Mate")).getTagList("Chromosomes",10).getCompoundTagAt(0).getString("UID1"); + if (tStack.getTagCompound().getTag("Mate") != null) + orgMate = (tStack.getTagCompound().getCompoundTag("Mate")) + .getTagList("Chromosomes", 10) + .getCompoundTagAt(0) + .getString("UID1"); String orgGen = orgMate; - if(tStack.getTagCompound().getTag("Genome")!= null) - orgGen = (tStack.getTagCompound().getCompoundTag("Genome")).getTagList("Chromosomes",10).getCompoundTagAt(0).getString("UID1"); + if (tStack.getTagCompound().getTag("Genome") != null) + orgGen = (tStack.getTagCompound().getCompoundTag("Genome")) + .getTagList("Chromosomes", 10) + .getCompoundTagAt(0) + .getString("UID1"); - final boolean[] yn = {orgMate.contains("gendustry"),orgGen.contains("gendustry")}; + final boolean[] yn = {orgMate.contains("gendustry"), orgGen.contains("gendustry")}; if (yn[0] || yn[1]) { - final NBTTagCompound NBTTAGCOMPOUND = (NBTTagCompound) tStack.getTagCompound().copy(); + final NBTTagCompound NBTTAGCOMPOUND = (NBTTagCompound) + tStack.getTagCompound().copy(); - //MATE + // MATE if (yn[0]) { final NBTTagCompound MATE = NBTTAGCOMPOUND.getCompoundTag("Mate"); final NBTTagList chromosomesMate = MATE.getTagList("Chromosomes", 10); @@ -1712,17 +2235,17 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG String ident1 = species.getString("UID1"); final String[] split = ident1.split("[.]"); - ident1 = "gregtech.bee.species" + WordUtils.capitalize(split[2].toLowerCase(Locale.ENGLISH)); + ident1 = "gregtech.bee.species" + + WordUtils.capitalize(split[2].toLowerCase(Locale.ENGLISH)); - if (AlleleManager.alleleRegistry.getAllele(ident1) == null) - return; + if (AlleleManager.alleleRegistry.getAllele(ident1) == null) return; String ident2 = species.getString("UID0"); final String[] split2 = ident2.split("[.]"); - ident2 = "gregtech.bee.species"+WordUtils.capitalize(split2[2].toLowerCase(Locale.ENGLISH)); + ident2 = "gregtech.bee.species" + + WordUtils.capitalize(split2[2].toLowerCase(Locale.ENGLISH)); - if (AlleleManager.alleleRegistry.getAllele(ident2) == null) - return; + if (AlleleManager.alleleRegistry.getAllele(ident2) == null) return; final NBTTagCompound nuspeciesmate = new NBTTagCompound(); nuspeciesmate.setString("UID1", ident1); @@ -1742,24 +2265,24 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG NBTTAGCOMPOUND.setTag("Mate", nuMate2); } if (yn[1]) { - //Genome + // Genome final NBTTagCompound genome = NBTTAGCOMPOUND.getCompoundTag("Genome"); final NBTTagList chromosomesGenome = genome.getTagList("Chromosomes", 10); final NBTTagCompound speciesGenome = chromosomesGenome.getCompoundTagAt(0); String ident1Genome = speciesGenome.getString("UID1"); final String[] splitGenome = ident1Genome.split("[.]"); - ident1Genome = "gregtech.bee.species" + WordUtils.capitalize(splitGenome[2].toLowerCase(Locale.ENGLISH)); + ident1Genome = "gregtech.bee.species" + + WordUtils.capitalize(splitGenome[2].toLowerCase(Locale.ENGLISH)); - if (AlleleManager.alleleRegistry.getAllele(ident1Genome) == null) - return; + if (AlleleManager.alleleRegistry.getAllele(ident1Genome) == null) return; String ident2Genome = speciesGenome.getString("UID0"); final String[] splitGenome2 = ident2Genome.split("[.]"); - ident2Genome = "gregtech.bee.species" + WordUtils.capitalize(splitGenome2[2].toLowerCase(Locale.ENGLISH)); + ident2Genome = "gregtech.bee.species" + + WordUtils.capitalize(splitGenome2[2].toLowerCase(Locale.ENGLISH)); - if (AlleleManager.alleleRegistry.getAllele(ident2Genome) == null) - return; + if (AlleleManager.alleleRegistry.getAllele(ident2Genome) == null) return; final NBTTagCompound nuspeciesgenome = new NBTTagCompound(); nuspeciesgenome.setString("UID1", ident1Genome); @@ -1780,8 +2303,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } tStack.setTagCompound(new NBTTagCompound()); tStack.setTagCompound(NBTTAGCOMPOUND); - } - else return; + } else return; } GT_OreDictUnificator.setStack(true, tStack); @@ -1792,7 +2314,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG ItemStack tStack; if ((tStack = aEvent.player.inventory.armorInventory[i]) != null) { if (!aEvent.player.capabilities.isCreativeMode) { - GT_Utility.applyRadioactivity(aEvent.player, GT_Utility.getRadioactivityLevel(tStack), tStack.stackSize); + GT_Utility.applyRadioactivity( + aEvent.player, GT_Utility.getRadioactivityLevel(tStack), tStack.stackSize); float tHeat = GT_Utility.getHeatDamageFromItem(tStack); if (tHeat != 0.0F) { if (tHeat > 0.0F) { @@ -1824,8 +2347,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG @Override public Object getServerGuiElement(int aID, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) { - if(aID>=1000){ - int ID = aID-1000; + if (aID >= 1000) { + int ID = aID - 1000; if (ID == 10) { return new GT_ContainerVolumetricFlask(aPlayer.inventory); } @@ -1833,7 +2356,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if ((tTileEntity instanceof IGregTechTileEntity)) { - if (GUI_ID_COVER_SIDE_BASE <= aID && aID < GUI_ID_COVER_SIDE_BASE+6) { + if (GUI_ID_COVER_SIDE_BASE <= aID && aID < GUI_ID_COVER_SIDE_BASE + 6) { return null; } IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity(); @@ -1846,8 +2369,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG @Override public Object getClientGuiElement(int aID, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) { - if(aID>=1000){ - int ID = aID-1000; + if (aID >= 1000) { + int ID = aID - 1000; if (ID == 10) { return new GT_GUIContainerVolumetricFlask(new GT_ContainerVolumetricFlask(aPlayer.inventory)); } @@ -1857,12 +2380,18 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG if ((tTileEntity instanceof IGregTechTileEntity)) { IGregTechTileEntity tile = (IGregTechTileEntity) tTileEntity; - if (GUI_ID_COVER_SIDE_BASE <= aID && aID < GUI_ID_COVER_SIDE_BASE+6) { + if (GUI_ID_COVER_SIDE_BASE <= aID && aID < GUI_ID_COVER_SIDE_BASE + 6) { byte side = (byte) (aID - GT_Proxy.GUI_ID_COVER_SIDE_BASE); GT_CoverBehaviorBase<?> cover = tile.getCoverBehaviorAtSideNew(side); if (cover.hasCoverGUI()) { - return cover.getClientGUI(side, tile.getCoverIDAtSide(side), tile.getComplexCoverDataAtSide(side), tile, aPlayer, aWorld); + return cover.getClientGUI( + side, + tile.getCoverIDAtSide(side), + tile.getComplexCoverDataAtSide(side), + tile, + aPlayer, + aWorld); } return null; } @@ -1875,10 +2404,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } private static List<String> getOreDictNames(ItemStack stack) { - return Arrays.stream(OreDictionary.getOreIDs(stack)).mapToObj(OreDictionary::getOreName).collect(Collectors.toList()); + return Arrays.stream(OreDictionary.getOreIDs(stack)) + .mapToObj(OreDictionary::getOreName) + .collect(Collectors.toList()); } - @Override public int getBurnTime(ItemStack aFuel) { if ((aFuel == null) || (aFuel.getItem() == null)) { @@ -1898,64 +2428,113 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG rFuelValue = Math.max(rFuelValue, tValue); } else { // If not check the ore dict - rFuelValue = Math.max(rFuelValue, getOreDictNames(aFuel).stream().mapToInt(f -> oreDictBurnTimes.getOrDefault(f, 0)).max().orElse(0)); + rFuelValue = Math.max( + rFuelValue, + getOreDictNames(aFuel).stream() + .mapToInt(f -> oreDictBurnTimes.getOrDefault(f, 0)) + .max() + .orElse(0)); } // If we have something from the GT MetaGenerated_Item, ItemFuelValue, or OreDict return if (rFuelValue > 0) return rFuelValue; // Otherwise, a few more checks - if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Blocks.wooden_button, 1))) return 150; - else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Blocks.ladder, 1))) return 100; - else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Items.sign, 1))) return 600; - else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Items.wooden_door, 1))) return 600; - else if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_MSSFUEL.get(1))) return 150000; - else if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_SSFUEL.get(1))) return 100000; + if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Blocks.wooden_button, 1))) return 150; + else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Blocks.ladder, 1))) return 100; + else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Items.sign, 1))) return 600; + else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Items.wooden_door, 1))) return 600; + else if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_MSSFUEL.get(1))) return 150000; + else if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_SSFUEL.get(1))) return 100000; return 0; } - // ------------------------ Adds all fluids corresponding to materials ------------------------ - public Fluid addAutoGeneratedCorrespondingFluid(Materials aMaterial){ + public Fluid addAutoGeneratedCorrespondingFluid(Materials aMaterial) { // If the fluid is registered as custom inside the Material's constructor then to add custom fluid - // textures go to blocks/fluids and place the .png. File should be called fluid.fluid.{unlocalised_name}.png. All lower case. - String fluidTexture = aMaterial.mIconSet.is_custom ? ("fluid." + aMaterial.mName.toLowerCase()) : "autogenerated"; - return addFluid(aMaterial.mName.toLowerCase(Locale.ENGLISH), fluidTexture, aMaterial.mDefaultLocalName, aMaterial, - aMaterial.mRGBa, 1, aMaterial.getLiquidTemperature(), GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), ItemList.Cell_Empty.get(1L), 1000); - } + // textures go to blocks/fluids and place the .png. File should be called fluid.fluid.{unlocalised_name}.png. + // All lower case. + String fluidTexture = + aMaterial.mIconSet.is_custom ? ("fluid." + aMaterial.mName.toLowerCase()) : "autogenerated"; + return addFluid( + aMaterial.mName.toLowerCase(Locale.ENGLISH), + fluidTexture, + aMaterial.mDefaultLocalName, + aMaterial, + aMaterial.mRGBa, + 1, + aMaterial.getLiquidTemperature(), + GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), + ItemList.Cell_Empty.get(1L), + 1000); + } public Fluid addAutoGeneratedCorrespondingGas(Materials aMaterial) { // If the fluid is registered as custom inside the Material's constructor then to add custom fluid - // textures go to blocks/fluids and place the .png. File should be called fluid.gas.{unlocalised_name}.png. All lower case. + // textures go to blocks/fluids and place the .png. File should be called fluid.gas.{unlocalised_name}.png. All + // lower case. String fluidTexture = aMaterial.mIconSet.is_custom ? ("gas." + aMaterial.mName.toLowerCase()) : "autogenerated"; - return addFluid(aMaterial.mName.toLowerCase(Locale.ENGLISH), fluidTexture, aMaterial.mDefaultLocalName, aMaterial, - aMaterial.mRGBa, 2, aMaterial.getGasTemperature(), GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), ItemList.Cell_Empty.get(1L), 1000); + return addFluid( + aMaterial.mName.toLowerCase(Locale.ENGLISH), + fluidTexture, + aMaterial.mDefaultLocalName, + aMaterial, + aMaterial.mRGBa, + 2, + aMaterial.getGasTemperature(), + GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), + ItemList.Cell_Empty.get(1L), + 1000); } public Fluid addAutogeneratedPlasmaFluid(Materials aMaterial) { // If the fluid is registered as custom inside the Material's constructor then to add custom fluid - // textures go to blocks/fluids and place the .png. File should be called fluid.plasma.{unlocalised_name}.png. All lower case. - String fluidTexture = aMaterial.mIconSet.is_custom ? ("plasma." + aMaterial.mName.toLowerCase()) : "plasma.autogenerated"; - return addFluid("plasma." + aMaterial.mName.toLowerCase(Locale.ENGLISH), fluidTexture, aMaterial.mDefaultLocalName + " Plasma", aMaterial, - aMaterial.mMoltenRGBa, 3, 10000, GT_OreDictUnificator.get(OrePrefixes.cellPlasma, aMaterial, 1L), ItemList.Cell_Empty.get(1L), aMaterial.getMolten(1) != null ? 144 : 1000); + // textures go to blocks/fluids and place the .png. File should be called fluid.plasma.{unlocalised_name}.png. + // All lower case. + String fluidTexture = + aMaterial.mIconSet.is_custom ? ("plasma." + aMaterial.mName.toLowerCase()) : "plasma.autogenerated"; + return addFluid( + "plasma." + aMaterial.mName.toLowerCase(Locale.ENGLISH), + fluidTexture, + aMaterial.mDefaultLocalName + " Plasma", + aMaterial, + aMaterial.mMoltenRGBa, + 3, + 10000, + GT_OreDictUnificator.get(OrePrefixes.cellPlasma, aMaterial, 1L), + ItemList.Cell_Empty.get(1L), + aMaterial.getMolten(1) != null ? 144 : 1000); } public Fluid addAutogeneratedMoltenFluid(Materials aMaterial) { // If the fluid is registered as custom inside the Material's constructor then to add custom fluid - // textures go to blocks/fluids and place the .png. File should be called fluid.molten.{unlocalised_name}.png. All lower case. - String fluidTexture = aMaterial.mIconSet.is_custom ? ("molten." + aMaterial.mName.toLowerCase()) : "molten.autogenerated"; - return addFluid("molten." + aMaterial.mName.toLowerCase(Locale.ENGLISH), fluidTexture, "Molten " + aMaterial.mDefaultLocalName, aMaterial, - aMaterial.mMoltenRGBa, 4, aMaterial.mMeltingPoint < 0 ? 1000 : aMaterial.mMeltingPoint, GT_OreDictUnificator.get(OrePrefixes.cellMolten, aMaterial, 1L), ItemList.Cell_Empty.get(1L), 144); + // textures go to blocks/fluids and place the .png. File should be called fluid.molten.{unlocalised_name}.png. + // All lower case. + String fluidTexture = + aMaterial.mIconSet.is_custom ? ("molten." + aMaterial.mName.toLowerCase()) : "molten.autogenerated"; + return addFluid( + "molten." + aMaterial.mName.toLowerCase(Locale.ENGLISH), + fluidTexture, + "Molten " + aMaterial.mDefaultLocalName, + aMaterial, + aMaterial.mMoltenRGBa, + 4, + aMaterial.mMeltingPoint < 0 ? 1000 : aMaterial.mMeltingPoint, + GT_OreDictUnificator.get(OrePrefixes.cellMolten, aMaterial, 1L), + ItemList.Cell_Empty.get(1L), + 144); } // ------------------------------------------------------------------------------------------------------------ - public void addAutoGeneratedHydroCrackedFluids(Materials aMaterial){ + public void addAutoGeneratedHydroCrackedFluids(Materials aMaterial) { Fluid[] crackedFluids = new Fluid[3]; - String[] namePrefixes = { "lightlyhydrocracked.", "moderatelyhydrocracked.", "severelyhydrocracked." }; - OrePrefixes[] orePrefixes = { OrePrefixes.cellHydroCracked1, OrePrefixes.cellHydroCracked2, OrePrefixes.cellHydroCracked3 }; + String[] namePrefixes = {"lightlyhydrocracked.", "moderatelyhydrocracked.", "severelyhydrocracked."}; + OrePrefixes[] orePrefixes = { + OrePrefixes.cellHydroCracked1, OrePrefixes.cellHydroCracked2, OrePrefixes.cellHydroCracked3 + }; GT_Fluid uncrackedFluid = null; if (aMaterial.mFluid != null) { uncrackedFluid = (GT_Fluid) aMaterial.mFluid; @@ -1964,27 +2543,51 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } for (int i = 0; i < 3; i++) { crackedFluids[i] = addFluid( - namePrefixes[i] + aMaterial.mName.toLowerCase(Locale.ENGLISH), uncrackedFluid.mTextureName, + namePrefixes[i] + aMaterial.mName.toLowerCase(Locale.ENGLISH), + uncrackedFluid.mTextureName, orePrefixes[i].mLocalizedMaterialPre + aMaterial.mDefaultLocalName, - null, aMaterial.mRGBa, 2, 775, + null, + aMaterial.mRGBa, + 2, + 775, GT_OreDictUnificator.get(orePrefixes[i], aMaterial, 1L), - ItemList.Cell_Empty.get(1L), 1000); + ItemList.Cell_Empty.get(1L), + 1000); int hydrogenAmount = 2 * i + 2; - GT_Values.RA.addCrackingRecipe(i + 1, new FluidStack(uncrackedFluid, 1000), Materials.Hydrogen.getGas(hydrogenAmount * 800), - new FluidStack(crackedFluids[i], 1000), 20 + 20 * i, 240); - GT_Values.RA.addChemicalRecipe(Materials.Hydrogen.getCells(hydrogenAmount), GT_Utility.getIntegratedCircuit(i + 1), new FluidStack(uncrackedFluid, 1000), - new FluidStack(crackedFluids[i], 800), Materials.Empty.getCells(hydrogenAmount), 160 + 80 * i, 30); - GT_Values.RA.addChemicalRecipe(aMaterial.getCells(1), GT_Utility.getIntegratedCircuit(i + 1), Materials.Hydrogen.getGas(hydrogenAmount * 1000), - new FluidStack(crackedFluids[i], 800), Materials.Empty.getCells(1), 160 + 80 * i, 30); + GT_Values.RA.addCrackingRecipe( + i + 1, + new FluidStack(uncrackedFluid, 1000), + Materials.Hydrogen.getGas(hydrogenAmount * 800), + new FluidStack(crackedFluids[i], 1000), + 20 + 20 * i, + 240); + GT_Values.RA.addChemicalRecipe( + Materials.Hydrogen.getCells(hydrogenAmount), + GT_Utility.getIntegratedCircuit(i + 1), + new FluidStack(uncrackedFluid, 1000), + new FluidStack(crackedFluids[i], 800), + Materials.Empty.getCells(hydrogenAmount), + 160 + 80 * i, + 30); + GT_Values.RA.addChemicalRecipe( + aMaterial.getCells(1), + GT_Utility.getIntegratedCircuit(i + 1), + Materials.Hydrogen.getGas(hydrogenAmount * 1000), + new FluidStack(crackedFluids[i], 800), + Materials.Empty.getCells(1), + 160 + 80 * i, + 30); } aMaterial.setHydroCrackedFluids(crackedFluids); } - public void addAutoGeneratedSteamCrackedFluids(Materials aMaterial){ + public void addAutoGeneratedSteamCrackedFluids(Materials aMaterial) { Fluid[] crackedFluids = new Fluid[3]; - String[] namePrefixes = { "lightlysteamcracked.", "moderatelysteamcracked.", "severelysteamcracked." }; - OrePrefixes[] orePrefixes = { OrePrefixes.cellSteamCracked1, OrePrefixes.cellSteamCracked2, OrePrefixes.cellSteamCracked3 }; + String[] namePrefixes = {"lightlysteamcracked.", "moderatelysteamcracked.", "severelysteamcracked."}; + OrePrefixes[] orePrefixes = { + OrePrefixes.cellSteamCracked1, OrePrefixes.cellSteamCracked2, OrePrefixes.cellSteamCracked3 + }; GT_Fluid uncrackedFluid = null; if (aMaterial.mFluid != null) { uncrackedFluid = (GT_Fluid) aMaterial.mFluid; @@ -1993,18 +2596,40 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } for (int i = 0; i < 3; i++) { crackedFluids[i] = addFluid( - namePrefixes[i] + aMaterial.mName.toLowerCase(Locale.ENGLISH), uncrackedFluid.mTextureName, + namePrefixes[i] + aMaterial.mName.toLowerCase(Locale.ENGLISH), + uncrackedFluid.mTextureName, orePrefixes[i].mLocalizedMaterialPre + aMaterial.mDefaultLocalName, - null, aMaterial.mRGBa, 2, 775, + null, + aMaterial.mRGBa, + 2, + 775, GT_OreDictUnificator.get(orePrefixes[i], aMaterial, 1L), - ItemList.Cell_Empty.get(1L), 1000); - - GT_Values.RA.addCrackingRecipe(i + 1, new FluidStack(uncrackedFluid, 1000), GT_ModHandler.getSteam(1000), - new FluidStack(crackedFluids[i], 1200), 20 + 20 * i, 240); - GT_Values.RA.addChemicalRecipe(GT_ModHandler.getIC2Item("steamCell", 1L), GT_Utility.getIntegratedCircuit(i + 1), new FluidStack(uncrackedFluid, 1000), - new FluidStack(crackedFluids[i], 800), Materials.Empty.getCells(1), 160 + 80 * i, 30); - GT_Values.RA.addChemicalRecipe(aMaterial.getCells(1), GT_Utility.getIntegratedCircuit(i + 1), GT_ModHandler.getSteam(1000), - new FluidStack(crackedFluids[i], 800), Materials.Empty.getCells(1), 160 + 80 * i, 30); + ItemList.Cell_Empty.get(1L), + 1000); + + GT_Values.RA.addCrackingRecipe( + i + 1, + new FluidStack(uncrackedFluid, 1000), + GT_ModHandler.getSteam(1000), + new FluidStack(crackedFluids[i], 1200), + 20 + 20 * i, + 240); + GT_Values.RA.addChemicalRecipe( + GT_ModHandler.getIC2Item("steamCell", 1L), + GT_Utility.getIntegratedCircuit(i + 1), + new FluidStack(uncrackedFluid, 1000), + new FluidStack(crackedFluids[i], 800), + Materials.Empty.getCells(1), + 160 + 80 * i, + 30); + GT_Values.RA.addChemicalRecipe( + aMaterial.getCells(1), + GT_Utility.getIntegratedCircuit(i + 1), + GT_ModHandler.getSteam(1000), + new FluidStack(crackedFluids[i], 800), + Materials.Empty.getCells(1), + 160 + 80 * i, + 30); } aMaterial.setSteamCrackedFluids(crackedFluids); } @@ -2013,13 +2638,39 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG return addFluid(aName, aLocalized, aMaterial, aState, aTemperatureK, null, null, 0); } - public Fluid addFluid(String aName, String aLocalized, Materials aMaterial, int aState, int aTemperatureK, ItemStack aFullContainer, - ItemStack aEmptyContainer, int aFluidAmount) { - return addFluid(aName, aName.toLowerCase(Locale.ENGLISH), aLocalized, aMaterial, null, aState, aTemperatureK, aFullContainer, aEmptyContainer, aFluidAmount); + public Fluid addFluid( + String aName, + String aLocalized, + Materials aMaterial, + int aState, + int aTemperatureK, + ItemStack aFullContainer, + ItemStack aEmptyContainer, + int aFluidAmount) { + return addFluid( + aName, + aName.toLowerCase(Locale.ENGLISH), + aLocalized, + aMaterial, + null, + aState, + aTemperatureK, + aFullContainer, + aEmptyContainer, + aFluidAmount); } - public Fluid addFluid(String aName, String aTexture, String aLocalized, Materials aMaterial, short[] aRGBa, int aState, int aTemperatureK, - ItemStack aFullContainer, ItemStack aEmptyContainer, int aFluidAmount) { + public Fluid addFluid( + String aName, + String aTexture, + String aLocalized, + Materials aMaterial, + short[] aRGBa, + int aState, + int aTemperatureK, + ItemStack aFullContainer, + ItemStack aEmptyContainer, + int aFluidAmount) { aName = aName.toLowerCase(Locale.ENGLISH); Fluid rFluid = new GT_Fluid(aName, aTexture, aRGBa != null ? aRGBa : Dyes._NULL.getRGBA()); @@ -2070,9 +2721,15 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG aMaterial.mStandardMoltenFluid = rFluid; } } - if ((aFullContainer != null) && (aEmptyContainer != null) - && (!FluidContainerRegistry.registerFluidContainer(new FluidStack(rFluid, aFluidAmount), aFullContainer, aEmptyContainer))) { - GT_Values.RA.addFluidCannerRecipe(aFullContainer, GT_Utility.getContainerItem(aFullContainer, false), null, new FluidStack(rFluid, aFluidAmount)); + if ((aFullContainer != null) + && (aEmptyContainer != null) + && (!FluidContainerRegistry.registerFluidContainer( + new FluidStack(rFluid, aFluidAmount), aFullContainer, aEmptyContainer))) { + GT_Values.RA.addFluidCannerRecipe( + aFullContainer, + GT_Utility.getContainerItem(aFullContainer, false), + null, + new FluidStack(rFluid, aFluidAmount)); } return rFluid; } @@ -2086,61 +2743,255 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG GregTech_API.sUnification.mConfig.load(); GT_OreDictUnificator.resetUnificationEntries(); for (OreDictEventContainer tOre : this.mEvents) { - if ((!(tOre.mEvent.Ore.getItem() instanceof GT_MetaGenerated_Item)) && (tOre.mPrefix != null) && (tOre.mPrefix.mIsUnificatable) && (tOre.mMaterial != null)) { + if ((!(tOre.mEvent.Ore.getItem() instanceof GT_MetaGenerated_Item)) + && (tOre.mPrefix != null) + && (tOre.mPrefix.mIsUnificatable) + && (tOre.mMaterial != null)) { boolean chkmi = tOre.mModID != null; if (chkmi) { - if (tOre.mModID.equalsIgnoreCase("enderio") && tOre.mPrefix == OrePrefixes.ingot && tOre.mMaterial == Materials.DarkSteel) { + if (tOre.mModID.equalsIgnoreCase("enderio") + && tOre.mPrefix == OrePrefixes.ingot + && tOre.mMaterial == Materials.DarkSteel) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); - GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".").append(tOre.mModID).toString(), tOre.mEvent.Name, true)), true);continue; - } else if (tOre.mModID.equalsIgnoreCase("thermalfoundation") && tOre.mPrefix == OrePrefixes.dust && tOre.mMaterial == Materials.Blizz) { + GT_OreDictUnificator.set( + tOre.mPrefix, + tOre.mMaterial, + tOre.mEvent.Ore, + (GregTech_API.sUnification.get( + new StringBuilder() + .append(ConfigCategories.specialunificationtargets) + .append(".") + .append(tOre.mModID) + .toString(), + tOre.mEvent.Name, + true)), + true); + continue; + } else if (tOre.mModID.equalsIgnoreCase("thermalfoundation") + && tOre.mPrefix == OrePrefixes.dust + && tOre.mMaterial == Materials.Blizz) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); - GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".").append(tOre.mModID).toString(), tOre.mEvent.Name, true)), true);continue; - } else if (tOre.mModID.equalsIgnoreCase("thermalfoundation") && tOre.mPrefix == OrePrefixes.dust && tOre.mMaterial == Materials.Pyrotheum) { + GT_OreDictUnificator.set( + tOre.mPrefix, + tOre.mMaterial, + tOre.mEvent.Ore, + (GregTech_API.sUnification.get( + new StringBuilder() + .append(ConfigCategories.specialunificationtargets) + .append(".") + .append(tOre.mModID) + .toString(), + tOre.mEvent.Name, + true)), + true); + continue; + } else if (tOre.mModID.equalsIgnoreCase("thermalfoundation") + && tOre.mPrefix == OrePrefixes.dust + && tOre.mMaterial == Materials.Pyrotheum) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); - GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".").append(tOre.mModID).toString(), tOre.mEvent.Name, true)), true);continue; - } else if (tOre.mModID.equalsIgnoreCase(aTextArsmagica2) && tOre.mPrefix == OrePrefixes.dust && tOre.mMaterial == Materials.Vinteum) { + GT_OreDictUnificator.set( + tOre.mPrefix, + tOre.mMaterial, + tOre.mEvent.Ore, + (GregTech_API.sUnification.get( + new StringBuilder() + .append(ConfigCategories.specialunificationtargets) + .append(".") + .append(tOre.mModID) + .toString(), + tOre.mEvent.Name, + true)), + true); + continue; + } else if (tOre.mModID.equalsIgnoreCase(aTextArsmagica2) + && tOre.mPrefix == OrePrefixes.dust + && tOre.mMaterial == Materials.Vinteum) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); - GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".").append(tOre.mModID).toString(), tOre.mEvent.Name, true)), true);continue; - } else if (tOre.mModID.equalsIgnoreCase(aTextArsmagica2) && tOre.mPrefix == OrePrefixes.gem && tOre.mMaterial == Materials.BlueTopaz) { + GT_OreDictUnificator.set( + tOre.mPrefix, + tOre.mMaterial, + tOre.mEvent.Ore, + (GregTech_API.sUnification.get( + new StringBuilder() + .append(ConfigCategories.specialunificationtargets) + .append(".") + .append(tOre.mModID) + .toString(), + tOre.mEvent.Name, + true)), + true); + continue; + } else if (tOre.mModID.equalsIgnoreCase(aTextArsmagica2) + && tOre.mPrefix == OrePrefixes.gem + && tOre.mMaterial == Materials.BlueTopaz) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); - GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".").append(tOre.mModID).toString(), tOre.mEvent.Name, true)), true);continue; - } else if (tOre.mModID.equalsIgnoreCase(aTextArsmagica2) && tOre.mPrefix == OrePrefixes.gem && tOre.mMaterial == Materials.Chimerite) { + GT_OreDictUnificator.set( + tOre.mPrefix, + tOre.mMaterial, + tOre.mEvent.Ore, + (GregTech_API.sUnification.get( + new StringBuilder() + .append(ConfigCategories.specialunificationtargets) + .append(".") + .append(tOre.mModID) + .toString(), + tOre.mEvent.Name, + true)), + true); + continue; + } else if (tOre.mModID.equalsIgnoreCase(aTextArsmagica2) + && tOre.mPrefix == OrePrefixes.gem + && tOre.mMaterial == Materials.Chimerite) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); - GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".").append(tOre.mModID).toString(), tOre.mEvent.Name, true)), true);continue; - } else if (tOre.mModID.equalsIgnoreCase(aTextArsmagica2) && tOre.mPrefix == OrePrefixes.gem && tOre.mMaterial == Materials.Moonstone) { + GT_OreDictUnificator.set( + tOre.mPrefix, + tOre.mMaterial, + tOre.mEvent.Ore, + (GregTech_API.sUnification.get( + new StringBuilder() + .append(ConfigCategories.specialunificationtargets) + .append(".") + .append(tOre.mModID) + .toString(), + tOre.mEvent.Name, + true)), + true); + continue; + } else if (tOre.mModID.equalsIgnoreCase(aTextArsmagica2) + && tOre.mPrefix == OrePrefixes.gem + && tOre.mMaterial == Materials.Moonstone) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); - GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".").append(tOre.mModID).toString(), tOre.mEvent.Name, true)), true);continue; - } else if (tOre.mModID.equalsIgnoreCase(aTextArsmagica2) && tOre.mPrefix == OrePrefixes.gem && tOre.mMaterial == Materials.Sunstone) { + GT_OreDictUnificator.set( + tOre.mPrefix, + tOre.mMaterial, + tOre.mEvent.Ore, + (GregTech_API.sUnification.get( + new StringBuilder() + .append(ConfigCategories.specialunificationtargets) + .append(".") + .append(tOre.mModID) + .toString(), + tOre.mEvent.Name, + true)), + true); + continue; + } else if (tOre.mModID.equalsIgnoreCase(aTextArsmagica2) + && tOre.mPrefix == OrePrefixes.gem + && tOre.mMaterial == Materials.Sunstone) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); - GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".").append(tOre.mModID).toString(), tOre.mEvent.Name, true)), true);continue; - } else if (tOre.mModID.equalsIgnoreCase("rotarycraft") && tOre.mPrefix == OrePrefixes.ingot && tOre.mMaterial == Materials.HSLA) { + GT_OreDictUnificator.set( + tOre.mPrefix, + tOre.mMaterial, + tOre.mEvent.Ore, + (GregTech_API.sUnification.get( + new StringBuilder() + .append(ConfigCategories.specialunificationtargets) + .append(".") + .append(tOre.mModID) + .toString(), + tOre.mEvent.Name, + true)), + true); + continue; + } else if (tOre.mModID.equalsIgnoreCase("rotarycraft") + && tOre.mPrefix == OrePrefixes.ingot + && tOre.mMaterial == Materials.HSLA) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); - GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".").append(tOre.mModID).toString(), tOre.mEvent.Name, true)), true);continue; - } else if (tOre.mModID.equalsIgnoreCase("appliedenergistics2") && tOre.mPrefix == OrePrefixes.gem && tOre.mMaterial == Materials.CertusQuartz) { + GT_OreDictUnificator.set( + tOre.mPrefix, + tOre.mMaterial, + tOre.mEvent.Ore, + (GregTech_API.sUnification.get( + new StringBuilder() + .append(ConfigCategories.specialunificationtargets) + .append(".") + .append(tOre.mModID) + .toString(), + tOre.mEvent.Name, + true)), + true); + continue; + } else if (tOre.mModID.equalsIgnoreCase("appliedenergistics2") + && tOre.mPrefix == OrePrefixes.gem + && tOre.mMaterial == Materials.CertusQuartz) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); - GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".").append(tOre.mModID).toString(), tOre.mEvent.Name, true)), true);continue; - } else if (tOre.mModID.equalsIgnoreCase("appliedenergistics2") && tOre.mPrefix == OrePrefixes.dust && tOre.mMaterial == Materials.CertusQuartz) { + GT_OreDictUnificator.set( + tOre.mPrefix, + tOre.mMaterial, + tOre.mEvent.Ore, + (GregTech_API.sUnification.get( + new StringBuilder() + .append(ConfigCategories.specialunificationtargets) + .append(".") + .append(tOre.mModID) + .toString(), + tOre.mEvent.Name, + true)), + true); + continue; + } else if (tOre.mModID.equalsIgnoreCase("appliedenergistics2") + && tOre.mPrefix == OrePrefixes.dust + && tOre.mMaterial == Materials.CertusQuartz) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); - GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".").append(tOre.mModID).toString(), tOre.mEvent.Name, true)), true);continue; + GT_OreDictUnificator.set( + tOre.mPrefix, + tOre.mMaterial, + tOre.mEvent.Ore, + (GregTech_API.sUnification.get( + new StringBuilder() + .append(ConfigCategories.specialunificationtargets) + .append(".") + .append(tOre.mModID) + .toString(), + tOre.mEvent.Name, + true)), + true); + continue; } } if (GT_OreDictUnificator.isBlacklisted(tOre.mEvent.Ore)) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, true); } else { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); - GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (chkmi) && (GregTech_API.sUnification.get(new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".").append(tOre.mModID).toString(), tOre.mEvent.Name, false)), true); + GT_OreDictUnificator.set( + tOre.mPrefix, + tOre.mMaterial, + tOre.mEvent.Ore, + (chkmi) + && (GregTech_API.sUnification.get( + new StringBuilder() + .append(ConfigCategories.specialunificationtargets) + .append(".") + .append(tOre.mModID) + .toString(), + tOre.mEvent.Name, + false)), + true); } } } for (OreDictEventContainer tOre : this.mEvents) { - if (((tOre.mEvent.Ore.getItem() instanceof GT_MetaGenerated_Item)) && (tOre.mPrefix != null) && (tOre.mPrefix.mIsUnificatable) + if (((tOre.mEvent.Ore.getItem() instanceof GT_MetaGenerated_Item)) + && (tOre.mPrefix != null) + && (tOre.mPrefix.mIsUnificatable) && (tOre.mMaterial != null)) { if (GT_OreDictUnificator.isBlacklisted(tOre.mEvent.Ore)) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, true); } else { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); - GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) && - (GregTech_API.sUnification.get(new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".").append(tOre.mModID), tOre.mEvent.Name, false)), true); + GT_OreDictUnificator.set( + tOre.mPrefix, + tOre.mMaterial, + tOre.mEvent.Ore, + (tOre.mModID != null) + && (GregTech_API.sUnification.get( + new StringBuilder() + .append(ConfigCategories.specialunificationtargets) + .append(".") + .append(tOre.mModID), + tOre.mEvent.Name, + false)), + true); } } } @@ -2154,32 +3005,38 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG this.mOreDictActivated = true; ProgressManager.ProgressBar progressBar = ProgressManager.push("Register materials", mEvents.size()); - if (Loader.isModLoaded("betterloadingscreen")){ + if (Loader.isModLoaded("betterloadingscreen")) { GT_Values.cls_enabled = true; try { GT_CLS_Compat.stepMaterialsCLS(mEvents, progressBar); } catch (IllegalAccessException | InvocationTargetException e) { GT_FML_LOGGER.catching(e); } - } - else - GT_Proxy.stepMaterialsVanilla(this.mEvents,progressBar); - + } else GT_Proxy.stepMaterialsVanilla(this.mEvents, progressBar); } @Deprecated - public static final HashMap<Integer,HashMap<ChunkCoordIntPair,int []>> dimensionWiseChunkData = new HashMap<>(16);//stores chunk data that is loaded/saved - public static final HashMap<Integer,GT_Pollution> dimensionWisePollution = new HashMap<>(16);//stores GT_Polluttors objects - public static final byte GTOIL=3,GTOILFLUID=2,GTPOLLUTION=1,GTMETADATA=0,NOT_LOADED=0,LOADED=1;//consts - - //TO get default's fast + public static final HashMap<Integer, HashMap<ChunkCoordIntPair, int[]>> dimensionWiseChunkData = + new HashMap<>(16); // stores chunk data that is loaded/saved + + public static final HashMap<Integer, GT_Pollution> dimensionWisePollution = + new HashMap<>(16); // stores GT_Polluttors objects + public static final byte GTOIL = 3, + GTOILFLUID = 2, + GTPOLLUTION = 1, + GTMETADATA = 0, + NOT_LOADED = 0, + LOADED = 1; // consts + + // TO get default's fast @Deprecated - public static int[] getDefaultChunkDataOnCreation(){ - return new int[]{NOT_LOADED,0,-1,-1}; + public static int[] getDefaultChunkDataOnCreation() { + return new int[] {NOT_LOADED, 0, -1, -1}; } + @Deprecated - public static int[] getDefaultChunkDataOnLoad(){ - return new int[]{LOADED,0,-1,-1}; + public static int[] getDefaultChunkDataOnLoad() { + return new int[] {LOADED, 0, -1, -1}; } @SubscribeEvent @@ -2189,18 +3046,25 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } @SubscribeEvent - public void onBlockBreakSpeedEvent(PlayerEvent.BreakSpeed aEvent) - { - if (aEvent.newSpeed > 0.0F) - { - if (aEvent.entityPlayer != null) - { - ItemStack aStack = aEvent.entityPlayer.getCurrentEquippedItem(); - if ((aStack != null) && ((aStack.getItem() instanceof GT_MetaGenerated_Tool))) { - aEvent.newSpeed = ((GT_MetaGenerated_Tool)aStack.getItem()).onBlockBreakSpeedEvent(aEvent.newSpeed, aStack, aEvent.entityPlayer, aEvent.block, aEvent.x, aEvent.y, aEvent.z, (byte)aEvent.metadata, aEvent); - } + public void onBlockBreakSpeedEvent(PlayerEvent.BreakSpeed aEvent) { + if (aEvent.newSpeed > 0.0F) { + if (aEvent.entityPlayer != null) { + ItemStack aStack = aEvent.entityPlayer.getCurrentEquippedItem(); + if ((aStack != null) && ((aStack.getItem() instanceof GT_MetaGenerated_Tool))) { + aEvent.newSpeed = ((GT_MetaGenerated_Tool) aStack.getItem()) + .onBlockBreakSpeedEvent( + aEvent.newSpeed, + aStack, + aEvent.entityPlayer, + aEvent.block, + aEvent.x, + aEvent.y, + aEvent.z, + (byte) aEvent.metadata, + aEvent); + } + } } - } } public static class OreDictEventContainer { @@ -2209,7 +3073,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG public final Materials mMaterial; public final String mModID; - public OreDictEventContainer(OreDictionary.OreRegisterEvent aEvent, OrePrefixes aPrefix, Materials aMaterial, String aModID) { + public OreDictEventContainer( + OreDictionary.OreRegisterEvent aEvent, OrePrefixes aPrefix, Materials aMaterial, String aModID) { this.mEvent = aEvent; this.mPrefix = aPrefix; this.mMaterial = aMaterial; @@ -2218,27 +3083,27 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } @SubscribeEvent - public void onBlockEvent(BlockEvent event) { + public void onBlockEvent(BlockEvent event) { if (event.block.getUnlocalizedName().equals("blockAlloyGlass")) GregTech_API.causeMachineUpdate(event.world, event.x, event.y, event.z); } - public static void addFullHazmatToGeneralItem(String aModID, String aItem, long aAmount, int aMeta){ + public static void addFullHazmatToGeneralItem(String aModID, String aItem, long aAmount, int aMeta) { ItemStack item = GT_ModHandler.getModItem(aModID, aItem, aAmount, aMeta); addItemToHazmatLists(item); } - public static void addFullHazmatToGeneralItem(String aModID, String aItem, long aAmount){ + public static void addFullHazmatToGeneralItem(String aModID, String aItem, long aAmount) { ItemStack item = GT_ModHandler.getModItem(aModID, aItem, aAmount, W); addItemToHazmatLists(item); } - public static void addFullHazmatToIC2Item(String aItem){ + public static void addFullHazmatToIC2Item(String aItem) { ItemStack item = GT_ModHandler.getIC2Item(aItem, 1L, W); addItemToHazmatLists(item); } - private static void addItemToHazmatLists(ItemStack item){ + private static void addItemToHazmatLists(ItemStack item) { GregTech_API.sGasHazmatList.add(item); GregTech_API.sBioHazmatList.add(item); GregTech_API.sFrostHazmatList.add(item); @@ -2247,7 +3112,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG GregTech_API.sElectroHazmatList.add(item); } - public static boolean providesProtection(ItemStack aStack){ + public static boolean providesProtection(ItemStack aStack) { boolean isGas = GT_Utility.isStackInList(aStack, GregTech_API.sGasHazmatList); boolean isBio = GT_Utility.isStackInList(aStack, GregTech_API.sBioHazmatList); boolean isFrost = GT_Utility.isStackInList(aStack, GregTech_API.sFrostHazmatList); @@ -2261,8 +3126,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG public void onItemTooltip(ItemTooltipEvent event) { if (event.itemStack == null) { return; - } - else { + } else { ItemStack aStackTemp = event.itemStack; GT_ItemStack aStack = new GT_ItemStack(aStackTemp); if (providesProtection(aStackTemp)) { diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java index db36458769..a3fd8013c2 100644 --- a/src/main/java/gregtech/common/GT_RecipeAdder.java +++ b/src/main/java/gregtech/common/GT_RecipeAdder.java @@ -1,5 +1,7 @@ package gregtech.common; +import static gregtech.GT_Mod.GT_FML_LOGGER; + import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.GameRegistry; import gregtech.GT_Mod; @@ -14,6 +16,10 @@ import gregtech.api.objects.ItemData; import gregtech.api.util.*; import gregtech.api.util.GT_Recipe.GT_Recipe_AssemblyLine; import gregtech.common.items.GT_IntegratedCircuit_Item; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Comparator; +import java.util.List; import mods.railcraft.common.blocks.aesthetics.cube.EnumCube; import mods.railcraft.common.items.RailcraftToolItems; import net.minecraft.init.Blocks; @@ -23,84 +29,201 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Comparator; -import java.util.List; - -import static gregtech.GT_Mod.GT_FML_LOGGER; - public class GT_RecipeAdder implements IGT_RecipeAdder { - @Override @Deprecated - public boolean addFusionReactorRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt, int aStartEU) { + public boolean addFusionReactorRecipe( + ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt, int aStartEU) { return false; } - @Override //Really? - public boolean addFusionReactorRecipe(FluidStack aInput1, FluidStack aInput2, FluidStack aOutput1, int aDuration, int aEUt, int aStartEU) { + @Override // Really? + public boolean addFusionReactorRecipe( + FluidStack aInput1, FluidStack aInput2, FluidStack aOutput1, int aDuration, int aEUt, int aStartEU) { if (aInput1 == null || aInput2 == null || aOutput1 == null || aDuration < 1 || aEUt < 1 || aStartEU < 1) { return false; } - if ((aOutput1 != null) && ((aDuration = GregTech_API.sRecipeFile.get("fusion", aOutput1.getFluid().getName(), aDuration)) <= 0)) { + if ((aOutput1 != null) + && ((aDuration = GregTech_API.sRecipeFile.get( + "fusion", aOutput1.getFluid().getName(), aDuration)) + <= 0)) { return false; } - GT_Recipe.GT_Recipe_Map.sFusionRecipes.addRecipe(null, new FluidStack[]{aInput1, aInput2}, new FluidStack[]{aOutput1}, aDuration, aEUt, aStartEU); + GT_Recipe.GT_Recipe_Map.sFusionRecipes.addRecipe( + null, new FluidStack[] {aInput1, aInput2}, new FluidStack[] {aOutput1}, aDuration, aEUt, aStartEU); return true; } @Override - public boolean addFusionReactorRecipe(FluidStack[] FluidInputArray, FluidStack[] FluidOutputArray, int aFusionDurationInTicks, int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion) { - if (FluidInputArray.length == 0) - return false; + public boolean addFusionReactorRecipe( + FluidStack[] FluidInputArray, + FluidStack[] FluidOutputArray, + int aFusionDurationInTicks, + int aFusionEnergyPerTick, + int aEnergyNeededForStartingFusion) { + if (FluidInputArray.length == 0) return false; - if (FluidOutputArray.length == 0) - return false; + if (FluidOutputArray.length == 0) return false; // If the recipe has more than 2 inputs or 2 outputs it is added to a different recipe map. // This is so NEI can function properly and understand the recipe. Otherwise it gets cut off. if ((FluidInputArray.length > 2) || (FluidInputArray.length > 2)) { - GT_Recipe.GT_Recipe_Map.sComplexFusionRecipes.addRecipe(null, FluidInputArray, FluidOutputArray, aFusionDurationInTicks, aFusionEnergyPerTick, aEnergyNeededForStartingFusion); + GT_Recipe.GT_Recipe_Map.sComplexFusionRecipes.addRecipe( + null, + FluidInputArray, + FluidOutputArray, + aFusionDurationInTicks, + aFusionEnergyPerTick, + aEnergyNeededForStartingFusion); return true; } - GT_Recipe.GT_Recipe_Map.sFusionRecipes.addRecipe(null, FluidInputArray, FluidOutputArray, aFusionDurationInTicks, aFusionEnergyPerTick, aEnergyNeededForStartingFusion); - return true; - } - - - @Override - public boolean addCentrifugeRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration) { - return addCentrifugeRecipe(aInput1, aInput2 < 0 ? ItemList.IC2_Fuel_Can_Empty.get(-aInput2, new Object[0]) : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2, new Object[0]) : null, null, null, aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6, null, aDuration, 5); - } - - @Override - public boolean addCentrifugeRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration, int aEUt) { - return addCentrifugeRecipe(aInput1, aInput2 < 0 ? ItemList.IC2_Fuel_Can_Empty.get(-aInput2, new Object[0]) : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2, new Object[0]) : null, null, null, aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6, null, aDuration, aEUt); - } - - @Override - public boolean addCentrifugeRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt) { - return addCentrifugeRecipe(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6, aChances, aDuration, aEUt, false); - } - - @Override - public boolean addCentrifugeRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt, boolean aCleanroom) { + GT_Recipe.GT_Recipe_Map.sFusionRecipes.addRecipe( + null, + FluidInputArray, + FluidOutputArray, + aFusionDurationInTicks, + aFusionEnergyPerTick, + aEnergyNeededForStartingFusion); + return true; + } + + @Override + public boolean addCentrifugeRecipe( + ItemStack aInput1, + int aInput2, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + ItemStack aOutput4, + ItemStack aOutput5, + ItemStack aOutput6, + int aDuration) { + return addCentrifugeRecipe( + aInput1, + aInput2 < 0 + ? ItemList.IC2_Fuel_Can_Empty.get(-aInput2, new Object[0]) + : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2, new Object[0]) : null, + null, + null, + aOutput1, + aOutput2, + aOutput3, + aOutput4, + aOutput5, + aOutput6, + null, + aDuration, + 5); + } + + @Override + public boolean addCentrifugeRecipe( + ItemStack aInput1, + int aInput2, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + ItemStack aOutput4, + ItemStack aOutput5, + ItemStack aOutput6, + int aDuration, + int aEUt) { + return addCentrifugeRecipe( + aInput1, + aInput2 < 0 + ? ItemList.IC2_Fuel_Can_Empty.get(-aInput2, new Object[0]) + : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2, new Object[0]) : null, + null, + null, + aOutput1, + aOutput2, + aOutput3, + aOutput4, + aOutput5, + aOutput6, + null, + aDuration, + aEUt); + } + + @Override + public boolean addCentrifugeRecipe( + ItemStack aInput1, + ItemStack aInput2, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + ItemStack aOutput4, + ItemStack aOutput5, + ItemStack aOutput6, + int[] aChances, + int aDuration, + int aEUt) { + return addCentrifugeRecipe( + aInput1, + aInput2, + aFluidInput, + aFluidOutput, + aOutput1, + aOutput2, + aOutput3, + aOutput4, + aOutput5, + aOutput6, + aChances, + aDuration, + aEUt, + false); + } + + @Override + public boolean addCentrifugeRecipe( + ItemStack aInput1, + ItemStack aInput2, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + ItemStack aOutput4, + ItemStack aOutput5, + ItemStack aOutput6, + int[] aChances, + int aDuration, + int aEUt, + boolean aCleanroom) { if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput1 == null) && (aFluidOutput == null))) { return false; } if ((aInput1 != null) && ((aDuration = GregTech_API.sRecipeFile.get("centrifuge", aInput1, aDuration)) <= 0)) { return false; } - if ((aFluidInput != null) && ((aDuration = GregTech_API.sRecipeFile.get("centrifuge", aFluidInput.getFluid().getName(), aDuration)) <= 0)) { + if ((aFluidInput != null) + && ((aDuration = GregTech_API.sRecipeFile.get( + "centrifuge", aFluidInput.getFluid().getName(), aDuration)) + <= 0)) { return false; } if (!GT_Mod.gregtechproxy.mEnableCleanroom) { aCleanroom = false; } - GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2}, new ItemStack[]{aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6,}, null, aChances, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, aCleanroom ? -100 : 0); + GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe( + true, + new ItemStack[] {aInput1, aInput2}, + new ItemStack[] { + aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6, + }, + null, + aChances, + new FluidStack[] {aFluidInput}, + new FluidStack[] {aFluidOutput}, + aDuration, + aEUt, + aCleanroom ? -100 : 0); return true; } @@ -112,27 +235,80 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput1 != null) && ((aDuration = GregTech_API.sRecipeFile.get("compressor", aInput1, aDuration)) <= 0)) { return false; } - GT_Recipe.GT_Recipe_Map.sCompressorRecipes.addRecipe(true, new ItemStack[]{aInput1}, new ItemStack[]{aOutput1}, null, null, null, aDuration, aEUt, 0); - return true; - } - - @Override - public boolean addElectrolyzerRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration, int aEUt) { - return addElectrolyzerRecipe(aInput1, aInput2 < 0 ? ItemList.IC2_Fuel_Can_Empty.get(-aInput2, new Object[0]) : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2, new Object[0]) : null, null, null, aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6, null, aDuration, aEUt); - } - - @Override - public boolean addElectrolyzerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt) { + GT_Recipe.GT_Recipe_Map.sCompressorRecipes.addRecipe( + true, new ItemStack[] {aInput1}, new ItemStack[] {aOutput1}, null, null, null, aDuration, aEUt, 0); + return true; + } + + @Override + public boolean addElectrolyzerRecipe( + ItemStack aInput1, + int aInput2, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + ItemStack aOutput4, + ItemStack aOutput5, + ItemStack aOutput6, + int aDuration, + int aEUt) { + return addElectrolyzerRecipe( + aInput1, + aInput2 < 0 + ? ItemList.IC2_Fuel_Can_Empty.get(-aInput2, new Object[0]) + : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2, new Object[0]) : null, + null, + null, + aOutput1, + aOutput2, + aOutput3, + aOutput4, + aOutput5, + aOutput6, + null, + aDuration, + aEUt); + } + + @Override + public boolean addElectrolyzerRecipe( + ItemStack aInput1, + ItemStack aInput2, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + ItemStack aOutput4, + ItemStack aOutput5, + ItemStack aOutput6, + int[] aChances, + int aDuration, + int aEUt) { if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput1 == null) && (aFluidOutput == null))) { return false; } - if ((aInput1 != null) && ((aDuration = GregTech_API.sRecipeFile.get("electrolyzer", aInput1, aDuration)) <= 0)) { + if ((aInput1 != null) + && ((aDuration = GregTech_API.sRecipeFile.get("electrolyzer", aInput1, aDuration)) <= 0)) { return false; } - if ((aFluidInput != null) && ((aDuration = GregTech_API.sRecipeFile.get("electrolyzer", aFluidInput.getFluid().getName(), aDuration)) <= 0)) { + if ((aFluidInput != null) + && ((aDuration = GregTech_API.sRecipeFile.get( + "electrolyzer", aFluidInput.getFluid().getName(), aDuration)) + <= 0)) { return false; } - GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2}, new ItemStack[]{aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6}, null, aChances, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.addRecipe( + true, + new ItemStack[] {aInput1, aInput2}, + new ItemStack[] {aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6}, + null, + aChances, + new FluidStack[] {aFluidInput}, + new FluidStack[] {aFluidOutput}, + aDuration, + aEUt, + 0); return true; } @@ -147,34 +323,78 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration) { + public boolean addChemicalRecipe( + ItemStack aInput1, + ItemStack aInput2, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput, + int aDuration) { return addChemicalRecipe(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, aDuration, 30); } @Override - public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration) { + public boolean addChemicalRecipe( + ItemStack aInput1, + ItemStack aInput2, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput, + ItemStack aOutput2, + int aDuration) { return addChemicalRecipe(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, aOutput2, aDuration, 30); } @Override - public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUTick) { - return addChemicalRecipe(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, GT_Values.NI, aDuration, aEUTick); + public boolean addChemicalRecipe( + ItemStack aInput1, + ItemStack aInput2, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput, + int aDuration, + int aEUTick) { + return addChemicalRecipe( + aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, GT_Values.NI, aDuration, aEUTick); } @Override - public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick) { - return addChemicalRecipe(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, aOutput2, aDuration, aEUtick, false); + public boolean addChemicalRecipe( + ItemStack aInput1, + ItemStack aInput2, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput, + ItemStack aOutput2, + int aDuration, + int aEUtick) { + return addChemicalRecipe( + aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, aOutput2, aDuration, aEUtick, false); } @Override - public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick, boolean aCleanroom) { - if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput == null) && (aOutput2 == null) && (aFluidOutput == null))) { + public boolean addChemicalRecipe( + ItemStack aInput1, + ItemStack aInput2, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput, + ItemStack aOutput2, + int aDuration, + int aEUtick, + boolean aCleanroom) { + if (((aInput1 == null) && (aFluidInput == null)) + || ((aOutput == null) && (aOutput2 == null) && (aFluidOutput == null))) { return false; } - if ((aOutput != null || aOutput2 != null) && ((aDuration = GregTech_API.sRecipeFile.get("chemicalreactor", aOutput, aDuration)) <= 0)) { + if ((aOutput != null || aOutput2 != null) + && ((aDuration = GregTech_API.sRecipeFile.get("chemicalreactor", aOutput, aDuration)) <= 0)) { return false; } - if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get("chemicalreactor", aFluidOutput.getFluid().getName(), aDuration)) <= 0)) { + if ((aFluidOutput != null) + && ((aDuration = GregTech_API.sRecipeFile.get( + "chemicalreactor", aFluidOutput.getFluid().getName(), aDuration)) + <= 0)) { return false; } if (aEUtick <= 0) { @@ -183,99 +403,261 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if (!GT_Mod.gregtechproxy.mEnableCleanroom) { aCleanroom = false; } - GT_Recipe.GT_Recipe_Map.sChemicalRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2}, new ItemStack[]{aOutput, aOutput2}, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUtick, aCleanroom ? -200 : 0); - if (!(aInput1 != null && aInput1.getItem() instanceof GT_IntegratedCircuit_Item && aInput1.getItemDamage() >= 10) - && !(aInput2 != null && aInput2.getItem() instanceof GT_IntegratedCircuit_Item && aInput2.getItemDamage() >= 10)) { - GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.addRecipe(false, new ItemStack[]{aInput1, aInput2}, new ItemStack[]{aOutput, aOutput2}, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUtick, 0); - } - return true; - } - - @Override - public boolean addMultiblockChemicalRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUtick) { + GT_Recipe.GT_Recipe_Map.sChemicalRecipes.addRecipe( + true, + new ItemStack[] {aInput1, aInput2}, + new ItemStack[] {aOutput, aOutput2}, + null, + null, + new FluidStack[] {aFluidInput}, + new FluidStack[] {aFluidOutput}, + aDuration, + aEUtick, + aCleanroom ? -200 : 0); + if (!(aInput1 != null + && aInput1.getItem() instanceof GT_IntegratedCircuit_Item + && aInput1.getItemDamage() >= 10) + && !(aInput2 != null + && aInput2.getItem() instanceof GT_IntegratedCircuit_Item + && aInput2.getItemDamage() >= 10)) { + GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.addRecipe( + false, + new ItemStack[] {aInput1, aInput2}, + new ItemStack[] {aOutput, aOutput2}, + null, + null, + new FluidStack[] {aFluidInput}, + new FluidStack[] {aFluidOutput}, + aDuration, + aEUtick, + 0); + } + return true; + } + + @Override + public boolean addMultiblockChemicalRecipe( + ItemStack[] aInputs, + FluidStack[] aFluidInputs, + FluidStack[] aFluidOutputs, + ItemStack[] aOutputs, + int aDuration, + int aEUtick) { if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs)) { return false; } if (aEUtick <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.addRecipe(false, aInputs, aOutputs, null, null, aFluidInputs, aFluidOutputs, aDuration, aEUtick, 0); + GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.addRecipe( + false, aInputs, aOutputs, null, null, aFluidInputs, aFluidOutputs, aDuration, aEUtick, 0); return true; } @Override - public boolean addChemicalRecipeForBasicMachineOnly(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick) { - if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput == null) && (aOutput2 == null) && (aFluidOutput == null))) { + public boolean addChemicalRecipeForBasicMachineOnly( + ItemStack aInput1, + ItemStack aInput2, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput, + ItemStack aOutput2, + int aDuration, + int aEUtick) { + if (((aInput1 == null) && (aFluidInput == null)) + || ((aOutput == null) && (aOutput2 == null) && (aFluidOutput == null))) { return false; } - if ((aOutput != null || aOutput2 != null) && ((aDuration = GregTech_API.sRecipeFile.get("chemicalreactor", aOutput, aDuration)) <= 0)) { + if ((aOutput != null || aOutput2 != null) + && ((aDuration = GregTech_API.sRecipeFile.get("chemicalreactor", aOutput, aDuration)) <= 0)) { return false; } - if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get("chemicalreactor", aFluidOutput.getFluid().getName(), aDuration)) <= 0)) { + if ((aFluidOutput != null) + && ((aDuration = GregTech_API.sRecipeFile.get( + "chemicalreactor", aFluidOutput.getFluid().getName(), aDuration)) + <= 0)) { return false; } if (aEUtick <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sChemicalRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2}, new ItemStack[]{aOutput, aOutput2}, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUtick, 0); + GT_Recipe.GT_Recipe_Map.sChemicalRecipes.addRecipe( + true, + new ItemStack[] {aInput1, aInput2}, + new ItemStack[] {aOutput, aOutput2}, + null, + null, + new FluidStack[] {aFluidInput}, + new FluidStack[] {aFluidOutput}, + aDuration, + aEUtick, + 0); return true; } @Override public void addDefaultPolymerizationRecipes(Fluid aBasicMaterial, ItemStack aBasicMaterialCell, Fluid aPolymer) { - //Oxygen/Titaniumtetrafluoride -> +50% Output each - addChemicalRecipe(ItemList.Cell_Air.get(1, new Object[0]), GT_Utility.getIntegratedCircuit(1), new GT_FluidStack(aBasicMaterial, 144), new GT_FluidStack(aPolymer, 144), Materials.Empty.getCells(1), 160); - addChemicalRecipe(Materials.Oxygen.getCells(1), GT_Utility.getIntegratedCircuit(1), new GT_FluidStack(aBasicMaterial, 144), new GT_FluidStack(aPolymer, 216), Materials.Empty.getCells(1), 160); - addChemicalRecipe(aBasicMaterialCell, GT_Utility.getIntegratedCircuit(1), Materials.Air.getGas(14000), new GT_FluidStack(aPolymer, 1000), Materials.Empty.getCells(1), 1120); - addChemicalRecipe(aBasicMaterialCell, GT_Utility.getIntegratedCircuit(1), Materials.Oxygen.getGas(7000), new GT_FluidStack(aPolymer, 1500), Materials.Empty.getCells(1), 1120); - addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(2)}, - new FluidStack[]{new GT_FluidStack(aBasicMaterial, 2160), Materials.Air.getGas(7500), Materials.Titaniumtetrachloride.getFluid(100)}, - new FluidStack[]{new GT_FluidStack(aPolymer, 3240)}, null, 800, 30); - addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(2)}, - new FluidStack[]{new GT_FluidStack(aBasicMaterial, 2160), Materials.Oxygen.getGas(7500), Materials.Titaniumtetrachloride.getFluid(100)}, - new FluidStack[]{new GT_FluidStack(aPolymer, 4320)}, null, 800, 30); - } - - - @Override - public boolean addBlastRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, int aLevel) { + // Oxygen/Titaniumtetrafluoride -> +50% Output each + addChemicalRecipe( + ItemList.Cell_Air.get(1, new Object[0]), + GT_Utility.getIntegratedCircuit(1), + new GT_FluidStack(aBasicMaterial, 144), + new GT_FluidStack(aPolymer, 144), + Materials.Empty.getCells(1), + 160); + addChemicalRecipe( + Materials.Oxygen.getCells(1), + GT_Utility.getIntegratedCircuit(1), + new GT_FluidStack(aBasicMaterial, 144), + new GT_FluidStack(aPolymer, 216), + Materials.Empty.getCells(1), + 160); + addChemicalRecipe( + aBasicMaterialCell, + GT_Utility.getIntegratedCircuit(1), + Materials.Air.getGas(14000), + new GT_FluidStack(aPolymer, 1000), + Materials.Empty.getCells(1), + 1120); + addChemicalRecipe( + aBasicMaterialCell, + GT_Utility.getIntegratedCircuit(1), + Materials.Oxygen.getGas(7000), + new GT_FluidStack(aPolymer, 1500), + Materials.Empty.getCells(1), + 1120); + addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(2)}, + new FluidStack[] { + new GT_FluidStack(aBasicMaterial, 2160), + Materials.Air.getGas(7500), + Materials.Titaniumtetrachloride.getFluid(100) + }, + new FluidStack[] {new GT_FluidStack(aPolymer, 3240)}, + null, + 800, + 30); + addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(2)}, + new FluidStack[] { + new GT_FluidStack(aBasicMaterial, 2160), + Materials.Oxygen.getGas(7500), + Materials.Titaniumtetrachloride.getFluid(100) + }, + new FluidStack[] {new GT_FluidStack(aPolymer, 4320)}, + null, + 800, + 30); + } + + @Override + public boolean addBlastRecipe( + ItemStack aInput1, + ItemStack aInput2, + ItemStack aOutput1, + ItemStack aOutput2, + int aDuration, + int aEUt, + int aLevel) { return addBlastRecipe(aInput1, aInput2, null, null, aOutput1, aOutput2, aDuration, aEUt, aLevel); } @Override - public boolean addBlastRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, int aLevel) { + public boolean addBlastRecipe( + ItemStack aInput1, + ItemStack aInput2, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput1, + ItemStack aOutput2, + int aDuration, + int aEUt, + int aLevel) { if ((aInput1 == null) || (aOutput1 == null)) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("blastfurnace", aInput1, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sBlastRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2}, new ItemStack[]{aOutput1, aOutput2}, null, null, - new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, aLevel); - return true; - } - - public boolean addBlastRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, int aDuration, int aEUt, int aLevel) { + GT_Recipe.GT_Recipe_Map.sBlastRecipes.addRecipe( + true, + new ItemStack[] {aInput1, aInput2}, + new ItemStack[] {aOutput1, aOutput2}, + null, + null, + new FluidStack[] {aFluidInput}, + new FluidStack[] {aFluidOutput}, + aDuration, + aEUt, + aLevel); + return true; + } + + public boolean addBlastRecipe( + ItemStack aInput1, + ItemStack aInput2, + ItemStack aInput3, + ItemStack aInput4, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + ItemStack aOutput4, + int aDuration, + int aEUt, + int aLevel) { if ((aInput1 == null) || (aOutput1 == null)) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("blastfurnace", aInput1, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sBlastRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, aInput3, aInput4}, new ItemStack[]{aOutput1, aOutput2, aOutput3, aOutput4}, null, null, - new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, aLevel); - return true; - } - - @Override - public boolean addPlasmaForgeRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, ItemStack[] OutputItemArray, FluidStack[] FluidOutputArray, int aDuration, int aEUt, int coil_heat_level) { - GT_Recipe.GT_Recipe_Map.sPlasmaForgeRecipes.addRecipe(false, ItemInputArray, OutputItemArray, null, null, - FluidInputArray, FluidOutputArray, aDuration, aEUt, coil_heat_level); - return true; - } - - @Override - public boolean addPrimitiveBlastRecipe(ItemStack aInput1, ItemStack aInput2, int aCoalAmount, ItemStack aOutput1, ItemStack aOutput2, int aDuration) { + GT_Recipe.GT_Recipe_Map.sBlastRecipes.addRecipe( + true, + new ItemStack[] {aInput1, aInput2, aInput3, aInput4}, + new ItemStack[] {aOutput1, aOutput2, aOutput3, aOutput4}, + null, + null, + new FluidStack[] {aFluidInput}, + new FluidStack[] {aFluidOutput}, + aDuration, + aEUt, + aLevel); + return true; + } + + @Override + public boolean addPlasmaForgeRecipe( + ItemStack[] ItemInputArray, + FluidStack[] FluidInputArray, + ItemStack[] OutputItemArray, + FluidStack[] FluidOutputArray, + int aDuration, + int aEUt, + int coil_heat_level) { + GT_Recipe.GT_Recipe_Map.sPlasmaForgeRecipes.addRecipe( + false, + ItemInputArray, + OutputItemArray, + null, + null, + FluidInputArray, + FluidOutputArray, + aDuration, + aEUt, + coil_heat_level); + return true; + } + + @Override + public boolean addPrimitiveBlastRecipe( + ItemStack aInput1, + ItemStack aInput2, + int aCoalAmount, + ItemStack aOutput1, + ItemStack aOutput2, + int aDuration) { if ((aInput1 == null && aInput2 == null) || (aOutput1 == null && aOutput2 == null)) { return false; } @@ -285,37 +667,124 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aDuration = GregTech_API.sRecipeFile.get("primitiveblastfurnace", aInput1, aDuration)) <= 0) { return false; } - Materials[] coals = new Materials[]{Materials.Coal, Materials.Charcoal}; + Materials[] coals = new Materials[] {Materials.Coal, Materials.Charcoal}; for (Materials coal : coals) { - GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, coal.getGems(aCoalAmount)}, new ItemStack[]{aOutput1, aOutput2, Materials.DarkAsh.getDustTiny(aCoalAmount)}, null, null, null, null, aDuration, 0, 0); - GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, coal.getDust(aCoalAmount)}, new ItemStack[]{aOutput1, aOutput2, Materials.DarkAsh.getDustTiny(aCoalAmount)}, null, null, null, null, aDuration, 0, 0); + GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe( + true, + new ItemStack[] {aInput1, aInput2, coal.getGems(aCoalAmount)}, + new ItemStack[] {aOutput1, aOutput2, Materials.DarkAsh.getDustTiny(aCoalAmount)}, + null, + null, + null, + null, + aDuration, + 0, + 0); + GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe( + true, + new ItemStack[] {aInput1, aInput2, coal.getDust(aCoalAmount)}, + new ItemStack[] {aOutput1, aOutput2, Materials.DarkAsh.getDustTiny(aCoalAmount)}, + null, + null, + null, + null, + aDuration, + 0, + 0); } if (Loader.isModLoaded("Railcraft")) { - GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, RailcraftToolItems.getCoalCoke(aCoalAmount / 2)}, new ItemStack[]{aOutput1, aOutput2, Materials.Ash.getDustTiny(aCoalAmount / 2)}, null, null, null, null, aDuration * 2 / 3, 0, 0); + GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe( + true, + new ItemStack[] {aInput1, aInput2, RailcraftToolItems.getCoalCoke(aCoalAmount / 2)}, + new ItemStack[] {aOutput1, aOutput2, Materials.Ash.getDustTiny(aCoalAmount / 2)}, + null, + null, + null, + null, + aDuration * 2 / 3, + 0, + 0); } if (Loader.isModLoaded("miscutils")) { - GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, GT_ModHandler.getModItem("miscutils", "itemCactusCoke", (aCoalAmount * 2))}, new ItemStack[]{aOutput1, aOutput2, Materials.Ash.getDustTiny(aCoalAmount * 2)}, null, null, null, null, aDuration * 2 / 3, 0, 0); - GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, GT_ModHandler.getModItem("miscutils", "itemSugarCoke", (aCoalAmount * 2))}, new ItemStack[]{aOutput1, aOutput2, Materials.Ash.getDustTiny(aCoalAmount * 2)}, null, null, null, null, aDuration * 2 / 3, 0, 0); - } - if ((aInput1 == null || aInput1.stackSize <= 6) && (aInput2 == null || aInput2.stackSize <= 6) && - (aOutput1 == null || aOutput1.stackSize <= 6) && (aOutput2 == null || aOutput2.stackSize <= 6)) { + GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe( + true, + new ItemStack[] { + aInput1, aInput2, GT_ModHandler.getModItem("miscutils", "itemCactusCoke", (aCoalAmount * 2)) + }, + new ItemStack[] {aOutput1, aOutput2, Materials.Ash.getDustTiny(aCoalAmount * 2)}, + null, + null, + null, + null, + aDuration * 2 / 3, + 0, + 0); + GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe( + true, + new ItemStack[] { + aInput1, aInput2, GT_ModHandler.getModItem("miscutils", "itemSugarCoke", (aCoalAmount * 2)) + }, + new ItemStack[] {aOutput1, aOutput2, Materials.Ash.getDustTiny(aCoalAmount * 2)}, + null, + null, + null, + null, + aDuration * 2 / 3, + 0, + 0); + } + if ((aInput1 == null || aInput1.stackSize <= 6) + && (aInput2 == null || aInput2.stackSize <= 6) + && (aOutput1 == null || aOutput1.stackSize <= 6) + && (aOutput2 == null || aOutput2.stackSize <= 6)) { aInput1 = aInput1 == null ? null : GT_Utility.copyAmount(aInput1.stackSize * 10, aInput1); aInput2 = aInput2 == null ? null : GT_Utility.copyAmount(aInput2.stackSize * 10, aInput2); aOutput1 = aOutput1 == null ? null : GT_Utility.copyAmount(aOutput1.stackSize * 10, aOutput1); aOutput2 = aOutput2 == null ? null : GT_Utility.copyAmount(aOutput2.stackSize * 10, aOutput2); for (Materials coal : coals) { - GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, coal.getBlocks(aCoalAmount)}, new ItemStack[]{aOutput1, aOutput2, Materials.DarkAsh.getDust(aCoalAmount)}, null, null, null, null, aDuration * 10, 0, 0); - GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, coal.getBlocks(aCoalAmount)}, new ItemStack[]{aOutput1, aOutput2, Materials.DarkAsh.getDust(aCoalAmount)}, null, null, null, null, aDuration * 10, 0, 0); + GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe( + true, + new ItemStack[] {aInput1, aInput2, coal.getBlocks(aCoalAmount)}, + new ItemStack[] {aOutput1, aOutput2, Materials.DarkAsh.getDust(aCoalAmount)}, + null, + null, + null, + null, + aDuration * 10, + 0, + 0); + GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe( + true, + new ItemStack[] {aInput1, aInput2, coal.getBlocks(aCoalAmount)}, + new ItemStack[] {aOutput1, aOutput2, Materials.DarkAsh.getDust(aCoalAmount)}, + null, + null, + null, + null, + aDuration * 10, + 0, + 0); } if (Loader.isModLoaded("Railcraft")) { - GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, EnumCube.COKE_BLOCK.getItem(aCoalAmount / 2)}, new ItemStack[]{aOutput1, aOutput2, Materials.Ash.getDust(aCoalAmount / 2)}, null, null, null, null, aDuration * 20 / 3, 0, 0); + GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe( + true, + new ItemStack[] {aInput1, aInput2, EnumCube.COKE_BLOCK.getItem(aCoalAmount / 2)}, + new ItemStack[] {aOutput1, aOutput2, Materials.Ash.getDust(aCoalAmount / 2)}, + null, + null, + null, + null, + aDuration * 20 / 3, + 0, + 0); } } return true; } @Override - public boolean addCannerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt) { + public boolean addCannerRecipe( + ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt) { if ((aInput1 == null) || (aOutput1 == null)) { return false; } @@ -327,19 +796,25 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt) { + public boolean addAlloySmelterRecipe( + ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt) { return addAlloySmelterRecipe(aInput1, aInput2, aOutput1, aDuration, aEUt, false); } @Override - public boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt, boolean hidden) { + public boolean addAlloySmelterRecipe( + ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt, boolean hidden) { if ((aInput1 == null) || (aOutput1 == null || Materials.Graphite.contains(aInput1))) { return false; } - if ((aInput2 == null) && ((OrePrefixes.ingot.contains(aInput1)) || (OrePrefixes.dust.contains(aInput1)) || (OrePrefixes.gem.contains(aInput1)))) { + if ((aInput2 == null) + && ((OrePrefixes.ingot.contains(aInput1)) + || (OrePrefixes.dust.contains(aInput1)) + || (OrePrefixes.gem.contains(aInput1)))) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("alloysmelting", aInput2 == null ? aInput1 : aOutput1, aDuration)) <= 0) { + if ((aDuration = GregTech_API.sRecipeFile.get("alloysmelting", aInput2 == null ? aInput1 : aOutput1, aDuration)) + <= 0) { return false; } GT_Recipe tRecipe = new GT_Recipe(aInput1, aInput2, aEUt, aDuration, aOutput1); @@ -374,28 +849,48 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addCutterRecipe(ItemStack aInput, FluidStack aLubricant, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt) { + public boolean addCutterRecipe( + ItemStack aInput, FluidStack aLubricant, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt) { if ((aInput == null) || (aLubricant == null) || (aOutput1 == null)) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("cutting", aInput, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sCutterRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput1, aOutput2}, null, new FluidStack[]{aLubricant}, null, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sCutterRecipes.addRecipe( + true, + new ItemStack[] {aInput}, + new ItemStack[] {aOutput1, aOutput2}, + null, + new FluidStack[] {aLubricant}, + null, + aDuration, + aEUt, + 0); return true; } @Override - public boolean addCutterRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, boolean aCleanroom) { + public boolean addCutterRecipe( + ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, boolean aCleanroom) { return addCutterRecipe(aInput, null, aOutput1, aOutput2, aDuration, aEUt, aCleanroom); } - public boolean addCutterRecipe(ItemStack aInput, int aCircuit, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt) { + public boolean addCutterRecipe( + ItemStack aInput, int aCircuit, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt) { return addCutterRecipe(aInput, aCircuit, aOutput1, aOutput2, aDuration, aEUt, false); } - public boolean addCutterRecipe(ItemStack aInput, int aCircuit, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, boolean aCleanroom) { - return addCutterRecipe(aInput, GT_Utility.getIntegratedCircuit(aCircuit), aOutput1, aOutput2, aDuration, aEUt, aCleanroom); + public boolean addCutterRecipe( + ItemStack aInput, + int aCircuit, + ItemStack aOutput1, + ItemStack aOutput2, + int aDuration, + int aEUt, + boolean aCleanroom) { + return addCutterRecipe( + aInput, GT_Utility.getIntegratedCircuit(aCircuit), aOutput1, aOutput2, aDuration, aEUt, aCleanroom); } @Override @@ -404,16 +899,30 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addCutterRecipe(ItemStack aInput, ItemStack aCircuit, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt) { + public boolean addCutterRecipe( + ItemStack aInput, ItemStack aCircuit, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt) { return addCutterRecipe(aInput, aCircuit, aOutput1, aOutput2, aDuration, aEUt, false); } @Override - public boolean addCutterRecipe(ItemStack aInput, ItemStack aCircuit, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, boolean aCleanroom) { - return addCutterRecipe(new ItemStack[]{aInput, aCircuit}, new ItemStack[]{aOutput1, aOutput2}, aDuration, aEUt, aCleanroom ? -200 : 0); + public boolean addCutterRecipe( + ItemStack aInput, + ItemStack aCircuit, + ItemStack aOutput1, + ItemStack aOutput2, + int aDuration, + int aEUt, + boolean aCleanroom) { + return addCutterRecipe( + new ItemStack[] {aInput, aCircuit}, + new ItemStack[] {aOutput1, aOutput2}, + aDuration, + aEUt, + aCleanroom ? -200 : 0); } - public boolean addCutterRecipe(ItemStack[] aInputs, ItemStack[] aOutputs, int aDuration, int aEUt, boolean aCleanroom) { + public boolean addCutterRecipe( + ItemStack[] aInputs, ItemStack[] aOutputs, int aDuration, int aEUt, boolean aCleanroom) { return addCutterRecipe(aInputs, aOutputs, aDuration, aEUt, aCleanroom ? -200 : 0); } @@ -428,24 +937,65 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if (!GT_Mod.gregtechproxy.mEnableCleanroom && aSpecial == -200) { aSpecial = 0; } - GT_Recipe.GT_Recipe_Map.sCutterRecipes.addRecipe(true, aInputs, aOutputs, null, new FluidStack[]{Materials.Water.getFluid(Math.max(4, Math.min(1000, aDuration * aEUt / 320)))}, null, aDuration * 2, aEUt, aSpecial); - GT_Recipe.GT_Recipe_Map.sCutterRecipes.addRecipe(true, aInputs, aOutputs, null, new FluidStack[]{GT_ModHandler.getDistilledWater(Math.max(3, Math.min(750, aDuration * aEUt / 426)))}, null, aDuration * 2, aEUt, aSpecial); - GT_Recipe.GT_Recipe_Map.sCutterRecipes.addRecipe(true, aInputs, aOutputs, null, new FluidStack[]{Materials.Lubricant.getFluid(Math.max(1, Math.min(250, aDuration * aEUt / 1280)))}, null, aDuration, aEUt, aSpecial); - return true; - } - - - @Override - public boolean addAssemblerRecipe(ItemStack aInput1, Object aOreDict, int aAmount, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt) { + GT_Recipe.GT_Recipe_Map.sCutterRecipes.addRecipe( + true, + aInputs, + aOutputs, + null, + new FluidStack[] {Materials.Water.getFluid(Math.max(4, Math.min(1000, aDuration * aEUt / 320)))}, + null, + aDuration * 2, + aEUt, + aSpecial); + GT_Recipe.GT_Recipe_Map.sCutterRecipes.addRecipe( + true, + aInputs, + aOutputs, + null, + new FluidStack[] {GT_ModHandler.getDistilledWater(Math.max(3, Math.min(750, aDuration * aEUt / 426)))}, + null, + aDuration * 2, + aEUt, + aSpecial); + GT_Recipe.GT_Recipe_Map.sCutterRecipes.addRecipe( + true, + aInputs, + aOutputs, + null, + new FluidStack[] {Materials.Lubricant.getFluid(Math.max(1, Math.min(250, aDuration * aEUt / 1280)))}, + null, + aDuration, + aEUt, + aSpecial); + return true; + } + + @Override + public boolean addAssemblerRecipe( + ItemStack aInput1, + Object aOreDict, + int aAmount, + FluidStack aFluidInput, + ItemStack aOutput1, + int aDuration, + int aEUt) { for (ItemStack tStack : GT_OreDictUnificator.getOresImmutable(aOreDict)) { if (GT_Utility.isStackValid(tStack)) - addAssemblerRecipe(aInput1, GT_Utility.copyAmount(aAmount, tStack), aFluidInput, aOutput1, aDuration, aEUt); + addAssemblerRecipe( + aInput1, GT_Utility.copyAmount(aAmount, tStack), aFluidInput, aOutput1, aDuration, aEUt); } return true; } @Override - public boolean addAssemblerRecipe(ItemStack[] aInputs, Object aOreDict, int aAmount, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt) { + public boolean addAssemblerRecipe( + ItemStack[] aInputs, + Object aOreDict, + int aAmount, + FluidStack aFluidInput, + ItemStack aOutput1, + int aDuration, + int aEUt) { for (ItemStack tStack : GT_OreDictUnificator.getOresImmutable(aOreDict)) { if (GT_Utility.isStackValid(tStack)) { ItemStack[] extendedInputs = new ItemStack[aInputs.length + 1]; @@ -458,31 +1008,49 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt) { - return addAssemblerRecipe(new ItemStack[]{aInput1, aInput2 == null ? aInput1 : aInput2}, null, aOutput1, aDuration, aEUt, false); + public boolean addAssemblerRecipe( + ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt) { + return addAssemblerRecipe( + new ItemStack[] {aInput1, aInput2 == null ? aInput1 : aInput2}, null, aOutput1, aDuration, aEUt, false); } @Override - public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt) { - return addAssemblerRecipe(new ItemStack[]{aInput1, aInput2}, aFluidInput, aOutput1, aDuration, aEUt); + public boolean addAssemblerRecipe( + ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt) { + return addAssemblerRecipe(new ItemStack[] {aInput1, aInput2}, aFluidInput, aOutput1, aDuration, aEUt); } @Override - public boolean addAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt) { + public boolean addAssemblerRecipe( + ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt) { return addAssemblerRecipe(aInputs, aFluidInput, aOutput1, aDuration, aEUt, false); } @Override - public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt, boolean aCleanroom) { + public boolean addAssemblerRecipe( + ItemStack aInput1, + ItemStack aInput2, + FluidStack aFluidInput, + ItemStack aOutput1, + int aDuration, + int aEUt, + boolean aCleanroom) { if (aInput2 == null) - return addAssemblerRecipe(new ItemStack[]{aInput1}, aFluidInput, aOutput1, aDuration, aEUt, aCleanroom); - return addAssemblerRecipe(new ItemStack[]{aInput1, aInput2}, aFluidInput, aOutput1, aDuration, aEUt, aCleanroom); + return addAssemblerRecipe(new ItemStack[] {aInput1}, aFluidInput, aOutput1, aDuration, aEUt, aCleanroom); + return addAssemblerRecipe( + new ItemStack[] {aInput1, aInput2}, aFluidInput, aOutput1, aDuration, aEUt, aCleanroom); } @Override - public boolean addAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt, boolean aCleanroom) { + public boolean addAssemblerRecipe( + ItemStack[] aInputs, + FluidStack aFluidInput, + ItemStack aOutput1, + int aDuration, + int aEUt, + boolean aCleanroom) { - if (areItemsAndFluidsBothNull(aInputs, new FluidStack[]{aFluidInput})) { + if (areItemsAndFluidsBothNull(aInputs, new FluidStack[] {aFluidInput})) { return false; } @@ -513,15 +1081,30 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } if (!ret) { - GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.addRecipe(true, aInputs, new ItemStack[]{aOutput1}, null, new FluidStack[]{aFluidInput}, null, aDuration, aEUt, aCleanroom ? -200 : 0); + GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.addRecipe( + true, + aInputs, + new ItemStack[] {aOutput1}, + null, + new FluidStack[] {aFluidInput}, + null, + aDuration, + aEUt, + aCleanroom ? -200 : 0); ret = true; } return ret; } - public boolean addAssemblerRecipeNonOD(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt, boolean aCleanroom) { - if (areItemsAndFluidsBothNull(aInputs, new FluidStack[]{aFluidInput})) { + public boolean addAssemblerRecipeNonOD( + ItemStack[] aInputs, + FluidStack aFluidInput, + ItemStack aOutput1, + int aDuration, + int aEUt, + boolean aCleanroom) { + if (areItemsAndFluidsBothNull(aInputs, new FluidStack[] {aFluidInput})) { return false; } @@ -537,11 +1120,19 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } - GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.addRecipe(true, aInputs, new ItemStack[]{aOutput1}, null, new FluidStack[]{aFluidInput}, null, aDuration, aEUt, aCleanroom ? -200 : 0); + GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.addRecipe( + true, + aInputs, + new ItemStack[] {aOutput1}, + null, + new FluidStack[] {aFluidInput}, + null, + aDuration, + aEUt, + aCleanroom ? -200 : 0); return true; } - @Override public boolean addWiremillRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt) { if ((aInput == null) || (aOutput == null)) { @@ -550,7 +1141,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aDuration = GregTech_API.sRecipeFile.get("wiremill", aInput, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sWiremillRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput}, null, null, null, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sWiremillRecipes.addRecipe( + true, new ItemStack[] {aInput}, new ItemStack[] {aOutput}, null, null, null, aDuration, aEUt, 0); return true; } @@ -562,7 +1154,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aDuration = GregTech_API.sRecipeFile.get("polarizer", aInput, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sPolarizerRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput}, null, null, null, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sPolarizerRecipes.addRecipe( + true, new ItemStack[] {aInput}, new ItemStack[] {aOutput}, null, null, null, aDuration, aEUt, 0); return true; } @@ -586,7 +1179,16 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aDuration = GregTech_API.sRecipeFile.get("bender", aInput1, aDuration)) <= 0) { return false; } - GT_Recipe tRecipe = new GT_Recipe(new ItemStack[]{aInput1, aCircuit}, new ItemStack[]{aOutput1}, null, null, null, null, aDuration, Math.max(aEUt, 1), 0); + GT_Recipe tRecipe = new GT_Recipe( + new ItemStack[] {aInput1, aCircuit}, + new ItemStack[] {aOutput1}, + null, + null, + null, + null, + aDuration, + Math.max(aEUt, 1), + 0); GT_Recipe.GT_Recipe_Map.sBenderRecipes.addRecipe(tRecipe); return true; } @@ -599,7 +1201,16 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aDuration = GregTech_API.sRecipeFile.get("extruder", aOutput, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sExtruderRecipes.addRecipe(true, new ItemStack[]{aInput, aShape}, new ItemStack[]{aOutput}, null, null, null, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sExtruderRecipes.addRecipe( + true, + new ItemStack[] {aInput, aShape}, + new ItemStack[] {aOutput}, + null, + null, + null, + aDuration, + aEUt, + 0); return true; } @@ -611,36 +1222,81 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aDuration = GregTech_API.sRecipeFile.get("slicer", aOutput, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sSlicerRecipes.addRecipe(true, new ItemStack[]{aInput, aShape}, new ItemStack[]{aOutput}, null, null, null, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sSlicerRecipes.addRecipe( + true, + new ItemStack[] {aInput, aShape}, + new ItemStack[] {aOutput}, + null, + null, + null, + aDuration, + aEUt, + 0); return true; } @Override - public boolean addOreWasherRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, FluidStack aFluidInput, int aDuration, int aEUt) { - if ((aInput == null) || (aFluidInput == null) || ((aOutput1 == null) || (aOutput2 == null) || (aOutput3 == null))) { + public boolean addOreWasherRecipe( + ItemStack aInput, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + FluidStack aFluidInput, + int aDuration, + int aEUt) { + if ((aInput == null) + || (aFluidInput == null) + || ((aOutput1 == null) || (aOutput2 == null) || (aOutput3 == null))) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("orewasher", aInput, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sOreWasherRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput1, aOutput2, aOutput3}, null, new FluidStack[]{aFluidInput}, null, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sOreWasherRecipes.addRecipe( + true, + new ItemStack[] {aInput}, + new ItemStack[] {aOutput1, aOutput2, aOutput3}, + null, + new FluidStack[] {aFluidInput}, + null, + aDuration, + aEUt, + 0); return true; } @Override - public boolean addOreWasherRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, FluidStack aFluidInput, int[] aChances, int aDuration, int aEUt) { - if ((aInput == null) || (aFluidInput == null) || ((aOutput1 == null) || (aOutput2 == null) || (aOutput3 == null))) { + public boolean addOreWasherRecipe( + ItemStack aInput, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + FluidStack aFluidInput, + int[] aChances, + int aDuration, + int aEUt) { + if ((aInput == null) + || (aFluidInput == null) + || ((aOutput1 == null) || (aOutput2 == null) || (aOutput3 == null))) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("orewasher", aInput, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sOreWasherRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput1, aOutput2, aOutput3}, null, aChances, new FluidStack[]{aFluidInput}, null, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sOreWasherRecipes.addRecipe( + true, + new ItemStack[] {aInput}, + new ItemStack[] {aOutput1, aOutput2, aOutput3}, + null, + aChances, + new FluidStack[] {aFluidInput}, + null, + aDuration, + aEUt, + 0); return true; } - - @Override public boolean addImplosionRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2) { if ((aInput1 == null) || (aOutput1 == null)) { @@ -650,65 +1306,144 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } int tExplosives = aInput2 > 0 ? aInput2 < 64 ? aInput2 : 64 : 1; - int tGunpowder = tExplosives<<1;//Worst - int tDynamite = Math.max(1, tExplosives>>1);//good - int tTNT = tExplosives;//Slightly better - int tITNT = Math.max(1, tExplosives>>2);//the best - //new GT_Recipe(aInput1, aInput2, aOutput1, aOutput2); - if(tGunpowder<65){ - GT_Recipe.GT_Recipe_Map.sImplosionRecipes.addRecipe(true, new ItemStack[]{aInput1, ItemList.Block_Powderbarrel.get(tGunpowder, new Object[0])}, new ItemStack[]{aOutput1, aOutput2}, null, null, null, null, 20, 30, 0); - } - if(tDynamite<17){ - GT_Recipe.GT_Recipe_Map.sImplosionRecipes.addRecipe(true, new ItemStack[]{aInput1, GT_ModHandler.getIC2Item("dynamite", tDynamite, null)}, new ItemStack[]{aOutput1, aOutput2}, null, null, null, null, 20, 30, 0); - } - GT_Recipe.GT_Recipe_Map.sImplosionRecipes.addRecipe(true, new ItemStack[]{aInput1, new ItemStack(Blocks.tnt,tTNT)}, new ItemStack[]{aOutput1, aOutput2}, null, null, null, null, 20, 30, 0); - GT_Recipe.GT_Recipe_Map.sImplosionRecipes.addRecipe(true, new ItemStack[]{aInput1, GT_ModHandler.getIC2Item("industrialTnt", tITNT, null)}, new ItemStack[]{aOutput1, aOutput2}, null, null, null, null, 20, 30, 0); + int tGunpowder = tExplosives << 1; // Worst + int tDynamite = Math.max(1, tExplosives >> 1); // good + int tTNT = tExplosives; // Slightly better + int tITNT = Math.max(1, tExplosives >> 2); // the best + // new GT_Recipe(aInput1, aInput2, aOutput1, aOutput2); + if (tGunpowder < 65) { + GT_Recipe.GT_Recipe_Map.sImplosionRecipes.addRecipe( + true, + new ItemStack[] {aInput1, ItemList.Block_Powderbarrel.get(tGunpowder, new Object[0])}, + new ItemStack[] {aOutput1, aOutput2}, + null, + null, + null, + null, + 20, + 30, + 0); + } + if (tDynamite < 17) { + GT_Recipe.GT_Recipe_Map.sImplosionRecipes.addRecipe( + true, + new ItemStack[] {aInput1, GT_ModHandler.getIC2Item("dynamite", tDynamite, null)}, + new ItemStack[] {aOutput1, aOutput2}, + null, + null, + null, + null, + 20, + 30, + 0); + } + GT_Recipe.GT_Recipe_Map.sImplosionRecipes.addRecipe( + true, + new ItemStack[] {aInput1, new ItemStack(Blocks.tnt, tTNT)}, + new ItemStack[] {aOutput1, aOutput2}, + null, + null, + null, + null, + 20, + 30, + 0); + GT_Recipe.GT_Recipe_Map.sImplosionRecipes.addRecipe( + true, + new ItemStack[] {aInput1, GT_ModHandler.getIC2Item("industrialTnt", tITNT, null)}, + new ItemStack[] {aOutput1, aOutput2}, + null, + null, + null, + null, + 20, + 30, + 0); return true; } @Override @Deprecated - public boolean addDistillationRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, int aDuration, int aEUt) { + public boolean addDistillationRecipe( + ItemStack aInput1, + int aInput2, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + ItemStack aOutput4, + int aDuration, + int aEUt) { return false; } @Override - public boolean addUniversalDistillationRecipe(FluidStack aInput, FluidStack[] aOutputs, ItemStack aOutput2, int aDuration, int aEUt) { + public boolean addUniversalDistillationRecipe( + FluidStack aInput, FluidStack[] aOutputs, ItemStack aOutput2, int aDuration, int aEUt) { for (int i = 0; i < Math.min(aOutputs.length, 11); i++) { addDistilleryRecipe(i + 1, aInput, aOutputs[i], aOutput2, aDuration * 2, aEUt / 4, false); - } return addDistillationTowerRecipe(aInput, aOutputs, aOutput2, aDuration, aEUt); } @Override - public boolean addDistillationTowerRecipe(FluidStack aInput, FluidStack[] aOutputs, ItemStack aOutput2, int aDuration, int aEUt) { + public boolean addDistillationTowerRecipe( + FluidStack aInput, FluidStack[] aOutputs, ItemStack aOutput2, int aDuration, int aEUt) { if (aInput == null || aOutputs == null || aOutputs.length < 1 || aOutputs.length > 11) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("distillation", aInput.getUnlocalizedName(), aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sDistillationRecipes.addRecipe(false, null, new ItemStack[]{aOutput2}, null, new FluidStack[]{aInput}, aOutputs, Math.max(1, aDuration), Math.max(1, aEUt), 0); + GT_Recipe.GT_Recipe_Map.sDistillationRecipes.addRecipe( + false, + null, + new ItemStack[] {aOutput2}, + null, + new FluidStack[] {aInput}, + aOutputs, + Math.max(1, aDuration), + Math.max(1, aEUt), + 0); return false; } @Override - public boolean addDistillationTowerRecipe(FluidStack aInput, ItemStack[] aCircuit, FluidStack[] aOutputs, ItemStack aOutput2, int aDuration, int aEUt) { + public boolean addDistillationTowerRecipe( + FluidStack aInput, + ItemStack[] aCircuit, + FluidStack[] aOutputs, + ItemStack aOutput2, + int aDuration, + int aEUt) { if (aInput == null || aOutputs == null || aOutputs.length < 1 || aOutputs.length > 11) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("distillation", aInput.getUnlocalizedName(), aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sDistillationRecipes.addRecipe(false, aCircuit, new ItemStack[]{aOutput2}, null, new FluidStack[]{aInput}, aOutputs, Math.max(1, aDuration), Math.max(1, aEUt), 0); + GT_Recipe.GT_Recipe_Map.sDistillationRecipes.addRecipe( + false, + aCircuit, + new ItemStack[] {aOutput2}, + null, + new FluidStack[] {aInput}, + aOutputs, + Math.max(1, aDuration), + Math.max(1, aEUt), + 0); return false; } @Override - public boolean addUniversalDistillationRecipewithCircuit(FluidStack aInput, ItemStack[] aCircuit, FluidStack[] aOutputs, ItemStack aOutput2, int aDuration, int aEUt) { + public boolean addUniversalDistillationRecipewithCircuit( + FluidStack aInput, + ItemStack[] aCircuit, + FluidStack[] aOutputs, + ItemStack aOutput2, + int aDuration, + int aEUt) { for (int i = 0; i < Math.min(aOutputs.length, 11); i++) { addDistilleryRecipe(i + 1, aInput, aOutputs[i], aOutput2, aDuration * 2, aEUt / 4, false); } @@ -723,7 +1458,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aDuration = GregTech_API.sRecipeFile.get("vacuumfreezer", aInput1, aDuration)) <= 0) { return false; } - new GT_Recipe(aInput1, aOutput1, aDuration, aEUt, 0);//Since all other methods are taken + new GT_Recipe(aInput1, aOutput1, aDuration, aEUt, 0); // Since all other methods are taken FluidStack tInputFluid = GT_Utility.getFluidForFilledItem(aInput1, true); FluidStack tOutputFluid = GT_Utility.getFluidForFilledItem(aOutput1, true); if (tInputFluid != null && tOutputFluid != null) { @@ -755,20 +1490,40 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } - new GT_Recipe(aInput1, aOutput1, aDuration, aEUt); + new GT_Recipe(aInput1, aOutput1, aDuration, aEUt); return true; } @Override - public boolean addVacuumFreezerRecipe(ItemStack[] aItemInput, FluidStack[] aFluidInput, ItemStack[] aItemOutput, FluidStack[] aFluidOutput, int aDuration, int aEUt) { - GT_Recipe.GT_Recipe_Map.sVacuumRecipes.addRecipe(false, aItemInput, aItemOutput, null, aFluidInput, aFluidOutput, Math.max(1, aDuration), Math.max(1, aEUt), 0); + public boolean addVacuumFreezerRecipe( + ItemStack[] aItemInput, + FluidStack[] aFluidInput, + ItemStack[] aItemOutput, + FluidStack[] aFluidOutput, + int aDuration, + int aEUt) { + GT_Recipe.GT_Recipe_Map.sVacuumRecipes.addRecipe( + false, + aItemInput, + aItemOutput, + null, + aFluidInput, + aFluidOutput, + Math.max(1, aDuration), + Math.max(1, aEUt), + 0); return true; } - @Override @Deprecated - public boolean addGrinderRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4) { + public boolean addGrinderRecipe( + ItemStack aInput1, + ItemStack aInput2, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + ItemStack aOutput4) { return false; } @@ -797,7 +1552,16 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addChemicalBathRecipe(ItemStack aInput, FluidStack aBathingFluid, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt) { + public boolean addChemicalBathRecipe( + ItemStack aInput, + FluidStack aBathingFluid, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + FluidStack aFluidOutput, + int[] aChances, + int aDuration, + int aEUt) { return false; } @@ -809,55 +1573,103 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if (!GregTech_API.sRecipeFile.get("forgehammer", aOutput1, true)) { return false; } - GT_Recipe.GT_Recipe_Map.sHammerRecipes.addRecipe(true, new ItemStack[]{aInput1}, new ItemStack[]{aOutput1}, null, null, null, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sHammerRecipes.addRecipe( + true, new ItemStack[] {aInput1}, new ItemStack[] {aOutput1}, null, null, null, aDuration, aEUt, 0); return true; } @Override - public boolean addBoxingRecipe(ItemStack aContainedItem, ItemStack aEmptyBox, ItemStack aFullBox, int aDuration, int aEUt) { + public boolean addBoxingRecipe( + ItemStack aContainedItem, ItemStack aEmptyBox, ItemStack aFullBox, int aDuration, int aEUt) { if ((aContainedItem == null) || (aFullBox == null)) { return false; } if (!GregTech_API.sRecipeFile.get("boxing", aFullBox, true)) { return false; } - GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.addRecipe(true, new ItemStack[]{aContainedItem, aEmptyBox}, new ItemStack[]{aFullBox}, null, null, null, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.addRecipe( + true, + new ItemStack[] {aContainedItem, aEmptyBox}, + new ItemStack[] {aFullBox}, + null, + null, + null, + aDuration, + aEUt, + 0); return true; } @Override - public boolean addUnboxingRecipe(ItemStack aFullBox, ItemStack aContainedItem, ItemStack aEmptyBox, int aDuration, int aEUt) { + public boolean addUnboxingRecipe( + ItemStack aFullBox, ItemStack aContainedItem, ItemStack aEmptyBox, int aDuration, int aEUt) { if ((aFullBox == null) || (aContainedItem == null)) { return false; } if (!GregTech_API.sRecipeFile.get("unboxing", aFullBox, true)) { return false; } - GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes.addRecipe(true, new ItemStack[]{aFullBox}, new ItemStack[]{aContainedItem, aEmptyBox}, null, null, null, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes.addRecipe( + true, + new ItemStack[] {aFullBox}, + new ItemStack[] {aContainedItem, aEmptyBox}, + null, + null, + null, + aDuration, + aEUt, + 0); return true; } @Override - public boolean addThermalCentrifugeRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int aDuration, int aEUt) { + public boolean addThermalCentrifugeRecipe( + ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int aDuration, int aEUt) { if ((aInput == null) || (aOutput1 == null)) { return false; } if (!GregTech_API.sRecipeFile.get("thermalcentrifuge", aInput, true)) { return false; } - GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput1, aOutput2, aOutput3}, null, null, null, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes.addRecipe( + true, + new ItemStack[] {aInput}, + new ItemStack[] {aOutput1, aOutput2, aOutput3}, + null, + null, + null, + aDuration, + aEUt, + 0); return true; } @Override - public boolean addThermalCentrifugeRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt) { + public boolean addThermalCentrifugeRecipe( + ItemStack aInput, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + int[] aChances, + int aDuration, + int aEUt) { if ((aInput == null) || (aOutput1 == null)) { return false; } if (!GregTech_API.sRecipeFile.get("thermalcentrifuge", aInput, true)) { return false; } - GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput1, aOutput2, aOutput3}, null, aChances, null, null, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes.addRecipe( + true, + new ItemStack[] {aInput}, + new ItemStack[] {aOutput1, aOutput2, aOutput3}, + null, + aChances, + null, + null, + aDuration, + aEUt, + 0); return true; } @@ -869,19 +1681,38 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aDuration = GregTech_API.sRecipeFile.get("amplifier", aAmplifierItem, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sAmplifiers.addRecipe(true, new ItemStack[]{aAmplifierItem}, null, null, null, new FluidStack[]{Materials.UUAmplifier.getFluid(aAmplifierAmountOutputted)}, aDuration, 30, 0); + GT_Recipe.GT_Recipe_Map.sAmplifiers.addRecipe( + true, + new ItemStack[] {aAmplifierItem}, + null, + null, + null, + new FluidStack[] {Materials.UUAmplifier.getFluid(aAmplifierAmountOutputted)}, + aDuration, + 30, + 0); return true; } @Override - public boolean addBrewingRecipe(ItemStack aIngredient, Fluid aInput, Fluid aOutput, int aDuration, int aEUt, boolean aHidden) { + public boolean addBrewingRecipe( + ItemStack aIngredient, Fluid aInput, Fluid aOutput, int aDuration, int aEUt, boolean aHidden) { if ((aIngredient == null) || (aInput == null) || (aOutput == null)) { return false; } if (!GregTech_API.sRecipeFile.get("brewing", aOutput.getUnlocalizedName(), true)) { return false; } - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBrewingRecipes.addRecipe(false, new ItemStack[]{aIngredient}, null, null, new FluidStack[]{new FluidStack(aInput, 750)}, new FluidStack[]{new FluidStack(aOutput, 750)}, aDuration, aEUt, 0); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBrewingRecipes.addRecipe( + false, + new ItemStack[] {aIngredient}, + null, + null, + new FluidStack[] {new FluidStack(aInput, 750)}, + new FluidStack[] {new FluidStack(aOutput, 750)}, + aDuration, + aEUt, + 0); if ((aHidden) && (tRecipe != null)) { tRecipe.mHidden = true; } @@ -894,14 +1725,24 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addBrewingRecipeCustom(ItemStack aIngredient, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden) { + public boolean addBrewingRecipeCustom( + ItemStack aIngredient, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden) { if ((aInput == null) || (aOutput == null)) { return false; } if (!GregTech_API.sRecipeFile.get("brewing", aOutput.getUnlocalizedName(), true)) { return false; } - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBrewingRecipes.addRecipe(false, new ItemStack[]{aIngredient}, null, null, new FluidStack[]{aInput}, new FluidStack[]{aOutput}, aDuration, aEUt, 0); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBrewingRecipes.addRecipe( + false, + new ItemStack[] {aIngredient}, + null, + null, + new FluidStack[] {aInput}, + new FluidStack[] {aOutput}, + aDuration, + aEUt, + 0); if ((aHidden) && (tRecipe != null)) { tRecipe.mHidden = true; } @@ -909,14 +1750,18 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addFermentingRecipe(FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden) { + public boolean addFermentingRecipe( + FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden) { if ((aInput == null) || (aOutput == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("fermenting", aOutput.getFluid().getUnlocalizedName(), aDuration)) <= 0) { + if ((aDuration = GregTech_API.sRecipeFile.get( + "fermenting", aOutput.getFluid().getUnlocalizedName(), aDuration)) + <= 0) { return false; } - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sFermentingRecipes.addRecipe(false, null, null, null, new FluidStack[]{aInput}, new FluidStack[]{aOutput}, aDuration, aEUt, 0); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sFermentingRecipes.addRecipe( + false, null, null, null, new FluidStack[] {aInput}, new FluidStack[] {aOutput}, aDuration, aEUt, 0); if ((aHidden) && (tRecipe != null)) { tRecipe.mHidden = true; } @@ -929,18 +1774,27 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addDistilleryRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, ItemStack aSolidOutput, int aDuration, int aEUt, boolean aHidden) { + public boolean addDistilleryRecipe( + ItemStack aCircuit, + FluidStack aInput, + FluidStack aOutput, + ItemStack aSolidOutput, + int aDuration, + int aEUt, + boolean aHidden) { if ((aInput == null) || (aOutput == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("distillery", aOutput.getFluid().getUnlocalizedName(), aDuration)) <= 0) { + if ((aDuration = GregTech_API.sRecipeFile.get( + "distillery", aOutput.getFluid().getUnlocalizedName(), aDuration)) + <= 0) { return false; } - //reduce the batch size if fluid amount is exceeding + // reduce the batch size if fluid amount is exceeding int tScale = (Math.max(aInput.amount, aOutput.amount) + 999) / 1000; if (tScale <= 0) tScale = 1; - if (tScale > 1){ - //trying to find whether there is a better factor + if (tScale > 1) { + // trying to find whether there is a better factor for (int i = tScale; i <= 5; i++) { if (aInput.amount % i == 0 && aDuration % i == 0) { tScale = i; @@ -957,8 +1811,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { aOutput = new FluidStack(aOutput.getFluid(), aOutput.amount / tScale); if (aSolidOutput != null) { ItemData tData = GT_OreDictUnificator.getItemData(aSolidOutput); - if (tData != null && (tData.mPrefix == OrePrefixes.dust || OrePrefixes.dust.mFamiliarPrefixes.contains(tData.mPrefix))) - aSolidOutput = GT_OreDictUnificator.getDust(tData.mMaterial.mMaterial, tData.mMaterial.mAmount * aSolidOutput.stackSize / tScale); + if (tData != null + && (tData.mPrefix == OrePrefixes.dust + || OrePrefixes.dust.mFamiliarPrefixes.contains(tData.mPrefix))) + aSolidOutput = GT_OreDictUnificator.getDust( + tData.mMaterial.mMaterial, tData.mMaterial.mAmount * aSolidOutput.stackSize / tScale); else { if (aSolidOutput.stackSize / tScale == 0) aSolidOutput = GT_Values.NI; else aSolidOutput = new ItemStack(aSolidOutput.getItem(), aSolidOutput.stackSize / tScale); @@ -967,30 +1824,57 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { aDuration = (aDuration + tScale - 1) / tScale; } - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sDistilleryRecipes.addRecipe(true, new ItemStack[]{aCircuit}, new ItemStack[]{aSolidOutput}, null, new FluidStack[]{aInput}, new FluidStack[]{aOutput}, aDuration, aEUt, 0); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sDistilleryRecipes.addRecipe( + true, + new ItemStack[] {aCircuit}, + new ItemStack[] {aSolidOutput}, + null, + new FluidStack[] {aInput}, + new FluidStack[] {aOutput}, + aDuration, + aEUt, + 0); if ((aHidden) && (tRecipe != null)) { tRecipe.mHidden = true; } return true; - } + @Override - public boolean addDistilleryRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden) { + public boolean addDistilleryRecipe( + ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden) { return addDistilleryRecipe(aCircuit, aInput, aOutput, null, aDuration, aEUt, aHidden); } @Override - public boolean addDistilleryRecipe(int circuitConfig, FluidStack aInput, FluidStack aOutput, ItemStack aSolidOutput, int aDuration, int aEUt, boolean aHidden) { - return addDistilleryRecipe(GT_Utility.getIntegratedCircuit(circuitConfig), aInput, aOutput, aSolidOutput, aDuration, aEUt, aHidden); + public boolean addDistilleryRecipe( + int circuitConfig, + FluidStack aInput, + FluidStack aOutput, + ItemStack aSolidOutput, + int aDuration, + int aEUt, + boolean aHidden) { + return addDistilleryRecipe( + GT_Utility.getIntegratedCircuit(circuitConfig), + aInput, + aOutput, + aSolidOutput, + aDuration, + aEUt, + aHidden); } @Override - public boolean addDistilleryRecipe(int circuitConfig, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden) { - return addDistilleryRecipe(GT_Utility.getIntegratedCircuit(circuitConfig), aInput, aOutput, aDuration, aEUt, aHidden); + public boolean addDistilleryRecipe( + int circuitConfig, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden) { + return addDistilleryRecipe( + GT_Utility.getIntegratedCircuit(circuitConfig), aInput, aOutput, aDuration, aEUt, aHidden); } @Override - public boolean addFluidSolidifierRecipe(ItemStack aMold, FluidStack aInput, ItemStack aOutput, int aDuration, int aEUt) { + public boolean addFluidSolidifierRecipe( + ItemStack aMold, FluidStack aInput, ItemStack aOutput, int aDuration, int aEUt) { if ((aMold == null) || (aInput == null) || (aOutput == null)) { return false; } @@ -1003,17 +1887,34 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aDuration = GregTech_API.sRecipeFile.get("fluidsolidifier", aOutput, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes.addRecipe(true, new ItemStack[]{aMold}, new ItemStack[]{aOutput}, null, new FluidStack[]{aInput}, null, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes.addRecipe( + true, + new ItemStack[] {aMold}, + new ItemStack[] {aOutput}, + null, + new FluidStack[] {aInput}, + null, + aDuration, + aEUt, + 0); return true; } @Override - public boolean addFluidSmelterRecipe(ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, int aDuration, int aEUt) { + public boolean addFluidSmelterRecipe( + ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, int aDuration, int aEUt) { return addFluidSmelterRecipe(aInput, aRemains, aOutput, aChance, aDuration, aEUt, false); } @Override - public boolean addFluidSmelterRecipe(ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, int aDuration, int aEUt, boolean hidden) { + public boolean addFluidSmelterRecipe( + ItemStack aInput, + ItemStack aRemains, + FluidStack aOutput, + int aChance, + int aDuration, + int aEUt, + boolean hidden) { if ((aInput == null) || (aOutput == null)) { return false; } @@ -1026,7 +1927,17 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aDuration = GregTech_API.sRecipeFile.get("fluidsmelter", aInput, aDuration)) <= 0) { return false; } - GT_Recipe tRecipe =GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aRemains}, null, new int[]{aChance}, null, new FluidStack[]{aOutput}, aDuration, aEUt, 0); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes.addRecipe( + true, + new ItemStack[] {aInput}, + new ItemStack[] {aRemains}, + null, + new int[] {aChance}, + null, + new FluidStack[] {aOutput}, + aDuration, + aEUt, + 0); if ((hidden) && (tRecipe != null)) { tRecipe.mHidden = true; } @@ -1034,7 +1945,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addFluidExtractionRecipe(ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, int aDuration, int aEUt) { + public boolean addFluidExtractionRecipe( + ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, int aDuration, int aEUt) { if ((aInput == null) || (aOutput == null)) { return false; } @@ -1047,13 +1959,24 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aDuration = GregTech_API.sRecipeFile.get("fluidextractor", aInput, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aRemains}, null, new int[]{aChance}, null, new FluidStack[]{aOutput}, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes.addRecipe( + true, + new ItemStack[] {aInput}, + new ItemStack[] {aRemains}, + null, + new int[] {aChance}, + null, + new FluidStack[] {aOutput}, + aDuration, + aEUt, + 0); return true; } @Override - public boolean addFluidCannerRecipe(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput) { - int aDuration= aFluidOutput == null ? aFluidInput.amount / 62 : aFluidOutput.amount / 62; + public boolean addFluidCannerRecipe( + ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput) { + int aDuration = aFluidOutput == null ? aFluidInput.amount / 62 : aFluidOutput.amount / 62; if (aInput == null || aOutput == null) { return false; @@ -1064,12 +1987,27 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aDuration = GregTech_API.sRecipeFile.get("fluidcanner", aInput, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput}, null, new FluidStack[]{aFluidInput == null ? null : aFluidInput}, new FluidStack[]{aFluidOutput == null ? null : aFluidOutput}, aDuration, 1, 0); + GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe( + true, + new ItemStack[] {aInput}, + new ItemStack[] {aOutput}, + null, + new FluidStack[] {aFluidInput == null ? null : aFluidInput}, + new FluidStack[] {aFluidOutput == null ? null : aFluidOutput}, + aDuration, + 1, + 0); return true; } @Override - public boolean addFluidCannerRecipe(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput, int aDuration, int aEUt) { + public boolean addFluidCannerRecipe( + ItemStack aInput, + ItemStack aOutput, + FluidStack aFluidInput, + FluidStack aFluidOutput, + int aDuration, + int aEUt) { if (aInput == null || aOutput == null) { return false; } @@ -1079,42 +2017,106 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aDuration = GregTech_API.sRecipeFile.get("fluidcanner", aInput, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput}, null, new FluidStack[]{aFluidInput == null ? null : aFluidInput}, new FluidStack[]{aFluidOutput == null ? null : aFluidOutput}, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe( + true, + new ItemStack[] {aInput}, + new ItemStack[] {aOutput}, + null, + new FluidStack[] {aFluidInput == null ? null : aFluidInput}, + new FluidStack[] {aFluidOutput == null ? null : aFluidOutput}, + aDuration, + aEUt, + 0); return true; } + @Override - public boolean addChemicalBathRecipe(ItemStack aInput, FluidStack aBathingFluid, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt) { + public boolean addChemicalBathRecipe( + ItemStack aInput, + FluidStack aBathingFluid, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + int[] aChances, + int aDuration, + int aEUt) { if ((aInput == null) || (aBathingFluid == null) || (aOutput1 == null)) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("chemicalbath", aInput, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput1, aOutput2, aOutput3}, null, aChances, new FluidStack[]{aBathingFluid}, null, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes.addRecipe( + true, + new ItemStack[] {aInput}, + new ItemStack[] {aOutput1, aOutput2, aOutput3}, + null, + aChances, + new FluidStack[] {aBathingFluid}, + null, + aDuration, + aEUt, + 0); return true; } @Override - public boolean addChemicalBathRecipe(ItemStack aInput, FluidStack aBathingFluid, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt) { + public boolean addChemicalBathRecipe( + ItemStack aInput, + FluidStack aBathingFluid, + FluidStack aFluidOutput, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + int[] aChances, + int aDuration, + int aEUt) { if ((aInput == null) || (aBathingFluid == null) || (aOutput1 == null)) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("chemicalbath", aInput, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput1, aOutput2, aOutput3}, null, aChances, new FluidStack[]{aBathingFluid}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes.addRecipe( + true, + new ItemStack[] {aInput}, + new ItemStack[] {aOutput1, aOutput2, aOutput3}, + null, + aChances, + new FluidStack[] {aBathingFluid}, + new FluidStack[] {aFluidOutput}, + aDuration, + aEUt, + 0); return true; } @Override - public boolean addElectromagneticSeparatorRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt) { + public boolean addElectromagneticSeparatorRecipe( + ItemStack aInput, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + int[] aChances, + int aDuration, + int aEUt) { if ((aInput == null) || (aOutput1 == null)) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("electromagneticseparator", aInput, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sElectroMagneticSeparatorRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput1, aOutput2, aOutput3}, null, aChances, null, null, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sElectroMagneticSeparatorRecipes.addRecipe( + true, + new ItemStack[] {aInput}, + new ItemStack[] {aOutput1, aOutput2, aOutput3}, + null, + aChances, + null, + null, + aDuration, + aEUt, + 0); return true; } @@ -1126,198 +2128,470 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aDuration = GregTech_API.sRecipeFile.get("extractor", aInput, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sExtractorRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput}, null, null, null, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sExtractorRecipes.addRecipe( + true, new ItemStack[] {aInput}, new ItemStack[] {aOutput}, null, null, null, aDuration, aEUt, 0); return true; } @Override - public boolean addPrinterRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aSpecialSlot, ItemStack aOutput, int aDuration, int aEUt) { + public boolean addPrinterRecipe( + ItemStack aInput, FluidStack aFluid, ItemStack aSpecialSlot, ItemStack aOutput, int aDuration, int aEUt) { if ((aInput == null) || (aFluid == null) || (aOutput == null)) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("printer", aInput, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sPrinterRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput}, aSpecialSlot, null, new FluidStack[]{aFluid}, null, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sPrinterRecipes.addRecipe( + true, + new ItemStack[] {aInput}, + new ItemStack[] {aOutput}, + aSpecialSlot, + null, + new FluidStack[] {aFluid}, + null, + aDuration, + aEUt, + 0); return true; } @Override - public boolean addAutoclaveRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom) { - return addAutoclaveRecipe(aInput, aFluid, aOutput,aChance, aDuration, aEUt); + public boolean addAutoclaveRecipe( + ItemStack aInput, + FluidStack aFluid, + ItemStack aOutput, + int aChance, + int aDuration, + int aEUt, + boolean aCleanroom) { + return addAutoclaveRecipe(aInput, aFluid, aOutput, aChance, aDuration, aEUt); } @Override - public boolean addAutoclaveRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt) { + public boolean addAutoclaveRecipe( + ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt) { return addAutoclaveRecipe(aInput, null, aFluid, aOutput, aChance, aDuration, aEUt, false); } - public boolean addAutoclaveRecipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt) { + public boolean addAutoclaveRecipe( + ItemStack aInput, + ItemStack aCircuit, + FluidStack aFluid, + ItemStack aOutput, + int aChance, + int aDuration, + int aEUt) { return addAutoclaveRecipe(aInput, aCircuit, aFluid, aOutput, aChance, aDuration, aEUt, false); } @Override - public boolean addAutoclaveRecipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluidIn, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom) { - return addAutoclaveRecipe(aInput, aCircuit, aFluidIn, null, aOutput, aChance, aDuration, aEUt,aCleanroom); + public boolean addAutoclaveRecipe( + ItemStack aInput, + ItemStack aCircuit, + FluidStack aFluidIn, + ItemStack aOutput, + int aChance, + int aDuration, + int aEUt, + boolean aCleanroom) { + return addAutoclaveRecipe(aInput, aCircuit, aFluidIn, null, aOutput, aChance, aDuration, aEUt, aCleanroom); } @Override - public boolean addAutoclaveRecipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluidIn, FluidStack aFluidOut, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom) { + public boolean addAutoclaveRecipe( + ItemStack aInput, + ItemStack aCircuit, + FluidStack aFluidIn, + FluidStack aFluidOut, + ItemStack aOutput, + int aChance, + int aDuration, + int aEUt, + boolean aCleanroom) { if ((aInput == null) || (aFluidIn == null) || (aOutput == null)) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("autoclave", aInput, aDuration)) <= 0) { return false; } - if (!GT_Mod.gregtechproxy.mEnableCleanroom){ + if (!GT_Mod.gregtechproxy.mEnableCleanroom) { aCleanroom = false; } - GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes.addRecipe(true, new ItemStack[]{aInput, aCircuit}, new ItemStack[]{aOutput}, null, new int[]{aChance}, new FluidStack[]{aFluidIn}, new FluidStack[]{aFluidOut}, aDuration, aEUt, aCleanroom ? -200 : 0); - return true; - } - - @Override - public boolean addAutoclaveSpaceRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom) { + GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes.addRecipe( + true, + new ItemStack[] {aInput, aCircuit}, + new ItemStack[] {aOutput}, + null, + new int[] {aChance}, + new FluidStack[] {aFluidIn}, + new FluidStack[] {aFluidOut}, + aDuration, + aEUt, + aCleanroom ? -200 : 0); + return true; + } + + @Override + public boolean addAutoclaveSpaceRecipe( + ItemStack aInput, + FluidStack aFluid, + ItemStack aOutput, + int aChance, + int aDuration, + int aEUt, + boolean aCleanroom) { return addAutoclaveRecipe(aInput, aFluid, aOutput, aChance, aDuration, aEUt, aCleanroom); } @Override - public boolean addAutoclaveSpaceRecipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom) { + public boolean addAutoclaveSpaceRecipe( + ItemStack aInput, + ItemStack aCircuit, + FluidStack aFluid, + ItemStack aOutput, + int aChance, + int aDuration, + int aEUt, + boolean aCleanroom) { if ((aInput == null) || (aFluid == null) || (aOutput == null)) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("autoclave", aInput, aDuration)) <= 0) { return false; } - if (!GT_Mod.gregtechproxy.mEnableCleanroom){ + if (!GT_Mod.gregtechproxy.mEnableCleanroom) { aCleanroom = false; } - GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes.addRecipe(true, new ItemStack[]{aInput, aCircuit}, new ItemStack[]{aOutput}, null, new int[]{aChance}, new FluidStack[]{aFluid}, null, aDuration, aEUt, aCleanroom ? -100 : 0); - return true; - } - @Override - public boolean addAutoclave4Recipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluidIn, FluidStack aFluidOut, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, boolean aCleanroom) { + GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes.addRecipe( + true, + new ItemStack[] {aInput, aCircuit}, + new ItemStack[] {aOutput}, + null, + new int[] {aChance}, + new FluidStack[] {aFluid}, + null, + aDuration, + aEUt, + aCleanroom ? -100 : 0); + return true; + } + + @Override + public boolean addAutoclave4Recipe( + ItemStack aInput, + ItemStack aCircuit, + FluidStack aFluidIn, + FluidStack aFluidOut, + ItemStack[] aOutputs, + int[] aChances, + int aDuration, + int aEUt, + boolean aCleanroom) { if ((aInput == null) || (aFluidIn == null) || (aOutputs == null)) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("autoclave", aInput, aDuration)) <= 0) { return false; } - if (!GT_Mod.gregtechproxy.mEnableCleanroom){ + if (!GT_Mod.gregtechproxy.mEnableCleanroom) { aCleanroom = false; } - GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes.addRecipe(true, new ItemStack[] {aInput, aCircuit} , aOutputs, null, aChances, new FluidStack[]{aFluidIn}, new FluidStack[]{aFluidOut}, aDuration, aEUt, aCleanroom ? -200 : 0); + GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes.addRecipe( + true, + new ItemStack[] {aInput, aCircuit}, + aOutputs, + null, + aChances, + new FluidStack[] {aFluidIn}, + new FluidStack[] {aFluidOut}, + aDuration, + aEUt, + aCleanroom ? -200 : 0); return true; } @Deprecated @Override - public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt) { - return addMixerRecipe(aInput1, aInput2, aInput3, aInput4, null, null, null, null, null, aFluidInput, aFluidOutput, aOutput, aDuration, aEUt); - + public boolean addMixerRecipe( + ItemStack aInput1, + ItemStack aInput2, + ItemStack aInput3, + ItemStack aInput4, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput, + int aDuration, + int aEUt) { + return addMixerRecipe( + aInput1, + aInput2, + aInput3, + aInput4, + null, + null, + null, + null, + null, + aFluidInput, + aFluidOutput, + aOutput, + aDuration, + aEUt); } @Deprecated @Override - public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, ItemStack aInput5, ItemStack aInput6, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt) { - return addMixerRecipe(aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, null, null, null, aFluidInput, aFluidOutput, aOutput, aDuration, aEUt); - + public boolean addMixerRecipe( + ItemStack aInput1, + ItemStack aInput2, + ItemStack aInput3, + ItemStack aInput4, + ItemStack aInput5, + ItemStack aInput6, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput, + int aDuration, + int aEUt) { + return addMixerRecipe( + aInput1, + aInput2, + aInput3, + aInput4, + aInput5, + aInput6, + null, + null, + null, + aFluidInput, + aFluidOutput, + aOutput, + aDuration, + aEUt); } @Deprecated @Override - public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, ItemStack aInput5, ItemStack aInput6, ItemStack aInput7, ItemStack aInput8, ItemStack aInput9, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt) { + public boolean addMixerRecipe( + ItemStack aInput1, + ItemStack aInput2, + ItemStack aInput3, + ItemStack aInput4, + ItemStack aInput5, + ItemStack aInput6, + ItemStack aInput7, + ItemStack aInput8, + ItemStack aInput9, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput, + int aDuration, + int aEUt) { if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput == null) && (aFluidOutput == null))) { return false; } if ((aOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get("mixer", aOutput, aDuration)) <= 0)) { return false; } - if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get("mixer", aFluidOutput.getFluid().getName(), aDuration)) <= 0)) { + if ((aFluidOutput != null) + && ((aDuration = GregTech_API.sRecipeFile.get( + "mixer", aFluidOutput.getFluid().getName(), aDuration)) + <= 0)) { return false; } - GT_Recipe.GT_Recipe_Map.sMixerRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9}, new ItemStack[]{aOutput}, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sMixerRecipes.addRecipe( + true, + new ItemStack[] {aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9}, + new ItemStack[] {aOutput}, + null, + null, + new FluidStack[] {aFluidInput}, + new FluidStack[] {aFluidOutput}, + aDuration, + aEUt, + 0); return true; } @Override - public boolean addMixerRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, ItemStack[] ItemOutputArray, FluidStack[] FluidOutputArray, int aDuration, int aEUt) { - GT_Recipe.GT_Recipe_Map.sMixerRecipes.addRecipe(false, ItemInputArray, ItemOutputArray, null, null, FluidInputArray, FluidOutputArray, aDuration, aEUt, 0); + public boolean addMixerRecipe( + ItemStack[] ItemInputArray, + FluidStack[] FluidInputArray, + ItemStack[] ItemOutputArray, + FluidStack[] FluidOutputArray, + int aDuration, + int aEUt) { + GT_Recipe.GT_Recipe_Map.sMixerRecipes.addRecipe( + false, + ItemInputArray, + ItemOutputArray, + null, + null, + FluidInputArray, + FluidOutputArray, + aDuration, + aEUt, + 0); return true; } @Deprecated @Override - public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, ItemStack aInput5, ItemStack aInput6, ItemStack aInput7, ItemStack aInput8, ItemStack aInput9, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, int aDuration, int aEUt) { + public boolean addMixerRecipe( + ItemStack aInput1, + ItemStack aInput2, + ItemStack aInput3, + ItemStack aInput4, + ItemStack aInput5, + ItemStack aInput6, + ItemStack aInput7, + ItemStack aInput8, + ItemStack aInput9, + FluidStack aFluidInput, + FluidStack aFluidOutput, + ItemStack aOutput1, + ItemStack aOutput2, + ItemStack aOutput3, + ItemStack aOutput4, + int aDuration, + int aEUt) { if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput1 == null) && (aFluidOutput == null))) { return false; } if ((aOutput1 != null) && ((aDuration = GregTech_API.sRecipeFile.get("mixer", aOutput1, aDuration)) <= 0)) { return false; } - if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get("mixer", aFluidOutput.getFluid().getName(), aDuration)) <= 0)) { + if ((aFluidOutput != null) + && ((aDuration = GregTech_API.sRecipeFile.get( + "mixer", aFluidOutput.getFluid().getName(), aDuration)) + <= 0)) { return false; } - GT_Recipe.GT_Recipe_Map.sMixerRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9}, new ItemStack[]{aOutput1, aOutput2, aOutput3, aOutput4}, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sMixerRecipes.addRecipe( + true, + new ItemStack[] {aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9}, + new ItemStack[] {aOutput1, aOutput2, aOutput3, aOutput4}, + null, + null, + new FluidStack[] {aFluidInput}, + new FluidStack[] {aFluidOutput}, + aDuration, + aEUt, + 0); return true; } @Deprecated @Override - public boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt) { - return addLaserEngraverRecipe( aItemToEngrave, aLens, aEngravedItem, aDuration, aEUt, false); + public boolean addLaserEngraverRecipe( + ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt) { + return addLaserEngraverRecipe(aItemToEngrave, aLens, aEngravedItem, aDuration, aEUt, false); } @Deprecated @Override - public boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt, boolean aCleanroom) { + public boolean addLaserEngraverRecipe( + ItemStack aItemToEngrave, + ItemStack aLens, + ItemStack aEngravedItem, + int aDuration, + int aEUt, + boolean aCleanroom) { if ((aItemToEngrave == null) || (aLens == null) || (aEngravedItem == null)) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("laserengraving", aEngravedItem, aDuration)) <= 0) { return false; } - if (!GT_Mod.gregtechproxy.mEnableCleanroom){ + if (!GT_Mod.gregtechproxy.mEnableCleanroom) { aCleanroom = false; } - GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes.addRecipe(true, new ItemStack[]{aItemToEngrave, aLens}, new ItemStack[]{aEngravedItem}, null, null, null, aDuration, aEUt, aCleanroom ? -200 : 0); - return true; - } - - - @Override - public boolean addLaserEngraverRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, ItemStack[] OutputItemArray, FluidStack[] FluidOutputArray, int aDuration, int aEUt, boolean aCleanroom) { - GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes.addRecipe(false, ItemInputArray, OutputItemArray, null, null, - FluidInputArray, FluidOutputArray, aDuration, aEUt, aCleanroom ? -200 : 0); - return true; - } - - @Override - public boolean addFormingPressRecipe(ItemStack aItemToImprint, ItemStack aForm, ItemStack aImprintedItem, int aDuration, int aEUt) { + GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes.addRecipe( + true, + new ItemStack[] {aItemToEngrave, aLens}, + new ItemStack[] {aEngravedItem}, + null, + null, + null, + aDuration, + aEUt, + aCleanroom ? -200 : 0); + return true; + } + + @Override + public boolean addLaserEngraverRecipe( + ItemStack[] ItemInputArray, + FluidStack[] FluidInputArray, + ItemStack[] OutputItemArray, + FluidStack[] FluidOutputArray, + int aDuration, + int aEUt, + boolean aCleanroom) { + GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes.addRecipe( + false, + ItemInputArray, + OutputItemArray, + null, + null, + FluidInputArray, + FluidOutputArray, + aDuration, + aEUt, + aCleanroom ? -200 : 0); + return true; + } + + @Override + public boolean addFormingPressRecipe( + ItemStack aItemToImprint, ItemStack aForm, ItemStack aImprintedItem, int aDuration, int aEUt) { if ((aItemToImprint == null) || (aForm == null) || (aImprintedItem == null)) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("press", aImprintedItem, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sPressRecipes.addRecipe(true, new ItemStack[]{aItemToImprint, aForm}, new ItemStack[]{aImprintedItem}, null, null, null, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sPressRecipes.addRecipe( + true, + new ItemStack[] {aItemToImprint, aForm}, + new ItemStack[] {aImprintedItem}, + null, + null, + null, + aDuration, + aEUt, + 0); return true; } @Override - public boolean addFluidHeaterRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt) { + public boolean addFluidHeaterRecipe( + ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt) { if ((aInput == null) || (aOutput == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("fluidheater", aOutput.getFluid().getUnlocalizedName(), aDuration)) <= 0) { + if ((aDuration = GregTech_API.sRecipeFile.get( + "fluidheater", aOutput.getFluid().getUnlocalizedName(), aDuration)) + <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes.addRecipe(true, new ItemStack[]{aCircuit}, null, null, new FluidStack[]{aInput}, new FluidStack[]{aOutput}, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes.addRecipe( + true, + new ItemStack[] {aCircuit}, + null, + null, + new FluidStack[] {aInput}, + new FluidStack[] {aOutput}, + aDuration, + aEUt, + 0); return true; } @Override - public boolean addSifterRecipe(ItemStack aItemToSift, ItemStack[] aSiftedItems, int[] aChances, int aDuration, int aEUt) { + public boolean addSifterRecipe( + ItemStack aItemToSift, ItemStack[] aSiftedItems, int[] aChances, int aDuration, int aEUt) { if ((aItemToSift == null) || (aSiftedItems == null)) { return false; } @@ -1326,7 +2600,17 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aDuration = GregTech_API.sRecipeFile.get("sifter", aItemToSift, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sSifterRecipes.addRecipe(true, new ItemStack[]{aItemToSift}, aSiftedItems, null, aChances, null, null, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sSifterRecipes.addRecipe( + true, + new ItemStack[] {aItemToSift}, + aSiftedItems, + null, + aChances, + null, + null, + aDuration, + aEUt, + 0); return true; } } @@ -1334,12 +2618,14 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addArcFurnaceRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt) { - return addArcFurnaceRecipe(aInput, aOutputs, aChances, aDuration, aEUt, false); + public boolean addArcFurnaceRecipe( + ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt) { + return addArcFurnaceRecipe(aInput, aOutputs, aChances, aDuration, aEUt, false); } @Override - public boolean addArcFurnaceRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, boolean hidden) { + public boolean addArcFurnaceRecipe( + ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, boolean hidden) { if ((aInput == null) || (aOutputs == null)) { return false; } @@ -1348,14 +2634,34 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aDuration = GregTech_API.sRecipeFile.get("arcfurnace", aInput, aDuration)) <= 0) { return false; } - GT_Recipe sRecipe = GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes.addRecipe(true, new ItemStack[]{aInput}, aOutputs, null, aChances, new FluidStack[]{Materials.Oxygen.getGas(aDuration)}, null, Math.max(1, aDuration), Math.max(1, aEUt), 0); + GT_Recipe sRecipe = GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes.addRecipe( + true, + new ItemStack[] {aInput}, + aOutputs, + null, + aChances, + new FluidStack[] {Materials.Oxygen.getGas(aDuration)}, + null, + Math.max(1, aDuration), + Math.max(1, aEUt), + 0); if ((hidden) && (sRecipe != null)) { sRecipe.mHidden = true; } - for (Materials tMaterial : new Materials[]{Materials.Argon, Materials.Nitrogen}) { + for (Materials tMaterial : new Materials[] {Materials.Argon, Materials.Nitrogen}) { if (tMaterial.mPlasma != null) { int tPlasmaAmount = (int) Math.max(1L, aDuration / (tMaterial.getMass() * 16L)); - GT_Recipe tRecipe =GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes.addRecipe(true, new ItemStack[]{aInput}, aOutputs, null, aChances, new FluidStack[]{tMaterial.getPlasma(tPlasmaAmount)}, new FluidStack[]{tMaterial.getGas(tPlasmaAmount)}, Math.max(1, aDuration / 16), Math.max(1, aEUt / 3), 0); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes.addRecipe( + true, + new ItemStack[] {aInput}, + aOutputs, + null, + aChances, + new FluidStack[] {tMaterial.getPlasma(tPlasmaAmount)}, + new FluidStack[] {tMaterial.getGas(tPlasmaAmount)}, + Math.max(1, aDuration / 16), + Math.max(1, aEUt / 3), + 0); if ((hidden) && (tRecipe != null)) { tRecipe.mHidden = true; } @@ -1368,7 +2674,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addSimpleArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt) { + public boolean addSimpleArcFurnaceRecipe( + ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt) { if ((aInput == null) || (aOutputs == null) || aFluidInput == null) { return false; } @@ -1377,7 +2684,17 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aDuration = GregTech_API.sRecipeFile.get("arcfurnace", aInput, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes.addRecipe(true, new ItemStack[]{aInput}, aOutputs, null, aChances, new FluidStack[]{aFluidInput}, null, Math.max(1, aDuration), Math.max(1, aEUt), 0); + GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes.addRecipe( + true, + new ItemStack[] {aInput}, + aOutputs, + null, + aChances, + new FluidStack[] {aFluidInput}, + null, + Math.max(1, aDuration), + Math.max(1, aEUt), + 0); return true; } } @@ -1385,7 +2702,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addPlasmaArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt) { + public boolean addPlasmaArcFurnaceRecipe( + ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt) { if ((aInput == null) || (aOutputs == null) || aFluidInput == null) { return false; } @@ -1394,7 +2712,17 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aDuration = GregTech_API.sRecipeFile.get("arcfurnace", aInput, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes.addRecipe(true, new ItemStack[]{aInput}, aOutputs, null, aChances, new FluidStack[]{aFluidInput}, null, Math.max(1, aDuration), Math.max(1, aEUt), 0); + GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes.addRecipe( + true, + new ItemStack[] {aInput}, + aOutputs, + null, + aChances, + new FluidStack[] {aFluidInput}, + null, + Math.max(1, aDuration), + Math.max(1, aEUt), + 0); return true; } } @@ -1402,7 +2730,14 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addPlasmaArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt) { + public boolean addPlasmaArcFurnaceRecipe( + ItemStack aInput, + FluidStack aFluidInput, + ItemStack[] aOutputs, + FluidStack aFluidOutput, + int[] aChances, + int aDuration, + int aEUt) { if ((aInput == null) || (aOutputs == null) || aFluidInput == null) { return false; } @@ -1411,7 +2746,17 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aDuration = GregTech_API.sRecipeFile.get("arcfurnace", aInput, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes.addRecipe(true, new ItemStack[]{aInput}, aOutputs, null, aChances, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, Math.max(1, aDuration), Math.max(1, aEUt), 0); + GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes.addRecipe( + true, + new ItemStack[] {aInput}, + aOutputs, + null, + aChances, + new FluidStack[] {aFluidInput}, + new FluidStack[] {aFluidOutput}, + Math.max(1, aDuration), + Math.max(1, aEUt), + 0); return true; } } @@ -1419,12 +2764,14 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addPulveriserRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt) { + public boolean addPulveriserRecipe( + ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt) { return addPulveriserRecipe(aInput, aOutputs, aChances, aDuration, aEUt, false); } @Override - public boolean addPulveriserRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, boolean hidden) { + public boolean addPulveriserRecipe( + ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, boolean hidden) { if ((aInput == null) || (aOutputs == null)) { return false; } @@ -1433,7 +2780,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aDuration = GregTech_API.sRecipeFile.get("pulveriser", aInput, aDuration)) <= 0) { return false; } - GT_Recipe tRecipe =GT_Recipe.GT_Recipe_Map.sMaceratorRecipes.addRecipe(true, new ItemStack[]{aInput}, aOutputs, null, aChances, null, null, aDuration, aEUt, 0); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes.addRecipe( + true, new ItemStack[] {aInput}, aOutputs, null, aChances, null, null, aDuration, aEUt, 0); if ((hidden) && (tRecipe != null)) { tRecipe.mHidden = true; } @@ -1444,14 +2792,31 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addPyrolyseRecipe(ItemStack aInput, FluidStack aFluidInput, int intCircuit, ItemStack aOutput, FluidStack aFluidOutput, int aDuration, int aEUt) { + public boolean addPyrolyseRecipe( + ItemStack aInput, + FluidStack aFluidInput, + int intCircuit, + ItemStack aOutput, + FluidStack aFluidOutput, + int aDuration, + int aEUt) { if (aInput == null) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("pyrolyse", aInput, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sPyrolyseRecipes.addRecipe(false, new ItemStack[]{aInput, ItemList.Circuit_Integrated.getWithDamage(0L, intCircuit, new Object[0])}, new ItemStack[]{aOutput}, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sPyrolyseRecipes.addRecipe( + false, + new ItemStack[] {aInput, ItemList.Circuit_Integrated.getWithDamage(0L, intCircuit, new Object[0])}, + new ItemStack[] {aOutput}, + null, + null, + new FluidStack[] {aFluidInput}, + new FluidStack[] {aFluidOutput}, + aDuration, + aEUt, + 0); return true; } @@ -1462,42 +2827,97 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override - public boolean addCrackingRecipe(int circuitConfig, FluidStack aInput, FluidStack aInput2, FluidStack aOutput, int aDuration, int aEUt) { + public boolean addCrackingRecipe( + int circuitConfig, FluidStack aInput, FluidStack aInput2, FluidStack aOutput, int aDuration, int aEUt) { if ((aInput == null && aInput2 == null) || (aOutput == null)) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("cracking", aInput.getUnlocalizedName(), aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sCrakingRecipes.addRecipe(false, new ItemStack[]{GT_Utility.getIntegratedCircuit(circuitConfig)}, null, null, null, - new FluidStack[]{aInput, aInput2}, new FluidStack[]{aOutput}, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sCrakingRecipes.addRecipe( + false, + new ItemStack[] {GT_Utility.getIntegratedCircuit(circuitConfig)}, + null, + null, + null, + new FluidStack[] {aInput, aInput2}, + new FluidStack[] {aOutput}, + aDuration, + aEUt, + 0); return true; } @Override - public boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput, int aDuration, int aEUt) { - if ((aResearchItem==null)||(aResearchTime<=0)||(aInputs == null) || (aOutput == null) || aInputs.length>15 || aInputs.length<4) { + public boolean addAssemblylineRecipe( + ItemStack aResearchItem, + int aResearchTime, + ItemStack[] aInputs, + FluidStack[] aFluidInputs, + ItemStack aOutput, + int aDuration, + int aEUt) { + if ((aResearchItem == null) + || (aResearchTime <= 0) + || (aInputs == null) + || (aOutput == null) + || aInputs.length > 15 + || aInputs.length < 4) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("assemblingline", aOutput, aDuration)) <= 0) { return false; } - for(ItemStack tItem : aInputs){ - if(tItem==null){ - GT_FML_LOGGER.info("addAssemblingLineRecipe "+aResearchItem.getDisplayName()+" --> "+aOutput.getUnlocalizedName()+" there is some null item in that recipe"); + for (ItemStack tItem : aInputs) { + if (tItem == null) { + GT_FML_LOGGER.info("addAssemblingLineRecipe " + aResearchItem.getDisplayName() + " --> " + + aOutput.getUnlocalizedName() + " there is some null item in that recipe"); } } - GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{aResearchItem}, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Writes Research result", new Object[0])}, null, null, aResearchTime, 30, -201); - GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.addFakeRecipe(false, aInputs, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Reads Research result", new Object[0])}, aFluidInputs, null, aDuration, aEUt, 0,true); - GT_Recipe_AssemblyLine tRecipe = new GT_Recipe_AssemblyLine(aResearchItem, aResearchTime, aInputs, aFluidInputs, aOutput, aDuration, aEUt); + GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe( + false, + new ItemStack[] {aResearchItem}, + new ItemStack[] {aOutput}, + new ItemStack[] {ItemList.Tool_DataStick.getWithName(1L, "Writes Research result", new Object[0])}, + null, + null, + aResearchTime, + 30, + -201); + GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.addFakeRecipe( + false, + aInputs, + new ItemStack[] {aOutput}, + new ItemStack[] {ItemList.Tool_DataStick.getWithName(1L, "Reads Research result", new Object[0])}, + aFluidInputs, + null, + aDuration, + aEUt, + 0, + true); + GT_Recipe_AssemblyLine tRecipe = new GT_Recipe_AssemblyLine( + aResearchItem, aResearchTime, aInputs, aFluidInputs, aOutput, aDuration, aEUt); GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.add(tRecipe); GT_AssemblyLineUtils.addRecipeToCache(tRecipe); return true; } @Override - public boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, Object[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput, int aDuration, int aEUt) { - if ((aResearchItem==null)||(aResearchTime<=0)||(aInputs == null) || (aOutput == null) || aInputs.length>15 || aInputs.length<4) { + public boolean addAssemblylineRecipe( + ItemStack aResearchItem, + int aResearchTime, + Object[] aInputs, + FluidStack[] aFluidInputs, + ItemStack aOutput, + int aDuration, + int aEUt) { + if ((aResearchItem == null) + || (aResearchTime <= 0) + || (aInputs == null) + || (aOutput == null) + || aInputs.length > 15 + || aInputs.length < 4) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("assemblingline", aOutput, aDuration)) <= 0) { @@ -1506,81 +2926,110 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { ItemStack[] tInputs = new ItemStack[aInputs.length]; ItemStack[][] tAlts = new ItemStack[aInputs.length][]; int tPersistentHash = 1; - for(int i = 0; i < aInputs.length; i++){ - Object obj = aInputs[i]; - if (obj instanceof ItemStack) { - tInputs[i] = (ItemStack) obj; - tAlts[i] = null; + for (int i = 0; i < aInputs.length; i++) { + Object obj = aInputs[i]; + if (obj instanceof ItemStack) { + tInputs[i] = (ItemStack) obj; + tAlts[i] = null; tPersistentHash = tPersistentHash * 31 + GT_Utility.persistentHash(tInputs[i], true, false); - continue; - } else if (obj instanceof ItemStack[]) { - ItemStack[] aStacks = (ItemStack[]) obj; - if (aStacks.length > 0) { - tInputs[i] = aStacks[0]; - tAlts[i] = (ItemStack[]) Arrays.copyOf(aStacks, aStacks.length); + continue; + } else if (obj instanceof ItemStack[]) { + ItemStack[] aStacks = (ItemStack[]) obj; + if (aStacks.length > 0) { + tInputs[i] = aStacks[0]; + tAlts[i] = (ItemStack[]) Arrays.copyOf(aStacks, aStacks.length); for (ItemStack tAlt : tAlts[i]) { tPersistentHash = tPersistentHash * 31 + GT_Utility.persistentHash(tAlt, true, false); } tPersistentHash *= 31; - continue; - } - } else if (obj instanceof Object[]) { - Object[] objs = (Object[]) obj; - List<ItemStack> tList; - if (objs.length >= 2 && !(tList = GT_OreDictUnificator.getOres(objs[0])).isEmpty()) { - try { + continue; + } + } else if (obj instanceof Object[]) { + Object[] objs = (Object[]) obj; + List<ItemStack> tList; + if (objs.length >= 2 && !(tList = GT_OreDictUnificator.getOres(objs[0])).isEmpty()) { + try { // sort the output, so the hash code is stable across launches - tList.sort(Comparator.<ItemStack, String>comparing(s -> GameRegistry.findUniqueIdentifierFor(s.getItem()).modId) + tList.sort(Comparator.<ItemStack, String>comparing( + s -> GameRegistry.findUniqueIdentifierFor(s.getItem()).modId) .thenComparing(s -> GameRegistry.findUniqueIdentifierFor(s.getItem()).modId) .thenComparingInt(Items.feather::getDamage) .thenComparingInt(s -> s.stackSize)); - int tAmount = ((Number) objs[1]).intValue(); - List<ItemStack> uList = new ArrayList<>(); - for (ItemStack tStack : tList) { - ItemStack uStack = GT_Utility.copyAmount(tAmount, tStack); - if (GT_Utility.isStackValid(uStack)) { - uList.add(uStack); - if (tInputs[i] == null) - tInputs[i] = uStack; - } - } - tAlts[i] = uList.toArray(new ItemStack[0]); + int tAmount = ((Number) objs[1]).intValue(); + List<ItemStack> uList = new ArrayList<>(); + for (ItemStack tStack : tList) { + ItemStack uStack = GT_Utility.copyAmount(tAmount, tStack); + if (GT_Utility.isStackValid(uStack)) { + uList.add(uStack); + if (tInputs[i] == null) tInputs[i] = uStack; + } + } + tAlts[i] = uList.toArray(new ItemStack[0]); tPersistentHash = tPersistentHash * 31 + (objs[0] == null ? "" : objs[0].toString()).hashCode(); tPersistentHash = tPersistentHash * 31 + tAmount; - continue; - } catch (Exception t) {} - } - } - GT_FML_LOGGER.info("addAssemblingLineRecipe "+aResearchItem.getDisplayName()+" --> "+aOutput.getUnlocalizedName()+" there is some null item in that recipe"); + continue; + } catch (Exception t) { + } + } + } + GT_FML_LOGGER.info("addAssemblingLineRecipe " + aResearchItem.getDisplayName() + " --> " + + aOutput.getUnlocalizedName() + " there is some null item in that recipe"); } tPersistentHash = tPersistentHash * 31 + GT_Utility.persistentHash(aResearchItem, true, false); tPersistentHash = tPersistentHash * 31 + GT_Utility.persistentHash(aOutput, true, false); for (FluidStack tFluidInput : aFluidInputs) { - if (tFluidInput == null) - continue; + if (tFluidInput == null) continue; tPersistentHash = tPersistentHash * 31 + GT_Utility.persistentHash(tFluidInput, true, false); } tPersistentHash = tPersistentHash * 31 + aResearchTime; tPersistentHash = tPersistentHash * 31 + aDuration; tPersistentHash = tPersistentHash * 31 + aEUt; - GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{aResearchItem}, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Writes Research result", new Object[0])}, null, null, aResearchTime, 30, -201); - GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.addFakeRecipe(false,tInputs,new ItemStack[]{aOutput},new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Reads Research result", new Object[0])},aFluidInputs,null,aDuration,aEUt,0,tAlts,true); - GT_Recipe_AssemblyLine tRecipe = new GT_Recipe_AssemblyLine(aResearchItem, aResearchTime, tInputs, aFluidInputs, aOutput, aDuration, aEUt, tAlts); + GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe( + false, + new ItemStack[] {aResearchItem}, + new ItemStack[] {aOutput}, + new ItemStack[] {ItemList.Tool_DataStick.getWithName(1L, "Writes Research result", new Object[0])}, + null, + null, + aResearchTime, + 30, + -201); + GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.addFakeRecipe( + false, + tInputs, + new ItemStack[] {aOutput}, + new ItemStack[] {ItemList.Tool_DataStick.getWithName(1L, "Reads Research result", new Object[0])}, + aFluidInputs, + null, + aDuration, + aEUt, + 0, + tAlts, + true); + GT_Recipe_AssemblyLine tRecipe = new GT_Recipe_AssemblyLine( + aResearchItem, aResearchTime, tInputs, aFluidInputs, aOutput, aDuration, aEUt, tAlts); tRecipe.setPersistentHash(tPersistentHash); GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.add(tRecipe); GT_AssemblyLineUtils.addRecipeToCache(tRecipe); return true; - } + } @Override - public boolean addCircuitAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput, int aDuration, int aEUt) { - return addCircuitAssemblerRecipe(aInputs, aFluidInput, aOutput,aDuration,aEUt, false); + public boolean addCircuitAssemblerRecipe( + ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput, int aDuration, int aEUt) { + return addCircuitAssemblerRecipe(aInputs, aFluidInput, aOutput, aDuration, aEUt, false); } @Override - public boolean addCircuitAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput, int aDuration, int aEUt, boolean aCleanroom) { + public boolean addCircuitAssemblerRecipe( + ItemStack[] aInputs, + FluidStack aFluidInput, + ItemStack aOutput, + int aDuration, + int aEUt, + boolean aCleanroom) { - if (this.areItemsAndFluidsBothNull(aInputs, new FluidStack[]{aFluidInput})) { + if (this.areItemsAndFluidsBothNull(aInputs, new FluidStack[] {aFluidInput})) { return false; } @@ -1597,30 +3046,56 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } for (int oreID : OreDictionary.getOreIDs(aOutput)) { - if (OreDictionary.getOreName(oreID).startsWith("circuit")){ - return this.addCircuitAssemblerRecipeNonOredicted(aInputs, aFluidInput, aOutput, aDuration, aEUt, aCleanroom); + if (OreDictionary.getOreName(oreID).startsWith("circuit")) { + return this.addCircuitAssemblerRecipeNonOredicted( + aInputs, aFluidInput, aOutput, aDuration, aEUt, aCleanroom); } } - GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes.addRecipe(true, aInputs, new ItemStack[]{aOutput}, null, new FluidStack[]{aFluidInput}, null, aDuration, aEUt, aCleanroom ? -200 : 0); + GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes.addRecipe( + true, + aInputs, + new ItemStack[] {aOutput}, + null, + new FluidStack[] {aFluidInput}, + null, + aDuration, + aEUt, + aCleanroom ? -200 : 0); return true; } - public boolean addCircuitAssemblerRecipeNonOredicted(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput, int aDuration, int aEUt, boolean aCleanroom) { - if ((aInputs == null) || (aOutput == null) || aInputs.length>6 || aInputs.length<1) { + public boolean addCircuitAssemblerRecipeNonOredicted( + ItemStack[] aInputs, + FluidStack aFluidInput, + ItemStack aOutput, + int aDuration, + int aEUt, + boolean aCleanroom) { + if ((aInputs == null) || (aOutput == null) || aInputs.length > 6 || aInputs.length < 1) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("circuitassembler", aOutput, aDuration)) <= 0) { return false; } - if (!GT_Mod.gregtechproxy.mEnableCleanroom){ + if (!GT_Mod.gregtechproxy.mEnableCleanroom) { aCleanroom = false; } - GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes.addRecipe(true, aInputs, new ItemStack[]{aOutput}, null, null, new FluidStack[]{aFluidInput}, null, aDuration, aEUt, aCleanroom ? -200 : 0); + GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes.addRecipe( + true, + aInputs, + new ItemStack[] {aOutput}, + null, + null, + new FluidStack[] {aFluidInput}, + null, + aDuration, + aEUt, + aCleanroom ? -200 : 0); return true; } - private boolean areItemsAndFluidsBothNull(ItemStack[] items, FluidStack[] fluids){ + private boolean areItemsAndFluidsBothNull(ItemStack[] items, FluidStack[] fluids) { boolean itemsNull = true; if (items != null) { for (ItemStack itemStack : items) { @@ -1640,6 +3115,5 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } } return itemsNull && fluidsNull; - } } diff --git a/src/main/java/gregtech/common/GT_Server.java b/src/main/java/gregtech/common/GT_Server.java index 51bf9e898b..75d98e27a1 100644 --- a/src/main/java/gregtech/common/GT_Server.java +++ b/src/main/java/gregtech/common/GT_Server.java @@ -21,8 +21,7 @@ public class GT_Server extends GT_Proxy { } @Override - public void doSonictronSound(ItemStack aStack, World aWorld, double aX, double aY, double aZ) { - } + public void doSonictronSound(ItemStack aStack, World aWorld, double aX, double aY, double aZ) {} @Override public int addArmor(String aPrefix) { diff --git a/src/main/java/gregtech/common/GT_ThaumcraftCompat.java b/src/main/java/gregtech/common/GT_ThaumcraftCompat.java index e4472824e7..1f7e8f4de9 100644 --- a/src/main/java/gregtech/common/GT_ThaumcraftCompat.java +++ b/src/main/java/gregtech/common/GT_ThaumcraftCompat.java @@ -6,6 +6,9 @@ import gregtech.api.enums.TC_Aspects; import gregtech.api.interfaces.internal.IThaumcraftCompat; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Utility; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.IRecipe; @@ -23,10 +26,6 @@ import thaumcraft.api.research.ResearchCategoryList; import thaumcraft.api.research.ResearchItem; import thaumcraft.api.research.ResearchPage; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - public class GT_ThaumcraftCompat implements IThaumcraftCompat { public GT_ThaumcraftCompat() { TC_Aspects.AER.mAspect = Aspect.AIR; @@ -79,11 +78,36 @@ public class GT_ThaumcraftCompat implements IThaumcraftCompat { TC_Aspects.VITREUS.mAspect = Aspect.CRYSTAL; TC_Aspects.VOLATUS.mAspect = Aspect.FLIGHT; - TC_Aspects.STRONTIO.mAspect = new Aspect("strontio", 15647411, new Aspect[]{Aspect.MIND, Aspect.ENTROPY}, new ResourceLocation("gregtech:textures/aspects/" + TC_Aspects.STRONTIO.name() + ".png"), 1); - TC_Aspects.NEBRISUM.mAspect = new Aspect("nebrisum", 15658622, new Aspect[]{Aspect.MINE, Aspect.GREED}, new ResourceLocation("gregtech:textures/aspects/" + TC_Aspects.NEBRISUM.name() + ".png"), 1); - TC_Aspects.ELECTRUM.mAspect = new Aspect("electrum", 12644078, new Aspect[]{Aspect.ENERGY, Aspect.MECHANISM}, new ResourceLocation("gregtech:textures/aspects/" + TC_Aspects.ELECTRUM.name() + ".png"), 1); - TC_Aspects.MAGNETO.mAspect = new Aspect("magneto", 12632256, new Aspect[]{Aspect.METAL, Aspect.TRAVEL}, new ResourceLocation("gregtech:textures/aspects/" + TC_Aspects.MAGNETO.name() + ".png"), 1); - TC_Aspects.RADIO.mAspect = new Aspect("radio", 12648384, new Aspect[]{Aspect.LIGHT, Aspect.ENERGY}, new ResourceLocation("gregtech:textures/aspects/" + TC_Aspects.RADIO.name() + ".png"), 1); + TC_Aspects.STRONTIO.mAspect = new Aspect( + "strontio", + 15647411, + new Aspect[] {Aspect.MIND, Aspect.ENTROPY}, + new ResourceLocation("gregtech:textures/aspects/" + TC_Aspects.STRONTIO.name() + ".png"), + 1); + TC_Aspects.NEBRISUM.mAspect = new Aspect( + "nebrisum", + 15658622, + new Aspect[] {Aspect.MINE, Aspect.GREED}, + new ResourceLocation("gregtech:textures/aspects/" + TC_Aspects.NEBRISUM.name() + ".png"), + 1); + TC_Aspects.ELECTRUM.mAspect = new Aspect( + "electrum", + 12644078, + new Aspect[] {Aspect.ENERGY, Aspect.MECHANISM}, + new ResourceLocation("gregtech:textures/aspects/" + TC_Aspects.ELECTRUM.name() + ".png"), + 1); + TC_Aspects.MAGNETO.mAspect = new Aspect( + "magneto", + 12632256, + new Aspect[] {Aspect.METAL, Aspect.TRAVEL}, + new ResourceLocation("gregtech:textures/aspects/" + TC_Aspects.MAGNETO.name() + ".png"), + 1); + TC_Aspects.RADIO.mAspect = new Aspect( + "radio", + 12648384, + new Aspect[] {Aspect.LIGHT, Aspect.ENERGY}, + new ResourceLocation("gregtech:textures/aspects/" + TC_Aspects.RADIO.name() + ".png"), + 1); GT_LanguageManager.addStringLocalization("tc.aspect.strontio", "Stupidness, Incompetence"); GT_LanguageManager.addStringLocalization("tc.aspect.nebrisum", "Cheatyness, Raiding"); @@ -95,14 +119,29 @@ public class GT_ThaumcraftCompat implements IThaumcraftCompat { private static final AspectList getAspectList(List<TC_Aspects.TC_AspectStack> aAspects) { AspectList rAspects = new AspectList(); TC_Aspects.TC_AspectStack tAspect; - for (Iterator i$ = aAspects.iterator(); i$.hasNext(); rAspects.add((Aspect) tAspect.mAspect.mAspect, (int) tAspect.mAmount)) { + for (Iterator i$ = aAspects.iterator(); + i$.hasNext(); + rAspects.add((Aspect) tAspect.mAspect.mAspect, (int) tAspect.mAmount)) { tAspect = (TC_Aspects.TC_AspectStack) i$.next(); } return rAspects; } @Override - public Object addResearch(String aResearch, String aName, String aText, String[] aParentResearches, String aCategory, ItemStack aIcon, int aComplexity, int aType, int aX, int aY, List<TC_Aspects.TC_AspectStack> aAspects, ItemStack[] aResearchTriggers, Object[] aPages) { + public Object addResearch( + String aResearch, + String aName, + String aText, + String[] aParentResearches, + String aCategory, + ItemStack aIcon, + int aComplexity, + int aType, + int aX, + int aY, + List<TC_Aspects.TC_AspectStack> aAspects, + ItemStack[] aResearchTriggers, + Object[] aPages) { if (!GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.researches, aResearch, true)) { return null; } @@ -117,7 +156,8 @@ public class GT_ThaumcraftCompat implements IThaumcraftCompat { aY += (aY > 0 ? 5 : -5); } } - ResearchItem rResearch = new ResearchItem(aResearch, aCategory, getAspectList(aAspects), aX, aY, aComplexity, aIcon); + ResearchItem rResearch = + new ResearchItem(aResearch, aCategory, getAspectList(aAspects), aX, aY, aComplexity, aIcon); ArrayList<ResearchPage> tPages = new ArrayList(aPages.length); GT_LanguageManager.addStringLocalization("tc.research_name." + aResearch, aName); GT_LanguageManager.addStringLocalization("tc.research_text." + aResearch, "[GT] " + aText); @@ -178,41 +218,69 @@ public class GT_ThaumcraftCompat implements IThaumcraftCompat { } @Override - public Object addCrucibleRecipe(String aResearch, Object aInput, ItemStack aOutput, List<TC_Aspects.TC_AspectStack> aAspects) { - if ((GT_Utility.isStringInvalid(aResearch)) || (aInput == null) || (aOutput == null) || (aAspects == null) || (aAspects.isEmpty())) { + public Object addCrucibleRecipe( + String aResearch, Object aInput, ItemStack aOutput, List<TC_Aspects.TC_AspectStack> aAspects) { + if ((GT_Utility.isStringInvalid(aResearch)) + || (aInput == null) + || (aOutput == null) + || (aAspects == null) + || (aAspects.isEmpty())) { return null; } - return ThaumcraftApi.addCrucibleRecipe(aResearch, GT_Utility.copyOrNull(aOutput), ((aInput instanceof ItemStack)) || ((aInput instanceof ArrayList)) ? aInput : aInput.toString(), getAspectList(aAspects)); + return ThaumcraftApi.addCrucibleRecipe( + aResearch, + GT_Utility.copyOrNull(aOutput), + ((aInput instanceof ItemStack)) || ((aInput instanceof ArrayList)) ? aInput : aInput.toString(), + getAspectList(aAspects)); } @Override - public Object addInfusionRecipe(String aResearch, ItemStack aMainInput, ItemStack[] aSideInputs, ItemStack aOutput, int aInstability, List<TC_Aspects.TC_AspectStack> aAspects) { - if ((GT_Utility.isStringInvalid(aResearch)) || (aMainInput == null) || (aSideInputs == null) || (aOutput == null) || (aAspects == null) || (aAspects.isEmpty())) { + public Object addInfusionRecipe( + String aResearch, + ItemStack aMainInput, + ItemStack[] aSideInputs, + ItemStack aOutput, + int aInstability, + List<TC_Aspects.TC_AspectStack> aAspects) { + if ((GT_Utility.isStringInvalid(aResearch)) + || (aMainInput == null) + || (aSideInputs == null) + || (aOutput == null) + || (aAspects == null) + || (aAspects.isEmpty())) { return null; } - return ThaumcraftApi.addInfusionCraftingRecipe(aResearch, GT_Utility.copyOrNull(aOutput), aInstability, getAspectList(aAspects), aMainInput, aSideInputs); + return ThaumcraftApi.addInfusionCraftingRecipe( + aResearch, + GT_Utility.copyOrNull(aOutput), + aInstability, + getAspectList(aAspects), + aMainInput, + aSideInputs); + } + + @Override + public boolean registerThaumcraftAspectsToItem( + ItemStack aExampleStack, List<TC_Aspects.TC_AspectStack> aAspects, String aOreDict) { + if (aAspects.isEmpty()) return false; + ThaumcraftApi.registerObjectTag(aOreDict, (AspectList) getAspectList(aAspects)); + return true; } - - @Override - public boolean registerThaumcraftAspectsToItem(ItemStack aExampleStack, List<TC_Aspects.TC_AspectStack> aAspects, String aOreDict) { - if (aAspects.isEmpty()) return false; - ThaumcraftApi.registerObjectTag(aOreDict, (AspectList)getAspectList(aAspects)); - return true; - } - @Override - public boolean registerThaumcraftAspectsToItem(ItemStack aStack, List<TC_Aspects.TC_AspectStack> aAspects, boolean aAdditive) { - if (aAspects.isEmpty()) return false; - if (aAdditive) { - ThaumcraftApi.registerComplexObjectTag(aStack, (AspectList)getAspectList(aAspects)); - return true; - } - AspectList tAlreadyRegisteredAspects = ThaumcraftApiHelper.getObjectAspects(aStack); - if (tAlreadyRegisteredAspects == null || tAlreadyRegisteredAspects.size() <= 0) { - ThaumcraftApi.registerObjectTag(aStack, (AspectList)getAspectList(aAspects)); - } - return true; - } + @Override + public boolean registerThaumcraftAspectsToItem( + ItemStack aStack, List<TC_Aspects.TC_AspectStack> aAspects, boolean aAdditive) { + if (aAspects.isEmpty()) return false; + if (aAdditive) { + ThaumcraftApi.registerComplexObjectTag(aStack, (AspectList) getAspectList(aAspects)); + return true; + } + AspectList tAlreadyRegisteredAspects = ThaumcraftApiHelper.getObjectAspects(aStack); + if (tAlreadyRegisteredAspects == null || tAlreadyRegisteredAspects.size() <= 0) { + ThaumcraftApi.registerObjectTag(aStack, (AspectList) getAspectList(aAspects)); + } + return true; + } @Override public boolean registerPortholeBlacklistedBlock(Block aBlock) { diff --git a/src/main/java/gregtech/common/GT_UndergroundOil.java b/src/main/java/gregtech/common/GT_UndergroundOil.java index 0010de8223..e7351af7c3 100644 --- a/src/main/java/gregtech/common/GT_UndergroundOil.java +++ b/src/main/java/gregtech/common/GT_UndergroundOil.java @@ -1,11 +1,20 @@ package gregtech.common; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; + import gregtech.GT_Mod; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.objects.GT_UO_Dimension; import gregtech.api.objects.GT_UO_Fluid; import gregtech.api.objects.XSTR; import gregtech.api.util.GT_ChunkAssociatedData; +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; +import java.util.Objects; +import java.util.WeakHashMap; +import javax.annotation.Nullable; +import javax.annotation.ParametersAreNonnullByDefault; import net.minecraft.world.World; import net.minecraft.world.chunk.Chunk; import net.minecraftforge.event.world.ChunkDataEvent; @@ -13,21 +22,11 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import org.apache.commons.lang3.tuple.Pair; -import javax.annotation.Nullable; -import javax.annotation.ParametersAreNonnullByDefault; -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; -import java.util.Objects; -import java.util.WeakHashMap; - -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; - /** * Created by Tec on 29.04.2017. */ public class GT_UndergroundOil { - public static final short DIVIDER=5000; + public static final short DIVIDER = 5000; private static final GT_UndergroundOilStore STORAGE = new GT_UndergroundOilStore(); private static final ChunkData NIL_FLUID_STACK = new ChunkData(-1, null, null, false); @@ -35,8 +34,8 @@ public class GT_UndergroundOil { * Effectively just call {@code undergroundOil(te, -1)} for you * @see #undergroundOil(World, int, int, float) */ - public static FluidStack undergroundOilReadInformation(IGregTechTileEntity te){ - return undergroundOil(te.getWorld().getChunkFromBlockCoords(te.getXCoord(),te.getZCoord()),-1); + public static FluidStack undergroundOilReadInformation(IGregTechTileEntity te) { + return undergroundOil(te.getWorld().getChunkFromBlockCoords(te.getXCoord(), te.getZCoord()), -1); } /** @@ -44,16 +43,17 @@ public class GT_UndergroundOil { * @see #undergroundOil(World, int, int, float) */ public static FluidStack undergroundOilReadInformation(Chunk chunk) { - return undergroundOil(chunk,-1); + return undergroundOil(chunk, -1); } /** @see #undergroundOil(World, int, int, float) */ - public static FluidStack undergroundOil(IGregTechTileEntity te, float readOrDrainCoefficient){ - return undergroundOil(te.getWorld().getChunkFromBlockCoords(te.getXCoord(),te.getZCoord()),readOrDrainCoefficient); + public static FluidStack undergroundOil(IGregTechTileEntity te, float readOrDrainCoefficient) { + return undergroundOil( + te.getWorld().getChunkFromBlockCoords(te.getXCoord(), te.getZCoord()), readOrDrainCoefficient); } - //Returns whole content for information purposes -> when drainSpeedCoefficient < 0 - //Else returns extracted fluidStack if amount > 0, or null otherwise + // Returns whole content for information purposes -> when drainSpeedCoefficient < 0 + // Else returns extracted fluidStack if amount > 0, or null otherwise /** @see #undergroundOil(World, int, int, float) */ public static FluidStack undergroundOil(Chunk chunk, float readOrDrainCoefficient) { return undergroundOil(chunk.worldObj, chunk.xPosition, chunk.zPosition, readOrDrainCoefficient); @@ -68,37 +68,38 @@ public class GT_UndergroundOil { * @return null if nothing here, or depleted already, or a client side world */ public static FluidStack undergroundOil(World w, int chunkX, int chunkZ, float readOrDrainCoefficient) { - if (w.isRemote) - return null; // troublemakers go away + if (w.isRemote) return null; // troublemakers go away ChunkData chunkData = STORAGE.get(w, chunkX, chunkZ); if (chunkData.getVein() == null || chunkData.getFluid() == null) // nothing here... - return null; - //do stuff on it if needed + return null; + // do stuff on it if needed FluidStack fluidInChunk = new FluidStack(chunkData.getFluid(), 0); - if(readOrDrainCoefficient>=0){ + if (readOrDrainCoefficient >= 0) { int fluidExtracted = (int) Math.floor(chunkData.getAmount() * (double) readOrDrainCoefficient / DIVIDER); double averageDecrease = chunkData.getVein().DecreasePerOperationAmount * (double) readOrDrainCoefficient; - int decrease=(int)Math.ceil(averageDecrease); - if (fluidExtracted <= 0 || chunkData.amount <= decrease) {//decrease - here it is max value of extraction for easy check + int decrease = (int) Math.ceil(averageDecrease); + if (fluidExtracted <= 0 + || chunkData.amount <= decrease) { // decrease - here it is max value of extraction for easy check chunkData.setAmount(0); - }else{ - fluidInChunk.amount = fluidExtracted;//give appropriate amount + } else { + fluidInChunk.amount = fluidExtracted; // give appropriate amount if (XSTR_INSTANCE.nextFloat() < (decrease - averageDecrease)) - decrease--;//use XSTR_INSTANCE to "subtract double from int" - //ex. + decrease--; // use XSTR_INSTANCE to "subtract double from int" + // ex. // averageDecrease=3.9 // decrease= ceil from 3.9 = 4 // decrease-averageDecrease=0.1 -> chance to subtract 1 // if XSTR_INSTANCE is < chance then subtract 1 - chunkData.changeAmount(-decrease);//diminish amount, "randomly" adjusted to double value (averageDecrease) + chunkData.changeAmount( + -decrease); // diminish amount, "randomly" adjusted to double value (averageDecrease) } - } - else {//just get info + } else { // just get info if (chunkData.amount <= DIVIDER) { chunkData.setAmount(0); } else { - //get the expected current output - fluidInChunk.amount = (int) Math.floor(chunkData.getAmount() * (double) -readOrDrainCoefficient / DIVIDER); + // get the expected current output + fluidInChunk.amount = + (int) Math.floor(chunkData.getAmount() * (double) -readOrDrainCoefficient / DIVIDER); } } return fluidInChunk; @@ -172,7 +173,8 @@ public class GT_UndergroundOil { } @Override - protected void writeElement(DataOutput output, ChunkData element, World world, int chunkX, int chunkZ) throws IOException { + protected void writeElement(DataOutput output, ChunkData element, World world, int chunkX, int chunkZ) + throws IOException { /* see class javadoc for explanation */ output.writeInt(element.getVeinHash()); if (element.getVeinKey() == null) return; @@ -185,10 +187,10 @@ public class GT_UndergroundOil { } @Override - protected GT_UndergroundOil.ChunkData readElement(DataInput input, int version, World world, int chunkX, int chunkZ) throws IOException { + protected GT_UndergroundOil.ChunkData readElement( + DataInput input, int version, World world, int chunkX, int chunkZ) throws IOException { /* see class javadoc for explanation */ - if (version != 0) - throw new IOException("Region file corrupted"); + if (version != 0) throw new IOException("Region file corrupted"); GT_UndergroundOil.ChunkData pristine = createElement(world, chunkX, chunkZ); int hash = input.readInt(); String veinKey = hash != 0 ? input.readUTF() : null; @@ -197,24 +199,28 @@ public class GT_UndergroundOil { // vein config changed. use regen-ed data. return pristine; } - if (hash == 0) - return NIL_FLUID_STACK; - return new GT_UndergroundOil.ChunkData(amount, GT_Mod.gregtechproxy.mUndergroundOil.GetDimension(world.provider.dimensionId).getUOFluid(veinKey), veinKey); + if (hash == 0) return NIL_FLUID_STACK; + return new GT_UndergroundOil.ChunkData( + amount, + GT_Mod.gregtechproxy + .mUndergroundOil + .GetDimension(world.provider.dimensionId) + .getUOFluid(veinKey), + veinKey); } @Override protected GT_UndergroundOil.ChunkData createElement(World world, int chunkX, int chunkZ) { Pair<GT_UO_Fluid, Integer> pristine = getPristineAmount(world, chunkX, chunkZ); - if (pristine == null) - return NIL_FLUID_STACK; + if (pristine == null) return NIL_FLUID_STACK; int dimensionId = world.provider.dimensionId; GT_UO_Dimension dimension = GT_Mod.gregtechproxy.mUndergroundOil.GetDimension(dimensionId); - return new GT_UndergroundOil.ChunkData(pristine.getRight(), pristine.getLeft(), dimension.getUOFluidKey(pristine.getLeft()), false); + return new GT_UndergroundOil.ChunkData( + pristine.getRight(), pristine.getLeft(), dimension.getUOFluidKey(pristine.getLeft()), false); } private static int hash(@Nullable GT_UO_Fluid fluid) { - if (fluid == null) - return 0; + if (fluid == null) return 0; int result = fluid.Registry.hashCode(); result = 31 * result + fluid.MaxAmount; result = 31 * result + fluid.MinAmount; @@ -222,7 +228,6 @@ public class GT_UndergroundOil { result = 31 * result + fluid.DecreasePerOperationAmount; return result == 0 ? 1 : result; } - } /** @@ -230,8 +235,10 @@ public class GT_UndergroundOil { */ private static final class ChunkData implements GT_ChunkAssociatedData.IData { private final Fluid fluid; + @Nullable private final GT_UO_Fluid vein; + private final String veinKey; private final int veinHash; private int amount; @@ -272,14 +279,12 @@ public class GT_UndergroundOil { } public void setAmount(int amount) { - if (this.amount != amount) - dirty = true; + if (this.amount != amount) dirty = true; this.amount = Math.max(0, amount); } public void changeAmount(int delta) { - if (delta != 0) - dirty = true; + if (delta != 0) dirty = true; this.amount = Math.max(amount + delta, 0); } diff --git a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java index 214661ae67..2a66514fe5 100644 --- a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java +++ b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java @@ -1,23 +1,22 @@ package gregtech.common; +import static gregtech.api.enums.GT_Values.debugOrevein; +import static gregtech.api.enums.GT_Values.oreveinPlacerOres; +import static gregtech.api.enums.GT_Values.oreveinPlacerOresMultiplier; + import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.util.GT_Log; import gregtech.api.world.GT_Worldgen; import gregtech.common.blocks.GT_TileEntity_Ores; +import java.util.ArrayList; +import java.util.Random; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; -import java.util.ArrayList; -import java.util.Random; - -import static gregtech.api.enums.GT_Values.debugOrevein; -import static gregtech.api.enums.GT_Values.oreveinPlacerOres; -import static gregtech.api.enums.GT_Values.oreveinPlacerOresMultiplier; - public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen { public static ArrayList<GT_Worldgen_GT_Ore_Layer> sList = new ArrayList(); public static int sWeight = 0; @@ -30,51 +29,72 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen { public final short mSecondaryMeta; public final short mBetweenMeta; public final short mSporadicMeta; - //public final String mBiome; + // public final String mBiome; public final String mRestrictBiome; public final boolean mOverworld; public final boolean mNether; public final boolean mEnd; public final boolean mEndAsteroid; - public static final int WRONG_BIOME=0; - public static final int WRONG_DIMENSION=1; - public static final int NO_ORE_IN_BOTTOM_LAYER=2; - public static final int NO_OVERLAP=3; - public static final int ORE_PLACED=4; - public static final int NO_OVERLAP_AIR_BLOCK=5; + public static final int WRONG_BIOME = 0; + public static final int WRONG_DIMENSION = 1; + public static final int NO_ORE_IN_BOTTOM_LAYER = 2; + public static final int NO_OVERLAP = 3; + public static final int ORE_PLACED = 4; + public static final int NO_OVERLAP_AIR_BLOCK = 5; public final boolean mMoon = false, mMars = false, mAsteroid = false; public final String aTextWorldgen = "worldgen."; - @Deprecated - public GT_Worldgen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, boolean aOverworld, boolean aNether, boolean aEnd, boolean GC_UNUSED1, boolean GC_UNUSED2, boolean GC_UNUSED3, int aPrimary, int aSecondary, int aBetween, int aSporadic) { + public GT_Worldgen_GT_Ore_Layer( + String aName, + boolean aDefault, + int aMinY, + int aMaxY, + int aWeight, + int aDensity, + int aSize, + boolean aOverworld, + boolean aNether, + boolean aEnd, + boolean GC_UNUSED1, + boolean GC_UNUSED2, + boolean GC_UNUSED3, + int aPrimary, + int aSecondary, + int aBetween, + int aSporadic) { super(aName, sList, aDefault); this.mOverworld = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld); this.mNether = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether); this.mEnd = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "TheEnd", aEnd); this.mEndAsteroid = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "EndAsteroid", aEnd); - //this.mMoon = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Moon", aMoon); - //this.mMars = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Mars", aMars); - //this.mAsteroid = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Asteroid", aAsteroid); + // this.mMoon = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Moon", aMoon); + // this.mMars = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Mars", aMars); + // this.mAsteroid = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Asteroid", aAsteroid); this.mMinY = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MinHeight", aMinY)); short mMaxY = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MaxHeight", aMaxY)); - if (mMaxY < (this.mMinY + 9)) { - GT_Log.out.println( - "Oremix " + this.mWorldGenName + - " has invalid Min/Max heights!" - ); + if (mMaxY < (this.mMinY + 9)) { + GT_Log.out.println("Oremix " + this.mWorldGenName + " has invalid Min/Max heights!"); mMaxY = (short) (this.mMinY + 9); } this.mMaxY = mMaxY; - this.mWeight = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RandomWeight", aWeight)); - this.mDensity = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Density", aDensity)); - this.mSize = ((short) Math.max(1, GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Size", aSize))); - this.mPrimaryMeta = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OrePrimaryLayer", aPrimary)); - this.mSecondaryMeta = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSecondaryLayer", aSecondary)); - this.mBetweenMeta = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSporadiclyInbetween", aBetween)); - this.mSporadicMeta = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSporaticlyAround", aSporadic)); - this.mRestrictBiome = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RestrictToBiomeName", "None"); + this.mWeight = + ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RandomWeight", aWeight)); + this.mDensity = + ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Density", aDensity)); + this.mSize = ((short) + Math.max(1, GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Size", aSize))); + this.mPrimaryMeta = ((short) + GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OrePrimaryLayer", aPrimary)); + this.mSecondaryMeta = ((short) + GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSecondaryLayer", aSecondary)); + this.mBetweenMeta = ((short) + GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSporadiclyInbetween", aBetween)); + this.mSporadicMeta = ((short) + GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSporaticlyAround", aSporadic)); + this.mRestrictBiome = + GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RestrictToBiomeName", "None"); if (this.mEnabled) { sWeight += this.mWeight; @@ -82,11 +102,56 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen { } @Deprecated - public GT_Worldgen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, boolean aOverworld, boolean aNether, boolean aEnd, boolean GC_UNUSED1, boolean GC_UNUSED2, boolean GC_UNUSED3, Materials aPrimary, Materials aSecondary, Materials aBetween, Materials aSporadic) { - this(aName, aDefault, aMinY, aMaxY, aWeight, aDensity, aSize, aOverworld, aNether, aEnd, aPrimary, aSecondary, aBetween, aSporadic); + public GT_Worldgen_GT_Ore_Layer( + String aName, + boolean aDefault, + int aMinY, + int aMaxY, + int aWeight, + int aDensity, + int aSize, + boolean aOverworld, + boolean aNether, + boolean aEnd, + boolean GC_UNUSED1, + boolean GC_UNUSED2, + boolean GC_UNUSED3, + Materials aPrimary, + Materials aSecondary, + Materials aBetween, + Materials aSporadic) { + this( + aName, + aDefault, + aMinY, + aMaxY, + aWeight, + aDensity, + aSize, + aOverworld, + aNether, + aEnd, + aPrimary, + aSecondary, + aBetween, + aSporadic); } - public GT_Worldgen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, boolean aOverworld, boolean aNether, boolean aEnd, Materials aPrimary, Materials aSecondary, Materials aBetween, Materials aSporadic) { + public GT_Worldgen_GT_Ore_Layer( + String aName, + boolean aDefault, + int aMinY, + int aMaxY, + int aWeight, + int aDensity, + int aSize, + boolean aOverworld, + boolean aNether, + boolean aEnd, + Materials aPrimary, + Materials aSecondary, + Materials aBetween, + Materials aSporadic) { super(aName, sList, aDefault); this.mOverworld = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld); this.mNether = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether); @@ -94,38 +159,58 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen { this.mEndAsteroid = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "EndAsteroid", aEnd); this.mMinY = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MinHeight", aMinY)); short mMaxY = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MaxHeight", aMaxY)); - if (mMaxY < (this.mMinY + 9)) { - GT_Log.out.println( - "Oremix " + this.mWorldGenName + - " has invalid Min/Max heights!" - ); + if (mMaxY < (this.mMinY + 9)) { + GT_Log.out.println("Oremix " + this.mWorldGenName + " has invalid Min/Max heights!"); mMaxY = (short) (this.mMinY + 9); } this.mMaxY = mMaxY; - this.mWeight = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RandomWeight", aWeight)); - this.mDensity = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Density", aDensity)); - this.mSize = ((short) Math.max(1, GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Size", aSize))); - this.mPrimaryMeta = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OrePrimaryLayer", aPrimary.mMetaItemSubID)); - this.mSecondaryMeta = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSecondaryLayer", aSecondary.mMetaItemSubID)); - this.mBetweenMeta = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSporadiclyInbetween", aBetween.mMetaItemSubID)); - this.mSporadicMeta = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSporaticlyAround", aSporadic.mMetaItemSubID)); - this.mRestrictBiome = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RestrictToBiomeName", "None"); - + this.mWeight = + ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RandomWeight", aWeight)); + this.mDensity = + ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Density", aDensity)); + this.mSize = ((short) + Math.max(1, GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Size", aSize))); + this.mPrimaryMeta = ((short) GregTech_API.sWorldgenFile.get( + aTextWorldgen + this.mWorldGenName, "OrePrimaryLayer", aPrimary.mMetaItemSubID)); + this.mSecondaryMeta = ((short) GregTech_API.sWorldgenFile.get( + aTextWorldgen + this.mWorldGenName, "OreSecondaryLayer", aSecondary.mMetaItemSubID)); + this.mBetweenMeta = ((short) GregTech_API.sWorldgenFile.get( + aTextWorldgen + this.mWorldGenName, "OreSporadiclyInbetween", aBetween.mMetaItemSubID)); + this.mSporadicMeta = ((short) GregTech_API.sWorldgenFile.get( + aTextWorldgen + this.mWorldGenName, "OreSporaticlyAround", aSporadic.mMetaItemSubID)); + this.mRestrictBiome = + GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RestrictToBiomeName", "None"); + if (this.mEnabled) { sWeight += this.mWeight; } } @Override - public int executeWorldgenChunkified(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, int aSeedX, int aSeedZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { - if( mWorldGenName.equals("NoOresInVein") ) { - if (debugOrevein) GT_Log.out.println( - " NoOresInVein" - ); + public int executeWorldgenChunkified( + World aWorld, + Random aRandom, + String aBiome, + int aDimensionType, + int aChunkX, + int aChunkZ, + int aSeedX, + int aSeedZ, + IChunkProvider aChunkGenerator, + IChunkProvider aChunkProvider) { + if (mWorldGenName.equals("NoOresInVein")) { + if (debugOrevein) GT_Log.out.println(" NoOresInVein"); // This is a special empty orevein return ORE_PLACED; } - if (!isGenerationAllowed(aWorld, aDimensionType, ((aDimensionType == -1) && (this.mNether)) || ((aDimensionType == 0) && (this.mOverworld)) || ((aDimensionType == 1) && (this.mEnd)) ? aDimensionType : aDimensionType ^ 0xFFFFFFFF)) { + if (!isGenerationAllowed( + aWorld, + aDimensionType, + ((aDimensionType == -1) && (this.mNether)) + || ((aDimensionType == 0) && (this.mOverworld)) + || ((aDimensionType == 1) && (this.mEnd)) + ? aDimensionType + : aDimensionType ^ 0xFFFFFFFF)) { /* // Debug code, but spams log if (debugOrevein) { GT_Log.out.println( @@ -136,34 +221,34 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen { return WRONG_DIMENSION; } /*if (!((aWorld.provider.getDimensionName().equalsIgnoreCase("Overworld")) || (aWorld.provider.getDimensionName().equalsIgnoreCase("Nether"))||(aWorld.provider.getDimensionName().equalsIgnoreCase("Underdark"))||(aWorld.provider.getDimensionName().equalsIgnoreCase("Twilight Forest"))||(aWorld.provider.getDimensionName().equalsIgnoreCase("Underdark"))||(aWorld.provider.getDimensionName().equalsIgnoreCase("The End")))) - return WRONG_DIMENSION;*/ - + return WRONG_DIMENSION;*/ + if (!this.mRestrictBiome.equals("None") && !(this.mRestrictBiome.equals(aBiome))) { return WRONG_BIOME; } // For optimal performance, this should be done upstream. Meh String tDimensionName = aWorld.provider.getDimensionName(); boolean isUnderdark = tDimensionName.equals("Underdark"); - - int[] placeCount=new int[4]; + + int[] placeCount = new int[4]; int tMinY = mMinY + aRandom.nextInt(mMaxY - mMinY - 5); // Determine West/East ends of orevein - int wXVein = aSeedX - aRandom.nextInt(mSize); // West side + int wXVein = aSeedX - aRandom.nextInt(mSize); // West side int eXVein = aSeedX + 16 + aRandom.nextInt(mSize); // Limit Orevein to only blocks present in current chunk - int wX = Math.max( wXVein, aChunkX + 2); // Bias placement by 2 blocks to prevent worldgen cascade. - int eX = Math.min( eXVein, aChunkX + 2 + 16); + int wX = Math.max(wXVein, aChunkX + 2); // Bias placement by 2 blocks to prevent worldgen cascade. + int eX = Math.min(eXVein, aChunkX + 2 + 16); // Get a block at the center of the chunk and the bottom of the orevein. Block tBlock = aWorld.getBlock(aChunkX + 7, tMinY, aChunkZ + 9); - if (wX >= eX) { //No overlap between orevein and this chunk exists in X - if (tBlock.isReplaceableOreGen(aWorld, aChunkX+7, tMinY, aChunkZ + 9, Blocks.stone) || - tBlock.isReplaceableOreGen(aWorld, aChunkX+7, tMinY, aChunkZ + 9, Blocks.netherrack) || - tBlock.isReplaceableOreGen(aWorld, aChunkX+7, tMinY, aChunkZ + 9, Blocks.end_stone) || - tBlock.isReplaceableOreGen(aWorld, aChunkX+7, tMinY, aChunkZ + 9, GregTech_API.sBlockGranites) || - tBlock.isReplaceableOreGen(aWorld, aChunkX+7, tMinY, aChunkZ + 9, GregTech_API.sBlockStones) ) { + if (wX >= eX) { // No overlap between orevein and this chunk exists in X + if (tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, Blocks.stone) + || tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, Blocks.netherrack) + || tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, Blocks.end_stone) + || tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, GregTech_API.sBlockGranites) + || tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, GregTech_API.sBlockStones)) { // Didn't reach, but could have placed. Save orevein for future use. return NO_OVERLAP; } else { @@ -174,15 +259,15 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen { // Determine North/Sound ends of orevein int nZVein = aSeedZ - aRandom.nextInt(mSize); int sZVein = aSeedZ + 16 + aRandom.nextInt(mSize); - - int nZ = Math.max(nZVein, aChunkZ + 2); // Bias placement by 2 blocks to prevent worldgen cascade. + + int nZ = Math.max(nZVein, aChunkZ + 2); // Bias placement by 2 blocks to prevent worldgen cascade. int sZ = Math.min(sZVein, aChunkZ + 2 + 16); - if (nZ >= sZ) { //No overlap between orevein and this chunk exists in Z - if (tBlock.isReplaceableOreGen(aWorld, aChunkX+7, tMinY, aChunkZ + 9, Blocks.stone) || - tBlock.isReplaceableOreGen(aWorld, aChunkX+7, tMinY, aChunkZ + 9, Blocks.netherrack) || - tBlock.isReplaceableOreGen(aWorld, aChunkX+7, tMinY, aChunkZ + 9, Blocks.end_stone) || - tBlock.isReplaceableOreGen(aWorld, aChunkX+7, tMinY, aChunkZ + 9, GregTech_API.sBlockGranites) || - tBlock.isReplaceableOreGen(aWorld, aChunkX+7, tMinY, aChunkZ + 9, GregTech_API.sBlockStones) ) { + if (nZ >= sZ) { // No overlap between orevein and this chunk exists in Z + if (tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, Blocks.stone) + || tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, Blocks.netherrack) + || tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, Blocks.end_stone) + || tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, GregTech_API.sBlockGranites) + || tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, GregTech_API.sBlockStones)) { // Didn't reach, but could have placed. Save orevein for future use. return NO_OVERLAP; } else { @@ -192,214 +277,256 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen { } if (debugOrevein) { - GT_Log.out.print( - "Trying Orevein:" + this.mWorldGenName + - " Dimension=" + tDimensionName + - " mX="+aChunkX/16+ - " mZ="+aChunkZ/16+ - " oreseedX="+ aSeedX/16 + - " oreseedZ="+ aSeedZ/16 + - " cY="+tMinY - ); + GT_Log.out.print("Trying Orevein:" + this.mWorldGenName + " Dimension=" + + tDimensionName + " mX=" + + aChunkX / 16 + " mZ=" + + aChunkZ / 16 + " oreseedX=" + + aSeedX / 16 + " oreseedZ=" + + aSeedZ / 16 + " cY=" + + tMinY); } - // Adjust the density down the more chunks we are away from the oreseed. The 5 chunks surrounding the seed should always be max density due to truncation of Math.sqrt(). - int localDensity = Math.max(1, this.mDensity / ((int)Math.sqrt(2 + Math.pow(aChunkX/16 - aSeedX/16, 2) + Math.pow(aChunkZ/16 - aSeedZ/16, 2))) ); + // Adjust the density down the more chunks we are away from the oreseed. The 5 chunks surrounding the seed + // should always be max density due to truncation of Math.sqrt(). + int localDensity = Math.max( + 1, + this.mDensity + / ((int) Math.sqrt(2 + + Math.pow(aChunkX / 16 - aSeedX / 16, 2) + + Math.pow(aChunkZ / 16 - aSeedZ / 16, 2)))); - // To allow for early exit due to no ore placed in the bottom layer (probably because we are in the sky), unroll 1 pass through the loop + // To allow for early exit due to no ore placed in the bottom layer (probably because we are in the sky), unroll + // 1 pass through the loop // Now we do bottom-level-first oregen, and work our way upwards. // Layer -1 Secondary and Sporadic - int level = tMinY - 1; //Dunno why, but the first layer is actually played one below tMinY. Go figure. - for (int tX = wX; tX < eX; tX++) { - int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); - for (int tZ = nZ; tZ < sZ; tZ++) { - int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); - if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSecondaryMeta > 0) ) { - if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSecondaryMeta, false, isUnderdark)) { - placeCount[1]++; - } - } - else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta > 0) ) { // Sporadics are reduce by 1/7 to compensate - if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark)) - placeCount[3]++; + int level = tMinY - 1; // Dunno why, but the first layer is actually played one below tMinY. Go figure. + for (int tX = wX; tX < eX; tX++) { + int placeX = Math.max( + 1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX)) / localDensity); + for (int tZ = nZ; tZ < sZ; tZ++) { + int placeZ = Math.max( + 1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ)) / localDensity); + if (((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSecondaryMeta > 0)) { + if (GT_TileEntity_Ores.setOreBlock( + aWorld, tX, level, tZ, this.mSecondaryMeta, false, isUnderdark)) { + placeCount[1]++; } + } else if ((aRandom.nextInt(7) == 0) + && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) + && (this.mSporadicMeta > 0)) { // Sporadics are reduce by 1/7 to compensate + if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark)) + placeCount[3]++; } } - if ((placeCount[1]+placeCount[3])==0) { - if (debugOrevein) GT_Log.out.println( - " No ore in bottom layer" - ); - return NO_ORE_IN_BOTTOM_LAYER; // Exit early, didn't place anything in the bottom layer + } + if ((placeCount[1] + placeCount[3]) == 0) { + if (debugOrevein) GT_Log.out.println(" No ore in bottom layer"); + return NO_ORE_IN_BOTTOM_LAYER; // Exit early, didn't place anything in the bottom layer } // Layers 0 & 1 Secondary and Sporadic - for (level = tMinY; level < (tMinY+2); level++) { + for (level = tMinY; level < (tMinY + 2); level++) { for (int tX = wX; tX < eX; tX++) { - int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); + int placeX = Math.max( + 1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX)) / localDensity); for (int tZ = nZ; tZ < sZ; tZ++) { - int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); - if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSecondaryMeta > 0) ) { - if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSecondaryMeta, false, isUnderdark)) { + int placeZ = Math.max( + 1, + Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ)) / localDensity); + if (((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) + && (this.mSecondaryMeta > 0)) { + if (GT_TileEntity_Ores.setOreBlock( + aWorld, tX, level, tZ, this.mSecondaryMeta, false, isUnderdark)) { placeCount[1]++; } - } - else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta > 0) ) { // Sporadics are reduce by 1/7 to compensate - if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark)) - placeCount[3]++; + } else if ((aRandom.nextInt(7) == 0) + && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) + && (this.mSporadicMeta > 0)) { // Sporadics are reduce by 1/7 to compensate + if (GT_TileEntity_Ores.setOreBlock( + aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark)) placeCount[3]++; } } } } // Layer 2 is Secondary, in-between, and sporadic - for (int tX = wX; tX < eX; tX++) { - int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); - for (int tZ = nZ; tZ < sZ; tZ++) { - int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); - if ((aRandom.nextInt(2) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mBetweenMeta > 0) ) { // Between are reduce by 1/2 to compensate - if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mBetweenMeta, false, isUnderdark)) { - placeCount[2]++; - } - } - else if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSecondaryMeta > 0) ) { - if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSecondaryMeta, false, isUnderdark)) { - placeCount[1]++; - } + for (int tX = wX; tX < eX; tX++) { + int placeX = Math.max( + 1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX)) / localDensity); + for (int tZ = nZ; tZ < sZ; tZ++) { + int placeZ = Math.max( + 1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ)) / localDensity); + if ((aRandom.nextInt(2) == 0) + && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) + && (this.mBetweenMeta > 0)) { // Between are reduce by 1/2 to compensate + if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mBetweenMeta, false, isUnderdark)) { + placeCount[2]++; } - else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta > 0) ) { // Sporadics are reduce by 1/7 to compensate - if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark)) - placeCount[3]++; + } else if (((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) + && (this.mSecondaryMeta > 0)) { + if (GT_TileEntity_Ores.setOreBlock( + aWorld, tX, level, tZ, this.mSecondaryMeta, false, isUnderdark)) { + placeCount[1]++; } + } else if ((aRandom.nextInt(7) == 0) + && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) + && (this.mSporadicMeta > 0)) { // Sporadics are reduce by 1/7 to compensate + if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark)) + placeCount[3]++; } } + } level++; // Increment level to next layer // Layer 3 is In-between, and sporadic - for (int tX = wX; tX < eX; tX++) { - int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); - for (int tZ = nZ; tZ < sZ; tZ++) { - int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); - if ((aRandom.nextInt(2) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mBetweenMeta > 0) ) { // Between are reduce by 1/2 to compensate - if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mBetweenMeta, false, isUnderdark)) { - placeCount[2]++; - } - } - else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta > 0) ) { // Sporadics are reduce by 1/7 to compensate - if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark)) - placeCount[3]++; + for (int tX = wX; tX < eX; tX++) { + int placeX = Math.max( + 1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX)) / localDensity); + for (int tZ = nZ; tZ < sZ; tZ++) { + int placeZ = Math.max( + 1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ)) / localDensity); + if ((aRandom.nextInt(2) == 0) + && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) + && (this.mBetweenMeta > 0)) { // Between are reduce by 1/2 to compensate + if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mBetweenMeta, false, isUnderdark)) { + placeCount[2]++; } + } else if ((aRandom.nextInt(7) == 0) + && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) + && (this.mSporadicMeta > 0)) { // Sporadics are reduce by 1/7 to compensate + if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark)) + placeCount[3]++; } } + } level++; // Increment level to next layer // Layer 4 is In-between, Primary and sporadic - for (int tX = wX; tX < eX; tX++) { - int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); - for (int tZ = nZ; tZ < sZ; tZ++) { - int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); - if ((aRandom.nextInt(2) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mBetweenMeta > 0) ) { // Between are reduce by 1/2 to compensate - if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mBetweenMeta, false, isUnderdark)) { - placeCount[2]++; - } - } - else if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mPrimaryMeta > 0) ) { - if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mPrimaryMeta, false, isUnderdark)) { - placeCount[1]++; - } + for (int tX = wX; tX < eX; tX++) { + int placeX = Math.max( + 1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX)) / localDensity); + for (int tZ = nZ; tZ < sZ; tZ++) { + int placeZ = Math.max( + 1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ)) / localDensity); + if ((aRandom.nextInt(2) == 0) + && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) + && (this.mBetweenMeta > 0)) { // Between are reduce by 1/2 to compensate + if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mBetweenMeta, false, isUnderdark)) { + placeCount[2]++; } - else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta > 0) ) { // Sporadics are reduce by 1/7 to compensate - if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark)) - placeCount[3]++; + } else if (((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) + && (this.mPrimaryMeta > 0)) { + if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mPrimaryMeta, false, isUnderdark)) { + placeCount[1]++; } + } else if ((aRandom.nextInt(7) == 0) + && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) + && (this.mSporadicMeta > 0)) { // Sporadics are reduce by 1/7 to compensate + if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark)) + placeCount[3]++; } } + } level++; // Increment level to next layer // Layer 5 is In-between, Primary and sporadic - for (int tX = wX; tX < eX; tX++) { - int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); - for (int tZ = nZ; tZ < sZ; tZ++) { - int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); - if ((aRandom.nextInt(2) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mBetweenMeta > 0) ) { // Between are reduce by 1/2 to compensate - if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mBetweenMeta, false, isUnderdark)) { - placeCount[2]++; - } + for (int tX = wX; tX < eX; tX++) { + int placeX = Math.max( + 1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX)) / localDensity); + for (int tZ = nZ; tZ < sZ; tZ++) { + int placeZ = Math.max( + 1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ)) / localDensity); + if ((aRandom.nextInt(2) == 0) + && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) + && (this.mBetweenMeta > 0)) { // Between are reduce by 1/2 to compensate + if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mBetweenMeta, false, isUnderdark)) { + placeCount[2]++; } - else if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mPrimaryMeta > 0) ) { - if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mPrimaryMeta, false, isUnderdark)) { - placeCount[1]++; - } - } - else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta > 0) ) { // Sporadics are reduce by 1/7 to compensate - if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark)) - placeCount[3]++; + } else if (((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) + && (this.mPrimaryMeta > 0)) { + if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mPrimaryMeta, false, isUnderdark)) { + placeCount[1]++; } + } else if ((aRandom.nextInt(7) == 0) + && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) + && (this.mSporadicMeta > 0)) { // Sporadics are reduce by 1/7 to compensate + if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark)) + placeCount[3]++; } } + } level++; // Increment level to next layer // Layer 6 is Primary and sporadic - for (int tX = wX; tX < eX; tX++) { - int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); - for (int tZ = nZ; tZ < sZ; tZ++) { - int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); - if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mPrimaryMeta > 0) ) { - if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mPrimaryMeta, false, isUnderdark)) { - placeCount[1]++; - } - } - else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta > 0) ) { // Sporadics are reduce by 1/7 to compensate - if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark)) - placeCount[3]++; + for (int tX = wX; tX < eX; tX++) { + int placeX = Math.max( + 1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX)) / localDensity); + for (int tZ = nZ; tZ < sZ; tZ++) { + int placeZ = Math.max( + 1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ)) / localDensity); + if (((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mPrimaryMeta > 0)) { + if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mPrimaryMeta, false, isUnderdark)) { + placeCount[1]++; } + } else if ((aRandom.nextInt(7) == 0) + && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) + && (this.mSporadicMeta > 0)) { // Sporadics are reduce by 1/7 to compensate + if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark)) + placeCount[3]++; } } + } level++; // Increment level to next layer // Layer 7 is Primary and sporadic - for (int tX = wX; tX < eX; tX++) { - int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); - for (int tZ = nZ; tZ < sZ; tZ++) { - int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); - if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mPrimaryMeta > 0) ) { - if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mPrimaryMeta, false, isUnderdark)) { - placeCount[1]++; - } - } - else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta > 0) ) { // Sporadics are reduce by 1/7 to compensate - if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark)) - placeCount[3]++; + for (int tX = wX; tX < eX; tX++) { + int placeX = Math.max( + 1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX)) / localDensity); + for (int tZ = nZ; tZ < sZ; tZ++) { + int placeZ = Math.max( + 1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ)) / localDensity); + if (((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mPrimaryMeta > 0)) { + if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mPrimaryMeta, false, isUnderdark)) { + placeCount[1]++; } + } else if ((aRandom.nextInt(7) == 0) + && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) + && (this.mSporadicMeta > 0)) { // Sporadics are reduce by 1/7 to compensate + if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark)) + placeCount[3]++; } } - //Place small ores for the vein - if( oreveinPlacerOres ) { - int nSmallOres = (eX-wX)*(sZ-nZ)*this.mDensity/10 * oreveinPlacerOresMultiplier; - //Small ores are placed in the whole chunk in which the vein appears. - for( int nSmallOresCount = 0; nSmallOresCount < nSmallOres; nSmallOresCount++) { + } + // Place small ores for the vein + if (oreveinPlacerOres) { + int nSmallOres = (eX - wX) * (sZ - nZ) * this.mDensity / 10 * oreveinPlacerOresMultiplier; + // Small ores are placed in the whole chunk in which the vein appears. + for (int nSmallOresCount = 0; nSmallOresCount < nSmallOres; nSmallOresCount++) { int tX = aRandom.nextInt(16) + aChunkX + 2; int tZ = aRandom.nextInt(16) + aChunkZ + 2; int tY = aRandom.nextInt(160) + 10; // Y height can vary from 10 to 170 for small ores. - if (this.mPrimaryMeta > 0 ) GT_TileEntity_Ores.setOreBlock(aWorld, tX, tY, tZ, this.mPrimaryMeta, true, isUnderdark); + if (this.mPrimaryMeta > 0) + GT_TileEntity_Ores.setOreBlock(aWorld, tX, tY, tZ, this.mPrimaryMeta, true, isUnderdark); tX = aRandom.nextInt(16) + aChunkX + 2; tZ = aRandom.nextInt(16) + aChunkZ + 2; tY = aRandom.nextInt(160) + 10; // Y height can vary from 10 to 170 for small ores. - if (this.mSecondaryMeta > 0 ) GT_TileEntity_Ores.setOreBlock(aWorld, tX, tY, tZ, this.mSecondaryMeta, true, isUnderdark); + if (this.mSecondaryMeta > 0) + GT_TileEntity_Ores.setOreBlock(aWorld, tX, tY, tZ, this.mSecondaryMeta, true, isUnderdark); tX = aRandom.nextInt(16) + aChunkX + 2; tZ = aRandom.nextInt(16) + aChunkZ + 2; tY = aRandom.nextInt(160) + 10; // Y height can vary from 10 to 170 for small ores. - if (this.mBetweenMeta > 0 ) GT_TileEntity_Ores.setOreBlock(aWorld, tX, tY, tZ, this.mBetweenMeta, true, isUnderdark); + if (this.mBetweenMeta > 0) + GT_TileEntity_Ores.setOreBlock(aWorld, tX, tY, tZ, this.mBetweenMeta, true, isUnderdark); tX = aRandom.nextInt(16) + aChunkX + 2; tZ = aRandom.nextInt(16) + aChunkZ + 2; tY = aRandom.nextInt(190) + 10; // Y height can vary from 10 to 200 for small ores. - if (this.mSporadicMeta > 0 ) GT_TileEntity_Ores.setOreBlock(aWorld, tX, tY, tZ, this.mSporadicMeta, true, isUnderdark); + if (this.mSporadicMeta > 0) + GT_TileEntity_Ores.setOreBlock(aWorld, tX, tY, tZ, this.mSporadicMeta, true, isUnderdark); } } if (debugOrevein) { - GT_Log.out.println( - " wXVein" + wXVein + - " eXVein" + eXVein + - " nZVein" + nZVein + - " sZVein" + sZVein + - " locDen=" + localDensity + - " Den=" + this.mDensity + - " Sec="+placeCount[1]+ - " Spo="+placeCount[3]+ - " Bet="+placeCount[2]+ - " Pri="+placeCount[0] - ); + GT_Log.out.println(" wXVein" + wXVein + " eXVein" + + eXVein + " nZVein" + + nZVein + " sZVein" + + sZVein + " locDen=" + + localDensity + " Den=" + + this.mDensity + " Sec=" + + placeCount[1] + " Spo=" + + placeCount[3] + " Bet=" + + placeCount[2] + " Pri=" + + placeCount[0]); } // Something (at least the bottom layer must have 1 block) must have been placed, return true return ORE_PLACED; diff --git a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java index 2e17873980..55bd77f474 100644 --- a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java +++ b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java @@ -1,20 +1,18 @@ package gregtech.common; +import static gregtech.api.enums.GT_Values.debugSmallOres; + import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.util.GT_Log; import gregtech.api.world.GT_Worldgen; import gregtech.common.blocks.GT_TileEntity_Ores; -import net.minecraft.world.World; -import net.minecraft.world.chunk.IChunkProvider; - import java.util.ArrayList; import java.util.Random; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; -import static gregtech.api.enums.GT_Values.debugSmallOres; - -public class GT_Worldgen_GT_Ore_SmallPieces - extends GT_Worldgen { +public class GT_Worldgen_GT_Ore_SmallPieces extends GT_Worldgen { public final short mMinY; public final short mMaxY; public final short mAmount; @@ -26,63 +24,111 @@ public class GT_Worldgen_GT_Ore_SmallPieces public final String mBiome; public final String aTextWorldgen = "worldgen."; public static ArrayList<GT_Worldgen_GT_Ore_SmallPieces> sList = new ArrayList<GT_Worldgen_GT_Ore_SmallPieces>(); - - //TODO CHECK IF INSTANTIATION IS CORRECT - public GT_Worldgen_GT_Ore_SmallPieces(String aName, boolean aDefault, int aMinY, int aMaxY, int aAmount, boolean aOverworld, boolean aNether, boolean aEnd, Materials aPrimary) { + + // TODO CHECK IF INSTANTIATION IS CORRECT + public GT_Worldgen_GT_Ore_SmallPieces( + String aName, + boolean aDefault, + int aMinY, + int aMaxY, + int aAmount, + boolean aOverworld, + boolean aNether, + boolean aEnd, + Materials aPrimary) { super(aName, GregTech_API.sWorldgenList, aDefault); this.mOverworld = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld); this.mNether = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether); this.mEnd = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "TheEnd", aEnd); this.mMinY = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MinHeight", aMinY)); - this.mMaxY = ((short) Math.max(this.mMinY + 1, GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MaxHeight", aMaxY))); - this.mAmount = ((short) Math.max(1, GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Amount", aAmount))); - this.mMeta = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Ore", aPrimary.mMetaItemSubID)); + this.mMaxY = ((short) Math.max( + this.mMinY + 1, + GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MaxHeight", aMaxY))); + this.mAmount = ((short) + Math.max(1, GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Amount", aAmount))); + this.mMeta = ((short) + GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Ore", aPrimary.mMetaItemSubID)); this.mBiome = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "BiomeName", "None"); sList.add(this); } - - public GT_Worldgen_GT_Ore_SmallPieces(String aName, boolean aDefault, int aMinY, int aMaxY, int aAmount, boolean aOverworld, boolean aNether, boolean aEnd, boolean GC_UNUSED1, boolean GC_UNUSED2, boolean GC_UNUSED3, Materials aPrimary) { - super(aName, GregTech_API.sWorldgenList, aDefault); - this.mOverworld = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld); - this.mNether = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether); - this.mEnd = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "TheEnd", aEnd); - this.mMinY = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MinHeight", aMinY)); - this.mMaxY = ((short) Math.max(this.mMinY + 1, GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MaxHeight", aMaxY))); - this.mAmount = ((short) Math.max(1, GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Amount", aAmount))); - this.mMeta = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Ore", aPrimary.mMetaItemSubID)); - this.mBiome = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "BiomeName", "None"); - sList.add(this); + + public GT_Worldgen_GT_Ore_SmallPieces( + String aName, + boolean aDefault, + int aMinY, + int aMaxY, + int aAmount, + boolean aOverworld, + boolean aNether, + boolean aEnd, + boolean GC_UNUSED1, + boolean GC_UNUSED2, + boolean GC_UNUSED3, + Materials aPrimary) { + super(aName, GregTech_API.sWorldgenList, aDefault); + this.mOverworld = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld); + this.mNether = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether); + this.mEnd = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "TheEnd", aEnd); + this.mMinY = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MinHeight", aMinY)); + this.mMaxY = ((short) Math.max( + this.mMinY + 1, + GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MaxHeight", aMaxY))); + this.mAmount = ((short) + Math.max(1, GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Amount", aAmount))); + this.mMeta = ((short) + GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Ore", aPrimary.mMetaItemSubID)); + this.mBiome = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "BiomeName", "None"); + sList.add(this); } - - @Override - public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { + @Override + public boolean executeWorldgen( + World aWorld, + Random aRandom, + String aBiome, + int aDimensionType, + int aChunkX, + int aChunkZ, + IChunkProvider aChunkGenerator, + IChunkProvider aChunkProvider) { if (!this.mBiome.equals("None") && !(this.mBiome.equals(aBiome))) { - return false; //Not the correct biome for ore mix + return false; // Not the correct biome for ore mix } - if (!isGenerationAllowed(aWorld, aDimensionType, ((aDimensionType == -1) && (this.mNether)) || ((aDimensionType == 0) && (this.mOverworld)) || ((aDimensionType == 1) && (this.mEnd)) ? aDimensionType : aDimensionType ^ 0xFFFFFFFF)) { + if (!isGenerationAllowed( + aWorld, + aDimensionType, + ((aDimensionType == -1) && (this.mNether)) + || ((aDimensionType == 0) && (this.mOverworld)) + || ((aDimensionType == 1) && (this.mEnd)) + ? aDimensionType + : aDimensionType ^ 0xFFFFFFFF)) { return false; } - int count=0; + int count = 0; // For optimal performance, this should be done upstream. Meh String tDimensionName = aWorld.provider.getDimensionName(); boolean isUnderdark = tDimensionName.equals("Underdark"); if (this.mMeta > 0) { int j = Math.max(1, this.mAmount / 2 + aRandom.nextInt(this.mAmount) / 2); - for ( int i = 0; i < j; i++) { - GT_TileEntity_Ores.setOreBlock(aWorld, aChunkX + 8 + aRandom.nextInt(16), this.mMinY + aRandom.nextInt(Math.max(1, this.mMaxY - this.mMinY)), aChunkZ + 8 + aRandom.nextInt(16), this.mMeta, true, isUnderdark); + for (int i = 0; i < j; i++) { + GT_TileEntity_Ores.setOreBlock( + aWorld, + aChunkX + 8 + aRandom.nextInt(16), + this.mMinY + aRandom.nextInt(Math.max(1, this.mMaxY - this.mMinY)), + aChunkZ + 8 + aRandom.nextInt(16), + this.mMeta, + true, + isUnderdark); count++; } } - if(debugSmallOres){ - GT_Log.out.println( - "Small Ore:" + this.mWorldGenName + - " @ dim="+aDimensionType+ - " mX="+aChunkX/16+ - " mZ="+aChunkZ/16+ - " ore="+count - ); + if (debugSmallOres) { + GT_Log.out.println("Small Ore:" + this.mWorldGenName + " @ dim=" + + aDimensionType + " mX=" + + aChunkX / 16 + " mZ=" + + aChunkZ / 16 + " ore=" + + count); } return true; } diff --git a/src/main/java/gregtech/common/GT_Worldgen_Stone.java b/src/main/java/gregtech/common/GT_Worldgen_Stone.java index d4992c3c16..5ea16eae89 100644 --- a/src/main/java/gregtech/common/GT_Worldgen_Stone.java +++ b/src/main/java/gregtech/common/GT_Worldgen_Stone.java @@ -1,91 +1,133 @@ package gregtech.common; +import static gregtech.api.enums.GT_Values.debugStones; + import gregtech.api.GregTech_API; import gregtech.api.objects.XSTR; import gregtech.api.util.GT_Log; import gregtech.api.world.GT_Worldgen_Ore; import gregtech.common.blocks.GT_Block_Ores_Abstract; import gregtech.common.blocks.GT_TileEntity_Ores; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Hashtable; +import java.util.Random; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Hashtable; -import java.util.Random; - -import static gregtech.api.enums.GT_Values.debugStones; - public class GT_Worldgen_Stone extends GT_Worldgen_Ore { - static final double sizeConversion[] = { 1, 1, 1.333333, 1.333333, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }; // Bias the sizes towards skinnier boulders, ie more "shafts" than dikes or sills. + static final double sizeConversion[] = {1, 1, 1.333333, 1.333333, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 + }; // Bias the sizes towards skinnier boulders, ie more "shafts" than dikes or sills. public Hashtable<Long, StoneSeeds> validStoneSeeds = new Hashtable(1024); class StoneSeeds { public boolean mExists; - StoneSeeds( boolean exists ) { + StoneSeeds(boolean exists) { mExists = exists; } - }; + } + ; class ValidSeeds { public int mX; public int mZ; - ValidSeeds( int x, int z) { + + ValidSeeds(int x, int z) { this.mX = x; this.mZ = z; } - }; - public GT_Worldgen_Stone(String aName, boolean aDefault, Block aBlock, int aBlockMeta, int aDimensionType, int aAmount, int aSize, int aProbability, int aMinY, int aMaxY, Collection<String> aBiomeList, boolean aAllowToGenerateinVoid) { - super(aName, aDefault, aBlock, aBlockMeta, aDimensionType, aAmount, aSize, aProbability, aMinY, aMaxY, aBiomeList, aAllowToGenerateinVoid); + } + ; + + public GT_Worldgen_Stone( + String aName, + boolean aDefault, + Block aBlock, + int aBlockMeta, + int aDimensionType, + int aAmount, + int aSize, + int aProbability, + int aMinY, + int aMaxY, + Collection<String> aBiomeList, + boolean aAllowToGenerateinVoid) { + super( + aName, + aDefault, + aBlock, + aBlockMeta, + aDimensionType, + aAmount, + aSize, + aProbability, + aMinY, + aMaxY, + aBiomeList, + aAllowToGenerateinVoid); } @Override - public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { + public boolean executeWorldgen( + World aWorld, + Random aRandom, + String aBiome, + int aDimensionType, + int aChunkX, + int aChunkZ, + IChunkProvider aChunkGenerator, + IChunkProvider aChunkProvider) { XSTR stoneRNG = new XSTR(); ArrayList<ValidSeeds> stones = new ArrayList(); - - if ( !isGenerationAllowed(aWorld, aDimensionType, this.mDimensionType)) { + + if (!isGenerationAllowed(aWorld, aDimensionType, this.mDimensionType)) { return false; } - if ( !(this.mBiomeList.isEmpty() || this.mBiomeList.contains(aBiome)) ) { + if (!(this.mBiomeList.isEmpty() || this.mBiomeList.contains(aBiome))) { return false; } - // I think the real size of the balls is mSize/8, but the original code was difficult to understand. - // Overall there will be less GT stones since they aren't spheres any more. /16 since this code uses it as a radius. - double realSize = mSize/16; - int windowWidth = ((int)realSize)/16 + 1; // Width of chunks to check for a potential stoneseed + // I think the real size of the balls is mSize/8, but the original code was difficult to understand. + // Overall there will be less GT stones since they aren't spheres any more. /16 since this code uses it as a + // radius. + double realSize = mSize / 16; + int windowWidth = ((int) realSize) / 16 + 1; // Width of chunks to check for a potential stoneseed // Check stone seeds to see if they have been added - for( int x = aChunkX/16 - windowWidth; x < (aChunkX/16 + windowWidth + 1); x++ ) { - for( int z = aChunkZ/16 - windowWidth; z < (aChunkZ/16 + windowWidth + 1); z++ ) { - long hash = ((long)((aWorld.provider.dimensionId & 0xffL)<<56) |( ((long)x & 0x000000000fffffffL) << 28) | ( (long)z & 0x000000000fffffffL )); - if( !validStoneSeeds.containsKey(hash) ) { + for (int x = aChunkX / 16 - windowWidth; x < (aChunkX / 16 + windowWidth + 1); x++) { + for (int z = aChunkZ / 16 - windowWidth; z < (aChunkZ / 16 + windowWidth + 1); z++) { + long hash = ((long) ((aWorld.provider.dimensionId & 0xffL) << 56) + | (((long) x & 0x000000000fffffffL) << 28) + | ((long) z & 0x000000000fffffffL)); + if (!validStoneSeeds.containsKey(hash)) { // Determine if RNG says to add stone at this chunk - stoneRNG.setSeed((long)aWorld.getSeed() ^ hash + Math.abs(mBlockMeta) + Math.abs(mSize) + ((GregTech_API.sBlockGranites==mBlock)?(32768):(0))); //Don't judge me. Want different values for different block types - if ( (this.mProbability <= 1) || (stoneRNG.nextInt(this.mProbability) == 0) ) { + stoneRNG.setSeed((long) aWorld.getSeed() + ^ hash + + Math.abs(mBlockMeta) + + Math.abs(mSize) + + ((GregTech_API.sBlockGranites == mBlock) + ? (32768) + : (0))); // Don't judge me. Want different values for different block types + if ((this.mProbability <= 1) || (stoneRNG.nextInt(this.mProbability) == 0)) { // Add stone at this chunk - validStoneSeeds.put( hash, new StoneSeeds(true) ); + validStoneSeeds.put(hash, new StoneSeeds(true)); // Add to generation list - stones.add( new ValidSeeds(x,z) ); - if (debugStones) GT_Log.out.println( - "New stoneseed="+mWorldGenName+ - " x="+x+ - " z="+z+ - " realSize="+realSize - ); + stones.add(new ValidSeeds(x, z)); + if (debugStones) + GT_Log.out.println( + "New stoneseed=" + mWorldGenName + " x=" + x + " z=" + z + " realSize=" + realSize); } else { - validStoneSeeds.put( hash, new StoneSeeds(false) ); + validStoneSeeds.put(hash, new StoneSeeds(false)); } } else { // This chunk has already been checked, check to see if a boulder exists here - if( validStoneSeeds.get(hash).mExists ) { + if (validStoneSeeds.get(hash).mExists) { // Add to generation list - stones.add( new ValidSeeds(x,z) ); + stones.add(new ValidSeeds(x, z)); } } } @@ -96,101 +138,115 @@ public class GT_Worldgen_Stone extends GT_Worldgen_Ore { result = false; } // Now process each oreseed vs this requested chunk - for( ; stones.size() != 0; stones.remove(0) ) { - int x = stones.get(0).mX*16; - int z = stones.get(0).mZ*16; - - stoneRNG.setSeed((long)aWorld.getSeed() ^ ((long)((aWorld.provider.dimensionId & 0xffL)<<56) |( ((long)x & 0x000000000fffffffL)<< 28) | ( (long)z & 0x000000000fffffffL )) + Math.abs(mBlockMeta) + Math.abs(mSize) + ((GregTech_API.sBlockGranites==mBlock)?(32768):(0))); //Don't judge me - for (int i = 0; i < this.mAmount; i++) { // Not sure why you would want more than one in a chunk! Left alone though. - // Locate the stoneseed XYZ. Original code would request an isAir at the seed location, causing a chunk generation request. - // To reduce potential worldgen cascade, we just always try to place a ball and use the check inside the for loop to prevent + for (; stones.size() != 0; stones.remove(0)) { + int x = stones.get(0).mX * 16; + int z = stones.get(0).mZ * 16; + + stoneRNG.setSeed((long) aWorld.getSeed() + ^ ((long) ((aWorld.provider.dimensionId & 0xffL) << 56) + | (((long) x & 0x000000000fffffffL) << 28) + | ((long) z & 0x000000000fffffffL)) + + Math.abs(mBlockMeta) + + Math.abs(mSize) + + ((GregTech_API.sBlockGranites == mBlock) ? (32768) : (0))); // Don't judge me + for (int i = 0; + i < this.mAmount; + i++) { // Not sure why you would want more than one in a chunk! Left alone though. + // Locate the stoneseed XYZ. Original code would request an isAir at the seed location, causing a chunk + // generation request. + // To reduce potential worldgen cascade, we just always try to place a ball and use the check inside the + // for loop to prevent // placement instead. int tX = x + stoneRNG.nextInt(16); int tY = mMinY + stoneRNG.nextInt(mMaxY - mMinY); int tZ = z + stoneRNG.nextInt(16); - //Determine the XYZ sizes of the stoneseed + // Determine the XYZ sizes of the stoneseed double xSize = sizeConversion[stoneRNG.nextInt(sizeConversion.length)]; - double ySize = sizeConversion[stoneRNG.nextInt(sizeConversion.length)/2]; // Skew the ySize towards the larger sizes, more long skinny pipes + double ySize = sizeConversion[ + stoneRNG.nextInt(sizeConversion.length) + / 2]; // Skew the ySize towards the larger sizes, more long skinny pipes double zSize = sizeConversion[stoneRNG.nextInt(sizeConversion.length)]; - //Equation for an ellipsoid centered around 0,0,0 + // Equation for an ellipsoid centered around 0,0,0 // Sx, Sy, and Sz are size controls (size = 1/S_) // 1 = full size, 1.333 = 75%, 2 = 50%, 4 = 25% // (x * Sx)^2 + (y * Sy)^2 + (z * sZ)^2 <= (mSize)^2 - - //So, we setup the intial boundaries to be the size of the boulder plus a block in each direction - int tMinX = tX-(int)(realSize/xSize-1.0); - int tMaxX = tX+(int)(realSize/xSize+2.0); - int tMinY = tY-(int)(realSize/ySize-1.0); - int tMaxY = tY+(int)(realSize/ySize+2.0); - int tMinZ = tZ-(int)(realSize/zSize-1.0); - int tMaxZ = tZ+(int)(realSize/zSize+2.0); + + // So, we setup the intial boundaries to be the size of the boulder plus a block in each direction + int tMinX = tX - (int) (realSize / xSize - 1.0); + int tMaxX = tX + (int) (realSize / xSize + 2.0); + int tMinY = tY - (int) (realSize / ySize - 1.0); + int tMaxY = tY + (int) (realSize / ySize + 2.0); + int tMinZ = tZ - (int) (realSize / zSize - 1.0); + int tMaxZ = tZ + (int) (realSize / zSize + 2.0); // If the (tY-ySize) of the stoneseed is air in the current chunk, mark the seed empty and move on. - if(aWorld.getBlock(aChunkX + 8, tMinY, aChunkZ + 8).isAir(aWorld, aChunkX + 8, tMinY, aChunkZ + 8)) { - if (debugStones) GT_Log.out.println( - mWorldGenName + - " tX=" + tX + - " tY=" + tY + - " tZ=" + tZ + - " realSize=" + realSize + - " xSize=" + realSize/xSize + - " ySize=" + realSize/ySize + - " zSize=" + realSize/zSize + - " tMinY=" + tMinY + - " tMaxY=" + tMaxY + - " - Skipped because first requesting chunk would not contain this stone" - ); - long hash = ((long)((aWorld.provider.dimensionId & 0xffL)<<56) |( ((long)x & 0x000000000fffffffL) << 28) | ( (long)z & 0x000000000fffffffL )); + if (aWorld.getBlock(aChunkX + 8, tMinY, aChunkZ + 8).isAir(aWorld, aChunkX + 8, tMinY, aChunkZ + 8)) { + if (debugStones) + GT_Log.out.println(mWorldGenName + " tX=" + + tX + " tY=" + + tY + " tZ=" + + tZ + " realSize=" + + realSize + " xSize=" + + realSize / xSize + " ySize=" + + realSize / ySize + " zSize=" + + realSize / zSize + " tMinY=" + + tMinY + " tMaxY=" + + tMaxY + " - Skipped because first requesting chunk would not contain this stone"); + long hash = ((long) ((aWorld.provider.dimensionId & 0xffL) << 56) + | (((long) x & 0x000000000fffffffL) << 28) + | ((long) z & 0x000000000fffffffL)); validStoneSeeds.remove(hash); - validStoneSeeds.put( hash, new StoneSeeds(false) ); + validStoneSeeds.put(hash, new StoneSeeds(false)); } - //Chop the boundaries by the parts that intersect with the current chunk - int wX = Math.max( tMinX, aChunkX + 8); - int eX = Math.min( tMaxX, aChunkX + 8 + 16 ); - - int sZ = Math.max( tMinZ, aChunkZ + 8); - int nZ = Math.min( tMaxZ, aChunkZ + 8 + 16 ); - - if (debugStones) GT_Log.out.println( - mWorldGenName + - " tX=" + tX + - " tY=" + tY + - " tZ=" + tZ + - " realSize=" + realSize + - " xSize=" + realSize/xSize + - " ySize=" + realSize/ySize + - " zSize=" + realSize/zSize + - " wX=" + wX + - " eX=" + eX + - " tMinY=" + tMinY + - " tMaxY=" + tMaxY + - " sZ=" + sZ + - " nZ=" + nZ - ); - - double rightHandSide = realSize*realSize + 1; //Precalc the right hand side - for( int iY = tMinY; iY < tMaxY; iY++) { // Do placement from the bottom up layer up. Maybe better on cache usage? - double yCalc = ( (double)(iY-tY)*ySize ); + // Chop the boundaries by the parts that intersect with the current chunk + int wX = Math.max(tMinX, aChunkX + 8); + int eX = Math.min(tMaxX, aChunkX + 8 + 16); + + int sZ = Math.max(tMinZ, aChunkZ + 8); + int nZ = Math.min(tMaxZ, aChunkZ + 8 + 16); + + if (debugStones) + GT_Log.out.println(mWorldGenName + " tX=" + + tX + " tY=" + + tY + " tZ=" + + tZ + " realSize=" + + realSize + " xSize=" + + realSize / xSize + " ySize=" + + realSize / ySize + " zSize=" + + realSize / zSize + " wX=" + + wX + " eX=" + + eX + " tMinY=" + + tMinY + " tMaxY=" + + tMaxY + " sZ=" + + sZ + " nZ=" + + nZ); + + double rightHandSide = realSize * realSize + 1; // Precalc the right hand side + for (int iY = tMinY; + iY < tMaxY; + iY++) { // Do placement from the bottom up layer up. Maybe better on cache usage? + double yCalc = ((double) (iY - tY) * ySize); yCalc = yCalc * yCalc; // (y*Sy)^2 double leftHandSize = yCalc; - if( leftHandSize > rightHandSide ) { + if (leftHandSize > rightHandSide) { continue; // If Y alone is larger than the RHS, skip the rest of the loops } - for( int iX = wX; iX < eX; iX++) { - double xCalc = ( (double)(iX-tX)*xSize ); + for (int iX = wX; iX < eX; iX++) { + double xCalc = ((double) (iX - tX) * xSize); xCalc = xCalc * xCalc; leftHandSize = yCalc + xCalc; - if( leftHandSize > rightHandSide ) { // Again, if X and Y is larger than the RHS, skip to the next value + if (leftHandSize + > rightHandSide) { // Again, if X and Y is larger than the RHS, skip to the next value continue; } - for( int iZ = sZ; iZ < nZ; iZ++ ) { - double zCalc = ( (double)(iZ-tZ)*zSize ); + for (int iZ = sZ; iZ < nZ; iZ++) { + double zCalc = ((double) (iZ - tZ) * zSize); zCalc = zCalc * zCalc; leftHandSize = zCalc + xCalc + yCalc; - if( leftHandSize > rightHandSide ) { + if (leftHandSize > rightHandSide) { continue; } else { // Yay! We can actually place a block now. (this part copied from original code) @@ -201,9 +257,26 @@ public class GT_Worldgen_Stone extends GT_Worldgen_Ore { if (tTargetedBlock != GregTech_API.sBlockOres1) { ((GT_TileEntity_Ores) tTileEntity).convertOreBlock(aWorld, iX, iY, iZ); } - ((GT_TileEntity_Ores)tTileEntity).overrideOreBlockMaterial(this.mBlock, (byte) this.mBlockMeta); + ((GT_TileEntity_Ores) tTileEntity) + .overrideOreBlockMaterial(this.mBlock, (byte) this.mBlockMeta); } - } else if (((this.mAllowToGenerateinVoid) && (aWorld.getBlock(iX, iY, iZ).isAir(aWorld, iX, iY, iZ))) || ((tTargetedBlock != null) && ((tTargetedBlock.isReplaceableOreGen(aWorld, iX, iY, iZ, Blocks.stone)) || (tTargetedBlock.isReplaceableOreGen(aWorld, iX, iY, iZ, Blocks.stained_hardened_clay)) || (tTargetedBlock.isReplaceableOreGen(aWorld, iX, iY, iZ, Blocks.cobblestone)) || (tTargetedBlock.isReplaceableOreGen(aWorld, iX, iY, iZ, Blocks.end_stone)) || (tTargetedBlock.isReplaceableOreGen(aWorld, iX, iY, iZ, Blocks.netherrack)) || (tTargetedBlock.isReplaceableOreGen(aWorld, iX, iY, iZ, GregTech_API.sBlockGranites)) || (tTargetedBlock.isReplaceableOreGen(aWorld, iX, iY, iZ, GregTech_API.sBlockStones))))) { + } else if (((this.mAllowToGenerateinVoid) + && (aWorld.getBlock(iX, iY, iZ).isAir(aWorld, iX, iY, iZ))) + || ((tTargetedBlock != null) + && ((tTargetedBlock.isReplaceableOreGen( + aWorld, iX, iY, iZ, Blocks.stone)) + || (tTargetedBlock.isReplaceableOreGen( + aWorld, iX, iY, iZ, Blocks.stained_hardened_clay)) + || (tTargetedBlock.isReplaceableOreGen( + aWorld, iX, iY, iZ, Blocks.cobblestone)) + || (tTargetedBlock.isReplaceableOreGen( + aWorld, iX, iY, iZ, Blocks.end_stone)) + || (tTargetedBlock.isReplaceableOreGen( + aWorld, iX, iY, iZ, Blocks.netherrack)) + || (tTargetedBlock.isReplaceableOreGen( + aWorld, iX, iY, iZ, GregTech_API.sBlockGranites)) + || (tTargetedBlock.isReplaceableOreGen( + aWorld, iX, iY, iZ, GregTech_API.sBlockStones))))) { aWorld.setBlock(iX, iY, iZ, this.mBlock, this.mBlockMeta, 0); } } diff --git a/src/main/java/gregtech/common/GT_Worldgenerator.java b/src/main/java/gregtech/common/GT_Worldgenerator.java index aa6dfa2a41..fe02ed010c 100644 --- a/src/main/java/gregtech/common/GT_Worldgenerator.java +++ b/src/main/java/gregtech/common/GT_Worldgenerator.java @@ -1,5 +1,11 @@ package gregtech.common; +import static gregtech.api.enums.GT_Values.debugOrevein; +import static gregtech.api.enums.GT_Values.debugWorldGen; +import static gregtech.api.enums.GT_Values.oreveinAttempts; +import static gregtech.api.enums.GT_Values.oreveinMaxPlacementAttempts; +import static gregtech.api.enums.GT_Values.oreveinPercentage; + import cpw.mods.fml.common.IWorldGenerator; import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.GregTech_API; @@ -8,23 +14,16 @@ import gregtech.api.objects.XSTR; import gregtech.api.util.GT_Log; import gregtech.api.world.GT_Worldgen; import gregtech.common.blocks.GT_TileEntity_Ores; -import net.minecraft.init.Blocks; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import net.minecraft.world.chunk.Chunk; -import net.minecraft.world.chunk.IChunkProvider; - import java.util.ArrayList; import java.util.HashSet; import java.util.Hashtable; import java.util.List; import java.util.Random; - -import static gregtech.api.enums.GT_Values.debugOrevein; -import static gregtech.api.enums.GT_Values.debugWorldGen; -import static gregtech.api.enums.GT_Values.oreveinAttempts; -import static gregtech.api.enums.GT_Values.oreveinMaxPlacementAttempts; -import static gregtech.api.enums.GT_Values.oreveinPercentage; +import net.minecraft.init.Blocks; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraft.world.chunk.Chunk; +import net.minecraft.world.chunk.IChunkProvider; public class GT_Worldgenerator implements IWorldGenerator { private static int mEndAsteroidProbability = 300; @@ -34,13 +33,27 @@ public class GT_Worldgenerator implements IWorldGenerator { private static boolean endAsteroids = true; public static List<Runnable> mList = new ArrayList(); public static HashSet<Long> ProcChunks = new HashSet<Long>(); - // This is probably not going to work. Trying to create a fake orevein to put into hashtable when there will be no ores in a vein. - public static GT_Worldgen_GT_Ore_Layer noOresInVein = new GT_Worldgen_GT_Ore_Layer( "NoOresInVein", false, 0, 255, 0, 255, 16, false, false, false, Materials.Aluminium, Materials.Aluminium, Materials.Aluminium, Materials.Aluminium); + // This is probably not going to work. Trying to create a fake orevein to put into hashtable when there will be no + // ores in a vein. + public static GT_Worldgen_GT_Ore_Layer noOresInVein = new GT_Worldgen_GT_Ore_Layer( + "NoOresInVein", + false, + 0, + 255, + 0, + 255, + 16, + false, + false, + false, + Materials.Aluminium, + Materials.Aluminium, + Materials.Aluminium, + Materials.Aluminium); public static Hashtable<Long, GT_Worldgen_GT_Ore_Layer> validOreveins = new Hashtable(1024); public boolean mIsGenerating = false; public static final Object listLock = new Object(); - public GT_Worldgenerator() { endAsteroids = GregTech_API.sWorldgenFile.get("endasteroids", "GenerateAsteroids", true); endMinSize = GregTech_API.sWorldgenFile.get("endasteroids", "AsteroidMinSize", 50); @@ -48,42 +61,51 @@ public class GT_Worldgenerator implements IWorldGenerator { mEndAsteroidProbability = GregTech_API.sWorldgenFile.get("endasteroids", "AsteroidProbability", 300); GameRegistry.registerWorldGenerator(this, 1073741823); if (debugWorldGen) { - GT_Log.out.println( - "GT_Worldgenerator created" - ); + GT_Log.out.println("GT_Worldgenerator created"); } } @Override - public void generate(Random aRandom, int aX, int aZ, World aWorld, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { - synchronized (listLock) - { - mList.add(new WorldGenContainer(new XSTR(Math.abs(aRandom.nextInt()) +1), aX, aZ, aWorld.provider.dimensionId, aWorld, aChunkGenerator, aChunkProvider, aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8).biomeName)); - if (debugWorldGen) GT_Log.out.println( - "ADD WorldSeed:"+aWorld.getSeed() + - " DimId" + aWorld.provider.dimensionId + - " chunk x:" + aX + - " z:" + aZ + - " SIZE: " + mList.size() - ); + public void generate( + Random aRandom, + int aX, + int aZ, + World aWorld, + IChunkProvider aChunkGenerator, + IChunkProvider aChunkProvider) { + synchronized (listLock) { + mList.add(new WorldGenContainer( + new XSTR(Math.abs(aRandom.nextInt()) + 1), + aX, + aZ, + aWorld.provider.dimensionId, + aWorld, + aChunkGenerator, + aChunkProvider, + aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8).biomeName)); + if (debugWorldGen) + GT_Log.out.println("ADD WorldSeed:" + aWorld.getSeed() + " DimId" + + aWorld.provider.dimensionId + " chunk x:" + + aX + " z:" + + aZ + " SIZE: " + + mList.size()); } if (!this.mIsGenerating) { this.mIsGenerating = true; - int mList_sS= mList.size(); - mList_sS = Math.min(mList_sS, 5); // Run a maximum of 5 chunks at a time through worldgen. Extra chunks get done later. + int mList_sS = mList.size(); + mList_sS = Math.min( + mList_sS, 5); // Run a maximum of 5 chunks at a time through worldgen. Extra chunks get done later. for (int i = 0; i < mList_sS; i++) { WorldGenContainer toRun = (WorldGenContainer) mList.get(0); - if (debugWorldGen) GT_Log.out.println( - "RUN WorldSeed:"+aWorld.getSeed()+ - " DimId" + aWorld.provider.dimensionId + - " chunk x:" + toRun.mX + - " z:" + toRun.mZ + - " SIZE: " + mList.size() + - " i: " + i - ); - synchronized (listLock) - { + if (debugWorldGen) + GT_Log.out.println("RUN WorldSeed:" + aWorld.getSeed() + " DimId" + + aWorld.provider.dimensionId + " chunk x:" + + toRun.mX + " z:" + + toRun.mZ + " SIZE: " + + mList.size() + " i: " + + i); + synchronized (listLock) { mList.remove(0); } toRun.run(); @@ -92,8 +114,7 @@ public class GT_Worldgenerator implements IWorldGenerator { } } - public static class WorldGenContainer - implements Runnable { + public static class WorldGenContainer implements Runnable { public final Random mRandom; public final int mX; public final int mZ; @@ -105,12 +126,12 @@ public class GT_Worldgenerator implements IWorldGenerator { // Used for outputting orevein weights and bins // static int test=0; - // Local class to track which orevein seeds must be checked when doing chunkified worldgen class NearbySeeds { public int mX; public int mZ; - NearbySeeds( int x, int z) { + + NearbySeeds(int x, int z) { this.mX = x; this.mZ = z; } @@ -119,7 +140,8 @@ public class GT_Worldgenerator implements IWorldGenerator { public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof GT_Worldgenerator.WorldGenContainer.NearbySeeds)) return false; - GT_Worldgenerator.WorldGenContainer.NearbySeeds that = (GT_Worldgenerator.WorldGenContainer.NearbySeeds) o; + GT_Worldgenerator.WorldGenContainer.NearbySeeds that = + (GT_Worldgenerator.WorldGenContainer.NearbySeeds) o; if (this.mX != that.mX) return false; return this.mZ == that.mZ; } @@ -130,12 +152,21 @@ public class GT_Worldgenerator implements IWorldGenerator { result = 31 * result + this.mZ; return result; } - }; + } + ; public static ArrayList<GT_Worldgenerator.WorldGenContainer.NearbySeeds> seedList = new ArrayList(); // aX and aZ are now the by-chunk X and Z for the chunk of interest - public WorldGenContainer(Random aRandom, int aX, int aZ, int aDimensionType, World aWorld, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider, String aBiome) { + public WorldGenContainer( + Random aRandom, + int aX, + int aZ, + int aDimensionType, + World aWorld, + IChunkProvider aChunkGenerator, + IChunkProvider aChunkProvider, + String aBiome) { this.mRandom = aRandom; this.mX = aX; this.mZ = aZ; @@ -170,31 +201,44 @@ public class GT_Worldgenerator implements IWorldGenerator { // in the dimension. For example veins that range above and below the average height // will be less, and veins that are completely above the average height will be much less. - public void worldGenFindVein( int oreseedX, int oreseedZ) { + public void worldGenFindVein(int oreseedX, int oreseedZ) { // Explanation of oreveinseed implementation. - // (long)this.mWorld.getSeed()<<16) Deep Dark does two oregen passes, one with getSeed set to +1 the original world seed. This pushes that +1 off the low bits of oreseedZ, so that the hashes are far apart for the two passes. - // ((this.mWorld.provider.dimensionId & 0xffL)<<56) Puts the dimension in the top bits of the hash, to make sure to get unique hashes per dimension - // ((long)oreseedX & 0x000000000fffffffL) << 28) Puts the chunk X in the bits 29-55. Cuts off the top few bits of the chunk so we have bits for dimension. - // ( (long)oreseedZ & 0x000000000fffffffL )) Puts the chunk Z in the bits 0-27. Cuts off the top few bits of the chunk so we have bits for dimension. - long oreveinSeed = ((long)this.mWorld.getSeed()<<16) ^ ((long)((this.mWorld.provider.dimensionId & 0xffL)<<56) |( ((long)oreseedX & 0x000000000fffffffL) << 28) | ( (long)oreseedZ & 0x000000000fffffffL )); // Use an RNG that is identical every time it is called for this oreseed. - XSTR oreveinRNG = new XSTR( oreveinSeed ); + // (long)this.mWorld.getSeed()<<16) Deep Dark does two oregen passes, one with getSeed set to +1 the + // original world seed. This pushes that +1 off the low bits of oreseedZ, so that the hashes are far apart + // for the two passes. + // ((this.mWorld.provider.dimensionId & 0xffL)<<56) Puts the dimension in the top bits of the hash, to + // make sure to get unique hashes per dimension + // ((long)oreseedX & 0x000000000fffffffL) << 28) Puts the chunk X in the bits 29-55. Cuts off the top few + // bits of the chunk so we have bits for dimension. + // ( (long)oreseedZ & 0x000000000fffffffL )) Puts the chunk Z in the bits 0-27. Cuts off the top few bits + // of the chunk so we have bits for dimension. + long oreveinSeed = ((long) this.mWorld.getSeed() << 16) + ^ ((long) ((this.mWorld.provider.dimensionId & 0xffL) << 56) + | (((long) oreseedX & 0x000000000fffffffL) << 28) + | ((long) oreseedZ + & 0x000000000fffffffL)); // Use an RNG that is identical every time it is called for + // this oreseed. + XSTR oreveinRNG = new XSTR(oreveinSeed); int oreveinPercentageRoll = oreveinRNG.nextInt(100); // Roll the dice, see if we get an orevein here at all - int noOrePlacedCount=0; + int noOrePlacedCount = 0; String tDimensionName = ""; - if (debugOrevein) { tDimensionName = this.mWorld.provider.getDimensionName(); } + if (debugOrevein) { + tDimensionName = this.mWorld.provider.getDimensionName(); + } - if (debugOrevein) GT_Log.out.println( - " Finding oreveins for oreveinSeed="+ oreveinSeed + - " mX="+ this.mX + - " mZ="+ this.mZ + - " oreseedX="+ oreseedX + - " oreseedZ="+ oreseedZ + - " worldSeed="+this.mWorld.getSeed() - ); + if (debugOrevein) + GT_Log.out.println(" Finding oreveins for oreveinSeed=" + oreveinSeed + " mX=" + + this.mX + " mZ=" + + this.mZ + " oreseedX=" + + oreseedX + " oreseedZ=" + + oreseedZ + " worldSeed=" + + this.mWorld.getSeed()); // Search for a valid orevein for this dimension - if( !validOreveins.containsKey(oreveinSeed) ) { - if ( (oreveinPercentageRoll<oreveinPercentage) && (GT_Worldgen_GT_Ore_Layer.sWeight > 0) && (GT_Worldgen_GT_Ore_Layer.sList.size() > 0)) { + if (!validOreveins.containsKey(oreveinSeed)) { + if ((oreveinPercentageRoll < oreveinPercentage) + && (GT_Worldgen_GT_Ore_Layer.sWeight > 0) + && (GT_Worldgen_GT_Ore_Layer.sList.size() > 0)) { int placementAttempts = 0; boolean oreveinFound = false; int i; @@ -214,24 +258,41 @@ public class GT_Worldgenerator implements IWorldGenerator { } } */ - for( i = 0; (i < oreveinAttempts) && (!oreveinFound) && (placementAttempts<oreveinMaxPlacementAttempts); i++ ) { + for (i = 0; + (i < oreveinAttempts) + && (!oreveinFound) + && (placementAttempts < oreveinMaxPlacementAttempts); + i++) { int tRandomWeight = oreveinRNG.nextInt(GT_Worldgen_GT_Ore_Layer.sWeight); for (GT_Worldgen_GT_Ore_Layer tWorldGen : GT_Worldgen_GT_Ore_Layer.sList) { - tRandomWeight -= ( tWorldGen).mWeight; + tRandomWeight -= (tWorldGen).mWeight; if (tRandomWeight <= 0) { try { - // Adjust the seed so that this layer has a series of unique random numbers. Otherwise multiple attempts at this same oreseed will get the same offset and X/Z values. If an orevein failed, any orevein with the - // same minimum heights would fail as well. This prevents that, giving each orevein a unique height each pass through here. - int placementResult = tWorldGen.executeWorldgenChunkified(this.mWorld, new XSTR( oreveinSeed ^ (tWorldGen.mPrimaryMeta)), this.mBiome, this.mDimensionType, this.mX*16, this.mZ*16, oreseedX*16, oreseedZ*16, this.mChunkGenerator, this.mChunkProvider); - switch(placementResult) { + // Adjust the seed so that this layer has a series of unique random numbers. + // Otherwise multiple attempts at this same oreseed will get the same offset and X/Z + // values. If an orevein failed, any orevein with the + // same minimum heights would fail as well. This prevents that, giving each orevein + // a unique height each pass through here. + int placementResult = tWorldGen.executeWorldgenChunkified( + this.mWorld, + new XSTR(oreveinSeed ^ (tWorldGen.mPrimaryMeta)), + this.mBiome, + this.mDimensionType, + this.mX * 16, + this.mZ * 16, + oreseedX * 16, + oreseedZ * 16, + this.mChunkGenerator, + this.mChunkProvider); + switch (placementResult) { case GT_Worldgen_GT_Ore_Layer.ORE_PLACED: - if (debugOrevein) GT_Log.out.println( - " Added near oreveinSeed=" + oreveinSeed + " " + - ( tWorldGen).mWorldGenName + - " tries at oremix=" + i + - " placementAttempts=" + placementAttempts + - " dimensionName=" + tDimensionName - ); + if (debugOrevein) + GT_Log.out.println(" Added near oreveinSeed=" + oreveinSeed + " " + + (tWorldGen).mWorldGenName + + " tries at oremix=" + + i + " placementAttempts=" + + placementAttempts + " dimensionName=" + + tDimensionName); validOreveins.put(oreveinSeed, tWorldGen); oreveinFound = true; break; @@ -240,90 +301,92 @@ public class GT_Worldgenerator implements IWorldGenerator { // SHould do retry in this case until out of chances break; case GT_Worldgen_GT_Ore_Layer.NO_OVERLAP: - if (debugOrevein) GT_Log.out.println( - " Added far oreveinSeed=" + oreveinSeed + " " + - ( tWorldGen).mWorldGenName + - " tries at oremix=" + i + - " placementAttempts=" + placementAttempts + - " dimensionName=" + tDimensionName - ); + if (debugOrevein) + GT_Log.out.println(" Added far oreveinSeed=" + oreveinSeed + " " + + (tWorldGen).mWorldGenName + + " tries at oremix=" + + i + " placementAttempts=" + + placementAttempts + " dimensionName=" + + tDimensionName); validOreveins.put(oreveinSeed, tWorldGen); oreveinFound = true; break; case GT_Worldgen_GT_Ore_Layer.NO_OVERLAP_AIR_BLOCK: - if (debugOrevein) GT_Log.out.println( - " No overlap and air block in test spot=" + oreveinSeed + " " + - ( tWorldGen).mWorldGenName + - " tries at oremix=" + i + - " placementAttempts=" + placementAttempts + - " dimensionName=" + tDimensionName - ); + if (debugOrevein) + GT_Log.out.println(" No overlap and air block in test spot=" + + oreveinSeed + " " + (tWorldGen).mWorldGenName + + " tries at oremix=" + + i + " placementAttempts=" + + placementAttempts + " dimensionName=" + + tDimensionName); // SHould do retry in this case until out of chances placementAttempts++; break; } break; // Try the next orevein } catch (Throwable e) { - if (debugOrevein) GT_Log.out.println( - "Exception occurred on oreVein" + tWorldGen + - " oreveinSeed="+ oreveinSeed + - " mX="+ this.mX + - " mZ="+ this.mZ + - " oreseedX="+ oreseedX + - " oreseedZ="+ oreseedZ - ); + if (debugOrevein) + GT_Log.out.println("Exception occurred on oreVein" + tWorldGen + " oreveinSeed=" + + oreveinSeed + " mX=" + + this.mX + " mZ=" + + this.mZ + " oreseedX=" + + oreseedX + " oreseedZ=" + + oreseedZ); e.printStackTrace(GT_Log.err); } } } } // Only add an empty orevein if unable to place a vein at the oreseed chunk. - if ((!oreveinFound) && (this.mX == oreseedX) && (this.mZ == oreseedZ)){ - if (debugOrevein) GT_Log.out.println( - " Empty oreveinSeed="+ oreveinSeed + - " mX="+ this.mX + - " mZ="+ this.mZ + - " oreseedX="+ oreseedX + - " oreseedZ="+ oreseedZ + - " tries at oremix=" + i + - " placementAttempts=" + placementAttempts + - " dimensionName=" + tDimensionName - ); - validOreveins.put(oreveinSeed, noOresInVein ); + if ((!oreveinFound) && (this.mX == oreseedX) && (this.mZ == oreseedZ)) { + if (debugOrevein) + GT_Log.out.println(" Empty oreveinSeed=" + oreveinSeed + " mX=" + + this.mX + " mZ=" + + this.mZ + " oreseedX=" + + oreseedX + " oreseedZ=" + + oreseedZ + " tries at oremix=" + + i + " placementAttempts=" + + placementAttempts + " dimensionName=" + + tDimensionName); + validOreveins.put(oreveinSeed, noOresInVein); } - } else if(oreveinPercentageRoll >= oreveinPercentage) { - if (debugOrevein) GT_Log.out.println( - " Skipped oreveinSeed="+ oreveinSeed + - " mX="+ this.mX + - " mZ="+ this.mZ + - " oreseedX=" + oreseedX + - " oreseedZ=" + oreseedZ + - " RNG=" + oreveinPercentageRoll + - " %=" + oreveinPercentage+ - " dimensionName=" + tDimensionName - ); + } else if (oreveinPercentageRoll >= oreveinPercentage) { + if (debugOrevein) + GT_Log.out.println(" Skipped oreveinSeed=" + oreveinSeed + " mX=" + + this.mX + " mZ=" + + this.mZ + " oreseedX=" + + oreseedX + " oreseedZ=" + + oreseedZ + " RNG=" + + oreveinPercentageRoll + " %=" + + oreveinPercentage + " dimensionName=" + + tDimensionName); validOreveins.put(oreveinSeed, noOresInVein); } - }else { + } else { // oreseed is located in the previously processed table - if (debugOrevein) GT_Log.out.print( - " Valid oreveinSeed="+ oreveinSeed + - " validOreveins.size()=" + validOreveins.size() + " " - ); + if (debugOrevein) + GT_Log.out.print(" Valid oreveinSeed=" + oreveinSeed + " validOreveins.size()=" + + validOreveins.size() + " "); GT_Worldgen_GT_Ore_Layer tWorldGen = validOreveins.get(oreveinSeed); - oreveinRNG.setSeed(oreveinSeed ^ (tWorldGen.mPrimaryMeta)); // Reset RNG to only be based on oreseed X/Z and type of vein - int placementResult = tWorldGen.executeWorldgenChunkified(this.mWorld, oreveinRNG, this.mBiome, this.mDimensionType, this.mX*16, this.mZ*16, oreseedX*16, oreseedZ*16, this.mChunkGenerator, this.mChunkProvider); - switch( placementResult ) - { + oreveinRNG.setSeed(oreveinSeed + ^ (tWorldGen.mPrimaryMeta)); // Reset RNG to only be based on oreseed X/Z and type of vein + int placementResult = tWorldGen.executeWorldgenChunkified( + this.mWorld, + oreveinRNG, + this.mBiome, + this.mDimensionType, + this.mX * 16, + this.mZ * 16, + oreseedX * 16, + oreseedZ * 16, + this.mChunkGenerator, + this.mChunkProvider); + switch (placementResult) { case GT_Worldgen_GT_Ore_Layer.NO_ORE_IN_BOTTOM_LAYER: - if (debugOrevein) GT_Log.out.println( - " No ore in bottom layer" - ); + if (debugOrevein) GT_Log.out.println(" No ore in bottom layer"); break; case GT_Worldgen_GT_Ore_Layer.NO_OVERLAP: - if (debugOrevein) GT_Log.out.println( - " No overlap" - ); + if (debugOrevein) GT_Log.out.println(" No overlap"); } } } @@ -341,7 +404,15 @@ public class GT_Worldgenerator implements IWorldGenerator { "tWorldGen.mWorldGenName="+tWorldGen.mWorldGenName ); */ - tWorldGen.executeWorldgen(this.mWorld, this.mRandom, this.mBiome, this.mDimensionType, this.mX*16, this.mZ*16, this.mChunkGenerator, this.mChunkProvider); + tWorldGen.executeWorldgen( + this.mWorld, + this.mRandom, + this.mBiome, + this.mDimensionType, + this.mX * 16, + this.mZ * 16, + this.mChunkGenerator, + this.mChunkProvider); } } catch (Throwable e) { e.printStackTrace(GT_Log.err); @@ -350,48 +421,47 @@ public class GT_Worldgenerator implements IWorldGenerator { // Determine bounding box on how far out to check for oreveins affecting this chunk // For now, manually reducing oreveinMaxSize when not in the Underdark for performance - if(this.mWorld.provider.getDimensionName().equals("Underdark") ) { - oreveinMaxSize=32; // Leave Deep Dark/Underdark max oregen at 32, instead of 64 + if (this.mWorld.provider.getDimensionName().equals("Underdark")) { + oreveinMaxSize = 32; // Leave Deep Dark/Underdark max oregen at 32, instead of 64 } else { - oreveinMaxSize=32; + oreveinMaxSize = 32; } - int wXbox = this.mX - (oreveinMaxSize/16); - int eXbox = this.mX + (oreveinMaxSize/16 + 1); // Need to add 1 since it is compared using a < - int nZbox = this.mZ - (oreveinMaxSize/16); - int sZbox = this.mZ + (oreveinMaxSize/16 + 1); + int wXbox = this.mX - (oreveinMaxSize / 16); + int eXbox = this.mX + (oreveinMaxSize / 16 + 1); // Need to add 1 since it is compared using a < + int nZbox = this.mZ - (oreveinMaxSize / 16); + int sZbox = this.mZ + (oreveinMaxSize / 16 + 1); // Search for orevein seeds and add to the list; - for( int x = wXbox; x < eXbox; x++ ) { - for( int z = nZbox; z < sZbox; z++ ) { + for (int x = wXbox; x < eXbox; x++) { + for (int z = nZbox; z < sZbox; z++) { // Determine if this X/Z is an orevein seed - if ( ( (Math.abs(x)%3) == 1) && ( (Math.abs(z)%3) == 1 ) ) { - if (debugWorldGen) GT_Log.out.println( - "Adding seed x="+x+ - " z="+z - ); - seedList.add( new GT_Worldgenerator.WorldGenContainer.NearbySeeds(x,z) ); + if (((Math.abs(x) % 3) == 1) && ((Math.abs(z) % 3) == 1)) { + if (debugWorldGen) GT_Log.out.println("Adding seed x=" + x + " z=" + z); + seedList.add(new GT_Worldgenerator.WorldGenContainer.NearbySeeds(x, z)); } } } // Now process each oreseed vs this requested chunk - for( ; seedList.size() != 0; seedList.remove(0) ) { - if (debugWorldGen) GT_Log.out.println( - "Processing seed x="+seedList.get(0).mX+ - " z="+seedList.get(0).mZ - ); - worldGenFindVein( seedList.get(0).mX, seedList.get(0).mZ ); + for (; seedList.size() != 0; seedList.remove(0)) { + if (debugWorldGen) + GT_Log.out.println("Processing seed x=" + seedList.get(0).mX + " z=" + seedList.get(0).mZ); + worldGenFindVein(seedList.get(0).mX, seedList.get(0).mZ); } long oregenTime = System.nanoTime(); - //Asteroid Worldgen + // Asteroid Worldgen int tDimensionType = this.mWorld.provider.dimensionId; - //String tDimensionName = this.mWorld.provider.getDimensionName(); + // String tDimensionName = this.mWorld.provider.getDimensionName(); Random aRandom = new Random(); - //if (((tDimensionType == 1) && endAsteroids && ((mEndAsteroidProbability <= 1) || (aRandom.nextInt(mEndAsteroidProbability) == 0))) || ((tDimensionName.equals("Asteroids")) && gcAsteroids && ((mGCAsteroidProbability <= 1) || (aRandom.nextInt(mGCAsteroidProbability) == 0)))) { - if (((tDimensionType == 1) && endAsteroids && ((mEndAsteroidProbability <= 1) || (aRandom.nextInt(mEndAsteroidProbability) == 0)))) { + // if (((tDimensionType == 1) && endAsteroids && ((mEndAsteroidProbability <= 1) || + // (aRandom.nextInt(mEndAsteroidProbability) == 0))) || ((tDimensionName.equals("Asteroids")) && gcAsteroids + // && ((mGCAsteroidProbability <= 1) || (aRandom.nextInt(mGCAsteroidProbability) == 0)))) { + if (((tDimensionType == 1) + && endAsteroids + && ((mEndAsteroidProbability <= 1) || (aRandom.nextInt(mEndAsteroidProbability) == 0)))) { short primaryMeta = 0; short secondaryMeta = 0; short betweenMeta = 0; @@ -405,7 +475,8 @@ public class GT_Worldgenerator implements IWorldGenerator { tRandomWeight -= ((GT_Worldgen_GT_Ore_Layer) tWorldGen).mWeight; if (tRandomWeight <= 0) { try { - //if ((tWorldGen.mEndAsteroid && tDimensionType == 1) || (tWorldGen.mAsteroid && tDimensionType == -30)) { + // if ((tWorldGen.mEndAsteroid && tDimensionType == 1) || (tWorldGen.mAsteroid && + // tDimensionType == -30)) { if (tWorldGen.mEndAsteroid && tDimensionType == 1) { primaryMeta = tWorldGen.mPrimaryMeta; secondaryMeta = tWorldGen.mSecondaryMeta; @@ -421,13 +492,13 @@ public class GT_Worldgenerator implements IWorldGenerator { } } } - //if(GT_Values.D1)GT_FML_LOGGER.info("do asteroid gen: "+this.mX+" "+this.mZ); + // if(GT_Values.D1)GT_FML_LOGGER.info("do asteroid gen: "+this.mX+" "+this.mZ); int tX = mX * 16 + aRandom.nextInt(16); int tY = 50 + aRandom.nextInt(200 - 50); int tZ = mZ * 16 + aRandom.nextInt(16); if (tDimensionType == 1) { mSize = aRandom.nextInt((int) (endMaxSize - endMinSize)); - //} else if (tDimensionName.equals("Asteroids")) { + // } else if (tDimensionName.equals("Asteroids")) { // mSize = aRandom.nextInt((int) (gcMaxSize - gcMinSize)); } if ((mWorld.getBlock(tX, tY, tZ).isAir(mWorld, tX, tY, tZ))) { @@ -459,16 +530,22 @@ public class GT_Worldgenerator implements IWorldGenerator { if (xChance * xChance + yChance * yChance < 1.0D) { for (int eZ = tMinZ; eZ <= tMaxZ; eZ++) { double zChance = (eZ + 0.5D - zCenter) / (halfLength / 2.0D); - if ((xChance * xChance + yChance * yChance + zChance * zChance < 1.0D) && (mWorld.getBlock(tX, tY, tZ).isAir(mWorld, tX, tY, tZ))) { + if ((xChance * xChance + yChance * yChance + zChance * zChance < 1.0D) + && (mWorld.getBlock(tX, tY, tZ) + .isAir(mWorld, tX, tY, tZ))) { int ranOre = aRandom.nextInt(50); if (ranOre < 3) { - GT_TileEntity_Ores.setOreBlock(mWorld, eX, eY, eZ, primaryMeta, false); + GT_TileEntity_Ores.setOreBlock( + mWorld, eX, eY, eZ, primaryMeta, false); } else if (ranOre < 6) { - GT_TileEntity_Ores.setOreBlock(mWorld, eX, eY, eZ, secondaryMeta, false); + GT_TileEntity_Ores.setOreBlock( + mWorld, eX, eY, eZ, secondaryMeta, false); } else if (ranOre < 8) { - GT_TileEntity_Ores.setOreBlock(mWorld, eX, eY, eZ, betweenMeta, false); + GT_TileEntity_Ores.setOreBlock( + mWorld, eX, eY, eZ, betweenMeta, false); } else if (ranOre < 10) { - GT_TileEntity_Ores.setOreBlock(mWorld, eX, eY, eZ, sporadicMeta, false); + GT_TileEntity_Ores.setOreBlock( + mWorld, eX, eY, eZ, sporadicMeta, false); } else { mWorld.setBlock(eX, eY, eZ, Blocks.end_stone, 0, 0); } @@ -480,10 +557,8 @@ public class GT_Worldgenerator implements IWorldGenerator { } } } - } - Chunk tChunk = this.mWorld.getChunkFromBlockCoords(this.mX, this.mZ); if (tChunk != null) { tChunk.isModified = true; @@ -491,12 +566,9 @@ public class GT_Worldgenerator implements IWorldGenerator { long endTime = System.nanoTime(); long duration = (endTime - startTime); if (debugWorldGen) { - GT_Log.out.println( - " Oregen took " + (oregenTime-leftOverTime)+ - " Leftover gen took " + (leftOverTime - startTime) + - " Worldgen took " + duration + - " nanoseconds" - ); + GT_Log.out.println(" Oregen took " + (oregenTime - leftOverTime) + " Leftover gen took " + + (leftOverTime - startTime) + " Worldgen took " + + duration + " nanoseconds"); } } } diff --git a/src/main/java/gregtech/common/bees/GT_AlleleBeeSpecies.java b/src/main/java/gregtech/common/bees/GT_AlleleBeeSpecies.java index 41726b4fc5..8c8852c189 100644 --- a/src/main/java/gregtech/common/bees/GT_AlleleBeeSpecies.java +++ b/src/main/java/gregtech/common/bees/GT_AlleleBeeSpecies.java @@ -5,45 +5,53 @@ import forestry.api.apiculture.IAlleleBeeSpeciesCustom; import forestry.api.genetics.AlleleManager; import forestry.api.genetics.IClassification; import forestry.apiculture.genetics.alleles.AlleleBeeSpecies; +import java.awt.*; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -import java.awt.*; - public class GT_AlleleBeeSpecies extends AlleleBeeSpecies { - public GT_AlleleBeeSpecies(String uid, - boolean dominant, - String unlocalizedName, - String authority, - String unlocalizedDescription, - IClassification branch, - String binomial, - Color primaryColor, - Color secondaryColor) { - super(uid, unlocalizedName, authority, unlocalizedDescription, dominant, branch, binomial, primaryColor.getRGB(), secondaryColor.getRGB()); + public GT_AlleleBeeSpecies( + String uid, + boolean dominant, + String unlocalizedName, + String authority, + String unlocalizedDescription, + IClassification branch, + String binomial, + Color primaryColor, + Color secondaryColor) { + super( + uid, + unlocalizedName, + authority, + unlocalizedDescription, + dominant, + branch, + binomial, + primaryColor.getRGB(), + secondaryColor.getRGB()); AlleleManager.alleleRegistry.registerAllele(this, EnumBeeChromosome.SPECIES); } @Override public IAlleleBeeSpeciesCustom addProduct(ItemStack product, Float chance) { if (product == null || product.getItem() == null) { - product=new ItemStack(Items.boat); + product = new ItemStack(Items.boat); } if (chance <= 0.0f || chance > 1.0f) { chance = 0.1f; } - return super.addProduct(product,chance); + return super.addProduct(product, chance); } @Override public IAlleleBeeSpeciesCustom addSpecialty(ItemStack specialty, Float chance) { if (specialty == null || specialty.getItem() == null) { - specialty=new ItemStack(Items.boat); + specialty = new ItemStack(Items.boat); } if (chance <= 0.0f || chance > 1.0f) { chance = 0.1f; } return super.addSpecialty(specialty, chance); } - } diff --git a/src/main/java/gregtech/common/bees/GT_AlleleHelper.java b/src/main/java/gregtech/common/bees/GT_AlleleHelper.java index 4a47bfa46e..46175730e9 100644 --- a/src/main/java/gregtech/common/bees/GT_AlleleHelper.java +++ b/src/main/java/gregtech/common/bees/GT_AlleleHelper.java @@ -10,12 +10,11 @@ import forestry.core.genetics.alleles.*; import forestry.core.utils.vect.IVect; import forestry.plugins.PluginManager; import gregtech.GT_Mod; -import org.apache.commons.lang3.reflect.FieldUtils; - import java.util.EnumMap; import java.util.HashMap; import java.util.Locale; import java.util.Map; +import org.apache.commons.lang3.reflect.FieldUtils; public class GT_AlleleHelper extends AlleleHelper { @@ -31,35 +30,28 @@ public class GT_AlleleHelper extends AlleleHelper { } if (PluginManager.Module.APICULTURE.isEnabled() || PluginManager.Module.ARBORICULTURE.isEnabled()) { - createAlleles(EnumAllele.Territory.class, - EnumBeeChromosome.TERRITORY, - EnumTreeChromosome.TERRITORY - ); + createAlleles(EnumAllele.Territory.class, EnumBeeChromosome.TERRITORY, EnumTreeChromosome.TERRITORY); - AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement("forestry.territoryDefault", get(EnumAllele.Territory.AVERAGE)); + AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement( + "forestry.territoryDefault", get(EnumAllele.Territory.AVERAGE)); } if (PluginManager.Module.APICULTURE.isEnabled() || PluginManager.Module.LEPIDOPTEROLOGY.isEnabled()) { - createAlleles(EnumAllele.Speed.class, - EnumBeeChromosome.SPEED, - EnumButterflyChromosome.SPEED - ); - createAlleles(EnumAllele.Lifespan.class, - EnumBeeChromosome.LIFESPAN, - EnumButterflyChromosome.LIFESPAN - ); - createAlleles(EnumAllele.Tolerance.class, + createAlleles(EnumAllele.Speed.class, EnumBeeChromosome.SPEED, EnumButterflyChromosome.SPEED); + createAlleles(EnumAllele.Lifespan.class, EnumBeeChromosome.LIFESPAN, EnumButterflyChromosome.LIFESPAN); + createAlleles( + EnumAllele.Tolerance.class, EnumBeeChromosome.TEMPERATURE_TOLERANCE, EnumBeeChromosome.HUMIDITY_TOLERANCE, EnumButterflyChromosome.TEMPERATURE_TOLERANCE, - EnumButterflyChromosome.HUMIDITY_TOLERANCE - ); - createAlleles(EnumAllele.Flowers.class, + EnumButterflyChromosome.HUMIDITY_TOLERANCE); + createAlleles( + EnumAllele.Flowers.class, EnumBeeChromosome.FLOWER_PROVIDER, - EnumButterflyChromosome.FLOWER_PROVIDER - ); + EnumButterflyChromosome.FLOWER_PROVIDER); - AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement("forestry.speedNorm", get(EnumAllele.Speed.NORMAL)); + AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement( + "forestry.speedNorm", get(EnumAllele.Speed.NORMAL)); } if (PluginManager.Module.ARBORICULTURE.isEnabled()) { @@ -70,18 +62,30 @@ public class GT_AlleleHelper extends AlleleHelper { createAlleles(EnumAllele.Maturation.class, EnumTreeChromosome.MATURATION); createAlleles(EnumAllele.Sappiness.class, EnumTreeChromosome.SAPPINESS); - AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement("forestry.heightMax10", get(EnumAllele.Height.AVERAGE)); - AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement("forestry.saplingsDefault", get(EnumAllele.Saplings.AVERAGE)); - AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement("forestry.saplingsDouble", get(EnumAllele.Saplings.HIGH)); - AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement("forestry.saplingsTriple", get(EnumAllele.Saplings.HIGHER)); - AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement("forestry.yieldDefault", get(EnumAllele.Yield.AVERAGE)); - AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement("forestry.maturitySlowest", get(EnumAllele.Maturation.SLOWEST)); - AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement("forestry.maturitySlower", get(EnumAllele.Maturation.SLOWER)); - AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement("forestry.maturitySlow", get(EnumAllele.Maturation.SLOW)); - AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement("forestry.maturityAverage", get(EnumAllele.Maturation.AVERAGE)); - AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement("forestry.maturityFast", get(EnumAllele.Maturation.FAST)); - AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement("forestry.maturityFaster", get(EnumAllele.Maturation.FASTER)); - AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement("forestry.maturityFastest", get(EnumAllele.Maturation.FASTEST)); + AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement( + "forestry.heightMax10", get(EnumAllele.Height.AVERAGE)); + AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement( + "forestry.saplingsDefault", get(EnumAllele.Saplings.AVERAGE)); + AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement( + "forestry.saplingsDouble", get(EnumAllele.Saplings.HIGH)); + AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement( + "forestry.saplingsTriple", get(EnumAllele.Saplings.HIGHER)); + AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement( + "forestry.yieldDefault", get(EnumAllele.Yield.AVERAGE)); + AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement( + "forestry.maturitySlowest", get(EnumAllele.Maturation.SLOWEST)); + AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement( + "forestry.maturitySlower", get(EnumAllele.Maturation.SLOWER)); + AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement( + "forestry.maturitySlow", get(EnumAllele.Maturation.SLOW)); + AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement( + "forestry.maturityAverage", get(EnumAllele.Maturation.AVERAGE)); + AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement( + "forestry.maturityFast", get(EnumAllele.Maturation.FAST)); + AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement( + "forestry.maturityFaster", get(EnumAllele.Maturation.FASTER)); + AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement( + "forestry.maturityFastest", get(EnumAllele.Maturation.FASTEST)); } if (PluginManager.Module.LEPIDOPTEROLOGY.isEnabled()) { @@ -91,11 +95,11 @@ public class GT_AlleleHelper extends AlleleHelper { Map<Integer, IAlleleInteger> integers = new HashMap<>(); for (int i = 1; i <= 10; i++) { IAlleleInteger alleleInteger = new AlleleInteger(modId, "i", i + "d", i, true); - AlleleManager.alleleRegistry.registerAllele(alleleInteger, + AlleleManager.alleleRegistry.registerAllele( + alleleInteger, EnumTreeChromosome.GIRTH, EnumButterflyChromosome.METABOLISM, - EnumButterflyChromosome.FERTILITY - ); + EnumButterflyChromosome.FERTILITY); integers.put(i, alleleInteger); } alleleMaps.put(Integer.class, integers); @@ -104,34 +108,31 @@ public class GT_AlleleHelper extends AlleleHelper { booleans.put(true, new AlleleBoolean(modId, "bool", true, false)); booleans.put(false, new AlleleBoolean(modId, "bool", false, false)); for (IAlleleBoolean alleleBoolean : booleans.values()) { - AlleleManager.alleleRegistry.registerAllele(alleleBoolean, + AlleleManager.alleleRegistry.registerAllele( + alleleBoolean, EnumBeeChromosome.NOCTURNAL, EnumBeeChromosome.TOLERANT_FLYER, EnumBeeChromosome.CAVE_DWELLING, EnumButterflyChromosome.NOCTURNAL, EnumButterflyChromosome.TOLERANT_FLYER, - EnumButterflyChromosome.FIRE_RESIST - ); + EnumButterflyChromosome.FIRE_RESIST); } alleleMaps.put(Boolean.class, booleans); } + @SuppressWarnings("unchecked") - public static void initialisation(){ + public static void initialisation() { GT_AlleleHelper helper = new GT_AlleleHelper(); try { - helper.alleleMaps = (Map<Class<?>, Map<?, ? extends IAllele>>) - FieldUtils.readField( - FieldUtils.getField(AlleleHelper.class,"alleleMaps",true), - AlleleHelper.instance, - true - ); + helper.alleleMaps = (Map<Class<?>, Map<?, ? extends IAllele>>) FieldUtils.readField( + FieldUtils.getField(AlleleHelper.class, "alleleMaps", true), AlleleHelper.instance, true); } catch (IllegalAccessException e) { e.printStackTrace(); } AlleleHelper.instance = helper; - //AlleleHelper.instance.init(); + // AlleleHelper.instance.init(); } @Override @@ -143,14 +144,15 @@ public class GT_AlleleHelper extends AlleleHelper { } if (!chromosomeType.getAlleleClass().isInstance(allele)) { - GT_Mod.GT_FML_LOGGER.info("chromosomeType is not an instance of allele!"+allele.getName()); + GT_Mod.GT_FML_LOGGER.info("chromosomeType is not an instance of allele!" + allele.getName()); return; } // uncomment this once all addon mods are using the allele registration with IChromosomeType // Collection<IChromosomeType> validTypes = AlleleManager.alleleRegistry.getChromosomeTypes(allele); // if (validTypes.size() > 0 && !validTypes.contains(chromosomeType)) { - // throw new IllegalArgumentException("Allele can't applied to this Chromosome type. Expected: " + validTypes + " Got: " + chromosomeType); + // throw new IllegalArgumentException("Allele can't applied to this Chromosome type. Expected: " + validTypes + // + " Got: " + chromosomeType); // } alleles[chromosomeType.ordinal()] = allele; @@ -213,7 +215,9 @@ public class GT_AlleleHelper extends AlleleHelper { } alleleMaps.put(enumClass, map); } - private static <K extends IAlleleValue<V>, V> IAllele createAllele(String category, K enumValue, IChromosomeType... types) { + + private static <K extends IAlleleValue<V>, V> IAllele createAllele( + String category, K enumValue, IChromosomeType... types) { V value = enumValue.getValue(); boolean isDominant = enumValue.isDominant(); String name = enumValue.toString().toLowerCase(Locale.ENGLISH); @@ -225,15 +229,18 @@ public class GT_AlleleHelper extends AlleleHelper { return AlleleManager.alleleFactory.createInteger(modId, category, name, (Integer) value, isDominant, types); } else if (IVect.class.isAssignableFrom(valueClass)) { IVect area = (IVect) value; - return AlleleManager.alleleFactory.createArea(modId, category, name, area.getX(), area.getY(), area.getZ(), isDominant, types); + return AlleleManager.alleleFactory.createArea( + modId, category, name, area.getX(), area.getY(), area.getZ(), isDominant, types); } else if (Boolean.class.isAssignableFrom(valueClass)) { return AlleleManager.alleleFactory.createBoolean(modId, category, (Boolean) value, isDominant, types); } else if (EnumTolerance.class.isAssignableFrom(valueClass)) { - IAlleleTolerance alleleTolerance = new AlleleTolerance(modId, category, name, (EnumTolerance) value, isDominant); + IAlleleTolerance alleleTolerance = + new AlleleTolerance(modId, category, name, (EnumTolerance) value, isDominant); AlleleManager.alleleRegistry.registerAllele(alleleTolerance, types); return alleleTolerance; } else if (FlowerProvider.class.isAssignableFrom(valueClass)) { - return AlleleManager.alleleFactory.createFlowers(modId, category, name, (FlowerProvider) value, isDominant, types); + return AlleleManager.alleleFactory.createFlowers( + modId, category, name, (FlowerProvider) value, isDominant, types); } throw new RuntimeException("could not create allele for category: " + category + " and value " + valueClass); } diff --git a/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java b/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java index a4a162ddae..357c7b9c36 100644 --- a/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java +++ b/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java @@ -7,14 +7,12 @@ import forestry.api.genetics.IGenome; import forestry.api.genetics.IMutationCondition; import forestry.apiculture.genetics.BeeMutation; import forestry.core.genetics.mutations.Mutation; +import java.lang.reflect.Field; +import java.util.List; import net.minecraft.util.ChunkCoordinates; import net.minecraft.world.World; import org.apache.commons.lang3.reflect.FieldUtils; -import java.lang.reflect.Field; -import java.util.List; - - public class GT_Bee_Mutation extends BeeMutation { private final float split; @@ -31,7 +29,12 @@ public class GT_Bee_Mutation extends BeeMutation { } @Override - public float getChance(IBeeHousing housing, IAlleleBeeSpecies allele0, IAlleleBeeSpecies allele1, IBeeGenome genome0, IBeeGenome genome1) { + public float getChance( + IBeeHousing housing, + IAlleleBeeSpecies allele0, + IAlleleBeeSpecies allele1, + IBeeGenome genome0, + IBeeGenome genome1) { World world = housing != null ? housing.getWorld() : null; ChunkCoordinates housingCoordinates = housing != null ? housing.getCoordinates() : null; int x = housingCoordinates != null ? housingCoordinates.posX : 0; @@ -45,7 +48,8 @@ public class GT_Bee_Mutation extends BeeMutation { } IBeeModifier beeHousingModifier = BeeManager.beeRoot.createBeeHousingModifier(housing); - IBeeModifier beeModeModifier = BeeManager.beeRoot.getBeekeepingMode(world).getBeeModifier(); + IBeeModifier beeModeModifier = + BeeManager.beeRoot.getBeekeepingMode(world).getBeeModifier(); processedChance *= beeHousingModifier.getMutationModifier(genome0, genome1, processedChance); processedChance *= beeModeModifier.getMutationModifier(genome0, genome1, processedChance); @@ -54,14 +58,21 @@ public class GT_Bee_Mutation extends BeeMutation { } @SuppressWarnings("unchecked") - private float getBasicChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1, IClimateProvider climate) { + private float getBasicChance( + World world, + int x, + int y, + int z, + IAllele allele0, + IAllele allele1, + IGenome genome0, + IGenome genome1, + IClimateProvider climate) { float mutationChance = this.getBaseChance(); List<IMutationCondition> mutationConditions = null; Field f = FieldUtils.getDeclaredField(Mutation.class, "mutationConditions", true); - if (f == null) - f = FieldUtils.getField(Mutation.class, "mutationConditions", true); - if (f == null) - return mutationChance; + if (f == null) f = FieldUtils.getField(Mutation.class, "mutationConditions", true); + if (f == null) return mutationChance; try { mutationConditions = f.get(this) instanceof List ? (List<IMutationCondition>) f.get(this) : null; } catch (IllegalAccessException e) { @@ -70,7 +81,8 @@ public class GT_Bee_Mutation extends BeeMutation { if (mutationConditions != null) for (IMutationCondition mutationCondition : mutationConditions) { - mutationChance *= mutationCondition.getChance(world, x, y, z, allele0, allele1, genome0, genome1, climate); + mutationChance *= + mutationCondition.getChance(world, x, y, z, allele0, allele1, genome0, genome1, climate); if (mutationChance == 0) { return 0; } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java index 5ed40ec1a3..cbd2d86093 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java @@ -9,21 +9,19 @@ import net.minecraft.world.IBlockAccess; public class GT_Block_Casings1 extends GT_Block_Casings_Abstract { - /** - * Texture Index Information - * Textures.BlockIcons.casingTexturePages[0][0-63] - Gregtech - * Textures.BlockIcons.casingTexturePages[0][64-127] - GT++ - * Textures.BlockIcons.casingTexturePages[1][0-127] - Gregtech - * Textures.BlockIcons.casingTexturePages[2][0-127] - Free - * Textures.BlockIcons.casingTexturePages[3][0-127] - Free - * Textures.BlockIcons.casingTexturePages[4][0-127] - Free - * Textures.BlockIcons.casingTexturePages[5][0-127] - Free - * Textures.BlockIcons.casingTexturePages[6][0-127] - Free - * Textures.BlockIcons.casingTexturePages[7][0-127] - Free - * Textures.BlockIcons.casingTexturePages[8][0-127] - TecTech - */ - - + /** + * Texture Index Information + * Textures.BlockIcons.casingTexturePages[0][0-63] - Gregtech + * Textures.BlockIcons.casingTexturePages[0][64-127] - GT++ + * Textures.BlockIcons.casingTexturePages[1][0-127] - Gregtech + * Textures.BlockIcons.casingTexturePages[2][0-127] - Free + * Textures.BlockIcons.casingTexturePages[3][0-127] - Free + * Textures.BlockIcons.casingTexturePages[4][0-127] - Free + * Textures.BlockIcons.casingTexturePages[5][0-127] - Free + * Textures.BlockIcons.casingTexturePages[6][0-127] - Free + * Textures.BlockIcons.casingTexturePages[7][0-127] - Free + * Textures.BlockIcons.casingTexturePages[8][0-127] - TecTech + */ public GT_Block_Casings1() { super(GT_Item_Casings1.class, "gt.blockcasings", GT_Material_Casings.INSTANCE, 16); @@ -39,7 +37,8 @@ public class GT_Block_Casings1 extends GT_Block_Casings_Abstract { GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "UHV Machine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Bronze Plated Bricks"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Heat Proof Machine Casing"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Dimensionally Transcendent Casing"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".12.name", "Dimensionally Transcendent Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Dimensional Injection Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Dimensional Bridge"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Superconducting Coil Block"); @@ -96,6 +95,10 @@ public class GT_Block_Casings1 extends GT_Block_Casings_Abstract { @Override public int colorMultiplier(IBlockAccess aWorld, int aX, int aY, int aZ) { - return aWorld.getBlockMetadata(aX, aY, aZ) > 9 ? super.colorMultiplier(aWorld, aX, aY, aZ) : gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[0] << 16 | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[1] << 8 | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[2]; + return aWorld.getBlockMetadata(aX, aY, aZ) > 9 + ? super.colorMultiplier(aWorld, aX, aY, aZ) + : gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[0] << 16 + | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[1] << 8 + | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[2]; } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java index 1b6ac42ee2..7ee9472308 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java @@ -16,8 +16,12 @@ import net.minecraftforge.common.util.ForgeDirection; public class GT_Block_Casings2 extends GT_Block_Casings_Abstract { public GT_Block_Casings2() { super(GT_Item_Casings2.class, "gt.blockcasings2", GT_Material_Casings.INSTANCE, 96); - //Special handler for Pyrolyse Oven Casing on hatches... - Textures.BlockIcons.casingTexturePages[0][22] = TextureFactory.of(Block.getBlockFromItem(ItemList.Casing_ULV.get(1).getItem()), 0, ForgeDirection.UNKNOWN, Dyes.MACHINE_METAL.mRGBa); + // Special handler for Pyrolyse Oven Casing on hatches... + Textures.BlockIcons.casingTexturePages[0][22] = TextureFactory.of( + Block.getBlockFromItem(ItemList.Casing_ULV.get(1).getItem()), + 0, + ForgeDirection.UNKNOWN, + Dyes.MACHINE_METAL.mRGBa); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Solid Steel Machine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Frost Proof Machine Casing"); @@ -98,7 +102,10 @@ public class GT_Block_Casings2 extends GT_Block_Casings_Abstract { } @Override - public float getExplosionResistance(Entity aTNT, World aWorld, int aX, int aY, int aZ, double eX, double eY, double eZ) { - return aWorld.getBlockMetadata(aX, aY, aZ) == 8 ? Blocks.bedrock.getExplosionResistance(aTNT) : super.getExplosionResistance(aTNT, aWorld, aX, aY, aZ, eX, eY, eZ); + public float getExplosionResistance( + Entity aTNT, World aWorld, int aX, int aY, int aZ, double eX, double eY, double eZ) { + return aWorld.getBlockMetadata(aX, aY, aZ) == 8 + ? Blocks.bedrock.getExplosionResistance(aTNT) + : super.getExplosionResistance(aTNT, aWorld, aX, aY, aZ, eX, eY, eZ); } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java index cc9bbd25f8..677c457678 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java @@ -78,11 +78,17 @@ public class GT_Block_Casings3 extends GT_Block_Casings_Abstract { case 12: return Textures.BlockIcons.MACHINE_CASING_RADIATIONPROOF.getIcon(); case 13: - return aSide > 1 ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_BRONZE.getIcon() : Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS.getIcon(); + return aSide > 1 + ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_BRONZE.getIcon() + : Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS.getIcon(); case 14: - return aSide > 1 ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_STEEL.getIcon() : Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + return aSide > 1 + ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_STEEL.getIcon() + : Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); case 15: - return aSide > 1 ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_TUNGSTENSTEEL.getIcon() : Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); + return aSide > 1 + ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_TUNGSTENSTEEL.getIcon() + : Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); } return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java index 90f568b73f..f5618c23b4 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java @@ -22,24 +22,45 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { * The exact meaning of these numbers are like black magic. Read the original getIcon implementation to understand why * it is 0, 1, etc, if that if ladder is even intelligible. */ - private static final int[][] mapping = new int[][]{ - {7, 7, 7, 7, 0, 7, 0, 7, 1, 7, 1, 7, 8, 7, 8, 7, 0, 7, 0, 7, 0, 7, 0, 7, 9, 7, 9, 7, 3, 7, 3, 7, 1, 7, 1, 7, 11, 7, 11, 7, 1, 7, 1, 7, 2, 7, 2, 7, 10, 7, 10, 7, 5, 7, 5, 7, 4, 7, 4, 7, 6, 7, 6, 7}, - {7, 7, 7, 7, 0, 0, 7, 7, 1, 1, 7, 7, 8, 8, 7, 7, 0, 0, 7, 7, 0, 0, 7, 7, 9, 9, 7, 7, 3, 3, 7, 7, 1, 1, 7, 7, 11, 11, 7, 7, 1, 1, 7, 7, 2, 2, 7, 7, 10, 10, 7, 7, 5, 5, 7, 7, 4, 4, 7, 7, 6, 6, 7, 7}, - {7, 1, 1, 1, 0, 9, 10, 4, 7, 1, 1, 1, 0, 9, 10, 4, 0, 8, 11, 2, 0, 3, 5, 6, 0, 8, 11, 2, 0, 3, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}, - {7, 1, 1, 1, 0, 8, 11, 2, 7, 7, 7, 7, 7, 7, 7, 7, 0, 9, 10, 4, 0, 3, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 1, 1, 0, 8, 11, 2, 7, 7, 7, 7, 7, 7, 7, 7, 0, 9, 10, 4, 0, 3, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7}, - {7, 1, 1, 1, 7, 1, 1, 1, 0, 8, 11, 2, 0, 8, 11, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 9, 10, 4, 0, 9, 10, 4, 0, 3, 5, 6, 0, 3, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}, - {7, 1, 1, 1, 7, 7, 7, 7, 0, 9, 10, 4, 7, 7, 7, 7, 7, 1, 1, 1, 7, 7, 7, 7, 0, 9, 10, 4, 7, 7, 7, 7, 0, 8, 11, 2, 7, 7, 7, 7, 0, 3, 5, 6, 7, 7, 7, 7, 0, 8, 11, 2, 7, 7, 7, 7, 0, 3, 5, 6, 7, 7, 7, 7}, + private static final int[][] mapping = new int[][] { + { + 7, 7, 7, 7, 0, 7, 0, 7, 1, 7, 1, 7, 8, 7, 8, 7, 0, 7, 0, 7, 0, 7, 0, 7, 9, 7, 9, 7, 3, 7, 3, 7, 1, 7, 1, 7, + 11, 7, 11, 7, 1, 7, 1, 7, 2, 7, 2, 7, 10, 7, 10, 7, 5, 7, 5, 7, 4, 7, 4, 7, 6, 7, 6, 7 + }, + { + 7, 7, 7, 7, 0, 0, 7, 7, 1, 1, 7, 7, 8, 8, 7, 7, 0, 0, 7, 7, 0, 0, 7, 7, 9, 9, 7, 7, 3, 3, 7, 7, 1, 1, 7, 7, + 11, 11, 7, 7, 1, 1, 7, 7, 2, 2, 7, 7, 10, 10, 7, 7, 5, 5, 7, 7, 4, 4, 7, 7, 6, 6, 7, 7 + }, + { + 7, 1, 1, 1, 0, 9, 10, 4, 7, 1, 1, 1, 0, 9, 10, 4, 0, 8, 11, 2, 0, 3, 5, 6, 0, 8, 11, 2, 0, 3, 5, 6, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 + }, + { + 7, 1, 1, 1, 0, 8, 11, 2, 7, 7, 7, 7, 7, 7, 7, 7, 0, 9, 10, 4, 0, 3, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 1, + 1, 0, 8, 11, 2, 7, 7, 7, 7, 7, 7, 7, 7, 0, 9, 10, 4, 0, 3, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7 + }, + { + 7, 1, 1, 1, 7, 1, 1, 1, 0, 8, 11, 2, 0, 8, 11, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 9, 10, + 4, 0, 9, 10, 4, 0, 3, 5, 6, 0, 3, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 + }, + { + 7, 1, 1, 1, 7, 7, 7, 7, 0, 9, 10, 4, 7, 7, 7, 7, 7, 1, 1, 1, 7, 7, 7, 7, 0, 9, 10, 4, 7, 7, 7, 7, 0, 8, 11, + 2, 7, 7, 7, 7, 0, 3, 5, 6, 7, 7, 7, 7, 0, 8, 11, 2, 7, 7, 7, 7, 0, 3, 5, 6, 7, 7, 7, 7 + }, }; + public static boolean mConnectedMachineTextures = true; public GT_Block_Casings4() { super(GT_Item_Casings4.class, "gt.blockcasings4", GT_Material_Casings.INSTANCE, 16); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Robust Tungstensteel Machine Casing"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Clean Stainless Steel Machine Casing"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".0.name", "Robust Tungstensteel Machine Casing"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".1.name", "Clean Stainless Steel Machine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Stable Titanium Machine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Titanium Firebox Casing"); -// GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Fusion Casing"); -// GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Fusion Casing"); + // GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Fusion Casing"); + // GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Fusion Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Fusion Machine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Fusion Coil Block"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Fusion Machine Casing MK II"); @@ -88,12 +109,14 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { case 11: return Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); case 3: - return aSide > 1 ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_TITANIUM.getIcon() : Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); + return aSide > 1 + ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_TITANIUM.getIcon() + : Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); case 4: - //Do not overwrite! + // Do not overwrite! return Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW.getIcon(); case 5: - //Do not overwrite! + // Do not overwrite! return Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS.getIcon(); case 6: return Textures.BlockIcons.MACHINE_CASING_FUSION.getIcon(); @@ -117,26 +140,50 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { public IIcon getTurbineCasing(int meta, int iconIndex, boolean active) { switch (meta) { case 10: - return active ? Textures.BlockIcons.TURBINE_ACTIVE1[iconIndex].getIcon() : Textures.BlockIcons.TURBINE1[iconIndex].getIcon(); + return active + ? Textures.BlockIcons.TURBINE_ACTIVE1[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE1[iconIndex].getIcon(); case 11: - return active ? Textures.BlockIcons.TURBINE_ACTIVE2[iconIndex].getIcon() : Textures.BlockIcons.TURBINE2[iconIndex].getIcon(); + return active + ? Textures.BlockIcons.TURBINE_ACTIVE2[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE2[iconIndex].getIcon(); case 12: - return active ? Textures.BlockIcons.TURBINE_ACTIVE3[iconIndex].getIcon() : Textures.BlockIcons.TURBINE3[iconIndex].getIcon(); + return active + ? Textures.BlockIcons.TURBINE_ACTIVE3[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE3[iconIndex].getIcon(); default: - return active ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() : Textures.BlockIcons.TURBINE[iconIndex].getIcon(); + return active + ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE[iconIndex].getIcon(); } } public IIcon getTurbineCasing(int meta, int iconIndex, boolean active, boolean hasTurbine) { switch (meta) { case 10: - return active ? Textures.BlockIcons.TURBINE_ACTIVE1[iconIndex].getIcon() : hasTurbine ? Textures.BlockIcons.TURBINE1[iconIndex].getIcon() : Textures.BlockIcons.TURBINE_EMPTY1[iconIndex].getIcon(); + return active + ? Textures.BlockIcons.TURBINE_ACTIVE1[iconIndex].getIcon() + : hasTurbine + ? Textures.BlockIcons.TURBINE1[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE_EMPTY1[iconIndex].getIcon(); case 11: - return active ? Textures.BlockIcons.TURBINE_ACTIVE2[iconIndex].getIcon() : hasTurbine ? Textures.BlockIcons.TURBINE2[iconIndex].getIcon() : Textures.BlockIcons.TURBINE_EMPTY2[iconIndex].getIcon(); + return active + ? Textures.BlockIcons.TURBINE_ACTIVE2[iconIndex].getIcon() + : hasTurbine + ? Textures.BlockIcons.TURBINE2[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE_EMPTY2[iconIndex].getIcon(); case 12: - return active ? Textures.BlockIcons.TURBINE_ACTIVE3[iconIndex].getIcon() : hasTurbine ? Textures.BlockIcons.TURBINE3[iconIndex].getIcon() : Textures.BlockIcons.TURBINE_EMPTY3[iconIndex].getIcon(); + return active + ? Textures.BlockIcons.TURBINE_ACTIVE3[iconIndex].getIcon() + : hasTurbine + ? Textures.BlockIcons.TURBINE3[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE_EMPTY3[iconIndex].getIcon(); default: - return active ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() : hasTurbine ? Textures.BlockIcons.TURBINE[iconIndex].getIcon() : Textures.BlockIcons.TURBINE_EMPTY[iconIndex].getIcon(); + return active + ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() + : hasTurbine + ? Textures.BlockIcons.TURBINE[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE_EMPTY[iconIndex].getIcon(); } } @@ -156,7 +203,8 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { public IIcon getIcon(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int aSide) { aWorld = GT_RenderingWorld.getInstance(aWorld); int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); - if (tMeta != 6 && tMeta != 8 && tMeta != 9 && tMeta != 10 && tMeta != 11 && tMeta != 12 || !mConnectedMachineTextures) { + if (tMeta != 6 && tMeta != 8 && tMeta != 9 && tMeta != 10 && tMeta != 11 && tMeta != 12 + || !mConnectedMachineTextures) { return getIcon(aSide, tMeta); } if (tMeta > 8 && tMeta < 13) { @@ -165,10 +213,10 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { case 0: for (int i = -1; i < 2; i++) { for (int j = -1; j < 2; j++) { - if (i == 0 && j == 0) - continue; + if (i == 0 && j == 0) continue; int tState; - if ((tState = isTurbineControllerWithSide(aWorld, xCoord + j, yCoord, zCoord + i, aSide)) != 0) { + if ((tState = isTurbineControllerWithSide(aWorld, xCoord + j, yCoord, zCoord + i, aSide)) + != 0) { return getTurbineCasing(tMeta, 4 - i * 3 - j, tState == 1, tState == 2); } } @@ -177,11 +225,12 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { case 1: for (int i = -1; i < 2; i++) { for (int j = -1; j < 2; j++) { - if (i == 0 && j == 0) - continue; + if (i == 0 && j == 0) continue; int tState; - if ((tState = isTurbineControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, aSide)) != 0) { - return getTurbineCasing(tMeta, 4 + i * 3 - j * tInvertLeftRightMod, tState == 1, tState == 2); + if ((tState = isTurbineControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, aSide)) + != 0) { + return getTurbineCasing( + tMeta, 4 + i * 3 - j * tInvertLeftRightMod, tState == 1, tState == 2); } } } @@ -189,11 +238,12 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { case 2: for (int i = -1; i < 2; i++) { for (int j = -1; j < 2; j++) { - if (i == 0 && j == 0) - continue; + if (i == 0 && j == 0) continue; int tState; - if ((tState = isTurbineControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, aSide)) != 0) { - return getTurbineCasing(tMeta, 4 + i * 3 + j * tInvertLeftRightMod, tState == 1, tState == 2); + if ((tState = isTurbineControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, aSide)) + != 0) { + return getTurbineCasing( + tMeta, 4 + i * 3 + j * tInvertLeftRightMod, tState == 1, tState == 2); } } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings5.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings5.java index 4de58c3a35..a3ef59de4f 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings5.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings5.java @@ -1,5 +1,7 @@ package gregtech.common.blocks; +import static gregtech.api.enums.HeatingCoilLevel.*; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.HeatingCoilLevel; @@ -7,13 +9,10 @@ import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.interfaces.IHeatingCoil; import gregtech.api.util.GT_LanguageManager; +import java.util.function.Consumer; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; -import java.util.function.Consumer; - -import static gregtech.api.enums.HeatingCoilLevel.*; - public class GT_Block_Casings5 extends GT_Block_Casings_Abstract implements IHeatingCoil { public GT_Block_Casings5() { @@ -33,7 +32,6 @@ public class GT_Block_Casings5 extends GT_Block_Casings_Abstract implements IHea GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Hypogen Coil Block"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Eternal Coil Block"); - ItemList.Casing_Coil_Cupronickel.set(new ItemStack(this, 1, 0)); ItemList.Casing_Coil_Kanthal.set(new ItemStack(this, 1, 1)); ItemList.Casing_Coil_Nichrome.set(new ItemStack(this, 1, 2)); @@ -52,7 +50,7 @@ public class GT_Block_Casings5 extends GT_Block_Casings_Abstract implements IHea @Override public int getTextureIndex(int aMeta) { - return (1 << 7 ) | aMeta; + return (1 << 7) | aMeta; } @Override @@ -163,8 +161,6 @@ public class GT_Block_Casings5 extends GT_Block_Casings_Abstract implements IHea } } - - @Override public HeatingCoilLevel getCoilHeat(int meta) { getOnCoilCheck().accept(this); diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java index 30b8751406..0b6b89198a 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java @@ -96,6 +96,8 @@ public class GT_Block_Casings6 extends GT_Block_Casings_Abstract { @Override public int colorMultiplier(IBlockAccess aWorld, int aX, int aY, int aZ) { - return gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[0] << 16 | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[1] << 8 | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[2]; + return gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[0] << 16 + | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[1] << 8 + | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[2]; } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java index e8ccc47b3d..65583eaa28 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java @@ -16,7 +16,7 @@ import net.minecraft.world.IBlockAccess; public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { public static boolean mConnectedMachineTextures = true; - //WATCH OUT FOR TEXTURE ID's + // WATCH OUT FOR TEXTURE ID's public GT_Block_Casings8() { super(GT_Item_Casings8.class, "gt.blockcasings8", GT_Material_Casings.INSTANCE, 10); /* @@ -29,9 +29,12 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Mining Neutronium Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Mining Black Plutonium Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Extreme Engine Intake Casing"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Europium Reinforced Radiation Proof Machine Casing"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Advanced Rhodium Plated Palladium Machine Casing"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Advanced Iridium Plated Machine Casing"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".5.name", "Europium Reinforced Radiation Proof Machine Casing"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".6.name", "Advanced Rhodium Plated Palladium Machine Casing"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".7.name", "Advanced Iridium Plated Machine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Magical Machine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "HSS-S Turbine Casing"); @@ -56,26 +59,27 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { @SideOnly(Side.CLIENT) public IIcon getIcon(int aSide, int aMeta) { switch (aMeta) { - case 0: - return Textures.BlockIcons.MACHINE_CASING_CHEMICALLY_INERT.getIcon(); - case 1: - return Textures.BlockIcons.MACHINE_CASING_PIPE_POLYTETRAFLUOROETHYLENE.getIcon(); - case 2: - return Textures.BlockIcons.MACHINE_CASING_MINING_NEUTRONIUM.getIcon(); - case 3: - return Textures.BlockIcons.MACHINE_CASING_MINING_BLACKPLUTONIUM.getIcon(); - case 4: - return Textures.BlockIcons.MACHINE_CASING_EXTREME_ENGINE_INTAKE.getIcon();//changed color in a terrible way - case 5: - return Textures.BlockIcons.MACHINE_CASING_ADVANCEDRADIATIONPROOF.getIcon(); - case 6: - return Textures.BlockIcons.MACHINE_CASING_RHODIUM_PALLADIUM.getIcon(); - case 7: - return Textures.BlockIcons.MACHINE_CASING_IRIDIUM.getIcon(); - case 8: - return Textures.BlockIcons.MACHINE_CASING_MAGICAL.getIcon(); - case 9: - return Textures.BlockIcons.MACHINE_CASING_ADVANCEDGAS.getIcon(); + case 0: + return Textures.BlockIcons.MACHINE_CASING_CHEMICALLY_INERT.getIcon(); + case 1: + return Textures.BlockIcons.MACHINE_CASING_PIPE_POLYTETRAFLUOROETHYLENE.getIcon(); + case 2: + return Textures.BlockIcons.MACHINE_CASING_MINING_NEUTRONIUM.getIcon(); + case 3: + return Textures.BlockIcons.MACHINE_CASING_MINING_BLACKPLUTONIUM.getIcon(); + case 4: + return Textures.BlockIcons.MACHINE_CASING_EXTREME_ENGINE_INTAKE + .getIcon(); // changed color in a terrible way + case 5: + return Textures.BlockIcons.MACHINE_CASING_ADVANCEDRADIATIONPROOF.getIcon(); + case 6: + return Textures.BlockIcons.MACHINE_CASING_RHODIUM_PALLADIUM.getIcon(); + case 7: + return Textures.BlockIcons.MACHINE_CASING_IRIDIUM.getIcon(); + case 8: + return Textures.BlockIcons.MACHINE_CASING_MAGICAL.getIcon(); + case 9: + return Textures.BlockIcons.MACHINE_CASING_ADVANCEDGAS.getIcon(); } return Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); } @@ -84,18 +88,30 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { public IIcon getTurbineCasing(int meta, int iconIndex, boolean active) { switch (meta) { case 9: - return active ? Textures.BlockIcons.TURBINE_ADVGASACTIVE[iconIndex].getIcon() : Textures.BlockIcons.TURBINEADVGAS[iconIndex].getIcon(); + return active + ? Textures.BlockIcons.TURBINE_ADVGASACTIVE[iconIndex].getIcon() + : Textures.BlockIcons.TURBINEADVGAS[iconIndex].getIcon(); default: - return active ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() : Textures.BlockIcons.TURBINE[iconIndex].getIcon(); + return active + ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE[iconIndex].getIcon(); } } public IIcon getTurbineCasing(int meta, int iconIndex, boolean active, boolean hasTurbine) { switch (meta) { case 9: - return active ? Textures.BlockIcons.TURBINE_ADVGASACTIVE[iconIndex].getIcon() : hasTurbine ? Textures.BlockIcons.TURBINEADVGAS[iconIndex].getIcon() : Textures.BlockIcons.TURBINE_ADVGASEMPTY[iconIndex].getIcon(); + return active + ? Textures.BlockIcons.TURBINE_ADVGASACTIVE[iconIndex].getIcon() + : hasTurbine + ? Textures.BlockIcons.TURBINEADVGAS[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE_ADVGASEMPTY[iconIndex].getIcon(); default: - return active ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() : hasTurbine ? Textures.BlockIcons.TURBINE[iconIndex].getIcon() : Textures.BlockIcons.TURBINE_EMPTY[iconIndex].getIcon(); + return active + ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() + : hasTurbine + ? Textures.BlockIcons.TURBINE[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE_EMPTY[iconIndex].getIcon(); } } @@ -124,10 +140,10 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { case 0: for (int i = -1; i < 2; i++) { for (int j = -1; j < 2; j++) { - if (i == 0 && j == 0) - continue; + if (i == 0 && j == 0) continue; int tState; - if ((tState = isTurbineControllerWithSide(aWorld, xCoord + j, yCoord, zCoord + i, aSide)) != 0) { + if ((tState = isTurbineControllerWithSide(aWorld, xCoord + j, yCoord, zCoord + i, aSide)) + != 0) { return getTurbineCasing(tMeta, 4 - i * 3 - j, tState == 1, tState == 2); } } @@ -136,11 +152,12 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { case 1: for (int i = -1; i < 2; i++) { for (int j = -1; j < 2; j++) { - if (i == 0 && j == 0) - continue; + if (i == 0 && j == 0) continue; int tState; - if ((tState = isTurbineControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, aSide)) != 0) { - return getTurbineCasing(tMeta, 4 + i * 3 - j * tInvertLeftRightMod, tState == 1, tState == 2); + if ((tState = isTurbineControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, aSide)) + != 0) { + return getTurbineCasing( + tMeta, 4 + i * 3 - j * tInvertLeftRightMod, tState == 1, tState == 2); } } } @@ -148,11 +165,12 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { case 2: for (int i = -1; i < 2; i++) { for (int j = -1; j < 2; j++) { - if (i == 0 && j == 0) - continue; + if (i == 0 && j == 0) continue; int tState; - if ((tState = isTurbineControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, aSide)) != 0) { - return getTurbineCasing(tMeta, 4 + i * 3 + j * tInvertLeftRightMod, tState == 1, tState == 2); + if ((tState = isTurbineControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, aSide)) + != 0) { + return getTurbineCasing( + tMeta, 4 + i * 3 + j * tInvertLeftRightMod, tState == 1, tState == 2); } } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings_Abstract.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings_Abstract.java index 7045949920..452ed16d44 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings_Abstract.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings_Abstract.java @@ -7,6 +7,7 @@ import gregtech.api.enums.Textures; import gregtech.api.items.GT_Generic_Block; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_LanguageManager; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -21,9 +22,8 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import java.util.List; - -public abstract class GT_Block_Casings_Abstract extends GT_Generic_Block implements gregtech.api.interfaces.IHasIndexedTexture { +public abstract class GT_Block_Casings_Abstract extends GT_Generic_Block + implements gregtech.api.interfaces.IHasIndexedTexture { public GT_Block_Casings_Abstract(Class<? extends ItemBlock> aItemClass, String aName, Material aMaterial) { super(aItemClass, aName, aMaterial); setStepSound(soundTypeMetal); @@ -32,7 +32,8 @@ public abstract class GT_Block_Casings_Abstract extends GT_Generic_Block impleme GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + 32767 + ".name", "Any Sub Block of this"); } - public GT_Block_Casings_Abstract(Class<? extends ItemBlock> aItemClass, String aName, Material aMaterial, int aMaxMeta) { + public GT_Block_Casings_Abstract( + Class<? extends ItemBlock> aItemClass, String aName, Material aMaterial, int aMaxMeta) { this(aItemClass, aName, aMaterial); for (int i = 0; i < aMaxMeta; i++) { Textures.BlockIcons.setCasingTextureForId(getTextureIndex(i), TextureFactory.of(this, i)); @@ -115,8 +116,7 @@ public abstract class GT_Block_Casings_Abstract extends GT_Generic_Block impleme @Override @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister aIconRegister) { - } + public void registerBlockIcons(IIconRegister aIconRegister) {} @Override @SideOnly(Side.CLIENT) diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java b/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java index 0c98bab9c0..7debd01173 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java @@ -11,11 +11,11 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.World; -public class GT_Block_Concretes extends GT_Block_Stones_Abstract implements IBlockOnWalkOver{ +public class GT_Block_Concretes extends GT_Block_Stones_Abstract implements IBlockOnWalkOver { public GT_Block_Concretes() { super(GT_Item_Concretes.class, "gt.blockconcretes"); setResistance(20.0F); - //this.slipperiness = 0.9F; + // this.slipperiness = 0.9F; GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Dark Concrete"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Dark Concrete Cobblestone"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Mossy Dark Concrete Cobblestone"); @@ -70,9 +70,13 @@ public class GT_Block_Concretes extends GT_Block_Stones_Abstract implements IBlo @Override public void onWalkOver(EntityLivingBase aEntity, World aWorld, int aX, int aY, int aZ) { - if ((aEntity.motionX != 0 || aEntity.motionZ != 0) && !aEntity.isInWater() && !aEntity.isWet() && !aEntity.isSneaking()) { - double tSpeed = (aWorld.getBlock(aX, aY-1, aZ).slipperiness >= 0.8 ? 1.5 : 1.2); - aEntity.motionX *= tSpeed; aEntity.motionZ *= tSpeed; + if ((aEntity.motionX != 0 || aEntity.motionZ != 0) + && !aEntity.isInWater() + && !aEntity.isWet() + && !aEntity.isSneaking()) { + double tSpeed = (aWorld.getBlock(aX, aY - 1, aZ).slipperiness >= 0.8 ? 1.5 : 1.2); + aEntity.motionX *= tSpeed; + aEntity.motionZ *= tSpeed; } } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java index 63626928bf..ea1df39932 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java @@ -1,4 +1,7 @@ package gregtech.common.blocks; + +import static gregtech.GT_Mod.GT_FML_LOGGER; +import static gregtech.api.enums.GT_Values.SIDE_UP; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; import com.cricketcraft.chisel.api.IFacade; @@ -23,6 +26,10 @@ import gregtech.api.util.GT_Utility; import gregtech.common.render.GT_Renderer_Block; import gregtech.common.tileentities.storage.GT_MetaTileEntity_QuantumChest; import gregtech.common.tileentities.storage.GT_MetaTileEntity_SuperChest; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.ITileEntityProvider; import net.minecraft.client.renderer.texture.IIconRegister; @@ -39,22 +46,12 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.IIcon; -import net.minecraft.util.MathHelper; import net.minecraft.util.StatCollector; import net.minecraft.world.Explosion; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Random; - -import static gregtech.GT_Mod.GT_FML_LOGGER; -import static gregtech.api.enums.GT_Values.SIDE_UP; -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; - @Optional.Interface(iface = "com.cricketcraft.chisel.api.IFacade", modid = "ChiselAPI") public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlock, ITileEntityProvider, IFacade { private static final ThreadLocal<IGregTechTileEntity> mTemporaryTileEntity = new ThreadLocal<>(); @@ -231,8 +228,8 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo public void addCollisionBoxesToList( World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List outputAABB, Entity collider) { final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity instanceof IGregTechTileEntity && - ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { + if (tTileEntity instanceof IGregTechTileEntity + && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { ((IGregTechTileEntity) tTileEntity) .addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider); return; @@ -243,8 +240,8 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo @Override public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity instanceof IGregTechTileEntity && - ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { + if (tTileEntity instanceof IGregTechTileEntity + && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { return ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); } return super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); @@ -254,19 +251,21 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo @SideOnly(Side.CLIENT) public AxisAlignedBB getSelectedBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity instanceof IGregTechTileEntity && - ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { + if (tTileEntity instanceof IGregTechTileEntity + && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { return ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); } return super.getSelectedBoundingBoxFromPool(aWorld, aX, aY, aZ); } - @Override //THIS + @Override // THIS public void setBlockBoundsBasedOnState(IBlockAccess blockAccess, int aX, int aY, int aZ) { final TileEntity tTileEntity = blockAccess.getTileEntity(aX, aY, aZ); - if (tTileEntity instanceof IGregTechTileEntity && (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null)) { - final AxisAlignedBB bbb = ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(((IGregTechTileEntity) tTileEntity).getWorld(), 0, 0, 0); - minX = bbb.minX; //This essentially sets block bounds + if (tTileEntity instanceof IGregTechTileEntity + && (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null)) { + final AxisAlignedBB bbb = ((IGregTechTileEntity) tTileEntity) + .getCollisionBoundingBoxFromPool(((IGregTechTileEntity) tTileEntity).getWorld(), 0, 0, 0); + minX = bbb.minX; // This essentially sets block bounds minY = bbb.minY; minZ = bbb.minZ; maxX = bbb.maxX; @@ -285,8 +284,8 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo @Override public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity collider) { final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity instanceof IGregTechTileEntity && - ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { + if (tTileEntity instanceof IGregTechTileEntity + && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { ((IGregTechTileEntity) tTileEntity).onEntityCollidedWithBlock(aWorld, aX, aY, aZ, collider); return; } @@ -334,27 +333,35 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo @Override public float getPlayerRelativeBlockHardness(EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) { final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof BaseMetaTileEntity && - ((BaseMetaTileEntity) tTileEntity).privateAccess() && - !((BaseMetaTileEntity) tTileEntity).playerOwnsThis(aPlayer, true) ? - -1.0F : super.getPlayerRelativeBlockHardness(aPlayer, aWorld, aX, aY, aZ); - } - - @Override - public boolean onBlockActivated(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer, int aSide, float aOffsetX, float aOffsetY, float aOffsetZ) { + return tTileEntity instanceof BaseMetaTileEntity + && ((BaseMetaTileEntity) tTileEntity).privateAccess() + && !((BaseMetaTileEntity) tTileEntity).playerOwnsThis(aPlayer, true) + ? -1.0F + : super.getPlayerRelativeBlockHardness(aPlayer, aWorld, aX, aY, aZ); + } + + @Override + public boolean onBlockActivated( + World aWorld, + int aX, + int aY, + int aZ, + EntityPlayer aPlayer, + int aSide, + float aOffsetX, + float aOffsetY, + float aOffsetZ) { final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity == null) { return false; } if (aPlayer.isSneaking()) { final ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem(); - if ( - tCurrentItem != null && - !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sScrewdriverList) && - !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWrenchList) && - !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWireCutterList) && - !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSolderingToolList) - ) return false; + if (tCurrentItem != null + && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sScrewdriverList) + && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWrenchList) + && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWireCutterList) + && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSolderingToolList)) return false; } if ((tTileEntity instanceof IGregTechTileEntity)) { if (((IGregTechTileEntity) tTileEntity).getTimer() < 50L) { @@ -363,7 +370,8 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo if ((!aWorld.isRemote) && !((IGregTechTileEntity) tTileEntity).isUseableByPlayer(aPlayer)) { return true; } - return ((IGregTechTileEntity) tTileEntity).onRightclick(aPlayer, (byte) aSide, aOffsetX, aOffsetY, aOffsetZ); + return ((IGregTechTileEntity) tTileEntity) + .onRightclick(aPlayer, (byte) aSide, aOffsetX, aOffsetY, aOffsetZ); } return false; } @@ -389,7 +397,9 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo public void onBlockExploded(World aWorld, int aX, int aY, int aZ, Explosion aExplosion) { final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity instanceof BaseMetaTileEntity) { - GT_Log.exp.printf("Explosion at : %d | %d | %d DIMID: %s due to near explosion!%n", aX, aY, aZ, aWorld.provider.dimensionId); + GT_Log.exp.printf( + "Explosion at : %d | %d | %d DIMID: %s due to near explosion!%n", + aX, aY, aZ, aWorld.provider.dimensionId); ((BaseMetaTileEntity) tTileEntity).doEnergyExplosion(); } super.onBlockExploded(aWorld, aX, aY, aZ, aExplosion); @@ -402,18 +412,20 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo if (tTileEntity instanceof IGregTechTileEntity) { final IGregTechTileEntity tGregTechTileEntity = (IGregTechTileEntity) tTileEntity; mTemporaryTileEntity.set(tGregTechTileEntity); - if (!(tGregTechTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_SuperChest || tGregTechTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_QuantumChest)) { + if (!(tGregTechTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_SuperChest + || tGregTechTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_QuantumChest)) { for (int i = 0; i < tGregTechTileEntity.getSizeInventory(); i++) { final ItemStack tItem = tGregTechTileEntity.getStackInSlot(i); if ((tItem != null) && (tItem.stackSize > 0) && (tGregTechTileEntity.isValidSlot(i))) { final EntityItem tItemEntity = new EntityItem( - aWorld, - aX + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, - aY + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, - aZ + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, - new ItemStack(tItem.getItem(), tItem.stackSize, tItem.getItemDamage())); + aWorld, + aX + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, + aY + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, + aZ + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, + new ItemStack(tItem.getItem(), tItem.stackSize, tItem.getItemDamage())); if (tItem.hasTagCompound()) { - tItemEntity.getEntityItem().setTagCompound((NBTTagCompound) tItem.getTagCompound().copy()); + tItemEntity.getEntityItem().setTagCompound((NBTTagCompound) + tItem.getTagCompound().copy()); } tItemEntity.motionX = (XSTR_INSTANCE.nextGaussian() * 0.05D); tItemEntity.motionY = (XSTR_INSTANCE.nextGaussian() * 0.25D); @@ -492,12 +504,14 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo } @Override - public void dropBlockAsItemWithChance(World aWorld, int aX, int aY, int aZ, int aMetadata, float chance, int aFortune) { + public void dropBlockAsItemWithChance( + World aWorld, int aX, int aY, int aZ, int aMetadata, float chance, int aFortune) { if (!aWorld.isRemote) { final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity != null && (chance < 1.0F)) { if (tTileEntity instanceof BaseMetaTileEntity && (GregTech_API.sMachineNonWrenchExplosions)) { - GT_Log.exp.printf("Explosion at : %d | %d | %d DIMID: %s NonWrench picking/Rain!%n", + GT_Log.exp.printf( + "Explosion at : %d | %d | %d DIMID: %s NonWrench picking/Rain!%n", aX, aY, aZ, aWorld.provider.dimensionId); ((BaseMetaTileEntity) tTileEntity).doEnergyExplosion(); } @@ -517,12 +531,12 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo if (tTileEntity instanceof BaseMetaTileEntity) { return true; } - if (tTileEntity instanceof BaseMetaPipeEntity && - (((BaseMetaPipeEntity) tTileEntity).mConnections & 0xFFFFFFC0) != 0) { + if (tTileEntity instanceof BaseMetaPipeEntity + && (((BaseMetaPipeEntity) tTileEntity).mConnections & 0xFFFFFFC0) != 0) { return true; } - return tTileEntity instanceof ICoverable && - ((ICoverable) tTileEntity).getCoverIDAtSide((byte) aSide.ordinal()) != 0; + return tTileEntity instanceof ICoverable + && ((ICoverable) tTileEntity).getCoverIDAtSide((byte) aSide.ordinal()) != 0; } return false; } @@ -537,8 +551,7 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo */ @SideOnly(Side.CLIENT) @Override - public float getAmbientOcclusionLightValue() - { + public float getAmbientOcclusionLightValue() { return this.renderAsNormalBlock() ? 0.2F : 0.5F; } @@ -582,8 +595,14 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo @Override public float getExplosionResistance( - Entity entity, World aWorld, int aX, int aY, int aZ, - double explosionX, double explosionY, double explosionZ) { + Entity entity, + World aWorld, + int aX, + int aY, + int aZ, + double explosionX, + double explosionY, + double explosionZ) { final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity instanceof IGregTechTileEntity) { return ((IGregTechTileEntity) tTileEntity).getBlastResistance((byte) 6); @@ -607,7 +626,8 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (!(tTileEntity instanceof IGregTechTileEntity)) return; final IGregTechTileEntity iGregTechTileEntity = (IGregTechTileEntity) tTileEntity; - iGregTechTileEntity.setFrontFacing(BaseTileEntity.getSideForPlayerPlacing(aPlayer, SIDE_UP, iGregTechTileEntity.getValidFacings())); + iGregTechTileEntity.setFrontFacing( + BaseTileEntity.getSideForPlayerPlacing(aPlayer, SIDE_UP, iGregTechTileEntity.getValidFacings())); } @Override @@ -639,13 +659,16 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo final byte aSide = (byte) side; final CoverableTileEntity tile = (CoverableTileEntity) tTileEntity; if (side != -1) { - final Block facadeBlock = tile.getCoverBehaviorAtSideNew(aSide).getFacadeBlock(aSide, tile.getCoverIDAtSide(aSide), tile.getComplexCoverDataAtSide(aSide), tile); + final Block facadeBlock = tile.getCoverBehaviorAtSideNew(aSide) + .getFacadeBlock( + aSide, tile.getCoverIDAtSide(aSide), tile.getComplexCoverDataAtSide(aSide), tile); if (facadeBlock != null) return facadeBlock; } else { // we do not allow more than one type of facade per block, so no need to check every side // see comment in gregtech.common.covers.GT_Cover_FacadeBase.isCoverPlaceable for (byte i = 0; i < 6; i++) { - final Block facadeBlock = tile.getCoverBehaviorAtSideNew(i).getFacadeBlock(i, tile.getCoverIDAtSide(i), tile.getComplexCoverDataAtSide(i), tile); + final Block facadeBlock = tile.getCoverBehaviorAtSideNew(i) + .getFacadeBlock(i, tile.getCoverIDAtSide(i), tile.getComplexCoverDataAtSide(i), tile); if (facadeBlock != null) { return facadeBlock; } @@ -662,16 +685,22 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo final byte aSide = (byte) side; final CoverableTileEntity tile = (CoverableTileEntity) tTileEntity; if (side != -1) { - final Block facadeBlock = tile.getCoverBehaviorAtSideNew(aSide).getFacadeBlock(aSide, tile.getCoverIDAtSide(aSide), tile.getComplexCoverDataAtSide(aSide), tile); + final Block facadeBlock = tile.getCoverBehaviorAtSideNew(aSide) + .getFacadeBlock( + aSide, tile.getCoverIDAtSide(aSide), tile.getComplexCoverDataAtSide(aSide), tile); if (facadeBlock != null) - return tile.getCoverBehaviorAtSideNew(aSide).getFacadeMeta(aSide, tile.getCoverIDAtSide(aSide), tile.getComplexCoverDataAtSide(aSide), tile); + return tile.getCoverBehaviorAtSideNew(aSide) + .getFacadeMeta( + aSide, tile.getCoverIDAtSide(aSide), tile.getComplexCoverDataAtSide(aSide), tile); } else { // we do not allow more than one type of facade per block, so no need to check every side // see comment in gregtech.common.covers.GT_Cover_FacadeBase.isCoverPlaceable for (byte i = 0; i < 6; i++) { - final Block facadeBlock = tile.getCoverBehaviorAtSideNew(i).getFacadeBlock(i, tile.getCoverIDAtSide(i), tile.getComplexCoverDataAtSide(i), tile); + final Block facadeBlock = tile.getCoverBehaviorAtSideNew(i) + .getFacadeBlock(i, tile.getCoverIDAtSide(i), tile.getComplexCoverDataAtSide(i), tile); if (facadeBlock != null) { - return tile.getCoverBehaviorAtSideNew(i).getFacadeMeta(i, tile.getCoverIDAtSide(i), tile.getComplexCoverDataAtSide(i), tile); + return tile.getCoverBehaviorAtSideNew(i) + .getFacadeMeta(i, tile.getCoverIDAtSide(i), tile.getComplexCoverDataAtSide(i), tile); } } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Metal.java b/src/main/java/gregtech/common/blocks/GT_Block_Metal.java index 7fcfd7a29a..2bb703a2f9 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Metal.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Metal.java @@ -26,11 +26,13 @@ public class GT_Block_Metal extends GT_Block_Storage { for (int i = 0; i < aMats.length; i++) { if (aMats[i].mMetaItemSubID > 0 && aMats[i].mHasParentMod) { - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + i + ".name", "Block of " + (GT_LanguageManager.i18nPlaceholder ? "%material" : aMats[i].mDefaultLocalName)); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + "." + i + ".name", + "Block of " + (GT_LanguageManager.i18nPlaceholder ? "%material" : aMats[i].mDefaultLocalName)); GT_OreDictUnificator.registerOre(aPrefix, aMats[i], new ItemStack(this, 1, i)); } } - if (aMats.length<16 && mNEIisLoaded) { + if (aMats.length < 16 && mNEIisLoaded) { for (int i = aMats.length; i < 16; i++) codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i)); } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores.java index 3af861e167..3f0c829b50 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores.java @@ -1,5 +1,10 @@ package gregtech.common.blocks; +import static gregtech.api.enums.Textures.BlockIcons.BASALT_STONE; +import static gregtech.api.enums.Textures.BlockIcons.GRANITE_BLACK_STONE; +import static gregtech.api.enums.Textures.BlockIcons.GRANITE_RED_STONE; +import static gregtech.api.enums.Textures.BlockIcons.MARBLE_STONE; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.GT_Mod; @@ -8,6 +13,7 @@ import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.ITexture; import gregtech.api.render.TextureFactory; +import java.util.Arrays; import net.minecraft.block.Block; import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; @@ -16,13 +22,6 @@ import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import java.util.Arrays; - -import static gregtech.api.enums.Textures.BlockIcons.BASALT_STONE; -import static gregtech.api.enums.Textures.BlockIcons.GRANITE_BLACK_STONE; -import static gregtech.api.enums.Textures.BlockIcons.GRANITE_RED_STONE; -import static gregtech.api.enums.Textures.BlockIcons.MARBLE_STONE; - public class GT_Block_Ores extends GT_Block_Ores_Abstract { private static final String UNLOCALIZED_NAME = "gt.blockores"; @@ -36,8 +35,18 @@ public class GT_Block_Ores extends GT_Block_Ores_Abstract { } @Override - public OrePrefixes[] getProcessingPrefix() { //Must have 8 entries; an entry can be null to disable automatic recipes. - return new OrePrefixes[]{OrePrefixes.ore, OrePrefixes.oreNetherrack, OrePrefixes.oreEndstone, OrePrefixes.oreBlackgranite, OrePrefixes.oreRedgranite, OrePrefixes.oreMarble, OrePrefixes.oreBasalt, null}; + public OrePrefixes[] + getProcessingPrefix() { // Must have 8 entries; an entry can be null to disable automatic recipes. + return new OrePrefixes[] { + OrePrefixes.ore, + OrePrefixes.oreNetherrack, + OrePrefixes.oreEndstone, + OrePrefixes.oreBlackgranite, + OrePrefixes.oreRedgranite, + OrePrefixes.oreMarble, + OrePrefixes.oreBasalt, + null + }; } @Override @@ -100,25 +109,49 @@ public class GT_Block_Ores extends GT_Block_Ores_Abstract { } @Override - public Materials[] getDroppedDusts() { //Must have 8 entries; can be null. - return new Materials[]{Materials.Stone, Materials.Netherrack, Materials.Endstone, Materials.GraniteBlack, Materials.GraniteRed, Materials.Marble, Materials.Basalt, Materials.Stone}; + public Materials[] getDroppedDusts() { // Must have 8 entries; can be null. + return new Materials[] { + Materials.Stone, + Materials.Netherrack, + Materials.Endstone, + Materials.GraniteBlack, + Materials.GraniteRed, + Materials.Marble, + Materials.Basalt, + Materials.Stone + }; } @Override public boolean[] getEnabledMetas() { - return new boolean[]{true, true, true, GT_Mod.gregtechproxy.enableBlackGraniteOres, GT_Mod.gregtechproxy.enableRedGraniteOres, GT_Mod.gregtechproxy.enableMarbleOres, GT_Mod.gregtechproxy.enableBasaltOres, true}; + return new boolean[] { + true, + true, + true, + GT_Mod.gregtechproxy.enableBlackGraniteOres, + GT_Mod.gregtechproxy.enableRedGraniteOres, + GT_Mod.gregtechproxy.enableMarbleOres, + GT_Mod.gregtechproxy.enableBasaltOres, + true + }; } @Override public ITexture[] getTextureSet() { - final ITexture[] rTextures = new ITexture[16]; //Must have 16 entries. + final ITexture[] rTextures = new ITexture[16]; // Must have 16 entries. Arrays.fill(rTextures, TextureFactory.of(Blocks.stone)); rTextures[1] = TextureFactory.of(Blocks.netherrack); rTextures[2] = TextureFactory.of(Blocks.end_stone); - rTextures[3] = TextureFactory.builder().addIcon(GRANITE_BLACK_STONE).stdOrient().build(); - rTextures[4] = TextureFactory.builder().addIcon(GRANITE_RED_STONE).stdOrient().build(); - rTextures[5] = TextureFactory.builder().addIcon(MARBLE_STONE).stdOrient().build(); - rTextures[6] = TextureFactory.builder().addIcon(BASALT_STONE).stdOrient().build(); + rTextures[3] = TextureFactory.builder() + .addIcon(GRANITE_BLACK_STONE) + .stdOrient() + .build(); + rTextures[4] = + TextureFactory.builder().addIcon(GRANITE_RED_STONE).stdOrient().build(); + rTextures[5] = + TextureFactory.builder().addIcon(MARBLE_STONE).stdOrient().build(); + rTextures[6] = + TextureFactory.builder().addIcon(BASALT_STONE).stdOrient().build(); return rTextures; } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java index 3a7f231761..93aa9992ea 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java @@ -14,6 +14,10 @@ import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.common.render.GT_Renderer_Block; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; import net.minecraft.block.Block; import net.minecraft.block.ITileEntityProvider; import net.minecraft.block.material.Material; @@ -33,11 +37,6 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements ITileEntityProvider { private static final String DOT_NAME = ".name"; public static ThreadLocal<GT_TileEntity_Ores> mTemporaryTileEntity = new ThreadLocal<>(); @@ -45,7 +44,8 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements public static boolean tHideOres; public static Set<Materials> aBlockedOres = new HashSet<>(); - protected GT_Block_Ores_Abstract(String aUnlocalizedName, int aOreMetaCount, boolean aHideFirstMeta, Material aMaterial) { + protected GT_Block_Ores_Abstract( + String aUnlocalizedName, int aOreMetaCount, boolean aHideFirstMeta, Material aMaterial) { super(GT_Item_Ores.class, aUnlocalizedName, aMaterial); this.isBlockContainer = true; setStepSound(soundTypeStone); @@ -60,10 +60,24 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements if (GregTech_API.sGeneratedMaterials[i] != null) { for (int j = 0; j < aOreMetaCount; j++) { if (!this.getEnabledMetas()[j]) continue; - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + (j * 1000)) + DOT_NAME, GT_LanguageManager.i18nPlaceholder ? getLocalizedNameFormat(GregTech_API.sGeneratedMaterials[i]) : getLocalizedName(GregTech_API.sGeneratedMaterials[i])); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + ((i + 16000) + (j * 1000)) + DOT_NAME, "Small " + (GT_LanguageManager.i18nPlaceholder ? getLocalizedNameFormat(GregTech_API.sGeneratedMaterials[i]) : getLocalizedName(GregTech_API.sGeneratedMaterials[i]))); - if ((GregTech_API.sGeneratedMaterials[i].mTypes & 0x8) != 0 && !aBlockedOres.contains(GregTech_API.sGeneratedMaterials[i])) { - GT_OreDictUnificator.registerOre(this.getProcessingPrefix()[j] != null ? this.getProcessingPrefix()[j].get(GregTech_API.sGeneratedMaterials[i]) : "", new ItemStack(this, 1, i + (j * 1000))); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + "." + (i + (j * 1000)) + DOT_NAME, + GT_LanguageManager.i18nPlaceholder + ? getLocalizedNameFormat(GregTech_API.sGeneratedMaterials[i]) + : getLocalizedName(GregTech_API.sGeneratedMaterials[i])); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + "." + ((i + 16000) + (j * 1000)) + DOT_NAME, + "Small " + + (GT_LanguageManager.i18nPlaceholder + ? getLocalizedNameFormat(GregTech_API.sGeneratedMaterials[i]) + : getLocalizedName(GregTech_API.sGeneratedMaterials[i]))); + if ((GregTech_API.sGeneratedMaterials[i].mTypes & 0x8) != 0 + && !aBlockedOres.contains(GregTech_API.sGeneratedMaterials[i])) { + GT_OreDictUnificator.registerOre( + this.getProcessingPrefix()[j] != null + ? this.getProcessingPrefix()[j].get(GregTech_API.sGeneratedMaterials[i]) + : "", + new ItemStack(this, 1, i + (j * 1000))); if (tHideOres) { if (!(j == 0 && !aHideFirstMeta)) { codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + (j * 1000))); @@ -138,7 +152,16 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements } @Override - public boolean onBlockActivated(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer, int aSide, float aOffsetX, float aOffsetY, float aOffsetZ) { + public boolean onBlockActivated( + World aWorld, + int aX, + int aY, + int aZ, + EntityPlayer aPlayer, + int aSide, + float aOffsetX, + float aOffsetY, + float aOffsetZ) { if (!aPlayer.isSneaking() || !aPlayer.capabilities.isCreativeMode) { return false; } @@ -154,7 +177,8 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements } @Override - public boolean onBlockEventReceived(World p_149696_1_, int p_149696_2_, int p_149696_3_, int p_149696_4_, int p_149696_5_, int p_149696_6_) { + public boolean onBlockEventReceived( + World p_149696_1_, int p_149696_2_, int p_149696_3_, int p_149696_4_, int p_149696_5_, int p_149696_6_) { super.onBlockEventReceived(p_149696_1_, p_149696_2_, p_149696_3_, p_149696_4_, p_149696_5_, p_149696_6_); TileEntity tileentity = p_149696_1_.getTileEntity(p_149696_2_, p_149696_3_, p_149696_4_); return tileentity != null && tileentity.receiveClientEvent(p_149696_5_, p_149696_6_); @@ -181,7 +205,15 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements } @Override - public float getExplosionResistance(Entity entity, World aWorld, int aX, int aY, int aZ, double explosionX, double explosionY, double explosionZ) { + public float getExplosionResistance( + Entity entity, + World aWorld, + int aX, + int aY, + int aZ, + double explosionX, + double explosionY, + double explosionZ) { return 1.0F + getHarvestLevel(aWorld.getBlockMetadata(aX, aY, aZ)) * 1.0F; } @@ -240,13 +272,13 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements @Override @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister aIconRegister) { - } + public void registerBlockIcons(IIconRegister aIconRegister) {} @Override @SideOnly(Side.CLIENT) public boolean addHitEffects(World worldObj, MovingObjectPosition target, EffectRenderer effectRenderer) { - GT_Renderer_Block.addHitEffects(effectRenderer, this, worldObj, target.blockX, target.blockY, target.blockZ, target.sideHit); + GT_Renderer_Block.addHitEffects( + effectRenderer, this, worldObj, target.blockX, target.blockY, target.blockZ, target.sideHit); return true; } @@ -276,13 +308,14 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements aWorld.removeTileEntity(aX, aY, aZ); } - public abstract OrePrefixes[] getProcessingPrefix(); //Must have 8 entries; an entry can be null to disable automatic recipes. + public abstract OrePrefixes[] + getProcessingPrefix(); // Must have 8 entries; an entry can be null to disable automatic recipes. - public abstract boolean[] getEnabledMetas(); //Must have 8 entries. + public abstract boolean[] getEnabledMetas(); // Must have 8 entries. public abstract Block getDroppedBlock(); - public abstract Materials[] getDroppedDusts(); //Must have 8 entries; can be null. + public abstract Materials[] getDroppedDusts(); // Must have 8 entries; can be null. @Override public ArrayList<ItemStack> getDrops(World aWorld, int aX, int aY, int aZ, int aMeta, int aFortune) { @@ -290,7 +323,9 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements if ((tTileEntity instanceof GT_TileEntity_Ores)) { return ((GT_TileEntity_Ores) tTileEntity).getDrops(getDroppedBlock(), aFortune); } - return mTemporaryTileEntity.get() == null ? new ArrayList<>() : mTemporaryTileEntity.get().getDrops(getDroppedBlock(), aFortune); + return mTemporaryTileEntity.get() == null + ? new ArrayList<>() + : mTemporaryTileEntity.get().getDrops(getDroppedBlock(), aFortune); } @Override @@ -298,7 +333,7 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements return new GT_TileEntity_Ores(); } - public abstract ITexture[] getTextureSet(); //Must have 16 entries. + public abstract ITexture[] getTextureSet(); // Must have 16 entries. @SuppressWarnings({"unchecked"}) @Override diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB1.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB1.java index f749b8ac5b..73fe674fbe 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB1.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB1.java @@ -25,10 +25,19 @@ public class GT_Block_Ores_UB1 extends GT_Block_Ores_Abstract { } @Override - public OrePrefixes[] getProcessingPrefix() { //Must have 8 entries. - return new OrePrefixes[]{OrePrefixes.oreRedgranite, OrePrefixes.oreBlackgranite, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.oreBasalt, OrePrefixes.ore, OrePrefixes.ore}; + public OrePrefixes[] getProcessingPrefix() { // Must have 8 entries. + return new OrePrefixes[] { + OrePrefixes.oreRedgranite, + OrePrefixes.oreBlackgranite, + OrePrefixes.ore, + OrePrefixes.ore, + OrePrefixes.ore, + OrePrefixes.oreBasalt, + OrePrefixes.ore, + OrePrefixes.ore + }; } - + @Override public IIcon getIcon(int side, int meta) { return aUBBlock.getIcon(side, (meta / 1000) % 8); @@ -45,17 +54,43 @@ public class GT_Block_Ores_UB1 extends GT_Block_Ores_Abstract { } @Override - public Materials[] getDroppedDusts() { //Must have 8 entries; can be null. - return new Materials[]{Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone}; + public Materials[] getDroppedDusts() { // Must have 8 entries; can be null. + return new Materials[] { + Materials.Stone, + Materials.Stone, + Materials.Stone, + Materials.Stone, + Materials.Stone, + Materials.Stone, + Materials.Stone, + Materials.Stone + }; } @Override public boolean[] getEnabledMetas() { - return new boolean[]{true, true, true, true, true, true, true, true}; + return new boolean[] {true, true, true, true, true, true, true, true}; } @Override - public ITexture[] getTextureSet() { //Must have 16 entries. - return new ITexture[]{TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), TextureFactory.of(aUBBlock, 2), TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), TextureFactory.of(aUBBlock, 5), TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7), TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), TextureFactory.of(aUBBlock, 2), TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), TextureFactory.of(aUBBlock, 5), TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7)}; + public ITexture[] getTextureSet() { // Must have 16 entries. + return new ITexture[] { + TextureFactory.of(aUBBlock, 0), + TextureFactory.of(aUBBlock, 1), + TextureFactory.of(aUBBlock, 2), + TextureFactory.of(aUBBlock, 3), + TextureFactory.of(aUBBlock, 4), + TextureFactory.of(aUBBlock, 5), + TextureFactory.of(aUBBlock, 6), + TextureFactory.of(aUBBlock, 7), + TextureFactory.of(aUBBlock, 0), + TextureFactory.of(aUBBlock, 1), + TextureFactory.of(aUBBlock, 2), + TextureFactory.of(aUBBlock, 3), + TextureFactory.of(aUBBlock, 4), + TextureFactory.of(aUBBlock, 5), + TextureFactory.of(aUBBlock, 6), + TextureFactory.of(aUBBlock, 7) + }; } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB2.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB2.java index a1e0f69637..0d7e2c3428 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB2.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB2.java @@ -25,10 +25,20 @@ public class GT_Block_Ores_UB2 extends GT_Block_Ores_Abstract { } @Override - public OrePrefixes[] getProcessingPrefix() { //Must have 8 entries; an entry can be null to disable automatic recipes. - return new OrePrefixes[]{OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.oreMarble, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore}; + public OrePrefixes[] + getProcessingPrefix() { // Must have 8 entries; an entry can be null to disable automatic recipes. + return new OrePrefixes[] { + OrePrefixes.ore, + OrePrefixes.ore, + OrePrefixes.oreMarble, + OrePrefixes.ore, + OrePrefixes.ore, + OrePrefixes.ore, + OrePrefixes.ore, + OrePrefixes.ore + }; } - + @Override public IIcon getIcon(int side, int meta) { return aUBBlock.getIcon(side, (meta / 1000) % 8); @@ -45,17 +55,43 @@ public class GT_Block_Ores_UB2 extends GT_Block_Ores_Abstract { } @Override - public Materials[] getDroppedDusts() { //Must have 8 entries; can be null. - return new Materials[]{Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone}; + public Materials[] getDroppedDusts() { // Must have 8 entries; can be null. + return new Materials[] { + Materials.Stone, + Materials.Stone, + Materials.Stone, + Materials.Stone, + Materials.Stone, + Materials.Stone, + Materials.Stone, + Materials.Stone + }; } @Override public boolean[] getEnabledMetas() { - return new boolean[]{true, true, true, true, true, true, true, true}; + return new boolean[] {true, true, true, true, true, true, true, true}; } @Override - public ITexture[] getTextureSet() { //Must have 16 entries. - return new ITexture[]{TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), TextureFactory.of(aUBBlock, 2), TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), TextureFactory.of(aUBBlock, 5), TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7), TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), TextureFactory.of(aUBBlock, 2), TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), TextureFactory.of(aUBBlock, 5), TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7)}; + public ITexture[] getTextureSet() { // Must have 16 entries. + return new ITexture[] { + TextureFactory.of(aUBBlock, 0), + TextureFactory.of(aUBBlock, 1), + TextureFactory.of(aUBBlock, 2), + TextureFactory.of(aUBBlock, 3), + TextureFactory.of(aUBBlock, 4), + TextureFactory.of(aUBBlock, 5), + TextureFactory.of(aUBBlock, 6), + TextureFactory.of(aUBBlock, 7), + TextureFactory.of(aUBBlock, 0), + TextureFactory.of(aUBBlock, 1), + TextureFactory.of(aUBBlock, 2), + TextureFactory.of(aUBBlock, 3), + TextureFactory.of(aUBBlock, 4), + TextureFactory.of(aUBBlock, 5), + TextureFactory.of(aUBBlock, 6), + TextureFactory.of(aUBBlock, 7) + }; } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java index 280b6450df..5754f87454 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java @@ -25,10 +25,20 @@ public class GT_Block_Ores_UB3 extends GT_Block_Ores_Abstract { } @Override - public OrePrefixes[] getProcessingPrefix() { //Must have 8 entries; an entry can be null to disable automatic recipes. - return new OrePrefixes[]{OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore}; + public OrePrefixes[] + getProcessingPrefix() { // Must have 8 entries; an entry can be null to disable automatic recipes. + return new OrePrefixes[] { + OrePrefixes.ore, + OrePrefixes.ore, + OrePrefixes.ore, + OrePrefixes.ore, + OrePrefixes.ore, + OrePrefixes.ore, + OrePrefixes.ore, + OrePrefixes.ore + }; } - + @Override public IIcon getIcon(int side, int meta) { return aUBBlock.getIcon(side, (meta / 1000) % 8); @@ -45,17 +55,43 @@ public class GT_Block_Ores_UB3 extends GT_Block_Ores_Abstract { } @Override - public Materials[] getDroppedDusts() { //Must have 8 entries; can be null. - return new Materials[]{Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone}; + public Materials[] getDroppedDusts() { // Must have 8 entries; can be null. + return new Materials[] { + Materials.Stone, + Materials.Stone, + Materials.Stone, + Materials.Stone, + Materials.Stone, + Materials.Stone, + Materials.Stone, + Materials.Stone + }; } @Override public boolean[] getEnabledMetas() { - return new boolean[]{true, true, true, true, true, true, true, true}; + return new boolean[] {true, true, true, true, true, true, true, true}; } @Override - public ITexture[] getTextureSet() { //Must have 16 entries. - return new ITexture[]{TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), TextureFactory.of(aUBBlock, 2), TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), TextureFactory.of(aUBBlock, 5), TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7), TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), TextureFactory.of(aUBBlock, 2), TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), TextureFactory.of(aUBBlock, 5), TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7)}; + public ITexture[] getTextureSet() { // Must have 16 entries. + return new ITexture[] { + TextureFactory.of(aUBBlock, 0), + TextureFactory.of(aUBBlock, 1), + TextureFactory.of(aUBBlock, 2), + TextureFactory.of(aUBBlock, 3), + TextureFactory.of(aUBBlock, 4), + TextureFactory.of(aUBBlock, 5), + TextureFactory.of(aUBBlock, 6), + TextureFactory.of(aUBBlock, 7), + TextureFactory.of(aUBBlock, 0), + TextureFactory.of(aUBBlock, 1), + TextureFactory.of(aUBBlock, 2), + TextureFactory.of(aUBBlock, 3), + TextureFactory.of(aUBBlock, 4), + TextureFactory.of(aUBBlock, 5), + TextureFactory.of(aUBBlock, 6), + TextureFactory.of(aUBBlock, 7) + }; } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java index 776580f77b..37887ac5f6 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java @@ -1,5 +1,7 @@ package gregtech.common.blocks; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTech_API; @@ -9,6 +11,7 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.WorldSpawnedEventBuilder; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -27,10 +30,6 @@ import net.minecraft.world.Explosion; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import java.util.List; - -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; - public class GT_Block_Reinforced extends GT_Generic_Block { public GT_Block_Reinforced(String aName) { @@ -54,9 +53,11 @@ public class GT_Block_Reinforced extends GT_Generic_Block { GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Neutronium Reinforced Block"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Raw Deep Dark Portal Block"); ItemList.Block_BronzePlate.set(new ItemStack(this.setHardness(60.0f).setResistance(150.0f), 1, 0)); - ItemList.Block_IridiumTungstensteel.set(new ItemStack(this.setHardness(400.0f).setResistance(600.0f), 1, 1)); + ItemList.Block_IridiumTungstensteel.set( + new ItemStack(this.setHardness(400.0f).setResistance(600.0f), 1, 1)); ItemList.Block_Plascrete.set(new ItemStack(this.setHardness(5.0f).setResistance(6.0f), 1, 2)); - ItemList.Block_TungstenSteelReinforced.set(new ItemStack(this.setHardness(250.0f).setResistance(400.0f), 1, 3)); + ItemList.Block_TungstenSteelReinforced.set( + new ItemStack(this.setHardness(250.0f).setResistance(400.0f), 1, 3)); ItemList.Block_BrittleCharcoal.set(new ItemStack(this.setHardness(0.5f).setResistance(8.0f), 1, 4)); ItemList.Block_Powderbarrel.set(new ItemStack(this.setHardness(2.5f).setResistance(2.0f), 1, 5)); ItemList.Block_SSFUEL.set(new ItemStack(this.setHardness(2.5f).setResistance(2.0f), 1, 6)); @@ -64,11 +65,24 @@ public class GT_Block_Reinforced extends GT_Generic_Block { ItemList.Block_SteelPlate.set(new ItemStack(this.setHardness(150.0f).setResistance(200.0f), 1, 8)); ItemList.Block_TitaniumPlate.set(new ItemStack(this.setHardness(200.0f).setResistance(300.0f), 1, 9)); ItemList.Block_NaquadahPlate.set(new ItemStack(this.setHardness(500.0f).setResistance(1000.0f), 1, 10)); - ItemList.Block_NeutroniumPlate.set(new ItemStack(this.setHardness(750.0f).setResistance(2500.0f), 1, 11)); - ItemList.Block_BedrockiumCompressed.set(new ItemStack(this.setHardness(1500.0f).setResistance(5000.0f), 1, 12)); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Items.coal, 1, 1), new Object[]{ItemList.Block_BrittleCharcoal.get(1)}); - GT_ModHandler.addCraftingRecipe(ItemList.Block_Powderbarrel.get(1L),GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WSW","GGG","WGW", 'W', OrePrefixes.plate.get(Materials.Wood), 'G', new ItemStack(Items.gunpowder,1),'S',new ItemStack(Items.string,1)}); - + ItemList.Block_NeutroniumPlate.set( + new ItemStack(this.setHardness(750.0f).setResistance(2500.0f), 1, 11)); + ItemList.Block_BedrockiumCompressed.set( + new ItemStack(this.setHardness(1500.0f).setResistance(5000.0f), 1, 12)); + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Items.coal, 1, 1), new Object[] {ItemList.Block_BrittleCharcoal.get(1)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Block_Powderbarrel.get(1L), GT_ModHandler.RecipeBits.REVERSIBLE, new Object[] { + "WSW", + "GGG", + "WGW", + 'W', + OrePrefixes.plate.get(Materials.Wood), + 'G', + new ItemStack(Items.gunpowder, 1), + 'S', + new ItemStack(Items.string, 1) + }); } @Override @@ -80,10 +94,10 @@ public class GT_Block_Reinforced extends GT_Generic_Block { @Override public int getHarvestLevel(int aMeta) { - if (aMeta == 4||aMeta == 5 || aMeta == 6 || aMeta == 7) return 1; + if (aMeta == 4 || aMeta == 5 || aMeta == 6 || aMeta == 7) return 1; if (aMeta == 2) return 2; - if (aMeta == 9||aMeta == 3 || aMeta == 1) return 5; - if (aMeta == 10||aMeta == 11) return 7; + if (aMeta == 9 || aMeta == 3 || aMeta == 1) return 5; + if (aMeta == 10 || aMeta == 11) return 7; return 4; } @@ -102,11 +116,11 @@ public class GT_Block_Reinforced extends GT_Generic_Block { case 4: return Blocks.coal_block.getIcon(0, 0); case 5: - return Textures.BlockIcons.COVER_WOOD_PLATE.getIcon(); + return Textures.BlockIcons.COVER_WOOD_PLATE.getIcon(); case 6: - return Blocks.coal_block.getIcon(0, 0); + return Blocks.coal_block.getIcon(0, 0); case 7: - return Blocks.coal_block.getIcon(0, 0); + return Blocks.coal_block.getIcon(0, 0); case 8: return Textures.BlockIcons.BLOCK_STEELPREIN.getIcon(); case 9: @@ -143,7 +157,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block { if (tMeta == 3) { return 250.0F; } - if (tMeta == 4||tMeta == 5 || tMeta == 6 || tMeta == 7) { + if (tMeta == 4 || tMeta == 5 || tMeta == 6 || tMeta == 7) { return 0.5F; } if (tMeta == 8) { @@ -162,7 +176,8 @@ public class GT_Block_Reinforced extends GT_Generic_Block { } @Override - public float getExplosionResistance(Entity entity, World world, int x, int y, int z, double explosionX, double explosionY, double explosionZ) { + public float getExplosionResistance( + Entity entity, World world, int x, int y, int z, double explosionX, double explosionY, double explosionZ) { if (world == null) { return 0.0F; } @@ -196,7 +211,6 @@ public class GT_Block_Reinforced extends GT_Generic_Block { } if (tMeta == 11) { return 2500.0F; - } return super.getExplosionResistance(entity, world, x, y, z, explosionX, explosionY, explosionZ); } @@ -237,7 +251,8 @@ public class GT_Block_Reinforced extends GT_Generic_Block { } @Override - public void dropBlockAsItemWithChance(World aWorld, int aX, int aY, int aZ, int aMetadata, float chance, int aFortune) { + public void dropBlockAsItemWithChance( + World aWorld, int aX, int aY, int aZ, int aMetadata, float chance, int aFortune) { if (aMetadata == 4) { this.dropBlockAsItem(aWorld, aX, aY, aZ, new ItemStack(Items.coal, XSTR_INSTANCE.nextInt(2) + 1, 1)); } else { @@ -246,67 +261,73 @@ public class GT_Block_Reinforced extends GT_Generic_Block { } @Override - public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z) - { - if(!world.isRemote && world.getBlockMetadata(x, y, z)==5){ - EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, x + 0.5F, y + 0.5F, z + 0.5F, player); - world.spawnEntityInWorld(entitytntprimed); - new WorldSpawnedEventBuilder.SoundAtEntityEventBuilder() - .setPitch(1f) - .setVolume(1f) - .setIdentifier(SoundResource.GAME_TNT_PRIMED) - .setEntity(entitytntprimed) - .setWorld(world) - .run(); - world.setBlockToAir(x, y, z); - return false; - } - return super.removedByPlayer(world, player, x, y, z); + public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z) { + if (!world.isRemote && world.getBlockMetadata(x, y, z) == 5) { + EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, x + 0.5F, y + 0.5F, z + 0.5F, player); + world.spawnEntityInWorld(entitytntprimed); + new WorldSpawnedEventBuilder.SoundAtEntityEventBuilder() + .setPitch(1f) + .setVolume(1f) + .setIdentifier(SoundResource.GAME_TNT_PRIMED) + .setEntity(entitytntprimed) + .setWorld(world) + .run(); + world.setBlockToAir(x, y, z); + return false; + } + return super.removedByPlayer(world, player, x, y, z); } @Override - public void onBlockAdded(World world, int x, int y, int z) - { - super.onBlockAdded(world, x, y, z); - if (world.isBlockIndirectlyGettingPowered(x, y, z)&&world.getBlockMetadata(x, y, z)==5) { - removedByPlayer(world, null, x, y, z); - } + public void onBlockAdded(World world, int x, int y, int z) { + super.onBlockAdded(world, x, y, z); + if (world.isBlockIndirectlyGettingPowered(x, y, z) && world.getBlockMetadata(x, y, z) == 5) { + removedByPlayer(world, null, x, y, z); + } } @Override - public void onNeighborBlockChange(World world, int x, int y, int z, Block neighbor) - { - if (world.isBlockIndirectlyGettingPowered(x, y, z)&&world.getBlockMetadata(x, y, z)==5) { - removedByPlayer(world, null, x, y, z); - } + public void onNeighborBlockChange(World world, int x, int y, int z, Block neighbor) { + if (world.isBlockIndirectlyGettingPowered(x, y, z) && world.getBlockMetadata(x, y, z) == 5) { + removedByPlayer(world, null, x, y, z); + } } @Override public void onBlockExploded(World world, int x, int y, int z, Explosion explosion) { - if (!world.isRemote && world.getBlockMetadata(x, y, z)==5){ - EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, x + 0.5F, y + 0.5F, z + 0.5F, explosion.getExplosivePlacedBy()); - entitytntprimed.fuse = (world.rand.nextInt(entitytntprimed.fuse / 4) + entitytntprimed.fuse / 8); - world.spawnEntityInWorld(entitytntprimed); - } - super.onBlockExploded(world, x, y, z, explosion); + if (!world.isRemote && world.getBlockMetadata(x, y, z) == 5) { + EntityTNTPrimed entitytntprimed = + new EntityTNTPrimed(world, x + 0.5F, y + 0.5F, z + 0.5F, explosion.getExplosivePlacedBy()); + entitytntprimed.fuse = (world.rand.nextInt(entitytntprimed.fuse / 4) + entitytntprimed.fuse / 8); + world.spawnEntityInWorld(entitytntprimed); + } + super.onBlockExploded(world, x, y, z, explosion); } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float xOffset, float yOffset, float zOffset) - { - if ((player.getCurrentEquippedItem() != null) && (player.getCurrentEquippedItem().getItem() == Items.flint_and_steel)&&world.getBlockMetadata(x, y, z)==5) - { - removedByPlayer(world, player, x, y, z); + public boolean onBlockActivated( + World world, + int x, + int y, + int z, + EntityPlayer player, + int side, + float xOffset, + float yOffset, + float zOffset) { + if ((player.getCurrentEquippedItem() != null) + && (player.getCurrentEquippedItem().getItem() == Items.flint_and_steel) + && world.getBlockMetadata(x, y, z) == 5) { + removedByPlayer(world, player, x, y, z); - return true; - } - return super.onBlockActivated(world, x, y, z, player, side, xOffset, yOffset, zOffset); + return true; + } + return super.onBlockActivated(world, x, y, z, player, side, xOffset, yOffset, zOffset); } @Override @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister aIconRegister) { - } + public void registerBlockIcons(IIconRegister aIconRegister) {} @Override @SideOnly(Side.CLIENT) diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Stones.java b/src/main/java/gregtech/common/blocks/GT_Block_Stones.java index 3838f30f0b..1ee8e6df50 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Stones.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Stones.java @@ -29,10 +29,14 @@ public class GT_Block_Stones extends GT_Block_Stones_Abstract { GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Mossy Basalt Bricks"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Chiseled Basalt"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Smooth Basalt"); - for(int i = 0;i<16;i++){ - GT_OreDictUnificator.registerOre(OrePrefixes.stone, i < 8 ? Materials.Marble : Materials.Basalt, new ItemStack(this, 1, i)); - GT_OreDictUnificator.registerOre(OrePrefixes.block, i < 8 ? Materials.Marble : Materials.Basalt, new ItemStack(this, 1, i)); - GT_OreDictUnificator.registerOre((i < 8 ? Materials.Marble.mName.toLowerCase() : Materials.Basalt.mName.toLowerCase()), new ItemStack(this, 1, i)); + for (int i = 0; i < 16; i++) { + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, i < 8 ? Materials.Marble : Materials.Basalt, new ItemStack(this, 1, i)); + GT_OreDictUnificator.registerOre( + OrePrefixes.block, i < 8 ? Materials.Marble : Materials.Basalt, new ItemStack(this, 1, i)); + GT_OreDictUnificator.registerOre( + (i < 8 ? Materials.Marble.mName.toLowerCase() : Materials.Basalt.mName.toLowerCase()), + new ItemStack(this, 1, i)); } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Stones_Abstract.java b/src/main/java/gregtech/common/blocks/GT_Block_Stones_Abstract.java index b3c0a1811c..f40a6b8173 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Stones_Abstract.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Stones_Abstract.java @@ -8,6 +8,7 @@ import gregtech.api.interfaces.IOreRecipeRegistrator; import gregtech.api.items.GT_Generic_Block; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; +import java.util.List; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -21,8 +22,6 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import java.util.List; - public class GT_Block_Stones_Abstract extends GT_Generic_Block implements IOreRecipeRegistrator { public GT_Block_Stones_Abstract(Class<? extends ItemBlock> aItemClass, String aName) { super(aItemClass, aName, Material.rock); @@ -45,59 +44,118 @@ public class GT_Block_Stones_Abstract extends GT_Generic_Block implements IOreRe GT_ModHandler.addSmeltingRecipe(new ItemStack(this, 1, 13), new ItemStack(this, 1, 8)); GT_ModHandler.addSmeltingRecipe(new ItemStack(this, 1, 14), new ItemStack(this, 1, 8)); GT_ModHandler.addSmeltingRecipe(new ItemStack(this, 1, 15), new ItemStack(this, 1, 8)); - GT_Values.RA.addAssemblerRecipe(new ItemStack(this, 1, 0), ItemList.Circuit_Integrated.getWithDamage(0L, 4L, new Object[0]), new ItemStack(this, 1, 3), 50, 4); - GT_Values.RA.addAssemblerRecipe(new ItemStack(this, 1, 8), ItemList.Circuit_Integrated.getWithDamage(0L, 4L, new Object[0]), new ItemStack(this, 1, 11), 50, 4); - GT_ModHandler.addCraftingRecipe(new ItemStack(this, 1, 6), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"f", "X", 'X', new ItemStack(this, 1, 7)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(this, 1, 14), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"f", "X", 'X', new ItemStack(this, 1, 15)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(this, 1, 4), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"h", "X", 'X', new ItemStack(this, 1, 3)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(this, 1, 12), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"h", "X", 'X', new ItemStack(this, 1, 11)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(this, 1, 1), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"h", "X", 'X', new ItemStack(this, 1, 0)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(this, 1, 9), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"h", "X", 'X', new ItemStack(this, 1, 8)}); + GT_Values.RA.addAssemblerRecipe( + new ItemStack(this, 1, 0), + ItemList.Circuit_Integrated.getWithDamage(0L, 4L, new Object[0]), + new ItemStack(this, 1, 3), + 50, + 4); + GT_Values.RA.addAssemblerRecipe( + new ItemStack(this, 1, 8), + ItemList.Circuit_Integrated.getWithDamage(0L, 4L, new Object[0]), + new ItemStack(this, 1, 11), + 50, + 4); + GT_ModHandler.addCraftingRecipe( + new ItemStack(this, 1, 6), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {"f", "X", 'X', new ItemStack(this, 1, 7)}); + GT_ModHandler.addCraftingRecipe( + new ItemStack(this, 1, 14), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {"f", "X", 'X', new ItemStack(this, 1, 15)}); + GT_ModHandler.addCraftingRecipe( + new ItemStack(this, 1, 4), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {"h", "X", 'X', new ItemStack(this, 1, 3)}); + GT_ModHandler.addCraftingRecipe( + new ItemStack(this, 1, 12), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {"h", "X", 'X', new ItemStack(this, 1, 11)}); + GT_ModHandler.addCraftingRecipe( + new ItemStack(this, 1, 1), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {"h", "X", 'X', new ItemStack(this, 1, 0)}); + GT_ModHandler.addCraftingRecipe( + new ItemStack(this, 1, 9), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {"h", "X", 'X', new ItemStack(this, 1, 8)}); GT_Values.RA.addForgeHammerRecipe(new ItemStack(this, 1, 3), new ItemStack(this, 1, 4), 16, 10); GT_Values.RA.addForgeHammerRecipe(new ItemStack(this, 1, 11), new ItemStack(this, 1, 12), 16, 10); GT_Values.RA.addForgeHammerRecipe(new ItemStack(this, 1, 0), new ItemStack(this, 1, 1), 16, 10); GT_Values.RA.addForgeHammerRecipe(new ItemStack(this, 1, 8), new ItemStack(this, 1, 9), 16, 10); - GT_ModHandler.addCraftingRecipe(new ItemStack(this, 4, 3), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"XX", "XX", 'X', new ItemStack(this, 4, 0)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(this, 4, 11), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"XX", "XX", 'X', new ItemStack(this, 4, 8)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(this, 4, 3), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"XX", "XX", 'X', new ItemStack(this, 4, 7)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(this, 4, 11), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"XX", "XX", 'X', new ItemStack(this, 4, 15)}); + GT_ModHandler.addCraftingRecipe( + new ItemStack(this, 4, 3), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {"XX", "XX", 'X', new ItemStack(this, 4, 0)}); + GT_ModHandler.addCraftingRecipe( + new ItemStack(this, 4, 11), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {"XX", "XX", 'X', new ItemStack(this, 4, 8)}); + GT_ModHandler.addCraftingRecipe( + new ItemStack(this, 4, 3), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {"XX", "XX", 'X', new ItemStack(this, 4, 7)}); + GT_ModHandler.addCraftingRecipe( + new ItemStack(this, 4, 11), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {"XX", "XX", 'X', new ItemStack(this, 4, 15)}); } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if (aOreDictName.equals(OreDictNames.craftingLensWhite.toString())) { - GT_Values.RA.addLaserEngraverRecipe(new ItemStack(this, 1, 7), GT_Utility.copyAmount(0L, new Object[]{aStack}), new ItemStack(this, 1, 6), 50, 16); - GT_Values.RA.addLaserEngraverRecipe(new ItemStack(this, 1, 15), GT_Utility.copyAmount(0L, new Object[]{aStack}), new ItemStack(this, 1, 14), 50, 16); + GT_Values.RA.addLaserEngraverRecipe( + new ItemStack(this, 1, 7), + GT_Utility.copyAmount(0L, new Object[] {aStack}), + new ItemStack(this, 1, 6), + 50, + 16); + GT_Values.RA.addLaserEngraverRecipe( + new ItemStack(this, 1, 15), + GT_Utility.copyAmount(0L, new Object[] {aStack}), + new ItemStack(this, 1, 14), + 50, + 16); } } + @Override public String getHarvestTool(int aMeta) { return "pickaxe"; } + @Override public int getHarvestLevel(int aMeta) { return 1; } + @Override public float getBlockHardness(World aWorld, int aX, int aY, int aZ) { return this.blockHardness = Blocks.stone.getBlockHardness(aWorld, aX, aY, aZ) * 3.0F; } + @Override public String getUnlocalizedName() { return this.mUnlocalizedName; } + @Override public String getLocalizedName() { return StatCollector.translateToLocal(this.mUnlocalizedName + ".name"); } + @Override public boolean canBeReplacedByLeaves(IBlockAccess aWorld, int aX, int aY, int aZ) { return false; } + @Override public boolean isNormalCube(IBlockAccess aWorld, int aX, int aY, int aZ) { return true; } + @Override public IIcon getIcon(int aSide, int aMeta) { if ((aMeta >= 0) && (aMeta < 16)) { @@ -110,10 +168,12 @@ public class GT_Block_Stones_Abstract extends GT_Generic_Block implements IOreRe public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) { return world.getBlockMetadata(x, y, z) % 8 < 3; } + @Override public int damageDropped(int metadata) { return metadata % 8 == 0 ? metadata + 1 : metadata; } + @Override public int getDamageValue(World aWorld, int aX, int aY, int aZ) { return aWorld.getBlockMetadata(aX, aY, aZ); @@ -121,8 +181,7 @@ public class GT_Block_Stones_Abstract extends GT_Generic_Block implements IOreRe @Override @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister aIconRegister) { - } + public void registerBlockIcons(IIconRegister aIconRegister) {} @Override @SideOnly(Side.CLIENT) diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Storage.java b/src/main/java/gregtech/common/blocks/GT_Block_Storage.java index 7cb495a3d9..f318eab8ff 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Storage.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Storage.java @@ -4,6 +4,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTech_API; import gregtech.api.items.GT_Generic_Block; +import java.util.List; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -17,8 +18,6 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import java.util.List; - public class GT_Block_Storage extends GT_Generic_Block { protected GT_Block_Storage(Class<? extends ItemBlock> aItemClass, String aName, Material aMaterial) { @@ -89,8 +88,7 @@ public class GT_Block_Storage extends GT_Generic_Block { @Override @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister aIconRegister) { - } + public void registerBlockIcons(IIconRegister aIconRegister) {} @Override @SideOnly(Side.CLIENT) diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings1.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings1.java index f61f8360fa..70748d5f1a 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings1.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings1.java @@ -1,13 +1,6 @@ package gregtech.common.blocks; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; - -import java.util.List; public class GT_Item_Casings1 extends GT_Item_Casings_Abstract { public GT_Item_Casings1(Block block) { diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings2.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings2.java index 11a3aed3af..5e77ace15d 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings2.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings2.java @@ -1,11 +1,10 @@ package gregtech.common.blocks; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import java.util.List; - public class GT_Item_Casings2 extends GT_Item_Casings_Abstract { public GT_Item_Casings2(Block block) { super(block); diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java index a0890ce154..7486d25ec5 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java @@ -4,19 +4,20 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.HeatingCoilLevel; import gregtech.api.util.GT_LanguageManager; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import java.util.List; - public class GT_Item_Casings5 extends GT_Item_Casings_Abstract { public GT_Item_Casings5(Block block) { super(block); } - protected static final String mCoilHeatTooltip = GT_LanguageManager.addStringLocalization("gt.coilheattooltip", "Base Heating Capacity = "); - protected static final String mCoilUnitTooltip = GT_LanguageManager.addStringLocalization("gt.coilunittooltip", " Kelvin"); + protected static final String mCoilHeatTooltip = + GT_LanguageManager.addStringLocalization("gt.coilheattooltip", "Base Heating Capacity = "); + protected static final String mCoilUnitTooltip = + GT_LanguageManager.addStringLocalization("gt.coilunittooltip", " Kelvin"); @Override @SideOnly(Side.CLIENT) diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings_Abstract.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings_Abstract.java index 33b428772d..bca2de6eb6 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings_Abstract.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings_Abstract.java @@ -2,29 +2,40 @@ package gregtech.common.blocks; import gregtech.api.GregTech_API; import gregtech.api.util.GT_LanguageManager; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; -import java.util.List; - public abstract class GT_Item_Casings_Abstract extends ItemBlock { - protected final String mNoMobsToolTip = GT_LanguageManager.addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block"); - protected final String mNoTileEntityToolTip = GT_LanguageManager.addStringLocalization("gt.notileentityinthisblock", "This is NOT a TileEntity!"); - protected final String mCoil01Tooltip = GT_LanguageManager.addStringLocalization("gt.coil01tooltip", "Base Heating Capacity = 1800 Kelvin"); - protected final String mCoil02Tooltip = GT_LanguageManager.addStringLocalization("gt.coil02tooltip", "Base Heating Capacity = 2700 Kelvin"); - protected final String mCoil03Tooltip = GT_LanguageManager.addStringLocalization("gt.coil03tooltip", "Base Heating Capacity = 3600 Kelvin"); - protected final String mCoil04Tooltip = GT_LanguageManager.addStringLocalization("gt.coil04tooltip", "Base Heating Capacity = 4500 Kelvin"); - protected final String mCoil05Tooltip = GT_LanguageManager.addStringLocalization("gt.coil05tooltip", "Base Heating Capacity = 5400 Kelvin"); - protected final String mCoil06Tooltip = GT_LanguageManager.addStringLocalization("gt.coil06tooltip", "Base Heating Capacity = 7200 Kelvin"); - protected final String mCoil07Tooltip = GT_LanguageManager.addStringLocalization("gt.coil07tooltip", "Base Heating Capacity = 9001 Kelvin"); - protected final String mCoil08Tooltip = GT_LanguageManager.addStringLocalization("gt.coil08tooltip", "Base Heating Capacity = 9900 Kelvin"); - protected final String mCoil09Tooltip = GT_LanguageManager.addStringLocalization("gt.coil09tooltip", "Base Heating Capacity = 10800 Kelvin"); - protected final String mBlastProofTooltip = GT_LanguageManager.addStringLocalization("gt.blastprooftooltip", "This Block is Blast Proof"); + protected final String mNoMobsToolTip = + GT_LanguageManager.addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block"); + protected final String mNoTileEntityToolTip = + GT_LanguageManager.addStringLocalization("gt.notileentityinthisblock", "This is NOT a TileEntity!"); + protected final String mCoil01Tooltip = + GT_LanguageManager.addStringLocalization("gt.coil01tooltip", "Base Heating Capacity = 1800 Kelvin"); + protected final String mCoil02Tooltip = + GT_LanguageManager.addStringLocalization("gt.coil02tooltip", "Base Heating Capacity = 2700 Kelvin"); + protected final String mCoil03Tooltip = + GT_LanguageManager.addStringLocalization("gt.coil03tooltip", "Base Heating Capacity = 3600 Kelvin"); + protected final String mCoil04Tooltip = + GT_LanguageManager.addStringLocalization("gt.coil04tooltip", "Base Heating Capacity = 4500 Kelvin"); + protected final String mCoil05Tooltip = + GT_LanguageManager.addStringLocalization("gt.coil05tooltip", "Base Heating Capacity = 5400 Kelvin"); + protected final String mCoil06Tooltip = + GT_LanguageManager.addStringLocalization("gt.coil06tooltip", "Base Heating Capacity = 7200 Kelvin"); + protected final String mCoil07Tooltip = + GT_LanguageManager.addStringLocalization("gt.coil07tooltip", "Base Heating Capacity = 9001 Kelvin"); + protected final String mCoil08Tooltip = + GT_LanguageManager.addStringLocalization("gt.coil08tooltip", "Base Heating Capacity = 9900 Kelvin"); + protected final String mCoil09Tooltip = + GT_LanguageManager.addStringLocalization("gt.coil09tooltip", "Base Heating Capacity = 10800 Kelvin"); + protected final String mBlastProofTooltip = + GT_LanguageManager.addStringLocalization("gt.blastprooftooltip", "This Block is Blast Proof"); public GT_Item_Casings_Abstract(Block block) { - super(block ); + super(block); setMaxDamage(0); setHasSubtypes(true); setCreativeTab(GregTech_API.TAB_GREGTECH_MATERIALS); diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Concretes.java b/src/main/java/gregtech/common/blocks/GT_Item_Concretes.java index 1417aa4c39..0ee92868e8 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Concretes.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Concretes.java @@ -1,14 +1,14 @@ package gregtech.common.blocks; import gregtech.api.util.GT_LanguageManager; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import java.util.List; - public class GT_Item_Concretes extends GT_Item_Stones_Abstract { - private final String mRunFasterToolTip = GT_LanguageManager.addStringLocalization("gt.runfastertooltip", "You can walk faster on this Block"); + private final String mRunFasterToolTip = + GT_LanguageManager.addStringLocalization("gt.runfastertooltip", "You can walk faster on this Block"); public GT_Item_Concretes(Block block) { super(block); diff --git a/src/main/java/gregtech/common/blocks/GT_Item_LongDistancePipe.java b/src/main/java/gregtech/common/blocks/GT_Item_LongDistancePipe.java index c63f10b8f4..eda3c9b01b 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_LongDistancePipe.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_LongDistancePipe.java @@ -2,16 +2,17 @@ package gregtech.common.blocks; import gregtech.api.GregTech_API; import gregtech.api.util.GT_LanguageManager; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; -import java.util.List; - public class GT_Item_LongDistancePipe extends ItemBlock { - protected final String mNoMobsToolTip = GT_LanguageManager.addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block"); - protected final String mNoTileEntityToolTip = GT_LanguageManager.addStringLocalization("gt.notileentityinthisblock", "This is NOT a TileEntity!"); + protected final String mNoMobsToolTip = + GT_LanguageManager.addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block"); + protected final String mNoTileEntityToolTip = + GT_LanguageManager.addStringLocalization("gt.notileentityinthisblock", "This is NOT a TileEntity!"); public GT_Item_LongDistancePipe(Block block) { super(block); diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java index 9cf4029934..95de8da0c2 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java @@ -1,5 +1,7 @@ package gregtech.common.blocks; +import static gregtech.GT_Mod.GT_FML_LOGGER; + import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; @@ -8,18 +10,16 @@ import gregtech.api.interfaces.metatileentity.IConnectable; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.CoverableTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Cable; import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Fluid; import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Frame; import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Item; -import gregtech.api.util.GT_CoverBehaviorBase; import gregtech.api.util.GT_ItsNotMyFaultException; import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_Log; import gregtech.api.util.GT_Utility; -import gregtech.api.util.ISerializableObject; import gregtech.common.tileentities.storage.*; +import java.util.List; +import javax.annotation.Nullable; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -34,11 +34,6 @@ import net.minecraft.world.World; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidContainerItem; -import javax.annotation.Nullable; -import java.util.List; - -import static gregtech.GT_Mod.GT_FML_LOGGER; - public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { public GT_Item_Machines(Block block) { super(block); @@ -47,15 +42,12 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { setCreativeTab(GregTech_API.TAB_GREGTECH); } - public static IMetaTileEntity getMetaTileEntity(ItemStack aStack) { - if (GT_Utility.isStackInvalid(aStack)) - return null; - if (!(aStack.getItem() instanceof GT_Item_Machines)) - return null; - if (aStack.getItemDamage() < 0 || aStack.getItemDamage() > GregTech_API.METATILEENTITIES.length) - return null; - return GregTech_API.METATILEENTITIES[aStack.getItemDamage()]; - } + public static IMetaTileEntity getMetaTileEntity(ItemStack aStack) { + if (GT_Utility.isStackInvalid(aStack)) return null; + if (!(aStack.getItem() instanceof GT_Item_Machines)) return null; + if (aStack.getItemDamage() < 0 || aStack.getItemDamage() > GregTech_API.METATILEENTITIES.length) return null; + return GregTech_API.METATILEENTITIES[aStack.getItemDamage()]; + } @Override @SuppressWarnings("unchecked") @@ -68,45 +60,84 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { if (GregTech_API.METATILEENTITIES[tDamage] != null) { final IGregTechTileEntity tTileEntity = GregTech_API.METATILEENTITIES[tDamage].getBaseMetaTileEntity(); - if (!GregTech_API.sPostloadFinished && tTileEntity.getMetaTileEntity() instanceof ISecondaryDescribable) { - final String[] tSecondaryDescription = ((ISecondaryDescribable) tTileEntity.getMetaTileEntity()).getSecondaryDescription(); + if (!GregTech_API.sPostloadFinished + && tTileEntity.getMetaTileEntity() instanceof ISecondaryDescribable) { + final String[] tSecondaryDescription = + ((ISecondaryDescribable) tTileEntity.getMetaTileEntity()).getSecondaryDescription(); addDescription(null, tSecondaryDescription, tDamage, "_Secondary", true); } { final IMetaTileEntity tMetaTileEntity = tTileEntity.getMetaTileEntity(); - final String tSuffix = (tMetaTileEntity instanceof ISecondaryDescribable && ((ISecondaryDescribable) tMetaTileEntity).isDisplaySecondaryDescription()) ? "_Secondary" : ""; - addDescription(aList, tTileEntity.getDescription(), tDamage, tSuffix, !GregTech_API.sPostloadFinished); + final String tSuffix = (tMetaTileEntity instanceof ISecondaryDescribable + && ((ISecondaryDescribable) tMetaTileEntity).isDisplaySecondaryDescription()) + ? "_Secondary" + : ""; + addDescription( + aList, tTileEntity.getDescription(), tDamage, tSuffix, !GregTech_API.sPostloadFinished); } if (tTileEntity.getEUCapacity() > 0L) { if (tTileEntity.getInputVoltage() > 0L) { final int inputTier = GT_Utility.getTier(tTileEntity.getInputVoltage()); - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_IN", "Voltage IN: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(tTileEntity.getInputVoltage()) + " (" + GT_Values.TIER_COLORS[inputTier] + GT_Values.VN[inputTier] + EnumChatFormatting.GREEN +")" + EnumChatFormatting.GRAY); + aList.add(GT_LanguageManager.addStringLocalization( + "TileEntity_EUp_IN", "Voltage IN: ", !GregTech_API.sPostloadFinished) + + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(tTileEntity.getInputVoltage()) + + " (" + GT_Values.TIER_COLORS[inputTier] + GT_Values.VN[inputTier] + + EnumChatFormatting.GREEN + ")" + EnumChatFormatting.GRAY); } if (tTileEntity.getOutputVoltage() > 0L) { final int outputTier = GT_Utility.getTier(tTileEntity.getOutputVoltage()); - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_OUT", "Voltage OUT: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(tTileEntity.getOutputVoltage()) + " (" + GT_Values.TIER_COLORS[outputTier] + GT_Values.VN[outputTier] + EnumChatFormatting.GREEN + ")" + EnumChatFormatting.GRAY); + aList.add(GT_LanguageManager.addStringLocalization( + "TileEntity_EUp_OUT", "Voltage OUT: ", !GregTech_API.sPostloadFinished) + + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(tTileEntity.getOutputVoltage()) + + " (" + GT_Values.TIER_COLORS[outputTier] + GT_Values.VN[outputTier] + + EnumChatFormatting.GREEN + ")" + EnumChatFormatting.GRAY); } if (tTileEntity.getOutputAmperage() > 1L) { - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_AMOUNT", "Amperage: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(tTileEntity.getOutputAmperage()) + EnumChatFormatting.GRAY); + aList.add(GT_LanguageManager.addStringLocalization( + "TileEntity_EUp_AMOUNT", "Amperage: ", !GregTech_API.sPostloadFinished) + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(tTileEntity.getOutputAmperage()) + + EnumChatFormatting.GRAY); } - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_STORE", "Capacity: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.BLUE + GT_Utility.formatNumbers(tTileEntity.getEUCapacity()) + EnumChatFormatting.GRAY + " EU"); + aList.add(GT_LanguageManager.addStringLocalization( + "TileEntity_EUp_STORE", "Capacity: ", !GregTech_API.sPostloadFinished) + + EnumChatFormatting.BLUE + GT_Utility.formatNumbers(tTileEntity.getEUCapacity()) + + EnumChatFormatting.GRAY + " EU"); } - if (GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_QuantumTank || GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_SuperTank) { + if (GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_QuantumTank + || GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_SuperTank) { if (aStack.hasTagCompound() && aStack.stackTagCompound.hasKey("mFluid")) { - final FluidStack tContents = FluidStack.loadFluidStackFromNBT(aStack.stackTagCompound.getCompoundTag("mFluid")); + final FluidStack tContents = + FluidStack.loadFluidStackFromNBT(aStack.stackTagCompound.getCompoundTag("mFluid")); if (tContents != null && tContents.amount > 0) { - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_TANK_INFO", "Contains Fluid: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.YELLOW + tContents.getLocalizedName() + EnumChatFormatting.GRAY); - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_TANK_AMOUNT", "Fluid Amount: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(tContents.amount) + " L" + EnumChatFormatting.GRAY); + aList.add(GT_LanguageManager.addStringLocalization( + "TileEntity_TANK_INFO", "Contains Fluid: ", !GregTech_API.sPostloadFinished) + + EnumChatFormatting.YELLOW + + tContents.getLocalizedName() + + EnumChatFormatting.GRAY); + aList.add(GT_LanguageManager.addStringLocalization( + "TileEntity_TANK_AMOUNT", "Fluid Amount: ", !GregTech_API.sPostloadFinished) + + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(tContents.amount) + " L" + + EnumChatFormatting.GRAY); } } } if (GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_DigitalChestBase) { if (aStack.hasTagCompound() && aStack.stackTagCompound.hasKey("mItemStack")) { - final ItemStack tContents = ItemStack.loadItemStackFromNBT(aStack.stackTagCompound.getCompoundTag("mItemStack")); + final ItemStack tContents = + ItemStack.loadItemStackFromNBT(aStack.stackTagCompound.getCompoundTag("mItemStack")); final int tSize = aStack.stackTagCompound.getInteger("mItemCount"); if (tContents != null && tSize > 0) { - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_CHEST_INFO", "Contains Item: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.YELLOW + tContents.getDisplayName() + EnumChatFormatting.GRAY); - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_CHEST_AMOUNT", "Item Amount: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(tSize) + EnumChatFormatting.GRAY); + aList.add(GT_LanguageManager.addStringLocalization( + "TileEntity_CHEST_INFO", "Contains Item: ", !GregTech_API.sPostloadFinished) + + EnumChatFormatting.YELLOW + + tContents.getDisplayName() + + EnumChatFormatting.GRAY); + aList.add(GT_LanguageManager.addStringLocalization( + "TileEntity_CHEST_AMOUNT", "Item Amount: ", !GregTech_API.sPostloadFinished) + + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(tSize) + + EnumChatFormatting.GRAY); } } } @@ -114,14 +145,20 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { final NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { if (aNBT.getBoolean("mMuffler")) { - aList.add(GT_LanguageManager.addStringLocalization("GT_TileEntity_MUFFLER", "has Muffler Upgrade", !GregTech_API.sPostloadFinished )); + aList.add(GT_LanguageManager.addStringLocalization( + "GT_TileEntity_MUFFLER", "has Muffler Upgrade", !GregTech_API.sPostloadFinished)); } if (aNBT.getBoolean("mSteamConverter")) { - aList.add(GT_LanguageManager.addStringLocalization("GT_TileEntity_STEAMCONVERTER", "has Steam Upgrade", !GregTech_API.sPostloadFinished )); + aList.add(GT_LanguageManager.addStringLocalization( + "GT_TileEntity_STEAMCONVERTER", "has Steam Upgrade", !GregTech_API.sPostloadFinished)); } int tAmount = 0; if ((tAmount = aNBT.getByte("mSteamTanks")) > 0) { - aList.add(tAmount + " " + GT_LanguageManager.addStringLocalization("GT_TileEntity_STEAMTANKS", "Steam Tank Upgrades", !GregTech_API.sPostloadFinished )); + aList.add(tAmount + " " + + GT_LanguageManager.addStringLocalization( + "GT_TileEntity_STEAMTANKS", + "Steam Tank Upgrades", + !GregTech_API.sPostloadFinished)); } CoverableTileEntity.addInstalledCoversInformation(aNBT, aList); @@ -131,7 +168,12 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { } } - private void addDescription(@Nullable List<String> aList, @Nullable String[] aDescription, int aDamage, String aSuffix, boolean aWriteIntoLangFile) { + private void addDescription( + @Nullable List<String> aList, + @Nullable String[] aDescription, + int aDamage, + String aSuffix, + boolean aWriteIntoLangFile) { if (aDescription == null) return; for (int i = 0, tLength = aDescription.length; i < tLength; i++) { String tDescLine = aDescription[i]; @@ -148,7 +190,9 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { tBuffer.append(" %s"); tRep[j / 2] = tSplitStrings[j]; } - final String tTranslated = String.format(GT_LanguageManager.addStringLocalization(tKey, tBuffer.toString(), aWriteIntoLangFile), (Object[]) tRep); + final String tTranslated = String.format( + GT_LanguageManager.addStringLocalization(tKey, tBuffer.toString(), aWriteIntoLangFile), + (Object[]) tRep); if (aList != null) aList.add(tTranslated); } else { String tTranslated = GT_LanguageManager.addStringLocalization(tKey, tDescLine, aWriteIntoLangFile); @@ -158,7 +202,17 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { } @Override - public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { + public boolean onItemUseFirst( + ItemStack stack, + EntityPlayer player, + World world, + int x, + int y, + int z, + int side, + float hitX, + float hitY, + float hitZ) { return false; } @@ -176,37 +230,52 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { @Override public String getItemStackDisplayName(ItemStack aStack) { - String aName = super.getItemStackDisplayName(aStack); - final short aDamage = (short) getDamage(aStack); - if (aDamage >= 0 && aDamage < GregTech_API.METATILEENTITIES.length && GregTech_API.METATILEENTITIES[aDamage] != null) { + String aName = super.getItemStackDisplayName(aStack); + final short aDamage = (short) getDamage(aStack); + if (aDamage >= 0 + && aDamage < GregTech_API.METATILEENTITIES.length + && GregTech_API.METATILEENTITIES[aDamage] != null) { Materials aMaterial = null; if (GregTech_API.METATILEENTITIES[aDamage] instanceof GT_MetaPipeEntity_Item) { - aMaterial = ((GT_MetaPipeEntity_Item) GregTech_API.METATILEENTITIES[aDamage]).mMaterial; + aMaterial = ((GT_MetaPipeEntity_Item) GregTech_API.METATILEENTITIES[aDamage]).mMaterial; } else if (GregTech_API.METATILEENTITIES[aDamage] instanceof GT_MetaPipeEntity_Fluid) { - aMaterial = ((GT_MetaPipeEntity_Fluid) GregTech_API.METATILEENTITIES[aDamage]).mMaterial; + aMaterial = ((GT_MetaPipeEntity_Fluid) GregTech_API.METATILEENTITIES[aDamage]).mMaterial; } else if (GregTech_API.METATILEENTITIES[aDamage] instanceof GT_MetaPipeEntity_Cable) { - aMaterial = ((GT_MetaPipeEntity_Cable) GregTech_API.METATILEENTITIES[aDamage]).mMaterial; + aMaterial = ((GT_MetaPipeEntity_Cable) GregTech_API.METATILEENTITIES[aDamage]).mMaterial; } else if (GregTech_API.METATILEENTITIES[aDamage] instanceof GT_MetaPipeEntity_Frame) { - aMaterial = ((GT_MetaPipeEntity_Frame) GregTech_API.METATILEENTITIES[aDamage]).mMaterial; + aMaterial = ((GT_MetaPipeEntity_Frame) GregTech_API.METATILEENTITIES[aDamage]).mMaterial; } if (aMaterial != null) { - aName = aMaterial.getLocalizedNameForItem(aName); + aName = aMaterial.getLocalizedNameForItem(aName); } } - return aName; + return aName; } @Override public void onCreated(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { super.onCreated(aStack, aWorld, aPlayer); final short tDamage = (short) getDamage(aStack); - if ((tDamage < 0) || ((tDamage >= GregTech_API.METATILEENTITIES.length) && (GregTech_API.METATILEENTITIES[tDamage] != null))) { + if ((tDamage < 0) + || ((tDamage >= GregTech_API.METATILEENTITIES.length) + && (GregTech_API.METATILEENTITIES[tDamage] != null))) { GregTech_API.METATILEENTITIES[tDamage].onCreated(aStack, aWorld, aPlayer); } } @Override - public boolean placeBlockAt(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int side, float hitX, float hitY, float hitZ, int aMeta) { + public boolean placeBlockAt( + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int side, + float hitX, + float hitY, + float hitZ, + int aMeta) { final short tDamage = (short) getDamage(aStack); if (tDamage > 0) { if (GregTech_API.METATILEENTITIES[tDamage] == null) { @@ -217,10 +286,12 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { return false; } if (aWorld.getBlock(aX, aY, aZ) != this.field_150939_a) { - throw new GT_ItsNotMyFaultException("Failed to place Block even though World.setBlock returned true. It COULD be MCPC/Bukkit causing that. In case you really have that installed, don't report this Bug to me, I don't know how to fix it."); + throw new GT_ItsNotMyFaultException( + "Failed to place Block even though World.setBlock returned true. It COULD be MCPC/Bukkit causing that. In case you really have that installed, don't report this Bug to me, I don't know how to fix it."); } if (aWorld.getBlockMetadata(aX, aY, aZ) != tMetaData) { - throw new GT_ItsNotMyFaultException("Failed to set the MetaValue of the Block even though World.setBlock returned true. It COULD be MCPC/Bukkit causing that. In case you really have that installed, don't report this Bug to me, I don't know how to fix it."); + throw new GT_ItsNotMyFaultException( + "Failed to set the MetaValue of the Block even though World.setBlock returned true. It COULD be MCPC/Bukkit causing that. In case you really have that installed, don't report this Bug to me, I don't know how to fix it."); } final IGregTechTileEntity tTileEntity = (IGregTechTileEntity) aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity != null) { @@ -233,12 +304,12 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { final byte aSide = GT_Utility.getOppositeSide(side); if (tTileEntity.getMetaTileEntity() instanceof IConnectable) { // If we're connectable, try connecting to whatever we're up against - ((IConnectable) tTileEntity.getMetaTileEntity()).connect(aSide); + ((IConnectable) tTileEntity.getMetaTileEntity()).connect(aSide); } else if (aPlayer != null && aPlayer.isSneaking()) { // If we're being placed against something that is connectable, try telling it to connect to us final IGregTechTileEntity aTileEntity = tTileEntity.getIGregTechTileEntityAtSide(aSide); if (aTileEntity != null && aTileEntity.getMetaTileEntity() instanceof IConnectable) { - ((IConnectable) aTileEntity.getMetaTileEntity()).connect((byte)side); + ((IConnectable) aTileEntity.getMetaTileEntity()).connect((byte) side); } } } @@ -257,18 +328,19 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { super.onUpdate(aStack, aWorld, aPlayer, aTimer, aIsInHand); final short tDamage = (short) getDamage(aStack); final EntityLivingBase tPlayer = (EntityPlayer) aPlayer; - if (GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_SuperChest || - GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_QuantumChest || - GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_SuperTank || - GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_QuantumTank) { + if (GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_SuperChest + || GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_QuantumChest + || GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_SuperTank + || GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_QuantumTank) { final NBTTagCompound tNBT = aStack.stackTagCompound; if (tNBT == null) return; if (tNBT.hasNoTags()) { aStack.setTagCompound(null); return; } - if ((tNBT.hasKey("mItemCount") && tNBT.getInteger("mItemCount") > 0) || - (tNBT.hasKey("mFluid") && FluidStack.loadFluidStackFromNBT(tNBT.getCompoundTag("mFluid")).amount > 64000)) { + if ((tNBT.hasKey("mItemCount") && tNBT.getInteger("mItemCount") > 0) + || (tNBT.hasKey("mFluid") + && FluidStack.loadFluidStackFromNBT(tNBT.getCompoundTag("mFluid")).amount > 64000)) { final FluidStack tFluid = FluidStack.loadFluidStackFromNBT(tNBT.getCompoundTag("mFluid")); int tLasing = 1200; if (tFluid != null) { @@ -303,8 +375,7 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { if (container != null) { final int tDamage = container.getItemDamage(); final IMetaTileEntity tMetaTile = GregTech_API.METATILEENTITIES[tDamage]; - if (tMetaTile != null) - return tMetaTile.getCapacity(); + if (tMetaTile != null) return tMetaTile.getCapacity(); } return 0; } @@ -314,7 +385,8 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { if (container != null && resource != null) { final int tDamage = container.getItemDamage(); final IMetaTileEntity tMetaTile = GregTech_API.METATILEENTITIES[tDamage]; - if (!(tMetaTile instanceof GT_MetaTileEntity_QuantumTank || tMetaTile instanceof GT_MetaTileEntity_SuperTank)) { + if (!(tMetaTile instanceof GT_MetaTileEntity_QuantumTank + || tMetaTile instanceof GT_MetaTileEntity_SuperTank)) { return 0; } if (container.stackTagCompound == null) container.stackTagCompound = new NBTTagCompound(); @@ -346,7 +418,8 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { if (container != null && container.hasTagCompound()) { final int tDamage = container.getItemDamage(); final IMetaTileEntity tMetaTile = GregTech_API.METATILEENTITIES[tDamage]; - if (!(tMetaTile instanceof GT_MetaTileEntity_QuantumTank || tMetaTile instanceof GT_MetaTileEntity_SuperTank)) { + if (!(tMetaTile instanceof GT_MetaTileEntity_QuantumTank + || tMetaTile instanceof GT_MetaTileEntity_SuperTank)) { return null; } final FluidStack tStoredFluid = getFluid(container); @@ -357,8 +430,7 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { if (doDrain) { if (tNewFluid.amount <= 0) { container.stackTagCompound.removeTag("mFluid"); - if (container.stackTagCompound.hasNoTags()) - container.setTagCompound(null); + if (container.stackTagCompound.hasNoTags()) container.setTagCompound(null); } else { container.stackTagCompound.setTag("mFluid", tNewFluid.writeToNBT(new NBTTagCompound())); } diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Ores.java b/src/main/java/gregtech/common/blocks/GT_Item_Ores.java index 63c3babfbb..bcf088a621 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Ores.java @@ -17,7 +17,17 @@ public class GT_Item_Ores extends ItemBlock { } @Override - public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { + public boolean onItemUseFirst( + ItemStack stack, + EntityPlayer player, + World world, + int x, + int y, + int z, + int side, + float hitX, + float hitY, + float hitZ) { return false; } @@ -28,18 +38,37 @@ public class GT_Item_Ores extends ItemBlock { @Override public String getItemStackDisplayName(ItemStack aStack) { - String aName = super.getItemStackDisplayName(aStack); - if (this.field_150939_a instanceof GT_Block_Ores_Abstract) { - aName = Materials.getLocalizedNameForItem(aName, aStack.getItemDamage() % 1000); - } - return aName; + String aName = super.getItemStackDisplayName(aStack); + if (this.field_150939_a instanceof GT_Block_Ores_Abstract) { + aName = Materials.getLocalizedNameForItem(aName, aStack.getItemDamage() % 1000); + } + return aName; } @Override - public boolean placeBlockAt(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int side, float hitX, float hitY, float hitZ, int aMeta) { + public boolean placeBlockAt( + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int side, + float hitX, + float hitY, + float hitZ, + int aMeta) { short tDamage = (short) getDamage(aStack); if (tDamage > 0) { - if (!aWorld.setBlock(aX, aY, aZ, this.field_150939_a, GT_TileEntity_Ores.getHarvestData(tDamage, ((GT_Block_Ores_Abstract) field_150939_a).getBaseBlockHarvestLevel(aMeta % 16000 / 1000)), 3)) { + if (!aWorld.setBlock( + aX, + aY, + aZ, + this.field_150939_a, + GT_TileEntity_Ores.getHarvestData( + tDamage, + ((GT_Block_Ores_Abstract) field_150939_a).getBaseBlockHarvestLevel(aMeta % 16000 / 1000)), + 3)) { return false; } GT_TileEntity_Ores tTileEntity = (GT_TileEntity_Ores) aWorld.getTileEntity(aX, aY, aZ); diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Stones_Abstract.java b/src/main/java/gregtech/common/blocks/GT_Item_Stones_Abstract.java index b75743e110..b62c7c0232 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Stones_Abstract.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Stones_Abstract.java @@ -2,15 +2,15 @@ package gregtech.common.blocks; import gregtech.api.GregTech_API; import gregtech.api.util.GT_LanguageManager; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; -import java.util.List; - public class GT_Item_Stones_Abstract extends ItemBlock { - private final String mNoMobsToolTip = GT_LanguageManager.addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block"); + private final String mNoMobsToolTip = + GT_LanguageManager.addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block"); public GT_Item_Stones_Abstract(Block block) { super(block); diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Storage.java b/src/main/java/gregtech/common/blocks/GT_Item_Storage.java index 10cc3ea1ac..55c19ae48c 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Storage.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Storage.java @@ -1,13 +1,12 @@ package gregtech.common.blocks; import gregtech.api.GregTech_API; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; -import java.util.List; - public class GT_Item_Storage extends ItemBlock { public GT_Item_Storage(Block block) { super(block); @@ -23,14 +22,14 @@ public class GT_Item_Storage extends ItemBlock { @Override public String getItemStackDisplayName(ItemStack aStack) { - String aName = super.getItemStackDisplayName(aStack); - if (this.field_150939_a instanceof GT_Block_Metal) { - int aDamage = aStack.getItemDamage(); - if (aDamage >= 0 && aDamage < ((GT_Block_Metal) this.field_150939_a).mMats.length) { - aName = ((GT_Block_Metal) this.field_150939_a).mMats[aDamage].getLocalizedNameForItem(aName); - } - } - return aName; + String aName = super.getItemStackDisplayName(aStack); + if (this.field_150939_a instanceof GT_Block_Metal) { + int aDamage = aStack.getItemDamage(); + if (aDamage >= 0 && aDamage < ((GT_Block_Metal) this.field_150939_a).mMats.length) { + aName = ((GT_Block_Metal) this.field_150939_a).mMats[aDamage].getLocalizedNameForItem(aName); + } + } + return aName; } @Override diff --git a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java index 4885910877..452e9db5d4 100644 --- a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java @@ -1,5 +1,7 @@ package gregtech.common.blocks; +import static gregtech.api.enums.TextureSet.SET_NONE; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; @@ -11,6 +13,8 @@ import gregtech.api.objects.XSTR; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; +import java.util.ArrayList; +import java.util.Random; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; @@ -19,11 +23,6 @@ import net.minecraft.network.Packet; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import java.util.ArrayList; -import java.util.Random; - -import static gregtech.api.enums.TextureSet.SET_NONE; - public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntity { public short mMetaData = 0; public boolean mNatural = false; @@ -31,9 +30,19 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit public static byte getHarvestData(short aMetaData, int aBaseBlockHarvestLevel) { Materials aMaterial = GregTech_API.sGeneratedMaterials[(aMetaData % 1000)]; - byte tByte = aMaterial == null ? 0 : (byte) Math.max(aBaseBlockHarvestLevel, Math.min(7, aMaterial.mToolQuality - (aMetaData < 16000 ? 0 : 1))); + byte tByte = aMaterial == null + ? 0 + : (byte) Math.max( + aBaseBlockHarvestLevel, Math.min(7, aMaterial.mToolQuality - (aMetaData < 16000 ? 0 : 1))); if (GT_Mod.gregtechproxy.mChangeHarvestLevels) { - tByte = aMaterial == null ? 0 : (byte) Math.max(aBaseBlockHarvestLevel, Math.min(GT_Mod.gregtechproxy.mMaxHarvestLevel, GT_Mod.gregtechproxy.mHarvestLevel[aMaterial.mMetaItemSubID] - (aMetaData < 16000 ? 0 : 1))); + tByte = aMaterial == null + ? 0 + : (byte) Math.max( + aBaseBlockHarvestLevel, + Math.min( + GT_Mod.gregtechproxy.mMaxHarvestLevel, + GT_Mod.gregtechproxy.mHarvestLevel[aMaterial.mMetaItemSubID] + - (aMetaData < 16000 ? 0 : 1))); } return tByte; } @@ -42,7 +51,8 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit return setOreBlock(aWorld, aX, aY, aZ, aMetaData, isSmallOre, true); } - public static boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData, boolean isSmallOre, boolean air) { + public static boolean setOreBlock( + World aWorld, int aX, int aY, int aZ, int aMetaData, boolean isSmallOre, boolean air) { if (!air) { aY = Math.min(aWorld.getActualHeight(), Math.max(aY, 1)); } @@ -53,8 +63,8 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit aMetaData += isSmallOre ? 16000 : 0; if ((aMetaData > 0) && ((tBlock != Blocks.air) || air)) { if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone)) { - //Do nothing, stone background is default background. - //Do this comparison first since stone is most common + // Do nothing, stone background is default background. + // Do this comparison first since stone is most common } else if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack)) { aMetaData += 1000; } else if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone)) { @@ -83,25 +93,33 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit if (GregTech_API.sBlockOresUb1 != null) { tOreBlock = GregTech_API.sBlockOresUb1; aMetaData += (BlockMeta * 1000); - //GT_FML_LOGGER.info("Block changed to UB1"); + // GT_FML_LOGGER.info("Block changed to UB1"); } } else if (BlockName.equals("tile.metamorphicStone")) { if (GregTech_API.sBlockOresUb2 != null) { tOreBlock = GregTech_API.sBlockOresUb2; aMetaData += (BlockMeta * 1000); - //GT_FML_LOGGER.info("Block changed to UB2"); + // GT_FML_LOGGER.info("Block changed to UB2"); } } else if (BlockName.equals("tile.sedimentaryStone")) { if (GregTech_API.sBlockOresUb3 != null) { tOreBlock = GregTech_API.sBlockOresUb3; aMetaData += (BlockMeta * 1000); - //GT_FML_LOGGER.info("Block changed to UB3"); + // GT_FML_LOGGER.info("Block changed to UB3"); } } else { return false; } - //GT_FML_LOGGER.info(tOreBlock); - aWorld.setBlock(aX, aY, aZ, tOreBlock, getHarvestData((short) aMetaData, ((GT_Block_Ores_Abstract) tOreBlock).getBaseBlockHarvestLevel(aMetaData % 16000 / 1000)), 0); + // GT_FML_LOGGER.info(tOreBlock); + aWorld.setBlock( + aX, + aY, + aZ, + tOreBlock, + getHarvestData( + (short) aMetaData, + ((GT_Block_Ores_Abstract) tOreBlock).getBaseBlockHarvestLevel(aMetaData % 16000 / 1000)), + 0); TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if ((tTileEntity instanceof GT_TileEntity_Ores)) { ((GT_TileEntity_Ores) tTileEntity).mMetaData = ((short) aMetaData); @@ -129,22 +147,28 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit public void onUpdated() { if ((!this.worldObj.isRemote) && (this.mBlocked)) { this.mBlocked = false; - GT_Values.NW.sendPacketToAllPlayersInRange(this.worldObj, new GT_Packet_Ores(this.xCoord, (short) this.yCoord, this.zCoord, this.mMetaData), this.xCoord, this.zCoord); + GT_Values.NW.sendPacketToAllPlayersInRange( + this.worldObj, + new GT_Packet_Ores(this.xCoord, (short) this.yCoord, this.zCoord, this.mMetaData), + this.xCoord, + this.zCoord); } } @Override public Packet getDescriptionPacket() { if (!this.worldObj.isRemote) { - if (!(this.mBlocked = ( - GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord + 1, this.yCoord, this.zCoord) && - GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord - 1, this.yCoord, this.zCoord) && - GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord + 1, this.zCoord) && - GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord - 1, this.zCoord) && - GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord, this.zCoord + 1) && - GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord, this.zCoord - 1) - ))) { - GT_Values.NW.sendPacketToAllPlayersInRange(this.worldObj, new GT_Packet_Ores(this.xCoord, (short) this.yCoord, this.zCoord, this.mMetaData), this.xCoord, this.zCoord); + if (!(this.mBlocked = (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord + 1, this.yCoord, this.zCoord) + && GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord - 1, this.yCoord, this.zCoord) + && GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord + 1, this.zCoord) + && GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord - 1, this.zCoord) + && GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord, this.zCoord + 1) + && GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord, this.zCoord - 1)))) { + GT_Values.NW.sendPacketToAllPlayersInRange( + this.worldObj, + new GT_Packet_Ores(this.xCoord, (short) this.yCoord, this.zCoord, this.mMetaData), + this.xCoord, + this.zCoord); } } return null; @@ -153,11 +177,14 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit public void overrideOreBlockMaterial(Block aOverridingStoneBlock, byte aOverridingStoneMeta) { if (this.worldObj == null || blockType == null) return; this.mMetaData = ((short) (int) (this.mMetaData % 1000L + this.mMetaData / 16000L * 16000L)); - if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.netherrack)) { + if (aOverridingStoneBlock.isReplaceableOreGen( + this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.netherrack)) { this.mMetaData = ((short) (this.mMetaData + 1000)); - } else if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.end_stone)) { + } else if (aOverridingStoneBlock.isReplaceableOreGen( + this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.end_stone)) { this.mMetaData = ((short) (this.mMetaData + 2000)); - } else if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, GregTech_API.sBlockGranites)) { + } else if (aOverridingStoneBlock.isReplaceableOreGen( + this.worldObj, this.xCoord, this.yCoord, this.zCoord, GregTech_API.sBlockGranites)) { if (aOverridingStoneBlock == GregTech_API.sBlockGranites) { if (aOverridingStoneMeta < 8) { this.mMetaData = ((short) (this.mMetaData + 3000)); @@ -167,7 +194,8 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit } else { this.mMetaData = ((short) (this.mMetaData + 3000)); } - } else if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, GregTech_API.sBlockStones)) { + } else if (aOverridingStoneBlock.isReplaceableOreGen( + this.worldObj, this.xCoord, this.yCoord, this.zCoord, GregTech_API.sBlockStones)) { if (aOverridingStoneBlock == GregTech_API.sBlockStones) { if (aOverridingStoneMeta < 8) { this.mMetaData = ((short) (this.mMetaData + 5000)); @@ -178,7 +206,14 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit this.mMetaData = ((short) (this.mMetaData + 5000)); } } - this.worldObj.setBlockMetadataWithNotify(this.xCoord, this.yCoord, this.zCoord, getHarvestData(this.mMetaData, ((GT_Block_Ores_Abstract) blockType).getBaseBlockHarvestLevel(mMetaData % 16000 / 1000)), 0); + this.worldObj.setBlockMetadataWithNotify( + this.xCoord, + this.yCoord, + this.zCoord, + getHarvestData( + this.mMetaData, + ((GT_Block_Ores_Abstract) blockType).getBaseBlockHarvestLevel(mMetaData % 16000 / 1000)), + 0); } public void convertOreBlock(World aWorld, int aX, int aY, int aZ) { @@ -187,7 +222,15 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity instanceof GT_TileEntity_Ores) { ((GT_TileEntity_Ores) tTileEntity).mMetaData = aMeta; - this.worldObj.setBlockMetadataWithNotify(this.xCoord, this.yCoord, this.zCoord, getHarvestData(aMeta, ((GT_Block_Ores_Abstract) tTileEntity.blockType).getBaseBlockHarvestLevel(aMeta % 16000 / 1000)), 0); + this.worldObj.setBlockMetadataWithNotify( + this.xCoord, + this.yCoord, + this.zCoord, + getHarvestData( + aMeta, + ((GT_Block_Ores_Abstract) tTileEntity.blockType) + .getBaseBlockHarvestLevel(aMeta % 16000 / 1000)), + 0); } } @@ -223,13 +266,15 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit Materials aMaterial = aOreMaterial.mOreReplacement; - ItemStack tStack = GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L); + ItemStack tStack = GT_OreDictUnificator.get( + OrePrefixes.gemExquisite, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L); if (tStack != null) { for (int i = 0; i < 1; i++) { tSelector.add(tStack); } } - tStack = GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L); + tStack = GT_OreDictUnificator.get( + OrePrefixes.gemFlawless, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L); if (tStack != null) { for (int i = 0; i < 2; i++) { tSelector.add(tStack); @@ -241,7 +286,8 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit tSelector.add(tStack); } } - tStack = GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1L), 1L); + tStack = GT_OreDictUnificator.get( + OrePrefixes.gemFlawed, aMaterial, GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1L), 1L); if (tStack != null) { for (int i = 0; i < 5; i++) { tSelector.add(tStack); @@ -253,7 +299,11 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit tSelector.add(tStack); } } - tStack = GT_OreDictUnificator.get(OrePrefixes.gemChipped, aMaterial, GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), 1L); + tStack = GT_OreDictUnificator.get( + OrePrefixes.gemChipped, + aMaterial, + GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), + 1L); if (tStack != null) { for (int i = 0; i < 5; i++) { tSelector.add(tStack); @@ -267,14 +317,22 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit } if (!tSelector.isEmpty()) { int i = 0; - for (int j = Math.max(1, aMaterial.mOreMultiplier + (aFortune > 0 ? tRandom.nextInt(1 + aFortune * aMaterial.mOreMultiplier) : 0) / 2); i < j; i++) { + for (int j = Math.max( + 1, + aMaterial.mOreMultiplier + + (aFortune > 0 ? tRandom.nextInt(1 + aFortune * aMaterial.mOreMultiplier) : 0) + / 2); + i < j; + i++) { rList.add(GT_Utility.copyAmount(1L, tSelector.get(tRandom.nextInt(tSelector.size())))); } } if (tRandom.nextInt(3 + aFortune) > 1) { - Materials dustMat = ((GT_Block_Ores_Abstract) aDroppedOre).getDroppedDusts()[this.mMetaData / 1000 % 16]; + Materials dustMat = + ((GT_Block_Ores_Abstract) aDroppedOre).getDroppedDusts()[this.mMetaData / 1000 % 16]; if (dustMat != null) - rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, dustMat, 1L)); + rList.add(GT_OreDictUnificator.get( + tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, dustMat, 1L)); } } return rList; @@ -285,20 +343,27 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit Materials aMaterial = GregTech_API.sGeneratedMaterials[(this.mMetaData % 1000)]; if ((aMaterial != null) && (this.mMetaData < 32000)) { ITexture iTexture = TextureFactory.builder() - .addIcon(aMaterial.mIconSet.mTextures[this.mMetaData / 16000 == 0 ? - OrePrefixes.ore.mTextureIndex : - OrePrefixes.oreSmall.mTextureIndex]) + .addIcon(aMaterial + .mIconSet + .mTextures[ + this.mMetaData / 16000 == 0 + ? OrePrefixes.ore.mTextureIndex + : OrePrefixes.oreSmall.mTextureIndex]) .setRGBA(aMaterial.mRGBa) .stdOrient() .build(); if (aBlock instanceof GT_Block_Ores_Abstract) { - return new ITexture[]{ - ((GT_Block_Ores_Abstract) aBlock).getTextureSet()[((this.mMetaData / 1000) % 16)], iTexture}; + return new ITexture[] { + ((GT_Block_Ores_Abstract) aBlock).getTextureSet()[((this.mMetaData / 1000) % 16)], iTexture + }; } } - return new ITexture[]{ - TextureFactory.of(Blocks.stone, 0), - TextureFactory.builder().addIcon(SET_NONE.mTextures[OrePrefixes.ore.mTextureIndex]).stdOrient().build() + return new ITexture[] { + TextureFactory.of(Blocks.stone, 0), + TextureFactory.builder() + .addIcon(SET_NONE.mTextures[OrePrefixes.ore.mTextureIndex]) + .stdOrient() + .build() }; } } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Arm.java b/src/main/java/gregtech/common/covers/GT_Cover_Arm.java index 23802851c7..fd4f2a684c 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Arm.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Arm.java @@ -20,8 +20,8 @@ import net.minecraftforge.fluids.Fluid; public class GT_Cover_Arm extends GT_CoverBehavior { public final int mTickRate; - //msb converted, 2nd : direction (1=export) - //right 14 bits: internalSlot, next 14 bits adjSlot, 0 = all, slot = -1 + // msb converted, 2nd : direction (1=export) + // right 14 bits: internalSlot, next 14 bits adjSlot, 0 = all, slot = -1 protected static final int EXPORT_MASK = 0x40000000; protected static final int SLOT_ID_MASK = 0x3FFF; protected static final int SLOT_ID_MIN = 0; @@ -32,21 +32,23 @@ public class GT_Cover_Arm extends GT_CoverBehavior { } @Override - public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public boolean isRedstoneSensitive( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { return false; } @Override - public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public int doCoverThings( + byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { if ((((aTileEntity instanceof IMachineProgress)) && (!((IMachineProgress) aTileEntity).isAllowedToWork()))) { return aCoverVariable; } - //Convert from ver. 5.09.33.50, check if 3 last bits are equal + // Convert from ver. 5.09.33.50, check if 3 last bits are equal if ((aCoverVariable >>> 29) == 0) { - aCoverVariable = CONVERTED_BIT | (((aCoverVariable+1) & SLOT_ID_MASK) << 14) | EXPORT_MASK; + aCoverVariable = CONVERTED_BIT | (((aCoverVariable + 1) & SLOT_ID_MASK) << 14) | EXPORT_MASK; } else if ((aCoverVariable >>> 29) == 7) { - aCoverVariable = CONVERTED_BIT | Math.min(Math.abs(aCoverVariable-1), SLOT_ID_MASK); + aCoverVariable = CONVERTED_BIT | Math.min(Math.abs(aCoverVariable - 1), SLOT_ID_MASK); } TileEntity toTile, fromTile; @@ -56,33 +58,50 @@ public class GT_Cover_Arm extends GT_CoverBehavior { fromTile = (TileEntity) aTileEntity; toTile = aTileEntity.getTileEntityAtSide(aSide); fromSlot = aCoverVariable & SLOT_ID_MASK; - toSlot = (aCoverVariable>>14) & SLOT_ID_MASK; + toSlot = (aCoverVariable >> 14) & SLOT_ID_MASK; } else { fromTile = aTileEntity.getTileEntityAtSide(aSide); toTile = (TileEntity) aTileEntity; - fromSlot = (aCoverVariable>>14) & SLOT_ID_MASK; + fromSlot = (aCoverVariable >> 14) & SLOT_ID_MASK; toSlot = aCoverVariable & SLOT_ID_MASK; } byte movedItems = 0; - if(fromSlot > 0 && toSlot > 0) { + if (fromSlot > 0 && toSlot > 0) { if (fromTile instanceof IInventory && toTile instanceof IInventory) - movedItems = GT_Utility.moveFromSlotToSlot((IInventory) fromTile, (IInventory) toTile, fromSlot-1, toSlot-1, null, false, (byte)64, (byte)1, (byte)64, (byte)1); + movedItems = GT_Utility.moveFromSlotToSlot( + (IInventory) fromTile, + (IInventory) toTile, + fromSlot - 1, + toSlot - 1, + null, + false, + (byte) 64, + (byte) 1, + (byte) 64, + (byte) 1); } else if (toSlot > 0) { byte side; - if ((aCoverVariable & EXPORT_MASK) > 0) - side = aSide; - else - side = GT_Utility.getOppositeSide(aSide); - movedItems = GT_Utility.moveOneItemStackIntoSlot(fromTile, toTile, side, toSlot-1, null, false, (byte)64, (byte)1, (byte)64, (byte)1); + if ((aCoverVariable & EXPORT_MASK) > 0) side = aSide; + else side = GT_Utility.getOppositeSide(aSide); + movedItems = GT_Utility.moveOneItemStackIntoSlot( + fromTile, toTile, side, toSlot - 1, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1); } else if (fromSlot > 0) { byte toSide; - if ((aCoverVariable & EXPORT_MASK) > 0) - toSide = aSide; - else - toSide = GT_Utility.getOppositeSide(aSide); + if ((aCoverVariable & EXPORT_MASK) > 0) toSide = aSide; + else toSide = GT_Utility.getOppositeSide(aSide); if (fromTile instanceof IInventory) - movedItems = GT_Utility.moveFromSlotToSide((IInventory) fromTile, toTile, fromSlot-1, toSide, null, false, (byte)64, (byte)1, (byte)64, (byte)1); + movedItems = GT_Utility.moveFromSlotToSide( + (IInventory) fromTile, + toTile, + fromSlot - 1, + toSide, + null, + false, + (byte) 64, + (byte) 1, + (byte) 64, + (byte) 1); } else { byte fromSide, toSide; if ((aCoverVariable & EXPORT_MASK) > 0) { @@ -92,14 +111,23 @@ public class GT_Cover_Arm extends GT_CoverBehavior { fromSide = GT_Utility.getOppositeSide(aSide); toSide = aSide; } - movedItems = GT_Utility.moveOneItemStack(fromTile, toTile, fromSide, toSide, null, false, (byte)64, (byte)1, (byte)64, (byte)1); + movedItems = GT_Utility.moveOneItemStack( + fromTile, toTile, fromSide, toSide, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1); } return aCoverVariable; } @Override - public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public int onCoverScrewdriverclick( + byte aSide, + int aCoverID, + int aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { int step = 0; if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { step += aPlayer.isSneaking() ? 256 : 16; @@ -112,7 +140,15 @@ public class GT_Cover_Arm extends GT_CoverBehavior { } @Override - protected boolean onCoverRightClickImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + protected boolean onCoverRightClickImpl( + byte aSide, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { int step = (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) ? 1 : -1; int tCoverVariable = getNewVar(aCoverVariable.get(), step); sendMessageToPlayer(aPlayer, tCoverVariable); @@ -122,7 +158,15 @@ public class GT_Cover_Arm extends GT_CoverBehavior { @Override @SuppressWarnings("deprecation") - public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public boolean onCoverRightclick( + byte aSide, + int aCoverID, + int aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { int step = (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) ? 1 : -1; aCoverVariable = getNewVar(aCoverVariable, step); sendMessageToPlayer(aPlayer, aCoverVariable); @@ -132,9 +176,12 @@ public class GT_Cover_Arm extends GT_CoverBehavior { private void sendMessageToPlayer(EntityPlayer aPlayer, int var) { if ((var & EXPORT_MASK) != 0) - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("001", "Puts out into adjacent Slot #") + (((var >> 14) & SLOT_ID_MASK) - 1)); + GT_Utility.sendChatToPlayer( + aPlayer, + GT_Utility.trans("001", "Puts out into adjacent Slot #") + (((var >> 14) & SLOT_ID_MASK) - 1)); else - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("002", "Grabs in for own Slot #") + ((var & SLOT_ID_MASK) - 1)); + GT_Utility.sendChatToPlayer( + aPlayer, GT_Utility.trans("002", "Grabs in for own Slot #") + ((var & SLOT_ID_MASK) - 1)); } private int getNewVar(int var, int step) { @@ -142,25 +189,19 @@ public class GT_Cover_Arm extends GT_CoverBehavior { int adjSlot = (var >> 14) & SLOT_ID_MASK; if ((var & EXPORT_MASK) == 0) { int x = (intSlot + step); - if (x > SLOT_ID_MASK ) - return createVar(0, SLOT_ID_MASK, 0); - else if (x < 1) - return createVar(-step - intSlot + 1, 0, EXPORT_MASK); - else - return createVar(0, x, 0); + if (x > SLOT_ID_MASK) return createVar(0, SLOT_ID_MASK, 0); + else if (x < 1) return createVar(-step - intSlot + 1, 0, EXPORT_MASK); + else return createVar(0, x, 0); } else { int x = (adjSlot - step); - if (x > SLOT_ID_MASK) - return createVar(SLOT_ID_MASK, 0, EXPORT_MASK); - else if (x < 1) - return createVar(0, +step - adjSlot + 1, 0); - else - return createVar(x, 0, EXPORT_MASK); + if (x > SLOT_ID_MASK) return createVar(SLOT_ID_MASK, 0, EXPORT_MASK); + else if (x < 1) return createVar(0, +step - adjSlot + 1, 0); + else return createVar(x, 0, EXPORT_MASK); } } - private int createVar(int adjSlot, int intSlot, int export){ - return CONVERTED_BIT | export | ((adjSlot & SLOT_ID_MASK) << 14) | (intSlot & SLOT_ID_MASK); + private int createVar(int adjSlot, int intSlot, int export) { + return CONVERTED_BIT | export | ((adjSlot & SLOT_ID_MASK) << 14) | (intSlot & SLOT_ID_MASK); } @Override @@ -216,14 +257,13 @@ public class GT_Cover_Arm extends GT_CoverBehavior { /** * GUI Stuff */ - @Override public boolean hasCoverGUI() { return true; } @Override - public Object getClientGUI(byte aSide, int aCoverID, int coverData, ICoverable aTileEntity) { + public Object getClientGUI(byte aSide, int aCoverID, int coverData, ICoverable aTileEntity) { return new GT_Cover_Arm.GUI(aSide, aCoverID, coverData, aTileEntity); } @@ -243,7 +283,6 @@ public class GT_Cover_Arm extends GT_CoverBehavior { private boolean export; private int internalSlotID, adjacentSlotID; - private final int maxIntSlot, maxAdjSlot; private final int textColor = this.getTextColorOrDefault("text", 0xFF555555); @@ -258,28 +297,32 @@ public class GT_Cover_Arm extends GT_CoverBehavior { internalSlotID = (coverVariable & SLOT_ID_MASK); adjacentSlotID = (coverVariable >> 14) & SLOT_ID_MASK; - new GT_GuiIconButton(this, 0, startX + spaceX * 0, startY + spaceY * 0, GT_GuiIcon.EXPORT).setTooltipText(GT_Utility.trans("006", "Export")); - new GT_GuiIconButton(this, 1, startX + spaceX * 1, startY + spaceY * 0, GT_GuiIcon.IMPORT).setTooltipText(GT_Utility.trans("007", "Import")); + new GT_GuiIconButton(this, 0, startX + spaceX * 0, startY + spaceY * 0, GT_GuiIcon.EXPORT) + .setTooltipText(GT_Utility.trans("006", "Export")); + new GT_GuiIconButton(this, 1, startX + spaceX * 1, startY + spaceY * 0, GT_GuiIcon.IMPORT) + .setTooltipText(GT_Utility.trans("007", "Import")); - intSlot = new GT_GuiIntegerTextBox(this, 2, startX + spaceX * 0, startY + spaceY * 1 + 2, spaceX * 2+5, 12); - setBoxText(intSlot, internalSlotID-1); + intSlot = + new GT_GuiIntegerTextBox(this, 2, startX + spaceX * 0, startY + spaceY * 1 + 2, spaceX * 2 + 5, 12); + setBoxText(intSlot, internalSlotID - 1); intSlot.setMaxStringLength(6); - adjSlot = new GT_GuiIntegerTextBox(this, 3, startX + spaceX * 0, startY + spaceY * 2 + 2, spaceX * 2+5, 12); - setBoxText(adjSlot, adjacentSlotID-1); + adjSlot = + new GT_GuiIntegerTextBox(this, 3, startX + spaceX * 0, startY + spaceY * 2 + 2, spaceX * 2 + 5, 12); + setBoxText(adjSlot, adjacentSlotID - 1); adjSlot.setMaxStringLength(6); - //intSlotIcon = new GT_GuiFakeItemButton(this, startX + spaceX * 8-4, startY + spaceY * 1, GT_GuiIcon.SLOT_GRAY); - //adjSlotIcon = new GT_GuiFakeItemButton(this, startX + spaceX * 8-4, startY + spaceY * 2, GT_GuiIcon.SLOT_GRAY); + // intSlotIcon = new GT_GuiFakeItemButton(this, startX + spaceX * 8-4, startY + spaceY * 1, + // GT_GuiIcon.SLOT_GRAY); + // adjSlotIcon = new GT_GuiFakeItemButton(this, startX + spaceX * 8-4, startY + spaceY * 2, + // GT_GuiIcon.SLOT_GRAY); if (super.tile instanceof TileEntity && !super.tile.isDead()) { - maxIntSlot = tile.getSizeInventory()-1; + maxIntSlot = tile.getSizeInventory() - 1; TileEntity adj = super.tile.getTileEntityAtSide(side); - if (adj instanceof IInventory) - maxAdjSlot = ((IInventory) adj).getSizeInventory()-1; - else - maxAdjSlot = -1; + if (adj instanceof IInventory) maxAdjSlot = ((IInventory) adj).getSizeInventory() - 1; + else maxAdjSlot = -1; } else { maxIntSlot = -1; maxAdjSlot = -1; @@ -290,12 +333,32 @@ public class GT_Cover_Arm extends GT_CoverBehavior { public void drawExtras(int mouseX, int mouseY, float parTicks) { super.drawExtras(mouseX, mouseY, parTicks); if (export) - this.getFontRenderer().drawString(GT_Utility.trans("006", "Export"), startX + spaceX*3, 4+startY+spaceY*0, textColor); + this.getFontRenderer() + .drawString( + GT_Utility.trans("006", "Export"), + startX + spaceX * 3, + 4 + startY + spaceY * 0, + textColor); else - this.getFontRenderer().drawString(GT_Utility.trans("007", "Import"), startX + spaceX*3, 4+startY+spaceY*0, textColor); - - this.getFontRenderer().drawString(GT_Utility.trans("254", "Internal slot#"), startX + spaceX*3, 4+startY+spaceY*1, textColor); - this.getFontRenderer().drawString(GT_Utility.trans("255", "Adjacent slot#"), startX + spaceX*3, 4+startY+spaceY*2, textColor); + this.getFontRenderer() + .drawString( + GT_Utility.trans("007", "Import"), + startX + spaceX * 3, + 4 + startY + spaceY * 0, + textColor); + + this.getFontRenderer() + .drawString( + GT_Utility.trans("254", "Internal slot#"), + startX + spaceX * 3, + 4 + startY + spaceY * 1, + textColor); + this.getFontRenderer() + .drawString( + GT_Utility.trans("255", "Adjacent slot#"), + startX + spaceX * 3, + 4 + startY + spaceY * 2, + textColor); } @Override @@ -303,7 +366,7 @@ public class GT_Cover_Arm extends GT_CoverBehavior { intSlot.setFocused(true); updateButtons(); - //updateInventorySlots(); + // updateInventorySlots(); } @Override @@ -332,17 +395,13 @@ public class GT_Cover_Arm extends GT_CoverBehavior { step = (isShiftKeyDown() ? 50 : isCtrlKeyDown() ? 5 : 1) * (delta > 0 ? step : -step); int maxSlot = box.id == 3 ? maxAdjSlot : maxIntSlot; int val = parseTextBox(box, maxSlot); - if (val < 0) - val = -1; + if (val < 0) val = -1; val = val + step; if (maxSlot < val) - if (maxSlot < 0) - val = -1; - else - val = maxSlot; - else if (val < SLOT_ID_MIN) - val = -1; + if (maxSlot < 0) val = -1; + else val = maxSlot; + else if (val < SLOT_ID_MIN) val = -1; setBoxText(box, val); return; @@ -356,43 +415,37 @@ public class GT_Cover_Arm extends GT_CoverBehavior { if (box.id == 2) { val = parseTextBox(box, maxIntSlot); - internalSlotID = val+1; - } - else if (box.id == 3) { + internalSlotID = val + 1; + } else if (box.id == 3) { val = parseTextBox(box, maxAdjSlot); - adjacentSlotID = val+1; + adjacentSlotID = val + 1; } setBoxText(box, val); coverVariable = getNewCoverVariable(); GT_Values.NW.sendToServer(new GT_Packet_TileEntityCover(side, coverID, coverVariable, tile)); - //updateInventorySlots(); + // updateInventorySlots(); } @Override public void resetTextBox(GT_GuiIntegerTextBox box) { int val = 0; - if (box.id == 2) - val = internalSlotID-1; - else if (box.id == 3) - val = adjacentSlotID-1; + if (box.id == 2) val = internalSlotID - 1; + else if (box.id == 3) val = adjacentSlotID - 1; setBoxText(box, val); } private void setBoxText(GT_GuiIntegerTextBox box, int val) { - box.setText( val < 0 ? ANY_TEXT : String.valueOf(val)); + box.setText(val < 0 ? ANY_TEXT : String.valueOf(val)); } private int parseTextBox(GT_GuiIntegerTextBox box, int maxSlot) { String text = box.getText(); - if (text == null) - return -1; + if (text == null) return -1; text = text.trim(); - if (text.startsWith(ANY_TEXT)) - text = text.substring(ANY_TEXT.length()); + if (text.startsWith(ANY_TEXT)) text = text.substring(ANY_TEXT.length()); - if (text.isEmpty()) - return -1; + if (text.isEmpty()) return -1; int val; try { @@ -402,22 +455,21 @@ public class GT_Cover_Arm extends GT_CoverBehavior { } if (maxSlot < val) - if (maxSlot < 0) - return -1; - else - return maxSlot; - else if (val < SLOT_ID_MIN) - return SLOT_ID_MIN; + if (maxSlot < 0) return -1; + else return maxSlot; + else if (val < SLOT_ID_MIN) return SLOT_ID_MIN; return val; } private int getNewCoverVariable() { - return (export ? EXPORT_MASK : 0) | ((adjacentSlotID & SLOT_ID_MASK) << 14) | (internalSlotID & SLOT_ID_MASK) | CONVERTED_BIT; + return (export ? EXPORT_MASK : 0) + | ((adjacentSlotID & SLOT_ID_MASK) << 14) + | (internalSlotID & SLOT_ID_MASK) + | CONVERTED_BIT; } private boolean buttonClickable(int id) { - if (id == 0) - return !export; + if (id == 0) return !export; return export; } } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java b/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java index dd2b17df05..6fd6eb1337 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java @@ -9,7 +9,6 @@ import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.interfaces.tileentity.IMachineProgress; import gregtech.api.net.GT_Packet_TileEntityCover; import gregtech.api.util.GT_CoverBehavior; -import gregtech.api.util.GT_CoverBehaviorBase; import gregtech.api.util.GT_Utility; import net.minecraft.client.gui.GuiButton; import net.minecraft.entity.player.EntityPlayer; @@ -18,23 +17,28 @@ import net.minecraftforge.fluids.Fluid; public class GT_Cover_ControlsWork extends GT_CoverBehavior { @Override - public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public int doCoverThings( + byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { if (!makeSureOnlyOne(aSide, aTileEntity)) return 0; if (aTileEntity instanceof IMachineProgress) { IMachineProgress machine = (IMachineProgress) aTileEntity; if (aCoverVariable < 2) { if ((aInputRedstone > 0) == (aCoverVariable == 0)) { - if (!machine.isAllowedToWork()) - machine.enableWorking(); - } else if (machine.isAllowedToWork()) - machine.disableWorking(); + if (!machine.isAllowedToWork()) machine.enableWorking(); + } else if (machine.isAllowedToWork()) machine.disableWorking(); machine.setWorkDataValue(aInputRedstone); } else if (aCoverVariable == 2) { machine.disableWorking(); } else { if (machine.wasShutdown()) { machine.disableWorking(); - GT_Utility.sendChatToPlayer(lastPlayer, aTileEntity.getInventoryName() + "at " + String.format("(%d,%d,%d)", aTileEntity.getXCoord(), aTileEntity.getYCoord(), aTileEntity.getZCoord()) + " shut down."); + GT_Utility.sendChatToPlayer( + lastPlayer, + aTileEntity.getInventoryName() + "at " + + String.format( + "(%d,%d,%d)", + aTileEntity.getXCoord(), aTileEntity.getYCoord(), aTileEntity.getZCoord()) + + " shut down."); return 2; } else { return 3 + doCoverThings(aSide, aInputRedstone, aCoverID, aCoverVariable - 3, aTileEntity, aTimer); @@ -90,7 +94,8 @@ public class GT_Cover_ControlsWork extends GT_CoverBehavior { } @Override - public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) { + public boolean onCoverRemoval( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) { if ((aTileEntity instanceof IMachineProgress)) { ((IMachineProgress) aTileEntity).enableWorking(); ((IMachineProgress) aTileEntity).setWorkDataValue((byte) 0); @@ -99,9 +104,19 @@ public class GT_Cover_ControlsWork extends GT_CoverBehavior { } @Override - public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { - aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 5; - if(aCoverVariable <0){aCoverVariable = 2;} + public int onCoverScrewdriverclick( + byte aSide, + int aCoverID, + int aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { + aCoverVariable = (aCoverVariable + (aPlayer.isSneaking() ? -1 : 1)) % 5; + if (aCoverVariable < 0) { + aCoverVariable = 2; + } if (aCoverVariable == 0) { GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("003", "Enable with Signal")); } @@ -140,14 +155,13 @@ public class GT_Cover_ControlsWork extends GT_CoverBehavior { /** * GUI Stuff */ - @Override public boolean hasCoverGUI() { return true; } @Override - public Object getClientGUI(byte aSide, int aCoverID, int coverData, ICoverable aTileEntity) { + public Object getClientGUI(byte aSide, int aCoverID, int coverData, ICoverable aTileEntity) { return new GT_Cover_ControlsWork.GUI(aSide, aCoverID, coverData, aTileEntity); } @@ -173,16 +187,31 @@ public class GT_Cover_ControlsWork extends GT_CoverBehavior { new GT_GuiIconButton(this, 1, startX + spaceX * 0, startY + spaceY * 1, GT_GuiIcon.REDSTONE_OFF); new GT_GuiIconButton(this, 2, startX + spaceX * 0, startY + spaceY * 2, GT_GuiIcon.CROSS); - new GT_GuiIconCheckButton(this, 3, startX + spaceX * 0, startY + spaceY * 3, GT_GuiIcon.CHECKMARK, GT_GuiIcon.CROSS).setChecked(aCoverVariable > 2); + new GT_GuiIconCheckButton( + this, 3, startX + spaceX * 0, startY + spaceY * 3, GT_GuiIcon.CHECKMARK, GT_GuiIcon.CROSS) + .setChecked(aCoverVariable > 2); } @Override public void drawExtras(int mouseX, int mouseY, float parTicks) { super.drawExtras(mouseX, mouseY, parTicks); - this.fontRendererObj.drawString(GT_Utility.trans("243", "Enable with Redstone"), 3+startX + spaceX*1, 4+startY+spaceY*0, textColor); - this.fontRendererObj.drawString(GT_Utility.trans("244", "Disable with Redstone"),3+startX + spaceX*1, 4+startY+spaceY*1, textColor); - this.fontRendererObj.drawString(GT_Utility.trans("245", "Disable machine"), 3+startX + spaceX*1, 4+startY+spaceY*2, textColor); - this.fontRendererObj.drawString(GT_Utility.trans("507", "Safe Mode"), 3+startX + spaceX*1, 4+startY+spaceY*3, textColor); + this.fontRendererObj.drawString( + GT_Utility.trans("243", "Enable with Redstone"), + 3 + startX + spaceX * 1, + 4 + startY + spaceY * 0, + textColor); + this.fontRendererObj.drawString( + GT_Utility.trans("244", "Disable with Redstone"), + 3 + startX + spaceX * 1, + 4 + startY + spaceY * 1, + textColor); + this.fontRendererObj.drawString( + GT_Utility.trans("245", "Disable machine"), + 3 + startX + spaceX * 1, + 4 + startY + spaceY * 2, + textColor); + this.fontRendererObj.drawString( + GT_Utility.trans("507", "Safe Mode"), 3 + startX + spaceX * 1, 4 + startY + spaceY * 3, textColor); } @Override @@ -231,6 +260,5 @@ public class GT_Cover_ControlsWork extends GT_CoverBehavior { coverVariable -= 3; } } - } } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java b/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java index 9e0fd84a6c..592475b610 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java @@ -1,5 +1,7 @@ package gregtech.common.covers; +import static gregtech.api.util.GT_Utility.moveMultipleItemStacks; + import gregtech.api.enums.GT_Values; import gregtech.api.gui.GT_GUICover; import gregtech.api.gui.widgets.GT_GuiIcon; @@ -14,8 +16,6 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.fluids.Fluid; -import static gregtech.api.util.GT_Utility.moveMultipleItemStacks; - public class GT_Cover_Conveyor extends GT_CoverBehavior { public final int mTickRate; private final int mMaxStacks; @@ -31,12 +31,14 @@ public class GT_Cover_Conveyor extends GT_CoverBehavior { } @Override - public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public boolean isRedstoneSensitive( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { return false; } @Override - public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public int doCoverThings( + byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { if ((aCoverVariable % 6 > 1) && ((aTileEntity instanceof IMachineProgress))) { if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable % 6 < 4) { return aCoverVariable; @@ -44,44 +46,77 @@ public class GT_Cover_Conveyor extends GT_CoverBehavior { } TileEntity tTileEntity = aTileEntity.getTileEntityAtSide(aSide); Object fromEntity = aCoverVariable % 2 == 0 ? aTileEntity : tTileEntity, - toEntity = aCoverVariable % 2 != 0 ? aTileEntity : tTileEntity; + toEntity = aCoverVariable % 2 != 0 ? aTileEntity : tTileEntity; byte fromSide = aCoverVariable % 2 != 0 ? GT_Utility.getOppositeSide(aSide) : aSide, - toSide = aCoverVariable % 2 == 0 ? GT_Utility.getOppositeSide(aSide) : aSide; - - moveMultipleItemStacks(fromEntity, toEntity, fromSide , toSide, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1,this.mMaxStacks); + toSide = aCoverVariable % 2 == 0 ? GT_Utility.getOppositeSide(aSide) : aSide; + + moveMultipleItemStacks( + fromEntity, + toEntity, + fromSide, + toSide, + null, + false, + (byte) 64, + (byte) 1, + (byte) 64, + (byte) 1, + this.mMaxStacks); return aCoverVariable; } @Override - public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { - aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 12; - if(aCoverVariable <0){aCoverVariable = 11;} - switch(aCoverVariable) { + public int onCoverScrewdriverclick( + byte aSide, + int aCoverID, + int aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { + aCoverVariable = (aCoverVariable + (aPlayer.isSneaking() ? -1 : 1)) % 12; + if (aCoverVariable < 0) { + aCoverVariable = 11; + } + switch (aCoverVariable) { case 0: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("006", "Export")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("006", "Export")); + break; case 1: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("007", "Import")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("007", "Import")); + break; case 2: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("008", "Export (conditional)")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("008", "Export (conditional)")); + break; case 3: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("009", "Import (conditional)")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("009", "Import (conditional)")); + break; case 4: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("010", "Export (invert cond)")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("010", "Export (invert cond)")); + break; case 5: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("011", "Import (invert cond)")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("011", "Import (invert cond)")); + break; case 6: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("012", "Export allow Input")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("012", "Export allow Input")); + break; case 7: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("013", "Import allow Output")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("013", "Import allow Output")); + break; case 8: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("014", "Export allow Input (conditional)")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("014", "Export allow Input (conditional)")); + break; case 9: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("015", "Import allow Output (conditional)")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("015", "Import allow Output (conditional)")); + break; case 10: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("016", "Export allow Input (invert cond)")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("016", "Export allow Input (invert cond)")); + break; case 11: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("017", "Import allow Output (invert cond)")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("017", "Import allow Output (invert cond)")); + break; } return aCoverVariable; } @@ -139,14 +174,13 @@ public class GT_Cover_Conveyor extends GT_CoverBehavior { /** * GUI Stuff */ - @Override public boolean hasCoverGUI() { return true; } @Override - public Object getClientGUI(byte aSide, int aCoverID, int coverData, ICoverable aTileEntity) { + public Object getClientGUI(byte aSide, int aCoverID, int coverData, ICoverable aTileEntity) { return new GT_Cover_Conveyor.GUI(aSide, aCoverID, coverData, aTileEntity); } @@ -169,21 +203,31 @@ public class GT_Cover_Conveyor extends GT_CoverBehavior { this.coverVariable = aCoverVariable; GT_GuiIconButton b; - b = new GT_GuiIconButton(this, 0, startX + spaceX*0, startY+spaceY*0, GT_GuiIcon.EXPORT).setTooltipText(GT_Utility.trans("006", "Export")); - b = new GT_GuiIconButton(this, 1, startX + spaceX*1, startY+spaceY*0, GT_GuiIcon.IMPORT).setTooltipText(GT_Utility.trans("007", "Import")); - b = new GT_GuiIconButton(this, 2, startX + spaceX*0, startY+spaceY*1, GT_GuiIcon.CHECKMARK).setTooltipText(GT_Utility.trans("224", "Always On")); - b = new GT_GuiIconButton(this, 3, startX + spaceX*1, startY+spaceY*1, GT_GuiIcon.REDSTONE_ON).setTooltipText(GT_Utility.trans("225", "Active with Redstone Signal")); - b = new GT_GuiIconButton(this, 4, startX + spaceX*2, startY+spaceY*1, GT_GuiIcon.REDSTONE_OFF).setTooltipText(GT_Utility.trans("226", "Inactive with Redstone Signal")); - b = new GT_GuiIconButton(this, 5, startX + spaceX*0, startY+spaceY*2, GT_GuiIcon.ALLOW_INPUT).setTooltipText(GT_Utility.trans("227", "Allow Input")); - b = new GT_GuiIconButton(this, 6, startX + spaceX*1, startY+spaceY*2, GT_GuiIcon.BLOCK_INPUT).setTooltipText(GT_Utility.trans("228", "Block Input")); + b = new GT_GuiIconButton(this, 0, startX + spaceX * 0, startY + spaceY * 0, GT_GuiIcon.EXPORT) + .setTooltipText(GT_Utility.trans("006", "Export")); + b = new GT_GuiIconButton(this, 1, startX + spaceX * 1, startY + spaceY * 0, GT_GuiIcon.IMPORT) + .setTooltipText(GT_Utility.trans("007", "Import")); + b = new GT_GuiIconButton(this, 2, startX + spaceX * 0, startY + spaceY * 1, GT_GuiIcon.CHECKMARK) + .setTooltipText(GT_Utility.trans("224", "Always On")); + b = new GT_GuiIconButton(this, 3, startX + spaceX * 1, startY + spaceY * 1, GT_GuiIcon.REDSTONE_ON) + .setTooltipText(GT_Utility.trans("225", "Active with Redstone Signal")); + b = new GT_GuiIconButton(this, 4, startX + spaceX * 2, startY + spaceY * 1, GT_GuiIcon.REDSTONE_OFF) + .setTooltipText(GT_Utility.trans("226", "Inactive with Redstone Signal")); + b = new GT_GuiIconButton(this, 5, startX + spaceX * 0, startY + spaceY * 2, GT_GuiIcon.ALLOW_INPUT) + .setTooltipText(GT_Utility.trans("227", "Allow Input")); + b = new GT_GuiIconButton(this, 6, startX + spaceX * 1, startY + spaceY * 2, GT_GuiIcon.BLOCK_INPUT) + .setTooltipText(GT_Utility.trans("228", "Block Input")); } @Override public void drawExtras(int mouseX, int mouseY, float parTicks) { super.drawExtras(mouseX, mouseY, parTicks); - this.fontRendererObj.drawString(GT_Utility.trans("229", "Import/Export"), startX + spaceX*3, 3+startY+spaceY*0, textColor); - this.fontRendererObj.drawString(GT_Utility.trans("230", "Conditional"), startX + spaceX*3, 3+startY+spaceY*1, textColor); - this.fontRendererObj.drawString(GT_Utility.trans("231", "Enable Input"), startX + spaceX*3, 3+startY+spaceY*2, textColor); + this.fontRendererObj.drawString( + GT_Utility.trans("229", "Import/Export"), startX + spaceX * 3, 3 + startY + spaceY * 0, textColor); + this.fontRendererObj.drawString( + GT_Utility.trans("230", "Conditional"), startX + spaceX * 3, 3 + startY + spaceY * 1, textColor); + this.fontRendererObj.drawString( + GT_Utility.trans("231", "Enable Input"), startX + spaceX * 3, 3 + startY + spaceY * 2, textColor); } @Override @@ -192,15 +236,15 @@ public class GT_Cover_Conveyor extends GT_CoverBehavior { } @Override - public void buttonClicked(GuiButton btn){ - if (getClickable(btn.id)){ + public void buttonClicked(GuiButton btn) { + if (getClickable(btn.id)) { coverVariable = getNewCoverVariable(btn.id); GT_Values.NW.sendToServer(new GT_Packet_TileEntityCover(side, coverID, coverVariable, tile)); } updateButtons(); } - private void updateButtons(){ + private void updateButtons() { GuiButton b; for (Object o : buttonList) { b = (GuiButton) o; @@ -215,34 +259,29 @@ public class GT_Cover_Conveyor extends GT_CoverBehavior { case 1: return coverVariable | 0x1; case 2: - if (coverVariable > 5) - return 0x6 | (coverVariable & ~0xE); + if (coverVariable > 5) return 0x6 | (coverVariable & ~0xE); return (coverVariable & ~0xE); case 3: - if (coverVariable > 5) - return 0x8 | (coverVariable & ~0xE); + if (coverVariable > 5) return 0x8 | (coverVariable & ~0xE); return 0x2 | (coverVariable & ~0xE); case 4: - if (coverVariable > 5) - return 0xA | (coverVariable & ~0xE); + if (coverVariable > 5) return 0xA | (coverVariable & ~0xE); return (0x4 | (coverVariable & ~0xE)); case 5: - if (coverVariable <= 5) - return coverVariable + 6; + if (coverVariable <= 5) return coverVariable + 6; break; case 6: - if (coverVariable > 5) - return coverVariable - 6; + if (coverVariable > 5) return coverVariable - 6; } return coverVariable; } private boolean getClickable(int id) { - if (coverVariable < 0 | 11 < coverVariable) - return false; + if (coverVariable < 0 | 11 < coverVariable) return false; switch (id) { - case 0: case 1: + case 0: + case 1: return (0x1 & coverVariable) != id; case 2: return (coverVariable % 6) >= 2; diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Crafting.java b/src/main/java/gregtech/common/covers/GT_Cover_Crafting.java index bd3003f39f..61f7aefed9 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Crafting.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Crafting.java @@ -9,21 +9,38 @@ import net.minecraft.network.play.server.S2DPacketOpenWindow; public class GT_Cover_Crafting extends GT_CoverBehavior { @Override - public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public boolean isRedstoneSensitive( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { return false; } @Override - public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public boolean onCoverRightclick( + byte aSide, + int aCoverID, + int aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { if ((aPlayer instanceof EntityPlayerMP)) { ((EntityPlayerMP) aPlayer).getNextWindowId(); - ((EntityPlayerMP) aPlayer).playerNetServerHandler.sendPacket(new S2DPacketOpenWindow(((EntityPlayerMP) aPlayer).currentWindowId, 1, "Crafting", 9, true)); - ((EntityPlayerMP) aPlayer).openContainer = new ContainerWorkbench(((EntityPlayerMP) aPlayer).inventory, ((EntityPlayerMP) aPlayer).worldObj, aTileEntity.getXCoord(), aTileEntity.getYCoord(), aTileEntity.getZCoord()) { - @Override - public boolean canInteractWith(EntityPlayer player) { - return true; - } - }; + ((EntityPlayerMP) aPlayer) + .playerNetServerHandler.sendPacket(new S2DPacketOpenWindow( + ((EntityPlayerMP) aPlayer).currentWindowId, 1, "Crafting", 9, true)); + ((EntityPlayerMP) aPlayer).openContainer = + new ContainerWorkbench( + ((EntityPlayerMP) aPlayer).inventory, + ((EntityPlayerMP) aPlayer).worldObj, + aTileEntity.getXCoord(), + aTileEntity.getYCoord(), + aTileEntity.getZCoord()) { + @Override + public boolean canInteractWith(EntityPlayer player) { + return true; + } + }; ((EntityPlayerMP) aPlayer).openContainer.windowId = ((EntityPlayerMP) aPlayer).currentWindowId; ((EntityPlayerMP) aPlayer).openContainer.addCraftingToCrafters((EntityPlayerMP) aPlayer); } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java b/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java index 366b896d45..54ca59b373 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java @@ -16,22 +16,32 @@ import net.minecraftforge.fluids.Fluid; public class GT_Cover_DoesWork extends GT_CoverBehavior { @Override - public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public boolean isRedstoneSensitive( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { return false; } @Override - public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public int doCoverThings( + byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { if ((aTileEntity instanceof IMachineProgress)) { if (aCoverVariable < 2) { int tScale = ((IMachineProgress) aTileEntity).getMaxProgress() / 15; if ((tScale > 0) && (((IMachineProgress) aTileEntity).hasThingsToDo())) { - aTileEntity.setOutputRedstoneSignal(aSide, aCoverVariable % 2 == 0 ? (byte) (((IMachineProgress) aTileEntity).getProgress() / tScale) : (byte) (15 - ((IMachineProgress) aTileEntity).getProgress() / tScale)); + aTileEntity.setOutputRedstoneSignal( + aSide, + aCoverVariable % 2 == 0 + ? (byte) (((IMachineProgress) aTileEntity).getProgress() / tScale) + : (byte) (15 - ((IMachineProgress) aTileEntity).getProgress() / tScale)); } else { aTileEntity.setOutputRedstoneSignal(aSide, (byte) (aCoverVariable % 2 == 0 ? 0 : 15)); } } else { - aTileEntity.setOutputRedstoneSignal(aSide, (byte) ((aCoverVariable % 2 == 0 ? 1 : 0) != (((IMachineProgress) aTileEntity).getMaxProgress() == 0 ? 1 : 0) ? 0 : 15)); + aTileEntity.setOutputRedstoneSignal(aSide, (byte) + ((aCoverVariable % 2 == 0 ? 1 : 0) + != (((IMachineProgress) aTileEntity).getMaxProgress() == 0 ? 1 : 0) + ? 0 + : 15)); } } else { aTileEntity.setOutputRedstoneSignal(aSide, (byte) 0); @@ -40,18 +50,32 @@ public class GT_Cover_DoesWork extends GT_CoverBehavior { } @Override - public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { - aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 4; - if(aCoverVariable <0){aCoverVariable = 3;} - switch(aCoverVariable) { + public int onCoverScrewdriverclick( + byte aSide, + int aCoverID, + int aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { + aCoverVariable = (aCoverVariable + (aPlayer.isSneaking() ? -1 : 1)) % 4; + if (aCoverVariable < 0) { + aCoverVariable = 3; + } + switch (aCoverVariable) { case 0: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("018", "Normal")); break; // Progress scaled + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("018", "Normal")); + break; // Progress scaled case 1: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("019", "Inverted")); break; // ^ inverted + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("019", "Inverted")); + break; // ^ inverted case 2: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("020", "Ready to work")); break; // Not Running + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("020", "Ready to work")); + break; // Not Running case 3: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("021", "Not ready to work")); break; // Running + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("021", "Not ready to work")); + break; // Running } return aCoverVariable; } @@ -87,7 +111,8 @@ public class GT_Cover_DoesWork extends GT_CoverBehavior { } @Override - public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + public boolean manipulatesSidedRedstoneOutput( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } @@ -99,14 +124,13 @@ public class GT_Cover_DoesWork extends GT_CoverBehavior { /** * GUI Stuff */ - @Override public boolean hasCoverGUI() { return true; } @Override - public Object getClientGUI(byte aSide, int aCoverID, int coverData, ICoverable aTileEntity) { + public Object getClientGUI(byte aSide, int aCoverID, int coverData, ICoverable aTileEntity) { return new GT_Cover_DoesWork.GUI(aSide, aCoverID, coverData, aTileEntity); } @@ -129,25 +153,22 @@ public class GT_Cover_DoesWork extends GT_CoverBehavior { this.coverVariable = aCoverVariable; GuiButton b; - b = new GT_GuiIconButton(this, 0, startX + spaceX*0, startY+spaceY*0, GT_GuiIcon.PROGRESS); - b = new GT_GuiIconButton(this, 1, startX + spaceX*1, startY+spaceY*0, GT_GuiIcon.CHECKMARK); - b = new GT_GuiIconCheckButton(this, 2, startX + spaceX*0, startY+spaceY*1, GT_GuiIcon.REDSTONE_ON, GT_GuiIcon.REDSTONE_OFF); + b = new GT_GuiIconButton(this, 0, startX + spaceX * 0, startY + spaceY * 0, GT_GuiIcon.PROGRESS); + b = new GT_GuiIconButton(this, 1, startX + spaceX * 1, startY + spaceY * 0, GT_GuiIcon.CHECKMARK); + b = new GT_GuiIconCheckButton( + this, 2, startX + spaceX * 0, startY + spaceY * 1, GT_GuiIcon.REDSTONE_ON, GT_GuiIcon.REDSTONE_OFF); } @Override public void drawExtras(int mouseX, int mouseY, float parTicks) { super.drawExtras(mouseX, mouseY, parTicks); String s1, s2; - if ((coverVariable & 0x2) > 0) - s1 = GT_Utility.trans("242", "Machine idle"); - else - s1 = GT_Utility.trans("241", "Recipe progress"); - if ((coverVariable & 0x1) > 0) - s2 = GT_Utility.trans("INVERTED", "Inverted"); - else - s2 = GT_Utility.trans("NORMAL", "Normal"); - this.fontRendererObj.drawString(s1, startX + spaceX*3, 4+startY+spaceY*0, textColor); - this.fontRendererObj.drawString(s2, startX + spaceX*3, 4+startY+spaceY*1, textColor); + if ((coverVariable & 0x2) > 0) s1 = GT_Utility.trans("242", "Machine idle"); + else s1 = GT_Utility.trans("241", "Recipe progress"); + if ((coverVariable & 0x1) > 0) s2 = GT_Utility.trans("INVERTED", "Inverted"); + else s2 = GT_Utility.trans("NORMAL", "Normal"); + this.fontRendererObj.drawString(s1, startX + spaceX * 3, 4 + startY + spaceY * 0, textColor); + this.fontRendererObj.drawString(s2, startX + spaceX * 3, 4 + startY + spaceY * 1, textColor); } @Override @@ -156,11 +177,10 @@ public class GT_Cover_DoesWork extends GT_CoverBehavior { } @Override - public void buttonClicked(GuiButton btn){ - if (getClickable(btn.id)){ + public void buttonClicked(GuiButton btn) { + if (getClickable(btn.id)) { boolean state = false; - if (btn.id == 2) - state = ((GT_GuiIconCheckButton) btn).isChecked(); + if (btn.id == 2) state = ((GT_GuiIconCheckButton) btn).isChecked(); coverVariable = getNewCoverVariable(btn.id, state); GT_Values.NW.sendToServer(new GT_Packet_TileEntityCover(side, coverID, coverVariable, tile)); @@ -168,11 +188,11 @@ public class GT_Cover_DoesWork extends GT_CoverBehavior { updateButtons(); } - private void updateButtons(){ + private void updateButtons() { GuiButton b; for (Object o : buttonList) { b = (GuiButton) o; - if(b.id == 2){ + if (b.id == 2) { ((GT_GuiIconCheckButton) b).setChecked((coverVariable & 0x1) > 0); } else { b.enabled = getClickable(b.id); @@ -187,8 +207,7 @@ public class GT_Cover_DoesWork extends GT_CoverBehavior { case 1: return coverVariable | 0x2; case 2: - if (buttonState) - return coverVariable & ~0x1; + if (buttonState) return coverVariable & ~0x1; return coverVariable | 0x1; } return coverVariable; diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Drain.java b/src/main/java/gregtech/common/covers/GT_Cover_Drain.java index bb89dcde7d..c2a831cd6e 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Drain.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Drain.java @@ -16,11 +16,14 @@ import net.minecraftforge.fluids.IFluidHandler; public class GT_Cover_Drain extends GT_CoverBehavior { @Override - public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public boolean isRedstoneSensitive( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { return false; } + @Override - public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public int doCoverThings( + byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { if ((aCoverVariable % 3 > 1) && ((aTileEntity instanceof IMachineProgress))) { if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable % 3 < 2) { return aCoverVariable; @@ -29,55 +32,112 @@ public class GT_Cover_Drain extends GT_CoverBehavior { if (aSide != 6) { Block tBlock = aTileEntity.getBlockAtSide(aSide); if ((aCoverVariable < 3) && ((aTileEntity instanceof IFluidHandler))) { - if ((aSide == 1) && - (aTileEntity.getWorld().isRaining()) && - (aTileEntity.getWorld().getPrecipitationHeight(aTileEntity.getXCoord(), aTileEntity.getZCoord()) - 2 < aTileEntity.getYCoord())) { + if ((aSide == 1) + && (aTileEntity.getWorld().isRaining()) + && (aTileEntity + .getWorld() + .getPrecipitationHeight( + aTileEntity.getXCoord(), aTileEntity.getZCoord()) + - 2 + < aTileEntity.getYCoord())) { int tAmount = (int) (aTileEntity.getBiome().rainfall * 10.0F); if (tAmount > 0) { - ((IFluidHandler) aTileEntity).fill(ForgeDirection.getOrientation(aSide), Materials.Water.getFluid(aTileEntity.getWorld().isThundering() ? tAmount * 2 : tAmount), true); + ((IFluidHandler) aTileEntity) + .fill( + ForgeDirection.getOrientation(aSide), + Materials.Water.getFluid( + aTileEntity.getWorld().isThundering() ? tAmount * 2 : tAmount), + true); } } FluidStack tLiquid = null; if (tBlock != null) { - if (((tBlock == Blocks.water) || (tBlock == Blocks.flowing_water)) && (aTileEntity.getMetaIDAtSide(aSide) == 0)) { + if (((tBlock == Blocks.water) || (tBlock == Blocks.flowing_water)) + && (aTileEntity.getMetaIDAtSide(aSide) == 0)) { tLiquid = Materials.Water.getFluid(1000L); - } else if (((tBlock == Blocks.lava) || (tBlock == Blocks.flowing_lava)) && (aTileEntity.getMetaIDAtSide(aSide) == 0)) { + } else if (((tBlock == Blocks.lava) || (tBlock == Blocks.flowing_lava)) + && (aTileEntity.getMetaIDAtSide(aSide) == 0)) { tLiquid = Materials.Lava.getFluid(1000L); } else if ((tBlock instanceof IFluidBlock)) { - tLiquid = ((IFluidBlock) tBlock).drain(aTileEntity.getWorld(), aTileEntity.getOffsetX(aSide, 1), aTileEntity.getOffsetY(aSide, 1), aTileEntity.getOffsetZ(aSide, 1), false); + tLiquid = ((IFluidBlock) tBlock) + .drain( + aTileEntity.getWorld(), + aTileEntity.getOffsetX(aSide, 1), + aTileEntity.getOffsetY(aSide, 1), + aTileEntity.getOffsetZ(aSide, 1), + false); } - if ((tLiquid != null) && (tLiquid.getFluid() != null) && ((aSide > 1) || ((aSide == 0) && (tLiquid.getFluid().getDensity() <= 0)) || ((aSide == 1) && (tLiquid.getFluid().getDensity() >= 0))) && - (((IFluidHandler) aTileEntity).fill(ForgeDirection.getOrientation(aSide), tLiquid, false) == tLiquid.amount)) { + if ((tLiquid != null) + && (tLiquid.getFluid() != null) + && ((aSide > 1) + || ((aSide == 0) && (tLiquid.getFluid().getDensity() <= 0)) + || ((aSide == 1) && (tLiquid.getFluid().getDensity() >= 0))) + && (((IFluidHandler) aTileEntity).fill(ForgeDirection.getOrientation(aSide), tLiquid, false) + == tLiquid.amount)) { ((IFluidHandler) aTileEntity).fill(ForgeDirection.getOrientation(aSide), tLiquid, true); - aTileEntity.getWorld().setBlockToAir(aTileEntity.getXCoord() + ForgeDirection.getOrientation(aSide).offsetX, aTileEntity.getYCoord() + ForgeDirection.getOrientation(aSide).offsetY, aTileEntity.getZCoord() + ForgeDirection.getOrientation(aSide).offsetZ); + aTileEntity + .getWorld() + .setBlockToAir( + aTileEntity.getXCoord() + ForgeDirection.getOrientation(aSide).offsetX, + aTileEntity.getYCoord() + ForgeDirection.getOrientation(aSide).offsetY, + aTileEntity.getZCoord() + ForgeDirection.getOrientation(aSide).offsetZ); } } } - if ((aCoverVariable >= 3) && (tBlock != null) && ( - (tBlock == Blocks.lava) || (tBlock == Blocks.flowing_lava) || (tBlock == Blocks.water) || (tBlock == Blocks.flowing_water) || ((tBlock instanceof IFluidBlock)))) { - aTileEntity.getWorld().setBlock(aTileEntity.getOffsetX(aSide, 1), aTileEntity.getOffsetY(aSide, 1), aTileEntity.getOffsetZ(aSide, 1), Blocks.air, 0, 0); + if ((aCoverVariable >= 3) + && (tBlock != null) + && ((tBlock == Blocks.lava) + || (tBlock == Blocks.flowing_lava) + || (tBlock == Blocks.water) + || (tBlock == Blocks.flowing_water) + || ((tBlock instanceof IFluidBlock)))) { + aTileEntity + .getWorld() + .setBlock( + aTileEntity.getOffsetX(aSide, 1), + aTileEntity.getOffsetY(aSide, 1), + aTileEntity.getOffsetZ(aSide, 1), + Blocks.air, + 0, + 0); } } return aCoverVariable; } @Override - public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { - aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 6; - if(aCoverVariable <0){aCoverVariable = 5;} - switch(aCoverVariable) { + public int onCoverScrewdriverclick( + byte aSide, + int aCoverID, + int aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { + aCoverVariable = (aCoverVariable + (aPlayer.isSneaking() ? -1 : 1)) % 6; + if (aCoverVariable < 0) { + aCoverVariable = 5; + } + switch (aCoverVariable) { case 0: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("022", "Import")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("022", "Import")); + break; case 1: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("023", "Import (conditional)")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("023", "Import (conditional)")); + break; case 2: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("024", "Import (invert cond)")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("024", "Import (invert cond)")); + break; case 3: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("025", "Keep Liquids Away")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("025", "Keep Liquids Away")); + break; case 4: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("026", "Keep Liquids Away (conditional)")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("026", "Keep Liquids Away (conditional)")); + break; case 5: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("027", "Keep Liquids Away (invert cond)")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("027", "Keep Liquids Away (invert cond)")); + break; } return aCoverVariable; } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java b/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java index 1f59049828..81b8fa8283 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java @@ -16,6 +16,9 @@ import gregtech.api.util.GT_CoverBehaviorBase; import gregtech.api.util.GT_Utility; import gregtech.api.util.ISerializableObject; import io.netty.buffer.ByteBuf; +import java.util.function.Function; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import net.minecraft.client.gui.GuiButton; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -24,10 +27,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import net.minecraftforge.fluids.Fluid; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import java.util.function.Function; - public class GT_Cover_EUMeter extends GT_CoverBehaviorBase<GT_Cover_EUMeter.EUMeterData> { public GT_Cover_EUMeter() { super(EUMeterData.class); @@ -44,7 +43,13 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase<GT_Cover_EUMeter.EUMe } @Override - protected EUMeterData doCoverThingsImpl(byte aSide, byte aInputRedstone, int aCoverID, EUMeterData aCoverVariable, ICoverable aTileEntity, long aTimer) { + protected EUMeterData doCoverThingsImpl( + byte aSide, + byte aInputRedstone, + int aCoverID, + EUMeterData aCoverVariable, + ICoverable aTileEntity, + long aTimer) { final long stored = aCoverVariable.type.getTileEntityStoredEnergy(aTileEntity); final long capacity = aCoverVariable.type.getTileEntityEnergyCapacity(aTileEntity); @@ -78,8 +83,17 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase<GT_Cover_EUMeter.EUMe } @Override - protected EUMeterData onCoverScrewdriverClickImpl(byte aSide, int aCoverID, EUMeterData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { - int num = (aCoverVariable.getNum() + (aPlayer.isSneaking() ? -1 : 1) + EnergyType.values().length * 2) % (EnergyType.values().length * 2); + protected EUMeterData onCoverScrewdriverClickImpl( + byte aSide, + int aCoverID, + EUMeterData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { + int num = (aCoverVariable.getNum() + (aPlayer.isSneaking() ? -1 : 1) + EnergyType.values().length * 2) + % (EnergyType.values().length * 2); switch (num) { case 0: GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("031", "Normal Universal Storage")); @@ -112,19 +126,22 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase<GT_Cover_EUMeter.EUMe GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("040", "Inverted Average Electric Output")); break; case 10: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("041", "Normal Electricity Storage(Including Batteries)")); + GT_Utility.sendChatToPlayer( + aPlayer, GT_Utility.trans("041", "Normal Electricity Storage(Including Batteries)")); break; case 11: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("042", "Inverted Electricity Storage(Including Batteries)")); + GT_Utility.sendChatToPlayer( + aPlayer, GT_Utility.trans("042", "Inverted Electricity Storage(Including Batteries)")); break; } aCoverVariable.setNum(num); return aCoverVariable; } - //region Static Result Methods + // region Static Result Methods @Override - protected boolean isRedstoneSensitiveImpl(byte aSide, int aCoverID, EUMeterData aCoverVariable, ICoverable aTileEntity, long aTimer) { + protected boolean isRedstoneSensitiveImpl( + byte aSide, int aCoverID, EUMeterData aCoverVariable, ICoverable aTileEntity, long aTimer) { return false; } @@ -139,27 +156,32 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase<GT_Cover_EUMeter.EUMe } @Override - protected boolean letsFluidInImpl(byte aSide, int aCoverID, EUMeterData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + protected boolean letsFluidInImpl( + byte aSide, int aCoverID, EUMeterData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } @Override - protected boolean letsFluidOutImpl(byte aSide, int aCoverID, EUMeterData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + protected boolean letsFluidOutImpl( + byte aSide, int aCoverID, EUMeterData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } @Override - protected boolean letsItemsInImpl(byte aSide, int aCoverID, EUMeterData aCoverVariable, int aSlot, ICoverable aTileEntity) { + protected boolean letsItemsInImpl( + byte aSide, int aCoverID, EUMeterData aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } @Override - protected boolean letsItemsOutImpl(byte aSide, int aCoverID, EUMeterData aCoverVariable, int aSlot, ICoverable aTileEntity) { + protected boolean letsItemsOutImpl( + byte aSide, int aCoverID, EUMeterData aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } @Override - protected boolean manipulatesSidedRedstoneOutputImpl(byte aSide, int aCoverID, EUMeterData aCoverVariable, ICoverable aTileEntity) { + protected boolean manipulatesSidedRedstoneOutputImpl( + byte aSide, int aCoverID, EUMeterData aCoverVariable, ICoverable aTileEntity) { return true; } @@ -167,19 +189,25 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase<GT_Cover_EUMeter.EUMe protected int getTickRateImpl(byte aSide, int aCoverID, EUMeterData aCoverVariable, ICoverable aTileEntity) { return 20; } - //endregion + // endregion - //region GUI Stuff + // region GUI Stuff @Override public boolean hasCoverGUI() { return true; } @Override - public Object getClientGUIImpl(byte aSide, int aCoverID, EUMeterData coverData, ICoverable aTileEntity, EntityPlayer aPlayer, World aWorld) { + public Object getClientGUIImpl( + byte aSide, + int aCoverID, + EUMeterData coverData, + ICoverable aTileEntity, + EntityPlayer aPlayer, + World aWorld) { return new GUI(aSide, aCoverID, coverData, aTileEntity); } - //endregion + // endregion public static class EUMeterData implements ISerializableObject { private EnergyType type; @@ -189,7 +217,6 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase<GT_Cover_EUMeter.EUMe */ private long threshold; - public EUMeterData() { type = EnergyType.UNIVERSAL_STORAGE; inverted = false; @@ -262,66 +289,64 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase<GT_Cover_EUMeter.EUMe private enum EnergyType { UNIVERSAL_STORAGE( - GT_Utility.trans("301", "Universal"), - GT_Utility.trans("256", "Universal Storage"), - ICoverable::getUniversalEnergyStored, - ICoverable::getUniversalEnergyCapacity - ), + GT_Utility.trans("301", "Universal"), + GT_Utility.trans("256", "Universal Storage"), + ICoverable::getUniversalEnergyStored, + ICoverable::getUniversalEnergyCapacity), ELECTRICITY_STORAGE( - GT_Utility.trans("302", "Int. EU"), - GT_Utility.trans("257", "Electricity Storage"), - ICoverable::getStoredEU, - ICoverable::getEUCapacity - ), + GT_Utility.trans("302", "Int. EU"), + GT_Utility.trans("257", "Electricity Storage"), + ICoverable::getStoredEU, + ICoverable::getEUCapacity), STEAM_STORAGE( - GT_Utility.trans("303", "Steam"), - GT_Utility.trans("258", "Steam Storage"), - ICoverable::getStoredSteam, - ICoverable::getSteamCapacity - ), + GT_Utility.trans("303", "Steam"), + GT_Utility.trans("258", "Steam Storage"), + ICoverable::getStoredSteam, + ICoverable::getSteamCapacity), AVERAGE_ELECTRIC_INPUT( - GT_Utility.trans("304", "Avg. Input"), - GT_Utility.trans("259", "Average Electric Input"), - ICoverable::getAverageElectricInput, - (te) -> te.getInputVoltage() * te.getInputAmperage() - ), + GT_Utility.trans("304", "Avg. Input"), + GT_Utility.trans("259", "Average Electric Input"), + ICoverable::getAverageElectricInput, + (te) -> te.getInputVoltage() * te.getInputAmperage()), AVERAGE_ELECTRIC_OUTPUT( - GT_Utility.trans("305", "Avg. Output"), - GT_Utility.trans("260", "Average Electric Output"), - ICoverable::getAverageElectricOutput, - (te) -> te.getOutputVoltage() * te.getOutputAmperage() - ), + GT_Utility.trans("305", "Avg. Output"), + GT_Utility.trans("260", "Average Electric Output"), + ICoverable::getAverageElectricOutput, + (te) -> te.getOutputVoltage() * te.getOutputAmperage()), ELECTRICITY_STORAGE_INCLUDING_BATTERIES( - GT_Utility.trans("306", "EU stored"), - GT_Utility.trans("261", "Electricity Storage(Including Batteries)"), - (te) -> { - if (te instanceof IGregTechTileEntity) { - IMetaTileEntity mte = ((IGregTechTileEntity) te).getMetaTileEntity(); - if (mte instanceof GT_MetaTileEntity_BasicBatteryBuffer) { - GT_MetaTileEntity_BasicBatteryBuffer buffer = (GT_MetaTileEntity_BasicBatteryBuffer) mte; - return buffer.getStoredEnergy()[0]; + GT_Utility.trans("306", "EU stored"), + GT_Utility.trans("261", "Electricity Storage(Including Batteries)"), + (te) -> { + if (te instanceof IGregTechTileEntity) { + IMetaTileEntity mte = ((IGregTechTileEntity) te).getMetaTileEntity(); + if (mte instanceof GT_MetaTileEntity_BasicBatteryBuffer) { + GT_MetaTileEntity_BasicBatteryBuffer buffer = (GT_MetaTileEntity_BasicBatteryBuffer) mte; + return buffer.getStoredEnergy()[0]; + } } - } - return te.getStoredEU(); - }, - (te) -> { - if (te instanceof IGregTechTileEntity) { - IMetaTileEntity mte = ((IGregTechTileEntity) te).getMetaTileEntity(); - if (mte instanceof GT_MetaTileEntity_BasicBatteryBuffer) { - GT_MetaTileEntity_BasicBatteryBuffer buffer = (GT_MetaTileEntity_BasicBatteryBuffer) mte; - return buffer.getStoredEnergy()[1]; + return te.getStoredEU(); + }, + (te) -> { + if (te instanceof IGregTechTileEntity) { + IMetaTileEntity mte = ((IGregTechTileEntity) te).getMetaTileEntity(); + if (mte instanceof GT_MetaTileEntity_BasicBatteryBuffer) { + GT_MetaTileEntity_BasicBatteryBuffer buffer = (GT_MetaTileEntity_BasicBatteryBuffer) mte; + return buffer.getStoredEnergy()[1]; + } } - } - return te.getEUCapacity(); - } - ); + return te.getEUCapacity(); + }); private final String title; private final String tooltip; private final Function<ICoverable, Long> getTileEntityStoredEnergyFunc; private final Function<ICoverable, Long> getTileEntityEnergyCapacityFunc; - EnergyType(String title, String tooltip, Function<ICoverable, Long> getTileEntityStoredEnergyFunc, Function<ICoverable, Long> getTileEntityEnergyCapacityFunc) { + EnergyType( + String title, + String tooltip, + Function<ICoverable, Long> getTileEntityStoredEnergyFunc, + Function<ICoverable, Long> getTileEntityEnergyCapacityFunc) { this.title = title; this.tooltip = tooltip; this.getTileEntityStoredEnergyFunc = getTileEntityStoredEnergyFunc; @@ -381,7 +406,15 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase<GT_Cover_EUMeter.EUMe this.coverVariable = aCoverVariable; typeButton = new GT_GuiIconButton(this, 0, startX, startY, GT_GuiIcon.CYCLIC); - invertedButton = new GT_GuiIconCheckButton(this, 2, startX, startY + spaceY, GT_GuiIcon.REDSTONE_ON, GT_GuiIcon.REDSTONE_OFF, INVERTED, NORMAL); + invertedButton = new GT_GuiIconCheckButton( + this, + 2, + startX, + startY + spaceY, + GT_GuiIcon.REDSTONE_ON, + GT_GuiIcon.REDSTONE_OFF, + INVERTED, + NORMAL); thresholdSlot = new GT_GuiIntegerTextBox(this, 4, startX, startY + spaceY * 2 + 2, spaceX * 8, 12); } @@ -389,11 +422,17 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase<GT_Cover_EUMeter.EUMe public void drawExtras(int mouseX, int mouseY, float parTicks) { super.drawExtras(mouseX, mouseY, parTicks); this.getFontRenderer().drawString(coverVariable.type.getTitle(), startX + spaceX, 4 + startY, textColor); - this.getFontRenderer().drawString(coverVariable.inverted ? INVERTED : NORMAL, startX + spaceX, 4 + startY + spaceY, textColor); - this.getFontRenderer().drawString(GT_Utility.trans("222.1", "Energy threshold"), startX, startY + spaceY * 3 + 4, textColor); + this.getFontRenderer() + .drawString( + coverVariable.inverted ? INVERTED : NORMAL, + startX + spaceX, + 4 + startY + spaceY, + textColor); + this.getFontRenderer() + .drawString( + GT_Utility.trans("222.1", "Energy threshold"), startX, startY + spaceY * 3 + 4, textColor); } - @Override protected void onInitGui(int guiLeft, int guiTop, int gui_width, int gui_height) { update(); @@ -458,7 +497,6 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase<GT_Cover_EUMeter.EUMe resetTextBox(thresholdSlot); } - private long parseTextBox(GT_GuiIntegerTextBox box) { if (box == thresholdSlot) { String text = box.getText(); diff --git a/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java b/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java index 27475f358e..53951ea771 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java @@ -9,20 +9,32 @@ import net.minecraftforge.fluids.Fluid; public class GT_Cover_EnergyOnly extends GT_CoverBehavior { @Override - public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public boolean isRedstoneSensitive( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { return false; } @Override - public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public int onCoverScrewdriverclick( + byte aSide, + int aCoverID, + int aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { aCoverVariable = (aCoverVariable + 1) % 3; - switch(aCoverVariable) { + switch (aCoverVariable) { case 0: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("028", "Allow")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("028", "Allow")); + break; case 1: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("029", "Allow (conditional)")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("029", "Allow (conditional)")); + break; case 2: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("030", "Disallow (conditional)")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("030", "Disallow (conditional)")); + break; } return aCoverVariable; } @@ -88,17 +100,27 @@ public class GT_Cover_EnergyOnly extends GT_CoverBehavior { } @Override - public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + public boolean manipulatesSidedRedstoneOutput( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return false; } @Override - public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public boolean onCoverRightclick( + byte aSide, + int aCoverID, + int aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { return false; } @Override - public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) { + public boolean onCoverRemoval( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) { return true; } } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_FacadeAE.java b/src/main/java/gregtech/common/covers/GT_Cover_FacadeAE.java index a227d3f530..5b9c66f637 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_FacadeAE.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_FacadeAE.java @@ -6,24 +6,24 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public class GT_Cover_FacadeAE extends GT_Cover_FacadeBase { - @Override - protected Block getTargetBlock(ItemStack aFacadeStack) { - if(aFacadeStack == null) return null; - final Item item = aFacadeStack.getItem(); - if (!(item instanceof IFacadeItem)) return null; - return ((IFacadeItem) item).getBlock(aFacadeStack); - } + @Override + protected Block getTargetBlock(ItemStack aFacadeStack) { + if (aFacadeStack == null) return null; + final Item item = aFacadeStack.getItem(); + if (!(item instanceof IFacadeItem)) return null; + return ((IFacadeItem) item).getBlock(aFacadeStack); + } - @Override - protected int getTargetMeta(ItemStack aFacadeStack) { - if(aFacadeStack == null) return 0; - final Item item = aFacadeStack.getItem(); - if (!(item instanceof IFacadeItem)) return 0; - return ((IFacadeItem) item).getMeta(aFacadeStack); - } + @Override + protected int getTargetMeta(ItemStack aFacadeStack) { + if (aFacadeStack == null) return 0; + final Item item = aFacadeStack.getItem(); + if (!(item instanceof IFacadeItem)) return 0; + return ((IFacadeItem) item).getMeta(aFacadeStack); + } - @Override - protected ItemStack getDisplayStackImpl(int aCoverID, FacadeData aCoverVariable) { - return aCoverVariable.mStack; - } + @Override + protected ItemStack getDisplayStackImpl(int aCoverID, FacadeData aCoverVariable) { + return aCoverVariable.mStack; + } } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java b/src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java index d35d0dbddd..addc154cfb 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java @@ -16,6 +16,7 @@ import gregtech.api.util.GT_RenderingWorld; import gregtech.api.util.GT_Utility; import gregtech.api.util.ISerializableObject; import io.netty.buffer.ByteBuf; +import javax.annotation.Nonnull; import net.minecraft.block.Block; import net.minecraft.client.gui.GuiButton; import net.minecraft.entity.player.EntityPlayer; @@ -27,8 +28,6 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; -import javax.annotation.Nonnull; - public abstract class GT_Cover_FacadeBase extends GT_CoverBehaviorBase<GT_Cover_FacadeBase.FacadeData> { /** * This is the Dummy, if there is a generic Cover without behavior @@ -53,19 +52,34 @@ public abstract class GT_Cover_FacadeBase extends GT_CoverBehaviorBase<GT_Cover_ } @Override - protected FacadeData onCoverScrewdriverClickImpl(byte aSide, int aCoverID, FacadeData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + protected FacadeData onCoverScrewdriverClickImpl( + byte aSide, + int aCoverID, + FacadeData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { aCoverVariable.mFlags = ((aCoverVariable.mFlags + 1) & 15); - GT_Utility.sendChatToPlayer(aPlayer, ((aCoverVariable.mFlags & 1) != 0 ? GT_Utility.trans("128", "Redstone ") : "") + ((aCoverVariable.mFlags & 2) != 0 ? GT_Utility.trans("129", "Energy ") : "") + ((aCoverVariable.mFlags & 4) != 0 ? GT_Utility.trans("130", "Fluids ") : "") + ((aCoverVariable.mFlags & 8) != 0 ? GT_Utility.trans("131", "Items ") : "")); + GT_Utility.sendChatToPlayer( + aPlayer, + ((aCoverVariable.mFlags & 1) != 0 ? GT_Utility.trans("128", "Redstone ") : "") + + ((aCoverVariable.mFlags & 2) != 0 ? GT_Utility.trans("129", "Energy ") : "") + + ((aCoverVariable.mFlags & 4) != 0 ? GT_Utility.trans("130", "Fluids ") : "") + + ((aCoverVariable.mFlags & 8) != 0 ? GT_Utility.trans("131", "Items ") : "")); return aCoverVariable; } @Override - protected boolean letsRedstoneGoInImpl(byte aSide, int aCoverID, FacadeData aCoverVariable, ICoverable aTileEntity) { + protected boolean letsRedstoneGoInImpl( + byte aSide, int aCoverID, FacadeData aCoverVariable, ICoverable aTileEntity) { return (aCoverVariable.mFlags & 1) != 0; } @Override - protected boolean letsRedstoneGoOutImpl(byte aSide, int aCoverID, FacadeData aCoverVariable, ICoverable aTileEntity) { + protected boolean letsRedstoneGoOutImpl( + byte aSide, int aCoverID, FacadeData aCoverVariable, ICoverable aTileEntity) { return (aCoverVariable.mFlags & 1) != 0; } @@ -80,30 +94,41 @@ public abstract class GT_Cover_FacadeBase extends GT_CoverBehaviorBase<GT_Cover_ } @Override - protected boolean letsFluidInImpl(byte aSide, int aCoverID, FacadeData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + protected boolean letsFluidInImpl( + byte aSide, int aCoverID, FacadeData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return (aCoverVariable.mFlags & 4) != 0; } @Override - protected boolean letsFluidOutImpl(byte aSide, int aCoverID, FacadeData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + protected boolean letsFluidOutImpl( + byte aSide, int aCoverID, FacadeData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return (aCoverVariable.mFlags & 4) != 0; } @Override - protected boolean letsItemsInImpl(byte aSide, int aCoverID, FacadeData aCoverVariable, int aSlot, ICoverable aTileEntity) { + protected boolean letsItemsInImpl( + byte aSide, int aCoverID, FacadeData aCoverVariable, int aSlot, ICoverable aTileEntity) { return (aCoverVariable.mFlags & 8) != 0; } @Override - protected boolean letsItemsOutImpl(byte aSide, int aCoverID, FacadeData aCoverVariable, int aSlot, ICoverable aTileEntity) { + protected boolean letsItemsOutImpl( + byte aSide, int aCoverID, FacadeData aCoverVariable, int aSlot, ICoverable aTileEntity) { return (aCoverVariable.mFlags & 8) != 0; } @Override public void placeCover(byte aSide, ItemStack aCover, ICoverable aTileEntity) { - aTileEntity.setCoverIdAndDataAtSide(aSide, GT_Utility.stackToInt(aCover), new FacadeData(GT_Utility.copyAmount(1, aCover), 0)); + aTileEntity.setCoverIdAndDataAtSide( + aSide, GT_Utility.stackToInt(aCover), new FacadeData(GT_Utility.copyAmount(1, aCover), 0)); if (aTileEntity.isClientSide()) - GT_RenderingWorld.getInstance().register(aTileEntity.getXCoord(), aTileEntity.getYCoord(), aTileEntity.getZCoord(), getTargetBlock(aCover), getTargetMeta(aCover)); + GT_RenderingWorld.getInstance() + .register( + aTileEntity.getXCoord(), + aTileEntity.getYCoord(), + aTileEntity.getZCoord(), + getTargetBlock(aCover), + getTargetMeta(aCover)); } @Override @@ -112,14 +137,18 @@ public abstract class GT_Cover_FacadeBase extends GT_CoverBehaviorBase<GT_Cover_ } @Override - protected ITexture getSpecialCoverTextureImpl(byte aSide, int aCoverID, FacadeData aCoverVariable, ICoverable aTileEntity) { + protected ITexture getSpecialCoverTextureImpl( + byte aSide, int aCoverID, FacadeData aCoverVariable, ICoverable aTileEntity) { if (GT_Utility.isStackInvalid(aCoverVariable.mStack)) return Textures.BlockIcons.ERROR_RENDERING[0]; Block block = getTargetBlock(aCoverVariable.mStack); if (block == null) return Textures.BlockIcons.ERROR_RENDERING[0]; // TODO: change this when *someone* made the block render in both pass - if (block.getRenderBlockPass() != 0) - return Textures.BlockIcons.ERROR_RENDERING[0]; - return TextureFactory.builder().setFromBlock(block, getTargetMeta(aCoverVariable.mStack)).useWorldCoord().setFromSide(ForgeDirection.getOrientation(aSide)).build(); + if (block.getRenderBlockPass() != 0) return Textures.BlockIcons.ERROR_RENDERING[0]; + return TextureFactory.builder() + .setFromBlock(block, getTargetMeta(aCoverVariable.mStack)) + .useWorldCoord() + .setFromSide(ForgeDirection.getOrientation(aSide)) + .build(); } @Override @@ -139,14 +168,21 @@ public abstract class GT_Cover_FacadeBase extends GT_CoverBehaviorBase<GT_Cover_ protected abstract int getTargetMeta(ItemStack aFacadeStack); @Override - protected boolean isDataNeededOnClientImpl(byte aSide, int aCoverID, FacadeData aCoverVariable, ICoverable aTileEntity) { + protected boolean isDataNeededOnClientImpl( + byte aSide, int aCoverID, FacadeData aCoverVariable, ICoverable aTileEntity) { return true; } @Override protected void onDataChangedImpl(byte aSide, int aCoverID, FacadeData aCoverVariable, ICoverable aTileEntity) { if (aTileEntity.isClientSide()) - GT_RenderingWorld.getInstance().register(aTileEntity.getXCoord(), aTileEntity.getYCoord(), aTileEntity.getZCoord(), getTargetBlock(aCoverVariable.mStack), getTargetMeta(aCoverVariable.mStack)); + GT_RenderingWorld.getInstance() + .register( + aTileEntity.getXCoord(), + aTileEntity.getYCoord(), + aTileEntity.getZCoord(), + getTargetBlock(aCoverVariable.mStack), + getTargetMeta(aCoverVariable.mStack)); } @Override @@ -159,12 +195,26 @@ public abstract class GT_Cover_FacadeBase extends GT_CoverBehaviorBase<GT_Cover_ } if (aCoverVariable.mStack != null) // mStack == null -> cover removed before data reach client - GT_RenderingWorld.getInstance().unregister(aTileEntity.getXCoord(), aTileEntity.getYCoord(), aTileEntity.getZCoord(), getTargetBlock(aCoverVariable.mStack), getTargetMeta(aCoverVariable.mStack)); + GT_RenderingWorld.getInstance() + .unregister( + aTileEntity.getXCoord(), + aTileEntity.getYCoord(), + aTileEntity.getZCoord(), + getTargetBlock(aCoverVariable.mStack), + getTargetMeta(aCoverVariable.mStack)); } } @Override - protected boolean onCoverRightClickImpl(byte aSide, int aCoverID, FacadeData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + protected boolean onCoverRightClickImpl( + byte aSide, + int aCoverID, + FacadeData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { // in case cover data didn't hit client somehow. maybe he had a ridiculous view distance aTileEntity.issueCoverUpdate(aSide); return super.onCoverRightClickImpl(aSide, aCoverID, aCoverVariable, aTileEntity, aPlayer, aX, aY, aZ); @@ -173,21 +223,26 @@ public abstract class GT_Cover_FacadeBase extends GT_CoverBehaviorBase<GT_Cover_ @Override public boolean isCoverPlaceable(byte aSide, ItemStack aStack, ICoverable aTileEntity) { // blocks that are not rendered in pass 0 are now accepted but rendered awkwardly - // to render it correctly require changing GT_Block_Machine to render in both pass, which is not really a good idea... + // to render it correctly require changing GT_Block_Machine to render in both pass, which is not really a good + // idea... if (!super.isCoverPlaceable(aSide, aStack, aTileEntity)) return false; Block targetBlock = getTargetBlock(aStack); if (targetBlock == null) return false; // we allow one single type of facade on the same block for now // otherwise it's not clear which block this block should impersonate - // this restriction can be lifted later by specifying a certain facade as dominate one as an extension to this class + // this restriction can be lifted later by specifying a certain facade as dominate one as an extension to this + // class for (byte i = 0; i < 6; i++) { if (i == aSide) continue; GT_CoverBehaviorBase<?> behavior = aTileEntity.getCoverBehaviorAtSideNew(i); if (behavior == null) continue; - Block facadeBlock = behavior.getFacadeBlock(i, aTileEntity.getCoverIDAtSide(i), aTileEntity.getComplexCoverDataAtSide(i), aTileEntity); + Block facadeBlock = behavior.getFacadeBlock( + i, aTileEntity.getCoverIDAtSide(i), aTileEntity.getComplexCoverDataAtSide(i), aTileEntity); if (facadeBlock == null) continue; if (facadeBlock != targetBlock) return false; - if (behavior.getFacadeMeta(i, aTileEntity.getCoverIDAtSide(i), aTileEntity.getComplexCoverDataAtSide(i), aTileEntity) != getTargetMeta(aStack)) return false; + if (behavior.getFacadeMeta( + i, aTileEntity.getCoverIDAtSide(i), aTileEntity.getComplexCoverDataAtSide(i), aTileEntity) + != getTargetMeta(aStack)) return false; } return true; } @@ -196,8 +251,7 @@ public abstract class GT_Cover_FacadeBase extends GT_CoverBehaviorBase<GT_Cover_ ItemStack mStack; int mFlags; - public FacadeData() { - } + public FacadeData() {} public FacadeData(ItemStack mStack, int mFlags) { this.mStack = mStack; @@ -214,7 +268,7 @@ public abstract class GT_Cover_FacadeBase extends GT_CoverBehaviorBase<GT_Cover_ @Override public NBTBase saveDataToNBT() { NBTTagCompound tag = new NBTTagCompound(); - if(mStack != null) tag.setTag("mStack", mStack.writeToNBT(new NBTTagCompound())); + if (mStack != null) tag.setTag("mStack", mStack.writeToNBT(new NBTTagCompound())); tag.setByte("mFlags", (byte) mFlags); return tag; } @@ -244,14 +298,19 @@ public abstract class GT_Cover_FacadeBase extends GT_CoverBehaviorBase<GT_Cover_ /** * GUI Stuff */ - @Override public boolean hasCoverGUI() { return true; } @Override - protected Object getClientGUIImpl(byte aSide, int aCoverID, FacadeData coverData, ICoverable aTileEntity, EntityPlayer aPlayer, World aWorld) { + protected Object getClientGUIImpl( + byte aSide, + int aCoverID, + FacadeData coverData, + ICoverable aTileEntity, + EntityPlayer aPlayer, + World aWorld) { return new GT_Cover_FacadeBase.GUI(aSide, aCoverID, coverData, aTileEntity); } @@ -273,19 +332,31 @@ public abstract class GT_Cover_FacadeBase extends GT_CoverBehaviorBase<GT_Cover_ this.coverID = aCoverID; this.coverVariable = aCoverVariable; - new GT_GuiIconCheckButton(this, 0, startX + spaceX * 0, startY + spaceY * 0, GT_GuiIcon.CHECKMARK, GT_GuiIcon.CROSS).setChecked((coverVariable.mFlags & 0x1) == 0); - new GT_GuiIconCheckButton(this, 1, startX + spaceX * 0, startY + spaceY * 1, GT_GuiIcon.CHECKMARK, GT_GuiIcon.CROSS).setChecked((coverVariable.mFlags & 0x2) == 0); - new GT_GuiIconCheckButton(this, 2, startX + spaceX * 0, startY + spaceY * 2, GT_GuiIcon.CHECKMARK, GT_GuiIcon.CROSS).setChecked((coverVariable.mFlags & 0x4) == 0); - new GT_GuiIconCheckButton(this, 3, startX + spaceX * 0, startY + spaceY * 3, GT_GuiIcon.CHECKMARK, GT_GuiIcon.CROSS).setChecked((coverVariable.mFlags & 0x8) == 0); + new GT_GuiIconCheckButton( + this, 0, startX + spaceX * 0, startY + spaceY * 0, GT_GuiIcon.CHECKMARK, GT_GuiIcon.CROSS) + .setChecked((coverVariable.mFlags & 0x1) == 0); + new GT_GuiIconCheckButton( + this, 1, startX + spaceX * 0, startY + spaceY * 1, GT_GuiIcon.CHECKMARK, GT_GuiIcon.CROSS) + .setChecked((coverVariable.mFlags & 0x2) == 0); + new GT_GuiIconCheckButton( + this, 2, startX + spaceX * 0, startY + spaceY * 2, GT_GuiIcon.CHECKMARK, GT_GuiIcon.CROSS) + .setChecked((coverVariable.mFlags & 0x4) == 0); + new GT_GuiIconCheckButton( + this, 3, startX + spaceX * 0, startY + spaceY * 3, GT_GuiIcon.CHECKMARK, GT_GuiIcon.CROSS) + .setChecked((coverVariable.mFlags & 0x8) == 0); } @Override public void drawExtras(int mouseX, int mouseY, float parTicks) { super.drawExtras(mouseX, mouseY, parTicks); - this.fontRendererObj.drawString(GT_Utility.trans("128", "Redstone"), 3 + startX + spaceX * 1, 4 + startY + spaceY * 0, textColor); - this.fontRendererObj.drawString(GT_Utility.trans("129", "Energy"), 3 + startX + spaceX * 1, 4 + startY + spaceY * 1, textColor); - this.fontRendererObj.drawString(GT_Utility.trans("130", "Fluids"), 3 + startX + spaceX * 1, 4 + startY + spaceY * 2, textColor); - this.fontRendererObj.drawString(GT_Utility.trans("131", "Items"), 3 + startX + spaceX * 1, 4 + startY + spaceY * 3, textColor); + this.fontRendererObj.drawString( + GT_Utility.trans("128", "Redstone"), 3 + startX + spaceX * 1, 4 + startY + spaceY * 0, textColor); + this.fontRendererObj.drawString( + GT_Utility.trans("129", "Energy"), 3 + startX + spaceX * 1, 4 + startY + spaceY * 1, textColor); + this.fontRendererObj.drawString( + GT_Utility.trans("130", "Fluids"), 3 + startX + spaceX * 1, 4 + startY + spaceY * 2, textColor); + this.fontRendererObj.drawString( + GT_Utility.trans("131", "Items"), 3 + startX + spaceX * 1, 4 + startY + spaceY * 3, textColor); } @Override diff --git a/src/main/java/gregtech/common/covers/GT_Cover_FluidLimiter.java b/src/main/java/gregtech/common/covers/GT_Cover_FluidLimiter.java index 4536cef710..a6c07e71f8 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_FluidLimiter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_FluidLimiter.java @@ -10,6 +10,8 @@ import gregtech.api.util.GT_CoverBehaviorBase; import gregtech.api.util.GT_Utility; import gregtech.api.util.ISerializableObject; import io.netty.buffer.ByteBuf; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.nbt.NBTBase; @@ -20,22 +22,26 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - /*** * @author TrainerSnow#5086 */ public class GT_Cover_FluidLimiter extends GT_CoverBehaviorBase<GT_Cover_FluidLimiter.FluidLimiterData> { - public GT_Cover_FluidLimiter() { super(FluidLimiterData.class); } @Override - protected FluidLimiterData onCoverScrewdriverClickImpl(byte aSide, int aCoverID, FluidLimiterData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if(aTileEntity instanceof IFluidHandler) { + protected FluidLimiterData onCoverScrewdriverClickImpl( + byte aSide, + int aCoverID, + FluidLimiterData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { + if (aTileEntity instanceof IFluidHandler) { adjustThreshold(aCoverVariable, !aPlayer.isSneaking()); GT_Utility.sendChatToPlayer(aPlayer, String.format("Threshold: %f", aCoverVariable.threshold)); } @@ -43,12 +49,14 @@ public class GT_Cover_FluidLimiter extends GT_CoverBehaviorBase<GT_Cover_FluidLi } @Override - protected boolean letsFluidInImpl(byte aSide, int aCoverID, FluidLimiterData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + protected boolean letsFluidInImpl( + byte aSide, int aCoverID, FluidLimiterData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return allowsFluidIn(aCoverVariable, aTileEntity); } @Override - protected boolean alwaysLookConnectedImpl(byte aSide, int aCoverID, FluidLimiterData aCoverVariable, ICoverable aTileEntity) { + protected boolean alwaysLookConnectedImpl( + byte aSide, int aCoverID, FluidLimiterData aCoverVariable, ICoverable aTileEntity) { return true; } @@ -57,22 +65,21 @@ public class GT_Cover_FluidLimiter extends GT_CoverBehaviorBase<GT_Cover_FluidLi */ private boolean allowsFluidIn(FluidLimiterData aCoverVariable, ICoverable c) { - if(c instanceof IFluidHandler) { + if (c instanceof IFluidHandler) { return aCoverVariable.threshold > getFillLevelInputSlots((IFluidHandler) c); } return false; } - private void adjustThreshold(FluidLimiterData coverVariable, boolean way) { - if(way) { - if((coverVariable.threshold + 0.05f) > 1F) { + if (way) { + if ((coverVariable.threshold + 0.05f) > 1F) { coverVariable.threshold = 0F; return; } coverVariable.threshold += 0.05F; } else { - if((Math.abs(coverVariable.threshold) - 0.05F) < 0F) { + if ((Math.abs(coverVariable.threshold) - 0.05F) < 0F) { coverVariable.threshold = 1F; return; } @@ -84,10 +91,10 @@ public class GT_Cover_FluidLimiter extends GT_CoverBehaviorBase<GT_Cover_FluidLi FluidTankInfo[] tankInfo = fh.getTankInfo(ForgeDirection.UNKNOWN); long tMax; long tUsed; - if(tankInfo != null) { - //0 Because we acces first slot only + if (tankInfo != null) { + // 0 Because we acces first slot only FluidTankInfo inputSlot = tankInfo[0]; - if(inputSlot.fluid != null) { + if (inputSlot.fluid != null) { tMax = inputSlot.capacity; tUsed = inputSlot.fluid.amount; return (float) tUsed / (float) tMax; @@ -96,7 +103,6 @@ public class GT_Cover_FluidLimiter extends GT_CoverBehaviorBase<GT_Cover_FluidLi return 0F; } - /* Data */ @@ -110,6 +116,7 @@ public class GT_Cover_FluidLimiter extends GT_CoverBehaviorBase<GT_Cover_FluidLi public FluidLimiterData createDataObject() { return new FluidLimiterData(1F); } + public static class FluidLimiterData implements ISerializableObject { private float threshold; @@ -138,7 +145,7 @@ public class GT_Cover_FluidLimiter extends GT_CoverBehaviorBase<GT_Cover_FluidLi @Override public void loadDataFromNBT(NBTBase aNBT) { - if(aNBT instanceof NBTTagCompound) { + if (aNBT instanceof NBTTagCompound) { NBTTagCompound tag = (NBTTagCompound) aNBT; this.threshold = tag.getFloat("threshold"); } @@ -152,13 +159,18 @@ public class GT_Cover_FluidLimiter extends GT_CoverBehaviorBase<GT_Cover_FluidLi } } - /* GUI */ @Override - protected Object getClientGUIImpl(byte aSide, int aCoverID, FluidLimiterData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, World aWorld) { + protected Object getClientGUIImpl( + byte aSide, + int aCoverID, + FluidLimiterData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + World aWorld) { return new GUI(aSide, aCoverID, aCoverVariable, aTileEntity); } @@ -212,12 +224,12 @@ public class GT_Cover_FluidLimiter extends GT_CoverBehaviorBase<GT_Cover_FluidLi int percent; try { percent = Integer.parseInt(box.getText().trim()); - } catch(NumberFormatException ignored) { + } catch (NumberFormatException ignored) { resetTextBox(thresholdBox); return; } - if(percent > 100 || percent <= 0) return; + if (percent > 100 || percent <= 0) return; this.coverVariable.threshold = percent / 100F; box.setText(String.valueOf(percent)); diff --git a/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java b/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java index 947635369a..0bc34b147d 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java @@ -13,6 +13,8 @@ import gregtech.api.util.GT_CoverBehaviorBase; import gregtech.api.util.GT_Utility; import gregtech.api.util.ISerializableObject; import io.netty.buffer.ByteBuf; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import net.minecraft.client.gui.GuiButton; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -24,9 +26,6 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - /** * Cover variable * <pre> @@ -42,492 +41,561 @@ import javax.annotation.Nullable; * This way, `0` means 1tick interval, while `-1` means 1 tick interval as well, preserving the legacy behavior. */ public class GT_Cover_FluidRegulator extends GT_CoverBehaviorBase<GT_Cover_FluidRegulator.FluidRegulatorData> { - private static final int SPEED_LENGTH = 20; - private static final int TICK_RATE_LENGTH = Integer.SIZE - SPEED_LENGTH - 1; - private static final int TICK_RATE_MIN = 1; - private static final int TICK_RATE_MAX = (-1 >>> (Integer.SIZE - TICK_RATE_LENGTH)) + TICK_RATE_MIN; - private static final int TICK_RATE_BITMASK = (TICK_RATE_MAX - TICK_RATE_MIN) << SPEED_LENGTH; - - public final int mTransferRate; - private boolean allowFluid = false; - - public GT_Cover_FluidRegulator(int aTransferRate) { - super(FluidRegulatorData.class); - if (aTransferRate > (-1 >>> (Integer.SIZE - SPEED_LENGTH))) - throw new IllegalArgumentException("aTransferRate too big: " + aTransferRate); - this.mTransferRate = aTransferRate; - } - - @Override - public FluidRegulatorData createDataObject(int aLegacyData) { - return new FluidRegulatorData(aLegacyData); - } - - @Override - public FluidRegulatorData createDataObject() { - return new FluidRegulatorData(); - } - - private static int generateNewCoverVariable(int aFlowRate, int aTickRate) { - int tToStoreRaw = aTickRate - TICK_RATE_MIN; - int tToStore = aFlowRate >= 0 ? tToStoreRaw : ~tToStoreRaw; - return aFlowRate & ~TICK_RATE_BITMASK | (tToStore << SPEED_LENGTH); - } - - @Override - protected boolean isRedstoneSensitiveImpl(byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, ICoverable aTileEntity, long aTimer) { - return aCoverVariable.condition.isRedstoneSensitive(); - } - - @Override - protected FluidRegulatorData doCoverThingsImpl(byte aSide, byte aInputRedstone, int aCoverID, FluidRegulatorData aCoverVariable, ICoverable aTileEntity, - long aTimer) { - if (aCoverVariable.speed == 0 || !aCoverVariable.condition.isAllowedToWork(aSide, aCoverID, aTileEntity)) { - return aCoverVariable; - } - if ((aTileEntity instanceof IFluidHandler)) { - IFluidHandler tTank1; - IFluidHandler tTank2; - ForgeDirection directionFrom; - ForgeDirection directionTo; - if (aCoverVariable.speed > 0) { - tTank2 = aTileEntity.getITankContainerAtSide(aSide); - tTank1 = (IFluidHandler) aTileEntity; - directionFrom = ForgeDirection.getOrientation(aSide); - directionTo = ForgeDirection.getOrientation(aSide).getOpposite(); - } else { - tTank1 = aTileEntity.getITankContainerAtSide(aSide); - tTank2 = (IFluidHandler) aTileEntity; - directionFrom = ForgeDirection.getOrientation(aSide).getOpposite(); - directionTo = ForgeDirection.getOrientation(aSide); - } - if (tTank1 != null && tTank2 != null) { - allowFluid = true; - FluidStack tLiquid = tTank1.drain(directionFrom, Math.abs(aCoverVariable.speed), false); - if (tLiquid != null) { - tLiquid = tLiquid.copy(); - tLiquid.amount = tTank2.fill(directionTo, tLiquid, false); - if (tLiquid.amount > 0) { - tTank2.fill(directionTo, tTank1.drain(directionFrom, tLiquid.amount, true), true); - } - } - allowFluid = false; - } - } - return aCoverVariable; - } - - private void adjustSpeed(EntityPlayer aPlayer, FluidRegulatorData aCoverVariable, int scale) { - int tSpeed = aCoverVariable.speed; - tSpeed += scale; - int tTickRate = aCoverVariable.tickRate; - if (Math.abs(tSpeed) > mTransferRate * tTickRate) { - tSpeed = mTransferRate * tTickRate * (tSpeed > 0 ? 1 : -1); - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("316", "Pump speed limit reached!")); - } - if (tTickRate == 1) { - GT_Utility.sendChatToPlayer(aPlayer, - GT_Utility.trans("048", "Pump speed: ") + tSpeed + GT_Utility.trans("049", "L/tick ") + tSpeed * 20 + GT_Utility.trans("050", "L/sec")); - } else { - GT_Utility.sendChatToPlayer(aPlayer, - String.format(GT_Utility.trans("207", "Pump speed: %dL every %d ticks, %.2f L/sec on average"), tSpeed, tTickRate, tSpeed * 20d / tTickRate)); - } - } - - @Override - public FluidRegulatorData onCoverScrewdriverClickImpl(byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { - adjustSpeed(aPlayer, aCoverVariable, aPlayer.isSneaking() ? 256 : 16); - } else { - adjustSpeed(aPlayer, aCoverVariable, aPlayer.isSneaking() ? -256 : -16); - } - return aCoverVariable; - } - - @Override - protected boolean onCoverRightClickImpl(byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { - adjustSpeed(aPlayer, aCoverVariable, 1); - } else { - adjustSpeed(aPlayer, aCoverVariable, -1); - } - return true; - } - - @Override - public boolean letsRedstoneGoInImpl(byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, ICoverable aTileEntity) { - return true; - } - - @Override - public boolean letsRedstoneGoOutImpl(byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, ICoverable aTileEntity) { - return true; - } - - @Override - public boolean letsEnergyInImpl(byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, ICoverable aTileEntity) { - return true; - } - - @Override - public boolean letsEnergyOutImpl(byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, ICoverable aTileEntity) { - return true; - } - - @Override - public boolean letsItemsInImpl(byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, int aSlot, ICoverable aTileEntity) { - return true; - } - - @Override - public boolean letsItemsOutImpl(byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, int aSlot, ICoverable aTileEntity) { - return true; - } - - @Override - public boolean letsFluidInImpl(byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - return allowFluid; - } - - @Override - public boolean letsFluidOutImpl(byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - return allowFluid; - } - - @Override - protected boolean alwaysLookConnectedImpl(byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, ICoverable aTileEntity) { - return true; - } - - @Override + private static final int SPEED_LENGTH = 20; + private static final int TICK_RATE_LENGTH = Integer.SIZE - SPEED_LENGTH - 1; + private static final int TICK_RATE_MIN = 1; + private static final int TICK_RATE_MAX = (-1 >>> (Integer.SIZE - TICK_RATE_LENGTH)) + TICK_RATE_MIN; + private static final int TICK_RATE_BITMASK = (TICK_RATE_MAX - TICK_RATE_MIN) << SPEED_LENGTH; + + public final int mTransferRate; + private boolean allowFluid = false; + + public GT_Cover_FluidRegulator(int aTransferRate) { + super(FluidRegulatorData.class); + if (aTransferRate > (-1 >>> (Integer.SIZE - SPEED_LENGTH))) + throw new IllegalArgumentException("aTransferRate too big: " + aTransferRate); + this.mTransferRate = aTransferRate; + } + + @Override + public FluidRegulatorData createDataObject(int aLegacyData) { + return new FluidRegulatorData(aLegacyData); + } + + @Override + public FluidRegulatorData createDataObject() { + return new FluidRegulatorData(); + } + + private static int generateNewCoverVariable(int aFlowRate, int aTickRate) { + int tToStoreRaw = aTickRate - TICK_RATE_MIN; + int tToStore = aFlowRate >= 0 ? tToStoreRaw : ~tToStoreRaw; + return aFlowRate & ~TICK_RATE_BITMASK | (tToStore << SPEED_LENGTH); + } + + @Override + protected boolean isRedstoneSensitiveImpl( + byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, ICoverable aTileEntity, long aTimer) { + return aCoverVariable.condition.isRedstoneSensitive(); + } + + @Override + protected FluidRegulatorData doCoverThingsImpl( + byte aSide, + byte aInputRedstone, + int aCoverID, + FluidRegulatorData aCoverVariable, + ICoverable aTileEntity, + long aTimer) { + if (aCoverVariable.speed == 0 || !aCoverVariable.condition.isAllowedToWork(aSide, aCoverID, aTileEntity)) { + return aCoverVariable; + } + if ((aTileEntity instanceof IFluidHandler)) { + IFluidHandler tTank1; + IFluidHandler tTank2; + ForgeDirection directionFrom; + ForgeDirection directionTo; + if (aCoverVariable.speed > 0) { + tTank2 = aTileEntity.getITankContainerAtSide(aSide); + tTank1 = (IFluidHandler) aTileEntity; + directionFrom = ForgeDirection.getOrientation(aSide); + directionTo = ForgeDirection.getOrientation(aSide).getOpposite(); + } else { + tTank1 = aTileEntity.getITankContainerAtSide(aSide); + tTank2 = (IFluidHandler) aTileEntity; + directionFrom = ForgeDirection.getOrientation(aSide).getOpposite(); + directionTo = ForgeDirection.getOrientation(aSide); + } + if (tTank1 != null && tTank2 != null) { + allowFluid = true; + FluidStack tLiquid = tTank1.drain(directionFrom, Math.abs(aCoverVariable.speed), false); + if (tLiquid != null) { + tLiquid = tLiquid.copy(); + tLiquid.amount = tTank2.fill(directionTo, tLiquid, false); + if (tLiquid.amount > 0) { + tTank2.fill(directionTo, tTank1.drain(directionFrom, tLiquid.amount, true), true); + } + } + allowFluid = false; + } + } + return aCoverVariable; + } + + private void adjustSpeed(EntityPlayer aPlayer, FluidRegulatorData aCoverVariable, int scale) { + int tSpeed = aCoverVariable.speed; + tSpeed += scale; + int tTickRate = aCoverVariable.tickRate; + if (Math.abs(tSpeed) > mTransferRate * tTickRate) { + tSpeed = mTransferRate * tTickRate * (tSpeed > 0 ? 1 : -1); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("316", "Pump speed limit reached!")); + } + if (tTickRate == 1) { + GT_Utility.sendChatToPlayer( + aPlayer, + GT_Utility.trans("048", "Pump speed: ") + + tSpeed + + GT_Utility.trans("049", "L/tick ") + + tSpeed * 20 + + GT_Utility.trans("050", "L/sec")); + } else { + GT_Utility.sendChatToPlayer( + aPlayer, + String.format( + GT_Utility.trans("207", "Pump speed: %dL every %d ticks, %.2f L/sec on average"), + tSpeed, + tTickRate, + tSpeed * 20d / tTickRate)); + } + } + + @Override + public FluidRegulatorData onCoverScrewdriverClickImpl( + byte aSide, + int aCoverID, + FluidRegulatorData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { + if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { + adjustSpeed(aPlayer, aCoverVariable, aPlayer.isSneaking() ? 256 : 16); + } else { + adjustSpeed(aPlayer, aCoverVariable, aPlayer.isSneaking() ? -256 : -16); + } + return aCoverVariable; + } + + @Override + protected boolean onCoverRightClickImpl( + byte aSide, + int aCoverID, + FluidRegulatorData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { + if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { + adjustSpeed(aPlayer, aCoverVariable, 1); + } else { + adjustSpeed(aPlayer, aCoverVariable, -1); + } + return true; + } + + @Override + public boolean letsRedstoneGoInImpl( + byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, ICoverable aTileEntity) { + return true; + } + + @Override + public boolean letsRedstoneGoOutImpl( + byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, ICoverable aTileEntity) { + return true; + } + + @Override + public boolean letsEnergyInImpl( + byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, ICoverable aTileEntity) { + return true; + } + + @Override + public boolean letsEnergyOutImpl( + byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, ICoverable aTileEntity) { + return true; + } + + @Override + public boolean letsItemsInImpl( + byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + @Override + public boolean letsItemsOutImpl( + byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + @Override + public boolean letsFluidInImpl( + byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return allowFluid; + } + + @Override + public boolean letsFluidOutImpl( + byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return allowFluid; + } + + @Override + protected boolean alwaysLookConnectedImpl( + byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, ICoverable aTileEntity) { + return true; + } + + @Override protected int getTickRateImpl(byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, ICoverable aTileEntity) { - return aCoverVariable.tickRate; - } - - /** - * GUI Stuff - */ - - @Override - public boolean hasCoverGUI() { - return true; - } - - @Override - public Object getClientGUIImpl(byte aSide, int aCoverID, FluidRegulatorData coverData, ICoverable aTileEntity, EntityPlayer aPlayer, World aWorld) { - return new GT_Cover_FluidRegulator.GUI(aSide, aCoverID, coverData, aTileEntity); - } - - public enum Conditional { - Always(false) { - @Override - boolean isAllowedToWork(byte aSide, int aCoverID, ICoverable aTileEntity) { - return true; - } - }, - Conditional(true) { - @Override - boolean isAllowedToWork(byte aSide, int aCoverID, ICoverable aTileEntity) { - return !(aTileEntity instanceof IMachineProgress) || ((IMachineProgress) aTileEntity).isAllowedToWork(); - } - }, - Inverted(true) { - @Override - boolean isAllowedToWork(byte aSide, int aCoverID, ICoverable aTileEntity) { - return !(aTileEntity instanceof IMachineProgress) || !((IMachineProgress) aTileEntity).isAllowedToWork(); - } - }; - - static final Conditional[] VALUES = values(); - private final boolean redstoneSensitive; - - Conditional(boolean redstoneSensitive) { - this.redstoneSensitive = redstoneSensitive; - } - - abstract boolean isAllowedToWork(byte aSide, int aCoverID, ICoverable aTileEntity); - boolean isRedstoneSensitive() { - return redstoneSensitive; - } - } - - public static class FluidRegulatorData implements ISerializableObject { - private int tickRate; - private int speed; - private Conditional condition; - - private static int getSpeed(int aCoverVariable) { - // positive or 0 -> interval bits need to be set to zero - // negative -> interval bits need to be set to one - return aCoverVariable >= 0 ? aCoverVariable & ~TICK_RATE_BITMASK : aCoverVariable | TICK_RATE_BITMASK; - } - - private static int getTickRate(int aCoverVariable) { - // range: TICK_RATE_MIN ~ TICK_RATE_MAX - return ((Math.abs(aCoverVariable) & TICK_RATE_BITMASK) >>> SPEED_LENGTH) + TICK_RATE_MIN; - } - - public FluidRegulatorData() { - this(0); - } - public FluidRegulatorData(int legacy) { - this(getTickRate(legacy), getSpeed(legacy), Conditional.Always); - } - - public FluidRegulatorData(int tickRate, int speed, Conditional condition) { - this.tickRate = tickRate; - this.speed = speed; - this.condition = condition; - } - - @Nonnull - @Override - public ISerializableObject copy() { - return new FluidRegulatorData(tickRate, speed, condition); - } - - @Nonnull - @Override - public NBTBase saveDataToNBT() { - NBTTagCompound tag = new NBTTagCompound(); - tag.setInteger("mSpeed", speed); - tag.setInteger("mTickRate", tickRate); - tag.setByte("mCondition", (byte) condition.ordinal()); - return tag; - } - - @Override - public void writeToByteBuf(ByteBuf aBuf) { - aBuf.writeInt(tickRate).writeInt(speed).writeByte(condition.ordinal()); - } - - @Override - public void loadDataFromNBT(NBTBase aNBT) { - if (!(aNBT instanceof NBTTagCompound)) return; // not very good... - NBTTagCompound tag = (NBTTagCompound) aNBT; - speed = tag.getInteger("mSpeed"); - tickRate = tag.getInteger("mTickRate"); - condition = Conditional.VALUES[tag.getByte("mCondition")]; - } - - @Nonnull - @Override - public ISerializableObject readFromPacket(ByteArrayDataInput aBuf, @Nullable EntityPlayerMP aPlayer) { - return new FluidRegulatorData(aBuf.readInt(), aBuf.readInt(), Conditional.VALUES[aBuf.readUnsignedByte()]); - } - - public int getTickRate() { - return tickRate; - } - - public void setTickRate(int tickRate) { - this.tickRate = tickRate; - } - - public int getSpeed() { - return speed; - } - - public void setSpeed(int speed) { - this.speed = speed; - } - - public Conditional getCondition() { - return condition; - } - - public void setCondition(Conditional condition) { - this.condition = condition; - } - } - - private class GUI extends GT_GUICover { - private final byte side; - private final int coverID; - private GT_GuiIntegerTextBox tBox, lBox; - private FluidRegulatorData coverVariable; - - private static final int startX = 10; - private static final int startY = 25; - private static final int spaceX = 18; - private static final int spaceY = 18; - - private boolean warn = false; - - private final int - textColor = this.getTextColorOrDefault("text", 0xFF555555), - textColorValue = this.getTextColorOrDefault("value", 0xFFFF0000); - - public GUI(byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, ICoverable aTileEntity) { - super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID)); - this.side = aSide; - this.coverID = aCoverID; - this.coverVariable = aCoverVariable; - - new GT_GuiIconButton(this, 0, startX + spaceX * 0, startY + spaceY * 0, GT_GuiIcon.EXPORT).setTooltipText(GT_Utility.trans("006", "Export")); - new GT_GuiIconButton(this, 1, startX + spaceX * 1, startY + spaceY * 0, GT_GuiIcon.IMPORT).setTooltipText(GT_Utility.trans("007", "Import")); - new GT_GuiIconButton(this, 2, startX + spaceX * 0, startY + spaceY * 1, GT_GuiIcon.CHECKMARK).setTooltipText(GT_Utility.trans("224", "Always On")); - new GT_GuiIconButton(this, 3, startX + spaceX * 1, startY + spaceY * 1, GT_GuiIcon.REDSTONE_ON).setTooltipText(GT_Utility.trans("225", "Active with Redstone Signal")); - new GT_GuiIconButton(this, 4, startX + spaceX * 2, startY + spaceY * 1, GT_GuiIcon.REDSTONE_OFF).setTooltipText(GT_Utility.trans("226", "Inactive with Redstone Signal")); - - tBox = new GT_GuiIntegerTextBox(this, 2, startX + spaceX * 0, startY + spaceY * 2 + 2, spaceX * 4 - 3, 12) { + return aCoverVariable.tickRate; + } + + /** + * GUI Stuff + */ + @Override + public boolean hasCoverGUI() { + return true; + } + + @Override + public Object getClientGUIImpl( + byte aSide, + int aCoverID, + FluidRegulatorData coverData, + ICoverable aTileEntity, + EntityPlayer aPlayer, + World aWorld) { + return new GT_Cover_FluidRegulator.GUI(aSide, aCoverID, coverData, aTileEntity); + } + + public enum Conditional { + Always(false) { + @Override + boolean isAllowedToWork(byte aSide, int aCoverID, ICoverable aTileEntity) { + return true; + } + }, + Conditional(true) { + @Override + boolean isAllowedToWork(byte aSide, int aCoverID, ICoverable aTileEntity) { + return !(aTileEntity instanceof IMachineProgress) || ((IMachineProgress) aTileEntity).isAllowedToWork(); + } + }, + Inverted(true) { + @Override + boolean isAllowedToWork(byte aSide, int aCoverID, ICoverable aTileEntity) { + return !(aTileEntity instanceof IMachineProgress) + || !((IMachineProgress) aTileEntity).isAllowedToWork(); + } + }; + + static final Conditional[] VALUES = values(); + private final boolean redstoneSensitive; + + Conditional(boolean redstoneSensitive) { + this.redstoneSensitive = redstoneSensitive; + } + + abstract boolean isAllowedToWork(byte aSide, int aCoverID, ICoverable aTileEntity); + + boolean isRedstoneSensitive() { + return redstoneSensitive; + } + } + + public static class FluidRegulatorData implements ISerializableObject { + private int tickRate; + private int speed; + private Conditional condition; + + private static int getSpeed(int aCoverVariable) { + // positive or 0 -> interval bits need to be set to zero + // negative -> interval bits need to be set to one + return aCoverVariable >= 0 ? aCoverVariable & ~TICK_RATE_BITMASK : aCoverVariable | TICK_RATE_BITMASK; + } + + private static int getTickRate(int aCoverVariable) { + // range: TICK_RATE_MIN ~ TICK_RATE_MAX + return ((Math.abs(aCoverVariable) & TICK_RATE_BITMASK) >>> SPEED_LENGTH) + TICK_RATE_MIN; + } + + public FluidRegulatorData() { + this(0); + } + + public FluidRegulatorData(int legacy) { + this(getTickRate(legacy), getSpeed(legacy), Conditional.Always); + } + + public FluidRegulatorData(int tickRate, int speed, Conditional condition) { + this.tickRate = tickRate; + this.speed = speed; + this.condition = condition; + } + + @Nonnull + @Override + public ISerializableObject copy() { + return new FluidRegulatorData(tickRate, speed, condition); + } + + @Nonnull + @Override + public NBTBase saveDataToNBT() { + NBTTagCompound tag = new NBTTagCompound(); + tag.setInteger("mSpeed", speed); + tag.setInteger("mTickRate", tickRate); + tag.setByte("mCondition", (byte) condition.ordinal()); + return tag; + } + + @Override + public void writeToByteBuf(ByteBuf aBuf) { + aBuf.writeInt(tickRate).writeInt(speed).writeByte(condition.ordinal()); + } + + @Override + public void loadDataFromNBT(NBTBase aNBT) { + if (!(aNBT instanceof NBTTagCompound)) return; // not very good... + NBTTagCompound tag = (NBTTagCompound) aNBT; + speed = tag.getInteger("mSpeed"); + tickRate = tag.getInteger("mTickRate"); + condition = Conditional.VALUES[tag.getByte("mCondition")]; + } + + @Nonnull + @Override + public ISerializableObject readFromPacket(ByteArrayDataInput aBuf, @Nullable EntityPlayerMP aPlayer) { + return new FluidRegulatorData(aBuf.readInt(), aBuf.readInt(), Conditional.VALUES[aBuf.readUnsignedByte()]); + } + + public int getTickRate() { + return tickRate; + } + + public void setTickRate(int tickRate) { + this.tickRate = tickRate; + } + + public int getSpeed() { + return speed; + } + + public void setSpeed(int speed) { + this.speed = speed; + } + + public Conditional getCondition() { + return condition; + } + + public void setCondition(Conditional condition) { + this.condition = condition; + } + } + + private class GUI extends GT_GUICover { + private final byte side; + private final int coverID; + private GT_GuiIntegerTextBox tBox, lBox; + private FluidRegulatorData coverVariable; + + private static final int startX = 10; + private static final int startY = 25; + private static final int spaceX = 18; + private static final int spaceY = 18; + + private boolean warn = false; + + private final int textColor = this.getTextColorOrDefault("text", 0xFF555555), + textColorValue = this.getTextColorOrDefault("value", 0xFFFF0000); + + public GUI(byte aSide, int aCoverID, FluidRegulatorData aCoverVariable, ICoverable aTileEntity) { + super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID)); + this.side = aSide; + this.coverID = aCoverID; + this.coverVariable = aCoverVariable; + + new GT_GuiIconButton(this, 0, startX + spaceX * 0, startY + spaceY * 0, GT_GuiIcon.EXPORT) + .setTooltipText(GT_Utility.trans("006", "Export")); + new GT_GuiIconButton(this, 1, startX + spaceX * 1, startY + spaceY * 0, GT_GuiIcon.IMPORT) + .setTooltipText(GT_Utility.trans("007", "Import")); + new GT_GuiIconButton(this, 2, startX + spaceX * 0, startY + spaceY * 1, GT_GuiIcon.CHECKMARK) + .setTooltipText(GT_Utility.trans("224", "Always On")); + new GT_GuiIconButton(this, 3, startX + spaceX * 1, startY + spaceY * 1, GT_GuiIcon.REDSTONE_ON) + .setTooltipText(GT_Utility.trans("225", "Active with Redstone Signal")); + new GT_GuiIconButton(this, 4, startX + spaceX * 2, startY + spaceY * 1, GT_GuiIcon.REDSTONE_OFF) + .setTooltipText(GT_Utility.trans("226", "Inactive with Redstone Signal")); + + tBox = new GT_GuiIntegerTextBox(this, 2, startX + spaceX * 0, startY + spaceY * 2 + 2, spaceX * 4 - 3, 12) { @Override public boolean validChar(char c, int key) { return super.validChar(c, key) || c == '-'; } }; - tBox.setText(String.valueOf(this.coverVariable.speed)); - tBox.setMaxStringLength(10); + tBox.setText(String.valueOf(this.coverVariable.speed)); + tBox.setMaxStringLength(10); - lBox = new GT_GuiIntegerTextBox(this, 3, startX + spaceX * 5, startY + spaceY * 2 + 2, spaceX * 2 - 3, 12) { + lBox = new GT_GuiIntegerTextBox(this, 3, startX + spaceX * 5, startY + spaceY * 2 + 2, spaceX * 2 - 3, 12) { @Override public boolean validChar(char c, int key) { return super.validChar(c, key) || c == '-'; } }; - lBox.setText(String.valueOf(this.coverVariable.tickRate)); - lBox.setMaxStringLength(4); - } - - @Override - public void drawExtras(int mouseX, int mouseY, float parTicks) { - super.drawExtras(mouseX, mouseY, parTicks); - this.getFontRenderer().drawString(GT_Utility.trans("229", "Import/Export"), startX + spaceX * 4, 4 + startY + spaceY * 0, textColor); - this.getFontRenderer().drawString(GT_Utility.trans("229", "Conditional"), startX + spaceX * 4, 4 + startY + spaceY * 1, textColor); - this.getFontRenderer().drawString(GT_Utility.trans("208", " L"), startX + spaceX * 4, 4 + startY + spaceY * 2, textColor); - this.getFontRenderer().drawString(GT_Utility.trans("209", " ticks"), startX + spaceX * 7, 4 + startY + spaceY * 2, textColor); - this.getFontRenderer().drawString(String.format(GT_Utility.trans("210", "Average: %.2f L/sec"), coverVariable.tickRate == 0 ? 0 : coverVariable.speed * 20d / coverVariable.tickRate), startX + spaceX * 0, 4 + startY + spaceY * 3, warn ? textColorValue : textColor); - } - - @Override - protected void onInitGui(int guiLeft, int guiTop, int gui_width, int gui_height) { - updateButtons(); - tBox.setFocused(true); - } - - @Override - public void buttonClicked(GuiButton btn){ - if (!btn.enabled) - return; - switch (btn.id) { - case 0: - case 1: - coverVariable.speed *= -1; - for (GT_GuiIntegerTextBox box : textBoxes){ + lBox.setText(String.valueOf(this.coverVariable.tickRate)); + lBox.setMaxStringLength(4); + } + + @Override + public void drawExtras(int mouseX, int mouseY, float parTicks) { + super.drawExtras(mouseX, mouseY, parTicks); + this.getFontRenderer() + .drawString( + GT_Utility.trans("229", "Import/Export"), + startX + spaceX * 4, + 4 + startY + spaceY * 0, + textColor); + this.getFontRenderer() + .drawString( + GT_Utility.trans("229", "Conditional"), + startX + spaceX * 4, + 4 + startY + spaceY * 1, + textColor); + this.getFontRenderer() + .drawString(GT_Utility.trans("208", " L"), startX + spaceX * 4, 4 + startY + spaceY * 2, textColor); + this.getFontRenderer() + .drawString( + GT_Utility.trans("209", " ticks"), startX + spaceX * 7, 4 + startY + spaceY * 2, textColor); + this.getFontRenderer() + .drawString( + String.format( + GT_Utility.trans("210", "Average: %.2f L/sec"), + coverVariable.tickRate == 0 + ? 0 + : coverVariable.speed * 20d / coverVariable.tickRate), + startX + spaceX * 0, + 4 + startY + spaceY * 3, + warn ? textColorValue : textColor); + } + + @Override + protected void onInitGui(int guiLeft, int guiTop, int gui_width, int gui_height) { + updateButtons(); + tBox.setFocused(true); + } + + @Override + public void buttonClicked(GuiButton btn) { + if (!btn.enabled) return; + switch (btn.id) { + case 0: + case 1: + coverVariable.speed *= -1; + for (GT_GuiIntegerTextBox box : textBoxes) { if (box.id == 2) { box.setText(String.valueOf(coverVariable.speed)); } } - break; - case 2: - case 3: - case 4: - coverVariable.condition = Conditional.VALUES[btn.id - 2]; - break; - default: - // not right, but we carry on - return; - } - GT_Values.NW.sendToServer(new GT_Packet_TileEntityCoverNew(side, coverID, coverVariable, tile)); - updateButtons(); - } - - @Override - public void onMouseWheel(int x, int y, int delta) { - for (GT_GuiIntegerTextBox box : textBoxes){ - if (box.isFocused()) { - int step = Math.max(1, Math.abs(delta / 120)); - step = (isShiftKeyDown() ? 50 : isCtrlKeyDown() ? 5 : 1) * (delta > 0 ? step : -step); - long i; - try { - i = Long.parseLong(box.getText()); - } catch (NumberFormatException e) { - return; - } - if (i > (Long.MAX_VALUE-1000)) - break; - - i = i + step; - if (i <= 0) - i = 0; - box.setText(String.valueOf(i)); - break; - } - } - } - - @Override - public void applyTextBox(GT_GuiIntegerTextBox box) { - long i; - String s = box.getText().trim(); - try { - i = Long.parseLong(s); - } catch (NumberFormatException e) { - resetTextBox(box); - return; - } - - warn = false; - if (box.id == 2) { - long maxFlow = (long) mTransferRate * GT_Utility.clamp(coverVariable.tickRate, TICK_RATE_MIN, TICK_RATE_MAX); - if (i > maxFlow) { - i = maxFlow; - warn = true; - } else if (i < -maxFlow) { + break; + case 2: + case 3: + case 4: + coverVariable.condition = Conditional.VALUES[btn.id - 2]; + break; + default: + // not right, but we carry on + return; + } + GT_Values.NW.sendToServer(new GT_Packet_TileEntityCoverNew(side, coverID, coverVariable, tile)); + updateButtons(); + } + + @Override + public void onMouseWheel(int x, int y, int delta) { + for (GT_GuiIntegerTextBox box : textBoxes) { + if (box.isFocused()) { + int step = Math.max(1, Math.abs(delta / 120)); + step = (isShiftKeyDown() ? 50 : isCtrlKeyDown() ? 5 : 1) * (delta > 0 ? step : -step); + long i; + try { + i = Long.parseLong(box.getText()); + } catch (NumberFormatException e) { + return; + } + if (i > (Long.MAX_VALUE - 1000)) break; + + i = i + step; + if (i <= 0) i = 0; + box.setText(String.valueOf(i)); + break; + } + } + } + + @Override + public void applyTextBox(GT_GuiIntegerTextBox box) { + long i; + String s = box.getText().trim(); + try { + i = Long.parseLong(s); + } catch (NumberFormatException e) { + resetTextBox(box); + return; + } + + warn = false; + if (box.id == 2) { + long maxFlow = + (long) mTransferRate * GT_Utility.clamp(coverVariable.tickRate, TICK_RATE_MIN, TICK_RATE_MAX); + if (i > maxFlow) { + i = maxFlow; + warn = true; + } else if (i < -maxFlow) { i = -maxFlow; warn = true; } - if (!warn && coverVariable.speed == i) return; - coverVariable.speed = (int) i; - } else if (box.id == 3) { - if (i > TICK_RATE_MAX) { - i = TICK_RATE_MAX; + if (!warn && coverVariable.speed == i) return; + coverVariable.speed = (int) i; + } else if (box.id == 3) { + if (i > TICK_RATE_MAX) { + i = TICK_RATE_MAX; + warn = true; + } else if (Math.abs(coverVariable.speed) > mTransferRate * i) { + i = Math.min(TICK_RATE_MAX, (Math.abs(coverVariable.speed) + mTransferRate - 1) / mTransferRate); warn = true; - } else if (Math.abs(coverVariable.speed) > mTransferRate * i) { - i = Math.min(TICK_RATE_MAX, (Math.abs(coverVariable.speed) + mTransferRate - 1) / mTransferRate); - warn = true; - } else if (i < TICK_RATE_MIN) { - i = 1; - } - if (!warn && coverVariable.tickRate == i) return; - coverVariable.tickRate = (int) i; - } - box.setText(String.valueOf(i)); - updateButtons(); - - GT_Values.NW.sendToServer(new GT_Packet_TileEntityCoverNew(side, coverID, coverVariable, tile)); - } - - @Override - public void resetTextBox(GT_GuiIntegerTextBox box) { - if (box.id == 2) - box.setText(String.valueOf(coverVariable.speed)); - else if (box.id == 3) - box.setText(String.valueOf(coverVariable.tickRate)); - } - - private void updateButtons(){ - GuiButton b; - for (Object o : buttonList) { - b = (GuiButton) o; - b.enabled = getClickable(b.id); - } - } - - private boolean getClickable(int id) { - switch (id) { - case 0: - return coverVariable.speed < 0; - case 1: - return coverVariable.speed > 0; - case 2: - case 3: - case 4: - return coverVariable.condition != Conditional.VALUES[id - 2]; - } - return false; - } - } + } else if (i < TICK_RATE_MIN) { + i = 1; + } + if (!warn && coverVariable.tickRate == i) return; + coverVariable.tickRate = (int) i; + } + box.setText(String.valueOf(i)); + updateButtons(); + + GT_Values.NW.sendToServer(new GT_Packet_TileEntityCoverNew(side, coverID, coverVariable, tile)); + } + + @Override + public void resetTextBox(GT_GuiIntegerTextBox box) { + if (box.id == 2) box.setText(String.valueOf(coverVariable.speed)); + else if (box.id == 3) box.setText(String.valueOf(coverVariable.tickRate)); + } + + private void updateButtons() { + GuiButton b; + for (Object o : buttonList) { + b = (GuiButton) o; + b.enabled = getClickable(b.id); + } + } + + private boolean getClickable(int id) { + switch (id) { + case 0: + return coverVariable.speed < 0; + case 1: + return coverVariable.speed > 0; + case 2: + case 3: + case 4: + return coverVariable.condition != Conditional.VALUES[id - 2]; + } + return false; + } + } } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_FluidStorageMonitor.java b/src/main/java/gregtech/common/covers/GT_Cover_FluidStorageMonitor.java index b9486398a3..a90d2f2213 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_FluidStorageMonitor.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_FluidStorageMonitor.java @@ -1,5 +1,21 @@ package gregtech.common.covers; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR0; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR1; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR10; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR11; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR12; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR13; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR14; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR2; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR3; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR4; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR5; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR6; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR7; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR8; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR9; + import com.google.common.io.ByteArrayDataInput; import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.ITexture; @@ -9,6 +25,9 @@ import gregtech.api.util.GT_CoverBehaviorBase; import gregtech.api.util.GT_Utility; import gregtech.api.util.ISerializableObject; import io.netty.buffer.ByteBuf; +import java.util.Optional; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -25,28 +44,8 @@ import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidContainerItem; import net.minecraftforge.fluids.IFluidHandler; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import java.util.Optional; - -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR0; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR1; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR10; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR11; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR12; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR13; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR14; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR2; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR3; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR4; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR5; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR6; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR7; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR8; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR9; - public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_FluidStorageMonitor.FluidStorageData> { - private static final IIconContainer[] icons = new IIconContainer[]{ + private static final IIconContainer[] icons = new IIconContainer[] { OVERLAY_FLUID_STORAGE_MONITOR0, OVERLAY_FLUID_STORAGE_MONITOR1, OVERLAY_FLUID_STORAGE_MONITOR2, @@ -79,7 +78,13 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_ } @Override - protected FluidStorageData doCoverThingsImpl(byte aSide, byte aInputRedstone, int aCoverID, FluidStorageData aCoverVariable, ICoverable aTileEntity, long aTimer) { + protected FluidStorageData doCoverThingsImpl( + byte aSide, + byte aInputRedstone, + int aCoverID, + FluidStorageData aCoverVariable, + ICoverable aTileEntity, + long aTimer) { final FluidTankInfo[] tanks = getValidFluidTankInfos(aTileEntity, aCoverVariable.side); if (tanks == null) { return aCoverVariable.disable().issueCoverUpdateIfNeeded(aTileEntity, aSide); @@ -96,40 +101,49 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_ } return aCoverVariable - .setFluid(tank.fluid) - .setScale(getTankScale(tank)) - .issueCoverUpdateIfNeeded(aTileEntity, aSide); + .setFluid(tank.fluid) + .setScale(getTankScale(tank)) + .issueCoverUpdateIfNeeded(aTileEntity, aSide); } - @Override - protected ITexture getSpecialCoverTextureImpl(byte aSide, int aCoverID, FluidStorageData aCoverVariable, ICoverable aTileEntity) { + protected ITexture getSpecialCoverTextureImpl( + byte aSide, int aCoverID, FluidStorageData aCoverVariable, ICoverable aTileEntity) { if (aCoverVariable.slot == -1 || aCoverVariable.fluid == null || aCoverVariable.scale == 0) { return TextureFactory.of(OVERLAY_FLUID_STORAGE_MONITOR0); } return TextureFactory.of( - TextureFactory.of(new IIconContainer() { - @Override - public IIcon getIcon() { - return aCoverVariable.fluid.getStillIcon(); - } - - @Override - public IIcon getOverlayIcon() { - return null; - } - - @Override - public ResourceLocation getTextureFile() { - return TextureMap.locationBlocksTexture; - } - }, colorToRGBA(aCoverVariable.fluid.getColor())), - TextureFactory.of(icons[aCoverVariable.scale]) - ); + TextureFactory.of( + new IIconContainer() { + @Override + public IIcon getIcon() { + return aCoverVariable.fluid.getStillIcon(); + } + + @Override + public IIcon getOverlayIcon() { + return null; + } + + @Override + public ResourceLocation getTextureFile() { + return TextureMap.locationBlocksTexture; + } + }, + colorToRGBA(aCoverVariable.fluid.getColor())), + TextureFactory.of(icons[aCoverVariable.scale])); } @Override - protected boolean onCoverRightClickImpl(byte aSide, int aCoverID, FluidStorageData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + protected boolean onCoverRightClickImpl( + byte aSide, + int aCoverID, + FluidStorageData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { if (aPlayer == null || aPlayer.worldObj == null || aPlayer.worldObj.isRemote) { return false; } @@ -169,8 +183,8 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_ return false; } - - protected static ItemStack fillToTank(@Nonnull ItemStack container, @Nonnull IFluidHandler tank, ForgeDirection side) { + protected static ItemStack fillToTank( + @Nonnull ItemStack container, @Nonnull IFluidHandler tank, ForgeDirection side) { final FluidStack fluidToFill = GT_Utility.getFluidForFilledItem(container, true); if (fluidToFill == null || fluidToFill.getFluid() == null || fluidToFill.amount <= 0) { return null; @@ -197,7 +211,11 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_ } } - protected static ItemStack fillToContainer(@Nonnull ItemStack container, @Nonnull FluidTankInfo tankInfo, @Nonnull IFluidHandler tank, ForgeDirection side) { + protected static ItemStack fillToContainer( + @Nonnull ItemStack container, + @Nonnull FluidTankInfo tankInfo, + @Nonnull IFluidHandler tank, + ForgeDirection side) { if (tankInfo.fluid == null || tankInfo.fluid.getFluid() == null || tankInfo.fluid.amount <= 0) { return null; } @@ -208,9 +226,17 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_ if (container.getItem() instanceof IFluidContainerItem) { final IFluidContainerItem containerItem = (IFluidContainerItem) container.getItem(); final int filled = Math.min( - Optional.ofNullable(tank.drain(side, new FluidStack(tankInfo.fluid.getFluid(), containerItem.getCapacity(container)), false)).filter(fs -> GT_Utility.areFluidsEqual(fs, tankInfo.fluid)).map(fs -> fs.amount).orElse(0), - containerItem.fill(container, new FluidStack(tankInfo.fluid.getFluid(), containerItem.getCapacity(container)), false) - ); + Optional.ofNullable(tank.drain( + side, + new FluidStack(tankInfo.fluid.getFluid(), containerItem.getCapacity(container)), + false)) + .filter(fs -> GT_Utility.areFluidsEqual(fs, tankInfo.fluid)) + .map(fs -> fs.amount) + .orElse(0), + containerItem.fill( + container, + new FluidStack(tankInfo.fluid.getFluid(), containerItem.getCapacity(container)), + false)); if (filled == 0) { return null; } @@ -226,7 +252,11 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_ if (filledFluid == null || filledFluid.getFluid() == null || filledFluid.amount <= 0) { return null; } - if (Optional.ofNullable(tank.drain(side, filledFluid, false)).filter(fs -> GT_Utility.areFluidsEqual(fs, filledFluid)).map(fs -> fs.amount).orElse(0) != filledFluid.amount) { + if (Optional.ofNullable(tank.drain(side, filledFluid, false)) + .filter(fs -> GT_Utility.areFluidsEqual(fs, filledFluid)) + .map(fs -> fs.amount) + .orElse(0) + != filledFluid.amount) { return null; } tank.drain(side, filledFluid, true); @@ -234,19 +264,29 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_ } } - protected static void replaceHeldItemStack(@Nonnull EntityPlayer player, @Nonnull ItemStack heldItem, @Nonnull ItemStack result) { + protected static void replaceHeldItemStack( + @Nonnull EntityPlayer player, @Nonnull ItemStack heldItem, @Nonnull ItemStack result) { heldItem.stackSize--; GT_Utility.addItemToPlayerInventory(player, result); player.inventoryContainer.detectAndSendChanges(); } - @Override - protected FluidStorageData onCoverScrewdriverClickImpl(byte aSide, int aCoverID, FluidStorageData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + protected FluidStorageData onCoverScrewdriverClickImpl( + byte aSide, + int aCoverID, + FluidStorageData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { if (aPlayer.isSneaking()) { aCoverVariable - .setSide(ForgeDirection.values()[(aCoverVariable.side.ordinal() + 1) % ForgeDirection.values().length]) - .setSlot(0); + .setSide( + ForgeDirection.values()[ + (aCoverVariable.side.ordinal() + 1) % ForgeDirection.values().length]) + .setSlot(0); GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("SIDE", "Side: ") + aCoverVariable.side.name()); return aCoverVariable; } @@ -258,24 +298,28 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_ if (aCoverVariable.slot < 0 || tanks.length <= aCoverVariable.slot) { aCoverVariable.setSlot(0); } else { - aCoverVariable.setSlot((aCoverVariable.slot + tanks.length + (aPlayer.isSneaking() ? -1 : 1)) % tanks.length); + aCoverVariable.setSlot( + (aCoverVariable.slot + tanks.length + (aPlayer.isSneaking() ? -1 : 1)) % tanks.length); } GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("053", "Slot: ") + aCoverVariable.slot); return aCoverVariable; } @Override - protected boolean isDataNeededOnClientImpl(byte aSide, int aCoverID, FluidStorageData aCoverVariable, ICoverable aTileEntity) { + protected boolean isDataNeededOnClientImpl( + byte aSide, int aCoverID, FluidStorageData aCoverVariable, ICoverable aTileEntity) { return true; } @Override - protected boolean letsFluidInImpl(byte aSide, int aCoverID, FluidStorageData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + protected boolean letsFluidInImpl( + byte aSide, int aCoverID, FluidStorageData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } @Override - protected boolean letsFluidOutImpl(byte aSide, int aCoverID, FluidStorageData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + protected boolean letsFluidOutImpl( + byte aSide, int aCoverID, FluidStorageData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } @@ -284,7 +328,8 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_ return 10; } - protected static FluidTankInfo[] getValidFluidTankInfos(@Nullable ICoverable tileEntity, @Nonnull ForgeDirection side) { + protected static FluidTankInfo[] getValidFluidTankInfos( + @Nullable ICoverable tileEntity, @Nonnull ForgeDirection side) { if (tileEntity instanceof IFluidHandler) { final FluidTankInfo[] tanks = ((IFluidHandler) tileEntity).getTankInfo(side); if (tanks != null && 0 < tanks.length) { @@ -302,11 +347,8 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_ } protected short[] colorToRGBA(int color) { - return new short[]{ - (short) (color >> 16 & 0xFF), - (short) (color >> 8 & 0xFF), - (short) (color & 0xFF), - (short) (0xFF) + return new short[] { + (short) (color >> 16 & 0xFF), (short) (color >> 8 & 0xFF), (short) (color & 0xFF), (short) (0xFF) }; } @@ -389,7 +431,7 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_ return this; } - //region ISerializableObject + // region ISerializableObject @Nonnull @Override public ISerializableObject copy() { @@ -437,7 +479,7 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_ aBuf.writeInt(scale); aBuf.writeBoolean(dirty); } - //endregion + // endregion } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java b/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java index c90a0fb07e..1da703cbb7 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java @@ -1,5 +1,7 @@ package gregtech.common.covers; +import static gregtech.api.enums.GT_Values.E; + import com.google.common.io.ByteArrayDataInput; import gregtech.api.enums.GT_Values; import gregtech.api.gui.GT_GUICover; @@ -12,6 +14,7 @@ import gregtech.api.util.GT_CoverBehaviorBase; import gregtech.api.util.GT_Utility; import gregtech.api.util.ISerializableObject; import io.netty.buffer.ByteBuf; +import javax.annotation.Nonnull; import net.minecraft.client.gui.GuiButton; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -24,21 +27,17 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -import javax.annotation.Nonnull; - -import static gregtech.api.enums.GT_Values.E; - public class GT_Cover_Fluidfilter extends GT_CoverBehaviorBase<GT_Cover_Fluidfilter.FluidFilterData> { // Uses the lower 3 bits of the cover variable, so we have 8 options to work with (0-7) private final int FILTER_INPUT_DENY_OUTPUT = 0; // 000 private final int INVERT_INPUT_DENY_OUTPUT = 1; // 001 - private final int FILTER_INPUT_ANY_OUTPUT = 2; // 010 - private final int INVERT_INPUT_ANY_OUTPUT = 3; // 011 + private final int FILTER_INPUT_ANY_OUTPUT = 2; // 010 + private final int INVERT_INPUT_ANY_OUTPUT = 3; // 011 private final int DENY_INPUT_FILTER_OUTPUT = 4; // 100 private final int DENY_INPUT_INVERT_OUTPUT = 5; // 101 - private final int ANY_INPUT_FILTER_OUTPUT = 6; // 110 - private final int ANY_INPUT_INVERT_OUTPUT = 7; // 111 + private final int ANY_INPUT_FILTER_OUTPUT = 6; // 110 + private final int ANY_INPUT_INVERT_OUTPUT = 7; // 111 public GT_Cover_Fluidfilter() { super(FluidFilterData.class); @@ -55,21 +54,30 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehaviorBase<GT_Cover_Fluidfil } @Override - protected String getDescriptionImpl(byte aSide, int aCoverID, FluidFilterData aCoverVariable, ICoverable aTileEntity) { + protected String getDescriptionImpl( + byte aSide, int aCoverID, FluidFilterData aCoverVariable, ICoverable aTileEntity) { final Fluid fluid = FluidRegistry.getFluid(aCoverVariable.mFluidID); if (fluid == null) return E; final FluidStack sFluid = new FluidStack(fluid, 1000); - return (String.format("Filtering Fluid: %s - %s", sFluid.getLocalizedName(), getFilterMode(aCoverVariable.mFilterMode))); + return (String.format( + "Filtering Fluid: %s - %s", sFluid.getLocalizedName(), getFilterMode(aCoverVariable.mFilterMode))); } @Override - protected boolean isRedstoneSensitiveImpl(byte aSide, int aCoverID, FluidFilterData aCoverVariable, ICoverable aTileEntity, long aTimer) { + protected boolean isRedstoneSensitiveImpl( + byte aSide, int aCoverID, FluidFilterData aCoverVariable, ICoverable aTileEntity, long aTimer) { return false; } @Override - protected FluidFilterData doCoverThingsImpl(byte aSide, byte aInputRedstone, int aCoverID, FluidFilterData aCoverVariable, ICoverable aTileEntity, long aTimer) { + protected FluidFilterData doCoverThingsImpl( + byte aSide, + byte aInputRedstone, + int aCoverID, + FluidFilterData aCoverVariable, + ICoverable aTileEntity, + long aTimer) { return aCoverVariable; } @@ -94,11 +102,18 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehaviorBase<GT_Cover_Fluidfil default: return ("UNKNOWN"); } - } @Override - protected FluidFilterData onCoverScrewdriverClickImpl(byte aSide, int aCoverID, FluidFilterData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + protected FluidFilterData onCoverScrewdriverClickImpl( + byte aSide, + int aCoverID, + FluidFilterData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { aCoverVariable.mFilterMode = (aCoverVariable.mFilterMode + (aPlayer.isSneaking() ? -1 : 1)) % 8; if (aCoverVariable.mFilterMode < 0) { aCoverVariable.mFilterMode = 7; @@ -110,14 +125,20 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehaviorBase<GT_Cover_Fluidfil } @Override - protected boolean onCoverRightClickImpl(byte aSide, int aCoverID, FluidFilterData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if ( - ((aX > 0.375D) && (aX < 0.625D)) || - ((aSide > 3) && ((aY > 0.375D) && (aY < 0.625D))) || - ((aSide < 2) && ((aZ > 0.375D) && (aZ < 0.625D))) || - (aSide == 2) || - (aSide == 3) - ) { + protected boolean onCoverRightClickImpl( + byte aSide, + int aCoverID, + FluidFilterData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { + if (((aX > 0.375D) && (aX < 0.625D)) + || ((aSide > 3) && ((aY > 0.375D) && (aY < 0.625D))) + || ((aSide < 2) && ((aZ > 0.375D) && (aZ < 0.625D))) + || (aSide == 2) + || (aSide == 3)) { ItemStack tStack = aPlayer.inventory.getCurrentItem(); if (tStack == null) return true; @@ -127,7 +148,8 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehaviorBase<GT_Cover_Fluidfil aCoverVariable.mFluidID = aFluid; aTileEntity.setCoverDataAtSide(aSide, aCoverVariable); FluidStack sFluid = new FluidStack(FluidRegistry.getFluid(aFluid), 1000); - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("047", "Filter Fluid: ") + sFluid.getLocalizedName()); + GT_Utility.sendChatToPlayer( + aPlayer, GT_Utility.trans("047", "Filter Fluid: ") + sFluid.getLocalizedName()); } return true; } @@ -135,41 +157,38 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehaviorBase<GT_Cover_Fluidfil } @Override - protected boolean letsFluidInImpl(byte aSide, int aCoverID, FluidFilterData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + protected boolean letsFluidInImpl( + byte aSide, int aCoverID, FluidFilterData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { if (aFluid == null) return true; int aFilterMode = aCoverVariable.mFilterMode; int aFilterFluid = aCoverVariable.mFluidID; - if (aFilterMode == DENY_INPUT_FILTER_OUTPUT || aFilterMode == DENY_INPUT_INVERT_OUTPUT) - return false; - else if (aFilterMode == ANY_INPUT_FILTER_OUTPUT || aFilterMode == ANY_INPUT_INVERT_OUTPUT) - return true; + if (aFilterMode == DENY_INPUT_FILTER_OUTPUT || aFilterMode == DENY_INPUT_INVERT_OUTPUT) return false; + else if (aFilterMode == ANY_INPUT_FILTER_OUTPUT || aFilterMode == ANY_INPUT_INVERT_OUTPUT) return true; else if (aFluid.getID() == aFilterFluid) return aFilterMode == FILTER_INPUT_DENY_OUTPUT || aFilterMode == FILTER_INPUT_ANY_OUTPUT; - else - return aFilterMode == INVERT_INPUT_DENY_OUTPUT || aFilterMode == INVERT_INPUT_ANY_OUTPUT; + else return aFilterMode == INVERT_INPUT_DENY_OUTPUT || aFilterMode == INVERT_INPUT_ANY_OUTPUT; } @Override - protected boolean letsFluidOutImpl(byte aSide, int aCoverID, FluidFilterData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + protected boolean letsFluidOutImpl( + byte aSide, int aCoverID, FluidFilterData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { if (aFluid == null) return true; int aFilterMode = aCoverVariable.mFilterMode; int aFilterFluid = aCoverVariable.mFluidID; - if (aFilterMode == FILTER_INPUT_DENY_OUTPUT || aFilterMode == INVERT_INPUT_DENY_OUTPUT) - return false; - else if (aFilterMode == FILTER_INPUT_ANY_OUTPUT || aFilterMode == INVERT_INPUT_ANY_OUTPUT) - return true; + if (aFilterMode == FILTER_INPUT_DENY_OUTPUT || aFilterMode == INVERT_INPUT_DENY_OUTPUT) return false; + else if (aFilterMode == FILTER_INPUT_ANY_OUTPUT || aFilterMode == INVERT_INPUT_ANY_OUTPUT) return true; else if (aFluid.getID() == aFilterFluid) return aFilterMode == DENY_INPUT_FILTER_OUTPUT || aFilterMode == ANY_INPUT_FILTER_OUTPUT; - else - return aFilterMode == DENY_INPUT_INVERT_OUTPUT || aFilterMode == ANY_INPUT_INVERT_OUTPUT; + else return aFilterMode == DENY_INPUT_INVERT_OUTPUT || aFilterMode == ANY_INPUT_INVERT_OUTPUT; } @Override - protected boolean alwaysLookConnectedImpl(byte aSide, int aCoverID, FluidFilterData aCoverVariable, ICoverable aTileEntity) { + protected boolean alwaysLookConnectedImpl( + byte aSide, int aCoverID, FluidFilterData aCoverVariable, ICoverable aTileEntity) { return true; } @@ -181,14 +200,19 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehaviorBase<GT_Cover_Fluidfil /** * GUI Stuff */ - @Override public boolean hasCoverGUI() { return true; } @Override - protected Object getClientGUIImpl(byte aSide, int aCoverID, FluidFilterData coverData, ICoverable aTileEntity, EntityPlayer aPlayer, World aWorld) { + protected Object getClientGUIImpl( + byte aSide, + int aCoverID, + FluidFilterData coverData, + ICoverable aTileEntity, + EntityPlayer aPlayer, + World aWorld) { return new GT_FluidFilterGUICover(aSide, aCoverID, coverData, aTileEntity); } @@ -204,25 +228,32 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehaviorBase<GT_Cover_Fluidfil private static final int spaceX = 18; private static final int spaceY = 18; - private final int - textColor = this.getTextColorOrDefault("text", 0xFF555555), - textColorTitle = this.getTextColorOrDefault("title", 0xFF222222); + private final int textColor = this.getTextColorOrDefault("text", 0xFF555555), + textColorTitle = this.getTextColorOrDefault("title", 0xFF222222); - public GT_FluidFilterGUICover(byte aSide, int aCoverID, FluidFilterData aCoverVariable, ICoverable aTileEntity) { + public GT_FluidFilterGUICover( + byte aSide, int aCoverID, FluidFilterData aCoverVariable, ICoverable aTileEntity) { super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID)); this.side = aSide; this.coverID = aCoverID; this.coverVariable = aCoverVariable; GT_GuiIconButton b; - b = new GT_GuiIconButton(this, 0, startX + spaceX*0, startY+spaceY*0, GT_GuiIcon.IMPORT).setTooltipText(GT_Utility.trans("232", "Filter Input")); - b = new GT_GuiIconButton(this, 1, startX + spaceX*1, startY+spaceY*0, GT_GuiIcon.EXPORT).setTooltipText(GT_Utility.trans("233", "Filter Output")); - b = new GT_GuiIconButton(this, 2, startX + spaceX*0, startY+spaceY*2, GT_GuiIcon.BLOCK_INPUT).setTooltipText(GT_Utility.trans("234", "Block Output")); - b = new GT_GuiIconButton(this, 3, startX + spaceX*1, startY+spaceY*2, GT_GuiIcon.ALLOW_INPUT).setTooltipText(GT_Utility.trans("235", "Allow Output")); - b = new GT_GuiIconButton(this, 4, startX + spaceX*0, startY+spaceY*1, GT_GuiIcon.WHITELIST).setTooltipText(GT_Utility.trans("236", "Whitelist Fluid")); - b = new GT_GuiIconButton(this, 5, startX + spaceX*1, startY+spaceY*1, GT_GuiIcon.BLACKLIST).setTooltipText(GT_Utility.trans("237", "Blacklist Fluid")); - - fluidFilterButton = new GT_GuiFakeItemButton(this, startX, startY + spaceY * 3 + 2, GT_GuiIcon.SLOT_DARKGRAY); + b = new GT_GuiIconButton(this, 0, startX + spaceX * 0, startY + spaceY * 0, GT_GuiIcon.IMPORT) + .setTooltipText(GT_Utility.trans("232", "Filter Input")); + b = new GT_GuiIconButton(this, 1, startX + spaceX * 1, startY + spaceY * 0, GT_GuiIcon.EXPORT) + .setTooltipText(GT_Utility.trans("233", "Filter Output")); + b = new GT_GuiIconButton(this, 2, startX + spaceX * 0, startY + spaceY * 2, GT_GuiIcon.BLOCK_INPUT) + .setTooltipText(GT_Utility.trans("234", "Block Output")); + b = new GT_GuiIconButton(this, 3, startX + spaceX * 1, startY + spaceY * 2, GT_GuiIcon.ALLOW_INPUT) + .setTooltipText(GT_Utility.trans("235", "Allow Output")); + b = new GT_GuiIconButton(this, 4, startX + spaceX * 0, startY + spaceY * 1, GT_GuiIcon.WHITELIST) + .setTooltipText(GT_Utility.trans("236", "Whitelist Fluid")); + b = new GT_GuiIconButton(this, 5, startX + spaceX * 1, startY + spaceY * 1, GT_GuiIcon.BLACKLIST) + .setTooltipText(GT_Utility.trans("237", "Blacklist Fluid")); + + fluidFilterButton = + new GT_GuiFakeItemButton(this, startX, startY + spaceY * 3 + 2, GT_GuiIcon.SLOT_DARKGRAY); fluidFilterButton.setMimicSlot(true); } @@ -259,14 +290,20 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehaviorBase<GT_Cover_Fluidfil return false; } - @Override public void drawExtras(int mouseX, int mouseY, float parTicks) { super.drawExtras(mouseX, mouseY, parTicks); - this.fontRendererObj.drawString(GT_Utility.trans("238", "Filter Direction"), startX + spaceX*2, 3+startY+spaceY*0, textColor); - this.fontRendererObj.drawString(GT_Utility.trans("239", "Filter Type"), startX + spaceX*2, 3+startY+spaceY*1, textColor); - this.fontRendererObj.drawString(GT_Utility.trans("240", "Block Flow"), startX + spaceX*2, 3+startY+spaceY*2, textColor); - this.fontRendererObj.drawSplitString(fluidFilterName, startX + spaceX+3, 4+startY+spaceY*3, gui_width-40 , textColorTitle); + this.fontRendererObj.drawString( + GT_Utility.trans("238", "Filter Direction"), + startX + spaceX * 2, + 3 + startY + spaceY * 0, + textColor); + this.fontRendererObj.drawString( + GT_Utility.trans("239", "Filter Type"), startX + spaceX * 2, 3 + startY + spaceY * 1, textColor); + this.fontRendererObj.drawString( + GT_Utility.trans("240", "Block Flow"), startX + spaceX * 2, 3 + startY + spaceY * 2, textColor); + this.fontRendererObj.drawSplitString( + fluidFilterName, startX + spaceX + 3, 4 + startY + spaceY * 3, gui_width - 40, textColorTitle); } @Override @@ -289,16 +326,12 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehaviorBase<GT_Cover_Fluidfil if (o instanceof GT_GuiIconButton) { b = (GT_GuiIconButton) o; b.enabled = getClickable(b.id); - if (getClickable(1)) { //filtering input - if (b.id == 2) - b.setTooltipText(GT_Utility.trans("311", "Block Output")); - else if (b.id == 3) - b.setTooltipText(GT_Utility.trans("312", "Allow Output")); + if (getClickable(1)) { // filtering input + if (b.id == 2) b.setTooltipText(GT_Utility.trans("311", "Block Output")); + else if (b.id == 3) b.setTooltipText(GT_Utility.trans("312", "Allow Output")); } else { - if (b.id == 2) - b.setTooltipText(GT_Utility.trans("313", "Block Input")); - else if (b.id == 3) - b.setTooltipText(GT_Utility.trans("314", "Allow Input")); + if (b.id == 2) b.setTooltipText(GT_Utility.trans("313", "Block Input")); + else if (b.id == 3) b.setTooltipText(GT_Utility.trans("314", "Allow Input")); } } } @@ -353,8 +386,7 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehaviorBase<GT_Cover_Fluidfil mFilterMode = tNBT.getInteger("mFilterMode"); if (tNBT.hasKey("mFluid", NBT.TAG_STRING)) mFluidID = FluidRegistry.getFluidID(tNBT.getString("mFluid")); - else - mFluidID = -1; + else mFluidID = -1; } } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java b/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java index f6b37316b2..b50cdb7194 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java @@ -1,5 +1,8 @@ package gregtech.common.covers; +import static gregtech.api.util.GT_Utility.intToStack; +import static gregtech.api.util.GT_Utility.moveMultipleItemStacks; + import com.google.common.io.ByteArrayDataInput; import cpw.mods.fml.common.network.ByteBufUtils; import gregtech.api.enums.GT_Values; @@ -13,6 +16,9 @@ import gregtech.api.util.GT_CoverBehaviorBase; import gregtech.api.util.GT_Utility; import gregtech.api.util.ISerializableObject; import io.netty.buffer.ByteBuf; +import java.util.Collections; +import java.util.List; +import javax.annotation.Nonnull; import net.minecraft.client.gui.GuiButton; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -24,13 +30,6 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; import net.minecraftforge.fluids.Fluid; -import javax.annotation.Nonnull; -import java.util.Collections; -import java.util.List; - -import static gregtech.api.util.GT_Utility.intToStack; -import static gregtech.api.util.GT_Utility.moveMultipleItemStacks; - public class GT_Cover_ItemFilter extends GT_CoverBehaviorBase<GT_Cover_ItemFilter.ItemFilterData> { private final boolean mExport; @@ -51,27 +50,52 @@ public class GT_Cover_ItemFilter extends GT_CoverBehaviorBase<GT_Cover_ItemFilte } @Override - protected boolean isRedstoneSensitiveImpl(byte aSide, int aCoverID, ItemFilterData aCoverVariable, ICoverable aTileEntity, long aTimer) { + protected boolean isRedstoneSensitiveImpl( + byte aSide, int aCoverID, ItemFilterData aCoverVariable, ICoverable aTileEntity, long aTimer) { return false; } @Override - protected ItemFilterData doCoverThingsImpl(byte aSide, byte aInputRedstone, int aCoverID, ItemFilterData aCoverVariable, ICoverable aTileEntity, long aTimer) { + protected ItemFilterData doCoverThingsImpl( + byte aSide, + byte aInputRedstone, + int aCoverID, + ItemFilterData aCoverVariable, + ICoverable aTileEntity, + long aTimer) { TileEntity tTileEntity = aTileEntity.getTileEntityAtSide(aSide); - Object fromEntity = mExport ? aTileEntity : tTileEntity, - toEntity = !mExport ? aTileEntity : tTileEntity; + Object fromEntity = mExport ? aTileEntity : tTileEntity, toEntity = !mExport ? aTileEntity : tTileEntity; byte fromSide = !mExport ? GT_Utility.getOppositeSide(aSide) : aSide, toSide = mExport ? GT_Utility.getOppositeSide(aSide) : aSide; List<ItemStack> Filter = Collections.singletonList(aCoverVariable.mFilter); - moveMultipleItemStacks(fromEntity, toEntity, fromSide, toSide, Filter, aCoverVariable.mWhitelist, (byte) 64, (byte) 1, (byte) 64, (byte) 1, 64); + moveMultipleItemStacks( + fromEntity, + toEntity, + fromSide, + toSide, + Filter, + aCoverVariable.mWhitelist, + (byte) 64, + (byte) 1, + (byte) 64, + (byte) 1, + 64); return aCoverVariable; } @Override - protected boolean onCoverRightClickImpl(byte aSide, int aCoverID, ItemFilterData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + protected boolean onCoverRightClickImpl( + byte aSide, + int aCoverID, + ItemFilterData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { ItemStack tStack = aPlayer.inventory.getCurrentItem(); if (tStack != null) { aCoverVariable.mFilter = tStack; @@ -84,54 +108,75 @@ public class GT_Cover_ItemFilter extends GT_CoverBehaviorBase<GT_Cover_ItemFilte } @Override - protected ItemFilterData onCoverScrewdriverClickImpl(byte aSide, int aCoverID, ItemFilterData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + protected ItemFilterData onCoverScrewdriverClickImpl( + byte aSide, + int aCoverID, + ItemFilterData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { aCoverVariable.mWhitelist = !aCoverVariable.mWhitelist; - GT_Utility.sendChatToPlayer(aPlayer, aCoverVariable.mWhitelist ? GT_Utility.trans("125", "Whitelist Mode") : GT_Utility.trans("124", "Blacklist Mode")); + GT_Utility.sendChatToPlayer( + aPlayer, + aCoverVariable.mWhitelist + ? GT_Utility.trans("125", "Whitelist Mode") + : GT_Utility.trans("124", "Blacklist Mode")); return aCoverVariable; } @Override - protected boolean letsRedstoneGoInImpl(byte aSide, int aCoverID, ItemFilterData aCoverVariable, ICoverable aTileEntity) { + protected boolean letsRedstoneGoInImpl( + byte aSide, int aCoverID, ItemFilterData aCoverVariable, ICoverable aTileEntity) { return true; } @Override - protected boolean letsRedstoneGoOutImpl(byte aSide, int aCoverID, ItemFilterData aCoverVariable, ICoverable aTileEntity) { + protected boolean letsRedstoneGoOutImpl( + byte aSide, int aCoverID, ItemFilterData aCoverVariable, ICoverable aTileEntity) { return true; } @Override - protected boolean letsEnergyInImpl(byte aSide, int aCoverID, ItemFilterData aCoverVariable, ICoverable aTileEntity) { + protected boolean letsEnergyInImpl( + byte aSide, int aCoverID, ItemFilterData aCoverVariable, ICoverable aTileEntity) { return true; } @Override - protected boolean letsEnergyOutImpl(byte aSide, int aCoverID, ItemFilterData aCoverVariable, ICoverable aTileEntity) { + protected boolean letsEnergyOutImpl( + byte aSide, int aCoverID, ItemFilterData aCoverVariable, ICoverable aTileEntity) { return true; } @Override - protected boolean letsFluidInImpl(byte aSide, int aCoverID, ItemFilterData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + protected boolean letsFluidInImpl( + byte aSide, int aCoverID, ItemFilterData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return false; } @Override - protected boolean letsFluidOutImpl(byte aSide, int aCoverID, ItemFilterData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + protected boolean letsFluidOutImpl( + byte aSide, int aCoverID, ItemFilterData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return false; } @Override - protected boolean letsItemsInImpl(byte aSide, int aCoverID, ItemFilterData aCoverVariable, int aSlot, ICoverable aTileEntity) { + protected boolean letsItemsInImpl( + byte aSide, int aCoverID, ItemFilterData aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } @Override - protected boolean letsItemsOutImpl(byte aSide, int aCoverID, ItemFilterData aCoverVariable, int aSlot, ICoverable aTileEntity) { + protected boolean letsItemsOutImpl( + byte aSide, int aCoverID, ItemFilterData aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } @Override - protected boolean alwaysLookConnectedImpl(byte aSide, int aCoverID, ItemFilterData aCoverVariable, ICoverable aTileEntity) { + protected boolean alwaysLookConnectedImpl( + byte aSide, int aCoverID, ItemFilterData aCoverVariable, ICoverable aTileEntity) { return true; } @@ -143,14 +188,19 @@ public class GT_Cover_ItemFilter extends GT_CoverBehaviorBase<GT_Cover_ItemFilte /** * GUI Stuff */ - @Override public boolean hasCoverGUI() { return true; } @Override - protected Object getClientGUIImpl(byte aSide, int aCoverID, ItemFilterData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, World aWorld) { + protected Object getClientGUIImpl( + byte aSide, + int aCoverID, + ItemFilterData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + World aWorld) { return new GT_Cover_ItemFilter.GUI(aSide, aCoverID, aCoverVariable, aTileEntity); } @@ -158,8 +208,7 @@ public class GT_Cover_ItemFilter extends GT_CoverBehaviorBase<GT_Cover_ItemFilte private boolean mWhitelist; private ItemStack mFilter; - public ItemFilterData() { - } + public ItemFilterData() {} public ItemFilterData(boolean mWhitelist, ItemStack mFilter) { this.mWhitelist = mWhitelist; @@ -177,8 +226,7 @@ public class GT_Cover_ItemFilter extends GT_CoverBehaviorBase<GT_Cover_ItemFilte public NBTBase saveDataToNBT() { NBTTagCompound tag = new NBTTagCompound(); tag.setBoolean("mWhitelist", mWhitelist); - if (mFilter != null) - tag.setTag("mFilter", mFilter.writeToNBT(new NBTTagCompound())); + if (mFilter != null) tag.setTag("mFilter", mFilter.writeToNBT(new NBTTagCompound())); return tag; } @@ -194,8 +242,7 @@ public class GT_Cover_ItemFilter extends GT_CoverBehaviorBase<GT_Cover_ItemFilte mWhitelist = tag.getBoolean("mWhitelist"); if (tag.hasKey("mFilter", Constants.NBT.TAG_COMPOUND)) mFilter = ItemStack.loadItemStackFromNBT(tag.getCompoundTag("mFilter")); - else - mFilter = null; + else mFilter = null; } @Nonnull @@ -227,17 +274,28 @@ public class GT_Cover_ItemFilter extends GT_CoverBehaviorBase<GT_Cover_ItemFilte this.coverID = aCoverID; this.coverVariable = aCoverVariable; - btnMode = new GT_GuiIconCheckButton(this, 0, startX + spaceX * 0, startY + spaceY * 0, GT_GuiIcon.WHITELIST, GT_GuiIcon.BLACKLIST, GT_Utility.trans("125", "Whitelist Mode"), GT_Utility.trans("124", "Blacklist Mode")); - - itemFilterButtons = new GT_GuiFakeItemButton(this, startX + spaceX * 0, startY + spaceY * 2, GT_GuiIcon.SLOT_GRAY); + btnMode = new GT_GuiIconCheckButton( + this, + 0, + startX + spaceX * 0, + startY + spaceY * 0, + GT_GuiIcon.WHITELIST, + GT_GuiIcon.BLACKLIST, + GT_Utility.trans("125", "Whitelist Mode"), + GT_Utility.trans("124", "Blacklist Mode")); + + itemFilterButtons = + new GT_GuiFakeItemButton(this, startX + spaceX * 0, startY + spaceY * 2, GT_GuiIcon.SLOT_GRAY); itemFilterButtons.setMimicSlot(true); } @Override public void drawExtras(int mouseX, int mouseY, float parTicks) { super.drawExtras(mouseX, mouseY, parTicks); - this.fontRendererObj.drawString(GT_Utility.trans("317", "Filter: "), startX + spaceX*0, 3+startY+spaceY*1, textColor); - this.fontRendererObj.drawString(GT_Utility.trans("318", "Check Mode"), startX + spaceX*2, 3+startY+spaceY*0, textColor); + this.fontRendererObj.drawString( + GT_Utility.trans("317", "Filter: "), startX + spaceX * 0, 3 + startY + spaceY * 1, textColor); + this.fontRendererObj.drawString( + GT_Utility.trans("318", "Check Mode"), startX + spaceX * 2, 3 + startY + spaceY * 0, textColor); } @Override diff --git a/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java b/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java index 846e115bd8..4b66c2eaab 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java @@ -1,7 +1,6 @@ package gregtech.common.covers; import com.google.common.io.ByteArrayDataInput; - import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.gui.GT_GUICover; @@ -19,6 +18,7 @@ import gregtech.api.util.ISerializableObject; import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_OutputBus_ME; import gregtech.common.tileentities.storage.GT_MetaTileEntity_DigitalChestBase; import io.netty.buffer.ByteBuf; +import javax.annotation.Nonnull; import net.minecraft.client.gui.GuiButton; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -29,8 +29,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.fluids.Fluid; -import javax.annotation.Nonnull; - public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter.ItemMeterData> { // Legacy data format @@ -44,14 +42,11 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter. @Override public ItemMeterData createDataObject(int aLegacyData) { - //Convert from ver. 5.09.33.50 + // Convert from ver. 5.09.33.50 if ((CONVERTED_BIT & aLegacyData) == 0) - if (aLegacyData == 0) - aLegacyData = CONVERTED_BIT; - else if (aLegacyData == 1) - aLegacyData = CONVERTED_BIT | INVERT_BIT; - else if (aLegacyData > 1) - aLegacyData = CONVERTED_BIT | Math.min((aLegacyData - 2), SLOT_MASK); + if (aLegacyData == 0) aLegacyData = CONVERTED_BIT; + else if (aLegacyData == 1) aLegacyData = CONVERTED_BIT | INVERT_BIT; + else if (aLegacyData > 1) aLegacyData = CONVERTED_BIT | Math.min((aLegacyData - 2), SLOT_MASK); boolean invert = (aLegacyData & INVERT_BIT) == INVERT_BIT; int slot = (aLegacyData & SLOT_MASK) - 1; @@ -65,12 +60,19 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter. } @Override - protected boolean isRedstoneSensitiveImpl(byte aSide, int aCoverID, ItemMeterData aCoverVariable, ICoverable aTileEntity, long aTimer) { + protected boolean isRedstoneSensitiveImpl( + byte aSide, int aCoverID, ItemMeterData aCoverVariable, ICoverable aTileEntity, long aTimer) { return false; } @Override - protected ItemMeterData doCoverThingsImpl(byte aSide, byte aInputRedstone, int aCoverID, ItemMeterData aCoverVariable, ICoverable aTileEntity, long aTimer) { + protected ItemMeterData doCoverThingsImpl( + byte aSide, + byte aInputRedstone, + int aCoverID, + ItemMeterData aCoverVariable, + ICoverable aTileEntity, + long aTimer) { long tMax = 0; long tUsed = 0; IMetaTileEntity mte = ((IGregTechTileEntity) aTileEntity).getMetaTileEntity(); @@ -78,24 +80,22 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter. GT_MetaTileEntity_DigitalChestBase dc = (GT_MetaTileEntity_DigitalChestBase) mte; tMax = dc.getMaxItemCount(); // currently it is limited by int, but there is not much reason for that ItemStack[] inv = dc.getStoredItemData(); - if (inv != null && inv.length > 1 && inv[1] != null) - tUsed = inv[1].stackSize; + if (inv != null && inv.length > 1 && inv[1] != null) tUsed = inv[1].stackSize; } else if (GregTech_API.mAE2 && mte instanceof GT_MetaTileEntity_Hatch_OutputBus_ME) { if (((GT_MetaTileEntity_Hatch_OutputBus_ME) mte).isLastOutputFailed()) { tMax = 64; tUsed = 64; } } else { - int[] tSlots = aCoverVariable.slot >= 0 ? - new int[]{aCoverVariable.slot} : - aTileEntity.getAccessibleSlotsFromSide(aSide); + int[] tSlots = aCoverVariable.slot >= 0 + ? new int[] {aCoverVariable.slot} + : aTileEntity.getAccessibleSlotsFromSide(aSide); for (int i : tSlots) { if (i >= 0 && i < aTileEntity.getSizeInventory()) { tMax += 64; ItemStack tStack = aTileEntity.getStackInSlot(i); - if (tStack != null) - tUsed += (tStack.stackSize << 6) / tStack.getMaxStackSize(); + if (tStack != null) tUsed += (tStack.stackSize << 6) / tStack.getMaxStackSize(); } } } @@ -129,25 +129,31 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter. } @Override - protected ItemMeterData onCoverScrewdriverClickImpl(byte aSide, int aCoverID, ItemMeterData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + protected ItemMeterData onCoverScrewdriverClickImpl( + byte aSide, + int aCoverID, + ItemMeterData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { if (aPlayer.isSneaking()) { if (aCoverVariable.inverted) { aCoverVariable.inverted = false; - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("055", "Normal")); - } - else { + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("055", "Normal")); + } else { aCoverVariable.inverted = true; - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("054", "Inverted")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("054", "Inverted")); } } else { aCoverVariable.slot++; - if (aCoverVariable.slot > aTileEntity.getSizeInventory()) - aCoverVariable.slot = -1; + if (aCoverVariable.slot > aTileEntity.getSizeInventory()) aCoverVariable.slot = -1; if (aCoverVariable.slot == -1) - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("053", "Slot: ") + GT_Utility.trans("ALL", "All")); - else - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("053", "Slot: ") + aCoverVariable.slot); + GT_Utility.sendChatToPlayer( + aPlayer, GT_Utility.trans("053", "Slot: ") + GT_Utility.trans("ALL", "All")); + else GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("053", "Slot: ") + aCoverVariable.slot); } return aCoverVariable; @@ -159,32 +165,38 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter. } @Override - protected boolean letsEnergyOutImpl(byte aSide, int aCoverID, ItemMeterData aCoverVariable, ICoverable aTileEntity) { + protected boolean letsEnergyOutImpl( + byte aSide, int aCoverID, ItemMeterData aCoverVariable, ICoverable aTileEntity) { return true; } @Override - protected boolean letsFluidInImpl(byte aSide, int aCoverID, ItemMeterData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + protected boolean letsFluidInImpl( + byte aSide, int aCoverID, ItemMeterData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } @Override - protected boolean letsFluidOutImpl(byte aSide, int aCoverID, ItemMeterData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + protected boolean letsFluidOutImpl( + byte aSide, int aCoverID, ItemMeterData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } @Override - protected boolean letsItemsInImpl(byte aSide, int aCoverID, ItemMeterData aCoverVariable, int aSlot, ICoverable aTileEntity) { + protected boolean letsItemsInImpl( + byte aSide, int aCoverID, ItemMeterData aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } @Override - protected boolean letsItemsOutImpl(byte aSide, int aCoverID, ItemMeterData aCoverVariable, int aSlot, ICoverable aTileEntity) { + protected boolean letsItemsOutImpl( + byte aSide, int aCoverID, ItemMeterData aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } @Override - protected boolean manipulatesSidedRedstoneOutputImpl(byte aSide, int aCoverID, ItemMeterData aCoverVariable, ICoverable aTileEntity) { + protected boolean manipulatesSidedRedstoneOutputImpl( + byte aSide, int aCoverID, ItemMeterData aCoverVariable, ICoverable aTileEntity) { return true; } @@ -196,14 +208,19 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter. /** * GUI Stuff */ - @Override public boolean hasCoverGUI() { return true; } @Override - protected Object getClientGUIImpl(byte aSide, int aCoverID, ItemMeterData coverData, ICoverable aTileEntity, EntityPlayer aPlayer, World aWorld) { + protected Object getClientGUIImpl( + byte aSide, + int aCoverID, + ItemMeterData coverData, + ICoverable aTileEntity, + EntityPlayer aPlayer, + World aWorld) { return new GUI(aSide, aCoverID, coverData, aTileEntity); } @@ -284,31 +301,35 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter. private static final int spaceY = 18; private final String ALL = GT_Utility.trans("ALL", "All"); - private final String INVERTED = GT_Utility.trans("INVERTED", "Inverted"); - private final String NORMAL = GT_Utility.trans("NORMAL", "Normal"); + private final String INVERTED = GT_Utility.trans("INVERTED", "Inverted"); + private final String NORMAL = GT_Utility.trans("NORMAL", "Normal"); private final int textColor = this.getTextColorOrDefault("text", 0xFF555555); - public GUI(byte aSide, int aCoverID, ItemMeterData aCoverVariable, ICoverable aTileEntity) { + public GUI(byte aSide, int aCoverID, ItemMeterData aCoverVariable, ICoverable aTileEntity) { super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID)); this.side = aSide; this.coverID = aCoverID; this.coverVariable = aCoverVariable; - invertedButton = new GT_GuiIconCheckButton(this, 0, startX, startY, GT_GuiIcon.REDSTONE_ON, GT_GuiIcon.REDSTONE_OFF, INVERTED, NORMAL); + invertedButton = new GT_GuiIconCheckButton( + this, 0, startX, startY, GT_GuiIcon.REDSTONE_ON, GT_GuiIcon.REDSTONE_OFF, INVERTED, NORMAL); intSlot = new GT_GuiIntegerTextBox(this, 1, startX, startY + spaceY + 2, spaceX * 2 + 5, 12); intSlot.setMaxStringLength(6); - //only shows if opened gui of block sadly, should've used container. - intSlotIcon = new GT_GuiFakeItemButton(this, startX + spaceX * 8 - 4, startY + spaceY, GT_GuiIcon.SLOT_GRAY); + // only shows if opened gui of block sadly, should've used container. + intSlotIcon = + new GT_GuiFakeItemButton(this, startX + spaceX * 8 - 4, startY + spaceY, GT_GuiIcon.SLOT_GRAY); intSlotIcon.setMimicSlot(true); - if (tile instanceof TileEntity && !super.tile.isDead() && tile instanceof IGregTechTileEntity - && !(((IGregTechTileEntity) tile).getMetaTileEntity() instanceof GT_MetaTileEntity_DigitalChestBase)) - maxSlot = Math.min(tile.getSizeInventory() - 1, SLOT_MASK-1); - else - maxSlot = -1; + if (tile instanceof TileEntity + && !super.tile.isDead() + && tile instanceof IGregTechTileEntity + && !(((IGregTechTileEntity) tile).getMetaTileEntity() + instanceof GT_MetaTileEntity_DigitalChestBase)) + maxSlot = Math.min(tile.getSizeInventory() - 1, SLOT_MASK - 1); + else maxSlot = -1; intSlot.setEnabled(maxSlot >= 0); @@ -319,16 +340,26 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter. @Override public void drawExtras(int mouseX, int mouseY, float parTicks) { super.drawExtras(mouseX, mouseY, parTicks); - this.getFontRenderer().drawString(coverVariable.inverted ? INVERTED : NORMAL, startX + spaceX * 3, 4 + startY, textColor); - this.getFontRenderer().drawString(GT_Utility.trans("254", "Detect slot#"), startX + spaceX * 3, 4 + startY + spaceY, textColor); - this.getFontRenderer().drawString(GT_Utility.trans("221", "Item threshold"), startX + spaceX * 3, startY + spaceY * 2 + 4, textColor); + this.getFontRenderer() + .drawString(coverVariable.inverted ? INVERTED : NORMAL, startX + spaceX * 3, 4 + startY, textColor); + this.getFontRenderer() + .drawString( + GT_Utility.trans("254", "Detect slot#"), + startX + spaceX * 3, + 4 + startY + spaceY, + textColor); + this.getFontRenderer() + .drawString( + GT_Utility.trans("221", "Item threshold"), + startX + spaceX * 3, + startY + spaceY * 2 + 4, + textColor); } @Override protected void onInitGui(int guiLeft, int guiTop, int gui_width, int gui_height) { update(); - if (intSlot.isEnabled()) - intSlot.setFocused(true); + if (intSlot.isEnabled()) intSlot.setFocused(true); } @Override @@ -345,15 +376,12 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter. step = (isShiftKeyDown() ? 50 : isCtrlKeyDown() ? 5 : 1) * (delta > 0 ? step : -step); int val = parseTextBox(intSlot); - if (val < 0) - val = -1; + if (val < 0) val = -1; val = val + step; - if (val < 0) - val = -1; - else if (val > maxSlot) - val = maxSlot; + if (val < 0) val = -1; + else if (val > maxSlot) val = maxSlot; intSlot.setText(val < 0 ? ALL : Integer.toString(val)); } else if (thresholdSlot.isFocused()) { @@ -417,14 +445,11 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter. private int parseTextBox(GT_GuiIntegerTextBox box) { if (box == intSlot) { String text = box.getText(); - if (text == null) - return -1; + if (text == null) return -1; text = text.trim(); - if (text.startsWith(ALL)) - text = text.substring(ALL.length()); + if (text.startsWith(ALL)) text = text.substring(ALL.length()); - if (text.isEmpty()) - return -1; + if (text.isEmpty()) return -1; int val; try { @@ -433,10 +458,8 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter. return -1; } - if (val < 0) - return -1; - else if (maxSlot < val) - return maxSlot; + if (val < 0) return -1; + else if (maxSlot < val) return maxSlot; return val; } else if (box == thresholdSlot) { String text = box.getText(); diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Lens.java b/src/main/java/gregtech/common/covers/GT_Cover_Lens.java index 37405e6fa8..735959e15c 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Lens.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Lens.java @@ -11,7 +11,8 @@ public class GT_Cover_Lens extends GT_CoverBehavior { } @Override - public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public boolean isRedstoneSensitive( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { return false; } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java b/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java index 3d5074a686..55cca29704 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java @@ -12,6 +12,8 @@ import gregtech.api.util.GT_CoverBehaviorBase; import gregtech.api.util.GT_Utility; import gregtech.api.util.ISerializableObject; import io.netty.buffer.ByteBuf; +import java.util.Arrays; +import javax.annotation.Nonnull; import net.minecraft.client.gui.GuiButton; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -24,9 +26,6 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; -import javax.annotation.Nonnull; -import java.util.Arrays; - public class GT_Cover_LiquidMeter extends GT_CoverBehaviorBase<GT_Cover_LiquidMeter.LiquidMeterData> { public GT_Cover_LiquidMeter() { @@ -44,12 +43,19 @@ public class GT_Cover_LiquidMeter extends GT_CoverBehaviorBase<GT_Cover_LiquidMe } @Override - protected boolean isRedstoneSensitiveImpl(byte aSide, int aCoverID, LiquidMeterData aCoverVariable, ICoverable aTileEntity, long aTimer) { + protected boolean isRedstoneSensitiveImpl( + byte aSide, int aCoverID, LiquidMeterData aCoverVariable, ICoverable aTileEntity, long aTimer) { return false; } @Override - protected LiquidMeterData doCoverThingsImpl(byte aSide, byte aInputRedstone, int aCoverID, LiquidMeterData aCoverVariable, ICoverable aTileEntity, long aTimer) { + protected LiquidMeterData doCoverThingsImpl( + byte aSide, + byte aInputRedstone, + int aCoverID, + LiquidMeterData aCoverVariable, + ICoverable aTileEntity, + long aTimer) { if ((aTileEntity instanceof IFluidHandler)) { FluidTankInfo[] tTanks = ((IFluidHandler) aTileEntity).getTankInfo(ForgeDirection.UNKNOWN); long tMax = 0; @@ -92,13 +98,21 @@ public class GT_Cover_LiquidMeter extends GT_CoverBehaviorBase<GT_Cover_LiquidMe aTileEntity.setOutputRedstoneSignal(aSide, (byte) redstoneSignal); } else { - aTileEntity.setOutputRedstoneSignal(aSide, (byte)0); + aTileEntity.setOutputRedstoneSignal(aSide, (byte) 0); } return aCoverVariable; } @Override - protected LiquidMeterData onCoverScrewdriverClickImpl(byte aSide, int aCoverID, LiquidMeterData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + protected LiquidMeterData onCoverScrewdriverClickImpl( + byte aSide, + int aCoverID, + LiquidMeterData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { if (aCoverVariable.inverted) { aCoverVariable.inverted = false; GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("055", "Normal")); @@ -110,37 +124,44 @@ public class GT_Cover_LiquidMeter extends GT_CoverBehaviorBase<GT_Cover_LiquidMe } @Override - protected boolean letsEnergyInImpl(byte aSide, int aCoverID, LiquidMeterData aCoverVariable, ICoverable aTileEntity) { + protected boolean letsEnergyInImpl( + byte aSide, int aCoverID, LiquidMeterData aCoverVariable, ICoverable aTileEntity) { return true; } @Override - protected boolean letsEnergyOutImpl(byte aSide, int aCoverID, LiquidMeterData aCoverVariable, ICoverable aTileEntity) { + protected boolean letsEnergyOutImpl( + byte aSide, int aCoverID, LiquidMeterData aCoverVariable, ICoverable aTileEntity) { return true; } @Override - protected boolean letsFluidInImpl(byte aSide, int aCoverID, LiquidMeterData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + protected boolean letsFluidInImpl( + byte aSide, int aCoverID, LiquidMeterData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } @Override - protected boolean letsFluidOutImpl(byte aSide, int aCoverID, LiquidMeterData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + protected boolean letsFluidOutImpl( + byte aSide, int aCoverID, LiquidMeterData aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return true; } @Override - protected boolean letsItemsInImpl(byte aSide, int aCoverID, LiquidMeterData aCoverVariable, int aSlot, ICoverable aTileEntity) { + protected boolean letsItemsInImpl( + byte aSide, int aCoverID, LiquidMeterData aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } @Override - protected boolean letsItemsOutImpl(byte aSide, int aCoverID, LiquidMeterData aCoverVariable, int aSlot, ICoverable aTileEntity) { + protected boolean letsItemsOutImpl( + byte aSide, int aCoverID, LiquidMeterData aCoverVariable, int aSlot, ICoverable aTileEntity) { return true; } @Override - protected boolean manipulatesSidedRedstoneOutputImpl(byte aSide, int aCoverID, LiquidMeterData aCoverVariable, ICoverable aTileEntity) { + protected boolean manipulatesSidedRedstoneOutputImpl( + byte aSide, int aCoverID, LiquidMeterData aCoverVariable, ICoverable aTileEntity) { return true; } @@ -151,14 +172,19 @@ public class GT_Cover_LiquidMeter extends GT_CoverBehaviorBase<GT_Cover_LiquidMe /** * GUI Stuff */ - @Override public boolean hasCoverGUI() { return true; } @Override - public Object getClientGUIImpl(byte aSide, int aCoverID, LiquidMeterData coverData, ICoverable aTileEntity, EntityPlayer aPlayer, World aWorld) { + public Object getClientGUIImpl( + byte aSide, + int aCoverID, + LiquidMeterData coverData, + ICoverable aTileEntity, + EntityPlayer aPlayer, + World aWorld) { return new GUI(aSide, aCoverID, coverData, aTileEntity); } @@ -239,15 +265,22 @@ public class GT_Cover_LiquidMeter extends GT_CoverBehaviorBase<GT_Cover_LiquidMe this.coverID = aCoverID; this.coverVariable = aCoverVariable; - invertedButton = new GT_GuiIconCheckButton(this, 0, startX + spaceX * 0, startY + spaceY * 0, GT_GuiIcon.REDSTONE_ON, GT_GuiIcon.REDSTONE_OFF, INVERTED, NORMAL); - thresholdSlot = new GT_GuiIntegerTextBox(this, 2, startX + spaceX * 0, startY + spaceY * 1 + 2, spaceX * 4 + 5, 12); + invertedButton = new GT_GuiIconCheckButton( + this, + 0, + startX + spaceX * 0, + startY + spaceY * 0, + GT_GuiIcon.REDSTONE_ON, + GT_GuiIcon.REDSTONE_OFF, + INVERTED, + NORMAL); + thresholdSlot = + new GT_GuiIntegerTextBox(this, 2, startX + spaceX * 0, startY + spaceY * 1 + 2, spaceX * 4 + 5, 12); if (tile instanceof IFluidHandler) { FluidTankInfo[] tanks = ((IFluidHandler) tile).getTankInfo(ForgeDirection.UNKNOWN); maxCapacity = - Arrays.stream(tanks) - .mapToInt(tank -> tank.capacity) - .sum(); + Arrays.stream(tanks).mapToInt(tank -> tank.capacity).sum(); } else { maxCapacity = -1; } @@ -256,8 +289,17 @@ public class GT_Cover_LiquidMeter extends GT_CoverBehaviorBase<GT_Cover_LiquidMe @Override public void drawExtras(int mouseX, int mouseY, float parTicks) { super.drawExtras(mouseX, mouseY, parTicks); - this.fontRendererObj.drawString(coverVariable.inverted ? INVERTED : NORMAL, startX + spaceX * 1, 4 + startY + spaceY * 0, textColor); - this.getFontRenderer().drawString(GT_Utility.trans("222", "Fluid threshold"), startX + spaceX * 5 - 10, startY + spaceY * 1 + 4, textColor); + this.fontRendererObj.drawString( + coverVariable.inverted ? INVERTED : NORMAL, + startX + spaceX * 1, + 4 + startY + spaceY * 0, + textColor); + this.getFontRenderer() + .drawString( + GT_Utility.trans("222", "Fluid threshold"), + startX + spaceX * 5 - 10, + startY + spaceY * 1 + 4, + textColor); } @Override diff --git a/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java b/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java index dc4dc7c56e..baf3c6232f 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java @@ -19,16 +19,21 @@ import net.minecraftforge.fluids.Fluid; public class GT_Cover_NeedMaintainance extends GT_CoverBehavior { private boolean isRotor(ItemStack aRotor) { - return !(aRotor == null || !(aRotor.getItem() instanceof GT_MetaGenerated_Tool) || aRotor.getItemDamage() < 170 || aRotor.getItemDamage() > 176); + return !(aRotor == null + || !(aRotor.getItem() instanceof GT_MetaGenerated_Tool) + || aRotor.getItemDamage() < 170 + || aRotor.getItemDamage() > 176); } @Override - public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public boolean isRedstoneSensitive( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { return false; } @Override - public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public int doCoverThings( + byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { boolean needsRepair = false; if (aTileEntity instanceof IGregTechTileEntity) { IGregTechTileEntity tTileEntity = (IGregTechTileEntity) aTileEntity; @@ -40,8 +45,7 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior { ItemStack tRotor = multi.getRealInventory()[1]; int coverVar = aCoverVariable >>> 1; if (coverVar < 5) { - if (ideal - real > coverVar) - needsRepair = true; + if (ideal - real > coverVar) needsRepair = true; } else if (coverVar == 5 || coverVar == 6) { if (isRotor(tRotor)) { long tMax = GT_MetaGenerated_Tool.getToolMaxDamage(tRotor); @@ -49,7 +53,8 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior { if (coverVar == 5) { needsRepair = (tCur >= tMax * 8 / 10); } else { - long mExpectedDamage = Math.round(Math.min(multi.mEUt / multi.damageFactorLow, Math.pow(multi.mEUt, multi.damageFactorHigh))); + long mExpectedDamage = Math.round(Math.min( + multi.mEUt / multi.damageFactorLow, Math.pow(multi.mEUt, multi.damageFactorHigh))); needsRepair = tCur + mExpectedDamage * 2 >= tMax; } } else { @@ -68,7 +73,15 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior { } @Override - public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public int onCoverScrewdriverclick( + byte aSide, + int aCoverID, + int aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { aCoverVariable = (aCoverVariable + (aPlayer.isSneaking() ? -1 : 1)) % 14; if (aCoverVariable < 0) { aCoverVariable = 13; @@ -105,16 +118,21 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior { GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("065", "Emit if 5 Maintenance Needed(inverted)")); break; case 10: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("066", "Emit if rotor needs maintenance low accuracy mod")); + GT_Utility.sendChatToPlayer( + aPlayer, GT_Utility.trans("066", "Emit if rotor needs maintenance low accuracy mod")); break; case 11: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("067", "Emit if rotor needs maintenance low accuracy mod(inverted)")); + GT_Utility.sendChatToPlayer( + aPlayer, GT_Utility.trans("067", "Emit if rotor needs maintenance low accuracy mod(inverted)")); break; case 12: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("068", "Emit if rotor needs maintenance high accuracy mod")); + GT_Utility.sendChatToPlayer( + aPlayer, GT_Utility.trans("068", "Emit if rotor needs maintenance high accuracy mod")); break; case 13: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("069", "Emit if rotor needs maintenance high accuracy mod(inverted)")); + GT_Utility.sendChatToPlayer( + aPlayer, + GT_Utility.trans("069", "Emit if rotor needs maintenance high accuracy mod(inverted)")); break; } return aCoverVariable; @@ -151,7 +169,8 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior { } @Override - public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + public boolean manipulatesSidedRedstoneOutput( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } @@ -162,14 +181,13 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior { /** * GUI Stuff */ - @Override public boolean hasCoverGUI() { return true; } @Override - public Object getClientGUI(byte aSide, int aCoverID, int coverData, ICoverable aTileEntity) { + public Object getClientGUI(byte aSide, int aCoverID, int coverData, ICoverable aTileEntity) { return new GUI(aSide, aCoverID, coverData, aTileEntity); } @@ -179,26 +197,25 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior { private int coverVariable; private final String[] tooltiptext = { - GT_Utility.trans("056", "Emit if 1 Maintenance Needed"), - GT_Utility.trans("058", "Emit if 2 Maintenance Needed"), - GT_Utility.trans("060", "Emit if 3 Maintenance Needed"), - GT_Utility.trans("062", "Emit if 4 Maintenance Needed"), - GT_Utility.trans("064", "Emit if 5 Maintenance Needed"), - GT_Utility.trans("066", "Emit if rotor needs maintenance low accuracy mod"), - GT_Utility.trans("068", "Emit if rotor needs maintenance high accuracy mod"), + GT_Utility.trans("056", "Emit if 1 Maintenance Needed"), + GT_Utility.trans("058", "Emit if 2 Maintenance Needed"), + GT_Utility.trans("060", "Emit if 3 Maintenance Needed"), + GT_Utility.trans("062", "Emit if 4 Maintenance Needed"), + GT_Utility.trans("064", "Emit if 5 Maintenance Needed"), + GT_Utility.trans("066", "Emit if rotor needs maintenance low accuracy mod"), + GT_Utility.trans("068", "Emit if rotor needs maintenance high accuracy mod"), }; private final String[] buttontext = { - GT_Utility.trans("247", "1 Issue"), - GT_Utility.trans("248", "2 Issues"), - GT_Utility.trans("249", "3 Issues"), - GT_Utility.trans("250", "4 Issues"), - GT_Utility.trans("251", "5 Issues"), - GT_Utility.trans("252", "Rotor < 80%"), - GT_Utility.trans("253", "Rotor < 100%"), - - GT_Utility.trans("INVERTED", "Inverted"), - GT_Utility.trans("NORMAL", "Normal"), + GT_Utility.trans("247", "1 Issue"), + GT_Utility.trans("248", "2 Issues"), + GT_Utility.trans("249", "3 Issues"), + GT_Utility.trans("250", "4 Issues"), + GT_Utility.trans("251", "5 Issues"), + GT_Utility.trans("252", "Rotor < 80%"), + GT_Utility.trans("253", "Rotor < 100%"), + GT_Utility.trans("INVERTED", "Inverted"), + GT_Utility.trans("NORMAL", "Normal"), }; private static final int startX = 10; @@ -215,31 +232,46 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior { this.coverVariable = aCoverVariable; GuiButton b; - b = new GT_GuiIconCheckButton(this, 0, startX + spaceX*0, startY+spaceY*0, GT_GuiIcon.CHECKMARK, null).setTooltipText(tooltiptext[0]); - b = new GT_GuiIconCheckButton(this, 1, startX + spaceX*0, startY+spaceY*1, GT_GuiIcon.CHECKMARK, null).setTooltipText(tooltiptext[1]); - b = new GT_GuiIconCheckButton(this, 2, startX + spaceX*0, startY+spaceY*2, GT_GuiIcon.CHECKMARK, null).setTooltipText(tooltiptext[2]); - b = new GT_GuiIconCheckButton(this, 3, startX + spaceX*0, startY+spaceY*3, GT_GuiIcon.CHECKMARK, null).setTooltipText(tooltiptext[3]); - b = new GT_GuiIconCheckButton(this, 4, startX + spaceX*4 + 4, startY+spaceY*0, GT_GuiIcon.CHECKMARK, null).setTooltipText(tooltiptext[4]); - b = new GT_GuiIconCheckButton(this, 5, startX + spaceX*4 + 4, startY+spaceY*1, GT_GuiIcon.CHECKMARK, null).setTooltipText(tooltiptext[5]); - b = new GT_GuiIconCheckButton(this, 6, startX + spaceX*4 + 4, startY+spaceY*2, GT_GuiIcon.CHECKMARK, null).setTooltipText(tooltiptext[6]); - b = new GT_GuiIconCheckButton(this, 7, startX + spaceX*4 + 4, startY+spaceY*3, GT_GuiIcon.REDSTONE_ON, GT_GuiIcon.REDSTONE_OFF); + b = new GT_GuiIconCheckButton(this, 0, startX + spaceX * 0, startY + spaceY * 0, GT_GuiIcon.CHECKMARK, null) + .setTooltipText(tooltiptext[0]); + b = new GT_GuiIconCheckButton(this, 1, startX + spaceX * 0, startY + spaceY * 1, GT_GuiIcon.CHECKMARK, null) + .setTooltipText(tooltiptext[1]); + b = new GT_GuiIconCheckButton(this, 2, startX + spaceX * 0, startY + spaceY * 2, GT_GuiIcon.CHECKMARK, null) + .setTooltipText(tooltiptext[2]); + b = new GT_GuiIconCheckButton(this, 3, startX + spaceX * 0, startY + spaceY * 3, GT_GuiIcon.CHECKMARK, null) + .setTooltipText(tooltiptext[3]); + b = new GT_GuiIconCheckButton( + this, 4, startX + spaceX * 4 + 4, startY + spaceY * 0, GT_GuiIcon.CHECKMARK, null) + .setTooltipText(tooltiptext[4]); + b = new GT_GuiIconCheckButton( + this, 5, startX + spaceX * 4 + 4, startY + spaceY * 1, GT_GuiIcon.CHECKMARK, null) + .setTooltipText(tooltiptext[5]); + b = new GT_GuiIconCheckButton( + this, 6, startX + spaceX * 4 + 4, startY + spaceY * 2, GT_GuiIcon.CHECKMARK, null) + .setTooltipText(tooltiptext[6]); + b = new GT_GuiIconCheckButton( + this, + 7, + startX + spaceX * 4 + 4, + startY + spaceY * 3, + GT_GuiIcon.REDSTONE_ON, + GT_GuiIcon.REDSTONE_OFF); } - @Override public void drawExtras(int mouseX, int mouseY, float parTicks) { super.drawExtras(mouseX, mouseY, parTicks); - this.fontRendererObj.drawString(buttontext[0],startX + spaceX*1, 4+startY+spaceY*0, textColor); - this.fontRendererObj.drawString(buttontext[1],startX + spaceX*1, 4+startY+spaceY*1, textColor); - this.fontRendererObj.drawString(buttontext[2],startX + spaceX*1, 4+startY+spaceY*2, textColor); - this.fontRendererObj.drawString(buttontext[3],startX + spaceX*1, 4+startY+spaceY*3, textColor); - this.fontRendererObj.drawString(buttontext[4],startX + spaceX*5 + 4, 4+startY+spaceY*0, textColor); - this.fontRendererObj.drawString(buttontext[5],startX + spaceX*5 + 4, 4+startY+spaceY*1, textColor); - this.fontRendererObj.drawString(buttontext[6],startX + spaceX*5 + 4, 4+startY+spaceY*2, textColor); + this.fontRendererObj.drawString(buttontext[0], startX + spaceX * 1, 4 + startY + spaceY * 0, textColor); + this.fontRendererObj.drawString(buttontext[1], startX + spaceX * 1, 4 + startY + spaceY * 1, textColor); + this.fontRendererObj.drawString(buttontext[2], startX + spaceX * 1, 4 + startY + spaceY * 2, textColor); + this.fontRendererObj.drawString(buttontext[3], startX + spaceX * 1, 4 + startY + spaceY * 3, textColor); + this.fontRendererObj.drawString(buttontext[4], startX + spaceX * 5 + 4, 4 + startY + spaceY * 0, textColor); + this.fontRendererObj.drawString(buttontext[5], startX + spaceX * 5 + 4, 4 + startY + spaceY * 1, textColor); + this.fontRendererObj.drawString(buttontext[6], startX + spaceX * 5 + 4, 4 + startY + spaceY * 2, textColor); // inverted normal String s2 = ((coverVariable & 0x1) > 0) ? buttontext[7] : buttontext[8]; - this.fontRendererObj.drawString(s2, startX + spaceX*5 + 4, 4+startY+spaceY*3, textColor); + this.fontRendererObj.drawString(s2, startX + spaceX * 5 + 4, 4 + startY + spaceY * 3, textColor); } @Override @@ -248,32 +280,29 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior { } @Override - public void buttonClicked(GuiButton btn){ - if (btn.id == 7 || !isEnabled(btn.id)){ + public void buttonClicked(GuiButton btn) { + if (btn.id == 7 || !isEnabled(btn.id)) { coverVariable = getNewCoverVariable(btn.id, ((GT_GuiIconCheckButton) btn).isChecked()); GT_Values.NW.sendToServer(new GT_Packet_TileEntityCover(side, coverID, coverVariable, tile)); } updateButtons(); } - private void updateButtons(){ + private void updateButtons() { for (Object o : buttonList) ((GT_GuiIconCheckButton) o).setChecked(isEnabled(((GT_GuiIconCheckButton) o).id)); } private int getNewCoverVariable(int id, boolean checked) { if (id == 7) { - if (checked) - return coverVariable & ~0x1; - else - return coverVariable | 0x1; + if (checked) return coverVariable & ~0x1; + else return coverVariable | 0x1; } - return (coverVariable & 0x1) | (id << 1) ; + return (coverVariable & 0x1) | (id << 1); } private boolean isEnabled(int id) { - if (id == 7) - return (coverVariable & 0x1) > 0; + if (id == 7) return (coverVariable & 0x1) > 0; return (coverVariable >>> 1) == id; } } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java b/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java index 4bcb119e84..a0f2d830c0 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java @@ -20,12 +20,14 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior { private int range = 8; @Override - public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public boolean isRedstoneSensitive( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { return false; } @Override - public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public int doCoverThings( + byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { boolean playerDetected = false; if (aTileEntity instanceof IGregTechTileEntity) { @@ -40,7 +42,10 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior { for (Object tObject : aTileEntity.getWorld().playerEntities) { if ((tObject instanceof EntityPlayerMP)) { EntityPlayerMP tEntity = (EntityPlayerMP) tObject; - int dist = Math.max(1, (int) tEntity.getDistance(aTileEntity.getXCoord() + 0.5D, aTileEntity.getYCoord() + 0.5D, aTileEntity.getZCoord() + 0.5D)); + int dist = Math.max(1, (int) tEntity.getDistance( + aTileEntity.getXCoord() + 0.5D, + aTileEntity.getYCoord() + 0.5D, + aTileEntity.getZCoord() + 0.5D)); if (dist < range) { if (aCoverVariable == 0) { playerDetected = true; @@ -59,22 +64,34 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior { } } - aTileEntity.setOutputRedstoneSignal(aSide, (byte) (playerDetected ? 15 : 0)); return aCoverVariable; } @Override - public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { - aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 3; - if(aCoverVariable <0){aCoverVariable = 2;} - switch(aCoverVariable) { + public int onCoverScrewdriverclick( + byte aSide, + int aCoverID, + int aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { + aCoverVariable = (aCoverVariable + (aPlayer.isSneaking() ? -1 : 1)) % 3; + if (aCoverVariable < 0) { + aCoverVariable = 2; + } + switch (aCoverVariable) { case 0: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("068", "Emit if any Player is close")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("068", "Emit if any Player is close")); + break; case 1: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("069", "Emit if other Player is close")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("069", "Emit if other Player is close")); + break; case 2: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("070", "Emit if you are close")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("070", "Emit if you are close")); + break; } return aCoverVariable; } @@ -110,7 +127,8 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior { } @Override - public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + public boolean manipulatesSidedRedstoneOutput( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } @@ -121,14 +139,13 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior { /** * GUI Stuff */ - @Override public boolean hasCoverGUI() { return true; } @Override - public Object getClientGUI(byte aSide, int aCoverID, int coverData, ICoverable aTileEntity) { + public Object getClientGUI(byte aSide, int aCoverID, int coverData, ICoverable aTileEntity) { return new GUI(aSide, aCoverID, coverData, aTileEntity); } @@ -150,23 +167,23 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior { this.coverID = aCoverID; this.coverVariable = aCoverVariable; - new GT_GuiIconCheckButton(this, 0, startX + spaceX*0, startY+spaceY*0, GT_GuiIcon.CHECKMARK, null) + new GT_GuiIconCheckButton(this, 0, startX + spaceX * 0, startY + spaceY * 0, GT_GuiIcon.CHECKMARK, null) .setTooltipText(GT_Utility.trans("068", "Emit if any Player is close")); - new GT_GuiIconCheckButton(this, 1, startX + spaceX*0, startY+spaceY*1, GT_GuiIcon.CHECKMARK, null) + new GT_GuiIconCheckButton(this, 1, startX + spaceX * 0, startY + spaceY * 1, GT_GuiIcon.CHECKMARK, null) .setTooltipText(GT_Utility.trans("069", "Emit if other Player is close")); - new GT_GuiIconCheckButton(this, 2, startX + spaceX*0, startY+spaceY*2, GT_GuiIcon.CHECKMARK, null) + new GT_GuiIconCheckButton(this, 2, startX + spaceX * 0, startY + spaceY * 2, GT_GuiIcon.CHECKMARK, null) .setTooltipText(GT_Utility.trans("070", "Emit if you are close")); } @Override public void drawExtras(int mouseX, int mouseY, float parTicks) { super.drawExtras(mouseX, mouseY, parTicks); - this.fontRendererObj.drawString(GT_Utility.trans("319", "Any player"), - startX + spaceX*1, 4+startY+spaceY*0, textColor); - this.fontRendererObj.drawString(GT_Utility.trans("320", "Other players"), - startX + spaceX*1, 4+startY+spaceY*1, textColor); - this.fontRendererObj.drawString(GT_Utility.trans("321", "Only owner"), - startX + spaceX*1, 4+startY+spaceY*2, textColor); + this.fontRendererObj.drawString( + GT_Utility.trans("319", "Any player"), startX + spaceX * 1, 4 + startY + spaceY * 0, textColor); + this.fontRendererObj.drawString( + GT_Utility.trans("320", "Other players"), startX + spaceX * 1, 4 + startY + spaceY * 1, textColor); + this.fontRendererObj.drawString( + GT_Utility.trans("321", "Only owner"), startX + spaceX * 1, 4 + startY + spaceY * 2, textColor); } @Override @@ -175,15 +192,15 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior { } @Override - public void buttonClicked(GuiButton btn){ - if (!isEnabled(btn.id)){ + public void buttonClicked(GuiButton btn) { + if (!isEnabled(btn.id)) { coverVariable = getNewCoverVariable(btn.id, ((GT_GuiIconCheckButton) btn).isChecked()); GT_Values.NW.sendToServer(new GT_Packet_TileEntityCover(side, coverID, coverVariable, tile)); } updateButtons(); } - private void updateButtons(){ + private void updateButtons() { for (Object o : buttonList) ((GT_GuiIconCheckButton) o).setChecked(isEnabled(((GT_GuiIconCheckButton) o).id)); } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Pump.java b/src/main/java/gregtech/common/covers/GT_Cover_Pump.java index e92f3f1370..269788cb6d 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Pump.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Pump.java @@ -16,7 +16,7 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; -public class GT_Cover_Pump extends GT_CoverBehavior{ +public class GT_Cover_Pump extends GT_CoverBehavior { public final int mTransferRate; public GT_Cover_Pump(int aTransferRate) { @@ -24,12 +24,14 @@ public class GT_Cover_Pump extends GT_CoverBehavior{ } @Override - public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public boolean isRedstoneSensitive( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { return false; } @Override - public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public int doCoverThings( + byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { if ((aCoverVariable % 6 > 1) && ((aTileEntity instanceof IMachineProgress))) { if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable % 6 < 4) { return aCoverVariable; @@ -38,24 +40,33 @@ public class GT_Cover_Pump extends GT_CoverBehavior{ if ((aTileEntity instanceof IFluidHandler)) { IFluidHandler tTank2 = aTileEntity.getITankContainerAtSide(aSide); if (tTank2 != null) { - //aTileEntity.decreaseStoredEnergyUnits(GT_Utility.getTier(this.mTransferRate), true); + // aTileEntity.decreaseStoredEnergyUnits(GT_Utility.getTier(this.mTransferRate), true); IFluidHandler tTank1 = (IFluidHandler) aTileEntity; if (aCoverVariable % 2 == 0) { FluidStack tLiquid = tTank1.drain(ForgeDirection.getOrientation(aSide), this.mTransferRate, false); if (tLiquid != null) { tLiquid = tLiquid.copy(); - tLiquid.amount = tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid, false); + tLiquid.amount = + tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid, false); if (tLiquid.amount > 0 && canTransferFluid(tLiquid)) { - tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tTank1.drain(ForgeDirection.getOrientation(aSide), tLiquid.amount, true), true); + tTank2.fill( + ForgeDirection.getOrientation(aSide).getOpposite(), + tTank1.drain(ForgeDirection.getOrientation(aSide), tLiquid.amount, true), + true); } } } else { - FluidStack tLiquid = tTank2.drain(ForgeDirection.getOrientation(aSide).getOpposite(), this.mTransferRate, false); + FluidStack tLiquid = + tTank2.drain(ForgeDirection.getOrientation(aSide).getOpposite(), this.mTransferRate, false); if (tLiquid != null) { tLiquid = tLiquid.copy(); tLiquid.amount = tTank1.fill(ForgeDirection.getOrientation(aSide), tLiquid, false); if (tLiquid.amount > 0 && canTransferFluid(tLiquid)) { - tTank1.fill(ForgeDirection.getOrientation(aSide), tTank2.drain(ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid.amount, true), true); + tTank1.fill( + ForgeDirection.getOrientation(aSide), + tTank2.drain( + ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid.amount, true), + true); } } } @@ -69,34 +80,56 @@ public class GT_Cover_Pump extends GT_CoverBehavior{ } @Override - public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { - aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 12; - if(aCoverVariable <0){aCoverVariable = 11;} - switch(aCoverVariable) { - case 0: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("006", "Export")); break; - case 1: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("007", "Import")); break; - case 2: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("008", "Export (conditional)")); break; - case 3: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("009", "Import (conditional)")); break; - case 4: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("010", "Export (invert cond)")); break; - case 5: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("011", "Import (invert cond)")); break; - case 6: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("012", "Export allow Input")); break; - case 7: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("013", "Import allow Output")); break; - case 8: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("014", "Export allow Input (conditional)")); break; - case 9: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("015", "Import allow Output (conditional)")); break; - case 10: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("016", "Export allow Input (invert cond)")); break; - case 11: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("017", "Import allow Output (invert cond)")); break; + public int onCoverScrewdriverclick( + byte aSide, + int aCoverID, + int aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { + aCoverVariable = (aCoverVariable + (aPlayer.isSneaking() ? -1 : 1)) % 12; + if (aCoverVariable < 0) { + aCoverVariable = 11; + } + switch (aCoverVariable) { + case 0: + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("006", "Export")); + break; + case 1: + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("007", "Import")); + break; + case 2: + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("008", "Export (conditional)")); + break; + case 3: + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("009", "Import (conditional)")); + break; + case 4: + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("010", "Export (invert cond)")); + break; + case 5: + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("011", "Import (invert cond)")); + break; + case 6: + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("012", "Export allow Input")); + break; + case 7: + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("013", "Import allow Output")); + break; + case 8: + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("014", "Export allow Input (conditional)")); + break; + case 9: + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("015", "Import allow Output (conditional)")); + break; + case 10: + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("016", "Export allow Input (invert cond)")); + break; + case 11: + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("017", "Import allow Output (invert cond)")); + break; } return aCoverVariable; } @@ -164,14 +197,13 @@ public class GT_Cover_Pump extends GT_CoverBehavior{ /** * GUI Stuff */ - @Override public boolean hasCoverGUI() { return true; } @Override - public Object getClientGUI(byte aSide, int aCoverID, int coverData, ICoverable aTileEntity) { + public Object getClientGUI(byte aSide, int aCoverID, int coverData, ICoverable aTileEntity) { return new GT_PumpGUICover(aSide, aCoverID, coverData, aTileEntity); } @@ -194,21 +226,31 @@ public class GT_Cover_Pump extends GT_CoverBehavior{ this.coverVariable = aCoverVariable; GT_GuiIconButton b; - b = new GT_GuiIconButton(this, 0, startX + spaceX*0, startY+spaceY*0, GT_GuiIcon.EXPORT).setTooltipText(GT_Utility.trans("006", "Export")); - b = new GT_GuiIconButton(this, 1, startX + spaceX*1, startY+spaceY*0, GT_GuiIcon.IMPORT).setTooltipText(GT_Utility.trans("007", "Import")); - b = new GT_GuiIconButton(this, 2, startX + spaceX*0, startY+spaceY*1, GT_GuiIcon.CHECKMARK).setTooltipText(GT_Utility.trans("224", "Always On")); - b = new GT_GuiIconButton(this, 3, startX + spaceX*1, startY+spaceY*1, GT_GuiIcon.REDSTONE_ON).setTooltipText(GT_Utility.trans("225", "Active with Redstone Signal")); - b = new GT_GuiIconButton(this, 4, startX + spaceX*2, startY+spaceY*1, GT_GuiIcon.REDSTONE_OFF).setTooltipText(GT_Utility.trans("226", "Inactive with Redstone Signal")); - b = new GT_GuiIconButton(this, 5, startX + spaceX*0, startY+spaceY*2, GT_GuiIcon.ALLOW_INPUT).setTooltipText(GT_Utility.trans("227", "Allow Input")); - b = new GT_GuiIconButton(this, 6, startX + spaceX*1, startY+spaceY*2, GT_GuiIcon.BLOCK_INPUT).setTooltipText(GT_Utility.trans("228", "Block Input")); + b = new GT_GuiIconButton(this, 0, startX + spaceX * 0, startY + spaceY * 0, GT_GuiIcon.EXPORT) + .setTooltipText(GT_Utility.trans("006", "Export")); + b = new GT_GuiIconButton(this, 1, startX + spaceX * 1, startY + spaceY * 0, GT_GuiIcon.IMPORT) + .setTooltipText(GT_Utility.trans("007", "Import")); + b = new GT_GuiIconButton(this, 2, startX + spaceX * 0, startY + spaceY * 1, GT_GuiIcon.CHECKMARK) + .setTooltipText(GT_Utility.trans("224", "Always On")); + b = new GT_GuiIconButton(this, 3, startX + spaceX * 1, startY + spaceY * 1, GT_GuiIcon.REDSTONE_ON) + .setTooltipText(GT_Utility.trans("225", "Active with Redstone Signal")); + b = new GT_GuiIconButton(this, 4, startX + spaceX * 2, startY + spaceY * 1, GT_GuiIcon.REDSTONE_OFF) + .setTooltipText(GT_Utility.trans("226", "Inactive with Redstone Signal")); + b = new GT_GuiIconButton(this, 5, startX + spaceX * 0, startY + spaceY * 2, GT_GuiIcon.ALLOW_INPUT) + .setTooltipText(GT_Utility.trans("227", "Allow Input")); + b = new GT_GuiIconButton(this, 6, startX + spaceX * 1, startY + spaceY * 2, GT_GuiIcon.BLOCK_INPUT) + .setTooltipText(GT_Utility.trans("228", "Block Input")); } @Override public void drawExtras(int mouseX, int mouseY, float parTicks) { super.drawExtras(mouseX, mouseY, parTicks); - this.fontRendererObj.drawString(GT_Utility.trans("229", "Import/Export"), startX + spaceX*3, 3+startY+spaceY*0, textColor); - this.fontRendererObj.drawString(GT_Utility.trans("230", "Conditional"), startX + spaceX*3, 3+startY+spaceY*1, textColor); - this.fontRendererObj.drawString(GT_Utility.trans("231", "Enable Input"), startX + spaceX*3, 3+startY+spaceY*2, textColor); + this.fontRendererObj.drawString( + GT_Utility.trans("229", "Import/Export"), startX + spaceX * 3, 3 + startY + spaceY * 0, textColor); + this.fontRendererObj.drawString( + GT_Utility.trans("230", "Conditional"), startX + spaceX * 3, 3 + startY + spaceY * 1, textColor); + this.fontRendererObj.drawString( + GT_Utility.trans("231", "Enable Input"), startX + spaceX * 3, 3 + startY + spaceY * 2, textColor); } @Override @@ -217,15 +259,15 @@ public class GT_Cover_Pump extends GT_CoverBehavior{ } @Override - public void buttonClicked(GuiButton btn){ - if (getClickable(btn.id)){ + public void buttonClicked(GuiButton btn) { + if (getClickable(btn.id)) { coverVariable = getNewCoverVariable(btn.id); GT_Values.NW.sendToServer(new GT_Packet_TileEntityCover(side, coverID, coverVariable, tile)); } updateButtons(); } - private void updateButtons(){ + private void updateButtons() { GuiButton b; for (Object o : buttonList) { b = (GuiButton) o; @@ -240,34 +282,29 @@ public class GT_Cover_Pump extends GT_CoverBehavior{ case 1: return coverVariable | 0x1; case 2: - if (coverVariable > 5) - return 0x6 | (coverVariable & ~0xE); + if (coverVariable > 5) return 0x6 | (coverVariable & ~0xE); return (coverVariable & ~0xE); case 3: - if (coverVariable > 5) - return 0x8 | (coverVariable & ~0xE); + if (coverVariable > 5) return 0x8 | (coverVariable & ~0xE); return 0x2 | (coverVariable & ~0xE); case 4: - if (coverVariable > 5) - return 0xA | (coverVariable & ~0xE); + if (coverVariable > 5) return 0xA | (coverVariable & ~0xE); return (0x4 | (coverVariable & ~0xE)); case 5: - if (coverVariable <= 5) - return coverVariable + 6; + if (coverVariable <= 5) return coverVariable + 6; break; case 6: - if (coverVariable > 5) - return coverVariable - 6; + if (coverVariable > 5) return coverVariable - 6; } return coverVariable; } private boolean getClickable(int id) { - if (coverVariable < 0 | 11 < coverVariable) - return false; + if (coverVariable < 0 | 11 < coverVariable) return false; switch (id) { - case 0: case 1: + case 0: + case 1: return (0x1 & coverVariable) != id; case 2: return (coverVariable % 6) >= 2; diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java index d436d6ac2d..06e0ec4001 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java @@ -8,39 +8,59 @@ import net.minecraftforge.fluids.Fluid; public class GT_Cover_RedstoneConductor extends GT_CoverBehavior { @Override - public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public boolean isRedstoneSensitive( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { return false; } @Override - public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public int doCoverThings( + byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { if (aCoverVariable == 0) { aTileEntity.setOutputRedstoneSignal(aSide, aTileEntity.getStrongestRedstone()); } else if (aCoverVariable < 7) { - aTileEntity.setOutputRedstoneSignal(aSide, aTileEntity.getInternalInputRedstoneSignal((byte) (aCoverVariable - 1))); + aTileEntity.setOutputRedstoneSignal( + aSide, aTileEntity.getInternalInputRedstoneSignal((byte) (aCoverVariable - 1))); } return aCoverVariable; } @Override - public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { - aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 7; - if(aCoverVariable <0){aCoverVariable = 6;} + public int onCoverScrewdriverclick( + byte aSide, + int aCoverID, + int aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { + aCoverVariable = (aCoverVariable + (aPlayer.isSneaking() ? -1 : 1)) % 7; + if (aCoverVariable < 0) { + aCoverVariable = 6; + } switch (aCoverVariable) { case 0: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("071", "Conducts strongest Input")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("071", "Conducts strongest Input")); + break; case 1: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("072", "Conducts from bottom Input")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("072", "Conducts from bottom Input")); + break; case 2: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("073", "Conducts from top Input")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("073", "Conducts from top Input")); + break; case 3: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("074", "Conducts from north Input")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("074", "Conducts from north Input")); + break; case 4: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("075", "Conducts from south Input")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("075", "Conducts from south Input")); + break; case 5: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("076", "Conducts from west Input")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("076", "Conducts from west Input")); + break; case 6: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("077", "Conducts from east Input")); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("077", "Conducts from east Input")); + break; } return aCoverVariable; } @@ -76,7 +96,8 @@ public class GT_Cover_RedstoneConductor extends GT_CoverBehavior { } @Override - public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + public boolean manipulatesSidedRedstoneOutput( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverExternal.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverExternal.java index a4649629d8..374f5a0a81 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverExternal.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverExternal.java @@ -5,18 +5,25 @@ import gregtech.api.interfaces.tileentity.ICoverable; public class GT_Cover_RedstoneReceiverExternal extends GT_Cover_RedstoneWirelessBase { @Override - public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public boolean isRedstoneSensitive( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { return false; } @Override - public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { - aTileEntity.setOutputRedstoneSignal(aSide, GregTech_API.sWirelessRedstone.get(Integer.valueOf(aCoverVariable)) == null ? 0 : ((Byte) GregTech_API.sWirelessRedstone.get(Integer.valueOf(aCoverVariable))).byteValue()); + public int doCoverThings( + byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + aTileEntity.setOutputRedstoneSignal( + aSide, + GregTech_API.sWirelessRedstone.get(Integer.valueOf(aCoverVariable)) == null + ? 0 + : ((Byte) GregTech_API.sWirelessRedstone.get(Integer.valueOf(aCoverVariable))).byteValue()); return aCoverVariable; } @Override - public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + public boolean manipulatesSidedRedstoneOutput( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java index 2173014509..61dcb5a602 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java @@ -6,20 +6,23 @@ import gregtech.api.interfaces.tileentity.IMachineProgress; public class GT_Cover_RedstoneReceiverInternal extends GT_Cover_RedstoneWirelessBase { @Override - public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public int doCoverThings( + byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { if (aTileEntity instanceof IMachineProgress) { - if (getRedstoneInput(aSide, aInputRedstone, aCoverID, aCoverVariable, aTileEntity) >0) + if (getRedstoneInput(aSide, aInputRedstone, aCoverID, aCoverVariable, aTileEntity) > 0) ((IMachineProgress) aTileEntity).enableWorking(); - else - ((IMachineProgress) aTileEntity).disableWorking(); + else ((IMachineProgress) aTileEntity).disableWorking(); ((IMachineProgress) aTileEntity).setWorkDataValue(aInputRedstone); } return aCoverVariable; } @Override - public byte getRedstoneInput(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return GregTech_API.sWirelessRedstone.get(Integer.valueOf(aCoverVariable)) == null ? 0 : ((Byte) GregTech_API.sWirelessRedstone.get(Integer.valueOf(aCoverVariable))).byteValue(); + public byte getRedstoneInput( + byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return GregTech_API.sWirelessRedstone.get(Integer.valueOf(aCoverVariable)) == null + ? 0 + : ((Byte) GregTech_API.sWirelessRedstone.get(Integer.valueOf(aCoverVariable))).byteValue(); } @Override diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java index 4b94d11a2b..d4ec0a82d6 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java @@ -9,20 +9,34 @@ import net.minecraftforge.fluids.Fluid; public class GT_Cover_RedstoneSignalizer extends GT_CoverBehavior { @Override - public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public boolean isRedstoneSensitive( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { return false; } @Override - public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public int onCoverScrewdriverclick( + byte aSide, + int aCoverID, + int aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { aCoverVariable = (aCoverVariable + 1) % 48; - switch(aCoverVariable / 16) { + switch (aCoverVariable / 16) { case 0: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("078", "Signal = ") + (aCoverVariable & 0xF)); break; + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("078", "Signal = ") + (aCoverVariable & 0xF)); + break; case 1: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("079", "Conditional Signal = ") + (aCoverVariable & 0xF)); break; + GT_Utility.sendChatToPlayer( + aPlayer, GT_Utility.trans("079", "Conditional Signal = ") + (aCoverVariable & 0xF)); + break; case 2: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("080", "Inverted Conditional Signal = ") + (aCoverVariable & 0xF)); break; + GT_Utility.sendChatToPlayer( + aPlayer, GT_Utility.trans("080", "Inverted Conditional Signal = ") + (aCoverVariable & 0xF)); + break; } return aCoverVariable; } @@ -63,7 +77,8 @@ public class GT_Cover_RedstoneSignalizer extends GT_CoverBehavior { } @Override - public byte getRedstoneInput(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + public byte getRedstoneInput( + byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { if (aCoverVariable < 16) { return (byte) (aCoverVariable & 0xF); } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterExternal.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterExternal.java index cd8f1f4ffc..0c89d7e6e4 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterExternal.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterExternal.java @@ -5,7 +5,8 @@ import gregtech.api.interfaces.tileentity.ICoverable; public class GT_Cover_RedstoneTransmitterExternal extends GT_Cover_RedstoneWirelessBase { @Override - public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public int doCoverThings( + byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { GregTech_API.sWirelessRedstone.put(Integer.valueOf(aCoverVariable), Byte.valueOf(aInputRedstone)); return aCoverVariable; } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java index 94741f6b36..0003e063b3 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java @@ -5,13 +5,16 @@ import gregtech.api.interfaces.tileentity.ICoverable; public class GT_Cover_RedstoneTransmitterInternal extends GT_Cover_RedstoneWirelessBase { @Override - public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public boolean isRedstoneSensitive( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { return false; } @Override - public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { - GregTech_API.sWirelessRedstone.put(Integer.valueOf(aCoverVariable), Byte.valueOf(aTileEntity.getOutputRedstoneSignal(aSide))); + public int doCoverThings( + byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + GregTech_API.sWirelessRedstone.put( + Integer.valueOf(aCoverVariable), Byte.valueOf(aTileEntity.getOutputRedstoneSignal(aSide))); return aCoverVariable; } @@ -26,7 +29,8 @@ public class GT_Cover_RedstoneTransmitterInternal extends GT_Cover_RedstoneWirel } @Override - public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + public boolean manipulatesSidedRedstoneOutput( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java index b60270ea58..02f4786dee 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java @@ -24,16 +24,26 @@ public abstract class GT_Cover_RedstoneWirelessBase extends GT_CoverBehavior { private static final int CHECKBOX_MASK = 0x00010000; @Override - public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) { + public boolean onCoverRemoval( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) { GregTech_API.sWirelessRedstone.put(aCoverVariable, (byte) 0); return true; } @Override - protected boolean onCoverRightClickImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + protected boolean onCoverRightClickImpl( + byte aSide, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { if (((aX > 0.375D) && (aX < 0.625D)) || ((aSide > 3) && ((aY > 0.375D) && (aY < 0.625D)))) { GregTech_API.sWirelessRedstone.put(aCoverVariable.get(), (byte) 0); - aCoverVariable.set((aCoverVariable.get() & (PRIVATE_MASK | CHECKBOX_MASK)) | (((Integer)GT_Utility.stackToInt(aPlayer.inventory.getCurrentItem())).hashCode() & PUBLIC_MASK)); + aCoverVariable.set((aCoverVariable.get() & (PRIVATE_MASK | CHECKBOX_MASK)) + | (((Integer) GT_Utility.stackToInt(aPlayer.inventory.getCurrentItem())).hashCode() & PUBLIC_MASK)); GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("081", "Frequency: ") + aCoverVariable); return true; } @@ -42,24 +52,43 @@ public abstract class GT_Cover_RedstoneWirelessBase extends GT_CoverBehavior { @Override @SuppressWarnings("deprecation") - public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public boolean onCoverRightclick( + byte aSide, + int aCoverID, + int aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { if (((aX > 0.375D) && (aX < 0.625D)) || ((aSide > 3) && ((aY > 0.375D) && (aY < 0.625D)))) { GregTech_API.sWirelessRedstone.put(aCoverVariable, (byte) 0); - int val = GT_Utility.stackToInt(aPlayer.inventory.getCurrentItem()) * (1 + aPlayer.inventory.getCurrentItem().getItemDamage()); + int val = GT_Utility.stackToInt(aPlayer.inventory.getCurrentItem()) + * (1 + aPlayer.inventory.getCurrentItem().getItemDamage()); aCoverVariable = (aCoverVariable & (PRIVATE_MASK | CHECKBOX_MASK)) | (val & PUBLIC_MASK); aTileEntity.setCoverDataAtSide(aSide, aCoverVariable); - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("081", "Frequency: ") + (aCoverVariable & PUBLIC_MASK)); + GT_Utility.sendChatToPlayer( + aPlayer, GT_Utility.trans("081", "Frequency: ") + (aCoverVariable & PUBLIC_MASK)); return true; } return false; } @Override - public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (((aX > 0.375D) && (aX < 0.625D)) || ((aSide <= 3) || (((aY > 0.375D) && (aY < 0.625D)) || ((((aZ <= 0.375D) || (aZ >= 0.625D))))))) { + public int onCoverScrewdriverclick( + byte aSide, + int aCoverID, + int aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { + if (((aX > 0.375D) && (aX < 0.625D)) + || ((aSide <= 3) || (((aY > 0.375D) && (aY < 0.625D)) || ((((aZ <= 0.375D) || (aZ >= 0.625D))))))) { GregTech_API.sWirelessRedstone.put(aCoverVariable, (byte) 0); float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ); @@ -83,11 +112,9 @@ public abstract class GT_Cover_RedstoneWirelessBase extends GT_CoverBehavior { if (tPublicChannel < 0) { aCoverVariable = aCoverVariable & ~PUBLIC_MASK; - } - else if (tPublicChannel > MAX_CHANNEL) { + } else if (tPublicChannel > MAX_CHANNEL) { aCoverVariable = (aCoverVariable & (PRIVATE_MASK | CHECKBOX_MASK)) | MAX_CHANNEL; - } - else { + } else { aCoverVariable = (aCoverVariable & (PRIVATE_MASK | CHECKBOX_MASK)) | tPublicChannel; } } @@ -137,14 +164,13 @@ public abstract class GT_Cover_RedstoneWirelessBase extends GT_CoverBehavior { /** * GUI Stuff */ - @Override public boolean hasCoverGUI() { return true; } @Override - public Object getClientGUI(byte aSide, int aCoverID, int coverData, ICoverable aTileEntity) { + public Object getClientGUI(byte aSide, int aCoverID, int coverData, ICoverable aTileEntity) { return new GUI(aSide, aCoverID, coverData, aTileEntity); } @@ -167,19 +193,30 @@ public abstract class GT_Cover_RedstoneWirelessBase extends GT_CoverBehavior { this.coverID = aCoverID; this.coverVariable = aCoverVariable; - fBox = new GT_GuiShortTextBox(this, 2,startX + spaceX*0,startY+spaceY*0 + 2, spaceX*4-3,12); + fBox = new GT_GuiShortTextBox(this, 2, startX + spaceX * 0, startY + spaceY * 0 + 2, spaceX * 4 - 3, 12); fBox.setText(String.valueOf(coverVariable & PUBLIC_MASK)); fBox.setMaxStringLength(12); GuiButton b; - b = new GT_GuiIconCheckButton(this, 0, startX + spaceX * 0, startY + spaceY * 2, GT_GuiIcon.CHECKMARK, null); + b = new GT_GuiIconCheckButton( + this, 0, startX + spaceX * 0, startY + spaceY * 2, GT_GuiIcon.CHECKMARK, null); } @Override public void drawExtras(int mouseX, int mouseY, float parTicks) { super.drawExtras(mouseX, mouseY, parTicks); - this.getFontRenderer().drawString(GT_Utility.trans("246", "Frequency"), startX + spaceX*4, 4+startY+spaceY*0, textColor); - this.getFontRenderer().drawString(GT_Utility.trans("601", "Use Private Frequency"), startX + spaceX * 1, startY + spaceY * 2 + 4, textColor); + this.getFontRenderer() + .drawString( + GT_Utility.trans("246", "Frequency"), + startX + spaceX * 4, + 4 + startY + spaceY * 0, + textColor); + this.getFontRenderer() + .drawString( + GT_Utility.trans("601", "Use Private Frequency"), + startX + spaceX * 1, + startY + spaceY * 2 + 4, + textColor); } @Override @@ -190,7 +227,7 @@ public abstract class GT_Cover_RedstoneWirelessBase extends GT_CoverBehavior { @Override public void onMouseWheel(int x, int y, int delta) { - for (GT_GuiIntegerTextBox box : textBoxes){ + for (GT_GuiIntegerTextBox box : textBoxes) { if (box.isFocused()) { int step = Math.max(1, Math.abs(delta / 120)); step = (isShiftKeyDown() ? 1000 : isCtrlKeyDown() ? 50 : 1) * (delta > 0 ? step : -step); @@ -201,10 +238,8 @@ public abstract class GT_Cover_RedstoneWirelessBase extends GT_CoverBehavior { return; } tCoverVariable = tCoverVariable + step; - if (tCoverVariable > MAX_CHANNEL) - tCoverVariable = MAX_CHANNEL; - else if (tCoverVariable < 0) - tCoverVariable = 0; + if (tCoverVariable > MAX_CHANNEL) tCoverVariable = MAX_CHANNEL; + else if (tCoverVariable < 0) tCoverVariable = 0; box.setText(String.valueOf(tCoverVariable)); return; @@ -223,17 +258,16 @@ public abstract class GT_Cover_RedstoneWirelessBase extends GT_CoverBehavior { return; } - if (tPublicChannel > MAX_CHANNEL) - tPublicChannel = MAX_CHANNEL; - else if (tPublicChannel < 0) - tPublicChannel = 0; + if (tPublicChannel > MAX_CHANNEL) tPublicChannel = MAX_CHANNEL; + else if (tPublicChannel < 0) tPublicChannel = 0; - int tCheckBoxValue = ((GT_GuiIconCheckButton)this.buttonList.get(0)).isChecked() ? CHECKBOX_MASK : 0; + int tCheckBoxValue = ((GT_GuiIconCheckButton) this.buttonList.get(0)).isChecked() ? CHECKBOX_MASK : 0; coverVariable = tCheckBoxValue | tPublicChannel; fBox.setText(Integer.toString(tPublicChannel)); - GT_Values.NW.sendToServer(new GT_Packet_WirelessRedstoneCover(side, coverID, tile, tPublicChannel, tCheckBoxValue)); + GT_Values.NW.sendToServer( + new GT_Packet_WirelessRedstoneCover(side, coverID, tile, tPublicChannel, tCheckBoxValue)); } @Override @@ -259,7 +293,8 @@ public abstract class GT_Cover_RedstoneWirelessBase extends GT_CoverBehavior { coverVariable = tCheckBoxValue | tPublicChannel; - GT_Values.NW.sendToServer(new GT_Packet_WirelessRedstoneCover(side, coverID, tile, tPublicChannel, tCheckBoxValue)); + GT_Values.NW.sendToServer( + new GT_Packet_WirelessRedstoneCover(side, coverID, tile, tPublicChannel, tCheckBoxValue)); } private class GT_GuiShortTextBox extends GT_GuiIntegerTextBox { @@ -272,8 +307,7 @@ public abstract class GT_Cover_RedstoneWirelessBase extends GT_CoverBehavior { public boolean textboxKeyTyped(char c, int key) { int tValue = 0; - if(!super.textboxKeyTyped(c, key)) - return false; + if (!super.textboxKeyTyped(c, key)) return false; int cursorPos = this.getCursorPosition(); @@ -281,12 +315,11 @@ public abstract class GT_Cover_RedstoneWirelessBase extends GT_CoverBehavior { if (tText.length() > 0) { try { tValue = Integer.parseInt(tText); - } catch (NumberFormatException ignored) {} + } catch (NumberFormatException ignored) { + } - if (tValue > MAX_CHANNEL) - setText(String.valueOf(MAX_CHANNEL)); - else - setText(String.valueOf(tValue)); + if (tValue > MAX_CHANNEL) setText(String.valueOf(MAX_CHANNEL)); + else setText(String.valueOf(tValue)); setCursorPosition(cursorPos); } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Screen.java b/src/main/java/gregtech/common/covers/GT_Cover_Screen.java index c0de124a7a..393f5ee4b4 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Screen.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Screen.java @@ -7,7 +7,8 @@ import net.minecraftforge.fluids.Fluid; public class GT_Cover_Screen extends GT_CoverBehavior { @Override - public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public boolean isRedstoneSensitive( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { return false; } @@ -62,22 +63,33 @@ public class GT_Cover_Screen extends GT_CoverBehavior { } @Override - public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + public boolean manipulatesSidedRedstoneOutput( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return false; } @Override - public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public boolean onCoverRightclick( + byte aSide, + int aCoverID, + int aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { return false; } @Override - public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) { + public boolean onCoverRemoval( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) { return true; } @Override - public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public int doCoverThings( + byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { return 0; } } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java b/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java index bf6ecc3a56..9a2ceac09b 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java @@ -17,17 +17,27 @@ import net.minecraftforge.fluids.Fluid; public class GT_Cover_Shutter extends GT_CoverBehavior { @Override - public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public boolean isRedstoneSensitive( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { return false; } @Override - public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public int doCoverThings( + byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { return aCoverVariable; } @Override - public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public int onCoverScrewdriverclick( + byte aSide, + int aCoverID, + int aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { aCoverVariable = (aCoverVariable + (aPlayer.isSneaking() ? -1 : 1)) % 4; if (aCoverVariable < 0) { aCoverVariable = 3; @@ -54,42 +64,66 @@ public class GT_Cover_Shutter extends GT_CoverBehavior { @Override public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return aCoverVariable >= 2 ? aCoverVariable == 3 : !(aTileEntity instanceof IMachineProgress) || (((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0)); + return aCoverVariable >= 2 + ? aCoverVariable == 3 + : !(aTileEntity instanceof IMachineProgress) + || (((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0)); } @Override public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return aCoverVariable >= 2 ? aCoverVariable == 2 : !(aTileEntity instanceof IMachineProgress) || (((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0)); + return aCoverVariable >= 2 + ? aCoverVariable == 2 + : !(aTileEntity instanceof IMachineProgress) + || (((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0)); } @Override public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return aCoverVariable >= 2 ? aCoverVariable == 3 : !(aTileEntity instanceof IMachineProgress) || (((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0)); + return aCoverVariable >= 2 + ? aCoverVariable == 3 + : !(aTileEntity instanceof IMachineProgress) + || (((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0)); } @Override public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return aCoverVariable >= 2 ? aCoverVariable == 2 : !(aTileEntity instanceof IMachineProgress) || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0); + return aCoverVariable >= 2 + ? aCoverVariable == 2 + : !(aTileEntity instanceof IMachineProgress) + || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0); } @Override public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - return aCoverVariable >= 2 ? aCoverVariable == 3 : !(aTileEntity instanceof IMachineProgress) || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0); + return aCoverVariable >= 2 + ? aCoverVariable == 3 + : !(aTileEntity instanceof IMachineProgress) + || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0); } @Override public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - return aCoverVariable >= 2 ? aCoverVariable == 2 : !(aTileEntity instanceof IMachineProgress) || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0); + return aCoverVariable >= 2 + ? aCoverVariable == 2 + : !(aTileEntity instanceof IMachineProgress) + || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0); } @Override public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { - return aCoverVariable >= 2 ? aCoverVariable == 3 : !(aTileEntity instanceof IMachineProgress) || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0); + return aCoverVariable >= 2 + ? aCoverVariable == 3 + : !(aTileEntity instanceof IMachineProgress) + || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0); } @Override public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { - return aCoverVariable >= 2 ? aCoverVariable == 2 : !(aTileEntity instanceof IMachineProgress) || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0); + return aCoverVariable >= 2 + ? aCoverVariable == 2 + : !(aTileEntity instanceof IMachineProgress) + || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0); } @Override @@ -105,14 +139,13 @@ public class GT_Cover_Shutter extends GT_CoverBehavior { /** * GUI Stuff */ - @Override public boolean hasCoverGUI() { return true; } @Override - public Object getClientGUI(byte aSide, int aCoverID, int coverData, ICoverable aTileEntity) { + public Object getClientGUI(byte aSide, int aCoverID, int coverData, ICoverable aTileEntity) { return new GUI(aSide, aCoverID, coverData, aTileEntity); } @@ -134,23 +167,35 @@ public class GT_Cover_Shutter extends GT_CoverBehavior { this.coverID = aCoverID; this.coverVariable = aCoverVariable; - new GT_GuiIconCheckButton(this, 0, startX + spaceX*0, startY+spaceY*0, GT_GuiIcon.CHECKMARK, null); - new GT_GuiIconCheckButton(this, 1, startX + spaceX*0, startY+spaceY*1, GT_GuiIcon.CHECKMARK, null); - new GT_GuiIconCheckButton(this, 2, startX + spaceX*0, startY+spaceY*2, GT_GuiIcon.CHECKMARK, null); - new GT_GuiIconCheckButton(this, 3, startX + spaceX*0, startY+spaceY*3, GT_GuiIcon.CHECKMARK, null); + new GT_GuiIconCheckButton(this, 0, startX + spaceX * 0, startY + spaceY * 0, GT_GuiIcon.CHECKMARK, null); + new GT_GuiIconCheckButton(this, 1, startX + spaceX * 0, startY + spaceY * 1, GT_GuiIcon.CHECKMARK, null); + new GT_GuiIconCheckButton(this, 2, startX + spaceX * 0, startY + spaceY * 2, GT_GuiIcon.CHECKMARK, null); + new GT_GuiIconCheckButton(this, 3, startX + spaceX * 0, startY + spaceY * 3, GT_GuiIcon.CHECKMARK, null); } @Override public void drawExtras(int mouseX, int mouseY, float parTicks) { super.drawExtras(mouseX, mouseY, parTicks); - this.fontRendererObj.drawString(GT_Utility.trans("082", "Open if work enabled"), - 3+startX + spaceX*1, 4+startY+spaceY*0, textColor); - this.fontRendererObj.drawString(GT_Utility.trans("083", "Open if work disabled"), - 3+startX + spaceX*1, 4+startY+spaceY*1, textColor); - this.fontRendererObj.drawString(GT_Utility.trans("084", "Only Output allowed"), - 3+startX + spaceX*1, 4+startY+spaceY*2, textColor); - this.fontRendererObj.drawString(GT_Utility.trans("085", "Only Input allowed"), - 3+startX + spaceX*1, 4+startY+spaceY*3, textColor); + this.fontRendererObj.drawString( + GT_Utility.trans("082", "Open if work enabled"), + 3 + startX + spaceX * 1, + 4 + startY + spaceY * 0, + textColor); + this.fontRendererObj.drawString( + GT_Utility.trans("083", "Open if work disabled"), + 3 + startX + spaceX * 1, + 4 + startY + spaceY * 1, + textColor); + this.fontRendererObj.drawString( + GT_Utility.trans("084", "Only Output allowed"), + 3 + startX + spaceX * 1, + 4 + startY + spaceY * 2, + textColor); + this.fontRendererObj.drawString( + GT_Utility.trans("085", "Only Input allowed"), + 3 + startX + spaceX * 1, + 4 + startY + spaceY * 3, + textColor); } @Override @@ -159,15 +204,15 @@ public class GT_Cover_Shutter extends GT_CoverBehavior { } @Override - public void buttonClicked(GuiButton btn){ - if (!isEnabled(btn.id)){ + public void buttonClicked(GuiButton btn) { + if (!isEnabled(btn.id)) { coverVariable = getNewCoverVariable(btn.id, ((GT_GuiIconCheckButton) btn).isChecked()); GT_Values.NW.sendToServer(new GT_Packet_TileEntityCover(side, coverID, coverVariable, tile)); } updateButtons(); } - private void updateButtons(){ + private void updateButtons() { for (Object o : buttonList) ((GT_GuiIconCheckButton) o).setChecked(isEnabled(((GT_GuiIconCheckButton) o).id)); } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java b/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java index 09a9d5ab69..de1a0c7617 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java @@ -1,5 +1,7 @@ package gregtech.common.covers; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; + import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.util.GT_CoverBehavior; import gregtech.api.util.GT_Utility; @@ -8,8 +10,6 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; - public class GT_Cover_SolarPanel extends GT_CoverBehavior { private final int mVoltage; @@ -18,88 +18,107 @@ public class GT_Cover_SolarPanel extends GT_CoverBehavior { } @Override - public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public boolean isRedstoneSensitive( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { return false; } @Override - public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { - if(aSide != 1)return 0; - int coverState=aCoverVariable&0x3; - int coverNum=aCoverVariable>>2; + public int doCoverThings( + byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + if (aSide != 1) return 0; + int coverState = aCoverVariable & 0x3; + int coverNum = aCoverVariable >> 2; if (aTimer % 100L == 0L) { if (aTileEntity.getWorld().isThundering()) { - return aTileEntity.getBiome().rainfall > 0.0F && aTileEntity.getSkyAtSide(aSide) ? Math.min(20,coverNum)<<2 : coverNum<<2; + return aTileEntity.getBiome().rainfall > 0.0F && aTileEntity.getSkyAtSide(aSide) + ? Math.min(20, coverNum) << 2 + : coverNum << 2; } else { - if(aTileEntity.getWorld().isRaining() && aTileEntity.getBiome().rainfall > 0.0F){//really rains - if(aTileEntity.getSkyAtSide(aSide)) coverNum=Math.min(30,coverNum); - if(aTileEntity.getWorld().skylightSubtracted >= 4){ - if(aTileEntity.getWorld().isDaytime()){ - coverState=2; - }else{ - return coverNum<<2; + if (aTileEntity.getWorld().isRaining() && aTileEntity.getBiome().rainfall > 0.0F) { // really rains + if (aTileEntity.getSkyAtSide(aSide)) coverNum = Math.min(30, coverNum); + if (aTileEntity.getWorld().skylightSubtracted >= 4) { + if (aTileEntity.getWorld().isDaytime()) { + coverState = 2; + } else { + return coverNum << 2; } } - }else{//not rains - if(aTileEntity.getWorld().isDaytime()){ - coverState=1; - }else{ - coverState=2; + } else { // not rains + if (aTileEntity.getWorld().isDaytime()) { + coverState = 1; + } else { + coverState = 2; } } } } - if (coverState == 1 ) { - aTileEntity.injectEnergyUnits((byte) 6, ((100L-(long)coverNum)*((long)this.mVoltage))/100L, 1L); - + if (coverState == 1) { + aTileEntity.injectEnergyUnits((byte) 6, ((100L - (long) coverNum) * ((long) this.mVoltage)) / 100L, 1L); } - if(aTimer % 28800L == 0L && coverNum<100 && (coverNum>10 || XSTR_INSTANCE.nextInt(3)==2)) - coverNum++; - return coverState+(coverNum<<2); + if (aTimer % 28800L == 0L && coverNum < 100 && (coverNum > 10 || XSTR_INSTANCE.nextInt(3) == 2)) coverNum++; + return coverState + (coverNum << 2); } @Override - protected boolean onCoverRightClickImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if(aPlayer.capabilities.isCreativeMode){ - GT_Utility.sendChatToPlayer(aPlayer,"Cleaned solar panel from "+(aCoverVariable.get()>>2)+"% dirt"); - aCoverVariable.set(aCoverVariable.get() & 0x3); + protected boolean onCoverRightClickImpl( + byte aSide, + int aCoverID, + ISerializableObject.LegacyCoverData aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { + if (aPlayer.capabilities.isCreativeMode) { + GT_Utility.sendChatToPlayer(aPlayer, "Cleaned solar panel from " + (aCoverVariable.get() >> 2) + "% dirt"); + aCoverVariable.set(aCoverVariable.get() & 0x3); return true; } - for(int i=0;i<aPlayer.inventory.mainInventory.length;i++){ - ItemStack is=aPlayer.inventory.mainInventory[i]; - if(is==null) continue; - if(is.getUnlocalizedName().equals(new ItemStack(Items.water_bucket).getUnlocalizedName())){ - aPlayer.inventory.mainInventory[i]=new ItemStack(Items.bucket); + for (int i = 0; i < aPlayer.inventory.mainInventory.length; i++) { + ItemStack is = aPlayer.inventory.mainInventory[i]; + if (is == null) continue; + if (is.getUnlocalizedName().equals(new ItemStack(Items.water_bucket).getUnlocalizedName())) { + aPlayer.inventory.mainInventory[i] = new ItemStack(Items.bucket); if (aPlayer.inventoryContainer != null) aPlayer.inventoryContainer.detectAndSendChanges(); - GT_Utility.sendChatToPlayer(aPlayer,"Cleaned solar panel from "+(aCoverVariable.get()>>2)+"% dirt"); + GT_Utility.sendChatToPlayer( + aPlayer, "Cleaned solar panel from " + (aCoverVariable.get() >> 2) + "% dirt"); aCoverVariable.set(aCoverVariable.get() & 0x3); return true; } } - GT_Utility.sendChatToPlayer(aPlayer,"You need water bucket in inventory to clean the panel."); + GT_Utility.sendChatToPlayer(aPlayer, "You need water bucket in inventory to clean the panel."); return false; } @Override @SuppressWarnings("deprecation") - public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if(aPlayer.capabilities.isCreativeMode){ - GT_Utility.sendChatToPlayer(aPlayer,"Cleaned solar panel from "+(aCoverVariable>>2)+"% dirt"); + public boolean onCoverRightclick( + byte aSide, + int aCoverID, + int aCoverVariable, + ICoverable aTileEntity, + EntityPlayer aPlayer, + float aX, + float aY, + float aZ) { + if (aPlayer.capabilities.isCreativeMode) { + GT_Utility.sendChatToPlayer(aPlayer, "Cleaned solar panel from " + (aCoverVariable >> 2) + "% dirt"); aTileEntity.setCoverDataAtSide(aSide, (aCoverVariable & 0x3)); return true; } - for(int i=0;i<aPlayer.inventory.mainInventory.length;i++){ - ItemStack is=aPlayer.inventory.mainInventory[i]; - if(is==null) continue; - if(is.getUnlocalizedName().equals(new ItemStack(Items.water_bucket).getUnlocalizedName())){ - aPlayer.inventory.mainInventory[i]=new ItemStack(Items.bucket); + for (int i = 0; i < aPlayer.inventory.mainInventory.length; i++) { + ItemStack is = aPlayer.inventory.mainInventory[i]; + if (is == null) continue; + if (is.getUnlocalizedName().equals(new ItemStack(Items.water_bucket).getUnlocalizedName())) { + aPlayer.inventory.mainInventory[i] = new ItemStack(Items.bucket); if (aPlayer.inventoryContainer != null) aPlayer.inventoryContainer.detectAndSendChanges(); - GT_Utility.sendChatToPlayer(aPlayer,"Cleaned solar panel from "+(aCoverVariable>>2)+"% dirt"); + GT_Utility.sendChatToPlayer(aPlayer, "Cleaned solar panel from " + (aCoverVariable >> 2) + "% dirt"); aTileEntity.setCoverDataAtSide(aSide, (aCoverVariable & 0x3)); return true; } } - GT_Utility.sendChatToPlayer(aPlayer,"You need water bucket in inventory to clean the panel."); + GT_Utility.sendChatToPlayer(aPlayer, "You need water bucket in inventory to clean the panel."); return false; } @@ -107,7 +126,7 @@ public class GT_Cover_SolarPanel extends GT_CoverBehavior { public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } - + @Override public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return 1; diff --git a/src/main/java/gregtech/common/covers/GT_Cover_SteamValve.java b/src/main/java/gregtech/common/covers/GT_Cover_SteamValve.java index 8d4ac949b7..068576e8ca 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_SteamValve.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_SteamValve.java @@ -11,7 +11,8 @@ public class GT_Cover_SteamValve extends GT_Cover_Pump { } @Override - public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public boolean isRedstoneSensitive( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { return false; } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Vent.java b/src/main/java/gregtech/common/covers/GT_Cover_Vent.java index f6b9afa005..1208816d7d 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Vent.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Vent.java @@ -1,5 +1,8 @@ package gregtech.common.covers; +import static gregtech.api.enums.GT_Values.SIDE_UNKNOWN; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; + import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.interfaces.tileentity.IMachineProgress; import gregtech.api.util.GT_CoverBehavior; @@ -13,9 +16,6 @@ import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; -import static gregtech.api.enums.GT_Values.SIDE_UNKNOWN; -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; - public class GT_Cover_Vent extends GT_CoverBehavior { private final int mEfficiency; private final Fluid IC2_HOT_COOLANT = FluidRegistry.getFluid("ic2hotcoolant"); @@ -26,12 +26,14 @@ public class GT_Cover_Vent extends GT_CoverBehavior { } @Override - public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public boolean isRedstoneSensitive( + byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { return false; } @Override - public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + public int doCoverThings( + byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { if (aSide == SIDE_UNKNOWN) return 0; int ret = 0; if (aTileEntity instanceof IFluidHandler) { @@ -107,10 +109,8 @@ public class GT_Cover_Vent extends GT_CoverBehavior { return 0; // Vent cover need water or air } if (chances > XSTR_INSTANCE.nextInt(10000)) { - final FluidStack hotFluidStack = - fluidHandler.drain(ForgeDirection.UNKNOWN, Integer.MAX_VALUE, true); - final FluidStack coldFluidStack = - new FluidStack(IC2_COOLANT, hotFluidStack.amount); + final FluidStack hotFluidStack = fluidHandler.drain(ForgeDirection.UNKNOWN, Integer.MAX_VALUE, true); + final FluidStack coldFluidStack = new FluidStack(IC2_COOLANT, hotFluidStack.amount); fluidHandler.fill(ForgeDirection.UNKNOWN, coldFluidStack, true); return hotFluidStack.amount; } diff --git a/src/main/java/gregtech/common/entities/GT_EntityFXPollution.java b/src/main/java/gregtech/common/entities/GT_EntityFXPollution.java index b44f90f7ea..5cb81ab20d 100644 --- a/src/main/java/gregtech/common/entities/GT_EntityFXPollution.java +++ b/src/main/java/gregtech/common/entities/GT_EntityFXPollution.java @@ -1,14 +1,13 @@ package gregtech.common.entities; +import java.util.Random; import net.minecraft.client.particle.EntityFX; import net.minecraft.world.World; -import java.util.Random; - public class GT_EntityFXPollution extends EntityFX { public GT_EntityFXPollution(World world, double x, double y, double z) { - super(world, x, y, z,0 ,0 ,0); + super(world, x, y, z, 0, 0, 0); this.particleRed = 0.25F; this.particleGreen = 0.2F; @@ -26,7 +25,7 @@ public class GT_EntityFXPollution extends EntityFX { this.particleTextureIndexX = 0; this.particleTextureIndexY = 0; - this.particleMaxAge = (int)((double)20 / ((double)random.nextFloat() * 0.8D + 0.2D)); + this.particleMaxAge = (int) ((double) 20 / ((double) random.nextFloat() * 0.8D + 0.2D)); this.particleScale *= 0.75F; this.noClip = true; diff --git a/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java b/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java index d6e2995500..028b3199f7 100644 --- a/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java +++ b/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java @@ -6,6 +6,8 @@ import gregtech.api.objects.ItemData; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.api.util.WorldSpawnedEventBuilder; +import java.util.List; +import java.util.UUID; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.enchantment.Enchantment; @@ -28,9 +30,6 @@ import net.minecraft.world.World; import net.minecraft.world.WorldServer; import net.minecraftforge.common.util.FakePlayerFactory; -import java.util.List; -import java.util.UUID; - public class GT_Entity_Arrow extends EntityArrow { private int mHitBlockX = -1; private int mHitBlockY = -1; @@ -73,8 +72,10 @@ public class GT_Entity_Arrow extends EntityArrow { Entity tShootingEntity = this.shootingEntity; if ((this.prevRotationPitch == 0.0F) && (this.prevRotationYaw == 0.0F)) { float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); - this.prevRotationYaw = (this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / 3.141592653589793D)); - this.prevRotationPitch = (this.rotationPitch = (float) (Math.atan2(this.motionY, f) * 180.0D / 3.141592653589793D)); + this.prevRotationYaw = + (this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / 3.141592653589793D)); + this.prevRotationPitch = + (this.rotationPitch = (float) (Math.atan2(this.motionY, f) * 180.0D / 3.141592653589793D)); } if (this.mTicksAlive++ == 3000) { setDead(); @@ -82,8 +83,10 @@ public class GT_Entity_Arrow extends EntityArrow { Block tBlock = this.worldObj.getBlock(this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ); if (tBlock.getMaterial() != Material.air) { tBlock.setBlockBoundsBasedOnState(this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ); - AxisAlignedBB axisalignedbb = tBlock.getCollisionBoundingBoxFromPool(this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ); - if ((axisalignedbb != null) && (axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ)))) { + AxisAlignedBB axisalignedbb = tBlock.getCollisionBoundingBoxFromPool( + this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ); + if ((axisalignedbb != null) + && (axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ)))) { this.inGround = true; } } @@ -103,15 +106,21 @@ public class GT_Entity_Arrow extends EntityArrow { } else { this.ticksInAir += 1; Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); - Vec3 vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + Vec3 vec3 = Vec3.createVectorHelper( + this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); MovingObjectPosition tVector = this.worldObj.func_147447_a(vec31, vec3, false, true, false); vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); - vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + vec3 = Vec3.createVectorHelper( + this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); if (tVector != null) { vec3 = Vec3.createVectorHelper(tVector.hitVec.xCoord, tVector.hitVec.yCoord, tVector.hitVec.zCoord); } Entity tHitEntity = null; - List tAllPotentiallyHitEntities = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); + List tAllPotentiallyHitEntities = this.worldObj.getEntitiesWithinAABBExcludingEntity( + this, + this.boundingBox + .addCoord(this.motionX, this.motionY, this.motionZ) + .expand(1.0D, 1.0D, 1.0D)); double tLargestDistance = 1.7976931348623157E+308D; for (int i = 0; i < tAllPotentiallyHitEntities.size(); i++) { Entity entity1 = (Entity) tAllPotentiallyHitEntities.get(i); @@ -132,7 +141,9 @@ public class GT_Entity_Arrow extends EntityArrow { } if ((tVector != null) && ((tVector.entityHit instanceof EntityPlayer))) { EntityPlayer entityplayer = (EntityPlayer) tVector.entityHit; - if ((entityplayer.capabilities.disableDamage) || (((tShootingEntity instanceof EntityPlayer)) && (!((EntityPlayer) tShootingEntity).canAttackPlayer(entityplayer)))) { + if ((entityplayer.capabilities.disableDamage) + || (((tShootingEntity instanceof EntityPlayer)) + && (!((EntityPlayer) tShootingEntity).canAttackPlayer(entityplayer)))) { tVector = null; } } @@ -140,17 +151,37 @@ public class GT_Entity_Arrow extends EntityArrow { if (tVector.entityHit != null) { ItemData tData = GT_OreDictUnificator.getItemData(this.mArrow); - - float tMagicDamage = (tVector.entityHit instanceof EntityLivingBase) ? EnchantmentHelper.func_152377_a(this.mArrow, ((EntityLivingBase) tVector.entityHit).getCreatureAttribute()) : 0.0F; - float tDamage = MathHelper.ceiling_double_int(MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ) * (getDamage() + ((tData != null) && (tData.mMaterial != null) && (tData.mMaterial.mMaterial != null) ? tData.mMaterial.mMaterial.mToolQuality / 2.0F - 1.0F : 0.0F))); + float tMagicDamage = (tVector.entityHit instanceof EntityLivingBase) + ? EnchantmentHelper.func_152377_a( + this.mArrow, ((EntityLivingBase) tVector.entityHit).getCreatureAttribute()) + : 0.0F; + float tDamage = MathHelper.ceiling_double_int(MathHelper.sqrt_double(this.motionX * this.motionX + + this.motionY * this.motionY + + this.motionZ * this.motionZ) + * (getDamage() + + ((tData != null) + && (tData.mMaterial != null) + && (tData.mMaterial.mMaterial != null) + ? tData.mMaterial.mMaterial.mToolQuality / 2.0F - 1.0F + : 0.0F))); if (getIsCritical()) { tDamage += this.rand.nextInt((int) (tDamage / 2.0D + 2.0D)); } - int tFireDamage = (isBurning() ? 5 : 0) + 4 * EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, this.mArrow); - int tKnockback = this.mKnockback + EnchantmentHelper.getEnchantmentLevel(Enchantment.knockback.effectId, this.mArrow); + int tFireDamage = (isBurning() ? 5 : 0) + + 4 * EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, this.mArrow); + int tKnockback = this.mKnockback + + EnchantmentHelper.getEnchantmentLevel(Enchantment.knockback.effectId, this.mArrow); int tHitTimer = -1; - int[] tDamages = onHitEntity(tVector.entityHit, tShootingEntity == null ? this : tShootingEntity, this.mArrow == null ? new ItemStack(Items.arrow, 1) : this.mArrow, (int) (tDamage * 2.0F), (int) (tMagicDamage * 2.0F), tKnockback, tFireDamage, tHitTimer); + int[] tDamages = onHitEntity( + tVector.entityHit, + tShootingEntity == null ? this : tShootingEntity, + this.mArrow == null ? new ItemStack(Items.arrow, 1) : this.mArrow, + (int) (tDamage * 2.0F), + (int) (tMagicDamage * 2.0F), + tKnockback, + tFireDamage, + tHitTimer); if (tDamages != null) { tDamage = tDamages[0] / 2.0F; tMagicDamage = tDamages[1] / 2.0F; @@ -160,10 +191,18 @@ public class GT_Entity_Arrow extends EntityArrow { if ((tFireDamage > 0) && (!(tVector.entityHit instanceof EntityEnderman))) { tVector.entityHit.setFire(tFireDamage); } - if ((!(tHitEntity instanceof EntityPlayer)) && (EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, this.mArrow) > 0)) { + if ((!(tHitEntity instanceof EntityPlayer)) + && (EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, this.mArrow) + > 0)) { EntityPlayer tPlayer = null; if ((this.worldObj instanceof WorldServer)) { - tPlayer = FakePlayerFactory.get((WorldServer) this.worldObj, new GameProfile(new UUID(0L, 0L), (tShootingEntity instanceof EntityLivingBase) ? ((EntityLivingBase) tShootingEntity).getCommandSenderName() : "Arrow")); + tPlayer = FakePlayerFactory.get( + (WorldServer) this.worldObj, + new GameProfile( + new UUID(0L, 0L), + (tShootingEntity instanceof EntityLivingBase) + ? ((EntityLivingBase) tShootingEntity).getCommandSenderName() + : "Arrow")); } if (tPlayer != null) { tPlayer.inventory.currentItem = 0; @@ -172,35 +211,59 @@ public class GT_Entity_Arrow extends EntityArrow { tPlayer.setDead(); } } - DamageSource tDamageSource = DamageSource.causeArrowDamage(this, tShootingEntity == null ? this : tShootingEntity); - if ((tDamage + tMagicDamage > 0.0F) && (tVector.entityHit.attackEntityFrom(tDamageSource, tDamage + tMagicDamage))) { + DamageSource tDamageSource = + DamageSource.causeArrowDamage(this, tShootingEntity == null ? this : tShootingEntity); + if ((tDamage + tMagicDamage > 0.0F) + && (tVector.entityHit.attackEntityFrom(tDamageSource, tDamage + tMagicDamage))) { if ((tVector.entityHit instanceof EntityLivingBase)) { if (tHitTimer >= 0) { tVector.entityHit.hurtResistantTime = tHitTimer; } - if (((tVector.entityHit instanceof EntityCreeper)) && (EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, this.mArrow) > 0)) { + if (((tVector.entityHit instanceof EntityCreeper)) + && (EnchantmentHelper.getEnchantmentLevel( + Enchantment.fireAspect.effectId, this.mArrow) + > 0)) { ((EntityCreeper) tVector.entityHit).func_146079_cb(); } EntityLivingBase tHitLivingEntity = (EntityLivingBase) tVector.entityHit; if (!this.worldObj.isRemote) { - tHitLivingEntity.setArrowCountInEntity(tHitLivingEntity.getArrowCountInEntity() + 1); + tHitLivingEntity.setArrowCountInEntity( + tHitLivingEntity.getArrowCountInEntity() + 1); } if (tKnockback > 0) { - float tKnockbackDivider = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + float tKnockbackDivider = MathHelper.sqrt_double( + this.motionX * this.motionX + this.motionZ * this.motionZ); if (tKnockbackDivider > 0.0F) { - tHitLivingEntity.addVelocity(this.motionX * tKnockback * 0.6000000238418579D / tKnockbackDivider, 0.1D, this.motionZ * tKnockback * 0.6000000238418579D / tKnockbackDivider); + tHitLivingEntity.addVelocity( + this.motionX * tKnockback * 0.6000000238418579D / tKnockbackDivider, + 0.1D, + this.motionZ * tKnockback * 0.6000000238418579D / tKnockbackDivider); } } - GT_Utility.GT_EnchantmentHelper.applyBullshitA(tHitLivingEntity, tShootingEntity == null ? this : tShootingEntity, this.mArrow); - GT_Utility.GT_EnchantmentHelper.applyBullshitB((tShootingEntity instanceof EntityLivingBase) ? (EntityLivingBase) tShootingEntity : null, tHitLivingEntity, this.mArrow); - if ((tShootingEntity != null) && (tHitLivingEntity != tShootingEntity) && ((tHitLivingEntity instanceof EntityPlayer)) && ((tShootingEntity instanceof EntityPlayerMP))) { - ((EntityPlayerMP) tShootingEntity).playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(6, 0.0F)); + GT_Utility.GT_EnchantmentHelper.applyBullshitA( + tHitLivingEntity, + tShootingEntity == null ? this : tShootingEntity, + this.mArrow); + GT_Utility.GT_EnchantmentHelper.applyBullshitB( + (tShootingEntity instanceof EntityLivingBase) + ? (EntityLivingBase) tShootingEntity + : null, + tHitLivingEntity, + this.mArrow); + if ((tShootingEntity != null) + && (tHitLivingEntity != tShootingEntity) + && ((tHitLivingEntity instanceof EntityPlayer)) + && ((tShootingEntity instanceof EntityPlayerMP))) { + ((EntityPlayerMP) tShootingEntity) + .playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(6, 0.0F)); } } if (((tShootingEntity instanceof EntityPlayer)) && (tMagicDamage > 0.0F)) { ((EntityPlayer) tShootingEntity).onEnchantmentCritical(tVector.entityHit); } - if ((!(tVector.entityHit instanceof EntityEnderman)) || (((EntityEnderman) tVector.entityHit).getActivePotionEffect(Potion.weakness) != null)) { + if ((!(tVector.entityHit instanceof EntityEnderman)) + || (((EntityEnderman) tVector.entityHit).getActivePotionEffect(Potion.weakness) + != null)) { if (tFireDamage > 0) { tVector.entityHit.setFire(tFireDamage); } @@ -221,11 +284,13 @@ public class GT_Entity_Arrow extends EntityArrow { this.mHitBlockY = tVector.blockY; this.mHitBlockZ = tVector.blockZ; this.mHitBlock = this.worldObj.getBlock(this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ); - this.mHitBlockMeta = this.worldObj.getBlockMetadata(this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ); + this.mHitBlockMeta = + this.worldObj.getBlockMetadata(this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ); this.motionX = ((float) (tVector.hitVec.xCoord - this.posX)); this.motionY = ((float) (tVector.hitVec.yCoord - this.posY)); this.motionZ = ((float) (tVector.hitVec.zCoord - this.posZ)); - float f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); + float f2 = MathHelper.sqrt_double( + this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); this.posX -= this.motionX / f2 * 0.0500000007450581D; this.posY -= this.motionY / f2 * 0.0500000007450581D; this.posZ -= this.motionZ / f2 * 0.0500000007450581D; @@ -234,37 +299,44 @@ public class GT_Entity_Arrow extends EntityArrow { this.arrowShake = 7; setIsCritical(false); if (this.mHitBlock.getMaterial() != Material.air) { - this.mHitBlock.onEntityCollidedWithBlock(this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ, this); + this.mHitBlock.onEntityCollidedWithBlock( + this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ, this); } - if ((!this.worldObj.isRemote) && (EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, this.mArrow) > 2)) { - GT_Utility.setCoordsOnFire(this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ, true); + if ((!this.worldObj.isRemote) + && (EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, this.mArrow) + > 2)) { + GT_Utility.setCoordsOnFire( + this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ, true); } if (breaksOnImpact()) { setDead(); } } } - WorldSpawnedEventBuilder.ParticleEventBuilder events = new WorldSpawnedEventBuilder.ParticleEventBuilder() - .setWorld(this.worldObj); + WorldSpawnedEventBuilder.ParticleEventBuilder events = + new WorldSpawnedEventBuilder.ParticleEventBuilder().setWorld(this.worldObj); if (getIsCritical()) { events.setIdentifier(ParticleFX.CRIT) .setMotion(-this.motionX, -this.motionY + 0.2D, -this.motionZ) - .<WorldSpawnedEventBuilder.ParticleEventBuilder>times(4, (x, i) -> - x.setPosition( - this.posX + this.motionX * i / 4.0D, - this.posY + this.motionY * i / 4.0D, - this.posZ + this.motionZ * i / 4.0D - ).run() - ); + .<WorldSpawnedEventBuilder.ParticleEventBuilder>times(4, (x, i) -> x.setPosition( + this.posX + this.motionX * i / 4.0D, + this.posY + this.motionY * i / 4.0D, + this.posZ + this.motionZ * i / 4.0D) + .run()); } this.posX += this.motionX; this.posY += this.motionY; this.posZ += this.motionZ; this.rotationYaw = ((float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / 3.141592653589793D)); - for (this.rotationPitch = ((float) (Math.atan2(this.motionY, MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ)) * 180.0D / 3.141592653589793D)); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) { - } + for (this.rotationPitch = ((float) (Math.atan2( + this.motionY, + MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ)) + * 180.0D + / 3.141592653589793D)); + this.rotationPitch - this.prevRotationPitch < -180.0F; + this.prevRotationPitch -= 360.0F) {} while (this.rotationPitch - this.prevRotationPitch >= 180.0F) { this.prevRotationPitch += 360.0F; } @@ -283,8 +355,7 @@ public class GT_Entity_Arrow extends EntityArrow { .setPosition( this.posX - this.motionX * 0.25D, this.posY - this.motionY * 0.25D, - this.posZ - this.motionZ * 0.25D - ) + this.posZ - this.motionZ * 0.25D) .times(4, Runnable::run); tFrictionMultiplier = 0.8F; } @@ -334,15 +405,27 @@ public class GT_Entity_Arrow extends EntityArrow { @Override public void onCollideWithPlayer(EntityPlayer aPlayer) { - if ((!this.worldObj.isRemote) && (this.inGround) && (this.arrowShake <= 0) && (this.canBePickedUp == 1) && (aPlayer.inventory.addItemStackToInventory(getArrowItem()))) { + if ((!this.worldObj.isRemote) + && (this.inGround) + && (this.arrowShake <= 0) + && (this.canBePickedUp == 1) + && (aPlayer.inventory.addItemStackToInventory(getArrowItem()))) { playSound("random.pop", 0.2F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F); aPlayer.onItemPickup(this, 1); setDead(); } } - public int[] onHitEntity(Entity aHitEntity, Entity aShootingEntity, ItemStack aArrow, int aRegularDamage, int aMagicDamage, int aKnockback, int aFireDamage, int aHitTimer) { - return new int[]{aRegularDamage, aMagicDamage, aKnockback, aFireDamage, aHitTimer}; + public int[] onHitEntity( + Entity aHitEntity, + Entity aShootingEntity, + ItemStack aArrow, + int aRegularDamage, + int aMagicDamage, + int aKnockback, + int aFireDamage, + int aHitTimer) { + return new int[] {aRegularDamage, aMagicDamage, aKnockback, aFireDamage, aHitTimer}; } public ItemStack getArrowItem() { diff --git a/src/main/java/gregtech/common/entities/GT_Entity_Arrow_Potion.java b/src/main/java/gregtech/common/entities/GT_Entity_Arrow_Potion.java index ccf645bf1c..ec98099ba8 100644 --- a/src/main/java/gregtech/common/entities/GT_Entity_Arrow_Potion.java +++ b/src/main/java/gregtech/common/entities/GT_Entity_Arrow_Potion.java @@ -50,14 +50,25 @@ public class GT_Entity_Arrow_Potion extends GT_Entity_Arrow { } @Override - public int[] onHitEntity(Entity aHitEntity, Entity aShootingEntity, ItemStack aArrow, int aRegularDamage, int aMagicDamage, int aKnockback, int aFireDamage, int aHitTimer) { + public int[] onHitEntity( + Entity aHitEntity, + Entity aShootingEntity, + ItemStack aArrow, + int aRegularDamage, + int aMagicDamage, + int aKnockback, + int aFireDamage, + int aHitTimer) { if ((aHitEntity instanceof EntityLivingBase)) { for (int i = 3; i < this.mPotions.length; i += 4) { if (aHitEntity.worldObj.rand.nextInt(100) < this.mPotions[i]) { - ((EntityLivingBase) aHitEntity).addPotionEffect(new PotionEffect(this.mPotions[(i - 3)], this.mPotions[(i - 2)], this.mPotions[(i - 1)], false)); + ((EntityLivingBase) aHitEntity) + .addPotionEffect(new PotionEffect( + this.mPotions[(i - 3)], this.mPotions[(i - 2)], this.mPotions[(i - 1)], false)); } } } - return super.onHitEntity(aHitEntity, aShootingEntity, aArrow, 1, aMagicDamage, aKnockback, aFireDamage, aHitTimer); + return super.onHitEntity( + aHitEntity, aShootingEntity, aArrow, 1, aMagicDamage, aKnockback, aFireDamage, aHitTimer); } } diff --git a/src/main/java/gregtech/common/gui/GT_Container_Boiler.java b/src/main/java/gregtech/common/gui/GT_Container_Boiler.java index d534c2e8ba..a29e732f07 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_Boiler.java +++ b/src/main/java/gregtech/common/gui/GT_Container_Boiler.java @@ -14,6 +14,7 @@ public class GT_Container_Boiler extends GT_ContainerMetaTile_Machine { public int mSteamAmount = 0; public int mProcessingEnergy = 0; public int mTemperature = 2; + public GT_Container_Boiler(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(aInventoryPlayer, aTileEntity); } @@ -48,13 +49,25 @@ public class GT_Container_Boiler extends GT_ContainerMetaTile_Machine { this.mTemperature = ((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).mTemperature; this.mProcessingEnergy = ((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).mProcessingEnergy; - this.mSteamAmount = (((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).mSteam == null ? 0 : ((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).mSteam.amount); - this.mWaterAmount = (((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).mFluid == null ? 0 : ((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).mFluid.amount); + this.mSteamAmount = (((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).mSteam == null + ? 0 + : ((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).mSteam.amount); + this.mWaterAmount = (((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).mFluid == null + ? 0 + : ((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).mFluid.amount); - this.mTemperature = Math.min(54, Math.max(0, this.mTemperature * 54 / (((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).maxProgresstime() - 10))); + this.mTemperature = Math.min( + 54, + Math.max( + 0, + this.mTemperature + * 54 + / (((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).maxProgresstime() + - 10))); this.mSteamAmount = Math.min(54, Math.max(0, this.mSteamAmount * 54 / (capacity - 100))); this.mWaterAmount = Math.min(54, Math.max(0, this.mWaterAmount * 54 / (capacity - 100))); - this.mProcessingEnergy = Math.min(14, Math.max(this.mProcessingEnergy > 0 ? 1 : 0, this.mProcessingEnergy * 14 / 1000)); + this.mProcessingEnergy = + Math.min(14, Math.max(this.mProcessingEnergy > 0 ? 1 : 0, this.mProcessingEnergy * 14 / 1000)); for (Object crafter : this.crafters) { ICrafting player = (ICrafting) crafter; diff --git a/src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java b/src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java index 827a7d2d10..afa22a738b 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java +++ b/src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java @@ -39,38 +39,50 @@ public class GT_Container_ChestBuffer extends GT_ContainerMetaTile_Machine { return null; } if (aSlotIndex == 27) { - ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput); + ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput = + (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput); if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("116","Emit Energy to Outputside")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("116", "Emit Energy to Outputside")); } else { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("117","Don't emit Energy")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("117", "Don't emit Energy")); } return null; } if (aSlotIndex == 28) { - ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull); + ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = + (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull); if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("118","Emit Redstone if no Slot is free")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("118", "Emit Redstone if no Slot is free")); } else { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("119","Don't emit Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("119", "Don't emit Redstone")); } return null; } if (aSlotIndex == 29) { - ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert); + ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert = + (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert); if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("120","Invert Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("120", "Invert Redstone")); } else { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("121","Don't invert Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("121", "Don't invert Redstone")); } return null; } if (aSlotIndex == 30) { - ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bStockingMode = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bStockingMode); + ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bStockingMode = + (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bStockingMode); if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bStockingMode) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("217","Stocking mode. Keeps this many items in destination input slots. This mode can be server unfriendly.")); + GT_Utility.sendChatToPlayer( + aPlayer, + GT_Utility.trans( + "217", + "Stocking mode. Keeps this many items in destination input slots. This mode can be server unfriendly.")); } else { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("218", "Transfer size mode. Add exactly this many items in destination input slots as long as there is room.")); + GT_Utility.sendChatToPlayer( + aPlayer, + GT_Utility.trans( + "218", + "Transfer size mode. Add exactly this many items in destination input slots as long as there is room.")); } return null; } diff --git a/src/main/java/gregtech/common/gui/GT_Container_Filter.java b/src/main/java/gregtech/common/gui/GT_Container_Filter.java index 7ca72b8e3a..d4aabe0cb4 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_Filter.java +++ b/src/main/java/gregtech/common/gui/GT_Container_Filter.java @@ -61,56 +61,64 @@ public class GT_Container_Filter extends GT_ContainerMetaTile_Machine { if (aMouseclick == 0) { tSlot.putStack(null); } else if (tStack != null) { - tStack = GT_Utility.copyAmountAndMetaData(tStack.stackSize, 32767, tStack); - if(GT_Utility.isStackInvalid(tStack)){tStack=null;} + tStack = GT_Utility.copyAmountAndMetaData(tStack.stackSize, 32767, tStack); + if (GT_Utility.isStackInvalid(tStack)) { + tStack = null; + } } } else { - tSlot.putStack(GT_Utility.copyAmount(1L, new Object[]{tStack})); + tSlot.putStack(GT_Utility.copyAmount(1L, new Object[] {tStack})); } return null; } if (aSlotIndex == 18) { - ((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bOutput); + ((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bOutput = + (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bOutput); if (((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bOutput) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("116","Emit Energy to Outputside")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("116", "Emit Energy to Outputside")); } else { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("117","Don't emit Energy")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("117", "Don't emit Energy")); } return null; } if (aSlotIndex == 19) { - ((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull); + ((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = + (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull); if (((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("122","Emit Redstone if slots contain something")); + GT_Utility.sendChatToPlayer( + aPlayer, GT_Utility.trans("122", "Emit Redstone if slots contain something")); } else { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("123","Don't emit Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("123", "Don't emit Redstone")); } return null; } if (aSlotIndex == 20) { - ((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvert = (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvert); + ((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvert = + (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvert); if (((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvert) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("120","Invert Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("120", "Invert Redstone")); } else { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("121","Don't invert Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("121", "Don't invert Redstone")); } return null; } if (aSlotIndex == 21) { - ((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvertFilter = (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvertFilter); + ((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvertFilter = + (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvertFilter); if (((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvertFilter) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("124","Invert Filter")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("124", "Invert Filter")); } else { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("125","Don't invert Filter")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("125", "Don't invert Filter")); } return null; } if (aSlotIndex == 22) { - ((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bIgnoreNBT = (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bIgnoreNBT); + ((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bIgnoreNBT = + (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bIgnoreNBT); if (((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bIgnoreNBT) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("126","Ignore NBT")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("126", "Ignore NBT")); } else { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("127","NBT has to match")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("127", "NBT has to match")); } return null; } diff --git a/src/main/java/gregtech/common/gui/GT_Container_IndustrialApiary.java b/src/main/java/gregtech/common/gui/GT_Container_IndustrialApiary.java index 26170a9478..b2a2c4cae1 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_IndustrialApiary.java +++ b/src/main/java/gregtech/common/gui/GT_Container_IndustrialApiary.java @@ -11,6 +11,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_ApiaryUpgrade; import gregtech.api.util.GT_Utility; import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_IndustrialApiary; +import java.util.ArrayList; import net.bdew.gendustry.api.items.IApiaryUpgrade; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; @@ -21,8 +22,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; -import java.util.ArrayList; - public class GT_Container_IndustrialApiary extends GT_ContainerMetaTile_Machine { GT_Slot_Holo slotItemTransferToggle; @@ -60,13 +59,12 @@ public class GT_Container_IndustrialApiary extends GT_ContainerMetaTile_Machine slotUpgrade.add(addSlotToContainer(new ApiarySlot(this.mTileEntity, tStartIndex++, 62, 42))); slotUpgrade.add(addSlotToContainer(new ApiarySlot(this.mTileEntity, tStartIndex++, 80, 42))); - for(int i = 107; i <= 143; i += 18) - for(int j = 6; j <= 42; j += 18) + for (int i = 107; i <= 143; i += 18) + for (int j = 6; j <= 42; j += 18) addSlotToContainer(new GT_Slot_Output(this.mTileEntity, tStartIndex++, i, j)); addSlotToContainer(slotBattery = new Slot(mTileEntity, 1, 80, 63)); addSlotToContainer(slotSpecial = new Slot(mTileEntity, 3, 125, 63)); - } @Override @@ -79,24 +77,18 @@ public class GT_Container_IndustrialApiary extends GT_ContainerMetaTile_Machine machine.mItemTransfer = !machine.mItemTransfer; return null; case 1: - if(aMouseclick == 0) { - if(machine.mLockedSpeed) - return null; - if(aShifthold == 0) { + if (aMouseclick == 0) { + if (machine.mLockedSpeed) return null; + if (aShifthold == 0) { machine.mSpeed++; if (machine.mSpeed > machine.getMaxSpeed()) machine.mSpeed = 0; - } - else if(aShifthold == 1) - { + } else if (aShifthold == 1) { machine.mSpeed--; if (machine.mSpeed < 0) machine.mSpeed = machine.getMaxSpeed(); } - } - else if(aMouseclick == 1) - { + } else if (aMouseclick == 1) { machine.mLockedSpeed = !machine.mLockedSpeed; - if(machine.mLockedSpeed) - machine.mSpeed = machine.getMaxSpeed(); + if (machine.mLockedSpeed) machine.mSpeed = machine.getMaxSpeed(); } return null; case 2: @@ -105,39 +97,28 @@ public class GT_Container_IndustrialApiary extends GT_ContainerMetaTile_Machine return null; } - if(!(aSlotNumber >= getSlotStartIndex()+2 && aSlotNumber < getSlotStartIndex()+2+4)) - return super.slotClick(aSlotNumber, aMouseclick, aShifthold, aPlayer); - if(aShifthold == 5) - return null; - if(aShifthold != 0) - return super.slotClick(aSlotNumber, aMouseclick, aShifthold, aPlayer); - if(aMouseclick > 1) + if (!(aSlotNumber >= getSlotStartIndex() + 2 && aSlotNumber < getSlotStartIndex() + 2 + 4)) return super.slotClick(aSlotNumber, aMouseclick, aShifthold, aPlayer); + if (aShifthold == 5) return null; + if (aShifthold != 0) return super.slotClick(aSlotNumber, aMouseclick, aShifthold, aPlayer); + if (aMouseclick > 1) return super.slotClick(aSlotNumber, aMouseclick, aShifthold, aPlayer); ItemStack s = aPlayer.inventory.getItemStack(); - if(s == null) - return super.slotClick(aSlotNumber, aMouseclick, aShifthold, aPlayer); + if (s == null) return super.slotClick(aSlotNumber, aMouseclick, aShifthold, aPlayer); Slot slot = getSlot(aSlotNumber); ItemStack slotstack = slot.getStack(); - if(slotstack != null && !GT_Utility.areStacksEqual(slotstack, s)) - return null; // super would replace item - if(slotstack == null && !slot.isItemValid(s)) + if (slotstack != null && !GT_Utility.areStacksEqual(slotstack, s)) return null; // super would replace item + if (slotstack == null && !slot.isItemValid(s)) return super.slotClick(aSlotNumber, aMouseclick, aShifthold, aPlayer); - if(!(s.getItem() instanceof IApiaryUpgrade) && !GT_ApiaryUpgrade.isUpgrade(s)) + if (!(s.getItem() instanceof IApiaryUpgrade) && !GT_ApiaryUpgrade.isUpgrade(s)) return super.slotClick(aSlotNumber, aMouseclick, aShifthold, aPlayer); int max = 1; - if (s.getItem() instanceof IApiaryUpgrade) - max = ((IApiaryUpgrade) s.getItem()).getMaxNumber(s); - else - max = GT_ApiaryUpgrade.getUpgrade(s).getMaxNumber(); - if(slotstack != null) - max = Math.max(0, max - slotstack.stackSize); + if (s.getItem() instanceof IApiaryUpgrade) max = ((IApiaryUpgrade) s.getItem()).getMaxNumber(s); + else max = GT_ApiaryUpgrade.getUpgrade(s).getMaxNumber(); + if (slotstack != null) max = Math.max(0, max - slotstack.stackSize); max = Math.min(max, s.stackSize); - if(max == 0) - return null; - if(aMouseclick == 1) - max = 1; - if(max == s.stackSize) - return super.slotClick(aSlotNumber, aMouseclick, aShifthold, aPlayer); + if (max == 0) return null; + if (aMouseclick == 1) max = 1; + if (max == s.stackSize) return super.slotClick(aSlotNumber, aMouseclick, aShifthold, aPlayer); ItemStack newstack = s.splitStack(s.stackSize - max); ItemStack result = super.slotClick(aSlotNumber, aMouseclick, aShifthold, aPlayer); aPlayer.inventory.setItemStack(newstack); @@ -151,7 +132,7 @@ public class GT_Container_IndustrialApiary extends GT_ContainerMetaTile_Machine @Override public int getSlotCount() { - return 6+9+2; + return 6 + 9 + 2; } @Override @@ -176,8 +157,7 @@ public class GT_Container_IndustrialApiary extends GT_ContainerMetaTile_Machine var1.sendProgressBarUpdate(this, 100, this.mSpeed); var1.sendProgressBarUpdate(this, 101, this.mItemTransfer ? 1 : 0); var1.sendProgressBarUpdate(this, 102, 0); - for(IErrorState s : getMachine().mErrorStates) - var1.sendProgressBarUpdate(this, 103, s.getID()); + for (IErrorState s : getMachine().mErrorStates) var1.sendProgressBarUpdate(this, 103, s.getID()); var1.sendProgressBarUpdate(this, 104, this.mStuttering ? 1 : 0); var1.sendProgressBarUpdate(this, 105, this.mLockedSpeed ? 1 : 0); } @@ -198,7 +178,11 @@ public class GT_Container_IndustrialApiary extends GT_ContainerMetaTile_Machine this.mErrorStates.clear(); break; case 103: - this.mErrorStates.add(EnumChatFormatting.RED + StatCollector.translateToLocal("for." + ForestryAPI.errorStateRegistry.getErrorState((short) par2).getDescription())); + this.mErrorStates.add(EnumChatFormatting.RED + + StatCollector.translateToLocal("for." + + ForestryAPI.errorStateRegistry + .getErrorState((short) par2) + .getDescription())); break; case 104: this.mStuttering = par2 == 1; @@ -216,33 +200,24 @@ public class GT_Container_IndustrialApiary extends GT_ContainerMetaTile_Machine @Override public ItemStack transferStackInSlot(EntityPlayer aPlayer, int aSlotIndex) { Slot s = getSlot(aSlotIndex); - if(s == null) - return super.transferStackInSlot(aPlayer, aSlotIndex); - if(!(s.inventory instanceof InventoryPlayer)) - return super.transferStackInSlot(aPlayer, aSlotIndex); + if (s == null) return super.transferStackInSlot(aPlayer, aSlotIndex); + if (!(s.inventory instanceof InventoryPlayer)) return super.transferStackInSlot(aPlayer, aSlotIndex); ItemStack aStack = s.getStack(); - if(aStack == null) + if (aStack == null) return super.transferStackInSlot(aPlayer, aSlotIndex); + if (!(aStack.getItem() instanceof IApiaryUpgrade) && !GT_ApiaryUpgrade.isUpgrade(aStack)) return super.transferStackInSlot(aPlayer, aSlotIndex); - if(!(aStack.getItem() instanceof IApiaryUpgrade) && !GT_ApiaryUpgrade.isUpgrade(aStack)) - return super.transferStackInSlot(aPlayer, aSlotIndex); - for(int i = getSlotStartIndex()+2; i < getSlotStartIndex()+2+4; i++) { + for (int i = getSlotStartIndex() + 2; i < getSlotStartIndex() + 2 + 4; i++) { Slot iSlot = getSlot(i); ItemStack iStack = iSlot.getStack(); - if(iStack == null) - { - if(!iSlot.isItemValid(aStack)) - continue; - } - else - { - if(!GT_Utility.areStacksEqual(aStack, iStack)) - continue; + if (iStack == null) { + if (!iSlot.isItemValid(aStack)) continue; + } else { + if (!GT_Utility.areStacksEqual(aStack, iStack)) continue; } int max = 1; if (aStack.getItem() instanceof IApiaryUpgrade) max = ((IApiaryUpgrade) aStack.getItem()).getMaxNumber(aStack); - else - max = GT_ApiaryUpgrade.getUpgrade(aStack).getMaxNumber(); + else max = GT_ApiaryUpgrade.getUpgrade(aStack).getMaxNumber(); if (iStack == null) { max = Math.min(max, aStack.stackSize); ItemStack newstack = aStack.splitStack(max); @@ -254,16 +229,14 @@ public class GT_Container_IndustrialApiary extends GT_ContainerMetaTile_Machine aStack.stackSize -= max; iSlot.onSlotChanged(); } - if (aStack.stackSize == 0) - s.putStack(null); - else - s.onSlotChanged(); + if (aStack.stackSize == 0) s.putStack(null); + else s.onSlotChanged(); break; } return null; } - private static class ApiarySlot extends Slot{ + private static class ApiarySlot extends Slot { public ApiarySlot(IInventory p_i1824_1_, int p_i1824_2_, int p_i1824_3_, int p_i1824_4_) { super(p_i1824_1_, p_i1824_2_, p_i1824_3_, p_i1824_4_); @@ -277,7 +250,8 @@ public class GT_Container_IndustrialApiary extends GT_ContainerMetaTile_Machine @Override public void onSlotChanged() { super.onSlotChanged(); - ((GT_MetaTileEntity_IndustrialApiary)((IGregTechTileEntity)this.inventory).getMetaTileEntity()).onInventoryUpdate(this.getSlotIndex()); + ((GT_MetaTileEntity_IndustrialApiary) ((IGregTechTileEntity) this.inventory).getMetaTileEntity()) + .onInventoryUpdate(this.getSlotIndex()); } } } diff --git a/src/main/java/gregtech/common/gui/GT_Container_InputBus_ME.java b/src/main/java/gregtech/common/gui/GT_Container_InputBus_ME.java index 0f7b26eea7..58aff9ad08 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_InputBus_ME.java +++ b/src/main/java/gregtech/common/gui/GT_Container_InputBus_ME.java @@ -1,11 +1,5 @@ package gregtech.common.gui; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.ICrafting; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.gui.GT_ContainerMetaTile_Machine; @@ -14,25 +8,43 @@ import gregtech.api.gui.GT_Slot_Holo_ME; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Utility; import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_InputBus_ME; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; public class GT_Container_InputBus_ME extends GT_ContainerMetaTile_Machine { private static final int LEFT_OFFSET = 8; private static final int TOP_OFFSET = 10; private static final int SLOT_SIZE = 18; public static final int CIRCUIT_SLOT = 32; + public GT_Container_InputBus_ME(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(aInventoryPlayer, aTileEntity); } + @Override public void addSlots(InventoryPlayer aInventoryPlayer) { for (int y = 0; y < 4; ++y) for (int x = 0; x < 4; ++x) - addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, x + y * 4, - LEFT_OFFSET + x * SLOT_SIZE, TOP_OFFSET + y * SLOT_SIZE, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo( + this.mTileEntity, + x + y * 4, + LEFT_OFFSET + x * SLOT_SIZE, + TOP_OFFSET + y * SLOT_SIZE, + false, + true, + 1)); for (int y = 0; y < 4; ++y) for (int x = 0; x < 4; ++x) { - GT_Slot_Holo_ME slot = new GT_Slot_Holo_ME(this.mTileEntity, x + y * 4 + 16, - LEFT_OFFSET + x * SLOT_SIZE + 90, TOP_OFFSET + y * SLOT_SIZE, false, true); + GT_Slot_Holo_ME slot = new GT_Slot_Holo_ME( + this.mTileEntity, + x + y * 4 + 16, + LEFT_OFFSET + x * SLOT_SIZE + 90, + TOP_OFFSET + y * SLOT_SIZE, + false, + true); addSlotToContainer(slot); } super.addSlots(aInventoryPlayer); @@ -41,25 +53,22 @@ public class GT_Container_InputBus_ME extends GT_ContainerMetaTile_Machine { private boolean containsSuchStack(ItemStack tStack) { for (int i = 0; i < 16; ++i) { Slot tSlot = (Slot) this.inventorySlots.get(i); - if (tSlot != null && GT_Utility.areStacksEqual(tSlot.getStack(), tStack, false)) - return true; + if (tSlot != null && GT_Utility.areStacksEqual(tSlot.getStack(), tStack, false)) return true; } return false; } - private final static int PROGRESS_PACKET_INDEX_OFFSET = 200; + private static final int PROGRESS_PACKET_INDEX_OFFSET = 200; @Override public void detectAndSendChanges() { super.detectAndSendChanges(); - if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) - return; + if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) return; for (Object crafter : this.crafters) { ICrafting player = (ICrafting) crafter; for (int i = 0; i < 16; ++i) { ItemStack s = ((Slot) this.inventorySlots.get(i + 16)).getStack(); - if (s == null) - continue; + if (s == null) continue; player.sendProgressBarUpdate(this, PROGRESS_PACKET_INDEX_OFFSET + 2 * i, s.stackSize & 65535); player.sendProgressBarUpdate(this, PROGRESS_PACKET_INDEX_OFFSET + 2 * i + 1, s.stackSize >>> 16); } @@ -77,8 +86,7 @@ public class GT_Container_InputBus_ME extends GT_ContainerMetaTile_Machine { if ((id - PROGRESS_PACKET_INDEX_OFFSET) % 2 == 0) { s.stackSize &= 0xFFFF0000; s.stackSize += (value & 0xFFFF); - } - else { + } else { s.stackSize &= 0xFFFF; s.stackSize += value << 16; } @@ -91,19 +99,17 @@ public class GT_Container_InputBus_ME extends GT_ContainerMetaTile_Machine { if (aSlotIndex >= 0 && aSlotIndex < 16) { Slot tSlot = (Slot) this.inventorySlots.get(aSlotIndex); if (tSlot != null) { - if (this.mTileEntity.getMetaTileEntity() == null) - return null; + if (this.mTileEntity.getMetaTileEntity() == null) return null; ItemStack tStack = aPlayer.inventory.getItemStack(); if (tStack == null) { tSlot.putStack(null); - } - else { - if (containsSuchStack(tStack)) - return null; + } else { + if (containsSuchStack(tStack)) return null; tSlot.putStack(GT_Utility.copyAmount(1L, tStack)); } if (mTileEntity.isServerSide()) { - ItemStack newInfo = ((GT_MetaTileEntity_Hatch_InputBus_ME) mTileEntity.getMetaTileEntity()).updateInformationSlot(aSlotIndex, tStack); + ItemStack newInfo = ((GT_MetaTileEntity_Hatch_InputBus_ME) mTileEntity.getMetaTileEntity()) + .updateInformationSlot(aSlotIndex, tStack); ((Slot) this.inventorySlots.get(aSlotIndex + 16)).putStack(newInfo); detectAndSendChanges(); } diff --git a/src/main/java/gregtech/common/gui/GT_Container_ItemDistributor.java b/src/main/java/gregtech/common/gui/GT_Container_ItemDistributor.java index 6f3c8fe85c..2de68c9752 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_ItemDistributor.java +++ b/src/main/java/gregtech/common/gui/GT_Container_ItemDistributor.java @@ -38,29 +38,32 @@ public class GT_Container_ItemDistributor extends GT_ContainerMetaTile_Machine { return null; } if (aSlotIndex == 27) { - ((GT_MetaTileEntity_ItemDistributor) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GT_MetaTileEntity_ItemDistributor) this.mTileEntity.getMetaTileEntity()).bOutput); + ((GT_MetaTileEntity_ItemDistributor) this.mTileEntity.getMetaTileEntity()).bOutput = + (!((GT_MetaTileEntity_ItemDistributor) this.mTileEntity.getMetaTileEntity()).bOutput); if (((GT_MetaTileEntity_ItemDistributor) this.mTileEntity.getMetaTileEntity()).bOutput) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("116","Emit Energy to Outputside")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("116", "Emit Energy to Outputside")); } else { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("117","Don't emit Energy")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("117", "Don't emit Energy")); } return null; } if (aSlotIndex == 28) { - ((GT_MetaTileEntity_ItemDistributor) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GT_MetaTileEntity_ItemDistributor) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull); + ((GT_MetaTileEntity_ItemDistributor) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = + (!((GT_MetaTileEntity_ItemDistributor) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull); if (((GT_MetaTileEntity_ItemDistributor) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("118","Emit Redstone if no Slot is free")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("118", "Emit Redstone if no Slot is free")); } else { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("119","Don't emit Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("119", "Don't emit Redstone")); } return null; } if (aSlotIndex == 29) { - ((GT_MetaTileEntity_ItemDistributor) this.mTileEntity.getMetaTileEntity()).bInvert = (!((GT_MetaTileEntity_ItemDistributor) this.mTileEntity.getMetaTileEntity()).bInvert); + ((GT_MetaTileEntity_ItemDistributor) this.mTileEntity.getMetaTileEntity()).bInvert = + (!((GT_MetaTileEntity_ItemDistributor) this.mTileEntity.getMetaTileEntity()).bInvert); if (((GT_MetaTileEntity_ItemDistributor) this.mTileEntity.getMetaTileEntity()).bInvert) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("120","Invert Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("120", "Invert Redstone")); } else { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("121","Don't invert Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("121", "Don't invert Redstone")); } return null; } diff --git a/src/main/java/gregtech/common/gui/GT_Container_MicrowaveEnergyTransmitter.java b/src/main/java/gregtech/common/gui/GT_Container_MicrowaveEnergyTransmitter.java index 4e88c8088e..bd6b917f1f 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_MicrowaveEnergyTransmitter.java +++ b/src/main/java/gregtech/common/gui/GT_Container_MicrowaveEnergyTransmitter.java @@ -18,6 +18,7 @@ public class GT_Container_MicrowaveEnergyTransmitter extends GT_ContainerMetaTil public int mTargetZ = 0; public int mTargetY = 0; public int mTargetX = 0; + public GT_Container_MicrowaveEnergyTransmitter(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(aInventoryPlayer, aTileEntity); } @@ -54,52 +55,68 @@ public class GT_Container_MicrowaveEnergyTransmitter extends GT_ContainerMetaTil if ((tSlot != null) && (this.mTileEntity.getMetaTileEntity() != null)) { switch (aSlotIndex) { case 0: - ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetX -= (aShifthold == 1 ? 512 : 64); + ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetX -= + (aShifthold == 1 ? 512 : 64); return null; case 1: - ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetY -= (aShifthold == 1 ? 512 : 64); + ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetY -= + (aShifthold == 1 ? 512 : 64); return null; case 2: - ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetZ -= (aShifthold == 1 ? 512 : 64); + ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetZ -= + (aShifthold == 1 ? 512 : 64); return null; case 3: - ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetD -= (aShifthold == 1 ? 16 : 8); + ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetD -= + (aShifthold == 1 ? 16 : 8); return null; case 4: - ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetX -= (aShifthold == 1 ? 16 : 1); + ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetX -= + (aShifthold == 1 ? 16 : 1); return null; case 5: - ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetY -= (aShifthold == 1 ? 16 : 1); + ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetY -= + (aShifthold == 1 ? 16 : 1); return null; case 6: - ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetZ -= (aShifthold == 1 ? 16 : 1); + ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetZ -= + (aShifthold == 1 ? 16 : 1); return null; case 7: - ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetD -= (aShifthold == 1 ? 4 : 1); + ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetD -= + (aShifthold == 1 ? 4 : 1); return null; case 8: - ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetX += (aShifthold == 1 ? 512 : 64); + ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetX += + (aShifthold == 1 ? 512 : 64); return null; case 9: - ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetY += (aShifthold == 1 ? 512 : 64); + ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetY += + (aShifthold == 1 ? 512 : 64); return null; case 10: - ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetZ += (aShifthold == 1 ? 512 : 64); + ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetZ += + (aShifthold == 1 ? 512 : 64); return null; case 11: - ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetD += (aShifthold == 1 ? 16 : 8); + ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetD += + (aShifthold == 1 ? 16 : 8); return null; case 12: - ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetX += (aShifthold == 1 ? 16 : 1); + ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetX += + (aShifthold == 1 ? 16 : 1); return null; case 13: - ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetY += (aShifthold == 1 ? 16 : 1); + ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetY += + (aShifthold == 1 ? 16 : 1); return null; case 14: - ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetZ += (aShifthold == 1 ? 16 : 1); + ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetZ += + (aShifthold == 1 ? 16 : 1); return null; case 15: - ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetD += (aShifthold == 1 ? 4 : 1); + ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetD += + (aShifthold == 1 ? 4 : 1); return null; } } @@ -116,7 +133,10 @@ public class GT_Container_MicrowaveEnergyTransmitter extends GT_ContainerMetaTil this.mTargetY = ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetY; this.mTargetZ = ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetZ; this.mTargetD = ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetD; - this.mEgg = (((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).hasDimensionalTeleportCapability() ? 1 : 0); + this.mEgg = (((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()) + .hasDimensionalTeleportCapability() + ? 1 + : 0); for (Object crafter : this.crafters) { ICrafting aPlayer = (ICrafting) crafter; diff --git a/src/main/java/gregtech/common/gui/GT_Container_OutputHatch.java b/src/main/java/gregtech/common/gui/GT_Container_OutputHatch.java index 25179d718e..954b8ab61b 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_OutputHatch.java +++ b/src/main/java/gregtech/common/gui/GT_Container_OutputHatch.java @@ -33,17 +33,21 @@ public class GT_Container_OutputHatch extends GT_Container_BasicTank { FluidStack tReadyLockFluid = GT_Utility.getFluidForFilledItem(aPlayer.inventory.getItemStack(), true); byte tMode = tHatch.getMode(); // If player click the locker slot with empty or the same fluid cell, clear the lock fluid - if (tReadyLockFluid == null || (tMode >= 8 && tReadyLockFluid.getFluid().getName().equals(tHatch.getLockedFluidName()))) { + if (tReadyLockFluid == null + || (tMode >= 8 && tReadyLockFluid.getFluid().getName().equals(tHatch.getLockedFluidName()))) { tHatch.setLockedFluidName(null); GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("300", "Fluid Lock Cleared.")); tHatch.mMode = 0; - } - else { + } else { tHatch.setLockedFluidName(tReadyLockFluid.getFluid().getName()); - GT_Utility.sendChatToPlayer(aPlayer, String.format(GT_Utility.trans("151.4", "Sucessfully locked Fluid to %s"), tReadyLockFluid.getLocalizedName())); + GT_Utility.sendChatToPlayer( + aPlayer, + String.format( + GT_Utility.trans("151.4", "Sucessfully locked Fluid to %s"), + tReadyLockFluid.getLocalizedName())); tHatch.mMode = 9; } } return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/common/gui/GT_Container_PrimitiveBlastFurnace.java b/src/main/java/gregtech/common/gui/GT_Container_PrimitiveBlastFurnace.java index 7aebadf31e..e19b6167ec 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_PrimitiveBlastFurnace.java +++ b/src/main/java/gregtech/common/gui/GT_Container_PrimitiveBlastFurnace.java @@ -19,7 +19,8 @@ public class GT_Container_PrimitiveBlastFurnace extends GT_ContainerMetaTile_Mac addSlotToContainer(new Slot(this.mTileEntity, i, 34, 16 + 18 * i)); } for (int i = 0; i < GT_MetaTileEntity_PrimitiveBlastFurnace.OUTPUT_SLOTS; i++) { - addSlotToContainer(new GT_Slot_Output(mTileEntity, GT_MetaTileEntity_PrimitiveBlastFurnace.INPUT_SLOTS + i, 86 + i * 18, 25)); + addSlotToContainer(new GT_Slot_Output( + mTileEntity, GT_MetaTileEntity_PrimitiveBlastFurnace.INPUT_SLOTS + i, 86 + i * 18, 25)); } } diff --git a/src/main/java/gregtech/common/gui/GT_Container_Regulator.java b/src/main/java/gregtech/common/gui/GT_Container_Regulator.java index c6a7bdbdec..3079b40470 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_Regulator.java +++ b/src/main/java/gregtech/common/gui/GT_Container_Regulator.java @@ -22,7 +22,7 @@ public class GT_Container_Regulator extends GT_ContainerMetaTile_Machine { @Override public void addSlots(InventoryPlayer aInventoryPlayer) { - this.mTargetSlots = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0}; + this.mTargetSlots = new int[] {0, 0, 0, 0, 0, 0, 0, 0, 0}; addSlotToContainer(new Slot(this.mTileEntity, 0, 8, 6)); addSlotToContainer(new Slot(this.mTileEntity, 1, 26, 6)); @@ -70,7 +70,8 @@ public class GT_Container_Regulator extends GT_ContainerMetaTile_Machine { return null; } if (aSlotIndex == 28) { - ((GT_MetaTileEntity_Regulator) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GT_MetaTileEntity_Regulator) this.mTileEntity.getMetaTileEntity()).bOutput); + ((GT_MetaTileEntity_Regulator) this.mTileEntity.getMetaTileEntity()).bOutput = + (!((GT_MetaTileEntity_Regulator) this.mTileEntity.getMetaTileEntity()).bOutput); if (((GT_MetaTileEntity_Regulator) this.mTileEntity.getMetaTileEntity()).bOutput) { GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("116", "Emit Energy to Outputside")); } else { @@ -98,7 +99,14 @@ public class GT_Container_Regulator extends GT_ContainerMetaTile_Machine { return null; } if ((aSlotIndex < 28)) { - ((GT_MetaTileEntity_Regulator) this.mTileEntity.getMetaTileEntity()).mTargetSlots[(aSlotIndex - 19)] = Math.min(99, Math.max(0, ((GT_MetaTileEntity_Regulator) this.mTileEntity.getMetaTileEntity()).mTargetSlots[(aSlotIndex - 19)] + (aMouseclick == 0 ? -1 : 1) * (aShifthold == 0 ? 1 : 16))); + ((GT_MetaTileEntity_Regulator) this.mTileEntity.getMetaTileEntity()).mTargetSlots[(aSlotIndex - 19)] = + Math.min( + 99, + Math.max( + 0, + ((GT_MetaTileEntity_Regulator) this.mTileEntity.getMetaTileEntity()) + .mTargetSlots[(aSlotIndex - 19)] + + (aMouseclick == 0 ? -1 : 1) * (aShifthold == 0 ? 1 : 16))); return null; } } diff --git a/src/main/java/gregtech/common/gui/GT_Container_SuperBuffer.java b/src/main/java/gregtech/common/gui/GT_Container_SuperBuffer.java index 58df63e16a..0fda1a485f 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_SuperBuffer.java +++ b/src/main/java/gregtech/common/gui/GT_Container_SuperBuffer.java @@ -34,38 +34,50 @@ public class GT_Container_SuperBuffer extends GT_ContainerMetaTile_Machine { return null; } if (aSlotIndex == 0) { - ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput); + ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput = + (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput); if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("116","Emit Energy to Outputside")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("116", "Emit Energy to Outputside")); } else { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("117","Don't emit Energy")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("117", "Don't emit Energy")); } return null; } if (aSlotIndex == 1) { - ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull); + ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = + (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull); if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("118","Emit Redstone if no Slot is free")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("118", "Emit Redstone if no Slot is free")); } else { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("119","Don't emit Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("119", "Don't emit Redstone")); } return null; } if (aSlotIndex == 2) { - ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert); + ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert = + (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert); if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("120","Invert Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("120", "Invert Redstone")); } else { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("121","Don't invert Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("121", "Don't invert Redstone")); } return null; } if (aSlotIndex == 3) { - ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bStockingMode = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bStockingMode); + ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bStockingMode = + (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bStockingMode); if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bStockingMode) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("217","Stocking mode. Keeps this many items in destination input slots. This mode can be server unfriendly.")); + GT_Utility.sendChatToPlayer( + aPlayer, + GT_Utility.trans( + "217", + "Stocking mode. Keeps this many items in destination input slots. This mode can be server unfriendly.")); } else { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("218", "Transfer size mode. Add exactly this many items in destination input slots as long as there is room.")); + GT_Utility.sendChatToPlayer( + aPlayer, + GT_Utility.trans( + "218", + "Transfer size mode. Add exactly this many items in destination input slots as long as there is room.")); } return null; } diff --git a/src/main/java/gregtech/common/gui/GT_Container_Teleporter.java b/src/main/java/gregtech/common/gui/GT_Container_Teleporter.java index d5013d9504..219391e662 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_Teleporter.java +++ b/src/main/java/gregtech/common/gui/GT_Container_Teleporter.java @@ -6,20 +6,20 @@ import gregtech.api.gui.GT_ContainerMetaTile_Machine; import gregtech.api.gui.GT_Slot_Holo; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Teleporter; +import java.util.Iterator; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import java.util.Iterator; - public class GT_Container_Teleporter extends GT_ContainerMetaTile_Machine { public int mEgg = 0; public int mTargetD = 0; public int mTargetZ = 0; public int mTargetY = 0; public int mTargetX = 0; + public GT_Container_Teleporter(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(aInventoryPlayer, aTileEntity); } @@ -56,52 +56,68 @@ public class GT_Container_Teleporter extends GT_ContainerMetaTile_Machine { if ((tSlot != null) && (this.mTileEntity.getMetaTileEntity() != null)) { switch (aSlotIndex) { case 0: - ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetX -= (aShifthold == 1 ? 512 : 64); + ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetX -= + (aShifthold == 1 ? 512 : 64); return null; case 1: - ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetY -= (aShifthold == 1 ? 512 : 64); + ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetY -= + (aShifthold == 1 ? 512 : 64); return null; case 2: - ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetZ -= (aShifthold == 1 ? 512 : 64); + ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetZ -= + (aShifthold == 1 ? 512 : 64); return null; case 3: - ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetD -= (aShifthold == 1 ? 16 : 8); + ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetD -= + (aShifthold == 1 ? 16 : 8); return null; case 4: - ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetX -= (aShifthold == 1 ? 16 : 1); + ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetX -= + (aShifthold == 1 ? 16 : 1); return null; case 5: - ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetY -= (aShifthold == 1 ? 16 : 1); + ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetY -= + (aShifthold == 1 ? 16 : 1); return null; case 6: - ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetZ -= (aShifthold == 1 ? 16 : 1); + ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetZ -= + (aShifthold == 1 ? 16 : 1); return null; case 7: - ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetD -= (aShifthold == 1 ? 4 : 1); + ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetD -= + (aShifthold == 1 ? 4 : 1); return null; case 8: - ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetX += (aShifthold == 1 ? 512 : 64); + ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetX += + (aShifthold == 1 ? 512 : 64); return null; case 9: - ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetY += (aShifthold == 1 ? 512 : 64); + ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetY += + (aShifthold == 1 ? 512 : 64); return null; case 10: - ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetZ += (aShifthold == 1 ? 512 : 64); + ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetZ += + (aShifthold == 1 ? 512 : 64); return null; case 11: - ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetD += (aShifthold == 1 ? 16 : 8); + ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetD += + (aShifthold == 1 ? 16 : 8); return null; case 12: - ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetX += (aShifthold == 1 ? 16 : 1); + ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetX += + (aShifthold == 1 ? 16 : 1); return null; case 13: - ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetY += (aShifthold == 1 ? 16 : 1); + ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetY += + (aShifthold == 1 ? 16 : 1); return null; case 14: - ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetZ += (aShifthold == 1 ? 16 : 1); + ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetZ += + (aShifthold == 1 ? 16 : 1); return null; case 15: - ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetD += (aShifthold == 1 ? 4 : 1); + ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetD += + (aShifthold == 1 ? 4 : 1); return null; } } @@ -118,7 +134,10 @@ public class GT_Container_Teleporter extends GT_ContainerMetaTile_Machine { this.mTargetY = ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetY; this.mTargetZ = ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetZ; this.mTargetD = ((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).mTargetD; - this.mEgg = (((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()).hasDimensionalTeleportCapability() ? 1 : 0); + this.mEgg = (((GT_MetaTileEntity_Teleporter) this.mTileEntity.getMetaTileEntity()) + .hasDimensionalTeleportCapability() + ? 1 + : 0); Iterator playerIterator = this.crafters.iterator(); while (playerIterator.hasNext()) { diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainerVolumetricFlask.java b/src/main/java/gregtech/common/gui/GT_GUIContainerVolumetricFlask.java index 85fe2171b0..45df55cbe9 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainerVolumetricFlask.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainerVolumetricFlask.java @@ -1,13 +1,12 @@ package gregtech.common.gui; - import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.GT_Values; import gregtech.api.net.GT_Packet_UpdateItem; import gregtech.common.items.GT_VolumetricFlask; -import gregtech.common.net.MessageSetFlaskCapacity; -import net.minecraft.client.Minecraft; +import java.text.DecimalFormat; +import java.text.ParseException; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiTextField; @@ -16,12 +15,10 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; -import java.text.DecimalFormat; -import java.text.ParseException; - @SideOnly(Side.CLIENT) public final class GT_GUIContainerVolumetricFlask extends GuiContainer { - private static final ResourceLocation BACKGROUND = new ResourceLocation("gregtech:textures/gui/VolumetricFlask.png"); + private static final ResourceLocation BACKGROUND = + new ResourceLocation("gregtech:textures/gui/VolumetricFlask.png"); private GuiIntegerBox amount; private GuiButton apply; @@ -56,7 +53,13 @@ public final class GT_GUIContainerVolumetricFlask extends GuiContainer { buttonList.add(apply = new GuiButton(0, guiLeft + 128, guiTop + 51, 38, 20, "Accept")); - amount = new GuiIntegerBox(fontRendererObj, guiLeft + 62, guiTop + 57, 59, fontRendererObj.FONT_HEIGHT, ((GT_VolumetricFlask) container.flask.getItem()).getMaxCapacity()); + amount = new GuiIntegerBox( + fontRendererObj, + guiLeft + 62, + guiTop + 57, + 59, + fontRendererObj.FONT_HEIGHT, + ((GT_VolumetricFlask) container.flask.getItem()).getMaxCapacity()); amount.setEnableBackgroundDrawing(false); amount.setMaxStringLength(16); amount.setTextColor(16777215); @@ -67,7 +70,6 @@ public final class GT_GUIContainerVolumetricFlask extends GuiContainer { amount.setText(String.valueOf(((GT_VolumetricFlask) container.flask.getItem()).getCapacity(container.flask))); } - @Override protected final void drawGuiContainerBackgroundLayer(float f, int x, int y) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); @@ -84,13 +86,17 @@ public final class GT_GUIContainerVolumetricFlask extends GuiContainer { amount.drawTextBox(); } - @Override protected void keyTyped(char character, int key) { if (!checkHotbarKeys(key)) { - if (key == 28) - actionPerformed(apply); - if (((key == 211) || (key == 205) || (key == 203) || (key == 14) || (character == '-') || (Character.isDigit(character))) && (amount.textboxKeyTyped(character, key))) { + if (key == 28) actionPerformed(apply); + if (((key == 211) + || (key == 205) + || (key == 203) + || (key == 14) + || (character == '-') + || (Character.isDigit(character))) + && (amount.textboxKeyTyped(character, key))) { try { String out = amount.getText(); boolean fixed = false; @@ -171,7 +177,6 @@ public final class GT_GUIContainerVolumetricFlask extends GuiContainer { } } - protected int getQty(GuiButton btn) { try { DecimalFormat df = new DecimalFormat("+#;-#"); @@ -194,7 +199,6 @@ public final class GT_GUIContainerVolumetricFlask extends GuiContainer { this.maxValue = maxValue; } - @Override public void writeText(String selectedText) { String original = getText(); @@ -212,7 +216,6 @@ public final class GT_GUIContainerVolumetricFlask extends GuiContainer { } } - @Override public void setText(String s) { try { @@ -228,5 +231,4 @@ public final class GT_GUIContainerVolumetricFlask extends GuiContainer { super.setText(s); } } - } diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_Boiler.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_Boiler.java index 0c9b6e1f93..ef7ed15720 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_Boiler.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_Boiler.java @@ -8,7 +8,8 @@ public class GT_GUIContainer_Boiler extends GT_GUIContainerMetaTile_Machine { private final int textColor = this.getTextColorOrDefault("title", 0x404040); - public GT_GUIContainer_Boiler(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aTextureName) { + public GT_GUIContainer_Boiler( + InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aTextureName) { super(new GT_Container_Boiler(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/" + aTextureName); } diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_BronzeBlastFurnace.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_BronzeBlastFurnace.java index 6e51d85f32..b92f7e9243 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_BronzeBlastFurnace.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_BronzeBlastFurnace.java @@ -9,7 +9,9 @@ public class GT_GUIContainer_BronzeBlastFurnace extends GT_GUIContainerMetaTile_ private final int textColor = this.getTextColorOrDefault("title", 0x404040); public GT_GUIContainer_BronzeBlastFurnace(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { - super(new GT_Container_BronzeBlastFurnace(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/BronzeBlastFurnace.png"); + super( + new GT_Container_BronzeBlastFurnace(aInventoryPlayer, aTileEntity), + "gregtech:textures/gui/BronzeBlastFurnace.png"); } @Override @@ -23,9 +25,23 @@ public class GT_GUIContainer_BronzeBlastFurnace extends GT_GUIContainerMetaTile_ int x = (this.width - this.xSize) / 2; int y = (this.height - this.ySize) / 2; drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - if ((this.mContainer != null) && - (this.mContainer.mProgressTime > 0)) { - drawTexturedModalRect(x + 58, y + 28, 176, 0, Math.max(0, Math.min(20, (this.mContainer.mProgressTime > 0 ? 1 : 0) + this.mContainer.mProgressTime * 20 / (this.mContainer.mMaxProgressTime < 1 ? 1 : this.mContainer.mMaxProgressTime))), 11); + if ((this.mContainer != null) && (this.mContainer.mProgressTime > 0)) { + drawTexturedModalRect( + x + 58, + y + 28, + 176, + 0, + Math.max( + 0, + Math.min( + 20, + (this.mContainer.mProgressTime > 0 ? 1 : 0) + + this.mContainer.mProgressTime + * 20 + / (this.mContainer.mMaxProgressTime < 1 + ? 1 + : this.mContainer.mMaxProgressTime))), + 11); } } } diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java index b6a86fd668..87e035c61a 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java @@ -1,28 +1,33 @@ package gregtech.common.gui; +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; + import gregtech.api.gui.GT_Container_MultiMachine; import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Utility; import gregtech.nei.NEI_TransferRectHost; -import net.minecraft.entity.player.InventoryPlayer; - import java.awt.Rectangle; - -import static gregtech.api.enums.GT_Values.RES_PATH_GUI; +import net.minecraft.entity.player.InventoryPlayer; public class GT_GUIContainer_FusionReactor extends GT_GUIContainerMetaTile_Machine implements NEI_TransferRectHost { public String mNEI; String mName = ""; - private final int - textColor = this.getTextColorOrDefault("text", 0xFAFAFF), - textColorTitle = this.getTextColorOrDefault("title", 0xFAFAFF), - textColorValue = this.getTextColorOrDefault("value", 0xFF0000); + private final int textColor = this.getTextColorOrDefault("text", 0xFAFAFF), + textColorTitle = this.getTextColorOrDefault("title", 0xFAFAFF), + textColorValue = this.getTextColorOrDefault("value", 0xFF0000); - public GT_GUIContainer_FusionReactor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aTextureFile, String aNEI) { - super(new GT_Container_MultiMachine(aInventoryPlayer, aTileEntity, false), RES_PATH_GUI + "multimachines/" + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile)); + public GT_GUIContainer_FusionReactor( + InventoryPlayer aInventoryPlayer, + IGregTechTileEntity aTileEntity, + String aName, + String aTextureFile, + String aNEI) { + super( + new GT_Container_MultiMachine(aInventoryPlayer, aTileEntity, false), + RES_PATH_GUI + "multimachines/" + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile)); mName = aName; mNEI = aNEI; } @@ -37,21 +42,23 @@ public class GT_GUIContainer_FusionReactor extends GT_GUIContainerMetaTile_Machi if (mContainer.mDisplayErrorCode == 0) { if (mContainer.mActive == 0) { - fontRendererObj.drawString("Hit with Soft Mallet to (re-)start the Machine if it doesn't start.", -70, 170, textColor); + fontRendererObj.drawString( + "Hit with Soft Mallet to (re-)start the Machine if it doesn't start.", -70, 170, textColor); } else { fontRendererObj.drawString("Running perfectly.", 10, 170, textColor); } } - if(this.mContainer.mEnergy > 160000000 && this.mContainer.mEnergy < 160010000) + if (this.mContainer.mEnergy > 160000000 && this.mContainer.mEnergy < 160010000) fontRendererObj.drawString("160,000,000 EU", 50, 155, textColorValue); - else if(this.mContainer.mEnergy > 320000000 && this.mContainer.mEnergy < 320010000) + else if (this.mContainer.mEnergy > 320000000 && this.mContainer.mEnergy < 320010000) fontRendererObj.drawString("320,000,000 EU", 50, 155, textColorValue); - else if(this.mContainer.mEnergy > 640000000 && this.mContainer.mEnergy < 640010000) + else if (this.mContainer.mEnergy > 640000000 && this.mContainer.mEnergy < 640010000) fontRendererObj.drawString("640,000,000 EU", 50, 155, textColorValue); - else if(this.mContainer.mEnergyLong > 5120000000L && this.mContainer.mEnergyLong < 5120080000L) + else if (this.mContainer.mEnergyLong > 5120000000L && this.mContainer.mEnergyLong < 5120080000L) fontRendererObj.drawString("5,120,000,000 EU", 50, 155, textColorValue); else - fontRendererObj.drawString(GT_Utility.formatNumbers(this.mContainer.mEnergyLong) + " EU", 50, 155, textColorValue); + fontRendererObj.drawString( + GT_Utility.formatNumbers(this.mContainer.mEnergyLong) + " EU", 50, 155, textColorValue); } } diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_IndustrialApiary.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_IndustrialApiary.java index 9b0de5ba81..2225822764 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_IndustrialApiary.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_IndustrialApiary.java @@ -9,110 +9,135 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_TooltipDataCache; import gregtech.api.util.GT_Utility; import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_IndustrialApiary; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.StatCollector; - import java.awt.*; import java.util.ArrayList; import java.util.Arrays; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.StatCollector; public class GT_GUIContainer_IndustrialApiary extends GT_GUIContainerMetaTile_Machine { - private static final String - BATTERY_SLOT_TOOLTIP = "GT5U.machines.battery_slot.tooltip", - UNUSED_SLOT_TOOLTIP = "GT5U.machines.unused_slot.tooltip", - STALLED_STUTTERING_TOOLTIP = "GT5U.machines.stalled_stuttering.tooltip", - ITEM_TRANSFER_TOOLTIP = "GT5U.machines.item_transfer.tooltip", - POWER_SOURCE_POWER = "GT5U.machines.powersource.power", - CANCEL_PROCESS_TOOLTIP = "GT5U.machines.industrialapiary.cancel.tooltip", - SPEED_TOOLTIP = "GT5U.machines.industrialapiary.speed.tooltip", - SPEED_LOCKED_TOOLTIP = "GT5U.machines.industrialapiary.speedlocked.tooltip", - INFO_TOOLTIP = "GT5U.machines.industrialapiary.info.tooltip", - INFO_WITH_BEE_TOOLTIP = "GT5U.machines.industrialapiary.infoextended.tooltip", - UPGRADE_TOOLTIP = "GT5U.machines.industrialapiary.upgradeslot.tooltip" - ; - - private final int - textColor = this.getTextColorOrDefault("text", 0x404040), - textColorTitle = this.getTextColorOrDefault("title", 0x404040), - textColorValue = this.getTextColorOrDefault("value", 0x404040); + private static final String BATTERY_SLOT_TOOLTIP = "GT5U.machines.battery_slot.tooltip", + UNUSED_SLOT_TOOLTIP = "GT5U.machines.unused_slot.tooltip", + STALLED_STUTTERING_TOOLTIP = "GT5U.machines.stalled_stuttering.tooltip", + ITEM_TRANSFER_TOOLTIP = "GT5U.machines.item_transfer.tooltip", + POWER_SOURCE_POWER = "GT5U.machines.powersource.power", + CANCEL_PROCESS_TOOLTIP = "GT5U.machines.industrialapiary.cancel.tooltip", + SPEED_TOOLTIP = "GT5U.machines.industrialapiary.speed.tooltip", + SPEED_LOCKED_TOOLTIP = "GT5U.machines.industrialapiary.speedlocked.tooltip", + INFO_TOOLTIP = "GT5U.machines.industrialapiary.info.tooltip", + INFO_WITH_BEE_TOOLTIP = "GT5U.machines.industrialapiary.infoextended.tooltip", + UPGRADE_TOOLTIP = "GT5U.machines.industrialapiary.upgradeslot.tooltip"; + private final int textColor = this.getTextColorOrDefault("text", 0x404040), + textColorTitle = this.getTextColorOrDefault("title", 0x404040), + textColorValue = this.getTextColorOrDefault("value", 0x404040); GT_GuiTooltip mErrorStatesTooltip; GT_GuiTooltip mSpeedToggleTooltip; GT_GuiTooltip mInfoTooltip; public GT_GUIContainer_IndustrialApiary(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { - super(new GT_Container_IndustrialApiary(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/basicmachines/IndustrialApiary.png"); + super( + new GT_Container_IndustrialApiary(aInventoryPlayer, aTileEntity), + "gregtech:textures/gui/basicmachines/IndustrialApiary.png"); } @Override protected void setupTooltips() { Rectangle tBeeProblemArea = new Rectangle(this.guiLeft + 100, this.guiTop + 63, 18, 18); - addToolTip(mErrorStatesTooltip = new GT_GuiTooltip(tBeeProblemArea, "") { - @Override - protected void onTick() { - boolean e = this.enabled; - super.onTick(); - this.enabled = e; - } - }); - addToolTip(mSpeedToggleTooltip = new GT_GuiSlotTooltip(getContainer().slotSpeedToggle, new GT_TooltipDataCache.TooltipData(null, null))); + addToolTip( + mErrorStatesTooltip = new GT_GuiTooltip(tBeeProblemArea, "") { + @Override + protected void onTick() { + boolean e = this.enabled; + super.onTick(); + this.enabled = e; + } + }); + addToolTip( + mSpeedToggleTooltip = new GT_GuiSlotTooltip( + getContainer().slotSpeedToggle, new GT_TooltipDataCache.TooltipData(null, null))); mErrorStatesTooltip.enabled = false; addToolTip(mInfoTooltip = new GT_GuiTooltip(new Rectangle(this.guiLeft + 163, guiTop + 5, 6, 17))); - addToolTip(new GT_GuiSlotTooltip(getContainer().slotCancelProcess, mTooltipCache.getData(CANCEL_PROCESS_TOOLTIP))); - getContainer().slotUpgrade.forEach(s->addToolTip(new GT_GuiSlotTooltip(s, mTooltipCache.getData(UPGRADE_TOOLTIP)))); - - - addToolTip(new GT_GuiSlotTooltip(getContainer().slotItemTransferToggle, mTooltipCache.getData(ITEM_TRANSFER_TOOLTIP))); - addToolTip(new GT_GuiSlotTooltip(getContainer().slotBattery, mTooltipCache.getData(BATTERY_SLOT_TOOLTIP, - powerTierName(getContainer().getMachine().mTier), - powerTierName((byte)(getContainer().getMachine().mTier + 1))))); + addToolTip( + new GT_GuiSlotTooltip(getContainer().slotCancelProcess, mTooltipCache.getData(CANCEL_PROCESS_TOOLTIP))); + getContainer() + .slotUpgrade + .forEach(s -> addToolTip(new GT_GuiSlotTooltip(s, mTooltipCache.getData(UPGRADE_TOOLTIP)))); + + addToolTip(new GT_GuiSlotTooltip( + getContainer().slotItemTransferToggle, mTooltipCache.getData(ITEM_TRANSFER_TOOLTIP))); + addToolTip(new GT_GuiSlotTooltip( + getContainer().slotBattery, + mTooltipCache.getData( + BATTERY_SLOT_TOOLTIP, powerTierName(getContainer().getMachine().mTier), powerTierName((byte) + (getContainer().getMachine().mTier + 1))))); addToolTip(new GT_GuiSlotTooltip(getContainer().slotSpecial, mTooltipCache.getData(UNUSED_SLOT_TOOLTIP))); } @Override public void drawScreen(int mouseX, int mouseY, float parTicks) { mErrorStatesTooltip.enabled = !getContainer().mErrorStates.isEmpty(); - if(mErrorStatesTooltip.enabled){ mErrorStatesTooltip.setToolTipText(new GT_TooltipDataCache.TooltipData(getContainer().mErrorStates, getContainer().mErrorStates)); } - else if(getContainer().mStuttering) - { + if (mErrorStatesTooltip.enabled) { + mErrorStatesTooltip.setToolTipText( + new GT_TooltipDataCache.TooltipData(getContainer().mErrorStates, getContainer().mErrorStates)); + } else if (getContainer().mStuttering) { mErrorStatesTooltip.enabled = true; - mErrorStatesTooltip.setToolTipText(mTooltipCache.getData(STALLED_STUTTERING_TOOLTIP, StatCollector.translateToLocal(POWER_SOURCE_POWER))); + mErrorStatesTooltip.setToolTipText(mTooltipCache.getData( + STALLED_STUTTERING_TOOLTIP, StatCollector.translateToLocal(POWER_SOURCE_POWER))); } int accelerated = (1 << getContainer().mSpeed); int energyusage = 0; - if(accelerated == 2) - energyusage = 32; - else if(accelerated > 2) - energyusage = 32 * accelerated << (getContainer().mSpeed - 2); - mSpeedToggleTooltip.setToolTipText(mTooltipCache.getUncachedTooltipData(getContainer().mLockedSpeed ? SPEED_LOCKED_TOOLTIP : SPEED_TOOLTIP, accelerated, GT_Utility.formatNumbers(energyusage))); + if (accelerated == 2) energyusage = 32; + else if (accelerated > 2) energyusage = 32 * accelerated << (getContainer().mSpeed - 2); + mSpeedToggleTooltip.setToolTipText(mTooltipCache.getUncachedTooltipData( + getContainer().mLockedSpeed ? SPEED_LOCKED_TOOLTIP : SPEED_TOOLTIP, + accelerated, + GT_Utility.formatNumbers(energyusage))); ArrayList<String> s = new ArrayList<>(); GT_MetaTileEntity_IndustrialApiary IA = getContainer().getMachine(); - String energyreq = GT_Utility.formatNumbers((int)((float)GT_MetaTileEntity_IndustrialApiary.baseEUtUsage * IA.getEnergyModifier() * accelerated) + energyusage); + String energyreq = GT_Utility.formatNumbers( + (int) ((float) GT_MetaTileEntity_IndustrialApiary.baseEUtUsage * IA.getEnergyModifier() * accelerated) + + energyusage); String Temp = StatCollector.translateToLocal(IA.getTemperature().getName()); String Hum = StatCollector.translateToLocal(IA.getHumidity().getName()); boolean moreinformationgiven = false; - if(IA.getUsedQueen() != null && BeeManager.beeRoot.isMember(IA.getUsedQueen(), EnumBeeType.QUEEN.ordinal())) { + if (IA.getUsedQueen() != null && BeeManager.beeRoot.isMember(IA.getUsedQueen(), EnumBeeType.QUEEN.ordinal())) { IBee bee = BeeManager.beeRoot.getMember(IA.getUsedQueen()); if (bee.isAnalyzed()) { moreinformationgiven = true; IBeeGenome genome = bee.getGenome(); - IBeeModifier mod = BeeManager.beeRoot.getBeekeepingMode(IA.getWorld()).getBeeModifier(); + IBeeModifier mod = + BeeManager.beeRoot.getBeekeepingMode(IA.getWorld()).getBeeModifier(); float tmod = IA.getTerritoryModifier(null, 1f) * mod.getTerritoryModifier(null, 1f); - int[] t = Arrays.stream(genome.getTerritory()).map(i -> (int) ((float) i * tmod)).toArray(); - mInfoTooltip.setToolTipText(mTooltipCache.getUncachedTooltipData(INFO_WITH_BEE_TOOLTIP, energyreq, Temp, Hum, - Math.round(100f * IA.getProductionModifier(null, 1f) * genome.getSpeed() * mod.getProductionModifier(null, 1f)), - Math.round(IA.getFloweringModifier(null, 1f) * genome.getFlowering() * mod.getFloweringModifier(null, 1f)), - Math.round(IA.getLifespanModifier(null, null, 1f) * genome.getLifespan() * mod.getLifespanModifier(null, null, 1f)), - t[0], t[1], t[2])); + int[] t = Arrays.stream(genome.getTerritory()) + .map(i -> (int) ((float) i * tmod)) + .toArray(); + mInfoTooltip.setToolTipText(mTooltipCache.getUncachedTooltipData( + INFO_WITH_BEE_TOOLTIP, + energyreq, + Temp, + Hum, + Math.round(100f + * IA.getProductionModifier(null, 1f) + * genome.getSpeed() + * mod.getProductionModifier(null, 1f)), + Math.round(IA.getFloweringModifier(null, 1f) + * genome.getFlowering() + * mod.getFloweringModifier(null, 1f)), + Math.round(IA.getLifespanModifier(null, null, 1f) + * genome.getLifespan() + * mod.getLifespanModifier(null, null, 1f)), + t[0], + t[1], + t[2])); } } - if(!moreinformationgiven) + if (!moreinformationgiven) mInfoTooltip.setToolTipText(mTooltipCache.getUncachedTooltipData(INFO_TOOLTIP, energyreq, Temp, Hum)); - super.drawScreen(mouseX, mouseY, parTicks); } @@ -130,18 +155,17 @@ public class GT_GUIContainer_IndustrialApiary extends GT_GUIContainerMetaTile_Ma int y = (this.height - this.ySize) / 2; drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); if (this.mContainer != null) { - if (getContainer().mItemTransfer) - drawTexturedModalRect(x + 7, y + 62, 176, 18, 18, 18); - if(getContainer().mMaxProgressTime > 0) { + if (getContainer().mItemTransfer) drawTexturedModalRect(x + 7, y + 62, 176, 18, 18, 18); + if (getContainer().mMaxProgressTime > 0) { double p = (double) getContainer().mProgressTime / getContainer().mMaxProgressTime; - drawTexturedModalRect(x+70, y+3, 176, 0, (int)(p*20), 18); + drawTexturedModalRect(x + 70, y + 3, 176, 0, (int) (p * 20), 18); } - if(mErrorStatesTooltip.enabled) - drawTexturedModalRect(x+100, y+63, 176, 36, getContainer().mStuttering ? 18 : 9, 18); + if (mErrorStatesTooltip.enabled) + drawTexturedModalRect(x + 100, y + 63, 176, 36, getContainer().mStuttering ? 18 : 9, 18); } } - private GT_Container_IndustrialApiary getContainer(){ + private GT_Container_IndustrialApiary getContainer() { return ((GT_Container_IndustrialApiary) this.mContainer); } @@ -149,5 +173,4 @@ public class GT_GUIContainer_IndustrialApiary extends GT_GUIContainerMetaTile_Ma private String powerTierName(byte machineTier) { return GT_Values.TIER_COLORS[machineTier] + GT_Values.VN[machineTier]; } - } diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_InputBus_ME.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_InputBus_ME.java index 51e6289d3d..9b19da6367 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_InputBus_ME.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_InputBus_ME.java @@ -1,10 +1,5 @@ package gregtech.common.gui; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Slot; - import appeng.client.render.AppEngRenderItem; import appeng.core.AELog; import appeng.integration.IntegrationRegistry; @@ -15,8 +10,12 @@ import cpw.mods.fml.common.Optional; import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.gui.GT_Slot_Holo_ME; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Slot; -public class GT_GUIContainer_InputBus_ME extends GT_GUIContainerMetaTile_Machine { +public class GT_GUIContainer_InputBus_ME extends GT_GUIContainerMetaTile_Machine { private final AppEngRenderItem aeRenderItem = new AppEngRenderItem(); @@ -31,19 +30,17 @@ public class GT_GUIContainer_InputBus_ME extends GT_GUIContainerMetaTile_Machin int y = (this.height - this.ySize) / 2; drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); } - + // base method is made public by AE2 ASM - public void func_146977_a( final Slot s ) - { - this.drawSlot( s ); + public void func_146977_a(final Slot s) { + this.drawSlot(s); } @Optional.Method(modid = "appliedenergistics2") private RenderItem setItemRender(final RenderItem item) { if (IntegrationRegistry.INSTANCE.isEnabled(IntegrationType.NEI)) { - return ((INEI)IntegrationRegistry.INSTANCE.getInstance(IntegrationType.NEI)).setItemRender(item); - } - else { + return ((INEI) IntegrationRegistry.INSTANCE.getInstance(IntegrationType.NEI)).setItemRender(item); + } else { final RenderItem ri = itemRender; itemRender = item; return ri; @@ -51,31 +48,30 @@ public class GT_GUIContainer_InputBus_ME extends GT_GUIContainerMetaTile_Machin } @Optional.Method(modid = "appliedenergistics2") - private void drawSlot( final Slot s ) { + private void drawSlot(final Slot s) { if (s instanceof GT_Slot_Holo_ME) { - final RenderItem pIR = this.setItemRender( this.aeRenderItem ); + final RenderItem pIR = this.setItemRender(this.aeRenderItem); try { this.zLevel = 0.0F; itemRender.zLevel = 0.0F; - this.aeRenderItem.setAeStack( Platform.getAEStackInSlot( s ) ); - this.safeDrawSlot( s ); - } - catch (final Exception err) { - AELog.warn( "[AppEng] AE prevented crash while drawing slot: " + err.toString()); + this.aeRenderItem.setAeStack(Platform.getAEStackInSlot(s)); + this.safeDrawSlot(s); + } catch (final Exception err) { + AELog.warn("[AppEng] AE prevented crash while drawing slot: " + err.toString()); } - this.setItemRender( pIR ); + this.setItemRender(pIR); return; } safeDrawSlot(s); } @Optional.Method(modid = "appliedenergistics2") - private void safeDrawSlot( final Slot s ) - { + private void safeDrawSlot(final Slot s) { try { - GuiContainer.class.getDeclaredMethod( "func_146977_a_original", Slot.class ).invoke( this, s ); - } - catch (final Exception ignored) { + GuiContainer.class + .getDeclaredMethod("func_146977_a_original", Slot.class) + .invoke(this, s); + } catch (final Exception ignored) { } } } diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_ItemDistributor.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_ItemDistributor.java index d4a2484a88..2c8fa870a1 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_ItemDistributor.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_ItemDistributor.java @@ -6,7 +6,9 @@ import net.minecraft.entity.player.InventoryPlayer; public class GT_GUIContainer_ItemDistributor extends GT_GUIContainerMetaTile_Machine { public GT_GUIContainer_ItemDistributor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { - super(new GT_Container_ItemDistributor(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/ItemDistributor.png"); + super( + new GT_Container_ItemDistributor(aInventoryPlayer, aTileEntity), + "gregtech:textures/gui/ItemDistributor.png"); } @Override diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_MicrowaveEnergyTransmitter.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_MicrowaveEnergyTransmitter.java index 9421441f22..7b0b840276 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_MicrowaveEnergyTransmitter.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_MicrowaveEnergyTransmitter.java @@ -1,32 +1,66 @@ package gregtech.common.gui; +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; + import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; -import static gregtech.api.enums.GT_Values.RES_PATH_GUI; - public class GT_GUIContainer_MicrowaveEnergyTransmitter extends GT_GUIContainerMetaTile_Machine { - - private final int - textColor = this.getTextColorOrDefault("text", 0xFAFAFF), - textColorTitle = this.getTextColorOrDefault("title", 0xFAFAFF); - public GT_GUIContainer_MicrowaveEnergyTransmitter(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { - super(new GT_Container_MicrowaveEnergyTransmitter(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "Teleporter.png"); + private final int textColor = this.getTextColorOrDefault("text", 0xFAFAFF), + textColorTitle = this.getTextColorOrDefault("title", 0xFAFAFF); + + public GT_GUIContainer_MicrowaveEnergyTransmitter( + InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super( + new GT_Container_MicrowaveEnergyTransmitter(aInventoryPlayer, aTileEntity), + RES_PATH_GUI + "Teleporter.png"); } @Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { this.fontRendererObj.drawString("Teleporter", 46, 8, textColorTitle); if (this.mContainer != null) { - this.fontRendererObj.drawString("X: " + GT_Utility.parseNumberToString(((GT_Container_MicrowaveEnergyTransmitter) this.mContainer).mTargetX), 46, 16, textColor); - this.fontRendererObj.drawString("Y: " + GT_Utility.parseNumberToString(((GT_Container_MicrowaveEnergyTransmitter) this.mContainer).mTargetY), 46, 24, textColor); - this.fontRendererObj.drawString("Z: " + GT_Utility.parseNumberToString(((GT_Container_MicrowaveEnergyTransmitter) this.mContainer).mTargetZ), 46, 32, textColor); + this.fontRendererObj.drawString( + "X: " + + GT_Utility.parseNumberToString( + ((GT_Container_MicrowaveEnergyTransmitter) this.mContainer).mTargetX), + 46, + 16, + textColor); + this.fontRendererObj.drawString( + "Y: " + + GT_Utility.parseNumberToString( + ((GT_Container_MicrowaveEnergyTransmitter) this.mContainer).mTargetY), + 46, + 24, + textColor); + this.fontRendererObj.drawString( + "Z: " + + GT_Utility.parseNumberToString( + ((GT_Container_MicrowaveEnergyTransmitter) this.mContainer).mTargetZ), + 46, + 32, + textColor); if (((GT_Container_MicrowaveEnergyTransmitter) this.mContainer).mEgg > 0) { - this.fontRendererObj.drawString("Dim: " + GT_Utility.parseNumberToString(((GT_Container_MicrowaveEnergyTransmitter) this.mContainer).mTargetD), 46, 40, textColor); - this.fontRendererObj.drawString("Dim Valid: " + (GT_Utility.isRealDimension(((GT_Container_MicrowaveEnergyTransmitter) this.mContainer).mTargetD) ? "Yes":"No"), 46, 48, textColor); + this.fontRendererObj.drawString( + "Dim: " + + GT_Utility.parseNumberToString( + ((GT_Container_MicrowaveEnergyTransmitter) this.mContainer).mTargetD), + 46, + 40, + textColor); + this.fontRendererObj.drawString( + "Dim Valid: " + + (GT_Utility.isRealDimension( + ((GT_Container_MicrowaveEnergyTransmitter) this.mContainer).mTargetD) + ? "Yes" + : "No"), + 46, + 48, + textColor); } } } diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_OutputHatch.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_OutputHatch.java index 789e11e6f1..605fb5a463 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_OutputHatch.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_OutputHatch.java @@ -1,5 +1,7 @@ package gregtech.common.gui; +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; + import codechicken.nei.VisiblityData; import codechicken.nei.api.INEIGuiHandler; import codechicken.nei.api.TaggedInventoryArea; @@ -9,40 +11,43 @@ import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.net.GT_Packet_SetLockedFluid; import gregtech.api.util.GT_Utility; +import java.util.Collections; +import java.util.List; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.FluidStack; -import java.util.Collections; -import java.util.List; - -import static gregtech.api.enums.GT_Values.RES_PATH_GUI; - @Optional.Interface(modid = "NotEnoughItems", iface = "codechicken.nei.api.INEIGuiHandler") public class GT_GUIContainer_OutputHatch extends GT_GUIContainerMetaTile_Machine implements INEIGuiHandler { private final String mName; - private final int - textColor = this.getTextColorOrDefault("text", 0xFAFAFF), - textColorTitle = this.getTextColorOrDefault("title", 0x404040), - textColorValue = this.getTextColorOrDefault("value", 0xFAFAFF); + private final int textColor = this.getTextColorOrDefault("text", 0xFAFAFF), + textColorTitle = this.getTextColorOrDefault("title", 0x404040), + textColorValue = this.getTextColorOrDefault("value", 0xFAFAFF); - public GT_GUIContainer_OutputHatch(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { + public GT_GUIContainer_OutputHatch( + InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { super(new GT_Container_OutputHatch(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "OutputHatch.png"); mName = aName; } @Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { - fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, ySize - 96 + 2, textColorTitle); + fontRendererObj.drawString( + StatCollector.translateToLocal("container.inventory"), 8, ySize - 96 + 2, textColorTitle); fontRendererObj.drawString(mName, 8, 6, textColorTitle); if (mContainer != null) { fontRendererObj.drawString("Liquid Amount", 10, 20, textColor); - fontRendererObj.drawString(GT_Utility.parseNumberToString(((GT_Container_OutputHatch) mContainer).mContent), 10, 30, textColorValue); + fontRendererObj.drawString( + GT_Utility.parseNumberToString(((GT_Container_OutputHatch) mContainer).mContent), + 10, + 30, + textColorValue); fontRendererObj.drawString("Locked Fluid", 101, 20, textColor); - ItemStack tLockedDisplayStack = (ItemStack) mContainer.getInventory().get(3); + ItemStack tLockedDisplayStack = + (ItemStack) mContainer.getInventory().get(3); String fluidName = tLockedDisplayStack == null ? "None" : tLockedDisplayStack.getDisplayName(); fontRendererObj.drawString(fluidName, 101, 30, textColorValue); } @@ -74,7 +79,8 @@ public class GT_GUIContainer_OutputHatch extends GT_GUIContainerMetaTile_Machine @Override public boolean handleDragNDrop(GuiContainer gui, int mousex, int mousey, ItemStack draggedStack, int button) { - if (gui instanceof GT_GUIContainer_OutputHatch && ((GT_GUIContainer_OutputHatch) gui).isMouseOverSlot(3, mousex, mousey)) { + if (gui instanceof GT_GUIContainer_OutputHatch + && ((GT_GUIContainer_OutputHatch) gui).isMouseOverSlot(3, mousex, mousey)) { // the instanceof check should be unnecessary, but we will do it regardless, just in case. FluidStack tFluidStack; tFluidStack = GT_Utility.getFluidForFilledItem(draggedStack, true); @@ -82,7 +88,8 @@ public class GT_GUIContainer_OutputHatch extends GT_GUIContainerMetaTile_Machine tFluidStack = GT_Utility.getFluidFromDisplayStack(draggedStack); } if (tFluidStack != null) { - GT_Values.NW.sendToServer(new GT_Packet_SetLockedFluid(((GT_GUIContainer_OutputHatch) gui).mContainer.mTileEntity, tFluidStack)); + GT_Values.NW.sendToServer(new GT_Packet_SetLockedFluid( + ((GT_GUIContainer_OutputHatch) gui).mContainer.mTileEntity, tFluidStack)); draggedStack.stackSize = 0; return true; } diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_PrimitiveBlastFurnace.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_PrimitiveBlastFurnace.java index eff12be29a..060b93674a 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_PrimitiveBlastFurnace.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_PrimitiveBlastFurnace.java @@ -5,23 +5,21 @@ import gregtech.api.gui.widgets.GT_GuiIcon; import gregtech.api.gui.widgets.GT_GuiTabLine.GT_GuiTabIconSet; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.nei.NEI_TransferRectHost; -import net.minecraft.entity.player.InventoryPlayer; - import java.awt.*; +import net.minecraft.entity.player.InventoryPlayer; public class GT_GUIContainer_PrimitiveBlastFurnace extends GT_GUIContainerMetaTile_Machine implements NEI_TransferRectHost { private String name; public String mNEI; - private final static GT_GuiTabIconSet TAB_ICONSET = new GT_GuiTabIconSet( - GT_GuiIcon.TAB_NORMAL_BRICK, - GT_GuiIcon.TAB_HIGHLIGHT_BRICK, - GT_GuiIcon.TAB_DISABLED_BRICK); + private static final GT_GuiTabIconSet TAB_ICONSET = new GT_GuiTabIconSet( + GT_GuiIcon.TAB_NORMAL_BRICK, GT_GuiIcon.TAB_HIGHLIGHT_BRICK, GT_GuiIcon.TAB_DISABLED_BRICK); private final int textColor = this.getTextColorOrDefault("title", 0x404040); - public GT_GUIContainer_PrimitiveBlastFurnace(InventoryPlayer inventoryPlayer, IGregTechTileEntity tileEntity, - String name, String aNEI) { - super(new GT_Container_PrimitiveBlastFurnace(inventoryPlayer, tileEntity), + public GT_GUIContainer_PrimitiveBlastFurnace( + InventoryPlayer inventoryPlayer, IGregTechTileEntity tileEntity, String name, String aNEI) { + super( + new GT_Container_PrimitiveBlastFurnace(inventoryPlayer, tileEntity), String.format("gregtech:textures/gui/%s.png", name.replace(" ", ""))); this.name = name; this.mNEI = aNEI; @@ -39,8 +37,19 @@ public class GT_GUIContainer_PrimitiveBlastFurnace extends GT_GUIContainerMetaTi int y = (this.height - this.ySize) / 2; drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); if ((this.mContainer != null) && (this.mContainer.mProgressTime > 0)) { - drawTexturedModalRect(x + 58, y + 28, 176, 0, Math.max(0, Math.min(20, (1) - + this.mContainer.mProgressTime * 20 / (Math.max(this.mContainer.mMaxProgressTime, 1)))), + drawTexturedModalRect( + x + 58, + y + 28, + 176, + 0, + Math.max( + 0, + Math.min( + 20, + (1) + + this.mContainer.mProgressTime + * 20 + / (Math.max(this.mContainer.mMaxProgressTime, 1)))), 11); } } diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_QuantumChest.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_QuantumChest.java index 51086d3cfd..530e48e550 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_QuantumChest.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_QuantumChest.java @@ -1,34 +1,38 @@ package gregtech.common.gui; +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; + import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.StatCollector; -import static gregtech.api.enums.GT_Values.RES_PATH_GUI; - public class GT_GUIContainer_QuantumChest extends GT_GUIContainerMetaTile_Machine { private final String mName; - private final int - textColor = this.getTextColorOrDefault("text", 0xFAFAFF), - textColorTitle = this.getTextColorOrDefault("title", 0x404040), - textColorValue = this.getTextColorOrDefault("value", 0xFAFAFF); - + private final int textColor = this.getTextColorOrDefault("text", 0xFAFAFF), + textColorTitle = this.getTextColorOrDefault("title", 0x404040), + textColorValue = this.getTextColorOrDefault("value", 0xFAFAFF); - public GT_GUIContainer_QuantumChest(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { + public GT_GUIContainer_QuantumChest( + InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { super(new GT_Container_QuantumChest(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "BasicTank.png"); mName = aName; } @Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { - fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, ySize - 96 + 2, textColorTitle); + fontRendererObj.drawString( + StatCollector.translateToLocal("container.inventory"), 8, ySize - 96 + 2, textColorTitle); fontRendererObj.drawString(mName, 8, 6, textColorTitle); if (mContainer != null) { fontRendererObj.drawString("Item Amount", 10, 20, textColor); - fontRendererObj.drawString(GT_Utility.parseNumberToString(((GT_Container_QuantumChest) mContainer).mContent), 10, 30, textColorValue); + fontRendererObj.drawString( + GT_Utility.parseNumberToString(((GT_Container_QuantumChest) mContainer).mContent), + 10, + 30, + textColorValue); } } diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_RecipeFilter.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_RecipeFilter.java index 07f81ccf80..8bfc2c0944 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_RecipeFilter.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_RecipeFilter.java @@ -8,14 +8,16 @@ import net.minecraft.entity.player.InventoryPlayer; public class GT_GUIContainer_RecipeFilter extends GT_GUIContainer_SpecialFilter { - private static final String REPRESENTATION_SLOT_TOOLTIP = "GT5U.recipe_filter.representation_slot.tooltip"; + private static final String REPRESENTATION_SLOT_TOOLTIP = "GT5U.recipe_filter.representation_slot.tooltip"; - public GT_GUIContainer_RecipeFilter(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } + public GT_GUIContainer_RecipeFilter(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } - @Override - protected void setupTooltips() { - addToolTip(new GT_GuiSlotTooltip(((GT_Container_SpecialFilter) mContainer).getSpecialSlot(), mTooltipCache.getData(REPRESENTATION_SLOT_TOOLTIP))); - } + @Override + protected void setupTooltips() { + addToolTip(new GT_GuiSlotTooltip( + ((GT_Container_SpecialFilter) mContainer).getSpecialSlot(), + mTooltipCache.getData(REPRESENTATION_SLOT_TOOLTIP))); + } } diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_Regulator.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_Regulator.java index 6a02fc8bca..c3d579e58c 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_Regulator.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_Regulator.java @@ -14,15 +14,24 @@ public class GT_GUIContainer_Regulator extends GT_GUIContainerMetaTile_Machine { @Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { - this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[0]), 120, 9, textColor); - this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[1]), 137, 9, textColor); - this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[2]), 155, 9, textColor); - this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[3]), 120, 26, textColor); - this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[4]), 137, 26, textColor); - this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[5]), 155, 26, textColor); - this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[6]), 120, 43, textColor); - this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[7]), 137, 43, textColor); - this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[8]), 155, 43, textColor); + this.fontRendererObj.drawString( + String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[0]), 120, 9, textColor); + this.fontRendererObj.drawString( + String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[1]), 137, 9, textColor); + this.fontRendererObj.drawString( + String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[2]), 155, 9, textColor); + this.fontRendererObj.drawString( + String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[3]), 120, 26, textColor); + this.fontRendererObj.drawString( + String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[4]), 137, 26, textColor); + this.fontRendererObj.drawString( + String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[5]), 155, 26, textColor); + this.fontRendererObj.drawString( + String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[6]), 120, 43, textColor); + this.fontRendererObj.drawString( + String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[7]), 137, 43, textColor); + this.fontRendererObj.drawString( + String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[8]), 155, 43, textColor); } @Override diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_Teleporter.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_Teleporter.java index 3d6aa6f966..a5e035b4ff 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_Teleporter.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_Teleporter.java @@ -1,17 +1,16 @@ package gregtech.common.gui; +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; + import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; -import static gregtech.api.enums.GT_Values.RES_PATH_GUI; - public class GT_GUIContainer_Teleporter extends GT_GUIContainerMetaTile_Machine { - - private final int - textColor = this.getTextColorOrDefault("text", 0xFAFAFF), - textColorTitle = this.getTextColorOrDefault("text", 0xFAFAFF); + + private final int textColor = this.getTextColorOrDefault("text", 0xFAFAFF), + textColorTitle = this.getTextColorOrDefault("text", 0xFAFAFF); public GT_GUIContainer_Teleporter(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(new GT_Container_Teleporter(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "Teleporter.png"); @@ -21,12 +20,35 @@ public class GT_GUIContainer_Teleporter extends GT_GUIContainerMetaTile_Machine protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { this.fontRendererObj.drawString("Teleporter", 46, 8, textColorTitle); if (this.mContainer != null) { - this.fontRendererObj.drawString("X: " + GT_Utility.parseNumberToString(((GT_Container_Teleporter) this.mContainer).mTargetX), 46, 16, textColor); - this.fontRendererObj.drawString("Y: " + GT_Utility.parseNumberToString(((GT_Container_Teleporter) this.mContainer).mTargetY), 46, 24, textColor); - this.fontRendererObj.drawString("Z: " + GT_Utility.parseNumberToString(((GT_Container_Teleporter) this.mContainer).mTargetZ), 46, 32, textColor); + this.fontRendererObj.drawString( + "X: " + GT_Utility.parseNumberToString(((GT_Container_Teleporter) this.mContainer).mTargetX), + 46, + 16, + textColor); + this.fontRendererObj.drawString( + "Y: " + GT_Utility.parseNumberToString(((GT_Container_Teleporter) this.mContainer).mTargetY), + 46, + 24, + textColor); + this.fontRendererObj.drawString( + "Z: " + GT_Utility.parseNumberToString(((GT_Container_Teleporter) this.mContainer).mTargetZ), + 46, + 32, + textColor); if (((GT_Container_Teleporter) this.mContainer).mEgg > 0) { - this.fontRendererObj.drawString("Dim: " + GT_Utility.parseNumberToString(((GT_Container_Teleporter) this.mContainer).mTargetD), 46, 40, textColor); - this.fontRendererObj.drawString("Dim Valid: " + (GT_Utility.isRealDimension(((GT_Container_Teleporter) this.mContainer).mTargetD) ? "Yes":"No"), 46, 48, textColor); + this.fontRendererObj.drawString( + "Dim: " + GT_Utility.parseNumberToString(((GT_Container_Teleporter) this.mContainer).mTargetD), + 46, + 40, + textColor); + this.fontRendererObj.drawString( + "Dim Valid: " + + (GT_Utility.isRealDimension(((GT_Container_Teleporter) this.mContainer).mTargetD) + ? "Yes" + : "No"), + 46, + 48, + textColor); } } } diff --git a/src/main/java/gregtech/common/items/CombType.java b/src/main/java/gregtech/common/items/CombType.java index 50e3e853b2..49acf1be32 100644 --- a/src/main/java/gregtech/common/items/CombType.java +++ b/src/main/java/gregtech/common/items/CombType.java @@ -2,12 +2,10 @@ package gregtech.common.items; import gregtech.api.enums.Materials; import gregtech.api.util.GT_LanguageManager; - -import java.rmi.MarshalException; import java.util.Arrays; public enum CombType { - //Organic Line + // Organic Line LIGNIE(0, "lignite", true, Materials.Lignite, 100, 0x58300B, 0x906237), COAL(1, "coal", true, Materials.Coal, 100, 0x525252, 0x666666), STICKY(2, "stickyresin", true, Materials._NULL, 50, 0x2E8F5B, 0xDCC289), @@ -15,14 +13,14 @@ public enum CombType { APATITE(4, "apatite", true, Materials.Apatite, 100, 0xc1c1f6, 0x676784), ASH(5, "ash", true, Materials.Ash, 100, 0x1e1a18, 0xc6c6c6), - //IC2 Line + // IC2 Line COOLANT(6, "coolant", true, Materials._NULL, 100, 0x144F5A, 0x2494A2), ENERGY(7, "energy", true, Materials._NULL, 80, 0xC11F1F, 0xEBB9B9), LAPOTRON(8, "lapotron", true, Materials._NULL, 60, 0x1414FF, 0x6478FF), PYROTHEUM(9, "pyrotheum", true, Materials.Pyrotheum, 50, 0xffebc4, 0xe36400), CRYOTHEUM(10, "cryotheum", true, Materials.Pyrotheum, 50, 0x2660ff, 0x5af7ff), - //Alloy Line + // Alloy Line REDALLOY(11, "redalloy", true, Materials.RedAlloy, 100, 0xE60000, 0xB80000), REDSTONEALLOY(12, "redstonealloy", true, Materials.RedstoneAlloy, 90, 0xB80000, 0xA50808), CONDUCTIVEIRON(13, "conductiveiron", true, Materials.ConductiveIron, 80, 0x817671, 0xCEADA3), @@ -34,7 +32,7 @@ public enum CombType { STAINLESSSTEEL(19, "stainlesssteel", true, Materials.StainlessSteel, 75, 0x778899, 0xC8C8DC), ENDERIUM(20, "enderium", true, Materials.Enderium, 40, 0x2E8B57, 0x599087), - //Thaumcraft Line + // Thaumcraft Line THAUMIUMDUST(21, "thaumiumdust", true, Materials.Thaumium, 100, 0x7A007A, 0x5C005C), THAUMIUMSHARD(22, "thaumiumshard", true, Materials._NULL, 85, 0x9966FF, 0xAD85FF), AMBER(23, "amber", true, Materials.Amber, 90, 0x774B15, 0xEE7700), @@ -48,7 +46,7 @@ public enum CombType { DIVIDED(31, "divided", true, Materials.Unstable, 40, 0xF0F0F0, 0xDCDCDC), SPARKELING(32, "sparkling", true, Materials.NetherStar, 40, 0x7A007A, 0xFFFFFF), - //Gem Line + // Gem Line STONE(33, "stone", true, Materials._NULL, 70, 0x808080, 0x999999), CERTUS(34, "certus", true, Materials.CertusQuartz, 100, 0x57CFFB, 0xBBEEFF), FLUIX(35, "fluix", true, Materials.Fluix, 100, 0xA375FF, 0xB591FF), @@ -66,7 +64,7 @@ public enum CombType { GROSSULAR(47, "grossular", true, Materials.Grossular, 100, 0x9B4E00, 0x8B8B8B), FIRESTONE(48, "firestone", true, Materials.Firestone, 100, 0xC00000, 0xFF0000), - //Metals Line + // Metals Line SLAG(49, "slag", true, Materials._NULL, 50, 0xD4D4D4, 0x58300B), COPPER(50, "copper", true, Materials.Copper, 100, 0xFF6600, 0xE65C00), TIN(51, "tin", true, Materials.Tin, 100, 0xD4D4D4, 0xDDDDDD), @@ -81,7 +79,7 @@ public enum CombType { GALLIUM(60, "gallium", true, Materials.Gallium, 75, 0x8B8B8B, 0xC5C5E4), ARSENIC(61, "arsenic", true, Materials.Arsenic, 75, 0x736C52, 0x292412), - //Rare Metals Line + // Rare Metals Line BAUXITE(62, "bauxite", true, Materials.Bauxite, 85, 0x6B3600, 0x8B8B8B), ALUMINIUM(63, "aluminium", true, Materials.Aluminium, 60, 0x008AB8, 0xD6D6FF), MANGANESE(64, "manganese", true, Materials.Manganese, 30, 0xD5D5D5, 0xAAAAAA), @@ -98,7 +96,7 @@ public enum CombType { ELECTROTINE(75, "electrotine", true, Materials.Electrotine, 75, 0x1E90FF, 0x3CB4C8), ALMANDINE(76, "almandine", true, Materials.Almandine, 85, 0xC60000, 0x8B8B8B), - //Radioactive Line + // Radioactive Line URANIUM(77, "uranium", true, Materials.Uranium, 50, 0x19AF19, 0x169E16), PLUTONIUM(78, "plutonium", true, Materials.Plutonium, 10, 0x240000, 0x570000), NAQUADAH(79, "naquadah", true, Materials.Naquadah, 10, 0x000000, 0x004400), @@ -109,14 +107,14 @@ public enum CombType { AMERICIUM(84, "americium", true, Materials.Americium, 5, 0xE6E6FF, 0xC8C8C8), NEUTRONIUM(85, "neutronium", true, Materials.Neutronium, 2, 0xFFF0F0, 0xFAFAFA), - //Twilight + // Twilight NAGA(86, "naga", true, Materials._NULL, 100, 0x0D5A0D, 0x28874B), LICH(87, "lich", true, Materials._NULL, 90, 0x5C605E, 0xC5C5C5), HYDRA(88, "hydra", true, Materials._NULL, 80, 0x872836, 0xB8132C), URGHAST(89, "urghast", true, Materials._NULL, 70, 0x7C0618, 0xA7041C), SNOWQUEEN(90, "snowqueen", true, Materials._NULL, 60, 0x9C0018, 0xD02001), - //Space + // Space SPACE(91, "space", true, Materials._NULL, 100, 0x003366, 0xC0C0C0), METEORICIRON(92, "meteoriciron", true, Materials.MeteoricIron, 100, 0x321928, 0x643250), DESH(93, "desh", true, Materials.Desh, 90, 0x282828, 0x323232), @@ -129,7 +127,7 @@ public enum CombType { BLACKPLUTONIUM(100, "blackplutonium", true, Materials.Quantium, 25, 0x000000, 0x323232), TRINIUM(101, "trinium", true, Materials.Trinium, 25, 0xB0E0E6, 0xC8C8D2), - //Planet + // Planet MERCURY(102, "mercury", true, Materials._NULL, 65, 0x4A4033, 0xB5A288), VENUS(103, "venus", true, Materials._NULL, 65, 0x120E07, 0x272010), MOON(104, "moon", true, Materials._NULL, 90, 0x373735, 0x7E7E78), @@ -146,12 +144,12 @@ public enum CombType { BARNARDA(115, "barnarda", true, Materials._NULL, 10, 0x0D5A0D, 0xE6C18D), VEGA(116, "vega", true, Materials._NULL, 10, 0x1A2036, 0xB5C0DE), - //Infinity + // Infinity COSMICNEUTRONIUM(117, "cosmicneutronium", true, Materials._NULL, 5, 0x484848, 0x323232), INFINITYCATALYST(118, "infinitycatalyst", true, Materials._NULL, 2, 0xFFFFFF, 0xFFFFFF), INFINITY(119, "infinity", true, Materials._NULL, 1, 0xFFFFFF, 0xFFFFFF), - //HEE + // HEE ENDDUST(120, "enddust", true, Materials._NULL, 50, 0x003A7D, 0xCC00FA), ECTOPLASMA(121, "ectoplasma", true, Materials._NULL, 35, 0x381C40, 0xDCB0E5), ARCANESHARD(122, "arcaneshard", true, Materials._NULL, 35, 0x333D82, 0x9010AD), @@ -164,24 +162,25 @@ public enum CombType { RUNEII(129, "rune2", true, Materials._NULL, 10, 0xE31010, 0x0104D9), FIREESSENSE(130, "fireessence", true, Materials._NULL, 30, 0xFFA157, 0xD41238), CRYOLITE(131, "cryolite", true, Materials.Cryolite, 90, 0xBFEFFF, 0x73B9D0), - //(NOBLE) GAS LINE + // (NOBLE) GAS LINE HELIUM(132, "helium", true, Materials.Helium, 90, 0xFFA9FF, 0xFFFFC3), ARGON(133, "argon", true, Materials.Argon, 95, 0x89D9E1, 0x160822), - //XENON, NEON and KRYPTON Fluid extractor Recipes are located in GT_MachineRecipeLoader.java + // XENON, NEON and KRYPTON Fluid extractor Recipes are located in GT_MachineRecipeLoader.java XENON(134, "xenon", true, Materials._NULL, 85, 0x160822, 0x8A97B0), NEON(135, "neon", true, Materials._NULL, 90, 0xFF7200, 0xFFC826), KRYPTON(136, "krypton", true, Materials._NULL, 85, 0x160822, 0x8A97B0), NITROGEN(137, "nitrogen", true, Materials.Nitrogen, 100, 0xA52A2A, 0xFFC832), OXYGEN(138, "oxygen", true, Materials.Oxygen, 100, 0x8F8FFF, 0xFFFFFF), HYDROGEN(139, "hydrogen", true, Materials.Hydrogen, 100, 0xFF1493, 0xFFFFFF), - //Those are supposed to be in the organic branch, but that would require shifting all comb IDs and we don't want to risk it. + // Those are supposed to be in the organic branch, but that would require shifting all comb IDs and we don't want to + // risk it. PHOSPHORUS(140, "phosphorus", true, Materials.Phosphorus, 100, 0xC1C1F6, 0xFFC826), MICA(141, "mica", true, Materials.Mica, 100, 0x8A97B0, 0x2F3641), - //Seaweed is located in the planet line + // Seaweed is located in the planet line SEAWEED(142, "seaweed", true, Materials._NULL, 90, 0x83FF83, 0xCBCBCB), - //just Walrus + // just Walrus WALRUS(143, "walrus", true, Materials._NULL, 100, 0xB5CFC9, 0xD6D580), - //TC infused Air shards line. Recipes in GT_MachineRecipeLoader.java Lines 1500+ + Nether/Endshard + // TC infused Air shards line. Recipes in GT_MachineRecipeLoader.java Lines 1500+ + Nether/Endshard INFUSEDAER(144, "infusedair", true, Materials._NULL, 100, 0x60602F, 0xFFFF7E), INFUSEDTERRA(145, "infusedterra", true, Materials._NULL, 100, 0x003300, 0x008600), INFUSEDIGNIS(146, "infusedignis", true, Materials._NULL, 100, 0x3B0E00, 0xED3801), @@ -196,11 +195,11 @@ public enum CombType { CAELESTISGREEN(155, "caelestisgreen", true, Materials._NULL, 100, 0x00FF00, 0xB233FF), CAELESTISBLUE(156, "caelestisblue", true, Materials._NULL, 100, 0x0000FF, 0xFF99A5), UNKNOWNWATER(157, "unknownwater", true, Materials._NULL, 100, 0x36ABFF, 0x4333A5), - //ESSENTIA gets a use soon. Dont remove. + // ESSENTIA gets a use soon. Dont remove. ESSENTIA(158, "essentia", true, Materials._NULL, 100, 0xED3601, 0xFF6D50), INDIUM(159, "indium", true, Materials.Indium, 100, 0x8F5D99, 0xFFA9FF), - //ALWAYS KEEP _NULL AT THE BOTTOM + // ALWAYS KEEP _NULL AT THE BOTTOM _NULL(-1, "INVALIDCOMB", false, Materials._NULL, 0, 0, 0); public boolean showInList; @@ -221,8 +220,7 @@ public enum CombType { } CombType(int id, String pName, boolean show, Materials material, int chance, int... color) { - if (id < 0 && !"INVALIDCOMB".equals(pName)) - throw new IllegalArgumentException(); + if (id < 0 && !"INVALIDCOMB".equals(pName)) throw new IllegalArgumentException(); this.id = id; this.name = pName; this.material = material; @@ -237,11 +235,12 @@ public enum CombType { public String getName() { - return GT_LanguageManager.addStringLocalization("comb." + this.name, this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Comb"); + return GT_LanguageManager.addStringLocalization( + "comb." + this.name, this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Comb"); } public int[] getColours() { - return color == null || color.length != 2 ? new int[]{0, 0} : color; + return color == null || color.length != 2 ? new int[] {0, 0} : color; } public int getId() { @@ -256,12 +255,14 @@ public enum CombType { private static final CombType[] VALUES; static { - int biggestId = Arrays.stream(CombType.values()).mapToInt(CombType::getId).max().getAsInt(); + int biggestId = Arrays.stream(CombType.values()) + .mapToInt(CombType::getId) + .max() + .getAsInt(); VALUES = new CombType[biggestId + 1]; Arrays.fill(VALUES, _NULL); for (CombType type : CombType.values()) { - if (type != _NULL) - VALUES[type.getId()] = type; + if (type != _NULL) VALUES[type.getId()] = type; } } } diff --git a/src/main/java/gregtech/common/items/DropType.java b/src/main/java/gregtech/common/items/DropType.java index f3ea945016..6bc8eadcf7 100644 --- a/src/main/java/gregtech/common/items/DropType.java +++ b/src/main/java/gregtech/common/items/DropType.java @@ -4,32 +4,32 @@ import gregtech.api.enums.Materials; import gregtech.api.util.GT_LanguageManager; public enum DropType { - - OIL("oil",true), - MUTAGEN("small mutagen catalyst",true), - COOLANT("coolant",true), - HOT_COOLANT("hot coolant",true), - HYDRA("hydra blood",true), - SNOW_QUEEN("snowqueen blood",true), - OXYGEN("oxygen",true), - LAPIS("lapis coolant",true), - ENDERGOO("ender goo",true); - - private static int[][] colours = new int[][]{ - {0x19191B, 0x303032}, - {0xffc100, 0x00ff11}, - {0x144F5A, 0x2494A2}, - {0xC11F1F, 0xEBB9B9}, - {0x872836, 0xB8132C}, - {0xD02001, 0x9C0018}, - {0x003366, 0x0066BB}, - {0x1727b1, 0x008ce3}, - {0xA005E7, 0x161616}, + OIL("oil", true), + MUTAGEN("small mutagen catalyst", true), + COOLANT("coolant", true), + HOT_COOLANT("hot coolant", true), + HYDRA("hydra blood", true), + SNOW_QUEEN("snowqueen blood", true), + OXYGEN("oxygen", true), + LAPIS("lapis coolant", true), + ENDERGOO("ender goo", true); + + private static int[][] colours = new int[][] { + {0x19191B, 0x303032}, + {0xffc100, 0x00ff11}, + {0x144F5A, 0x2494A2}, + {0xC11F1F, 0xEBB9B9}, + {0x872836, 0xB8132C}, + {0xD02001, 0x9C0018}, + {0x003366, 0x0066BB}, + {0x1727b1, 0x008ce3}, + {0xA005E7, 0x161616}, }; public boolean showInList; public Materials material; public int chance; private String name; + private DropType(String pName, boolean show) { this.name = pName; this.showInList = show; @@ -41,7 +41,8 @@ public enum DropType { public String getName() { - return GT_LanguageManager.addStringLocalization("drop." + this.name, this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Drop"); + return GT_LanguageManager.addStringLocalization( + "drop." + this.name, this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Drop"); } public int[] getColours() { diff --git a/src/main/java/gregtech/common/items/GT_DepletetCell_Item.java b/src/main/java/gregtech/common/items/GT_DepletetCell_Item.java index 056ab796fa..7a4df4f1a3 100644 --- a/src/main/java/gregtech/common/items/GT_DepletetCell_Item.java +++ b/src/main/java/gregtech/common/items/GT_DepletetCell_Item.java @@ -11,11 +11,19 @@ public class GT_DepletetCell_Item extends GT_RadioactiveCellIC_Item { } @Override - public void processChamber(IReactor paramIReactor, ItemStack paramItemStack, int paramInt1, int paramInt2, boolean paramBoolean) { - } + public void processChamber( + IReactor paramIReactor, ItemStack paramItemStack, int paramInt1, int paramInt2, boolean paramBoolean) {} @Override - public boolean acceptUraniumPulse(IReactor paramIReactor, ItemStack paramItemStack1, ItemStack paramItemStack2, int paramInt1, int paramInt2, int paramInt3, int paramInt4, boolean paramBoolean) { + public boolean acceptUraniumPulse( + IReactor paramIReactor, + ItemStack paramItemStack1, + ItemStack paramItemStack2, + int paramInt1, + int paramInt2, + int paramInt3, + int paramInt4, + boolean paramBoolean) { return false; } @@ -35,7 +43,8 @@ public class GT_DepletetCell_Item extends GT_RadioactiveCellIC_Item { } @Override - public int alterHeat(IReactor paramIReactor, ItemStack paramItemStack, int paramInt1, int paramInt2, int paramInt3) { + public int alterHeat( + IReactor paramIReactor, ItemStack paramItemStack, int paramInt1, int paramInt2, int paramInt3) { return 0; } diff --git a/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java b/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java index a2879844aa..aa9a150b7e 100644 --- a/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java +++ b/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java @@ -7,6 +7,11 @@ import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.items.GT_Generic_Item; import gregtech.api.util.GT_Utility; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.stream.Stream; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; @@ -20,13 +25,7 @@ import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.stream.Stream; - -@SuppressWarnings({"rawtypes","unchecked"}) +@SuppressWarnings({"rawtypes", "unchecked"}) public class GT_FluidDisplayItem extends GT_Generic_Item { private static final Map<Fluid, String> sFluidTooltips = new HashMap<>(); @@ -39,8 +38,10 @@ public class GT_FluidDisplayItem extends GT_Generic_Item { @Override protected void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) { if (FluidRegistry.getFluid(aStack.getItemDamage()) != null) { - String tChemicalFormula = getChemicalFormula(new FluidStack(FluidRegistry.getFluid(aStack.getItemDamage()), 1)); - if (!tChemicalFormula.isEmpty()) aList.add(EnumChatFormatting.YELLOW + tChemicalFormula + EnumChatFormatting.RESET); + String tChemicalFormula = + getChemicalFormula(new FluidStack(FluidRegistry.getFluid(aStack.getItemDamage()), 1)); + if (!tChemicalFormula.isEmpty()) + aList.add(EnumChatFormatting.YELLOW + tChemicalFormula + EnumChatFormatting.RESET); } NBTTagCompound aNBT = aStack.getTagCompound(); if (GT_Values.D1) { @@ -52,17 +53,20 @@ public class GT_FluidDisplayItem extends GT_Generic_Item { if (aNBT != null) { long tToolTipAmount = aNBT.getLong("mFluidDisplayAmount"); if (tToolTipAmount > 0L) { - aList.add(EnumChatFormatting.BLUE + "Amount: " + GT_Utility.formatNumbers(tToolTipAmount) + " L" + EnumChatFormatting.GRAY); + aList.add(EnumChatFormatting.BLUE + "Amount: " + GT_Utility.formatNumbers(tToolTipAmount) + " L" + + EnumChatFormatting.GRAY); } - aList.add(EnumChatFormatting.RED + "Temperature: " + GT_Utility.formatNumbers(aNBT.getLong("mFluidDisplayHeat")) + " K" + EnumChatFormatting.GRAY); - aList.add(EnumChatFormatting.GREEN + String.format(transItem("018", "State: %s"), aNBT.getBoolean("mFluidState") ? "Gas" : "Liquid") + EnumChatFormatting.GRAY); + aList.add(EnumChatFormatting.RED + "Temperature: " + + GT_Utility.formatNumbers(aNBT.getLong("mFluidDisplayHeat")) + " K" + EnumChatFormatting.GRAY); + aList.add(EnumChatFormatting.GREEN + + String.format(transItem("018", "State: %s"), aNBT.getBoolean("mFluidState") ? "Gas" : "Liquid") + + EnumChatFormatting.GRAY); } } @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister aIconRegister) { - } + public void registerIcons(IIconRegister aIconRegister) {} @Override public IIcon getIconFromDamage(int aMetaData) { @@ -104,32 +108,32 @@ public class GT_FluidDisplayItem extends GT_Generic_Item { @SideOnly(Side.CLIENT) public String getChemicalFormula(FluidStack aRealFluid) { - return sFluidTooltips.computeIfAbsent(aRealFluid.getFluid(), - fluid -> { - for(ItemStack tContainer : GT_Utility.getContainersFromFluid(aRealFluid)) { - if (isCell(tContainer)) { - Materials tMaterial = getMaterialFromCell(tContainer); - if (!tMaterial.equals(Materials._NULL)) { - if (tMaterial.mChemicalFormula.equals("?")) { - return ""; - } - else { - return tMaterial.mChemicalFormula; - } - } - else { - // For GT++ Fluid Display - // GT++ didn't register a Material in GT, so I have too find the Chemical Formula in its cell's tooltip - List tTooltip = tContainer.getTooltip(null, true); - for (Object tInfo : tTooltip) { - if (!((String) tInfo).contains(" ") && !((String) tInfo).contains(":") && tTooltip.indexOf(tInfo) != 0) { - return (String) tInfo; - } - } + return sFluidTooltips.computeIfAbsent(aRealFluid.getFluid(), fluid -> { + for (ItemStack tContainer : GT_Utility.getContainersFromFluid(aRealFluid)) { + if (isCell(tContainer)) { + Materials tMaterial = getMaterialFromCell(tContainer); + if (!tMaterial.equals(Materials._NULL)) { + if (tMaterial.mChemicalFormula.equals("?")) { + return ""; + } else { + return tMaterial.mChemicalFormula; + } + } else { + // For GT++ Fluid Display + // GT++ didn't register a Material in GT, so I have too find the Chemical Formula in its cell's + // tooltip + List tTooltip = tContainer.getTooltip(null, true); + for (Object tInfo : tTooltip) { + if (!((String) tInfo).contains(" ") + && !((String) tInfo).contains(":") + && tTooltip.indexOf(tInfo) != 0) { + return (String) tInfo; } } } - return ""; + } + } + return ""; }); } @@ -160,10 +164,7 @@ public class GT_FluidDisplayItem extends GT_Generic_Item { String tOreDictName = OreDictionary.getOreName(tOreDict); if (tOreDictName.startsWith("cell")) { return Materials.getRealMaterial( - tOreDictName.replace("cell", "") - .replace("Molten", "") - .replace("Plasma", "") - ); + tOreDictName.replace("cell", "").replace("Molten", "").replace("Plasma", "")); } } return Materials._NULL; diff --git a/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java b/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java index 052e5ed1b6..74dab0e74e 100644 --- a/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java +++ b/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java @@ -1,5 +1,8 @@ package gregtech.common.items; +import static gregtech.GT_Mod.GT_FML_LOGGER; +import static gregtech.api.enums.GT_Values.RES_PATH_ITEM; + import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -18,6 +21,11 @@ import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.function.BiFunction; +import java.util.function.Predicate; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; @@ -34,19 +42,11 @@ import net.minecraftforge.common.util.Constants; import net.minecraftforge.common.util.FakePlayer; import org.apache.commons.lang3.tuple.Pair; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.function.BiFunction; -import java.util.function.Predicate; - -import static gregtech.GT_Mod.GT_FML_LOGGER; -import static gregtech.api.enums.GT_Values.RES_PATH_ITEM; - public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetworkUpdatableItem { private static final String aTextEmptyRow = " "; private static final List<ItemStack> ALL_VARIANTS = new ArrayList<>(); protected IIcon[] mIconDamage = new IIcon[25]; + public GT_IntegratedCircuit_Item() { super("integrated_circuit", "Programmed Circuit", ""); setHasSubtypes(true); @@ -61,33 +61,84 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo ALL_VARIANTS.add(aStack); } - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 0L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.circuit.get(Materials.Basic)}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Circuit_Integrated.getWithDamage(1L, 0L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {OrePrefixes.circuit.get(Materials.Basic)}); long bits = GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE; - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 1L), bits, new Object[]{"d ", " P ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 2L), bits, new Object[]{" d ", " P ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 3L), bits, new Object[]{" d", " P ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 4L), bits, new Object[]{aTextEmptyRow, " Pd", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 5L), bits, new Object[]{aTextEmptyRow, " P ", " d", 'P', ItemList.Circuit_Integrated.getWildcard(1L)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 6L), bits, new Object[]{aTextEmptyRow, " P ", " d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 7L), bits, new Object[]{aTextEmptyRow, " P ", "d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 8L), bits, new Object[]{aTextEmptyRow, "dP ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L)}); - - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 9L), bits, new Object[]{"P d", aTextEmptyRow, aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 10L), bits, new Object[]{"P ", " d", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 11L), bits, new Object[]{"P ", aTextEmptyRow, " d", 'P', ItemList.Circuit_Integrated.getWildcard(1L)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 12L), bits, new Object[]{"P ", aTextEmptyRow, " d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 13L), bits, new Object[]{" P", aTextEmptyRow, " d", 'P', ItemList.Circuit_Integrated.getWildcard(1L)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 14L), bits, new Object[]{" P", aTextEmptyRow, " d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 15L), bits, new Object[]{" P", aTextEmptyRow, "d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 16L), bits, new Object[]{" P", "d ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 17L), bits, new Object[]{aTextEmptyRow, aTextEmptyRow, "d P", 'P', ItemList.Circuit_Integrated.getWildcard(1L)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 18L), bits, new Object[]{aTextEmptyRow, "d ", " P", 'P', ItemList.Circuit_Integrated.getWildcard(1L)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 19L), bits, new Object[]{"d ", aTextEmptyRow, " P", 'P', ItemList.Circuit_Integrated.getWildcard(1L)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 20L), bits, new Object[]{" d ", aTextEmptyRow, " P", 'P', ItemList.Circuit_Integrated.getWildcard(1L)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 21L), bits, new Object[]{"d ", aTextEmptyRow, "P ", 'P', ItemList.Circuit_Integrated.getWildcard(1L)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 22L), bits, new Object[]{" d ", aTextEmptyRow, "P ", 'P', ItemList.Circuit_Integrated.getWildcard(1L)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 23L), bits, new Object[]{" d", aTextEmptyRow, "P ", 'P', ItemList.Circuit_Integrated.getWildcard(1L)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 24L), bits, new Object[]{aTextEmptyRow, " d", "P ", 'P', ItemList.Circuit_Integrated.getWildcard(1L)}); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 1L), bits, new Object[] { + "d ", " P ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 2L), bits, new Object[] { + " d ", " P ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 3L), bits, new Object[] { + " d", " P ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 4L), bits, new Object[] { + aTextEmptyRow, " Pd", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 5L), bits, new Object[] { + aTextEmptyRow, " P ", " d", 'P', ItemList.Circuit_Integrated.getWildcard(1L) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 6L), bits, new Object[] { + aTextEmptyRow, " P ", " d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 7L), bits, new Object[] { + aTextEmptyRow, " P ", "d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 8L), bits, new Object[] { + aTextEmptyRow, "dP ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) + }); + + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 9L), bits, new Object[] { + "P d", aTextEmptyRow, aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 10L), bits, new Object[] { + "P ", " d", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 11L), bits, new Object[] { + "P ", aTextEmptyRow, " d", 'P', ItemList.Circuit_Integrated.getWildcard(1L) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 12L), bits, new Object[] { + "P ", aTextEmptyRow, " d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 13L), bits, new Object[] { + " P", aTextEmptyRow, " d", 'P', ItemList.Circuit_Integrated.getWildcard(1L) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 14L), bits, new Object[] { + " P", aTextEmptyRow, " d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 15L), bits, new Object[] { + " P", aTextEmptyRow, "d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 16L), bits, new Object[] { + " P", "d ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 17L), bits, new Object[] { + aTextEmptyRow, aTextEmptyRow, "d P", 'P', ItemList.Circuit_Integrated.getWildcard(1L) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 18L), bits, new Object[] { + aTextEmptyRow, "d ", " P", 'P', ItemList.Circuit_Integrated.getWildcard(1L) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 19L), bits, new Object[] { + "d ", aTextEmptyRow, " P", 'P', ItemList.Circuit_Integrated.getWildcard(1L) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 20L), bits, new Object[] { + " d ", aTextEmptyRow, " P", 'P', ItemList.Circuit_Integrated.getWildcard(1L) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 21L), bits, new Object[] { + "d ", aTextEmptyRow, "P ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 22L), bits, new Object[] { + " d ", aTextEmptyRow, "P ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 23L), bits, new Object[] { + " d", aTextEmptyRow, "P ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 24L), bits, new Object[] { + aTextEmptyRow, " d", "P ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) + }); } private static String getModeString(int aMetaData) { @@ -113,9 +164,25 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo @Override public void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) { super.addAdditionalToolTips(aList, aStack, aPlayer); - aList.add(GT_LanguageManager.addStringLocalization(new StringBuilder().append(getUnlocalizedName()).append(".configuration").toString(), "Configuration: ") + getConfigurationString(getDamage(aStack))); - aList.add(GT_LanguageManager.addStringLocalization(new StringBuilder().append(getUnlocalizedName()).append(".tooltip.0").toString(), "Right click to reconfigure")); - aList.add(GT_LanguageManager.addStringLocalization(new StringBuilder().append(getUnlocalizedName()).append(".tooltip.1").toString(), "Needs a screwdriver or circuit programming tool")); + aList.add(GT_LanguageManager.addStringLocalization( + new StringBuilder() + .append(getUnlocalizedName()) + .append(".configuration") + .toString(), + "Configuration: ") + + getConfigurationString(getDamage(aStack))); + aList.add(GT_LanguageManager.addStringLocalization( + new StringBuilder() + .append(getUnlocalizedName()) + .append(".tooltip.0") + .toString(), + "Right click to reconfigure")); + aList.add(GT_LanguageManager.addStringLocalization( + new StringBuilder() + .append(getUnlocalizedName()) + .append(".tooltip.1") + .toString(), + "Needs a screwdriver or circuit programming tool")); } @Override @@ -133,8 +200,9 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister aIconRegister) { super.registerIcons(aIconRegister); - for (int i=0; i < mIconDamage.length; i++) { - mIconDamage[i] = aIconRegister.registerIcon(RES_PATH_ITEM + (GT_Config.troll ? "troll" : getUnlocalizedName() + "/" + i)); + for (int i = 0; i < mIconDamage.length; i++) { + mIconDamage[i] = aIconRegister.registerIcon( + RES_PATH_ITEM + (GT_Config.troll ? "troll" : getUnlocalizedName() + "/" + i)); } if (GregTech_API.sPostloadFinished) { GT_Log.out.println("GT_Mod: Starting Item Icon Load Phase"); @@ -144,7 +212,9 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo for (Runnable tRunnable : GregTech_API.sGTItemIconload) { tRunnable.run(); } - } catch (Throwable e) {e.printStackTrace(GT_Log.err);} + } catch (Throwable e) { + e.printStackTrace(GT_Log.err); + } GT_Log.out.println("GT_Mod: Finished Item Icon Load Phase"); GT_FML_LOGGER.info("GT_Mod: Finished Item Icon Load Phase"); } @@ -159,8 +229,7 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo @Override public boolean receive(ItemStack stack, EntityPlayerMP player, NBTTagCompound tag) { int meta = tag.hasKey("meta", Constants.NBT.TAG_BYTE) ? tag.getByte("meta") : -1; - if (meta < 0 || meta > 24) - return true; + if (meta < 0 || meta > 24) return true; if (!player.capabilities.isCreativeMode) { Pair<Integer, BiFunction<ItemStack, EntityPlayerMP, ItemStack>> toolIndex = findConfiguratorInInv(player); @@ -175,7 +244,17 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo } @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) { + public boolean onItemUse( + ItemStack stack, + EntityPlayer player, + World world, + int x, + int y, + int z, + int side, + float xOffset, + float yOffset, + float zOffset) { // nothing on server side or fake player if (player instanceof FakePlayer || !world.isRemote) return false; // check if any screwdriver @@ -187,12 +266,16 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo if (configurator == null) { int count; try { - count = Integer.parseInt(StatCollector.translateToLocal("GT5U.item.programmed_circuit.no_screwdriver.count")); + count = Integer.parseInt( + StatCollector.translateToLocal("GT5U.item.programmed_circuit.no_screwdriver.count")); } catch (NumberFormatException e) { - player.addChatComponentMessage(new ChatComponentText("Error in translation GT5U.item.programmed_circuit.no_screwdriver.count: " + e.getMessage())); + player.addChatComponentMessage(new ChatComponentText( + "Error in translation GT5U.item.programmed_circuit.no_screwdriver.count: " + + e.getMessage())); count = 1; } - player.addChatComponentMessage(new ChatComponentTranslation("GT5U.item.programmed_circuit.no_screwdriver." + XSTR.XSTR_INSTANCE.nextInt(count))); + player.addChatComponentMessage(new ChatComponentTranslation( + "GT5U.item.programmed_circuit.no_screwdriver." + XSTR.XSTR_INSTANCE.nextInt(count))); return false; } configuratorStack = player.inventory.mainInventory[configurator.getKey()]; @@ -202,15 +285,15 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo } private void openSelectorGui(ItemStack configurator, int meta) { - FMLCommonHandler.instance().showGuiScreen(new GT_GUIDialogSelectItem( - StatCollector.translateToLocal("GT5U.item.programmed_circuit.select.header"), - configurator, - null, - GT_IntegratedCircuit_Item::onConfigured, - ALL_VARIANTS, - meta, - true - )); + FMLCommonHandler.instance() + .showGuiScreen(new GT_GUIDialogSelectItem( + StatCollector.translateToLocal("GT5U.item.programmed_circuit.select.header"), + configurator, + null, + GT_IntegratedCircuit_Item::onConfigured, + ALL_VARIANTS, + meta, + true)); } private static void onConfigured(ItemStack stack) { @@ -219,17 +302,17 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo GT_Values.NW.sendToServer(new GT_Packet_UpdateItem(tag)); } - private static Pair<Integer, BiFunction<ItemStack, EntityPlayerMP, ItemStack>> findConfiguratorInInv(EntityPlayer player) { + private static Pair<Integer, BiFunction<ItemStack, EntityPlayerMP, ItemStack>> findConfiguratorInInv( + EntityPlayer player) { ItemStack[] mainInventory = player.inventory.mainInventory; for (int j = 0, mainInventoryLength = mainInventory.length; j < mainInventoryLength; j++) { ItemStack toolStack = mainInventory[j]; - if (!GT_Utility.isStackValid(toolStack)) - continue; + if (!GT_Utility.isStackValid(toolStack)) continue; - for (Map.Entry<Predicate<ItemStack>, BiFunction<ItemStack, EntityPlayerMP, ItemStack>> p : GregTech_API.sCircuitProgrammerList.entrySet()) - if (p.getKey().test(toolStack)) - return Pair.of(j, p.getValue()); + for (Map.Entry<Predicate<ItemStack>, BiFunction<ItemStack, EntityPlayerMP, ItemStack>> p : + GregTech_API.sCircuitProgrammerList.entrySet()) + if (p.getKey().test(toolStack)) return Pair.of(j, p.getValue()); } return null; } diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java index 988038668b..df979e2b3e 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java @@ -1,5 +1,7 @@ package gregtech.common.items; +import static gregtech.api.enums.Textures.BlockIcons.*; + import cpw.mods.fml.common.Loader; import gregtech.api.GregTech_API; import gregtech.api.enums.Dyes; @@ -24,6 +26,10 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gregtech.common.covers.*; import gregtech.common.items.behaviors.*; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import net.minecraft.block.Block; import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.item.EntityItem; @@ -36,158 +42,885 @@ import net.minecraft.potion.Potion; import net.minecraft.util.MathHelper; import net.minecraftforge.oredict.OreDictionary; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static gregtech.api.enums.Textures.BlockIcons.*; - public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { public static GT_MetaGenerated_Item_01 INSTANCE; - private final String mToolTipPurify = GT_LanguageManager.addStringLocalization("metaitem.01.tooltip.purify", "Throw into Cauldron to get clean Dust"); + private final String mToolTipPurify = GT_LanguageManager.addStringLocalization( + "metaitem.01.tooltip.purify", "Throw into Cauldron to get clean Dust"); private static final String aTextArrow = " A"; private static final String aTextStick = " S "; private static final String aTextFeather = "F "; - private static final String aTextEmptyRow = " "; private static final String aTextShape = " P "; + private static final String aTextEmptyRow = " "; + private static final String aTextShape = " P "; private static final String PartCoverText = " L/t ("; private static final String PartCoverText2 = " L/s) as Cover"; private static final String PartNotCoverText = "Cannot be used as a Cover"; private static final String RAText = "Grabs from and inserts into specific slots"; private static final String FRText1 = "Configurable up to "; - private static final String FRText2 = " L/sec (as Cover)/n Rightclick/Screwdriver-rightclick/Shift-screwdriver-rightclick/n to adjust the pump speed by 1/16/256 L/sec per click"; + private static final String FRText2 = + " L/sec (as Cover)/n Rightclick/Screwdriver-rightclick/Shift-screwdriver-rightclick/n to adjust the pump speed by 1/16/256 L/sec per click"; public GT_MetaGenerated_Item_01() { - super("metaitem.01", OrePrefixes.dustTiny, OrePrefixes.dustSmall, OrePrefixes.dust, OrePrefixes.dustImpure, OrePrefixes.dustPure, OrePrefixes.crushed, OrePrefixes.crushedPurified, OrePrefixes.crushedCentrifuged, OrePrefixes.gem, OrePrefixes.nugget, null, OrePrefixes.ingot, OrePrefixes.ingotHot, OrePrefixes.ingotDouble, OrePrefixes.ingotTriple, OrePrefixes.ingotQuadruple, OrePrefixes.ingotQuintuple, OrePrefixes.plate, OrePrefixes.plateDouble, OrePrefixes.plateTriple, OrePrefixes.plateQuadruple, OrePrefixes.plateQuintuple, OrePrefixes.plateDense, OrePrefixes.stick, OrePrefixes.lens, OrePrefixes.round, OrePrefixes.bolt, OrePrefixes.screw, OrePrefixes.ring, OrePrefixes.foil, OrePrefixes.cell, OrePrefixes.cellPlasma); + super( + "metaitem.01", + OrePrefixes.dustTiny, + OrePrefixes.dustSmall, + OrePrefixes.dust, + OrePrefixes.dustImpure, + OrePrefixes.dustPure, + OrePrefixes.crushed, + OrePrefixes.crushedPurified, + OrePrefixes.crushedCentrifuged, + OrePrefixes.gem, + OrePrefixes.nugget, + null, + OrePrefixes.ingot, + OrePrefixes.ingotHot, + OrePrefixes.ingotDouble, + OrePrefixes.ingotTriple, + OrePrefixes.ingotQuadruple, + OrePrefixes.ingotQuintuple, + OrePrefixes.plate, + OrePrefixes.plateDouble, + OrePrefixes.plateTriple, + OrePrefixes.plateQuadruple, + OrePrefixes.plateQuintuple, + OrePrefixes.plateDense, + OrePrefixes.stick, + OrePrefixes.lens, + OrePrefixes.round, + OrePrefixes.bolt, + OrePrefixes.screw, + OrePrefixes.ring, + OrePrefixes.foil, + OrePrefixes.cell, + OrePrefixes.cellPlasma); INSTANCE = this; int tLastID = 0; setBurnValue(17000 + Materials.Wood.mMetaItemSubID, 1600); GT_OreDictUnificator.addToBlacklist(new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID)); - GT_ModHandler.addCompressionRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 8L), new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID)); - GregTech_API.registerCover(new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID), TextureFactory.of(COVER_WOOD_PLATE), null); + GT_ModHandler.addCompressionRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 8L), + new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID)); + GregTech_API.registerCover( + new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID), + TextureFactory.of(COVER_WOOD_PLATE), + null); ItemStack tStack = new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID); tStack.setStackDisplayName("The holy Planks of Sengir"); GT_Utility.ItemNBT.addEnchantment(tStack, Enchantment.smite, 10); - GT_ModHandler.addCraftingRecipe(tStack, GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"XXX", "XDX", "XXX", 'X', OrePrefixes.gem.get(Materials.NetherStar), 'D', new ItemStack(Blocks.dragon_egg, 1, 32767)}); + GT_ModHandler.addCraftingRecipe(tStack, GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { + "XXX", + "XDX", + "XXX", + 'X', + OrePrefixes.gem.get(Materials.NetherStar), + 'D', + new ItemStack(Blocks.dragon_egg, 1, 32767) + }); ItemList.Credit_Greg_Copper.set(addItem(tLastID = 0, "Copper GT Credit", "0.125 Credits")); - ItemList.Credit_Greg_Cupronickel.set(addItem(tLastID = 1, "Cupronickel GT Credit", "1 Credit", new ItemData(Materials.Cupronickel, 907200L))); - ItemList.Credit_Greg_Silver.set(addItem(tLastID = 2, "Silver GT Credit", "8 Credits", new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); + ItemList.Credit_Greg_Cupronickel.set(addItem( + tLastID = 1, "Cupronickel GT Credit", "1 Credit", new ItemData(Materials.Cupronickel, 907200L))); + ItemList.Credit_Greg_Silver.set(addItem( + tLastID = 2, "Silver GT Credit", "8 Credits", new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); ItemList.Credit_Greg_Gold.set(addItem(tLastID = 3, "Gold GT Credit", "64 Credits")); ItemList.Credit_Greg_Platinum.set(addItem(tLastID = 4, "Platinum GT Credit", "512 Credits")); ItemList.Credit_Greg_Osmium.set(addItem(tLastID = 5, "Osmium GT Credit", "4096 Credits")); ItemList.Credit_Greg_Naquadah.set(addItem(tLastID = 6, "Naquadah GT Credit", "32768 Credits")); ItemList.Credit_Greg_Neutronium.set(addItem(tLastID = 7, "Neutronium GT Credit", "262144 Credits")); - ItemList.Coin_Gold_Ancient.set(addItem(tLastID = 8, "Ancient Gold Coin", "Found in ancient Ruins", new ItemData(Materials.Gold, 907200L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 8L))); - ItemList.Coin_Doge.set(addItem(tLastID = 9, "Doge Coin", "wow much coin how money so crypto plz mine v rich very currency wow", new ItemData(Materials.Brass, 907200L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); - ItemList.Coin_Chocolate.set(addItem(tLastID = 10, "Chocolate Coin", "Wrapped in Gold", new ItemData(Materials.Gold, OrePrefixes.foil.mMaterialAmount), new GT_FoodStat(1, 0.1F, EnumAction.eat, GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gold, 1L), true, false, false, Potion.moveSpeed.id, 200, 1, 100))); + ItemList.Coin_Gold_Ancient.set(addItem( + tLastID = 8, + "Ancient Gold Coin", + "Found in ancient Ruins", + new ItemData(Materials.Gold, 907200L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 8L))); + ItemList.Coin_Doge.set(addItem( + tLastID = 9, + "Doge Coin", + "wow much coin how money so crypto plz mine v rich very currency wow", + new ItemData(Materials.Brass, 907200L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); + ItemList.Coin_Chocolate.set(addItem( + tLastID = 10, + "Chocolate Coin", + "Wrapped in Gold", + new ItemData(Materials.Gold, OrePrefixes.foil.mMaterialAmount), + new GT_FoodStat( + 1, + 0.1F, + EnumAction.eat, + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gold, 1L), + true, + false, + false, + Potion.moveSpeed.id, + 200, + 1, + 100))); ItemList.Credit_Copper.set(addItem(tLastID = 11, "Industrial Copper Credit", "0.125 Credits")); - ItemList.Credit_Silver.set(addItem(tLastID = 13, "Industrial Silver Credit", "8 Credits", new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); + ItemList.Credit_Silver.set(addItem( + tLastID = 13, + "Industrial Silver Credit", + "8 Credits", + new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); ItemList.Credit_Gold.set(addItem(tLastID = 14, "Industrial Gold Credit", "64 Credits")); ItemList.Credit_Platinum.set(addItem(tLastID = 15, "Industrial Platinum Credit", "512 Credits")); ItemList.Credit_Osmium.set(addItem(tLastID = 16, "Industrial Osmium Credit", "4096 Credits")); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Coin_Chocolate.get(1L), new Object[]{OrePrefixes.dust.get(Materials.Cocoa), OrePrefixes.dust.get(Materials.Milk), OrePrefixes.dust.get(Materials.Sugar), OrePrefixes.foil.get(Materials.Gold)}); - - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Copper.get(8L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Iron}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Iron.get(8L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Silver}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Silver.get(8L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Gold}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Gold.get(8L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Platinum}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Platinum.get(8L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Osmium}); - - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Iron.get(1L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Silver.get(1L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Gold.get(1L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Platinum.get(1L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Osmium.get(1L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum}); - - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Copper.get(8L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Cupronickel}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Cupronickel.get(8L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Silver}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Silver.get(8L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Gold}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Gold.get(8L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Platinum}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Platinum.get(8L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Osmium}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Osmium.get(8L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Naquadah}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Naquadah.get(8L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Neutronium}); - - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Cupronickel.get(1L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Silver.get(1L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Gold.get(1L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Platinum.get(1L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Osmium.get(1L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Naquadah.get(1L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Credit_Greg_Neutronium.get(1L), GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah}); - - ItemList.Component_Minecart_Wheels_Iron.set(addItem(tLastID = 100, "Iron Minecart Wheels", "To get things rolling", new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L))); - ItemList.Component_Minecart_Wheels_Steel.set(addItem(tLastID = 101, "Steel Minecart Wheels", "To get things rolling", new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L))); - - GT_ModHandler.addCraftingRecipe(ItemList.Component_Minecart_Wheels_Iron.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" h ", "RSR", " w ", 'R', OrePrefixes.ring.get(Materials.AnyIron), 'S', OrePrefixes.stick.get(Materials.AnyIron)}); - GT_ModHandler.addCraftingRecipe(ItemList.Component_Minecart_Wheels_Steel.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" h ", "RSR", " w ", 'R', OrePrefixes.ring.get(Materials.Steel), 'S', OrePrefixes.stick.get(Materials.Steel)}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Coin_Chocolate.get(1L), new Object[] { + OrePrefixes.dust.get(Materials.Cocoa), + OrePrefixes.dust.get(Materials.Milk), + OrePrefixes.dust.get(Materials.Sugar), + OrePrefixes.foil.get(Materials.Gold) + }); + + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Credit_Copper.get(8L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {ItemList.Credit_Iron}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Credit_Iron.get(8L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {ItemList.Credit_Silver}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Credit_Silver.get(8L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {ItemList.Credit_Gold}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Credit_Gold.get(8L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {ItemList.Credit_Platinum}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Credit_Platinum.get(8L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {ItemList.Credit_Osmium}); + + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Credit_Iron.get(1L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + ItemList.Credit_Copper, + ItemList.Credit_Copper, + ItemList.Credit_Copper, + ItemList.Credit_Copper, + ItemList.Credit_Copper, + ItemList.Credit_Copper, + ItemList.Credit_Copper, + ItemList.Credit_Copper + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Credit_Silver.get(1L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + ItemList.Credit_Iron, + ItemList.Credit_Iron, + ItemList.Credit_Iron, + ItemList.Credit_Iron, + ItemList.Credit_Iron, + ItemList.Credit_Iron, + ItemList.Credit_Iron, + ItemList.Credit_Iron + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Credit_Gold.get(1L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + ItemList.Credit_Silver, + ItemList.Credit_Silver, + ItemList.Credit_Silver, + ItemList.Credit_Silver, + ItemList.Credit_Silver, + ItemList.Credit_Silver, + ItemList.Credit_Silver, + ItemList.Credit_Silver + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Credit_Platinum.get(1L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + ItemList.Credit_Gold, + ItemList.Credit_Gold, + ItemList.Credit_Gold, + ItemList.Credit_Gold, + ItemList.Credit_Gold, + ItemList.Credit_Gold, + ItemList.Credit_Gold, + ItemList.Credit_Gold + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Credit_Osmium.get(1L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + ItemList.Credit_Platinum, + ItemList.Credit_Platinum, + ItemList.Credit_Platinum, + ItemList.Credit_Platinum, + ItemList.Credit_Platinum, + ItemList.Credit_Platinum, + ItemList.Credit_Platinum, + ItemList.Credit_Platinum + }); + + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Credit_Greg_Copper.get(8L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {ItemList.Credit_Greg_Cupronickel}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Credit_Greg_Cupronickel.get(8L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {ItemList.Credit_Greg_Silver}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Credit_Greg_Silver.get(8L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {ItemList.Credit_Greg_Gold}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Credit_Greg_Gold.get(8L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {ItemList.Credit_Greg_Platinum}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Credit_Greg_Platinum.get(8L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {ItemList.Credit_Greg_Osmium}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Credit_Greg_Osmium.get(8L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {ItemList.Credit_Greg_Naquadah}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Credit_Greg_Naquadah.get(8L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {ItemList.Credit_Greg_Neutronium}); + + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Credit_Greg_Cupronickel.get(1L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + ItemList.Credit_Greg_Copper, + ItemList.Credit_Greg_Copper, + ItemList.Credit_Greg_Copper, + ItemList.Credit_Greg_Copper, + ItemList.Credit_Greg_Copper, + ItemList.Credit_Greg_Copper, + ItemList.Credit_Greg_Copper, + ItemList.Credit_Greg_Copper + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Credit_Greg_Silver.get(1L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + ItemList.Credit_Greg_Cupronickel, + ItemList.Credit_Greg_Cupronickel, + ItemList.Credit_Greg_Cupronickel, + ItemList.Credit_Greg_Cupronickel, + ItemList.Credit_Greg_Cupronickel, + ItemList.Credit_Greg_Cupronickel, + ItemList.Credit_Greg_Cupronickel, + ItemList.Credit_Greg_Cupronickel + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Credit_Greg_Gold.get(1L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + ItemList.Credit_Greg_Silver, + ItemList.Credit_Greg_Silver, + ItemList.Credit_Greg_Silver, + ItemList.Credit_Greg_Silver, + ItemList.Credit_Greg_Silver, + ItemList.Credit_Greg_Silver, + ItemList.Credit_Greg_Silver, + ItemList.Credit_Greg_Silver + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Credit_Greg_Platinum.get(1L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + ItemList.Credit_Greg_Gold, + ItemList.Credit_Greg_Gold, + ItemList.Credit_Greg_Gold, + ItemList.Credit_Greg_Gold, + ItemList.Credit_Greg_Gold, + ItemList.Credit_Greg_Gold, + ItemList.Credit_Greg_Gold, + ItemList.Credit_Greg_Gold + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Credit_Greg_Osmium.get(1L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + ItemList.Credit_Greg_Platinum, + ItemList.Credit_Greg_Platinum, + ItemList.Credit_Greg_Platinum, + ItemList.Credit_Greg_Platinum, + ItemList.Credit_Greg_Platinum, + ItemList.Credit_Greg_Platinum, + ItemList.Credit_Greg_Platinum, + ItemList.Credit_Greg_Platinum + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Credit_Greg_Naquadah.get(1L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + ItemList.Credit_Greg_Osmium, + ItemList.Credit_Greg_Osmium, + ItemList.Credit_Greg_Osmium, + ItemList.Credit_Greg_Osmium, + ItemList.Credit_Greg_Osmium, + ItemList.Credit_Greg_Osmium, + ItemList.Credit_Greg_Osmium, + ItemList.Credit_Greg_Osmium + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Credit_Greg_Neutronium.get(1L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + ItemList.Credit_Greg_Naquadah, + ItemList.Credit_Greg_Naquadah, + ItemList.Credit_Greg_Naquadah, + ItemList.Credit_Greg_Naquadah, + ItemList.Credit_Greg_Naquadah, + ItemList.Credit_Greg_Naquadah, + ItemList.Credit_Greg_Naquadah, + ItemList.Credit_Greg_Naquadah + }); + + ItemList.Component_Minecart_Wheels_Iron.set(addItem( + tLastID = 100, + "Iron Minecart Wheels", + "To get things rolling", + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L))); + ItemList.Component_Minecart_Wheels_Steel.set(addItem( + tLastID = 101, + "Steel Minecart Wheels", + "To get things rolling", + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L))); + + GT_ModHandler.addCraftingRecipe( + ItemList.Component_Minecart_Wheels_Iron.get(1L), + GT_ModHandler.RecipeBits.BUFFERED + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + " h ", + "RSR", + " w ", + 'R', + OrePrefixes.ring.get(Materials.AnyIron), + 'S', + OrePrefixes.stick.get(Materials.AnyIron) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Component_Minecart_Wheels_Steel.get(1L), + GT_ModHandler.RecipeBits.BUFFERED + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + " h ", + "RSR", + " w ", + 'R', + OrePrefixes.ring.get(Materials.Steel), + 'S', + OrePrefixes.stick.get(Materials.Steel) + }); ItemList.CompressedFireclay.set(addItem(tLastID = 110, "Compressed Fireclay", "Brick-shaped")); ItemList.Firebrick.set(addItem(tLastID = 111, "Firebrick", "Heat resistant")); - ItemList.Arrow_Head_Glass_Emtpy.set(addItem(tLastID = 200, "Empty Glass Arrow Head", "Fill with Potions before use", new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); - ItemList.Arrow_Head_Glass_Poison.set(addItem(tLastID = 201, "Poison Glass Arrow Head", "Glass Arrow filled with Poison", new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); - ItemList.Arrow_Head_Glass_Poison_Long.set(addItem(tLastID = 202, "Poison Glass Arrow Head", "Glass Arrow filled with stretched Poison", new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); - ItemList.Arrow_Head_Glass_Poison_Strong.set(addItem(tLastID = 203, "Poison Glass Arrow Head", "Glass Arrow filled with strong Poison", new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); - ItemList.Arrow_Head_Glass_Slowness.set(addItem(tLastID = 204, "Slowness Glass Arrow Head", "Glass Arrow filled with Laming Brew", new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); - ItemList.Arrow_Head_Glass_Slowness_Long.set(addItem(tLastID = 205, "Slowness Glass Arrow Head", "Glass Arrow filled with stretched Laming Brew", new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); - ItemList.Arrow_Head_Glass_Weakness.set(addItem(tLastID = 206, "Weakness Glass Arrow Head", "Glass Arrow filled with Weakening Brew", new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); - ItemList.Arrow_Head_Glass_Weakness_Long.set(addItem(tLastID = 207, "Weakness Glass Arrow Head", "Glass Arrow filled with stretched Weakening Brew", new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); - ItemList.Arrow_Head_Glass_Holy_Water.set(addItem(tLastID = 208, "Holy Water Glass Arrow Head", "Glass Arrow filled with Holy Water", new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L))); - - ItemList.Arrow_Wooden_Glass_Emtpy.set(addItem(tLastID = 225, "Regular Glass Vial Arrow", "Empty Glass Arrow", new Behaviour_Arrow_Potion(1.0F, 6.0F), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); - ItemList.Arrow_Wooden_Glass_Poison.set(addItem(tLastID = 226, "Regular Poison Arrow", "Glass Arrow filled with Poison", new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.poison.id, 450, 0, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); - ItemList.Arrow_Wooden_Glass_Poison_Long.set(addItem(tLastID = 227, "Regular Poison Arrow", "Glass Arrow filled with stretched Poison", new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.poison.id, 900, 0, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); - ItemList.Arrow_Wooden_Glass_Poison_Strong.set(addItem(tLastID = 228, "Regular Poison Arrow", "Glass Arrow filled with strong Poison", new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.poison.id, 450, 1, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); - ItemList.Arrow_Wooden_Glass_Slowness.set(addItem(tLastID = 229, "Regular Slowness Arrow", "Glass Arrow filled with Laming Brew", new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.moveSlowdown.id, 900, 0, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); - ItemList.Arrow_Wooden_Glass_Slowness_Long.set(addItem(tLastID = 230, "Regular Slowness Arrow", "Glass Arrow filled with stretched Laming Brew", new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.moveSlowdown.id, 1800, 0, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); - ItemList.Arrow_Wooden_Glass_Weakness.set(addItem(tLastID = 231, "Regular Weakness Arrow", "Glass Arrow filled with Weakening Brew", new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.weakness.id, 900, 0, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); - ItemList.Arrow_Wooden_Glass_Weakness_Long.set(addItem(tLastID = 232, "Regular Weakness Arrow", "Glass Arrow filled with stretched Weakening Brew", new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.weakness.id, 1800, 0, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); - ItemList.Arrow_Wooden_Glass_Holy_Water.set(addItem(tLastID = 233, "Regular Holy Water Arrow", "Glass Arrow filled with Holy Water", new Behaviour_Arrow_Potion(1.0F, 6.0F, Enchantment.smite, 10), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L))); - - ItemList.Arrow_Plastic_Glass_Emtpy.set(addItem(tLastID = 250, "Light Glass Vial Arrow", "Empty Glass Arrow", new Behaviour_Arrow_Potion(1.5F, 6.0F), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); - ItemList.Arrow_Plastic_Glass_Poison.set(addItem(tLastID = 251, "Light Poison Arrow", "Glass Arrow filled with Poison", new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.poison.id, 450, 0, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); - ItemList.Arrow_Plastic_Glass_Poison_Long.set(addItem(tLastID = 252, "Light Poison Arrow", "Glass Arrow filled with stretched Poison", new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.poison.id, 900, 0, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); - ItemList.Arrow_Plastic_Glass_Poison_Strong.set(addItem(tLastID = 253, "Light Poison Arrow", "Glass Arrow filled with strong Poison", new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.poison.id, 450, 1, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); - ItemList.Arrow_Plastic_Glass_Slowness.set(addItem(tLastID = 254, "Light Slowness Arrow", "Glass Arrow filled with Laming Brew", new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.moveSlowdown.id, 900, 0, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); - ItemList.Arrow_Plastic_Glass_Slowness_Long.set(addItem(tLastID = 255, "Light Slowness Arrow", "Glass Arrow filled with stretched Laming Brew", new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.moveSlowdown.id, 1800, 0, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); - ItemList.Arrow_Plastic_Glass_Weakness.set(addItem(tLastID = 256, "Light Weakness Arrow", "Glass Arrow filled with Weakening Brew", new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.weakness.id, 900, 0, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); - ItemList.Arrow_Plastic_Glass_Weakness_Long.set(addItem(tLastID = 257, "Light Weakness Arrow", "Glass Arrow filled with stretched Weakening Brew", new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.weakness.id, 1800, 0, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); - ItemList.Arrow_Plastic_Glass_Holy_Water.set(addItem(tLastID = 258, "Light Holy Water Arrow", "Glass Arrow filled with Holy Water", new Behaviour_Arrow_Potion(1.5F, 6.0F, Enchantment.smite, 10), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L))); - - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Emtpy.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Emtpy, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Poison.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Poison_Long.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Poison_Strong.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Strong, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Slowness.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Slowness_Long.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Weakness.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Weakness_Long.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Wooden_Glass_Holy_Water.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Holy_Water, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood)}); - - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Emtpy.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Emtpy, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Poison.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Poison_Long.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Poison_Strong.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Strong, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Slowness.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Slowness_Long.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Weakness.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Weakness_Long.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness_Long, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Arrow_Plastic_Glass_Holy_Water.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Holy_Water, 'F', OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic)}); - - ItemList.Shape_Empty.set(addItem(tLastID = 300, "Empty Shape Plate", "Raw Plate to make Molds and Extruder Shapes", new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L))); - - //GT_ModHandler.addCraftingRecipe(ItemList.Shape_Empty.get(1L, new Object[0]), GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hf", "PP", "PP", 'P', OrePrefixes.plate.get(Materials.Steel)}); + ItemList.Arrow_Head_Glass_Emtpy.set(addItem( + tLastID = 200, + "Empty Glass Arrow Head", + "Fill with Potions before use", + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); + ItemList.Arrow_Head_Glass_Poison.set(addItem( + tLastID = 201, + "Poison Glass Arrow Head", + "Glass Arrow filled with Poison", + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Head_Glass_Poison_Long.set(addItem( + tLastID = 202, + "Poison Glass Arrow Head", + "Glass Arrow filled with stretched Poison", + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Head_Glass_Poison_Strong.set(addItem( + tLastID = 203, + "Poison Glass Arrow Head", + "Glass Arrow filled with strong Poison", + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Head_Glass_Slowness.set(addItem( + tLastID = 204, + "Slowness Glass Arrow Head", + "Glass Arrow filled with Laming Brew", + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Head_Glass_Slowness_Long.set(addItem( + tLastID = 205, + "Slowness Glass Arrow Head", + "Glass Arrow filled with stretched Laming Brew", + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Head_Glass_Weakness.set(addItem( + tLastID = 206, + "Weakness Glass Arrow Head", + "Glass Arrow filled with Weakening Brew", + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Head_Glass_Weakness_Long.set(addItem( + tLastID = 207, + "Weakness Glass Arrow Head", + "Glass Arrow filled with stretched Weakening Brew", + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Head_Glass_Holy_Water.set(addItem( + tLastID = 208, + "Holy Water Glass Arrow Head", + "Glass Arrow filled with Holy Water", + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L))); + + ItemList.Arrow_Wooden_Glass_Emtpy.set(addItem( + tLastID = 225, + "Regular Glass Vial Arrow", + "Empty Glass Arrow", + new Behaviour_Arrow_Potion(1.0F, 6.0F), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); + ItemList.Arrow_Wooden_Glass_Poison.set(addItem( + tLastID = 226, + "Regular Poison Arrow", + "Glass Arrow filled with Poison", + new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.poison.id, 450, 0, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Wooden_Glass_Poison_Long.set(addItem( + tLastID = 227, + "Regular Poison Arrow", + "Glass Arrow filled with stretched Poison", + new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.poison.id, 900, 0, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Wooden_Glass_Poison_Strong.set(addItem( + tLastID = 228, + "Regular Poison Arrow", + "Glass Arrow filled with strong Poison", + new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.poison.id, 450, 1, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Wooden_Glass_Slowness.set(addItem( + tLastID = 229, + "Regular Slowness Arrow", + "Glass Arrow filled with Laming Brew", + new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.moveSlowdown.id, 900, 0, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Wooden_Glass_Slowness_Long.set(addItem( + tLastID = 230, + "Regular Slowness Arrow", + "Glass Arrow filled with stretched Laming Brew", + new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.moveSlowdown.id, 1800, 0, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Wooden_Glass_Weakness.set(addItem( + tLastID = 231, + "Regular Weakness Arrow", + "Glass Arrow filled with Weakening Brew", + new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.weakness.id, 900, 0, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Wooden_Glass_Weakness_Long.set(addItem( + tLastID = 232, + "Regular Weakness Arrow", + "Glass Arrow filled with stretched Weakening Brew", + new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.weakness.id, 1800, 0, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Wooden_Glass_Holy_Water.set(addItem( + tLastID = 233, + "Regular Holy Water Arrow", + "Glass Arrow filled with Holy Water", + new Behaviour_Arrow_Potion(1.0F, 6.0F, Enchantment.smite, 10), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L))); + + ItemList.Arrow_Plastic_Glass_Emtpy.set(addItem( + tLastID = 250, + "Light Glass Vial Arrow", + "Empty Glass Arrow", + new Behaviour_Arrow_Potion(1.5F, 6.0F), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); + ItemList.Arrow_Plastic_Glass_Poison.set(addItem( + tLastID = 251, + "Light Poison Arrow", + "Glass Arrow filled with Poison", + new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.poison.id, 450, 0, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Plastic_Glass_Poison_Long.set(addItem( + tLastID = 252, + "Light Poison Arrow", + "Glass Arrow filled with stretched Poison", + new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.poison.id, 900, 0, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Plastic_Glass_Poison_Strong.set(addItem( + tLastID = 253, + "Light Poison Arrow", + "Glass Arrow filled with strong Poison", + new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.poison.id, 450, 1, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Plastic_Glass_Slowness.set(addItem( + tLastID = 254, + "Light Slowness Arrow", + "Glass Arrow filled with Laming Brew", + new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.moveSlowdown.id, 900, 0, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Plastic_Glass_Slowness_Long.set(addItem( + tLastID = 255, + "Light Slowness Arrow", + "Glass Arrow filled with stretched Laming Brew", + new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.moveSlowdown.id, 1800, 0, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Plastic_Glass_Weakness.set(addItem( + tLastID = 256, + "Light Weakness Arrow", + "Glass Arrow filled with Weakening Brew", + new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.weakness.id, 900, 0, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Plastic_Glass_Weakness_Long.set(addItem( + tLastID = 257, + "Light Weakness Arrow", + "Glass Arrow filled with stretched Weakening Brew", + new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.weakness.id, 1800, 0, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + ItemList.Arrow_Plastic_Glass_Holy_Water.set(addItem( + tLastID = 258, + "Light Holy Water Arrow", + "Glass Arrow filled with Holy Water", + new Behaviour_Arrow_Potion(1.5F, 6.0F, Enchantment.smite, 10), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L))); + + GT_ModHandler.addCraftingRecipe( + ItemList.Arrow_Wooden_Glass_Emtpy.get(1L), + GT_ModHandler.RecipeBits.BUFFERED + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + aTextArrow, + aTextStick, + aTextFeather, + 'A', + ItemList.Arrow_Head_Glass_Emtpy, + 'F', + OreDictNames.craftingFeather, + 'S', + OrePrefixes.stick.get(Materials.Wood) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Arrow_Wooden_Glass_Poison.get(1L), + GT_ModHandler.RecipeBits.BUFFERED + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + aTextArrow, + aTextStick, + aTextFeather, + 'A', + ItemList.Arrow_Head_Glass_Poison, + 'F', + OreDictNames.craftingFeather, + 'S', + OrePrefixes.stick.get(Materials.Wood) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Arrow_Wooden_Glass_Poison_Long.get(1L), + GT_ModHandler.RecipeBits.BUFFERED + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + aTextArrow, + aTextStick, + aTextFeather, + 'A', + ItemList.Arrow_Head_Glass_Poison_Long, + 'F', + OreDictNames.craftingFeather, + 'S', + OrePrefixes.stick.get(Materials.Wood) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Arrow_Wooden_Glass_Poison_Strong.get(1L), + GT_ModHandler.RecipeBits.BUFFERED + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + aTextArrow, + aTextStick, + aTextFeather, + 'A', + ItemList.Arrow_Head_Glass_Poison_Strong, + 'F', + OreDictNames.craftingFeather, + 'S', + OrePrefixes.stick.get(Materials.Wood) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Arrow_Wooden_Glass_Slowness.get(1L), + GT_ModHandler.RecipeBits.BUFFERED + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + aTextArrow, + aTextStick, + aTextFeather, + 'A', + ItemList.Arrow_Head_Glass_Slowness, + 'F', + OreDictNames.craftingFeather, + 'S', + OrePrefixes.stick.get(Materials.Wood) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Arrow_Wooden_Glass_Slowness_Long.get(1L), + GT_ModHandler.RecipeBits.BUFFERED + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + aTextArrow, + aTextStick, + aTextFeather, + 'A', + ItemList.Arrow_Head_Glass_Slowness_Long, + 'F', + OreDictNames.craftingFeather, + 'S', + OrePrefixes.stick.get(Materials.Wood) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Arrow_Wooden_Glass_Weakness.get(1L), + GT_ModHandler.RecipeBits.BUFFERED + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + aTextArrow, + aTextStick, + aTextFeather, + 'A', + ItemList.Arrow_Head_Glass_Weakness, + 'F', + OreDictNames.craftingFeather, + 'S', + OrePrefixes.stick.get(Materials.Wood) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Arrow_Wooden_Glass_Weakness_Long.get(1L), + GT_ModHandler.RecipeBits.BUFFERED + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + aTextArrow, + aTextStick, + aTextFeather, + 'A', + ItemList.Arrow_Head_Glass_Weakness_Long, + 'F', + OreDictNames.craftingFeather, + 'S', + OrePrefixes.stick.get(Materials.Wood) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Arrow_Wooden_Glass_Holy_Water.get(1L), + GT_ModHandler.RecipeBits.BUFFERED + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + aTextArrow, + aTextStick, + aTextFeather, + 'A', + ItemList.Arrow_Head_Glass_Holy_Water, + 'F', + OreDictNames.craftingFeather, + 'S', + OrePrefixes.stick.get(Materials.Wood) + }); + + GT_ModHandler.addCraftingRecipe( + ItemList.Arrow_Plastic_Glass_Emtpy.get(1L), + GT_ModHandler.RecipeBits.BUFFERED + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + aTextArrow, + aTextStick, + aTextFeather, + 'A', + ItemList.Arrow_Head_Glass_Emtpy, + 'F', + OreDictNames.craftingFeather, + 'S', + OrePrefixes.stick.get(Materials.Plastic) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Arrow_Plastic_Glass_Poison.get(1L), + GT_ModHandler.RecipeBits.BUFFERED + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + aTextArrow, + aTextStick, + aTextFeather, + 'A', + ItemList.Arrow_Head_Glass_Poison, + 'F', + OreDictNames.craftingFeather, + 'S', + OrePrefixes.stick.get(Materials.Plastic) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Arrow_Plastic_Glass_Poison_Long.get(1L), + GT_ModHandler.RecipeBits.BUFFERED + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + aTextArrow, + aTextStick, + aTextFeather, + 'A', + ItemList.Arrow_Head_Glass_Poison_Long, + 'F', + OreDictNames.craftingFeather, + 'S', + OrePrefixes.stick.get(Materials.Plastic) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Arrow_Plastic_Glass_Poison_Strong.get(1L), + GT_ModHandler.RecipeBits.BUFFERED + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + aTextArrow, + aTextStick, + aTextFeather, + 'A', + ItemList.Arrow_Head_Glass_Poison_Strong, + 'F', + OreDictNames.craftingFeather, + 'S', + OrePrefixes.stick.get(Materials.Plastic) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Arrow_Plastic_Glass_Slowness.get(1L), + GT_ModHandler.RecipeBits.BUFFERED + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + aTextArrow, + aTextStick, + aTextFeather, + 'A', + ItemList.Arrow_Head_Glass_Slowness, + 'F', + OreDictNames.craftingFeather, + 'S', + OrePrefixes.stick.get(Materials.Plastic) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Arrow_Plastic_Glass_Slowness_Long.get(1L), + GT_ModHandler.RecipeBits.BUFFERED + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + aTextArrow, + aTextStick, + aTextFeather, + 'A', + ItemList.Arrow_Head_Glass_Slowness_Long, + 'F', + OreDictNames.craftingFeather, + 'S', + OrePrefixes.stick.get(Materials.Plastic) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Arrow_Plastic_Glass_Weakness.get(1L), + GT_ModHandler.RecipeBits.BUFFERED + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + aTextArrow, + aTextStick, + aTextFeather, + 'A', + ItemList.Arrow_Head_Glass_Weakness, + 'F', + OreDictNames.craftingFeather, + 'S', + OrePrefixes.stick.get(Materials.Plastic) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Arrow_Plastic_Glass_Weakness_Long.get(1L), + GT_ModHandler.RecipeBits.BUFFERED + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + aTextArrow, + aTextStick, + aTextFeather, + 'A', + ItemList.Arrow_Head_Glass_Weakness_Long, + 'F', + OreDictNames.craftingFeather, + 'S', + OrePrefixes.stick.get(Materials.Plastic) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Arrow_Plastic_Glass_Holy_Water.get(1L), + GT_ModHandler.RecipeBits.BUFFERED + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + aTextArrow, + aTextStick, + aTextFeather, + 'A', + ItemList.Arrow_Head_Glass_Holy_Water, + 'F', + OreDictNames.craftingFeather, + 'S', + OrePrefixes.stick.get(Materials.Plastic) + }); + + ItemList.Shape_Empty.set(addItem( + tLastID = 300, + "Empty Shape Plate", + "Raw Plate to make Molds and Extruder Shapes", + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L))); + + // GT_ModHandler.addCraftingRecipe(ItemList.Shape_Empty.get(1L, new Object[0]), + // GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.BUFFERED | + // GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hf", "PP", "PP", + // 'P', OrePrefixes.plate.get(Materials.Steel)}); ItemList.Shape_Mold_Plate.set(addItem(tLastID = 301, "Mold (Plate)", "Mold for making Plates")); ItemList.Shape_Mold_Casing.set(addItem(tLastID = 302, "Mold (Casing)", "Mold for making Item Casings")); ItemList.Shape_Mold_Gear.set(addItem(tLastID = 303, "Mold (Gear)", "Mold for making Gears")); - ItemList.Shape_Mold_Credit.set(addItem(tLastID = 304, "Mold (Coinage)", "Secure Mold for making Coins (Don't lose it!)")); + ItemList.Shape_Mold_Credit.set( + addItem(tLastID = 304, "Mold (Coinage)", "Secure Mold for making Coins (Don't lose it!)")); ItemList.Shape_Mold_Bottle.set(addItem(tLastID = 305, "Mold (Bottle)", "Mold for making Bottles")); ItemList.Shape_Mold_Ingot.set(addItem(tLastID = 306, "Mold (Ingot)", "Mold for making Ingots")); ItemList.Shape_Mold_Ball.set(addItem(tLastID = 307, "Mold (Ball)", "Mold for making Balls")); @@ -198,7 +931,8 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { ItemList.Shape_Mold_Baguette.set(addItem(tLastID = 312, "Mold (Baguette)", "Mold for shaping Baguettes")); ItemList.Shape_Mold_Cylinder.set(addItem(tLastID = 313, "Mold (Cylinder)", "Mold for shaping Cylinders")); ItemList.Shape_Mold_Anvil.set(addItem(tLastID = 314, "Mold (Anvil)", "Mold for shaping Anvils")); - ItemList.Shape_Mold_Name.set(addItem(tLastID = 315, "Mold (Name)", "Mold for naming Items (rename Mold with Anvil)")); + ItemList.Shape_Mold_Name.set( + addItem(tLastID = 315, "Mold (Name)", "Mold for naming Items (rename Mold with Anvil)")); ItemList.Shape_Mold_Arrow.set(addItem(tLastID = 316, "Mold (Arrow Head)", "Mold for making Arrow Heads")); ItemList.Shape_Mold_Gear_Small.set(addItem(tLastID = 317, "Mold (Small Gear)", "Mold for making small Gears")); ItemList.Shape_Mold_Rod.set(addItem(tLastID = 318, "Mold (Rod)", "Mold for making Rods")); @@ -208,277 +942,1009 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { ItemList.Shape_Mold_Ring.set(addItem(tLastID = 322, "Mold (Ring)", "Mold for making Rings")); ItemList.Shape_Mold_Rod_Long.set(addItem(tLastID = 323, "Mold (Long Rod)", "Mold for making Long Rods")); ItemList.Shape_Mold_Rotor.set(addItem(tLastID = 324, "Mold (Rotor)", "Mold for making a Rotor")); - ItemList.Shape_Mold_Turbine_Blade.set(addItem(tLastID = 325, "Mold (Turbine Blade)", "Mold for making a Turbine Blade")); + ItemList.Shape_Mold_Turbine_Blade.set( + addItem(tLastID = 325, "Mold (Turbine Blade)", "Mold for making a Turbine Blade")); ItemList.Shape_Mold_Pipe_Tiny.set(addItem(tLastID = 326, "Mold (Tiny Pipe)", "Mold for making tiny Pipes")); ItemList.Shape_Mold_Pipe_Small.set(addItem(tLastID = 327, "Mold (Small Pipe)", "Mold for making small Pipes")); ItemList.Shape_Mold_Pipe_Medium.set(addItem(tLastID = 328, "Mold (Normal Pipe)", "Mold for making Pipes")); ItemList.Shape_Mold_Pipe_Large.set(addItem(tLastID = 329, "Mold (Large Pipe)", "Mold for making large Pipes")); - ItemList.Shape_Mold_Pipe_Huge.set(addItem(tLastID = 330, "Mold (Huge Pipe)", "Mold for making full Block Pipes")); - GT_ModHandler.removeRecipe(new ItemStack(Blocks.glass), null, new ItemStack(Blocks.glass), null, new ItemStack(Blocks.glass)); - - ItemList.Shape_Extruder_Plate.set(addItem(tLastID = 350, "Extruder Shape (Plate)", "Extruder Shape for making Plates")); - ItemList.Shape_Extruder_Rod.set(addItem(tLastID = 351, "Extruder Shape (Rod)", "Extruder Shape for making Rods")); - ItemList.Shape_Extruder_Bolt.set(addItem(tLastID = 352, "Extruder Shape (Bolt)", "Extruder Shape for making Bolts")); - ItemList.Shape_Extruder_Ring.set(addItem(tLastID = 353, "Extruder Shape (Ring)", "Extruder Shape for making Rings")); - ItemList.Shape_Extruder_Cell.set(addItem(tLastID = 354, "Extruder Shape (Cell)", "Extruder Shape for making Cells")); - ItemList.Shape_Extruder_Ingot.set(addItem(tLastID = 355, "Extruder Shape (Ingot)", "Extruder Shape for, wait, can't we just use a Furnace?")); - ItemList.Shape_Extruder_Wire.set(addItem(tLastID = 356, "Extruder Shape (Wire)", "Extruder Shape for making Wires")); - ItemList.Shape_Extruder_Casing.set(addItem(tLastID = 357, "Extruder Shape (Casing)", "Extruder Shape for making Item Casings")); - ItemList.Shape_Extruder_Pipe_Tiny.set(addItem(tLastID = 358, "Extruder Shape (Tiny Pipe)", "Extruder Shape for making tiny Pipes")); - ItemList.Shape_Extruder_Pipe_Small.set(addItem(tLastID = 359, "Extruder Shape (Small Pipe)", "Extruder Shape for making small Pipes")); - ItemList.Shape_Extruder_Pipe_Medium.set(addItem(tLastID = 360, "Extruder Shape (Normal Pipe)", "Extruder Shape for making Pipes")); - ItemList.Shape_Extruder_Pipe_Large.set(addItem(tLastID = 361, "Extruder Shape (Large Pipe)", "Extruder Shape for making large Pipes")); - ItemList.Shape_Extruder_Pipe_Huge.set(addItem(tLastID = 362, "Extruder Shape (Huge Pipe)", "Extruder Shape for making full Block Pipes")); - ItemList.Shape_Extruder_Block.set(addItem(tLastID = 363, "Extruder Shape (Block)", "Extruder Shape for making Blocks")); - ItemList.Shape_Extruder_Sword.set(addItem(tLastID = 364, "Extruder Shape (Sword Blade)", "Extruder Shape for making Swords")); - ItemList.Shape_Extruder_Pickaxe.set(addItem(tLastID = 365, "Extruder Shape (Pickaxe Head)", "Extruder Shape for making Pickaxes")); - ItemList.Shape_Extruder_Shovel.set(addItem(tLastID = 366, "Extruder Shape (Shovel Head)", "Extruder Shape for making Shovels")); - ItemList.Shape_Extruder_Axe.set(addItem(tLastID = 367, "Extruder Shape (Axe Head)", "Extruder Shape for making Axes")); - ItemList.Shape_Extruder_Hoe.set(addItem(tLastID = 368, "Extruder Shape (Hoe Head)", "Extruder Shape for making Hoes")); - ItemList.Shape_Extruder_Hammer.set(addItem(tLastID = 369, "Extruder Shape (Hammer Head)", "Extruder Shape for making Hammers")); - ItemList.Shape_Extruder_File.set(addItem(tLastID = 370, "Extruder Shape (File Head)", "Extruder Shape for making Files")); - ItemList.Shape_Extruder_Saw.set(addItem(tLastID = 371, "Extruder Shape (Saw Blade)", "Extruder Shape for making Saws")); - ItemList.Shape_Extruder_Gear.set(addItem(tLastID = 372, "Extruder Shape (Gear)", "Extruder Shape for making Gears")); - ItemList.Shape_Extruder_Bottle.set(addItem(tLastID = 373, "Extruder Shape (Bottle)", "Extruder Shape for making Bottles")); - ItemList.Shape_Extruder_Rotor.set(addItem(tLastID = 374, "Extruder Shape (Rotor)", "Extruder Shape for a Rotor")); - ItemList.Shape_Extruder_Small_Gear.set(addItem(tLastID = 375, "Extruder Shape (Small Gear)", "Extruder Shape for a Small Gear")); - ItemList.Shape_Extruder_Turbine_Blade.set(addItem(tLastID = 376, "Extruder Shape (Turbine Blade)", "Extruder Shape for a Turbine Blade")); + ItemList.Shape_Mold_Pipe_Huge.set( + addItem(tLastID = 330, "Mold (Huge Pipe)", "Mold for making full Block Pipes")); + GT_ModHandler.removeRecipe( + new ItemStack(Blocks.glass), null, new ItemStack(Blocks.glass), null, new ItemStack(Blocks.glass)); + + ItemList.Shape_Extruder_Plate.set( + addItem(tLastID = 350, "Extruder Shape (Plate)", "Extruder Shape for making Plates")); + ItemList.Shape_Extruder_Rod.set( + addItem(tLastID = 351, "Extruder Shape (Rod)", "Extruder Shape for making Rods")); + ItemList.Shape_Extruder_Bolt.set( + addItem(tLastID = 352, "Extruder Shape (Bolt)", "Extruder Shape for making Bolts")); + ItemList.Shape_Extruder_Ring.set( + addItem(tLastID = 353, "Extruder Shape (Ring)", "Extruder Shape for making Rings")); + ItemList.Shape_Extruder_Cell.set( + addItem(tLastID = 354, "Extruder Shape (Cell)", "Extruder Shape for making Cells")); + ItemList.Shape_Extruder_Ingot.set(addItem( + tLastID = 355, "Extruder Shape (Ingot)", "Extruder Shape for, wait, can't we just use a Furnace?")); + ItemList.Shape_Extruder_Wire.set( + addItem(tLastID = 356, "Extruder Shape (Wire)", "Extruder Shape for making Wires")); + ItemList.Shape_Extruder_Casing.set( + addItem(tLastID = 357, "Extruder Shape (Casing)", "Extruder Shape for making Item Casings")); + ItemList.Shape_Extruder_Pipe_Tiny.set( + addItem(tLastID = 358, "Extruder Shape (Tiny Pipe)", "Extruder Shape for making tiny Pipes")); + ItemList.Shape_Extruder_Pipe_Small.set( + addItem(tLastID = 359, "Extruder Shape (Small Pipe)", "Extruder Shape for making small Pipes")); + ItemList.Shape_Extruder_Pipe_Medium.set( + addItem(tLastID = 360, "Extruder Shape (Normal Pipe)", "Extruder Shape for making Pipes")); + ItemList.Shape_Extruder_Pipe_Large.set( + addItem(tLastID = 361, "Extruder Shape (Large Pipe)", "Extruder Shape for making large Pipes")); + ItemList.Shape_Extruder_Pipe_Huge.set( + addItem(tLastID = 362, "Extruder Shape (Huge Pipe)", "Extruder Shape for making full Block Pipes")); + ItemList.Shape_Extruder_Block.set( + addItem(tLastID = 363, "Extruder Shape (Block)", "Extruder Shape for making Blocks")); + ItemList.Shape_Extruder_Sword.set( + addItem(tLastID = 364, "Extruder Shape (Sword Blade)", "Extruder Shape for making Swords")); + ItemList.Shape_Extruder_Pickaxe.set( + addItem(tLastID = 365, "Extruder Shape (Pickaxe Head)", "Extruder Shape for making Pickaxes")); + ItemList.Shape_Extruder_Shovel.set( + addItem(tLastID = 366, "Extruder Shape (Shovel Head)", "Extruder Shape for making Shovels")); + ItemList.Shape_Extruder_Axe.set( + addItem(tLastID = 367, "Extruder Shape (Axe Head)", "Extruder Shape for making Axes")); + ItemList.Shape_Extruder_Hoe.set( + addItem(tLastID = 368, "Extruder Shape (Hoe Head)", "Extruder Shape for making Hoes")); + ItemList.Shape_Extruder_Hammer.set( + addItem(tLastID = 369, "Extruder Shape (Hammer Head)", "Extruder Shape for making Hammers")); + ItemList.Shape_Extruder_File.set( + addItem(tLastID = 370, "Extruder Shape (File Head)", "Extruder Shape for making Files")); + ItemList.Shape_Extruder_Saw.set( + addItem(tLastID = 371, "Extruder Shape (Saw Blade)", "Extruder Shape for making Saws")); + ItemList.Shape_Extruder_Gear.set( + addItem(tLastID = 372, "Extruder Shape (Gear)", "Extruder Shape for making Gears")); + ItemList.Shape_Extruder_Bottle.set( + addItem(tLastID = 373, "Extruder Shape (Bottle)", "Extruder Shape for making Bottles")); + ItemList.Shape_Extruder_Rotor.set( + addItem(tLastID = 374, "Extruder Shape (Rotor)", "Extruder Shape for a Rotor")); + ItemList.Shape_Extruder_Small_Gear.set( + addItem(tLastID = 375, "Extruder Shape (Small Gear)", "Extruder Shape for a Small Gear")); + ItemList.Shape_Extruder_Turbine_Blade.set( + addItem(tLastID = 376, "Extruder Shape (Turbine Blade)", "Extruder Shape for a Turbine Blade")); ItemList.Shape_Slicer_Flat.set(addItem(tLastID = 398, "Slicer Blade (Flat)", "Slicer Blade for cutting Flat")); - ItemList.Shape_Slicer_Stripes.set(addItem(tLastID = 399, "Slicer Blade (Stripes)", "Slicer Blade for cutting Stripes")); - - GT_ModHandler.addCraftingRecipe(ItemList.Shape_Slicer_Flat.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hXS", aTextShape, "fXd", 'P', ItemList.Shape_Extruder_Block, 'X', OrePrefixes.plate.get(Materials.StainlessSteel), 'S', OrePrefixes.screw.get(Materials.StainlessSteel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Shape_Slicer_Stripes.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hXS", "XPX", "fXd", 'P', ItemList.Shape_Extruder_Block, 'X', OrePrefixes.plate.get(Materials.StainlessSteel), 'S', OrePrefixes.screw.get(Materials.StainlessSteel)}); - - ItemList.Fuel_Can_Plastic_Empty.set(addItem(tLastID = 400, "Empty Plastic Fuel Can", "Used to store Fuels", new ItemData(Materials.Plastic, OrePrefixes.plate.mMaterialAmount * 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L))); - ItemList.Fuel_Can_Plastic_Filled.set(addItem(tLastID = 401, "Plastic Fuel Can", "Burns well in Diesel Generators", new ItemData(Materials.Plastic, OrePrefixes.plate.mMaterialAmount * 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L))); - - GT_ModHandler.addCraftingRecipe(ItemList.Fuel_Can_Plastic_Empty.get(7L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" PP", "P P", "PPP", 'P', OrePrefixes.plate.get(Materials.Plastic)}); - - ItemList.Spray_Empty.set(addItem(tLastID = 402, "Empty Spray Can", "Used for making Sprays", new ItemData(Materials.Tin, OrePrefixes.plate.mMaterialAmount * 2L, Materials.Redstone, OrePrefixes.dust.mMaterialAmount), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L))); - - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Spray_Empty.get(1L), 800, 1); - - ItemList.Crate_Empty.set(addItem(tLastID = 403, "Empty Crate", "To Package lots of Material", new ItemData(Materials.Wood, 3628800L, Materials.Iron, OrePrefixes.screw.mMaterialAmount), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L))); - - GT_ModHandler.addCraftingRecipe(ItemList.Crate_Empty.get(4L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"SWS", "WdW", "SWS", 'W', OrePrefixes.plank.get(Materials.Wood), 'S', OrePrefixes.screw.get(Materials.AnyIron)}); - GT_ModHandler.addCraftingRecipe(ItemList.Crate_Empty.get(4L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"SWS", "WdW", "SWS", 'W', OrePrefixes.plank.get(Materials.Wood), 'S', OrePrefixes.screw.get(Materials.Steel)}); - - ItemList.ThermosCan_Empty.set(addItem(tLastID = 404, "Empty Thermos Can", "Keeping hot things hot and cold things cold", new ItemData(Materials.Aluminium, OrePrefixes.plateDouble.mMaterialAmount * 1L + 2L * OrePrefixes.ring.mMaterialAmount), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L))); - - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Aluminium, 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.ThermosCan_Empty.get(1L), 800, 1); - - ItemList.Large_Fluid_Cell_Steel.set(addItem(tLastID = 405, "Large Steel Fluid Cell", "", new ItemData(Materials.Steel, OrePrefixes.plateDouble.mMaterialAmount * 4L, new MaterialStack(Materials.Bronze, OrePrefixes.ring.mMaterialAmount * 4L)), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); + ItemList.Shape_Slicer_Stripes.set( + addItem(tLastID = 399, "Slicer Blade (Stripes)", "Slicer Blade for cutting Stripes")); + + GT_ModHandler.addCraftingRecipe( + ItemList.Shape_Slicer_Flat.get(1L), + GT_ModHandler.RecipeBits.BUFFERED + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "hXS", + aTextShape, + "fXd", + 'P', + ItemList.Shape_Extruder_Block, + 'X', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'S', + OrePrefixes.screw.get(Materials.StainlessSteel) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Shape_Slicer_Stripes.get(1L), + GT_ModHandler.RecipeBits.BUFFERED + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "hXS", + "XPX", + "fXd", + 'P', + ItemList.Shape_Extruder_Block, + 'X', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'S', + OrePrefixes.screw.get(Materials.StainlessSteel) + }); + + ItemList.Fuel_Can_Plastic_Empty.set(addItem( + tLastID = 400, + "Empty Plastic Fuel Can", + "Used to store Fuels", + new ItemData(Materials.Plastic, OrePrefixes.plate.mMaterialAmount * 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L))); + ItemList.Fuel_Can_Plastic_Filled.set(addItem( + tLastID = 401, + "Plastic Fuel Can", + "Burns well in Diesel Generators", + new ItemData(Materials.Plastic, OrePrefixes.plate.mMaterialAmount * 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L))); + + GT_ModHandler.addCraftingRecipe( + ItemList.Fuel_Can_Plastic_Empty.get(7L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {" PP", "P P", "PPP", 'P', OrePrefixes.plate.get(Materials.Plastic)}); + + ItemList.Spray_Empty.set(addItem( + tLastID = 402, + "Empty Spray Can", + "Used for making Sprays", + new ItemData( + Materials.Tin, + OrePrefixes.plate.mMaterialAmount * 2L, + Materials.Redstone, + OrePrefixes.dust.mMaterialAmount), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L))); + + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Spray_Empty.get(1L), + 800, + 1); + + ItemList.Crate_Empty.set(addItem( + tLastID = 403, + "Empty Crate", + "To Package lots of Material", + new ItemData(Materials.Wood, 3628800L, Materials.Iron, OrePrefixes.screw.mMaterialAmount), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L))); + + GT_ModHandler.addCraftingRecipe( + ItemList.Crate_Empty.get(4L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { + "SWS", + "WdW", + "SWS", + 'W', + OrePrefixes.plank.get(Materials.Wood), + 'S', + OrePrefixes.screw.get(Materials.AnyIron) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Crate_Empty.get(4L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { + "SWS", + "WdW", + "SWS", + 'W', + OrePrefixes.plank.get(Materials.Wood), + 'S', + OrePrefixes.screw.get(Materials.Steel) + }); + + ItemList.ThermosCan_Empty.set(addItem( + tLastID = 404, + "Empty Thermos Can", + "Keeping hot things hot and cold things cold", + new ItemData( + Materials.Aluminium, + OrePrefixes.plateDouble.mMaterialAmount * 1L + 2L * OrePrefixes.ring.mMaterialAmount), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L))); + + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Aluminium, 1L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Aluminium, 2L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.ThermosCan_Empty.get(1L), + 800, + 1); + + ItemList.Large_Fluid_Cell_Steel.set(addItem( + tLastID = 405, + "Large Steel Fluid Cell", + "", + new ItemData( + Materials.Steel, + OrePrefixes.plateDouble.mMaterialAmount * 4L, + new MaterialStack(Materials.Bronze, OrePrefixes.ring.mMaterialAmount * 4L)), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); setFluidContainerStats(32000 + tLastID, 8000L, 64L); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Steel, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.AnyBronze, 4L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Large_Fluid_Cell_Steel.get(1L), 200, 30); - - ItemList.Large_Fluid_Cell_TungstenSteel.set(addItem(tLastID = 406, "Large Tungstensteel Fluid Cell", "", new ItemData(Materials.TungstenSteel, OrePrefixes.plateDouble.mMaterialAmount * 4L, new MaterialStack(Materials.Platinum, OrePrefixes.ring.mMaterialAmount * 4L)), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 9L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 7L))); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Steel, 4L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.AnyBronze, 4L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Large_Fluid_Cell_Steel.get(1L), + 200, + 30); + + ItemList.Large_Fluid_Cell_TungstenSteel.set(addItem( + tLastID = 406, + "Large Tungstensteel Fluid Cell", + "", + new ItemData( + Materials.TungstenSteel, + OrePrefixes.plateDouble.mMaterialAmount * 4L, + new MaterialStack(Materials.Platinum, OrePrefixes.ring.mMaterialAmount * 4L)), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 9L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 7L))); setFluidContainerStats(32000 + tLastID, 512000L, 32L); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.TungstenSteel, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Platinum, 4L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Large_Fluid_Cell_TungstenSteel.get(1L), 200, 480); - - ItemList.Large_Fluid_Cell_Aluminium.set(addItem(tLastID = 407, "Large Aluminium Fluid Cell", "", new ItemData(Materials.Aluminium, OrePrefixes.plateDouble.mMaterialAmount * 4L, new MaterialStack(Materials.Silver, OrePrefixes.ring.mMaterialAmount * 4L)), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 5L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 3L))); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.TungstenSteel, 4L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Platinum, 4L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Large_Fluid_Cell_TungstenSteel.get(1L), + 200, + 480); + + ItemList.Large_Fluid_Cell_Aluminium.set(addItem( + tLastID = 407, + "Large Aluminium Fluid Cell", + "", + new ItemData( + Materials.Aluminium, + OrePrefixes.plateDouble.mMaterialAmount * 4L, + new MaterialStack(Materials.Silver, OrePrefixes.ring.mMaterialAmount * 4L)), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 5L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 3L))); setFluidContainerStats(32000 + tLastID, 32000L, 64L); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Aluminium, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Silver, 4L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Large_Fluid_Cell_Aluminium.get(1L), 200, 64); - - ItemList.Large_Fluid_Cell_StainlessSteel.set(addItem(tLastID = 408, "Large Stainless Steel Fluid Cell", "", new ItemData(Materials.StainlessSteel, OrePrefixes.plateDouble.mMaterialAmount * 4L, new MaterialStack(Materials.Electrum, OrePrefixes.ring.mMaterialAmount * 4L)), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 6L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L))); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Aluminium, 4L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Silver, 4L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Large_Fluid_Cell_Aluminium.get(1L), + 200, + 64); + + ItemList.Large_Fluid_Cell_StainlessSteel.set(addItem( + tLastID = 408, + "Large Stainless Steel Fluid Cell", + "", + new ItemData( + Materials.StainlessSteel, + OrePrefixes.plateDouble.mMaterialAmount * 4L, + new MaterialStack(Materials.Electrum, OrePrefixes.ring.mMaterialAmount * 4L)), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 6L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L))); setFluidContainerStats(32000 + tLastID, 64000L, 64L); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.StainlessSteel, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Electrum, 4L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Large_Fluid_Cell_StainlessSteel.get(1L), 200, 120); - - ItemList.Large_Fluid_Cell_Titanium.set(addItem(tLastID = 409, "Large Titanium Fluid Cell", "", new ItemData(Materials.Titanium, OrePrefixes.plateDouble.mMaterialAmount * 4L, new MaterialStack(Materials.RoseGold, OrePrefixes.ring.mMaterialAmount * 4L)), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 7L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 5L))); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.StainlessSteel, 4L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Electrum, 4L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Large_Fluid_Cell_StainlessSteel.get(1L), + 200, + 120); + + ItemList.Large_Fluid_Cell_Titanium.set(addItem( + tLastID = 409, + "Large Titanium Fluid Cell", + "", + new ItemData( + Materials.Titanium, + OrePrefixes.plateDouble.mMaterialAmount * 4L, + new MaterialStack(Materials.RoseGold, OrePrefixes.ring.mMaterialAmount * 4L)), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 7L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 5L))); setFluidContainerStats(32000 + tLastID, 128000L, 64L); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Titanium, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.RoseGold, 4L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Large_Fluid_Cell_Titanium.get(1L), 200, 256); - - ItemList.Large_Fluid_Cell_Chrome.set(addItem(tLastID = 410, "Large Chrome Fluid Cell", "", new ItemData(Materials.Chrome, OrePrefixes.plateDouble.mMaterialAmount * 4L, new MaterialStack(Materials.Palladium, OrePrefixes.ring.mMaterialAmount * 4L)), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 6L))); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Titanium, 4L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.RoseGold, 4L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Large_Fluid_Cell_Titanium.get(1L), + 200, + 256); + + ItemList.Large_Fluid_Cell_Chrome.set(addItem( + tLastID = 410, + "Large Chrome Fluid Cell", + "", + new ItemData( + Materials.Chrome, + OrePrefixes.plateDouble.mMaterialAmount * 4L, + new MaterialStack(Materials.Palladium, OrePrefixes.ring.mMaterialAmount * 4L)), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 6L))); setFluidContainerStats(32000 + tLastID, 2048000L, 8L); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Chrome, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Palladium, 4L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Large_Fluid_Cell_Chrome.get(1L), 200, 1024); - - ItemList.Large_Fluid_Cell_Iridium.set(addItem(tLastID = 411, "Large Iridium Fluid Cell", "", new ItemData(Materials.Iridium, OrePrefixes.plateDouble.mMaterialAmount * 4L, new MaterialStack(Materials.Naquadah, OrePrefixes.ring.mMaterialAmount * 4L)), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 10L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 8L))); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Chrome, 4L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Palladium, 4L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Large_Fluid_Cell_Chrome.get(1L), + 200, + 1024); + + ItemList.Large_Fluid_Cell_Iridium.set(addItem( + tLastID = 411, + "Large Iridium Fluid Cell", + "", + new ItemData( + Materials.Iridium, + OrePrefixes.plateDouble.mMaterialAmount * 4L, + new MaterialStack(Materials.Naquadah, OrePrefixes.ring.mMaterialAmount * 4L)), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 10L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 8L))); setFluidContainerStats(32000 + tLastID, 8192000L, 2L); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Iridium, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Naquadah, 4L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Large_Fluid_Cell_Iridium.get(1L), 200, 1920); - - ItemList.Large_Fluid_Cell_Osmium.set(addItem(tLastID = 412, "Large Osmium Fluid Cell", "", new ItemData(Materials.Osmium, OrePrefixes.plateDouble.mMaterialAmount * 4L, new MaterialStack(Materials.ElectrumFlux, OrePrefixes.ring.mMaterialAmount * 4L)), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 11L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 9L))); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Iridium, 4L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Naquadah, 4L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Large_Fluid_Cell_Iridium.get(1L), + 200, + 1920); + + ItemList.Large_Fluid_Cell_Osmium.set(addItem( + tLastID = 412, + "Large Osmium Fluid Cell", + "", + new ItemData( + Materials.Osmium, + OrePrefixes.plateDouble.mMaterialAmount * 4L, + new MaterialStack(Materials.ElectrumFlux, OrePrefixes.ring.mMaterialAmount * 4L)), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 11L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 9L))); setFluidContainerStats(32000 + tLastID, 32768000L, 1L); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Osmium, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.ElectrumFlux, 4L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Large_Fluid_Cell_Osmium.get(1L), 200, 4096); - - ItemList.Large_Fluid_Cell_Neutronium.set(addItem(tLastID = 413, "Large Neutronium Fluid Cell", "", new ItemData(Materials.Neutronium, OrePrefixes.plateDouble.mMaterialAmount * 4L, new MaterialStack(Materials.Draconium, OrePrefixes.ring.mMaterialAmount * 4L)), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 12L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 10L))); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Osmium, 4L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.ElectrumFlux, 4L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Large_Fluid_Cell_Osmium.get(1L), + 200, + 4096); + + ItemList.Large_Fluid_Cell_Neutronium.set(addItem( + tLastID = 413, + "Large Neutronium Fluid Cell", + "", + new ItemData( + Materials.Neutronium, + OrePrefixes.plateDouble.mMaterialAmount * 4L, + new MaterialStack(Materials.Draconium, OrePrefixes.ring.mMaterialAmount * 4L)), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 12L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 10L))); setFluidContainerStats(32000 + tLastID, 131072000L, 1L); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Neutronium, 4L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Draconium, 4L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Large_Fluid_Cell_Neutronium.get(1L), 200, 7680); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Neutronium, 4L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Draconium, 4L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Large_Fluid_Cell_Neutronium.get(1L), + 200, + 7680); for (byte i = 0; i < 16; i = (byte) (i + 1)) { - ItemList.SPRAY_CAN_DYES[i].set(addItem(tLastID = 430 + 2 * i, "Spray Can (" + Dyes.get(i).mName + ")", "Full", new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 4L))); - ItemList.SPRAY_CAN_DYES_USED[i].set(addItem(tLastID + 1, "Spray Can (" + Dyes.get(i).mName + ")", "Used", new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 3L), SubTag.INVISIBLE)); - IItemBehaviour<GT_MetaBase_Item> tBehaviour = new Behaviour_Spray_Color(ItemList.Spray_Empty.get(1L), ItemList.SPRAY_CAN_DYES_USED[i].get(1L), ItemList.SPRAY_CAN_DYES[i].get(1L), 512L, i); + ItemList.SPRAY_CAN_DYES[i].set(addItem( + tLastID = 430 + 2 * i, + "Spray Can (" + Dyes.get(i).mName + ")", + "Full", + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 4L))); + ItemList.SPRAY_CAN_DYES_USED[i].set(addItem( + tLastID + 1, + "Spray Can (" + Dyes.get(i).mName + ")", + "Used", + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 3L), + SubTag.INVISIBLE)); + IItemBehaviour<GT_MetaBase_Item> tBehaviour = new Behaviour_Spray_Color( + ItemList.Spray_Empty.get(1L), + ItemList.SPRAY_CAN_DYES_USED[i].get(1L), + ItemList.SPRAY_CAN_DYES[i].get(1L), + 512L, + i); addItemBehavior(32000 + tLastID, tBehaviour); addItemBehavior(32001 + tLastID, tBehaviour); } - ItemList.Tool_Matches.set(addItem(tLastID = 471, "Match", "", new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); - ItemList.Tool_MatchBox_Used.set(addItem(tLastID = 472, "Match Box", "This is not a Car", new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), SubTag.INVISIBLE)); - ItemList.Tool_MatchBox_Full.set(addItem(tLastID = 473, "Match Box (Full)", "This is not a Car", new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); - - IItemBehaviour<GT_MetaBase_Item> tBehaviour = new Behaviour_Lighter(null, ItemList.Tool_Matches.get(1L), ItemList.Tool_Matches.get(1L), 1L); + ItemList.Tool_Matches.set(addItem( + tLastID = 471, + "Match", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); + ItemList.Tool_MatchBox_Used.set(addItem( + tLastID = 472, + "Match Box", + "This is not a Car", + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), + SubTag.INVISIBLE)); + ItemList.Tool_MatchBox_Full.set(addItem( + tLastID = 473, + "Match Box (Full)", + "This is not a Car", + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); + + IItemBehaviour<GT_MetaBase_Item> tBehaviour = + new Behaviour_Lighter(null, ItemList.Tool_Matches.get(1L), ItemList.Tool_Matches.get(1L), 1L); addItemBehavior(32471, tBehaviour); - tBehaviour = new Behaviour_Lighter(null, ItemList.Tool_MatchBox_Used.get(1L), ItemList.Tool_MatchBox_Full.get(1L), 16L); + tBehaviour = new Behaviour_Lighter( + null, ItemList.Tool_MatchBox_Used.get(1L), ItemList.Tool_MatchBox_Full.get(1L), 16L); addItemBehavior(32472, tBehaviour); addItemBehavior(32473, tBehaviour); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Phosphorus, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Tool_Matches.get(1L), 16, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.TricalciumPhosphate, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Tool_Matches.get(1L), 16, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphorus, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Tool_Matches.get(4L), 64, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TricalciumPhosphate, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Tool_Matches.get(4L), 64, 16); - GT_Values.RA.addBoxingRecipe(ItemList.Tool_Matches.get(16L), GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Paper, 1L), ItemList.Tool_MatchBox_Full.get(1L), 64, 16); - GT_Values.RA.addUnboxingRecipe(ItemList.Tool_MatchBox_Full.get(1L), ItemList.Tool_Matches.get(16L), null, 32, 16); - - ItemList.Tool_Lighter_Invar_Empty.set(addItem(tLastID = 474, "Lighter (Empty)", "", new ItemData(Materials.Invar, OrePrefixes.plate.mMaterialAmount * 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); - ItemList.Tool_Lighter_Invar_Used.set(addItem(tLastID = 475, "Lighter", "", new ItemData(Materials.Invar, OrePrefixes.plate.mMaterialAmount * 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), SubTag.INVISIBLE)); - ItemList.Tool_Lighter_Invar_Full.set(addItem(tLastID = 476, "Lighter (Full)", "", new ItemData(Materials.Invar, OrePrefixes.plate.mMaterialAmount * 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); - - tBehaviour = new Behaviour_Lighter(ItemList.Tool_Lighter_Invar_Empty.get(1L), ItemList.Tool_Lighter_Invar_Used.get(1L), ItemList.Tool_Lighter_Invar_Full.get(1L), 100L); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Phosphorus, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Tool_Matches.get(1L), + 16, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.TricalciumPhosphate, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Tool_Matches.get(1L), + 16, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphorus, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Tool_Matches.get(4L), + 64, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TricalciumPhosphate, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Tool_Matches.get(4L), + 64, + 16); + GT_Values.RA.addBoxingRecipe( + ItemList.Tool_Matches.get(16L), + GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Paper, 1L), + ItemList.Tool_MatchBox_Full.get(1L), + 64, + 16); + GT_Values.RA.addUnboxingRecipe( + ItemList.Tool_MatchBox_Full.get(1L), ItemList.Tool_Matches.get(16L), null, 32, 16); + + ItemList.Tool_Lighter_Invar_Empty.set(addItem( + tLastID = 474, + "Lighter (Empty)", + "", + new ItemData(Materials.Invar, OrePrefixes.plate.mMaterialAmount * 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); + ItemList.Tool_Lighter_Invar_Used.set(addItem( + tLastID = 475, + "Lighter", + "", + new ItemData(Materials.Invar, OrePrefixes.plate.mMaterialAmount * 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), + SubTag.INVISIBLE)); + ItemList.Tool_Lighter_Invar_Full.set(addItem( + tLastID = 476, + "Lighter (Full)", + "", + new ItemData(Materials.Invar, OrePrefixes.plate.mMaterialAmount * 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); + + tBehaviour = new Behaviour_Lighter( + ItemList.Tool_Lighter_Invar_Empty.get(1L), + ItemList.Tool_Lighter_Invar_Used.get(1L), + ItemList.Tool_Lighter_Invar_Full.get(1L), + 100L); addItemBehavior(32475, tBehaviour); addItemBehavior(32476, tBehaviour); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Invar, 2L), new ItemStack(Items.flint, 1), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Tool_Lighter_Invar_Empty.get(1L), 256, 16); - - ItemList.Tool_Lighter_Platinum_Empty.set(addItem(tLastID = 477, "Platinum Lighter (Empty)", "A known Prank Master is engraved on it", new ItemData(Materials.Platinum, OrePrefixes.plate.mMaterialAmount * 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); - ItemList.Tool_Lighter_Platinum_Used.set(addItem(tLastID = 478, "Platinum Lighter", "A known Prank Master is engraved on it", new ItemData(Materials.Platinum, OrePrefixes.plate.mMaterialAmount * 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), SubTag.INVISIBLE)); - ItemList.Tool_Lighter_Platinum_Full.set(addItem(tLastID = 479, "Platinum Lighter (Full)", "A known Prank Master is engraved on it", new ItemData(Materials.Platinum, OrePrefixes.plate.mMaterialAmount * 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); - - tBehaviour = new Behaviour_Lighter(ItemList.Tool_Lighter_Platinum_Empty.get(1L), ItemList.Tool_Lighter_Platinum_Used.get(1L), ItemList.Tool_Lighter_Platinum_Full.get(1L), 1000L); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Invar, 2L), + new ItemStack(Items.flint, 1), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Tool_Lighter_Invar_Empty.get(1L), + 256, + 16); + + ItemList.Tool_Lighter_Platinum_Empty.set(addItem( + tLastID = 477, + "Platinum Lighter (Empty)", + "A known Prank Master is engraved on it", + new ItemData(Materials.Platinum, OrePrefixes.plate.mMaterialAmount * 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); + ItemList.Tool_Lighter_Platinum_Used.set(addItem( + tLastID = 478, + "Platinum Lighter", + "A known Prank Master is engraved on it", + new ItemData(Materials.Platinum, OrePrefixes.plate.mMaterialAmount * 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), + SubTag.INVISIBLE)); + ItemList.Tool_Lighter_Platinum_Full.set(addItem( + tLastID = 479, + "Platinum Lighter (Full)", + "A known Prank Master is engraved on it", + new ItemData(Materials.Platinum, OrePrefixes.plate.mMaterialAmount * 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); + + tBehaviour = new Behaviour_Lighter( + ItemList.Tool_Lighter_Platinum_Empty.get(1L), + ItemList.Tool_Lighter_Platinum_Used.get(1L), + ItemList.Tool_Lighter_Platinum_Full.get(1L), + 1000L); addItemBehavior(32478, tBehaviour); addItemBehavior(32479, tBehaviour); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Platinum, 2L), new ItemStack(Items.flint, 1), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Tool_Lighter_Platinum_Empty.get(1L), 256, 256); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Platinum, 2L), + new ItemStack(Items.flint, 1), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Tool_Lighter_Platinum_Empty.get(1L), + 256, + 256); if (Loader.isModLoaded("GalacticraftMars")) { - ItemList.Ingot_Heavy1.set(addItem(tLastID = 462, "Heavy Duty Alloy Ingot T1", "Used to make Heavy Duty Plates T1")); - ItemList.Ingot_Heavy2.set(addItem(tLastID = 463, "Heavy Duty Alloy Ingot T2", "Used to make Heavy Duty Plates T2")); - ItemList.Ingot_Heavy3.set(addItem(tLastID = 464, "Heavy Duty Alloy Ingot T3", "Used to make Heavy Duty Plates T3")); - - //GT_ModHandler.addCraftingRecipe(ItemList.Ingot_Heavy1.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"BhB", "CAS", "B B", 'B', OrePrefixes.bolt.get(Materials.StainlessSteel), 'C', OrePrefixes.compressed.get(Materials.Bronze), 'A', OrePrefixes.compressed.get(Materials.Aluminium), 'S', OrePrefixes.compressed.get(Materials.Steel)}); + ItemList.Ingot_Heavy1.set( + addItem(tLastID = 462, "Heavy Duty Alloy Ingot T1", "Used to make Heavy Duty Plates T1")); + ItemList.Ingot_Heavy2.set( + addItem(tLastID = 463, "Heavy Duty Alloy Ingot T2", "Used to make Heavy Duty Plates T2")); + ItemList.Ingot_Heavy3.set( + addItem(tLastID = 464, "Heavy Duty Alloy Ingot T3", "Used to make Heavy Duty Plates T3")); + + // GT_ModHandler.addCraftingRecipe(ItemList.Ingot_Heavy1.get(1L, new Object[0]), + // GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"BhB", "CAS", "B B", 'B', + // OrePrefixes.bolt.get(Materials.StainlessSteel), 'C', OrePrefixes.compressed.get(Materials.Bronze), 'A', + // OrePrefixes.compressed.get(Materials.Aluminium), 'S', OrePrefixes.compressed.get(Materials.Steel)}); } - ItemList.Ingot_IridiumAlloy.set(addItem(tLastID = 480, "Iridium Alloy Ingot", "Used to make Iridium Plates", new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L))); - - //GT_ModHandler.addRollingMachineRecipe(ItemList.Ingot_IridiumAlloy.get(1L, new Object[0]), new Object[]{"IAI", "ADA", "IAI", 'D', GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "iridiumplate", true) ? OreDictNames.craftingIndustrialDiamond : OrePrefixes.dust.get(Materials.Diamond), 'A', OrePrefixes.plateAlloy.get("Advanced"), 'I', OrePrefixes.plate.get(Materials.Iridium)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Ingot_IridiumAlloy.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"IAI", "ADA", "IAI", 'D', GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "iridiumplate", true) ? OreDictNames.craftingIndustrialDiamond : OrePrefixes.dust.get(Materials.Diamond), 'A', OrePrefixes.plateAlloy.get("Advanced"), 'I', OrePrefixes.plate.get(Materials.Iridium)}); - - ItemList.Paper_Printed_Pages.set(addItem(tLastID = 481, "Printed Pages", "Used to make written Books", new ItemData(Materials.Paper, 10886400L), new Behaviour_PrintedPages(), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L))); - ItemList.Paper_Magic_Empty.set(addItem(tLastID = 482, "Magic Paper", "", SubTag.INVISIBLE, new ItemData(Materials.Paper, 3628800L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 1L))); - ItemList.Paper_Magic_Page.set(addItem(tLastID = 483, "Enchanted Page", "", SubTag.INVISIBLE, new ItemData(Materials.Paper, 3628800L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 2L))); - ItemList.Paper_Magic_Pages.set(addItem(tLastID = 484, "Enchanted Pages", "", SubTag.INVISIBLE, new ItemData(Materials.Paper, 10886400L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 4L))); - ItemList.Paper_Punch_Card_Empty.set(addItem(tLastID = 485, "Punch Card", "", SubTag.INVISIBLE, new ItemData(Materials.Paper, 7257600L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L))); - ItemList.Paper_Punch_Card_Encoded.set(addItem(tLastID = 486, "Punched Card", "", SubTag.INVISIBLE, new ItemData(Materials.Paper, 7257600L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L))); - ItemList.Book_Written_01.set(addItem(tLastID = 487, "Book", "", new ItemData(Materials.Paper, 10886400L), "bookWritten", OreDictNames.craftingBook, new Behaviour_WrittenBook(), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L))); - ItemList.Book_Written_02.set(addItem(tLastID = 488, "Book", "", new ItemData(Materials.Paper, 10886400L), "bookWritten", OreDictNames.craftingBook, new Behaviour_WrittenBook(), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L))); - ItemList.Book_Written_03.set(addItem(tLastID = 489, "Book", "", new ItemData(Materials.Paper, 10886400L), "bookWritten", OreDictNames.craftingBook, new Behaviour_WrittenBook(), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L))); - - ItemList.Schematic.set(addItem(tLastID = 490, "Schematic", "EMPTY", new ItemData(Materials.Steel, 7257600L), new TC_Aspects.TC_AspectStack(TC_Aspects.STRONTIO, 1L))); - ItemList.Schematic_Crafting.set(addItem(tLastID = 491, "Schematic (Crafting)", "Crafts the Programmed Recipe", new ItemData(Materials.Steel, 7257600L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L))); - ItemList.Schematic_1by1.set(addItem(tLastID = 495, "Schematic (1x1)", "Crafts 1 Items as 1x1 (use in Packager)", new ItemData(Materials.Steel, 7257600L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L))); - ItemList.Schematic_2by2.set(addItem(tLastID = 496, "Schematic (2x2)", "Crafts 4 Items as 2x2 (use in Packager)", new ItemData(Materials.Steel, 7257600L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L))); - ItemList.Schematic_3by3.set(addItem(tLastID = 497, "Schematic (3x3)", "Crafts 9 Items as 3x3 (use in Packager)", new ItemData(Materials.Steel, 7257600L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L))); - ItemList.Schematic_Dust.set(addItem(tLastID = 498, "Schematic (Dusts)", "Combines Dusts (use in Packager)", new ItemData(Materials.Steel, 7257600L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L))); - - GT_ModHandler.addCraftingRecipe(ItemList.Schematic_1by1.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"d ", aTextShape, aTextEmptyRow, 'P', ItemList.Schematic}); - GT_ModHandler.addCraftingRecipe(ItemList.Schematic_2by2.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" d ", aTextShape, aTextEmptyRow, 'P', ItemList.Schematic}); - GT_ModHandler.addCraftingRecipe(ItemList.Schematic_3by3.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" d", aTextShape, aTextEmptyRow, 'P', ItemList.Schematic}); - GT_ModHandler.addCraftingRecipe(ItemList.Schematic_Dust.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{aTextEmptyRow, aTextShape, " d", 'P', ItemList.Schematic}); - - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Schematic_Crafting}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Schematic_1by1}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Schematic_2by2}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Schematic_3by3}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Schematic_Dust}); - - ItemList.Battery_Hull_LV.set(addItem(500, "Small Battery Hull", "An empty LV Battery Hull", new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); - ItemList.Battery_Hull_MV.set(addItem(501, "Medium Battery Hull", "An empty MV Battery Hull", new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); - ItemList.Battery_Hull_HV.set(addItem(502, "Large Battery Hull", "An empty HV Battery Hull", new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 9L), new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); - - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Hull_LV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"Cf ", "Ph ", "Ps ", 'P', OrePrefixes.plate.get(Materials.BatteryAlloy), 'C', OreDictNames.craftingWireTin}); - //GT_ModHandler.addCraftingRecipe(ItemList.Battery_Hull_MV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"C C", "PPP", "PPP", 'P', OrePrefixes.plate.get(Materials.BatteryAlloy), 'C', OreDictNames.craftingWireCopper}); + ItemList.Ingot_IridiumAlloy.set(addItem( + tLastID = 480, + "Iridium Alloy Ingot", + "Used to make Iridium Plates", + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L))); + + // GT_ModHandler.addRollingMachineRecipe(ItemList.Ingot_IridiumAlloy.get(1L, new Object[0]), new Object[]{"IAI", + // "ADA", "IAI", 'D', GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "iridiumplate", true) + // ? OreDictNames.craftingIndustrialDiamond : OrePrefixes.dust.get(Materials.Diamond), 'A', + // OrePrefixes.plateAlloy.get("Advanced"), 'I', OrePrefixes.plate.get(Materials.Iridium)}); + // GT_ModHandler.addCraftingRecipe(ItemList.Ingot_IridiumAlloy.get(1L, new Object[0]), + // GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"IAI", "ADA", "IAI", 'D', + // GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "iridiumplate", true) ? + // OreDictNames.craftingIndustrialDiamond : OrePrefixes.dust.get(Materials.Diamond), 'A', + // OrePrefixes.plateAlloy.get("Advanced"), 'I', OrePrefixes.plate.get(Materials.Iridium)}); + + ItemList.Paper_Printed_Pages.set(addItem( + tLastID = 481, + "Printed Pages", + "Used to make written Books", + new ItemData(Materials.Paper, 10886400L), + new Behaviour_PrintedPages(), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L))); + ItemList.Paper_Magic_Empty.set(addItem( + tLastID = 482, + "Magic Paper", + "", + SubTag.INVISIBLE, + new ItemData(Materials.Paper, 3628800L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 1L))); + ItemList.Paper_Magic_Page.set(addItem( + tLastID = 483, + "Enchanted Page", + "", + SubTag.INVISIBLE, + new ItemData(Materials.Paper, 3628800L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 2L))); + ItemList.Paper_Magic_Pages.set(addItem( + tLastID = 484, + "Enchanted Pages", + "", + SubTag.INVISIBLE, + new ItemData(Materials.Paper, 10886400L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 4L))); + ItemList.Paper_Punch_Card_Empty.set(addItem( + tLastID = 485, + "Punch Card", + "", + SubTag.INVISIBLE, + new ItemData(Materials.Paper, 7257600L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L))); + ItemList.Paper_Punch_Card_Encoded.set(addItem( + tLastID = 486, + "Punched Card", + "", + SubTag.INVISIBLE, + new ItemData(Materials.Paper, 7257600L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L))); + ItemList.Book_Written_01.set(addItem( + tLastID = 487, + "Book", + "", + new ItemData(Materials.Paper, 10886400L), + "bookWritten", + OreDictNames.craftingBook, + new Behaviour_WrittenBook(), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L))); + ItemList.Book_Written_02.set(addItem( + tLastID = 488, + "Book", + "", + new ItemData(Materials.Paper, 10886400L), + "bookWritten", + OreDictNames.craftingBook, + new Behaviour_WrittenBook(), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L))); + ItemList.Book_Written_03.set(addItem( + tLastID = 489, + "Book", + "", + new ItemData(Materials.Paper, 10886400L), + "bookWritten", + OreDictNames.craftingBook, + new Behaviour_WrittenBook(), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L))); + + ItemList.Schematic.set(addItem( + tLastID = 490, + "Schematic", + "EMPTY", + new ItemData(Materials.Steel, 7257600L), + new TC_Aspects.TC_AspectStack(TC_Aspects.STRONTIO, 1L))); + ItemList.Schematic_Crafting.set(addItem( + tLastID = 491, + "Schematic (Crafting)", + "Crafts the Programmed Recipe", + new ItemData(Materials.Steel, 7257600L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L))); + ItemList.Schematic_1by1.set(addItem( + tLastID = 495, + "Schematic (1x1)", + "Crafts 1 Items as 1x1 (use in Packager)", + new ItemData(Materials.Steel, 7257600L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L))); + ItemList.Schematic_2by2.set(addItem( + tLastID = 496, + "Schematic (2x2)", + "Crafts 4 Items as 2x2 (use in Packager)", + new ItemData(Materials.Steel, 7257600L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L))); + ItemList.Schematic_3by3.set(addItem( + tLastID = 497, + "Schematic (3x3)", + "Crafts 9 Items as 3x3 (use in Packager)", + new ItemData(Materials.Steel, 7257600L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L))); + ItemList.Schematic_Dust.set(addItem( + tLastID = 498, + "Schematic (Dusts)", + "Combines Dusts (use in Packager)", + new ItemData(Materials.Steel, 7257600L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L))); + + GT_ModHandler.addCraftingRecipe( + ItemList.Schematic_1by1.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {"d ", aTextShape, aTextEmptyRow, 'P', ItemList.Schematic}); + GT_ModHandler.addCraftingRecipe( + ItemList.Schematic_2by2.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {" d ", aTextShape, aTextEmptyRow, 'P', ItemList.Schematic}); + GT_ModHandler.addCraftingRecipe( + ItemList.Schematic_3by3.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {" d", aTextShape, aTextEmptyRow, 'P', ItemList.Schematic}); + GT_ModHandler.addCraftingRecipe( + ItemList.Schematic_Dust.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {aTextEmptyRow, aTextShape, " d", 'P', ItemList.Schematic}); + + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Schematic.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {ItemList.Schematic_Crafting}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Schematic.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {ItemList.Schematic_1by1}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Schematic.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {ItemList.Schematic_2by2}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Schematic.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {ItemList.Schematic_3by3}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Schematic.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {ItemList.Schematic_Dust}); + + ItemList.Battery_Hull_LV.set(addItem( + 500, + "Small Battery Hull", + "An empty LV Battery Hull", + new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); + ItemList.Battery_Hull_MV.set(addItem( + 501, + "Medium Battery Hull", + "An empty MV Battery Hull", + new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); + ItemList.Battery_Hull_HV.set(addItem( + 502, + "Large Battery Hull", + "An empty HV Battery Hull", + new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 9L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); + + GT_ModHandler.addCraftingRecipe( + ItemList.Battery_Hull_LV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { + "Cf ", + "Ph ", + "Ps ", + 'P', + OrePrefixes.plate.get(Materials.BatteryAlloy), + 'C', + OreDictNames.craftingWireTin + }); + // GT_ModHandler.addCraftingRecipe(ItemList.Battery_Hull_MV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new + // Object[]{"C C", "PPP", "PPP", 'P', OrePrefixes.plate.get(Materials.BatteryAlloy), 'C', + // OreDictNames.craftingWireCopper}); // ULV Batteries - ItemList.Battery_RE_ULV_Tantalum.set(addItem(tLastID = 499, "Tantalum Capacitor", "Reusable", "batteryULV", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); + ItemList.Battery_RE_ULV_Tantalum.set(addItem( + tLastID = 499, + "Tantalum Capacitor", + "Reusable", + "batteryULV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); setElectricStats(32000 + tLastID, 1000L, GT_Values.V[0], 0L, -3L, false); OreDictionary.registerOre("ULV", ItemList.Battery_RE_ULV_Tantalum.get(1)); // LV Batteries - ItemList.Battery_SU_LV_SulfuricAcid.set(addItem(tLastID = 510, "Small Acid Battery", "Single Use", "batteryLV", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); + ItemList.Battery_SU_LV_SulfuricAcid.set(addItem( + tLastID = 510, + "Small Acid Battery", + "Single Use", + "batteryLV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); setElectricStats(32000 + tLastID, 18000L, GT_Values.V[1], 1L, -2L, true); OreDictionary.registerOre("LV", ItemList.Battery_SU_LV_SulfuricAcid.get(1)); - ItemList.Battery_SU_LV_Mercury.set(addItem(tLastID = 511, "Small Mercury Battery", "Single Use", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); + ItemList.Battery_SU_LV_Mercury.set(addItem( + tLastID = 511, + "Small Mercury Battery", + "Single Use", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); setElectricStats(32000 + tLastID, 32000L, GT_Values.V[1], 1L, -2L, true); OreDictionary.registerOre("LV", ItemList.Battery_SU_LV_Mercury.get(1)); - ItemList.Battery_RE_LV_Cadmium.set(addItem(tLastID = 517, "Small Cadmium Battery", "Reusable", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), "batteryLV")); + ItemList.Battery_RE_LV_Cadmium.set(addItem( + tLastID = 517, + "Small Cadmium Battery", + "Reusable", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), + "batteryLV")); setElectricStats(32000 + tLastID, 75000L, GT_Values.V[1], 1L, -3L, true); OreDictionary.registerOre("LV", ItemList.Battery_RE_LV_Cadmium.get(1)); - OreDictionary.registerOre("calclavia:ADVANCED_BATTERY", ItemList.Battery_RE_LV_Cadmium.get(1)); // Annoying backwards compat - - ItemList.Battery_RE_LV_Lithium.set(addItem(tLastID = 518, "Small Lithium Battery", "Reusable", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), "batteryLV")); + OreDictionary.registerOre( + "calclavia:ADVANCED_BATTERY", ItemList.Battery_RE_LV_Cadmium.get(1)); // Annoying backwards compat + + ItemList.Battery_RE_LV_Lithium.set(addItem( + tLastID = 518, + "Small Lithium Battery", + "Reusable", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), + "batteryLV")); setElectricStats(32000 + tLastID, 100000L, GT_Values.V[1], 1L, -3L, true); OreDictionary.registerOre("LV", ItemList.Battery_RE_LV_Lithium.get(1)); - OreDictionary.registerOre("calclavia:ADVANCED_BATTERY", ItemList.Battery_RE_LV_Lithium.get(1)); // Annoying backwards compat - - ItemList.Battery_RE_LV_Sodium.set(addItem(tLastID = 519, "Small Sodium Battery", "Reusable", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), "calclavia:ADVANCED_BATTERY")); + OreDictionary.registerOre( + "calclavia:ADVANCED_BATTERY", ItemList.Battery_RE_LV_Lithium.get(1)); // Annoying backwards compat + + ItemList.Battery_RE_LV_Sodium.set(addItem( + tLastID = 519, + "Small Sodium Battery", + "Reusable", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), + "calclavia:ADVANCED_BATTERY")); setElectricStats(32000 + tLastID, 50000L, GT_Values.V[1], 1L, -3L, true); OreDictionary.registerOre("LV", ItemList.Battery_RE_LV_Sodium.get(1)); - OreDictionary.registerOre("calclavia:ADVANCED_BATTERY", ItemList.Battery_RE_LV_Sodium.get(1)); // Annoying backwards compat + OreDictionary.registerOre( + "calclavia:ADVANCED_BATTERY", ItemList.Battery_RE_LV_Sodium.get(1)); // Annoying backwards compat // MV Batteries - ItemList.Battery_SU_MV_SulfuricAcid.set(addItem(tLastID = 520, "Medium Acid Battery", "Single Use", "batteryMV", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L))); + ItemList.Battery_SU_MV_SulfuricAcid.set(addItem( + tLastID = 520, + "Medium Acid Battery", + "Single Use", + "batteryMV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L))); setElectricStats(32000 + tLastID, 72000L, GT_Values.V[2], 2L, -2L, true); OreDictionary.registerOre("MV", ItemList.Battery_SU_MV_SulfuricAcid.get(1)); - ItemList.Battery_SU_MV_Mercury.set(addItem(tLastID = 521, "Medium Mercury Battery", "Single Use", "batteryMV", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L))); + ItemList.Battery_SU_MV_Mercury.set(addItem( + tLastID = 521, + "Medium Mercury Battery", + "Single Use", + "batteryMV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L))); setElectricStats(32000 + tLastID, 128000L, GT_Values.V[2], 2L, -2L, true); OreDictionary.registerOre("MV", ItemList.Battery_SU_MV_Mercury.get(1)); - ItemList.Battery_RE_MV_Cadmium.set(addItem(tLastID = 527, "Medium Cadmium Battery", "Reusable", "batteryMV", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); + ItemList.Battery_RE_MV_Cadmium.set(addItem( + tLastID = 527, + "Medium Cadmium Battery", + "Reusable", + "batteryMV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); setElectricStats(32000 + tLastID, 300000L, GT_Values.V[2], 2L, -3L, true); OreDictionary.registerOre("MV", ItemList.Battery_RE_MV_Cadmium.get(1)); - ItemList.Battery_RE_MV_Lithium.set(addItem(tLastID = 528, "Medium Lithium Battery", "Reusable", "batteryMV", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); + ItemList.Battery_RE_MV_Lithium.set(addItem( + tLastID = 528, + "Medium Lithium Battery", + "Reusable", + "batteryMV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); setElectricStats(32000 + tLastID, 400000L, GT_Values.V[2], 2L, -3L, true); OreDictionary.registerOre("MV", ItemList.Battery_RE_MV_Lithium.get(1)); - ItemList.Battery_RE_MV_Sodium.set(addItem(tLastID = 529, "Medium Sodium Battery", "Reusable", "batteryMV", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); + ItemList.Battery_RE_MV_Sodium.set(addItem( + tLastID = 529, + "Medium Sodium Battery", + "Reusable", + "batteryMV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); setElectricStats(32000 + tLastID, 200000L, GT_Values.V[2], 2L, -3L, true); OreDictionary.registerOre("MV", ItemList.Battery_RE_MV_Sodium.get(1)); // HV Batteries - ItemList.Battery_SU_HV_SulfuricAcid.set(addItem(tLastID = 530, "Large Acid Battery", "Single Use", "batteryHV", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 8L))); + ItemList.Battery_SU_HV_SulfuricAcid.set(addItem( + tLastID = 530, + "Large Acid Battery", + "Single Use", + "batteryHV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 8L))); setElectricStats(32000 + tLastID, 288000L, GT_Values.V[3], 3L, -2L, true); OreDictionary.registerOre("HV", ItemList.Battery_SU_HV_SulfuricAcid.get(1)); - ItemList.Battery_SU_HV_Mercury.set(addItem(tLastID = 531, "Large Mercury Battery", "Single Use", "batteryHV", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 8L))); + ItemList.Battery_SU_HV_Mercury.set(addItem( + tLastID = 531, + "Large Mercury Battery", + "Single Use", + "batteryHV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 8L))); setElectricStats(32000 + tLastID, 512000L, GT_Values.V[3], 3L, -2L, true); OreDictionary.registerOre("HV", ItemList.Battery_SU_HV_Mercury.get(1)); - ItemList.Battery_RE_HV_Cadmium.set(addItem(tLastID = 537, "Large Cadmium Battery", "Reusable", "batteryHV", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L))); + ItemList.Battery_RE_HV_Cadmium.set(addItem( + tLastID = 537, + "Large Cadmium Battery", + "Reusable", + "batteryHV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L))); setElectricStats(32000 + tLastID, 1200000L, GT_Values.V[3], 3L, -3L, true); OreDictionary.registerOre("HV", ItemList.Battery_RE_HV_Cadmium.get(1)); - ItemList.Battery_RE_HV_Lithium.set(addItem(tLastID = 538, "Large Lithium Battery", "Reusable", "batteryHV", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L))); + ItemList.Battery_RE_HV_Lithium.set(addItem( + tLastID = 538, + "Large Lithium Battery", + "Reusable", + "batteryHV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L))); setElectricStats(32000 + tLastID, 1600000L, GT_Values.V[3], 3L, -3L, true); OreDictionary.registerOre("HV", ItemList.Battery_RE_HV_Lithium.get(1)); - ItemList.Battery_RE_HV_Sodium.set(addItem(tLastID = 539, "Large Sodium Battery", "Reusable", "batteryHV", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L))); + ItemList.Battery_RE_HV_Sodium.set(addItem( + tLastID = 539, + "Large Sodium Battery", + "Reusable", + "batteryHV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L))); setElectricStats(32000 + tLastID, 800000L, GT_Values.V[3], 3L, -3L, true); OreDictionary.registerOre("HV", ItemList.Battery_RE_HV_Sodium.get(1)); - GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_LV_SulfuricAcid.get(1L), ItemList.Battery_Hull_LV.get(1L)); + GT_ModHandler.addExtractionRecipe( + ItemList.Battery_SU_LV_SulfuricAcid.get(1L), ItemList.Battery_Hull_LV.get(1L)); GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_LV_Mercury.get(1L), ItemList.Battery_Hull_LV.get(1L)); - GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_MV_SulfuricAcid.get(1L), ItemList.Battery_Hull_MV.get(1L)); + GT_ModHandler.addExtractionRecipe( + ItemList.Battery_SU_MV_SulfuricAcid.get(1L), ItemList.Battery_Hull_MV.get(1L)); GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_MV_Mercury.get(1L), ItemList.Battery_Hull_MV.get(1L)); - GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_HV_SulfuricAcid.get(1L), ItemList.Battery_Hull_HV.get(1L)); + GT_ModHandler.addExtractionRecipe( + ItemList.Battery_SU_HV_SulfuricAcid.get(1L), ItemList.Battery_Hull_HV.get(1L)); GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_HV_Mercury.get(1L), ItemList.Battery_Hull_HV.get(1L)); GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_LV_Cadmium.get(1L), ItemList.Battery_Hull_LV.get(1L)); GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_LV_Lithium.get(1L), ItemList.Battery_Hull_LV.get(1L)); @@ -490,468 +1956,2880 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_HV_Lithium.get(1L), ItemList.Battery_Hull_HV.get(1L)); GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_HV_Sodium.get(1L), ItemList.Battery_Hull_HV.get(1L)); - GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cadmium, 2L), ItemList.Battery_Hull_LV.get(1L), ItemList.Battery_RE_LV_Cadmium.get(1L), null, 100, 2); - GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 2L), ItemList.Battery_Hull_LV.get(1L), ItemList.Battery_RE_LV_Lithium.get(1L), null, 100, 2); - GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 2L), ItemList.Battery_Hull_LV.get(1L), ItemList.Battery_RE_LV_Sodium.get(1L), null, 100, 2); - GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cadmium, 8L), ItemList.Battery_Hull_MV.get(1L), ItemList.Battery_RE_MV_Cadmium.get(1L), null, 400, 2); - GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 8L), ItemList.Battery_Hull_MV.get(1L), ItemList.Battery_RE_MV_Lithium.get(1L), null, 400, 2); - GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 8L), ItemList.Battery_Hull_MV.get(1L), ItemList.Battery_RE_MV_Sodium.get(1L), null, 400, 2); - GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cadmium, 32L), ItemList.Battery_Hull_HV.get(1L), ItemList.Battery_RE_HV_Cadmium.get(1L), null, 1600, 2); - GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 32L), ItemList.Battery_Hull_HV.get(1L), ItemList.Battery_RE_HV_Lithium.get(1L), null, 1600, 2); - GT_Values.RA.addCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 32L), ItemList.Battery_Hull_HV.get(1L), ItemList.Battery_RE_HV_Sodium.get(1L), null, 1600, 2); + GT_Values.RA.addCannerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cadmium, 2L), + ItemList.Battery_Hull_LV.get(1L), + ItemList.Battery_RE_LV_Cadmium.get(1L), + null, + 100, + 2); + GT_Values.RA.addCannerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 2L), + ItemList.Battery_Hull_LV.get(1L), + ItemList.Battery_RE_LV_Lithium.get(1L), + null, + 100, + 2); + GT_Values.RA.addCannerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 2L), + ItemList.Battery_Hull_LV.get(1L), + ItemList.Battery_RE_LV_Sodium.get(1L), + null, + 100, + 2); + GT_Values.RA.addCannerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cadmium, 8L), + ItemList.Battery_Hull_MV.get(1L), + ItemList.Battery_RE_MV_Cadmium.get(1L), + null, + 400, + 2); + GT_Values.RA.addCannerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 8L), + ItemList.Battery_Hull_MV.get(1L), + ItemList.Battery_RE_MV_Lithium.get(1L), + null, + 400, + 2); + GT_Values.RA.addCannerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 8L), + ItemList.Battery_Hull_MV.get(1L), + ItemList.Battery_RE_MV_Sodium.get(1L), + null, + 400, + 2); + GT_Values.RA.addCannerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cadmium, 32L), + ItemList.Battery_Hull_HV.get(1L), + ItemList.Battery_RE_HV_Cadmium.get(1L), + null, + 1600, + 2); + GT_Values.RA.addCannerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 32L), + ItemList.Battery_Hull_HV.get(1L), + ItemList.Battery_RE_HV_Lithium.get(1L), + null, + 1600, + 2); + GT_Values.RA.addCannerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 32L), + ItemList.Battery_Hull_HV.get(1L), + ItemList.Battery_RE_HV_Sodium.get(1L), + null, + 1600, + 2); // IV Battery - ItemList.Energy_LapotronicOrb.set(addItem(tLastID = 597, "Lapotronic Energy Orb", "Reusable battery", "batteryIV", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 16L), OrePrefixes.battery.get(Materials.Ultimate))); + ItemList.Energy_LapotronicOrb.set(addItem( + tLastID = 597, + "Lapotronic Energy Orb", + "Reusable battery", + "batteryIV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 16L), + OrePrefixes.battery.get(Materials.Ultimate))); setElectricStats(32000 + tLastID, 100000000L, GT_Values.V[5], 5L, -3L, true); OreDictionary.registerOre("IV", ItemList.Energy_LapotronicOrb.get(1)); // ZPM Module - ItemList.ZPM.set(addItem(tLastID = 598, "Zero Point Module", "Single use battery", "batteryZPM", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L))); + ItemList.ZPM.set(addItem( + tLastID = 598, + "Zero Point Module", + "Single use battery", + "batteryZPM", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L))); setElectricStats(32000 + tLastID, 2000000000000L, GT_Values.V[7], 7L, -2L, true); OreDictionary.registerOre("ZPM", ItemList.ZPM.get(1)); // LuV Lapotron orb cluster battery - ItemList.Energy_LapotronicOrb2.set(addItem(tLastID = 599, "Lapotronic Energy Orb Cluster", "Reusable battery", "batteryLuV", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 16L), OrePrefixes.battery.get(Materials.Ultimate))); + ItemList.Energy_LapotronicOrb2.set(addItem( + tLastID = 599, + "Lapotronic Energy Orb Cluster", + "Reusable battery", + "batteryLuV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 16L), + OrePrefixes.battery.get(Materials.Ultimate))); setElectricStats(32000 + tLastID, 1000000000L, GT_Values.V[6], 6L, -3L, true); OreDictionary.registerOre("LuV", ItemList.Energy_LapotronicOrb2.get(1)); // UV Battery - ItemList.ZPM2.set(addItem(tLastID = 605, "Ultimate Battery", "Fill this to win minecraft", "batteryUV", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L))); + ItemList.ZPM2.set(addItem( + tLastID = 605, + "Ultimate Battery", + "Fill this to win minecraft", + "batteryUV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L))); setElectricStats(32000 + tLastID, Long.MAX_VALUE, GT_Values.V[8], 8L, -3L, true); OreDictionary.registerOre("UV", ItemList.ZPM2.get(1)); // UMV Battery - ItemList.ZPM3.set(addItem(tLastID = 609, "Really Ultimate Battery", "Fill this to be way older", "batteryUMV", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L))); + ItemList.ZPM3.set(addItem( + tLastID = 609, + "Really Ultimate Battery", + "Fill this to be way older", + "batteryUMV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L))); setElectricStats(32000 + tLastID, Long.MAX_VALUE, GT_Values.V[12], 12L, -3L, true); OreDictionary.registerOre("UMV", ItemList.ZPM3.get(1)); // ZPM Cluster - ItemList.Energy_Module.set(addItem(tLastID = 736, "Energy Module", "Reusable battery", "batteryZPM", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 16L), OrePrefixes.battery.get(Materials.Ultimate))); + ItemList.Energy_Module.set(addItem( + tLastID = 736, + "Energy Module", + "Reusable battery", + "batteryZPM", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 16L), + OrePrefixes.battery.get(Materials.Ultimate))); setElectricStats(32000 + tLastID, 10000000000L, GT_Values.V[7], 7L, -3L, true); OreDictionary.registerOre("ZPM", ItemList.Energy_Module.get(1)); // UV Cluster - ItemList.Energy_Cluster.set(addItem(tLastID = 737, "Energy Cluster", "Reusable battery", "batteryUV", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L))); + ItemList.Energy_Cluster.set(addItem( + tLastID = 737, + "Energy Cluster", + "Reusable battery", + "batteryUV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L))); setElectricStats(32000 + tLastID, 100000000000L, GT_Values.V[8], 8L, -3L, true); OreDictionary.registerOre("UV", ItemList.Energy_Cluster.get(1)); // UIV, UMV, UXV and MAX component textures backported from gregicality. - ItemList.Electric_Motor_LV.set(addItem(600, "Electric Motor (LV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L))); - ItemList.Electric_Motor_MV.set(addItem(601, "Electric Motor (MV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L))); - ItemList.Electric_Motor_HV.set(addItem(602, "Electric Motor (HV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 4L))); - ItemList.Electric_Motor_EV.set(addItem(603, "Electric Motor (EV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 8L))); - ItemList.Electric_Motor_IV.set(addItem(604, "Electric Motor (IV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L))); - ItemList.Electric_Motor_LuV.set(addItem(606, "Electric Motor (LuV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 32L))); - ItemList.Electric_Motor_ZPM.set(addItem(607, "Electric Motor (ZPM)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 64L))); - ItemList.Electric_Motor_UV.set(addItem(608, "Electric Motor (UV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 128L))); - ItemList.Electric_Motor_UHV.set(addItem(596, "Electric Motor (UHV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 256L))); - ItemList.Electric_Motor_UEV.set(addItem(595, "Electric Motor (UEV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); - ItemList.Electric_Motor_UIV.set(addItem(17, "Electric Motor (UIV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); - ItemList.Electric_Motor_UMV.set(addItem(18, "Electric Motor (UMV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); - ItemList.Electric_Motor_UXV.set(addItem(19, "Electric Motor (UXV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); - ItemList.Electric_Motor_MAX.set(addItem(20, "Electric Motor (MAX)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); - - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_LV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.IronMagnetic), 'R', OrePrefixes.stick.get(Materials.AnyIron), 'W', OrePrefixes.wireGt01.get(Materials.AnyCopper), 'C', OrePrefixes.cableGt01.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_LV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.SteelMagnetic), 'R', OrePrefixes.stick.get(Materials.Steel), 'W', OrePrefixes.wireGt01.get(Materials.AnyCopper), 'C', OrePrefixes.cableGt01.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_MV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.SteelMagnetic), 'R', OrePrefixes.stick.get(Materials.Aluminium), 'W', OrePrefixes.wireGt02.get(Materials.Cupronickel), 'C', OrePrefixes.cableGt01.get(Materials.AnyCopper)}); - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_HV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.SteelMagnetic), 'R', OrePrefixes.stick.get(Materials.StainlessSteel), 'W', OrePrefixes.wireGt04.get(Materials.Electrum), 'C', OrePrefixes.cableGt02.get(Materials.Silver)}); - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_EV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.NeodymiumMagnetic), 'R', OrePrefixes.stick.get(Materials.Titanium), 'W', OrePrefixes.wireGt04.get(Materials.BlackSteel), 'C', OrePrefixes.cableGt02.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Motor_IV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.NeodymiumMagnetic), 'R', OrePrefixes.stick.get(Materials.TungstenSteel), 'W', OrePrefixes.wireGt04.get(Materials.Graphene), 'C', OrePrefixes.cableGt02.get(Materials.Tungsten)}); - - ItemList.Tesseract.set(addItem(415, "Raw Tesseract", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L))); - ItemList.GigaChad.set(addItem(416, "Giga Chad Token", "You are worthy", new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1000L))); - ItemList.EnergisedTesseract.set(addItem(417, "Energised Tesseract", "Higher dimensional engineering", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 10L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L))); - - ItemList.Electric_Piston_LV.set(addItem(640, "Electric Piston (LV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L))); - ItemList.Electric_Piston_MV.set(addItem(641, "Electric Piston (MV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L))); - ItemList.Electric_Piston_HV.set(addItem(642, "Electric Piston (HV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 4L))); - ItemList.Electric_Piston_EV.set(addItem(643, "Electric Piston (EV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 8L))); - ItemList.Electric_Piston_IV.set(addItem(644, "Electric Piston (IV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L))); - ItemList.Electric_Piston_LuV.set(addItem(645, "Electric Piston (LuV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 32L))); - ItemList.Electric_Piston_ZPM.set(addItem(646, "Electric Piston (ZPM)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 64L))); - ItemList.Electric_Piston_UV.set(addItem(647, "Electric Piston (UV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 128L))); - ItemList.Electric_Piston_UHV.set(addItem(648, "Electric Piston (UHV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 256L))); - ItemList.Electric_Piston_UEV.set(addItem(649, "Electric Piston (UEV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); - ItemList.Electric_Piston_UIV.set(addItem(21, "Electric Piston (UIV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); - ItemList.Electric_Piston_UMV.set(addItem(22, "Electric Piston (UMV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); - ItemList.Electric_Piston_UXV.set(addItem(23, "Electric Piston (UXV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); - ItemList.Electric_Piston_MAX.set(addItem(24, "Electric Piston (MAX)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); - - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Piston_LV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.Steel), 'S', OrePrefixes.stick.get(Materials.Steel), 'G', OrePrefixes.gearGtSmall.get(Materials.Steel), 'M', ItemList.Electric_Motor_LV, 'C', OrePrefixes.cableGt01.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Piston_MV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.Aluminium), 'S', OrePrefixes.stick.get(Materials.Aluminium), 'G', OrePrefixes.gearGtSmall.get(Materials.Aluminium), 'M', ItemList.Electric_Motor_MV, 'C', OrePrefixes.cableGt01.get(Materials.AnyCopper)}); - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Piston_HV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'S', OrePrefixes.stick.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'M', ItemList.Electric_Motor_HV, 'C', OrePrefixes.cableGt01.get(Materials.Gold)}); - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Piston_EV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.Titanium), 'S', OrePrefixes.stick.get(Materials.Titanium), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium), 'M', ItemList.Electric_Motor_EV, 'C', OrePrefixes.cableGt01.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Piston_IV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'S', OrePrefixes.stick.get(Materials.TungstenSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel), 'M', ItemList.Electric_Motor_IV, 'C', OrePrefixes.cableGt01.get(Materials.Tungsten)}); - - ItemList.Electric_Pump_LV.set(addItem(610, "Electric Pump (LV)", GT_Utility.formatNumbers(32) + PartCoverText + GT_Utility.formatNumbers(32 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L))); - ItemList.Electric_Pump_MV.set(addItem(611, "Electric Pump (MV)", GT_Utility.formatNumbers(128) + PartCoverText + GT_Utility.formatNumbers(128 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); - ItemList.Electric_Pump_HV.set(addItem(612, "Electric Pump (HV)", GT_Utility.formatNumbers(512) + PartCoverText + GT_Utility.formatNumbers(512 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L))); - ItemList.Electric_Pump_EV.set(addItem(613, "Electric Pump (EV)", GT_Utility.formatNumbers(2048) + PartCoverText + GT_Utility.formatNumbers(2048 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 8L))); - ItemList.Electric_Pump_IV.set(addItem(614, "Electric Pump (IV)", GT_Utility.formatNumbers(8192) + PartCoverText + GT_Utility.formatNumbers(8192 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 16L))); - ItemList.Electric_Pump_LuV.set(addItem(615, "Electric Pump (LuV)", GT_Utility.formatNumbers(32768) + PartCoverText + GT_Utility.formatNumbers(32768 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 32L))); - ItemList.Electric_Pump_ZPM.set(addItem(616, "Electric Pump (ZPM)", GT_Utility.formatNumbers(131072) + PartCoverText + GT_Utility.formatNumbers(131072 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 64L))); - ItemList.Electric_Pump_UV.set(addItem(617, "Electric Pump (UV)", GT_Utility.formatNumbers(524288) + PartCoverText + GT_Utility.formatNumbers(524288 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 128L))); - ItemList.Electric_Pump_UHV.set(addItem(618, "Electric Pump (UHV)", GT_Utility.formatNumbers(1048576) + PartCoverText + GT_Utility.formatNumbers(1048576 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 256L))); - ItemList.Electric_Pump_UEV.set(addItem(619, "Electric Pump (UEV)", GT_Utility.formatNumbers(2097152) + PartCoverText + GT_Utility.formatNumbers(2097152 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L))); - ItemList.Electric_Pump_UIV.set(addItem(25, "Electric Pump (UIV)", PartNotCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L))); - ItemList.Electric_Pump_UMV.set(addItem(26, "Electric Pump (UMV)", PartNotCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L))); - ItemList.Electric_Pump_UXV.set(addItem(27, "Electric Pump (UXV)", PartNotCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L))); - ItemList.Electric_Pump_MAX.set(addItem(28, "Electric Pump (MAX)", PartNotCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L))); - - GregTech_API.registerCover(ItemList.Electric_Pump_LV.get(1L), TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(32)); - GregTech_API.registerCover(ItemList.Electric_Pump_MV.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(128)); - GregTech_API.registerCover(ItemList.Electric_Pump_HV.get(1L), TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(512)); - GregTech_API.registerCover(ItemList.Electric_Pump_EV.get(1L), TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(2048)); - GregTech_API.registerCover(ItemList.Electric_Pump_IV.get(1L), TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(8192)); - GregTech_API.registerCover(ItemList.Electric_Pump_LuV.get(1L), TextureFactory.of(MACHINE_CASINGS[6][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(32768)); - GregTech_API.registerCover(ItemList.Electric_Pump_ZPM.get(1L), TextureFactory.of(MACHINE_CASINGS[7][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(131072)); - GregTech_API.registerCover(ItemList.Electric_Pump_UV.get(1L), TextureFactory.of(MACHINE_CASINGS[8][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(524288)); - GregTech_API.registerCover(ItemList.Electric_Pump_UHV.get(1L), TextureFactory.of(MACHINE_CASINGS[9][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(1048576)); - GregTech_API.registerCover(ItemList.Electric_Pump_UEV.get(1L), TextureFactory.of(MACHINE_CASINGS[10][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_Pump(2097152)); - - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_LV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_LV, 'O', OrePrefixes.ring.get(Materials.AnyRubber), 'X', OrePrefixes.rotor.get(Materials.Tin), 'S', OrePrefixes.screw.get(Materials.Tin), 'W', OrePrefixes.cableGt01.get(Materials.Tin), 'P', OrePrefixes.pipeMedium.get(Materials.Bronze)}); - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_MV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_MV, 'O', OrePrefixes.ring.get(Materials.AnyRubber), 'X', OrePrefixes.rotor.get(Materials.Bronze), 'S', OrePrefixes.screw.get(Materials.Bronze), 'W', OrePrefixes.cableGt01.get(Materials.AnyCopper), 'P', OrePrefixes.pipeMedium.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_HV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_HV, 'O', OrePrefixes.ring.get(Materials.AnyRubber), 'X', OrePrefixes.rotor.get(Materials.Steel), 'S', OrePrefixes.screw.get(Materials.Steel), 'W', OrePrefixes.cableGt01.get(Materials.Gold), 'P', OrePrefixes.pipeMedium.get(Materials.StainlessSteel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_EV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_EV, 'O', OrePrefixes.ring.get(Materials.AnyRubber), 'X', OrePrefixes.rotor.get(Materials.StainlessSteel), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'W', OrePrefixes.cableGt01.get(Materials.Aluminium), 'P', OrePrefixes.pipeMedium.get(Materials.Titanium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_IV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_IV, 'O', OrePrefixes.ring.get(Materials.AnySyntheticRubber), 'X', OrePrefixes.rotor.get(Materials.TungstenSteel), 'S', OrePrefixes.screw.get(Materials.TungstenSteel), 'W', OrePrefixes.cableGt01.get(Materials.Tungsten), 'P', OrePrefixes.pipeMedium.get(Materials.TungstenSteel)}); - - ItemList.Steam_Valve_LV.set(addItem(620, "Steam Valve (LV)", GT_Utility.formatNumbers(1024) + PartCoverText + GT_Utility.formatNumbers(1024 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L))); - ItemList.Steam_Valve_MV.set(addItem(621, "Steam Valve (MV)", GT_Utility.formatNumbers(2048) + PartCoverText + GT_Utility.formatNumbers(2048 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); - ItemList.Steam_Valve_HV.set(addItem(622, "Steam Valve (HV)", GT_Utility.formatNumbers(4096) + PartCoverText + GT_Utility.formatNumbers(4096 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L))); - ItemList.Steam_Valve_EV.set(addItem(623, "Steam Valve (EV)", GT_Utility.formatNumbers(8192) + PartCoverText + GT_Utility.formatNumbers(8192 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 8L))); - ItemList.Steam_Valve_IV.set(addItem(624, "Steam Valve (IV)", GT_Utility.formatNumbers(16384) + PartCoverText + GT_Utility.formatNumbers(16384 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 16L))); - - GregTech_API.registerCover(ItemList.Steam_Valve_LV.get(1L), TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_VALVE)), new GT_Cover_SteamValve(1024)); - GregTech_API.registerCover(ItemList.Steam_Valve_MV.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_VALVE)), new GT_Cover_SteamValve(2048)); - GregTech_API.registerCover(ItemList.Steam_Valve_HV.get(1L), TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_VALVE)), new GT_Cover_SteamValve(4096)); - GregTech_API.registerCover(ItemList.Steam_Valve_EV.get(1L), TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_VALVE)), new GT_Cover_SteamValve(8192)); - GregTech_API.registerCover(ItemList.Steam_Valve_IV.get(1L), TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_VALVE)), new GT_Cover_SteamValve(16384)); - - ItemList.FluidRegulator_LV.set(addItem(tLastID = 660, "Fluid Regulator (LV)", FRText1 + GT_Utility.formatNumbers(640) + FRText2)); - ItemList.FluidRegulator_MV.set(addItem(tLastID = 661, "Fluid Regulator (MV)", FRText1 + GT_Utility.formatNumbers(2560) + FRText2)); - ItemList.FluidRegulator_HV.set(addItem(tLastID = 662, "Fluid Regulator (HV)", FRText1 + GT_Utility.formatNumbers(10240) + FRText2)); - ItemList.FluidRegulator_EV.set(addItem(tLastID = 663, "Fluid Regulator (EV)", FRText1 + GT_Utility.formatNumbers(40960) + FRText2)); - ItemList.FluidRegulator_IV.set(addItem(tLastID = 664, "Fluid Regulator (IV)", FRText1 + GT_Utility.formatNumbers(163840) + FRText2)); - ItemList.FluidRegulator_LuV.set(addItem(tLastID = 665, "Fluid Regulator (LuV)", FRText1 + GT_Utility.formatNumbers(655360) + FRText2)); - ItemList.FluidRegulator_ZPM.set(addItem(tLastID = 666, "Fluid Regulator (ZPM)", FRText1 + GT_Utility.formatNumbers(2621440) + FRText2)); - ItemList.FluidRegulator_UV.set(addItem(tLastID = 667, "Fluid Regulator (UV)", FRText1 + GT_Utility.formatNumbers(10485760) + FRText2)); - - GregTech_API.registerCover(ItemList.FluidRegulator_LV.get(1L), TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_FluidRegulator(32)); - GregTech_API.registerCover(ItemList.FluidRegulator_MV.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_FluidRegulator(128)); - GregTech_API.registerCover(ItemList.FluidRegulator_HV.get(1L), TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_FluidRegulator(512)); - GregTech_API.registerCover(ItemList.FluidRegulator_EV.get(1L), TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_FluidRegulator(2048)); - GregTech_API.registerCover(ItemList.FluidRegulator_IV.get(1L), TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_FluidRegulator(8192)); - GregTech_API.registerCover(ItemList.FluidRegulator_LuV.get(1L), TextureFactory.of(MACHINE_CASINGS[6][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_FluidRegulator(32768)); - GregTech_API.registerCover(ItemList.FluidRegulator_ZPM.get(1L), TextureFactory.of(MACHINE_CASINGS[7][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_FluidRegulator(131072)); - GregTech_API.registerCover(ItemList.FluidRegulator_UV.get(1L), TextureFactory.of(MACHINE_CASINGS[8][0], TextureFactory.of(OVERLAY_PUMP)), new GT_Cover_FluidRegulator(524288)); - - ItemList.FluidFilter.set(addItem(669, "Fluid Filter Cover", "Set with Fluid Container to only accept one Fluid Type")); - GregTech_API.registerCover(ItemList.FluidFilter.get(1L), TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_SHUTTER)), new GT_Cover_Fluidfilter()); - ItemList.ItemFilter_Export.set(addItem(270,"Item Filter Cover (Export)", "Right click with an item to set filter (Only supports Export Mode)")); - GregTech_API.registerCover(ItemList.ItemFilter_Export.get(1L), TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_ItemFilter(true)); - ItemList.ItemFilter_Import.set(addItem(271,"Item Filter Cover (Import)", "Right click with an item to set filter (Only supports Import Mode)")); - GregTech_API.registerCover(ItemList.ItemFilter_Import.get(1L), TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_ItemFilter(false)); - ItemList.Cover_FluidLimiter.set(addItem(272, "Fluid Limiter Cover", "Limits fluid input depending on fill level")); - GregTech_API.registerCover(ItemList.Cover_FluidLimiter.get(1L), TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_SHUTTER)), new GT_Cover_FluidLimiter()); - - - - ItemList.Conveyor_Module_LV.set(addItem(630, "Conveyor Module (LV)", "1 stack every 20 secs (as Cover)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L))); - ItemList.Conveyor_Module_MV.set(addItem(631, "Conveyor Module (MV)", "1 stack every 5 secs (as Cover)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L))); - ItemList.Conveyor_Module_HV.set(addItem(632, "Conveyor Module (HV)", "1 stack every 1 sec (as Cover)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 4L))); - ItemList.Conveyor_Module_EV.set(addItem(633, "Conveyor Module (EV)", "1 stack every 1/5 sec (as Cover)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 8L))); - ItemList.Conveyor_Module_IV.set(addItem(634, "Conveyor Module (IV)", "1 stack every 1/20 sec (as Cover)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L))); - ItemList.Conveyor_Module_LuV.set(addItem(635, "Conveyor Module (LuV)", "2 stacks every 1/20 sec (as Cover)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 32L))); - ItemList.Conveyor_Module_ZPM.set(addItem(636, "Conveyor Module (ZPM)", "4 stacks every 1/20 sec (as Cover)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 64L))); - ItemList.Conveyor_Module_UV.set(addItem(637, "Conveyor Module (UV)", "8 stacks every 1/20 sec (as Cover)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 128L))); - ItemList.Conveyor_Module_UHV.set(addItem(638, "Conveyor Module (UHV)", "16 stacks every 1/20 sec (as Cover)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 256L))); - ItemList.Conveyor_Module_UEV.set(addItem(639, "Conveyor Module (UEV)", "32 stacks every 1/20 sec (as Cover)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L))); - ItemList.Conveyor_Module_UIV.set(addItem(29, "Conveyor Module (UIV)", PartNotCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L))); - ItemList.Conveyor_Module_UMV.set(addItem(30, "Conveyor Module (UMV)", PartNotCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L))); - ItemList.Conveyor_Module_UXV.set(addItem(31, "Conveyor Module (UXV)", PartNotCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L))); - ItemList.Conveyor_Module_MAX.set(addItem(32, "Conveyor Module (MAX)", PartNotCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L))); - - GT_ModHandler.addCraftingRecipe(ItemList.Conveyor_Module_LV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_LV, 'C', OrePrefixes.cableGt01.get(Materials.Tin), 'R', OrePrefixes.plate.get(Materials.AnyRubber)}); - GT_ModHandler.addCraftingRecipe(ItemList.Conveyor_Module_MV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_MV, 'C', OrePrefixes.cableGt01.get(Materials.AnyCopper), 'R', OrePrefixes.plate.get(Materials.AnyRubber)}); - GT_ModHandler.addCraftingRecipe(ItemList.Conveyor_Module_HV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_HV, 'C', OrePrefixes.cableGt01.get(Materials.Gold), 'R', OrePrefixes.plate.get(Materials.AnyRubber)}); - GT_ModHandler.addCraftingRecipe(ItemList.Conveyor_Module_EV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_EV, 'C', OrePrefixes.cableGt01.get(Materials.Aluminium), 'R', OrePrefixes.plate.get(Materials.AnyRubber)}); - GT_ModHandler.addCraftingRecipe(ItemList.Conveyor_Module_IV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_IV, 'C', OrePrefixes.cableGt01.get(Materials.Tungsten), 'R', OrePrefixes.plate.get(Materials.AnySyntheticRubber)}); - - GregTech_API.registerCover(ItemList.Conveyor_Module_LV.get(1L), TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(400, 1)); - GregTech_API.registerCover(ItemList.Conveyor_Module_MV.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(100, 1)); - GregTech_API.registerCover(ItemList.Conveyor_Module_HV.get(1L), TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(20, 1)); - GregTech_API.registerCover(ItemList.Conveyor_Module_EV.get(1L), TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(4, 1)); - GregTech_API.registerCover(ItemList.Conveyor_Module_IV.get(1L), TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(1, 1)); - GregTech_API.registerCover(ItemList.Conveyor_Module_LuV.get(1L), TextureFactory.of(MACHINE_CASINGS[6][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(1, 2)); - GregTech_API.registerCover(ItemList.Conveyor_Module_ZPM.get(1L), TextureFactory.of(MACHINE_CASINGS[7][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(1, 4)); - GregTech_API.registerCover(ItemList.Conveyor_Module_UV.get(1L), TextureFactory.of(MACHINE_CASINGS[8][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(1, 8)); - GregTech_API.registerCover(ItemList.Conveyor_Module_UHV.get(1L), TextureFactory.of(MACHINE_CASINGS[9][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(1, 16)); - GregTech_API.registerCover(ItemList.Conveyor_Module_UEV.get(1L), TextureFactory.of(MACHINE_CASINGS[10][0], TextureFactory.of(OVERLAY_CONVEYOR)), new GT_Cover_Conveyor(1, 32)); - - ItemList.Robot_Arm_LV.set(addItem(650, "Robot Arm (LV)", "1 stack every 20 secs (as Cover)/n " + RAText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L))); - ItemList.Robot_Arm_MV.set(addItem(651, "Robot Arm (MV)", "1 stack every 5 secs (as Cover)/n " + RAText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L))); - ItemList.Robot_Arm_HV.set(addItem(652, "Robot Arm (HV)", "1 stack every 1 sec (as Cover)/n " + RAText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 4L))); - ItemList.Robot_Arm_EV.set(addItem(653, "Robot Arm (EV)", "1 stack every 1/5 sec (as Cover)/n " + RAText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 8L))); - ItemList.Robot_Arm_IV.set(addItem(654, "Robot Arm (IV)", "1 stack every 1/20 sec (as Cover)/n " + RAText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 16L))); - ItemList.Robot_Arm_LuV.set(addItem(655, "Robot Arm (LuV)", PartNotCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 32L))); - ItemList.Robot_Arm_ZPM.set(addItem(656, "Robot Arm (ZPM)", PartNotCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 64L))); - ItemList.Robot_Arm_UV.set(addItem(657, "Robot Arm (UV)", PartNotCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 128L))); - ItemList.Robot_Arm_UHV.set(addItem(658, "Robot Arm (UHV)", PartNotCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 256L))); - ItemList.Robot_Arm_UEV.set(addItem(659, "Robot Arm (UEV)", PartNotCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1024L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 512L))); - ItemList.Robot_Arm_UIV.set(addItem(33, "Robot Arm (UIV)", PartNotCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1024L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 512L))); - ItemList.Robot_Arm_UMV.set(addItem(34, "Robot Arm (UMV)", PartNotCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1024L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 512L))); - ItemList.Robot_Arm_UXV.set(addItem(35, "Robot Arm (UXV)", PartNotCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1024L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 512L))); - ItemList.Robot_Arm_MAX.set(addItem(36, "Robot Arm (MAX)", PartNotCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1024L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 512L))); - - GT_ModHandler.addCraftingRecipe(ItemList.Robot_Arm_LV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.Steel), 'M', ItemList.Electric_Motor_LV, 'P', ItemList.Electric_Piston_LV, 'E', OrePrefixes.circuit.get(Materials.Basic), 'C', OrePrefixes.cableGt01.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.Robot_Arm_MV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.Aluminium), 'M', ItemList.Electric_Motor_MV, 'P', ItemList.Electric_Piston_MV, 'E', OrePrefixes.circuit.get(Materials.Good), 'C', OrePrefixes.cableGt01.get(Materials.AnyCopper)}); - GT_ModHandler.addCraftingRecipe(ItemList.Robot_Arm_HV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.StainlessSteel), 'M', ItemList.Electric_Motor_HV, 'P', ItemList.Electric_Piston_HV, 'E', OrePrefixes.circuit.get(Materials.Advanced), 'C', OrePrefixes.cableGt01.get(Materials.Gold)}); - GT_ModHandler.addCraftingRecipe(ItemList.Robot_Arm_EV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.Titanium), 'M', ItemList.Electric_Motor_EV, 'P', ItemList.Electric_Piston_EV, 'E', OrePrefixes.circuit.get(Materials.Data), 'C', OrePrefixes.cableGt01.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Robot_Arm_IV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.TungstenSteel), 'M', ItemList.Electric_Motor_IV, 'P', ItemList.Electric_Piston_IV, 'E', OrePrefixes.circuit.get(Materials.Elite), 'C', OrePrefixes.cableGt01.get(Materials.Tungsten)}); - - GregTech_API.registerCover(ItemList.Robot_Arm_LV.get(1L), TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_ARM)), new GT_Cover_Arm(400)); - GregTech_API.registerCover(ItemList.Robot_Arm_MV.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_ARM)), new GT_Cover_Arm(100)); - GregTech_API.registerCover(ItemList.Robot_Arm_HV.get(1L), TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_ARM)), new GT_Cover_Arm(20)); - GregTech_API.registerCover(ItemList.Robot_Arm_EV.get(1L), TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_ARM)), new GT_Cover_Arm(4)); - GregTech_API.registerCover(ItemList.Robot_Arm_IV.get(1L), TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_ARM)), new GT_Cover_Arm(1)); + ItemList.Electric_Motor_LV.set(addItem( + 600, + "Electric Motor (LV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L))); + ItemList.Electric_Motor_MV.set(addItem( + 601, + "Electric Motor (MV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L))); + ItemList.Electric_Motor_HV.set(addItem( + 602, + "Electric Motor (HV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 4L))); + ItemList.Electric_Motor_EV.set(addItem( + 603, + "Electric Motor (EV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 8L))); + ItemList.Electric_Motor_IV.set(addItem( + 604, + "Electric Motor (IV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L))); + ItemList.Electric_Motor_LuV.set(addItem( + 606, + "Electric Motor (LuV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 32L))); + ItemList.Electric_Motor_ZPM.set(addItem( + 607, + "Electric Motor (ZPM)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 64L))); + ItemList.Electric_Motor_UV.set(addItem( + 608, + "Electric Motor (UV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 128L))); + ItemList.Electric_Motor_UHV.set(addItem( + 596, + "Electric Motor (UHV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 256L))); + ItemList.Electric_Motor_UEV.set(addItem( + 595, + "Electric Motor (UEV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); + ItemList.Electric_Motor_UIV.set(addItem( + 17, + "Electric Motor (UIV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); + ItemList.Electric_Motor_UMV.set(addItem( + 18, + "Electric Motor (UMV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); + ItemList.Electric_Motor_UXV.set(addItem( + 19, + "Electric Motor (UXV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); + ItemList.Electric_Motor_MAX.set(addItem( + 20, + "Electric Motor (MAX)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); + + GT_ModHandler.addCraftingRecipe( + ItemList.Electric_Motor_LV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "CWR", + "WIW", + "RWC", + 'I', + OrePrefixes.stick.get(Materials.IronMagnetic), + 'R', + OrePrefixes.stick.get(Materials.AnyIron), + 'W', + OrePrefixes.wireGt01.get(Materials.AnyCopper), + 'C', + OrePrefixes.cableGt01.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Electric_Motor_LV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "CWR", + "WIW", + "RWC", + 'I', + OrePrefixes.stick.get(Materials.SteelMagnetic), + 'R', + OrePrefixes.stick.get(Materials.Steel), + 'W', + OrePrefixes.wireGt01.get(Materials.AnyCopper), + 'C', + OrePrefixes.cableGt01.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Electric_Motor_MV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "CWR", + "WIW", + "RWC", + 'I', + OrePrefixes.stick.get(Materials.SteelMagnetic), + 'R', + OrePrefixes.stick.get(Materials.Aluminium), + 'W', + OrePrefixes.wireGt02.get(Materials.Cupronickel), + 'C', + OrePrefixes.cableGt01.get(Materials.AnyCopper) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Electric_Motor_HV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "CWR", + "WIW", + "RWC", + 'I', + OrePrefixes.stick.get(Materials.SteelMagnetic), + 'R', + OrePrefixes.stick.get(Materials.StainlessSteel), + 'W', + OrePrefixes.wireGt04.get(Materials.Electrum), + 'C', + OrePrefixes.cableGt02.get(Materials.Silver) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Electric_Motor_EV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "CWR", + "WIW", + "RWC", + 'I', + OrePrefixes.stick.get(Materials.NeodymiumMagnetic), + 'R', + OrePrefixes.stick.get(Materials.Titanium), + 'W', + OrePrefixes.wireGt04.get(Materials.BlackSteel), + 'C', + OrePrefixes.cableGt02.get(Materials.Aluminium) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Electric_Motor_IV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "CWR", + "WIW", + "RWC", + 'I', + OrePrefixes.stick.get(Materials.NeodymiumMagnetic), + 'R', + OrePrefixes.stick.get(Materials.TungstenSteel), + 'W', + OrePrefixes.wireGt04.get(Materials.Graphene), + 'C', + OrePrefixes.cableGt02.get(Materials.Tungsten) + }); + + ItemList.Tesseract.set(addItem( + 415, + "Raw Tesseract", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L))); + ItemList.GigaChad.set(addItem( + 416, "Giga Chad Token", "You are worthy", new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1000L))); + ItemList.EnergisedTesseract.set(addItem( + 417, + "Energised Tesseract", + "Higher dimensional engineering", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 10L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L))); + + ItemList.Electric_Piston_LV.set(addItem( + 640, + "Electric Piston (LV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L))); + ItemList.Electric_Piston_MV.set(addItem( + 641, + "Electric Piston (MV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L))); + ItemList.Electric_Piston_HV.set(addItem( + 642, + "Electric Piston (HV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 4L))); + ItemList.Electric_Piston_EV.set(addItem( + 643, + "Electric Piston (EV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 8L))); + ItemList.Electric_Piston_IV.set(addItem( + 644, + "Electric Piston (IV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L))); + ItemList.Electric_Piston_LuV.set(addItem( + 645, + "Electric Piston (LuV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 32L))); + ItemList.Electric_Piston_ZPM.set(addItem( + 646, + "Electric Piston (ZPM)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 64L))); + ItemList.Electric_Piston_UV.set(addItem( + 647, + "Electric Piston (UV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 128L))); + ItemList.Electric_Piston_UHV.set(addItem( + 648, + "Electric Piston (UHV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 256L))); + ItemList.Electric_Piston_UEV.set(addItem( + 649, + "Electric Piston (UEV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); + ItemList.Electric_Piston_UIV.set(addItem( + 21, + "Electric Piston (UIV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); + ItemList.Electric_Piston_UMV.set(addItem( + 22, + "Electric Piston (UMV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); + ItemList.Electric_Piston_UXV.set(addItem( + 23, + "Electric Piston (UXV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); + ItemList.Electric_Piston_MAX.set(addItem( + 24, + "Electric Piston (MAX)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); + + GT_ModHandler.addCraftingRecipe( + ItemList.Electric_Piston_LV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "PPP", + "CSS", + "CMG", + 'P', + OrePrefixes.plate.get(Materials.Steel), + 'S', + OrePrefixes.stick.get(Materials.Steel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Steel), + 'M', + ItemList.Electric_Motor_LV, + 'C', + OrePrefixes.cableGt01.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Electric_Piston_MV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "PPP", + "CSS", + "CMG", + 'P', + OrePrefixes.plate.get(Materials.Aluminium), + 'S', + OrePrefixes.stick.get(Materials.Aluminium), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Aluminium), + 'M', + ItemList.Electric_Motor_MV, + 'C', + OrePrefixes.cableGt01.get(Materials.AnyCopper) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Electric_Piston_HV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "PPP", + "CSS", + "CMG", + 'P', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'S', + OrePrefixes.stick.get(Materials.StainlessSteel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), + 'M', + ItemList.Electric_Motor_HV, + 'C', + OrePrefixes.cableGt01.get(Materials.Gold) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Electric_Piston_EV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "PPP", + "CSS", + "CMG", + 'P', + OrePrefixes.plate.get(Materials.Titanium), + 'S', + OrePrefixes.stick.get(Materials.Titanium), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Titanium), + 'M', + ItemList.Electric_Motor_EV, + 'C', + OrePrefixes.cableGt01.get(Materials.Aluminium) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Electric_Piston_IV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "PPP", + "CSS", + "CMG", + 'P', + OrePrefixes.plate.get(Materials.TungstenSteel), + 'S', + OrePrefixes.stick.get(Materials.TungstenSteel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.TungstenSteel), + 'M', + ItemList.Electric_Motor_IV, + 'C', + OrePrefixes.cableGt01.get(Materials.Tungsten) + }); + + ItemList.Electric_Pump_LV.set(addItem( + 610, + "Electric Pump (LV)", + GT_Utility.formatNumbers(32) + PartCoverText + GT_Utility.formatNumbers(32 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L))); + ItemList.Electric_Pump_MV.set(addItem( + 611, + "Electric Pump (MV)", + GT_Utility.formatNumbers(128) + PartCoverText + GT_Utility.formatNumbers(128 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); + ItemList.Electric_Pump_HV.set(addItem( + 612, + "Electric Pump (HV)", + GT_Utility.formatNumbers(512) + PartCoverText + GT_Utility.formatNumbers(512 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L))); + ItemList.Electric_Pump_EV.set(addItem( + 613, + "Electric Pump (EV)", + GT_Utility.formatNumbers(2048) + PartCoverText + GT_Utility.formatNumbers(2048 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 8L))); + ItemList.Electric_Pump_IV.set(addItem( + 614, + "Electric Pump (IV)", + GT_Utility.formatNumbers(8192) + PartCoverText + GT_Utility.formatNumbers(8192 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 16L))); + ItemList.Electric_Pump_LuV.set(addItem( + 615, + "Electric Pump (LuV)", + GT_Utility.formatNumbers(32768) + PartCoverText + GT_Utility.formatNumbers(32768 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 32L))); + ItemList.Electric_Pump_ZPM.set(addItem( + 616, + "Electric Pump (ZPM)", + GT_Utility.formatNumbers(131072) + + PartCoverText + + GT_Utility.formatNumbers(131072 * 20) + + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 64L))); + ItemList.Electric_Pump_UV.set(addItem( + 617, + "Electric Pump (UV)", + GT_Utility.formatNumbers(524288) + + PartCoverText + + GT_Utility.formatNumbers(524288 * 20) + + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 128L))); + ItemList.Electric_Pump_UHV.set(addItem( + 618, + "Electric Pump (UHV)", + GT_Utility.formatNumbers(1048576) + + PartCoverText + + GT_Utility.formatNumbers(1048576 * 20) + + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 256L))); + ItemList.Electric_Pump_UEV.set(addItem( + 619, + "Electric Pump (UEV)", + GT_Utility.formatNumbers(2097152) + + PartCoverText + + GT_Utility.formatNumbers(2097152 * 20) + + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L))); + ItemList.Electric_Pump_UIV.set(addItem( + 25, + "Electric Pump (UIV)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L))); + ItemList.Electric_Pump_UMV.set(addItem( + 26, + "Electric Pump (UMV)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L))); + ItemList.Electric_Pump_UXV.set(addItem( + 27, + "Electric Pump (UXV)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L))); + ItemList.Electric_Pump_MAX.set(addItem( + 28, + "Electric Pump (MAX)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L))); + + GregTech_API.registerCover( + ItemList.Electric_Pump_LV.get(1L), + TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_Pump(32)); + GregTech_API.registerCover( + ItemList.Electric_Pump_MV.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_Pump(128)); + GregTech_API.registerCover( + ItemList.Electric_Pump_HV.get(1L), + TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_Pump(512)); + GregTech_API.registerCover( + ItemList.Electric_Pump_EV.get(1L), + TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_Pump(2048)); + GregTech_API.registerCover( + ItemList.Electric_Pump_IV.get(1L), + TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_Pump(8192)); + GregTech_API.registerCover( + ItemList.Electric_Pump_LuV.get(1L), + TextureFactory.of(MACHINE_CASINGS[6][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_Pump(32768)); + GregTech_API.registerCover( + ItemList.Electric_Pump_ZPM.get(1L), + TextureFactory.of(MACHINE_CASINGS[7][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_Pump(131072)); + GregTech_API.registerCover( + ItemList.Electric_Pump_UV.get(1L), + TextureFactory.of(MACHINE_CASINGS[8][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_Pump(524288)); + GregTech_API.registerCover( + ItemList.Electric_Pump_UHV.get(1L), + TextureFactory.of(MACHINE_CASINGS[9][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_Pump(1048576)); + GregTech_API.registerCover( + ItemList.Electric_Pump_UEV.get(1L), + TextureFactory.of(MACHINE_CASINGS[10][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_Pump(2097152)); + + GT_ModHandler.addCraftingRecipe( + ItemList.Electric_Pump_LV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "SXO", + "dPw", + "OMW", + 'M', + ItemList.Electric_Motor_LV, + 'O', + OrePrefixes.ring.get(Materials.AnyRubber), + 'X', + OrePrefixes.rotor.get(Materials.Tin), + 'S', + OrePrefixes.screw.get(Materials.Tin), + 'W', + OrePrefixes.cableGt01.get(Materials.Tin), + 'P', + OrePrefixes.pipeMedium.get(Materials.Bronze) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Electric_Pump_MV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "SXO", + "dPw", + "OMW", + 'M', + ItemList.Electric_Motor_MV, + 'O', + OrePrefixes.ring.get(Materials.AnyRubber), + 'X', + OrePrefixes.rotor.get(Materials.Bronze), + 'S', + OrePrefixes.screw.get(Materials.Bronze), + 'W', + OrePrefixes.cableGt01.get(Materials.AnyCopper), + 'P', + OrePrefixes.pipeMedium.get(Materials.Steel) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Electric_Pump_HV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "SXO", + "dPw", + "OMW", + 'M', + ItemList.Electric_Motor_HV, + 'O', + OrePrefixes.ring.get(Materials.AnyRubber), + 'X', + OrePrefixes.rotor.get(Materials.Steel), + 'S', + OrePrefixes.screw.get(Materials.Steel), + 'W', + OrePrefixes.cableGt01.get(Materials.Gold), + 'P', + OrePrefixes.pipeMedium.get(Materials.StainlessSteel) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Electric_Pump_EV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "SXO", + "dPw", + "OMW", + 'M', + ItemList.Electric_Motor_EV, + 'O', + OrePrefixes.ring.get(Materials.AnyRubber), + 'X', + OrePrefixes.rotor.get(Materials.StainlessSteel), + 'S', + OrePrefixes.screw.get(Materials.StainlessSteel), + 'W', + OrePrefixes.cableGt01.get(Materials.Aluminium), + 'P', + OrePrefixes.pipeMedium.get(Materials.Titanium) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Electric_Pump_IV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "SXO", + "dPw", + "OMW", + 'M', + ItemList.Electric_Motor_IV, + 'O', + OrePrefixes.ring.get(Materials.AnySyntheticRubber), + 'X', + OrePrefixes.rotor.get(Materials.TungstenSteel), + 'S', + OrePrefixes.screw.get(Materials.TungstenSteel), + 'W', + OrePrefixes.cableGt01.get(Materials.Tungsten), + 'P', + OrePrefixes.pipeMedium.get(Materials.TungstenSteel) + }); + + ItemList.Steam_Valve_LV.set(addItem( + 620, + "Steam Valve (LV)", + GT_Utility.formatNumbers(1024) + PartCoverText + GT_Utility.formatNumbers(1024 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L))); + ItemList.Steam_Valve_MV.set(addItem( + 621, + "Steam Valve (MV)", + GT_Utility.formatNumbers(2048) + PartCoverText + GT_Utility.formatNumbers(2048 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); + ItemList.Steam_Valve_HV.set(addItem( + 622, + "Steam Valve (HV)", + GT_Utility.formatNumbers(4096) + PartCoverText + GT_Utility.formatNumbers(4096 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L))); + ItemList.Steam_Valve_EV.set(addItem( + 623, + "Steam Valve (EV)", + GT_Utility.formatNumbers(8192) + PartCoverText + GT_Utility.formatNumbers(8192 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 8L))); + ItemList.Steam_Valve_IV.set(addItem( + 624, + "Steam Valve (IV)", + GT_Utility.formatNumbers(16384) + PartCoverText + GT_Utility.formatNumbers(16384 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 16L))); + + GregTech_API.registerCover( + ItemList.Steam_Valve_LV.get(1L), + TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_VALVE)), + new GT_Cover_SteamValve(1024)); + GregTech_API.registerCover( + ItemList.Steam_Valve_MV.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_VALVE)), + new GT_Cover_SteamValve(2048)); + GregTech_API.registerCover( + ItemList.Steam_Valve_HV.get(1L), + TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_VALVE)), + new GT_Cover_SteamValve(4096)); + GregTech_API.registerCover( + ItemList.Steam_Valve_EV.get(1L), + TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_VALVE)), + new GT_Cover_SteamValve(8192)); + GregTech_API.registerCover( + ItemList.Steam_Valve_IV.get(1L), + TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_VALVE)), + new GT_Cover_SteamValve(16384)); + + ItemList.FluidRegulator_LV.set( + addItem(tLastID = 660, "Fluid Regulator (LV)", FRText1 + GT_Utility.formatNumbers(640) + FRText2)); + ItemList.FluidRegulator_MV.set( + addItem(tLastID = 661, "Fluid Regulator (MV)", FRText1 + GT_Utility.formatNumbers(2560) + FRText2)); + ItemList.FluidRegulator_HV.set( + addItem(tLastID = 662, "Fluid Regulator (HV)", FRText1 + GT_Utility.formatNumbers(10240) + FRText2)); + ItemList.FluidRegulator_EV.set( + addItem(tLastID = 663, "Fluid Regulator (EV)", FRText1 + GT_Utility.formatNumbers(40960) + FRText2)); + ItemList.FluidRegulator_IV.set( + addItem(tLastID = 664, "Fluid Regulator (IV)", FRText1 + GT_Utility.formatNumbers(163840) + FRText2)); + ItemList.FluidRegulator_LuV.set( + addItem(tLastID = 665, "Fluid Regulator (LuV)", FRText1 + GT_Utility.formatNumbers(655360) + FRText2)); + ItemList.FluidRegulator_ZPM.set( + addItem(tLastID = 666, "Fluid Regulator (ZPM)", FRText1 + GT_Utility.formatNumbers(2621440) + FRText2)); + ItemList.FluidRegulator_UV.set( + addItem(tLastID = 667, "Fluid Regulator (UV)", FRText1 + GT_Utility.formatNumbers(10485760) + FRText2)); + + GregTech_API.registerCover( + ItemList.FluidRegulator_LV.get(1L), + TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_FluidRegulator(32)); + GregTech_API.registerCover( + ItemList.FluidRegulator_MV.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_FluidRegulator(128)); + GregTech_API.registerCover( + ItemList.FluidRegulator_HV.get(1L), + TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_FluidRegulator(512)); + GregTech_API.registerCover( + ItemList.FluidRegulator_EV.get(1L), + TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_FluidRegulator(2048)); + GregTech_API.registerCover( + ItemList.FluidRegulator_IV.get(1L), + TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_FluidRegulator(8192)); + GregTech_API.registerCover( + ItemList.FluidRegulator_LuV.get(1L), + TextureFactory.of(MACHINE_CASINGS[6][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_FluidRegulator(32768)); + GregTech_API.registerCover( + ItemList.FluidRegulator_ZPM.get(1L), + TextureFactory.of(MACHINE_CASINGS[7][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_FluidRegulator(131072)); + GregTech_API.registerCover( + ItemList.FluidRegulator_UV.get(1L), + TextureFactory.of(MACHINE_CASINGS[8][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_FluidRegulator(524288)); + + ItemList.FluidFilter.set( + addItem(669, "Fluid Filter Cover", "Set with Fluid Container to only accept one Fluid Type")); + GregTech_API.registerCover( + ItemList.FluidFilter.get(1L), + TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_SHUTTER)), + new GT_Cover_Fluidfilter()); + ItemList.ItemFilter_Export.set(addItem( + 270, + "Item Filter Cover (Export)", + "Right click with an item to set filter (Only supports Export Mode)")); + GregTech_API.registerCover( + ItemList.ItemFilter_Export.get(1L), + TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_CONVEYOR)), + new GT_Cover_ItemFilter(true)); + ItemList.ItemFilter_Import.set(addItem( + 271, + "Item Filter Cover (Import)", + "Right click with an item to set filter (Only supports Import Mode)")); + GregTech_API.registerCover( + ItemList.ItemFilter_Import.get(1L), + TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_CONVEYOR)), + new GT_Cover_ItemFilter(false)); + ItemList.Cover_FluidLimiter.set( + addItem(272, "Fluid Limiter Cover", "Limits fluid input depending on fill level")); + GregTech_API.registerCover( + ItemList.Cover_FluidLimiter.get(1L), + TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_SHUTTER)), + new GT_Cover_FluidLimiter()); + + ItemList.Conveyor_Module_LV.set(addItem( + 630, + "Conveyor Module (LV)", + "1 stack every 20 secs (as Cover)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L))); + ItemList.Conveyor_Module_MV.set(addItem( + 631, + "Conveyor Module (MV)", + "1 stack every 5 secs (as Cover)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L))); + ItemList.Conveyor_Module_HV.set(addItem( + 632, + "Conveyor Module (HV)", + "1 stack every 1 sec (as Cover)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 4L))); + ItemList.Conveyor_Module_EV.set(addItem( + 633, + "Conveyor Module (EV)", + "1 stack every 1/5 sec (as Cover)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 8L))); + ItemList.Conveyor_Module_IV.set(addItem( + 634, + "Conveyor Module (IV)", + "1 stack every 1/20 sec (as Cover)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L))); + ItemList.Conveyor_Module_LuV.set(addItem( + 635, + "Conveyor Module (LuV)", + "2 stacks every 1/20 sec (as Cover)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 32L))); + ItemList.Conveyor_Module_ZPM.set(addItem( + 636, + "Conveyor Module (ZPM)", + "4 stacks every 1/20 sec (as Cover)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 64L))); + ItemList.Conveyor_Module_UV.set(addItem( + 637, + "Conveyor Module (UV)", + "8 stacks every 1/20 sec (as Cover)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 128L))); + ItemList.Conveyor_Module_UHV.set(addItem( + 638, + "Conveyor Module (UHV)", + "16 stacks every 1/20 sec (as Cover)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 256L))); + ItemList.Conveyor_Module_UEV.set(addItem( + 639, + "Conveyor Module (UEV)", + "32 stacks every 1/20 sec (as Cover)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L))); + ItemList.Conveyor_Module_UIV.set(addItem( + 29, + "Conveyor Module (UIV)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L))); + ItemList.Conveyor_Module_UMV.set(addItem( + 30, + "Conveyor Module (UMV)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L))); + ItemList.Conveyor_Module_UXV.set(addItem( + 31, + "Conveyor Module (UXV)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L))); + ItemList.Conveyor_Module_MAX.set(addItem( + 32, + "Conveyor Module (MAX)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L))); + + GT_ModHandler.addCraftingRecipe( + ItemList.Conveyor_Module_LV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "RRR", + "MCM", + "RRR", + 'M', + ItemList.Electric_Motor_LV, + 'C', + OrePrefixes.cableGt01.get(Materials.Tin), + 'R', + OrePrefixes.plate.get(Materials.AnyRubber) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Conveyor_Module_MV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "RRR", + "MCM", + "RRR", + 'M', + ItemList.Electric_Motor_MV, + 'C', + OrePrefixes.cableGt01.get(Materials.AnyCopper), + 'R', + OrePrefixes.plate.get(Materials.AnyRubber) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Conveyor_Module_HV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "RRR", + "MCM", + "RRR", + 'M', + ItemList.Electric_Motor_HV, + 'C', + OrePrefixes.cableGt01.get(Materials.Gold), + 'R', + OrePrefixes.plate.get(Materials.AnyRubber) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Conveyor_Module_EV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "RRR", + "MCM", + "RRR", + 'M', + ItemList.Electric_Motor_EV, + 'C', + OrePrefixes.cableGt01.get(Materials.Aluminium), + 'R', + OrePrefixes.plate.get(Materials.AnyRubber) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Conveyor_Module_IV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "RRR", + "MCM", + "RRR", + 'M', + ItemList.Electric_Motor_IV, + 'C', + OrePrefixes.cableGt01.get(Materials.Tungsten), + 'R', + OrePrefixes.plate.get(Materials.AnySyntheticRubber) + }); + + GregTech_API.registerCover( + ItemList.Conveyor_Module_LV.get(1L), + TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_CONVEYOR)), + new GT_Cover_Conveyor(400, 1)); + GregTech_API.registerCover( + ItemList.Conveyor_Module_MV.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_CONVEYOR)), + new GT_Cover_Conveyor(100, 1)); + GregTech_API.registerCover( + ItemList.Conveyor_Module_HV.get(1L), + TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_CONVEYOR)), + new GT_Cover_Conveyor(20, 1)); + GregTech_API.registerCover( + ItemList.Conveyor_Module_EV.get(1L), + TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_CONVEYOR)), + new GT_Cover_Conveyor(4, 1)); + GregTech_API.registerCover( + ItemList.Conveyor_Module_IV.get(1L), + TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_CONVEYOR)), + new GT_Cover_Conveyor(1, 1)); + GregTech_API.registerCover( + ItemList.Conveyor_Module_LuV.get(1L), + TextureFactory.of(MACHINE_CASINGS[6][0], TextureFactory.of(OVERLAY_CONVEYOR)), + new GT_Cover_Conveyor(1, 2)); + GregTech_API.registerCover( + ItemList.Conveyor_Module_ZPM.get(1L), + TextureFactory.of(MACHINE_CASINGS[7][0], TextureFactory.of(OVERLAY_CONVEYOR)), + new GT_Cover_Conveyor(1, 4)); + GregTech_API.registerCover( + ItemList.Conveyor_Module_UV.get(1L), + TextureFactory.of(MACHINE_CASINGS[8][0], TextureFactory.of(OVERLAY_CONVEYOR)), + new GT_Cover_Conveyor(1, 8)); + GregTech_API.registerCover( + ItemList.Conveyor_Module_UHV.get(1L), + TextureFactory.of(MACHINE_CASINGS[9][0], TextureFactory.of(OVERLAY_CONVEYOR)), + new GT_Cover_Conveyor(1, 16)); + GregTech_API.registerCover( + ItemList.Conveyor_Module_UEV.get(1L), + TextureFactory.of(MACHINE_CASINGS[10][0], TextureFactory.of(OVERLAY_CONVEYOR)), + new GT_Cover_Conveyor(1, 32)); + + ItemList.Robot_Arm_LV.set(addItem( + 650, + "Robot Arm (LV)", + "1 stack every 20 secs (as Cover)/n " + RAText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L))); + ItemList.Robot_Arm_MV.set(addItem( + 651, + "Robot Arm (MV)", + "1 stack every 5 secs (as Cover)/n " + RAText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L))); + ItemList.Robot_Arm_HV.set(addItem( + 652, + "Robot Arm (HV)", + "1 stack every 1 sec (as Cover)/n " + RAText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 4L))); + ItemList.Robot_Arm_EV.set(addItem( + 653, + "Robot Arm (EV)", + "1 stack every 1/5 sec (as Cover)/n " + RAText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 8L))); + ItemList.Robot_Arm_IV.set(addItem( + 654, + "Robot Arm (IV)", + "1 stack every 1/20 sec (as Cover)/n " + RAText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 16L))); + ItemList.Robot_Arm_LuV.set(addItem( + 655, + "Robot Arm (LuV)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 32L))); + ItemList.Robot_Arm_ZPM.set(addItem( + 656, + "Robot Arm (ZPM)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 64L))); + ItemList.Robot_Arm_UV.set(addItem( + 657, + "Robot Arm (UV)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 128L))); + ItemList.Robot_Arm_UHV.set(addItem( + 658, + "Robot Arm (UHV)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 256L))); + ItemList.Robot_Arm_UEV.set(addItem( + 659, + "Robot Arm (UEV)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1024L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 512L))); + ItemList.Robot_Arm_UIV.set(addItem( + 33, + "Robot Arm (UIV)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1024L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 512L))); + ItemList.Robot_Arm_UMV.set(addItem( + 34, + "Robot Arm (UMV)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1024L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 512L))); + ItemList.Robot_Arm_UXV.set(addItem( + 35, + "Robot Arm (UXV)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1024L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 512L))); + ItemList.Robot_Arm_MAX.set(addItem( + 36, + "Robot Arm (MAX)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1024L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 512L))); + + GT_ModHandler.addCraftingRecipe( + ItemList.Robot_Arm_LV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "CCC", + "MSM", + "PES", + 'S', + OrePrefixes.stick.get(Materials.Steel), + 'M', + ItemList.Electric_Motor_LV, + 'P', + ItemList.Electric_Piston_LV, + 'E', + OrePrefixes.circuit.get(Materials.Basic), + 'C', + OrePrefixes.cableGt01.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Robot_Arm_MV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "CCC", + "MSM", + "PES", + 'S', + OrePrefixes.stick.get(Materials.Aluminium), + 'M', + ItemList.Electric_Motor_MV, + 'P', + ItemList.Electric_Piston_MV, + 'E', + OrePrefixes.circuit.get(Materials.Good), + 'C', + OrePrefixes.cableGt01.get(Materials.AnyCopper) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Robot_Arm_HV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "CCC", + "MSM", + "PES", + 'S', + OrePrefixes.stick.get(Materials.StainlessSteel), + 'M', + ItemList.Electric_Motor_HV, + 'P', + ItemList.Electric_Piston_HV, + 'E', + OrePrefixes.circuit.get(Materials.Advanced), + 'C', + OrePrefixes.cableGt01.get(Materials.Gold) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Robot_Arm_EV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "CCC", + "MSM", + "PES", + 'S', + OrePrefixes.stick.get(Materials.Titanium), + 'M', + ItemList.Electric_Motor_EV, + 'P', + ItemList.Electric_Piston_EV, + 'E', + OrePrefixes.circuit.get(Materials.Data), + 'C', + OrePrefixes.cableGt01.get(Materials.Aluminium) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Robot_Arm_IV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "CCC", + "MSM", + "PES", + 'S', + OrePrefixes.stick.get(Materials.TungstenSteel), + 'M', + ItemList.Electric_Motor_IV, + 'P', + ItemList.Electric_Piston_IV, + 'E', + OrePrefixes.circuit.get(Materials.Elite), + 'C', + OrePrefixes.cableGt01.get(Materials.Tungsten) + }); + + GregTech_API.registerCover( + ItemList.Robot_Arm_LV.get(1L), + TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_ARM)), + new GT_Cover_Arm(400)); + GregTech_API.registerCover( + ItemList.Robot_Arm_MV.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_ARM)), + new GT_Cover_Arm(100)); + GregTech_API.registerCover( + ItemList.Robot_Arm_HV.get(1L), + TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_ARM)), + new GT_Cover_Arm(20)); + GregTech_API.registerCover( + ItemList.Robot_Arm_EV.get(1L), + TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_ARM)), + new GT_Cover_Arm(4)); + GregTech_API.registerCover( + ItemList.Robot_Arm_IV.get(1L), + TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_ARM)), + new GT_Cover_Arm(1)); ItemList.QuantumEye.set(addItem(tLastID = 724, "Quantum Eye", "Improved Ender Eye")); ItemList.QuantumStar.set(addItem(tLastID = 725, "Quantum Star", "Improved Nether Star")); ItemList.Gravistar.set(addItem(tLastID = 726, "Gravi Star", "Ultimate Nether Star")); - ItemList.Emitter_LV.set(addItem(680, "Emitter (LV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 1L))); - ItemList.Emitter_MV.set(addItem(681, "Emitter (MV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 2L))); - ItemList.Emitter_HV.set(addItem(682, "Emitter (HV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 4L))); - ItemList.Emitter_EV.set(addItem(683, "Emitter (EV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 8L))); - ItemList.Emitter_IV.set(addItem(684, "Emitter (IV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 16L))); - ItemList.Emitter_LuV.set(addItem(685, "Emitter (LuV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 32L))); - ItemList.Emitter_ZPM.set(addItem(686, "Emitter (ZPM)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 64L))); - ItemList.Emitter_UV.set(addItem(687, "Emitter (UV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 128L))); - ItemList.Emitter_UHV.set(addItem(688, "Emitter (UHV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 256L))); - ItemList.Emitter_UEV.set(addItem(689, "Emitter (UEV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 512L))); - ItemList.Emitter_UIV.set(addItem(37, "Emitter (UIV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 512L))); - ItemList.Emitter_UMV.set(addItem(38, "Emitter (UMV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 512L))); - ItemList.Emitter_UXV.set(addItem(39, "Emitter (UXV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 512L))); - ItemList.Emitter_MAX.set(addItem(40, "Emitter (MAX)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 512L))); - - GT_ModHandler.addCraftingRecipe(ItemList.Emitter_LV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", 'Q', OrePrefixes.gem.get(Materials.CertusQuartz), 'S', OrePrefixes.stick.get(Materials.Brass), 'C', OrePrefixes.circuit.get(Materials.Basic), 'W', OrePrefixes.cableGt01.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.Emitter_MV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", 'Q', OrePrefixes.gem.get(Materials.EnderPearl), 'S', OrePrefixes.stick.get(Materials.Electrum), 'C', OrePrefixes.circuit.get(Materials.Good), 'W', OrePrefixes.cableGt01.get(Materials.AnyCopper)}); - GT_ModHandler.addCraftingRecipe(ItemList.Emitter_HV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", 'Q', OrePrefixes.gem.get(Materials.EnderEye), 'S', OrePrefixes.stick.get(Materials.Chrome), 'C', OrePrefixes.circuit.get(Materials.Advanced), 'W', OrePrefixes.cableGt01.get(Materials.Gold)}); - GT_ModHandler.addCraftingRecipe(ItemList.Emitter_EV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", 'Q', ItemList.QuantumEye, 'S', OrePrefixes.stick.get(Materials.Platinum), 'C', OrePrefixes.circuit.get(Materials.Data), 'W', OrePrefixes.cableGt01.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Emitter_IV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", 'Q', ItemList.QuantumStar, 'S', OrePrefixes.stick.get(Materials.Iridium), 'C', OrePrefixes.circuit.get(Materials.Elite), 'W', OrePrefixes.cableGt01.get(Materials.Tungsten)}); - - ItemList.Sensor_LV.set(addItem(690, "Sensor (LV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L))); - ItemList.Sensor_MV.set(addItem(691, "Sensor (MV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L))); - ItemList.Sensor_HV.set(addItem(692, "Sensor (HV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 4L))); - ItemList.Sensor_EV.set(addItem(693, "Sensor (EV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 8L))); - ItemList.Sensor_IV.set(addItem(694, "Sensor (IV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 16L))); - ItemList.Sensor_LuV.set(addItem(695, "Sensor (LuV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 32L))); - ItemList.Sensor_ZPM.set(addItem(696, "Sensor (ZPM)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 64L))); - ItemList.Sensor_UV.set(addItem(697, "Sensor (UV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 128L))); - ItemList.Sensor_UHV.set(addItem(698, "Sensor (UHV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 256L))); - ItemList.Sensor_UEV.set(addItem(699, "Sensor (UEV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 512L))); - ItemList.Sensor_UIV.set(addItem(41, "Sensor (UIV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 512L))); - ItemList.Sensor_UMV.set(addItem(42, "Sensor (UMV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 512L))); - ItemList.Sensor_UXV.set(addItem(43, "Sensor (UXV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 512L))); - ItemList.Sensor_MAX.set(addItem(44, "Sensor (MAX)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 512L))); - - GT_ModHandler.addCraftingRecipe(ItemList.Sensor_LV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', OrePrefixes.gem.get(Materials.CertusQuartz), 'S', OrePrefixes.stick.get(Materials.Brass), 'P', OrePrefixes.plate.get(Materials.Steel), 'C', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Sensor_MV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', OrePrefixes.gemFlawless.get(Materials.Emerald), 'S', OrePrefixes.stick.get(Materials.Electrum), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'C', OrePrefixes.circuit.get(Materials.Good)}); - GT_ModHandler.addCraftingRecipe(ItemList.Sensor_HV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', OrePrefixes.gem.get(Materials.EnderEye), 'S', OrePrefixes.stick.get(Materials.Chrome), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'C', OrePrefixes.circuit.get(Materials.Advanced)}); - GT_ModHandler.addCraftingRecipe(ItemList.Sensor_EV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', ItemList.QuantumEye, 'S', OrePrefixes.stick.get(Materials.Platinum), 'P', OrePrefixes.plate.get(Materials.Titanium), 'C', OrePrefixes.circuit.get(Materials.Data)}); - GT_ModHandler.addCraftingRecipe(ItemList.Sensor_IV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', ItemList.QuantumStar, 'S', OrePrefixes.stick.get(Materials.Iridium), 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'C', OrePrefixes.circuit.get(Materials.Elite)}); - - ItemList.Field_Generator_LV.set(addItem(670, "Field Generator (LV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 1L))); - ItemList.Field_Generator_MV.set(addItem(671, "Field Generator (MV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 2L))); - ItemList.Field_Generator_HV.set(addItem(672, "Field Generator (HV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 4L))); - ItemList.Field_Generator_EV.set(addItem(673, "Field Generator (EV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 8L))); - ItemList.Field_Generator_IV.set(addItem(674, "Field Generator (IV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 16L))); - ItemList.Field_Generator_LuV.set(addItem(675, "Field Generator (LuV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 32L))); - ItemList.Field_Generator_ZPM.set(addItem(676, "Field Generator (ZPM)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 64L))); - ItemList.Field_Generator_UV.set(addItem(677, "Field Generator (UV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 128L))); - ItemList.Field_Generator_UHV.set(addItem(678, "Field Generator (UHV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 256L))); - ItemList.Field_Generator_UEV.set(addItem(679, "Field Generator (UEV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1024L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 512L))); - ItemList.Field_Generator_UIV.set(addItem(45, "Field Generator (UIV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1024L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 512L))); - ItemList.Field_Generator_UMV.set(addItem(46, "Field Generator (UMV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1024L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 512L))); - ItemList.Field_Generator_UXV.set(addItem(47, "Field Generator (UXV)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1024L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 512L))); - ItemList.Field_Generator_MAX.set(addItem(48, "Field Generator (MAX)", "", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1024L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 512L))); + ItemList.Emitter_LV.set(addItem( + 680, + "Emitter (LV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 1L))); + ItemList.Emitter_MV.set(addItem( + 681, + "Emitter (MV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 2L))); + ItemList.Emitter_HV.set(addItem( + 682, + "Emitter (HV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 4L))); + ItemList.Emitter_EV.set(addItem( + 683, + "Emitter (EV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 8L))); + ItemList.Emitter_IV.set(addItem( + 684, + "Emitter (IV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 16L))); + ItemList.Emitter_LuV.set(addItem( + 685, + "Emitter (LuV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 32L))); + ItemList.Emitter_ZPM.set(addItem( + 686, + "Emitter (ZPM)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 64L))); + ItemList.Emitter_UV.set(addItem( + 687, + "Emitter (UV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 128L))); + ItemList.Emitter_UHV.set(addItem( + 688, + "Emitter (UHV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 256L))); + ItemList.Emitter_UEV.set(addItem( + 689, + "Emitter (UEV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 512L))); + ItemList.Emitter_UIV.set(addItem( + 37, + "Emitter (UIV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 512L))); + ItemList.Emitter_UMV.set(addItem( + 38, + "Emitter (UMV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 512L))); + ItemList.Emitter_UXV.set(addItem( + 39, + "Emitter (UXV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 512L))); + ItemList.Emitter_MAX.set(addItem( + 40, + "Emitter (MAX)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 512L))); + + GT_ModHandler.addCraftingRecipe( + ItemList.Emitter_LV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "SSC", + "WQS", + "CWS", + 'Q', + OrePrefixes.gem.get(Materials.CertusQuartz), + 'S', + OrePrefixes.stick.get(Materials.Brass), + 'C', + OrePrefixes.circuit.get(Materials.Basic), + 'W', + OrePrefixes.cableGt01.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Emitter_MV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "SSC", + "WQS", + "CWS", + 'Q', + OrePrefixes.gem.get(Materials.EnderPearl), + 'S', + OrePrefixes.stick.get(Materials.Electrum), + 'C', + OrePrefixes.circuit.get(Materials.Good), + 'W', + OrePrefixes.cableGt01.get(Materials.AnyCopper) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Emitter_HV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "SSC", + "WQS", + "CWS", + 'Q', + OrePrefixes.gem.get(Materials.EnderEye), + 'S', + OrePrefixes.stick.get(Materials.Chrome), + 'C', + OrePrefixes.circuit.get(Materials.Advanced), + 'W', + OrePrefixes.cableGt01.get(Materials.Gold) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Emitter_EV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "SSC", + "WQS", + "CWS", + 'Q', + ItemList.QuantumEye, + 'S', + OrePrefixes.stick.get(Materials.Platinum), + 'C', + OrePrefixes.circuit.get(Materials.Data), + 'W', + OrePrefixes.cableGt01.get(Materials.Aluminium) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Emitter_IV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "SSC", + "WQS", + "CWS", + 'Q', + ItemList.QuantumStar, + 'S', + OrePrefixes.stick.get(Materials.Iridium), + 'C', + OrePrefixes.circuit.get(Materials.Elite), + 'W', + OrePrefixes.cableGt01.get(Materials.Tungsten) + }); + + ItemList.Sensor_LV.set(addItem( + 690, + "Sensor (LV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L))); + ItemList.Sensor_MV.set(addItem( + 691, + "Sensor (MV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L))); + ItemList.Sensor_HV.set(addItem( + 692, + "Sensor (HV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 4L))); + ItemList.Sensor_EV.set(addItem( + 693, + "Sensor (EV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 8L))); + ItemList.Sensor_IV.set(addItem( + 694, + "Sensor (IV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 16L))); + ItemList.Sensor_LuV.set(addItem( + 695, + "Sensor (LuV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 32L))); + ItemList.Sensor_ZPM.set(addItem( + 696, + "Sensor (ZPM)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 64L))); + ItemList.Sensor_UV.set(addItem( + 697, + "Sensor (UV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 128L))); + ItemList.Sensor_UHV.set(addItem( + 698, + "Sensor (UHV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 256L))); + ItemList.Sensor_UEV.set(addItem( + 699, + "Sensor (UEV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 512L))); + ItemList.Sensor_UIV.set(addItem( + 41, + "Sensor (UIV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 512L))); + ItemList.Sensor_UMV.set(addItem( + 42, + "Sensor (UMV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 512L))); + ItemList.Sensor_UXV.set(addItem( + 43, + "Sensor (UXV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 512L))); + ItemList.Sensor_MAX.set(addItem( + 44, + "Sensor (MAX)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 512L))); + + GT_ModHandler.addCraftingRecipe( + ItemList.Sensor_LV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "P Q", + "PS ", + "CPP", + 'Q', + OrePrefixes.gem.get(Materials.CertusQuartz), + 'S', + OrePrefixes.stick.get(Materials.Brass), + 'P', + OrePrefixes.plate.get(Materials.Steel), + 'C', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Sensor_MV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "P Q", + "PS ", + "CPP", + 'Q', + OrePrefixes.gemFlawless.get(Materials.Emerald), + 'S', + OrePrefixes.stick.get(Materials.Electrum), + 'P', + OrePrefixes.plate.get(Materials.Aluminium), + 'C', + OrePrefixes.circuit.get(Materials.Good) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Sensor_HV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "P Q", + "PS ", + "CPP", + 'Q', + OrePrefixes.gem.get(Materials.EnderEye), + 'S', + OrePrefixes.stick.get(Materials.Chrome), + 'P', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'C', + OrePrefixes.circuit.get(Materials.Advanced) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Sensor_EV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "P Q", + "PS ", + "CPP", + 'Q', + ItemList.QuantumEye, + 'S', + OrePrefixes.stick.get(Materials.Platinum), + 'P', + OrePrefixes.plate.get(Materials.Titanium), + 'C', + OrePrefixes.circuit.get(Materials.Data) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Sensor_IV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "P Q", + "PS ", + "CPP", + 'Q', + ItemList.QuantumStar, + 'S', + OrePrefixes.stick.get(Materials.Iridium), + 'P', + OrePrefixes.plate.get(Materials.TungstenSteel), + 'C', + OrePrefixes.circuit.get(Materials.Elite) + }); + + ItemList.Field_Generator_LV.set(addItem( + 670, + "Field Generator (LV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 1L))); + ItemList.Field_Generator_MV.set(addItem( + 671, + "Field Generator (MV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 2L))); + ItemList.Field_Generator_HV.set(addItem( + 672, + "Field Generator (HV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 4L))); + ItemList.Field_Generator_EV.set(addItem( + 673, + "Field Generator (EV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 8L))); + ItemList.Field_Generator_IV.set(addItem( + 674, + "Field Generator (IV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 16L))); + ItemList.Field_Generator_LuV.set(addItem( + 675, + "Field Generator (LuV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 32L))); + ItemList.Field_Generator_ZPM.set(addItem( + 676, + "Field Generator (ZPM)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 64L))); + ItemList.Field_Generator_UV.set(addItem( + 677, + "Field Generator (UV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 128L))); + ItemList.Field_Generator_UHV.set(addItem( + 678, + "Field Generator (UHV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 256L))); + ItemList.Field_Generator_UEV.set(addItem( + 679, + "Field Generator (UEV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1024L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 512L))); + ItemList.Field_Generator_UIV.set(addItem( + 45, + "Field Generator (UIV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1024L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 512L))); + ItemList.Field_Generator_UMV.set(addItem( + 46, + "Field Generator (UMV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1024L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 512L))); + ItemList.Field_Generator_UXV.set(addItem( + 47, + "Field Generator (UXV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1024L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 512L))); + ItemList.Field_Generator_MAX.set(addItem( + 48, + "Field Generator (MAX)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1024L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 512L))); // Circuits ULV - LuV. - ItemList.Circuit_Primitive.set(addItem(tLastID = 700, "Vacuum Tube", "A very simple Circuit", OrePrefixes.circuit.get(Materials.Primitive), SubTag.NO_UNIFICATION)); - OreDictionary.registerOre("ULV" , ItemList.Circuit_Primitive.get(1)); - ItemList.Circuit_Basic.set(addItem(tLastID = 701, "Integrated Logic Circuit", "A Basic Circuit", OrePrefixes.circuit.get(Materials.Basic), SubTag.NO_UNIFICATION)); - OreDictionary.registerOre("LV" , ItemList.Circuit_Basic.get(1)); - ItemList.Circuit_Good.set(addItem(tLastID = 702, "Good Electronic Circuit", "A Good Circuit", OrePrefixes.circuit.get(Materials.Good), SubTag.NO_UNIFICATION)); - OreDictionary.registerOre("MV" , ItemList.Circuit_Good.get(1)); - ItemList.Circuit_Advanced.set(addItem(tLastID = 703, "Processor Assembly", "An Advanced Circuit", OrePrefixes.circuit.get(Materials.Advanced), SubTag.NO_UNIFICATION)); - OreDictionary.registerOre("HV" , ItemList.Circuit_Advanced.get(1)); - ItemList.Circuit_Data.set(addItem(tLastID = 704, "Workstation", "An Extreme Circuit", OrePrefixes.circuit.get(Materials.Data), SubTag.NO_UNIFICATION)); - OreDictionary.registerOre("EV" , ItemList.Circuit_Data.get(1)); - ItemList.Circuit_Elite.set(addItem(tLastID = 705, "Mainframe", "An Elite Circuit", OrePrefixes.circuit.get(Materials.Elite), SubTag.NO_UNIFICATION)); - OreDictionary.registerOre("IV" , ItemList.Circuit_Elite.get(1)); - ItemList.Circuit_Master.set(addItem(tLastID = 706, "Nanoprocessor Mainframe", "A Master Circuit", OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION)); - OreDictionary.registerOre("LuV" , ItemList.Circuit_Master.get(1)); + ItemList.Circuit_Primitive.set(addItem( + tLastID = 700, + "Vacuum Tube", + "A very simple Circuit", + OrePrefixes.circuit.get(Materials.Primitive), + SubTag.NO_UNIFICATION)); + OreDictionary.registerOre("ULV", ItemList.Circuit_Primitive.get(1)); + ItemList.Circuit_Basic.set(addItem( + tLastID = 701, + "Integrated Logic Circuit", + "A Basic Circuit", + OrePrefixes.circuit.get(Materials.Basic), + SubTag.NO_UNIFICATION)); + OreDictionary.registerOre("LV", ItemList.Circuit_Basic.get(1)); + ItemList.Circuit_Good.set(addItem( + tLastID = 702, + "Good Electronic Circuit", + "A Good Circuit", + OrePrefixes.circuit.get(Materials.Good), + SubTag.NO_UNIFICATION)); + OreDictionary.registerOre("MV", ItemList.Circuit_Good.get(1)); + ItemList.Circuit_Advanced.set(addItem( + tLastID = 703, + "Processor Assembly", + "An Advanced Circuit", + OrePrefixes.circuit.get(Materials.Advanced), + SubTag.NO_UNIFICATION)); + OreDictionary.registerOre("HV", ItemList.Circuit_Advanced.get(1)); + ItemList.Circuit_Data.set(addItem( + tLastID = 704, + "Workstation", + "An Extreme Circuit", + OrePrefixes.circuit.get(Materials.Data), + SubTag.NO_UNIFICATION)); + OreDictionary.registerOre("EV", ItemList.Circuit_Data.get(1)); + ItemList.Circuit_Elite.set(addItem( + tLastID = 705, + "Mainframe", + "An Elite Circuit", + OrePrefixes.circuit.get(Materials.Elite), + SubTag.NO_UNIFICATION)); + OreDictionary.registerOre("IV", ItemList.Circuit_Elite.get(1)); + ItemList.Circuit_Master.set(addItem( + tLastID = 706, + "Nanoprocessor Mainframe", + "A Master Circuit", + OrePrefixes.circuit.get(Materials.Master), + SubTag.NO_UNIFICATION)); + OreDictionary.registerOre("LuV", ItemList.Circuit_Master.get(1)); // Backwards compatibility. ItemList.Circuit_Parts_Vacuum_Tube.set(ItemList.Circuit_Primitive.get(1)); ItemList.Circuit_Computer.set(ItemList.Circuit_Advanced.get(1)); - ItemList.Tool_DataOrb.set(addItem(tLastID = 707, "Data Orb", "A High Capacity Data Storage", SubTag.NO_UNIFICATION, new Behaviour_DataOrb())); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Tool_DataOrb.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Tool_DataOrb.get(1L)}); - ItemList.Tool_DataStick.set(addItem(tLastID = 708, "Data Stick", "A Low Capacity Data Storage", SubTag.NO_UNIFICATION, new Behaviour_DataStick())); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Tool_DataStick.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Tool_DataStick.get(1L)}); - ItemList.Tool_Cover_Copy_Paste.set(addItem(tLastID = 709, "Cover Copy/Paste tool", "Set Cover Massively.", Behaviour_Cover_Tool.INSTANCE, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 6L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 6L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 6L))); + ItemList.Tool_DataOrb.set(addItem( + tLastID = 707, + "Data Orb", + "A High Capacity Data Storage", + SubTag.NO_UNIFICATION, + new Behaviour_DataOrb())); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Tool_DataOrb.get(1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {ItemList.Tool_DataOrb.get(1L)}); + ItemList.Tool_DataStick.set(addItem( + tLastID = 708, + "Data Stick", + "A Low Capacity Data Storage", + SubTag.NO_UNIFICATION, + new Behaviour_DataStick())); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Tool_DataStick.get(1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {ItemList.Tool_DataStick.get(1L)}); + ItemList.Tool_Cover_Copy_Paste.set(addItem( + tLastID = 709, + "Cover Copy/Paste tool", + "Set Cover Massively.", + Behaviour_Cover_Tool.INSTANCE, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 6L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 6L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 6L))); setElectricStats(32000 + tLastID, 400000L, GT_Values.V[2], 2L, -1L, false); - ItemList.Circuit_Board_Basic.set(addItem(tLastID = 710, "Coated Circuit Board", "A Basic Board")); ItemList.Circuit_Board_Coated.set(ItemList.Circuit_Board_Basic.get(1)); - ItemList.Circuit_Board_Advanced.set(addItem(tLastID = 711, "Epoxy Circuit Board", "An Advanced Board")); ItemList.Circuit_Board_Epoxy.set(ItemList.Circuit_Board_Advanced.get(1)); - ItemList.Circuit_Board_Elite.set(addItem(tLastID = 712, "Multilayer Fiber-Reinforced Circuit Board", "An Elite Board")); ItemList.Circuit_Board_Multifiberglass.set(ItemList.Circuit_Board_Elite.get(1)); - ItemList.Circuit_Parts_Crystal_Chip_Elite.set(addItem(tLastID = 713, "Engraved Crystal Chip", "Needed for Circuits")); - ItemList.Circuit_Parts_Crystal_Chip_Master.set(addItem(tLastID = 714, "Engraved Lapotron Chip", "Needed for Circuits")); - ItemList.Circuit_Parts_Advanced.set(addItem(tLastID = 715, "Diode", "Basic Electronic Component")); ItemList.Circuit_Parts_Diode.set(ItemList.Circuit_Parts_Advanced.get(1)); - ItemList.Circuit_Parts_Wiring_Basic.set(addItem(tLastID = 716, "Resistor", "Basic Electronic Component")); ItemList.Circuit_Parts_Resistor.set(ItemList.Circuit_Parts_Wiring_Basic.get(1)); - ItemList.Circuit_Parts_Wiring_Advanced.set(addItem(tLastID = 717, "Transistor", "Basic Electronic Component")); ItemList.Circuit_Parts_Transistor.set(ItemList.Circuit_Parts_Wiring_Advanced.get(1)); - ItemList.Circuit_Parts_Wiring_Elite.set(addItem(tLastID = 718, "Capacitor", "Electronic Component")); ItemList.Circuit_Parts_Capacitor.set(ItemList.Circuit_Parts_Wiring_Elite.get(1)); - ItemList.Empty_Board_Basic.set(addItem(tLastID = 719, "Phenolic Circuit Board", "A Good Board")); ItemList.Circuit_Board_Phenolic.set(ItemList.Empty_Board_Basic.get(1)); - ItemList.Empty_Board_Elite.set(addItem(tLastID = 720, "Fiber-Reinforced Circuit Board", "An Extreme Board")); ItemList.Circuit_Board_Fiberglass.set(ItemList.Empty_Board_Elite.get(1)); - - ItemList.Component_Sawblade_Diamond.set(addItem(tLastID = 721, "Diamond Sawblade", "", new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4L), OreDictNames.craftingDiamondBlade)); - ItemList.Component_Grinder_Diamond.set(addItem(tLastID = 722, "Diamond Grinding Head", "", new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 6L), OreDictNames.craftingGrinder)); - ItemList.Component_Grinder_Tungsten.set(addItem(tLastID = 723, "Tungsten Grinding Head", "", new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 6L), OreDictNames.craftingGrinder)); - - GT_ModHandler.addCraftingRecipe(ItemList.Component_Sawblade_Diamond.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" D ", "DGD", " D ", 'D', OrePrefixes.dustSmall.get(Materials.Diamond), 'G', OrePrefixes.gearGt.get(Materials.CobaltBrass)}); - GT_ModHandler.addCraftingRecipe(ItemList.Component_Grinder_Diamond.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"DSD", "SIS", "DSD", 'I', OrePrefixes.gem.get(Materials.Diamond), 'D', OrePrefixes.dust.get(Materials.Diamond), 'S', OrePrefixes.plateDouble.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Component_Grinder_Tungsten.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"TST", "SIS", "TST", 'I', OreDictNames.craftingIndustrialDiamond, 'T', OrePrefixes.plate.get(Materials.Tungsten), 'S', OrePrefixes.plateDouble.get(Materials.Steel)}); - - ItemList.Upgrade_Muffler.set(addItem(tLastID = 727, "Muffler Upgrade", "Makes Machines silent", new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 2L))); - ItemList.Upgrade_Lock.set(addItem(tLastID = 728, "Lock Upgrade", "Protects your Machines", new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 4L))); - - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Upgrade_Muffler.get(1L), 1600, 2); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Upgrade_Muffler.get(1L), 1600, 2); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Upgrade_Muffler.get(1L), 1600, 2); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Upgrade_Muffler.get(1L), 1600, 2); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Upgrade_Muffler.get(1L), 1600, 2); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Upgrade_Muffler.get(1L), 1600, 2); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Upgrade_Lock.get(1L), 6400, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Upgrade_Lock.get(1L), 6400, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Upgrade_Lock.get(1L), 6400, 16); - - ItemList.Component_Filter.set(addItem(tLastID = 729, "Item Filter", "", new ItemData(Materials.Zinc, OrePrefixes.foil.mMaterialAmount * 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L), OreDictNames.craftingFilter)); - - ItemList.Cover_Controller.set(addItem(tLastID = 730, "Machine Controller Cover", "Turns Machines ON/OFF", new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); - ItemList.Cover_ActivityDetector.set(addItem(tLastID = 731, "Activity Detector Cover", "Gives out Activity as Redstone", new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); - ItemList.Cover_FluidDetector.set(addItem(tLastID = 732, "Fluid Detector Cover", "Gives out Fluid Amount as Redstone", new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L))); - ItemList.Cover_ItemDetector.set(addItem(tLastID = 733, "Item Detector Cover", "Gives out Item Amount as Redstone", new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 1L))); - ItemList.Cover_EnergyDetector.set(addItem(tLastID = 734, "Energy Detector Cover", "Gives out Energy Amount as Redstone", new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); - ItemList.Cover_PlayerDetector.set(addItem(tLastID = 735, "Player Detector Cover", "Gives out close Players as Redstone", new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); - ItemList.Cover_FluidStorageMonitor.set(addItem(tLastID = 577, "Fluid Storage Monitor Cover", "Displays the fluid stored in the Tank", new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L))); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Sensor_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Cover_PlayerDetector.get(1L), 3200, 128); - - GregTech_API.registerCover(ItemList.Cover_Controller.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_CONTROLLER)), new GT_Cover_ControlsWork()); - GregTech_API.registerCover(ItemList.Cover_ActivityDetector.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(TextureFactory.of(OVERLAY_ACTIVITYDETECTOR), TextureFactory.builder().addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW).glow().build())), new GT_Cover_DoesWork()); - GregTech_API.registerCover(ItemList.Cover_FluidDetector.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_FLUIDDETECTOR)), new GT_Cover_LiquidMeter()); - GregTech_API.registerCover(ItemList.Cover_ItemDetector.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_ITEMDETECTOR)), new GT_Cover_ItemMeter()); - GregTech_API.registerCover(ItemList.Cover_EnergyDetector.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_ENERGYDETECTOR)), new GT_Cover_EUMeter()); - GregTech_API.registerCover(ItemList.Cover_PlayerDetector.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(TextureFactory.of(OVERLAY_ACTIVITYDETECTOR), TextureFactory.builder().addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW).glow().build())), new GT_Cover_PlayerDetector()); - GregTech_API.registerCover(ItemList.Cover_FluidStorageMonitor.get(1L), TextureFactory.of(OVERLAY_FLUID_STORAGE_MONITOR0), new GT_Cover_FluidStorageMonitor()); - - - ItemList.Cover_Screen.set(addItem(tLastID = 740, "Computer Monitor Cover", "Displays Data and GUI", new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L))); - ItemList.Cover_Crafting.set(addItem(tLastID = 744, "Crafting Table Cover", "Better than a wooden Workbench", new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 4L))); - ItemList.Cover_Drain.set(addItem(tLastID = 745, "Drain Module Cover", "Absorbs Fluids and collects Rain", new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); - - - ItemList.Cover_Shutter.set(addItem(tLastID = 749, "Shutter Module Cover", "Blocks Inventory/Tank Side. Use together with Machine Controller.", new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L))); - - GT_ModHandler.addCraftingRecipe(ItemList.Cover_Screen.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"AGA", "RPB", "ALA", 'A', OrePrefixes.plate.get(Materials.Aluminium), 'L', OrePrefixes.dust.get(Materials.Glowstone), 'R', Dyes.dyeRed, 'G', Dyes.dyeLime, 'B', Dyes.dyeBlue, 'P', OrePrefixes.plate.get(Materials.Glass)}); - - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), ItemList.Cover_Drain.get(1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Cover_Shutter.get(1L), 200, 64); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), ItemList.Cover_Drain.get(1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Cover_Shutter.get(1L), 800, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), ItemList.Cover_Drain.get(1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Cover_Shutter.get(1L), 400, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 2L), new ItemStack(Blocks.iron_bars, 2), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Cover_Drain.get(1L), 200, 64); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 2L), new ItemStack(Blocks.iron_bars, 2), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Cover_Drain.get(1L), 800, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 2L), new ItemStack(Blocks.iron_bars, 2), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Cover_Drain.get(1L), 400, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), new ItemStack(Blocks.crafting_table, 1), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Cover_Crafting.get(1L), 200, 64); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), new ItemStack(Blocks.crafting_table, 1), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Cover_Crafting.get(1L), 800, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), new ItemStack(Blocks.crafting_table, 1), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Cover_Crafting.get(1L), 800, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Cover_Shutter.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.FluidFilter.get(1L), 800, 4); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Cover_Screen.get(1L), ItemList.Cover_FluidDetector.get(1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Cover_FluidStorageMonitor.get(1L), 1200, 128); - - GregTech_API.registerCover(ItemList.Cover_Screen.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(TextureFactory.of(OVERLAY_SCREEN), TextureFactory.builder().addIcon(OVERLAY_SCREEN_GLOW).glow().build())), new GT_Cover_Screen()); - GregTech_API.registerCover(ItemList.Cover_Crafting.get(1L), TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_CRAFTING)), new GT_Cover_Crafting()); - GregTech_API.registerCover(ItemList.Cover_Drain.get(1L), TextureFactory.of(MACHINE_CASINGS[0][0], TextureFactory.of(OVERLAY_DRAIN)), new GT_Cover_Drain()); - GregTech_API.registerCover(ItemList.Cover_Shutter.get(1L), TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_SHUTTER)), new GT_Cover_Shutter()); - - ItemList.Cover_SolarPanel.set(addItem(tLastID = 750, "Solar Panel", "May the Sun be with you (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 1L))); - ItemList.Cover_SolarPanel_8V.set(addItem(tLastID = 751, "Solar Panel (8V)", "8 Volt Solar Panel (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 2L))); - ItemList.Cover_SolarPanel_LV.set(addItem(tLastID = 752, "Solar Panel (LV)", "Low Voltage Solar Panel (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 4L))); - ItemList.Cover_SolarPanel_MV.set(addItem(tLastID = 753, "Solar Panel (MV)", "Medium Voltage Solar Panel (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 8L))); - ItemList.Cover_SolarPanel_HV.set(addItem(tLastID = 754, "Solar Panel (HV)", "High Voltage Solar Panel (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 16L))); - ItemList.Cover_SolarPanel_EV.set(addItem(tLastID = 755, "Solar Panel (EV)", "Extreme Solar Panel (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 32L))); - ItemList.Cover_SolarPanel_IV.set(addItem(tLastID = 756, "Solar Panel (IV)", "Insane Solar Panel (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L))); - ItemList.Cover_SolarPanel_LuV.set(addItem(tLastID = 757, "Solar Panel (LuV)", "Ludicrous Solar Panel (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L))); - ItemList.Cover_SolarPanel_ZPM.set(addItem(tLastID = 758, "Solar Panel (ZPM)", "ZPM Voltage Solar Panel (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L))); - ItemList.Cover_SolarPanel_UV.set(addItem(tLastID = 759, "Solar Panel (UV)", "Ultimate Solar Panel (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L))); - - GregTech_API.registerCover(ItemList.Cover_SolarPanel.get(1L), TextureFactory.of(SOLARPANEL), new GT_Cover_SolarPanel(1)); - GregTech_API.registerCover(ItemList.Cover_SolarPanel_8V.get(1L), TextureFactory.of(SOLARPANEL_8V), new GT_Cover_SolarPanel(8)); - GregTech_API.registerCover(ItemList.Cover_SolarPanel_LV.get(1L), TextureFactory.of(SOLARPANEL_LV), new GT_Cover_SolarPanel(32)); - GregTech_API.registerCover(ItemList.Cover_SolarPanel_MV.get(1L), TextureFactory.of(SOLARPANEL_MV), new GT_Cover_SolarPanel(128)); - GregTech_API.registerCover(ItemList.Cover_SolarPanel_HV.get(1L), TextureFactory.of(SOLARPANEL_HV), new GT_Cover_SolarPanel(512)); - GregTech_API.registerCover(ItemList.Cover_SolarPanel_EV.get(1L), TextureFactory.of(SOLARPANEL_EV), new GT_Cover_SolarPanel(2048)); - GregTech_API.registerCover(ItemList.Cover_SolarPanel_IV.get(1L), TextureFactory.of(SOLARPANEL_IV), new GT_Cover_SolarPanel(8192)); - GregTech_API.registerCover(ItemList.Cover_SolarPanel_LuV.get(1L), TextureFactory.of(SOLARPANEL_LuV), new GT_Cover_SolarPanel(32768)); - GregTech_API.registerCover(ItemList.Cover_SolarPanel_ZPM.get(1L), TextureFactory.of(SOLARPANEL_ZPM), new GT_Cover_SolarPanel(131072)); - GregTech_API.registerCover(ItemList.Cover_SolarPanel_UV.get(1L), TextureFactory.of(SOLARPANEL_UV), new GT_Cover_SolarPanel(524288)); - - ItemList.Tool_Sonictron.set(addItem(tLastID = 760, "Sonictron", "Bring your Music with you", Behaviour_Sonictron.INSTANCE, new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 4L))); - ItemList.Tool_Cheat.set(addItem(tLastID = 761, "Debug Scanner", "Also an Infinite Energy Source", Behaviour_Scanner.INSTANCE, new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 64L))); + ItemList.Circuit_Board_Basic.set(addItem(tLastID = 710, "Coated Circuit Board", "A Basic Board")); + ItemList.Circuit_Board_Coated.set(ItemList.Circuit_Board_Basic.get(1)); + ItemList.Circuit_Board_Advanced.set(addItem(tLastID = 711, "Epoxy Circuit Board", "An Advanced Board")); + ItemList.Circuit_Board_Epoxy.set(ItemList.Circuit_Board_Advanced.get(1)); + ItemList.Circuit_Board_Elite.set( + addItem(tLastID = 712, "Multilayer Fiber-Reinforced Circuit Board", "An Elite Board")); + ItemList.Circuit_Board_Multifiberglass.set(ItemList.Circuit_Board_Elite.get(1)); + ItemList.Circuit_Parts_Crystal_Chip_Elite.set( + addItem(tLastID = 713, "Engraved Crystal Chip", "Needed for Circuits")); + ItemList.Circuit_Parts_Crystal_Chip_Master.set( + addItem(tLastID = 714, "Engraved Lapotron Chip", "Needed for Circuits")); + ItemList.Circuit_Parts_Advanced.set(addItem(tLastID = 715, "Diode", "Basic Electronic Component")); + ItemList.Circuit_Parts_Diode.set(ItemList.Circuit_Parts_Advanced.get(1)); + ItemList.Circuit_Parts_Wiring_Basic.set(addItem(tLastID = 716, "Resistor", "Basic Electronic Component")); + ItemList.Circuit_Parts_Resistor.set(ItemList.Circuit_Parts_Wiring_Basic.get(1)); + ItemList.Circuit_Parts_Wiring_Advanced.set(addItem(tLastID = 717, "Transistor", "Basic Electronic Component")); + ItemList.Circuit_Parts_Transistor.set(ItemList.Circuit_Parts_Wiring_Advanced.get(1)); + ItemList.Circuit_Parts_Wiring_Elite.set(addItem(tLastID = 718, "Capacitor", "Electronic Component")); + ItemList.Circuit_Parts_Capacitor.set(ItemList.Circuit_Parts_Wiring_Elite.get(1)); + ItemList.Empty_Board_Basic.set(addItem(tLastID = 719, "Phenolic Circuit Board", "A Good Board")); + ItemList.Circuit_Board_Phenolic.set(ItemList.Empty_Board_Basic.get(1)); + ItemList.Empty_Board_Elite.set(addItem(tLastID = 720, "Fiber-Reinforced Circuit Board", "An Extreme Board")); + ItemList.Circuit_Board_Fiberglass.set(ItemList.Empty_Board_Elite.get(1)); + + ItemList.Component_Sawblade_Diamond.set(addItem( + tLastID = 721, + "Diamond Sawblade", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4L), + OreDictNames.craftingDiamondBlade)); + ItemList.Component_Grinder_Diamond.set(addItem( + tLastID = 722, + "Diamond Grinding Head", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 6L), + OreDictNames.craftingGrinder)); + ItemList.Component_Grinder_Tungsten.set(addItem( + tLastID = 723, + "Tungsten Grinding Head", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 6L), + OreDictNames.craftingGrinder)); + + GT_ModHandler.addCraftingRecipe( + ItemList.Component_Sawblade_Diamond.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + " D ", + "DGD", + " D ", + 'D', + OrePrefixes.dustSmall.get(Materials.Diamond), + 'G', + OrePrefixes.gearGt.get(Materials.CobaltBrass) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Component_Grinder_Diamond.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "DSD", + "SIS", + "DSD", + 'I', + OrePrefixes.gem.get(Materials.Diamond), + 'D', + OrePrefixes.dust.get(Materials.Diamond), + 'S', + OrePrefixes.plateDouble.get(Materials.Steel) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Component_Grinder_Tungsten.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "TST", + "SIS", + "TST", + 'I', + OreDictNames.craftingIndustrialDiamond, + 'T', + OrePrefixes.plate.get(Materials.Tungsten), + 'S', + OrePrefixes.plateDouble.get(Materials.Steel) + }); + + ItemList.Upgrade_Muffler.set(addItem( + tLastID = 727, + "Muffler Upgrade", + "Makes Machines silent", + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 2L))); + ItemList.Upgrade_Lock.set(addItem( + tLastID = 728, + "Lock Upgrade", + "Protects your Machines", + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 4L))); + + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 2L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Upgrade_Muffler.get(1L), + 1600, + 2); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Upgrade_Muffler.get(1L), + 1600, + 2); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 2L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Upgrade_Muffler.get(1L), + 1600, + 2); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Upgrade_Muffler.get(1L), + 1600, + 2); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 2L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Upgrade_Muffler.get(1L), + 1600, + 2); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Upgrade_Muffler.get(1L), + 1600, + 2); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Upgrade_Lock.get(1L), + 6400, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Upgrade_Lock.get(1L), + 6400, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Upgrade_Lock.get(1L), + 6400, + 16); + + ItemList.Component_Filter.set(addItem( + tLastID = 729, + "Item Filter", + "", + new ItemData(Materials.Zinc, OrePrefixes.foil.mMaterialAmount * 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L), + OreDictNames.craftingFilter)); + + ItemList.Cover_Controller.set(addItem( + tLastID = 730, + "Machine Controller Cover", + "Turns Machines ON/OFF", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); + ItemList.Cover_ActivityDetector.set(addItem( + tLastID = 731, + "Activity Detector Cover", + "Gives out Activity as Redstone", + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); + ItemList.Cover_FluidDetector.set(addItem( + tLastID = 732, + "Fluid Detector Cover", + "Gives out Fluid Amount as Redstone", + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L))); + ItemList.Cover_ItemDetector.set(addItem( + tLastID = 733, + "Item Detector Cover", + "Gives out Item Amount as Redstone", + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 1L))); + ItemList.Cover_EnergyDetector.set(addItem( + tLastID = 734, + "Energy Detector Cover", + "Gives out Energy Amount as Redstone", + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); + ItemList.Cover_PlayerDetector.set(addItem( + tLastID = 735, + "Player Detector Cover", + "Gives out close Players as Redstone", + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); + ItemList.Cover_FluidStorageMonitor.set(addItem( + tLastID = 577, + "Fluid Storage Monitor Cover", + "Displays the fluid stored in the Tank", + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L))); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Sensor_EV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Cover_PlayerDetector.get(1L), + 3200, + 128); + + GregTech_API.registerCover( + ItemList.Cover_Controller.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_CONTROLLER)), + new GT_Cover_ControlsWork()); + GregTech_API.registerCover( + ItemList.Cover_ActivityDetector.get(1L), + TextureFactory.of( + MACHINE_CASINGS[2][0], + TextureFactory.of( + TextureFactory.of(OVERLAY_ACTIVITYDETECTOR), + TextureFactory.builder() + .addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW) + .glow() + .build())), + new GT_Cover_DoesWork()); + GregTech_API.registerCover( + ItemList.Cover_FluidDetector.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_FLUIDDETECTOR)), + new GT_Cover_LiquidMeter()); + GregTech_API.registerCover( + ItemList.Cover_ItemDetector.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_ITEMDETECTOR)), + new GT_Cover_ItemMeter()); + GregTech_API.registerCover( + ItemList.Cover_EnergyDetector.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_ENERGYDETECTOR)), + new GT_Cover_EUMeter()); + GregTech_API.registerCover( + ItemList.Cover_PlayerDetector.get(1L), + TextureFactory.of( + MACHINE_CASINGS[2][0], + TextureFactory.of( + TextureFactory.of(OVERLAY_ACTIVITYDETECTOR), + TextureFactory.builder() + .addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW) + .glow() + .build())), + new GT_Cover_PlayerDetector()); + GregTech_API.registerCover( + ItemList.Cover_FluidStorageMonitor.get(1L), + TextureFactory.of(OVERLAY_FLUID_STORAGE_MONITOR0), + new GT_Cover_FluidStorageMonitor()); + + ItemList.Cover_Screen.set(addItem( + tLastID = 740, + "Computer Monitor Cover", + "Displays Data and GUI", + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L))); + ItemList.Cover_Crafting.set(addItem( + tLastID = 744, + "Crafting Table Cover", + "Better than a wooden Workbench", + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 4L))); + ItemList.Cover_Drain.set(addItem( + tLastID = 745, + "Drain Module Cover", + "Absorbs Fluids and collects Rain", + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); + + ItemList.Cover_Shutter.set(addItem( + tLastID = 749, + "Shutter Module Cover", + "Blocks Inventory/Tank Side. Use together with Machine Controller.", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L))); + + GT_ModHandler.addCraftingRecipe( + ItemList.Cover_Screen.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "AGA", + "RPB", + "ALA", + 'A', + OrePrefixes.plate.get(Materials.Aluminium), + 'L', + OrePrefixes.dust.get(Materials.Glowstone), + 'R', + Dyes.dyeRed, + 'G', + Dyes.dyeLime, + 'B', + Dyes.dyeBlue, + 'P', + OrePrefixes.plate.get(Materials.Glass) + }); + + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), + ItemList.Cover_Drain.get(1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Cover_Shutter.get(1L), + 200, + 64); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), + ItemList.Cover_Drain.get(1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Cover_Shutter.get(1L), + 800, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), + ItemList.Cover_Drain.get(1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Cover_Shutter.get(1L), + 400, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 2L), + new ItemStack(Blocks.iron_bars, 2), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Cover_Drain.get(1L), + 200, + 64); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 2L), + new ItemStack(Blocks.iron_bars, 2), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Cover_Drain.get(1L), + 800, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 2L), + new ItemStack(Blocks.iron_bars, 2), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Cover_Drain.get(1L), + 400, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), + new ItemStack(Blocks.crafting_table, 1), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Cover_Crafting.get(1L), + 200, + 64); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), + new ItemStack(Blocks.crafting_table, 1), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Cover_Crafting.get(1L), + 800, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), + new ItemStack(Blocks.crafting_table, 1), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Cover_Crafting.get(1L), + 800, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Cover_Shutter.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.FluidFilter.get(1L), + 800, + 4); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Cover_Screen.get(1L), + ItemList.Cover_FluidDetector.get(1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Cover_FluidStorageMonitor.get(1L), + 1200, + 128); + + GregTech_API.registerCover( + ItemList.Cover_Screen.get(1L), + TextureFactory.of( + MACHINE_CASINGS[2][0], + TextureFactory.of( + TextureFactory.of(OVERLAY_SCREEN), + TextureFactory.builder() + .addIcon(OVERLAY_SCREEN_GLOW) + .glow() + .build())), + new GT_Cover_Screen()); + GregTech_API.registerCover( + ItemList.Cover_Crafting.get(1L), + TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_CRAFTING)), + new GT_Cover_Crafting()); + GregTech_API.registerCover( + ItemList.Cover_Drain.get(1L), + TextureFactory.of(MACHINE_CASINGS[0][0], TextureFactory.of(OVERLAY_DRAIN)), + new GT_Cover_Drain()); + GregTech_API.registerCover( + ItemList.Cover_Shutter.get(1L), + TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_SHUTTER)), + new GT_Cover_Shutter()); + + ItemList.Cover_SolarPanel.set(addItem( + tLastID = 750, + "Solar Panel", + "May the Sun be with you (Needs cleaning with right click)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 1L))); + ItemList.Cover_SolarPanel_8V.set(addItem( + tLastID = 751, + "Solar Panel (8V)", + "8 Volt Solar Panel (Needs cleaning with right click)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 2L))); + ItemList.Cover_SolarPanel_LV.set(addItem( + tLastID = 752, + "Solar Panel (LV)", + "Low Voltage Solar Panel (Needs cleaning with right click)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 4L))); + ItemList.Cover_SolarPanel_MV.set(addItem( + tLastID = 753, + "Solar Panel (MV)", + "Medium Voltage Solar Panel (Needs cleaning with right click)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 8L))); + ItemList.Cover_SolarPanel_HV.set(addItem( + tLastID = 754, + "Solar Panel (HV)", + "High Voltage Solar Panel (Needs cleaning with right click)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 16L))); + ItemList.Cover_SolarPanel_EV.set(addItem( + tLastID = 755, + "Solar Panel (EV)", + "Extreme Solar Panel (Needs cleaning with right click)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 32L))); + ItemList.Cover_SolarPanel_IV.set(addItem( + tLastID = 756, + "Solar Panel (IV)", + "Insane Solar Panel (Needs cleaning with right click)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L))); + ItemList.Cover_SolarPanel_LuV.set(addItem( + tLastID = 757, + "Solar Panel (LuV)", + "Ludicrous Solar Panel (Needs cleaning with right click)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L))); + ItemList.Cover_SolarPanel_ZPM.set(addItem( + tLastID = 758, + "Solar Panel (ZPM)", + "ZPM Voltage Solar Panel (Needs cleaning with right click)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L))); + ItemList.Cover_SolarPanel_UV.set(addItem( + tLastID = 759, + "Solar Panel (UV)", + "Ultimate Solar Panel (Needs cleaning with right click)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L))); + + GregTech_API.registerCover( + ItemList.Cover_SolarPanel.get(1L), TextureFactory.of(SOLARPANEL), new GT_Cover_SolarPanel(1)); + GregTech_API.registerCover( + ItemList.Cover_SolarPanel_8V.get(1L), TextureFactory.of(SOLARPANEL_8V), new GT_Cover_SolarPanel(8)); + GregTech_API.registerCover( + ItemList.Cover_SolarPanel_LV.get(1L), TextureFactory.of(SOLARPANEL_LV), new GT_Cover_SolarPanel(32)); + GregTech_API.registerCover( + ItemList.Cover_SolarPanel_MV.get(1L), TextureFactory.of(SOLARPANEL_MV), new GT_Cover_SolarPanel(128)); + GregTech_API.registerCover( + ItemList.Cover_SolarPanel_HV.get(1L), TextureFactory.of(SOLARPANEL_HV), new GT_Cover_SolarPanel(512)); + GregTech_API.registerCover( + ItemList.Cover_SolarPanel_EV.get(1L), TextureFactory.of(SOLARPANEL_EV), new GT_Cover_SolarPanel(2048)); + GregTech_API.registerCover( + ItemList.Cover_SolarPanel_IV.get(1L), TextureFactory.of(SOLARPANEL_IV), new GT_Cover_SolarPanel(8192)); + GregTech_API.registerCover( + ItemList.Cover_SolarPanel_LuV.get(1L), + TextureFactory.of(SOLARPANEL_LuV), + new GT_Cover_SolarPanel(32768)); + GregTech_API.registerCover( + ItemList.Cover_SolarPanel_ZPM.get(1L), + TextureFactory.of(SOLARPANEL_ZPM), + new GT_Cover_SolarPanel(131072)); + GregTech_API.registerCover( + ItemList.Cover_SolarPanel_UV.get(1L), + TextureFactory.of(SOLARPANEL_UV), + new GT_Cover_SolarPanel(524288)); + + ItemList.Tool_Sonictron.set(addItem( + tLastID = 760, + "Sonictron", + "Bring your Music with you", + Behaviour_Sonictron.INSTANCE, + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 4L))); + ItemList.Tool_Cheat.set(addItem( + tLastID = 761, + "Debug Scanner", + "Also an Infinite Energy Source", + Behaviour_Scanner.INSTANCE, + new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 64L))); setElectricStats(32000 + tLastID, -2000000000L, 1000000000L, -1L, -3L, false); - ItemList.Tool_Scanner.set(addItem(tLastID = 762, "Portable Scanner", "Tricorder", Behaviour_Scanner.INSTANCE, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 6L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 6L))); + ItemList.Tool_Scanner.set(addItem( + tLastID = 762, + "Portable Scanner", + "Tricorder", + Behaviour_Scanner.INSTANCE, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 6L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 6L))); setElectricStats(32000 + tLastID, 400000L, GT_Values.V[2], 2L, -1L, false); - GT_ModHandler.addCraftingRecipe(ItemList.Tool_Scanner.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"EPR", "CSC", "PBP", 'C', OrePrefixes.circuit.get(Materials.Advanced), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'E', ItemList.Emitter_MV, 'R', ItemList.Sensor_MV, 'S', ItemList.Cover_Screen, 'B', ItemList.Battery_RE_MV_Lithium}); + GT_ModHandler.addCraftingRecipe( + ItemList.Tool_Scanner.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "EPR", + "CSC", + "PBP", + 'C', + OrePrefixes.circuit.get(Materials.Advanced), + 'P', + OrePrefixes.plate.get(Materials.Aluminium), + 'E', + ItemList.Emitter_MV, + 'R', + ItemList.Sensor_MV, + 'S', + ItemList.Cover_Screen, + 'B', + ItemList.Battery_RE_MV_Lithium + }); ItemList.NC_SensorKit.set(addItem(tLastID = 763, "GregTech Sensor Kit", "", new Behaviour_SensorKit())); - ItemList.Duct_Tape.set(addItem(tLastID = 764, "BrainTech Aerospace Advanced Reinforced Duct Tape FAL-84", "If you can't fix it with this, use more of it!", new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), OreDictNames.craftingDuctTape)); - ItemList.McGuffium_239.set(addItem(tLastID = 765, "Mc Guffium 239", "42% better than Phlebotnium", new TC_Aspects.TC_AspectStack(TC_Aspects.ALIENIS, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.SPIRITUS, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITIUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.RADIO, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MAGNETO, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.STRONTIO, 8L))); - - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Sensor_LV.get(1L), ItemList.Emitter_LV.get(1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.NC_SensorKit.get(1L), 1600, 2); - - ItemList.Cover_RedstoneTransmitterExternal.set(addItem(tLastID = 741, "Redstone Transmitter (Out)", "Transfers Redstonesignals wireless", new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); - ItemList.Cover_RedstoneTransmitterInternal.set(addItem(tLastID = 742, "Redstone Transmitter (In)", "Transfers Redstonesignals wireless", new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); - ItemList.Cover_RedstoneReceiverExternal.set(addItem(tLastID = 746, "Redstone Receiver (Out)", "Transfers Redstonesignals wireless", new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); - ItemList.Cover_RedstoneReceiverInternal.set(addItem(tLastID = 747, "Redstone Receiver (In)", "Transfers Redstonesignals wireless", new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); - - GregTech_API.registerCover(ItemList.Cover_RedstoneTransmitterExternal.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(TextureFactory.of(OVERLAY_ACTIVITYDETECTOR), TextureFactory.builder().addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW).glow().build())), new GT_Cover_RedstoneTransmitterExternal()); - GregTech_API.registerCover(ItemList.Cover_RedstoneTransmitterInternal.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(TextureFactory.of(OVERLAY_ACTIVITYDETECTOR), TextureFactory.builder().addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW).glow().build())), new GT_Cover_RedstoneTransmitterInternal()); - GregTech_API.registerCover(ItemList.Cover_RedstoneReceiverExternal.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_FLUIDDETECTOR)), new GT_Cover_RedstoneReceiverExternal()); - GregTech_API.registerCover(ItemList.Cover_RedstoneReceiverInternal.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_FLUIDDETECTOR)), new GT_Cover_RedstoneReceiverInternal()); - - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Emitter_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Cover_RedstoneTransmitterExternal.get(1L), 3200, 128); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Sensor_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Cover_RedstoneReceiverExternal.get(1L), 3200, 128); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Cover_RedstoneTransmitterInternal.get(1L), new Object[]{ItemList.Cover_RedstoneTransmitterExternal.get(1L)}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Cover_RedstoneReceiverInternal.get(1L), new Object[]{ItemList.Cover_RedstoneReceiverExternal.get(1L)}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Cover_RedstoneTransmitterExternal.get(1L), new Object[]{ItemList.Cover_RedstoneTransmitterInternal.get(1L)}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Cover_RedstoneReceiverExternal.get(1L), new Object[]{ItemList.Cover_RedstoneReceiverInternal.get(1L)}); - - ItemList.Cover_NeedsMaintainance.set(addItem(tLastID = 748, "Needs Maintenance Cover", "Attach to Multiblock Controller. Emits Redstone Signal if needs Maintenance", new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); - GregTech_API.registerCover(ItemList.Cover_NeedsMaintainance.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(TextureFactory.of(OVERLAY_ACTIVITYDETECTOR), TextureFactory.builder().addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW).glow().build())), new GT_Cover_NeedMaintainance()); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Emitter_MV.get(1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Cover_NeedsMaintainance.get(1L), 600, 24); - - GT_ModHandler.addCraftingRecipe(ItemList.ItemFilter_Export.get(1L), new Object[]{"SPS", "dIC", "SPS", 'P', OrePrefixes.plate.get(Materials.Tin), 'S', OrePrefixes.screw.get(Materials.Iron), 'I', ItemList.Component_Filter, 'C', ItemList.Conveyor_Module_LV}); - GT_ModHandler.addCraftingRecipe(ItemList.ItemFilter_Import.get(1L), new Object[]{"SPS", "CId", "SPS", 'P', OrePrefixes.plate.get(Materials.Tin), 'S', OrePrefixes.screw.get(Materials.Iron), 'I', ItemList.Component_Filter, 'C', ItemList.Conveyor_Module_LV}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.ItemFilter_Export.get(1L), new Object[]{ItemList.ItemFilter_Import.get(1L)}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.ItemFilter_Import.get(1L), new Object[]{ItemList.ItemFilter_Export.get(1L)}); - - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate,Materials.Tin,2L), ItemList.Component_Filter.get(1L), ItemList.Conveyor_Module_LV.get(1L), GT_Utility.getIntegratedCircuit(1)}, null, ItemList.ItemFilter_Export.get(1L), 100, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate,Materials.Tin,2L), ItemList.Component_Filter.get(1L), ItemList.Conveyor_Module_LV.get(1L), GT_Utility.getIntegratedCircuit(2)}, null, ItemList.ItemFilter_Import.get(1L), 100, 30); - - GT_ModHandler.addCraftingRecipe(ItemList.Tool_Cover_Copy_Paste.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PSP", "PCP", "PBP", 'P', OrePrefixes.plate.get(Materials.Aluminium), 'S', ItemList.Tool_DataStick.get(1L), 'C', ItemList.Cover_Screen.get(1L), 'B', ItemList.Battery_RE_MV_Lithium.get(1L)}); + ItemList.Duct_Tape.set(addItem( + tLastID = 764, + "BrainTech Aerospace Advanced Reinforced Duct Tape FAL-84", + "If you can't fix it with this, use more of it!", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + OreDictNames.craftingDuctTape)); + ItemList.McGuffium_239.set(addItem( + tLastID = 765, + "Mc Guffium 239", + "42% better than Phlebotnium", + new TC_Aspects.TC_AspectStack(TC_Aspects.ALIENIS, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SPIRITUS, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITIUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.RADIO, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MAGNETO, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.STRONTIO, 8L))); + + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Sensor_LV.get(1L), ItemList.Emitter_LV.get(1L), GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.NC_SensorKit.get(1L), + 1600, + 2); + + ItemList.Cover_RedstoneTransmitterExternal.set(addItem( + tLastID = 741, + "Redstone Transmitter (Out)", + "Transfers Redstonesignals wireless", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); + ItemList.Cover_RedstoneTransmitterInternal.set(addItem( + tLastID = 742, + "Redstone Transmitter (In)", + "Transfers Redstonesignals wireless", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); + ItemList.Cover_RedstoneReceiverExternal.set(addItem( + tLastID = 746, + "Redstone Receiver (Out)", + "Transfers Redstonesignals wireless", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); + ItemList.Cover_RedstoneReceiverInternal.set(addItem( + tLastID = 747, + "Redstone Receiver (In)", + "Transfers Redstonesignals wireless", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); + + GregTech_API.registerCover( + ItemList.Cover_RedstoneTransmitterExternal.get(1L), + TextureFactory.of( + MACHINE_CASINGS[2][0], + TextureFactory.of( + TextureFactory.of(OVERLAY_ACTIVITYDETECTOR), + TextureFactory.builder() + .addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW) + .glow() + .build())), + new GT_Cover_RedstoneTransmitterExternal()); + GregTech_API.registerCover( + ItemList.Cover_RedstoneTransmitterInternal.get(1L), + TextureFactory.of( + MACHINE_CASINGS[2][0], + TextureFactory.of( + TextureFactory.of(OVERLAY_ACTIVITYDETECTOR), + TextureFactory.builder() + .addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW) + .glow() + .build())), + new GT_Cover_RedstoneTransmitterInternal()); + GregTech_API.registerCover( + ItemList.Cover_RedstoneReceiverExternal.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_FLUIDDETECTOR)), + new GT_Cover_RedstoneReceiverExternal()); + GregTech_API.registerCover( + ItemList.Cover_RedstoneReceiverInternal.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_FLUIDDETECTOR)), + new GT_Cover_RedstoneReceiverInternal()); + + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Emitter_EV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Cover_RedstoneTransmitterExternal.get(1L), + 3200, + 128); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Sensor_EV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Cover_RedstoneReceiverExternal.get(1L), + 3200, + 128); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Cover_RedstoneTransmitterInternal.get(1L), + new Object[] {ItemList.Cover_RedstoneTransmitterExternal.get(1L)}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Cover_RedstoneReceiverInternal.get(1L), + new Object[] {ItemList.Cover_RedstoneReceiverExternal.get(1L)}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Cover_RedstoneTransmitterExternal.get(1L), + new Object[] {ItemList.Cover_RedstoneTransmitterInternal.get(1L)}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Cover_RedstoneReceiverExternal.get(1L), + new Object[] {ItemList.Cover_RedstoneReceiverInternal.get(1L)}); + + ItemList.Cover_NeedsMaintainance.set(addItem( + tLastID = 748, + "Needs Maintenance Cover", + "Attach to Multiblock Controller. Emits Redstone Signal if needs Maintenance", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); + GregTech_API.registerCover( + ItemList.Cover_NeedsMaintainance.get(1L), + TextureFactory.of( + MACHINE_CASINGS[2][0], + TextureFactory.of( + TextureFactory.of(OVERLAY_ACTIVITYDETECTOR), + TextureFactory.builder() + .addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW) + .glow() + .build())), + new GT_Cover_NeedMaintainance()); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Emitter_MV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Cover_NeedsMaintainance.get(1L), + 600, + 24); + + GT_ModHandler.addCraftingRecipe(ItemList.ItemFilter_Export.get(1L), new Object[] { + "SPS", + "dIC", + "SPS", + 'P', + OrePrefixes.plate.get(Materials.Tin), + 'S', + OrePrefixes.screw.get(Materials.Iron), + 'I', + ItemList.Component_Filter, + 'C', + ItemList.Conveyor_Module_LV + }); + GT_ModHandler.addCraftingRecipe(ItemList.ItemFilter_Import.get(1L), new Object[] { + "SPS", + "CId", + "SPS", + 'P', + OrePrefixes.plate.get(Materials.Tin), + 'S', + OrePrefixes.screw.get(Materials.Iron), + 'I', + ItemList.Component_Filter, + 'C', + ItemList.Conveyor_Module_LV + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.ItemFilter_Export.get(1L), new Object[] {ItemList.ItemFilter_Import.get(1L)}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.ItemFilter_Import.get(1L), new Object[] {ItemList.ItemFilter_Export.get(1L)}); + + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Tin, 2L), + ItemList.Component_Filter.get(1L), + ItemList.Conveyor_Module_LV.get(1L), + GT_Utility.getIntegratedCircuit(1) + }, + null, + ItemList.ItemFilter_Export.get(1L), + 100, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Tin, 2L), + ItemList.Component_Filter.get(1L), + ItemList.Conveyor_Module_LV.get(1L), + GT_Utility.getIntegratedCircuit(2) + }, + null, + ItemList.ItemFilter_Import.get(1L), + 100, + 30); + + GT_ModHandler.addCraftingRecipe( + ItemList.Tool_Cover_Copy_Paste.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + "PSP", + "PCP", + "PBP", + 'P', + OrePrefixes.plate.get(Materials.Aluminium), + 'S', + ItemList.Tool_DataStick.get(1L), + 'C', + ItemList.Cover_Screen.get(1L), + 'B', + ItemList.Battery_RE_MV_Lithium.get(1L) + }); } - private static final Map<Materials,Materials> cauldronRemap =new HashMap<>(); + private static final Map<Materials, Materials> cauldronRemap = new HashMap<>(); - public static void registerCauldronCleaningFor(Materials in,Materials out){ - cauldronRemap.put(in,out); + public static void registerCauldronCleaningFor(Materials in, Materials out) { + cauldronRemap.put(in, out); } @Override @@ -969,9 +4847,10 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { byte tMetaData = (byte) aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); if ((tBlock == Blocks.cauldron) && (tMetaData > 0)) { - aMaterial= cauldronRemap.getOrDefault(aMaterial,aMaterial); + aMaterial = cauldronRemap.getOrDefault(aMaterial, aMaterial); - aItemEntity.setEntityItemStack(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, aItemEntity.getEntityItem().stackSize)); + aItemEntity.setEntityItemStack(GT_OreDictUnificator.get( + OrePrefixes.dust, aMaterial, aItemEntity.getEntityItem().stackSize)); aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3); return true; } @@ -979,11 +4858,12 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { Block tBlock = aItemEntity.worldObj.getBlock(tX, tY, tZ); byte tMetaData = (byte) aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); if ((tBlock == Blocks.cauldron) && (tMetaData > 0)) { - aItemEntity.setEntityItemStack(GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, aItemEntity.getEntityItem().stackSize)); + aItemEntity.setEntityItemStack(GT_OreDictUnificator.get( + OrePrefixes.crushedPurified, aMaterial, aItemEntity.getEntityItem().stackSize)); aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3); return true; } - } else if(aPrefix == OrePrefixes.dust && aMaterial == Materials.Wheat) { + } else if (aPrefix == OrePrefixes.dust && aMaterial == Materials.Wheat) { Block tBlock = aItemEntity.worldObj.getBlock(tX, tY, tZ); byte tMetaData = (byte) aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); if ((tBlock == Blocks.cauldron) && (tMetaData > 0)) { @@ -1014,11 +4894,11 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { public boolean isPlasmaCellUsed(OrePrefixes aPrefix, Materials aMaterial) { Collection<GT_Recipe> fusionRecipes = GT_Recipe.GT_Recipe_Map.sFusionRecipes.mRecipeList; - if(aPrefix == OrePrefixes.cellPlasma && aMaterial.getPlasma(1L) != null) { //Materials has a plasma fluid - for(GT_Recipe recipe : fusionRecipes) { //Loop through fusion recipes - if(recipe.getFluidOutput(0) != null) { //Make sure fluid output can't be null (not sure if possible) + if (aPrefix == OrePrefixes.cellPlasma && aMaterial.getPlasma(1L) != null) { // Materials has a plasma fluid + for (GT_Recipe recipe : fusionRecipes) { // Loop through fusion recipes + if (recipe.getFluidOutput(0) != null) { // Make sure fluid output can't be null (not sure if possible) if (recipe.getFluidOutput(0).isFluidEqual(aMaterial.getPlasma(1L))) - return true; //Fusion recipe output matches current plasma cell fluid + return true; // Fusion recipe output matches current plasma cell fluid } } } @@ -1027,7 +4907,17 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { @Override public boolean doesShowInCreative(OrePrefixes aPrefix, Materials aMaterial, boolean aDoShowAllItems) { - return (aDoShowAllItems) || (((aPrefix != OrePrefixes.gem) || (!aMaterial.mName.startsWith("Infused"))) && (aPrefix != OrePrefixes.dustTiny) && (aPrefix != OrePrefixes.dustSmall) && (aPrefix != OrePrefixes.dustImpure) && (aPrefix != OrePrefixes.dustPure) && (aPrefix != OrePrefixes.crushed) && (aPrefix != OrePrefixes.crushedPurified) && (aPrefix != OrePrefixes.crushedCentrifuged) && (aPrefix != OrePrefixes.ingotHot) && !(aPrefix == OrePrefixes.cellPlasma && !isPlasmaCellUsed(aPrefix, aMaterial))); + return (aDoShowAllItems) + || (((aPrefix != OrePrefixes.gem) || (!aMaterial.mName.startsWith("Infused"))) + && (aPrefix != OrePrefixes.dustTiny) + && (aPrefix != OrePrefixes.dustSmall) + && (aPrefix != OrePrefixes.dustImpure) + && (aPrefix != OrePrefixes.dustPure) + && (aPrefix != OrePrefixes.crushed) + && (aPrefix != OrePrefixes.crushedPurified) + && (aPrefix != OrePrefixes.crushedCentrifuged) + && (aPrefix != OrePrefixes.ingotHot) + && !(aPrefix == OrePrefixes.cellPlasma && !isPlasmaCellUsed(aPrefix, aMaterial))); } @Override diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java index 6320ba9ead..af5c1dc457 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java @@ -34,222 +34,1774 @@ import net.minecraft.world.World; public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { public static GT_MetaGenerated_Item_02 INSTANCE; - private static final String aTextCover = "Usable as Cover"; private static final String aTextForestry = "Forestry"; + private static final String aTextCover = "Usable as Cover"; + private static final String aTextForestry = "Forestry"; public GT_MetaGenerated_Item_02() { - super("metaitem.02", OrePrefixes.toolHeadSword, OrePrefixes.toolHeadPickaxe, OrePrefixes.toolHeadShovel, OrePrefixes.toolHeadAxe, OrePrefixes.toolHeadHoe, OrePrefixes.toolHeadHammer, OrePrefixes.toolHeadFile, OrePrefixes.toolHeadSaw, OrePrefixes.toolHeadDrill, OrePrefixes.toolHeadChainsaw, OrePrefixes.toolHeadWrench, OrePrefixes.toolHeadUniversalSpade, OrePrefixes.toolHeadSense, OrePrefixes.toolHeadPlow, OrePrefixes.toolHeadArrow, OrePrefixes.toolHeadBuzzSaw, OrePrefixes.turbineBlade, null, OrePrefixes.itemCasing, OrePrefixes.wireFine, OrePrefixes.gearGtSmall, OrePrefixes.rotor, OrePrefixes.stickLong, OrePrefixes.springSmall, OrePrefixes.spring, OrePrefixes.arrowGtWood, OrePrefixes.arrowGtPlastic, OrePrefixes.gemChipped, OrePrefixes.gemFlawed, OrePrefixes.gemFlawless, OrePrefixes.gemExquisite, OrePrefixes.gearGt); + super( + "metaitem.02", + OrePrefixes.toolHeadSword, + OrePrefixes.toolHeadPickaxe, + OrePrefixes.toolHeadShovel, + OrePrefixes.toolHeadAxe, + OrePrefixes.toolHeadHoe, + OrePrefixes.toolHeadHammer, + OrePrefixes.toolHeadFile, + OrePrefixes.toolHeadSaw, + OrePrefixes.toolHeadDrill, + OrePrefixes.toolHeadChainsaw, + OrePrefixes.toolHeadWrench, + OrePrefixes.toolHeadUniversalSpade, + OrePrefixes.toolHeadSense, + OrePrefixes.toolHeadPlow, + OrePrefixes.toolHeadArrow, + OrePrefixes.toolHeadBuzzSaw, + OrePrefixes.turbineBlade, + null, + OrePrefixes.itemCasing, + OrePrefixes.wireFine, + OrePrefixes.gearGtSmall, + OrePrefixes.rotor, + OrePrefixes.stickLong, + OrePrefixes.springSmall, + OrePrefixes.spring, + OrePrefixes.arrowGtWood, + OrePrefixes.arrowGtPlastic, + OrePrefixes.gemChipped, + OrePrefixes.gemFlawed, + OrePrefixes.gemFlawless, + OrePrefixes.gemExquisite, + OrePrefixes.gearGt); INSTANCE = this; int tLastID = 0; - ItemList.ThermosCan_Dark_Coffee.set(addItem(tLastID = 0, "Dark Coffee", "Coffee, dark, without anything else", new GT_FoodStat(2, 0.2F, EnumAction.drink, ItemList.ThermosCan_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.moveSpeed.id, 400, 1, 70, Potion.digSpeed.id, 400, 1, 70), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L))); - ItemList.ThermosCan_Dark_Cafe_au_lait.set(addItem(tLastID = 1, "Dark Coffee au lait", "Keeping you awake the whole night", SubTag.INVISIBLE, new GT_FoodStat(2, 0.2F, EnumAction.drink, ItemList.ThermosCan_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.moveSpeed.id, 400, 2, 90, Potion.digSpeed.id, 400, 2, 90), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 3L))); - ItemList.ThermosCan_Coffee.set(addItem(tLastID = 2, "Coffee", "Just the regular morning Coffee", new GT_FoodStat(3, 0.4F, EnumAction.drink, ItemList.ThermosCan_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.moveSpeed.id, 400, 0, 50, Potion.digSpeed.id, 400, 0, 50), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L))); - ItemList.ThermosCan_Cafe_au_lait.set(addItem(tLastID = 3, "Cafe au lait", "Sweet Coffee", new GT_FoodStat(3, 0.4F, EnumAction.drink, ItemList.ThermosCan_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.moveSpeed.id, 400, 1, 70, Potion.digSpeed.id, 400, 1, 70), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L))); - ItemList.ThermosCan_Lait_au_cafe.set(addItem(tLastID = 4, "Lait au cafe", "You want Coffee to your Sugar?", SubTag.INVISIBLE, new GT_FoodStat(3, 0.4F, EnumAction.drink, ItemList.ThermosCan_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.moveSpeed.id, 400, 2, 90, Potion.digSpeed.id, 400, 2, 90), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 3L))); - ItemList.ThermosCan_Dark_Chocolate_Milk.set(addItem(tLastID = 5, "Dark Chocolate Milk", "A bit bitter, better add a bit Sugar", new GT_FoodStat(3, 0.4F, EnumAction.drink, ItemList.ThermosCan_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.regeneration.id, 50, 1, 60), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); - ItemList.ThermosCan_Chocolate_Milk.set(addItem(tLastID = 6, "Chocolate Milk", "Sweet Goodness", new GT_FoodStat(3, 0.4F, EnumAction.drink, ItemList.ThermosCan_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.regeneration.id, 50, 1, 90), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 2L))); - ItemList.ThermosCan_Tea.set(addItem(tLastID = 7, "Tea", "Keep calm and carry on", new GT_FoodStat(2, 0.2F, EnumAction.drink, ItemList.ThermosCan_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.moveSlowdown.id, 300, 0, 50), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); - ItemList.ThermosCan_Sweet_Tea.set(addItem(tLastID = 8, "Sweet Tea", "How about a Tea Party? In Boston?", SubTag.INVISIBLE, new GT_FoodStat(2, 0.2F, EnumAction.drink, ItemList.ThermosCan_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); - ItemList.ThermosCan_Ice_Tea.set(addItem(tLastID = 9, "Ice Tea", "Better than this purple Junk Drink from failed Potions", new GT_FoodStat(2, 0.2F, EnumAction.drink, ItemList.ThermosCan_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.moveSlowdown.id, 300, 0, 50), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); + ItemList.ThermosCan_Dark_Coffee.set(addItem( + tLastID = 0, + "Dark Coffee", + "Coffee, dark, without anything else", + new GT_FoodStat( + 2, + 0.2F, + EnumAction.drink, + ItemList.ThermosCan_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.moveSpeed.id, + 400, + 1, + 70, + Potion.digSpeed.id, + 400, + 1, + 70), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L))); + ItemList.ThermosCan_Dark_Cafe_au_lait.set(addItem( + tLastID = 1, + "Dark Coffee au lait", + "Keeping you awake the whole night", + SubTag.INVISIBLE, + new GT_FoodStat( + 2, + 0.2F, + EnumAction.drink, + ItemList.ThermosCan_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.moveSpeed.id, + 400, + 2, + 90, + Potion.digSpeed.id, + 400, + 2, + 90), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 3L))); + ItemList.ThermosCan_Coffee.set(addItem( + tLastID = 2, + "Coffee", + "Just the regular morning Coffee", + new GT_FoodStat( + 3, + 0.4F, + EnumAction.drink, + ItemList.ThermosCan_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.moveSpeed.id, + 400, + 0, + 50, + Potion.digSpeed.id, + 400, + 0, + 50), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L))); + ItemList.ThermosCan_Cafe_au_lait.set(addItem( + tLastID = 3, + "Cafe au lait", + "Sweet Coffee", + new GT_FoodStat( + 3, + 0.4F, + EnumAction.drink, + ItemList.ThermosCan_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.moveSpeed.id, + 400, + 1, + 70, + Potion.digSpeed.id, + 400, + 1, + 70), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L))); + ItemList.ThermosCan_Lait_au_cafe.set(addItem( + tLastID = 4, + "Lait au cafe", + "You want Coffee to your Sugar?", + SubTag.INVISIBLE, + new GT_FoodStat( + 3, + 0.4F, + EnumAction.drink, + ItemList.ThermosCan_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.moveSpeed.id, + 400, + 2, + 90, + Potion.digSpeed.id, + 400, + 2, + 90), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 3L))); + ItemList.ThermosCan_Dark_Chocolate_Milk.set(addItem( + tLastID = 5, + "Dark Chocolate Milk", + "A bit bitter, better add a bit Sugar", + new GT_FoodStat( + 3, + 0.4F, + EnumAction.drink, + ItemList.ThermosCan_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.regeneration.id, + 50, + 1, + 60), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); + ItemList.ThermosCan_Chocolate_Milk.set(addItem( + tLastID = 6, + "Chocolate Milk", + "Sweet Goodness", + new GT_FoodStat( + 3, + 0.4F, + EnumAction.drink, + ItemList.ThermosCan_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.regeneration.id, + 50, + 1, + 90), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 2L))); + ItemList.ThermosCan_Tea.set(addItem( + tLastID = 7, + "Tea", + "Keep calm and carry on", + new GT_FoodStat( + 2, + 0.2F, + EnumAction.drink, + ItemList.ThermosCan_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.moveSlowdown.id, + 300, + 0, + 50), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); + ItemList.ThermosCan_Sweet_Tea.set(addItem( + tLastID = 8, + "Sweet Tea", + "How about a Tea Party? In Boston?", + SubTag.INVISIBLE, + new GT_FoodStat( + 2, + 0.2F, + EnumAction.drink, + ItemList.ThermosCan_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); + ItemList.ThermosCan_Ice_Tea.set(addItem( + tLastID = 9, + "Ice Tea", + "Better than this purple Junk Drink from failed Potions", + new GT_FoodStat( + 2, + 0.2F, + EnumAction.drink, + ItemList.ThermosCan_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.moveSlowdown.id, + 300, + 0, + 50), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); ItemList.GelledToluene.set(addItem(tLastID = 10, "Gelled Toluene", "Raw Explosive")); - ItemList.Bottle_Purple_Drink.set(addItem(tLastID = 100, "Purple Drink", "How about Lemonade. Or some Ice Tea? I got Purple Drink!", new GT_FoodStat(8, 0.2F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.moveSlowdown.id, 400, 1, 90), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VINCULUM, 1L))); - ItemList.Bottle_Grape_Juice.set(addItem(tLastID = 101, "Grape Juice", "This has a cleaning effect on your internals.", new GT_FoodStat(4, 0.2F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.hunger.id, 400, 1, 60), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); - ItemList.Bottle_Wine.set(addItem(tLastID = 102, "Wine", "Ordinary", new GT_FoodStat(2, 0.2F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.confusion.id, 400, 1, 60, Potion.heal.id, 0, 0, 60, Potion.poison.id, 200, 1, 5), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); - ItemList.Bottle_Vinegar.set(addItem(tLastID = 103, "Vinegar", "Exquisite", new GT_FoodStat(2, 0.2F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.confusion.id, 400, 1, 90, Potion.heal.id, 0, 1, 90, Potion.poison.id, 200, 2, 10, Potion.harm.id, 0, 2, 5), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); - ItemList.Bottle_Potato_Juice.set(addItem(tLastID = 104, "Potato Juice", "Ever seen Potato Juice in stores? No? That has a reason.", SubTag.INVISIBLE, new GT_FoodStat(3, 0.3F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L))); - ItemList.Bottle_Vodka.set(addItem(tLastID = 105, "Vodka", "Not to confuse with Water", new GT_FoodStat(2, 0.2F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.confusion.id, 500, 0, 60, Potion.damageBoost.id, 500, 1, 60, Potion.poison.id, 200, 1, 5), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L))); - ItemList.Bottle_Leninade.set(addItem(tLastID = 106, "Leninade", "Let the Communism flow through you!", SubTag.INVISIBLE, new GT_FoodStat(2, 0.2F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.confusion.id, 500, 1, 90, Potion.damageBoost.id, 500, 2, 90, Potion.poison.id, 200, 2, 10, Potion.harm.id, 0, 2, 5), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 2L))); - ItemList.Bottle_Mineral_Water.set(addItem(tLastID = 107, "Mineral Water", "The best Stuff you can drink to stay healthy", new GT_FoodStat(1, 0.1F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.regeneration.id, 100, 1, 10), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); - ItemList.Bottle_Salty_Water.set(addItem(tLastID = 108, "Salty Water", "Like Sea Water but less dirty", SubTag.INVISIBLE, new GT_FoodStat(1, 0.0F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.hunger.id, 400, 2, 95), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.TEMPESTAS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); - ItemList.Bottle_Reed_Water.set(addItem(tLastID = 109, "Reed Water", "I guess this tastes better when fermented", new GT_FoodStat(1, 0.1F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); - ItemList.Bottle_Rum.set(addItem(tLastID = 110, "Rum", "A buddle o' rum", new GT_FoodStat(4, 0.4F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.confusion.id, 300, 0, 60, Potion.damageBoost.id, 300, 1, 60, Potion.poison.id, 200, 1, 5), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); - ItemList.Bottle_Pirate_Brew.set(addItem(tLastID = 111, "Pirate Brew", "Set the Sails, we are going to Torrentuga!", new GT_FoodStat(4, 0.4F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.confusion.id, 300, 1, 90, Potion.damageBoost.id, 300, 2, 90, Potion.poison.id, 200, 2, 10, Potion.harm.id, 0, 2, 5), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 2L))); - ItemList.Bottle_Hops_Juice.set(addItem(tLastID = 112, "Hops Juice", "Every Beer has a start", new GT_FoodStat(1, 0.1F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L))); - ItemList.Bottle_Dark_Beer.set(addItem(tLastID = 113, "Dark Beer", "Dark Beer, for the real Men", new GT_FoodStat(4, 0.4F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.confusion.id, 300, 1, 60, Potion.damageBoost.id, 300, 1, 60, Potion.poison.id, 200, 1, 5), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); - ItemList.Bottle_Dragon_Blood.set(addItem(tLastID = 114, "Dragon Blood", "FUS RO DAH!", new GT_FoodStat(4, 0.4F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.confusion.id, 300, 2, 90, Potion.damageBoost.id, 300, 2, 90, Potion.poison.id, 200, 2, 10, Potion.harm.id, 0, 2, 5), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); - ItemList.Bottle_Wheaty_Juice.set(addItem(tLastID = 115, "Wheaty Juice", "Is this liquefied Bread or what?", new GT_FoodStat(2, 0.1F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L))); - ItemList.Bottle_Scotch.set(addItem(tLastID = 116, "Scotch", "Technically this is just a Whisky", SubTag.INVISIBLE, new GT_FoodStat(2, 0.1F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.confusion.id, 400, 0, 60, Potion.resistance.id, 400, 1, 60, Potion.poison.id, 200, 1, 5), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 1L))); - ItemList.Bottle_Glen_McKenner.set(addItem(tLastID = 117, "Glen McKenner", "Don't hand to easily surprised people, they will shatter it.", SubTag.INVISIBLE, new GT_FoodStat(2, 0.1F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.confusion.id, 400, 1, 90, Potion.resistance.id, 400, 2, 90, Potion.poison.id, 200, 2, 10, Potion.harm.id, 0, 2, 5), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 2L))); - ItemList.Bottle_Wheaty_Hops_Juice.set(addItem(tLastID = 118, "Wheaty Hops Juice", "Also known as 'Duff-Lite'", new GT_FoodStat(1, 0.1F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 2L))); - ItemList.Bottle_Beer.set(addItem(tLastID = 119, "Beer", "Good old Beer", new GT_FoodStat(6, 0.4F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.confusion.id, 400, 0, 60, Potion.digSpeed.id, 400, 2, 60, Potion.poison.id, 100, 0, 5), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 1L))); - ItemList.Bottle_Chilly_Sauce.set(addItem(tLastID = 120, "Chilly Sauce", "Spicy", new GT_FoodStat(2, 0.1F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.confusion.id, 1000, 0, 10, Potion.fireResistance.id, 1000, 0, 60), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); - ItemList.Bottle_Hot_Sauce.set(addItem(tLastID = 121, "Hot Sauce", "Very Spicy, I guess?", new GT_FoodStat(2, 0.1F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.confusion.id, 2000, 0, 30, Potion.fireResistance.id, 2000, 0, 70), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 2L))); - ItemList.Bottle_Diabolo_Sauce.set(addItem(tLastID = 122, "Diabolo Sauce", "As if the Devil made this Sauce", SubTag.INVISIBLE, new GT_FoodStat(2, 0.1F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.confusion.id, 3000, 1, 50, Potion.fireResistance.id, 3000, 0, 80), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 3L))); - ItemList.Bottle_Diablo_Sauce.set(addItem(tLastID = 123, "Diablo Sauce", "Diablo always comes back!", SubTag.INVISIBLE, new GT_FoodStat(2, 0.1F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.confusion.id, 4000, 1, 70, Potion.fireResistance.id, 4000, 0, 90), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 4L))); - ItemList.Bottle_Snitches_Glitch_Sauce.set(addItem(tLastID = 124, "Old Man Snitches glitched Diablo Sauce", "[Missing No]", SubTag.INVISIBLE, new GT_FoodStat(2, 0.1F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.confusion.id, 9999, 2, 999, Potion.fireResistance.id, 9999, 9, 999), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 5L))); - ItemList.Bottle_Apple_Juice.set(addItem(tLastID = 125, "Apple Juice", "Made of the Apples from our best Oak Farms", new GT_FoodStat(4, 0.2F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.hunger.id, 400, 0, 20), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); - ItemList.Bottle_Cider.set(addItem(tLastID = 126, "Cider", "If you have nothing better to do with your Apples", new GT_FoodStat(4, 0.2F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.confusion.id, 400, 0, 60, Potion.resistance.id, 400, 1, 60, Potion.poison.id, 200, 1, 5), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 1L))); - ItemList.Bottle_Golden_Apple_Juice.set(addItem(tLastID = 127, "Golden Apple Juice", "A golden Apple in liquid form", SubTag.INVISIBLE, new GT_FoodStat(4, 0.2F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.hunger.id, 400, 0, 20, Potion.field_76444_x.id, 2400, 0, 100, Potion.regeneration.id, 100, 1, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); - ItemList.Bottle_Golden_Cider.set(addItem(tLastID = 128, "Golden Cider", "More Resistance, less Regeneration", SubTag.INVISIBLE, new GT_FoodStat(4, 0.2F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.confusion.id, 400, 0, 60, Potion.field_76444_x.id, 2400, 1, 95, Potion.poison.id, 200, 1, 5), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 1L))); - ItemList.Bottle_Iduns_Apple_Juice.set(addItem(tLastID = 129, "Idun's Apple Juice", "So you got the Idea of using Notch Apples for a drink?", SubTag.INVISIBLE, new GT_FoodStat(4, 0.2F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.regeneration.id, 600, 4, 100, Potion.field_76444_x.id, 2400, 0, 100, Potion.resistance.id, 6000, 0, 100, Potion.fireResistance.id, 6000, 0, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 9L))); - ItemList.Bottle_Notches_Brew.set(addItem(tLastID = 130, "Notches Brew", "This is just overpowered", SubTag.INVISIBLE, new GT_FoodStat(4, 0.2F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.regeneration.id, 700, 4, 95, Potion.field_76444_x.id, 3000, 1, 95, Potion.resistance.id, 7000, 1, 95, Potion.fireResistance.id, 7000, 0, 95, Potion.harm.id, 0, 2, 20), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 9L))); - ItemList.Bottle_Lemon_Juice.set(addItem(tLastID = 131, "Lemon Juice", "Maybe adding Sugar will make it less sour", new GT_FoodStat(2, 0.4F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.digSpeed.id, 1200, 0, 60), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 1L))); - ItemList.Bottle_Limoncello.set(addItem(tLastID = 132, "Limoncello", "An alcoholic Drink which tastes like Lemons", new GT_FoodStat(2, 0.4F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.digSpeed.id, 1200, 0, 90, Potion.poison.id, 200, 1, 5), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 1L))); - ItemList.Bottle_Lemonade.set(addItem(tLastID = 133, "Lemonade", "Cold and refreshing Lemonade", new GT_FoodStat(4, 0.3F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.digSpeed.id, 900, 1, 90), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 1L))); - ItemList.Bottle_Alcopops.set(addItem(tLastID = 134, "Alcopops", "Don't let your Children drink this junk!", new GT_FoodStat(2, 0.2F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.digSpeed.id, 900, 1, 90, Potion.poison.id, 300, 2, 20), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VINCULUM, 1L))); - ItemList.Bottle_Cave_Johnsons_Grenade_Juice.set(addItem(tLastID = 135, "Cave Johnson's Grenade Juice", "When life gives you Lemons, make Life take them Lemons back!", SubTag.INVISIBLE, new GT_FoodStat(0, 0.0F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false).setExplosive(), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MORTUUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 1L))); - ItemList.Bottle_Milk.set(addItem(tLastID = 136, "Milk", "Got Milk?", OrePrefixes.bottle.get(Materials.Milk), new GT_FoodStat(0, 0.0F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false).setMilk(), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); - ItemList.Bottle_Holy_Water.set(addItem(tLastID = 137, "Holy Water", "May the holy Planks be with you", OrePrefixes.bottle.get(Materials.HolyWater), new GT_FoodStat(0, 0.0F, EnumAction.drink, ItemList.Bottle_Empty.get(1L), GregTech_API.sDrinksAlwaysDrinkable, false, false, Potion.poison.id, 100, 1, 100).setMilk(), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L))); - - - - ItemList.Food_Potato_On_Stick.set(addItem(tLastID = 200, "Potato on a Stick", "Totally looks like a Crab Claw", new GT_FoodStat(1, 0.3F, EnumAction.eat, new ItemStack(Items.stick, 1), false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); - ItemList.Food_Potato_On_Stick_Roasted.set(addItem(tLastID = 201, "Roasted Potato on a Stick", "Still looks like a Crab Claw", new GT_FoodStat(6, 0.6F, EnumAction.eat, new ItemStack(Items.stick, 1), false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); - ItemList.Food_Raw_Fries.set(addItem(tLastID = 202, "Potato Strips", "It's Potato in Stripe Form", new GT_FoodStat(1, 0.3F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); + ItemList.Bottle_Purple_Drink.set(addItem( + tLastID = 100, + "Purple Drink", + "How about Lemonade. Or some Ice Tea? I got Purple Drink!", + new GT_FoodStat( + 8, + 0.2F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.moveSlowdown.id, + 400, + 1, + 90), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VINCULUM, 1L))); + ItemList.Bottle_Grape_Juice.set(addItem( + tLastID = 101, + "Grape Juice", + "This has a cleaning effect on your internals.", + new GT_FoodStat( + 4, + 0.2F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.hunger.id, + 400, + 1, + 60), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); + ItemList.Bottle_Wine.set(addItem( + tLastID = 102, + "Wine", + "Ordinary", + new GT_FoodStat( + 2, + 0.2F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 400, + 1, + 60, + Potion.heal.id, + 0, + 0, + 60, + Potion.poison.id, + 200, + 1, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); + ItemList.Bottle_Vinegar.set(addItem( + tLastID = 103, + "Vinegar", + "Exquisite", + new GT_FoodStat( + 2, + 0.2F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 400, + 1, + 90, + Potion.heal.id, + 0, + 1, + 90, + Potion.poison.id, + 200, + 2, + 10, + Potion.harm.id, + 0, + 2, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); + ItemList.Bottle_Potato_Juice.set(addItem( + tLastID = 104, + "Potato Juice", + "Ever seen Potato Juice in stores? No? That has a reason.", + SubTag.INVISIBLE, + new GT_FoodStat( + 3, + 0.3F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L))); + ItemList.Bottle_Vodka.set(addItem( + tLastID = 105, + "Vodka", + "Not to confuse with Water", + new GT_FoodStat( + 2, + 0.2F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 500, + 0, + 60, + Potion.damageBoost.id, + 500, + 1, + 60, + Potion.poison.id, + 200, + 1, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L))); + ItemList.Bottle_Leninade.set(addItem( + tLastID = 106, + "Leninade", + "Let the Communism flow through you!", + SubTag.INVISIBLE, + new GT_FoodStat( + 2, + 0.2F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 500, + 1, + 90, + Potion.damageBoost.id, + 500, + 2, + 90, + Potion.poison.id, + 200, + 2, + 10, + Potion.harm.id, + 0, + 2, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 2L))); + ItemList.Bottle_Mineral_Water.set(addItem( + tLastID = 107, + "Mineral Water", + "The best Stuff you can drink to stay healthy", + new GT_FoodStat( + 1, + 0.1F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.regeneration.id, + 100, + 1, + 10), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); + ItemList.Bottle_Salty_Water.set(addItem( + tLastID = 108, + "Salty Water", + "Like Sea Water but less dirty", + SubTag.INVISIBLE, + new GT_FoodStat( + 1, + 0.0F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.hunger.id, + 400, + 2, + 95), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TEMPESTAS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + ItemList.Bottle_Reed_Water.set(addItem( + tLastID = 109, + "Reed Water", + "I guess this tastes better when fermented", + new GT_FoodStat( + 1, + 0.1F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); + ItemList.Bottle_Rum.set(addItem( + tLastID = 110, + "Rum", + "A buddle o' rum", + new GT_FoodStat( + 4, + 0.4F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 300, + 0, + 60, + Potion.damageBoost.id, + 300, + 1, + 60, + Potion.poison.id, + 200, + 1, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); + ItemList.Bottle_Pirate_Brew.set(addItem( + tLastID = 111, + "Pirate Brew", + "Set the Sails, we are going to Torrentuga!", + new GT_FoodStat( + 4, + 0.4F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 300, + 1, + 90, + Potion.damageBoost.id, + 300, + 2, + 90, + Potion.poison.id, + 200, + 2, + 10, + Potion.harm.id, + 0, + 2, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 2L))); + ItemList.Bottle_Hops_Juice.set(addItem( + tLastID = 112, + "Hops Juice", + "Every Beer has a start", + new GT_FoodStat( + 1, + 0.1F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L))); + ItemList.Bottle_Dark_Beer.set(addItem( + tLastID = 113, + "Dark Beer", + "Dark Beer, for the real Men", + new GT_FoodStat( + 4, + 0.4F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 300, + 1, + 60, + Potion.damageBoost.id, + 300, + 1, + 60, + Potion.poison.id, + 200, + 1, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); + ItemList.Bottle_Dragon_Blood.set(addItem( + tLastID = 114, + "Dragon Blood", + "FUS RO DAH!", + new GT_FoodStat( + 4, + 0.4F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 300, + 2, + 90, + Potion.damageBoost.id, + 300, + 2, + 90, + Potion.poison.id, + 200, + 2, + 10, + Potion.harm.id, + 0, + 2, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); + ItemList.Bottle_Wheaty_Juice.set(addItem( + tLastID = 115, + "Wheaty Juice", + "Is this liquefied Bread or what?", + new GT_FoodStat( + 2, + 0.1F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L))); + ItemList.Bottle_Scotch.set(addItem( + tLastID = 116, + "Scotch", + "Technically this is just a Whisky", + SubTag.INVISIBLE, + new GT_FoodStat( + 2, + 0.1F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 400, + 0, + 60, + Potion.resistance.id, + 400, + 1, + 60, + Potion.poison.id, + 200, + 1, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 1L))); + ItemList.Bottle_Glen_McKenner.set(addItem( + tLastID = 117, + "Glen McKenner", + "Don't hand to easily surprised people, they will shatter it.", + SubTag.INVISIBLE, + new GT_FoodStat( + 2, + 0.1F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 400, + 1, + 90, + Potion.resistance.id, + 400, + 2, + 90, + Potion.poison.id, + 200, + 2, + 10, + Potion.harm.id, + 0, + 2, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 2L))); + ItemList.Bottle_Wheaty_Hops_Juice.set(addItem( + tLastID = 118, + "Wheaty Hops Juice", + "Also known as 'Duff-Lite'", + new GT_FoodStat( + 1, + 0.1F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 2L))); + ItemList.Bottle_Beer.set(addItem( + tLastID = 119, + "Beer", + "Good old Beer", + new GT_FoodStat( + 6, + 0.4F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 400, + 0, + 60, + Potion.digSpeed.id, + 400, + 2, + 60, + Potion.poison.id, + 100, + 0, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 1L))); + ItemList.Bottle_Chilly_Sauce.set(addItem( + tLastID = 120, + "Chilly Sauce", + "Spicy", + new GT_FoodStat( + 2, + 0.1F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 1000, + 0, + 10, + Potion.fireResistance.id, + 1000, + 0, + 60), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Bottle_Hot_Sauce.set(addItem( + tLastID = 121, + "Hot Sauce", + "Very Spicy, I guess?", + new GT_FoodStat( + 2, + 0.1F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 2000, + 0, + 30, + Potion.fireResistance.id, + 2000, + 0, + 70), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 2L))); + ItemList.Bottle_Diabolo_Sauce.set(addItem( + tLastID = 122, + "Diabolo Sauce", + "As if the Devil made this Sauce", + SubTag.INVISIBLE, + new GT_FoodStat( + 2, + 0.1F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 3000, + 1, + 50, + Potion.fireResistance.id, + 3000, + 0, + 80), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 3L))); + ItemList.Bottle_Diablo_Sauce.set(addItem( + tLastID = 123, + "Diablo Sauce", + "Diablo always comes back!", + SubTag.INVISIBLE, + new GT_FoodStat( + 2, + 0.1F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 4000, + 1, + 70, + Potion.fireResistance.id, + 4000, + 0, + 90), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 4L))); + ItemList.Bottle_Snitches_Glitch_Sauce.set(addItem( + tLastID = 124, + "Old Man Snitches glitched Diablo Sauce", + "[Missing No]", + SubTag.INVISIBLE, + new GT_FoodStat( + 2, + 0.1F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 9999, + 2, + 999, + Potion.fireResistance.id, + 9999, + 9, + 999), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 5L))); + ItemList.Bottle_Apple_Juice.set(addItem( + tLastID = 125, + "Apple Juice", + "Made of the Apples from our best Oak Farms", + new GT_FoodStat( + 4, + 0.2F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.hunger.id, + 400, + 0, + 20), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); + ItemList.Bottle_Cider.set(addItem( + tLastID = 126, + "Cider", + "If you have nothing better to do with your Apples", + new GT_FoodStat( + 4, + 0.2F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 400, + 0, + 60, + Potion.resistance.id, + 400, + 1, + 60, + Potion.poison.id, + 200, + 1, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 1L))); + ItemList.Bottle_Golden_Apple_Juice.set(addItem( + tLastID = 127, + "Golden Apple Juice", + "A golden Apple in liquid form", + SubTag.INVISIBLE, + new GT_FoodStat( + 4, + 0.2F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.hunger.id, + 400, + 0, + 20, + Potion.field_76444_x.id, + 2400, + 0, + 100, + Potion.regeneration.id, + 100, + 1, + 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); + ItemList.Bottle_Golden_Cider.set(addItem( + tLastID = 128, + "Golden Cider", + "More Resistance, less Regeneration", + SubTag.INVISIBLE, + new GT_FoodStat( + 4, + 0.2F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 400, + 0, + 60, + Potion.field_76444_x.id, + 2400, + 1, + 95, + Potion.poison.id, + 200, + 1, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 1L))); + ItemList.Bottle_Iduns_Apple_Juice.set(addItem( + tLastID = 129, + "Idun's Apple Juice", + "So you got the Idea of using Notch Apples for a drink?", + SubTag.INVISIBLE, + new GT_FoodStat( + 4, + 0.2F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.regeneration.id, + 600, + 4, + 100, + Potion.field_76444_x.id, + 2400, + 0, + 100, + Potion.resistance.id, + 6000, + 0, + 100, + Potion.fireResistance.id, + 6000, + 0, + 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 9L))); + ItemList.Bottle_Notches_Brew.set(addItem( + tLastID = 130, + "Notches Brew", + "This is just overpowered", + SubTag.INVISIBLE, + new GT_FoodStat( + 4, + 0.2F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.regeneration.id, + 700, + 4, + 95, + Potion.field_76444_x.id, + 3000, + 1, + 95, + Potion.resistance.id, + 7000, + 1, + 95, + Potion.fireResistance.id, + 7000, + 0, + 95, + Potion.harm.id, + 0, + 2, + 20), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 9L))); + ItemList.Bottle_Lemon_Juice.set(addItem( + tLastID = 131, + "Lemon Juice", + "Maybe adding Sugar will make it less sour", + new GT_FoodStat( + 2, + 0.4F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.digSpeed.id, + 1200, + 0, + 60), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 1L))); + ItemList.Bottle_Limoncello.set(addItem( + tLastID = 132, + "Limoncello", + "An alcoholic Drink which tastes like Lemons", + new GT_FoodStat( + 2, + 0.4F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.digSpeed.id, + 1200, + 0, + 90, + Potion.poison.id, + 200, + 1, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 1L))); + ItemList.Bottle_Lemonade.set(addItem( + tLastID = 133, + "Lemonade", + "Cold and refreshing Lemonade", + new GT_FoodStat( + 4, + 0.3F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.digSpeed.id, + 900, + 1, + 90), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 1L))); + ItemList.Bottle_Alcopops.set(addItem( + tLastID = 134, + "Alcopops", + "Don't let your Children drink this junk!", + new GT_FoodStat( + 2, + 0.2F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.digSpeed.id, + 900, + 1, + 90, + Potion.poison.id, + 300, + 2, + 20), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VINCULUM, 1L))); + ItemList.Bottle_Cave_Johnsons_Grenade_Juice.set(addItem( + tLastID = 135, + "Cave Johnson's Grenade Juice", + "When life gives you Lemons, make Life take them Lemons back!", + SubTag.INVISIBLE, + new GT_FoodStat( + 0, + 0.0F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false) + .setExplosive(), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MORTUUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 1L))); + ItemList.Bottle_Milk.set(addItem( + tLastID = 136, + "Milk", + "Got Milk?", + OrePrefixes.bottle.get(Materials.Milk), + new GT_FoodStat( + 0, + 0.0F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false) + .setMilk(), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); + ItemList.Bottle_Holy_Water.set(addItem( + tLastID = 137, + "Holy Water", + "May the holy Planks be with you", + OrePrefixes.bottle.get(Materials.HolyWater), + new GT_FoodStat( + 0, + 0.0F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.poison.id, + 100, + 1, + 100) + .setMilk(), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L))); + + ItemList.Food_Potato_On_Stick.set(addItem( + tLastID = 200, + "Potato on a Stick", + "Totally looks like a Crab Claw", + new GT_FoodStat(1, 0.3F, EnumAction.eat, new ItemStack(Items.stick, 1), false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Food_Potato_On_Stick_Roasted.set(addItem( + tLastID = 201, + "Roasted Potato on a Stick", + "Still looks like a Crab Claw", + new GT_FoodStat(6, 0.6F, EnumAction.eat, new ItemStack(Items.stick, 1), false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Raw_Fries.set(addItem( + tLastID = 202, + "Potato Strips", + "It's Potato in Stripe Form", + new GT_FoodStat(1, 0.3F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); setFluidContainerStats(32000 + tLastID, 0L, 16L); - ItemList.Food_Fries.set(addItem(tLastID = 203, "Fries", "Not to confuse with Fry the Delivery Boy", new GT_FoodStat(7, 0.5F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Fries.set(addItem( + tLastID = 203, + "Fries", + "Not to confuse with Fry the Delivery Boy", + new GT_FoodStat(7, 0.5F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); setFluidContainerStats(32000 + tLastID, 0L, 16L); - ItemList.Food_Packaged_Fries.set(addItem(tLastID = 204, "Fries", "Ketchup not included", new GT_FoodStat(7, 0.5F, EnumAction.eat, GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 1L), false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); - ItemList.Food_Raw_PotatoChips.set(addItem(tLastID = 205, "Potato Chips (Raw)", "Just like a Potato", new GT_FoodStat(1, 0.3F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); + ItemList.Food_Packaged_Fries.set(addItem( + tLastID = 204, + "Fries", + "Ketchup not included", + new GT_FoodStat( + 7, + 0.5F, + EnumAction.eat, + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 1L), + false, + true, + false), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Raw_PotatoChips.set(addItem( + tLastID = 205, + "Potato Chips (Raw)", + "Just like a Potato", + new GT_FoodStat(1, 0.3F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); setFluidContainerStats(32000 + tLastID, 0L, 16L); - ItemList.Food_PotatoChips.set(addItem(tLastID = 206, "Potato Chips", "Crunchy", new GT_FoodStat(7, 0.5F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_PotatoChips.set(addItem( + tLastID = 206, + "Potato Chips", + "Crunchy", + new GT_FoodStat(7, 0.5F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); setFluidContainerStats(32000 + tLastID, 0L, 16L); - ItemList.Food_ChiliChips.set(addItem(tLastID = 207, "Chili Chips", "Spicy", new GT_FoodStat(7, 0.6F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_ChiliChips.set(addItem( + tLastID = 207, + "Chili Chips", + "Spicy", + new GT_FoodStat(7, 0.6F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); setFluidContainerStats(32000 + tLastID, 0L, 16L); - ItemList.Food_Packaged_PotatoChips.set(addItem(tLastID = 208, "Bag of Potato Chips", "Full of delicious Air", new GT_FoodStat(7, 0.5F, EnumAction.eat, GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 1L), false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); - ItemList.Food_Packaged_ChiliChips.set(addItem(tLastID = 209, "Bag of Chili Chips", "Stop making noises Baj!", new GT_FoodStat(7, 0.6F, EnumAction.eat, GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 1L), false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); - ItemList.Food_Chum.set(addItem(tLastID = 210, "Chum", "Chum is Fum!", new GT_FoodStat(5, 0.2F, EnumAction.eat, null, true, false, true, Potion.hunger.id, 1000, 4, 100, Potion.confusion.id, 300, 1, 80), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); - ItemList.Food_Chum_On_Stick.set(addItem(tLastID = 211, "Chum on a Stick", "Don't forget to try our Chum-balaya", new GT_FoodStat(5, 0.2F, EnumAction.eat, new ItemStack(Items.stick, 1), true, false, true, Potion.hunger.id, 1000, 4, 100, Potion.confusion.id, 300, 1, 80), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); - ItemList.Food_Dough_Sugar.set(addItem(tLastID = 212, "Sugary Dough", "Don't eat the Dough before it is baken", new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); - ItemList.Food_Dough_Chocolate.set(addItem(tLastID = 213, "Chocolate Dough", "I said don't eat the Dough!", new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); - ItemList.Food_Raw_Cookie.set(addItem(tLastID = 214, "Cookie shaped Dough", "For baking Cookies", new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); - - ItemList.Food_Sliced_Buns.set(addItem(tLastID = 220, "Buns", "Pre Sliced", new GT_FoodStat(3, 0.5F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); - ItemList.Food_Burger_Veggie.set(addItem(tLastID = 221, "Veggieburger", "No matter how you call this, this is NOT a Burger!", new GT_FoodStat(3, 0.5F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); - ItemList.Food_Burger_Cheese.set(addItem(tLastID = 222, "Cheeseburger", "Cheesy!", new GT_FoodStat(3, 0.5F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new ItemData(Materials.Cheese, 907200L))); - ItemList.Food_Burger_Meat.set(addItem(tLastID = 223, "Hamburger", "The Mc Burger Queen Burger", new GT_FoodStat(3, 0.5F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); - ItemList.Food_Burger_Chum.set(addItem(tLastID = 224, "Chumburger", "Fum is Chum!", new GT_FoodStat(5, 0.2F, EnumAction.eat, null, true, false, true, Potion.hunger.id, 1000, 4, 100, Potion.confusion.id, 300, 1, 80), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); - - ItemList.Food_Sliced_Breads.set(addItem(tLastID = 230, "Breads", "Pre Sliced", new GT_FoodStat(5, 0.6F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); - ItemList.Food_Sandwich_Veggie.set(addItem(tLastID = 231, "Veggie Sandwich", "Meatless", new GT_FoodStat(7, 0.6F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Packaged_PotatoChips.set(addItem( + tLastID = 208, + "Bag of Potato Chips", + "Full of delicious Air", + new GT_FoodStat( + 7, + 0.5F, + EnumAction.eat, + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 1L), + false, + true, + false), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Packaged_ChiliChips.set(addItem( + tLastID = 209, + "Bag of Chili Chips", + "Stop making noises Baj!", + new GT_FoodStat( + 7, + 0.6F, + EnumAction.eat, + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 1L), + false, + true, + false), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Chum.set(addItem( + tLastID = 210, + "Chum", + "Chum is Fum!", + new GT_FoodStat( + 5, + 0.2F, + EnumAction.eat, + null, + true, + false, + true, + Potion.hunger.id, + 1000, + 4, + 100, + Potion.confusion.id, + 300, + 1, + 80), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Chum_On_Stick.set(addItem( + tLastID = 211, + "Chum on a Stick", + "Don't forget to try our Chum-balaya", + new GT_FoodStat( + 5, + 0.2F, + EnumAction.eat, + new ItemStack(Items.stick, 1), + true, + false, + true, + Potion.hunger.id, + 1000, + 4, + 100, + Potion.confusion.id, + 300, + 1, + 80), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Dough_Sugar.set(addItem( + tLastID = 212, + "Sugary Dough", + "Don't eat the Dough before it is baken", + new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + ItemList.Food_Dough_Chocolate.set(addItem( + tLastID = 213, + "Chocolate Dough", + "I said don't eat the Dough!", + new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + ItemList.Food_Raw_Cookie.set(addItem( + tLastID = 214, + "Cookie shaped Dough", + "For baking Cookies", + new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + + ItemList.Food_Sliced_Buns.set(addItem( + tLastID = 220, + "Buns", + "Pre Sliced", + new GT_FoodStat(3, 0.5F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Burger_Veggie.set(addItem( + tLastID = 221, + "Veggieburger", + "No matter how you call this, this is NOT a Burger!", + new GT_FoodStat(3, 0.5F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Burger_Cheese.set(addItem( + tLastID = 222, + "Cheeseburger", + "Cheesy!", + new GT_FoodStat(3, 0.5F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new ItemData(Materials.Cheese, 907200L))); + ItemList.Food_Burger_Meat.set(addItem( + tLastID = 223, + "Hamburger", + "The Mc Burger Queen Burger", + new GT_FoodStat(3, 0.5F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Burger_Chum.set(addItem( + tLastID = 224, + "Chumburger", + "Fum is Chum!", + new GT_FoodStat( + 5, + 0.2F, + EnumAction.eat, + null, + true, + false, + true, + Potion.hunger.id, + 1000, + 4, + 100, + Potion.confusion.id, + 300, + 1, + 80), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + + ItemList.Food_Sliced_Breads.set(addItem( + tLastID = 230, + "Breads", + "Pre Sliced", + new GT_FoodStat(5, 0.6F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Sandwich_Veggie.set(addItem( + tLastID = 231, + "Veggie Sandwich", + "Meatless", + new GT_FoodStat(7, 0.6F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); setFluidContainerStats(32000 + tLastID, 0L, 32L); - ItemList.Food_Sandwich_Cheese.set(addItem(tLastID = 232, "Cheese Sandwich", "Say Cheese!", new GT_FoodStat(7, 0.6F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Sandwich_Cheese.set(addItem( + tLastID = 232, + "Cheese Sandwich", + "Say Cheese!", + new GT_FoodStat(7, 0.6F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); setFluidContainerStats(32000 + tLastID, 0L, 32L); - ItemList.Food_Sandwich_Bacon.set(addItem(tLastID = 233, "Bacon Sandwich", "The best Sandwich ever!", new GT_FoodStat(10, 0.8F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Sandwich_Bacon.set(addItem( + tLastID = 233, + "Bacon Sandwich", + "The best Sandwich ever!", + new GT_FoodStat(10, 0.8F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); setFluidContainerStats(32000 + tLastID, 0L, 32L); - ItemList.Food_Sandwich_Steak.set(addItem(tLastID = 234, "Steak Sandwich", "Not a 'Steam Sandwich'", new GT_FoodStat(10, 0.8F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Sandwich_Steak.set(addItem( + tLastID = 234, + "Steak Sandwich", + "Not a 'Steam Sandwich'", + new GT_FoodStat(10, 0.8F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); setFluidContainerStats(32000 + tLastID, 0L, 32L); - ItemList.Food_Sliced_Baguettes.set(addItem(tLastID = 240, "Baguettes", "Pre Sliced", new GT_FoodStat(8, 0.5F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); - ItemList.Food_Large_Sandwich_Veggie.set(addItem(tLastID = 241, "Large Veggie Sandwich", "Just not worth it", new GT_FoodStat(15, 0.8F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Sliced_Baguettes.set(addItem( + tLastID = 240, + "Baguettes", + "Pre Sliced", + new GT_FoodStat(8, 0.5F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Large_Sandwich_Veggie.set(addItem( + tLastID = 241, + "Large Veggie Sandwich", + "Just not worth it", + new GT_FoodStat(15, 0.8F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); setFluidContainerStats(32000 + tLastID, 0L, 16L); - ItemList.Food_Large_Sandwich_Cheese.set(addItem(tLastID = 242, "Large Cheese Sandwich", "I need another cheesy tooltip for this", new GT_FoodStat(15, 0.8F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Large_Sandwich_Cheese.set(addItem( + tLastID = 242, + "Large Cheese Sandwich", + "I need another cheesy tooltip for this", + new GT_FoodStat(15, 0.8F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); setFluidContainerStats(32000 + tLastID, 0L, 16L); - ItemList.Food_Large_Sandwich_Bacon.set(addItem(tLastID = 243, "Large Bacon Sandwich", "For Men! (and manly Women)", new GT_FoodStat(20, 1.0F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Large_Sandwich_Bacon.set(addItem( + tLastID = 243, + "Large Bacon Sandwich", + "For Men! (and manly Women)", + new GT_FoodStat(20, 1.0F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); setFluidContainerStats(32000 + tLastID, 0L, 16L); - ItemList.Food_Large_Sandwich_Steak.set(addItem(tLastID = 244, "Large Steak Sandwich", "Yes, I once accidentially called it 'Steam Sandwich'", new GT_FoodStat(20, 1.0F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Large_Sandwich_Steak.set(addItem( + tLastID = 244, + "Large Steak Sandwich", + "Yes, I once accidentially called it 'Steam Sandwich'", + new GT_FoodStat(20, 1.0F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); setFluidContainerStats(32000 + tLastID, 0L, 16L); - ItemList.Food_Raw_Pizza_Veggie.set(addItem(tLastID = 250, "Raw Veggie Pizza", "Into the Oven with it!", new GT_FoodStat(1, 0.2F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); - ItemList.Food_Raw_Pizza_Cheese.set(addItem(tLastID = 251, "Raw Cheese Pizza", "Into the Oven with it!", new GT_FoodStat(2, 0.2F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); - ItemList.Food_Raw_Pizza_Meat.set(addItem(tLastID = 252, "Raw Mince Meat Pizza", "Into the Oven with it!", new GT_FoodStat(2, 0.2F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); - - ItemList.Food_Baked_Pizza_Veggie.set(addItem(tLastID = 260, "Veggie Pizza", "The next they want is Gluten Free Pizzas...", new GT_FoodStat(3, 0.3F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); - ItemList.Food_Baked_Pizza_Cheese.set(addItem(tLastID = 261, "Cheese Pizza", "Pizza Magarita", new GT_FoodStat(4, 0.4F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); - ItemList.Food_Baked_Pizza_Meat.set(addItem(tLastID = 262, "Mince Meat Pizza", "Emo Pizza, it cuts itself!", new GT_FoodStat(5, 0.5F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Raw_Pizza_Veggie.set(addItem( + tLastID = 250, + "Raw Veggie Pizza", + "Into the Oven with it!", + new GT_FoodStat(1, 0.2F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Raw_Pizza_Cheese.set(addItem( + tLastID = 251, + "Raw Cheese Pizza", + "Into the Oven with it!", + new GT_FoodStat(2, 0.2F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Raw_Pizza_Meat.set(addItem( + tLastID = 252, + "Raw Mince Meat Pizza", + "Into the Oven with it!", + new GT_FoodStat(2, 0.2F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Baked_Pizza_Veggie.set(addItem( + tLastID = 260, + "Veggie Pizza", + "The next they want is Gluten Free Pizzas...", + new GT_FoodStat(3, 0.3F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Baked_Pizza_Cheese.set(addItem( + tLastID = 261, + "Cheese Pizza", + "Pizza Magarita", + new GT_FoodStat(4, 0.4F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Baked_Pizza_Meat.set(addItem( + tLastID = 262, + "Mince Meat Pizza", + "Emo Pizza, it cuts itself!", + new GT_FoodStat(5, 0.5F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); - ItemList.Dye_Indigo.set(addItem(tLastID = 410, "Indigo Dye", "Blue Dye", new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L), Dyes.dyeBlue)); + ItemList.Dye_Indigo.set(addItem( + tLastID = 410, + "Indigo Dye", + "Blue Dye", + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L), + Dyes.dyeBlue)); for (byte i = 0; i < 16; i = (byte) (i + 1)) { - ItemList.DYE_ONLY_ITEMS[i].set(addItem(tLastID = 414 + i, Dyes.get(i).mName + " Dye", "", Dyes.get(i).name(), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L))); + ItemList.DYE_ONLY_ITEMS[i].set(addItem( + tLastID = 414 + i, + Dyes.get(i).mName + " Dye", + "", + Dyes.get(i).name(), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L))); } - ItemList.Plank_Oak.set(addItem(tLastID = 470, "Oak Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Oak.set( + addItem(tLastID = 470, "Oak Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Spruce.set(addItem(tLastID = 471, "Spruce Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Spruce.set(addItem( + tLastID = 471, "Spruce Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Birch.set(addItem(tLastID = 472, "Birch Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Birch.set( + addItem(tLastID = 472, "Birch Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Jungle.set(addItem(tLastID = 473, "Jungle Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Jungle.set(addItem( + tLastID = 473, "Jungle Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Acacia.set(addItem(tLastID = 474, "Acacia Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Acacia.set(addItem( + tLastID = 474, "Acacia Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_DarkOak.set(addItem(tLastID = 475, "Dark Oak Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_DarkOak.set(addItem( + tLastID = 475, "Dark Oak Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Larch.set(addItem(tLastID = 476, "Larch Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Larch.set( + addItem(tLastID = 476, "Larch Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Teak.set(addItem(tLastID = 477, "Teak Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Teak.set( + addItem(tLastID = 477, "Teak Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Acacia_Green.set(addItem(tLastID = 478, "Green Acacia Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Acacia_Green.set(addItem( + tLastID = 478, "Green Acacia Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Lime.set(addItem(tLastID = 479, "Lime Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Lime.set( + addItem(tLastID = 479, "Lime Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Chestnut.set(addItem(tLastID = 480, "Chestnut Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Chestnut.set(addItem( + tLastID = 480, "Chestnut Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Wenge.set(addItem(tLastID = 481, "Wenge Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Wenge.set( + addItem(tLastID = 481, "Wenge Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Baobab.set(addItem(tLastID = 482, "Baobab Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Baobab.set(addItem( + tLastID = 482, "Baobab Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Sequoia.set(addItem(tLastID = 483, "Sequoia Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Sequoia.set(addItem( + tLastID = 483, "Sequoia Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Kapok.set(addItem(tLastID = 484, "Kapok Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Kapok.set( + addItem(tLastID = 484, "Kapok Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Ebony.set(addItem(tLastID = 485, "Ebony Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Ebony.set( + addItem(tLastID = 485, "Ebony Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Mahagony.set(addItem(tLastID = 486, "Mahagony Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Mahagony.set(addItem( + tLastID = 486, "Mahagony Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Balsa.set(addItem(tLastID = 487, "Balsa Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Balsa.set( + addItem(tLastID = 487, "Balsa Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Willow.set(addItem(tLastID = 488, "Willow Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Willow.set(addItem( + tLastID = 488, "Willow Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Walnut.set(addItem(tLastID = 489, "Walnut Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Walnut.set(addItem( + tLastID = 489, "Walnut Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Greenheart.set(addItem(tLastID = 490, "Greenheart Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Greenheart.set(addItem( + tLastID = 490, "Greenheart Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Cherry.set(addItem(tLastID = 491, "Cherry Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Cherry.set(addItem( + tLastID = 491, "Cherry Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Mahoe.set(addItem(tLastID = 492, "Mahoe Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Mahoe.set( + addItem(tLastID = 492, "Mahoe Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Poplar.set(addItem(tLastID = 493, "Poplar Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Poplar.set(addItem( + tLastID = 493, "Poplar Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Palm.set(addItem(tLastID = 494, "Palm Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Palm.set( + addItem(tLastID = 494, "Palm Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Papaya.set(addItem(tLastID = 495, "Papaya Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Papaya.set(addItem( + tLastID = 495, "Papaya Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Pine.set(addItem(tLastID = 496, "Pine Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Pine.set( + addItem(tLastID = 496, "Pine Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Plum.set(addItem(tLastID = 497, "Plum Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Plum.set( + addItem(tLastID = 497, "Plum Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Maple.set(addItem(tLastID = 498, "Maple Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Maple.set( + addItem(tLastID = 498, "Maple Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Citrus.set(addItem(tLastID = 499, "Citrus Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Citrus.set(addItem( + tLastID = 499, "Citrus Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); ItemList.SFMixture.set(addItem(tLastID = 270, "Super Fuel Binder", "Raw Material")); ItemList.MSFMixture.set(addItem(tLastID = 271, "Magic Super Fuel Binder", "Raw Material")); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Oak.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 0)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Spruce.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 1)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Birch.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 2)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Jungle.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 3)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Acacia.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 4)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_DarkOak.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 5)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Larch.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs1", 1L, 0)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Teak.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs1", 1L, 1)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Acacia_Green.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs1", 1L, 2)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Lime.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs1", 1L, 3)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Chestnut.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs1", 1L, 4)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Wenge.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs1", 1L, 5)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Baobab.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs1", 1L, 6)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Sequoia.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs1", 1L, 7)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Kapok.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs2", 1L, 0)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Ebony.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs2", 1L, 1)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Mahagony.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs2", 1L, 2)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Balsa.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs2", 1L, 3)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Willow.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs2", 1L, 4)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Walnut.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs2", 1L, 5)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Greenheart.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs2", 1L, 6)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Cherry.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs2", 1L, 7)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Mahoe.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 0)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Poplar.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 1)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Palm.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 2)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Papaya.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 3)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Pine.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 4)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Plum.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 5)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Maple.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 6)}); - GT_ModHandler.addCraftingRecipe(ItemList.Plank_Citrus.get(2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 7)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Oak.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 0)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Spruce.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 1)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Birch.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 2)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Jungle.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 3)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Acacia.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 4)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_DarkOak.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 5)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Larch.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs1", 1L, 0)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Teak.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs1", 1L, 1)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Acacia_Green.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs1", 1L, 2)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Lime.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs1", 1L, 3)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Chestnut.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs1", 1L, 4)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Wenge.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs1", 1L, 5)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Baobab.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs1", 1L, 6)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Sequoia.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs1", 1L, 7)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Kapok.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs2", 1L, 0)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Ebony.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs2", 1L, 1)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Mahagony.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs2", 1L, 2)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Balsa.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs2", 1L, 3)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Willow.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs2", 1L, 4)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Walnut.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs2", 1L, 5)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Greenheart.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs2", 1L, 6)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Cherry.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs2", 1L, 7)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Mahoe.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 0)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Poplar.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 1)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Palm.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 2)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Papaya.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 3)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Pine.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 4)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Plum.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 5)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Maple.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 6)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Plank_Citrus.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', GT_ModHandler.getModItem(aTextForestry, "slabs3", 1L, 7)}); GregTech_API.registerCover(ItemList.Plank_Oak.get(1L), TextureFactory.of(Blocks.planks, 0), null); GregTech_API.registerCover(ItemList.Plank_Spruce.get(1L), TextureFactory.of(Blocks.planks, 1), null); @@ -257,51 +1809,277 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { GregTech_API.registerCover(ItemList.Plank_Jungle.get(1L), TextureFactory.of(Blocks.planks, 3), null); GregTech_API.registerCover(ItemList.Plank_Acacia.get(1L), TextureFactory.of(Blocks.planks, 4), null); GregTech_API.registerCover(ItemList.Plank_DarkOak.get(1L), TextureFactory.of(Blocks.planks, 5), null); - GregTech_API.registerCover(ItemList.Plank_Larch.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 0, new ItemStack(Blocks.planks, 1, 0))), 0), null); - GregTech_API.registerCover(ItemList.Plank_Teak.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 1, new ItemStack(Blocks.planks, 1, 0))), 1), null); - GregTech_API.registerCover(ItemList.Plank_Acacia_Green.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 2, new ItemStack(Blocks.planks, 1, 0))), 2), null); - GregTech_API.registerCover(ItemList.Plank_Lime.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 3, new ItemStack(Blocks.planks, 1, 0))), 3), null); - GregTech_API.registerCover(ItemList.Plank_Chestnut.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 4, new ItemStack(Blocks.planks, 1, 0))), 4), null); - GregTech_API.registerCover(ItemList.Plank_Wenge.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 5, new ItemStack(Blocks.planks, 1, 0))), 5), null); - GregTech_API.registerCover(ItemList.Plank_Baobab.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 6, new ItemStack(Blocks.planks, 1, 0))), 6), null); - GregTech_API.registerCover(ItemList.Plank_Sequoia.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 7, new ItemStack(Blocks.planks, 1, 0))), 7), null); - GregTech_API.registerCover(ItemList.Plank_Kapok.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 8, new ItemStack(Blocks.planks, 1, 0))), 8), null); - GregTech_API.registerCover(ItemList.Plank_Ebony.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 9, new ItemStack(Blocks.planks, 1, 0))), 9), null); - GregTech_API.registerCover(ItemList.Plank_Mahagony.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 10, new ItemStack(Blocks.planks, 1, 0))), 10), null); - GregTech_API.registerCover(ItemList.Plank_Balsa.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 11, new ItemStack(Blocks.planks, 1, 0))), 11), null); - GregTech_API.registerCover(ItemList.Plank_Willow.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 12, new ItemStack(Blocks.planks, 1, 0))), 12), null); - GregTech_API.registerCover(ItemList.Plank_Walnut.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 13, new ItemStack(Blocks.planks, 1, 0))), 13), null); - GregTech_API.registerCover(ItemList.Plank_Greenheart.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 14, new ItemStack(Blocks.planks, 1, 0))), 14), null); - GregTech_API.registerCover(ItemList.Plank_Cherry.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 15, new ItemStack(Blocks.planks, 1, 0))), 15), null); - GregTech_API.registerCover(ItemList.Plank_Mahoe.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 16, new ItemStack(Blocks.planks, 1, 0))), 0), null); - GregTech_API.registerCover(ItemList.Plank_Poplar.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 17, new ItemStack(Blocks.planks, 1, 0))), 1), null); - GregTech_API.registerCover(ItemList.Plank_Palm.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 18, new ItemStack(Blocks.planks, 1, 0))), 2), null); - GregTech_API.registerCover(ItemList.Plank_Papaya.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 19, new ItemStack(Blocks.planks, 1, 0))), 3), null); - GregTech_API.registerCover(ItemList.Plank_Pine.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 20, new ItemStack(Blocks.planks, 1, 0))), 4), null); - GregTech_API.registerCover(ItemList.Plank_Plum.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 21, new ItemStack(Blocks.planks, 1, 0))), 5), null); - GregTech_API.registerCover(ItemList.Plank_Maple.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 22, new ItemStack(Blocks.planks, 1, 0))), 6), null); - GregTech_API.registerCover(ItemList.Plank_Citrus.get(1L), TextureFactory.of(GT_Utility.getBlockFromStack(GT_ModHandler.getModItem(aTextForestry, "planks", 1L, 23, new ItemStack(Blocks.planks, 1, 0))), 7), null); - - ItemList.Crop_Drop_Plumbilia.set(addItem(tLastID = 500, "Plumbilia Leaf", "Source of Lead", new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 1L))); - ItemList.Crop_Drop_Argentia.set(addItem(tLastID = 501, "Argentia Leaf", "Source of Silver", new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); - ItemList.Crop_Drop_Indigo.set(addItem(tLastID = 502, "Indigo Blossom", "Used for making Blue Dye", new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L))); - ItemList.Crop_Drop_Ferru.set(addItem(tLastID = 503, "Ferru Leaf", "Source of Iron", new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L))); - ItemList.Crop_Drop_Aurelia.set(addItem(tLastID = 504, "Aurelia Leaf", "Source of Gold", new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); - ItemList.Crop_Drop_TeaLeaf.set(addItem(tLastID = 505, "Tea Leaf", "Source of Tea", "cropTea", new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); - - ItemList.Crop_Drop_OilBerry.set(addItem(tLastID = 510, "Oil Berry", "Oil in Berry form", new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); - ItemList.Crop_Drop_BobsYerUncleRanks.set(addItem(tLastID = 511, "Bobs-Yer-Uncle-Berry", "Source of Emeralds", new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); - ItemList.Crop_Drop_UUMBerry.set(addItem(tLastID = 512, "UUM Berry", "UUM in Berry form", new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); - ItemList.Crop_Drop_UUABerry.set(addItem(tLastID = 513, "UUA Berry", "UUA in Berry form", new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); - - ItemList.Crop_Drop_MilkWart.set(addItem(tLastID = 520, "Milk Wart", "Source of Milk", new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); - - ItemList.Crop_Drop_Coppon.set(addItem(tLastID = 530, "Coppon Fiber", "ORANGE WOOOOOOOL!!!", new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 1L))); - - ItemList.Crop_Drop_Tine.set(addItem(tLastID = 540, "Tine Twig", "Source of Tin", new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + GregTech_API.registerCover( + ItemList.Plank_Larch.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack(GT_ModHandler.getModItem( + aTextForestry, "planks", 1L, 0, new ItemStack(Blocks.planks, 1, 0))), + 0), + null); + GregTech_API.registerCover( + ItemList.Plank_Teak.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack(GT_ModHandler.getModItem( + aTextForestry, "planks", 1L, 1, new ItemStack(Blocks.planks, 1, 0))), + 1), + null); + GregTech_API.registerCover( + ItemList.Plank_Acacia_Green.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack(GT_ModHandler.getModItem( + aTextForestry, "planks", 1L, 2, new ItemStack(Blocks.planks, 1, 0))), + 2), + null); + GregTech_API.registerCover( + ItemList.Plank_Lime.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack(GT_ModHandler.getModItem( + aTextForestry, "planks", 1L, 3, new ItemStack(Blocks.planks, 1, 0))), + 3), + null); + GregTech_API.registerCover( + ItemList.Plank_Chestnut.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack(GT_ModHandler.getModItem( + aTextForestry, "planks", 1L, 4, new ItemStack(Blocks.planks, 1, 0))), + 4), + null); + GregTech_API.registerCover( + ItemList.Plank_Wenge.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack(GT_ModHandler.getModItem( + aTextForestry, "planks", 1L, 5, new ItemStack(Blocks.planks, 1, 0))), + 5), + null); + GregTech_API.registerCover( + ItemList.Plank_Baobab.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack(GT_ModHandler.getModItem( + aTextForestry, "planks", 1L, 6, new ItemStack(Blocks.planks, 1, 0))), + 6), + null); + GregTech_API.registerCover( + ItemList.Plank_Sequoia.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack(GT_ModHandler.getModItem( + aTextForestry, "planks", 1L, 7, new ItemStack(Blocks.planks, 1, 0))), + 7), + null); + GregTech_API.registerCover( + ItemList.Plank_Kapok.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack(GT_ModHandler.getModItem( + aTextForestry, "planks", 1L, 8, new ItemStack(Blocks.planks, 1, 0))), + 8), + null); + GregTech_API.registerCover( + ItemList.Plank_Ebony.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack(GT_ModHandler.getModItem( + aTextForestry, "planks", 1L, 9, new ItemStack(Blocks.planks, 1, 0))), + 9), + null); + GregTech_API.registerCover( + ItemList.Plank_Mahagony.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack(GT_ModHandler.getModItem( + aTextForestry, "planks", 1L, 10, new ItemStack(Blocks.planks, 1, 0))), + 10), + null); + GregTech_API.registerCover( + ItemList.Plank_Balsa.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack(GT_ModHandler.getModItem( + aTextForestry, "planks", 1L, 11, new ItemStack(Blocks.planks, 1, 0))), + 11), + null); + GregTech_API.registerCover( + ItemList.Plank_Willow.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack(GT_ModHandler.getModItem( + aTextForestry, "planks", 1L, 12, new ItemStack(Blocks.planks, 1, 0))), + 12), + null); + GregTech_API.registerCover( + ItemList.Plank_Walnut.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack(GT_ModHandler.getModItem( + aTextForestry, "planks", 1L, 13, new ItemStack(Blocks.planks, 1, 0))), + 13), + null); + GregTech_API.registerCover( + ItemList.Plank_Greenheart.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack(GT_ModHandler.getModItem( + aTextForestry, "planks", 1L, 14, new ItemStack(Blocks.planks, 1, 0))), + 14), + null); + GregTech_API.registerCover( + ItemList.Plank_Cherry.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack(GT_ModHandler.getModItem( + aTextForestry, "planks", 1L, 15, new ItemStack(Blocks.planks, 1, 0))), + 15), + null); + GregTech_API.registerCover( + ItemList.Plank_Mahoe.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack(GT_ModHandler.getModItem( + aTextForestry, "planks", 1L, 16, new ItemStack(Blocks.planks, 1, 0))), + 0), + null); + GregTech_API.registerCover( + ItemList.Plank_Poplar.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack(GT_ModHandler.getModItem( + aTextForestry, "planks", 1L, 17, new ItemStack(Blocks.planks, 1, 0))), + 1), + null); + GregTech_API.registerCover( + ItemList.Plank_Palm.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack(GT_ModHandler.getModItem( + aTextForestry, "planks", 1L, 18, new ItemStack(Blocks.planks, 1, 0))), + 2), + null); + GregTech_API.registerCover( + ItemList.Plank_Papaya.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack(GT_ModHandler.getModItem( + aTextForestry, "planks", 1L, 19, new ItemStack(Blocks.planks, 1, 0))), + 3), + null); + GregTech_API.registerCover( + ItemList.Plank_Pine.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack(GT_ModHandler.getModItem( + aTextForestry, "planks", 1L, 20, new ItemStack(Blocks.planks, 1, 0))), + 4), + null); + GregTech_API.registerCover( + ItemList.Plank_Plum.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack(GT_ModHandler.getModItem( + aTextForestry, "planks", 1L, 21, new ItemStack(Blocks.planks, 1, 0))), + 5), + null); + GregTech_API.registerCover( + ItemList.Plank_Maple.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack(GT_ModHandler.getModItem( + aTextForestry, "planks", 1L, 22, new ItemStack(Blocks.planks, 1, 0))), + 6), + null); + GregTech_API.registerCover( + ItemList.Plank_Citrus.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack(GT_ModHandler.getModItem( + aTextForestry, "planks", 1L, 23, new ItemStack(Blocks.planks, 1, 0))), + 7), + null); + + ItemList.Crop_Drop_Plumbilia.set(addItem( + tLastID = 500, + "Plumbilia Leaf", + "Source of Lead", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 1L))); + ItemList.Crop_Drop_Argentia.set(addItem( + tLastID = 501, + "Argentia Leaf", + "Source of Silver", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); + ItemList.Crop_Drop_Indigo.set(addItem( + tLastID = 502, + "Indigo Blossom", + "Used for making Blue Dye", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L))); + ItemList.Crop_Drop_Ferru.set(addItem( + tLastID = 503, + "Ferru Leaf", + "Source of Iron", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L))); + ItemList.Crop_Drop_Aurelia.set(addItem( + tLastID = 504, + "Aurelia Leaf", + "Source of Gold", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); + ItemList.Crop_Drop_TeaLeaf.set(addItem( + tLastID = 505, + "Tea Leaf", + "Source of Tea", + "cropTea", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); + + ItemList.Crop_Drop_OilBerry.set(addItem( + tLastID = 510, + "Oil Berry", + "Oil in Berry form", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); + ItemList.Crop_Drop_BobsYerUncleRanks.set(addItem( + tLastID = 511, + "Bobs-Yer-Uncle-Berry", + "Source of Emeralds", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); + ItemList.Crop_Drop_UUMBerry.set(addItem( + tLastID = 512, + "UUM Berry", + "UUM in Berry form", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); + ItemList.Crop_Drop_UUABerry.set(addItem( + tLastID = 513, + "UUA Berry", + "UUA in Berry form", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); + + ItemList.Crop_Drop_MilkWart.set(addItem( + tLastID = 520, + "Milk Wart", + "Source of Milk", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); + + ItemList.Crop_Drop_Coppon.set(addItem( + tLastID = 530, + "Coppon Fiber", + "ORANGE WOOOOOOOL!!!", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 1L))); + + ItemList.Crop_Drop_Tine.set(addItem( + tLastID = 540, + "Tine Twig", + "Source of Tin", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 100); - ItemList.Crop_Drop_Mica.set(addItem(tLastID = 538, "Micadia Twig", "Source of Mica", new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Crop_Drop_Mica.set(addItem( + tLastID = 538, + "Micadia Twig", + "Source of Mica", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 240); ItemList.Crop_Drop_Bauxite.set(addItem(tLastID = 521, "Bauxia Leaf", "Source of Aluminium")); @@ -318,34 +2096,206 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { ItemList.Crop_Drop_Osmium.set(addItem(tLastID = 534, "Quantaria Leaf", "Source of Osmium")); ItemList.Crop_Drop_Naquadah.set(addItem(tLastID = 535, "Stargatium Leaf", "Source of Naquadah")); - ItemList.Crop_Drop_Chilly.set(addItem(tLastID = 550, "Chilly Pepper", "It is red and hot", "cropChilipepper", new GT_FoodStat(1, 0.3F, EnumAction.eat, null, false, true, false, Potion.confusion.id, 200, 1, 40), new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); - ItemList.Crop_Drop_Lemon.set(addItem(tLastID = 551, "Lemon", "Don't make Lemonade", "cropLemon", new GT_FoodStat(1, 0.3F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); - ItemList.Crop_Drop_Tomato.set(addItem(tLastID = 552, "Tomato", "Solid Ketchup", "cropTomato", new GT_FoodStat(1, 0.2F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); - ItemList.Crop_Drop_MTomato.set(addItem(tLastID = 553, "Max Tomato", "Full Health in one Tomato", "cropTomato", new GT_FoodStat(9, 1.0F, EnumAction.eat, null, false, true, false, Potion.regeneration.id, 100, 100, 100), new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); - ItemList.Crop_Drop_Grapes.set(addItem(tLastID = 554, "Grapes", "Source of Wine", "cropGrape", new GT_FoodStat(2, 0.3F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); - ItemList.Crop_Drop_Onion.set(addItem(tLastID = 555, "Onion", "Taking over the whole Taste", "cropOnion", new GT_FoodStat(2, 0.2F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); - ItemList.Crop_Drop_Cucumber.set(addItem(tLastID = 556, "Cucumber", "Not a Sea Cucumber!", "cropCucumber", new GT_FoodStat(1, 0.2F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); - ItemList.Crop_Drop_Rape.set(addItem(tLastID = 557, "Rape", "Time to oil up!", new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); - - ItemList.Food_Cheese.set(addItem(tLastID = 558, "Cheese", "Click the Cheese", "foodCheese", new GT_FoodStat(3, 0.6F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 2L))); - ItemList.Food_Dough.set(addItem(tLastID = 559, "Dough", "For making Breads", "foodDough", new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); - ItemList.Food_Flat_Dough.set(addItem(tLastID = 560, "Flattened Dough", "For making Pizza", new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); - ItemList.Food_Raw_Bread.set(addItem(tLastID = 561, "Dough", "In Bread Shape", new GT_FoodStat(1, 0.2F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); - ItemList.Food_Raw_Bun.set(addItem(tLastID = 562, "Dough", "In Bun Shape", new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); - ItemList.Food_Raw_Baguette.set(addItem(tLastID = 563, "Dough", "In Baguette Shape", new GT_FoodStat(1, 0.3F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); - ItemList.Food_Baked_Bun.set(addItem(tLastID = 564, "Bun", "Do not teleport Bread!", new GT_FoodStat(3, 0.5F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); - ItemList.Food_Baked_Baguette.set(addItem(tLastID = 565, "Baguette", "I teleported nothing BUT Bread!!!", new GT_FoodStat(8, 0.5F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); - ItemList.Food_Sliced_Bread.set(addItem(tLastID = 566, "Sliced Bread", "Just half a Bread", new GT_FoodStat(2, 0.3F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); - ItemList.Food_Sliced_Bun.set(addItem(tLastID = 567, "Sliced Bun", "Just half a Bun", new GT_FoodStat(1, 0.3F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); - ItemList.Food_Sliced_Baguette.set(addItem(tLastID = 568, "Sliced Baguette", "Just half a Baguette", new GT_FoodStat(4, 0.3F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); - ItemList.Food_Raw_Cake.set(addItem(tLastID = 569, "Cake Bottom", "For making Cake", new GT_FoodStat(2, 0.2F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); - ItemList.Food_Baked_Cake.set(addItem(tLastID = 570, "Baked Cake Bottom", "I know I promised you an actual Cake, but well...", new GT_FoodStat(3, 0.3F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); - ItemList.Food_Sliced_Lemon.set(addItem(tLastID = 571, "Lemon Slice", "Ideal to put on your Drink", new GT_FoodStat(1, 0.075F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); - ItemList.Food_Sliced_Tomato.set(addItem(tLastID = 572, "Tomato Slice", "Solid Ketchup", new GT_FoodStat(1, 0.05F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); - ItemList.Food_Sliced_Onion.set(addItem(tLastID = 573, "Onion Slice", "ONIONS, UNITE!", new GT_FoodStat(1, 0.05F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); - ItemList.Food_Sliced_Cucumber.set(addItem(tLastID = 574, "Cucumber Slice", "QUEWWW-CUMMM-BERRR!!!", new GT_FoodStat(1, 0.05F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); - - ItemList.Food_Sliced_Cheese.set(addItem(tLastID = 576, "Cheese Slice", "ALIEN ATTACK!!!, throw the CHEEEEESE!!!", new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + ItemList.Crop_Drop_Chilly.set(addItem( + tLastID = 550, + "Chilly Pepper", + "It is red and hot", + "cropChilipepper", + new GT_FoodStat(1, 0.3F, EnumAction.eat, null, false, true, false, Potion.confusion.id, 200, 1, 40), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + ItemList.Crop_Drop_Lemon.set(addItem( + tLastID = 551, + "Lemon", + "Don't make Lemonade", + "cropLemon", + new GT_FoodStat(1, 0.3F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + ItemList.Crop_Drop_Tomato.set(addItem( + tLastID = 552, + "Tomato", + "Solid Ketchup", + "cropTomato", + new GT_FoodStat(1, 0.2F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + ItemList.Crop_Drop_MTomato.set(addItem( + tLastID = 553, + "Max Tomato", + "Full Health in one Tomato", + "cropTomato", + new GT_FoodStat( + 9, 1.0F, EnumAction.eat, null, false, true, false, Potion.regeneration.id, 100, 100, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + ItemList.Crop_Drop_Grapes.set(addItem( + tLastID = 554, + "Grapes", + "Source of Wine", + "cropGrape", + new GT_FoodStat(2, 0.3F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + ItemList.Crop_Drop_Onion.set(addItem( + tLastID = 555, + "Onion", + "Taking over the whole Taste", + "cropOnion", + new GT_FoodStat(2, 0.2F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + ItemList.Crop_Drop_Cucumber.set(addItem( + tLastID = 556, + "Cucumber", + "Not a Sea Cucumber!", + "cropCucumber", + new GT_FoodStat(1, 0.2F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + ItemList.Crop_Drop_Rape.set(addItem( + tLastID = 557, + "Rape", + "Time to oil up!", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); + + ItemList.Food_Cheese.set(addItem( + tLastID = 558, + "Cheese", + "Click the Cheese", + "foodCheese", + new GT_FoodStat(3, 0.6F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 2L))); + ItemList.Food_Dough.set(addItem( + tLastID = 559, + "Dough", + "For making Breads", + "foodDough", + new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + ItemList.Food_Flat_Dough.set(addItem( + tLastID = 560, + "Flattened Dough", + "For making Pizza", + new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + ItemList.Food_Raw_Bread.set(addItem( + tLastID = 561, + "Dough", + "In Bread Shape", + new GT_FoodStat(1, 0.2F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + ItemList.Food_Raw_Bun.set(addItem( + tLastID = 562, + "Dough", + "In Bun Shape", + new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + ItemList.Food_Raw_Baguette.set(addItem( + tLastID = 563, + "Dough", + "In Baguette Shape", + new GT_FoodStat(1, 0.3F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + ItemList.Food_Baked_Bun.set(addItem( + tLastID = 564, + "Bun", + "Do not teleport Bread!", + new GT_FoodStat(3, 0.5F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Baked_Baguette.set(addItem( + tLastID = 565, + "Baguette", + "I teleported nothing BUT Bread!!!", + new GT_FoodStat(8, 0.5F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Sliced_Bread.set(addItem( + tLastID = 566, + "Sliced Bread", + "Just half a Bread", + new GT_FoodStat(2, 0.3F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Sliced_Bun.set(addItem( + tLastID = 567, + "Sliced Bun", + "Just half a Bun", + new GT_FoodStat(1, 0.3F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Sliced_Baguette.set(addItem( + tLastID = 568, + "Sliced Baguette", + "Just half a Baguette", + new GT_FoodStat(4, 0.3F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + ItemList.Food_Raw_Cake.set(addItem( + tLastID = 569, + "Cake Bottom", + "For making Cake", + new GT_FoodStat(2, 0.2F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + ItemList.Food_Baked_Cake.set(addItem( + tLastID = 570, + "Baked Cake Bottom", + "I know I promised you an actual Cake, but well...", + new GT_FoodStat(3, 0.3F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + ItemList.Food_Sliced_Lemon.set(addItem( + tLastID = 571, + "Lemon Slice", + "Ideal to put on your Drink", + new GT_FoodStat(1, 0.075F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); + ItemList.Food_Sliced_Tomato.set(addItem( + tLastID = 572, + "Tomato Slice", + "Solid Ketchup", + new GT_FoodStat(1, 0.05F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); + ItemList.Food_Sliced_Onion.set(addItem( + tLastID = 573, + "Onion Slice", + "ONIONS, UNITE!", + new GT_FoodStat(1, 0.05F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); + ItemList.Food_Sliced_Cucumber.set(addItem( + tLastID = 574, + "Cucumber Slice", + "QUEWWW-CUMMM-BERRR!!!", + new GT_FoodStat(1, 0.05F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); + + ItemList.Food_Sliced_Cheese.set(addItem( + tLastID = 576, + "Cheese Slice", + "ALIEN ATTACK!!!, throw the CHEEEEESE!!!", + new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); GT_ModHandler.addExtractionRecipe(new ItemStack(Blocks.red_flower, 1, 0), new ItemStack(Items.dye, 2, 1)); GT_ModHandler.addExtractionRecipe(new ItemStack(Blocks.red_flower, 1, 1), new ItemStack(Items.dye, 2, 12)); @@ -361,49 +2311,108 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { GT_ModHandler.addExtractionRecipe(new ItemStack(Blocks.double_plant, 1, 1), new ItemStack(Items.dye, 3, 13)); GT_ModHandler.addExtractionRecipe(new ItemStack(Blocks.double_plant, 1, 4), new ItemStack(Items.dye, 3, 1)); GT_ModHandler.addExtractionRecipe(new ItemStack(Blocks.double_plant, 1, 5), new ItemStack(Items.dye, 3, 9)); - GT_ModHandler.addExtractionRecipe(ItemList.Crop_Drop_Plumbilia.get(1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Lead, 1L)); - GT_ModHandler.addExtractionRecipe(ItemList.Crop_Drop_Argentia.get(1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Silver, 1L)); + GT_ModHandler.addExtractionRecipe( + ItemList.Crop_Drop_Plumbilia.get(1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Lead, 1L)); + GT_ModHandler.addExtractionRecipe( + ItemList.Crop_Drop_Argentia.get(1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Silver, 1L)); GT_ModHandler.addExtractionRecipe(ItemList.Crop_Drop_Indigo.get(1L), ItemList.Dye_Indigo.get(1L)); - GT_ModHandler.addExtractionRecipe(ItemList.Crop_Drop_MilkWart.get(1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Milk, 1L)); - GT_ModHandler.addExtractionRecipe(ItemList.Crop_Drop_Coppon.get(1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Copper, 1L)); - GT_ModHandler.addExtractionRecipe(ItemList.Crop_Drop_Tine.get(1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Tin, 1L)); + GT_ModHandler.addExtractionRecipe( + ItemList.Crop_Drop_MilkWart.get(1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Milk, 1L)); + GT_ModHandler.addExtractionRecipe( + ItemList.Crop_Drop_Coppon.get(1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Copper, 1L)); + GT_ModHandler.addExtractionRecipe( + ItemList.Crop_Drop_Tine.get(1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Tin, 1L)); GT_ModHandler.addCompressionRecipe(ItemList.Crop_Drop_Coppon.get(4L), new ItemStack(Blocks.wool, 1, 1)); - GT_ModHandler.addCompressionRecipe(ItemList.Crop_Drop_Plumbilia.get(4L), ItemList.IC2_PlantballCompressed.get(1L)); - GT_ModHandler.addCompressionRecipe(ItemList.Crop_Drop_Argentia.get(4L), ItemList.IC2_PlantballCompressed.get(1L)); + GT_ModHandler.addCompressionRecipe( + ItemList.Crop_Drop_Plumbilia.get(4L), ItemList.IC2_PlantballCompressed.get(1L)); + GT_ModHandler.addCompressionRecipe( + ItemList.Crop_Drop_Argentia.get(4L), ItemList.IC2_PlantballCompressed.get(1L)); GT_ModHandler.addCompressionRecipe(ItemList.Crop_Drop_Indigo.get(4L), ItemList.IC2_PlantballCompressed.get(1L)); GT_ModHandler.addCompressionRecipe(ItemList.Crop_Drop_Ferru.get(4L), ItemList.IC2_PlantballCompressed.get(1L)); - GT_ModHandler.addCompressionRecipe(ItemList.Crop_Drop_Aurelia.get(4L), ItemList.IC2_PlantballCompressed.get(1L)); - GT_ModHandler.addCompressionRecipe(ItemList.Crop_Drop_OilBerry.get(4L), ItemList.IC2_PlantballCompressed.get(1L)); - GT_ModHandler.addCompressionRecipe(ItemList.Crop_Drop_BobsYerUncleRanks.get(4L), ItemList.IC2_PlantballCompressed.get(1L)); + GT_ModHandler.addCompressionRecipe( + ItemList.Crop_Drop_Aurelia.get(4L), ItemList.IC2_PlantballCompressed.get(1L)); + GT_ModHandler.addCompressionRecipe( + ItemList.Crop_Drop_OilBerry.get(4L), ItemList.IC2_PlantballCompressed.get(1L)); + GT_ModHandler.addCompressionRecipe( + ItemList.Crop_Drop_BobsYerUncleRanks.get(4L), ItemList.IC2_PlantballCompressed.get(1L)); GT_ModHandler.addCompressionRecipe(ItemList.Crop_Drop_Tine.get(4L), ItemList.IC2_PlantballCompressed.get(1L)); GT_ModHandler.addCompressionRecipe(ItemList.Crop_Drop_Rape.get(4L), ItemList.IC2_PlantballCompressed.get(1L)); - GT_ModHandler.addCompressionRecipe(new ItemStack(Blocks.red_flower, 8, 32767), ItemList.IC2_PlantballCompressed.get(1L)); - GT_ModHandler.addCompressionRecipe(new ItemStack(Blocks.yellow_flower, 8, 32767), ItemList.IC2_PlantballCompressed.get(1L)); - - GT_ModHandler.addPulverisationRecipe(ItemList.Food_Sliced_Cheese.get(1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Cheese, 1L)); - GT_ModHandler.addPulverisationRecipe(ItemList.Dye_Cocoa.get(1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cocoa, 1L)); - GT_ModHandler.addPulverisationRecipe(ItemList.Crop_Drop_Tine.get(1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 2L)); - GT_ModHandler.addPulverisationRecipe(new ItemStack(Items.reeds, 1), new ItemStack(Items.sugar, 1), null, 0, false); - GT_ModHandler.addPulverisationRecipe(new ItemStack(Blocks.melon_block, 1, 0), new ItemStack(Items.melon, 8, 0), new ItemStack(Items.melon_seeds, 1), 80, false); - GT_ModHandler.addPulverisationRecipe(new ItemStack(Blocks.pumpkin, 1, 0), new ItemStack(Items.pumpkin_seeds, 4, 0), null, 0, false); - GT_ModHandler.addPulverisationRecipe(new ItemStack(Items.melon, 1, 0), new ItemStack(Items.melon_seeds, 1, 0), null, 0, false); - GT_ModHandler.addPulverisationRecipe(new ItemStack(Items.wheat, 1, 0), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wheat, 1L), null, 0, false); - GT_ModHandler.addPulverisationRecipe(GT_ModHandler.getIC2Item("crop", 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), null, 0, false); - GT_ModHandler.addPulverisationRecipe(new ItemStack(Items.stick, 1), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 2L), null, 0, false); - GT_ModHandler.addPulverisationRecipe(new ItemStack(Blocks.wool, 1, 32767), new ItemStack(Items.string, 2), new ItemStack(Items.string, 1), 50, false); - GT_ModHandler.addPulverisationRecipe(ItemList.Tesseract.get(1), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TranscendentMetal, 8L)}, new int[] {10000}, 32_000_000, 100); + GT_ModHandler.addCompressionRecipe( + new ItemStack(Blocks.red_flower, 8, 32767), ItemList.IC2_PlantballCompressed.get(1L)); + GT_ModHandler.addCompressionRecipe( + new ItemStack(Blocks.yellow_flower, 8, 32767), ItemList.IC2_PlantballCompressed.get(1L)); + + GT_ModHandler.addPulverisationRecipe( + ItemList.Food_Sliced_Cheese.get(1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Cheese, 1L)); + GT_ModHandler.addPulverisationRecipe( + ItemList.Dye_Cocoa.get(1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cocoa, 1L)); + GT_ModHandler.addPulverisationRecipe( + ItemList.Crop_Drop_Tine.get(1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 2L)); + GT_ModHandler.addPulverisationRecipe( + new ItemStack(Items.reeds, 1), new ItemStack(Items.sugar, 1), null, 0, false); + GT_ModHandler.addPulverisationRecipe( + new ItemStack(Blocks.melon_block, 1, 0), + new ItemStack(Items.melon, 8, 0), + new ItemStack(Items.melon_seeds, 1), + 80, + false); + GT_ModHandler.addPulverisationRecipe( + new ItemStack(Blocks.pumpkin, 1, 0), new ItemStack(Items.pumpkin_seeds, 4, 0), null, 0, false); + GT_ModHandler.addPulverisationRecipe( + new ItemStack(Items.melon, 1, 0), new ItemStack(Items.melon_seeds, 1, 0), null, 0, false); + GT_ModHandler.addPulverisationRecipe( + new ItemStack(Items.wheat, 1, 0), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wheat, 1L), + null, + 0, + false); + GT_ModHandler.addPulverisationRecipe( + GT_ModHandler.getIC2Item("crop", 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), + null, + 0, + false); + GT_ModHandler.addPulverisationRecipe( + new ItemStack(Items.stick, 1), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 2L), + null, + 0, + false); + GT_ModHandler.addPulverisationRecipe( + new ItemStack(Blocks.wool, 1, 32767), + new ItemStack(Items.string, 2), + new ItemStack(Items.string, 1), + 50, + false); + GT_ModHandler.addPulverisationRecipe( + ItemList.Tesseract.get(1), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TranscendentMetal, 8L)}, + new int[] {10000}, + 32_000_000, + 100); try { ic2.api.crops.CropCard tCrop; - GT_Utility.getField(tCrop = ic2.api.crops.Crops.instance.getCropList()[13], "mDrop").set(tCrop, ItemList.Crop_Drop_Ferru.get(1L)); - GT_Utility.getField(tCrop = ic2.api.crops.Crops.instance.getCropList()[14], "mDrop").set(tCrop, ItemList.Crop_Drop_Aurelia.get(1L)); + GT_Utility.getField(tCrop = ic2.api.crops.Crops.instance.getCropList()[13], "mDrop") + .set(tCrop, ItemList.Crop_Drop_Ferru.get(1L)); + GT_Utility.getField(tCrop = ic2.api.crops.Crops.instance.getCropList()[14], "mDrop") + .set(tCrop, ItemList.Crop_Drop_Aurelia.get(1L)); } catch (Throwable e) { if (GT_Values.D1) { e.printStackTrace(GT_Log.err); } } - ItemList.Display_ITS_FREE.set(addItem(tLastID = 766, "ITS FREE", "(or at least almost free)", SubTag.INVISIBLE, new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); -} + ItemList.Display_ITS_FREE.set(addItem( + tLastID = 766, + "ITS FREE", + "(or at least almost free)", + SubTag.INVISIBLE, + new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); + } @Override public boolean onLeftClickEntity(ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) { @@ -425,7 +2434,8 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { } @Override - public EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ) { + public EntityArrow getProjectile( + SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ) { int aDamage = aStack.getItemDamage(); if ((aDamage >= 25000) && (aDamage < 27000)) { if (aDamage >= 26000) { @@ -437,11 +2447,13 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { } @Override - public EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed) { + public EntityArrow getProjectile( + SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed) { int aDamage = aStack.getItemDamage(); if ((aDamage >= 25000) && (aDamage < 27000)) { if (aDamage >= 26000) { - return Behaviour_Arrow.DEFAULT_PLASTIC.getProjectile(this, aProjectileType, aStack, aWorld, aEntity, aSpeed); + return Behaviour_Arrow.DEFAULT_PLASTIC.getProjectile( + this, aProjectileType, aStack, aWorld, aEntity, aSpeed); } return Behaviour_Arrow.DEFAULT_WOODEN.getProjectile(this, aProjectileType, aStack, aWorld, aEntity, aSpeed); } @@ -453,7 +2465,9 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { int aDamage = aStack.getItemDamage(); Materials aMaterial = GregTech_API.sGeneratedMaterials[(aDamage % 1000)]; if ((aDamage >= 25000) && (aDamage < 27000) && (aMaterial != null) && (aMaterial.mEnchantmentTools != null)) { - Enchantment tEnchant = aMaterial.mEnchantmentTools == Enchantment.fortune ? Enchantment.looting : aMaterial.mEnchantmentTools; + Enchantment tEnchant = aMaterial.mEnchantmentTools == Enchantment.fortune + ? Enchantment.looting + : aMaterial.mEnchantmentTools; if (tEnchant.type == EnumEnchantmentType.weapon) { NBTTagCompound tNBT = GT_Utility.ItemNBT.getNBT(aStack); if (!tNBT.getBoolean("GT.HasBeenUpdated")) { diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java index 1e3402618a..59abe764fb 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java @@ -1,5 +1,9 @@ package gregtech.common.items; +import static gregtech.api.enums.Textures.BlockIcons.SOLARPANEL_UEV; +import static gregtech.api.enums.Textures.BlockIcons.SOLARPANEL_UHV; +import static gregtech.api.enums.Textures.BlockIcons.SOLARPANEL_UIV; + import gregtech.api.GregTech_API; import gregtech.api.enums.*; import gregtech.api.items.GT_MetaGenerated_Item_X32; @@ -8,16 +12,16 @@ import gregtech.api.util.GT_OreDictUnificator; import gregtech.common.covers.GT_Cover_SolarPanel; import net.minecraftforge.oredict.OreDictionary; -import static gregtech.api.enums.Textures.BlockIcons.SOLARPANEL_UEV; -import static gregtech.api.enums.Textures.BlockIcons.SOLARPANEL_UHV; -import static gregtech.api.enums.Textures.BlockIcons.SOLARPANEL_UIV; - -public class GT_MetaGenerated_Item_03 - extends GT_MetaGenerated_Item_X32 { +public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 { public static GT_MetaGenerated_Item_03 INSTANCE; public GT_MetaGenerated_Item_03() { - super("metaitem.03", OrePrefixes.crateGtDust, OrePrefixes.crateGtIngot, OrePrefixes.crateGtGem, OrePrefixes.crateGtPlate); + super( + "metaitem.03", + OrePrefixes.crateGtDust, + OrePrefixes.crateGtIngot, + OrePrefixes.crateGtGem, + OrePrefixes.crateGtPlate); INSTANCE = this; int tLastID = 0; Object[] o = new Object[0]; @@ -31,7 +35,8 @@ public class GT_MetaGenerated_Item_03 * fiberglass circuit board (simple + multilayer) / glass + plastic + electrum foil + sulfurci acid * wetware lifesupport board / fiberglass CB + teflon + */ - ItemList.Circuit_Board_Wetware.set(addItem(tLastID = 6, "Wetware Lifesupport Circuit Board", "The Board that keeps life", o)); + ItemList.Circuit_Board_Wetware.set( + addItem(tLastID = 6, "Wetware Lifesupport Circuit Board", "The Board that keeps life", o)); ItemList.Circuit_Board_Plastic.set(addItem(tLastID = 7, "Plastic Circuit Board", "A Good Board", o)); ItemList.Circuit_Board_Bio.set(addItem(tLastID = 8, "Bio Circuit Board", "Bio genetic mutated Board", o)); @@ -45,41 +50,85 @@ public class GT_MetaGenerated_Item_03 * capacitors normal+smd * Glass Fibers */ - ItemList.Circuit_Parts_ResistorSMD.set(addItem(tLastID = 11, "SMD Resistor", "Electronic Component", OrePrefixes.componentCircuit.get(Materials.Resistor), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Parts_ResistorSMD.set(addItem( + tLastID = 11, + "SMD Resistor", + "Electronic Component", + OrePrefixes.componentCircuit.get(Materials.Resistor), + SubTag.NO_UNIFICATION)); ItemList.Circuit_Parts_Glass_Tube.set(addItem(tLastID = 12, "Glass Tube", "", o)); ItemList.Circuit_Parts_Coil.set(addItem(tLastID = 14, "Small Coil", "Basic Electronic Component", o)); - ItemList.Circuit_Parts_DiodeSMD.set(addItem(tLastID = 16, "SMD Diode", "Electronic Component", OrePrefixes.componentCircuit.get(Materials.Diode), SubTag.NO_UNIFICATION)); - ItemList.Circuit_Parts_TransistorSMD.set(addItem(tLastID = 18, "SMD Transistor", "Electronic Component", OrePrefixes.componentCircuit.get(Materials.Transistor), SubTag.NO_UNIFICATION)); - ItemList.Circuit_Parts_CapacitorSMD.set(addItem(tLastID = 20, "SMD Capacitor", "Electronic Component", OrePrefixes.componentCircuit.get(Materials.Capacitor), SubTag.NO_UNIFICATION)); - ItemList.Circuit_Parts_GlassFiber.set(addItem(tLastID = 21, "Glass Fiber", Materials.BorosilicateGlass.mChemicalFormula, o)); + ItemList.Circuit_Parts_DiodeSMD.set(addItem( + tLastID = 16, + "SMD Diode", + "Electronic Component", + OrePrefixes.componentCircuit.get(Materials.Diode), + SubTag.NO_UNIFICATION)); + ItemList.Circuit_Parts_TransistorSMD.set(addItem( + tLastID = 18, + "SMD Transistor", + "Electronic Component", + OrePrefixes.componentCircuit.get(Materials.Transistor), + SubTag.NO_UNIFICATION)); + ItemList.Circuit_Parts_CapacitorSMD.set(addItem( + tLastID = 20, + "SMD Capacitor", + "Electronic Component", + OrePrefixes.componentCircuit.get(Materials.Capacitor), + SubTag.NO_UNIFICATION)); + ItemList.Circuit_Parts_GlassFiber.set( + addItem(tLastID = 21, "Glass Fiber", Materials.BorosilicateGlass.mChemicalFormula, o)); ItemList.Circuit_Parts_PetriDish.set(addItem(tLastID = 22, "Petri Dish", "For cultivating cells", o)); ItemList.Circuit_Parts_Reinforced_Glass_Tube.set(addItem(tLastID = 23, "Reinforced Glass Tube", "", o)); - ItemList.Circuit_Parts_ResistorASMD.set(addItem(tLastID = 24, "Advanced SMD Resistor", "Advanced Electronic Component", o)); - ItemList.Circuit_Parts_DiodeASMD.set(addItem(tLastID = 25, "Advanced SMD Diode", "Advanced Electronic Component", o)); - ItemList.Circuit_Parts_TransistorASMD.set(addItem(tLastID = 26, "Advanced SMD Transistor", "Advanced Electronic Component", o)); - ItemList.Circuit_Parts_CapacitorASMD.set(addItem(tLastID = 27, "Advanced SMD Capacitor", "Advanced Electronic Component", o)); - - ItemList.Circuit_Parts_ResistorXSMD.set(addItem(tLastID = 178, "Optical SMD Resistor", "Highly Advanced Electronic Component", o)); - ItemList.Circuit_Parts_DiodeXSMD.set(addItem(tLastID = 179, "Optical SMD Diode", "Highly Advanced Electronic Component", o)); - ItemList.Circuit_Parts_TransistorXSMD.set(addItem(tLastID = 180, "Optical SMD Transistor", "Highly Advanced Electronic Component", o)); - ItemList.Circuit_Parts_CapacitorXSMD.set(addItem(tLastID = 181, "Optical SMD Capacitor", "Highly Advanced Electronic Component", o)); - - ItemList.Circuit_Parts_InductorSMD.set(addItem(tLastID = 182, "SMD Inductor", "Electronic Component", OrePrefixes.componentCircuit.get(Materials.Inductor), SubTag.NO_UNIFICATION)); - ItemList.Circuit_Parts_InductorASMD.set(addItem(tLastID = 183, "Advanced SMD Inductor", "Advanced Electronic Component", o)); - ItemList.Circuit_Parts_InductorXSMD.set(addItem(tLastID = 184, "Optical SMD Inductor", "Highly Advanced Electronic Component", o)); - - GT_OreDictUnificator.set(OrePrefixes.componentCircuit, Materials.Resistor, ItemList.Circuit_Parts_Resistor.get(1L)); + ItemList.Circuit_Parts_ResistorASMD.set( + addItem(tLastID = 24, "Advanced SMD Resistor", "Advanced Electronic Component", o)); + ItemList.Circuit_Parts_DiodeASMD.set( + addItem(tLastID = 25, "Advanced SMD Diode", "Advanced Electronic Component", o)); + ItemList.Circuit_Parts_TransistorASMD.set( + addItem(tLastID = 26, "Advanced SMD Transistor", "Advanced Electronic Component", o)); + ItemList.Circuit_Parts_CapacitorASMD.set( + addItem(tLastID = 27, "Advanced SMD Capacitor", "Advanced Electronic Component", o)); + + ItemList.Circuit_Parts_ResistorXSMD.set( + addItem(tLastID = 178, "Optical SMD Resistor", "Highly Advanced Electronic Component", o)); + ItemList.Circuit_Parts_DiodeXSMD.set( + addItem(tLastID = 179, "Optical SMD Diode", "Highly Advanced Electronic Component", o)); + ItemList.Circuit_Parts_TransistorXSMD.set( + addItem(tLastID = 180, "Optical SMD Transistor", "Highly Advanced Electronic Component", o)); + ItemList.Circuit_Parts_CapacitorXSMD.set( + addItem(tLastID = 181, "Optical SMD Capacitor", "Highly Advanced Electronic Component", o)); + + ItemList.Circuit_Parts_InductorSMD.set(addItem( + tLastID = 182, + "SMD Inductor", + "Electronic Component", + OrePrefixes.componentCircuit.get(Materials.Inductor), + SubTag.NO_UNIFICATION)); + ItemList.Circuit_Parts_InductorASMD.set( + addItem(tLastID = 183, "Advanced SMD Inductor", "Advanced Electronic Component", o)); + ItemList.Circuit_Parts_InductorXSMD.set( + addItem(tLastID = 184, "Optical SMD Inductor", "Highly Advanced Electronic Component", o)); + + GT_OreDictUnificator.set( + OrePrefixes.componentCircuit, Materials.Resistor, ItemList.Circuit_Parts_Resistor.get(1L)); GT_OreDictUnificator.set(OrePrefixes.componentCircuit, Materials.Diode, ItemList.Circuit_Parts_Diode.get(1L)); - GT_OreDictUnificator.set(OrePrefixes.componentCircuit, Materials.Transistor, ItemList.Circuit_Parts_Transistor.get(1L)); + GT_OreDictUnificator.set( + OrePrefixes.componentCircuit, Materials.Transistor, ItemList.Circuit_Parts_Transistor.get(1L)); GT_OreDictUnificator.set(OrePrefixes.componentCircuit, Materials.Inductor, ItemList.Circuit_Parts_Coil.get(1L)); - GT_OreDictUnificator.set(OrePrefixes.componentCircuit, Materials.Capacitor, ItemList.Circuit_Parts_Capacitor.get(1L)); - - GT_OreDictUnificator.addAssociation(OrePrefixes.componentCircuit, Materials.Resistor, ItemList.Circuit_Parts_ResistorSMD.get(1L), true); - GT_OreDictUnificator.addAssociation(OrePrefixes.componentCircuit, Materials.Diode, ItemList.Circuit_Parts_DiodeSMD.get(1L), true); - GT_OreDictUnificator.addAssociation(OrePrefixes.componentCircuit, Materials.Transistor, ItemList.Circuit_Parts_TransistorSMD.get(1L), true); - GT_OreDictUnificator.addAssociation(OrePrefixes.componentCircuit, Materials.Capacitor, ItemList.Circuit_Parts_CapacitorSMD.get(1L), true); - GT_OreDictUnificator.addAssociation(OrePrefixes.componentCircuit, Materials.Inductor, ItemList.Circuit_Parts_InductorSMD.get(1L), true); + GT_OreDictUnificator.set( + OrePrefixes.componentCircuit, Materials.Capacitor, ItemList.Circuit_Parts_Capacitor.get(1L)); + + GT_OreDictUnificator.addAssociation( + OrePrefixes.componentCircuit, Materials.Resistor, ItemList.Circuit_Parts_ResistorSMD.get(1L), true); + GT_OreDictUnificator.addAssociation( + OrePrefixes.componentCircuit, Materials.Diode, ItemList.Circuit_Parts_DiodeSMD.get(1L), true); + GT_OreDictUnificator.addAssociation( + OrePrefixes.componentCircuit, Materials.Transistor, ItemList.Circuit_Parts_TransistorSMD.get(1L), true); + GT_OreDictUnificator.addAssociation( + OrePrefixes.componentCircuit, Materials.Capacitor, ItemList.Circuit_Parts_CapacitorSMD.get(1L), true); + GT_OreDictUnificator.addAssociation( + OrePrefixes.componentCircuit, Materials.Inductor, ItemList.Circuit_Parts_InductorSMD.get(1L), true); /** * ICs @@ -100,10 +149,14 @@ public class GT_MetaGenerated_Item_03 * quantum chips */ ItemList.Circuit_Silicon_Ingot.set(addItem(tLastID = 30, "Monocrystalline Silicon Boule", "Raw Circuit", o)); - ItemList.Circuit_Silicon_Ingot2.set(addItem(tLastID = 31, "Phosphorus doped Monocrystalline Silicon Boule", "Raw Circuit", o)); - ItemList.Circuit_Silicon_Ingot3.set(addItem(tLastID = 32, "Naquadah doped Monocrystalline Silicon Boule", "Raw Circuit", o)); - ItemList.Circuit_Silicon_Ingot4.set(addItem(tLastID = 150, "Europium doped Monocrystalline Silicon Boule", "Raw Circuit", o)); - ItemList.Circuit_Silicon_Ingot5.set(addItem(tLastID = 152, "Americium doped Monocrystalline Silicon Boule", "Raw Circuit", o)); + ItemList.Circuit_Silicon_Ingot2.set( + addItem(tLastID = 31, "Phosphorus doped Monocrystalline Silicon Boule", "Raw Circuit", o)); + ItemList.Circuit_Silicon_Ingot3.set( + addItem(tLastID = 32, "Naquadah doped Monocrystalline Silicon Boule", "Raw Circuit", o)); + ItemList.Circuit_Silicon_Ingot4.set( + addItem(tLastID = 150, "Europium doped Monocrystalline Silicon Boule", "Raw Circuit", o)); + ItemList.Circuit_Silicon_Ingot5.set( + addItem(tLastID = 152, "Americium doped Monocrystalline Silicon Boule", "Raw Circuit", o)); ItemList.Circuit_Silicon_Wafer.set(addItem(tLastID = 33, "Wafer", "Raw Circuit", o)); ItemList.Circuit_Silicon_Wafer2.set(addItem(tLastID = 34, "Phosphorus doped Wafer", "Raw Circuit", o)); @@ -139,7 +192,8 @@ public class GT_MetaGenerated_Item_03 ItemList.Circuit_Chip_HPIC.set(addItem(tLastID = 53, "High Power IC", "High Power Circuit", o)); ItemList.Circuit_Wafer_NanoCPU.set(addItem(tLastID = 54, "NanoCPU Wafer", "Raw Circuit", o)); - ItemList.Circuit_Chip_NanoCPU.set(addItem(tLastID = 55, "Nanocomponent Central Processing Unit", "Power Circuit", o)); + ItemList.Circuit_Chip_NanoCPU.set( + addItem(tLastID = 55, "Nanocomponent Central Processing Unit", "Power Circuit", o)); ItemList.Circuit_Wafer_QuantumCPU.set(addItem(tLastID = 56, "QBit Wafer", "Raw Circuit", o)); ItemList.Circuit_Chip_QuantumCPU.set(addItem(tLastID = 57, "QBit Processing Unit", "Quantum CPU", o)); @@ -171,149 +225,379 @@ public class GT_MetaGenerated_Item_03 * SoCrystal * stem cells (disassemble eggs) */ - ItemList.Circuit_Chip_CrystalSoC2.set(addItem(tLastID = 68, "Raw Advanced Crystal Chip", "Raw Advanced Crystal Processor", o)); - ItemList.Circuit_Parts_RawCrystalChip.set(addItem(tLastID = 69, "Raw Crystal Chip", "Raw Crystal Processor", o)); - ItemList.Circuit_Chip_CrystalCPU.set(addItem(tLastID = 70, "Crystal Processing Unit", "Crystal CPU", o)); //Crystal chip elite part + ItemList.Circuit_Chip_CrystalSoC2.set( + addItem(tLastID = 68, "Raw Advanced Crystal Chip", "Raw Advanced Crystal Processor", o)); + ItemList.Circuit_Parts_RawCrystalChip.set( + addItem(tLastID = 69, "Raw Crystal Chip", "Raw Crystal Processor", o)); + ItemList.Circuit_Chip_CrystalCPU.set( + addItem(tLastID = 70, "Crystal Processing Unit", "Crystal CPU", o)); // Crystal chip elite part ItemList.Circuit_Chip_CrystalSoC.set(addItem(tLastID = 71, "Crystal SoC", "Crystal System on a Chip", o)); ItemList.Circuit_Chip_NeuroCPU.set(addItem(tLastID = 72, "Neuro Processing Unit", "Neuro CPU", o)); ItemList.Circuit_Chip_Stemcell.set(addItem(tLastID = 73, "Stemcells", "Raw inteligence", o)); - ItemList.Circuit_Parts_RawCrystalParts.set(addItem(tLastID = 74, "Raw Crystal Chip Parts", "Raw Crystal Processor Parts", o)); + ItemList.Circuit_Parts_RawCrystalParts.set( + addItem(tLastID = 74, "Raw Crystal Chip Parts", "Raw Crystal Processor Parts", o)); ItemList.Circuit_Chip_Biocell.set(addItem(tLastID = 76, "Biocells", "Mutated Raw inteligence", o)); ItemList.Circuit_Chip_BioCPU.set(addItem(tLastID = 77, "Bio Processing Unit", "Bio CPU", o)); - //Nand Chip - ItemList.NandChip.set(addItem(tLastID = 75, "NAND Chip", "A very simple Circuit", OrePrefixes.circuit.get(Materials.Primitive), SubTag.NO_UNIFICATION)); - OreDictionary.registerOre("ULV" , ItemList.NandChip.get(1)); - //Vacuum Tube Item01 - //Basic Circuit IC2 - //Good Circuit Item01 - - //Integrated Logic Circuit Item01 - ItemList.Circuit_Integrated_Good.set(addItem(tLastID = 79, "Good Integrated Circuit", "Good Circuit", OrePrefixes.circuit.get(Materials.Good), SubTag.NO_UNIFICATION)); - OreDictionary.registerOre("MV" , ItemList.Circuit_Integrated_Good.get(1)); - //Good Integrated Circuit Item01 - //Advanced Circuit IC2 - - ItemList.Circuit_Microprocessor.set(addItem(tLastID = 78, "Microprocessor", "A Basic Circuit", OrePrefixes.circuit.get(Materials.Basic), SubTag.NO_UNIFICATION)); - OreDictionary.registerOre("LV" , ItemList.Circuit_Microprocessor.get(1)); - ItemList.Circuit_Processor.set(addItem(tLastID = 80, "Integrated Processor", "A Good Circuit", OrePrefixes.circuit.get(Materials.Good), SubTag.NO_UNIFICATION)); - OreDictionary.registerOre("MV" , ItemList.Circuit_Processor.get(1)); - //ItemList.Circuit_Computer.set(addItem(tLastID = 81, "Processor Assembly", "Advanced Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Advanced), SubTag.NO_UNIFICATION})); - //Workstation/ Item01 Datacircuit - //Mainframe Item01 DataProcessor - - ItemList.Circuit_Nanoprocessor.set(addItem(tLastID = 82, "Nanoprocessor", "An Advanced Circuit", OrePrefixes.circuit.get(Materials.Advanced), SubTag.NO_UNIFICATION)); - OreDictionary.registerOre("HV" , ItemList.Circuit_Nanoprocessor.get(1)); - ItemList.Circuit_Nanocomputer.set(addItem(tLastID = 83, "Nanoprocessor Assembly", "An Extreme Circuit", OrePrefixes.circuit.get(Materials.Data), SubTag.NO_UNIFICATION)); - OreDictionary.registerOre("EV" , ItemList.Circuit_Nanocomputer.get(1)); - ItemList.Circuit_Elitenanocomputer.set(addItem(tLastID = 84, "Elite Nanocomputer", "An Elite Circuit", OrePrefixes.circuit.get(Materials.Elite), SubTag.NO_UNIFICATION)); - OreDictionary.registerOre("IV" , ItemList.Circuit_Elitenanocomputer.get(1)); - //Nanoprocessor Mainframe Item01 Energy Flow Circuit + // Nand Chip + ItemList.NandChip.set(addItem( + tLastID = 75, + "NAND Chip", + "A very simple Circuit", + OrePrefixes.circuit.get(Materials.Primitive), + SubTag.NO_UNIFICATION)); + OreDictionary.registerOre("ULV", ItemList.NandChip.get(1)); + // Vacuum Tube Item01 + // Basic Circuit IC2 + // Good Circuit Item01 + + // Integrated Logic Circuit Item01 + ItemList.Circuit_Integrated_Good.set(addItem( + tLastID = 79, + "Good Integrated Circuit", + "Good Circuit", + OrePrefixes.circuit.get(Materials.Good), + SubTag.NO_UNIFICATION)); + OreDictionary.registerOre("MV", ItemList.Circuit_Integrated_Good.get(1)); + // Good Integrated Circuit Item01 + // Advanced Circuit IC2 + + ItemList.Circuit_Microprocessor.set(addItem( + tLastID = 78, + "Microprocessor", + "A Basic Circuit", + OrePrefixes.circuit.get(Materials.Basic), + SubTag.NO_UNIFICATION)); + OreDictionary.registerOre("LV", ItemList.Circuit_Microprocessor.get(1)); + ItemList.Circuit_Processor.set(addItem( + tLastID = 80, + "Integrated Processor", + "A Good Circuit", + OrePrefixes.circuit.get(Materials.Good), + SubTag.NO_UNIFICATION)); + OreDictionary.registerOre("MV", ItemList.Circuit_Processor.get(1)); + // ItemList.Circuit_Computer.set(addItem(tLastID = 81, "Processor Assembly", "Advanced Circuit", new + // Object[]{OrePrefixes.circuit.get(Materials.Advanced), SubTag.NO_UNIFICATION})); + // Workstation/ Item01 Datacircuit + // Mainframe Item01 DataProcessor + + ItemList.Circuit_Nanoprocessor.set(addItem( + tLastID = 82, + "Nanoprocessor", + "An Advanced Circuit", + OrePrefixes.circuit.get(Materials.Advanced), + SubTag.NO_UNIFICATION)); + OreDictionary.registerOre("HV", ItemList.Circuit_Nanoprocessor.get(1)); + ItemList.Circuit_Nanocomputer.set(addItem( + tLastID = 83, + "Nanoprocessor Assembly", + "An Extreme Circuit", + OrePrefixes.circuit.get(Materials.Data), + SubTag.NO_UNIFICATION)); + OreDictionary.registerOre("EV", ItemList.Circuit_Nanocomputer.get(1)); + ItemList.Circuit_Elitenanocomputer.set(addItem( + tLastID = 84, + "Elite Nanocomputer", + "An Elite Circuit", + OrePrefixes.circuit.get(Materials.Elite), + SubTag.NO_UNIFICATION)); + OreDictionary.registerOre("IV", ItemList.Circuit_Elitenanocomputer.get(1)); + // Nanoprocessor Mainframe Item01 Energy Flow Circuit // Quantum circuits - ItemList.Circuit_Quantumprocessor.set(addItem(tLastID = 85, "Quantumprocessor", "An Extreme Circuit", OrePrefixes.circuit.get(Materials.Data), SubTag.NO_UNIFICATION)); - OreDictionary.registerOre("EV" , ItemList.Circuit_Quantumprocessor.get(1)); - ItemList.Circuit_Quantumcomputer.set(addItem(tLastID = 86, "Quantumprocessor Assembly", "An Elite Circuit", OrePrefixes.circuit.get(Materials.Elite), SubTag.NO_UNIFICATION)); - OreDictionary.registerOre("IV" , ItemList.Circuit_Quantumcomputer.get(1)); - ItemList.Circuit_Masterquantumcomputer.set(addItem(tLastID = 87, "Master Quantumcomputer", "A Master Circuit", OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION)); - OreDictionary.registerOre("LuV" , ItemList.Circuit_Masterquantumcomputer.get(1)); - ItemList.Circuit_Quantummainframe.set(addItem(tLastID = 88, "Quantumprocessor Mainframe", "An Ultimate Circuit", OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION)); - OreDictionary.registerOre("ZPM" , ItemList.Circuit_Quantummainframe.get(1)); - + ItemList.Circuit_Quantumprocessor.set(addItem( + tLastID = 85, + "Quantumprocessor", + "An Extreme Circuit", + OrePrefixes.circuit.get(Materials.Data), + SubTag.NO_UNIFICATION)); + OreDictionary.registerOre("EV", ItemList.Circuit_Quantumprocessor.get(1)); + ItemList.Circuit_Quantumcomputer.set(addItem( + tLastID = 86, + "Quantumprocessor Assembly", + "An Elite Circuit", + OrePrefixes.circuit.get(Materials.Elite), + SubTag.NO_UNIFICATION)); + OreDictionary.registerOre("IV", ItemList.Circuit_Quantumcomputer.get(1)); + ItemList.Circuit_Masterquantumcomputer.set(addItem( + tLastID = 87, + "Master Quantumcomputer", + "A Master Circuit", + OrePrefixes.circuit.get(Materials.Master), + SubTag.NO_UNIFICATION)); + OreDictionary.registerOre("LuV", ItemList.Circuit_Masterquantumcomputer.get(1)); + ItemList.Circuit_Quantummainframe.set(addItem( + tLastID = 88, + "Quantumprocessor Mainframe", + "An Ultimate Circuit", + OrePrefixes.circuit.get(Materials.Ultimate), + SubTag.NO_UNIFICATION)); + OreDictionary.registerOre("ZPM", ItemList.Circuit_Quantummainframe.get(1)); // Crystal circuits - ItemList.Circuit_Crystalprocessor.set(addItem(tLastID = 89, "Crystalprocessor", "An Elite Circuit", OrePrefixes.circuit.get(Materials.Elite), SubTag.NO_UNIFICATION)); - OreDictionary.registerOre("IV" , ItemList.Circuit_Crystalprocessor.get(1)); - ItemList.Circuit_Crystalcomputer.set(addItem(tLastID = 96, "Crystalprocessor Assembly", "A Master Circuit", OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Crystalprocessor.set(addItem( + tLastID = 89, + "Crystalprocessor", + "An Elite Circuit", + OrePrefixes.circuit.get(Materials.Elite), + SubTag.NO_UNIFICATION)); + OreDictionary.registerOre("IV", ItemList.Circuit_Crystalprocessor.get(1)); + ItemList.Circuit_Crystalcomputer.set(addItem( + tLastID = 96, + "Crystalprocessor Assembly", + "A Master Circuit", + OrePrefixes.circuit.get(Materials.Master), + SubTag.NO_UNIFICATION)); OreDictionary.registerOre("LuV", ItemList.Circuit_Crystalcomputer.get(1)); - ItemList.Circuit_Ultimatecrystalcomputer.set(addItem(tLastID = 90, "Ultimate Crystalcomputer", "An Ultimate Circuit", OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Ultimatecrystalcomputer.set(addItem( + tLastID = 90, + "Ultimate Crystalcomputer", + "An Ultimate Circuit", + OrePrefixes.circuit.get(Materials.Ultimate), + SubTag.NO_UNIFICATION)); OreDictionary.registerOre("ZPM", ItemList.Circuit_Ultimatecrystalcomputer.get(1)); - ItemList.Circuit_Crystalmainframe.set(addItem(tLastID = 91, "Crystalprocessor Mainframe", "A Super Circuit", OrePrefixes.circuit.get(Materials.Superconductor), SubTag.NO_UNIFICATION)); - OreDictionary.registerOre("UV" , ItemList.Circuit_Crystalmainframe.get(1)); + ItemList.Circuit_Crystalmainframe.set(addItem( + tLastID = 91, + "Crystalprocessor Mainframe", + "A Super Circuit", + OrePrefixes.circuit.get(Materials.Superconductor), + SubTag.NO_UNIFICATION)); + OreDictionary.registerOre("UV", ItemList.Circuit_Crystalmainframe.get(1)); // ???? Scared to remove. - ItemList.Circuit_Ultimate.set(ItemList.Circuit_Ultimatecrystalcomputer.get(1L)); //maybe should be removed + ItemList.Circuit_Ultimate.set(ItemList.Circuit_Ultimatecrystalcomputer.get(1L)); // maybe should be removed // Wetware circuits - ItemList.Circuit_Neuroprocessor.set(addItem(tLastID = 92, "Wetwareprocessor", "A Master Circuit", OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Neuroprocessor.set(addItem( + tLastID = 92, + "Wetwareprocessor", + "A Master Circuit", + OrePrefixes.circuit.get(Materials.Master), + SubTag.NO_UNIFICATION)); OreDictionary.registerOre("LuV", ItemList.Circuit_Neuroprocessor.get(1)); - ItemList.Circuit_Wetwarecomputer.set(addItem(tLastID = 93, "Wetwareprocessor Assembly", "An Ultimate Circuit", OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Wetwarecomputer.set(addItem( + tLastID = 93, + "Wetwareprocessor Assembly", + "An Ultimate Circuit", + OrePrefixes.circuit.get(Materials.Ultimate), + SubTag.NO_UNIFICATION)); OreDictionary.registerOre("ZPM", ItemList.Circuit_Wetwarecomputer.get(1)); - ItemList.Circuit_Wetwaresupercomputer.set(addItem(tLastID = 94, "Wetware Supercomputer", "A Super Circuit", OrePrefixes.circuit.get(Materials.Superconductor), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Wetwaresupercomputer.set(addItem( + tLastID = 94, + "Wetware Supercomputer", + "A Super Circuit", + OrePrefixes.circuit.get(Materials.Superconductor), + SubTag.NO_UNIFICATION)); OreDictionary.registerOre("UV", ItemList.Circuit_Wetwaresupercomputer.get(1)); - ItemList.Circuit_Wetwaremainframe.set(addItem(tLastID = 95, "Wetware Mainframe", "An Infinite Circuit", OrePrefixes.circuit.get(Materials.Infinite), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Wetwaremainframe.set(addItem( + tLastID = 95, + "Wetware Mainframe", + "An Infinite Circuit", + OrePrefixes.circuit.get(Materials.Infinite), + SubTag.NO_UNIFICATION)); OreDictionary.registerOre("UHV", ItemList.Circuit_Wetwaremainframe.get(1)); // Bioware circuits. - ItemList.Circuit_Bioprocessor.set(addItem(tLastID = 97, "Bioprocessor", "An Ultimate Circuit", OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Bioprocessor.set(addItem( + tLastID = 97, + "Bioprocessor", + "An Ultimate Circuit", + OrePrefixes.circuit.get(Materials.Ultimate), + SubTag.NO_UNIFICATION)); OreDictionary.registerOre("ZPM", ItemList.Circuit_Bioprocessor.get(1)); - ItemList.Circuit_Biowarecomputer.set(addItem(tLastID = 98, "Biowareprocessor Assembly", "A Super Circuit", OrePrefixes.circuit.get(Materials.Superconductor), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Biowarecomputer.set(addItem( + tLastID = 98, + "Biowareprocessor Assembly", + "A Super Circuit", + OrePrefixes.circuit.get(Materials.Superconductor), + SubTag.NO_UNIFICATION)); OreDictionary.registerOre("UV", ItemList.Circuit_Biowarecomputer.get(1)); - ItemList.Circuit_Biowaresupercomputer.set(addItem(tLastID = 99, "Bioware Supercomputer", "An Infinite Circuit", OrePrefixes.circuit.get(Materials.Infinite), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Biowaresupercomputer.set(addItem( + tLastID = 99, + "Bioware Supercomputer", + "An Infinite Circuit", + OrePrefixes.circuit.get(Materials.Infinite), + SubTag.NO_UNIFICATION)); OreDictionary.registerOre("UHV", ItemList.Circuit_Biowaresupercomputer.get(1)); - ItemList.Circuit_Biomainframe.set(addItem(tLastID = 120, "Bio Mainframe", "A Bio Circuit", OrePrefixes.circuit.get(Materials.Bio), SubTag.NO_UNIFICATION)); + ItemList.Circuit_Biomainframe.set(addItem( + tLastID = 120, + "Bio Mainframe", + "A Bio Circuit", + OrePrefixes.circuit.get(Materials.Bio), + SubTag.NO_UNIFICATION)); OreDictionary.registerOre("UEV", ItemList.Circuit_Biomainframe.get(1)); ItemList.Circuit_Board_Coated_Basic.set(addItem(tLastID = 100, "Circuit Board", "A basic Circuit Board", o)); - ItemList.Circuit_Board_Phenolic_Good.set(addItem(tLastID = 101, "Good Circuit Board", "A good Circuit Board", o)); - ItemList.Circuit_Board_Epoxy_Advanced.set(addItem(tLastID = 102, "Advanced Circuit Board", "A advanced Circuit Board", o)); - ItemList.Circuit_Board_Fiberglass_Advanced.set(addItem(tLastID = 103, "More Advanced Circuit Board", "A more advanced Circuit Board", o)); - ItemList.Circuit_Board_Multifiberglass_Elite.set(addItem(tLastID = 104, "Elite Circuit Board", "A elite Circuit Board", o)); - ItemList.Circuit_Board_Wetware_Extreme.set(addItem(tLastID = 105, "Extreme Wetware Lifesupport Circuit Board", "The Board that keeps life", o)); + ItemList.Circuit_Board_Phenolic_Good.set( + addItem(tLastID = 101, "Good Circuit Board", "A good Circuit Board", o)); + ItemList.Circuit_Board_Epoxy_Advanced.set( + addItem(tLastID = 102, "Advanced Circuit Board", "A advanced Circuit Board", o)); + ItemList.Circuit_Board_Fiberglass_Advanced.set( + addItem(tLastID = 103, "More Advanced Circuit Board", "A more advanced Circuit Board", o)); + ItemList.Circuit_Board_Multifiberglass_Elite.set( + addItem(tLastID = 104, "Elite Circuit Board", "A elite Circuit Board", o)); + ItemList.Circuit_Board_Wetware_Extreme.set( + addItem(tLastID = 105, "Extreme Wetware Lifesupport Circuit Board", "The Board that keeps life", o)); ItemList.Circuit_Board_Plastic_Advanced.set(addItem(tLastID = 106, "Plastic Circuit Board", "A good Board", o)); - ItemList.Circuit_Board_Bio_Ultra.set(addItem(tLastID = 107, "Ultra Bio Mutated Circuit Board", "Bio genetic mutated Board", o)); + ItemList.Circuit_Board_Bio_Ultra.set( + addItem(tLastID = 107, "Ultra Bio Mutated Circuit Board", "Bio genetic mutated Board", o)); // Optical circuits - ItemList.Circuit_OpticalProcessor.set(addItem(tLastID = 154, "Optical Processor", "An Optical Circuit", OrePrefixes.circuit.get(Materials.Superconductor), SubTag.NO_UNIFICATION)); + ItemList.Circuit_OpticalProcessor.set(addItem( + tLastID = 154, + "Optical Processor", + "An Optical Circuit", + OrePrefixes.circuit.get(Materials.Superconductor), + SubTag.NO_UNIFICATION)); OreDictionary.registerOre("UV", ItemList.Circuit_OpticalProcessor.get(1)); - ItemList.Circuit_OpticalAssembly.set(addItem(tLastID = 155, "Optical Assembly", "An Optical Circuit", OrePrefixes.circuit.get(Materials.Infinite), SubTag.NO_UNIFICATION)); + ItemList.Circuit_OpticalAssembly.set(addItem( + tLastID = 155, + "Optical Assembly", + "An Optical Circuit", + OrePrefixes.circuit.get(Materials.Infinite), + SubTag.NO_UNIFICATION)); OreDictionary.registerOre("UHV", ItemList.Circuit_OpticalAssembly.get(1)); - ItemList.Circuit_OpticalComputer.set(addItem(tLastID = 156, "Optical Computer", "An Optical Circuit", OrePrefixes.circuit.get(Materials.Bio), SubTag.NO_UNIFICATION)); + ItemList.Circuit_OpticalComputer.set(addItem( + tLastID = 156, + "Optical Computer", + "An Optical Circuit", + OrePrefixes.circuit.get(Materials.Bio), + SubTag.NO_UNIFICATION)); OreDictionary.registerOre("UEV", ItemList.Circuit_OpticalComputer.get(1)); - ItemList.Circuit_OpticalMainframe.set(addItem(tLastID = 157, "Optical Mainframe", "An Optical Circuit", OrePrefixes.circuit.get(Materials.Optical), SubTag.NO_UNIFICATION)); + ItemList.Circuit_OpticalMainframe.set(addItem( + tLastID = 157, + "Optical Mainframe", + "An Optical Circuit", + OrePrefixes.circuit.get(Materials.Optical), + SubTag.NO_UNIFICATION)); OreDictionary.registerOre("UIV", ItemList.Circuit_OpticalMainframe.get(1)); - // Exotic circuits - ItemList.Circuit_ExoticProcessor.set(addItem(tLastID = 166, "Exotic Processor", "An Exotic Circuit", OrePrefixes.circuit.get(Materials.Infinite), SubTag.NO_UNIFICATION)); + ItemList.Circuit_ExoticProcessor.set(addItem( + tLastID = 166, + "Exotic Processor", + "An Exotic Circuit", + OrePrefixes.circuit.get(Materials.Infinite), + SubTag.NO_UNIFICATION)); OreDictionary.registerOre("UHV", ItemList.Circuit_ExoticProcessor.get(1)); - ItemList.Circuit_ExoticAssembly.set(addItem(tLastID = 167, "Exotic Assembly", "An Exotic Circuit", OrePrefixes.circuit.get(Materials.Bio), SubTag.NO_UNIFICATION)); + ItemList.Circuit_ExoticAssembly.set(addItem( + tLastID = 167, + "Exotic Assembly", + "An Exotic Circuit", + OrePrefixes.circuit.get(Materials.Bio), + SubTag.NO_UNIFICATION)); OreDictionary.registerOre("UEV", ItemList.Circuit_ExoticAssembly.get(1)); - ItemList.Circuit_ExoticComputer.set(addItem(tLastID = 168, "Exotic Computer", "An Exotic Circuit", OrePrefixes.circuit.get(Materials.Optical), SubTag.NO_UNIFICATION)); + ItemList.Circuit_ExoticComputer.set(addItem( + tLastID = 168, + "Exotic Computer", + "An Exotic Circuit", + OrePrefixes.circuit.get(Materials.Optical), + SubTag.NO_UNIFICATION)); OreDictionary.registerOre("UIV", ItemList.Circuit_ExoticComputer.get(1)); - ItemList.Circuit_ExoticMainframe.set(addItem(tLastID = 169, "Exotic Mainframe", "An Exotic Circuit", OrePrefixes.circuit.get(Materials.Exotic), SubTag.NO_UNIFICATION)); + ItemList.Circuit_ExoticMainframe.set(addItem( + tLastID = 169, + "Exotic Mainframe", + "An Exotic Circuit", + OrePrefixes.circuit.get(Materials.Exotic), + SubTag.NO_UNIFICATION)); OreDictionary.registerOre("UMV", ItemList.Circuit_ExoticMainframe.get(1)); // Cosmic circuits - ItemList.Circuit_CosmicProcessor.set(addItem(tLastID = 170, "Cosmic Processor", "A Cosmic Circuit", OrePrefixes.circuit.get(Materials.Bio), SubTag.NO_UNIFICATION)); + ItemList.Circuit_CosmicProcessor.set(addItem( + tLastID = 170, + "Cosmic Processor", + "A Cosmic Circuit", + OrePrefixes.circuit.get(Materials.Bio), + SubTag.NO_UNIFICATION)); OreDictionary.registerOre("UEV", ItemList.Circuit_CosmicProcessor.get(1)); - ItemList.Circuit_CosmicAssembly.set(addItem(tLastID = 171, "Cosmic Assembly", "A Cosmic Circuit", OrePrefixes.circuit.get(Materials.Optical), SubTag.NO_UNIFICATION)); + ItemList.Circuit_CosmicAssembly.set(addItem( + tLastID = 171, + "Cosmic Assembly", + "A Cosmic Circuit", + OrePrefixes.circuit.get(Materials.Optical), + SubTag.NO_UNIFICATION)); OreDictionary.registerOre("UIV", ItemList.Circuit_CosmicAssembly.get(1)); - ItemList.Circuit_CosmicComputer.set(addItem(tLastID = 172, "Cosmic Computer", "A Cosmic Circuit", OrePrefixes.circuit.get(Materials.Exotic), SubTag.NO_UNIFICATION)); + ItemList.Circuit_CosmicComputer.set(addItem( + tLastID = 172, + "Cosmic Computer", + "A Cosmic Circuit", + OrePrefixes.circuit.get(Materials.Exotic), + SubTag.NO_UNIFICATION)); OreDictionary.registerOre("UMV", ItemList.Circuit_CosmicComputer.get(1)); - ItemList.Circuit_CosmicMainframe.set(addItem(tLastID = 173, "Cosmic Mainframe", "A Cosmic Circuit", OrePrefixes.circuit.get(Materials.Cosmic), SubTag.NO_UNIFICATION)); + ItemList.Circuit_CosmicMainframe.set(addItem( + tLastID = 173, + "Cosmic Mainframe", + "A Cosmic Circuit", + OrePrefixes.circuit.get(Materials.Cosmic), + SubTag.NO_UNIFICATION)); OreDictionary.registerOre("UXV", ItemList.Circuit_CosmicMainframe.get(1)); // Transcendent circuits - ItemList.Circuit_TranscendentProcessor.set(addItem(tLastID = 174, "Temporally Transcendent Processor", "A circuit operating outside of known spacetime", OrePrefixes.circuit.get(Materials.Optical), SubTag.NO_UNIFICATION)); + ItemList.Circuit_TranscendentProcessor.set(addItem( + tLastID = 174, + "Temporally Transcendent Processor", + "A circuit operating outside of known spacetime", + OrePrefixes.circuit.get(Materials.Optical), + SubTag.NO_UNIFICATION)); OreDictionary.registerOre("UIV", ItemList.Circuit_TranscendentProcessor.get(1)); - ItemList.Circuit_TranscendentAssembly.set(addItem(tLastID = 175, "Temporally Transcendent Assembly", "A circuit operating outside of known spacetime", OrePrefixes.circuit.get(Materials.Exotic), SubTag.NO_UNIFICATION)); + ItemList.Circuit_TranscendentAssembly.set(addItem( + tLastID = 175, + "Temporally Transcendent Assembly", + "A circuit operating outside of known spacetime", + OrePrefixes.circuit.get(Materials.Exotic), + SubTag.NO_UNIFICATION)); OreDictionary.registerOre("UMV", ItemList.Circuit_TranscendentAssembly.get(1)); - ItemList.Circuit_TranscendentComputer.set(addItem(tLastID = 176, "Temporally Transcendent Computer", "A circuit operating outside of known spacetime", OrePrefixes.circuit.get(Materials.Cosmic), SubTag.NO_UNIFICATION)); + ItemList.Circuit_TranscendentComputer.set(addItem( + tLastID = 176, + "Temporally Transcendent Computer", + "A circuit operating outside of known spacetime", + OrePrefixes.circuit.get(Materials.Cosmic), + SubTag.NO_UNIFICATION)); OreDictionary.registerOre("UXV", ItemList.Circuit_TranscendentComputer.get(1)); - ItemList.Circuit_TranscendentMainframe.set(addItem(tLastID = 177, "Temporally Transcendent Mainframe", "A circuit operating outside of known spacetime", OrePrefixes.circuit.get(Materials.Transcendent), SubTag.NO_UNIFICATION)); + ItemList.Circuit_TranscendentMainframe.set(addItem( + tLastID = 177, + "Temporally Transcendent Mainframe", + "A circuit operating outside of known spacetime", + OrePrefixes.circuit.get(Materials.Transcendent), + SubTag.NO_UNIFICATION)); OreDictionary.registerOre("MAX", ItemList.Circuit_TranscendentMainframe.get(1)); - ItemList.Tube_Wires.set(addItem(tLastID = 110, "Tube Wires", "For the Vacuum Tubes", o)); - ItemList.Cover_SolarPanel_UHV.set(addItem(tLastID = 130, "Solar Panel (UHV)", "Ultimate High Voltage Solar Panel (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 128L))); - ItemList.Cover_SolarPanel_UEV.set(addItem(tLastID = 131, "Solar Panel (UEV)", "Ultimate Extreme Voltage Solar Panel (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 256L))); - ItemList.Cover_SolarPanel_UIV.set(addItem(tLastID = 132, "Solar Panel (UIV)", "Ultimate Insane Voltage Solar Panel (Needs cleaning with right click)", new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 512L))); - - GregTech_API.registerCover(ItemList.Cover_SolarPanel_UHV.get(1L), TextureFactory.of(SOLARPANEL_UHV), new GT_Cover_SolarPanel(2097152)); - GregTech_API.registerCover(ItemList.Cover_SolarPanel_UEV.get(1L), TextureFactory.of(SOLARPANEL_UEV), new GT_Cover_SolarPanel(8388608)); - GregTech_API.registerCover(ItemList.Cover_SolarPanel_UIV.get(1L), TextureFactory.of(SOLARPANEL_UIV), new GT_Cover_SolarPanel(33554432)); + ItemList.Cover_SolarPanel_UHV.set(addItem( + tLastID = 130, + "Solar Panel (UHV)", + "Ultimate High Voltage Solar Panel (Needs cleaning with right click)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 128L))); + ItemList.Cover_SolarPanel_UEV.set(addItem( + tLastID = 131, + "Solar Panel (UEV)", + "Ultimate Extreme Voltage Solar Panel (Needs cleaning with right click)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 256L))); + ItemList.Cover_SolarPanel_UIV.set(addItem( + tLastID = 132, + "Solar Panel (UIV)", + "Ultimate Insane Voltage Solar Panel (Needs cleaning with right click)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 512L))); + + GregTech_API.registerCover( + ItemList.Cover_SolarPanel_UHV.get(1L), + TextureFactory.of(SOLARPANEL_UHV), + new GT_Cover_SolarPanel(2097152)); + GregTech_API.registerCover( + ItemList.Cover_SolarPanel_UEV.get(1L), + TextureFactory.of(SOLARPANEL_UEV), + new GT_Cover_SolarPanel(8388608)); + GregTech_API.registerCover( + ItemList.Cover_SolarPanel_UIV.get(1L), + TextureFactory.of(SOLARPANEL_UIV), + new GT_Cover_SolarPanel(33554432)); ItemList.ULV_Coil.set(addItem(tLastID = 140, "Ultra Low Voltage Coil", "Primitive Coil", o)); ItemList.LV_Coil.set(addItem(tLastID = 141, "Low Voltage Coil", "Basic Coil", o)); @@ -327,20 +611,57 @@ public class GT_MetaGenerated_Item_03 ItemList.UHV_Coil.set(addItem(tLastID = 149, "Highly Ultimate Voltage Coil", "Infinite Coil", o)); ItemList.GalliumArsenideCrystal.set(addItem(tLastID = 190, "Gallium Arsenide Crystal", "For making boules", o)); - ItemList.GalliumArsenideCrystalSmallPart.set(addItem(tLastID = 191, "Small Gallium Arsenide Crystal", "For making boules", o)); + ItemList.GalliumArsenideCrystalSmallPart.set( + addItem(tLastID = 191, "Small Gallium Arsenide Crystal", "For making boules", o)); ItemList.KevlarFiber.set(addItem(tLastID = 192, "Kevlar Fiber", "For make Kevlar Plates", o)); ItemList.WovenKevlar.set(addItem(tLastID = 193, "Woven Kevlar", "For make Kevlar Plates", o)); ItemList.Spinneret.set(addItem(tLastID = 194, "Spinneret", "For make Kevlar Fiber", o)); - ItemList.IndustrialApiary_Upgrade_Acceleration_1.set(addItem(tLastID = 200, "Acceleration Upgrade x2", "Acceleration upgrade for Industrial Apiary/n Unlocks 2x acceleration level", OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_Acceleration_2.set(addItem(tLastID = 201, "Acceleration Upgrade x4", "Acceleration upgrade for Industrial Apiary/n Unlocks 4x acceleration level", OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_Acceleration_3.set(addItem(tLastID = 202, "Acceleration Upgrade x8", "Acceleration upgrade for Industrial Apiary/n Unlocks 8x acceleration level", OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_Acceleration_4.set(addItem(tLastID = 203, "Acceleration Upgrade x16", "Acceleration upgrade for Industrial Apiary/n Unlocks 16x acceleration level", OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_Acceleration_5.set(addItem(tLastID = 204, "Acceleration Upgrade x32", "Acceleration upgrade for Industrial Apiary/n Unlocks 32x acceleration level", OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_Acceleration_6.set(addItem(tLastID = 205, "Acceleration Upgrade x64", "Acceleration upgrade for Industrial Apiary/n Unlocks 64x acceleration level", OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_Acceleration_7.set(addItem(tLastID = 206, "Acceleration Upgrade x128", "Acceleration upgrade for Industrial Apiary/n Unlocks 128x acceleration level", OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_Acceleration_8.set(addItem(tLastID = 207, "Acceleration Upgrade x256", "Acceleration upgrade for Industrial Apiary/n Unlocks 256x acceleration level", OrePrefixes.apiaryUpgrade.name())); - ItemList.IndustrialApiary_Upgrade_Acceleration_8_Upgraded.set(addItem(tLastID = 208, "Upgraded Acceleration Upgrade x256", "Acceleration upgrade for Industrial Apiary/n Unlocks 256x acceleration level/n Will also grant 8x production upgrade", OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_Acceleration_1.set(addItem( + tLastID = 200, + "Acceleration Upgrade x2", + "Acceleration upgrade for Industrial Apiary/n Unlocks 2x acceleration level", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_Acceleration_2.set(addItem( + tLastID = 201, + "Acceleration Upgrade x4", + "Acceleration upgrade for Industrial Apiary/n Unlocks 4x acceleration level", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_Acceleration_3.set(addItem( + tLastID = 202, + "Acceleration Upgrade x8", + "Acceleration upgrade for Industrial Apiary/n Unlocks 8x acceleration level", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_Acceleration_4.set(addItem( + tLastID = 203, + "Acceleration Upgrade x16", + "Acceleration upgrade for Industrial Apiary/n Unlocks 16x acceleration level", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_Acceleration_5.set(addItem( + tLastID = 204, + "Acceleration Upgrade x32", + "Acceleration upgrade for Industrial Apiary/n Unlocks 32x acceleration level", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_Acceleration_6.set(addItem( + tLastID = 205, + "Acceleration Upgrade x64", + "Acceleration upgrade for Industrial Apiary/n Unlocks 64x acceleration level", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_Acceleration_7.set(addItem( + tLastID = 206, + "Acceleration Upgrade x128", + "Acceleration upgrade for Industrial Apiary/n Unlocks 128x acceleration level", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_Acceleration_8.set(addItem( + tLastID = 207, + "Acceleration Upgrade x256", + "Acceleration upgrade for Industrial Apiary/n Unlocks 256x acceleration level", + OrePrefixes.apiaryUpgrade.name())); + ItemList.IndustrialApiary_Upgrade_Acceleration_8_Upgraded.set(addItem( + tLastID = 208, + "Upgraded Acceleration Upgrade x256", + "Acceleration upgrade for Industrial Apiary/n Unlocks 256x acceleration level/n Will also grant 8x production upgrade", + OrePrefixes.apiaryUpgrade.name())); OrePrefixes.apiaryUpgrade.add(ItemList.IndustrialApiary_Upgrade_Acceleration_1.get(1L)); OrePrefixes.apiaryUpgrade.add(ItemList.IndustrialApiary_Upgrade_Acceleration_2.get(1L)); @@ -351,7 +672,6 @@ public class GT_MetaGenerated_Item_03 OrePrefixes.apiaryUpgrade.add(ItemList.IndustrialApiary_Upgrade_Acceleration_7.get(1L)); OrePrefixes.apiaryUpgrade.add(ItemList.IndustrialApiary_Upgrade_Acceleration_8.get(1L)); OrePrefixes.apiaryUpgrade.add(ItemList.IndustrialApiary_Upgrade_Acceleration_8_Upgraded.get(1L)); - } @Override diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_98.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_98.java index fb65e907ff..b183cc6f73 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_98.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_98.java @@ -11,16 +11,6 @@ import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; - -import javax.annotation.Nullable; import java.util.Arrays; import java.util.EnumMap; import java.util.HashMap; @@ -29,6 +19,15 @@ import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; +import javax.annotation.Nullable; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; /** This class holds cells for non-GT fluids. */ public class GT_MetaGenerated_Item_98 extends GT_MetaGenerated_Item { @@ -98,6 +97,7 @@ public class GT_MetaGenerated_Item_98 extends GT_MetaGenerated_Item { private final int mId; /** This is the Forge internal fluid name. */ private final String mfluidName; + private final CellType mType; @Nullable @@ -193,6 +193,7 @@ public class GT_MetaGenerated_Item_98 extends GT_MetaGenerated_Item { * <p>Only contains IDs that were successfully registered. */ private final Map<Integer, RegisteredFluidData> registeredFluidDataMap; + private final EnumMap<CellType, IIconContainer> iconContainerMap; private GT_MetaGenerated_Item_98() { @@ -210,8 +211,7 @@ public class GT_MetaGenerated_Item_98 extends GT_MetaGenerated_Item { * However, cell icons seem to be deleted some time between load and post-load, so we must pre-cache them. */ public static synchronized void preInit() { - if (INSTANCE == null) - INSTANCE = new GT_MetaGenerated_Item_98(); + if (INSTANCE == null) INSTANCE = new GT_MetaGenerated_Item_98(); // We'll just steal the icons from Water. They are all the same anyway (except _NULL is broken for cells). for (CellType cellType : CellType.values()) { @@ -258,7 +258,9 @@ public class GT_MetaGenerated_Item_98 extends GT_MetaGenerated_Item { GT_LanguageManager.addStringLocalization( getUnlocalizedName(itemStack) + ".name", - cellType.prefix.mLocalizedMaterialPre + fluid.getLocalizedName(fluidStack) + cellType.prefix.mLocalizedMaterialPost); + cellType.prefix.mLocalizedMaterialPre + + fluid.getLocalizedName(fluidStack) + + cellType.prefix.mLocalizedMaterialPost); int color = fluid.getColor(); short[] rgba = new short[4]; diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_99.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_99.java index 820c28fea3..fb435a5b55 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_99.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_99.java @@ -1,5 +1,8 @@ package gregtech.common.items; +import static gregtech.api.enums.GT_Values.M; +import static gregtech.api.enums.OrePrefixes.cellMolten; + import com.google.common.collect.ImmutableList; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -11,17 +14,13 @@ import gregtech.api.interfaces.IIconContainer; import gregtech.api.items.GT_MetaGenerated_Item; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_OreDictUnificator; +import java.util.BitSet; +import java.util.List; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; -import java.util.BitSet; -import java.util.List; - -import static gregtech.api.enums.GT_Values.M; -import static gregtech.api.enums.OrePrefixes.cellMolten; - public class GT_MetaGenerated_Item_99 extends GT_MetaGenerated_Item { public static GT_MetaGenerated_Item_99 INSTANCE; @@ -31,10 +30,14 @@ public class GT_MetaGenerated_Item_99 extends GT_MetaGenerated_Item { * <p>In order to avoid breaking existing worlds, the entries in this list must not be re-ordered! The only safe * modification that can be made to this list is adding new entries to the end. */ - private static final ImmutableList<OrePrefixes> CRACKED_CELL_TYPES = - ImmutableList.of( - OrePrefixes.cellHydroCracked1, OrePrefixes.cellHydroCracked2, OrePrefixes.cellHydroCracked3, - OrePrefixes.cellSteamCracked1, OrePrefixes.cellSteamCracked2, OrePrefixes.cellSteamCracked3); + private static final ImmutableList<OrePrefixes> CRACKED_CELL_TYPES = ImmutableList.of( + OrePrefixes.cellHydroCracked1, + OrePrefixes.cellHydroCracked2, + OrePrefixes.cellHydroCracked3, + OrePrefixes.cellSteamCracked1, + OrePrefixes.cellSteamCracked2, + OrePrefixes.cellSteamCracked3); + private static final int NUM_CRACKED_CELL_TYPES = CRACKED_CELL_TYPES.size(); /** @@ -54,10 +57,13 @@ public class GT_MetaGenerated_Item_99 extends GT_MetaGenerated_Item { continue; } - if ((tMaterial.contains(SubTag.SMELTING_TO_FLUID)) && (!tMaterial.contains(SubTag.NO_SMELTING)) && !tMaterial.contains(SubTag.SMELTING_TO_GEM)) { + if ((tMaterial.contains(SubTag.SMELTING_TO_FLUID)) + && (!tMaterial.contains(SubTag.NO_SMELTING)) + && !tMaterial.contains(SubTag.SMELTING_TO_GEM)) { registerMolten(tMaterial, tMaterial.mMetaItemSubID); if (tMaterial.mSmeltInto != tMaterial - && tMaterial.mSmeltInto.mMetaItemSubID >= 0 && tMaterial.mSmeltInto.mMetaItemSubID < 1_000) { + && tMaterial.mSmeltInto.mMetaItemSubID >= 0 + && tMaterial.mSmeltInto.mMetaItemSubID < 1_000) { registerMolten(tMaterial.mSmeltInto, tMaterial.mSmeltInto.mMetaItemSubID); } } @@ -72,12 +78,14 @@ public class GT_MetaGenerated_Item_99 extends GT_MetaGenerated_Item { mVisibleItems.clear(); } - private void registerMolten(Materials tMaterial,int i){ + private void registerMolten(Materials tMaterial, int i) { ItemStack tStack = new ItemStack(this, 1, i); enabled.set(i); - GT_LanguageManager.addStringLocalization(getUnlocalizedName(tStack) + ".name", cellMolten.getDefaultLocalNameFormatForItem(tMaterial)); - GT_LanguageManager.addStringLocalization(getUnlocalizedName(tStack) + ".tooltip", tMaterial.getToolTip(cellMolten.mMaterialAmount / M)); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName(tStack) + ".name", cellMolten.getDefaultLocalNameFormatForItem(tMaterial)); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName(tStack) + ".tooltip", tMaterial.getToolTip(cellMolten.mMaterialAmount / M)); if (cellMolten.mIsUnificatable) { GT_OreDictUnificator.set(cellMolten, tMaterial, tStack); @@ -92,8 +100,10 @@ public class GT_MetaGenerated_Item_99 extends GT_MetaGenerated_Item { ItemStack tStack = new ItemStack(this, 1, offset + i); enabled.set(offset + i); - GT_LanguageManager.addStringLocalization(getUnlocalizedName(tStack) + ".name", prefix.getDefaultLocalNameFormatForItem(tMaterial)); - GT_LanguageManager.addStringLocalization(getUnlocalizedName(tStack) + ".tooltip", tMaterial.getToolTip(prefix.mMaterialAmount / M)); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName(tStack) + ".name", prefix.getDefaultLocalNameFormatForItem(tMaterial)); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName(tStack) + ".tooltip", tMaterial.getToolTip(prefix.mMaterialAmount / M)); if (prefix.mIsUnificatable) { GT_OreDictUnificator.set(prefix, tMaterial, tStack); @@ -162,9 +172,7 @@ public class GT_MetaGenerated_Item_99 extends GT_MetaGenerated_Item { @Override @SideOnly(Side.CLIENT) public void getSubItems(Item aItem, CreativeTabs aCreativeTab, List aList) { - enabled.stream() - .mapToObj(i -> new ItemStack(this, 1, i)) - .forEach(aList::add); + enabled.stream().mapToObj(i -> new ItemStack(this, 1, i)).forEach(aList::add); } @Override diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java index fdb29f15c8..29ea0d94ab 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java @@ -10,7 +10,7 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -public class GT_MetaGenerated_Tool_01 extends GT_MetaGenerated_Tool { +public class GT_MetaGenerated_Tool_01 extends GT_MetaGenerated_Tool { public static final short SWORD = 0; public static final short PICKAXE = 2; public static final short SHOVEL = 4; @@ -19,8 +19,10 @@ public class GT_MetaGenerated_Tool_01 extends GT_MetaGenerated_Tool { public static final short SAW = 10; public static final short HARDHAMMER = 12; public static final short SOFTMALLET = 14; + @Deprecated public static final short SOFTHAMMER = SOFTMALLET; + public static final short WRENCH = 16; public static final short FILE = 18; public static final short CROWBAR = 20; @@ -32,8 +34,10 @@ public class GT_MetaGenerated_Tool_01 extends GT_MetaGenerated_Tool { public static final short UNIVERSALSPADE = 32; public static final short KNIFE = 34; public static final short BUTCHERYKNIFE = 36; + @Deprecated public static final short SICKLE = 38; + public static final short SENSE = 40; public static final short PLOW = 42; public static final short PLUNGER = 44; @@ -51,8 +55,10 @@ public class GT_MetaGenerated_Tool_01 extends GT_MetaGenerated_Tool { public static final short BUZZSAW_LV = 140; public static final short BUZZSAW_MV = 142; public static final short BUZZSAW_HV = 144; + @Deprecated public static final short BUZZSAW = BUZZSAW_LV; + public static final short SCREWDRIVER_LV = 150; public static final short SCREWDRIVER_MV = 152; public static final short SCREWDRIVER_HV = 154; @@ -63,119 +69,725 @@ public class GT_MetaGenerated_Tool_01 extends GT_MetaGenerated_Tool { public static final short TURBINE = 172; public static final short TURBINE_LARGE = 174; public static final short TURBINE_HUGE = 176; + @Deprecated public static final short TURBINE_BLADE = 178; + public static GT_MetaGenerated_Tool_01 INSTANCE; public GT_MetaGenerated_Tool_01() { super("metatool.01"); INSTANCE = this; - addTool(SWORD, "Sword", "", new GT_Tool_Sword(), ToolDictNames.craftingToolSword, ToolDictNames.craftingToolBlade, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 4L)); - addTool(PICKAXE, "Pickaxe", "", new GT_Tool_Pickaxe(), ToolDictNames.craftingToolPickaxe, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 4L)); - addTool(SHOVEL, "Shovel", "", new GT_Tool_Shovel(), ToolDictNames.craftingToolShovel, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 4L)); - addTool(AXE, "Axe", "", new GT_Tool_Axe(), ToolDictNames.craftingToolAxe, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); - addTool(HOE, "Hoe", "", new GT_Tool_Hoe(), ToolDictNames.craftingToolHoe, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 4L)); - addTool(SAW, "Saw", "Can also harvest Ice", new GT_Tool_Saw(), ToolDictNames.craftingToolSaw, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); - GregTech_API.registerTool(addTool(HARDHAMMER, "Hammer", "Crushes Ores instead of harvesting them", new GT_Tool_HardHammer(), ToolDictNames.craftingToolHardHammer, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), GregTech_API.sHardHammerList); - GregTech_API.registerTool(addTool(SOFTMALLET, "Soft Mallet", "", new GT_Tool_SoftHammer(), ToolDictNames.craftingToolSoftHammer, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.LIMUS, 4L)), GregTech_API.sSoftHammerList); - GregTech_API.registerTool(addTool(WRENCH, "Wrench", "Hold Leftclick to dismantle Machines", new GT_Tool_Wrench(), ToolDictNames.craftingToolWrench, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), GregTech_API.sWrenchList); - addTool(FILE, "File", "", new GT_Tool_File(), ToolDictNames.craftingToolFile, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)); - GregTech_API.registerTool(addTool(CROWBAR, "Crowbar", "Dismounts Covers and Rotates Rails", new GT_Tool_Crowbar(), ToolDictNames.craftingToolCrowbar, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 2L)), GregTech_API.sCrowbarList); - GregTech_API.registerTool(addTool(SCREWDRIVER, "Screwdriver", "Adjusts Covers and Machines", new GT_Tool_Screwdriver(), ToolDictNames.craftingToolScrewdriver, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), GregTech_API.sScrewdriverList); - addTool(MORTAR, "Mortar", "", new GT_Tool_Mortar(), ToolDictNames.craftingToolMortar, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L)); - GregTech_API.registerTool(addTool(WIRECUTTER, "Wire Cutter", "", new GT_Tool_WireCutter(), ToolDictNames.craftingToolWireCutter, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), GregTech_API.sWireCutterList); - addTool(SCOOP, "Scoop", "", new GT_Tool_Scoop(), ToolDictNames.craftingToolScoop, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.BESTIA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PANNUS, 2L)); - addTool(BRANCHCUTTER, "Branch Cutter", "", new GT_Tool_BranchCutter(), ToolDictNames.craftingToolBranchCutter, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 2L)); - GregTech_API.registerTool(addTool(UNIVERSALSPADE, "Universal Spade", "", new GT_Tool_UniversalSpade(), ToolDictNames.craftingToolBlade, ToolDictNames.craftingToolShovel, ToolDictNames.craftingToolCrowbar, ToolDictNames.craftingToolSaw, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L)), GregTech_API.sCrowbarList); - addTool(KNIFE, "Knife", "", new GT_Tool_Knife(), ToolDictNames.craftingToolBlade, ToolDictNames.craftingToolKnife, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 2L)); - addTool(BUTCHERYKNIFE, "Butchery Knife", "Has a slow Attack Rate", new GT_Tool_ButcheryKnife(), ToolDictNames.craftingToolBlade, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 4L)); - - addTool(SENSE, "Sense", "Because a Scythe doesn't make Sense", new GT_Tool_Sense(), ToolDictNames.craftingToolBlade, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MORTUUS, 2L)); - addTool(PLOW, "Plow", "Used to get rid of Snow", new GT_Tool_Plow(), ToolDictNames.craftingToolPlow, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 2L)); - addTool(PLUNGER, "Plunger", "", new GT_Tool_Plunger(), ToolDictNames.craftingToolPlunger, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L)); - addTool(ROLLING_PIN, "Rolling Pin", "", new GT_Tool_RollingPin(), ToolDictNames.craftingToolRollingPin, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.LIMUS, 4L)); - - addTool(DRILL_LV, "Drill (LV)", "", new GT_Tool_Drill_LV(), ToolDictNames.craftingToolMiningDrill, new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 4L)); - addTool(DRILL_MV, "Drill (MV)", "", new GT_Tool_Drill_MV(), ToolDictNames.craftingToolMiningDrill, new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 4L)); - addTool(DRILL_HV, "Drill (HV)", "", new GT_Tool_Drill_HV(), ToolDictNames.craftingToolMiningDrill, new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 4L)); - addTool(CHAINSAW_LV, "Chainsaw (LV)", "Can also harvest Ice", new GT_Tool_Chainsaw_LV(), ToolDictNames.craftingToolSaw, new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); - addTool(CHAINSAW_MV, "Chainsaw (MV)", "Can also harvest Ice", new GT_Tool_Chainsaw_MV(), ToolDictNames.craftingToolSaw, new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); - addTool(CHAINSAW_HV, "Chainsaw (HV)", "Can also harvest Ice", new GT_Tool_Chainsaw_HV(), ToolDictNames.craftingToolSaw, new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); - GregTech_API.registerTool(addTool(WRENCH_LV, "Wrench (LV)", "Hold Left Button to dismantle Machines", new GT_Tool_Wrench_LV(), ToolDictNames.craftingToolWrench, new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), GregTech_API.sWrenchList); - GregTech_API.registerTool(addTool(WRENCH_MV, "Wrench (MV)", "Hold Left Button to dismantle Machines", new GT_Tool_Wrench_MV(), ToolDictNames.craftingToolWrench, new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), GregTech_API.sWrenchList); - GregTech_API.registerTool(addTool(WRENCH_HV, "Wrench (HV)", "Hold Left Button to dismantle Machines", new GT_Tool_Wrench_HV(), ToolDictNames.craftingToolWrench, new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), GregTech_API.sWrenchList); - addTool(JACKHAMMER, "JackHammer (HV)", "Breaks Rocks into pieces", new GT_Tool_JackHammer(), ToolDictNames.craftingToolJackHammer, new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L)); - addTool(BUZZSAW_LV, "Buzzsaw (LV)", "Not suitable for harvesting Blocks", new GT_Tool_BuzzSaw(), ToolDictNames.craftingToolSaw, new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); - addTool(BUZZSAW_MV, "Buzzsaw (MV)", "Not suitable for harvesting Blocks", new GT_Tool_BuzzSaw(), ToolDictNames.craftingToolSaw, new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); - addTool(BUZZSAW_HV, "Buzzsaw (HV)", "Not suitable for harvesting Blocks", new GT_Tool_BuzzSaw(), ToolDictNames.craftingToolSaw, new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); - GregTech_API.registerTool(addTool(SCREWDRIVER_LV, "Screwdriver (LV)", "Adjusts Covers and Machines", new GT_Tool_Screwdriver_LV(), ToolDictNames.craftingToolScrewdriver, new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), GregTech_API.sScrewdriverList); - GregTech_API.registerTool(addTool(SCREWDRIVER_MV, "Screwdriver (MV)", "Adjusts Covers and Machines", new GT_Tool_Screwdriver_LV(), ToolDictNames.craftingToolScrewdriver, new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), GregTech_API.sScrewdriverList); - GregTech_API.registerTool(addTool(SCREWDRIVER_HV, "Screwdriver (HV)", "Adjusts Covers and Machines", new GT_Tool_Screwdriver_LV(), ToolDictNames.craftingToolScrewdriver, new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), GregTech_API.sScrewdriverList); - GregTech_API.registerTool(addTool(SOLDERING_IRON_LV, "Soldering Iron (LV)", "Fixes burned out Circuits. Needs soldering materials in inventory.", new GT_Tool_Soldering_Iron(), ToolDictNames.craftingToolSolderingIron, new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), GregTech_API.sSolderingToolList); - GregTech_API.registerTool(addTool(SOLDERING_IRON_MV, "Soldering Iron (MV)", "Fixes burned out Circuits. Needs soldering materials in inventory.", new GT_Tool_Soldering_Iron(), ToolDictNames.craftingToolSolderingIron, new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), GregTech_API.sSolderingToolList); - GregTech_API.registerTool(addTool(SOLDERING_IRON_HV, "Soldering Iron (HV)", "Fixes burned out Circuits. Needs soldering materials in inventory.", new GT_Tool_Soldering_Iron(), ToolDictNames.craftingToolSolderingIron, new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), GregTech_API.sSolderingToolList); + addTool( + SWORD, + "Sword", + "", + new GT_Tool_Sword(), + ToolDictNames.craftingToolSword, + ToolDictNames.craftingToolBlade, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 4L)); + addTool( + PICKAXE, + "Pickaxe", + "", + new GT_Tool_Pickaxe(), + ToolDictNames.craftingToolPickaxe, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 4L)); + addTool( + SHOVEL, + "Shovel", + "", + new GT_Tool_Shovel(), + ToolDictNames.craftingToolShovel, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 4L)); + addTool( + AXE, + "Axe", + "", + new GT_Tool_Axe(), + ToolDictNames.craftingToolAxe, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); + addTool( + HOE, + "Hoe", + "", + new GT_Tool_Hoe(), + ToolDictNames.craftingToolHoe, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 4L)); + addTool( + SAW, + "Saw", + "Can also harvest Ice", + new GT_Tool_Saw(), + ToolDictNames.craftingToolSaw, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); + GregTech_API.registerTool( + addTool( + HARDHAMMER, + "Hammer", + "Crushes Ores instead of harvesting them", + new GT_Tool_HardHammer(), + ToolDictNames.craftingToolHardHammer, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), + GregTech_API.sHardHammerList); + GregTech_API.registerTool( + addTool( + SOFTMALLET, + "Soft Mallet", + "", + new GT_Tool_SoftHammer(), + ToolDictNames.craftingToolSoftHammer, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LIMUS, 4L)), + GregTech_API.sSoftHammerList); + GregTech_API.registerTool( + addTool( + WRENCH, + "Wrench", + "Hold Leftclick to dismantle Machines", + new GT_Tool_Wrench(), + ToolDictNames.craftingToolWrench, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), + GregTech_API.sWrenchList); + addTool( + FILE, + "File", + "", + new GT_Tool_File(), + ToolDictNames.craftingToolFile, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)); + GregTech_API.registerTool( + addTool( + CROWBAR, + "Crowbar", + "Dismounts Covers and Rotates Rails", + new GT_Tool_Crowbar(), + ToolDictNames.craftingToolCrowbar, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 2L)), + GregTech_API.sCrowbarList); + GregTech_API.registerTool( + addTool( + SCREWDRIVER, + "Screwdriver", + "Adjusts Covers and Machines", + new GT_Tool_Screwdriver(), + ToolDictNames.craftingToolScrewdriver, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), + GregTech_API.sScrewdriverList); + addTool( + MORTAR, + "Mortar", + "", + new GT_Tool_Mortar(), + ToolDictNames.craftingToolMortar, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L)); + GregTech_API.registerTool( + addTool( + WIRECUTTER, + "Wire Cutter", + "", + new GT_Tool_WireCutter(), + ToolDictNames.craftingToolWireCutter, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), + GregTech_API.sWireCutterList); + addTool( + SCOOP, + "Scoop", + "", + new GT_Tool_Scoop(), + ToolDictNames.craftingToolScoop, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.BESTIA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PANNUS, 2L)); + addTool( + BRANCHCUTTER, + "Branch Cutter", + "", + new GT_Tool_BranchCutter(), + ToolDictNames.craftingToolBranchCutter, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 2L)); + GregTech_API.registerTool( + addTool( + UNIVERSALSPADE, + "Universal Spade", + "", + new GT_Tool_UniversalSpade(), + ToolDictNames.craftingToolBlade, + ToolDictNames.craftingToolShovel, + ToolDictNames.craftingToolCrowbar, + ToolDictNames.craftingToolSaw, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L)), + GregTech_API.sCrowbarList); + addTool( + KNIFE, + "Knife", + "", + new GT_Tool_Knife(), + ToolDictNames.craftingToolBlade, + ToolDictNames.craftingToolKnife, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 2L)); + addTool( + BUTCHERYKNIFE, + "Butchery Knife", + "Has a slow Attack Rate", + new GT_Tool_ButcheryKnife(), + ToolDictNames.craftingToolBlade, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 4L)); + + addTool( + SENSE, + "Sense", + "Because a Scythe doesn't make Sense", + new GT_Tool_Sense(), + ToolDictNames.craftingToolBlade, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MORTUUS, 2L)); + addTool( + PLOW, + "Plow", + "Used to get rid of Snow", + new GT_Tool_Plow(), + ToolDictNames.craftingToolPlow, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 2L)); + addTool( + PLUNGER, + "Plunger", + "", + new GT_Tool_Plunger(), + ToolDictNames.craftingToolPlunger, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L)); + addTool( + ROLLING_PIN, + "Rolling Pin", + "", + new GT_Tool_RollingPin(), + ToolDictNames.craftingToolRollingPin, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LIMUS, 4L)); + + addTool( + DRILL_LV, + "Drill (LV)", + "", + new GT_Tool_Drill_LV(), + ToolDictNames.craftingToolMiningDrill, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 4L)); + addTool( + DRILL_MV, + "Drill (MV)", + "", + new GT_Tool_Drill_MV(), + ToolDictNames.craftingToolMiningDrill, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 4L)); + addTool( + DRILL_HV, + "Drill (HV)", + "", + new GT_Tool_Drill_HV(), + ToolDictNames.craftingToolMiningDrill, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 4L)); + addTool( + CHAINSAW_LV, + "Chainsaw (LV)", + "Can also harvest Ice", + new GT_Tool_Chainsaw_LV(), + ToolDictNames.craftingToolSaw, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); + addTool( + CHAINSAW_MV, + "Chainsaw (MV)", + "Can also harvest Ice", + new GT_Tool_Chainsaw_MV(), + ToolDictNames.craftingToolSaw, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); + addTool( + CHAINSAW_HV, + "Chainsaw (HV)", + "Can also harvest Ice", + new GT_Tool_Chainsaw_HV(), + ToolDictNames.craftingToolSaw, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); + GregTech_API.registerTool( + addTool( + WRENCH_LV, + "Wrench (LV)", + "Hold Left Button to dismantle Machines", + new GT_Tool_Wrench_LV(), + ToolDictNames.craftingToolWrench, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), + GregTech_API.sWrenchList); + GregTech_API.registerTool( + addTool( + WRENCH_MV, + "Wrench (MV)", + "Hold Left Button to dismantle Machines", + new GT_Tool_Wrench_MV(), + ToolDictNames.craftingToolWrench, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), + GregTech_API.sWrenchList); + GregTech_API.registerTool( + addTool( + WRENCH_HV, + "Wrench (HV)", + "Hold Left Button to dismantle Machines", + new GT_Tool_Wrench_HV(), + ToolDictNames.craftingToolWrench, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), + GregTech_API.sWrenchList); + addTool( + JACKHAMMER, + "JackHammer (HV)", + "Breaks Rocks into pieces", + new GT_Tool_JackHammer(), + ToolDictNames.craftingToolJackHammer, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L)); + addTool( + BUZZSAW_LV, + "Buzzsaw (LV)", + "Not suitable for harvesting Blocks", + new GT_Tool_BuzzSaw(), + ToolDictNames.craftingToolSaw, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); + addTool( + BUZZSAW_MV, + "Buzzsaw (MV)", + "Not suitable for harvesting Blocks", + new GT_Tool_BuzzSaw(), + ToolDictNames.craftingToolSaw, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); + addTool( + BUZZSAW_HV, + "Buzzsaw (HV)", + "Not suitable for harvesting Blocks", + new GT_Tool_BuzzSaw(), + ToolDictNames.craftingToolSaw, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); + GregTech_API.registerTool( + addTool( + SCREWDRIVER_LV, + "Screwdriver (LV)", + "Adjusts Covers and Machines", + new GT_Tool_Screwdriver_LV(), + ToolDictNames.craftingToolScrewdriver, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), + GregTech_API.sScrewdriverList); + GregTech_API.registerTool( + addTool( + SCREWDRIVER_MV, + "Screwdriver (MV)", + "Adjusts Covers and Machines", + new GT_Tool_Screwdriver_LV(), + ToolDictNames.craftingToolScrewdriver, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), + GregTech_API.sScrewdriverList); + GregTech_API.registerTool( + addTool( + SCREWDRIVER_HV, + "Screwdriver (HV)", + "Adjusts Covers and Machines", + new GT_Tool_Screwdriver_LV(), + ToolDictNames.craftingToolScrewdriver, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), + GregTech_API.sScrewdriverList); + GregTech_API.registerTool( + addTool( + SOLDERING_IRON_LV, + "Soldering Iron (LV)", + "Fixes burned out Circuits. Needs soldering materials in inventory.", + new GT_Tool_Soldering_Iron(), + ToolDictNames.craftingToolSolderingIron, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), + GregTech_API.sSolderingToolList); + GregTech_API.registerTool( + addTool( + SOLDERING_IRON_MV, + "Soldering Iron (MV)", + "Fixes burned out Circuits. Needs soldering materials in inventory.", + new GT_Tool_Soldering_Iron(), + ToolDictNames.craftingToolSolderingIron, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), + GregTech_API.sSolderingToolList); + GregTech_API.registerTool( + addTool( + SOLDERING_IRON_HV, + "Soldering Iron (HV)", + "Fixes burned out Circuits. Needs soldering materials in inventory.", + new GT_Tool_Soldering_Iron(), + ToolDictNames.craftingToolSolderingIron, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), + GregTech_API.sSolderingToolList); addTool(TURBINE_SMALL, "Small Turbine", "Turbine Rotors for your power station", new GT_Tool_Turbine_Small()); addTool(TURBINE, "Turbine", "Turbine Rotors for your power station", new GT_Tool_Turbine_Normal()); addTool(TURBINE_LARGE, "Large Turbine", "Turbine Rotors for your power station", new GT_Tool_Turbine_Large()); addTool(TURBINE_HUGE, "Huge Turbine", "Turbine Rotors for your power station", new GT_Tool_Turbine_Huge()); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.Flint, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', new ItemStack(Items.flint, 1), 'S', OrePrefixes.stone}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.Bronze, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Bronze), 'S', OrePrefixes.stone}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.Iron, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Iron), 'S', OrePrefixes.stone}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.Steel, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Steel), 'S', OrePrefixes.stone}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.WroughtIron, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.WroughtIron), 'S', OrePrefixes.stone}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.RedSteel, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.RedSteel), 'S', OrePrefixes.stone}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.BlueSteel, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.BlueSteel), 'S', OrePrefixes.stone}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.BlackSteel, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.BlackSteel), 'S', OrePrefixes.stone}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.DamascusSteel, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.DamascusSteel), 'S', OrePrefixes.stone}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.Thaumium, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Thaumium), 'S', OrePrefixes.stone}); - - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Wood, Materials.Wood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", 'I', OrePrefixes.plank.get(Materials.Wood), 'S', OrePrefixes.stick.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Plastic, Materials.Plastic, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.Plastic), 'S', OrePrefixes.stick.get(Materials.Plastic)}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Aluminium, Materials.Aluminium, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.Aluminium), 'S', OrePrefixes.stick.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.StainlessSteel, Materials.StainlessSteel, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.StainlessSteel), 'S', OrePrefixes.stick.get(Materials.StainlessSteel)}); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.Flint, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {" I ", "SIS", "SSS", 'I', new ItemStack(Items.flint, 1), 'S', OrePrefixes.stone}); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.Bronze, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Bronze), 'S', OrePrefixes.stone + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.Iron, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Iron), 'S', OrePrefixes.stone}); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.Steel, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Steel), 'S', OrePrefixes.stone + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.WroughtIron, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.WroughtIron), 'S', OrePrefixes.stone + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.RedSteel, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.RedSteel), 'S', OrePrefixes.stone + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.BlueSteel, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.BlueSteel), 'S', OrePrefixes.stone + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.BlackSteel, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.BlackSteel), 'S', OrePrefixes.stone + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.DamascusSteel, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.DamascusSteel), 'S', OrePrefixes.stone + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.Thaumium, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Thaumium), 'S', OrePrefixes.stone + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Wood, Materials.Wood, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + " S", + " I ", + "S f", + 'I', + OrePrefixes.plank.get(Materials.Wood), + 'S', + OrePrefixes.stick.get(Materials.Wood) + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Plastic, Materials.Plastic, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + " S", + " I ", + "S f", + 'I', + OrePrefixes.ingot.get(Materials.Plastic), + 'S', + OrePrefixes.stick.get(Materials.Plastic) + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Aluminium, Materials.Aluminium, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + " S", + " I ", + "S f", + 'I', + OrePrefixes.ingot.get(Materials.Aluminium), + 'S', + OrePrefixes.stick.get(Materials.Aluminium) + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.StainlessSteel, Materials.StainlessSteel, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + " S", + " I ", + "S f", + 'I', + OrePrefixes.ingot.get(Materials.StainlessSteel), + 'S', + OrePrefixes.stick.get(Materials.StainlessSteel) + }); if (!GregTech_API.sSpecialFile.get(ConfigCategories.general, "DisableFlintTools", false)) { - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(SWORD, 1, Materials.Flint, Materials.Wood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"F", "F", "S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', new ItemStack(Items.flint, 1)}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(PICKAXE, 1, Materials.Flint, Materials.Wood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"FFF", " S ", " S ", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', new ItemStack(Items.flint, 1)}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(SHOVEL, 1, Materials.Flint, Materials.Wood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"F", "S", "S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', new ItemStack(Items.flint, 1)}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(AXE, 1, Materials.Flint, Materials.Wood, null), GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"FF", "FS", " S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', new ItemStack(Items.flint, 1)}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(HOE, 1, Materials.Flint, Materials.Wood, null), GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"FF", " S", " S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', new ItemStack(Items.flint, 1)}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(KNIFE, 1, Materials.Flint, Materials.Wood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"F", "S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', new ItemStack(Items.flint, 1)}); - - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.Flint, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', new ItemStack(Items.flint, 1), 'S', OrePrefixes.stone}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.Bronze, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Bronze), 'S', OrePrefixes.stone}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.Iron, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Iron), 'S', OrePrefixes.stone}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.Steel, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Steel), 'S', OrePrefixes.stone}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.WroughtIron, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.WroughtIron), 'S', OrePrefixes.stone}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.RedSteel, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.RedSteel), 'S', OrePrefixes.stone}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.BlueSteel, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.BlueSteel), 'S', OrePrefixes.stone}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.BlackSteel, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.BlackSteel), 'S', OrePrefixes.stone}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.DamascusSteel, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.DamascusSteel), 'S', OrePrefixes.stone}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(MORTAR, 1, Materials.Thaumium, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Thaumium), 'S', OrePrefixes.stone}); - - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Wood, Materials.Wood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", 'I', OrePrefixes.plank.get(Materials.Wood), 'S', OrePrefixes.stick.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Plastic, Materials.Plastic, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.Plastic), 'S', OrePrefixes.stick.get(Materials.Plastic)}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Aluminium, Materials.Aluminium, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.Aluminium), 'S', OrePrefixes.stick.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.StainlessSteel, Materials.StainlessSteel, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.StainlessSteel), 'S', OrePrefixes.stick.get(Materials.StainlessSteel)}); - GT_ModHandler.addCraftingRecipe(INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.IronWood, Materials.IronWood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.IronWood), 'S', OrePrefixes.stick.get(Materials.IronWood)}); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(SWORD, 1, Materials.Flint, Materials.Wood, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + "F", "F", "S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', new ItemStack(Items.flint, 1) + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(PICKAXE, 1, Materials.Flint, Materials.Wood, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + "FFF", + " S ", + " S ", + 'S', + OrePrefixes.stick.get(Materials.Wood), + 'F', + new ItemStack(Items.flint, 1) + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(SHOVEL, 1, Materials.Flint, Materials.Wood, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + "F", "S", "S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', new ItemStack(Items.flint, 1) + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(AXE, 1, Materials.Flint, Materials.Wood, null), + GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + "FF", "FS", " S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', new ItemStack(Items.flint, 1) + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(HOE, 1, Materials.Flint, Materials.Wood, null), + GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + "FF", " S", " S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', new ItemStack(Items.flint, 1) + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(KNIFE, 1, Materials.Flint, Materials.Wood, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + "F", "S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', new ItemStack(Items.flint, 1) + }); + + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.Flint, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {" I ", "SIS", "SSS", 'I', new ItemStack(Items.flint, 1), 'S', OrePrefixes.stone}); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.Bronze, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Bronze), 'S', OrePrefixes.stone + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.Iron, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Iron), 'S', OrePrefixes.stone + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.Steel, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Steel), 'S', OrePrefixes.stone + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.WroughtIron, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.WroughtIron), 'S', OrePrefixes.stone + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.RedSteel, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.RedSteel), 'S', OrePrefixes.stone + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.BlueSteel, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.BlueSteel), 'S', OrePrefixes.stone + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.BlackSteel, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.BlackSteel), 'S', OrePrefixes.stone + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.DamascusSteel, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.DamascusSteel), 'S', OrePrefixes.stone + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.Thaumium, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Thaumium), 'S', OrePrefixes.stone + }); + + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Wood, Materials.Wood, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + " S", + " I ", + "S f", + 'I', + OrePrefixes.plank.get(Materials.Wood), + 'S', + OrePrefixes.stick.get(Materials.Wood) + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Plastic, Materials.Plastic, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + " S", + " I ", + "S f", + 'I', + OrePrefixes.ingot.get(Materials.Plastic), + 'S', + OrePrefixes.stick.get(Materials.Plastic) + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Aluminium, Materials.Aluminium, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + " S", + " I ", + "S f", + 'I', + OrePrefixes.ingot.get(Materials.Aluminium), + 'S', + OrePrefixes.stick.get(Materials.Aluminium) + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.StainlessSteel, Materials.StainlessSteel, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + " S", + " I ", + "S f", + 'I', + OrePrefixes.ingot.get(Materials.StainlessSteel), + 'S', + OrePrefixes.stick.get(Materials.StainlessSteel) + }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.IronWood, Materials.IronWood, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + " S", + " I ", + "S f", + 'I', + OrePrefixes.ingot.get(Materials.IronWood), + 'S', + OrePrefixes.stick.get(Materials.IronWood) + }); if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, "Coal", true)) { - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ToolDictNames.craftingToolMortar, new ItemStack(Items.coal, 1)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {ToolDictNames.craftingToolMortar, new ItemStack(Items.coal, 1)}); } if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, "Clay", true)) { - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Clay, 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ToolDictNames.craftingToolMortar, new ItemStack(Blocks.clay, 1)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Clay, 1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {ToolDictNames.craftingToolMortar, new ItemStack(Blocks.clay, 1)}); } if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, "Wheat", true)) { - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wheat, 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ToolDictNames.craftingToolMortar, new ItemStack(Items.wheat, 1)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wheat, 1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {ToolDictNames.craftingToolMortar, new ItemStack(Items.wheat, 1)}); } if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, "Flint", true)) { - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Items.flint, 1), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ToolDictNames.craftingToolMortar, new ItemStack(Blocks.gravel, 1)}); + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Items.flint, 1), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {ToolDictNames.craftingToolMortar, new ItemStack(Blocks.gravel, 1)}); } if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, "Blaze", true)) { - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Items.blaze_powder, 2), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ToolDictNames.craftingToolMortar, new ItemStack(Items.blaze_rod, 1)}); + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Items.blaze_powder, 2), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] {ToolDictNames.craftingToolMortar, new ItemStack(Items.blaze_rod, 1)}); } } } diff --git a/src/main/java/gregtech/common/items/GT_NeutronReflector_Item.java b/src/main/java/gregtech/common/items/GT_NeutronReflector_Item.java index 255b705f5c..5e307694f4 100644 --- a/src/main/java/gregtech/common/items/GT_NeutronReflector_Item.java +++ b/src/main/java/gregtech/common/items/GT_NeutronReflector_Item.java @@ -13,9 +13,18 @@ public class GT_NeutronReflector_Item extends GT_Generic_Item implements IReacto } @Override - public boolean acceptUraniumPulse(IReactor reactor, ItemStack yourStack, ItemStack pulsingStack, int youX, int youY, int pulseX, int pulseY, boolean heatrun) { + public boolean acceptUraniumPulse( + IReactor reactor, + ItemStack yourStack, + ItemStack pulsingStack, + int youX, + int youY, + int pulseX, + int pulseY, + boolean heatrun) { if (!heatrun) { - ((IReactorComponent) pulsingStack.getItem()).acceptUraniumPulse(reactor, pulsingStack, yourStack, pulseX, pulseY, youX, youY, heatrun); + ((IReactorComponent) pulsingStack.getItem()) + .acceptUraniumPulse(reactor, pulsingStack, yourStack, pulseX, pulseY, youX, youY, heatrun); } return true; } @@ -46,6 +55,5 @@ public class GT_NeutronReflector_Item extends GT_Generic_Item implements IReacto } @Override - public void processChamber(IReactor aReactor, ItemStack aStack, int x, int y, boolean aHeatRun) { - } + public void processChamber(IReactor aReactor, ItemStack aStack, int x, int y, boolean aHeatRun) {} } diff --git a/src/main/java/gregtech/common/items/GT_SensorCard_Item.java b/src/main/java/gregtech/common/items/GT_SensorCard_Item.java index b2f73d304f..da8467422a 100644 --- a/src/main/java/gregtech/common/items/GT_SensorCard_Item.java +++ b/src/main/java/gregtech/common/items/GT_SensorCard_Item.java @@ -5,6 +5,10 @@ import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.interfaces.tileentity.IGregTechDeviceInformation; import gregtech.api.items.GT_Generic_Item; import gregtech.api.util.GT_LanguageManager; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.UUID; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -15,11 +19,6 @@ import net.minecraft.util.ChunkCoordinates; import net.minecraft.world.World; import shedar.mods.ic2.nuclearcontrol.api.*; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.UUID; - public class GT_SensorCard_Item extends GT_Generic_Item implements IRemoteSensor, IPanelDataSource { private static final UUID CARD_TYPE = new UUID(0L, 41L); @@ -39,7 +38,8 @@ public class GT_SensorCard_Item extends GT_Generic_Item implements IRemoteSensor aList.add(transItem("014", "Missing Coodinates!")); } else { aList.add(transItem("015", "Device at:")); - aList.add(String.format("x: %d, y: %d, z: %d", tNBT.getInteger("x"), tNBT.getInteger("y"), tNBT.getInteger("z"))); + aList.add(String.format( + "x: %d, y: %d, z: %d", tNBT.getInteger("x"), tNBT.getInteger("y"), tNBT.getInteger("z"))); } } } @@ -54,12 +54,13 @@ public class GT_SensorCard_Item extends GT_Generic_Item implements IRemoteSensor ChunkCoordinates target = aCard.getTarget(); TileEntity tTileEntity = world.getTileEntity(target.posX, target.posY, target.posZ); - if (((tTileEntity instanceof IGregTechDeviceInformation)) && (((IGregTechDeviceInformation) tTileEntity).isGivingInformation())) { + if (((tTileEntity instanceof IGregTechDeviceInformation)) + && (((IGregTechDeviceInformation) tTileEntity).isGivingInformation())) { String[] tInfoData = ((IGregTechDeviceInformation) tTileEntity).getInfoData(); for (int i = 0; i < tInfoData.length; i++) { aCard.setString("mString" + i, tInfoData[i]); } - aCard.setInt("mString",strCount=tInfoData.length); + aCard.setInt("mString", strCount = tInfoData.length); return CardState.OK; } return CardState.NO_TARGET; @@ -68,7 +69,7 @@ public class GT_SensorCard_Item extends GT_Generic_Item implements IRemoteSensor @Override public List<PanelString> getStringData(int aSettings, ICardWrapper aCard, boolean aLabels) { List<PanelString> rList = new LinkedList<>(); - for (int i = 0; i < (strCount=aCard.getInt("mString")); i++) { + for (int i = 0; i < (strCount = aCard.getInt("mString")); i++) { if ((aSettings & 1 << i) != 0) { PanelString line = new PanelString(); line.textLeft = GT_LanguageManager.getTranslation(aCard.getString("mString" + i), "\\\\"); @@ -94,6 +95,5 @@ public class GT_SensorCard_Item extends GT_Generic_Item implements IRemoteSensor @Override @SideOnly(Side.CLIENT) - public void getSubItems(Item aItem, CreativeTabs aCreativeTab, List aOutputSubItems) { - } + public void getSubItems(Item aItem, CreativeTabs aCreativeTab, List aOutputSubItems) {} } diff --git a/src/main/java/gregtech/common/items/GT_VolumetricFlask.java b/src/main/java/gregtech/common/items/GT_VolumetricFlask.java index 8578f4812c..e2549462e3 100644 --- a/src/main/java/gregtech/common/items/GT_VolumetricFlask.java +++ b/src/main/java/gregtech/common/items/GT_VolumetricFlask.java @@ -1,12 +1,17 @@ - package gregtech.common.items; +import static gregtech.api.enums.GT_Values.RES_PATH_ITEM; +import static ic2.core.util.LiquidUtil.drainContainerStack; +import static ic2.core.util.LiquidUtil.fillContainerStack; +import static ic2.core.util.LiquidUtil.placeFluid; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.GT_Values; import gregtech.api.interfaces.INetworkUpdatableItem; import gregtech.api.items.GT_Generic_Item; import ic2.core.util.LiquidUtil; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -30,17 +35,10 @@ import net.minecraftforge.fluids.IFluidBlock; import net.minecraftforge.fluids.IFluidContainerItem; import net.minecraftforge.fluids.IFluidHandler; -import java.util.List; - -import static gregtech.api.enums.GT_Values.RES_PATH_ITEM; -import static ic2.core.util.LiquidUtil.drainContainerStack; -import static ic2.core.util.LiquidUtil.fillContainerStack; -import static ic2.core.util.LiquidUtil.placeFluid; - - public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContainerItem, INetworkUpdatableItem { private final int maxCapacity; private final String unlocalFlaskName; + @SideOnly(Side.CLIENT) public IIcon iconWindow; @@ -60,12 +58,21 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain } @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) { + public boolean onItemUse( + ItemStack stack, + EntityPlayer player, + World world, + int x, + int y, + int z, + int side, + float xOffset, + float yOffset, + float zOffset) { if (player instanceof FakePlayer) { return false; } - if (world.isRemote) - return false; + if (world.isRemote) return false; if (interactWithTank(stack, player, world, x, y, z, side)) { return true; } @@ -85,9 +92,10 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain } ForgeDirection dir = ForgeDirection.VALID_DIRECTIONS[mop.sideHit]; FluidStack fluidStack = drainContainerStack(stack, player, 1000, true); - if (placeFluid(fluidStack, world, x, y, z) || (player.canPlayerEdit(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, mop.sideHit, stack) && placeFluid(fluidStack, world, x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ))) { - if (!player.capabilities.isCreativeMode) - drainContainerStack(stack, player, 1000, false); + if (placeFluid(fluidStack, world, x, y, z) + || (player.canPlayerEdit(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, mop.sideHit, stack) + && placeFluid(fluidStack, world, x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ))) { + if (!player.capabilities.isCreativeMode) drainContainerStack(stack, player, 1000, false); return true; } } @@ -116,8 +124,7 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain int capacity = 1000; if (stack.hasTagCompound()) { NBTTagCompound nbt = stack.getTagCompound(); - if (nbt.hasKey("Capacity", 3)) - capacity = nbt.getInteger("Capacity"); + if (nbt.hasKey("Capacity", 3)) capacity = nbt.getInteger("Capacity"); } return Math.min(getMaxCapacity(), capacity); } @@ -126,7 +133,7 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister aIconRegister) { super.registerIcons(aIconRegister); - iconWindow = aIconRegister.registerIcon(RES_PATH_ITEM + "gt."+unlocalFlaskName+".window"); + iconWindow = aIconRegister.registerIcon(RES_PATH_ITEM + "gt." + unlocalFlaskName + ".window"); } public void setCapacity(ItemStack stack, int capacity) { @@ -142,8 +149,7 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain public FluidStack getFluid(ItemStack stack) { if (stack.hasTagCompound()) { NBTTagCompound nbt = stack.getTagCompound(); - if (nbt.hasKey("Fluid", 10)) - return FluidStack.loadFluidStackFromNBT(nbt.getCompoundTag("Fluid")); + if (nbt.hasKey("Fluid", 10)) return FluidStack.loadFluidStackFromNBT(nbt.getCompoundTag("Fluid")); } return null; } @@ -152,8 +158,7 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain boolean removeFluid = (fluidStack == null) || (fluidStack.amount <= 0); NBTTagCompound nbt = stack.getTagCompound(); if (nbt == null) { - if (removeFluid) - return; + if (removeFluid) return; stack.setTagCompound(nbt = new NBTTagCompound()); } if (removeFluid) { @@ -168,8 +173,7 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain @Override public int fill(ItemStack stack, FluidStack resource, boolean doFill) { - if (stack.stackSize != 1) - return 0; + if (stack.stackSize != 1) return 0; if ((resource == null) || (resource.amount <= 0)) { return 0; } @@ -189,11 +193,9 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain @Override public FluidStack drain(ItemStack stack, int maxDrain, boolean doDrain) { - if (stack.stackSize != 1) - return null; + if (stack.stackSize != 1) return null; FluidStack fluidStack = getFluid(stack); - if (fluidStack == null) - return null; + if (fluidStack == null) return null; maxDrain = Math.min(fluidStack.amount, maxDrain); if (doDrain) { fluidStack.amount -= maxDrain; @@ -301,8 +303,7 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain public boolean receive(ItemStack stack, EntityPlayerMP player, NBTTagCompound tag) { if (stack != null && stack.stackSize > 0) { Item item = stack.getItem(); - if (item == this) - setCapacity(stack, tag.getInteger("cap")); + if (item == this) setCapacity(stack, tag.getInteger("cap")); return true; } return false; diff --git a/src/main/java/gregtech/common/items/ItemComb.java b/src/main/java/gregtech/common/items/ItemComb.java index b6484d394f..e3fc978978 100644 --- a/src/main/java/gregtech/common/items/ItemComb.java +++ b/src/main/java/gregtech/common/items/ItemComb.java @@ -1,5 +1,7 @@ package gregtech.common.items; +import static gregtech.api.enums.GT_Values.*; + import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap.Builder; import cpw.mods.fml.common.Loader; @@ -12,583 +14,2038 @@ import gregtech.GT_Mod; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; -import gregtech.api.objects.MaterialStack; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.loaders.materialprocessing.ProcessingModSupport; import gregtech.loaders.misc.GT_Bees; +import java.util.Arrays; +import java.util.List; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; -import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -import java.util.List; -import java.util.Arrays; +public class ItemComb extends Item { + @SideOnly(Side.CLIENT) + private IIcon secondIcon; -import static gregtech.api.enums.GT_Values.*; + public ItemComb() { + super(); + this.setCreativeTab(Tabs.tabApiculture); + this.setHasSubtypes(true); + this.setUnlocalizedName("gt.comb"); + GameRegistry.registerItem(this, "gt.comb", MOD_ID); + } -public class ItemComb extends Item { - @SideOnly(Side.CLIENT) - private IIcon secondIcon; - - public ItemComb() { - super(); - this.setCreativeTab(Tabs.tabApiculture); - this.setHasSubtypes(true); - this.setUnlocalizedName("gt.comb"); - GameRegistry.registerItem(this, "gt.comb", MOD_ID); - } - - public ItemStack getStackForType(CombType type) { - return new ItemStack(this, 1, type.getId()); - } - - public ItemStack getStackForType(CombType type, int count) { - return new ItemStack(this, count, type.getId()); - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs tabs, List list) { - for (CombType type : CombType.values()) { - if (type.showInList) { - list.add(this.getStackForType(type)); - } - } - } - - @Override - @SideOnly(Side.CLIENT) - public boolean requiresMultipleRenderPasses() { - return true; - } - - @Override - public int getRenderPasses(int meta) { - return 2; - } - - @Override + public ItemStack getStackForType(CombType type) { + return new ItemStack(this, 1, type.getId()); + } + + public ItemStack getStackForType(CombType type, int count) { + return new ItemStack(this, count, type.getId()); + } + + @Override + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs tabs, List list) { + for (CombType type : CombType.values()) { + if (type.showInList) { + list.add(this.getStackForType(type)); + } + } + } + + @Override + @SideOnly(Side.CLIENT) + public boolean requiresMultipleRenderPasses() { + return true; + } + + @Override + public int getRenderPasses(int meta) { + return 2; + } + + @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("forestry:beeCombs.0"); - this.secondIcon = iconRegister.registerIcon("forestry:beeCombs.1"); - } - - @Override - public IIcon getIcon(ItemStack stack, int pass) { - return (pass == 0) ? itemIcon : secondIcon; - } - - @Override - @SideOnly(Side.CLIENT) - public int getColorFromItemStack(ItemStack stack, int pass) { + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon("forestry:beeCombs.0"); + this.secondIcon = iconRegister.registerIcon("forestry:beeCombs.1"); + } + + @Override + public IIcon getIcon(ItemStack stack, int pass) { + return (pass == 0) ? itemIcon : secondIcon; + } + + @Override + @SideOnly(Side.CLIENT) + public int getColorFromItemStack(ItemStack stack, int pass) { CombType type = CombType.valueOf(stack.getItemDamage()); return type.getColours()[GT_Utility.clamp(pass, 0, 1)]; - } - - @Override - public String getItemStackDisplayName(ItemStack stack) { - return CombType.valueOf(stack.getItemDamage()).getName(); - } - public void initCombsRecipes() { - - //Organic - addProcessGT(CombType.LIGNIE, new Materials[] {Materials.Lignite}, Voltage.LV); - addProcessGT(CombType.COAL, new Materials[] {Materials.Coal}, Voltage.LV); - addCentrifugeToItemStack(CombType.STICKY, new ItemStack[] { ItemList.IC2_Resin.get(1), ItemList.IC2_Plantball.get(1), ItemList.FR_Wax.get(1) }, new int[] {50 * 100, 15 * 100, 50 * 100}, Voltage.ULV); - addProcessGT(CombType.OIL, new Materials[] {Materials.Oilsands}, Voltage.LV); - addProcessGT(CombType.APATITE, new Materials[] {Materials.Apatite }, Voltage.LV); - addCentrifugeToMaterial(CombType.ASH, new Materials[] {Materials.DarkAsh, Materials.Ash}, new int[] { 50*100, 50*100}, new int[] {}, Voltage.ULV, NI, 50 * 100); - addCentrifugeToItemStack(CombType.PHOSPHORUS, new ItemStack[] { Materials.Phosphorus.getDust(3), Materials.TricalciumPhosphate.getDust(2), ItemList.FR_Wax.get(1) }, new int[] {100 * 100, 75 * 100, 100 * 100}, Voltage.HV); - addCentrifugeToItemStack(CombType.MICA, new ItemStack[] { Materials.Mica.getDust(2), ItemList.FR_Wax.get(1) }, new int[] {100 * 100, 75 * 100}, Voltage.HV); - if(GT_Mod.gregtechproxy.mNerfedCombs) { - addCentrifugeToItemStack(CombType.LIGNIE, new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Lignite, 1), ItemList.FR_Wax.get(1) }, new int[] {90 * 100, 50 * 100}, Voltage.ULV); - addCentrifugeToItemStack(CombType.COAL, new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 1), ItemList.FR_Wax.get(1) }, new int[] {5 * 100, 50 * 100}, Voltage.ULV); - addCentrifugeToItemStack(CombType.OIL, new ItemStack[] { ItemList.Crop_Drop_OilBerry.get(6), GT_Bees.drop.getStackForType(DropType.OIL), ItemList.FR_Wax.get(1) }, new int[] {100 * 100, 100 * 100, 50 * 100}, Voltage.ULV); - }else { - addCentrifugeToItemStack(CombType.LIGNIE, new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Lignite, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Lignite, 1), ItemList.FR_Wax.get(1) }, new int[] {90 * 100, 100 * 100, 50 * 100}, Voltage.ULV); - addCentrifugeToItemStack(CombType.COAL, new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Coal, 1), ItemList.FR_Wax.get(1) }, new int[] {5 * 100, 100 * 100, 50 * 100}, Voltage.ULV); - addCentrifugeToItemStack(CombType.OIL, new ItemStack[] { ItemList.Crop_Drop_OilBerry.get(6), GT_Bees.drop.getStackForType(DropType.OIL), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Oilsands, 1), ItemList.FR_Wax.get(1) }, new int[] {100 * 100, 100 * 100, 100 * 100, 50 * 100}, Voltage.ULV); - addCentrifugeToMaterial(CombType.APATITE, new Materials[] { Materials.Apatite, Materials.Phosphate }, new int[] {100 * 100, 80 * 100 }, new int[] {}, Voltage.ULV, NI, 30 * 100); - } - - //ic2 - addCentrifugeToItemStack(CombType.COOLANT, new ItemStack[] { GT_Bees.drop.getStackForType(DropType.COOLANT), ItemList.FR_Wax.get(1) }, new int[] {100 * 100, 100 * 100}, Voltage.HV, 196); - addCentrifugeToItemStack(CombType.ENERGY, new ItemStack[] {GT_Bees.drop.getStackForType(DropType.HOT_COOLANT), ItemList.IC2_Energium_Dust.get(1L), ItemList.FR_RefractoryWax.get(1)}, new int[] {20 * 100, 20 * 100, 50 * 100}, Voltage.HV, 196); - addCentrifugeToItemStack(CombType.LAPOTRON, new ItemStack[] {GT_Bees.drop.getStackForType(DropType.LAPIS), GT_ModHandler.getModItem(MOD_ID_DC, "item.LapotronDust", 1, 0), GT_ModHandler.getModItem("MagicBees", "wax", 1, 2) }, new int[] {20 * 100, 15 * 100, 40 * 100}, Voltage.HV, 196); - addCentrifugeToMaterial(CombType.PYROTHEUM, new Materials[] {Materials.Blaze, Materials.Pyrotheum}, new int[] { 25 * 100, 20 * 100}, new int[] {}, Voltage.HV, NI, 30 * 100); - addCentrifugeToItemStack(CombType.CRYOTHEUM, new ItemStack[] { ItemList.FR_RefractoryWax.get(1), Materials.Blizz.getDust(1) }, new int[] {50 * 100, 100 * 100}, Voltage.MV); - - //Alloy - addProcessGT(CombType.REDALLOY, new Materials[] {Materials.RedAlloy}, Voltage.LV); - addProcessGT(CombType.REDSTONEALLOY, new Materials[] {Materials.RedstoneAlloy}, Voltage.LV); - addProcessGT(CombType.CONDUCTIVEIRON, new Materials[] {Materials.ConductiveIron }, Voltage.MV); - addProcessGT(CombType.VIBRANTALLOY, new Materials[] {Materials.VibrantAlloy }, Voltage.HV); - addProcessGT(CombType.ENERGETICALLOY, new Materials[] {Materials.EnergeticAlloy }, Voltage.HV); - addProcessGT(CombType.ELECTRICALSTEEL, new Materials[] {Materials.ElectricalSteel }, Voltage.LV); - addProcessGT(CombType.DARKSTEEL, new Materials[] {Materials.DarkSteel }, Voltage.MV); - addProcessGT(CombType.PULSATINGIRON, new Materials[] { Materials.PulsatingIron } , Voltage.HV); - addProcessGT(CombType.STAINLESSSTEEL, new Materials[] { Materials.StainlessSteel }, Voltage.HV); - addProcessGT(CombType.BEDROCKIUM, new Materials[] { Materials.Bedrockium }, Voltage.EV); - addCentrifugeToItemStack(CombType.ENDERIUM, new ItemStack[] {ItemList.FR_RefractoryWax.get(1), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.EnderiumBase, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Enderium, 1) }, new int[] {50 * 100, 30 * 100, 50 * 100 }, Voltage.HV); - if(GT_Mod.gregtechproxy.mNerfedCombs) { - addCentrifugeToMaterial(CombType.REDALLOY, new Materials[] {Materials.RedAlloy}, new int[] {100 * 100 }, new int[] {}, Voltage.ULV, ItemList.FR_RefractoryWax.get(1), 50 * 100); - addCentrifugeToMaterial(CombType.REDSTONEALLOY, new Materials[] {Materials.RedstoneAlloy}, new int[] {100 * 100 }, new int[] {}, Voltage.ULV, ItemList.FR_RefractoryWax.get(1), 50 * 100); - addCentrifugeToMaterial(CombType.CONDUCTIVEIRON, new Materials[] {Materials.ConductiveIron }, new int[] {90 * 100}, new int[] {}, Voltage.MV, ItemList.FR_RefractoryWax.get(1), 50 * 100); - addCentrifugeToMaterial(CombType.VIBRANTALLOY, new Materials[] {Materials.VibrantAlloy }, new int[] {70 * 100}, new int[] {}, Voltage.HV, ItemList.FR_RefractoryWax.get(1), 50 * 100); - addCentrifugeToMaterial(CombType.ENERGETICALLOY, new Materials[] {Materials.EnergeticAlloy }, new int[] {80 * 100}, new int[] {}, Voltage.HV, ItemList.FR_RefractoryWax.get(1), 50 * 100); - addCentrifugeToMaterial(CombType.ELECTRICALSTEEL, new Materials[] {Materials.ElectricalSteel }, new int[] {100 * 100}, new int[] {}, Voltage.ULV, ItemList.FR_RefractoryWax.get(1), 50 * 100); - addCentrifugeToMaterial(CombType.DARKSTEEL, new Materials[] {Materials.DarkSteel }, new int[] {100 * 100}, new int[] {}, Voltage.MV, ItemList.FR_RefractoryWax.get(1), 50 * 100); - addCentrifugeToMaterial(CombType.PULSATINGIRON, new Materials[] {Materials.PulsatingIron }, new int[] {80 * 100}, new int[] {}, Voltage.HV, ItemList.FR_RefractoryWax.get(1), 50 * 100); - addCentrifugeToMaterial(CombType.STAINLESSSTEEL, new Materials[] {Materials.StainlessSteel }, new int[] {50 * 100}, new int[] {}, Voltage.HV, ItemList.FR_RefractoryWax.get(1), 50 * 100); - addCentrifugeToMaterial(CombType.BEDROCKIUM, new Materials[] {Materials.Bedrockium }, new int[] {50 * 100}, new int[] {}, Voltage.EV, ItemList.FR_RefractoryWax.get(1), 50 * 100); - - }else { - addCentrifugeToMaterial(CombType.REDALLOY, new Materials[] {Materials.RedAlloy, Materials.Redstone, Materials.Copper}, new int[] {100 * 100, 75 * 100, 90 * 100 }, new int[] {}, Voltage.ULV, ItemList.FR_RefractoryWax.get(1), 50 * 100); - addCentrifugeToMaterial(CombType.REDSTONEALLOY, new Materials[] {Materials.RedstoneAlloy, Materials.Redstone, Materials.Silicon, Materials.Coal}, new int[] {100 * 100, 90 * 100, 75 * 100, 75 * 100 }, new int[] {}, Voltage.ULV, ItemList.FR_RefractoryWax.get(1), 50 * 100); - addCentrifugeToMaterial(CombType.CONDUCTIVEIRON, new Materials[] {Materials.ConductiveIron, Materials.Silver, Materials.Iron }, new int[] {90 * 100, 55 * 100, 65 * 100}, new int[] {}, Voltage.MV, ItemList.FR_RefractoryWax.get(1), 50 * 100); - addCentrifugeToMaterial(CombType.VIBRANTALLOY, new Materials[] {Materials.VibrantAlloy, Materials.Chrome }, new int[] {70 * 100, 50 * 100}, new int[] {}, Voltage.HV, ItemList.FR_RefractoryWax.get(1), 50 * 100); - addCentrifugeToMaterial(CombType.ENERGETICALLOY, new Materials[] {Materials.EnergeticAlloy, Materials.Gold }, new int[] {80 * 100, 60 * 100}, new int[] {}, Voltage.HV, ItemList.FR_RefractoryWax.get(1), 50 * 100); - addCentrifugeToMaterial(CombType.ELECTRICALSTEEL, new Materials[] {Materials.ElectricalSteel, Materials.Silicon, Materials.Coal }, new int[] {100 * 100, 75 * 100, 75 * 100}, new int[] {}, Voltage.ULV, ItemList.FR_RefractoryWax.get(1), 50 * 100); - addCentrifugeToMaterial(CombType.DARKSTEEL, new Materials[] {Materials.DarkSteel, Materials.Coal }, new int[] {100 * 100, 75 * 100 }, new int[] {}, Voltage.MV, ItemList.FR_RefractoryWax.get(1), 50 * 100); - addCentrifugeToMaterial(CombType.PULSATINGIRON, new Materials[] {Materials.PulsatingIron, Materials.Iron }, new int[] {80 * 100, 75 * 100 }, new int[] {}, Voltage.HV, ItemList.FR_RefractoryWax.get(1), 50 * 100); - addCentrifugeToMaterial(CombType.STAINLESSSTEEL, new Materials[] {Materials.StainlessSteel, Materials.Iron, Materials.Chrome, Materials.Manganese, Materials.Nickel }, new int[] {50 * 100, 75 * 100, 55 * 100, 75 * 100, 75 * 100 }, new int[] {}, Voltage.HV, ItemList.FR_RefractoryWax.get(1), 50 * 100); - addCentrifugeToMaterial(CombType.BEDROCKIUM, new Materials[] {Materials.Bedrockium }, new int[] {50 * 100}, new int[] {}, Voltage.EV, ItemList.FR_RefractoryWax.get(1), 50 * 100); + } + + @Override + public String getItemStackDisplayName(ItemStack stack) { + return CombType.valueOf(stack.getItemDamage()).getName(); + } + + public void initCombsRecipes() { + + // Organic + addProcessGT(CombType.LIGNIE, new Materials[] {Materials.Lignite}, Voltage.LV); + addProcessGT(CombType.COAL, new Materials[] {Materials.Coal}, Voltage.LV); + addCentrifugeToItemStack( + CombType.STICKY, + new ItemStack[] {ItemList.IC2_Resin.get(1), ItemList.IC2_Plantball.get(1), ItemList.FR_Wax.get(1)}, + new int[] {50 * 100, 15 * 100, 50 * 100}, + Voltage.ULV); + addProcessGT(CombType.OIL, new Materials[] {Materials.Oilsands}, Voltage.LV); + addProcessGT(CombType.APATITE, new Materials[] {Materials.Apatite}, Voltage.LV); + addCentrifugeToMaterial( + CombType.ASH, + new Materials[] {Materials.DarkAsh, Materials.Ash}, + new int[] {50 * 100, 50 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 50 * 100); + addCentrifugeToItemStack( + CombType.PHOSPHORUS, + new ItemStack[] { + Materials.Phosphorus.getDust(3), Materials.TricalciumPhosphate.getDust(2), ItemList.FR_Wax.get(1) + }, + new int[] {100 * 100, 75 * 100, 100 * 100}, + Voltage.HV); + addCentrifugeToItemStack( + CombType.MICA, + new ItemStack[] {Materials.Mica.getDust(2), ItemList.FR_Wax.get(1)}, + new int[] {100 * 100, 75 * 100}, + Voltage.HV); + if (GT_Mod.gregtechproxy.mNerfedCombs) { + addCentrifugeToItemStack( + CombType.LIGNIE, + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Lignite, 1), ItemList.FR_Wax.get(1) + }, + new int[] {90 * 100, 50 * 100}, + Voltage.ULV); + addCentrifugeToItemStack( + CombType.COAL, + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 1), ItemList.FR_Wax.get(1) + }, + new int[] {5 * 100, 50 * 100}, + Voltage.ULV); + addCentrifugeToItemStack( + CombType.OIL, + new ItemStack[] { + ItemList.Crop_Drop_OilBerry.get(6), + GT_Bees.drop.getStackForType(DropType.OIL), + ItemList.FR_Wax.get(1) + }, + new int[] {100 * 100, 100 * 100, 50 * 100}, + Voltage.ULV); + } else { + addCentrifugeToItemStack( + CombType.LIGNIE, + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Lignite, 1), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Lignite, 1), + ItemList.FR_Wax.get(1) + }, + new int[] {90 * 100, 100 * 100, 50 * 100}, + Voltage.ULV); + addCentrifugeToItemStack( + CombType.COAL, + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 1), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Coal, 1), + ItemList.FR_Wax.get(1) + }, + new int[] {5 * 100, 100 * 100, 50 * 100}, + Voltage.ULV); + addCentrifugeToItemStack( + CombType.OIL, + new ItemStack[] { + ItemList.Crop_Drop_OilBerry.get(6), + GT_Bees.drop.getStackForType(DropType.OIL), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Oilsands, 1), + ItemList.FR_Wax.get(1) + }, + new int[] {100 * 100, 100 * 100, 100 * 100, 50 * 100}, + Voltage.ULV); + addCentrifugeToMaterial( + CombType.APATITE, + new Materials[] {Materials.Apatite, Materials.Phosphate}, + new int[] {100 * 100, 80 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + } + + // ic2 + addCentrifugeToItemStack( + CombType.COOLANT, + new ItemStack[] {GT_Bees.drop.getStackForType(DropType.COOLANT), ItemList.FR_Wax.get(1)}, + new int[] {100 * 100, 100 * 100}, + Voltage.HV, + 196); + addCentrifugeToItemStack( + CombType.ENERGY, + new ItemStack[] { + GT_Bees.drop.getStackForType(DropType.HOT_COOLANT), + ItemList.IC2_Energium_Dust.get(1L), + ItemList.FR_RefractoryWax.get(1) + }, + new int[] {20 * 100, 20 * 100, 50 * 100}, + Voltage.HV, + 196); + addCentrifugeToItemStack( + CombType.LAPOTRON, + new ItemStack[] { + GT_Bees.drop.getStackForType(DropType.LAPIS), + GT_ModHandler.getModItem(MOD_ID_DC, "item.LapotronDust", 1, 0), + GT_ModHandler.getModItem("MagicBees", "wax", 1, 2) + }, + new int[] {20 * 100, 15 * 100, 40 * 100}, + Voltage.HV, + 196); + addCentrifugeToMaterial( + CombType.PYROTHEUM, + new Materials[] {Materials.Blaze, Materials.Pyrotheum}, + new int[] {25 * 100, 20 * 100}, + new int[] {}, + Voltage.HV, + NI, + 30 * 100); + addCentrifugeToItemStack( + CombType.CRYOTHEUM, + new ItemStack[] {ItemList.FR_RefractoryWax.get(1), Materials.Blizz.getDust(1)}, + new int[] {50 * 100, 100 * 100}, + Voltage.MV); + + // Alloy + addProcessGT(CombType.REDALLOY, new Materials[] {Materials.RedAlloy}, Voltage.LV); + addProcessGT(CombType.REDSTONEALLOY, new Materials[] {Materials.RedstoneAlloy}, Voltage.LV); + addProcessGT(CombType.CONDUCTIVEIRON, new Materials[] {Materials.ConductiveIron}, Voltage.MV); + addProcessGT(CombType.VIBRANTALLOY, new Materials[] {Materials.VibrantAlloy}, Voltage.HV); + addProcessGT(CombType.ENERGETICALLOY, new Materials[] {Materials.EnergeticAlloy}, Voltage.HV); + addProcessGT(CombType.ELECTRICALSTEEL, new Materials[] {Materials.ElectricalSteel}, Voltage.LV); + addProcessGT(CombType.DARKSTEEL, new Materials[] {Materials.DarkSteel}, Voltage.MV); + addProcessGT(CombType.PULSATINGIRON, new Materials[] {Materials.PulsatingIron}, Voltage.HV); + addProcessGT(CombType.STAINLESSSTEEL, new Materials[] {Materials.StainlessSteel}, Voltage.HV); + addProcessGT(CombType.BEDROCKIUM, new Materials[] {Materials.Bedrockium}, Voltage.EV); + addCentrifugeToItemStack( + CombType.ENDERIUM, + new ItemStack[] { + ItemList.FR_RefractoryWax.get(1), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.EnderiumBase, 1), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Enderium, 1) + }, + new int[] {50 * 100, 30 * 100, 50 * 100}, + Voltage.HV); + if (GT_Mod.gregtechproxy.mNerfedCombs) { + addCentrifugeToMaterial( + CombType.REDALLOY, + new Materials[] {Materials.RedAlloy}, + new int[] {100 * 100}, + new int[] {}, + Voltage.ULV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.REDSTONEALLOY, + new Materials[] {Materials.RedstoneAlloy}, + new int[] {100 * 100}, + new int[] {}, + Voltage.ULV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.CONDUCTIVEIRON, + new Materials[] {Materials.ConductiveIron}, + new int[] {90 * 100}, + new int[] {}, + Voltage.MV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.VIBRANTALLOY, + new Materials[] {Materials.VibrantAlloy}, + new int[] {70 * 100}, + new int[] {}, + Voltage.HV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.ENERGETICALLOY, + new Materials[] {Materials.EnergeticAlloy}, + new int[] {80 * 100}, + new int[] {}, + Voltage.HV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.ELECTRICALSTEEL, + new Materials[] {Materials.ElectricalSteel}, + new int[] {100 * 100}, + new int[] {}, + Voltage.ULV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.DARKSTEEL, + new Materials[] {Materials.DarkSteel}, + new int[] {100 * 100}, + new int[] {}, + Voltage.MV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.PULSATINGIRON, + new Materials[] {Materials.PulsatingIron}, + new int[] {80 * 100}, + new int[] {}, + Voltage.HV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.STAINLESSSTEEL, + new Materials[] {Materials.StainlessSteel}, + new int[] {50 * 100}, + new int[] {}, + Voltage.HV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.BEDROCKIUM, + new Materials[] {Materials.Bedrockium}, + new int[] {50 * 100}, + new int[] {}, + Voltage.EV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + + } else { + addCentrifugeToMaterial( + CombType.REDALLOY, + new Materials[] {Materials.RedAlloy, Materials.Redstone, Materials.Copper}, + new int[] {100 * 100, 75 * 100, 90 * 100}, + new int[] {}, + Voltage.ULV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.REDSTONEALLOY, + new Materials[] {Materials.RedstoneAlloy, Materials.Redstone, Materials.Silicon, Materials.Coal}, + new int[] {100 * 100, 90 * 100, 75 * 100, 75 * 100}, + new int[] {}, + Voltage.ULV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.CONDUCTIVEIRON, + new Materials[] {Materials.ConductiveIron, Materials.Silver, Materials.Iron}, + new int[] {90 * 100, 55 * 100, 65 * 100}, + new int[] {}, + Voltage.MV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.VIBRANTALLOY, + new Materials[] {Materials.VibrantAlloy, Materials.Chrome}, + new int[] {70 * 100, 50 * 100}, + new int[] {}, + Voltage.HV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.ENERGETICALLOY, + new Materials[] {Materials.EnergeticAlloy, Materials.Gold}, + new int[] {80 * 100, 60 * 100}, + new int[] {}, + Voltage.HV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.ELECTRICALSTEEL, + new Materials[] {Materials.ElectricalSteel, Materials.Silicon, Materials.Coal}, + new int[] {100 * 100, 75 * 100, 75 * 100}, + new int[] {}, + Voltage.ULV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.DARKSTEEL, + new Materials[] {Materials.DarkSteel, Materials.Coal}, + new int[] {100 * 100, 75 * 100}, + new int[] {}, + Voltage.MV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.PULSATINGIRON, + new Materials[] {Materials.PulsatingIron, Materials.Iron}, + new int[] {80 * 100, 75 * 100}, + new int[] {}, + Voltage.HV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.STAINLESSSTEEL, + new Materials[] { + Materials.StainlessSteel, + Materials.Iron, + Materials.Chrome, + Materials.Manganese, + Materials.Nickel + }, + new int[] {50 * 100, 75 * 100, 55 * 100, 75 * 100, 75 * 100}, + new int[] {}, + Voltage.HV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.BEDROCKIUM, + new Materials[] {Materials.Bedrockium}, + new int[] {50 * 100}, + new int[] {}, + Voltage.EV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + } + // Thaumic + addProcessGT(CombType.THAUMIUMDUST, new Materials[] {Materials.Thaumium}, Voltage.MV); + addCentrifugeToItemStack( + CombType.THAUMIUMSHARD, + new ItemStack[] { + GT_ModHandler.getModItem("MagicBees", "propolis", 1, 1), + GT_ModHandler.getModItem("MagicBees", "propolis", 1, 2), + GT_ModHandler.getModItem("MagicBees", "propolis", 1, 3), + GT_ModHandler.getModItem("MagicBees", "propolis", 1, 4), + GT_ModHandler.getModItem("MagicBees", "propolis", 1, 5), + GT_ModHandler.getModItem("MagicBees", "propolis", 1, 6), + GT_ModHandler.getModItem("MagicBees", "wax", 1, 0) + }, + new int[] {20 * 100, 20 * 100, 20 * 100, 20 * 100, 20 * 100, 20 * 100, 50 * 100}, + Voltage.ULV); + addProcessGT(CombType.AMBER, new Materials[] {Materials.Amber}, Voltage.LV); + addProcessGT(CombType.QUICKSILVER, new Materials[] {Materials.Cinnabar}, Voltage.LV); + addCentrifugeToItemStack( + CombType.SALISMUNDUS, + new ItemStack[] { + GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1, 14), + GT_ModHandler.getModItem("MagicBees", "wax", 1, 0) + }, + new int[] {100 * 100, 50 * 100}, + Voltage.MV); + addCentrifugeToItemStack( + CombType.TAINTED, + new ItemStack[] { + GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1, 11), + GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1, 12), + GT_ModHandler.getModItem("Thaumcraft", "blockTaintFibres", 1, 0), + GT_ModHandler.getModItem("Thaumcraft", "blockTaintFibres", 1, 1), + GT_ModHandler.getModItem("Thaumcraft", "blockTaintFibres", 1, 2), + GT_ModHandler.getModItem("MagicBees", "wax", 1, 0) + }, + new int[] {15 * 100, 15 * 100, 15 * 100, 15 * 100, 15 * 100, 50 * 100}, + Voltage.ULV); + addProcessGT(CombType.MITHRIL, new Materials[] {Materials.Mithril}, Voltage.HV); + addProcessGT(CombType.ASTRALSILVER, new Materials[] {Materials.AstralSilver}, Voltage.HV); + addCentrifugeToMaterial( + CombType.ASTRALSILVER, + new Materials[] {Materials.AstralSilver, Materials.Silver}, + new int[] {20 * 100, (GT_Mod.gregtechproxy.mNerfedCombs ? 10 : 75) * 100}, + new int[] {}, + Voltage.HV, + GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), + 50 * 100); + addCentrifugeToItemStack( + CombType.THAUMINITE, + new ItemStack[] { + GT_ModHandler.getModItem("thaumicbases", "resource", 1, 0), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Thaumium, 1), + GT_ModHandler.getModItem("MagicBees", "wax", 1, 0) + }, + new int[] {20 * 100, 10 * 100, 50 * 100}, + Voltage.HV); + addProcessGT(CombType.SHADOWMETAL, new Materials[] {Materials.Shadow}, Voltage.HV); + addCentrifugeToMaterial( + CombType.SHADOWMETAL, + new Materials[] {Materials.Shadow, Materials.ShadowSteel}, + new int[] {(GT_Mod.gregtechproxy.mNerfedCombs ? 20 : 75) * 100, 10 * 100}, + new int[] {}, + Voltage.HV, + GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), + 50 * 100); + addProcessGT(CombType.DIVIDED, new Materials[] {Materials.Diamond}, Voltage.HV); + addCentrifugeToItemStack( + CombType.DIVIDED, + new ItemStack[] { + GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), + GT_ModHandler.getModItem("ExtraUtilities", "unstableingot", 1, 1), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Iron, 1), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Diamond, 1) + }, + new int[] { + 50 * 100, + 20 * 100, + (GT_Mod.gregtechproxy.mNerfedCombs ? 10 : 75) * 100, + (GT_Mod.gregtechproxy.mNerfedCombs ? 5 : 55) * 100 + }, + Voltage.HV); + addProcessGT(CombType.SPARKELING, new Materials[] {Materials.NetherStar}, Voltage.EV); + addCentrifugeToItemStack( + CombType.SPARKELING, + new ItemStack[] { + GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), + GT_ModHandler.getModItem("MagicBees", "miscResources", 2, 5), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.NetherStar, 1) + }, + new int[] {50 * 100, 10 * 100, (GT_Mod.gregtechproxy.mNerfedCombs ? 10 : 50) * 100}, + Voltage.EV); + if (GT_Mod.gregtechproxy.mNerfedCombs) { + addCentrifugeToMaterial( + CombType.THAUMIUMDUST, + new Materials[] {Materials.Thaumium}, + new int[] {100 * 100}, + new int[] {}, + Voltage.MV, + GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), + 50 * 100); + addCentrifugeToItemStack( + CombType.QUICKSILVER, + new ItemStack[] { + GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), + GT_ModHandler.getModItem("Thaumcraft", "ItemNugget", 1, 5) + }, + new int[] {50 * 100, 100 * 100}, + Voltage.ULV); + } else { + addCentrifugeToMaterial( + CombType.THAUMIUMDUST, + new Materials[] {Materials.Thaumium, Materials.Iron}, + new int[] {100 * 100, 75 * 100}, + new int[] {}, + Voltage.MV, + GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), + 50 * 100); + addCentrifugeToMaterial( + CombType.AMBER, + new Materials[] {Materials.Amber}, + new int[] {100 * 100}, + new int[] {}, + Voltage.ULV, + GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), + 50 * 100); + addCentrifugeToItemStack( + CombType.QUICKSILVER, + new ItemStack[] { + GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), + GT_ModHandler.getModItem("Thaumcraft", "ItemNugget", 1, 5), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Cinnabar, 1) + }, + new int[] {50 * 100, 100 * 100, 85 * 100}, + Voltage.ULV); + addCentrifugeToMaterial( + CombType.MITHRIL, + new Materials[] {Materials.Mithril, Materials.Platinum}, + new int[] {75 * 100, 55 * 100}, + new int[] {}, + Voltage.HV, + GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), + 50 * 100); } - //Thaumic - addProcessGT(CombType.THAUMIUMDUST, new Materials[] {Materials.Thaumium }, Voltage.MV); - addCentrifugeToItemStack(CombType.THAUMIUMSHARD, new ItemStack[] {GT_ModHandler.getModItem("MagicBees", "propolis", 1, 1), GT_ModHandler.getModItem("MagicBees", "propolis", 1, 2), GT_ModHandler.getModItem("MagicBees", "propolis", 1, 3), GT_ModHandler.getModItem("MagicBees", "propolis", 1, 4), GT_ModHandler.getModItem("MagicBees", "propolis", 1, 5), GT_ModHandler.getModItem("MagicBees", "propolis", 1, 6), GT_ModHandler.getModItem("MagicBees", "wax", 1, 0) }, new int[] {20 * 100, 20 * 100, 20 * 100, 20 * 100, 20 * 100, 20 * 100, 50 * 100 }, Voltage.ULV); - addProcessGT(CombType.AMBER, new Materials[] {Materials.Amber}, Voltage.LV); - addProcessGT(CombType.QUICKSILVER, new Materials[] {Materials.Cinnabar}, Voltage.LV); - addCentrifugeToItemStack(CombType.SALISMUNDUS, new ItemStack[] {GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1, 14), GT_ModHandler.getModItem("MagicBees", "wax", 1, 0)}, new int[] {100 * 100, 50 * 100}, Voltage.MV); - addCentrifugeToItemStack(CombType.TAINTED, new ItemStack[] {GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1, 11), GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1, 12), GT_ModHandler.getModItem("Thaumcraft", "blockTaintFibres", 1, 0), GT_ModHandler.getModItem("Thaumcraft", "blockTaintFibres", 1, 1), GT_ModHandler.getModItem("Thaumcraft", "blockTaintFibres", 1, 2), GT_ModHandler.getModItem("MagicBees", "wax", 1, 0)}, new int[] {15 * 100, 15 * 100, 15 * 100, 15 * 100, 15 * 100, 50 * 100}, Voltage.ULV); - addProcessGT(CombType.MITHRIL, new Materials[] {Materials.Mithril }, Voltage.HV); - addProcessGT(CombType.ASTRALSILVER, new Materials[] {Materials.AstralSilver }, Voltage.HV); - addCentrifugeToMaterial(CombType.ASTRALSILVER, new Materials[] {Materials.AstralSilver, Materials.Silver}, new int[] {20 * 100, (GT_Mod.gregtechproxy.mNerfedCombs ? 10:75) * 100}, new int[] {}, Voltage.HV, GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), 50 * 100); - addCentrifugeToItemStack(CombType.THAUMINITE, new ItemStack[] {GT_ModHandler.getModItem("thaumicbases", "resource", 1, 0), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Thaumium, 1), GT_ModHandler.getModItem("MagicBees", "wax", 1, 0)}, new int[] {20 * 100, 10 * 100, 50 *100}, Voltage.HV); - addProcessGT(CombType.SHADOWMETAL, new Materials[] {Materials.Shadow }, Voltage.HV); - addCentrifugeToMaterial(CombType.SHADOWMETAL, new Materials[] {Materials.Shadow, Materials.ShadowSteel}, new int[] {(GT_Mod.gregtechproxy.mNerfedCombs ? 20:75) * 100, 10 * 100}, new int[] {}, Voltage.HV, GT_ModHandler.getModItem("MagicBees", "wax", 1, 0) , 50 * 100); - addProcessGT(CombType.DIVIDED, new Materials[] {Materials.Diamond }, Voltage.HV); - addCentrifugeToItemStack(CombType.DIVIDED, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), GT_ModHandler.getModItem("ExtraUtilities", "unstableingot", 1, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Iron, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Diamond, 1)}, new int[] {50 * 100, 20 * 100, (GT_Mod.gregtechproxy.mNerfedCombs ? 10:75) * 100, (GT_Mod.gregtechproxy.mNerfedCombs ? 5:55) * 100}, Voltage.HV); - addProcessGT(CombType.SPARKELING, new Materials[] {Materials.NetherStar}, Voltage.EV); - addCentrifugeToItemStack(CombType.SPARKELING, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), GT_ModHandler.getModItem("MagicBees", "miscResources", 2, 5), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.NetherStar, 1)}, new int[] {50 * 100, 10 * 100, (GT_Mod.gregtechproxy.mNerfedCombs ? 10:50) * 100}, Voltage.EV); - if(GT_Mod.gregtechproxy.mNerfedCombs) { - addCentrifugeToMaterial(CombType.THAUMIUMDUST, new Materials[] {Materials.Thaumium }, new int[] {100 * 100}, new int[] {}, Voltage.MV, GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), 50 * 100); - addCentrifugeToItemStack(CombType.QUICKSILVER, new ItemStack[] {GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), GT_ModHandler.getModItem("Thaumcraft", "ItemNugget", 1, 5) }, new int[] {50 * 100, 100 * 100 }, Voltage.ULV); - }else { - addCentrifugeToMaterial(CombType.THAUMIUMDUST, new Materials[] {Materials.Thaumium, Materials.Iron }, new int[] {100 * 100, 75 * 100 }, new int[] {}, Voltage.MV, GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), 50 * 100); - addCentrifugeToMaterial(CombType.AMBER, new Materials[] {Materials.Amber }, new int[] {100 * 100 }, new int[] {}, Voltage.ULV, GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), 50 * 100); - addCentrifugeToItemStack(CombType.QUICKSILVER, new ItemStack[] {GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), GT_ModHandler.getModItem("Thaumcraft", "ItemNugget", 1, 5), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Cinnabar, 1) }, new int[] {50 * 100, 100 * 100, 85 * 100 }, Voltage.ULV); - addCentrifugeToMaterial(CombType.MITHRIL, new Materials[] {Materials.Mithril, Materials.Platinum}, new int[] {75 * 100, 55 * 100}, new int[] {}, Voltage.HV, GT_ModHandler.getModItem("MagicBees", "wax", 1, 0), 50 * 100); - } - - //Gem Line - addProcessGT(CombType.STONE, new Materials[] {Materials.Soapstone}, Voltage.LV); - addProcessGT(CombType.CERTUS, new Materials[] {Materials.CertusQuartz}, Voltage.LV); - addProcessGT(CombType.FLUIX, new Materials[] {Materials.Fluix}, Voltage.LV); - addProcessGT(CombType.REDSTONE, new Materials[] {Materials.Redstone}, Voltage.LV); - addCentrifugeToMaterial(CombType.RAREEARTH, new Materials[] {Materials.RareEarth}, new int[] {100 * 100}, new int[] { 1}, Voltage.ULV, NI, 30 * 100); - addProcessGT(CombType.LAPIS, new Materials[] {Materials.Lapis}, Voltage.LV); - addProcessGT(CombType.RUBY, new Materials[] {Materials.Ruby}, Voltage.LV); - addProcessGT(CombType.REDGARNET, new Materials[] {Materials.GarnetRed}, Voltage.LV); - addProcessGT(CombType.YELLOWGARNET, new Materials[] {Materials.GarnetYellow}, Voltage.LV); - addProcessGT(CombType.SAPPHIRE, new Materials[] {Materials.Sapphire}, Voltage.LV); - addProcessGT(CombType.DIAMOND, new Materials[] {Materials.Diamond}, Voltage.LV); - addProcessGT(CombType.OLIVINE, new Materials[] {Materials.Olivine}, Voltage.LV); - addProcessGT(CombType.EMERALD, new Materials[] {Materials.Emerald}, Voltage.LV); - addProcessGT(CombType.FIRESTONE, new Materials[] {Materials.Firestone}, Voltage.LV); - addProcessGT(CombType.PYROPE, new Materials[] {Materials.Pyrope}, Voltage.LV); - addProcessGT(CombType.GROSSULAR, new Materials[] {Materials.Grossular}, Voltage.LV); - if(GT_Mod.gregtechproxy.mNerfedCombs) { - addCentrifugeToMaterial(CombType.STONE, new Materials[] {Materials.Stone, Materials.GraniteBlack, Materials.GraniteRed, Materials.Basalt, Materials.Marble, Materials.Redrock}, new int[] {70 * 100, 50 * 100, 50 * 100, 50 * 100, 50 * 100, 50 * 100}, new int[] { 9, 9, 9, 9, 9, 9}, Voltage.ULV, NI, 50 * 100); - addCentrifugeToMaterial(CombType.FLUIX, new Materials[] {Materials.Fluix}, new int[] {25 * 100}, new int[] { 9}, Voltage.ULV, NI, 30 * 100); - }else { - addCentrifugeToMaterial(CombType.STONE, new Materials[] {Materials.Soapstone, Materials.Talc, Materials.Apatite, Materials.Phosphate, Materials.TricalciumPhosphate}, new int[] {95 * 100, 90 * 100, 80 * 100, 75 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 50 * 100); - addCentrifugeToMaterial(CombType.CERTUS, new Materials[] {Materials.CertusQuartz, Materials.Quartzite, Materials.Barite}, new int[] {100 * 100, 80 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 50 * 100); - addCentrifugeToMaterial(CombType.FLUIX, new Materials[] {Materials.Fluix, Materials.Redstone, Materials.CertusQuartz, Materials.NetherQuartz}, new int[] {25 * 100, 90 * 100, 90 * 100, 90 * 100}, new int[] { 9, 1, 1, 1}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.REDSTONE, new Materials[] {Materials.Redstone, Materials.Cinnabar }, new int[] {100 * 100, 80 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.LAPIS, new Materials[] {Materials.Lapis, Materials.Sodalite, Materials.Lazurite, Materials.Calcite }, new int[] {100 * 100, 90 * 100, 90 * 100, 85 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.RUBY, new Materials[] {Materials.Ruby, Materials.Redstone }, new int[] {100 * 100, 90 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.REDGARNET, new Materials[] {Materials.GarnetRed, Materials.GarnetYellow }, new int[] {100 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.YELLOWGARNET, new Materials[] {Materials.GarnetYellow, Materials.GarnetRed }, new int[] {100 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.SAPPHIRE, new Materials[] {Materials.Sapphire, Materials.GreenSapphire, Materials.Almandine, Materials.Pyrope}, new int[] {100 * 100, 90 * 100, 90 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.DIAMOND, new Materials[] {Materials.Diamond, Materials.Graphite}, new int[] {100 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.OLIVINE, new Materials[] {Materials.Olivine, Materials.Bentonite, Materials.Magnesite, Materials.Glauconite}, new int[] {100 * 100, 90 * 100, 80 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.EMERALD, new Materials[] {Materials.Emerald, Materials.Beryllium, Materials.Thorium}, new int[] {100 * 100, 85 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.FIRESTONE, new Materials[] {Materials.Firestone}, new int[] {100 * 100}, new int[] {}, Voltage.ULV, ItemList.FR_RefractoryWax.get(1), 30 * 100); - addCentrifugeToMaterial(CombType.PYROPE, new Materials[] {Materials.Pyrope, Materials.Aluminium, Materials.Magnesium, Materials.Silicon}, new int[] {100 * 100, 75 * 100, 80 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.GROSSULAR, new Materials[] {Materials.Grossular, Materials.Aluminium, Materials.Silicon}, new int[] {100 * 100, 75 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - } - - // Metals Line - addProcessGT(CombType.SLAG, new Materials[] {Materials.Limestone}, Voltage.LV); - addProcessGT(CombType.COPPER, new Materials[] {Materials.Copper}, Voltage.LV); - addProcessGT(CombType.TIN, new Materials[] {Materials.Tin}, Voltage.LV); - addProcessGT(CombType.LEAD, new Materials[] {Materials.Lead}, Voltage.LV); + + // Gem Line + addProcessGT(CombType.STONE, new Materials[] {Materials.Soapstone}, Voltage.LV); + addProcessGT(CombType.CERTUS, new Materials[] {Materials.CertusQuartz}, Voltage.LV); + addProcessGT(CombType.FLUIX, new Materials[] {Materials.Fluix}, Voltage.LV); + addProcessGT(CombType.REDSTONE, new Materials[] {Materials.Redstone}, Voltage.LV); + addCentrifugeToMaterial( + CombType.RAREEARTH, + new Materials[] {Materials.RareEarth}, + new int[] {100 * 100}, + new int[] {1}, + Voltage.ULV, + NI, + 30 * 100); + addProcessGT(CombType.LAPIS, new Materials[] {Materials.Lapis}, Voltage.LV); + addProcessGT(CombType.RUBY, new Materials[] {Materials.Ruby}, Voltage.LV); + addProcessGT(CombType.REDGARNET, new Materials[] {Materials.GarnetRed}, Voltage.LV); + addProcessGT(CombType.YELLOWGARNET, new Materials[] {Materials.GarnetYellow}, Voltage.LV); + addProcessGT(CombType.SAPPHIRE, new Materials[] {Materials.Sapphire}, Voltage.LV); + addProcessGT(CombType.DIAMOND, new Materials[] {Materials.Diamond}, Voltage.LV); + addProcessGT(CombType.OLIVINE, new Materials[] {Materials.Olivine}, Voltage.LV); + addProcessGT(CombType.EMERALD, new Materials[] {Materials.Emerald}, Voltage.LV); + addProcessGT(CombType.FIRESTONE, new Materials[] {Materials.Firestone}, Voltage.LV); + addProcessGT(CombType.PYROPE, new Materials[] {Materials.Pyrope}, Voltage.LV); + addProcessGT(CombType.GROSSULAR, new Materials[] {Materials.Grossular}, Voltage.LV); + if (GT_Mod.gregtechproxy.mNerfedCombs) { + addCentrifugeToMaterial( + CombType.STONE, + new Materials[] { + Materials.Stone, + Materials.GraniteBlack, + Materials.GraniteRed, + Materials.Basalt, + Materials.Marble, + Materials.Redrock + }, + new int[] {70 * 100, 50 * 100, 50 * 100, 50 * 100, 50 * 100, 50 * 100}, + new int[] {9, 9, 9, 9, 9, 9}, + Voltage.ULV, + NI, + 50 * 100); + addCentrifugeToMaterial( + CombType.FLUIX, + new Materials[] {Materials.Fluix}, + new int[] {25 * 100}, + new int[] {9}, + Voltage.ULV, + NI, + 30 * 100); + } else { + addCentrifugeToMaterial( + CombType.STONE, + new Materials[] { + Materials.Soapstone, + Materials.Talc, + Materials.Apatite, + Materials.Phosphate, + Materials.TricalciumPhosphate + }, + new int[] {95 * 100, 90 * 100, 80 * 100, 75 * 100, 75 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 50 * 100); + addCentrifugeToMaterial( + CombType.CERTUS, + new Materials[] {Materials.CertusQuartz, Materials.Quartzite, Materials.Barite}, + new int[] {100 * 100, 80 * 100, 75 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 50 * 100); + addCentrifugeToMaterial( + CombType.FLUIX, + new Materials[] {Materials.Fluix, Materials.Redstone, Materials.CertusQuartz, Materials.NetherQuartz + }, + new int[] {25 * 100, 90 * 100, 90 * 100, 90 * 100}, + new int[] {9, 1, 1, 1}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.REDSTONE, + new Materials[] {Materials.Redstone, Materials.Cinnabar}, + new int[] {100 * 100, 80 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.LAPIS, + new Materials[] {Materials.Lapis, Materials.Sodalite, Materials.Lazurite, Materials.Calcite}, + new int[] {100 * 100, 90 * 100, 90 * 100, 85 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.RUBY, + new Materials[] {Materials.Ruby, Materials.Redstone}, + new int[] {100 * 100, 90 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.REDGARNET, + new Materials[] {Materials.GarnetRed, Materials.GarnetYellow}, + new int[] {100 * 100, 75 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.YELLOWGARNET, + new Materials[] {Materials.GarnetYellow, Materials.GarnetRed}, + new int[] {100 * 100, 75 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.SAPPHIRE, + new Materials[] {Materials.Sapphire, Materials.GreenSapphire, Materials.Almandine, Materials.Pyrope + }, + new int[] {100 * 100, 90 * 100, 90 * 100, 75 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.DIAMOND, + new Materials[] {Materials.Diamond, Materials.Graphite}, + new int[] {100 * 100, 75 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.OLIVINE, + new Materials[] {Materials.Olivine, Materials.Bentonite, Materials.Magnesite, Materials.Glauconite}, + new int[] {100 * 100, 90 * 100, 80 * 100, 75 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.EMERALD, + new Materials[] {Materials.Emerald, Materials.Beryllium, Materials.Thorium}, + new int[] {100 * 100, 85 * 100, 75 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.FIRESTONE, + new Materials[] {Materials.Firestone}, + new int[] {100 * 100}, + new int[] {}, + Voltage.ULV, + ItemList.FR_RefractoryWax.get(1), + 30 * 100); + addCentrifugeToMaterial( + CombType.PYROPE, + new Materials[] {Materials.Pyrope, Materials.Aluminium, Materials.Magnesium, Materials.Silicon}, + new int[] {100 * 100, 75 * 100, 80 * 100, 75 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.GROSSULAR, + new Materials[] {Materials.Grossular, Materials.Aluminium, Materials.Silicon}, + new int[] {100 * 100, 75 * 100, 75 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + } + + // Metals Line + addProcessGT(CombType.SLAG, new Materials[] {Materials.Limestone}, Voltage.LV); + addProcessGT(CombType.COPPER, new Materials[] {Materials.Copper}, Voltage.LV); + addProcessGT(CombType.TIN, new Materials[] {Materials.Tin}, Voltage.LV); + addProcessGT(CombType.LEAD, new Materials[] {Materials.Lead}, Voltage.LV); addProcessGT(CombType.INDIUM, new Materials[] {Materials.Indium}, Voltage.ZPM); - addProcessGT(CombType.NICKEL, new Materials[] {Materials.Nickel}, Voltage.LV); - addProcessGT(CombType.ZINC, new Materials[] {Materials.Zinc}, Voltage.LV); - addProcessGT(CombType.SILVER, new Materials[] {Materials.Silver}, Voltage.LV); - addProcessGT(CombType.CRYOLITE, new Materials[] {Materials.Cryolite}, Voltage.LV); - addProcessGT(CombType.GOLD, new Materials[] {Materials.Gold}, Voltage.LV); - addProcessGT(CombType.SULFUR, new Materials[] {Materials.Sulfur}, Voltage.LV); - addProcessGT(CombType.GALLIUM, new Materials[] {Materials.Gallium}, Voltage.LV); - addProcessGT(CombType.ARSENIC, new Materials[] {Materials.Arsenic}, Voltage.LV); - if (ProcessingModSupport.aEnableGCMarsMats) { - addProcessGT(CombType.IRON, new Materials[] {Materials.Iron}, Voltage.LV); - addProcessGT(CombType.STEEL, new Materials[] {Materials.Steel}, Voltage.LV); - }else { - addProcessGT(CombType.IRON, new Materials[] {Materials.Iron}, Voltage.LV); - addProcessGT(CombType.STEEL, new Materials[] {Materials.Steel}, Voltage.LV); - } - if(GT_Mod.gregtechproxy.mNerfedCombs) { - addCentrifugeToMaterial(CombType.SLAG, new Materials[] {Materials.Stone, Materials.GraniteBlack, Materials.GraniteRed}, new int[] {50 * 100, 20 * 100, 20 * 100}, new int[] { 9, 9, 9}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.COPPER, new Materials[] {Materials.Copper}, new int[] {70 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.TIN, new Materials[] {Materials.Tin}, new int[] {60 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.LEAD, new Materials[] {Materials.Lead}, new int[] {45 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.IRON, new Materials[] {Materials.Iron}, new int[] {30 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.STEEL, new Materials[] {Materials.Steel}, new int[] {40 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.SILVER, new Materials[] {Materials.Silver}, new int[] {80 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.CRYOLITE, new Materials[] {Materials.Cryolite}, new int[] {80 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.SULFUR, new Materials[] {Materials.Sulfur}, new int[] {100 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - }else { - addCentrifugeToMaterial(CombType.SLAG, new Materials[] {Materials.Salt, Materials.RockSalt, Materials.Lepidolite, Materials.Spodumene, Materials.Monazite}, new int[] {100 * 100, 100 * 100, 100 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.COPPER, new Materials[] {Materials.Copper, Materials.Tetrahedrite, Materials.Chalcopyrite, Materials.Malachite, Materials.Pyrite, Materials.Stibnite}, new int[] {100 * 100, 85 * 100, 95 * 100, 80 * 100, 75 * 100, 65 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.TIN, new Materials[] {Materials.Tin, Materials.Cassiterite, Materials.CassiteriteSand}, new int[] {100 * 100, 85 * 100, 65 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.LEAD, new Materials[] {Materials.Lead, Materials.Galena}, new int[] {100 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - if (ProcessingModSupport.aEnableGCMarsMats) { - addCentrifugeToMaterial(CombType.IRON, new Materials[] {Materials.Iron, Materials.Magnetite, Materials.BrownLimonite, Materials.YellowLimonite, Materials.VanadiumMagnetite, Materials.MeteoricIron}, new int[] {100 * 100, 90 * 100, 85 * 100, 85 * 100, 80 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.LEAD, new Materials[] {Materials.Steel, Materials.Magnetite, Materials.VanadiumMagnetite, Materials.Molybdenite, Materials.Molybdenum, Materials.MeteoricIron }, new int[] {100 * 100, 90 * 100, 80 * 100, 65 * 100, 65 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - }else { - addCentrifugeToMaterial(CombType.IRON, new Materials[] {Materials.Iron, Materials.Magnetite, Materials.BrownLimonite, Materials.YellowLimonite, Materials.VanadiumMagnetite, Materials.BandedIron}, new int[] {100 * 100, 90 * 100, 85 * 100, 85 * 100, 80 * 100, 85 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.STEEL, new Materials[] {Materials.Steel, Materials.Magnetite, Materials.VanadiumMagnetite, Materials.BandedIron, Materials.Molybdenite, Materials.Molybdenum }, new int[] {100 * 100, 90 * 100, 80 * 100, 85 * 100, 65 * 100, 65 * 100 }, new int[] {}, Voltage.ULV, NI, 30 * 100); - } - addCentrifugeToMaterial(CombType.NICKEL, new Materials[] {Materials.Nickel, Materials.Garnierite, Materials.Pentlandite, Materials.Cobaltite, Materials.Wulfenite, Materials.Powellite}, new int[] {100 * 100, 85 * 100, 85 * 100, 80 * 100, 75 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.ZINC, new Materials[] {Materials.Zinc, Materials.Sphalerite, Materials.Sulfur}, new int[] {100 * 100, 80 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.SILVER, new Materials[] {Materials.Silver, Materials.Galena}, new int[] {100 * 100, 80 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.CRYOLITE, new Materials[] {Materials.Cryolite, Materials.Silver}, new int[] {100 * 100, 80 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.GOLD, new Materials[] {Materials.Gold}, new int[] {100 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.SULFUR, new Materials[] {Materials.Sulfur, Materials.Pyrite, Materials.Sphalerite}, new int[] {100 * 100, 90 * 100, 80 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.GALLIUM, new Materials[] {Materials.Gallium, Materials.Niobium}, new int[] { 80 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.ARSENIC, new Materials[] {Materials.Arsenic, Materials.Bismuth, Materials.Antimony}, new int[] {80 * 100, 70 * 100, 70 * 100}, new int[] {}, Voltage.ULV , NI, 30 * 100); - } - - // Rare Metals Line - addProcessGT(CombType.BAUXITE, new Materials[] {Materials.Bauxite}, Voltage.LV); - addProcessGT(CombType.ALUMINIUM, new Materials[] {Materials.Aluminium}, Voltage.LV); - addProcessGT(CombType.MANGANESE, new Materials[] {Materials.Manganese}, Voltage.LV); - addProcessGT(CombType.TITANIUM, new Materials[] {Materials.Titanium}, Voltage.EV); - addProcessGT(CombType.MAGNESIUM, new Materials[] {Materials.Magnesium}, Voltage.LV); - addProcessGT(CombType.CHROME, new Materials[] {Materials.Chrome}, Voltage.HV); - addProcessGT(CombType.TUNGSTEN, new Materials[] {Materials.Tungsten}, Voltage.IV); - addProcessGT(CombType.PLATINUM, new Materials[] {Materials.Platinum}, Voltage.HV); - addProcessGT(CombType.MOLYBDENUM, new Materials[] {Materials.Molybdenum}, Voltage.LV); - addAutoclaveProcess(CombType.MOLYBDENUM, Materials.Osmium, Voltage.IV, 5); - addProcessGT(CombType.IRIDIUM, new Materials[] {Materials.Iridium}, Voltage.IV); - addProcessGT(CombType.OSMIUM, new Materials[] {Materials.Osmium}, Voltage.IV); - addProcessGT(CombType.LITHIUM, new Materials[] {Materials.Lithium}, Voltage.MV); - addProcessGT(CombType.ELECTROTINE, new Materials[] {Materials.Electrotine}, Voltage.MV); - if(GT_Mod.gregtechproxy.mNerfedCombs) { - addCentrifugeToItemStack(CombType.SALT, new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Salt, 6), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RockSalt, 6), ItemList.FR_Wax.get(1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 6)}, new int[] {100 * 100, 100 * 100, 50 * 100, 25 * 100}, Voltage.MV, 160); }else { - addCentrifugeToMaterial(CombType.BAUXITE, new Materials[] {Materials.Bauxite, Materials.Aluminium}, new int[] { 75 * 100, 55 * 100}, new int[] {}, Voltage.ULV , NI, 30 * 100); - addCentrifugeToMaterial(CombType.ALUMINIUM, new Materials[] {Materials.Aluminium, Materials.Bauxite}, new int[] { 60 * 100, 80 * 100}, new int[] {}, Voltage.ULV , NI, 30 * 100); - addCentrifugeToMaterial(CombType.MANGANESE, new Materials[] {Materials.Manganese, Materials.Grossular, Materials.Spessartine, Materials.Pyrolusite, Materials.Tantalite}, new int[] { 30 * 100, 100 * 100, 100 * 100, 100 * 100, 100 * 100}, new int[] {}, Voltage.ULV , NI, 30 * 100); - addCentrifugeToMaterial(CombType.TITANIUM, new Materials[] {Materials.Titanium, Materials.Ilmenite, Materials.Bauxite, Materials.Rutile}, new int[] { 90 * 100, 80 * 100, 75 * 100, 75 * 100}, new int[] {}, Voltage.EV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.MAGNESIUM, new Materials[] {Materials.Magnesium, Materials.Magnesite}, new int[] { 100 * 100, 80 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.CHROME, new Materials[] {Materials.Chrome, Materials.Ruby, Materials.Chromite, Materials.Redstone, Materials.Neodymium, Materials.Bastnasite}, new int[] { 50 * 100, 100 * 100, 50 * 100, 100 * 100, 80 * 100, 80 * 100}, new int[] {}, Voltage.HV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.TUNGSTEN, new Materials[] {Materials.Tungsten, Materials.Tungstate, Materials.Scheelite, Materials.Lithium}, new int[] { 50 * 100, 80 * 100, 75 * 100, 75 * 100}, new int[] {}, Voltage.IV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.PLATINUM, new Materials[] {Materials.Platinum, Materials.Cooperite, Materials.Palladium}, new int[] { 40 * 100, 40 * 100, 40 * 100}, new int[] {}, Voltage.HV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.MOLYBDENUM, new Materials[] {Materials.Molybdenum, Materials.Molybdenite, Materials.Powellite, Materials.Wulfenite}, new int[] { 100 * 100, 80 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.IRIDIUM, new Materials[] {Materials.Iridium, Materials.Osmium}, new int[] { 20 * 100, 15 * 100}, new int[] {}, Voltage.IV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.OSMIUM, new Materials[] {Materials.Osmium, Materials.Iridium}, new int[] { 25 * 100, 15 * 100}, new int[] {}, Voltage.IV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.LITHIUM, new Materials[] {Materials.Lithium, Materials.Aluminium}, new int[] { 85 * 100, 75 * 100}, new int[] {}, Voltage.MV, NI, 30 * 100); - addCentrifugeToItemStack(CombType.SALT, new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Salt, 6), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RockSalt, 6), ItemList.FR_Wax.get(1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 6)}, new int[] {100 * 100, 100 * 100, 50 * 100, 25 * 100}, Voltage.MV, 160); + addProcessGT(CombType.NICKEL, new Materials[] {Materials.Nickel}, Voltage.LV); + addProcessGT(CombType.ZINC, new Materials[] {Materials.Zinc}, Voltage.LV); + addProcessGT(CombType.SILVER, new Materials[] {Materials.Silver}, Voltage.LV); + addProcessGT(CombType.CRYOLITE, new Materials[] {Materials.Cryolite}, Voltage.LV); + addProcessGT(CombType.GOLD, new Materials[] {Materials.Gold}, Voltage.LV); + addProcessGT(CombType.SULFUR, new Materials[] {Materials.Sulfur}, Voltage.LV); + addProcessGT(CombType.GALLIUM, new Materials[] {Materials.Gallium}, Voltage.LV); + addProcessGT(CombType.ARSENIC, new Materials[] {Materials.Arsenic}, Voltage.LV); + if (ProcessingModSupport.aEnableGCMarsMats) { + addProcessGT(CombType.IRON, new Materials[] {Materials.Iron}, Voltage.LV); + addProcessGT(CombType.STEEL, new Materials[] {Materials.Steel}, Voltage.LV); + } else { + addProcessGT(CombType.IRON, new Materials[] {Materials.Iron}, Voltage.LV); + addProcessGT(CombType.STEEL, new Materials[] {Materials.Steel}, Voltage.LV); + } + if (GT_Mod.gregtechproxy.mNerfedCombs) { + addCentrifugeToMaterial( + CombType.SLAG, + new Materials[] {Materials.Stone, Materials.GraniteBlack, Materials.GraniteRed}, + new int[] {50 * 100, 20 * 100, 20 * 100}, + new int[] {9, 9, 9}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.COPPER, + new Materials[] {Materials.Copper}, + new int[] {70 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.TIN, + new Materials[] {Materials.Tin}, + new int[] {60 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.LEAD, + new Materials[] {Materials.Lead}, + new int[] {45 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.IRON, + new Materials[] {Materials.Iron}, + new int[] {30 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.STEEL, + new Materials[] {Materials.Steel}, + new int[] {40 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.SILVER, + new Materials[] {Materials.Silver}, + new int[] {80 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.CRYOLITE, + new Materials[] {Materials.Cryolite}, + new int[] {80 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.SULFUR, + new Materials[] {Materials.Sulfur}, + new int[] {100 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + } else { + addCentrifugeToMaterial( + CombType.SLAG, + new Materials[] { + Materials.Salt, + Materials.RockSalt, + Materials.Lepidolite, + Materials.Spodumene, + Materials.Monazite + }, + new int[] {100 * 100, 100 * 100, 100 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.COPPER, + new Materials[] { + Materials.Copper, + Materials.Tetrahedrite, + Materials.Chalcopyrite, + Materials.Malachite, + Materials.Pyrite, + Materials.Stibnite + }, + new int[] {100 * 100, 85 * 100, 95 * 100, 80 * 100, 75 * 100, 65 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.TIN, + new Materials[] {Materials.Tin, Materials.Cassiterite, Materials.CassiteriteSand}, + new int[] {100 * 100, 85 * 100, 65 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.LEAD, + new Materials[] {Materials.Lead, Materials.Galena}, + new int[] {100 * 100, 75 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + if (ProcessingModSupport.aEnableGCMarsMats) { + addCentrifugeToMaterial( + CombType.IRON, + new Materials[] { + Materials.Iron, + Materials.Magnetite, + Materials.BrownLimonite, + Materials.YellowLimonite, + Materials.VanadiumMagnetite, + Materials.MeteoricIron + }, + new int[] {100 * 100, 90 * 100, 85 * 100, 85 * 100, 80 * 100, 75 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.LEAD, + new Materials[] { + Materials.Steel, + Materials.Magnetite, + Materials.VanadiumMagnetite, + Materials.Molybdenite, + Materials.Molybdenum, + Materials.MeteoricIron + }, + new int[] {100 * 100, 90 * 100, 80 * 100, 65 * 100, 65 * 100, 75 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + } else { + addCentrifugeToMaterial( + CombType.IRON, + new Materials[] { + Materials.Iron, + Materials.Magnetite, + Materials.BrownLimonite, + Materials.YellowLimonite, + Materials.VanadiumMagnetite, + Materials.BandedIron + }, + new int[] {100 * 100, 90 * 100, 85 * 100, 85 * 100, 80 * 100, 85 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.STEEL, + new Materials[] { + Materials.Steel, + Materials.Magnetite, + Materials.VanadiumMagnetite, + Materials.BandedIron, + Materials.Molybdenite, + Materials.Molybdenum + }, + new int[] {100 * 100, 90 * 100, 80 * 100, 85 * 100, 65 * 100, 65 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + } + addCentrifugeToMaterial( + CombType.NICKEL, + new Materials[] { + Materials.Nickel, + Materials.Garnierite, + Materials.Pentlandite, + Materials.Cobaltite, + Materials.Wulfenite, + Materials.Powellite + }, + new int[] {100 * 100, 85 * 100, 85 * 100, 80 * 100, 75 * 100, 75 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.ZINC, + new Materials[] {Materials.Zinc, Materials.Sphalerite, Materials.Sulfur}, + new int[] {100 * 100, 80 * 100, 75 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.SILVER, + new Materials[] {Materials.Silver, Materials.Galena}, + new int[] {100 * 100, 80 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.CRYOLITE, + new Materials[] {Materials.Cryolite, Materials.Silver}, + new int[] {100 * 100, 80 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.GOLD, + new Materials[] {Materials.Gold}, + new int[] {100 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.SULFUR, + new Materials[] {Materials.Sulfur, Materials.Pyrite, Materials.Sphalerite}, + new int[] {100 * 100, 90 * 100, 80 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.GALLIUM, + new Materials[] {Materials.Gallium, Materials.Niobium}, + new int[] {80 * 100, 75 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.ARSENIC, + new Materials[] {Materials.Arsenic, Materials.Bismuth, Materials.Antimony}, + new int[] {80 * 100, 70 * 100, 70 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + } + + // Rare Metals Line + addProcessGT(CombType.BAUXITE, new Materials[] {Materials.Bauxite}, Voltage.LV); + addProcessGT(CombType.ALUMINIUM, new Materials[] {Materials.Aluminium}, Voltage.LV); + addProcessGT(CombType.MANGANESE, new Materials[] {Materials.Manganese}, Voltage.LV); + addProcessGT(CombType.TITANIUM, new Materials[] {Materials.Titanium}, Voltage.EV); + addProcessGT(CombType.MAGNESIUM, new Materials[] {Materials.Magnesium}, Voltage.LV); + addProcessGT(CombType.CHROME, new Materials[] {Materials.Chrome}, Voltage.HV); + addProcessGT(CombType.TUNGSTEN, new Materials[] {Materials.Tungsten}, Voltage.IV); + addProcessGT(CombType.PLATINUM, new Materials[] {Materials.Platinum}, Voltage.HV); + addProcessGT(CombType.MOLYBDENUM, new Materials[] {Materials.Molybdenum}, Voltage.LV); + addAutoclaveProcess(CombType.MOLYBDENUM, Materials.Osmium, Voltage.IV, 5); + addProcessGT(CombType.IRIDIUM, new Materials[] {Materials.Iridium}, Voltage.IV); + addProcessGT(CombType.OSMIUM, new Materials[] {Materials.Osmium}, Voltage.IV); + addProcessGT(CombType.LITHIUM, new Materials[] {Materials.Lithium}, Voltage.MV); + addProcessGT(CombType.ELECTROTINE, new Materials[] {Materials.Electrotine}, Voltage.MV); + if (GT_Mod.gregtechproxy.mNerfedCombs) { + addCentrifugeToItemStack( + CombType.SALT, + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Salt, 6), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RockSalt, 6), + ItemList.FR_Wax.get(1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 6) + }, + new int[] {100 * 100, 100 * 100, 50 * 100, 25 * 100}, + Voltage.MV, + 160); + } else { + addCentrifugeToMaterial( + CombType.BAUXITE, + new Materials[] {Materials.Bauxite, Materials.Aluminium}, + new int[] {75 * 100, 55 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.ALUMINIUM, + new Materials[] {Materials.Aluminium, Materials.Bauxite}, + new int[] {60 * 100, 80 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.MANGANESE, + new Materials[] { + Materials.Manganese, + Materials.Grossular, + Materials.Spessartine, + Materials.Pyrolusite, + Materials.Tantalite + }, + new int[] {30 * 100, 100 * 100, 100 * 100, 100 * 100, 100 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.TITANIUM, + new Materials[] {Materials.Titanium, Materials.Ilmenite, Materials.Bauxite, Materials.Rutile}, + new int[] {90 * 100, 80 * 100, 75 * 100, 75 * 100}, + new int[] {}, + Voltage.EV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.MAGNESIUM, + new Materials[] {Materials.Magnesium, Materials.Magnesite}, + new int[] {100 * 100, 80 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.CHROME, + new Materials[] { + Materials.Chrome, + Materials.Ruby, + Materials.Chromite, + Materials.Redstone, + Materials.Neodymium, + Materials.Bastnasite + }, + new int[] {50 * 100, 100 * 100, 50 * 100, 100 * 100, 80 * 100, 80 * 100}, + new int[] {}, + Voltage.HV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.TUNGSTEN, + new Materials[] {Materials.Tungsten, Materials.Tungstate, Materials.Scheelite, Materials.Lithium}, + new int[] {50 * 100, 80 * 100, 75 * 100, 75 * 100}, + new int[] {}, + Voltage.IV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.PLATINUM, + new Materials[] {Materials.Platinum, Materials.Cooperite, Materials.Palladium}, + new int[] {40 * 100, 40 * 100, 40 * 100}, + new int[] {}, + Voltage.HV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.MOLYBDENUM, + new Materials[] { + Materials.Molybdenum, Materials.Molybdenite, Materials.Powellite, Materials.Wulfenite + }, + new int[] {100 * 100, 80 * 100, 75 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.IRIDIUM, + new Materials[] {Materials.Iridium, Materials.Osmium}, + new int[] {20 * 100, 15 * 100}, + new int[] {}, + Voltage.IV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.OSMIUM, + new Materials[] {Materials.Osmium, Materials.Iridium}, + new int[] {25 * 100, 15 * 100}, + new int[] {}, + Voltage.IV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.LITHIUM, + new Materials[] {Materials.Lithium, Materials.Aluminium}, + new int[] {85 * 100, 75 * 100}, + new int[] {}, + Voltage.MV, + NI, + 30 * 100); + addCentrifugeToItemStack( + CombType.SALT, + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Salt, 6), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RockSalt, 6), + ItemList.FR_Wax.get(1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 6) + }, + new int[] {100 * 100, 100 * 100, 50 * 100, 25 * 100}, + Voltage.MV, + 160); + } + + // Radioactive Line + addProcessGT(CombType.ALMANDINE, new Materials[] {Materials.Almandine}, Voltage.LV); + addProcessGT(CombType.URANIUM, new Materials[] {Materials.Uranium}, Voltage.EV); + addProcessGT(CombType.PLUTONIUM, new Materials[] {Materials.Plutonium}, Voltage.EV); + addProcessGT(CombType.NAQUADAH, new Materials[] {Materials.Naquadah}, Voltage.IV); + addProcessGT(CombType.NAQUADRIA, new Materials[] {Materials.Naquadria}, Voltage.LUV); + addProcessGT(CombType.THORIUM, new Materials[] {Materials.Thorium}, Voltage.EV); + addProcessGT(CombType.LUTETIUM, new Materials[] {Materials.Lutetium}, Voltage.IV); + addProcessGT(CombType.AMERICIUM, new Materials[] {Materials.Americium}, Voltage.LUV); + addProcessGT(CombType.NEUTRONIUM, new Materials[] {Materials.Neutronium}, Voltage.UHV); + if (!GT_Mod.gregtechproxy.mNerfedCombs) { + addCentrifugeToMaterial( + CombType.ALMANDINE, + new Materials[] {Materials.Almandine, Materials.Pyrope, Materials.Sapphire, Materials.GreenSapphire + }, + new int[] {90 * 100, 80 * 100, 75 * 100, 75 * 100}, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.URANIUM, + new Materials[] {Materials.Uranium, Materials.Pitchblende, Materials.Uraninite, Materials.Uranium235 + }, + new int[] {50 * 100, 65 * 100, 75 * 100, 50 * 100}, + new int[] {}, + Voltage.EV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.PLUTONIUM, + new Materials[] {Materials.Plutonium, Materials.Uranium235}, + new int[] {10, 5}, + new int[] {}, + Voltage.EV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.NAQUADAH, + new Materials[] {Materials.Naquadah, Materials.NaquadahEnriched, Materials.Naquadria}, + new int[] {10 * 100, 5 * 100, 5 * 100}, + new int[] {}, + Voltage.IV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.NAQUADRIA, + new Materials[] {Materials.Naquadria, Materials.NaquadahEnriched, Materials.Naquadah}, + new int[] {10 * 100, 10 * 100, 15 * 100}, + new int[] {}, + Voltage.LUV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.THORIUM, + new Materials[] {Materials.Thorium, Materials.Uranium, Materials.Coal}, + new int[] {75 * 100, 75 * 100 * 100, 95 * 100}, + new int[] {}, + Voltage.EV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.LUTETIUM, + new Materials[] {Materials.Lutetium, Materials.Thorium}, + new int[] {35 * 100, 55 * 100}, + new int[] {}, + Voltage.IV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.AMERICIUM, + new Materials[] {Materials.Americium, Materials.Lutetium}, + new int[] {25 * 100, 45 * 100}, + new int[] {}, + Voltage.LUV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.NEUTRONIUM, + new Materials[] {Materials.Neutronium, Materials.Americium}, + new int[] {15 * 100, 35 * 100}, + new int[] {}, + Voltage.UHV, + NI, + 30 * 100); } - //Radioactive Line - addProcessGT(CombType.ALMANDINE, new Materials[] {Materials.Almandine}, Voltage.LV); - addProcessGT(CombType.URANIUM, new Materials[] {Materials.Uranium}, Voltage.EV); - addProcessGT(CombType.PLUTONIUM,new Materials[] {Materials.Plutonium}, Voltage.EV); - addProcessGT(CombType.NAQUADAH,new Materials[] {Materials.Naquadah}, Voltage.IV); - addProcessGT(CombType.NAQUADRIA,new Materials[] {Materials.Naquadria}, Voltage.LUV); - addProcessGT(CombType.THORIUM,new Materials[] {Materials.Thorium}, Voltage.EV); - addProcessGT(CombType.LUTETIUM,new Materials[] {Materials.Lutetium}, Voltage.IV); - addProcessGT(CombType.AMERICIUM,new Materials[] {Materials.Americium}, Voltage.LUV); - addProcessGT(CombType.NEUTRONIUM,new Materials[] {Materials.Neutronium}, Voltage.UHV); - if(!GT_Mod.gregtechproxy.mNerfedCombs) { - addCentrifugeToMaterial(CombType.ALMANDINE, new Materials[] {Materials.Almandine, Materials.Pyrope, Materials.Sapphire, Materials.GreenSapphire}, new int[] { 90 * 100, 80 * 100, 75 * 100, 75 * 100}, new int[] {}, Voltage.ULV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.URANIUM, new Materials[] {Materials.Uranium, Materials.Pitchblende, Materials.Uraninite, Materials.Uranium235}, new int[] { 50 * 100, 65 * 100, 75 * 100, 50 * 100}, new int[] {}, Voltage.EV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.PLUTONIUM,new Materials[] {Materials.Plutonium, Materials.Uranium235}, new int[] {10, 5}, new int[] {}, Voltage.EV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.NAQUADAH,new Materials[] {Materials.Naquadah, Materials.NaquadahEnriched, Materials.Naquadria}, new int[] {10 * 100, 5 * 100, 5 * 100}, new int[] {}, Voltage.IV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.NAQUADRIA,new Materials[] {Materials.Naquadria, Materials.NaquadahEnriched, Materials.Naquadah}, new int[] {10 * 100, 10 * 100, 15 * 100}, new int[] {}, Voltage.LUV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.THORIUM,new Materials[] {Materials.Thorium, Materials.Uranium, Materials.Coal}, new int[] {75 * 100, 75 * 100 * 100, 95 * 100}, new int[] {}, Voltage.EV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.LUTETIUM,new Materials[] {Materials.Lutetium, Materials.Thorium}, new int[] {35 * 100, 55 * 100}, new int[] {}, Voltage.IV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.AMERICIUM,new Materials[] {Materials.Americium, Materials.Lutetium}, new int[] {25 * 100, 45 * 100}, new int[] {}, Voltage.LUV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.NEUTRONIUM,new Materials[] {Materials.Neutronium, Materials.Americium}, new int[] {15 * 100, 35 * 100}, new int[] {}, Voltage.UHV, NI, 30 * 100); - } - - // Twilight - addCentrifugeToItemStack(CombType.NAGA, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 4), GT_ModHandler.getModItem(MOD_ID_DC, "item.NagaScaleChip", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.NagaScaleFragment", 1L, 0), ItemList.FR_Wax.get(1)}, new int[]{5 * 100, 33 * 100, 8 * 100, 30 * 100}, Voltage.MV); - addCentrifugeToItemStack(CombType.LICH, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 5), GT_ModHandler.getModItem(MOD_ID_DC, "item.LichBoneChip", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.LichBoneFragment", 1L, 0), ItemList.FR_Wax.get(1)}, new int[]{5 * 100, 33 * 100, 8 * 100, 30 * 100}, Voltage.HV); - addCentrifugeToItemStack(CombType.HYDRA, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 1), GT_ModHandler.getModItem(MOD_ID_DC, "item.FieryBloodDrop", 1L, 0), GT_Bees.drop.getStackForType(DropType.HYDRA), ItemList.FR_Wax.get(1)}, new int[]{5 * 100, 33 * 100, 8 * 100, 30 * 100}, Voltage.HV); - addCentrifugeToItemStack(CombType.URGHAST, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 2), GT_ModHandler.getModItem(MOD_ID_DC, "item.CarminiteChip", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.CarminiteFragment", 1L, 0), ItemList.FR_Wax.get(1)}, new int[]{5 * 100, 33 * 100, 8 * 100, 30 * 100}, Voltage.EV); - addCentrifugeToItemStack(CombType.SNOWQUEEN, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 3), GT_ModHandler.getModItem(MOD_ID_DC, "item.SnowQueenBloodDrop", 1L, 0), GT_Bees.drop.getStackForType(DropType.SNOW_QUEEN), ItemList.FR_Wax.get(1)}, new int[]{5 * 100, 33 * 100, 8 * 100, 30 * 100}, Voltage.EV); - - // HEE - addCentrifugeToItemStack(CombType.ENDDUST, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_Bees.propolis.getStackForType(PropolisType.End), GT_Bees.drop.getStackForType(DropType.ENDERGOO), }, new int[]{20 * 100, 15 * 100, 10 * 100}, Voltage.HV); - addCentrifugeToItemStack(CombType.STARDUST, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_Bees.propolis.getStackForType(PropolisType.Stardust), GT_Bees.drop.getStackForType(DropType.ENDERGOO) }, new int[]{20 * 100, 15 * 100, 10 * 100}, Voltage.HV); - addCentrifugeToItemStack(CombType.ECTOPLASMA, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_Bees.propolis.getStackForType(PropolisType.Ectoplasma), GT_Bees.drop.getStackForType(DropType.ENDERGOO) }, new int[]{25 * 100, 10 * 100, 15 * 100}, Voltage.EV); - addCentrifugeToItemStack(CombType.ARCANESHARD, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_Bees.propolis.getStackForType(PropolisType.Arcaneshard), GT_Bees.drop.getStackForType(DropType.ENDERGOO) }, new int[]{25 * 100, 10 * 100, 15 * 100}, Voltage.EV); - addCentrifugeToItemStack(CombType.DRAGONESSENCE, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_Bees.propolis.getStackForType(PropolisType.Dragonessence), GT_Bees.drop.getStackForType(DropType.ENDERGOO) }, new int[]{30 * 100, (int) (7.5 * 100), 20 * 100}, Voltage.IV); - addCentrifugeToItemStack(CombType.ENDERMAN, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_Bees.propolis.getStackForType(PropolisType.Enderman), GT_Bees.drop.getStackForType(DropType.ENDERGOO) }, new int[]{3000, 750, 2000}, Voltage.IV); - addCentrifugeToItemStack(CombType.SILVERFISH, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_Bees.propolis.getStackForType(PropolisType.Silverfish), GT_Bees.drop.getStackForType(DropType.ENDERGOO), new ItemStack(Items.spawn_egg, 1,60) }, new int[]{25 * 100, 10 * 100, 20 * 100, 15 * 100}, Voltage.EV); - addProcessGT(CombType.ENDIUM,new Materials[] {Materials.HeeEndium}, Voltage.HV); - if(!GT_Mod.gregtechproxy.mNerfedCombs) { - addCentrifugeToMaterial(CombType.ENDIUM,new Materials[] {Materials.HeeEndium}, new int[] {50 * 100}, new int[] {}, Voltage.HV, GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), 20 * 100); - } - addCentrifugeToItemStack(CombType.RUNEI, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.RuneOfPowerFragment", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.RuneOfAgilityFragment", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.RuneOfVigorFragment", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.RuneOfDefenseFragment", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.RuneOfMagicFragment", 1L, 0) }, new int[]{25 * 100, 5 * 100, 5 * 100, 5 * 100, 5 * 100, 5 * 100}, Voltage.IV); - addCentrifugeToItemStack(CombType.RUNEII, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.RuneOfVoidFragment", 1L, 0) }, new int[]{50 * 100, (int) (2.5 * 100)}, Voltage.IV); - addCentrifugeToItemStack(CombType.FIREESSENSE, new ItemStack[] { GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), GT_Bees.propolis.getStackForType(PropolisType.Fireessence), GT_Bees.drop.getStackForType(DropType.ENDERGOO) }, new int[]{30 * 100, (int) (7.5 * 100), 20 * 100}, Voltage.IV); - //Walrus Recipe + // Twilight + addCentrifugeToItemStack( + CombType.NAGA, + new ItemStack[] { + GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 4), + GT_ModHandler.getModItem(MOD_ID_DC, "item.NagaScaleChip", 1L, 0), + GT_ModHandler.getModItem(MOD_ID_DC, "item.NagaScaleFragment", 1L, 0), + ItemList.FR_Wax.get(1) + }, + new int[] {5 * 100, 33 * 100, 8 * 100, 30 * 100}, + Voltage.MV); + addCentrifugeToItemStack( + CombType.LICH, + new ItemStack[] { + GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 5), + GT_ModHandler.getModItem(MOD_ID_DC, "item.LichBoneChip", 1L, 0), + GT_ModHandler.getModItem(MOD_ID_DC, "item.LichBoneFragment", 1L, 0), + ItemList.FR_Wax.get(1) + }, + new int[] {5 * 100, 33 * 100, 8 * 100, 30 * 100}, + Voltage.HV); + addCentrifugeToItemStack( + CombType.HYDRA, + new ItemStack[] { + GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 1), + GT_ModHandler.getModItem(MOD_ID_DC, "item.FieryBloodDrop", 1L, 0), + GT_Bees.drop.getStackForType(DropType.HYDRA), + ItemList.FR_Wax.get(1) + }, + new int[] {5 * 100, 33 * 100, 8 * 100, 30 * 100}, + Voltage.HV); + addCentrifugeToItemStack( + CombType.URGHAST, + new ItemStack[] { + GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 2), + GT_ModHandler.getModItem(MOD_ID_DC, "item.CarminiteChip", 1L, 0), + GT_ModHandler.getModItem(MOD_ID_DC, "item.CarminiteFragment", 1L, 0), + ItemList.FR_Wax.get(1) + }, + new int[] {5 * 100, 33 * 100, 8 * 100, 30 * 100}, + Voltage.EV); + addCentrifugeToItemStack( + CombType.SNOWQUEEN, + new ItemStack[] { + GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 3), + GT_ModHandler.getModItem(MOD_ID_DC, "item.SnowQueenBloodDrop", 1L, 0), + GT_Bees.drop.getStackForType(DropType.SNOW_QUEEN), + ItemList.FR_Wax.get(1) + }, + new int[] {5 * 100, 33 * 100, 8 * 100, 30 * 100}, + Voltage.EV); + + // HEE + addCentrifugeToItemStack( + CombType.ENDDUST, + new ItemStack[] { + GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), + GT_Bees.propolis.getStackForType(PropolisType.End), + GT_Bees.drop.getStackForType(DropType.ENDERGOO), + }, + new int[] {20 * 100, 15 * 100, 10 * 100}, + Voltage.HV); + addCentrifugeToItemStack( + CombType.STARDUST, + new ItemStack[] { + GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), + GT_Bees.propolis.getStackForType(PropolisType.Stardust), + GT_Bees.drop.getStackForType(DropType.ENDERGOO) + }, + new int[] {20 * 100, 15 * 100, 10 * 100}, + Voltage.HV); + addCentrifugeToItemStack( + CombType.ECTOPLASMA, + new ItemStack[] { + GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), + GT_Bees.propolis.getStackForType(PropolisType.Ectoplasma), + GT_Bees.drop.getStackForType(DropType.ENDERGOO) + }, + new int[] {25 * 100, 10 * 100, 15 * 100}, + Voltage.EV); + addCentrifugeToItemStack( + CombType.ARCANESHARD, + new ItemStack[] { + GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), + GT_Bees.propolis.getStackForType(PropolisType.Arcaneshard), + GT_Bees.drop.getStackForType(DropType.ENDERGOO) + }, + new int[] {25 * 100, 10 * 100, 15 * 100}, + Voltage.EV); + addCentrifugeToItemStack( + CombType.DRAGONESSENCE, + new ItemStack[] { + GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), + GT_Bees.propolis.getStackForType(PropolisType.Dragonessence), + GT_Bees.drop.getStackForType(DropType.ENDERGOO) + }, + new int[] {30 * 100, (int) (7.5 * 100), 20 * 100}, + Voltage.IV); + addCentrifugeToItemStack( + CombType.ENDERMAN, + new ItemStack[] { + GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), + GT_Bees.propolis.getStackForType(PropolisType.Enderman), + GT_Bees.drop.getStackForType(DropType.ENDERGOO) + }, + new int[] {3000, 750, 2000}, + Voltage.IV); + addCentrifugeToItemStack( + CombType.SILVERFISH, + new ItemStack[] { + GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), + GT_Bees.propolis.getStackForType(PropolisType.Silverfish), + GT_Bees.drop.getStackForType(DropType.ENDERGOO), + new ItemStack(Items.spawn_egg, 1, 60) + }, + new int[] {25 * 100, 10 * 100, 20 * 100, 15 * 100}, + Voltage.EV); + addProcessGT(CombType.ENDIUM, new Materials[] {Materials.HeeEndium}, Voltage.HV); + if (!GT_Mod.gregtechproxy.mNerfedCombs) { + addCentrifugeToMaterial( + CombType.ENDIUM, + new Materials[] {Materials.HeeEndium}, + new int[] {50 * 100}, + new int[] {}, + Voltage.HV, + GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), + 20 * 100); + } + addCentrifugeToItemStack( + CombType.RUNEI, + new ItemStack[] { + GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), + GT_ModHandler.getModItem(MOD_ID_DC, "item.RuneOfPowerFragment", 1L, 0), + GT_ModHandler.getModItem(MOD_ID_DC, "item.RuneOfAgilityFragment", 1L, 0), + GT_ModHandler.getModItem(MOD_ID_DC, "item.RuneOfVigorFragment", 1L, 0), + GT_ModHandler.getModItem(MOD_ID_DC, "item.RuneOfDefenseFragment", 1L, 0), + GT_ModHandler.getModItem(MOD_ID_DC, "item.RuneOfMagicFragment", 1L, 0) + }, + new int[] {25 * 100, 5 * 100, 5 * 100, 5 * 100, 5 * 100, 5 * 100}, + Voltage.IV); + addCentrifugeToItemStack( + CombType.RUNEII, + new ItemStack[] { + GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), + GT_ModHandler.getModItem(MOD_ID_DC, "item.RuneOfVoidFragment", 1L, 0) + }, + new int[] {50 * 100, (int) (2.5 * 100)}, + Voltage.IV); + addCentrifugeToItemStack( + CombType.FIREESSENSE, + new ItemStack[] { + GT_ModHandler.getModItem("MagicBees", "wax", 1L, 0), + GT_Bees.propolis.getStackForType(PropolisType.Fireessence), + GT_Bees.drop.getStackForType(DropType.ENDERGOO) + }, + new int[] {30 * 100, (int) (7.5 * 100), 20 * 100}, + Voltage.IV); + // Walrus Recipe if (Loader.isModLoaded("extracells")) { - addCentrifugeToItemStack(CombType.WALRUS, new ItemStack[] {GT_ModHandler.getModItem("extracells", "walrus", 1L, 0) }, new int[] { 100 * 100}, Voltage.LV); + addCentrifugeToItemStack( + CombType.WALRUS, + new ItemStack[] {GT_ModHandler.getModItem("extracells", "walrus", 1L, 0)}, + new int[] {100 * 100}, + Voltage.LV); } - //Space Line - addCentrifugeToItemStack(CombType.SPACE, new ItemStack[] { ItemList.FR_Wax.get(1L), ItemList.FR_RefractoryWax.get(1L), GT_Bees.drop.getStackForType(DropType.OXYGEN), GT_ModHandler.getModItem(MOD_ID_DC, "item.CoinSpace", 1L, 0)}, new int[]{50 * 100, 30 * 100, 15 * 100, 5 * 100}, Voltage.HV); - addProcessGT(CombType.METEORICIRON, new Materials[] {Materials.MeteoricIron}, Voltage.HV); - addProcessGT(CombType.DESH, new Materials[] {Materials.Desh}, Voltage.EV); - addProcessGT(CombType.LEDOX, new Materials[] {Materials.Ledox}, Voltage.EV); - addProcessGT(CombType.CALLISTOICE, new Materials[] {Materials.CallistoIce}, Voltage.IV); - addProcessGT(CombType.MYTRYL, new Materials[] {Materials.Mytryl}, Voltage.IV); - addProcessGT(CombType.QUANTIUM, new Materials[] {Materials.Quantium}, Voltage.IV); - addProcessGT(CombType.ORIHARUKON, new Materials[] {Materials.Oriharukon}, Voltage.IV); - addProcessGT(CombType.MYSTERIOUSCRYSTAL, new Materials[] {Materials.MysteriousCrystal}, Voltage.LUV); - addCentrifugeToMaterial(CombType.MYSTERIOUSCRYSTAL, new Materials[] {Materials.MysteriousCrystal}, new int[] {(GT_Mod.gregtechproxy.mNerfedCombs ? 10 : 40) * 100, (GT_Mod.gregtechproxy.mNerfedCombs ? 15 : 50) * 100}, new int[] {}, Voltage.LUV, 512, NI, 50 * 100); - addProcessGT(CombType.BLACKPLUTONIUM, new Materials[] {Materials.BlackPlutonium}, Voltage.LUV); - addProcessGT(CombType.TRINIUM, new Materials[] {Materials.Trinium}, Voltage.ZPM); - if(!GT_Mod.gregtechproxy.mNerfedCombs) { - addCentrifugeToMaterial(CombType.METEORICIRON, new Materials[] {Materials.MeteoricIron, Materials.Iron}, new int[] {85 * 100, 100 * 100}, new int[] {}, Voltage.HV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.DESH, new Materials[] {Materials.Desh, Materials.Titanium}, new int[] {75 * 100, 50 * 100}, new int[] {}, Voltage.EV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.LEDOX, new Materials[] {Materials.Ledox, Materials.CallistoIce, Materials.Lead}, new int[] {65 * 100, 55 * 100, 85 *100}, new int[] {}, Voltage.EV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.CALLISTOICE, new Materials[] {Materials.CallistoIce, Materials.Ledox, Materials.Lead}, new int[] {65 * 100, 75 * 100, 100 *100}, new int[] {}, Voltage.IV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.MYTRYL, new Materials[] {Materials.Mytryl, Materials.Mithril}, new int[] {55 * 100, 50 * 100}, new int[] {}, Voltage.IV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.QUANTIUM, new Materials[] {Materials.Quantium, Materials.Osmium}, new int[] {50 * 100, 60 * 100}, new int[] {}, Voltage.IV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.ORIHARUKON, new Materials[] {Materials.Oriharukon, Materials.Lead}, new int[] {50 * 100, 75 * 100}, new int[] {}, Voltage.IV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.BLACKPLUTONIUM, new Materials[] {Materials.BlackPlutonium, Materials.Plutonium}, new int[] {25 * 100, 50 * 100}, new int[] {}, Voltage.LUV, NI, 30 * 100); - addCentrifugeToMaterial(CombType.TRINIUM, new Materials[] {Materials.Trinium, Materials.Iridium}, new int[] {35 * 100, 45 * 100}, new int[] {}, Voltage.ZPM, NI, 30 * 100); - } - - //Planet Line - addCentrifugeToItemStack(CombType.MOON, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.MoonStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100 }, Voltage.MV, 300); - addCentrifugeToItemStack(CombType.MARS, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.MarsStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100 }, Voltage.HV, 300); - addCentrifugeToItemStack(CombType.JUPITER, new ItemStack[] { GT_ModHandler.getModItem(MOD_ID_DC, "item.IoStoneDust", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.EuropaIceDust", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.EuropaStoneDust", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.GanymedeStoneDust", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.CallistoStoneDust", 1L, 0), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.CallistoIce, 1L), ItemList.FR_Wax.get(1L)}, new int[]{30 * 100, 30 * 100, 30 * 100, 30 * 100, 30 * 100, 5 * 100, 50 * 100 }, Voltage.HV, 300); - addCentrifugeToItemStack(CombType.MERCURY, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.MercuryCoreDust", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.MercuryStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100, 30 * 100 }, Voltage.EV, 300); - addCentrifugeToItemStack(CombType.VENUS, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.VenusStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100 }, Voltage.EV, 300); - addCentrifugeToItemStack(CombType.SATURN, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.EnceladusStoneDust", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.TitanStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100, 30 * 100 }, Voltage.IV, 300); - addCentrifugeToItemStack(CombType.URANUS, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.MirandaStoneDust", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.OberonStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100, 30 * 100 }, Voltage.IV, 300); - addCentrifugeToItemStack(CombType.NEPTUN, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.ProteusStoneDust", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.TritonStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100, 30 * 100 }, Voltage.IV, 300); - addCentrifugeToItemStack(CombType.PLUTO, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.PlutoStoneDust", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.PlutoIceDust", 1L, 0)}, new int[]{50 * 100, 30 * 100, 30 * 100 }, Voltage.LUV, 300); - addCentrifugeToItemStack(CombType.HAUMEA, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.HaumeaStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100 }, Voltage.LUV, 300); - addCentrifugeToItemStack(CombType.MAKEMAKE, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.MakeMakeStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100 }, Voltage.LUV, 300); - addCentrifugeToItemStack(CombType.CENTAURI, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.CentauriASurfaceDust", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.CentauriAStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100, 30 * 100 }, Voltage.ZPM, 300); - addCentrifugeToItemStack(CombType.TCETI, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.TCetiEStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100 }, Voltage.ZPM, 300); - addCentrifugeToItemStack(CombType.BARNARDA, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.BarnardaEStoneDust", 1L, 0), GT_ModHandler.getModItem(MOD_ID_DC, "item.BarnardaFStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100, 30 * 100 }, Voltage.ZPM, 300); - addCentrifugeToItemStack(CombType.VEGA, new ItemStack[] {ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.VegaBStoneDust", 1L, 0)}, new int[]{50 * 100, 30 * 100 }, Voltage.ZPM, 300); + // Space Line + addCentrifugeToItemStack( + CombType.SPACE, + new ItemStack[] { + ItemList.FR_Wax.get(1L), + ItemList.FR_RefractoryWax.get(1L), + GT_Bees.drop.getStackForType(DropType.OXYGEN), + GT_ModHandler.getModItem(MOD_ID_DC, "item.CoinSpace", 1L, 0) + }, + new int[] {50 * 100, 30 * 100, 15 * 100, 5 * 100}, + Voltage.HV); + addProcessGT(CombType.METEORICIRON, new Materials[] {Materials.MeteoricIron}, Voltage.HV); + addProcessGT(CombType.DESH, new Materials[] {Materials.Desh}, Voltage.EV); + addProcessGT(CombType.LEDOX, new Materials[] {Materials.Ledox}, Voltage.EV); + addProcessGT(CombType.CALLISTOICE, new Materials[] {Materials.CallistoIce}, Voltage.IV); + addProcessGT(CombType.MYTRYL, new Materials[] {Materials.Mytryl}, Voltage.IV); + addProcessGT(CombType.QUANTIUM, new Materials[] {Materials.Quantium}, Voltage.IV); + addProcessGT(CombType.ORIHARUKON, new Materials[] {Materials.Oriharukon}, Voltage.IV); + addProcessGT(CombType.MYSTERIOUSCRYSTAL, new Materials[] {Materials.MysteriousCrystal}, Voltage.LUV); + addCentrifugeToMaterial( + CombType.MYSTERIOUSCRYSTAL, + new Materials[] {Materials.MysteriousCrystal}, + new int[] { + (GT_Mod.gregtechproxy.mNerfedCombs ? 10 : 40) * 100, + (GT_Mod.gregtechproxy.mNerfedCombs ? 15 : 50) * 100 + }, + new int[] {}, + Voltage.LUV, + 512, + NI, + 50 * 100); + addProcessGT(CombType.BLACKPLUTONIUM, new Materials[] {Materials.BlackPlutonium}, Voltage.LUV); + addProcessGT(CombType.TRINIUM, new Materials[] {Materials.Trinium}, Voltage.ZPM); + if (!GT_Mod.gregtechproxy.mNerfedCombs) { + addCentrifugeToMaterial( + CombType.METEORICIRON, + new Materials[] {Materials.MeteoricIron, Materials.Iron}, + new int[] {85 * 100, 100 * 100}, + new int[] {}, + Voltage.HV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.DESH, + new Materials[] {Materials.Desh, Materials.Titanium}, + new int[] {75 * 100, 50 * 100}, + new int[] {}, + Voltage.EV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.LEDOX, + new Materials[] {Materials.Ledox, Materials.CallistoIce, Materials.Lead}, + new int[] {65 * 100, 55 * 100, 85 * 100}, + new int[] {}, + Voltage.EV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.CALLISTOICE, + new Materials[] {Materials.CallistoIce, Materials.Ledox, Materials.Lead}, + new int[] {65 * 100, 75 * 100, 100 * 100}, + new int[] {}, + Voltage.IV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.MYTRYL, + new Materials[] {Materials.Mytryl, Materials.Mithril}, + new int[] {55 * 100, 50 * 100}, + new int[] {}, + Voltage.IV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.QUANTIUM, + new Materials[] {Materials.Quantium, Materials.Osmium}, + new int[] {50 * 100, 60 * 100}, + new int[] {}, + Voltage.IV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.ORIHARUKON, + new Materials[] {Materials.Oriharukon, Materials.Lead}, + new int[] {50 * 100, 75 * 100}, + new int[] {}, + Voltage.IV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.BLACKPLUTONIUM, + new Materials[] {Materials.BlackPlutonium, Materials.Plutonium}, + new int[] {25 * 100, 50 * 100}, + new int[] {}, + Voltage.LUV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.TRINIUM, + new Materials[] {Materials.Trinium, Materials.Iridium}, + new int[] {35 * 100, 45 * 100}, + new int[] {}, + Voltage.ZPM, + NI, + 30 * 100); + } + + // Planet Line + addCentrifugeToItemStack( + CombType.MOON, + new ItemStack[] { + ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.MoonStoneDust", 1L, 0) + }, + new int[] {50 * 100, 30 * 100}, + Voltage.MV, + 300); + addCentrifugeToItemStack( + CombType.MARS, + new ItemStack[] { + ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.MarsStoneDust", 1L, 0) + }, + new int[] {50 * 100, 30 * 100}, + Voltage.HV, + 300); + addCentrifugeToItemStack( + CombType.JUPITER, + new ItemStack[] { + GT_ModHandler.getModItem(MOD_ID_DC, "item.IoStoneDust", 1L, 0), + GT_ModHandler.getModItem(MOD_ID_DC, "item.EuropaIceDust", 1L, 0), + GT_ModHandler.getModItem(MOD_ID_DC, "item.EuropaStoneDust", 1L, 0), + GT_ModHandler.getModItem(MOD_ID_DC, "item.GanymedeStoneDust", 1L, 0), + GT_ModHandler.getModItem(MOD_ID_DC, "item.CallistoStoneDust", 1L, 0), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.CallistoIce, 1L), + ItemList.FR_Wax.get(1L) + }, + new int[] {30 * 100, 30 * 100, 30 * 100, 30 * 100, 30 * 100, 5 * 100, 50 * 100}, + Voltage.HV, + 300); + addCentrifugeToItemStack( + CombType.MERCURY, + new ItemStack[] { + ItemList.FR_Wax.get(1L), + GT_ModHandler.getModItem(MOD_ID_DC, "item.MercuryCoreDust", 1L, 0), + GT_ModHandler.getModItem(MOD_ID_DC, "item.MercuryStoneDust", 1L, 0) + }, + new int[] {50 * 100, 30 * 100, 30 * 100}, + Voltage.EV, + 300); + addCentrifugeToItemStack( + CombType.VENUS, + new ItemStack[] { + ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.VenusStoneDust", 1L, 0) + }, + new int[] {50 * 100, 30 * 100}, + Voltage.EV, + 300); + addCentrifugeToItemStack( + CombType.SATURN, + new ItemStack[] { + ItemList.FR_Wax.get(1L), + GT_ModHandler.getModItem(MOD_ID_DC, "item.EnceladusStoneDust", 1L, 0), + GT_ModHandler.getModItem(MOD_ID_DC, "item.TitanStoneDust", 1L, 0) + }, + new int[] {50 * 100, 30 * 100, 30 * 100}, + Voltage.IV, + 300); + addCentrifugeToItemStack( + CombType.URANUS, + new ItemStack[] { + ItemList.FR_Wax.get(1L), + GT_ModHandler.getModItem(MOD_ID_DC, "item.MirandaStoneDust", 1L, 0), + GT_ModHandler.getModItem(MOD_ID_DC, "item.OberonStoneDust", 1L, 0) + }, + new int[] {50 * 100, 30 * 100, 30 * 100}, + Voltage.IV, + 300); + addCentrifugeToItemStack( + CombType.NEPTUN, + new ItemStack[] { + ItemList.FR_Wax.get(1L), + GT_ModHandler.getModItem(MOD_ID_DC, "item.ProteusStoneDust", 1L, 0), + GT_ModHandler.getModItem(MOD_ID_DC, "item.TritonStoneDust", 1L, 0) + }, + new int[] {50 * 100, 30 * 100, 30 * 100}, + Voltage.IV, + 300); + addCentrifugeToItemStack( + CombType.PLUTO, + new ItemStack[] { + ItemList.FR_Wax.get(1L), + GT_ModHandler.getModItem(MOD_ID_DC, "item.PlutoStoneDust", 1L, 0), + GT_ModHandler.getModItem(MOD_ID_DC, "item.PlutoIceDust", 1L, 0) + }, + new int[] {50 * 100, 30 * 100, 30 * 100}, + Voltage.LUV, + 300); + addCentrifugeToItemStack( + CombType.HAUMEA, + new ItemStack[] { + ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.HaumeaStoneDust", 1L, 0) + }, + new int[] {50 * 100, 30 * 100}, + Voltage.LUV, + 300); + addCentrifugeToItemStack( + CombType.MAKEMAKE, + new ItemStack[] { + ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.MakeMakeStoneDust", 1L, 0) + }, + new int[] {50 * 100, 30 * 100}, + Voltage.LUV, + 300); + addCentrifugeToItemStack( + CombType.CENTAURI, + new ItemStack[] { + ItemList.FR_Wax.get(1L), + GT_ModHandler.getModItem(MOD_ID_DC, "item.CentauriASurfaceDust", 1L, 0), + GT_ModHandler.getModItem(MOD_ID_DC, "item.CentauriAStoneDust", 1L, 0) + }, + new int[] {50 * 100, 30 * 100, 30 * 100}, + Voltage.ZPM, + 300); + addCentrifugeToItemStack( + CombType.TCETI, + new ItemStack[] { + ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.TCetiEStoneDust", 1L, 0) + }, + new int[] {50 * 100, 30 * 100}, + Voltage.ZPM, + 300); + addCentrifugeToItemStack( + CombType.BARNARDA, + new ItemStack[] { + ItemList.FR_Wax.get(1L), + GT_ModHandler.getModItem(MOD_ID_DC, "item.BarnardaEStoneDust", 1L, 0), + GT_ModHandler.getModItem(MOD_ID_DC, "item.BarnardaFStoneDust", 1L, 0) + }, + new int[] {50 * 100, 30 * 100, 30 * 100}, + Voltage.ZPM, + 300); + addCentrifugeToItemStack( + CombType.VEGA, + new ItemStack[] { + ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.VegaBStoneDust", 1L, 0) + }, + new int[] {50 * 100, 30 * 100}, + Voltage.ZPM, + 300); if (Loader.isModLoaded("GalaxySpace")) { - addCentrifugeToItemStack(CombType.SEAWEED, new ItemStack[]{ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("GalaxySpace", "tcetiedandelions", 1L, 0)}, new int[]{50 * 100, 100 * 100}, Voltage.UV, 100); + addCentrifugeToItemStack( + CombType.SEAWEED, + new ItemStack[] { + ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("GalaxySpace", "tcetiedandelions", 1L, 0) + }, + new int[] {50 * 100, 100 * 100}, + Voltage.UV, + 100); } - //Infinity Line - addCentrifugeToMaterial(CombType.COSMICNEUTRONIUM, new Materials[] {Materials.CosmicNeutronium, Materials.Neutronium}, new int[] {(int) (15 * 100), 1 * 100}, new int[] {}, Voltage.UHV, 1200, NI, 50 * 100); - addCentrifugeToMaterial(CombType.INFINITYCATALYST, new Materials[] {Materials.InfinityCatalyst, Materials.Neutronium}, new int[] {(int) (25 * 100), 20 * 100}, new int[] {}, Voltage.ZPM, 100, NI, 50 * 100); - addCentrifugeToMaterial(CombType.INFINITY, new Materials[] {Materials.Infinity, Materials.InfinityCatalyst}, new int[] {(int) (20 * 100), (int) (0.05 * 100)}, new int[] {}, Voltage.UV, 1000, NI, 50 * 100); + // Infinity Line + addCentrifugeToMaterial( + CombType.COSMICNEUTRONIUM, + new Materials[] {Materials.CosmicNeutronium, Materials.Neutronium}, + new int[] {(int) (15 * 100), 1 * 100}, + new int[] {}, + Voltage.UHV, + 1200, + NI, + 50 * 100); + addCentrifugeToMaterial( + CombType.INFINITYCATALYST, + new Materials[] {Materials.InfinityCatalyst, Materials.Neutronium}, + new int[] {(int) (25 * 100), 20 * 100}, + new int[] {}, + Voltage.ZPM, + 100, + NI, + 50 * 100); + addCentrifugeToMaterial( + CombType.INFINITY, + new Materials[] {Materials.Infinity, Materials.InfinityCatalyst}, + new int[] {(int) (20 * 100), (int) (0.05 * 100)}, + new int[] {}, + Voltage.UV, + 1000, + NI, + 50 * 100); - //(Noble)gas Line + // (Noble)gas Line addFluidExtractorProcess(CombType.HELIUM, Materials.Helium.getGas(250), Voltage.HV); addFluidExtractorProcess(CombType.ARGON, Materials.Argon.getGas(250), Voltage.MV); addFluidExtractorProcess(CombType.NITROGEN, Materials.Nitrogen.getGas(250), Voltage.MV); addFluidExtractorProcess(CombType.HYDROGEN, Materials.Hydrogen.getGas(250), Voltage.MV); addFluidExtractorProcess(CombType.FLUORINE, Materials.Fluorine.getGas(250), Voltage.MV); addFluidExtractorProcess(CombType.OXYGEN, Materials.Oxygen.getGas(250), Voltage.MV); - //Organic part 2, unknown liquid - //yes, unknowwater. Its not my typo, its how it is spelled. Stupid game. + // Organic part 2, unknown liquid + // yes, unknowwater. Its not my typo, its how it is spelled. Stupid game. addFluidExtractorProcess(CombType.UNKNOWNWATER, FluidRegistry.getFluidStack("unknowwater", 250), Voltage.ZPM); /** * The Centrifuge Recipes for Infused Shards and Nether/End-Shard from the Infused Shard Line are below the NobleGas * Lines for Xenon and co. in Gt_MachineRecipeLoader.java In Lines 1525 * **/ + } - - + /** + * Currently only used for CombType.MOLYBDENUM + * @param circuitNumber should not conflict with addProcessGT + * + * **/ + public void addAutoclaveProcess(CombType comb, Materials aMaterial, Voltage volt, int circuitNumber) { + if (GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4) == NI) return; + RA.addAutoclaveRecipe( + GT_Utility.copyAmount(9, getStackForType(comb)), + GT_Utility.getIntegratedCircuit(circuitNumber), + Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass() + volt.getUUAmplifier()) / 10))), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), + 10000, + (int) (aMaterial.getMass() * 128), + volt.getAutoClaveEnergy(), + volt.compareTo(Voltage.HV) > 0); } - /** - * Currently only used for CombType.MOLYBDENUM - * @param circuitNumber should not conflict with addProcessGT - * - * **/ - public void addAutoclaveProcess(CombType comb, Materials aMaterial, Voltage volt, int circuitNumber){ - if(GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4) == NI) return; - RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, getStackForType(comb)), GT_Utility.getIntegratedCircuit(circuitNumber), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass()+volt.getUUAmplifier())/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), 10000, (int) (aMaterial.getMass() * 128), volt.getAutoClaveEnergy(), volt.compareTo(Voltage.HV) > 0); - } - - public void addFluidExtractorProcess(CombType comb, FluidStack fluid, Voltage volt){ - if(fluid == null) - return; - RA.addFluidExtractionRecipe(GT_Utility.copyAmount(1, getStackForType(comb)), null, fluid, 100 * 100, (fluid.getFluid().getDensity() * 128 > 0 ? (int) (fluid.getFluid().getDensity() * 100) : 128), volt.getSimpleEnergy()/2); + public void addFluidExtractorProcess(CombType comb, FluidStack fluid, Voltage volt) { + if (fluid == null) return; + RA.addFluidExtractionRecipe( + GT_Utility.copyAmount(1, getStackForType(comb)), + null, + fluid, + 100 * 100, + (fluid.getFluid().getDensity() * 128 > 0 + ? (int) (fluid.getFluid().getDensity() * 100) + : 128), + volt.getSimpleEnergy() / 2); } - /** - * this only adds Chemical and AutoClave process. - * If you need Centrifuge recipe. use addCentrifugeToMaterial or addCentrifugeToItemStack - * @param volt This determine the required Tier of process for this recipes. This decide the required aEU/t, progress time, required additional UU-Matter, requirement of cleanRoom, needed fluid stack for Chemical. - * @param aMaterial result of Material that should be generated by this process. - * **/ - public void addProcessGT(CombType comb, Materials[] aMaterial, Voltage volt) { - ItemStack tComb = getStackForType(comb); - for(int i=0; i < aMaterial.length; i++) { - if(GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial[i], 4)!= NI) { - switch(comb) { + /** + * this only adds Chemical and AutoClave process. + * If you need Centrifuge recipe. use addCentrifugeToMaterial or addCentrifugeToItemStack + * @param volt This determine the required Tier of process for this recipes. This decide the required aEU/t, progress time, required additional UU-Matter, requirement of cleanRoom, needed fluid stack for Chemical. + * @param aMaterial result of Material that should be generated by this process. + * **/ + public void addProcessGT(CombType comb, Materials[] aMaterial, Voltage volt) { + ItemStack tComb = getStackForType(comb); + for (int i = 0; i < aMaterial.length; i++) { + if (GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial[i], 4) != NI) { + switch (comb) { case NEUTRONIUM: - RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(i+1), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial[i].getMass()+volt.getUUAmplifier())/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial[i], 4), 10000, (int) (aMaterial[i].getMass() * 128), volt.getAutoClaveEnergy(), volt.compareTo(Voltage.HV) > 0); - RA.addChemicalRecipe(GT_Utility.copyAmount(4, tComb), null, volt.getFluidAccordingToCombTier(), Materials.Neutronium.getMolten(576l), Materials.Neutronium.getNuggets(1), NI, volt.getComplexTime()*17, volt.getChemicalEnergy(), volt.compareTo(Voltage.IV) > 0); + RA.addAutoclaveRecipe( + GT_Utility.copyAmount(9, tComb), + GT_Utility.getIntegratedCircuit(i + 1), + Materials.UUMatter.getFluid( + Math.max(1, ((aMaterial[i].getMass() + volt.getUUAmplifier()) / 10))), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial[i], 4), + 10000, + (int) (aMaterial[i].getMass() * 128), + volt.getAutoClaveEnergy(), + volt.compareTo(Voltage.HV) > 0); + RA.addChemicalRecipe( + GT_Utility.copyAmount(4, tComb), + null, + volt.getFluidAccordingToCombTier(), + Materials.Neutronium.getMolten(576l), + Materials.Neutronium.getNuggets(1), + NI, + volt.getComplexTime() * 17, + volt.getChemicalEnergy(), + volt.compareTo(Voltage.IV) > 0); case OSMIUM: - RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(i+1), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial[i].getMass()+volt.getUUAmplifier())/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial[i], 4), 10000, (int) (aMaterial[i].getMass() * 128), volt.getAutoClaveEnergy(), volt.compareTo(Voltage.HV) > 0); - RA.addChemicalRecipe(GT_Utility.copyAmount(4, tComb), null, volt.getFluidAccordingToCombTier(), Materials.Osmium.getMolten(288l), Materials.Osmium.getNuggets(1), NI, volt.getComplexTime()*17, volt.getChemicalEnergy(), volt.compareTo(Voltage.IV) > 0); + RA.addAutoclaveRecipe( + GT_Utility.copyAmount(9, tComb), + GT_Utility.getIntegratedCircuit(i + 1), + Materials.UUMatter.getFluid( + Math.max(1, ((aMaterial[i].getMass() + volt.getUUAmplifier()) / 10))), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial[i], 4), + 10000, + (int) (aMaterial[i].getMass() * 128), + volt.getAutoClaveEnergy(), + volt.compareTo(Voltage.HV) > 0); + RA.addChemicalRecipe( + GT_Utility.copyAmount(4, tComb), + null, + volt.getFluidAccordingToCombTier(), + Materials.Osmium.getMolten(288l), + Materials.Osmium.getNuggets(1), + NI, + volt.getComplexTime() * 17, + volt.getChemicalEnergy(), + volt.compareTo(Voltage.IV) > 0); case PLATINUM: - RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(i+1), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial[i].getMass()+volt.getUUAmplifier())/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial[i], 4), 10000, (int) (aMaterial[i].getMass() * 128), volt.getAutoClaveEnergy(), volt.compareTo(Voltage.HV) > 0); - RA.addChemicalRecipe(GT_Utility.copyAmount(4, tComb), null, volt.getFluidAccordingToCombTier(), Materials.Platinum.getMolten(288l), Materials.Platinum.getNuggets(1), NI, volt.getComplexTime()*10, volt.getChemicalEnergy(), volt.compareTo(Voltage.HV) > 0); + RA.addAutoclaveRecipe( + GT_Utility.copyAmount(9, tComb), + GT_Utility.getIntegratedCircuit(i + 1), + Materials.UUMatter.getFluid( + Math.max(1, ((aMaterial[i].getMass() + volt.getUUAmplifier()) / 10))), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial[i], 4), + 10000, + (int) (aMaterial[i].getMass() * 128), + volt.getAutoClaveEnergy(), + volt.compareTo(Voltage.HV) > 0); + RA.addChemicalRecipe( + GT_Utility.copyAmount(4, tComb), + null, + volt.getFluidAccordingToCombTier(), + Materials.Platinum.getMolten(288l), + Materials.Platinum.getNuggets(1), + NI, + volt.getComplexTime() * 10, + volt.getChemicalEnergy(), + volt.compareTo(Voltage.HV) > 0); case IRIDIUM: - RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(i+1), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial[i].getMass()+volt.getUUAmplifier())/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial[i], 4), 10000, (int) (aMaterial[i].getMass() * 128), volt.getAutoClaveEnergy(), volt.compareTo(Voltage.HV) > 0); - RA.addChemicalRecipe(GT_Utility.copyAmount(4, tComb), null, volt.getFluidAccordingToCombTier(), Materials.Iridium.getMolten(288l), Materials.Iridium.getNuggets(1), NI, volt.getComplexTime()*14, volt.getChemicalEnergy(), volt.compareTo(Voltage.EV) > 0); + RA.addAutoclaveRecipe( + GT_Utility.copyAmount(9, tComb), + GT_Utility.getIntegratedCircuit(i + 1), + Materials.UUMatter.getFluid( + Math.max(1, ((aMaterial[i].getMass() + volt.getUUAmplifier()) / 10))), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial[i], 4), + 10000, + (int) (aMaterial[i].getMass() * 128), + volt.getAutoClaveEnergy(), + volt.compareTo(Voltage.HV) > 0); + RA.addChemicalRecipe( + GT_Utility.copyAmount(4, tComb), + null, + volt.getFluidAccordingToCombTier(), + Materials.Iridium.getMolten(288l), + Materials.Iridium.getNuggets(1), + NI, + volt.getComplexTime() * 14, + volt.getChemicalEnergy(), + volt.compareTo(Voltage.EV) > 0); default: - RA.addChemicalRecipe(GT_Utility.copyAmount(4, tComb),null, volt.getFluidAccordingToCombTier(), null, GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial[i], 4), NI, volt.getComplexTime(), volt.getChemicalEnergy(), volt.compareTo(Voltage.IV) > 0); - RA.addAutoclaveRecipe(GT_Utility.copyAmount(9, tComb), GT_Utility.getIntegratedCircuit(i+1), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial[i].getMass()+volt.getUUAmplifier())/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial[i], 4), 10000, (int) (aMaterial[i].getMass() * 128), volt.getAutoClaveEnergy(), volt.compareTo(Voltage.HV) > 0); + RA.addChemicalRecipe( + GT_Utility.copyAmount(4, tComb), + null, + volt.getFluidAccordingToCombTier(), + null, + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial[i], 4), + NI, + volt.getComplexTime(), + volt.getChemicalEnergy(), + volt.compareTo(Voltage.IV) > 0); + RA.addAutoclaveRecipe( + GT_Utility.copyAmount(9, tComb), + GT_Utility.getIntegratedCircuit(i + 1), + Materials.UUMatter.getFluid( + Math.max(1, ((aMaterial[i].getMass() + volt.getUUAmplifier()) / 10))), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial[i], 4), + 10000, + (int) (aMaterial[i].getMass() * 128), + volt.getAutoClaveEnergy(), + volt.compareTo(Voltage.HV) > 0); break; - }} - } - } - - /** - * this method only adds Centrifuge based on Material. If volt is lower than MV than it will also adds forestry centrifuge recipe. - * @param comb BeeComb - * @param aMaterial resulting Material of processing. can be more than 6. but over 6 will be ignored in Gregtech Centrifuge. - * @param chance chance to get result, 10000 == 100% - * @param volt required Voltage Tier for this recipe, this also affect the duration, amount of UU-Matter, and needed liquid type and amount for chemical reactor - * @param stackSize This parameter can be null, in that case stack size will be just 1. This handle the stackSize of the resulting Item, and Also the Type of Item. if this value is multiple of 9, than related Material output will be dust, if this value is multiple of 4 than output will be Small dust, else the output will be Tiny dust - * @param beeWax if this is null, then the comb will product default Bee wax. But if aMaterial is more than 5, beeWax will be ignored in Gregtech Centrifuge. - * @param waxChance have same format like "chance" - **/ - public void addCentrifugeToMaterial(CombType comb, Materials[] aMaterial, int[] chance, int[] stackSize, Voltage volt, ItemStack beeWax, int waxChance) { - addCentrifugeToMaterial(comb, aMaterial, chance, stackSize, volt, volt.getSimpleTime(), beeWax, waxChance); - } - public void addCentrifugeToMaterial(CombType comb, Materials[] aMaterial, int[] chance, int[] stackSize, Voltage volt, int duration, ItemStack beeWax, int waxChance) { - ItemStack[] aOutPut = new ItemStack[aMaterial.length+1]; - stackSize = Arrays.copyOf(stackSize, aMaterial.length); - chance = Arrays.copyOf(chance, aOutPut.length); - chance[chance.length - 1] = waxChance; - for(int i = 0; i < (aMaterial.length); i++) { - if(chance[i] == 0) { - continue; - } - if(Math.max(1, stackSize[i]) % 9 == 0) { - aOutPut[i] = GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial[i], (Math.max(1, stackSize[i])/9) ); - }else if(Math.max(1, stackSize[i]) % 4 == 0) { - aOutPut[i] = GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial[i], (Math.max(1, stackSize[i])/4) ); - }else { - aOutPut[i] = GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial[i], Math.max(1, stackSize[i])); - } - } - if(beeWax != NI) { - aOutPut[aOutPut.length - 1] = beeWax; - }else { - aOutPut[aOutPut.length - 1] = ItemList.FR_Wax.get(1); - } - - addCentrifugeToItemStack(comb, aOutPut, chance, volt, duration); - } - - /** - * @param volt required Tier of system. If it's lower than MV, it will also add forestry centrifuge. - * @param aItem can be more than 6. but Over 6 will be ignored in Gregtech Centrifuge. - **/ - public void addCentrifugeToItemStack(CombType comb, ItemStack[] aItem, int[] chance, Voltage volt) { - addCentrifugeToItemStack(comb, aItem, chance, volt, volt.getSimpleTime()); - } - public void addCentrifugeToItemStack(CombType comb, ItemStack[] aItem, int[] chance, Voltage volt, int duration) { - ItemStack tComb = getStackForType(comb); - Builder<ItemStack,Float> Product = new ImmutableMap.Builder<ItemStack, Float>(); - for(int i=0; i < aItem.length; i++) { - if(aItem[i] == NI) { continue; } - Product.put(aItem[i],chance[i]/10000.0f); - } - - if(volt.compareTo(Voltage.MV) < 0 || !GT_Mod.gregtechproxy.mNerfedCombs) { - RecipeManagers.centrifugeManager.addRecipe(40, tComb, Product.build()); - } - - aItem = Arrays.copyOf(aItem, 6); - if(aItem.length > 6) { - chance = Arrays.copyOf(chance, 6); - } - - RA.addCentrifugeRecipe(tComb, NI, NF, NF, aItem[0], aItem[1], aItem[2], aItem[3], aItem[4], aItem[5], chance, duration, volt.getSimpleEnergy()); - } - - enum Voltage { - ULV, LV, MV, - HV, EV, IV, - LUV, ZPM, UV, - UHV, UEV, UIV, - UMV, UXV, MAX; - public int getVoltage() { - return (int) V[this.ordinal()]; - } - /**@return aEU/t needed for chemical and autoclave process related to the Tier**/ - public int getVoltageFromEU() { return (int) Math.max(Math.floor(Math.log(2*this.getVoltage())/Math.log(4)-1), 0); } + } + } + } + } + + /** + * this method only adds Centrifuge based on Material. If volt is lower than MV than it will also adds forestry centrifuge recipe. + * @param comb BeeComb + * @param aMaterial resulting Material of processing. can be more than 6. but over 6 will be ignored in Gregtech Centrifuge. + * @param chance chance to get result, 10000 == 100% + * @param volt required Voltage Tier for this recipe, this also affect the duration, amount of UU-Matter, and needed liquid type and amount for chemical reactor + * @param stackSize This parameter can be null, in that case stack size will be just 1. This handle the stackSize of the resulting Item, and Also the Type of Item. if this value is multiple of 9, than related Material output will be dust, if this value is multiple of 4 than output will be Small dust, else the output will be Tiny dust + * @param beeWax if this is null, then the comb will product default Bee wax. But if aMaterial is more than 5, beeWax will be ignored in Gregtech Centrifuge. + * @param waxChance have same format like "chance" + **/ + public void addCentrifugeToMaterial( + CombType comb, + Materials[] aMaterial, + int[] chance, + int[] stackSize, + Voltage volt, + ItemStack beeWax, + int waxChance) { + addCentrifugeToMaterial(comb, aMaterial, chance, stackSize, volt, volt.getSimpleTime(), beeWax, waxChance); + } + + public void addCentrifugeToMaterial( + CombType comb, + Materials[] aMaterial, + int[] chance, + int[] stackSize, + Voltage volt, + int duration, + ItemStack beeWax, + int waxChance) { + ItemStack[] aOutPut = new ItemStack[aMaterial.length + 1]; + stackSize = Arrays.copyOf(stackSize, aMaterial.length); + chance = Arrays.copyOf(chance, aOutPut.length); + chance[chance.length - 1] = waxChance; + for (int i = 0; i < (aMaterial.length); i++) { + if (chance[i] == 0) { + continue; + } + if (Math.max(1, stackSize[i]) % 9 == 0) { + aOutPut[i] = GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial[i], (Math.max(1, stackSize[i]) / 9)); + } else if (Math.max(1, stackSize[i]) % 4 == 0) { + aOutPut[i] = GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial[i], (Math.max(1, stackSize[i]) / 4)); + } else { + aOutPut[i] = GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial[i], Math.max(1, stackSize[i])); + } + } + if (beeWax != NI) { + aOutPut[aOutPut.length - 1] = beeWax; + } else { + aOutPut[aOutPut.length - 1] = ItemList.FR_Wax.get(1); + } + + addCentrifugeToItemStack(comb, aOutPut, chance, volt, duration); + } + + /** + * @param volt required Tier of system. If it's lower than MV, it will also add forestry centrifuge. + * @param aItem can be more than 6. but Over 6 will be ignored in Gregtech Centrifuge. + **/ + public void addCentrifugeToItemStack(CombType comb, ItemStack[] aItem, int[] chance, Voltage volt) { + addCentrifugeToItemStack(comb, aItem, chance, volt, volt.getSimpleTime()); + } + + public void addCentrifugeToItemStack(CombType comb, ItemStack[] aItem, int[] chance, Voltage volt, int duration) { + ItemStack tComb = getStackForType(comb); + Builder<ItemStack, Float> Product = new ImmutableMap.Builder<ItemStack, Float>(); + for (int i = 0; i < aItem.length; i++) { + if (aItem[i] == NI) { + continue; + } + Product.put(aItem[i], chance[i] / 10000.0f); + } + + if (volt.compareTo(Voltage.MV) < 0 || !GT_Mod.gregtechproxy.mNerfedCombs) { + RecipeManagers.centrifugeManager.addRecipe(40, tComb, Product.build()); + } + + aItem = Arrays.copyOf(aItem, 6); + if (aItem.length > 6) { + chance = Arrays.copyOf(chance, 6); + } + + RA.addCentrifugeRecipe( + tComb, + NI, + NF, + NF, + aItem[0], + aItem[1], + aItem[2], + aItem[3], + aItem[4], + aItem[5], + chance, + duration, + volt.getSimpleEnergy()); + } + + enum Voltage { + ULV, + LV, + MV, + HV, + EV, + IV, + LUV, + ZPM, + UV, + UHV, + UEV, + UIV, + UMV, + UXV, + MAX; + + public int getVoltage() { + return (int) V[this.ordinal()]; + } + /**@return aEU/t needed for chemical and autoclave process related to the Tier**/ + public int getVoltageFromEU() { + return (int) Math.max(Math.floor(Math.log(2 * this.getVoltage()) / Math.log(4) - 1), 0); + } /**@return Voltage tier according to EU provided. 0 = ULV, 1 = LV, 2 = MV ...**/ - public int getChemicalEnergy() { - return this.getVoltage()*3/4; - } - public int getAutoClaveEnergy() { - return (int) ((this.getVoltage()*3/4) * (Math.max(1, Math.pow(2, 5 - this.ordinal())))); - } - /**@return FluidStack needed for chemical process related to the Tier**/ - public FluidStack getComplexChemical() { - if(this.compareTo(Voltage.MV) < 0) { - return Materials.HydrofluoricAcid.getFluid((this.compareTo(Voltage.ULV) > 0) ? 1000 : 500); - }else if(this.compareTo(Voltage.HV) < 0) { - return GT_ModHandler.getDistilledWater(1000L); - }else if(this.compareTo(Voltage.LUV) < 0) { - return Materials.HydrofluoricAcid.getFluid((long) (Math.pow(2, this.compareTo(Voltage.HV)) * L)); - }else if(this.compareTo(Voltage.UHV) < 0) { - return FluidRegistry.getFluidStack("mutagen", (int) (Math.pow(2, this.compareTo(Voltage.LUV)) * L)); - }else { - return NF; - } - } + public int getChemicalEnergy() { + return this.getVoltage() * 3 / 4; + } + + public int getAutoClaveEnergy() { + return (int) ((this.getVoltage() * 3 / 4) * (Math.max(1, Math.pow(2, 5 - this.ordinal())))); + } + /**@return FluidStack needed for chemical process related to the Tier**/ + public FluidStack getComplexChemical() { + if (this.compareTo(Voltage.MV) < 0) { + return Materials.HydrofluoricAcid.getFluid((this.compareTo(Voltage.ULV) > 0) ? 1000 : 500); + } else if (this.compareTo(Voltage.HV) < 0) { + return GT_ModHandler.getDistilledWater(1000L); + } else if (this.compareTo(Voltage.LUV) < 0) { + return Materials.HydrofluoricAcid.getFluid((long) (Math.pow(2, this.compareTo(Voltage.HV)) * L)); + } else if (this.compareTo(Voltage.UHV) < 0) { + return FluidRegistry.getFluidStack("mutagen", (int) (Math.pow(2, this.compareTo(Voltage.LUV)) * L)); + } else { + return NF; + } + } /**@return FluidStack needed for chemical process related to the Tier**/ public FluidStack getFluidAccordingToCombTier() { - //checking what Voltage tier the Comb is - //cascading from IV to UMV since all recipes use HydrofluiricAcid - //for later tiers, just add the corresponding tier to a case + // checking what Voltage tier the Comb is + // cascading from IV to UMV since all recipes use HydrofluiricAcid + // for later tiers, just add the corresponding tier to a case int fluidAmount = this.getFluidAmount(); - switch(this.getVoltageFromEU()){ - case 0: /**ULV**/ + switch (this.getVoltageFromEU()) { + case 0: + /**ULV**/ return Materials.Water.getFluid(fluidAmount); - case 1: /**LV**/ + case 1: + /**LV**/ return Materials.SulfuricAcid.getFluid(fluidAmount); - case 2: /**MV**/ + case 2: + /**MV**/ return Materials.HydrochloricAcid.getFluid(fluidAmount); - case 3: /**HV**/ + case 3: + /**HV**/ return Materials.PhosphoricAcid.getFluid(fluidAmount); - case 4: /**EV**/ + case 4: + /**EV**/ return Materials.PhthalicAcid.getFluid(fluidAmount); default: return Materials.HydrofluoricAcid.getFluid(this.getFluidAmount()); @@ -598,34 +2055,31 @@ public class ItemComb extends Item { public int getUUAmplifier() { return 9 * ((this.compareTo(Voltage.MV) < 0) ? 1 : this.compareTo(Voltage.MV)); } - /**@return duration needed for Chemical process related to the Tier**/ - public int getComplexTime() { - return 64 + this.ordinal() * 32; - - } + /**@return duration needed for Chemical process related to the Tier**/ + public int getComplexTime() { + return 64 + this.ordinal() * 32; + } /**@return Fluid amount needed for Chemical process related to the Tier**/ public int getFluidAmount() { - return 9 * this.getSimpleTime()/3; + return 9 * this.getSimpleTime() / 3; } - - - /**@return duration needed for Centrifuge process related to the Tier**/ - public int getSimpleTime() { - if(!GT_Mod.gregtechproxy.mNerfedCombs) { - return 96 + this.ordinal() * 32; - } else { - //ULV, LV needs 128ticks, MV need 256 ticks, HV need 384 ticks, EV need 512 ticks, IV need 640 ticks - return 128 * (Math.max(1, this.ordinal())); - } - } - /**@return aEU/t needed for Centrifuge process related to the Tier**/ - public int getSimpleEnergy() { - if(this == Voltage.ULV) { - return 5; - }else { - return (int) (this.getVoltage() / 16) * 15; - } - } - } + /**@return duration needed for Centrifuge process related to the Tier**/ + public int getSimpleTime() { + if (!GT_Mod.gregtechproxy.mNerfedCombs) { + return 96 + this.ordinal() * 32; + } else { + // ULV, LV needs 128ticks, MV need 256 ticks, HV need 384 ticks, EV need 512 ticks, IV need 640 ticks + return 128 * (Math.max(1, this.ordinal())); + } + } + /**@return aEU/t needed for Centrifuge process related to the Tier**/ + public int getSimpleEnergy() { + if (this == Voltage.ULV) { + return 5; + } else { + return (int) (this.getVoltage() / 16) * 15; + } + } + } } diff --git a/src/main/java/gregtech/common/items/ItemDrop.java b/src/main/java/gregtech/common/items/ItemDrop.java index b48072dbd1..37b9d583c5 100644 --- a/src/main/java/gregtech/common/items/ItemDrop.java +++ b/src/main/java/gregtech/common/items/ItemDrop.java @@ -1,5 +1,8 @@ package gregtech.common.items; +import static gregtech.api.enums.GT_Values.MOD_ID; +import static gregtech.api.enums.GT_Values.MOD_ID_DC; + import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; @@ -9,6 +12,7 @@ import forestry.api.recipes.RecipeManagers; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.util.GT_ModHandler; +import java.util.List; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; @@ -17,118 +21,180 @@ import net.minecraft.util.IIcon; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -import java.util.List; +public class ItemDrop extends Item { + @SideOnly(Side.CLIENT) + private IIcon secondIcon; -import static gregtech.api.enums.GT_Values.MOD_ID; -import static gregtech.api.enums.GT_Values.MOD_ID_DC; + public ItemDrop() { + super(); + this.setCreativeTab(Tabs.tabApiculture); + this.setHasSubtypes(true); + this.setUnlocalizedName("gt.drop"); + GameRegistry.registerItem(this, "gt.drop", MOD_ID); + } -public class ItemDrop extends Item { - @SideOnly(Side.CLIENT) - private IIcon secondIcon; - - public ItemDrop() { - super(); - this.setCreativeTab(Tabs.tabApiculture); - this.setHasSubtypes(true); - this.setUnlocalizedName("gt.drop"); - GameRegistry.registerItem(this, "gt.drop", MOD_ID); - } - - public ItemStack getStackForType(DropType type) { - return new ItemStack(this, 1, type.ordinal()); - } - - public ItemStack getStackForType(DropType type, int count) { - return new ItemStack(this, count, type.ordinal()); - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs tabs, List list) { - for (DropType type : DropType.values()) { - if (type.showInList) { - list.add(this.getStackForType(type)); - } - } - } - - @Override - @SideOnly(Side.CLIENT) - public boolean requiresMultipleRenderPasses() { - return true; - } - - @Override - public int getRenderPasses(int meta) { - return 2; - } - - @Override + public ItemStack getStackForType(DropType type) { + return new ItemStack(this, 1, type.ordinal()); + } + + public ItemStack getStackForType(DropType type, int count) { + return new ItemStack(this, count, type.ordinal()); + } + + @Override + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs tabs, List list) { + for (DropType type : DropType.values()) { + if (type.showInList) { + list.add(this.getStackForType(type)); + } + } + } + + @Override + @SideOnly(Side.CLIENT) + public boolean requiresMultipleRenderPasses() { + return true; + } + + @Override + public int getRenderPasses(int meta) { + return 2; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon("forestry:honeyDrop.0"); + this.secondIcon = iconRegister.registerIcon("forestry:honeyDrop.1"); + } + + @Override + public IIcon getIcon(ItemStack stack, int pass) { + return (pass == 0) ? itemIcon : secondIcon; + } + + @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("forestry:honeyDrop.0"); - this.secondIcon = iconRegister.registerIcon("forestry:honeyDrop.1"); - } - - @Override - public IIcon getIcon(ItemStack stack, int pass) { - return (pass == 0) ? itemIcon : secondIcon; - } - - @Override - @SideOnly(Side.CLIENT) - public int getColorFromItemStack(ItemStack stack, int pass) { - int meta = Math.max(0, Math.min(DropType.values().length - 1, stack.getItemDamage())); - int colour = DropType.values()[meta].getColours()[0]; - - if (pass >= 1) { - colour = DropType.values()[meta].getColours()[1]; - } - - return colour; - } - - @Override - public String getItemStackDisplayName(ItemStack stack) { - return DropType.values()[stack.getItemDamage()].getName(); - } - public void initDropsRecipes() { - ItemStack tDrop; - - tDrop = getStackForType(DropType.OIL); - addProcessLV(tDrop, Materials.OilHeavy.getFluid(100L), GT_ModHandler.getModItem("Forestry", "propolis", 1L, 0), 3000, 8); - RecipeManagers.squeezerManager.addRecipe(40, new ItemStack[]{tDrop}, Materials.OilHeavy.getFluid(100L), GT_ModHandler.getModItem("Forestry", "propolis", 1L, 0), 30); - tDrop = getStackForType(DropType.COOLANT); - addProcessLV(tDrop, new FluidStack(FluidRegistry.getFluid("ic2coolant"), 100), GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 0), 3000, 8); - RecipeManagers.squeezerManager.addRecipe(40, new ItemStack[]{tDrop}, new FluidStack(FluidRegistry.getFluid("ic2coolant"), 100), GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 0), 30); - tDrop = getStackForType(DropType.HOT_COOLANT); - addProcessLV(tDrop, new FluidStack(FluidRegistry.getFluid("ic2hotcoolant"), 100), GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 2), 3000, 8); - RecipeManagers.squeezerManager.addRecipe(40, new ItemStack[]{tDrop}, new FluidStack(FluidRegistry.getFluid("ic2hotcoolant"), 100), GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 2), 30); - tDrop = getStackForType(DropType.SNOW_QUEEN); - addProcessMV(tDrop, Materials.FierySteel.getFluid(200L), GT_ModHandler.getModItem(MOD_ID_DC, "SnowQueenBloodDrop", 1L, 0), 1500, 48); - tDrop = getStackForType(DropType.LAPIS); - addProcessLV(tDrop,new FluidStack(FluidRegistry.getFluid("ic2coolant"), 200), GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 3), 5000, 1200,2); - RecipeManagers.squeezerManager.addRecipe(400, new ItemStack[]{tDrop}, new FluidStack(FluidRegistry.getFluid("ic2coolant"), 100), GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 3), 30); - tDrop = getStackForType(DropType.HYDRA); - addProcessMV(tDrop, Materials.FierySteel.getFluid(50L), GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 2), 3000, 8); - tDrop = getStackForType(DropType.OXYGEN); - addProcessLV(tDrop, new FluidStack(FluidRegistry.getFluid("liquidoxygen"), 100), GT_ModHandler.getModItem("ExtraBees", "propolis", 1L, 2), 250, 1200,8); - RecipeManagers.squeezerManager.addRecipe(400, new ItemStack[]{tDrop}, new FluidStack(FluidRegistry.getFluid("ic2coolant"), 100), GT_ModHandler.getModItem("ExtraBees", "propolis", 1L, 2), 30); - tDrop = getStackForType(DropType.ENDERGOO); - if ( Loader.isModLoaded("HardcoreEnderExpansion")) - addProcessHV(tDrop, new FluidStack(FluidRegistry.getFluid("endergoo"), 500), GT_Values.NI ,1000); - } - - public void addProcessLV(ItemStack tDrop, FluidStack aOutput, ItemStack aOutput2, int aChance, int aEUt) { - GT_Values.RA.addFluidExtractionRecipe(tDrop, aOutput2, aOutput, aChance, 32, aEUt); - } - public void addProcessLV(ItemStack tDrop, FluidStack aOutput, ItemStack aOutput2, int aChance, int aDuration, int aEUt) { - GT_Values.RA.addFluidExtractionRecipe(tDrop, aOutput2, aOutput, aChance, aDuration, aEUt); - } - public void addProcessMV(ItemStack tDrop, FluidStack aOutput, ItemStack aOutput2, int aChance, int aEUt) { - GT_Values.RA.addFluidExtractionRecipe(tDrop, aOutput2, aOutput, aChance, 128, aEUt); - } - public void addProcessHV(ItemStack tDrop, FluidStack aOutput, ItemStack aOutput2, int aChance) { - GT_Values.RA.addFluidExtractionRecipe(tDrop, aOutput2, aOutput, aChance, 480, 480); - } + public int getColorFromItemStack(ItemStack stack, int pass) { + int meta = Math.max(0, Math.min(DropType.values().length - 1, stack.getItemDamage())); + int colour = DropType.values()[meta].getColours()[0]; + + if (pass >= 1) { + colour = DropType.values()[meta].getColours()[1]; + } + + return colour; + } + + @Override + public String getItemStackDisplayName(ItemStack stack) { + return DropType.values()[stack.getItemDamage()].getName(); + } + + public void initDropsRecipes() { + ItemStack tDrop; + + tDrop = getStackForType(DropType.OIL); + addProcessLV( + tDrop, + Materials.OilHeavy.getFluid(100L), + GT_ModHandler.getModItem("Forestry", "propolis", 1L, 0), + 3000, + 8); + RecipeManagers.squeezerManager.addRecipe( + 40, + new ItemStack[] {tDrop}, + Materials.OilHeavy.getFluid(100L), + GT_ModHandler.getModItem("Forestry", "propolis", 1L, 0), + 30); + tDrop = getStackForType(DropType.COOLANT); + addProcessLV( + tDrop, + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 100), + GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 0), + 3000, + 8); + RecipeManagers.squeezerManager.addRecipe( + 40, + new ItemStack[] {tDrop}, + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 100), + GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 0), + 30); + tDrop = getStackForType(DropType.HOT_COOLANT); + addProcessLV( + tDrop, + new FluidStack(FluidRegistry.getFluid("ic2hotcoolant"), 100), + GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 2), + 3000, + 8); + RecipeManagers.squeezerManager.addRecipe( + 40, + new ItemStack[] {tDrop}, + new FluidStack(FluidRegistry.getFluid("ic2hotcoolant"), 100), + GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 2), + 30); + tDrop = getStackForType(DropType.SNOW_QUEEN); + addProcessMV( + tDrop, + Materials.FierySteel.getFluid(200L), + GT_ModHandler.getModItem(MOD_ID_DC, "SnowQueenBloodDrop", 1L, 0), + 1500, + 48); + tDrop = getStackForType(DropType.LAPIS); + addProcessLV( + tDrop, + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 200), + GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 3), + 5000, + 1200, + 2); + RecipeManagers.squeezerManager.addRecipe( + 400, + new ItemStack[] {tDrop}, + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 100), + GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 3), + 30); + tDrop = getStackForType(DropType.HYDRA); + addProcessMV( + tDrop, + Materials.FierySteel.getFluid(50L), + GT_ModHandler.getModItem("MagicBees", "propolis", 1L, 2), + 3000, + 8); + tDrop = getStackForType(DropType.OXYGEN); + addProcessLV( + tDrop, + new FluidStack(FluidRegistry.getFluid("liquidoxygen"), 100), + GT_ModHandler.getModItem("ExtraBees", "propolis", 1L, 2), + 250, + 1200, + 8); + RecipeManagers.squeezerManager.addRecipe( + 400, + new ItemStack[] {tDrop}, + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 100), + GT_ModHandler.getModItem("ExtraBees", "propolis", 1L, 2), + 30); + tDrop = getStackForType(DropType.ENDERGOO); + if (Loader.isModLoaded("HardcoreEnderExpansion")) + addProcessHV(tDrop, new FluidStack(FluidRegistry.getFluid("endergoo"), 500), GT_Values.NI, 1000); + } + + public void addProcessLV(ItemStack tDrop, FluidStack aOutput, ItemStack aOutput2, int aChance, int aEUt) { + GT_Values.RA.addFluidExtractionRecipe(tDrop, aOutput2, aOutput, aChance, 32, aEUt); + } + + public void addProcessLV( + ItemStack tDrop, FluidStack aOutput, ItemStack aOutput2, int aChance, int aDuration, int aEUt) { + GT_Values.RA.addFluidExtractionRecipe(tDrop, aOutput2, aOutput, aChance, aDuration, aEUt); + } + + public void addProcessMV(ItemStack tDrop, FluidStack aOutput, ItemStack aOutput2, int aChance, int aEUt) { + GT_Values.RA.addFluidExtractionRecipe(tDrop, aOutput2, aOutput, aChance, 128, aEUt); + } + + public void addProcessHV(ItemStack tDrop, FluidStack aOutput, ItemStack aOutput2, int aChance) { + GT_Values.RA.addFluidExtractionRecipe(tDrop, aOutput2, aOutput, aChance, 480, 480); + } } diff --git a/src/main/java/gregtech/common/items/ItemPollen.java b/src/main/java/gregtech/common/items/ItemPollen.java index bc41b1c83d..0532d52f9d 100644 --- a/src/main/java/gregtech/common/items/ItemPollen.java +++ b/src/main/java/gregtech/common/items/ItemPollen.java @@ -1,89 +1,86 @@ package gregtech.common.items; +import static gregtech.api.enums.GT_Values.MOD_ID; + import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import forestry.api.core.Tabs; +import java.util.List; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; -import java.util.List; - -import static gregtech.api.enums.GT_Values.MOD_ID; - public class ItemPollen extends Item { - @SideOnly(Side.CLIENT) - private IIcon secondIcon; - - public ItemPollen() { - super(); - this.setCreativeTab(Tabs.tabApiculture); - this.setHasSubtypes(true); - this.setUnlocalizedName("gt.pollen"); - GameRegistry.registerItem(this, "gt.pollen", MOD_ID); - } - - public ItemStack getStackForType(PollenType type) { - return new ItemStack(this, 1, type.ordinal()); - } - - public ItemStack getStackForType(PollenType type, int count) { - return new ItemStack(this, count, type.ordinal()); - } + @SideOnly(Side.CLIENT) + private IIcon secondIcon; - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs tabs, List list) { - for (PollenType type : PollenType.values()) { - if (type.showInList) { - list.add(this.getStackForType(type)); - } - } - } + public ItemPollen() { + super(); + this.setCreativeTab(Tabs.tabApiculture); + this.setHasSubtypes(true); + this.setUnlocalizedName("gt.pollen"); + GameRegistry.registerItem(this, "gt.pollen", MOD_ID); + } - @Override - @SideOnly(Side.CLIENT) - public boolean requiresMultipleRenderPasses() { - return true; - } + public ItemStack getStackForType(PollenType type) { + return new ItemStack(this, 1, type.ordinal()); + } - @Override - public int getRenderPasses(int meta) { - return 2; - } + public ItemStack getStackForType(PollenType type, int count) { + return new ItemStack(this, count, type.ordinal()); + } - @Override + @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("forestry:pollen.0"); - this.secondIcon = iconRegister.registerIcon("forestry:pollen.1"); - } + public void getSubItems(Item item, CreativeTabs tabs, List list) { + for (PollenType type : PollenType.values()) { + if (type.showInList) { + list.add(this.getStackForType(type)); + } + } + } + + @Override + @SideOnly(Side.CLIENT) + public boolean requiresMultipleRenderPasses() { + return true; + } - @Override - public IIcon getIcon(ItemStack stack, int pass) { - return (pass == 0) ? itemIcon : secondIcon; - } + @Override + public int getRenderPasses(int meta) { + return 2; + } - @Override - @SideOnly(Side.CLIENT) - public int getColorFromItemStack(ItemStack stack, int pass) { - int meta = Math.max(0, Math.min(PollenType.values().length - 1, stack.getItemDamage())); - int colour = PollenType.values()[meta].getColours()[0]; + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon("forestry:pollen.0"); + this.secondIcon = iconRegister.registerIcon("forestry:pollen.1"); + } - if (pass >= 1) { - colour = PollenType.values()[meta].getColours()[1]; - } + @Override + public IIcon getIcon(ItemStack stack, int pass) { + return (pass == 0) ? itemIcon : secondIcon; + } - return colour; - } + @Override + @SideOnly(Side.CLIENT) + public int getColorFromItemStack(ItemStack stack, int pass) { + int meta = Math.max(0, Math.min(PollenType.values().length - 1, stack.getItemDamage())); + int colour = PollenType.values()[meta].getColours()[0]; - @Override - public String getItemStackDisplayName(ItemStack stack) { - return PollenType.values()[stack.getItemDamage()].getName(); - } + if (pass >= 1) { + colour = PollenType.values()[meta].getColours()[1]; + } + return colour; + } + @Override + public String getItemStackDisplayName(ItemStack stack) { + return PollenType.values()[stack.getItemDamage()].getName(); + } } diff --git a/src/main/java/gregtech/common/items/ItemPropolis.java b/src/main/java/gregtech/common/items/ItemPropolis.java index 729958a72e..dbb5f45786 100644 --- a/src/main/java/gregtech/common/items/ItemPropolis.java +++ b/src/main/java/gregtech/common/items/ItemPropolis.java @@ -1,5 +1,8 @@ package gregtech.common.items; +import static gregtech.api.enums.GT_Values.MOD_ID; +import static gregtech.api.enums.GT_Values.MOD_ID_DC; + import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -9,6 +12,7 @@ import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; +import java.util.List; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; @@ -16,96 +20,96 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraftforge.fluids.FluidRegistry; -import java.util.List; +public class ItemPropolis extends Item { + @SideOnly(Side.CLIENT) + private IIcon secondIcon; -import static gregtech.api.enums.GT_Values.MOD_ID; -import static gregtech.api.enums.GT_Values.MOD_ID_DC; + public ItemPropolis() { + super(); + this.setCreativeTab(Tabs.tabApiculture); + this.setHasSubtypes(true); + this.setUnlocalizedName("gt.propolis"); + GameRegistry.registerItem(this, "gt.propolis", MOD_ID); + } -public class ItemPropolis extends Item { - @SideOnly(Side.CLIENT) - private IIcon secondIcon; - - public ItemPropolis() { - super(); - this.setCreativeTab(Tabs.tabApiculture); - this.setHasSubtypes(true); - this.setUnlocalizedName("gt.propolis"); - GameRegistry.registerItem(this, "gt.propolis", MOD_ID); - } - - public ItemStack getStackForType(PropolisType type) { - return new ItemStack(this, 1, type.ordinal()); - } - - public ItemStack getStackForType(PropolisType type, int count) { - return new ItemStack(this, count, type.ordinal()); - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs tabs, List list) { - for (PropolisType type : PropolisType.values()) { - if (type.showInList) { - list.add(this.getStackForType(type)); - } - } - } - - - @Override + public ItemStack getStackForType(PropolisType type) { + return new ItemStack(this, 1, type.ordinal()); + } + + public ItemStack getStackForType(PropolisType type, int count) { + return new ItemStack(this, count, type.ordinal()); + } + + @Override + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs tabs, List list) { + for (PropolisType type : PropolisType.values()) { + if (type.showInList) { + list.add(this.getStackForType(type)); + } + } + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon("forestry:propolis.0"); + } + + @Override + public IIcon getIcon(ItemStack stack, int pass) { + return itemIcon; + } + + @Override @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("forestry:propolis.0"); - } - - @Override - public IIcon getIcon(ItemStack stack, int pass) { - return itemIcon; - } - - @Override - @SideOnly(Side.CLIENT) - public int getColorFromItemStack(ItemStack stack, int pass) { - int meta = Math.max(0, Math.min(PropolisType.values().length - 1, stack.getItemDamage())); - return PropolisType.values()[meta].getColours(); - } - - @Override - public String getItemStackDisplayName(ItemStack stack) { - return PropolisType.values()[stack.getItemDamage()].getName(); - } - public void initPropolisRecipes() { - ItemStack tPropolis; - - tPropolis = getStackForType(PropolisType.End); - addProcessHV(tPropolis, GT_ModHandler.getModItem("HardcoreEnderExpansion", "end_powder", 1, 0)); - tPropolis = getStackForType(PropolisType.Stardust); - addProcessHV(tPropolis, GT_ModHandler.getModItem("HardcoreEnderExpansion", "stardust", 1, 0)); - tPropolis = getStackForType(PropolisType.Ectoplasma); - addProcessEV(tPropolis, GT_ModHandler.getModItem(MOD_ID_DC, "item.EctoplasmaChip", 1, 0)); - tPropolis = getStackForType(PropolisType.Arcaneshard); - addProcessEV(tPropolis, GT_ModHandler.getModItem(MOD_ID_DC, "item.ArcaneShardChip", 1, 0)); - tPropolis = getStackForType(PropolisType.Dragonessence); - addProcessIV(tPropolis, GT_ModHandler.getModItem("HardcoreEnderExpansion", "essence", 16, 0)); - tPropolis = getStackForType(PropolisType.Enderman); - addProcessIV(tPropolis, GT_ModHandler.getModItem("HardcoreEnderExpansion", "enderman_head", 1, 0)); - tPropolis = getStackForType(PropolisType.Silverfish); - addProcessEV(tPropolis, GT_ModHandler.getModItem("HardcoreEnderExpansion", "silverfish_blood", 1, 0)); - tPropolis = getStackForType(PropolisType.Endium); - addProcessHV(tPropolis, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.HeeEndium, 1)); - tPropolis = getStackForType(PropolisType.Fireessence); - addProcessIV(tPropolis, GT_ModHandler.getModItem("HardcoreEnderExpansion", "essence", 16, 1)); - - //addRecipe(tDrop, aOutput, aOutput2, aChance, aDuration, aEUt); - } - - public void addProcessHV(ItemStack tPropolis, ItemStack aOutput2) { - GT_Values.RA.addFluidExtractionRecipe(tPropolis, aOutput2, FluidRegistry.getFluidStack("endergoo",100), 5000, 50, 480); - } - public void addProcessEV(ItemStack tPropolis, ItemStack aOutput2) { - GT_Values.RA.addFluidExtractionRecipe(tPropolis, aOutput2, FluidRegistry.getFluidStack("endergoo",200), 2500, 100, 1920); - } - public void addProcessIV(ItemStack tPropolis, ItemStack aOutput2) { - GT_Values.RA.addFluidExtractionRecipe(tPropolis, aOutput2, FluidRegistry.getFluidStack("endergoo",300), 1500, 150, 7680); - } + public int getColorFromItemStack(ItemStack stack, int pass) { + int meta = Math.max(0, Math.min(PropolisType.values().length - 1, stack.getItemDamage())); + return PropolisType.values()[meta].getColours(); + } + + @Override + public String getItemStackDisplayName(ItemStack stack) { + return PropolisType.values()[stack.getItemDamage()].getName(); + } + + public void initPropolisRecipes() { + ItemStack tPropolis; + + tPropolis = getStackForType(PropolisType.End); + addProcessHV(tPropolis, GT_ModHandler.getModItem("HardcoreEnderExpansion", "end_powder", 1, 0)); + tPropolis = getStackForType(PropolisType.Stardust); + addProcessHV(tPropolis, GT_ModHandler.getModItem("HardcoreEnderExpansion", "stardust", 1, 0)); + tPropolis = getStackForType(PropolisType.Ectoplasma); + addProcessEV(tPropolis, GT_ModHandler.getModItem(MOD_ID_DC, "item.EctoplasmaChip", 1, 0)); + tPropolis = getStackForType(PropolisType.Arcaneshard); + addProcessEV(tPropolis, GT_ModHandler.getModItem(MOD_ID_DC, "item.ArcaneShardChip", 1, 0)); + tPropolis = getStackForType(PropolisType.Dragonessence); + addProcessIV(tPropolis, GT_ModHandler.getModItem("HardcoreEnderExpansion", "essence", 16, 0)); + tPropolis = getStackForType(PropolisType.Enderman); + addProcessIV(tPropolis, GT_ModHandler.getModItem("HardcoreEnderExpansion", "enderman_head", 1, 0)); + tPropolis = getStackForType(PropolisType.Silverfish); + addProcessEV(tPropolis, GT_ModHandler.getModItem("HardcoreEnderExpansion", "silverfish_blood", 1, 0)); + tPropolis = getStackForType(PropolisType.Endium); + addProcessHV(tPropolis, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.HeeEndium, 1)); + tPropolis = getStackForType(PropolisType.Fireessence); + addProcessIV(tPropolis, GT_ModHandler.getModItem("HardcoreEnderExpansion", "essence", 16, 1)); + + // addRecipe(tDrop, aOutput, aOutput2, aChance, aDuration, aEUt); + } + + public void addProcessHV(ItemStack tPropolis, ItemStack aOutput2) { + GT_Values.RA.addFluidExtractionRecipe( + tPropolis, aOutput2, FluidRegistry.getFluidStack("endergoo", 100), 5000, 50, 480); + } + + public void addProcessEV(ItemStack tPropolis, ItemStack aOutput2) { + GT_Values.RA.addFluidExtractionRecipe( + tPropolis, aOutput2, FluidRegistry.getFluidStack("endergoo", 200), 2500, 100, 1920); + } + + public void addProcessIV(ItemStack tPropolis, ItemStack aOutput2) { + GT_Values.RA.addFluidExtractionRecipe( + tPropolis, aOutput2, FluidRegistry.getFluidStack("endergoo", 300), 1500, 150, 7680); + } } diff --git a/src/main/java/gregtech/common/items/PollenType.java b/src/main/java/gregtech/common/items/PollenType.java index a4d670a0d0..cb7499e862 100644 --- a/src/main/java/gregtech/common/items/PollenType.java +++ b/src/main/java/gregtech/common/items/PollenType.java @@ -4,16 +4,16 @@ import gregtech.api.enums.Materials; import gregtech.api.util.GT_LanguageManager; public enum PollenType { + MATRIX("matrix", true); - MATRIX("matrix",true); - - private static int[][] colours = new int[][]{ - {0x19191B, 0x303032}, + private static int[][] colours = new int[][] { + {0x19191B, 0x303032}, }; public boolean showInList; public Materials material; public int chance; private String name; + private PollenType(String pName, boolean show) { this.name = pName; this.showInList = show; @@ -24,7 +24,8 @@ public enum PollenType { } public String getName() { - return GT_LanguageManager.addStringLocalization("pollen." + this.name, this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Pollen"); + return GT_LanguageManager.addStringLocalization( + "pollen." + this.name, this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Pollen"); } public int[] getColours() { diff --git a/src/main/java/gregtech/common/items/PropolisType.java b/src/main/java/gregtech/common/items/PropolisType.java index 04550e899b..4d3d7407f8 100644 --- a/src/main/java/gregtech/common/items/PropolisType.java +++ b/src/main/java/gregtech/common/items/PropolisType.java @@ -4,33 +4,24 @@ import gregtech.api.enums.Materials; import gregtech.api.util.GT_LanguageManager; public enum PropolisType { - - End("End",true), - Ectoplasma("Ectoplasma",true), - Arcaneshard("Arcaneshard",true), - Stardust("Stardust",true), - Dragonessence("Dragonessence",true), - Enderman("Enderman",true), - Silverfish("Silverfish", true), + End("End", true), + Ectoplasma("Ectoplasma", true), + Arcaneshard("Arcaneshard", true), + Stardust("Stardust", true), + Dragonessence("Dragonessence", true), + Enderman("Enderman", true), + Silverfish("Silverfish", true), Endium("Endium", true), - Fireessence("Fireessence",true); - - private static int[] colours = new int[]{ - 0xCC00FA, - 0xDCB0E5, - 0x9010AD, - 0xFFFF00, - 0x911ECE, - 0x161616, - 0xEE053D, - 0xa0ffff, - 0xD41238 - }; + Fireessence("Fireessence", true); + + private static int[] colours = + new int[] {0xCC00FA, 0xDCB0E5, 0x9010AD, 0xFFFF00, 0x911ECE, 0x161616, 0xEE053D, 0xa0ffff, 0xD41238}; public boolean showInList; public Materials material; public int chance; private String name; + private PropolisType(String pName, boolean show) { this.name = pName; this.showInList = show; @@ -41,8 +32,10 @@ public enum PropolisType { } public String getName() { -// return "gt.comb."+this.name; - return GT_LanguageManager.addStringLocalization("propolis." + this.name, this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Propolis"); + // return "gt.comb."+this.name; + return GT_LanguageManager.addStringLocalization( + "propolis." + this.name, + this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Propolis"); } public int getColours() { diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow.java index 1ff076dd78..9c7d261eb6 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow.java @@ -30,7 +30,12 @@ public class Behaviour_Arrow extends Behaviour_None { this(aArrow, aSpeed, aPrecision, null, 0); } - public Behaviour_Arrow(Class<? extends GT_Entity_Arrow> aArrow, float aSpeed, float aPrecision, Enchantment aEnchantment, int aLevel) { + public Behaviour_Arrow( + Class<? extends GT_Entity_Arrow> aArrow, + float aSpeed, + float aPrecision, + Enchantment aEnchantment, + int aLevel) { this.mArrow = aArrow; this.mSpeedMultiplier = aSpeed; this.mPrecision = aPrecision; @@ -77,9 +82,15 @@ public class Behaviour_Arrow extends Behaviour_None { World aWorld = aSource.getWorld(); IPosition tPosition = BlockDispenser.func_149939_a(aSource); EnumFacing tFacing = BlockDispenser.func_149937_b(aSource.getBlockMetadata()); - GT_Entity_Arrow tEntityArrow = (GT_Entity_Arrow) getProjectile(aItem, SubTag.PROJECTILE_ARROW, aStack, aWorld, tPosition.getX(), tPosition.getY(), tPosition.getZ()); + GT_Entity_Arrow tEntityArrow = (GT_Entity_Arrow) getProjectile( + aItem, SubTag.PROJECTILE_ARROW, aStack, aWorld, tPosition.getX(), tPosition.getY(), tPosition.getZ()); if (tEntityArrow != null) { - tEntityArrow.setThrowableHeading(tFacing.getFrontOffsetX(), tFacing.getFrontOffsetY() + 0.1F, tFacing.getFrontOffsetZ(), this.mSpeedMultiplier * 1.1F, this.mPrecision); + tEntityArrow.setThrowableHeading( + tFacing.getFrontOffsetX(), + tFacing.getFrontOffsetY() + 0.1F, + tFacing.getFrontOffsetZ(), + this.mSpeedMultiplier * 1.1F, + this.mPrecision); tEntityArrow.setArrowItem(aStack); tEntityArrow.canBePickedUp = 1; aWorld.spawnEntityInWorld(tEntityArrow); @@ -97,21 +108,40 @@ public class Behaviour_Arrow extends Behaviour_None { } @Override - public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ) { + public EntityArrow getProjectile( + GT_MetaBase_Item aItem, + SubTag aProjectileType, + ItemStack aStack, + World aWorld, + double aX, + double aY, + double aZ) { if (!hasProjectile(aItem, aProjectileType, aStack)) { return null; } - GT_Entity_Arrow rArrow = (GT_Entity_Arrow) GT_Utility.callConstructor(this.mArrow.getName(), -1, null, true, new Object[]{aWorld, Double.valueOf(aX), Double.valueOf(aY), Double.valueOf(aZ)}); + GT_Entity_Arrow rArrow = + (GT_Entity_Arrow) GT_Utility.callConstructor(this.mArrow.getName(), -1, null, true, new Object[] { + aWorld, Double.valueOf(aX), Double.valueOf(aY), Double.valueOf(aZ) + }); rArrow.setArrowItem(aStack); return rArrow; } @Override - public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed) { + public EntityArrow getProjectile( + GT_MetaBase_Item aItem, + SubTag aProjectileType, + ItemStack aStack, + World aWorld, + EntityLivingBase aEntity, + float aSpeed) { if (!hasProjectile(aItem, aProjectileType, aStack)) { return null; } - GT_Entity_Arrow rArrow = (GT_Entity_Arrow) GT_Utility.callConstructor(this.mArrow.getName(), -1, null, true, new Object[]{aWorld, aEntity, Float.valueOf(this.mSpeedMultiplier * aSpeed)}); + GT_Entity_Arrow rArrow = + (GT_Entity_Arrow) GT_Utility.callConstructor(this.mArrow.getName(), -1, null, true, new Object[] { + aWorld, aEntity, Float.valueOf(this.mSpeedMultiplier * aSpeed) + }); rArrow.setArrowItem(aStack); return rArrow; } diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow_Potion.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow_Potion.java index d6f035119d..8b2d4ab4ce 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow_Potion.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow_Potion.java @@ -20,7 +20,8 @@ public class Behaviour_Arrow_Potion extends Behaviour_Arrow { this.mPotions = aPotions; } - public Behaviour_Arrow_Potion(float aSpeed, float aPrecision, Enchantment aEnchantment, int aLevel, int... aPotions) { + public Behaviour_Arrow_Potion( + float aSpeed, float aPrecision, Enchantment aEnchantment, int aLevel, int... aPotions) { super(GT_Entity_Arrow_Potion.class, aSpeed, aPrecision, aEnchantment, aLevel); this.mPotions = aPotions; } @@ -30,7 +31,9 @@ public class Behaviour_Arrow_Potion extends Behaviour_Arrow { if ((aEntity instanceof EntityLivingBase)) { for (int i = 3; i < this.mPotions.length; i += 4) { if (aEntity.worldObj.rand.nextInt(100) < this.mPotions[i]) { - ((EntityLivingBase) aEntity).addPotionEffect(new PotionEffect(this.mPotions[(i - 3)], this.mPotions[(i - 2)], this.mPotions[(i - 1)], false)); + ((EntityLivingBase) aEntity) + .addPotionEffect(new PotionEffect( + this.mPotions[(i - 3)], this.mPotions[(i - 2)], this.mPotions[(i - 1)], false)); } } } @@ -38,7 +41,14 @@ public class Behaviour_Arrow_Potion extends Behaviour_Arrow { } @Override - public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ) { + public EntityArrow getProjectile( + GT_MetaBase_Item aItem, + SubTag aProjectileType, + ItemStack aStack, + World aWorld, + double aX, + double aY, + double aZ) { if (!hasProjectile(aItem, aProjectileType, aStack)) { return null; } @@ -49,7 +59,13 @@ public class Behaviour_Arrow_Potion extends Behaviour_Arrow { } @Override - public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed) { + public EntityArrow getProjectile( + GT_MetaBase_Item aItem, + SubTag aProjectileType, + ItemStack aStack, + World aWorld, + EntityLivingBase aEntity, + float aSpeed) { if (!hasProjectile(aItem, aProjectileType, aStack)) { return null; } diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Cover_Tool.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Cover_Tool.java index 192acfc4a3..c0bda95262 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Cover_Tool.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Cover_Tool.java @@ -6,6 +6,8 @@ import gregtech.api.interfaces.IItemBehaviour; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.items.GT_MetaBase_Item; import gregtech.api.util.*; +import java.util.ArrayList; +import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; @@ -16,18 +18,27 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import java.util.ArrayList; -import java.util.List; - -public class Behaviour_Cover_Tool extends Behaviour_None { +public class Behaviour_Cover_Tool extends Behaviour_None { public static final IItemBehaviour<GT_MetaBase_Item> INSTANCE = new Behaviour_Cover_Tool(); - private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.cover_copy_paste", "Can copy/paste cover data."); + private final String mTooltip = + GT_LanguageManager.addStringLocalization("gt.behaviour.cover_copy_paste", "Can copy/paste cover data."); private ISerializableObject mStoredData = GregTech_API.sNoBehavior.createDataObject(); private int mCoverType; @Override - public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUseFirst( + GT_MetaBase_Item aItem, + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { if (aWorld.isRemote) { return false; } @@ -42,8 +53,7 @@ public class Behaviour_Cover_Tool extends Behaviour_None { aItem.discharge(aStack, 100.0D, Integer.MAX_VALUE, true, false, false); writeListToNBT(tList, tNBT, aPlayer); saveDataToNBT(tNBT); - } - else { + } else { doPaste(tTileEntity, aSide, hitX, hitY, hitZ, aPlayer); aItem.discharge(aStack, 25.0D, Integer.MAX_VALUE, true, false, false); } @@ -57,10 +67,8 @@ public class Behaviour_Cover_Tool extends Behaviour_None { mCoverType = aNBT.getInteger("mCoverType"); GT_CoverBehaviorBase<?> tBehavior = GregTech_API.getCoverBehaviorNew(mCoverType); NBTBase tData = aNBT.getTag("mCoverData"); - if (tData != null) - mStoredData = tBehavior.createDataObject(tData); - else - mStoredData = GregTech_API.sNoBehavior.createDataObject(); + if (tData != null) mStoredData = tBehavior.createDataObject(tData); + else mStoredData = GregTech_API.sNoBehavior.createDataObject(); } } @@ -83,42 +91,46 @@ public class Behaviour_Cover_Tool extends Behaviour_None { } @SuppressWarnings({"unchecked", "rawtypes"}) - private void doCopy(TileEntity aTileEntity, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ, List aList) { + private void doCopy( + TileEntity aTileEntity, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ, + List aList) { aList.add( - "----- X: " + EnumChatFormatting.AQUA + GT_Utility.formatNumbers(aX) + EnumChatFormatting.RESET + - " Y: " + EnumChatFormatting.AQUA + GT_Utility.formatNumbers(aY) + EnumChatFormatting.RESET + - " Z: " + EnumChatFormatting.AQUA + GT_Utility.formatNumbers(aZ) + EnumChatFormatting.RESET + - " D: " + EnumChatFormatting.AQUA + aWorld.provider.dimensionId + EnumChatFormatting.RESET + " -----" - ); + "----- X: " + EnumChatFormatting.AQUA + GT_Utility.formatNumbers(aX) + EnumChatFormatting.RESET + " Y: " + + EnumChatFormatting.AQUA + GT_Utility.formatNumbers(aY) + EnumChatFormatting.RESET + " Z: " + + EnumChatFormatting.AQUA + GT_Utility.formatNumbers(aZ) + EnumChatFormatting.RESET + " D: " + + EnumChatFormatting.AQUA + aWorld.provider.dimensionId + EnumChatFormatting.RESET + " -----"); if (aTileEntity instanceof ICoverable) { ICoverable tCoverable = (ICoverable) aTileEntity; - int tSide = tCoverable.getCoverItemAtSide((byte) aSide) != null ? aSide : - tCoverable.getCoverItemAtSide(GT_Utility.determineWrenchingSide((byte) aSide, hitX, hitY, hitZ)) != null ? - GT_Utility.determineWrenchingSide((byte) aSide, hitX, hitY, hitZ) : -1; + int tSide = tCoverable.getCoverItemAtSide((byte) aSide) != null + ? aSide + : tCoverable.getCoverItemAtSide(GT_Utility.determineWrenchingSide((byte) aSide, hitX, hitY, hitZ)) + != null + ? GT_Utility.determineWrenchingSide((byte) aSide, hitX, hitY, hitZ) + : -1; if (tSide != -1) { mStoredData = tCoverable.getComplexCoverDataAtSide((byte) tSide); mCoverType = tCoverable.getCoverIDAtSide((byte) tSide); - aList.add( - "Block Side: " + EnumChatFormatting.AQUA + ForgeDirection.getOrientation(tSide).name() + EnumChatFormatting.RESET - ); - aList.add( - "Cover Type: " + EnumChatFormatting.GREEN + tCoverable.getCoverItemAtSide((byte) tSide).getDisplayName() + EnumChatFormatting.RESET - ); - } - else { + aList.add("Block Side: " + EnumChatFormatting.AQUA + + ForgeDirection.getOrientation(tSide).name() + EnumChatFormatting.RESET); + aList.add("Cover Type: " + EnumChatFormatting.GREEN + + tCoverable.getCoverItemAtSide((byte) tSide).getDisplayName() + EnumChatFormatting.RESET); + } else { mStoredData = GregTech_API.sNoBehavior.createDataObject(); mCoverType = 0; - aList.add( - "No Cover Found" - ); + aList.add("No Cover Found"); } - } - else { + } else { mStoredData = GregTech_API.sNoBehavior.createDataObject(); mCoverType = 0; - aList.add( - "No Cover Found" - ); + aList.add("No Cover Found"); } } @@ -129,20 +141,21 @@ public class Behaviour_Cover_Tool extends Behaviour_None { GT_Utility.sendChatToPlayer(aPlayer, "Please Copy a Valid Cover First."); return; } - int tSide = tCoverable.getCoverItemAtSide((byte) aSide) != null ? aSide : - tCoverable.getCoverItemAtSide(GT_Utility.determineWrenchingSide((byte) aSide, hitX, hitY, hitZ)) != null ? - GT_Utility.determineWrenchingSide((byte) aSide, hitX, hitY, hitZ) : -1; + int tSide = tCoverable.getCoverItemAtSide((byte) aSide) != null + ? aSide + : tCoverable.getCoverItemAtSide(GT_Utility.determineWrenchingSide((byte) aSide, hitX, hitY, hitZ)) + != null + ? GT_Utility.determineWrenchingSide((byte) aSide, hitX, hitY, hitZ) + : -1; if (tSide != -1) { int tCoverID = tCoverable.getCoverIDAtSide((byte) tSide); if (tCoverID == mCoverType) { tCoverable.setCoverDataAtSide((byte) tSide, mStoredData); GT_Utility.sendChatToPlayer(aPlayer, "Cover Data Pasted."); - } - else { + } else { GT_Utility.sendChatToPlayer(aPlayer, "Not Matched Cover."); } - } - else { + } else { GT_Utility.sendChatToPlayer(aPlayer, "No Cover Found."); } } @@ -154,11 +167,11 @@ public class Behaviour_Cover_Tool extends Behaviour_None { NBTTagCompound tNBT = aStack.getTagCompound(); int tSize = tNBT.getInteger("dataLinesCount"); if (tSize < 1) throw new Exception(); - aList.add(EnumChatFormatting.BLUE+"Stored Cover Data:"); + aList.add(EnumChatFormatting.BLUE + "Stored Cover Data:"); for (int i = 0; i < tSize; i++) { aList.add(EnumChatFormatting.RESET + tNBT.getString("dataLines" + i)); } - } catch (Exception e){ + } catch (Exception e) { aList.add(this.mTooltip); } return aList; diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Crowbar.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Crowbar.java index afaa2f7016..866eb6b9e9 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Crowbar.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Crowbar.java @@ -20,7 +20,18 @@ public class Behaviour_Crowbar extends Behaviour_None { } @Override - public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUseFirst( + GT_MetaBase_Item aItem, + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { if (aWorld.isRemote) { return false; } diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_DataOrb.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_DataOrb.java index a5393cdec5..f219db6e0c 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_DataOrb.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_DataOrb.java @@ -2,12 +2,11 @@ package gregtech.common.items.behaviors; import gregtech.api.items.GT_MetaBase_Item; import gregtech.api.util.GT_Utility; +import java.util.List; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; -import java.util.List; - public class Behaviour_DataOrb extends Behaviour_None { public static void copyInventory(ItemStack[] aInventory, ItemStack[] aNewContent, int aIndexlength) { for (int i = 0; i < aIndexlength; i++) { diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_DataStick.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_DataStick.java index bf1c4a2be0..27efe7230d 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_DataStick.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_DataStick.java @@ -2,9 +2,8 @@ package gregtech.common.items.behaviors; import gregtech.api.items.GT_MetaBase_Item; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; - import java.util.List; +import net.minecraft.item.ItemStack; public class Behaviour_DataStick extends Behaviour_None { @Override @@ -24,34 +23,34 @@ public class Behaviour_DataStick extends Behaviour_None { tString = GT_Utility.ItemNBT.getPunchCardData(aStack); if (GT_Utility.isStringValid(tString)) { aList.add("Punch Card Data"); - int i = 0;int j = tString.length(); + int i = 0; + int j = tString.length(); for (; i < j; i += 64) { aList.add(tString.substring(i, Math.min(i + 64, j))); } } short sTier = GT_Utility.ItemNBT.getNBT(aStack).getShort("rocket_tier"); - if (sTier > 0 && sTier<100) { - aList.add("Rocket Schematic Tier: " + sTier); - }else if (sTier>=100) { - switch (sTier) { - case 100: { - aList.add("Moonbuggy Schematic"); - break; - } - case 101: { - aList.add("Cargo-Rocket Schematic"); - break; - } - case 102: { - aList.add("Astro-Miner Schematic"); - break; - } - } + if (sTier > 0 && sTier < 100) { + aList.add("Rocket Schematic Tier: " + sTier); + } else if (sTier >= 100) { + switch (sTier) { + case 100: { + aList.add("Moonbuggy Schematic"); + break; + } + case 101: { + aList.add("Cargo-Rocket Schematic"); + break; + } + case 102: { + aList.add("Astro-Miner Schematic"); + break; + } + } } - long lastUpdate = GT_Utility.ItemNBT.getNBT(aStack).getLong("lastUpdate"); - if (lastUpdate != 0) - aList.add(String.format("Last update at: %tc", lastUpdate)); - + long lastUpdate = GT_Utility.ItemNBT.getNBT(aStack).getLong("lastUpdate"); + if (lastUpdate != 0) aList.add(String.format("Last update at: %tc", lastUpdate)); + return aList; } } diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Hoe.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Hoe.java index 882f136cfa..6194537a5b 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Hoe.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Hoe.java @@ -6,6 +6,7 @@ import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Utility; import gregtech.api.util.WorldSpawnedEventBuilder; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -14,8 +15,6 @@ import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.player.UseHoeEvent; -import java.util.List; - public class Behaviour_Hoe extends Behaviour_None { private final int mCosts; private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.hoe", "Can till Dirt"); @@ -25,7 +24,18 @@ public class Behaviour_Hoe extends Behaviour_None { } @Override - public boolean onItemUse(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUse( + GT_MetaBase_Item aItem, + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { if (!aPlayer.canPlayerEdit(aX, aY, aZ, aSide, aStack)) { return false; } @@ -40,7 +50,9 @@ public class Behaviour_Hoe extends Behaviour_None { return true; } Block aBlock = aWorld.getBlock(aX, aY, aZ); - if ((aSide != 0) && (GT_Utility.isBlockAir(aWorld, aX, aY + 1, aZ)) && ((aBlock == Blocks.grass) || (aBlock == Blocks.dirt))) { + if ((aSide != 0) + && (GT_Utility.isBlockAir(aWorld, aX, aY + 1, aZ)) + && ((aBlock == Blocks.grass) || (aBlock == Blocks.dirt))) { new WorldSpawnedEventBuilder.SoundEventBuilder() .setVolume((Blocks.farmland.stepSound.getVolume() + 1.0F) / 2.0F) .setPitch(Blocks.farmland.stepSound.getPitch() * 0.8F) diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Lighter.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Lighter.java index 61081f060d..f18f9cd17a 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Lighter.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Lighter.java @@ -5,6 +5,7 @@ import gregtech.api.enums.SoundResource; import gregtech.api.items.GT_MetaBase_Item; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Utility; +import java.util.List; import net.minecraft.entity.Entity; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.player.EntityPlayer; @@ -15,18 +16,20 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import java.util.List; - public class Behaviour_Lighter extends Behaviour_None { private final ItemStack mEmptyLighter; private final ItemStack mUsedLighter; private final ItemStack mFullLighter; private final long mFuelAmount; - private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.lighter.tooltip", "Can light things on Fire"); - private final String mTooltipUses = GT_LanguageManager.addStringLocalization("gt.behaviour.lighter.uses", "Remaining Uses:"); - private final String mTooltipUnstackable = GT_LanguageManager.addStringLocalization("gt.behaviour.unstackable", "Not usable when stacked!"); + private final String mTooltip = + GT_LanguageManager.addStringLocalization("gt.behaviour.lighter.tooltip", "Can light things on Fire"); + private final String mTooltipUses = + GT_LanguageManager.addStringLocalization("gt.behaviour.lighter.uses", "Remaining Uses:"); + private final String mTooltipUnstackable = + GT_LanguageManager.addStringLocalization("gt.behaviour.unstackable", "Not usable when stacked!"); - public Behaviour_Lighter(ItemStack aEmptyLighter, ItemStack aUsedLighter, ItemStack aFullLighter, long aFuelAmount) { + public Behaviour_Lighter( + ItemStack aEmptyLighter, ItemStack aUsedLighter, ItemStack aFullLighter, long aFuelAmount) { this.mFullLighter = aFullLighter; this.mUsedLighter = aUsedLighter; this.mEmptyLighter = aEmptyLighter; @@ -43,7 +46,14 @@ public class Behaviour_Lighter extends Behaviour_None { prepare(aStack); long tFuelAmount = GT_Utility.ItemNBT.getLighterFuel(aStack); if (GT_Utility.areStacksEqual(aStack, this.mUsedLighter, true)) { - GT_Utility.sendSoundToPlayers(aPlayer.worldObj, SoundResource.FIRE_IGNITE, 1.0F, 1.0F, MathHelper.floor_double(aEntity.posX), MathHelper.floor_double(aEntity.posY), MathHelper.floor_double(aEntity.posZ)); + GT_Utility.sendSoundToPlayers( + aPlayer.worldObj, + SoundResource.FIRE_IGNITE, + 1.0F, + 1.0F, + MathHelper.floor_double(aEntity.posX), + MathHelper.floor_double(aEntity.posY), + MathHelper.floor_double(aEntity.posZ)); ((EntityCreeper) aEntity).func_146079_cb(); if (!aPlayer.capabilities.isCreativeMode) { tFuelAmount -= 1L; @@ -59,12 +69,34 @@ public class Behaviour_Lighter extends Behaviour_None { } @Override - public boolean onItemUse(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUse( + GT_MetaBase_Item aItem, + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { return false; } @Override - public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUseFirst( + GT_MetaBase_Item aItem, + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { if ((aWorld.isRemote) || (aStack.stackSize != 1)) { return false; } @@ -115,7 +147,11 @@ public class Behaviour_Lighter extends Behaviour_None { public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { aList.add(this.mTooltip); NBTTagCompound tNBT = aStack.getTagCompound(); - long tFuelAmount = tNBT == null ? 0L : GT_Utility.areStacksEqual(aStack, this.mFullLighter, true) ? this.mFuelAmount : tNBT.getLong("GT.LighterFuel"); + long tFuelAmount = tNBT == null + ? 0L + : GT_Utility.areStacksEqual(aStack, this.mFullLighter, true) + ? this.mFuelAmount + : tNBT.getLong("GT.LighterFuel"); aList.add(this.mTooltipUses + " " + tFuelAmount); aList.add(this.mTooltipUnstackable); return aList; diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java index def807e0ba..f40d200410 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java @@ -4,6 +4,7 @@ import gregtech.api.enums.SubTag; import gregtech.api.interfaces.IItemBehaviour; import gregtech.api.items.GT_MetaBase_Item; import gregtech.api.util.GT_Utility; +import java.util.List; import net.minecraft.block.BlockDispenser; import net.minecraft.dispenser.BehaviorDefaultDispenseItem; import net.minecraft.dispenser.IBlockSource; @@ -16,8 +17,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import java.util.List; - public class Behaviour_None implements IItemBehaviour<GT_MetaBase_Item> { @Override public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) { @@ -25,12 +24,34 @@ public class Behaviour_None implements IItemBehaviour<GT_MetaBase_Item> { } @Override - public boolean onItemUse(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUse( + GT_MetaBase_Item aItem, + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { return false; } @Override - public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUseFirst( + GT_MetaBase_Item aItem, + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { return false; } @@ -45,8 +66,8 @@ public class Behaviour_None implements IItemBehaviour<GT_MetaBase_Item> { } @Override - public void onUpdate(GT_MetaBase_Item aItem, ItemStack aStack, World aWorld, Entity aPlayer, int aTimer, boolean aIsInHand) { - } + public void onUpdate( + GT_MetaBase_Item aItem, ItemStack aStack, World aWorld, Entity aPlayer, int aTimer, boolean aIsInHand) {} @Override public boolean isItemStackUsable(GT_MetaBase_Item aItem, ItemStack aStack) { @@ -73,17 +94,30 @@ public class Behaviour_None implements IItemBehaviour<GT_MetaBase_Item> { } @Override - public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ) { + public EntityArrow getProjectile( + GT_MetaBase_Item aItem, + SubTag aProjectileType, + ItemStack aStack, + World aWorld, + double aX, + double aY, + double aZ) { return null; } @Override - public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed) { + public EntityArrow getProjectile( + GT_MetaBase_Item aItem, + SubTag aProjectileType, + ItemStack aStack, + World aWorld, + EntityLivingBase aEntity, + float aSpeed) { return null; - } + } @Deprecated - public String trans(String aKey, String aEnglish){ - return GT_Utility.trans(aKey, aEnglish); + public String trans(String aKey, String aEnglish) { + return GT_Utility.trans(aKey, aEnglish); } } diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Essentia.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Essentia.java index 8aa3c86057..959e97aff3 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Essentia.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Essentia.java @@ -5,6 +5,7 @@ import gregtech.api.items.GT_MetaBase_Item; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Utility; +import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; @@ -12,27 +13,42 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import thaumcraft.api.aspects.IEssentiaTransport; -import java.util.List; - public class Behaviour_Plunger_Essentia extends Behaviour_None { private final int mCosts; - private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.plunger.essentia", "Clears Essentia from Containers and Tubes"); + private final String mTooltip = GT_LanguageManager.addStringLocalization( + "gt.behaviour.plunger.essentia", "Clears Essentia from Containers and Tubes"); public Behaviour_Plunger_Essentia(int aCosts) { this.mCosts = aCosts; } @Override - public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUseFirst( + GT_MetaBase_Item aItem, + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { if (aWorld.isRemote) { return false; } TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (((aTileEntity instanceof IEssentiaTransport)) && ( - (aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { + if (((aTileEntity instanceof IEssentiaTransport)) + && ((aPlayer.capabilities.isCreativeMode) + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); for (ForgeDirection tDirection : ForgeDirection.VALID_DIRECTIONS) { - ((IEssentiaTransport) aTileEntity).takeEssentia(((IEssentiaTransport) aTileEntity).getEssentiaType(tDirection), ((IEssentiaTransport) aTileEntity).getEssentiaAmount(tDirection), tDirection); + ((IEssentiaTransport) aTileEntity) + .takeEssentia( + ((IEssentiaTransport) aTileEntity).getEssentiaType(tDirection), + ((IEssentiaTransport) aTileEntity).getEssentiaAmount(tDirection), + tDirection); } return true; } diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Fluid.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Fluid.java index 56d7418d71..be14a44d09 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Fluid.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Fluid.java @@ -8,6 +8,7 @@ import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Utility; +import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; @@ -15,18 +16,28 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.IFluidHandler; -import java.util.List; - public class Behaviour_Plunger_Fluid extends Behaviour_None { private final int mCosts; - private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.plunger.fluid", "Clears 1000 Liters of Fluid from Tanks"); + private final String mTooltip = GT_LanguageManager.addStringLocalization( + "gt.behaviour.plunger.fluid", "Clears 1000 Liters of Fluid from Tanks"); public Behaviour_Plunger_Fluid(int aCosts) { this.mCosts = aCosts; } @Override - public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUseFirst( + GT_MetaBase_Item aItem, + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { if (aWorld.isRemote) { return false; } @@ -34,14 +45,15 @@ public class Behaviour_Plunger_Fluid extends Behaviour_None { if ((aTileEntity instanceof IFluidHandler)) { for (ForgeDirection tDirection : ForgeDirection.VALID_DIRECTIONS) { if (((IFluidHandler) aTileEntity).drain(tDirection, 1000, false) != null) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + if ((aPlayer.capabilities.isCreativeMode) + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { ((IFluidHandler) aTileEntity).drain(tDirection, 1000, true); - GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers( + aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); return true; } } } - } if (aTileEntity instanceof IGregTechTileEntity) { IGregTechTileEntity tTileEntity = (IGregTechTileEntity) aTileEntity; @@ -50,7 +62,8 @@ public class Behaviour_Plunger_Fluid extends Behaviour_None { GT_MetaTileEntity_BasicTank machine = (GT_MetaTileEntity_BasicTank) mTileEntity; if (machine.mFluid != null && machine.mFluid.amount > 0) machine.mFluid.amount = machine.mFluid.amount - Math.min(machine.mFluid.amount, 1000); - GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers( + aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); return true; } } diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Item.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Item.java index c5f231b3a8..e98702629b 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Item.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Item.java @@ -8,25 +8,36 @@ import gregtech.api.items.GT_MetaBase_Item; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Utility; +import java.util.HashMap; +import java.util.List; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import java.util.HashMap; -import java.util.List; - public class Behaviour_Plunger_Item extends Behaviour_None { private final int mCosts; - private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.plunger.item", "Clears Items from Pipes"); + private final String mTooltip = + GT_LanguageManager.addStringLocalization("gt.behaviour.plunger.item", "Clears Items from Pipes"); public Behaviour_Plunger_Item(int aCosts) { this.mCosts = aCosts; } @Override - public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUseFirst( + GT_MetaBase_Item aItem, + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { if (aWorld.isRemote) { return false; } @@ -34,20 +45,30 @@ public class Behaviour_Plunger_Item extends Behaviour_None { if ((aTileEntity instanceof IGregTechTileEntity)) { IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aTileEntity).getMetaTileEntity(); if ((tMetaTileEntity instanceof IMetaTileEntityItemPipe)) { - for (IMetaTileEntityItemPipe tTileEntity : GT_Utility.sortMapByValuesAcending(IMetaTileEntityItemPipe.Util.scanPipes((IMetaTileEntityItemPipe) tMetaTileEntity, new HashMap<>(), 0L, false, true)).keySet()) { + for (IMetaTileEntityItemPipe tTileEntity : GT_Utility.sortMapByValuesAcending( + IMetaTileEntityItemPipe.Util.scanPipes( + (IMetaTileEntityItemPipe) tMetaTileEntity, new HashMap<>(), 0L, false, true)) + .keySet()) { int i = 0; for (int j = tTileEntity.getSizeInventory(); i < j; i++) { if (tTileEntity.isValidSlot(i)) { - if ((tTileEntity.getStackInSlot(i) != null) && ( - (aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { + if ((tTileEntity.getStackInSlot(i) != null) + && ((aPlayer.capabilities.isCreativeMode) + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { ItemStack tStack = tTileEntity.decrStackSize(i, 64); if (tStack != null) { - EntityItem tEntity = new EntityItem(aWorld, ((IGregTechTileEntity) aTileEntity).getOffsetX((byte) aSide, 1) + 0.5D, ((IGregTechTileEntity) aTileEntity).getOffsetY((byte) aSide, 1) + 0.5D, ((IGregTechTileEntity) aTileEntity).getOffsetZ((byte) aSide, 1) + 0.5D, tStack); + EntityItem tEntity = new EntityItem( + aWorld, + ((IGregTechTileEntity) aTileEntity).getOffsetX((byte) aSide, 1) + 0.5D, + ((IGregTechTileEntity) aTileEntity).getOffsetY((byte) aSide, 1) + 0.5D, + ((IGregTechTileEntity) aTileEntity).getOffsetZ((byte) aSide, 1) + 0.5D, + tStack); tEntity.motionX = 0.0D; tEntity.motionY = 0.0D; tEntity.motionZ = 0.0D; aWorld.spawnEntityInWorld(tEntity); - GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers( + aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); } return true; } diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_PrintedPages.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_PrintedPages.java index cdbd5e4424..7562c0fb80 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_PrintedPages.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_PrintedPages.java @@ -2,11 +2,10 @@ package gregtech.common.items.behaviors; import gregtech.api.items.GT_MetaBase_Item; import gregtech.api.util.GT_Utility; +import java.util.List; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import java.util.List; - public class Behaviour_PrintedPages extends Behaviour_None { public static String getTitle(ItemStack aStack) { NBTTagCompound tNBT = aStack.getTagCompound(); diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java index 5be17965cd..771e1f696f 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java @@ -13,6 +13,8 @@ import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.common.blocks.GT_Block_Ores_Abstract; import gregtech.common.blocks.GT_TileEntity_Ores; +import java.util.List; +import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.BlockLiquid; import net.minecraft.entity.player.EntityPlayer; @@ -23,13 +25,11 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.IFluidBlock; -import java.util.List; -import java.util.Random; - public class Behaviour_Prospecting extends Behaviour_None { private final int mVanillaCosts; private final int mEUCosts; - private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.prospecting", "Usable for Prospecting"); + private final String mTooltip = + GT_LanguageManager.addStringLocalization("gt.behaviour.prospecting", "Usable for Prospecting"); public Behaviour_Prospecting(int aVanillaCosts, int aEUCosts) { this.mVanillaCosts = aVanillaCosts; @@ -37,7 +37,18 @@ public class Behaviour_Prospecting extends Behaviour_None { } @Override - public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUseFirst( + GT_MetaBase_Item aItem, + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { if (aWorld.isRemote) { return false; } @@ -47,24 +58,29 @@ public class Behaviour_Prospecting extends Behaviour_None { } byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ); - ItemData tAssociation = GT_OreDictUnificator.getAssociation(new ItemStack(aBlock, 1, aMeta)); - if (tAssociation != null && tAssociation.mPrefix != null && tAssociation.mMaterial != null - && tAssociation.mPrefix.toString().startsWith("ore")) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("100", "This is ") + tAssociation.mMaterial.mMaterial.mDefaultLocalName + GT_Utility.trans("101", " Ore.")); + if (tAssociation != null + && tAssociation.mPrefix != null + && tAssociation.mMaterial != null + && tAssociation.mPrefix.toString().startsWith("ore")) { + GT_Utility.sendChatToPlayer( + aPlayer, + GT_Utility.trans("100", "This is ") + + tAssociation.mMaterial.mMaterial.mDefaultLocalName + + GT_Utility.trans("101", " Ore.")); GT_Utility.sendSoundToPlayers(aWorld, SoundResource.RANDOM_ANVIL_USE, 1.0F, -1.0F, aX, aY, aZ); return true; } - if (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone) || - aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack) || - aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone) || - aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockStones) || - aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockGranites) || - aBlock == GregTech_API.sBlockOresUb1 || - aBlock == GregTech_API.sBlockOresUb2 || - aBlock == GregTech_API.sBlockOresUb3 || - aBlock == GregTech_API.sBlockOres1) { + if (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone) + || aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack) + || aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone) + || aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockStones) + || aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockGranites) + || aBlock == GregTech_API.sBlockOresUb1 + || aBlock == GregTech_API.sBlockOresUb2 + || aBlock == GregTech_API.sBlockOresUb3 + || aBlock == GregTech_API.sBlockOres1) { if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) { GT_Utility.sendSoundToPlayers(aWorld, SoundResource.RANDOM_ANVIL_USE, 1.0F, -1.0F, aX, aY, aZ); int tMetaID; @@ -78,20 +94,24 @@ public class Behaviour_Prospecting extends Behaviour_None { tBlock = aWorld.getBlock(tX, tY, tZ); if (tBlock == Blocks.lava || tBlock == Blocks.flowing_lava) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("102", "There is Lava behind this Rock.")); + GT_Utility.sendChatToPlayer( + aPlayer, GT_Utility.trans("102", "There is Lava behind this Rock.")); break; } if (tBlock instanceof BlockLiquid || tBlock instanceof IFluidBlock) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("103", "There is a Liquid behind this Rock.")); + GT_Utility.sendChatToPlayer( + aPlayer, GT_Utility.trans("103", "There is a Liquid behind this Rock.")); break; } if (tBlock == Blocks.monster_egg || !GT_Utility.hasBlockHitBox(aWorld, tX, tY, tZ)) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("104", "There is an Air Pocket behind this Rock.")); + GT_Utility.sendChatToPlayer( + aPlayer, GT_Utility.trans("104", "There is an Air Pocket behind this Rock.")); break; } if (tBlock != aBlock) { if (i < 4) - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("105", "Material is changing behind this Rock.")); + GT_Utility.sendChatToPlayer( + aPlayer, GT_Utility.trans("105", "Material is changing behind this Rock.")); break; } } @@ -105,18 +125,29 @@ public class Behaviour_Prospecting extends Behaviour_None { if (tBlock instanceof GT_Block_Ores_Abstract) { TileEntity tTileEntity = aWorld.getTileEntity(tX, tY, tZ); if (tTileEntity instanceof GT_TileEntity_Ores) { - Materials tMaterial = GregTech_API.sGeneratedMaterials[((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000]; + Materials tMaterial = GregTech_API.sGeneratedMaterials[ + ((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000]; if (tMaterial != null && tMaterial != Materials._NULL) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("106", "Found traces of ") + tMaterial.mDefaultLocalName + GT_Utility.trans("101", " Ore.")); + GT_Utility.sendChatToPlayer( + aPlayer, + GT_Utility.trans("106", "Found traces of ") + + tMaterial.mDefaultLocalName + + GT_Utility.trans("101", " Ore.")); return true; } } } else { tMetaID = aWorld.getBlockMetadata(tX, tY, tZ); tAssociation = GT_OreDictUnificator.getAssociation(new ItemStack(tBlock, 1, tMetaID)); - if (tAssociation != null && tAssociation.mPrefix != null && tAssociation.mMaterial != null - && tAssociation.mPrefix.toString().startsWith("ore")) { - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("106", "Found traces of ") + tAssociation.mMaterial.mMaterial.mDefaultLocalName + GT_Utility.trans("101", " Ore.")); + if (tAssociation != null + && tAssociation.mPrefix != null + && tAssociation.mMaterial != null + && tAssociation.mPrefix.toString().startsWith("ore")) { + GT_Utility.sendChatToPlayer( + aPlayer, + GT_Utility.trans("106", "Found traces of ") + + tAssociation.mMaterial.mMaterial.mDefaultLocalName + + GT_Utility.trans("101", " Ore.")); return true; } } diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Scanner.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Scanner.java index 9f244a6162..a24105bf75 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Scanner.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Scanner.java @@ -5,6 +5,8 @@ import gregtech.api.interfaces.IItemBehaviour; import gregtech.api.items.GT_MetaBase_Item; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Utility; +import java.util.ArrayList; +import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; @@ -12,30 +14,42 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; -import java.util.ArrayList; -import java.util.List; - public class Behaviour_Scanner extends Behaviour_None { public static final IItemBehaviour<GT_MetaBase_Item> INSTANCE = new Behaviour_Scanner(); - private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.scanning", "Can scan Blocks in World"); + private final String mTooltip = + GT_LanguageManager.addStringLocalization("gt.behaviour.scanning", "Can scan Blocks in World"); @Override - public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUseFirst( + GT_MetaBase_Item aItem, + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { NBTTagCompound tNBT = aStack.getTagCompound(); if (((aPlayer instanceof EntityPlayerMP)) && (aItem.canUse(aStack, 20000.0D))) { ArrayList<String> tList = new ArrayList<>(); - if (aItem.use(aStack, GT_Utility.getCoordinateScan(tList, aPlayer, aWorld, 1, aX, aY, aZ, aSide, hitX, hitY, hitZ), aPlayer)) { - int tList_sS=tList.size(); - tNBT.setInteger("dataLinesCount",tList_sS); + if (aItem.use( + aStack, + GT_Utility.getCoordinateScan(tList, aPlayer, aWorld, 1, aX, aY, aZ, aSide, hitX, hitY, hitZ), + aPlayer)) { + int tList_sS = tList.size(); + tNBT.setInteger("dataLinesCount", tList_sS); for (int i = 0; i < tList_sS; i++) { - tNBT.setString("dataLines"+ i, tList.get(i)); + tNBT.setString("dataLines" + i, tList.get(i)); GT_Utility.sendChatToPlayer(aPlayer, tList.get(i)); } } return true; } GT_Utility.doSoundAtClient(SoundResource.IC2_TOOLS_OD_SCANNER, 1, 1.0F, aX, aY, aZ); - //doGuiAtClient() + // doGuiAtClient() return aPlayer instanceof EntityPlayerMP; } @@ -44,15 +58,14 @@ public class Behaviour_Scanner extends Behaviour_None { try { NBTTagCompound tNBT = aStack.getTagCompound(); int lines = tNBT.getInteger("dataLinesCount"); - if(lines<1) throw new Exception(); - aList.add(EnumChatFormatting.BLUE+"Block scan data result:"); + if (lines < 1) throw new Exception(); + aList.add(EnumChatFormatting.BLUE + "Block scan data result:"); for (int i = 0; i < lines; i++) { - aList.add(EnumChatFormatting.RESET+tNBT.getString("dataLines" + i)); + aList.add(EnumChatFormatting.RESET + tNBT.getString("dataLines" + i)); } - }catch(Exception e){ + } catch (Exception e) { aList.add(this.mTooltip); } return aList; } - } diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Scoop.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Scoop.java index 73190c5751..1cc81b764f 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Scoop.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Scoop.java @@ -6,16 +6,16 @@ import forestry.api.lepidopterology.IEntityButterfly; import gregtech.api.items.GT_MetaBase_Item; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.util.GT_LanguageManager; +import java.util.List; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import java.util.List; - public class Behaviour_Scoop extends Behaviour_None { private final int mCosts; - private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.scoop", "Catches Butterflies on Leftclick"); + private final String mTooltip = + GT_LanguageManager.addStringLocalization("gt.behaviour.scoop", "Catches Butterflies on Leftclick"); public Behaviour_Scoop(int aCosts) { this.mCosts = aCosts; @@ -27,10 +27,26 @@ public class Behaviour_Scoop extends Behaviour_None { if (aPlayer.worldObj.isRemote) { return true; } - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + if ((aPlayer.capabilities.isCreativeMode) + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { Object tButterfly = ((IEntityButterfly) aEntity).getButterfly(); - ((IButterfly) tButterfly).getGenome().getPrimary().getRoot().getBreedingTracker(aEntity.worldObj, aPlayer.getGameProfile()).registerCatch((IButterfly) tButterfly); - aPlayer.worldObj.spawnEntityInWorld(new EntityItem(aPlayer.worldObj, aEntity.posX, aEntity.posY, aEntity.posZ, ((IButterfly) tButterfly).getGenome().getPrimary().getRoot().getMemberStack(((IButterfly) tButterfly).copy(), EnumFlutterType.BUTTERFLY.ordinal()))); + ((IButterfly) tButterfly) + .getGenome() + .getPrimary() + .getRoot() + .getBreedingTracker(aEntity.worldObj, aPlayer.getGameProfile()) + .registerCatch((IButterfly) tButterfly); + aPlayer.worldObj.spawnEntityInWorld(new EntityItem( + aPlayer.worldObj, + aEntity.posX, + aEntity.posY, + aEntity.posZ, + ((IButterfly) tButterfly) + .getGenome() + .getPrimary() + .getRoot() + .getMemberStack( + ((IButterfly) tButterfly).copy(), EnumFlutterType.BUTTERFLY.ordinal()))); aEntity.setDead(); } return true; diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Screwdriver.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Screwdriver.java index a6e047cb6d..2ab5167453 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Screwdriver.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Screwdriver.java @@ -20,7 +20,18 @@ public class Behaviour_Screwdriver extends Behaviour_None { } @Override - public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUseFirst( + GT_MetaBase_Item aItem, + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { if (aWorld.isRemote) { return false; } diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Sense.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Sense.java index b75edf426c..4dfc685103 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Sense.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Sense.java @@ -4,23 +4,34 @@ import gregtech.api.items.GT_MetaBase_Item; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.util.GT_LanguageManager; import ic2.api.crops.ICropTile; +import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import java.util.List; - public class Behaviour_Sense extends Behaviour_None { private final int mCosts; - private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.sense", "Rightclick to harvest Crop Sticks"); + private final String mTooltip = + GT_LanguageManager.addStringLocalization("gt.behaviour.sense", "Rightclick to harvest Crop Sticks"); public Behaviour_Sense(int aCosts) { this.mCosts = aCosts; } @Override - public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUseFirst( + GT_MetaBase_Item aItem, + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { if (aWorld.isRemote) { return false; } @@ -29,8 +40,11 @@ public class Behaviour_Sense extends Behaviour_None { for (int i = -2; i < 3; i++) { for (int j = -2; j < 3; j++) { for (int k = -2; k < 3; k++) { - if ((aStack.stackSize > 0) && (((tTileEntity = aWorld.getTileEntity(aX + i, aY + j, aZ + k)) instanceof ICropTile)) && (((ICropTile) tTileEntity).harvest(true)) && (!aPlayer.capabilities.isCreativeMode)) { - ((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts/20); + if ((aStack.stackSize > 0) + && (((tTileEntity = aWorld.getTileEntity(aX + i, aY + j, aZ + k)) instanceof ICropTile)) + && (((ICropTile) tTileEntity).harvest(true)) + && (!aPlayer.capabilities.isCreativeMode)) { + ((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts / 20); } } } diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_SensorKit.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_SensorKit.java index 21d7168827..5b7fb8556f 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_SensorKit.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_SensorKit.java @@ -5,6 +5,7 @@ import gregtech.api.interfaces.tileentity.IGregTechDeviceInformation; import gregtech.api.items.GT_MetaBase_Item; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Utility; +import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.inventory.IInventory; @@ -13,19 +14,30 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import java.util.List; - public class Behaviour_SensorKit extends Behaviour_None { - private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.sensorkit.tooltip", "Used to display Information using the Mod Nuclear Control"); + private final String mTooltip = GT_LanguageManager.addStringLocalization( + "gt.behaviour.sensorkit.tooltip", "Used to display Information using the Mod Nuclear Control"); @Override - public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUseFirst( + GT_MetaBase_Item aItem, + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { if ((aPlayer instanceof EntityPlayerMP)) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (((tTileEntity instanceof IInventory)) && (!((IInventory) tTileEntity).isUseableByPlayer(aPlayer))) { return false; } - if (((tTileEntity instanceof IGregTechDeviceInformation)) && (((IGregTechDeviceInformation) tTileEntity).isGivingInformation())) { + if (((tTileEntity instanceof IGregTechDeviceInformation)) + && (((IGregTechDeviceInformation) tTileEntity).isGivingInformation())) { GT_Utility.setStack(aStack, ItemList.NC_SensorCard.get(aStack.stackSize)); NBTTagCompound tNBT = aStack.getTagCompound(); if (tNBT == null) { diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_SoftHammer.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_SoftHammer.java index e4edc6b8e2..a102e07dcb 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_SoftHammer.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_SoftHammer.java @@ -5,24 +5,35 @@ import gregtech.api.items.GT_MetaBase_Item; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Utility; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -import java.util.List; - public class Behaviour_SoftHammer extends Behaviour_None { private final int mCosts; - private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.softhammer", "Activates and Deactivates Machines"); + private final String mTooltip = + GT_LanguageManager.addStringLocalization("gt.behaviour.softhammer", "Activates and Deactivates Machines"); public Behaviour_SoftHammer(int aCosts) { this.mCosts = aCosts; } @Override - public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUseFirst( + GT_MetaBase_Item aItem, + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { if (aWorld.isRemote) { return false; } @@ -32,65 +43,88 @@ public class Behaviour_SoftHammer extends Behaviour_None { } byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ); if (aBlock == Blocks.lit_redstone_lamp) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + if ((aPlayer.capabilities.isCreativeMode) + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { aWorld.isRemote = true; aWorld.setBlock(aX, aY, aZ, Blocks.redstone_lamp, 0, 0); aWorld.isRemote = false; - GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers( + aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); } return true; } if (aBlock == Blocks.redstone_lamp) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + if ((aPlayer.capabilities.isCreativeMode) + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { aWorld.isRemote = true; aWorld.setBlock(aX, aY, aZ, Blocks.lit_redstone_lamp, 0, 0); aWorld.isRemote = false; - GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers( + aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); } return true; } if (aBlock == Blocks.golden_rail) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + if ((aPlayer.capabilities.isCreativeMode) + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { aWorld.isRemote = true; aWorld.setBlock(aX, aY, aZ, aBlock, (aMeta + 8) % 16, 0); aWorld.isRemote = false; - GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers( + aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); } return true; } if (aBlock == Blocks.activator_rail) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + if ((aPlayer.capabilities.isCreativeMode) + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { aWorld.isRemote = true; aWorld.setBlock(aX, aY, aZ, aBlock, (aMeta + 8) % 16, 0); aWorld.isRemote = false; - GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers( + aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); } return true; } if ((aBlock == Blocks.log) || (aBlock == Blocks.log2) || (aBlock == Blocks.hay_block)) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + if ((aPlayer.capabilities.isCreativeMode) + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (aMeta + 4) % 12, 3); } return true; } - if ((aBlock == Blocks.piston) || (aBlock == Blocks.sticky_piston) || (aBlock == Blocks.dispenser) || (aBlock == Blocks.dropper)) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + if ((aBlock == Blocks.piston) + || (aBlock == Blocks.sticky_piston) + || (aBlock == Blocks.dispenser) + || (aBlock == Blocks.dropper)) { + if ((aPlayer.capabilities.isCreativeMode) + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (aMeta + 1) % 6, 3); - GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers( + aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); } return true; } - if ((aBlock == Blocks.pumpkin) || (aBlock == Blocks.lit_pumpkin) || (aBlock == Blocks.furnace) || (aBlock == Blocks.lit_furnace) || (aBlock == Blocks.chest) || (aBlock == Blocks.trapped_chest)) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + if ((aBlock == Blocks.pumpkin) + || (aBlock == Blocks.lit_pumpkin) + || (aBlock == Blocks.furnace) + || (aBlock == Blocks.lit_furnace) + || (aBlock == Blocks.chest) + || (aBlock == Blocks.trapped_chest)) { + if ((aPlayer.capabilities.isCreativeMode) + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (aMeta - 1) % 4 + 2, 3); - GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers( + aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); } return true; } if (aBlock == Blocks.hopper) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + if ((aPlayer.capabilities.isCreativeMode) + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (aMeta + 1) % 6 != 1 ? (aMeta + 1) % 6 : 2, 3); - GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); + GT_Utility.sendSoundToPlayers( + aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); } return true; } diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Sonictron.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Sonictron.java index bcaa8242f3..c29591a560 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Sonictron.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Sonictron.java @@ -96,7 +96,18 @@ public class Behaviour_Sonictron extends Behaviour_None { } @Override - public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUseFirst( + GT_MetaBase_Item aItem, + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { setCurrentIndex(aStack, -1); return false; } @@ -108,12 +119,14 @@ public class Behaviour_Sonictron extends Behaviour_None { } @Override - public void onUpdate(GT_MetaBase_Item aItem, ItemStack aStack, World aWorld, Entity aPlayer, int aTimer, boolean aIsInHand) { + public void onUpdate( + GT_MetaBase_Item aItem, ItemStack aStack, World aWorld, Entity aPlayer, int aTimer, boolean aIsInHand) { int tTickTimer = getTickTimer(aStack); int tCurrentIndex = getCurrentIndex(aStack); if ((tTickTimer++ % 2 == 0) && (tCurrentIndex > -1)) { ItemStack[] tInventory = getNBTInventory(aStack); - GT_Values.GT.doSonictronSound(tInventory[tCurrentIndex], aPlayer.worldObj, aPlayer.posX, aPlayer.posY, aPlayer.posZ); + GT_Values.GT.doSonictronSound( + tInventory[tCurrentIndex], aPlayer.worldObj, aPlayer.posX, aPlayer.posY, aPlayer.posZ); tCurrentIndex++; if (tCurrentIndex > 63) { tCurrentIndex = -1; diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Spray_Color.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Spray_Color.java index d2d1d60240..2ea4eac2ad 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Spray_Color.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Spray_Color.java @@ -6,6 +6,9 @@ import gregtech.api.enums.SoundResource; import gregtech.api.items.GT_MetaBase_Item; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Utility; +import java.util.Arrays; +import java.util.Collection; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.BlockColored; import net.minecraft.entity.player.EntityPlayer; @@ -16,20 +19,25 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import java.util.Arrays; -import java.util.Collection; -import java.util.List; - public class Behaviour_Spray_Color extends Behaviour_None { private final ItemStack mEmpty; private final ItemStack mUsed; private final ItemStack mFull; private final long mUses; private final byte mColor; - private final Collection<Block> mAllowedVanillaBlocks = Arrays.asList(Blocks.glass, Blocks.glass_pane, Blocks.stained_glass, Blocks.stained_glass_pane, Blocks.carpet, Blocks.hardened_clay, ItemList.TE_Rockwool.getBlock()); + private final Collection<Block> mAllowedVanillaBlocks = Arrays.asList( + Blocks.glass, + Blocks.glass_pane, + Blocks.stained_glass, + Blocks.stained_glass_pane, + Blocks.carpet, + Blocks.hardened_clay, + ItemList.TE_Rockwool.getBlock()); private final String mTooltip; - private final String mTooltipUses = GT_LanguageManager.addStringLocalization("gt.behaviour.paintspray.uses", "Remaining Uses:"); - private final String mTooltipUnstackable = GT_LanguageManager.addStringLocalization("gt.behaviour.unstackable", "Not usable when stacked!"); + private final String mTooltipUses = + GT_LanguageManager.addStringLocalization("gt.behaviour.paintspray.uses", "Remaining Uses:"); + private final String mTooltipUnstackable = + GT_LanguageManager.addStringLocalization("gt.behaviour.unstackable", "Not usable when stacked!"); public Behaviour_Spray_Color(ItemStack aEmpty, ItemStack aUsed, ItemStack aFull, long aUses, int aColor) { this.mEmpty = aEmpty; @@ -37,11 +45,24 @@ public class Behaviour_Spray_Color extends Behaviour_None { this.mFull = aFull; this.mUses = aUses; this.mColor = ((byte) aColor); - this.mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.paintspray." + this.mColor + ".tooltip", "Can Color things in " + Dyes.get(this.mColor).mName); + this.mTooltip = GT_LanguageManager.addStringLocalization( + "gt.behaviour.paintspray." + this.mColor + ".tooltip", + "Can Color things in " + Dyes.get(this.mColor).mName); } @Override - public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUseFirst( + GT_MetaBase_Item aItem, + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { if ((aWorld.isRemote) || (aStack.stackSize != 1)) { return false; } @@ -88,7 +109,8 @@ public class Behaviour_Spray_Color extends Behaviour_None { private boolean colorize(World aWorld, int aX, int aY, int aZ, int aSide) { Block aBlock = aWorld.getBlock(aX, aY, aZ); - if ((aBlock != Blocks.air) && ((this.mAllowedVanillaBlocks.contains(aBlock)) || ((aBlock instanceof BlockColored)))) { + if ((aBlock != Blocks.air) + && ((this.mAllowedVanillaBlocks.contains(aBlock)) || ((aBlock instanceof BlockColored)))) { if (aBlock == Blocks.hardened_clay) { aWorld.setBlock(aX, aY, aZ, Blocks.stained_hardened_clay, (~this.mColor) & 0xF, 3); return true; @@ -114,7 +136,9 @@ public class Behaviour_Spray_Color extends Behaviour_None { public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { aList.add(this.mTooltip); NBTTagCompound tNBT = aStack.getTagCompound(); - long tRemainingPaint = tNBT == null ? 0L : GT_Utility.areStacksEqual(aStack, this.mFull, true) ? this.mUses : tNBT.getLong("GT.RemainingPaint"); + long tRemainingPaint = tNBT == null + ? 0L + : GT_Utility.areStacksEqual(aStack, this.mFull, true) ? this.mUses : tNBT.getLong("GT.RemainingPaint"); aList.add(this.mTooltipUses + " " + tRemainingPaint); aList.add(this.mTooltipUnstackable); return aList; diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Wrench.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Wrench.java index 2a29578706..8ccbe915b9 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Wrench.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Wrench.java @@ -7,6 +7,8 @@ import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; import ic2.api.tile.IWrenchable; +import java.util.Arrays; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; @@ -16,19 +18,28 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import java.util.Arrays; -import java.util.List; - public class Behaviour_Wrench extends Behaviour_None { private final int mCosts; - private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.wrench", "Rotates Blocks on Rightclick"); + private final String mTooltip = + GT_LanguageManager.addStringLocalization("gt.behaviour.wrench", "Rotates Blocks on Rightclick"); public Behaviour_Wrench(int aCosts) { this.mCosts = aCosts; } @Override - public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + public boolean onItemUseFirst( + GT_MetaBase_Item aItem, + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { if (aWorld.isRemote) { return false; } @@ -42,7 +53,8 @@ public class Behaviour_Wrench extends Behaviour_None { try { if (((aTileEntity instanceof IWrenchable))) { if (((IWrenchable) aTileEntity).wrenchCanSetFacing(aPlayer, aTargetSide)) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + if ((aPlayer.capabilities.isCreativeMode) + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { ((IWrenchable) aTileEntity).setFacing(aTargetSide); GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1.0F, aX, aY, aZ); } @@ -50,13 +62,16 @@ public class Behaviour_Wrench extends Behaviour_None { } if (((IWrenchable) aTileEntity).wrenchCanRemove(aPlayer)) { int tDamage = ((IWrenchable) aTileEntity).getWrenchDropRate() < 1.0F ? 10 : 3; - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, (long) tDamage * this.mCosts))) { + if ((aPlayer.capabilities.isCreativeMode) + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, (long) tDamage * this.mCosts))) { ItemStack tOutput = ((IWrenchable) aTileEntity).getWrenchDrop(aPlayer); for (ItemStack tStack : aBlock.getDrops(aWorld, aX, aY, aZ, aMeta, 0)) { if (tOutput == null) { - aWorld.spawnEntityInWorld(new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, tStack)); + aWorld.spawnEntityInWorld( + new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, tStack)); } else { - aWorld.spawnEntityInWorld(new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, tOutput)); + aWorld.spawnEntityInWorld( + new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, tOutput)); tOutput = null; } } @@ -70,69 +85,105 @@ public class Behaviour_Wrench extends Behaviour_None { } catch (Throwable ignored) { } if ((aBlock == Blocks.log) || (aBlock == Blocks.log2) || (aBlock == Blocks.hay_block)) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + if ((aPlayer.capabilities.isCreativeMode) + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (aMeta + 4) % 12, 3); GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1.0F, aX, aY, aZ); } return true; } if ((aBlock == Blocks.powered_repeater) || (aBlock == Blocks.unpowered_repeater)) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + if ((aPlayer.capabilities.isCreativeMode) + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aMeta / 4 * 4 + (aMeta % 4 + 1) % 4, 3); GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1.0F, aX, aY, aZ); } return true; } if ((aBlock == Blocks.powered_comparator) || (aBlock == Blocks.unpowered_comparator)) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + if ((aPlayer.capabilities.isCreativeMode) + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aMeta / 4 * 4 + (aMeta % 4 + 1) % 4, 3); GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1.0F, aX, aY, aZ); } return true; } if ((aBlock == Blocks.crafting_table) || (aBlock == Blocks.bookshelf)) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { - aWorld.spawnEntityInWorld(new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, new ItemStack(aBlock, 1, aMeta))); + if ((aPlayer.capabilities.isCreativeMode) + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + aWorld.spawnEntityInWorld( + new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, new ItemStack(aBlock, 1, aMeta))); aWorld.setBlockToAir(aX, aY, aZ); GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1.0F, aX, aY, aZ); } return true; } if (aMeta == aTargetSide) { - if ((aBlock == Blocks.pumpkin) || (aBlock == Blocks.lit_pumpkin) || (aBlock == Blocks.piston) || (aBlock == Blocks.sticky_piston) || (aBlock == Blocks.dispenser) || (aBlock == Blocks.dropper) || (aBlock == Blocks.furnace) || (aBlock == Blocks.lit_furnace) || (aBlock == Blocks.chest) || (aBlock == Blocks.trapped_chest) || (aBlock == Blocks.ender_chest) || (aBlock == Blocks.hopper)) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { - aWorld.spawnEntityInWorld(new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, new ItemStack(aBlock, 1, 0))); + if ((aBlock == Blocks.pumpkin) + || (aBlock == Blocks.lit_pumpkin) + || (aBlock == Blocks.piston) + || (aBlock == Blocks.sticky_piston) + || (aBlock == Blocks.dispenser) + || (aBlock == Blocks.dropper) + || (aBlock == Blocks.furnace) + || (aBlock == Blocks.lit_furnace) + || (aBlock == Blocks.chest) + || (aBlock == Blocks.trapped_chest) + || (aBlock == Blocks.ender_chest) + || (aBlock == Blocks.hopper)) { + if ((aPlayer.capabilities.isCreativeMode) + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + aWorld.spawnEntityInWorld( + new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, new ItemStack(aBlock, 1, 0))); aWorld.setBlockToAir(aX, aY, aZ); GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1.0F, aX, aY, aZ); } return true; } } else { - if ((aBlock == Blocks.piston) || (aBlock == Blocks.sticky_piston) || (aBlock == Blocks.dispenser) || (aBlock == Blocks.dropper)) { - if ((aMeta < 6) && ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { + if ((aBlock == Blocks.piston) + || (aBlock == Blocks.sticky_piston) + || (aBlock == Blocks.dispenser) + || (aBlock == Blocks.dropper)) { + if ((aMeta < 6) + && ((aPlayer.capabilities.isCreativeMode) + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aTargetSide, 3); GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1.0F, aX, aY, aZ); } return true; } - if ((aBlock == Blocks.pumpkin) || (aBlock == Blocks.lit_pumpkin) || (aBlock == Blocks.furnace) || (aBlock == Blocks.lit_furnace) || (aBlock == Blocks.chest) || (aBlock == Blocks.ender_chest) || (aBlock == Blocks.trapped_chest)) { - if ((aTargetSide > 1) && ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { + if ((aBlock == Blocks.pumpkin) + || (aBlock == Blocks.lit_pumpkin) + || (aBlock == Blocks.furnace) + || (aBlock == Blocks.lit_furnace) + || (aBlock == Blocks.chest) + || (aBlock == Blocks.ender_chest) + || (aBlock == Blocks.trapped_chest)) { + if ((aTargetSide > 1) + && ((aPlayer.capabilities.isCreativeMode) + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aTargetSide, 3); GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1.0F, aX, aY, aZ); } return true; } if (aBlock == Blocks.hopper) { - if ((aTargetSide != 1) && ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { + if ((aTargetSide != 1) + && ((aPlayer.capabilities.isCreativeMode) + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aTargetSide, 3); GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1.0F, aX, aY, aZ); } return true; } } - if ((Arrays.asList(aBlock.getValidRotations(aWorld, aX, aY, aZ)).contains(ForgeDirection.getOrientation(aTargetSide))) && - ((aPlayer.capabilities.isCreativeMode) || (!GT_ModHandler.isElectricItem(aStack)) || (GT_ModHandler.canUseElectricItem(aStack, this.mCosts))) && - (aBlock.rotateBlock(aWorld, aX, aY, aZ, ForgeDirection.getOrientation(aTargetSide)))) { + if ((Arrays.asList(aBlock.getValidRotations(aWorld, aX, aY, aZ)) + .contains(ForgeDirection.getOrientation(aTargetSide))) + && ((aPlayer.capabilities.isCreativeMode) + || (!GT_ModHandler.isElectricItem(aStack)) + || (GT_ModHandler.canUseElectricItem(aStack, this.mCosts))) + && (aBlock.rotateBlock(aWorld, aX, aY, aZ, ForgeDirection.getOrientation(aTargetSide)))) { if (!aPlayer.capabilities.isCreativeMode) { ((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts); } diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_WrittenBook.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_WrittenBook.java index e9a771a894..c923a54948 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_WrittenBook.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_WrittenBook.java @@ -4,6 +4,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.items.GT_MetaBase_Item; import gregtech.api.util.GT_Utility; +import java.util.List; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.client.gui.GuiScreenBook; @@ -11,13 +12,23 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -import java.util.List; - public class Behaviour_WrittenBook extends Behaviour_None { @Override @SideOnly(Side.CLIENT) - public boolean onItemUse(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { - if ((GT_Utility.isStringValid(GT_Utility.ItemNBT.getBookTitle(aStack))) && ((aPlayer instanceof EntityPlayerSP))) { + public boolean onItemUse( + GT_MetaBase_Item aItem, + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int aSide, + float hitX, + float hitY, + float hitZ) { + if ((GT_Utility.isStringValid(GT_Utility.ItemNBT.getBookTitle(aStack))) + && ((aPlayer instanceof EntityPlayerSP))) { Minecraft.getMinecraft().displayGuiScreen(new GuiScreenBook(aPlayer, aStack, false)); } return true; diff --git a/src/main/java/gregtech/common/misc/GT_ClientPollutionMap.java b/src/main/java/gregtech/common/misc/GT_ClientPollutionMap.java index d666408807..b05e25e1c8 100644 --- a/src/main/java/gregtech/common/misc/GT_ClientPollutionMap.java +++ b/src/main/java/gregtech/common/misc/GT_ClientPollutionMap.java @@ -6,18 +6,17 @@ import net.minecraft.util.MathHelper; public class GT_ClientPollutionMap { private static final byte RADIUS = 24; - private static final byte DISTANCE_RELOAD_MAP = 5; //When player moved x chunks, shift the map to new center. - private static final byte SIZE = RADIUS*2+1; //Area to keep stored. + private static final byte DISTANCE_RELOAD_MAP = 5; // When player moved x chunks, shift the map to new center. + private static final byte SIZE = RADIUS * 2 + 1; // Area to keep stored. private int x0, z0; private int dim; private boolean initialized = false; - private static short[][] chunkMatrix; //short because reasons. + private static short[][] chunkMatrix; // short because reasons. - - public GT_ClientPollutionMap(){ } + public GT_ClientPollutionMap() {} public void reset() { initialized = false; @@ -33,11 +32,10 @@ public class GT_ClientPollutionMap { public void addChunkPollution(int chunkX, int chunkZ, int pollution) { EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer; - if (player == null || player.worldObj == null) - return; + if (player == null || player.worldObj == null) return; int playerXChunk = MathHelper.floor_double(player.posX) >> 4; - int playerZChunk = MathHelper.floor_double(player.posZ) >> 4; //posX/Z seems to be always loaded, + int playerZChunk = MathHelper.floor_double(player.posZ) >> 4; // posX/Z seems to be always loaded, if (!initialized) { initialize(playerXChunk, playerZChunk, player.dimension); @@ -51,62 +49,56 @@ public class GT_ClientPollutionMap { shiftCenter(playerXChunk, playerZChunk); int relX = chunkX - x0 + RADIUS; - if (relX >= SIZE || relX < 0) //out of bounds - return; + if (relX >= SIZE || relX < 0) // out of bounds + return; int relZ = chunkZ - z0 + RADIUS; - if (relZ >= SIZE || relZ < 0) //out of bounds - return; - - pollution = pollution/225; - if (pollution > Short.MAX_VALUE) //Sanity - chunkMatrix[relX][relZ] = Short.MAX_VALUE; //Max pollution = 7,3mill - else if (pollution < 0) - chunkMatrix[relX][relZ] = 0; - else - chunkMatrix[relX][relZ] = (short) (pollution); + if (relZ >= SIZE || relZ < 0) // out of bounds + return; + + pollution = pollution / 225; + if (pollution > Short.MAX_VALUE) // Sanity + chunkMatrix[relX][relZ] = Short.MAX_VALUE; // Max pollution = 7,3mill + else if (pollution < 0) chunkMatrix[relX][relZ] = 0; + else chunkMatrix[relX][relZ] = (short) (pollution); } - //xy interpolation, between 4 chunks as corners, unknown treated as 0. + // xy interpolation, between 4 chunks as corners, unknown treated as 0. public int getPollution(double fx, double fz) { - if (!initialized) - return 0; + if (!initialized) return 0; int x = MathHelper.floor_double(fx); int z = MathHelper.floor_double(fz); - int xDiff = ((x-8) >> 4) - x0; - int zDiff = ((z-8) >> 4) - z0; + int xDiff = ((x - 8) >> 4) - x0; + int zDiff = ((z - 8) >> 4) - z0; - if (xDiff < -RADIUS || zDiff < -RADIUS || xDiff >= RADIUS || zDiff >= RADIUS ) - return 0; + if (xDiff < -RADIUS || zDiff < -RADIUS || xDiff >= RADIUS || zDiff >= RADIUS) return 0; - //coordinates in shifted chunk. - x = (x-8) % 16; - z = (z-8) % 16; - if (x < 0) - x = 16+x; - if (z < 0) - z = 16+z; + // coordinates in shifted chunk. + x = (x - 8) % 16; + z = (z - 8) % 16; + if (x < 0) x = 16 + x; + if (z < 0) z = 16 + z; int xi = 15 - x; int zi = 15 - z; - //read pollution in 4 corner chunks - int offsetX = RADIUS+xDiff; - int offsetZ = RADIUS+zDiff; + // read pollution in 4 corner chunks + int offsetX = RADIUS + xDiff; + int offsetZ = RADIUS + zDiff; int c00 = chunkMatrix[offsetX][offsetZ]; - int c10 = chunkMatrix[offsetX+1][offsetZ]; - int c01 = chunkMatrix[offsetX][offsetZ+1]; - int c11 = chunkMatrix[offsetX+1][offsetZ+1]; + int c10 = chunkMatrix[offsetX + 1][offsetZ]; + int c01 = chunkMatrix[offsetX][offsetZ + 1]; + int c11 = chunkMatrix[offsetX + 1][offsetZ + 1]; - //Is divided by 15*15 but is handled when storing chunk data. - return c00*xi*zi + c10*x*zi + c01*xi*z + c11*x*z; + // Is divided by 15*15 but is handled when storing chunk data. + return c00 * xi * zi + c10 * x * zi + c01 * xi * z + c11 * x * z; } - //shift the matrix to fit new center + // shift the matrix to fit new center private void shiftCenter(int chunkX, int chunkZ) { int xDiff = chunkX - x0; int zDiff = chunkZ - z0; - boolean[] allEmpty = new boolean[SIZE]; //skip check z row if its empty. + boolean[] allEmpty = new boolean[SIZE]; // skip check z row if its empty. if (xDiff > 0) for (byte x = 0; x < SIZE; x++) { int xOff = x + xDiff; @@ -118,7 +110,7 @@ public class GT_ClientPollutionMap { } } else if (xDiff < 0) - for (byte x = SIZE-1; x >= 0; x--) { + for (byte x = SIZE - 1; x >= 0; x--) { int xOff = x + xDiff; if (xOff > 0) { chunkMatrix[x] = chunkMatrix[xOff].clone(); @@ -130,19 +122,17 @@ public class GT_ClientPollutionMap { if (zDiff > 0) for (byte x = 0; x < SIZE; x++) { - if (allEmpty[x]) - continue; - for (int z = 0; z < SIZE ; z++) { + if (allEmpty[x]) continue; + for (int z = 0; z < SIZE; z++) { int zOff = z + zDiff; chunkMatrix[x][z] = (zOff < SIZE) ? chunkMatrix[x][zOff] : 0; } } else if (zDiff < 0) for (byte x = 0; x < SIZE; x++) { - if (allEmpty[x]) - continue; - for (int z = SIZE-1; z >= 0 ; z--) { - int zOff = z+zDiff; + if (allEmpty[x]) continue; + for (int z = SIZE - 1; z >= 0; z--) { + int zOff = z + zDiff; chunkMatrix[x][z] = (zOff > 0) ? chunkMatrix[x][zOff] : 0; } } diff --git a/src/main/java/gregtech/common/misc/GT_Command.java b/src/main/java/gregtech/common/misc/GT_Command.java index 29fd7a0226..8c896253fa 100644 --- a/src/main/java/gregtech/common/misc/GT_Command.java +++ b/src/main/java/gregtech/common/misc/GT_Command.java @@ -7,17 +7,16 @@ import gregtech.api.interfaces.IGlobalWirelessEnergy; import gregtech.api.objects.GT_ChunkManager; import gregtech.api.util.GT_Utility; import gregtech.common.GT_Pollution; +import java.lang.reflect.Field; +import java.math.BigInteger; +import java.util.*; +import java.util.stream.Stream; import net.minecraft.command.CommandBase; import net.minecraft.command.ICommandSender; import net.minecraft.util.ChatComponentText; import net.minecraft.util.ChunkCoordinates; import net.minecraft.util.EnumChatFormatting; -import java.lang.reflect.Field; -import java.math.BigInteger; -import java.util.*; -import java.util.stream.Stream; - public final class GT_Command extends CommandBase implements IGlobalWirelessEnergy { @Override @@ -31,14 +30,16 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner } private void printHelp(ICommandSender sender) { - sender.addChatMessage(new ChatComponentText("Usage: gt <toggle|chunks|pollution|global_energy_add|global_energy_set|global_energy_join>")); + sender.addChatMessage(new ChatComponentText( + "Usage: gt <toggle|chunks|pollution|global_energy_add|global_energy_set|global_energy_join>")); sender.addChatMessage(new ChatComponentText("\"toggle D1\" - toggles general.Debug (D1)")); sender.addChatMessage(new ChatComponentText("\"toggle D2\" - toggles general.Debug2 (D2)")); sender.addChatMessage(new ChatComponentText("\"toggle debugCleanroom\" - toggles cleanroom debug log")); sender.addChatMessage(new ChatComponentText("\"toggle debugDriller\" - toggles oil drill debug log")); sender.addChatMessage(new ChatComponentText("\"toggle debugBlockPump\" - Possible issues with pumps")); sender.addChatMessage(new ChatComponentText("\"toggle debugBlockMiner\" - Possible issues with miners")); - sender.addChatMessage(new ChatComponentText("\"toggle debugEntityCramming\" - How long it takes and how many entities it finds")); + sender.addChatMessage(new ChatComponentText( + "\"toggle debugEntityCramming\" - How long it takes and how many entities it finds")); sender.addChatMessage(new ChatComponentText("\"toggle debugWorldGen\" - toggles generic worldgen debug")); sender.addChatMessage(new ChatComponentText("\"toggle debugOrevein\" - toggles worldgen ore vein debug")); sender.addChatMessage(new ChatComponentText("\"toggle debugSmallOres\" - toggles worldgen small vein debug")); @@ -47,33 +48,70 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner sender.addChatMessage(new ChatComponentText("\"toggle debugMulti\" - toggles structurelib debug")); sender.addChatMessage(new ChatComponentText("\"chunks\" - print a list of the force loaded chunks")); sender.addChatMessage(new ChatComponentText( - "\"pollution <amount>\" - adds the <amount> of the pollution to the current chunk, " + - "\n if <amount> isnt specified, will add" + GT_Mod.gregtechproxy.mPollutionSmogLimit + "gibbl." - )); + "\"pollution <amount>\" - adds the <amount> of the pollution to the current chunk, " + + "\n if <amount> isnt specified, will add" + GT_Mod.gregtechproxy.mPollutionSmogLimit + + "gibbl.")); sender.addChatMessage(new ChatComponentText(EnumChatFormatting.GOLD + " --- Global wireless EU controls ---")); sender.addChatMessage(new ChatComponentText("Allows you to set the amount of EU in a users wireless network.")); - sender.addChatMessage(new ChatComponentText("Usage:" + EnumChatFormatting.RED + " global_energy_set " + EnumChatFormatting.BLUE + "[Name] " + EnumChatFormatting.LIGHT_PURPLE + "[EU]")); - sender.addChatMessage(new ChatComponentText("Allows you to add EU to a users wireless network. Also accepts negative numbers.")); - sender.addChatMessage(new ChatComponentText("Usage:" + EnumChatFormatting.RED + " global_energy_add " + EnumChatFormatting.BLUE + "[Name] " + EnumChatFormatting.LIGHT_PURPLE + "[EU]")); - sender.addChatMessage(new ChatComponentText("Allows you to join two users together into one network. Can be undone by writing the users name twice.")); - sender.addChatMessage(new ChatComponentText("Usage:" + EnumChatFormatting.RED + " global_energy_join " + EnumChatFormatting.BLUE + "[User joining] [User to join]")); + sender.addChatMessage(new ChatComponentText("Usage:" + EnumChatFormatting.RED + " global_energy_set " + + EnumChatFormatting.BLUE + "[Name] " + EnumChatFormatting.LIGHT_PURPLE + "[EU]")); + sender.addChatMessage(new ChatComponentText( + "Allows you to add EU to a users wireless network. Also accepts negative numbers.")); + sender.addChatMessage(new ChatComponentText("Usage:" + EnumChatFormatting.RED + " global_energy_add " + + EnumChatFormatting.BLUE + "[Name] " + EnumChatFormatting.LIGHT_PURPLE + "[EU]")); + sender.addChatMessage( + new ChatComponentText( + "Allows you to join two users together into one network. Can be undone by writing the users name twice.")); + sender.addChatMessage(new ChatComponentText("Usage:" + EnumChatFormatting.RED + " global_energy_join " + + EnumChatFormatting.BLUE + "[User joining] [User to join]")); sender.addChatMessage(new ChatComponentText("Shows the amount of EU in a users energy network.")); - sender.addChatMessage(new ChatComponentText("Usage:" + EnumChatFormatting.RED + " global_energy_display " + EnumChatFormatting.BLUE + "[Name]")); - + sender.addChatMessage(new ChatComponentText( + "Usage:" + EnumChatFormatting.RED + " global_energy_display " + EnumChatFormatting.BLUE + "[Name]")); } @Override public List addTabCompletionOptions(ICommandSender sender, String[] ss) { List<String> l = new ArrayList<>(); String test = ss.length == 0 ? "" : ss[0].trim(); - if (ss.length == 0 || ss.length == 1 && (test.isEmpty() || Stream.of("toggle", "chunks", "pollution", "global_energy_add", "global_energy_set", "global_energy_join", "global_energy_display").anyMatch(s -> s.startsWith(test)))) { - Stream.of("toggle", "chunks", "pollution", "global_energy_add", "global_energy_set", "global_energy_join", "global_energy_display") + if (ss.length == 0 + || ss.length == 1 + && (test.isEmpty() + || Stream.of( + "toggle", + "chunks", + "pollution", + "global_energy_add", + "global_energy_set", + "global_energy_join", + "global_energy_display") + .anyMatch(s -> s.startsWith(test)))) { + Stream.of( + "toggle", + "chunks", + "pollution", + "global_energy_add", + "global_energy_set", + "global_energy_join", + "global_energy_display") .filter(s -> test.isEmpty() || s.startsWith(test)) .forEach(l::add); } else if (test.equals("toggle")) { String test1 = ss[1].trim(); - Stream.of("D1", "D2", "debugCleanroom", "debugDriller", "debugBlockPump", "debugBlockMiner", "debugWorldGen", "debugEntityCramming", - "debugOrevein", "debugSmallOres", "debugStones", "debugChunkloaders", "debugMulti", "debugWorldData") + Stream.of( + "D1", + "D2", + "debugCleanroom", + "debugDriller", + "debugBlockPump", + "debugBlockMiner", + "debugWorldGen", + "debugEntityCramming", + "debugOrevein", + "debugSmallOres", + "debugStones", + "debugChunkloaders", + "debugMulti", + "debugWorldData") .filter(s -> test1.isEmpty() || s.startsWith(test1)) .forEach(l::add); } @@ -94,7 +132,8 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner } if ("debugMulti".equals(strings[1])) { StructureLib.DEBUG_MODE = !StructureLib.DEBUG_MODE; - sender.addChatMessage(new ChatComponentText(strings[1] + " = " + (StructureLib.DEBUG_MODE ? "true" : "false"))); + sender.addChatMessage( + new ChatComponentText(strings[1] + " = " + (StructureLib.DEBUG_MODE ? "true" : "false"))); return; } try { @@ -116,15 +155,10 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner break; case "pollution": ChunkCoordinates coordinates = sender.getPlayerCoordinates(); - int amount = (strings.length < 2) ? GT_Mod.gregtechproxy.mPollutionSmogLimit : Integer.parseInt(strings[1]); - GT_Pollution.addPollution(sender - .getEntityWorld() - .getChunkFromBlockCoords( - coordinates.posX, - coordinates.posZ - ), - amount - ); + int amount = + (strings.length < 2) ? GT_Mod.gregtechproxy.mPollutionSmogLimit : Integer.parseInt(strings[1]); + GT_Pollution.addPollution( + sender.getEntityWorld().getChunkFromBlockCoords(coordinates.posX, coordinates.posZ), amount); break; case "global_energy_add": { String username = strings[1]; @@ -136,23 +170,28 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner // Usage is /gt global_energy_add username EU if (uuid.equals("")) { - sender.addChatMessage(new ChatComponentText("User " + formatted_username + " has no global energy network.")); + sender.addChatMessage( + new ChatComponentText("User " + formatted_username + " has no global energy network.")); break; } - String EU_string_formatted = EnumChatFormatting.RED + GT_Utility.formatNumbers(new BigInteger(EU_String)) + EnumChatFormatting.RESET; + String EU_string_formatted = EnumChatFormatting.RED + + GT_Utility.formatNumbers(new BigInteger(EU_String)) + + EnumChatFormatting.RESET; if (addEUToGlobalEnergyMap(uuid, new BigInteger(EU_String))) - sender.addChatMessage(new ChatComponentText("Successfully added " - + EU_string_formatted + "EU to the global energy network of " + formatted_username + ".")); + sender.addChatMessage(new ChatComponentText("Successfully added " + EU_string_formatted + + "EU to the global energy network of " + formatted_username + ".")); else sender.addChatMessage(new ChatComponentText( - "Failed to add " + EU_string_formatted + "EU to the global energy map of " + - formatted_username + ". Insufficient energy in network. ")); + "Failed to add " + EU_string_formatted + "EU to the global energy map of " + + formatted_username + ". Insufficient energy in network. ")); - sender.addChatMessage(new ChatComponentText(formatted_username + " currently has " + EnumChatFormatting.RED + - GT_Utility.formatNumbers(new BigInteger(getUserEU(uuid).toString())) + EnumChatFormatting.RESET + - "EU in their network.")); + sender.addChatMessage( + new ChatComponentText(formatted_username + " currently has " + EnumChatFormatting.RED + + GT_Utility.formatNumbers( + new BigInteger(getUserEU(uuid).toString())) + + EnumChatFormatting.RESET + "EU in their network.")); break; } @@ -165,24 +204,24 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner String uuid = getUUIDFromUsername(username); if (uuid.equals("")) { - sender.addChatMessage(new ChatComponentText( - "User " + formatted_username + " has no global energy network.")); + sender.addChatMessage( + new ChatComponentText("User " + formatted_username + " has no global energy network.")); break; } String EU_String_0 = strings[2]; if ((new BigInteger(EU_String_0).compareTo(BigInteger.ZERO)) < 0) { - sender.addChatMessage(new ChatComponentText("Cannot set a users energy network to a negative value.")); + sender.addChatMessage( + new ChatComponentText("Cannot set a users energy network to a negative value.")); break; } setUserEU(uuid, new BigInteger(EU_String_0)); - sender.addChatMessage(new ChatComponentText( - "Successfully set " + formatted_username + "'s global energy network to " + EnumChatFormatting.RED + - GT_Utility.formatNumbers(new BigInteger(EU_String_0)) + EnumChatFormatting.RESET + "EU.") - ); + sender.addChatMessage(new ChatComponentText("Successfully set " + formatted_username + + "'s global energy network to " + EnumChatFormatting.RED + + GT_Utility.formatNumbers(new BigInteger(EU_String_0)) + EnumChatFormatting.RESET + "EU.")); break; } @@ -202,38 +241,40 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner if (uuid_1.equals("") && uuid_0.equals("")) { if (username_0.equals(username_1)) { sender.addChatMessage(new ChatComponentText( - "User " + formatted_username_0 + " has no global energy network.")); + "User " + formatted_username_0 + " has no global energy network.")); } else { - sender.addChatMessage(new ChatComponentText( - "User " + formatted_username_0 + " and " + formatted_username_1 + - " have no global energy networks.")); + sender.addChatMessage(new ChatComponentText("User " + formatted_username_0 + " and " + + formatted_username_1 + " have no global energy networks.")); } break; } if (uuid_0.equals("")) { - sender.addChatMessage(new ChatComponentText( - "User " + formatted_username_0 + " has no global energy network.")); + sender.addChatMessage( + new ChatComponentText("User " + formatted_username_0 + " has no global energy network.")); break; } if (uuid_1.equals("")) { - sender.addChatMessage(new ChatComponentText( - "User " + formatted_username_1 + " has no global energy network.")); + sender.addChatMessage( + new ChatComponentText("User " + formatted_username_1 + " has no global energy network.")); break; } if (uuid_0.equals(uuid_1)) { joinUserNetwork(uuid_0, uuid_1); - sender.addChatMessage(new ChatComponentText("User " + formatted_username_0 + - " has rejoined their own global energy network.")); + sender.addChatMessage(new ChatComponentText( + "User " + formatted_username_0 + " has rejoined their own global energy network.")); break; } joinUserNetwork(uuid_0, uuid_1); - sender.addChatMessage(new ChatComponentText("Success! " + formatted_username_0 + " has joined " + formatted_username_1 + ".")); - sender.addChatMessage(new ChatComponentText("To undo this simply join your own network again with /gt global_energy_join " + formatted_username_0 + " " + formatted_username_0 + ".")); + sender.addChatMessage(new ChatComponentText( + "Success! " + formatted_username_0 + " has joined " + formatted_username_1 + ".")); + sender.addChatMessage(new ChatComponentText( + "To undo this simply join your own network again with /gt global_energy_join " + + formatted_username_0 + " " + formatted_username_0 + ".")); break; } @@ -246,20 +287,20 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner String uuid = getUUIDFromUsername(username); if (uuid.equals("")) { - sender.addChatMessage(new ChatComponentText( - "User " + formatted_username + " has no global energy network.")); + sender.addChatMessage( + new ChatComponentText("User " + formatted_username + " has no global energy network.")); break; } - sender.addChatMessage(new ChatComponentText( - "User " + formatted_username + " has " - + EnumChatFormatting.RED + GT_Utility.formatNumbers(getUserEU(uuid)) + EnumChatFormatting.RESET + sender.addChatMessage(new ChatComponentText("User " + formatted_username + " has " + + EnumChatFormatting.RED + GT_Utility.formatNumbers(getUserEU(uuid)) + EnumChatFormatting.RESET + "EU in their network.")); break; } default: - sender.addChatMessage(new ChatComponentText( EnumChatFormatting.RED + "Invalid command/syntax detected.")); + sender.addChatMessage( + new ChatComponentText(EnumChatFormatting.RED + "Invalid command/syntax detected.")); printHelp(sender); } } diff --git a/src/main/java/gregtech/common/misc/GT_DrillingLogicDelegate.java b/src/main/java/gregtech/common/misc/GT_DrillingLogicDelegate.java index 8f06f70140..35a47fed87 100644 --- a/src/main/java/gregtech/common/misc/GT_DrillingLogicDelegate.java +++ b/src/main/java/gregtech/common/misc/GT_DrillingLogicDelegate.java @@ -1,25 +1,26 @@ package gregtech.common.misc; -import java.util.List; +import static gregtech.api.enums.GT_Values.debugBlockMiner; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; import gregtech.common.blocks.GT_TileEntity_Ores; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.FakePlayer; -import static gregtech.api.enums.GT_Values.debugBlockMiner; /** @author Relvl on 27.01.2022 */ @SuppressWarnings("ObjectEquality") public class GT_DrillingLogicDelegate { public static final ItemStack MINING_PIPE_STACK = GT_ModHandler.getIC2Item("miningPipe", 0); public static final Block MINING_PIPE_BLOCK = GT_Utility.getBlockFromStack(MINING_PIPE_STACK); - public static final Block MINING_PIPE_TIP_BLOCK = GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 0)); + public static final Block MINING_PIPE_TIP_BLOCK = + GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 0)); /** The owner machine pointer */ private final GT_IDrillingLogicDelegateOwner owner; @@ -139,7 +140,9 @@ public class GT_DrillingLogicDelegate { owner.getBaseMetaTileEntity().getWorld().setBlock(xCoord, actualDrillY + 1, zCoord, MINING_PIPE_TIP_BLOCK); } // Remove the old pipe tip - aBaseMetaTileEntity.getWorld().setBlock(xCoord, actualDrillY, zCoord, Blocks.air, 0, /*send to client without neighbour updates*/2); + aBaseMetaTileEntity + .getWorld() + .setBlock(xCoord, actualDrillY, zCoord, Blocks.air, 0, /*send to client without neighbour updates*/ 2); // Return the pipe back to the machine (inputs allowed for this case!) owner.pushOutputs(MINING_PIPE_STACK, 1, false, true); @@ -169,11 +172,18 @@ public class GT_DrillingLogicDelegate { short metaData = 0; TileEntity tTileEntity = owner.getBaseMetaTileEntity().getTileEntity(x, y, z); if (tTileEntity instanceof GT_TileEntity_Ores) { - metaData = ((GT_TileEntity_Ores)tTileEntity).mMetaData; + metaData = ((GT_TileEntity_Ores) tTileEntity).mMetaData; } ItemStack cobble = GT_Utility.getCobbleForOre(block, metaData); - te.getWorld().setBlock(x, y, z, Block.getBlockFromItem(cobble.getItem()), cobble.getItemDamage(), /*cause updates(1) + send to client(2)*/ 3); + te.getWorld() + .setBlock( + x, + y, + z, + Block.getBlockFromItem(cobble.getItem()), + cobble.getItemDamage(), /*cause updates(1) + send to client(2)*/ + 3); } /** Returns NEGATIVE (eg -5) depth of current drilling Y world level. RELATIVELY TO MINER ENTITY! This means '(miner world Y) + depth = (actual world Y)'. */ @@ -209,12 +219,19 @@ public class GT_DrillingLogicDelegate { } public boolean canFakePlayerInteract(IGregTechTileEntity te, int xCoord, int yCoord, int zCoord) { - return GT_Utility.setBlockByFakePlayer(getFakePlayer(te), xCoord, yCoord, zCoord, MINING_PIPE_TIP_BLOCK, 0, true); + return GT_Utility.setBlockByFakePlayer( + getFakePlayer(te), xCoord, yCoord, zCoord, MINING_PIPE_TIP_BLOCK, 0, true); } /** Get target block drops. We need to encapsulate everyting of mining in this class. */ private List<ItemStack> getBlockDrops(final Block oreBlock, int posX, int posY, int posZ) { - return oreBlock.getDrops(owner.getBaseMetaTileEntity().getWorld(), posX, posY, posZ, owner.getBaseMetaTileEntity().getMetaID(posX, posY, posZ), owner.getMachineTier()); + return oreBlock.getDrops( + owner.getBaseMetaTileEntity().getWorld(), + posX, + posY, + posZ, + owner.getBaseMetaTileEntity().getMetaID(posX, posY, posZ), + owner.getMachineTier()); } /** Can the owner continue doing its work? If we await new pipes - it cannot. */ diff --git a/src/main/java/gregtech/common/net/MessageSetFlaskCapacity.java b/src/main/java/gregtech/common/net/MessageSetFlaskCapacity.java index d9cffaa784..7ef0244b36 100644 --- a/src/main/java/gregtech/common/net/MessageSetFlaskCapacity.java +++ b/src/main/java/gregtech/common/net/MessageSetFlaskCapacity.java @@ -57,8 +57,7 @@ public final class MessageSetFlaskCapacity extends GT_Packet_New { ItemStack stack = ((EntityPlayer) w.getEntityByID(playerID)).getHeldItem(); if ((stack != null) && (stack.stackSize > 0)) { Item item = stack.getItem(); - if ((item instanceof GT_VolumetricFlask)) - ((GT_VolumetricFlask) item).setCapacity(stack, capacity); + if ((item instanceof GT_VolumetricFlask)) ((GT_VolumetricFlask) item).setCapacity(stack, capacity); } } } diff --git a/src/main/java/gregtech/common/power/BasicMachineEUPower.java b/src/main/java/gregtech/common/power/BasicMachineEUPower.java index aad3a72718..9a858838a9 100644 --- a/src/main/java/gregtech/common/power/BasicMachineEUPower.java +++ b/src/main/java/gregtech/common/power/BasicMachineEUPower.java @@ -14,10 +14,10 @@ public class BasicMachineEUPower extends EUPower { public void computePowerUsageAndDuration(int euPerTick, int duration) { super.computePowerUsageAndDuration(euPerTick, duration); if (tier == 0) { - //Long time calculation + // Long time calculation long xMaxProgresstime = ((long) duration) << 1; if (xMaxProgresstime > Integer.MAX_VALUE - 1) { - //make impossible if too long + // make impossible if too long recipeEuPerTick = Integer.MAX_VALUE - 1; recipeDuration = Integer.MAX_VALUE - 1; } else { @@ -25,28 +25,28 @@ public class BasicMachineEUPower extends EUPower { recipeDuration = (int) xMaxProgresstime; } } else { - //Long EUt calculation + // Long EUt calculation long xEUt = euPerTick; - //Isnt too low EUt check? + // Isnt too low EUt check? long tempEUt = Math.max(xEUt, V[1]); recipeDuration = duration; while (tempEUt <= V[tier - 1] * (long) amperage) { - tempEUt <<= 2;//this actually controls overclocking - //xEUt *= 4;//this is effect of everclocking - recipeDuration >>= 1;//this is effect of overclocking - xEUt = recipeDuration == 0 ? xEUt >> 1 : xEUt << 2;//U know, if the time is less than 1 tick make the machine use 2x less power + tempEUt <<= 2; // this actually controls overclocking + // xEUt *= 4;//this is effect of everclocking + recipeDuration >>= 1; // this is effect of overclocking + xEUt = recipeDuration == 0 + ? xEUt >> 1 + : xEUt << 2; // U know, if the time is less than 1 tick make the machine use 2x less power } if (xEUt > Integer.MAX_VALUE - 1) { recipeEuPerTick = Integer.MAX_VALUE - 1; recipeDuration = Integer.MAX_VALUE - 1; } else { recipeEuPerTick = (int) xEUt; - if (recipeEuPerTick == 0) - recipeEuPerTick = 1; - if (recipeDuration == 0) - recipeDuration = 1;//set time to 1 tick + if (recipeEuPerTick == 0) recipeEuPerTick = 1; + if (recipeDuration == 0) recipeDuration = 1; // set time to 1 tick } } wasOverclocked = checkIfOverclocked(); diff --git a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BasicLogic.java b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BasicLogic.java index ab4f7eda69..41ccf9f98c 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BasicLogic.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BasicLogic.java @@ -26,21 +26,41 @@ public class GT_Circuit_BasicLogic extends GT_CircuitryBehavior { @Override public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { if (aCircuitData[0] < 2) { - aRedstoneCircuitBlock.setRedstone((byte) (aCircuitData[0] % 2 == (getAnyRedstone(aRedstoneCircuitBlock) ? 0 : 1) ? 15 : 0), aRedstoneCircuitBlock.getOutputFacing()); + aRedstoneCircuitBlock.setRedstone( + (byte) (aCircuitData[0] % 2 == (getAnyRedstone(aRedstoneCircuitBlock) ? 0 : 1) ? 15 : 0), + aRedstoneCircuitBlock.getOutputFacing()); } else if (aCircuitData[0] < 4) { - aRedstoneCircuitBlock.setRedstone((byte) (aCircuitData[0] % 2 == (getOneRedstone(aRedstoneCircuitBlock) ? 0 : 1) ? 15 : 0), aRedstoneCircuitBlock.getOutputFacing()); + aRedstoneCircuitBlock.setRedstone( + (byte) (aCircuitData[0] % 2 == (getOneRedstone(aRedstoneCircuitBlock) ? 0 : 1) ? 15 : 0), + aRedstoneCircuitBlock.getOutputFacing()); } else if (aCircuitData[0] < 6) { - aRedstoneCircuitBlock.setRedstone((byte) (aCircuitData[0] % 2 == (getAllRedstone(aRedstoneCircuitBlock) ? 0 : 1) ? 15 : 0), aRedstoneCircuitBlock.getOutputFacing()); + aRedstoneCircuitBlock.setRedstone( + (byte) (aCircuitData[0] % 2 == (getAllRedstone(aRedstoneCircuitBlock) ? 0 : 1) ? 15 : 0), + aRedstoneCircuitBlock.getOutputFacing()); } else if (aCircuitData[0] < 7) { - aRedstoneCircuitBlock.setRedstone((byte) (15 - getStrongestRedstone(aRedstoneCircuitBlock)), aRedstoneCircuitBlock.getOutputFacing()); + aRedstoneCircuitBlock.setRedstone( + (byte) (15 - getStrongestRedstone(aRedstoneCircuitBlock)), aRedstoneCircuitBlock.getOutputFacing()); } else if (aCircuitData[0] < 9) { - aRedstoneCircuitBlock.setRedstone((byte) ((aCircuitData[0] % 2 == 0 ? 15 : 0) ^ (getStrongestRedstone(aRedstoneCircuitBlock) | getWeakestRedstone(aRedstoneCircuitBlock))), aRedstoneCircuitBlock.getOutputFacing()); + aRedstoneCircuitBlock.setRedstone( + (byte) ((aCircuitData[0] % 2 == 0 ? 15 : 0) + ^ (getStrongestRedstone(aRedstoneCircuitBlock) + | getWeakestRedstone(aRedstoneCircuitBlock))), + aRedstoneCircuitBlock.getOutputFacing()); } else if (aCircuitData[0] < 11) { - aRedstoneCircuitBlock.setRedstone((byte) ((aCircuitData[0] % 2 == 0 ? 15 : 0) ^ getStrongestRedstone(aRedstoneCircuitBlock) ^ getWeakestRedstone(aRedstoneCircuitBlock)), aRedstoneCircuitBlock.getOutputFacing()); + aRedstoneCircuitBlock.setRedstone( + (byte) ((aCircuitData[0] % 2 == 0 ? 15 : 0) + ^ getStrongestRedstone(aRedstoneCircuitBlock) + ^ getWeakestRedstone(aRedstoneCircuitBlock)), + aRedstoneCircuitBlock.getOutputFacing()); } else if (aCircuitData[0] < 13) { - aRedstoneCircuitBlock.setRedstone((byte) ((aCircuitData[0] % 2 == 0 ? 15 : 0) ^ getStrongestRedstone(aRedstoneCircuitBlock) & getWeakestRedstone(aRedstoneCircuitBlock)), aRedstoneCircuitBlock.getOutputFacing()); + aRedstoneCircuitBlock.setRedstone( + (byte) ((aCircuitData[0] % 2 == 0 ? 15 : 0) + ^ getStrongestRedstone(aRedstoneCircuitBlock) & getWeakestRedstone(aRedstoneCircuitBlock)), + aRedstoneCircuitBlock.getOutputFacing()); } else if (aCircuitData[0] < 14) { - aRedstoneCircuitBlock.setRedstone((byte) (getStrongestRedstone(aRedstoneCircuitBlock) ^ 0xF), aRedstoneCircuitBlock.getOutputFacing()); + aRedstoneCircuitBlock.setRedstone( + (byte) (getStrongestRedstone(aRedstoneCircuitBlock) ^ 0xF), + aRedstoneCircuitBlock.getOutputFacing()); } } diff --git a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BitAnd.java b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BitAnd.java index 2ea61ddf51..501f7b7785 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BitAnd.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BitAnd.java @@ -46,7 +46,17 @@ public class GT_Circuit_BitAnd extends GT_CircuitryBehavior { @Override public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { - aRedstoneCircuitBlock.setRedstone((byte) ((getStrongestRedstone(aRedstoneCircuitBlock) & (aCircuitData[0] | aCircuitData[1] << 1 | aCircuitData[2] << 2 | aCircuitData[3] << 3)) != 0 ? 15 : 0), aRedstoneCircuitBlock.getOutputFacing()); + aRedstoneCircuitBlock.setRedstone( + (byte) + ((getStrongestRedstone(aRedstoneCircuitBlock) + & (aCircuitData[0] + | aCircuitData[1] << 1 + | aCircuitData[2] << 2 + | aCircuitData[3] << 3)) + != 0 + ? 15 + : 0), + aRedstoneCircuitBlock.getOutputFacing()); } @Override diff --git a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Equals.java b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Equals.java index f5bd99e09e..c493e32e29 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Equals.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Equals.java @@ -32,7 +32,12 @@ public class GT_Circuit_Equals extends GT_CircuitryBehavior { @Override public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { - aRedstoneCircuitBlock.setRedstone(((byte) (((aCircuitData[1] != 0) == (getStrongestRedstone(aRedstoneCircuitBlock) == aCircuitData[0])) ? 0 : 15)), aRedstoneCircuitBlock.getOutputFacing()); + aRedstoneCircuitBlock.setRedstone( + ((byte) + (((aCircuitData[1] != 0) == (getStrongestRedstone(aRedstoneCircuitBlock) == aCircuitData[0])) + ? 0 + : 15)), + aRedstoneCircuitBlock.getOutputFacing()); } @Override diff --git a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Pulser.java b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Pulser.java index d1360df7cb..844817e4c3 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Pulser.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Pulser.java @@ -3,8 +3,7 @@ package gregtech.common.redstonecircuits; import gregtech.api.interfaces.IRedstoneCircuitBlock; import gregtech.api.util.GT_CircuitryBehavior; -public class GT_Circuit_Pulser - extends GT_CircuitryBehavior { +public class GT_Circuit_Pulser extends GT_CircuitryBehavior { public GT_Circuit_Pulser(int aIndex) { super(aIndex); } @@ -34,7 +33,9 @@ public class GT_Circuit_Pulser @Override public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { - byte tRedstone = aCircuitData[1] == 0 ? getWeakestNonZeroRedstone(aRedstoneCircuitBlock) : getStrongestRedstone(aRedstoneCircuitBlock); + byte tRedstone = aCircuitData[1] == 0 + ? getWeakestNonZeroRedstone(aRedstoneCircuitBlock) + : getStrongestRedstone(aRedstoneCircuitBlock); if (aCircuitData[4] == 0) { aCircuitData[5] = tRedstone; } @@ -47,7 +48,12 @@ public class GT_Circuit_Pulser aCircuitData[4] = 0; } } - aRedstoneCircuitBlock.setRedstone((byte) ((aCircuitData[4] > 0) && (aCircuitData[4] <= aCircuitData[0]) ? (byte) aCircuitData[1] : (aCircuitData[1] <= 0) || (aCircuitData[1] > 15) ? (byte) aCircuitData[5] : 0), aRedstoneCircuitBlock.getOutputFacing()); + aRedstoneCircuitBlock.setRedstone( + (byte) + ((aCircuitData[4] > 0) && (aCircuitData[4] <= aCircuitData[0]) + ? (byte) aCircuitData[1] + : (aCircuitData[1] <= 0) || (aCircuitData[1] > 15) ? (byte) aCircuitData[5] : 0), + aRedstoneCircuitBlock.getOutputFacing()); } @Override diff --git a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Randomizer.java b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Randomizer.java index a04e2e94d1..e666d50e99 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Randomizer.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Randomizer.java @@ -45,7 +45,8 @@ public class GT_Circuit_Randomizer extends GT_CircuitryBehavior { } if (aCircuitData[4] >= aCircuitData[0]) { aCircuitData[4] = 0; - aRedstoneCircuitBlock.setRedstone((byte) aRedstoneCircuitBlock.getRandom(16), aRedstoneCircuitBlock.getOutputFacing()); + aRedstoneCircuitBlock.setRedstone( + (byte) aRedstoneCircuitBlock.getRandom(16), aRedstoneCircuitBlock.getOutputFacing()); } } diff --git a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_RedstoneMeter.java b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_RedstoneMeter.java index 973e6f3963..2dd4f73bb5 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_RedstoneMeter.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_RedstoneMeter.java @@ -50,7 +50,13 @@ public class GT_Circuit_RedstoneMeter extends GT_CircuitryBehavior { @Override public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { byte tRedstone = getStrongestRedstone(aRedstoneCircuitBlock); - aRedstoneCircuitBlock.setRedstone((byte) (((tRedstone >= aCircuitData[0]) && (tRedstone <= aCircuitData[1]) ? 1 : 0) != (aCircuitData[2] != 0 ? 1 : 0) ? (byte) aCircuitData[3] : 0), aRedstoneCircuitBlock.getOutputFacing()); + aRedstoneCircuitBlock.setRedstone( + (byte) + (((tRedstone >= aCircuitData[0]) && (tRedstone <= aCircuitData[1]) ? 1 : 0) + != (aCircuitData[2] != 0 ? 1 : 0) + ? (byte) aCircuitData[3] + : 0), + aRedstoneCircuitBlock.getOutputFacing()); } @Override diff --git a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Timer.java b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Timer.java index 57af0c4598..f207609940 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Timer.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Timer.java @@ -57,7 +57,9 @@ public class GT_Circuit_Timer extends GT_CircuitryBehavior { aRedstoneCircuitBlock.setRedstone((byte) 15, aRedstoneCircuitBlock.getOutputFacing()); aCircuitData[4] = 0; } else { - aRedstoneCircuitBlock.setRedstone((byte) ((aCircuitData[4] - aCircuitData[0]) % aCircuitData[2] == 0 ? 15 : 0), aRedstoneCircuitBlock.getOutputFacing()); + aRedstoneCircuitBlock.setRedstone( + (byte) ((aCircuitData[4] - aCircuitData[0]) % aCircuitData[2] == 0 ? 15 : 0), + aRedstoneCircuitBlock.getOutputFacing()); } } else { aRedstoneCircuitBlock.setRedstone((byte) 15, aRedstoneCircuitBlock.getOutputFacing()); diff --git a/src/main/java/gregtech/common/render/CosmicItemRendererGT.java b/src/main/java/gregtech/common/render/CosmicItemRendererGT.java index 0055e8ad08..d8539a6f9a 100644 --- a/src/main/java/gregtech/common/render/CosmicItemRendererGT.java +++ b/src/main/java/gregtech/common/render/CosmicItemRendererGT.java @@ -1,8 +1,7 @@ package gregtech.common.render; -import java.util.*; - import fox.spiteful.avaritia.render.CosmicItemRenderer; +import java.util.*; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.client.MinecraftForgeClient; @@ -10,65 +9,64 @@ import net.minecraftforge.oredict.OreDictionary; public class CosmicItemRendererGT extends CosmicItemRenderer { - private static CosmicItemRendererGT sInstance = null; - public static HashMap<Item, List<Integer>> sCosmicItemRendererGtMapping = new HashMap<Item, List<Integer>>(); - private static boolean sInit = false; + private static CosmicItemRendererGT sInstance = null; + public static HashMap<Item, List<Integer>> sCosmicItemRendererGtMapping = new HashMap<Item, List<Integer>>(); + private static boolean sInit = false; - public static void registerItemWithMeta(Item aItem, List<Integer> aMeta) { - if (aItem != null) { - if (aMeta == null || aMeta.isEmpty()) { - ArrayList<Integer> aWildCard = new ArrayList<Integer>(); - aWildCard.add(OreDictionary.WILDCARD_VALUE); - sCosmicItemRendererGtMapping.put(aItem, aWildCard); - } - else { - sCosmicItemRendererGtMapping.put(aItem, aMeta); - } - } - } + public static void registerItemWithMeta(Item aItem, List<Integer> aMeta) { + if (aItem != null) { + if (aMeta == null || aMeta.isEmpty()) { + ArrayList<Integer> aWildCard = new ArrayList<Integer>(); + aWildCard.add(OreDictionary.WILDCARD_VALUE); + sCosmicItemRendererGtMapping.put(aItem, aWildCard); + } else { + sCosmicItemRendererGtMapping.put(aItem, aMeta); + } + } + } - public static void registerItemWithMeta(Item aItem, int aMeta) { - if (aItem != null) { - ArrayList<Integer> aSingleMeta = new ArrayList<Integer>(); - aSingleMeta.add(aMeta); - sCosmicItemRendererGtMapping.put(aItem, aSingleMeta); - } - } + public static void registerItemWithMeta(Item aItem, int aMeta) { + if (aItem != null) { + ArrayList<Integer> aSingleMeta = new ArrayList<Integer>(); + aSingleMeta.add(aMeta); + sCosmicItemRendererGtMapping.put(aItem, aSingleMeta); + } + } - public static void init() { - if (sInstance == null) { - sInstance = new CosmicItemRendererGT(); - } - if (!sInit) { - for (Item aItem : sCosmicItemRendererGtMapping.keySet()) { MinecraftForgeClient.registerItemRenderer(aItem, sInstance); } - sInit = true; - } - } + public static void init() { + if (sInstance == null) { + sInstance = new CosmicItemRendererGT(); + } + if (!sInit) { + for (Item aItem : sCosmicItemRendererGtMapping.keySet()) { + MinecraftForgeClient.registerItemRenderer(aItem, sInstance); + } + sInit = true; + } + } - private boolean isSupported(ItemStack aStack) { - List<Integer> aMeta = sCosmicItemRendererGtMapping.get(aStack.getItem()); - if (aMeta != null && !aMeta.isEmpty()) { + private boolean isSupported(ItemStack aStack) { + List<Integer> aMeta = sCosmicItemRendererGtMapping.get(aStack.getItem()); + if (aMeta != null && !aMeta.isEmpty()) { - for (int meta : aMeta) { - if (meta == OreDictionary.WILDCARD_VALUE) { - return true; - } - else { - if (aStack.getItemDamage() == meta) { - return true; - } - } - } - } - return false; - } + for (int meta : aMeta) { + if (meta == OreDictionary.WILDCARD_VALUE) { + return true; + } else { + if (aStack.getItemDamage() == meta) { + return true; + } + } + } + } + return false; + } - @Override - public void renderItem(ItemRenderType type, ItemStack item, Object... data) { - if (!isSupported(item)) { - return; - } - super.renderItem(type, item, data); - } - + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + if (!isSupported(item)) { + return; + } + super.renderItem(type, item, data); + } } diff --git a/src/main/java/gregtech/common/render/GT_CapeRenderer.java b/src/main/java/gregtech/common/render/GT_CapeRenderer.java index 7609f6b257..0ec2778165 100644 --- a/src/main/java/gregtech/common/render/GT_CapeRenderer.java +++ b/src/main/java/gregtech/common/render/GT_CapeRenderer.java @@ -3,6 +3,7 @@ package gregtech.common.render; import gregtech.api.enums.GT_Values; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_Utility; +import java.util.Collection; import net.minecraft.client.entity.AbstractClientPlayer; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.renderer.entity.RenderManager; @@ -13,16 +14,16 @@ import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.event.RenderPlayerEvent; import org.lwjgl.opengl.GL11; -import java.util.Collection; - public class GT_CapeRenderer extends RenderPlayer { - private final ResourceLocation[] mCapes = { new ResourceLocation("gregtech:textures/BrainTechCape.png"), - new ResourceLocation("gregtech:textures/GregTechCape.png"), - new ResourceLocation("gregtech:textures/MrBrainCape.png"), - new ResourceLocation("gregtech:textures/GregoriusCape.png"), - new ResourceLocation("gregtech:textures/DonorCape.png"), - new ResourceLocation("gregtech:textures/DevCape.png"), - new ResourceLocation("gregtech:textures/TecCape.png")}; + private final ResourceLocation[] mCapes = { + new ResourceLocation("gregtech:textures/BrainTechCape.png"), + new ResourceLocation("gregtech:textures/GregTechCape.png"), + new ResourceLocation("gregtech:textures/MrBrainCape.png"), + new ResourceLocation("gregtech:textures/GregoriusCape.png"), + new ResourceLocation("gregtech:textures/DonorCape.png"), + new ResourceLocation("gregtech:textures/DevCape.png"), + new ResourceLocation("gregtech:textures/TecCape.png") + }; private final Collection<String> mCapeList; public GT_CapeRenderer(Collection<String> aCapeList) { @@ -44,7 +45,7 @@ public class GT_CapeRenderer extends RenderPlayer { return; } try { - ResourceLocation tResource = aPlayer.getLocationCape(); + ResourceLocation tResource = aPlayer.getLocationCape(); if (aPlayer.getDisplayName().equalsIgnoreCase("Friedi4321")) { tResource = this.mCapes[0]; } @@ -57,13 +58,13 @@ public class GT_CapeRenderer extends RenderPlayer { if (aPlayer.getDisplayName().equalsIgnoreCase("GregoriusT")) { tResource = this.mCapes[3]; } - if (this.mCapeList.contains(aPlayer.getDisplayName().toLowerCase()+":capedonor")) { + if (this.mCapeList.contains(aPlayer.getDisplayName().toLowerCase() + ":capedonor")) { tResource = this.mCapes[4]; } - if (this.mCapeList.contains(aPlayer.getDisplayName().toLowerCase()+":capedev")) { + if (this.mCapeList.contains(aPlayer.getDisplayName().toLowerCase() + ":capedev")) { tResource = this.mCapes[5]; } - if (this.mCapeList.contains(aPlayer.getDisplayName().toLowerCase()+":capetec")) { + if (this.mCapeList.contains(aPlayer.getDisplayName().toLowerCase() + ":capetec")) { tResource = this.mCapes[6]; } @@ -71,10 +72,17 @@ public class GT_CapeRenderer extends RenderPlayer { bindTexture(tResource); GL11.glPushMatrix(); GL11.glTranslatef(0.0F, 0.0F, 0.125F); - double d0 = aPlayer.field_71091_bM + (aPlayer.field_71094_bP - aPlayer.field_71091_bM) * aPartialTicks - (aPlayer.prevPosX + (aPlayer.posX - aPlayer.prevPosX) * aPartialTicks); - double d1 = aPlayer.field_71096_bN + (aPlayer.field_71095_bQ - aPlayer.field_71096_bN) * aPartialTicks - (aPlayer.prevPosY + (aPlayer.posY - aPlayer.prevPosY) * aPartialTicks); - double d2 = aPlayer.field_71097_bO + (aPlayer.field_71085_bR - aPlayer.field_71097_bO) * aPartialTicks - (aPlayer.prevPosZ + (aPlayer.posZ - aPlayer.prevPosZ) * aPartialTicks); - float f6 = aPlayer.prevRenderYawOffset + (aPlayer.renderYawOffset - aPlayer.prevRenderYawOffset) * aPartialTicks; + double d0 = aPlayer.field_71091_bM + + (aPlayer.field_71094_bP - aPlayer.field_71091_bM) * aPartialTicks + - (aPlayer.prevPosX + (aPlayer.posX - aPlayer.prevPosX) * aPartialTicks); + double d1 = aPlayer.field_71096_bN + + (aPlayer.field_71095_bQ - aPlayer.field_71096_bN) * aPartialTicks + - (aPlayer.prevPosY + (aPlayer.posY - aPlayer.prevPosY) * aPartialTicks); + double d2 = aPlayer.field_71097_bO + + (aPlayer.field_71085_bR - aPlayer.field_71097_bO) * aPartialTicks + - (aPlayer.prevPosZ + (aPlayer.posZ - aPlayer.prevPosZ) * aPartialTicks); + float f6 = aPlayer.prevRenderYawOffset + + (aPlayer.renderYawOffset - aPlayer.prevRenderYawOffset) * aPartialTicks; double d3 = MathHelper.sin(f6 * 3.141593F / 180.0F); double d4 = -MathHelper.cos(f6 * 3.141593F / 180.0F); float f7 = (float) d1 * 10.0F; @@ -90,7 +98,12 @@ public class GT_CapeRenderer extends RenderPlayer { f8 = 0.0F; } float f10 = aPlayer.prevCameraYaw + (aPlayer.cameraYaw - aPlayer.prevCameraYaw) * aPartialTicks; - f7 += MathHelper.sin((aPlayer.prevDistanceWalkedModified + (aPlayer.distanceWalkedModified - aPlayer.prevDistanceWalkedModified) * aPartialTicks) * 6.0F) * 32.0F * f10; + f7 += MathHelper.sin((aPlayer.prevDistanceWalkedModified + + (aPlayer.distanceWalkedModified - aPlayer.prevDistanceWalkedModified) + * aPartialTicks) + * 6.0F) + * 32.0F + * f10; if (aPlayer.isSneaking()) { f7 += 25.0F; } diff --git a/src/main/java/gregtech/common/render/GT_CopiedBlockTexture.java b/src/main/java/gregtech/common/render/GT_CopiedBlockTexture.java index ce089091d3..2f6c691253 100644 --- a/src/main/java/gregtech/common/render/GT_CopiedBlockTexture.java +++ b/src/main/java/gregtech/common/render/GT_CopiedBlockTexture.java @@ -57,9 +57,9 @@ public class GT_CopiedBlockTexture extends GT_TextureBase implements ITexture, I public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { startDrawingQuads(aRenderer, 0.0f, 1.0f, 0.0f); final IIcon aIcon = getIcon(ForgeDirection.UP.ordinal()); - new LightingHelper(aRenderer) - .setupLightingYPos(aBlock, aX, aY, aZ) - .setupColor(ForgeDirection.UP.ordinal(), 0xffffff); + new LightingHelper(aRenderer) + .setupLightingYPos(aBlock, aX, aY, aZ) + .setupColor(ForgeDirection.UP.ordinal(), 0xffffff); aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, aIcon); draw(aRenderer); } diff --git a/src/main/java/gregtech/common/render/GT_CopiedCTMBlockTexture.java b/src/main/java/gregtech/common/render/GT_CopiedCTMBlockTexture.java index 366da77420..5b9ed1bb29 100644 --- a/src/main/java/gregtech/common/render/GT_CopiedCTMBlockTexture.java +++ b/src/main/java/gregtech/common/render/GT_CopiedCTMBlockTexture.java @@ -14,7 +14,8 @@ class GT_CopiedCTMBlockTexture extends GT_TextureBase implements ITexture, IBloc private final byte mSide, mMeta; GT_CopiedCTMBlockTexture(Block aBlock, int aSide, int aMeta, short[] aRGBa, boolean allowAlpha) { - if (aRGBa.length != 4) throw new IllegalArgumentException("RGBa doesn't have 4 Values @ GT_CopiedCTMBlockTexture"); + if (aRGBa.length != 4) + throw new IllegalArgumentException("RGBa doesn't have 4 Values @ GT_CopiedCTMBlockTexture"); mBlock = aBlock; mSide = (byte) aSide; mMeta = (byte) aMeta; @@ -41,7 +42,8 @@ class GT_CopiedCTMBlockTexture extends GT_TextureBase implements ITexture, IBloc startDrawingQuads(aRenderer, 1.0f, 0.0f, 0.0f); new LightingHelper(aRenderer) .setupLightingXPos(aBlock, aX, aY, aZ) - .setupColor(ForgeDirection.EAST.ordinal(), mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ)); + .setupColor( + ForgeDirection.EAST.ordinal(), mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ)); aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, aIcon); draw(aRenderer); aRenderer.field_152631_f = false; @@ -53,7 +55,8 @@ class GT_CopiedCTMBlockTexture extends GT_TextureBase implements ITexture, IBloc final IIcon aIcon = getIcon(ForgeDirection.WEST.ordinal(), aX, aY, aZ, aRenderer); new LightingHelper(aRenderer) .setupLightingXNeg(aBlock, aX, aY, aZ) - .setupColor(ForgeDirection.WEST.ordinal(), mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ)); + .setupColor( + ForgeDirection.WEST.ordinal(), mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ)); aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, aIcon); draw(aRenderer); } @@ -75,7 +78,8 @@ class GT_CopiedCTMBlockTexture extends GT_TextureBase implements ITexture, IBloc final IIcon aIcon = getIcon(ForgeDirection.DOWN.ordinal(), aX, aY, aZ, aRenderer); new LightingHelper(aRenderer) .setupLightingYNeg(aBlock, aX, aY, aZ) - .setupColor(ForgeDirection.DOWN.ordinal(), mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ)); + .setupColor( + ForgeDirection.DOWN.ordinal(), mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ)); aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, aIcon); draw(aRenderer); } @@ -86,7 +90,8 @@ class GT_CopiedCTMBlockTexture extends GT_TextureBase implements ITexture, IBloc final IIcon aIcon = getIcon(ForgeDirection.SOUTH.ordinal(), aX, aY, aZ, aRenderer); new LightingHelper(aRenderer) .setupLightingZPos(aBlock, aX, aY, aZ) - .setupColor(ForgeDirection.SOUTH.ordinal(), mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ)); + .setupColor( + ForgeDirection.SOUTH.ordinal(), mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ)); aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, aIcon); draw(aRenderer); } @@ -98,7 +103,8 @@ class GT_CopiedCTMBlockTexture extends GT_TextureBase implements ITexture, IBloc aRenderer.field_152631_f = true; new LightingHelper(aRenderer) .setupLightingZNeg(aBlock, aX, aY, aZ) - .setupColor(ForgeDirection.NORTH.ordinal(), mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ)); + .setupColor( + ForgeDirection.NORTH.ordinal(), mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ)); aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, aIcon); draw(aRenderer); aRenderer.field_152631_f = false; diff --git a/src/main/java/gregtech/common/render/GT_FlaskRenderer.java b/src/main/java/gregtech/common/render/GT_FlaskRenderer.java index 48d9b0bf90..18fb47cffc 100644 --- a/src/main/java/gregtech/common/render/GT_FlaskRenderer.java +++ b/src/main/java/gregtech/common/render/GT_FlaskRenderer.java @@ -27,7 +27,6 @@ public final class GT_FlaskRenderer implements IItemRenderer { return type != ItemRenderType.FIRST_PERSON_MAP; } - @Override public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, IItemRenderer.ItemRendererHelper helper) { return type == ItemRenderType.ENTITY; @@ -85,7 +84,15 @@ public final class GT_FlaskRenderer implements IItemRenderer { if (type.equals(ItemRenderType.INVENTORY)) { DrawUtil.renderIcon(icon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { - ItemRenderer.renderItemIn2D(Tessellator.instance, icon.getMaxU(), icon.getMinV(), icon.getMinU(), icon.getMaxV(), icon.getIconWidth(), icon.getIconHeight(), 0.0625F); + ItemRenderer.renderItemIn2D( + Tessellator.instance, + icon.getMaxU(), + icon.getMinV(), + icon.getMinU(), + icon.getMaxV(), + icon.getIconWidth(), + icon.getIconHeight(), + 0.0625F); } GL11.glDisable(GL11.GL_ALPHA_TEST); GL11.glDisable(GL11.GL_BLEND); diff --git a/src/main/java/gregtech/common/render/GT_FluidDisplayStackRenderer.java b/src/main/java/gregtech/common/render/GT_FluidDisplayStackRenderer.java index c4e23eab6e..221c6cd8aa 100644 --- a/src/main/java/gregtech/common/render/GT_FluidDisplayStackRenderer.java +++ b/src/main/java/gregtech/common/render/GT_FluidDisplayStackRenderer.java @@ -21,24 +21,20 @@ public class GT_FluidDisplayStackRenderer implements IItemRenderer { } @Override - public boolean handleRenderType (ItemStack item, ItemRenderType type) - { - if(!item.hasTagCompound()) - return false; + public boolean handleRenderType(ItemStack item, ItemRenderType type) { + if (!item.hasTagCompound()) return false; return type == ItemRenderType.INVENTORY; } @Override - public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) - { - //not sure what this does. + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + // not sure what this does. return false; } @Override - public void renderItem (ItemRenderType type, ItemStack item, Object... data) { - if (item == null || item.getItem() == null || !(item.getItem() instanceof GT_FluidDisplayItem)) - return; + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + if (item == null || item.getItem() == null || !(item.getItem() instanceof GT_FluidDisplayItem)) return; OpenGlHelper.glBlendFunc(770, 771, 1, 0); GL11.glEnable(GL11.GL_BLEND); @@ -53,13 +49,13 @@ public class GT_FluidDisplayStackRenderer implements IItemRenderer { final float x_max = icon.getMaxU(); final float y_min = icon.getMinV(); final float y_max = icon.getMaxV(); - tess.addVertexWithUV( 0, 16, 0, x_min, y_max); + tess.addVertexWithUV(0, 16, 0, x_min, y_max); tess.addVertexWithUV(16, 16, 0, x_max, y_max); - tess.addVertexWithUV(16, 0, 0, x_max, y_min); - tess.addVertexWithUV( 0, 0, 0, x_min, y_min); + tess.addVertexWithUV(16, 0, 0, x_max, y_min); + tess.addVertexWithUV(0, 0, 0, x_min, y_min); tess.draw(); - if(item.getTagCompound() == null) { + if (item.getTagCompound() == null) { GL11.glDisable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_ALPHA_TEST); return; @@ -75,9 +71,10 @@ public class GT_FluidDisplayStackRenderer implements IItemRenderer { } else { int exp = (int) (Math.log(fluidAmount) / Math.log(1000)); double shortAmount = fluidAmount / Math.pow(1000, exp); - if ( shortAmount >= 100) { - amountString = String.format("%.0f%cL", shortAmount, "kMGTPE".charAt(exp - 1)); //heard it here first, PetaLiters - } else if ( shortAmount >= 10) { + if (shortAmount >= 100) { + amountString = String.format( + "%.0f%cL", shortAmount, "kMGTPE".charAt(exp - 1)); // heard it here first, PetaLiters + } else if (shortAmount >= 10) { amountString = String.format("%.1f%cL", shortAmount, "kMGTPE".charAt(exp - 1)); } else { amountString = String.format("%.2f%cL", shortAmount, "kMGTPE".charAt(exp - 1)); @@ -85,11 +82,12 @@ public class GT_FluidDisplayStackRenderer implements IItemRenderer { } FontRenderer fontRender = Minecraft.getMinecraft().fontRenderer; - float smallTextScale = fontRender.getUnicodeFlag() ? 3F/4F : 1F/2F; + float smallTextScale = fontRender.getUnicodeFlag() ? 3F / 4F : 1F / 2F; GL11.glDisable(GL11.GL_BLEND); GL11.glScalef(smallTextScale, smallTextScale, 1.0f); - fontRender.drawString( amountString, 0, (int) (16/smallTextScale) - fontRender.FONT_HEIGHT + 1, 0xFFFFFF, true); + fontRender.drawString( + amountString, 0, (int) (16 / smallTextScale) - fontRender.FONT_HEIGHT + 1, 0xFFFFFF, true); GL11.glScalef(1f, 1f, 1f); GL11.glDisable(GL11.GL_ALPHA_TEST); } diff --git a/src/main/java/gregtech/common/render/GT_MetaGenerated_Tool_Renderer.java b/src/main/java/gregtech/common/render/GT_MetaGenerated_Tool_Renderer.java index a57f97792c..52e99f4539 100644 --- a/src/main/java/gregtech/common/render/GT_MetaGenerated_Tool_Renderer.java +++ b/src/main/java/gregtech/common/render/GT_MetaGenerated_Tool_Renderer.java @@ -29,11 +29,15 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer { if ((GT_Utility.isStackInvalid(aStack)) || (aStack.getItemDamage() < 0)) { return false; } - return (aType == IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON) || (aType == IItemRenderer.ItemRenderType.INVENTORY) || (aType == IItemRenderer.ItemRenderType.EQUIPPED) || (aType == IItemRenderer.ItemRenderType.ENTITY); + return (aType == IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON) + || (aType == IItemRenderer.ItemRenderType.INVENTORY) + || (aType == IItemRenderer.ItemRenderType.EQUIPPED) + || (aType == IItemRenderer.ItemRenderType.ENTITY); } @Override - public boolean shouldUseRenderHelper(IItemRenderer.ItemRenderType aType, ItemStack aStack, IItemRenderer.ItemRendererHelper aHelper) { + public boolean shouldUseRenderHelper( + IItemRenderer.ItemRenderType aType, ItemStack aStack, IItemRenderer.ItemRendererHelper aHelper) { if (GT_Utility.isStackInvalid(aStack)) { return false; } @@ -72,7 +76,15 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer { if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) { GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { - ItemRenderer.renderItemIn2D(Tessellator.instance, tIcon.getMaxU(), tIcon.getMinV(), tIcon.getMinU(), tIcon.getMaxV(), tIcon.getIconWidth(), tIcon.getIconHeight(), 0.0625F); + ItemRenderer.renderItemIn2D( + Tessellator.instance, + tIcon.getMaxU(), + tIcon.getMinV(), + tIcon.getMinU(), + tIcon.getMaxV(), + tIcon.getIconWidth(), + tIcon.getIconHeight(), + 0.0625F); } GL11.glColor3f(1.0F, 1.0F, 1.0F); } @@ -82,7 +94,15 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer { if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) { GT_RenderUtil.renderItemIcon(tOverlay, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { - ItemRenderer.renderItemIn2D(Tessellator.instance, tOverlay.getMaxU(), tOverlay.getMinV(), tOverlay.getMinU(), tOverlay.getMaxV(), tOverlay.getIconWidth(), tOverlay.getIconHeight(), 0.0625F); + ItemRenderer.renderItemIn2D( + Tessellator.instance, + tOverlay.getMaxU(), + tOverlay.getMinV(), + tOverlay.getMinU(), + tOverlay.getMaxV(), + tOverlay.getIconWidth(), + tOverlay.getIconHeight(), + 0.0625F); } } } @@ -98,7 +118,15 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer { if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) { GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { - ItemRenderer.renderItemIn2D(Tessellator.instance, tIcon.getMaxU(), tIcon.getMinV(), tIcon.getMinU(), tIcon.getMaxV(), tIcon.getIconWidth(), tIcon.getIconHeight(), 0.0625F); + ItemRenderer.renderItemIn2D( + Tessellator.instance, + tIcon.getMaxU(), + tIcon.getMinV(), + tIcon.getMinU(), + tIcon.getMaxV(), + tIcon.getIconWidth(), + tIcon.getIconHeight(), + 0.0625F); } GL11.glColor3f(1.0F, 1.0F, 1.0F); } @@ -108,11 +136,20 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer { if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) { GT_RenderUtil.renderItemIcon(tOverlay, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { - ItemRenderer.renderItemIn2D(Tessellator.instance, tOverlay.getMaxU(), tOverlay.getMinV(), tOverlay.getMinU(), tOverlay.getMaxV(), tOverlay.getIconWidth(), tOverlay.getIconHeight(), 0.0625F); + ItemRenderer.renderItemIn2D( + Tessellator.instance, + tOverlay.getMaxU(), + tOverlay.getMinV(), + tOverlay.getMinU(), + tOverlay.getMaxV(), + tOverlay.getIconWidth(), + tOverlay.getIconHeight(), + 0.0625F); } } } - if ((aType == IItemRenderer.ItemRenderType.INVENTORY) && (GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) != Materials._NULL)) { + if ((aType == IItemRenderer.ItemRenderType.INVENTORY) + && (GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) != Materials._NULL)) { long tDamage = GT_MetaGenerated_Tool.getToolDamage(aStack); long tMaxDamage = GT_MetaGenerated_Tool.getToolMaxDamage(aStack); if (tDamage <= 0L) { @@ -120,7 +157,9 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer { } else if (tDamage >= tMaxDamage) { aIcon = gregtech.api.enums.Textures.ItemIcons.DURABILITY_BAR[0]; } else { - aIcon = gregtech.api.enums.Textures.ItemIcons.DURABILITY_BAR[((int) java.lang.Math.max(0L, java.lang.Math.min(7L, (tMaxDamage - tDamage) * 8L / tMaxDamage)))]; + aIcon = gregtech.api.enums.Textures.ItemIcons.DURABILITY_BAR[ + ((int) java.lang.Math.max( + 0L, java.lang.Math.min(7L, (tMaxDamage - tDamage) * 8L / tMaxDamage)))]; } if (aIcon != null) { IIcon tIcon = aIcon.getIcon(); @@ -131,7 +170,15 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer { if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) { GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { - ItemRenderer.renderItemIn2D(Tessellator.instance, tIcon.getMaxU(), tIcon.getMinV(), tIcon.getMinU(), tIcon.getMaxV(), tIcon.getIconWidth(), tIcon.getIconHeight(), 0.0625F); + ItemRenderer.renderItemIn2D( + Tessellator.instance, + tIcon.getMaxU(), + tIcon.getMinV(), + tIcon.getMinU(), + tIcon.getMaxV(), + tIcon.getIconWidth(), + tIcon.getIconHeight(), + 0.0625F); } } if (tOverlay != null) { @@ -140,7 +187,15 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer { if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) { GT_RenderUtil.renderItemIcon(tOverlay, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { - ItemRenderer.renderItemIn2D(Tessellator.instance, tOverlay.getMaxU(), tOverlay.getMinV(), tOverlay.getMinU(), tOverlay.getMaxV(), tOverlay.getIconWidth(), tOverlay.getIconHeight(), 0.0625F); + ItemRenderer.renderItemIn2D( + Tessellator.instance, + tOverlay.getMaxU(), + tOverlay.getMinV(), + tOverlay.getMinU(), + tOverlay.getMaxV(), + tOverlay.getIconWidth(), + tOverlay.getIconHeight(), + 0.0625F); } } } @@ -152,7 +207,10 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer { } else if (tCharge >= tStats[0]) { aIcon = gregtech.api.enums.Textures.ItemIcons.ENERGY_BAR[8]; } else { - aIcon = gregtech.api.enums.Textures.ItemIcons.ENERGY_BAR[(7 - (int) java.lang.Math.max(0L, java.lang.Math.min(6L, (tStats[0] - tCharge) * 7L / tStats[0])))]; + aIcon = gregtech.api.enums.Textures.ItemIcons.ENERGY_BAR[ + (7 + - (int) java.lang.Math.max( + 0L, java.lang.Math.min(6L, (tStats[0] - tCharge) * 7L / tStats[0])))]; } } else { aIcon = null; @@ -166,7 +224,15 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer { if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) { GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { - ItemRenderer.renderItemIn2D(Tessellator.instance, tIcon.getMaxU(), tIcon.getMinV(), tIcon.getMinU(), tIcon.getMaxV(), tIcon.getIconWidth(), tIcon.getIconHeight(), 0.0625F); + ItemRenderer.renderItemIn2D( + Tessellator.instance, + tIcon.getMaxU(), + tIcon.getMinV(), + tIcon.getMinU(), + tIcon.getMaxV(), + tIcon.getIconWidth(), + tIcon.getIconHeight(), + 0.0625F); } } if (tOverlay != null) { @@ -175,7 +241,15 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer { if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) { GT_RenderUtil.renderItemIcon(tOverlay, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { - ItemRenderer.renderItemIn2D(Tessellator.instance, tOverlay.getMaxU(), tOverlay.getMinV(), tOverlay.getMinU(), tOverlay.getMaxV(), tOverlay.getIconWidth(), tOverlay.getIconHeight(), 0.0625F); + ItemRenderer.renderItemIn2D( + Tessellator.instance, + tOverlay.getMaxU(), + tOverlay.getMinV(), + tOverlay.getMinU(), + tOverlay.getMaxV(), + tOverlay.getIconWidth(), + tOverlay.getIconHeight(), + 0.0625F); } } } diff --git a/src/main/java/gregtech/common/render/GT_MultiTexture.java b/src/main/java/gregtech/common/render/GT_MultiTexture.java index 2d78b9b988..df5251f784 100644 --- a/src/main/java/gregtech/common/render/GT_MultiTexture.java +++ b/src/main/java/gregtech/common/render/GT_MultiTexture.java @@ -12,12 +12,10 @@ import net.minecraft.client.renderer.RenderBlocks; public class GT_MultiTexture extends GT_TextureBase implements ITexture { protected final ITexture[] mTextures; - public static GT_MultiTexture get(ITexture... aTextures) { return GT_Mod.instance.isClientSide() ? new GT_MultiTexture(aTextures) : null; } - protected GT_MultiTexture(ITexture... aTextures) { mTextures = aTextures; } diff --git a/src/main/java/gregtech/common/render/GT_PollutionRenderer.java b/src/main/java/gregtech/common/render/GT_PollutionRenderer.java index 5128af1c36..99689a535d 100644 --- a/src/main/java/gregtech/common/render/GT_PollutionRenderer.java +++ b/src/main/java/gregtech/common/render/GT_PollutionRenderer.java @@ -37,7 +37,7 @@ public class GT_PollutionRenderer { private static final int FOG_START_AT_POLLUTION = 400000; private static final int FOG_MAX_AT_POLLUTION = 7000000; - //jump from linear to exponential fog. x*FOG_MAX_AT_POLLUTION+FOG_START_AT_POLLUTION + // jump from linear to exponential fog. x*FOG_MAX_AT_POLLUTION+FOG_START_AT_POLLUTION private static final double FOG_START_EXP_RATIO = 0.02D; private static final float[] fogColor = {0.3f, 0.25f, 0.1f}; @@ -46,7 +46,7 @@ public class GT_PollutionRenderer { private static final short[] liquidColor = {160, 200, 10}; private static final short[] foliageColor = {160, 80, 15}; - //TODO need to soft update some blocks, grass and leaves does more often than liquid it looks like. + // TODO need to soft update some blocks, grass and leaves does more often than liquid it looks like. public GT_PollutionRenderer() { pollutionMap = new GT_ClientPollutionMap(); @@ -64,14 +64,12 @@ public class GT_PollutionRenderer { @SubscribeEvent(priority = EventPriority.HIGH) public void enteredWorld(WorldEvent.Load event) { EntityClientPlayerMP p = Minecraft.getMinecraft().thePlayer; - if (!event.world.isRemote || p == null) - return; + if (!event.world.isRemote || p == null) return; pollutionMap.reset(); } private static int color(int color, int pollution, int low, float high, short[] colors) { - if ( pollution < low) - return color; + if (pollution < low) return color; int r = (color >> 16) & 0xFF; int g = (color >> 8) & 0xFF; @@ -89,16 +87,19 @@ public class GT_PollutionRenderer { // Methods for hodgepodge to color grass / foliage blocks etc. public static int colorGrass(int oColor, int x, int z) { - return color(oColor, pollutionMap.getPollution(x, z)/1000, 350, 600, grassColor); + return color(oColor, pollutionMap.getPollution(x, z) / 1000, 350, 600, grassColor); } + public static int colorLeaves(int oColor, int x, int z) { - return color(oColor, pollutionMap.getPollution(x, z)/1000, 300, 500, leavesColor); + return color(oColor, pollutionMap.getPollution(x, z) / 1000, 300, 500, leavesColor); } + public static int colorLiquid(int oColor, int x, int z) { - return color(oColor, pollutionMap.getPollution(x, z)/1000, 300, 500, liquidColor); + return color(oColor, pollutionMap.getPollution(x, z) / 1000, 300, 500, liquidColor); } + public static int colorFoliage(int oColor, int x, int z) { - return color(oColor, pollutionMap.getPollution(x, z)/1000, 300, 500, foliageColor); + return color(oColor, pollutionMap.getPollution(x, z) / 1000, 300, 500, foliageColor); } public static int getKnownPollution(int x, int z) { @@ -107,19 +108,16 @@ public class GT_PollutionRenderer { @SubscribeEvent(priority = EventPriority.LOW) public void manipulateColor(EntityViewRenderEvent.FogColors event) { - if (!DEBUG && Minecraft.getMinecraft().thePlayer.capabilities.isCreativeMode) - return; + if (!DEBUG && Minecraft.getMinecraft().thePlayer.capabilities.isCreativeMode) return; - if (event.block.getMaterial() == Material.water || - event.block.getMaterial() == Material.lava) - return; + if (event.block.getMaterial() == Material.water || event.block.getMaterial() == Material.lava) return; float x = fogIntensityLastTick > 1 ? 1F : (float) fogIntensityLastTick; float xi = 1 - x; - event.red = xi*event.red + x*fogColor[0]; - event.green = xi*event.green + x*fogColor[1]; - event.blue = xi*event.blue + x*fogColor[2]; + event.red = xi * event.red + x * fogColor[0]; + event.green = xi * event.green + x * fogColor[1]; + event.blue = xi * event.blue + x * fogColor[2]; } private static final int END_MAX_DISTANCE = 192 - 1; @@ -129,74 +127,74 @@ public class GT_PollutionRenderer { public void renderGTPollutionFog(EntityViewRenderEvent.RenderFogEvent event) { if (!GT_Mod.gregtechproxy.mRenderPollutionFog) return; - if ((!DEBUG && Minecraft.getMinecraft().thePlayer.capabilities.isCreativeMode) || - (fogIntensityLastTick <= 0 && fogIntensityLastTick >= FOG_START_EXP_RATIO)) - return; + if ((!DEBUG && Minecraft.getMinecraft().thePlayer.capabilities.isCreativeMode) + || (fogIntensityLastTick <= 0 && fogIntensityLastTick >= FOG_START_EXP_RATIO)) return; if (event.fogMode == 0) { - double v = 1 - fogIntensityLastTick/FOG_START_EXP_RATIO; - //trying to smooth out jump from linear to exponential + double v = 1 - fogIntensityLastTick / FOG_START_EXP_RATIO; + // trying to smooth out jump from linear to exponential GL11.glFogi(GL11.GL_FOG_MODE, GL11.GL_LINEAR); - GL11.glFogf(GL11.GL_FOG_START, (float) ((END_MAX_DISTANCE-20) * 0.75F * v + 20)); + GL11.glFogf(GL11.GL_FOG_START, (float) ((END_MAX_DISTANCE - 20) * 0.75F * v + 20)); GL11.glFogf(GL11.GL_FOG_END, (float) (END_MAX_DISTANCE * (0.75F + v * 0.25F))); } - //else if ( event.fogMode < 0) { } + // else if ( event.fogMode < 0) { } } @SubscribeEvent(priority = EventPriority.LOWEST) public void renderGTPollutionFog(EntityViewRenderEvent.FogDensity event) { if (!GT_Mod.gregtechproxy.mRenderPollutionFog) return; - if (!DEBUG && Minecraft.getMinecraft().thePlayer.capabilities.isCreativeMode) - return; + if (!DEBUG && Minecraft.getMinecraft().thePlayer.capabilities.isCreativeMode) return; - if (event.entity.isPotionActive(Potion.blindness) || - (fogIntensityLastTick < FOG_START_EXP_RATIO) || - event.block.getMaterial() == Material.water || - event.block.getMaterial() == Material.lava - ) - return; + if (event.entity.isPotionActive(Potion.blindness) + || (fogIntensityLastTick < FOG_START_EXP_RATIO) + || event.block.getMaterial() == Material.water + || event.block.getMaterial() == Material.lava) return; GL11.glFogi(GL11.GL_FOG_MODE, GL11.GL_EXP2); - event.density = (float) Math.pow(fogIntensityLastTick - FOG_START_EXP_RATIO, .75F)/5 + 0.01F; + event.density = (float) Math.pow(fogIntensityLastTick - FOG_START_EXP_RATIO, .75F) / 5 + 0.01F; event.setCanceled(true); } private double lastUpdate = 0; + @SubscribeEvent(priority = EventPriority.HIGHEST) public void onRenderTick(TickEvent.RenderTickEvent event) { Minecraft mc = Minecraft.getMinecraft(); - if (mc == null) - return; + if (mc == null) return; EntityClientPlayerMP player = mc.thePlayer; - if (player == null) - return; + if (player == null) return; if (event.phase == TickEvent.Phase.START) { - if (event.renderTickTime < lastUpdate) - lastUpdate = lastUpdate - 1; + if (event.renderTickTime < lastUpdate) lastUpdate = lastUpdate - 1; float step = (float) ((event.renderTickTime - lastUpdate) / 50); lastUpdate = event.renderTickTime; - float fogIntensity = (playerPollution-FOG_START_AT_POLLUTION)/ (float) FOG_MAX_AT_POLLUTION; + float fogIntensity = (playerPollution - FOG_START_AT_POLLUTION) / (float) FOG_MAX_AT_POLLUTION; if (fogIntensity > 1) fogIntensity = 1; else if (fogIntensity < 0) fogIntensity = 0; - double e = fogIntensity-fogIntensityLastTick; + double e = fogIntensity - fogIntensityLastTick; if (e != 0) { if (e > 0.2) e = 0.2D; - else if (e < -0.5) e = - 0.5D; + else if (e < -0.5) e = -0.5D; - if (e > 0.001D || e < -0.001D) - fogIntensityLastTick += step *e; - else - fogIntensityLastTick = fogIntensity; + if (e > 0.001D || e < -0.001D) fogIntensityLastTick += step * e; + else fogIntensityLastTick = fogIntensity; } - } - else if (DEBUG) { + } else if (DEBUG) { drawPollution("Intensity: " + (fogIntensityLastTick * 10000), 0); - drawPollution("Pollution: " + pollutionMap.getPollution(Minecraft.getMinecraft().thePlayer.lastTickPosX, Minecraft.getMinecraft().thePlayer.lastTickPosZ), 20); - drawPollution("Density: " + ((float)(Math.pow(fogIntensityLastTick - FOG_START_EXP_RATIO, .75F)/5 + 0.01F)* 10000), 40); + drawPollution( + "Pollution: " + + pollutionMap.getPollution( + Minecraft.getMinecraft().thePlayer.lastTickPosX, + Minecraft.getMinecraft().thePlayer.lastTickPosZ), + 20); + drawPollution( + "Density: " + + ((float) (Math.pow(fogIntensityLastTick - FOG_START_EXP_RATIO, .75F) / 5 + 0.01F) + * 10000), + 40); } } @@ -205,22 +203,17 @@ public class GT_PollutionRenderer { public void onClientTick(TickEvent.ClientTickEvent event) { if (!GT_Mod.gregtechproxy.mRenderDirtParticles) return; Minecraft mc = Minecraft.getMinecraft(); - if (mc == null) - return; + if (mc == null) return; EntityClientPlayerMP player = mc.thePlayer; - if (player == null || (player.capabilities.isCreativeMode && !DEBUG)) - return; + if (player == null || (player.capabilities.isCreativeMode && !DEBUG)) return; World w = player.worldObj; playerPollution = pollutionMap.getPollution(player.lastTickPosX, player.lastTickPosZ); float intensity = ((float) playerPollution - PARTICLES_POLLUTION_START) / PARTICLES_POLLUTION_END; - if (intensity < 0) - return; - else if (intensity > 1) - intensity = 1; - else - intensity *= intensity; + if (intensity < 0) return; + else if (intensity > 1) intensity = 1; + else intensity *= intensity; int x = MathHelper.floor_double(player.posX); int y = MathHelper.floor_double(player.posY); @@ -235,13 +228,17 @@ public class GT_PollutionRenderer { Block block = w.getBlock(i1, j1, k1); if (block.getMaterial() == Material.air) { - EntityFX fx = new GT_EntityFXPollution(w, (float) i1 + w.rand.nextFloat(), (float) j1 + w.rand.nextFloat(), (float) k1 + w.rand.nextFloat()); + EntityFX fx = new GT_EntityFXPollution( + w, + (float) i1 + w.rand.nextFloat(), + (float) j1 + w.rand.nextFloat(), + (float) k1 + w.rand.nextFloat()); mc.effectRenderer.addEffect(fx); } } } - private void drawPollution(String text, int off){ + private void drawPollution(String text, int off) { GL11.glPushMatrix(); GL11.glEnable(GL11.GL_BLEND); OpenGlHelper.glBlendFunc(770, 771, 1, 0); diff --git a/src/main/java/gregtech/common/render/GT_RenderUtil.java b/src/main/java/gregtech/common/render/GT_RenderUtil.java index 1b674f440f..ef0cae11ff 100644 --- a/src/main/java/gregtech/common/render/GT_RenderUtil.java +++ b/src/main/java/gregtech/common/render/GT_RenderUtil.java @@ -8,7 +8,16 @@ public class GT_RenderUtil { renderItemIcon(icon, 0.0D, 0.0D, size, size, z, nx, ny, nz); } - public static void renderItemIcon(IIcon icon, double xStart, double yStart, double xEnd, double yEnd, double z, float nx, float ny, float nz) { + public static void renderItemIcon( + IIcon icon, + double xStart, + double yStart, + double xEnd, + double yEnd, + double z, + float nx, + float ny, + float nz) { if (icon == null) { return; } diff --git a/src/main/java/gregtech/common/render/GT_RenderedTexture.java b/src/main/java/gregtech/common/render/GT_RenderedTexture.java index 94b0e72419..3c12c9589d 100644 --- a/src/main/java/gregtech/common/render/GT_RenderedTexture.java +++ b/src/main/java/gregtech/common/render/GT_RenderedTexture.java @@ -1,5 +1,7 @@ package gregtech.common.render; +import static gregtech.api.util.LightingHelper.MAX_BRIGHTNESS; + import com.gtnewhorizon.structurelib.alignment.IAlignment; import com.gtnewhorizon.structurelib.alignment.IAlignmentProvider; import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing; @@ -22,8 +24,6 @@ import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import static gregtech.api.util.LightingHelper.MAX_BRIGHTNESS; - public class GT_RenderedTexture extends GT_TextureBase implements ITexture, IColorModulationContainer { protected final IIconContainer mIconContainer; private final short[] mRGBa; @@ -31,7 +31,13 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol private final boolean stdOrient; private final boolean useExtFacing; - protected GT_RenderedTexture(IIconContainer aIcon, short[] aRGBa, boolean allowAlpha, boolean glow, boolean stdOrient, boolean extFacing) { + protected GT_RenderedTexture( + IIconContainer aIcon, + short[] aRGBa, + boolean allowAlpha, + boolean glow, + boolean stdOrient, + boolean extFacing) { if (aRGBa.length != 4) throw new IllegalArgumentException("RGBa doesn't have 4 Values @ GT_RenderedTexture"); mIconContainer = aIcon; mRGBa = aRGBa; @@ -176,7 +182,7 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol final boolean enableAO = aRenderer.enableAO; final LightingHelper lighting = new LightingHelper(aRenderer); if (glow) { - if (!GT_Mod.gregtechproxy.mRenderGlowTextures){ + if (!GT_Mod.gregtechproxy.mRenderGlowTextures) { draw(aRenderer); return; } @@ -208,7 +214,8 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol /** * Renders the given texture to the bottom face of the block. Args: block, x, y, z, texture */ - protected void renderFaceYNeg(RenderBlocks aRenderer, double x, double y, double z, IIcon icon, ExtendedFacing extendedFacing) { + protected void renderFaceYNeg( + RenderBlocks aRenderer, double x, double y, double z, IIcon icon, ExtendedFacing extendedFacing) { switch (useExtFacing ? extendedFacing.getRotation() : Rotation.NORMAL) { case COUNTER_CLOCKWISE: @@ -226,14 +233,23 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol } final Flip aFlip = extendedFacing.getFlip(); - aRenderer.renderFaceYNeg(Blocks.air, x, y, z, useExtFacing && GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped ? new GT_IconFlipped(icon, aFlip.isHorizontallyFlipped() ^ !stdOrient, aFlip.isVerticallyFliped()) : new GT_IconFlipped(icon, !stdOrient, false)); + aRenderer.renderFaceYNeg( + Blocks.air, + x, + y, + z, + useExtFacing && GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped + ? new GT_IconFlipped( + icon, aFlip.isHorizontallyFlipped() ^ !stdOrient, aFlip.isVerticallyFliped()) + : new GT_IconFlipped(icon, !stdOrient, false)); aRenderer.uvRotateBottom = 0; } /** * Renders the given texture to the top face of the block. Args: block, x, y, z, texture */ - protected void renderFaceYPos(RenderBlocks aRenderer, double x, double y, double z, IIcon icon, ExtendedFacing extendedFacing) { + protected void renderFaceYPos( + RenderBlocks aRenderer, double x, double y, double z, IIcon icon, ExtendedFacing extendedFacing) { switch (useExtFacing ? extendedFacing.getRotation() : Rotation.NORMAL) { case COUNTER_CLOCKWISE: @@ -251,14 +267,22 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol } final Flip aFlip = extendedFacing.getFlip(); - aRenderer.renderFaceYPos(Blocks.air, x, y, z, useExtFacing && GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped ? new GT_IconFlipped(icon, aFlip.isHorizontallyFlipped(), aFlip.isVerticallyFliped()) : icon); + aRenderer.renderFaceYPos( + Blocks.air, + x, + y, + z, + useExtFacing && GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped + ? new GT_IconFlipped(icon, aFlip.isHorizontallyFlipped(), aFlip.isVerticallyFliped()) + : icon); aRenderer.uvRotateTop = 0; } /** * Renders the given texture to the north (z-negative) face of the block. Args: block, x, y, z, texture */ - protected void renderFaceZNeg(RenderBlocks aRenderer, double x, double y, double z, IIcon icon, ExtendedFacing extendedFacing) { + protected void renderFaceZNeg( + RenderBlocks aRenderer, double x, double y, double z, IIcon icon, ExtendedFacing extendedFacing) { aRenderer.field_152631_f = true; // **NOT A BUG**: aRenderer.uvRotateEast REALLY CONTROLS THE ROTATION OF THE NORTH SIDE switch (useExtFacing ? extendedFacing.getRotation() : Rotation.NORMAL) { @@ -277,7 +301,14 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol } final Flip aFlip = extendedFacing.getFlip(); - aRenderer.renderFaceZNeg(Blocks.air, x, y, z, useExtFacing && GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped ? new GT_IconFlipped(icon, aFlip.isHorizontallyFlipped(), aFlip.isVerticallyFliped()) : icon); + aRenderer.renderFaceZNeg( + Blocks.air, + x, + y, + z, + useExtFacing && GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped + ? new GT_IconFlipped(icon, aFlip.isHorizontallyFlipped(), aFlip.isVerticallyFliped()) + : icon); aRenderer.uvRotateEast = 0; aRenderer.field_152631_f = false; } @@ -285,7 +316,8 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol /** * Renders the given texture to the south (z-positive) face of the block. Args: block, x, y, z, texture */ - protected void renderFaceZPos(RenderBlocks aRenderer, double x, double y, double z, IIcon icon, ExtendedFacing extendedFacing) { + protected void renderFaceZPos( + RenderBlocks aRenderer, double x, double y, double z, IIcon icon, ExtendedFacing extendedFacing) { // **NOT A BUG**: aRenderer.uvRotateWest REALLY CONTROLS THE ROTATION OF THE SOUTH SIDE switch (useExtFacing ? extendedFacing.getRotation() : Rotation.NORMAL) { case COUNTER_CLOCKWISE: @@ -303,14 +335,22 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol } final Flip aFlip = extendedFacing.getFlip(); - aRenderer.renderFaceZPos(Blocks.air, x, y, z, useExtFacing && GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped ? new GT_IconFlipped(icon, aFlip.isHorizontallyFlipped(), aFlip.isVerticallyFliped()) : icon); + aRenderer.renderFaceZPos( + Blocks.air, + x, + y, + z, + useExtFacing && GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped + ? new GT_IconFlipped(icon, aFlip.isHorizontallyFlipped(), aFlip.isVerticallyFliped()) + : icon); aRenderer.uvRotateWest = 0; } /** * Renders the given texture to the west (x-negative) face of the block. Args: block, x, y, z, texture */ - protected void renderFaceXNeg(RenderBlocks aRenderer, double x, double y, double z, IIcon icon, ExtendedFacing extendedFacing) { + protected void renderFaceXNeg( + RenderBlocks aRenderer, double x, double y, double z, IIcon icon, ExtendedFacing extendedFacing) { // **NOT A BUG**: aRenderer.uvRotateNorth REALLY CONTROLS THE ROTATION OF THE WEST SIDE switch (useExtFacing ? extendedFacing.getRotation() : Rotation.NORMAL) { case COUNTER_CLOCKWISE: @@ -328,14 +368,22 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol } final Flip aFlip = extendedFacing.getFlip(); - aRenderer.renderFaceXNeg(Blocks.air, x, y, z, useExtFacing && GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped ? new GT_IconFlipped(icon, aFlip.isHorizontallyFlipped(), aFlip.isVerticallyFliped()) : icon); + aRenderer.renderFaceXNeg( + Blocks.air, + x, + y, + z, + useExtFacing && GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped + ? new GT_IconFlipped(icon, aFlip.isHorizontallyFlipped(), aFlip.isVerticallyFliped()) + : icon); aRenderer.uvRotateNorth = 0; } /** * Renders the given texture to the east (x-positive) face of the block. Args: block, x, y, z, texture */ - protected void renderFaceXPos(RenderBlocks aRenderer, double x, double y, double z, IIcon icon, ExtendedFacing extendedFacing) { + protected void renderFaceXPos( + RenderBlocks aRenderer, double x, double y, double z, IIcon icon, ExtendedFacing extendedFacing) { aRenderer.field_152631_f = true; // **NOT A BUG**: aRenderer.uvRotateSouth REALLY CONTROLS THE ROTATION OF THE EAST SIDE switch (useExtFacing ? extendedFacing.getRotation() : Rotation.NORMAL) { @@ -354,7 +402,14 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol } final Flip aFlip = extendedFacing.getFlip(); - aRenderer.renderFaceXPos(Blocks.air, x, y, z, useExtFacing && GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped ? new GT_IconFlipped(icon, aFlip.isHorizontallyFlipped(), aFlip.isVerticallyFliped()) : icon); + aRenderer.renderFaceXPos( + Blocks.air, + x, + y, + z, + useExtFacing && GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped + ? new GT_IconFlipped(icon, aFlip.isHorizontallyFlipped(), aFlip.isVerticallyFliped()) + : icon); aRenderer.uvRotateSouth = 0; aRenderer.field_152631_f = false; } @@ -372,7 +427,8 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol if (meta instanceof IAlignmentProvider) { alignment = ((IAlignmentProvider) meta).getAlignment(); } else if (meta != null) { - return ExtendedFacing.of(ForgeDirection.getOrientation(meta.getBaseMetaTileEntity().getFrontFacing())); + return ExtendedFacing.of(ForgeDirection.getOrientation( + meta.getBaseMetaTileEntity().getFrontFacing())); } } else if (te instanceof IAlignmentProvider) { alignment = ((IAlignmentProvider) te).getAlignment(); diff --git a/src/main/java/gregtech/common/render/GT_Renderer_Block.java b/src/main/java/gregtech/common/render/GT_Renderer_Block.java index ef8748064f..5831c76bf4 100644 --- a/src/main/java/gregtech/common/render/GT_Renderer_Block.java +++ b/src/main/java/gregtech/common/render/GT_Renderer_Block.java @@ -1,5 +1,26 @@ package gregtech.common.render; +import static gregtech.api.enums.GT_Values.ALL_VALID_SIDES; +import static gregtech.api.enums.GT_Values.OFFX; +import static gregtech.api.enums.GT_Values.OFFY; +import static gregtech.api.enums.GT_Values.OFFZ; +import static gregtech.api.interfaces.metatileentity.IConnectable.CONNECTED_DOWN; +import static gregtech.api.interfaces.metatileentity.IConnectable.CONNECTED_EAST; +import static gregtech.api.interfaces.metatileentity.IConnectable.CONNECTED_NORTH; +import static gregtech.api.interfaces.metatileentity.IConnectable.CONNECTED_SOUTH; +import static gregtech.api.interfaces.metatileentity.IConnectable.CONNECTED_UP; +import static gregtech.api.interfaces.metatileentity.IConnectable.CONNECTED_WEST; +import static gregtech.api.interfaces.metatileentity.IConnectable.HAS_FRESHFOAM; +import static gregtech.api.interfaces.metatileentity.IConnectable.HAS_HARDENEDFOAM; +import static gregtech.api.interfaces.metatileentity.IConnectable.NO_CONNECTION; +import static net.minecraftforge.common.util.ForgeDirection.DOWN; +import static net.minecraftforge.common.util.ForgeDirection.EAST; +import static net.minecraftforge.common.util.ForgeDirection.NORTH; +import static net.minecraftforge.common.util.ForgeDirection.SOUTH; +import static net.minecraftforge.common.util.ForgeDirection.UP; +import static net.minecraftforge.common.util.ForgeDirection.VALID_DIRECTIONS; +import static net.minecraftforge.common.util.ForgeDirection.WEST; + import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.relauncher.Side; @@ -25,33 +46,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; - import org.lwjgl.opengl.GL11; -import java.util.Arrays; -import java.util.Collections; - -import static gregtech.api.enums.GT_Values.ALL_VALID_SIDES; -import static gregtech.api.enums.GT_Values.OFFX; -import static gregtech.api.enums.GT_Values.OFFY; -import static gregtech.api.enums.GT_Values.OFFZ; -import static gregtech.api.interfaces.metatileentity.IConnectable.CONNECTED_DOWN; -import static gregtech.api.interfaces.metatileentity.IConnectable.CONNECTED_EAST; -import static gregtech.api.interfaces.metatileentity.IConnectable.CONNECTED_NORTH; -import static gregtech.api.interfaces.metatileentity.IConnectable.CONNECTED_SOUTH; -import static gregtech.api.interfaces.metatileentity.IConnectable.CONNECTED_UP; -import static gregtech.api.interfaces.metatileentity.IConnectable.CONNECTED_WEST; -import static gregtech.api.interfaces.metatileentity.IConnectable.HAS_FRESHFOAM; -import static gregtech.api.interfaces.metatileentity.IConnectable.HAS_HARDENEDFOAM; -import static gregtech.api.interfaces.metatileentity.IConnectable.NO_CONNECTION; -import static net.minecraftforge.common.util.ForgeDirection.DOWN; -import static net.minecraftforge.common.util.ForgeDirection.EAST; -import static net.minecraftforge.common.util.ForgeDirection.NORTH; -import static net.minecraftforge.common.util.ForgeDirection.SOUTH; -import static net.minecraftforge.common.util.ForgeDirection.UP; -import static net.minecraftforge.common.util.ForgeDirection.VALID_DIRECTIONS; -import static net.minecraftforge.common.util.ForgeDirection.WEST; - public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { public static final float blockMin = 0.0F; public static final float blockMax = 1.0F; @@ -67,31 +63,34 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { RenderingRegistry.registerBlockHandler(this); } - public static boolean renderStandardBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, RenderBlocks aRenderer) { + public static boolean renderStandardBlock( + IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, RenderBlocks aRenderer) { final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if ((tTileEntity instanceof IPipeRenderedTileEntity)) { - return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer, new ITexture[][]{ - ((IPipeRenderedTileEntity) tTileEntity).getTextureCovered((byte) DOWN.ordinal()), - ((IPipeRenderedTileEntity) tTileEntity).getTextureCovered((byte) UP.ordinal()), - ((IPipeRenderedTileEntity) tTileEntity).getTextureCovered((byte) NORTH.ordinal()), - ((IPipeRenderedTileEntity) tTileEntity).getTextureCovered((byte) SOUTH.ordinal()), - ((IPipeRenderedTileEntity) tTileEntity).getTextureCovered((byte) WEST.ordinal()), - ((IPipeRenderedTileEntity) tTileEntity).getTextureCovered((byte) EAST.ordinal())}); + return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer, new ITexture[][] { + ((IPipeRenderedTileEntity) tTileEntity).getTextureCovered((byte) DOWN.ordinal()), + ((IPipeRenderedTileEntity) tTileEntity).getTextureCovered((byte) UP.ordinal()), + ((IPipeRenderedTileEntity) tTileEntity).getTextureCovered((byte) NORTH.ordinal()), + ((IPipeRenderedTileEntity) tTileEntity).getTextureCovered((byte) SOUTH.ordinal()), + ((IPipeRenderedTileEntity) tTileEntity).getTextureCovered((byte) WEST.ordinal()), + ((IPipeRenderedTileEntity) tTileEntity).getTextureCovered((byte) EAST.ordinal()) + }); } if ((tTileEntity instanceof ITexturedTileEntity)) { - return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer, new ITexture[][]{ - ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) DOWN.ordinal()), - ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) UP.ordinal()), - ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) NORTH.ordinal()), - ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) SOUTH.ordinal()), - ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) WEST.ordinal()), - ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) EAST.ordinal())} - ); + return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer, new ITexture[][] { + ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) DOWN.ordinal()), + ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) UP.ordinal()), + ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) NORTH.ordinal()), + ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) SOUTH.ordinal()), + ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) WEST.ordinal()), + ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) EAST.ordinal()) + }); } return false; } - public static boolean renderStandardBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, RenderBlocks aRenderer, ITexture[][] aTextures) { + public static boolean renderStandardBlock( + IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, RenderBlocks aRenderer, ITexture[][] aTextures) { aBlock.setBlockBounds(blockMin, blockMin, blockMin, blockMax, blockMax, blockMax); aRenderer.setRenderBoundsFromBlock(aBlock); @@ -104,7 +103,14 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { return true; } - public static boolean renderPipeBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, IPipeRenderedTileEntity aTileEntity, RenderBlocks aRenderer) { + public static boolean renderPipeBlock( + IBlockAccess aWorld, + int aX, + int aY, + int aZ, + Block aBlock, + IPipeRenderedTileEntity aTileEntity, + RenderBlocks aRenderer) { final byte aConnections = aTileEntity.getConnections(); if ((aConnections & (HAS_FRESHFOAM | HAS_HARDENEDFOAM)) != 0) { return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer); @@ -465,7 +471,8 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { } @SideOnly(Side.CLIENT) - public static void addHitEffects(EffectRenderer effectRenderer, Block block, World world, int x, int y, int z, int side) { + public static void addHitEffects( + EffectRenderer effectRenderer, Block block, World world, int x, int y, int z, int side) { double rX = x + XSTR.XSTR_INSTANCE.nextDouble() * 0.8 + 0.1; double rY = y + XSTR.XSTR_INSTANCE.nextDouble() * 0.8 + 0.1; double rZ = z + XSTR.XSTR_INSTANCE.nextDouble() * 0.8 + 0.1; @@ -482,7 +489,11 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { } else if (side == 5) { rX = x + 1.1; } - effectRenderer.addEffect((new EntityDiggingFX(world, rX, rY, rZ, 0.0, 0.0, 0.0, block, block.getDamageValue(world, x, y, z), side)).applyColourMultiplier(x, y, z).multiplyVelocity(0.2F).multipleParticleScaleBy(0.6F)); + effectRenderer.addEffect((new EntityDiggingFX( + world, rX, rY, rZ, 0.0, 0.0, 0.0, block, block.getDamageValue(world, x, y, z), side)) + .applyColourMultiplier(x, y, z) + .multiplyVelocity(0.2F) + .multipleParticleScaleBy(0.6F)); } @SideOnly(Side.CLIENT) @@ -493,7 +504,17 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { final double bX = x + (iX + 0.5) / 4.0; final double bY = y + (iY + 0.5) / 4.0; final double bZ = z + (iZ + 0.5) / 4.0; - effectRenderer.addEffect((new EntityDiggingFX(world, bX, bY, bZ, bX - x - 0.5, bY - y - 0.5, bZ - z - 0.5, block, block.getDamageValue(world, x, y, z))).applyColourMultiplier(x, y, z)); + effectRenderer.addEffect((new EntityDiggingFX( + world, + bX, + bY, + bZ, + bX - x - 0.5, + bY - y - 0.5, + bZ - z - 0.5, + block, + block.getDamageValue(world, x, y, z))) + .applyColourMultiplier(x, y, z)); } } } @@ -506,13 +527,12 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); GL11.glTranslatef(-0.5F, -0.5F, -0.5F); - if(aBlock instanceof IRenderedBlock) { + if (aBlock instanceof IRenderedBlock) { boolean tNeedsToSetBounds = true; final ItemStack aStack = new ItemStack(aBlock, 1, aMeta); - IRenderedBlock tRenderer = ((IRenderedBlock)aBlock).passRenderingToObject(aStack); + IRenderedBlock tRenderer = ((IRenderedBlock) aBlock).passRenderingToObject(aStack); if (tRenderer != null) tRenderer = tRenderer.passRenderingToObject(aStack); - if (tRenderer == null) - tRenderer = IRenderedBlock.ErrorRenderer.INSTANCE; + if (tRenderer == null) tRenderer = IRenderedBlock.ErrorRenderer.INSTANCE; for (int i = 0, j = tRenderer.getRenderPasses(aBlock); i < j; i++) { if (tRenderer.usesRenderPass(i)) { if (tRenderer.setBlockBounds(aBlock, i)) { @@ -524,12 +544,60 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { tNeedsToSetBounds = false; } - renderNegativeYFacing(null, aRenderer, aBlock, 0, 0, 0, tRenderer.getTexture(aBlock, (byte) DOWN.ordinal(), true, i), !tNeedsToSetBounds); - renderPositiveYFacing(null, aRenderer, aBlock, 0, 0, 0, tRenderer.getTexture(aBlock, (byte) UP.ordinal(), true, i), !tNeedsToSetBounds); - renderNegativeZFacing(null, aRenderer, aBlock, 0, 0, 0, tRenderer.getTexture(aBlock, (byte) NORTH.ordinal(), true, i), !tNeedsToSetBounds); - renderPositiveZFacing(null, aRenderer, aBlock, 0, 0, 0, tRenderer.getTexture(aBlock, (byte) SOUTH.ordinal(), true, i), !tNeedsToSetBounds); - renderNegativeXFacing(null, aRenderer, aBlock, 0, 0, 0, tRenderer.getTexture(aBlock, (byte) WEST.ordinal(), true, i), !tNeedsToSetBounds); - renderPositiveXFacing(null, aRenderer, aBlock, 0, 0, 0, tRenderer.getTexture(aBlock, (byte) EAST.ordinal(), true, i), !tNeedsToSetBounds); + renderNegativeYFacing( + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tRenderer.getTexture(aBlock, (byte) DOWN.ordinal(), true, i), + !tNeedsToSetBounds); + renderPositiveYFacing( + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tRenderer.getTexture(aBlock, (byte) UP.ordinal(), true, i), + !tNeedsToSetBounds); + renderNegativeZFacing( + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tRenderer.getTexture(aBlock, (byte) NORTH.ordinal(), true, i), + !tNeedsToSetBounds); + renderPositiveZFacing( + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tRenderer.getTexture(aBlock, (byte) SOUTH.ordinal(), true, i), + !tNeedsToSetBounds); + renderNegativeXFacing( + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tRenderer.getTexture(aBlock, (byte) WEST.ordinal(), true, i), + !tNeedsToSetBounds); + renderPositiveXFacing( + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tRenderer.getTexture(aBlock, (byte) EAST.ordinal(), true, i), + !tNeedsToSetBounds); } } if (tNeedsToSetBounds) aBlock.setBlockBounds(0, 0, 0, 1, 1, 1); @@ -541,18 +609,23 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { aBlock.setBlockBoundsForItemRender(); aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeYFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) DOWN.ordinal()), true); - renderPositiveYFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) UP.ordinal()), true); - renderNegativeZFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) NORTH.ordinal()), true); - renderPositiveZFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) SOUTH.ordinal()), true); - renderNegativeXFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) WEST.ordinal()), true); - renderPositiveXFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) EAST.ordinal()), true); + renderNegativeYFacing( + null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) DOWN.ordinal()), true); + renderPositiveYFacing( + null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) UP.ordinal()), true); + renderNegativeZFacing( + null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) NORTH.ordinal()), true); + renderPositiveZFacing( + null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) SOUTH.ordinal()), true); + renderNegativeXFacing( + null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) WEST.ordinal()), true); + renderPositiveXFacing( + null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) EAST.ordinal()), true); } else if (aMeta > 0 - && (aMeta < GregTech_API.METATILEENTITIES.length) - && aBlock instanceof GT_Block_Machines - && (GregTech_API.METATILEENTITIES[aMeta] != null) - && (!GregTech_API.METATILEENTITIES[aMeta].renderInInventory(aBlock, aMeta, aRenderer))) - { + && (aMeta < GregTech_API.METATILEENTITIES.length) + && aBlock instanceof GT_Block_Machines + && (GregTech_API.METATILEENTITIES[aMeta] != null) + && (!GregTech_API.METATILEENTITIES[aMeta].renderInInventory(aBlock, aMeta, aRenderer))) { renderNormalInventoryMetaTileEntity(aBlock, aMeta, aRenderer); } aBlock.setBlockBounds(blockMin, blockMin, blockMin, blockMax, blockMax, blockMax); @@ -584,26 +657,173 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { aBlock.setBlockBounds(blockMin, pipeMin, pipeMin, blockMax, pipeMax, pipeMax); aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeYFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) DOWN.ordinal(), (byte) (CONNECTED_WEST | CONNECTED_EAST), (byte) -1, false, false), true); - renderPositiveYFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) UP.ordinal(), (byte) (CONNECTED_WEST | CONNECTED_EAST), (byte) -1, false, false), true); - renderNegativeZFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) NORTH.ordinal(), (byte) (CONNECTED_WEST | CONNECTED_EAST), (byte) -1, false, false), true); - renderPositiveZFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) SOUTH.ordinal(), (byte) (CONNECTED_WEST | CONNECTED_EAST), (byte) -1, false, false), true); - renderNegativeXFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) WEST.ordinal(), (byte) (CONNECTED_WEST | CONNECTED_EAST), (byte) -1, true, false), true); - renderPositiveXFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) EAST.ordinal(), (byte) (CONNECTED_WEST | CONNECTED_EAST), (byte) -1, true, false), true); + renderNegativeYFacing( + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tMetaTileEntity.getTexture( + iGregTechTileEntity, + (byte) DOWN.ordinal(), + (byte) (CONNECTED_WEST | CONNECTED_EAST), + (byte) -1, + false, + false), + true); + renderPositiveYFacing( + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tMetaTileEntity.getTexture( + iGregTechTileEntity, + (byte) UP.ordinal(), + (byte) (CONNECTED_WEST | CONNECTED_EAST), + (byte) -1, + false, + false), + true); + renderNegativeZFacing( + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tMetaTileEntity.getTexture( + iGregTechTileEntity, + (byte) NORTH.ordinal(), + (byte) (CONNECTED_WEST | CONNECTED_EAST), + (byte) -1, + false, + false), + true); + renderPositiveZFacing( + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tMetaTileEntity.getTexture( + iGregTechTileEntity, + (byte) SOUTH.ordinal(), + (byte) (CONNECTED_WEST | CONNECTED_EAST), + (byte) -1, + false, + false), + true); + renderNegativeXFacing( + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tMetaTileEntity.getTexture( + iGregTechTileEntity, + (byte) WEST.ordinal(), + (byte) (CONNECTED_WEST | CONNECTED_EAST), + (byte) -1, + true, + false), + true); + renderPositiveXFacing( + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tMetaTileEntity.getTexture( + iGregTechTileEntity, + (byte) EAST.ordinal(), + (byte) (CONNECTED_WEST | CONNECTED_EAST), + (byte) -1, + true, + false), + true); } else { - renderNegativeYFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) DOWN.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), true); - renderPositiveYFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) UP.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), true); - renderNegativeZFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) NORTH.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), true); - renderPositiveZFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) SOUTH.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), true); - renderNegativeXFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) WEST.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), true); - renderPositiveXFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) EAST.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), true); + renderNegativeYFacing( + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tMetaTileEntity.getTexture( + iGregTechTileEntity, (byte) DOWN.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), + true); + renderPositiveYFacing( + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tMetaTileEntity.getTexture( + iGregTechTileEntity, (byte) UP.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), + true); + renderNegativeZFacing( + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tMetaTileEntity.getTexture( + iGregTechTileEntity, (byte) NORTH.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), + true); + renderPositiveZFacing( + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tMetaTileEntity.getTexture( + iGregTechTileEntity, (byte) SOUTH.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), + true); + renderNegativeXFacing( + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tMetaTileEntity.getTexture( + iGregTechTileEntity, (byte) WEST.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), + true); + renderPositiveXFacing( + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tMetaTileEntity.getTexture( + iGregTechTileEntity, (byte) EAST.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), + true); } } - public static void renderNegativeYFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) { + public static void renderNegativeYFacing( + IBlockAccess aWorld, + RenderBlocks aRenderer, + Block aBlock, + int aX, + int aY, + int aZ, + ITexture[] aIcon, + boolean aFullBlock) { if (aWorld != null) { if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX, aY - 1, aZ, 0))) return; - Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY - 1 : aY, aZ)); + Tessellator.instance.setBrightness( + aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY - 1 : aY, aZ)); } if (aIcon == null) return; for (ITexture iTexture : aIcon) { @@ -613,10 +833,19 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { } } - public static void renderPositiveYFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) { + public static void renderPositiveYFacing( + IBlockAccess aWorld, + RenderBlocks aRenderer, + Block aBlock, + int aX, + int aY, + int aZ, + ITexture[] aIcon, + boolean aFullBlock) { if (aWorld != null) { if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX, aY + 1, aZ, 1))) return; - Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY + 1 : aY, aZ)); + Tessellator.instance.setBrightness( + aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY + 1 : aY, aZ)); } if (aIcon == null) return; for (ITexture iTexture : aIcon) { @@ -626,10 +855,19 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { } } - public static void renderNegativeZFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) { + public static void renderNegativeZFacing( + IBlockAccess aWorld, + RenderBlocks aRenderer, + Block aBlock, + int aX, + int aY, + int aZ, + ITexture[] aIcon, + boolean aFullBlock) { if (aWorld != null) { if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX, aY, aZ - 1, 2))) return; - Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ - 1 : aZ)); + Tessellator.instance.setBrightness( + aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ - 1 : aZ)); } if (aIcon == null) return; for (ITexture iTexture : aIcon) { @@ -639,10 +877,19 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { } } - public static void renderPositiveZFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) { + public static void renderPositiveZFacing( + IBlockAccess aWorld, + RenderBlocks aRenderer, + Block aBlock, + int aX, + int aY, + int aZ, + ITexture[] aIcon, + boolean aFullBlock) { if (aWorld != null) { if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX, aY, aZ + 1, 3))) return; - Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ + 1 : aZ)); + Tessellator.instance.setBrightness( + aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ + 1 : aZ)); } if (aIcon == null) return; for (ITexture iTexture : aIcon) { @@ -652,10 +899,19 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { } } - public static void renderNegativeXFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) { + public static void renderNegativeXFacing( + IBlockAccess aWorld, + RenderBlocks aRenderer, + Block aBlock, + int aX, + int aY, + int aZ, + ITexture[] aIcon, + boolean aFullBlock) { if (aWorld != null) { if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX - 1, aY, aZ, 4))) return; - Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX - 1 : aX, aY, aZ)); + Tessellator.instance.setBrightness( + aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX - 1 : aX, aY, aZ)); } if (aIcon == null) return; for (ITexture iTexture : aIcon) { @@ -665,10 +921,19 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { } } - public static void renderPositiveXFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) { + public static void renderPositiveXFacing( + IBlockAccess aWorld, + RenderBlocks aRenderer, + Block aBlock, + int aX, + int aY, + int aZ, + ITexture[] aIcon, + boolean aFullBlock) { if (aWorld != null) { if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX + 1, aY, aZ, 5))) return; - Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX + 1 : aX, aY, aZ)); + Tessellator.instance.setBrightness( + aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX + 1 : aX, aY, aZ)); } if (aIcon == null) return; for (ITexture iTexture : aIcon) { @@ -679,11 +944,12 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { } @Override - public boolean renderWorldBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, int aModelID, RenderBlocks aRenderer) { + public boolean renderWorldBlock( + IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, int aModelID, RenderBlocks aRenderer) { aRenderer.enableAO = Minecraft.isAmbientOcclusionEnabled() && GT_Mod.gregtechproxy.mRenderTileAmbientOcclusion; aRenderer.useInventoryTint = false; if (aBlock instanceof IRenderedBlock) { - IRenderedBlock tRenderer = ((IRenderedBlock)aBlock).passRenderingToObject(aWorld, aX, aY, aZ); + IRenderedBlock tRenderer = ((IRenderedBlock) aBlock).passRenderingToObject(aWorld, aX, aY, aZ); if (tRenderer != null) tRenderer = tRenderer.passRenderingToObject(aWorld, aX, aY, aZ); if (tRenderer == null) tRenderer = IRenderedBlock.ErrorRenderer.INSTANCE; boolean tNeedsToSetBounds = true; @@ -693,9 +959,13 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { } else { final boolean[] tSides = new boolean[6]; if (tRenderer instanceof IRenderedBlockSideCheck) { - for (byte tSide : ALL_VALID_SIDES) rReturn |= (tSides[tSide] = ((IRenderedBlockSideCheck)tRenderer).renderFullBlockSide(aBlock, aRenderer, tSide)); + for (byte tSide : ALL_VALID_SIDES) + rReturn |= (tSides[tSide] = + ((IRenderedBlockSideCheck) tRenderer).renderFullBlockSide(aBlock, aRenderer, tSide)); } else { - for (byte tSide : ALL_VALID_SIDES) rReturn |= (tSides[tSide] = aBlock.shouldSideBeRendered(aWorld, aX+OFFX[tSide], aY+OFFY[tSide], aZ+OFFZ[tSide], tSide)); + for (byte tSide : ALL_VALID_SIDES) + rReturn |= (tSides[tSide] = aBlock.shouldSideBeRendered( + aWorld, aX + OFFX[tSide], aY + OFFY[tSide], aZ + OFFZ[tSide], tSide)); } for (int i = 0, j = tRenderer.getRenderPasses(aBlock); i < j; i++) { if (tRenderer.usesRenderPass(i)) { @@ -707,12 +977,60 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { aRenderer.setRenderBoundsFromBlock(aBlock); tNeedsToSetBounds = false; } - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tRenderer.getTexture(aBlock, (byte) DOWN.ordinal(), i, tSides), tSides[DOWN.ordinal()]); - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tRenderer.getTexture(aBlock, (byte) UP.ordinal(), i, tSides), tSides[UP.ordinal()]); - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tRenderer.getTexture(aBlock, (byte) NORTH.ordinal(), i, tSides), tSides[NORTH.ordinal()]); - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tRenderer.getTexture(aBlock, (byte) SOUTH.ordinal(), i, tSides), tSides[SOUTH.ordinal()]); - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tRenderer.getTexture(aBlock, (byte) WEST.ordinal(), i, tSides), tSides[WEST.ordinal()]); - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tRenderer.getTexture(aBlock, (byte) EAST.ordinal(), i, tSides), tSides[EAST.ordinal()]); + renderNegativeYFacing( + aWorld, + aRenderer, + aBlock, + aX, + aY, + aZ, + tRenderer.getTexture(aBlock, (byte) DOWN.ordinal(), i, tSides), + tSides[DOWN.ordinal()]); + renderPositiveYFacing( + aWorld, + aRenderer, + aBlock, + aX, + aY, + aZ, + tRenderer.getTexture(aBlock, (byte) UP.ordinal(), i, tSides), + tSides[UP.ordinal()]); + renderNegativeZFacing( + aWorld, + aRenderer, + aBlock, + aX, + aY, + aZ, + tRenderer.getTexture(aBlock, (byte) NORTH.ordinal(), i, tSides), + tSides[NORTH.ordinal()]); + renderPositiveZFacing( + aWorld, + aRenderer, + aBlock, + aX, + aY, + aZ, + tRenderer.getTexture(aBlock, (byte) SOUTH.ordinal(), i, tSides), + tSides[SOUTH.ordinal()]); + renderNegativeXFacing( + aWorld, + aRenderer, + aBlock, + aX, + aY, + aZ, + tRenderer.getTexture(aBlock, (byte) WEST.ordinal(), i, tSides), + tSides[WEST.ordinal()]); + renderPositiveXFacing( + aWorld, + aRenderer, + aBlock, + aX, + aY, + aZ, + tRenderer.getTexture(aBlock, (byte) EAST.ordinal(), i, tSides), + tSides[EAST.ordinal()]); } } if (tNeedsToSetBounds) aBlock.setBlockBounds(0, 0, 0, 1, 1, 1); @@ -725,12 +1043,14 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { if (tileEntity == null) return false; if (tileEntity instanceof IGregTechTileEntity) { final IMetaTileEntity metaTileEntity; - if ((metaTileEntity = ((IGregTechTileEntity) tileEntity).getMetaTileEntity()) != null && metaTileEntity.renderInWorld(aWorld, aX, aY, aZ, aBlock, aRenderer)) { + if ((metaTileEntity = ((IGregTechTileEntity) tileEntity).getMetaTileEntity()) != null + && metaTileEntity.renderInWorld(aWorld, aX, aY, aZ, aBlock, aRenderer)) { aRenderer.enableAO = false; return true; } } - if (tileEntity instanceof IPipeRenderedTileEntity && renderPipeBlock(aWorld, aX, aY, aZ, aBlock, (IPipeRenderedTileEntity) tileEntity, aRenderer)) { + if (tileEntity instanceof IPipeRenderedTileEntity + && renderPipeBlock(aWorld, aX, aY, aZ, aBlock, (IPipeRenderedTileEntity) tileEntity, aRenderer)) { aRenderer.enableAO = false; return true; } diff --git a/src/main/java/gregtech/common/render/GT_SidedTexture.java b/src/main/java/gregtech/common/render/GT_SidedTexture.java index fbd5927467..4fbc28374a 100644 --- a/src/main/java/gregtech/common/render/GT_SidedTexture.java +++ b/src/main/java/gregtech/common/render/GT_SidedTexture.java @@ -17,9 +17,17 @@ public class GT_SidedTexture extends GT_TextureBase implements ITexture, IColorM */ private final short[] mRGBa; - protected GT_SidedTexture(IIconContainer aIcon0, IIconContainer aIcon1, IIconContainer aIcon2, IIconContainer aIcon3, IIconContainer aIcon4, IIconContainer aIcon5, short[] aRGBa, boolean aAllowAlpha) { + protected GT_SidedTexture( + IIconContainer aIcon0, + IIconContainer aIcon1, + IIconContainer aIcon2, + IIconContainer aIcon3, + IIconContainer aIcon4, + IIconContainer aIcon5, + short[] aRGBa, + boolean aAllowAlpha) { if (aRGBa.length != 4) throw new IllegalArgumentException("RGBa doesn't have 4 Values @ GT_RenderedTexture"); - mTextures = new ITexture[]{ + mTextures = new ITexture[] { TextureFactory.of(aIcon0, aRGBa, aAllowAlpha), TextureFactory.of(aIcon1, aRGBa, aAllowAlpha), TextureFactory.of(aIcon2, aRGBa, aAllowAlpha), @@ -34,35 +42,35 @@ public class GT_SidedTexture extends GT_TextureBase implements ITexture, IColorM public boolean isOldTexture() { return false; } - + @Override public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { - mTextures[5].renderXPos(aRenderer, aBlock, aX ,aY, aZ); + mTextures[5].renderXPos(aRenderer, aBlock, aX, aY, aZ); } @Override public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { - mTextures[4].renderXNeg(aRenderer, aBlock, aX ,aY, aZ); + mTextures[4].renderXNeg(aRenderer, aBlock, aX, aY, aZ); } @Override public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { - mTextures[1].renderYPos(aRenderer, aBlock, aX ,aY, aZ); + mTextures[1].renderYPos(aRenderer, aBlock, aX, aY, aZ); } @Override public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { - mTextures[0].renderYNeg(aRenderer, aBlock, aX ,aY, aZ); + mTextures[0].renderYNeg(aRenderer, aBlock, aX, aY, aZ); } @Override public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { - mTextures[3].renderZPos(aRenderer, aBlock, aX ,aY, aZ); + mTextures[3].renderZPos(aRenderer, aBlock, aX, aY, aZ); } @Override public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { - mTextures[2].renderZNeg(aRenderer, aBlock, aX ,aY, aZ); + mTextures[2].renderZNeg(aRenderer, aBlock, aX, aY, aZ); } @Override diff --git a/src/main/java/gregtech/common/render/GT_TextureBase.java b/src/main/java/gregtech/common/render/GT_TextureBase.java index b5b867810b..bb39410a8e 100644 --- a/src/main/java/gregtech/common/render/GT_TextureBase.java +++ b/src/main/java/gregtech/common/render/GT_TextureBase.java @@ -7,7 +7,7 @@ import net.minecraft.client.renderer.Tessellator; public abstract class GT_TextureBase implements ITexture { protected boolean isDrawing = false; - + @Override public void startDrawingQuads(RenderBlocks aRenderer, float aNormalX, float aNormalY, float aNormalZ) { if (aRenderer.useInventoryTint && (!isOldTexture() || !GT_UtilityClient.isDrawing(Tessellator.instance))) { diff --git a/src/main/java/gregtech/common/render/GT_TextureBuilder.java b/src/main/java/gregtech/common/render/GT_TextureBuilder.java index 708720ad40..f2ff07523c 100644 --- a/src/main/java/gregtech/common/render/GT_TextureBuilder.java +++ b/src/main/java/gregtech/common/render/GT_TextureBuilder.java @@ -6,12 +6,11 @@ import gregtech.api.enums.GT_Values; import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.ITextureBuilder; -import net.minecraft.block.Block; -import net.minecraftforge.common.util.ForgeDirection; - import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import net.minecraft.block.Block; +import net.minecraftforge.common.util.ForgeDirection; @SuppressWarnings("unused") public class GT_TextureBuilder implements ITextureBuilder { @@ -111,8 +110,7 @@ public class GT_TextureBuilder implements ITextureBuilder { if (fromBlock != null) { if (worldCoord == Boolean.TRUE || worldCoord == null && isCTMBlock(fromBlock, fromMeta)) return new GT_CopiedCTMBlockTexture(fromBlock, fromSide.ordinal(), fromMeta, rgba, allowAlpha); - else - return new GT_CopiedBlockTexture(fromBlock, fromSide.ordinal(), fromMeta, rgba, allowAlpha); + else return new GT_CopiedBlockTexture(fromBlock, fromSide.ordinal(), fromMeta, rgba, allowAlpha); } if (!textureLayers.isEmpty()) return new GT_MultiTexture(textureLayers.toArray(new ITexture[0])); switch (iconContainerList.size()) { @@ -126,14 +124,16 @@ public class GT_TextureBuilder implements ITextureBuilder { iconContainerList.get(ForgeDirection.SOUTH.ordinal()), iconContainerList.get(ForgeDirection.WEST.ordinal()), iconContainerList.get(ForgeDirection.EAST.ordinal()), - rgba, allowAlpha); + rgba, + allowAlpha); default: throw new IllegalStateException("Invalid sideIconContainer count"); } } private boolean isCTMBlock(Block fromBlock, int fromMeta) { - return GT_Mod.gregtechproxy.mCTMBlockCache.computeIfAbsent(fromBlock, (byte) fromMeta, GT_TextureBuilder::apply); + return GT_Mod.gregtechproxy.mCTMBlockCache.computeIfAbsent( + fromBlock, (byte) fromMeta, GT_TextureBuilder::apply); } private static Boolean apply(Block b, Byte m) { diff --git a/src/main/java/gregtech/common/render/IRenderedBlock.java b/src/main/java/gregtech/common/render/IRenderedBlock.java index 6d2ba999d5..a29ea6b6f9 100644 --- a/src/main/java/gregtech/common/render/IRenderedBlock.java +++ b/src/main/java/gregtech/common/render/IRenderedBlock.java @@ -31,11 +31,15 @@ public interface IRenderedBlock { /** returning true stops all the other Rendering from happening. */ @SideOnly(Side.CLIENT) - default boolean renderItem(Block aBlock, RenderBlocks aRenderer) { return false; } + default boolean renderItem(Block aBlock, RenderBlocks aRenderer) { + return false; + } /** returning true stops all the other Rendering from happening. */ @SideOnly(Side.CLIENT) - default boolean renderBlock(Block aBlock, RenderBlocks aRenderer, IBlockAccess aWorld, int aX, int aY, int aZ) { return false; } + default boolean renderBlock(Block aBlock, RenderBlocks aRenderer, IBlockAccess aWorld, int aX, int aY, int aZ) { + return false; + } /** if this Block lets the TileEntity or a similar Handler do all the Inventory Render work. */ @SideOnly(Side.CLIENT) @@ -48,14 +52,47 @@ public interface IRenderedBlock { class ErrorRenderer implements IRenderedBlockSideCheck, IRenderedBlock { public static final ErrorRenderer INSTANCE = new ErrorRenderer(); public ITexture[] mErrorTexture = Textures.BlockIcons.ERROR_RENDERING; - @Override public ITexture[] getTexture(Block aBlock, byte aSide, int aRenderPass, boolean[] aShouldSideBeRendered) {return mErrorTexture;} - @Override public ITexture[] getTexture(Block aBlock, byte aSide, boolean isActive, int aRenderPass) {return mErrorTexture;} - @Override public int getRenderPasses(Block aBlock) {return 1;} - @Override public boolean usesRenderPass(int aRenderPass) {return true;} - @Override public boolean setBlockBounds(Block aBlock, int aRenderPass) {aBlock.setBlockBounds(-0.25F, -0.25F, -0.25F, 1.25F, 1.25F, 1.25F); return true;} - @Override public boolean renderFullBlockSide(Block aBlock, RenderBlocks aRenderer, byte aSide) {return true;} - @Override public IRenderedBlock passRenderingToObject(ItemStack aStack) {return this;} - @Override public IRenderedBlock passRenderingToObject(IBlockAccess aWorld, int aX, int aY, int aZ) {return this;} + + @Override + public ITexture[] getTexture(Block aBlock, byte aSide, int aRenderPass, boolean[] aShouldSideBeRendered) { + return mErrorTexture; + } + + @Override + public ITexture[] getTexture(Block aBlock, byte aSide, boolean isActive, int aRenderPass) { + return mErrorTexture; + } + + @Override + public int getRenderPasses(Block aBlock) { + return 1; + } + + @Override + public boolean usesRenderPass(int aRenderPass) { + return true; + } + + @Override + public boolean setBlockBounds(Block aBlock, int aRenderPass) { + aBlock.setBlockBounds(-0.25F, -0.25F, -0.25F, 1.25F, 1.25F, 1.25F); + return true; + } + + @Override + public boolean renderFullBlockSide(Block aBlock, RenderBlocks aRenderer, byte aSide) { + return true; + } + + @Override + public IRenderedBlock passRenderingToObject(ItemStack aStack) { + return this; + } + + @Override + public IRenderedBlock passRenderingToObject(IBlockAccess aWorld, int aX, int aY, int aZ) { + return this; + } @Override public boolean renderBlock(Block aBlock, RenderBlocks aRenderer, IBlockAccess aWorld, int aX, int aY, int aZ) { diff --git a/src/main/java/gregtech/common/render/items/GT_GeneratedItem_Renderer.java b/src/main/java/gregtech/common/render/items/GT_GeneratedItem_Renderer.java index bd508a49a5..26115592f3 100644 --- a/src/main/java/gregtech/common/render/items/GT_GeneratedItem_Renderer.java +++ b/src/main/java/gregtech/common/render/items/GT_GeneratedItem_Renderer.java @@ -1,11 +1,15 @@ package gregtech.common.render.items; +import static gregtech.api.enums.ItemList.*; +import static gregtech.api.enums.ItemList.Large_Fluid_Cell_Chrome; + import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.items.GT_MetaGenerated_Item; import gregtech.api.util.GT_Utility; import gregtech.common.render.GT_RenderUtil; import gregtech.loaders.ExtraIcons; +import javax.annotation.Nullable; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.ItemRenderer; import net.minecraft.client.renderer.Tessellator; @@ -16,19 +20,14 @@ import net.minecraftforge.client.IItemRenderer; import net.minecraftforge.fluids.FluidStack; import org.lwjgl.opengl.GL11; -import javax.annotation.Nullable; - -import static gregtech.api.enums.ItemList.*; -import static gregtech.api.enums.ItemList.Large_Fluid_Cell_Chrome; - public class GT_GeneratedItem_Renderer implements IItemRenderer { @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { return type == ItemRenderType.EQUIPPED - || type == ItemRenderType.EQUIPPED_FIRST_PERSON - || type == ItemRenderType.INVENTORY - || type == ItemRenderType.ENTITY; + || type == ItemRenderType.EQUIPPED_FIRST_PERSON + || type == ItemRenderType.INVENTORY + || type == ItemRenderType.ENTITY; } @Override @@ -57,7 +56,8 @@ public class GT_GeneratedItem_Renderer implements IItemRenderer { if (tCharge >= tStats[0]) { tIcon = aItem.mIconList[(aMetaData - aItem.mOffset)][8]; } else { - tIcon = aItem.mIconList[(aMetaData - aItem.mOffset)][(7 - (int) Math.max(0L, Math.min(5L, (tStats[0] - tCharge) * 6L / tStats[0])))]; + tIcon = aItem.mIconList[(aMetaData - aItem.mOffset)][ + (7 - (int) Math.max(0L, Math.min(5L, (tStats[0] - tCharge) * 6L / tStats[0])))]; } } } else { @@ -67,8 +67,7 @@ public class GT_GeneratedItem_Renderer implements IItemRenderer { tIcon = aItem.mIconList[(aMetaData - aItem.mOffset)][0]; } - if (tIcon == null) - tIcon = Textures.ItemIcons.RENDERING_ERROR.getIcon(); + if (tIcon == null) tIcon = Textures.ItemIcons.RENDERING_ERROR.getIcon(); ItemList largeFluidCell = getLargeFluidCell(aStack); if (largeFluidCell != null) { @@ -80,7 +79,15 @@ public class GT_GeneratedItem_Renderer implements IItemRenderer { if (type.equals(IItemRenderer.ItemRenderType.INVENTORY)) { GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { - ItemRenderer.renderItemIn2D(Tessellator.instance, tIcon.getMaxU(), tIcon.getMinV(), tIcon.getMinU(), tIcon.getMaxV(), tIcon.getIconWidth(), tIcon.getIconHeight(), 0.0625F); + ItemRenderer.renderItemIn2D( + Tessellator.instance, + tIcon.getMaxU(), + tIcon.getMinV(), + tIcon.getMinU(), + tIcon.getMaxV(), + tIcon.getIconWidth(), + tIcon.getIconHeight(), + 0.0625F); } GL11.glDisable(GL11.GL_BLEND); } @@ -100,7 +107,8 @@ public class GT_GeneratedItem_Renderer implements IItemRenderer { return null; } - private static void renderLargeFluidCellExtraParts(IItemRenderer.ItemRenderType type, ItemList item, ItemStack stack) { + private static void renderLargeFluidCellExtraParts( + IItemRenderer.ItemRenderType type, ItemList item, ItemStack stack) { IIcon inner; if (item == Large_Fluid_Cell_Steel) inner = ExtraIcons.steelLargeCellInner; @@ -118,7 +126,15 @@ public class GT_GeneratedItem_Renderer implements IItemRenderer { if (type.equals(ItemRenderType.INVENTORY)) { GT_RenderUtil.renderItemIcon(inner, 16.0D, -0.001D, 0.0F, 0.0F, -1.0F); } else { - ItemRenderer.renderItemIn2D(Tessellator.instance, inner.getMaxU(), inner.getMinV(), inner.getMinU(), inner.getMaxV(), inner.getIconWidth(), inner.getIconHeight(), 0.0625F); + ItemRenderer.renderItemIn2D( + Tessellator.instance, + inner.getMaxU(), + inner.getMinV(), + inner.getMinU(), + inner.getMaxV(), + inner.getIconWidth(), + inner.getIconHeight(), + 0.0625F); } FluidStack fluidStack = GT_Utility.getFluidForFilledItem(stack, true); @@ -134,7 +150,15 @@ public class GT_GeneratedItem_Renderer implements IItemRenderer { if (type.equals(ItemRenderType.INVENTORY)) { GT_RenderUtil.renderItemIcon(fluidIcon, 16.0D, -0.001D, 0.0F, 0.0F, -1.0F); } else { - ItemRenderer.renderItemIn2D(Tessellator.instance, fluidIcon.getMaxU(), fluidIcon.getMinV(), fluidIcon.getMinU(), fluidIcon.getMaxV(), fluidIcon.getIconWidth(), fluidIcon.getIconHeight(), 0.0625F); + ItemRenderer.renderItemIn2D( + Tessellator.instance, + fluidIcon.getMaxU(), + fluidIcon.getMinV(), + fluidIcon.getMinU(), + fluidIcon.getMaxV(), + fluidIcon.getIconWidth(), + fluidIcon.getIconHeight(), + 0.0625F); } GL11.glColor3ub((byte) -1, (byte) -1, (byte) -1); diff --git a/src/main/java/gregtech/common/render/items/GT_GeneratedMaterial_Renderer.java b/src/main/java/gregtech/common/render/items/GT_GeneratedMaterial_Renderer.java index 59eba76d03..6a2535559e 100644 --- a/src/main/java/gregtech/common/render/items/GT_GeneratedMaterial_Renderer.java +++ b/src/main/java/gregtech/common/render/items/GT_GeneratedMaterial_Renderer.java @@ -19,9 +19,9 @@ public class GT_GeneratedMaterial_Renderer implements IItemRenderer { @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { return type == ItemRenderType.EQUIPPED - || type == ItemRenderType.EQUIPPED_FIRST_PERSON - || type == ItemRenderType.INVENTORY - || type == ItemRenderType.ENTITY; + || type == ItemRenderType.EQUIPPED_FIRST_PERSON + || type == ItemRenderType.INVENTORY + || type == ItemRenderType.ENTITY; } @Override @@ -65,7 +65,15 @@ public class GT_GeneratedMaterial_Renderer implements IItemRenderer { if (type.equals(IItemRenderer.ItemRenderType.INVENTORY)) { GT_RenderUtil.renderItemIcon(tOverlay, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { - ItemRenderer.renderItemIn2D(Tessellator.instance, tOverlay.getMaxU(), tOverlay.getMinV(), tOverlay.getMinU(), tOverlay.getMaxV(), tOverlay.getIconWidth(), tOverlay.getIconHeight(), 0.0625F); + ItemRenderer.renderItemIn2D( + Tessellator.instance, + tOverlay.getMaxU(), + tOverlay.getMinV(), + tOverlay.getMinU(), + tOverlay.getMaxV(), + tOverlay.getIconWidth(), + tOverlay.getIconHeight(), + 0.0625F); } } @@ -83,9 +91,16 @@ public class GT_GeneratedMaterial_Renderer implements IItemRenderer { if (type.equals(IItemRenderer.ItemRenderType.INVENTORY)) { GT_RenderUtil.renderItemIcon(icon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { - ItemRenderer.renderItemIn2D(Tessellator.instance, icon.getMaxU(), icon.getMinV(), icon.getMinU(), icon.getMaxV(), icon.getIconWidth(), icon.getIconHeight(), 0.0625F); + ItemRenderer.renderItemIn2D( + Tessellator.instance, + icon.getMaxU(), + icon.getMinV(), + icon.getMinU(), + icon.getMaxV(), + icon.getIconWidth(), + icon.getIconHeight(), + 0.0625F); } - } public void renderContainedFluid(ItemRenderType type, FluidStack aFluidStack, IIcon fluidIcon) { @@ -98,9 +113,16 @@ public class GT_GeneratedMaterial_Renderer implements IItemRenderer { if (type.equals(IItemRenderer.ItemRenderType.INVENTORY)) { GT_RenderUtil.renderItemIcon(fluidIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { - ItemRenderer.renderItemIn2D(Tessellator.instance, fluidIcon.getMaxU(), fluidIcon.getMinV(), fluidIcon.getMinU(), fluidIcon.getMaxV(), fluidIcon.getIconWidth(), fluidIcon.getIconHeight(), 0.0625F); + ItemRenderer.renderItemIn2D( + Tessellator.instance, + fluidIcon.getMaxU(), + fluidIcon.getMinV(), + fluidIcon.getMinU(), + fluidIcon.getMaxV(), + fluidIcon.getIconWidth(), + fluidIcon.getIconHeight(), + 0.0625F); } GL11.glDepthFunc(GL11.GL_LEQUAL); } - } diff --git a/src/main/java/gregtech/common/render/items/GT_MetaGenerated_Item_Renderer.java b/src/main/java/gregtech/common/render/items/GT_MetaGenerated_Item_Renderer.java index ebabb2167a..8e23a0005d 100644 --- a/src/main/java/gregtech/common/render/items/GT_MetaGenerated_Item_Renderer.java +++ b/src/main/java/gregtech/common/render/items/GT_MetaGenerated_Item_Renderer.java @@ -10,7 +10,8 @@ import org.lwjgl.opengl.GL11; public class GT_MetaGenerated_Item_Renderer implements IItemRenderer { - private final IItemRenderer mItemRenderer = new GT_GeneratedItem_Renderer();; + private final IItemRenderer mItemRenderer = new GT_GeneratedItem_Renderer(); + ; private final IItemRenderer mMaterialRenderer = new GT_GeneratedMaterial_Renderer(); public GT_MetaGenerated_Item_Renderer() { @@ -62,5 +63,4 @@ public class GT_MetaGenerated_Item_Renderer implements IItemRenderer { return mItemRenderer; } - } diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java index 6fab5d92d6..f5fcda6d7b 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java @@ -1,5 +1,8 @@ package gregtech.common.tileentities.automation; +import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_CHESTBUFFER; +import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_CHESTBUFFER_GLOW; + import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -9,49 +12,54 @@ import gregtech.common.gui.GT_Container_ChestBuffer; import gregtech.common.gui.GT_GUIContainer_ChestBuffer; import net.minecraft.entity.player.InventoryPlayer; -import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_CHESTBUFFER; -import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_CHESTBUFFER_GLOW; - public class GT_MetaTileEntity_ChestBuffer extends GT_MetaTileEntity_Buffer { - private static final int[] tickRate = {400, 200, 100, 20, 4, 1, 1, 1, 1, 1, 1, 1, 1}; - private static final int[] maxStacks = { 1, 1, 1, 1, 1, 1, 2, 4, 8, 16, 32, 64, 128}; - + private static final int[] tickRate = {400, 200, 100, 20, 4, 1, 1, 1, 1, 1, 1, 1, 1}; + private static final int[] maxStacks = {1, 1, 1, 1, 1, 1, 2, 4, 8, 16, 32, 64, 128}; public GT_MetaTileEntity_ChestBuffer(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 28, new String[]{ - "Buffers up to 27 Item Stacks", - "Use Screwdriver to regulate output stack size", - "Does not consume energy to move Item", - getTickRateDesc(aTier)}); + super(aID, aName, aNameRegional, aTier, 28, new String[] { + "Buffers up to 27 Item Stacks", + "Use Screwdriver to regulate output stack size", + "Does not consume energy to move Item", + getTickRateDesc(aTier) + }); } - public GT_MetaTileEntity_ChestBuffer(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription) { + public GT_MetaTileEntity_ChestBuffer( + int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription) { super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription); } - public GT_MetaTileEntity_ChestBuffer(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String[] aDescription) { - super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription); + public GT_MetaTileEntity_ChestBuffer( + int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String[] aDescription) { + super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription); } - public GT_MetaTileEntity_ChestBuffer(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_ChestBuffer( + String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } - public GT_MetaTileEntity_ChestBuffer(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_ChestBuffer( + String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_ChestBuffer(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures); + return new GT_MetaTileEntity_ChestBuffer( + this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures); } @Override public ITexture getOverlayIcon() { return TextureFactory.of( TextureFactory.of(AUTOMATION_CHESTBUFFER), - TextureFactory.builder().addIcon(AUTOMATION_CHESTBUFFER_GLOW).glow().build()); + TextureFactory.builder() + .addIcon(AUTOMATION_CHESTBUFFER_GLOW) + .glow() + .build()); } @Override @@ -63,13 +71,14 @@ public class GT_MetaTileEntity_ChestBuffer extends GT_MetaTileEntity_Buffer { protected void moveItems(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { if (aTimer % tickRate[mTier] > 0) return; - // mSuccess will be negative if the call is caused by the %200 aTimer, always try to push. Otherwise it will be positive. + // mSuccess will be negative if the call is caused by the %200 aTimer, always try to push. Otherwise it will be + // positive. // For the first 6 ticks after a successful move (49->44), push every tick. Then go to every 5 ticks. - if ( (mSuccess <= 0 ) || (mSuccess > 43) || ((mSuccess % 5) == 0 )){ + if ((mSuccess <= 0) || (mSuccess > 43) || ((mSuccess % 5) == 0)) { super.moveItems(aBaseMetaTileEntity, aTimer, Math.min(MAX, maxStacks[mTier])); } - if(mSuccess < 0) { + if (mSuccess < 0) { mSuccess = 0; } } @@ -84,7 +93,7 @@ public class GT_MetaTileEntity_ChestBuffer extends GT_MetaTileEntity_Buffer { return new GT_GUIContainer_ChestBuffer(aPlayerInventory, aBaseMetaTileEntity); } - protected static String getTickRateDesc(int tier){ + protected static String getTickRateDesc(int tier) { int tickRate = getTickRate(tier); String timeStr = ""; String numStr = ""; @@ -93,8 +102,7 @@ public class GT_MetaTileEntity_ChestBuffer extends GT_MetaTileEntity_Buffer { } else { numStr = "1 item"; } - if (tickRate < 20) - timeStr = "1/" + 20/tickRate + " "; + if (tickRate < 20) timeStr = "1/" + 20 / tickRate + " "; else if (tickRate > 20) { timeStr = (tickRate / 20) + "th "; } @@ -102,8 +110,7 @@ public class GT_MetaTileEntity_ChestBuffer extends GT_MetaTileEntity_Buffer { } protected static int getTickRate(int tier) { - if (tier > 9) - return 1; + if (tier > 9) return 1; return tickRate[tier]; } diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java index 02eaf892ac..f3ab391109 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java @@ -1,5 +1,8 @@ package gregtech.common.tileentities.automation; +import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_FILTER; +import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_FILTER_GLOW; + import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -12,31 +15,32 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_FILTER; -import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_FILTER_GLOW; - public class GT_MetaTileEntity_Filter extends GT_MetaTileEntity_Buffer { public boolean bIgnoreNBT = false; public boolean bInvertFilter = false; public GT_MetaTileEntity_Filter(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 19, new String[]{ - "Filters up to 9 different Items", - "Use Screwdriver to regulate output stack size", - "Does not consume energy to move Item"}); + super(aID, aName, aNameRegional, aTier, 19, new String[] { + "Filters up to 9 different Items", + "Use Screwdriver to regulate output stack size", + "Does not consume energy to move Item" + }); } - public GT_MetaTileEntity_Filter(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_Filter( + String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } - - public GT_MetaTileEntity_Filter(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + + public GT_MetaTileEntity_Filter( + String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Filter(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures); + return new GT_MetaTileEntity_Filter( + this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures); } @Override @@ -96,16 +100,10 @@ public class GT_MetaTileEntity_Filter extends GT_MetaTileEntity_Buffer { if (bRedstoneIfFull) { int emptySlots = 0; for (int i = 0; i < 9; i++) { - if (mInventory[i] == null) - ++emptySlots; + if (mInventory[i] == null) ++emptySlots; } - if (!bInvert) - emptySlots = 9 - emptySlots; - for (byte b = 0; b < 6; b++) - aBaseMetaTileEntity.setInternalOutputRedstoneSignal(b, (byte) emptySlots); - } - else - for (byte b = 0; b < 6; b++) - aBaseMetaTileEntity.setInternalOutputRedstoneSignal(b, (byte) 0); + if (!bInvert) emptySlots = 9 - emptySlots; + for (byte b = 0; b < 6; b++) aBaseMetaTileEntity.setInternalOutputRedstoneSignal(b, (byte) emptySlots); + } else for (byte b = 0; b < 6; b++) aBaseMetaTileEntity.setInternalOutputRedstoneSignal(b, (byte) 0); } } diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java index d27d8db04d..4241fa8d11 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java @@ -1,5 +1,8 @@ package gregtech.common.tileentities.automation; +import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_ITEMDISTRIBUTOR; +import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_ITEMDISTRIBUTOR_GLOW; + import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -15,38 +18,38 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_ITEMDISTRIBUTOR; -import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_ITEMDISTRIBUTOR_GLOW; - public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer { private byte[] itemsPerSide = new byte[6]; private byte currentSide = 0, currentSideItemCount = 0; public GT_MetaTileEntity_ItemDistributor(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 28, new String[]{ - "Distributes Items between different Machine Sides", - "Default Items per Machine Side: 0", - "Use Screwdriver to increase/decrease Items per Side", - "Does not consume energy to move Item"}); + super(aID, aName, aNameRegional, aTier, 28, new String[] { + "Distributes Items between different Machine Sides", + "Default Items per Machine Side: 0", + "Use Screwdriver to increase/decrease Items per Side", + "Does not consume energy to move Item" + }); } - public GT_MetaTileEntity_ItemDistributor(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, - String aDescription) { + public GT_MetaTileEntity_ItemDistributor( + int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription) { super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription); } - public GT_MetaTileEntity_ItemDistributor(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_ItemDistributor( + String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } - public GT_MetaTileEntity_ItemDistributor(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_ItemDistributor( + String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_ItemDistributor(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, - this.mTextures); + return new GT_MetaTileEntity_ItemDistributor( + this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures); } @Override @@ -58,7 +61,10 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer public ITexture getOverlayIcon() { return TextureFactory.of( TextureFactory.of(AUTOMATION_ITEMDISTRIBUTOR), - TextureFactory.builder().addIcon(AUTOMATION_ITEMDISTRIBUTOR_GLOW).glow().build()); + TextureFactory.builder() + .addIcon(AUTOMATION_ITEMDISTRIBUTOR_GLOW) + .glow() + .build()); } @Override @@ -72,7 +78,13 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { if (aSide == aFacing) { return mTextures[0][aColorIndex + 1]; } else { @@ -85,8 +97,8 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer ITexture[][][] returnTextures = new ITexture[2][17][]; ITexture baseIcon = getOverlayIcon(), pipeIcon = TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT); for (int i = 0; i < 17; i++) { - returnTextures[0][i] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i], baseIcon}; - returnTextures[1][i] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i], pipeIcon, baseIcon}; + returnTextures[0][i] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i], baseIcon}; + returnTextures[1][i] = new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][i], pipeIcon, baseIcon}; } return returnTextures; } @@ -132,9 +144,17 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer return; } } - movedItems = GT_Utility.moveOneItemStack(aBaseMetaTileEntity, adjacentTileEntity, currentSide, - GT_Utility.getOppositeSide(currentSide), null, false, (byte) 64, (byte) 1, - (byte) (itemsPerSide[currentSide] - currentSideItemCount), (byte) 1); + movedItems = GT_Utility.moveOneItemStack( + aBaseMetaTileEntity, + adjacentTileEntity, + currentSide, + GT_Utility.getOppositeSide(currentSide), + null, + false, + (byte) 64, + (byte) 1, + (byte) (itemsPerSide[currentSide] - currentSideItemCount), + (byte) 1); currentSideItemCount += movedItems; if (currentSideItemCount >= itemsPerSide[currentSide]) { currentSide = (byte) ((currentSide + 1) % 6); @@ -148,7 +168,7 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - //Adjust items per side by 1 or -1, constrained to the cyclic interval [0, 127] + // Adjust items per side by 1 or -1, constrained to the cyclic interval [0, 127] itemsPerSide[aSide] += aPlayer.isSneaking() ? -1 : 1; itemsPerSide[aSide] = (byte) ((itemsPerSide[aSide] + 128) % 128); GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("211", "Items per side: ") + itemsPerSide[aSide]); diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_RecipeFilter.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_RecipeFilter.java index a2f86103f5..007fa79213 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_RecipeFilter.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_RecipeFilter.java @@ -1,5 +1,8 @@ package gregtech.common.tileentities.automation; +import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_RECIPEFILTER; +import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_RECIPEFILTER_GLOW; + import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -13,24 +16,24 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_RECIPEFILTER; -import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_RECIPEFILTER_GLOW; - public class GT_MetaTileEntity_RecipeFilter extends GT_MetaTileEntity_SpecialFilter { public GT_Recipe.GT_Recipe_Map mRecipeMap; public GT_MetaTileEntity_RecipeFilter(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, new String[]{ - "Filters 1 Recipe Type", - "Use Screwdriver to regulate output stack size", - "Does not consume energy to move Item"}); + super(aID, aName, aNameRegional, aTier, new String[] { + "Filters 1 Recipe Type", + "Use Screwdriver to regulate output stack size", + "Does not consume energy to move Item" + }); } - public GT_MetaTileEntity_RecipeFilter(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_RecipeFilter( + String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } - public GT_MetaTileEntity_RecipeFilter(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_RecipeFilter( + String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @@ -59,21 +62,24 @@ public class GT_MetaTileEntity_RecipeFilter extends GT_MetaTileEntity_SpecialFil @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_RecipeFilter(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures); + return new GT_MetaTileEntity_RecipeFilter( + this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures); } @Override public ITexture getOverlayIcon() { return TextureFactory.of( TextureFactory.of(AUTOMATION_RECIPEFILTER), - TextureFactory.builder().addIcon(AUTOMATION_RECIPEFILTER_GLOW).glow().build()); + TextureFactory.builder() + .addIcon(AUTOMATION_RECIPEFILTER_GLOW) + .glow() + .build()); } @Override public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); - if (mRecipeMap != null) - aNBT.setString("mRecipeMap", this.mRecipeMap.mUniqueIdentifier); + if (mRecipeMap != null) aNBT.setString("mRecipeMap", this.mRecipeMap.mUniqueIdentifier); } @Override diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java index c20df68b32..edc8ef78e4 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java @@ -1,5 +1,8 @@ package gregtech.common.tileentities.automation; +import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_REGULATOR; +import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_REGULATOR_GLOW; + import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -8,47 +11,49 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; import gregtech.common.gui.GT_Container_Regulator; import gregtech.common.gui.GT_GUIContainer_Regulator; +import java.util.Collections; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import java.util.Collections; - -import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_REGULATOR; -import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_REGULATOR_GLOW; - -public class GT_MetaTileEntity_Regulator - extends GT_MetaTileEntity_Buffer { +public class GT_MetaTileEntity_Regulator extends GT_MetaTileEntity_Buffer { public int[] mTargetSlots = {0, 0, 0, 0, 0, 0, 0, 0, 0}; private boolean charge = false, decharge = false; public GT_MetaTileEntity_Regulator(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 20, new String[]{ - "Filters up to 9 different Items", - "Allows Item-specific output stack size", - "Allows Item-specific output slot", - "Does not consume energy to move Item"}); + super(aID, aName, aNameRegional, aTier, 20, new String[] { + "Filters up to 9 different Items", + "Allows Item-specific output stack size", + "Allows Item-specific output slot", + "Does not consume energy to move Item" + }); } - public GT_MetaTileEntity_Regulator(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_Regulator( + String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } - - public GT_MetaTileEntity_Regulator(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + + public GT_MetaTileEntity_Regulator( + String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Regulator(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures); + return new GT_MetaTileEntity_Regulator( + this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures); } @Override public ITexture getOverlayIcon() { return TextureFactory.of( TextureFactory.of(AUTOMATION_REGULATOR), - TextureFactory.builder().addIcon(AUTOMATION_REGULATOR_GLOW).glow().build()); + TextureFactory.builder() + .addIcon(AUTOMATION_REGULATOR_GLOW) + .glow() + .build()); } @Override @@ -95,15 +100,28 @@ public class GT_MetaTileEntity_Regulator } @Override - public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - //Regulation per Screwdriver is overridden by GUI regulation. + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + // Regulation per Screwdriver is overridden by GUI regulation. } @Override public void moveItems(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { for (int i = 0, tCosts; i < 9; i++) { if (this.mInventory[(i + 9)] != null) { - tCosts = GT_Utility.moveOneItemStackIntoSlot(getBaseMetaTileEntity(), getBaseMetaTileEntity().getTileEntityAtSide(getBaseMetaTileEntity().getBackFacing()), getBaseMetaTileEntity().getBackFacing(), this.mTargetSlots[i], Collections.singletonList(this.mInventory[(i + 9)]), false, (byte) this.mInventory[(i + 9)].stackSize, (byte) this.mInventory[(i + 9)].stackSize, (byte) 64, (byte) 1) * 3; + tCosts = GT_Utility.moveOneItemStackIntoSlot( + getBaseMetaTileEntity(), + getBaseMetaTileEntity() + .getTileEntityAtSide( + getBaseMetaTileEntity().getBackFacing()), + getBaseMetaTileEntity().getBackFacing(), + this.mTargetSlots[i], + Collections.singletonList(this.mInventory[(i + 9)]), + false, + (byte) this.mInventory[(i + 9)].stackSize, + (byte) this.mInventory[(i + 9)].stackSize, + (byte) 64, + (byte) 1) + * 3; if (tCosts > 0) { this.mSuccess = 50; break; @@ -114,7 +132,8 @@ public class GT_MetaTileEntity_Regulator @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (GT_Utility.areStacksEqual(aStack, this.mInventory[(aIndex + 9)])); + return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) + && (GT_Utility.areStacksEqual(aStack, this.mInventory[(aIndex + 9)])); } @Override diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java index 7065e70a3e..ffa33f426e 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java @@ -1,5 +1,8 @@ package gregtech.common.tileentities.automation; +import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_SUPERBUFFER; +import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_SUPERBUFFER_GLOW; + import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -7,44 +10,47 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; import gregtech.common.gui.GT_Container_SuperBuffer; import gregtech.common.gui.GT_GUIContainer_SuperBuffer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; - import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; - -import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_SUPERBUFFER; -import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_SUPERBUFFER_GLOW; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_SuperBuffer extends GT_MetaTileEntity_ChestBuffer { public GT_MetaTileEntity_SuperBuffer(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 257, new String[]{ - "Buffers up to 256 Item Stacks", - "Use Screwdriver to regulate output stack size", - "Does not consume energy to move Item", - getTickRateDesc(aTier)}); + super(aID, aName, aNameRegional, aTier, 257, new String[] { + "Buffers up to 256 Item Stacks", + "Use Screwdriver to regulate output stack size", + "Does not consume energy to move Item", + getTickRateDesc(aTier) + }); } - public GT_MetaTileEntity_SuperBuffer(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_SuperBuffer( + String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } - public GT_MetaTileEntity_SuperBuffer(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_SuperBuffer( + String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_SuperBuffer(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures); + return new GT_MetaTileEntity_SuperBuffer( + this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures); } @Override public ITexture getOverlayIcon() { return TextureFactory.of( TextureFactory.of(AUTOMATION_SUPERBUFFER), - TextureFactory.builder().addIcon(AUTOMATION_SUPERBUFFER_GLOW).glow().build()); + TextureFactory.builder() + .addIcon(AUTOMATION_SUPERBUFFER_GLOW) + .glow() + .build()); } @Override @@ -53,23 +59,20 @@ public class GT_MetaTileEntity_SuperBuffer extends GT_MetaTileEntity_ChestBuffer HashMap<GT_Utility.ItemId, Integer> slots = new HashMap<>(mInventory.length); HashMap<GT_Utility.ItemId, ItemStack> stacks = new HashMap<>(mInventory.length); List<Integer> validSlots = new ArrayList<>(mInventory.length); - //List<String> order = new ArrayList<>(mInventory.length); + // List<String> order = new ArrayList<>(mInventory.length); for (int i = 0; i < mInventory.length - 1; i++) { - if (!isValidSlot(i)) - continue; + if (!isValidSlot(i)) continue; validSlots.add(i); ItemStack s = mInventory[i]; - if(s == null) - continue; + if (s == null) continue; GT_Utility.ItemId sID = GT_Utility.ItemId.createNoCopy(s); slots.merge(sID, s.stackSize, Integer::sum); - if(!stacks.containsKey(sID)) - stacks.put(sID, s); - //order.add(sID); + if (!stacks.containsKey(sID)) stacks.put(sID, s); + // order.add(sID); mInventory[i] = null; } int i = 0; - for(Map.Entry<GT_Utility.ItemId, Integer> entry : slots.entrySet()){ + for (Map.Entry<GT_Utility.ItemId, Integer> entry : slots.entrySet()) { do { int slot = validSlots.get(i); mInventory[slot] = stacks.get(entry.getKey()).copy(); @@ -77,8 +80,7 @@ public class GT_MetaTileEntity_SuperBuffer extends GT_MetaTileEntity_ChestBuffer mInventory[slot].stackSize = toSet; entry.setValue(entry.getValue() - toSet); i++; - } - while(entry.getValue() > 0); + } while (entry.getValue() > 0); } } diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java index 95b11bcb54..da1ca6d42a 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java @@ -1,5 +1,9 @@ package gregtech.common.tileentities.automation; +import static gregtech.api.enums.GT_Values.W; +import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_TYPEFILTER; +import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_TYPEFILTER_GLOW; + import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -12,39 +16,42 @@ import gregtech.api.util.GT_Utility; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import static gregtech.api.enums.GT_Values.W; -import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_TYPEFILTER; -import static gregtech.api.enums.Textures.BlockIcons.AUTOMATION_TYPEFILTER_GLOW; - public class GT_MetaTileEntity_TypeFilter extends GT_MetaTileEntity_SpecialFilter { public int mRotationIndex = 0; public OrePrefixes mPrefix = OrePrefixes.ore; public GT_MetaTileEntity_TypeFilter(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, new String[]{ - "Filters 1 Item Type", - "Use Screwdriver to regulate output stack size", - "Does not consume energy to move Item"}); + super(aID, aName, aNameRegional, aTier, new String[] { + "Filters 1 Item Type", + "Use Screwdriver to regulate output stack size", + "Does not consume energy to move Item" + }); } - public GT_MetaTileEntity_TypeFilter(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_TypeFilter( + String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } - public GT_MetaTileEntity_TypeFilter(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_TypeFilter( + String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_TypeFilter(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures); + return new GT_MetaTileEntity_TypeFilter( + this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures); } @Override public ITexture getOverlayIcon() { return TextureFactory.of( TextureFactory.of(AUTOMATION_TYPEFILTER), - TextureFactory.builder().addIcon(AUTOMATION_TYPEFILTER_GLOW).glow().build()); + TextureFactory.builder() + .addIcon(AUTOMATION_TYPEFILTER_GLOW) + .glow() + .build()); } public void clickTypeIcon(boolean aRightClick, ItemStack aHandStack) { @@ -73,7 +80,8 @@ public class GT_MetaTileEntity_TypeFilter extends GT_MetaTileEntity_SpecialFilte } } while (OrePrefixes.values()[i].mPrefixedItems.isEmpty()); } - if (!OrePrefixes.values()[i].mPrefixedItems.isEmpty() && OrePrefixes.values()[i].mPrefixInto == OrePrefixes.values()[i]) + if (!OrePrefixes.values()[i].mPrefixedItems.isEmpty() + && OrePrefixes.values()[i].mPrefixInto == OrePrefixes.values()[i]) mPrefix = OrePrefixes.values()[i]; } } @@ -90,7 +98,10 @@ public class GT_MetaTileEntity_TypeFilter extends GT_MetaTileEntity_SpecialFilte this.mInventory[SPECIAL_SLOT_INDEX] = null; return; } - this.mInventory[SPECIAL_SLOT_INDEX] = GT_Utility.copyAmount(1L, this.mPrefix.mPrefixedItems.get(this.mRotationIndex = (this.mRotationIndex + 1) % this.mPrefix.mPrefixedItems.size())); + this.mInventory[SPECIAL_SLOT_INDEX] = GT_Utility.copyAmount( + 1L, + this.mPrefix.mPrefixedItems.get( + this.mRotationIndex = (this.mRotationIndex + 1) % this.mPrefix.mPrefixedItems.size())); if (this.mInventory[SPECIAL_SLOT_INDEX] == null) return; if (this.mInventory[SPECIAL_SLOT_INDEX].getItemDamage() == W) this.mInventory[9].setItemDamage(0); this.mInventory[SPECIAL_SLOT_INDEX].setStackDisplayName(this.mPrefix.toString()); @@ -115,19 +126,19 @@ public class GT_MetaTileEntity_TypeFilter extends GT_MetaTileEntity_SpecialFilte ItemData tData = GT_OreDictUnificator.getItemData(aStack); if (tData != null && tData.mPrefix != null) { OrePrefixes tFix = tData.mPrefix; - if (tFix == OrePrefixes.oreBlackgranite || - tFix == OrePrefixes.oreDense || - tFix == OrePrefixes.oreEnd || - tFix == OrePrefixes.oreEndstone || - tFix == OrePrefixes.oreNether || - tFix == OrePrefixes.oreNetherrack || - tFix == OrePrefixes.oreNormal || - tFix == OrePrefixes.orePoor || - tFix == OrePrefixes.oreRedgranite || - tFix == OrePrefixes.oreRich || - tFix == OrePrefixes.oreSmall || - tFix == OrePrefixes.oreBasalt || - tFix == OrePrefixes.oreMarble) tAllowPrefix = true; + if (tFix == OrePrefixes.oreBlackgranite + || tFix == OrePrefixes.oreDense + || tFix == OrePrefixes.oreEnd + || tFix == OrePrefixes.oreEndstone + || tFix == OrePrefixes.oreNether + || tFix == OrePrefixes.oreNetherrack + || tFix == OrePrefixes.oreNormal + || tFix == OrePrefixes.orePoor + || tFix == OrePrefixes.oreRedgranite + || tFix == OrePrefixes.oreRich + || tFix == OrePrefixes.oreSmall + || tFix == OrePrefixes.oreBasalt + || tFix == OrePrefixes.oreMarble) tAllowPrefix = true; } } return tAllowPrefix; diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java index 9eebaaabc4..9d832e134c 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java @@ -1,10 +1,12 @@ package gregtech.common.tileentities.boilers; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; -import gregtech.api.enums.ParticleFX; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; +import gregtech.api.enums.ParticleFX; import gregtech.api.enums.SoundResource; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -23,8 +25,6 @@ import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; - public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTank { public static final byte SOUND_EVENT_LET_OFF_EXCESS_STEAM = 1; public int mTemperature = 20; @@ -34,11 +34,13 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa public boolean mHadNoWater = false; private int mExcessWater = 0; - public GT_MetaTileEntity_Boiler(int aID, String aName, String aNameRegional, String aDescription, ITexture... aTextures) { + public GT_MetaTileEntity_Boiler( + int aID, String aName, String aNameRegional, String aDescription, ITexture... aTextures) { super(aID, aName, aNameRegional, 0, 4, aDescription, aTextures); } - public GT_MetaTileEntity_Boiler(int aID, String aName, String aNameRegional, String[] aDescription, ITexture... aTextures) { + public GT_MetaTileEntity_Boiler( + int aID, String aName, String aNameRegional, String[] aDescription, ITexture... aTextures) { super(aID, aName, aNameRegional, 0, 4, aDescription, aTextures); } @@ -51,10 +53,17 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - ITexture[] tmp = mTextures[aSide >= 2 ? aSide != aFacing ? 2 : ((byte) (aActive ? 4 : 3)) : aSide][aColorIndex + 1]; + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { + ITexture[] tmp = + mTextures[aSide >= 2 ? aSide != aFacing ? 2 : ((byte) (aActive ? 4 : 3)) : aSide][aColorIndex + 1]; if (aSide != aFacing && tmp.length == 2) { - tmp = new ITexture[]{tmp[0]}; + tmp = new ITexture[] {tmp[0]}; } return tmp; } @@ -252,7 +261,9 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa } private void calculateHeatUp(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if ((this.mTemperature < getMaxTemperature()) && (this.mProcessingEnergy > 0) && (aTick % getHeatUpRate() == 0L)) { + if ((this.mTemperature < getMaxTemperature()) + && (this.mProcessingEnergy > 0) + && (aTick % getHeatUpRate() == 0L)) { this.mProcessingEnergy -= getEnergyConsumption(); this.mTemperature += getHeatUpAmount(); } @@ -300,11 +311,16 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa protected final void pushSteamToSide(IGregTechTileEntity aBaseMetaTileEntity, int aSide) { IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide((byte) aSide); if (tTileEntity == null) return; - FluidStack tDrained = aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(aSide), Math.max(1, this.mSteam.amount / 2), false); + FluidStack tDrained = aBaseMetaTileEntity.drain( + ForgeDirection.getOrientation(aSide), Math.max(1, this.mSteam.amount / 2), false); if (tDrained == null) return; - int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tDrained, false); + int tFilledAmount = + tTileEntity.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tDrained, false); if (tFilledAmount <= 0) return; - tTileEntity.fill(ForgeDirection.getOrientation(aSide).getOpposite(), aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(aSide), tFilledAmount, true), true); + tTileEntity.fill( + ForgeDirection.getOrientation(aSide).getOpposite(), + aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(aSide), tFilledAmount, true), + true); } protected void pushSteamToInventories(IGregTechTileEntity aBaseMetaTileEntity) { @@ -328,7 +344,6 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return GT_Mod.gregtechproxy.mAllowSmallBoilerAutomation; - } @Override @@ -341,7 +356,13 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa if (aIndex == GT_MetaTileEntity_Boiler.SOUND_EVENT_LET_OFF_EXCESS_STEAM) { GT_Utility.doSoundAtClient(SoundResource.RANDOM_FIZZ, 2, 1.0F, aX, aY, aZ); - new ParticleEventBuilder().setIdentifier(ParticleFX.CLOUD).setWorld(getBaseMetaTileEntity().getWorld()).setMotion(0D, 0D, 0D).<ParticleEventBuilder>times(8, x -> x.setPosition(aX - 0.5D + XSTR_INSTANCE.nextFloat(), aY, aZ - 0.5D + XSTR_INSTANCE.nextFloat()).run()); + new ParticleEventBuilder() + .setIdentifier(ParticleFX.CLOUD) + .setWorld(getBaseMetaTileEntity().getWorld()) + .setMotion(0D, 0D, 0D) + .<ParticleEventBuilder>times(8, x -> x.setPosition( + aX - 0.5D + XSTR_INSTANCE.nextFloat(), aY, aZ - 0.5D + XSTR_INSTANCE.nextFloat()) + .run()); } } diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java index 4b4a0299c1..9d3c61fc82 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java @@ -1,11 +1,21 @@ package gregtech.common.tileentities.boilers; +import static gregtech.api.enums.Textures.BlockIcons.BOILER_FRONT; +import static gregtech.api.enums.Textures.BlockIcons.BOILER_FRONT_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.BOILER_FRONT_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.BOILER_FRONT_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.GT_Mod; -import gregtech.api.enums.ParticleFX; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.ParticleFX; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; @@ -22,22 +32,13 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.tileentity.TileEntityFurnace; import net.minecraftforge.common.util.ForgeDirection; -import static gregtech.api.enums.Textures.BlockIcons.BOILER_FRONT; -import static gregtech.api.enums.Textures.BlockIcons.BOILER_FRONT_ACTIVE; -import static gregtech.api.enums.Textures.BlockIcons.BOILER_FRONT_ACTIVE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.BOILER_FRONT_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM; -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE; -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE; -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; - public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler { public GT_MetaTileEntity_Boiler_Bronze(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional, new String[]{ - "An early way to get Steam Power", - "Produces 120L of Steam per second", - "Causes " + GT_Mod.gregtechproxy.mPollutionSmallCoalBoilerPerSecond + " Pollution per second"}); + super(aID, aName, aNameRegional, new String[] { + "An early way to get Steam Power", + "Produces 120L of Steam per second", + "Causes " + GT_Mod.gregtechproxy.mPollutionSmallCoalBoilerPerSecond + " Pollution per second" + }); } public GT_MetaTileEntity_Boiler_Bronze(int aID, String aName, String aNameRegional, String[] aDescription) { @@ -55,17 +56,27 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler { @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[5][17][]; - final ITexture[] - texBottom = {TextureFactory.of(MACHINE_BRONZEBRICKS_BOTTOM)}, + final ITexture[] texBottom = {TextureFactory.of(MACHINE_BRONZEBRICKS_BOTTOM)}, texTop = {TextureFactory.of(MACHINE_BRONZEBRICKS_TOP), TextureFactory.of(OVERLAY_PIPE)}, texSide = {TextureFactory.of(MACHINE_BRONZEBRICKS_SIDE), TextureFactory.of(OVERLAY_PIPE)}, - texFront = {TextureFactory.of(MACHINE_BRONZEBRICKS_SIDE), - TextureFactory.of(BOILER_FRONT), - TextureFactory.builder().addIcon(BOILER_FRONT_GLOW).glow().build()}, - texFrontActive = { - TextureFactory.of(MACHINE_BRONZEBRICKS_SIDE), - TextureFactory.of(BOILER_FRONT_ACTIVE), - TextureFactory.builder().addIcon(BOILER_FRONT_ACTIVE_GLOW).glow().build()}; + texFront = + { + TextureFactory.of(MACHINE_BRONZEBRICKS_SIDE), + TextureFactory.of(BOILER_FRONT), + TextureFactory.builder() + .addIcon(BOILER_FRONT_GLOW) + .glow() + .build() + }, + texFrontActive = + { + TextureFactory.of(MACHINE_BRONZEBRICKS_SIDE), + TextureFactory.of(BOILER_FRONT_ACTIVE), + TextureFactory.builder() + .addIcon(BOILER_FRONT_ACTIVE_GLOW) + .glow() + .build() + }; for (int i = 0; i < 17; i++) { rTextures[0][i] = texBottom; rTextures[1][i] = texTop; @@ -109,8 +120,8 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler { final byte frontFacing = aBaseMetaTileEntity.getFrontFacing(); if (frontFacing > 1 - && aBaseMetaTileEntity.getCoverIDAtSide(frontFacing) == 0 - && !aBaseMetaTileEntity.getOpacityAtSide(frontFacing)) { + && aBaseMetaTileEntity.getCoverIDAtSide(frontFacing) == 0 + && !aBaseMetaTileEntity.getOpacityAtSide(frontFacing)) { final double oX = aBaseMetaTileEntity.getOffsetX(frontFacing, 1) + 8D / 16D; final double oY = aBaseMetaTileEntity.getOffsetY(frontFacing, 1); @@ -137,8 +148,7 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler { z = oZ + offset; } - ParticleEventBuilder particleEventBuilder = - (new ParticleEventBuilder()) + ParticleEventBuilder particleEventBuilder = (new ParticleEventBuilder()) .setMotion(0D, 0D, 0D) .setPosition(x, y, z) .setWorld(getBaseMetaTileEntity().getWorld()); @@ -151,7 +161,10 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler { @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPostTick(aBaseMetaTileEntity, aTick); - if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L) && this.mProcessingEnergy > 0 && (aTick % 20L == 0L)) { + if ((aBaseMetaTileEntity.isServerSide()) + && (aTick > 20L) + && this.mProcessingEnergy > 0 + && (aTick % 20L == 0L)) { GT_Pollution.addPollution(getBaseMetaTileEntity(), getPollution()); } } @@ -184,64 +197,125 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler { @Override protected void updateFuel(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (this.mInventory[2] == null) return; - if ( - (GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Coal) && !GT_Utility.isPartOfOrePrefix(this.mInventory[2],OrePrefixes.block)) || - (GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Charcoal) && !GT_Utility.isPartOfOrePrefix(this.mInventory[2],OrePrefixes.block)) || - (GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Lignite) && !GT_Utility.isPartOfOrePrefix(this.mInventory[2],OrePrefixes.block)) || - (GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Diamond) && !GT_Utility.isPartOfOrePrefix(this.mInventory[2],OrePrefixes.block)) || - GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCoke") || - GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCactusCharcoal") || - GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCactusCoke") || - GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelSugarCharcoal") || - GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelSugarCoke") - ) { - if ((TileEntityFurnace.getItemBurnTime(this.mInventory[2])/10) > 0) { - this.mProcessingEnergy += (TileEntityFurnace.getItemBurnTime(this.mInventory[2])/10); + if ((GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Coal) + && !GT_Utility.isPartOfOrePrefix(this.mInventory[2], OrePrefixes.block)) + || (GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Charcoal) + && !GT_Utility.isPartOfOrePrefix(this.mInventory[2], OrePrefixes.block)) + || (GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Lignite) + && !GT_Utility.isPartOfOrePrefix(this.mInventory[2], OrePrefixes.block)) + || (GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Diamond) + && !GT_Utility.isPartOfOrePrefix(this.mInventory[2], OrePrefixes.block)) + || GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCoke") + || GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCactusCharcoal") + || GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCactusCoke") + || GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelSugarCharcoal") + || GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelSugarCoke")) { + if ((TileEntityFurnace.getItemBurnTime(this.mInventory[2]) / 10) > 0) { + this.mProcessingEnergy += (TileEntityFurnace.getItemBurnTime(this.mInventory[2]) / 10); aBaseMetaTileEntity.decrStackSize(2, 1); - if (XSTR.XSTR_INSTANCE.nextInt(GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Coal) || GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Charcoal) ? 3 : GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Lignite) ? 8 : 2 ) == 0) { - aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, (GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Lignite) || GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Coal)) ? Materials.DarkAsh : Materials.Ash, 1L)); + if (XSTR.XSTR_INSTANCE.nextInt( + GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Coal) + || GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Charcoal) + ? 3 + : GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Lignite) ? 8 : 2) + == 0) { + aBaseMetaTileEntity.addStackToSlot( + 3, + GT_OreDictUnificator.get( + OrePrefixes.dustTiny, + (GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Lignite) + || GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Coal)) + ? Materials.DarkAsh + : Materials.Ash, + 1L)); } } - } - else if ( - //If its a block of the following materials - GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.block.get(Materials.Coal)) || - GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.block.get(Materials.Lignite)) || - GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.block.get(Materials.Charcoal))|| - GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.block.get(Materials.Diamond)) || - - //if its either a Railcraft Coke Block or a custom GTNH compressed Coal/charcoal/lignite/coke block - ( - Block.getBlockFromItem(this.mInventory[2].getItem()) != null && //check if the block exists - ( - Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("tile") && //check if the block is a tile -> block - ( - //If the name of the block contains these names - Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("charcoal") || - Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("coal") || - Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("diamond") || - Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("coke") || - Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("railcraft.cube") || - Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("lignite") - ) - ) - ) - ){ - //try to add 10% of the burnvalue as Processing energy, no boost for coal coke here - if ((TileEntityFurnace.getItemBurnTime(this.mInventory[2])/10) > 0) { + } else if ( + // If its a block of the following materials + GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.block.get(Materials.Coal)) + || GT_OreDictUnificator.isItemStackInstanceOf( + this.mInventory[2], OrePrefixes.block.get(Materials.Lignite)) + || GT_OreDictUnificator.isItemStackInstanceOf( + this.mInventory[2], OrePrefixes.block.get(Materials.Charcoal)) + || GT_OreDictUnificator.isItemStackInstanceOf( + this.mInventory[2], OrePrefixes.block.get(Materials.Diamond)) + || + + // if its either a Railcraft Coke Block or a custom GTNH compressed Coal/charcoal/lignite/coke block + (Block.getBlockFromItem(this.mInventory[2].getItem()) != null + && // check if the block exists + (Block.getBlockFromItem(this.mInventory[2].getItem()) + .getUnlocalizedName() + .toLowerCase() + .contains("tile") + && // check if the block is a tile -> block + ( + // If the name of the block contains these names + Block.getBlockFromItem(this.mInventory[2].getItem()) + .getUnlocalizedName() + .toLowerCase() + .contains("charcoal") + || Block.getBlockFromItem(this.mInventory[2].getItem()) + .getUnlocalizedName() + .toLowerCase() + .contains("coal") + || Block.getBlockFromItem(this.mInventory[2].getItem()) + .getUnlocalizedName() + .toLowerCase() + .contains("diamond") + || Block.getBlockFromItem(this.mInventory[2].getItem()) + .getUnlocalizedName() + .toLowerCase() + .contains("coke") + || Block.getBlockFromItem(this.mInventory[2].getItem()) + .getUnlocalizedName() + .toLowerCase() + .contains("railcraft.cube") + || Block.getBlockFromItem(this.mInventory[2].getItem()) + .getUnlocalizedName() + .toLowerCase() + .contains("lignite"))))) { + // try to add 10% of the burnvalue as Processing energy, no boost for coal coke here + if ((TileEntityFurnace.getItemBurnTime(this.mInventory[2]) / 10) > 0) { this.mProcessingEnergy += (TileEntityFurnace.getItemBurnTime(this.mInventory[2]) / 10); aBaseMetaTileEntity.decrStackSize(2, 1); - aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dust, (GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Lignite) || GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Coal) || Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("coal") || Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase().contains("lignite") ) ? Materials.DarkAsh : Materials.Ash, 1L)); + aBaseMetaTileEntity.addStackToSlot( + 3, + GT_OreDictUnificator.get( + OrePrefixes.dust, + (GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Lignite) + || GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Coal) + || Block.getBlockFromItem(this.mInventory[2].getItem()) + .getUnlocalizedName() + .toLowerCase() + .contains("coal") + || Block.getBlockFromItem(this.mInventory[2].getItem()) + .getUnlocalizedName() + .toLowerCase() + .contains("lignite")) + ? Materials.DarkAsh + : Materials.Ash, + 1L)); } - //enables every other fuel with at least 2000 burntime as a fuel, i.e. peat, Magic/Solid Super Fuel, Coal Singularities, Nitor, while bucket of creosite should be blocked same goes for lava - }else if ((TileEntityFurnace.getItemBurnTime(this.mInventory[2])) >= 2000 && !(this.mInventory[2].getUnlocalizedName().toLowerCase().contains("bucket") || this.mInventory[2].getUnlocalizedName().toLowerCase().contains("cell"))){ + // enables every other fuel with at least 2000 burntime as a fuel, i.e. peat, Magic/Solid Super Fuel, Coal + // Singularities, Nitor, while bucket of creosite should be blocked same goes for lava + } else if ((TileEntityFurnace.getItemBurnTime(this.mInventory[2])) >= 2000 + && !(this.mInventory[2].getUnlocalizedName().toLowerCase().contains("bucket") + || this.mInventory[2].getUnlocalizedName().toLowerCase().contains("cell"))) { this.mProcessingEnergy += (TileEntityFurnace.getItemBurnTime(this.mInventory[2]) / 10); aBaseMetaTileEntity.decrStackSize(2, 1); - //adds tiny pile of ash for burntime under 10k, small pile for under 100k and pile for bigger values + // adds tiny pile of ash for burntime under 10k, small pile for under 100k and pile for bigger values if (XSTR.XSTR_INSTANCE.nextInt(2) == 0) - aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get( (TileEntityFurnace.getItemBurnTime(this.mInventory[2]) >= 10000 ? TileEntityFurnace.getItemBurnTime(this.mInventory[2]) >= 100000 ? OrePrefixes.dust : OrePrefixes.dustSmall : OrePrefixes.dustTiny), Materials.Ash, 1L)); + aBaseMetaTileEntity.addStackToSlot( + 3, + GT_OreDictUnificator.get( + (TileEntityFurnace.getItemBurnTime(this.mInventory[2]) >= 10000 + ? TileEntityFurnace.getItemBurnTime(this.mInventory[2]) >= 100000 + ? OrePrefixes.dust + : OrePrefixes.dustSmall + : OrePrefixes.dustTiny), + Materials.Ash, + 1L)); } - } - } diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java index 18010c0886..38bef79f38 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java @@ -1,5 +1,14 @@ package gregtech.common.tileentities.boilers; +import static gregtech.api.enums.Textures.BlockIcons.BOILER_LAVA_FRONT; +import static gregtech.api.enums.Textures.BlockIcons.BOILER_LAVA_FRONT_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.BOILER_LAVA_FRONT_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.BOILER_LAVA_FRONT_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEELBRICKS_TOP; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE; + import gregtech.GT_Mod; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; @@ -14,15 +23,6 @@ import gregtech.common.gui.GT_GUIContainer_Boiler; import net.minecraft.entity.player.InventoryPlayer; import net.minecraftforge.fluids.FluidStack; -import static gregtech.api.enums.Textures.BlockIcons.BOILER_LAVA_FRONT; -import static gregtech.api.enums.Textures.BlockIcons.BOILER_LAVA_FRONT_ACTIVE; -import static gregtech.api.enums.Textures.BlockIcons.BOILER_LAVA_FRONT_ACTIVE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.BOILER_LAVA_FRONT_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM; -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE; -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEELBRICKS_TOP; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE; - public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler { public static final int COOLDOWN_INTERVAL = 20; @@ -31,11 +31,14 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler { public static final int PRODUCTION_PER_SECOND = 600; public GT_MetaTileEntity_Boiler_Lava(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional, new String[]{ - "A Boiler running off Lava", - "Produces " + PRODUCTION_PER_SECOND + "L of Steam per second", - "Causes " + Integer.toString(GT_Mod.gregtechproxy.mPollutionHighPressureLavaBoilerPerSecond) + " Pollution per second", - "Consumes " + ((double) CONSUMPTION_PER_HEATUP / ENERGY_PER_LAVA) + "L of Lava every " + COOLDOWN_INTERVAL + " ticks when fully heat up"}); + super(aID, aName, aNameRegional, new String[] { + "A Boiler running off Lava", + "Produces " + PRODUCTION_PER_SECOND + "L of Steam per second", + "Causes " + Integer.toString(GT_Mod.gregtechproxy.mPollutionHighPressureLavaBoilerPerSecond) + + " Pollution per second", + "Consumes " + ((double) CONSUMPTION_PER_HEATUP / ENERGY_PER_LAVA) + "L of Lava every " + COOLDOWN_INTERVAL + + " ticks when fully heat up" + }); } public GT_MetaTileEntity_Boiler_Lava(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { @@ -49,18 +52,24 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler { @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[5][17][]; - final ITexture[] - texBottom = {TextureFactory.of(MACHINE_STEELBRICKS_BOTTOM)}, + final ITexture[] texBottom = {TextureFactory.of(MACHINE_STEELBRICKS_BOTTOM)}, texTop = {TextureFactory.of(MACHINE_STEELBRICKS_TOP), TextureFactory.of(OVERLAY_PIPE)}, texSide = {TextureFactory.of(MACHINE_STEELBRICKS_SIDE), TextureFactory.of(OVERLAY_PIPE)}, - texFront = { - TextureFactory.of(MACHINE_STEELBRICKS_SIDE), - TextureFactory.of(BOILER_LAVA_FRONT), - TextureFactory.of(BOILER_LAVA_FRONT_GLOW)}, - texFrontActive = { - TextureFactory.of(MACHINE_STEELBRICKS_SIDE), - TextureFactory.of(BOILER_LAVA_FRONT_ACTIVE), - TextureFactory.builder().addIcon(BOILER_LAVA_FRONT_ACTIVE_GLOW).glow().build()}; + texFront = + { + TextureFactory.of(MACHINE_STEELBRICKS_SIDE), + TextureFactory.of(BOILER_LAVA_FRONT), + TextureFactory.of(BOILER_LAVA_FRONT_GLOW) + }, + texFrontActive = + { + TextureFactory.of(MACHINE_STEELBRICKS_SIDE), + TextureFactory.of(BOILER_LAVA_FRONT_ACTIVE), + TextureFactory.builder() + .addIcon(BOILER_LAVA_FRONT_ACTIVE_GLOW) + .glow() + .build() + }; for (byte i = 0; i < 17; i++) { rTextures[0][i] = texBottom; rTextures[1][i] = texTop; @@ -127,7 +136,8 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler { this.mProcessingEnergy += 1000 * ENERGY_PER_LAVA; aBaseMetaTileEntity.decrStackSize(2, 1); aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Empty, 1L)); - } else if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.bucketClay.get(Materials.Lava))) { + } else if (GT_OreDictUnificator.isItemStackInstanceOf( + this.mInventory[2], OrePrefixes.bucketClay.get(Materials.Lava))) { this.mProcessingEnergy += 1000 * ENERGY_PER_LAVA; aBaseMetaTileEntity.decrStackSize(2, 1); // Clay lava buckets break, so you don't get it back. diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java index cd3bb00ee4..cccfb1b6b4 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java @@ -1,5 +1,10 @@ package gregtech.common.tileentities.boilers; +import static gregtech.api.GregTech_API.sMachineFile; +import static gregtech.api.enums.ConfigCategories.machineconfig; +import static mcp.mobius.waila.api.SpecialChars.GOLD; +import static mcp.mobius.waila.api.SpecialChars.RESET; + import gregtech.api.enums.Dyes; import gregtech.api.enums.Textures.BlockIcons; import gregtech.api.interfaces.ITexture; @@ -11,6 +16,7 @@ import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; import gregtech.common.gui.GT_Container_Boiler; import gregtech.common.gui.GT_GUIContainer_Boiler; +import java.util.List; import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; import net.minecraft.entity.player.EntityPlayerMP; @@ -22,21 +28,13 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import java.util.List; - -import static gregtech.api.GregTech_API.sMachineFile; -import static gregtech.api.enums.ConfigCategories.machineconfig; -import static mcp.mobius.waila.api.SpecialChars.GOLD; -import static mcp.mobius.waila.api.SpecialChars.RESET; - public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler { public static final String LPS_FMT = "%s L/s"; private static final String localizedDescFormat = GT_LanguageManager.addStringLocalization( "gt.blockmachines.boiler.solar.desc.format", - "Steam Power by the Sun%n" + - "Produces %sL of Steam per second%n" + - "Calcifies over time, reducing Steam output to %sL/s%n" + - "Break and replace to descale"); + "Steam Power by the Sun%n" + "Produces %sL of Steam per second%n" + + "Calcifies over time, reducing Steam output to %sL/s%n" + + "Break and replace to descale"); protected final Config mConfig; protected int basicTemperatureMod = 5; // Base Celsius gain or loss private int mRunTimeTicks = 0; @@ -56,13 +54,14 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler { mConfig = createConfig(); } - protected GT_MetaTileEntity_Boiler_Solar(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, Config aConfig) { + protected GT_MetaTileEntity_Boiler_Solar( + String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, Config aConfig) { super(aName, aTier, aDescription, aTextures); mConfig = aConfig; } protected Config createConfig() { - return new Config(machineconfig + ".boiler.solar.bronze",1080000,40,120,45); + return new Config(machineconfig + ".boiler.solar.bronze", 1080000, 40, 120, 45); } /** @@ -92,9 +91,10 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler { @Override public String[] getDescription() { - return String.format(localizedDescFormat, - GT_Utility.formatNumbers(getMaxOutputPerSecond()), - GT_Utility.formatNumbers(getMinOutputPerSecond())) + return String.format( + localizedDescFormat, + GT_Utility.formatNumbers(getMaxOutputPerSecond()), + GT_Utility.formatNumbers(getMinOutputPerSecond())) .split("\\R"); } @@ -108,16 +108,17 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler { for (int color = -1; color < 16; color++) { int i = color + 1; short[] colorModulation = Dyes.getModulation(color, Dyes._NULL.mRGBa); - rTextures[0][i] = new ITexture[]{ - TextureFactory.of(BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, colorModulation)}; - rTextures[1][i] = new ITexture[]{ - TextureFactory.of(BlockIcons.MACHINE_BRONZEBRICKS_TOP, colorModulation), - TextureFactory.of(BlockIcons.BOILER_SOLAR)}; - rTextures[2][i] = new ITexture[]{ - TextureFactory.of(BlockIcons.MACHINE_BRONZEBRICKS_SIDE, colorModulation)}; - rTextures[3][i] = new ITexture[]{ - TextureFactory.of(BlockIcons.MACHINE_BRONZEBRICKS_SIDE, colorModulation), - TextureFactory.of(BlockIcons.OVERLAY_PIPE)}; + rTextures[0][i] = + new ITexture[] {TextureFactory.of(BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, colorModulation)}; + rTextures[1][i] = new ITexture[] { + TextureFactory.of(BlockIcons.MACHINE_BRONZEBRICKS_TOP, colorModulation), + TextureFactory.of(BlockIcons.BOILER_SOLAR) + }; + rTextures[2][i] = new ITexture[] {TextureFactory.of(BlockIcons.MACHINE_BRONZEBRICKS_SIDE, colorModulation)}; + rTextures[3][i] = new ITexture[] { + TextureFactory.of(BlockIcons.MACHINE_BRONZEBRICKS_SIDE, colorModulation), + TextureFactory.of(BlockIcons.OVERLAY_PIPE) + }; } return rTextures; } @@ -133,7 +134,13 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler { } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { int i = aColorIndex + 1; if (aSide >= 2) { if (aSide != aFacing) return mTextures[2][i]; @@ -193,7 +200,9 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler { * from the maximum output per second, and return this or the minimum output per second */ return mConfig.getMaxOutputPerSecond() - - mConfig.getMaxOutputPerSecond() * (mRunTimeTicks - mConfig.getCalcificationTicks()) / mConfig.getCalcificationTicks(); + - mConfig.getMaxOutputPerSecond() + * (mRunTimeTicks - mConfig.getCalcificationTicks()) + / mConfig.getCalcificationTicks(); } else { return mConfig.getMaxOutputPerSecond(); } @@ -251,16 +260,19 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler { @Override public String[] getInfoData() { - return String.format("Heat Capacity: " + EnumChatFormatting.GREEN + "%s %%" + EnumChatFormatting.RESET + - " Hot time: " + EnumChatFormatting.RED + "%s s" + EnumChatFormatting.RESET + "%n" + - "Min output: " + EnumChatFormatting.RED + LPS_FMT + EnumChatFormatting.RESET + - " Max output: " + EnumChatFormatting.RED + LPS_FMT + EnumChatFormatting.RESET + "%n" + - "Current Output: " + EnumChatFormatting.YELLOW + LPS_FMT + EnumChatFormatting.RESET, - GT_Utility.formatNumbers(getHeatCapacityPercent()), - GT_Utility.formatNumbers(getHotTimeSeconds()), - GT_Utility.formatNumbers(getMinOutputPerSecond()), - GT_Utility.formatNumbers(getMaxOutputPerSecond()), - GT_Utility.formatNumbers(getProductionPerSecond())) + return String.format( + "Heat Capacity: " + EnumChatFormatting.GREEN + "%s %%" + EnumChatFormatting.RESET + + " Hot time: " + + EnumChatFormatting.RED + "%s s" + EnumChatFormatting.RESET + "%n" + "Min output: " + + EnumChatFormatting.RED + LPS_FMT + EnumChatFormatting.RESET + " Max output: " + + EnumChatFormatting.RED + LPS_FMT + EnumChatFormatting.RESET + "%n" + + "Current Output: " + + EnumChatFormatting.YELLOW + LPS_FMT + EnumChatFormatting.RESET, + GT_Utility.formatNumbers(getHeatCapacityPercent()), + GT_Utility.formatNumbers(getHotTimeSeconds()), + GT_Utility.formatNumbers(getMinOutputPerSecond()), + GT_Utility.formatNumbers(getMaxOutputPerSecond()), + GT_Utility.formatNumbers(getProductionPerSecond())) .split("\\R"); } @@ -278,15 +290,20 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler { } @Override - public void getWailaBody(ItemStack itemStack, List<String> currentTip, IWailaDataAccessor accessor, IWailaConfigHandler config) { + public void getWailaBody( + ItemStack itemStack, List<String> currentTip, IWailaDataAccessor accessor, IWailaConfigHandler config) { final NBTTagCompound tag = accessor.getNBTData(); - currentTip.add(String.format((GOLD + "Solar Boiler Output: " + RESET + "%d/%d L/s"), tag.getInteger("calcificationOutput"), tag.getInteger("maxCalcificationOutput"))); + currentTip.add(String.format( + (GOLD + "Solar Boiler Output: " + RESET + "%d/%d L/s"), + tag.getInteger("calcificationOutput"), + tag.getInteger("maxCalcificationOutput"))); super.getWailaBody(itemStack, currentTip, accessor, config); } @Override - public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, int z) { + public void getWailaNBTData( + EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, int z) { super.getWailaNBTData(player, tile, tag, world, x, y, z); tag.setInteger("calcificationOutput", (getProductionPerSecond())); tag.setInteger("maxCalcificationOutput", (getMaxOutputPerSecond())); @@ -299,27 +316,38 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler { private final int coolDownTicks; private final int maxRuntimeTicks; - public Config(String aCategory, - int aDefaultCalcificationTicks, - int aDefaultMinOutputPerSecond, - int aDefaultMaxOutputPerSecond, - int aDefaultCoolDownTicks) { - calcificationTicks = get(aCategory,"CalcificationTicks", aDefaultCalcificationTicks, + public Config( + String aCategory, + int aDefaultCalcificationTicks, + int aDefaultMinOutputPerSecond, + int aDefaultMaxOutputPerSecond, + int aDefaultCoolDownTicks) { + calcificationTicks = get( + aCategory, + "CalcificationTicks", + aDefaultCalcificationTicks, "Number of run-time ticks before boiler starts calcification.", "100% calcification and minimal output will be reached at 2 times this."); - minOutputPerSecond = get(aCategory,"MinOutputPerSecond", aDefaultMinOutputPerSecond); - maxOutputPerSecond = get(aCategory,"MaxOutputPerSecond", aDefaultMaxOutputPerSecond); - coolDownTicks = get(aCategory,"CoolDownTicks", aDefaultCoolDownTicks, "Number of ticks it takes to lose 1°C."); + minOutputPerSecond = get(aCategory, "MinOutputPerSecond", aDefaultMinOutputPerSecond); + maxOutputPerSecond = get(aCategory, "MaxOutputPerSecond", aDefaultMaxOutputPerSecond); + coolDownTicks = + get(aCategory, "CoolDownTicks", aDefaultCoolDownTicks, "Number of ticks it takes to lose 1°C."); // After which min output is reached. - maxRuntimeTicks = (getMaxOutputPerSecond() - getMinOutputPerSecond()) * getCalcificationTicks() / getMaxOutputPerSecond() + getCalcificationTicks(); + maxRuntimeTicks = (getMaxOutputPerSecond() - getMinOutputPerSecond()) + * getCalcificationTicks() + / getMaxOutputPerSecond() + + getCalcificationTicks(); } - protected int get(final String aCategory, final String aKey, final int aDefaultValue, final String... aComments) { + protected int get( + final String aCategory, final String aKey, final int aDefaultValue, final String... aComments) { final StringBuilder tCommentBuilder = new StringBuilder(); - for (String tComment: aComments) - tCommentBuilder.append(tComment).append('\n'); + for (String tComment : aComments) tCommentBuilder.append(tComment).append('\n'); tCommentBuilder.append("Default: ").append(aDefaultValue); - return sMachineFile.mConfig.get(aCategory, aKey, aDefaultValue, tCommentBuilder.toString()).getInt(); + return sMachineFile + .mConfig + .get(aCategory, aKey, aDefaultValue, tCommentBuilder.toString()) + .getInt(); } public int getCalcificationTicks() { diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar_Steel.java index e044b6fb9b..223c280ad4 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar_Steel.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar_Steel.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.boilers; +import static gregtech.api.enums.ConfigCategories.machineconfig; + import gregtech.api.enums.Dyes; import gregtech.api.enums.Textures.BlockIcons; import gregtech.api.interfaces.ITexture; @@ -9,22 +11,23 @@ import gregtech.api.render.TextureFactory; import gregtech.common.gui.GT_GUIContainer_Boiler; import net.minecraft.entity.player.InventoryPlayer; -import static gregtech.api.enums.ConfigCategories.machineconfig; - public class GT_MetaTileEntity_Boiler_Solar_Steel extends GT_MetaTileEntity_Boiler_Solar { public GT_MetaTileEntity_Boiler_Solar_Steel(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } - public GT_MetaTileEntity_Boiler_Solar_Steel(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_Boiler_Solar_Steel( + String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } - public GT_MetaTileEntity_Boiler_Solar_Steel(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_Boiler_Solar_Steel( + String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } - public GT_MetaTileEntity_Boiler_Solar_Steel(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, Config aConfig) { + public GT_MetaTileEntity_Boiler_Solar_Steel( + String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, Config aConfig) { super(aName, aTier, aDescription, aTextures, aConfig); } @@ -40,16 +43,17 @@ public class GT_MetaTileEntity_Boiler_Solar_Steel extends GT_MetaTileEntity_Boil for (int color = -1; color < 16; color++) { int i = color + 1; short[] colorModulation = Dyes.getModulation(color, Dyes._NULL.mRGBa); - rTextures[0][i] = new ITexture[]{ - TextureFactory.of(BlockIcons.MACHINE_STEELBRICKS_BOTTOM, colorModulation)}; - rTextures[1][i] = new ITexture[]{ - TextureFactory.of(BlockIcons.MACHINE_STEELBRICKS_TOP, colorModulation), - TextureFactory.of(BlockIcons.BOILER_SOLAR)}; - rTextures[2][i] = new ITexture[]{ - TextureFactory.of(BlockIcons.MACHINE_STEELBRICKS_SIDE, colorModulation)}; - rTextures[3][i] = new ITexture[]{ - TextureFactory.of(BlockIcons.MACHINE_STEELBRICKS_SIDE, colorModulation), - TextureFactory.of(BlockIcons.OVERLAY_PIPE)}; + rTextures[0][i] = + new ITexture[] {TextureFactory.of(BlockIcons.MACHINE_STEELBRICKS_BOTTOM, colorModulation)}; + rTextures[1][i] = new ITexture[] { + TextureFactory.of(BlockIcons.MACHINE_STEELBRICKS_TOP, colorModulation), + TextureFactory.of(BlockIcons.BOILER_SOLAR) + }; + rTextures[2][i] = new ITexture[] {TextureFactory.of(BlockIcons.MACHINE_STEELBRICKS_SIDE, colorModulation)}; + rTextures[3][i] = new ITexture[] { + TextureFactory.of(BlockIcons.MACHINE_STEELBRICKS_SIDE, colorModulation), + TextureFactory.of(BlockIcons.OVERLAY_PIPE) + }; } return rTextures; } @@ -66,6 +70,7 @@ public class GT_MetaTileEntity_Boiler_Solar_Steel extends GT_MetaTileEntity_Boil @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Boiler_Solar_Steel(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mConfig); + return new GT_MetaTileEntity_Boiler_Solar_Steel( + this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mConfig); } } diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java index 98546ff09e..b417ece4d5 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java @@ -1,14 +1,5 @@ package gregtech.common.tileentities.boilers; -import gregtech.GT_Mod; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.render.TextureFactory; -import gregtech.common.gui.GT_Container_Boiler; -import gregtech.common.gui.GT_GUIContainer_Boiler; -import net.minecraft.entity.player.InventoryPlayer; - import static gregtech.api.enums.Textures.BlockIcons.BOILER_FRONT; import static gregtech.api.enums.Textures.BlockIcons.BOILER_FRONT_ACTIVE; import static gregtech.api.enums.Textures.BlockIcons.BOILER_FRONT_ACTIVE_GLOW; @@ -18,14 +9,24 @@ import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE; import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEELBRICKS_TOP; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE; -public class GT_MetaTileEntity_Boiler_Steel extends GT_MetaTileEntity_Boiler_Bronze { +import gregtech.GT_Mod; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.render.TextureFactory; +import gregtech.common.gui.GT_Container_Boiler; +import gregtech.common.gui.GT_GUIContainer_Boiler; +import net.minecraft.entity.player.InventoryPlayer; +public class GT_MetaTileEntity_Boiler_Steel extends GT_MetaTileEntity_Boiler_Bronze { public GT_MetaTileEntity_Boiler_Steel(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional, new String[]{ - "Faster than the Bronze Boiler", - "Produces 300L of Steam per second", - "Causes "+Integer.toString(GT_Mod.gregtechproxy.mPollutionHighPressureCoalBoilerPerSecond)+" Pollution per second"}); + super(aID, aName, aNameRegional, new String[] { + "Faster than the Bronze Boiler", + "Produces 300L of Steam per second", + "Causes " + Integer.toString(GT_Mod.gregtechproxy.mPollutionHighPressureCoalBoilerPerSecond) + + " Pollution per second" + }); } public GT_MetaTileEntity_Boiler_Steel(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { @@ -39,17 +40,27 @@ public class GT_MetaTileEntity_Boiler_Steel extends GT_MetaTileEntity_Boiler_Bro @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[5][17][]; - final ITexture[] - texBottom = {TextureFactory.of(MACHINE_STEELBRICKS_BOTTOM)}, + final ITexture[] texBottom = {TextureFactory.of(MACHINE_STEELBRICKS_BOTTOM)}, texTop = {TextureFactory.of(MACHINE_STEELBRICKS_TOP), TextureFactory.of(OVERLAY_PIPE)}, texSide = {TextureFactory.of(MACHINE_STEELBRICKS_SIDE), TextureFactory.of(OVERLAY_PIPE)}, - texFront = {TextureFactory.of(MACHINE_STEELBRICKS_SIDE), - TextureFactory.of(BOILER_FRONT), - TextureFactory.builder().addIcon(BOILER_FRONT_GLOW).glow().build()}, - texFrontActive = { - TextureFactory.of(MACHINE_STEELBRICKS_SIDE), - TextureFactory.of(BOILER_FRONT_ACTIVE), - TextureFactory.builder().addIcon(BOILER_FRONT_ACTIVE_GLOW).glow().build()}; + texFront = + { + TextureFactory.of(MACHINE_STEELBRICKS_SIDE), + TextureFactory.of(BOILER_FRONT), + TextureFactory.builder() + .addIcon(BOILER_FRONT_GLOW) + .glow() + .build() + }, + texFrontActive = + { + TextureFactory.of(MACHINE_STEELBRICKS_SIDE), + TextureFactory.of(BOILER_FRONT_ACTIVE), + TextureFactory.builder() + .addIcon(BOILER_FRONT_ACTIVE_GLOW) + .glow() + .build() + }; for (int i = 0; i < 17; i++) { rTextures[0][i] = texBottom; rTextures[1][i] = texTop; diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java index 6a712b41f5..ca6e77225e 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java @@ -1,13 +1,16 @@ package gregtech.common.tileentities.generators; +import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; + import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.GT_Mod; import gregtech.api.GregTech_API; -import gregtech.api.enums.ParticleFX; import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.ItemList; +import gregtech.api.enums.ParticleFX; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; @@ -22,19 +25,18 @@ import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; -import static gregtech.api.enums.Textures.BlockIcons.*; -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; - public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGenerator { - - public int mEfficiency; public GT_MetaTileEntity_DieselGenerator(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, new String[]{ - "Requires liquid Fuel", - "Causes " + (int) (GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond * GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier[aTier]) + " Pollution per second"}); + super(aID, aName, aNameRegional, aTier, new String[] { + "Requires liquid Fuel", + "Causes " + + (int) (GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond + * GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier[aTier]) + + " Pollution per second" + }); onConfigLoad(); } @@ -69,7 +71,10 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe } public void onConfigLoad() { - this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "DieselGenerator.efficiency.tier." + this.mTier, (100 - this.mTier * 5)); + this.mEfficiency = GregTech_API.sMachineFile.get( + ConfigCategories.machineconfig, + "DieselGenerator.efficiency.tier." + this.mTier, + (100 - this.mTier * 5)); } @Override @@ -93,7 +98,9 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aTick % 100 == 0 && mFluid != null && mFluid.amount > this.getCapacity()) { - GT_Log.err.println("Dupe Abuse: " + aBaseMetaTileEntity.getOwnerName() + " Coords: " + aBaseMetaTileEntity.getXCoord() + " " + aBaseMetaTileEntity.getYCoord() + " " + aBaseMetaTileEntity.getZCoord()); + GT_Log.err.println( + "Dupe Abuse: " + aBaseMetaTileEntity.getOwnerName() + " Coords: " + aBaseMetaTileEntity.getXCoord() + + " " + aBaseMetaTileEntity.getYCoord() + " " + aBaseMetaTileEntity.getZCoord()); aBaseMetaTileEntity.setToFire(); } super.onPostTick(aBaseMetaTileEntity, aTick); @@ -112,97 +119,159 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe final byte topFacing = (byte) ForgeDirection.UP.ordinal(); if (aBaseMetaTileEntity.getCoverIDAtSide(topFacing) == 0 - && !aBaseMetaTileEntity.getOpacityAtSide(topFacing)) { + && !aBaseMetaTileEntity.getOpacityAtSide(topFacing)) { - final double x = aBaseMetaTileEntity.getOffsetX(topFacing, 1) + 2D / 16D - + XSTR_INSTANCE.nextFloat() * 14D / 16D; + final double x = + aBaseMetaTileEntity.getOffsetX(topFacing, 1) + 2D / 16D + XSTR_INSTANCE.nextFloat() * 14D / 16D; final double y = aBaseMetaTileEntity.getOffsetY(topFacing, 1) + 1D / 32D; - final double z = aBaseMetaTileEntity.getOffsetZ(topFacing, 1) + 2D / 16D - + XSTR_INSTANCE.nextFloat() * 14D / 16D; + final double z = + aBaseMetaTileEntity.getOffsetZ(topFacing, 1) + 2D / 16D + XSTR_INSTANCE.nextFloat() * 14D / 16D; new ParticleEventBuilder() - .setMotion(0D, 0D, 0D) - .setPosition(x, y, z) - .setWorld(getBaseMetaTileEntity().getWorld()) - .setIdentifier(ParticleFX.SMOKE).run(); + .setMotion(0D, 0D, 0D) + .setPosition(x, y, z) + .setWorld(getBaseMetaTileEntity().getWorld()) + .setIdentifier(ParticleFX.SMOKE) + .run(); } } } @Override public ITexture[] getFront(byte aColor) { - return new ITexture[]{super.getFront(aColor)[0], TextureFactory.of( - TextureFactory.of(DIESEL_GENERATOR_FRONT), - TextureFactory.builder().addIcon(DIESEL_GENERATOR_FRONT_GLOW).glow().build()), - OVERLAYS_ENERGY_OUT[this.mTier]}; + return new ITexture[] { + super.getFront(aColor)[0], + TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_FRONT), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_FRONT_GLOW) + .glow() + .build()), + OVERLAYS_ENERGY_OUT[this.mTier] + }; } @Override public ITexture[] getBack(byte aColor) { - return new ITexture[]{super.getBack(aColor)[0], TextureFactory.of( - TextureFactory.of(DIESEL_GENERATOR_BACK), - TextureFactory.builder().addIcon(DIESEL_GENERATOR_BACK_GLOW).glow().build())}; + return new ITexture[] { + super.getBack(aColor)[0], + TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_BACK), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_BACK_GLOW) + .glow() + .build()) + }; } @Override public ITexture[] getBottom(byte aColor) { - return new ITexture[]{super.getBottom(aColor)[0], TextureFactory.of( - TextureFactory.of(DIESEL_GENERATOR_BOTTOM), - TextureFactory.builder().addIcon(DIESEL_GENERATOR_BOTTOM_GLOW).glow().build())}; + return new ITexture[] { + super.getBottom(aColor)[0], + TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_BOTTOM), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_BOTTOM_GLOW) + .glow() + .build()) + }; } @Override public ITexture[] getTop(byte aColor) { - return new ITexture[]{super.getTop(aColor)[0], TextureFactory.of( - TextureFactory.of(DIESEL_GENERATOR_TOP), - TextureFactory.builder().addIcon(DIESEL_GENERATOR_TOP_GLOW).glow().build())}; + return new ITexture[] { + super.getTop(aColor)[0], + TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_TOP), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_TOP_GLOW) + .glow() + .build()) + }; } @Override public ITexture[] getSides(byte aColor) { - return new ITexture[]{super.getSides(aColor)[0], TextureFactory.of( - TextureFactory.of(DIESEL_GENERATOR_SIDE), - TextureFactory.builder().addIcon(DIESEL_GENERATOR_SIDE_GLOW).glow().build())}; + return new ITexture[] { + super.getSides(aColor)[0], + TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_SIDE), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_SIDE_GLOW) + .glow() + .build()) + }; } @Override public ITexture[] getFrontActive(byte aColor) { - return new ITexture[]{super.getFrontActive(aColor)[0], TextureFactory.of( - TextureFactory.of(DIESEL_GENERATOR_FRONT_ACTIVE), - TextureFactory.builder().addIcon(DIESEL_GENERATOR_FRONT_ACTIVE_GLOW).glow().build()), - OVERLAYS_ENERGY_OUT[this.mTier]}; + return new ITexture[] { + super.getFrontActive(aColor)[0], + TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_FRONT_ACTIVE), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_FRONT_ACTIVE_GLOW) + .glow() + .build()), + OVERLAYS_ENERGY_OUT[this.mTier] + }; } @Override public ITexture[] getBackActive(byte aColor) { - return new ITexture[]{super.getBackActive(aColor)[0], TextureFactory.of( - TextureFactory.of(DIESEL_GENERATOR_BACK_ACTIVE), - TextureFactory.builder().addIcon(DIESEL_GENERATOR_BACK_ACTIVE_GLOW).glow().build())}; + return new ITexture[] { + super.getBackActive(aColor)[0], + TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_BACK_ACTIVE), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_BACK_ACTIVE_GLOW) + .glow() + .build()) + }; } @Override public ITexture[] getBottomActive(byte aColor) { - return new ITexture[]{super.getBottomActive(aColor)[0], TextureFactory.of( - TextureFactory.of(DIESEL_GENERATOR_BOTTOM_ACTIVE), - TextureFactory.builder().addIcon(DIESEL_GENERATOR_BOTTOM_ACTIVE_GLOW).glow().build())}; + return new ITexture[] { + super.getBottomActive(aColor)[0], + TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_BOTTOM_ACTIVE), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_BOTTOM_ACTIVE_GLOW) + .glow() + .build()) + }; } @Override public ITexture[] getTopActive(byte aColor) { - return new ITexture[]{super.getTopActive(aColor)[0], TextureFactory.of( - TextureFactory.of(DIESEL_GENERATOR_TOP_ACTIVE), - TextureFactory.builder().addIcon(DIESEL_GENERATOR_TOP_ACTIVE_GLOW).glow().build())}; + return new ITexture[] { + super.getTopActive(aColor)[0], + TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_TOP_ACTIVE), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_TOP_ACTIVE_GLOW) + .glow() + .build()) + }; } @Override public ITexture[] getSidesActive(byte aColor) { - return new ITexture[]{super.getSidesActive(aColor)[0], TextureFactory.of( - TextureFactory.of(DIESEL_GENERATOR_SIDE_ACTIVE), - TextureFactory.builder().addIcon(DIESEL_GENERATOR_SIDE_ACTIVE_GLOW).glow().build())}; + return new ITexture[] { + super.getSidesActive(aColor)[0], + TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_SIDE_ACTIVE), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_SIDE_ACTIVE_GLOW) + .glow() + .build()) + }; } @Override public int getPollution() { - return (int) (GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond * GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier[mTier]); + return (int) (GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond + * GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier[mTier]); } } diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java index a0f6aeee64..6a5ee85d99 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.generators; +import static gregtech.api.enums.Textures.BlockIcons.*; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; @@ -10,17 +12,18 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenera import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Recipe; -import static gregtech.api.enums.Textures.BlockIcons.*; - public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerator { - public int mEfficiency; public GT_MetaTileEntity_GasTurbine(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, new String[]{ - "Requires flammable Gasses", - "Causes " + (int) (GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond * GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier[aTier]) + " Pollution per second"}); + super(aID, aName, aNameRegional, aTier, new String[] { + "Requires flammable Gasses", + "Causes " + + (int) (GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond + * GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier[aTier]) + + " Pollution per second" + }); onConfigLoad(); } @@ -55,10 +58,10 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat } public void onConfigLoad() { - this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "GasTurbine.efficiency.tier." + this.mTier, (100 - this.mTier * 5)); + this.mEfficiency = GregTech_API.sMachineFile.get( + ConfigCategories.machineconfig, "GasTurbine.efficiency.tier." + this.mTier, (100 - this.mTier * 5)); } - @Override public int getEfficiency() { return this.mEfficiency; @@ -66,78 +69,139 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat @Override public ITexture[] getFront(byte aColor) { - return new ITexture[]{super.getFront(aColor)[0], TextureFactory.of( - TextureFactory.of(GAS_TURBINE_FRONT), - TextureFactory.builder().addIcon(GAS_TURBINE_FRONT_GLOW).glow().build()), - OVERLAYS_ENERGY_OUT[this.mTier]}; + return new ITexture[] { + super.getFront(aColor)[0], + TextureFactory.of( + TextureFactory.of(GAS_TURBINE_FRONT), + TextureFactory.builder() + .addIcon(GAS_TURBINE_FRONT_GLOW) + .glow() + .build()), + OVERLAYS_ENERGY_OUT[this.mTier] + }; } @Override public ITexture[] getBack(byte aColor) { - return new ITexture[]{super.getBack(aColor)[0], TextureFactory.of( - TextureFactory.of(GAS_TURBINE_BACK), - TextureFactory.builder().addIcon(GAS_TURBINE_BACK_GLOW).glow().build())}; + return new ITexture[] { + super.getBack(aColor)[0], + TextureFactory.of( + TextureFactory.of(GAS_TURBINE_BACK), + TextureFactory.builder() + .addIcon(GAS_TURBINE_BACK_GLOW) + .glow() + .build()) + }; } @Override public ITexture[] getBottom(byte aColor) { - return new ITexture[]{super.getBottom(aColor)[0], TextureFactory.of( - TextureFactory.of(GAS_TURBINE_BOTTOM), - TextureFactory.builder().addIcon(GAS_TURBINE_BOTTOM_GLOW).glow().build())}; + return new ITexture[] { + super.getBottom(aColor)[0], + TextureFactory.of( + TextureFactory.of(GAS_TURBINE_BOTTOM), + TextureFactory.builder() + .addIcon(GAS_TURBINE_BOTTOM_GLOW) + .glow() + .build()) + }; } @Override public ITexture[] getTop(byte aColor) { - return new ITexture[]{super.getTop(aColor)[0], TextureFactory.of( - TextureFactory.of(GAS_TURBINE_TOP), - TextureFactory.builder().addIcon(GAS_TURBINE_TOP_GLOW).glow().build())}; + return new ITexture[] { + super.getTop(aColor)[0], + TextureFactory.of( + TextureFactory.of(GAS_TURBINE_TOP), + TextureFactory.builder() + .addIcon(GAS_TURBINE_TOP_GLOW) + .glow() + .build()) + }; } @Override public ITexture[] getSides(byte aColor) { - return new ITexture[]{super.getSides(aColor)[0], TextureFactory.of( - TextureFactory.of(GAS_TURBINE_SIDE), - TextureFactory.builder().addIcon(GAS_TURBINE_SIDE_GLOW).glow().build())}; + return new ITexture[] { + super.getSides(aColor)[0], + TextureFactory.of( + TextureFactory.of(GAS_TURBINE_SIDE), + TextureFactory.builder() + .addIcon(GAS_TURBINE_SIDE_GLOW) + .glow() + .build()) + }; } @Override public ITexture[] getFrontActive(byte aColor) { - return new ITexture[]{super.getFrontActive(aColor)[0], TextureFactory.of( - TextureFactory.of(GAS_TURBINE_FRONT_ACTIVE), - TextureFactory.builder().addIcon(GAS_TURBINE_FRONT_ACTIVE_GLOW).glow().build()), - OVERLAYS_ENERGY_OUT[this.mTier]}; + return new ITexture[] { + super.getFrontActive(aColor)[0], + TextureFactory.of( + TextureFactory.of(GAS_TURBINE_FRONT_ACTIVE), + TextureFactory.builder() + .addIcon(GAS_TURBINE_FRONT_ACTIVE_GLOW) + .glow() + .build()), + OVERLAYS_ENERGY_OUT[this.mTier] + }; } @Override public ITexture[] getBackActive(byte aColor) { - return new ITexture[]{super.getBackActive(aColor)[0], TextureFactory.of( - TextureFactory.of(GAS_TURBINE_BACK_ACTIVE), - TextureFactory.builder().addIcon(GAS_TURBINE_BACK_ACTIVE_GLOW).glow().build())}; + return new ITexture[] { + super.getBackActive(aColor)[0], + TextureFactory.of( + TextureFactory.of(GAS_TURBINE_BACK_ACTIVE), + TextureFactory.builder() + .addIcon(GAS_TURBINE_BACK_ACTIVE_GLOW) + .glow() + .build()) + }; } @Override public ITexture[] getBottomActive(byte aColor) { - return new ITexture[]{super.getBottomActive(aColor)[0], TextureFactory.of( - TextureFactory.of(GAS_TURBINE_BOTTOM_ACTIVE), - TextureFactory.builder().addIcon(GAS_TURBINE_BOTTOM_ACTIVE_GLOW).glow().build())}; + return new ITexture[] { + super.getBottomActive(aColor)[0], + TextureFactory.of( + TextureFactory.of(GAS_TURBINE_BOTTOM_ACTIVE), + TextureFactory.builder() + .addIcon(GAS_TURBINE_BOTTOM_ACTIVE_GLOW) + .glow() + .build()) + }; } @Override public ITexture[] getTopActive(byte aColor) { - return new ITexture[]{super.getTopActive(aColor)[0], TextureFactory.of( - TextureFactory.of(GAS_TURBINE_TOP_ACTIVE), - TextureFactory.builder().addIcon(GAS_TURBINE_TOP_ACTIVE_GLOW).glow().build())}; + return new ITexture[] { + super.getTopActive(aColor)[0], + TextureFactory.of( + TextureFactory.of(GAS_TURBINE_TOP_ACTIVE), + TextureFactory.builder() + .addIcon(GAS_TURBINE_TOP_ACTIVE_GLOW) + .glow() + .build()) + }; } @Override public ITexture[] getSidesActive(byte aColor) { - return new ITexture[]{super.getSidesActive(aColor)[0], TextureFactory.of( - TextureFactory.of(GAS_TURBINE_SIDE_ACTIVE), - TextureFactory.builder().addIcon(GAS_TURBINE_SIDE_ACTIVE_GLOW).glow().build())}; + return new ITexture[] { + super.getSidesActive(aColor)[0], + TextureFactory.of( + TextureFactory.of(GAS_TURBINE_SIDE_ACTIVE), + TextureFactory.builder() + .addIcon(GAS_TURBINE_SIDE_ACTIVE_GLOW) + .glow() + .build()) + }; } @Override public int getPollution() { - return (int) (GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond * GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier[mTier]); + return (int) (GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond + * GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier[mTier]); } } diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java index 88d49075e5..dbb8931848 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.generators; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.Textures.BlockIcons; import gregtech.api.interfaces.ITexture; @@ -14,36 +16,46 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; - public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMachineBlock { public GT_MetaTileEntity_LightningRod(int aID, String aName, String aNameRegional, int aTier) { super(aID, aName, aNameRegional, aTier, 0, "Generates EU From Lightning Bolts"); } - public GT_MetaTileEntity_LightningRod(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_LightningRod( + String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } - - public GT_MetaTileEntity_LightningRod(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + + public GT_MetaTileEntity_LightningRod( + String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { if (aSide != ForgeDirection.UP.ordinal()) { - return new ITexture[]{ - BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], - BlockIcons.OVERLAYS_ENERGY_OUT_POWER[mTier]}; + return new ITexture[] { + BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], BlockIcons.OVERLAYS_ENERGY_OUT_POWER[mTier] + }; } - if (!aActive) return new ITexture[]{ + if (!aActive) + return new ITexture[] { BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(BlockIcons.MACHINE_CASING_FUSION_GLASS) - }; - return new ITexture[]{ - BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], - TextureFactory.of(BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW), - TextureFactory.builder().addIcon(BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build() + }; + return new ITexture[] { + BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], + TextureFactory.of(BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW), + TextureFactory.builder() + .addIcon(BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW) + .glow() + .build() }; } @@ -54,7 +66,8 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_LightningRod(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures); + return new GT_MetaTileEntity_LightningRod( + this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures); } @Override @@ -76,7 +89,11 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach int aZ = aBaseMetaTileEntity.getZCoord(); for (int i = aBaseMetaTileEntity.getYCoord() + 1; i < aWorld.getHeight() - 1; i++) { - if (isRodValid && aBaseMetaTileEntity.getBlock(aX, i, aZ).getUnlocalizedName().equals("blockFenceIron")) { + if (isRodValid + && aBaseMetaTileEntity + .getBlock(aX, i, aZ) + .getUnlocalizedName() + .equals("blockFenceIron")) { aRodValue++; } else { isRodValid = false; @@ -88,7 +105,8 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach } if (!aWorld.isThundering() && ((aY + aRodValue) < 128)) aRodValue = 0; if (XSTR_INSTANCE.nextInt(4 * aWorld.getHeight()) < (aRodValue * (aY + aRodValue))) { - aBaseMetaTileEntity.increaseStoredEnergyUnits(maxEUStore() - aBaseMetaTileEntity.getStoredEU(), false); + aBaseMetaTileEntity.increaseStoredEnergyUnits( + maxEUStore() - aBaseMetaTileEntity.getStoredEU(), false); aWorld.addWeatherEffect(new EntityLightningBolt(aWorld, aX, aY + aRodValue, aZ)); } } @@ -112,7 +130,7 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach @Override public boolean isFacingValid(byte aFacing) { - return aFacing==1; + return aFacing == 1; } @Override @@ -146,10 +164,8 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach } @Override - public void saveNBTData(NBTTagCompound aNBT) { - } + public void saveNBTData(NBTTagCompound aNBT) {} @Override - public void loadNBTData(NBTTagCompound aNBT) { - } + public void loadNBTData(NBTTagCompound aNBT) {} } diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java index aceab00a02..2e1bfd655f 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java @@ -1,14 +1,5 @@ package gregtech.common.tileentities.generators; -import gregtech.api.GregTech_API; -import gregtech.api.enums.ConfigCategories; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator; -import gregtech.api.render.TextureFactory; -import gregtech.api.util.GT_Recipe; - import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC; import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE; import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE_GLOW; @@ -19,6 +10,15 @@ import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT_ import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC_GLOW; import static gregtech.api.enums.Textures.BlockIcons.OVERLAYS_ENERGY_OUT; +import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.GT_Recipe; + public class GT_MetaTileEntity_MagicEnergyConverter extends GT_MetaTileEntity_BasicGenerator { public int mEfficiency; @@ -27,12 +27,14 @@ public class GT_MetaTileEntity_MagicEnergyConverter extends GT_MetaTileEntity_Ba onConfigLoad(); } - public GT_MetaTileEntity_MagicEnergyConverter(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_MagicEnergyConverter( + String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); onConfigLoad(); } - public GT_MetaTileEntity_MagicEnergyConverter(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_MagicEnergyConverter( + String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); onConfigLoad(); } @@ -44,7 +46,8 @@ public class GT_MetaTileEntity_MagicEnergyConverter extends GT_MetaTileEntity_Ba @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_MagicEnergyConverter(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); + return new GT_MetaTileEntity_MagicEnergyConverter( + this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } @Override @@ -58,10 +61,12 @@ public class GT_MetaTileEntity_MagicEnergyConverter extends GT_MetaTileEntity_Ba } public void onConfigLoad() { - this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MagicEnergyConverter.efficiency.tier." + this.mTier, 100 - this.mTier * 5); + this.mEfficiency = GregTech_API.sMachineFile.get( + ConfigCategories.machineconfig, + "MagicEnergyConverter.efficiency.tier." + this.mTier, + 100 - this.mTier * 5); } - @Override public int getEfficiency() { return this.mEfficiency; @@ -69,88 +74,116 @@ public class GT_MetaTileEntity_MagicEnergyConverter extends GT_MetaTileEntity_Ba @Override public ITexture[] getFront(byte aColor) { - return new ITexture[]{ - super.getFront(aColor)[0], - TextureFactory.of(MACHINE_CASING_MAGIC), - TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build(), - OVERLAYS_ENERGY_OUT[mTier]}; + return new ITexture[] { + super.getFront(aColor)[0], + TextureFactory.of(MACHINE_CASING_MAGIC), + TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build(), + OVERLAYS_ENERGY_OUT[mTier] + }; } @Override public ITexture[] getBack(byte aColor) { - return new ITexture[]{ - super.getBack(aColor)[0], - TextureFactory.of(MACHINE_CASING_MAGIC_FRONT), - TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_FRONT_GLOW).glow().build()}; + return new ITexture[] { + super.getBack(aColor)[0], + TextureFactory.of(MACHINE_CASING_MAGIC_FRONT), + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_FRONT_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottom(byte aColor) { - return new ITexture[]{ - super.getBottom(aColor)[0], - TextureFactory.of(MACHINE_CASING_MAGIC), - TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build()}; + return new ITexture[] { + super.getBottom(aColor)[0], + TextureFactory.of(MACHINE_CASING_MAGIC), + TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build() + }; } @Override public ITexture[] getTop(byte aColor) { - return new ITexture[]{ - super.getTop(aColor)[0], - TextureFactory.of(MACHINE_CASING_MAGIC), - TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build()}; + return new ITexture[] { + super.getTop(aColor)[0], + TextureFactory.of(MACHINE_CASING_MAGIC), + TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build() + }; } @Override public ITexture[] getSides(byte aColor) { - return new ITexture[]{ - super.getSides(aColor)[0], - TextureFactory.of(MACHINE_CASING_MAGIC), - TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build()}; + return new ITexture[] { + super.getSides(aColor)[0], + TextureFactory.of(MACHINE_CASING_MAGIC), + TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build() + }; } @Override public ITexture[] getFrontActive(byte aColor) { - return new ITexture[]{ - super.getFrontActive(aColor)[0], - TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE), - TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build(), - OVERLAYS_ENERGY_OUT[mTier]}; + return new ITexture[] { + super.getFrontActive(aColor)[0], + TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE), + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW) + .glow() + .build(), + OVERLAYS_ENERGY_OUT[mTier] + }; } @Override public ITexture[] getBackActive(byte aColor) { - return new ITexture[]{ - super.getBackActive(aColor)[0], - TextureFactory.of(MACHINE_CASING_MAGIC_FRONT_ACTIVE), - TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_FRONT_ACTIVE_GLOW).glow().build()}; + return new ITexture[] { + super.getBackActive(aColor)[0], + TextureFactory.of(MACHINE_CASING_MAGIC_FRONT_ACTIVE), + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_FRONT_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomActive(byte aColor) { - return new ITexture[]{ - super.getBottomActive(aColor)[0], - TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE), - TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build()}; + return new ITexture[] { + super.getBottomActive(aColor)[0], + TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE), + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopActive(byte aColor) { - return new ITexture[]{ - super.getTopActive(aColor)[0], - TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE), - TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build()}; + return new ITexture[] { + super.getTopActive(aColor)[0], + TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE), + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getSidesActive(byte aColor) { - return new ITexture[]{ - super.getSidesActive(aColor)[0], - TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE), - TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build()}; + return new ITexture[] { + super.getSidesActive(aColor)[0], + TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE), + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW) + .glow() + .build() + }; } - @Override - public int getPollution() { - return 0; - } + @Override + public int getPollution() { + return 0; + } } diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java index 4158a22b47..210483cbe8 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java @@ -1,5 +1,17 @@ package gregtech.common.tileentities.generators; +import static gregtech.api.enums.ConfigCategories.machineconfig; +import static gregtech.api.enums.GT_Values.MOD_ID_TC; +import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; +import static net.minecraft.util.EnumChatFormatting.GRAY; +import static net.minecraft.util.EnumChatFormatting.GREEN; +import static net.minecraft.util.EnumChatFormatting.LIGHT_PURPLE; +import static net.minecraft.util.EnumChatFormatting.RESET; +import static net.minecraft.util.EnumChatFormatting.UNDERLINE; +import static net.minecraft.util.EnumChatFormatting.YELLOW; + import com.google.common.base.Enums; import cpw.mods.fml.common.Loader; import cpw.mods.fml.relauncher.Side; @@ -18,6 +30,14 @@ import gregtech.api.util.GT_Log; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gregtech.api.util.WorldSpawnedEventBuilder.ParticleEventBuilder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; import net.minecraft.block.Block; import net.minecraft.block.BlockDragonEgg; import net.minecraft.enchantment.Enchantment; @@ -40,36 +60,18 @@ import thaumcraft.api.aspects.AspectSourceHelper; import thaumcraft.api.aspects.IAspectContainer; import thaumcraft.api.visnet.VisNetHandler; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.Set; -import java.util.UUID; -import java.util.concurrent.ConcurrentHashMap; - -import static gregtech.api.enums.ConfigCategories.machineconfig; -import static gregtech.api.enums.GT_Values.MOD_ID_TC; -import static gregtech.api.enums.GT_Values.V; -import static gregtech.api.enums.Textures.BlockIcons.*; -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; -import static net.minecraft.util.EnumChatFormatting.GRAY; -import static net.minecraft.util.EnumChatFormatting.GREEN; -import static net.minecraft.util.EnumChatFormatting.LIGHT_PURPLE; -import static net.minecraft.util.EnumChatFormatting.RESET; -import static net.minecraft.util.EnumChatFormatting.UNDERLINE; -import static net.minecraft.util.EnumChatFormatting.YELLOW; - interface MagicalEnergyBBListener { void onMagicalEnergyBBUpdate(); } -public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_BasicGenerator implements MagicalEnergyBBListener { +public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_BasicGenerator + implements MagicalEnergyBBListener { private static final boolean THAUMCRAFT_LOADED = Loader.isModLoaded(MOD_ID_TC); - private static final ConcurrentHashMap<UUID, GT_MetaTileEntity_MagicalEnergyAbsorber> sSubscribedCrystals = new ConcurrentHashMap<>(4); - private static final List<Aspect> sPrimalAspects = (THAUMCRAFT_LOADED) ? Aspect.getPrimalAspects() : new ArrayList<>(); + private static final ConcurrentHashMap<UUID, GT_MetaTileEntity_MagicalEnergyAbsorber> sSubscribedCrystals = + new ConcurrentHashMap<>(4); + private static final List<Aspect> sPrimalAspects = + (THAUMCRAFT_LOADED) ? Aspect.getPrimalAspects() : new ArrayList<>(); private static final Map<Aspect, Integer> sAspectsEnergy = new HashMap<>(); private static boolean sAllowMultipleEggs = false; private static GT_MetaTileEntity_MagicalEnergyAbsorber sActiveSiphon = null; @@ -90,7 +92,8 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B onConfigLoad(GregTech_API.sMachineFile); } - private GT_MetaTileEntity_MagicalEnergyAbsorber(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + private GT_MetaTileEntity_MagicalEnergyAbsorber( + String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); onConfigLoad(GregTech_API.sMachineFile); } @@ -110,10 +113,12 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B sEnergyPerEssentia = aConfig.get(machineconfig, "MagicEnergyAbsorber.EnergyPerEssentia", 320); for (Aspect tAspect : Aspect.aspects.values()) { //noinspection UnstableApiUsage - sAspectsEnergy.put(tAspect, - Enums.getIfPresent(TC_Aspects.class, - tAspect.getTag().toUpperCase(Locale.ENGLISH)).or(TC_Aspects.AER).mValue - * sEnergyPerEssentia); + sAspectsEnergy.put( + tAspect, + Enums.getIfPresent(TC_Aspects.class, tAspect.getTag().toUpperCase(Locale.ENGLISH)) + .or(TC_Aspects.AER) + .mValue + * sEnergyPerEssentia); } } } @@ -126,7 +131,8 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B public void onConfigLoad(GT_Config aConfig) { sharedConfigLoad(aConfig); mEfficiency = aConfig.get(machineconfig, "MagicEnergyAbsorber.efficiency.tier." + mTier, 100 - mTier * 10); - mMaxVisPerDrain = (int) Math.round(Math.sqrt((double) (V[mTier] * 10000) / (sEnergyFromVis * (getEfficiency() != 0 ? getEfficiency() : 100)))); + mMaxVisPerDrain = (int) Math.round(Math.sqrt( + (double) (V[mTier] * 10000) / (sEnergyFromVis * (getEfficiency() != 0 ? getEfficiency() : 100)))); if (Math.pow(mMaxVisPerDrain, 2) * sEnergyFromVis * (getEfficiency() != 0 ? getEfficiency() : 100) < V[mTier]) { mMaxVisPerDrain += 1; } @@ -136,7 +142,14 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aPlayer.isSneaking()) mMagicalEnergyBB.decreaseTier(); else mMagicalEnergyBB.increaseTier(); - GT_Utility.sendChatToPlayer(aPlayer, String.format(GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_MagicalEnergyAbsorber_Screwdriver", "Absorption range: %s blocks"), mMagicalEnergyBB.getRange(), true)); + GT_Utility.sendChatToPlayer( + aPlayer, + String.format( + GT_LanguageManager.addStringLocalization( + "Interaction_DESCRIPTION_MagicalEnergyAbsorber_Screwdriver", + "Absorption range: %s blocks"), + mMagicalEnergyBB.getRange(), + true)); mMagicalEnergyBB.update(); } @@ -188,22 +201,27 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B final String LI = "-%%%"; final String EU_PER = "%%%EU per "; List<String> description = new ArrayList<>(); - description.add(UNDERLINE + "Feasts on " + LIGHT_PURPLE + UNDERLINE + "magic" + GRAY + UNDERLINE + " close to it:"); - description.add(LI + (sAllowMultipleEggs ? "A " : "An " + YELLOW + UNDERLINE + "EXCLUSIVE" + RESET) + GRAY + " " + LIGHT_PURPLE + "Dragon Egg" + GRAY + " atop"); + description.add( + UNDERLINE + "Feasts on " + LIGHT_PURPLE + UNDERLINE + "magic" + GRAY + UNDERLINE + " close to it:"); + description.add(LI + (sAllowMultipleEggs ? "A " : "An " + YELLOW + UNDERLINE + "EXCLUSIVE" + RESET) + GRAY + " " + + LIGHT_PURPLE + "Dragon Egg" + GRAY + " atop"); if (sEnergyPerEndercrystal > 0) { description.add(LI + sEnergyPerEndercrystal + EU_PER + LIGHT_PURPLE + "Ender Crystal" + GRAY + " in range"); } if (THAUMCRAFT_LOADED) { description.add(LI + mMaxVisPerDrain + "%%%CV/t from an " + LIGHT_PURPLE + "Energised Node" + GRAY); - description.add(LI + (sEnergyPerEssentia * getEfficiency()) / 100 + EU_PER + LIGHT_PURPLE + "Essentia" + GRAY + " Aspect-Value from containers in range"); + description.add(LI + (sEnergyPerEssentia * getEfficiency()) / 100 + EU_PER + LIGHT_PURPLE + "Essentia" + + GRAY + " Aspect-Value from containers in range"); } description.add(" "); description.add(UNDERLINE + "Lookup range (Use Screwdriver to change):"); description.add("Default:%%%" + GREEN + mMagicalEnergyBB.getDefaultRange()); description.add("Max:%%%" + GREEN + mMagicalEnergyBB.getMaxRange()); description.add(" "); - description.add(UNDERLINE + "Fuels on " + LIGHT_PURPLE + UNDERLINE + "enchantments" + GRAY + UNDERLINE + " input:"); - description.add("- Item:%%%" + (10000 * getEfficiency()) / 100 + EU_PER + LIGHT_PURPLE + "enchant" + GRAY + " weight × level / max"); + description.add( + UNDERLINE + "Fuels on " + LIGHT_PURPLE + UNDERLINE + "enchantments" + GRAY + UNDERLINE + " input:"); + description.add("- Item:%%%" + (10000 * getEfficiency()) / 100 + EU_PER + LIGHT_PURPLE + "enchant" + GRAY + + " weight × level / max"); description.add("- Book:%%%" + 10000 + EU_PER + LIGHT_PURPLE + "enchant" + GRAY + " weight × level / max"); description.add(" "); description.add("Efficiency:%%%" + GREEN + getEfficiency() + "%"); @@ -212,84 +230,108 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B @Override public ITexture[] getFront(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getFront(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC), TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build(), - OVERLAYS_ENERGY_OUT[mTier]}; + OVERLAYS_ENERGY_OUT[mTier] + }; } @Override public ITexture[] getBack(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getBack(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_FRONT), - TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_FRONT_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_FRONT_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottom(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getBottom(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC), - TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build()}; + TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build() + }; } @Override public ITexture[] getTop(byte aColor) { - return new ITexture[]{ - super.getTop(aColor)[0], - TextureFactory.of(MACHINE_CASING_DRAGONEGG)}; + return new ITexture[] {super.getTop(aColor)[0], TextureFactory.of(MACHINE_CASING_DRAGONEGG)}; } @Override public ITexture[] getSides(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getSides(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC), - TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build()}; + TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build() + }; } @Override public ITexture[] getFrontActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getFrontActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE), - TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build(), - OVERLAYS_ENERGY_OUT[mTier]}; + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW) + .glow() + .build(), + OVERLAYS_ENERGY_OUT[mTier] + }; } @Override public ITexture[] getBackActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getBackActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_FRONT_ACTIVE), - TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_FRONT_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_FRONT_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getBottomActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE), - TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getTopActive(aColor)[0], TextureFactory.of(MACHINE_CASING_DRAGONEGG), - TextureFactory.builder().addIcon(MACHINE_CASING_DRAGONEGG_GLOW).glow().build() + TextureFactory.builder() + .addIcon(MACHINE_CASING_DRAGONEGG_GLOW) + .glow() + .build() }; } @Override public ITexture[] getSidesActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getSidesActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE), - TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW) + .glow() + .build() + }; } @Override @@ -331,7 +373,8 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B mNextGenerateTickRate = 20; } aBaseMetaTileEntity.increaseStoredEnergyUnits(tGeneratedEU, true); - aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.getUniversalEnergyStored() >= maxEUOutput() + getMinimumStoredEU()); + aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() + && aBaseMetaTileEntity.getUniversalEnergyStored() >= maxEUOutput() + getMinimumStoredEU()); } } @@ -355,8 +398,8 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B final double oZ = aBaseMetaTileEntity.getZCoord() + 8D / 16D; final ParticleEventBuilder particleEventBuilder = new ParticleEventBuilder() - .setWorld(getBaseMetaTileEntity().getWorld()) - .setIdentifier(ParticleFX.PORTAL); + .setWorld(getBaseMetaTileEntity().getWorld()) + .setIdentifier(ParticleFX.PORTAL); for (int i = 0; i < 9; i++) { final double dX = (XSTR_INSTANCE.nextFloat() - 0.5D) / 2D; @@ -372,7 +415,10 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B final double mY = -(dXZ * dY) / 4D; final double mZ = dZ * 4D; - particleEventBuilder.setMotion(mX, mY, mZ).setPosition(x, y, z).run(); + particleEventBuilder + .setMotion(mX, mY, mZ) + .setPosition(x, y, z) + .run(); } } } @@ -452,8 +498,9 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B } // Only consume input when it can store EU and push output - if ((getBaseMetaTileEntity().getStoredEU() + tEU) < getBaseMetaTileEntity().getEUCapacity() - && getBaseMetaTileEntity().addStackToSlot(getOutputSlot(), tOutputStack)) { + if ((getBaseMetaTileEntity().getStoredEU() + tEU) + < getBaseMetaTileEntity().getEUCapacity() + && getBaseMetaTileEntity().addStackToSlot(getOutputSlot(), tOutputStack)) { decrStackSize(getInputSlot(), 1); } else { tEU = 0; @@ -470,11 +517,11 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B if (!hasEgg()) return 0; if (!sAllowMultipleEggs) { if (sActiveSiphon != null - && sActiveSiphon != this - && sActiveSiphon.getBaseMetaTileEntity() != null - && !sActiveSiphon.getBaseMetaTileEntity().isInvalidTileEntity() - && sActiveSiphon.isChunkLoaded() - && sActiveSiphon.hasEgg()) { + && sActiveSiphon != this + && sActiveSiphon.getBaseMetaTileEntity() != null + && !sActiveSiphon.getBaseMetaTileEntity().isInvalidTileEntity() + && sActiveSiphon.isChunkLoaded() + && sActiveSiphon.hasEgg()) { getBaseMetaTileEntity().doExplosion(Integer.MAX_VALUE); } else { setActiveSiphon(this); @@ -528,7 +575,8 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B long tEU = 0; - long tEUtoGen = getBaseMetaTileEntity().getEUCapacity() - getBaseMetaTileEntity().getUniversalEnergyStored(); + long tEUtoGen = getBaseMetaTileEntity().getEUCapacity() + - getBaseMetaTileEntity().getUniversalEnergyStored(); List<Aspect> mAvailableEssentiaAspects = mMagicalEnergyBB.getAvailableAspects(); // try to drain 1 of whatever aspect available in containers within RANGE @@ -536,7 +584,11 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B Aspect aspect = mAvailableEssentiaAspects.get(i); long tAspectEU = ((long) sAspectsEnergy.get(aspect) * getEfficiency()) / 100; if (tAspectEU <= tEUtoGen - && AspectSourceHelper.drainEssentia((TileEntity) getBaseMetaTileEntity(), aspect, ForgeDirection.UNKNOWN, mMagicalEnergyBB.getRange())) { + && AspectSourceHelper.drainEssentia( + (TileEntity) getBaseMetaTileEntity(), + aspect, + ForgeDirection.UNKNOWN, + mMagicalEnergyBB.getRange())) { tEUtoGen -= tAspectEU; tEU += tAspectEU; } @@ -657,15 +709,14 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B double tX = tBaseMetaTileEntity.getXCoord(); double tY = tBaseMetaTileEntity.getYCoord(); double tZ = tBaseMetaTileEntity.getZCoord(); - return AxisAlignedBB.getBoundingBox(tX - tRange, tY - tRange, tZ - tRange, - tX + tRange, tY + tRange, tZ + tRange); + return AxisAlignedBB.getBoundingBox( + tX - tRange, tY - tRange, tZ - tRange, tX + tRange, tY + tRange, tZ + tRange); } private void scanLivingCrystals() { World tWorld = mAbsorber.getBaseMetaTileEntity().getWorld(); mLivingCrystalIDs.clear(); - for (Object o : tWorld.getEntitiesWithinAABB(EntityEnderCrystal.class, - getAxisAlignedBB())) { + for (Object o : tWorld.getEntitiesWithinAABB(EntityEnderCrystal.class, getAxisAlignedBB())) { if (((EntityEnderCrystal) o).isEntityAlive()) { mLivingCrystalIDs.add(((EntityEnderCrystal) o).getPersistentID()); } @@ -678,10 +729,10 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B if (tBaseMetaTileEntity.isInvalidTileEntity()) return; int tRange = getRange(); int tY = tBaseMetaTileEntity.getYCoord(); - int tMaxY = tBaseMetaTileEntity.getWorld().getHeight()-1; + int tMaxY = tBaseMetaTileEntity.getWorld().getHeight() - 1; // Make sure relative Y range stays between 0 and world max Y int rYMin = (tY - tRange >= 0) ? -tRange : -(tY); - int rYMax = (((tY + tRange) <= tMaxY)? tRange : tMaxY - tY); + int rYMax = (((tY + tRange) <= tMaxY) ? tRange : tMaxY - tY); mAvailableAspects.clear(); for (int rX = -tRange; rX <= tRange; rX++) { for (int rZ = -tRange; rZ <= tRange; rZ++) { diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java index 0a99a4af05..6ca6da874f 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.generators; +import static gregtech.api.enums.Textures.BlockIcons.*; + import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; import gregtech.api.interfaces.ITexture; @@ -9,13 +11,12 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenera import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Recipe; -import static gregtech.api.enums.Textures.BlockIcons.*; - public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGenerator { private int mEfficiency; - public GT_MetaTileEntity_NaquadahReactor(int aID, String aName, String[] aDescription, String aNameRegional, int aTier) { + public GT_MetaTileEntity_NaquadahReactor( + int aID, String aName, String[] aDescription, String aNameRegional, int aTier) { super(aID, aName, aNameRegional, aTier, aDescription); if (aTier > 8 || aTier < 4) { new Exception("Tier without Recipe Map!").printStackTrace(); @@ -33,7 +34,9 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe @Override public boolean isOutputFacing(byte aSide) { - return (aSide > 1) && (aSide != getBaseMetaTileEntity().getFrontFacing()) && (aSide != getBaseMetaTileEntity().getBackFacing()); + return (aSide > 1) + && (aSide != getBaseMetaTileEntity().getFrontFacing()) + && (aSide != getBaseMetaTileEntity().getBackFacing()); } @Override @@ -69,7 +72,6 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe ret = null; break; } - } return ret; } @@ -89,82 +91,133 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe } public int onConfigLoad() { - return mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "SolidNaquadah.efficiency.tier." + mTier, getBaseEff()); + return mEfficiency = GregTech_API.sMachineFile.get( + ConfigCategories.machineconfig, "SolidNaquadah.efficiency.tier." + mTier, getBaseEff()); } @Override public ITexture[] getFront(byte aColor) { - return new ITexture[]{super.getFront(aColor)[0], TextureFactory.of( - TextureFactory.of(NAQUADAH_REACTOR_SOLID_FRONT), - TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_FRONT_GLOW).glow().build())}; + return new ITexture[] { + super.getFront(aColor)[0], + TextureFactory.of( + TextureFactory.of(NAQUADAH_REACTOR_SOLID_FRONT), + TextureFactory.builder() + .addIcon(NAQUADAH_REACTOR_SOLID_FRONT_GLOW) + .glow() + .build()) + }; } @Override public ITexture[] getBack(byte aColor) { - return new ITexture[]{super.getBack(aColor)[0], TextureFactory.of( - TextureFactory.of(NAQUADAH_REACTOR_SOLID_BACK), - TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_BACK_GLOW).glow().build())}; + return new ITexture[] { + super.getBack(aColor)[0], + TextureFactory.of( + TextureFactory.of(NAQUADAH_REACTOR_SOLID_BACK), + TextureFactory.builder() + .addIcon(NAQUADAH_REACTOR_SOLID_BACK_GLOW) + .glow() + .build()) + }; } @Override public ITexture[] getBottom(byte aColor) { - return new ITexture[]{super.getBottom(aColor)[0], TextureFactory.of( - TextureFactory.of(NAQUADAH_REACTOR_SOLID_BOTTOM), - TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_BOTTOM_GLOW).glow().build())}; + return new ITexture[] { + super.getBottom(aColor)[0], + TextureFactory.of( + TextureFactory.of(NAQUADAH_REACTOR_SOLID_BOTTOM), + TextureFactory.builder() + .addIcon(NAQUADAH_REACTOR_SOLID_BOTTOM_GLOW) + .glow() + .build()) + }; } @Override public ITexture[] getTop(byte aColor) { - return new ITexture[]{super.getTop(aColor)[0], TextureFactory.of( - TextureFactory.of(NAQUADAH_REACTOR_SOLID_TOP), - TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_TOP_GLOW).glow().build())}; + return new ITexture[] { + super.getTop(aColor)[0], + TextureFactory.of( + TextureFactory.of(NAQUADAH_REACTOR_SOLID_TOP), + TextureFactory.builder() + .addIcon(NAQUADAH_REACTOR_SOLID_TOP_GLOW) + .glow() + .build()) + }; } @Override public ITexture[] getSides(byte aColor) { - return new ITexture[]{super.getSides(aColor)[0], TextureFactory.of( - TextureFactory.of(NAQUADAH_REACTOR_SOLID_SIDE), - TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_SIDE_GLOW).glow().build())}; + return new ITexture[] { + super.getSides(aColor)[0], + TextureFactory.of( + TextureFactory.of(NAQUADAH_REACTOR_SOLID_SIDE), + TextureFactory.builder() + .addIcon(NAQUADAH_REACTOR_SOLID_SIDE_GLOW) + .glow() + .build()) + }; } @Override public ITexture[] getFrontActive(byte aColor) { - return new ITexture[]{ - super.getFrontActive(aColor)[0], - TextureFactory.of(NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE), - TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE_GLOW).glow().build()}; + return new ITexture[] { + super.getFrontActive(aColor)[0], + TextureFactory.of(NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE), + TextureFactory.builder() + .addIcon(NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBackActive(byte aColor) { - return new ITexture[]{ - super.getBackActive(aColor)[0], - TextureFactory.of(NAQUADAH_REACTOR_SOLID_BACK_ACTIVE), - TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_BACK_ACTIVE_GLOW).glow().build()}; + return new ITexture[] { + super.getBackActive(aColor)[0], + TextureFactory.of(NAQUADAH_REACTOR_SOLID_BACK_ACTIVE), + TextureFactory.builder() + .addIcon(NAQUADAH_REACTOR_SOLID_BACK_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomActive(byte aColor) { - return new ITexture[]{ - super.getBottomActive(aColor)[0], - TextureFactory.of(NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE), - TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE_GLOW).glow().build()}; + return new ITexture[] { + super.getBottomActive(aColor)[0], + TextureFactory.of(NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE), + TextureFactory.builder() + .addIcon(NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopActive(byte aColor) { - return new ITexture[]{ - super.getTopActive(aColor)[0], - TextureFactory.of(NAQUADAH_REACTOR_SOLID_TOP_ACTIVE), - TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_TOP_ACTIVE_GLOW).glow().build()}; + return new ITexture[] { + super.getTopActive(aColor)[0], + TextureFactory.of(NAQUADAH_REACTOR_SOLID_TOP_ACTIVE), + TextureFactory.builder() + .addIcon(NAQUADAH_REACTOR_SOLID_TOP_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getSidesActive(byte aColor) { - return new ITexture[]{ - super.getSidesActive(aColor)[0], - TextureFactory.of(NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE), - TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE_GLOW).glow().build()}; + return new ITexture[] { + super.getSidesActive(aColor)[0], + TextureFactory.of(NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE), + TextureFactory.builder() + .addIcon(NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE_GLOW) + .glow() + .build() + }; } @Override diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java index 4ab048a0f7..4e0b428fa4 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java @@ -1,5 +1,10 @@ package gregtech.common.tileentities.generators; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAYS_ENERGY_OUT; + import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; import gregtech.api.interfaces.ITexture; @@ -9,11 +14,6 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenera import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Recipe; -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS; -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW; -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAYS_ENERGY_OUT; - public class GT_MetaTileEntity_PlasmaGenerator extends GT_MetaTileEntity_BasicGenerator { public int mEfficiency; @@ -35,71 +35,90 @@ public class GT_MetaTileEntity_PlasmaGenerator extends GT_MetaTileEntity_BasicGe @Override public ITexture[] getFront(byte aColor) { - return new ITexture[]{ - super.getFront(aColor)[0], - TextureFactory.of(MACHINE_CASING_FUSION_GLASS), - OVERLAYS_ENERGY_OUT[mTier]}; + return new ITexture[] { + super.getFront(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS), OVERLAYS_ENERGY_OUT[mTier] + }; } @Override public ITexture[] getBack(byte aColor) { - return new ITexture[]{super.getBack(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS)}; + return new ITexture[] {super.getBack(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS)}; } @Override public ITexture[] getBottom(byte aColor) { - return new ITexture[]{super.getBottom(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS)}; + return new ITexture[] {super.getBottom(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS)}; } @Override public ITexture[] getTop(byte aColor) { - return new ITexture[]{super.getTop(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS)}; + return new ITexture[] {super.getTop(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS)}; } @Override public ITexture[] getSides(byte aColor) { - return new ITexture[]{super.getSides(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS)}; + return new ITexture[] {super.getSides(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS)}; } @Override public ITexture[] getFrontActive(byte aColor) { - return new ITexture[]{ - super.getFrontActive(aColor)[0], - TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW), - TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build(), - OVERLAYS_ENERGY_OUT[mTier]}; + return new ITexture[] { + super.getFrontActive(aColor)[0], + TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW), + TextureFactory.builder() + .addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW) + .glow() + .build(), + OVERLAYS_ENERGY_OUT[mTier] + }; } @Override public ITexture[] getBackActive(byte aColor) { - return new ITexture[]{ - super.getBackActive(aColor)[0], - TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW), - TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build()}; + return new ITexture[] { + super.getBackActive(aColor)[0], + TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW), + TextureFactory.builder() + .addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomActive(byte aColor) { - return new ITexture[]{ - super.getBottomActive(aColor)[0], - TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW), - TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build()}; + return new ITexture[] { + super.getBottomActive(aColor)[0], + TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW), + TextureFactory.builder() + .addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopActive(byte aColor) { - return new ITexture[]{ - super.getTopActive(aColor)[0], - TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW), - TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build()}; + return new ITexture[] { + super.getTopActive(aColor)[0], + TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW), + TextureFactory.builder() + .addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getSidesActive(byte aColor) { - return new ITexture[]{ - super.getSidesActive(aColor)[0], - TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW), - TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build()}; + return new ITexture[] { + super.getSidesActive(aColor)[0], + TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW), + TextureFactory.builder() + .addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW) + .glow() + .build() + }; } @Override @@ -128,11 +147,14 @@ public class GT_MetaTileEntity_PlasmaGenerator extends GT_MetaTileEntity_BasicGe } public void onConfigLoad() { - this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "PlasmaGenerator.efficiency.tier." + this.mTier, Math.max(10, 10 + Math.min(90, this.mTier * 10))); + this.mEfficiency = GregTech_API.sMachineFile.get( + ConfigCategories.machineconfig, + "PlasmaGenerator.efficiency.tier." + this.mTier, + Math.max(10, 10 + Math.min(90, this.mTier * 10))); } @Override - public int getPollution() { - return 0; - } + public int getPollution() { + return 0; + } } diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java index d7b3f03fde..bec1b90ad1 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.generators; +import static gregtech.api.enums.Textures.BlockIcons.*; + import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; import gregtech.api.interfaces.ITexture; @@ -11,16 +13,13 @@ import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; import net.minecraftforge.fluids.FluidStack; -import static gregtech.api.enums.Textures.BlockIcons.*; - public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGenerator { public int mEfficiency; public GT_MetaTileEntity_SteamTurbine(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, new String[]{ - "Converts Steam into EU", - "Base rate: 2L of Steam -> 1 EU"}); + super(aID, aName, aNameRegional, aTier, new String[] {"Converts Steam into EU", "Base rate: 2L of Steam -> 1 EU" + }); onConfigLoad(); } @@ -54,7 +53,8 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener String[] desc = new String[mDescriptionArray.length + 2]; System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length); desc[mDescriptionArray.length] = "Fuel Efficiency: " + (600 / getEfficiency()) + "%"; - desc[mDescriptionArray.length + 1] = String.format("Consumes up to %sL of Steam per second", + desc[mDescriptionArray.length + 1] = String.format( + "Consumes up to %sL of Steam per second", (int) (4000 * (8 * Math.pow(4, mTier) + Math.pow(2, mTier)) / (600 / getEfficiency()))); return desc; } @@ -65,7 +65,8 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener } public void onConfigLoad() { - this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "SteamTurbine.efficiency.tier." + this.mTier, 6 + this.mTier); + this.mEfficiency = GregTech_API.sMachineFile.get( + ConfigCategories.machineconfig, "SteamTurbine.efficiency.tier." + this.mTier, 6 + this.mTier); } @Override @@ -86,74 +87,134 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener @Override public ITexture[] getFront(byte aColor) { - return new ITexture[]{super.getFront(aColor)[0], TextureFactory.of( - TextureFactory.of(STEAM_TURBINE_FRONT), - TextureFactory.builder().addIcon(STEAM_TURBINE_FRONT_GLOW).glow().build()), - OVERLAYS_ENERGY_OUT[this.mTier]}; + return new ITexture[] { + super.getFront(aColor)[0], + TextureFactory.of( + TextureFactory.of(STEAM_TURBINE_FRONT), + TextureFactory.builder() + .addIcon(STEAM_TURBINE_FRONT_GLOW) + .glow() + .build()), + OVERLAYS_ENERGY_OUT[this.mTier] + }; } @Override public ITexture[] getBack(byte aColor) { - return new ITexture[]{super.getBack(aColor)[0], TextureFactory.of( - TextureFactory.of(STEAM_TURBINE_BACK), - TextureFactory.builder().addIcon(STEAM_TURBINE_BACK_GLOW).glow().build())}; + return new ITexture[] { + super.getBack(aColor)[0], + TextureFactory.of( + TextureFactory.of(STEAM_TURBINE_BACK), + TextureFactory.builder() + .addIcon(STEAM_TURBINE_BACK_GLOW) + .glow() + .build()) + }; } @Override public ITexture[] getBottom(byte aColor) { - return new ITexture[]{super.getBottom(aColor)[0], TextureFactory.of( - TextureFactory.of(STEAM_TURBINE_BOTTOM), - TextureFactory.builder().addIcon(STEAM_TURBINE_BOTTOM_GLOW).glow().build())}; + return new ITexture[] { + super.getBottom(aColor)[0], + TextureFactory.of( + TextureFactory.of(STEAM_TURBINE_BOTTOM), + TextureFactory.builder() + .addIcon(STEAM_TURBINE_BOTTOM_GLOW) + .glow() + .build()) + }; } @Override public ITexture[] getTop(byte aColor) { - return new ITexture[]{super.getTop(aColor)[0], TextureFactory.of( - TextureFactory.of(STEAM_TURBINE_TOP), - TextureFactory.builder().addIcon(STEAM_TURBINE_TOP_GLOW).glow().build())}; + return new ITexture[] { + super.getTop(aColor)[0], + TextureFactory.of( + TextureFactory.of(STEAM_TURBINE_TOP), + TextureFactory.builder() + .addIcon(STEAM_TURBINE_TOP_GLOW) + .glow() + .build()) + }; } @Override public ITexture[] getSides(byte aColor) { - return new ITexture[]{super.getSides(aColor)[0], TextureFactory.of( - TextureFactory.of(STEAM_TURBINE_SIDE), - TextureFactory.builder().addIcon(STEAM_TURBINE_SIDE_GLOW).glow().build())}; + return new ITexture[] { + super.getSides(aColor)[0], + TextureFactory.of( + TextureFactory.of(STEAM_TURBINE_SIDE), + TextureFactory.builder() + .addIcon(STEAM_TURBINE_SIDE_GLOW) + .glow() + .build()) + }; } @Override public ITexture[] getFrontActive(byte aColor) { - return new ITexture[]{super.getFrontActive(aColor)[0], TextureFactory.of( - TextureFactory.of(STEAM_TURBINE_FRONT_ACTIVE), - TextureFactory.builder().addIcon(STEAM_TURBINE_FRONT_ACTIVE_GLOW).glow().build()), - OVERLAYS_ENERGY_OUT[this.mTier]}; + return new ITexture[] { + super.getFrontActive(aColor)[0], + TextureFactory.of( + TextureFactory.of(STEAM_TURBINE_FRONT_ACTIVE), + TextureFactory.builder() + .addIcon(STEAM_TURBINE_FRONT_ACTIVE_GLOW) + .glow() + .build()), + OVERLAYS_ENERGY_OUT[this.mTier] + }; } @Override public ITexture[] getBackActive(byte aColor) { - return new ITexture[]{super.getBackActive(aColor)[0], TextureFactory.of( - TextureFactory.of(STEAM_TURBINE_BACK_ACTIVE), - TextureFactory.builder().addIcon(STEAM_TURBINE_BACK_ACTIVE_GLOW).glow().build())}; + return new ITexture[] { + super.getBackActive(aColor)[0], + TextureFactory.of( + TextureFactory.of(STEAM_TURBINE_BACK_ACTIVE), + TextureFactory.builder() + .addIcon(STEAM_TURBINE_BACK_ACTIVE_GLOW) + .glow() + .build()) + }; } @Override public ITexture[] getBottomActive(byte aColor) { - return new ITexture[]{super.getBottomActive(aColor)[0], TextureFactory.of( - TextureFactory.of(STEAM_TURBINE_BOTTOM_ACTIVE), - TextureFactory.builder().addIcon(STEAM_TURBINE_BOTTOM_ACTIVE_GLOW).glow().build())}; + return new ITexture[] { + super.getBottomActive(aColor)[0], + TextureFactory.of( + TextureFactory.of(STEAM_TURBINE_BOTTOM_ACTIVE), + TextureFactory.builder() + .addIcon(STEAM_TURBINE_BOTTOM_ACTIVE_GLOW) + .glow() + .build()) + }; } @Override public ITexture[] getTopActive(byte aColor) { - return new ITexture[]{super.getTopActive(aColor)[0], TextureFactory.of( - TextureFactory.of(STEAM_TURBINE_TOP_ACTIVE), - TextureFactory.builder().addIcon(STEAM_TURBINE_TOP_ACTIVE_GLOW).glow().build())}; + return new ITexture[] { + super.getTopActive(aColor)[0], + TextureFactory.of( + TextureFactory.of(STEAM_TURBINE_TOP_ACTIVE), + TextureFactory.builder() + .addIcon(STEAM_TURBINE_TOP_ACTIVE_GLOW) + .glow() + .build()) + }; } @Override public ITexture[] getSidesActive(byte aColor) { - return new ITexture[]{super.getSidesActive(aColor)[0], TextureFactory.of( - TextureFactory.of(STEAM_TURBINE_SIDE_ACTIVE), - TextureFactory.builder().addIcon(STEAM_TURBINE_SIDE_ACTIVE_GLOW).glow().build())}; + return new ITexture[] { + super.getSidesActive(aColor)[0], + TextureFactory.of( + TextureFactory.of(STEAM_TURBINE_SIDE_ACTIVE), + TextureFactory.builder() + .addIcon(STEAM_TURBINE_SIDE_ACTIVE_GLOW) + .glow() + .build()) + }; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java index c62145be13..b3da47ae89 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java @@ -9,7 +9,8 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_N import gregtech.api.render.TextureFactory; public class GT_MetaTileEntity_BasicHull_Bronze extends GT_MetaTileEntity_BasicHull_NonElectric { - public GT_MetaTileEntity_BasicHull_Bronze(int aID, String aName, String aNameRegional, int aTier, String aDescription) { + public GT_MetaTileEntity_BasicHull_Bronze( + int aID, String aName, String aNameRegional, int aTier, String aDescription) { super(aID, aName, aNameRegional, aTier, aDescription); } @@ -17,7 +18,8 @@ public class GT_MetaTileEntity_BasicHull_Bronze extends GT_MetaTileEntity_BasicH super(aName, aTier, aDescription, aTextures); } - public GT_MetaTileEntity_BasicHull_Bronze(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_BasicHull_Bronze( + String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @@ -30,9 +32,15 @@ public class GT_MetaTileEntity_BasicHull_Bronze extends GT_MetaTileEntity_BasicH public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[3][17][]; for (byte i = -1; i < 16; i = (byte) (i + 1)) { - rTextures[0][(i + 1)] = new ITexture[]{TextureFactory.of(Textures.BlockIcons.MACHINE_BRONZE_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; - rTextures[1][(i + 1)] = new ITexture[]{TextureFactory.of(Textures.BlockIcons.MACHINE_BRONZE_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; - rTextures[2][(i + 1)] = new ITexture[]{TextureFactory.of(Textures.BlockIcons.MACHINE_BRONZE_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + rTextures[0][(i + 1)] = new ITexture[] { + TextureFactory.of(Textures.BlockIcons.MACHINE_BRONZE_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa)) + }; + rTextures[1][(i + 1)] = new ITexture[] { + TextureFactory.of(Textures.BlockIcons.MACHINE_BRONZE_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)) + }; + rTextures[2][(i + 1)] = new ITexture[] { + TextureFactory.of(Textures.BlockIcons.MACHINE_BRONZE_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)) + }; } return rTextures; } diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java index 90ec54b1fa..0589f8f236 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java @@ -9,32 +9,44 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_N import gregtech.api.render.TextureFactory; public class GT_MetaTileEntity_BasicHull_BronzeBricks extends GT_MetaTileEntity_BasicHull_NonElectric { - public GT_MetaTileEntity_BasicHull_BronzeBricks(int aID, String aName, String aNameRegional, int aTier, String aDescription) { + public GT_MetaTileEntity_BasicHull_BronzeBricks( + int aID, String aName, String aNameRegional, int aTier, String aDescription) { super(aID, aName, aNameRegional, aTier, aDescription); } - public GT_MetaTileEntity_BasicHull_BronzeBricks(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_BasicHull_BronzeBricks( + String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } - public GT_MetaTileEntity_BasicHull_BronzeBricks(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_BasicHull_BronzeBricks( + String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_BasicHull_BronzeBricks(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); + return new GT_MetaTileEntity_BasicHull_BronzeBricks( + this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[3][17][]; for (byte i = -1; i < 16; i = (byte) (i + 1)) { - ITexture[] tmp0 = {TextureFactory.of(Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + ITexture[] tmp0 = { + TextureFactory.of( + Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa)) + }; rTextures[0][(i + 1)] = tmp0; - ITexture[] tmp1 = {TextureFactory.of(Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + ITexture[] tmp1 = { + TextureFactory.of(Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)) + }; rTextures[1][(i + 1)] = tmp1; - ITexture[] tmp2 = {TextureFactory.of(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + ITexture[] tmp2 = { + TextureFactory.of( + Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)) + }; rTextures[2][(i + 1)] = tmp2; } return rTextures; diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java index 24c3f589e8..d8d8cfed63 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java @@ -8,7 +8,9 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_NonElectric; import gregtech.api.render.TextureFactory; -public class GT_MetaTileEntity_BasicHull_Steel extends GT_MetaTileEntity_BasicHull_NonElectric { public GT_MetaTileEntity_BasicHull_Steel(int aID, String aName, String aNameRegional, int aTier, String aDescription) { +public class GT_MetaTileEntity_BasicHull_Steel extends GT_MetaTileEntity_BasicHull_NonElectric { + public GT_MetaTileEntity_BasicHull_Steel( + int aID, String aName, String aNameRegional, int aTier, String aDescription) { super(aID, aName, aNameRegional, aTier, aDescription); } @@ -29,11 +31,17 @@ public class GT_MetaTileEntity_BasicHull_Steel extends GT_MetaTileEntity_BasicHu public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[3][17][]; for (byte i = -1; i < 16; i = (byte) (i + 1)) { - ITexture[] tmp0 = {TextureFactory.of(Textures.BlockIcons.MACHINE_STEEL_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + ITexture[] tmp0 = { + TextureFactory.of(Textures.BlockIcons.MACHINE_STEEL_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa)) + }; rTextures[0][(i + 1)] = tmp0; - ITexture[] tmp1 = {TextureFactory.of(Textures.BlockIcons.MACHINE_STEEL_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + ITexture[] tmp1 = { + TextureFactory.of(Textures.BlockIcons.MACHINE_STEEL_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)) + }; rTextures[1][(i + 1)] = tmp1; - ITexture[] tmp2 = {TextureFactory.of(Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + ITexture[] tmp2 = { + TextureFactory.of(Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)) + }; rTextures[2][(i + 1)] = tmp2; } return rTextures; diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java index 57ef19478e..2a0827e278 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java @@ -9,32 +9,43 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_N import gregtech.api.render.TextureFactory; public class GT_MetaTileEntity_BasicHull_SteelBricks extends GT_MetaTileEntity_BasicHull_NonElectric { - public GT_MetaTileEntity_BasicHull_SteelBricks(int aID, String aName, String aNameRegional, int aTier, String aDescription) { + public GT_MetaTileEntity_BasicHull_SteelBricks( + int aID, String aName, String aNameRegional, int aTier, String aDescription) { super(aID, aName, aNameRegional, aTier, aDescription); } - public GT_MetaTileEntity_BasicHull_SteelBricks(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_BasicHull_SteelBricks( + String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } - public GT_MetaTileEntity_BasicHull_SteelBricks(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_BasicHull_SteelBricks( + String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_BasicHull_SteelBricks(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); + return new GT_MetaTileEntity_BasicHull_SteelBricks( + this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[3][17][]; for (byte i = -1; i < 16; i = (byte) (i + 1)) { - ITexture[] tmp0 = {TextureFactory.of(Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + ITexture[] tmp0 = { + TextureFactory.of( + Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa)) + }; rTextures[0][(i + 1)] = tmp0; - ITexture[] tmp1 = {TextureFactory.of(Textures.BlockIcons.MACHINE_STEELBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + ITexture[] tmp1 = { + TextureFactory.of(Textures.BlockIcons.MACHINE_STEELBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)) + }; rTextures[1][(i + 1)] = tmp1; - ITexture[] tmp2 = {TextureFactory.of(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + ITexture[] tmp2 = { + TextureFactory.of(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)) + }; rTextures[2][(i + 1)] = tmp2; } return rTextures; diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_InputBus_ME.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_InputBus_ME.java index ec747a79f3..1ae3381662 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_InputBus_ME.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_InputBus_ME.java @@ -1,11 +1,7 @@ package gregtech.common.tileentities.machines; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraftforge.common.util.ForgeDirection; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_INPUT_HATCH; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_INPUT_HATCH_ACTIVE; import appeng.api.config.Actionable; import appeng.api.config.PowerMultiplier; @@ -31,27 +27,31 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input import gregtech.api.render.TextureFactory; import gregtech.common.gui.GT_Container_InputBus_ME; import gregtech.common.gui.GT_GUIContainer_InputBus_ME; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.common.util.ForgeDirection; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_INPUT_HATCH; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_INPUT_HATCH_ACTIVE; - -public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch_InputBus implements IConfigurationCircuitSupport { +public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch_InputBus + implements IConfigurationCircuitSupport { private static final int SLOT_COUNT = 16; private BaseActionSource requestSource = null; private AENetworkProxy gridProxy = null; private final ItemStack[] shadowInventory = new ItemStack[SLOT_COUNT]; private final int[] savedStackSizes = new int[SLOT_COUNT]; private boolean processingRecipe = false; + public GT_MetaTileEntity_Hatch_InputBus_ME(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, 1, SLOT_COUNT * 2 + 1, new String[] { - "Advanced item input for Multiblocks", - "Retrieves directly from ME", - "Keeps 16 item types in stock" + "Advanced item input for Multiblocks", "Retrieves directly from ME", "Keeps 16 item types in stock" }); disableSort = true; } - public GT_MetaTileEntity_Hatch_InputBus_ME(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_Hatch_InputBus_ME( + String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, SLOT_COUNT * 2 + 1, aDescription, aTextures); disableSort = true; } @@ -93,16 +93,18 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch return isOutputFacing((byte) forgeDirection.ordinal()) ? AECableType.SMART : AECableType.NONE; } - @Override @Optional.Method(modid = "appliedenergistics2") public AENetworkProxy getProxy() { if (gridProxy == null) { if (getBaseMetaTileEntity() instanceof IGridProxyable) { - gridProxy = new AENetworkProxy((IGridProxyable) getBaseMetaTileEntity(), "proxy", ItemList.Hatch_Output_Bus_ME.get(1), true); + gridProxy = new AENetworkProxy( + (IGridProxyable) getBaseMetaTileEntity(), "proxy", ItemList.Hatch_Output_Bus_ME.get(1), true); gridProxy.setFlags(GridFlags.REQUIRE_CHANNEL); if (getBaseMetaTileEntity().getWorld() != null) - gridProxy.setOwner(getBaseMetaTileEntity().getWorld().getPlayerEntityByName(getBaseMetaTileEntity().getOwnerName())); + gridProxy.setOwner(getBaseMetaTileEntity() + .getWorld() + .getPlayerEntityByName(getBaseMetaTileEntity().getOwnerName())); } } return this.gridProxy; @@ -110,16 +112,13 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch @Override @Optional.Method(modid = "appliedenergistics2") - public void gridChanged() { - } + public void gridChanged() {} @Override - public void saveNBTData(NBTTagCompound aNBT) - { + public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); int[] sizes = new int[16]; - for (int i = 0; i < 16; ++i) - sizes[i] = mInventory[i + 16] == null ? 0 : mInventory[i + 16].stackSize; + for (int i = 0; i < 16; ++i) sizes[i] = mInventory[i + 16] == null ? 0 : mInventory[i + 16].stackSize; aNBT.setIntArray("sizes", sizes); if (GregTech_API.mAE2) { gridProxy.writeToNBT(aNBT); @@ -155,14 +154,15 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch public String[] getInfoData() { if (GregTech_API.mAE2) { return new String[] { - "The bus is " + ((getProxy() != null && getProxy().isActive()) ? - EnumChatFormatting.GREEN + "online" : EnumChatFormatting.RED + "offline" + getAEDiagnostics()) - + EnumChatFormatting.RESET}; - } - else - return new String[] {}; + "The bus is " + + ((getProxy() != null && getProxy().isActive()) + ? EnumChatFormatting.GREEN + "online" + : EnumChatFormatting.RED + "offline" + getAEDiagnostics()) + + EnumChatFormatting.RESET + }; + } else return new String[] {}; } - + @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return false; @@ -174,15 +174,15 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch } @Override - public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - } + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {} @Override - public void updateSlots() { - } + public void updateSlots() {} @Override - public int getCircuitSlot() { return SLOT_COUNT * 2; } + public int getCircuitSlot() { + return SLOT_COUNT * 2; + } @Override public int getCircuitSlotX() { @@ -196,15 +196,12 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch @Override public ItemStack getStackInSlot(int aIndex) { - if (!processingRecipe) - return super.getStackInSlot(aIndex); - if (aIndex < 0 || aIndex > mInventory.length) - return null; + if (!processingRecipe) return super.getStackInSlot(aIndex); + if (aIndex < 0 || aIndex > mInventory.length) return null; if (aIndex >= SLOT_COUNT && aIndex < SLOT_COUNT * 2) - //Display slots + // Display slots return null; - if (aIndex == getCircuitSlot()) - return mInventory[aIndex]; + if (aIndex == getCircuitSlot()) return mInventory[aIndex]; if (GregTech_API.mAE2 && mInventory[aIndex] != null) { AENetworkProxy proxy = getProxy(); if (proxy == null) { @@ -221,17 +218,15 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch this.setInventorySlotContents(aIndex + SLOT_COUNT, this.shadowInventory[aIndex]); return this.shadowInventory[aIndex]; } else { - //Request failed + // Request failed this.setInventorySlotContents(aIndex + SLOT_COUNT, null); return null; } - } - catch( final GridAccessException ignored ) - { + } catch (final GridAccessException ignored) { } return null; } else { - //AE available but no items requested + // AE available but no items requested this.setInventorySlotContents(aIndex + SLOT_COUNT, null); } return mInventory[aIndex]; @@ -239,8 +234,7 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch @Optional.Method(modid = "appliedenergistics2") private BaseActionSource getRequestSource() { - if (requestSource == null) - requestSource = new MachineSource((IActionHost)getBaseMetaTileEntity()); + if (requestSource == null) requestSource = new MachineSource((IActionHost) getBaseMetaTileEntity()); return requestSource; } @@ -267,10 +261,11 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch IAEItemStack request = AEItemStack.create(mInventory[i]); request.setStackSize(savedStackSizes[i] - (oldStack == null ? 0 : oldStack.stackSize)); sg.extractItems(request, Actionable.MODULATE, getRequestSource()); - proxy.getEnergy().extractAEPower(request.getStackSize(), Actionable.MODULATE, PowerMultiplier.CONFIG); + proxy.getEnergy() + .extractAEPower( + request.getStackSize(), Actionable.MODULATE, PowerMultiplier.CONFIG); setInventorySlotContents(i + SLOT_COUNT, oldStack); - } - catch (final GridAccessException ignored) { + } catch (final GridAccessException ignored) { } } savedStackSizes[i] = 0; @@ -285,8 +280,7 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch if (GregTech_API.mAE2 && aIndex >= 0 && aIndex < SLOT_COUNT) { if (aStack == null) { super.setInventorySlotContents(aIndex + SLOT_COUNT, null); - } - else { + } else { AENetworkProxy proxy = getProxy(); if (!proxy.isActive()) { super.setInventorySlotContents(aIndex + SLOT_COUNT, null); @@ -300,8 +294,7 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch ItemStack s = (result != null) ? result.getItemStack() : null; setInventorySlotContents(aIndex + SLOT_COUNT, s); return s; - } - catch (final GridAccessException ignored) { + } catch (final GridAccessException ignored) { } } } diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java index 4389156191..21b4aabe3a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java @@ -1,7 +1,7 @@ package gregtech.common.tileentities.machines; -import java.util.ArrayList; -import java.util.List; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_HATCH; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_HATCH_ACTIVE; import appeng.api.AEApi; import appeng.api.networking.GridFlags; @@ -28,6 +28,8 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; +import java.util.ArrayList; +import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTBase; @@ -37,27 +39,32 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_HATCH; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_HATCH_ACTIVE; - public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatch_OutputBus { private BaseActionSource requestSource = null; private AENetworkProxy gridProxy = null; - IItemList<IAEItemStack> itemCache = GregTech_API.mAE2 ? AEApi.instance().storage().createItemList() : null; + IItemList<IAEItemStack> itemCache = + GregTech_API.mAE2 ? AEApi.instance().storage().createItemList() : null; long lastOutputTick = 0; long tickCounter = 0; boolean lastOutputFailed = false; boolean infiniteCache = true; public GT_MetaTileEntity_Hatch_OutputBus_ME(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional, 1, new String[]{ - "Item Output for Multiblocks", "Stores directly into ME", - "To use in GT++ multiblocks", " turn off overflow control", - " with a soldering iron." - }, 0); + super( + aID, + aName, + aNameRegional, + 1, + new String[] { + "Item Output for Multiblocks", "Stores directly into ME", + "To use in GT++ multiblocks", " turn off overflow control", + " with a soldering iron." + }, + 0); } - public GT_MetaTileEntity_Hatch_OutputBus_ME(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_Hatch_OutputBus_ME( + String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, 0, aDescription, aTextures); } @@ -68,12 +75,12 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_ME_HATCH_ACTIVE)}; + return new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_ME_HATCH_ACTIVE)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, TextureFactory.of(OVERLAY_ME_HATCH)}; + return new ITexture[] {aBaseTexture, TextureFactory.of(OVERLAY_ME_HATCH)}; } @Override @@ -84,8 +91,7 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc @Override public boolean storeAll(ItemStack aStack) { - if (!GregTech_API.mAE2) - return false; + if (!GregTech_API.mAE2) return false; aStack.stackSize = store(aStack); return aStack.stackSize == 0; } @@ -98,23 +104,21 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc */ @Optional.Method(modid = "appliedenergistics2") public int store(final ItemStack stack) { - if (!infiniteCache && lastOutputFailed) - return stack.stackSize; + if (!infiniteCache && lastOutputFailed) return stack.stackSize; itemCache.add(AEApi.instance().storage().createItemStack(stack)); return 0; } @Optional.Method(modid = "appliedenergistics2") private BaseActionSource getRequest() { - if (requestSource == null) - requestSource = new MachineSource((IActionHost)getBaseMetaTileEntity()); + if (requestSource == null) requestSource = new MachineSource((IActionHost) getBaseMetaTileEntity()); return requestSource; } @Override @Optional.Method(modid = "appliedenergistics2") public AECableType getCableConnectionType(ForgeDirection forgeDirection) { - return isOutputFacing((byte)forgeDirection.ordinal()) ? AECableType.SMART : AECableType.NONE; + return isOutputFacing((byte) forgeDirection.ordinal()) ? AECableType.SMART : AECableType.NONE; } @Override @@ -124,10 +128,16 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (!getBaseMetaTileEntity().getCoverBehaviorAtSideNew(aSide).isGUIClickable(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getComplexCoverDataAtSide(aSide), getBaseMetaTileEntity())) - return; + if (!getBaseMetaTileEntity() + .getCoverBehaviorAtSideNew(aSide) + .isGUIClickable( + aSide, + getBaseMetaTileEntity().getCoverIDAtSide(aSide), + getBaseMetaTileEntity().getComplexCoverDataAtSide(aSide), + getBaseMetaTileEntity())) return; infiniteCache = !infiniteCache; - GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("GT5U.hatch.infiniteCache." + infiniteCache)); + GT_Utility.sendChatToPlayer( + aPlayer, StatCollector.translateToLocal("GT5U.hatch.infiniteCache." + infiniteCache)); } @Override @@ -135,24 +145,24 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc public AENetworkProxy getProxy() { if (gridProxy == null) { if (getBaseMetaTileEntity() instanceof IGridProxyable) { - gridProxy = new AENetworkProxy((IGridProxyable)getBaseMetaTileEntity(), "proxy", ItemList.Hatch_Output_Bus_ME.get(1), true); + gridProxy = new AENetworkProxy( + (IGridProxyable) getBaseMetaTileEntity(), "proxy", ItemList.Hatch_Output_Bus_ME.get(1), true); gridProxy.setFlags(GridFlags.REQUIRE_CHANNEL); if (getBaseMetaTileEntity().getWorld() != null) - gridProxy.setOwner(getBaseMetaTileEntity().getWorld().getPlayerEntityByName(getBaseMetaTileEntity().getOwnerName())); + gridProxy.setOwner(getBaseMetaTileEntity() + .getWorld() + .getPlayerEntityByName(getBaseMetaTileEntity().getOwnerName())); } - } return this.gridProxy; } @Override @Optional.Method(modid = "appliedenergistics2") - public void gridChanged() { - } + public void gridChanged() {} @Optional.Method(modid = "appliedenergistics2") - private void flushCachedStack() - { + private void flushCachedStack() { lastOutputFailed = false; AENetworkProxy proxy = getProxy(); if (proxy == null) { @@ -161,9 +171,8 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc } try { IMEMonitor<IAEItemStack> sg = proxy.getStorage().getItemInventory(); - for (IAEItemStack s: itemCache) { - if (s.getStackSize() == 0) - continue; + for (IAEItemStack s : itemCache) { + if (s.getStackSize() == 0) continue; IAEItemStack rest = Platform.poweredInsert(proxy.getEnergy(), sg, s, getRequest()); if (rest != null && rest.getStackSize() > 0) { lastOutputFailed = true; @@ -172,9 +181,7 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc } s.setStackSize(0); } - } - catch( final GridAccessException ignored ) - { + } catch (final GridAccessException ignored) { lastOutputFailed = true; } lastOutputTick = tickCounter; @@ -184,22 +191,19 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (GT_Values.GT.isServerSide()) { tickCounter = aTick; - if (tickCounter > (lastOutputTick + 40)) - flushCachedStack(); + if (tickCounter > (lastOutputTick + 40)) flushCachedStack(); } super.onPostTick(aBaseMetaTileEntity, aTick); } @Override - public void saveNBTData(NBTTagCompound aNBT) - { + public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); if (GregTech_API.mAE2) { NBTTagList items = new NBTTagList(); - for (IAEItemStack s: itemCache) { - if (s.getStackSize() == 0) - continue; + for (IAEItemStack s : itemCache) { + if (s.getStackSize() == 0) continue; NBTTagCompound tag = new NBTTagCompound(); NBTTagCompound tagItemStack = new NBTTagCompound(); s.getItemStack().writeToNBT(tagItemStack); @@ -222,15 +226,17 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc itemCache.add(AEApi.instance().storage().createItemStack(GT_Utility.loadItem((NBTTagCompound) t))); t = aNBT.getTag("cachedItems"); if (t instanceof NBTTagList) { - NBTTagList l = (NBTTagList)t; + NBTTagList l = (NBTTagList) t; for (int i = 0; i < l.tagCount(); ++i) { NBTTagCompound tag = l.getCompoundTagAt(i); if (!tag.hasKey("itemStack")) { // legacy #868 - itemCache.add(AEApi.instance().storage().createItemStack(GT_Utility.loadItem(l.getCompoundTagAt(i)))); + itemCache.add( + AEApi.instance().storage().createItemStack(GT_Utility.loadItem(l.getCompoundTagAt(i)))); continue; } NBTTagCompound tagItemStack = tag.getCompoundTag("itemStack"); - final IAEItemStack s = AEApi.instance().storage().createItemStack(GT_Utility.loadItem(tagItemStack)); + final IAEItemStack s = + AEApi.instance().storage().createItemStack(GT_Utility.loadItem(tagItemStack)); s.setStackSize(tag.getLong("size")); itemCache.add(s); } @@ -250,22 +256,22 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc @Override public String[] getInfoData() { - if (!GregTech_API.mAE2) - return new String[]{}; + if (!GregTech_API.mAE2) return new String[] {}; List<String> ss = new ArrayList<>(); - ss.add("The bus is " + ((getProxy() != null && getProxy().isActive())? - EnumChatFormatting.GREEN + "online" : EnumChatFormatting.RED + "offline" - + getAEDiagnostics() ) + EnumChatFormatting.RESET); + ss.add("The bus is " + + ((getProxy() != null && getProxy().isActive()) + ? EnumChatFormatting.GREEN + "online" + : EnumChatFormatting.RED + "offline" + getAEDiagnostics()) + + EnumChatFormatting.RESET); if (itemCache.isEmpty()) { ss.add("The bus has no cached items"); - } - else { + } else { IWideReadableNumberConverter nc = ReadableNumberConverter.INSTANCE; ss.add(String.format("The bus contains %d cached stacks: ", itemCache.size())); int counter = 0; for (IAEItemStack s : itemCache) { - ss.add(s.getItem().getItemStackDisplayName(s.getItemStack()) + ": " + - EnumChatFormatting.GOLD + nc.toWideReadableForm(s.getStackSize()) + EnumChatFormatting.RESET); + ss.add(s.getItem().getItemStackDisplayName(s.getItemStack()) + ": " + EnumChatFormatting.GOLD + + nc.toWideReadableForm(s.getStackSize()) + EnumChatFormatting.RESET); if (++counter > 100) break; } } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java index 10bfd92f37..ee2ddcdfed 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java @@ -1,5 +1,8 @@ package gregtech.common.tileentities.machines.basic; +import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.common.GT_UndergroundOil.undergroundOilReadInformation; + import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -14,6 +17,10 @@ import gregtech.api.util.GT_Utility; import gregtech.common.blocks.GT_Block_Ores_Abstract; import gregtech.common.blocks.GT_TileEntity_Ores; import ic2.core.Ic2Items; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -24,15 +31,6 @@ import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.world.chunk.Chunk; import net.minecraftforge.fluids.FluidStack; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; - -import static gregtech.api.enums.Textures.BlockIcons.*; -import static gregtech.common.GT_UndergroundOil.undergroundOilReadInformation; - - public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_BasicMachine { boolean ready = false; int radius; @@ -40,60 +38,91 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba int cX; int cZ; - public GT_MetaTileEntity_AdvSeismicProspector(int aID, String aName, String aNameRegional, int aTier, int aRadius, int aStep) { - super(aID, aName, aNameRegional, aTier, 1, // amperage + public GT_MetaTileEntity_AdvSeismicProspector( + int aID, String aName, String aNameRegional, int aTier, int aRadius, int aStep) { + super( + aID, + aName, + aNameRegional, + aTier, + 1, // amperage "", 1, // input slot count 1, // output slot count "Default.png", // GUI name "", // NEI name - TextureFactory.of( - TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW).glow().build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER), - TextureFactory.builder().addIcon(OVERLAY_SIDE_ROCK_BREAKER_GLOW).glow().build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW).glow().build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_ROCK_BREAKER_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER_ACTIVE), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER), - TextureFactory.builder().addIcon(OVERLAY_TOP_ROCK_BREAKER_GLOW).glow().build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW).glow().build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER), - TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW).glow().build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW).glow().build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_GLOW).glow().build())); + TextureFactory.builder() + .addIcon(OVERLAY_TOP_ROCK_BREAKER_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER), + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_GLOW) + .glow() + .build())); radius = aRadius; step = aStep; } @Override public String[] getDescription() { - return new String[]{ - "Place, activate with explosives", - "2 Powderbarrels, " - + "4 Glyceryl Trinitrate, " - + "16 TNT, or " - + "8 ITNT", - "Use Data Stick, Scan Data Stick, Print Data Stick, Bind Pages into Book", - "Ore prospecting area = " - + radius*2 - + "x" - + radius*2 - + " ONLY blocks below prospector", - "Oil prospecting area 3x3 oilfields, each is 8x8 chunks"}; + return new String[] { + "Place, activate with explosives", + "2 Powderbarrels, " + "4 Glyceryl Trinitrate, " + "16 TNT, or " + "8 ITNT", + "Use Data Stick, Scan Data Stick, Print Data Stick, Bind Pages into Book", + "Ore prospecting area = " + radius * 2 + "x" + radius * 2 + " ONLY blocks below prospector", + "Oil prospecting area 3x3 oilfields, each is 8x8 chunks" + }; } - protected GT_MetaTileEntity_AdvSeismicProspector(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName, int aRadius, int aStep) { + protected GT_MetaTileEntity_AdvSeismicProspector( + String aName, + int aTier, + String[] aDescription, + ITexture[][][] aTextures, + String aGUIName, + String aNEIName, + int aRadius, + int aStep) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); radius = aRadius; step = aStep; @@ -101,8 +130,15 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_AdvSeismicProspector(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, - this.mGUIName, this.mNEIName, this.radius, this.step); + return new GT_MetaTileEntity_AdvSeismicProspector( + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mGUIName, + this.mNEIName, + this.radius, + this.step); } @Override @@ -110,16 +146,19 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba if (aBaseMetaTileEntity.isServerSide()) { ItemStack aStack = aPlayer.getCurrentEquippedItem(); - if (!ready && (GT_Utility.consumeItems(aPlayer, aStack, Item.getItemFromBlock(Blocks.tnt), 16) - || GT_Utility.consumeItems(aPlayer, aStack, Ic2Items.industrialTnt.getItem(), 8) - || GT_Utility.consumeItems(aPlayer, aStack, Materials.Glyceryl, 4) - || GT_Utility.consumeItems(aPlayer, aStack, ItemList.Block_Powderbarrel.getItem(), 2) )) { + if (!ready + && (GT_Utility.consumeItems(aPlayer, aStack, Item.getItemFromBlock(Blocks.tnt), 16) + || GT_Utility.consumeItems(aPlayer, aStack, Ic2Items.industrialTnt.getItem(), 8) + || GT_Utility.consumeItems(aPlayer, aStack, Materials.Glyceryl, 4) + || GT_Utility.consumeItems(aPlayer, aStack, ItemList.Block_Powderbarrel.getItem(), 2))) { this.ready = true; this.mMaxProgresstime = (aPlayer.capabilities.isCreativeMode ? 20 : 800); - } else if (ready && mMaxProgresstime == 0 - && aStack != null && aStack.stackSize == 1 + } else if (ready + && mMaxProgresstime == 0 + && aStack != null + && aStack.stackSize == 1 && aStack.getItem() == ItemList.Tool_DataStick.getItem()) { this.ready = false; @@ -132,15 +171,16 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba ArrayList<String> tOils = new ArrayList<>(); prospectOils(tOils); - GT_Utility.ItemNBT.setAdvancedProspectionData(mTier, - aStack, - this.getBaseMetaTileEntity().getXCoord(), - this.getBaseMetaTileEntity().getYCoord(), - this.getBaseMetaTileEntity().getZCoord(), - this.getBaseMetaTileEntity().getWorld().provider.dimensionId, - tOils, - GT_Utility.sortByValueToList(tOres), - radius); + GT_Utility.ItemNBT.setAdvancedProspectionData( + mTier, + aStack, + this.getBaseMetaTileEntity().getXCoord(), + this.getBaseMetaTileEntity().getYCoord(), + this.getBaseMetaTileEntity().getZCoord(), + this.getBaseMetaTileEntity().getWorld().provider.dimensionId, + tOils, + GT_Utility.sortByValueToList(tOres), + radius); } } @@ -165,15 +205,14 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba for (int i = 0; i < oilfieldSize; i++) { for (int j = 0; j < oilfieldSize; j++) { - Chunk tChunk = getBaseMetaTileEntity().getWorld().getChunkFromChunkCoords( - xChunk + i + x * oilfieldSize, - zChunk + j + z * oilfieldSize); + Chunk tChunk = getBaseMetaTileEntity() + .getWorld() + .getChunkFromChunkCoords( + xChunk + i + x * oilfieldSize, zChunk + j + z * oilfieldSize); FluidStack tFluid = undergroundOilReadInformation(tChunk); if (tFluid != null) { - if (tFluid.amount > max) - max = tFluid.amount; - if (tFluid.amount < min) - min = tFluid.amount; + if (tFluid.amount > max) max = tFluid.amount; + if (tFluid.amount < min) min = tFluid.amount; if (!tFluids.containsKey(cInts)) { tFluids.put(cInts, tFluid); } @@ -181,33 +220,32 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba } } - aOils.add(++oilFieldCount + "," + min + "-" + max + "," + tFluids.get(cInts).getLocalizedName()); + aOils.add(++oilFieldCount + "," + min + "-" + max + "," + + tFluids.get(cInts).getLocalizedName()); } } - } catch (Exception ignored) {} + } catch (Exception ignored) { + } } private void prospectOres(Map<String, Integer> aOres) { int tLeftXBound = this.getBaseMetaTileEntity().getXCoord() - radius; - int tRightXBound = tLeftXBound + 2*radius; + int tRightXBound = tLeftXBound + 2 * radius; int tLeftZBound = this.getBaseMetaTileEntity().getZCoord() - radius; - int tRightZBound = tLeftZBound + 2*radius; + int tRightZBound = tLeftZBound + 2 * radius; for (int i = tLeftXBound; i <= tRightXBound; i += step) { - if (Math.abs(i >> 4) % 3 != 1) - continue; + if (Math.abs(i >> 4) % 3 != 1) continue; for (int k = tLeftZBound; k <= tRightZBound; k += step) { - if (Math.abs(k >> 4) % 3 != 1) - continue; + if (Math.abs(k >> 4) % 3 != 1) continue; cX = (i >> 4) << 4; cZ = (k >> 4) << 4; - String separator = (cX +8)+ "," + (cZ + 8) + " --------"; + String separator = (cX + 8) + "," + (cZ + 8) + " --------"; aOres.put(separator, 1); prospectHole(i, k, aOres); - } } } @@ -216,8 +254,7 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba String tFoundOre; for (int j = this.getBaseMetaTileEntity().getYCoord(); j > 0; j--) { tFoundOre = checkForOre(i, j, k); - if (tFoundOre != null) - countOre(aOres, tFoundOre, cX, cZ); + if (tFoundOre != null) countOre(aOres, tFoundOre, cX, cZ); } } @@ -228,12 +265,11 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba TileEntity tTileEntity = getBaseMetaTileEntity().getWorld().getTileEntity(x, y, z); if ((tTileEntity instanceof GT_TileEntity_Ores) - && (((GT_TileEntity_Ores) tTileEntity).mMetaData < 16000)) { // Filtering small ores - Materials tMaterial - = GregTech_API.sGeneratedMaterials[((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000]; + && (((GT_TileEntity_Ores) tTileEntity).mMetaData < 16000)) { // Filtering small ores + Materials tMaterial = + GregTech_API.sGeneratedMaterials[((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000]; - if ((tMaterial != null) && (tMaterial != Materials._NULL)) - return tMaterial.mDefaultLocalName; + if ((tMaterial != null) && (tMaterial != Materials._NULL)) return tMaterial.mDefaultLocalName; } } else { int tMetaID = getBaseMetaTileEntity().getWorld().getBlockMetadata(x, y, z); @@ -241,14 +277,13 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba ItemData association = GT_OreDictUnificator.getAssociation(is); if ((association != null) && (association.mPrefix.toString().startsWith("ore"))) return association.mMaterial.mMaterial.mDefaultLocalName; - else if (GT_Utility.isOre(tBlock, tMetaID)) - return tBlock.getLocalizedName(); + else if (GT_Utility.isOre(tBlock, tMetaID)) return tBlock.getLocalizedName(); } return null; } private static void countOre(Map<String, Integer> map, String ore, int cCX, int cCZ) { - ore = (cCX +8)+ "," + (cCZ + 8) + " has " + ore; + ore = (cCX + 8) + "," + (cCZ + 8) + " has " + ore; Integer oldCount = map.get(ore); oldCount = (oldCount == null) ? 0 : oldCount; diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java index c0d4616bf9..49b6e4d473 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.machines.basic; +import static gregtech.api.enums.Textures.BlockIcons.*; + import gregtech.api.enums.ItemList; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -11,52 +13,92 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import net.minecraft.item.ItemStack; -import static gregtech.api.enums.Textures.BlockIcons.*; - public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine { ItemStack aInputCache; ItemStack aOutputCache; int aTypeCache = 0; public GT_MetaTileEntity_Boxinator(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, "Puts things into Boxes", 2, 1, "Packager.png", "", + super( + aID, + aName, + aNameRegional, + aTier, + 1, + "Puts things into Boxes", + 2, + 1, + "Packager.png", + "", TextureFactory.of( TextureFactory.of(OVERLAY_SIDE_BOXINATOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_SIDE_BOXINATOR_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_BOXINATOR_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_SIDE_BOXINATOR), - TextureFactory.builder().addIcon(OVERLAY_SIDE_BOXINATOR_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_BOXINATOR_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_FRONT_BOXINATOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_BOXINATOR_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_BOXINATOR_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_FRONT_BOXINATOR), - TextureFactory.builder().addIcon(OVERLAY_FRONT_BOXINATOR_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_BOXINATOR_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_TOP_BOXINATOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_TOP_BOXINATOR_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_BOXINATOR_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_TOP_BOXINATOR), - TextureFactory.builder().addIcon(OVERLAY_TOP_BOXINATOR_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_BOXINATOR_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_BOTTOM_BOXINATOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_BOXINATOR_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_BOXINATOR_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_BOTTOM_BOXINATOR), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_BOXINATOR_GLOW).glow().build())); + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_BOXINATOR_GLOW) + .glow() + .build())); } - public GT_MetaTileEntity_Boxinator(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + public GT_MetaTileEntity_Boxinator( + String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 2, 1, aGUIName, aNEIName); } - public GT_MetaTileEntity_Boxinator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + public GT_MetaTileEntity_Boxinator( + String aName, + int aTier, + String[] aDescription, + ITexture[][][] aTextures, + String aGUIName, + String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 2, 1, aGUIName, aNEIName); } @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Boxinator(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); + return new GT_MetaTileEntity_Boxinator( + this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); } @Override @@ -64,13 +106,12 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine return GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes; } - private boolean hasValidCache(ItemStack mItem,int mType,boolean mClearOnFailure) { + private boolean hasValidCache(ItemStack mItem, int mType, boolean mClearOnFailure) { if (aInputCache != null && aOutputCache != null && aTypeCache == mType && aInputCache.isItemEqual(mItem) - && ItemStack.areItemStackTagsEqual(mItem,aInputCache)) - return true; + && ItemStack.areItemStackTagsEqual(mItem, aInputCache)) return true; // clear cache if it was invalid if (mClearOnFailure) { aInputCache = null; @@ -80,7 +121,7 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine return false; } - private void cacheItem(ItemStack mInputItem,ItemStack mOutputItem,int mType) { + private void cacheItem(ItemStack mInputItem, ItemStack mOutputItem, int mType) { aTypeCache = mType; aOutputCache = mOutputItem.copy(); aInputCache = mInputItem.copy(); @@ -94,53 +135,57 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine } ItemStack tSlot0 = getInputAt(0); ItemStack tSlot1 = getInputAt(1); - if ((GT_Utility.isStackValid(tSlot0)) && (GT_Utility.isStackValid(tSlot1)) && (GT_Utility.getContainerItem(tSlot0, true) == null)) { + if ((GT_Utility.isStackValid(tSlot0)) + && (GT_Utility.isStackValid(tSlot1)) + && (GT_Utility.getContainerItem(tSlot0, true) == null)) { if ((ItemList.Schematic_1by1.isStackEqual(tSlot1)) && (tSlot0.stackSize >= 1)) { - boolean tIsCached = hasValidCache(tSlot0,1,true); + boolean tIsCached = hasValidCache(tSlot0, 1, true); this.mOutputItems[0] = tIsCached ? aOutputCache.copy() : GT_ModHandler.getRecipeOutput(tSlot0); if (this.mOutputItems[0] != null) { if (canOutput(this.mOutputItems[0])) { tSlot0.stackSize -= 1; - calculateOverclockedNess(32,16); - //In case recipe is too OP for that machine + calculateOverclockedNess(32, 16); + // In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; - if (!tIsCached) - cacheItem(tSlot0,this.mOutputItems[0],1); + if (!tIsCached) cacheItem(tSlot0, this.mOutputItems[0], 1); return FOUND_AND_SUCCESSFULLY_USED_RECIPE; } } return DID_NOT_FIND_RECIPE; } if ((ItemList.Schematic_2by2.isStackEqual(tSlot1)) && (getInputAt(0).stackSize >= 4)) { - boolean tIsCached = hasValidCache(tSlot0,2,true); - this.mOutputItems[0] = tIsCached ? aOutputCache.copy() : GT_ModHandler.getRecipeOutput(tSlot0, tSlot0, null, tSlot0, tSlot0); + boolean tIsCached = hasValidCache(tSlot0, 2, true); + this.mOutputItems[0] = tIsCached + ? aOutputCache.copy() + : GT_ModHandler.getRecipeOutput(tSlot0, tSlot0, null, tSlot0, tSlot0); if (this.mOutputItems[0] != null) { if (canOutput(this.mOutputItems[0])) { getInputAt(0).stackSize -= 4; - calculateOverclockedNess(32,32); - //In case recipe is too OP for that machine + calculateOverclockedNess(32, 32); + // In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; - if (!tIsCached) - cacheItem(tSlot0,this.mOutputItems[0],2); + if (!tIsCached) cacheItem(tSlot0, this.mOutputItems[0], 2); return FOUND_AND_SUCCESSFULLY_USED_RECIPE; } } return DID_NOT_FIND_RECIPE; } if ((ItemList.Schematic_3by3.isStackEqual(tSlot1)) && (getInputAt(0).stackSize >= 9)) { - boolean tIsCached = hasValidCache(tSlot0,3,true); - this.mOutputItems[0] = tIsCached ? aOutputCache.copy() : GT_ModHandler.getRecipeOutput(tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0); + boolean tIsCached = hasValidCache(tSlot0, 3, true); + this.mOutputItems[0] = tIsCached + ? aOutputCache.copy() + : GT_ModHandler.getRecipeOutput( + tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0); if (this.mOutputItems[0] != null) { if (canOutput(this.mOutputItems[0])) { getInputAt(0).stackSize -= 9; - calculateOverclockedNess(32,64); - //In case recipe is too OP for that machine + calculateOverclockedNess(32, 64); + // In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; - if (!tIsCached) - cacheItem(tSlot0,this.mOutputItems[0],3); + if (!tIsCached) cacheItem(tSlot0, this.mOutputItems[0], 3); return FOUND_AND_SUCCESSFULLY_USED_RECIPE; } } @@ -151,23 +196,36 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine } @Override - protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + protected boolean allowPutStackValidated( + IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { if (!super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack)) { return false; } ItemStack tInput1 = getInputAt(1); - if ((ItemList.Schematic_1by1.isStackEqual(tInput1)) || (ItemList.Schematic_2by2.isStackEqual(tInput1)) || (ItemList.Schematic_3by3.isStackEqual(tInput1))) { - if (hasValidCache(aStack,aTypeCache,false)) - return true; - if (GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.findRecipe(getBaseMetaTileEntity(), true, gregtech.api.enums.GT_Values.V[mTier], null, GT_Utility.copyAmount(64L, aStack), tInput1) != null) { + if ((ItemList.Schematic_1by1.isStackEqual(tInput1)) + || (ItemList.Schematic_2by2.isStackEqual(tInput1)) + || (ItemList.Schematic_3by3.isStackEqual(tInput1))) { + if (hasValidCache(aStack, aTypeCache, false)) return true; + if (GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.findRecipe( + getBaseMetaTileEntity(), + true, + gregtech.api.enums.GT_Values.V[mTier], + null, + GT_Utility.copyAmount(64L, aStack), + tInput1) + != null) { return true; } if (ItemList.Schematic_1by1.isStackEqual(getInputAt(1)) && GT_ModHandler.getRecipeOutput(aStack) != null) return true; - if (ItemList.Schematic_2by2.isStackEqual(getInputAt(1)) && GT_ModHandler.getRecipeOutput(aStack, aStack, null, aStack, aStack) != null) { + if (ItemList.Schematic_2by2.isStackEqual(getInputAt(1)) + && GT_ModHandler.getRecipeOutput(aStack, aStack, null, aStack, aStack) != null) { return true; } - return ItemList.Schematic_3by3.isStackEqual(getInputAt(1)) && (GT_ModHandler.getRecipeOutput(aStack, aStack, aStack, aStack, aStack, aStack, aStack, aStack, aStack) != null); + return ItemList.Schematic_3by3.isStackEqual(getInputAt(1)) + && (GT_ModHandler.getRecipeOutput( + aStack, aStack, aStack, aStack, aStack, aStack, aStack, aStack, aStack) + != null); } else { return GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.containsInput(aStack); } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java index b614bc598e..f6223a4a0d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.machines.basic; +import static gregtech.api.enums.GT_Values.V; + import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -9,19 +11,20 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicBatter import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; -import static gregtech.api.enums.GT_Values.V; - public class GT_MetaTileEntity_Charger extends GT_MetaTileEntity_BasicBatteryBuffer { - public GT_MetaTileEntity_Charger(int aID, String aName, String aNameRegional, int aTier, String aDescription, int aSlotCount) { + public GT_MetaTileEntity_Charger( + int aID, String aName, String aNameRegional, int aTier, String aDescription, int aSlotCount) { super(aID, aName, aNameRegional, aTier, aDescription, aSlotCount); } - public GT_MetaTileEntity_Charger(String aName, int aTier, String aDescription, ITexture[][][] aTextures, int aSlotCount) { + public GT_MetaTileEntity_Charger( + String aName, int aTier, String aDescription, ITexture[][][] aTextures, int aSlotCount) { super(aName, aTier, aDescription, aTextures, aSlotCount); } - public GT_MetaTileEntity_Charger(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, int aSlotCount) { + public GT_MetaTileEntity_Charger( + String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, int aSlotCount) { super(aName, aTier, aDescription, aTextures, aSlotCount); } @@ -36,16 +39,18 @@ public class GT_MetaTileEntity_Charger extends GT_MetaTileEntity_BasicBatteryBuf } @Override - public long maxEUStore() { return V[mTier] * 256L * mInventory.length;} + public long maxEUStore() { + return V[mTier] * 256L * mInventory.length; + } @Override public long maxAmperesIn() { - return Math.max(mChargeableCount * 8L,4L); + return Math.max(mChargeableCount * 8L, 4L); } @Override public long maxAmperesOut() { - return Math.max(mBatteryCount * 4L,2L); + return Math.max(mBatteryCount * 4L, 2L); } @Override @@ -56,25 +61,50 @@ public class GT_MetaTileEntity_Charger extends GT_MetaTileEntity_BasicBatteryBuf BaseMetaTileEntity mBaseMetaTileEntity = (BaseMetaTileEntity) getBaseMetaTileEntity(); if (mBaseMetaTileEntity.getMetaTileEntity() instanceof MetaTileEntity) { MetaTileEntity mMetaTileEntity = (MetaTileEntity) mBaseMetaTileEntity.getMetaTileEntity(); - //for (int t = 0; t < 6; t++) { - if (mMetaTileEntity.dechargerSlotCount() > 0 && mBaseMetaTileEntity.getStoredEU() < mBaseMetaTileEntity.getEUCapacity()) { - for (int i = mMetaTileEntity.dechargerSlotStartIndex(), k = mMetaTileEntity.dechargerSlotCount() + i; i < k; i++) { - if (mMetaTileEntity.mInventory[i] != null && mBaseMetaTileEntity.getStoredEU() < mBaseMetaTileEntity.getEUCapacity()) { - mBaseMetaTileEntity.increaseStoredEnergyUnits(GT_ModHandler.dischargeElectricItem(mMetaTileEntity.mInventory[i], GT_Utility.safeInt(Math.min(V[mTier] * 15, mBaseMetaTileEntity.getEUCapacity() - mBaseMetaTileEntity.getStoredEU())), (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getInputTier()), true, false, false), true); - if (mMetaTileEntity.mInventory[i].stackSize <= 0) - mMetaTileEntity.mInventory[i] = null; + // for (int t = 0; t < 6; t++) { + if (mMetaTileEntity.dechargerSlotCount() > 0 + && mBaseMetaTileEntity.getStoredEU() < mBaseMetaTileEntity.getEUCapacity()) { + for (int i = mMetaTileEntity.dechargerSlotStartIndex(), + k = mMetaTileEntity.dechargerSlotCount() + i; + i < k; + i++) { + if (mMetaTileEntity.mInventory[i] != null + && mBaseMetaTileEntity.getStoredEU() < mBaseMetaTileEntity.getEUCapacity()) { + mBaseMetaTileEntity.increaseStoredEnergyUnits( + GT_ModHandler.dischargeElectricItem( + mMetaTileEntity.mInventory[i], + GT_Utility.safeInt(Math.min( + V[mTier] * 15, + mBaseMetaTileEntity.getEUCapacity() + - mBaseMetaTileEntity.getStoredEU())), + (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getInputTier()), + true, + false, + false), + true); + if (mMetaTileEntity.mInventory[i].stackSize <= 0) mMetaTileEntity.mInventory[i] = null; } } } if (mMetaTileEntity.rechargerSlotCount() > 0 && mBaseMetaTileEntity.getStoredEU() > 0) { - for (int i = mMetaTileEntity.rechargerSlotStartIndex(), k = mMetaTileEntity.rechargerSlotCount() + i; i < k; i++) { + for (int i = mMetaTileEntity.rechargerSlotStartIndex(), + k = mMetaTileEntity.rechargerSlotCount() + i; + i < k; + i++) { if (mBaseMetaTileEntity.getStoredEU() > 0 && mMetaTileEntity.mInventory[i] != null) { - mBaseMetaTileEntity.decreaseStoredEU(GT_ModHandler.chargeElectricItem(mMetaTileEntity.mInventory[i], GT_Utility.safeInt(Math.min(V[mTier] * 15, mBaseMetaTileEntity.getStoredEU())), (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getOutputTier()), true, false), true); - if (mMetaTileEntity.mInventory[i].stackSize <= 0) - mMetaTileEntity.mInventory[i] = null; + mBaseMetaTileEntity.decreaseStoredEU( + GT_ModHandler.chargeElectricItem( + mMetaTileEntity.mInventory[i], + GT_Utility.safeInt( + Math.min(V[mTier] * 15, mBaseMetaTileEntity.getStoredEU())), + (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getOutputTier()), + true, + false), + true); + if (mMetaTileEntity.mInventory[i].stackSize <= 0) mMetaTileEntity.mInventory[i] = null; } } - //} + // } } } } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java index d249cae2a1..dc5c976eac 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java @@ -1,6 +1,5 @@ package gregtech.common.tileentities.machines.basic; - import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.gui.GT_Container_1by1; @@ -19,32 +18,63 @@ import net.minecraftforge.fluids.FluidStack; public class GT_MetaTileEntity_CuringOven extends GT_MetaTileEntity_BasicMachine { public GT_MetaTileEntity_CuringOven(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, "Heats tools for hardening", 1, 1, "E_Oven.png", "", TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE_ACTIVE")), TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE")), TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT_ACTIVE")), TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT")), TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_TOP_ACTIVE")), TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_TOP")), TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM_ACTIVE")), TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM"))); + super( + aID, + aName, + aNameRegional, + aTier, + 1, + "Heats tools for hardening", + 1, + 1, + "E_Oven.png", + "", + TextureFactory.of( + new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE_ACTIVE")), + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE")), + TextureFactory.of( + new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT_ACTIVE")), + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT")), + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_TOP_ACTIVE")), + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_TOP")), + TextureFactory.of( + new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM_ACTIVE")), + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM"))); } - public GT_MetaTileEntity_CuringOven(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + public GT_MetaTileEntity_CuringOven( + String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } - public GT_MetaTileEntity_CuringOven(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + public GT_MetaTileEntity_CuringOven( + String aName, + int aTier, + String[] aDescription, + ITexture[][][] aTextures, + String aGUIName, + String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_CuringOven(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); + return new GT_MetaTileEntity_CuringOven( + this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); } @Override - protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return (super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack)) && ItemList.Cell_Empty.isStackEqual(aStack); + protected boolean allowPutStackValidated( + IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return (super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack)) + && ItemList.Cell_Empty.isStackEqual(aStack); } @Override public boolean isFluidInputAllowed(FluidStack aFluid) { return false; } - + @Override public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_Container_1by1(aPlayerInventory, aBaseMetaTileEntity); @@ -59,30 +89,34 @@ public class GT_MetaTileEntity_CuringOven extends GT_MetaTileEntity_BasicMachine public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aBaseMetaTileEntity.isServerSide()) { for (ItemStack tStack : mInventory) - if (tStack!=null&&tStack.getItem() instanceof GT_MetaGenerated_Tool &&getBaseMetaTileEntity().getStoredEU()>0) { - getBaseMetaTileEntity().decreaseStoredEnergyUnits(24, true); + if (tStack != null + && tStack.getItem() instanceof GT_MetaGenerated_Tool + && getBaseMetaTileEntity().getStoredEU() > 0) { + getBaseMetaTileEntity().decreaseStoredEnergyUnits(24, true); NBTTagCompound aNBT = tStack.getTagCompound(); if (aNBT != null) { - int tHeat = 300; - long tWorldTime = getBaseMetaTileEntity().getWorld().getTotalWorldTime(); + int tHeat = 300; + long tWorldTime = getBaseMetaTileEntity().getWorld().getTotalWorldTime(); aNBT = aNBT.getCompoundTag("GT.ToolStats"); - if (aNBT != null&&aNBT.hasKey("Heat")) { - tHeat = aNBT.getInteger("Heat"); - if(aNBT.hasKey("HeatTime")){ - long tHeatTime = aNBT.getLong("HeatTime"); - if(tWorldTime>(tHeatTime+10)){ - tHeat = (int) (tHeat - ((tWorldTime-tHeatTime)/10)); - if(tHeat<300)tHeat=300; - } - } + if (aNBT != null && aNBT.hasKey("Heat")) { + tHeat = aNBT.getInteger("Heat"); + if (aNBT.hasKey("HeatTime")) { + long tHeatTime = aNBT.getLong("HeatTime"); + if (tWorldTime > (tHeatTime + 10)) { + tHeat = (int) (tHeat - ((tWorldTime - tHeatTime) / 10)); + if (tHeat < 300) tHeat = 300; + } + } } tHeat++; - if(aNBT!=null){ - aNBT.setInteger("Heat", tHeat); - aNBT.setLong("HeatTime", tWorldTime);} - if(tHeat>GT_MetaGenerated_Tool.getPrimaryMaterial(tStack).mMeltingPoint){mInventory[0]=null;} + if (aNBT != null) { + aNBT.setInteger("Heat", tHeat); + aNBT.setLong("HeatTime", tWorldTime); + } + if (tHeat > GT_MetaGenerated_Tool.getPrimaryMaterial(tStack).mMeltingPoint) { + mInventory[0] = null; + } } - } } } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java index 318acbea51..1f9b93a8d2 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java @@ -1,5 +1,8 @@ package gregtech.common.tileentities.machines.basic; +import static gregtech.api.enums.GT_Values.MOD_ID_RC; +import static gregtech.api.enums.Textures.BlockIcons.*; + import com.google.common.collect.ArrayListMultimap; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; @@ -22,19 +25,15 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gregtech.api.util.extensions.ArrayExt; import ic2.api.item.IC2Items; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; - import java.util.*; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; import java.util.stream.IntStream; - -import static gregtech.api.enums.GT_Values.MOD_ID_RC; -import static gregtech.api.enums.Textures.BlockIcons.*; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachine { @@ -45,7 +44,7 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi aNameRegional, aTier, 1, - new String[]{ + new String[] { "Disassembles Machines up to " + GT_Values.TIER_COLORS[aTier] + GT_Values.VOLTAGE_NAMES[aTier], "Can also disassemble most assembler recipes!" }, @@ -54,77 +53,103 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi "Disassembler.png", "", - //Textures + // Textures TextureFactory.of( TextureFactory.of(OVERLAY_SIDE_DISASSEMBLER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_SIDE_DISASSEMBLER_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_DISASSEMBLER_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_SIDE_DISASSEMBLER), - TextureFactory.builder().addIcon(OVERLAY_SIDE_DISASSEMBLER_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_DISASSEMBLER_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_FRONT_DISASSEMBLER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_DISASSEMBLER_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_DISASSEMBLER_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_FRONT_DISASSEMBLER), - TextureFactory.builder().addIcon(OVERLAY_FRONT_DISASSEMBLER_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_DISASSEMBLER_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_TOP_DISASSEMBLER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_TOP_DISASSEMBLER_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_DISASSEMBLER_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_TOP_DISASSEMBLER), - TextureFactory.builder().addIcon(OVERLAY_TOP_DISASSEMBLER_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_DISASSEMBLER_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_BOTTOM_DISASSEMBLER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_DISASSEMBLER_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_DISASSEMBLER_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_BOTTOM_DISASSEMBLER), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_DISASSEMBLER_GLOW).glow().build()) - ); + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_DISASSEMBLER_GLOW) + .glow() + .build())); } - public GT_MetaTileEntity_Disassembler(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + public GT_MetaTileEntity_Disassembler( + String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 9, aGUIName, aNEIName); } - public GT_MetaTileEntity_Disassembler(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + public GT_MetaTileEntity_Disassembler( + String aName, + int aTier, + String[] aDescription, + ITexture[][][] aTextures, + String aGUIName, + String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 9, aGUIName, aNEIName); } @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Disassembler(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); + return new GT_MetaTileEntity_Disassembler( + this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); } private static final ItemStack[][] alwaysReplace = { - { - //ItemStack to look for - new ItemStack(Blocks.trapped_chest, 1, OreDictionary.WILDCARD_VALUE) - }, - { - //ItemStack to replace - new ItemStack(Blocks.chest) - } + { + // ItemStack to look for + new ItemStack(Blocks.trapped_chest, 1, OreDictionary.WILDCARD_VALUE) + }, + { + // ItemStack to replace + new ItemStack(Blocks.chest) + } }; private static final Object[][] OreDictionaryOverride = { - { - //String to look for - "plankWood", - "stoneCobble", - "gemDiamond", - "logWood", - "stickWood", - "treeSapling" - }, - { - //ItemStack to replace - new ItemStack(Blocks.planks), - new ItemStack(Blocks.cobblestone), - new ItemStack(Items.diamond), - new ItemStack(Blocks.log), - new ItemStack(Items.stick), - new ItemStack(Blocks.sapling) - } + { + // String to look for + "plankWood", "stoneCobble", "gemDiamond", "logWood", "stickWood", "treeSapling" + }, + { + // ItemStack to replace + new ItemStack(Blocks.planks), + new ItemStack(Blocks.cobblestone), + new ItemStack(Items.diamond), + new ItemStack(Blocks.log), + new ItemStack(Items.stick), + new ItemStack(Blocks.sapling) + } }; public static ArrayListMultimap<GT_ItemStack, ItemStack> getOutputHardOverrides() { @@ -141,7 +166,7 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi static { outputHardOverrides = ArrayListMultimap.create(); - outputHardOverrides.put(new GT_ItemStack(new ItemStack(Blocks.torch,6)), new ItemStack(Items.stick)); + outputHardOverrides.put(new GT_ItemStack(new ItemStack(Blocks.torch, 6)), new ItemStack(Items.stick)); addBlacklist(ItemList.Casing_Coil_Superconductor.get(1L)); addBlacklist(Materials.Graphene.getDust(1)); addBlacklist(ItemList.Circuit_Parts_Vacuum_Tube.get(1L)); @@ -179,34 +204,24 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi return false; } - private boolean compareToUnpacker(ItemStack is){ - return null != GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes.findRecipe( - null, - true, - true, - Long.MAX_VALUE, - null, - is); + private boolean compareToUnpacker(ItemStack is) { + return null + != GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes.findRecipe(null, true, true, Long.MAX_VALUE, null, is); } @Override public int checkRecipe() { ItemStack is = getInputAt(0); - if (GT_Utility.isStackInvalid(is)) - return DID_NOT_FIND_RECIPE; + if (GT_Utility.isStackInvalid(is)) return DID_NOT_FIND_RECIPE; - if ( - is.getItem() instanceof GT_MetaGenerated_Tool + if (is.getItem() instanceof GT_MetaGenerated_Tool || isCircuit(is) || blackList.stream().anyMatch(t -> GT_Utility.areStacksEqual(t.toStack(), is, true)) - || compareToUnpacker(is) - ) - return DID_NOT_FIND_RECIPE; + || compareToUnpacker(is)) return DID_NOT_FIND_RECIPE; Integer handleHardOverride = handleHardOverride(is); - if (handleHardOverride != null) - return handleHardOverride; + if (handleHardOverride != null) return handleHardOverride; return process(); } @@ -230,24 +245,22 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi if (is.getItem() == comp.getItem()) { IMetaTileEntity iMetaTileEntity = GregTech_API.METATILEENTITIES[is.getItemDamage()]; - return iMetaTileEntity instanceof GT_MetaTileEntity_TieredMachineBlock && - ((GT_MetaTileEntity_TieredMachineBlock) iMetaTileEntity).mTier > this.mTier; + return iMetaTileEntity instanceof GT_MetaTileEntity_TieredMachineBlock + && ((GT_MetaTileEntity_TieredMachineBlock) iMetaTileEntity).mTier > this.mTier; } return false; } - private int process(){ + private int process() { int statusCode = onTheFlyGeneration(); - if (statusCode != DID_NOT_FIND_RECIPE) - return statusCode; + if (statusCode != DID_NOT_FIND_RECIPE) return statusCode; return checkRecipeMap(); } private int onTheFlyGeneration() { Collection<DissassembleReference> recipes = this.findRecipeFromMachine(); - if (recipes.isEmpty()) - return DID_NOT_FIND_RECIPE; + if (recipes.isEmpty()) return DID_NOT_FIND_RECIPE; DissassembleReference recipe = ensureDowncasting(recipes); @@ -264,16 +277,15 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi private void removeInvalidStacks(DissassembleReference recipe) { for (int i = 0; i < recipe.inputs.length; i++) - if (GT_Utility.isStackInvalid(recipe.inputs[i]) || recipe.inputs[i].stackSize < 1) - recipe.inputs[i] = null; + if (GT_Utility.isStackInvalid(recipe.inputs[i]) || recipe.inputs[i].stackSize < 1) recipe.inputs[i] = null; recipe.inputs = ArrayExt.withoutNulls(recipe.inputs, ItemStack[]::new); } private int checkRecipeMap() { - GT_Recipe gt_recipe = GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.findRecipe(this.getBaseMetaTileEntity(), true, this.maxEUInput(), null, this.getAllInputs()); - if (gt_recipe == null) - return DID_NOT_FIND_RECIPE; + GT_Recipe gt_recipe = GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.findRecipe( + this.getBaseMetaTileEntity(), true, this.maxEUInput(), null, this.getAllInputs()); + if (gt_recipe == null) return DID_NOT_FIND_RECIPE; if (gt_recipe.isRecipeInputEqual(false, null, this.getAllInputs())) { if (gt_recipe.mSpecialValue == -100) { // Bypass standard disassembler restrictions. @@ -292,52 +304,43 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; } - private boolean setOutputsAndTime(ItemStack[] inputs, int stackSize){ + private boolean setOutputsAndTime(ItemStack[] inputs, int stackSize) { ItemStack machineInput = this.getInputAt(0); - if (checkTier(machineInput)) - return false; + if (checkTier(machineInput)) return false; - if (machineInput.stackSize >= stackSize) - machineInput.stackSize -= stackSize; - else - return false; + if (machineInput.stackSize >= stackSize) machineInput.stackSize -= stackSize; + else return false; System.arraycopy(inputs, 0, this.mOutputItems, 0, inputs.length); - this.calculateOverclockedNess(30,600); + this.calculateOverclockedNess(30, 600); return true; } private static DissassembleReference ensureDowncasting(Collection<? extends DissassembleReference> recipes) { - ItemStack[] inputs = recipes.stream() - .findFirst() - .orElseThrow(NullPointerException::new) - .inputs; - int EUt = recipes.stream() - .findFirst() - .orElseThrow(NullPointerException::new) - .EUt; + ItemStack[] inputs = recipes.stream().findFirst().orElseThrow(NullPointerException::new).inputs; + int EUt = recipes.stream().findFirst().orElseThrow(NullPointerException::new).EUt; ItemStack[] output = new ItemStack[inputs.length]; List<GT_Recipe> recipesColl = null; if (recipes.size() > 1) - recipesColl = recipes.stream() - .skip(1) - .map(x -> x.recipe) - .collect(Collectors.toList()); + recipesColl = recipes.stream().skip(1).map(x -> x.recipe).collect(Collectors.toList()); handleRecipeTransformation(inputs, output, recipesColl); - return new DissassembleReference(recipes.stream().mapToInt(x -> x.stackSize).min().orElseThrow(NumberFormatException::new), output, null, EUt); + return new DissassembleReference( + recipes.stream().mapToInt(x -> x.stackSize).min().orElseThrow(NumberFormatException::new), + output, + null, + EUt); } - private static void handleRecipeTransformation(ItemStack[] inputs, ItemStack[] output, List<? extends GT_Recipe> recipesColl) { + private static void handleRecipeTransformation( + ItemStack[] inputs, ItemStack[] output, List<? extends GT_Recipe> recipesColl) { for (int i = 0, inputsLength = inputs.length; i < inputsLength; i++) { Set<ItemStack[]> inputsStacks = null; if (recipesColl != null) - inputsStacks = recipesColl.stream() - .map(x -> x.mInputs) - .collect(Collectors.toSet()); + inputsStacks = recipesColl.stream().map(x -> x.mInputs).collect(Collectors.toSet()); handleRecipeTransformationInternal(inputs, output, inputsStacks, i); } addOthersAndHandleAlwaysReplace(inputs, output); @@ -346,13 +349,15 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi /** * Public Interface for ReverseRecipes, do not call inside of this class. */ - public static void handleRecipeTransformation(ItemStack[] inputs, ItemStack[] output, Set<ItemStack[]> inputsStacks) { + public static void handleRecipeTransformation( + ItemStack[] inputs, ItemStack[] output, Set<ItemStack[]> inputsStacks) { for (int i = 0, inputsLength = inputs.length; i < inputsLength; i++) handleRecipeTransformationInternal(inputs, output, inputsStacks, i); addOthersAndHandleAlwaysReplace(inputs, output); } - private static void handleRecipeTransformationInternal(ItemStack[] inputs, ItemStack[] output, Set<ItemStack[]> inputsStacks, int i) { + private static void handleRecipeTransformationInternal( + ItemStack[] inputs, ItemStack[] output, Set<ItemStack[]> inputsStacks, int i) { ItemStack input = inputs[i]; ItemData data = GT_OreDictUnificator.getItemData(input); if (data == null || data.mMaterial == null || data.mMaterial.mMaterial == null || data.mPrefix == null) { @@ -362,17 +367,16 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi handleReplacement(inputsStacks, data, output, input, i); } - private static void addOthersAndHandleAlwaysReplace(ItemStack[] inputs, ItemStack[] output){ + private static void addOthersAndHandleAlwaysReplace(ItemStack[] inputs, ItemStack[] output) { for (int i = 0; i < inputs.length; i++) { - //Adds rest of Items - if (output[i] == null) - output[i] = inputs[i]; + // Adds rest of Items + if (output[i] == null) output[i] = inputs[i]; - //Math.min the recipe output if Items are the same + // Math.min the recipe output if Items are the same if (GT_Utility.areStacksEqual(output[i], inputs[i])) output[i].stackSize = Math.min(output[i].stackSize, inputs[i].stackSize); - //Handles replacement Overrides + // Handles replacement Overrides ItemStack[] itemStacks = alwaysReplace[0]; for (int j = 0; j < itemStacks.length; j++) { ItemStack x = itemStacks[j]; @@ -382,9 +386,9 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi } } - //Unification + // Unification output[i] = handleUnification(output[i]); - //Wildcard + // Wildcard output[i] = handleWildcard(output[i]); } } @@ -392,7 +396,7 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi private static ItemStack handleUnification(ItemStack stack) { for (int oreID : OreDictionary.getOreIDs(stack)) { for (int i = 0; i < OreDictionaryOverride[0].length; i++) - if (OreDictionary.getOreName(oreID).equals(OreDictionaryOverride[0][i])){ + if (OreDictionary.getOreName(oreID).equals(OreDictionaryOverride[0][i])) { ItemStack ret = ((ItemStack) OreDictionaryOverride[1][i]).copy(); ret.stackSize = stack.stackSize; return ret; @@ -402,20 +406,22 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi } private static ItemStack handleWildcard(ItemStack stack) { - if (stack.getItemDamage() == OreDictionary.WILDCARD_VALUE && !stack.getItem().isDamageable()) { + if (stack.getItemDamage() == OreDictionary.WILDCARD_VALUE + && !stack.getItem().isDamageable()) { stack.setItemDamage(0); } return stack; } - private static void handleReplacement(Set<ItemStack[]> inputsStacks, ItemData data, ItemStack[] output, ItemStack input, int i){ + private static void handleReplacement( + Set<ItemStack[]> inputsStacks, ItemData data, ItemStack[] output, ItemStack input, int i) { AtomicReference<Materials> toRpl = new AtomicReference<>(); Materials first = data.mMaterial.mMaterial; if (inputsStacks != null) { handleInputStacks(inputsStacks, toRpl, data, first, i); } if (toRpl.get() == null) { - //Remove Magnetic and Annealed Modifiers + // Remove Magnetic and Annealed Modifiers handleBetterMaterialsVersions(data, toRpl); } if (toRpl.get() != null) { @@ -427,27 +433,29 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi } } - private static void handleInputStacks(Set<ItemStack[]> inputsStacks, AtomicReference<? super Materials> toRpl, ItemData data, Materials first, int i){ + private static void handleInputStacks( + Set<ItemStack[]> inputsStacks, + AtomicReference<? super Materials> toRpl, + ItemData data, + Materials first, + int i) { final int finalIndex = i; inputsStacks.forEach(stackArray -> { ItemData dataAgainst = GT_OreDictUnificator.getItemData(stackArray[finalIndex]); - if ( - dataAgainst == null || - dataAgainst.mMaterial == null || - dataAgainst.mMaterial.mMaterial == null || - dataAgainst.mPrefix == null || - dataAgainst.mPrefix != data.mPrefix - ) { + if (dataAgainst == null + || dataAgainst.mMaterial == null + || dataAgainst.mMaterial.mMaterial == null + || dataAgainst.mPrefix == null + || dataAgainst.mPrefix != data.mPrefix) { return; } handleDifferentMaterialsOnRecipes(first, dataAgainst.mMaterial.mMaterial, toRpl); - handleAnyMaterials(first,toRpl); + handleAnyMaterials(first, toRpl); }); } - private static void handleAnyMaterials(Materials first, AtomicReference<? super Materials> toRpl){ - if (first.mOreReRegistrations.stream().anyMatch(y -> y.equals(Materials.AnyIron))) - toRpl.set(Materials.Iron); + private static void handleAnyMaterials(Materials first, AtomicReference<? super Materials> toRpl) { + if (first.mOreReRegistrations.stream().anyMatch(y -> y.equals(Materials.AnyIron))) toRpl.set(Materials.Iron); else if (first.mOreReRegistrations.stream().anyMatch(y -> y.equals(Materials.AnyCopper))) toRpl.set(Materials.Copper); else if (first.mOreReRegistrations.stream().anyMatch(y -> y.equals(Materials.AnyRubber))) @@ -458,35 +466,27 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi toRpl.set(Materials.Rubber); } - private static void handleDifferentMaterialsOnRecipes(Materials first, Materials second, AtomicReference<? super Materials> toRpl){ + private static void handleDifferentMaterialsOnRecipes( + Materials first, Materials second, AtomicReference<? super Materials> toRpl) { if (!first.equals(second)) - if (first.equals(Materials.Aluminium) && second.equals(Materials.Iron)) - toRpl.set(second); - else if (first.equals(Materials.Steel) && second.equals(Materials.Iron)) - toRpl.set(second); - else if (first.equals(Materials.WroughtIron) && second.equals(Materials.Iron)) - toRpl.set(second); + if (first.equals(Materials.Aluminium) && second.equals(Materials.Iron)) toRpl.set(second); + else if (first.equals(Materials.Steel) && second.equals(Materials.Iron)) toRpl.set(second); + else if (first.equals(Materials.WroughtIron) && second.equals(Materials.Iron)) toRpl.set(second); else if (first.equals(Materials.Aluminium) && second.equals(Materials.WroughtIron)) toRpl.set(Materials.Iron); - else if (first.equals(Materials.Aluminium) && second.equals(Materials.Steel)) - toRpl.set(second); + else if (first.equals(Materials.Aluminium) && second.equals(Materials.Steel)) toRpl.set(second); else if (first.equals(Materials.Polytetrafluoroethylene) && second.equals(Materials.Plastic)) toRpl.set(second); - else if (first.equals(Materials.Polybenzimidazole) && second.equals(Materials.Plastic)) - toRpl.set(second); - else if (first.equals(Materials.Polystyrene) && second.equals(Materials.Plastic)) - toRpl.set(second); - else if (first.equals(Materials.Silicone) && second.equals(Materials.Plastic)) - toRpl.set(second); - else if (first.equals(Materials.NetherQuartz) || first.equals(Materials.CertusQuartz) && second.equals(Materials.Quartzite)) - toRpl.set(second); - else if (first.equals(Materials.Plastic) && second.equals(Materials.Wood)) - toRpl.set(second); - else if (first.equals(Materials.Diamond) && second.equals(Materials.Glass)) - toRpl.set(second); + else if (first.equals(Materials.Polybenzimidazole) && second.equals(Materials.Plastic)) toRpl.set(second); + else if (first.equals(Materials.Polystyrene) && second.equals(Materials.Plastic)) toRpl.set(second); + else if (first.equals(Materials.Silicone) && second.equals(Materials.Plastic)) toRpl.set(second); + else if (first.equals(Materials.NetherQuartz) + || first.equals(Materials.CertusQuartz) && second.equals(Materials.Quartzite)) toRpl.set(second); + else if (first.equals(Materials.Plastic) && second.equals(Materials.Wood)) toRpl.set(second); + else if (first.equals(Materials.Diamond) && second.equals(Materials.Glass)) toRpl.set(second); } - private static void handleBetterMaterialsVersions(ItemData data, AtomicReference<? super Materials> toRpl){ + private static void handleBetterMaterialsVersions(ItemData data, AtomicReference<? super Materials> toRpl) { if (Materials.SteelMagnetic.equals(data.mMaterial.mMaterial)) { toRpl.set(Materials.Steel); } else if (Materials.IronMagnetic.equals(data.mMaterial.mMaterial)) { @@ -501,27 +501,18 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi } @SuppressWarnings("deprecation") - private static void handleCircuits(Materials first, ItemStack[] output, ItemStack input, int i){ - if (first.equals(Materials.Primitive)) - output[i] = ItemList.NandChip.get(input.stackSize); - else if (first.equals(Materials.Basic)) - output[i] = ItemList.Circuit_Microprocessor.get(input.stackSize); - else if (first.equals(Materials.Good)) - output[i] = ItemList.Circuit_Good.get(input.stackSize); - else if (first.equals(Materials.Advanced)) - output[i] = ItemList.Circuit_Advanced.get(input.stackSize); - else if (first.equals(Materials.Data)) - output[i] = ItemList.Circuit_Data.get(input.stackSize); - else if (first.equals(Materials.Master)) - output[i] = ItemList.Circuit_Master.get(input.stackSize); - else if (first.equals(Materials.Ultimate)) - output[i] = ItemList.Circuit_Quantummainframe.get(input.stackSize); + private static void handleCircuits(Materials first, ItemStack[] output, ItemStack input, int i) { + if (first.equals(Materials.Primitive)) output[i] = ItemList.NandChip.get(input.stackSize); + else if (first.equals(Materials.Basic)) output[i] = ItemList.Circuit_Microprocessor.get(input.stackSize); + else if (first.equals(Materials.Good)) output[i] = ItemList.Circuit_Good.get(input.stackSize); + else if (first.equals(Materials.Advanced)) output[i] = ItemList.Circuit_Advanced.get(input.stackSize); + else if (first.equals(Materials.Data)) output[i] = ItemList.Circuit_Data.get(input.stackSize); + else if (first.equals(Materials.Master)) output[i] = ItemList.Circuit_Master.get(input.stackSize); + else if (first.equals(Materials.Ultimate)) output[i] = ItemList.Circuit_Quantummainframe.get(input.stackSize); else if (first.equals(Materials.Superconductor)) output[i] = ItemList.Circuit_Crystalmainframe.get(input.stackSize); - else if (first.equals(Materials.Infinite)) - output[i] = ItemList.Circuit_Wetwaremainframe.get(input.stackSize); - else if (first.equals(Materials.Bio)) - output[i] = ItemList.Circuit_Biomainframe.get(input.stackSize); + else if (first.equals(Materials.Infinite)) output[i] = ItemList.Circuit_Wetwaremainframe.get(input.stackSize); + else if (first.equals(Materials.Bio)) output[i] = ItemList.Circuit_Biomainframe.get(input.stackSize); } static class DissassembleReference { @@ -551,47 +542,48 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi private Collection<DissassembleReference> findRecipeFromMachine() { ItemStack is = getInputAt(0); - if (GT_Utility.isStackInvalid(is)) - return Collections.emptySet(); + if (GT_Utility.isStackInvalid(is)) return Collections.emptySet(); AtomicInteger stacksize = new AtomicInteger(); - //Check Recipe Maps for creation of Item + // Check Recipe Maps for creation of Item List<DissassembleReference> possibleRecipes = GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.mRecipeList.stream() - .filter(x -> Arrays.stream(x.mOutputs) - .anyMatch(y -> - { - ItemStack out = is.copy(); - out.stackSize = y.stackSize; - boolean isDone = GT_Utility.areStacksEqual(y, out, true) && y.stackSize <= is.stackSize; - if (isDone) - stacksize.set(y.stackSize); - return isDone; - }) - ) + .filter(x -> Arrays.stream(x.mOutputs).anyMatch(y -> { + ItemStack out = is.copy(); + out.stackSize = y.stackSize; + boolean isDone = GT_Utility.areStacksEqual(y, out, true) && y.stackSize <= is.stackSize; + if (isDone) stacksize.set(y.stackSize); + return isDone; + })) .map(x -> new DissassembleReference(stacksize.get(), x.mInputs, x)) .collect(Collectors.toList()); - //Is there only one way to create it? - if (possibleRecipes.size() == 1) - return possibleRecipes; + // Is there only one way to create it? + if (possibleRecipes.size() == 1) return possibleRecipes; - //There are Multiple Ways -> Get recipe with cheapest inputs - //More Inputs should mean cheaper Materials - return possibleRecipes - .stream() + // There are Multiple Ways -> Get recipe with cheapest inputs + // More Inputs should mean cheaper Materials + return possibleRecipes.stream() .sorted(Comparator.comparingDouble(GT_MetaTileEntity_Disassembler::getCheaperInputs)) .collect(Collectors.toList()); } - private static double getCheaperInputs(GT_MetaTileEntity_Disassembler.DissassembleReference x){ - double fluidInputValueRaw = Arrays.stream(x.recipe.mFluidInputs).flatMapToInt(f -> IntStream.of(f.amount)).sum(); + private static double getCheaperInputs(GT_MetaTileEntity_Disassembler.DissassembleReference x) { + double fluidInputValueRaw = Arrays.stream(x.recipe.mFluidInputs) + .flatMapToInt(f -> IntStream.of(f.amount)) + .sum(); fluidInputValueRaw = fluidInputValueRaw > 0 ? fluidInputValueRaw : 144D; - double inputValue = Arrays.stream(x.inputs).flatMapToInt(f -> IntStream.of(f.stackSize)).sum() + - (fluidInputValueRaw / 144D); - double fluidOutputValueRaw = Arrays.stream(x.recipe.mFluidOutputs).flatMapToInt(f -> IntStream.of(f.amount)).sum(); + double inputValue = Arrays.stream(x.inputs) + .flatMapToInt(f -> IntStream.of(f.stackSize)) + .sum() + + (fluidInputValueRaw / 144D); + double fluidOutputValueRaw = Arrays.stream(x.recipe.mFluidOutputs) + .flatMapToInt(f -> IntStream.of(f.amount)) + .sum(); fluidOutputValueRaw = fluidOutputValueRaw > 0 ? fluidOutputValueRaw : 144D; - double outputValue = Arrays.stream(x.recipe.mOutputs).flatMapToInt(f -> IntStream.of(f.stackSize)).sum() + - (fluidOutputValueRaw / 144D); + double outputValue = Arrays.stream(x.recipe.mOutputs) + .flatMapToInt(f -> IntStream.of(f.stackSize)) + .sum() + + (fluidOutputValueRaw / 144D); return outputValue / inputValue; } @@ -600,7 +592,10 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi } @Override - protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) && aStack.getTagCompound() != null && aStack.getTagCompound().getCompoundTag("GT.CraftingComponents") != null; + protected boolean allowPutStackValidated( + IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) + && aStack.getTagCompound() != null + && aStack.getTagCompound().getCompoundTag("GT.CraftingComponents") != null; } } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java index faa1df8ebe..09ad7ddbf3 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java @@ -1,5 +1,9 @@ package gregtech.common.tileentities.machines.basic; +import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.util.GT_Utility.moveMultipleItemStacks; + import com.google.common.collect.ImmutableSet; import com.mojang.authlib.GameProfile; import cpw.mods.fml.relauncher.Side; @@ -22,6 +26,10 @@ import gregtech.api.util.GT_Utility; import gregtech.common.GT_Client; import gregtech.common.gui.GT_Container_IndustrialApiary; import gregtech.common.gui.GT_GUIContainer_IndustrialApiary; +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; +import java.util.*; import net.bdew.gendustry.api.ApiaryModifiers; import net.bdew.gendustry.api.items.IApiaryUpgrade; import net.minecraft.block.Block; @@ -36,22 +44,13 @@ import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; -import java.util.*; - -import static gregtech.api.enums.GT_Values.V; -import static gregtech.api.enums.Textures.BlockIcons.*; -import static gregtech.api.util.GT_Utility.moveMultipleItemStacks; - -public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicMachine implements IBeeHousing, IBeeHousingInventory, IErrorLogic, IBeeModifier, IBeeListener { +public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicMachine + implements IBeeHousing, IBeeHousingInventory, IErrorLogic, IBeeModifier, IBeeListener { public static final int baseEUtUsage = 37; static final int queen = 5; static final int drone = 6; - IBeeRoot beeRoot = (IBeeRoot) AlleleManager.alleleRegistry.getSpeciesRoot("rootBees"); public int mSpeed = 0; @@ -62,47 +61,90 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM private IEffectData[] effectData = new IEffectData[2]; public GT_MetaTileEntity_IndustrialApiary(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 4, new String[] { "BEES GOES BRRRR", EnumChatFormatting.GRAY + "Added by " + EnumChatFormatting.GOLD + "kuba6000" }, 6, 9, "IndustrialApiary.png", "", + super( + aID, + aName, + aNameRegional, + aTier, + 4, + new String[] { + "BEES GOES BRRRR", EnumChatFormatting.GRAY + "Added by " + EnumChatFormatting.GOLD + "kuba6000" + }, + 6, + 9, + "IndustrialApiary.png", + "", TextureFactory.of( TextureFactory.of(OVERLAY_SIDE_INDUSTRIAL_APIARY_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_SIDE_INDUSTRIAL_APIARY_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_INDUSTRIAL_APIARY_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_SIDE_INDUSTRIAL_APIARY), - TextureFactory.builder().addIcon(OVERLAY_SIDE_INDUSTRIAL_APIARY_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_INDUSTRIAL_APIARY_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_FRONT_INDUSTRIAL_APIARY_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_INDUSTRIAL_APIARY_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_INDUSTRIAL_APIARY_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_FRONT_INDUSTRIAL_APIARY), - TextureFactory.builder().addIcon(OVERLAY_FRONT_INDUSTRIAL_APIARY_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_INDUSTRIAL_APIARY_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_TOP_INDUSTRIAL_APIARY_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_TOP_INDUSTRIAL_APIARY_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_INDUSTRIAL_APIARY_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_TOP_INDUSTRIAL_APIARY), - TextureFactory.builder().addIcon(OVERLAY_TOP_INDUSTRIAL_APIARY_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_INDUSTRIAL_APIARY_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_BOTTOM_INDUSTRIAL_APIARY_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_INDUSTRIAL_APIARY_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_INDUSTRIAL_APIARY_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_BOTTOM_INDUSTRIAL_APIARY), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_INDUSTRIAL_APIARY_GLOW).glow().build())); + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_INDUSTRIAL_APIARY_GLOW) + .glow() + .build())); } - public GT_MetaTileEntity_IndustrialApiary(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + public GT_MetaTileEntity_IndustrialApiary( + String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { super(aName, aTier, 4, aDescription, aTextures, 6, 9, aGUIName, aNEIName); } - public GT_MetaTileEntity_IndustrialApiary(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + public GT_MetaTileEntity_IndustrialApiary( + String aName, + int aTier, + String[] aDescription, + ITexture[][][] aTextures, + String aGUIName, + String aNEIName) { super(aName, aTier, 4, aDescription, aTextures, 6, 9, aGUIName, aNEIName); } @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_IndustrialApiary(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); + return new GT_MetaTileEntity_IndustrialApiary( + this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); } - @Override public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_Container_IndustrialApiary(aPlayerInventory, aBaseMetaTileEntity); @@ -118,8 +160,7 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM super.saveNBTData(aNBT); aNBT.setInteger("mSpeed", mSpeed); aNBT.setBoolean("mLockedSpeed", mLockedSpeed); - if(usedQueen != null) - aNBT.setTag("usedQueen", usedQueen.writeToNBT(new NBTTagCompound())); + if (usedQueen != null) aNBT.setTag("usedQueen", usedQueen.writeToNBT(new NBTTagCompound())); aNBT.setBoolean("retrievingPollenInThisOperation", retrievingPollenInThisOperation); aNBT.setInteger("pollinationDelay", pollinationDelay); } @@ -129,9 +170,8 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM super.loadNBTData(aNBT); mSpeed = aNBT.getInteger("mSpeed"); mLockedSpeed = aNBT.getBoolean("mLockedSpeed"); - if(aNBT.hasKey("usedQueen")) - usedQueen = ItemStack.loadItemStackFromNBT(aNBT.getCompoundTag("usedQueen")); - retrievingPollenInThisOperation = aNBT.getBoolean("retrievingPollenInThisOperation"); + if (aNBT.hasKey("usedQueen")) usedQueen = ItemStack.loadItemStackFromNBT(aNBT.getCompoundTag("usedQueen")); + retrievingPollenInThisOperation = aNBT.getBoolean("retrievingPollenInThisOperation"); pollinationDelay = aNBT.getInteger("pollinationDelay"); } @@ -142,12 +182,11 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM @Override public int checkRecipe() { updateModifiers(); - if(canWork()) { + if (canWork()) { ItemStack queen = getQueen(); usedQueen = queen.copy(); - if(beeRoot.getType(queen) == EnumBeeType.QUEEN) - { + if (beeRoot.getType(queen) == EnumBeeType.QUEEN) { IBee bee = beeRoot.getMember(queen); usedQueenBee = bee; @@ -159,23 +198,27 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM mod *= beemodifier.getLifespanModifier(null, null, 1.f); int h = bee.getHealth(); mod = 1.f / mod; - float cycles = h/mod; - + float cycles = h / mod; // PRODUCTS HashMap<GT_Utility.ItemId, ItemStack> pollen = new HashMap<>(); - if(isRetrievingPollen && floweringMod > 0f) { - int icycles = (int)cycles + (getWorld().rand.nextFloat() < (cycles - (float)((int)cycles)) ? 1 : 0); - for(int z = 0; z < icycles; z++) { + if (isRetrievingPollen && floweringMod > 0f) { + int icycles = + (int) cycles + (getWorld().rand.nextFloat() < (cycles - (float) ((int) cycles)) ? 1 : 0); + for (int z = 0; z < icycles; z++) { IIndividual p = bee.retrievePollen(this); - if(p != null) - { - ItemStack s = p.getGenome().getSpeciesRoot().getMemberStack(p, EnumGermlingType.POLLEN.ordinal()); - if(s != null) { + if (p != null) { + ItemStack s = + p.getGenome().getSpeciesRoot().getMemberStack(p, EnumGermlingType.POLLEN.ordinal()); + if (s != null) { GT_Utility.ItemId id = GT_Utility.ItemId.createNoCopy(s); - pollen.computeIfAbsent(id, k -> { ItemStack ns = s.copy(); ns.stackSize = 0; return ns; }); + pollen.computeIfAbsent(id, k -> { + ItemStack ns = s.copy(); + ns.stackSize = 0; + return ns; + }); pollen.get(id).stackSize += s.stackSize; } } @@ -185,29 +228,45 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM retrievedpollen = null; retrievingPollenInThisOperation = isRetrievingPollen; - IBeeGenome genome = bee.getGenome(); + IBeeGenome genome = bee.getGenome(); IAlleleBeeSpecies primary = genome.getPrimary(); IAlleleBeeSpecies secondary = genome.getSecondary(); - float speed = genome.getSpeed() * getProductionModifier(null, 1f) * beemodifier.getProductionModifier(null, 1.f); + float speed = genome.getSpeed() + * getProductionModifier(null, 1f) + * beemodifier.getProductionModifier(null, 1.f); HashMap<GT_Utility.ItemId, Float> drops = new HashMap<>(); HashMap<GT_Utility.ItemId, ItemStack> dropstacks = new HashMap<>(); - for(Map.Entry<ItemStack, Float> entry : primary.getProductChances().entrySet()) { + for (Map.Entry<ItemStack, Float> entry : + primary.getProductChances().entrySet()) { GT_Utility.ItemId id = GT_Utility.ItemId.createNoCopy(entry.getKey()); - drops.merge(id, Math.min(1f, entry.getValue() * speed) * (float) entry.getKey().stackSize * cycles, Float::sum); + drops.merge( + id, + Math.min(1f, entry.getValue() * speed) * (float) entry.getKey().stackSize * cycles, + Float::sum); dropstacks.computeIfAbsent(id, k -> entry.getKey()); } - for(Map.Entry<ItemStack, Float> entry : secondary.getProductChances().entrySet()) { + for (Map.Entry<ItemStack, Float> entry : + secondary.getProductChances().entrySet()) { GT_Utility.ItemId id = GT_Utility.ItemId.createNoCopy(entry.getKey()); - drops.merge(id, Math.min(1f, (float) Math.round(entry.getValue() / 2.0F) * speed) * (float) entry.getKey().stackSize * cycles, Float::sum); + drops.merge( + id, + Math.min(1f, (float) Math.round(entry.getValue() / 2.0F) * speed) + * (float) entry.getKey().stackSize + * cycles, + Float::sum); dropstacks.computeIfAbsent(id, k -> entry.getKey()); } - if(primary.isJubilant(genome, this) && secondary.isJubilant(genome, this)) - for(Map.Entry<ItemStack, Float> entry : primary.getSpecialtyChances().entrySet()) { + if (primary.isJubilant(genome, this) && secondary.isJubilant(genome, this)) + for (Map.Entry<ItemStack, Float> entry : + primary.getSpecialtyChances().entrySet()) { GT_Utility.ItemId id = GT_Utility.ItemId.createNoCopy(entry.getKey()); - drops.merge(id, Math.min(1f, entry.getValue() * speed) * (float) entry.getKey().stackSize * cycles, Float::sum); + drops.merge( + id, + Math.min(1f, entry.getValue() * speed) * (float) entry.getKey().stackSize * cycles, + Float::sum); dropstacks.computeIfAbsent(id, k -> entry.getKey()); } @@ -216,28 +275,27 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM IApiaristTracker breedingTracker = beeRoot.getBreedingTracker(getWorld(), getOwner()); - if(!bee.canSpawn()) { + if (!bee.canSpawn()) { ItemStack convert = new ItemStack(PluginApiculture.items.beePrincessGE); NBTTagCompound nbttagcompound = new NBTTagCompound(); queen.writeToNBT(nbttagcompound); convert.setTagCompound(nbttagcompound); this.mOutputItems[i++] = convert; - } - else { + } else { IBee b = bee.spawnPrincess(this); - if(b != null){ + if (b != null) { ItemStack princess = beeRoot.getMemberStack(b, EnumBeeType.PRINCESS.ordinal()); breedingTracker.registerPrincess(b); this.mOutputItems[i++] = princess; } IBee[] d = bee.spawnDrones(this); - if(d != null && d.length > 0) { + if (d != null && d.length > 0) { HashMap<GT_Utility.ItemId, ItemStack> drones = new HashMap<>(d.length); - for(IBee dr : d) { + for (IBee dr : d) { ItemStack drone = beeRoot.getMemberStack(dr, EnumBeeType.DRONE.ordinal()); breedingTracker.registerDrone(dr); GT_Utility.ItemId drid = GT_Utility.ItemId.createNoCopy(drone); - if(drones.containsKey(drid)) drones.get(drid).stackSize += drone.stackSize; + if (drones.containsKey(drid)) drones.get(drid).stackSize += drone.stackSize; else { this.mOutputItems[i++] = drone; drones.put(drid, drone); @@ -250,50 +308,45 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM setQueen(null); - for(Map.Entry<GT_Utility.ItemId, Float> entry : drops.entrySet()) - { + for (Map.Entry<GT_Utility.ItemId, Float> entry : drops.entrySet()) { ItemStack s = dropstacks.get(entry.getKey()).copy(); - s.stackSize = entry.getValue().intValue() + (getWorld().rand.nextFloat() < (entry.getValue() - (float) entry.getValue().intValue()) ? 1 : 0); - if(s.stackSize > 0 && i < imax) - while(true) { + s.stackSize = entry.getValue().intValue() + + (getWorld().rand.nextFloat() + < (entry.getValue() + - (float) entry.getValue().intValue()) + ? 1 + : 0); + if (s.stackSize > 0 && i < imax) + while (true) { if (s.stackSize <= s.getMaxStackSize()) { this.mOutputItems[i++] = s; break; - } else - this.mOutputItems[i++] = s.splitStack(s.getMaxStackSize()); - if(i >= imax) - break; + } else this.mOutputItems[i++] = s.splitStack(s.getMaxStackSize()); + if (i >= imax) break; } } - for(ItemStack s : pollen.values()) - if(i < imax) - this.mOutputItems[i++] = s; - else - break; + for (ItemStack s : pollen.values()) + if (i < imax) this.mOutputItems[i++] = s; + else break; // Overclock - - this.mMaxProgresstime = (int)(cycles * 550.f); + this.mMaxProgresstime = (int) (cycles * 550.f); int timemaxdivider = this.mMaxProgresstime / 100; int useddivider = 1 << this.mSpeed; int actualdivider = useddivider; this.mMaxProgresstime /= Math.min(actualdivider, timemaxdivider); actualdivider /= Math.min(actualdivider, timemaxdivider); - for(i--; i >= imin; i--) - this.mOutputItems[i].stackSize *= actualdivider; + for (i--; i >= imin; i--) this.mOutputItems[i].stackSize *= actualdivider; - pollinationDelay = Math.max((int)(this.mMaxProgresstime / cycles), 20); // don't run too often + pollinationDelay = Math.max((int) (this.mMaxProgresstime / cycles), 20); // don't run too often this.mProgresstime = 0; - this.mEUt = (int)((float)baseEUtUsage * this.energyMod * useddivider); - if(useddivider == 2) - this.mEUt += 32; - else if(useddivider > 2) - this.mEUt += (32 * (useddivider << (this.mSpeed - 2))); - } - else { + this.mEUt = (int) ((float) baseEUtUsage * this.energyMod * useddivider); + if (useddivider == 2) this.mEUt += 32; + else if (useddivider > 2) this.mEUt += (32 * (useddivider << (this.mSpeed - 2))); + } else { // Breeding time retrievingPollenInThisOperation = true; // Don't pollinate when breeding @@ -302,11 +355,9 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM this.mProgresstime = 0; int useddivider = Math.min(100, 1 << this.mSpeed); this.mMaxProgresstime /= useddivider; - this.mEUt = (int)((float)baseEUtUsage * this.energyMod * useddivider); - if(useddivider == 2) - this.mEUt += 32; - else if(useddivider > 2) - this.mEUt += (32 * (useddivider << (this.mSpeed - 2))); + this.mEUt = (int) ((float) baseEUtUsage * this.energyMod * useddivider); + if (useddivider == 2) this.mEUt += 32; + else if (useddivider > 2) this.mEUt += (32 * (useddivider << (this.mSpeed - 2))); IBee princess = beeRoot.getMember(getQueen()); usedQueenBee = princess; @@ -320,12 +371,9 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM setQueen(null); getDrone().stackSize -= 1; - if(getDrone().stackSize == 0) - setDrone(null); - + if (getDrone().stackSize == 0) setDrone(null); } - return FOUND_AND_SUCCESSFULLY_USED_RECIPE; } @@ -345,15 +393,15 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aBaseMetaTileEntity.isClientSide()) { - if(GT_Client.changeDetected == 4) { + if (GT_Client.changeDetected == 4) { /* Client tick counter that is set to 5 on hiding pipes and covers. * It triggers a texture update next client tick when reaching 4, with provision for 3 more update tasks, * spreading client change detection related work and network traffic on different ticks, until it reaches 0. */ aBaseMetaTileEntity.issueTextureUpdate(); } - if(aBaseMetaTileEntity.isActive()){ - if(usedQueen != null) { + if (aBaseMetaTileEntity.isActive()) { + if (usedQueen != null) { if (aTick % 2 == 0) { // FX on client, effect on server IBee bee = beeRoot.getMember(usedQueen); @@ -362,98 +410,84 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM } } } - if(aBaseMetaTileEntity.isServerSide()){ + if (aBaseMetaTileEntity.isServerSide()) { mCharge = aBaseMetaTileEntity.getStoredEU() / 2 > aBaseMetaTileEntity.getEUCapacity() / 3; mDecharge = aBaseMetaTileEntity.getStoredEU() < aBaseMetaTileEntity.getEUCapacity() / 3; doDisplayThings(); - if(!aBaseMetaTileEntity.isActive()) - { - if(aBaseMetaTileEntity.isAllowedToWork() && (aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) && hasEnoughEnergyToCheckRecipe()) - { + if (!aBaseMetaTileEntity.isActive()) { + if (aBaseMetaTileEntity.isAllowedToWork() + && (aBaseMetaTileEntity.hasInventoryBeenModified() + || aTick % 600 == 0 + || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) + && hasEnoughEnergyToCheckRecipe()) { int check = checkRecipe(); - if(check == FOUND_AND_SUCCESSFULLY_USED_RECIPE) { + if (check == FOUND_AND_SUCCESSFULLY_USED_RECIPE) { aBaseMetaTileEntity.setActive(true); } } - } - else{ + } else { - if(this.mProgresstime < 0) - { + if (this.mProgresstime < 0) { this.mProgresstime++; return; } - if(this.mStuttering) - { - if(!aBaseMetaTileEntity.isAllowedToWork()) - return; - if(aTick % 100 == 0) - this.mStuttering = false; + if (this.mStuttering) { + if (!aBaseMetaTileEntity.isAllowedToWork()) return; + if (aTick % 100 == 0) this.mStuttering = false; return; } - if(this.hasErrors()) - { - if(!aBaseMetaTileEntity.isAllowedToWork()) - return; - if(aTick % 100 == 0) - if(!canWork(usedQueen)) - this.stutterProcess(); + if (this.hasErrors()) { + if (!aBaseMetaTileEntity.isAllowedToWork()) return; + if (aTick % 100 == 0) if (!canWork(usedQueen)) this.stutterProcess(); return; } - if(!drainEnergyForProcess(this.mEUt)) - { + if (!drainEnergyForProcess(this.mEUt)) { this.mStuttering = true; this.stutterProcess(); return; } this.mProgresstime++; - if(usedQueen != null) { - if(usedQueenBee == null) - usedQueenBee = beeRoot.getMember(usedQueen); + if (usedQueen != null) { + if (usedQueenBee == null) usedQueenBee = beeRoot.getMember(usedQueen); effectData = usedQueenBee.doEffect(effectData, this); - if(!retrievingPollenInThisOperation && floweringMod > 0f && this.mProgresstime % pollinationDelay == 0) - { - if(retrievedpollen == null) - retrievedpollen = usedQueenBee.retrievePollen(this); - if(retrievedpollen != null && (usedQueenBee.pollinateRandom(this, retrievedpollen) || this.mProgresstime % (pollinationDelay * 5) == 0)) - retrievedpollen = null; + if (!retrievingPollenInThisOperation + && floweringMod > 0f + && this.mProgresstime % pollinationDelay == 0) { + if (retrievedpollen == null) retrievedpollen = usedQueenBee.retrievePollen(this); + if (retrievedpollen != null + && (usedQueenBee.pollinateRandom(this, retrievedpollen) + || this.mProgresstime % (pollinationDelay * 5) == 0)) retrievedpollen = null; } } - if(this.mProgresstime % 100 == 0) - { - if(!canWork(usedQueen)) - { + if (this.mProgresstime % 100 == 0) { + if (!canWork(usedQueen)) { this.stutterProcess(); return; } } - if(this.mProgresstime >= this.mMaxProgresstime) - { + if (this.mProgresstime >= this.mMaxProgresstime) { updateModifiers(); for (int i = 0; i < mOutputItems.length; i++) - if(mOutputItems[i] != null) + if (mOutputItems[i] != null) for (int j = 0; j < mOutputItems.length; j++) { - if(j == 0 && isAutomated) - { - if(beeRoot.isMember(mOutputItems[i], EnumBeeType.QUEEN.ordinal()) || beeRoot.isMember(mOutputItems[i], EnumBeeType.PRINCESS.ordinal())) { - if(aBaseMetaTileEntity.addStackToSlot(queen, mOutputItems[i])) - break; - } - else if(beeRoot.isMember(mOutputItems[i], EnumBeeType.DRONE.ordinal())) - if(aBaseMetaTileEntity.addStackToSlot(drone, mOutputItems[i])) - break; - } - else if(i == 0 && j == 0 && beeRoot.isMember(mOutputItems[0], EnumBeeType.QUEEN.ordinal())) - if(aBaseMetaTileEntity.addStackToSlot(queen, mOutputItems[0])) - break; - if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot() + ((j + i) % mOutputItems.length), mOutputItems[i])) - break; + if (j == 0 && isAutomated) { + if (beeRoot.isMember(mOutputItems[i], EnumBeeType.QUEEN.ordinal()) + || beeRoot.isMember(mOutputItems[i], EnumBeeType.PRINCESS.ordinal())) { + if (aBaseMetaTileEntity.addStackToSlot(queen, mOutputItems[i])) break; + } else if (beeRoot.isMember(mOutputItems[i], EnumBeeType.DRONE.ordinal())) + if (aBaseMetaTileEntity.addStackToSlot(drone, mOutputItems[i])) break; + } else if (i == 0 + && j == 0 + && beeRoot.isMember(mOutputItems[0], EnumBeeType.QUEEN.ordinal())) + if (aBaseMetaTileEntity.addStackToSlot(queen, mOutputItems[0])) break; + if (aBaseMetaTileEntity.addStackToSlot( + getOutputSlot() + ((j + i) % mOutputItems.length), mOutputItems[i])) break; } Arrays.fill(mOutputItems, null); mEUt = 0; @@ -463,25 +497,38 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM aBaseMetaTileEntity.setActive(false); if (doesAutoOutput() && !isOutputEmpty() && aBaseMetaTileEntity.getFrontFacing() != mMainFacing) { - TileEntity tTileEntity2 = aBaseMetaTileEntity.getTileEntityAtSide(aBaseMetaTileEntity.getFrontFacing()); + TileEntity tTileEntity2 = + aBaseMetaTileEntity.getTileEntityAtSide(aBaseMetaTileEntity.getFrontFacing()); long tStoredEnergy = aBaseMetaTileEntity.getUniversalEnergyStored(); - int tMaxStacks = (int)(tStoredEnergy/64L); - if (tMaxStacks > mOutputItems.length) - tMaxStacks = mOutputItems.length; - - moveMultipleItemStacks(aBaseMetaTileEntity, tTileEntity2, aBaseMetaTileEntity.getFrontFacing(), aBaseMetaTileEntity.getBackFacing(), null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1,tMaxStacks); + int tMaxStacks = (int) (tStoredEnergy / 64L); + if (tMaxStacks > mOutputItems.length) tMaxStacks = mOutputItems.length; + + moveMultipleItemStacks( + aBaseMetaTileEntity, + tTileEntity2, + aBaseMetaTileEntity.getFrontFacing(), + aBaseMetaTileEntity.getBackFacing(), + null, + false, + (byte) 64, + (byte) 1, + (byte) 64, + (byte) 1, + tMaxStacks); } - if(aBaseMetaTileEntity.isAllowedToWork() && checkRecipe() == FOUND_AND_SUCCESSFULLY_USED_RECIPE) + if (aBaseMetaTileEntity.isAllowedToWork() && checkRecipe() == FOUND_AND_SUCCESSFULLY_USED_RECIPE) aBaseMetaTileEntity.setActive(true); } } } } - public void cancelProcess(){ - if(this.getBaseMetaTileEntity().isActive() && this.getBaseMetaTileEntity().isServerSide() && usedQueen != null && beeRoot.isMember(usedQueen, EnumBeeType.QUEEN.ordinal())) - { + public void cancelProcess() { + if (this.getBaseMetaTileEntity().isActive() + && this.getBaseMetaTileEntity().isServerSide() + && usedQueen != null + && beeRoot.isMember(usedQueen, EnumBeeType.QUEEN.ordinal())) { Arrays.fill(mOutputItems, null); mEUt = 0; mProgresstime = 0; @@ -495,59 +542,46 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM @Override public boolean isItemValidForSlot(int aIndex, ItemStack aStack) { - if(aStack == null) return false; - if(aIndex < getInputSlot()) - return true; - if(aIndex == queen) return beeRoot.isMember(aStack, EnumBeeType.QUEEN.ordinal()) || beeRoot.isMember(aStack, EnumBeeType.PRINCESS.ordinal()); - else if(aIndex == drone) return beeRoot.isMember(aStack, EnumBeeType.DRONE.ordinal()); - else if(aIndex < getOutputSlot()) { - if(!(aStack.getItem() instanceof IApiaryUpgrade) && !GT_ApiaryUpgrade.isUpgrade(aStack)) - return false; - for(int i = drone+1; i < drone+1+4; i++) - { - if(aIndex == i) - continue; + if (aStack == null) return false; + if (aIndex < getInputSlot()) return true; + if (aIndex == queen) + return beeRoot.isMember(aStack, EnumBeeType.QUEEN.ordinal()) + || beeRoot.isMember(aStack, EnumBeeType.PRINCESS.ordinal()); + else if (aIndex == drone) return beeRoot.isMember(aStack, EnumBeeType.DRONE.ordinal()); + else if (aIndex < getOutputSlot()) { + if (!(aStack.getItem() instanceof IApiaryUpgrade) && !GT_ApiaryUpgrade.isUpgrade(aStack)) return false; + for (int i = drone + 1; i < drone + 1 + 4; i++) { + if (aIndex == i) continue; ItemStack s = getStackInSlot(i); - if(s == null) - continue; - if(GT_Utility.areStacksEqual(getStackInSlot(i), aStack)) - return false; - if(GT_ApiaryUpgrade.isUpgrade(aStack)) - { - if(!GT_ApiaryUpgrade.getUpgrade(aStack).isAllowedToWorkWith(getStackInSlot(i))) - return false; - } - else if(GT_ApiaryUpgrade.isUpgrade(s)) - { - if(!GT_ApiaryUpgrade.getUpgrade(s).isAllowedToWorkWith(aStack)) - return false; + if (s == null) continue; + if (GT_Utility.areStacksEqual(getStackInSlot(i), aStack)) return false; + if (GT_ApiaryUpgrade.isUpgrade(aStack)) { + if (!GT_ApiaryUpgrade.getUpgrade(aStack).isAllowedToWorkWith(getStackInSlot(i))) return false; + } else if (GT_ApiaryUpgrade.isUpgrade(s)) { + if (!GT_ApiaryUpgrade.getUpgrade(s).isAllowedToWorkWith(aStack)) return false; } } return true; - } - else return false; - + } else return false; } @Override public void setInventorySlotContents(int aIndex, ItemStack aStack) { - if(aIndex == queen && aStack != null && getBaseMetaTileEntity().isClientSide()) - usedQueen = aStack.copy(); + if (aIndex == queen && aStack != null && getBaseMetaTileEntity().isClientSide()) usedQueen = aStack.copy(); super.setInventorySlotContents(aIndex, aStack); } // Gets called on slot click // - public void onInventoryUpdate(int aIndex){ - if(aIndex > drone && aIndex < getOutputSlot()) - updateModifiers(); + public void onInventoryUpdate(int aIndex) { + if (aIndex > drone && aIndex < getOutputSlot()) updateModifiers(); } @SideOnly(Side.CLIENT) - public ItemStack getUsedQueen(){ + public ItemStack getUsedQueen() { return usedQueen; } - //region IBeeHousing + // region IBeeHousing @Override public Iterable<IBeeModifier> getBeeModifiers() { @@ -576,7 +610,7 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM @Override public boolean canBlockSeeTheSky() { - return this.getBaseMetaTileEntity().getSkyAtSide((byte)1); + return this.getBaseMetaTileEntity().getSkyAtSide((byte) 1); } @Override @@ -588,29 +622,31 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM @Override public GameProfile getOwner() { - if(owner == null) - owner = new GameProfile(this.getBaseMetaTileEntity().getOwnerUuid(), this.getBaseMetaTileEntity().getOwnerName()); + if (owner == null) + owner = new GameProfile( + this.getBaseMetaTileEntity().getOwnerUuid(), + this.getBaseMetaTileEntity().getOwnerName()); return owner; } @Override public Vec3 getBeeFXCoordinates() { - return Vec3.createVectorHelper(getBaseMetaTileEntity().getXCoord() + 0.5, getBaseMetaTileEntity().getYCoord() + 0.5, getBaseMetaTileEntity().getZCoord() + 0.5); + return Vec3.createVectorHelper( + getBaseMetaTileEntity().getXCoord() + 0.5, + getBaseMetaTileEntity().getYCoord() + 0.5, + getBaseMetaTileEntity().getZCoord() + 0.5); } @Override public BiomeGenBase getBiome() { - if(biomeOverride == null) - return this.getBaseMetaTileEntity().getBiome(); + if (biomeOverride == null) return this.getBaseMetaTileEntity().getBiome(); return biomeOverride; } @Override public EnumTemperature getTemperature() { - if(BiomeHelper.isBiomeHellish(getBiome())) - return EnumTemperature.HELLISH; - return - EnumTemperature.getFromValue(getBiome().temperature + temperatureMod); + if (BiomeHelper.isBiomeHellish(getBiome())) return EnumTemperature.HELLISH; + return EnumTemperature.getFromValue(getBiome().temperature + temperatureMod); } @Override @@ -628,9 +664,9 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM return this.getBaseMetaTileEntity().getCoords(); } - //endregion + // endregion -//region IBeeHousingInventory + // region IBeeHousingInventory @Override public ItemStack getQueen() { return getStackInSlot(queen); @@ -655,18 +691,16 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM public boolean addProduct(ItemStack itemStack, boolean b) { throw new RuntimeException("Should not happen :F"); } -//endregion + // endregion -//region IErrorLogic + // region IErrorLogic public HashSet<IErrorState> mErrorStates = new HashSet<>(); @Override public boolean setCondition(boolean b, IErrorState iErrorState) { - if(b) - mErrorStates.add(iErrorState); - else - mErrorStates.remove(iErrorState); + if (b) mErrorStates.add(iErrorState); + else mErrorStates.remove(iErrorState); return b; } @@ -688,13 +722,12 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM @Override public void writeData(DataOutputStream dataOutputStream) throws IOException { dataOutputStream.write(mErrorStates.size()); - for(IErrorState s : mErrorStates) - dataOutputStream.writeUTF(s.getUniqueName()); + for (IErrorState s : mErrorStates) dataOutputStream.writeUTF(s.getUniqueName()); } @Override public void readData(DataInputStream dataInputStream) throws IOException { - for(int i = dataInputStream.readInt(); i > 0; i--) + for (int i = dataInputStream.readInt(); i > 0; i--) mErrorStates.add(ForestryAPI.errorStateRegistry.getErrorState(dataInputStream.readUTF())); } @@ -708,26 +741,25 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM private Block flowerBlock; private int flowerBlockMeta; - - private boolean checkFlower(IBee bee){ + private boolean checkFlower(IBee bee) { String flowerType = bee.getGenome().getFlowerProvider().getFlowerType(); - if(!this.flowerType.equals(flowerType)) - flowercoords = null; - if(flowercoords != null) { - if( getWorld().getBlock(flowercoords.posX, flowercoords.posY, flowercoords.posZ) != flowerBlock - || getWorld().getBlockMetadata(flowercoords.posX, flowercoords.posY, flowercoords.posZ) != flowerBlockMeta) - if (!FlowerManager.flowerRegistry.isAcceptedFlower(flowerType, getWorld(), flowercoords.posX, flowercoords.posY, flowercoords.posZ)) + if (!this.flowerType.equals(flowerType)) flowercoords = null; + if (flowercoords != null) { + if (getWorld().getBlock(flowercoords.posX, flowercoords.posY, flowercoords.posZ) != flowerBlock + || getWorld().getBlockMetadata(flowercoords.posX, flowercoords.posY, flowercoords.posZ) + != flowerBlockMeta) + if (!FlowerManager.flowerRegistry.isAcceptedFlower( + flowerType, getWorld(), flowercoords.posX, flowercoords.posY, flowercoords.posZ)) flowercoords = null; - else - { + else { flowerBlock = getWorld().getBlock(flowercoords.posX, flowercoords.posY, flowercoords.posZ); - flowerBlockMeta = getWorld().getBlockMetadata(flowercoords.posX, flowercoords.posY, flowercoords.posZ); + flowerBlockMeta = + getWorld().getBlockMetadata(flowercoords.posX, flowercoords.posY, flowercoords.posZ); } } - if(flowercoords == null) { + if (flowercoords == null) { flowercoords = FlowerManager.flowerRegistry.getAcceptedFlowerCoordinates(this, bee, flowerType); - if(flowercoords != null) - { + if (flowercoords != null) { flowerBlock = getWorld().getBlock(flowercoords.posX, flowercoords.posY, flowercoords.posZ); flowerBlockMeta = getWorld().getBlockMetadata(flowercoords.posX, flowercoords.posY, flowercoords.posZ); this.flowerType = flowerType; @@ -736,46 +768,37 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM return flowercoords != null; } - private boolean canWork(ItemStack queen){ + private boolean canWork(ItemStack queen) { clearErrors(); - if(queen == null) - return true; // Reloaded the chunk ? - if(beeRoot.isMember(queen, EnumBeeType.PRINCESS.ordinal())) - return true; + if (queen == null) return true; // Reloaded the chunk ? + if (beeRoot.isMember(queen, EnumBeeType.PRINCESS.ordinal())) return true; IBee bee = beeRoot.getMember(queen); - for(IErrorState err : bee.getCanWork(this)) - setCondition(true, err); + for (IErrorState err : bee.getCanWork(this)) setCondition(true, err); setCondition(!checkFlower(bee), EnumErrorCode.NO_FLOWER); return !hasErrors(); } - private boolean canWork(){ + private boolean canWork() { clearErrors(); EnumBeeType beeType = beeRoot.getType(getQueen()); - if(beeType == EnumBeeType.PRINCESS) - { + if (beeType == EnumBeeType.PRINCESS) { setCondition(!beeRoot.isDrone(getDrone()), EnumErrorCode.NO_DRONE); return !hasErrors(); } - if(beeType == EnumBeeType.QUEEN) - { + if (beeType == EnumBeeType.QUEEN) { IBee bee = beeRoot.getMember(getQueen()); - for(IErrorState err : bee.getCanWork(this)) - setCondition(true, err); + for (IErrorState err : bee.getCanWork(this)) setCondition(true, err); setCondition(!checkFlower(bee), EnumErrorCode.NO_FLOWER); return !hasErrors(); - } - else - { + } else { setCondition(true, EnumErrorCode.NO_QUEEN); return false; } } + // endregion -//endregion - - //region IBeeModifier + // region IBeeModifier private float terrorityMod = 1f; private float mutationMod = 1f; @@ -795,31 +818,24 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM private int maxspeed = 0; - public void updateModifiers(){ + public void updateModifiers() { maxspeed = 0; ApiaryModifiers mods = new ApiaryModifiers(); - for(int i = 2; i < 2+4; i++) - { + for (int i = 2; i < 2 + 4; i++) { ItemStack s = getInputAt(i); - if(s == null) - continue; - if(s.getItem() instanceof IApiaryUpgrade) { + if (s == null) continue; + if (s.getItem() instanceof IApiaryUpgrade) { IApiaryUpgrade up = (IApiaryUpgrade) s.getItem(); up.applyModifiers(mods, s); - } - else if(GT_ApiaryUpgrade.isUpgrade(s)) - { + } else if (GT_ApiaryUpgrade.isUpgrade(s)) { GT_ApiaryUpgrade upgrade = GT_ApiaryUpgrade.getUpgrade(s); - if(upgrade != null) - { + if (upgrade != null) { maxspeed = upgrade.applyMaxSpeedModifier(maxspeed); upgrade.applyModifiers(mods, s); } } } - - terrorityMod = mods.territory; mutationMod = mods.mutation; lifespanMod = mods.lifespan; @@ -836,10 +852,8 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM isAutomated = mods.isAutomated; isRetrievingPollen = mods.isCollectingPollen; - if(mLockedSpeed) - mSpeed = maxspeed; - else - mSpeed = Math.min(mSpeed, maxspeed); + if (mLockedSpeed) mSpeed = maxspeed; + else mSpeed = Math.min(mSpeed, maxspeed); } @Override @@ -891,37 +905,31 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM return sunlightSimulatedMod; } - @Override public boolean isHellish() { return getBiome() == BiomeGenBase.hell; } - public int getMaxSpeed(){ + public int getMaxSpeed() { return maxspeed; } - //endregion + // endregion - //region IBeeListener + // region IBeeListener @Override - public void wearOutEquipment(int i) { - - } + public void wearOutEquipment(int i) {} @Override - public void onQueenDeath() { - - } + public void onQueenDeath() {} @Override public boolean onPollenRetrieved(IIndividual iIndividual) { return false; } - - //endregion + // endregion static final IBeekeepingLogic dummylogic = new IBeekeepingLogic() { @Override @@ -930,19 +938,13 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM } @Override - public void doWork() { - - } + public void doWork() {} @Override - public void syncToClient() { - - } + public void syncToClient() {} @Override - public void syncToClient(EntityPlayerMP entityPlayerMP) { - - } + public void syncToClient(EntityPlayerMP entityPlayerMP) {} @Override public int getBeeProgressPercent() { @@ -955,20 +957,12 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM } @Override - public void doBeeFX() { - - } + public void doBeeFX() {} @Override - public void readFromNBT(NBTTagCompound nbtTagCompound) { - - } + public void readFromNBT(NBTTagCompound nbtTagCompound) {} @Override - public void writeToNBT(NBTTagCompound nbtTagCompound) { - - } + public void writeToNBT(NBTTagCompound nbtTagCompound) {} }; - - } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java index 5de1537d9e..b68d3bc436 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java @@ -1,5 +1,8 @@ package gregtech.common.tileentities.machines.basic; +import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.Textures.BlockIcons.*; + import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; @@ -14,12 +17,8 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gregtech.common.power.BasicMachineEUPower; import gregtech.common.power.Power; -import net.minecraftforge.fluids.FluidStack; - import java.util.Arrays; - -import static gregtech.api.enums.GT_Values.V; -import static gregtech.api.enums.Textures.BlockIcons.*; +import net.minecraftforge.fluids.FluidStack; public class GT_MetaTileEntity_Massfabricator extends GT_MetaTileEntity_BasicMachine { public static int sUUAperUUM = 1; @@ -29,47 +28,89 @@ public class GT_MetaTileEntity_Massfabricator extends GT_MetaTileEntity_BasicMac protected final long EUt; public GT_MetaTileEntity_Massfabricator(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, "UUM = Matter * Fabrication Squared", 1, 1, "Massfabricator.png", "", + super( + aID, + aName, + aNameRegional, + aTier, + 1, + "UUM = Matter * Fabrication Squared", + 1, + 1, + "Massfabricator.png", + "", TextureFactory.of( TextureFactory.of(OVERLAY_SIDE_MASSFAB_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_SIDE_MASSFAB_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_MASSFAB_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_SIDE_MASSFAB), - TextureFactory.builder().addIcon(OVERLAY_SIDE_MASSFAB_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_MASSFAB_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_FRONT_MASSFAB_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_MASSFAB_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_MASSFAB_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_FRONT_MASSFAB), - TextureFactory.builder().addIcon(OVERLAY_FRONT_MASSFAB_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_MASSFAB_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_TOP_MASSFAB_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_TOP_MASSFAB_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_MASSFAB_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_TOP_MASSFAB), - TextureFactory.builder().addIcon(OVERLAY_TOP_MASSFAB_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_MASSFAB_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_BOTTOM_MASSFAB_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_MASSFAB_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_MASSFAB_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_BOTTOM_MASSFAB), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_MASSFAB_GLOW).glow().build())); + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_MASSFAB_GLOW) + .glow() + .build())); EUt = V[1] * (long) Math.pow(2, mTier + 2); } - public GT_MetaTileEntity_Massfabricator(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + public GT_MetaTileEntity_Massfabricator( + String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); EUt = V[1] * (long) Math.pow(2, mTier + 2); } - public GT_MetaTileEntity_Massfabricator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + public GT_MetaTileEntity_Massfabricator( + String aName, + int aTier, + String[] aDescription, + ITexture[][][] aTextures, + String aGUIName, + String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); EUt = V[1] * (long) Math.pow(2, mTier + 2); } @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Massfabricator(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); + return new GT_MetaTileEntity_Massfabricator( + this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); } @Override @@ -85,7 +126,8 @@ public class GT_MetaTileEntity_Massfabricator extends GT_MetaTileEntity_BasicMac @Override public void onConfigLoad(GT_Config aConfig) { super.onConfigLoad(aConfig); - sDurationMultiplier = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUM_Duration_Multiplier", sDurationMultiplier); + sDurationMultiplier = aConfig.get( + ConfigCategories.machineconfig, "Massfabricator.UUM_Duration_Multiplier", sDurationMultiplier); sUUAperUUM = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUA_per_UUM", sUUAperUUM); sUUASpeedBonus = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUA_Speed_Bonus", sUUASpeedBonus); sRequiresUUA = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUA_Requirement", sRequiresUUA); @@ -107,15 +149,21 @@ public class GT_MetaTileEntity_Massfabricator extends GT_MetaTileEntity_BasicMac FluidStack tFluid = getDrainableStack(); if ((tFluid == null) || (tFluid.amount < getCapacity())) { this.mOutputFluid = Materials.UUMatter.getFluid(1L); - calculateOverclockedNess((int) EUt, containsUUA(getFillableStack()) ? sDurationMultiplier / sUUASpeedBonus : sDurationMultiplier); - //In case recipe is too OP for that machine + calculateOverclockedNess( + (int) EUt, + containsUUA(getFillableStack()) ? sDurationMultiplier / sUUASpeedBonus : sDurationMultiplier); + // In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; if (containsUUA(tFluid = getFillableStack())) { tFluid.amount -= sUUAperUUM; return FOUND_AND_SUCCESSFULLY_USED_RECIPE; } - return sRequiresUUA || Arrays.stream(getAllInputs()).anyMatch(s -> ItemList.Circuit_Integrated.isStackEqual(s, true, true)) ? FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS : FOUND_AND_SUCCESSFULLY_USED_RECIPE; + return sRequiresUUA + || Arrays.stream(getAllInputs()) + .anyMatch(s -> ItemList.Circuit_Integrated.isStackEqual(s, true, true)) + ? FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS + : FOUND_AND_SUCCESSFULLY_USED_RECIPE; } return DID_NOT_FIND_RECIPE; } @@ -136,9 +184,7 @@ public class GT_MetaTileEntity_Massfabricator extends GT_MetaTileEntity_BasicMac } private boolean containsUUA(FluidStack aFluid) { - return aFluid != null - && aFluid.amount >= sUUAperUUM - && aFluid.isFluidEqual(Materials.UUAmplifier.getFluid(1L)); + return aFluid != null && aFluid.amount >= sUUAperUUM && aFluid.isFluidEqual(Materials.UUAmplifier.getFluid(1L)); } protected class MassfabricatorPower extends BasicMachineEUPower { @@ -151,18 +197,18 @@ public class GT_MetaTileEntity_Massfabricator extends GT_MetaTileEntity_BasicMac originalVoltage = computeVoltageForEuRate(euPerTick); if (mTier == 0) { - //Long time calculation + // Long time calculation long xMaxProgresstime = ((long) duration) << 1; if (xMaxProgresstime > Integer.MAX_VALUE - 1) { - //make impossible if too long + // make impossible if too long recipeEuPerTick = Integer.MAX_VALUE - 1; recipeDuration = Integer.MAX_VALUE - 1; } else { - recipeEuPerTick = (int) (V[1] << 2);//2^2=4 so shift <<2 + recipeEuPerTick = (int) (V[1] << 2); // 2^2=4 so shift <<2 recipeDuration = (int) xMaxProgresstime; } } else { - //Long EUt calculation + // Long EUt calculation long xEUt = EUt; long tempEUt = V[1]; @@ -170,20 +216,19 @@ public class GT_MetaTileEntity_Massfabricator extends GT_MetaTileEntity_BasicMac recipeDuration = duration; while (tempEUt <= V[mTier - 1]) { - tempEUt <<= 2;//this actually controls overclocking - recipeDuration >>= 1;//this is effect of overclocking + tempEUt <<= 2; // this actually controls overclocking + recipeDuration >>= 1; // this is effect of overclocking if (recipeDuration == 0) - xEUt = (long) (xEUt / 1.1D);//U know, if the time is less than 1 tick make the machine use less power + xEUt = (long) (xEUt + / 1.1D); // U know, if the time is less than 1 tick make the machine use less power } if (xEUt > Integer.MAX_VALUE - 1) { recipeEuPerTick = Integer.MAX_VALUE - 1; recipeDuration = Integer.MAX_VALUE - 1; } else { recipeEuPerTick = (int) xEUt; - if (recipeEuPerTick == 0) - recipeEuPerTick = 1; - if (recipeDuration == 0) - recipeDuration = 1;//set time to 1 tick + if (recipeEuPerTick == 0) recipeEuPerTick = 1; + if (recipeDuration == 0) recipeDuration = 1; // set time to 1 tick } } wasOverclocked = checkIfOverclocked(); diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java index 803bc7e163..8616b98fae 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java @@ -1,5 +1,12 @@ package gregtech.common.tileentities.machines.basic; +import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_GLOW; + import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.Materials; @@ -23,13 +30,6 @@ import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.fluids.FluidStack; -import static gregtech.api.enums.GT_Values.V; -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_GLOW; - public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEntity_BasicTank { private static boolean sInterDimensionalTeleportAllowed = true; @@ -49,14 +49,21 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt public TileEntity tTile = null; public GT_MetaTileEntity_MicrowaveEnergyTransmitter(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 3, new String[]{"Transmits Energy Wirelessly", "Use Nitrogen Plasma", "for Inter-dimensional transmission", "0.004EU Loss per 100 Blocks"}); + super(aID, aName, aNameRegional, aTier, 3, new String[] { + "Transmits Energy Wirelessly", + "Use Nitrogen Plasma", + "for Inter-dimensional transmission", + "0.004EU Loss per 100 Blocks" + }); } - public GT_MetaTileEntity_MicrowaveEnergyTransmitter(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_MicrowaveEnergyTransmitter( + String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, 3, aDescription, aTextures); } - public GT_MetaTileEntity_MicrowaveEnergyTransmitter(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_MicrowaveEnergyTransmitter( + String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, 3, aDescription, aTextures); } @@ -80,33 +87,52 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_MicrowaveEnergyTransmitter(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); + return new GT_MetaTileEntity_MicrowaveEnergyTransmitter( + this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } @Override public String[] getInfoData() { - return new String[]{ - "Coordinates:", - "X: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.mTargetX) + EnumChatFormatting.RESET, - "Y: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.mTargetY) + EnumChatFormatting.RESET, - "Z: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.mTargetZ) + EnumChatFormatting.RESET, - "Dimension: " + EnumChatFormatting.GREEN+this.mTargetD+EnumChatFormatting.RESET, - "Dimension Valid: " + (GT_Utility.isRealDimension(this.mTargetD) ? EnumChatFormatting.GREEN+"Yes"+EnumChatFormatting.RESET : EnumChatFormatting.RED+"No"+EnumChatFormatting.RESET), - "Dimension Registered: " + (DimensionManager.isDimensionRegistered(this.mTargetD) ? EnumChatFormatting.GREEN+"Yes"+EnumChatFormatting.RESET : EnumChatFormatting.RED+"No"+EnumChatFormatting.RESET) + return new String[] { + "Coordinates:", + "X: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.mTargetX) + EnumChatFormatting.RESET, + "Y: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.mTargetY) + EnumChatFormatting.RESET, + "Z: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.mTargetZ) + EnumChatFormatting.RESET, + "Dimension: " + EnumChatFormatting.GREEN + this.mTargetD + EnumChatFormatting.RESET, + "Dimension Valid: " + + (GT_Utility.isRealDimension(this.mTargetD) + ? EnumChatFormatting.GREEN + "Yes" + EnumChatFormatting.RESET + : EnumChatFormatting.RED + "No" + EnumChatFormatting.RESET), + "Dimension Registered: " + + (DimensionManager.isDimensionRegistered(this.mTargetD) + ? EnumChatFormatting.GREEN + "Yes" + EnumChatFormatting.RESET + : EnumChatFormatting.RED + "No" + EnumChatFormatting.RESET) }; } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - if (aSide == 0) return new ITexture[]{MACHINE_CASINGS[mTier][aColorIndex + 1]}; - if (aActive) return new ITexture[]{ + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { + if (aSide == 0) return new ITexture[] {MACHINE_CASINGS[mTier][aColorIndex + 1]}; + if (aActive) + return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_TELEPORTER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_ACTIVE_GLOW).glow().build()}; - return new ITexture[]{ - MACHINE_CASINGS[mTier][aColorIndex + 1], - TextureFactory.of(OVERLAY_TELEPORTER), - TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_TELEPORTER_ACTIVE_GLOW) + .glow() + .build() + }; + return new ITexture[] { + MACHINE_CASINGS[mTier][aColorIndex + 1], + TextureFactory.of(OVERLAY_TELEPORTER), + TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_GLOW).glow().build() + }; } @Override @@ -131,7 +157,8 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt @Override public void onConfigLoad(GT_Config aConfig) { - sInterDimensionalTeleportAllowed = aConfig.get(ConfigCategories.machineconfig, "Teleporter.Interdimensional", true); + sInterDimensionalTeleportAllowed = + aConfig.get(ConfigCategories.machineconfig, "Teleporter.Interdimensional", true); mMaxLoss = Math.max(aConfig.get(ConfigCategories.machineconfig, "MicrowaveTransmitter.MaxLoss", 50), 11); mMaxLossDistance = aConfig.get(ConfigCategories.machineconfig, "MicrowaveTransmitter.MaxLossDistance", 10000); mPassiveEnergyUse = aConfig.get(ConfigCategories.machineconfig, "MicrowaveTransmitter.PassiveEnergy", true); @@ -154,7 +181,8 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt for (byte i = -5; i <= 5; i = (byte) (i + 1)) { for (byte j = -5; j <= 5; j = (byte) (j + 1)) { for (byte k = -5; k <= 5; k = (byte) (k + 1)) { - if (getBaseMetaTileEntity().getBlockOffset(i, j, k) == GregTech_API.sBlockMetal5 && getBaseMetaTileEntity().getMetaIDOffset(i, j, k) == 8) {//require osmiridium block + if (getBaseMetaTileEntity().getBlockOffset(i, j, k) == GregTech_API.sBlockMetal5 + && getBaseMetaTileEntity().getMetaIDOffset(i, j, k) == 8) { // require osmiridium block return true; } } @@ -164,20 +192,19 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt } public boolean hasDimensionalTeleportCapability() { - return this.mDebug || - ( - sInterDimensionalTeleportAllowed && - ( - this.hasBlock || - mFluid != null && mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)) && mFluid.amount >= 1000 - - ) - ) - ; + return this.mDebug + || (sInterDimensionalTeleportAllowed + && (this.hasBlock + || mFluid != null + && mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)) + && mFluid.amount >= 1000)); } public boolean isDimensionalTeleportAvailable() { - return this.mDebug || (hasDimensionalTeleportCapability() && GT_Utility.isRealDimension(this.mTargetD) && GT_Utility.isRealDimension(getBaseMetaTileEntity().getWorld().provider.dimensionId)); + return this.mDebug + || (hasDimensionalTeleportCapability() + && GT_Utility.isRealDimension(this.mTargetD) + && GT_Utility.isRealDimension(getBaseMetaTileEntity().getWorld().provider.dimensionId)); } @Override @@ -190,12 +217,15 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt if (getBaseMetaTileEntity().getTimer() % 100L == 50L) { this.hasBlock = checkForBlock(); } - if ((getBaseMetaTileEntity().isAllowedToWork()) && (getBaseMetaTileEntity().getRedstone())) { + if ((getBaseMetaTileEntity().isAllowedToWork()) + && (getBaseMetaTileEntity().getRedstone())) { if (getBaseMetaTileEntity().getStoredEU() > (V[mTier] * 16)) { if (mPassiveEnergyUse) { - getBaseMetaTileEntity().decreaseStoredEnergyUnits(2L<<(mTier-1), false); + getBaseMetaTileEntity().decreaseStoredEnergyUnits(2L << (mTier - 1), false); } - if (hasDimensionalTeleportCapability() && this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId && mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1))) { + if (hasDimensionalTeleportCapability() + && this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId + && mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1))) { mFluid.amount--; if (mFluid.amount < 1) { mFluid = null; @@ -216,20 +246,21 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt } } int tDistance = distanceCalculation(); - if(tTile!=null) { + if (tTile != null) { if (tTile instanceof IEnergyConnected) { - long packetSize=V[mTier]; - if(tTile instanceof IGregTechTileEntity){ - IMetaTileEntity mte=((IGregTechTileEntity) tTile).getMetaTileEntity(); - if(mte instanceof BaseMetaTileEntity) { - packetSize=((BaseMetaTileEntity) mte).getMaxSafeInput(); + long packetSize = V[mTier]; + if (tTile instanceof IGregTechTileEntity) { + IMetaTileEntity mte = ((IGregTechTileEntity) tTile).getMetaTileEntity(); + if (mte instanceof BaseMetaTileEntity) { + packetSize = ((BaseMetaTileEntity) mte).getMaxSafeInput(); } } long energyUse = 10; if (mMaxLossDistance != 0) { - energyUse = GT_Utility.safeInt(10L + (tDistance * Math.max(mMaxLoss - 10L, 0) / mMaxLossDistance)); + energyUse = GT_Utility.safeInt( + 10L + (tDistance * Math.max(mMaxLoss - 10L, 0) / mMaxLossDistance)); } - energyUse=packetSize + ((V[mTier] * energyUse) / 100); + energyUse = packetSize + ((V[mTier] * energyUse) / 100); if (getBaseMetaTileEntity().isUniversalEnergyStored(energyUse)) { if (((IEnergyConnected) tTile).injectEnergyUnits((byte) 6, packetSize, 1) > 0) { getBaseMetaTileEntity().decreaseStoredEnergyUnits(energyUse, false); @@ -246,7 +277,13 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt } private int distanceCalculation() { - return Math.abs(((this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId) && (isDimensionalTeleportAvailable()) ? 100 : 1) * (int) Math.sqrt(Math.pow(getBaseMetaTileEntity().getXCoord() - this.mTargetX, 2.0D) + Math.pow(getBaseMetaTileEntity().getYCoord() - this.mTargetY, 2.0D) + Math.pow(getBaseMetaTileEntity().getZCoord() - this.mTargetZ, 2.0D))); + return Math.abs(((this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId) + && (isDimensionalTeleportAvailable()) + ? 100 + : 1) + * (int) Math.sqrt(Math.pow(getBaseMetaTileEntity().getXCoord() - this.mTargetX, 2.0D) + + Math.pow(getBaseMetaTileEntity().getYCoord() - this.mTargetY, 2.0D) + + Math.pow(getBaseMetaTileEntity().getZCoord() - this.mTargetZ, 2.0D))); } @Override @@ -378,5 +415,4 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt public ITexture[][][] getTextureSet(ITexture[] aTextures) { return null; } - } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java index 86ee28b873..67ad6c3a5c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java @@ -1,6 +1,7 @@ package gregtech.common.tileentities.machines.basic; -import java.util.ArrayList; +import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.GT_Values.debugBlockMiner; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; @@ -12,8 +13,9 @@ import gregtech.api.util.GT_Log; import gregtech.api.util.GT_Utility; import gregtech.common.blocks.GT_Block_Ores_Abstract; import gregtech.common.blocks.GT_TileEntity_Ores; -import gregtech.common.misc.GT_IDrillingLogicDelegateOwner; import gregtech.common.misc.GT_DrillingLogicDelegate; +import gregtech.common.misc.GT_IDrillingLogicDelegateOwner; +import java.util.ArrayList; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -24,14 +26,12 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraft.world.ChunkPosition; import net.minecraftforge.common.util.FakePlayer; -import static gregtech.api.enums.GT_Values.V; -import static gregtech.api.enums.GT_Values.debugBlockMiner; @SuppressWarnings("ObjectEquality") public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine implements GT_IDrillingLogicDelegateOwner { - static final int[] RADIUS = {8, 8, 16, 24, 32}; //Miner radius per tier - static final int[] SPEED = {160, 160, 80, 40, 20}; //Miner cycle time per tier - static final int[] ENERGY = {8, 8, 32, 128, 512}; //Miner energy consumption per tier + static final int[] RADIUS = {8, 8, 16, 24, 32}; // Miner radius per tier + static final int[] SPEED = {160, 160, 80, 40, 20}; // Miner cycle time per tier + static final int[] ENERGY = {8, 8, 32, 128, 512}; // Miner energy consumption per tier /** Miner configured radius */ private int radiusConfig; @@ -40,66 +40,101 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine impl /** General pipe accessor */ private final GT_DrillingLogicDelegate pipe = new GT_DrillingLogicDelegate(this); + private final int mSpeed; public GT_MetaTileEntity_Miner(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, - new String[]{ - "Digging ore instead of you", - "Use Screwdriver to regulate work area", - "Use Soft Mallet to disable and retract the pipe", - String.format("%d EU/t, %d sec per block, no stuttering", ENERGY[aTier], SPEED[aTier] / 20), - String.format("Maximum work area %dx%d", (RADIUS[aTier] * 2 + 1), (RADIUS[aTier] * 2 + 1)), - String.format("Fortune bonus of %d", aTier) - }, - 2, - 2, - "Miner.png", - "", - TextureFactory.of( - TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE_ACTIVE")), - TextureFactory.builder().addIcon(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE_ACTIVE_GLOW")).glow().build() - ), - TextureFactory.of( - TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE")), - TextureFactory.builder().addIcon(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE_GLOW")).glow().build() - ), - TextureFactory.of( - TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT_ACTIVE")), - TextureFactory.builder().addIcon(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT_ACTIVE_GLOW")).glow().build() - ), - TextureFactory.of( - TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT")), - TextureFactory.builder().addIcon(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT_GLOW")).glow().build() - ), - TextureFactory.of( - TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP_ACTIVE")), - TextureFactory.builder().addIcon(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP_ACTIVE_GLOW")).glow().build() - ), - TextureFactory.of( - TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP")), - TextureFactory.builder().addIcon(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP_GLOW")).glow().build() - ), - TextureFactory.of( - TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM_ACTIVE")), - TextureFactory.builder().addIcon(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM_ACTIVE_GLOW")).glow().build() - ), - TextureFactory.of( - TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM")), - TextureFactory.builder().addIcon(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM_GLOW")).glow().build() - ) - ); + super( + aID, + aName, + aNameRegional, + aTier, + 1, + new String[] { + "Digging ore instead of you", + "Use Screwdriver to regulate work area", + "Use Soft Mallet to disable and retract the pipe", + String.format("%d EU/t, %d sec per block, no stuttering", ENERGY[aTier], SPEED[aTier] / 20), + String.format("Maximum work area %dx%d", (RADIUS[aTier] * 2 + 1), (RADIUS[aTier] * 2 + 1)), + String.format("Fortune bonus of %d", aTier) + }, + 2, + 2, + "Miner.png", + "", + TextureFactory.of( + TextureFactory.of( + new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE_ACTIVE")), + TextureFactory.builder() + .addIcon(new Textures.BlockIcons.CustomIcon( + "basicmachines/miner/OVERLAY_SIDE_ACTIVE_GLOW")) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE")), + TextureFactory.builder() + .addIcon(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE_GLOW")) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of( + new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT_ACTIVE")), + TextureFactory.builder() + .addIcon(new Textures.BlockIcons.CustomIcon( + "basicmachines/miner/OVERLAY_FRONT_ACTIVE_GLOW")) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT")), + TextureFactory.builder() + .addIcon(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT_GLOW")) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP_ACTIVE")), + TextureFactory.builder() + .addIcon(new Textures.BlockIcons.CustomIcon( + "basicmachines/miner/OVERLAY_TOP_ACTIVE_GLOW")) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP")), + TextureFactory.builder() + .addIcon(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP_GLOW")) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of( + new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM_ACTIVE")), + TextureFactory.builder() + .addIcon(new Textures.BlockIcons.CustomIcon( + "basicmachines/miner/OVERLAY_BOTTOM_ACTIVE_GLOW")) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM")), + TextureFactory.builder() + .addIcon(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM_GLOW")) + .glow() + .build())); mSpeed = SPEED[aTier]; radiusConfig = RADIUS[mTier]; } - public GT_MetaTileEntity_Miner(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + public GT_MetaTileEntity_Miner( + String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); mSpeed = SPEED[aTier]; radiusConfig = RADIUS[mTier]; } - public GT_MetaTileEntity_Miner(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + public GT_MetaTileEntity_Miner( + String aName, + int aTier, + String[] aDescription, + ITexture[][][] aTextures, + String aGUIName, + String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 2, 2, aGUIName, aNEIName); mSpeed = SPEED[aTier]; radiusConfig = RADIUS[mTier]; @@ -117,9 +152,10 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine impl } @Override - protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + protected boolean allowPutStackValidated( + IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) // - && aStack.getItem() == GT_DrillingLogicDelegate.MINING_PIPE_STACK.getItem(); + && aStack.getItem() == GT_DrillingLogicDelegate.MINING_PIPE_STACK.getItem(); } /** Both output slots must be free to work */ @@ -143,8 +179,7 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine impl if (radiusConfig < 0) { radiusConfig = RADIUS[mTier]; } - } - else { + } else { if (radiusConfig <= RADIUS[mTier]) { radiusConfig++; } @@ -154,9 +189,12 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine impl } GT_Utility.sendChatToPlayer( - aPlayer, - String.format("%s %dx%d", StatCollector.translateToLocal("GT5U.machines.workareaset"), (radiusConfig * 2 + 1), (radiusConfig * 2 + 1)) - ); + aPlayer, + String.format( + "%s %dx%d", + StatCollector.translateToLocal("GT5U.machines.workareaset"), + (radiusConfig * 2 + 1), + (radiusConfig * 2 + 1))); // Rebuild ore cache after change config fillOreList(getBaseMetaTileEntity()); @@ -190,10 +228,11 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine impl return; } - if (!aBaseMetaTileEntity.isUniversalEnergyStored((long)ENERGY[mTier] * (mSpeed - mProgresstime))) { + if (!aBaseMetaTileEntity.isUniversalEnergyStored((long) ENERGY[mTier] * (mSpeed - mProgresstime))) { mMaxProgresstime = 0; if (debugBlockMiner) { - GT_Log.out.println("MINER: Not enough energy yet, want " + (ENERGY[mTier] * mSpeed) + " have " + aBaseMetaTileEntity.getUniversalEnergyStored()); + GT_Log.out.println("MINER: Not enough energy yet, want " + (ENERGY[mTier] * mSpeed) + " have " + + aBaseMetaTileEntity.getUniversalEnergyStored()); } return; } @@ -215,8 +254,7 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine impl if (descends) { fillOreList(aBaseMetaTileEntity); } - } - else { + } else { int x; int y; int z; @@ -224,11 +262,13 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine impl boolean isOre; do { ChunkPosition oreBlockPos = oreBlockPositions.remove(0); - oreBlock = aBaseMetaTileEntity.getBlockOffset(oreBlockPos.chunkPosX, oreBlockPos.chunkPosY, oreBlockPos.chunkPosZ); + oreBlock = aBaseMetaTileEntity.getBlockOffset( + oreBlockPos.chunkPosX, oreBlockPos.chunkPosY, oreBlockPos.chunkPosZ); x = aBaseMetaTileEntity.getXCoord() + oreBlockPos.chunkPosX; y = aBaseMetaTileEntity.getYCoord() + oreBlockPos.chunkPosY; z = aBaseMetaTileEntity.getZCoord() + oreBlockPos.chunkPosZ; - isOre = GT_Utility.isOre(oreBlock, aBaseMetaTileEntity.getWorld().getBlockMetadata(x, y, z)); + isOre = GT_Utility.isOre( + oreBlock, aBaseMetaTileEntity.getWorld().getBlockMetadata(x, y, z)); } // someone else might have removed the block while (!isOre && !oreBlockPositions.isEmpty()); @@ -253,11 +293,10 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine impl // todo some weird checks. refactorings needed if (block instanceof GT_Block_Ores_Abstract) { TileEntity oreEntity = aBaseMetaTileEntity.getTileEntityOffset(x, pipe.getTipDepth(), z); - if (oreEntity instanceof GT_TileEntity_Ores && ((GT_TileEntity_Ores)oreEntity).mNatural) { + if (oreEntity instanceof GT_TileEntity_Ores && ((GT_TileEntity_Ores) oreEntity).mNatural) { oreBlockPositions.add(new ChunkPosition(x, pipe.getTipDepth(), z)); } - } - else if (GT_Utility.isOre(block, blockMeta)) { + } else if (GT_Utility.isOre(block, blockMeta)) { oreBlockPositions.add(new ChunkPosition(x, pipe.getTipDepth(), z)); } } @@ -286,8 +325,8 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine impl /** Pushes (or check can push) item to output slots. */ @Override public boolean pushOutputs(ItemStack stack, int count, boolean simulate, boolean allowInputSlots) { - return allowInputSlots && pushOutput(getInputSlot(), getInputSlot() + mInputSlotCount, stack, count, simulate) || - pushOutput(getOutputSlot(), getOutputSlot() + mOutputItems.length, stack, count, simulate); + return allowInputSlots && pushOutput(getInputSlot(), getInputSlot() + mInputSlotCount, stack, count, simulate) + || pushOutput(getOutputSlot(), getOutputSlot() + mOutputItems.length, stack, count, simulate); } private boolean pushOutput(int startIndex, int endIndex, ItemStack stack, int count, boolean simulate) { @@ -300,8 +339,7 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine impl mInventory[i] = copy; } return true; - } - else if (GT_Utility.areStacksEqual(slot, stack) && slot.stackSize <= slot.getMaxStackSize() - count) { + } else if (GT_Utility.areStacksEqual(slot, stack) && slot.stackSize <= slot.getMaxStackSize() - count) { if (!simulate) { slot.stackSize += count; } @@ -341,15 +379,19 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine impl @Override public String[] getInfoData() { - return new String[]{ - String.format("%s%s%s", EnumChatFormatting.BLUE, StatCollector.translateToLocal("GT5U.machines.miner"), EnumChatFormatting.RESET), - String.format("%s: %s%d%s %s", - StatCollector.translateToLocal("GT5U.machines.workarea"), - EnumChatFormatting.GREEN, - (radiusConfig * 2 + 1), - EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.machines.blocks") - ) + return new String[] { + String.format( + "%s%s%s", + EnumChatFormatting.BLUE, + StatCollector.translateToLocal("GT5U.machines.miner"), + EnumChatFormatting.RESET), + String.format( + "%s: %s%d%s %s", + StatCollector.translateToLocal("GT5U.machines.workarea"), + EnumChatFormatting.GREEN, + (radiusConfig * 2 + 1), + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.machines.blocks")) }; } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java index 1e1beaf528..e97be4e34a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java @@ -1,66 +1,93 @@ package gregtech.common.tileentities.machines.basic; +import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_GLOW; + import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_SpawnEventHandler; +import java.util.Arrays; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; -import java.util.Arrays; - -import static gregtech.api.enums.GT_Values.V; -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_GLOW; - public class GT_MetaTileEntity_MonsterRepellent extends GT_MetaTileEntity_TieredMachineBlock { public int mRange = 16; public GT_MetaTileEntity_MonsterRepellent(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 0, "Repels nasty Creatures. Range: " + (4 + (12 * aTier)) + " unpowered / " + (16 + (48 * aTier)) + " powered. Costs " + (1L << (aTier * 2))+ " EU/t" ); - } - - public GT_MetaTileEntity_MonsterRepellent(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { + super( + aID, + aName, + aNameRegional, + aTier, + 0, + "Repels nasty Creatures. Range: " + (4 + (12 * aTier)) + " unpowered / " + (16 + (48 * aTier)) + + " powered. Costs " + (1L << (aTier * 2)) + " EU/t"); + } + + public GT_MetaTileEntity_MonsterRepellent( + String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } - public GT_MetaTileEntity_MonsterRepellent(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_MonsterRepellent( + String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_MonsterRepellent(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures); + return new GT_MetaTileEntity_MonsterRepellent( + this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures); } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - if (aSide != ForgeDirection.UP.ordinal()) return new ITexture[]{MACHINE_CASINGS[mTier][aColorIndex + 1]}; - if (aActive) return new ITexture[]{ + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { + if (aSide != ForgeDirection.UP.ordinal()) return new ITexture[] {MACHINE_CASINGS[mTier][aColorIndex + 1]}; + if (aActive) + return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_TELEPORTER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_ACTIVE_GLOW).glow().build()}; - return new ITexture[]{ - MACHINE_CASINGS[mTier][aColorIndex + 1], - TextureFactory.of(OVERLAY_TELEPORTER), - TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_TELEPORTER_ACTIVE_GLOW) + .glow() + .build() + }; + return new ITexture[] { + MACHINE_CASINGS[mTier][aColorIndex + 1], + TextureFactory.of(OVERLAY_TELEPORTER), + TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_GLOW).glow().build() + }; } @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { if (aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.isServerSide()) { - int[] tCoords = {aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(), aBaseMetaTileEntity.getWorld().provider.dimensionId}; + int[] tCoords = { + aBaseMetaTileEntity.getXCoord(), + aBaseMetaTileEntity.getYCoord(), + aBaseMetaTileEntity.getZCoord(), + aBaseMetaTileEntity.getWorld().provider.dimensionId + }; if ((aTimer % 600 == 0) && !GT_SpawnEventHandler.mobReps.contains(tCoords)) { GT_SpawnEventHandler.mobReps.add(tCoords); } - if (aBaseMetaTileEntity.isUniversalEnergyStored(getMinimumStoredEU()) && aBaseMetaTileEntity.decreaseStoredEnergyUnits(1L << (this.mTier * 2), false)) { + if (aBaseMetaTileEntity.isUniversalEnergyStored(getMinimumStoredEU()) + && aBaseMetaTileEntity.decreaseStoredEnergyUnits(1L << (this.mTier * 2), false)) { mRange = 16 + (48 * mTier); } else { mRange = 4 + (12 * mTier); @@ -70,13 +97,23 @@ public class GT_MetaTileEntity_MonsterRepellent extends GT_MetaTileEntity_Tiered @Override public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { - int[] tCoords = {aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(), aBaseMetaTileEntity.getWorld().provider.dimensionId}; + int[] tCoords = { + aBaseMetaTileEntity.getXCoord(), + aBaseMetaTileEntity.getYCoord(), + aBaseMetaTileEntity.getZCoord(), + aBaseMetaTileEntity.getWorld().provider.dimensionId + }; GT_SpawnEventHandler.mobReps.add(tCoords); } @Override public void onRemoval() { - int[] tCoords = {this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord(), this.getBaseMetaTileEntity().getWorld().provider.dimensionId}; + int[] tCoords = { + this.getBaseMetaTileEntity().getXCoord(), + this.getBaseMetaTileEntity().getYCoord(), + this.getBaseMetaTileEntity().getZCoord(), + this.getBaseMetaTileEntity().getWorld().provider.dimensionId + }; GT_SpawnEventHandler.mobReps.removeIf(coords -> Arrays.equals(coords, tCoords)); } @@ -141,10 +178,8 @@ public class GT_MetaTileEntity_MonsterRepellent extends GT_MetaTileEntity_Tiered } @Override - public void saveNBTData(NBTTagCompound aNBT) { - } + public void saveNBTData(NBTTagCompound aNBT) {} @Override - public void loadNBTData(NBTTagCompound aNBT) { - } + public void loadNBTData(NBTTagCompound aNBT) {} } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java index 79b363fac3..2a7e28f10b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.machines.basic; +import static gregtech.api.enums.Textures.BlockIcons.*; + import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.ITexture; @@ -15,49 +17,88 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -import static gregtech.api.enums.Textures.BlockIcons.*; - public class GT_MetaTileEntity_PotionBrewer extends GT_MetaTileEntity_BasicMachine { public GT_MetaTileEntity_PotionBrewer(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, "Brewing your Drinks", 1, 0, "PotionBrewer.png", "", + super( + aID, + aName, + aNameRegional, + aTier, + 1, + "Brewing your Drinks", + 1, + 0, + "PotionBrewer.png", + "", TextureFactory.of( TextureFactory.of(OVERLAY_SIDE_POTIONBREWER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_SIDE_POTIONBREWER_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_POTIONBREWER_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_SIDE_POTIONBREWER), - TextureFactory.builder().addIcon(OVERLAY_SIDE_POTIONBREWER_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_POTIONBREWER_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_FRONT_POTIONBREWER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_POTIONBREWER_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_POTIONBREWER_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_FRONT_POTIONBREWER), - TextureFactory.builder().addIcon(OVERLAY_FRONT_POTIONBREWER_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_POTIONBREWER_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_TOP_POTIONBREWER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_TOP_POTIONBREWER_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_POTIONBREWER_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_TOP_POTIONBREWER), - TextureFactory.builder().addIcon(OVERLAY_TOP_POTIONBREWER_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_POTIONBREWER_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_BOTTOM_POTIONBREWER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_POTIONBREWER_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_POTIONBREWER_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_BOTTOM_POTIONBREWER), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_POTIONBREWER_GLOW).glow().build()) - ); + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_POTIONBREWER_GLOW) + .glow() + .build())); } - public GT_MetaTileEntity_PotionBrewer(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + public GT_MetaTileEntity_PotionBrewer( + String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 0, aGUIName, aNEIName); } - public GT_MetaTileEntity_PotionBrewer(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + public GT_MetaTileEntity_PotionBrewer( + String aName, + int aTier, + String[] aDescription, + ITexture[][][] aTextures, + String aGUIName, + String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 0, aGUIName, aNEIName); } @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_PotionBrewer(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); + return new GT_MetaTileEntity_PotionBrewer( + this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); } @Override @@ -72,8 +113,8 @@ public class GT_MetaTileEntity_PotionBrewer extends GT_MetaTileEntity_BasicMachi return tCheck; } - calculateOverclockedNess(4,128); - //In case recipe is too OP for that machine + calculateOverclockedNess(4, 128); + // In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; @@ -114,25 +155,30 @@ public class GT_MetaTileEntity_PotionBrewer extends GT_MetaTileEntity_BasicMachi } return setOutput("potion.weakness"); } - if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), getInputAt(0))) { + if (GT_Utility.areStacksEqual( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), getInputAt(0))) { if (!tModifier.startsWith("strong")) { - return setOutput("potion." + tInputName + ".strong" + (tModifier.isEmpty() ? "" : "." + tModifier)); + return setOutput( + "potion." + tInputName + ".strong" + (tModifier.isEmpty() ? "" : "." + tModifier)); } if (tModifier.startsWith("long")) { return setOutput("potion." + tInputName + tModifier.replaceFirst("long", "")); } return setOutput("potion.thick"); } - if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), getInputAt(0))) { + if (GT_Utility.areStacksEqual( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), getInputAt(0))) { if (!tModifier.startsWith("long")) { - return setOutput("potion." + tInputName + ".long" + (tModifier.isEmpty() ? "" : "." + tModifier)); + return setOutput( + "potion." + tInputName + ".long" + (tModifier.isEmpty() ? "" : "." + tModifier)); } if (tModifier.startsWith("strong")) { return setOutput("potion." + tInputName + tModifier.replaceFirst("strong", "")); } return setOutput("potion.mundane"); } - if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gunpowder, 1L), getInputAt(0))) { + if (GT_Utility.areStacksEqual( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gunpowder, 1L), getInputAt(0))) { if (!tInputName.endsWith(".splash")) { return setOutput("potion." + tInputName + ".splash"); } @@ -152,15 +198,17 @@ public class GT_MetaTileEntity_PotionBrewer extends GT_MetaTileEntity_BasicMachi if (this.mOutputFluid == null) { this.mOutputFluid = FluidRegistry.getFluidStack("potion.mundane", getFillableStack().amount); } - + getInputAt(0).stackSize -= 1; getFillableStack().amount -= 750; return 2; } @Override - public boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) && getRecipeList().containsInput(aStack); + public boolean allowPutStackValidated( + IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) + && getRecipeList().containsInput(aStack); } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Printer.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Printer.java index 87105620ea..6771ba0fcc 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Printer.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Printer.java @@ -8,16 +8,26 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachin import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; - import java.util.ArrayList; +import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_Printer extends GT_MetaTileEntity_BasicMachine { public GT_MetaTileEntity_Printer(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, "It can copy Books and paint Stuff", 1, 1, "Printer.png", GT_Recipe.GT_Recipe_Map.sPrinterRecipes.mNEIName); + super( + aID, + aName, + aNameRegional, + aTier, + 1, + "It can copy Books and paint Stuff", + 1, + 1, + "Printer.png", + GT_Recipe.GT_Recipe_Map.sPrinterRecipes.mNEIName); } - public GT_MetaTileEntity_Printer(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + public GT_MetaTileEntity_Printer( + String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 2, 2, aGUIName, aNEIName); } @@ -25,18 +35,20 @@ public class GT_MetaTileEntity_Printer extends GT_MetaTileEntity_BasicMachine { public int checkRecipe() { if (getOutputAt(0) != null) { this.mOutputBlocked += 1; - } else if ((GT_Utility.isStackValid(getInputAt(0))) && (getInputAt(0).stackSize > 0) && - (GT_Utility.isStackInvalid(getSpecialSlot())) && - (OrePrefixes.block.contains(getInputAt(0)))) { - ArrayList<ItemStack> tList = GT_OreDictUnificator.getOres(GT_OreDictUnificator.getAssociation(getInputAt(0))); + } else if ((GT_Utility.isStackValid(getInputAt(0))) + && (getInputAt(0).stackSize > 0) + && (GT_Utility.isStackInvalid(getSpecialSlot())) + && (OrePrefixes.block.contains(getInputAt(0)))) { + ArrayList<ItemStack> tList = + GT_OreDictUnificator.getOres(GT_OreDictUnificator.getAssociation(getInputAt(0))); if (tList.size() > 1) { tList.add(tList.get(0)); int i = 0; for (int j = tList.size() - 1; i < j; i++) { if (GT_Utility.areStacksEqual(getInputAt(0), (ItemStack) tList.get(i))) { this.mOutputItems[0] = GT_Utility.copyAmount(1L, tList.get(i + 1)); - calculateOverclockedNess(1,32); - //In case recipe is too OP for that machine + calculateOverclockedNess(1, 32); + // In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; getInputAt(0).stackSize -= 1; diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java index 2027516dcc..5c06ab5bd1 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java @@ -1,5 +1,8 @@ package gregtech.common.tileentities.machines.basic; +import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.GT_Values.debugBlockPump; + import gregtech.api.enums.Textures; import gregtech.api.gui.GT_Container_BasicTank; import gregtech.api.gui.GT_GUIContainer_BasicTank; @@ -12,6 +15,11 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; +import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; @@ -27,19 +35,11 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidBlock; import net.minecraftforge.fluids.IFluidHandler; -import java.util.ArrayDeque; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Set; - -import static gregtech.api.enums.GT_Values.V; -import static gregtech.api.enums.GT_Values.debugBlockPump; - public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { private static final ItemStack MINING_PIPE = GT_ModHandler.getIC2Item("miningPipe", 0); private static final Block MINING_PIPE_BLOCK = GT_Utility.getBlockFromStack(MINING_PIPE); - private static final Block MINING_PIPE_TIP_BLOCK = GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 0)); + private static final Block MINING_PIPE_TIP_BLOCK = + GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 0)); public static int getMaxDistanceForTier(int aTier) { return (10 * ((int) Math.pow(1.6D, aTier))); @@ -56,18 +56,21 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { public Block mPrimaryPumpedBlock = null; public Block mSecondaryPumpedBlock = null; - private int radiusConfig; //Pump configured radius + private int radiusConfig; // Pump configured radius private boolean mRetractDone = false; public GT_MetaTileEntity_Pump(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 3, - new String[]{"The best way to empty Oceans! Outputs on top", - getEuUsagePerTier(aTier) + " EU/operation, " + GT_Utility.safeInt(160 / 20 / (long)Math.pow(2, aTier) ) + " sec per bucket, no stuttering", - "Maximum pumping area: " + (getMaxDistanceForTier( aTier) * 2 + 1) + "x" + (getMaxDistanceForTier( aTier) * 2 + 1), - "Use Screwdriver to regulate pumping area", - "Use Soft Mallet to disable and retract the pipe", - "Disable itself upon hitting rocks", - "Disable the bottom pump to retract the pipe!"}); + super(aID, aName, aNameRegional, aTier, 3, new String[] { + "The best way to empty Oceans! Outputs on top", + getEuUsagePerTier(aTier) + " EU/operation, " + GT_Utility.safeInt(160 / 20 / (long) Math.pow(2, aTier)) + + " sec per bucket, no stuttering", + "Maximum pumping area: " + (getMaxDistanceForTier(aTier) * 2 + 1) + "x" + + (getMaxDistanceForTier(aTier) * 2 + 1), + "Use Screwdriver to regulate pumping area", + "Use Soft Mallet to disable and retract the pipe", + "Disable itself upon hitting rocks", + "Disable the bottom pump to retract the pipe!" + }); radiusConfig = getMaxDistanceForTier(mTier); } @@ -90,11 +93,18 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { public void saveNBTData(NBTTagCompound aNBT) { boolean wasPumping = this.wasPumping || !this.mPumpList.isEmpty(); if (debugBlockPump) { - GT_Log.out.println("PUMP: NBT:Save - WasPumping - " + wasPumping + " blocks (" + this.mPrimaryPumpedBlock + ", " + this.mSecondaryPumpedBlock + ")"); + GT_Log.out.println("PUMP: NBT:Save - WasPumping - " + wasPumping + " blocks (" + this.mPrimaryPumpedBlock + + ", " + this.mSecondaryPumpedBlock + ")"); } super.saveNBTData(aNBT); - aNBT.setString("mPumpedBlock1", this.mPrimaryPumpedBlock == null ? "" : Block.blockRegistry.getNameForObject(this.mPrimaryPumpedBlock)); - aNBT.setString("mPumpedBlock2", this.mSecondaryPumpedBlock == null ? "" : Block.blockRegistry.getNameForObject(this.mSecondaryPumpedBlock)); + aNBT.setString( + "mPumpedBlock1", + this.mPrimaryPumpedBlock == null ? "" : Block.blockRegistry.getNameForObject(this.mPrimaryPumpedBlock)); + aNBT.setString( + "mPumpedBlock2", + this.mSecondaryPumpedBlock == null + ? "" + : Block.blockRegistry.getNameForObject(this.mSecondaryPumpedBlock)); aNBT.setBoolean("wasPumping", wasPumping); aNBT.setInteger("radiusConfig", radiusConfig); } @@ -103,13 +113,13 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { public void loadNBTData(NBTTagCompound aNBT) { super.loadNBTData(aNBT); this.wasPumping = aNBT.getBoolean("wasPumping"); - if (aNBT.hasKey("radiusConfig")) - this.radiusConfig = aNBT.getInteger("radiusConfig"); + if (aNBT.hasKey("radiusConfig")) this.radiusConfig = aNBT.getInteger("radiusConfig"); this.mPrimaryPumpedBlock = Block.getBlockFromName(aNBT.getString("mPumpedBlock1")); this.mSecondaryPumpedBlock = Block.getBlockFromName(aNBT.getString("mPumpedBlock2")); if (debugBlockPump) { - GT_Log.out.println("PUMP: NBT:Load - WasPumping - " + this.wasPumping + "(" + aNBT.getString("mPumpedBlock1") + ") " + this.mPrimaryPumpedBlock); + GT_Log.out.println("PUMP: NBT:Load - WasPumping - " + this.wasPumping + "(" + + aNBT.getString("mPumpedBlock1") + ") " + this.mPrimaryPumpedBlock); } } @@ -127,19 +137,19 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { if (radiusConfig >= 0) { radiusConfig--; } - if (radiusConfig < 0) - radiusConfig = max; + if (radiusConfig < 0) radiusConfig = max; } else { if (radiusConfig <= max) { radiusConfig++; } - if (radiusConfig > max) - radiusConfig = 0; + if (radiusConfig > max) radiusConfig = 0; } - GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("GT5U.machines.workareaset") + " " + (radiusConfig * 2 + 1) + "x" + (radiusConfig * 2 + 1));//TODO Add translation support - - clearQueue(false); + GT_Utility.sendChatToPlayer( + aPlayer, + StatCollector.translateToLocal("GT5U.machines.workareaset") + " " + (radiusConfig * 2 + 1) + "x" + + (radiusConfig * 2 + 1)); // TODO Add translation support + clearQueue(false); } @Override @@ -199,10 +209,13 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { this.mPumpCountBelow = 0; IGregTechTileEntity tTileEntity; - for (int i = 1 ; - (i < 21) && ((tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance((byte) 0, i)) != null) - && ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Pump)) ; i++) - { + for (int i = 1; + (i < 21) + && ((tTileEntity = getBaseMetaTileEntity() + .getIGregTechTileEntityAtSideAndDistance((byte) 0, i)) + != null) + && ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Pump)); + i++) { // Apparently someone might stack 21 pumps on top of each other, so let's check for that getBaseMetaTileEntity().setActive(tTileEntity.isActive()); this.mPumpCountBelow += 1; @@ -216,13 +229,18 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { // Only the bottom most pump does anything if (getBaseMetaTileEntity().isAllowedToWork()) { mRetractDone = false; - if ((getBaseMetaTileEntity().isUniversalEnergyStored(this.getEuUsagePerAction())) && ((this.mFluid == null) || (this.mFluid.amount + 1000 <= getCapacity()))) { + if ((getBaseMetaTileEntity().isUniversalEnergyStored(this.getEuUsagePerAction())) + && ((this.mFluid == null) || (this.mFluid.amount + 1000 <= getCapacity()))) { boolean tMovedOneDown = false; - if ((this.mPumpList.isEmpty()) && (getBaseMetaTileEntity().getTimer() % 100L == 0L)) { + if ((this.mPumpList.isEmpty()) + && (getBaseMetaTileEntity().getTimer() % 100L == 0L)) { if (!this.wasPumping) { tMovedOneDown = moveOneDown(); if (!tMovedOneDown) { - if (canMoveDown(getBaseMetaTileEntity().getXCoord(), Math.max(getYOfPumpHead() - 1, 1), getBaseMetaTileEntity().getZCoord())) { + if (canMoveDown( + getBaseMetaTileEntity().getXCoord(), + Math.max(getYOfPumpHead() - 1, 1), + getBaseMetaTileEntity().getZCoord())) { if (debugBlockPump) { GT_Log.out.println("PUMP: No pipe left. Idle for a little longer."); } @@ -240,15 +258,17 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { GT_Log.out.println("PUMP: Was pumping, didn't move down"); } } - int x = getBaseMetaTileEntity().getXCoord(), z = getBaseMetaTileEntity().getZCoord(); + int x = getBaseMetaTileEntity().getXCoord(), + z = getBaseMetaTileEntity().getZCoord(); if (!this.hasValidFluid()) { // We don't have a valid block, let's try to find one int y = getYOfPumpHead(); if (debugBlockPump && this.mPrimaryPumpedBlock != null) { - GT_Log.out.println("PUMP: Had an invalid pump block. Trying to find a fluid at Y: " + y + - " Previous blocks 1: " + this.mPrimaryPumpedBlock + " 2: " + this.mSecondaryPumpedBlock); + GT_Log.out.println("PUMP: Had an invalid pump block. Trying to find a fluid at Y: " + y + + " Previous blocks 1: " + this.mPrimaryPumpedBlock + " 2: " + + this.mSecondaryPumpedBlock); } // First look down checkForFluidToPump(x, y - 1, z); @@ -267,18 +287,20 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { } else if (getYOfPumpHead() < getBaseMetaTileEntity().getYCoord()) { // We didn't just look for a block, and the pump head is below the pump - if ((tMovedOneDown) || this.wasPumping || - ((this.mPumpList.isEmpty()) && (getBaseMetaTileEntity().getTimer() % 200L == 100L)) || - (getBaseMetaTileEntity().getTimer() % 72000L == 100L)) - { + if ((tMovedOneDown) + || this.wasPumping + || ((this.mPumpList.isEmpty()) + && (getBaseMetaTileEntity().getTimer() % 200L == 100L)) + || (getBaseMetaTileEntity().getTimer() % 72000L == 100L)) { // Rebuild the list to pump if any of the following conditions are true: // 1) We just moved down // 2) We were previously pumping (and possibly just reloaded) // 3) We have an empty queue and enough time has passed // 4) A long while has has passed if (debugBlockPump) { - GT_Log.out.println("PUMP: Rebuilding pump list - Size " + - this.mPumpList.size() + " WasPumping: " + this.wasPumping + " Timer " + getBaseMetaTileEntity().getTimer()); + GT_Log.out.println("PUMP: Rebuilding pump list - Size " + this.mPumpList.size() + + " WasPumping: " + this.wasPumping + " Timer " + + getBaseMetaTileEntity().getTimer()); } int yPump = getBaseMetaTileEntity().getYCoord() - 1, yHead = getYOfPumpHead(); @@ -287,7 +309,6 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { if (debugBlockPump) { GT_Log.out.println("PUMP: Rebuilt pump list - Size " + this.mPumpList.size()); } - } if ((!tMovedOneDown) && (this.mPumpTimer <= 0)) { while ((!this.mPumpList.isEmpty())) { @@ -301,7 +322,8 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { this.mPumpTimer = mPumpTimer == 0 ? 1 : mPumpTimer; } } else { - // We somehow have a valid fluid, but the head of the pump isn't below the pump. Perhaps someone broke some pipes + // We somehow have a valid fluid, but the head of the pump isn't below the pump. Perhaps + // someone broke some pipes // -- Clear the queue and we should try to move down until we can find a valid fluid this.clearQueue(false); } @@ -309,7 +331,13 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { GT_Log.out.println("PUMP: Not enough energy? Free space?"); } } else { - if (!mRetractDone && ((aTick % 5) == 0) && ((this.mInventory[0] == null) || this.mInventory[0].stackSize == 0 || (GT_Utility.areStacksEqual(this.mInventory[0], MINING_PIPE) && (this.mInventory[0].stackSize < this.mInventory[0].getMaxStackSize())))) { + if (!mRetractDone + && ((aTick % 5) == 0) + && ((this.mInventory[0] == null) + || this.mInventory[0].stackSize == 0 + || (GT_Utility.areStacksEqual(this.mInventory[0], MINING_PIPE) + && (this.mInventory[0].stackSize + < this.mInventory[0].getMaxStackSize())))) { // try retract if all of these conditions are met // 1. not retracted yet // 2. once per 5 tick @@ -320,7 +348,9 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { final int tZCoord = this.getBaseMetaTileEntity().getZCoord(); this.getBaseMetaTileEntity().getWorld().setBlockToAir(tXCoord, tHeadY, tZCoord); if (tHeadY < this.getBaseMetaTileEntity().getYCoord() - 1) { - getBaseMetaTileEntity().getWorld().setBlock(tXCoord, tHeadY + 1, tZCoord, MINING_PIPE_TIP_BLOCK); + getBaseMetaTileEntity() + .getWorld() + .setBlock(tXCoord, tHeadY + 1, tZCoord, MINING_PIPE_TIP_BLOCK); } if (this.mInventory[0] == null) { final ItemStack copy = MINING_PIPE.copy(); @@ -345,13 +375,12 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { if (this.mFluid != null && (aTick % 20 == 0)) { // auto outputs on top every second or so - IFluidHandler tTank = aBaseMetaTileEntity.getITankContainerAtSide((byte)1); //1 is up. + IFluidHandler tTank = aBaseMetaTileEntity.getITankContainerAtSide((byte) 1); // 1 is up. if (tTank != null) { FluidStack tDrained = drain(1000, false); if (tDrained != null) { int tFilledAmount = tTank.fill(ForgeDirection.DOWN, tDrained, false); - if (tFilledAmount > 0) - tTank.fill(ForgeDirection.DOWN, drain(tFilledAmount, true), true); + if (tFilledAmount > 0) tTank.fill(ForgeDirection.DOWN, drain(tFilledAmount, true), true); } } } @@ -371,7 +400,9 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { } private boolean moveOneDown() { - if ((this.mInventory[0] == null) || (this.mInventory[0].stackSize < 1) || (!GT_Utility.areStacksEqual(this.mInventory[0], MINING_PIPE))) { + if ((this.mInventory[0] == null) + || (this.mInventory[0].stackSize < 1) + || (!GT_Utility.areStacksEqual(this.mInventory[0], MINING_PIPE))) { // No mining pipes if (debugBlockPump) { GT_Log.out.println("PUMP: No mining pipes"); @@ -390,15 +421,19 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { int x = getBaseMetaTileEntity().getXCoord(), z = getBaseMetaTileEntity().getZCoord(); - if ((!consumeFluid(x, yHead - 1, z)) && (!getBaseMetaTileEntity().getBlock(x, yHead - 1, z).isAir(getBaseMetaTileEntity().getWorld(), x, yHead - 1, z))) { + if ((!consumeFluid(x, yHead - 1, z)) + && (!getBaseMetaTileEntity() + .getBlock(x, yHead - 1, z) + .isAir(getBaseMetaTileEntity().getWorld(), x, yHead - 1, z))) { // Either we didn't consume a fluid, or it's a non Air block if (debugBlockPump) { GT_Log.out.println("PUMP: Did not consume fluid, or non-airblock found"); } return false; } - // Try to set the block below us to a a tip - if (!GT_Utility.setBlockByFakePlayer(getFakePlayer(getBaseMetaTileEntity()), x, yHead - 1, z, MINING_PIPE_TIP_BLOCK, 0, false)) { + // Try to set the block below us to a a tip + if (!GT_Utility.setBlockByFakePlayer( + getFakePlayer(getBaseMetaTileEntity()), x, yHead - 1, z, MINING_PIPE_TIP_BLOCK, 0, false)) { if (debugBlockPump) { GT_Log.out.println("PUMP: Could not set block below to new tip"); } @@ -419,14 +454,16 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { // Let's play find the pump head! // TODO: Handle pipe|pipe|head|pipe|pipe - int y = getBaseMetaTileEntity().getYCoord() - 1, x = getBaseMetaTileEntity().getXCoord(), z = getBaseMetaTileEntity().getZCoord(); + int y = getBaseMetaTileEntity().getYCoord() - 1, + x = getBaseMetaTileEntity().getXCoord(), + z = getBaseMetaTileEntity().getZCoord(); - while(y > 0) { + while (y > 0) { Block curBlock = getBaseMetaTileEntity().getBlock(x, y, z); - if(curBlock == MINING_PIPE_BLOCK) { + if (curBlock == MINING_PIPE_BLOCK) { y--; } else if (curBlock == MINING_PIPE_TIP_BLOCK) { - Block nextBlock = getBaseMetaTileEntity().getBlock(x, y - 1 , z); + Block nextBlock = getBaseMetaTileEntity().getBlock(x, y - 1, z); if (nextBlock == MINING_PIPE_BLOCK || nextBlock == MINING_PIPE_TIP_BLOCK) { // We're running into an existing set of pipes -- Turn this block into a pipe and keep going this.clearQueue(true); @@ -443,8 +480,10 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { } if (getBaseMetaTileEntity().getBlock(x, y, z) != MINING_PIPE_TIP_BLOCK) { - if (y != getBaseMetaTileEntity().getYCoord() - 1 && getBaseMetaTileEntity().getBlock(x, y + 1, z) == MINING_PIPE_BLOCK) { - // We're below the pump at the bottom of the pipes, we haven't found a tip; make the previous pipe a tip! + if (y != getBaseMetaTileEntity().getYCoord() - 1 + && getBaseMetaTileEntity().getBlock(x, y + 1, z) == MINING_PIPE_BLOCK) { + // We're below the pump at the bottom of the pipes, we haven't found a tip; make the previous pipe a + // tip! this.clearQueue(true); getBaseMetaTileEntity().getWorld().setBlock(x, y + 1, z, MINING_PIPE_TIP_BLOCK); if (debugBlockPump) { @@ -457,7 +496,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { } private void clearQueue(boolean checkPumping) { - if(checkPumping) { + if (checkPumping) { this.wasPumping = !this.mPumpList.isEmpty(); } else { this.wasPumping = false; @@ -473,8 +512,9 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { Set<ChunkPosition> checked = new HashSet<>(); this.clearQueue(false); - for (int aY = yStart ; this.mPumpList.isEmpty() && aY >= yEnd ; aY--) { - // Start at the top (presumably the block below the pump), and work our way down to the end (presumably the location of the pump Head) + for (int aY = yStart; this.mPumpList.isEmpty() && aY >= yEnd; aY--) { + // Start at the top (presumably the block below the pump), and work our way down to the end (presumably the + // location of the pump Head) // and build up a queue of fluids to pump fluidsToSearch.add(new ChunkPosition(aX, aY, aZ)); @@ -503,8 +543,10 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { } } - private boolean queueFluid(int aX, int aY, int aZ, ArrayDeque<ChunkPosition> fluidsFound, Set<ChunkPosition> checked) { - // If we haven't already looked at this coordinate set, and it's not already in the list of fluids found, see if there is + private boolean queueFluid( + int aX, int aY, int aZ, ArrayDeque<ChunkPosition> fluidsFound, Set<ChunkPosition> checked) { + // If we haven't already looked at this coordinate set, and it's not already in the list of fluids found, see if + // there is // a valid fluid and add it to the fluids found ChunkPosition tCoordinate = new ChunkPosition(aX, aY, aZ); if (checked.add(tCoordinate) && !fluidsFound.contains(tCoordinate)) { @@ -519,8 +561,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { private void checkForFluidToPump(int aX, int aY, int aZ) { // If we don't currently have a valid fluid to pump, try pumping the fluid at the given coordinates - if(this.hasValidFluid()) - return; + if (this.hasValidFluid()) return; Block aBlock = getBaseMetaTileEntity().getBlock(aX, aY, aZ); if (aBlock != null) { @@ -550,13 +591,13 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { Block aBlock = getBaseMetaTileEntity().getBlock(aX, aY, aZ); - return aBlock != null && - (aBlock == Blocks.water || - aBlock == Blocks.flowing_water || - aBlock == Blocks.lava || - aBlock == Blocks.flowing_lava || - aBlock instanceof IFluidBlock || - aBlock.isAir(getBaseMetaTileEntity().getWorld(), aX, aY, aZ)); + return aBlock != null + && (aBlock == Blocks.water + || aBlock == Blocks.flowing_water + || aBlock == Blocks.lava + || aBlock == Blocks.flowing_lava + || aBlock instanceof IFluidBlock + || aBlock.isAir(getBaseMetaTileEntity().getWorld(), aX, aY, aZ)); } private boolean consumeFluid(int aX, int aY, int aZ) { @@ -567,26 +608,28 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { Block aBlock = getBaseMetaTileEntity().getBlock(aX, aY, aZ); if (aBlock != null && ((this.mPrimaryPumpedBlock == aBlock) || (this.mSecondaryPumpedBlock == aBlock))) { - boolean isWaterOrLava = ((this.mPrimaryPumpedBlock == Blocks.water || this.mPrimaryPumpedBlock == Blocks.lava)); + boolean isWaterOrLava = + ((this.mPrimaryPumpedBlock == Blocks.water || this.mPrimaryPumpedBlock == Blocks.lava)); if (isWaterOrLava && getBaseMetaTileEntity().getMetaID(aX, aY, aZ) != 0) { - // Water/Lava that isn't a source block - do nothing here, but set the block to air and consume energy below + // Water/Lava that isn't a source block - do nothing here, but set the block to air and consume energy + // below if (debugBlockPump) { GT_Log.out.println("PUMP: Water/Lava - Not a source block"); } } else if (this.mFluid == null) { // The pump has no internal fluid - if (this.mPrimaryPumpedBlock == Blocks.water) - this.mFluid = GT_ModHandler.getWater(1000L); - else if (this.mPrimaryPumpedBlock == Blocks.lava) - this.mFluid = GT_ModHandler.getLava(1000L); + if (this.mPrimaryPumpedBlock == Blocks.water) this.mFluid = GT_ModHandler.getWater(1000L); + else if (this.mPrimaryPumpedBlock == Blocks.lava) this.mFluid = GT_ModHandler.getLava(1000L); else { // Not water or lava; try to drain and set to air - this.mFluid = ((IFluidBlock) aBlock).drain(getBaseMetaTileEntity().getWorld(), aX, aY, aZ, true); + this.mFluid = + ((IFluidBlock) aBlock).drain(getBaseMetaTileEntity().getWorld(), aX, aY, aZ, true); } - } else if (GT_ModHandler.isWater(this.mFluid) || GT_ModHandler.isLava(this.mFluid) || - this.mFluid.isFluidEqual(((IFluidBlock) aBlock).drain(getBaseMetaTileEntity().getWorld(), aX, aY, aZ, false))) - { + } else if (GT_ModHandler.isWater(this.mFluid) + || GT_ModHandler.isLava(this.mFluid) + || this.mFluid.isFluidEqual( + ((IFluidBlock) aBlock).drain(getBaseMetaTileEntity().getWorld(), aX, aY, aZ, false))) { if (!isWaterOrLava) { // Only set Block to Air for non lava/water fluids this.getBaseMetaTileEntity().getWorld().setBlockToAir(aX, aY, aZ); @@ -616,22 +659,27 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { } @Override - public ArrayList<String> getSpecialDebugInfo(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, int aLogLevel, ArrayList<String> aList) { - aList.addAll(Arrays.asList( EnumChatFormatting.BLUE+StatCollector.translateToLocal("GT5U.machines.pump")+EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.machines.workarea")+": " + EnumChatFormatting.GREEN + (radiusConfig * 2 + 1)+ - EnumChatFormatting.RESET+" " + StatCollector.translateToLocal("GT5U.machines.blocks"), - "Primary pumping fluid: " + (this.mPrimaryPumpedBlock != null ? this.mPrimaryPumpedBlock.getLocalizedName() : "None"), - "Secondary pumping fluid: " + (this.mSecondaryPumpedBlock != null ? this.mSecondaryPumpedBlock.getLocalizedName() : "None"), - "Pumps below: " + mPumpCountBelow, - "Queue size: " + mPumpList.size(), - "Pump head at Y: " + getYOfPumpHead(), - "Pump timer: " + mPumpTimer, - "Meta Entity Timer: " + getBaseMetaTileEntity().getTimer())); + public ArrayList<String> getSpecialDebugInfo( + IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, int aLogLevel, ArrayList<String> aList) { + aList.addAll(Arrays.asList( + EnumChatFormatting.BLUE + + StatCollector.translateToLocal("GT5U.machines.pump") + + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.machines.workarea") + ": " + EnumChatFormatting.GREEN + + (radiusConfig * 2 + 1) + EnumChatFormatting.RESET + " " + + StatCollector.translateToLocal("GT5U.machines.blocks"), + "Primary pumping fluid: " + + (this.mPrimaryPumpedBlock != null ? this.mPrimaryPumpedBlock.getLocalizedName() : "None"), + "Secondary pumping fluid: " + + (this.mSecondaryPumpedBlock != null ? this.mSecondaryPumpedBlock.getLocalizedName() : "None"), + "Pumps below: " + mPumpCountBelow, + "Queue size: " + mPumpList.size(), + "Pump head at Y: " + getYOfPumpHead(), + "Pump timer: " + mPumpTimer, + "Meta Entity Timer: " + getBaseMetaTileEntity().getTimer())); return aList; - } - @Override public boolean isSimpleMachine() { return false; @@ -712,7 +760,6 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { return true; } - @Override public int getCapacity() { return 16000 * this.mTier; @@ -724,8 +771,19 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], (aSide == 0 || aSide == 1) ? TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) : TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP)}; + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { + return new ITexture[] { + Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], + (aSide == 0 || aSide == 1) + ? TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) + : TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP) + }; } @Override @@ -735,10 +793,14 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{ - TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP), TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP), - TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP), TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP),}; + return new ITexture[] { + TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP), + TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP), + TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP), + TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP), + }; } + private FakePlayer mFakePlayer = null; protected FakePlayer getFakePlayer(IGregTechTileEntity aBaseTile) { @@ -750,10 +812,11 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { @Override public String[] getInfoData() { - return new String[]{ - EnumChatFormatting.BLUE+StatCollector.translateToLocal("GT5U.machines.pump")+EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.machines.workarea")+": " + EnumChatFormatting.GREEN + (radiusConfig * 2 + 1)+ - EnumChatFormatting.RESET+" " + StatCollector.translateToLocal("GT5U.machines.blocks") + return new String[] { + EnumChatFormatting.BLUE + StatCollector.translateToLocal("GT5U.machines.pump") + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.machines.workarea") + ": " + EnumChatFormatting.GREEN + + (radiusConfig * 2 + 1) + EnumChatFormatting.RESET + " " + + StatCollector.translateToLocal("GT5U.machines.blocks") }; } } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java index d6879d31b5..24f49ada10 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.machines.basic; +import static gregtech.api.enums.Textures.BlockIcons.*; + import gregtech.api.GregTech_API; import gregtech.api.enums.Element; import gregtech.api.enums.ItemList; @@ -14,68 +16,106 @@ import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gregtech.common.items.behaviors.Behaviour_DataOrb; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - import java.util.HashMap; import java.util.NoSuchElementException; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; -import static gregtech.api.enums.Textures.BlockIcons.*; - -public class GT_MetaTileEntity_Replicator - extends GT_MetaTileEntity_BasicMachine { +public class GT_MetaTileEntity_Replicator extends GT_MetaTileEntity_BasicMachine { public static final HashMap<Materials, Long> MASS_OVERRIDES = new HashMap<>(); public static final double EXPONENT = GregTech_API.sOPStuff.get("Replicator", "Nerf Exponent", 1.2D); private static int sHeaviestElementMass = 0; static { - //put overrides here - //ex. - //MASS_OVERRIDES.put(Materials.get("cake"),Materials.get("cake").getMass()); - //MASS_OVERRIDES.put(Materials.get("otherCake"),1235234L); - //MASS_OVERRIDES.put(Materials.Kalendrite,1235234L); - //MASS_OVERRIDES.put(Materials.Kalendrite,Materials.Kalendrite.getMass()*2); + // put overrides here + // ex. + // MASS_OVERRIDES.put(Materials.get("cake"),Materials.get("cake").getMass()); + // MASS_OVERRIDES.put(Materials.get("otherCake"),1235234L); + // MASS_OVERRIDES.put(Materials.Kalendrite,1235234L); + // MASS_OVERRIDES.put(Materials.Kalendrite,Materials.Kalendrite.getMass()*2); } public GT_MetaTileEntity_Replicator(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, "Producing Elemental Matter", 1, 1, "Replicator.png", "", + super( + aID, + aName, + aNameRegional, + aTier, + 1, + "Producing Elemental Matter", + 1, + 1, + "Replicator.png", + "", TextureFactory.of( TextureFactory.of(OVERLAY_SIDE_REPLICATOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_SIDE_REPLICATOR_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_REPLICATOR_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_SIDE_REPLICATOR), - TextureFactory.builder().addIcon(OVERLAY_SIDE_REPLICATOR_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_REPLICATOR_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_FRONT_REPLICATOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_REPLICATOR_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_REPLICATOR_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_FRONT_REPLICATOR), - TextureFactory.builder().addIcon(OVERLAY_FRONT_REPLICATOR_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_REPLICATOR_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_TOP_REPLICATOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_TOP_REPLICATOR_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_REPLICATOR_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_TOP_REPLICATOR), - TextureFactory.builder().addIcon(OVERLAY_TOP_REPLICATOR_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_REPLICATOR_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_BOTTOM_REPLICATOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_REPLICATOR_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_REPLICATOR_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_BOTTOM_REPLICATOR), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_REPLICATOR_GLOW).glow().build())); + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_REPLICATOR_GLOW) + .glow() + .build())); } - public GT_MetaTileEntity_Replicator(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + public GT_MetaTileEntity_Replicator( + String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } - public GT_MetaTileEntity_Replicator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + public GT_MetaTileEntity_Replicator( + String aName, + int aTier, + String[] aDescription, + ITexture[][][] aTextures, + String aGUIName, + String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Replicator(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); + return new GT_MetaTileEntity_Replicator( + this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); } public static long cubicFluidMultiplier(long amount) { @@ -87,8 +127,11 @@ public class GT_MetaTileEntity_Replicator FluidStack tFluid = getFillableStack(); if ((tFluid != null) && (tFluid.isFluidEqual(Materials.UUMatter.getFluid(1L)))) { ItemStack tDataOrb = getSpecialSlot(); - if ((ItemList.Tool_DataOrb.isStackEqual(tDataOrb, false, true)) && (Behaviour_DataOrb.getDataTitle(tDataOrb).equals("Elemental-Scan"))) { - Materials tMaterial = Element.get(Behaviour_DataOrb.getDataName(tDataOrb)).mLinkedMaterials.get(0); + if ((ItemList.Tool_DataOrb.isStackEqual(tDataOrb, false, true)) + && (Behaviour_DataOrb.getDataTitle(tDataOrb).equals("Elemental-Scan"))) { + Materials tMaterial = Element.get(Behaviour_DataOrb.getDataName(tDataOrb)) + .mLinkedMaterials + .get(0); long tMass = cubicFluidMultiplier(MASS_OVERRIDES.getOrDefault(tMaterial, tMaterial.getMass())); if ((tFluid.amount >= tMass) && (tMass > 0L)) { @@ -97,10 +140,11 @@ public class GT_MetaTileEntity_Replicator if (mMaxProgresstime == Integer.MAX_VALUE - 1 || mEUt == Integer.MAX_VALUE - 1) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; - if ((this.mOutputItems[0] = GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial, 1L)) == null) { - if ((this.mOutputItems[0] = GT_OreDictUnificator.get(OrePrefixes.cell, tMaterial, 1L)) != null) { - if ((this.mOutputFluid = GT_Utility.getFluidForFilledItem(this.mOutputItems[0], true)) == null) { + if ((this.mOutputItems[0] = GT_OreDictUnificator.get(OrePrefixes.cell, tMaterial, 1L)) + != null) { + if ((this.mOutputFluid = GT_Utility.getFluidForFilledItem(this.mOutputItems[0], true)) + == null) { if (ItemList.Cell_Empty.isStackEqual(getInputAt(0))) { if (canOutput(this.mOutputItems[0])) { getInputAt(0).stackSize -= 1; @@ -110,7 +154,9 @@ public class GT_MetaTileEntity_Replicator } } else { this.mOutputItems[0] = null; - if ((getDrainableStack() == null) || ((getDrainableStack().isFluidEqual(this.mOutputFluid)) && (getDrainableStack().amount < 16000))) { + if ((getDrainableStack() == null) + || ((getDrainableStack().isFluidEqual(this.mOutputFluid)) + && (getDrainableStack().amount < 16000))) { tFluid.amount = ((int) (tFluid.amount - tMass)); return 2; } @@ -132,8 +178,10 @@ public class GT_MetaTileEntity_Replicator } @Override - protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) && ItemList.Cell_Empty.isStackEqual(aStack); + protected boolean allowPutStackValidated( + IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) + && ItemList.Cell_Empty.isStackEqual(aStack); } @Override @@ -144,8 +192,11 @@ public class GT_MetaTileEntity_Replicator @Override public int getCapacity() { if ((sHeaviestElementMass == 0) && (GregTech_API.sPostloadFinished)) { - sHeaviestElementMass = Materials.getMaterialsMap().values().stream().mapToInt(material -> (int) cubicFluidMultiplier((int) material.getMass())).max().orElseThrow(NoSuchElementException::new); - //Make the Number nicer =) + sHeaviestElementMass = Materials.getMaterialsMap().values().stream() + .mapToInt(material -> (int) cubicFluidMultiplier((int) material.getMass())) + .max() + .orElseThrow(NoSuchElementException::new); + // Make the Number nicer =) sHeaviestElementMass = 1000 * (sHeaviestElementMass / 1000 + 1); } return sHeaviestElementMass; diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java index 09e1c6e107..889d8eb11f 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.machines.basic; +import static gregtech.api.enums.Textures.BlockIcons.*; + import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.ITexture; @@ -13,48 +15,88 @@ import gregtech.api.util.GT_Utility; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; -import static gregtech.api.enums.Textures.BlockIcons.*; - public class GT_MetaTileEntity_RockBreaker extends GT_MetaTileEntity_BasicMachine { public GT_MetaTileEntity_RockBreaker(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, "Put Lava and Water adjacent", 1, 1, "RockBreaker.png", "", + super( + aID, + aName, + aNameRegional, + aTier, + 1, + "Put Lava and Water adjacent", + 1, + 1, + "RockBreaker.png", + "", TextureFactory.of( TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER), - TextureFactory.builder().addIcon(OVERLAY_SIDE_ROCK_BREAKER_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_ROCK_BREAKER_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER), - TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER), - TextureFactory.builder().addIcon(OVERLAY_TOP_ROCK_BREAKER_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_ROCK_BREAKER_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_GLOW).glow().build())); + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_GLOW) + .glow() + .build())); } - public GT_MetaTileEntity_RockBreaker(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + public GT_MetaTileEntity_RockBreaker( + String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } - public GT_MetaTileEntity_RockBreaker(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + public GT_MetaTileEntity_RockBreaker( + String aName, + int aTier, + String[] aDescription, + ITexture[][][] aTextures, + String aGUIName, + String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_RockBreaker(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); + return new GT_MetaTileEntity_RockBreaker( + this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); } @Override @@ -63,8 +105,10 @@ public class GT_MetaTileEntity_RockBreaker extends GT_MetaTileEntity_BasicMachin } @Override - protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) && getRecipeList().containsInput(aStack); + protected boolean allowPutStackValidated( + IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) + && getRecipeList().containsInput(aStack); } @Override @@ -75,21 +119,28 @@ public class GT_MetaTileEntity_RockBreaker extends GT_MetaTileEntity_BasicMachin @Override public int checkRecipe() { IGregTechTileEntity aBaseMetaTileEntity = getBaseMetaTileEntity(); - if ((aBaseMetaTileEntity.getBlockOffset(0, 0, 1) == Blocks.water) || (aBaseMetaTileEntity.getBlockOffset(0, 0, -1) == Blocks.water) || (aBaseMetaTileEntity.getBlockOffset(-1, 0, 0) == Blocks.water) || (aBaseMetaTileEntity.getBlockOffset(1, 0, 0) == Blocks.water)) { + if ((aBaseMetaTileEntity.getBlockOffset(0, 0, 1) == Blocks.water) + || (aBaseMetaTileEntity.getBlockOffset(0, 0, -1) == Blocks.water) + || (aBaseMetaTileEntity.getBlockOffset(-1, 0, 0) == Blocks.water) + || (aBaseMetaTileEntity.getBlockOffset(1, 0, 0) == Blocks.water)) { ItemStack tOutput = null; if (aBaseMetaTileEntity.getBlockOffset(0, 1, 0) == Blocks.lava) { tOutput = new ItemStack(Blocks.stone, 1); - } else if ((aBaseMetaTileEntity.getBlockOffset(0, 0, 1) == Blocks.lava) || (aBaseMetaTileEntity.getBlockOffset(0, 0, -1) == Blocks.lava) || (aBaseMetaTileEntity.getBlockOffset(-1, 0, 0) == Blocks.lava) || (aBaseMetaTileEntity.getBlockOffset(1, 0, 0) == Blocks.lava)) { + } else if ((aBaseMetaTileEntity.getBlockOffset(0, 0, 1) == Blocks.lava) + || (aBaseMetaTileEntity.getBlockOffset(0, 0, -1) == Blocks.lava) + || (aBaseMetaTileEntity.getBlockOffset(-1, 0, 0) == Blocks.lava) + || (aBaseMetaTileEntity.getBlockOffset(1, 0, 0) == Blocks.lava)) { tOutput = new ItemStack(Blocks.cobblestone, 1); } if (tOutput != null) { - if(GT_Utility.areStacksEqual(getStackInSlot(getCircuitSlot()), GT_Utility.getIntegratedCircuit(1))){ - if (GT_Utility.areStacksEqual(getInputAt(0), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L))) { + if (GT_Utility.areStacksEqual(getStackInSlot(getCircuitSlot()), GT_Utility.getIntegratedCircuit(1))) { + if (GT_Utility.areStacksEqual( + getInputAt(0), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L))) { tOutput = new ItemStack(Blocks.obsidian, 1); if (canOutput(tOutput)) { getInputAt(0).stackSize -= 1; calculateOverclockedNess(32, 128); - //In case recipe is too OP for that machine + // In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; this.mOutputItems[0] = tOutput; @@ -97,8 +148,8 @@ public class GT_MetaTileEntity_RockBreaker extends GT_MetaTileEntity_BasicMachin } } } else if (canOutput(tOutput)) { - calculateOverclockedNess(32,16); - //In case recipe is too OP for that machine + calculateOverclockedNess(32, 16); + // In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; this.mOutputItems[0] = tOutput; diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java index 4bc9a56e2f..7780e56eee 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java @@ -1,5 +1,9 @@ package gregtech.common.tileentities.machines.basic; +import static gregtech.api.enums.GT_Values.*; +import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes; + import forestry.api.genetics.AlleleManager; import forestry.api.genetics.IIndividual; import gregtech.GT_Mod; @@ -20,58 +24,95 @@ import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gregtech.common.items.behaviors.Behaviour_DataOrb; +import java.util.Objects; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import java.util.Objects; - -import static gregtech.api.enums.GT_Values.*; -import static gregtech.api.enums.Textures.BlockIcons.*; -import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes; - public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { public GT_MetaTileEntity_Scanner(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, "Scans Crops and other things.", 1, 1, "Scanner.png", "", - TextureFactory.of( - TextureFactory.of(OVERLAY_SIDE_SCANNER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_SIDE_SCANNER_ACTIVE_GLOW).glow().build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_SIDE_SCANNER), - TextureFactory.builder().addIcon(OVERLAY_SIDE_SCANNER_GLOW).glow().build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_FRONT_SCANNER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_SCANNER_ACTIVE_GLOW).glow().build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_FRONT_SCANNER), - TextureFactory.builder().addIcon(OVERLAY_FRONT_SCANNER_GLOW).glow().build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_TOP_SCANNER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_TOP_SCANNER_ACTIVE_GLOW).glow().build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_TOP_SCANNER), - TextureFactory.builder().addIcon(OVERLAY_TOP_SCANNER_GLOW).glow().build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_BOTTOM_SCANNER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_SCANNER_ACTIVE_GLOW).glow().build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_BOTTOM_SCANNER), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_SCANNER_GLOW).glow().build())); + super( + aID, + aName, + aNameRegional, + aTier, + 1, + "Scans Crops and other things.", + 1, + 1, + "Scanner.png", + "", + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_SCANNER_ACTIVE), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_SCANNER_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_SCANNER), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_SCANNER_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_FRONT_SCANNER_ACTIVE), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_SCANNER_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_FRONT_SCANNER), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_SCANNER_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_TOP_SCANNER_ACTIVE), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_SCANNER_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_TOP_SCANNER), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_SCANNER_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_BOTTOM_SCANNER_ACTIVE), + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_SCANNER_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(OVERLAY_BOTTOM_SCANNER), + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_SCANNER_GLOW) + .glow() + .build())); } - public GT_MetaTileEntity_Scanner(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + public GT_MetaTileEntity_Scanner( + String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } - public GT_MetaTileEntity_Scanner(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + public GT_MetaTileEntity_Scanner( + String aName, + int aTier, + String[] aDescription, + ITexture[][][] aTextures, + String aGUIName, + String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Scanner(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); + return new GT_MetaTileEntity_Scanner( + this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); } @Override @@ -92,7 +133,7 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { tIndividual.writeToNBT(tNBT); this.mOutputItems[0].setTagCompound(tNBT); calculateOverclockedNess(2, 500); - //In case recipe is too OP for that machine + // In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; return 2; @@ -117,7 +158,7 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { if (tNBT.getByte("scan") < 4) { tNBT.setByte("scan", (byte) 4); calculateOverclockedNess(8, 160); - //In case recipe is too OP for that machine + // In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; } else { @@ -135,13 +176,18 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { aStack.stackSize -= 1; this.mOutputItems[0] = GT_Utility.copyAmount(1L, getSpecialSlot()); calculateOverclockedNess(30, 512); - //In case recipe is too OP for that machine + // In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; return 2; } ItemData tData = GT_OreDictUnificator.getAssociation(aStack); - if ((tData != null) && ((tData.mPrefix == OrePrefixes.dust) || (tData.mPrefix == OrePrefixes.cell)) && (tData.mMaterial.mMaterial.mElement != null) && (!tData.mMaterial.mMaterial.mElement.mIsIsotope) && (tData.mMaterial.mMaterial != Materials.Magic) && (tData.mMaterial.mMaterial.getMass() > 0L)) { + if ((tData != null) + && ((tData.mPrefix == OrePrefixes.dust) || (tData.mPrefix == OrePrefixes.cell)) + && (tData.mMaterial.mMaterial.mElement != null) + && (!tData.mMaterial.mMaterial.mElement.mIsIsotope) + && (tData.mMaterial.mMaterial != Materials.Magic) + && (tData.mMaterial.mMaterial.getMass() > 0L)) { getSpecialSlot().stackSize -= 1; aStack.stackSize -= 1; @@ -149,7 +195,7 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { Behaviour_DataOrb.setDataTitle(this.mOutputItems[0], "Elemental-Scan"); Behaviour_DataOrb.setDataName(this.mOutputItems[0], tData.mMaterial.mMaterial.mElement.name()); calculateOverclockedNess(30, GT_Utility.safeInt(tData.mMaterial.mMaterial.getMass() * 8192L)); - //In case recipe is too OP for that machine + // In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; return 2; @@ -160,7 +206,7 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { aStack.stackSize -= 1; this.mOutputItems[0] = GT_Utility.copyAmount(1L, getSpecialSlot()); calculateOverclockedNess(30, 128); - //In case recipe is too OP for that machine + // In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; return 2; @@ -173,7 +219,7 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { assert this.mOutputItems[0] != null; this.mOutputItems[0].setTagCompound(aStack.getTagCompound()); calculateOverclockedNess(30, 128); - //In case recipe is too OP for that machine + // In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; return 2; @@ -184,38 +230,67 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { this.mOutputItems[0] = GT_Utility.copyAmount(1L, getSpecialSlot()); assert this.mOutputItems[0] != null; - this.mOutputItems[0].setTagCompound(GT_Utility.getNBTContainingShort(new NBTTagCompound(), "map_id", (short) aStack.getItemDamage())); + this.mOutputItems[0].setTagCompound(GT_Utility.getNBTContainingShort( + new NBTTagCompound(), "map_id", (short) aStack.getItemDamage())); calculateOverclockedNess(30, 128); - //In case recipe is too OP for that machine + // In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; return 2; } - if ((aStack.getItem().getUnlocalizedName().contains("Schematic") || aStack.getItem().getUnlocalizedName().contains("schematic")) && !aStack.getItem().getUnlocalizedName().contains("Schematics")) { - if (mTier < 3) - return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + if ((aStack.getItem().getUnlocalizedName().contains("Schematic") + || aStack.getItem().getUnlocalizedName().contains("schematic")) + && !aStack.getItem().getUnlocalizedName().contains("Schematics")) { + if (mTier < 3) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; String sTier = ""; int stackItemID = Item.getIdFromItem(aStack.getItem()); int stackItemDamage = aStack.getItemDamage(); - if (stackItemID == Item.getIdFromItem(Objects.requireNonNull(GT_ModHandler.getModItem(MOD_ID_GC_CORE, "item.schematic", 1L, 0)).getItem())) { - if (stackItemDamage == 0 && aStack.toString().equals(Objects.requireNonNull(GT_ModHandler.getModItem(MOD_ID_GC_CORE, "item.schematic", 1L, 0)).copy().toString())) - sTier = "100"; - else if (stackItemDamage == 1 && aStack.toString().equals(Objects.requireNonNull(GT_ModHandler.getModItem(MOD_ID_GC_CORE, "item.schematic", 1L, 1)).copy().toString())) - sTier = "2"; + if (stackItemID + == Item.getIdFromItem(Objects.requireNonNull( + GT_ModHandler.getModItem(MOD_ID_GC_CORE, "item.schematic", 1L, 0)) + .getItem())) { + if (stackItemDamage == 0 + && aStack.toString() + .equals(Objects.requireNonNull(GT_ModHandler.getModItem( + MOD_ID_GC_CORE, "item.schematic", 1L, 0)) + .copy() + .toString())) sTier = "100"; + else if (stackItemDamage == 1 + && aStack.toString() + .equals(Objects.requireNonNull(GT_ModHandler.getModItem( + MOD_ID_GC_CORE, "item.schematic", 1L, 1)) + .copy() + .toString())) sTier = "2"; } else { - if (stackItemID == Item.getIdFromItem(Objects.requireNonNull(GT_ModHandler.getModItem(MOD_ID_GC_MARS, "item.schematic", 1L, 0)).getItem())) { - if (stackItemDamage == 0 && aStack.toString().equals(Objects.requireNonNull(GT_ModHandler.getModItem(MOD_ID_GC_MARS, "item.schematic", 1L, 0)).copy().toString())) - sTier = "3"; - else if (stackItemDamage == 1 && aStack.toString().equals(Objects.requireNonNull(GT_ModHandler.getModItem(MOD_ID_GC_MARS, "item.schematic", 1L, 1)).copy().toString())) - sTier = "101"; - else if (stackItemDamage == 2 && aStack.toString().equals(Objects.requireNonNull(GT_ModHandler.getModItem(MOD_ID_GC_MARS, "item.schematic", 1L, 2)).copy().toString())) - sTier = "102"; + if (stackItemID + == Item.getIdFromItem(Objects.requireNonNull( + GT_ModHandler.getModItem(MOD_ID_GC_MARS, "item.schematic", 1L, 0)) + .getItem())) { + if (stackItemDamage == 0 + && aStack.toString() + .equals(Objects.requireNonNull(GT_ModHandler.getModItem( + MOD_ID_GC_MARS, "item.schematic", 1L, 0)) + .copy() + .toString())) sTier = "3"; + else if (stackItemDamage == 1 + && aStack.toString() + .equals(Objects.requireNonNull(GT_ModHandler.getModItem( + MOD_ID_GC_MARS, "item.schematic", 1L, 1)) + .copy() + .toString())) sTier = "101"; + else if (stackItemDamage == 2 + && aStack.toString() + .equals(Objects.requireNonNull(GT_ModHandler.getModItem( + MOD_ID_GC_MARS, "item.schematic", 1L, 2)) + .copy() + .toString())) sTier = "102"; } else if (aStack.getUnlocalizedName().matches(".*\\d+.*")) - sTier = aStack.getUnlocalizedName().split("(?<=\\D)(?=\\d)")[1].substring(0, 1); - else - sTier = "1"; + sTier = aStack.getUnlocalizedName() + .split("(?<=\\D)(?=\\d)")[1] + .substring(0, 1); + else sTier = "1"; } getSpecialSlot().stackSize -= 1; @@ -223,15 +298,15 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { this.mOutputItems[0] = GT_Utility.copyAmount(1L, getSpecialSlot()); assert this.mOutputItems[0] != null; - this.mOutputItems[0].setTagCompound(GT_Utility.getNBTContainingShort(new NBTTagCompound(), "rocket_tier", Short.parseShort(sTier))); + this.mOutputItems[0].setTagCompound(GT_Utility.getNBTContainingShort( + new NBTTagCompound(), "rocket_tier", Short.parseShort(sTier))); calculateOverclockedNess(480, 36000); - //In case recipe is too OP for that machine + // In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; return 2; } - } if (getSpecialSlot() == null && ItemList.Tool_DataStick.isStackEqual(aStack, false, true)) { if (GT_Utility.ItemNBT.getBookTitle(aStack).equals("Raw Prospection Data")) { @@ -241,11 +316,10 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { this.mOutputItems[0] = GT_Utility.copyAmount(1L, aStack); calculateOverclockedNess(30, 1000); - //In case recipe is too OP for that machine + // In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; return 2; - } } if (ItemList.Tool_DataStick.isStackEqual(getSpecialSlot(), false, true)) { @@ -268,17 +342,15 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { if (GT_AssemblyLineUtils.setAssemblyLineRecipeOnDataStick(this.mOutputItems[0], tRecipe)) { aStack.stackSize -= 1; calculateOverclockedNess(30, tRecipe.mResearchTime); - //In case recipe is too OP for that machine + // In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; getSpecialSlot().stackSize -= 1; return 2; } - } } } - } return 0; } @@ -286,14 +358,16 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (mProgresstime >= (mMaxProgresstime - 1)) { - if ((this.mOutputItems[0] != null) && (this.mOutputItems[0].getUnlocalizedName().equals("gt.metaitem.01.32707"))) { - GT_Mod.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "scanning"); + if ((this.mOutputItems[0] != null) + && (this.mOutputItems[0].getUnlocalizedName().equals("gt.metaitem.01.32707"))) { + GT_Mod.achievements.issueAchievement( + aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), + "scanning"); } } super.onPostTick(aBaseMetaTileEntity, aTick); } - @Override public GT_Recipe.GT_Recipe_Map getRecipeList() { return sScannerFakeRecipes; @@ -305,8 +379,10 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { } @Override - protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) && getRecipeList().containsInput(aStack); + protected boolean allowPutStackValidated( + IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) + && getRecipeList().containsInput(aStack); } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java index b6ff782cfb..ff54291188 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.machines.basic; +import static gregtech.api.enums.Textures.BlockIcons.*; + import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -15,6 +17,8 @@ import gregtech.common.GT_UndergroundOil; import gregtech.common.blocks.GT_Block_Ores_Abstract; import gregtech.common.blocks.GT_TileEntity_Ores; import ic2.core.Ic2Items; +import java.util.ArrayList; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -23,115 +27,175 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.fluids.FluidStack; -import java.util.ArrayList; -import java.util.List; - -import static gregtech.api.enums.Textures.BlockIcons.*; - public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_BasicMachine { boolean ready = false; public GT_MetaTileEntity_SeismicProspector(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, - "(DEPRECATED, DO NOT USE! SWAP TO ADVANCED VERSION USING SHAPELESS RECIPE!)", 1, 1, - "Default.png", "", + super( + aID, + aName, + aNameRegional, + aTier, + 1, + "(DEPRECATED, DO NOT USE! SWAP TO ADVANCED VERSION USING SHAPELESS RECIPE!)", + 1, + 1, + "Default.png", + "", TextureFactory.of( TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER), - TextureFactory.builder().addIcon(OVERLAY_SIDE_ROCK_BREAKER_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_ROCK_BREAKER_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER), - TextureFactory.builder().addIcon(OVERLAY_TOP_ROCK_BREAKER_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_ROCK_BREAKER_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER), - TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW).glow().build()), + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW) + .glow() + .build()), TextureFactory.of( TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_GLOW).glow().build())); + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_GLOW) + .glow() + .build())); } - public GT_MetaTileEntity_SeismicProspector(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + public GT_MetaTileEntity_SeismicProspector( + String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } - public GT_MetaTileEntity_SeismicProspector(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + public GT_MetaTileEntity_SeismicProspector( + String aName, + int aTier, + String[] aDescription, + ITexture[][][] aTextures, + String aGUIName, + String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_SeismicProspector(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); + return new GT_MetaTileEntity_SeismicProspector( + this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); } @Override public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { if (aBaseMetaTileEntity.isServerSide()) { ItemStack aStack = aPlayer.getCurrentEquippedItem(); - ItemData stackData= GT_OreDictUnificator.getItemData(aStack); - if (!ready && (aStack != null) && ( - (aStack.getItem() == Item.getItemFromBlock(Blocks.tnt) && aStack.stackSize >= 2 ) || - (aStack.getItem() == Ic2Items.industrialTnt.getItem() && aStack.stackSize >= 1 ) || - (aStack.getItem() == Ic2Items.dynamite.getItem() && aStack.stackSize >= 4 ) || - (stackData!=null && stackData.mMaterial.mMaterial == Materials.Glyceryl && aStack.stackSize >= 1 ) || - (aStack.getItem() == ItemList.Block_Powderbarrel.getItem() && aStack.getItemDamage()==ItemList.Block_Powderbarrel.get(1).getItemDamage() && aStack.stackSize >= 8 ) - ) ) { + ItemData stackData = GT_OreDictUnificator.getItemData(aStack); + if (!ready + && (aStack != null) + && ((aStack.getItem() == Item.getItemFromBlock(Blocks.tnt) && aStack.stackSize >= 2) + || (aStack.getItem() == Ic2Items.industrialTnt.getItem() && aStack.stackSize >= 1) + || (aStack.getItem() == Ic2Items.dynamite.getItem() && aStack.stackSize >= 4) + || (stackData != null + && stackData.mMaterial.mMaterial == Materials.Glyceryl + && aStack.stackSize >= 1) + || (aStack.getItem() == ItemList.Block_Powderbarrel.getItem() + && aStack.getItemDamage() + == ItemList.Block_Powderbarrel.get(1) + .getItemDamage() + && aStack.stackSize >= 8))) { if ((!aPlayer.capabilities.isCreativeMode) && (aStack.stackSize != 111)) { - if(aStack.getItem() == Item.getItemFromBlock(Blocks.tnt)){ - aStack.stackSize -= 2; - }else if(aStack.getItem() == Ic2Items.industrialTnt.getItem()){ - aStack.stackSize -= 1; - }else if(aStack.getItem() == Ic2Items.dynamite.getItem()){ - aStack.stackSize -= 4; - }else if(aStack.getItem() == ItemList.Block_Powderbarrel.getItem() && aStack.getItemDamage()==ItemList.Block_Powderbarrel.get(1).getItemDamage()){ - aStack.stackSize -= 8; - }else{ - aStack.stackSize -= 1; + if (aStack.getItem() == Item.getItemFromBlock(Blocks.tnt)) { + aStack.stackSize -= 2; + } else if (aStack.getItem() == Ic2Items.industrialTnt.getItem()) { + aStack.stackSize -= 1; + } else if (aStack.getItem() == Ic2Items.dynamite.getItem()) { + aStack.stackSize -= 4; + } else if (aStack.getItem() == ItemList.Block_Powderbarrel.getItem() + && aStack.getItemDamage() + == ItemList.Block_Powderbarrel.get(1).getItemDamage()) { + aStack.stackSize -= 8; + } else { + aStack.stackSize -= 1; } } this.ready = true; this.mMaxProgresstime = 200; - } else if (ready && mMaxProgresstime == 0 && aStack != null && aStack.stackSize == 1 && aStack.getItem() == ItemList.Tool_DataStick.getItem()) { + } else if (ready + && mMaxProgresstime == 0 + && aStack != null + && aStack.stackSize == 1 + && aStack.getItem() == ItemList.Tool_DataStick.getItem()) { this.ready = false; GT_Utility.ItemNBT.setBookTitle(aPlayer.getCurrentEquippedItem(), "Raw Prospection Data"); List<String> tStringList = new ArrayList<String>(); - //range by tier - int min=-range(); - int max=range(); - int step=step(); + // range by tier + int min = -range(); + int max = range(); + int step = step(); for (int i = this.getBaseMetaTileEntity().getYCoord(); i > 0; i--) { - for (int f = min; f <= max; f+=step) { - for (int g = min; g <= max; g+=step) { + for (int f = min; f <= max; f += step) { + for (int g = min; g <= max; g += step) { Block tBlock = this.getBaseMetaTileEntity().getBlockOffset(f, -i, g); if ((tBlock instanceof GT_Block_Ores_Abstract)) { - TileEntity tTileEntity = getBaseMetaTileEntity().getWorld().getTileEntity(getBaseMetaTileEntity().getXCoord() + f, getBaseMetaTileEntity().getYCoord() + (-i), getBaseMetaTileEntity().getZCoord() + g); + TileEntity tTileEntity = getBaseMetaTileEntity() + .getWorld() + .getTileEntity( + getBaseMetaTileEntity().getXCoord() + f, + getBaseMetaTileEntity().getYCoord() + (-i), + getBaseMetaTileEntity().getZCoord() + g); if ((tTileEntity instanceof GT_TileEntity_Ores)) { - if(((GT_TileEntity_Ores) tTileEntity).mMetaData < 16000){ - Materials tMaterial = GregTech_API.sGeneratedMaterials[(((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000)]; - if ((tMaterial != null) && (tMaterial != Materials._NULL)) { - if (!tStringList.contains(tMaterial.mDefaultLocalName)) { - tStringList.add(tMaterial.mDefaultLocalName); + if (((GT_TileEntity_Ores) tTileEntity).mMetaData < 16000) { + Materials tMaterial = GregTech_API.sGeneratedMaterials[ + (((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000)]; + if ((tMaterial != null) && (tMaterial != Materials._NULL)) { + if (!tStringList.contains(tMaterial.mDefaultLocalName)) { + tStringList.add(tMaterial.mDefaultLocalName); + } } } - } } } else { - int tMetaID = getBaseMetaTileEntity().getWorld().getBlockMetadata(getBaseMetaTileEntity().getXCoord() + f, getBaseMetaTileEntity().getYCoord() + (-i), getBaseMetaTileEntity().getZCoord() + g); - ItemData tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(tBlock, 1, tMetaID)); - if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))) { + int tMetaID = getBaseMetaTileEntity() + .getWorld() + .getBlockMetadata( + getBaseMetaTileEntity().getXCoord() + f, + getBaseMetaTileEntity().getYCoord() + (-i), + getBaseMetaTileEntity().getZCoord() + g); + ItemData tAssotiation = + GT_OreDictUnificator.getAssociation(new ItemStack(tBlock, 1, tMetaID)); + if ((tAssotiation != null) + && (tAssotiation.mPrefix.toString().startsWith("ore"))) { if (!tStringList.contains(tAssotiation.mMaterial.mMaterial.mDefaultLocalName)) { tStringList.add(tAssotiation.mMaterial.mMaterial.mDefaultLocalName); } @@ -140,7 +204,9 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic } } } - if(tStringList.size()<1){tStringList.add("No Ores found.");} + if (tStringList.size() < 1) { + tStringList.add("No Ores found."); + } FluidStack tFluid = GT_UndergroundOil.undergroundOilReadInformation(getBaseMetaTileEntity()); String[] tStringArray = new String[tStringList.size()]; { @@ -148,7 +214,14 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic tStringArray[i] = tStringList.get(i); } } - GT_Utility.ItemNBT.setProspectionData(aPlayer.getCurrentEquippedItem(), this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord(), this.getBaseMetaTileEntity().getWorld().provider.dimensionId, tFluid, tStringArray); + GT_Utility.ItemNBT.setProspectionData( + aPlayer.getCurrentEquippedItem(), + this.getBaseMetaTileEntity().getXCoord(), + this.getBaseMetaTileEntity().getYCoord(), + this.getBaseMetaTileEntity().getZCoord(), + this.getBaseMetaTileEntity().getWorld().provider.dimensionId, + tFluid, + tStringArray); } } @@ -157,18 +230,24 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic private int range() { switch (mTier) { - case 1: return 16; - case 2: return 32; - case 3: return 48; + case 1: + return 16; + case 2: + return 32; + case 3: + return 48; } return 0; } - private int step(){ - switch (mTier){ - case 1: return 1; - case 2: return 3; - case 3: return 4; + private int step() { + switch (mTier) { + case 1: + return 1; + case 2: + return 3; + case 3: + return 4; } return 1; } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java index eb59f1f7e5..9dc00109cf 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java @@ -1,5 +1,14 @@ package gregtech.common.tileentities.machines.basic; +import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_SIDES; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_SIDES_GLOW; + import gregtech.api.enums.ConfigCategories; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -10,6 +19,7 @@ import gregtech.api.util.GT_Config; import gregtech.api.util.GT_Utility; import gregtech.common.gui.GT_Container_Teleporter; import gregtech.common.gui.GT_GUIContainer_Teleporter; +import java.util.List; import net.minecraft.client.particle.EntityFX; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityHanging; @@ -40,17 +50,6 @@ import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.fluids.FluidStack; -import java.util.List; - -import static gregtech.api.enums.GT_Values.V; -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_SIDES; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TELEPORTER_SIDES_GLOW; - public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { private static boolean sInterDimensionalTeleportAllowed = true; @@ -60,12 +59,16 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { public int mTargetX = 0; public int mTargetY = 0; public int mTargetZ = 0; - public int mTargetD = Integer.MIN_VALUE;//0 + public int mTargetD = Integer.MIN_VALUE; // 0 public boolean mDebug = false; - //public boolean hasEgg = false; + // public boolean hasEgg = false; public GT_MetaTileEntity_Teleporter(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 3, new String[]{"Teleport long distances with this little device.", "Use a Dragon Egg or Nitrogen Plasma", "for Inter-dimensional transmission"}); + super(aID, aName, aNameRegional, aTier, 3, new String[] { + "Teleport long distances with this little device.", + "Use a Dragon Egg or Nitrogen Plasma", + "for Inter-dimensional transmission" + }); } public GT_MetaTileEntity_Teleporter(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { @@ -97,7 +100,9 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { int tCount = 64; for (int i = 0; i < 36; i++) { if (tPlayer.inventory.getStackInSlot(i) != null) { - tCount += (tPlayer.inventory.getStackInSlot(i).getMaxStackSize() > 1 ? tPlayer.inventory.getStackInSlot(i).stackSize : 64); + tCount += (tPlayer.inventory.getStackInSlot(i).getMaxStackSize() > 1 + ? tPlayer.inventory.getStackInSlot(i).stackSize + : 64); } } for (int i = 0; i < 4; i++) { @@ -158,7 +163,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { @Override public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { if (aBaseMetaTileEntity.isClientSide()) return true; - //this.hasEgg = checkForEgg(); + // this.hasEgg = checkForEgg(); aBaseMetaTileEntity.openGUI(aPlayer); return true; } @@ -182,35 +187,57 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { public boolean isGivingInformation() { return true; } - @Override public String[] getInfoData() { - return new String[]{ - "Coordinates:", - "X: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.mTargetX) + EnumChatFormatting.RESET, - "Y: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.mTargetY) + EnumChatFormatting.RESET, - "Z: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.mTargetZ) + EnumChatFormatting.RESET, - "Dimension: " + EnumChatFormatting.GREEN+this.mTargetD+EnumChatFormatting.RESET, - "Dimension Valid: " + (GT_Utility.isRealDimension(this.mTargetD) ? EnumChatFormatting.GREEN+"Yes"+EnumChatFormatting.RESET : EnumChatFormatting.RED+"No"+EnumChatFormatting.RESET), - "Dimension Registered: " + (DimensionManager.isDimensionRegistered(this.mTargetD) ? EnumChatFormatting.GREEN+"Yes"+EnumChatFormatting.RESET : EnumChatFormatting.RED+"No"+EnumChatFormatting.RESET) + return new String[] { + "Coordinates:", + "X: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.mTargetX) + EnumChatFormatting.RESET, + "Y: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.mTargetY) + EnumChatFormatting.RESET, + "Z: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.mTargetZ) + EnumChatFormatting.RESET, + "Dimension: " + EnumChatFormatting.GREEN + this.mTargetD + EnumChatFormatting.RESET, + "Dimension Valid: " + + (GT_Utility.isRealDimension(this.mTargetD) + ? EnumChatFormatting.GREEN + "Yes" + EnumChatFormatting.RESET + : EnumChatFormatting.RED + "No" + EnumChatFormatting.RESET), + "Dimension Registered: " + + (DimensionManager.isDimensionRegistered(this.mTargetD) + ? EnumChatFormatting.GREEN + "Yes" + EnumChatFormatting.RESET + : EnumChatFormatting.RED + "No" + EnumChatFormatting.RESET) }; } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - if (aSide != this.getBaseMetaTileEntity().getFrontFacing()) return new ITexture[]{ + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { + if (aSide != this.getBaseMetaTileEntity().getFrontFacing()) + return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_TELEPORTER_SIDES), - TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_SIDES_GLOW).glow().build()}; - if (aActive) return new ITexture[]{ - MACHINE_CASINGS[mTier][aColorIndex + 1], - TextureFactory.of(OVERLAY_TELEPORTER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_ACTIVE_GLOW).glow().build()}; - return new ITexture[]{ + TextureFactory.builder() + .addIcon(OVERLAY_TELEPORTER_SIDES_GLOW) + .glow() + .build() + }; + if (aActive) + return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1], - TextureFactory.of(OVERLAY_TELEPORTER), - TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_GLOW).glow().build()}; + TextureFactory.of(OVERLAY_TELEPORTER_ACTIVE), + TextureFactory.builder() + .addIcon(OVERLAY_TELEPORTER_ACTIVE_GLOW) + .glow() + .build() + }; + return new ITexture[] { + MACHINE_CASINGS[mTier][aColorIndex + 1], + TextureFactory.of(OVERLAY_TELEPORTER), + TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_GLOW).glow().build() + }; } @Override @@ -235,26 +262,31 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { @Override public void onConfigLoad(GT_Config aConfig) { - sInterDimensionalTeleportAllowed = aConfig.get(ConfigCategories.machineconfig, "Teleporter.Interdimensional", true); - sPassiveEnergyDrain = aConfig.get(ConfigCategories.machineconfig, "Teleporter.PassiveDrain", sPassiveEnergyDrain); + sInterDimensionalTeleportAllowed = + aConfig.get(ConfigCategories.machineconfig, "Teleporter.Interdimensional", true); + sPassiveEnergyDrain = + aConfig.get(ConfigCategories.machineconfig, "Teleporter.PassiveDrain", sPassiveEnergyDrain); sPowerMultiplyer = aConfig.get(ConfigCategories.machineconfig, "Teleporter.PowerMultipler", sPowerMultiplyer); - sFPowerMultiplyer = sPowerMultiplyer / 100.0; + sFPowerMultiplyer = sPowerMultiplyer / 100.0; } @Override public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { if (getBaseMetaTileEntity().isServerSide()) { - if ((this.mTargetX == 0) && (this.mTargetY == 0) && (this.mTargetZ == 0) && (this.mTargetD == Integer.MIN_VALUE)) { + if ((this.mTargetX == 0) + && (this.mTargetY == 0) + && (this.mTargetZ == 0) + && (this.mTargetD == Integer.MIN_VALUE)) { this.mTargetX = aBaseMetaTileEntity.getXCoord(); this.mTargetY = aBaseMetaTileEntity.getYCoord(); this.mTargetZ = aBaseMetaTileEntity.getZCoord(); this.mTargetD = aBaseMetaTileEntity.getWorld().provider.dimensionId; } - //this.hasEgg = checkForEgg(); + // this.hasEgg = checkForEgg(); } } - - //public boolean checkForEgg() { + + // public boolean checkForEgg() { // for (byte i = -5; i <= 5; i = (byte) (i + 1)) { // for (byte j = -5; j <= 5; j = (byte) (j + 1)) { // for (byte k = -5; k <= 5; k = (byte) (k + 1)) { @@ -265,45 +297,50 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { // } // } // return false; - //} - - + // } public boolean hasDimensionalTeleportCapability() { - return this.mDebug || - //( - sInterDimensionalTeleportAllowed //&& - // ( - // this.hasEgg || - // mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)) && mFluid.amount >= 1000 - // ) - //) + return this.mDebug + || + // ( + sInterDimensionalTeleportAllowed // && + // ( + // this.hasEgg || + // mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)) && mFluid.amount >= 1000 + // ) + // ) ; } public boolean isDimensionalTeleportAvailable() { - return this.mDebug || (hasDimensionalTeleportCapability() && GT_Utility.isRealDimension(this.mTargetD) && GT_Utility.isRealDimension(getBaseMetaTileEntity().getWorld().provider.dimensionId)); + return this.mDebug + || (hasDimensionalTeleportCapability() + && GT_Utility.isRealDimension(this.mTargetD) + && GT_Utility.isRealDimension(getBaseMetaTileEntity().getWorld().provider.dimensionId)); } @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if (mFluid != null) {//Was if null -> Materials.Nitrogen.getPlasma(0); + if (mFluid != null) { // Was if null -> Materials.Nitrogen.getPlasma(0); mFluid = null; } super.onPostTick(aBaseMetaTileEntity, aTick); if (getBaseMetaTileEntity().isServerSide()) { - //if (getBaseMetaTileEntity().getTimer() % 100L == 50L) { + // if (getBaseMetaTileEntity().getTimer() % 100L == 50L) { // this.hasEgg = checkForEgg(); - //} - if ((getBaseMetaTileEntity().isAllowedToWork()) && (getBaseMetaTileEntity().getRedstone())) { + // } + if ((getBaseMetaTileEntity().isAllowedToWork()) + && (getBaseMetaTileEntity().getRedstone())) { if (getBaseMetaTileEntity().decreaseStoredEnergyUnits(sPassiveEnergyDrain, false)) { - //if (hasDimensionalTeleportCapability() && this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId && (hasEgg || mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)))&& new XSTR().nextInt(10)==0) { + // if (hasDimensionalTeleportCapability() && this.mTargetD != + // getBaseMetaTileEntity().getWorld().provider.dimensionId && (hasEgg || + // mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)))&& new XSTR().nextInt(10)==0) { // mFluid.amount--; // if (mFluid.amount < 1) { // mFluid = null; // } - //} + // } int tDistance = distanceCalculation(); if (mInventory[0] != null) { TileEntity tTile = null; @@ -317,45 +354,105 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { } if (tTile instanceof IInventory) { int tStacksize = mInventory[0].stackSize; - GT_Utility.moveOneItemStack(this, tTile, (byte) 0, (byte) 0, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1); + GT_Utility.moveOneItemStack( + this, tTile, (byte) 0, (byte) 0, null, false, (byte) 64, (byte) 1, (byte) 64, + (byte) 1); if (mInventory[0] == null || mInventory[0].stackSize < tStacksize) { - getBaseMetaTileEntity().decreaseStoredEnergyUnits((long) (Math.pow(tDistance, 1.5) * tDistance * (tStacksize - (mInventory[0] == null ? 0 : mInventory[0].stackSize)) * sFPowerMultiplyer), false); + getBaseMetaTileEntity() + .decreaseStoredEnergyUnits( + (long) (Math.pow(tDistance, 1.5) + * tDistance + * (tStacksize + - (mInventory[0] == null ? 0 : mInventory[0].stackSize)) + * sFPowerMultiplyer), + false); } } - } - List entities_in_box = getBaseMetaTileEntity().getWorld().getEntitiesWithinAABB( - Entity.class,AxisAlignedBB.getBoundingBox( - getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(),2) - 1, - getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 2) - 1, - getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 2) - 1, - getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 2) + 2, - getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 2) + 2, - getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 2) + 2) - ); + List entities_in_box = getBaseMetaTileEntity() + .getWorld() + .getEntitiesWithinAABB( + Entity.class, + AxisAlignedBB.getBoundingBox( + getBaseMetaTileEntity() + .getOffsetX( + getBaseMetaTileEntity() + .getFrontFacing(), + 2) + - 1, + getBaseMetaTileEntity() + .getOffsetY( + getBaseMetaTileEntity() + .getFrontFacing(), + 2) + - 1, + getBaseMetaTileEntity() + .getOffsetZ( + getBaseMetaTileEntity() + .getFrontFacing(), + 2) + - 1, + getBaseMetaTileEntity() + .getOffsetX( + getBaseMetaTileEntity() + .getFrontFacing(), + 2) + + 2, + getBaseMetaTileEntity() + .getOffsetY( + getBaseMetaTileEntity() + .getFrontFacing(), + 2) + + 2, + getBaseMetaTileEntity() + .getOffsetZ( + getBaseMetaTileEntity() + .getFrontFacing(), + 2) + + 2)); for (Object tObject : entities_in_box) { if (((tObject instanceof Entity)) && (!((Entity) tObject).isDead)) { Entity tEntity = (Entity) tObject; -// GT_FML_LOGGER.info("teleport"+(Math.pow(tDistance, 1.5))); - if (getBaseMetaTileEntity().decreaseStoredEnergyUnits((long) (Math.pow(tDistance, 1.5) * weightCalculation(tEntity) * sFPowerMultiplyer), false)) { - //if (hasDimensionalTeleportCapability() && this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId && (hasEgg || mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)))) { - // mFluid.amount = mFluid.amount - ((int) Math.min(10, (Math.pow(tDistance, 1.5) * weightCalculation(tEntity) / 8192))); + // GT_FML_LOGGER.info("teleport"+(Math.pow(tDistance, 1.5))); + if (getBaseMetaTileEntity() + .decreaseStoredEnergyUnits( + (long) (Math.pow(tDistance, 1.5) + * weightCalculation(tEntity) + * sFPowerMultiplyer), + false)) { + // if (hasDimensionalTeleportCapability() && this.mTargetD != + // getBaseMetaTileEntity().getWorld().provider.dimensionId && (hasEgg || + // mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)))) { + // mFluid.amount = mFluid.amount - ((int) Math.min(10, (Math.pow(tDistance, 1.5) * + // weightCalculation(tEntity) / 8192))); // if (mFluid.amount < 1) { // mFluid = null; // } - //} + // } if (tEntity.ridingEntity != null) { tEntity.mountEntity(null); } if (tEntity.riddenByEntity != null) { tEntity.riddenByEntity.mountEntity(null); } - if ((this.mTargetD == getBaseMetaTileEntity().getWorld().provider.dimensionId) || (!isDimensionalTeleportAvailable()) || (!GT_Utility.moveEntityToDimensionAtCoords(tEntity, this.mTargetD, this.mTargetX + 0.5D, this.mTargetY + 0.5D, this.mTargetZ + 0.5D))) { + if ((this.mTargetD == getBaseMetaTileEntity().getWorld().provider.dimensionId) + || (!isDimensionalTeleportAvailable()) + || (!GT_Utility.moveEntityToDimensionAtCoords( + tEntity, + this.mTargetD, + this.mTargetX + 0.5D, + this.mTargetY + 0.5D, + this.mTargetZ + 0.5D))) { if ((tEntity instanceof EntityLivingBase)) { - ((EntityLivingBase) tEntity).setPositionAndUpdate(this.mTargetX + 0.5D, this.mTargetY + 0.5D, this.mTargetZ + 0.5D); + ((EntityLivingBase) tEntity) + .setPositionAndUpdate( + this.mTargetX + 0.5D, + this.mTargetY + 0.5D, + this.mTargetZ + 0.5D); } else { - tEntity.setPosition(this.mTargetX + 0.5D, this.mTargetY + 0.5D, this.mTargetZ + 0.5D); + tEntity.setPosition( + this.mTargetX + 0.5D, this.mTargetY + 0.5D, this.mTargetZ + 0.5D); } } } @@ -370,7 +467,13 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { } private int distanceCalculation() { - return Math.abs(((this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId) && (isDimensionalTeleportAvailable()) ? 4000 : (int) Math.sqrt(Math.pow(getBaseMetaTileEntity().getXCoord() - this.mTargetX, 2.0D) + Math.pow(getBaseMetaTileEntity().getYCoord() - this.mTargetY, 2.0D) + Math.pow(getBaseMetaTileEntity().getZCoord() - this.mTargetZ, 2.0D)))); + return Math.abs( + ((this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId) + && (isDimensionalTeleportAvailable()) + ? 4000 + : (int) Math.sqrt(Math.pow(getBaseMetaTileEntity().getXCoord() - this.mTargetX, 2.0D) + + Math.pow(getBaseMetaTileEntity().getYCoord() - this.mTargetY, 2.0D) + + Math.pow(getBaseMetaTileEntity().getZCoord() - this.mTargetZ, 2.0D)))); } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineBase.java b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineBase.java index a74f8123ec..143548cfaa 100644 --- a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineBase.java +++ b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineBase.java @@ -19,9 +19,15 @@ * You should have received a copy of the GNU Lesser General Public License * along with GregTech. If not, see <http://www.gnu.org/licenses/>. */ - package gregtech.common.tileentities.machines.long_distance; +import static mcp.mobius.waila.api.SpecialChars.BLUE; +import static mcp.mobius.waila.api.SpecialChars.GOLD; +import static mcp.mobius.waila.api.SpecialChars.GREEN; +import static mcp.mobius.waila.api.SpecialChars.RED; +import static mcp.mobius.waila.api.SpecialChars.RESET; +import static mcp.mobius.waila.api.SpecialChars.YELLOW; + import gregtech.api.GregTech_API; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -30,6 +36,13 @@ import gregtech.api.items.GT_Block_LongDistancePipe; import gregtech.api.metatileentity.BaseMetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_NonElectric; import gregtech.api.util.GT_Utility; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; import net.minecraft.block.Block; @@ -42,32 +55,19 @@ import net.minecraft.util.ChunkCoordinates; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.Queue; - -import static mcp.mobius.waila.api.SpecialChars.BLUE; -import static mcp.mobius.waila.api.SpecialChars.GOLD; -import static mcp.mobius.waila.api.SpecialChars.GREEN; -import static mcp.mobius.waila.api.SpecialChars.RED; -import static mcp.mobius.waila.api.SpecialChars.RESET; -import static mcp.mobius.waila.api.SpecialChars.YELLOW; - public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_MetaTileEntity_BasicHull_NonElectric { public static int minimalDistancePoints = 64; protected GT_MetaTileEntity_LongDistancePipelineBase mTarget = null, mSender = null; protected ChunkCoordinates mTargetPos = null; protected GT_MetaTileEntity_LongDistancePipelineBase mTooCloseTarget = null, mTooCloseSender = null; - public GT_MetaTileEntity_LongDistancePipelineBase(int aID, String aName, String aNameRegional, int aTier, String aDescription) { + public GT_MetaTileEntity_LongDistancePipelineBase( + int aID, String aName, String aNameRegional, int aTier, String aDescription) { super(aID, aName, aNameRegional, aTier, aDescription); } - public GT_MetaTileEntity_LongDistancePipelineBase(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_LongDistancePipelineBase( + String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @@ -87,12 +87,8 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta super.loadNBTData(aNBT); if (aNBT.hasKey("target")) { mTargetPos = new ChunkCoordinates( - aNBT.getInteger("target.x"), - aNBT.getInteger("target.y"), - aNBT.getInteger("target.z") - ); - if (getDistanceToSelf(mTargetPos) < minimalDistancePoints) - mTargetPos = null; + aNBT.getInteger("target.x"), aNBT.getInteger("target.y"), aNBT.getInteger("target.z")); + if (getDistanceToSelf(mTargetPos) < minimalDistancePoints) mTargetPos = null; } } @@ -133,23 +129,26 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta // Only check if the target position is loaded TileEntity te = world.getTileEntity(mTargetPos.posX, mTargetPos.posY, mTargetPos.posZ); final IMetaTileEntity tMeta; - if (te instanceof BaseMetaTileEntity && - ((tMeta = ((BaseMetaTileEntity)te).getMetaTileEntity()) instanceof GT_MetaTileEntity_LongDistancePipelineBase) && - isSameClass((GT_MetaTileEntity_LongDistancePipelineBase)tMeta)) - { + if (te instanceof BaseMetaTileEntity + && ((tMeta = ((BaseMetaTileEntity) te).getMetaTileEntity()) + instanceof GT_MetaTileEntity_LongDistancePipelineBase) + && isSameClass((GT_MetaTileEntity_LongDistancePipelineBase) tMeta)) { // It's the right type! - mTarget = (GT_MetaTileEntity_LongDistancePipelineBase)tMeta; - } - else if (te != null) { + mTarget = (GT_MetaTileEntity_LongDistancePipelineBase) tMeta; + } else if (te != null) { // It isn't the right type, kill the target position mTargetPos = null; } } } - if (mTooCloseTarget != null && mTooCloseTarget.mSender == null) mTooCloseTarget.mTooCloseSender = this; - if (mTooCloseSender != null && (mTooCloseSender.isDead() || mTooCloseSender.mTarget != null)) mTooCloseSender = null; + if (mTooCloseTarget != null && mTooCloseTarget.mSender == null) mTooCloseTarget.mTooCloseSender = this; + if (mTooCloseSender != null && (mTooCloseSender.isDead() || mTooCloseSender.mTarget != null)) + mTooCloseSender = null; if (mTarget == null || mTarget == this) return false; - if (mTarget.mSender == null || mTarget.mSender.isDead() || mTarget.mSender.mTarget == null || mTarget.mSender.mTarget.isDead()) { + if (mTarget.mSender == null + || mTarget.mSender.isDead() + || mTarget.mSender.mTarget == null + || mTarget.mSender.mTarget.isDead()) { mTarget.mSender = this; mTarget.mTooCloseSender = null; } @@ -158,19 +157,20 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta } @Override - public ArrayList<String> getSpecialDebugInfo(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, int aLogLevel, ArrayList<String> aList) { + public ArrayList<String> getSpecialDebugInfo( + IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, int aLogLevel, ArrayList<String> aList) { if (mSender != null && !mSender.isDead() && mSender.mTarget == this) { final ChunkCoordinates coords = mSender.getCoords(); - aList.addAll(Arrays.asList("Is the Target", "Sender is at: X: " + coords.posX + " Y: " + coords.posY + " Z: " + coords.posZ)); + aList.addAll(Arrays.asList( + "Is the Target", "Sender is at: X: " + coords.posX + " Y: " + coords.posY + " Z: " + coords.posZ)); } else { - aList.addAll( - Arrays.asList(checkTarget() ? "Has Target" : "Has no loaded Target", - "Target should be around: X: " + mTargetPos.posX + " Y: " + mTargetPos.posY + " Z: " + mTargetPos.posZ - )); + aList.addAll(Arrays.asList( + checkTarget() ? "Has Target" : "Has no loaded Target", + "Target should be around: X: " + mTargetPos.posX + " Y: " + mTargetPos.posY + " Z: " + + mTargetPos.posZ)); } return aList; - } // What meta should the pipes for this pipeline have @@ -193,44 +193,55 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta // Start scanning from the output side Block aBlock = gtTile.getBlockAtSide(gtTile.getBackFacing()); - if(aBlock instanceof GT_Block_LongDistancePipe) { + if (aBlock instanceof GT_Block_LongDistancePipe) { byte aMetaData = gtTile.getMetaIDAtSide(gtTile.getBackFacing()); if (aMetaData != getPipeMeta()) return; - HashSet<ChunkCoordinates> - tVisited = new HashSet<>(Collections.singletonList(getCoords())), - tWires = new HashSet<>(); - Queue<ChunkCoordinates> - tQueue = new LinkedList<>(Collections.singletonList(getFacingOffset(gtTile, gtTile.getBackFacing()))); + HashSet<ChunkCoordinates> tVisited = new HashSet<>(Collections.singletonList(getCoords())), + tWires = new HashSet<>(); + Queue<ChunkCoordinates> tQueue = + new LinkedList<>(Collections.singletonList(getFacingOffset(gtTile, gtTile.getBackFacing()))); while (!tQueue.isEmpty()) { final ChunkCoordinates aCoords = tQueue.poll(); - if(world.getBlock(aCoords.posX, aCoords.posY, aCoords.posZ) == aBlock && world.getBlockMetadata(aCoords.posX, aCoords.posY, aCoords.posZ) == aMetaData) { + if (world.getBlock(aCoords.posX, aCoords.posY, aCoords.posZ) == aBlock + && world.getBlockMetadata(aCoords.posX, aCoords.posY, aCoords.posZ) == aMetaData) { // We've got another pipe/wire block // TODO: Make sure it's the right type of pipe/wire via meta ChunkCoordinates tCoords; tWires.add(aCoords); - // For each direction, if we haven't already visisted that coordinate, add it to the end of the queue - if (tVisited.add(tCoords = new ChunkCoordinates(aCoords.posX + 1, aCoords.posY, aCoords.posZ))) tQueue.add(tCoords); - if (tVisited.add(tCoords = new ChunkCoordinates(aCoords.posX - 1, aCoords.posY, aCoords.posZ))) tQueue.add(tCoords); - if (tVisited.add(tCoords = new ChunkCoordinates(aCoords.posX, aCoords.posY + 1, aCoords.posZ))) tQueue.add(tCoords); - if (tVisited.add(tCoords = new ChunkCoordinates(aCoords.posX, aCoords.posY - 1, aCoords.posZ))) tQueue.add(tCoords); - if (tVisited.add(tCoords = new ChunkCoordinates(aCoords.posX, aCoords.posY, aCoords.posZ + 1))) tQueue.add(tCoords); - if (tVisited.add(tCoords = new ChunkCoordinates(aCoords.posX, aCoords.posY, aCoords.posZ - 1))) tQueue.add(tCoords); + // For each direction, if we haven't already visisted that coordinate, add it to the end of the + // queue + if (tVisited.add(tCoords = new ChunkCoordinates(aCoords.posX + 1, aCoords.posY, aCoords.posZ))) + tQueue.add(tCoords); + if (tVisited.add(tCoords = new ChunkCoordinates(aCoords.posX - 1, aCoords.posY, aCoords.posZ))) + tQueue.add(tCoords); + if (tVisited.add(tCoords = new ChunkCoordinates(aCoords.posX, aCoords.posY + 1, aCoords.posZ))) + tQueue.add(tCoords); + if (tVisited.add(tCoords = new ChunkCoordinates(aCoords.posX, aCoords.posY - 1, aCoords.posZ))) + tQueue.add(tCoords); + if (tVisited.add(tCoords = new ChunkCoordinates(aCoords.posX, aCoords.posY, aCoords.posZ + 1))) + tQueue.add(tCoords); + if (tVisited.add(tCoords = new ChunkCoordinates(aCoords.posX, aCoords.posY, aCoords.posZ - 1))) + tQueue.add(tCoords); } else { // It's not a block - let's see if it's a tile entity TileEntity tTileEntity = world.getTileEntity(aCoords.posX, aCoords.posY, aCoords.posZ); - if ( - tTileEntity != gtTile && tTileEntity instanceof BaseMetaTileEntity && - ((BaseMetaTileEntity)tTileEntity).getMetaTileEntity() instanceof GT_MetaTileEntity_LongDistancePipelineBase) - { - final GT_MetaTileEntity_LongDistancePipelineBase tGtTile = (GT_MetaTileEntity_LongDistancePipelineBase)((BaseMetaTileEntity) tTileEntity).getMetaTileEntity(); - if (isSameClass(tGtTile) && tWires.contains( - tGtTile.getFacingOffset((BaseMetaTileEntity)tTileEntity, ((BaseMetaTileEntity) tTileEntity).getFrontFacing()) - )) { - // If it's the same class, and we've scanned a wire in front of it (the input side), we've found our target + if (tTileEntity != gtTile + && tTileEntity instanceof BaseMetaTileEntity + && ((BaseMetaTileEntity) tTileEntity).getMetaTileEntity() + instanceof GT_MetaTileEntity_LongDistancePipelineBase) { + final GT_MetaTileEntity_LongDistancePipelineBase tGtTile = + (GT_MetaTileEntity_LongDistancePipelineBase) + ((BaseMetaTileEntity) tTileEntity).getMetaTileEntity(); + if (isSameClass(tGtTile) + && tWires.contains(tGtTile.getFacingOffset( + (BaseMetaTileEntity) tTileEntity, + ((BaseMetaTileEntity) tTileEntity).getFrontFacing()))) { + // If it's the same class, and we've scanned a wire in front of it (the input side), we've + // found our target // still need to check if it's distant enough int distance = getDistanceToSelf(aCoords); if (distance > minimalDistancePoints) { @@ -245,27 +256,25 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta } } - // Remove this block from the visited because we might end up back here from another wire that IS connected to the + // Remove this block from the visited because we might end up back here from another wire that + // IS connected to the // input side tVisited.remove(aCoords); } } } } - } protected int getDistanceToSelf(ChunkCoordinates aCoords) { - return Math.abs(getBaseMetaTileEntity().getXCoord() - aCoords.posX) + - Math.abs(getBaseMetaTileEntity().getYCoord() - aCoords.posY) / 2 + - Math.abs(getBaseMetaTileEntity().getZCoord() - aCoords.posZ); + return Math.abs(getBaseMetaTileEntity().getXCoord() - aCoords.posX) + + Math.abs(getBaseMetaTileEntity().getYCoord() - aCoords.posY) / 2 + + Math.abs(getBaseMetaTileEntity().getZCoord() - aCoords.posZ); } public ChunkCoordinates getFacingOffset(IGregTechTileEntity gt_tile, byte aSide) { return new ChunkCoordinates( - gt_tile.getOffsetX(aSide, 1), gt_tile.getOffsetY(aSide, 1), gt_tile.getOffsetZ(aSide, 1) - ); - + gt_tile.getOffsetX(aSide, 1), gt_tile.getOffsetY(aSide, 1), gt_tile.getOffsetZ(aSide, 1)); } public ChunkCoordinates getCoords() { @@ -275,8 +284,9 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta @Override public void onMachineBlockUpdate() { - //GT_Mod.GT_FML_LOGGER.info("You're dead to me"); - mTargetPos = null; mSender = null; + // GT_Mod.GT_FML_LOGGER.info("You're dead to me"); + mTargetPos = null; + mSender = null; } @Override @@ -285,42 +295,37 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta } @Override - public boolean shouldTriggerBlockUpdate() { return true; } + public boolean shouldTriggerBlockUpdate() { + return true; + } @Override - public void getWailaBody(ItemStack itemStack, List<String> currentTip, IWailaDataAccessor accessor, IWailaConfigHandler config) { + public void getWailaBody( + ItemStack itemStack, List<String> currentTip, IWailaDataAccessor accessor, IWailaConfigHandler config) { final NBTTagCompound tag = accessor.getNBTData(); final int facing = getBaseMetaTileEntity().getFrontFacing(); final int side = (byte) accessor.getSide().ordinal(); - if (side == facing) - currentTip.add(GOLD + "Pipeline Input" + RESET); - else if (side == ForgeDirection.OPPOSITES[facing]) - currentTip.add(BLUE + "Pipeline Output" + RESET); - else - currentTip.add("Pipeline Side"); + if (side == facing) currentTip.add(GOLD + "Pipeline Input" + RESET); + else if (side == ForgeDirection.OPPOSITES[facing]) currentTip.add(BLUE + "Pipeline Output" + RESET); + else currentTip.add("Pipeline Side"); - if (tag.getBoolean("hasSender")) - currentTip.add("Other End of Input: " + GREEN + "distance" + RESET); + if (tag.getBoolean("hasSender")) currentTip.add("Other End of Input: " + GREEN + "distance" + RESET); else if (tag.getBoolean("hasTooCloseSender")) currentTip.add("Other End of Input: " + RED + "too close" + RESET); - else - currentTip.add("Other End of Input: " + YELLOW + "cannot found(may need to update other end)" + RESET); + else currentTip.add("Other End of Input: " + YELLOW + "cannot found(may need to update other end)" + RESET); - if (tag.getBoolean("hasTarget")) - currentTip.add("Other End of Output: " + GREEN + "distance" + RESET); + if (tag.getBoolean("hasTarget")) currentTip.add("Other End of Output: " + GREEN + "distance" + RESET); else if (tag.getBoolean("hasTooCloseTarget")) currentTip.add("Other End of Output: " + RED + "too close" + RESET); - else - currentTip.add("Other End of Output: " + YELLOW + "cannot found" + RESET); + else currentTip.add("Other End of Output: " + YELLOW + "cannot found" + RESET); super.getWailaBody(itemStack, currentTip, accessor, config); - } - @Override - public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, int z) { + public void getWailaNBTData( + EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, int z) { super.getWailaNBTData(player, tile, tag, world, x, y, z); tag.setBoolean("hasSender", mSender != null); diff --git a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineFluid.java b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineFluid.java index fe0a8527ab..849ce40101 100644 --- a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineFluid.java +++ b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineFluid.java @@ -19,9 +19,14 @@ * You should have received a copy of the GNU Lesser General Public License * along with GregTech. If not, see <http://www.gnu.org/licenses/>. */ - package gregtech.common.tileentities.machines.long_distance; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPELINE_FLUID_BACK; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPELINE_FLUID_FRONT; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPELINE_FLUID_SIDE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPELINE_FLUID_SIDE_GLOW; + import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -33,12 +38,6 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPELINE_FLUID_BACK; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPELINE_FLUID_FRONT; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPELINE_FLUID_SIDE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPELINE_FLUID_SIDE_GLOW; - public class GT_MetaTileEntity_LongDistancePipelineFluid extends GT_MetaTileEntity_LongDistancePipelineBase { static final FluidTankInfo[] emptyTank = {new FluidTankInfo(null, Integer.MAX_VALUE)}; @@ -46,7 +45,8 @@ public class GT_MetaTileEntity_LongDistancePipelineFluid extends GT_MetaTileEnti super(aID, aName, aNameRegional, aTier, "Sends fluids over long distances"); } - public GT_MetaTileEntity_LongDistancePipelineFluid(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_LongDistancePipelineFluid( + String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @@ -63,7 +63,7 @@ public class GT_MetaTileEntity_LongDistancePipelineFluid extends GT_MetaTileEnti public IFluidHandler getTank() { final IGregTechTileEntity tTile = mTarget.getBaseMetaTileEntity(); TileEntity tankTile = tTile.getTileEntityAtSide(tTile.getBackFacing()); - if (tankTile instanceof IFluidHandler) return (IFluidHandler)tankTile; + if (tankTile instanceof IFluidHandler) return (IFluidHandler) tankTile; else return null; } @@ -72,24 +72,27 @@ public class GT_MetaTileEntity_LongDistancePipelineFluid extends GT_MetaTileEnti if (checkTarget()) { final IFluidHandler tankTile = getTank(); if (tankTile != null) return tankTile.getTankInfo(aSide); - } return emptyTank; } + @Override public int fill(ForgeDirection aSide, FluidStack aFluid, boolean aDoFill) { if (checkTarget()) { final IGregTechTileEntity tTile = mTarget.getBaseMetaTileEntity(); final IFluidHandler tankTile = getTank(); - if (tankTile != null) return tankTile.fill(ForgeDirection.getOrientation(tTile.getFrontFacing()), aFluid, aDoFill); + if (tankTile != null) + return tankTile.fill(ForgeDirection.getOrientation(tTile.getFrontFacing()), aFluid, aDoFill); } return 0; } + @Override public FluidStack drain(ForgeDirection aSide, FluidStack aFluid, boolean aDoDrain) { return null; } + @Override public FluidStack drain(ForgeDirection aSide, int aMaxDrain, boolean aDoDrain) { return null; @@ -99,25 +102,36 @@ public class GT_MetaTileEntity_LongDistancePipelineFluid extends GT_MetaTileEnti public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_LongDistancePipelineFluid(mName, mTier, getDescription()[0], mTextures); } + @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) { return new ITexture[0][0][0]; } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { if (aSide == aFacing) - return new ITexture[]{ - MACHINE_CASINGS[mTier][aColorIndex + 1], - TextureFactory.of(OVERLAY_PIPELINE_FLUID_FRONT)}; + return new ITexture[] { + MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_PIPELINE_FLUID_FRONT) + }; else if (aSide == GT_Utility.getOppositeSide(aFacing)) - return new ITexture[]{ - MACHINE_CASINGS[mTier][aColorIndex + 1], - TextureFactory.of(OVERLAY_PIPELINE_FLUID_BACK)}; + return new ITexture[] { + MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_PIPELINE_FLUID_BACK) + }; else - return new ITexture[]{ - MACHINE_CASINGS[mTier][aColorIndex + 1], - TextureFactory.of(OVERLAY_PIPELINE_FLUID_SIDE), - TextureFactory.builder().addIcon(OVERLAY_PIPELINE_FLUID_SIDE_GLOW).glow().build()}; + return new ITexture[] { + MACHINE_CASINGS[mTier][aColorIndex + 1], + TextureFactory.of(OVERLAY_PIPELINE_FLUID_SIDE), + TextureFactory.builder() + .addIcon(OVERLAY_PIPELINE_FLUID_SIDE_GLOW) + .glow() + .build() + }; } } diff --git a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineItem.java b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineItem.java index b6b3636ab0..0559290df6 100644 --- a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineItem.java +++ b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineItem.java @@ -19,9 +19,14 @@ * You should have received a copy of the GNU Lesser General Public License * along with GregTech. If not, see <http://www.gnu.org/licenses/>. */ - package gregtech.common.tileentities.machines.long_distance; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPELINE_ITEM_BACK; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPELINE_ITEM_FRONT; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPELINE_ITEM_SIDE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPELINE_ITEM_SIDE_GLOW; + import gregtech.api.enums.GT_Values; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -33,18 +38,13 @@ import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPELINE_ITEM_BACK; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPELINE_ITEM_FRONT; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPELINE_ITEM_SIDE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPELINE_ITEM_SIDE_GLOW; - public class GT_MetaTileEntity_LongDistancePipelineItem extends GT_MetaTileEntity_LongDistancePipelineBase { public GT_MetaTileEntity_LongDistancePipelineItem(int aID, String aName, String aNameRegional, int aTier) { super(aID, aName, aNameRegional, aTier, "Sends Items over long distances"); } - public GT_MetaTileEntity_LongDistancePipelineItem(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_LongDistancePipelineItem( + String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @@ -61,7 +61,7 @@ public class GT_MetaTileEntity_LongDistancePipelineItem extends GT_MetaTileEntit public IInventory getInventory() { final IGregTechTileEntity tTile = mTarget.getBaseMetaTileEntity(); TileEntity invTile = tTile.getTileEntityAtSide(tTile.getBackFacing()); - if (invTile instanceof IInventory) return (IInventory)invTile; + if (invTile instanceof IInventory) return (IInventory) invTile; else return null; } @@ -73,6 +73,7 @@ public class GT_MetaTileEntity_LongDistancePipelineItem extends GT_MetaTileEntit } return null; } + @Override public ItemStack getStackInSlotOnClosing(int aSlot) { if (checkTarget()) { @@ -81,6 +82,7 @@ public class GT_MetaTileEntity_LongDistancePipelineItem extends GT_MetaTileEntit } return null; } + @Override public ItemStack getStackInSlot(int aSlot) { if (checkTarget()) { @@ -89,6 +91,7 @@ public class GT_MetaTileEntity_LongDistancePipelineItem extends GT_MetaTileEntit } return null; } + @Override public String getInventoryName() { if (checkTarget()) { @@ -97,6 +100,7 @@ public class GT_MetaTileEntity_LongDistancePipelineItem extends GT_MetaTileEntit } return super.getInventoryName(); } + @Override public int getSizeInventory() { if (checkTarget()) { @@ -105,6 +109,7 @@ public class GT_MetaTileEntity_LongDistancePipelineItem extends GT_MetaTileEntit } return 0; } + @Override public int getInventoryStackLimit() { if (checkTarget()) { @@ -113,6 +118,7 @@ public class GT_MetaTileEntity_LongDistancePipelineItem extends GT_MetaTileEntit } return 0; } + @Override public void setInventorySlotContents(int aSlot, ItemStack aStack) { if (checkTarget()) { @@ -120,6 +126,7 @@ public class GT_MetaTileEntity_LongDistancePipelineItem extends GT_MetaTileEntit if (iInventory != null) iInventory.setInventorySlotContents(aSlot, aStack); } } + @Override public boolean hasCustomInventoryName() { if (checkTarget()) { @@ -128,6 +135,7 @@ public class GT_MetaTileEntity_LongDistancePipelineItem extends GT_MetaTileEntit } return false; } + @Override public boolean isItemValidForSlot(int aSlot, ItemStack aStack) { if (checkTarget()) { @@ -137,15 +145,16 @@ public class GT_MetaTileEntity_LongDistancePipelineItem extends GT_MetaTileEntit return false; } -// // Relay Sided Inventories -// + // // Relay Sided Inventories + // @Override public int[] getAccessibleSlotsFromSide(int aSide) { if (checkTarget()) { final IGregTechTileEntity tTile = mTarget.getBaseMetaTileEntity(); final IInventory iInventory = getInventory(); - if (iInventory instanceof ISidedInventory) return ((ISidedInventory)iInventory).getAccessibleSlotsFromSide(tTile.getFrontFacing()); + if (iInventory instanceof ISidedInventory) + return ((ISidedInventory) iInventory).getAccessibleSlotsFromSide(tTile.getFrontFacing()); if (iInventory != null) { final int[] tReturn = new int[iInventory.getSizeInventory()]; for (int i = 0; i < tReturn.length; i++) tReturn[i] = i; @@ -161,7 +170,8 @@ public class GT_MetaTileEntity_LongDistancePipelineItem extends GT_MetaTileEntit if (checkTarget()) { final IGregTechTileEntity tTile = mTarget.getBaseMetaTileEntity(); IInventory iInventory = getInventory(); - if (iInventory instanceof ISidedInventory) return ((ISidedInventory)iInventory).canInsertItem(aSlot, aStack, tTile.getFrontFacing()); + if (iInventory instanceof ISidedInventory) + return ((ISidedInventory) iInventory).canInsertItem(aSlot, aStack, tTile.getFrontFacing()); return iInventory != null; } return false; @@ -176,20 +186,31 @@ public class GT_MetaTileEntity_LongDistancePipelineItem extends GT_MetaTileEntit public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_LongDistancePipelineItem(mName, mTier, getDescription()[0], mTextures); } + @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { if (aSide == aFacing) - return new ITexture[]{ - MACHINE_CASINGS[mTier][aColorIndex + 1], - TextureFactory.of(OVERLAY_PIPELINE_ITEM_FRONT)}; + return new ITexture[] { + MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_PIPELINE_ITEM_FRONT) + }; else if (aSide == GT_Utility.getOppositeSide(aFacing)) - return new ITexture[]{ - MACHINE_CASINGS[mTier][aColorIndex + 1], - TextureFactory.of(OVERLAY_PIPELINE_ITEM_BACK)}; + return new ITexture[] { + MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_PIPELINE_ITEM_BACK) + }; else - return new ITexture[]{ - MACHINE_CASINGS[mTier][aColorIndex + 1], - TextureFactory.of(OVERLAY_PIPELINE_ITEM_SIDE), - TextureFactory.builder().addIcon(OVERLAY_PIPELINE_ITEM_SIDE_GLOW).glow().build()}; + return new ITexture[] { + MACHINE_CASINGS[mTier][aColorIndex + 1], + TextureFactory.of(OVERLAY_PIPELINE_ITEM_SIDE), + TextureFactory.builder() + .addIcon(OVERLAY_PIPELINE_ITEM_SIDE_GLOW) + .glow() + .build() + }; } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AbstractMultiFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AbstractMultiFurnace.java index af6afbc4c4..3dde1feb83 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AbstractMultiFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AbstractMultiFurnace.java @@ -5,7 +5,8 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase; import net.minecraft.item.ItemStack; -public abstract class GT_MetaTileEntity_AbstractMultiFurnace<T extends GT_MetaTileEntity_AbstractMultiFurnace<T>> extends GT_MetaTileEntity_EnhancedMultiBlockBase<T> { +public abstract class GT_MetaTileEntity_AbstractMultiFurnace<T extends GT_MetaTileEntity_AbstractMultiFurnace<T>> + extends GT_MetaTileEntity_EnhancedMultiBlockBase<T> { private HeatingCoilLevel mCoilLevel; @@ -23,10 +24,10 @@ public abstract class GT_MetaTileEntity_AbstractMultiFurnace<T extends GT_MetaTi } protected boolean addBottomHatch(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - return addMaintenanceToMachineList(aTileEntity, aBaseCasingIndex) || - addInputToMachineList(aTileEntity, aBaseCasingIndex) || - addOutputToMachineList(aTileEntity, aBaseCasingIndex) || - addEnergyInputToMachineList(aTileEntity, aBaseCasingIndex); + return addMaintenanceToMachineList(aTileEntity, aBaseCasingIndex) + || addInputToMachineList(aTileEntity, aBaseCasingIndex) + || addOutputToMachineList(aTileEntity, aBaseCasingIndex) + || addEnergyInputToMachineList(aTileEntity, aBaseCasingIndex); } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java index 7e3039c83b..d40b569550 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java @@ -1,10 +1,19 @@ package gregtech.common.tileentities.machines.multi; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static gregtech.GT_Mod.GT_FML_LOGGER; +import static gregtech.api.enums.GT_HatchElement.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_GLOW; +import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IItemSource; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; @@ -24,82 +33,77 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Multi import gregtech.api.render.TextureFactory; import gregtech.api.util.*; import gregtech.api.util.GT_Recipe.GT_Recipe_AssemblyLine; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static gregtech.GT_Mod.GT_FML_LOGGER; -import static gregtech.api.enums.GT_HatchElement.*; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_GLOW; -import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GT_MetaTileEntity_AssemblyLine extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_AssemblyLine> implements ISurvivalConstructable { +public class GT_MetaTileEntity_AssemblyLine + extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_AssemblyLine> + implements ISurvivalConstructable { public ArrayList<GT_MetaTileEntity_Hatch_DataAccess> mDataAccessHatches = new ArrayList<>(); private static final String STRUCTURE_PIECE_FIRST = "first"; private static final String STRUCTURE_PIECE_LATER = "later"; private static final String STRUCTURE_PIECE_LAST = "last"; - private static final IStructureDefinition<GT_MetaTileEntity_AssemblyLine> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_AssemblyLine>builder() - .addShape(STRUCTURE_PIECE_FIRST, transpose(new String[][]{ - {" ", "e", " "}, - {"~", "l", "G"}, - {"g", "m", "g"}, - {"b", "i", "b"}, - })) - .addShape(STRUCTURE_PIECE_LATER, transpose(new String[][]{ - {" ", "e", " "}, - {"d", "l", "d"}, - {"g", "m", "g"}, - {"b", "I", "b"}, - })) - .addShape(STRUCTURE_PIECE_LAST, transpose(new String[][]{ - {" ", "e", " "}, - {"d", "l", "d"}, - {"g", "m", "g"}, - {"o", "i", "b"}, - })) - .addElement('G', ofBlock(GregTech_API.sBlockCasings3, 10)) // grate machine casing - .addElement('l', ofBlock(GregTech_API.sBlockCasings2, 9)) // assembler machine casing - .addElement('m', ofBlock(GregTech_API.sBlockCasings2, 5)) // assembling line casing - .addElement('g', ofChain( - ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks", 0, true), - ofBlockUnlocalizedName("Thaumcraft", "blockCosmeticOpaque", 2, false), //warded glass - ofBlockUnlocalizedName("IC2", "blockAlloyGlass", 0, true)) - ) - .addElement('e', ofChain( - Energy.newAny(16, 1), - ofBlock(GregTech_API.sBlockCasings2, 0) - )) - .addElement('d', ofChain( - DataHatchElement.DataAccess.newAny(42, 2), - ofBlock(GregTech_API.sBlockCasings3, 10) - )) - .addElement('b', buildHatchAdder(GT_MetaTileEntity_AssemblyLine.class) - .atLeast(InputHatch, InputHatch, InputHatch, InputHatch, Maintenance) - .casingIndex(16).dot(3) - .buildAndChain( - ofBlock(GregTech_API.sBlockCasings2, 0), - ofHatchAdder(GT_MetaTileEntity_AssemblyLine::addOutputToMachineList, 16, 4) - ) - ) - .addElement('I', ofChain( - // all blocks nearby use solid steel casing, so let's use the texture of that - InputBus.newAny(16, 5), - ofHatchAdder(GT_MetaTileEntity_AssemblyLine::addOutputToMachineList, 16, 4) - )) - .addElement('i', InputBus.newAny(16, 5)) - .addElement('o', OutputBus.newAny(16, 4)) - .build(); + private static final IStructureDefinition<GT_MetaTileEntity_AssemblyLine> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_AssemblyLine>builder() + .addShape(STRUCTURE_PIECE_FIRST, transpose(new String[][] { + {" ", "e", " "}, + {"~", "l", "G"}, + {"g", "m", "g"}, + {"b", "i", "b"}, + })) + .addShape(STRUCTURE_PIECE_LATER, transpose(new String[][] { + {" ", "e", " "}, + {"d", "l", "d"}, + {"g", "m", "g"}, + {"b", "I", "b"}, + })) + .addShape(STRUCTURE_PIECE_LAST, transpose(new String[][] { + {" ", "e", " "}, + {"d", "l", "d"}, + {"g", "m", "g"}, + {"o", "i", "b"}, + })) + .addElement('G', ofBlock(GregTech_API.sBlockCasings3, 10)) // grate machine casing + .addElement('l', ofBlock(GregTech_API.sBlockCasings2, 9)) // assembler machine casing + .addElement('m', ofBlock(GregTech_API.sBlockCasings2, 5)) // assembling line casing + .addElement( + 'g', + ofChain( + ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks", 0, true), + ofBlockUnlocalizedName( + "Thaumcraft", "blockCosmeticOpaque", 2, false), // warded glass + ofBlockUnlocalizedName("IC2", "blockAlloyGlass", 0, true))) + .addElement('e', ofChain(Energy.newAny(16, 1), ofBlock(GregTech_API.sBlockCasings2, 0))) + .addElement( + 'd', + ofChain( + DataHatchElement.DataAccess.newAny(42, 2), + ofBlock(GregTech_API.sBlockCasings3, 10))) + .addElement( + 'b', + buildHatchAdder(GT_MetaTileEntity_AssemblyLine.class) + .atLeast(InputHatch, InputHatch, InputHatch, InputHatch, Maintenance) + .casingIndex(16) + .dot(3) + .buildAndChain( + ofBlock(GregTech_API.sBlockCasings2, 0), + ofHatchAdder( + GT_MetaTileEntity_AssemblyLine::addOutputToMachineList, 16, 4))) + .addElement( + 'I', + ofChain( + // all blocks nearby use solid steel casing, so let's use the texture of that + InputBus.newAny(16, 5), + ofHatchAdder(GT_MetaTileEntity_AssemblyLine::addOutputToMachineList, 16, 4))) + .addElement('i', InputBus.newAny(16, 5)) + .addElement('o', OutputBus.newAny(16, 4)) + .build(); public GT_MetaTileEntity_AssemblyLine(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -118,48 +122,72 @@ public class GT_MetaTileEntity_AssemblyLine extends GT_MetaTileEntity_EnhancedMu protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); tt.addMachineType("Assembling Line") - .addInfo("Controller block for the Assembling Line") - .addInfo("Used to make complex machine parts (LuV+)") - .addInfo("Does not make Assembler items") - .addSeparator() - .beginVariableStructureBlock(5, 16, 4, 4, 3, 3, false)//? - .addStructureInfo("From Bottom to Top, Left to Right") - .addStructureInfo("Layer 1 - Solid Steel Machine Casing, Input Bus (last can be Output Bus), Solid Steel Machine Casing") - .addStructureInfo("Layer 2 - Borosilicate Glass(any)/Warded Glass/Reinforced Glass, Assembling Line Casing, Reinforced Glass") - .addStructureInfo("Layer 3 - Grate Machine Casing, Assembler Machine Casing, Grate Machine Casing") - .addStructureInfo("Layer 4 - Empty, Solid Steel Machine Casing, Empty") - .addStructureInfo("Up to 16 repeating slices, each one allows for 1 more item in recipes") - - .addController("Either Grate on layer 3 of the first slice") - .addEnergyHatch("Any layer 4 casing", 1) - .addMaintenanceHatch("Any layer 1 casing", 3) - .addInputBus("As specified on layer 1", 4, 5) - .addInputHatch("Any layer 1 casing", 3) - .addOutputBus("Replaces Input Bus on final slice or on any solid steel casing on layer 1", 4) - .addOtherStructurePart("Data Access Hatch", "Optional, next to controller", 2) - .toolTipFinisher("Gregtech"); + .addInfo("Controller block for the Assembling Line") + .addInfo("Used to make complex machine parts (LuV+)") + .addInfo("Does not make Assembler items") + .addSeparator() + .beginVariableStructureBlock(5, 16, 4, 4, 3, 3, false) // ? + .addStructureInfo("From Bottom to Top, Left to Right") + .addStructureInfo( + "Layer 1 - Solid Steel Machine Casing, Input Bus (last can be Output Bus), Solid Steel Machine Casing") + .addStructureInfo( + "Layer 2 - Borosilicate Glass(any)/Warded Glass/Reinforced Glass, Assembling Line Casing, Reinforced Glass") + .addStructureInfo("Layer 3 - Grate Machine Casing, Assembler Machine Casing, Grate Machine Casing") + .addStructureInfo("Layer 4 - Empty, Solid Steel Machine Casing, Empty") + .addStructureInfo("Up to 16 repeating slices, each one allows for 1 more item in recipes") + .addController("Either Grate on layer 3 of the first slice") + .addEnergyHatch("Any layer 4 casing", 1) + .addMaintenanceHatch("Any layer 1 casing", 3) + .addInputBus("As specified on layer 1", 4, 5) + .addInputHatch("Any layer 1 casing", 3) + .addOutputBus("Replaces Input Bus on final slice or on any solid steel casing on layer 1", 4) + .addOtherStructurePart("Data Access Hatch", "Optional, next to controller", 2) + .toolTipFinisher("Gregtech"); return tt; } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { if (aSide == aFacing) { if (aActive) - return new ITexture[]{ + return new ITexture[] { BlockIcons.casingTexturePages[0][16], - TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW).extFacing().glow().build()}; - return new ITexture[]{ + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW) + .extFacing() + .glow() + .build() + }; + return new ITexture[] { BlockIcons.casingTexturePages[0][16], - TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW).extFacing().glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW) + .extFacing() + .glow() + .build() + }; } - return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][16]}; + return new ITexture[] {Textures.BlockIcons.casingTexturePages[0][16]}; } @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "AssemblyLine.png"); + return new GT_GUIContainer_MultiMachine( + aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "AssemblyLine.png"); } @Override @@ -192,13 +220,14 @@ public class GT_MetaTileEntity_AssemblyLine extends GT_MetaTileEntity_EnhancedMu nextDataStick: for (ItemStack tDataStick : tDataStickList) { - GT_AssemblyLineUtils.LookupResult tLookupResult = GT_AssemblyLineUtils.findAssemblyLineRecipeFromDataStick(tDataStick, false); + GT_AssemblyLineUtils.LookupResult tLookupResult = + GT_AssemblyLineUtils.findAssemblyLineRecipeFromDataStick(tDataStick, false); - if (tLookupResult.getType() == GT_AssemblyLineUtils.LookupResultType.INVALID_STICK) - continue; + if (tLookupResult.getType() == GT_AssemblyLineUtils.LookupResultType.INVALID_STICK) continue; GT_Recipe_AssemblyLine tRecipe = tLookupResult.getRecipe(); - // Check if the recipe on the data stick is the current recipe for it's given output, if not we update it and continue to next. + // Check if the recipe on the data stick is the current recipe for it's given output, if not we update it + // and continue to next. if (tLookupResult.getType() != GT_AssemblyLineUtils.LookupResultType.VALID_STACK_AND_VALID_HASH) { tRecipe = GT_AssemblyLineUtils.processDataStick(tDataStick); if (tRecipe == null) { @@ -235,18 +264,21 @@ public class GT_MetaTileEntity_AssemblyLine extends GT_MetaTileEntity_EnhancedMu for (int i = 0; i < aFluidCount; i++) { if (mInputHatches.get(i) == null) { continue nextDataStick; - }else { + } else { if (mInputHatches.get(i) instanceof GT_MetaTileEntity_Hatch_MultiInput) { - GT_MetaTileEntity_Hatch_MultiInput tMultiHatch = (GT_MetaTileEntity_Hatch_MultiInput) mInputHatches.get(i); - if (!tMultiHatch.hasFluid(tRecipe.mFluidInputs[i]) || tMultiHatch.getFluidAmount(tRecipe.mFluidInputs[i]) < tRecipe.mFluidInputs[i].amount) { + GT_MetaTileEntity_Hatch_MultiInput tMultiHatch = + (GT_MetaTileEntity_Hatch_MultiInput) mInputHatches.get(i); + if (!tMultiHatch.hasFluid(tRecipe.mFluidInputs[i]) + || tMultiHatch.getFluidAmount(tRecipe.mFluidInputs[i]) + < tRecipe.mFluidInputs[i].amount) { continue nextDataStick; } tFluids[i] = tRecipe.mFluidInputs[i].amount; tFluidSlot[i] = tMultiHatch.getFluidSlot(tRecipe.mFluidInputs[i]); - } - else { + } else { FluidStack fluidInHatch = mInputHatches.get(i).mFluid; - if (!GT_Utility.areFluidsEqual(fluidInHatch, tRecipe.mFluidInputs[i], true) || fluidInHatch.amount < tRecipe.mFluidInputs[i].amount) { + if (!GT_Utility.areFluidsEqual(fluidInHatch, tRecipe.mFluidInputs[i], true) + || fluidInHatch.amount < tRecipe.mFluidInputs[i].amount) { continue nextDataStick; } tFluids[i] = tRecipe.mFluidInputs[i].amount; @@ -261,7 +293,7 @@ public class GT_MetaTileEntity_AssemblyLine extends GT_MetaTileEntity_EnhancedMu GT_FML_LOGGER.info("Check overclock"); } calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, getMaxInputVoltage()); - //In case recipe is too OP for that machine + // In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) { if (GT_Values.D1) { GT_FML_LOGGER.info("Recipe too OP"); @@ -271,7 +303,7 @@ public class GT_MetaTileEntity_AssemblyLine extends GT_MetaTileEntity_EnhancedMu if (GT_Values.D1) { GT_FML_LOGGER.info("Find available recipe"); } - mOutputItems = new ItemStack[]{tRecipe.mOutput}; + mOutputItems = new ItemStack[] {tRecipe.mOutput}; foundRecipe = true; break; } @@ -281,7 +313,6 @@ public class GT_MetaTileEntity_AssemblyLine extends GT_MetaTileEntity_EnhancedMu return false; } - if (GT_Values.D1) { GT_FML_LOGGER.info("All checked start consuming inputs"); } @@ -292,7 +323,8 @@ public class GT_MetaTileEntity_AssemblyLine extends GT_MetaTileEntity_EnhancedMu for (int i = 0; i < tFluids.length; i++) { if (mInputHatches.get(i) instanceof GT_MetaTileEntity_Hatch_MultiInput) { - GT_MetaTileEntity_Hatch_MultiInput tMultiHatch = (GT_MetaTileEntity_Hatch_MultiInput) mInputHatches.get(i); + GT_MetaTileEntity_Hatch_MultiInput tMultiHatch = + (GT_MetaTileEntity_Hatch_MultiInput) mInputHatches.get(i); tMultiHatch.getFluid(tFluidSlot[i]).amount -= tFluids[i]; if (tMultiHatch.getFluid(tFluidSlot[i]).amount <= 0) { tMultiHatch.setFluid(null, tFluidSlot[i]); @@ -318,12 +350,10 @@ public class GT_MetaTileEntity_AssemblyLine extends GT_MetaTileEntity_EnhancedMu } private static int isStackValidIngredient(ItemStack aSlotStack, ItemStack aIngredient, ItemStack[] alts) { - if (alts == null || alts.length == 0) - return isStackValidIngredient(aSlotStack, aIngredient); + if (alts == null || alts.length == 0) return isStackValidIngredient(aSlotStack, aIngredient); for (ItemStack tAltStack : alts) { int i = isStackValidIngredient(aSlotStack, tAltStack); - if (i >= 0) - return i; + if (i >= 0) return i; } return -1; } @@ -358,15 +388,13 @@ public class GT_MetaTileEntity_AssemblyLine extends GT_MetaTileEntity_EnhancedMu @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { mDataAccessHatches.clear(); - if (!checkPiece(STRUCTURE_PIECE_FIRST, 0, 1, 0)) - return false; + if (!checkPiece(STRUCTURE_PIECE_FIRST, 0, 1, 0)) return false; return checkMachine(true) || checkMachine(false); } private boolean checkMachine(boolean leftToRight) { for (int i = 1; i < 16; i++) { - if (!checkPiece(STRUCTURE_PIECE_LATER, leftToRight ? -i : i, 1, 0)) - return false; + if (!checkPiece(STRUCTURE_PIECE_LATER, leftToRight ? -i : i, 1, 0)) return false; if (!mOutputBusses.isEmpty()) return !mEnergyHatches.isEmpty() && mMaintenanceHatches.size() == 1 && mDataAccessHatches.size() <= 1; } @@ -394,7 +422,7 @@ public class GT_MetaTileEntity_AssemblyLine extends GT_MetaTileEntity_EnhancedMu if (isValidMetaTileEntity(tHatch)) { for (int i = 0; i < tHatch.getBaseMetaTileEntity().getSizeInventory(); i++) { if (tHatch.getBaseMetaTileEntity().getStackInSlot(i) != null - && isCorrectDataItem(tHatch.getBaseMetaTileEntity().getStackInSlot(i), state)) + && isCorrectDataItem(tHatch.getBaseMetaTileEntity().getStackInSlot(i), state)) rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i)); } } @@ -440,14 +468,17 @@ public class GT_MetaTileEntity_AssemblyLine extends GT_MetaTileEntity_EnhancedMu @Override public int survivalConstruct(ItemStack stackSize, int elementBudget, IItemSource source, EntityPlayerMP actor) { if (mMachine) return -1; - int build = survivialBuildPiece(STRUCTURE_PIECE_FIRST, stackSize, 0, 1, 0, elementBudget, source, actor, false, true); + int build = survivialBuildPiece( + STRUCTURE_PIECE_FIRST, stackSize, 0, 1, 0, elementBudget, source, actor, false, true); if (build >= 0) return build; int tLength = Math.min(stackSize.stackSize + 1, 16); for (int i = 1; i < tLength - 1; i++) { - build = survivialBuildPiece(STRUCTURE_PIECE_LATER, stackSize, -i, 1, 0, elementBudget, source, actor, false, true); + build = survivialBuildPiece( + STRUCTURE_PIECE_LATER, stackSize, -i, 1, 0, elementBudget, source, actor, false, true); if (build >= 0) return build; } - return survivialBuildPiece(STRUCTURE_PIECE_LAST, stackSize, 1 - tLength, 1, 0, elementBudget, source, actor, false); + return survivialBuildPiece( + STRUCTURE_PIECE_LAST, stackSize, 1 - tLength, 1, 0, elementBudget, source, actor, false); } private enum DataHatchElement implements IHatchElement<GT_MetaTileEntity_AssemblyLine> { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java index e55837ab2d..adf09ad6db 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java @@ -13,12 +13,18 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import net.minecraft.block.Block; import org.lwjgl.input.Keyboard; -public class GT_MetaTileEntity_BrickedBlastFurnace extends GT_MetaTileEntity_PrimitiveBlastFurnace implements ISecondaryDescribable { +public class GT_MetaTileEntity_BrickedBlastFurnace extends GT_MetaTileEntity_PrimitiveBlastFurnace + implements ISecondaryDescribable { private static final ITexture[] FACING_SIDE = {TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_DENSEBRICKS)}; - private static final ITexture[] FACING_FRONT = {TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_INACTIVE)}; + private static final ITexture[] FACING_FRONT = { + TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_INACTIVE) + }; private static final ITexture[] FACING_ACTIVE = { - TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE), - TextureFactory.builder().addIcon(BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE_GLOW).glow().build() + TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE), + TextureFactory.builder() + .addIcon(BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE_GLOW) + .glow() + .build() }; public GT_MetaTileEntity_BrickedBlastFurnace(int aID, String aName, String aNameRegional) { @@ -66,7 +72,13 @@ public class GT_MetaTileEntity_BrickedBlastFurnace extends GT_MetaTileEntity_Pri } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { if (aSide == aFacing) { return aActive ? FACING_ACTIVE : FACING_FRONT; } @@ -93,4 +105,3 @@ public class GT_MetaTileEntity_BrickedBlastFurnace extends GT_MetaTileEntity_Pri return "Bricked Blast Furnace"; } } - diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java index 93b36d376c..9bccfa3376 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java @@ -1,5 +1,10 @@ package gregtech.common.tileentities.machines.multi; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBLASTFURNACE; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBLASTFURNACE_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBLASTFURNACE_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS; + import gregtech.api.GregTech_API; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -7,17 +12,15 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.render.TextureFactory; import net.minecraft.block.Block; -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBLASTFURNACE; -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBLASTFURNACE_ACTIVE; -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBLASTFURNACE_ACTIVE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS; - public class GT_MetaTileEntity_BronzeBlastFurnace extends GT_MetaTileEntity_PrimitiveBlastFurnace { private static final ITexture[] FACING_SIDE = {TextureFactory.of(MACHINE_BRONZEPLATEDBRICKS)}; private static final ITexture[] FACING_FRONT = {TextureFactory.of(MACHINE_BRONZEBLASTFURNACE)}; private static final ITexture[] FACING_ACTIVE = { - TextureFactory.of(MACHINE_BRONZEBLASTFURNACE_ACTIVE), - TextureFactory.builder().addIcon(MACHINE_BRONZEBLASTFURNACE_ACTIVE_GLOW).glow().build() + TextureFactory.of(MACHINE_BRONZEBLASTFURNACE_ACTIVE), + TextureFactory.builder() + .addIcon(MACHINE_BRONZEBLASTFURNACE_ACTIVE_GLOW) + .glow() + .build() }; public GT_MetaTileEntity_BronzeBlastFurnace(int aID, String aName, String aNameRegional) { @@ -30,11 +33,17 @@ public class GT_MetaTileEntity_BronzeBlastFurnace extends GT_MetaTileEntity_Prim @Override public String[] getDescription() { - return new String[]{"Disabled"}; + return new String[] {"Disabled"}; } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { if (aSide == aFacing) { return aActive ? FACING_ACTIVE : FACING_FRONT; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java index 5f6a34832e..8a2f969b18 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java @@ -1,9 +1,16 @@ package gregtech.common.tileentities.machines.multi; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; -import gregtech.api.enums.ParticleFX; import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.ParticleFX; import gregtech.api.interfaces.ISecondaryDescribable; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -14,6 +21,7 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.WorldSpawnedEventBuilder; import gregtech.common.GT_Pollution; +import java.util.ArrayList; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.player.EntityPlayer; @@ -22,17 +30,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.ChunkPosition; import net.minecraftforge.oredict.OreDictionary; -import java.util.ArrayList; - -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; - -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; - -public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMultiBlockBase implements ISecondaryDescribable { +public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMultiBlockBase + implements ISecondaryDescribable { private boolean running = false; @@ -80,7 +79,7 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul mEfficiencyIncrease = 10000; mMaxProgresstime = Math.max(1, mMaxProgresstime); - //adds all the pollution at once when the recipe starts + // adds all the pollution at once when the recipe starts GT_Pollution.addPollution(getBaseMetaTileEntity(), mMaxProgresstime * getPollutionPerTick(null)); return true; } else { @@ -108,8 +107,18 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul } if (running) { for (ChunkPosition tPos : tList1) { - if (isWoodLog(getBaseMetaTileEntity().getBlockOffset(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ), getBaseMetaTileEntity().getMetaIDOffset(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ))) - getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord() + tPos.chunkPosX, getBaseMetaTileEntity().getYCoord() + tPos.chunkPosY, getBaseMetaTileEntity().getZCoord() + tPos.chunkPosZ, GregTech_API.sBlockReinforced, 4, 3); + if (isWoodLog( + getBaseMetaTileEntity().getBlockOffset(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ), + getBaseMetaTileEntity().getMetaIDOffset(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ))) + getBaseMetaTileEntity() + .getWorld() + .setBlock( + getBaseMetaTileEntity().getXCoord() + tPos.chunkPosX, + getBaseMetaTileEntity().getYCoord() + tPos.chunkPosY, + getBaseMetaTileEntity().getZCoord() + tPos.chunkPosZ, + GregTech_API.sBlockReinforced, + 4, + 3); } running = false; return false; @@ -122,14 +131,16 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul private boolean isWoodLog(Block log, int meta) { for (int id : OreDictionary.getOreIDs(new ItemStack(log, 1, meta))) { - if (OreDictionary.getOreName(id).equals("logWood")) - return true; + if (OreDictionary.getOreName(id).equals("logWood")) return true; } String tTool = log.getHarvestTool(meta); - return OrePrefixes.log.contains(new ItemStack(log, 1, meta)) && ("axe".equals(tTool)) && (log.getMaterial() == Material.wood); + return OrePrefixes.log.contains(new ItemStack(log, 1, meta)) + && ("axe".equals(tTool)) + && (log.getMaterial() == Material.wood); } - private boolean checkAllBlockSides(int aX, int aY, int aZ, ArrayList<? super ChunkPosition> aList1, ArrayList<? super ChunkPosition> aList2) { + private boolean checkAllBlockSides( + int aX, int aY, int aZ, ArrayList<? super ChunkPosition> aList1, ArrayList<? super ChunkPosition> aList2) { boolean expandToChunkXPos = false; boolean expandToChunkXNeg = false; boolean expandToChunkYPos = false; @@ -139,48 +150,50 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul Block blockXPos = getBaseMetaTileEntity().getBlockOffset(aX + 1, aY, aZ); if (aX + 1 < 6 && (isWoodLog(blockXPos, getBaseMetaTileEntity().getMetaIDOffset(aX + 1, aY, aZ)))) { - if (!aList1.contains(new ChunkPosition(aX + 1, aY, aZ)) && (!aList2.contains(new ChunkPosition(aX + 1, aY, aZ)))) - expandToChunkXPos = true; + if (!aList1.contains(new ChunkPosition(aX + 1, aY, aZ)) + && (!aList2.contains(new ChunkPosition(aX + 1, aY, aZ)))) expandToChunkXPos = true; } else if (!(blockXPos == Blocks.dirt || blockXPos == Blocks.grass)) { return false; } Block blockXNeg = getBaseMetaTileEntity().getBlockOffset(aX - 1, aY, aZ); if (aX - 1 > -6 && (isWoodLog(blockXNeg, getBaseMetaTileEntity().getMetaIDOffset(aX - 1, aY, aZ)))) { - if (!aList1.contains(new ChunkPosition(aX - 1, aY, aZ)) && (!aList2.contains(new ChunkPosition(aX - 1, aY, aZ)))) - expandToChunkXNeg = true; + if (!aList1.contains(new ChunkPosition(aX - 1, aY, aZ)) + && (!aList2.contains(new ChunkPosition(aX - 1, aY, aZ)))) expandToChunkXNeg = true; } else if (!(blockXNeg == Blocks.dirt || blockXNeg == Blocks.grass)) { return false; } Block blockYPos = getBaseMetaTileEntity().getBlockOffset(aX, aY + 1, aZ); if (aY + 1 < 1 && (isWoodLog(blockYPos, getBaseMetaTileEntity().getMetaIDOffset(aX, aY + 1, aZ)))) { - if (!aList1.contains(new ChunkPosition(aX, aY + 1, aZ)) && (!aList2.contains(new ChunkPosition(aX, aY + 1, aZ)))) - expandToChunkYPos = true; - } else if (!(blockYPos == Blocks.dirt || blockYPos == Blocks.grass || (aX == 0 && aY == -1 && aZ == 0 && blockYPos == GregTech_API.sBlockMachines))) { + if (!aList1.contains(new ChunkPosition(aX, aY + 1, aZ)) + && (!aList2.contains(new ChunkPosition(aX, aY + 1, aZ)))) expandToChunkYPos = true; + } else if (!(blockYPos == Blocks.dirt + || blockYPos == Blocks.grass + || (aX == 0 && aY == -1 && aZ == 0 && blockYPos == GregTech_API.sBlockMachines))) { return false; } Block blockYNeg = getBaseMetaTileEntity().getBlockOffset(aX, aY - 1, aZ); if (aY - 1 > -6 && (isWoodLog(blockYNeg, getBaseMetaTileEntity().getMetaIDOffset(aX, aY - 1, aZ)))) { - if (!aList1.contains(new ChunkPosition(aX, aY - 1, aZ)) && (!aList2.contains(new ChunkPosition(aX, aY - 1, aZ)))) - expandToChunkYNeg = true; + if (!aList1.contains(new ChunkPosition(aX, aY - 1, aZ)) + && (!aList2.contains(new ChunkPosition(aX, aY - 1, aZ)))) expandToChunkYNeg = true; } else if (blockYNeg != Blocks.brick_block) { return false; } Block blockZPos = getBaseMetaTileEntity().getBlockOffset(aX, aY, aZ + 1); if (aZ + 1 < 6 && (isWoodLog(blockZPos, getBaseMetaTileEntity().getMetaIDOffset(aX, aY, aZ + 1)))) { - if (!aList1.contains(new ChunkPosition(aX, aY, aZ + 1)) && (!aList2.contains(new ChunkPosition(aX, aY, aZ + 1)))) - expandToChunkZPos = true; + if (!aList1.contains(new ChunkPosition(aX, aY, aZ + 1)) + && (!aList2.contains(new ChunkPosition(aX, aY, aZ + 1)))) expandToChunkZPos = true; } else if (!(blockZPos == Blocks.dirt || blockZPos == Blocks.grass)) { return false; } Block blockZNeg = getBaseMetaTileEntity().getBlockOffset(aX, aY, aZ - 1); if (aZ - 1 > -6 && (isWoodLog(blockZNeg, getBaseMetaTileEntity().getMetaIDOffset(aX, aY, aZ - 1)))) { - if (!aList1.contains(new ChunkPosition(aX, aY, aZ - 1)) && (!aList2.contains(new ChunkPosition(aX, aY, aZ - 1)))) - expandToChunkZNeg = true; + if (!aList1.contains(new ChunkPosition(aX, aY, aZ - 1)) + && (!aList2.contains(new ChunkPosition(aX, aY, aZ - 1)))) expandToChunkZNeg = true; } else if (!(blockZNeg == Blocks.dirt || blockZNeg == Blocks.grass)) { return false; } @@ -254,19 +267,33 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { if (aSide == 1) { - if (aActive) return new ITexture[]{ + if (aActive) + return new ITexture[] { casingTexturePages[0][10], TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW).glow().build()}; - return new ITexture[]{ - casingTexturePages[0][10], - TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER), - TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW).glow().build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW) + .glow() + .build() + }; + return new ITexture[] { + casingTexturePages[0][10], + TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW) + .glow() + .build(), }; } - return new ITexture[]{casingTexturePages[0][10]}; + return new ITexture[] {casingTexturePages[0][10]}; } @Override @@ -282,13 +309,12 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive())) { new WorldSpawnedEventBuilder.ParticleEventBuilder() - .setMotion(0D,0.3D,0D) + .setMotion(0D, 0.3D, 0D) .setIdentifier(ParticleFX.LARGE_SMOKE) .setPosition( aBaseMetaTileEntity.getOffsetX((byte) 1, 1) + XSTR_INSTANCE.nextFloat(), aBaseMetaTileEntity.getOffsetY((byte) 1, 1), - aBaseMetaTileEntity.getOffsetZ((byte) 1, 1) + XSTR_INSTANCE.nextFloat() - ) + aBaseMetaTileEntity.getOffsetZ((byte) 1, 1) + XSTR_INSTANCE.nextFloat()) .setWorld(getBaseMetaTileEntity().getWorld()) .run(); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java index 6b167654b4..ae935a06bb 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java @@ -1,5 +1,8 @@ package gregtech.common.tileentities.machines.multi; +import static gregtech.api.enums.GT_Values.debugCleanroom; +import static gregtech.api.enums.Textures.BlockIcons.*; + import com.gtnewhorizon.structurelib.StructureLibAPI; import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; import gregtech.api.GregTech_API; @@ -16,6 +19,8 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; +import java.util.HashMap; +import java.util.Map; import net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; @@ -25,13 +30,8 @@ import net.minecraftforge.common.config.ConfigCategory; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.util.ForgeDirection; -import java.util.HashMap; -import java.util.Map; - -import static gregtech.api.enums.GT_Values.debugCleanroom; -import static gregtech.api.enums.Textures.BlockIcons.*; - -public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiBlockBase implements IConstructable, ISecondaryDescribable { +public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiBlockBase + implements IConstructable, ISecondaryDescribable { private int mHeight = -1; public GT_MetaTileEntity_Cleanroom(int aID, String aName, String aNameRegional) { @@ -50,35 +50,36 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); tt.addMachineType("Cleanroom") - .addInfo("Controller block for the Cleanroom") - .addInfo("Consumes 40 EU/t when first turned on") - .addInfo("and 4 EU/t once at 100% efficiency when not overclocked")//? - .addInfo("An energy hatch accepts up to 2A, so you can use 2A LV or 1A MV") - .addInfo("2 LV batteries + 1 LV generator or 1 MV generator")//? - .addInfo("Time required to reach full efficiency is proportional to") - .addInfo("the height of empty space within") - .addInfo("Make sure your Energy Hatch matches! ?") - .addInfo("Machines that cause pollution aren't allowed to be put in.") - .addSeparator() - .beginVariableStructureBlock(3, 15, 4, 15, 3, 15, true) - .addController("Top center") - .addCasingInfo("Plascrete", 20) - .addStructureInfo(GT_Values.cleanroomGlass + "% of the Plascrete can be replaced with Reinforced Glass")//check - .addStructureInfo("Other material can be used in place of Plascrete. See config for detail")//check - .addOtherStructurePart("Filter Machine Casing", "Top besides controller and edges") - .addEnergyHatch("Any casing. Exactly one.")//check - .addMaintenanceHatch("Any casing") - .addStructureInfo("1x Reinforced Door (keep closed or efficiency will reduce)") - .addStructureInfo("Up to 10 Machine Hulls for Item & Energy transfer through walls") - .addStructureInfo("You can also use Diodes for more power") - .addStructureInfo("Diodes also count towards 10 Machine Hulls count limit") - .toolTipFinisher("Gregtech"); + .addInfo("Controller block for the Cleanroom") + .addInfo("Consumes 40 EU/t when first turned on") + .addInfo("and 4 EU/t once at 100% efficiency when not overclocked") // ? + .addInfo("An energy hatch accepts up to 2A, so you can use 2A LV or 1A MV") + .addInfo("2 LV batteries + 1 LV generator or 1 MV generator") // ? + .addInfo("Time required to reach full efficiency is proportional to") + .addInfo("the height of empty space within") + .addInfo("Make sure your Energy Hatch matches! ?") + .addInfo("Machines that cause pollution aren't allowed to be put in.") + .addSeparator() + .beginVariableStructureBlock(3, 15, 4, 15, 3, 15, true) + .addController("Top center") + .addCasingInfo("Plascrete", 20) + .addStructureInfo( + GT_Values.cleanroomGlass + "% of the Plascrete can be replaced with Reinforced Glass") // check + .addStructureInfo("Other material can be used in place of Plascrete. See config for detail") // check + .addOtherStructurePart("Filter Machine Casing", "Top besides controller and edges") + .addEnergyHatch("Any casing. Exactly one.") // check + .addMaintenanceHatch("Any casing") + .addStructureInfo("1x Reinforced Door (keep closed or efficiency will reduce)") + .addStructureInfo("Up to 10 Machine Hulls for Item & Energy transfer through walls") + .addStructureInfo("You can also use Diodes for more power") + .addStructureInfo("Diodes also count towards 10 Machine Hulls count limit") + .toolTipFinisher("Gregtech"); return tt; } @Override public String[] getStructureDescription(ItemStack itemStack) { - return new String[] { "The structure in both X and Z axis has to be a square." }; + return new String[] {"The structure in both X and Z axis has to be a square."}; } @Override @@ -86,7 +87,8 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB mEfficiencyIncrease = 100; // use the standard overclock mechanism to determine duration and estimate a maximum consumption calculateOverclockedNessMulti(40, 45 * Math.max(1, mHeight - 1), 1, getMaxInputVoltage()); - // negate it to trigger the special energy consumption function. divide by 10 to get the actual final consumption. + // negate it to trigger the special energy consumption function. divide by 10 to get the actual final + // consumption. mEUt /= -10; return true; } @@ -109,9 +111,7 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB this.mUpdate = 100; if (debugCleanroom) { - GT_Log.out.println( - "Cleanroom: Checking machine" - ); + GT_Log.out.println("Cleanroom: Checking machine"); } for (int i = 1; i < 8; i++) { Block tBlock = aBaseMetaTileEntity.getBlockOffset(i, 0, 0); @@ -143,7 +143,7 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB } } } - //detect room square for filters + // detect room square for filters for (int i = -x + 1; i < x; i++) { for (int j = -z + 1; j < z; j++) { if (i == 0 && j == 0) continue; @@ -165,9 +165,7 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB } if (y > -2) { if (debugCleanroom) { - GT_Log.out.println( - "Cleanroom: Room not tall enough?" - ); + GT_Log.out.println("Cleanroom: Room not tall enough?"); } return false; } @@ -177,22 +175,19 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB if (dX == -x || dX == x || dY == 0 || dY == y || dZ == -z || dZ == z) { Block tBlock = aBaseMetaTileEntity.getBlockOffset(dX, dY, dZ); int tMeta = aBaseMetaTileEntity.getMetaIDOffset(dX, dY, dZ); - if (dY == 0) { // TOP - if (dX == -x || dX == x || dZ == -z || dZ == z) { // Top Border + if (dY == 0) { // TOP + if (dX == -x || dX == x || dZ == -z || dZ == z) { // Top Border if (tBlock != GregTech_API.sBlockReinforced || tMeta != 2) { if (debugCleanroom) { - GT_Log.out.println( - "Cleanroom: Non reinforced block on top edge? tMeta != 2" - ); + GT_Log.out.println("Cleanroom: Non reinforced block on top edge? tMeta != 2"); } return false; } - } else if (dX != 0 || dZ != 0) { // Top Inner exclude center + } else if (dX != 0 || dZ != 0) { // Top Inner exclude center if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) { if (debugCleanroom) { GT_Log.out.println( - "Cleanroom: Non reinforced block on top face interior? tMeta != 11" - ); + "Cleanroom: Non reinforced block on top face interior? tMeta != 11"); } return false; } @@ -200,15 +195,17 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB } else if (tBlock == GregTech_API.sBlockReinforced && tMeta == 2) { mPlascreteCount++; } else { - IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ); - if ((!this.addMaintenanceToMachineList(tTileEntity, 210)) && (!this.addEnergyInputToMachineList(tTileEntity, 210))) { + IGregTechTileEntity tTileEntity = + aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ); + if ((!this.addMaintenanceToMachineList(tTileEntity, 210)) + && (!this.addEnergyInputToMachineList(tTileEntity, 210))) { if (tBlock instanceof ic2.core.block.BlockIC2Door) { if ((tMeta & 8) == 0) { // let's not fiddle with bits anymore. if (Math.abs(dZ) < z) // on side parallel to z axis - doorState = tMeta == 1 || tMeta == 3 || tMeta == 4 || tMeta == 6; + doorState = tMeta == 1 || tMeta == 3 || tMeta == 4 || tMeta == 6; else if (Math.abs(dX) < x) // on side parallel to x axis - doorState = tMeta == 0 || tMeta == 2 || tMeta == 5 || tMeta == 7; + doorState = tMeta == 0 || tMeta == 2 || tMeta == 5 || tMeta == 7; // corners ignored } mDoorCount++; @@ -217,37 +214,31 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity(); if (aMetaTileEntity == null) { if (debugCleanroom) { - GT_Log.out.println( - "Cleanroom: Missing block? Not a aMetaTileEntity" - ); + GT_Log.out.println("Cleanroom: Missing block? Not a aMetaTileEntity"); } return false; } if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicHull) { mHullCount++; - } - else { + } else { if (debugCleanroom) { - GT_Log.out.println( - "Cleanroom: Incorrect GT block? " + tBlock.getUnlocalizedName() - ); + GT_Log.out.println("Cleanroom: Incorrect GT block? " + + tBlock.getUnlocalizedName()); } return false; } - } - else { - String key = tBlock.getUnlocalizedName() + ":"+ tMeta; + } else { + String key = tBlock.getUnlocalizedName() + ":" + tMeta; if (config.containsKey(key)) { // check with meta first otherBlocks.compute(key, (k, v) -> v == null ? 1 : v + 1); - } - else { + } else { key = tBlock.getUnlocalizedName(); if (config.containsKey(key)) { otherBlocks.compute(key, (k, v) -> v == null ? 1 : v + 1); - } - else { + } else { if (debugCleanroom) - GT_Log.out.println("Cleanroom: not allowed block " + tBlock.getUnlocalizedName()); + GT_Log.out.println("Cleanroom: not allowed block " + + tBlock.getUnlocalizedName()); return false; } } @@ -259,19 +250,19 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB } } } - if (this.mMaintenanceHatches.size() != 1 || this.mEnergyHatches.size() != 1 || mDoorCount > 2 || mHullCount > 10) { + if (this.mMaintenanceHatches.size() != 1 + || this.mEnergyHatches.size() != 1 + || mDoorCount > 2 + || mHullCount > 10) { return false; } - if (mPlascreteCount < 20) - return false; + if (mPlascreteCount < 20) return false; float ratio = (((float) mPlascreteCount) / 100f); for (Map.Entry<String, Integer> e : otherBlocks.entrySet()) { ConfigEntry ce = config.get(e.getKey()); if (ce.allowedCount > 0) { // count has priority - if (e.getValue() > ce.allowedCount) - return false; - } else if (e.getValue() > ratio * ce.percentage) - return false; + if (e.getValue() > ce.allowedCount) return false; + } else if (e.getValue() > ratio * ce.percentage) return false; } setCallbacks(x, y, z, aBaseMetaTileEntity); @@ -316,9 +307,8 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB @SuppressWarnings("unchecked") private void checkAndSetCallback(IMachineCallback<?> iMachineCallback) { if (debugCleanroom) - GT_Log.out.println( - "Cleanroom: IMachineCallback detected, checking for cleanroom: " + (iMachineCallback.getType() == this.getClass()) - ); + GT_Log.out.println("Cleanroom: IMachineCallback detected, checking for cleanroom: " + + (iMachineCallback.getType() == this.getClass())); if (iMachineCallback.getType() == this.getClass()) ((IMachineCallback<GT_MetaTileEntity_Cleanroom>) iMachineCallback).setCallbackBase(this); } @@ -329,24 +319,38 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { if (aSide == ForgeDirection.DOWN.ordinal() || aSide == ForgeDirection.UP.ordinal()) { - return new ITexture[]{ - TextureFactory.of(BLOCK_PLASCRETE), - aActive ? - TextureFactory.of( - TextureFactory.of(OVERLAY_TOP_CLEANROOM_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_TOP_CLEANROOM_ACTIVE_GLOW).glow().build()) : - TextureFactory.of( - TextureFactory.of(OVERLAY_TOP_CLEANROOM), - TextureFactory.builder().addIcon(OVERLAY_TOP_CLEANROOM_GLOW).glow().build())}; + return new ITexture[] { + TextureFactory.of(BLOCK_PLASCRETE), + aActive + ? TextureFactory.of( + TextureFactory.of(OVERLAY_TOP_CLEANROOM_ACTIVE), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_CLEANROOM_ACTIVE_GLOW) + .glow() + .build()) + : TextureFactory.of( + TextureFactory.of(OVERLAY_TOP_CLEANROOM), + TextureFactory.builder() + .addIcon(OVERLAY_TOP_CLEANROOM_GLOW) + .glow() + .build()) + }; } - return new ITexture[]{TextureFactory.of(BLOCK_PLASCRETE)}; + return new ITexture[] {TextureFactory.of(BLOCK_PLASCRETE)}; } @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "MultiblockDisplay.png"); + return new GT_GUIContainer_MultiMachine( + aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "MultiblockDisplay.png"); } @Override @@ -383,25 +387,16 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB int y = baseEntity.getYCoord(); int z = baseEntity.getZCoord(); int yoff = Math.max(i * 2, 3); - for(int X = x - i; X <= x + i; X++) - for(int Y = y; Y >= y - yoff; Y--) - for(int Z = z - i; Z <= z + i; Z++) - { - if(X == x && Y == y && Z == z) - continue; - if(X == x - i || X == x + i || Z == z - i || Z == z + i || Y == y - yoff) - { - if (b) - StructureLibAPI.hintParticle(world, X, Y, Z, GregTech_API.sBlockReinforced, 2); - else - world.setBlock(X, Y, Z, GregTech_API.sBlockReinforced, 2, 2); - } - else if(Y == y) - { - if (b) - StructureLibAPI.hintParticle(world, X, Y, Z, GregTech_API.sBlockCasings3, 11); - else - world.setBlock(X, Y, Z, GregTech_API.sBlockCasings3, 11, 2); + for (int X = x - i; X <= x + i; X++) + for (int Y = y; Y >= y - yoff; Y--) + for (int Z = z - i; Z <= z + i; Z++) { + if (X == x && Y == y && Z == z) continue; + if (X == x - i || X == x + i || Z == z - i || Z == z + i || Y == y - yoff) { + if (b) StructureLibAPI.hintParticle(world, X, Y, Z, GregTech_API.sBlockReinforced, 2); + else world.setBlock(X, Y, Z, GregTech_API.sBlockReinforced, 2, 2); + } else if (Y == y) { + if (b) StructureLibAPI.hintParticle(world, X, Y, Z, GregTech_API.sBlockCasings3, 11); + else world.setBlock(X, Y, Z, GregTech_API.sBlockCasings3, 11, 2); } } } @@ -410,49 +405,56 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB int percentage; int allowedCount; int meta; + ConfigEntry(int percentage, int count, int meta) { this.percentage = percentage; this.allowedCount = count; this.meta = meta; } } - private final static HashMap<String, ConfigEntry> config = new HashMap<>(); + + private static final HashMap<String, ConfigEntry> config = new HashMap<>(); private static final String category = "cleanroom_allowed_blocks"; private static final int wildcard_meta = Short.MAX_VALUE; private static void setDefaultConfigValues(Configuration cfg) { - cfg.get("cleanroom_allowed_blocks.reinforced_glass", "Name","blockAlloyGlass"); - cfg.get("cleanroom_allowed_blocks.reinforced_glass", "Percentage",5); - cfg.get("cleanroom_allowed_blocks.bw_reinforced_glass_0", "Name","BW_GlasBlocks"); - cfg.get("cleanroom_allowed_blocks.bw_reinforced_glass_0", "Percentage",50); - cfg.get("cleanroom_allowed_blocks.bw_reinforced_glass_0", "Meta",0); - cfg.get("cleanroom_allowed_blocks.bw_reinforced_glass", "Name","BW_GlasBlocks"); - cfg.get("cleanroom_allowed_blocks.bw_reinforced_glass", "Percentage",100); - cfg.get("cleanroom_allowed_blocks.elevator", "Name","tile.openblocks.elevator"); - cfg.get("cleanroom_allowed_blocks.elevator", "Count",1); - cfg.get("cleanroom_allowed_blocks.travel_anchor", "Name","tile.blockTravelAnchor"); - cfg.get("cleanroom_allowed_blocks.travel_anchor", "Count",1); - cfg.get("cleanroom_allowed_blocks.warded_glass", "Name","tile.blockCosmeticOpaque"); - cfg.get("cleanroom_allowed_blocks.warded_glass", "Meta",2); - cfg.get("cleanroom_allowed_blocks.warded_glass", "Percentage",50); + cfg.get("cleanroom_allowed_blocks.reinforced_glass", "Name", "blockAlloyGlass"); + cfg.get("cleanroom_allowed_blocks.reinforced_glass", "Percentage", 5); + cfg.get("cleanroom_allowed_blocks.bw_reinforced_glass_0", "Name", "BW_GlasBlocks"); + cfg.get("cleanroom_allowed_blocks.bw_reinforced_glass_0", "Percentage", 50); + cfg.get("cleanroom_allowed_blocks.bw_reinforced_glass_0", "Meta", 0); + cfg.get("cleanroom_allowed_blocks.bw_reinforced_glass", "Name", "BW_GlasBlocks"); + cfg.get("cleanroom_allowed_blocks.bw_reinforced_glass", "Percentage", 100); + cfg.get("cleanroom_allowed_blocks.elevator", "Name", "tile.openblocks.elevator"); + cfg.get("cleanroom_allowed_blocks.elevator", "Count", 1); + cfg.get("cleanroom_allowed_blocks.travel_anchor", "Name", "tile.blockTravelAnchor"); + cfg.get("cleanroom_allowed_blocks.travel_anchor", "Count", 1); + cfg.get("cleanroom_allowed_blocks.warded_glass", "Name", "tile.blockCosmeticOpaque"); + cfg.get("cleanroom_allowed_blocks.warded_glass", "Meta", 2); + cfg.get("cleanroom_allowed_blocks.warded_glass", "Percentage", 50); } + public static void loadConfig(Configuration cfg) { - if (!cfg.hasCategory(category)) - setDefaultConfigValues(cfg); + if (!cfg.hasCategory(category)) setDefaultConfigValues(cfg); for (ConfigCategory cc : cfg.getCategory(category).getChildren()) { String name = cc.get("Name").getString(); if (cc.containsKey("Count")) { if (cc.containsKey("Meta")) - config.put(name+":"+cc.get("Meta").getInt(), new ConfigEntry(0, cc.get("Count").getInt(), cc.get("Meta").getInt())); - else - config.put(name, new ConfigEntry(0, cc.get("Count").getInt(), wildcard_meta)); - } - else if (cc.containsKey("Percentage")) { + config.put( + name + ":" + cc.get("Meta").getInt(), + new ConfigEntry( + 0, cc.get("Count").getInt(), cc.get("Meta").getInt())); + else config.put(name, new ConfigEntry(0, cc.get("Count").getInt(), wildcard_meta)); + } else if (cc.containsKey("Percentage")) { if (cc.containsKey("Meta")) - config.put(name+":"+cc.get("Meta").getInt(), new ConfigEntry(cc.get("Percentage").getInt(), 0, cc.get("Meta").getInt())); - else - config.put(name, new ConfigEntry(cc.get("Percentage").getInt(), 0, wildcard_meta)); + config.put( + name + ":" + cc.get("Meta").getInt(), + new ConfigEntry( + cc.get("Percentage").getInt(), + 0, + cc.get("Meta").getInt())); + else config.put(name, new ConfigEntry(cc.get("Percentage").getInt(), 0, wildcard_meta)); } } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java index 52bc0b66e4..873c5bf769 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.machines.multi; +import static gregtech.api.enums.GT_Values.VN; + import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.gui.GT_GUIContainer_MultiMachine; @@ -9,8 +11,6 @@ import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; -import static gregtech.api.enums.GT_Values.VN; - public abstract class GT_MetaTileEntity_ConcreteBackfillerBase extends GT_MetaTileEntity_DrillerBase { private int mLastXOff = 0, mLastZOff = 0; @@ -27,30 +27,31 @@ public abstract class GT_MetaTileEntity_ConcreteBackfillerBase extends GT_MetaTi String casings = getCasingBlockItem().get(0).getDisplayName(); final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Concrete Backfiller") - .addInfo("Controller Block for the " + aStructureName) - .addInfo("Will fill in areas below it with light concrete. This goes through walls") - .addInfo("Use it to remove any spawning locations beneath your base to reduce lag") - .addInfo("Will pull back the pipes after it finishes that layer") - .addInfo("Radius is " + getRadius() + " blocks") - .addSeparator() - .beginStructureBlock(3, 7, 3, false) - .addController("Front bottom") - .addOtherStructurePart(casings, "form the 3x1x3 Base") - .addOtherStructurePart(casings, "1x3x1 pillar above the center of the base (2 minimum total)") - .addOtherStructurePart(getFrameMaterial().mName + " Frame Boxes", "Each pillar's side and 1x3x1 on top") - .addEnergyHatch(VN[getMinTier()] + "+, Any base casing", 1) - .addMaintenanceHatch("Any base casing", 1) - .addInputBus("Mining Pipes, optional, any base casing", 1) - .addInputHatch("GT Concrete, any base casing", 1) - .addOutputBus("Mining Pipes, optional, any base casing", 1) - .toolTipFinisher("Gregtech"); - return tt; + tt.addMachineType("Concrete Backfiller") + .addInfo("Controller Block for the " + aStructureName) + .addInfo("Will fill in areas below it with light concrete. This goes through walls") + .addInfo("Use it to remove any spawning locations beneath your base to reduce lag") + .addInfo("Will pull back the pipes after it finishes that layer") + .addInfo("Radius is " + getRadius() + " blocks") + .addSeparator() + .beginStructureBlock(3, 7, 3, false) + .addController("Front bottom") + .addOtherStructurePart(casings, "form the 3x1x3 Base") + .addOtherStructurePart(casings, "1x3x1 pillar above the center of the base (2 minimum total)") + .addOtherStructurePart(getFrameMaterial().mName + " Frame Boxes", "Each pillar's side and 1x3x1 on top") + .addEnergyHatch(VN[getMinTier()] + "+, Any base casing", 1) + .addMaintenanceHatch("Any base casing", 1) + .addInputBus("Mining Pipes, optional, any base casing", 1) + .addInputHatch("GT Concrete, any base casing", 1) + .addOutputBus("Mining Pipes, optional, any base casing", 1) + .toolTipFinisher("Gregtech"); + return tt; } @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "DrillingRig.png"); + return new GT_GUIContainer_MultiMachine( + aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "DrillingRig.png"); } protected abstract int getRadius(); @@ -71,18 +72,18 @@ public abstract class GT_MetaTileEntity_ConcreteBackfillerBase extends GT_MetaTi } @Override - protected boolean workingUpward(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) { - if (isRefillableBlock(xPipe, yHead - 1, zPipe)) - return tryRefillBlock(xPipe, yHead - 1, zPipe); + protected boolean workingUpward( + ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) { + if (isRefillableBlock(xPipe, yHead - 1, zPipe)) return tryRefillBlock(xPipe, yHead - 1, zPipe); int radius = getRadius(); if (mLastXOff == 0 && mLastZOff == 0) { - mLastXOff = - radius; - mLastZOff = - radius; + mLastXOff = -radius; + mLastZOff = -radius; } if (yHead != yDrill) { for (int i = mLastXOff; i <= radius; i++) { - for (int j = (i == mLastXOff ? mLastZOff : - radius); j <= radius; j++) { - if (isRefillableBlock(xPipe + i, yHead, zPipe + j)){ + for (int j = (i == mLastXOff ? mLastZOff : -radius); j <= radius; j++) { + if (isRefillableBlock(xPipe + i, yHead, zPipe + j)) { mLastXOff = i; mLastZOff = j; return tryRefillBlock(xPipe + i, yHead, zPipe + j); @@ -102,10 +103,12 @@ public abstract class GT_MetaTileEntity_ConcreteBackfillerBase extends GT_MetaTi } } - private boolean isRefillableBlock(int aX, int aY, int aZ){ + private boolean isRefillableBlock(int aX, int aY, int aZ) { IGregTechTileEntity aBaseTile = getBaseMetaTileEntity(); - if (!aBaseTile.getBlock(aX, aY, aZ).isAir(aBaseTile.getWorld(), aX, aY, aZ) || aBaseTile.getBlock(aX, aY, aZ).getMaterial().isSolid()) return false; - if (!GT_Utility.setBlockByFakePlayer(getFakePlayer(aBaseTile), aX, aY, aZ, GregTech_API.sBlockConcretes, 8, true)) return false; + if (!aBaseTile.getBlock(aX, aY, aZ).isAir(aBaseTile.getWorld(), aX, aY, aZ) + || aBaseTile.getBlock(aX, aY, aZ).getMaterial().isSolid()) return false; + if (!GT_Utility.setBlockByFakePlayer( + getFakePlayer(aBaseTile), aX, aY, aZ, GregTech_API.sBlockConcretes, 8, true)) return false; return true; } @@ -116,11 +119,10 @@ public abstract class GT_MetaTileEntity_ConcreteBackfillerBase extends GT_MetaTi } private boolean tryConsumeFluid() { - if (!depleteInput(Materials.Concrete.getMolten(144L))){ + if (!depleteInput(Materials.Concrete.getMolten(144L))) { mMaxProgresstime = 0; return false; } return true; } - } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java index 29997c5452..ecf31c240c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java @@ -1,5 +1,19 @@ package gregtech.common.tileentities.machines.multi; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.lazy; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.enums.GT_HatchElement.Dynamo; +import static gregtech.api.enums.GT_HatchElement.InputHatch; +import static gregtech.api.enums.GT_HatchElement.Maintenance; +import static gregtech.api.enums.GT_HatchElement.Muffler; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; +import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; + import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IItemSource; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; @@ -18,6 +32,7 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; +import java.util.ArrayList; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.InventoryPlayer; @@ -27,49 +42,38 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.FluidStack; -import java.util.ArrayList; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.lazy; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.enums.GT_HatchElement.Dynamo; -import static gregtech.api.enums.GT_HatchElement.InputHatch; -import static gregtech.api.enums.GT_HatchElement.Maintenance; -import static gregtech.api.enums.GT_HatchElement.Muffler; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; -import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; - -public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_DieselEngine> implements ISurvivalConstructable { +public class GT_MetaTileEntity_DieselEngine + extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_DieselEngine> + implements ISurvivalConstructable { private static final String STRUCTURE_PIECE_MAIN = "main"; - private static final ClassValue<IStructureDefinition<GT_MetaTileEntity_DieselEngine>> STRUCTURE_DEFINITION = new ClassValue<IStructureDefinition<GT_MetaTileEntity_DieselEngine>>() { - @Override - protected IStructureDefinition<GT_MetaTileEntity_DieselEngine> computeValue(Class<?> type) { - return StructureDefinition.<GT_MetaTileEntity_DieselEngine>builder() - .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][]{ - {"---", "iii", "chc", "chc", "ccc", }, - {"---", "i~i", "hgh", "hgh", "cdc", }, - {"---", "iii", "chc", "chc", "ccc", }, - })) - .addElement('i', lazy(t -> ofBlock(t.getIntakeBlock(), t.getIntakeMeta()))) - .addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMeta()))) - .addElement('g', lazy(t -> ofBlock(t.getGearboxBlock(), t.getGearboxMeta()))) - .addElement('d', lazy(t -> Dynamo.newAny(t.getCasingTextureIndex(), 2))) - .addElement('h', lazy(t -> - buildHatchAdder(GT_MetaTileEntity_DieselEngine.class) - .atLeast(InputHatch, InputHatch, InputHatch, Muffler, Maintenance) - .casingIndex(t.getCasingTextureIndex()) - .dot(1) - .buildAndChain(t.getCasingBlock(), t.getCasingMeta()) - )) - .build(); - } - }; + private static final ClassValue<IStructureDefinition<GT_MetaTileEntity_DieselEngine>> STRUCTURE_DEFINITION = + new ClassValue<IStructureDefinition<GT_MetaTileEntity_DieselEngine>>() { + @Override + protected IStructureDefinition<GT_MetaTileEntity_DieselEngine> computeValue(Class<?> type) { + return StructureDefinition.<GT_MetaTileEntity_DieselEngine>builder() + .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] { + { + "---", "iii", "chc", "chc", "ccc", + }, + { + "---", "i~i", "hgh", "hgh", "cdc", + }, + { + "---", "iii", "chc", "chc", "ccc", + }, + })) + .addElement('i', lazy(t -> ofBlock(t.getIntakeBlock(), t.getIntakeMeta()))) + .addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMeta()))) + .addElement('g', lazy(t -> ofBlock(t.getGearboxBlock(), t.getGearboxMeta()))) + .addElement('d', lazy(t -> Dynamo.newAny(t.getCasingTextureIndex(), 2))) + .addElement('h', lazy(t -> buildHatchAdder(GT_MetaTileEntity_DieselEngine.class) + .atLeast(InputHatch, InputHatch, InputHatch, Muffler, Maintenance) + .casingIndex(t.getCasingTextureIndex()) + .dot(1) + .buildAndChain(t.getCasingBlock(), t.getCasingMeta()))) + .build(); + } + }; protected int fuelConsumption = 0; protected int fuelValue = 0; protected int fuelRemaining = 0; @@ -112,18 +116,41 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_EnhancedMu } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { if (aSide == aFacing) { - if (aActive) return new ITexture[]{ - casingTexturePages[0][50], - TextureFactory.builder().addIcon(OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE_GLOW).extFacing().glow().build()}; - return new ITexture[]{ + if (aActive) + return new ITexture[] { casingTexturePages[0][50], - TextureFactory.builder().addIcon(OVERLAY_FRONT_DIESEL_ENGINE).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_DIESEL_ENGINE_GLOW).extFacing().glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE_GLOW) + .extFacing() + .glow() + .build() + }; + return new ITexture[] { + casingTexturePages[0][50], + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_DIESEL_ENGINE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_DIESEL_ENGINE_GLOW) + .extFacing() + .glow() + .build() + }; } - return new ITexture[]{casingTexturePages[0][50]}; + return new ITexture[] {casingTexturePages[0][50]}; } @Override @@ -133,7 +160,8 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_EnhancedMu @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeDieselEngine.png"); + return new GT_GUIContainer_MultiMachine( + aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeDieselEngine.png"); } // can't use getRecipeMap() or else the fluid hatch will reject oxygen @@ -187,20 +215,25 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_EnhancedMu if (tRecipe == null) continue; FluidStack tLiquid = tFluid.copy(); - fuelConsumption = tLiquid.amount = boostEu ? (getBoostFactor() * getNominalOutput() / tRecipe.mSpecialValue) : (getNominalOutput() / tRecipe.mSpecialValue); //Calc fuel consumption - //Deplete that amount + fuelConsumption = tLiquid.amount = boostEu + ? (getBoostFactor() * getNominalOutput() / tRecipe.mSpecialValue) + : (getNominalOutput() / tRecipe.mSpecialValue); // Calc fuel consumption + // Deplete that amount if (!depleteInput(tLiquid)) return false; boostEu = depleteInput(getBooster().getGas(2L * getAdditiveFactor())); - //Deplete Lubricant. 1000L should = 1 hour of runtime (if baseEU = 2048) - if ((mRuntime % 72 == 0 || mRuntime == 0) && !depleteInput(Materials.Lubricant.getFluid((boostEu ? 2L : 1L) * getAdditiveFactor()))) + // Deplete Lubricant. 1000L should = 1 hour of runtime (if baseEU = 2048) + if ((mRuntime % 72 == 0 || mRuntime == 0) + && !depleteInput(Materials.Lubricant.getFluid((boostEu ? 2L : 1L) * getAdditiveFactor()))) return false; fuelValue = tRecipe.mSpecialValue; - //Check to prevent burning HOG without consuming it, if not boosted - if (!boostEu && fuelValue > getNominalOutput()) { return false; } - fuelRemaining = tFluid.amount; //Record available fuel - this.mEUt = mEfficiency < 2000 ? 0 : getNominalOutput(); //Output 0 if startup is less than 20% + // Check to prevent burning HOG without consuming it, if not boosted + if (!boostEu && fuelValue > getNominalOutput()) { + return false; + } + fuelRemaining = tFluid.amount; // Record available fuel + this.mEUt = mEfficiency < 2000 ? 0 : getNominalOutput(); // Output 0 if startup is less than 20% this.mProgresstime = 1; this.mMaxProgresstime = 1; this.mEfficiencyIncrease = getEfficiencyIncrease(); @@ -212,7 +245,6 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_EnhancedMu return false; } - @Override public IStructureDefinition<GT_MetaTileEntity_DieselEngine> getStructureDefinition() { return STRUCTURE_DEFINITION.get(getClass()); @@ -220,7 +252,9 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_EnhancedMu @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - return checkPiece(STRUCTURE_PIECE_MAIN, 1, 1, 1) && !mMufflerHatches.isEmpty() && mMaintenanceHatches.size() == 1; + return checkPiece(STRUCTURE_PIECE_MAIN, 1, 1, 1) + && !mMufflerHatches.isEmpty() + && mMaintenanceHatches.size() == 1; } public Block getCasingBlock() { @@ -252,7 +286,10 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_EnhancedMu } private boolean addToMachineList(IGregTechTileEntity tTileEntity) { - return ((addMaintenanceToMachineList(tTileEntity, getCasingTextureIndex())) || (addInputToMachineList(tTileEntity, getCasingTextureIndex())) || (addOutputToMachineList(tTileEntity, getCasingTextureIndex())) || (addMufflerToMachineList(tTileEntity, getCasingTextureIndex()))); + return ((addMaintenanceToMachineList(tTileEntity, getCasingTextureIndex())) + || (addInputToMachineList(tTileEntity, getCasingTextureIndex())) + || (addOutputToMachineList(tTileEntity, getCasingTextureIndex())) + || (addMufflerToMachineList(tTileEntity, getCasingTextureIndex()))); } @Override @@ -292,44 +329,47 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_EnhancedMu @Override public String[] getInfoData() { - int mPollutionReduction=0; + int mPollutionReduction = 0; for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) { if (isValidMetaTileEntity(tHatch)) { - mPollutionReduction=Math.max(tHatch.calculatePollutionReduction(100),mPollutionReduction); + mPollutionReduction = Math.max(tHatch.calculatePollutionReduction(100), mPollutionReduction); } } - long storedEnergy=0; - long maxEnergy=0; - for(GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) { + long storedEnergy = 0; + long maxEnergy = 0; + for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) { if (isValidMetaTileEntity(tHatch)) { - storedEnergy+=tHatch.getBaseMetaTileEntity().getStoredEU(); - maxEnergy+=tHatch.getBaseMetaTileEntity().getEUCapacity(); + storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU(); + maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity(); } } - - return new String[]{ - EnumChatFormatting.BLUE + "Diesel Engine" + EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", - getIdealStatus() == getRepairStatus() ? - EnumChatFormatting.GREEN + StatCollector.translateToLocal("GT5U.turbine.maintenance.false") + EnumChatFormatting.RESET : - EnumChatFormatting.RED + StatCollector.translateToLocal("GT5U.turbine.maintenance.true") + EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.engine.output") + ": " + - EnumChatFormatting.RED + GT_Utility.formatNumbers((mEUt*mEfficiency/10000)) + EnumChatFormatting.RESET + " EU/t", - StatCollector.translateToLocal("GT5U.engine.consumption") + ": " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(fuelConsumption) + EnumChatFormatting.RESET + " L/t", - StatCollector.translateToLocal("GT5U.engine.value") + ": " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(fuelValue) + EnumChatFormatting.RESET + " EU/L", - StatCollector.translateToLocal("GT5U.turbine.fuel") + ": " + - EnumChatFormatting.GOLD + GT_Utility.formatNumbers(fuelRemaining) + EnumChatFormatting.RESET + " L", - StatCollector.translateToLocal("GT5U.engine.efficiency") + ": " + - EnumChatFormatting.YELLOW + (mEfficiency/100F) + EnumChatFormatting.YELLOW + " %", - StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + - EnumChatFormatting.GREEN + mPollutionReduction + EnumChatFormatting.RESET + " %" - + return new String[] { + EnumChatFormatting.BLUE + "Diesel Engine" + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", + getIdealStatus() == getRepairStatus() + ? EnumChatFormatting.GREEN + + StatCollector.translateToLocal("GT5U.turbine.maintenance.false") + + EnumChatFormatting.RESET + : EnumChatFormatting.RED + + StatCollector.translateToLocal("GT5U.turbine.maintenance.true") + + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.engine.output") + ": " + EnumChatFormatting.RED + + GT_Utility.formatNumbers((mEUt * mEfficiency / 10000)) + EnumChatFormatting.RESET + " EU/t", + StatCollector.translateToLocal("GT5U.engine.consumption") + ": " + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(fuelConsumption) + EnumChatFormatting.RESET + " L/t", + StatCollector.translateToLocal("GT5U.engine.value") + ": " + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(fuelValue) + EnumChatFormatting.RESET + " EU/L", + StatCollector.translateToLocal("GT5U.turbine.fuel") + ": " + EnumChatFormatting.GOLD + + GT_Utility.formatNumbers(fuelRemaining) + EnumChatFormatting.RESET + " L", + StatCollector.translateToLocal("GT5U.engine.efficiency") + ": " + EnumChatFormatting.YELLOW + + (mEfficiency / 100F) + EnumChatFormatting.YELLOW + " %", + StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + EnumChatFormatting.GREEN + + mPollutionReduction + EnumChatFormatting.RESET + " %" }; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java index 867ffa6d02..6b00d693c5 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java @@ -1,5 +1,18 @@ package gregtech.common.tileentities.machines.multi; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.isAir; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.enums.GT_HatchElement.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_GLOW; +import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IItemSource; @@ -19,28 +32,16 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; +import java.util.ArrayList; +import java.util.List; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; -import java.util.ArrayList; -import java.util.List; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.isAir; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.enums.GT_HatchElement.*; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_GLOW; -import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GT_MetaTileEntity_DistillationTower extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_DistillationTower> implements ISurvivalConstructable { +public class GT_MetaTileEntity_DistillationTower + extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_DistillationTower> + implements ISurvivalConstructable { protected static final int CASING_INDEX = 49; protected static final String STRUCTURE_PIECE_BASE = "base"; protected static final String STRUCTURE_PIECE_LAYER = "layer"; @@ -49,48 +50,65 @@ public class GT_MetaTileEntity_DistillationTower extends GT_MetaTileEntity_Enhan private static final IStructureDefinition<GT_MetaTileEntity_DistillationTower> STRUCTURE_DEFINITION; static { - IHatchElement<GT_MetaTileEntity_DistillationTower> layeredOutputHatch = OutputHatch - .withCount(GT_MetaTileEntity_DistillationTower::getCurrentLayerOutputHatchCount) - .withAdder(GT_MetaTileEntity_DistillationTower::addLayerOutputHatch); + IHatchElement<GT_MetaTileEntity_DistillationTower> layeredOutputHatch = OutputHatch.withCount( + GT_MetaTileEntity_DistillationTower::getCurrentLayerOutputHatchCount) + .withAdder(GT_MetaTileEntity_DistillationTower::addLayerOutputHatch); STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_DistillationTower>builder() - .addShape(STRUCTURE_PIECE_BASE, transpose(new String[][]{ - {"b~b", "bbb", "bbb"}, - })) - .addShape(STRUCTURE_PIECE_LAYER, transpose(new String[][]{ - {"lll", "lcl", "lll"} - })) - .addShape(STRUCTURE_PIECE_LAYER_HINT, transpose(new String[][]{ - {"lll", "l-l", "lll"} - })) - .addShape(STRUCTURE_PIECE_TOP_HINT, transpose(new String[][]{ - {"lll", "lll", "lll"} - })) - .addElement('b', ofChain( - buildHatchAdder(GT_MetaTileEntity_DistillationTower.class) - .atLeast(Energy, OutputBus, InputHatch, InputBus, Maintenance) - .casingIndex(CASING_INDEX) - .dot(1) - .build(), - onElementPass(GT_MetaTileEntity_DistillationTower::onCasingFound, ofBlock(GregTech_API.sBlockCasings4, 1)) - )) - .addElement('l', ofChain( - buildHatchAdder(GT_MetaTileEntity_DistillationTower.class) - .atLeast(layeredOutputHatch) - .casingIndex(CASING_INDEX) - .dot(2) - .build(), - ofHatchAdder(GT_MetaTileEntity_DistillationTower::addEnergyInputToMachineList, CASING_INDEX, 2), - ofHatchAdder(GT_MetaTileEntity_DistillationTower::addLayerOutputHatch, CASING_INDEX, 2), - ofHatchAdder(GT_MetaTileEntity_DistillationTower::addMaintenanceToMachineList, CASING_INDEX, 2), - onElementPass(GT_MetaTileEntity_DistillationTower::onCasingFound, ofBlock(GregTech_API.sBlockCasings4, 1)) - )) - .addElement('c', ofChain( - onElementPass(t -> t.onTopLayerFound(false), ofHatchAdder(GT_MetaTileEntity_DistillationTower::addOutputToMachineList, CASING_INDEX, 3)), - onElementPass(t -> t.onTopLayerFound(false), ofHatchAdder(GT_MetaTileEntity_DistillationTower::addMaintenanceToMachineList, CASING_INDEX, 3)), - onElementPass(t -> t.onTopLayerFound(true), ofBlock(GregTech_API.sBlockCasings4, 1)), - isAir() - )) - .build(); + .addShape(STRUCTURE_PIECE_BASE, transpose(new String[][] { + {"b~b", "bbb", "bbb"}, + })) + .addShape(STRUCTURE_PIECE_LAYER, transpose(new String[][] {{"lll", "lcl", "lll"}})) + .addShape(STRUCTURE_PIECE_LAYER_HINT, transpose(new String[][] {{"lll", "l-l", "lll"}})) + .addShape(STRUCTURE_PIECE_TOP_HINT, transpose(new String[][] {{"lll", "lll", "lll"}})) + .addElement( + 'b', + ofChain( + buildHatchAdder(GT_MetaTileEntity_DistillationTower.class) + .atLeast(Energy, OutputBus, InputHatch, InputBus, Maintenance) + .casingIndex(CASING_INDEX) + .dot(1) + .build(), + onElementPass( + GT_MetaTileEntity_DistillationTower::onCasingFound, + ofBlock(GregTech_API.sBlockCasings4, 1)))) + .addElement( + 'l', + ofChain( + buildHatchAdder(GT_MetaTileEntity_DistillationTower.class) + .atLeast(layeredOutputHatch) + .casingIndex(CASING_INDEX) + .dot(2) + .build(), + ofHatchAdder( + GT_MetaTileEntity_DistillationTower::addEnergyInputToMachineList, + CASING_INDEX, + 2), + ofHatchAdder(GT_MetaTileEntity_DistillationTower::addLayerOutputHatch, CASING_INDEX, 2), + ofHatchAdder( + GT_MetaTileEntity_DistillationTower::addMaintenanceToMachineList, + CASING_INDEX, + 2), + onElementPass( + GT_MetaTileEntity_DistillationTower::onCasingFound, + ofBlock(GregTech_API.sBlockCasings4, 1)))) + .addElement( + 'c', + ofChain( + onElementPass( + t -> t.onTopLayerFound(false), + ofHatchAdder( + GT_MetaTileEntity_DistillationTower::addOutputToMachineList, + CASING_INDEX, + 3)), + onElementPass( + t -> t.onTopLayerFound(false), + ofHatchAdder( + GT_MetaTileEntity_DistillationTower::addMaintenanceToMachineList, + CASING_INDEX, + 3)), + onElementPass(t -> t.onTopLayerFound(true), ofBlock(GregTech_API.sBlockCasings4, 1)), + isAir())) + .build(); } protected final List<List<GT_MetaTileEntity_Hatch_Output>> mOutputHatchesByLayer = new ArrayList<>(); @@ -115,41 +133,64 @@ public class GT_MetaTileEntity_DistillationTower extends GT_MetaTileEntity_Enhan protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); tt.addMachineType("Distillery") - .addInfo("Controller block for the Distillation Tower") - .addInfo("Fluids are only put out at the correct height") - .addInfo("The correct height equals the slot number in the NEI recipe") - .addSeparator() - .beginVariableStructureBlock(3, 3, 3, 12, 3, 3, true) - .addController("Front bottom") - .addOtherStructurePart("Clean Stainless Steel Machine Casing", "7 x h - 5 (minimum)") - .addEnergyHatch("Any casing", 1, 2) - .addMaintenanceHatch("Any casing", 1, 2, 3) - .addInputHatch("Any bottom layer casing", 1) - .addOutputBus("Any bottom layer casing", 1) - .addOutputHatch("2-11x Output Hatches (At least one per layer except bottom layer)", 2, 3) - .toolTipFinisher("Gregtech"); + .addInfo("Controller block for the Distillation Tower") + .addInfo("Fluids are only put out at the correct height") + .addInfo("The correct height equals the slot number in the NEI recipe") + .addSeparator() + .beginVariableStructureBlock(3, 3, 3, 12, 3, 3, true) + .addController("Front bottom") + .addOtherStructurePart("Clean Stainless Steel Machine Casing", "7 x h - 5 (minimum)") + .addEnergyHatch("Any casing", 1, 2) + .addMaintenanceHatch("Any casing", 1, 2, 3) + .addInputHatch("Any bottom layer casing", 1) + .addOutputBus("Any bottom layer casing", 1) + .addOutputHatch("2-11x Output Hatches (At least one per layer except bottom layer)", 2, 3) + .toolTipFinisher("Gregtech"); return tt; } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { if (aSide == aFacing) { if (aActive) - return new ITexture[]{ + return new ITexture[] { BlockIcons.getCasingTextureForId(CASING_INDEX), - TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW).extFacing().glow().build()}; - return new ITexture[]{ + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW) + .extFacing() + .glow() + .build() + }; + return new ITexture[] { BlockIcons.getCasingTextureForId(CASING_INDEX), - TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_GLOW).extFacing().glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_GLOW) + .extFacing() + .glow() + .build() + }; } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_INDEX)}; + return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(CASING_INDEX)}; } @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "DistillationTower.png"); + return new GT_GUIContainer_MultiMachine( + aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "DistillationTower.png"); } @Override @@ -203,20 +244,24 @@ public class GT_MetaTileEntity_DistillationTower extends GT_MetaTileEntity_Enhan FluidStack[] tFluids = tFluidList.toArray(new FluidStack[0]); if (tFluids.length > 0) { for (FluidStack tFluid : tFluids) { - tRecipe = GT_Recipe.GT_Recipe_Map.sDistillationRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], new FluidStack[]{tFluid}, inputs); + tRecipe = GT_Recipe.GT_Recipe_Map.sDistillationRecipes.findRecipe( + getBaseMetaTileEntity(), + false, + gregtech.api.enums.GT_Values.V[tTier], + new FluidStack[] {tFluid}, + inputs); if (tRecipe != null) { if (tRecipe.isRecipeInputEqual(true, tFluids, inputs)) { this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, tVoltage); - //In case recipe is too OP for that machine - if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) - return false; + // In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return false; if (this.mEUt > 0) { this.mEUt = (-this.mEUt); } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)}; + this.mOutputItems = new ItemStack[] {tRecipe.getOutput(0)}; this.mOutputFluids = tRecipe.mFluidOutputs.clone(); updateSlots(); return true; @@ -234,19 +279,20 @@ public class GT_MetaTileEntity_DistillationTower extends GT_MetaTileEntity_Enhan protected void onTopLayerFound(boolean aIsCasing) { mTopLayerFound = true; - if (aIsCasing) - onCasingFound(); + if (aIsCasing) onCasingFound(); } protected int getCurrentLayerOutputHatchCount() { - return mOutputHatchesByLayer.size() < mHeight ? 0 : mOutputHatchesByLayer.get(mHeight - 1).size(); + return mOutputHatchesByLayer.size() < mHeight + ? 0 + : mOutputHatchesByLayer.get(mHeight - 1).size(); } protected boolean addLayerOutputHatch(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null || aTileEntity.isDead() || !(aTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Output)) - return false; - while (mOutputHatchesByLayer.size() < mHeight) - mOutputHatchesByLayer.add(new ArrayList<>()); + if (aTileEntity == null + || aTileEntity.isDead() + || !(aTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Output)) return false; + while (mOutputHatchesByLayer.size() < mHeight) mOutputHatchesByLayer.add(new ArrayList<>()); GT_MetaTileEntity_Hatch_Output tHatch = (GT_MetaTileEntity_Hatch_Output) aTileEntity.getMetaTileEntity(); tHatch.updateTexture(aBaseCasingIndex); return mOutputHatchesByLayer.get(mHeight - 1).add(tHatch); @@ -272,15 +318,15 @@ public class GT_MetaTileEntity_DistillationTower extends GT_MetaTileEntity_Enhan mCasing = 0; // check base - if (!checkPiece(STRUCTURE_PIECE_BASE, 1, 0, 0)) - return false; + if (!checkPiece(STRUCTURE_PIECE_BASE, 1, 0, 0)) return false; // check each layer while (mHeight < 12) { if (!checkPiece(STRUCTURE_PIECE_LAYER, 1, mHeight, 0)) { return false; } - if (mOutputHatchesByLayer.size() < mHeight || mOutputHatchesByLayer.get(mHeight - 1).isEmpty()) + if (mOutputHatchesByLayer.size() < mHeight + || mOutputHatchesByLayer.get(mHeight - 1).isEmpty()) // layer without output hatch return false; if (mTopLayerFound) { @@ -332,15 +378,18 @@ public class GT_MetaTileEntity_DistillationTower extends GT_MetaTileEntity_Enhan public int survivalConstruct(ItemStack stackSize, int elementBudget, IItemSource source, EntityPlayerMP actor) { if (mMachine) return -1; mHeight = 0; - int built = survivialBuildPiece(STRUCTURE_PIECE_BASE, stackSize, 1, 0, 0, elementBudget, source, actor, false, true); + int built = survivialBuildPiece( + STRUCTURE_PIECE_BASE, stackSize, 1, 0, 0, elementBudget, source, actor, false, true); if (built >= 0) return built; int tTotalHeight = Math.min(12, stackSize.stackSize + 2); // min 2 output layer, so at least 1 + 2 height for (int i = 1; i < tTotalHeight - 1; i++) { mHeight = i; - built = survivialBuildPiece(STRUCTURE_PIECE_LAYER_HINT, stackSize, 1, i, 0, elementBudget, source, actor, false, true); + built = survivialBuildPiece( + STRUCTURE_PIECE_LAYER_HINT, stackSize, 1, i, 0, elementBudget, source, actor, false, true); if (built >= 0) return built; } mHeight = tTotalHeight; - return survivialBuildPiece(STRUCTURE_PIECE_TOP_HINT, stackSize, 1, tTotalHeight - 1, 0, elementBudget, source, actor, false, true); + return survivialBuildPiece( + STRUCTURE_PIECE_TOP_HINT, stackSize, 1, tTotalHeight - 1, 0, elementBudget, source, actor, false, true); } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java index b98b1f7b81..0ec74e3a78 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java @@ -1,5 +1,20 @@ package gregtech.common.tileentities.machines.multi; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.lazy; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.enums.GT_HatchElement.*; +import static gregtech.api.enums.GT_HatchElement.Muffler; +import static gregtech.api.enums.GT_HatchElement.OutputBus; +import static gregtech.api.enums.GT_Values.W; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ORE_DRILL; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ORE_DRILL_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ORE_DRILL_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ORE_DRILL_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.getCasingTextureForId; +import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; +import static gregtech.api.util.GT_StructureUtility.ofFrame; + import com.google.common.collect.ImmutableList; import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; @@ -18,9 +33,11 @@ import gregtech.api.metatileentity.implementations.*; import gregtech.api.objects.GT_ChunkManager; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_StructureUtility; import gregtech.api.util.GT_Utility; import gregtech.api.util.IGT_HatchAdder; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -32,59 +49,44 @@ import net.minecraft.world.ChunkCoordIntPair; import net.minecraftforge.common.util.FakePlayer; import net.minecraftforge.common.util.ForgeDirection; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.lazy; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.enums.GT_HatchElement.*; -import static gregtech.api.enums.GT_HatchElement.Muffler; -import static gregtech.api.enums.GT_HatchElement.OutputBus; -import static gregtech.api.enums.GT_Values.W; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ORE_DRILL; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ORE_DRILL_ACTIVE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ORE_DRILL_ACTIVE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ORE_DRILL_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.getCasingTextureForId; -import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; -import static gregtech.api.util.GT_StructureUtility.ofFrame; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_DrillerBase> implements IChunkLoader, ISurvivalConstructable { +public abstract class GT_MetaTileEntity_DrillerBase + extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_DrillerBase> + implements IChunkLoader, ISurvivalConstructable { private static final ItemStack miningPipe = GT_ModHandler.getIC2Item("miningPipe", 0); private static final ItemStack miningPipeTip = GT_ModHandler.getIC2Item("miningPipeTip", 0); private static final Block miningPipeBlock = GT_Utility.getBlockFromStack(miningPipe); private static final Block miningPipeTipBlock = GT_Utility.getBlockFromStack(miningPipeTip); protected static final String STRUCTURE_PIECE_MAIN = "main"; - protected static final ClassValue<IStructureDefinition<GT_MetaTileEntity_DrillerBase>> STRUCTURE_DEFINITION = new ClassValue<IStructureDefinition<GT_MetaTileEntity_DrillerBase>>() { - @Override - protected IStructureDefinition<GT_MetaTileEntity_DrillerBase> computeValue(Class<?> type) { - return StructureDefinition.<GT_MetaTileEntity_DrillerBase>builder() - .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][]{ - {" ", " f ", " "}, - {" ", " f ", " "}, - {" ", " f ", " "}, - {" f ", "fcf", " f "}, - {" f ", "fcf", " f "}, - {" f ", "fcf", " f "}, - {"b~b", "bbb", "bbb"}, - })) - .addElement('f', lazy(t -> ofFrame(t.getFrameMaterial()))) - .addElement('c', lazy(t -> ofBlock(t.getCasingBlockItem().getBlock(), t.getCasingBlockItem().get(0).getItemDamage()))) - .addElement('b', lazy(t -> buildHatchAdder(GT_MetaTileEntity_DrillerBase.class) - .atLeastList(t.getAllowedHatches()) - .casingIndex(t.casingTextureIndex) - .dot(1) - .buildAndChain( - t.getCasingBlockItem().getBlock(), t.getCasingBlockItem().get(0).getItemDamage() - ) - )) - .build(); - } - }; + protected static final ClassValue<IStructureDefinition<GT_MetaTileEntity_DrillerBase>> STRUCTURE_DEFINITION = + new ClassValue<IStructureDefinition<GT_MetaTileEntity_DrillerBase>>() { + @Override + protected IStructureDefinition<GT_MetaTileEntity_DrillerBase> computeValue(Class<?> type) { + return StructureDefinition.<GT_MetaTileEntity_DrillerBase>builder() + .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] { + {" ", " f ", " "}, + {" ", " f ", " "}, + {" ", " f ", " "}, + {" f ", "fcf", " f "}, + {" f ", "fcf", " f "}, + {" f ", "fcf", " f "}, + {"b~b", "bbb", "bbb"}, + })) + .addElement('f', lazy(t -> ofFrame(t.getFrameMaterial()))) + .addElement( + 'c', + lazy(t -> ofBlock( + t.getCasingBlockItem().getBlock(), + t.getCasingBlockItem().get(0).getItemDamage()))) + .addElement('b', lazy(t -> buildHatchAdder(GT_MetaTileEntity_DrillerBase.class) + .atLeastList(t.getAllowedHatches()) + .casingIndex(t.casingTextureIndex) + .dot(1) + .buildAndChain( + t.getCasingBlockItem().getBlock(), + t.getCasingBlockItem().get(0).getItemDamage()))) + .build(); + } + }; private Block casingBlock; private int casingMeta; @@ -95,8 +97,15 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_En private ForgeDirection back; private int xDrill, yDrill, zDrill, xPipe, zPipe, yHead; - protected int getXDrill() { return xDrill; } - protected int getZDrill() { return zDrill; } + + protected int getXDrill() { + return xDrill; + } + + protected int getZDrill() { + return zDrill; + } + protected int workState; protected static final int STATE_DOWNWARD = 0, STATE_AT_BOTTOM = 1, STATE_UPWARD = 2; @@ -118,24 +127,49 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_En casingBlock = getCasingBlockItem().getBlock(); casingMeta = getCasingBlockItem().get(0).getItemDamage(); int frameId = 4096 + getFrameMaterial().mMetaItemSubID; - frameMeta = GregTech_API.METATILEENTITIES[frameId] != null ? GregTech_API.METATILEENTITIES[frameId].getTileEntityBaseType() : W; + frameMeta = GregTech_API.METATILEENTITIES[frameId] != null + ? GregTech_API.METATILEENTITIES[frameId].getTileEntityBaseType() + : W; casingTextureIndex = getCasingTextureIndex(); workState = STATE_DOWNWARD; } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { if (aSide == aFacing) { - if (aActive) return new ITexture[]{ + if (aActive) + return new ITexture[] { getCasingTextureForId(casingTextureIndex), - TextureFactory.builder().addIcon(OVERLAY_FRONT_ORE_DRILL_ACTIVE).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_ORE_DRILL_ACTIVE_GLOW).extFacing().glow().build()}; - return new ITexture[]{ - getCasingTextureForId(casingTextureIndex), - TextureFactory.builder().addIcon(OVERLAY_FRONT_ORE_DRILL).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_ORE_DRILL_GLOW).extFacing().glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ORE_DRILL_ACTIVE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ORE_DRILL_ACTIVE_GLOW) + .extFacing() + .glow() + .build() + }; + return new ITexture[] { + getCasingTextureForId(casingTextureIndex), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ORE_DRILL) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ORE_DRILL_GLOW) + .extFacing() + .glow() + .build() + }; } - return new ITexture[]{getCasingTextureForId(casingTextureIndex)}; + return new ITexture[] {getCasingTextureForId(casingTextureIndex)}; } @Override @@ -156,18 +190,23 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_En workState = aNBT.getInteger("workState"); if (aNBT.hasKey("isPickingPipes")) workState = aNBT.getBoolean("isPickingPipes") ? STATE_UPWARD : STATE_DOWNWARD; - if (aNBT.hasKey("chunkLoadingEnabled")) - mChunkLoadingEnabled = aNBT.getBoolean("chunkLoadingEnabled"); + if (aNBT.hasKey("chunkLoadingEnabled")) mChunkLoadingEnabled = aNBT.getBoolean("chunkLoadingEnabled"); if (aNBT.getBoolean("isChunkloading")) { - mCurrentChunk = new ChunkCoordIntPair(aNBT.getInteger("loadedChunkXPos"), aNBT.getInteger("loadedChunkZPos")); + mCurrentChunk = + new ChunkCoordIntPair(aNBT.getInteger("loadedChunkXPos"), aNBT.getInteger("loadedChunkZPos")); } } @Override - public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public boolean onSolderingToolRightClick( + byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aSide == getBaseMetaTileEntity().getFrontFacing()) { mChunkLoadingEnabled = !mChunkLoadingEnabled; - GT_Utility.sendChatToPlayer(aPlayer, mChunkLoadingEnabled ? GT_Utility.trans("502", "Mining chunk loading enabled") : GT_Utility.trans("503", "Mining chunk loading disabled")); + GT_Utility.sendChatToPlayer( + aPlayer, + mChunkLoadingEnabled + ? GT_Utility.trans("502", "Mining chunk loading enabled") + : GT_Utility.trans("503", "Mining chunk loading disabled")); return true; } return super.onSolderingToolRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ); @@ -175,25 +214,26 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_En @Override public void onRemoval() { - if (mChunkLoadingEnabled) - GT_ChunkManager.releaseTicket((TileEntity)getBaseMetaTileEntity()); + if (mChunkLoadingEnabled) GT_ChunkManager.releaseTicket((TileEntity) getBaseMetaTileEntity()); super.onRemoval(); } @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPostTick(aBaseMetaTileEntity, aTick); - if (aBaseMetaTileEntity.isServerSide() && mCurrentChunk != null && !mWorkChunkNeedsReload && !aBaseMetaTileEntity.isAllowedToWork()) { + if (aBaseMetaTileEntity.isServerSide() + && mCurrentChunk != null + && !mWorkChunkNeedsReload + && !aBaseMetaTileEntity.isAllowedToWork()) { // if machine has stopped, stop chunkloading - GT_ChunkManager.releaseTicket((TileEntity)aBaseMetaTileEntity); + GT_ChunkManager.releaseTicket((TileEntity) aBaseMetaTileEntity); mWorkChunkNeedsReload = true; } } protected boolean tryPickPipe() { - if (yHead == yDrill) - return isPickingPipes = false; - if (tryOutputPipe()){ + if (yHead == yDrill) return isPickingPipes = false; + if (tryOutputPipe()) { if (checkBlockAndMeta(xPipe, yHead + 1, zPipe, miningPipeBlock, W)) getBaseMetaTileEntity().getWorld().setBlock(xPipe, yHead + 1, zPipe, miningPipeTipBlock); getBaseMetaTileEntity().getWorld().setBlockToAir(xPipe, yHead, zPipe); @@ -212,7 +252,6 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_En return tryLowerPipeState(false) == 0; } - /** * @return 0 for succeeded, 1 for invalid block, 2 for not having mining pipes, 3 for event canceled. */ @@ -226,16 +265,24 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_En protected int tryLowerPipeState(boolean isSimulating) { if (!isHasMiningPipes()) return 2; switch (canLowerPipe()) { - case 1: return 1; - case 2: return 3; + case 1: + return 1; + case 2: + return 3; } Block b = getBaseMetaTileEntity().getBlock(xPipe, yHead - 1, zPipe); - if (b != miningPipeTipBlock && !GT_Utility.setBlockByFakePlayer(getFakePlayer(getBaseMetaTileEntity()), xPipe, yHead - 1, zPipe, miningPipeTipBlock, 0, isSimulating)) - return 3; + if (b != miningPipeTipBlock + && !GT_Utility.setBlockByFakePlayer( + getFakePlayer(getBaseMetaTileEntity()), + xPipe, + yHead - 1, + zPipe, + miningPipeTipBlock, + 0, + isSimulating)) return 3; if (!isSimulating) { - if (yHead != yDrill) - getBaseMetaTileEntity().getWorld().setBlock(xPipe, yHead, zPipe, miningPipeBlock); + if (yHead != yDrill) getBaseMetaTileEntity().getWorld().setBlock(xPipe, yHead, zPipe, miningPipeBlock); if (b != miningPipeBlock && b != miningPipeTipBlock) getBaseMetaTileEntity().decrStackSize(1, 1); } @@ -248,7 +295,7 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_En if (isHasMiningPipes(maxPipes)) return; ItemStack pipes = getStackInSlot(1); - if(pipes != null && !pipes.isItemEqual(miningPipe)) return; + if (pipes != null && !pipes.isItemEqual(miningPipe)) return; for (ItemStack storedItem : getStoredInputs()) { if (!storedItem.isItemEqual(miningPipe)) continue; @@ -268,7 +315,7 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_En updateSlots(); } - private boolean tryOutputPipe(){ + private boolean tryOutputPipe() { if (!getBaseMetaTileEntity().addStackToSlot(1, GT_Utility.copyAmount(1, miningPipe))) mOutputItems = new ItemStack[] {GT_Utility.copyAmount(1, miningPipe)}; return true; @@ -277,7 +324,7 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_En /** * @return 0 for available, 1 for invalid block, 2 for event canceled. */ - protected int canLowerPipe(){ + protected int canLowerPipe() { IGregTechTileEntity aBaseTile = getBaseMetaTileEntity(); if (yHead > 0 && GT_Utility.getBlockHardnessAt(aBaseTile.getWorld(), xPipe, yHead - 1, zPipe) >= 0) { return GT_Utility.eraseBlockByFakePlayer(getFakePlayer(aBaseTile), xPipe, yHead - 1, zPipe, true) ? 0 : 2; @@ -303,7 +350,7 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_En * @return if no pipes are present */ @Deprecated - protected boolean waitForPipes(){ + protected boolean waitForPipes() { return !isHasMiningPipes(); } @@ -316,23 +363,37 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_En return false; } - protected boolean workingDownward(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) { + protected boolean workingDownward( + ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) { switch (tryLowerPipeState()) { - case 2: mMaxProgresstime = 0; return false; - case 3: workState = STATE_UPWARD; return true; - case 1: workState = STATE_AT_BOTTOM; return true; - default: return true; + case 2: + mMaxProgresstime = 0; + return false; + case 3: + workState = STATE_UPWARD; + return true; + case 1: + workState = STATE_AT_BOTTOM; + return true; + default: + return true; } } - protected boolean workingAtBottom(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) { + protected boolean workingAtBottom( + ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) { switch (tryLowerPipeState(true)) { - case 0: workState = STATE_DOWNWARD; return true; - default: workState = STATE_UPWARD; return true; + case 0: + workState = STATE_DOWNWARD; + return true; + default: + workState = STATE_UPWARD; + return true; } } - protected boolean workingUpward(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) { + protected boolean workingUpward( + ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) { if (tryPickPipe()) { return true; } else { @@ -344,7 +405,7 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_En @Override public boolean checkRecipe(ItemStack aStack) { - //Public pipe actions + // Public pipe actions setElectricityStats(); int oldYHead = yHead; if (!checkPipesAndSetYHead() || !isEnergyEnough()) { @@ -377,7 +438,10 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_En @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { updateCoordinates(); - return checkPiece(STRUCTURE_PIECE_MAIN, 1, 6, 0) && checkHatches() && GT_Utility.getTier(getMaxInputVoltage()) >= getMinTier() && mMaintenanceHatches.size() == 1; + return checkPiece(STRUCTURE_PIECE_MAIN, 1, 6, 0) + && checkHatches() + && GT_Utility.getTier(getMaxInputVoltage()) >= getMinTier() + && mMaintenanceHatches.size() == 1; } private void updateCoordinates() { @@ -391,10 +455,10 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_En private boolean checkPipesAndSetYHead() { yHead = yDrill - 1; - while (checkBlockAndMeta(xPipe, yHead, zPipe, miningPipeBlock, W)) yHead--; //skip pipes - //is pipe tip OR is controller layer + while (checkBlockAndMeta(xPipe, yHead, zPipe, miningPipeBlock, W)) yHead--; // skip pipes + // is pipe tip OR is controller layer if (checkBlockAndMeta(xPipe, yHead, zPipe, miningPipeTipBlock, W) || ++yHead == yDrill) return true; - //pipe column is broken - try fix + // pipe column is broken - try fix getBaseMetaTileEntity().getWorld().setBlock(xPipe, yHead, zPipe, miningPipeTipBlock); return true; } @@ -403,7 +467,8 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_En protected boolean checkCasingBlock(int xOff, int yOff, int zOff) { return checkBlockAndMetaOffset(xOff, yOff, zOff, casingBlock, casingMeta); } - //meta of frame is getTileEntityBaseType; frame should be checked using its drops (possible a high weight operation) + // meta of frame is getTileEntityBaseType; frame should be checked using its drops (possible a high weight + // operation) @Deprecated protected boolean checkFrameBlock(int xOff, int yOff, int zOff) { return checkBlockAndMetaOffset(xOff, yOff, zOff, GregTech_API.sBlockMachines, frameMeta); @@ -465,11 +530,10 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_En protected abstract void setElectricityStats(); - public int getTotalConfigValue(){ + public int getTotalConfigValue() { int config = 0; ArrayList<ItemStack> tCircuitList = getDataItems(1); - for (ItemStack tCircuit : tCircuitList) - config += tCircuit.getItemDamage(); + for (ItemStack tCircuit : tCircuitList) config += tCircuit.getItemDamage(); return config; } @@ -478,7 +542,7 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_En /** * @param state using bitmask, 1 for IntegratedCircuit, 2 for DataStick, 4 for DataOrb */ - private boolean isCorrectDataItem(ItemStack aStack, int state){ + private boolean isCorrectDataItem(ItemStack aStack, int state) { if ((state & 1) != 0 && ItemList.Circuit_Integrated.isStackEqual(aStack, true, true)) return true; if ((state & 2) != 0 && ItemList.Tool_DataStick.isStackEqual(aStack, false, true)) return true; return (state & 4) != 0 && ItemList.Tool_DataOrb.isStackEqual(aStack, false, true); @@ -516,7 +580,9 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_En } @Override - public ChunkCoordIntPair getActiveChunk(){return mCurrentChunk;} + public ChunkCoordIntPair getActiveChunk() { + return mCurrentChunk; + } @Override public void construct(ItemStack stackSize, boolean hintsOnly) { @@ -530,7 +596,15 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_En } protected List<IHatchElement<? super GT_MetaTileEntity_DrillerBase>> getAllowedHatches() { - return ImmutableList.of(InputHatch, OutputHatch, InputBus, OutputBus, Muffler, Maintenance, Energy, DataHatchElement.DataAccess); + return ImmutableList.of( + InputHatch, + OutputHatch, + InputBus, + OutputBus, + Muffler, + Maintenance, + Energy, + DataHatchElement.DataAccess); } private enum DataHatchElement implements IHatchElement<GT_MetaTileEntity_DrillerBase> { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java index 396bf78b34..a2d1dee4a1 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java @@ -1,5 +1,13 @@ package gregtech.common.tileentities.machines.multi; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.enums.GT_HatchElement.*; +import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.GT_Values.VN; +import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; +import static gregtech.api.util.GT_StructureUtility.ofCoil; + import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IItemSource; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; @@ -17,6 +25,7 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; +import java.util.ArrayList; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.InventoryPlayer; @@ -26,49 +35,55 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.FluidStack; -import java.util.ArrayList; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.enums.GT_HatchElement.*; -import static gregtech.api.enums.GT_Values.V; -import static gregtech.api.enums.GT_Values.VN; -import static gregtech.api.enums.Textures.BlockIcons.*; -import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; -import static gregtech.api.util.GT_StructureUtility.ofCoil; - -public class GT_MetaTileEntity_ElectricBlastFurnace extends GT_MetaTileEntity_AbstractMultiFurnace<GT_MetaTileEntity_ElectricBlastFurnace> implements ISurvivalConstructable { +public class GT_MetaTileEntity_ElectricBlastFurnace + extends GT_MetaTileEntity_AbstractMultiFurnace<GT_MetaTileEntity_ElectricBlastFurnace> + implements ISurvivalConstructable { private int mHeatingCapacity = 0; private boolean isBussesSeparate = false; protected final ArrayList<GT_MetaTileEntity_Hatch_Output> mPollutionOutputHatches = new ArrayList<>(); - protected final FluidStack[] pollutionFluidStacks = {Materials.CarbonDioxide.getGas(1000), - Materials.CarbonMonoxide.getGas(1000), Materials.SulfurDioxide.getGas(1000)}; + protected final FluidStack[] pollutionFluidStacks = { + Materials.CarbonDioxide.getGas(1000), + Materials.CarbonMonoxide.getGas(1000), + Materials.SulfurDioxide.getGas(1000) + }; protected static final int CASING_INDEX = 11; protected static final String STRUCTURE_PIECE_MAIN = "main"; - private static final IStructureDefinition<GT_MetaTileEntity_ElectricBlastFurnace> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_ElectricBlastFurnace>builder() - .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][]{ - {"ttt", "tmt", "ttt"}, - {"CCC", "C-C", "CCC",}, - {"CCC", "C-C", "CCC",}, - {"b~b", "bbb", "bbb"} - })) - .addElement('t', - buildHatchAdder(GT_MetaTileEntity_ElectricBlastFurnace.class) - .atLeast(OutputHatch.withAdder(GT_MetaTileEntity_ElectricBlastFurnace::addOutputHatchToTopList).withCount(t -> t.mPollutionOutputHatches.size())) - .casingIndex(CASING_INDEX) - .dot(1) - .buildAndChain(GregTech_API.sBlockCasings1, CASING_INDEX) - ) - .addElement('m', Muffler.newAny(CASING_INDEX, 2)) - .addElement('C', ofCoil(GT_MetaTileEntity_ElectricBlastFurnace::setCoilLevel, GT_MetaTileEntity_ElectricBlastFurnace::getCoilLevel)) - .addElement('b', - buildHatchAdder(GT_MetaTileEntity_ElectricBlastFurnace.class) - .atLeast(InputHatch, OutputHatch, InputBus, OutputBus, Maintenance, Energy) - .casingIndex(CASING_INDEX) - .dot(1) - .buildAndChain(GregTech_API.sBlockCasings1, CASING_INDEX) - ) - .build(); + private static final IStructureDefinition<GT_MetaTileEntity_ElectricBlastFurnace> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_ElectricBlastFurnace>builder() + .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] { + {"ttt", "tmt", "ttt"}, + { + "CCC", "C-C", "CCC", + }, + { + "CCC", "C-C", "CCC", + }, + {"b~b", "bbb", "bbb"} + })) + .addElement( + 't', + buildHatchAdder(GT_MetaTileEntity_ElectricBlastFurnace.class) + .atLeast(OutputHatch.withAdder( + GT_MetaTileEntity_ElectricBlastFurnace::addOutputHatchToTopList) + .withCount(t -> t.mPollutionOutputHatches.size())) + .casingIndex(CASING_INDEX) + .dot(1) + .buildAndChain(GregTech_API.sBlockCasings1, CASING_INDEX)) + .addElement('m', Muffler.newAny(CASING_INDEX, 2)) + .addElement( + 'C', + ofCoil( + GT_MetaTileEntity_ElectricBlastFurnace::setCoilLevel, + GT_MetaTileEntity_ElectricBlastFurnace::getCoilLevel)) + .addElement( + 'b', + buildHatchAdder(GT_MetaTileEntity_ElectricBlastFurnace.class) + .atLeast(InputHatch, OutputHatch, InputBus, OutputBus, Maintenance, Energy) + .casingIndex(CASING_INDEX) + .dot(1) + .buildAndChain(GregTech_API.sBlockCasings1, CASING_INDEX)) + .build(); public GT_MetaTileEntity_ElectricBlastFurnace(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -91,7 +106,8 @@ public class GT_MetaTileEntity_ElectricBlastFurnace extends GT_MetaTileEntity_Ab .addInfo("You can use some fluids to reduce recipe time. Place the circuit in the Input Bus") .addInfo("Each 900K over the min. Heat required reduces power consumption by 5% (multiplicatively)") .addInfo("Each 1800K over the min. Heat required grants one perfect overclock") - .addInfo("For each perfect overclock the EBF will reduce recipe time 4 times (instead of 2) (100% efficiency)") + .addInfo( + "For each perfect overclock the EBF will reduce recipe time 4 times (instead of 2) (100% efficiency)") .addInfo("Additionally gives +100K for every tier past MV") .addPollutionAmount(getPollutionPerSecond(null)) .addSeparator() @@ -113,28 +129,51 @@ public class GT_MetaTileEntity_ElectricBlastFurnace extends GT_MetaTileEntity_Ab } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { if (aSide == aFacing) { if (aActive) - return new ITexture[]{ - casingTexturePages[0][CASING_INDEX], - TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW).extFacing().glow().build()}; - return new ITexture[]{ + return new ITexture[] { casingTexturePages[0][CASING_INDEX], - TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW).extFacing().glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW) + .extFacing() + .glow() + .build() + }; + return new ITexture[] { + casingTexturePages[0][CASING_INDEX], + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW) + .extFacing() + .glow() + .build() + }; } - return new ITexture[]{casingTexturePages[0][CASING_INDEX]}; + return new ITexture[] {casingTexturePages[0][CASING_INDEX]}; } @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "ElectricBlastFurnace.png"); + return new GT_GUIContainer_MultiMachine( + aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "ElectricBlastFurnace.png"); } @Override - public int getPollutionPerSecond(ItemStack aStack){ + public int getPollutionPerSecond(ItemStack aStack) { return GT_Mod.gregtechproxy.mPollutionEBFPerSecond; } @@ -155,7 +194,7 @@ public class GT_MetaTileEntity_ElectricBlastFurnace extends GT_MetaTileEntity_Ab @Override public boolean checkRecipe(ItemStack aStack) { - if(isBussesSeparate) { + if (isBussesSeparate) { FluidStack[] tFluids = getStoredFluids().toArray(new FluidStack[0]); for (GT_MetaTileEntity_Hatch_InputBus tBus : mInputBusses) { ArrayList<ItemStack> tInputs = new ArrayList<>(); @@ -177,32 +216,22 @@ public class GT_MetaTileEntity_ElectricBlastFurnace extends GT_MetaTileEntity_Ab } else { return processRecipe(getCompactedInputs(), getCompactedFluids()); } - } + protected boolean processRecipe(ItemStack[] tItems, FluidStack[] tFluids) { - if (tItems.length <= 0) - return false; + if (tItems.length <= 0) return false; long tVoltage = getMaxInputVoltage(); byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBlastRecipes.findRecipe( - getBaseMetaTileEntity(), - false, - V[tTier], - tFluids, - tItems - ); - - if (tRecipe == null) - return false; - if (this.mHeatingCapacity < tRecipe.mSpecialValue) - return false; - if (!tRecipe.isRecipeInputEqual(true, tFluids, tItems)) - return false; - //In case recipe is too OP for that machine - if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) - return false; + getBaseMetaTileEntity(), false, V[tTier], tFluids, tItems); + + if (tRecipe == null) return false; + if (this.mHeatingCapacity < tRecipe.mSpecialValue) return false; + if (!tRecipe.isRecipeInputEqual(true, tFluids, tItems)) return false; + // In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return false; this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; @@ -214,18 +243,13 @@ public class GT_MetaTileEntity_ElectricBlastFurnace extends GT_MetaTileEntity_Ab } if (tHeatCapacityDivTiers > 0) { this.mEUt = (int) (this.mEUt * (Math.pow(0.95, tHeatCapacityDivTiers))); - this.mMaxProgresstime >>= Math.min(tHeatCapacityDivTiers / 2, overclockCount);//extra free overclocking if possible - if (this.mMaxProgresstime < 1) - this.mMaxProgresstime = 1;//no eu efficiency correction + this.mMaxProgresstime >>= + Math.min(tHeatCapacityDivTiers / 2, overclockCount); // extra free overclocking if possible + if (this.mMaxProgresstime < 1) this.mMaxProgresstime = 1; // no eu efficiency correction } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - this.mOutputItems = new ItemStack[]{ - tRecipe.getOutput(0), - tRecipe.getOutput(1) - }; - this.mOutputFluids = new FluidStack[]{ - tRecipe.getFluidOutput(0) - }; + this.mOutputItems = new ItemStack[] {tRecipe.getOutput(0), tRecipe.getOutput(1)}; + this.mOutputFluids = new FluidStack[] {tRecipe.getFluidOutput(0)}; updateSlots(); return true; } @@ -238,30 +262,32 @@ public class GT_MetaTileEntity_ElectricBlastFurnace extends GT_MetaTileEntity_Ab protected byte calculateOverclockednessEBF(int aEUt, int aDuration, long maxInputVoltage) { byte mTier = (byte) Math.max(0, GT_Utility.getTier(maxInputVoltage)), timesOverclocked = 0; if (mTier == 0) { - //Long time calculation + // Long time calculation long xMaxProgresstime = ((long) aDuration) << 1; if (xMaxProgresstime > Integer.MAX_VALUE - 1) { - //make impossible if too long + // make impossible if too long mEUt = Integer.MAX_VALUE - 1; mMaxProgresstime = Integer.MAX_VALUE - 1; } else { mEUt = aEUt >> 2; mMaxProgresstime = (int) xMaxProgresstime; } - //return 0; + // return 0; } else { - //Long EUt calculation + // Long EUt calculation long xEUt = aEUt; - //Isnt too low EUt check? + // Isnt too low EUt check? long tempEUt = Math.max(xEUt, V[1]); mMaxProgresstime = aDuration; while (tempEUt <= V[mTier - 1]) { - tempEUt <<= 2;//this actually controls overclocking - //xEUt *= 4;//this is effect of everclocking - mMaxProgresstime >>= 1;//this is effect of overclocking - xEUt = mMaxProgresstime == 0 ? xEUt >> 1 : xEUt << 2;//U know, if the time is less than 1 tick make the machine use less power + tempEUt <<= 2; // this actually controls overclocking + // xEUt *= 4;//this is effect of everclocking + mMaxProgresstime >>= 1; // this is effect of overclocking + xEUt = mMaxProgresstime == 0 + ? xEUt >> 1 + : xEUt << 2; // U know, if the time is less than 1 tick make the machine use less power timesOverclocked++; } if (xEUt > Integer.MAX_VALUE - 1) { @@ -269,10 +295,8 @@ public class GT_MetaTileEntity_ElectricBlastFurnace extends GT_MetaTileEntity_Ab mMaxProgresstime = Integer.MAX_VALUE - 1; } else { mEUt = (int) xEUt; - if (mEUt == 0) - mEUt = 1; - if (mMaxProgresstime == 0) - mMaxProgresstime = 1;//set time to 1 tick + if (mEUt == 0) mEUt = 1; + if (mMaxProgresstime == 0) mMaxProgresstime = 1; // set time to 1 tick } } return timesOverclocked; @@ -297,14 +321,11 @@ public class GT_MetaTileEntity_ElectricBlastFurnace extends GT_MetaTileEntity_Ab mPollutionOutputHatches.clear(); - if (!checkPiece(STRUCTURE_PIECE_MAIN, 1, 3, 0)) - return false; + if (!checkPiece(STRUCTURE_PIECE_MAIN, 1, 3, 0)) return false; - if (getCoilLevel() == HeatingCoilLevel.None) - return false; + if (getCoilLevel() == HeatingCoilLevel.None) return false; - if (mMaintenanceHatches.size() != 1) - return false; + if (mMaintenanceHatches.size() != 1) return false; this.mHeatingCapacity = (int) getCoilLevel().getHeat() + 100 * (GT_Utility.getTier(getMaxInputVoltage()) - 2); return true; @@ -312,13 +333,11 @@ public class GT_MetaTileEntity_ElectricBlastFurnace extends GT_MetaTileEntity_Ab @Override public boolean addOutput(FluidStack aLiquid) { - if (aLiquid == null) - return false; + if (aLiquid == null) return false; FluidStack tLiquid = aLiquid.copy(); boolean isOutputPollution = false; for (FluidStack pollutionFluidStack : pollutionFluidStacks) { - if (!tLiquid.isFluidEqual(pollutionFluidStack)) - continue; + if (!tLiquid.isFluidEqual(pollutionFluidStack)) continue; isOutputPollution = true; break; @@ -328,8 +347,7 @@ public class GT_MetaTileEntity_ElectricBlastFurnace extends GT_MetaTileEntity_Ab tOutputHatches = this.mPollutionOutputHatches; int pollutionReduction = 0; for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) { - if (!isValidMetaTileEntity(tHatch)) - continue; + if (!isValidMetaTileEntity(tHatch)) continue; pollutionReduction = 100 - tHatch.calculatePollutionReduction(100); break; } @@ -337,55 +355,56 @@ public class GT_MetaTileEntity_ElectricBlastFurnace extends GT_MetaTileEntity_Ab } else { tOutputHatches = this.mOutputHatches; } - return dumpFluid(tOutputHatches, tLiquid, true) || - dumpFluid(tOutputHatches, tLiquid, false); + return dumpFluid(tOutputHatches, tLiquid, true) || dumpFluid(tOutputHatches, tLiquid, false); } @Override public String[] getInfoData() { int mPollutionReduction = 0; for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) { - if (!isValidMetaTileEntity(tHatch)) - continue; + if (!isValidMetaTileEntity(tHatch)) continue; mPollutionReduction = Math.max(tHatch.calculatePollutionReduction(100), mPollutionReduction); } long storedEnergy = 0; long maxEnergy = 0; for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) { - if (!isValidMetaTileEntity(tHatch)) - continue; + if (!isValidMetaTileEntity(tHatch)) continue; storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU(); maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity(); } - return new String[]{ - StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mProgresstime / 20) + EnumChatFormatting.RESET + " s / " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(mMaxProgresstime / 20) + EnumChatFormatting.RESET + " s", - StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", - StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " + - EnumChatFormatting.RED + GT_Utility.formatNumbers(-mEUt) + EnumChatFormatting.RESET + " EU/t", - StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(getMaxInputVoltage()) + EnumChatFormatting.RESET + " EU/t(*2A) " + - StatCollector.translateToLocal("GT5U.machines.tier") + ": " + - EnumChatFormatting.YELLOW + VN[GT_Utility.getTier(getMaxInputVoltage())] + EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " + - EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + " " + - StatCollector.translateToLocal("GT5U.multiblock.efficiency") + ": " + - EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", - StatCollector.translateToLocal("GT5U.EBF.heat") + ": " + - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mHeatingCapacity) + EnumChatFormatting.RESET + " K", - StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + - EnumChatFormatting.GREEN + mPollutionReduction + EnumChatFormatting.RESET + " %" + return new String[] { + StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(mProgresstime / 20) + EnumChatFormatting.RESET + " s / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(mMaxProgresstime / 20) + EnumChatFormatting.RESET + " s", + StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", + StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " + EnumChatFormatting.RED + + GT_Utility.formatNumbers(-mEUt) + EnumChatFormatting.RESET + " EU/t", + StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(getMaxInputVoltage()) + EnumChatFormatting.RESET + " EU/t(*2A) " + + StatCollector.translateToLocal("GT5U.machines.tier") + + ": " + EnumChatFormatting.YELLOW + + VN[GT_Utility.getTier(getMaxInputVoltage())] + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " + EnumChatFormatting.RED + + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + " " + + StatCollector.translateToLocal("GT5U.multiblock.efficiency") + + ": " + EnumChatFormatting.YELLOW + + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", + StatCollector.translateToLocal("GT5U.EBF.heat") + ": " + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(mHeatingCapacity) + EnumChatFormatting.RESET + " K", + StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + EnumChatFormatting.GREEN + + mPollutionReduction + EnumChatFormatting.RESET + " %" }; } @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(STRUCTURE_PIECE_MAIN, stackSize, hintsOnly, 1,3,0); + buildPiece(STRUCTURE_PIECE_MAIN, stackSize, hintsOnly, 1, 3, 0); } @Override @@ -397,7 +416,8 @@ public class GT_MetaTileEntity_ElectricBlastFurnace extends GT_MetaTileEntity_Ab @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { isBussesSeparate = !isBussesSeparate; - GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + isBussesSeparate); + GT_Utility.sendChatToPlayer( + aPlayer, StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + isBussesSeparate); } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java index e618457d9a..5b9979dbb5 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java @@ -1,5 +1,11 @@ package gregtech.common.tileentities.machines.multi; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_EXTREME_DIESEL_ENGINE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; @@ -19,18 +25,12 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_EXTREME_DIESEL_ENGINE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; - public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_DieselEngine { public GT_MetaTileEntity_ExtremeDieselEngine(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } - + public GT_MetaTileEntity_ExtremeDieselEngine(String aName) { super(aName); } @@ -69,23 +69,47 @@ public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_Die } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { if (aSide == aFacing) { - if (aActive) return new ITexture[]{ + if (aActive) + return new ITexture[] { casingTexturePages[0][60], - TextureFactory.builder().addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE_GLOW).extFacing().glow().build()}; - return new ITexture[]{ - casingTexturePages[0][60], - TextureFactory.builder().addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_GLOW).extFacing().glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE_GLOW) + .extFacing() + .glow() + .build() + }; + return new ITexture[] { + casingTexturePages[0][60], + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_GLOW) + .extFacing() + .glow() + .build() + }; } - return new ITexture[]{casingTexturePages[0][60]}; + return new ITexture[] {casingTexturePages[0][60]}; } @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeExtremeDieselEngine.png"); + return new GT_GUIContainer_MultiMachine( + aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeExtremeDieselEngine.png"); } @Override @@ -134,7 +158,9 @@ public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_Die } @Override - protected int getBoostFactor() { return 2; } + protected int getBoostFactor() { + return 2; + } @Override protected Materials getBooster() { @@ -163,42 +189,47 @@ public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_Die @Override public String[] getInfoData() { - int mPollutionReduction=0; + int mPollutionReduction = 0; for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) { if (isValidMetaTileEntity(tHatch)) { - mPollutionReduction=Math.max(tHatch.calculatePollutionReduction(100),mPollutionReduction); + mPollutionReduction = Math.max(tHatch.calculatePollutionReduction(100), mPollutionReduction); } } - long storedEnergy=0; - long maxEnergy=0; - for(GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) { + long storedEnergy = 0; + long maxEnergy = 0; + for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) { if (isValidMetaTileEntity(tHatch)) { - storedEnergy+=tHatch.getBaseMetaTileEntity().getStoredEU(); - maxEnergy+=tHatch.getBaseMetaTileEntity().getEUCapacity(); + storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU(); + maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity(); } } - - return new String[]{ - EnumChatFormatting.BLUE + "Extreme Diesel Engine" + EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", - getIdealStatus() == getRepairStatus() ? - EnumChatFormatting.GREEN + StatCollector.translateToLocal("GT5U.turbine.maintenance.false") + EnumChatFormatting.RESET : - EnumChatFormatting.RED + StatCollector.translateToLocal("GT5U.turbine.maintenance.true") + EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.engine.output") + ": " + - EnumChatFormatting.RED + GT_Utility.formatNumbers(-mEUt*mEfficiency/10000) + EnumChatFormatting.RESET + " EU/t", - StatCollector.translateToLocal("GT5U.engine.consumption") + ": " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(fuelConsumption) + EnumChatFormatting.RESET + " L/t", - StatCollector.translateToLocal("GT5U.engine.value") + ": " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(fuelValue) + EnumChatFormatting.RESET + " EU/L", - StatCollector.translateToLocal("GT5U.turbine.fuel") + ": " + - EnumChatFormatting.GOLD + GT_Utility.formatNumbers(fuelRemaining) + EnumChatFormatting.RESET + " L", - StatCollector.translateToLocal("GT5U.engine.efficiency") + ": " + - EnumChatFormatting.YELLOW + (mEfficiency/100F) + EnumChatFormatting.YELLOW + " %", - StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + - EnumChatFormatting.GREEN + mPollutionReduction + EnumChatFormatting.RESET + " %" + + return new String[] { + EnumChatFormatting.BLUE + "Extreme Diesel Engine" + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", + getIdealStatus() == getRepairStatus() + ? EnumChatFormatting.GREEN + + StatCollector.translateToLocal("GT5U.turbine.maintenance.false") + + EnumChatFormatting.RESET + : EnumChatFormatting.RED + + StatCollector.translateToLocal("GT5U.turbine.maintenance.true") + + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.engine.output") + ": " + EnumChatFormatting.RED + + GT_Utility.formatNumbers(-mEUt * mEfficiency / 10000) + EnumChatFormatting.RESET + " EU/t", + StatCollector.translateToLocal("GT5U.engine.consumption") + ": " + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(fuelConsumption) + EnumChatFormatting.RESET + " L/t", + StatCollector.translateToLocal("GT5U.engine.value") + ": " + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(fuelValue) + EnumChatFormatting.RESET + " EU/L", + StatCollector.translateToLocal("GT5U.turbine.fuel") + ": " + EnumChatFormatting.GOLD + + GT_Utility.formatNumbers(fuelRemaining) + EnumChatFormatting.RESET + " L", + StatCollector.translateToLocal("GT5U.engine.efficiency") + ": " + EnumChatFormatting.YELLOW + + (mEfficiency / 100F) + EnumChatFormatting.YELLOW + " %", + StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + EnumChatFormatting.GREEN + + mPollutionReduction + EnumChatFormatting.RESET + " %" }; } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java index 30f8ff8746..4e708065bd 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java @@ -1,5 +1,17 @@ package gregtech.common.tileentities.machines.multi; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.lazy; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.enums.GT_HatchElement.Energy; +import static gregtech.api.enums.GT_HatchElement.InputHatch; +import static gregtech.api.enums.GT_HatchElement.OutputHatch; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW; +import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; +import static gregtech.api.util.GT_StructureUtility.filterByMTETier; + import com.google.common.collect.ImmutableMap; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IItemSource; @@ -20,6 +32,7 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gregtech.common.gui.GT_GUIContainer_FusionReactor; +import java.util.ArrayList; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.InventoryPlayer; @@ -29,28 +42,17 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.FluidStack; -import java.util.ArrayList; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.lazy; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.enums.GT_HatchElement.Energy; -import static gregtech.api.enums.GT_HatchElement.InputHatch; -import static gregtech.api.enums.GT_HatchElement.OutputHatch; -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS; -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW; -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW; -import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; -import static gregtech.api.util.GT_StructureUtility.filterByMTETier; - -public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_FusionComputer> implements ISurvivalConstructable { +public abstract class GT_MetaTileEntity_FusionComputer + extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_FusionComputer> + implements ISurvivalConstructable { public static final String STRUCTURE_PIECE_MAIN = "main"; - private static final ClassValue<IStructureDefinition<GT_MetaTileEntity_FusionComputer>> STRUCTURE_DEFINITION = new ClassValue<IStructureDefinition<GT_MetaTileEntity_FusionComputer>>() { - @Override - protected IStructureDefinition<GT_MetaTileEntity_FusionComputer> computeValue(Class<?> type) { - return StructureDefinition.<GT_MetaTileEntity_FusionComputer>builder() - .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][]{ - { + private static final ClassValue<IStructureDefinition<GT_MetaTileEntity_FusionComputer>> STRUCTURE_DEFINITION = + new ClassValue<IStructureDefinition<GT_MetaTileEntity_FusionComputer>>() { + @Override + protected IStructureDefinition<GT_MetaTileEntity_FusionComputer> computeValue(Class<?> type) { + return StructureDefinition.<GT_MetaTileEntity_FusionComputer>builder() + .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] { + { " ", " ihi ", " hh hh ", @@ -66,8 +68,8 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity " hh hh ", " ihi ", " ", - }, - { + }, + { " xhx ", " hhccchh ", " eccxhxcce ", @@ -83,8 +85,8 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity " eccx~xcce ", " hhccchh ", " xhx ", - }, - { + }, + { " ", " ihi ", " hh hh ", @@ -100,46 +102,49 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity " hh hh ", " ihi ", " ", - } - })) - .addElement('c', lazy(t -> ofBlock(t.getFusionCoil(), t.getFusionCoilMeta()))) - .addElement('h', lazy(t -> ofBlock(t.getCasing(), t.getCasingMeta()))) - .addElement('i', lazy(t -> - buildHatchAdder(GT_MetaTileEntity_FusionComputer.class) - .atLeast(ImmutableMap.of(InputHatch.withAdder(GT_MetaTileEntity_FusionComputer::addInjector), 2)) - .hatchItemFilterAnd(t2 -> filterByMTETier(t2.tier(), Integer.MAX_VALUE)) - .casingIndex(53) - .dot(1) - .buildAndChain(t.getCasing(), t.getCasingMeta())) - ) - .addElement('e', lazy(t -> - buildHatchAdder(GT_MetaTileEntity_FusionComputer.class) - .atLeast(ImmutableMap.of(Energy.withAdder(GT_MetaTileEntity_FusionComputer::addEnergyInjector), 16)) - .hatchItemFilterAnd(t2 -> filterByMTETier(t2.tier(), Integer.MAX_VALUE)) - .casingIndex(53) - .dot(2) - .buildAndChain(t.getCasing(), t.getCasingMeta()) - )) - .addElement('x', lazy(t -> - buildHatchAdder(GT_MetaTileEntity_FusionComputer.class) - .atLeast(OutputHatch.withAdder(GT_MetaTileEntity_FusionComputer::addExtractor)) - .hatchItemFilterAnd(t2 -> filterByMTETier(t2.tier(), Integer.MAX_VALUE)) - .casingIndex(53) - .dot(3) - .buildAndChain(t.getCasing(), t.getCasingMeta()) - )) - .build(); - } - }; + } + })) + .addElement('c', lazy(t -> ofBlock(t.getFusionCoil(), t.getFusionCoilMeta()))) + .addElement('h', lazy(t -> ofBlock(t.getCasing(), t.getCasingMeta()))) + .addElement('i', lazy(t -> buildHatchAdder(GT_MetaTileEntity_FusionComputer.class) + .atLeast(ImmutableMap.of( + InputHatch.withAdder(GT_MetaTileEntity_FusionComputer::addInjector), 2)) + .hatchItemFilterAnd(t2 -> filterByMTETier(t2.tier(), Integer.MAX_VALUE)) + .casingIndex(53) + .dot(1) + .buildAndChain(t.getCasing(), t.getCasingMeta()))) + .addElement('e', lazy(t -> buildHatchAdder(GT_MetaTileEntity_FusionComputer.class) + .atLeast(ImmutableMap.of( + Energy.withAdder(GT_MetaTileEntity_FusionComputer::addEnergyInjector), 16)) + .hatchItemFilterAnd(t2 -> filterByMTETier(t2.tier(), Integer.MAX_VALUE)) + .casingIndex(53) + .dot(2) + .buildAndChain(t.getCasing(), t.getCasingMeta()))) + .addElement('x', lazy(t -> buildHatchAdder(GT_MetaTileEntity_FusionComputer.class) + .atLeast(OutputHatch.withAdder(GT_MetaTileEntity_FusionComputer::addExtractor)) + .hatchItemFilterAnd(t2 -> filterByMTETier(t2.tier(), Integer.MAX_VALUE)) + .casingIndex(53) + .dot(3) + .buildAndChain(t.getCasing(), t.getCasingMeta()))) + .build(); + } + }; public GT_Recipe mLastRecipe; public long mEUStore; static { - Textures.BlockIcons.setCasingTextureForId(52, + Textures.BlockIcons.setCasingTextureForId( + 52, TextureFactory.of( - TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW).extFacing().build(), - TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).extFacing().glow().build() - )); + TextureFactory.builder() + .addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW) + .extFacing() + .glow() + .build())); } public GT_MetaTileEntity_FusionComputer(int aID, String aName, String aNameRegional, int tier) { @@ -162,7 +167,12 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_FusionReactor(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "FusionComputer.png", GT_Recipe.GT_Recipe_Map.sFusionRecipes.mNEIName); + return new GT_GUIContainer_FusionReactor( + aPlayerInventory, + aBaseMetaTileEntity, + getLocalName(), + "FusionComputer.png", + GT_Recipe.GT_Recipe_Map.sFusionRecipes.mNEIName); } @Override @@ -204,7 +214,10 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - if (checkPiece(STRUCTURE_PIECE_MAIN, 7, 1, 12) && mInputHatches.size() > 1 && !mOutputHatches.isEmpty() && !mEnergyHatches.isEmpty()) { + if (checkPiece(STRUCTURE_PIECE_MAIN, 7, 1, 12) + && mInputHatches.size() > 1 + && !mOutputHatches.isEmpty() + && !mEnergyHatches.isEmpty()) { mWrench = true; mScrewdriver = true; mSoftHammer = true; @@ -257,10 +270,28 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity public abstract int getFusionCoilMeta(); @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - if (aSide == aFacing) return new ITexture[]{TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS).extFacing().build(), getTextureOverlay()}; - if (aActive) return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(52)}; - return new ITexture[]{TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS).extFacing().build()}; + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { + if (aSide == aFacing) + return new ITexture[] { + TextureFactory.builder() + .addIcon(MACHINE_CASING_FUSION_GLASS) + .extFacing() + .build(), + getTextureOverlay() + }; + if (aActive) return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(52)}; + return new ITexture[] { + TextureFactory.builder() + .addIcon(MACHINE_CASING_FUSION_GLASS) + .extFacing() + .build() + }; } /** @@ -281,22 +312,24 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity return mStartEnergy < 160000000 ? 2 : 1; } if (this.tierOverclock() == 4) { - return (mStartEnergy < 160000000 ? 4 : (mStartEnergy < 320000000 ? 2 : 1)); - } + return (mStartEnergy < 160000000 ? 4 : (mStartEnergy < 320000000 ? 2 : 1)); + } return (mStartEnergy < 160000000) ? 8 : ((mStartEnergy < 320000000) ? 4 : (mStartEnergy < 640000000) ? 2 : 1); } @Override public boolean checkRecipe(ItemStack aStack) { ArrayList<FluidStack> tFluidList = getStoredFluids(); - int tFluidList_sS=tFluidList.size(); + int tFluidList_sS = tFluidList.size(); for (int i = 0; i < tFluidList_sS - 1; i++) { for (int j = i + 1; j < tFluidList_sS; j++) { if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) { if (tFluidList.get(i).amount >= tFluidList.get(j).amount) { - tFluidList.remove(j--); tFluidList_sS=tFluidList.size(); + tFluidList.remove(j--); + tFluidList_sS = tFluidList.size(); } else { - tFluidList.remove(i--); tFluidList_sS=tFluidList.size(); + tFluidList.remove(i--); + tFluidList_sS = tFluidList.size(); break; } } @@ -306,9 +339,11 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity FluidStack[] tFluids = tFluidList.toArray(new FluidStack[0]); GT_Recipe tRecipe; - tRecipe = GT_Recipe.GT_Recipe_Map.sFusionRecipes.findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, false, GT_Values.V[tier()], tFluids); + tRecipe = GT_Recipe.GT_Recipe_Map.sFusionRecipes.findRecipe( + this.getBaseMetaTileEntity(), this.mLastRecipe, false, GT_Values.V[tier()], tFluids); if (tRecipe == null) { - tRecipe = GT_Recipe.GT_Recipe_Map.sComplexFusionRecipes.findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, false, GT_Values.V[tier()], tFluids); + tRecipe = GT_Recipe.GT_Recipe_Map.sComplexFusionRecipes.findRecipe( + this.getBaseMetaTileEntity(), this.mLastRecipe, false, GT_Values.V[tier()], tFluids); } if ((tRecipe == null && !mRunningOnLoad) || (maxEUStore() < tRecipe.mSpecialValue)) { @@ -354,8 +389,7 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aBaseMetaTileEntity.isServerSide()) { - if (mEfficiency < 0) - mEfficiency = 0; + if (mEfficiency < 0) mEfficiency = 0; if (mRunningOnLoad && checkMachine(aBaseMetaTileEntity, mInventory[1])) { this.mEUStore = aBaseMetaTileEntity.getStoredEU(); checkRecipe(); @@ -375,7 +409,8 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity if (isValidMetaTileEntity(tHatch)) { long energyToMove = GT_Values.V[tier()] / 16; if (aBaseMetaTileEntity.getStoredEU() + energyToMove < maxEUStore() - && tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(energyToMove, false)) { + && tHatch.getBaseMetaTileEntity() + .decreaseStoredEnergyUnits(energyToMove, false)) { aBaseMetaTileEntity.increaseStoredEnergyUnits(energyToMove, true); } } @@ -390,23 +425,29 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity for (ItemStack tStack : mOutputItems) if (tStack != null) addOutput(tStack); if (mOutputFluids != null) for (FluidStack tStack : mOutputFluids) if (tStack != null) addOutput(tStack); - mEfficiency = Math.max(0, Math.min(mEfficiency + mEfficiencyIncrease, getMaxEfficiency(mInventory[1]))); + mEfficiency = Math.max( + 0, Math.min(mEfficiency + mEfficiencyIncrease, getMaxEfficiency(mInventory[1]))); mOutputItems = null; mProgresstime = 0; mMaxProgresstime = 0; mEfficiencyIncrease = 0; if (mOutputFluids != null && mOutputFluids.length > 0) { try { - GT_Mod.achievements.issueAchivementHatchFluid(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), mOutputFluids[0]); + GT_Mod.achievements.issueAchivementHatchFluid( + aBaseMetaTileEntity + .getWorld() + .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), + mOutputFluids[0]); } catch (Exception ignored) { } } this.mEUStore = aBaseMetaTileEntity.getStoredEU(); - if (aBaseMetaTileEntity.isAllowedToWork()) - checkRecipe(); + if (aBaseMetaTileEntity.isAllowedToWork()) checkRecipe(); } } else { - if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled() || aBaseMetaTileEntity.hasInventoryBeenModified()) { + if (aTick % 100 == 0 + || aBaseMetaTileEntity.hasWorkJustBeenEnabled() + || aBaseMetaTileEntity.hasInventoryBeenModified()) { turnCasingActive(mMaxProgresstime > 0); if (aBaseMetaTileEntity.isAllowedToWork()) { this.mEUStore = aBaseMetaTileEntity.getStoredEU(); @@ -414,11 +455,11 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity if (this.mEUStore < this.mLastRecipe.mSpecialValue - this.mEUt) { criticalStopMachine(); } - aBaseMetaTileEntity.decreaseStoredEnergyUnits(this.mLastRecipe.mSpecialValue - this.mEUt, true); + aBaseMetaTileEntity.decreaseStoredEnergyUnits( + this.mLastRecipe.mSpecialValue - this.mEUt, true); } } - if (mMaxProgresstime <= 0) - mEfficiency = Math.max(0, mEfficiency - 1000); + if (mMaxProgresstime <= 0) mEfficiency = Math.max(0, mEfficiency - 1000); } } } else { @@ -426,7 +467,8 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity stopMachine(); } } - aBaseMetaTileEntity.setErrorDisplayID((aBaseMetaTileEntity.getErrorDisplayID() & ~127) | (mMachine ? 0 : 64)); + aBaseMetaTileEntity.setErrorDisplayID( + (aBaseMetaTileEntity.getErrorDisplayID() & ~127) | (mMachine ? 0 : 64)); aBaseMetaTileEntity.setActive(mMaxProgresstime > 0); } } @@ -462,6 +504,7 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity public int getDamageToComponent(ItemStack aStack) { return 0; } + @Override public boolean explodesOnComponentBreak(ItemStack aStack) { return false; @@ -475,25 +518,31 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity @Override public String[] getInfoData() { - String tier = tier() == 6 ? EnumChatFormatting.RED+"I"+EnumChatFormatting.RESET : tier() == 7 ? EnumChatFormatting.YELLOW+"II"+EnumChatFormatting.RESET : tier() == 8 ? EnumChatFormatting.GRAY+"III"+EnumChatFormatting.RESET : "IV"; + String tier = tier() == 6 + ? EnumChatFormatting.RED + "I" + EnumChatFormatting.RESET + : tier() == 7 + ? EnumChatFormatting.YELLOW + "II" + EnumChatFormatting.RESET + : tier() == 8 ? EnumChatFormatting.GRAY + "III" + EnumChatFormatting.RESET : "IV"; float plasmaOut = 0; int powerRequired = 0; if (this.mLastRecipe != null) { powerRequired = this.mLastRecipe.mEUt; if (this.mLastRecipe.getFluidOutput(0) != null) { - plasmaOut = (float)this.mLastRecipe.getFluidOutput(0).amount / (float)this.mLastRecipe.mDuration; + plasmaOut = (float) this.mLastRecipe.getFluidOutput(0).amount / (float) this.mLastRecipe.mDuration; } } - return new String[]{ - EnumChatFormatting.BLUE + "Fusion Reactor MK " + EnumChatFormatting.RESET + tier, - StatCollector.translateToLocal("GT5U.fusion.req") + ": " + - EnumChatFormatting.RED + GT_Utility.formatNumbers(powerRequired) + EnumChatFormatting.RESET + "EU/t", - StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mEUStore) + EnumChatFormatting.RESET + " EU / " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(maxEUStore()) + EnumChatFormatting.RESET + " EU", - StatCollector.translateToLocal("GT5U.fusion.plasma") + ": " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(plasmaOut) + EnumChatFormatting.RESET + "L/t"}; + return new String[] { + EnumChatFormatting.BLUE + "Fusion Reactor MK " + EnumChatFormatting.RESET + tier, + StatCollector.translateToLocal("GT5U.fusion.req") + ": " + EnumChatFormatting.RED + + GT_Utility.formatNumbers(powerRequired) + EnumChatFormatting.RESET + "EU/t", + StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(mEUStore) + EnumChatFormatting.RESET + " EU / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(maxEUStore()) + EnumChatFormatting.RESET + " EU", + StatCollector.translateToLocal("GT5U.fusion.plasma") + ": " + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(plasmaOut) + EnumChatFormatting.RESET + "L/t" + }; } @Override @@ -509,6 +558,7 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity @Override public int survivalConstruct(ItemStack stackSize, int elementBudget, IItemSource source, EntityPlayerMP actor) { if (mMachine) return -1; - return survivialBuildPiece(STRUCTURE_PIECE_MAIN, stackSize, 7, 1, 12, elementBudget, source, actor, false, true); + return survivialBuildPiece( + STRUCTURE_PIECE_MAIN, stackSize, 7, 1, 12, elementBudget, source, actor, false, true); } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java index dd942d2635..ef218cb643 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java @@ -1,5 +1,8 @@ package gregtech.common.tileentities.machines.multi; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION1; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION1_GLOW; + import gregtech.api.GregTech_API; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -8,14 +11,15 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import net.minecraft.block.Block; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION1; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION1_GLOW; - public class GT_MetaTileEntity_FusionComputer1 extends GT_MetaTileEntity_FusionComputer { private static final ITexture textureOverlay = TextureFactory.of( TextureFactory.builder().addIcon(OVERLAY_FUSION1).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FUSION1_GLOW).extFacing().glow().build()); + TextureFactory.builder() + .addIcon(OVERLAY_FUSION1_GLOW) + .extFacing() + .glow() + .build()); public GT_MetaTileEntity_FusionComputer1(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, 6); @@ -92,5 +96,4 @@ public class GT_MetaTileEntity_FusionComputer1 extends GT_MetaTileEntity_FusionC public int tierOverclock() { return 1; } - } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java index 8d2b0b6d3b..a763e1f639 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java @@ -1,5 +1,8 @@ package gregtech.common.tileentities.machines.multi; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION2; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION2_GLOW; + import gregtech.api.GregTech_API; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -8,14 +11,15 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import net.minecraft.block.Block; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION2; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION2_GLOW; - public class GT_MetaTileEntity_FusionComputer2 extends GT_MetaTileEntity_FusionComputer { private static final ITexture textureOverlay = TextureFactory.of( TextureFactory.builder().addIcon(OVERLAY_FUSION2).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FUSION2_GLOW).extFacing().glow().build()); + TextureFactory.builder() + .addIcon(OVERLAY_FUSION2_GLOW) + .extFacing() + .glow() + .build()); public GT_MetaTileEntity_FusionComputer2(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, 6); diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java index 67cb06f3c1..c2c0367d61 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java @@ -1,5 +1,8 @@ package gregtech.common.tileentities.machines.multi; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION3; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION3_GLOW; + import gregtech.api.GregTech_API; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -8,14 +11,15 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import net.minecraft.block.Block; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION3; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION3_GLOW; - public class GT_MetaTileEntity_FusionComputer3 extends GT_MetaTileEntity_FusionComputer { private static final ITexture textureOverlay = TextureFactory.of( TextureFactory.builder().addIcon(OVERLAY_FUSION3).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FUSION3_GLOW).extFacing().glow().build()); + TextureFactory.builder() + .addIcon(OVERLAY_FUSION3_GLOW) + .extFacing() + .glow() + .build()); public GT_MetaTileEntity_FusionComputer3(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, 6); @@ -93,4 +97,3 @@ public class GT_MetaTileEntity_FusionComputer3 extends GT_MetaTileEntity_FusionC return 4; } } - diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java index d006f6d961..d1614bccc5 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java @@ -1,5 +1,12 @@ package gregtech.common.tileentities.machines.multi; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.enums.GT_HatchElement.*; +import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; + import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IItemSource; @@ -29,48 +36,57 @@ import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.enums.GT_HatchElement.*; -import static gregtech.api.enums.Textures.BlockIcons.*; -import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; - -public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_HeatExchanger> implements ISurvivalConstructable { +public class GT_MetaTileEntity_HeatExchanger + extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_HeatExchanger> + implements ISurvivalConstructable { private static final int CASING_INDEX = 50; private static final String STRUCTURE_PIECE_MAIN = "main"; - private static final IStructureDefinition<GT_MetaTileEntity_HeatExchanger> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_HeatExchanger>builder() - .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][]{ - {"ccc", "cCc", "ccc"}, - {"ccc", "cPc", "ccc"}, - {"ccc", "cPc", "ccc"}, - {"c~c", "cHc", "ccc"}, - })) - .addElement('P', ofBlock(GregTech_API.sBlockCasings2, 14)) - .addElement('C', OutputHatch.withAdder(GT_MetaTileEntity_HeatExchanger::addColdFluidOutputToMachineList).withCount(t -> isValidMetaTileEntity(t.mOutputColdFluidHatch) ? 1 : 0).newAny(CASING_INDEX, 3)) - .addElement('H', OutputHatch.withAdder(GT_MetaTileEntity_HeatExchanger::addHotFluidInputToMachineList).withCount(t -> isValidMetaTileEntity(t.mInputHotFluidHatch) ? 1 : 0).newAny(CASING_INDEX, 3)) - .addElement('c', buildHatchAdder(GT_MetaTileEntity_HeatExchanger.class) - .atLeast(InputBus, InputHatch, OutputBus, OutputHatch, Maintenance) - .casingIndex(CASING_INDEX) - .dot(1) - .buildAndChain(onElementPass(GT_MetaTileEntity_HeatExchanger::onCasingAdded, ofBlock(GregTech_API.sBlockCasings4, (byte) 2)) - )) - .build(); - public static float penalty_per_config = 0.015f; // penalize 1.5% efficiency per circuitry level (1-25) + private static final IStructureDefinition<GT_MetaTileEntity_HeatExchanger> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_HeatExchanger>builder() + .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] { + {"ccc", "cCc", "ccc"}, + {"ccc", "cPc", "ccc"}, + {"ccc", "cPc", "ccc"}, + {"c~c", "cHc", "ccc"}, + })) + .addElement('P', ofBlock(GregTech_API.sBlockCasings2, 14)) + .addElement( + 'C', + OutputHatch.withAdder(GT_MetaTileEntity_HeatExchanger::addColdFluidOutputToMachineList) + .withCount(t -> isValidMetaTileEntity(t.mOutputColdFluidHatch) ? 1 : 0) + .newAny(CASING_INDEX, 3)) + .addElement( + 'H', + OutputHatch.withAdder(GT_MetaTileEntity_HeatExchanger::addHotFluidInputToMachineList) + .withCount(t -> isValidMetaTileEntity(t.mInputHotFluidHatch) ? 1 : 0) + .newAny(CASING_INDEX, 3)) + .addElement( + 'c', + buildHatchAdder(GT_MetaTileEntity_HeatExchanger.class) + .atLeast(InputBus, InputHatch, OutputBus, OutputHatch, Maintenance) + .casingIndex(CASING_INDEX) + .dot(1) + .buildAndChain(onElementPass( + GT_MetaTileEntity_HeatExchanger::onCasingAdded, + ofBlock(GregTech_API.sBlockCasings4, (byte) 2)))) + .build(); + public static float penalty_per_config = 0.015f; // penalize 1.5% efficiency per circuitry level (1-25) private GT_MetaTileEntity_Hatch_Input mInputHotFluidHatch; private GT_MetaTileEntity_Hatch_Output mOutputColdFluidHatch; private boolean superheated = false; - private int superheated_threshold=0; + private int superheated_threshold = 0; /** * How much more steam we can make without draining real water. Unit is (1L/GT_Values.STEAM_PER_WATER) */ private int steamBudget; + private int mCasingAmount; public GT_MetaTileEntity_HeatExchanger(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } + public GT_MetaTileEntity_HeatExchanger(String aName) { super(aName); } @@ -114,24 +130,47 @@ public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_EnhancedM } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { if (aSide == aFacing) { if (aActive) - return new ITexture[]{ - casingTexturePages[0][CASING_INDEX], - TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW).extFacing().glow().build()}; - return new ITexture[]{ + return new ITexture[] { casingTexturePages[0][CASING_INDEX], - TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_GLOW).extFacing().glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW) + .extFacing() + .glow() + .build() + }; + return new ITexture[] { + casingTexturePages[0][CASING_INDEX], + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_HEAT_EXCHANGER) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_GLOW) + .extFacing() + .glow() + .build() + }; } - return new ITexture[]{casingTexturePages[0][CASING_INDEX]}; + return new ITexture[] {casingTexturePages[0][CASING_INDEX]}; } @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeHeatExchanger.png"); + return new GT_GUIContainer_MultiMachine( + aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeHeatExchanger.png"); } @Override @@ -146,16 +185,15 @@ public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_EnhancedM @Override public boolean checkRecipe(ItemStack aStack) { - if (mInputHotFluidHatch.getFluid() == null) - return true; + if (mInputHotFluidHatch.getFluid() == null) return true; int fluidAmountToConsume = mInputHotFluidHatch.getFluidAmount(); // how much fluid is in hatch - superheated_threshold = 4000; // default: must have 4000L per second to generate superheated steam - float efficiency = 1f; // default: operate at 100% efficiency with no integrated circuitry + superheated_threshold = 4000; // default: must have 4000L per second to generate superheated steam + float efficiency = 1f; // default: operate at 100% efficiency with no integrated circuitry int shs_reduction_per_config = 150; // reduce threshold 150L/s per circuitry level (1-25) float steam_output_multiplier = 20f; // default: multiply output by 4 * 10 (boosted x5) - float penalty = 0.0f; // penalty to apply to output based on circuitry level (1-25). + float penalty = 0.0f; // penalty to apply to output based on circuitry level (1-25). boolean do_lava = false; // Do we have an integrated circuit with a valid configuration? @@ -176,15 +214,18 @@ public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_EnhancedM do_lava = true; } else if (mInputHotFluidHatch.getFluid().isFluidEqual(FluidRegistry.getFluidStack("ic2hotcoolant", 1))) { steam_output_multiplier /= 2f; // was boosted x2 on top of x5 -> total x10 -> nerf with this code back to 5x - superheated_threshold /=5f; // 10x smaller since the Hot Things production in reactor is the same. + superheated_threshold /= 5f; // 10x smaller since the Hot Things production in reactor is the same. } else { // If we're working with neither, fail out - superheated_threshold=0; + superheated_threshold = 0; return false; } - superheated = fluidAmountToConsume >= superheated_threshold; // set the internal superheated flag if we have enough hot fluid. Used in the onRunningTick method. - fluidAmountToConsume = Math.min(fluidAmountToConsume, superheated_threshold * 2); // Don't consume too much hot fluid per second + superheated = fluidAmountToConsume + >= superheated_threshold; // set the internal superheated flag if we have enough hot fluid. Used in the + // onRunningTick method. + fluidAmountToConsume = Math.min( + fluidAmountToConsume, superheated_threshold * 2); // Don't consume too much hot fluid per second mInputHotFluidHatch.drain(fluidAmountToConsume, true); this.mMaxProgresstime = 20; this.mEUt = (int) (fluidAmountToConsume * steam_output_multiplier * efficiency); @@ -208,24 +249,27 @@ public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_EnhancedM @Override public boolean onRunningTick(ItemStack aStack) { if (this.mEUt > 0) { - int tGeneratedEU = (int) (this.mEUt * 2L * this.mEfficiency / 10000L); // APPROXIMATELY how much steam to generate. + int tGeneratedEU = + (int) (this.mEUt * 2L * this.mEfficiency / 10000L); // APPROXIMATELY how much steam to generate. if (tGeneratedEU > 0) { if (superheated) tGeneratedEU /= 2; // We produce half as much superheated steam if necessary int distilledConsumed = useWater(tGeneratedEU); // how much distilled water to consume - //tGeneratedEU = distilledConsumed * 160; // EXACTLY how much steam to generate, producing a perfect 1:160 ratio with distilled water consumption + // tGeneratedEU = distilledConsumed * 160; // EXACTLY how much steam to generate, producing a perfect + // 1:160 ratio with distilled water consumption FluidStack distilledStack = GT_ModHandler.getDistilledWater(distilledConsumed); if (depleteInput(distilledStack)) // Consume the distilled water { if (superheated) { - addOutput(FluidRegistry.getFluidStack("ic2superheatedsteam", tGeneratedEU)); // Generate superheated steam + addOutput(FluidRegistry.getFluidStack( + "ic2superheatedsteam", tGeneratedEU)); // Generate superheated steam } else { addOutput(GT_ModHandler.getSteam(tGeneratedEU)); // Generate regular steam } } else { - GT_Log.exp.println(this.mName+" had no more Distilled water!"); + GT_Log.exp.println(this.mName + " had no more Distilled water!"); explodeMultiblock(); // Generate crater } } @@ -285,6 +329,7 @@ public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_EnhancedM public int getDamageToComponent(ItemStack aStack) { return 0; } + @Override public boolean explodesOnComponentBreak(ItemStack aStack) { return false; @@ -302,20 +347,26 @@ public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_EnhancedM @Override public String[] getInfoData() { - return new String[]{ - StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mProgresstime / 20) + EnumChatFormatting.RESET + " s / " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(mMaxProgresstime / 20) + EnumChatFormatting.RESET + " s", - StatCollector.translateToLocal("GT5U.multiblock.usage") + " " + StatCollector.translateToLocal("GT5U.LHE.steam") + ": " + - (superheated ? EnumChatFormatting.RED : EnumChatFormatting.YELLOW) + GT_Utility.formatNumbers(superheated ? -2 * mEUt : -mEUt) + EnumChatFormatting.RESET + " EU/t", - StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " + - EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + " " + - StatCollector.translateToLocal("GT5U.multiblock.efficiency") + ": " + - EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", - StatCollector.translateToLocal("GT5U.LHE.superheated") + ": " + - (superheated ? EnumChatFormatting.RED : EnumChatFormatting.BLUE) + superheated + EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.LHE.superheated") + " " + StatCollector.translateToLocal("GT5U.LHE.threshold") + ": " + - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(superheated_threshold) + EnumChatFormatting.RESET + return new String[] { + StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(mProgresstime / 20) + EnumChatFormatting.RESET + " s / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(mMaxProgresstime / 20) + EnumChatFormatting.RESET + " s", + StatCollector.translateToLocal("GT5U.multiblock.usage") + " " + + StatCollector.translateToLocal("GT5U.LHE.steam") + ": " + + (superheated ? EnumChatFormatting.RED : EnumChatFormatting.YELLOW) + + GT_Utility.formatNumbers(superheated ? -2 * mEUt : -mEUt) + EnumChatFormatting.RESET + " EU/t", + StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " + EnumChatFormatting.RED + + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + " " + + StatCollector.translateToLocal("GT5U.multiblock.efficiency") + + ": " + EnumChatFormatting.YELLOW + + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", + StatCollector.translateToLocal("GT5U.LHE.superheated") + ": " + + (superheated ? EnumChatFormatting.RED : EnumChatFormatting.BLUE) + superheated + + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.LHE.superheated") + " " + + StatCollector.translateToLocal("GT5U.LHE.threshold") + ": " + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(superheated_threshold) + EnumChatFormatting.RESET }; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java index e0e3124d4c..6f55e3c9a3 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java @@ -1,5 +1,9 @@ package gregtech.common.tileentities.machines.multi; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; +import static gregtech.api.enums.Textures.BlockIcons.*; + import com.gtnewhorizon.structurelib.structure.IStructureElement; import gregtech.GT_Mod; import gregtech.api.GregTech_API; @@ -15,16 +19,12 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; +import java.util.ArrayList; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; -import java.util.ArrayList; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; -import static gregtech.api.enums.Textures.BlockIcons.*; - -public class GT_MetaTileEntity_ImplosionCompressor extends GT_MetaTileEntity_CubicMultiBlockBase<GT_MetaTileEntity_ImplosionCompressor> { +public class GT_MetaTileEntity_ImplosionCompressor + extends GT_MetaTileEntity_CubicMultiBlockBase<GT_MetaTileEntity_ImplosionCompressor> { public GT_MetaTileEntity_ImplosionCompressor(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } @@ -42,46 +42,71 @@ public class GT_MetaTileEntity_ImplosionCompressor extends GT_MetaTileEntity_Cub protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); tt.addMachineType("Implosion Compressor") - .addInfo("Explosions are fun") - .addInfo("Controller block for the Implosion Compressor") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 3, 3, true) - .addController("Front center") - .addCasingInfo("Solid Steel Machine Casing", 16) - .addStructureInfo("Casings can be replaced with Explosion Warning Signs") - .addEnergyHatch("Any casing", 1) - .addMaintenanceHatch("Any casing", 1) - .addMufflerHatch("Any casing", 1) - .addInputBus("Any casing", 1) - .addOutputBus("Any casing", 1) - .toolTipFinisher("Gregtech"); + .addInfo("Explosions are fun") + .addInfo("Controller block for the Implosion Compressor") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(3, 3, 3, true) + .addController("Front center") + .addCasingInfo("Solid Steel Machine Casing", 16) + .addStructureInfo("Casings can be replaced with Explosion Warning Signs") + .addEnergyHatch("Any casing", 1) + .addMaintenanceHatch("Any casing", 1) + .addMufflerHatch("Any casing", 1) + .addInputBus("Any casing", 1) + .addOutputBus("Any casing", 1) + .toolTipFinisher("Gregtech"); return tt; } @Override public boolean addToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - return super.addToMachineList(aTileEntity, aBaseCasingIndex) || addMufflerToMachineList(aTileEntity, aBaseCasingIndex); + return super.addToMachineList(aTileEntity, aBaseCasingIndex) + || addMufflerToMachineList(aTileEntity, aBaseCasingIndex); } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { if (aSide == aFacing) { - if (aActive) return new ITexture[]{ - BlockIcons.casingTexturePages[0][16], - TextureFactory.builder().addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE_GLOW).extFacing().glow().build()}; - return new ITexture[]{ + if (aActive) + return new ITexture[] { + BlockIcons.casingTexturePages[0][16], + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE_GLOW) + .extFacing() + .glow() + .build() + }; + return new ITexture[] { BlockIcons.casingTexturePages[0][16], - TextureFactory.builder().addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_GLOW).extFacing().glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_GLOW) + .extFacing() + .glow() + .build() + }; } - return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][16]}; + return new ITexture[] {Textures.BlockIcons.casingTexturePages[0][16]}; } @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "ImplosionCompressor.png"); + return new GT_GUIContainer_MultiMachine( + aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "ImplosionCompressor.png"); } @Override @@ -114,19 +139,19 @@ public class GT_MetaTileEntity_ImplosionCompressor extends GT_MetaTileEntity_Cub } ItemStack[] tInputs = tInputList.toArray(new ItemStack[0]); if (!tInputList.isEmpty()) { - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sImplosionRecipes.findRecipe(getBaseMetaTileEntity(), false, 9223372036854775807L, null, tInputs); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sImplosionRecipes.findRecipe( + getBaseMetaTileEntity(), false, 9223372036854775807L, null, tInputs); if ((tRecipe != null) && (tRecipe.isRecipeInputEqual(true, null, tInputs))) { this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; - //OC THAT EXPLOSIVE SHIT!!! + // OC THAT EXPLOSIVE SHIT!!! calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, getMaxInputVoltage()); - //In case recipe is too OP for that machine - if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) - return false; + // In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return false; if (this.mEUt > 0) { this.mEUt = (-this.mEUt); } - this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0), tRecipe.getOutput(1)}; + this.mOutputItems = new ItemStack[] {tRecipe.getOutput(0), tRecipe.getOutput(1)}; sendLoopStart((byte) 20); updateSlots(); return true; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java index c66ed732d9..8afdfa65b7 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java @@ -1,5 +1,11 @@ package gregtech.common.tileentities.machines.multi; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static gregtech.api.enums.GT_HatchElement.*; +import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; +import static gregtech.api.util.GT_StructureUtility.ofFrame; + import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IItemSource; @@ -19,6 +25,8 @@ import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; +import java.util.*; +import java.util.stream.Collectors; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; @@ -28,17 +36,9 @@ import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; -import java.util.*; -import java.util.stream.Collectors; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static gregtech.api.enums.GT_HatchElement.*; -import static gregtech.api.enums.Textures.BlockIcons.*; -import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; -import static gregtech.api.util.GT_StructureUtility.ofFrame; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; - -public class GT_MetaTileEntity_IntegratedOreFactory extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_IntegratedOreFactory> implements ISurvivalConstructable { +public class GT_MetaTileEntity_IntegratedOreFactory + extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_IntegratedOreFactory> + implements ISurvivalConstructable { private static final int CASING_INDEX1 = 183; private static final int CASING_INDEX2 = 49; @@ -50,50 +50,57 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends GT_MetaTileEntity_En private static final String SIFTER = "Sifter"; private static final String CHEM_WASH = "Chemical Bathing"; private static final String STRUCTURE_PIECE_MAIN = "main"; - private static final IStructureDefinition<GT_MetaTileEntity_IntegratedOreFactory> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_IntegratedOreFactory>builder() - .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][]{ - {" ", " ", " WWW ", " WWW ", " ", " "}, - {" ", " sss ", " sppps", " sppps", " sss ", " "}, - {" ", " sss ", " s s", " s s", " sss ", " "}, - {" ", " sss ", " sppps", " sppps", " sss ", " "}, - {" ", " sss ", " s s", " s s", " sss ", " "}, - {" ", " sss ", " sppps", " sppps", " sss ", " "}, - {"iiiiii ", "iIIIIiisssi", "iIIIIis s", "iIIIIis s", "iIIIIiisssi", "iiiiii "}, - {"iggggi ", "gt t isssi", "g xx sppps", "g xx sppps", "gt t isssi", "iggggi "}, - {"iggggi ", "gt t isssi", "g xx s s", "g xx s s", "gt t isssi", "iggggi "}, - {"iggggi ", "gt t is~si", "g xx spppO", "g xx spppO", "gt t isssi", "iggggi "}, - {"iggggi ", "gt t isssi", "g xx s O", "g xx s O", "gt t isssi", "iggggi "}, - {"EEEEEE ", "EEEEEEEEEEE", "EEEEEEEEEEE", "EEEEEEEEEEE", "EEEEEEEEEEE", "EEEEEE "} - })) - .addElement('i', ofBlock(GregTech_API.sBlockCasings8, 7)) - .addElement('s', ofBlock(GregTech_API.sBlockCasings4, 1)) - .addElement('g', ofBlockAnyMeta(GameRegistry.findBlock("IC2", "blockAlloyGlass"))) - .addElement('x', ofBlock(GregTech_API.sBlockCasings2, 3)) - .addElement('p', ofBlock(GregTech_API.sBlockCasings2, 15)) - .addElement('t', ofFrame(Materials.TungstenSteel)) - .addElement('E', buildHatchAdder(GT_MetaTileEntity_IntegratedOreFactory.class) - .atLeast(Energy, Maintenance) - .casingIndex(CASING_INDEX1) - .dot(1) - .buildAndChain(GregTech_API.sBlockCasings8, 7) - ) - .addElement('I', buildHatchAdder(GT_MetaTileEntity_IntegratedOreFactory.class) - .atLeast(InputBus) - .casingIndex(CASING_INDEX1) - .dot(2) - .buildAndChain(GregTech_API.sBlockCasings8, 7) - ) - .addElement('W', buildHatchAdder(GT_MetaTileEntity_IntegratedOreFactory.class) - .atLeast(InputHatch, Muffler) - .casingIndex(CASING_INDEX1) - .dot(3) - .buildAndChain(GregTech_API.sBlockCasings4, 1)) - .addElement('O', buildHatchAdder(GT_MetaTileEntity_IntegratedOreFactory.class) - .atLeast(OutputBus, OutputHatch) - .casingIndex(CASING_INDEX2) - .dot(4) - .buildAndChain(GregTech_API.sBlockCasings4, 1)) - .build(); + private static final IStructureDefinition<GT_MetaTileEntity_IntegratedOreFactory> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_IntegratedOreFactory>builder() + .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] { + {" ", " ", " WWW ", " WWW ", " ", " "}, + {" ", " sss ", " sppps", " sppps", " sss ", " "}, + {" ", " sss ", " s s", " s s", " sss ", " "}, + {" ", " sss ", " sppps", " sppps", " sss ", " "}, + {" ", " sss ", " s s", " s s", " sss ", " "}, + {" ", " sss ", " sppps", " sppps", " sss ", " "}, + {"iiiiii ", "iIIIIiisssi", "iIIIIis s", "iIIIIis s", "iIIIIiisssi", "iiiiii "}, + {"iggggi ", "gt t isssi", "g xx sppps", "g xx sppps", "gt t isssi", "iggggi "}, + {"iggggi ", "gt t isssi", "g xx s s", "g xx s s", "gt t isssi", "iggggi "}, + {"iggggi ", "gt t is~si", "g xx spppO", "g xx spppO", "gt t isssi", "iggggi "}, + {"iggggi ", "gt t isssi", "g xx s O", "g xx s O", "gt t isssi", "iggggi "}, + {"EEEEEE ", "EEEEEEEEEEE", "EEEEEEEEEEE", "EEEEEEEEEEE", "EEEEEEEEEEE", "EEEEEE "} + })) + .addElement('i', ofBlock(GregTech_API.sBlockCasings8, 7)) + .addElement('s', ofBlock(GregTech_API.sBlockCasings4, 1)) + .addElement('g', ofBlockAnyMeta(GameRegistry.findBlock("IC2", "blockAlloyGlass"))) + .addElement('x', ofBlock(GregTech_API.sBlockCasings2, 3)) + .addElement('p', ofBlock(GregTech_API.sBlockCasings2, 15)) + .addElement('t', ofFrame(Materials.TungstenSteel)) + .addElement( + 'E', + buildHatchAdder(GT_MetaTileEntity_IntegratedOreFactory.class) + .atLeast(Energy, Maintenance) + .casingIndex(CASING_INDEX1) + .dot(1) + .buildAndChain(GregTech_API.sBlockCasings8, 7)) + .addElement( + 'I', + buildHatchAdder(GT_MetaTileEntity_IntegratedOreFactory.class) + .atLeast(InputBus) + .casingIndex(CASING_INDEX1) + .dot(2) + .buildAndChain(GregTech_API.sBlockCasings8, 7)) + .addElement( + 'W', + buildHatchAdder(GT_MetaTileEntity_IntegratedOreFactory.class) + .atLeast(InputHatch, Muffler) + .casingIndex(CASING_INDEX1) + .dot(3) + .buildAndChain(GregTech_API.sBlockCasings4, 1)) + .addElement( + 'O', + buildHatchAdder(GT_MetaTileEntity_IntegratedOreFactory.class) + .atLeast(OutputBus, OutputHatch) + .casingIndex(CASING_INDEX2) + .dot(4) + .buildAndChain(GregTech_API.sBlockCasings4, 1)) + .build(); private static final HashSet<Integer> isCrushedOre = new HashSet<>(); private static final HashSet<Integer> isCrushedPureOre = new HashSet<>(); @@ -169,24 +176,24 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends GT_MetaTileEntity_En protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); tt.addMachineType("Ore Processor") - .addInfo("Controller Block for the Integrated Ore Factory") - .addInfo("It is OP. I mean ore processor.") - .addInfo("Do all ore procession in one step.") - .addInfo("Can process up to 1024 ores per time.") - .addInfo("Every ore costs 30EU/t, 2L lubricant, 200L distilled water.") - .addInfo("Process time is depend on mode.") - .addInfo("Use a screwdriver to switch mode.") - .addInfo("Sneak click with screwdriver to void the stone dusts.") - .addSeparator() - .beginStructureBlock(6, 12, 11, false) - .addController("The third layer") - .addEnergyHatch("Button Casing", 1) - .addMaintenanceHatch("Button Casing", 1) - .addInputBus("Input ore/crushed ore", 2) - .addInputHatch("Input lubricant/distilled water/washing chemicals", 3) - .addMufflerHatch("Output Pollution", 3) - .addOutputBus("Output products", 4) - .toolTipFinisher("Gregtech"); + .addInfo("Controller Block for the Integrated Ore Factory") + .addInfo("It is OP. I mean ore processor.") + .addInfo("Do all ore procession in one step.") + .addInfo("Can process up to 1024 ores per time.") + .addInfo("Every ore costs 30EU/t, 2L lubricant, 200L distilled water.") + .addInfo("Process time is depend on mode.") + .addInfo("Use a screwdriver to switch mode.") + .addInfo("Sneak click with screwdriver to void the stone dusts.") + .addSeparator() + .beginStructureBlock(6, 12, 11, false) + .addController("The third layer") + .addEnergyHatch("Button Casing", 1) + .addMaintenanceHatch("Button Casing", 1) + .addInputBus("Input ore/crushed ore", 2) + .addInputHatch("Input lubricant/distilled water/washing chemicals", 3) + .addMufflerHatch("Output Pollution", 3) + .addOutputBus("Output products", 4) + .toolTipFinisher("Gregtech"); return tt; } @@ -224,7 +231,7 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends GT_MetaTileEntity_En case 4: return 17 * 20; } - //go to hell + // go to hell return 1000000000; } @@ -260,8 +267,12 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends GT_MetaTileEntity_En if (tCharged <= 0) break; int tID = GT_Utility.stackToInt(ore); if (tID == 0) continue; - if (isPureDust.contains(tID) || isImpureDust.contains(tID) || isCrushedPureOre.contains(tID) || - isThermal.contains(tID) || isCrushedOre.contains(tID) || isOre.contains(tID)) { + if (isPureDust.contains(tID) + || isImpureDust.contains(tID) + || isCrushedPureOre.contains(tID) + || isThermal.contains(tID) + || isCrushedOre.contains(tID) + || isOre.contains(tID)) { if (ore.stackSize <= tCharged) { tRealUsed += ore.stackSize; tOres.add(GT_Utility.copy(ore)); @@ -345,20 +356,33 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends GT_MetaTileEntity_En public final void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aPlayer.isSneaking()) { sVoidStone = !sVoidStone; - GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.void", sVoidStone)); + GT_Utility.sendChatToPlayer( + aPlayer, StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.void", sVoidStone)); return; } sMode = (sMode + 1) % 5; String des; switch (sMode) { - case 0: des = EnumChatFormatting.AQUA + CRUSH + "->" + WASH + "->" + THERMAL + "->" + CRUSH; break; - case 1: des = EnumChatFormatting.AQUA + CRUSH + "->" + WASH + "->" + CRUSH + "->" + CENTRIFUGE; break; - case 2: des = EnumChatFormatting.AQUA + CRUSH + "->" + CRUSH + "->" + CENTRIFUGE; break; - case 3: des = EnumChatFormatting.AQUA + CRUSH + "->" + WASH + "->" + SIFTER; break; - case 4: des = EnumChatFormatting.AQUA + CRUSH + "->" + CHEM_WASH + "->" + CRUSH + "->" + CENTRIFUGE; break; - default: des = ""; + case 0: + des = EnumChatFormatting.AQUA + CRUSH + "->" + WASH + "->" + THERMAL + "->" + CRUSH; + break; + case 1: + des = EnumChatFormatting.AQUA + CRUSH + "->" + WASH + "->" + CRUSH + "->" + CENTRIFUGE; + break; + case 2: + des = EnumChatFormatting.AQUA + CRUSH + "->" + CRUSH + "->" + CENTRIFUGE; + break; + case 3: + des = EnumChatFormatting.AQUA + CRUSH + "->" + WASH + "->" + SIFTER; + break; + case 4: + des = EnumChatFormatting.AQUA + CRUSH + "->" + CHEM_WASH + "->" + CRUSH + "->" + CENTRIFUGE; + break; + default: + des = ""; } - GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor", des, getTime() / 20)); + GT_Utility.sendChatToPlayer( + aPlayer, StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor", des, getTime() / 20)); } @Override @@ -382,7 +406,8 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends GT_MetaTileEntity_En for (ItemStack aStack : sMidProduct) { int tID = GT_Utility.stackToInt(aStack); if (checkTypes(tID, aTables)) { - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes.findRecipe(getBaseMetaTileEntity(), false, GT_Values.V[15], null, aStack); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes.findRecipe( + getBaseMetaTileEntity(), false, GT_Values.V[15], null, aStack); if (tRecipe != null) { tProduct.addAll(getOutputStack(tRecipe, aStack.stackSize)); } else { @@ -403,7 +428,12 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends GT_MetaTileEntity_En for (ItemStack aStack : sMidProduct) { int tID = GT_Utility.stackToInt(aStack); if (checkTypes(tID, aTables)) { - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sOreWasherRecipes.findRecipe(getBaseMetaTileEntity(), false, GT_Values.V[15], new FluidStack[]{GT_ModHandler.getDistilledWater(Integer.MAX_VALUE)}, aStack); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sOreWasherRecipes.findRecipe( + getBaseMetaTileEntity(), + false, + GT_Values.V[15], + new FluidStack[] {GT_ModHandler.getDistilledWater(Integer.MAX_VALUE)}, + aStack); if (tRecipe != null) { tProduct.addAll(getOutputStack(tRecipe, aStack.stackSize)); } else { @@ -424,7 +454,8 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends GT_MetaTileEntity_En for (ItemStack aStack : sMidProduct) { int tID = GT_Utility.stackToInt(aStack); if (checkTypes(tID, aTables)) { - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes.findRecipe(getBaseMetaTileEntity(), false, GT_Values.V[15], null, aStack); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes.findRecipe( + getBaseMetaTileEntity(), false, GT_Values.V[15], null, aStack); if (tRecipe != null) { tProduct.addAll(getOutputStack(tRecipe, aStack.stackSize)); } else { @@ -445,7 +476,8 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends GT_MetaTileEntity_En for (ItemStack aStack : sMidProduct) { int tID = GT_Utility.stackToInt(aStack); if (checkTypes(tID, aTables)) { - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.findRecipe(getBaseMetaTileEntity(), false, GT_Values.V[15], null, aStack); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.findRecipe( + getBaseMetaTileEntity(), false, GT_Values.V[15], null, aStack); if (tRecipe != null) { tProduct.addAll(getOutputStack(tRecipe, aStack.stackSize)); } else { @@ -466,7 +498,8 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends GT_MetaTileEntity_En for (ItemStack aStack : sMidProduct) { int tID = GT_Utility.stackToInt(aStack); if (checkTypes(tID, aTables)) { - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sSifterRecipes.findRecipe(getBaseMetaTileEntity(), false, GT_Values.V[15], null, aStack); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sSifterRecipes.findRecipe( + getBaseMetaTileEntity(), false, GT_Values.V[15], null, aStack); if (tRecipe != null) { tProduct.addAll(getOutputStack(tRecipe, aStack.stackSize)); } else { @@ -487,9 +520,15 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends GT_MetaTileEntity_En for (ItemStack aStack : sMidProduct) { int tID = GT_Utility.stackToInt(aStack); if (checkTypes(tID, aTables)) { - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes.findRecipe(getBaseMetaTileEntity(), false, GT_Values.V[15], getStoredFluids().toArray(new FluidStack[0]), aStack); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes.findRecipe( + getBaseMetaTileEntity(), + false, + GT_Values.V[15], + getStoredFluids().toArray(new FluidStack[0]), + aStack); if (tRecipe != null && tRecipe.getRepresentativeFluidInput(0) != null) { - FluidStack tInputFluid = tRecipe.getRepresentativeFluidInput(0).copy(); + FluidStack tInputFluid = + tRecipe.getRepresentativeFluidInput(0).copy(); int tStored = getFluidAmount(tInputFluid); int tWashed = Math.min(tStored / tInputFluid.amount, aStack.stackSize); depleteInput(new FluidStack(tInputFluid.getFluid(), tWashed * tInputFluid.amount)); @@ -521,7 +560,7 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends GT_MetaTileEntity_En private List<ItemStack> getOutputStack(GT_Recipe aRecipe, int aTime) { List<ItemStack> tOutput = new ArrayList<>(); - for (int i = 0; i < aRecipe.mOutputs.length; i ++) { + for (int i = 0; i < aRecipe.mOutputs.length; i++) { if (aRecipe.getOutput(i) == null) { continue; } @@ -529,12 +568,13 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends GT_MetaTileEntity_En if (tChance == 10000) { tOutput.add(GT_Utility.copyAmountUnsafe(aTime * aRecipe.getOutput(i).stackSize, aRecipe.getOutput(i))); } else { - //Use Normal Distribution + // Use Normal Distribution double u = aTime * (tChance / 10000D); double e = aTime * (tChance / 10000D) * (1 - (tChance / 10000D)); Random random = new Random(); int tAmount = (int) Math.ceil(Math.sqrt(e) * random.nextGaussian() + u); - tOutput.add(GT_Utility.copyAmountUnsafe(tAmount * aRecipe.getOutput(i).stackSize, aRecipe.getOutput(i))); + tOutput.add( + GT_Utility.copyAmountUnsafe(tAmount * aRecipe.getOutput(i).stackSize, aRecipe.getOutput(i))); } } return tOutput.stream().filter(i -> (i != null && i.stackSize > 0)).collect(Collectors.toList()); @@ -562,13 +602,15 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends GT_MetaTileEntity_En for (Integer id : rProduct.keySet()) { ItemStack stack = GT_Utility.intToStack(id); sMidProduct[cnt] = GT_Utility.copyAmountUnsafe(rProduct.get(id), stack); - cnt ++; + cnt++; } } @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - return checkPiece(STRUCTURE_PIECE_MAIN, 8, 9, 1) && mMaintenanceHatches.size() <= 1 && !mMufflerHatches.isEmpty(); + return checkPiece(STRUCTURE_PIECE_MAIN, 8, 9, 1) + && mMaintenanceHatches.size() <= 1 + && !mMufflerHatches.isEmpty(); } @Override @@ -597,18 +639,40 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends GT_MetaTileEntity_En } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { if (aSide == aFacing) { if (aActive) - return new ITexture[]{ + return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX2), - TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE_GLOW).extFacing().glow().build()}; - return new ITexture[]{ + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE_GLOW) + .extFacing() + .glow() + .build() + }; + return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX2), - TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_GLOW).extFacing().glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_PROCESSING_ARRAY) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_GLOW) + .extFacing() + .glow() + .build() + }; } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_INDEX2)}; + return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(CASING_INDEX2)}; } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java index b45875d9e7..323b6bd2a9 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java @@ -1,5 +1,18 @@ package gregtech.common.tileentities.machines.multi; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.lazy; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.enums.GT_HatchElement.*; +import static gregtech.api.enums.GT_Values.STEAM_PER_WATER; +import static gregtech.api.enums.ItemList.Circuit_Integrated; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER_GLOW; +import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; + import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IItemSource; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; @@ -20,6 +33,7 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; +import java.util.ArrayList; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.InventoryPlayer; @@ -28,63 +42,49 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -import java.util.ArrayList; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.lazy; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.enums.GT_HatchElement.*; -import static gregtech.api.enums.GT_Values.STEAM_PER_WATER; -import static gregtech.api.enums.ItemList.Circuit_Integrated; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER_ACTIVE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER_ACTIVE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER_GLOW; -import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public abstract class GT_MetaTileEntity_LargeBoiler extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_LargeBoiler> implements ISurvivalConstructable { +public abstract class GT_MetaTileEntity_LargeBoiler + extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_LargeBoiler> + implements ISurvivalConstructable { private static final String STRUCTURE_PIECE_MAIN = "main"; - private static final ClassValue<IStructureDefinition<GT_MetaTileEntity_LargeBoiler>> STRUCTURE_DEFINITION =new ClassValue<IStructureDefinition<GT_MetaTileEntity_LargeBoiler>>() { - @Override - protected IStructureDefinition<GT_MetaTileEntity_LargeBoiler> computeValue(Class<?> type) { - return StructureDefinition.<GT_MetaTileEntity_LargeBoiler>builder() - .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][]{ - {"ccc", "ccc", "ccc"}, - {"ccc", "cPc", "ccc"}, - {"ccc", "cPc", "ccc"}, - {"ccc", "cPc", "ccc"}, - {"f~f", "fff", "fff"}, - })) - .addElement('P', lazy(t -> ofBlock(t.getPipeBlock(), t.getPipeMeta()))) - .addElement('c', lazy(t -> - buildHatchAdder(GT_MetaTileEntity_LargeBoiler.class) - .atLeast(OutputHatch) - .casingIndex(t.getCasingTextureIndex()) - .dot(2) - .buildAndChain(onElementPass(GT_MetaTileEntity_LargeBoiler::onCasingAdded, ofBlock(t.getCasingBlock(), t.getCasingMeta()))) - )) - .addElement('f', lazy(t -> - buildHatchAdder(GT_MetaTileEntity_LargeBoiler.class) - .atLeast(Maintenance, InputHatch, InputBus, Muffler) - .casingIndex(t.getFireboxTextureIndex()) - .dot(1) - .buildAndChain(onElementPass(GT_MetaTileEntity_LargeBoiler::onFireboxAdded, ofBlock(t.getFireboxBlock(), t.getFireboxMeta()))) - )) - .build(); - } - }; + private static final ClassValue<IStructureDefinition<GT_MetaTileEntity_LargeBoiler>> STRUCTURE_DEFINITION = + new ClassValue<IStructureDefinition<GT_MetaTileEntity_LargeBoiler>>() { + @Override + protected IStructureDefinition<GT_MetaTileEntity_LargeBoiler> computeValue(Class<?> type) { + return StructureDefinition.<GT_MetaTileEntity_LargeBoiler>builder() + .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] { + {"ccc", "ccc", "ccc"}, + {"ccc", "cPc", "ccc"}, + {"ccc", "cPc", "ccc"}, + {"ccc", "cPc", "ccc"}, + {"f~f", "fff", "fff"}, + })) + .addElement('P', lazy(t -> ofBlock(t.getPipeBlock(), t.getPipeMeta()))) + .addElement('c', lazy(t -> buildHatchAdder(GT_MetaTileEntity_LargeBoiler.class) + .atLeast(OutputHatch) + .casingIndex(t.getCasingTextureIndex()) + .dot(2) + .buildAndChain(onElementPass( + GT_MetaTileEntity_LargeBoiler::onCasingAdded, + ofBlock(t.getCasingBlock(), t.getCasingMeta()))))) + .addElement('f', lazy(t -> buildHatchAdder(GT_MetaTileEntity_LargeBoiler.class) + .atLeast(Maintenance, InputHatch, InputBus, Muffler) + .casingIndex(t.getFireboxTextureIndex()) + .dot(1) + .buildAndChain(onElementPass( + GT_MetaTileEntity_LargeBoiler::onFireboxAdded, + ofBlock(t.getFireboxBlock(), t.getFireboxMeta()))))) + .build(); + } + }; private boolean firstRun = true; private int mSuperEfficencyIncrease = 0; - private int integratedCircuitConfig = 0; //Steam output is reduced by 1000L per config - private int excessWater = 0; //Eliminate rounding errors for water - private int excessFuel = 0; //Eliminate rounding errors for fuels that burn half items - private int excessProjectedEU = 0; //Eliminate rounding errors from throttling the boiler + private int integratedCircuitConfig = 0; // Steam output is reduced by 1000L per config + private int excessWater = 0; // Eliminate rounding errors for water + private int excessFuel = 0; // Eliminate rounding errors for fuels that burn half items + private int excessProjectedEU = 0; // Eliminate rounding errors from throttling the boiler private int mCasingAmount; private int mFireboxAmount; - protected int pollutionPerSecond = 1; //placeholder for the child classes + protected int pollutionPerSecond = 1; // placeholder for the child classes public GT_MetaTileEntity_LargeBoiler(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -98,26 +98,30 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends GT_MetaTileEntity_En protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Boiler") - .addInfo("Controller block for the Large " + getCasingMaterial() + " Boiler"); - // Tooltip differs between the boilers that output Superheated Steam (Titanium and Tungstensteel) and the ones that do not (Bronze and Steel) - if (isSuperheated()) { - tt.addInfo("Produces " + (getEUt() * 40) * ((runtimeBoost(20) / (20f)) / superToNormalSteam) + "L of Superheated Steam with 1 Coal at " + (getEUt() * 40) / superToNormalSteam + "L/s")//? + tt.addMachineType("Boiler").addInfo("Controller block for the Large " + getCasingMaterial() + " Boiler"); + // Tooltip differs between the boilers that output Superheated Steam (Titanium and Tungstensteel) and the ones + // that do not (Bronze and Steel) + if (isSuperheated()) { + tt.addInfo("Produces " + (getEUt() * 40) * ((runtimeBoost(20) / (20f)) / superToNormalSteam) + + "L of Superheated Steam with 1 Coal at " + (getEUt() * 40) / superToNormalSteam + + "L/s") // ? .addInfo("A programmed circuit in the main block throttles the boiler (-1000L/s per config)") .addInfo("Only some solid fuels are allowed (check the NEI Large Boiler tab for details)") .addInfo("If there are any disallowed fuels in the input bus, the boiler won't run!"); - } - else { - tt.addInfo("Produces " + (getEUt() * 40) * (runtimeBoost(20) / 20f) + "L of Steam with 1 Coal at " + getEUt() * 40 + "L/s")//? + } else { + tt.addInfo("Produces " + (getEUt() * 40) * (runtimeBoost(20) / 20f) + "L of Steam with 1 Coal at " + + getEUt() * 40 + "L/s") // ? .addInfo("A programmed circuit in the main block throttles the boiler (-1000L/s per config)") .addInfo("Solid Fuels with a burn value that is too high or too low will not work"); - } - tt.addInfo(String.format("Diesel fuels have 1/4 efficiency - Takes %.2f seconds to heat up", 500.0 / getEfficiencyIncrease()))//? check semifluid again + } + tt.addInfo(String.format( + "Diesel fuels have 1/4 efficiency - Takes %.2f seconds to heat up", + 500.0 / getEfficiencyIncrease())) // ? check semifluid again .addPollutionAmount(getPollutionPerSecond(null)) .addSeparator() .beginStructureBlock(3, 5, 3, false) .addController("Front bottom") - .addCasingInfo(getCasingMaterial() + " " + getCasingBlockType() + " Casing", 24)//? + .addCasingInfo(getCasingMaterial() + " " + getCasingBlockType() + " Casing", 24) // ? .addOtherStructurePart(getCasingMaterial() + " Fire Boxes", "Bottom layer, 3 minimum") .addOtherStructurePart(getCasingMaterial() + " Pipe Casing Blocks", "Inner 3 blocks") .addMaintenanceHatch("Any firebox", 1) @@ -156,34 +160,59 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends GT_MetaTileEntity_En public abstract int getEfficiencyIncrease(); - public int getIntegratedCircuitConfig(){ + public int getIntegratedCircuitConfig() { return integratedCircuitConfig; } @Override public int getPollutionPerSecond(ItemStack aStack) { - //allows for 0 pollution if circuit throttle is too high - return Math.max(0, (int) (pollutionPerSecond * (1-GT_Mod.gregtechproxy.mPollutionReleasedByThrottle*getIntegratedCircuitConfig()))); + // allows for 0 pollution if circuit throttle is too high + return Math.max(0, (int) (pollutionPerSecond + * (1 - GT_Mod.gregtechproxy.mPollutionReleasedByThrottle * getIntegratedCircuitConfig()))); } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { if (aSide == aFacing) { - if (aActive) return new ITexture[]{ + if (aActive) + return new ITexture[] { BlockIcons.getCasingTextureForId(getCasingTextureIndex()), - TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_BOILER_ACTIVE).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_BOILER_ACTIVE_GLOW).extFacing().glow().build()}; - return new ITexture[]{ - BlockIcons.getCasingTextureForId(getCasingTextureIndex()), - TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_BOILER).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_BOILER_GLOW).extFacing().glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_LARGE_BOILER_ACTIVE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_LARGE_BOILER_ACTIVE_GLOW) + .extFacing() + .glow() + .build() + }; + return new ITexture[] { + BlockIcons.getCasingTextureForId(getCasingTextureIndex()), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_LARGE_BOILER) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_LARGE_BOILER_GLOW) + .extFacing() + .glow() + .build() + }; } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex())}; + return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex())}; } @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeBoiler.png"); + return new GT_GUIContainer_MultiMachine( + aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeBoiler.png"); } @Override @@ -192,11 +221,12 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends GT_MetaTileEntity_En } boolean isFuelValid() { - if (!isSuperheated()) - return true; + if (!isSuperheated()) return true; for (ItemStack input : getStoredInputs()) { - if (!GT_Recipe.GT_Recipe_Map_LargeBoilerFakeFuels.isAllowedSolidFuel(input) && !Circuit_Integrated.isStackEqual(input, true, true)) { - //if any item is not in ALLOWED_SOLID_FUELS, operation cannot be allowed because it might still be consumed + if (!GT_Recipe.GT_Recipe_Map_LargeBoilerFakeFuels.isAllowedSolidFuel(input) + && !Circuit_Integrated.isStackEqual(input, true, true)) { + // if any item is not in ALLOWED_SOLID_FUELS, operation cannot be allowed because it might still be + // consumed this.mMaxProgresstime = 0; this.mEUt = 0; return false; @@ -207,9 +237,8 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends GT_MetaTileEntity_En @Override public boolean checkRecipe(ItemStack aStack) { - if (!isFuelValid()) - return false; - //Do we have an integrated circuit with a valid configuration? + if (!isFuelValid()) return false; + // Do we have an integrated circuit with a valid configuration? if (Circuit_Integrated.isStackEqual(mInventory[1], true, true)) { int circuit_config = mInventory[1].getItemDamage(); if (circuit_config >= 1 && circuit_config <= 25) { @@ -217,7 +246,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends GT_MetaTileEntity_En this.integratedCircuitConfig = circuit_config; } } else { - //If not, set the config to zero + // If not, set the config to zero this.integratedCircuitConfig = 0; } @@ -240,7 +269,8 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends GT_MetaTileEntity_En if (tFluid != null) { tFluid.amount = 1000; if (depleteInput(tFluid)) { - this.mMaxProgresstime = adjustBurnTimeForConfig(Math.max(1, runtimeBoost(tRecipe.mSpecialValue * 2))); + this.mMaxProgresstime = + adjustBurnTimeForConfig(Math.max(1, runtimeBoost(tRecipe.mSpecialValue * 2))); this.mEUt = adjustEUtForConfig(getEUt()); this.mEfficiencyIncrease = this.mMaxProgresstime * getEfficiencyIncrease(); return true; @@ -253,15 +283,16 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends GT_MetaTileEntity_En if (!tInputList.isEmpty()) { if (isSuperheated()) { for (ItemStack tInput : tInputList) { - if (tInput != GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Lava, 1)){ - if (GT_Utility.getFluidForFilledItem(tInput, true) == null && (this.mMaxProgresstime = GT_ModHandler.getFuelValue(tInput) / 80) > 0) { + if (tInput != GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Lava, 1)) { + if (GT_Utility.getFluidForFilledItem(tInput, true) == null + && (this.mMaxProgresstime = GT_ModHandler.getFuelValue(tInput) / 80) > 0) { this.excessFuel += GT_ModHandler.getFuelValue(tInput) % 80; this.mMaxProgresstime += this.excessFuel / 80; this.excessFuel %= 80; this.mMaxProgresstime = adjustBurnTimeForConfig(runtimeBoost(this.mMaxProgresstime)); this.mEUt = adjustEUtForConfig(getEUt()); this.mEfficiencyIncrease = this.mMaxProgresstime * getEfficiencyIncrease(); - this.mOutputItems = new ItemStack[]{GT_Utility.getContainerItem(tInput, true)}; + this.mOutputItems = new ItemStack[] {GT_Utility.getContainerItem(tInput, true)}; tInput.stackSize -= 1; updateSlots(); if (this.mEfficiencyIncrease > 5000) { @@ -272,19 +303,22 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends GT_MetaTileEntity_En } } } - } - else { + } else { for (ItemStack tInput : tInputList) { - if (tInput != GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Lava, 1)){ - // Solid fuels with burn values below getEUt are ignored (mostly items like sticks), and also those with very high fuel values that would cause an overflow error. - if (GT_Utility.getFluidForFilledItem(tInput, true) == null && (this.mMaxProgresstime = GT_ModHandler.getFuelValue(tInput) / 80) > 0 && (GT_ModHandler.getFuelValue(tInput) * 2 / this.getEUt()) > 1 && GT_ModHandler.getFuelValue(tInput) < 100000000) { + if (tInput != GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Lava, 1)) { + // Solid fuels with burn values below getEUt are ignored (mostly items like sticks), and also + // those with very high fuel values that would cause an overflow error. + if (GT_Utility.getFluidForFilledItem(tInput, true) == null + && (this.mMaxProgresstime = GT_ModHandler.getFuelValue(tInput) / 80) > 0 + && (GT_ModHandler.getFuelValue(tInput) * 2 / this.getEUt()) > 1 + && GT_ModHandler.getFuelValue(tInput) < 100000000) { this.excessFuel += GT_ModHandler.getFuelValue(tInput) % 80; this.mMaxProgresstime += this.excessFuel / 80; this.excessFuel %= 80; this.mMaxProgresstime = adjustBurnTimeForConfig(runtimeBoost(this.mMaxProgresstime)); this.mEUt = adjustEUtForConfig(getEUt()); this.mEfficiencyIncrease = this.mMaxProgresstime * getEfficiencyIncrease(); - this.mOutputItems = new ItemStack[]{GT_Utility.getContainerItem(tInput, true)}; + this.mOutputItems = new ItemStack[] {GT_Utility.getContainerItem(tInput, true)}; tInput.stackSize -= 1; updateSlots(); if (this.mEfficiencyIncrease > 5000) { @@ -296,7 +330,6 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends GT_MetaTileEntity_En } } } - } this.mMaxProgresstime = 0; this.mEUt = 0; @@ -307,13 +340,17 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends GT_MetaTileEntity_En abstract boolean isSuperheated(); - final private int superToNormalSteam = 3; + private final int superToNormalSteam = 3; @Override public boolean onRunningTick(ItemStack aStack) { if (this.mEUt > 0) { if (this.mSuperEfficencyIncrease > 0) - mEfficiency = Math.max(0, Math.min(mEfficiency + mSuperEfficencyIncrease, getMaxEfficiency(mInventory[1]) - ((getIdealStatus() - getRepairStatus()) * 1000))); + mEfficiency = Math.max( + 0, + Math.min( + mEfficiency + mSuperEfficencyIncrease, + getMaxEfficiency(mInventory[1]) - ((getIdealStatus() - getRepairStatus()) * 1000))); int tGeneratedEU = (int) (this.mEUt * 2L * this.mEfficiency / 10000L); if (tGeneratedEU > 0) { long amount = (tGeneratedEU + STEAM_PER_WATER) / STEAM_PER_WATER; @@ -321,24 +358,26 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends GT_MetaTileEntity_En amount -= excessWater / STEAM_PER_WATER; excessWater %= STEAM_PER_WATER; if (isSuperheated()) { - // Consumes only one third of the water if producing Superheated Steam, to maintain water in the chain. - if (depleteInput(Materials.Water.getFluid(amount / superToNormalSteam)) || depleteInput(GT_ModHandler.getDistilledWater(amount / superToNormalSteam))) { - // Outputs Superheated Steam instead of Steam, at one third of the amount (equivalent in power output to the normal Steam amount). - addOutput(FluidRegistry.getFluidStack("ic2superheatedsteam", tGeneratedEU / superToNormalSteam)); + // Consumes only one third of the water if producing Superheated Steam, to maintain water in the + // chain. + if (depleteInput(Materials.Water.getFluid(amount / superToNormalSteam)) + || depleteInput(GT_ModHandler.getDistilledWater(amount / superToNormalSteam))) { + // Outputs Superheated Steam instead of Steam, at one third of the amount (equivalent in power + // output to the normal Steam amount). + addOutput( + FluidRegistry.getFluidStack("ic2superheatedsteam", tGeneratedEU / superToNormalSteam)); } else { GT_Log.exp.println("Boiler " + this.mName + " had no Water!"); explodeMultiblock(); } - } - - else { - if (depleteInput(Materials.Water.getFluid(amount)) || depleteInput(GT_ModHandler.getDistilledWater(amount))) { + } else { + if (depleteInput(Materials.Water.getFluid(amount)) + || depleteInput(GT_ModHandler.getDistilledWater(amount))) { addOutput(GT_ModHandler.getSteam(tGeneratedEU)); } else { GT_Log.exp.println("Boiler " + this.mName + " had no Water!"); explodeMultiblock(); } - } } return true; @@ -366,7 +405,9 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends GT_MetaTileEntity_En public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (mProgresstime > 0 && firstRun) { firstRun = false; - GT_Mod.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "extremepressure"); + GT_Mod.achievements.issueAchievement( + aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), + "extremepressure"); } super.onPostTick(aBaseMetaTileEntity, aTick); } @@ -388,8 +429,11 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends GT_MetaTileEntity_En public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { mCasingAmount = 0; mFireboxAmount = 0; - return checkPiece(STRUCTURE_PIECE_MAIN, 1, 4, 0) && mCasingAmount >= 24 && mFireboxAmount >= 3 && - mMaintenanceHatches.size() == 1 && !mMufflerHatches.isEmpty(); + return checkPiece(STRUCTURE_PIECE_MAIN, 1, 4, 0) + && mCasingAmount >= 24 + && mFireboxAmount >= 3 + && mMaintenanceHatches.size() == 1 + && !mMufflerHatches.isEmpty(); } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java index 0fa1b98f59..970000da11 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java @@ -5,7 +5,6 @@ import gregtech.api.GregTech_API; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_LargeBoiler_Bronze extends GT_MetaTileEntity_LargeBoiler { @@ -25,8 +24,8 @@ public class GT_MetaTileEntity_LargeBoiler_Bronze extends GT_MetaTileEntity_Larg } @Override - public String getCasingMaterial(){ - return "Bronze"; + public String getCasingMaterial() { + return "Bronze"; } @Override @@ -90,5 +89,7 @@ public class GT_MetaTileEntity_LargeBoiler_Bronze extends GT_MetaTileEntity_Larg } @Override - boolean isSuperheated() { return false; } + boolean isSuperheated() { + return false; + } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java index 2ed236f676..bc30228b3a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java @@ -5,7 +5,6 @@ import gregtech.api.GregTech_API; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_LargeBoiler_Steel extends GT_MetaTileEntity_LargeBoiler { public GT_MetaTileEntity_LargeBoiler_Steel(int aID, String aName, String aNameRegional) { @@ -24,8 +23,8 @@ public class GT_MetaTileEntity_LargeBoiler_Steel extends GT_MetaTileEntity_Large } @Override - public String getCasingMaterial(){ - return "Steel"; + public String getCasingMaterial() { + return "Steel"; } @Override @@ -84,8 +83,12 @@ public class GT_MetaTileEntity_LargeBoiler_Steel extends GT_MetaTileEntity_Large } @Override - int runtimeBoost(int mTime) { return mTime; } + int runtimeBoost(int mTime) { + return mTime; + } @Override - boolean isSuperheated() { return false; } + boolean isSuperheated() { + return false; + } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Titanium.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Titanium.java index 8ae4b6034a..bda83f7210 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Titanium.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Titanium.java @@ -4,9 +4,7 @@ import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map_LargeBoilerFakeFuels; import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_LargeBoiler_Titanium extends GT_MetaTileEntity_LargeBoiler { public GT_MetaTileEntity_LargeBoiler_Titanium(int aID, String aName, String aNameRegional) { @@ -25,14 +23,14 @@ public class GT_MetaTileEntity_LargeBoiler_Titanium extends GT_MetaTileEntity_La } @Override - public String getCasingMaterial(){ - return "Titanium"; + public String getCasingMaterial() { + return "Titanium"; } - @Override - public String getCasingBlockType() { - return "Machine Casings"; - } + @Override + public String getCasingBlockType() { + return "Machine Casings"; + } @Override public Block getCasingBlock() { @@ -90,5 +88,7 @@ public class GT_MetaTileEntity_LargeBoiler_Titanium extends GT_MetaTileEntity_La } @Override - boolean isSuperheated() { return true; } + boolean isSuperheated() { + return true; + } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java index e1e6e18091..3b73b4f407 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java @@ -4,9 +4,7 @@ import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map_LargeBoilerFakeFuels; import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_LargeBoiler_TungstenSteel extends GT_MetaTileEntity_LargeBoiler { public GT_MetaTileEntity_LargeBoiler_TungstenSteel(int aID, String aName, String aNameRegional) { @@ -25,8 +23,8 @@ public class GT_MetaTileEntity_LargeBoiler_TungstenSteel extends GT_MetaTileEnti } @Override - public String getCasingMaterial(){ - return "TungstenSteel"; + public String getCasingMaterial() { + return "TungstenSteel"; } @Override @@ -85,8 +83,12 @@ public class GT_MetaTileEntity_LargeBoiler_TungstenSteel extends GT_MetaTileEnti } @Override - int runtimeBoost(int mTime) { return mTime * 120 / 750; } + int runtimeBoost(int mTime) { + return mTime * 120 / 750; + } @Override - boolean isSuperheated() { return true; } + boolean isSuperheated() { + return true; + } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java index 54758167f1..d27bd429af 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java @@ -1,5 +1,16 @@ package gregtech.common.tileentities.machines.multi; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.enums.GT_HatchElement.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; +import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; + import com.gtnewhorizon.structurelib.StructureLibAPI; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.*; @@ -17,6 +28,8 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Single_Recipe_Check; import gregtech.api.util.GT_Utility; +import java.util.ArrayList; +import java.util.function.Consumer; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.InventoryPlayer; @@ -25,48 +38,40 @@ import net.minecraft.util.IChatComponent; import net.minecraft.world.World; import net.minecraftforge.fluids.FluidStack; -import java.util.ArrayList; -import java.util.function.Consumer; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.enums.GT_HatchElement.*; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; -import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_LargeChemicalReactor> implements ISurvivalConstructable { +public class GT_MetaTileEntity_LargeChemicalReactor + extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_LargeChemicalReactor> + implements ISurvivalConstructable { private static final int CASING_INDEX = 176; private static final String STRUCTURE_PIECE_MAIN = "main"; - private static final IStructureDefinition<GT_MetaTileEntity_LargeChemicalReactor> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_LargeChemicalReactor>builder() - .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][]{ - {"ccc", "cxc", "ccc"}, - {"c~c", "xPx", "cxc"}, - {"ccc", "cxc", "ccc"}, - })) - .addElement('P', ofBlock(GregTech_API.sBlockCasings8, 1)) - .addElement('c', buildHatchAdder(GT_MetaTileEntity_LargeChemicalReactor.class) - .atLeast(InputHatch, OutputHatch, InputBus, OutputBus, Maintenance, Energy) - .casingIndex(CASING_INDEX) - .dot(1) - .buildAndChain(onElementPass(GT_MetaTileEntity_LargeChemicalReactor::onCasingAdded, ofBlock(GregTech_API.sBlockCasings8, 0)) - )) - .addElement('x', buildHatchAdder(GT_MetaTileEntity_LargeChemicalReactor.class) - .atLeast(InputHatch, OutputHatch, InputBus, OutputBus, Maintenance, Energy) - .casingIndex(CASING_INDEX) - .dot(1) - .buildAndChain( - CoilStructureElement.INSTANCE, - onElementPass(GT_MetaTileEntity_LargeChemicalReactor::onCasingAdded, ofBlock(GregTech_API.sBlockCasings8, 0)) - ) - ) - .build(); + private static final IStructureDefinition<GT_MetaTileEntity_LargeChemicalReactor> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_LargeChemicalReactor>builder() + .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] { + {"ccc", "cxc", "ccc"}, + {"c~c", "xPx", "cxc"}, + {"ccc", "cxc", "ccc"}, + })) + .addElement('P', ofBlock(GregTech_API.sBlockCasings8, 1)) + .addElement( + 'c', + buildHatchAdder(GT_MetaTileEntity_LargeChemicalReactor.class) + .atLeast(InputHatch, OutputHatch, InputBus, OutputBus, Maintenance, Energy) + .casingIndex(CASING_INDEX) + .dot(1) + .buildAndChain(onElementPass( + GT_MetaTileEntity_LargeChemicalReactor::onCasingAdded, + ofBlock(GregTech_API.sBlockCasings8, 0)))) + .addElement( + 'x', + buildHatchAdder(GT_MetaTileEntity_LargeChemicalReactor.class) + .atLeast(InputHatch, OutputHatch, InputBus, OutputBus, Maintenance, Energy) + .casingIndex(CASING_INDEX) + .dot(1) + .buildAndChain( + CoilStructureElement.INSTANCE, + onElementPass( + GT_MetaTileEntity_LargeChemicalReactor::onCasingAdded, + ofBlock(GregTech_API.sBlockCasings8, 0)))) + .build(); private int mCasingAmount; private int mCoilAmount; @@ -109,24 +114,47 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_En } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, - boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { if (aSide == aFacing) { - if (aActive) return new ITexture[]{ - casingTexturePages[1][48], - TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE_GLOW).extFacing().glow().build()}; - return new ITexture[]{ + if (aActive) + return new ITexture[] { casingTexturePages[1][48], - TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_GLOW).extFacing().glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE_GLOW) + .extFacing() + .glow() + .build() + }; + return new ITexture[] { + casingTexturePages[1][48], + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_GLOW) + .extFacing() + .glow() + .build() + }; } - return new ITexture[]{casingTexturePages[1][48]}; + return new ITexture[] {casingTexturePages[1][48]}; } @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeChemicalReactor.png"); + return new GT_GUIContainer_MultiMachine( + aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeChemicalReactor.png"); } @Override @@ -168,15 +196,16 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_En tSingleRecipeCheckBuilder = GT_Single_Recipe_Check.builder(this).setBefore(); } - tRecipe = GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.findRecipe(getBaseMetaTileEntity(), false, - false, gregtech.api.enums.GT_Values.V[tier], fluids, inputs); + tRecipe = GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.findRecipe( + getBaseMetaTileEntity(), false, false, gregtech.api.enums.GT_Values.V[tier], fluids, inputs); if (tRecipe == null || !tRecipe.isRecipeInputEqual(true, fluids, inputs)) { return false; } if (mLockedToSingleRecipe) { - mSingleRecipeCheck = tSingleRecipeCheckBuilder.setAfter().setRecipe(tRecipe).build(); + mSingleRecipeCheck = + tSingleRecipeCheckBuilder.setAfter().setRecipe(tRecipe).build(); } } @@ -184,9 +213,8 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_En this.mEfficiencyIncrease = 10000; calculatePerfectOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, tVoltage); - //In case recipe is too OP for that machine - if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) - return false; + // In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return false; if (this.mEUt > 0) { this.mEUt = (-this.mEUt); } @@ -214,9 +242,11 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_En public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { mCasingAmount = 0; mCoilAmount = 0; - return checkPiece(STRUCTURE_PIECE_MAIN, 1, 1, 0) && - mCasingAmount >= 8 && mCoilAmount == 1 && - !mEnergyHatches.isEmpty() && mMaintenanceHatches.size() == 1; + return checkPiece(STRUCTURE_PIECE_MAIN, 1, 1, 0) + && mCasingAmount >= 8 + && mCoilAmount == 1 + && !mEnergyHatches.isEmpty() + && mMaintenanceHatches.size() == 1; } @Override @@ -253,7 +283,8 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_En @Override public boolean check(GT_MetaTileEntity_LargeChemicalReactor t, World world, int x, int y, int z) { Block block = world.getBlock(x, y, z); - if (block instanceof IHeatingCoil && ((IHeatingCoil) block).getCoilHeat(world.getBlockMetadata(x, y, z)) != HeatingCoilLevel.None) { + if (block instanceof IHeatingCoil + && ((IHeatingCoil) block).getCoilHeat(world.getBlockMetadata(x, y, z)) != HeatingCoilLevel.None) { return t.mCoilAmount++ == 0; } else { return false; @@ -261,13 +292,15 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_En } @Override - public boolean spawnHint(GT_MetaTileEntity_LargeChemicalReactor t, World world, int x, int y, int z, ItemStack trigger) { + public boolean spawnHint( + GT_MetaTileEntity_LargeChemicalReactor t, World world, int x, int y, int z, ItemStack trigger) { StructureLibAPI.hintParticle(world, x, y, z, GregTech_API.sBlockCasings5, 0); return true; } @Override - public boolean placeBlock(GT_MetaTileEntity_LargeChemicalReactor t, World world, int x, int y, int z, ItemStack trigger) { + public boolean placeBlock( + GT_MetaTileEntity_LargeChemicalReactor t, World world, int x, int y, int z, ItemStack trigger) { if (t.mCoilAmount > 0) return false; boolean b = world.setBlock(x, y, z, GregTech_API.sBlockCasings5, 0, 3); if (b) t.mCoilAmount++; @@ -275,13 +308,23 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_En } @Override - public PlaceResult survivalPlaceBlock(GT_MetaTileEntity_LargeChemicalReactor t, World world, int x, int y, int z, ItemStack trigger, IItemSource s, EntityPlayerMP actor, Consumer<IChatComponent> chatter) { + public PlaceResult survivalPlaceBlock( + GT_MetaTileEntity_LargeChemicalReactor t, + World world, + int x, + int y, + int z, + ItemStack trigger, + IItemSource s, + EntityPlayerMP actor, + Consumer<IChatComponent> chatter) { if (t.mCoilAmount > 0) return PlaceResult.SKIP; - if (check(t, world, x, y,z)) return PlaceResult.SKIP; + if (check(t, world, x, y, z)) return PlaceResult.SKIP; if (!StructureLibAPI.isBlockTriviallyReplaceable(world, x, y, z, actor)) return PlaceResult.REJECT; ItemStack result = s.takeOne(ItemStackPredicate.from(GregTech_API.sBlockCasings5), true); if (result == null) return PlaceResult.REJECT; - PlaceResult ret = StructureUtility.survivalPlaceBlock(result, ItemStackPredicate.NBTMode.EXACT, null, true, world, x, y, z, s, actor, chatter); + PlaceResult ret = StructureUtility.survivalPlaceBlock( + result, ItemStackPredicate.NBTMode.EXACT, null, true, world, x, y, z, s, actor, chatter); if (ret == PlaceResult.ACCEPT) t.mCoilAmount++; return ret; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java index fcf87d8a34..3593e73d8d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java @@ -1,5 +1,11 @@ package gregtech.common.tileentities.machines.multi; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.lazy; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.enums.GT_HatchElement.*; +import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; + import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IItemSource; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; @@ -13,6 +19,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynam import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; import gregtech.api.util.GT_Utility; import gregtech.common.items.GT_MetaGenerated_Tool_01; +import java.util.ArrayList; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.InventoryPlayer; @@ -23,43 +30,49 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.FluidStack; -import java.util.ArrayList; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.lazy; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.enums.GT_HatchElement.*; -import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; - -public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_LargeTurbine> implements ISurvivalConstructable { +public abstract class GT_MetaTileEntity_LargeTurbine + extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_LargeTurbine> + implements ISurvivalConstructable { private static final String STRUCTURE_PIECE_MAIN = "main"; - private static final ClassValue<IStructureDefinition<GT_MetaTileEntity_LargeTurbine>> STRUCTURE_DEFINITION = new ClassValue<IStructureDefinition<GT_MetaTileEntity_LargeTurbine>>() { - @Override - protected IStructureDefinition<GT_MetaTileEntity_LargeTurbine> computeValue(Class<?> type) { - return StructureDefinition.<GT_MetaTileEntity_LargeTurbine>builder() - .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][]{ - {" ", "xxxxx", "xxxxx", "xxxxx", "xxxxx",}, - {" --- ", "xcccx", "xhhhx", "xhhhx", "xhhhx",}, - {" --- ", "xc~cx", "xh-hx", "xh-hx", "xhdhx",}, - {" --- ", "xcccx", "xhhhx", "xhhhx", "xhhhx",}, - {" ", "xxxxx", "xxxxx", "xxxxx", "xxxxx",}, - })) - .addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMeta()))) - .addElement('d', lazy(t -> Dynamo.newAny(t.getCasingTextureIndex(), 1))) - .addElement('h', lazy(t -> buildHatchAdder(GT_MetaTileEntity_LargeTurbine.class) - .atLeast(Maintenance, InputHatch, OutputHatch, OutputBus, InputBus, Muffler) - .casingIndex(t.getCasingTextureIndex()) - .dot(2) - .buildAndChain(t.getCasingBlock(), t.getCasingMeta()))) - .addElement('x', (IStructureElementCheckOnly<GT_MetaTileEntity_LargeTurbine>) (aContext, aWorld, aX, aY, aZ) -> { - TileEntity tTile = aWorld.getTileEntity(aX, aY, aZ); - return !(tTile instanceof IGregTechTileEntity) || !(((IGregTechTileEntity) tTile).getMetaTileEntity() instanceof GT_MetaTileEntity_LargeTurbine); - }) - .build(); - } - }; + private static final ClassValue<IStructureDefinition<GT_MetaTileEntity_LargeTurbine>> STRUCTURE_DEFINITION = + new ClassValue<IStructureDefinition<GT_MetaTileEntity_LargeTurbine>>() { + @Override + protected IStructureDefinition<GT_MetaTileEntity_LargeTurbine> computeValue(Class<?> type) { + return StructureDefinition.<GT_MetaTileEntity_LargeTurbine>builder() + .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] { + { + " ", "xxxxx", "xxxxx", "xxxxx", "xxxxx", + }, + { + " --- ", "xcccx", "xhhhx", "xhhhx", "xhhhx", + }, + { + " --- ", "xc~cx", "xh-hx", "xh-hx", "xhdhx", + }, + { + " --- ", "xcccx", "xhhhx", "xhhhx", "xhhhx", + }, + { + " ", "xxxxx", "xxxxx", "xxxxx", "xxxxx", + }, + })) + .addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMeta()))) + .addElement('d', lazy(t -> Dynamo.newAny(t.getCasingTextureIndex(), 1))) + .addElement('h', lazy(t -> buildHatchAdder(GT_MetaTileEntity_LargeTurbine.class) + .atLeast(Maintenance, InputHatch, OutputHatch, OutputBus, InputBus, Muffler) + .casingIndex(t.getCasingTextureIndex()) + .dot(2) + .buildAndChain(t.getCasingBlock(), t.getCasingMeta()))) + .addElement('x', (IStructureElementCheckOnly<GT_MetaTileEntity_LargeTurbine>) + (aContext, aWorld, aX, aY, aZ) -> { + TileEntity tTile = aWorld.getTileEntity(aX, aY, aZ); + return !(tTile instanceof IGregTechTileEntity) + || !(((IGregTechTileEntity) tTile).getMetaTileEntity() + instanceof GT_MetaTileEntity_LargeTurbine); + }) + .build(); + } + }; protected int baseEff = 0; protected int optFlow = 0; @@ -68,7 +81,7 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_E protected int counter = 0; protected boolean looseFit = false; protected int overflowMultiplier = 0; - protected float[] flowMultipliers = new float[]{1, 1, 1}; + protected float[] flowMultipliers = new float[] {1, 1, 1}; public GT_MetaTileEntity_LargeTurbine(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -85,7 +98,8 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_E @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeTurbine.png"); + return new GT_GUIContainer_MultiMachine( + aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeTurbine.png"); } @Override @@ -95,7 +109,9 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_E @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - return checkPiece(STRUCTURE_PIECE_MAIN, 2, 2, 1) && mMaintenanceHatches.size() == 1 && mMufflerHatches.isEmpty() == (getPollutionPerTick(null) == 0); + return checkPiece(STRUCTURE_PIECE_MAIN, 2, 2, 1) + && mMaintenanceHatches.size() == 1 + && mMufflerHatches.isEmpty() == (getPollutionPerTick(null) == 0); } public abstract Block getCasingBlock(); @@ -106,7 +122,10 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_E @Override public boolean addToMachineList(IGregTechTileEntity tTileEntity, int aBaseCasingIndex) { - return addMaintenanceToMachineList(tTileEntity, getCasingTextureIndex()) || addInputToMachineList(tTileEntity, getCasingTextureIndex()) || addOutputToMachineList(tTileEntity, getCasingTextureIndex()) || addMufflerToMachineList(tTileEntity, getCasingTextureIndex()); + return addMaintenanceToMachineList(tTileEntity, getCasingTextureIndex()) + || addInputToMachineList(tTileEntity, getCasingTextureIndex()) + || addOutputToMachineList(tTileEntity, getCasingTextureIndex()) + || addMufflerToMachineList(tTileEntity, getCasingTextureIndex()); } @Override @@ -121,19 +140,30 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_E @Override public boolean checkRecipe(ItemStack aStack) { - if ((counter & 7) == 0 && (aStack == null || !(aStack.getItem() instanceof GT_MetaGenerated_Tool) || aStack.getItemDamage() < 170 || aStack.getItemDamage() > 179)) { + if ((counter & 7) == 0 + && (aStack == null + || !(aStack.getItem() instanceof GT_MetaGenerated_Tool) + || aStack.getItemDamage() < 170 + || aStack.getItemDamage() > 179)) { stopMachine(); return false; } ArrayList<FluidStack> tFluids = getStoredFluids(); if (tFluids.size() > 0) { - if (baseEff == 0 || optFlow == 0 || counter >= 512 || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled() + if (baseEff == 0 + || optFlow == 0 + || counter >= 512 + || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled() || this.getBaseMetaTileEntity().hasInventoryBeenModified()) { counter = 0; - baseEff = GT_Utility.safeInt((long) ((5F + ((GT_MetaGenerated_Tool) aStack.getItem()).getToolCombatDamage(aStack)) * 1000F)); - optFlow = GT_Utility.safeInt((long) Math.max(Float.MIN_NORMAL, - ((GT_MetaGenerated_Tool) aStack.getItem()).getToolStats(aStack).getSpeedMultiplier() + baseEff = GT_Utility.safeInt( + (long) ((5F + ((GT_MetaGenerated_Tool) aStack.getItem()).getToolCombatDamage(aStack)) * 1000F)); + optFlow = GT_Utility.safeInt((long) Math.max( + Float.MIN_NORMAL, + ((GT_MetaGenerated_Tool) aStack.getItem()) + .getToolStats(aStack) + .getSpeedMultiplier() * GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolSpeed * 50)); @@ -143,8 +173,8 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_E flowMultipliers[1] = GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mGasMultiplier; flowMultipliers[2] = GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mPlasmaMultiplier; - if(optFlow<=0 || baseEff<=0){ - stopMachine();//in case the turbine got removed + if (optFlow <= 0 || baseEff <= 0) { + stopMachine(); // in case the turbine got removed return false; } } else { @@ -152,23 +182,28 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_E } } - int newPower = fluidIntoPower(tFluids, optFlow, baseEff, overflowMultiplier, flowMultipliers); // How much the turbine should be producing with this flow + int newPower = fluidIntoPower( + tFluids, + optFlow, + baseEff, + overflowMultiplier, + flowMultipliers); // How much the turbine should be producing with this flow int difference = newPower - this.mEUt; // difference between current output and new output - // Magic numbers: can always change by at least 10 eu/t, but otherwise by at most 1 percent of the difference in power level (per tick) + // Magic numbers: can always change by at least 10 eu/t, but otherwise by at most 1 percent of the difference in + // power level (per tick) // This is how much the turbine can actually change during this tick - int maxChangeAllowed = Math.max(10, GT_Utility.safeInt((long)Math.abs(difference)/100)); + int maxChangeAllowed = Math.max(10, GT_Utility.safeInt((long) Math.abs(difference) / 100)); if (Math.abs(difference) > maxChangeAllowed) { // If this difference is too big, use the maximum allowed change int change = maxChangeAllowed * (difference > 0 ? 1 : -1); // Make the change positive or negative. this.mEUt += change; // Apply the change - } else - this.mEUt = newPower; + } else this.mEUt = newPower; if (this.mEUt <= 0) { - //stopMachine(); - this.mEUt=0; - this.mEfficiency=0; + // stopMachine(); + this.mEUt = 0; + this.mEfficiency = 0; return false; } else { this.mMaxProgresstime = 1; @@ -178,7 +213,8 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_E } } - abstract int fluidIntoPower(ArrayList<FluidStack> aFluids, int aOptFlow, int aBaseEff, int overflowMultiplier, float[] flowMultipliers); + abstract int fluidIntoPower( + ArrayList<FluidStack> aFluids, int aOptFlow, int aBaseEff, int overflowMultiplier, float[] flowMultipliers); abstract float getOverflowEfficiency(int totalFlow, int actualOptimalFlow, int overflowMultiplier); @@ -199,11 +235,9 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_E int toolQualityLevel = GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolQuality; if (toolQualityLevel >= 6) { aOverflowMultiplier = 3; - } - else if (toolQualityLevel >= 3) { + } else if (toolQualityLevel >= 3) { aOverflowMultiplier = 2; - } - else { + } else { aOverflowMultiplier = 1; } return aOverflowMultiplier; @@ -232,58 +266,74 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_E @Override public String[] getInfoData() { - int mPollutionReduction=0; + int mPollutionReduction = 0; for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) { if (isValidMetaTileEntity(tHatch)) { - mPollutionReduction=Math.max(tHatch.calculatePollutionReduction(100),mPollutionReduction); + mPollutionReduction = Math.max(tHatch.calculatePollutionReduction(100), mPollutionReduction); } } - String tRunning = mMaxProgresstime>0 ? - - EnumChatFormatting.GREEN+StatCollector.translateToLocal("GT5U.turbine.running.true")+EnumChatFormatting.RESET : - EnumChatFormatting.RED+StatCollector.translateToLocal("GT5U.turbine.running.false")+EnumChatFormatting.RESET; - String tMaintainance = getIdealStatus() == getRepairStatus() ? - EnumChatFormatting.GREEN+StatCollector.translateToLocal("GT5U.turbine.maintenance.false")+EnumChatFormatting.RESET : - EnumChatFormatting.RED+StatCollector.translateToLocal("GT5U.turbine.maintenance.true")+EnumChatFormatting.RESET ; + String tRunning = mMaxProgresstime > 0 + ? EnumChatFormatting.GREEN + + StatCollector.translateToLocal("GT5U.turbine.running.true") + + EnumChatFormatting.RESET + : EnumChatFormatting.RED + + StatCollector.translateToLocal("GT5U.turbine.running.false") + + EnumChatFormatting.RESET; + String tMaintainance = getIdealStatus() == getRepairStatus() + ? EnumChatFormatting.GREEN + + StatCollector.translateToLocal("GT5U.turbine.maintenance.false") + + EnumChatFormatting.RESET + : EnumChatFormatting.RED + + StatCollector.translateToLocal("GT5U.turbine.maintenance.true") + + EnumChatFormatting.RESET; int tDura = 0; if (mInventory[1] != null && mInventory[1].getItem() instanceof GT_MetaGenerated_Tool_01) { - tDura = GT_Utility.safeInt((long)(100.0f / GT_MetaGenerated_Tool.getToolMaxDamage(mInventory[1]) * (GT_MetaGenerated_Tool.getToolDamage(mInventory[1]))+1)); + tDura = GT_Utility.safeInt((long) (100.0f + / GT_MetaGenerated_Tool.getToolMaxDamage(mInventory[1]) + * (GT_MetaGenerated_Tool.getToolDamage(mInventory[1])) + + 1)); } - long storedEnergy=0; - long maxEnergy=0; - for(GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) { + long storedEnergy = 0; + long maxEnergy = 0; + for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) { if (isValidMetaTileEntity(tHatch)) { - storedEnergy+=tHatch.getBaseMetaTileEntity().getStoredEU(); - maxEnergy+=tHatch.getBaseMetaTileEntity().getEUCapacity(); + storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU(); + maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity(); } } - String[] ret = new String[]{ - // 8 Lines available for information panels - tRunning + ": " + EnumChatFormatting.RED + GT_Utility.formatNumbers(mEUt) + EnumChatFormatting.RESET + " EU/t", /* 1 */ - tMaintainance, /* 2 */ - StatCollector.translateToLocal("GT5U.turbine.efficiency") + ": " + - EnumChatFormatting.YELLOW + (mEfficiency / 100F) + EnumChatFormatting.RESET + "%", /* 2 */ - StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / " + /* 3 */ - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", - StatCollector.translateToLocal("GT5U.turbine.flow") + ": " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(GT_Utility.safeInt((long) realOptFlow)) + EnumChatFormatting.RESET + " L/t" + /* 4 */ - EnumChatFormatting.YELLOW + " (" + (looseFit ? StatCollector.translateToLocal("GT5U.turbine.loose") : StatCollector.translateToLocal("GT5U.turbine.tight")) + ")", /* 5 */ - StatCollector.translateToLocal("GT5U.turbine.fuel") + ": " + - EnumChatFormatting.GOLD + GT_Utility.formatNumbers(storedFluid) + EnumChatFormatting.RESET + "L", /* 6 */ - StatCollector.translateToLocal("GT5U.turbine.dmg") + ": " + - EnumChatFormatting.RED + tDura + EnumChatFormatting.RESET + "%", /* 7 */ - StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + - EnumChatFormatting.GREEN + mPollutionReduction + EnumChatFormatting.RESET + " %" /* 8 */ + String[] ret = new String[] { + // 8 Lines available for information panels + tRunning + ": " + EnumChatFormatting.RED + GT_Utility.formatNumbers(mEUt) + EnumChatFormatting.RESET + + " EU/t", /* 1 */ + tMaintainance, /* 2 */ + StatCollector.translateToLocal("GT5U.turbine.efficiency") + ": " + EnumChatFormatting.YELLOW + + (mEfficiency / 100F) + EnumChatFormatting.RESET + "%", /* 2 */ + StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / " + + /* 3 */ EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", + StatCollector.translateToLocal("GT5U.turbine.flow") + ": " + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(GT_Utility.safeInt((long) realOptFlow)) + EnumChatFormatting.RESET + + " L/t" + /* 4 */ EnumChatFormatting.YELLOW + + " (" + + (looseFit + ? StatCollector.translateToLocal("GT5U.turbine.loose") + : StatCollector.translateToLocal("GT5U.turbine.tight")) + + ")", /* 5 */ + StatCollector.translateToLocal("GT5U.turbine.fuel") + ": " + EnumChatFormatting.GOLD + + GT_Utility.formatNumbers(storedFluid) + EnumChatFormatting.RESET + "L", /* 6 */ + StatCollector.translateToLocal("GT5U.turbine.dmg") + ": " + EnumChatFormatting.RED + tDura + + EnumChatFormatting.RESET + "%", /* 7 */ + StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + EnumChatFormatting.GREEN + + mPollutionReduction + EnumChatFormatting.RESET + " %" /* 8 */ }; if (!this.getClass().getName().contains("Steam")) - ret[4] = StatCollector.translateToLocal("GT5U.turbine.flow") + ": " + EnumChatFormatting.YELLOW + GT_Utility.safeInt((long) realOptFlow) + EnumChatFormatting.RESET + " L/t"; + ret[4] = StatCollector.translateToLocal("GT5U.turbine.flow") + ": " + EnumChatFormatting.YELLOW + + GT_Utility.safeInt((long) realOptFlow) + EnumChatFormatting.RESET + " L/t"; return ret; - - } public boolean hasTurbine() { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java index c16b7851fa..18f9ac884e 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.machines.multi; +import static gregtech.api.enums.Textures.BlockIcons.*; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.interfaces.ITexture; @@ -10,14 +12,11 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; +import java.util.ArrayList; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; -import java.util.ArrayList; - -import static gregtech.api.enums.Textures.BlockIcons.*; - public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeTurbine { public GT_MetaTileEntity_LargeTurbine_Gas(int aID, String aName, String aNameRegional) { @@ -29,11 +28,32 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{MACHINE_CASINGS[1][aColorIndex + 1], - aFacing == aSide ? - (aActive ? TextureFactory.builder().addIcon(LARGETURBINE_SS_ACTIVE5).extFacing().build() : hasTurbine() ? TextureFactory.builder().addIcon(LARGETURBINE_SS5).extFacing().build() : TextureFactory.builder().addIcon(LARGETURBINE_SS_EMPTY5).extFacing().build()) - : casingTexturePages[0][58]}; + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { + return new ITexture[] { + MACHINE_CASINGS[1][aColorIndex + 1], + aFacing == aSide + ? (aActive + ? TextureFactory.builder() + .addIcon(LARGETURBINE_SS_ACTIVE5) + .extFacing() + .build() + : hasTurbine() + ? TextureFactory.builder() + .addIcon(LARGETURBINE_SS5) + .extFacing() + .build() + : TextureFactory.builder() + .addIcon(LARGETURBINE_SS_EMPTY5) + .extFacing() + .build()) + : casingTexturePages[0][58] + }; } @Override @@ -44,7 +64,7 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT .addInfo("Needs a Turbine, place inside controller") .addInfo("Warning: Will be capped at 8192 EU/t in a future update") .addInfo("See the Advanced Large Gas Turbine as the next, uncapped, option") - //.addInfo("The excess fuel that gets consumed will be voided!") + // .addInfo("The excess fuel that gets consumed will be voided!") .addPollutionAmount(getPollutionPerSecond(null)) .addSeparator() .beginStructureBlock(3, 3, 4, true) @@ -91,12 +111,19 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT } @Override - int fluidIntoPower(ArrayList<FluidStack> aFluids, int aOptFlow, int aBaseEff, int overflowMultiplier, float[] flowMultipliers) { + int fluidIntoPower( + ArrayList<FluidStack> aFluids, + int aOptFlow, + int aBaseEff, + int overflowMultiplier, + float[] flowMultipliers) { if (aFluids.size() >= 1) { int tEU = 0; int actualOptimalFlow = 0; - FluidStack firstFuelType = new FluidStack(aFluids.get(0), 0); // Identify a SINGLE type of fluid to process. Doesn't matter which one. Ignore the rest! + FluidStack firstFuelType = new FluidStack( + aFluids.get(0), + 0); // Identify a SINGLE type of fluid to process. Doesn't matter which one. Ignore the rest! int fuelValue = getFuelValue(firstFuelType); if (aOptFlow < fuelValue) { @@ -113,8 +140,10 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT this.realOptFlow = actualOptimalFlow; // Allowed to use up to 450% optimal flow rate, depending on the value of overflowMultiplier. - // This value is chosen because the highest EU/t possible depends on the overflowMultiplier, and the formula used - // makes it so the flow rate for that max, per value of overflowMultiplier, is (percentage of optimal flow rate): + // This value is chosen because the highest EU/t possible depends on the overflowMultiplier, and the formula + // used + // makes it so the flow rate for that max, per value of overflowMultiplier, is (percentage of optimal flow + // rate): // - 150% if it is 1 // - 300% if it is 2 // - 450% if it is 3 @@ -144,19 +173,20 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT tEU = GT_Utility.safeInt((long) tEU * (long) aBaseEff / 10000L); } - // EU/t output cap to properly tier the LGT against the Advanced LGT, will be implemented in a future dev update + // EU/t output cap to properly tier the LGT against the Advanced LGT, will be implemented in a future dev + // update /*if (tEU > 8192) { tEU = 8192; }*/ - // If next output is above the maximum the dynamo can handle, set it to the maximum instead of exploding the turbine + // If next output is above the maximum the dynamo can handle, set it to the maximum instead of exploding the + // turbine // Raising the maximum allowed flow rate to account for the efficiency changes beyond the optimal flow // When the max fuel consumption rate was increased, turbines could explode on world load - if (tEU > getMaximumOutput()){ + if (tEU > getMaximumOutput()) { tEU = GT_Utility.safeInt(getMaximumOutput()); } return tEU; - } return 0; } @@ -164,19 +194,20 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT @Override float getOverflowEfficiency(int totalFlow, int actualOptimalFlow, int overflowMultiplier) { // overflowMultiplier changes how quickly the turbine loses efficiency after flow goes beyond the optimal value - // At the default value of 1, any flow will generate less EU/t than optimal flow, regardless of the amount of fuel used + // At the default value of 1, any flow will generate less EU/t than optimal flow, regardless of the amount of + // fuel used // The bigger this number is, the slower efficiency loss happens as flow moves beyond the optimal value // Gases are the second most efficient in this regard, with plasma being the most efficient float efficiency = 0; if (totalFlow > actualOptimalFlow) { - efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow)) / ((float) actualOptimalFlow * ((overflowMultiplier * 3) - 1)); - } - else { + efficiency = 1.0f + - Math.abs((totalFlow - actualOptimalFlow)) + / ((float) actualOptimalFlow * ((overflowMultiplier * 3) - 1)); + } else { efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow) / (float) actualOptimalFlow); } return efficiency; } - } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_GasAdvanced.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_GasAdvanced.java index 244055ac61..9bc20e5f6e 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_GasAdvanced.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_GasAdvanced.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.machines.multi; +import static gregtech.api.enums.Textures.BlockIcons.*; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.interfaces.ITexture; @@ -10,15 +12,11 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; +import java.util.ArrayList; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; -import java.util.ArrayList; - -import static gregtech.api.enums.Textures.BlockIcons.*; -import static gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial; - public class GT_MetaTileEntity_LargeTurbine_GasAdvanced extends GT_MetaTileEntity_LargeTurbine { public GT_MetaTileEntity_LargeTurbine_GasAdvanced(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -29,32 +27,53 @@ public class GT_MetaTileEntity_LargeTurbine_GasAdvanced extends GT_MetaTileEntit } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{MACHINE_CASINGS[1][aColorIndex + 1], - aFacing == aSide ? - (aActive ? TextureFactory.builder().addIcon(LARGETURBINE_ADVGAS_ACTIVE5).extFacing().build() : hasTurbine() ? TextureFactory.builder().addIcon(LARGETURBINE_ADVGAS5).extFacing().build() : TextureFactory.builder().addIcon(LARGETURBINE_ADVGAS_EMPTY5).extFacing().build()) - : casingTexturePages[1][57]}; + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { + return new ITexture[] { + MACHINE_CASINGS[1][aColorIndex + 1], + aFacing == aSide + ? (aActive + ? TextureFactory.builder() + .addIcon(LARGETURBINE_ADVGAS_ACTIVE5) + .extFacing() + .build() + : hasTurbine() + ? TextureFactory.builder() + .addIcon(LARGETURBINE_ADVGAS5) + .extFacing() + .build() + : TextureFactory.builder() + .addIcon(LARGETURBINE_ADVGAS_EMPTY5) + .extFacing() + .build()) + : casingTexturePages[1][57] + }; } @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); tt.addMachineType("Gas Turbine") - .addInfo("Warning: This is an experimental multiblock, subject to changes ") - .addInfo("Controller block for the Large Advanced Gas Turbine") - .addInfo("Needs a Turbine, place inside controller") - .addInfo("Only accepts gases above 800k EU/bucket") - .addInfo("Has no maximum EU/t output, only depends on the Dynamo Hatch") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 3, 4, true) - .addController("Front center") - .addCasingInfo("Advanced Gas Turbine Casing", 24) - .addDynamoHatch("Back center", 1) - .addMaintenanceHatch("Side centered", 2) - .addMufflerHatch("Side centered", 2) - .addInputHatch("Gas Fuel, Side centered", 2) - .toolTipFinisher("Gregtech"); + .addInfo("Warning: This is an experimental multiblock, subject to changes ") + .addInfo("Controller block for the Large Advanced Gas Turbine") + .addInfo("Needs a Turbine, place inside controller") + .addInfo("Only accepts gases above 800k EU/bucket") + .addInfo("Has no maximum EU/t output, only depends on the Dynamo Hatch") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(3, 3, 4, true) + .addController("Front center") + .addCasingInfo("Advanced Gas Turbine Casing", 24) + .addDynamoHatch("Back center", 1) + .addMaintenanceHatch("Side centered", 2) + .addMufflerHatch("Side centered", 2) + .addInputHatch("Gas Fuel, Side centered", 2) + .toolTipFinisher("Gregtech"); return tt; } @@ -81,7 +100,9 @@ public class GT_MetaTileEntity_LargeTurbine_GasAdvanced extends GT_MetaTileEntit } @Override - public int getCasingTextureIndex() { return 185; } + public int getCasingTextureIndex() { + return 185; + } @Override public int getPollutionPerSecond(ItemStack aStack) { @@ -89,12 +110,19 @@ public class GT_MetaTileEntity_LargeTurbine_GasAdvanced extends GT_MetaTileEntit } @Override - int fluidIntoPower(ArrayList<FluidStack> aFluids, int aOptFlow, int aBaseEff, int overflowMultiplier, float[] flowMultipliers) { + int fluidIntoPower( + ArrayList<FluidStack> aFluids, + int aOptFlow, + int aBaseEff, + int overflowMultiplier, + float[] flowMultipliers) { if (aFluids.size() >= 1) { int tEU = 0; int actualOptimalFlow = 0; - FluidStack firstFuelType = new FluidStack(aFluids.get(0), 0); // Identify a SINGLE type of fluid to process. Doesn't matter which one. Ignore the rest! + FluidStack firstFuelType = new FluidStack( + aFluids.get(0), + 0); // Identify a SINGLE type of fluid to process. Doesn't matter which one. Ignore the rest! int fuelValue = getFuelValue(firstFuelType); if (fuelValue < 100) { @@ -115,8 +143,10 @@ public class GT_MetaTileEntity_LargeTurbine_GasAdvanced extends GT_MetaTileEntit this.realOptFlow = actualOptimalFlow; // Allowed to use up to 450% optimal flow rate, depending on the value of overflowMultiplier. - // This value is chosen because the highest EU/t possible depends on the overflowMultiplier, and the formula used - // makes it so the flow rate for that max, per value of overflowMultiplier, is (percentage of optimal flow rate): + // This value is chosen because the highest EU/t possible depends on the overflowMultiplier, and the formula + // used + // makes it so the flow rate for that max, per value of overflowMultiplier, is (percentage of optimal flow + // rate): // - 150% if it is 1 // - 300% if it is 2 // - 450% if it is 3 @@ -146,14 +176,14 @@ public class GT_MetaTileEntity_LargeTurbine_GasAdvanced extends GT_MetaTileEntit tEU = GT_Utility.safeInt((long) tEU * (long) aBaseEff / 10000L); } - // If next output is above the maximum the dynamo can handle, set it to the maximum instead of exploding the turbine + // If next output is above the maximum the dynamo can handle, set it to the maximum instead of exploding the + // turbine // Raising the maximum allowed flow rate to account for the efficiency changes beyond the optimal flow // When the max fuel consumption rate was increased, turbines could explode on world load - if (tEU > getMaximumOutput()){ + if (tEU > getMaximumOutput()) { tEU = GT_Utility.safeInt(getMaximumOutput()); } return tEU; - } return 0; } @@ -161,15 +191,17 @@ public class GT_MetaTileEntity_LargeTurbine_GasAdvanced extends GT_MetaTileEntit @Override float getOverflowEfficiency(int totalFlow, int actualOptimalFlow, int overflowMultiplier) { // overflowMultiplier changes how quickly the turbine loses efficiency after flow goes beyond the optimal value - // At the default value of 1, any flow will generate less EU/t than optimal flow, regardless of the amount of fuel used + // At the default value of 1, any flow will generate less EU/t than optimal flow, regardless of the amount of + // fuel used // The bigger this number is, the slower efficiency loss happens as flow moves beyond the optimal value // Gases are the second most efficient in this regard, with plasma being the most efficient float efficiency = 0; if (totalFlow > actualOptimalFlow) { - efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow)) / ((float) actualOptimalFlow * ((overflowMultiplier * 3) - 1)); - } - else { + efficiency = 1.0f + - Math.abs((totalFlow - actualOptimalFlow)) + / ((float) actualOptimalFlow * ((overflowMultiplier * 3) - 1)); + } else { efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow) / (float) actualOptimalFlow); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java index 651bb36706..709a02af7c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java @@ -1,5 +1,9 @@ package gregtech.common.tileentities.machines.multi; +import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; +import static gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeTurbine_Steam.calculateLooseFlow; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.interfaces.ITexture; @@ -9,18 +13,13 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Utility; +import java.util.ArrayList; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.fluids.FluidStack; -import java.util.ArrayList; - -import static gregtech.api.enums.Textures.BlockIcons.*; -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; -import static gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeTurbine_Steam.calculateLooseFlow; - public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_LargeTurbine { public boolean achievement = false; @@ -35,11 +34,32 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{MACHINE_CASINGS[1][aColorIndex + 1], - aFacing == aSide ? - (aActive ? TextureFactory.builder().addIcon(LARGETURBINE_TI_ACTIVE5).extFacing().build() : hasTurbine() ? TextureFactory.builder().addIcon(LARGETURBINE_TI5).extFacing().build() : TextureFactory.builder().addIcon(LARGETURBINE_TI_EMPTY5).extFacing().build()) - : casingTexturePages[0][59]}; + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { + return new ITexture[] { + MACHINE_CASINGS[1][aColorIndex + 1], + aFacing == aSide + ? (aActive + ? TextureFactory.builder() + .addIcon(LARGETURBINE_TI_ACTIVE5) + .extFacing() + .build() + : hasTurbine() + ? TextureFactory.builder() + .addIcon(LARGETURBINE_TI5) + .extFacing() + .build() + : TextureFactory.builder() + .addIcon(LARGETURBINE_TI_EMPTY5) + .extFacing() + .build()) + : casingTexturePages[0][59] + }; } @Override @@ -84,7 +104,12 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La } @Override - int fluidIntoPower(ArrayList<FluidStack> aFluids, int aOptFlow, int aBaseEff, int overflowEfficiency, float[] flowMultipliers) { + int fluidIntoPower( + ArrayList<FluidStack> aFluids, + int aOptFlow, + int aBaseEff, + int overflowEfficiency, + float[] flowMultipliers) { if (looseFit) { long[] calculatedFlow = calculateLooseFlow(aOptFlow, aBaseEff); aOptFlow = GT_Utility.safeInt(calculatedFlow[0]); @@ -95,8 +120,10 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La int flow = 0; // Allowed to use up to 300% optimal flow rate, depending on the value of overflowMultiplier. - // This value is chosen because the highest EU/t possible depends on the overflowMultiplier, and the formula used - // makes it so the flow rate for that max, per value of overflowMultiplier, is (percentage of optimal flow rate): + // This value is chosen because the highest EU/t possible depends on the overflowMultiplier, and the formula + // used + // makes it so the flow rate for that max, per value of overflowMultiplier, is (percentage of optimal flow + // rate): // - 200% if it is 1 // - 250% if it is 2 // - 300% if it is 3 @@ -115,7 +142,12 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La totalFlow += flow; // track total input used if (!achievement) { try { - GT_Mod.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "efficientsteam"); + GT_Mod.achievements.issueAchievement( + this.getBaseMetaTileEntity() + .getWorld() + .getPlayerEntityByName( + this.getBaseMetaTileEntity().getOwnerName()), + "efficientsteam"); } catch (Exception ignored) { } achievement = true; @@ -135,9 +167,11 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La tEU = Math.max(1, GT_Utility.safeInt((long) tEU * (long) aBaseEff / 10000L)); } - // If next output is above the maximum the dynamo can handle, set it to the maximum instead of exploding the turbine - // Raising the maximum allowed flow rate to account for the efficiency changes beyond the optimal flow rate can explode turbines on world load - if (tEU > getMaximumOutput()){ + // If next output is above the maximum the dynamo can handle, set it to the maximum instead of exploding the + // turbine + // Raising the maximum allowed flow rate to account for the efficiency changes beyond the optimal flow rate can + // explode turbines on world load + if (tEU > getMaximumOutput()) { tEU = GT_Utility.safeInt(getMaximumOutput()); } @@ -147,15 +181,18 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La @Override float getOverflowEfficiency(int totalFlow, int actualOptimalFlow, int overflowMultiplier) { // overflowMultiplier changes how quickly the turbine loses efficiency after flow goes beyond the optimal value - // At the default value of 1, any flow will generate less EU/t than optimal flow, regardless of the amount of fuel used + // At the default value of 1, any flow will generate less EU/t than optimal flow, regardless of the amount of + // fuel used // The bigger this number is, the slower efficiency loss happens as flow moves beyond the optimal value - // Superheated steam is the second least efficient out of all turbine fuels in this regard, with steam being the least efficient + // Superheated steam is the second least efficient out of all turbine fuels in this regard, with steam being the + // least efficient float efficiency = 0; if (totalFlow > actualOptimalFlow) { - efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow)) / ((float) actualOptimalFlow * (overflowMultiplier + 2)); - } - else { + efficiency = 1.0f + - Math.abs((totalFlow - actualOptimalFlow)) + / ((float) actualOptimalFlow * (overflowMultiplier + 2)); + } else { efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow) / (float) actualOptimalFlow); } @@ -166,7 +203,11 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aSide == getBaseMetaTileEntity().getFrontFacing()) { looseFit ^= true; - GT_Utility.sendChatToPlayer(aPlayer, looseFit ? GT_Utility.trans("500", "Fitting: Loose - More Flow") : GT_Utility.trans("501", "Fitting: Tight - More Efficiency")); + GT_Utility.sendChatToPlayer( + aPlayer, + looseFit + ? GT_Utility.trans("500", "Fitting: Loose - More Flow") + : GT_Utility.trans("501", "Fitting: Tight - More Efficiency")); } } @@ -175,7 +216,6 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La return (looseFit && XSTR_INSTANCE.nextInt(4) == 0) ? 0 : 1; } - @Override public String[] getInfoData() { super.looseFit = looseFit; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java index 01bf9118ca..21e9572d20 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.machines.multi; +import static gregtech.api.enums.Textures.BlockIcons.*; + import gregtech.api.GregTech_API; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -13,6 +15,7 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; import gregtech.common.items.GT_MetaGenerated_Tool_01; +import java.util.ArrayList; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; @@ -20,10 +23,6 @@ import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -import java.util.ArrayList; - -import static gregtech.api.enums.Textures.BlockIcons.*; - public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_LargeTurbine { public GT_MetaTileEntity_LargeTurbine_Plasma(int aID, String aName, String aNameRegional) { @@ -35,11 +34,32 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{MACHINE_CASINGS[1][aColorIndex + 1], - aFacing == aSide ? - (aActive ? TextureFactory.builder().addIcon(LARGETURBINE_TU_ACTIVE5).extFacing().build() : hasTurbine() ? TextureFactory.builder().addIcon(LARGETURBINE_TU5).extFacing().build() : TextureFactory.builder().addIcon(LARGETURBINE_TU_EMPTY5).extFacing().build()) - : casingTexturePages[0][60]}; + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { + return new ITexture[] { + MACHINE_CASINGS[1][aColorIndex + 1], + aFacing == aSide + ? (aActive + ? TextureFactory.builder() + .addIcon(LARGETURBINE_TU_ACTIVE5) + .extFacing() + .build() + : hasTurbine() + ? TextureFactory.builder() + .addIcon(LARGETURBINE_TU5) + .extFacing() + .build() + : TextureFactory.builder() + .addIcon(LARGETURBINE_TU_EMPTY5) + .extFacing() + .build()) + : casingTexturePages[0][60] + }; } @Override @@ -89,21 +109,31 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar } @Override - int fluidIntoPower(ArrayList<FluidStack> aFluids, int aOptFlow, int aBaseEff, int overflowMultiplier, float[] flowMultipliers) { + int fluidIntoPower( + ArrayList<FluidStack> aFluids, + int aOptFlow, + int aBaseEff, + int overflowMultiplier, + float[] flowMultipliers) { if (aFluids.size() >= 1) { - aOptFlow *= 800;//CHANGED THINGS HERE, check recipe runs once per 20 ticks + aOptFlow *= 800; // CHANGED THINGS HERE, check recipe runs once per 20 ticks int tEU = 0; int actualOptimalFlow = 0; - FluidStack firstFuelType = new FluidStack(aFluids.get(0), 0); // Identify a SINGLE type of fluid to process. Doesn't matter which one. Ignore the rest! + FluidStack firstFuelType = new FluidStack( + aFluids.get(0), + 0); // Identify a SINGLE type of fluid to process. Doesn't matter which one. Ignore the rest! int fuelValue = getFuelValue(firstFuelType); - actualOptimalFlow = GT_Utility.safeInt((long) Math.ceil((double) aOptFlow * flowMultipliers[2] / (double) fuelValue)); + actualOptimalFlow = + GT_Utility.safeInt((long) Math.ceil((double) aOptFlow * flowMultipliers[2] / (double) fuelValue)); this.realOptFlow = actualOptimalFlow; // For scanner info // Allowed to use up to 550% optimal flow rate, depending on the value of overflowMultiplier. - // This value is chosen because the highest EU/t possible depends on the overflowMultiplier, and the formula used - // makes it so the flow rate for that max, per value of overflowMultiplier, is (percentage of optimal flow rate): + // This value is chosen because the highest EU/t possible depends on the overflowMultiplier, and the formula + // used + // makes it so the flow rate for that max, per value of overflowMultiplier, is (percentage of optimal flow + // rate): // - 250% if it is 1 // - 400% if it is 2 // - 550% if it is 3 @@ -137,7 +167,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar if (totalFlow <= 0) return 0; tEU = GT_Utility.safeInt((long) ((fuelValue / 20D) * (double) totalFlow)); - //GT_FML_LOGGER.info(totalFlow+" : "+fuelValue+" : "+aOptFlow+" : "+actualOptimalFlow+" : "+tEU); + // GT_FML_LOGGER.info(totalFlow+" : "+fuelValue+" : "+aOptFlow+" : "+actualOptimalFlow+" : "+tEU); if (totalFlow == actualOptimalFlow) { tEU = GT_Utility.safeInt((long) (aBaseEff / 10000D * tEU)); @@ -147,14 +177,15 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar tEU = GT_Utility.safeInt((long) (aBaseEff / 10000D * tEU)); } - // If next output is above the maximum the dynamo can handle, set it to the maximum instead of exploding the turbine - // Raising the maximum allowed flow rate to account for the efficiency changes beyond the optimal flow rate can explode turbines on world load - if (tEU > getMaximumOutput()){ + // If next output is above the maximum the dynamo can handle, set it to the maximum instead of exploding the + // turbine + // Raising the maximum allowed flow rate to account for the efficiency changes beyond the optimal flow rate + // can explode turbines on world load + if (tEU > getMaximumOutput()) { tEU = GT_Utility.safeInt(getMaximumOutput()); } return tEU; - } return 0; } @@ -162,15 +193,17 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar @Override float getOverflowEfficiency(int totalFlow, int actualOptimalFlow, int overflowMultiplier) { // overflowMultiplier changes how quickly the turbine loses efficiency after flow goes beyond the optimal value - // At the default value of 1, any flow will generate less EU/t than optimal flow, regardless of the amount of fuel used + // At the default value of 1, any flow will generate less EU/t than optimal flow, regardless of the amount of + // fuel used // The bigger this number is, the slower efficiency loss happens as flow moves beyond the optimal value // Plasmas are the most efficient out of all turbine fuels in this regard float efficiency = 0; if (totalFlow > actualOptimalFlow) { - efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow)) / ((float) actualOptimalFlow * ((overflowMultiplier * 3) + 1)); - } - else { + efficiency = 1.0f + - Math.abs((totalFlow - actualOptimalFlow)) + / ((float) actualOptimalFlow * ((overflowMultiplier * 3) + 1)); + } else { efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow) / (float) actualOptimalFlow); } @@ -179,18 +212,29 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar @Override public boolean checkRecipe(ItemStack aStack) { - if ((counter & 7) == 0 && (aStack == null || !(aStack.getItem() instanceof GT_MetaGenerated_Tool) || aStack.getItemDamage() < 170 || aStack.getItemDamage() > 179)) { + if ((counter & 7) == 0 + && (aStack == null + || !(aStack.getItem() instanceof GT_MetaGenerated_Tool) + || aStack.getItemDamage() < 170 + || aStack.getItemDamage() > 179)) { stopMachine(); return false; } ArrayList<FluidStack> tFluids = getStoredFluids(); if (!tFluids.isEmpty()) { - if (baseEff == 0 || optFlow == 0 || counter >= 512 || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled() + if (baseEff == 0 + || optFlow == 0 + || counter >= 512 + || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled() || this.getBaseMetaTileEntity().hasInventoryBeenModified()) { counter = 0; - baseEff = GT_Utility.safeInt((long) ((5F + ((GT_MetaGenerated_Tool) aStack.getItem()).getToolCombatDamage(aStack)) * 1000F)); - optFlow = GT_Utility.safeInt((long) Math.max(Float.MIN_NORMAL, - ((GT_MetaGenerated_Tool) aStack.getItem()).getToolStats(aStack).getSpeedMultiplier() + baseEff = GT_Utility.safeInt( + (long) ((5F + ((GT_MetaGenerated_Tool) aStack.getItem()).getToolCombatDamage(aStack)) * 1000F)); + optFlow = GT_Utility.safeInt((long) Math.max( + Float.MIN_NORMAL, + ((GT_MetaGenerated_Tool) aStack.getItem()) + .getToolStats(aStack) + .getSpeedMultiplier() * ((GT_MetaGenerated_Tool) aStack.getItem()).getPrimaryMaterial(aStack).mToolSpeed * 50)); overflowMultiplier = getOverflowMultiplier(aStack); @@ -200,26 +244,31 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar } if (optFlow <= 0 || baseEff <= 0) { - stopMachine();//in case the turbine got removed + stopMachine(); // in case the turbine got removed return false; } - int newPower = fluidIntoPower(tFluids, optFlow, baseEff, overflowMultiplier, flowMultipliers); // How much the turbine should be producing with this flow + int newPower = fluidIntoPower( + tFluids, + optFlow, + baseEff, + overflowMultiplier, + flowMultipliers); // How much the turbine should be producing with this flow int difference = newPower - this.mEUt; // difference between current output and new output - // Magic numbers: can always change by at least 10 eu/t, but otherwise by at most 1 percent of the difference in power level (per tick) + // Magic numbers: can always change by at least 10 eu/t, but otherwise by at most 1 percent of the difference in + // power level (per tick) // This is how much the turbine can actually change during this tick int maxChangeAllowed = Math.max(200, GT_Utility.safeInt((long) Math.abs(difference) / 5)); if (Math.abs(difference) > maxChangeAllowed) { // If this difference is too big, use the maximum allowed change int change = maxChangeAllowed * (difference > 0 ? 1 : -1); // Make the change positive or negative. this.mEUt += change; // Apply the change - } else - this.mEUt = newPower; + } else this.mEUt = newPower; if (this.mEUt <= 0) { - //stopMachine(); + // stopMachine(); this.mEUt = 0; this.mEfficiency = 0; return false; @@ -232,57 +281,75 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar } } - @Override + @Override public String[] getInfoData() { - int mPollutionReduction=0; + int mPollutionReduction = 0; for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) { if (isValidMetaTileEntity(tHatch)) { - mPollutionReduction=Math.max(tHatch.calculatePollutionReduction(100),mPollutionReduction); + mPollutionReduction = Math.max(tHatch.calculatePollutionReduction(100), mPollutionReduction); } } - String tRunning = mMaxProgresstime>0 ? - - EnumChatFormatting.GREEN+StatCollector.translateToLocal("GT5U.turbine.running.true")+EnumChatFormatting.RESET : - EnumChatFormatting.RED+StatCollector.translateToLocal("GT5U.turbine.running.false")+EnumChatFormatting.RESET; - String tMaintainance = getIdealStatus() == getRepairStatus() ? - EnumChatFormatting.GREEN+StatCollector.translateToLocal("GT5U.turbine.maintenance.false")+EnumChatFormatting.RESET : - EnumChatFormatting.RED+StatCollector.translateToLocal("GT5U.turbine.maintenance.true")+EnumChatFormatting.RESET ; + String tRunning = mMaxProgresstime > 0 + ? EnumChatFormatting.GREEN + + StatCollector.translateToLocal("GT5U.turbine.running.true") + + EnumChatFormatting.RESET + : EnumChatFormatting.RED + + StatCollector.translateToLocal("GT5U.turbine.running.false") + + EnumChatFormatting.RESET; + String tMaintainance = getIdealStatus() == getRepairStatus() + ? EnumChatFormatting.GREEN + + StatCollector.translateToLocal("GT5U.turbine.maintenance.false") + + EnumChatFormatting.RESET + : EnumChatFormatting.RED + + StatCollector.translateToLocal("GT5U.turbine.maintenance.true") + + EnumChatFormatting.RESET; int tDura = 0; if (mInventory[1] != null && mInventory[1].getItem() instanceof GT_MetaGenerated_Tool_01) { - tDura = GT_Utility.safeInt((long)(100.0f / GT_MetaGenerated_Tool.getToolMaxDamage(mInventory[1]) * (GT_MetaGenerated_Tool.getToolDamage(mInventory[1]))+1)); + tDura = GT_Utility.safeInt((long) (100.0f + / GT_MetaGenerated_Tool.getToolMaxDamage(mInventory[1]) + * (GT_MetaGenerated_Tool.getToolDamage(mInventory[1])) + + 1)); } - long storedEnergy=0; - long maxEnergy=0; - for(GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) { + long storedEnergy = 0; + long maxEnergy = 0; + for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) { if (isValidMetaTileEntity(tHatch)) { - storedEnergy+=tHatch.getBaseMetaTileEntity().getStoredEU(); - maxEnergy+=tHatch.getBaseMetaTileEntity().getEUCapacity(); + storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU(); + maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity(); } } - String[] ret = new String[]{ - // 8 Lines available for information panels - tRunning + ": " + EnumChatFormatting.RED + GT_Utility.formatNumbers(mEUt) + EnumChatFormatting.RESET + " EU/t", /* 1 */ - tMaintainance, /* 2 */ - StatCollector.translateToLocal("GT5U.turbine.efficiency") + ": " + - EnumChatFormatting.YELLOW + (mEfficiency/100F) + EnumChatFormatting.RESET + "%", /* 2 */ - StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / " + /* 3 */ - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", - StatCollector.translateToLocal("GT5U.turbine.flow") + ": " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(GT_Utility.safeInt((long)realOptFlow)) + EnumChatFormatting.RESET + " L/s" + /* 4 */ - EnumChatFormatting.YELLOW + " (" + (looseFit?StatCollector.translateToLocal("GT5U.turbine.loose"):StatCollector.translateToLocal("GT5U.turbine.tight")) + ")", /* 5 */ - StatCollector.translateToLocal("GT5U.turbine.fuel") + ": " + - EnumChatFormatting.GOLD + GT_Utility.formatNumbers(storedFluid) + EnumChatFormatting.RESET + "L", /* 6 */ - StatCollector.translateToLocal("GT5U.turbine.dmg") + ": " + - EnumChatFormatting.RED + Integer.toString(tDura) + EnumChatFormatting.RESET + "%", /* 7 */ - StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + - EnumChatFormatting.GREEN + mPollutionReduction + EnumChatFormatting.RESET + " %" /* 8 */ + String[] ret = new String[] { + // 8 Lines available for information panels + tRunning + ": " + EnumChatFormatting.RED + GT_Utility.formatNumbers(mEUt) + EnumChatFormatting.RESET + + " EU/t", /* 1 */ + tMaintainance, /* 2 */ + StatCollector.translateToLocal("GT5U.turbine.efficiency") + ": " + EnumChatFormatting.YELLOW + + (mEfficiency / 100F) + EnumChatFormatting.RESET + "%", /* 2 */ + StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / " + + /* 3 */ EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", + StatCollector.translateToLocal("GT5U.turbine.flow") + ": " + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(GT_Utility.safeInt((long) realOptFlow)) + EnumChatFormatting.RESET + + " L/s" + /* 4 */ EnumChatFormatting.YELLOW + + " (" + + (looseFit + ? StatCollector.translateToLocal("GT5U.turbine.loose") + : StatCollector.translateToLocal("GT5U.turbine.tight")) + + ")", /* 5 */ + StatCollector.translateToLocal("GT5U.turbine.fuel") + ": " + EnumChatFormatting.GOLD + + GT_Utility.formatNumbers(storedFluid) + EnumChatFormatting.RESET + "L", /* 6 */ + StatCollector.translateToLocal("GT5U.turbine.dmg") + ": " + EnumChatFormatting.RED + Integer.toString(tDura) + + EnumChatFormatting.RESET + "%", /* 7 */ + StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + EnumChatFormatting.GREEN + + mPollutionReduction + EnumChatFormatting.RESET + " %" /* 8 */ }; if (!this.getClass().getName().contains("Steam")) - ret[4]=StatCollector.translateToLocal("GT5U.turbine.flow")+": "+EnumChatFormatting.YELLOW+GT_Utility.safeInt((long)realOptFlow)+EnumChatFormatting.RESET+" L/s"; + ret[4] = StatCollector.translateToLocal("GT5U.turbine.flow") + ": " + EnumChatFormatting.YELLOW + + GT_Utility.safeInt((long) realOptFlow) + EnumChatFormatting.RESET + " L/s"; return ret; } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java index 9da596b6e6..3d17b25399 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java @@ -1,5 +1,9 @@ package gregtech.common.tileentities.machines.multi; +import static gregtech.api.enums.GT_Values.STEAM_PER_WATER; +import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.interfaces.ITexture; @@ -9,18 +13,13 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Utility; +import java.util.ArrayList; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.fluids.FluidStack; -import java.util.ArrayList; - -import static gregtech.api.enums.GT_Values.STEAM_PER_WATER; -import static gregtech.api.enums.Textures.BlockIcons.*; -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; - public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_LargeTurbine { private int excessWater; @@ -31,17 +30,37 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg super(aID, aName, aNameRegional); } - public GT_MetaTileEntity_LargeTurbine_Steam(String aName) { super(aName); } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{MACHINE_CASINGS[1][aColorIndex + 1], - aFacing == aSide ? - (aActive ? TextureFactory.builder().addIcon(LARGETURBINE_ST_ACTIVE5).extFacing().build() : hasTurbine() ? TextureFactory.builder().addIcon(LARGETURBINE_ST5).extFacing().build() : TextureFactory.builder().addIcon(LARGETURBINE_ST_EMPTY5).extFacing().build()) - : casingTexturePages[0][57]}; + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { + return new ITexture[] { + MACHINE_CASINGS[1][aColorIndex + 1], + aFacing == aSide + ? (aActive + ? TextureFactory.builder() + .addIcon(LARGETURBINE_ST_ACTIVE5) + .extFacing() + .build() + : hasTurbine() + ? TextureFactory.builder() + .addIcon(LARGETURBINE_ST5) + .extFacing() + .build() + : TextureFactory.builder() + .addIcon(LARGETURBINE_ST_EMPTY5) + .extFacing() + .build()) + : casingTexturePages[0][57] + }; } @Override @@ -93,7 +112,12 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg } @Override - int fluidIntoPower(ArrayList<FluidStack> aFluids, int aOptFlow, int aBaseEff, int overflowEfficiency, float[] flowMultipliers) { + int fluidIntoPower( + ArrayList<FluidStack> aFluids, + int aOptFlow, + int aBaseEff, + int overflowEfficiency, + float[] flowMultipliers) { if (looseFit) { long[] calculatedFlow = calculateLooseFlow(aOptFlow, aBaseEff); aOptFlow = GT_Utility.safeInt(calculatedFlow[0]); @@ -104,8 +128,10 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg int flow = 0; // Allowed to use up to 250% optimal flow rate, depending on the value of overflowMultiplier. - // This value is chosen because the highest EU/t possible depends on the overflowMultiplier, and the formula used - // makes it so the flow rate for that max, per value of overflowMultiplier, is (percentage of optimal flow rate): + // This value is chosen because the highest EU/t possible depends on the overflowMultiplier, and the formula + // used + // makes it so the flow rate for that max, per value of overflowMultiplier, is (percentage of optimal flow + // rate): // - 150% if it is 1 // - 200% if it is 2 // - 250% if it is 3 @@ -114,7 +140,9 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg this.realOptFlow = aOptFlow * flowMultipliers[0]; storedFluid = 0; - for (int i = 0; i < aFluids.size() && remainingFlow > 0; i++) { // loop through each hatch; extract inputs and track totals. + for (int i = 0; + i < aFluids.size() && remainingFlow > 0; + i++) { // loop through each hatch; extract inputs and track totals. final FluidStack aFluidStack = aFluids.get(i); if (GT_ModHandler.isAnySteam(aFluidStack)) { flow = Math.min(aFluidStack.amount, remainingFlow); // try to use up to the max flow defined just above @@ -123,7 +151,12 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg remainingFlow -= flow; // track amount we're allowed to continue depleting from hatches totalFlow += flow; // track total input used if (!achievement) { - GT_Mod.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "muchsteam"); + GT_Mod.achievements.issueAchievement( + this.getBaseMetaTileEntity() + .getWorld() + .getPlayerEntityByName( + this.getBaseMetaTileEntity().getOwnerName()), + "muchsteam"); achievement = true; } } else if (GT_ModHandler.isSuperHeatedSteam(aFluidStack)) { @@ -142,9 +175,11 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg tEU = Math.max(1, GT_Utility.safeInt((long) tEU * (long) aBaseEff / 20000L)); } - // If next output is above the maximum the dynamo can handle, set it to the maximum instead of exploding the turbine - // Raising the maximum allowed flow rate to account for the efficiency changes beyond the optimal flow rate can explode turbines on world load - if (tEU > getMaximumOutput()){ + // If next output is above the maximum the dynamo can handle, set it to the maximum instead of exploding the + // turbine + // Raising the maximum allowed flow rate to account for the efficiency changes beyond the optimal flow rate can + // explode turbines on world load + if (tEU > getMaximumOutput()) { tEU = GT_Utility.safeInt(getMaximumOutput()); } @@ -154,15 +189,17 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg @Override float getOverflowEfficiency(int totalFlow, int actualOptimalFlow, int overflowMultiplier) { // overflowMultiplier changes how quickly the turbine loses efficiency after flow goes beyond the optimal value - // At the default value of 1, any flow will generate less EU/t than optimal flow, regardless of the amount of fuel used + // At the default value of 1, any flow will generate less EU/t than optimal flow, regardless of the amount of + // fuel used // The bigger this number is, the slower efficiency loss happens as flow moves beyond the optimal value // Steam is the least efficient out of all turbine fuels in this regard float efficiency = 0; if (totalFlow > actualOptimalFlow) { - efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow)) / ((float) actualOptimalFlow * (overflowMultiplier + 1)); - } - else { + efficiency = 1.0f + - Math.abs((totalFlow - actualOptimalFlow)) + / ((float) actualOptimalFlow * (overflowMultiplier + 1)); + } else { efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow) / (float) actualOptimalFlow); } @@ -171,29 +208,29 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg public static long[] calculateLooseFlow(int aOptFlow, int aBaseEff) { aOptFlow *= 4; - if(aBaseEff>=26000) { + if (aBaseEff >= 26000) { aOptFlow *= Math.pow(1.1f, ((aBaseEff - 8000) / 10000F) * 20f); aBaseEff *= 0.6f; - }else if(aBaseEff>22000) { + } else if (aBaseEff > 22000) { aOptFlow *= Math.pow(1.1f, ((aBaseEff - 7000) / 10000F) * 20f); aBaseEff *= 0.65f; - }else if(aBaseEff>18000) { + } else if (aBaseEff > 18000) { aOptFlow *= Math.pow(1.1f, ((aBaseEff - 6000) / 10000F) * 20f); aBaseEff *= 0.70f; - }else if(aBaseEff>14000) { + } else if (aBaseEff > 14000) { aOptFlow *= Math.pow(1.1f, ((aBaseEff - 5000) / 10000F) * 20f); aBaseEff *= 0.75f; - }else if(aBaseEff>10000) { + } else if (aBaseEff > 10000) { aOptFlow *= Math.pow(1.1f, ((aBaseEff - 4000) / 10000F) * 20f); aBaseEff *= 0.8f; - }else if(aBaseEff>6000) { + } else if (aBaseEff > 6000) { aOptFlow *= Math.pow(1.1f, ((aBaseEff - 3000) / 10000F) * 20f); aBaseEff *= 0.85f; - }else{ + } else { aBaseEff *= 0.9f; } - if (aBaseEff % 100 != 0){ + if (aBaseEff % 100 != 0) { aBaseEff -= aBaseEff % 100; } @@ -207,7 +244,11 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aSide == getBaseMetaTileEntity().getFrontFacing()) { looseFit ^= true; - GT_Utility.sendChatToPlayer(aPlayer, looseFit ? GT_Utility.trans("500", "Fitting: Loose - More Flow") : GT_Utility.trans("501", "Fitting: Tight - More Efficiency")); + GT_Utility.sendChatToPlayer( + aPlayer, + looseFit + ? GT_Utility.trans("500", "Fitting: Loose - More Flow") + : GT_Utility.trans("501", "Fitting: Tight - More Efficiency")); } } @@ -216,7 +257,6 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg return (looseFit && XSTR_INSTANCE.nextInt(4) == 0) ? 0 : 1; } - @Override public String[] getInfoData() { super.looseFit = looseFit; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java index b0de2803b3..7d3b341786 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java @@ -1,5 +1,16 @@ package gregtech.common.tileentities.machines.multi; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.enums.GT_HatchElement.*; +import static gregtech.api.enums.GT_Values.VN; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; + import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IItemSource; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; @@ -22,6 +33,7 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_StructureUtility; import gregtech.api.util.GT_Utility; +import java.util.ArrayList; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; @@ -29,43 +41,40 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; -import java.util.ArrayList; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.enums.GT_HatchElement.*; -import static gregtech.api.enums.GT_Values.VN; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; - -public class GT_MetaTileEntity_MultiFurnace extends GT_MetaTileEntity_AbstractMultiFurnace<GT_MetaTileEntity_MultiFurnace> implements ISurvivalConstructable { +public class GT_MetaTileEntity_MultiFurnace + extends GT_MetaTileEntity_AbstractMultiFurnace<GT_MetaTileEntity_MultiFurnace> + implements ISurvivalConstructable { private int mLevel = 0; private int mCostDiscount = 1; private static final int CASING_INDEX = 11; private static final String STRUCTURE_PIECE_MAIN = "main"; - private static final IStructureDefinition<GT_MetaTileEntity_MultiFurnace> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_MultiFurnace>builder() - .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][]{ - {"ccc", "cmc", "ccc"}, - {"CCC", "C-C", "CCC",}, - {"b~b", "bbb", "bbb"} - })) - .addElement('c', ofBlock(GregTech_API.sBlockCasings1, CASING_INDEX)) - .addElement('m', Muffler.newAny(CASING_INDEX, 2)) - .addElement('C', GT_StructureUtility.ofCoil(GT_MetaTileEntity_MultiFurnace::setCoilLevel, GT_MetaTileEntity_MultiFurnace::getCoilLevel)) - .addElement('b', ofChain( - GT_StructureUtility.<GT_MetaTileEntity_MultiFurnace>buildHatchAdder() - .atLeast(Maintenance, InputBus, OutputBus, Energy) - .casingIndex(CASING_INDEX) - .dot(1) - .build(), - ofBlock(GregTech_API.sBlockCasings1, CASING_INDEX) - )) - .build(); + private static final IStructureDefinition<GT_MetaTileEntity_MultiFurnace> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_MultiFurnace>builder() + .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] { + {"ccc", "cmc", "ccc"}, + { + "CCC", "C-C", "CCC", + }, + {"b~b", "bbb", "bbb"} + })) + .addElement('c', ofBlock(GregTech_API.sBlockCasings1, CASING_INDEX)) + .addElement('m', Muffler.newAny(CASING_INDEX, 2)) + .addElement( + 'C', + GT_StructureUtility.ofCoil( + GT_MetaTileEntity_MultiFurnace::setCoilLevel, + GT_MetaTileEntity_MultiFurnace::getCoilLevel)) + .addElement( + 'b', + ofChain( + GT_StructureUtility.<GT_MetaTileEntity_MultiFurnace>buildHatchAdder() + .atLeast(Maintenance, InputBus, OutputBus, Energy) + .casingIndex(CASING_INDEX) + .dot(1) + .build(), + ofBlock(GregTech_API.sBlockCasings1, CASING_INDEX))) + .build(); public GT_MetaTileEntity_MultiFurnace(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -103,21 +112,45 @@ public class GT_MetaTileEntity_MultiFurnace extends GT_MetaTileEntity_AbstractMu } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - if (aSide != aFacing) return new ITexture[]{casingTexturePages[0][CASING_INDEX]}; - if (aActive) return new ITexture[]{ - casingTexturePages[0][CASING_INDEX], - TextureFactory.builder().addIcon(OVERLAY_FRONT_MULTI_SMELTER_ACTIVE).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_MULTI_SMELTER_ACTIVE_GLOW).extFacing().glow().build()}; - return new ITexture[]{ + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { + if (aSide != aFacing) return new ITexture[] {casingTexturePages[0][CASING_INDEX]}; + if (aActive) + return new ITexture[] { casingTexturePages[0][CASING_INDEX], - TextureFactory.builder().addIcon(OVERLAY_FRONT_MULTI_SMELTER).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_MULTI_SMELTER_GLOW).extFacing().glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_MULTI_SMELTER_ACTIVE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_MULTI_SMELTER_ACTIVE_GLOW) + .extFacing() + .glow() + .build() + }; + return new ITexture[] { + casingTexturePages[0][CASING_INDEX], + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_MULTI_SMELTER) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_MULTI_SMELTER_GLOW) + .extFacing() + .glow() + .build() + }; } @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MultiFurnace.png"); + return new GT_GUIContainer_MultiMachine( + aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MultiFurnace.png"); } @Override @@ -126,15 +159,14 @@ public class GT_MetaTileEntity_MultiFurnace extends GT_MetaTileEntity_AbstractMu } @Override - public int getPollutionPerSecond(ItemStack aStack){ + public int getPollutionPerSecond(ItemStack aStack) { return GT_Mod.gregtechproxy.mPollutionMultiSmelterPerSecond; } @Override public boolean checkRecipe(ItemStack aStack) { ArrayList<ItemStack> tInputList = getStoredInputs(); - if (tInputList.isEmpty()) - return false; + if (tInputList.isEmpty()) return false; int mVolatage = GT_Utility.safeInt(getMaxInputVoltage()); int tMaxParrallel = 8 * this.mLevel; @@ -171,16 +203,13 @@ public class GT_MetaTileEntity_MultiFurnace extends GT_MetaTileEntity_AbstractMu this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; calculateOverclockedNessMulti(4, 512, 1, mVolatage); - //In case recipe is too OP for that machine - if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) - return false; + // In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return false; - this.mEUt = GT_Utility.safeInt(((long)mEUt) * this.mLevel / (long)this.mCostDiscount,1); - if (mEUt == Integer.MAX_VALUE - 1) - return false; + this.mEUt = GT_Utility.safeInt(((long) mEUt) * this.mLevel / (long) this.mCostDiscount, 1); + if (mEUt == Integer.MAX_VALUE - 1) return false; - if (this.mEUt > 0) - this.mEUt = (-this.mEUt); + if (this.mEUt > 0) this.mEUt = (-this.mEUt); } updateSlots(); return true; @@ -192,7 +221,7 @@ public class GT_MetaTileEntity_MultiFurnace extends GT_MetaTileEntity_AbstractMu } @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack){ + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { this.mLevel = 0; this.mCostDiscount = 1; @@ -200,14 +229,11 @@ public class GT_MetaTileEntity_MultiFurnace extends GT_MetaTileEntity_AbstractMu setCoilLevel(HeatingCoilLevel.None); - if (!checkPiece(STRUCTURE_PIECE_MAIN, 1, 2, 0)) - return false; + if (!checkPiece(STRUCTURE_PIECE_MAIN, 1, 2, 0)) return false; - if (getCoilLevel() == HeatingCoilLevel.None) - return false; + if (getCoilLevel() == HeatingCoilLevel.None) return false; - if (mMaintenanceHatches.size() != 1) - return false; + if (mMaintenanceHatches.size() != 1) return false; this.mLevel = getCoilLevel().getLevel(); this.mCostDiscount = getCoilLevel().getCostDiscount(); @@ -225,49 +251,56 @@ public class GT_MetaTileEntity_MultiFurnace extends GT_MetaTileEntity_AbstractMu for (int zPos = tZ - 1; zPos <= tZ + 1; zPos++) { if ((xPos == tX) && (zPos == tZ)) continue; tUsedMeta = aBaseMetaTileEntity.getMetaID(xPos, tY + 1, zPos); - if (tUsedMeta >= 12 && tUsedMeta <= 14 && aBaseMetaTileEntity.getBlock(xPos, tY + 1, zPos) == GregTech_API.sBlockCasings1) - aBaseMetaTileEntity.getWorld().setBlock(xPos, tY + 1, zPos, GregTech_API.sBlockCasings5, tUsedMeta - 12, 3); + if (tUsedMeta >= 12 + && tUsedMeta <= 14 + && aBaseMetaTileEntity.getBlock(xPos, tY + 1, zPos) == GregTech_API.sBlockCasings1) + aBaseMetaTileEntity + .getWorld() + .setBlock(xPos, tY + 1, zPos, GregTech_API.sBlockCasings5, tUsedMeta - 12, 3); } } - @Override public String[] getInfoData() { - int mPollutionReduction=0; + int mPollutionReduction = 0; for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) if (isValidMetaTileEntity(tHatch)) mPollutionReduction = Math.max(tHatch.calculatePollutionReduction(100), mPollutionReduction); - long storedEnergy=0; - long maxEnergy=0; - for(GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) + long storedEnergy = 0; + long maxEnergy = 0; + for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) if (isValidMetaTileEntity(tHatch)) { storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU(); maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity(); } - return new String[]{ - StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mProgresstime / 20) + EnumChatFormatting.RESET + " s / " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(mMaxProgresstime / 20) + EnumChatFormatting.RESET + " s", - StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", - StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " + - EnumChatFormatting.RED + GT_Utility.formatNumbers(-mEUt) + EnumChatFormatting.RESET + " EU/t", - StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(getMaxInputVoltage()) + EnumChatFormatting.RESET + " EU/t(*2A) " + - StatCollector.translateToLocal("GT5U.machines.tier") + ": " + - EnumChatFormatting.YELLOW + VN[GT_Utility.getTier(getMaxInputVoltage())] + EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " + - EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + " " + - StatCollector.translateToLocal("GT5U.multiblock.efficiency") + ": " + - EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", - StatCollector.translateToLocal("GT5U.MS.multismelting") + ": " + - EnumChatFormatting.GREEN + mLevel * 8 + EnumChatFormatting.RESET + - " Discount: (EU/t) / " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mCostDiscount) + EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + - EnumChatFormatting.GREEN + mPollutionReduction + EnumChatFormatting.RESET + " %" + return new String[] { + StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(mProgresstime / 20) + EnumChatFormatting.RESET + " s / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(mMaxProgresstime / 20) + EnumChatFormatting.RESET + " s", + StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", + StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " + EnumChatFormatting.RED + + GT_Utility.formatNumbers(-mEUt) + EnumChatFormatting.RESET + " EU/t", + StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(getMaxInputVoltage()) + EnumChatFormatting.RESET + " EU/t(*2A) " + + StatCollector.translateToLocal("GT5U.machines.tier") + + ": " + EnumChatFormatting.YELLOW + + VN[GT_Utility.getTier(getMaxInputVoltage())] + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " + EnumChatFormatting.RED + + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + " " + + StatCollector.translateToLocal("GT5U.multiblock.efficiency") + + ": " + EnumChatFormatting.YELLOW + + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", + StatCollector.translateToLocal("GT5U.MS.multismelting") + ": " + EnumChatFormatting.GREEN + + mLevel * 8 + EnumChatFormatting.RESET + " Discount: (EU/t) / " + + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mCostDiscount) + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + EnumChatFormatting.GREEN + + mPollutionReduction + EnumChatFormatting.RESET + " %" }; } @@ -280,10 +313,10 @@ public class GT_MetaTileEntity_MultiFurnace extends GT_MetaTileEntity_AbstractMu if (aTileEntity == null) return false; IMetaTileEntity tMTE = aTileEntity.getMetaTileEntity(); if (tMTE == null) return false; - return tMTE instanceof GT_MetaTileEntity_Hatch_Energy || - tMTE instanceof GT_MetaTileEntity_Hatch_InputBus || - tMTE instanceof GT_MetaTileEntity_Hatch_OutputBus || - tMTE instanceof GT_MetaTileEntity_Hatch_Maintenance; + return tMTE instanceof GT_MetaTileEntity_Hatch_Energy + || tMTE instanceof GT_MetaTileEntity_Hatch_InputBus + || tMTE instanceof GT_MetaTileEntity_Hatch_OutputBus + || tMTE instanceof GT_MetaTileEntity_Hatch_Maintenance; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java index fe91d2cf81..dacf503128 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java @@ -1,5 +1,17 @@ package gregtech.common.tileentities.machines.multi; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; +import static gregtech.api.util.GT_StructureUtility.ofCoil; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IItemSource; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; @@ -17,56 +29,67 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; +import java.util.ArrayList; +import java.util.List; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; -import java.util.ArrayList; -import java.util.List; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER_ACTIVE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER_ACTIVE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; -import static gregtech.api.util.GT_StructureUtility.ofCoil; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_OilCracker> implements ISurvivalConstructable { +public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_OilCracker> + implements ISurvivalConstructable { private static final byte CASING_INDEX = 49; private static final String STRUCTURE_PIECE_MAIN = "main"; - private static final IStructureDefinition<GT_MetaTileEntity_OilCracker> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_OilCracker>builder() - .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][]{ - {"lcmcr", "lcmcr", "lcmcr"}, - {"lc~cr", "l---r", "lcmcr"}, - {"lcmcr", "lcmcr", "lcmcr"}, - })) - .addElement('c', ofCoil(GT_MetaTileEntity_OilCracker::setCoilLevel, GT_MetaTileEntity_OilCracker::getCoilLevel)) - .addElement('l', ofChain( // TODO figure out what to do with this - ofHatchAdder(GT_MetaTileEntity_OilCracker::addLeftHatchToMachineList, CASING_INDEX, 2), - ofHatchAdder(GT_MetaTileEntity_OilCracker::addEnergyInputToMachineList, CASING_INDEX, 1), - ofHatchAdder(GT_MetaTileEntity_OilCracker::addMaintenanceToMachineList, CASING_INDEX, 1), - onElementPass(GT_MetaTileEntity_OilCracker::onCasingAdded, ofBlock(GregTech_API.sBlockCasings4, 1)) - )) - .addElement('r', ofChain( - ofHatchAdder(GT_MetaTileEntity_OilCracker::addRightHatchToMachineList, CASING_INDEX, 3), - ofHatchAdder(GT_MetaTileEntity_OilCracker::addEnergyInputToMachineList, CASING_INDEX, 1), - ofHatchAdder(GT_MetaTileEntity_OilCracker::addMaintenanceToMachineList, CASING_INDEX, 1), - onElementPass(GT_MetaTileEntity_OilCracker::onCasingAdded, ofBlock(GregTech_API.sBlockCasings4, 1)) - )) - .addElement('m', ofChain( - ofHatchAdder(GT_MetaTileEntity_OilCracker::addMiddleInputToMachineList, CASING_INDEX, 1), - ofHatchAdder(GT_MetaTileEntity_OilCracker::addEnergyInputToMachineList, CASING_INDEX, 1), - ofHatchAdder(GT_MetaTileEntity_OilCracker::addMaintenanceToMachineList, CASING_INDEX, 1), - onElementPass(GT_MetaTileEntity_OilCracker::onCasingAdded, ofBlock(GregTech_API.sBlockCasings4, 1)) - )) - .build(); + private static final IStructureDefinition<GT_MetaTileEntity_OilCracker> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_OilCracker>builder() + .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] { + {"lcmcr", "lcmcr", "lcmcr"}, + {"lc~cr", "l---r", "lcmcr"}, + {"lcmcr", "lcmcr", "lcmcr"}, + })) + .addElement( + 'c', + ofCoil( + GT_MetaTileEntity_OilCracker::setCoilLevel, + GT_MetaTileEntity_OilCracker::getCoilLevel)) + .addElement( + 'l', + ofChain( // TODO figure out what to do with this + ofHatchAdder( + GT_MetaTileEntity_OilCracker::addLeftHatchToMachineList, CASING_INDEX, 2), + ofHatchAdder( + GT_MetaTileEntity_OilCracker::addEnergyInputToMachineList, CASING_INDEX, 1), + ofHatchAdder( + GT_MetaTileEntity_OilCracker::addMaintenanceToMachineList, CASING_INDEX, 1), + onElementPass( + GT_MetaTileEntity_OilCracker::onCasingAdded, + ofBlock(GregTech_API.sBlockCasings4, 1)))) + .addElement( + 'r', + ofChain( + ofHatchAdder( + GT_MetaTileEntity_OilCracker::addRightHatchToMachineList, CASING_INDEX, 3), + ofHatchAdder( + GT_MetaTileEntity_OilCracker::addEnergyInputToMachineList, CASING_INDEX, 1), + ofHatchAdder( + GT_MetaTileEntity_OilCracker::addMaintenanceToMachineList, CASING_INDEX, 1), + onElementPass( + GT_MetaTileEntity_OilCracker::onCasingAdded, + ofBlock(GregTech_API.sBlockCasings4, 1)))) + .addElement( + 'm', + ofChain( + ofHatchAdder( + GT_MetaTileEntity_OilCracker::addMiddleInputToMachineList, CASING_INDEX, 1), + ofHatchAdder( + GT_MetaTileEntity_OilCracker::addEnergyInputToMachineList, CASING_INDEX, 1), + ofHatchAdder( + GT_MetaTileEntity_OilCracker::addMaintenanceToMachineList, CASING_INDEX, 1), + onElementPass( + GT_MetaTileEntity_OilCracker::onCasingAdded, + ofBlock(GregTech_API.sBlockCasings4, 1)))) + .build(); private HeatingCoilLevel heatLevel; protected final List<GT_MetaTileEntity_Hatch_Input> mMiddleInputHatches = new ArrayList<>(); // 0 -> left, 1 -> right, any other -> not found @@ -103,7 +126,7 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult .addEnergyHatch("Any casing", 1) .addMaintenanceHatch("Any casing", 1) .addInputHatch("Steam/Hydrogen ONLY, Any middle ring casing", 1) - .addInputHatch("Any left/right side casing",2, 3) + .addInputHatch("Any left/right side casing", 2, 3) .addOutputHatch("Any right/left side casing", 2, 3) .addStructureInfo("Input/Output Hatches must be on opposite sides!") .addStructureHint("GT5U.cracker.io_side") @@ -112,21 +135,47 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { if (aSide == aFacing) { - if (aActive) return new ITexture[]{casingTexturePages[0][CASING_INDEX], - TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_CRACKER_ACTIVE).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_CRACKER_ACTIVE_GLOW).extFacing().glow().build()}; - return new ITexture[]{casingTexturePages[0][CASING_INDEX], - TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_CRACKER).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_CRACKER_GLOW).extFacing().glow().build()}; + if (aActive) + return new ITexture[] { + casingTexturePages[0][CASING_INDEX], + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_OIL_CRACKER_ACTIVE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_OIL_CRACKER_ACTIVE_GLOW) + .extFacing() + .glow() + .build() + }; + return new ITexture[] { + casingTexturePages[0][CASING_INDEX], + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_OIL_CRACKER) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_OIL_CRACKER_GLOW) + .extFacing() + .glow() + .build() + }; } - return new ITexture[]{casingTexturePages[0][CASING_INDEX]}; + return new ITexture[] {casingTexturePages[0][CASING_INDEX]}; } @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "OilCrackingUnit.png"); + return new GT_GUIContainer_MultiMachine( + aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "OilCrackingUnit.png"); } @Override @@ -141,37 +190,33 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult long tVoltage = getMaxInputVoltage(); byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - GT_Recipe tRecipe = getRecipeMap().findRecipe( - getBaseMetaTileEntity(), - false, - gregtech.api.enums.GT_Values.V[tTier], - tFluidInputs, - mInventory[1] - ); + GT_Recipe tRecipe = getRecipeMap() + .findRecipe( + getBaseMetaTileEntity(), + false, + gregtech.api.enums.GT_Values.V[tTier], + tFluidInputs, + mInventory[1]); - if (tRecipe == null) - return false; + if (tRecipe == null) return false; if (tRecipe.isRecipeInputEqual(true, tFluidInputs, mInventory[1])) { this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, tVoltage); - //In case recipe is too OP for that machine - if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) - return false; + // In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return false; // heatLevel.getTier() starts at 0 if (this.heatLevel.getTier() < 5) { this.mEUt *= 1 - (0.1D * (this.heatLevel.getTier() + 1)); - } - else { + } else { this.mEUt *= 0.5; } - if (this.mEUt > 0) - this.mEUt = (-this.mEUt); + if (this.mEUt > 0) this.mEUt = (-this.mEUt); - this.mOutputFluids = new FluidStack[]{tRecipe.getFluidOutput(0)}; + this.mOutputFluids = new FluidStack[] {tRecipe.getFluidOutput(0)}; return true; } return false; @@ -208,8 +253,7 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); if (aMetaTileEntity == null) return false; if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - if (mInputOnSide == 1) - return false; + if (mInputOnSide == 1) return false; mInputOnSide = 0; mOutputOnSide = 1; GT_MetaTileEntity_Hatch_Input tHatch = (GT_MetaTileEntity_Hatch_Input) aMetaTileEntity; @@ -218,8 +262,7 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult return mInputHatches.add(tHatch); } if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { - if (mOutputOnSide == 1) - return false; + if (mOutputOnSide == 1) return false; mInputOnSide = 1; mOutputOnSide = 0; GT_MetaTileEntity_Hatch_Output tHatch = (GT_MetaTileEntity_Hatch_Output) aMetaTileEntity; @@ -234,8 +277,7 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); if (aMetaTileEntity == null) return false; if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - if (mInputOnSide == 0) - return false; + if (mInputOnSide == 0) return false; mInputOnSide = 1; mOutputOnSide = 0; GT_MetaTileEntity_Hatch_Input tHatch = (GT_MetaTileEntity_Hatch_Input) aMetaTileEntity; @@ -244,8 +286,7 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult return mInputHatches.add(tHatch); } if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { - if (mOutputOnSide == 0) - return false; + if (mOutputOnSide == 0) return false; mInputOnSide = 0; mOutputOnSide = 1; GT_MetaTileEntity_Hatch_Output tHatch = (GT_MetaTileEntity_Hatch_Output) aMetaTileEntity; @@ -267,9 +308,12 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult mInputOnSide = -1; mOutputOnSide = -1; replaceDeprecatedCoils(aBaseMetaTileEntity); - return checkPiece(STRUCTURE_PIECE_MAIN, 2, 1, 0) && - mInputOnSide != -1 && mOutputOnSide != -1 && mCasingAmount >= 18 && - mMaintenanceHatches.size() == 1 && !mMiddleInputHatches.isEmpty(); + return checkPiece(STRUCTURE_PIECE_MAIN, 2, 1, 0) + && mInputOnSide != -1 + && mOutputOnSide != -1 + && mCasingAmount >= 18 + && mMaintenanceHatches.size() == 1 + && !mMiddleInputHatches.isEmpty(); } @Override @@ -306,24 +350,15 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult for (int xPos = tX - 1; xPos <= tX + 1; xPos += (xDir != 0 ? 1 : 2)) for (int yPos = tY - 1; yPos <= tY + 1; yPos++) for (int zPos = tZ - 1; zPos <= tZ + 1; zPos += (xDir != 0 ? 2 : 1)) { - if ((yPos == tY) && (xPos == tX || zPos == tZ)) - continue; + if ((yPos == tY) && (xPos == tX || zPos == tZ)) continue; byte tUsedMeta = aBaseMetaTileEntity.getMetaID(xPos, yPos, zPos); - if (tUsedMeta < 12) - continue; - if (tUsedMeta > 14) - continue; - if (aBaseMetaTileEntity.getBlock(xPos, yPos, zPos) != GregTech_API.sBlockCasings1) - continue; - - aBaseMetaTileEntity.getWorld().setBlock( - xPos, - yPos, - zPos, - GregTech_API.sBlockCasings5, - tUsedMeta - 12, - 3 - ); + if (tUsedMeta < 12) continue; + if (tUsedMeta > 14) continue; + if (aBaseMetaTileEntity.getBlock(xPos, yPos, zPos) != GregTech_API.sBlockCasings1) continue; + + aBaseMetaTileEntity + .getWorld() + .setBlock(xPos, yPos, zPos, GregTech_API.sBlockCasings5, tUsedMeta - 12, 3); } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java index 9af495bcb3..a282cb3620 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java @@ -1,5 +1,14 @@ package gregtech.common.tileentities.machines.multi; +import static gregtech.api.enums.GT_Values.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_DRILL; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_DRILL_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_DRILL_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_DRILL_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.getCasingTextureForId; +import static gregtech.common.GT_UndergroundOil.undergroundOil; +import static gregtech.common.GT_UndergroundOil.undergroundOilReadInformation; + import gregtech.api.gui.GT_GUIContainer_MultiMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -8,6 +17,9 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Utility; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; @@ -20,19 +32,6 @@ import net.minecraft.world.chunk.Chunk; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import static gregtech.api.enums.GT_Values.*; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_DRILL; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_DRILL_ACTIVE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_DRILL_ACTIVE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_DRILL_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.getCasingTextureForId; -import static gregtech.common.GT_UndergroundOil.undergroundOil; -import static gregtech.common.GT_UndergroundOil.undergroundOilReadInformation; - public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_DrillerBase { private final ArrayList<Chunk> mOilFieldChunks = new ArrayList<>(); private int mOilId = 0; @@ -49,18 +48,41 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { if (aSide == aFacing) { - if (aActive) return new ITexture[]{ - getCasingTextureForId(casingTextureIndex), - TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_DRILL_ACTIVE).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_DRILL_ACTIVE_GLOW).extFacing().glow().build()}; - return new ITexture[]{ + if (aActive) + return new ITexture[] { getCasingTextureForId(casingTextureIndex), - TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_DRILL).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_DRILL_GLOW).extFacing().glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_OIL_DRILL_ACTIVE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_OIL_DRILL_ACTIVE_GLOW) + .extFacing() + .glow() + .build() + }; + return new ITexture[] { + getCasingTextureForId(casingTextureIndex), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_OIL_DRILL) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_OIL_DRILL_GLOW) + .extFacing() + .glow() + .build() + }; } - return new ITexture[]{getCasingTextureForId(casingTextureIndex)}; + return new ITexture[] {getCasingTextureForId(casingTextureIndex)}; } @Override @@ -74,8 +96,7 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D public void loadNBTData(NBTTagCompound aNBT) { super.loadNBTData(aNBT); mOilId = aNBT.getInteger("mOilId"); - if (aNBT.hasKey("chunkRangeConfig")) - chunkRangeConfig = aNBT.getInteger("chunkRangeConfig"); + if (aNBT.hasKey("chunkRangeConfig")) chunkRangeConfig = aNBT.getInteger("chunkRangeConfig"); } protected GT_Multiblock_Tooltip_Builder createTooltip(String tierSuffix) { @@ -83,11 +104,14 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); tt.addMachineType("Pump") - .addInfo("Controller Block for the Oil/Gas/Fluid Drilling Rig " + (tierSuffix != null ? tierSuffix : "")) + .addInfo( + "Controller Block for the Oil/Gas/Fluid Drilling Rig " + (tierSuffix != null ? tierSuffix : "")) .addInfo("Works on " + getRangeInChunks() + "x" + getRangeInChunks() + " chunks") .addInfo("Use a Screwdriver to configure range") .addInfo("Use Programmed Circuits to ignore near exhausted oil field") - .addInfo("If total circuit # is greater than output amount it will halt. If it worked right.")//doesn't work + .addInfo( + "If total circuit # is greater than output amount it will halt. If it worked right.") // doesn't + // work .addSeparator() .beginStructureBlock(3, 7, 3, false) .addController("Front bottom") @@ -102,10 +126,10 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D return tt; } - @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "DrillingRig.png"); + return new GT_GUIContainer_MultiMachine( + aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "DrillingRig.png"); } protected abstract int getRangeInChunks(); @@ -118,17 +142,19 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D if (chunkRangeConfig > 0) { chunkRangeConfig--; } - if (chunkRangeConfig == 0) - chunkRangeConfig = getRangeInChunks(); + if (chunkRangeConfig == 0) chunkRangeConfig = getRangeInChunks(); } else { if (chunkRangeConfig <= getRangeInChunks()) { chunkRangeConfig++; } - if (chunkRangeConfig > getRangeInChunks()) - chunkRangeConfig = 1; + if (chunkRangeConfig > getRangeInChunks()) chunkRangeConfig = 1; } if (oldChunkRange != chunkRangeConfig) mOilFieldChunks.clear(); - GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("GT5U.machines.workareaset") + " " + chunkRangeConfig + "x" + chunkRangeConfig + StatCollector.translateToLocal("GT5U.machines.chunks"));//TODO Add translation support + GT_Utility.sendChatToPlayer( + aPlayer, + StatCollector.translateToLocal("GT5U.machines.workareaset") + " " + chunkRangeConfig + "x" + + chunkRangeConfig + + StatCollector.translateToLocal("GT5U.machines.chunks")); // TODO Add translation support } @Override @@ -141,23 +167,30 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D this.mEfficiency = getCurrentEfficiency(null); this.mEfficiencyIncrease = 10000; int tier = Math.max(0, GT_Utility.getTier(getMaxInputVoltage())); - this.mEUt = -7 << (tier << 1);//(1/4) A of current tier when at bottom (7/8) A of current tier while mining - this.mMaxProgresstime = Math.max(1, - (workState == STATE_AT_BOTTOM ? - (64 * (chunkRangeConfig * chunkRangeConfig))>>(getMinTier()-1) : - 120 - ) >> tier); + this.mEUt = -7 << (tier << 1); // (1/4) A of current tier when at bottom (7/8) A of current tier while mining + this.mMaxProgresstime = Math.max( + 1, + (workState == STATE_AT_BOTTOM + ? (64 * (chunkRangeConfig * chunkRangeConfig)) >> (getMinTier() - 1) + : 120) + >> tier); } - protected float computeSpeed(){ - return .5F+(GT_Utility.getTier(getMaxInputVoltage()) - getMinTier()) *.25F; + protected float computeSpeed() { + return .5F + (GT_Utility.getTier(getMaxInputVoltage()) - getMinTier()) * .25F; } @Override - protected boolean workingAtBottom(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) { + protected boolean workingAtBottom( + ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) { switch (tryLowerPipeState(true)) { - case 0: workState = STATE_DOWNWARD; setElectricityStats(); return true; - case 3: workState = STATE_UPWARD; return true; + case 0: + workState = STATE_DOWNWARD; + setElectricityStats(); + return true; + case 3: + workState = STATE_UPWARD; + return true; } if (reachingVoidOrBedrock() && tryFillChunkList()) { @@ -168,17 +201,17 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D } float speed = computeSpeed(); FluidStack tFluid = pumpOil(speed); - if (tFluid != null && tFluid.amount > getTotalConfigValue()){ - this.mOutputFluids = new FluidStack[]{tFluid}; + if (tFluid != null && tFluid.amount > getTotalConfigValue()) { + this.mOutputFluids = new FluidStack[] {tFluid}; return true; } } - GT_ChunkManager.releaseTicket((TileEntity)getBaseMetaTileEntity()); + GT_ChunkManager.releaseTicket((TileEntity) getBaseMetaTileEntity()); workState = STATE_UPWARD; return true; } - private boolean tryFillChunkList(){ + private boolean tryFillChunkList() { FluidStack tFluid, tOil; if (mOilId <= 0) { tFluid = undergroundOilReadInformation(getBaseMetaTileEntity()); @@ -186,95 +219,80 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D mOilId = tFluid.getFluidID(); } if (debugDriller) { - GT_Log.out.println( - " Driller on fluid = " + mOilId - ); + GT_Log.out.println(" Driller on fluid = " + mOilId); } tOil = new FluidStack(FluidRegistry.getFluid(mOilId), 0); if (mOilFieldChunks.isEmpty()) { - Chunk tChunk = getBaseMetaTileEntity().getWorld().getChunkFromBlockCoords(getBaseMetaTileEntity().getXCoord(), getBaseMetaTileEntity().getZCoord()); + Chunk tChunk = getBaseMetaTileEntity() + .getWorld() + .getChunkFromBlockCoords( + getBaseMetaTileEntity().getXCoord(), + getBaseMetaTileEntity().getZCoord()); int range = chunkRangeConfig; - int xChunk = Math.floorDiv(tChunk.xPosition,range) * range; //Java was written by idiots. For negative values, / returns rounded towards zero. Fucking morons. - int zChunk = Math.floorDiv(tChunk.zPosition,range) * range; + int xChunk = Math.floorDiv(tChunk.xPosition, range) + * range; // Java was written by idiots. For negative values, / returns rounded towards zero. + // Fucking morons. + int zChunk = Math.floorDiv(tChunk.zPosition, range) * range; if (debugDriller) { - GT_Log.out.println( - "tChunk.xPosition = " + tChunk.xPosition + - " tChunk.zPosition = " + tChunk.zPosition + - " xChunk = " + xChunk + - " zChunk = " + zChunk - ); + GT_Log.out.println("tChunk.xPosition = " + tChunk.xPosition + " tChunk.zPosition = " + + tChunk.zPosition + " xChunk = " + + xChunk + " zChunk = " + + zChunk); } for (int i = 0; i < range; i++) { for (int j = 0; j < range; j++) { if (debugDriller) { - GT_Log.out.println( - " getChunkX = " + (xChunk + i) + - " getChunkZ = " + (zChunk + j) - ); + GT_Log.out.println(" getChunkX = " + (xChunk + i) + " getChunkZ = " + (zChunk + j)); } tChunk = getBaseMetaTileEntity().getWorld().getChunkFromChunkCoords(xChunk + i, zChunk + j); tFluid = undergroundOilReadInformation(tChunk); if (debugDriller) { GT_Log.out.println( - " Fluid in chunk = " + tFluid.getFluid().getID() - ); + " Fluid in chunk = " + tFluid.getFluid().getID()); } if (tOil.isFluidEqual(tFluid) && tFluid.amount > 0) { mOilFieldChunks.add(tChunk); if (debugDriller) { - GT_Log.out.println( - " Matching fluid, quantity = " + tFluid.amount - ); + GT_Log.out.println(" Matching fluid, quantity = " + tFluid.amount); } } } } } if (debugDriller) { - GT_Log.out.println( - "mOilFieldChunks.size = " + mOilFieldChunks.size() - ); + GT_Log.out.println("mOilFieldChunks.size = " + mOilFieldChunks.size()); } return !mOilFieldChunks.isEmpty(); } - protected FluidStack pumpOil(float speed){ + protected FluidStack pumpOil(float speed) { if (mOilId <= 0) return null; FluidStack tFluid, tOil; tOil = new FluidStack(FluidRegistry.getFluid(mOilId), 0); if (debugDriller) { - GT_Log.out.println( - " pump speed = " + speed - ); + GT_Log.out.println(" pump speed = " + speed); } ArrayList<Chunk> emptyChunks = new ArrayList<>(); for (Chunk tChunk : mOilFieldChunks) { - tFluid = undergroundOil(tChunk,speed); + tFluid = undergroundOil(tChunk, speed); if (debugDriller) { - GT_Log.out.println( - " chunkX = " + tChunk.getChunkCoordIntPair().chunkXPos + - " chunkZ = " + tChunk.getChunkCoordIntPair().chunkZPos - ); - if( tFluid != null ) { - GT_Log.out.println( - " Fluid pumped = " + tFluid.amount - ); + GT_Log.out.println(" chunkX = " + tChunk.getChunkCoordIntPair().chunkXPos + " chunkZ = " + + tChunk.getChunkCoordIntPair().chunkZPos); + if (tFluid != null) { + GT_Log.out.println(" Fluid pumped = " + tFluid.amount); } else { - GT_Log.out.println( - " No fluid pumped " - ); + GT_Log.out.println(" No fluid pumped "); } - } - if (tFluid == null || tFluid.amount<1) emptyChunks.add(tChunk); + if (tFluid == null || tFluid.amount < 1) emptyChunks.add(tChunk); if (tOil.isFluidEqual(tFluid)) tOil.amount += tFluid.amount; } - for( Chunk tChunk : emptyChunks) { - mOilFieldChunks.remove( tChunk ); + for (Chunk tChunk : emptyChunks) { + mOilFieldChunks.remove(tChunk); } mOilFlow = tOil.amount; return tOil.amount == 0 ? null : tOil; @@ -282,11 +300,18 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D @Override public String[] getInfoData() { - List<String> l = new ArrayList<>(Arrays.asList(EnumChatFormatting.BLUE + StatCollector.translateToLocal("GT5U.machines.oilfluidpump") + EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.machines.workarea") + ": " + EnumChatFormatting.GREEN + (chunkRangeConfig) + " x " + (chunkRangeConfig) + - EnumChatFormatting.RESET + " " + StatCollector.translateToLocal("GT5U.machines.chunks"), - "Drilling fluid: " + EnumChatFormatting.GREEN + (mOilId > 0 ? FluidRegistry.getFluid(mOilId).getName() : "None") + EnumChatFormatting.RESET, - "Drilling flow: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.mMaxProgresstime > 0 ? (mOilFlow / this.mMaxProgresstime) : 0) + EnumChatFormatting.RESET + " L/t")); + List<String> l = new ArrayList<>(Arrays.asList( + EnumChatFormatting.BLUE + + StatCollector.translateToLocal("GT5U.machines.oilfluidpump") + + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.machines.workarea") + ": " + EnumChatFormatting.GREEN + + (chunkRangeConfig) + " x " + (chunkRangeConfig) + EnumChatFormatting.RESET + " " + + StatCollector.translateToLocal("GT5U.machines.chunks"), + "Drilling fluid: " + EnumChatFormatting.GREEN + + (mOilId > 0 ? FluidRegistry.getFluid(mOilId).getName() : "None") + EnumChatFormatting.RESET, + "Drilling flow: " + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(this.mMaxProgresstime > 0 ? (mOilFlow / this.mMaxProgresstime) : 0) + + EnumChatFormatting.RESET + " L/t")); l.addAll(Arrays.asList(super.getInfoData())); return l.toArray(new String[0]); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillInfinite.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillInfinite.java index 5eb5333045..6fa7c00f0f 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillInfinite.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillInfinite.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.machines.multi; +import static gregtech.api.enums.GT_Values.VN; + import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -8,9 +10,7 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Utility; import net.minecraftforge.fluids.FluidStack; -import static gregtech.api.enums.GT_Values.VN; - -public class GT_MetaTileEntity_OilDrillInfinite extends GT_MetaTileEntity_OilDrillBase{ +public class GT_MetaTileEntity_OilDrillInfinite extends GT_MetaTileEntity_OilDrillBase { public GT_MetaTileEntity_OilDrillInfinite(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } @@ -47,7 +47,7 @@ public class GT_MetaTileEntity_OilDrillInfinite extends GT_MetaTileEntity_OilDri } @Override - protected FluidStack pumpOil(float speed){ + protected FluidStack pumpOil(float speed) { return super.pumpOil(-speed); } @@ -72,8 +72,8 @@ public class GT_MetaTileEntity_OilDrillInfinite extends GT_MetaTileEntity_OilDri } @Override - protected float computeSpeed(){ - return .5F+(GT_Utility.getTier(getMaxInputVoltage()) - getMinTier()+5) *.25F; + protected float computeSpeed() { + return .5F + (GT_Utility.getTier(getMaxInputVoltage()) - getMinTier() + 5) * .25F; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant1.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant1.java index ac3e40c5f5..859f826320 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant1.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant1.java @@ -9,12 +9,12 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; public class GT_MetaTileEntity_OreDrillingPlant1 extends GT_MetaTileEntity_OreDrillingPlantBase { public GT_MetaTileEntity_OreDrillingPlant1(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); - mTier=1; + mTier = 1; } public GT_MetaTileEntity_OreDrillingPlant1(String aName) { super(aName); - mTier=1; + mTier = 1; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant2.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant2.java index bf9c628911..e178bdab83 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant2.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant2.java @@ -9,12 +9,12 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; public class GT_MetaTileEntity_OreDrillingPlant2 extends GT_MetaTileEntity_OreDrillingPlantBase { public GT_MetaTileEntity_OreDrillingPlant2(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); - mTier=2; + mTier = 2; } public GT_MetaTileEntity_OreDrillingPlant2(String aName) { super(aName); - mTier=2; + mTier = 2; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant3.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant3.java index 411bbef3a7..b8ac96a8a7 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant3.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant3.java @@ -9,12 +9,12 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; public class GT_MetaTileEntity_OreDrillingPlant3 extends GT_MetaTileEntity_OreDrillingPlantBase { public GT_MetaTileEntity_OreDrillingPlant3(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); - mTier=3; + mTier = 3; } public GT_MetaTileEntity_OreDrillingPlant3(String aName) { super(aName); - mTier=3; + mTier = 3; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant4.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant4.java index d7daea327c..e4a3da16ac 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant4.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant4.java @@ -9,12 +9,12 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; public class GT_MetaTileEntity_OreDrillingPlant4 extends GT_MetaTileEntity_OreDrillingPlantBase { public GT_MetaTileEntity_OreDrillingPlant4(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); - mTier=4; + mTier = 4; } public GT_MetaTileEntity_OreDrillingPlant4(String aName) { super(aName); - mTier=4; + mTier = 4; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java index 188525c7c9..5116d453fc 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.machines.multi; +import static gregtech.api.enums.GT_Values.VN; + import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; @@ -13,7 +15,10 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gregtech.common.blocks.GT_Block_Ores_Abstract; import gregtech.common.blocks.GT_TileEntity_Ores; - +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; @@ -26,13 +31,6 @@ import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.world.ChunkPosition; import net.minecraftforge.fluids.FluidStack; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.HashSet; - -import static gregtech.api.enums.GT_Values.VN; - public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTileEntity_DrillerBase { private final ArrayList<ChunkPosition> oreBlockPositions = new ArrayList<>(); protected int mTier = 1; @@ -67,7 +65,8 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "OreDrillingPlant.png"); + return new GT_GUIContainer_MultiMachine( + aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "OreDrillingPlant.png"); } @Override @@ -77,29 +76,31 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile if (chunkRadiusConfig > 0) { chunkRadiusConfig--; } - if (chunkRadiusConfig == 0) - chunkRadiusConfig = getRadiusInChunks(); + if (chunkRadiusConfig == 0) chunkRadiusConfig = getRadiusInChunks(); } else { if (chunkRadiusConfig <= getRadiusInChunks()) { chunkRadiusConfig++; } - if (chunkRadiusConfig > getRadiusInChunks()) - chunkRadiusConfig = 1; + if (chunkRadiusConfig > getRadiusInChunks()) chunkRadiusConfig = 1; } - GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("GT5U.machines.workareaset") + " " + (chunkRadiusConfig << 4) + " " + StatCollector.translateToLocal("GT5U.machines.radius")); + GT_Utility.sendChatToPlayer( + aPlayer, + StatCollector.translateToLocal("GT5U.machines.workareaset") + " " + (chunkRadiusConfig << 4) + " " + + StatCollector.translateToLocal("GT5U.machines.radius")); } @Override - public boolean onWireCutterRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public boolean onWireCutterRightClick( + byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { replaceWithCobblestone = !replaceWithCobblestone; GT_Utility.sendChatToPlayer(aPlayer, "Replace with cobblestone " + replaceWithCobblestone); return true; } @Override - protected boolean workingDownward(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) { - if (yHead != oldYHead) - oreBlockPositions.clear(); + protected boolean workingDownward( + ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) { + if (yHead != oldYHead) oreBlockPositions.clear(); if (mWorkChunkNeedsReload && mChunkLoadingEnabled) { // ask to load machine itself GT_ChunkManager.requestChunkLoad((TileEntity) getBaseMetaTileEntity(), null); @@ -108,16 +109,23 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile fillMineListIfEmpty(xDrill, yDrill, zDrill, xPipe, zPipe, yHead); if (oreBlockPositions.isEmpty()) { switch (tryLowerPipeState()) { - case 2: mMaxProgresstime = 0; return false; - case 3: workState = STATE_UPWARD; return true; - case 1: workState = STATE_AT_BOTTOM; return true; + case 2: + mMaxProgresstime = 0; + return false; + case 3: + workState = STATE_UPWARD; + return true; + case 1: + workState = STATE_AT_BOTTOM; + return true; } - //new layer - fill again + // new layer - fill again fillMineListIfEmpty(xDrill, yDrill, zDrill, xPipe, zPipe, yHead); } return processOreList(); } - private boolean processOreList(){ + + private boolean processOreList() { ChunkPosition oreBlockPos = null; int x = 0, y = 0, z = 0; Block oreBlock = null; @@ -147,16 +155,22 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile Collection<ItemStack> oreBlockDrops = getBlockDrops(oreBlock, x, y, z); ItemStack cobble = GT_Utility.getCobbleForOre(oreBlock, metaData); if (replaceWithCobblestone) { - getBaseMetaTileEntity().getWorld().setBlock(x, y, z, Block.getBlockFromItem(cobble.getItem()), cobble.getItemDamage(), 3); + getBaseMetaTileEntity() + .getWorld() + .setBlock(x, y, z, Block.getBlockFromItem(cobble.getItem()), cobble.getItemDamage(), 3); } else { - getBaseMetaTileEntity().getWorld().setBlockToAir(oreBlockPos.chunkPosX, oreBlockPos.chunkPosY, oreBlockPos.chunkPosZ); + getBaseMetaTileEntity() + .getWorld() + .setBlockToAir(oreBlockPos.chunkPosX, oreBlockPos.chunkPosY, oreBlockPos.chunkPosZ); } mOutputItems = getOutputByDrops(oreBlockDrops); } return true; } + @Override - protected boolean workingAtBottom(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) { + protected boolean workingAtBottom( + ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) { if (!mChunkLoadingEnabled) return super.workingAtBottom(aStack, xDrill, yDrill, zDrill, xPipe, zPipe, yHead, oldYHead); @@ -166,16 +180,15 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile } if (mWorkChunkNeedsReload) { - GT_ChunkManager.requestChunkLoad((TileEntity)getBaseMetaTileEntity(), mCurrentChunk); + GT_ChunkManager.requestChunkLoad((TileEntity) getBaseMetaTileEntity(), mCurrentChunk); mWorkChunkNeedsReload = false; return true; } - if (oreBlockPositions.isEmpty()){ + if (oreBlockPositions.isEmpty()) { fillChunkMineList(yHead, yDrill); if (oreBlockPositions.isEmpty()) { - GT_ChunkManager.releaseChunk((TileEntity)getBaseMetaTileEntity(), mCurrentChunk); - if (!moveToNextChunk(xDrill >> 4, zDrill >> 4)) - workState = STATE_UPWARD; + GT_ChunkManager.releaseChunk((TileEntity) getBaseMetaTileEntity(), mCurrentChunk); + if (!moveToNextChunk(xDrill >> 4, zDrill >> 4)) workState = STATE_UPWARD; return true; } } @@ -188,24 +201,24 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile // use corner closest to the drill as mining area center final int leftRight = (getXDrill() - (centerX << 4)) < 8 ? 0 : 1; final int topBottom = (getZDrill() - (centerZ << 4)) < 8 ? 0 : 1; - mCurrentChunk = new ChunkCoordIntPair(centerX - chunkRadiusConfig + leftRight, centerZ - chunkRadiusConfig + topBottom); - GT_ChunkManager.requestChunkLoad((TileEntity)getBaseMetaTileEntity(), mCurrentChunk); + mCurrentChunk = + new ChunkCoordIntPair(centerX - chunkRadiusConfig + leftRight, centerZ - chunkRadiusConfig + topBottom); + GT_ChunkManager.requestChunkLoad((TileEntity) getBaseMetaTileEntity(), mCurrentChunk); mWorkChunkNeedsReload = false; } @Override - protected boolean workingUpward(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) { + protected boolean workingUpward( + ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) { if (!mChunkLoadingEnabled || oreBlockPositions.isEmpty()) return super.workingUpward(aStack, xDrill, yDrill, zDrill, xPipe, zPipe, yHead, oldYHead); boolean result = processOreList(); - if (oreBlockPositions.isEmpty()) - GT_ChunkManager.releaseTicket((TileEntity)getBaseMetaTileEntity()); + if (oreBlockPositions.isEmpty()) GT_ChunkManager.releaseTicket((TileEntity) getBaseMetaTileEntity()); return result; } - private boolean moveToNextChunk(int centerX, int centerZ){ - if (mCurrentChunk == null) - return false; + private boolean moveToNextChunk(int centerX, int centerZ) { + if (mCurrentChunk == null) return false; // use corner closest to the drill as mining area center final int left = centerX - chunkRadiusConfig + ((getXDrill() - (centerX << 4)) < 8 ? 0 : 1); final int right = left + chunkRadiusConfig * 2; @@ -234,13 +247,17 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile return false; } mCurrentChunk = new ChunkCoordIntPair(nextChunkX, nextChunkZ); - GT_ChunkManager.requestChunkLoad((TileEntity)getBaseMetaTileEntity(), new ChunkCoordIntPair(nextChunkX, nextChunkZ)); + GT_ChunkManager.requestChunkLoad( + (TileEntity) getBaseMetaTileEntity(), new ChunkCoordIntPair(nextChunkX, nextChunkZ)); return true; } @Override - protected boolean checkHatches(){ - return !mMaintenanceHatches.isEmpty() && !mInputHatches.isEmpty() && !mOutputBusses.isEmpty() && !mEnergyHatches.isEmpty(); + protected boolean checkHatches() { + return !mMaintenanceHatches.isEmpty() + && !mInputHatches.isEmpty() + && !mOutputBusses.isEmpty() + && !mEnergyHatches.isEmpty(); } @Override @@ -249,7 +266,9 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile this.mEfficiencyIncrease = 10000; int tier = Math.max(1, GT_Utility.getTier(getMaxInputVoltage())); this.mEUt = -3 * (1 << (tier << 1)); - this.mMaxProgresstime = ((workState == STATE_DOWNWARD || workState == STATE_AT_BOTTOM) ? getBaseProgressTime() : 80) / (1 <<tier); + this.mMaxProgresstime = + ((workState == STATE_DOWNWARD || workState == STATE_AT_BOTTOM) ? getBaseProgressTime() : 80) + / (1 << tier); this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); } @@ -261,7 +280,8 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile outputItems.add(multiplyStackSize(currentItem)); return; } - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes.findRecipe(getBaseMetaTileEntity(), false, voltage, null, currentItem); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes.findRecipe( + getBaseMetaTileEntity(), false, voltage, null, currentItem); if (tRecipe == null) { outputItems.add(currentItem); return; @@ -280,14 +300,14 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile ItemData itemData = GT_OreDictUnificator.getItemData(currentItem); return itemData == null || itemData.mPrefix != OrePrefixes.crushed - && itemData.mPrefix != OrePrefixes.dustImpure - && itemData.mPrefix != OrePrefixes.dust - && itemData.mPrefix != OrePrefixes.gem - && itemData.mPrefix != OrePrefixes.gemChipped - && itemData.mPrefix != OrePrefixes.gemExquisite - && itemData.mPrefix != OrePrefixes.gemFlawed - && itemData.mPrefix != OrePrefixes.gemFlawless - && itemData.mMaterial.mMaterial != Materials.Oilsands; + && itemData.mPrefix != OrePrefixes.dustImpure + && itemData.mPrefix != OrePrefixes.dust + && itemData.mPrefix != OrePrefixes.gem + && itemData.mPrefix != OrePrefixes.gemChipped + && itemData.mPrefix != OrePrefixes.gemExquisite + && itemData.mPrefix != OrePrefixes.gemFlawed + && itemData.mPrefix != OrePrefixes.gemFlawless + && itemData.mMaterial.mMaterial != Materials.Oilsands; } private ItemStack multiplyStackSize(ItemStack itemStack) { @@ -299,8 +319,7 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile final int blockMeta = getBaseMetaTileEntity().getMetaID(posX, posY, posZ); if (oreBlock.canSilkHarvest(getBaseMetaTileEntity().getWorld(), null, posX, posY, posZ, blockMeta)) { return Collections.singleton(new ItemStack(oreBlock, 1, blockMeta)); - } else - return oreBlock.getDrops(getBaseMetaTileEntity().getWorld(), posX, posY, posZ, blockMeta, mTier + 3); + } else return oreBlock.getDrops(getBaseMetaTileEntity().getWorld(), posX, posY, posZ, blockMeta, mTier + 3); } private boolean tryConsumeDrillingFluid() { @@ -312,32 +331,26 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile } private void fillChunkMineList(int yHead, int yDrill) { - if (mCurrentChunk == null || !oreBlockPositions.isEmpty()) - return; + if (mCurrentChunk == null || !oreBlockPositions.isEmpty()) return; final int minX = mCurrentChunk.chunkXPos << 4; final int maxX = minX + 16; final int minZ = mCurrentChunk.chunkZPos << 4; final int maxZ = minZ + 16; for (int x = minX; x < maxX; ++x) - for (int z = minZ; z < maxZ; ++z) - for (int y = yHead; y < yDrill; ++y) - tryAddOreBlockToMineList(x, y, z); + for (int z = minZ; z < maxZ; ++z) for (int y = yHead; y < yDrill; ++y) tryAddOreBlockToMineList(x, y, z); } private void fillMineListIfEmpty(int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead) { - if (!oreBlockPositions.isEmpty()) - return; + if (!oreBlockPositions.isEmpty()) return; tryAddOreBlockToMineList(xPipe, yHead - 1, zPipe); - if (yHead == yDrill) - return; //skip controller block layer + if (yHead == yDrill) return; // skip controller block layer if (mChunkLoadingEnabled) { int startX = (xDrill >> 4) << 4; int startZ = (zDrill >> 4) << 4; for (int x = startX; x < (startX + 16); ++x) - for (int z = startZ; z < (startZ + 16); ++z) - tryAddOreBlockToMineList(x, yHead, z); + for (int z = startZ; z < (startZ + 16); ++z) tryAddOreBlockToMineList(x, yHead, z); } else { int radius = chunkRadiusConfig << 4; for (int xOff = -radius; xOff <= radius; xOff++) @@ -355,8 +368,7 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntity(x, y, z); if (tTileEntity instanceof GT_TileEntity_Ores && ((GT_TileEntity_Ores) tTileEntity).mNatural) oreBlockPositions.add(blockPos); - } else if (GT_Utility.isOre(block, blockMeta)) - oreBlockPositions.add(blockPos); + } else if (GT_Utility.isOre(block, blockMeta)) oreBlockPositions.add(blockPos); } } @@ -368,37 +380,39 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile String casings = getCasingBlockItem().get(0).getDisplayName(); final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Miner") - .addInfo("Controller Block for the Ore Drilling Plant " + (tierSuffix != null ? tierSuffix : "")) - .addInfo("Use a Screwdriver to configure block radius") - .addInfo("Maximum radius is " + (getRadiusInChunks() << 4) + " blocks") - .addInfo("Use Soldering iron to turn off chunk mode") - .addInfo("Use Wire Cutter to toggle replacing mined blocks with cobblestone") - .addInfo("In chunk mode, working area center is the chunk corner nearest to the drill") - .addInfo("Gives ~3x as much crushed ore vs normal processing") - .addInfo("Fortune bonus of " + (mTier + 3) + ". Only works on small ores") - .addSeparator() - .beginStructureBlock(3, 7, 3, false) - .addController("Front bottom") - .addOtherStructurePart(casings, "form the 3x1x3 Base") - .addOtherStructurePart(casings, "1x3x1 pillar above the center of the base (2 minimum total)") - .addOtherStructurePart(getFrameMaterial().mName + " Frame Boxes", "Each pillar's side and 1x3x1 on top") - .addEnergyHatch(VN[getMinTier()] + "+, Any base casing", 1) - .addMaintenanceHatch("Any base casing", 1) - .addInputBus("Mining Pipes, optional, any base casing", 1) - .addInputHatch("Drilling Fluid, any base casing", 1) - .addOutputBus("Any base casing", 1) - .toolTipFinisher("Gregtech"); - return tt; + tt.addMachineType("Miner") + .addInfo("Controller Block for the Ore Drilling Plant " + (tierSuffix != null ? tierSuffix : "")) + .addInfo("Use a Screwdriver to configure block radius") + .addInfo("Maximum radius is " + (getRadiusInChunks() << 4) + " blocks") + .addInfo("Use Soldering iron to turn off chunk mode") + .addInfo("Use Wire Cutter to toggle replacing mined blocks with cobblestone") + .addInfo("In chunk mode, working area center is the chunk corner nearest to the drill") + .addInfo("Gives ~3x as much crushed ore vs normal processing") + .addInfo("Fortune bonus of " + (mTier + 3) + ". Only works on small ores") + .addSeparator() + .beginStructureBlock(3, 7, 3, false) + .addController("Front bottom") + .addOtherStructurePart(casings, "form the 3x1x3 Base") + .addOtherStructurePart(casings, "1x3x1 pillar above the center of the base (2 minimum total)") + .addOtherStructurePart(getFrameMaterial().mName + " Frame Boxes", "Each pillar's side and 1x3x1 on top") + .addEnergyHatch(VN[getMinTier()] + "+, Any base casing", 1) + .addMaintenanceHatch("Any base casing", 1) + .addInputBus("Mining Pipes, optional, any base casing", 1) + .addInputHatch("Drilling Fluid, any base casing", 1) + .addOutputBus("Any base casing", 1) + .toolTipFinisher("Gregtech"); + return tt; } @Override public String[] getInfoData() { final int diameter = chunkRadiusConfig * 2; - return new String[]{ - EnumChatFormatting.BLUE+StatCollector.translateToLocal("GT5U.machines.minermulti")+EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.machines.workarea")+": " + EnumChatFormatting.GREEN + diameter + "x" + diameter + - EnumChatFormatting.RESET+" " + StatCollector.translateToLocal("GT5U.machines.chunks") + return new String[] { + EnumChatFormatting.BLUE + + StatCollector.translateToLocal("GT5U.machines.minermulti") + + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.machines.workarea") + ": " + EnumChatFormatting.GREEN + diameter + "x" + + diameter + EnumChatFormatting.RESET + " " + StatCollector.translateToLocal("GT5U.machines.chunks") }; } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java index 10b1b3eec8..210d1bfe05 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java @@ -1,6 +1,13 @@ package gregtech.common.tileentities.machines.multi; -import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.enums.GT_HatchElement.*; +import static gregtech.api.enums.GT_Values.*; +import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; +import static gregtech.api.util.GT_StructureUtility.ofCoil; +import static java.lang.Math.*; + import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IItemSource; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; @@ -20,6 +27,8 @@ import gregtech.api.util.GT_ExoticEnergyInputHelper; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; +import java.util.ArrayList; +import java.util.List; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; @@ -30,20 +39,8 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.ChunkCoordIntPair; import net.minecraftforge.fluids.FluidStack; -import java.util.List; -import java.util.ArrayList; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.enums.GT_HatchElement.*; -import static gregtech.api.enums.GT_Values.*; -import static gregtech.api.enums.Textures.BlockIcons.*; -import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; -import static gregtech.api.util.GT_StructureUtility.ofCoil; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; -import static java.lang.Math.*; - - -public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMultiFurnace<GT_MetaTileEntity_PlasmaForge> implements ISurvivalConstructable { +public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMultiFurnace<GT_MetaTileEntity_PlasmaForge> + implements ISurvivalConstructable { // 3600 seconds in an hour, 8 hours, 20 ticks in a second. private static final double max_efficiency_time_in_ticks = 3600d * 8d * 20d; @@ -76,45 +73,868 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul // Custom long EU per tick value given that mEUt is an int. Required to overclock beyond MAX voltage. private long EU_per_tick = 0; - @SuppressWarnings("SpellCheckingInspection") private static final String[][] structure_string = new String[][] { - {" ", " N N N N ", " N N N N ", " N N N N ", " ", " ", " ", " N N N N ", " N N N N ", " NNN NNN N N NNN NNN ", " ", " ", " ", " NNN NNN NNN NNN ", " ", " ", " ", " ", " ", " NNN NNN NNN NNN ", " ", " ", " ", " NNN NNN NNN NNN "}, - {" N N N N ", " bCCCb bCCCb ", " bCCCb bCCCb ", " bCCCb bCCCb ", " N N N N ", " ", " N N N N ", " bCCCb bCCCb ", " bCCCb bCCCb ", "NbbbN NbbNCCCb bCCCNbbN NbbbN", " CCC CCC N N CCC CCC ", " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", "NbbbN NbbbN NbbbN NbbbN", " N N N N ", " N N N N ", " ", " N N N N ", " N N N N ", "NbbbN NbbbN NbbbN NbbbN", " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", "NbbbN NbbbN N N NbbbN NbbbN",}, - {" N N N N ", " bCCCb bCCCb ", " NNNbbbbbNNsNNbbbbbNNN ", " ss bCCCb bCCCb ss ", " s N N N N s ", " s s ", " N N N N N N ", " N bCCCb bCCCb N ", " N sbbbbbNNsNNbbbbbs N ", "NbbbN NbbNCCCb bCCCNbbN NbbbN", " CbC CbC N N CbC CbC ", " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", "NbbbN NbbbN NbbbN NbbbN", " NNN NNN NNN NNN ", " NNN NNN NNN NNN ", " s s s s ", " NNN NNN NNN NNN ", " NNN NNN NNN NNN ", "NbbbN NbbbN NbbbN NbbbN", " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", "NbbbN NbbbNNNNNsNsNNNNNbbbN NbbbN",}, - {" N N N N ", " bCCCb bCCCb ", " ss bCCCb bCCCb ss ", " bCCCb bCCCb ", " s NCCCN NCCCN s ", " s NCCCN NCCCN s ", " NCCCN NCCCN ", " bCCCb bCCCb ", " bCCCb bCCCb ", "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", " CCCCCCCCC N N CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", "NbbbNNNbbbN NbbbNNNbbbN", " N N N N ", " N N N N ", " ", " N N N N ", " N N N N ", "NbbbNNNbbbN NbbbNNNbbbN", " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", "NbbbNNNbbbN NbN NbbbNNNbbbN",}, - {" ", " N N N N ", " s N N N N s ", " s NCCCN NCCCN s ", " ", " ", " ", " NCCCN NCCCN ", " N N N N ", " NNN NN N N NN NNN ", " C C C C ", " C C C C ", " C C C C ", " NNN NNN NNN NNN ", " ", " ", " ", " ", " ", " NNN NNN NNN NNN ", " C C C C ", " C C C C ", " C C C C ", " NNN NNN NbN NNN NNN ",}, - {" ", " ", " s s ", " s NCCCN NCCCN s ", " ", " ", " ", " NCCCN NCCCN ", " ", " N N N N ", " C C C C ", " C C C C ", " C C C C ", " N N N N ", " ", " ", " ", " ", " ", " N N N N ", " C C C C ", " C C C C ", " C C C C ", " N N NbN N N ",}, - {" ", " N N N N ", " N N N N N N ", " NCCCN NCCCN ", " ", " ", " ", " NCCCN NCCCN ", " N N N N ", " NNN NN N N NN NNN ", " C C C C ", " C C C C ", " C C C C ", " NNN NNN NNN NNN ", " ", " ", " ", " ", " ", " NNN NNN NNN NNN ", " C C C C ", " C C C C ", " C C C C ", " NNN NNN NbN NNN NNN ",}, - {" N N N N ", " bCCCb bCCCb ", " N bCCCb bCCCb N ", " bCCCb bCCCb ", " NCCCN NCCCN ", " NCCCN NCCCN ", " NCCCN NCCCN ", " bCCCb bCCCb ", " bCCCb bCCCb ", "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", " CCCCCCCCC N N CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", "NbbbNNNbbbN NbbbNNNbbbN", " N N N N ", " N N N N ", " ", " N N N N ", " N N N N ", "NbbbNNNbbbN NbbbNNNbbbN", " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", "NbbbNNNbbbN NbN NbbbNNNbbbN",}, - {" N N N N ", " bCCCb bCCCb ", " N sbbbbbNNsNNbbbbbs N ", " bCCCb bCCCb ", " N N N N ", " ", " N N N N ", " bCCCb bCCCb ", " s sbbbbbNNsNNbbbbbs s ", "NbbbN NbbNCCCb bCCCNbbN NbbbN", " CbC CbC N N CbC CbC ", " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", "NbbbN NbbbN NbbbN NbbbN", " NNN NNN NNN NNN ", " NNN NNN NNN NNN ", " s s s s ", " NNN NNN NNN NNN ", " NNN NNN NNN NNN ", "NbbbN NbbbN NbbbN NbbbN", " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", "NbbbN NbbbNNNNNsNsNNNNNbbbN NbbbN",}, - {" NNN NNN N N NNN NNN ", "NbbbN NbbNCCCb bCCCNbbN NbbbN", "NbbbN NbbNCCCb bCCCNbbN NbbbN", "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", " NNN NNN N N NNN NNN ", " N N N N ", " NNN NNN N N NNN NNN ", "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", "NbbbN NbbNCCCb bCCCNbbN NbbbN", "NNNN NNNCCCb bCCCNNN NNNN", " CCC CCC N N CCC CCC ", " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", "NbbbN NbbbN NbbbN NbbbN", " N N N N ", " N N N N ", " ", " N N N N ", " N N N N ", "NbbbN NbbbN NbbbN NbbbN", " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", "NbbbN NbbbN NbN NbbbN NbbbN",}, - {" ", " CCC CCC N N CCC CCC ", " CbC CbC N N CbC CbC ", " CCCCCCCCC N N CCCCCCCCC ", " C C C C ", " C C C C ", " C C C C ", " CCCCCCCCC N N CCCCCCCCC ", " CbC CbC N N CbC CbC ", " CCC CCC N N CCC CCC ", " ", " ", " ", " NNN NNN NNN NNN ", " ", " ", " ", " ", " ", " NNN NNN NNN NNN ", " ", " ", " ", " NNN NNN NbN NNN NNN ",}, - {" ", " CCC CCC CCC CCC ", " CbC CbC CbC CbC ", " CCCCCCCCC CCCCCCCCC ", " C C C C ", " C C C C ", " C C C C ", " CCCCCCCCC CCCCCCCCC ", " CbC CbC CbC CbC ", " CCC CCC CCC CCC ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " N N NbN N N ",}, - {" ", " CCC CCC CCC CCC ", " CbC CbC CbC CbC ", " CCCCCCCCC CCCCCCCCC ", " C C C C ", " C C C C ", " C C C C ", " CCCCCCCCC CCCCCCCCC ", " CbC CbC CbC CbC ", " CCC CCC CCC CCC ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " N N NbN N N ",}, - {" NNN NNN NNN NNN ", "NbbbN NbbbN NbbbN NbbbN", "NbbbN NbbbN NbbbN NbbbN", "NbbbNNNbbbN NbbbNNNbbbN", " NNN NNN NNN NNN ", " N N N N ", " NNN NNN NNN NNN ", "NbbbNNNbbbN NbbbNNNbbbN", "NbbbN NbbbN NbbbN NbbbN", "NbbbN NbbbN NbbbN NbbbN", " NNN NNN NNN NNN ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " N N NsNsN N N ",}, - {" ", " ", " N N N N ", " ", " ", " ", " ", " ", " N N N N ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " N N NbbbbbN N N ",}, - {" ", " ", " N N N N ", " ", " ", " ", " ", " ", " N N N N ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " N ", " NsNNNNNsNNNNsbbbbbsNNNNsNNNNNsN ",}, - {" ", " ", " s s s s ", " ", " ", " ", " ", " ", " s s s s ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ~ ", " NNN ", " NbbbbbNbbbbNbbbbbNbbbbNbbbbbN ",}, - {" ", " ", " N N N N ", " ", " ", " ", " ", " ", " N N N N ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " N ", " NsNNNNNsNNNNsbbbbbsNNNNsNNNNNsN ",}, - {" ", " ", " N N N N ", " ", " ", " ", " ", " ", " N N N N ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " N N NbbbbbN N N ",}, - {" NNN NNN NNN NNN ", "NbbbN NbbbN NbbbN NbbbN", "NbbbN NbbbN NbbbN NbbbN", "NbbbNNNbbbN NbbbNNNbbbN", " NNN NNN NNN NNN ", " N N N N ", " NNN NNN NNN NNN ", "NbbbNNNbbbN NbbbNNNbbbN", "NbbbN NbbbN NbbbN NbbbN", "NbbbN NbbbN NbbbN NbbbN", " NNN NNN NNN NNN ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " N N NsNsN N N ",}, - {" ", " CCC CCC CCC CCC ", " CbC CbC CbC CbC ", " CCCCCCCCC CCCCCCCCC ", " C C C C ", " C C C C ", " C C C C ", " CCCCCCCCC CCCCCCCCC ", " CbC CbC CbC CbC ", " CCC CCC CCC CCC ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " N N NbN N N ",}, - {" ", " CCC CCC CCC CCC ", " CbC CbC CbC CbC ", " CCCCCCCCC CCCCCCCCC ", " C C C C ", " C C C C ", " C C C C ", " CCCCCCCCC CCCCCCCCC ", " CbC CbC CbC CbC ", " CCC CCC CCC CCC ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " N N NbN N N ",}, - {" ", " CCC CCC N N CCC CCC ", " CbC CbC N N CbC CbC ", " CCCCCCCCC N N CCCCCCCCC ", " C C C C ", " C C C C ", " C C C C ", " CCCCCCCCC N N CCCCCCCCC ", " CbC CbC N N CbC CbC ", " CCC CCC N N CCC CCC ", " ", " ", " ", " NNN NNN NNN NNN ", " ", " ", " ", " ", " ", " NNN NNN NNN NNN ", " ", " ", " ", " NNN NNN NbN NNN NNN ",}, - {" NNN NNN N N NNN NNN ", "NbbbN NbbNCCCb bCCCNbbN NbbbN", "NbbbN NbbNCCCb bCCCNbbN NbbbN", "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", " NNN NNN N N NNN NNN ", " N N N N ", " NNN NNN N N NNN NNN ", "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", "NbbbN NbbNCCCb bCCCNbbN NbbbN", "NNNN NNNCCCb bCCCNNN NNNN", " CCC CCC N N CCC CCC ", " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", "NbbbN NbbbN NbbbN NbbbN", " N N N N ", " N N N N ", " ", " N N N N ", " N N N N ", "NbbbN NbbbN NbbbN NbbbN", " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", "NbbbN NbbbN NbN NbbbN NbbbN",}, - {" N N N N ", " bCCCb bCCCb ", " N sbbbbbNNsNNbbbbbs N ", " bCCCb bCCCb ", " N N N N ", " ", " N N N N ", " bCCCb bCCCb ", " s sbbbbbNNsNNbbbbbs s ", "NbbbN NbbNCCCb bCCCNbbN NbbbN", " CbC CbC N N CbC CbC ", " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", "NbbbN NbbbN NbbbN NbbbN", " NNN NNN NNN NNN ", " NNN NNN NNN NNN ", " s s s s ", " NNN NNN NNN NNN ", " NNN NNN NNN NNN ", "NbbbN NbbbN NbbbN NbbbN", " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", "NbbbN NbbbNNNNNsNsNNNNNbbbN NbbbN",}, - {" N N N N ", " bCCCb bCCCb ", " N bCCCb bCCCb N ", " bCCCb bCCCb ", " NCCCN NCCCN ", " NCCCN NCCCN ", " NCCCN NCCCN ", " bCCCb bCCCb ", " bCCCb bCCCb ", "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", " CCCCCCCCC N N CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", "NbbbNNNbbbN NbbbNNNbbbN", " N N N N ", " N N N N ", " ", " N N N N ", " N N N N ", "NbbbNNNbbbN NbbbNNNbbbN", " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", "NbbbNNNbbbN NbN NbbbNNNbbbN",}, - {" ", " N N N N ", " N N N N N N ", " NCCCN NCCCN ", " ", " ", " ", " NCCCN NCCCN ", " N N N N ", " NNN NN N N NN NNN ", " C C C C ", " C C C C ", " C C C C ", " NNN NNN NNN NNN ", " ", " ", " ", " ", " ", " NNN NNN NNN NNN ", " C C C C ", " C C C C ", " C C C C ", " NNN NNN NbN NNN NNN ",}, - {" ", " ", " s s ", " s NCCCN NCCCN s ", " ", " ", " ", " NCCCN NCCCN ", " ", " N N N N ", " C C C C ", " C C C C ", " C C C C ", " N N N N ", " ", " ", " ", " ", " ", " N N N N ", " C C C C ", " C C C C ", " C C C C ", " N N NbN N N ",}, - {" ", " N N N N ", " s N N N N s ", " s NCCCN NCCCN s ", " ", " ", " ", " NCCCN NCCCN ", " N N N N ", " NNN NN N N NN NNN ", " C C C C ", " C C C C ", " C C C C ", " NNN NNN NNN NNN ", " ", " ", " ", " ", " ", " NNN NNN NNN NNN ", " C C C C ", " C C C C ", " C C C C ", " NNN NNN NbN NNN NNN ",}, - {" N N N N ", " bCCCb bCCCb ", " ss bCCCb bCCCb ss ", " bCCCb bCCCb ", " s NCCCN NCCCN s ", " s NCCCN NCCCN s ", " NCCCN NCCCN ", " bCCCb bCCCb ", " bCCCb bCCCb ", "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", " CCCCCCCCC N N CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", "NbbbNNNbbbN NbbbNNNbbbN", " N N N N ", " N N N N ", " ", " N N N N ", " N N N N ", "NbbbNNNbbbN NbbbNNNbbbN", " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", "NbbbNNNbbbN NbN NbbbNNNbbbN",}, - {" N N N N ", " bCCCb bCCCb ", " NNNbbbbbNNsNNbbbbbNNN ", " ss bCCCb bCCCb ss ", " s N N N N s ", " s s ", " N N N N N N ", " N bCCCb bCCCb N ", " N sbbbbbNNsNNbbbbbs N ", "NbbbN NbbNCCCb bCCCNbbN NbbbN", " CbC CbC N N CbC CbC ", " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", "NbbbN NbbbN NbbbN NbbbN", " NNN NNN NNN NNN ", " NNN NNN NNN NNN ", " s s s s ", " NNN NNN NNN NNN ", " NNN NNN NNN NNN ", "NbbbN NbbbN NbbbN NbbbN", " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", "NbbbN NbbbNNNNNsNsNNNNNbbbN NbbbN",}, - {" N N N N ", " bCCCb bCCCb ", " bCCCb bCCCb ", " bCCCb bCCCb ", " N N N N ", " ", " N N N N ", " bCCCb bCCCb ", " bCCCb bCCCb ", "NbbbN NbbNCCCb bCCCNbbN NbbbN", " CCC CCC N N CCC CCC ", " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", "NbbbN NbbbN NbbbN NbbbN", " N N N N ", " N N N N ", " ", " N N N N ", " N N N N ", "NbbbN NbbbN NbbbN NbbbN", " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", "NbbbN NbbbN N N NbbbN NbbbN",}, - {" ", " N N N N ", " N N N N ", " N N N N ", " ", " ", " ", " N N N N ", " N N N N ", " NNN NNN N N NNN NNN ", " ", " ", " ", " NNN NNN NNN NNN ", " ", " ", " ", " ", " ", " NNN NNN NNN NNN ", " ", " ", " ", " NNN NNN NNN NNN ",} + { + " ", + " N N N N ", + " N N N N ", + " N N N N ", + " ", + " ", + " ", + " N N N N ", + " N N N N ", + " NNN NNN N N NNN NNN ", + " ", + " ", + " ", + " NNN NNN NNN NNN ", + " ", + " ", + " ", + " ", + " ", + " NNN NNN NNN NNN ", + " ", + " ", + " ", + " NNN NNN NNN NNN " + }, + { + " N N N N ", + " bCCCb bCCCb ", + " bCCCb bCCCb ", + " bCCCb bCCCb ", + " N N N N ", + " ", + " N N N N ", + " bCCCb bCCCb ", + " bCCCb bCCCb ", + "NbbbN NbbNCCCb bCCCNbbN NbbbN", + " CCC CCC N N CCC CCC ", + " CCC CCC CCC CCC ", + " CCC CCC CCC CCC ", + "NbbbN NbbbN NbbbN NbbbN", + " N N N N ", + " N N N N ", + " ", + " N N N N ", + " N N N N ", + "NbbbN NbbbN NbbbN NbbbN", + " CCC CCC CCC CCC ", + " CCC CCC CCC CCC ", + " CCC CCC CCC CCC ", + "NbbbN NbbbN N N NbbbN NbbbN", + }, + { + " N N N N ", + " bCCCb bCCCb ", + " NNNbbbbbNNsNNbbbbbNNN ", + " ss bCCCb bCCCb ss ", + " s N N N N s ", + " s s ", + " N N N N N N ", + " N bCCCb bCCCb N ", + " N sbbbbbNNsNNbbbbbs N ", + "NbbbN NbbNCCCb bCCCNbbN NbbbN", + " CbC CbC N N CbC CbC ", + " CbC CbC CbC CbC ", + " CbC CbC CbC CbC ", + "NbbbN NbbbN NbbbN NbbbN", + " NNN NNN NNN NNN ", + " NNN NNN NNN NNN ", + " s s s s ", + " NNN NNN NNN NNN ", + " NNN NNN NNN NNN ", + "NbbbN NbbbN NbbbN NbbbN", + " CbC CbC CbC CbC ", + " CbC CbC CbC CbC ", + " CbC CbC CbC CbC ", + "NbbbN NbbbNNNNNsNsNNNNNbbbN NbbbN", + }, + { + " N N N N ", + " bCCCb bCCCb ", + " ss bCCCb bCCCb ss ", + " bCCCb bCCCb ", + " s NCCCN NCCCN s ", + " s NCCCN NCCCN s ", + " NCCCN NCCCN ", + " bCCCb bCCCb ", + " bCCCb bCCCb ", + "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", + " CCCCCCCCC N N CCCCCCCCC ", + " CCCCCCCCC CCCCCCCCC ", + " CCCCCCCCC CCCCCCCCC ", + "NbbbNNNbbbN NbbbNNNbbbN", + " N N N N ", + " N N N N ", + " ", + " N N N N ", + " N N N N ", + "NbbbNNNbbbN NbbbNNNbbbN", + " CCCCCCCCC CCCCCCCCC ", + " CCCCCCCCC CCCCCCCCC ", + " CCCCCCCCC CCCCCCCCC ", + "NbbbNNNbbbN NbN NbbbNNNbbbN", + }, + { + " ", + " N N N N ", + " s N N N N s ", + " s NCCCN NCCCN s ", + " ", + " ", + " ", + " NCCCN NCCCN ", + " N N N N ", + " NNN NN N N NN NNN ", + " C C C C ", + " C C C C ", + " C C C C ", + " NNN NNN NNN NNN ", + " ", + " ", + " ", + " ", + " ", + " NNN NNN NNN NNN ", + " C C C C ", + " C C C C ", + " C C C C ", + " NNN NNN NbN NNN NNN ", + }, + { + " ", + " ", + " s s ", + " s NCCCN NCCCN s ", + " ", + " ", + " ", + " NCCCN NCCCN ", + " ", + " N N N N ", + " C C C C ", + " C C C C ", + " C C C C ", + " N N N N ", + " ", + " ", + " ", + " ", + " ", + " N N N N ", + " C C C C ", + " C C C C ", + " C C C C ", + " N N NbN N N ", + }, + { + " ", + " N N N N ", + " N N N N N N ", + " NCCCN NCCCN ", + " ", + " ", + " ", + " NCCCN NCCCN ", + " N N N N ", + " NNN NN N N NN NNN ", + " C C C C ", + " C C C C ", + " C C C C ", + " NNN NNN NNN NNN ", + " ", + " ", + " ", + " ", + " ", + " NNN NNN NNN NNN ", + " C C C C ", + " C C C C ", + " C C C C ", + " NNN NNN NbN NNN NNN ", + }, + { + " N N N N ", + " bCCCb bCCCb ", + " N bCCCb bCCCb N ", + " bCCCb bCCCb ", + " NCCCN NCCCN ", + " NCCCN NCCCN ", + " NCCCN NCCCN ", + " bCCCb bCCCb ", + " bCCCb bCCCb ", + "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", + " CCCCCCCCC N N CCCCCCCCC ", + " CCCCCCCCC CCCCCCCCC ", + " CCCCCCCCC CCCCCCCCC ", + "NbbbNNNbbbN NbbbNNNbbbN", + " N N N N ", + " N N N N ", + " ", + " N N N N ", + " N N N N ", + "NbbbNNNbbbN NbbbNNNbbbN", + " CCCCCCCCC CCCCCCCCC ", + " CCCCCCCCC CCCCCCCCC ", + " CCCCCCCCC CCCCCCCCC ", + "NbbbNNNbbbN NbN NbbbNNNbbbN", + }, + { + " N N N N ", + " bCCCb bCCCb ", + " N sbbbbbNNsNNbbbbbs N ", + " bCCCb bCCCb ", + " N N N N ", + " ", + " N N N N ", + " bCCCb bCCCb ", + " s sbbbbbNNsNNbbbbbs s ", + "NbbbN NbbNCCCb bCCCNbbN NbbbN", + " CbC CbC N N CbC CbC ", + " CbC CbC CbC CbC ", + " CbC CbC CbC CbC ", + "NbbbN NbbbN NbbbN NbbbN", + " NNN NNN NNN NNN ", + " NNN NNN NNN NNN ", + " s s s s ", + " NNN NNN NNN NNN ", + " NNN NNN NNN NNN ", + "NbbbN NbbbN NbbbN NbbbN", + " CbC CbC CbC CbC ", + " CbC CbC CbC CbC ", + " CbC CbC CbC CbC ", + "NbbbN NbbbNNNNNsNsNNNNNbbbN NbbbN", + }, + { + " NNN NNN N N NNN NNN ", + "NbbbN NbbNCCCb bCCCNbbN NbbbN", + "NbbbN NbbNCCCb bCCCNbbN NbbbN", + "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", + " NNN NNN N N NNN NNN ", + " N N N N ", + " NNN NNN N N NNN NNN ", + "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", + "NbbbN NbbNCCCb bCCCNbbN NbbbN", + "NNNN NNNCCCb bCCCNNN NNNN", + " CCC CCC N N CCC CCC ", + " CCC CCC CCC CCC ", + " CCC CCC CCC CCC ", + "NbbbN NbbbN NbbbN NbbbN", + " N N N N ", + " N N N N ", + " ", + " N N N N ", + " N N N N ", + "NbbbN NbbbN NbbbN NbbbN", + " CCC CCC CCC CCC ", + " CCC CCC CCC CCC ", + " CCC CCC CCC CCC ", + "NbbbN NbbbN NbN NbbbN NbbbN", + }, + { + " ", + " CCC CCC N N CCC CCC ", + " CbC CbC N N CbC CbC ", + " CCCCCCCCC N N CCCCCCCCC ", + " C C C C ", + " C C C C ", + " C C C C ", + " CCCCCCCCC N N CCCCCCCCC ", + " CbC CbC N N CbC CbC ", + " CCC CCC N N CCC CCC ", + " ", + " ", + " ", + " NNN NNN NNN NNN ", + " ", + " ", + " ", + " ", + " ", + " NNN NNN NNN NNN ", + " ", + " ", + " ", + " NNN NNN NbN NNN NNN ", + }, + { + " ", + " CCC CCC CCC CCC ", + " CbC CbC CbC CbC ", + " CCCCCCCCC CCCCCCCCC ", + " C C C C ", + " C C C C ", + " C C C C ", + " CCCCCCCCC CCCCCCCCC ", + " CbC CbC CbC CbC ", + " CCC CCC CCC CCC ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " N N NbN N N ", + }, + { + " ", + " CCC CCC CCC CCC ", + " CbC CbC CbC CbC ", + " CCCCCCCCC CCCCCCCCC ", + " C C C C ", + " C C C C ", + " C C C C ", + " CCCCCCCCC CCCCCCCCC ", + " CbC CbC CbC CbC ", + " CCC CCC CCC CCC ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " N N NbN N N ", + }, + { + " NNN NNN NNN NNN ", + "NbbbN NbbbN NbbbN NbbbN", + "NbbbN NbbbN NbbbN NbbbN", + "NbbbNNNbbbN NbbbNNNbbbN", + " NNN NNN NNN NNN ", + " N N N N ", + " NNN NNN NNN NNN ", + "NbbbNNNbbbN NbbbNNNbbbN", + "NbbbN NbbbN NbbbN NbbbN", + "NbbbN NbbbN NbbbN NbbbN", + " NNN NNN NNN NNN ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " N N NsNsN N N ", + }, + { + " ", + " ", + " N N N N ", + " ", + " ", + " ", + " ", + " ", + " N N N N ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " N N NbbbbbN N N ", + }, + { + " ", + " ", + " N N N N ", + " ", + " ", + " ", + " ", + " ", + " N N N N ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " N ", + " NsNNNNNsNNNNsbbbbbsNNNNsNNNNNsN ", + }, + { + " ", + " ", + " s s s s ", + " ", + " ", + " ", + " ", + " ", + " s s s s ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ~ ", + " NNN ", + " NbbbbbNbbbbNbbbbbNbbbbNbbbbbN ", + }, + { + " ", + " ", + " N N N N ", + " ", + " ", + " ", + " ", + " ", + " N N N N ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " N ", + " NsNNNNNsNNNNsbbbbbsNNNNsNNNNNsN ", + }, + { + " ", + " ", + " N N N N ", + " ", + " ", + " ", + " ", + " ", + " N N N N ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " N N NbbbbbN N N ", + }, + { + " NNN NNN NNN NNN ", + "NbbbN NbbbN NbbbN NbbbN", + "NbbbN NbbbN NbbbN NbbbN", + "NbbbNNNbbbN NbbbNNNbbbN", + " NNN NNN NNN NNN ", + " N N N N ", + " NNN NNN NNN NNN ", + "NbbbNNNbbbN NbbbNNNbbbN", + "NbbbN NbbbN NbbbN NbbbN", + "NbbbN NbbbN NbbbN NbbbN", + " NNN NNN NNN NNN ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " N N NsNsN N N ", + }, + { + " ", + " CCC CCC CCC CCC ", + " CbC CbC CbC CbC ", + " CCCCCCCCC CCCCCCCCC ", + " C C C C ", + " C C C C ", + " C C C C ", + " CCCCCCCCC CCCCCCCCC ", + " CbC CbC CbC CbC ", + " CCC CCC CCC CCC ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " N N NbN N N ", + }, + { + " ", + " CCC CCC CCC CCC ", + " CbC CbC CbC CbC ", + " CCCCCCCCC CCCCCCCCC ", + " C C C C ", + " C C C C ", + " C C C C ", + " CCCCCCCCC CCCCCCCCC ", + " CbC CbC CbC CbC ", + " CCC CCC CCC CCC ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " N N NbN N N ", + }, + { + " ", + " CCC CCC N N CCC CCC ", + " CbC CbC N N CbC CbC ", + " CCCCCCCCC N N CCCCCCCCC ", + " C C C C ", + " C C C C ", + " C C C C ", + " CCCCCCCCC N N CCCCCCCCC ", + " CbC CbC N N CbC CbC ", + " CCC CCC N N CCC CCC ", + " ", + " ", + " ", + " NNN NNN NNN NNN ", + " ", + " ", + " ", + " ", + " ", + " NNN NNN NNN NNN ", + " ", + " ", + " ", + " NNN NNN NbN NNN NNN ", + }, + { + " NNN NNN N N NNN NNN ", + "NbbbN NbbNCCCb bCCCNbbN NbbbN", + "NbbbN NbbNCCCb bCCCNbbN NbbbN", + "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", + " NNN NNN N N NNN NNN ", + " N N N N ", + " NNN NNN N N NNN NNN ", + "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", + "NbbbN NbbNCCCb bCCCNbbN NbbbN", + "NNNN NNNCCCb bCCCNNN NNNN", + " CCC CCC N N CCC CCC ", + " CCC CCC CCC CCC ", + " CCC CCC CCC CCC ", + "NbbbN NbbbN NbbbN NbbbN", + " N N N N ", + " N N N N ", + " ", + " N N N N ", + " N N N N ", + "NbbbN NbbbN NbbbN NbbbN", + " CCC CCC CCC CCC ", + " CCC CCC CCC CCC ", + " CCC CCC CCC CCC ", + "NbbbN NbbbN NbN NbbbN NbbbN", + }, + { + " N N N N ", + " bCCCb bCCCb ", + " N sbbbbbNNsNNbbbbbs N ", + " bCCCb bCCCb ", + " N N N N ", + " ", + " N N N N ", + " bCCCb bCCCb ", + " s sbbbbbNNsNNbbbbbs s ", + "NbbbN NbbNCCCb bCCCNbbN NbbbN", + " CbC CbC N N CbC CbC ", + " CbC CbC CbC CbC ", + " CbC CbC CbC CbC ", + "NbbbN NbbbN NbbbN NbbbN", + " NNN NNN NNN NNN ", + " NNN NNN NNN NNN ", + " s s s s ", + " NNN NNN NNN NNN ", + " NNN NNN NNN NNN ", + "NbbbN NbbbN NbbbN NbbbN", + " CbC CbC CbC CbC ", + " CbC CbC CbC CbC ", + " CbC CbC CbC CbC ", + "NbbbN NbbbNNNNNsNsNNNNNbbbN NbbbN", + }, + { + " N N N N ", + " bCCCb bCCCb ", + " N bCCCb bCCCb N ", + " bCCCb bCCCb ", + " NCCCN NCCCN ", + " NCCCN NCCCN ", + " NCCCN NCCCN ", + " bCCCb bCCCb ", + " bCCCb bCCCb ", + "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", + " CCCCCCCCC N N CCCCCCCCC ", + " CCCCCCCCC CCCCCCCCC ", + " CCCCCCCCC CCCCCCCCC ", + "NbbbNNNbbbN NbbbNNNbbbN", + " N N N N ", + " N N N N ", + " ", + " N N N N ", + " N N N N ", + "NbbbNNNbbbN NbbbNNNbbbN", + " CCCCCCCCC CCCCCCCCC ", + " CCCCCCCCC CCCCCCCCC ", + " CCCCCCCCC CCCCCCCCC ", + "NbbbNNNbbbN NbN NbbbNNNbbbN", + }, + { + " ", + " N N N N ", + " N N N N N N ", + " NCCCN NCCCN ", + " ", + " ", + " ", + " NCCCN NCCCN ", + " N N N N ", + " NNN NN N N NN NNN ", + " C C C C ", + " C C C C ", + " C C C C ", + " NNN NNN NNN NNN ", + " ", + " ", + " ", + " ", + " ", + " NNN NNN NNN NNN ", + " C C C C ", + " C C C C ", + " C C C C ", + " NNN NNN NbN NNN NNN ", + }, + { + " ", + " ", + " s s ", + " s NCCCN NCCCN s ", + " ", + " ", + " ", + " NCCCN NCCCN ", + " ", + " N N N N ", + " C C C C ", + " C C C C ", + " C C C C ", + " N N N N ", + " ", + " ", + " ", + " ", + " ", + " N N N N ", + " C C C C ", + " C C C C ", + " C C C C ", + " N N NbN N N ", + }, + { + " ", + " N N N N ", + " s N N N N s ", + " s NCCCN NCCCN s ", + " ", + " ", + " ", + " NCCCN NCCCN ", + " N N N N ", + " NNN NN N N NN NNN ", + " C C C C ", + " C C C C ", + " C C C C ", + " NNN NNN NNN NNN ", + " ", + " ", + " ", + " ", + " ", + " NNN NNN NNN NNN ", + " C C C C ", + " C C C C ", + " C C C C ", + " NNN NNN NbN NNN NNN ", + }, + { + " N N N N ", + " bCCCb bCCCb ", + " ss bCCCb bCCCb ss ", + " bCCCb bCCCb ", + " s NCCCN NCCCN s ", + " s NCCCN NCCCN s ", + " NCCCN NCCCN ", + " bCCCb bCCCb ", + " bCCCb bCCCb ", + "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", + " CCCCCCCCC N N CCCCCCCCC ", + " CCCCCCCCC CCCCCCCCC ", + " CCCCCCCCC CCCCCCCCC ", + "NbbbNNNbbbN NbbbNNNbbbN", + " N N N N ", + " N N N N ", + " ", + " N N N N ", + " N N N N ", + "NbbbNNNbbbN NbbbNNNbbbN", + " CCCCCCCCC CCCCCCCCC ", + " CCCCCCCCC CCCCCCCCC ", + " CCCCCCCCC CCCCCCCCC ", + "NbbbNNNbbbN NbN NbbbNNNbbbN", + }, + { + " N N N N ", + " bCCCb bCCCb ", + " NNNbbbbbNNsNNbbbbbNNN ", + " ss bCCCb bCCCb ss ", + " s N N N N s ", + " s s ", + " N N N N N N ", + " N bCCCb bCCCb N ", + " N sbbbbbNNsNNbbbbbs N ", + "NbbbN NbbNCCCb bCCCNbbN NbbbN", + " CbC CbC N N CbC CbC ", + " CbC CbC CbC CbC ", + " CbC CbC CbC CbC ", + "NbbbN NbbbN NbbbN NbbbN", + " NNN NNN NNN NNN ", + " NNN NNN NNN NNN ", + " s s s s ", + " NNN NNN NNN NNN ", + " NNN NNN NNN NNN ", + "NbbbN NbbbN NbbbN NbbbN", + " CbC CbC CbC CbC ", + " CbC CbC CbC CbC ", + " CbC CbC CbC CbC ", + "NbbbN NbbbNNNNNsNsNNNNNbbbN NbbbN", + }, + { + " N N N N ", + " bCCCb bCCCb ", + " bCCCb bCCCb ", + " bCCCb bCCCb ", + " N N N N ", + " ", + " N N N N ", + " bCCCb bCCCb ", + " bCCCb bCCCb ", + "NbbbN NbbNCCCb bCCCNbbN NbbbN", + " CCC CCC N N CCC CCC ", + " CCC CCC CCC CCC ", + " CCC CCC CCC CCC ", + "NbbbN NbbbN NbbbN NbbbN", + " N N N N ", + " N N N N ", + " ", + " N N N N ", + " N N N N ", + "NbbbN NbbbN NbbbN NbbbN", + " CCC CCC CCC CCC ", + " CCC CCC CCC CCC ", + " CCC CCC CCC CCC ", + "NbbbN NbbbN N N NbbbN NbbbN", + }, + { + " ", + " N N N N ", + " N N N N ", + " N N N N ", + " ", + " ", + " ", + " N N N N ", + " N N N N ", + " NNN NNN N N NNN NNN ", + " ", + " ", + " ", + " NNN NNN NNN NNN ", + " ", + " ", + " ", + " ", + " ", + " NNN NNN NNN NNN ", + " ", + " ", + " ", + " NNN NNN NNN NNN ", + } }; - protected static final int DIM_TRANS_CASING = 12; protected static final int DIM_INJECTION_CASING = 13; protected static final int DIM_BRIDGE_CASING = 14; @@ -122,17 +942,31 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul private boolean isMultiChunkloaded = true; protected static final String STRUCTURE_PIECE_MAIN = "main"; - private static final IStructureDefinition<GT_MetaTileEntity_PlasmaForge> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_PlasmaForge>builder() - .addShape(STRUCTURE_PIECE_MAIN, structure_string) - .addElement('C', ofCoil(GT_MetaTileEntity_PlasmaForge::setCoilLevel, GT_MetaTileEntity_PlasmaForge::getCoilLevel)) - .addElement('b', buildHatchAdder(GT_MetaTileEntity_PlasmaForge.class) - .atLeast(InputHatch, OutputHatch, InputBus, OutputBus, Energy, ExoticEnergy, Maintenance) - .casingIndex(DIM_INJECTION_CASING) - .dot(3) - .buildAndChain(GregTech_API.sBlockCasings1, DIM_INJECTION_CASING)) - .addElement('N', ofBlock(GregTech_API.sBlockCasings1, DIM_TRANS_CASING)) - .addElement('s', ofBlock(GregTech_API.sBlockCasings1, DIM_BRIDGE_CASING)) - .build(); + private static final IStructureDefinition<GT_MetaTileEntity_PlasmaForge> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_PlasmaForge>builder() + .addShape(STRUCTURE_PIECE_MAIN, structure_string) + .addElement( + 'C', + ofCoil( + GT_MetaTileEntity_PlasmaForge::setCoilLevel, + GT_MetaTileEntity_PlasmaForge::getCoilLevel)) + .addElement( + 'b', + buildHatchAdder(GT_MetaTileEntity_PlasmaForge.class) + .atLeast( + InputHatch, + OutputHatch, + InputBus, + OutputBus, + Energy, + ExoticEnergy, + Maintenance) + .casingIndex(DIM_INJECTION_CASING) + .dot(3) + .buildAndChain(GregTech_API.sBlockCasings1, DIM_INJECTION_CASING)) + .addElement('N', ofBlock(GregTech_API.sBlockCasings1, DIM_TRANS_CASING)) + .addElement('s', ofBlock(GregTech_API.sBlockCasings1, DIM_BRIDGE_CASING)) + .build(); @Override protected boolean addBottomHatch(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { @@ -157,26 +991,42 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul protected GT_Multiblock_Tooltip_Builder createTooltip() { GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); tt.addInfo("Transcending Dimensional Boundaries.") - .addInfo("Takes " + EnumChatFormatting.RED + GT_Utility.formatNumbers(max_efficiency_time_in_ticks/(3600*20)) + EnumChatFormatting.GRAY + " hours of continuous run time to fully breach dimensional") - .addInfo("boundaries and achieve maximum efficiency. This reduces fuel") - .addInfo("consumption by up to " + EnumChatFormatting.RED + GT_Utility.formatNumbers(100*maximum_discount) + "%" + EnumChatFormatting.GRAY + ". Supports overclocking beyond MAX voltage.") - .addInfo(AuthorColen) - .addSeparator() - .beginStructureBlock(33, 24, 33, false) - .addStructureInfo("DTPF Structure is too complex! See schematic for details.") - .addStructureInfo(EnumChatFormatting.GOLD + "2112" + EnumChatFormatting.GRAY + " Heating coils required.") - .addStructureInfo(EnumChatFormatting.GOLD + "120" + EnumChatFormatting.GRAY + " Dimensional bridge blocks required.") - .addStructureInfo(EnumChatFormatting.GOLD + "1270" + EnumChatFormatting.GRAY + " Dimensional injection casings required.") - .addStructureInfo(EnumChatFormatting.GOLD + "2121" + EnumChatFormatting.GRAY + " Dimensionally transcendent casings required.") - .addStructureInfo("--------------------------------------------") - .addStructureInfo("Requires " + EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "-" + EnumChatFormatting.GOLD + "2" + EnumChatFormatting.GRAY + " energy hatches or " + EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " TT energy hatch.") - .addStructureInfo("Requires " + EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " maintenance hatch.") - .addStructureInfo("Requires " + EnumChatFormatting.GOLD + min_input_hatch + EnumChatFormatting.GRAY + "-" + EnumChatFormatting.GOLD + max_input_hatch + EnumChatFormatting.GRAY + " input hatches.") - .addStructureInfo("Requires " + EnumChatFormatting.GOLD + min_output_hatch + EnumChatFormatting.GRAY + "-" + EnumChatFormatting.GOLD + max_output_hatch + EnumChatFormatting.GRAY + " output hatches.") - .addStructureInfo("Requires " + EnumChatFormatting.GOLD + min_input_bus + EnumChatFormatting.GRAY + "-" + EnumChatFormatting.GOLD + max_input_bus + EnumChatFormatting.GRAY + " input busses.") - .addStructureInfo("Requires " + EnumChatFormatting.GOLD + min_output_bus + EnumChatFormatting.GRAY + "-" + EnumChatFormatting.GOLD + max_input_bus + EnumChatFormatting.GRAY + " output busses.") - .addStructureInfo("--------------------------------------------") - .toolTipFinisher("Gregtech"); + .addInfo("Takes " + EnumChatFormatting.RED + + GT_Utility.formatNumbers(max_efficiency_time_in_ticks / (3600 * 20)) + EnumChatFormatting.GRAY + + " hours of continuous run time to fully breach dimensional") + .addInfo("boundaries and achieve maximum efficiency. This reduces fuel") + .addInfo("consumption by up to " + EnumChatFormatting.RED + + GT_Utility.formatNumbers(100 * maximum_discount) + "%" + EnumChatFormatting.GRAY + + ". Supports overclocking beyond MAX voltage.") + .addInfo(AuthorColen) + .addSeparator() + .beginStructureBlock(33, 24, 33, false) + .addStructureInfo("DTPF Structure is too complex! See schematic for details.") + .addStructureInfo( + EnumChatFormatting.GOLD + "2112" + EnumChatFormatting.GRAY + " Heating coils required.") + .addStructureInfo(EnumChatFormatting.GOLD + "120" + EnumChatFormatting.GRAY + + " Dimensional bridge blocks required.") + .addStructureInfo(EnumChatFormatting.GOLD + "1270" + EnumChatFormatting.GRAY + + " Dimensional injection casings required.") + .addStructureInfo(EnumChatFormatting.GOLD + "2121" + EnumChatFormatting.GRAY + + " Dimensionally transcendent casings required.") + .addStructureInfo("--------------------------------------------") + .addStructureInfo("Requires " + EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "-" + + EnumChatFormatting.GOLD + "2" + EnumChatFormatting.GRAY + " energy hatches or " + + EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " TT energy hatch.") + .addStructureInfo( + "Requires " + EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " maintenance hatch.") + .addStructureInfo("Requires " + EnumChatFormatting.GOLD + min_input_hatch + EnumChatFormatting.GRAY + + "-" + EnumChatFormatting.GOLD + max_input_hatch + EnumChatFormatting.GRAY + " input hatches.") + .addStructureInfo("Requires " + EnumChatFormatting.GOLD + min_output_hatch + EnumChatFormatting.GRAY + + "-" + EnumChatFormatting.GOLD + max_output_hatch + EnumChatFormatting.GRAY + + " output hatches.") + .addStructureInfo("Requires " + EnumChatFormatting.GOLD + min_input_bus + EnumChatFormatting.GRAY + "-" + + EnumChatFormatting.GOLD + max_input_bus + EnumChatFormatting.GRAY + " input busses.") + .addStructureInfo("Requires " + EnumChatFormatting.GOLD + min_output_bus + EnumChatFormatting.GRAY + "-" + + EnumChatFormatting.GOLD + max_input_bus + EnumChatFormatting.GRAY + " output busses.") + .addStructureInfo("--------------------------------------------") + .toolTipFinisher("Gregtech"); return tt; } @@ -187,27 +1037,43 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { if (aSide == aFacing) { if (aActive) - return new ITexture[]{ + return new ITexture[] { casingTexturePages[0][DIM_BRIDGE_CASING], - TextureFactory.builder().addIcon(OVERLAY_DTPF_ON).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FUSION1_GLOW).extFacing().glow().build()}; - return new ITexture[]{ + TextureFactory.builder() + .addIcon(OVERLAY_DTPF_ON) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FUSION1_GLOW) + .extFacing() + .glow() + .build() + }; + return new ITexture[] { casingTexturePages[0][DIM_BRIDGE_CASING], - TextureFactory.builder().addIcon(OVERLAY_DTPF_OFF).extFacing().build()}; + TextureFactory.builder().addIcon(OVERLAY_DTPF_OFF).extFacing().build() + }; } - return new ITexture[]{casingTexturePages[0][DIM_BRIDGE_CASING]}; + return new ITexture[] {casingTexturePages[0][DIM_BRIDGE_CASING]}; } @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "PlasmaForge.png"); + return new GT_GUIContainer_MultiMachine( + aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "PlasmaForge.png"); } @Override - public int getPollutionPerSecond(ItemStack aStack){ + public int getPollutionPerSecond(ItemStack aStack) { return 0; } @@ -253,20 +1119,13 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul // Look up recipe. If not found it will return null. GT_Recipe tRecipe_0 = GT_Recipe.GT_Recipe_Map.sPlasmaForgeRecipes.findRecipe( - getBaseMetaTileEntity(), - false, - tTotalEU, - tFluids, - tItems - ); + getBaseMetaTileEntity(), false, tTotalEU, tFluids, tItems); // Check if recipe found. - if (tRecipe_0 == null) - return false; + if (tRecipe_0 == null) return false; // If coil heat capacity is too low, refuse to start recipe. - if (mHeatingCapacity <= tRecipe_0.mSpecialValue) - return false; + if (mHeatingCapacity <= tRecipe_0.mSpecialValue) return false; // Reduce fuel quantity if machine has been running for long enough. GT_Recipe tRecipe_1 = tRecipe_0.copy(); @@ -287,11 +1146,8 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul } } - // Takes items/fluids from hatches/busses. - if (!tRecipe_1.isRecipeInputEqual(true, tFluids, tItems)) - return false; - + if (!tRecipe_1.isRecipeInputEqual(true, tFluids, tItems)) return false; // Logic for overclocking calculations. double EU_input_tier = log(tTotalEU) / log4; @@ -324,27 +1180,21 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul setCoilLevel(HeatingCoilLevel.None); // Check the main structure - if (!checkPiece(STRUCTURE_PIECE_MAIN, 16, 21, 16)) - return false; + if (!checkPiece(STRUCTURE_PIECE_MAIN, 16, 21, 16)) return false; - if (getCoilLevel() == HeatingCoilLevel.None) - return false; + if (getCoilLevel() == HeatingCoilLevel.None) return false; // Item input bus check. - if ((mInputBusses.size() < min_input_bus) || (mInputBusses.size() > max_input_bus)) - return false; + if ((mInputBusses.size() < min_input_bus) || (mInputBusses.size() > max_input_bus)) return false; // Item output bus check. - if ((mOutputBusses.size() < min_output_bus) || (mOutputBusses.size() > max_output_bus)) - return false; + if ((mOutputBusses.size() < min_output_bus) || (mOutputBusses.size() > max_output_bus)) return false; // Fluid input hatch check. - if ((mInputHatches.size() < min_input_hatch) || (mInputHatches.size() > max_input_hatch)) - return false; + if ((mInputHatches.size() < min_input_hatch) || (mInputHatches.size() > max_input_hatch)) return false; // Fluid output hatch check. - if ((mOutputHatches.size() < min_output_hatch) || (mOutputHatches.size() > max_output_hatch)) - return false; + if ((mOutputHatches.size() < min_output_hatch) || (mOutputHatches.size() > max_output_hatch)) return false; // If there is more than 1 TT energy hatch, the structure check will fail. // If there is a TT hatch and a normal hatch, the structure check will fail. @@ -359,18 +1209,18 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul // Check will also fail if energy hatches are not of the same tier. byte tier_of_hatch = mEnergyHatches.get(0).mTier; - for(GT_MetaTileEntity_Hatch_Energy energyHatch : mEnergyHatches) { - if (energyHatch.mTier != tier_of_hatch) { return false; } + for (GT_MetaTileEntity_Hatch_Energy energyHatch : mEnergyHatches) { + if (energyHatch.mTier != tier_of_hatch) { + return false; + } } } // If there are no energy hatches or TT energy hatches, structure will fail to form. - if ((mEnergyHatches.size() == 0) && (mExoticEnergyHatches.size() == 0)) - return false; + if ((mEnergyHatches.size() == 0) && (mExoticEnergyHatches.size() == 0)) return false; // One maintenance hatch only. Mandatory. - if (mMaintenanceHatches.size() != 1) - return false; + if (mMaintenanceHatches.size() != 1) return false; // Heat capacity of coils used on multi. No free heat from extra EU! mHeatingCapacity = (int) getCoilLevel().getHeat(); @@ -386,12 +1236,10 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul @Override public boolean addOutput(FluidStack aLiquid) { - if (aLiquid == null) - return false; + if (aLiquid == null) return false; FluidStack tLiquid = aLiquid.copy(); - return dumpFluid(mOutputHatches, tLiquid, true) || - dumpFluid(mOutputHatches, tLiquid, false); + return dumpFluid(mOutputHatches, tLiquid, true) || dumpFluid(mOutputHatches, tLiquid, false); } @Override @@ -416,33 +1264,45 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul @Override public String[] getInfoData() { - long storedEnergy=0; - long maxEnergy=0; + long storedEnergy = 0; + long maxEnergy = 0; - for(GT_MetaTileEntity_Hatch tHatch : mExoticEnergyHatches) { + for (GT_MetaTileEntity_Hatch tHatch : mExoticEnergyHatches) { if (isValidMetaTileEntity(tHatch)) { - storedEnergy+=tHatch.getBaseMetaTileEntity().getStoredEU(); - maxEnergy+=tHatch.getBaseMetaTileEntity().getEUCapacity(); + storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU(); + maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity(); } } - return new String[]{ + return new String[] { "------------ Critical Information ------------", - StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mProgresstime) + EnumChatFormatting.RESET + "t / " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(mMaxProgresstime) + EnumChatFormatting.RESET + "t", - StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", - StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " + - EnumChatFormatting.RED + GT_Utility.formatNumbers(-EU_per_tick) + EnumChatFormatting.RESET + " EU/t", - StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(GT_ExoticEnergyInputHelper.getMaxInputVoltageMulti(getExoticAndNormalEnergyHatchList())) + EnumChatFormatting.RESET + " EU/t(*" + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(GT_ExoticEnergyInputHelper.getMaxInputAmpsMulti(getExoticAndNormalEnergyHatchList())) + EnumChatFormatting.RESET + "A) " + - StatCollector.translateToLocal("GT5U.machines.tier") + ": " + - EnumChatFormatting.YELLOW + VN[GT_Utility.getTier(GT_ExoticEnergyInputHelper.getMaxInputVoltageMulti(getExoticAndNormalEnergyHatchList()))] + EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.EBF.heat") + ": " + - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mHeatingCapacity) + EnumChatFormatting.RESET + " K", - "Ticks run: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(running_time) + EnumChatFormatting.RESET + ", Fuel Discount: " + EnumChatFormatting.RED + GT_Utility.formatNumbers(100 * (1-discount)) + EnumChatFormatting.RESET + "%", + StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(mProgresstime) + EnumChatFormatting.RESET + "t / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(mMaxProgresstime) + EnumChatFormatting.RESET + "t", + StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", + StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " + EnumChatFormatting.RED + + GT_Utility.formatNumbers(-EU_per_tick) + EnumChatFormatting.RESET + " EU/t", + StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers( + GT_ExoticEnergyInputHelper.getMaxInputVoltageMulti(getExoticAndNormalEnergyHatchList())) + + EnumChatFormatting.RESET + " EU/t(*" + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers( + GT_ExoticEnergyInputHelper.getMaxInputAmpsMulti(getExoticAndNormalEnergyHatchList())) + + EnumChatFormatting.RESET + "A) " + StatCollector.translateToLocal("GT5U.machines.tier") + + ": " + EnumChatFormatting.YELLOW + + VN[ + GT_Utility.getTier(GT_ExoticEnergyInputHelper.getMaxInputVoltageMulti( + getExoticAndNormalEnergyHatchList()))] + + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.EBF.heat") + ": " + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(mHeatingCapacity) + EnumChatFormatting.RESET + " K", + "Ticks run: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(running_time) + EnumChatFormatting.RESET + + ", Fuel Discount: " + EnumChatFormatting.RED + GT_Utility.formatNumbers(100 * (1 - discount)) + + EnumChatFormatting.RESET + "%", "-----------------------------------------" }; } @@ -474,15 +1334,33 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul int ControllerXCoordinate = ((TileEntity) aBaseMetaTileEntity).xCoord; int ControllerZCoordinate = ((TileEntity) aBaseMetaTileEntity).zCoord; - GT_ChunkManager.requestChunkLoad((TileEntity) aBaseMetaTileEntity, new ChunkCoordIntPair(ControllerXCoordinate, ControllerZCoordinate)); - GT_ChunkManager.requestChunkLoad((TileEntity) aBaseMetaTileEntity, new ChunkCoordIntPair(ControllerXCoordinate + 16, ControllerZCoordinate)); - GT_ChunkManager.requestChunkLoad((TileEntity) aBaseMetaTileEntity, new ChunkCoordIntPair(ControllerXCoordinate - 16, ControllerZCoordinate)); - GT_ChunkManager.requestChunkLoad((TileEntity) aBaseMetaTileEntity, new ChunkCoordIntPair(ControllerXCoordinate, ControllerZCoordinate + 16)); - GT_ChunkManager.requestChunkLoad((TileEntity) aBaseMetaTileEntity, new ChunkCoordIntPair(ControllerXCoordinate, ControllerZCoordinate - 16)); - GT_ChunkManager.requestChunkLoad((TileEntity) aBaseMetaTileEntity, new ChunkCoordIntPair(ControllerXCoordinate + 16, ControllerZCoordinate + 16)); - GT_ChunkManager.requestChunkLoad((TileEntity) aBaseMetaTileEntity, new ChunkCoordIntPair(ControllerXCoordinate + 16, ControllerZCoordinate - 16)); - GT_ChunkManager.requestChunkLoad((TileEntity) aBaseMetaTileEntity, new ChunkCoordIntPair(ControllerXCoordinate - 16, ControllerZCoordinate + 16)); - GT_ChunkManager.requestChunkLoad((TileEntity) aBaseMetaTileEntity, new ChunkCoordIntPair(ControllerXCoordinate - 16, ControllerZCoordinate - 16)); + GT_ChunkManager.requestChunkLoad( + (TileEntity) aBaseMetaTileEntity, + new ChunkCoordIntPair(ControllerXCoordinate, ControllerZCoordinate)); + GT_ChunkManager.requestChunkLoad( + (TileEntity) aBaseMetaTileEntity, + new ChunkCoordIntPair(ControllerXCoordinate + 16, ControllerZCoordinate)); + GT_ChunkManager.requestChunkLoad( + (TileEntity) aBaseMetaTileEntity, + new ChunkCoordIntPair(ControllerXCoordinate - 16, ControllerZCoordinate)); + GT_ChunkManager.requestChunkLoad( + (TileEntity) aBaseMetaTileEntity, + new ChunkCoordIntPair(ControllerXCoordinate, ControllerZCoordinate + 16)); + GT_ChunkManager.requestChunkLoad( + (TileEntity) aBaseMetaTileEntity, + new ChunkCoordIntPair(ControllerXCoordinate, ControllerZCoordinate - 16)); + GT_ChunkManager.requestChunkLoad( + (TileEntity) aBaseMetaTileEntity, + new ChunkCoordIntPair(ControllerXCoordinate + 16, ControllerZCoordinate + 16)); + GT_ChunkManager.requestChunkLoad( + (TileEntity) aBaseMetaTileEntity, + new ChunkCoordIntPair(ControllerXCoordinate + 16, ControllerZCoordinate - 16)); + GT_ChunkManager.requestChunkLoad( + (TileEntity) aBaseMetaTileEntity, + new ChunkCoordIntPair(ControllerXCoordinate - 16, ControllerZCoordinate + 16)); + GT_ChunkManager.requestChunkLoad( + (TileEntity) aBaseMetaTileEntity, + new ChunkCoordIntPair(ControllerXCoordinate - 16, ControllerZCoordinate - 16)); isMultiChunkloaded = true; } @@ -492,7 +1370,7 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(STRUCTURE_PIECE_MAIN, stackSize, hintsOnly, 16,21,16); + buildPiece(STRUCTURE_PIECE_MAIN, stackSize, hintsOnly, 16, 21, 16); } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java index 955bc3620b..e53bf880ba 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.machines.multi; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.GT_Mod; @@ -23,8 +25,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; - public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEntity { public static final int INPUT_SLOTS = 3, OUTPUT_SLOTS = 3; @@ -38,11 +38,11 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn @Deprecated public ItemStack mOutputItem1; + @Deprecated public ItemStack mOutputItem2; - public GT_MetaTileEntity_PrimitiveBlastFurnace(int aID, String aName, - String aNameRegional) { + public GT_MetaTileEntity_PrimitiveBlastFurnace(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, INPUT_SLOTS + OUTPUT_SLOTS); } @@ -118,7 +118,8 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn @Override public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) { - return (GregTech_API.getCoverBehaviorNew(aCoverID.toStack()).isSimpleCover()) && (super.allowCoverOnSide(aSide, aCoverID)); + return (GregTech_API.getCoverBehaviorNew(aCoverID.toStack()).isSimpleCover()) + && (super.allowCoverOnSide(aSide, aCoverID)); } @Override @@ -151,8 +152,7 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn } @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, - EntityPlayer aPlayer) { + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { if (aBaseMetaTileEntity.isClientSide()) { return true; } @@ -161,35 +161,39 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn } @Override - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, - IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_Container_PrimitiveBlastFurnace(aPlayerInventory, - aBaseMetaTileEntity); + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_PrimitiveBlastFurnace(aPlayerInventory, aBaseMetaTileEntity); } @Override - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, - IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_PrimitiveBlastFurnace(aPlayerInventory, - aBaseMetaTileEntity, getName(), - GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.mNEIName); + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_PrimitiveBlastFurnace( + aPlayerInventory, + aBaseMetaTileEntity, + getName(), + GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.mNEIName); } private boolean checkMachine() { - int xDir = - ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX; - int zDir = - ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ; + int xDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX; + int zDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ; for (int i = -1; i < 2; i++) { for (int j = -1; j < 3; j++) { for (int k = -1; k < 2; k++) { if ((xDir + i != 0) || (j != 0) || (zDir + k != 0)) { if ((i != 0) || (j == -1) || (k != 0)) { - if (!isCorrectCasingBlock(getBaseMetaTileEntity().getBlockOffset(xDir + i, j, zDir + k)) || !isCorrectCasingMetaID(getBaseMetaTileEntity().getMetaIDOffset(xDir + i, j, zDir + k))) { + if (!isCorrectCasingBlock(getBaseMetaTileEntity().getBlockOffset(xDir + i, j, zDir + k)) + || !isCorrectCasingMetaID( + getBaseMetaTileEntity().getMetaIDOffset(xDir + i, j, zDir + k))) { mChimneyBlocked = false; return false; } - } else if ((!GT_Utility.arrayContains(getBaseMetaTileEntity().getBlockOffset(xDir + i, j, zDir + k), Blocks.lava, Blocks.flowing_lava, null)) && (!getBaseMetaTileEntity().getAirOffset(xDir + i, j, zDir + k))) { + } else if ((!GT_Utility.arrayContains( + getBaseMetaTileEntity().getBlockOffset(xDir + i, j, zDir + k), + Blocks.lava, + Blocks.flowing_lava, + null)) + && (!getBaseMetaTileEntity().getAirOffset(xDir + i, j, zDir + k))) { mChimneyBlocked = true; return false; } @@ -211,16 +215,20 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn } @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, - long aTimer) { - final int lavaX = - aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1); - final int lavaZ = - aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1); + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { + final int lavaX = aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1); + final int lavaZ = aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1); if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive())) { - new WorldSpawnedEventBuilder.ParticleEventBuilder().setMotion(0D, - 0.3D, 0D).setIdentifier(ParticleFX.LARGE_SMOKE).setPosition(lavaX + XSTR_INSTANCE.nextFloat(), aBaseMetaTileEntity.getOffsetY(aBaseMetaTileEntity.getBackFacing(), 1), lavaZ + XSTR_INSTANCE.nextFloat()).setWorld(getBaseMetaTileEntity().getWorld()).run(); + new WorldSpawnedEventBuilder.ParticleEventBuilder() + .setMotion(0D, 0.3D, 0D) + .setIdentifier(ParticleFX.LARGE_SMOKE) + .setPosition( + lavaX + XSTR_INSTANCE.nextFloat(), + aBaseMetaTileEntity.getOffsetY(aBaseMetaTileEntity.getBackFacing(), 1), + lavaZ + XSTR_INSTANCE.nextFloat()) + .setWorld(getBaseMetaTileEntity().getWorld()) + .run(); } if (aBaseMetaTileEntity.isServerSide()) { if (this.mUpdate-- == 0) { @@ -233,46 +241,47 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn this.mOutputItems = null; this.mProgresstime = 0; this.mMaxProgresstime = 0; - GT_Mod.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "steel"); + GT_Mod.achievements.issueAchievement( + aBaseMetaTileEntity + .getWorld() + .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), + "steel"); } } else if (aBaseMetaTileEntity.isAllowedToWork()) { checkRecipe(); } } if (this.mMaxProgresstime > 0 && (aTimer % 20L == 0L)) { - GT_Pollution.addPollution(this.getBaseMetaTileEntity(), - GT_Mod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond); + GT_Pollution.addPollution( + this.getBaseMetaTileEntity(), GT_Mod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond); } aBaseMetaTileEntity.setActive((this.mMaxProgresstime > 0) && (this.mMachine)); final short lavaY = aBaseMetaTileEntity.getYCoord(); if (aBaseMetaTileEntity.isActive()) { if (aBaseMetaTileEntity.getAir(lavaX, lavaY, lavaZ)) { - aBaseMetaTileEntity.getWorld().setBlock(lavaX, lavaY, - lavaZ, Blocks.lava, 1, 2); + aBaseMetaTileEntity.getWorld().setBlock(lavaX, lavaY, lavaZ, Blocks.lava, 1, 2); this.mUpdate = 1; } if (aBaseMetaTileEntity.getAir(lavaX, lavaY + 1, lavaZ)) { - aBaseMetaTileEntity.getWorld().setBlock(lavaX, lavaY + 1, - lavaZ, Blocks.lava, 1, 2); + aBaseMetaTileEntity.getWorld().setBlock(lavaX, lavaY + 1, lavaZ, Blocks.lava, 1, 2); this.mUpdate = 1; } } else { - Block lowerLava = aBaseMetaTileEntity.getBlock(lavaX, lavaY, - lavaZ); - Block upperLava = aBaseMetaTileEntity.getBlock(lavaX, - lavaY + 1, lavaZ); - if (mChimneyBlocked && lowerLava == Blocks.air && upperLava == Blocks.air && aBaseMetaTileEntity.getAir(lavaX, lavaY + 2, lavaZ)) { + Block lowerLava = aBaseMetaTileEntity.getBlock(lavaX, lavaY, lavaZ); + Block upperLava = aBaseMetaTileEntity.getBlock(lavaX, lavaY + 1, lavaZ); + if (mChimneyBlocked + && lowerLava == Blocks.air + && upperLava == Blocks.air + && aBaseMetaTileEntity.getAir(lavaX, lavaY + 2, lavaZ)) { this.mUpdate = 0; } if (lowerLava == Blocks.lava) { - aBaseMetaTileEntity.getWorld().setBlock(lavaX, lavaY, - lavaZ, Blocks.air, 0, 2); + aBaseMetaTileEntity.getWorld().setBlock(lavaX, lavaY, lavaZ, Blocks.air, 0, 2); this.mUpdate = 1; } if (upperLava == Blocks.lava) { - aBaseMetaTileEntity.getWorld().setBlock(lavaX, lavaY + 1, - lavaZ, Blocks.air, 0, 2); + aBaseMetaTileEntity.getWorld().setBlock(lavaX, lavaY + 1, lavaZ, Blocks.air, 0, 2); this.mUpdate = 1; } } @@ -293,14 +302,11 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn final byte frontFacing = aBaseMetaTileEntity.getFrontFacing(); - final double oX = - aBaseMetaTileEntity.getOffsetX(frontFacing, 1) + 0.5D; + final double oX = aBaseMetaTileEntity.getOffsetX(frontFacing, 1) + 0.5D; final double oY = aBaseMetaTileEntity.getOffsetY(frontFacing, 1); - final double oZ = - aBaseMetaTileEntity.getOffsetZ(frontFacing, 1) + 0.5D; + final double oZ = aBaseMetaTileEntity.getOffsetZ(frontFacing, 1) + 0.5D; final double offset = -0.48D; - final double horizontal = - XSTR_INSTANCE.nextFloat() * 8D / 16D - 4D / 16D; + final double horizontal = XSTR_INSTANCE.nextFloat() * 8D / 16D - 4D / 16D; final double x, y, z; @@ -321,8 +327,10 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn z = oZ + offset; } - ParticleEventBuilder particleEventBuilder = - (new ParticleEventBuilder()).setMotion(0D, 0D, 0D).setPosition(x, y, z).setWorld(getBaseMetaTileEntity().getWorld()); + ParticleEventBuilder particleEventBuilder = (new ParticleEventBuilder()) + .setMotion(0D, 0D, 0D) + .setPosition(x, y, z) + .setWorld(getBaseMetaTileEntity().getWorld()); particleEventBuilder.setIdentifier(ParticleFX.SMOKE).run(); particleEventBuilder.setIdentifier(ParticleFX.FLAME).run(); } @@ -341,24 +349,23 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn for (int i = 0; i < limit; i++) { int absi = INPUT_SLOTS + i; if (this.mInventory[absi] == null) { - this.mInventory[absi] = - GT_Utility.copyOrNull(this.mOutputItems[i]); - } else if (GT_Utility.areStacksEqual(this.mInventory[absi], - this.mOutputItems[i])) { - this.mInventory[absi].stackSize = - Math.min(this.mInventory[absi].getMaxStackSize(), + this.mInventory[absi] = GT_Utility.copyOrNull(this.mOutputItems[i]); + } else if (GT_Utility.areStacksEqual(this.mInventory[absi], this.mOutputItems[i])) { + this.mInventory[absi].stackSize = Math.min( + this.mInventory[absi].getMaxStackSize(), this.mInventory[absi].stackSize + this.mOutputItems[i].stackSize); } } } - private boolean spaceForOutput(ItemStack outputStack, - int relativeOutputSlot) { + private boolean spaceForOutput(ItemStack outputStack, int relativeOutputSlot) { int absoluteSlot = relativeOutputSlot + INPUT_SLOTS; if (this.mInventory[absoluteSlot] == null || outputStack == null) { return true; } - return ((this.mInventory[absoluteSlot].stackSize + outputStack.stackSize <= this.mInventory[absoluteSlot].getMaxStackSize()) && (GT_Utility.areStacksEqual(this.mInventory[absoluteSlot], outputStack))); + return ((this.mInventory[absoluteSlot].stackSize + outputStack.stackSize + <= this.mInventory[absoluteSlot].getMaxStackSize()) + && (GT_Utility.areStacksEqual(this.mInventory[absoluteSlot], outputStack))); } private boolean checkRecipe() { @@ -367,8 +374,8 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn } ItemStack[] inputs = new ItemStack[INPUT_SLOTS]; System.arraycopy(mInventory, 0, inputs, 0, INPUT_SLOTS); - GT_Recipe recipe = - GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.findRecipe(getBaseMetaTileEntity(), false, 0, null, inputs); + GT_Recipe recipe = GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.findRecipe( + getBaseMetaTileEntity(), false, 0, null, inputs); if (recipe == null) { this.mOutputItems = null; return false; @@ -401,14 +408,12 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn } @Override - public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, - int aIndex, byte aSide, ItemStack aStack) { + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return aIndex > INPUT_SLOTS; } @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, - int aIndex, byte aSide, ItemStack aStack) { + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return !GT_Utility.areStacksEqual(aStack, this.mInventory[0]); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java index 4cd73dab3c..bf91c80532 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java @@ -1,5 +1,16 @@ package gregtech.common.tileentities.machines.multi; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.enums.GT_HatchElement.*; +import static gregtech.api.enums.GT_HatchElement.Energy; +import static gregtech.api.enums.GT_HatchElement.Maintenance; +import static gregtech.api.enums.GT_Values.VN; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PROCESSING_ARRAY; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PROCESSING_ARRAY_GLOW; +import static gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine.isValidForLowGravity; + import com.google.common.collect.ImmutableList; import com.gtnewhorizon.structurelib.structure.IStructureElement; import gregtech.GT_Mod; @@ -20,8 +31,13 @@ import gregtech.api.util.GT_ProcessingArray_Manager; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Single_Recipe_Check_Processing_Array; -import gregtech.common.blocks.GT_Item_Machines; import gregtech.api.util.GT_Utility; +import gregtech.common.blocks.GT_Item_Machines; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Objects; +import java.util.stream.Stream; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; @@ -30,24 +46,8 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.FluidStack; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; -import java.util.stream.Stream; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.enums.GT_HatchElement.*; -import static gregtech.api.enums.GT_HatchElement.Energy; -import static gregtech.api.enums.GT_HatchElement.Maintenance; -import static gregtech.api.enums.GT_Values.VN; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PROCESSING_ARRAY; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PROCESSING_ARRAY_GLOW; -import static gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine.isValidForLowGravity; - -public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_CubicMultiBlockBase<GT_MetaTileEntity_ProcessingArray> { +public class GT_MetaTileEntity_ProcessingArray + extends GT_MetaTileEntity_CubicMultiBlockBase<GT_MetaTileEntity_ProcessingArray> { private GT_Recipe_Map mLastRecipeMap; private GT_Recipe mLastRecipe; @@ -97,30 +97,55 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_CubicMu @Override public boolean addToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - return super.addToMachineList(aTileEntity, aBaseCasingIndex) || addExoticEnergyInputToMachineList(aTileEntity, aBaseCasingIndex); + return super.addToMachineList(aTileEntity, aBaseCasingIndex) + || addExoticEnergyInputToMachineList(aTileEntity, aBaseCasingIndex); } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { if (aSide == aFacing) { - if (aActive) return new ITexture[]{ - BlockIcons.casingTexturePages[0][48], - TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE_GLOW).extFacing().glow().build()}; - return new ITexture[]{ + if (aActive) + return new ITexture[] { BlockIcons.casingTexturePages[0][48], - TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_GLOW).extFacing().glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE_GLOW) + .extFacing() + .glow() + .build() + }; + return new ITexture[] { + BlockIcons.casingTexturePages[0][48], + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_PROCESSING_ARRAY) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_GLOW) + .extFacing() + .glow() + .build() + }; } - return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][48]}; + return new ITexture[] {Textures.BlockIcons.casingTexturePages[0][48]}; } @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "ProcessingArray.png"); + return new GT_GUIContainer_MultiMachine( + aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "ProcessingArray.png"); } - //TODO: Expand so it also does the non recipe map recipes + // TODO: Expand so it also does the non recipe map recipes /* public void remoteRecipeCheck() { if (mInventory[1] == null) return; @@ -143,12 +168,12 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_CubicMu } */ - //Gets the recipe map for the given machine through its unlocalized name + // Gets the recipe map for the given machine through its unlocalized name @Override public GT_Recipe_Map getRecipeMap() { if (isCorrectMachinePart(mInventory[1])) { int length = mInventory[1].getUnlocalizedName().length(); - String aMachineName = mInventory[1].getUnlocalizedName().substring(17,length-8); + String aMachineName = mInventory[1].getUnlocalizedName().substring(17, length - 8); return GT_ProcessingArray_Manager.giveRecipeMap(aMachineName); } return null; @@ -183,26 +208,25 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_CubicMu if (mLastRecipe == null) { IMetaTileEntity aMachine = GT_Item_Machines.getMetaTileEntity(mInventory[1]); - if (aMachine!=null) - tTier = ((GT_MetaTileEntity_TieredMachineBlock) aMachine).mTier; + if (aMachine != null) tTier = ((GT_MetaTileEntity_TieredMachineBlock) aMachine).mTier; mMult = 0; - if (downtierUEV && tTier>9){ - switch(tTier){ + if (downtierUEV && tTier > 9) { + switch (tTier) { default: - tTier=0; + tTier = 0; break; case 10: - tTier=9; - mMult=2; //Parallels are 4x as strong and require 4x less EU/t + tTier = 9; + mMult = 2; // Parallels are 4x as strong and require 4x less EU/t case 11: - tTier=9; - mMult=4; //Parallels are 16x as strong and require 16x less EU/t + tTier = 9; + mMult = 4; // Parallels are 16x as strong and require 16x less EU/t case 12: case 13: case 14: case 15: - tTier=9; - mMult=6; //Parallels are 64x as strong and require 64x less EU/t + tTier = 9; + mMult = 6; // Parallels are 64x as strong and require 64x less EU/t } } } @@ -213,14 +237,11 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_CubicMu for (GT_MetaTileEntity_Hatch_InputBus tHatch : mInputBusses) { IGregTechTileEntity tInputBus = tHatch.getBaseMetaTileEntity(); for (int i = tInputBus.getSizeInventory() - 1; i >= 0; i--) { - if (tInputBus.getStackInSlot(i) != null) - tInputList.add(tInputBus.getStackInSlot(i)); + if (tInputBus.getStackInSlot(i) != null) tInputList.add(tInputBus.getStackInSlot(i)); } ItemStack[] tInputs = tInputList.toArray(new ItemStack[0]); - if (processRecipe(tInputs, tFluids, map)) - return true; - else - tInputList.clear(); + if (processRecipe(tInputs, tFluids, map)) return true; + else tInputList.clear(); } } else { ArrayList<ItemStack> tInputList = getStoredInputs(); @@ -231,7 +252,8 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_CubicMu } public boolean processLockedRecipe() { - GT_Single_Recipe_Check_Processing_Array tSingleRecipeCheck = (GT_Single_Recipe_Check_Processing_Array) mSingleRecipeCheck; + GT_Single_Recipe_Check_Processing_Array tSingleRecipeCheck = + (GT_Single_Recipe_Check_Processing_Array) mSingleRecipeCheck; int machines = mInventory[1].stackSize << mMult; int parallel = tSingleRecipeCheck.checkRecipeInputs(true, machines); @@ -241,17 +263,20 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_CubicMu public boolean processRecipe(ItemStack[] tInputs, FluidStack[] tFluids, GT_Recipe.GT_Recipe_Map map) { if (tInputs.length <= 0 && tFluids.length <= 0) return false; - GT_Recipe tRecipe = map.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs); + GT_Recipe tRecipe = map.findRecipe( + getBaseMetaTileEntity(), mLastRecipe, false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs); if (tRecipe == null) return false; - if (GT_Mod.gregtechproxy.mLowGravProcessing && tRecipe.mSpecialValue == -100 && - !isValidForLowGravity(tRecipe, getBaseMetaTileEntity().getWorld().provider.dimensionId)) + if (GT_Mod.gregtechproxy.mLowGravProcessing + && tRecipe.mSpecialValue == -100 + && !isValidForLowGravity(tRecipe, getBaseMetaTileEntity().getWorld().provider.dimensionId)) return false; GT_Single_Recipe_Check_Processing_Array.Builder tSingleRecipeCheckBuilder = null; if (mLockedToSingleRecipe) { // We're locked to a single recipe, but haven't built the recipe checker yet. // Build the checker on next successful recipe. - tSingleRecipeCheckBuilder = GT_Single_Recipe_Check_Processing_Array.processingArrayBuilder(this).setBefore(); + tSingleRecipeCheckBuilder = GT_Single_Recipe_Check_Processing_Array.processingArrayBuilder(this) + .setBefore(); } boolean recipeLocked = false; @@ -263,12 +288,11 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_CubicMu break; } else if (mLockedToSingleRecipe && !recipeLocked) { // We want to lock to a single run of the recipe. - mSingleRecipeCheck = - tSingleRecipeCheckBuilder - .setAfter() - .setRecipe(tRecipe) - .setRecipeAmperage(map.mAmperage) - .build(); + mSingleRecipeCheck = tSingleRecipeCheckBuilder + .setAfter() + .setRecipe(tRecipe) + .setRecipeAmperage(map.mAmperage) + .build(); recipeLocked = true; } } @@ -288,12 +312,10 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_CubicMu this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; calculateOverclockedNessMulti(aRecipe.mEUt, aRecipe.mDuration, aAmperage, GT_Values.V[tTier]); - //In case recipe is too OP for that machine - if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) - return false; + // In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return false; this.mEUt = GT_Utility.safeInt(((long) this.mEUt * parallel) >> mMult, 1); - if (mEUt == Integer.MAX_VALUE - 1) - return false; + if (mEUt == Integer.MAX_VALUE - 1) return false; if (this.mEUt > 0) { this.mEUt = (-this.mEUt); @@ -325,7 +347,7 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_CubicMu .flatMap(GT_MetaTileEntity_ProcessingArray::splitOversizedStack) .filter(is -> is.stackSize > 0) .toArray(ItemStack[]::new); - this.mOutputFluids = new FluidStack[]{tFOut}; + this.mOutputFluids = new FluidStack[] {tFOut}; updateSlots(); return true; } @@ -394,12 +416,14 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_CubicMu super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); } else { mSeparate = !mSeparate; - GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + mSeparate); + GT_Utility.sendChatToPlayer( + aPlayer, StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + mSeparate); } } @Override - public boolean onWireCutterRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + public boolean onWireCutterRightClick( + byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { downtierUEV = !downtierUEV; mLastRecipe = null; // clears last recipe GT_Utility.sendChatToPlayer(aPlayer, "Treat UEV+ machines as multiple UHV " + downtierUEV); @@ -423,7 +447,8 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_CubicMu @Override protected List<IHatchElement<? super GT_MetaTileEntity_CubicMultiBlockBase<?>>> getAllowedHatches() { - return ImmutableList.of(InputHatch, OutputHatch, InputBus, OutputBus, Muffler, Maintenance, Energy, ExoticEnergy); + return ImmutableList.of( + InputHatch, OutputHatch, InputBus, OutputBus, Muffler, Maintenance, Energy, ExoticEnergy); } @Override @@ -439,38 +464,50 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_CubicMu @Override public String[] getInfoData() { - long storedEnergy=0; - long maxEnergy=0; - for(GT_MetaTileEntity_Hatch tHatch : mExoticEnergyHatches) { + long storedEnergy = 0; + long maxEnergy = 0; + for (GT_MetaTileEntity_Hatch tHatch : mExoticEnergyHatches) { if (isValidMetaTileEntity(tHatch)) { - storedEnergy+=tHatch.getBaseMetaTileEntity().getStoredEU(); - maxEnergy+=tHatch.getBaseMetaTileEntity().getEUCapacity(); + storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU(); + maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity(); } } - return new String[]{ - StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mProgresstime / 20) + EnumChatFormatting.RESET + " s / " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(mMaxProgresstime / 20) + EnumChatFormatting.RESET + " s", - StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", - StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " + - EnumChatFormatting.RED + GT_Utility.formatNumbers(-mEUt) + EnumChatFormatting.RESET + " EU/t", - StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(GT_ExoticEnergyInputHelper.getMaxInputVoltageMulti(getExoticAndNormalEnergyHatchList())) + EnumChatFormatting.RESET + " EU/t(*" + GT_Utility.formatNumbers(GT_ExoticEnergyInputHelper.getMaxInputAmpsMulti(getExoticAndNormalEnergyHatchList())) + "A) " + - StatCollector.translateToLocal("GT5U.machines.tier") + ": " + - EnumChatFormatting.YELLOW + VN[GT_Utility.getTier(GT_ExoticEnergyInputHelper.getMaxInputVoltageMulti(getExoticAndNormalEnergyHatchList()))] + EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " + - EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + " " + - StatCollector.translateToLocal("GT5U.multiblock.efficiency") + ": " + - EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", - StatCollector.translateToLocal("GT5U.PA.machinetier") + ": " + - EnumChatFormatting.GREEN + tTier + EnumChatFormatting.RESET + " " + - StatCollector.translateToLocal("GT5U.PA.discount") + ": " + - EnumChatFormatting.GREEN + (1 << mMult) + EnumChatFormatting.RESET + " x", - StatCollector.translateToLocal("GT5U.PA.parallel") + ": " + - EnumChatFormatting.GREEN + GT_Utility.formatNumbers((mInventory[1] != null) ? (mInventory[1].stackSize << mMult) : 0) + EnumChatFormatting.RESET + return new String[] { + StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(mProgresstime / 20) + EnumChatFormatting.RESET + " s / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(mMaxProgresstime / 20) + EnumChatFormatting.RESET + " s", + StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", + StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " + EnumChatFormatting.RED + + GT_Utility.formatNumbers(-mEUt) + EnumChatFormatting.RESET + " EU/t", + StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers( + GT_ExoticEnergyInputHelper.getMaxInputVoltageMulti(getExoticAndNormalEnergyHatchList())) + + EnumChatFormatting.RESET + " EU/t(*" + + GT_Utility.formatNumbers( + GT_ExoticEnergyInputHelper.getMaxInputAmpsMulti(getExoticAndNormalEnergyHatchList())) + + "A) " + StatCollector.translateToLocal("GT5U.machines.tier") + + ": " + EnumChatFormatting.YELLOW + + VN[ + GT_Utility.getTier(GT_ExoticEnergyInputHelper.getMaxInputVoltageMulti( + getExoticAndNormalEnergyHatchList()))] + + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " + EnumChatFormatting.RED + + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + " " + + StatCollector.translateToLocal("GT5U.multiblock.efficiency") + + ": " + EnumChatFormatting.YELLOW + + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", + StatCollector.translateToLocal("GT5U.PA.machinetier") + ": " + EnumChatFormatting.GREEN + + tTier + EnumChatFormatting.RESET + " " + StatCollector.translateToLocal("GT5U.PA.discount") + + ": " + EnumChatFormatting.GREEN + + (1 << mMult) + EnumChatFormatting.RESET + " x", + StatCollector.translateToLocal("GT5U.PA.parallel") + ": " + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers((mInventory[1] != null) ? (mInventory[1].stackSize << mMult) : 0) + + EnumChatFormatting.RESET }; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java index 16a655b20c..26c538e20b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java @@ -1,5 +1,18 @@ package gregtech.common.tileentities.machines.multi; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlockUnlocalizedName; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.enums.GT_HatchElement.*; +import static gregtech.api.enums.GT_Values.MOD_ID_DC; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN_GLOW; +import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; +import static gregtech.api.util.GT_StructureUtility.ofCoil; + import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IItemSource; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; @@ -27,55 +40,52 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlockUnlocalizedName; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.enums.GT_HatchElement.*; -import static gregtech.api.enums.GT_Values.MOD_ID_DC; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN_GLOW; -import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; -import static gregtech.api.util.GT_StructureUtility.ofCoil; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_PyrolyseOven> implements ISurvivalConstructable { +public class GT_MetaTileEntity_PyrolyseOven + extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_PyrolyseOven> + implements ISurvivalConstructable { private HeatingCoilLevel coilHeat; - //public static GT_CopiedBlockTexture mTextureULV = new GT_CopiedBlockTexture(Block.getBlockFromItem(ItemList.Casing_ULV.get(1).getItem()), 6, 0, Dyes.MACHINE_METAL.mRGBa); + // public static GT_CopiedBlockTexture mTextureULV = new + // GT_CopiedBlockTexture(Block.getBlockFromItem(ItemList.Casing_ULV.get(1).getItem()), 6, 0, + // Dyes.MACHINE_METAL.mRGBa); private static final int CASING_INDEX = 1090; - private static final IStructureDefinition<GT_MetaTileEntity_PyrolyseOven> STRUCTURE_DEFINITION = createStructureDefinition(); + private static final IStructureDefinition<GT_MetaTileEntity_PyrolyseOven> STRUCTURE_DEFINITION = + createStructureDefinition(); private static IStructureDefinition<GT_MetaTileEntity_PyrolyseOven> createStructureDefinition() { - IStructureElement<GT_MetaTileEntity_PyrolyseOven> tCasingElement = - Loader.isModLoaded(MOD_ID_DC) ? - ofBlockUnlocalizedName(MOD_ID_DC, "gt.blockcasingsNH", 2) : - ofBlock(GregTech_API.sBlockCasings1, 0); + IStructureElement<GT_MetaTileEntity_PyrolyseOven> tCasingElement = Loader.isModLoaded(MOD_ID_DC) + ? ofBlockUnlocalizedName(MOD_ID_DC, "gt.blockcasingsNH", 2) + : ofBlock(GregTech_API.sBlockCasings1, 0); return StructureDefinition.<GT_MetaTileEntity_PyrolyseOven>builder() - .addShape("main", transpose(new String[][]{ - {"ccccc", "ctttc", "ctttc", "ctttc", "ccccc"}, - {"ccccc", "c---c", "c---c", "c---c", "ccccc"}, - {"ccccc", "c---c", "c---c", "c---c", "ccccc"}, - {"bb~bb", "bCCCb", "bCCCb", "bCCCb", "bbbbb"}, + .addShape("main", transpose(new String[][] { + {"ccccc", "ctttc", "ctttc", "ctttc", "ccccc"}, + {"ccccc", "c---c", "c---c", "c---c", "ccccc"}, + {"ccccc", "c---c", "c---c", "c---c", "ccccc"}, + {"bb~bb", "bCCCb", "bCCCb", "bCCCb", "bbbbb"}, })) .addElement('c', onElementPass(GT_MetaTileEntity_PyrolyseOven::onCasingAdded, tCasingElement)) - .addElement('C', ofCoil(GT_MetaTileEntity_PyrolyseOven::setCoilLevel, GT_MetaTileEntity_PyrolyseOven::getCoilLevel)) - .addElement('b', buildHatchAdder(GT_MetaTileEntity_PyrolyseOven.class) - .atLeast(OutputBus, OutputHatch, Energy, Maintenance) - .casingIndex(CASING_INDEX) - .dot(1) - .buildAndChain(onElementPass(GT_MetaTileEntity_PyrolyseOven::onCasingAdded, tCasingElement)) - ) - .addElement('t', buildHatchAdder(GT_MetaTileEntity_PyrolyseOven.class) - .atLeast(InputBus, InputHatch, Muffler) - .casingIndex(CASING_INDEX) - .dot(1) - .buildAndChain(onElementPass(GT_MetaTileEntity_PyrolyseOven::onCasingAdded, tCasingElement)) - ) + .addElement( + 'C', + ofCoil( + GT_MetaTileEntity_PyrolyseOven::setCoilLevel, + GT_MetaTileEntity_PyrolyseOven::getCoilLevel)) + .addElement( + 'b', + buildHatchAdder(GT_MetaTileEntity_PyrolyseOven.class) + .atLeast(OutputBus, OutputHatch, Energy, Maintenance) + .casingIndex(CASING_INDEX) + .dot(1) + .buildAndChain( + onElementPass(GT_MetaTileEntity_PyrolyseOven::onCasingAdded, tCasingElement))) + .addElement( + 't', + buildHatchAdder(GT_MetaTileEntity_PyrolyseOven.class) + .atLeast(InputBus, InputHatch, Muffler) + .casingIndex(CASING_INDEX) + .dot(1) + .buildAndChain( + onElementPass(GT_MetaTileEntity_PyrolyseOven::onCasingAdded, tCasingElement))) .build(); } @@ -116,24 +126,47 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_EnhancedMu } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { if (aSide == aFacing) { if (aActive) - return new ITexture[]{ - BlockIcons.casingTexturePages[8][66], - TextureFactory.builder().addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE_GLOW).extFacing().glow().build()}; - return new ITexture[]{ + return new ITexture[] { BlockIcons.casingTexturePages[8][66], - TextureFactory.builder().addIcon(OVERLAY_FRONT_PYROLYSE_OVEN).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_GLOW).extFacing().glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE_GLOW) + .extFacing() + .glow() + .build() + }; + return new ITexture[] { + BlockIcons.casingTexturePages[8][66], + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_PYROLYSE_OVEN) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_GLOW) + .extFacing() + .glow() + .build() + }; } - return new ITexture[]{Textures.BlockIcons.casingTexturePages[8][66]}; + return new ITexture[] {Textures.BlockIcons.casingTexturePages[8][66]}; } @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "PyrolyseOven.png"); + return new GT_GUIContainer_MultiMachine( + aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "PyrolyseOven.png"); } @Override @@ -157,8 +190,7 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_EnhancedMu ItemStack[] tInputs = getCompactedInputs(); FluidStack[] tFluids = getCompactedFluids(); - if (tInputs.length <= 0) - return false; + if (tInputs.length <= 0) return false; GT_Single_Recipe_Check.Builder tSingleRecipeCheckBuilder = null; if (mLockedToSingleRecipe) { @@ -167,13 +199,14 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_EnhancedMu tSingleRecipeCheckBuilder = GT_Single_Recipe_Check.builder(this).setBefore(); } - tRecipe = GT_Recipe.GT_Recipe_Map.sPyrolyseRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs); + tRecipe = GT_Recipe.GT_Recipe_Map.sPyrolyseRecipes.findRecipe( + getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs); - if (tRecipe == null || !tRecipe.isRecipeInputEqual(true, tFluids, tInputs)) - return false; + if (tRecipe == null || !tRecipe.isRecipeInputEqual(true, tFluids, tInputs)) return false; if (mLockedToSingleRecipe) { - mSingleRecipeCheck = tSingleRecipeCheckBuilder.setAfter().setRecipe(tRecipe).build(); + mSingleRecipeCheck = + tSingleRecipeCheckBuilder.setAfter().setRecipe(tRecipe).build(); } } @@ -181,16 +214,12 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_EnhancedMu this.mEfficiencyIncrease = 10000; calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, tVoltage); - //In case recipe is too OP for that machine - if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) - return false; - if (this.mEUt > 0) - this.mEUt = (-this.mEUt); + // In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return false; + if (this.mEUt > 0) this.mEUt = (-this.mEUt); this.mMaxProgresstime = Math.max(mMaxProgresstime * 2 / (1 + coilHeat.getTier()), 1); - if (tRecipe.mOutputs.length > 0) - this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)}; - if (tRecipe.mFluidOutputs.length > 0) - this.mOutputFluids = new FluidStack[]{tRecipe.getFluidOutput(0)}; + if (tRecipe.mOutputs.length > 0) this.mOutputItems = new ItemStack[] {tRecipe.getOutput(0)}; + if (tRecipe.mFluidOutputs.length > 0) this.mOutputFluids = new FluidStack[] {tRecipe.getFluidOutput(0)}; updateSlots(); return true; } @@ -217,8 +246,10 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_EnhancedMu coilHeat = HeatingCoilLevel.None; mCasingAmount = 0; replaceDeprecatedCoils(aBaseMetaTileEntity); - return checkPiece("main", 2, 3, 0) && mCasingAmount >= 60 && - mMaintenanceHatches.size() == 1 && !mMufflerHatches.isEmpty(); + return checkPiece("main", 2, 3, 0) + && mCasingAmount >= 60 + && mMaintenanceHatches.size() == 1 + && !mMufflerHatches.isEmpty(); } @Override @@ -259,8 +290,8 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_EnhancedMu int tZ = aBaseMetaTileEntity.getZCoord() + zDir * 2; for (int xPos = tX - 1; xPos <= tX + 1; xPos++) { for (int zPos = tZ - 1; zPos <= tZ + 1; zPos++) { - if (aBaseMetaTileEntity.getBlock(xPos, tY, zPos) == GregTech_API.sBlockCasings1 && - aBaseMetaTileEntity.getMetaID(xPos, tY, zPos) == 13) { + if (aBaseMetaTileEntity.getBlock(xPos, tY, zPos) == GregTech_API.sBlockCasings1 + && aBaseMetaTileEntity.getMetaID(xPos, tY, zPos) == 13) { aBaseMetaTileEntity.getWorld().setBlock(xPos, tY, zPos, GregTech_API.sBlockCasings5, 1, 3); } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java index f476e78310..5bbed8951c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java @@ -1,5 +1,11 @@ package gregtech.common.tileentities.machines.multi; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; + import com.gtnewhorizon.structurelib.structure.IStructureElement; import com.gtnewhorizon.structurelib.structure.StructureUtility; import gregtech.api.GregTech_API; @@ -16,13 +22,8 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; - -public class GT_MetaTileEntity_VacuumFreezer extends GT_MetaTileEntity_CubicMultiBlockBase<GT_MetaTileEntity_VacuumFreezer> { +public class GT_MetaTileEntity_VacuumFreezer + extends GT_MetaTileEntity_CubicMultiBlockBase<GT_MetaTileEntity_VacuumFreezer> { public GT_MetaTileEntity_VacuumFreezer(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } @@ -57,29 +58,52 @@ public class GT_MetaTileEntity_VacuumFreezer extends GT_MetaTileEntity_CubicMult } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { ITexture[] rTexture; if (aSide == aFacing) { if (aActive) { - rTexture = new ITexture[]{ - casingTexturePages[0][17], - TextureFactory.builder().addIcon(OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE_GLOW).extFacing().glow().build()}; + rTexture = new ITexture[] { + casingTexturePages[0][17], + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE_GLOW) + .extFacing() + .glow() + .build() + }; } else { - rTexture = new ITexture[]{ - casingTexturePages[0][17], - TextureFactory.builder().addIcon(OVERLAY_FRONT_VACUUM_FREEZER).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_VACUUM_FREEZER_GLOW).extFacing().glow().build()}; + rTexture = new ITexture[] { + casingTexturePages[0][17], + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_VACUUM_FREEZER) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_VACUUM_FREEZER_GLOW) + .extFacing() + .glow() + .build() + }; } } else { - rTexture = new ITexture[]{casingTexturePages[0][17]}; + rTexture = new ITexture[] {casingTexturePages[0][17]}; } return rTexture; } @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "VacuumFreezer.png"); + return new GT_GUIContainer_MultiMachine( + aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "VacuumFreezer.png"); } @Override @@ -99,22 +123,23 @@ public class GT_MetaTileEntity_VacuumFreezer extends GT_MetaTileEntity_CubicMult long tVoltage = getMaxInputVoltage(); byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - GT_Recipe tRecipe = getRecipeMap().findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluidList, tInputList); + GT_Recipe tRecipe = getRecipeMap() + .findRecipe( + getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluidList, tInputList); if (tRecipe != null) { if (tRecipe.isRecipeInputEqual(true, tFluidList, tInputList)) { this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, tVoltage); - //In case recipe is too OP for that machine - if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) - return false; + // In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return false; if (this.mEUt > 0) { this.mEUt = (-this.mEUt); } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)}; - this.mOutputFluids = new FluidStack[]{tRecipe.getFluidOutput(0)}; + this.mOutputItems = new ItemStack[] {tRecipe.getOutput(0)}; + this.mOutputFluids = new FluidStack[] {tRecipe.getFluidOutput(0)}; updateSlots(); return true; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multiblock/MultiBlock_Macerator.java b/src/main/java/gregtech/common/tileentities/machines/multiblock/MultiBlock_Macerator.java index 23a2a484d1..09aae61527 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multiblock/MultiBlock_Macerator.java +++ b/src/main/java/gregtech/common/tileentities/machines/multiblock/MultiBlock_Macerator.java @@ -1,17 +1,5 @@ package gregtech.common.tileentities.machines.multiblock; -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import com.gtnewhorizon.structurelib.util.Vec3Impl; -import gregtech.api.interfaces.ITexture; -import gregtech.api.multitileentity.multiblock.base.MultiBlockPart; -import gregtech.api.multitileentity.multiblock.base.MultiBlock_Stackable; -import gregtech.api.render.TextureFactory; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.common.render.GT_MultiTexture; -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; - import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; @@ -24,6 +12,15 @@ import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.ITEM_I import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.ITEM_OUT; import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.NOTHING; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import com.gtnewhorizon.structurelib.util.Vec3Impl; +import gregtech.api.interfaces.ITexture; +import gregtech.api.multitileentity.multiblock.base.MultiBlock_Stackable; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import net.minecraft.block.Block; + public class MultiBlock_Macerator extends MultiBlock_Stackable<MultiBlock_Macerator> { private IStructureDefinition<MultiBlock_Macerator> STRUCTURE_DEFINITION = null; @@ -36,52 +33,59 @@ public class MultiBlock_Macerator extends MultiBlock_Stackable<MultiBlock_Macera public IStructureDefinition<MultiBlock_Macerator> getStructureDefinition() { if (STRUCTURE_DEFINITION == null) { STRUCTURE_DEFINITION = StructureDefinition.<MultiBlock_Macerator>builder() - .addShape(STACKABLE_TOP, transpose(new String[][] { - {" CCC ", "CCCCC", "CCCCC", "CCCCC", " CCC "}, - })) - .addShape(STACKABLE_MIDDLE, transpose(new String[][] { - {" BBB ", " B---B ", "DC---CD", " B---B ", " BBB "}, - })) - .addShape(STACKABLE_BOTTOM, transpose(new String[][] { - {" A~A ", "AAAAA", "AAAAA", "AAAAA", " AAA "}, - })) - .addElement('A', ofChain(addMultiTileCasing(getCasingRegistryID(), getCasingMeta(), ENERGY_IN))) - .addElement('B', ofChain(addMultiTileCasing(getCasingRegistryID(), getCasingMeta(), FLUID_IN | ITEM_IN | FLUID_OUT | ITEM_OUT))) - .addElement('C', addMultiTileCasing(getCasingRegistryID(), getCasingMeta(), NOTHING)) - .addElement('D', addMultiTileCasing(getCasingRegistryID(), getCasingMeta(), NOTHING)) - .build(); + .addShape(STACKABLE_TOP, transpose(new String[][] { + {" CCC ", "CCCCC", "CCCCC", "CCCCC", " CCC "}, + })) + .addShape(STACKABLE_MIDDLE, transpose(new String[][] { + {" BBB ", " B---B ", "DC---CD", " B---B ", " BBB "}, + })) + .addShape(STACKABLE_BOTTOM, transpose(new String[][] { + {" A~A ", "AAAAA", "AAAAA", "AAAAA", " AAA "}, + })) + .addElement('A', ofChain(addMultiTileCasing(getCasingRegistryID(), getCasingMeta(), ENERGY_IN))) + .addElement( + 'B', + ofChain(addMultiTileCasing( + getCasingRegistryID(), getCasingMeta(), FLUID_IN | ITEM_IN | FLUID_OUT | ITEM_OUT))) + .addElement('C', addMultiTileCasing(getCasingRegistryID(), getCasingMeta(), NOTHING)) + .addElement('D', addMultiTileCasing(getCasingRegistryID(), getCasingMeta(), NOTHING)) + .build(); } return STRUCTURE_DEFINITION; } - @Override public short getCasingRegistryID() { + @Override + public short getCasingRegistryID() { return getMultiTileEntityRegistryID(); } - @Override public short getCasingMeta() { + @Override + public short getCasingMeta() { return 18000; } @Override - public boolean hasTop() { return true; } - + public boolean hasTop() { + return true; + } @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); tt.addMachineType("Macerator") - .addInfo("Controller for the Macerator") - .addSeparator() - .beginVariableStructureBlock(7, 9, 2 + getMinStacks(), 2+getMaxStacks(), 7, 9, true) - .addController("Bottom Front Center") - .addCasingInfo("Test Casing", 60) - .addEnergyHatch("Any bottom layer casing") - .addInputHatch("Any non-optional external facing casing on the stacks") - .addInputBus("Any non-optional external facing casing on the stacks") - .addOutputHatch("Any non-optional external facing casing on the stacks") - .addOutputBus("Any non-optional external facing casing on the stacks") - .addStructureInfo(String.format("Stackable middle stacks between %d-%d time(s).", getMinStacks(), getMaxStacks())) - .toolTipFinisher("Wildcard"); + .addInfo("Controller for the Macerator") + .addSeparator() + .beginVariableStructureBlock(7, 9, 2 + getMinStacks(), 2 + getMaxStacks(), 7, 9, true) + .addController("Bottom Front Center") + .addCasingInfo("Test Casing", 60) + .addEnergyHatch("Any bottom layer casing") + .addInputHatch("Any non-optional external facing casing on the stacks") + .addInputBus("Any non-optional external facing casing on the stacks") + .addOutputHatch("Any non-optional external facing casing on the stacks") + .addOutputBus("Any non-optional external facing casing on the stacks") + .addStructureInfo( + String.format("Stackable middle stacks between %d-%d time(s).", getMinStacks(), getMaxStacks())) + .toolTipFinisher("Wildcard"); return tt; } @@ -95,7 +99,6 @@ public class MultiBlock_Macerator extends MultiBlock_Stackable<MultiBlock_Macera return 10; } - @Override public Vec3Impl getStartingStructureOffset() { return new Vec3Impl(2, 0, 0); @@ -119,19 +122,24 @@ public class MultiBlock_Macerator extends MultiBlock_Stackable<MultiBlock_Macera @Override public ITexture[] getTexture(Block aBlock, byte aSide, boolean isActive, int aRenderPass) { // TODO: MTE(Texture) - if(mFacing == aSide) { - return new ITexture[]{ + if (mFacing == aSide) { + return new ITexture[] { // Base Texture MACHINE_CASINGS[1][0], // Active - TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE).extFacing().build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE) + .extFacing() + .build(), // Active Glow - TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW).extFacing().glow().build() + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW) + .extFacing() + .glow() + .build() }; } // Base Texture - return new ITexture[]{ MACHINE_CASINGS[1][0]}; + return new ITexture[] {MACHINE_CASINGS[1][0]}; } - - } diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java index 821c3bfabc..129af9dc27 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.machines.steam; +import static gregtech.api.enums.Textures.BlockIcons.*; + import gregtech.api.enums.SoundResource; import gregtech.api.gui.GT_GUIContainer_BasicMachine; import gregtech.api.interfaces.ITexture; @@ -11,8 +13,6 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; -import static gregtech.api.enums.Textures.BlockIcons.*; - public class GT_MetaTileEntity_AlloySmelter_Bronze extends GT_MetaTileEntity_BasicMachine_Bronze { public GT_MetaTileEntity_AlloySmelter_Bronze(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, "Combination Smelter", 2, 1, false); @@ -38,7 +38,12 @@ public class GT_MetaTileEntity_AlloySmelter_Bronze extends GT_MetaTileEntity_Bas @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeAlloySmelter.png", GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes.mUnlocalizedName); + return new GT_GUIContainer_BasicMachine( + aPlayerInventory, + aBaseMetaTileEntity, + getLocalName(), + "BronzeAlloySmelter.png", + GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes.mUnlocalizedName); } @Override @@ -61,65 +66,97 @@ public class GT_MetaTileEntity_AlloySmelter_Bronze extends GT_MetaTileEntity_Bas @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_ALLOY_SMELTER), - TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_ALLOY_SMELTER), - TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_ALLOY_SMELTER), - TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_ALLOY_SMELTER_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_TOP_STEAM_ALLOY_SMELTER_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_GLOW) + .glow() + .build() + }; } } diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java index efd66a4f8f..2ad1a2ff01 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.machines.steam; +import static gregtech.api.enums.Textures.BlockIcons.*; + import gregtech.api.enums.SoundResource; import gregtech.api.gui.GT_GUIContainer_BasicMachine; import gregtech.api.interfaces.ITexture; @@ -11,8 +13,6 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; -import static gregtech.api.enums.Textures.BlockIcons.*; - public class GT_MetaTileEntity_AlloySmelter_Steel extends GT_MetaTileEntity_BasicMachine_Steel { public GT_MetaTileEntity_AlloySmelter_Steel(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, "Combination Smelter", 2, 1, true); @@ -38,7 +38,12 @@ public class GT_MetaTileEntity_AlloySmelter_Steel extends GT_MetaTileEntity_Basi @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelAlloySmelter.png", GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes.mUnlocalizedName); + return new GT_GUIContainer_BasicMachine( + aPlayerInventory, + aBaseMetaTileEntity, + getLocalName(), + "SteelAlloySmelter.png", + GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes.mUnlocalizedName); } @Override @@ -61,65 +66,97 @@ public class GT_MetaTileEntity_AlloySmelter_Steel extends GT_MetaTileEntity_Basi @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_ALLOY_SMELTER), - TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_ALLOY_SMELTER), - TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_ALLOY_SMELTER), - TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_ALLOY_SMELTER_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_TOP_STEAM_ALLOY_SMELTER_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_GLOW) + .glow() + .build() + }; } } diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java index 9073b997ed..9fe3586790 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.machines.steam; +import static gregtech.api.enums.Textures.BlockIcons.*; + import gregtech.api.enums.SoundResource; import gregtech.api.gui.GT_GUIContainer_BasicMachine; import gregtech.api.interfaces.ITexture; @@ -11,8 +13,6 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; -import static gregtech.api.enums.Textures.BlockIcons.*; - public class GT_MetaTileEntity_Compressor_Bronze extends GT_MetaTileEntity_BasicMachine_Bronze { public GT_MetaTileEntity_Compressor_Bronze(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, "Compressing Items", 1, 1, false); @@ -28,7 +28,12 @@ public class GT_MetaTileEntity_Compressor_Bronze extends GT_MetaTileEntity_Basic @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeCompressor.png", GT_Recipe.GT_Recipe_Map.sCompressorRecipes.mUnlocalizedName); + return new GT_GUIContainer_BasicMachine( + aPlayerInventory, + aBaseMetaTileEntity, + getLocalName(), + "BronzeCompressor.png", + GT_Recipe.GT_Recipe_Map.sCompressorRecipes.mUnlocalizedName); } @Override @@ -56,65 +61,97 @@ public class GT_MetaTileEntity_Compressor_Bronze extends GT_MetaTileEntity_Basic @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR), - TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR), - TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_COMPRESSOR), - TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_COMPRESSOR_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_COMPRESSOR_GLOW) + .glow() + .build() + }; } } diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java index 51f44a8c77..e3781e91a8 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.machines.steam; +import static gregtech.api.enums.Textures.BlockIcons.*; + import gregtech.api.enums.SoundResource; import gregtech.api.gui.GT_GUIContainer_BasicMachine; import gregtech.api.interfaces.ITexture; @@ -11,8 +13,6 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; -import static gregtech.api.enums.Textures.BlockIcons.*; - public class GT_MetaTileEntity_Compressor_Steel extends GT_MetaTileEntity_BasicMachine_Steel { public GT_MetaTileEntity_Compressor_Steel(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, "Compressing Items", 1, 1, true); @@ -28,7 +28,12 @@ public class GT_MetaTileEntity_Compressor_Steel extends GT_MetaTileEntity_BasicM @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelCompressor.png", GT_Recipe.GT_Recipe_Map.sCompressorRecipes.mUnlocalizedName); + return new GT_GUIContainer_BasicMachine( + aPlayerInventory, + aBaseMetaTileEntity, + getLocalName(), + "SteelCompressor.png", + GT_Recipe.GT_Recipe_Map.sCompressorRecipes.mUnlocalizedName); } @Override @@ -56,65 +61,97 @@ public class GT_MetaTileEntity_Compressor_Steel extends GT_MetaTileEntity_BasicM @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR), - TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR), - TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_COMPRESSOR), - TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_COMPRESSOR_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_COMPRESSOR_GLOW) + .glow() + .build() + }; } } diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java index 0773c09204..17fda5fc8d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.machines.steam; +import static gregtech.api.enums.Textures.BlockIcons.*; + import gregtech.api.enums.SoundResource; import gregtech.api.gui.GT_GUIContainer_BasicMachine; import gregtech.api.interfaces.ITexture; @@ -11,8 +13,6 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; -import static gregtech.api.enums.Textures.BlockIcons.*; - public class GT_MetaTileEntity_Extractor_Bronze extends GT_MetaTileEntity_BasicMachine_Bronze { public GT_MetaTileEntity_Extractor_Bronze(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, "Extracting your first Rubber", 1, 1, false); @@ -28,7 +28,12 @@ public class GT_MetaTileEntity_Extractor_Bronze extends GT_MetaTileEntity_BasicM @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeExtractor.png", GT_Recipe.GT_Recipe_Map.sExtractorRecipes.mUnlocalizedName); + return new GT_GUIContainer_BasicMachine( + aPlayerInventory, + aBaseMetaTileEntity, + getLocalName(), + "BronzeExtractor.png", + GT_Recipe.GT_Recipe_Map.sExtractorRecipes.mUnlocalizedName); } @Override @@ -56,65 +61,97 @@ public class GT_MetaTileEntity_Extractor_Bronze extends GT_MetaTileEntity_BasicM @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_EXTRACTOR), - TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR), - TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_EXTRACTOR), - TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_EXTRACTOR_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_EXTRACTOR_GLOW) + .glow() + .build() + }; } } diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java index d471259250..c7ebeee12b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.machines.steam; +import static gregtech.api.enums.Textures.BlockIcons.*; + import gregtech.api.enums.SoundResource; import gregtech.api.gui.GT_GUIContainer_BasicMachine; import gregtech.api.interfaces.ITexture; @@ -11,8 +13,6 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; -import static gregtech.api.enums.Textures.BlockIcons.*; - public class GT_MetaTileEntity_Extractor_Steel extends GT_MetaTileEntity_BasicMachine_Steel { public GT_MetaTileEntity_Extractor_Steel(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, "Extracting your first Rubber", 1, 1, true); @@ -28,7 +28,12 @@ public class GT_MetaTileEntity_Extractor_Steel extends GT_MetaTileEntity_BasicMa @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelExtractor.png", GT_Recipe.GT_Recipe_Map.sExtractorRecipes.mUnlocalizedName); + return new GT_GUIContainer_BasicMachine( + aPlayerInventory, + aBaseMetaTileEntity, + getLocalName(), + "SteelExtractor.png", + GT_Recipe.GT_Recipe_Map.sExtractorRecipes.mUnlocalizedName); } @Override @@ -56,65 +61,97 @@ public class GT_MetaTileEntity_Extractor_Steel extends GT_MetaTileEntity_BasicMa @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_EXTRACTOR), - TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR), - TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_EXTRACTOR), - TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_EXTRACTOR_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_EXTRACTOR_GLOW) + .glow() + .build() + }; } } diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java index eb2b91416c..a22d1cb3e3 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java @@ -1,5 +1,8 @@ package gregtech.common.tileentities.machines.steam; +import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.ParticleFX; @@ -17,9 +20,6 @@ import net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraftforge.common.util.ForgeDirection; -import static gregtech.api.enums.Textures.BlockIcons.*; -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; - public class GT_MetaTileEntity_ForgeHammer_Bronze extends GT_MetaTileEntity_BasicMachine_Bronze { public GT_MetaTileEntity_ForgeHammer_Bronze(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, "Forge Hammer", 1, 1, false); @@ -40,7 +40,14 @@ public class GT_MetaTileEntity_ForgeHammer_Bronze extends GT_MetaTileEntity_Basi @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeHammer.png", GT_Recipe.GT_Recipe_Map.sHammerRecipes.mUnlocalizedName, (byte) 6, (byte) 3); + return new GT_GUIContainer_BasicMachine( + aPlayerInventory, + aBaseMetaTileEntity, + getLocalName(), + "BronzeHammer.png", + GT_Recipe.GT_Recipe_Map.sHammerRecipes.mUnlocalizedName, + (byte) 6, + (byte) 3); } @Override @@ -63,66 +70,98 @@ public class GT_MetaTileEntity_ForgeHammer_Bronze extends GT_MetaTileEntity_Basi @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_HAMMER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_HAMMER_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_STEAM_HAMMER_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_HAMMER), - TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_HAMMER_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_STEAM_HAMMER_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_HAMMER), - TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_HAMMER_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_STEAM_HAMMER_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_HAMMER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_HAMMER_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_TOP_STEAM_HAMMER_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_HAMMER), - TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_HAMMER_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_TOP_STEAM_HAMMER_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_GLOW) + .glow() + .build() + }; } /** @@ -141,8 +180,8 @@ public class GT_MetaTileEntity_ForgeHammer_Bronze extends GT_MetaTileEntity_Basi final byte mainFacing = (byte) this.mMainFacing; if (mainFacing > 1 - && aBaseMetaTileEntity.getCoverIDAtSide(mainFacing) == 0 - && !aBaseMetaTileEntity.getOpacityAtSide(mainFacing)) { + && aBaseMetaTileEntity.getCoverIDAtSide(mainFacing) == 0 + && !aBaseMetaTileEntity.getOpacityAtSide(mainFacing)) { final double oX = aBaseMetaTileEntity.getXCoord(); final double oY = aBaseMetaTileEntity.getYCoord(); @@ -177,8 +216,7 @@ public class GT_MetaTileEntity_ForgeHammer_Bronze extends GT_MetaTileEntity_Basi mZ = .05D; } - ParticleEventBuilder particleEventBuilder = - (new ParticleEventBuilder()) + ParticleEventBuilder particleEventBuilder = (new ParticleEventBuilder()) .setMotion(mX, 0, mZ) .setPosition(x, y, z) .setWorld(getBaseMetaTileEntity().getWorld()); diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java index db31c74499..dd233aa6f2 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java @@ -1,5 +1,8 @@ package gregtech.common.tileentities.machines.steam; +import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.ParticleFX; @@ -17,9 +20,6 @@ import net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraftforge.common.util.ForgeDirection; -import static gregtech.api.enums.Textures.BlockIcons.*; -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; - public class GT_MetaTileEntity_ForgeHammer_Steel extends GT_MetaTileEntity_BasicMachine_Steel { public GT_MetaTileEntity_ForgeHammer_Steel(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, "Forge Hammer", 1, 1, true); @@ -40,7 +40,14 @@ public class GT_MetaTileEntity_ForgeHammer_Steel extends GT_MetaTileEntity_Basic @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelHammer.png", GT_Recipe.GT_Recipe_Map.sHammerRecipes.mUnlocalizedName, (byte) 6, (byte) 3); + return new GT_GUIContainer_BasicMachine( + aPlayerInventory, + aBaseMetaTileEntity, + getLocalName(), + "SteelHammer.png", + GT_Recipe.GT_Recipe_Map.sHammerRecipes.mUnlocalizedName, + (byte) 6, + (byte) 3); } @Override @@ -63,66 +70,98 @@ public class GT_MetaTileEntity_ForgeHammer_Steel extends GT_MetaTileEntity_Basic @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_HAMMER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_HAMMER_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_STEAM_HAMMER_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_HAMMER), - TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_HAMMER_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_STEAM_HAMMER_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_HAMMER), - TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_HAMMER_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_STEAM_HAMMER_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_HAMMER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_HAMMER_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_TOP_STEAM_HAMMER_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_HAMMER), - TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_HAMMER_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_TOP_STEAM_HAMMER_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_GLOW) + .glow() + .build() + }; } /** @@ -141,8 +180,8 @@ public class GT_MetaTileEntity_ForgeHammer_Steel extends GT_MetaTileEntity_Basic final byte mainFacing = (byte) this.mMainFacing; if (mainFacing > 1 - && aBaseMetaTileEntity.getCoverIDAtSide(mainFacing) == 0 - && !aBaseMetaTileEntity.getOpacityAtSide(mainFacing)) { + && aBaseMetaTileEntity.getCoverIDAtSide(mainFacing) == 0 + && !aBaseMetaTileEntity.getOpacityAtSide(mainFacing)) { final double oX = aBaseMetaTileEntity.getXCoord(); final double oY = aBaseMetaTileEntity.getYCoord(); @@ -177,8 +216,7 @@ public class GT_MetaTileEntity_ForgeHammer_Steel extends GT_MetaTileEntity_Basic mZ = .05D; } - ParticleEventBuilder particleEventBuilder = - (new ParticleEventBuilder()) + ParticleEventBuilder particleEventBuilder = (new ParticleEventBuilder()) .setMotion(mX, 0, mZ) .setPosition(x, y, z) .setWorld(getBaseMetaTileEntity().getWorld()); diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java index 0a8ed8a6fd..cd99dda2e2 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.machines.steam; +import static gregtech.api.enums.Textures.BlockIcons.*; + import gregtech.api.enums.SoundResource; import gregtech.api.gui.GT_GUIContainer_BasicMachine; import gregtech.api.interfaces.ITexture; @@ -12,8 +14,6 @@ import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; -import static gregtech.api.enums.Textures.BlockIcons.*; - public class GT_MetaTileEntity_Furnace_Bronze extends GT_MetaTileEntity_BasicMachine_Bronze { public GT_MetaTileEntity_Furnace_Bronze(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, "Smelting things with compressed Steam", 1, 1, false); @@ -34,7 +34,8 @@ public class GT_MetaTileEntity_Furnace_Bronze extends GT_MetaTileEntity_BasicMac @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeFurnace.png", "smelting"); + return new GT_GUIContainer_BasicMachine( + aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeFurnace.png", "smelting"); } @Override @@ -53,8 +54,10 @@ public class GT_MetaTileEntity_Furnace_Bronze extends GT_MetaTileEntity_BasicMac } @Override - protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) && GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(64L, aStack), false, null) != null; + protected boolean allowPutStackValidated( + IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) + && GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(64L, aStack), false, null) != null; } @Override @@ -72,66 +75,98 @@ public class GT_MetaTileEntity_Furnace_Bronze extends GT_MetaTileEntity_BasicMac @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE), - TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_FURNACE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_STEAM_FURNACE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_FURNACE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_STEAM_FURNACE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE), - TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_FURNACE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_TOP_STEAM_FURNACE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getBottomFacingInactive(aColor)[0], TextureFactory.of( - TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_GLOW).glow().build())}; + TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE), + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_GLOW) + .glow() + .build()) + }; } } diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java index a4c76773a5..3bc35d8c47 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.machines.steam; +import static gregtech.api.enums.Textures.BlockIcons.*; + import gregtech.api.enums.SoundResource; import gregtech.api.gui.GT_GUIContainer_BasicMachine; import gregtech.api.interfaces.ITexture; @@ -12,8 +14,6 @@ import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; -import static gregtech.api.enums.Textures.BlockIcons.*; - public class GT_MetaTileEntity_Furnace_Steel extends GT_MetaTileEntity_BasicMachine_Steel { public GT_MetaTileEntity_Furnace_Steel(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, "Smelting things with compressed Steam", 1, 1, true); @@ -34,7 +34,8 @@ public class GT_MetaTileEntity_Furnace_Steel extends GT_MetaTileEntity_BasicMach @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelFurnace.png", "smelting"); + return new GT_GUIContainer_BasicMachine( + aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelFurnace.png", "smelting"); } @Override @@ -53,8 +54,10 @@ public class GT_MetaTileEntity_Furnace_Steel extends GT_MetaTileEntity_BasicMach } @Override - protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) && GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(64L, aStack), false, null) != null; + protected boolean allowPutStackValidated( + IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) + && GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(64L, aStack), false, null) != null; } @Override @@ -72,65 +75,97 @@ public class GT_MetaTileEntity_Furnace_Steel extends GT_MetaTileEntity_BasicMach @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE), - TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_FURNACE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_STEAM_FURNACE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_FURNACE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_STEAM_FURNACE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE), - TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_FURNACE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_TOP_STEAM_FURNACE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_GLOW) + .glow() + .build() + }; } } diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java index fe107957bf..f6f5bf8477 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java @@ -1,5 +1,9 @@ package gregtech.common.tileentities.machines.steam; +import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; + import gregtech.api.enums.ParticleFX; import gregtech.api.enums.SoundResource; import gregtech.api.gui.GT_GUIContainer_BasicMachine; @@ -17,10 +21,6 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; -import static gregtech.api.enums.GT_Values.V; -import static gregtech.api.enums.Textures.BlockIcons.*; -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; - public class GT_MetaTileEntity_Macerator_Bronze extends GT_MetaTileEntity_BasicMachine_Bronze { public GT_MetaTileEntity_Macerator_Bronze(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, "Macerating your Ores", 1, 1, false); @@ -36,7 +36,12 @@ public class GT_MetaTileEntity_Macerator_Bronze extends GT_MetaTileEntity_BasicM @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeMacerator.png", GT_Recipe_Map.sMaceratorRecipes.mUnlocalizedName); + return new GT_GUIContainer_BasicMachine( + aPlayerInventory, + aBaseMetaTileEntity, + getLocalName(), + "BronzeMacerator.png", + GT_Recipe_Map.sMaceratorRecipes.mUnlocalizedName); } @Override @@ -52,19 +57,18 @@ public class GT_MetaTileEntity_Macerator_Bronze extends GT_MetaTileEntity_BasicM final byte topFacing = (byte) ForgeDirection.UP.ordinal(); if (aBaseMetaTileEntity.getFrontFacing() != topFacing - && aBaseMetaTileEntity.getCoverIDAtSide(topFacing) == 0 - && !aBaseMetaTileEntity.getOpacityAtSide(topFacing)) { + && aBaseMetaTileEntity.getCoverIDAtSide(topFacing) == 0 + && !aBaseMetaTileEntity.getOpacityAtSide(topFacing)) { new ParticleEventBuilder() - .setMotion(0.0D, 0.0D, 0.0D) - .setIdentifier(ParticleFX.SMOKE) - .setPosition( - aBaseMetaTileEntity.getXCoord() + 0.8F - XSTR_INSTANCE.nextFloat() * 0.6F, - aBaseMetaTileEntity.getYCoord() + 0.9F + XSTR_INSTANCE.nextFloat() * 0.2F, - aBaseMetaTileEntity.getZCoord() + 0.8F - XSTR_INSTANCE.nextFloat() * 0.6F - ) - .setWorld(getBaseMetaTileEntity().getWorld()) - .run(); + .setMotion(0.0D, 0.0D, 0.0D) + .setIdentifier(ParticleFX.SMOKE) + .setPosition( + aBaseMetaTileEntity.getXCoord() + 0.8F - XSTR_INSTANCE.nextFloat() * 0.6F, + aBaseMetaTileEntity.getYCoord() + 0.9F + XSTR_INSTANCE.nextFloat() * 0.2F, + aBaseMetaTileEntity.getZCoord() + 0.8F - XSTR_INSTANCE.nextFloat() * 0.6F) + .setWorld(getBaseMetaTileEntity().getWorld()) + .run(); } } } @@ -76,7 +80,8 @@ public class GT_MetaTileEntity_Macerator_Bronze extends GT_MetaTileEntity_BasicM @Override public int checkRecipe() { - GT_Recipe tRecipe = getRecipeList().findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[mTier], null, null, getAllInputs()); + GT_Recipe tRecipe = getRecipeList() + .findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[mTier], null, null, getAllInputs()); if (tRecipe == null) return DID_NOT_FIND_RECIPE; if (tRecipe.mCanBeBuffered) mLastRecipe = tRecipe; if (!canOutput(tRecipe)) { @@ -84,7 +89,7 @@ public class GT_MetaTileEntity_Macerator_Bronze extends GT_MetaTileEntity_BasicM return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; } - if (!tRecipe.isRecipeInputEqual(true, new FluidStack[]{getFillableStack()}, getAllInputs())) + if (!tRecipe.isRecipeInputEqual(true, new FluidStack[] {getFillableStack()}, getAllInputs())) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; if (tRecipe.getOutput(0) != null) mOutputItems[0] = tRecipe.getOutput(0); calculateOverclockedNess(tRecipe); @@ -92,8 +97,10 @@ public class GT_MetaTileEntity_Macerator_Bronze extends GT_MetaTileEntity_BasicM } @Override - protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) && GT_Recipe_Map.sMaceratorRecipes.containsInput(GT_Utility.copyAmount(64L, aStack)); + protected boolean allowPutStackValidated( + IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) + && GT_Recipe_Map.sMaceratorRecipes.containsInput(GT_Utility.copyAmount(64L, aStack)); } @Override @@ -111,65 +118,97 @@ public class GT_MetaTileEntity_Macerator_Bronze extends GT_MetaTileEntity_BasicM @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_MACERATOR), - TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_MACERATOR_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_STEAM_MACERATOR_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR), - TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_MACERATOR_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_STEAM_MACERATOR_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_MACERATOR), - TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_MACERATOR_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_TOP_STEAM_MACERATOR_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_MACERATOR_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_MACERATOR_GLOW) + .glow() + .build() + }; } } diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java index 638419034e..14acdb9b45 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java @@ -1,5 +1,9 @@ package gregtech.common.tileentities.machines.steam; +import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; + import gregtech.api.enums.ParticleFX; import gregtech.api.enums.SoundResource; import gregtech.api.gui.GT_GUIContainer_BasicMachine; @@ -17,10 +21,6 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; -import static gregtech.api.enums.GT_Values.V; -import static gregtech.api.enums.Textures.BlockIcons.*; -import static gregtech.api.objects.XSTR.XSTR_INSTANCE; - public class GT_MetaTileEntity_Macerator_Steel extends GT_MetaTileEntity_BasicMachine_Steel { public GT_MetaTileEntity_Macerator_Steel(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, "Macerating your Ores", 1, 1, true); @@ -36,7 +36,12 @@ public class GT_MetaTileEntity_Macerator_Steel extends GT_MetaTileEntity_BasicMa @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelMacerator.png", GT_Recipe_Map.sMaceratorRecipes.mUnlocalizedName); + return new GT_GUIContainer_BasicMachine( + aPlayerInventory, + aBaseMetaTileEntity, + getLocalName(), + "SteelMacerator.png", + GT_Recipe_Map.sMaceratorRecipes.mUnlocalizedName); } @Override @@ -52,19 +57,18 @@ public class GT_MetaTileEntity_Macerator_Steel extends GT_MetaTileEntity_BasicMa final byte topFacing = (byte) ForgeDirection.UP.ordinal(); if (aBaseMetaTileEntity.getFrontFacing() != topFacing - && aBaseMetaTileEntity.getCoverIDAtSide(topFacing) == 0 - && !aBaseMetaTileEntity.getOpacityAtSide(topFacing)) { + && aBaseMetaTileEntity.getCoverIDAtSide(topFacing) == 0 + && !aBaseMetaTileEntity.getOpacityAtSide(topFacing)) { new WorldSpawnedEventBuilder.ParticleEventBuilder() - .setMotion(0.0D, 0.0D, 0.0D) - .setIdentifier(ParticleFX.SMOKE) - .setPosition( - aBaseMetaTileEntity.getXCoord() + 0.8F - XSTR_INSTANCE.nextFloat() * 0.6F, - aBaseMetaTileEntity.getYCoord() + 0.9F + XSTR_INSTANCE.nextFloat() * 0.2F, - aBaseMetaTileEntity.getZCoord() + 0.8F - XSTR_INSTANCE.nextFloat() * 0.6F - ) - .setWorld(getBaseMetaTileEntity().getWorld()) - .run(); + .setMotion(0.0D, 0.0D, 0.0D) + .setIdentifier(ParticleFX.SMOKE) + .setPosition( + aBaseMetaTileEntity.getXCoord() + 0.8F - XSTR_INSTANCE.nextFloat() * 0.6F, + aBaseMetaTileEntity.getYCoord() + 0.9F + XSTR_INSTANCE.nextFloat() * 0.2F, + aBaseMetaTileEntity.getZCoord() + 0.8F - XSTR_INSTANCE.nextFloat() * 0.6F) + .setWorld(getBaseMetaTileEntity().getWorld()) + .run(); } } } @@ -76,7 +80,8 @@ public class GT_MetaTileEntity_Macerator_Steel extends GT_MetaTileEntity_BasicMa @Override public int checkRecipe() { - GT_Recipe tRecipe = getRecipeList().findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[mTier], null, null, getAllInputs()); + GT_Recipe tRecipe = getRecipeList() + .findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[mTier], null, null, getAllInputs()); if (tRecipe == null) return DID_NOT_FIND_RECIPE; if (tRecipe.mCanBeBuffered) mLastRecipe = tRecipe; if (!canOutput(tRecipe)) { @@ -84,7 +89,7 @@ public class GT_MetaTileEntity_Macerator_Steel extends GT_MetaTileEntity_BasicMa return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; } - if (!tRecipe.isRecipeInputEqual(true, new FluidStack[]{getFillableStack()}, getAllInputs())) + if (!tRecipe.isRecipeInputEqual(true, new FluidStack[] {getFillableStack()}, getAllInputs())) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; if (tRecipe.getOutput(0) != null) mOutputItems[0] = tRecipe.getOutput(0); calculateOverclockedNess(tRecipe); @@ -92,8 +97,10 @@ public class GT_MetaTileEntity_Macerator_Steel extends GT_MetaTileEntity_BasicMa } @Override - public boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) && GT_Recipe_Map.sMaceratorRecipes.containsInput(GT_Utility.copyAmount(64L, aStack)); + public boolean allowPutStackValidated( + IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) + && GT_Recipe_Map.sMaceratorRecipes.containsInput(GT_Utility.copyAmount(64L, aStack)); } @Override @@ -111,60 +118,97 @@ public class GT_MetaTileEntity_Macerator_Steel extends GT_MetaTileEntity_BasicMa @Override public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_MACERATOR), - TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_MACERATOR_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_SIDE_STEAM_MACERATOR_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getFrontFacingActive(byte aColor) { - return new ITexture[]{ + return new ITexture[] { super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[]{super.getFrontFacingInactive(aColor)[0], + return new ITexture[] { + super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR), - TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_MACERATOR_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_STEAM_MACERATOR_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopFacingActive(byte aColor) { - return new ITexture[]{super.getTopFacingActive(aColor)[0], + return new ITexture[] { + super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[]{super.getTopFacingInactive(aColor)[0], + return new ITexture[] { + super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_MACERATOR), - TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_MACERATOR_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_TOP_STEAM_MACERATOR_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomFacingActive(byte aColor) { - return new ITexture[]{super.getBottomFacingActive(aColor)[0], + return new ITexture[] { + super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE_GLOW) + .glow() + .build() + }; } @Override public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[]{super.getBottomFacingInactive(aColor)[0], + return new ITexture[] { + super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR), - TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_MACERATOR_GLOW).glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_BOTTOM_STEAM_MACERATOR_GLOW) + .glow() + .build() + }; } } diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java index ffd1fd0e4a..8c844b8071 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java @@ -1,5 +1,9 @@ package gregtech.common.tileentities.storage; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SCHEST; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SCHEST_GLOW; + import cpw.mods.fml.common.Optional; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; @@ -11,6 +15,8 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; import gregtech.common.gui.GT_Container_QuantumChest; import gregtech.common.gui.GT_GUIContainer_QuantumChest; +import java.util.HashMap; +import java.util.Map; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; @@ -18,26 +24,21 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; -import java.util.HashMap; -import java.util.Map; - -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SCHEST; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SCHEST_GLOW; - @Optional.Interface(iface = "appeng.api.storage.IMEMonitor", modid = "appliedenergistics2", striprefs = true) -public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEntity_TieredMachineBlock implements appeng.api.storage.IMEMonitor<appeng.api.storage.data.IAEItemStack> { +public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEntity_TieredMachineBlock + implements appeng.api.storage.IMEMonitor<appeng.api.storage.data.IAEItemStack> { protected boolean mVoidOverflow = false; public boolean voidBreak; - private Map<appeng.api.storage.IMEMonitorHandlerReceiver<appeng.api.storage.data.IAEItemStack>, Object> listeners = null; + private Map<appeng.api.storage.IMEMonitorHandlerReceiver<appeng.api.storage.data.IAEItemStack>, Object> listeners = + null; public GT_MetaTileEntity_DigitalChestBase(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 3, new String[]{ - "This Chest stores " + GT_Utility.formatNumbers(commonSizeCompute(aTier)) + " Blocks", - "Use a screwdriver to enable", - "voiding items on overflow", - "Can keep its contents when harvested", - "Sneak when harvesting to void its contents" + super(aID, aName, aNameRegional, aTier, 3, new String[] { + "This Chest stores " + GT_Utility.formatNumbers(commonSizeCompute(aTier)) + " Blocks", + "Use a screwdriver to enable", + "voiding items on overflow", + "Can keep its contents when harvested", + "Sneak when harvesting to void its contents" }); } @@ -72,28 +73,35 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti super(aName, aTier, 3, aDescription, aTextures); } - public GT_MetaTileEntity_DigitalChestBase(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + public GT_MetaTileEntity_DigitalChestBase( + String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, 3, aDescription, aTextures); } @Optional.Method(modid = "appliedenergistics2") public static void registerAEIntegration() { - appeng.api.AEApi.instance().registries().externalStorage().addExternalStorageInterface(new AE2DigitalChestHandler()); + appeng.api.AEApi.instance() + .registries() + .externalStorage() + .addExternalStorageInterface(new AE2DigitalChestHandler()); } @Optional.Method(modid = "appliedenergistics2") @Override - public void addListener(appeng.api.storage.IMEMonitorHandlerReceiver<appeng.api.storage.data.IAEItemStack> imeMonitorHandlerReceiver, Object o) { - if (listeners == null) - listeners = new HashMap<>(); + public void addListener( + appeng.api.storage.IMEMonitorHandlerReceiver<appeng.api.storage.data.IAEItemStack> + imeMonitorHandlerReceiver, + Object o) { + if (listeners == null) listeners = new HashMap<>(); listeners.put(imeMonitorHandlerReceiver, o); } @Optional.Method(modid = "appliedenergistics2") @Override - public void removeListener(appeng.api.storage.IMEMonitorHandlerReceiver<appeng.api.storage.data.IAEItemStack> imeMonitorHandlerReceiver) { - if (listeners == null) - listeners = new HashMap<>(); + public void removeListener( + appeng.api.storage.IMEMonitorHandlerReceiver<appeng.api.storage.data.IAEItemStack> + imeMonitorHandlerReceiver) { + if (listeners == null) listeners = new HashMap<>(); listeners.remove(imeMonitorHandlerReceiver); } @@ -107,8 +115,7 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti @Override public boolean isPrioritized(appeng.api.storage.data.IAEItemStack iaeItemStack) { ItemStack s = getItemStack(); - if (s == null || iaeItemStack == null) - return false; + if (s == null || iaeItemStack == null) return false; return iaeItemStack.isSameType(s); } @@ -116,8 +123,7 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti @Override public boolean canAccept(appeng.api.storage.data.IAEItemStack iaeItemStack) { ItemStack s = getItemStack(); - if (s == null || iaeItemStack == null) - return true; + if (s == null || iaeItemStack == null) return true; return iaeItemStack.isSameType(s); } @@ -145,7 +151,8 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti @Override @Optional.Method(modid = "appliedenergistics2") - public appeng.api.storage.data.IItemList<appeng.api.storage.data.IAEItemStack> getAvailableItems(final appeng.api.storage.data.IItemList out) { + public appeng.api.storage.data.IItemList<appeng.api.storage.data.IAEItemStack> getAvailableItems( + final appeng.api.storage.data.IItemList out) { ItemStack storedStack = getItemStack(); if (storedStack != null) { appeng.util.item.AEItemStack s = appeng.util.item.AEItemStack.create(storedStack); @@ -195,12 +202,13 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti @Override @Optional.Method(modid = "appliedenergistics2") - public appeng.api.storage.data.IAEItemStack injectItems(final appeng.api.storage.data.IAEItemStack input, final appeng.api.config.Actionable mode, final appeng.api.networking.security.BaseActionSource src) { + public appeng.api.storage.data.IAEItemStack injectItems( + final appeng.api.storage.data.IAEItemStack input, + final appeng.api.config.Actionable mode, + final appeng.api.networking.security.BaseActionSource src) { final ItemStack inputStack = input.getItemStack(); - if (inputStack == null) - return null; - if (getBaseMetaTileEntity() == null) - return input; + if (inputStack == null) return null; + if (getBaseMetaTileEntity() == null) return input; if (mode != appeng.api.config.Actionable.SIMULATE) getBaseMetaTileEntity().markDirty(); ItemStack storedStack = getItemStack(); @@ -208,8 +216,7 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti if (GT_Utility.areStacksEqual(storedStack, inputStack)) { if (input.getStackSize() + getItemCount() > getMaxItemCount()) { if (mVoidOverflow) { - if (mode != appeng.api.config.Actionable.SIMULATE) - setItemCount(getMaxItemCount()); + if (mode != appeng.api.config.Actionable.SIMULATE) setItemCount(getMaxItemCount()); return null; } return createOverflowStack(input.getStackSize() + getItemCount(), mode); @@ -220,12 +227,9 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti } return input; } - if (mode != appeng.api.config.Actionable.SIMULATE) - setItemStack(inputStack.copy()); - if (input.getStackSize() > getMaxItemCount()) - return createOverflowStack(input.getStackSize(), mode); - if (mode != appeng.api.config.Actionable.SIMULATE) - setItemCount((int) input.getStackSize()); + if (mode != appeng.api.config.Actionable.SIMULATE) setItemStack(inputStack.copy()); + if (input.getStackSize() > getMaxItemCount()) return createOverflowStack(input.getStackSize(), mode); + if (mode != appeng.api.config.Actionable.SIMULATE) setItemCount((int) input.getStackSize()); return null; } @@ -233,24 +237,24 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti private appeng.api.storage.data.IAEItemStack createOverflowStack(long size, appeng.api.config.Actionable mode) { final appeng.api.storage.data.IAEItemStack overflow = appeng.util.item.AEItemStack.create(getItemStack()); overflow.setStackSize(size - getMaxItemCount()); - if (mode != appeng.api.config.Actionable.SIMULATE) - setItemCount(getMaxItemCount()); + if (mode != appeng.api.config.Actionable.SIMULATE) setItemCount(getMaxItemCount()); return overflow; } @Override @Optional.Method(modid = "appliedenergistics2") - public appeng.api.storage.data.IAEItemStack extractItems(final appeng.api.storage.data.IAEItemStack request, final appeng.api.config.Actionable mode, final appeng.api.networking.security.BaseActionSource src) { + public appeng.api.storage.data.IAEItemStack extractItems( + final appeng.api.storage.data.IAEItemStack request, + final appeng.api.config.Actionable mode, + final appeng.api.networking.security.BaseActionSource src) { if (request.isSameType(getItemStack())) { - if (getBaseMetaTileEntity() == null) - return null; + if (getBaseMetaTileEntity() == null) return null; if (mode != appeng.api.config.Actionable.SIMULATE) getBaseMetaTileEntity().markDirty(); if (request.getStackSize() >= getItemCount()) { appeng.util.item.AEItemStack result = appeng.util.item.AEItemStack.create(getItemStack()); result.setStackSize(getItemCount()); - if (mode != appeng.api.config.Actionable.SIMULATE) - setItemCount(0); + if (mode != appeng.api.config.Actionable.SIMULATE) setItemCount(0); return result; } else { if (mode != appeng.api.config.Actionable.SIMULATE) @@ -270,7 +274,10 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti @Override public final void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { mVoidOverflow = !mVoidOverflow; - GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal(mVoidOverflow ? "GT5U.machines.voidoveflow.enabled" : "GT5U.machines.voidoveflow.disabled")); + GT_Utility.sendChatToPlayer( + aPlayer, + StatCollector.translateToLocal( + mVoidOverflow ? "GT5U.machines.voidoveflow.enabled" : "GT5U.machines.voidoveflow.disabled")); } @Override @@ -288,7 +295,9 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti ItemStack stack = getItemStack(); int savedCount = count; - if ((mInventory[0] != null) && ((count < getMaxItemCount()) || mVoidOverflow) && GT_Utility.areStacksEqual(mInventory[0], stack)) { + if ((mInventory[0] != null) + && ((count < getMaxItemCount()) || mVoidOverflow) + && GT_Utility.areStacksEqual(mInventory[0], stack)) { count += mInventory[0].stackSize; if (count <= getMaxItemCount()) { mInventory[0] = null; @@ -305,7 +314,9 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti mInventory[1] = stack.copy(); mInventory[1].stackSize = Math.min(stack.getMaxStackSize(), count); count -= mInventory[1].stackSize; - } else if ((count > 0) && GT_Utility.areStacksEqual(mInventory[1], stack) && mInventory[1].getMaxStackSize() > mInventory[1].stackSize) { + } else if ((count > 0) + && GT_Utility.areStacksEqual(mInventory[1], stack) + && mInventory[1].getMaxStackSize() > mInventory[1].stackSize) { int tmp = Math.min(count, mInventory[1].getMaxStackSize() - mInventory[1].stackSize); mInventory[1].stackSize += tmp; count -= tmp; @@ -318,10 +329,8 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti mInventory[2] = null; } - if (GregTech_API.mAE2) - notifyListeners(count - savedCount, stack); - if (count != savedCount) - getBaseMetaTileEntity().markDirty(); + if (GregTech_API.mAE2) notifyListeners(count - savedCount, stack); + if (count != savedCount) getBaseMetaTileEntity().markDirty(); } } @@ -359,7 +368,9 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti @Override public int getProgresstime() { - return getItemCount() + (mInventory[0] == null ? 0 : mInventory[0].stackSize) + (mInventory[1] == null ? 0 : mInventory[1].stackSize); + return getItemCount() + + (mInventory[0] == null ? 0 : mInventory[0].stackSize) + + (mInventory[1] == null ? 0 : mInventory[1].stackSize); } @Override @@ -376,20 +387,20 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti public String[] getInfoData() { if (getItemStack() == null) { - return new String[]{ - EnumChatFormatting.BLUE + chestName() + EnumChatFormatting.RESET, - "Stored Items:", - EnumChatFormatting.GOLD + "No Items" + EnumChatFormatting.RESET, - EnumChatFormatting.GREEN + "0" + EnumChatFormatting.RESET + " " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(getMaxItemCount()) + EnumChatFormatting.RESET - }; - } - return new String[]{ + return new String[] { EnumChatFormatting.BLUE + chestName() + EnumChatFormatting.RESET, "Stored Items:", - EnumChatFormatting.GOLD + getItemStack().getDisplayName() + EnumChatFormatting.RESET, - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(getItemCount()) + EnumChatFormatting.RESET + " " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(getMaxItemCount()) + EnumChatFormatting.RESET + EnumChatFormatting.GOLD + "No Items" + EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + "0" + EnumChatFormatting.RESET + " " + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(getMaxItemCount()) + EnumChatFormatting.RESET + }; + } + return new String[] { + EnumChatFormatting.BLUE + chestName() + EnumChatFormatting.RESET, + "Stored Items:", + EnumChatFormatting.GOLD + getItemStack().getDisplayName() + EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(getItemCount()) + EnumChatFormatting.RESET + " " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(getMaxItemCount()) + EnumChatFormatting.RESET }; } @@ -406,31 +417,25 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti listeners = new HashMap<>(); return; } - if (count == 0 || stack == null) - return; + if (count == 0 || stack == null) return; appeng.util.item.ItemList change = new appeng.util.item.ItemList(); appeng.util.item.AEItemStack s = appeng.util.item.AEItemStack.create(stack); s.setStackSize(count); change.add(s); listeners.forEach((l, o) -> { - if (l.isValid(o)) - l.postChange(this, change, null); - else - removeListener(l); + if (l.isValid(o)) l.postChange(this, change, null); + else removeListener(l); }); } @Optional.Method(modid = "appliedenergistics2") private boolean hasActiveMEConnection() { - if (listeners == null || listeners.isEmpty()) - return false; - for (Map.Entry<appeng.api.storage.IMEMonitorHandlerReceiver<appeng.api.storage.data.IAEItemStack>, Object> e : listeners.entrySet()) - { - if ((e.getKey() instanceof appeng.api.parts.IPart)) - { + if (listeners == null || listeners.isEmpty()) return false; + for (Map.Entry<appeng.api.storage.IMEMonitorHandlerReceiver<appeng.api.storage.data.IAEItemStack>, Object> e : + listeners.entrySet()) { + if ((e.getKey() instanceof appeng.api.parts.IPart)) { appeng.api.networking.IGridNode n = ((appeng.api.parts.IPart) e.getKey()).getGridNode(); - if (n != null && n.isActive()) - return true; + if (n != null && n.isActive()) return true; } } // if there are no active storage buses - clear the listeners @@ -441,42 +446,43 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti @Override public void saveNBTData(NBTTagCompound aNBT) { aNBT.setInteger("mItemCount", getItemCount()); - if (getItemStack() != null) - aNBT.setTag("mItemStack", getItemStack().writeToNBT(new NBTTagCompound())); + if (getItemStack() != null) aNBT.setTag("mItemStack", getItemStack().writeToNBT(new NBTTagCompound())); aNBT.setBoolean("mVoidOverflow", mVoidOverflow); } @Override public void loadNBTData(NBTTagCompound aNBT) { - if (aNBT.hasKey("mItemCount")) - setItemCount(aNBT.getInteger("mItemCount")); + if (aNBT.hasKey("mItemCount")) setItemCount(aNBT.getInteger("mItemCount")); if (aNBT.hasKey("mItemStack")) setItemStack(ItemStack.loadItemStackFromNBT((NBTTagCompound) aNBT.getTag("mItemStack"))); mVoidOverflow = aNBT.getBoolean("mVoidOverflow"); - } @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - if (GregTech_API.mAE2 && GT_Values.disableDigitalChestsExternalAccess && hasActiveMEConnection()) - return false; + if (GregTech_API.mAE2 && GT_Values.disableDigitalChestsExternalAccess && hasActiveMEConnection()) return false; return aIndex == 1; } @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - if (GregTech_API.mAE2 && GT_Values.disableDigitalChestsExternalAccess && hasActiveMEConnection()) - return false; + if (GregTech_API.mAE2 && GT_Values.disableDigitalChestsExternalAccess && hasActiveMEConnection()) return false; return aIndex == 0 && (mInventory[0] == null || GT_Utility.areStacksEqual(mInventory[0], aStack)); } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - if (aSide != aFacing) return new ITexture[]{MACHINE_CASINGS[mTier][aColorIndex + 1]}; - return new ITexture[]{ - MACHINE_CASINGS[mTier][aColorIndex + 1], - TextureFactory.of(OVERLAY_SCHEST), - TextureFactory.builder().addIcon(OVERLAY_SCHEST_GLOW).glow().build() + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { + if (aSide != aFacing) return new ITexture[] {MACHINE_CASINGS[mTier][aColorIndex + 1]}; + return new ITexture[] { + MACHINE_CASINGS[mTier][aColorIndex + 1], + TextureFactory.of(OVERLAY_SCHEST), + TextureFactory.builder().addIcon(OVERLAY_SCHEST_GLOW).glow().build() }; } } diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java index 2567a80252..6b2a9caf4b 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java @@ -1,5 +1,9 @@ package gregtech.common.tileentities.storage; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_QTANK; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_QTANK_GLOW; + import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; @@ -13,17 +17,12 @@ import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_QTANK; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_QTANK_GLOW; - public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntity_BasicTank { protected boolean mVoidOverflow = false; private boolean voidBreak; - public GT_MetaTileEntity_DigitalTankBase(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 3, new String[]{ + super(aID, aName, aNameRegional, aTier, 3, new String[] { "Stores " + GT_Utility.formatNumbers(commonSizeCompute(aTier)) + "L of fluid", "Use a screwdriver to enable", "voiding fluid on overflow", @@ -59,7 +58,6 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit } } - public GT_MetaTileEntity_DigitalTankBase(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, 3, aDescription, aTextures); } @@ -84,7 +82,6 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit super.setItemNBT(aNBT); } - @Override public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); @@ -97,7 +94,6 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit mVoidOverflow = aNBT.getBoolean("mVoidOverflow"); } - @Override public boolean isSimpleMachine() { return true; @@ -134,9 +130,15 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - if (aSide != ForgeDirection.UP.ordinal()) return new ITexture[]{MACHINE_CASINGS[mTier][aColorIndex + 1]}; - return new ITexture[]{ + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { + if (aSide != ForgeDirection.UP.ordinal()) return new ITexture[] {MACHINE_CASINGS[mTier][aColorIndex + 1]}; + return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_QTANK), TextureFactory.builder().addIcon(OVERLAY_QTANK_GLOW).glow().build() @@ -158,7 +160,10 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit @Override public final void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { mVoidOverflow = !mVoidOverflow; - GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal(mVoidOverflow ? "GT5U.machines.voidoveflow.enabled" : "GT5U.machines.voidoveflow.disabled")); + GT_Utility.sendChatToPlayer( + aPlayer, + StatCollector.translateToLocal( + mVoidOverflow ? "GT5U.machines.voidoveflow.enabled" : "GT5U.machines.voidoveflow.disabled")); } @Override @@ -185,8 +190,7 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit if (isFluidChangingAllowed() && getFillableStack() != null && getFillableStack().amount <= 0) setFillableStack(null); - if (mOpenerCount > 0) - updateFluidDisplayItem(); + if (mOpenerCount > 0) updateFluidDisplayItem(); if (doesEmptyContainers()) { FluidStack tFluid = GT_Utility.getFluidForFilledItem(mInventory[getInputSlot()], true); @@ -196,7 +200,10 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit if ((tFluid.amount <= getRealCapacity()) || mVoidOverflow) { tFluid = tFluid.copy(); tFluid.amount = Math.min(tFluid.amount, getRealCapacity()); - if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), GT_Utility.getContainerForFilledItem(mInventory[getInputSlot()], true), 1)) { + if (aBaseMetaTileEntity.addStackToSlot( + getOutputSlot(), + GT_Utility.getContainerForFilledItem(mInventory[getInputSlot()], true), + 1)) { setFillableStack(tFluid); this.onEmptyingContainerWhenEmpty(); aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); @@ -205,9 +212,14 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit } } else { if (tFluid.isFluidEqual(getFillableStack())) { - if ((((long) tFluid.amount + getFillableStack().amount) <= (long) getRealCapacity()) || mVoidOverflow) { - if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), GT_Utility.getContainerForFilledItem(mInventory[getInputSlot()], true), 1)) { - getFillableStack().amount += Math.min(tFluid.amount, getRealCapacity() - getFillableStack().amount); + if ((((long) tFluid.amount + getFillableStack().amount) <= (long) getRealCapacity()) + || mVoidOverflow) { + if (aBaseMetaTileEntity.addStackToSlot( + getOutputSlot(), + GT_Utility.getContainerForFilledItem(mInventory[getInputSlot()], true), + 1)) { + getFillableStack().amount += + Math.min(tFluid.amount, getRealCapacity() - getFillableStack().amount); aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); } } @@ -217,7 +229,8 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit } if (doesFillContainers()) { - ItemStack tOutput = GT_Utility.fillFluidContainer(getDrainableStack(), mInventory[getInputSlot()], false, true); + ItemStack tOutput = + GT_Utility.fillFluidContainer(getDrainableStack(), mInventory[getInputSlot()], false, true); if (tOutput != null && aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), tOutput, 1)) { FluidStack tFluid = GT_Utility.getFluidForFilledItem(tOutput, true); aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); @@ -230,8 +243,11 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit @Override public int fill(FluidStack aFluid, boolean doFill) { - if (aFluid == null || aFluid.getFluid().getID() <= 0 || aFluid.amount <= 0 || !canTankBeFilled() || !isFluidInputAllowed(aFluid)) - return 0; + if (aFluid == null + || aFluid.getFluid().getID() <= 0 + || aFluid.amount <= 0 + || !canTankBeFilled() + || !isFluidInputAllowed(aFluid)) return 0; if (getFillableStack() != null && !getFillableStack().isFluidEqual(aFluid)) { return 0; } @@ -276,7 +292,7 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit return mVoidOverflow ? Integer.MAX_VALUE : getRealCapacity(); } - public int getRealCapacity(){ + public int getRealCapacity() { return commonSizeCompute(mTier); } @@ -292,6 +308,6 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit @Override public FluidTankInfo[] getTankInfo(ForgeDirection aSide) { - return new FluidTankInfo[]{getInfo()}; + return new FluidTankInfo[] {getInfo()}; } } diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java index ce8380f419..b4d5345391 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java @@ -1,5 +1,10 @@ package gregtech.common.tileentities.storage; +import static gregtech.api.enums.Textures.BlockIcons.LOCKERS; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAYS_ENERGY_IN; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_LOCKER; + import gregtech.api.enums.SoundResource; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -12,11 +17,6 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import static gregtech.api.enums.Textures.BlockIcons.LOCKERS; -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAYS_ENERGY_IN; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_LOCKER; - public class GT_MetaTileEntity_Locker extends GT_MetaTileEntity_TieredMachineBlock { public byte mType = 0; @@ -55,9 +55,19 @@ public class GT_MetaTileEntity_Locker extends GT_MetaTileEntity_TieredMachineBlo } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { if (aSide == aFacing) { - return new ITexture[]{this.mTextures[2][(aColorIndex + 1)][0], this.mTextures[2][(aColorIndex + 1)][1], LOCKERS[Math.abs(this.mType % LOCKERS.length)]}; + return new ITexture[] { + this.mTextures[2][(aColorIndex + 1)][0], + this.mTextures[2][(aColorIndex + 1)][1], + LOCKERS[Math.abs(this.mType % LOCKERS.length)] + }; } return this.mTextures[0][(aColorIndex + 1)]; } @@ -172,7 +182,8 @@ public class GT_MetaTileEntity_Locker extends GT_MetaTileEntity_TieredMachineBlo } @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) { + public boolean onRightclick( + IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) { if ((aBaseMetaTileEntity.isServerSide()) && (aSide == aBaseMetaTileEntity.getFrontFacing())) { for (int i = 0; i < 4; i++) { ItemStack tSwapStack = this.mInventory[i]; diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java index f991fea66e..384b55cc4c 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java @@ -47,8 +47,7 @@ public class GT_MetaTileEntity_QuantumChest extends GT_MetaTileEntity_DigitalChe mInvData.appendTag(tNBT); } } - if (mItemStack != null) - aNBT.setTag("mItemStack", getItemStack().writeToNBT(new NBTTagCompound())); + if (mItemStack != null) aNBT.setTag("mItemStack", getItemStack().writeToNBT(new NBTTagCompound())); aNBT.setTag("Inventory", mInvData); aNBT.setInteger("mItemCount", getItemCount()); aNBT.setBoolean("mVoidOverflow", mVoidOverflow); @@ -58,7 +57,7 @@ public class GT_MetaTileEntity_QuantumChest extends GT_MetaTileEntity_DigitalChe @Override protected String chestName() { - return "Quantum Chest"; + return "Quantum Chest"; } @Override @@ -73,7 +72,7 @@ public class GT_MetaTileEntity_QuantumChest extends GT_MetaTileEntity_DigitalChe @Override protected ItemStack getItemStack() { - return mItemStack; + return mItemStack; } @Override diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java index da283a19d8..886dd676e7 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java @@ -28,21 +28,22 @@ public class GT_MetaTileEntity_QuantumTank extends GT_MetaTileEntity_DigitalTank public String[] getInfoData() { if (mFluid == null) { - return new String[]{ - EnumChatFormatting.BLUE + "Quantum Tank" + EnumChatFormatting.RESET, - "Stored Fluid:", - EnumChatFormatting.GOLD + "No Fluid" + EnumChatFormatting.RESET, - EnumChatFormatting.GREEN + Integer.toString(0) + " L" + EnumChatFormatting.RESET + " " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(getCapacity()) + " L" + EnumChatFormatting.RESET - }; - } - return new String[]{ + return new String[] { EnumChatFormatting.BLUE + "Quantum Tank" + EnumChatFormatting.RESET, "Stored Fluid:", - EnumChatFormatting.GOLD + mFluid.getLocalizedName() + EnumChatFormatting.RESET, - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mFluid.amount) + " L" + EnumChatFormatting.RESET + " " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(getCapacity()) + " L" + EnumChatFormatting.RESET + EnumChatFormatting.GOLD + "No Fluid" + EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + Integer.toString(0) + " L" + EnumChatFormatting.RESET + " " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(getCapacity()) + " L" + + EnumChatFormatting.RESET + }; + } + return new String[] { + EnumChatFormatting.BLUE + "Quantum Tank" + EnumChatFormatting.RESET, + "Stored Fluid:", + EnumChatFormatting.GOLD + mFluid.getLocalizedName() + EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mFluid.amount) + " L" + EnumChatFormatting.RESET + " " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(getCapacity()) + " L" + + EnumChatFormatting.RESET }; } - } diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperChest.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperChest.java index 92f9aec998..f2be7312ec 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperChest.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperChest.java @@ -42,8 +42,7 @@ public class GT_MetaTileEntity_SuperChest extends GT_MetaTileEntity_DigitalChest mInvData.appendTag(tNBT); } } - if (mItemStack != null) - aNBT.setTag("mItemStack", getItemStack().writeToNBT(new NBTTagCompound())); + if (mItemStack != null) aNBT.setTag("mItemStack", getItemStack().writeToNBT(new NBTTagCompound())); aNBT.setTag("Inventory", mInvData); aNBT.setInteger("mItemCount", getItemCount()); aNBT.setBoolean("mVoidOverflow", mVoidOverflow); diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperTank.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperTank.java index dbe54e9005..3b7fb8e849 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperTank.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperTank.java @@ -28,21 +28,21 @@ public class GT_MetaTileEntity_SuperTank extends GT_MetaTileEntity_DigitalTankBa public String[] getInfoData() { if (mFluid == null) { - return new String[]{ - EnumChatFormatting.BLUE + "Super Tank" + EnumChatFormatting.RESET, - "Stored Fluid:", - EnumChatFormatting.GOLD + "No Fluid" + EnumChatFormatting.RESET, - EnumChatFormatting.GREEN + "0 L" + EnumChatFormatting.RESET + " " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(getCapacity()) + " L" + EnumChatFormatting.RESET - }; - } - return new String[]{ + return new String[] { EnumChatFormatting.BLUE + "Super Tank" + EnumChatFormatting.RESET, "Stored Fluid:", - EnumChatFormatting.GOLD + mFluid.getLocalizedName() + EnumChatFormatting.RESET, - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mFluid.amount) + " L" + EnumChatFormatting.RESET + " " + - EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(getCapacity()) + " L" + EnumChatFormatting.RESET + EnumChatFormatting.GOLD + "No Fluid" + EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + "0 L" + EnumChatFormatting.RESET + " " + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(getCapacity()) + " L" + EnumChatFormatting.RESET + }; + } + return new String[] { + EnumChatFormatting.BLUE + "Super Tank" + EnumChatFormatting.RESET, + "Stored Fluid:", + EnumChatFormatting.GOLD + mFluid.getLocalizedName() + EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mFluid.amount) + " L" + EnumChatFormatting.RESET + " " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(getCapacity()) + " L" + + EnumChatFormatting.RESET }; } - } diff --git a/src/main/java/gregtech/common/tools/GT_Tool.java b/src/main/java/gregtech/common/tools/GT_Tool.java index 3fa80a9f0a..bd17809e59 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool.java +++ b/src/main/java/gregtech/common/tools/GT_Tool.java @@ -4,6 +4,7 @@ import gregtech.api.damagesources.GT_DamageSources; import gregtech.api.enums.SoundResource; import gregtech.api.interfaces.IToolStats; import gregtech.api.items.GT_MetaGenerated_Tool; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.Entity; @@ -17,8 +18,6 @@ import net.minecraft.util.IChatComponent; import net.minecraft.world.World; import net.minecraftforge.event.world.BlockEvent; -import java.util.List; - public abstract class GT_Tool implements IToolStats { public static final Enchantment[] FORTUNE_ENCHANTMENT = {Enchantment.fortune}; public static final Enchantment[] LOOTING_ENCHANTMENT = {Enchantment.looting}; @@ -101,8 +100,8 @@ public abstract class GT_Tool implements IToolStats { } @Override - public boolean isChainsaw(){ - return false; + public boolean isChainsaw() { + return false; } @Override @@ -127,15 +126,30 @@ public abstract class GT_Tool implements IToolStats { @Override public DamageSource getDamageSource(EntityLivingBase aPlayer, Entity aEntity) { - return GT_DamageSources.getCombatDamage((aPlayer instanceof EntityPlayer) ? "player" : "mob", aPlayer, (aEntity instanceof EntityLivingBase) ? getDeathMessage(aPlayer, (EntityLivingBase) aEntity) : null); + return GT_DamageSources.getCombatDamage( + (aPlayer instanceof EntityPlayer) ? "player" : "mob", + aPlayer, + (aEntity instanceof EntityLivingBase) ? getDeathMessage(aPlayer, (EntityLivingBase) aEntity) : null); } public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new EntityDamageSource((aPlayer instanceof EntityPlayer) ? "player" : "mob", aPlayer).func_151519_b(aEntity); - } - - @Override - public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + return new EntityDamageSource((aPlayer instanceof EntityPlayer) ? "player" : "mob", aPlayer) + .func_151519_b(aEntity); + } + + @Override + public int convertBlockDrops( + List<ItemStack> aDrops, + ItemStack aStack, + EntityPlayer aPlayer, + Block aBlock, + int aX, + int aY, + int aZ, + byte aMetaData, + int aFortune, + boolean aSilkTouch, + BlockEvent.HarvestDropsEvent aEvent) { return 0; } @@ -162,21 +176,30 @@ public abstract class GT_Tool implements IToolStats { } @Override - public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { - } + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {} @Override - public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) { + public float getNormalDamageAgainstEntity( + float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) { return aOriginalDamage; } @Override - public float getMagicDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) { + public float getMagicDamageAgainstEntity( + float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) { return aOriginalDamage; } - @Override - public float getMiningSpeed(Block aBlock, byte aMetaData, float aDefault, EntityPlayer aPlayer, World worldObj, int aX, int aY, int aZ) { - return aDefault; - } + @Override + public float getMiningSpeed( + Block aBlock, + byte aMetaData, + float aDefault, + EntityPlayer aPlayer, + World worldObj, + int aX, + int aY, + int aZ) { + return aDefault; + } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Axe.java b/src/main/java/gregtech/common/tools/GT_Tool_Axe.java index 302ea9867f..5155d061fe 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Axe.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Axe.java @@ -5,6 +5,7 @@ import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.IIconContainer; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.util.GT_ToolHarvestHelper; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; @@ -16,8 +17,6 @@ import net.minecraft.util.IChatComponent; import net.minecraft.world.World; import net.minecraftforge.event.world.BlockEvent; -import java.util.List; - public class GT_Tool_Axe extends GT_Tool { @Override public int getToolDamagePerBlockBreak() { @@ -91,17 +90,31 @@ public class GT_Tool_Axe extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { - return GT_ToolHarvestHelper.isAppropriateTool(aBlock,aMetaData ,"axe") - || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock ,Material.wood); - } - - @Override - public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "axe") + || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, Material.wood); + } + + @Override + public int convertBlockDrops( + List<ItemStack> aDrops, + ItemStack aStack, + EntityPlayer aPlayer, + Block aBlock, + int aX, + int aY, + int aZ, + byte aMetaData, + int aFortune, + boolean aSilkTouch, + BlockEvent.HarvestDropsEvent aEvent) { int rAmount = 0; - if ((GregTech_API.sTimber) && (!aPlayer.isSneaking()) && (OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData)))) { + if ((GregTech_API.sTimber) + && (!aPlayer.isSneaking()) + && (OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData)))) { int tY = aY + 1; for (int tH = aPlayer.worldObj.getHeight(); tY < tH; tY++) { - if ((aPlayer.worldObj.getBlock(aX, tY, aZ) != aBlock) || (!aPlayer.worldObj.func_147480_a(aX, tY, aZ, true))) { + if ((aPlayer.worldObj.getBlock(aX, tY, aZ) != aBlock) + || (!aPlayer.worldObj.func_147480_a(aX, tY, aZ, true))) { break; } rAmount++; @@ -111,19 +124,29 @@ public class GT_Tool_Axe extends GT_Tool { } @Override - public float getMiningSpeed(Block aBlock, byte aMetaData, float aDefault, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) - { - if (aBlock.isWood(aPlayer.worldObj, aX, aY, aZ) && OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData))){ - float rAmount = 1.0F;float tIncrement = 1.0F; - if ((GregTech_API.sTimber) && !aPlayer.isSneaking()){ - int tY = aY + 1; - for (int tH = aPlayer.worldObj.getHeight(); (tY < tH) && (aPlayer.worldObj.getBlock(aX, tY, aZ) == aBlock); tY++){ - tIncrement += 0.1F;rAmount += tIncrement; - } + public float getMiningSpeed( + Block aBlock, byte aMetaData, float aDefault, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) { + if (aBlock.isWood(aPlayer.worldObj, aX, aY, aZ) + && OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData))) { + float rAmount = 1.0F; + float tIncrement = 1.0F; + if ((GregTech_API.sTimber) && !aPlayer.isSneaking()) { + int tY = aY + 1; + for (int tH = aPlayer.worldObj.getHeight(); + (tY < tH) && (aPlayer.worldObj.getBlock(aX, tY, aZ) == aBlock); + tY++) { + tIncrement += 0.1F; + rAmount += tIncrement; + } + } + return 2.0F * aDefault / rAmount; } - return 2.0F * aDefault / rAmount; - } - return (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.gourd) ? aDefault / 4.0F : aDefault; + return (aBlock.getMaterial() == Material.leaves) + || (aBlock.getMaterial() == Material.vine) + || (aBlock.getMaterial() == Material.plants) + || (aBlock.getMaterial() == Material.gourd) + ? aDefault / 4.0F + : aDefault; } @Override @@ -133,20 +156,29 @@ public class GT_Tool_Axe extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[OrePrefixes.toolHeadAxe.mTextureIndex] : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mIconSet.mTextures[OrePrefixes.stick.mTextureIndex]; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) + .mIconSet + .mTextures[OrePrefixes.toolHeadAxe.mTextureIndex] + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack) + .mIconSet + .mTextures[OrePrefixes.stick.mTextureIndex]; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override - public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { - } + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {} @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been chopped by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + + " has been chopped by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java b/src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java index a123ff1ff6..228d06d2a7 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java @@ -6,6 +6,7 @@ import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_ToolHarvestHelper; import gregtech.api.util.GT_Utility; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; @@ -18,8 +19,6 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; import net.minecraftforge.event.world.BlockEvent; -import java.util.List; - public class GT_Tool_BranchCutter extends GT_Tool { @Override public float getBaseDamage() { @@ -42,9 +41,21 @@ public class GT_Tool_BranchCutter extends GT_Tool { } @Override - public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + public int convertBlockDrops( + List<ItemStack> aDrops, + ItemStack aStack, + EntityPlayer aPlayer, + Block aBlock, + int aX, + int aY, + int aZ, + byte aMetaData, + int aFortune, + boolean aSilkTouch, + BlockEvent.HarvestDropsEvent aEvent) { if (aBlock.getMaterial() == Material.leaves) { - aEvent.dropChance = Math.min(1.0F, Math.max(aEvent.dropChance, (aStack.getItem().getHarvestLevel(aStack, "") + 1) * 0.2F)); + aEvent.dropChance = Math.min( + 1.0F, Math.max(aEvent.dropChance, (aStack.getItem().getHarvestLevel(aStack, "") + 1) * 0.2F)); if (aBlock == Blocks.leaves) { aDrops.clear(); if (((aMetaData & 0x3) == 0) && (aPlayer.worldObj.rand.nextInt(9) <= aFortune * 2)) { @@ -65,8 +76,8 @@ public class GT_Tool_BranchCutter extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { - return GT_ToolHarvestHelper.isAppropriateTool(aBlock , aMetaData ,"grafter") - || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock ,Material.leaves); + return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "grafter") + || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, Material.leaves); } @Override @@ -76,11 +87,15 @@ public class GT_Tool_BranchCutter extends GT_Tool { @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been trimmed by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + + " has been trimmed by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_ButcheryKnife.java b/src/main/java/gregtech/common/tools/GT_Tool_ButcheryKnife.java index f57ba7f5d3..ab10e40bae 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_ButcheryKnife.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_ButcheryKnife.java @@ -70,7 +70,7 @@ public class GT_Tool_ButcheryKnife extends GT_Tool { @Override public int[] getEnchantmentLevels(ItemStack aStack) { - return new int[]{(2 + GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolQuality) / 2}; + return new int[] {(2 + GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolQuality) / 2}; } @Override @@ -80,12 +80,16 @@ public class GT_Tool_ButcheryKnife extends GT_Tool { @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + " has butchered " + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE); + return new ChatComponentText( + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + " has butchered " + + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE); } @Override diff --git a/src/main/java/gregtech/common/tools/GT_Tool_BuzzSaw.java b/src/main/java/gregtech/common/tools/GT_Tool_BuzzSaw.java index cbdb1871cc..db57a82cb8 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_BuzzSaw.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_BuzzSaw.java @@ -54,16 +54,24 @@ public class GT_Tool_BuzzSaw extends GT_Tool_Saw { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadBuzzSaw.mTextureIndex] : Textures.ItemIcons.HANDLE_BUZZSAW; + return !aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.toolHeadBuzzSaw.mTextureIndex] + : Textures.ItemIcons.HANDLE_BUZZSAW; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + return !aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " got buzzed by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + return new ChatComponentText( + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " got buzzed by " + + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_HV.java b/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_HV.java index 117b7b6bc0..a031fbc9da 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_HV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_HV.java @@ -47,6 +47,10 @@ public class GT_Tool_Chainsaw_HV extends GT_Tool_Chainsaw_LV { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadChainsaw.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_HV; + return aIsToolHead + ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.toolHeadChainsaw.mTextureIndex] + : Textures.ItemIcons.POWER_UNIT_HV; } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_LV.java b/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_LV.java index b796fb6fce..f0b26eb913 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_LV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_LV.java @@ -7,6 +7,8 @@ import gregtech.api.enums.SoundResource; import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; import gregtech.api.items.GT_MetaGenerated_Tool; +import java.util.ArrayList; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; @@ -20,9 +22,6 @@ import net.minecraft.world.World; import net.minecraftforge.common.IShearable; import net.minecraftforge.event.world.BlockEvent; -import java.util.ArrayList; -import java.util.List; - public class GT_Tool_Chainsaw_LV extends GT_Tool_Saw { @Override public int getToolDamagePerBlockBreak() { @@ -85,8 +84,8 @@ public class GT_Tool_Chainsaw_LV extends GT_Tool_Saw { } @Override - public boolean isChainsaw(){ - return true; + public boolean isChainsaw() { + return true; } @Override @@ -103,28 +102,43 @@ public class GT_Tool_Chainsaw_LV extends GT_Tool_Saw { } catch (Exception ignored) { } } + @Override - public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + public int convertBlockDrops( + List<ItemStack> aDrops, + ItemStack aStack, + EntityPlayer aPlayer, + Block aBlock, + int aX, + int aY, + int aZ, + byte aMetaData, + int aFortune, + boolean aSilkTouch, + BlockEvent.HarvestDropsEvent aEvent) { int rAmount = 0; if ((aBlock.getMaterial() == Material.leaves) && ((aBlock instanceof IShearable))) { aPlayer.worldObj.setBlock(aX, aY, aZ, aBlock, aMetaData, 0); if (((IShearable) aBlock).isShearable(aStack, aPlayer.worldObj, aX, aY, aZ)) { - ArrayList<ItemStack> tDrops = ((IShearable) aBlock).onSheared(aStack, aPlayer.worldObj, aX, aY, aZ, aFortune); + ArrayList<ItemStack> tDrops = + ((IShearable) aBlock).onSheared(aStack, aPlayer.worldObj, aX, aY, aZ, aFortune); aDrops.clear(); - } aPlayer.worldObj.setBlock(aX, aY, aZ, Blocks.air, 0, 0); - } else - if (((aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce)) && (aDrops.isEmpty())) { + } else if (((aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce)) + && (aDrops.isEmpty())) { aDrops.add(new ItemStack(aBlock, 1, aMetaData)); aPlayer.worldObj.setBlockToAir(aX, aY, aZ); aEvent.dropChance = 1.0F; return 1; } - if ((GregTech_API.sTimber) && (!aPlayer.isSneaking()) && (OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData)))) { + if ((GregTech_API.sTimber) + && (!aPlayer.isSneaking()) + && (OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData)))) { int tY = aY + 1; for (int tH = aPlayer.worldObj.getHeight(); tY < tH; tY++) { - if ((aPlayer.worldObj.getBlock(aX, tY, aZ) != aBlock) || (!aPlayer.worldObj.func_147480_a(aX, tY, aZ, true))) { + if ((aPlayer.worldObj.getBlock(aX, tY, aZ) != aBlock) + || (!aPlayer.worldObj.func_147480_a(aX, tY, aZ, true))) { break; } rAmount++; @@ -134,33 +148,51 @@ public class GT_Tool_Chainsaw_LV extends GT_Tool_Saw { } @Override - public float getMiningSpeed(Block aBlock, byte aMetaData, float aDefault, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) - { - if (aBlock.isWood(aPlayer.worldObj, aX, aY, aZ) && OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData))){ - float rAmount = 1.0F;float tIncrement = 1.0F; - if ((GregTech_API.sTimber) && !aPlayer.isSneaking()){ - int tY = aY + 1; - for (int tH = aPlayer.worldObj.getHeight(); (tY < tH) && (aPlayer.worldObj.getBlock(aX, tY, aZ) == aBlock); tY++){ - tIncrement += 0.1F;rAmount += tIncrement; - } + public float getMiningSpeed( + Block aBlock, byte aMetaData, float aDefault, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) { + if (aBlock.isWood(aPlayer.worldObj, aX, aY, aZ) + && OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData))) { + float rAmount = 1.0F; + float tIncrement = 1.0F; + if ((GregTech_API.sTimber) && !aPlayer.isSneaking()) { + int tY = aY + 1; + for (int tH = aPlayer.worldObj.getHeight(); + (tY < tH) && (aPlayer.worldObj.getBlock(aX, tY, aZ) == aBlock); + tY++) { + tIncrement += 0.1F; + rAmount += tIncrement; + } + } + return 2.0F * aDefault / rAmount; } - return 2.0F * aDefault / rAmount; - } - return (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.gourd) ? aDefault / 4.0F : aDefault; + return (aBlock.getMaterial() == Material.leaves) + || (aBlock.getMaterial() == Material.vine) + || (aBlock.getMaterial() == Material.plants) + || (aBlock.getMaterial() == Material.gourd) + ? aDefault / 4.0F + : aDefault; } @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadChainsaw.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_LV; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.toolHeadChainsaw.mTextureIndex] + : Textures.ItemIcons.POWER_UNIT_LV; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " was massacred by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + + " was massacred by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_MV.java b/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_MV.java index e571a26cfc..c28f89e361 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_MV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_MV.java @@ -47,6 +47,10 @@ public class GT_Tool_Chainsaw_MV extends GT_Tool_Chainsaw_LV { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadChainsaw.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_MV; + return aIsToolHead + ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.toolHeadChainsaw.mTextureIndex] + : Textures.ItemIcons.POWER_UNIT_MV; } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Crowbar.java b/src/main/java/gregtech/common/tools/GT_Tool_Crowbar.java index a0c3e9a059..aeff5ecd17 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Crowbar.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Crowbar.java @@ -7,6 +7,7 @@ import gregtech.api.interfaces.IToolStats; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.common.items.GT_MetaGenerated_Tool_01; import gregtech.common.items.behaviors.Behaviour_Crowbar; +import java.util.Iterator; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; @@ -15,8 +16,6 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; -import java.util.Iterator; - public class GT_Tool_Crowbar extends GT_Tool { @Override public int getToolDamagePerBlockBreak() { @@ -95,7 +94,12 @@ public class GT_Tool_Crowbar extends GT_Tool { } String tTool = aBlock.getHarvestTool(aMetaData); if ((tTool == null) || (tTool.equals(""))) { - for (Iterator i$ = GT_MetaGenerated_Tool_01.INSTANCE.mToolStats.values().iterator(); i$.hasNext(); i$.next()) { + for (Iterator i$ = GT_MetaGenerated_Tool_01.INSTANCE + .mToolStats + .values() + .iterator(); + i$.hasNext(); + i$.next()) { if (((i$ instanceof GT_Tool_Crowbar)) && (!((IToolStats) i$).isMinableBlock(aBlock, aMetaData))) { return false; } @@ -127,6 +131,8 @@ public class GT_Tool_Crowbar extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " was removed by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + return new ChatComponentText( + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " was removed by " + + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Drill_HV.java b/src/main/java/gregtech/common/tools/GT_Tool_Drill_HV.java index 36c414d40f..018bf3d636 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Drill_HV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Drill_HV.java @@ -59,6 +59,10 @@ public class GT_Tool_Drill_HV extends GT_Tool_Drill_LV { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadDrill.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_HV; + return aIsToolHead + ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.toolHeadDrill.mTextureIndex] + : Textures.ItemIcons.POWER_UNIT_HV; } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Drill_LV.java b/src/main/java/gregtech/common/tools/GT_Tool_Drill_LV.java index cea56791a0..202d9750ad 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Drill_LV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Drill_LV.java @@ -90,18 +90,17 @@ public class GT_Tool_Drill_LV extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "pickaxe", "shovel") - || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, - Material.rock, - Material.iron, - Material.anvil, - Material.sand, - Material.grass, - Material.ground, - Material.snow, - Material.clay, - Material.glass - ); - + || GT_ToolHarvestHelper.isAppropriateMaterial( + aBlock, + Material.rock, + Material.iron, + Material.anvil, + Material.sand, + Material.grass, + Material.ground, + Material.snow, + Material.clay, + Material.glass); } @Override @@ -111,17 +110,22 @@ public class GT_Tool_Drill_LV extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadDrill.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_LV; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.toolHeadDrill.mTextureIndex] + : Textures.ItemIcons.POWER_UNIT_LV; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override - public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { - } + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {} @Override public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) { @@ -137,6 +141,8 @@ public class GT_Tool_Drill_LV extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " got the Drill! (by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + ")"); + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + + " got the Drill! (by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE + ")"); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Drill_MV.java b/src/main/java/gregtech/common/tools/GT_Tool_Drill_MV.java index 7bfddc6f98..b512a9d0bb 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Drill_MV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Drill_MV.java @@ -5,8 +5,7 @@ import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; import net.minecraft.item.ItemStack; -public class GT_Tool_Drill_MV - extends GT_Tool_Drill_LV { +public class GT_Tool_Drill_MV extends GT_Tool_Drill_LV { @Override public int getToolDamagePerBlockBreak() { return GT_Mod.gregtechproxy.mHardRock ? 100 : 200; @@ -49,6 +48,10 @@ public class GT_Tool_Drill_MV @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadDrill.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_MV; + return aIsToolHead + ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.toolHeadDrill.mTextureIndex] + : Textures.ItemIcons.POWER_UNIT_MV; } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_File.java b/src/main/java/gregtech/common/tools/GT_Tool_File.java index e09f1cd784..6dfcaf685e 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_File.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_File.java @@ -11,8 +11,7 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; -public class GT_Tool_File - extends GT_Tool { +public class GT_Tool_File extends GT_Tool { @Override public int getToolDamagePerBlockBreak() { return 50; @@ -85,7 +84,7 @@ public class GT_Tool_File @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { - return GT_ToolHarvestHelper.isAppropriateTool(aBlock ,aMetaData,"file"); + return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "file"); } @Override @@ -95,20 +94,27 @@ public class GT_Tool_File @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadFile.mTextureIndex] : Textures.ItemIcons.HANDLE_FILE; + return !aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.toolHeadFile.mTextureIndex] + : Textures.ItemIcons.HANDLE_FILE; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + return !aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override - public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { - } + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {} @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been filed D for 'Dead' by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + + " has been filed D for 'Dead' by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java b/src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java index 130766759e..355078497e 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java @@ -1,5 +1,7 @@ package gregtech.common.tools; +import static gregtech.GT_Mod.MAX_IC2; + import gregtech.GT_Mod; import gregtech.api.enums.SoundResource; import gregtech.api.interfaces.IIconContainer; @@ -8,6 +10,8 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_ToolHarvestHelper; import gregtech.api.util.GT_Utility; import gregtech.common.items.behaviors.Behaviour_Prospecting; +import java.util.Arrays; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.Entity; @@ -20,16 +24,13 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; import net.minecraftforge.event.world.BlockEvent; -import java.util.Arrays; -import java.util.List; - -import static gregtech.GT_Mod.MAX_IC2; - public class GT_Tool_HardHammer extends GT_Tool { - public static final List<String> mEffectiveList = Arrays.asList(EntityIronGolem.class.getName(), "EntityTowerGuardian"); + public static final List<String> mEffectiveList = + Arrays.asList(EntityIronGolem.class.getName(), "EntityTowerGuardian"); @Override - public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) { + public float getNormalDamageAgainstEntity( + float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) { String tName = aEntity.getClass().getName(); tName = tName.substring(tName.lastIndexOf('.') + 1); return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage; @@ -118,21 +119,31 @@ public class GT_Tool_HardHammer extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "hammer", "pickaxe") - || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, - Material.rock, - Material.glass, - Material.ice, - Material.packedIce) + || GT_ToolHarvestHelper.isAppropriateMaterial( + aBlock, Material.rock, Material.glass, Material.ice, Material.packedIce) || GT_Recipe.GT_Recipe_Map.sHammerRecipes.containsInput(new ItemStack(aBlock, 1, aMetaData)); } @Override - public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + public int convertBlockDrops( + List<ItemStack> aDrops, + ItemStack aStack, + EntityPlayer aPlayer, + Block aBlock, + int aX, + int aY, + int aZ, + byte aMetaData, + int aFortune, + boolean aSilkTouch, + BlockEvent.HarvestDropsEvent aEvent) { int rConversions = 0; - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, MAX_IC2, null, new ItemStack(aBlock, 1, aMetaData)); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe( + null, true, MAX_IC2, null, new ItemStack(aBlock, 1, aMetaData)); if ((tRecipe == null) || (aBlock.hasTileEntity(aMetaData))) { for (ItemStack tDrop : aDrops) { - tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, MAX_IC2, null, GT_Utility.copyAmount(1L, tDrop)); + tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe( + null, true, MAX_IC2, null, GT_Utility.copyAmount(1L, tDrop)); if (tRecipe != null) { ItemStack tHammeringOutput = tRecipe.getOutput(0); if (tHammeringOutput != null) { @@ -158,12 +169,20 @@ public class GT_Tool_HardHammer extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadHammer.mTextureIndex] : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.toolHeadHammer.mTextureIndex] + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override @@ -173,7 +192,9 @@ public class GT_Tool_HardHammer extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " was squashed by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + return new ChatComponentText( + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " was squashed by " + + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); } @Override diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Hoe.java b/src/main/java/gregtech/common/tools/GT_Tool_Hoe.java index 67cfade9c8..84dbdba266 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Hoe.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Hoe.java @@ -82,8 +82,8 @@ public class GT_Tool_Hoe extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { - return GT_ToolHarvestHelper.isAppropriateTool(aBlock , aMetaData ,"hoe") - || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock ,Material.gourd); + return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "hoe") + || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, Material.gourd); } @Override @@ -93,12 +93,20 @@ public class GT_Tool_Hoe extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadHoe.mTextureIndex] : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.toolHeadHoe.mTextureIndex] + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override @@ -114,6 +122,8 @@ public class GT_Tool_Hoe extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been called a stupid Hoe by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + + " has been called a stupid Hoe by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_JackHammer.java b/src/main/java/gregtech/common/tools/GT_Tool_JackHammer.java index 3a37e4d3e3..220ac01aba 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_JackHammer.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_JackHammer.java @@ -6,6 +6,7 @@ import gregtech.api.interfaces.IIconContainer; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_ToolHarvestHelper; import gregtech.api.util.GT_Utility; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; @@ -16,8 +17,6 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; import net.minecraftforge.event.world.BlockEvent; -import java.util.List; - public class GT_Tool_JackHammer extends GT_Tool_Drill_LV { @Override public int getToolDamagePerBlockBreak() { @@ -61,23 +60,36 @@ public class GT_Tool_JackHammer extends GT_Tool_Drill_LV { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { - return GT_ToolHarvestHelper.isAppropriateTool(aBlock , aMetaData ,"pickaxe")// - || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock,// - Material.rock,// - Material.glass,// - Material.ice,// - Material.packedIce// - ); - + return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "pickaxe") // + || GT_ToolHarvestHelper.isAppropriateMaterial( + aBlock, // + Material.rock, // + Material.glass, // + Material.ice, // + Material.packedIce // + ); } @Override - public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + public int convertBlockDrops( + List<ItemStack> aDrops, + ItemStack aStack, + EntityPlayer aPlayer, + Block aBlock, + int aX, + int aY, + int aZ, + byte aMetaData, + int aFortune, + boolean aSilkTouch, + BlockEvent.HarvestDropsEvent aEvent) { int rConversions = 0; - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack(aBlock, 1, aMetaData)); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe( + null, true, 2147483647L, null, new ItemStack(aBlock, 1, aMetaData)); if ((tRecipe == null) || (aBlock.hasTileEntity(aMetaData))) { for (ItemStack tDrop : aDrops) { - tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, GT_Utility.copyAmount(1L, new Object[]{tDrop})); + tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe( + null, true, 2147483647L, null, GT_Utility.copyAmount(1L, new Object[] {tDrop})); if (tRecipe != null) { ItemStack tHammeringOutput = tRecipe.getOutput(0); if (tHammeringOutput != null) { @@ -105,7 +117,6 @@ public class GT_Tool_JackHammer extends GT_Tool_Drill_LV { } } - @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? Textures.ItemIcons.JACKHAMMER : null; @@ -113,6 +124,8 @@ public class GT_Tool_JackHammer extends GT_Tool_Drill_LV { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been jackhammered into pieces by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + + " has been jackhammered into pieces by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Knife.java b/src/main/java/gregtech/common/tools/GT_Tool_Knife.java index 2a4ba6fff9..c211e1ac27 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Knife.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Knife.java @@ -57,6 +57,9 @@ public class GT_Tool_Knife extends GT_Tool_Sword { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText("<" + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + "> " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + " what are you doing?, " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + "?!? STAHP!!!"); + return new ChatComponentText("<" + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + "> " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE + " what are you doing?, " + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + "?!? STAHP!!!"); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Mortar.java b/src/main/java/gregtech/common/tools/GT_Tool_Mortar.java index 4244a00638..1042ab6344 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Mortar.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Mortar.java @@ -103,11 +103,12 @@ public class GT_Tool_Mortar extends GT_Tool { } @Override - public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { - } + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {} @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " was grounded by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + return new ChatComponentText( + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " was grounded by " + + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Pickaxe.java b/src/main/java/gregtech/common/tools/GT_Tool_Pickaxe.java index aebd965428..ce7707b4c2 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Pickaxe.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Pickaxe.java @@ -82,13 +82,13 @@ public class GT_Tool_Pickaxe extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { - return GT_ToolHarvestHelper.isAppropriateTool(aBlock , aMetaData ,"pickaxe")// - || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock,// - Material.rock, - Material.iron, - Material.anvil, - Material.glass - ); + return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "pickaxe") // + || GT_ToolHarvestHelper.isAppropriateMaterial( + aBlock, // + Material.rock, + Material.iron, + Material.anvil, + Material.glass); } @Override @@ -98,17 +98,24 @@ public class GT_Tool_Pickaxe extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadPickaxe.mTextureIndex] : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.toolHeadPickaxe.mTextureIndex] + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override - public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { - } + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {} @Override public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) { @@ -123,6 +130,8 @@ public class GT_Tool_Pickaxe extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " got mined by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + return new ChatComponentText( + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " got mined by " + + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Plow.java b/src/main/java/gregtech/common/tools/GT_Tool_Plow.java index 3c61e93c9f..dcf5c2675e 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Plow.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Plow.java @@ -3,6 +3,7 @@ package gregtech.common.tools; import gregtech.api.interfaces.IIconContainer; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.util.GT_ToolHarvestHelper; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.Entity; @@ -16,13 +17,12 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; import net.minecraftforge.event.world.BlockEvent; -import java.util.List; - public class GT_Tool_Plow extends GT_Tool { private ThreadLocal<Object> sIsHarvestingRightNow = new ThreadLocal(); @Override - public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) { + public float getNormalDamageAgainstEntity( + float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) { return (aEntity instanceof EntitySnowman) ? aOriginalDamage * 4.0F : aOriginalDamage; } @@ -33,23 +33,38 @@ public class GT_Tool_Plow extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { - return GT_ToolHarvestHelper.isAppropriateTool(aBlock , aMetaData ,"plow") - || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock ,Material.snow ,Material.craftedSnow); - + return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "plow") + || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, Material.snow, Material.craftedSnow); } @Override - public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + public int convertBlockDrops( + List<ItemStack> aDrops, + ItemStack aStack, + EntityPlayer aPlayer, + Block aBlock, + int aX, + int aY, + int aZ, + byte aMetaData, + int aFortune, + boolean aSilkTouch, + BlockEvent.HarvestDropsEvent aEvent) { int rConversions = 0; if ((this.sIsHarvestingRightNow.get() == null) && ((aPlayer instanceof EntityPlayerMP))) { this.sIsHarvestingRightNow.set(this); for (int i = -1; i < 2; i++) { for (int j = -1; j < 2; j++) { for (int k = -1; k < 2; k++) { - if (((i != 0) || (j != 0) || (k != 0)) - && (aStack.getItem().getDigSpeed(aStack, aPlayer.worldObj.getBlock(aX + i, aY + j, aZ + k), aPlayer.worldObj.getBlockMetadata(aX + i, aY + j, aZ + k)) > 0.0F) - && (((EntityPlayerMP) aPlayer).theItemInWorldManager.tryHarvestBlock(aX + i, aY + j, aZ + k))) - { + if (((i != 0) || (j != 0) || (k != 0)) + && (aStack.getItem() + .getDigSpeed( + aStack, + aPlayer.worldObj.getBlock(aX + i, aY + j, aZ + k), + aPlayer.worldObj.getBlockMetadata(aX + i, aY + j, aZ + k)) + > 0.0F) + && (((EntityPlayerMP) aPlayer) + .theItemInWorldManager.tryHarvestBlock(aX + i, aY + j, aZ + k))) { rConversions++; } } @@ -62,16 +77,26 @@ public class GT_Tool_Plow extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadPlow.mTextureIndex] : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.toolHeadPlow.mTextureIndex] + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + " plew through the yard of " + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE); + return new ChatComponentText(EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE + " plew through the yard of " + EnumChatFormatting.RED + + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Plunger.java b/src/main/java/gregtech/common/tools/GT_Tool_Plunger.java index 5c99702baa..a8f557045f 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Plunger.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Plunger.java @@ -44,7 +44,7 @@ public class GT_Tool_Plunger extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { - return GT_ToolHarvestHelper.isAppropriateTool(aBlock,aMetaData , "plunger"); + return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "plunger"); } @Override @@ -54,7 +54,9 @@ public class GT_Tool_Plunger extends GT_Tool { @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override @@ -62,7 +64,12 @@ public class GT_Tool_Plunger extends GT_Tool { aItem.addItemBehavior(aID, new Behaviour_Plunger_Item(getToolDamagePerDropConversion())); aItem.addItemBehavior(aID, new Behaviour_Plunger_Fluid(getToolDamagePerDropConversion())); try { - Object tObject = GT_Utility.callConstructor("gregtech.common.items.behaviors.Behaviour_Plunger_Essentia", 0, null, false, getToolDamagePerDropConversion()); + Object tObject = GT_Utility.callConstructor( + "gregtech.common.items.behaviors.Behaviour_Plunger_Essentia", + 0, + null, + false, + getToolDamagePerDropConversion()); if ((tObject instanceof IItemBehaviour)) { aItem.addItemBehavior(aID, (IItemBehaviour) tObject); } @@ -72,6 +79,8 @@ public class GT_Tool_Plunger extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " got stuck trying to escape through a Pipe while fighting " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + + " got stuck trying to escape through a Pipe while fighting " + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_RollingPin.java b/src/main/java/gregtech/common/tools/GT_Tool_RollingPin.java index b4b1422d92..3b554c39a4 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_RollingPin.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_RollingPin.java @@ -48,8 +48,7 @@ public class GT_Tool_RollingPin extends GT_Tool { } @Override - public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { - } + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {} @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { @@ -58,6 +57,8 @@ public class GT_Tool_RollingPin extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " got flattened by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + + " got flattened by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Saw.java b/src/main/java/gregtech/common/tools/GT_Tool_Saw.java index f2ec7dc4e1..881ed6f61f 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Saw.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Saw.java @@ -4,6 +4,8 @@ import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.util.GT_ToolHarvestHelper; +import java.util.ArrayList; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; @@ -16,9 +18,6 @@ import net.minecraft.util.IChatComponent; import net.minecraftforge.common.IShearable; import net.minecraftforge.event.world.BlockEvent; -import java.util.ArrayList; -import java.util.List; - public class GT_Tool_Saw extends GT_Tool { @Override public int getToolDamagePerBlockBreak() { @@ -76,17 +75,30 @@ public class GT_Tool_Saw extends GT_Tool { } @Override - public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + public int convertBlockDrops( + List<ItemStack> aDrops, + ItemStack aStack, + EntityPlayer aPlayer, + Block aBlock, + int aX, + int aY, + int aZ, + byte aMetaData, + int aFortune, + boolean aSilkTouch, + BlockEvent.HarvestDropsEvent aEvent) { if ((aBlock.getMaterial() == Material.leaves) && ((aBlock instanceof IShearable))) { aPlayer.worldObj.setBlock(aX, aY, aZ, aBlock, aMetaData, 0); if (((IShearable) aBlock).isShearable(aStack, aPlayer.worldObj, aX, aY, aZ)) { - ArrayList<ItemStack> tDrops = ((IShearable) aBlock).onSheared(aStack, aPlayer.worldObj, aX, aY, aZ, aFortune); + ArrayList<ItemStack> tDrops = + ((IShearable) aBlock).onSheared(aStack, aPlayer.worldObj, aX, aY, aZ, aFortune); aDrops.clear(); aDrops.addAll(tDrops); aEvent.dropChance = 1.0F; } aPlayer.worldObj.setBlock(aX, aY, aZ, Blocks.air, 0, 0); - } else if (((aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce)) && (aDrops.isEmpty())) { + } else if (((aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce)) + && (aDrops.isEmpty())) { aDrops.add(new ItemStack(aBlock, 1, aMetaData)); aPlayer.worldObj.setBlockToAir(aX, aY, aZ); aEvent.dropChance = 1.0F; @@ -97,16 +109,15 @@ public class GT_Tool_Saw extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { - return GT_ToolHarvestHelper.isAppropriateTool(aBlock , aMetaData ,"axe" ,"saw") - || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, - Material.leaves, - Material.vine, - Material.wood, - Material.cactus, - Material.ice, - Material.packedIce - ); - + return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "axe", "saw") + || GT_ToolHarvestHelper.isAppropriateMaterial( + aBlock, + Material.leaves, + Material.vine, + Material.wood, + Material.cactus, + Material.ice, + Material.packedIce); } @Override @@ -116,20 +127,27 @@ public class GT_Tool_Saw extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadSaw.mTextureIndex] : Textures.ItemIcons.HANDLE_SAW; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.toolHeadSaw.mTextureIndex] + : Textures.ItemIcons.HANDLE_SAW; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override - public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { - } + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {} @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " was getting cut down by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + + " was getting cut down by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Scoop.java b/src/main/java/gregtech/common/tools/GT_Tool_Scoop.java index 64c40c3b2a..06423f2d45 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Scoop.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Scoop.java @@ -2,7 +2,6 @@ package gregtech.common.tools; import cpw.mods.fml.common.Loader; import gregtech.api.enums.GT_Values; -import gregtech.api.enums.SoundResource; import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; import gregtech.api.items.GT_MetaGenerated_Tool; @@ -87,8 +86,8 @@ public class GT_Tool_Scoop extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { - return GT_ToolHarvestHelper.isAppropriateTool(aBlock , aMetaData ,"scoop") - || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock ,sBeeHiveMaterial); + return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "scoop") + || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, sBeeHiveMaterial); } @Override @@ -103,21 +102,24 @@ public class GT_Tool_Scoop extends GT_Tool { @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { - if(Loader.isModLoaded(GT_Values.MOD_ID_FR)){ + if (Loader.isModLoaded(GT_Values.MOD_ID_FR)) { aItem.addItemBehavior(aID, new Behaviour_Scoop(200)); - }else{ + } else { aItem.addItemBehavior(aID, new Behaviour_None()); } - } @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " got scooped up by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + + " got scooped up by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java b/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java index a15c6429cd..b09839f0cc 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java @@ -6,6 +6,8 @@ import gregtech.api.interfaces.IIconContainer; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.util.GT_ToolHarvestHelper; import gregtech.common.items.behaviors.Behaviour_Screwdriver; +import java.util.Arrays; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.Entity; @@ -18,14 +20,18 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; -import java.util.Arrays; -import java.util.List; - public class GT_Tool_Screwdriver extends GT_Tool { - public static final List<String> mEffectiveList = Arrays.asList(EntityCaveSpider.class.getName(), EntitySpider.class.getName(), "EntityTFHedgeSpider", "EntityTFKingSpider", "EntityTFSwarmSpider", "EntityTFTowerBroodling"); + public static final List<String> mEffectiveList = Arrays.asList( + EntityCaveSpider.class.getName(), + EntitySpider.class.getName(), + "EntityTFHedgeSpider", + "EntityTFKingSpider", + "EntityTFSwarmSpider", + "EntityTFTowerBroodling"); @Override - public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) { + public float getNormalDamageAgainstEntity( + float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) { String tName = aEntity.getClass().getName(); tName = tName.substring(tName.lastIndexOf('.') + 1); return mEffectiveList.contains(tName) ? aOriginalDamage * 2.0F : aOriginalDamage; @@ -103,8 +109,8 @@ public class GT_Tool_Screwdriver extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { - return GT_ToolHarvestHelper.isAppropriateTool(aBlock , aMetaData ,"screwdriver") - || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock ,Material.circuits); + return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "screwdriver") + || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, Material.circuits); } @Override @@ -114,12 +120,18 @@ public class GT_Tool_Screwdriver extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadScrewdriver.mTextureIndex] : Textures.ItemIcons.HANDLE_SCREWDRIVER; + return !aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.toolHeadScrewdriver.mTextureIndex] + : Textures.ItemIcons.HANDLE_SCREWDRIVER; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + return !aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override @@ -129,6 +141,8 @@ public class GT_Tool_Screwdriver extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " is screwed! (by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + ")"); + return new ChatComponentText( + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " is screwed! (by " + + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + ")"); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver_LV.java b/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver_LV.java index d8d97cdc4b..4243e9549f 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver_LV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver_LV.java @@ -18,11 +18,17 @@ public class GT_Tool_Screwdriver_LV extends GT_Tool_Screwdriver { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadScrewdriver.mTextureIndex] : Textures.ItemIcons.HANDLE_ELECTRIC_SCREWDRIVER; + return !aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.toolHeadScrewdriver.mTextureIndex] + : Textures.ItemIcons.HANDLE_ELECTRIC_SCREWDRIVER; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + return !aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Sense.java b/src/main/java/gregtech/common/tools/GT_Tool_Sense.java index 84c63854c2..18245a7897 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Sense.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Sense.java @@ -4,6 +4,7 @@ import gregtech.api.interfaces.IIconContainer; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.util.GT_ToolHarvestHelper; import gregtech.common.items.behaviors.Behaviour_Sense; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; @@ -15,8 +16,6 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; import net.minecraftforge.event.world.BlockEvent; -import java.util.List; - public class GT_Tool_Sense extends GT_Tool { private ThreadLocal<Object> sIsHarvestingRightNow = new ThreadLocal(); @@ -24,30 +23,46 @@ public class GT_Tool_Sense extends GT_Tool { public float getBaseDamage() { return 3.0F; } - + @Override public float getMaxDurabilityMultiplier() { return 4.0F; } - @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { - return GT_ToolHarvestHelper.isAppropriateTool(aBlock , aMetaData ,"sense" , "scythe") - || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock ,Material.plants ,Material.leaves); + return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "sense", "scythe") + || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, Material.plants, Material.leaves); } @Override - public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + public int convertBlockDrops( + List<ItemStack> aDrops, + ItemStack aStack, + EntityPlayer aPlayer, + Block aBlock, + int aX, + int aY, + int aZ, + byte aMetaData, + int aFortune, + boolean aSilkTouch, + BlockEvent.HarvestDropsEvent aEvent) { int rConversions = 0; if ((this.sIsHarvestingRightNow.get() == null) && ((aPlayer instanceof EntityPlayerMP))) { this.sIsHarvestingRightNow.set(this); for (int i = -2; i < 3; i++) { for (int j = -2; j < 3; j++) { for (int k = -2; k < 3; k++) { - if (((i != 0) || (j != 0) || (k != 0)) - && (aStack.getItem().getDigSpeed(aStack, aPlayer.worldObj.getBlock(aX + i, aY + j, aZ + k), aPlayer.worldObj.getBlockMetadata(aX + i, aY + j, aZ + k)) > 0.0F) - && (((EntityPlayerMP) aPlayer).theItemInWorldManager.tryHarvestBlock(aX + i, aY + j, aZ + k))) { + if (((i != 0) || (j != 0) || (k != 0)) + && (aStack.getItem() + .getDigSpeed( + aStack, + aPlayer.worldObj.getBlock(aX + i, aY + j, aZ + k), + aPlayer.worldObj.getBlockMetadata(aX + i, aY + j, aZ + k)) + > 0.0F) + && (((EntityPlayerMP) aPlayer) + .theItemInWorldManager.tryHarvestBlock(aX + i, aY + j, aZ + k))) { rConversions++; } } @@ -60,12 +75,20 @@ public class GT_Tool_Sense extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadSense.mTextureIndex] : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.toolHeadSense.mTextureIndex] + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override @@ -75,6 +98,8 @@ public class GT_Tool_Sense extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + " has taken the Soul of " + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE); + return new ChatComponentText(EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE + " has taken the Soul of " + EnumChatFormatting.RED + + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Shovel.java b/src/main/java/gregtech/common/tools/GT_Tool_Shovel.java index 8b29b6adf2..1cd88bf281 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Shovel.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Shovel.java @@ -80,13 +80,8 @@ public class GT_Tool_Shovel extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "shovel") - || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, - Material.sand, - Material.grass, - Material.ground, - Material.snow, - Material.clay - ); + || GT_ToolHarvestHelper.isAppropriateMaterial( + aBlock, Material.sand, Material.grass, Material.ground, Material.snow, Material.clay); } @Override @@ -96,20 +91,29 @@ public class GT_Tool_Shovel extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadShovel.mTextureIndex] : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.toolHeadShovel.mTextureIndex] + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override - public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { - } + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {} @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " got dug up by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + return new ChatComponentText( + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " got dug up by " + + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_SoftHammer.java b/src/main/java/gregtech/common/tools/GT_Tool_SoftHammer.java index 87255cfeb8..09e4174c96 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_SoftHammer.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_SoftHammer.java @@ -96,7 +96,7 @@ public class GT_Tool_SoftHammer extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { - return GT_ToolHarvestHelper.isAppropriateTool(aBlock , aMetaData ,"softhammer"); + return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "softhammer"); } @Override @@ -106,12 +106,20 @@ public class GT_Tool_SoftHammer extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadMallet.mTextureIndex] : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.handleMallet.mTextureIndex]; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.toolHeadMallet.mTextureIndex] + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.handleMallet.mTextureIndex]; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override @@ -121,6 +129,8 @@ public class GT_Tool_SoftHammer extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " was hammered to death by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + + " was hammered to death by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Soldering_Iron.java b/src/main/java/gregtech/common/tools/GT_Tool_Soldering_Iron.java index a5f2bb1e01..2d4728e4da 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Soldering_Iron.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Soldering_Iron.java @@ -6,6 +6,8 @@ import gregtech.api.interfaces.IIconContainer; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.util.GT_ToolHarvestHelper; import gregtech.common.items.behaviors.Behaviour_Screwdriver; +import java.util.Arrays; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.Entity; @@ -18,14 +20,18 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; -import java.util.Arrays; -import java.util.List; - public class GT_Tool_Soldering_Iron extends GT_Tool { - public static final List<String> mEffectiveList = Arrays.asList(EntityCaveSpider.class.getName(), EntitySpider.class.getName(), "EntityTFHedgeSpider", "EntityTFKingSpider", "EntityTFSwarmSpider", "EntityTFTowerBroodling"); + public static final List<String> mEffectiveList = Arrays.asList( + EntityCaveSpider.class.getName(), + EntitySpider.class.getName(), + "EntityTFHedgeSpider", + "EntityTFKingSpider", + "EntityTFSwarmSpider", + "EntityTFTowerBroodling"); @Override - public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) { + public float getNormalDamageAgainstEntity( + float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) { String tName = aEntity.getClass().getName(); tName = tName.substring(tName.lastIndexOf('.') + 1); return mEffectiveList.contains(tName) ? aOriginalDamage * 2.0F : aOriginalDamage; @@ -105,7 +111,6 @@ public class GT_Tool_Soldering_Iron extends GT_Tool { public boolean isMinableBlock(Block aBlock, byte aMetaData) { return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "soldering_iron") || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, Material.circuits); - } @Override @@ -115,12 +120,16 @@ public class GT_Tool_Soldering_Iron extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[49] : Textures.ItemIcons.HANDLE_SOLDERING; + return !aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[49] + : Textures.ItemIcons.HANDLE_SOLDERING; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + return !aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override @@ -130,6 +139,8 @@ public class GT_Tool_Soldering_Iron extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " got soldert! (by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + ")"); + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + + " got soldert! (by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE + ")"); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Sword.java b/src/main/java/gregtech/common/tools/GT_Tool_Sword.java index 4f1d60a37a..baafab6136 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Sword.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Sword.java @@ -84,19 +84,19 @@ public class GT_Tool_Sword extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "sword") - || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, - Material.leaves, - Material.gourd, - Material.vine, - Material.web, - Material.cloth, - Material.carpet, - Material.plants, - Material.cactus, - Material.cake, - Material.tnt, - Material.sponge - ); + || GT_ToolHarvestHelper.isAppropriateMaterial( + aBlock, + Material.leaves, + Material.gourd, + Material.vine, + Material.web, + Material.cloth, + Material.carpet, + Material.plants, + Material.cactus, + Material.cake, + Material.tnt, + Material.sponge); } @Override @@ -106,12 +106,18 @@ public class GT_Tool_Sword extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadSword.mTextureIndex] : Textures.ItemIcons.HANDLE_SWORD; + return !aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.toolHeadSword.mTextureIndex] + : Textures.ItemIcons.HANDLE_SWORD; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + return !aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Turbine.java b/src/main/java/gregtech/common/tools/GT_Tool_Turbine.java index 249ca04acb..dd5d2b424e 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Turbine.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Turbine.java @@ -30,8 +30,9 @@ public abstract class GT_Tool_Turbine extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + " put " + EnumChatFormatting.RED + - aEntity.getCommandSenderName() + "s" + EnumChatFormatting.WHITE + " head into a turbine"); + return new ChatComponentText(EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE + " put " + EnumChatFormatting.RED + aEntity.getCommandSenderName() + "s" + + EnumChatFormatting.WHITE + " head into a turbine"); } public abstract IIconContainer getTurbineIcon(); diff --git a/src/main/java/gregtech/common/tools/GT_Tool_UniversalSpade.java b/src/main/java/gregtech/common/tools/GT_Tool_UniversalSpade.java index d494af7e76..b534ef2d23 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_UniversalSpade.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_UniversalSpade.java @@ -89,26 +89,26 @@ public class GT_Tool_UniversalSpade extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "shovel", "axe", "saw", "sword", "crowbar") - || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, - Material.sand, - Material.grass, - Material.ground, - Material.snow, - Material.clay, - Material.leaves, - Material.vine, - Material.wood, - Material.cactus, - Material.circuits, - Material.gourd, - Material.web, - Material.cloth, - Material.carpet, - Material.plants, - Material.cake, - Material.tnt, - Material.sponge - ); + || GT_ToolHarvestHelper.isAppropriateMaterial( + aBlock, + Material.sand, + Material.grass, + Material.ground, + Material.snow, + Material.clay, + Material.leaves, + Material.vine, + Material.wood, + Material.cactus, + Material.circuits, + Material.gourd, + Material.web, + Material.cloth, + Material.carpet, + Material.plants, + Material.cake, + Material.tnt, + Material.sponge); } @Override @@ -118,12 +118,20 @@ public class GT_Tool_UniversalSpade extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadUniversalSpade.mTextureIndex] : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.toolHeadUniversalSpade.mTextureIndex] + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override @@ -143,6 +151,8 @@ public class GT_Tool_UniversalSpade extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been digged by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + + " has been digged by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_WireCutter.java b/src/main/java/gregtech/common/tools/GT_Tool_WireCutter.java index b9282b4224..dedf87a553 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_WireCutter.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_WireCutter.java @@ -80,7 +80,7 @@ public class GT_Tool_WireCutter extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { - return GT_ToolHarvestHelper.isAppropriateTool(aBlock , aMetaData ,"cutter"); + return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "cutter"); } @Override @@ -95,15 +95,18 @@ public class GT_Tool_WireCutter extends GT_Tool { @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override - public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) { - } + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {} @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + " has cut the Cable for the Life Support Machine of " + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE); + return new ChatComponentText(EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE + " has cut the Cable for the Life Support Machine of " + + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java b/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java index 95ebc36bb2..77aac357e8 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java @@ -6,6 +6,8 @@ import gregtech.api.interfaces.IIconContainer; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.util.GT_ToolHarvestHelper; import gregtech.common.items.behaviors.Behaviour_Wrench; +import java.util.Arrays; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.Entity; @@ -18,14 +20,13 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; -import java.util.Arrays; -import java.util.List; - public class GT_Tool_Wrench extends GT_Tool { - public static final List<String> mEffectiveList = Arrays.asList(EntityIronGolem.class.getName(), "EntityTowerGuardian"); + public static final List<String> mEffectiveList = + Arrays.asList(EntityIronGolem.class.getName(), "EntityTowerGuardian"); @Override - public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) { + public float getNormalDamageAgainstEntity( + float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) { String tName = aEntity.getClass().getName(); tName = tName.substring(tName.lastIndexOf('.') + 1); return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage; @@ -110,8 +111,7 @@ public class GT_Tool_Wrench extends GT_Tool { public boolean isMinableBlock(Block aBlock, byte aMetaData) { return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "wrench") || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, Material.piston) - || GT_ToolHarvestHelper.isSpecialBlock(aBlock,Blocks.hopper, Blocks.dispenser, Blocks.dropper); - + || GT_ToolHarvestHelper.isSpecialBlock(aBlock, Blocks.hopper, Blocks.dispenser, Blocks.dropper); } @Override @@ -136,7 +136,8 @@ public class GT_Tool_Wrench extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + " threw a Monkey Wrench into the Plans of " + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE); + return new ChatComponentText(EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE + " threw a Monkey Wrench into the Plans of " + EnumChatFormatting.RED + + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE); } } - diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Wrench_HV.java b/src/main/java/gregtech/common/tools/GT_Tool_Wrench_HV.java index 4ec433d9a7..e0ccdfde4f 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Wrench_HV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Wrench_HV.java @@ -53,11 +53,17 @@ public class GT_Tool_Wrench_HV extends GT_Tool_Wrench_LV { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadWrench.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_HV; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.toolHeadWrench.mTextureIndex] + : Textures.ItemIcons.POWER_UNIT_HV; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Wrench_LV.java b/src/main/java/gregtech/common/tools/GT_Tool_Wrench_LV.java index 12b83dcb83..999d26ae9e 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Wrench_LV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Wrench_LV.java @@ -9,7 +9,8 @@ import net.minecraft.item.ItemStack; public class GT_Tool_Wrench_LV extends GT_Tool_Wrench { @Override - public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) { + public float getNormalDamageAgainstEntity( + float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) { return aOriginalDamage; } @@ -60,11 +61,17 @@ public class GT_Tool_Wrench_LV extends GT_Tool_Wrench { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadWrench.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_LV; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.toolHeadWrench.mTextureIndex] + : Textures.ItemIcons.POWER_UNIT_LV; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Wrench_MV.java b/src/main/java/gregtech/common/tools/GT_Tool_Wrench_MV.java index 5ffc3b1481..fe2f0611ab 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Wrench_MV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Wrench_MV.java @@ -53,11 +53,17 @@ public class GT_Tool_Wrench_MV extends GT_Tool_Wrench_LV { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadWrench.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_MV; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) + .mIconSet + .mTextures[gregtech.api.enums.OrePrefixes.toolHeadWrench.mTextureIndex] + : Textures.ItemIcons.POWER_UNIT_MV; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } } diff --git a/src/main/java/gregtech/crossmod/GregtechWailaDataProvider.java b/src/main/java/gregtech/crossmod/GregtechWailaDataProvider.java index 1c3f3ae2c7..3347cb7e10 100644 --- a/src/main/java/gregtech/crossmod/GregtechWailaDataProvider.java +++ b/src/main/java/gregtech/crossmod/GregtechWailaDataProvider.java @@ -1,6 +1,7 @@ package gregtech.crossmod; import gregtech.api.interfaces.tileentity.IGregtechWailaProvider; +import java.util.List; import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; import mcp.mobius.waila.api.IWailaDataProvider; @@ -10,8 +11,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import java.util.List; - public class GregtechWailaDataProvider implements IWailaDataProvider { @Override public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) { @@ -19,28 +18,40 @@ public class GregtechWailaDataProvider implements IWailaDataProvider { } @Override - public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { + public List<String> getWailaHead( + ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { return currenttip; } + @Override - public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { + public List<String> getWailaBody( + ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { final TileEntity tile = accessor.getTileEntity(); - if(tile instanceof IGregtechWailaProvider) { - ((IGregtechWailaProvider)tile).getWailaBody(itemStack, currenttip, accessor, config); + if (tile instanceof IGregtechWailaProvider) { + ((IGregtechWailaProvider) tile).getWailaBody(itemStack, currenttip, accessor, config); } return currenttip; } + @Override - public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { + public List<String> getWailaTail( + ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { final TileEntity tile = accessor.getTileEntity(); return currenttip; } @Override - public NBTTagCompound getNBTData(final EntityPlayerMP player, final TileEntity tile, final NBTTagCompound tag, final World world, int x, int y, int z) { - if(tile instanceof IGregtechWailaProvider) { - ((IGregtechWailaProvider)tile).getWailaNBTData(player, tile, tag, world, x, y, z); + public NBTTagCompound getNBTData( + final EntityPlayerMP player, + final TileEntity tile, + final NBTTagCompound tag, + final World world, + int x, + int y, + int z) { + if (tile instanceof IGregtechWailaProvider) { + ((IGregtechWailaProvider) tile).getWailaNBTData(player, tile, tag, world, x, y, z); } return tag; diff --git a/src/main/java/gregtech/crossmod/Harvestcraft.java b/src/main/java/gregtech/crossmod/Harvestcraft.java index 9136d97a4a..b97f4efcdc 100644 --- a/src/main/java/gregtech/crossmod/Harvestcraft.java +++ b/src/main/java/gregtech/crossmod/Harvestcraft.java @@ -11,6 +11,7 @@ public class Harvestcraft { public static void init() { if (!Loader.isModLoaded("harvestcraft")) return; - ((BlockPamFruitingLog) BlockRegistry.pamPaperbark).setDropItem(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Paper, 1)); + ((BlockPamFruitingLog) BlockRegistry.pamPaperbark) + .setDropItem(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Paper, 1)); } } diff --git a/src/main/java/gregtech/crossmod/Waila.java b/src/main/java/gregtech/crossmod/Waila.java index 2fb2c1c61b..32b2906a94 100644 --- a/src/main/java/gregtech/crossmod/Waila.java +++ b/src/main/java/gregtech/crossmod/Waila.java @@ -8,7 +8,7 @@ import mcp.mobius.waila.api.IWailaDataProvider; import mcp.mobius.waila.api.IWailaRegistrar; public class Waila { - public static void callbackRegister(IWailaRegistrar register){ + public static void callbackRegister(IWailaRegistrar register) { final IWailaDataProvider multiBlockProvider = new GregtechWailaDataProvider(); register.registerBodyProvider(multiBlockProvider, BaseMetaTileEntity.class); @@ -24,9 +24,7 @@ public class Waila { register.registerTailProvider(multiBlockProvider, BaseMultiTileEntity.class); } - public static void init() { - FMLInterModComms.sendMessage("Waila", "register", Waila.class.getName() + ".callbackRegister" ); + public static void init() { + FMLInterModComms.sendMessage("Waila", "register", Waila.class.getName() + ".callbackRegister"); } - - } diff --git a/src/main/java/gregtech/loaders/ExtraIcons.java b/src/main/java/gregtech/loaders/ExtraIcons.java index ec50a7c3e2..ff867cce25 100644 --- a/src/main/java/gregtech/loaders/ExtraIcons.java +++ b/src/main/java/gregtech/loaders/ExtraIcons.java @@ -1,12 +1,12 @@ package gregtech.loaders; +import static gregtech.api.enums.GT_Values.RES_PATH_ITEM; + import cpw.mods.fml.common.eventhandler.SubscribeEvent; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.util.IIcon; import net.minecraftforge.client.event.TextureStitchEvent; -import static gregtech.api.enums.GT_Values.RES_PATH_ITEM; - public class ExtraIcons { public static IIcon steelLargeCellInner; public static IIcon aluminiumLargeCellInner; @@ -21,11 +21,13 @@ public class ExtraIcons { @SubscribeEvent public void regIcons(TextureStitchEvent.Pre event) { TextureMap reg = event.map; - if (reg.getTextureType() == 1) {// are for items + if (reg.getTextureType() == 1) { // are for items steelLargeCellInner = reg.registerIcon(RES_PATH_ITEM + "large_fluid_cell_custom/steel_inner"); aluminiumLargeCellInner = reg.registerIcon(RES_PATH_ITEM + "large_fluid_cell_custom/aluminium_inner"); - stainlesssteelLargeCellInner = reg.registerIcon(RES_PATH_ITEM + "large_fluid_cell_custom/stainlesssteel_inner"); - tungstensteelLargeCellInner = reg.registerIcon(RES_PATH_ITEM + "large_fluid_cell_custom/tungstensteel_inner"); + stainlesssteelLargeCellInner = + reg.registerIcon(RES_PATH_ITEM + "large_fluid_cell_custom/stainlesssteel_inner"); + tungstensteelLargeCellInner = + reg.registerIcon(RES_PATH_ITEM + "large_fluid_cell_custom/tungstensteel_inner"); titaniumLargeCellInner = reg.registerIcon(RES_PATH_ITEM + "large_fluid_cell_custom/titanium_inner"); chromiumLargeCellInner = reg.registerIcon(RES_PATH_ITEM + "large_fluid_cell_custom/chromium_inner"); iridiumLargeCellInner = reg.registerIcon(RES_PATH_ITEM + "large_fluid_cell_custom/iridium_inner"); diff --git a/src/main/java/gregtech/loaders/load/GT_FuelLoader.java b/src/main/java/gregtech/loaders/load/GT_FuelLoader.java index 8cea2d25b7..463f2fff63 100644 --- a/src/main/java/gregtech/loaders/load/GT_FuelLoader.java +++ b/src/main/java/gregtech/loaders/load/GT_FuelLoader.java @@ -17,31 +17,135 @@ public class GT_FuelLoader implements Runnable { @Override public void run() { GT_Log.out.println("GT_Mod: Initializing various Fuels."); - ItemList.sBlueVitriol = GT_Mod.gregtechproxy.addFluid("solution.bluevitriol", "Blue Vitriol water solution", null, 1, 295); - ItemList.sNickelSulfate = GT_Mod.gregtechproxy.addFluid("solution.nickelsulfate", "Nickel sulfate water solution", null, 1, 295); - ItemList.sIndiumConcentrate = GT_Mod.gregtechproxy.addFluid("indiumconcentrate", "Indium Concentrate", null, 1, 295);//TODO CHECK NEW x3 - ItemList.sLeadZincSolution = GT_Mod.gregtechproxy.addFluid("leadzincsolution", "Lead-Zinc solution", null, 1, 295); + ItemList.sBlueVitriol = + GT_Mod.gregtechproxy.addFluid("solution.bluevitriol", "Blue Vitriol water solution", null, 1, 295); + ItemList.sNickelSulfate = + GT_Mod.gregtechproxy.addFluid("solution.nickelsulfate", "Nickel sulfate water solution", null, 1, 295); + ItemList.sIndiumConcentrate = GT_Mod.gregtechproxy.addFluid( + "indiumconcentrate", "Indium Concentrate", null, 1, 295); // TODO CHECK NEW x3 + ItemList.sLeadZincSolution = + GT_Mod.gregtechproxy.addFluid("leadzincsolution", "Lead-Zinc solution", null, 1, 295); ItemList.sRocketFuel = GT_Mod.gregtechproxy.addFluid("rocket_fuel", "Rocket Fuel", null, 1, 295); - new GT_Recipe(new ItemStack(Items.lava_bucket), new ItemStack(Blocks.obsidian), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Copper, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Electrum, 1L), 30, 2); + new GT_Recipe( + new ItemStack(Items.lava_bucket), + new ItemStack(Blocks.obsidian), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Copper, 1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Electrum, 1L), + 30, + 2); - GT_Recipe.GT_Recipe_Map.sSmallNaquadahReactorFuels.addRecipe(true, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.NaquadahEnriched, 1L)}, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Naquadah, 1L)}, null, null, null, 0, 0, 50000); - GT_Recipe.GT_Recipe_Map.sLargeNaquadahReactorFuels.addRecipe(true, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, Materials.NaquadahEnriched, 1L)}, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Naquadah, 1L)}, null, null, null, 0, 0, 250000); - GT_Recipe.GT_Recipe_Map.sHugeNaquadahReactorFuels.addRecipe(true, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.NaquadahEnriched, 1L)}, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Naquadah, 1L)}, null, null, null, 0, 0, 500000); - GT_Recipe.GT_Recipe_Map.sExtremeNaquadahReactorFuels.addRecipe(true, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Naquadria, 1L)}, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Naquadah, 1L)}, null, null, null, 0, 0, 250000); - GT_Recipe.GT_Recipe_Map.sUltraHugeNaquadahReactorFuels.addRecipe(true, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Naquadria, 1L)}, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Naquadah, 1L)}, null, null, null, 0, 0, 1000000); - GT_Recipe.GT_Recipe_Map.sFluidNaquadahReactorFuels.addRecipe(true, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NaquadahEnriched, 1L)}, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Naquadah, 1L)}, null, null, null, 0, 0, 1400000); + GT_Recipe.GT_Recipe_Map.sSmallNaquadahReactorFuels.addRecipe( + true, + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.NaquadahEnriched, 1L)}, + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Naquadah, 1L)}, + null, + null, + null, + 0, + 0, + 50000); + GT_Recipe.GT_Recipe_Map.sLargeNaquadahReactorFuels.addRecipe( + true, + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.stick, Materials.NaquadahEnriched, 1L)}, + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Naquadah, 1L)}, + null, + null, + null, + 0, + 0, + 250000); + GT_Recipe.GT_Recipe_Map.sHugeNaquadahReactorFuels.addRecipe( + true, + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.NaquadahEnriched, 1L)}, + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Naquadah, 1L)}, + null, + null, + null, + 0, + 0, + 500000); + GT_Recipe.GT_Recipe_Map.sExtremeNaquadahReactorFuels.addRecipe( + true, + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Naquadria, 1L)}, + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Naquadah, 1L)}, + null, + null, + null, + 0, + 0, + 250000); + GT_Recipe.GT_Recipe_Map.sUltraHugeNaquadahReactorFuels.addRecipe( + true, + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Naquadria, 1L)}, + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Naquadah, 1L)}, + null, + null, + null, + 0, + 0, + 1000000); + GT_Recipe.GT_Recipe_Map.sFluidNaquadahReactorFuels.addRecipe( + true, + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NaquadahEnriched, 1L)}, + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Naquadah, 1L)}, + null, + null, + null, + 0, + 0, + 1400000); - //BloodMagic - GT_Recipe.GT_Recipe_Map.sMagicFuels.addRecipe(true, new ItemStack[]{GT_ModHandler.getModItem("AWWayofTime","reinforcedSlate",1L)}, new ItemStack[]{GT_ModHandler.getModItem("AWWayofTime","blankSlate",1L)}, null, null, null, 0, 0, 400); - GT_Recipe.GT_Recipe_Map.sMagicFuels.addRecipe(true, new ItemStack[]{GT_ModHandler.getModItem("AWWayofTime","imbuedSlate",1L)}, new ItemStack[]{GT_ModHandler.getModItem("AWWayofTime","reinforcedSlate",1L)}, null, null, null, 0, 0, 1000); - GT_Recipe.GT_Recipe_Map.sMagicFuels.addRecipe(true, new ItemStack[]{GT_ModHandler.getModItem("AWWayofTime","demonicSlate",1L)}, new ItemStack[]{GT_ModHandler.getModItem("AWWayofTime","imbuedSlate",1L)}, null, null, null, 0, 0, 8000); - GT_Recipe.GT_Recipe_Map.sMagicFuels.addRecipe(true, new ItemStack[]{GT_ModHandler.getModItem("AWWayofTime","bloodMagicBaseItems",1L,27)}, new ItemStack[]{GT_ModHandler.getModItem("AWWayofTime","demonicSlate",1L)}, null, null, null, 0, 0, 20000); + // BloodMagic + GT_Recipe.GT_Recipe_Map.sMagicFuels.addRecipe( + true, + new ItemStack[] {GT_ModHandler.getModItem("AWWayofTime", "reinforcedSlate", 1L)}, + new ItemStack[] {GT_ModHandler.getModItem("AWWayofTime", "blankSlate", 1L)}, + null, + null, + null, + 0, + 0, + 400); + GT_Recipe.GT_Recipe_Map.sMagicFuels.addRecipe( + true, + new ItemStack[] {GT_ModHandler.getModItem("AWWayofTime", "imbuedSlate", 1L)}, + new ItemStack[] {GT_ModHandler.getModItem("AWWayofTime", "reinforcedSlate", 1L)}, + null, + null, + null, + 0, + 0, + 1000); + GT_Recipe.GT_Recipe_Map.sMagicFuels.addRecipe( + true, + new ItemStack[] {GT_ModHandler.getModItem("AWWayofTime", "demonicSlate", 1L)}, + new ItemStack[] {GT_ModHandler.getModItem("AWWayofTime", "imbuedSlate", 1L)}, + null, + null, + null, + 0, + 0, + 8000); + GT_Recipe.GT_Recipe_Map.sMagicFuels.addRecipe( + true, + new ItemStack[] {GT_ModHandler.getModItem("AWWayofTime", "bloodMagicBaseItems", 1L, 27)}, + new ItemStack[] {GT_ModHandler.getModItem("AWWayofTime", "demonicSlate", 1L)}, + null, + null, + null, + 0, + 0, + 20000); GT_Values.RA.addFuel(GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1L, 4), null, 4, 5); GT_Values.RA.addFuel(new ItemStack(Items.experience_bottle, 1), null, 10, 5); GT_Values.RA.addFuel(new ItemStack(Items.ghast_tear, 1), null, 50, 5); - GT_Values.RA.addFuel(new ItemStack(Blocks.beacon, 1), null, Materials.NetherStar.mFuelPower * 2, Materials.NetherStar.mFuelType); + GT_Values.RA.addFuel( + new ItemStack(Blocks.beacon, 1), + null, + Materials.NetherStar.mFuelPower * 2, + Materials.NetherStar.mFuelType); GT_Values.RA.addFuel(GT_ModHandler.getModItem("EnderIO", "bucketRocket_fuel", 1), null, 250, 1); - } } diff --git a/src/main/java/gregtech/loaders/load/GT_ItemIterator.java b/src/main/java/gregtech/loaders/load/GT_ItemIterator.java index 9e483b05c8..3e1cf72c06 100644 --- a/src/main/java/gregtech/loaders/load/GT_ItemIterator.java +++ b/src/main/java/gregtech/loaders/load/GT_ItemIterator.java @@ -29,32 +29,117 @@ public class GT_ItemIterator implements Runnable { GT_Log.out.println("GT_Mod: Scanning for certain kinds of compatible Machineblocks."); ItemStack tStack2; ItemStack tStack; - if (null != (tStack = GT_ModHandler.getRecipeOutput(tStack2 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Bronze, 1L), tStack2, tStack2, tStack2, null, tStack2, tStack2, tStack2, tStack2))) { - GT_ModHandler.addPulverisationRecipe(tStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bronze, 8L), null, 0, false); + if (null + != (tStack = GT_ModHandler.getRecipeOutput( + tStack2 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Bronze, 1L), + tStack2, + tStack2, + tStack2, + null, + tStack2, + tStack2, + tStack2, + tStack2))) { + GT_ModHandler.addPulverisationRecipe( + tStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bronze, 8L), null, 0, false); GT_ModHandler.addSmeltingRecipe(tStack, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Bronze, 8L)); } - if (null != (tStack = GT_ModHandler.getRecipeOutput(tStack2 = GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Bronze, 1L), tStack2, tStack2, tStack2, null, tStack2, tStack2, tStack2, tStack2))) { + if (null + != (tStack = GT_ModHandler.getRecipeOutput( + tStack2 = GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Bronze, 1L), + tStack2, + tStack2, + tStack2, + null, + tStack2, + tStack2, + tStack2, + tStack2))) { GT_OreDictUnificator.registerOre(OreDictNames.craftingRawMachineTier00, tStack); - GT_ModHandler.addPulverisationRecipe(tStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bronze, 8L), null, 0, false); + GT_ModHandler.addPulverisationRecipe( + tStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bronze, 8L), null, 0, false); GT_ModHandler.addSmeltingRecipe(tStack, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Bronze, 8L)); } ItemStack tStack3; - if (null != (tStack = GT_ModHandler.getRecipeOutput(tStack2 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iron, 1L), tStack3 = new ItemStack(Blocks.glass, 1, 0), tStack2, tStack3, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Gold, 1L), tStack3, tStack2, tStack3, tStack2))) { - GT_ModHandler.addPulverisationRecipe(tStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 1L), 0, false); + if (null + != (tStack = GT_ModHandler.getRecipeOutput( + tStack2 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iron, 1L), + tStack3 = new ItemStack(Blocks.glass, 1, 0), + tStack2, + tStack3, + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Gold, 1L), + tStack3, + tStack2, + tStack3, + tStack2))) { + GT_ModHandler.addPulverisationRecipe( + tStack, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 1L), + 0, + false); } - if (null != (tStack = GT_ModHandler.getRecipeOutput(tStack2 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), tStack3 = new ItemStack(Blocks.glass, 1, 0), tStack2, tStack3, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Gold, 1L), tStack3, tStack2, tStack3, tStack2))) { - GT_ModHandler.addPulverisationRecipe(tStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 1L), 0, false); + if (null + != (tStack = GT_ModHandler.getRecipeOutput( + tStack2 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), + tStack3 = new ItemStack(Blocks.glass, 1, 0), + tStack2, + tStack3, + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Gold, 1L), + tStack3, + tStack2, + tStack3, + tStack2))) { + GT_ModHandler.addPulverisationRecipe( + tStack, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 1L), + 0, + false); } GT_Log.out.println("GT_Mod: Registering various Tools to be usable on GregTech Machines"); - GregTech_API.registerScrewdriver(GT_ModHandler.getRecipeOutput(null, new ItemStack(Items.iron_ingot, 1), null, new ItemStack(Items.stick, 1))); - GregTech_API.registerScrewdriver(GT_ModHandler.getRecipeOutput(new ItemStack(Items.iron_ingot, 1), null, null, null, new ItemStack(Items.stick, 1))); + GregTech_API.registerScrewdriver(GT_ModHandler.getRecipeOutput( + null, new ItemStack(Items.iron_ingot, 1), null, new ItemStack(Items.stick, 1))); + GregTech_API.registerScrewdriver(GT_ModHandler.getRecipeOutput( + new ItemStack(Items.iron_ingot, 1), null, null, null, new ItemStack(Items.stick, 1))); - GT_Log.out.println("GT_Mod: Adding Food Recipes to the Automatic Canning Machine. (also during the following Item Iteration)"); - GT_Values.RA.addCannerRecipe(new ItemStack(Items.rotten_flesh, 2, 32767), ItemList.IC2_Food_Can_Empty.get(1L), ItemList.IC2_Food_Can_Spoiled.get(1L), null, 200, 1); - GT_Values.RA.addCannerRecipe(new ItemStack(Items.spider_eye, 2, 32767), ItemList.IC2_Food_Can_Empty.get(1L), ItemList.IC2_Food_Can_Spoiled.get(1L), null, 100, 1); - GT_Values.RA.addCannerRecipe(ItemList.Food_Poisonous_Potato.get(2L), ItemList.IC2_Food_Can_Empty.get(1L), ItemList.IC2_Food_Can_Spoiled.get(1L), null, 100, 1); - GT_Values.RA.addCannerRecipe(new ItemStack(Items.cake, 1, 32767), ItemList.IC2_Food_Can_Empty.get(12L), ItemList.IC2_Food_Can_Filled.get(12L), null, 600, 1); - GT_Values.RA.addCannerRecipe(new ItemStack(Items.mushroom_stew, 1, 32767), ItemList.IC2_Food_Can_Empty.get(6L), ItemList.IC2_Food_Can_Filled.get(6L), new ItemStack(Items.bowl, 1), 300, 1); + GT_Log.out.println( + "GT_Mod: Adding Food Recipes to the Automatic Canning Machine. (also during the following Item Iteration)"); + GT_Values.RA.addCannerRecipe( + new ItemStack(Items.rotten_flesh, 2, 32767), + ItemList.IC2_Food_Can_Empty.get(1L), + ItemList.IC2_Food_Can_Spoiled.get(1L), + null, + 200, + 1); + GT_Values.RA.addCannerRecipe( + new ItemStack(Items.spider_eye, 2, 32767), + ItemList.IC2_Food_Can_Empty.get(1L), + ItemList.IC2_Food_Can_Spoiled.get(1L), + null, + 100, + 1); + GT_Values.RA.addCannerRecipe( + ItemList.Food_Poisonous_Potato.get(2L), + ItemList.IC2_Food_Can_Empty.get(1L), + ItemList.IC2_Food_Can_Spoiled.get(1L), + null, + 100, + 1); + GT_Values.RA.addCannerRecipe( + new ItemStack(Items.cake, 1, 32767), + ItemList.IC2_Food_Can_Empty.get(12L), + ItemList.IC2_Food_Can_Filled.get(12L), + null, + 600, + 1); + GT_Values.RA.addCannerRecipe( + new ItemStack(Items.mushroom_stew, 1, 32767), + ItemList.IC2_Food_Can_Empty.get(6L), + ItemList.IC2_Food_Can_Filled.get(6L), + new ItemStack(Items.bowl, 1), + 300, + 1); GT_Log.out.println("GT_Mod: Scanning ItemList."); @@ -67,9 +152,13 @@ public class GT_ItemIterator implements Runnable { String tName; if ((tName = tItem.getUnlocalizedName()) != null) { if ((tItem instanceof IToolCrowbar)) { - if ((!tItem.isDamageable()) && (!GT_ModHandler.isElectricItem(new ItemStack(tItem, 1, 0)))) { - if ((GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "infiniteDurabilityRCCrowbars", false)) && - (GT_ModHandler.removeRecipeByOutput(new ItemStack(tItem, 1, 32767)))) { + if ((!tItem.isDamageable()) + && (!GT_ModHandler.isElectricItem(new ItemStack(tItem, 1, 0)))) { + if ((GregTech_API.sRecipeFile.get( + ConfigCategories.Recipes.disabledrecipes, + "infiniteDurabilityRCCrowbars", + false)) + && (GT_ModHandler.removeRecipeByOutput(new ItemStack(tItem, 1, 32767)))) { GT_Log.out.println("GT_Mod: Removed infinite RC Crowbar: " + tName); } } else if (GregTech_API.registerCrowbar(new ItemStack(tItem, 1, 32767))) { @@ -77,9 +166,13 @@ public class GT_ItemIterator implements Runnable { } } if ((tItem instanceof IToolWrench)) { - if ((!tItem.isDamageable()) && (!GT_ModHandler.isElectricItem(new ItemStack(tItem, 1, 0)))) { - if ((GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "infiniteDurabilityBCWrenches", false)) && - (GT_ModHandler.removeRecipeByOutput(new ItemStack(tItem, 1, 32767)))) { + if ((!tItem.isDamageable()) + && (!GT_ModHandler.isElectricItem(new ItemStack(tItem, 1, 0)))) { + if ((GregTech_API.sRecipeFile.get( + ConfigCategories.Recipes.disabledrecipes, + "infiniteDurabilityBCWrenches", + false)) + && (GT_ModHandler.removeRecipeByOutput(new ItemStack(tItem, 1, 32767)))) { GT_Log.out.println("GT_Mod: Removed infinite BC Wrench: " + tName); } } else if (GregTech_API.registerWrench(new ItemStack(tItem, 1, 32767))) { @@ -92,16 +185,27 @@ public class GT_ItemIterator implements Runnable { tBlock.setHarvestLevel("scoop", 0); gregtech.common.tools.GT_Tool_Scoop.sBeeHiveMaterial = tBlock.getMaterial(); } - if (OrePrefixes.stone.mDefaultStackSize < tItem.getItemStackLimit(new ItemStack(tItem, 1, 0))) { - if ((tBlock.isReplaceableOreGen(GT_Values.DW, 0, 0, 0, Blocks.stone)) || (tBlock.isReplaceableOreGen(GT_Values.DW, 0, 0, 0, Blocks.netherrack)) || (tBlock.isReplaceableOreGen(GT_Values.DW, 0, 0, 0, Blocks.end_stone))) { + if (OrePrefixes.stone.mDefaultStackSize + < tItem.getItemStackLimit(new ItemStack(tItem, 1, 0))) { + if ((tBlock.isReplaceableOreGen(GT_Values.DW, 0, 0, 0, Blocks.stone)) + || (tBlock.isReplaceableOreGen(GT_Values.DW, 0, 0, 0, Blocks.netherrack)) + || (tBlock.isReplaceableOreGen(GT_Values.DW, 0, 0, 0, Blocks.end_stone))) { tItem.setMaxStackSize(OrePrefixes.stone.mDefaultStackSize); } } } - if (((tItem instanceof ItemFood)) && (tItem != ItemList.IC2_Food_Can_Filled.getItem()) && (tItem != ItemList.IC2_Food_Can_Spoiled.getItem())) { + if (((tItem instanceof ItemFood)) + && (tItem != ItemList.IC2_Food_Can_Filled.getItem()) + && (tItem != ItemList.IC2_Food_Can_Spoiled.getItem())) { int tFoodValue = ((ItemFood) tItem).func_150905_g(new ItemStack(tItem, 1, 0)); if (tFoodValue > 0) { - GT_Values.RA.addCannerRecipe(new ItemStack(tItem, 1, 32767), ItemList.IC2_Food_Can_Empty.get(tFoodValue), ItemList.IC2_Food_Can_Filled.get(tFoodValue), GT_Utility.getContainerItem(new ItemStack(tItem, 1, 0), true), tFoodValue * 100, 1); + GT_Values.RA.addCannerRecipe( + new ItemStack(tItem, 1, 32767), + ItemList.IC2_Food_Can_Empty.get(tFoodValue), + ItemList.IC2_Food_Can_Filled.get(tFoodValue), + GT_Utility.getContainerItem(new ItemStack(tItem, 1, 0), true), + tFoodValue * 100, + 1); } } if ((tItem instanceof IFluidContainerItem)) { @@ -117,8 +221,15 @@ public class GT_ItemIterator implements Runnable { GT_Values.RA.addFuel(new ItemStack(tItem, 1, 0), null, 2048, 5); } if (tName.equals("tile.TFRoots")) { - GT_ModHandler.addPulverisationRecipe(new ItemStack(tItem, 1, 0), new ItemStack(Items.stick, 2), new ItemStack(Items.stick, 1), 30); - GT_ModHandler.addSawmillRecipe(new ItemStack(tItem, 1, 0), new ItemStack(Items.stick, 4), new ItemStack(Items.stick, 2)); + GT_ModHandler.addPulverisationRecipe( + new ItemStack(tItem, 1, 0), + new ItemStack(Items.stick, 2), + new ItemStack(Items.stick, 1), + 30); + GT_ModHandler.addSawmillRecipe( + new ItemStack(tItem, 1, 0), + new ItemStack(Items.stick, 4), + new ItemStack(Items.stick, 2)); GT_Values.RA.addFuel(new ItemStack(tItem, 1, 1), new ItemStack(Items.stick, 4), 32, 5); } if (tName.equals("item.tconstruct.manual")) { @@ -172,71 +283,124 @@ public class GT_ItemIterator implements Runnable { GT_OreDictUnificator.set(OrePrefixes.gem, Materials.Lignite, new ItemStack(tItem, 1, 0)); } if ((tName.equals("tile.extrabiomes.redrock")) || (tName.equals("tile.bop.redRocks"))) { - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Redrock, new ItemStack(tItem, 1, 0)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Redrock, new ItemStack(tItem, 1, 1)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Redrock, new ItemStack(tItem, 1, 2)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Redrock, new ItemStack(tItem, 1, 0)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Redrock, new ItemStack(tItem, 1, 1)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Redrock, new ItemStack(tItem, 1, 2)); } if (tName.equals("tile.rpstone")) { - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Marble, new ItemStack(tItem, 1, 0)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 1)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Marble, new ItemStack(tItem, 1, 2)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 3)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 4)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 5)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 6)); - } - if (/**(tName.equals("tile.sedimentaryStone")) ||**/((tName.equals("tile.igneousStone")) || (tName.equals("tile.igneousStoneBrick")) || (tName.equals("tile.igneousCobblestone")))) { - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteRed, new ItemStack(tItem, 1, 0)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteBlack, new ItemStack(tItem, 1, 1)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Rhyolite, new ItemStack(tItem, 1, 2)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Andesite, new ItemStack(tItem, 1, 3)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Gabbro, new ItemStack(tItem, 1, 4)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 5)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Komatiite, new ItemStack(tItem, 1, 6)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Dacite, new ItemStack(tItem, 1, 7)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Marble, new ItemStack(tItem, 1, 0)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 1)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Marble, new ItemStack(tItem, 1, 2)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 3)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 4)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 5)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 6)); + } + if ( + /**(tName.equals("tile.sedimentaryStone")) ||**/ + ((tName.equals("tile.igneousStone")) + || (tName.equals("tile.igneousStoneBrick")) + || (tName.equals("tile.igneousCobblestone")))) { + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.GraniteRed, new ItemStack(tItem, 1, 0)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.GraniteBlack, new ItemStack(tItem, 1, 1)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Rhyolite, new ItemStack(tItem, 1, 2)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Andesite, new ItemStack(tItem, 1, 3)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Gabbro, new ItemStack(tItem, 1, 4)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 5)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Komatiite, new ItemStack(tItem, 1, 6)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Dacite, new ItemStack(tItem, 1, 7)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteRed, new ItemStack(tItem, 1, 8)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteBlack, new ItemStack(tItem, 1, 9)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Rhyolite, new ItemStack(tItem, 1, 10)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Andesite, new ItemStack(tItem, 1, 11)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Gabbro, new ItemStack(tItem, 1, 12)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 13)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Komatiite, new ItemStack(tItem, 1, 14)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Dacite, new ItemStack(tItem, 1, 15)); - } - if ((tName.equals("tile.metamorphicStone")) || (tName.equals("tile.metamorphicStoneBrick")) || (tName.equals("tile.metamorphicCobblestone"))) { - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Gneiss, new ItemStack(tItem, 1, 0)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Eclogite, new ItemStack(tItem, 1, 1)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Marble, new ItemStack(tItem, 1, 2)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Quartzite, new ItemStack(tItem, 1, 3)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Blueschist, new ItemStack(tItem, 1, 4)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Greenschist, new ItemStack(tItem, 1, 5)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Soapstone, new ItemStack(tItem, 1, 6)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Migmatite, new ItemStack(tItem, 1, 7)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.GraniteRed, new ItemStack(tItem, 1, 8)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.GraniteBlack, new ItemStack(tItem, 1, 9)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Rhyolite, new ItemStack(tItem, 1, 10)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Andesite, new ItemStack(tItem, 1, 11)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Gabbro, new ItemStack(tItem, 1, 12)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 13)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Komatiite, new ItemStack(tItem, 1, 14)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Dacite, new ItemStack(tItem, 1, 15)); + } + if ((tName.equals("tile.metamorphicStone")) + || (tName.equals("tile.metamorphicStoneBrick")) + || (tName.equals("tile.metamorphicCobblestone"))) { + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Gneiss, new ItemStack(tItem, 1, 0)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Eclogite, new ItemStack(tItem, 1, 1)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Marble, new ItemStack(tItem, 1, 2)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Quartzite, new ItemStack(tItem, 1, 3)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Blueschist, new ItemStack(tItem, 1, 4)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Greenschist, new ItemStack(tItem, 1, 5)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Soapstone, new ItemStack(tItem, 1, 6)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Migmatite, new ItemStack(tItem, 1, 7)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Gneiss, new ItemStack(tItem, 1, 8)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Eclogite, new ItemStack(tItem, 1, 9)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Marble, new ItemStack(tItem, 1, 10)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Quartzite, new ItemStack(tItem, 1, 11)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Blueschist, new ItemStack(tItem, 1, 12)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Greenschist, new ItemStack(tItem, 1, 13)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Soapstone, new ItemStack(tItem, 1, 14)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Migmatite, new ItemStack(tItem, 1, 15)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Gneiss, new ItemStack(tItem, 1, 8)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Eclogite, new ItemStack(tItem, 1, 9)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Marble, new ItemStack(tItem, 1, 10)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Quartzite, new ItemStack(tItem, 1, 11)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Blueschist, new ItemStack(tItem, 1, 12)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Greenschist, new ItemStack(tItem, 1, 13)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Soapstone, new ItemStack(tItem, 1, 14)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Migmatite, new ItemStack(tItem, 1, 15)); } if (tName.equals("tile.blockCosmeticSolid")) { - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Obsidian, new ItemStack(tItem, 1, 0)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Obsidian, new ItemStack(tItem, 1, 1)); - GT_OreDictUnificator.registerOre(OrePrefixes.block, Materials.Thaumium, new ItemStack(tItem, 1, 4)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Obsidian, new ItemStack(tItem, 1, 0)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Obsidian, new ItemStack(tItem, 1, 1)); + GT_OreDictUnificator.registerOre( + OrePrefixes.block, Materials.Thaumium, new ItemStack(tItem, 1, 4)); } if (tName.equals("tile.enderchest")) { GT_OreDictUnificator.registerOre(OreDictNames.enderChest, new ItemStack(tItem, 1, 32767)); } if (tName.equals("tile.autoWorkbenchBlock")) { - GT_OreDictUnificator.registerOre(OreDictNames.craftingWorkBench, new ItemStack(tItem, 1, 0)); + GT_OreDictUnificator.registerOre( + OreDictNames.craftingWorkBench, new ItemStack(tItem, 1, 0)); } if (tName.equals("tile.pumpBlock")) { GT_OreDictUnificator.registerOre(OreDictNames.craftingPump, new ItemStack(tItem, 1, 0)); - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "BCPump", false)) { + if (GregTech_API.sRecipeFile.get( + ConfigCategories.Recipes.disabledrecipes, "BCPump", false)) { GT_ModHandler.removeRecipeByOutput(new ItemStack(tItem, 1, 0)); } } @@ -244,11 +408,14 @@ public class GT_ItemIterator implements Runnable { GT_OreDictUnificator.registerOre(OreDictNames.craftingTank, new ItemStack(tItem, 1, 0)); } if (tName.equals("item.drawplateDiamond")) { - GT_OreDictUnificator.registerOre(ToolDictNames.craftingToolDrawplate, new ItemStack(tItem, 1, 32767)); + GT_OreDictUnificator.registerOre( + ToolDictNames.craftingToolDrawplate, new ItemStack(tItem, 1, 32767)); } } } } - } catch (Throwable e) {/**/} + } catch (Throwable e) { + /**/ + } } } diff --git a/src/main/java/gregtech/loaders/load/GT_SonictronLoader.java b/src/main/java/gregtech/loaders/load/GT_SonictronLoader.java index a525bf872e..d067cf74d5 100644 --- a/src/main/java/gregtech/loaders/load/GT_SonictronLoader.java +++ b/src/main/java/gregtech/loaders/load/GT_SonictronLoader.java @@ -110,7 +110,8 @@ public class GT_SonictronLoader implements Runnable { GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Items.glass_bottle, 1)); GT_Mod.gregtechproxy.mSoundNames.add(SoundResource.RANDOM_BURP.toString()); GT_Mod.gregtechproxy.mSoundCounts.add(1); - GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.ender_chest == null ? Blocks.obsidian : Blocks.ender_chest, 1)); + GT_Mod.gregtechproxy.mSoundItems.add( + new ItemStack(Blocks.ender_chest == null ? Blocks.obsidian : Blocks.ender_chest, 1)); GT_Mod.gregtechproxy.mSoundNames.add(SoundResource.RANDOM_CHESTOPEN.toString()); GT_Mod.gregtechproxy.mSoundCounts.add(1); GT_Mod.gregtechproxy.mSoundItems.add(new ItemStack(Blocks.chest, 1)); diff --git a/src/main/java/gregtech/loaders/materialprocessing/ProcessingConfig.java b/src/main/java/gregtech/loaders/materialprocessing/ProcessingConfig.java index 23bc718bb4..d8fc898cf4 100644 --- a/src/main/java/gregtech/loaders/materialprocessing/ProcessingConfig.java +++ b/src/main/java/gregtech/loaders/materialprocessing/ProcessingConfig.java @@ -2,8 +2,8 @@ package gregtech.loaders.materialprocessing; import gregtech.api.GregTech_API; import gregtech.api.enums.Dyes; -import gregtech.api.enums.Materials; import gregtech.api.enums.GTNH_ExtraMaterials; +import gregtech.api.enums.Materials; import gregtech.api.enums.TextureSet; public class ProcessingConfig implements gregtech.api.interfaces.IMaterialHandler { @@ -17,9 +17,36 @@ public class ProcessingConfig implements gregtech.api.interfaces.IMaterialHandle /** This is just left here as an example of how to add new materials. **/ if (false) { int i = 0; - for (int j = GregTech_API.sMaterialProperties.get("general", "AmountOfCustomMaterialSlots", 16); i < j; i++) { + for (int j = GregTech_API.sMaterialProperties.get("general", "AmountOfCustomMaterialSlots", 16); + i < j; + i++) { String aID = (i < 10 ? "0" : "") + i; - new Materials(-1, TextureSet.SET_METALLIC, 1.0F, 0, 0, 0, 255, 255, 255, 0, "CustomMat" + aID, "CustomMat" + aID, 0, 0, 0, 0, false, false, 1, 1, 1, Dyes._NULL, "custom", true, aID); + new Materials( + -1, + TextureSet.SET_METALLIC, + 1.0F, + 0, + 0, + 0, + 255, + 255, + 255, + 0, + "CustomMat" + aID, + "CustomMat" + aID, + 0, + 0, + 0, + 0, + false, + false, + 1, + 1, + 1, + Dyes._NULL, + "custom", + true, + aID); } } } diff --git a/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java b/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java index 12299e3eca..d1c7d48f3a 100644 --- a/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java +++ b/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java @@ -1,12 +1,12 @@ package gregtech.loaders.materialprocessing; +import static gregtech.api.enums.GT_Values.MOD_ID_DC; + import cpw.mods.fml.common.Loader; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; -import static gregtech.api.enums.GT_Values.MOD_ID_DC; - public class ProcessingModSupport implements gregtech.api.interfaces.IMaterialHandler { public static boolean aTGregSupport = Loader.isModLoaded("TGregworks") || Loader.isModLoaded(MOD_ID_DC); public static boolean aEnableUBCMats = Loader.isModLoaded("UndergroundBiomes") || aTGregSupport; @@ -26,7 +26,7 @@ public class ProcessingModSupport implements gregtech.api.interfaces.IMaterialHa @Override public void onMaterialsInit() { - //Disable Materials if Parent Mod is not loaded + // Disable Materials if Parent Mod is not loaded if (!aTGregSupport) { Materials.Dysprosium.mHasParentMod = false; Materials.Erbium.mHasParentMod = false; @@ -49,7 +49,7 @@ public class ProcessingModSupport implements gregtech.api.interfaces.IMaterialHa Materials.DarkIron.mHasParentMod = false; Materials.ElectrumFlux.mHasParentMod = false; Materials.Force.mHasParentMod = false; - //Materials.Nikolite.mHasParentMod = false; + // Materials.Nikolite.mHasParentMod = false; Materials.Sunnarium.mHasParentMod = false; Materials.BlueAlloy.mHasParentMod = false; Materials.Vinteum.mHasParentMod = false; @@ -134,11 +134,11 @@ public class ProcessingModSupport implements gregtech.api.interfaces.IMaterialHa if (!aEnableRailcraftMats) { Materials.Firestone.mHasParentMod = false; } - if(!aEnableProjectRedMats){ + if (!aEnableProjectRedMats) { Materials.Electrotine.mHasParentMod = false; } - //Enable Materials if correct mod is Loaded + // Enable Materials if correct mod is Loaded Materials.ChromiumDioxide.mHasParentMod = Loader.isModLoaded("computronics"); } @@ -157,6 +157,6 @@ public class ProcessingModSupport implements gregtech.api.interfaces.IMaterialHa @Override public void onComponentIteration(Materials aMaterial) { - //NOP + // NOP } } diff --git a/src/main/java/gregtech/loaders/misc/GT_Achievements.java b/src/main/java/gregtech/loaders/misc/GT_Achievements.java index e7a34e13d3..c0a89e723c 100644 --- a/src/main/java/gregtech/loaders/misc/GT_Achievements.java +++ b/src/main/java/gregtech/loaders/misc/GT_Achievements.java @@ -15,6 +15,7 @@ import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; import gregtech.common.items.GT_MetaGenerated_Tool_01; import ic2.core.Ic2Items; +import java.util.concurrent.ConcurrentHashMap; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; @@ -27,11 +28,9 @@ import net.minecraftforge.event.entity.player.EntityItemPickupEvent; import net.minecraftforge.fluids.FluidStack; import thaumcraft.api.ThaumcraftApiHelper; -import java.util.concurrent.ConcurrentHashMap; - public class GT_Achievements { public static int oreReg = -1; - public static int assReg=-1; + public static int assReg = -1; public ConcurrentHashMap<String, Achievement> achievementList; public ConcurrentHashMap<String, Boolean> issuedAchievements; public int adjX = 5; @@ -41,10 +40,16 @@ public class GT_Achievements { this.achievementList = new ConcurrentHashMap<>(); this.issuedAchievements = new ConcurrentHashMap<>(); - for(GT_Recipe recipe: GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList) + for (GT_Recipe recipe : GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList) registerAssAchievement(recipe); - registerAchievement("flintpick", 0, 0, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(2, 1, Materials.Flint, Materials.Wood, null), "", false); + registerAchievement( + "flintpick", + 0, + 0, + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(2, 1, Materials.Flint, Materials.Wood, null), + "", + false); registerAchievement("crops", -4, 0, GT_ModHandler.getIC2Item("crop", 1L), "flintpick", false); registerAchievement("havestlead", -4, 2, ItemList.Crop_Drop_Plumbilia.get(1), "crops", false); registerAchievement("havestcopper", -2, 1, ItemList.Crop_Drop_Coppon.get(1), "crops", false); @@ -55,33 +60,107 @@ public class GT_Achievements { registerAchievement("havestsilver", -4, -5, ItemList.Crop_Drop_Argentia.get(1), "havestiron", false); registerAchievement("havestemeralds", -2, -8, ItemList.Crop_Drop_BobsYerUncleRanks.get(1), "havestgold", false); - registerAchievement("tools", 0, 4, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.HARDHAMMER, 1, Materials.Iron, Materials.Wood, null), "flintpick", false); - registerAchievement("driltime", 2, 4, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.DRILL_LV, 1, Materials.BlueSteel, Materials.StainlessSteel, null), "tools", false); - registerAchievement("brrrr", 2, 6, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.CHAINSAW_LV, 1, Materials.BlueSteel, Materials.StainlessSteel, null), "driltime", false); - registerAchievement("highpowerdrill", 3, 5, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.DRILL_HV, 1, Materials.TungstenSteel, Materials.TungstenSteel, null), "driltime", false); - registerAchievement("hammertime", 3, 7, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.JACKHAMMER, 1, Materials.TungstenSteel, Materials.TungstenSteel, null), "highpowerdrill", false); + registerAchievement( + "tools", + 0, + 4, + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.HARDHAMMER, 1, Materials.Iron, Materials.Wood, null), + "flintpick", + false); + registerAchievement( + "driltime", + 2, + 4, + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.DRILL_LV, 1, Materials.BlueSteel, Materials.StainlessSteel, null), + "tools", + false); + registerAchievement( + "brrrr", + 2, + 6, + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.CHAINSAW_LV, 1, Materials.BlueSteel, Materials.StainlessSteel, null), + "driltime", + false); + registerAchievement( + "highpowerdrill", + 3, + 5, + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.DRILL_HV, 1, Materials.TungstenSteel, Materials.TungstenSteel, null), + "driltime", + false); + registerAchievement( + "hammertime", + 3, + 7, + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.JACKHAMMER, 1, Materials.TungstenSteel, Materials.TungstenSteel, null), + "highpowerdrill", + false); registerAchievement("repair", 4, 5, ItemList.Machine_HV_Disassembler.get(1), "highpowerdrill", false); - registerAchievement("unitool", -2, 4, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.UNIVERSALSPADE, 1, Materials.Steel, Materials.Iron, null), "tools", false); + registerAchievement( + "unitool", + -2, + 4, + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.UNIVERSALSPADE, 1, Materials.Steel, Materials.Iron, null), + "tools", + false); registerAchievement("recycling", -4, 4, ItemList.Machine_LV_ArcFurnace.get(1), "unitool", false); - registerAchievement("crushed", 0, 6, GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.Tin, 1L), "tools", false); - registerAchievement("cleandust", 0, 10, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), "crushed", false); - registerAchievement("washing", -2, 6, GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Iron, 1L), "crushed", false); - registerAchievement("spinit", -4, 6, GT_OreDictUnificator.get(OrePrefixes.crushedCentrifuged, Materials.Redstone, 1L), "crushed", false); - if(!GregTech_API.mIC2Classic){ - registerAchievement("newfuel", -4, 8, ItemList.ThoriumCell_4.get(1), "spinit", false); - registerAchievement("newmetal", -4, 10, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lutetium, 1L), "newfuel", false); - registerAchievement("reflect", -2, 9, ItemList.Neutron_Reflector.get(1), "newfuel", false); + registerAchievement( + "crushed", 0, 6, GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.Tin, 1L), "tools", false); + registerAchievement( + "cleandust", + 0, + 10, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), + "crushed", + false); + registerAchievement( + "washing", + -2, + 6, + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Iron, 1L), + "crushed", + false); + registerAchievement( + "spinit", + -4, + 6, + GT_OreDictUnificator.get(OrePrefixes.crushedCentrifuged, Materials.Redstone, 1L), + "crushed", + false); + if (!GregTech_API.mIC2Classic) { + registerAchievement("newfuel", -4, 8, ItemList.ThoriumCell_4.get(1), "spinit", false); + registerAchievement( + "newmetal", + -4, + 10, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lutetium, 1L), + "newfuel", + false); + registerAchievement("reflect", -2, 9, ItemList.Neutron_Reflector.get(1), "newfuel", false); } - registerAchievement("bronze", 2, 0, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bronze, 1L), "flintpick", false); - registerAchievement("simplyeco", 2, 2, ItemList.Machine_Bronze_Boiler_Solar.get(1, ItemList.Machine_HP_Solar.get(1L)), "bronze", false); + registerAchievement( + "bronze", 2, 0, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bronze, 1L), "flintpick", false); + registerAchievement( + "simplyeco", + 2, + 2, + ItemList.Machine_Bronze_Boiler_Solar.get(1, ItemList.Machine_HP_Solar.get(1L)), + "bronze", + false); registerAchievement("firststeam", 2, -2, ItemList.Machine_Bronze_Boiler.get(1), "bronze", false); registerAchievement("alloysmelter", 2, -4, ItemList.Machine_Bronze_AlloySmelter.get(1), "firststeam", false); registerAchievement("macerator", 0, -2, ItemList.Machine_Bronze_Macerator.get(1), "firststeam", false); registerAchievement("extract", 0, -4, ItemList.Machine_Bronze_Extractor.get(1), "alloysmelter", false); - registerAchievement("smallparts", 0, -5, ItemList.Circuit_Primitive.get(1), "alloysmelter", false); + registerAchievement("smallparts", 0, -5, ItemList.Circuit_Primitive.get(1), "alloysmelter", false); registerAchievement("gtbasiccircuit", 0, -8, Ic2Items.electronicCircuit.copy(), "smallparts", false); registerAchievement("bettercircuits", 0, -9, ItemList.Circuit_Good.get(1), "gtbasiccircuit", false); registerAchievement("stepforward", -2, -9, Ic2Items.advancedCircuit.copy(), "bettercircuits", false); @@ -90,11 +169,13 @@ public class GT_Achievements { registerAchievement("gtlogiccircuit", -9, -10, ItemList.Circuit_Basic.get(1), "gtlogicwafer", false); registerAchievement("gtcleanroom", -11, -10, ItemList.Machine_Multi_Cleanroom.get(1), "gtlogiccircuit", false); registerAchievement("energyflow", -13, -10, ItemList.Circuit_Nanoprocessor.get(1), "gtcleanroom", false); - registerAchievement("gtquantumprocessor", -13, -12, ItemList.Circuit_Quantumprocessor.get(1), "energyflow", false); - registerAchievement("gtcrystalprocessor", -11, -12, ItemList.Circuit_Crystalprocessor.get(1), "gtquantumprocessor", false); + registerAchievement( + "gtquantumprocessor", -13, -12, ItemList.Circuit_Quantumprocessor.get(1), "energyflow", false); + registerAchievement( + "gtcrystalprocessor", -11, -12, ItemList.Circuit_Crystalprocessor.get(1), "gtquantumprocessor", false); registerAchievement("gtwetware", -9, -12, ItemList.Circuit_Neuroprocessor.get(1), "gtcrystalprocessor", false); registerAchievement("gtwetmain", -7, -12, ItemList.Circuit_Wetwaremainframe.get(1), "gtwetware", false); - + registerAchievement("orbs", -10, -14, ItemList.Energy_LapotronicOrb.get(1), "energyflow", false); registerAchievement("thatspower", -8, -14, ItemList.Energy_LapotronicOrb2.get(1), "orbs", false); registerAchievement("datasaving", -2, -12, ItemList.Tool_DataOrb.get(1), "stepforward", false); @@ -103,13 +184,27 @@ public class GT_Achievements { registerAchievement("whereistheocean", 2, -14, ItemList.Quantum_Tank_IV.get(1), "superbuffer", false); registerAchievement("luck", 2, -6, ItemList.ZPM.get(1), "", false); - registerAchievement("steel", 4, 0, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), "bronze", false); + registerAchievement( + "steel", 4, 0, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), "bronze", false); registerAchievement("highpressure", 4, 2, ItemList.Machine_Steel_Boiler.get(1), "steel", false); - registerAchievement("extremepressure", 4, 4, ItemList.Machine_Multi_LargeBoiler_Steel.get(1), "highpressure", false); + registerAchievement( + "extremepressure", 4, 4, ItemList.Machine_Multi_LargeBoiler_Steel.get(1), "highpressure", false); registerAchievement("cheapermac", 6, 1, ItemList.Machine_LV_Hammer.get(1), "steel", false); - registerAchievement("complexalloys", 6, 3, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.BlueSteel, 1L), "cheapermac", false); - - registerAchievement("magneticiron", 4, -2, GT_OreDictUnificator.get(OrePrefixes.stick, Materials.IronMagnetic, 1L), "steel", false); + registerAchievement( + "complexalloys", + 6, + 3, + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.BlueSteel, 1L), + "cheapermac", + false); + + registerAchievement( + "magneticiron", + 4, + -2, + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.IronMagnetic, 1L), + "steel", + false); registerAchievement("lvmotor", 4, -6, ItemList.Electric_Motor_LV.get(1), "magneticiron", false); registerAchievement("pumpcover", 2, -8, ItemList.Electric_Pump_LV.get(1), "lvmotor", false); registerAchievement("closeit", 2, -10, ItemList.Cover_Shutter.get(1), "pumpcover", false); @@ -128,7 +223,13 @@ public class GT_Achievements { registerAchievement("ebf", 8, -6, ItemList.Machine_Multi_BlastFurnace.get(1), "steampower", false); registerAchievement("energyhatch", 12, -6, ItemList.Hatch_Energy_LV.get(1), "ebf", false); - registerAchievement("gtaluminium", 8, 0, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Aluminium, 1L), "steel", false); + registerAchievement( + "gtaluminium", + 8, + 0, + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Aluminium, 1L), + "steel", + false); registerAchievement("highpowersmelt", 8, 2, ItemList.Machine_Multi_Furnace.get(1), "gtaluminium", false); registerAchievement("oilplant", 8, 4, ItemList.Distillation_Tower.get(1), "highpowersmelt", false); registerAchievement("factory", 8, 6, ItemList.Processing_Array.get(1), "oilplant", false); @@ -136,7 +237,8 @@ public class GT_Achievements { registerAchievement("maintainance", 10, -2, ItemList.Hatch_Maintenance.get(1), "upgradeebf", false); registerAchievement("upgrade", 10, 0, ItemList.Casing_Coil_Kanthal.get(1), "gtaluminium", false); - registerAchievement("titan", 14, 0, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Titanium, 1L), "upgrade", false); + registerAchievement( + "titan", 14, 0, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Titanium, 1L), "upgrade", false); registerAchievement("magic", 14, 3, ItemList.MagicEnergyConverter_LV.get(1), "titan", false); registerAchievement("highmage", 10, 3, ItemList.MagicEnergyAbsorber_HV.get(1), "magic", false); registerAchievement("artificaldia", 12, 2, ItemList.IC2_Industrial_Diamond.get(1), "titan", false); @@ -144,8 +246,15 @@ public class GT_Achievements { registerAchievement("efficientsteam", 11, 1, ItemList.LargeSteamTurbine.get(1), "muchsteam", false); registerAchievement("upgrade2", 16, 0, ItemList.Casing_Coil_Nichrome.get(1), "titan", false); - registerAchievement("tungsten", 16, 2, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tungsten, 1L), "upgrade2", false); - registerAchievement("osmium", 16, -2, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Osmium, 1L), "upgrade2", false); + registerAchievement( + "tungsten", + 16, + 2, + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tungsten, 1L), + "upgrade2", + false); + registerAchievement( + "osmium", 16, -2, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Osmium, 1L), "upgrade2", false); registerAchievement("hightech", 15, -3, ItemList.Field_Generator_LV.get(1), "osmium", false); registerAchievement("amplifier", 16, -5, ItemList.Machine_LV_Amplifab.get(1), "hightech", false); registerAchievement("scanning", 13, -3, ItemList.Machine_HV_Scanner.get(1), "hightech", false); @@ -153,11 +262,24 @@ public class GT_Achievements { registerAchievement("universal", 15, -6, ItemList.Machine_LV_Massfab.get(1), "hightech", false); registerAchievement("replication", 17, -6, ItemList.Machine_LV_Replicator.get(1), "universal", false); - registerAchievement("tungstensteel", 16, 4, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.TungstenSteel, 1L), "tungsten", false); + registerAchievement( + "tungstensteel", + 16, + 4, + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.TungstenSteel, 1L), + "tungsten", + false); registerAchievement("upgrade3", 15, 5, ItemList.Casing_Coil_TungstenSteel.get(1), "tungstensteel", false); - registerAchievement("hssg", 13, 5, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.HSSG, 1L), "upgrade3", false); + registerAchievement( + "hssg", 13, 5, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.HSSG, 1L), "upgrade3", false); registerAchievement("upgrade4", 11, 5, ItemList.Casing_Coil_HSSG.get(1), "hssg", false); - registerAchievement("stargatematerial", 11, 7, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Naquadah, 1L), "upgrade4", false); + registerAchievement( + "stargatematerial", + 11, + 7, + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Naquadah, 1L), + "upgrade4", + false); registerAchievement("conducting", 14, 6, ItemList.Casing_Coil_Superconductor.get(1), "upgrade3", false); registerAchievement("fusion", 15, 7, ItemList.FusionComputer_LuV.get(1), "tungstensteel", false); registerAchievement("higherefficency", 15, 9, ItemList.Generator_Plasma_IV.get(1), "fusion", false); @@ -167,30 +289,43 @@ public class GT_Achievements { registerAchievement("tothelimit", 13, 9, ItemList.Generator_Plasma_LuV.get(1), "advancing", false); registerAchievement("fullefficiency", 12, 10, ItemList.Generator_Plasma_ZPMV.get(1), "tothelimit", false); registerAchievement("upgrade5", 9, 9, ItemList.Casing_Coil_Naquadah.get(1), "stargateliquid", false); - registerAchievement("alienmetallurgy", 9, 7, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.NaquadahAlloy, 1L), "upgrade5", false); + registerAchievement( + "alienmetallurgy", + 9, + 7, + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.NaquadahAlloy, 1L), + "upgrade5", + false); registerAchievement("over9000", 7, 7, ItemList.Casing_Coil_NaquadahAlloy.get(1), "alienmetallurgy", false); - registerAchievement("finalpreparations", 7, 9, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Naquadria, 1L), "over9000", false); + registerAchievement( + "finalpreparations", + 7, + 9, + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Naquadria, 1L), + "over9000", + false); registerAchievement("denseaspossible", 6, 10, ItemList.FusionComputer_UV.get(1), "finalpreparations", false); - if(GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "EnableZPMandUVBatteries", false)) { + if (GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "EnableZPMandUVBatteries", false)) { registerAchievement("zpmage", 8, 10, ItemList.Energy_Module.get(1), "denseaspossible", false); registerAchievement("uvage", 10, 10, ItemList.Energy_Cluster.get(1), "zpmage", false); registerAchievement("whatnow", 12, 10, ItemList.ZPM2.get(1), "uvage", false); - }else { + } else { registerAchievement("whatnow", 8, 10, ItemList.ZPM2.get(1), "denseaspossible", false); } if (GT_Mod.gregtechproxy.mAchievements) { - AchievementPage.registerAchievementPage(new AchievementPage("GregTech 5", (Achievement[]) this.achievementList.values().toArray( - new Achievement[this.achievementList.size()]))); + AchievementPage.registerAchievementPage(new AchievementPage("GregTech 5", (Achievement[]) + this.achievementList.values().toArray(new Achievement[this.achievementList.size()]))); MinecraftForge.EVENT_BUS.register(this); FMLCommonHandler.instance().bus().register(this); } } - public static void registerOre(Materials aMaterial, int min, int max, int chance, boolean overworld, boolean nether, boolean end) { - } + public static void registerOre( + Materials aMaterial, int min, int max, int chance, boolean overworld, boolean nether, boolean end) {} - public Achievement registerAchievement(String textId, int x, int y, ItemStack icon, Achievement requirement, boolean special) { + public Achievement registerAchievement( + String textId, int x, int y, ItemStack icon, Achievement requirement, boolean special) { if (!GT_Mod.gregtechproxy.mAchievements) { return null; } @@ -198,7 +333,7 @@ public class GT_Achievements { if (special) { achievement.setSpecial(); } - ((StatBase)achievement).registerStat(); + ((StatBase) achievement).registerStat(); if (GT_Values.D2) { GT_Log.out.println("achievement." + textId + "="); GT_Log.out.println("achievement." + textId + ".desc="); @@ -207,16 +342,18 @@ public class GT_Achievements { return achievement; } - public Achievement registerAchievement(String textId, int x, int y, ItemStack icon, String requirement, boolean special) { + public Achievement registerAchievement( + String textId, int x, int y, ItemStack icon, String requirement, boolean special) { if (!GT_Mod.gregtechproxy.mAchievements) { return null; } ; - Achievement achievement = new Achievement(textId, textId, this.adjX + x, this.adjY + y, icon, getAchievement(requirement)); + Achievement achievement = + new Achievement(textId, textId, this.adjX + x, this.adjY + y, icon, getAchievement(requirement)); if (special) { achievement.setSpecial(); } - ((StatBase)achievement).registerStat(); + ((StatBase) achievement).registerStat(); if (GT_Values.D2) { GT_Log.out.println("achievement." + textId + "="); GT_Log.out.println("achievement." + textId + ".desc="); @@ -232,8 +369,13 @@ public class GT_Achievements { public Achievement registerAssAchievement(GT_Recipe recipe) { if (this.achievementList.get(recipe.getOutput(0).getUnlocalizedName()) == null) { assReg++; - return registerAchievement(recipe.getOutput(0).getUnlocalizedName(), -(11 + assReg % 5), ((assReg) / 5) - 8, recipe.getOutput(0) - , AchievementList.openInventory, false); + return registerAchievement( + recipe.getOutput(0).getUnlocalizedName(), + -(11 + assReg % 5), + ((assReg) / 5) - 8, + recipe.getOutput(0), + AchievementList.openInventory, + false); } return null; } @@ -284,7 +426,6 @@ public class GT_Achievements { if (stack.getUnlocalizedName().equals("ic2.itemPartIndustrialDiamond")) { issueAchievement(player, "artificaldia"); issueAchievement(player, "buildCoalDiamond"); - } } @@ -381,7 +522,7 @@ public class GT_Achievements { } else if (stack.getUnlocalizedName().equals("gt.blockmachines.bronzemachine.alloysmelter")) { issueAchievement(player, "alloysmelter"); issueAchievement(player, "buildElecFurnace"); - if(stack.getUnlocalizedName().equals("gt.blockmachines.bronzemachine.alloysmelter.tier.3")){ + if (stack.getUnlocalizedName().equals("gt.blockmachines.bronzemachine.alloysmelter.tier.3")) { issueAchievement(player, "buildIndFurnace"); } } else if (stack.getUnlocalizedName().equals("gt.blockmachines.bronzemachine.extractor")) { @@ -399,7 +540,7 @@ public class GT_Achievements { } else if (stack.getUnlocalizedName().startsWith("gt.blockmachines.automation.chestbuffer.tier.")) { issueAchievement(player, "buffer"); issueAchievement(player, "buildBatBox"); - if(stack.getUnlocalizedName().startsWith("gt.blockmachines.automation.chestbuffer.tier.3")){ + if (stack.getUnlocalizedName().startsWith("gt.blockmachines.automation.chestbuffer.tier.3")) { issueAchievement(player, "buildMFE"); } } else if (stack.getUnlocalizedName().startsWith("gt.blockmachines.basicgenerator.steamturbine.tier.")) { @@ -421,9 +562,11 @@ public class GT_Achievements { issueAchievement(player, "energyhatch"); } else if (stack.getUnlocalizedName().equals("gt.blockmachines.multimachine.processingarray")) { issueAchievement(player, "factory"); - } else if (stack.getUnlocalizedName().equals("gt.blockmachines.basicgenerator.magicenergyconverter.tier.01")) { + } else if (stack.getUnlocalizedName() + .equals("gt.blockmachines.basicgenerator.magicenergyconverter.tier.01")) { issueAchievement(player, "magic"); - } else if (stack.getUnlocalizedName().equals("gt.blockmachines.basicgenerator.magicenergyabsorber.tier.03")) { + } else if (stack.getUnlocalizedName() + .equals("gt.blockmachines.basicgenerator.magicenergyabsorber.tier.03")) { issueAchievement(player, "highmage"); } else if (stack.getUnlocalizedName().startsWith("gt.blockmachines.basicmachine.amplifab.tier.")) { issueAchievement(player, "amplifier"); @@ -482,25 +625,25 @@ public class GT_Achievements { return; } ItemData data = GT_OreDictUnificator.getItemData(stack); - if (data != null && data.mPrefix!=null) { + if (data != null && data.mPrefix != null) { if (data.mPrefix == OrePrefixes.dust) { if (data.mMaterial.mMaterial == Materials.Lutetium) { issueAchievement(player, "newmetal"); } - if(data.mMaterial.mMaterial != Materials.Gunpowder){ + if (data.mMaterial.mMaterial != Materials.Gunpowder) { issueAchievement(player, "cleandust"); } } else if (data.mPrefix.name().startsWith("ore")) { - int data_getAllMaterialStacks_sS=data.getAllMaterialStacks().size(); + int data_getAllMaterialStacks_sS = data.getAllMaterialStacks().size(); for (int i = 0; i < data_getAllMaterialStacks_sS; i++) { issueAchievement(player, data.getAllMaterialStacks().get(i).mMaterial.mName); if (data.getAllMaterialStacks().get(i).mMaterial == Materials.AnyIron) { issueAchievement(player, "iron"); } - if(data.getAllMaterialStacks().get(i).mMaterial == Materials.Copper||data.getAllMaterialStacks().get(i).mMaterial == Materials.Tin){ + if (data.getAllMaterialStacks().get(i).mMaterial == Materials.Copper + || data.getAllMaterialStacks().get(i).mMaterial == Materials.Tin) { issueAchievement(event.entityPlayer, "mineOre"); } - } } else if (data.mPrefix == OrePrefixes.crushed) { issueAchievement(player, "crushed"); @@ -511,14 +654,17 @@ public class GT_Achievements { } else if (data.mMaterial.mMaterial == Materials.Steel) { if (data.mPrefix == OrePrefixes.ingot && stack.stackSize == stack.getMaxStackSize()) { issueAchievement(player, "steel"); - } else if (data.mPrefix == OrePrefixes.nugget && Loader.isModLoaded("Thaumcraft") && ThaumcraftApiHelper.isResearchComplete(player.getDisplayName(), "GT_IRON_TO_STEEL")) { + } else if (data.mPrefix == OrePrefixes.nugget + && Loader.isModLoaded("Thaumcraft") + && ThaumcraftApiHelper.isResearchComplete(player.getDisplayName(), "GT_IRON_TO_STEEL")) { issueAchievement(player, "steel"); } -// } else if (data.mPrefix == OrePrefixes.circuit && data.mMaterial.mMaterial == Materials.Advanced) { -// issueAchievement(player, "stepforward"); + // } else if (data.mPrefix == OrePrefixes.circuit && data.mMaterial.mMaterial == + // Materials.Advanced) { + // issueAchievement(player, "stepforward"); } } -// GT_FML_LOGGER.info(stack.getUnlocalizedName()); + // GT_FML_LOGGER.info(stack.getUnlocalizedName()); if (stack.getUnlocalizedName().startsWith("gt.metaitem.")) { switch (stack.getUnlocalizedName()) { case "gt.metaitem.02.32500": @@ -602,25 +748,29 @@ public class GT_Achievements { case "gt.metaitem.03.32095": issueAchievement(player, "gtwetmain"); break; - } + } } else if (stack.getUnlocalizedName().equals("gt.Thoriumcell")) { issueAchievement(player, "newfuel"); - }else if ((stack.getItem() == Ic2Items.quantumBodyarmor.getItem()) || (stack.getItem() == Ic2Items.quantumBoots.getItem()) || - (stack.getItem() == Ic2Items.quantumHelmet.getItem()) || (stack.getItem() == Ic2Items.quantumLeggings.getItem())) { + } else if ((stack.getItem() == Ic2Items.quantumBodyarmor.getItem()) + || (stack.getItem() == Ic2Items.quantumBoots.getItem()) + || (stack.getItem() == Ic2Items.quantumHelmet.getItem()) + || (stack.getItem() == Ic2Items.quantumLeggings.getItem())) { issueAchievement(player, "buildQArmor"); } else if (stack.getUnlocalizedName().equals("ic2.itemPartCircuitAdv")) { issueAchievement(player, "stepforward"); - } - if(player.capabilities.isCreativeMode && stack.getUnlocalizedName().equals("gt.metaitem.01.32761")){//Debug Scanner pickup shows all assline recipes. - for(GT_Recipe recipe: GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList) { + } + if (player.capabilities.isCreativeMode + && stack.getUnlocalizedName() + .equals("gt.metaitem.01.32761")) { // Debug Scanner pickup shows all assline recipes. + for (GT_Recipe recipe : GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList) { issueAchievement(player, recipe.getOutput(0).getUnlocalizedName()); - recipe.mHidden=false; + recipe.mHidden = false; } } - for(GT_Recipe recipe: GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList){ - if(recipe.getOutput(0).getUnlocalizedName().equals(stack.getUnlocalizedName())) { + for (GT_Recipe recipe : GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList) { + if (recipe.getOutput(0).getUnlocalizedName().equals(stack.getUnlocalizedName())) { issueAchievement(player, recipe.getOutput(0).getUnlocalizedName()); - recipe.mHidden=false; + recipe.mHidden = false; } } } diff --git a/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java b/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java index 7be5d054a1..ab9d96ae05 100644 --- a/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java +++ b/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java @@ -1,5 +1,13 @@ package gregtech.loaders.misc; +import static forestry.api.apiculture.EnumBeeChromosome.*; +import static forestry.api.core.EnumHumidity.ARID; +import static forestry.api.core.EnumHumidity.DAMP; +import static forestry.api.core.EnumTemperature.*; +import static forestry.core.genetics.alleles.EnumAllele.*; +import static gregtech.api.enums.GT_Values.MOD_ID_DC; +import static gregtech.loaders.misc.GT_BeeDefinitionReference.*; + import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.GameRegistry; import forestry.api.apiculture.*; @@ -10,7 +18,6 @@ import forestry.api.genetics.IAllele; import forestry.api.genetics.IAlleleFlowers; import forestry.api.genetics.IMutationCustom; import forestry.apiculture.genetics.Bee; -import forestry.apiculture.genetics.BeeVariation; import forestry.apiculture.genetics.IBeeDefinition; import forestry.apiculture.genetics.alleles.AlleleEffect; import forestry.core.genetics.alleles.AlleleHelper; @@ -27,42 +34,37 @@ import gregtech.common.bees.GT_Bee_Mutation; import gregtech.common.items.CombType; import gregtech.common.items.DropType; import gregtech.common.items.PropolisType; +import java.awt.*; +import java.util.Arrays; +import java.util.Locale; +import java.util.function.Consumer; import net.minecraft.block.Block; -import net.minecraft.block.material.Material; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import org.apache.commons.lang3.text.WordUtils; -import java.awt.*; -import java.util.Arrays; -import java.util.Locale; -import java.util.function.Consumer; - -import static forestry.api.apiculture.EnumBeeChromosome.*; -import static forestry.api.core.EnumHumidity.ARID; -import static forestry.api.core.EnumHumidity.DAMP; -import static forestry.api.core.EnumTemperature.*; -import static forestry.core.genetics.alleles.EnumAllele.*; -import static gregtech.api.enums.GT_Values.MOD_ID; -import static gregtech.api.enums.GT_Values.MOD_ID_DC; -import static gregtech.loaders.misc.GT_BeeDefinitionReference.*; - /** * Bride Class for Lambdas */ class GT_BeeDefinitionReference { - protected final static byte FORESTRY = 0; - protected final static byte EXTRABEES = 1; - protected final static byte GENDUSTRY = 2; - protected final static byte MAGICBEES = 3; - protected final static byte GREGTECH = 4; + protected static final byte FORESTRY = 0; + protected static final byte EXTRABEES = 1; + protected static final byte GENDUSTRY = 2; + protected static final byte MAGICBEES = 3; + protected static final byte GREGTECH = 4; + private GT_BeeDefinitionReference() {} } public enum GT_BeeDefinition implements IBeeDefinition { - //organic - CLAY(GT_BranchDefinition.ORGANIC, "Clay", true, new Color(0xC8C8DA), new Color(0x0000FF), + // organic + CLAY( + GT_BranchDefinition.ORGANIC, + "Clay", + true, + new Color(0xC8C8DA), + new Color(0x0000FF), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.30f); beeSpecies.addProduct(new ItemStack(Items.clay_ball, 1), 0.15f); @@ -76,11 +78,16 @@ public enum GT_BeeDefinition implements IBeeDefinition { AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.VANILLA); }, dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(FORESTRY, "Industrious"), getSpecies(FORESTRY, "Diligent"), 10); - tMutation.requireResource(Blocks.clay, 0); //blockStainedHardenedClay - } - ), - SLIMEBALL(GT_BranchDefinition.ORGANIC, "SlimeBall", true, new Color(0x4E9E55), new Color(0x00FF15), + IBeeMutationCustom tMutation = + dis.registerMutation(getSpecies(FORESTRY, "Industrious"), getSpecies(FORESTRY, "Diligent"), 10); + tMutation.requireResource(Blocks.clay, 0); // blockStainedHardenedClay + }), + SLIMEBALL( + GT_BranchDefinition.ORGANIC, + "SlimeBall", + true, + new Color(0x4E9E55), + new Color(0x00FF15), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 15), 0.30f); beeSpecies.addProduct(new ItemStack(Items.slime_ball, 1), 0.15f); @@ -103,9 +110,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(FORESTRY, "Marshy"), CLAY, 7); if (Loader.isModLoaded("TConstruct")) tMutation.requireResource(GameRegistry.findBlock("TConstruct", "slime.gel"), 1); - } - ), - PEAT(GT_BranchDefinition.ORGANIC, "Peat", true, new Color(0x906237), new Color(0x58300B), + }), + PEAT( + GT_BranchDefinition.ORGANIC, + "Peat", + true, + new Color(0x906237), + new Color(0x58300B), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.LIGNIE), 0.30f); beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.15f); @@ -121,9 +132,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { AlleleHelper.instance.set(template, FLOWERING, Flowering.FASTER); AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.NONE); }, - dis -> dis.registerMutation(getSpecies(FORESTRY, "Rural"), CLAY, 10) - ), - STICKYRESIN(GT_BranchDefinition.ORGANIC, "StickyResin", true, new Color(0x2E8F5B), new Color(0xDCC289), + dis -> dis.registerMutation(getSpecies(FORESTRY, "Rural"), CLAY, 10)), + STICKYRESIN( + GT_BranchDefinition.ORGANIC, + "StickyResin", + true, + new Color(0x2E8F5B), + new Color(0xDCC289), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.STICKY), 0.15f); @@ -138,9 +153,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(SLIMEBALL, PEAT, 15); tMutation.requireResource("logRubber"); - } - ), - COAL(GT_BranchDefinition.ORGANIC, "Coal", true, new Color(0x666666), new Color(0x525252), + }), + COAL( + GT_BranchDefinition.ORGANIC, + "Coal", + true, + new Color(0x666666), + new Color(0x525252), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.LIGNIE), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.COAL), 0.15f); @@ -159,9 +178,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(FORESTRY, "Industrious"), PEAT, 9); tMutation.requireResource("blockCoal"); - } - ), - OIL(GT_BranchDefinition.ORGANIC, "Oil", true, new Color(0x4C4C4C), new Color(0x333333), + }), + OIL( + GT_BranchDefinition.ORGANIC, + "Oil", + true, + new Color(0x4C4C4C), + new Color(0x333333), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.OIL), 0.75f); @@ -177,11 +200,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { AlleleHelper.instance.set(template, FLOWER_PROVIDER, getFlowers(EXTRABEES, "water")); AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.NONE); AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.NONE); - }, - dis -> dis.registerMutation(COAL, STICKYRESIN, 4) - ), - SANDWICH(GT_BranchDefinition.ORGANIC, "Sandwich", true, new Color(0x32CD32), new Color(0xDAA520), + dis -> dis.registerMutation(COAL, STICKYRESIN, 4)), + SANDWICH( + GT_BranchDefinition.ORGANIC, + "Sandwich", + true, + new Color(0x32CD32), + new Color(0xDAA520), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem("ExtraBees", "honeyComb", 1, 9), 0.15f); beeSpecies.addSpecialty(ItemList.Food_Sliced_Cucumber.get(1), 0.05f); @@ -201,11 +227,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTER); AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.WHEAT); AlleleHelper.instance.set(template, FLOWERING, Flowering.FASTER); - }, - dis -> dis.registerMutation(getSpecies(FORESTRY, "Agrarian"), getSpecies(MAGICBEES, "TCBatty"), 10) - ), - ASH(GT_BranchDefinition.ORGANIC, "Ash", true, new Color(0x1e1a18), new Color(0xc6c6c6), + dis -> dis.registerMutation(getSpecies(FORESTRY, "Agrarian"), getSpecies(MAGICBEES, "TCBatty"), 10)), + ASH( + GT_BranchDefinition.ORGANIC, + "Ash", + true, + new Color(0x1e1a18), + new Color(0xc6c6c6), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem("ExtraBees", "honeyComb", 1, 9), 0.15f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ASH), 0.15f); @@ -222,9 +251,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(COAL, CLAY, 10); tMutation.restrictTemperature(HELLISH); - } - ), - APATITE(GT_BranchDefinition.ORGANIC, "Apatite", true, new Color(0xc1c1f6), new Color(0x676784), + }), + APATITE( + GT_BranchDefinition.ORGANIC, + "Apatite", + true, + new Color(0xc1c1f6), + new Color(0x676784), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem("ExtraBees", "honeyComb", 1, 9), 0.15f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.APATITE), 0.15f); @@ -241,9 +274,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(ASH, COAL, 10); tMutation.requireResource("blockApatite"); - } - ), - FERTILIZER(GT_BranchDefinition.ORGANIC, "Fertilizer", true, new Color(0x7fcef5), new Color(0x654525), + }), + FERTILIZER( + GT_BranchDefinition.ORGANIC, + "Fertilizer", + true, + new Color(0x7fcef5), + new Color(0x654525), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem("ExtraBees", "honeyComb", 1, 9), 0.15f); beeSpecies.addSpecialty(GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 1), 0.2f); @@ -259,44 +296,54 @@ public enum GT_BeeDefinition implements IBeeDefinition { AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.WHEAT); AlleleHelper.instance.set(template, FLOWERING, Flowering.FASTER); }, - dis -> dis.registerMutation(ASH, APATITE, 8) - ), + dis -> dis.registerMutation(ASH, APATITE, 8)), // Phosphorus bee, Humidity: normal, Temperature: Hot, Parents: Apatite & Ash, Mutationrate: 12%, Combrate: 55% - PHOSPHORUS(GT_BranchDefinition.ORGANIC, "Phosphorus", false, new Color(0xFFC826), new Color(0xC1C1F6), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.PHOSPHORUS), 0.55f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(HOT); - beeSpecies.setNocturnal(); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(APATITE, ASH, 12); - tMutation.restrictTemperature(HOT); - tMutation.requireResource(GameRegistry.findBlock("gregtech", "gt.blockgem2"), 8); - - } - ), + PHOSPHORUS( + GT_BranchDefinition.ORGANIC, + "Phosphorus", + false, + new Color(0xFFC826), + new Color(0xC1C1F6), + beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.PHOSPHORUS), 0.55f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(HOT); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + }, + template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), + dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(APATITE, ASH, 12); + tMutation.restrictTemperature(HOT); + tMutation.requireResource(GameRegistry.findBlock("gregtech", "gt.blockgem2"), 8); + }), // Mica bee, Humidity: normal, Parents: Silicon & PEAT, Mutationrate: 15%, Combrate: 25% - MICA(GT_BranchDefinition.ORGANIC, "Mica", false, new Color(0xFFC826), new Color(0xC1C1F6), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.MICA), 0.25f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(HOT); - beeSpecies.setNocturnal(); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(PEAT, getSpecies(MAGICBEES, "Silicon"), 15); - tMutation.requireResource(GameRegistry.findBlock("gregtech", "gt.blockcasings5"), 0); - - } - ), + MICA( + GT_BranchDefinition.ORGANIC, + "Mica", + false, + new Color(0xFFC826), + new Color(0xC1C1F6), + beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.MICA), 0.25f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(HOT); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + }, + template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), + dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(PEAT, getSpecies(MAGICBEES, "Silicon"), 15); + tMutation.requireResource(GameRegistry.findBlock("gregtech", "gt.blockcasings5"), 0); + }), - //gems - REDSTONE(GT_BranchDefinition.GEM, "Redstone", true, new Color(0x7D0F0F), new Color(0xD11919), + // gems + REDSTONE( + GT_BranchDefinition.GEM, + "Redstone", + true, + new Color(0x7D0F0F), + new Color(0xD11919), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.REDSTONE), 0.15f); @@ -306,11 +353,16 @@ public enum GT_BeeDefinition implements IBeeDefinition { }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(FORESTRY, "Industrious"), getSpecies(FORESTRY, "Demonic"), 10); + IBeeMutationCustom tMutation = + dis.registerMutation(getSpecies(FORESTRY, "Industrious"), getSpecies(FORESTRY, "Demonic"), 10); tMutation.requireResource("blockRedstone"); - } - ), - LAPIS(GT_BranchDefinition.GEM, "Lapis", true, new Color(0x1947D1), new Color(0x476CDA), + }), + LAPIS( + GT_BranchDefinition.GEM, + "Lapis", + true, + new Color(0x1947D1), + new Color(0x476CDA), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.LAPIS), 0.15f); @@ -319,11 +371,16 @@ public enum GT_BeeDefinition implements IBeeDefinition { }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(FORESTRY, "Demonic"), getSpecies(FORESTRY, "Imperial"), 10); + IBeeMutationCustom tMutation = + dis.registerMutation(getSpecies(FORESTRY, "Demonic"), getSpecies(FORESTRY, "Imperial"), 10); tMutation.requireResource("blockLapis"); - } - ), - CERTUS(GT_BranchDefinition.GEM, "CertusQuartz", true, new Color(0x57CFFB), new Color(0xBBEEFF), + }), + CERTUS( + GT_BranchDefinition.GEM, + "CertusQuartz", + true, + new Color(0x57CFFB), + new Color(0xBBEEFF), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.CERTUS), 0.15f); @@ -335,9 +392,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(FORESTRY, "Hermitic"), LAPIS, 10); if (Loader.isModLoaded("appliedenergistics2")) tMutation.requireResource(GameRegistry.findBlock("appliedenergistics2", "tile.BlockQuartz"), 0); - } - ), - FLUIX(GT_BranchDefinition.GEM, "FluixDust", true, new Color(0xA375FF), new Color(0xB591FF), + }), + FLUIX( + GT_BranchDefinition.GEM, + "FluixDust", + true, + new Color(0xA375FF), + new Color(0xB591FF), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.FLUIX), 0.15f); @@ -349,9 +410,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(REDSTONE, LAPIS, 7); if (Loader.isModLoaded("appliedenergistics2")) tMutation.requireResource(GameRegistry.findBlock("appliedenergistics2", "tile.BlockFluix"), 0); - } - ), - DIAMOND(GT_BranchDefinition.GEM, "Diamond", false, new Color(0xCCFFFF), new Color(0xA3CCCC), + }), + DIAMOND( + GT_BranchDefinition.GEM, + "Diamond", + false, + new Color(0xCCFFFF), + new Color(0xA3CCCC), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.DIAMOND), 0.15f); @@ -363,9 +428,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(CERTUS, COAL, 3); tMutation.requireResource("blockDiamond"); - } - ), - RUBY(GT_BranchDefinition.GEM, "Ruby", false, new Color(0xE6005C), new Color(0xCC0052), + }), + RUBY( + GT_BranchDefinition.GEM, + "Ruby", + false, + new Color(0xE6005C), + new Color(0xCC0052), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.RUBY), 0.15f); @@ -377,9 +446,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(REDSTONE, DIAMOND, 5); tMutation.requireResource("blockRuby"); - } - ), - SAPPHIRE(GT_BranchDefinition.GEM, "Sapphire", true, new Color(0x0033CC), new Color(0x00248F), + }), + SAPPHIRE( + GT_BranchDefinition.GEM, + "Sapphire", + true, + new Color(0x0033CC), + new Color(0x00248F), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.SAPPHIRE), 0.15f); @@ -390,9 +463,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(CERTUS, LAPIS, 5); tMutation.requireResource(GregTech_API.sBlockGem2, 12); - } - ), - OLIVINE(GT_BranchDefinition.GEM, "Olivine", true, new Color(0x248F24), new Color(0xCCFFCC), + }), + OLIVINE( + GT_BranchDefinition.GEM, + "Olivine", + true, + new Color(0x248F24), + new Color(0xCCFFCC), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.OLIVINE), 0.15f); @@ -401,9 +478,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { beeSpecies.setTemperature(EnumTemperature.NORMAL); }, template -> AlleleHelper.instance.set(template, SPEED, Speed.SLOWER), - dis -> dis.registerMutation(CERTUS, getSpecies(FORESTRY, "Ended"), 5) - ), - EMERALD(GT_BranchDefinition.GEM, "Emerald", false, new Color(0x248F24), new Color(0x2EB82E), + dis -> dis.registerMutation(CERTUS, getSpecies(FORESTRY, "Ended"), 5)), + EMERALD( + GT_BranchDefinition.GEM, + "Emerald", + false, + new Color(0x248F24), + new Color(0x2EB82E), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.EMERALD), 0.15f); @@ -416,9 +497,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(OLIVINE, DIAMOND, 4); tMutation.requireResource("blockEmerald"); - } - ), - REDGARNET(GT_BranchDefinition.GEM, "RedGarnet", false, new Color(0xBD4C4C), new Color(0xECCECE), + }), + REDGARNET( + GT_BranchDefinition.GEM, + "RedGarnet", + false, + new Color(0xBD4C4C), + new Color(0xECCECE), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.REDGARNET), 0.15f); @@ -434,9 +519,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(DIAMOND, RUBY, 4); tMutation.requireResource("blockGarnetRed"); - } - ), - YELLOWGARNET(GT_BranchDefinition.GEM, "YellowGarnet", false, new Color(0xA3A341), new Color(0xEDEDCE), + }), + YELLOWGARNET( + GT_BranchDefinition.GEM, + "YellowGarnet", + false, + new Color(0xA3A341), + new Color(0xEDEDCE), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.YELLOWGARNET), 0.15f); @@ -452,9 +541,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(EMERALD, REDGARNET, 3); tMutation.requireResource("blockGarnetYellow"); - } - ), - FIRESTONE(GT_BranchDefinition.GEM, "Firestone", false, new Color(0xC00000), new Color(0xFF0000), + }), + FIRESTONE( + GT_BranchDefinition.GEM, + "Firestone", + false, + new Color(0xC00000), + new Color(0xFF0000), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.FIRESTONE), 0.15f); @@ -470,11 +563,15 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(REDSTONE, RUBY, 4); tMutation.requireResource("blockFirestone"); - } - ), + }), - //Metal Line - COPPER(GT_BranchDefinition.METAL, "Copper", true, new Color(0xFF6600), new Color(0xE65C00), + // Metal Line + COPPER( + GT_BranchDefinition.METAL, + "Copper", + true, + new Color(0xFF6600), + new Color(0xE65C00), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.COPPER), 0.15f); @@ -486,9 +583,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(FORESTRY, "Majestic"), CLAY, 13); tMutation.requireResource("blockCopper"); - } - ), - TIN(GT_BranchDefinition.METAL, "Tin", true, new Color(0xD4D4D4), new Color(0xDDDDDD), + }), + TIN( + GT_BranchDefinition.METAL, + "Tin", + true, + new Color(0xD4D4D4), + new Color(0xDDDDDD), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.TIN), 0.15f); @@ -500,9 +601,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(CLAY, getSpecies(FORESTRY, "Diligent"), 13); tMutation.requireResource("blockTin"); - } - ), - LEAD(GT_BranchDefinition.METAL, "Lead", true, new Color(0x666699), new Color(0xA3A3CC), + }), + LEAD( + GT_BranchDefinition.METAL, + "Lead", + true, + new Color(0x666699), + new Color(0xA3A3CC), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.LEAD), 0.15f); @@ -514,9 +619,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(COAL, COPPER, 13); tMutation.requireResource("blockLead"); - } - ), - IRON(GT_BranchDefinition.METAL, "Iron", true, new Color(0xDA9147), new Color(0xDE9C59), + }), + IRON( + GT_BranchDefinition.METAL, + "Iron", + true, + new Color(0xDA9147), + new Color(0xDE9C59), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.IRON), 0.15f); @@ -528,9 +637,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(TIN, COPPER, 13); tMutation.requireResource("blockIron"); - } - ), - STEEL(GT_BranchDefinition.METAL, "Steel", true, new Color(0x808080), new Color(0x999999), + }), + STEEL( + GT_BranchDefinition.METAL, + "Steel", + true, + new Color(0x808080), + new Color(0x999999), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STEEL), 0.15f); @@ -543,10 +656,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(IRON, COAL, 10); tMutation.requireResource("blockSteel"); tMutation.restrictTemperature(HOT); - - } - ), - NICKEL(GT_BranchDefinition.METAL, "Nickel", true, new Color(0x8585AD), new Color(0x8585AD), + }), + NICKEL( + GT_BranchDefinition.METAL, + "Nickel", + true, + new Color(0x8585AD), + new Color(0x8585AD), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.NICKEL), 0.15f); @@ -558,9 +674,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(IRON, COPPER, 13); tMutation.requireResource("blockNickel"); - } - ), - ZINC(GT_BranchDefinition.METAL, "Zinc", true, new Color(0xF0DEF0), new Color(0xF2E1F2), + }), + ZINC( + GT_BranchDefinition.METAL, + "Zinc", + true, + new Color(0xF0DEF0), + new Color(0xF2E1F2), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.ZINC), 0.15f); @@ -572,9 +692,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(IRON, TIN, 13); tMutation.requireResource("blockZinc"); - } - ), - SILVER(GT_BranchDefinition.METAL, "Silver", true, new Color(0xC2C2D6), new Color(0xCECEDE), + }), + SILVER( + GT_BranchDefinition.METAL, + "Silver", + true, + new Color(0xC2C2D6), + new Color(0xCECEDE), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SILVER), 0.15f); @@ -586,9 +710,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(LEAD, TIN, 10); tMutation.requireResource("blockSilver"); - } - ), - CRYOLITE(GT_BranchDefinition.METAL, "Cryolite", true, new Color(0xBFEFFF), new Color(0x73B9D0), + }), + CRYOLITE( + GT_BranchDefinition.METAL, + "Cryolite", + true, + new Color(0xBFEFFF), + new Color(0x73B9D0), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.CRYOLITE), 0.15f); @@ -600,9 +728,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(LEAD, SILVER, 9); tMutation.requireResource("blockCryolite"); - } - ), - GOLD(GT_BranchDefinition.METAL, "Gold", true, new Color(0xEBC633), new Color(0xEDCC47), + }), + GOLD( + GT_BranchDefinition.METAL, + "Gold", + true, + new Color(0xEBC633), + new Color(0xEDCC47), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.GOLD), 0.15f); @@ -615,9 +747,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(LEAD, COPPER, 13); tMutation.requireResource("blockGold"); tMutation.restrictTemperature(HOT); - } - ), - ARSENIC(GT_BranchDefinition.METAL, "Arsenic", true, new Color(0x736C52), new Color(0x292412), + }), + ARSENIC( + GT_BranchDefinition.METAL, + "Arsenic", + true, + new Color(0x736C52), + new Color(0x292412), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.ARSENIC), 0.15f); @@ -628,11 +764,15 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(ZINC, SILVER, 10); tMutation.requireResource("blockArsenic"); - } - ), + }), - //Rare Metals - ALUMINIUM(GT_BranchDefinition.RAREMETAL, "Aluminium", true, new Color(0xB8B8FF), new Color(0xD6D6FF), + // Rare Metals + ALUMINIUM( + GT_BranchDefinition.RAREMETAL, + "Aluminium", + true, + new Color(0xB8B8FF), + new Color(0xD6D6FF), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.ALUMINIUM), 0.15f); @@ -644,9 +784,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(NICKEL, ZINC, 9); tMutation.requireResource("blockAluminium"); - } - ), - TITANIUM(GT_BranchDefinition.RAREMETAL, "Titanium", true, new Color(0xCC99FF), new Color(0xDBB8FF), + }), + TITANIUM( + GT_BranchDefinition.RAREMETAL, + "Titanium", + true, + new Color(0xCC99FF), + new Color(0xDBB8FF), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.TITANIUM), 0.15f); @@ -658,33 +802,45 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(REDSTONE, ALUMINIUM, 5); tMutation.requireResource(GregTech_API.sBlockMetal7, 9); - } - ), - GLOWSTONE(GT_BranchDefinition.RAREMETAL, "Glowstone", false, new Color(0xE5CA2A), new Color(0xFFBC5E), - beeSpecies -> { - beeSpecies.addSpecialty(Materials.Glowstone.getDust(1), 0.20f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setNocturnal(); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.NORMAL), - dis -> dis.registerMutation(REDSTONE, GOLD, 10) - ), - SUNNARIUM(GT_BranchDefinition.RAREMETAL, "Sunnarium", false, new Color(0xFFBC5E), new Color(0xE5CA2A), - beeSpecies -> { - beeSpecies.addProduct(Materials.Glowstone.getDust(1), 0.40f); - beeSpecies.addSpecialty(Materials.Sunnarium.getDust(1), 0.20f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setNocturnal(); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGEST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(GLOWSTONE, GOLD, 5); - tMutation.requireResource(GameRegistry.findBlock("gregtech", "gt.blockcasings"), 15); - } - ), - CHROME(GT_BranchDefinition.RAREMETAL, "Chrome", true, new Color(0xEBA1EB), new Color(0xF2C3F2), + }), + GLOWSTONE( + GT_BranchDefinition.RAREMETAL, + "Glowstone", + false, + new Color(0xE5CA2A), + new Color(0xFFBC5E), + beeSpecies -> { + beeSpecies.addSpecialty(Materials.Glowstone.getDust(1), 0.20f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + }, + template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.NORMAL), + dis -> dis.registerMutation(REDSTONE, GOLD, 10)), + SUNNARIUM( + GT_BranchDefinition.RAREMETAL, + "Sunnarium", + false, + new Color(0xFFBC5E), + new Color(0xE5CA2A), + beeSpecies -> { + beeSpecies.addProduct(Materials.Glowstone.getDust(1), 0.40f); + beeSpecies.addSpecialty(Materials.Sunnarium.getDust(1), 0.20f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + }, + template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGEST), + dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(GLOWSTONE, GOLD, 5); + tMutation.requireResource(GameRegistry.findBlock("gregtech", "gt.blockcasings"), 15); + }), + CHROME( + GT_BranchDefinition.RAREMETAL, + "Chrome", + true, + new Color(0xEBA1EB), + new Color(0xF2C3F2), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.CHROME), 0.15f); @@ -696,9 +852,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(TITANIUM, RUBY, 5); tMutation.requireResource(GregTech_API.sBlockMetal2, 3); - } - ), - MANGANESE(GT_BranchDefinition.RAREMETAL, "Manganese", true, new Color(0xD5D5D5), new Color(0xAAAAAA), + }), + MANGANESE( + GT_BranchDefinition.RAREMETAL, + "Manganese", + true, + new Color(0xD5D5D5), + new Color(0xAAAAAA), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.MANGANESE), 0.15f); @@ -710,9 +870,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(TITANIUM, ALUMINIUM, 5); tMutation.requireResource(GregTech_API.sBlockMetal4, 6); - } - ), - TUNGSTEN(GT_BranchDefinition.RAREMETAL, "Tungsten", false, new Color(0x5C5C8A), new Color(0x7D7DA1), + }), + TUNGSTEN( + GT_BranchDefinition.RAREMETAL, + "Tungsten", + false, + new Color(0x5C5C8A), + new Color(0x7D7DA1), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.TUNGSTEN), 0.15f); @@ -724,9 +888,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(FORESTRY, "Heroic"), MANGANESE, 5); tMutation.requireResource(GregTech_API.sBlockMetal7, 11); - } - ), - PLATINUM(GT_BranchDefinition.RAREMETAL, "Platinum", false, new Color(0xE6E6E6), new Color(0xFFFFCC), + }), + PLATINUM( + GT_BranchDefinition.RAREMETAL, + "Platinum", + false, + new Color(0xE6E6E6), + new Color(0xFFFFCC), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.PLATINUM), 0.30f); @@ -738,9 +906,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(DIAMOND, CHROME, 5); tMutation.requireResource("blockNickel"); - } - ), - IRIDIUM(GT_BranchDefinition.RAREMETAL, "Iridium", false, new Color(0xDADADA), new Color(0xD1D1E0), + }), + IRIDIUM( + GT_BranchDefinition.RAREMETAL, + "Iridium", + false, + new Color(0xDADADA), + new Color(0xD1D1E0), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.IRIDIUM), 0.30f); @@ -753,9 +925,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(TUNGSTEN, PLATINUM, 5); tMutation.requireResource(GregTech_API.sBlockMetal3, 12); - } - ), - OSMIUM(GT_BranchDefinition.RAREMETAL, "Osmium", false, new Color(0x2B2BDA), new Color(0x8B8B8B), + }), + OSMIUM( + GT_BranchDefinition.RAREMETAL, + "Osmium", + false, + new Color(0x2B2BDA), + new Color(0x8B8B8B), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.OSMIUM), 0.30f); @@ -768,9 +944,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(TUNGSTEN, PLATINUM, 5); tMutation.requireResource(GregTech_API.sBlockMetal5, 9); - } - ), - SALTY(GT_BranchDefinition.RAREMETAL, "Salt", true, new Color(0xF0C8C8), new Color(0xFAFAFA), + }), + SALTY( + GT_BranchDefinition.RAREMETAL, + "Salt", + true, + new Color(0xF0C8C8), + new Color(0xFAFAFA), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.SALT), 0.35f); @@ -782,9 +962,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(CLAY, ALUMINIUM, 5); tMutation.requireResource("blockSalt"); - } - ), - LITHIUM(GT_BranchDefinition.RAREMETAL, "Lithium", false, new Color(0xF0328C), new Color(0xE1DCFF), + }), + LITHIUM( + GT_BranchDefinition.RAREMETAL, + "Lithium", + false, + new Color(0xF0328C), + new Color(0xE1DCFF), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.LITHIUM), 0.15f); @@ -796,9 +980,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(SALTY, ALUMINIUM, 5); tMutation.requireResource("blockLithium"); - } - ), - ELECTROTINE(GT_BranchDefinition.RAREMETAL, "Electrotine", false, new Color(0x1E90FF), new Color(0x3CB4C8), + }), + ELECTROTINE( + GT_BranchDefinition.RAREMETAL, + "Electrotine", + false, + new Color(0x1E90FF), + new Color(0x3CB4C8), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ELECTROTINE), 0.15f); @@ -810,36 +998,48 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(REDSTONE, GOLD, 5); tMutation.requireResource("blockElectrotine"); - } - ), + }), // Sulfur bee, Humidity: normal, Temperature: Hot, Parents: PEAT & Ash, Mutationrate: 15%, Combrate: 80% - SULFUR(GT_BranchDefinition.RAREMETAL, "Electrotine", false, new Color(0x1E90FF), new Color(0x3CB4C8), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SULFUR), 0.70f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.FIRESTONE), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(HOT); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.NORMAL), - dis -> dis.registerMutation(ASH, PEAT, 15) - ), + SULFUR( + GT_BranchDefinition.RAREMETAL, + "Electrotine", + false, + new Color(0x1E90FF), + new Color(0x3CB4C8), + beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SULFUR), 0.70f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.FIRESTONE), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(HOT); + }, + template -> AlleleHelper.instance.set(template, SPEED, Speed.NORMAL), + dis -> dis.registerMutation(ASH, PEAT, 15)), - INDIUM(GT_BranchDefinition.RAREMETAL, "Electrotine", false, new Color(0xFFA9FF), new Color(0x8F5D99), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.INDIUM), 0.05f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(HOT); - }, - template -> AlleleHelper.instance.set(template, SPEED, Speed.FAST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(LEAD, OSMIUM, 3); - tMutation.requireResource("blockIndium"); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(39, "Venus"));//Venus Dim - } - ), + INDIUM( + GT_BranchDefinition.RAREMETAL, + "Electrotine", + false, + new Color(0xFFA9FF), + new Color(0x8F5D99), + beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.INDIUM), 0.05f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(HOT); + }, + template -> AlleleHelper.instance.set(template, SPEED, Speed.FAST), + dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(LEAD, OSMIUM, 3); + tMutation.requireResource("blockIndium"); + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(39, "Venus")); // Venus Dim + }), - //IC2 - COOLANT(GT_BranchDefinition.IC2, "Coolant", false, new Color(0x144F5A), new Color(0x2494A2), + // IC2 + COOLANT( + GT_BranchDefinition.IC2, + "Coolant", + false, + new Color(0x144F5A), + new Color(0x2494A2), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 4), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.COOLANT), 0.15f); @@ -856,12 +1056,20 @@ public enum GT_BeeDefinition implements IBeeDefinition { AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectGlacial); }, dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(FORESTRY, "Icy"), getSpecies(FORESTRY, "Glacial"), 10); - tMutation.requireResource(Block.getBlockFromItem(GT_ModHandler.getModItem("IC2", "fluidCoolant", 1).getItem()), 0); + IBeeMutationCustom tMutation = + dis.registerMutation(getSpecies(FORESTRY, "Icy"), getSpecies(FORESTRY, "Glacial"), 10); + tMutation.requireResource( + Block.getBlockFromItem(GT_ModHandler.getModItem("IC2", "fluidCoolant", 1) + .getItem()), + 0); tMutation.restrictTemperature(ICY); - } - ), - ENERGY(GT_BranchDefinition.IC2, "Energy", false, new Color(0xC11F1F), new Color(0xEBB9B9), + }), + ENERGY( + GT_BranchDefinition.IC2, + "Energy", + false, + new Color(0xC11F1F), + new Color(0xEBB9B9), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem("ExtraBees", "honeyComb", 1, 12), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ENERGY), 0.15f); @@ -879,12 +1087,21 @@ public enum GT_BeeDefinition implements IBeeDefinition { AlleleHelper.instance.set(template, FLOWERING, Flowering.AVERAGE); }, dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(FORESTRY, "Demonic"), getSpecies(EXTRABEES, "volcanic"), 10); - tMutation.requireResource(Block.getBlockFromItem(GT_ModHandler.getModItem("IC2", "fluidHotCoolant", 1).getItem()), 0); - tMutation.addMutationCondition(new GT_Bees.BiomeIDMutationCondition(128, "Boneyard Biome"));//Boneyard Biome - } - ), - LAPOTRON(GT_BranchDefinition.IC2, "Lapotron", false, new Color(0x6478FF), new Color(0x1414FF), + IBeeMutationCustom tMutation = + dis.registerMutation(getSpecies(FORESTRY, "Demonic"), getSpecies(EXTRABEES, "volcanic"), 10); + tMutation.requireResource( + Block.getBlockFromItem(GT_ModHandler.getModItem("IC2", "fluidHotCoolant", 1) + .getItem()), + 0); + tMutation.addMutationCondition( + new GT_Bees.BiomeIDMutationCondition(128, "Boneyard Biome")); // Boneyard Biome + }), + LAPOTRON( + GT_BranchDefinition.IC2, + "Lapotron", + false, + new Color(0x6478FF), + new Color(0x1414FF), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.LAPIS), 0.20f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ENERGY), 0.15f); @@ -906,10 +1123,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(LAPIS, ENERGY, 6); tMutation.requireResource("blockLapis"); tMutation.restrictTemperature(ICY); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(28, "Moon"));//moon dim - } - ), - PYROTHEUM(GT_BranchDefinition.IC2, "Pyrotheum", false, new Color(0xffebc4), new Color(0xe36400), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(28, "Moon")); // moon dim + }), + PYROTHEUM( + GT_BranchDefinition.IC2, + "Pyrotheum", + false, + new Color(0xffebc4), + new Color(0xe36400), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.ENERGY), 0.20f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.PYROTHEUM), 0.15f); @@ -929,9 +1150,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(REDSTONE, ENERGY, 4); tMutation.restrictTemperature(HELLISH); - } - ), - CRYOTHEUM(GT_BranchDefinition.IC2, "Cryotheum", false, new Color(0x2660ff), new Color(0x5af7ff), + }), + CRYOTHEUM( + GT_BranchDefinition.IC2, + "Cryotheum", + false, + new Color(0x2660ff), + new Color(0x5af7ff), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.COOLANT), 0.20f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.CRYOTHEUM), 0.15f); @@ -951,31 +1176,39 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(REDSTONE, COOLANT, 4); tMutation.restrictTemperature(ICY); - } - ), - Explosive(GT_BranchDefinition.IC2, "explosive", false, new Color(0x7E270F), new Color(0x747474), - beeSpecies -> { - beeSpecies.addProduct(GT_ModHandler.getIC2Item("industrialTnt", 1L), 0.5f); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HELLISH); - beeSpecies.setHasEffect(); - }, - template -> { - AlleleHelper.instance.set(template, SPEED, Speed.SLOWEST); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGEST); - AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectSnowing); - AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.NONE); - AlleleHelper.instance.set(template, NOCTURNAL, true); - AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.SNOW); - AlleleHelper.instance.set(template, FLOWERING, Flowering.AVERAGE); - }, - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(FIRESTONE, COAL, 4); - tMutation.requireResource("industrialTNT"); - } - ), - //Alloy - REDALLOY(GT_BranchDefinition.GTALLOY, "RedAlloy", false, new Color(0xE60000), new Color(0xB80000), + }), + Explosive( + GT_BranchDefinition.IC2, + "explosive", + false, + new Color(0x7E270F), + new Color(0x747474), + beeSpecies -> { + beeSpecies.addProduct(GT_ModHandler.getIC2Item("industrialTnt", 1L), 0.5f); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HELLISH); + beeSpecies.setHasEffect(); + }, + template -> { + AlleleHelper.instance.set(template, SPEED, Speed.SLOWEST); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGEST); + AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectSnowing); + AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.NONE); + AlleleHelper.instance.set(template, NOCTURNAL, true); + AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.SNOW); + AlleleHelper.instance.set(template, FLOWERING, Flowering.AVERAGE); + }, + dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(FIRESTONE, COAL, 4); + tMutation.requireResource("industrialTNT"); + }), + // Alloy + REDALLOY( + GT_BranchDefinition.GTALLOY, + "RedAlloy", + false, + new Color(0xE60000), + new Color(0xB80000), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 7), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.REDALLOY), 0.15f); @@ -989,9 +1222,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(COPPER, REDSTONE, 10); tMutation.requireResource("blockRedAlloy"); - } - ), - REDSTONEALLOY(GT_BranchDefinition.GTALLOY, "RedStoneAlloy", false, new Color(0xA50808), new Color(0xE80000), + }), + REDSTONEALLOY( + GT_BranchDefinition.GTALLOY, + "RedStoneAlloy", + false, + new Color(0xA50808), + new Color(0xE80000), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 7), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.REDSTONEALLOY), 0.15f); @@ -1005,9 +1242,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(REDSTONE, REDALLOY, 8); tMutation.requireResource("blockRedstoneAlloy"); - } - ), - CONDUCTIVEIRON(GT_BranchDefinition.GTALLOY, "ConductiveIron", false, new Color(0xCEADA3), new Color(0x817671), + }), + CONDUCTIVEIRON( + GT_BranchDefinition.GTALLOY, + "ConductiveIron", + false, + new Color(0xCEADA3), + new Color(0x817671), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 7), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.CONDUCTIVEIRON), 0.15f); @@ -1022,9 +1263,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(REDSTONEALLOY, IRON, 8); tMutation.requireResource("blockConductiveIron"); - } - ), - ENERGETICALLOY(GT_BranchDefinition.GTALLOY, "EnergeticAlloy", false, new Color(0xFF9933), new Color(0xFFAD5C), + }), + ENERGETICALLOY( + GT_BranchDefinition.GTALLOY, + "EnergeticAlloy", + false, + new Color(0xFF9933), + new Color(0xFFAD5C), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 7), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ENERGETICALLOY), 0.15f); @@ -1038,9 +1283,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(REDSTONEALLOY, getSpecies(FORESTRY, "Demonic"), 9); tMutation.requireResource("blockEnergeticAlloy"); - } - ), - VIBRANTALLOY(GT_BranchDefinition.GTALLOY, "VibrantAlloy", false, new Color(0x86A12D), new Color(0xC4F2AE), + }), + VIBRANTALLOY( + GT_BranchDefinition.GTALLOY, + "VibrantAlloy", + false, + new Color(0x86A12D), + new Color(0xC4F2AE), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 7), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.VIBRANTALLOY), 0.15f); @@ -1054,12 +1303,17 @@ public enum GT_BeeDefinition implements IBeeDefinition { AlleleHelper.instance.set(template, FLOWERING, Flowering.FAST); }, dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(ENERGETICALLOY, getSpecies(FORESTRY, "Phantasmal"), 6); + IBeeMutationCustom tMutation = + dis.registerMutation(ENERGETICALLOY, getSpecies(FORESTRY, "Phantasmal"), 6); tMutation.requireResource("blockVibrantAlloy"); tMutation.restrictTemperature(HOT, HELLISH); - } - ), - ELECTRICALSTEEL(GT_BranchDefinition.GTALLOY, "ElectricalSteel", false, new Color(0x787878), new Color(0xD8D8D8), + }), + ELECTRICALSTEEL( + GT_BranchDefinition.GTALLOY, + "ElectricalSteel", + false, + new Color(0x787878), + new Color(0xD8D8D8), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 7), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ELECTRICALSTEEL), 0.15f); @@ -1073,9 +1327,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(STEEL, getSpecies(FORESTRY, "Demonic"), 9); tMutation.requireResource("blockElectricalSteel"); - } - ), - DARKSTEEL(GT_BranchDefinition.GTALLOY, "DarkSteel", false, new Color(0x252525), new Color(0x443B44), + }), + DARKSTEEL( + GT_BranchDefinition.GTALLOY, + "DarkSteel", + false, + new Color(0x252525), + new Color(0x443B44), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 7), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.DARKSTEEL), 0.15f); @@ -1087,11 +1345,16 @@ public enum GT_BeeDefinition implements IBeeDefinition { AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); }, dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(ELECTRICALSTEEL, getSpecies(FORESTRY, "Demonic"), 7); + IBeeMutationCustom tMutation = + dis.registerMutation(ELECTRICALSTEEL, getSpecies(FORESTRY, "Demonic"), 7); tMutation.requireResource("blockDarkSteel"); - } - ), - PULSATINGIRON(GT_BranchDefinition.GTALLOY, "PulsatingIron", false, new Color(0x6DD284), new Color(0x006600), + }), + PULSATINGIRON( + GT_BranchDefinition.GTALLOY, + "PulsatingIron", + false, + new Color(0x6DD284), + new Color(0x006600), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 7), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.PULSATINGIRON), 0.15f); @@ -1105,9 +1368,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(REDALLOY, getSpecies(FORESTRY, "Ended"), 9); tMutation.requireResource("blockPulsatingIron"); - } - ), - STAINLESSSTEEL(GT_BranchDefinition.GTALLOY, "StainlessSteel", false, new Color(0xC8C8DC), new Color(0x778899), + }), + STAINLESSSTEEL( + GT_BranchDefinition.GTALLOY, + "StainlessSteel", + false, + new Color(0xC8C8DC), + new Color(0x778899), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STEEL), 0.10f); @@ -1124,9 +1391,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(CHROME, STEEL, 9); tMutation.requireResource("blockStainlessSteel"); - } - ), - ENDERIUM(GT_BranchDefinition.GTALLOY, "Enderium", false, new Color(0x599087), new Color(0x2E8B57), + }), + ENDERIUM( + GT_BranchDefinition.GTALLOY, + "Enderium", + false, + new Color(0x599087), + new Color(0x2E8B57), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ENDERIUM), 0.15f); @@ -1142,29 +1413,37 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(PLATINUM, getSpecies(FORESTRY, "Phantasmal"), 3); tMutation.requireResource("blockEnderium"); - } - ), - BEDROCKIUM(GT_BranchDefinition.GTALLOY, "Bedrockium", false, new Color(0x0C0C0C), new Color(0xC6C6C6), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.20f); - beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.BEDROCKIUM), 0.55f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(HOT); - }, - template -> { - AlleleHelper.instance.set(template, SPEED, Speed.SLOW); - AlleleHelper.instance.set(template, EFFECT, getEffect(EXTRABEES, "gravity")); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); - }, - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(Explosive, DIAMOND, 2); - if (Loader.isModLoaded("TwilightForest")) - tMutation.requireResource(GameRegistry.findBlock("ExtraUtilities", "block_bedrockium"), 0); - } - ), + }), + BEDROCKIUM( + GT_BranchDefinition.GTALLOY, + "Bedrockium", + false, + new Color(0x0C0C0C), + new Color(0xC6C6C6), + beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.20f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.BEDROCKIUM), 0.55f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(HOT); + }, + template -> { + AlleleHelper.instance.set(template, SPEED, Speed.SLOW); + AlleleHelper.instance.set(template, EFFECT, getEffect(EXTRABEES, "gravity")); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); + }, + dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(Explosive, DIAMOND, 2); + if (Loader.isModLoaded("TwilightForest")) + tMutation.requireResource(GameRegistry.findBlock("ExtraUtilities", "block_bedrockium"), 0); + }), - //thaumic - THAUMIUMDUST(GT_BranchDefinition.THAUMIC, "ThaumiumDust", true, new Color(0x7A007A), new Color(0x5C005C), + // thaumic + THAUMIUMDUST( + GT_BranchDefinition.THAUMIC, + "ThaumiumDust", + true, + new Color(0x7A007A), + new Color(0x5C005C), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 3), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.THAUMIUMDUST), 0.20f); @@ -1180,12 +1459,18 @@ public enum GT_BeeDefinition implements IBeeDefinition { AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.JUNGLE); }, dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(MAGICBEES, "TCFire"), getSpecies(FORESTRY, "Edenic"), 10); + IBeeMutationCustom tMutation = + dis.registerMutation(getSpecies(MAGICBEES, "TCFire"), getSpecies(FORESTRY, "Edenic"), 10); tMutation.requireResource("blockThaumium"); - tMutation.addMutationCondition(new GT_Bees.BiomeIDMutationCondition(192, "Magical Forest"));//magical forest - } - ), - THAUMIUMSHARD(GT_BranchDefinition.THAUMIC, "ThaumiumShard", true, new Color(0x9966FF), new Color(0xAD85FF), + tMutation.addMutationCondition( + new GT_Bees.BiomeIDMutationCondition(192, "Magical Forest")); // magical forest + }), + THAUMIUMSHARD( + GT_BranchDefinition.THAUMIC, + "ThaumiumShard", + true, + new Color(0x9966FF), + new Color(0xAD85FF), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.THAUMIUMDUST), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.THAUMIUMSHARD), 0.20f); @@ -1203,10 +1488,15 @@ public enum GT_BeeDefinition implements IBeeDefinition { }, dis -> { IBeeMutationCustom tMutation = dis.registerMutation(THAUMIUMDUST, getSpecies(MAGICBEES, "TCWater"), 10); - tMutation.addMutationCondition(new GT_Bees.BiomeIDMutationCondition(192, "Magical Forest"));//magical forest - } - ), - AMBER(GT_BranchDefinition.THAUMIC, "Amber", true, new Color(0xEE7700), new Color(0x774B15), + tMutation.addMutationCondition( + new GT_Bees.BiomeIDMutationCondition(192, "Magical Forest")); // magical forest + }), + AMBER( + GT_BranchDefinition.THAUMIC, + "Amber", + true, + new Color(0xEE7700), + new Color(0x774B15), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 3), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.AMBER), 0.20f); @@ -1222,9 +1512,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(THAUMIUMDUST, STICKYRESIN, 10); tMutation.requireResource("blockAmber"); - } - ), - QUICKSILVER(GT_BranchDefinition.THAUMIC, "Quicksilver", true, new Color(0x7A007A), new Color(0x5C005C), + }), + QUICKSILVER( + GT_BranchDefinition.THAUMIC, + "Quicksilver", + true, + new Color(0x7A007A), + new Color(0x5C005C), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 3), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.QUICKSILVER), 0.20f); @@ -1238,9 +1532,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.JUNGLE); AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectMiasmic); }, - dis -> dis.registerMutation(THAUMIUMDUST, SILVER, 10) - ), - SALISMUNDUS(GT_BranchDefinition.THAUMIC, "SalisMundus", true, new Color(0xF7ADDE), new Color(0x592582), + dis -> dis.registerMutation(THAUMIUMDUST, SILVER, 10)), + SALISMUNDUS( + GT_BranchDefinition.THAUMIC, + "SalisMundus", + true, + new Color(0xF7ADDE), + new Color(0x592582), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 3), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.SALISMUNDUS), 0.20f); @@ -1258,10 +1556,15 @@ public enum GT_BeeDefinition implements IBeeDefinition { }, dis -> { IBeeMutationCustom tMutation = dis.registerMutation(THAUMIUMDUST, THAUMIUMSHARD, 8); - tMutation.addMutationCondition(new GT_Bees.BiomeIDMutationCondition(192, "Magical Forest"));//magical forest - } - ), - TAINTED(GT_BranchDefinition.THAUMIC, "Tainted", true, new Color(0x904BB8), new Color(0xE800FF), + tMutation.addMutationCondition( + new GT_Bees.BiomeIDMutationCondition(192, "Magical Forest")); // magical forest + }), + TAINTED( + GT_BranchDefinition.THAUMIC, + "Tainted", + true, + new Color(0x904BB8), + new Color(0xE800FF), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 3), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.TAINTED), 0.20f); @@ -1281,10 +1584,15 @@ public enum GT_BeeDefinition implements IBeeDefinition { }, dis -> { IBeeMutationCustom tMutation = dis.registerMutation(THAUMIUMDUST, THAUMIUMSHARD, 7); - tMutation.addMutationCondition(new GT_Bees.BiomeIDMutationCondition(193, "Tainted Land"));//Tainted Land - } - ), - MITHRIL(GT_BranchDefinition.THAUMIC, "Mithril", true, new Color(0xF0E68C), new Color(0xFFFFD2), + tMutation.addMutationCondition( + new GT_Bees.BiomeIDMutationCondition(193, "Tainted Land")); // Tainted Land + }), + MITHRIL( + GT_BranchDefinition.THAUMIC, + "Mithril", + true, + new Color(0xF0E68C), + new Color(0xFFFFD2), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.PLATINUM), 0.20f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.MITHRIL), 0.125f); @@ -1306,11 +1614,15 @@ public enum GT_BeeDefinition implements IBeeDefinition { public void accept(GT_BeeDefinition dis) { IBeeMutationCustom tMutation = dis.registerMutation(IO, PLATINUM, 7); tMutation.requireResource(GregTech_API.sBlockMetal4, 10); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(36, "IO"));//IO Dim + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(36, "IO")); // IO Dim } - } - ), - ASTRALSILVER(GT_BranchDefinition.THAUMIC, "AstralSilver", true, new Color(0xAFEEEE), new Color(0xE6E6FF), + }), + ASTRALSILVER( + GT_BranchDefinition.THAUMIC, + "AstralSilver", + true, + new Color(0xAFEEEE), + new Color(0xE6E6FF), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SILVER), 0.20f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ASTRALSILVER), 0.125f); @@ -1330,9 +1642,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(SILVER, IRON, 3); tMutation.requireResource(GregTech_API.sBlockMetal1, 6); - } - ), - THAUMINITE(GT_BranchDefinition.THAUMIC, "Thauminite", true, new Color(0x2E2D79), new Color(0x7581E0), + }), + THAUMINITE( + GT_BranchDefinition.THAUMIC, + "Thauminite", + true, + new Color(0x2E2D79), + new Color(0x7581E0), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem("MagicBees", "comb", 1, 19), 0.20f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.THAUMINITE), 0.125f); @@ -1350,9 +1666,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(MAGICBEES, "TCOrder"), THAUMIUMDUST, 8); if (Loader.isModLoaded("thaumicbases")) tMutation.requireResource(GameRegistry.findBlock("thaumicbases", "thauminiteBlock"), 0); - } - ), - SHADOWMETAL(GT_BranchDefinition.THAUMIC, "ShadowMetal", true, new Color(0x100322), new Color(0x100342), + }), + SHADOWMETAL( + GT_BranchDefinition.THAUMIC, + "ShadowMetal", + true, + new Color(0x100322), + new Color(0x100342), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem("MagicBees", "comb", 1, 20), 0.20f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.SHADOWMETAL), 0.125f); @@ -1369,12 +1689,16 @@ public enum GT_BeeDefinition implements IBeeDefinition { AlleleHelper.instance.set(template, NOCTURNAL, true); }, dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(MAGICBEES, "TCChaos"), getSpecies(MAGICBEES, "TCVoid"), 6); - if (Loader.isModLoaded("TaintedMagic")) - tMutation.requireResource("blockShadow"); - } - ), - DIVIDED(GT_BranchDefinition.THAUMIC, "Unstable", true, new Color(0xF0F0F0), new Color(0xDCDCDC), + IBeeMutationCustom tMutation = + dis.registerMutation(getSpecies(MAGICBEES, "TCChaos"), getSpecies(MAGICBEES, "TCVoid"), 6); + if (Loader.isModLoaded("TaintedMagic")) tMutation.requireResource("blockShadow"); + }), + DIVIDED( + GT_BranchDefinition.THAUMIC, + "Unstable", + true, + new Color(0xF0F0F0), + new Color(0xDCDCDC), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem("ExtraBees", "honeyComb", 1, 61), 0.20f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.DIVIDED), 0.125f); @@ -1392,26 +1716,34 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(DIAMOND, IRON, 3); if (Loader.isModLoaded("ExtraUtilities")) tMutation.requireResource(GameRegistry.findBlock("ExtraUtilities", "decorativeBlock1"), 5); - } - ), - CAELESTIS(GT_BranchDefinition.THAUMIC, "Caelestis", true, new Color(0xF0F0F0), new Color(0xDCDCDC), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.CAELESTISRED), 0.60f); - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.CAELESTISBLUE), 0.60f); - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.CAELESTISGREEN), 0.60f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - beeSpecies.setHasEffect(); - }, - template -> { - AlleleHelper.instance.set(template, SPEED, Speed.SLOWER); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORT); - AlleleHelper.instance.set(template, FLOWERING, Flowering.SLOW); - AlleleHelper.instance.set(template, NOCTURNAL, true); - }, - dis -> dis.registerMutation(DIAMOND, DIVIDED, 10) - ), - SPARKELING(GT_BranchDefinition.THAUMIC, "NetherStar", true, new Color(0x7A007A), new Color(0xFFFFFF), + }), + CAELESTIS( + GT_BranchDefinition.THAUMIC, + "Caelestis", + true, + new Color(0xF0F0F0), + new Color(0xDCDCDC), + beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.CAELESTISRED), 0.60f); + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.CAELESTISBLUE), 0.60f); + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.CAELESTISGREEN), 0.60f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + beeSpecies.setHasEffect(); + }, + template -> { + AlleleHelper.instance.set(template, SPEED, Speed.SLOWER); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORT); + AlleleHelper.instance.set(template, FLOWERING, Flowering.SLOW); + AlleleHelper.instance.set(template, NOCTURNAL, true); + }, + dis -> dis.registerMutation(DIAMOND, DIVIDED, 10)), + SPARKELING( + GT_BranchDefinition.THAUMIC, + "NetherStar", + true, + new Color(0x7A007A), + new Color(0xFFFFFF), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem("MagicBees", "miscResources", 1, 3), 0.20f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.SPARKELING), 0.125f); @@ -1428,33 +1760,42 @@ public enum GT_BeeDefinition implements IBeeDefinition { AlleleHelper.instance.set(template, FLOWERING, Flowering.AVERAGE); }, dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(MAGICBEES, "Withering"), getSpecies(MAGICBEES, "Draconic"), 1); + IBeeMutationCustom tMutation = + dis.registerMutation(getSpecies(MAGICBEES, "Withering"), getSpecies(MAGICBEES, "Draconic"), 1); tMutation.requireResource(GregTech_API.sBlockGem3, 3); - tMutation.addMutationCondition(new GT_Bees.BiomeIDMutationCondition(9, "END Biome"));//sky end biome - } - ), + tMutation.addMutationCondition(new GT_Bees.BiomeIDMutationCondition(9, "END Biome")); // sky end biome + }), - ESSENTIA(GT_BranchDefinition.THAUMIC, "Essentia", true, new Color(0x7A007A), new Color(0xFFFFFF), - beeSpecies -> { - beeSpecies.addProduct(GT_ModHandler.getModItem("MagicBees", "miscResources", 1, 3), 0.20f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - }, - template -> { - AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.DOWN_2); - AlleleHelper.instance.set(template, CAVE_DWELLING, true); - AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.VANILLA); - AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectReanimation); - }, - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(SHADOWMETAL, SPARKELING, 5); - if (Loader.isModLoaded("Thaumcraft")) - tMutation.requireResource(GameRegistry.findBlock("Thaumcraft", "blockCrystal"), 6); - } - ), + ESSENTIA( + GT_BranchDefinition.THAUMIC, + "Essentia", + true, + new Color(0x7A007A), + new Color(0xFFFFFF), + beeSpecies -> { + beeSpecies.addProduct(GT_ModHandler.getModItem("MagicBees", "miscResources", 1, 3), 0.20f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + }, + template -> { + AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.DOWN_2); + AlleleHelper.instance.set(template, CAVE_DWELLING, true); + AlleleHelper.instance.set(template, FLOWER_PROVIDER, Flowers.VANILLA); + AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectReanimation); + }, + dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(SHADOWMETAL, SPARKELING, 5); + if (Loader.isModLoaded("Thaumcraft")) + tMutation.requireResource(GameRegistry.findBlock("Thaumcraft", "blockCrystal"), 6); + }), - //radioctive - URANIUM(GT_BranchDefinition.RADIOACTIVE, "Uranium", true, new Color(0x19AF19), new Color(0x169E16), + // radioctive + URANIUM( + GT_BranchDefinition.RADIOACTIVE, + "Uranium", + true, + new Color(0x19AF19), + new Color(0x169E16), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.URANIUM), 0.15f); @@ -1469,9 +1810,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(FORESTRY, "Avenging"), PLATINUM, 3); tMutation.requireResource(GregTech_API.sBlockMetal7, 14); - } - ), - PLUTONIUM(GT_BranchDefinition.RADIOACTIVE, "Plutonium", true, new Color(0x570000), new Color(0x240000), + }), + PLUTONIUM( + GT_BranchDefinition.RADIOACTIVE, + "Plutonium", + true, + new Color(0x570000), + new Color(0x240000), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.LEAD), 0.15f); @@ -1487,9 +1832,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(URANIUM, EMERALD, 3); tMutation.requireResource(GregTech_API.sBlockMetal5, 13); - } - ), - NAQUADAH(GT_BranchDefinition.RADIOACTIVE, "Naquadah", false, new Color(0x003300), new Color(0x002400), + }), + NAQUADAH( + GT_BranchDefinition.RADIOACTIVE, + "Naquadah", + false, + new Color(0x003300), + new Color(0x002400), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.NAQUADAH), 0.15f); @@ -1505,9 +1854,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(PLUTONIUM, IRIDIUM, 3); tMutation.requireResource(GregTech_API.sBlockMetal4, 12); - } - ), - NAQUADRIA(GT_BranchDefinition.RADIOACTIVE, "Naquadria", false, new Color(0x000000), new Color(0x002400), + }), + NAQUADRIA( + GT_BranchDefinition.RADIOACTIVE, + "Naquadria", + false, + new Color(0x000000), + new Color(0x002400), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.NAQUADAH), 0.20f); @@ -1524,16 +1877,19 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(PLUTONIUM, IRIDIUM, 8, 10); tMutation.requireResource(GregTech_API.sBlockMetal4, 15); - } - ), - DOB(GT_BranchDefinition.RADIOACTIVE, "DOB", false, new Color(0x003300), new Color(0x002400), + }), + DOB( + GT_BranchDefinition.RADIOACTIVE, + "DOB", + false, + new Color(0x003300), + new Color(0x002400), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.DOB), 0.75f); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(EnumTemperature.NORMAL); beeSpecies.setNocturnal(); beeSpecies.setHasEffect(); - }, template -> { AlleleHelper.instance.set(template, SPEED, Speed.FAST); @@ -1543,10 +1899,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(NAQUADAH, THAUMIUMSHARD, 2); if (Loader.isModLoaded("AdvancedSolarPanel")) tMutation.requireResource(GameRegistry.findBlock("AdvancedSolarPanel", "BlockAdvSolarPanel"), 2); - tMutation.addMutationCondition(new GT_Bees.BiomeIDMutationCondition(9, "END Biome"));//sky end biome - } - ), - THORIUM(GT_BranchDefinition.RADIOACTIVE, "Thorium", false, new Color(0x005000), new Color(0x001E00), + tMutation.addMutationCondition(new GT_Bees.BiomeIDMutationCondition(9, "END Biome")); // sky end biome + }), + THORIUM( + GT_BranchDefinition.RADIOACTIVE, + "Thorium", + false, + new Color(0x005000), + new Color(0x001E00), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.THORIUM), 0.75f); beeSpecies.setHumidity(EnumHumidity.NORMAL); @@ -1558,11 +1918,16 @@ public enum GT_BeeDefinition implements IBeeDefinition { AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGEST); }, dis -> { - IMutationCustom tMutation = dis.registerMutation(COAL, URANIUM, 3).setIsSecret(); + IMutationCustom tMutation = + dis.registerMutation(COAL, URANIUM, 3).setIsSecret(); tMutation.requireResource(GregTech_API.sBlockMetal7, 5); - } - ), - LUTETIUM(GT_BranchDefinition.RADIOACTIVE, "Lutetium", false, new Color(0xE6FFE6), new Color(0xFFFFFF), + }), + LUTETIUM( + GT_BranchDefinition.RADIOACTIVE, + "Lutetium", + false, + new Color(0xE6FFE6), + new Color(0xFFFFFF), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.LUTETIUM), 0.15f); beeSpecies.setHumidity(EnumHumidity.NORMAL); @@ -1575,11 +1940,16 @@ public enum GT_BeeDefinition implements IBeeDefinition { AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGEST); }, dis -> { - IMutationCustom tMutation = dis.registerMutation(THORIUM, getSpecies(EXTRABEES, "rotten"), 1).setIsSecret(); + IMutationCustom tMutation = dis.registerMutation(THORIUM, getSpecies(EXTRABEES, "rotten"), 1) + .setIsSecret(); tMutation.requireResource(GregTech_API.sBlockMetal4, 3); - } - ), - AMERICIUM(GT_BranchDefinition.RADIOACTIVE, "Americium", false, new Color(0xE6E6FF), new Color(0xC8C8C8), + }), + AMERICIUM( + GT_BranchDefinition.RADIOACTIVE, + "Americium", + false, + new Color(0xE6E6FF), + new Color(0xC8C8C8), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.AMERICIUM), 0.05f); beeSpecies.setHumidity(EnumHumidity.NORMAL); @@ -1592,11 +1962,16 @@ public enum GT_BeeDefinition implements IBeeDefinition { AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGEST); }, dis -> { - IMutationCustom tMutation = dis.registerMutation(LUTETIUM, CHROME, 5, 4).setIsSecret(); + IMutationCustom tMutation = + dis.registerMutation(LUTETIUM, CHROME, 5, 4).setIsSecret(); tMutation.requireResource(GregTech_API.sBlockMetal1, 2); - } - ), - NEUTRONIUM(GT_BranchDefinition.RADIOACTIVE, "Neutronium", false, new Color(0xFFF0F0), new Color(0xFAFAFA), + }), + NEUTRONIUM( + GT_BranchDefinition.RADIOACTIVE, + "Neutronium", + false, + new Color(0xFFF0F0), + new Color(0xFAFAFA), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.NEUTRONIUM), 0.02f); beeSpecies.setHumidity(DAMP); @@ -1609,12 +1984,17 @@ public enum GT_BeeDefinition implements IBeeDefinition { AlleleHelper.instance.set(template, NOCTURNAL, true); }, dis -> { - IMutationCustom tMutation = dis.registerMutation(NAQUADRIA, AMERICIUM, 2, 2).setIsSecret(); + IMutationCustom tMutation = + dis.registerMutation(NAQUADRIA, AMERICIUM, 2, 2).setIsSecret(); tMutation.requireResource(GregTech_API.sBlockMetal5, 2); - } - ), - //Twilight - NAGA(GT_BranchDefinition.TWILIGHT, "Naga", true, new Color(0x0D5A0D), new Color(0x28874B), + }), + // Twilight + NAGA( + GT_BranchDefinition.TWILIGHT, + "Naga", + true, + new Color(0x0D5A0D), + new Color(0x28874B), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SALISMUNDUS), 0.02f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.NAGA), 0.10f); @@ -1627,11 +2007,16 @@ public enum GT_BeeDefinition implements IBeeDefinition { AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST); }, dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(MAGICBEES, "Eldritch"), getSpecies(FORESTRY, "Imperial"), 8); + IBeeMutationCustom tMutation = + dis.registerMutation(getSpecies(MAGICBEES, "Eldritch"), getSpecies(FORESTRY, "Imperial"), 8); tMutation.restrictHumidity(DAMP); - } - ), - LICH(GT_BranchDefinition.TWILIGHT, "Lich", true, new Color(0xC5C5C5), new Color(0x5C605E), + }), + LICH( + GT_BranchDefinition.TWILIGHT, + "Lich", + true, + new Color(0xC5C5C5), + new Color(0x5C605E), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SALISMUNDUS), 0.04f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.LICH), 0.10f); @@ -1646,9 +2031,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(MAGICBEES, "Supernatural"), NAGA, 7); tMutation.restrictHumidity(ARID); - } - ), - HYDRA(GT_BranchDefinition.TWILIGHT, "Hydra", true, new Color(0x872836), new Color(0xB8132C), + }), + HYDRA( + GT_BranchDefinition.TWILIGHT, + "Hydra", + true, + new Color(0x872836), + new Color(0xB8132C), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SALISMUNDUS), 0.06f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.HYDRA), 0.10f); @@ -1662,10 +2051,15 @@ public enum GT_BeeDefinition implements IBeeDefinition { }, dis -> { IBeeMutationCustom tMutation = dis.registerMutation(LICH, getSpecies(MAGICBEES, "TCFire"), 6); - tMutation.addMutationCondition(new GT_Bees.BiomeIDMutationCondition(138, "Undergarden"));//undergarden biome - } - ), - URGHAST(GT_BranchDefinition.TWILIGHT, "UrGhast", true, new Color(0xA7041C), new Color(0x7C0618), + tMutation.addMutationCondition( + new GT_Bees.BiomeIDMutationCondition(138, "Undergarden")); // undergarden biome + }), + URGHAST( + GT_BranchDefinition.TWILIGHT, + "UrGhast", + true, + new Color(0xA7041C), + new Color(0x7C0618), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SALISMUNDUS), 0.08f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.URGHAST), 0.10f); @@ -1683,9 +2077,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { if (Loader.isModLoaded("Thaumcraft")) tMutation.requireResource(GameRegistry.findBlock("Thaumcraft", "blockCosmeticSolid"), 4); tMutation.restrictTemperature(HELLISH); - } - ), - SNOWQUEEN(GT_BranchDefinition.TWILIGHT, "SnowQueen", true, new Color(0xD02001), new Color(0x9C0018), + }), + SNOWQUEEN( + GT_BranchDefinition.TWILIGHT, + "SnowQueen", + true, + new Color(0xD02001), + new Color(0x9C0018), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SALISMUNDUS), 0.15f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.SNOWQUEEN), 0.10f); @@ -1694,17 +2092,20 @@ public enum GT_BeeDefinition implements IBeeDefinition { beeSpecies.setHasEffect(); beeSpecies.setNocturnal(); }, - template -> { - }, + template -> {}, dis -> { IBeeMutationCustom tMutation = dis.registerMutation(URGHAST, SALISMUNDUS, 4); if (Loader.isModLoaded("thaumicbases")) tMutation.requireResource(GameRegistry.findBlock("thaumicbases", "blockSalisMundus"), 0); tMutation.restrictTemperature(ICY); - } - ), - //HEE - ENDDUST(GT_BranchDefinition.HEE, "End Dust", true, new Color(0xCC00FA), new Color(0x003A7D), + }), + // HEE + ENDDUST( + GT_BranchDefinition.HEE, + "End Dust", + true, + new Color(0xCC00FA), + new Color(0x003A7D), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 8), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ENDDUST), 0.10f); @@ -1719,12 +2120,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { tMutation.restrictHumidity(ARID); if (Loader.isModLoaded("HardcoreEnderExpansion")) tMutation.requireResource(GameRegistry.findBlock("HardcoreEnderExpansion", "end_powder_ore"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(1, "End"));//End Dim - - - } - ), - ENDIUM(GT_BranchDefinition.HEE, "Endium", true, new Color(0xa0ffff), new Color(0x2F5A6C), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(1, "End")); // End Dim + }), + ENDIUM( + GT_BranchDefinition.HEE, + "Endium", + true, + new Color(0xa0ffff), + new Color(0x2F5A6C), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 8), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ENDIUM), 0.10f); @@ -1738,12 +2141,15 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(FORESTRY, "Ended"), THAUMIUMDUST, 8); tMutation.restrictHumidity(ARID); - if (Loader.isModLoaded("HardcoreEnderExpansion")) - tMutation.requireResource("blockHeeEndium"); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(1, "End"));//End Dim - } - ), - STARDUST(GT_BranchDefinition.HEE, "Star Dust", true, new Color(0xffff00), new Color(0xDCBE13), + if (Loader.isModLoaded("HardcoreEnderExpansion")) tMutation.requireResource("blockHeeEndium"); + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(1, "End")); // End Dim + }), + STARDUST( + GT_BranchDefinition.HEE, + "Star Dust", + true, + new Color(0xffff00), + new Color(0xDCBE13), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 8), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.STARDUST), 0.10f); @@ -1761,10 +2167,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { tMutation.restrictHumidity(ARID); if (Loader.isModLoaded("HardcoreEnderExpansion")) tMutation.requireResource(GameRegistry.findBlock("HardcoreEnderExpansion", "stardust_ore"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(1, "End"));//End Dim - } - ), - ECTOPLASMA(GT_BranchDefinition.HEE, "Ectoplasma", true, new Color(0xDCB0E5), new Color(0x381C40), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(1, "End")); // End Dim + }), + ECTOPLASMA( + GT_BranchDefinition.HEE, + "Ectoplasma", + true, + new Color(0xDCB0E5), + new Color(0x381C40), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 8), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ECTOPLASMA), 0.10f); @@ -1782,12 +2192,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { tMutation.restrictHumidity(ARID); if (Loader.isModLoaded("HardcoreEnderExpansion")) tMutation.requireResource(GameRegistry.findBlock("HardcoreEnderExpansion", "spooky_log"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(1, "End"));//End Dim - - - } - ), - ARCANESHARDS(GT_BranchDefinition.HEE, "Arcane Shards", true, new Color(0x9010AD), new Color(0x333D82), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(1, "End")); // End Dim + }), + ARCANESHARDS( + GT_BranchDefinition.HEE, + "Arcane Shards", + true, + new Color(0x9010AD), + new Color(0x333D82), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 8), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ARCANESHARD), 0.10f); @@ -1799,17 +2211,20 @@ public enum GT_BeeDefinition implements IBeeDefinition { AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONG); AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.BOTH_1); AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.BOTH_1); - }, dis -> { IBeeMutationCustom tMutation = dis.registerMutation(THAUMIUMSHARD, ENDDUST, 5); tMutation.restrictHumidity(ARID); if (Loader.isModLoaded("HardcoreEnderExpansion")) tMutation.requireResource(GameRegistry.findBlock("HardcoreEnderExpansion", "laboratory_floor"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(1, "End"));//End Dim - } - ), - DRAGONESSENCE(GT_BranchDefinition.HEE, "Dragonessence", true, new Color(0xFFA12B), new Color(0x911ECE), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(1, "End")); // End Dim + }), + DRAGONESSENCE( + GT_BranchDefinition.HEE, + "Dragonessence", + true, + new Color(0xFFA12B), + new Color(0x911ECE), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 8), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.DRAGONESSENCE), 0.10f); @@ -1828,10 +2243,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { tMutation.restrictHumidity(ARID); if (Loader.isModLoaded("HardcoreEnderExpansion")) tMutation.requireResource(GameRegistry.findBlock("HardcoreEnderExpansion", "essence_altar"), 1); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(1, "End"));//End Dim - } - ), - FIREESSENCE(GT_BranchDefinition.HEE, "Fireessence", true, new Color(0xD41238), new Color(0xFFA157), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(1, "End")); // End Dim + }), + FIREESSENCE( + GT_BranchDefinition.HEE, + "Fireessence", + true, + new Color(0xD41238), + new Color(0xFFA157), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 8), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.FIREESSENSE), 0.10f); @@ -1850,10 +2269,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { tMutation.restrictHumidity(ARID); if (Loader.isModLoaded("HardcoreEnderExpansion")) tMutation.requireResource(GameRegistry.findBlock("HardcoreEnderExpansion", "essence_altar"), 2); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(1, "End"));//End Dim - } - ), - ENDERMANHEAD(GT_BranchDefinition.HEE, "Enderman", true, new Color(0x161616), new Color(0x6200e7), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(1, "End")); // End Dim + }), + ENDERMANHEAD( + GT_BranchDefinition.HEE, + "Enderman", + true, + new Color(0x161616), + new Color(0x6200e7), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 8), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ENDERMAN), 0.10f); @@ -1872,10 +2295,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { tMutation.restrictHumidity(ARID); if (Loader.isModLoaded("HardcoreEnderExpansion")) tMutation.requireResource(GameRegistry.findBlock("HardcoreEnderExpansion", "ender_goo"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(1, "End"));//End Dim - } - ), - SILVERFISH(GT_BranchDefinition.HEE, "Silverfisch", true, new Color(0xEE053D), new Color(0x000000), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(1, "End")); // End Dim + }), + SILVERFISH( + GT_BranchDefinition.HEE, + "Silverfisch", + true, + new Color(0xEE053D), + new Color(0x000000), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 8), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.SILVERFISH), 0.10f); @@ -1894,10 +2321,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { tMutation.restrictHumidity(ARID); if (Loader.isModLoaded("HardcoreEnderExpansion")) tMutation.requireResource(GameRegistry.findBlock("HardcoreEnderExpansion", "ender_goo"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(1, "End"));//End Dim - } - ), - RUNE(GT_BranchDefinition.HEE, "Rune", true, new Color(0xE31010), new Color(0x0104D9), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(1, "End")); // End Dim + }), + RUNE( + GT_BranchDefinition.HEE, + "Rune", + true, + new Color(0xE31010), + new Color(0x0104D9), beeSpecies -> { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 8), 0.30f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.RUNEI), 0.025f); @@ -1911,54 +2342,66 @@ public enum GT_BeeDefinition implements IBeeDefinition { AlleleHelper.instance.set(template, EFFECT, getEffect(MAGICBEES, "SlowSpeed")); AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.NONE); AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.NONE); - }, dis -> { - IMutationCustom tMutation = dis.registerMutation(DRAGONESSENCE, STARDUST, 2).setIsSecret(); + IMutationCustom tMutation = + dis.registerMutation(DRAGONESSENCE, STARDUST, 2).setIsSecret(); tMutation.restrictHumidity(ARID); if (Loader.isModLoaded("EnderStorage")) tMutation.requireResource(GameRegistry.findBlock("EnderStorage", "enderChest"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(1, "End"));//End Dim - } - ), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(1, "End")); // End Dim + }), // Walrus Bee, 100% Combchance, Parents: Catty and Watery - WALRUS(GT_BranchDefinition.PLANET, "Walrus", true, new Color(0xD6D580), new Color(0xB5CFC9), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.WALRUS), 1.00f); - beeSpecies.setHumidity(DAMP); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - beeSpecies.setHasEffect(); - }, - template -> { - AlleleHelper.instance.set(template, SPEED, Speed.FASTEST); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGER); - AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.BOTH_1); - AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.BOTH_1); - AlleleHelper.instance.set(template, NOCTURNAL, true); - }, - - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(MAGICBEES, "Watery"), getSpecies(MAGICBEES, "Catty"), 45, 2); - if (Loader.isModLoaded("extracells")) - tMutation.requireResource(GameRegistry.findBlock("extracells", "walrus"), 0); - } - ), - //Space Bees - SPACE(GT_BranchDefinition.SPACE, "Space", true, new Color(0x003366), new Color(0xC0C0C0), + WALRUS( + GT_BranchDefinition.PLANET, + "Walrus", + true, + new Color(0xD6D580), + new Color(0xB5CFC9), + beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.WALRUS), 1.00f); + beeSpecies.setHumidity(DAMP); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + beeSpecies.setHasEffect(); + }, + template -> { + AlleleHelper.instance.set(template, SPEED, Speed.FASTEST); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGER); + AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.BOTH_1); + AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.BOTH_1); + AlleleHelper.instance.set(template, NOCTURNAL, true); + }, + dis -> { + IBeeMutationCustom tMutation = + dis.registerMutation(getSpecies(MAGICBEES, "Watery"), getSpecies(MAGICBEES, "Catty"), 45, 2); + if (Loader.isModLoaded("extracells")) + tMutation.requireResource(GameRegistry.findBlock("extracells", "walrus"), 0); + }), + // Space Bees + SPACE( + GT_BranchDefinition.SPACE, + "Space", + true, + new Color(0x003366), + new Color(0xC0C0C0), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SPACE), 0.02f); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(ICY); beeSpecies.setNocturnal(); }, - template -> { - }, + template -> {}, dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(FORESTRY, "Industrious"), getSpecies(FORESTRY, "Heroic"), 10); + IBeeMutationCustom tMutation = + dis.registerMutation(getSpecies(FORESTRY, "Industrious"), getSpecies(FORESTRY, "Heroic"), 10); tMutation.restrictTemperature(ICY); - } - ), - METEORICIRON(GT_BranchDefinition.SPACE, "MeteoricIron", true, new Color(0x321928), new Color(0x643250), + }), + METEORICIRON( + GT_BranchDefinition.SPACE, + "MeteoricIron", + true, + new Color(0x321928), + new Color(0x643250), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SPACE), 0.04f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.METEORICIRON), 0.10f); @@ -1966,15 +2409,18 @@ public enum GT_BeeDefinition implements IBeeDefinition { beeSpecies.setTemperature(HOT); beeSpecies.setNocturnal(); }, - template -> { - }, + template -> {}, dis -> { IBeeMutationCustom tMutation = dis.registerMutation(SPACE, IRON, 9); tMutation.requireResource(GregTech_API.sBlockMetal4, 7); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(28, "Moon"));//Moon Dim - } - ), - DESH(GT_BranchDefinition.SPACE, "Desh", false, new Color(0x323232), new Color(0x282828), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(28, "Moon")); // Moon Dim + }), + DESH( + GT_BranchDefinition.SPACE, + "Desh", + false, + new Color(0x323232), + new Color(0x282828), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SPACE), 0.06f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.DESH), 0.10f); @@ -1988,11 +2434,15 @@ public enum GT_BeeDefinition implements IBeeDefinition { public void accept(GT_BeeDefinition dis) { IBeeMutationCustom tMutation = dis.registerMutation(MARS, TITANIUM, 9); tMutation.requireResource(GregTech_API.sBlockMetal2, 12); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(29, "Mars"));//Mars Dim + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(29, "Mars")); // Mars Dim } - } - ), - LEDOX(GT_BranchDefinition.SPACE, "Ledox", false, new Color(0x0000CD), new Color(0x0074FF), + }), + LEDOX( + GT_BranchDefinition.SPACE, + "Ledox", + false, + new Color(0x0000CD), + new Color(0x0074FF), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SPACE), 0.10f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.LEDOX), 0.10f); @@ -2007,11 +2457,15 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(CALLISTO, LEAD, 7); if (Loader.isModLoaded(MOD_ID_DC)) tMutation.requireResource(GameRegistry.findBlock(MOD_ID_DC, "tile.Ledox"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(35, "Europa"));//Europa Dim + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(35, "Europa")); // Europa Dim } - } - ), - CALLISTOICE(GT_BranchDefinition.SPACE, "CallistoIce", false, new Color(0x0074FF), new Color(0x1EB1FF), + }), + CALLISTOICE( + GT_BranchDefinition.SPACE, + "CallistoIce", + false, + new Color(0x0074FF), + new Color(0x1EB1FF), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SPACE), 0.10f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.CALLISTOICE), 0.10f); @@ -2026,11 +2480,16 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(CALLISTO, getSpecies(EXTRABEES, "freezing"), 7); if (Loader.isModLoaded(MOD_ID_DC)) tMutation.requireResource(GameRegistry.findBlock(MOD_ID_DC, "tile.CallistoColdIce"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(45, "Callisto"));//Callisto Dim + tMutation.addMutationCondition( + new GT_Bees.DimensionMutationCondition(45, "Callisto")); // Callisto Dim } - } - ), - MYTRYL(GT_BranchDefinition.SPACE, "Mytryl", false, new Color(0xDAA520), new Color(0xF26404), + }), + MYTRYL( + GT_BranchDefinition.SPACE, + "Mytryl", + false, + new Color(0xDAA520), + new Color(0xF26404), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SPACE), 0.16f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.MYTRYL), 0.10f); @@ -2039,19 +2498,22 @@ public enum GT_BeeDefinition implements IBeeDefinition { beeSpecies.setNocturnal(); beeSpecies.setHasEffect(); }, - template -> { - }, + template -> {}, new Consumer<GT_BeeDefinition>() { @Override public void accept(GT_BeeDefinition dis) { IBeeMutationCustom tMutation = dis.registerMutation(IO, MITHRIL, 6); if (Loader.isModLoaded(MOD_ID_DC)) tMutation.requireResource(GameRegistry.findBlock(MOD_ID_DC, "tile.Mytryl"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(36, "IO"));//IO Dim + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(36, "IO")); // IO Dim } - } - ), - QUANTIUM(GT_BranchDefinition.SPACE, "Quantium", false, new Color(0x00FF00), new Color(0x00D10B), + }), + QUANTIUM( + GT_BranchDefinition.SPACE, + "Quantium", + false, + new Color(0x00FF00), + new Color(0x00D10B), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SPACE), 0.16f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.QUANTIUM), 0.10f); @@ -2060,19 +2522,22 @@ public enum GT_BeeDefinition implements IBeeDefinition { beeSpecies.setNocturnal(); beeSpecies.setHasEffect(); }, - template -> { - }, + template -> {}, new Consumer<GT_BeeDefinition>() { @Override public void accept(GT_BeeDefinition dis) { IBeeMutationCustom tMutation = dis.registerMutation(VENUS, OSMIUM, 6); if (Loader.isModLoaded(MOD_ID_DC)) tMutation.requireResource(GameRegistry.findBlock(MOD_ID_DC, "tile.Quantinum"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(39, "Venus"));//Venus Dim + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(39, "Venus")); // Venus Dim } - } - ), - ORIHARUKON(GT_BranchDefinition.SPACE, "Oriharukon", false, new Color(0x228B22), new Color(0x677D68), + }), + ORIHARUKON( + GT_BranchDefinition.SPACE, + "Oriharukon", + false, + new Color(0x228B22), + new Color(0x677D68), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SPACE), 0.26f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ORIHARUKON), 0.10f); @@ -2080,19 +2545,22 @@ public enum GT_BeeDefinition implements IBeeDefinition { beeSpecies.setTemperature(COLD); beeSpecies.setHasEffect(); }, - template -> { - }, + template -> {}, new Consumer<GT_BeeDefinition>() { @Override public void accept(GT_BeeDefinition dis) { IBeeMutationCustom tMutation = dis.registerMutation(LEAD, OBERON, 5); if (Loader.isModLoaded("GalaxySpace")) tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "metalsblock"), 6); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(46, "Oberon"));//Oberon Dim + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(46, "Oberon")); // Oberon Dim } - } - ), - MYSTERIOUSCRYSTAL(GT_BranchDefinition.SPACE, "MysteriousCrystal", false, new Color(0x3CB371), new Color(0x16856C), + }), + MYSTERIOUSCRYSTAL( + GT_BranchDefinition.SPACE, + "MysteriousCrystal", + false, + new Color(0x3CB371), + new Color(0x16856C), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SPACE), 0.42f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.MYSTERIOUSCRYSTAL), 0.30f); @@ -2101,19 +2569,23 @@ public enum GT_BeeDefinition implements IBeeDefinition { beeSpecies.setNocturnal(); beeSpecies.setHasEffect(); }, - template -> { - }, + template -> {}, new Consumer<GT_BeeDefinition>() { @Override public void accept(GT_BeeDefinition dis) { IBeeMutationCustom tMutation = dis.registerMutation(ENCELADUS, EMERALD, 3); if (Loader.isModLoaded(MOD_ID_DC)) tMutation.requireResource(GameRegistry.findBlock(MOD_ID_DC, "tile.MysteriousCrystal"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(41, "Enceladus"));//Enceladus Dim + tMutation.addMutationCondition( + new GT_Bees.DimensionMutationCondition(41, "Enceladus")); // Enceladus Dim } - } - ), - BLACKPLUTONIUM(GT_BranchDefinition.SPACE, "BlackPlutonium", false, new Color(0x000000), new Color(0x323232), + }), + BLACKPLUTONIUM( + GT_BranchDefinition.SPACE, + "BlackPlutonium", + false, + new Color(0x000000), + new Color(0x323232), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SPACE), 0.68f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.BLACKPLUTONIUM), 0.10f); @@ -2122,19 +2594,22 @@ public enum GT_BeeDefinition implements IBeeDefinition { beeSpecies.setNocturnal(); beeSpecies.setHasEffect(); }, - template -> { - }, + template -> {}, new Consumer<GT_BeeDefinition>() { @Override public void accept(GT_BeeDefinition dis) { IBeeMutationCustom tMutation = dis.registerMutation(PLUTO, PLUTONIUM, 2); if (Loader.isModLoaded(MOD_ID_DC)) tMutation.requireResource(GameRegistry.findBlock(MOD_ID_DC, "tile.BlackPlutonium"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(49, "Pluto"));//Pluto Dim + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(49, "Pluto")); // Pluto Dim } - } - ), - TRINIUM(GT_BranchDefinition.SPACE, "Trinium", false, new Color(0xB0E0E6), new Color(0xC8C8D2), + }), + TRINIUM( + GT_BranchDefinition.SPACE, + "Trinium", + false, + new Color(0xB0E0E6), + new Color(0xC8C8D2), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.TRINIUM), 0.75f); beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.QUANTIUM), 0.10f); @@ -2149,12 +2624,17 @@ public enum GT_BeeDefinition implements IBeeDefinition { public void accept(GT_BeeDefinition dis) { IBeeMutationCustom tMutation = dis.registerMutation(ENCELADUS, IRIDIUM, 4); tMutation.requireResource(GregTech_API.sBlockMetal4, 9); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(41, "Enceladus"));//Enceladus Dim + tMutation.addMutationCondition( + new GT_Bees.DimensionMutationCondition(41, "Enceladus")); // Enceladus Dim } - } - ), - //Planet Line - MOON(GT_BranchDefinition.PLANET, "Moon", false, new Color(0x373735), new Color(0x7E7E78), + }), + // Planet Line + MOON( + GT_BranchDefinition.PLANET, + "Moon", + false, + new Color(0x373735), + new Color(0x7E7E78), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.MOON), 0.35f); if (Loader.isModLoaded(MOD_ID_DC)) @@ -2169,10 +2649,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(SPACE, CLAY, 25); if (Loader.isModLoaded("GalacticraftCore")) tMutation.requireResource(GameRegistry.findBlock("GalacticraftCore", "tile.moonBlock"), 4); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(28, "Moon"));//Moon Dim - } - ), - MARS(GT_BranchDefinition.PLANET, "Mars", false, new Color(0x220D05), new Color(0x3A1505), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(28, "Moon")); // Moon Dim + }), + MARS( + GT_BranchDefinition.PLANET, + "Mars", + false, + new Color(0x220D05), + new Color(0x3A1505), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.MARS), 0.35f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.MarsStoneDust", 1, 0), 0.10f); @@ -2186,10 +2670,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(MOON, IRON, 20); if (Loader.isModLoaded("GalacticraftMars")) tMutation.requireResource(GameRegistry.findBlock("GalacticraftMars", "tile.mars"), 5); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(29, "Mars"));//Mars Dim - } - ), - PHOBOS(GT_BranchDefinition.PLANET, "Phobos", true, new Color(0x220D05), new Color(0x7a5706), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(29, "Mars")); // Mars Dim + }), + PHOBOS( + GT_BranchDefinition.PLANET, + "Phobos", + true, + new Color(0x220D05), + new Color(0x7a5706), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.MARS), 0.25f); if (Loader.isModLoaded(MOD_ID_DC)) @@ -2203,10 +2691,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(MARS, MOON, 20); if (Loader.isModLoaded("GalaxySpace")) tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "phobosblocks"), 2); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(38, "Phobos"));//Phobos Dim - } - ), - DEIMOS(GT_BranchDefinition.PLANET, "Deimos", true, new Color(0x220D05), new Color(0x7a3206), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(38, "Phobos")); // Phobos Dim + }), + DEIMOS( + GT_BranchDefinition.PLANET, + "Deimos", + true, + new Color(0x220D05), + new Color(0x7a3206), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.MARS), 0.25f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.DeimosStoneDust", 1, 0), 0.10f); @@ -2219,10 +2711,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(MARS, SPACE, 20); if (Loader.isModLoaded("GalaxySpace")) tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "deimosblocks"), 1); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(40, "Deimos"));//Deimos Dim - } - ), - CERES(GT_BranchDefinition.PLANET, "Ceres", true, new Color(0x3ca5b7), new Color(0x1e7267), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(40, "Deimos")); // Deimos Dim + }), + CERES( + GT_BranchDefinition.PLANET, + "Ceres", + true, + new Color(0x3ca5b7), + new Color(0x1e7267), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.JUPITER), 0.25f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.CeresStoneDust", 1, 0), 0.10f); @@ -2235,10 +2731,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(MARS, METEORICIRON, 20); if (Loader.isModLoaded("GalaxySpace")) tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "ceresblocks"), 1); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(42, "Ceres"));//Ceres Dim - } - ), - JUPITER(GT_BranchDefinition.PLANET, "Jupiter", false, new Color(0x734B2E), new Color(0xD0CBC4), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(42, "Ceres")); // Ceres Dim + }), + JUPITER( + GT_BranchDefinition.PLANET, + "Jupiter", + false, + new Color(0x734B2E), + new Color(0xD0CBC4), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.JUPITER), 0.35f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.CallistoStoneDust", 1, 0), 0.05f); @@ -2257,10 +2757,15 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(MARS, DESH, 15); if (Loader.isModLoaded(MOD_ID_DC)) tMutation.requireResource(GameRegistry.findBlock(MOD_ID_DC, "tile.Ledox"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(30, "Asteriods"));//Asteriods Dim - } - ), - IO(GT_BranchDefinition.PLANET, "IO", true, new Color(0x734B2E), new Color(0xe5701b), + tMutation.addMutationCondition( + new GT_Bees.DimensionMutationCondition(30, "Asteriods")); // Asteriods Dim + }), + IO( + GT_BranchDefinition.PLANET, + "IO", + true, + new Color(0x734B2E), + new Color(0xe5701b), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.JUPITER), 0.25f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.IoStoneDust", 1, 0), 0.10f); @@ -2273,10 +2778,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { tMutation.restrictTemperature(HELLISH); if (Loader.isModLoaded("GalaxySpace")) tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "ioblocks"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(36, "IO"));//IO Dim - } - ), - EUROPA(GT_BranchDefinition.PLANET, "Europa", true, new Color(0x5982ea), new Color(0x0b36a3), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(36, "IO")); // IO Dim + }), + EUROPA( + GT_BranchDefinition.PLANET, + "Europa", + true, + new Color(0x5982ea), + new Color(0x0b36a3), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.JUPITER), 0.25f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.EuropaStoneDust", 1, 0), 0.10f); @@ -2291,10 +2800,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { tMutation.restrictTemperature(ICY); if (Loader.isModLoaded("GalaxySpace")) tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "europagrunt"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(35, "Europa"));//Europa Dim - } - ), - GANYMEDE(GT_BranchDefinition.PLANET, "Ganymede", true, new Color(0x3d1b10), new Color(0x190c07), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(35, "Europa")); // Europa Dim + }), + GANYMEDE( + GT_BranchDefinition.PLANET, + "Ganymede", + true, + new Color(0x3d1b10), + new Color(0x190c07), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.JUPITER), 0.25f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.GanymedeStoneDust", 1, 0), 0.10f); @@ -2306,10 +2819,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(JUPITER, TITANIUM, 15); if (Loader.isModLoaded("GalaxySpace")) tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "ganymedeblocks"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(43, "Ganymede"));//Ganymede Dim - } - ), - CALLISTO(GT_BranchDefinition.PLANET, "Callisto", true, new Color(0x0f333d), new Color(0x0d84a5), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(43, "Ganymede")); // Ganymede Dim + }), + CALLISTO( + GT_BranchDefinition.PLANET, + "Callisto", + true, + new Color(0x0f333d), + new Color(0x0d84a5), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.JUPITER), 0.25f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.CallistoStoneDust", 1, 0), 0.10f); @@ -2323,10 +2840,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(JUPITER, getSpecies(EXTRABEES, "artic"), 15); if (Loader.isModLoaded("GalaxySpace")) tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "callistoblocks"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(45, "Callisto"));//Callisto Dim - } - ), - SATURN(GT_BranchDefinition.PLANET, "Saturn", false, new Color(0xD2A472), new Color(0xF8C37B), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(45, "Callisto")); // Callisto Dim + }), + SATURN( + GT_BranchDefinition.PLANET, + "Saturn", + false, + new Color(0xD2A472), + new Color(0xF8C37B), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SATURN), 0.35f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.TitanStoneDust", 1, 0), 0.05f); @@ -2341,10 +2862,15 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(JUPITER, LEDOX, 25, 2); if (Loader.isModLoaded(MOD_ID_DC)) tMutation.requireResource(GameRegistry.findBlock(MOD_ID_DC, "tile.Quantinum"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(30, "Asteriods"));//Asteriods Dim - } - ), - ENCELADUS(GT_BranchDefinition.PLANET, "Enceladus", true, new Color(0xD2A472), new Color(0x193fa0), + tMutation.addMutationCondition( + new GT_Bees.DimensionMutationCondition(30, "Asteriods")); // Asteriods Dim + }), + ENCELADUS( + GT_BranchDefinition.PLANET, + "Enceladus", + true, + new Color(0xD2A472), + new Color(0x193fa0), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SATURN), 0.25f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.EnceladusStoneDust", 1, 0), 0.10f); @@ -2358,10 +2884,15 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(SATURN, CHROME, 25, 2); if (Loader.isModLoaded("GalaxySpace")) tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "enceladusblocks"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(41, "Enceladus"));//Enceladus Dim - } - ), - TITAN(GT_BranchDefinition.PLANET, "Titan", true, new Color(0xa0641b), new Color(0x7c1024), + tMutation.addMutationCondition( + new GT_Bees.DimensionMutationCondition(41, "Enceladus")); // Enceladus Dim + }), + TITAN( + GT_BranchDefinition.PLANET, + "Titan", + true, + new Color(0xa0641b), + new Color(0x7c1024), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SATURN), 0.25f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.TitanStoneDust", 1, 0), 0.10f); @@ -2373,10 +2904,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(SATURN, NICKEL, 25, 2); if (Loader.isModLoaded("GalaxySpace")) tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "titanblocks"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(44, "Titan"));//Titan Dim - } - ), - URANUS(GT_BranchDefinition.PLANET, "Uranus", false, new Color(0x75C0C9), new Color(0x84D8EC), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(44, "Titan")); // Titan Dim + }), + URANUS( + GT_BranchDefinition.PLANET, + "Uranus", + false, + new Color(0x75C0C9), + new Color(0x84D8EC), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.URANUS), 0.35f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.MirandaStoneDust", 1, 0), 0.05f); @@ -2390,10 +2925,15 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(SATURN, TRINIUM, 10); if (Loader.isModLoaded("GalaxySpace")) tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "metalsblock"), 6); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(30, "Asteroids"));//Asteroids Dim - } - ), - MIRANDA(GT_BranchDefinition.PLANET, "Miranda", true, new Color(0x75C0C9), new Color(0x0d211c), + tMutation.addMutationCondition( + new GT_Bees.DimensionMutationCondition(30, "Asteroids")); // Asteroids Dim + }), + MIRANDA( + GT_BranchDefinition.PLANET, + "Miranda", + true, + new Color(0x75C0C9), + new Color(0x0d211c), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.URANUS), 0.25f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.MirandaStoneDust", 1, 0), 0.10f); @@ -2406,10 +2946,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(URANUS, TIN, 10); if (Loader.isModLoaded("GalaxySpace")) tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "mirandablocks"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(86, "Miranda"));//Miranda Dim - } - ), - OBERON(GT_BranchDefinition.PLANET, "Oberon", true, new Color(0x4A4033), new Color(0xB5A288), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(86, "Miranda")); // Miranda Dim + }), + OBERON( + GT_BranchDefinition.PLANET, + "Oberon", + true, + new Color(0x4A4033), + new Color(0xB5A288), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.URANUS), 0.25f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.OberonStoneDust", 1, 0), 0.10f); @@ -2421,10 +2965,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(URANUS, IRIDIUM, 10); if (Loader.isModLoaded("GalaxySpace")) tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "oberonblocks"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(46, "Oberon"));//Oberon Dim - } - ), - NEPTUNE(GT_BranchDefinition.PLANET, "Neptune", false, new Color(0x334CFF), new Color(0x576DFF), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(46, "Oberon")); // Oberon Dim + }), + NEPTUNE( + GT_BranchDefinition.PLANET, + "Neptune", + false, + new Color(0x334CFF), + new Color(0x576DFF), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.NEPTUN), 0.35f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.ProteusStoneDust", 1, 0), 0.05f); @@ -2439,10 +2987,15 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(URANUS, ORIHARUKON, 7); if (Loader.isModLoaded(MOD_ID_DC)) tMutation.requireResource(GameRegistry.findBlock(MOD_ID_DC, "tile.MysteriousCrystal"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(30, "Asteroids"));//Asteroids Dim - } - ), - PROTEUS(GT_BranchDefinition.PLANET, "Proteus", true, new Color(0x334CFF), new Color(0x592610), + tMutation.addMutationCondition( + new GT_Bees.DimensionMutationCondition(30, "Asteroids")); // Asteroids Dim + }), + PROTEUS( + GT_BranchDefinition.PLANET, + "Proteus", + true, + new Color(0x334CFF), + new Color(0x592610), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.NEPTUN), 0.25f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.ProteusStoneDust", 1, 0), 0.10f); @@ -2455,10 +3008,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(NEPTUNE, COPPER, 7); if (Loader.isModLoaded("GalaxySpace")) tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "proteusblocks"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(47, "Proteus"));//Proteus Dim - } - ), - TRITON(GT_BranchDefinition.PLANET, "Triton", true, new Color(0x334CFF), new Color(0x421118), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(47, "Proteus")); // Proteus Dim + }), + TRITON( + GT_BranchDefinition.PLANET, + "Triton", + true, + new Color(0x334CFF), + new Color(0x421118), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.NEPTUN), 0.25f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.TritonStoneDust", 1, 0), 0.10f); @@ -2471,10 +3028,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(NEPTUNE, GOLD, 7); if (Loader.isModLoaded("GalaxySpace")) tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "tritonblocks"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(48, "Triton"));//Triton Dim - } - ), - PLUTO(GT_BranchDefinition.PLANET, "Pluto", false, new Color(0x34271E), new Color(0x69503D), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(48, "Triton")); // Triton Dim + }), + PLUTO( + GT_BranchDefinition.PLANET, + "Pluto", + false, + new Color(0x34271E), + new Color(0x69503D), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.PLUTO), 0.35f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.PlutoStoneDust", 1, 0), 0.10f); @@ -2489,10 +3050,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(NEPTUNE, PLUTONIUM, 5); if (Loader.isModLoaded("GalaxySpace")) tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "plutoblocks"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(49, "Pluto"));//Pluto Dim - } - ), - HAUMEA(GT_BranchDefinition.PLANET, "Haumea", false, new Color(0x1C1413), new Color(0x392B28), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(49, "Pluto")); // Pluto Dim + }), + HAUMEA( + GT_BranchDefinition.PLANET, + "Haumea", + false, + new Color(0x1C1413), + new Color(0x392B28), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.HAUMEA), 0.35f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.HaumeaStoneDust", 1, 0), 0.10f); @@ -2504,10 +3069,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(PLUTO, NAQUADAH, 7, 2); if (Loader.isModLoaded("GalaxySpace")) tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "haumeablocks"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(83, "Haumea"));//Haumea Dim - } - ), - MAKEMAKE(GT_BranchDefinition.PLANET, "MakeMake", false, new Color(0x301811), new Color(0x120A07), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(83, "Haumea")); // Haumea Dim + }), + MAKEMAKE( + GT_BranchDefinition.PLANET, + "MakeMake", + false, + new Color(0x301811), + new Color(0x120A07), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.MAKEMAKE), 0.35f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.MakeMakeStoneDust", 1, 0), 0.10f); @@ -2519,10 +3088,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(PLUTO, NAQUADRIA, 7, 2); if (Loader.isModLoaded("GalaxySpace")) tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "makemakegrunt"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(25, "MakeMake"));//MakeMake Dim - } - ), - CENTAURI(GT_BranchDefinition.PLANET, "Centauri", false, new Color(0x2F2A14), new Color(0xB06B32), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(25, "MakeMake")); // MakeMake Dim + }), + CENTAURI( + GT_BranchDefinition.PLANET, + "Centauri", + false, + new Color(0x2F2A14), + new Color(0xB06B32), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.CENTAURI), 0.35f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.CentauriASurfaceDust", 1, 0), 0.05f); @@ -2535,10 +3108,15 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(MAKEMAKE, DESH, 3); if (Loader.isModLoaded("GalaxySpace")) tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "acentauribbgrunt"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(33, "Kuiper Belt"));//Kuiper Belt Dim - } - ), - ACENTAURI(GT_BranchDefinition.PLANET, "aCentauri", false, new Color(0x2F2A14), new Color(0xa01e14), + tMutation.addMutationCondition( + new GT_Bees.DimensionMutationCondition(33, "Kuiper Belt")); // Kuiper Belt Dim + }), + ACENTAURI( + GT_BranchDefinition.PLANET, + "aCentauri", + false, + new Color(0x2F2A14), + new Color(0xa01e14), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.CENTAURI), 0.25f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.CentauriASurfaceDust", 1, 0), 0.10f); @@ -2552,11 +3130,16 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(CENTAURI, INFINITYCATALYST, 3); if (Loader.isModLoaded("GalaxySpace")) tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "acentauribbgrunt"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(31, "aCentauri"));//aCentauri Dim + tMutation.addMutationCondition( + new GT_Bees.DimensionMutationCondition(31, "aCentauri")); // aCentauri Dim } - } - ), - TCETI(GT_BranchDefinition.PLANET, "tCeti", false, new Color(0x46241A), new Color(0x7B412F), + }), + TCETI( + GT_BranchDefinition.PLANET, + "tCeti", + false, + new Color(0x46241A), + new Color(0x7B412F), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.TCETI), 0.35f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.TCetiEStoneDust", 1, 0), 0.05f); @@ -2570,10 +3153,15 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(MAKEMAKE, HAUMEA, 5, 2); if (Loader.isModLoaded("GalaxySpace")) tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "tcetieblocks"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(33, "Kuiper Belt"));//Kuiper Belt Dim - } - ), - TCETIE(GT_BranchDefinition.PLANET, "tCetiE", false, new Color(0x2d561b), new Color(0x0c0f60), + tMutation.addMutationCondition( + new GT_Bees.DimensionMutationCondition(33, "Kuiper Belt")); // Kuiper Belt Dim + }), + TCETIE( + GT_BranchDefinition.PLANET, + "tCetiE", + false, + new Color(0x2d561b), + new Color(0x0c0f60), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.TCETI), 0.25f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.TCetiEStoneDust", 1, 0), 0.10f); @@ -2586,36 +3174,43 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(TCETI, getSpecies(MAGICBEES, "TCWater"), 5, 2); if (Loader.isModLoaded("GalaxySpace")) tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "tcetieblocks"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(85, "tCeti E"));//tCeti E Dim - } - ), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(85, "tCeti E")); // tCeti E Dim + }), // Parents: TCETI and TCETIE, 25% combchance, needs Damp Humidity and Normal temperature. Is Mycophilic - SEAWEED(GT_BranchDefinition.PLANET, "SeaWeed", true, new Color(0xCBCBCB), new Color(0x83FF83), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SEAWEED), 0.25f); - beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.TCetiEStoneDust", 1, 0), 0.15f); - beeSpecies.setHumidity(DAMP); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - beeSpecies.setHasEffect(); - }, - template -> { - AlleleHelper.instance.set(template, SPEED, Speed.SLOWEST); - AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGER); - AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.DOWN_1); - AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.DOWN_1); - AlleleHelper.instance.set(template, NOCTURNAL, true); - AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectMycophilic); - }, - - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(TCETI, TCETIE, 5, 2); - if (Loader.isModLoaded("GalaxySpace")) - tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "tcetieblocks"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(85, "tCeti E"));//tCeti E Dim - } - ), + SEAWEED( + GT_BranchDefinition.PLANET, + "SeaWeed", + true, + new Color(0xCBCBCB), + new Color(0x83FF83), + beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SEAWEED), 0.25f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.TCetiEStoneDust", 1, 0), 0.15f); + beeSpecies.setHumidity(DAMP); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + beeSpecies.setHasEffect(); + }, + template -> { + AlleleHelper.instance.set(template, SPEED, Speed.SLOWEST); + AlleleHelper.instance.set(template, LIFESPAN, Lifespan.LONGER); + AlleleHelper.instance.set(template, TEMPERATURE_TOLERANCE, Tolerance.DOWN_1); + AlleleHelper.instance.set(template, HUMIDITY_TOLERANCE, Tolerance.DOWN_1); + AlleleHelper.instance.set(template, NOCTURNAL, true); + AlleleHelper.instance.set(template, EFFECT, AlleleEffect.effectMycophilic); + }, + dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(TCETI, TCETIE, 5, 2); + if (Loader.isModLoaded("GalaxySpace")) + tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "tcetieblocks"), 0); + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(85, "tCeti E")); // tCeti E Dim + }), - BARNARDA(GT_BranchDefinition.PLANET, "Barnarda", false, new Color(0x0D5A0D), new Color(0xE6C18D), + BARNARDA( + GT_BranchDefinition.PLANET, + "Barnarda", + false, + new Color(0x0D5A0D), + new Color(0xE6C18D), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.BARNARDA), 0.35f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.BarnardaEStoneDust", 1, 0), 0.05f); @@ -2629,10 +3224,15 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(MAKEMAKE, THORIUM, 3, 2); if (Loader.isModLoaded("GalaxySpace")) tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "barnardaEgrunt"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(33, "Kuiper Belt"));//Kuiper Belt Dim - } - ), - BARNARDAC(GT_BranchDefinition.PLANET, "BarnardaC", false, new Color(0x0D5A0D), new Color(0x473f0a), + tMutation.addMutationCondition( + new GT_Bees.DimensionMutationCondition(33, "Kuiper Belt")); // Kuiper Belt Dim + }), + BARNARDAC( + GT_BranchDefinition.PLANET, + "BarnardaC", + false, + new Color(0x0D5A0D), + new Color(0x473f0a), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.BARNARDA), 0.25f); beeSpecies.setHumidity(ARID); @@ -2643,11 +3243,16 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(BARNARDA, AMERICIUM, 3, 2); if (Loader.isModLoaded("GalaxySpace")) { tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "barnardaEgrunt"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(32, "Barnarda C"));//Barnarda C Dim + tMutation.addMutationCondition( + new GT_Bees.DimensionMutationCondition(32, "Barnarda C")); // Barnarda C Dim } - } - ), - BARNARDAE(GT_BranchDefinition.PLANET, "BarnardaE", false, new Color(0x0D5A0D), new Color(0x4c1f0a), + }), + BARNARDAE( + GT_BranchDefinition.PLANET, + "BarnardaE", + false, + new Color(0x0D5A0D), + new Color(0x4c1f0a), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.BARNARDA), 0.25f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.BarnardaEStoneDust", 1, 0), 0.10f); @@ -2659,11 +3264,16 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(BARNARDA, DIVIDED, 3, 2); if (Loader.isModLoaded("GalaxySpace")) { tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "barnardaEgrunt"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(81, "Barnard E"));//"Barnard E Dim + tMutation.addMutationCondition( + new GT_Bees.DimensionMutationCondition(81, "Barnard E")); // "Barnard E Dim } - } - ), - BARNARDAF(GT_BranchDefinition.PLANET, "BarnardaF", false, new Color(0x0D5A0D), new Color(0x1e0b49), + }), + BARNARDAF( + GT_BranchDefinition.PLANET, + "BarnardaF", + false, + new Color(0x0D5A0D), + new Color(0x1e0b49), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.BARNARDA), 0.25f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.BarnardaFStoneDust", 1, 0), 0.10f); @@ -2675,11 +3285,16 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(BARNARDA, NEUTRONIUM, 3, 2); if (Loader.isModLoaded("GalaxySpace")) { tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "barnardaFgrunt"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(82, "Barnard F"));//"Barnard F Dim + tMutation.addMutationCondition( + new GT_Bees.DimensionMutationCondition(82, "Barnard F")); // "Barnard F Dim } - } - ), - VEGA(GT_BranchDefinition.PLANET, "Vega", false, new Color(0x1A2036), new Color(0xB5C0DE), + }), + VEGA( + GT_BranchDefinition.PLANET, + "Vega", + false, + new Color(0x1A2036), + new Color(0xB5C0DE), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.VEGA), 0.35f); beeSpecies.addSpecialty(GT_ModHandler.getModItem(MOD_ID_DC, "item.VegaBStoneDust", 1, 0), 0.05f); @@ -2692,11 +3307,16 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(MAKEMAKE, NAQUADAH, 2); if (Loader.isModLoaded("GalaxySpace")) { tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "vegabgrunt"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(33, "Kuiper Belt"));//Kuiper Belt Dim + tMutation.addMutationCondition( + new GT_Bees.DimensionMutationCondition(33, "Kuiper Belt")); // Kuiper Belt Dim } - } - ), - VEGAB(GT_BranchDefinition.PLANET, "VegaB", false, new Color(0x1A2036), new Color(0x81e261), + }), + VEGAB( + GT_BranchDefinition.PLANET, + "VegaB", + false, + new Color(0x1A2036), + new Color(0x81e261), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.VEGA), 0.35f); if (Loader.isModLoaded(MOD_ID_DC)) @@ -2709,11 +3329,15 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(VEGA, NAQUADRIA, 2); if (Loader.isModLoaded("GalaxySpace")) { tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "vegabgrunt"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(84, "VegaB"));//VegaB Dim + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(84, "VegaB")); // VegaB Dim } - } - ), - MERCURY(GT_BranchDefinition.PLANET, "Mercury", false, new Color(0x4A4033), new Color(0xB5A288), + }), + MERCURY( + GT_BranchDefinition.PLANET, + "Mercury", + false, + new Color(0x4A4033), + new Color(0xB5A288), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.MERCURY), 0.35f); beeSpecies.setHumidity(ARID); @@ -2725,10 +3349,14 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(JUPITER, TUNGSTEN, 25, 2); if (Loader.isModLoaded("GalaxySpace")) tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "mercuryblocks"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(37, "Mercury"));//Mercury Dim - } - ), - VENUS(GT_BranchDefinition.PLANET, "Venus", false, new Color(0x4A4033), new Color(0xB5A288), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(37, "Mercury")); // Mercury Dim + }), + VENUS( + GT_BranchDefinition.PLANET, + "Venus", + false, + new Color(0x4A4033), + new Color(0xB5A288), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.VENUS), 0.35f); beeSpecies.setHumidity(ARID); @@ -2740,12 +3368,16 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(JUPITER, MITHRIL, 25, 2); if (Loader.isModLoaded("GalaxySpace")) tMutation.requireResource(GameRegistry.findBlock("GalaxySpace", "venusblocks"), 0); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(39, "Venus"));//Venus Dim - } - ), + tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(39, "Venus")); // Venus Dim + }), - //Infinity Line - COSMICNEUTRONIUM(GT_BranchDefinition.PLANET, "CosmicNeutronium", false, new Color(0x484848), new Color(0x323232), + // Infinity Line + COSMICNEUTRONIUM( + GT_BranchDefinition.PLANET, + "CosmicNeutronium", + false, + new Color(0x484848), + new Color(0x323232), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.COSMICNEUTRONIUM), 0.25f); beeSpecies.setHumidity(DAMP); @@ -2758,9 +3390,13 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(NEUTRONIUM, BARNARDAF, 7, 10); if (Loader.isModLoaded("Avaritia")) tMutation.requireResource(GameRegistry.findBlock("Avaritia", "Resource_Block"), 0); - } - ), - INFINITYCATALYST(GT_BranchDefinition.PLANET, "InfinityCatalyst", false, new Color(0xFFFFFF), new Color(0xFFFFFF), + }), + INFINITYCATALYST( + GT_BranchDefinition.PLANET, + "InfinityCatalyst", + false, + new Color(0xFFFFFF), + new Color(0xFFFFFF), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.INFINITYCATALYST), 0.02f); beeSpecies.setHumidity(DAMP); @@ -2773,12 +3409,17 @@ public enum GT_BeeDefinition implements IBeeDefinition { AlleleHelper.instance.set(template, EFFECT, getEffect(EXTRABEES, "blindness")); }, dis -> { - IMutationCustom tMutation = dis.registerMutation(DOB, COSMICNEUTRONIUM, 3, 10).setIsSecret(); + IMutationCustom tMutation = + dis.registerMutation(DOB, COSMICNEUTRONIUM, 3, 10).setIsSecret(); if (Loader.isModLoaded("Avaritia")) tMutation.requireResource(GameRegistry.findBlock("Avaritia", "Resource_Block"), 1); - } - ), - INFINITY(GT_BranchDefinition.PLANET, "Infinity", false, new Color(0xFFFFFF), new Color(0xFFFFFF), + }), + INFINITY( + GT_BranchDefinition.PLANET, + "Infinity", + false, + new Color(0xFFFFFF), + new Color(0xFFFFFF), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.INFINITY), 0.02f); beeSpecies.setHumidity(EnumHumidity.NORMAL); @@ -2791,12 +3432,16 @@ public enum GT_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation(INFINITYCATALYST, COSMICNEUTRONIUM, 1, 10); if (Loader.isModLoaded("avaritiaddons")) tMutation.requireResource(GameRegistry.findBlock("avaritiaddons", "InfinityChest"), 0); - } - ), + }), // Noble Gas Line // Helium bee, Humidity: normal, Temperature: Icy, Parents: Space & Mars, Mutationrate: 10%, Combrate: 50% - HELIUM(GT_BranchDefinition.NOBLEGAS, "Helium", false, new Color(0xFFA9FF), new Color(0xC8B8B4), + HELIUM( + GT_BranchDefinition.NOBLEGAS, + "Helium", + false, + new Color(0xFFA9FF), + new Color(0xC8B8B4), beeSpecies -> { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.HELIUM), 0.35f); beeSpecies.setHumidity(EnumHumidity.NORMAL); @@ -2808,268 +3453,341 @@ public enum GT_BeeDefinition implements IBeeDefinition { dis -> { IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(MAGICBEES, "Watery"), ENDDUST, 10); tMutation.restrictTemperature(ICY); - // if (Loader.isModLoaded("TwilightForest")) - // tMutation.requireResource(GameRegistry.findBlock("TwilightForest", "Aurora Block"), 0); - } - ), + // if (Loader.isModLoaded("TwilightForest")) + // tMutation.requireResource(GameRegistry.findBlock("TwilightForest", "Aurora Block"), 0); + }), // Argon bee, Humidity: normal, Temperature: Icy, Parents: Helium & Phobos, Mutationrate: 8%, Combrate: 50% - ARGON(GT_BranchDefinition.NOBLEGAS, "Argon", false, new Color(0x89D9E1), new Color(0xBDA5C2), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.ARGON), 0.35f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(ICY); - beeSpecies.setNocturnal(); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(HELIUM, LICH, 8); - tMutation.restrictTemperature(ICY); - } - ), + ARGON( + GT_BranchDefinition.NOBLEGAS, + "Argon", + false, + new Color(0x89D9E1), + new Color(0xBDA5C2), + beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.ARGON), 0.35f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(ICY); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + }, + template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), + dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(HELIUM, LICH, 8); + tMutation.restrictTemperature(ICY); + }), // Neon bee, Humidity: normal, Temperature: Icy, Parents: Xenon & Ceres, Mutationrate: 6%, Combrate: 50% - NEON(GT_BranchDefinition.NOBLEGAS, "Neon", false, new Color(0xFFC826), new Color(0xFF7200), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.NEON), 0.35f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(ICY); - beeSpecies.setNocturnal(); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(ARGON, HYDRA, 6); - tMutation.restrictTemperature(ICY);} - - ), + NEON( + GT_BranchDefinition.NOBLEGAS, + "Neon", + false, + new Color(0xFFC826), + new Color(0xFF7200), + beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.NEON), 0.35f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(ICY); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + }, + template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), + dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(ARGON, HYDRA, 6); + tMutation.restrictTemperature(ICY); + }), // Krypton bee, Humidity: normal, Temperature: Icy, Parents: Neon & Jupiter, Mutationrate: 4%, Combrate: 50% - KRYPTON(GT_BranchDefinition.NOBLEGAS, "Krypton", false, new Color(0x8A97B0), new Color(0x160822), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.KRYPTON), 0.35f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(ICY); - beeSpecies.setNocturnal(); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(NEON, URGHAST, 4); - tMutation.restrictTemperature(ICY);} - - ), + KRYPTON( + GT_BranchDefinition.NOBLEGAS, + "Krypton", + false, + new Color(0x8A97B0), + new Color(0x160822), + beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.KRYPTON), 0.35f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(ICY); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + }, + template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), + dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(NEON, URGHAST, 4); + tMutation.restrictTemperature(ICY); + }), // Xenon bee, Humidity: normal, Temperature: Icy, Parents: Argon & Deimos, Mutationrate: 6%, Combrate: 50% - XENON(GT_BranchDefinition.NOBLEGAS, "Xenon", false, new Color(0x8A97B0), new Color(0x160822), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.XENON), 0.35f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(ICY); - beeSpecies.setNocturnal(); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(KRYPTON, SNOWQUEEN, 2); - tMutation.restrictTemperature(ICY);} - - ), + XENON( + GT_BranchDefinition.NOBLEGAS, + "Xenon", + false, + new Color(0x8A97B0), + new Color(0x160822), + beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.XENON), 0.35f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(ICY); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + }, + template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), + dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(KRYPTON, SNOWQUEEN, 2); + tMutation.restrictTemperature(ICY); + }), // Oxygen bee, Humidity: normal, Temperature: Icy, Parents: Space & Callisto, Mutationrate: 15%, Combrate: 50% - OXYGEN(GT_BranchDefinition.NOBLEGAS, "Oxygen", false, new Color(0xFFFFFF), new Color(0x8F8FFF), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.OXYGEN), 0.35f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(ICY); - beeSpecies.setNocturnal(); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(HELIUM, DRAGONESSENCE, 15); - tMutation.restrictTemperature(ICY);} - - ), + OXYGEN( + GT_BranchDefinition.NOBLEGAS, + "Oxygen", + false, + new Color(0xFFFFFF), + new Color(0x8F8FFF), + beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.OXYGEN), 0.35f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(ICY); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + }, + template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), + dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(HELIUM, DRAGONESSENCE, 15); + tMutation.restrictTemperature(ICY); + }), // Hydrogen bee, Humidity: normal, Temperature: Icy, Parents: Oxygen & Watery, Mutationrate: 15%, Combrate: 50% - HYDROGEN(GT_BranchDefinition.NOBLEGAS, "Oxygen", false, new Color(0xFFFFFF), new Color(0xFF1493), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.HYDROGEN), 0.35f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(ICY); - beeSpecies.setNocturnal(); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(OXYGEN, getSpecies(MAGICBEES, "Watery"), 15); - tMutation.restrictTemperature(ICY);} - - ), + HYDROGEN( + GT_BranchDefinition.NOBLEGAS, + "Oxygen", + false, + new Color(0xFFFFFF), + new Color(0xFF1493), + beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.HYDROGEN), 0.35f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(ICY); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + }, + template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), + dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(OXYGEN, getSpecies(MAGICBEES, "Watery"), 15); + tMutation.restrictTemperature(ICY); + }), // Nitrogen bee, Humidity: normal, Temperature: Icy, Parents: Oxygen & Hydrogen, Mutationrate: 15%, Combrate: 50% - NITROGEN(GT_BranchDefinition.NOBLEGAS, "Nitrogen", false, new Color(0xFFC832), new Color(0xA52A2A), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.NITROGEN), 0.35f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(ICY); - beeSpecies.setNocturnal(); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(OXYGEN, HYDROGEN, 15); - tMutation.restrictTemperature(ICY);} - - ), + NITROGEN( + GT_BranchDefinition.NOBLEGAS, + "Nitrogen", + false, + new Color(0xFFC832), + new Color(0xA52A2A), + beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.NITROGEN), 0.35f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(ICY); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + }, + template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), + dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(OXYGEN, HYDROGEN, 15); + tMutation.restrictTemperature(ICY); + }), // Fluorine bee, Humidity: normal, Temperature: Icy, Parents: Nitrogen & Hydrogen, Mutationrate: 15%, Combrate: 50% - FLUORINE(GT_BranchDefinition.NOBLEGAS, "Fluorine", false, new Color(0x86AFF0), new Color(0xFF6D00), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.FLUORINE), 0.35f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(ICY); - beeSpecies.setNocturnal(); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(NITROGEN, HYDROGEN, 15); - tMutation.restrictTemperature(ICY);} - - ), - //infused Shards line - AIR(GT_BranchDefinition.INFUSEDSHARD, "Air", false, new Color(0xFFFF7E), new Color(0x60602F), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.INFUSEDAER), 0.30f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(MAGICBEES, "Supernatural"), getSpecies(MAGICBEES, "Windy"), 15); - tMutation.restrictTemperature(ICY); - if (Loader.isModLoaded("Thaumcraft")) - tMutation.requireResource(GameRegistry.findBlock("Thaumcraft", "blockCrystal"), 0); - } - ), - FIRE(GT_BranchDefinition.INFUSEDSHARD, "Air", false, new Color(0xED3801), new Color(0x3B0E00), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.INFUSEDIGNIS), 0.30f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(MAGICBEES, "Supernatural"), AIR, 15); - tMutation.restrictTemperature(ICY); - if (Loader.isModLoaded("Thaumcraft")) - tMutation.requireResource(GameRegistry.findBlock("Thaumcraft", "blockCrystal"), 0); - } - ), - WATER(GT_BranchDefinition.INFUSEDSHARD, "Air", false, new Color(0x0090FF), new Color(0x002542), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.INFUSEDAQUA), 0.30f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(FIRE, AIR, 15); - tMutation.restrictTemperature(ICY); - if (Loader.isModLoaded("Thaumcraft")) - tMutation.requireResource(GameRegistry.findBlock("Thaumcraft", "blockCrystal"), 0); - } - ), - EARTH(GT_BranchDefinition.INFUSEDSHARD, "Air", false, new Color(0x008600), new Color(0x003300), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.INFUSEDTERRA), 0.30f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(WATER, FIRE, 15); - tMutation.restrictTemperature(ICY); - if (Loader.isModLoaded("Thaumcraft")) - tMutation.requireResource(GameRegistry.findBlock("Thaumcraft", "blockCrystal"), 0); - } - ), - ORDER(GT_BranchDefinition.INFUSEDSHARD, "Air", false, new Color(0x8A97B0), new Color(0x5C5F62), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.INFUSEDORDO), 0.30f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(EARTH, FIRE, 15); - tMutation.restrictTemperature(ICY); - if (Loader.isModLoaded("Thaumcraft")) - tMutation.requireResource(GameRegistry.findBlock("Thaumcraft", "blockCrystal"), 0); - } - ), - CHAOS(GT_BranchDefinition.INFUSEDSHARD, "Air", false, new Color(0x2E2E41), new Color(0x232129), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.INFUSEDPERDITIO), 0.30f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(ORDER, FIRE, 15); - tMutation.restrictTemperature(ICY); - if (Loader.isModLoaded("Thaumcraft")) - tMutation.requireResource(GameRegistry.findBlock("Thaumcraft", "blockCrystal"), 0); - } - ), - NETHERSHARD(GT_BranchDefinition.INFUSEDSHARD, "Nethershard", false, new Color(0xBE0135), new Color(0x350211), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.NETHERSHARD), 0.30f); - beeSpecies.setHumidity(ARID); - beeSpecies.setTemperature(HOT); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(CHAOS, FIRE, 15); - tMutation.requireResource(GameRegistry.findBlock("gregtech", "gt.blockgem3"), 3); - } - ), - ENDSHARD(GT_BranchDefinition.INFUSEDSHARD, "Endshard", false, new Color(0x2E2E41), new Color(0x232129), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.ENDSHARD), 0.30f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setNocturnal(); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(NETHERSHARD, ENDDUST, 15); - tMutation.restrictTemperature(ICY); - tMutation.requireResource(GameRegistry.findBlock("gregtech", "gt.blockgem1"), 7); - } - ), - //Organic branch 2.0 - UNKNOWNWATER(GT_BranchDefinition.ORGANIC, "UnknownWater", false, new Color(0x4333A5), new Color(0x36ABFF), - beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.UNKNOWNWATER), 0.20f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setNocturnal(); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> dis.registerMutation(INFINITYCATALYST, MYSTERIOUSCRYSTAL, 5) - ), - //Endgame bees - JAEGERMEISTER(GT_BranchDefinition.ENDGAME, "JaegerMeister", false, new Color(0x05AD18), new Color(0xE7DAC3), - beeSpecies -> { - beeSpecies.addProduct(GT_ModHandler.getModItem("berriespp", "BppPotions", 1L, 8), 0.02f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setNocturnal(); - beeSpecies.setHasEffect(); - }, - template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), - dis -> { - IBeeMutationCustom tMutation = dis.registerMutation(INFINITYCATALYST, NAQUADRIA, 5); - tMutation.requireResource(GameRegistry.findBlock("gregtech", "gt.blockmachines"), 4684); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(100, "Deep Dark"));//Deep Dark dim - } - ); + FLUORINE( + GT_BranchDefinition.NOBLEGAS, + "Fluorine", + false, + new Color(0x86AFF0), + new Color(0xFF6D00), + beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.FLUORINE), 0.35f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(ICY); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + }, + template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), + dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(NITROGEN, HYDROGEN, 15); + tMutation.restrictTemperature(ICY); + }), + // infused Shards line + AIR( + GT_BranchDefinition.INFUSEDSHARD, + "Air", + false, + new Color(0xFFFF7E), + new Color(0x60602F), + beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.INFUSEDAER), 0.30f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setHasEffect(); + }, + template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), + dis -> { + IBeeMutationCustom tMutation = + dis.registerMutation(getSpecies(MAGICBEES, "Supernatural"), getSpecies(MAGICBEES, "Windy"), 15); + tMutation.restrictTemperature(ICY); + if (Loader.isModLoaded("Thaumcraft")) + tMutation.requireResource(GameRegistry.findBlock("Thaumcraft", "blockCrystal"), 0); + }), + FIRE( + GT_BranchDefinition.INFUSEDSHARD, + "Air", + false, + new Color(0xED3801), + new Color(0x3B0E00), + beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.INFUSEDIGNIS), 0.30f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setHasEffect(); + }, + template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), + dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(getSpecies(MAGICBEES, "Supernatural"), AIR, 15); + tMutation.restrictTemperature(ICY); + if (Loader.isModLoaded("Thaumcraft")) + tMutation.requireResource(GameRegistry.findBlock("Thaumcraft", "blockCrystal"), 0); + }), + WATER( + GT_BranchDefinition.INFUSEDSHARD, + "Air", + false, + new Color(0x0090FF), + new Color(0x002542), + beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.INFUSEDAQUA), 0.30f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setHasEffect(); + }, + template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), + dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(FIRE, AIR, 15); + tMutation.restrictTemperature(ICY); + if (Loader.isModLoaded("Thaumcraft")) + tMutation.requireResource(GameRegistry.findBlock("Thaumcraft", "blockCrystal"), 0); + }), + EARTH( + GT_BranchDefinition.INFUSEDSHARD, + "Air", + false, + new Color(0x008600), + new Color(0x003300), + beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.INFUSEDTERRA), 0.30f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setHasEffect(); + }, + template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), + dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(WATER, FIRE, 15); + tMutation.restrictTemperature(ICY); + if (Loader.isModLoaded("Thaumcraft")) + tMutation.requireResource(GameRegistry.findBlock("Thaumcraft", "blockCrystal"), 0); + }), + ORDER( + GT_BranchDefinition.INFUSEDSHARD, + "Air", + false, + new Color(0x8A97B0), + new Color(0x5C5F62), + beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.INFUSEDORDO), 0.30f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setHasEffect(); + }, + template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), + dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(EARTH, FIRE, 15); + tMutation.restrictTemperature(ICY); + if (Loader.isModLoaded("Thaumcraft")) + tMutation.requireResource(GameRegistry.findBlock("Thaumcraft", "blockCrystal"), 0); + }), + CHAOS( + GT_BranchDefinition.INFUSEDSHARD, + "Air", + false, + new Color(0x2E2E41), + new Color(0x232129), + beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.INFUSEDPERDITIO), 0.30f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setHasEffect(); + }, + template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), + dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(ORDER, FIRE, 15); + tMutation.restrictTemperature(ICY); + if (Loader.isModLoaded("Thaumcraft")) + tMutation.requireResource(GameRegistry.findBlock("Thaumcraft", "blockCrystal"), 0); + }), + NETHERSHARD( + GT_BranchDefinition.INFUSEDSHARD, + "Nethershard", + false, + new Color(0xBE0135), + new Color(0x350211), + beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.NETHERSHARD), 0.30f); + beeSpecies.setHumidity(ARID); + beeSpecies.setTemperature(HOT); + beeSpecies.setHasEffect(); + }, + template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), + dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(CHAOS, FIRE, 15); + tMutation.requireResource(GameRegistry.findBlock("gregtech", "gt.blockgem3"), 3); + }), + ENDSHARD( + GT_BranchDefinition.INFUSEDSHARD, + "Endshard", + false, + new Color(0x2E2E41), + new Color(0x232129), + beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.ENDSHARD), 0.30f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + }, + template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), + dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(NETHERSHARD, ENDDUST, 15); + tMutation.restrictTemperature(ICY); + tMutation.requireResource(GameRegistry.findBlock("gregtech", "gt.blockgem1"), 7); + }), + // Organic branch 2.0 + UNKNOWNWATER( + GT_BranchDefinition.ORGANIC, + "UnknownWater", + false, + new Color(0x4333A5), + new Color(0x36ABFF), + beeSpecies -> { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.UNKNOWNWATER), 0.20f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + }, + template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), + dis -> dis.registerMutation(INFINITYCATALYST, MYSTERIOUSCRYSTAL, 5)), + // Endgame bees + JAEGERMEISTER( + GT_BranchDefinition.ENDGAME, + "JaegerMeister", + false, + new Color(0x05AD18), + new Color(0xE7DAC3), + beeSpecies -> { + beeSpecies.addProduct(GT_ModHandler.getModItem("berriespp", "BppPotions", 1L, 8), 0.02f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); + }, + template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), + dis -> { + IBeeMutationCustom tMutation = dis.registerMutation(INFINITYCATALYST, NAQUADRIA, 5); + tMutation.requireResource(GameRegistry.findBlock("gregtech", "gt.blockmachines"), 4684); + tMutation.addMutationCondition( + new GT_Bees.DimensionMutationCondition(100, "Deep Dark")); // Deep Dark dim + }); private final GT_BranchDefinition branch; private final GT_AlleleBeeSpecies species; private final Consumer<GT_AlleleBeeSpecies> mSpeciesProperties; @@ -3078,15 +3796,15 @@ public enum GT_BeeDefinition implements IBeeDefinition { private IAllele[] template; private IBeeGenome genome; - GT_BeeDefinition(GT_BranchDefinition branch, - String binomial, - boolean dominant, - Color primary, - Color secondary, - Consumer<GT_AlleleBeeSpecies> aSpeciesProperties, - Consumer<IAllele[]> aAlleles, - Consumer<GT_BeeDefinition> aMutations - ) { + GT_BeeDefinition( + GT_BranchDefinition branch, + String binomial, + boolean dominant, + Color primary, + Color secondary, + Consumer<GT_AlleleBeeSpecies> aSpeciesProperties, + Consumer<IAllele[]> aAlleles, + Consumer<GT_BeeDefinition> aMutations) { this.mAlleles = aAlleles; this.mMutations = aMutations; this.mSpeciesProperties = aSpeciesProperties; @@ -3099,7 +3817,8 @@ public enum GT_BeeDefinition implements IBeeDefinition { GT_LanguageManager.addStringLocalization("for.bees.species." + lowercaseName, species, true); this.branch = branch; - this.species = new GT_AlleleBeeSpecies(uid, dominant, name, "GTNH", description, branch.getBranch(), binomial, primary, secondary); + this.species = new GT_AlleleBeeSpecies( + uid, dominant, name, "GTNH", description, branch.getBranch(), binomial, primary, secondary); } public static void initBees() { @@ -3129,7 +3848,6 @@ public enum GT_BeeDefinition implements IBeeDefinition { default: s = "forestry.effect" + name; break; - } return (IAlleleBeeEffect) AlleleManager.alleleRegistry.getAllele(s); } @@ -3152,7 +3870,6 @@ public enum GT_BeeDefinition implements IBeeDefinition { default: s = "forestry.flowers" + name; break; - } return (IAlleleFlowers) AlleleManager.alleleRegistry.getAllele(s); } @@ -3175,7 +3892,6 @@ public enum GT_BeeDefinition implements IBeeDefinition { default: s = "forestry.species" + name; break; - } IAlleleBeeSpecies ret = (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele(s); if (ret == null) { @@ -3185,7 +3901,6 @@ public enum GT_BeeDefinition implements IBeeDefinition { return ret; } - private void setSpeciesProperties(GT_AlleleBeeSpecies beeSpecies) { this.mSpeciesProperties.accept(beeSpecies); } @@ -3230,19 +3945,23 @@ public enum GT_BeeDefinition implements IBeeDefinition { * Diese neue Funtion erlaubt Mutationsraten unter 1%. Setze dazu die Mutationsrate als Bruch mit chance / chanceDivider * This new function allows Mutation percentages under 1%. Set them as a fraction with chance / chanceDivider */ - private IBeeMutationCustom registerMutation(IAlleleBeeSpecies parent1, IAlleleBeeSpecies parent2, int chance, float chanceDivider) { + private IBeeMutationCustom registerMutation( + IAlleleBeeSpecies parent1, IAlleleBeeSpecies parent2, int chance, float chanceDivider) { return new GT_Bee_Mutation(parent1, parent2, this.getTemplate(), chance, chanceDivider); } - private IBeeMutationCustom registerMutation(GT_BeeDefinition parent1, IAlleleBeeSpecies parent2, int chance, float chanceDivider) { + private IBeeMutationCustom registerMutation( + GT_BeeDefinition parent1, IAlleleBeeSpecies parent2, int chance, float chanceDivider) { return registerMutation(parent1.species, parent2, chance, chanceDivider); } - private IBeeMutationCustom registerMutation(IAlleleBeeSpecies parent1, GT_BeeDefinition parent2, int chance, float chanceDivider) { + private IBeeMutationCustom registerMutation( + IAlleleBeeSpecies parent1, GT_BeeDefinition parent2, int chance, float chanceDivider) { return registerMutation(parent1, parent2.species, chance, chanceDivider); } - private IBeeMutationCustom registerMutation(GT_BeeDefinition parent1, GT_BeeDefinition parent2, int chance, float chanceDivider) { + private IBeeMutationCustom registerMutation( + GT_BeeDefinition parent1, GT_BeeDefinition parent2, int chance, float chanceDivider) { return registerMutation(parent1.species, parent2, chance, chanceDivider); } diff --git a/src/main/java/gregtech/loaders/misc/GT_Bees.java b/src/main/java/gregtech/loaders/misc/GT_Bees.java index 1d8441e4d6..98be74a279 100644 --- a/src/main/java/gregtech/loaders/misc/GT_Bees.java +++ b/src/main/java/gregtech/loaders/misc/GT_Bees.java @@ -1,5 +1,7 @@ package gregtech.loaders.misc; +import static gregtech.api.enums.GT_Values.MOD_ID_FR; + import cpw.mods.fml.common.Loader; import forestry.api.apiculture.EnumBeeChromosome; import forestry.api.core.IClimateProvider; @@ -15,8 +17,6 @@ import gregtech.common.items.ItemPropolis; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; -import static gregtech.api.enums.GT_Values.MOD_ID_FR; - public class GT_Bees { public static IAlleleInteger noFertility; @@ -55,9 +55,9 @@ public class GT_Bees { } } - private static void setupGTAlleles(){ + private static void setupGTAlleles() { - noFertility = new AlleleInteger("fertilitySterile", 0, false, EnumBeeChromosome.FERTILITY); + noFertility = new AlleleInteger("fertilitySterile", 0, false, EnumBeeChromosome.FERTILITY); superFertility = new AlleleInteger("fertilityMultiply", 8, false, EnumBeeChromosome.FERTILITY); noFlowering = new AlleleInteger("floweringNonpollinating", 0, false, EnumBeeChromosome.FLOWERING); @@ -68,25 +68,25 @@ public class GT_Bees { noWork = new AlleleFloat("speedUnproductive", 0, false); superSpeed = new AlleleFloat("speedAccelerated", 4F, false); - speedBlinding = (IAlleleFloat) AlleleManager.alleleRegistry.getAllele("magicbees.speedBlinding") == null ? new AlleleFloat("speedBlinding", 2f, false) : (IAlleleFloat) AlleleManager.alleleRegistry.getAllele("magicbees.speedBlinding") ; + speedBlinding = (IAlleleFloat) AlleleManager.alleleRegistry.getAllele("magicbees.speedBlinding") == null + ? new AlleleFloat("speedBlinding", 2f, false) + : (IAlleleFloat) AlleleManager.alleleRegistry.getAllele("magicbees.speedBlinding"); blinkLife = new AlleleInteger("lifeBlink", 2, false, EnumBeeChromosome.LIFESPAN); superLife = new AlleleInteger("lifeEon", 600, false, EnumBeeChromosome.LIFESPAN); - } private static class AlleleFloat extends Allele implements IAlleleFloat { private float value; public AlleleFloat(String id, float val, boolean isDominant) { - super("gregtech."+id, "gregtech."+id, isDominant); + super("gregtech." + id, "gregtech." + id, isDominant); this.value = val; AlleleManager.alleleRegistry.registerAllele(this, EnumBeeChromosome.SPEED); - } @Override - public float getValue(){ + public float getValue() { return this.value; } } @@ -96,13 +96,13 @@ public class GT_Bees { private int value; public AlleleInteger(String id, int val, boolean isDominant, EnumBeeChromosome c) { - super("gregtech."+id, "gregtech."+id, isDominant); + super("gregtech." + id, "gregtech." + id, isDominant); this.value = val; AlleleManager.alleleRegistry.registerAllele(this, c); } @Override - public int getValue(){ + public int getValue() { return this.value; } } @@ -111,14 +111,14 @@ public class GT_Bees { private int[] value; - public AlleleArea(String id, int rangeXZ,int rangeY, boolean isDominant) { - super("gregtech."+id, "gregtech."+id, isDominant); - this.value = new int[] {rangeXZ,rangeY,rangeXZ}; + public AlleleArea(String id, int rangeXZ, int rangeY, boolean isDominant) { + super("gregtech." + id, "gregtech." + id, isDominant); + this.value = new int[] {rangeXZ, rangeY, rangeXZ}; AlleleManager.alleleRegistry.registerAllele(this, EnumBeeChromosome.TERRITORY); } @Override - public int[] getValue(){ + public int[] getValue() { return this.value; } } @@ -134,8 +134,17 @@ public class GT_Bees { } @Override - public float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1, IClimateProvider climate) { - if(world.provider.dimensionId == dimID)return 1; + public float getChance( + World world, + int x, + int y, + int z, + IAllele allele0, + IAllele allele1, + IGenome genome0, + IGenome genome1, + IClimateProvider climate) { + if (world.provider.dimensionId == dimID) return 1; return 0; } @@ -143,7 +152,6 @@ public class GT_Bees { public String getDescription() { return StringUtil.localizeAndFormat("mutation.condition.dim") + " " + dimName; } - } public static class BiomeIDMutationCondition implements IMutationCondition { @@ -157,18 +165,26 @@ public class GT_Bees { } @Override - public float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1, IClimateProvider climate) { - if(climate.getBiome().biomeID == biomeID) return 1; + public float getChance( + World world, + int x, + int y, + int z, + IAllele allele0, + IAllele allele1, + IGenome genome0, + IGenome genome1, + IClimateProvider climate) { + if (climate.getBiome().biomeID == biomeID) return 1; return 0; } @Override public String getDescription() { - if (BiomeGenBase.getBiome(biomeID)!=null) { + if (BiomeGenBase.getBiome(biomeID) != null) { return StringUtil.localizeAndFormat("mutation.condition.biomeid") + " " + biomeName; } return ""; } - } } diff --git a/src/main/java/gregtech/loaders/misc/GT_BranchDefinition.java b/src/main/java/gregtech/loaders/misc/GT_BranchDefinition.java index fb9fd1f8c8..0d1a164992 100644 --- a/src/main/java/gregtech/loaders/misc/GT_BranchDefinition.java +++ b/src/main/java/gregtech/loaders/misc/GT_BranchDefinition.java @@ -1,24 +1,22 @@ package gregtech.loaders.misc; +import static forestry.api.apiculture.EnumBeeChromosome.*; +import static forestry.core.genetics.alleles.EnumAllele.*; +import static gregtech.loaders.misc.GT_BeeDefinition.getEffect; +import static gregtech.loaders.misc.GT_BeeDefinition.getFlowers; +import static gregtech.loaders.misc.GT_BeeDefinitionReference.EXTRABEES; +import static gregtech.loaders.misc.GT_BeeDefinitionReference.MAGICBEES; + import forestry.api.apiculture.BeeManager; import forestry.api.apiculture.EnumBeeChromosome; import forestry.api.genetics.IAllele; import forestry.api.genetics.IClassification; import forestry.apiculture.genetics.alleles.AlleleEffect; import forestry.core.genetics.alleles.AlleleHelper; - import java.util.Arrays; import java.util.function.Consumer; -import static forestry.api.apiculture.EnumBeeChromosome.*; -import static forestry.core.genetics.alleles.EnumAllele.*; -import static gregtech.loaders.misc.GT_BeeDefinition.getEffect; -import static gregtech.loaders.misc.GT_BeeDefinition.getFlowers; -import static gregtech.loaders.misc.GT_BeeDefinitionReference.EXTRABEES; -import static gregtech.loaders.misc.GT_BeeDefinitionReference.MAGICBEES; - public enum GT_BranchDefinition { - ORGANIC("Fuelis", alleles -> { AlleleHelper.instance.set(alleles, TEMPERATURE_TOLERANCE, Tolerance.NONE); AlleleHelper.instance.set(alleles, HUMIDITY_TOLERANCE, Tolerance.BOTH_2); @@ -27,8 +25,7 @@ public enum GT_BranchDefinition { AlleleHelper.instance.set(alleles, FLOWERING, Flowering.SLOW); AlleleHelper.instance.set(alleles, LIFESPAN, Lifespan.SHORTER); AlleleHelper.instance.set(alleles, SPEED, Speed.SLOWEST); - } - ), + }), IC2("Industrialis", alleles -> { AlleleHelper.instance.set(alleles, TEMPERATURE_TOLERANCE, Tolerance.UP_1); AlleleHelper.instance.set(alleles, HUMIDITY_TOLERANCE, Tolerance.BOTH_1); @@ -37,8 +34,7 @@ public enum GT_BranchDefinition { AlleleHelper.instance.set(alleles, FLOWERING, Flowering.FASTER); AlleleHelper.instance.set(alleles, LIFESPAN, Lifespan.SHORT); AlleleHelper.instance.set(alleles, SPEED, Speed.SLOW); - } - ), + }), GTALLOY("Amalgamis", alleles -> { AlleleHelper.instance.set(alleles, TEMPERATURE_TOLERANCE, Tolerance.NONE); AlleleHelper.instance.set(alleles, TOLERANT_FLYER, true); @@ -47,38 +43,33 @@ public enum GT_BranchDefinition { AlleleHelper.instance.set(alleles, FLOWERING, Flowering.AVERAGE); AlleleHelper.instance.set(alleles, LIFESPAN, Lifespan.SHORTEST); AlleleHelper.instance.set(alleles, SPEED, Speed.FAST); - } - ), + }), THAUMIC("Arcanis", alleles -> { AlleleHelper.instance.set(alleles, TEMPERATURE_TOLERANCE, Tolerance.BOTH_1); AlleleHelper.instance.set(alleles, HUMIDITY_TOLERANCE, Tolerance.BOTH_1); AlleleHelper.instance.set(alleles, FLOWER_PROVIDER, getFlowers(EXTRABEES, "book")); AlleleHelper.instance.set(alleles, FLOWERING, Flowering.FASTER); AlleleHelper.instance.set(alleles, LIFESPAN, Lifespan.LONGEST); - } - ), + }), GEM("Ornamentis", alleles -> { AlleleHelper.instance.set(alleles, TEMPERATURE_TOLERANCE, Tolerance.NONE); AlleleHelper.instance.set(alleles, NOCTURNAL, false); AlleleHelper.instance.set(alleles, FLOWER_PROVIDER, Flowers.NETHER); AlleleHelper.instance.set(alleles, FLOWERING, Flowering.AVERAGE); - } - ), + }), METAL("Metaliferis", alleles -> { AlleleHelper.instance.set(alleles, TEMPERATURE_TOLERANCE, Tolerance.DOWN_2); AlleleHelper.instance.set(alleles, CAVE_DWELLING, true); AlleleHelper.instance.set(alleles, NOCTURNAL, false); AlleleHelper.instance.set(alleles, FLOWER_PROVIDER, Flowers.JUNGLE); AlleleHelper.instance.set(alleles, FLOWERING, Flowering.SLOWER); - } - ), + }), RAREMETAL("Mineralis", alleles -> { AlleleHelper.instance.set(alleles, TEMPERATURE_TOLERANCE, Tolerance.DOWN_1); AlleleHelper.instance.set(alleles, NOCTURNAL, false); AlleleHelper.instance.set(alleles, FLOWER_PROVIDER, Flowers.CACTI); AlleleHelper.instance.set(alleles, FLOWERING, Flowering.FAST); - } - ), + }), RADIOACTIVE("Criticalis", alleles -> { AlleleHelper.instance.set(alleles, TEMPERATURE_TOLERANCE, Tolerance.NONE); AlleleHelper.instance.set(alleles, NOCTURNAL, false); @@ -86,16 +77,14 @@ public enum GT_BranchDefinition { AlleleHelper.instance.set(alleles, FLOWERING, Flowering.AVERAGE); AlleleHelper.instance.set(alleles, SPEED, GT_Bees.speedBlinding); AlleleHelper.instance.set(alleles, SPEED, getEffect(EXTRABEES, "radioactive")); - } - ), + }), TWILIGHT("Nemoris Obscuri", alleles -> { AlleleHelper.instance.set(alleles, TEMPERATURE_TOLERANCE, Tolerance.BOTH_1); AlleleHelper.instance.set(alleles, HUMIDITY_TOLERANCE, Tolerance.BOTH_1); AlleleHelper.instance.set(alleles, NOCTURNAL, false); AlleleHelper.instance.set(alleles, FLOWER_PROVIDER, Flowers.VANILLA); AlleleHelper.instance.set(alleles, FLOWERING, Flowering.FASTER); - } - ), + }), HEE("Finis Expansiones", alleles -> { AlleleHelper.instance.set(alleles, TEMPERATURE_TOLERANCE, Tolerance.BOTH_2); AlleleHelper.instance.set(alleles, HUMIDITY_TOLERANCE, Tolerance.BOTH_2); @@ -105,8 +94,7 @@ public enum GT_BranchDefinition { AlleleHelper.instance.set(alleles, FLOWERING, Flowering.SLOW); AlleleHelper.instance.set(alleles, SPEED, Speed.FASTEST); AlleleHelper.instance.set(alleles, TERRITORY, Territory.LARGER); - } - ), + }), SPACE("Cosmicis", alleles -> { AlleleHelper.instance.set(alleles, TEMPERATURE_TOLERANCE, Tolerance.DOWN_2); AlleleHelper.instance.set(alleles, TOLERANT_FLYER, true); @@ -116,8 +104,7 @@ public enum GT_BranchDefinition { AlleleHelper.instance.set(alleles, LIFESPAN, Lifespan.LONGEST); AlleleHelper.instance.set(alleles, SPEED, Speed.FAST); AlleleHelper.instance.set(alleles, TERRITORY, Territory.LARGEST); - } - ), + }), PLANET("Planetaris", alleles -> { AlleleHelper.instance.set(alleles, TEMPERATURE_TOLERANCE, Tolerance.BOTH_1); AlleleHelper.instance.set(alleles, TOLERANT_FLYER, true); @@ -126,8 +113,7 @@ public enum GT_BranchDefinition { AlleleHelper.instance.set(alleles, LIFESPAN, Lifespan.NORMAL); AlleleHelper.instance.set(alleles, SPEED, Speed.FASTEST); AlleleHelper.instance.set(alleles, TERRITORY, Territory.LARGER); - } - ), + }), NOBLEGAS("Nobilis Gasorum", alleles -> { AlleleHelper.instance.set(alleles, TEMPERATURE_TOLERANCE, Tolerance.BOTH_2); AlleleHelper.instance.set(alleles, TOLERANT_FLYER, true); @@ -135,8 +121,7 @@ public enum GT_BranchDefinition { AlleleHelper.instance.set(alleles, LIFESPAN, Lifespan.NORMAL); AlleleHelper.instance.set(alleles, SPEED, Speed.FASTEST); AlleleHelper.instance.set(alleles, TERRITORY, Territory.AVERAGE); - } - ), + }), INFUSEDSHARD("Infusa Shard", alleles -> { AlleleHelper.instance.set(alleles, TEMPERATURE_TOLERANCE, Tolerance.BOTH_1); AlleleHelper.instance.set(alleles, TOLERANT_FLYER, true); @@ -145,8 +130,7 @@ public enum GT_BranchDefinition { AlleleHelper.instance.set(alleles, LIFESPAN, Lifespan.SHORTEST); AlleleHelper.instance.set(alleles, SPEED, Speed.FASTEST); AlleleHelper.instance.set(alleles, TERRITORY, Territory.LARGEST); - } - ), + }), ENDGAME("ENDUS GAMUS", alleles -> { AlleleHelper.instance.set(alleles, TEMPERATURE_TOLERANCE, Tolerance.BOTH_5); AlleleHelper.instance.set(alleles, TOLERANT_FLYER, true); @@ -154,8 +138,7 @@ public enum GT_BranchDefinition { AlleleHelper.instance.set(alleles, LIFESPAN, Lifespan.SHORTEST); AlleleHelper.instance.set(alleles, SPEED, Speed.FASTEST); AlleleHelper.instance.set(alleles, TERRITORY, Territory.LARGEST); - }) - ; + }); private static IAllele[] defaultTemplate; private final IClassification branch; diff --git a/src/main/java/gregtech/loaders/misc/GT_CoverLoader.java b/src/main/java/gregtech/loaders/misc/GT_CoverLoader.java index 4b30517973..7caf0b24aa 100644 --- a/src/main/java/gregtech/loaders/misc/GT_CoverLoader.java +++ b/src/main/java/gregtech/loaders/misc/GT_CoverLoader.java @@ -1,5 +1,8 @@ package gregtech.loaders.misc; +import static gregtech.api.enums.Textures.BlockIcons.VENT_ADVANCED; +import static gregtech.api.enums.Textures.BlockIcons.VENT_NORMAL; + import gregtech.api.GregTech_API; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; @@ -7,20 +10,29 @@ import gregtech.common.covers.GT_Cover_Vent; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; -import static gregtech.api.enums.Textures.BlockIcons.VENT_ADVANCED; -import static gregtech.api.enums.Textures.BlockIcons.VENT_NORMAL; - -public class GT_CoverLoader - implements Runnable { +public class GT_CoverLoader implements Runnable { @Override public void run() { for (byte i = 0; i < 16; i = (byte) (i + 1)) { GregTech_API.registerCover(new ItemStack(Blocks.carpet, 1, i), TextureFactory.of(Blocks.wool, i), null); } - GregTech_API.registerCover(GT_ModHandler.getIC2Item("reactorVent", 1L, 1), TextureFactory.of(VENT_NORMAL), new GT_Cover_Vent(1)); - GregTech_API.registerCover(GT_ModHandler.getIC2Item("reactorVentCore", 1L, 1), TextureFactory.of(VENT_NORMAL), new GT_Cover_Vent(1)); - GregTech_API.registerCover(GT_ModHandler.getIC2Item("reactorVentGold", 1L, 1), TextureFactory.of(VENT_ADVANCED), new GT_Cover_Vent(2)); - GregTech_API.registerCover(GT_ModHandler.getIC2Item("reactorVentSpread", 1L), TextureFactory.of(VENT_NORMAL), new GT_Cover_Vent(2)); - GregTech_API.registerCover(GT_ModHandler.getIC2Item("reactorVentDiamond", 1L, 1), TextureFactory.of(VENT_ADVANCED), new GT_Cover_Vent(3)); + GregTech_API.registerCover( + GT_ModHandler.getIC2Item("reactorVent", 1L, 1), TextureFactory.of(VENT_NORMAL), new GT_Cover_Vent(1)); + GregTech_API.registerCover( + GT_ModHandler.getIC2Item("reactorVentCore", 1L, 1), + TextureFactory.of(VENT_NORMAL), + new GT_Cover_Vent(1)); + GregTech_API.registerCover( + GT_ModHandler.getIC2Item("reactorVentGold", 1L, 1), + TextureFactory.of(VENT_ADVANCED), + new GT_Cover_Vent(2)); + GregTech_API.registerCover( + GT_ModHandler.getIC2Item("reactorVentSpread", 1L), + TextureFactory.of(VENT_NORMAL), + new GT_Cover_Vent(2)); + GregTech_API.registerCover( + GT_ModHandler.getIC2Item("reactorVentDiamond", 1L, 1), + TextureFactory.of(VENT_ADVANCED), + new GT_Cover_Vent(3)); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingAll.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingAll.java index 2c4948ce36..5767332ee7 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingAll.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingAll.java @@ -4,14 +4,17 @@ import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import net.minecraft.item.ItemStack; -public class ProcessingAll implements gregtech.api.interfaces.IOreRecipeRegistrator {//TODO ACTUALLY COMPARE ALL THE PROCESSING CLASSES +public class ProcessingAll + implements gregtech.api.interfaces.IOreRecipeRegistrator { // TODO ACTUALLY COMPARE ALL THE PROCESSING CLASSES public ProcessingAll() { for (OrePrefixes tPrefix : OrePrefixes.values()) tPrefix.add(this); } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - if (((aStack.getItem() instanceof net.minecraft.item.ItemBlock)) && (aPrefix.mDefaultStackSize < aStack.getItem().getItemStackLimit(aStack))) + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + if (((aStack.getItem() instanceof net.minecraft.item.ItemBlock)) + && (aPrefix.mDefaultStackSize < aStack.getItem().getItemStackLimit(aStack))) aStack.getItem().setMaxStackSize(aPrefix.mDefaultStackSize); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingArrows.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingArrows.java index 4ed4d7efa9..a66d17293f 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingArrows.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingArrows.java @@ -16,48 +16,105 @@ public class ProcessingArrows implements gregtech.api.interfaces.IOreRecipeRegis } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { ItemStack tOutput = GT_Utility.copyAmount(1L, aStack); GT_Utility.updateItemStack(tOutput); - GT_Utility.ItemNBT.addEnchantment(tOutput, Enchantment.smite, EnchantmentHelper.getEnchantmentLevel(Enchantment.smite.effectId, tOutput) + 3); - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.HolyWater.getFluid(25L), tOutput, null, null, null, 100, 2); + GT_Utility.ItemNBT.addEnchantment( + tOutput, + Enchantment.smite, + EnchantmentHelper.getEnchantmentLevel(Enchantment.smite.effectId, tOutput) + 3); + GT_Values.RA.addChemicalBathRecipe( + GT_Utility.copyAmount(1L, aStack), + Materials.HolyWater.getFluid(25L), + tOutput, + null, + null, + null, + 100, + 2); tOutput = GT_Utility.copyAmount(1L, aStack); GT_Utility.updateItemStack(tOutput); - GT_Utility.ItemNBT.addEnchantment(tOutput, Enchantment.fireAspect, EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, tOutput) + 3); - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.FierySteel.getFluid(25L), tOutput, null, null, null, 100, 2); + GT_Utility.ItemNBT.addEnchantment( + tOutput, + Enchantment.fireAspect, + EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, tOutput) + 3); + GT_Values.RA.addChemicalBathRecipe( + GT_Utility.copyAmount(1L, aStack), + Materials.FierySteel.getFluid(25L), + tOutput, + null, + null, + null, + 100, + 2); tOutput = GT_Utility.copyAmount(1L, aStack); GT_Utility.updateItemStack(tOutput); - GT_Utility.ItemNBT.addEnchantment(tOutput, Enchantment.fireAspect, EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, tOutput) + 1); - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.Blaze.getMolten(18L), tOutput, null, null, null, 100, 2); + GT_Utility.ItemNBT.addEnchantment( + tOutput, + Enchantment.fireAspect, + EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, tOutput) + 1); + GT_Values.RA.addChemicalBathRecipe( + GT_Utility.copyAmount(1L, aStack), Materials.Blaze.getMolten(18L), tOutput, null, null, null, 100, 2); tOutput = GT_Utility.copyAmount(1L, aStack); GT_Utility.updateItemStack(tOutput); - GT_Utility.ItemNBT.addEnchantment(tOutput, Enchantment.knockback, EnchantmentHelper.getEnchantmentLevel(Enchantment.knockback.effectId, tOutput) + 1); - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.Rubber.getMolten(18L), tOutput, null, null, null, 100, 2); + GT_Utility.ItemNBT.addEnchantment( + tOutput, + Enchantment.knockback, + EnchantmentHelper.getEnchantmentLevel(Enchantment.knockback.effectId, tOutput) + 1); + GT_Values.RA.addChemicalBathRecipe( + GT_Utility.copyAmount(1L, aStack), Materials.Rubber.getMolten(18L), tOutput, null, null, null, 100, 2); tOutput = GT_Utility.copyAmount(1L, aStack); GT_Utility.updateItemStack(tOutput); - GT_Utility.ItemNBT.addEnchantment(tOutput, gregtech.api.enchants.Enchantment_EnderDamage.INSTANCE, EnchantmentHelper.getEnchantmentLevel(gregtech.api.enchants.Enchantment_EnderDamage.INSTANCE.effectId, tOutput) + 1); - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.Mercury.getFluid(25L), tOutput, null, null, null, 100, 2); + GT_Utility.ItemNBT.addEnchantment( + tOutput, + gregtech.api.enchants.Enchantment_EnderDamage.INSTANCE, + EnchantmentHelper.getEnchantmentLevel( + gregtech.api.enchants.Enchantment_EnderDamage.INSTANCE.effectId, tOutput) + + 1); + GT_Values.RA.addChemicalBathRecipe( + GT_Utility.copyAmount(1L, aStack), Materials.Mercury.getFluid(25L), tOutput, null, null, null, 100, 2); - if ((aMaterial.mUnificatable) && (aMaterial.mMaterialInto == aMaterial) && !aMaterial.contains(SubTag.NO_WORKING)) { + if ((aMaterial.mUnificatable) + && (aMaterial.mMaterialInto == aMaterial) + && !aMaterial.contains(SubTag.NO_WORKING)) { switch (aPrefix) { case arrowGtWood: GT_ModHandler.addCraftingRecipe( - GT_OreDictUnificator.get(OrePrefixes.arrowGtWood, aMaterial, 1L), - GT_Proxy.tBits, - new Object[]{" A", " S ", "F ", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', OreDictNames.craftingFeather, 'A', OrePrefixes.toolHeadArrow.get(aMaterial)} - ); + GT_OreDictUnificator.get(OrePrefixes.arrowGtWood, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] { + " A", + " S ", + "F ", + 'S', + OrePrefixes.stick.get(Materials.Wood), + 'F', + OreDictNames.craftingFeather, + 'A', + OrePrefixes.toolHeadArrow.get(aMaterial) + }); case arrowGtPlastic: GT_ModHandler.addCraftingRecipe( - GT_OreDictUnificator.get(OrePrefixes.arrowGtPlastic, aMaterial, 1L), - GT_Proxy.tBits, - new Object[]{" A", " S ", "F ", 'S', OrePrefixes.stick.get(Materials.Plastic), 'F', OreDictNames.craftingFeather, 'A', OrePrefixes.toolHeadArrow.get(aMaterial)} - ); - default: - break; + GT_OreDictUnificator.get(OrePrefixes.arrowGtPlastic, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] { + " A", + " S ", + "F ", + 'S', + OrePrefixes.stick.get(Materials.Plastic), + 'F', + OreDictNames.craftingFeather, + 'A', + OrePrefixes.toolHeadArrow.get(aMaterial) + }); + default: + break; } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingBeans.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingBeans.java index e292831b05..35af7d302f 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingBeans.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingBeans.java @@ -13,8 +13,10 @@ public class ProcessingBeans implements gregtech.api.interfaces.IOreRecipeRegist } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if (aOreDictName.equals("beansCocoa")) - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cocoa, 1L)); + GT_ModHandler.addPulverisationRecipe( + GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cocoa, 1L)); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingBlock.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingBlock.java index e9f66415df..aab525bded 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingBlock.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingBlock.java @@ -13,9 +13,15 @@ public class ProcessingBlock implements gregtech.api.interfaces.IOreRecipeRegist } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if (aMaterial != Materials.Clay) { - GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 9L), null, (int) Math.max(aMaterial.getMass() * 10L, 1L), 30); + GT_Values.RA.addCutterRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 9L), + null, + (int) Math.max(aMaterial.getMass() * 10L, 1L), + 30); } ItemStack tStack1 = GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L); @@ -25,52 +31,77 @@ public class ProcessingBlock implements gregtech.api.interfaces.IOreRecipeRegist GT_ModHandler.removeRecipeDelayed(GT_Utility.copyAmount(1L, aStack)); if (tStack1 != null) - GT_ModHandler.removeRecipeDelayed(tStack1, tStack1, tStack1, tStack1, tStack1, tStack1, tStack1, tStack1, tStack1); + GT_ModHandler.removeRecipeDelayed( + tStack1, tStack1, tStack1, tStack1, tStack1, tStack1, tStack1, tStack1, tStack1); if (tStack2 != null) - GT_ModHandler.removeRecipeDelayed(tStack2, tStack2, tStack2, tStack2, tStack2, tStack2, tStack2, tStack2, tStack2); + GT_ModHandler.removeRecipeDelayed( + tStack2, tStack2, tStack2, tStack2, tStack2, tStack2, tStack2, tStack2, tStack2); if (tStack3 != null) { - GT_ModHandler.removeRecipeDelayed(tStack3, tStack3, tStack3, tStack3, tStack3, tStack3, tStack3, tStack3, tStack3); + GT_ModHandler.removeRecipeDelayed( + tStack3, tStack3, tStack3, tStack3, tStack3, tStack3, tStack3, tStack3, tStack3); } if (aMaterial.mStandardMoltenFluid != null) { if (!(aMaterial == Materials.AnnealedCopper || aMaterial == Materials.WroughtIron)) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0L), aMaterial.getMolten(1296L), GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L), 288, 8); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Block.get(0L), + aMaterial.getMolten(1296L), + GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L), + 288, + 8); } } - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.storageblockcrafting, OrePrefixes.block.get(aMaterial).toString(), false)) { + if (GregTech_API.sRecipeFile.get( + ConfigCategories.Recipes.storageblockcrafting, + OrePrefixes.block.get(aMaterial).toString(), + false)) { if ((tStack1 == null) && (tStack2 == null) && (tStack3 != null)) - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L), new Object[]{"XXX", "XXX", "XXX", 'X', OrePrefixes.dust.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L), + new Object[] {"XXX", "XXX", "XXX", 'X', OrePrefixes.dust.get(aMaterial)}); if (tStack2 != null) - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L), new Object[]{"XXX", "XXX", "XXX", 'X', OrePrefixes.gem.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L), + new Object[] {"XXX", "XXX", "XXX", 'X', OrePrefixes.gem.get(aMaterial)}); if (tStack1 != null) { - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L), new Object[]{"XXX", "XXX", "XXX", 'X', OrePrefixes.ingot.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L), + new Object[] {"XXX", "XXX", "XXX", 'X', OrePrefixes.ingot.get(aMaterial)}); } } - if (tStack1 != null) - tStack1.stackSize = 9; - if (tStack2 != null) - tStack2.stackSize = 9; - if (tStack3 != null) - tStack3.stackSize = 9; + if (tStack1 != null) tStack1.stackSize = 9; + if (tStack2 != null) tStack2.stackSize = 9; + if (tStack3 != null) tStack3.stackSize = 9; GT_Values.RA.addForgeHammerRecipe(aStack, tStack2, 100, 24); - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.storageblockdecrafting, OrePrefixes.block.get(aMaterial).toString(), tStack2 != null)) { + if (GregTech_API.sRecipeFile.get( + ConfigCategories.Recipes.storageblockdecrafting, + OrePrefixes.block.get(aMaterial).toString(), + tStack2 != null)) { if (tStack3 != null) - GT_ModHandler.addShapelessCraftingRecipe(tStack3, new Object[]{OrePrefixes.block.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe(tStack3, new Object[] {OrePrefixes.block.get(aMaterial)}); if (tStack2 != null) - GT_ModHandler.addShapelessCraftingRecipe(tStack2, new Object[]{OrePrefixes.block.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe(tStack2, new Object[] {OrePrefixes.block.get(aMaterial)}); if (tStack1 != null) - GT_ModHandler.addShapelessCraftingRecipe(tStack1, new Object[]{OrePrefixes.block.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe(tStack1, new Object[] {OrePrefixes.block.get(aMaterial)}); } if (!OrePrefixes.block.isIgnored(aMaterial)) - GT_ModHandler.addCompressionRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 9L), GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L)); + GT_ModHandler.addCompressionRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 9L), + GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L)); switch (aMaterial.mName) { case "Mercury": - System.err.println("'blockQuickSilver'?, In which Ice Desert can you actually place this as a solid Block? On Pluto Greg :)"); + System.err.println( + "'blockQuickSilver'?, In which Ice Desert can you actually place this as a solid Block? On Pluto Greg :)"); break; case "Iron": case "WroughtIron": case "Steel": - GT_Values.RA.addAssemblerRecipe(ItemList.IC2_Compressed_Coal_Ball.get(8L), GT_Utility.copyAmount(1L, aStack), ItemList.IC2_Compressed_Coal_Chunk.get(1L), 400, 4); + GT_Values.RA.addAssemblerRecipe( + ItemList.IC2_Compressed_Coal_Ball.get(8L), + GT_Utility.copyAmount(1L, aStack), + ItemList.IC2_Compressed_Coal_Chunk.get(1L), + 400, + 4); break; } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingBolt.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingBolt.java index 406be61b82..17ba07917f 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingBolt.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingBolt.java @@ -14,9 +14,14 @@ public class ProcessingBolt implements gregtech.api.interfaces.IOreRecipeRegistr } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - if ((aMaterial.mUnificatable) && (aMaterial.mMaterialInto == aMaterial) && !aMaterial.contains(SubTag.NO_WORKING)) { - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(2L, aStack), GT_Proxy.tBits, new Object[]{"s ", " X", 'X', OrePrefixes.stick.get(aMaterial)}); + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + if ((aMaterial.mUnificatable) + && (aMaterial.mMaterialInto == aMaterial) + && !aMaterial.contains(SubTag.NO_WORKING)) { + GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(2L, aStack), GT_Proxy.tBits, new Object[] { + "s ", " X", 'X', OrePrefixes.stick.get(aMaterial) + }); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java index f9a92a672e..387968e240 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java @@ -9,10 +9,9 @@ import gregtech.api.objects.MaterialStack; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; - import java.util.ArrayList; import java.util.Iterator; +import net.minecraft.item.ItemStack; public class ProcessingCell implements IOreRecipeRegistrator { public ProcessingCell() { @@ -21,7 +20,8 @@ public class ProcessingCell implements IOreRecipeRegistrator { } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { switch (aPrefix) { case cell: if (aMaterial == Materials.Empty) { @@ -31,17 +31,27 @@ public class ProcessingCell implements IOreRecipeRegistrator { } } else { if (aMaterial.mFuelPower > 0) { - GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aStack), GT_Utility.getFluidForFilledItem(aStack, true) == null ? GT_Utility.getContainerItem(aStack, true) : null, aMaterial.mFuelPower, aMaterial.mFuelType); + GT_Values.RA.addFuel( + GT_Utility.copyAmount(1L, aStack), + GT_Utility.getFluidForFilledItem(aStack, true) == null + ? GT_Utility.getContainerItem(aStack, true) + : null, + aMaterial.mFuelPower, + aMaterial.mFuelType); } if ((aMaterial.mMaterialList.size() > 0) && ((aMaterial.mExtraData & 0x3) != 0)) { int tAllAmount = 0; MaterialStack tMat2; - for (Iterator i$ = aMaterial.mMaterialList.iterator(); i$.hasNext(); tAllAmount = (int) (tAllAmount + tMat2.mAmount)) { + for (Iterator i$ = aMaterial.mMaterialList.iterator(); + i$.hasNext(); + tAllAmount = (int) (tAllAmount + tMat2.mAmount)) { tMat2 = (MaterialStack) i$.next(); } long tItemAmount = 0L; - long tCapsuleCount = GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(aStack) * -tAllAmount; - long tDensityMultiplier = aMaterial.getDensity() > 3628800L ? aMaterial.getDensity() / 3628800L : 1L; + long tCapsuleCount = + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(aStack) * -tAllAmount; + long tDensityMultiplier = + aMaterial.getDensity() > 3628800L ? aMaterial.getDensity() / 3628800L : 1L; ArrayList<ItemStack> tList = new ArrayList(); for (MaterialStack tMat : aMaterial.mMaterialList) { if (tMat.mAmount > 0L) { @@ -51,21 +61,48 @@ public class ProcessingCell implements IOreRecipeRegistrator { } else { tStack = GT_OreDictUnificator.get(OrePrefixes.dust, tMat.mMaterial, tMat.mAmount); if (tStack == null) { - tStack = GT_OreDictUnificator.get(OrePrefixes.cell, tMat.mMaterial, tMat.mAmount); + tStack = GT_OreDictUnificator.get( + OrePrefixes.cell, tMat.mMaterial, tMat.mAmount); } } - if (tItemAmount + tMat.mAmount * 3628800L <= aStack.getMaxStackSize() * aMaterial.getDensity()) { + if (tItemAmount + tMat.mAmount * 3628800L + <= aStack.getMaxStackSize() * aMaterial.getDensity()) { tItemAmount += tMat.mAmount * 3628800L; if (tStack != null) { tStack.stackSize = ((int) (tStack.stackSize * tDensityMultiplier)); - while ((tStack.stackSize > 64) && (tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCount(tStack) * 64 < 0L ? tList.size() < 5 : tList.size() < 6) && (tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCount(tStack) * 64 <= 64L)) { + while ((tStack.stackSize > 64) + && (tCapsuleCount + + GT_ModHandler.getCapsuleCellContainerCount( + tStack) + * 64 + < 0L + ? tList.size() < 5 + : tList.size() < 6) + && (tCapsuleCount + + GT_ModHandler.getCapsuleCellContainerCount(tStack) + * 64 + <= 64L)) { tCapsuleCount += GT_ModHandler.getCapsuleCellContainerCount(tStack) * 64; tList.add(GT_Utility.copyAmount(64L, tStack)); tStack.stackSize -= 64; } - if ((tStack.stackSize > 0) && tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(tStack) <= 64L) { - if (tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(tStack) < 0L ? tList.size() < 5 : tList.size() < 6) { - tCapsuleCount += GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(tStack); + if ((tStack.stackSize > 0) + && tCapsuleCount + + GT_ModHandler + .getCapsuleCellContainerCountMultipliedWithStackSize( + tStack) + <= 64L) { + if (tCapsuleCount + + GT_ModHandler + .getCapsuleCellContainerCountMultipliedWithStackSize( + tStack) + < 0L + ? tList.size() < 5 + : tList.size() < 6) { + tCapsuleCount += + GT_ModHandler + .getCapsuleCellContainerCountMultipliedWithStackSize( + tStack); tList.add(tStack); } } @@ -73,18 +110,59 @@ public class ProcessingCell implements IOreRecipeRegistrator { } } } - tItemAmount = (tItemAmount * tDensityMultiplier % aMaterial.getDensity() > 0L ? 1 : 0) + tItemAmount * tDensityMultiplier / aMaterial.getDensity(); + tItemAmount = (tItemAmount * tDensityMultiplier % aMaterial.getDensity() > 0L ? 1 : 0) + + tItemAmount * tDensityMultiplier / aMaterial.getDensity(); if (tList.size() > 0) { if ((aMaterial.mExtraData & 0x1) != 0) { if (GT_Utility.getFluidForFilledItem(aStack, true) == null) { // dust stuffed cell e.g. Phosphate, Phosphorous Pentoxide - GT_Values.RA.addElectrolyzerRecipe(GT_Utility.copyAmount(tItemAmount, aStack), tCapsuleCount <= 0L ? 0 : (int) tCapsuleCount, tList.get(0), tList.size() >= 2 ? tList.get(1) : null, tList.size() >= 3 ? tList.get(2) : null, tList.size() >= 4 ? tList.get(3) : null, tList.size() >= 5 ? tList.get(4) : null, tCapsuleCount >= 0L ? tList.size() >= 6 ? tList.get(5) : null : ItemList.Cell_Empty.get(-tCapsuleCount), (int) Math.max(1L, Math.abs(aMaterial.getProtons() * 2L * tItemAmount)), Math.min(4, tList.size()) * 30); + GT_Values.RA.addElectrolyzerRecipe( + GT_Utility.copyAmount(tItemAmount, aStack), + tCapsuleCount <= 0L ? 0 : (int) tCapsuleCount, + tList.get(0), + tList.size() >= 2 ? tList.get(1) : null, + tList.size() >= 3 ? tList.get(2) : null, + tList.size() >= 4 ? tList.get(3) : null, + tList.size() >= 5 ? tList.get(4) : null, + tCapsuleCount >= 0L + ? tList.size() >= 6 ? tList.get(5) : null + : ItemList.Cell_Empty.get(-tCapsuleCount), + (int) Math.max(1L, Math.abs(aMaterial.getProtons() * 2L * tItemAmount)), + Math.min(4, tList.size()) * 30); } else { - GT_Values.RA.addElectrolyzerRecipe(aStack, tCapsuleCount + tItemAmount - 1 <= 0L ? 0 : (int) (tCapsuleCount + tItemAmount - 1), tList.get(0), tList.size() >= 2 ? tList.get(1) : null, tList.size() >= 3 ? tList.get(2) : null, tList.size() >= 4 ? tList.get(3) : null, tList.size() >= 5 ? tList.get(4) : null, tCapsuleCount >= 0L ? tList.size() >= 6 ? tList.get(5) : null : ItemList.Cell_Empty.get(-tCapsuleCount - tItemAmount + 1 <= 0 ? 0 : -tCapsuleCount - tItemAmount + 1), (int) Math.max(1L, Math.abs(aMaterial.getProtons() * 8L * tItemAmount)), Math.min(4, tList.size()) * 30); + GT_Values.RA.addElectrolyzerRecipe( + aStack, + tCapsuleCount + tItemAmount - 1 <= 0L + ? 0 + : (int) (tCapsuleCount + tItemAmount - 1), + tList.get(0), + tList.size() >= 2 ? tList.get(1) : null, + tList.size() >= 3 ? tList.get(2) : null, + tList.size() >= 4 ? tList.get(3) : null, + tList.size() >= 5 ? tList.get(4) : null, + tCapsuleCount >= 0L + ? tList.size() >= 6 ? tList.get(5) : null + : ItemList.Cell_Empty.get( + -tCapsuleCount - tItemAmount + 1 <= 0 + ? 0 + : -tCapsuleCount - tItemAmount + 1), + (int) Math.max(1L, Math.abs(aMaterial.getProtons() * 8L * tItemAmount)), + Math.min(4, tList.size()) * 30); } } if ((aMaterial.mExtraData & 0x2) != 0) { - GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(tItemAmount, aStack), tCapsuleCount <= 0L ? 0 : (int) tCapsuleCount, tList.get(0), tList.size() >= 2 ? tList.get(1) : null, tList.size() >= 3 ? tList.get(2) : null, tList.size() >= 4 ? tList.get(3) : null, tList.size() >= 5 ? tList.get(4) : null, tCapsuleCount >= 0L ? tList.size() >= 6 ? tList.get(5) : null : ItemList.Cell_Empty.get(-tCapsuleCount), (int) Math.max(1L, Math.abs(aMaterial.getMass() * 2L * tItemAmount))); + GT_Values.RA.addCentrifugeRecipe( + GT_Utility.copyAmount(tItemAmount, aStack), + tCapsuleCount <= 0L ? 0 : (int) tCapsuleCount, + tList.get(0), + tList.size() >= 2 ? tList.get(1) : null, + tList.size() >= 3 ? tList.get(2) : null, + tList.size() >= 4 ? tList.get(3) : null, + tList.size() >= 5 ? tList.get(4) : null, + tCapsuleCount >= 0L + ? tList.size() >= 6 ? tList.get(5) : null + : ItemList.Cell_Empty.get(-tCapsuleCount), + (int) Math.max(1L, Math.abs(aMaterial.getMass() * 2L * tItemAmount))); } } } @@ -94,12 +172,21 @@ public class ProcessingCell implements IOreRecipeRegistrator { if (aMaterial == Materials.Empty) { GT_ModHandler.removeRecipeByOutputDelayed(aStack); } else { - GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aStack), GT_Utility.getFluidForFilledItem(aStack, true) == null ? GT_Utility.getContainerItem(aStack, true) : null, (int) Math.max(1024L, 1024L * aMaterial.getMass()), 4); - GT_Values.RA.addVacuumFreezerRecipe(GT_Utility.copyAmount(1L, aStack), gregtech.api.util.GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), (int) Math.max(aMaterial.getMass() * 2L, 1L)); + GT_Values.RA.addFuel( + GT_Utility.copyAmount(1L, aStack), + GT_Utility.getFluidForFilledItem(aStack, true) == null + ? GT_Utility.getContainerItem(aStack, true) + : null, + (int) Math.max(1024L, 1024L * aMaterial.getMass()), + 4); + GT_Values.RA.addVacuumFreezerRecipe( + GT_Utility.copyAmount(1L, aStack), + gregtech.api.util.GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), + (int) Math.max(aMaterial.getMass() * 2L, 1L)); } break; - default: - break; + default: + break; } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java index b46bc8fa70..32e7d9b7ac 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java @@ -13,8 +13,9 @@ public class ProcessingCircuit implements gregtech.api.interfaces.IOreRecipeRegi } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - if(gregtech.api.util.GT_OreDictUnificator.isBlacklisted(aStack)&&aModName.equals("gregtech"))return; + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + if (gregtech.api.util.GT_OreDictUnificator.isBlacklisted(aStack) && aModName.equals("gregtech")) return; switch (aMaterial.mName) { case "Good": case "Data": @@ -24,18 +25,34 @@ public class ProcessingCircuit implements gregtech.api.interfaces.IOreRecipeRegi case "Superconductor": case "Infinite": case "Bio": - if (!gregtech.api.util.GT_OreDictUnificator.isBlacklisted(aStack)&&!aModName.equals("gregtech")) + if (!gregtech.api.util.GT_OreDictUnificator.isBlacklisted(aStack) && !aModName.equals("gregtech")) GT_ModHandler.removeRecipeByOutputDelayed(aStack); break; case "Primitive": case "Advanced": GT_ModHandler.removeRecipeByOutputDelayed(aStack); - break; + break; case "Basic": GT_ModHandler.removeRecipeByOutputDelayed(aStack); - GT_ModHandler.addCraftingRecipe(aStack, GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"RIR","VBV","CCC",'R',ItemList.Circuit_Parts_Resistor.get(1),'C',GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.RedAlloy, 1),'V', ItemList.Circuit_Parts_Vacuum_Tube.get(1),'B',ItemList.Circuit_Board_Coated_Basic.get(1),'I',ItemList.IC2_Item_Casing_Steel.get(1)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_ModHandler.getIC2Item("electronicCircuit", 1L), new Object[]{ItemList.Circuit_Integrated.getWildcard(1L)}); - break; + GT_ModHandler.addCraftingRecipe(aStack, GT_ModHandler.RecipeBits.BUFFERED, new Object[] { + "RIR", + "VBV", + "CCC", + 'R', + ItemList.Circuit_Parts_Resistor.get(1), + 'C', + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.RedAlloy, 1), + 'V', + ItemList.Circuit_Parts_Vacuum_Tube.get(1), + 'B', + ItemList.Circuit_Board_Coated_Basic.get(1), + 'I', + ItemList.IC2_Item_Casing_Steel.get(1) + }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_ModHandler.getIC2Item("electronicCircuit", 1L), + new Object[] {ItemList.Circuit_Integrated.getWildcard(1L)}); + break; } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCompressed.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCompressed.java index fcbaf88746..7c17c7ca27 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCompressed.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCompressed.java @@ -14,9 +14,11 @@ public class ProcessingCompressed implements IOreRecipeRegistrator { } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { GT_ModHandler.removeRecipeByOutputDelayed(aStack); - GregTech_API.registerCover(aStack, TextureFactory.of(aMaterial.mIconSet.mTextures[72], aMaterial.mRGBa, false), null); - //GT_RecipeRegistrator.registerUsagesForMaterials(null, false, GT_Utility.copyAmount(1L, aStack)); + GregTech_API.registerCover( + aStack, TextureFactory.of(aMaterial.mIconSet.mTextures[72], aMaterial.mRGBa, false), null); + // GT_RecipeRegistrator.registerUsagesForMaterials(null, false, GT_Utility.copyAmount(1L, aStack)); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java index c7fcb8d711..48d9708f4a 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java @@ -1,5 +1,7 @@ package gregtech.loaders.oreprocessing; +import static gregtech.api.enums.GT_Values.MOD_ID_DC; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -10,87 +12,383 @@ import gregtech.api.util.GT_Utility; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; -import static gregtech.api.enums.GT_Values.MOD_ID_DC; - public class ProcessingCrafting implements gregtech.api.interfaces.IOreRecipeRegistrator { public ProcessingCrafting() { OrePrefixes.crafting.add(this); } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { switch (aOreDictName) { case "craftingQuartz": - GT_Values.RA.addAssemblerRecipe(new ItemStack(Blocks.redstone_torch, 3, 32767), GT_Utility.copyAmount(1L, aStack), Materials.Concrete.getMolten(144L), new ItemStack(net.minecraft.init.Items.comparator, 1, 0), 800, 1); + GT_Values.RA.addAssemblerRecipe( + new ItemStack(Blocks.redstone_torch, 3, 32767), + GT_Utility.copyAmount(1L, aStack), + Materials.Concrete.getMolten(144L), + new ItemStack(net.minecraft.init.Items.comparator, 1, 0), + 800, + 1); break; case "craftingWireCopper": case "craftingWireTin": - GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Basic.get(1L), GT_Utility.copyAmount(1L, aStack), GT_ModHandler.getIC2Item("frequencyTransmitter", 1L), 800, 1); + GT_Values.RA.addAssemblerRecipe( + ItemList.Circuit_Basic.get(1L), + GT_Utility.copyAmount(1L, aStack), + GT_ModHandler.getIC2Item("frequencyTransmitter", 1L), + 800, + 1); break; case "craftingLensBlue": - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), GT_Utility.copyAmount(0L, aStack), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 13), 2000, 1920); - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.WroughtIron, 1L), GT_Utility.copyAmount(0L, aStack), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 13), 2000, 1920); - GT_Values.RA.addLaserEngraverRecipe(ItemList.IC2_LapotronCrystal.getWildcard(1L), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Parts_Crystal_Chip_Master.get(3L), 900, 480, true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Chip_CrystalCPU.get(1L), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Chip_CrystalSoC.get(1), 600, 40000, true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_PIC.get(1), 1200, 480, true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_PIC.get(4), 800, 1920, true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer5.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_QPIC.get(1), 2400, 500000, true); + GT_Values.RA.addLaserEngraverRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), + GT_Utility.copyAmount(0L, aStack), + GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 13), + 2000, + 1920); + GT_Values.RA.addLaserEngraverRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.WroughtIron, 1L), + GT_Utility.copyAmount(0L, aStack), + GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 13), + 2000, + 1920); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.IC2_LapotronCrystal.getWildcard(1L), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Parts_Crystal_Chip_Master.get(3L), + 900, + 480, + true); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Chip_CrystalCPU.get(1L), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Chip_CrystalSoC.get(1), + 600, + 40000, + true); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer2.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_PIC.get(1), + 1200, + 480, + true); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer3.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_PIC.get(4), + 800, + 1920, + true); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer5.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_QPIC.get(1), + 2400, + 500000, + true); break; case "craftingLensYellow": - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), GT_Utility.copyAmount(0L, aStack), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 14), 2000, 1920); - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.WroughtIron, 1L), GT_Utility.copyAmount(0L, aStack), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 14), 2000, 1920); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_LPIC.get(1), 800, 120, false); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_LPIC.get(4), 600, 480, true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_SoC.get(1), 900, 1920, true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer4.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_SoC.get(4), 600, 7680, true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer5.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_SoC.get(8), 300, 30720, true); + GT_Values.RA.addLaserEngraverRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), + GT_Utility.copyAmount(0L, aStack), + GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 14), + 2000, + 1920); + GT_Values.RA.addLaserEngraverRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.WroughtIron, 1L), + GT_Utility.copyAmount(0L, aStack), + GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 14), + 2000, + 1920); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_LPIC.get(1), + 800, + 120, + false); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer2.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_LPIC.get(4), + 600, + 480, + true); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer3.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_SoC.get(1), + 900, + 1920, + true); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer4.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_SoC.get(4), + 600, + 7680, + true); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer5.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_SoC.get(8), + 300, + 30720, + true); break; case "craftingLensOrange": - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_Simple_SoC.get(1), 300, 64, false); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_Simple_SoC.get(4), 300, 256, false); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_Simple_SoC.get(16), 300, 1024, false); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer4.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_Simple_SoC.get(64), 300, 4096, false); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_Simple_SoC.get(1), + 300, + 64, + false); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer2.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_Simple_SoC.get(4), + 300, + 256, + false); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer3.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_Simple_SoC.get(16), + 300, + 1024, + false); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer4.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_Simple_SoC.get(64), + 300, + 4096, + false); break; case "craftingLensCyan": - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), GT_Utility.copyAmount(0L, aStack), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 15), 2000, 1920); - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.WroughtIron, 1L), GT_Utility.copyAmount(0L, aStack), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 15), 2000, 1920); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_Ram.get(1), 1200, 120, false); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_Ram.get(4), 900, 480, true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_Ram.get(8), 600, 1920, true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer4.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_Ram.get(16), 300, 7680, true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer5.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_Ram.get(32), 150, 30720, true); + GT_Values.RA.addLaserEngraverRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), + GT_Utility.copyAmount(0L, aStack), + GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 15), + 2000, + 1920); + GT_Values.RA.addLaserEngraverRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.WroughtIron, 1L), + GT_Utility.copyAmount(0L, aStack), + GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 15), + 2000, + 1920); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_Ram.get(1), + 1200, + 120, + false); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer2.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_Ram.get(4), + 900, + 480, + true); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer3.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_Ram.get(8), + 600, + 1920, + true); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer4.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_Ram.get(16), + 300, + 7680, + true); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer5.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_Ram.get(32), + 150, + 30720, + true); break; case "craftingLensRed": - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Redstone, 1L), GT_Utility.copyAmount(0L, aStack), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), 50, 120); - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.RedAlloy, 1L), GT_Utility.copyAmount(0L, aStack), GT_ModHandler.getModItem(MOD_ID_DC, "item.EtchedLowVoltageWiring", 1L, 0), 200, 16); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_ILC.get(1), 1200, 120, false); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_ILC.get(4), 900, 480, true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_ILC.get(8), 600, 1920, true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer4.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_NPIC.get(1), 1800, 30720, true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer5.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_NPIC.get(4), 1500, 122880, true); + GT_Values.RA.addLaserEngraverRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Redstone, 1L), + GT_Utility.copyAmount(0L, aStack), + GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), + 50, + 120); + GT_Values.RA.addLaserEngraverRecipe( + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.RedAlloy, 1L), + GT_Utility.copyAmount(0L, aStack), + GT_ModHandler.getModItem(MOD_ID_DC, "item.EtchedLowVoltageWiring", 1L, 0), + 200, + 16); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_ILC.get(1), + 1200, + 120, + false); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer2.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_ILC.get(4), + 900, + 480, + true); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer3.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_ILC.get(8), + 600, + 1920, + true); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer4.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_NPIC.get(1), + 1800, + 30720, + true); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer5.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_NPIC.get(4), + 1500, + 122880, + true); break; case "craftingLensGreen": - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Parts_Crystal_Chip_Elite.get(1L), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Chip_CrystalCPU.get(1), 600, 10000, true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Chip_CrystalSoC.get(1L), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Chip_CrystalSoC2.get(1), 1200, 80000, true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_ULPIC.get(2), 600, 30, false); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_ULPIC.get(8), 600, 120, false); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_SoC2.get(1), 1800, 1920, true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer4.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_SoC2.get(2), 1500, 7680, true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer5.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_SoC2.get(4), 1200, 30720, true); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Parts_Crystal_Chip_Elite.get(1L), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Chip_CrystalCPU.get(1), + 600, + 10000, + true); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Chip_CrystalSoC.get(1L), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Chip_CrystalSoC2.get(1), + 1200, + 80000, + true); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_ULPIC.get(2), + 600, + 30, + false); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer2.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_ULPIC.get(8), + 600, + 120, + false); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer3.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_SoC2.get(1), + 1800, + 1920, + true); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer4.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_SoC2.get(2), + 1500, + 7680, + true); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer5.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_SoC2.get(4), + 1200, + 30720, + true); break; case "craftingLensWhite": - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), GT_Utility.copyAmount(0L, aStack), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 19), 2000, 1920); - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.WroughtIron, 1L), GT_Utility.copyAmount(0L, aStack), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 19), 2000, 1920); + GT_Values.RA.addLaserEngraverRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), + GT_Utility.copyAmount(0L, aStack), + GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 19), + 2000, + 1920); + GT_Values.RA.addLaserEngraverRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.WroughtIron, 1L), + GT_Utility.copyAmount(0L, aStack), + GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 19), + 2000, + 1920); - GT_Values.RA.addLaserEngraverRecipe(new ItemStack(Blocks.sandstone, 1, 2), GT_Utility.copyAmount(0L, aStack), new ItemStack(Blocks.sandstone, 1, 1), 50, 16); - GT_Values.RA.addLaserEngraverRecipe(new ItemStack(Blocks.stone, 1, 0), GT_Utility.copyAmount(0L, aStack), new ItemStack(Blocks.stonebrick, 1, 3), 50, 16); - GT_Values.RA.addLaserEngraverRecipe(new ItemStack(Blocks.quartz_block, 1, 0), GT_Utility.copyAmount(0L, aStack), new ItemStack(Blocks.quartz_block, 1, 1), 50, 16); - GT_Values.RA.addLaserEngraverRecipe(GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockQuartz", 1L), GT_Utility.copyAmount(0L, aStack), GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockQuartzChiseled", 1L), 50, 16); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_CPU.get(1), 1200, 120, true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_CPU.get(4), 900, 480, true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_CPU.get(8), 600, 1920, true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer4.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_CPU.get(16), 300, 7680, true); - GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer5.get(1), GT_Utility.copyAmount(0L, aStack), ItemList.Circuit_Wafer_CPU.get(32), 150, 30720, true); + GT_Values.RA.addLaserEngraverRecipe( + new ItemStack(Blocks.sandstone, 1, 2), + GT_Utility.copyAmount(0L, aStack), + new ItemStack(Blocks.sandstone, 1, 1), + 50, + 16); + GT_Values.RA.addLaserEngraverRecipe( + new ItemStack(Blocks.stone, 1, 0), + GT_Utility.copyAmount(0L, aStack), + new ItemStack(Blocks.stonebrick, 1, 3), + 50, + 16); + GT_Values.RA.addLaserEngraverRecipe( + new ItemStack(Blocks.quartz_block, 1, 0), + GT_Utility.copyAmount(0L, aStack), + new ItemStack(Blocks.quartz_block, 1, 1), + 50, + 16); + GT_Values.RA.addLaserEngraverRecipe( + GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockQuartz", 1L), + GT_Utility.copyAmount(0L, aStack), + GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockQuartzChiseled", 1L), + 50, + 16); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_CPU.get(1), + 1200, + 120, + true); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer2.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_CPU.get(4), + 900, + 480, + true); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer3.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_CPU.get(8), + 600, + 1920, + true); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer4.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_CPU.get(16), + 300, + 7680, + true); + GT_Values.RA.addLaserEngraverRecipe( + ItemList.Circuit_Silicon_Wafer5.get(1), + GT_Utility.copyAmount(0L, aStack), + ItemList.Circuit_Wafer_CPU.get(32), + 150, + 30720, + true); break; } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrate.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrate.java index 49e369732b..042580144b 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrate.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrate.java @@ -16,31 +16,90 @@ public class ProcessingCrate implements gregtech.api.interfaces.IOreRecipeRegist } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - boolean aSpecialRecipeReq2 = aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial) && !aMaterial.contains(SubTag.NO_WORKING); + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + boolean aSpecialRecipeReq2 = aMaterial.mUnificatable + && (aMaterial.mMaterialInto == aMaterial) + && !aMaterial.contains(SubTag.NO_WORKING); switch (aPrefix) { case crateGtDust: - GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(16L, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 16L)), ItemList.Crate_Empty.get(1L), GT_OreDictUnificator.get(OrePrefixes.crateGtDust, aMaterial, 1L), 100, 8); - GT_Values.RA.addUnboxingRecipe(GT_OreDictUnificator.get(OrePrefixes.crateGtDust, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 16L), ItemList.Crate_Empty.get(1L), 800, 1); - if (aSpecialRecipeReq2) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 16L), GT_Proxy.tBits, new Object[]{"Xc", 'X', OrePrefixes.crateGtDust.get(aMaterial)}); + GT_Values.RA.addBoxingRecipe( + GT_Utility.copyAmount(16L, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 16L)), + ItemList.Crate_Empty.get(1L), + GT_OreDictUnificator.get(OrePrefixes.crateGtDust, aMaterial, 1L), + 100, + 8); + GT_Values.RA.addUnboxingRecipe( + GT_OreDictUnificator.get(OrePrefixes.crateGtDust, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 16L), + ItemList.Crate_Empty.get(1L), + 800, + 1); + if (aSpecialRecipeReq2) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 16L), + GT_Proxy.tBits, + new Object[] {"Xc", 'X', OrePrefixes.crateGtDust.get(aMaterial)}); break; case crateGtIngot: - GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(16L, GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 16L)), ItemList.Crate_Empty.get(1L), GT_OreDictUnificator.get(OrePrefixes.crateGtIngot, aMaterial, 1L), 100, 8); - GT_Values.RA.addUnboxingRecipe(GT_OreDictUnificator.get(OrePrefixes.crateGtIngot, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 16L), ItemList.Crate_Empty.get(1L), 800, 1); - if (aSpecialRecipeReq2) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 16L), GT_Proxy.tBits, new Object[]{"Xc", 'X', OrePrefixes.crateGtIngot.get(aMaterial)}); + GT_Values.RA.addBoxingRecipe( + GT_Utility.copyAmount(16L, GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 16L)), + ItemList.Crate_Empty.get(1L), + GT_OreDictUnificator.get(OrePrefixes.crateGtIngot, aMaterial, 1L), + 100, + 8); + GT_Values.RA.addUnboxingRecipe( + GT_OreDictUnificator.get(OrePrefixes.crateGtIngot, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 16L), + ItemList.Crate_Empty.get(1L), + 800, + 1); + if (aSpecialRecipeReq2) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 16L), + GT_Proxy.tBits, + new Object[] {"Xc", 'X', OrePrefixes.crateGtIngot.get(aMaterial)}); break; case crateGtGem: - GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(16L, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 16L)), ItemList.Crate_Empty.get(1L), GT_OreDictUnificator.get(OrePrefixes.crateGtGem, aMaterial, 1L), 100, 8); - GT_Values.RA.addUnboxingRecipe(GT_OreDictUnificator.get(OrePrefixes.crateGtGem, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 16L), ItemList.Crate_Empty.get(1L), 800, 1); - if (aSpecialRecipeReq2) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 16L), GT_Proxy.tBits, new Object[]{"Xc", 'X', OrePrefixes.crateGtGem.get(aMaterial)}); + GT_Values.RA.addBoxingRecipe( + GT_Utility.copyAmount(16L, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 16L)), + ItemList.Crate_Empty.get(1L), + GT_OreDictUnificator.get(OrePrefixes.crateGtGem, aMaterial, 1L), + 100, + 8); + GT_Values.RA.addUnboxingRecipe( + GT_OreDictUnificator.get(OrePrefixes.crateGtGem, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 16L), + ItemList.Crate_Empty.get(1L), + 800, + 1); + if (aSpecialRecipeReq2) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 16L), + GT_Proxy.tBits, + new Object[] {"Xc", 'X', OrePrefixes.crateGtGem.get(aMaterial)}); break; case crateGtPlate: - GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(16L, GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 16L)), ItemList.Crate_Empty.get(1L), GT_OreDictUnificator.get(OrePrefixes.crateGtPlate, aMaterial, 1L), 100, 8); - GT_Values.RA.addUnboxingRecipe(GT_OreDictUnificator.get(OrePrefixes.crateGtPlate, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 16L), ItemList.Crate_Empty.get(1L), 800, 1); - if (aSpecialRecipeReq2) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 16L), GT_Proxy.tBits, new Object[]{"Xc", 'X', OrePrefixes.crateGtPlate.get(aMaterial)}); + GT_Values.RA.addBoxingRecipe( + GT_Utility.copyAmount(16L, GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 16L)), + ItemList.Crate_Empty.get(1L), + GT_OreDictUnificator.get(OrePrefixes.crateGtPlate, aMaterial, 1L), + 100, + 8); + GT_Values.RA.addUnboxingRecipe( + GT_OreDictUnificator.get(OrePrefixes.crateGtPlate, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 16L), + ItemList.Crate_Empty.get(1L), + 800, + 1); + if (aSpecialRecipeReq2) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 16L), + GT_Proxy.tBits, + new Object[] {"Xc", 'X', OrePrefixes.crateGtPlate.get(aMaterial)}); + break; + default: break; - default: - break; } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrop.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrop.java index f67fb8ebe8..ceb7aee979 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrop.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrop.java @@ -14,43 +14,80 @@ public class ProcessingCrop implements gregtech.api.interfaces.IOreRecipeRegistr } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, net.minecraft.item.ItemStack aStack) { - GT_ModHandler.addCompressionRecipe(gregtech.api.util.GT_Utility.copyAmount(8L, aStack), ItemList.IC2_PlantballCompressed.get(1L)); + public void registerOre( + OrePrefixes aPrefix, + Materials aMaterial, + String aOreDictName, + String aModName, + net.minecraft.item.ItemStack aStack) { + GT_ModHandler.addCompressionRecipe( + gregtech.api.util.GT_Utility.copyAmount(8L, aStack), ItemList.IC2_PlantballCompressed.get(1L)); switch (aOreDictName) { case "cropTea": GT_Values.RA.addBrewingRecipe(aStack, FluidRegistry.WATER, FluidRegistry.getFluid("potion.tea"), false); - GT_Values.RA.addBrewingRecipe(aStack, GT_ModHandler.getDistilledWater(1L).getFluid(), FluidRegistry.getFluid("potion.tea"), false); + GT_Values.RA.addBrewingRecipe( + aStack, + GT_ModHandler.getDistilledWater(1L).getFluid(), + FluidRegistry.getFluid("potion.tea"), + false); break; case "cropGrape": - GT_Values.RA.addBrewingRecipe(aStack, FluidRegistry.WATER, FluidRegistry.getFluid("potion.grapejuice"), false); - GT_Values.RA.addBrewingRecipe(aStack, GT_ModHandler.getDistilledWater(1L).getFluid(), FluidRegistry.getFluid("potion.grapejuice"), false); + GT_Values.RA.addBrewingRecipe( + aStack, FluidRegistry.WATER, FluidRegistry.getFluid("potion.grapejuice"), false); + GT_Values.RA.addBrewingRecipe( + aStack, + GT_ModHandler.getDistilledWater(1L).getFluid(), + FluidRegistry.getFluid("potion.grapejuice"), + false); break; case "cropChilipepper": - GT_ModHandler.addPulverisationRecipe(aStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chili, 1L)); + GT_ModHandler.addPulverisationRecipe( + aStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chili, 1L)); break; case "cropCoffee": - GT_ModHandler.addPulverisationRecipe(aStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coffee, 1L)); + GT_ModHandler.addPulverisationRecipe( + aStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coffee, 1L)); break; case "cropPotato": - GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Raw_PotatoChips.get(1L), 64, 4); - GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Stripes.get(0L), ItemList.Food_Raw_Fries.get(1L), 64, 4); - GT_Values.RA.addBrewingRecipe(aStack, FluidRegistry.WATER, FluidRegistry.getFluid("potion.potatojuice"), true); - GT_Values.RA.addBrewingRecipe(aStack, GT_ModHandler.getDistilledWater(1L).getFluid(), FluidRegistry.getFluid("potion.potatojuice"), true); + GT_Values.RA.addSlicerRecipe( + aStack, ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Raw_PotatoChips.get(1L), 64, 4); + GT_Values.RA.addSlicerRecipe( + aStack, ItemList.Shape_Slicer_Stripes.get(0L), ItemList.Food_Raw_Fries.get(1L), 64, 4); + GT_Values.RA.addBrewingRecipe( + aStack, FluidRegistry.WATER, FluidRegistry.getFluid("potion.potatojuice"), true); + GT_Values.RA.addBrewingRecipe( + aStack, + GT_ModHandler.getDistilledWater(1L).getFluid(), + FluidRegistry.getFluid("potion.potatojuice"), + true); break; case "cropLemon": - GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Lemon.get(4L), 64, 4); - GT_Values.RA.addBrewingRecipe(aStack, FluidRegistry.WATER, FluidRegistry.getFluid("potion.lemonjuice"), false); - GT_Values.RA.addBrewingRecipe(aStack, GT_ModHandler.getDistilledWater(1L).getFluid(), FluidRegistry.getFluid("potion.lemonjuice"), false); - GT_Values.RA.addBrewingRecipe(aStack, FluidRegistry.getFluid("potion.vodka"), FluidRegistry.getFluid("potion.leninade"), true); + GT_Values.RA.addSlicerRecipe( + aStack, ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Lemon.get(4L), 64, 4); + GT_Values.RA.addBrewingRecipe( + aStack, FluidRegistry.WATER, FluidRegistry.getFluid("potion.lemonjuice"), false); + GT_Values.RA.addBrewingRecipe( + aStack, + GT_ModHandler.getDistilledWater(1L).getFluid(), + FluidRegistry.getFluid("potion.lemonjuice"), + false); + GT_Values.RA.addBrewingRecipe( + aStack, + FluidRegistry.getFluid("potion.vodka"), + FluidRegistry.getFluid("potion.leninade"), + true); break; case "cropTomato": - GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Tomato.get(4L), 64, 4); + GT_Values.RA.addSlicerRecipe( + aStack, ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Tomato.get(4L), 64, 4); break; case "cropCucumber": - GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Cucumber.get(4L), 64, 4); + GT_Values.RA.addSlicerRecipe( + aStack, ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Cucumber.get(4L), 64, 4); break; case "cropOnion": - GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Onion.get(4L), 64, 4); + GT_Values.RA.addSlicerRecipe( + aStack, ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Onion.get(4L), 64, 4); break; } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrushedOre.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrushedOre.java index a7c3a524b8..e9b954f52e 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrushedOre.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrushedOre.java @@ -10,33 +10,97 @@ import net.minecraft.item.ItemStack; public class ProcessingCrushedOre implements gregtech.api.interfaces.IOreRecipeRegistrator { public ProcessingCrushedOre() { - OrePrefixes.crushedCentrifuged.add(this); + OrePrefixes.crushedCentrifuged.add(this); OrePrefixes.crushedPurified.add(this); } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - switch (aPrefix) { - case crushedCentrifuged: - GT_Values.RA.addForgeHammerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), 10, 16); - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, GT_Utility.selectItemInList(2, aMaterial.mMacerateInto, aMaterial.mOreByProducts), 1L), 10, false); - break; - case crushedPurified: - GT_ModHandler.addThermalCentrifugeRecipe(GT_Utility.copyAmount(1L, aStack), new int[] {10000, 1111}, (int) Math.min(5000L, Math.abs(aMaterial.getMass() * 20L)), GT_OreDictUnificator.get(OrePrefixes.crushedCentrifuged, aMaterial.mMacerateInto, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), 1L), GT_OreDictUnificator.get(OrePrefixes.dust, GT_Utility.selectItemInList(1, aMaterial.mMacerateInto, aMaterial.mOreByProducts), 1L)); + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + switch (aPrefix) { + case crushedCentrifuged: + GT_Values.RA.addForgeHammerRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), + 10, + 16); + GT_ModHandler.addPulverisationRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), + GT_OreDictUnificator.get( + OrePrefixes.dust, + GT_Utility.selectItemInList(2, aMaterial.mMacerateInto, aMaterial.mOreByProducts), + 1L), + 10, + false); + break; + case crushedPurified: + GT_ModHandler.addThermalCentrifugeRecipe( + GT_Utility.copyAmount(1L, aStack), + new int[] {10000, 1111}, + (int) Math.min(5000L, Math.abs(aMaterial.getMass() * 20L)), + GT_OreDictUnificator.get( + OrePrefixes.crushedCentrifuged, + aMaterial.mMacerateInto, + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), + 1L), + GT_OreDictUnificator.get( + OrePrefixes.dust, + GT_Utility.selectItemInList(1, aMaterial.mMacerateInto, aMaterial.mOreByProducts), + 1L)); - ItemStack tGem = GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L); - if(tGem!=null){ - switch (aMaterial.mName) { - case "Tanzanite": case "Sapphire": case "Olivine": case "GreenSapphire": case "Opal": case "Amethyst": case "Emerald": case "Ruby": - case "Amber": case "Diamond": case "FoolsRuby": case "BlueTopaz": case "GarnetRed": case "Topaz": case "Jasper": case "GarnetYellow": - GT_Values.RA.addSifterRecipe(GT_Utility.copyAmount(1L, aStack), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, tGem, 1L), GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, tGem, 1L), tGem, GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, tGem, 1L), GT_OreDictUnificator.get(OrePrefixes.gemChipped, aMaterial, tGem, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, tGem, 1L)}, new int[]{300, 1200, 4500, 1400, 2800, 3500}, 800, 16); - break; - default: - GT_Values.RA.addSifterRecipe(GT_Utility.copyAmount(1L, aStack), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, tGem, 1L), GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, tGem, 1L), tGem, GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, tGem, 1L), GT_OreDictUnificator.get(OrePrefixes.gemChipped, aMaterial, tGem, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, tGem, 1L)}, new int[]{100, 400, 1500, 2000, 4000, 5000}, 800, 16); - }} - break; - default: - break; - } - } + ItemStack tGem = GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L); + if (tGem != null) { + switch (aMaterial.mName) { + case "Tanzanite": + case "Sapphire": + case "Olivine": + case "GreenSapphire": + case "Opal": + case "Amethyst": + case "Emerald": + case "Ruby": + case "Amber": + case "Diamond": + case "FoolsRuby": + case "BlueTopaz": + case "GarnetRed": + case "Topaz": + case "Jasper": + case "GarnetYellow": + GT_Values.RA.addSifterRecipe( + GT_Utility.copyAmount(1L, aStack), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, tGem, 1L), + GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, tGem, 1L), + tGem, + GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, tGem, 1L), + GT_OreDictUnificator.get(OrePrefixes.gemChipped, aMaterial, tGem, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, tGem, 1L) + }, + new int[] {300, 1200, 4500, 1400, 2800, 3500}, + 800, + 16); + break; + default: + GT_Values.RA.addSifterRecipe( + GT_Utility.copyAmount(1L, aStack), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, tGem, 1L), + GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, tGem, 1L), + tGem, + GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, tGem, 1L), + GT_OreDictUnificator.get(OrePrefixes.gemChipped, aMaterial, tGem, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, tGem, 1L) + }, + new int[] {100, 400, 1500, 2000, 4000, 5000}, + 800, + 16); + } + } + break; + default: + break; + } + } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrystallized.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrystallized.java index cc3fbcf49b..ccd11b5d88 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrystallized.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrystallized.java @@ -15,8 +15,18 @@ public class ProcessingCrystallized implements gregtech.api.interfaces.IOreRecip } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - GT_Values.RA.addForgeHammerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), 10, 16); - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), null, 10, false); + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + GT_Values.RA.addForgeHammerRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), + 10, + 16); + GT_ModHandler.addPulverisationRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), + null, + 10, + false); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDirty.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDirty.java index 2682cf24a2..cc0b25345c 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDirty.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDirty.java @@ -18,25 +18,137 @@ public class ProcessingDirty implements gregtech.api.interfaces.IOreRecipeRegist } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, net.minecraft.item.ItemStack aStack) { - GT_Values.RA.addForgeHammerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L), 10, 16); - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), 1L), GT_OreDictUnificator.get(OrePrefixes.dust, GT_Utility.selectItemInList(0, aMaterial.mMacerateInto, aMaterial.mOreByProducts), 1L), 10, false); - GT_ModHandler.addOreWasherRecipe(GT_Utility.copyAmount(1L, aStack), new int[] {10000, 1111, 10000}, 1000, GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, GT_Utility.selectItemInList(0, aMaterial.mMacerateInto, aMaterial.mOreByProducts), 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L)); - GT_ModHandler.addThermalCentrifugeRecipe(GT_Utility.copyAmount(1L, aStack), new int[] {10000, 1111, 10000}, (int) Math.min(5000L, Math.abs(aMaterial.getMass() * 20L)), GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedCentrifuged : OrePrefixes.dust, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, GT_Utility.selectItemInList(1, aMaterial.mMacerateInto, aMaterial.mOreByProducts), 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L)); + public void registerOre( + OrePrefixes aPrefix, + Materials aMaterial, + String aOreDictName, + String aModName, + net.minecraft.item.ItemStack aStack) { + GT_Values.RA.addForgeHammerRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L), + 10, + 16); + GT_ModHandler.addPulverisationRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get( + OrePrefixes.dustImpure, + aMaterial.mMacerateInto, + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), + 1L), + GT_OreDictUnificator.get( + OrePrefixes.dust, + GT_Utility.selectItemInList(0, aMaterial.mMacerateInto, aMaterial.mOreByProducts), + 1L), + 10, + false); + GT_ModHandler.addOreWasherRecipe( + GT_Utility.copyAmount(1L, aStack), + new int[] {10000, 1111, 10000}, + 1000, + GT_OreDictUnificator.get( + aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, + aMaterial, + 1L), + GT_OreDictUnificator.get( + OrePrefixes.dust, + GT_Utility.selectItemInList(0, aMaterial.mMacerateInto, aMaterial.mOreByProducts), + 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L)); + GT_ModHandler.addThermalCentrifugeRecipe( + GT_Utility.copyAmount(1L, aStack), + new int[] {10000, 1111, 10000}, + (int) Math.min(5000L, Math.abs(aMaterial.getMass() * 20L)), + GT_OreDictUnificator.get( + aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedCentrifuged : OrePrefixes.dust, + aMaterial, + 1L), + GT_OreDictUnificator.get( + OrePrefixes.dust, + GT_Utility.selectItemInList(1, aMaterial.mMacerateInto, aMaterial.mOreByProducts), + 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L)); if (aMaterial.contains(SubTag.WASHING_MERCURY)) - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.Mercury.getFluid(1000L), GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8); + GT_Values.RA.addChemicalBathRecipe( + GT_Utility.copyAmount(1L, aStack), + Materials.Mercury.getFluid(1000L), + GT_OreDictUnificator.get( + aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, + aMaterial, + 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), + new int[] {10000, 7000, 4000}, + 800, + 8); if (aMaterial.contains(SubTag.WASHING_MERCURY_99_PERCENT)) - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.Mercury.getFluid(1000L), GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 9900, 4000}, 800, 8); + GT_Values.RA.addChemicalBathRecipe( + GT_Utility.copyAmount(1L, aStack), + Materials.Mercury.getFluid(1000L), + GT_OreDictUnificator.get( + aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, + aMaterial, + 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), + new int[] {10000, 9900, 4000}, + 800, + 8); if (aMaterial.contains(SubTag.WASHING_SODIUMPERSULFATE)) - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.SodiumPersulfate.getFluid(GT_Mod.gregtechproxy.mDisableOldChemicalRecipes ? 1000L : 100L), GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8); + GT_Values.RA.addChemicalBathRecipe( + GT_Utility.copyAmount(1L, aStack), + Materials.SodiumPersulfate.getFluid(GT_Mod.gregtechproxy.mDisableOldChemicalRecipes ? 1000L : 100L), + GT_OreDictUnificator.get( + aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, + aMaterial, + 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), + new int[] {10000, 7000, 4000}, + 800, + 8); for (Materials tMaterial : aMaterial.mOreByProducts) { if (tMaterial.contains(SubTag.WASHING_MERCURY)) - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.Mercury.getFluid(1000L), GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8); + GT_Values.RA.addChemicalBathRecipe( + GT_Utility.copyAmount(1L, aStack), + Materials.Mercury.getFluid(1000L), + GT_OreDictUnificator.get( + aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, + aMaterial, + 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial.mMacerateInto, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), + new int[] {10000, 7000, 4000}, + 800, + 8); if (tMaterial.contains(SubTag.WASHING_MERCURY_99_PERCENT)) - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.Mercury.getFluid(1000L), GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 9900, 4000}, 800, 8); + GT_Values.RA.addChemicalBathRecipe( + GT_Utility.copyAmount(1L, aStack), + Materials.Mercury.getFluid(1000L), + GT_OreDictUnificator.get( + aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, + aMaterial, + 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial.mMacerateInto, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), + new int[] {10000, 9900, 4000}, + 800, + 8); if (tMaterial.contains(SubTag.WASHING_SODIUMPERSULFATE)) - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.SodiumPersulfate.getFluid(GT_Mod.gregtechproxy.mDisableOldChemicalRecipes ? 1000L : 100L), GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8); + GT_Values.RA.addChemicalBathRecipe( + GT_Utility.copyAmount(1L, aStack), + Materials.SodiumPersulfate.getFluid( + GT_Mod.gregtechproxy.mDisableOldChemicalRecipes ? 1000L : 100L), + GT_OreDictUnificator.get( + aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, + aMaterial, + 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial.mMacerateInto, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), + new int[] {10000, 7000, 4000}, + 800, + 8); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java index a0e9292b19..3d4c13ecaa 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java @@ -11,11 +11,10 @@ import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_RecipeRegistrator; import gregtech.api.util.GT_Utility; +import java.util.ArrayList; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; -import java.util.ArrayList; - public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistrator { public ProcessingDust() { OrePrefixes.dust.add(this); @@ -27,45 +26,89 @@ public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistr } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { switch (aPrefix) { case dust: if (aMaterial.mFuelPower > 0) - GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aStack), null, aMaterial.mFuelPower, aMaterial.mFuelType); - if (GT_Utility.getFluidForFilledItem(GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), true) == null) - GT_Values.RA.addCannerRecipe(aStack, ItemList.Cell_Empty.get(1L), GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), null, 100, 1); + GT_Values.RA.addFuel( + GT_Utility.copyAmount(1L, aStack), null, aMaterial.mFuelPower, aMaterial.mFuelType); + if (GT_Utility.getFluidForFilledItem(GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), true) + == null) + GT_Values.RA.addCannerRecipe( + aStack, + ItemList.Cell_Empty.get(1L), + GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), + null, + 100, + 1); if (!aMaterial.mBlastFurnaceRequired) { GT_RecipeRegistrator.registerReverseFluidSmelting(aStack, aMaterial, aPrefix.mMaterialAmount, null); if (aMaterial.mSmeltInto.mArcSmeltInto != aMaterial) { - GT_RecipeRegistrator.registerReverseArcSmelting(GT_Utility.copyAmount(1L, aStack), aMaterial, aPrefix.mMaterialAmount, null, null, null); + GT_RecipeRegistrator.registerReverseArcSmelting( + GT_Utility.copyAmount(1L, aStack), + aMaterial, + aPrefix.mMaterialAmount, + null, + null, + null); } } ItemStack tDustStack; - if ((null != (tDustStack = GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L))) && (!aMaterial.contains(SubTag.NO_SMELTING))) { + if ((null != (tDustStack = GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L))) + && (!aMaterial.contains(SubTag.NO_SMELTING))) { if (aMaterial.mBlastFurnaceRequired) { GT_ModHandler.removeFurnaceSmelting(aStack); - if(aMaterial.mAutoGenerateBlastFurnaceRecipes) { - GT_Values.RA.addBlastRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 1L), null, null, aMaterial.mBlastFurnaceTemp > 1750 ? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial.mSmeltInto, tDustStack, 1L) : GT_Utility.copyAmount(1L, tDustStack), null, (int) Math.max(aMaterial.getMass() / 40L, 1L) * aMaterial.mBlastFurnaceTemp, 120, aMaterial.mBlastFurnaceTemp); + if (aMaterial.mAutoGenerateBlastFurnaceRecipes) { + GT_Values.RA.addBlastRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Circuit_Integrated.getWithDamage(0L, 1L), + null, + null, + aMaterial.mBlastFurnaceTemp > 1750 + ? GT_OreDictUnificator.get( + OrePrefixes.ingotHot, aMaterial.mSmeltInto, tDustStack, 1L) + : GT_Utility.copyAmount(1L, tDustStack), + null, + (int) Math.max(aMaterial.getMass() / 40L, 1L) * aMaterial.mBlastFurnaceTemp, + 120, + aMaterial.mBlastFurnaceTemp); } } else { GT_ModHandler.addSmeltingRecipe(aStack, tDustStack); } } else if (!aMaterial.contains(SubTag.NO_WORKING)) { - if ((!OrePrefixes.block.isIgnored(aMaterial)) && (null == GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L))) { - GT_ModHandler.addCompressionRecipe(GT_Utility.copyAmount(9L, aStack), GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L)); + if ((!OrePrefixes.block.isIgnored(aMaterial)) + && (null == GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L))) { + GT_ModHandler.addCompressionRecipe( + GT_Utility.copyAmount(9L, aStack), + GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L)); } // This is so disgustingly bad. - if (((OrePrefixes.block.isIgnored(aMaterial)) || (null == GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L))) && (aMaterial != Materials.GraniteRed) && (aMaterial != Materials.GraniteBlack) && (aMaterial != Materials.Basalt) && (aMaterial != Materials.Marble) && (aMaterial != Materials.Glass) && (aMaterial != Materials.Obsidian) && (aMaterial != Materials.Glowstone) && (aMaterial != Materials.Paper) && (aMaterial != Materials.TranscendentMetal) && (aMaterial != Materials.Clay)) { - GT_ModHandler.addCompressionRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L)); + if (((OrePrefixes.block.isIgnored(aMaterial)) + || (null == GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L))) + && (aMaterial != Materials.GraniteRed) + && (aMaterial != Materials.GraniteBlack) + && (aMaterial != Materials.Basalt) + && (aMaterial != Materials.Marble) + && (aMaterial != Materials.Glass) + && (aMaterial != Materials.Obsidian) + && (aMaterial != Materials.Glowstone) + && (aMaterial != Materials.Paper) + && (aMaterial != Materials.TranscendentMetal) + && (aMaterial != Materials.Clay)) { + GT_ModHandler.addCompressionRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L)); } } - if ((aMaterial.mMaterialList.size() > 0) && ((aMaterial.mExtraData & 0x3) != 0)) { long tItemAmount = 0L; long tCapsuleCount = 0L; - long tDensityMultiplier = aMaterial.getDensity() > 3628800L ? aMaterial.getDensity() / 3628800L : 1L; + long tDensityMultiplier = + aMaterial.getDensity() > 3628800L ? aMaterial.getDensity() / 3628800L : 1L; ArrayList<ItemStack> tList = new ArrayList<>(); for (MaterialStack tMat : aMaterial.mMaterialList) if (tMat.mAmount > 0L) { @@ -74,143 +117,405 @@ public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistr } else { tDustStack = GT_OreDictUnificator.get(OrePrefixes.dust, tMat.mMaterial, tMat.mAmount); if (tDustStack == null) - tDustStack = GT_OreDictUnificator.get(OrePrefixes.cell, tMat.mMaterial, tMat.mAmount); + tDustStack = + GT_OreDictUnificator.get(OrePrefixes.cell, tMat.mMaterial, tMat.mAmount); } - if (tItemAmount + tMat.mAmount * 3628800L <= aStack.getMaxStackSize() * aMaterial.getDensity()) { + if (tItemAmount + tMat.mAmount * 3628800L + <= aStack.getMaxStackSize() * aMaterial.getDensity()) { tItemAmount += tMat.mAmount * 3628800L; if (tDustStack != null) { tDustStack.stackSize = ((int) (tDustStack.stackSize * tDensityMultiplier)); - while ((tDustStack.stackSize > 64) && (tList.size() < 6) && (tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCount(tDustStack) * 64 <= 64L)) { + while ((tDustStack.stackSize > 64) + && (tList.size() < 6) + && (tCapsuleCount + + GT_ModHandler.getCapsuleCellContainerCount(tDustStack) + * 64 + <= 64L)) { tCapsuleCount += GT_ModHandler.getCapsuleCellContainerCount(tDustStack) * 64; tList.add(GT_Utility.copyAmount(64L, tDustStack)); tDustStack.stackSize -= 64; } - if ((tDustStack.stackSize > 0) && (tList.size() < 6) && (tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(tDustStack) <= 64L)) { - tCapsuleCount += GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(tDustStack); + if ((tDustStack.stackSize > 0) + && (tList.size() < 6) + && (tCapsuleCount + + GT_ModHandler + .getCapsuleCellContainerCountMultipliedWithStackSize( + tDustStack) + <= 64L)) { + tCapsuleCount += + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize( + tDustStack); tList.add(tDustStack); } } } } - tItemAmount = (tItemAmount * tDensityMultiplier % aMaterial.getDensity() > 0L ? 1 : 0) + tItemAmount * tDensityMultiplier / aMaterial.getDensity(); + tItemAmount = (tItemAmount * tDensityMultiplier % aMaterial.getDensity() > 0L ? 1 : 0) + + tItemAmount * tDensityMultiplier / aMaterial.getDensity(); if (tList.size() > 0) { FluidStack tFluid = null; int tList_sS = tList.size(); for (int i = 0; i < tList_sS; i++) { - if ((!ItemList.Cell_Air.isStackEqual(tList.get(i))) && ((tFluid = GT_Utility.getFluidForFilledItem((ItemStack) tList.get(i), true)) != null)) { + if ((!ItemList.Cell_Air.isStackEqual(tList.get(i))) + && ((tFluid = GT_Utility.getFluidForFilledItem((ItemStack) tList.get(i), true)) + != null)) { tFluid.amount *= tList.get(i).stackSize; - tCapsuleCount -= GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize((ItemStack) tList.get(i)); + tCapsuleCount -= GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize( + (ItemStack) tList.get(i)); tList.remove(i); break; } } if ((aMaterial.mExtraData & 0x1) != 0) - GT_Values.RA.addElectrolyzerRecipe(GT_Utility.copyAmount(tItemAmount, aStack), tCapsuleCount > 0L ? ItemList.Cell_Empty.get(tCapsuleCount) : null, null, tFluid, tList.size() < 1 ? null : (ItemStack) tList.get(0), tList.size() < 2 ? null : (ItemStack) tList.get(1), tList.size() < 3 ? null : (ItemStack) tList.get(2), tList.size() < 4 ? null : (ItemStack) tList.get(3), tList.size() < 5 ? null : (ItemStack) tList.get(4), tList.size() < 6 ? null : (ItemStack) tList.get(5), null, (int) Math.max(1L, Math.abs(aMaterial.getProtons() * 2L * tItemAmount)), Math.min(4, tList.size()) * 30); + GT_Values.RA.addElectrolyzerRecipe( + GT_Utility.copyAmount(tItemAmount, aStack), + tCapsuleCount > 0L ? ItemList.Cell_Empty.get(tCapsuleCount) : null, + null, + tFluid, + tList.size() < 1 ? null : (ItemStack) tList.get(0), + tList.size() < 2 ? null : (ItemStack) tList.get(1), + tList.size() < 3 ? null : (ItemStack) tList.get(2), + tList.size() < 4 ? null : (ItemStack) tList.get(3), + tList.size() < 5 ? null : (ItemStack) tList.get(4), + tList.size() < 6 ? null : (ItemStack) tList.get(5), + null, + (int) Math.max(1L, Math.abs(aMaterial.getProtons() * 2L * tItemAmount)), + Math.min(4, tList.size()) * 30); if ((aMaterial.mExtraData & 0x2) != 0) { - GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(tItemAmount, aStack), tCapsuleCount > 0L ? ItemList.Cell_Empty.get(tCapsuleCount) : null, null, tFluid, tList.size() < 1 ? null : (ItemStack) tList.get(0), tList.size() < 2 ? null : (ItemStack) tList.get(1), tList.size() < 3 ? null : (ItemStack) tList.get(2), tList.size() < 4 ? null : (ItemStack) tList.get(3), tList.size() < 5 ? null : (ItemStack) tList.get(4), tList.size() < 6 ? null : (ItemStack) tList.get(5), null, (int) Math.max(1L, Math.abs(aMaterial.getMass() * 4L * tItemAmount)), Math.min(4, tList.size()) * 5); + GT_Values.RA.addCentrifugeRecipe( + GT_Utility.copyAmount(tItemAmount, aStack), + tCapsuleCount > 0L ? ItemList.Cell_Empty.get(tCapsuleCount) : null, + null, + tFluid, + tList.size() < 1 ? null : (ItemStack) tList.get(0), + tList.size() < 2 ? null : (ItemStack) tList.get(1), + tList.size() < 3 ? null : (ItemStack) tList.get(2), + tList.size() < 4 ? null : (ItemStack) tList.get(3), + tList.size() < 5 ? null : (ItemStack) tList.get(4), + tList.size() < 6 ? null : (ItemStack) tList.get(5), + null, + (int) Math.max(1L, Math.abs(aMaterial.getMass() * 4L * tItemAmount)), + Math.min(4, tList.size()) * 5); } } } if (aMaterial.contains(SubTag.CRYSTALLISABLE)) { - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, aStack), GT_Utility.getIntegratedCircuit(1), Materials.Water.getFluid(200L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 7000, 2000, 24, false); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, aStack), GT_Utility.getIntegratedCircuit(2), GT_ModHandler.getDistilledWater(100L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 9000, 1500, 24, false); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, aStack), GT_Utility.getIntegratedCircuit(3), Materials.Void.getMolten(36L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 10000, 1200, 24, false); + GT_Values.RA.addAutoclaveRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_Utility.getIntegratedCircuit(1), + Materials.Water.getFluid(200L), + GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), + 7000, + 2000, + 24, + false); + GT_Values.RA.addAutoclaveRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_Utility.getIntegratedCircuit(2), + GT_ModHandler.getDistilledWater(100L), + GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), + 9000, + 1500, + 24, + false); + GT_Values.RA.addAutoclaveRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_Utility.getIntegratedCircuit(3), + Materials.Void.getMolten(36L), + GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), + 10000, + 1200, + 24, + false); } switch (aMaterial.mName) { case "NULL": break; case "Glass": - GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, aStack), new ItemStack(net.minecraft.init.Blocks.glass)); + GT_ModHandler.addSmeltingRecipe( + GT_Utility.copyAmount(1L, aStack), new ItemStack(net.minecraft.init.Blocks.glass)); break; - case "NetherQuartz": case "Quartz": case "CertusQuartz": - if (gregtech.api.GregTech_API.sRecipeFile.get(gregtech.api.enums.ConfigCategories.Recipes.disabledrecipes, "QuartzDustSmeltingIntoAESilicon", true)) - GT_ModHandler.removeFurnaceSmelting(aStack); + case "NetherQuartz": + case "Quartz": + case "CertusQuartz": + if (gregtech.api.GregTech_API.sRecipeFile.get( + gregtech.api.enums.ConfigCategories.Recipes.disabledrecipes, + "QuartzDustSmeltingIntoAESilicon", + true)) GT_ModHandler.removeFurnaceSmelting(aStack); break; case "MeatRaw": - GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.MeatCooked, 1L)); + GT_ModHandler.addSmeltingRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.MeatCooked, 1L)); break; case "Mercury": break; case "Oilsands": - GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(true, new ItemStack[]{GT_Utility.copyAmount(1L, aStack)}, null, null, null, new FluidStack[]{Materials.OilHeavy.getFluid(1000)}, 660, 8, 0); + GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe( + true, + new ItemStack[] {GT_Utility.copyAmount(1L, aStack)}, + null, + null, + null, + new FluidStack[] {Materials.OilHeavy.getFluid(1000)}, + 660, + 8, + 0); break; case "Coal": break; case "HydratedCoal": - GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L)); + GT_ModHandler.addSmeltingRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L)); break; case "Diamond": - GT_Values.RA.addImplosionRecipe(GT_Utility.copyAmount(4L, aStack), 32, ItemList.IC2_Industrial_Diamond.get(3L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 16L)); + GT_Values.RA.addImplosionRecipe( + GT_Utility.copyAmount(4L, aStack), + 32, + ItemList.IC2_Industrial_Diamond.get(3L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 16L)); break; - case "Opal": case "Olivine": case "Emerald": case "Ruby": case "Sapphire": case "GreenSapphire": case "Topaz": case "BlueTopaz": case "Tanzanite": case "Amethyst": - GT_Values.RA.addImplosionRecipe(GT_Utility.copyAmount(4L, aStack), 24, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 3L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 12L)); + case "Opal": + case "Olivine": + case "Emerald": + case "Ruby": + case "Sapphire": + case "GreenSapphire": + case "Topaz": + case "BlueTopaz": + case "Tanzanite": + case "Amethyst": + GT_Values.RA.addImplosionRecipe( + GT_Utility.copyAmount(4L, aStack), + 24, + GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 3L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 12L)); break; - case "FoolsRuby": case "GarnetRed": case "GarnetYellow": case "Jasper": case "Amber": case "Monazite": case "Forcicium": case "Forcillium": case "Force": - GT_Values.RA.addImplosionRecipe(GT_Utility.copyAmount(4L, aStack), 16, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 3L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 8L)); + case "FoolsRuby": + case "GarnetRed": + case "GarnetYellow": + case "Jasper": + case "Amber": + case "Monazite": + case "Forcicium": + case "Forcillium": + case "Force": + GT_Values.RA.addImplosionRecipe( + GT_Utility.copyAmount(4L, aStack), + 16, + GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 3L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 8L)); } break; - case dustPure: case dustImpure:case dustRefined: - Materials tByProduct = (Materials) GT_Utility.selectItemInList(aPrefix == OrePrefixes.dustRefined ? 2 : aPrefix == OrePrefixes.dustPure ? 1 : 0, aMaterial, aMaterial.mOreByProducts); + case dustPure: + case dustImpure: + case dustRefined: + Materials tByProduct = (Materials) GT_Utility.selectItemInList( + aPrefix == OrePrefixes.dustRefined ? 2 : aPrefix == OrePrefixes.dustPure ? 1 : 0, + aMaterial, + aMaterial.mOreByProducts); if (aPrefix == OrePrefixes.dustPure) { if (aMaterial.contains(SubTag.ELECTROMAGNETIC_SEPERATION_GOLD)) - GT_Values.RA.addElectromagneticSeparatorRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Gold, 1L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Gold, 1L), new int[]{10000, 4000, 2000}, 400, 24); + GT_Values.RA.addElectromagneticSeparatorRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Gold, 1L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Gold, 1L), + new int[] {10000, 4000, 2000}, + 400, + 24); if (aMaterial.contains(SubTag.ELECTROMAGNETIC_SEPERATION_IRON)) - GT_Values.RA.addElectromagneticSeparatorRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Iron, 1L), new int[]{10000, 4000, 2000}, 400, 24); + GT_Values.RA.addElectromagneticSeparatorRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Iron, 1L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Iron, 1L), + new int[] {10000, 4000, 2000}, + 400, + 24); if (aMaterial.contains(SubTag.ELECTROMAGNETIC_SEPERATION_NEODYMIUM)) { - GT_Values.RA.addElectromagneticSeparatorRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Neodymium, 1L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Neodymium, 1L), new int[]{10000, 4000, 2000}, 400, 24); + GT_Values.RA.addElectromagneticSeparatorRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Neodymium, 1L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Neodymium, 1L), + new int[] {10000, 4000, 2000}, + 400, + 24); } } if (aMaterial.contains(SubTag.CRYSTALLISABLE)) { - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, aStack), GT_Utility.getIntegratedCircuit(1), Materials.Water.getFluid(200L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 9000, 2000, 24, false); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, aStack), GT_Utility.getIntegratedCircuit(2), gregtech.api.util.GT_ModHandler.getDistilledWater(100L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 9500, 1500, 24, false); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, aStack), GT_Utility.getIntegratedCircuit(3), Materials.Void.getMolten(36L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 10000, 1200, 24, false); + GT_Values.RA.addAutoclaveRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_Utility.getIntegratedCircuit(1), + Materials.Water.getFluid(200L), + GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), + 9000, + 2000, + 24, + false); + GT_Values.RA.addAutoclaveRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_Utility.getIntegratedCircuit(2), + gregtech.api.util.GT_ModHandler.getDistilledWater(100L), + GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), + 9500, + 1500, + 24, + false); + GT_Values.RA.addAutoclaveRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_Utility.getIntegratedCircuit(3), + Materials.Void.getMolten(36L), + GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), + 10000, + 1200, + 24, + false); } - ItemStack tImpureStack = GT_OreDictUnificator.get(OrePrefixes.dustTiny, tByProduct, GT_OreDictUnificator.get(OrePrefixes.nugget, tByProduct, 1L), 1L); + ItemStack tImpureStack = GT_OreDictUnificator.get( + OrePrefixes.dustTiny, + tByProduct, + GT_OreDictUnificator.get(OrePrefixes.nugget, tByProduct, 1L), + 1L); if (tImpureStack == null) { tImpureStack = GT_OreDictUnificator.get(OrePrefixes.dustSmall, tByProduct, 1L); if (tImpureStack == null) { - tImpureStack = GT_OreDictUnificator.get(OrePrefixes.dust, tByProduct, GT_OreDictUnificator.get(OrePrefixes.gem, tByProduct, 1L), 1L); + tImpureStack = GT_OreDictUnificator.get( + OrePrefixes.dust, + tByProduct, + GT_OreDictUnificator.get(OrePrefixes.gem, tByProduct, 1L), + 1L); if (tImpureStack == null) { tImpureStack = GT_OreDictUnificator.get(OrePrefixes.cell, tByProduct, 1L); if (tImpureStack == null) { - GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(1L, aStack), 0, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), null, null, null, null, null, (int) Math.max(1L, aMaterial.getMass())); + GT_Values.RA.addCentrifugeRecipe( + GT_Utility.copyAmount(1L, aStack), + 0, + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), + null, + null, + null, + null, + null, + (int) Math.max(1L, aMaterial.getMass())); } else { FluidStack tFluid = GT_Utility.getFluidForFilledItem(tImpureStack, true); if (tFluid == null) { - GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(9L, aStack), 1, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 9L), tImpureStack, null, null, null, null, (int) Math.max(1L, aMaterial.getMass() * 72L)); + GT_Values.RA.addCentrifugeRecipe( + GT_Utility.copyAmount(9L, aStack), + 1, + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 9L), + tImpureStack, + null, + null, + null, + null, + (int) Math.max(1L, aMaterial.getMass() * 72L)); } else { tFluid.amount /= 10; - GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(1L, aStack), null, null, tFluid, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), null, null, null, null, null, null, (int) Math.max(1L, aMaterial.getMass() * 8L), 5); + GT_Values.RA.addCentrifugeRecipe( + GT_Utility.copyAmount(1L, aStack), + null, + null, + tFluid, + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), + null, + null, + null, + null, + null, + null, + (int) Math.max(1L, aMaterial.getMass() * 8L), + 5); } } } else { - GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(9L, aStack), 0, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 9L), tImpureStack, null, null, null, null, (int) Math.max(1L, aMaterial.getMass() * 72L)); + GT_Values.RA.addCentrifugeRecipe( + GT_Utility.copyAmount(9L, aStack), + 0, + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 9L), + tImpureStack, + null, + null, + null, + null, + (int) Math.max(1L, aMaterial.getMass() * 72L)); } } else { - GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(2L, aStack), 0, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 2L), tImpureStack, null, null, null, null, (int) Math.max(1L, aMaterial.getMass() * 16L)); + GT_Values.RA.addCentrifugeRecipe( + GT_Utility.copyAmount(2L, aStack), + 0, + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 2L), + tImpureStack, + null, + null, + null, + null, + (int) Math.max(1L, aMaterial.getMass() * 16L)); } } else { - GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(1L, aStack), null, null, null, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, tByProduct, GT_OreDictUnificator.get(OrePrefixes.nugget, tByProduct, 1L), 1L), null, null, null, null, new int[]{10000, 1111}, (int) Math.max(1L, aMaterial.getMass() * 8L), 5); + GT_Values.RA.addCentrifugeRecipe( + GT_Utility.copyAmount(1L, aStack), + null, + null, + null, + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), + GT_OreDictUnificator.get( + OrePrefixes.dust, + tByProduct, + GT_OreDictUnificator.get(OrePrefixes.nugget, tByProduct, 1L), + 1L), + null, + null, + null, + null, + new int[] {10000, 1111}, + (int) Math.max(1L, aMaterial.getMass() * 8L), + 5); } break; case dustSmall: - GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(4L, aStack), ItemList.Schematic_Dust.get(0L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), 20, 4); + GT_Values.RA.addBoxingRecipe( + GT_Utility.copyAmount(4L, aStack), + ItemList.Schematic_Dust.get(0L), + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), + 20, + 4); if (!aMaterial.mBlastFurnaceRequired) { GT_RecipeRegistrator.registerReverseFluidSmelting(aStack, aMaterial, aPrefix.mMaterialAmount, null); if (aMaterial.mSmeltInto.mArcSmeltInto != aMaterial) { - GT_RecipeRegistrator.registerReverseArcSmelting(GT_Utility.copyAmount(1L, aStack), aMaterial, aPrefix.mMaterialAmount, null, null, null); + GT_RecipeRegistrator.registerReverseArcSmelting( + GT_Utility.copyAmount(1L, aStack), + aMaterial, + aPrefix.mMaterialAmount, + null, + null, + null); } } break; case dustTiny: - GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(9L, aStack), ItemList.Schematic_Dust.get(0L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), 20, 4); + GT_Values.RA.addBoxingRecipe( + GT_Utility.copyAmount(9L, aStack), + ItemList.Schematic_Dust.get(0L), + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), + 20, + 4); if (!aMaterial.mBlastFurnaceRequired) { GT_RecipeRegistrator.registerReverseFluidSmelting(aStack, aMaterial, aPrefix.mMaterialAmount, null); if (aMaterial.mSmeltInto.mArcSmeltInto != aMaterial) { - GT_RecipeRegistrator.registerReverseArcSmelting(GT_Utility.copyAmount(1L, aStack), aMaterial, aPrefix.mMaterialAmount, null, null, null); + GT_RecipeRegistrator.registerReverseArcSmelting( + GT_Utility.copyAmount(1L, aStack), + aMaterial, + aPrefix.mMaterialAmount, + null, + null, + null); } } if (!aMaterial.contains(gregtech.api.enums.SubTag.NO_SMELTING)) { @@ -219,8 +524,8 @@ public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistr } } break; - default: - break; + default: + break; } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDye.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDye.java index 4714f68be3..573081b6cc 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDye.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDye.java @@ -8,27 +8,63 @@ import gregtech.api.interfaces.IOreRecipeRegistrator; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; +import java.util.Locale; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidRegistry; -import java.util.Locale; - public class ProcessingDye implements IOreRecipeRegistrator { public ProcessingDye() { OrePrefixes.dye.add(this); } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { Dyes aDye = Dyes.get(aOreDictName); - if ((aDye.mIndex >= 0) && (aDye.mIndex < 16) && - (GT_Utility.getContainerItem(aStack, true) == null)) { - GT_ModHandler.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 8L), GT_Utility.copyAmount(1L, aStack), new ItemStack(Blocks.stained_glass, 8, 15 - aDye.mIndex), 200, 8, false); - GT_ModHandler.addAlloySmelterRecipe(new ItemStack(Blocks.glass, 8, 32767), GT_Utility.copyAmount(1L, aStack), new ItemStack(Blocks.stained_glass, 8, 15 - aDye.mIndex), 200, 8, false); - GT_Values.RA.addMixerRecipe(GT_Utility.copyAmount(1L, aStack), GT_Utility.getIntegratedCircuit(1), null, null, Materials.Water.getFluid(216L), FluidRegistry.getFluidStack("dye.watermixed." + aDye.name().toLowerCase(Locale.ENGLISH), 192), null, 16, 4); - GT_Values.RA.addMixerRecipe(GT_Utility.copyAmount(1L, aStack), GT_Utility.getIntegratedCircuit(1), null, null, GT_ModHandler.getDistilledWater(288L), FluidRegistry.getFluidStack("dye.watermixed." + aDye.name().toLowerCase(Locale.ENGLISH), 216), null, 16, 4); - GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Salt, 2), Materials.SulfuricAcid.getFluid(432), FluidRegistry.getFluidStack("dye.chemical." + aDye.name().toLowerCase(Locale.ENGLISH), 288), GT_Values.NI, 600, 48); + if ((aDye.mIndex >= 0) && (aDye.mIndex < 16) && (GT_Utility.getContainerItem(aStack, true) == null)) { + GT_ModHandler.addAlloySmelterRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 8L), + GT_Utility.copyAmount(1L, aStack), + new ItemStack(Blocks.stained_glass, 8, 15 - aDye.mIndex), + 200, + 8, + false); + GT_ModHandler.addAlloySmelterRecipe( + new ItemStack(Blocks.glass, 8, 32767), + GT_Utility.copyAmount(1L, aStack), + new ItemStack(Blocks.stained_glass, 8, 15 - aDye.mIndex), + 200, + 8, + false); + GT_Values.RA.addMixerRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_Utility.getIntegratedCircuit(1), + null, + null, + Materials.Water.getFluid(216L), + FluidRegistry.getFluidStack("dye.watermixed." + aDye.name().toLowerCase(Locale.ENGLISH), 192), + null, + 16, + 4); + GT_Values.RA.addMixerRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_Utility.getIntegratedCircuit(1), + null, + null, + GT_ModHandler.getDistilledWater(288L), + FluidRegistry.getFluidStack("dye.watermixed." + aDye.name().toLowerCase(Locale.ENGLISH), 216), + null, + 16, + 4); + GT_Values.RA.addChemicalRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Salt, 2), + Materials.SulfuricAcid.getFluid(432), + FluidRegistry.getFluidStack("dye.chemical." + aDye.name().toLowerCase(Locale.ENGLISH), 288), + GT_Values.NI, + 600, + 48); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingFineWire.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingFineWire.java index 93cf4e4f10..458146ffd7 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingFineWire.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingFineWire.java @@ -16,13 +16,30 @@ public class ProcessingFineWire implements gregtech.api.interfaces.IOreRecipeReg } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if (!aMaterial.contains(gregtech.api.enums.SubTag.NO_SMASHING)) { - GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), GT_Utility.copy(GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 2L), GT_Utility.copyAmount(8L, aStack)), 100, 4); - GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1L), GT_Utility.copy(GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 1L), GT_Utility.copyAmount(4L, aStack)), 50, 4); + GT_Values.RA.addWiremillRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), + GT_Utility.copy( + GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 2L), + GT_Utility.copyAmount(8L, aStack)), + 100, + 4); + GT_Values.RA.addWiremillRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1L), + GT_Utility.copy( + GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 1L), + GT_Utility.copyAmount(4L, aStack)), + 50, + 4); } - if ((aMaterial.mUnificatable) && (aMaterial.mMaterialInto == aMaterial) && !aMaterial.contains(SubTag.NO_WORKING)) { - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, aStack), GT_Proxy.tBits, new Object[]{"Xx", 'X', OrePrefixes.foil.get(aMaterial)}); + if ((aMaterial.mUnificatable) + && (aMaterial.mMaterialInto == aMaterial) + && !aMaterial.contains(SubTag.NO_WORKING)) { + GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, aStack), GT_Proxy.tBits, new Object[] { + "Xx", 'X', OrePrefixes.foil.get(aMaterial) + }); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingFoil.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingFoil.java index 5d539db902..7a85572b5b 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingFoil.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingFoil.java @@ -16,8 +16,14 @@ public class ProcessingFoil implements IOreRecipeRegistrator { } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(1L, GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 4L)), GT_OreDictUnificator.get(OrePrefixes.foil, aMaterial, 4L), (int) Math.max(aMaterial.getMass(), 1L), 24); - GregTech_API.registerCover(aStack, TextureFactory.of(aMaterial.mIconSet.mTextures[70], aMaterial.mRGBa, false), null); + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + GT_Values.RA.addBenderRecipe( + GT_Utility.copyAmount(1L, GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 4L)), + GT_OreDictUnificator.get(OrePrefixes.foil, aMaterial, 4L), + (int) Math.max(aMaterial.getMass(), 1L), + 24); + GregTech_API.registerCover( + aStack, TextureFactory.of(aMaterial.mIconSet.mTextures[70], aMaterial.mRGBa, false), null); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingFood.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingFood.java index 771ff840f6..905bb58fe7 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingFood.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingFood.java @@ -15,23 +15,68 @@ public class ProcessingFood implements gregtech.api.interfaces.IOreRecipeRegistr } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { switch (aOreDictName) { case "foodCheese": - GT_Values.RA.addSlicerRecipe(aStack, ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Cheese.get(4L), 64, 4); + GT_Values.RA.addSlicerRecipe( + aStack, ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Cheese.get(4L), 64, 4); GT_OreDictUnificator.addItemData(aStack, new gregtech.api.objects.ItemData(Materials.Cheese, 3628800L)); break; case "foodDough": GT_ModHandler.removeFurnaceSmelting(aStack); - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Food_Flat_Dough.get(1L), 16, 4); + GT_Values.RA.addBenderRecipe( + GT_Utility.copyAmount(1L, aStack), ItemList.Food_Flat_Dough.get(1L), 16, 4); - GT_Values.RA.addMixerRecipe(aStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L), null, null, null, null, ItemList.Food_Dough_Sugar.get(2L), 32, 8); - GT_Values.RA.addMixerRecipe(aStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cocoa, 1L), null, null, null, null, ItemList.Food_Dough_Chocolate.get(2L), 32, 8); - GT_Values.RA.addMixerRecipe(aStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chocolate, 1L), null, null, null, null, ItemList.Food_Dough_Chocolate.get(2L), 32, 8); + GT_Values.RA.addMixerRecipe( + aStack, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L), + null, + null, + null, + null, + ItemList.Food_Dough_Sugar.get(2L), + 32, + 8); + GT_Values.RA.addMixerRecipe( + aStack, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cocoa, 1L), + null, + null, + null, + null, + ItemList.Food_Dough_Chocolate.get(2L), + 32, + 8); + GT_Values.RA.addMixerRecipe( + aStack, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chocolate, 1L), + null, + null, + null, + null, + ItemList.Food_Dough_Chocolate.get(2L), + 32, + 8); - GT_Values.RA.addFormingPressRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Mold_Bun.get(0L), ItemList.Food_Raw_Bun.get(1L), 128, 4); - GT_Values.RA.addFormingPressRecipe(GT_Utility.copyAmount(2L, aStack), ItemList.Shape_Mold_Bread.get(0L), ItemList.Food_Raw_Bread.get(1L), 256, 4); - GT_Values.RA.addFormingPressRecipe(GT_Utility.copyAmount(3L, aStack), ItemList.Shape_Mold_Baguette.get(0L), ItemList.Food_Raw_Baguette.get(1L), 384, 4); + GT_Values.RA.addFormingPressRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Shape_Mold_Bun.get(0L), + ItemList.Food_Raw_Bun.get(1L), + 128, + 4); + GT_Values.RA.addFormingPressRecipe( + GT_Utility.copyAmount(2L, aStack), + ItemList.Shape_Mold_Bread.get(0L), + ItemList.Food_Raw_Bread.get(1L), + 256, + 4); + GT_Values.RA.addFormingPressRecipe( + GT_Utility.copyAmount(3L, aStack), + ItemList.Shape_Mold_Baguette.get(0L), + ItemList.Food_Raw_Baguette.get(1L), + 384, + 4); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingGear.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingGear.java index 90bf5c4670..d05d2188b7 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingGear.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingGear.java @@ -15,47 +15,112 @@ public class ProcessingGear implements gregtech.api.interfaces.IOreRecipeRegistr } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { switch (aPrefix) { case gearGt: GT_ModHandler.removeRecipeByOutputDelayed(aStack); if (aMaterial.mStandardMoltenFluid != null) if (!(aMaterial == Materials.AnnealedCopper || aMaterial == Materials.WroughtIron)) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Gear.get(0L), aMaterial.getMolten(576L), GT_OreDictUnificator.get(aPrefix, aMaterial, 1L), 128, 8); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Gear.get(0L), + aMaterial.getMolten(576L), + GT_OreDictUnificator.get(aPrefix, aMaterial, 1L), + 128, + 8); } - if (aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial) && !aMaterial.contains(SubTag.NO_WORKING)) { + if (aMaterial.mUnificatable + && (aMaterial.mMaterialInto == aMaterial) + && !aMaterial.contains(SubTag.NO_WORKING)) { switch (aMaterial.mName) { case "Wood": - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"SPS", "PsP", "SPS", 'P', OrePrefixes.plank.get(aMaterial), 'S', OrePrefixes.stick.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] { + "SPS", + "PsP", + "SPS", + 'P', + OrePrefixes.plank.get(aMaterial), + 'S', + OrePrefixes.stick.get(aMaterial) + }); break; case "Stone": - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"SPS", "PfP", "SPS", 'P', OrePrefixes.stoneSmooth, 'S', new ItemStack(Blocks.stone_button, 1, 32767)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] { + "SPS", + "PfP", + "SPS", + 'P', + OrePrefixes.stoneSmooth, + 'S', + new ItemStack(Blocks.stone_button, 1, 32767) + }); break; default: - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"SPS", "PwP", "SPS", 'P', OrePrefixes.plate.get(aMaterial), 'S', OrePrefixes.stick.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] { + "SPS", + "PwP", + "SPS", + 'P', + OrePrefixes.plate.get(aMaterial), + 'S', + OrePrefixes.stick.get(aMaterial) + }); } } break; case gearGtSmall: if (aMaterial.mStandardMoltenFluid != null) if (!(aMaterial == Materials.AnnealedCopper || aMaterial == Materials.WroughtIron)) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Gear_Small.get(0L), aMaterial.getMolten(144L), GT_Utility.copyAmount(1L, aStack), 16, 8); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Gear_Small.get(0L), + aMaterial.getMolten(144L), + GT_Utility.copyAmount(1L, aStack), + 16, + 8); } - if (aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial) && !aMaterial.contains(SubTag.NO_WORKING)) { + if (aMaterial.mUnificatable + && (aMaterial.mMaterialInto == aMaterial) + && !aMaterial.contains(SubTag.NO_WORKING)) { switch (aMaterial.mName) { case "Wood": - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"P ", " s", 'P', OrePrefixes.plank.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] {"P ", " s", 'P', OrePrefixes.plank.get(aMaterial)}); break; case "Stone": - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"P ", " f", 'P', OrePrefixes.stoneSmooth}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] {"P ", " f", 'P', OrePrefixes.stoneSmooth}); break; default: - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, aMaterial, 1L), GT_Proxy.tBits, new Object[]{" S ", "hPx"," S ", 'S', OrePrefixes.stick.get(aMaterial), 'P', OrePrefixes.plate.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] { + " S ", + "hPx", + " S ", + 'S', + OrePrefixes.stick.get(aMaterial), + 'P', + OrePrefixes.plate.get(aMaterial) + }); } } break; - default: - break; + default: + break; } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingGem.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingGem.java index 3bd18a3dc2..411309f396 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingGem.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingGem.java @@ -9,7 +9,8 @@ import gregtech.common.GT_Proxy; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; -public class ProcessingGem implements gregtech.api.interfaces.IOreRecipeRegistrator {//TODO COMPARE WITH GEM??? generators +public class ProcessingGem + implements gregtech.api.interfaces.IOreRecipeRegistrator { // TODO COMPARE WITH GEM??? generators public ProcessingGem() { OrePrefixes.gem.add(this); OrePrefixes.gemChipped.add(this); @@ -19,133 +20,285 @@ public class ProcessingGem implements gregtech.api.interfaces.IOreRecipeRegistra } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { long aMaterialMass = aMaterial.getMass(); boolean aNoSmashing = aMaterial.contains(SubTag.NO_SMASHING); boolean aNoWorking = aMaterial.contains(SubTag.NO_WORKING); boolean aNoSmelting = aMaterial.contains(SubTag.NO_SMELTING); - boolean aSpecialRecipeReq = (aMaterial.contains(SubTag.MORTAR_GRINDABLE)) && (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, aMaterial.mName, true)); + boolean aSpecialRecipeReq = (aMaterial.contains(SubTag.MORTAR_GRINDABLE)) + && (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, aMaterial.mName, true)); boolean aFuelPower = aMaterial.mFuelPower > 0; switch (aPrefix) { case gem: if (aFuelPower) { - GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aStack), null, aMaterial.mFuelPower * 2, aMaterial.mFuelType); + GT_Values.RA.addFuel( + GT_Utility.copyAmount(1L, aStack), null, aMaterial.mFuelPower * 2, aMaterial.mFuelType); } if (!OrePrefixes.block.isIgnored(aMaterial)) { - GT_ModHandler.addCompressionRecipe(GT_Utility.copyAmount(9L, aStack), GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L)); + GT_ModHandler.addCompressionRecipe( + GT_Utility.copyAmount(9L, aStack), + GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L)); } if (!aNoSmelting) { - GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L)); + GT_ModHandler.addSmeltingRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L)); } if (aNoSmashing) { - GT_Values.RA.addForgeHammerRecipe(aStack, GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, 2L), 64, 16); + GT_Values.RA.addForgeHammerRecipe( + aStack, GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, 2L), 64, 16); } else { - GT_Values.RA.addForgeHammerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), (int) Math.max(aMaterialMass, 1L), 16); - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), (int) Math.max(aMaterialMass * 2L, 1L), 24); - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(2L, aStack), GT_OreDictUnificator.get(OrePrefixes.plateDouble, aMaterial, 1L), (int) Math.max(aMaterialMass * 2L, 1L), 96); - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(3L, aStack), GT_OreDictUnificator.get(OrePrefixes.plateTriple, aMaterial, 1L), (int) Math.max(aMaterialMass * 3L, 1L), 96); - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(4L, aStack), GT_OreDictUnificator.get(OrePrefixes.plateQuadruple, aMaterial, 1L), (int) Math.max(aMaterialMass * 4L, 1L), 96); - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(5L, aStack), GT_OreDictUnificator.get(OrePrefixes.plateQuintuple, aMaterial, 1L), (int) Math.max(aMaterialMass * 5L, 1L), 96); - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(9L, aStack), GT_OreDictUnificator.get(OrePrefixes.plateDense, aMaterial, 1L), (int) Math.max(aMaterialMass * 9L, 1L), 96); + GT_Values.RA.addForgeHammerRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), + (int) Math.max(aMaterialMass, 1L), + 16); + GT_Values.RA.addBenderRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), + (int) Math.max(aMaterialMass * 2L, 1L), + 24); + GT_Values.RA.addBenderRecipe( + GT_Utility.copyAmount(2L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plateDouble, aMaterial, 1L), + (int) Math.max(aMaterialMass * 2L, 1L), + 96); + GT_Values.RA.addBenderRecipe( + GT_Utility.copyAmount(3L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plateTriple, aMaterial, 1L), + (int) Math.max(aMaterialMass * 3L, 1L), + 96); + GT_Values.RA.addBenderRecipe( + GT_Utility.copyAmount(4L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plateQuadruple, aMaterial, 1L), + (int) Math.max(aMaterialMass * 4L, 1L), + 96); + GT_Values.RA.addBenderRecipe( + GT_Utility.copyAmount(5L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plateQuintuple, aMaterial, 1L), + (int) Math.max(aMaterialMass * 5L, 1L), + 96); + GT_Values.RA.addBenderRecipe( + GT_Utility.copyAmount(9L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plateDense, aMaterial, 1L), + (int) Math.max(aMaterialMass * 9L, 1L), + 96); } if (aNoWorking) { - GT_Values.RA.addLatheRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 2L), (int) Math.max(aMaterialMass, 1L), 16); + GT_Values.RA.addLatheRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 2L), + (int) Math.max(aMaterialMass, 1L), + 16); } else { if (aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial)) { - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 2L), GT_Proxy.tBits, new Object[]{"h", "X", 'X', OrePrefixes.gemFlawless.get(aMaterial)}); - GT_Values.RA.addImplosionRecipe(GT_Utility.copyAmount(3L, aStack), 8, GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 2)); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 2L), + GT_Proxy.tBits, + new Object[] {"h", "X", 'X', OrePrefixes.gemFlawless.get(aMaterial)}); + GT_Values.RA.addImplosionRecipe( + GT_Utility.copyAmount(3L, aStack), + 8, + GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, 1), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 2)); if (aMaterial.contains(SubTag.SMELTING_TO_GEM)) - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, aStack), GT_Proxy.tBits, new Object[]{"XXX", "XXX", "XXX", 'X', OrePrefixes.nugget.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_Proxy.tBits, + new Object[] {"XXX", "XXX", "XXX", 'X', OrePrefixes.nugget.get(aMaterial)}); if (aSpecialRecipeReq) - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"X", "m", 'X', OrePrefixes.gem.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] {"X", "m", 'X', OrePrefixes.gem.get(aMaterial)}); } } - //GT_RecipeRegistrator.registerUsagesForMaterials(OrePrefixes.plate.get(aMaterial).toString(), !aNoSmashing, GT_Utility.copyAmount(1L, aStack)); + // GT_RecipeRegistrator.registerUsagesForMaterials(OrePrefixes.plate.get(aMaterial).toString(), + // !aNoSmashing, GT_Utility.copyAmount(1L, aStack)); switch (aMaterial.mName) { case "NULL": break; case "Coal": case "Charcoal": - if (gregtech.api.GregTech_API.sRecipeFile.get(gregtech.api.enums.ConfigCategories.Recipes.disabledrecipes, "torchesFromCoal", false)) { - GT_ModHandler.removeRecipeDelayed(GT_Utility.copyAmount(1L, aStack), null, null, new ItemStack(net.minecraft.init.Items.stick, 1, 0)); + if (gregtech.api.GregTech_API.sRecipeFile.get( + gregtech.api.enums.ConfigCategories.Recipes.disabledrecipes, + "torchesFromCoal", + false)) { + GT_ModHandler.removeRecipeDelayed( + GT_Utility.copyAmount(1L, aStack), + null, + null, + new ItemStack(net.minecraft.init.Items.stick, 1, 0)); } break; case "CertusQuartz": - GT_Values.RA.addElectrolyzerRecipe(aStack, 0, GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 1), null, null, null, null, null, 2000, 30); + GT_Values.RA.addElectrolyzerRecipe( + aStack, + 0, + GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 1), + null, + null, + null, + null, + null, + 2000, + 30); } - for(ItemStack is: OreDictionary.getOres("craftingLens"+aMaterial.mColor.mName.replace(" ",""))) {//Engraver Recipe adder - is.stackSize=0; - GT_Values.RA.addLaserEngraverRecipe(GT_Utility.copyAmount(3L, aStack), is, GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, 1L), 1200, 480); + for (ItemStack is : OreDictionary.getOres( + "craftingLens" + aMaterial.mColor.mName.replace(" ", ""))) { // Engraver Recipe adder + is.stackSize = 0; + GT_Values.RA.addLaserEngraverRecipe( + GT_Utility.copyAmount(3L, aStack), + is, + GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, 1L), + 1200, + 480); } break; case gemChipped: if (aFuelPower) - GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aStack), null, aMaterial.mFuelPower / 2, aMaterial.mFuelType); + GT_Values.RA.addFuel( + GT_Utility.copyAmount(1L, aStack), null, aMaterial.mFuelPower / 2, aMaterial.mFuelType); if (!aNoWorking) { - GT_Values.RA.addLatheRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1L), (int) Math.max(aMaterialMass, 1L), 8); + GT_Values.RA.addLatheRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1L), + (int) Math.max(aMaterialMass, 1L), + 8); if (aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial)) { - GT_Values.RA.addImplosionRecipe(GT_Utility.copyAmount(3L, aStack), 8, GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 2)); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gemChipped, aMaterial, 2L), GT_Proxy.tBits, new Object[]{"h", "X", 'X', OrePrefixes.gemFlawed.get(aMaterial)}); + GT_Values.RA.addImplosionRecipe( + GT_Utility.copyAmount(3L, aStack), + 8, + GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, 1), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 2)); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.gemChipped, aMaterial, 2L), + GT_Proxy.tBits, + new Object[] {"h", "X", 'X', OrePrefixes.gemFlawed.get(aMaterial)}); if (aSpecialRecipeReq) - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"X", "m", 'X', OrePrefixes.gemChipped.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] {"X", "m", 'X', OrePrefixes.gemChipped.get(aMaterial)}); } } - for(ItemStack is: OreDictionary.getOres("craftingLens"+aMaterial.mColor.mName.replace(" ",""))){//Engraver Recipe adder - is.stackSize=0; - GT_Values.RA.addLaserEngraverRecipe(GT_Utility.copyAmount(3L, aStack), is, GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, 1L), 600, 30); + for (ItemStack is : OreDictionary.getOres( + "craftingLens" + aMaterial.mColor.mName.replace(" ", ""))) { // Engraver Recipe adder + is.stackSize = 0; + GT_Values.RA.addLaserEngraverRecipe( + GT_Utility.copyAmount(3L, aStack), + is, + GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, 1L), + 600, + 30); } break; case gemExquisite: if (aFuelPower) - GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aStack), null, aMaterial.mFuelPower * 8, aMaterial.mFuelType); + GT_Values.RA.addFuel( + GT_Utility.copyAmount(1L, aStack), null, aMaterial.mFuelPower * 8, aMaterial.mFuelType); if (!aNoWorking) { if (aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial)) if (aSpecialRecipeReq) - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 4L), GT_Proxy.tBits, new Object[]{"X", "m", 'X', OrePrefixes.gemExquisite.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 4L), + GT_Proxy.tBits, + new Object[] {"X", "m", 'X', OrePrefixes.gemExquisite.get(aMaterial)}); } - GT_Values.RA.addForgeHammerRecipe(aStack, GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, 2L), 64, 16); + GT_Values.RA.addForgeHammerRecipe( + aStack, GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, 2L), 64, 16); break; case gemFlawed: if (aFuelPower) - GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aStack), null, aMaterial.mFuelPower, aMaterial.mFuelType); + GT_Values.RA.addFuel( + GT_Utility.copyAmount(1L, aStack), null, aMaterial.mFuelPower, aMaterial.mFuelType); if (!aNoWorking) { - GT_Values.RA.addLatheRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial, 2L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 1L), (int) Math.max(aMaterialMass, 1L), 12); + GT_Values.RA.addLatheRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial, 2L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 1L), + (int) Math.max(aMaterialMass, 1L), + 12); if (aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial)) { - GT_Values.RA.addImplosionRecipe(GT_Utility.copyAmount(3L, aStack), 8, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 2)); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, 2L), GT_Proxy.tBits, new Object[]{"h", "X", 'X', OrePrefixes.gem.get(aMaterial)}); + GT_Values.RA.addImplosionRecipe( + GT_Utility.copyAmount(3L, aStack), + 8, + GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 2)); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, 2L), + GT_Proxy.tBits, + new Object[] {"h", "X", 'X', OrePrefixes.gem.get(aMaterial)}); if (aSpecialRecipeReq) - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 2L), GT_Proxy.tBits, new Object[]{"X", "m", 'X', OrePrefixes.gemFlawed.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 2L), + GT_Proxy.tBits, + new Object[] {"X", "m", 'X', OrePrefixes.gemFlawed.get(aMaterial)}); } } - GT_Values.RA.addForgeHammerRecipe(aStack, GT_OreDictUnificator.get(OrePrefixes.gemChipped, aMaterial, 2L), 64, 16); - for(ItemStack is: OreDictionary.getOres("craftingLens"+aMaterial.mColor.mName.replace(" ",""))){//Engraver Recipe adder - is.stackSize=0; - GT_Values.RA.addLaserEngraverRecipe(GT_Utility.copyAmount(3L, aStack), is, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 600, 120); + GT_Values.RA.addForgeHammerRecipe( + aStack, GT_OreDictUnificator.get(OrePrefixes.gemChipped, aMaterial, 2L), 64, 16); + for (ItemStack is : OreDictionary.getOres( + "craftingLens" + aMaterial.mColor.mName.replace(" ", ""))) { // Engraver Recipe adder + is.stackSize = 0; + GT_Values.RA.addLaserEngraverRecipe( + GT_Utility.copyAmount(3L, aStack), + is, + GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), + 600, + 120); } break; case gemFlawless: if (aFuelPower) - GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aStack), null, aMaterial.mFuelPower * 4, aMaterial.mFuelType); + GT_Values.RA.addFuel( + GT_Utility.copyAmount(1L, aStack), null, aMaterial.mFuelPower * 4, aMaterial.mFuelType); if (!aNoWorking) { - GT_Values.RA.addLatheRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 1L), GT_OreDictUnificator.getDust(aMaterial, aPrefix.mMaterialAmount - OrePrefixes.stickLong.mMaterialAmount), (int) Math.max(aMaterialMass * 5L, 1L), 16); + GT_Values.RA.addLatheRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 1L), + GT_OreDictUnificator.getDust( + aMaterial, aPrefix.mMaterialAmount - OrePrefixes.stickLong.mMaterialAmount), + (int) Math.max(aMaterialMass * 5L, 1L), + 16); if (aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial)) { - GT_Values.RA.addImplosionRecipe(GT_Utility.copyAmount(3L, aStack), 8, GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 2)); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, 2L), GT_Proxy.tBits, new Object[]{"h", "X", 'X', OrePrefixes.gemExquisite.get(aMaterial)}); + GT_Values.RA.addImplosionRecipe( + GT_Utility.copyAmount(3L, aStack), + 8, + GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, 1), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 2)); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, 2L), + GT_Proxy.tBits, + new Object[] {"h", "X", 'X', OrePrefixes.gemExquisite.get(aMaterial)}); if (aSpecialRecipeReq) - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 2L), GT_Proxy.tBits, new Object[]{"X", "m", 'X', OrePrefixes.gemFlawless.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 2L), + GT_Proxy.tBits, + new Object[] {"X", "m", 'X', OrePrefixes.gemFlawless.get(aMaterial)}); } } - GT_Values.RA.addForgeHammerRecipe(aStack, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 2L), 64, 16); - for(ItemStack is: OreDictionary.getOres("craftingLens"+aMaterial.mColor.mName.replace(" ",""))){//Engraver Recipe adder - is.stackSize=0; - GT_Values.RA.addLaserEngraverRecipe(GT_Utility.copyAmount(3L, aStack), is, GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, 1L), 2400, 2000); + GT_Values.RA.addForgeHammerRecipe( + aStack, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 2L), 64, 16); + for (ItemStack is : OreDictionary.getOres( + "craftingLens" + aMaterial.mColor.mName.replace(" ", ""))) { // Engraver Recipe adder + is.stackSize = 0; + GT_Values.RA.addLaserEngraverRecipe( + GT_Utility.copyAmount(3L, aStack), + is, + GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, 1L), + 2400, + 2000); } break; - default: - break; + default: + break; } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingIngot.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingIngot.java index 5b8525597f..6a49db0558 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingIngot.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingIngot.java @@ -20,91 +20,207 @@ public class ProcessingIngot implements gregtech.api.interfaces.IOreRecipeRegist } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { boolean aNoSmashing = aMaterial.contains(SubTag.NO_SMASHING); boolean aNoSmelting = aMaterial.contains(SubTag.NO_SMELTING); long aMaterialMass = aMaterial.getMass(); - boolean aSpecialRecipeReq = aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial) && !aMaterial.contains(SubTag.NO_SMASHING); + boolean aSpecialRecipeReq = aMaterial.mUnificatable + && (aMaterial.mMaterialInto == aMaterial) + && !aMaterial.contains(SubTag.NO_SMASHING); switch (aPrefix) { case ingot: if (aMaterial.mFuelPower > 0) { - GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aStack), null, aMaterial.mFuelPower, aMaterial.mFuelType); + GT_Values.RA.addFuel( + GT_Utility.copyAmount(1L, aStack), null, aMaterial.mFuelPower, aMaterial.mFuelType); } if (aMaterial.mStandardMoltenFluid != null) { if (!(aMaterial == Materials.AnnealedCopper || aMaterial == Materials.WroughtIron)) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ingot.get(0L), aMaterial.getMolten(144L), GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), 32, 8); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Ingot.get(0L), + aMaterial.getMolten(144L), + GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), + 32, + 8); } } GT_RecipeRegistrator.registerReverseFluidSmelting(aStack, aMaterial, aPrefix.mMaterialAmount, null); - GT_RecipeRegistrator.registerReverseMacerating(aStack, aMaterial, aPrefix.mMaterialAmount, null, null, null, false); + GT_RecipeRegistrator.registerReverseMacerating( + aStack, aMaterial, aPrefix.mMaterialAmount, null, null, null, false); if (aMaterial.mSmeltInto.mArcSmeltInto != aMaterial) { - GT_RecipeRegistrator.registerReverseArcSmelting(GT_Utility.copyAmount(1L, aStack), aMaterial, aPrefix.mMaterialAmount, null, null, null); + GT_RecipeRegistrator.registerReverseArcSmelting( + GT_Utility.copyAmount(1L, aStack), aMaterial, aPrefix.mMaterialAmount, null, null, null); } ItemStack tStack; - if ((null != (tStack = GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L))) && ( - (aMaterial.mBlastFurnaceRequired) || aNoSmelting)) { + if ((null != (tStack = GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L))) + && ((aMaterial.mBlastFurnaceRequired) || aNoSmelting)) { GT_ModHandler.removeFurnaceSmelting(tStack); } - if (aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial) && !aMaterial.contains(SubTag.NO_WORKING)) { + if (aMaterial.mUnificatable + && (aMaterial.mMaterialInto == aMaterial) + && !aMaterial.contains(SubTag.NO_WORKING)) { if (!aMaterial.contains(SubTag.SMELTING_TO_GEM)) - if ((aMaterial.contains(SubTag.MORTAR_GRINDABLE)) && (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, aMaterial.mName, true))) - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"X", "m", 'X', OrePrefixes.ingot.get(aMaterial)}); + if ((aMaterial.contains(SubTag.MORTAR_GRINDABLE)) + && (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, aMaterial.mName, true))) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] {"X", "m", 'X', OrePrefixes.ingot.get(aMaterial)}); } if (!aNoSmashing) { - GT_Values.RA.addForgeHammerRecipe(GT_Utility.copyAmount(3L, aStack), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 2L), (int) Math.max(aMaterialMass, 1L), 16); - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), (int) Math.max(aMaterialMass, 1L), 24); - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(2L, aStack), GT_OreDictUnificator.get(OrePrefixes.plateDouble, aMaterial, 1L), (int) Math.max(aMaterialMass * 2L, 1L), 96); - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(3L, aStack), GT_OreDictUnificator.get(OrePrefixes.plateTriple, aMaterial, 1L), (int) Math.max(aMaterialMass * 3L, 1L), 96); - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(4L, aStack), GT_OreDictUnificator.get(OrePrefixes.plateQuadruple, aMaterial, 1L), (int) Math.max(aMaterialMass * 4L, 1L), 96); - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(5L, aStack), GT_OreDictUnificator.get(OrePrefixes.plateQuintuple, aMaterial, 1L), (int) Math.max(aMaterialMass * 5L, 1L), 96); - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(9L, aStack), GT_OreDictUnificator.get(OrePrefixes.plateDense, aMaterial, 1L), (int) Math.max(aMaterialMass * 9L, 1L), 96); + GT_Values.RA.addForgeHammerRecipe( + GT_Utility.copyAmount(3L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 2L), + (int) Math.max(aMaterialMass, 1L), + 16); + GT_Values.RA.addBenderRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), + (int) Math.max(aMaterialMass, 1L), + 24); + GT_Values.RA.addBenderRecipe( + GT_Utility.copyAmount(2L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plateDouble, aMaterial, 1L), + (int) Math.max(aMaterialMass * 2L, 1L), + 96); + GT_Values.RA.addBenderRecipe( + GT_Utility.copyAmount(3L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plateTriple, aMaterial, 1L), + (int) Math.max(aMaterialMass * 3L, 1L), + 96); + GT_Values.RA.addBenderRecipe( + GT_Utility.copyAmount(4L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plateQuadruple, aMaterial, 1L), + (int) Math.max(aMaterialMass * 4L, 1L), + 96); + GT_Values.RA.addBenderRecipe( + GT_Utility.copyAmount(5L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plateQuintuple, aMaterial, 1L), + (int) Math.max(aMaterialMass * 5L, 1L), + 96); + GT_Values.RA.addBenderRecipe( + GT_Utility.copyAmount(9L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plateDense, aMaterial, 1L), + (int) Math.max(aMaterialMass * 9L, 1L), + 96); } break; case ingotDouble: if (!aNoSmashing) { - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.plateDouble, aMaterial, 1L), (int) Math.max(aMaterialMass, 1L), 96); - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(2L, aStack), GT_OreDictUnificator.get(OrePrefixes.plateQuadruple, aMaterial, 1L), (int) Math.max(aMaterialMass * 2L, 1L), 96); - if (aSpecialRecipeReq && GregTech_API.sRecipeFile.get(ConfigCategories.Tools.hammermultiingot, aMaterial.toString(), true)) { - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.ingotDouble, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"I", "I", "h", 'I', OrePrefixes.ingot.get(aMaterial)}); + GT_Values.RA.addBenderRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plateDouble, aMaterial, 1L), + (int) Math.max(aMaterialMass, 1L), + 96); + GT_Values.RA.addBenderRecipe( + GT_Utility.copyAmount(2L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plateQuadruple, aMaterial, 1L), + (int) Math.max(aMaterialMass * 2L, 1L), + 96); + if (aSpecialRecipeReq + && GregTech_API.sRecipeFile.get( + ConfigCategories.Tools.hammermultiingot, aMaterial.toString(), true)) { + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingotDouble, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] {"I", "I", "h", 'I', OrePrefixes.ingot.get(aMaterial)}); } } break; case ingotTriple: if (!aNoSmashing) { - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.plateTriple, aMaterial, 1L), (int) Math.max(aMaterialMass, 1L), 96); - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(3L, aStack), GT_OreDictUnificator.get(OrePrefixes.plateDense, aMaterial, 1L), (int) Math.max(aMaterialMass * 3L, 1L), 96); - if (aSpecialRecipeReq && GregTech_API.sRecipeFile.get(ConfigCategories.Tools.hammermultiingot, aMaterial.toString(), true)) { - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.ingotTriple, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"I", "B", "h", 'I', OrePrefixes.ingotDouble.get(aMaterial), 'B', OrePrefixes.ingot.get(aMaterial)}); + GT_Values.RA.addBenderRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plateTriple, aMaterial, 1L), + (int) Math.max(aMaterialMass, 1L), + 96); + GT_Values.RA.addBenderRecipe( + GT_Utility.copyAmount(3L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plateDense, aMaterial, 1L), + (int) Math.max(aMaterialMass * 3L, 1L), + 96); + if (aSpecialRecipeReq + && GregTech_API.sRecipeFile.get( + ConfigCategories.Tools.hammermultiingot, aMaterial.toString(), true)) { + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingotTriple, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] { + "I", + "B", + "h", + 'I', + OrePrefixes.ingotDouble.get(aMaterial), + 'B', + OrePrefixes.ingot.get(aMaterial) + }); } } break; case ingotQuadruple: if (!aNoSmashing) { - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.plateQuadruple, aMaterial, 1L), (int) Math.max(aMaterialMass, 1L), 96); - if (aSpecialRecipeReq && GregTech_API.sRecipeFile.get(ConfigCategories.Tools.hammermultiingot, aMaterial.toString(), true)) { - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.ingotQuadruple, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"I", "B", "h", 'I', OrePrefixes.ingotTriple.get(aMaterial), 'B', OrePrefixes.ingot.get(aMaterial)}); + GT_Values.RA.addBenderRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plateQuadruple, aMaterial, 1L), + (int) Math.max(aMaterialMass, 1L), + 96); + if (aSpecialRecipeReq + && GregTech_API.sRecipeFile.get( + ConfigCategories.Tools.hammermultiingot, aMaterial.toString(), true)) { + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingotQuadruple, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] { + "I", + "B", + "h", + 'I', + OrePrefixes.ingotTriple.get(aMaterial), + 'B', + OrePrefixes.ingot.get(aMaterial) + }); } } break; case ingotQuintuple: if (!aNoSmashing) { - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.plateQuintuple, aMaterial, 1L), (int) Math.max(aMaterialMass, 1L), 96); - if (aSpecialRecipeReq && GregTech_API.sRecipeFile.get(ConfigCategories.Tools.hammermultiingot, aMaterial.toString(), true)) { - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.ingotQuintuple, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"I", "B", "h", 'I', OrePrefixes.ingotQuadruple.get(aMaterial), 'B', OrePrefixes.ingot.get(aMaterial)}); + GT_Values.RA.addBenderRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plateQuintuple, aMaterial, 1L), + (int) Math.max(aMaterialMass, 1L), + 96); + if (aSpecialRecipeReq + && GregTech_API.sRecipeFile.get( + ConfigCategories.Tools.hammermultiingot, aMaterial.toString(), true)) { + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingotQuintuple, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] { + "I", + "B", + "h", + 'I', + OrePrefixes.ingotQuadruple.get(aMaterial), + 'B', + OrePrefixes.ingot.get(aMaterial) + }); } } break; case ingotHot: if (aMaterial.mAutoGenerateVacuumFreezerRecipes) { - GT_Values.RA.addVacuumFreezerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), (int) Math.max(aMaterialMass * 3L, 1L)); + GT_Values.RA.addVacuumFreezerRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), + (int) Math.max(aMaterialMass * 3L, 1L)); break; } - default: - break; + default: + break; } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingItem.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingItem.java index d95e9466b5..bef908db9c 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingItem.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingItem.java @@ -15,12 +15,20 @@ public class ProcessingItem implements gregtech.api.interfaces.IOreRecipeRegistr } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - if (GT_OreDictUnificator.getItemData(aStack) == null && !aOreDictName.equals("itemCertusQuartz") && !aOreDictName.equals("itemNetherQuartz")) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + if (GT_OreDictUnificator.getItemData(aStack) == null + && !aOreDictName.equals("itemCertusQuartz") + && !aOreDictName.equals("itemNetherQuartz")) { switch (aOreDictName) { case "itemSilicon": GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Silicon, 3628800L)); - GT_Values.RA.addFormingPressRecipe(GT_Utility.copyAmount(1L, aStack), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 0L, 19), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 20), 200, 16); + GT_Values.RA.addFormingPressRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 0L, 19), + GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 20), + 200, + 16); case "itemWheat": GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Wheat, 3628800L)); case "itemManganese": diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingLens.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingLens.java index c18fcc2efc..2c8c2587e5 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingLens.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingLens.java @@ -15,17 +15,43 @@ public class ProcessingLens implements gregtech.api.interfaces.IOreRecipeRegistr } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { switch (aMaterial.mName) { case "Diamond": case "Glass": - GT_Values.RA.addLatheRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.lens, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 1L), 1200, 30); - GT_Values.RA.addLatheRecipe(GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.lens, aMaterial, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), 2400, 16); + GT_Values.RA.addLatheRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.lens, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 1L), + 1200, + 30); + GT_Values.RA.addLatheRecipe( + GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.lens, aMaterial, 3L), + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), + 2400, + 16); break; default: - GT_Values.RA.addLatheRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.lens, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 1L), 1200, 120); - GT_Values.RA.addLatheRecipe(GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.lens, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 2L), 2400, 30); - GregTech_API.registerCover(aStack, TextureFactory.of(Textures.BlockIcons.MACHINE_CASINGS[2][0], TextureFactory.of(Textures.BlockIcons.OVERLAY_LENS, aMaterial.mRGBa, false)), new gregtech.common.covers.GT_Cover_Lens(aMaterial.mColor.mIndex)); + GT_Values.RA.addLatheRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.lens, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 1L), + 1200, + 120); + GT_Values.RA.addLatheRecipe( + GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.lens, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 2L), + 2400, + 30); + GregTech_API.registerCover( + aStack, + TextureFactory.of( + Textures.BlockIcons.MACHINE_CASINGS[2][0], + TextureFactory.of(Textures.BlockIcons.OVERLAY_LENS, aMaterial.mRGBa, false)), + new gregtech.common.covers.GT_Cover_Lens(aMaterial.mColor.mIndex)); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java index fc60328e44..01d9fd63df 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java @@ -15,36 +15,113 @@ public class ProcessingLog implements gregtech.api.interfaces.IOreRecipeRegistra } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if (aOreDictName.equals("logRubber")) { - GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(1L, aStack), GT_Utility.getIntegratedCircuit(2), null, Materials.Methane.getGas(60L), ItemList.IC2_Resin.get(1L), GT_ModHandler.getIC2Item("plantBall", 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), GT_Values.NI, GT_Values.NI, new int[]{5000, 3750, 2500, 2500}, 200, 20); - GT_ModHandler.addSawmillRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.IC2_Resin.get(1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 16L)); - GT_ModHandler.addExtractionRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RawRubber, 1L)); - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 6L), ItemList.IC2_Resin.get(1L), 33, false); + GT_Values.RA.addCentrifugeRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_Utility.getIntegratedCircuit(2), + null, + Materials.Methane.getGas(60L), + ItemList.IC2_Resin.get(1L), + GT_ModHandler.getIC2Item("plantBall", 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), + GT_Values.NI, + GT_Values.NI, + new int[] {5000, 3750, 2500, 2500}, + 200, + 20); + GT_ModHandler.addSawmillRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.IC2_Resin.get(1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 16L)); + GT_ModHandler.addExtractionRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RawRubber, 1L)); + GT_ModHandler.addPulverisationRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 6L), + ItemList.IC2_Resin.get(1L), + 33, + false); } else { - GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(1L, aStack), GT_Utility.getIntegratedCircuit(1), null, Materials.Methane.getGas(60L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 200, 20); - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 6L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), 80, false); + GT_Values.RA.addCentrifugeRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_Utility.getIntegratedCircuit(1), + null, + Materials.Methane.getGas(60L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 200, + 20); + GT_ModHandler.addPulverisationRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 6L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), + 80, + false); } - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Wood, 2L), gregtech.api.util.GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | gregtech.api.util.GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"sLf", 'L', GT_Utility.copyAmount(1L, aStack)}); - GT_Values.RA.addLatheRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Wood, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), 160, 8); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 2L), Materials.SeedOil.getFluid(50L), ItemList.FR_Stick.get(1L), 16, 8); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(8L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), Materials.SeedOil.getFluid(250L), ItemList.FR_Casing_Impregnated.get(1L), 64, 16); - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.Creosote.getFluid(1000L), GT_ModHandler.getModItem("Railcraft", "tile.railcraft.cube", 1L, 8), null, null, null, 16, 16); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Wood, 2L), + gregtech.api.util.GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | gregtech.api.util.GT_ModHandler.RecipeBits.BUFFERED, + new Object[] {"sLf", 'L', GT_Utility.copyAmount(1L, aStack)}); + GT_Values.RA.addLatheRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Wood, 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), + 160, + 8); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Circuit_Integrated.getWithDamage(0L, 2L), + Materials.SeedOil.getFluid(50L), + ItemList.FR_Stick.get(1L), + 16, + 8); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(8L, aStack), + ItemList.Circuit_Integrated.getWithDamage(0L, 8L), + Materials.SeedOil.getFluid(250L), + ItemList.FR_Casing_Impregnated.get(1L), + 64, + 16); + GT_Values.RA.addChemicalBathRecipe( + GT_Utility.copyAmount(1L, aStack), + Materials.Creosote.getFluid(1000L), + GT_ModHandler.getModItem("Railcraft", "tile.railcraft.cube", 1L, 8), + null, + null, + null, + 16, + 16); short aMeta = (short) aStack.getItemDamage(); if (aMeta == Short.MAX_VALUE) { - if ((GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, aStack), false, null), new ItemStack(Items.coal, 1, 1)))) { + if ((GT_Utility.areStacksEqual( + GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, aStack), false, null), + new ItemStack(Items.coal, 1, 1)))) { addPyrolyeOvenRecipes(aStack); - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) { + if (GregTech_API.sRecipeFile.get( + ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) { GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, aStack)); } } for (int i = 0; i < 32767; i++) { - if ((GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(new ItemStack(aStack.getItem(), 1, i), false, null), new ItemStack(Items.coal, 1, 1)))) { + if ((GT_Utility.areStacksEqual( + GT_ModHandler.getSmeltingOutput(new ItemStack(aStack.getItem(), 1, i), false, null), + new ItemStack(Items.coal, 1, 1)))) { addPyrolyeOvenRecipes(aStack); - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) { + if (GregTech_API.sRecipeFile.get( + ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) { GT_ModHandler.removeFurnaceSmelting(new ItemStack(aStack.getItem(), 1, i)); } } @@ -53,23 +130,49 @@ public class ProcessingLog implements gregtech.api.interfaces.IOreRecipeRegistra if (i >= 16) { break; } - } - else - { + } else { ItemStack tPlanks = GT_Utility.copyOrNull(tStack); tPlanks.stackSize = (tPlanks.stackSize * 3 / 2); - GT_Values.RA.addCutterRecipe(new ItemStack(aStack.getItem(), 1, i), Materials.Lubricant.getFluid(1L), GT_Utility.copyOrNull(tPlanks), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), 200, 8); - GT_Values.RA.addCutterRecipe(new ItemStack(aStack.getItem(), 1, i), GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize : tStack.stackSize * 5 / 4, tStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), 200, 8); - GT_ModHandler.addSawmillRecipe(new ItemStack(aStack.getItem(), 1, i), tPlanks, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L)); + GT_Values.RA.addCutterRecipe( + new ItemStack(aStack.getItem(), 1, i), + Materials.Lubricant.getFluid(1L), + GT_Utility.copyOrNull(tPlanks), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), + 200, + 8); + GT_Values.RA.addCutterRecipe( + new ItemStack(aStack.getItem(), 1, i), + GT_Utility.copyAmount( + GT_Mod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize : tStack.stackSize * 5 / 4, + tStack), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), + 200, + 8); + GT_ModHandler.addSawmillRecipe( + new ItemStack(aStack.getItem(), 1, i), + tPlanks, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L)); GT_ModHandler.removeRecipeDelayed(new ItemStack(aStack.getItem(), 1, i)); - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize : tStack.stackSize * 5 / 4, tStack), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"s", "L", 'L', new ItemStack(aStack.getItem(), 1, i)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(tStack.stackSize / (GT_Mod.gregtechproxy.mNerfedWoodPlank ? 2 : 1), tStack), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{new ItemStack(aStack.getItem(), 1, i)}); + GT_ModHandler.addCraftingRecipe( + GT_Utility.copyAmount( + GT_Mod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize : tStack.stackSize * 5 / 4, + tStack), + GT_ModHandler.RecipeBits.BUFFERED, + new Object[] {"s", "L", 'L', new ItemStack(aStack.getItem(), 1, i)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_Utility.copyAmount( + tStack.stackSize / (GT_Mod.gregtechproxy.mNerfedWoodPlank ? 2 : 1), tStack), + GT_ModHandler.RecipeBits.BUFFERED, + new Object[] {new ItemStack(aStack.getItem(), 1, i)}); } } } else { - if ((GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, aStack), false, null), new ItemStack(Items.coal, 1, 1)))) { + if ((GT_Utility.areStacksEqual( + GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, aStack), false, null), + new ItemStack(Items.coal, 1, 1)))) { addPyrolyeOvenRecipes(aStack); - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) { + if (GregTech_API.sRecipeFile.get( + ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) { GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, aStack)); } } @@ -77,33 +180,135 @@ public class ProcessingLog implements gregtech.api.interfaces.IOreRecipeRegistra if (tStack != null) { ItemStack tPlanks = GT_Utility.copyOrNull(tStack); tPlanks.stackSize = (tPlanks.stackSize * 3 / 2); - GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), Materials.Lubricant.getFluid(1L), GT_Utility.copyOrNull(tPlanks), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), 200, 8); - GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize : tStack.stackSize * 5 / 4, tStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), 200, 8); - GT_ModHandler.addSawmillRecipe(GT_Utility.copyAmount(1L, aStack), tPlanks, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L)); + GT_Values.RA.addCutterRecipe( + GT_Utility.copyAmount(1L, aStack), + Materials.Lubricant.getFluid(1L), + GT_Utility.copyOrNull(tPlanks), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), + 200, + 8); + GT_Values.RA.addCutterRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_Utility.copyAmount( + GT_Mod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize : tStack.stackSize * 5 / 4, + tStack), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), + 200, + 8); + GT_ModHandler.addSawmillRecipe( + GT_Utility.copyAmount(1L, aStack), + tPlanks, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L)); GT_ModHandler.removeRecipeDelayed(GT_Utility.copyAmount(1L, aStack)); - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize : tStack.stackSize * 5 / 4, tStack), new Object[]{"s", "L", 'L', GT_Utility.copyAmount(1L, aStack)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(tStack.stackSize / (GT_Mod.gregtechproxy.mNerfedWoodPlank ? 2 : 1), tStack), new Object[]{GT_Utility.copyAmount(1L, aStack)}); + GT_ModHandler.addCraftingRecipe( + GT_Utility.copyAmount( + GT_Mod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize : tStack.stackSize * 5 / 4, + tStack), + new Object[] {"s", "L", 'L', GT_Utility.copyAmount(1L, aStack)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_Utility.copyAmount( + tStack.stackSize / (GT_Mod.gregtechproxy.mNerfedWoodPlank ? 2 : 1), tStack), + new Object[] {GT_Utility.copyAmount(1L, aStack)}); } } - if ((GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, aStack), false, null), new ItemStack(Items.coal, 1, 1)))) { + if ((GT_Utility.areStacksEqual( + GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, aStack), false, null), + new ItemStack(Items.coal, 1, 1)))) { addPyrolyeOvenRecipes(aStack); if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, aStack)); } } - public static void addPyrolyeOvenRecipes(ItemStack logStack){ - GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), GT_Values.NF, 1, Materials.Charcoal.getGems(20), Materials.Creosote.getFluid(4000), 640, 64); - GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), Materials.Nitrogen.getGas(1000), 2, Materials.Charcoal.getGems(20), Materials.Creosote.getFluid(4000), 320, 96); - GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), GT_Values.NF, 3, Materials.Ash.getDust(4), Materials.OilHeavy.getFluid(200), 320, 192); - GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), GT_Values.NF, 3, Materials.Charcoal.getGems(20), Materials.CharcoalByproducts.getGas(4000), 640, 64); - GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), Materials.Nitrogen.getGas(1000), 4, Materials.Charcoal.getGems(20), Materials.CharcoalByproducts.getGas(4000), 320, 96); - GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), GT_Values.NF, 5, Materials.Charcoal.getGems(20), Materials.WoodGas.getGas(1500), 640, 64); - GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), Materials.Nitrogen.getGas(1000), 6, Materials.Charcoal.getGems(20), Materials.WoodGas.getGas(1500), 320, 96); - GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), GT_Values.NF, 7, Materials.Charcoal.getGems(20), Materials.WoodVinegar.getFluid(3000), 640, 64); - GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), Materials.Nitrogen.getGas(1000), 8, Materials.Charcoal.getGems(20), Materials.WoodVinegar.getFluid(3000), 320, 96); - GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), GT_Values.NF, 9, Materials.Charcoal.getGems(20), Materials.WoodTar.getFluid(1500), 640, 64); - GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), Materials.Nitrogen.getGas(1000), 10, Materials.Charcoal.getGems(20), Materials.WoodTar.getFluid(1500), 320, 96); + public static void addPyrolyeOvenRecipes(ItemStack logStack) { + GT_Values.RA.addPyrolyseRecipe( + GT_Utility.copyAmount(16L, logStack), + GT_Values.NF, + 1, + Materials.Charcoal.getGems(20), + Materials.Creosote.getFluid(4000), + 640, + 64); + GT_Values.RA.addPyrolyseRecipe( + GT_Utility.copyAmount(16L, logStack), + Materials.Nitrogen.getGas(1000), + 2, + Materials.Charcoal.getGems(20), + Materials.Creosote.getFluid(4000), + 320, + 96); + GT_Values.RA.addPyrolyseRecipe( + GT_Utility.copyAmount(16L, logStack), + GT_Values.NF, + 3, + Materials.Ash.getDust(4), + Materials.OilHeavy.getFluid(200), + 320, + 192); + GT_Values.RA.addPyrolyseRecipe( + GT_Utility.copyAmount(16L, logStack), + GT_Values.NF, + 3, + Materials.Charcoal.getGems(20), + Materials.CharcoalByproducts.getGas(4000), + 640, + 64); + GT_Values.RA.addPyrolyseRecipe( + GT_Utility.copyAmount(16L, logStack), + Materials.Nitrogen.getGas(1000), + 4, + Materials.Charcoal.getGems(20), + Materials.CharcoalByproducts.getGas(4000), + 320, + 96); + GT_Values.RA.addPyrolyseRecipe( + GT_Utility.copyAmount(16L, logStack), + GT_Values.NF, + 5, + Materials.Charcoal.getGems(20), + Materials.WoodGas.getGas(1500), + 640, + 64); + GT_Values.RA.addPyrolyseRecipe( + GT_Utility.copyAmount(16L, logStack), + Materials.Nitrogen.getGas(1000), + 6, + Materials.Charcoal.getGems(20), + Materials.WoodGas.getGas(1500), + 320, + 96); + GT_Values.RA.addPyrolyseRecipe( + GT_Utility.copyAmount(16L, logStack), + GT_Values.NF, + 7, + Materials.Charcoal.getGems(20), + Materials.WoodVinegar.getFluid(3000), + 640, + 64); + GT_Values.RA.addPyrolyseRecipe( + GT_Utility.copyAmount(16L, logStack), + Materials.Nitrogen.getGas(1000), + 8, + Materials.Charcoal.getGems(20), + Materials.WoodVinegar.getFluid(3000), + 320, + 96); + GT_Values.RA.addPyrolyseRecipe( + GT_Utility.copyAmount(16L, logStack), + GT_Values.NF, + 9, + Materials.Charcoal.getGems(20), + Materials.WoodTar.getFluid(1500), + 640, + 64); + GT_Values.RA.addPyrolyseRecipe( + GT_Utility.copyAmount(16L, logStack), + Materials.Nitrogen.getGas(1000), + 10, + Materials.Charcoal.getGems(20), + Materials.WoodTar.getFluid(1500), + 320, + 96); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingNugget.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingNugget.java index 8da7478053..b1a73e19b5 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingNugget.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingNugget.java @@ -13,19 +13,46 @@ public class ProcessingNugget implements gregtech.api.interfaces.IOreRecipeRegis } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if (aMaterial == Materials.Iron) - GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.WroughtIron, 1L)); - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(9L, aStack), aMaterial.contains(SubTag.SMELTING_TO_GEM) ? ItemList.Shape_Mold_Ball.get(0L) : ItemList.Shape_Mold_Ingot.get(0L), GT_OreDictUnificator.get(aMaterial.contains(SubTag.SMELTING_TO_GEM) ? OrePrefixes.gem : OrePrefixes.ingot, aMaterial.mSmeltInto, 1L), 200, 2); + GT_ModHandler.addSmeltingRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.WroughtIron, 1L)); + GT_Values.RA.addAlloySmelterRecipe( + GT_Utility.copyAmount(9L, aStack), + aMaterial.contains(SubTag.SMELTING_TO_GEM) + ? ItemList.Shape_Mold_Ball.get(0L) + : ItemList.Shape_Mold_Ingot.get(0L), + GT_OreDictUnificator.get( + aMaterial.contains(SubTag.SMELTING_TO_GEM) ? OrePrefixes.gem : OrePrefixes.ingot, + aMaterial.mSmeltInto, + 1L), + 200, + 2); if (aMaterial.mStandardMoltenFluid != null) if (!(aMaterial == Materials.AnnealedCopper || aMaterial == Materials.WroughtIron)) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Nugget.get(0L), aMaterial.getMolten(16L), GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 1L), 16, 4); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Nugget.get(0L), + aMaterial.getMolten(16L), + GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 1L), + 16, + 4); } GT_RecipeRegistrator.registerReverseFluidSmelting(aStack, aMaterial, aPrefix.mMaterialAmount, null); - GT_RecipeRegistrator.registerReverseMacerating(aStack, aMaterial, aPrefix.mMaterialAmount, null, null, null, false); + GT_RecipeRegistrator.registerReverseMacerating( + aStack, aMaterial, aPrefix.mMaterialAmount, null, null, null, false); if (!aMaterial.contains(SubTag.NO_SMELTING)) { - GT_Values.RA.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), ItemList.Shape_Mold_Nugget.get(0L), GT_Utility.copyAmount(9L, aStack), 100, 1); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 9L), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"sI ", 'I', OrePrefixes.ingot.get(aMaterial)}); + GT_Values.RA.addAlloySmelterRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), + ItemList.Shape_Mold_Nugget.get(0L), + GT_Utility.copyAmount(9L, aStack), + 100, + 1); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 9L), + GT_ModHandler.RecipeBits.BUFFERED, + new Object[] {"sI ", 'I', OrePrefixes.ingot.get(aMaterial)}); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java index 5299e66bb0..7764ded2db 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java @@ -8,34 +8,66 @@ import gregtech.api.enums.SubTag; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; - import java.util.ArrayList; +import net.minecraft.item.ItemStack; public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistrator { private ArrayList<Materials> mAlreadyListedOres = new ArrayList(1000); public ProcessingOre() { for (OrePrefixes tPrefix : OrePrefixes.values()) - if ((tPrefix.name().startsWith("ore")) && (tPrefix != OrePrefixes.orePoor) && (tPrefix != OrePrefixes.oreSmall) && (tPrefix != OrePrefixes.oreRich) && (tPrefix != OrePrefixes.oreNormal)) - tPrefix.add(this); + if ((tPrefix.name().startsWith("ore")) + && (tPrefix != OrePrefixes.orePoor) + && (tPrefix != OrePrefixes.oreSmall) + && (tPrefix != OrePrefixes.oreRich) + && (tPrefix != OrePrefixes.oreNormal)) tPrefix.add(this); } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - boolean tIsRich = (aPrefix == OrePrefixes.oreNetherrack) || (aPrefix == OrePrefixes.oreNether) || (aPrefix == OrePrefixes.oreEndstone) || (aPrefix == OrePrefixes.oreEnd) || (aPrefix == OrePrefixes.oreRich) || (aPrefix == OrePrefixes.oreDense); + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + boolean tIsRich = (aPrefix == OrePrefixes.oreNetherrack) + || (aPrefix == OrePrefixes.oreNether) + || (aPrefix == OrePrefixes.oreEndstone) + || (aPrefix == OrePrefixes.oreEnd) + || (aPrefix == OrePrefixes.oreRich) + || (aPrefix == OrePrefixes.oreDense); if (aMaterial == Materials.Oilsands) { - GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(1L, aStack), null, null, Materials.OilHeavy.getFluid(tIsRich ? 4000L : 2000L), new ItemStack(net.minecraft.init.Blocks.sand, 1, 0), null, null, null, null, null, new int[]{tIsRich ? 2000 : 4000}, tIsRich ? 600 : 300, 30); + GT_Values.RA.addCentrifugeRecipe( + GT_Utility.copyAmount(1L, aStack), + null, + null, + Materials.OilHeavy.getFluid(tIsRich ? 4000L : 2000L), + new ItemStack(net.minecraft.init.Blocks.sand, 1, 0), + null, + null, + null, + null, + null, + new int[] {tIsRich ? 2000 : 4000}, + tIsRich ? 600 : 300, + 30); } else { - registerStandardOreRecipes(aPrefix, aMaterial, GT_Utility.copyAmount(1L, aStack), Math.max(1, gregtech.api.GregTech_API.sOPStuff.get(gregtech.api.enums.ConfigCategories.Materials.oreprocessingoutputmultiplier, aMaterial.toString(), 1)) * (tIsRich ? 2 : 1)); + registerStandardOreRecipes( + aPrefix, + aMaterial, + GT_Utility.copyAmount(1L, aStack), + Math.max( + 1, + gregtech.api.GregTech_API.sOPStuff.get( + gregtech.api.enums.ConfigCategories.Materials.oreprocessingoutputmultiplier, + aMaterial.toString(), + 1)) + * (tIsRich ? 2 : 1)); } } - private boolean registerStandardOreRecipes(OrePrefixes aPrefix, Materials aMaterial, ItemStack aOreStack, int aMultiplier) { - if ((aOreStack == null) || (aMaterial == null)) - return false; - GT_ModHandler.addValuableOre(GT_Utility.getBlockFromStack(aOreStack), aOreStack.getItemDamage(), aMaterial.mOreValue); + private boolean registerStandardOreRecipes( + OrePrefixes aPrefix, Materials aMaterial, ItemStack aOreStack, int aMultiplier) { + if ((aOreStack == null) || (aMaterial == null)) return false; + GT_ModHandler.addValuableOre( + GT_Utility.getBlockFromStack(aOreStack), aOreStack.getItemDamage(), aMaterial.mOreValue); Materials tMaterial = aMaterial.mOreReplacement; Materials tPrimaryByMaterial = null; aMultiplier = Math.max(1, aMultiplier); @@ -44,15 +76,36 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra ItemStack tIngot = GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mDirectSmelting, 1L); ItemStack tGem = GT_OreDictUnificator.get(OrePrefixes.gem, tMaterial, 1L); - ItemStack tSmeltInto = tIngot == null ? null : aMaterial.contains(SubTag.SMELTING_TO_GEM) ? GT_OreDictUnificator.get(OrePrefixes.gem, tMaterial.mDirectSmelting, GT_OreDictUnificator.get(OrePrefixes.crystal, tMaterial.mDirectSmelting, GT_OreDictUnificator.get(OrePrefixes.gem, tMaterial, GT_OreDictUnificator.get(OrePrefixes.crystal, tMaterial, 1L), 1L), 1L), 1L) : tIngot; + ItemStack tSmeltInto = tIngot == null + ? null + : aMaterial.contains(SubTag.SMELTING_TO_GEM) + ? GT_OreDictUnificator.get( + OrePrefixes.gem, + tMaterial.mDirectSmelting, + GT_OreDictUnificator.get( + OrePrefixes.crystal, + tMaterial.mDirectSmelting, + GT_OreDictUnificator.get( + OrePrefixes.gem, + tMaterial, + GT_OreDictUnificator.get(OrePrefixes.crystal, tMaterial, 1L), + 1L), + 1L), + 1L) + : tIngot; ItemStack tDust = GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial, tGem, 1L); ItemStack tCleaned = GT_OreDictUnificator.get(OrePrefixes.crushedPurified, tMaterial, tDust, 1L); - ItemStack tCrushed = GT_OreDictUnificator.get(OrePrefixes.crushed, tMaterial, aMaterial.mOreMultiplier * aMultiplier); + ItemStack tCrushed = + GT_OreDictUnificator.get(OrePrefixes.crushed, tMaterial, aMaterial.mOreMultiplier * aMultiplier); ItemStack tPrimaryByProduct = null; if (tCrushed == null) { - tCrushed = GT_OreDictUnificator.get(OrePrefixes.dustImpure, tMaterial, GT_Utility.copyAmount(aMaterial.mOreMultiplier * aMultiplier, tCleaned, tDust, tGem), aMaterial.mOreMultiplier * aMultiplier); + tCrushed = GT_OreDictUnificator.get( + OrePrefixes.dustImpure, + tMaterial, + GT_Utility.copyAmount(aMaterial.mOreMultiplier * aMultiplier, tCleaned, tDust, tGem), + aMaterial.mOreMultiplier * aMultiplier); } ArrayList<ItemStack> tByProductStacks = new ArrayList(); @@ -64,50 +117,130 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra tPrimaryByMaterial = tMat; tPrimaryByProduct = GT_OreDictUnificator.get(OrePrefixes.dust, tMat, 1L); if (GT_OreDictUnificator.get(OrePrefixes.dustSmall, tMat, 1L) == null) - GT_OreDictUnificator.get(OrePrefixes.dustTiny, tMat, GT_OreDictUnificator.get(OrePrefixes.nugget, tMat, 2L), 2L); + GT_OreDictUnificator.get( + OrePrefixes.dustTiny, tMat, GT_OreDictUnificator.get(OrePrefixes.nugget, tMat, 2L), 2L); } GT_OreDictUnificator.get(OrePrefixes.dust, tMat, 1L); if (GT_OreDictUnificator.get(OrePrefixes.dustSmall, tMat, 1L) == null) - GT_OreDictUnificator.get(OrePrefixes.dustTiny, tMat, GT_OreDictUnificator.get(OrePrefixes.nugget, tMat, 2L), 2L); + GT_OreDictUnificator.get( + OrePrefixes.dustTiny, tMat, GT_OreDictUnificator.get(OrePrefixes.nugget, tMat, 2L), 2L); } if ((!tByProductStacks.isEmpty()) && (!this.mAlreadyListedOres.contains(aMaterial))) { this.mAlreadyListedOres.add(aMaterial); - gregtech.api.util.GT_Recipe.GT_Recipe_Map.sByProductList.addFakeRecipe(false, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ore, aMaterial, aOreStack, 1L)}, (ItemStack[]) tByProductStacks.toArray(new ItemStack[0]), null, null, null, null, 0, 0, 0); + gregtech.api.util.GT_Recipe.GT_Recipe_Map.sByProductList.addFakeRecipe( + false, + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ore, aMaterial, aOreStack, 1L)}, + (ItemStack[]) tByProductStacks.toArray(new ItemStack[0]), + null, + null, + null, + null, + 0, + 0, + 0); } - if (tPrimaryByMaterial == null) - tPrimaryByMaterial = tMaterial; - if (tPrimaryByProduct == null) - tPrimaryByProduct = tDust; + if (tPrimaryByMaterial == null) tPrimaryByMaterial = tMaterial; + if (tPrimaryByProduct == null) tPrimaryByProduct = tDust; boolean tHasSmelting = false; if (tSmeltInto != null) { if ((aMaterial.mBlastFurnaceRequired) || (aMaterial.mDirectSmelting.mBlastFurnaceRequired)) { GT_ModHandler.removeFurnaceSmelting(aOreStack); } else { - tHasSmelting = GT_ModHandler.addSmeltingRecipe(aOreStack, GT_Utility.copyAmount(aMultiplier * aMaterial.mSmeltingMultiplier, tSmeltInto)); + tHasSmelting = GT_ModHandler.addSmeltingRecipe( + aOreStack, GT_Utility.copyAmount(aMultiplier * aMaterial.mSmeltingMultiplier, tSmeltInto)); } if (aMaterial.contains(SubTag.BLASTFURNACE_CALCITE_TRIPLE)) { - if(aMaterial.mAutoGenerateBlastFurnaceRecipes) { - GT_Values.RA.addBlastRecipe(aOreStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, aMultiplier), null, null, GT_Utility.mul(aMultiplier * 3 * aMaterial.mSmeltingMultiplier, tSmeltInto), ItemList.TE_Slag.get(1L, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L)), tSmeltInto.stackSize * 500, 120, 1500); - GT_Values.RA.addBlastRecipe(aOreStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Quicklime, aMultiplier), null, null, GT_Utility.mul(aMultiplier * 3 * aMaterial.mSmeltingMultiplier, tSmeltInto), ItemList.TE_Slag.get(1L, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L)), tSmeltInto.stackSize * 500, 120, 1500); + if (aMaterial.mAutoGenerateBlastFurnaceRecipes) { + GT_Values.RA.addBlastRecipe( + aOreStack, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, aMultiplier), + null, + null, + GT_Utility.mul(aMultiplier * 3 * aMaterial.mSmeltingMultiplier, tSmeltInto), + ItemList.TE_Slag.get( + 1L, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L)), + tSmeltInto.stackSize * 500, + 120, + 1500); + GT_Values.RA.addBlastRecipe( + aOreStack, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Quicklime, aMultiplier), + null, + null, + GT_Utility.mul(aMultiplier * 3 * aMaterial.mSmeltingMultiplier, tSmeltInto), + ItemList.TE_Slag.get( + 1L, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L)), + tSmeltInto.stackSize * 500, + 120, + 1500); } } else if (aMaterial.contains(SubTag.BLASTFURNACE_CALCITE_DOUBLE)) { - if(aMaterial.mAutoGenerateBlastFurnaceRecipes) { - GT_Values.RA.addBlastRecipe(aOreStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, aMultiplier), null, null, GT_Utility.mul(aMultiplier * 2 * aMaterial.mSmeltingMultiplier, tSmeltInto), ItemList.TE_Slag.get(1L, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L)), tSmeltInto.stackSize * 500, 120, 1500); - GT_Values.RA.addBlastRecipe(aOreStack, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Quicklime, aMultiplier), null, null, GT_Utility.mul(aMultiplier * 2 * aMaterial.mSmeltingMultiplier, tSmeltInto), ItemList.TE_Slag.get(1L, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L)), tSmeltInto.stackSize * 500, 120, 1500); + if (aMaterial.mAutoGenerateBlastFurnaceRecipes) { + GT_Values.RA.addBlastRecipe( + aOreStack, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, aMultiplier), + null, + null, + GT_Utility.mul(aMultiplier * 2 * aMaterial.mSmeltingMultiplier, tSmeltInto), + ItemList.TE_Slag.get( + 1L, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L)), + tSmeltInto.stackSize * 500, + 120, + 1500); + GT_Values.RA.addBlastRecipe( + aOreStack, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Quicklime, aMultiplier), + null, + null, + GT_Utility.mul(aMultiplier * 2 * aMaterial.mSmeltingMultiplier, tSmeltInto), + ItemList.TE_Slag.get( + 1L, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.DarkAsh, 1L)), + tSmeltInto.stackSize * 500, + 120, + 1500); } } } if (!tHasSmelting) { - GT_ModHandler.addSmeltingRecipe(aOreStack, GT_OreDictUnificator.get(OrePrefixes.gem, tMaterial.mDirectSmelting, Math.max(1, aMultiplier * aMaterial.mSmeltingMultiplier / 2))); + GT_ModHandler.addSmeltingRecipe( + aOreStack, + GT_OreDictUnificator.get( + OrePrefixes.gem, + tMaterial.mDirectSmelting, + Math.max(1, aMultiplier * aMaterial.mSmeltingMultiplier / 2))); } if (tCrushed != null) { - GT_Values.RA.addForgeHammerRecipe(aOreStack, GT_Utility.copy(GT_Utility.copyAmount(tCrushed.stackSize, tGem), tCrushed), 16, 10); - GT_ModHandler.addPulverisationRecipe(aOreStack, GT_Utility.mul(2L, tCrushed), tMaterial.contains(SubTag.PULVERIZING_CINNABAR) ? GT_OreDictUnificator.get(OrePrefixes.crystal, Materials.Cinnabar, GT_OreDictUnificator.get(OrePrefixes.gem, tPrimaryByMaterial, GT_Utility.copyAmount(1L, tPrimaryByProduct), 1L), 1L) : GT_OreDictUnificator.get(OrePrefixes.gem, tPrimaryByMaterial, GT_Utility.copyAmount(1L, tPrimaryByProduct), 1L), tPrimaryByProduct == null ? 0 : tPrimaryByProduct.stackSize * 10 * aMultiplier * aMaterial.mByProductMultiplier, GT_OreDictUnificator.getDust(aPrefix.mSecondaryMaterial), 50, true); + GT_Values.RA.addForgeHammerRecipe( + aOreStack, GT_Utility.copy(GT_Utility.copyAmount(tCrushed.stackSize, tGem), tCrushed), 16, 10); + GT_ModHandler.addPulverisationRecipe( + aOreStack, + GT_Utility.mul(2L, tCrushed), + tMaterial.contains(SubTag.PULVERIZING_CINNABAR) + ? GT_OreDictUnificator.get( + OrePrefixes.crystal, + Materials.Cinnabar, + GT_OreDictUnificator.get( + OrePrefixes.gem, + tPrimaryByMaterial, + GT_Utility.copyAmount(1L, tPrimaryByProduct), + 1L), + 1L) + : GT_OreDictUnificator.get( + OrePrefixes.gem, + tPrimaryByMaterial, + GT_Utility.copyAmount(1L, tPrimaryByProduct), + 1L), + tPrimaryByProduct == null + ? 0 + : tPrimaryByProduct.stackSize * 10 * aMultiplier * aMaterial.mByProductMultiplier, + GT_OreDictUnificator.getDust(aPrefix.mSecondaryMaterial), + 50, + true); } return true; } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOrePoor.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOrePoor.java index a74317f31e..c6be18cd1f 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOrePoor.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOrePoor.java @@ -17,7 +17,8 @@ public class ProcessingOrePoor implements gregtech.api.interfaces.IOreRecipeRegi } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { int aMultiplier = 1; switch (aPrefix) { case oreSmall: @@ -31,14 +32,30 @@ public class ProcessingOrePoor implements gregtech.api.interfaces.IOreRecipeRegi break; case oreRich: aMultiplier = 4; - default: - break; + default: + break; } if (aMaterial != null) { - GT_Values.RA.addForgeHammerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, aMultiplier), 16, 10); - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 2 * aMultiplier), GT_OreDictUnificator.get(OrePrefixes.dustTiny, GT_Utility.selectItemInList(0, aMaterial, aMaterial.mOreByProducts), 1L), 5 * aMultiplier, GT_OreDictUnificator.getDust(aPrefix.mSecondaryMaterial), 100, true); + GT_Values.RA.addForgeHammerRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, aMultiplier), + 16, + 10); + GT_ModHandler.addPulverisationRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 2 * aMultiplier), + GT_OreDictUnificator.get( + OrePrefixes.dustTiny, + GT_Utility.selectItemInList(0, aMaterial, aMaterial.mOreByProducts), + 1L), + 5 * aMultiplier, + GT_OreDictUnificator.getDust(aPrefix.mSecondaryMaterial), + 100, + true); if (aMaterial.contains(gregtech.api.enums.SubTag.NO_SMELTING)) - GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial.mDirectSmelting, aMultiplier)); + GT_ModHandler.addSmeltingRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial.mDirectSmelting, aMultiplier)); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOreSmelting.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOreSmelting.java index d33673084e..ce1bedac21 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOreSmelting.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOreSmelting.java @@ -9,20 +9,44 @@ import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; public class ProcessingOreSmelting implements gregtech.api.interfaces.IOreRecipeRegistrator { - private final OrePrefixes[] mSmeltingPrefixes = {OrePrefixes.crushed, OrePrefixes.crushedPurified, OrePrefixes.crushedCentrifuged, OrePrefixes.dust, OrePrefixes.dustImpure, OrePrefixes.dustPure, OrePrefixes.dustRefined}; + private final OrePrefixes[] mSmeltingPrefixes = { + OrePrefixes.crushed, + OrePrefixes.crushedPurified, + OrePrefixes.crushedCentrifuged, + OrePrefixes.dust, + OrePrefixes.dustImpure, + OrePrefixes.dustPure, + OrePrefixes.dustRefined + }; public ProcessingOreSmelting() { for (OrePrefixes tPrefix : this.mSmeltingPrefixes) tPrefix.add(this); } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { GT_ModHandler.removeFurnaceSmelting(aStack); if (!aMaterial.contains(SubTag.NO_SMELTING)) { if ((aMaterial.mBlastFurnaceRequired) || (aMaterial.mDirectSmelting.mBlastFurnaceRequired)) { - if(aMaterial.mBlastFurnaceTemp < 1000 && aMaterial.mDirectSmelting.mBlastFurnaceTemp < 1000) - if(aMaterial.mAutoGenerateBlastFurnaceRecipes) { - GT_Values.RA.addBlastRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 1L), null, null, aMaterial.mBlastFurnaceTemp > 1750 ? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial, GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), 1L) : GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), null, (int) Math.max(aMaterial.getMass() / 4L, 1L) * aMaterial.mBlastFurnaceTemp, 120, aMaterial.mBlastFurnaceTemp); + if (aMaterial.mBlastFurnaceTemp < 1000 && aMaterial.mDirectSmelting.mBlastFurnaceTemp < 1000) + if (aMaterial.mAutoGenerateBlastFurnaceRecipes) { + GT_Values.RA.addBlastRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Circuit_Integrated.getWithDamage(0L, 1L), + null, + null, + aMaterial.mBlastFurnaceTemp > 1750 + ? GT_OreDictUnificator.get( + OrePrefixes.ingotHot, + aMaterial, + GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), + 1L) + : GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), + null, + (int) Math.max(aMaterial.getMass() / 4L, 1L) * aMaterial.mBlastFurnaceTemp, + 120, + aMaterial.mBlastFurnaceTemp); } } else { OrePrefixes outputPrefix; @@ -45,24 +69,77 @@ public class ProcessingOreSmelting implements gregtech.api.interfaces.IOreRecipe } break; case dust: - int outputAmount = GT_Mod.gregtechproxy.mMixedOreOnlyYieldsTwoThirdsOfPureOre ? 2 : 3; - if (aMaterial.mDirectSmelting != aMaterial) { - if (!aMaterial.contains(SubTag.DONT_ADD_DEFAULT_BBF_RECIPE)) { - GT_Values.RA.addPrimitiveBlastRecipe(GT_Utility.copyAmount(2, aStack), GT_Values.NI, 2, aMaterial.mDirectSmelting.getIngots(outputAmount), GT_Values.NI, 2400); - } else if (aMaterial == Materials.Chalcopyrite) { - GT_Values.RA.addPrimitiveBlastRecipe(aMaterial.getDust(2), new ItemStack(Blocks.sand, 2), 2, aMaterial.mDirectSmelting.getIngots(outputAmount), Materials.Ferrosilite.getDustSmall(2 * outputAmount), 2400); - GT_Values.RA.addPrimitiveBlastRecipe(aMaterial.getDust(2), Materials.Glass.getDust(2), 2, aMaterial.mDirectSmelting.getIngots(outputAmount), Materials.Ferrosilite.getDustTiny(7 * outputAmount), 2400); - GT_Values.RA.addPrimitiveBlastRecipe(aMaterial.getDust(2), Materials.SiliconDioxide.getDust(2), 2, aMaterial.mDirectSmelting.getIngots(outputAmount), Materials.Ferrosilite.getDust(outputAmount), 2400); - GT_Values.RA.addPrimitiveBlastRecipe(aMaterial.getDust(2), Materials.Quartzite.getDust(4), 2, aMaterial.mDirectSmelting.getIngots(outputAmount), Materials.Ferrosilite.getDust(outputAmount), 2400); - GT_Values.RA.addPrimitiveBlastRecipe(aMaterial.getDust(2), Materials.NetherQuartz.getDust(2), 2, aMaterial.mDirectSmelting.getIngots(outputAmount), Materials.Ferrosilite.getDust(outputAmount), 2400); - GT_Values.RA.addPrimitiveBlastRecipe(aMaterial.getDust(2), Materials.CertusQuartz.getDust(2), 2, aMaterial.mDirectSmelting.getIngots(outputAmount), Materials.Ferrosilite.getDust(outputAmount), 2400); + int outputAmount = GT_Mod.gregtechproxy.mMixedOreOnlyYieldsTwoThirdsOfPureOre ? 2 : 3; + if (aMaterial.mDirectSmelting != aMaterial) { + if (!aMaterial.contains(SubTag.DONT_ADD_DEFAULT_BBF_RECIPE)) { + GT_Values.RA.addPrimitiveBlastRecipe( + GT_Utility.copyAmount(2, aStack), + GT_Values.NI, + 2, + aMaterial.mDirectSmelting.getIngots(outputAmount), + GT_Values.NI, + 2400); + } else if (aMaterial == Materials.Chalcopyrite) { + GT_Values.RA.addPrimitiveBlastRecipe( + aMaterial.getDust(2), + new ItemStack(Blocks.sand, 2), + 2, + aMaterial.mDirectSmelting.getIngots(outputAmount), + Materials.Ferrosilite.getDustSmall(2 * outputAmount), + 2400); + GT_Values.RA.addPrimitiveBlastRecipe( + aMaterial.getDust(2), + Materials.Glass.getDust(2), + 2, + aMaterial.mDirectSmelting.getIngots(outputAmount), + Materials.Ferrosilite.getDustTiny(7 * outputAmount), + 2400); + GT_Values.RA.addPrimitiveBlastRecipe( + aMaterial.getDust(2), + Materials.SiliconDioxide.getDust(2), + 2, + aMaterial.mDirectSmelting.getIngots(outputAmount), + Materials.Ferrosilite.getDust(outputAmount), + 2400); + GT_Values.RA.addPrimitiveBlastRecipe( + aMaterial.getDust(2), + Materials.Quartzite.getDust(4), + 2, + aMaterial.mDirectSmelting.getIngots(outputAmount), + Materials.Ferrosilite.getDust(outputAmount), + 2400); + GT_Values.RA.addPrimitiveBlastRecipe( + aMaterial.getDust(2), + Materials.NetherQuartz.getDust(2), + 2, + aMaterial.mDirectSmelting.getIngots(outputAmount), + Materials.Ferrosilite.getDust(outputAmount), + 2400); + GT_Values.RA.addPrimitiveBlastRecipe( + aMaterial.getDust(2), + Materials.CertusQuartz.getDust(2), + 2, + aMaterial.mDirectSmelting.getIngots(outputAmount), + Materials.Ferrosilite.getDust(outputAmount), + 2400); } else if (aMaterial == Materials.Tetrahedrite) { - GT_Values.RA.addPrimitiveBlastRecipe(aMaterial.getDust(2), GT_Values.NI, 2, aMaterial.mDirectSmelting.getIngots(outputAmount), Materials.Antimony.getNuggets(3 * outputAmount), 2400); + GT_Values.RA.addPrimitiveBlastRecipe( + aMaterial.getDust(2), + GT_Values.NI, + 2, + aMaterial.mDirectSmelting.getIngots(outputAmount), + Materials.Antimony.getNuggets(3 * outputAmount), + 2400); } else if (aMaterial == Materials.Galena) { - GT_Values.RA.addPrimitiveBlastRecipe(aMaterial.getDust(2), GT_Values.NI, 2, aMaterial.mDirectSmelting.getIngots(outputAmount), Materials.Silver.getNuggets(3 * outputAmount), 2400); - + GT_Values.RA.addPrimitiveBlastRecipe( + aMaterial.getDust(2), + GT_Values.NI, + 2, + aMaterial.mDirectSmelting.getIngots(outputAmount), + Materials.Silver.getNuggets(3 * outputAmount), + 2400); } - } + } case dustImpure: case dustPure: case dustRefined: @@ -71,7 +148,7 @@ public class ProcessingOreSmelting implements gregtech.api.interfaces.IOreRecipe outputSize = 1; } else { if (GT_Mod.gregtechproxy.mMixedOreOnlyYieldsTwoThirdsOfPureOre) { - outputSize = 6; + outputSize = 6; outputPrefix = OrePrefixes.nugget; } else { outputSize = 1; @@ -79,14 +156,17 @@ public class ProcessingOreSmelting implements gregtech.api.interfaces.IOreRecipe } } break; - default: - outputPrefix = OrePrefixes.ingot; - outputSize = 1; - break; + default: + outputPrefix = OrePrefixes.ingot; + outputSize = 1; + break; } ItemStack tStack = GT_OreDictUnificator.get(outputPrefix, aMaterial.mDirectSmelting, outputSize); if (tStack == null) - tStack = GT_OreDictUnificator.get(aMaterial.contains(SubTag.SMELTING_TO_GEM) ? OrePrefixes.gem : OrePrefixes.ingot, aMaterial.mDirectSmelting, 1L); + tStack = GT_OreDictUnificator.get( + aMaterial.contains(SubTag.SMELTING_TO_GEM) ? OrePrefixes.gem : OrePrefixes.ingot, + aMaterial.mDirectSmelting, + 1L); if ((tStack == null) && (!aMaterial.contains(SubTag.SMELTING_TO_GEM))) tStack = GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mDirectSmelting, 1L); GT_ModHandler.addSmeltingRecipe(aStack, tStack); diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipe.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipe.java index a1d733506c..709a6c36b3 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipe.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipe.java @@ -23,36 +23,139 @@ public class ProcessingPipe implements gregtech.api.interfaces.IOreRecipeRegistr } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { switch (aPrefix) { case pipeHuge: case pipeLarge: case pipeMedium: case pipeSmall: case pipeTiny: - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.pipeTiny, aMaterial, 8L), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PPP", "h w", "PPP", 'P', OrePrefixes.plate.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.pipeSmall, aMaterial, 6L), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PWP", "P P", "PHP", 'P', aMaterial == Materials.Wood ? OrePrefixes.plank.get(aMaterial) : OrePrefixes.plate.get(aMaterial), 'H', aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSoftHammer : ToolDictNames.craftingToolHardHammer, 'W', aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSaw : ToolDictNames.craftingToolWrench}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.pipeMedium, aMaterial, 2L), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PPP", "W H", "PPP", 'P', aMaterial == Materials.Wood ? OrePrefixes.plank.get(aMaterial) : OrePrefixes.plate.get(aMaterial), 'H', aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSoftHammer : ToolDictNames.craftingToolHardHammer, 'W', aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSaw : ToolDictNames.craftingToolWrench}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.pipeLarge, aMaterial, 1L), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PHP", "P P", "PWP", 'P', aMaterial == Materials.Wood ? OrePrefixes.plank.get(aMaterial) : OrePrefixes.plate.get(aMaterial), 'H', aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSoftHammer : ToolDictNames.craftingToolHardHammer, 'W', aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSaw : ToolDictNames.craftingToolWrench}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.pipeHuge, aMaterial, 1L), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"DhD", "D D", "DwD", 'D', OrePrefixes.plateDouble.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.pipeTiny, aMaterial, 8L), + GT_ModHandler.RecipeBits.BUFFERED, + new Object[] {"PPP", "h w", "PPP", 'P', OrePrefixes.plate.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.pipeSmall, aMaterial, 6L), + GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PWP", + "P P", + "PHP", + 'P', + aMaterial == Materials.Wood + ? OrePrefixes.plank.get(aMaterial) + : OrePrefixes.plate.get(aMaterial), + 'H', + aMaterial.contains(SubTag.WOOD) + ? ToolDictNames.craftingToolSoftHammer + : ToolDictNames.craftingToolHardHammer, + 'W', + aMaterial.contains(SubTag.WOOD) + ? ToolDictNames.craftingToolSaw + : ToolDictNames.craftingToolWrench + }); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.pipeMedium, aMaterial, 2L), + GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PPP", + "W H", + "PPP", + 'P', + aMaterial == Materials.Wood + ? OrePrefixes.plank.get(aMaterial) + : OrePrefixes.plate.get(aMaterial), + 'H', + aMaterial.contains(SubTag.WOOD) + ? ToolDictNames.craftingToolSoftHammer + : ToolDictNames.craftingToolHardHammer, + 'W', + aMaterial.contains(SubTag.WOOD) + ? ToolDictNames.craftingToolSaw + : ToolDictNames.craftingToolWrench + }); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, aMaterial, 1L), + GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PHP", + "P P", + "PWP", + 'P', + aMaterial == Materials.Wood + ? OrePrefixes.plank.get(aMaterial) + : OrePrefixes.plate.get(aMaterial), + 'H', + aMaterial.contains(SubTag.WOOD) + ? ToolDictNames.craftingToolSoftHammer + : ToolDictNames.craftingToolHardHammer, + 'W', + aMaterial.contains(SubTag.WOOD) + ? ToolDictNames.craftingToolSaw + : ToolDictNames.craftingToolWrench + }); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.pipeHuge, aMaterial, 1L), + GT_ModHandler.RecipeBits.BUFFERED, + new Object[] {"DhD", "D D", "DwD", 'D', OrePrefixes.plateDouble.get(aMaterial)}); break; case pipeRestrictiveHuge: case pipeRestrictiveLarge: case pipeRestrictiveMedium: case pipeRestrictiveSmall: case pipeRestrictiveTiny: - gregtech.api.enums.GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(aOreDictName.replaceFirst("Restrictive", ""), null, 1L, false, true), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Steel, aPrefix.mSecondaryMaterial.mAmount / OrePrefixes.ring.mMaterialAmount), GT_Utility.copyAmount(1L, aStack), (int) (aPrefix.mSecondaryMaterial.mAmount * 400L / OrePrefixes.ring.mMaterialAmount), 4); + gregtech.api.enums.GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(aOreDictName.replaceFirst("Restrictive", ""), null, 1L, false, true), + GT_OreDictUnificator.get( + OrePrefixes.ring, + Materials.Steel, + aPrefix.mSecondaryMaterial.mAmount / OrePrefixes.ring.mMaterialAmount), + GT_Utility.copyAmount(1L, aStack), + (int) (aPrefix.mSecondaryMaterial.mAmount * 400L / OrePrefixes.ring.mMaterialAmount), + 4); break; case pipeQuadruple: - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1, aStack), GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PP ", "PP ", " ", 'P', GT_OreDictUnificator.get(aOreDictName.replaceFirst("Quadruple", "Medium"), null, 1L, false, true)}); - gregtech.api.enums.GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(aOreDictName.replaceFirst("Quadruple", "Medium"), null, 4L, false, true), ItemList.Circuit_Integrated.getWithDamage(0, 4), GT_Utility.copyAmount(1L, aStack), 40 , 8); - break; + GT_ModHandler.addCraftingRecipe( + GT_Utility.copyAmount(1, aStack), + GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PP ", + "PP ", + " ", + 'P', + GT_OreDictUnificator.get( + aOreDictName.replaceFirst("Quadruple", "Medium"), null, 1L, false, true) + }); + gregtech.api.enums.GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get( + aOreDictName.replaceFirst("Quadruple", "Medium"), null, 4L, false, true), + ItemList.Circuit_Integrated.getWithDamage(0, 4), + GT_Utility.copyAmount(1L, aStack), + 40, + 8); + break; case pipeNonuple: - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1, aStack), GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PPP", "PPP", "PPP", 'P', GT_OreDictUnificator.get(aOreDictName.replaceFirst("Nonuple", "Small"), null, 1L, false, true)}); - gregtech.api.enums.GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(aOreDictName.replaceFirst("Nonuple", "Small"), null, 9L, false, true), ItemList.Circuit_Integrated.getWithDamage(0, 9), GT_Utility.copyAmount(1L, aStack), 60 , 8); - break; - default: - break; + GT_ModHandler.addCraftingRecipe( + GT_Utility.copyAmount(1, aStack), + GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PPP", + "PPP", + "PPP", + 'P', + GT_OreDictUnificator.get( + aOreDictName.replaceFirst("Nonuple", "Small"), null, 1L, false, true) + }); + gregtech.api.enums.GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(aOreDictName.replaceFirst("Nonuple", "Small"), null, 9L, false, true), + ItemList.Circuit_Integrated.getWithDamage(0, 9), + GT_Utility.copyAmount(1L, aStack), + 60, + 8); + break; + default: + break; } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java index 8b08b2dc0a..56b30c5486 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java @@ -17,22 +17,92 @@ public class ProcessingPlank implements gregtech.api.interfaces.IOreRecipeRegist } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if (aOreDictName.startsWith("plankWood")) { - GT_Values.RA.addLatheRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), null, 10, 8); - GT_Values.RA.addCNCRecipe(GT_Utility.copyAmount(4L, aStack), GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.Wood, 1L), 800, 1); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(8L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), new ItemStack(Blocks.noteblock, 1), 200, 4); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(8L, aStack), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Diamond, 1L), new ItemStack(Blocks.jukebox, 1), 400, 4); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Iron, 1L), ItemList.Crate_Empty.get(1L), 200, 1); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.WroughtIron, 1L), ItemList.Crate_Empty.get(1L), 200, 1); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 1L), ItemList.Crate_Empty.get(1L), 200, 1); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 1L), new ItemStack(Blocks.wooden_button, 1), 100, 4); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(2L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 2L), new ItemStack(Blocks.wooden_pressure_plate, 1), 200, 4); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(3L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 3L), new ItemStack(Blocks.trapdoor, 1), 300, 4); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(4L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 4L), new ItemStack(Blocks.crafting_table, 1), 400, 4); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(6L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 6L), new ItemStack(Items.wooden_door, 1), 600, 4); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(8L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), new ItemStack(Blocks.chest, 1), 800, 4); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(6L, aStack), new ItemStack(Items.book, 3), new ItemStack(Blocks.bookshelf, 1), 400, 4); + GT_Values.RA.addLatheRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + null, + 10, + 8); + GT_Values.RA.addCNCRecipe( + GT_Utility.copyAmount(4L, aStack), + GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.Wood, 1L), + 800, + 1); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(8L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), + new ItemStack(Blocks.noteblock, 1), + 200, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(8L, aStack), + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Diamond, 1L), + new ItemStack(Blocks.jukebox, 1), + 400, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Iron, 1L), + ItemList.Crate_Empty.get(1L), + 200, + 1); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.WroughtIron, 1L), + ItemList.Crate_Empty.get(1L), + 200, + 1); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 1L), + ItemList.Crate_Empty.get(1L), + 200, + 1); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Circuit_Integrated.getWithDamage(0L, 1L), + new ItemStack(Blocks.wooden_button, 1), + 100, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(2L, aStack), + ItemList.Circuit_Integrated.getWithDamage(0L, 2L), + new ItemStack(Blocks.wooden_pressure_plate, 1), + 200, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(3L, aStack), + ItemList.Circuit_Integrated.getWithDamage(0L, 3L), + new ItemStack(Blocks.trapdoor, 1), + 300, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(4L, aStack), + ItemList.Circuit_Integrated.getWithDamage(0L, 4L), + new ItemStack(Blocks.crafting_table, 1), + 400, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(6L, aStack), + ItemList.Circuit_Integrated.getWithDamage(0L, 6L), + new ItemStack(Items.wooden_door, 1), + 600, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(8L, aStack), + ItemList.Circuit_Integrated.getWithDamage(0L, 8L), + new ItemStack(Blocks.chest, 1), + 800, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(6L, aStack), + new ItemStack(Items.book, 3), + new ItemStack(Blocks.bookshelf, 1), + 400, + 4); if (aStack.getItemDamage() == 32767) { for (byte i = 0; i < 64; i = (byte) (i + 1)) { @@ -40,18 +110,36 @@ public class ProcessingPlank implements gregtech.api.interfaces.IOreRecipeRegist // Get Recipe and Output, add recipe to delayed removal ItemStack tOutput = GT_ModHandler.getRecipeOutput(tStack, tStack, tStack); if ((tOutput != null) && (tOutput.stackSize >= 3)) { - GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, tStack), GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput), null, 25, 4); + GT_Values.RA.addCutterRecipe( + GT_Utility.copyAmount(1L, tStack), + GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput), + null, + 25, + 4); GT_ModHandler.removeRecipeDelayed(tStack, tStack, tStack); - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"sP", 'P', tStack}); + GT_ModHandler.addCraftingRecipe( + GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput), + GT_ModHandler.RecipeBits.BUFFERED, + new Object[] {"sP", 'P', tStack}); } - if((tStack == null) && (i >= 16)) break; + if ((tStack == null) && (i >= 16)) break; } } else { - ItemStack tOutput = !aModName.equalsIgnoreCase("thaumcraft") ? GT_ModHandler.getRecipeOutput(aStack, aStack, aStack) : GT_ModHandler.getRecipeOutputNoOreDict(aStack, aStack, aStack); + ItemStack tOutput = !aModName.equalsIgnoreCase("thaumcraft") + ? GT_ModHandler.getRecipeOutput(aStack, aStack, aStack) + : GT_ModHandler.getRecipeOutputNoOreDict(aStack, aStack, aStack); if ((tOutput != null) && (tOutput.stackSize >= 3)) { - GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput), null, 25, 4); + GT_Values.RA.addCutterRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput), + null, + 25, + 4); GT_ModHandler.removeRecipeDelayed(aStack, aStack, aStack); - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"sP", 'P', aStack}); + GT_ModHandler.addCraftingRecipe( + GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput), + GT_ModHandler.RecipeBits.BUFFERED, + new Object[] {"sP", 'P', aStack}); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlate.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlate.java index b364761567..79ec809039 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlate.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlate.java @@ -1,5 +1,14 @@ package gregtech.loaders.oreprocessing; +import static gregtech.api.enums.ConfigCategories.Recipes.harderrecipes; +import static gregtech.api.enums.GT_Values.L; +import static gregtech.api.enums.GT_Values.NI; +import static gregtech.api.enums.GT_Values.RA; +import static gregtech.api.enums.GT_Values.W; +import static gregtech.api.util.GT_ModHandler.RecipeBits.BUFFERED; +import static gregtech.api.util.GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS; +import static gregtech.common.GT_Proxy.tBits; + import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.ItemList; @@ -18,15 +27,6 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -import static gregtech.api.enums.ConfigCategories.Recipes.harderrecipes; -import static gregtech.api.enums.GT_Values.L; -import static gregtech.api.enums.GT_Values.NI; -import static gregtech.api.enums.GT_Values.RA; -import static gregtech.api.enums.GT_Values.W; -import static gregtech.api.util.GT_ModHandler.RecipeBits.BUFFERED; -import static gregtech.api.util.GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS; -import static gregtech.common.GT_Proxy.tBits; - public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegistrator { public ProcessingPlate() { OrePrefixes.plate.add(this); @@ -50,11 +50,8 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist * @param aStack always != null, the {@link ItemStack} to register */ @Override - public void registerOre(OrePrefixes aPrefix, - Materials aMaterial, - String aOreDictName, - String aModName, - ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { final boolean aNoSmashing = aMaterial.contains(SubTag.NO_SMASHING); final boolean aNoWorking = aMaterial.contains(SubTag.NO_WORKING); @@ -104,107 +101,95 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist if (aMaterial.mFuelPower > 0) { - RA.addFuel( - GT_Utility.copyAmount(1L, aStack), - NI, - aMaterial.mFuelPower, - aMaterial.mFuelType); - + RA.addFuel(GT_Utility.copyAmount(1L, aStack), NI, aMaterial.mFuelPower, aMaterial.mFuelType); } - if (aMaterial.mStandardMoltenFluid != null && - !(aMaterial == Materials.AnnealedCopper || aMaterial == Materials.WroughtIron)) { + if (aMaterial.mStandardMoltenFluid != null + && !(aMaterial == Materials.AnnealedCopper || aMaterial == Materials.WroughtIron)) { RA.addFluidSolidifierRecipe( - ItemList.Shape_Mold_Plate.get(0L), - aMaterial.getMolten(L), - aMaterial.getPlates(1), - 32, 8); - + ItemList.Shape_Mold_Plate.get(0L), aMaterial.getMolten(L), aMaterial.getPlates(1), 32, 8); } GT_ModHandler.addCraftingRecipe( GT_OreDictUnificator.get(OrePrefixes.foil, aMaterial, 2L), tBits, // DO_NOT_CHECK_FOR_COLLISIONS|BUFFERED|ONLY_ADD_IF_RESULT_IS_NOT_NULL|NOT_REMOVABLE - new Object[]{ - "hX", - 'X', OrePrefixes.plate.get(aMaterial)}); + new Object[] {"hX", 'X', OrePrefixes.plate.get(aMaterial)}); if (aMaterial == Materials.Paper) { GT_ModHandler.addCraftingRecipe( - GT_Utility.copyAmount( - GregTech_API.sRecipeFile.get(harderrecipes, aStack, true) ? 2L : 3L, - aStack), + GT_Utility.copyAmount(GregTech_API.sRecipeFile.get(harderrecipes, aStack, true) ? 2L : 3L, aStack), BUFFERED, - new Object[]{ - "XXX", - 'X', new ItemStack(Items.reeds, 1, W)}); + new Object[] {"XXX", 'X', new ItemStack(Items.reeds, 1, W)}); } if (aMaterial.mUnificatable && aMaterial.mMaterialInto == aMaterial) { - if (!aNoSmashing && - GregTech_API.sRecipeFile.get(ConfigCategories.Tools.hammerplating, aMaterial.toString(), true)) { + if (!aNoSmashing + && GregTech_API.sRecipeFile.get(ConfigCategories.Tools.hammerplating, aMaterial.toString(), true)) { GT_ModHandler.addCraftingRecipe( aMaterial.getPlates(1), tBits, // DO_NOT_CHECK_FOR_COLLISIONS|BUFFERED|ONLY_ADD_IF_RESULT_IS_NOT_NULL|NOT_REMOVABLE - new Object[]{ - "h", // craftingToolHardHammer - "X", - "X", - 'X', OrePrefixes.ingot.get(aMaterial)}); + new Object[] { + "h", // craftingToolHardHammer + "X", + "X", + 'X', + OrePrefixes.ingot.get(aMaterial) + }); // Only added if IC2 Forge Hammer is enabled in Recipes.cfg: B:ic2forgehammer_true=false GT_ModHandler.addCraftingRecipe( aMaterial.getPlates(1), tBits, // DO_NOT_CHECK_FOR_COLLISIONS|BUFFERED|ONLY_ADD_IF_RESULT_IS_NOT_NULL|NOT_REMOVABLE - new Object[]{ - "H", // craftingToolForgeHammer - "X", - 'H', ToolDictNames.craftingToolForgeHammer, - 'X', OrePrefixes.ingot.get(aMaterial)}); + new Object[] { + "H", // craftingToolForgeHammer + "X", + 'H', + ToolDictNames.craftingToolForgeHammer, + 'X', + OrePrefixes.ingot.get(aMaterial) + }); GT_ModHandler.addCraftingRecipe( aMaterial.getPlates(1), tBits, // DO_NOT_CHECK_FOR_COLLISIONS|BUFFERED|ONLY_ADD_IF_RESULT_IS_NOT_NULL|NOT_REMOVABLE - new Object[]{ - "h", // craftingToolHardHammer - "X", - 'X', OrePrefixes.gem.get(aMaterial)}); + new Object[] { + "h", // craftingToolHardHammer + "X", + 'X', + OrePrefixes.gem.get(aMaterial) + }); // Only added if IC2 Forge Hammer is enabled in Recipes.cfg: B:ic2forgehammer_true=false GT_ModHandler.addCraftingRecipe( aMaterial.getPlates(1), tBits, // DO_NOT_CHECK_FOR_COLLISIONS|BUFFERED|ONLY_ADD_IF_RESULT_IS_NOT_NULL|NOT_REMOVABLE - new Object[]{ - "H", // craftingToolForgeHammer - "X", - 'H', ToolDictNames.craftingToolForgeHammer, - 'X', OrePrefixes.gem.get(aMaterial)}); - + new Object[] { + "H", // craftingToolForgeHammer + "X", + 'H', + ToolDictNames.craftingToolForgeHammer, + 'X', + OrePrefixes.gem.get(aMaterial) + }); } - if ((aMaterial.contains(SubTag.MORTAR_GRINDABLE)) && - (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, aMaterial.mName, true))) { + if ((aMaterial.contains(SubTag.MORTAR_GRINDABLE)) + && (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, aMaterial.mName, true))) { GT_ModHandler.addCraftingRecipe( aMaterial.getDust(1), tBits, // DO_NOT_CHECK_FOR_COLLISIONS|BUFFERED|ONLY_ADD_IF_RESULT_IS_NOT_NULL|NOT_REMOVABLE - new Object[]{ - "X", - "m", - 'X', OrePrefixes.plate.get(aMaterial)}); - + new Object[] {"X", "m", 'X', OrePrefixes.plate.get(aMaterial)}); } } } - private void registerPlateDouble(final Materials aMaterial, - final ItemStack aStack, - final boolean aNoSmashing, - final long aMaterialMass) { + private void registerPlateDouble( + final Materials aMaterial, final ItemStack aStack, final boolean aNoSmashing, final long aMaterialMass) { registerCover(aMaterial, aStack); @@ -220,29 +205,27 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist if (GregTech_API.sRecipeFile.get( gregtech.api.enums.ConfigCategories.Tools.hammerdoubleplate, - OrePrefixes.plate.get(aMaterial).toString(), true)) { + OrePrefixes.plate.get(aMaterial).toString(), + true)) { Object aPlateStack = OrePrefixes.plate.get(aMaterial); GT_ModHandler.addCraftingRecipe( - GT_Utility.copyAmount(1L, aStack), - DO_NOT_CHECK_FOR_COLLISIONS | BUFFERED, - new Object[]{ - "I", - "B", - "h", // craftingToolHardHammer - 'I', aPlateStack, - 'B', aPlateStack}); + GT_Utility.copyAmount(1L, aStack), DO_NOT_CHECK_FOR_COLLISIONS | BUFFERED, new Object[] { + "I", + "B", + "h", // craftingToolHardHammer + 'I', + aPlateStack, + 'B', + aPlateStack + }); // Only added if IC2 Forge Hammer is enabled in Recipes.cfg: B:ic2forgehammer_true=false GT_ModHandler.addShapelessCraftingRecipe( - GT_Utility.copyAmount(1L, aStack), - DO_NOT_CHECK_FOR_COLLISIONS | BUFFERED, - new Object[]{ - gregtech.api.enums.ToolDictNames.craftingToolForgeHammer, - aPlateStack, - aPlateStack}); - + GT_Utility.copyAmount(1L, aStack), DO_NOT_CHECK_FOR_COLLISIONS | BUFFERED, new Object[] { + gregtech.api.enums.ToolDictNames.craftingToolForgeHammer, aPlateStack, aPlateStack + }); } RA.addBenderRecipe( @@ -258,15 +241,13 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist gregtech.api.enums.ItemList.Circuit_Integrated.getWithDamage(0L, 2L), Materials.Glue.getFluid(10L), GT_Utility.copyAmount(1L, aStack), - 64, 8); - + 64, + 8); } } - private void registerPlateTriple(final Materials aMaterial, - final ItemStack aStack, - final boolean aNoSmashing, - final long aMaterialMass) { + private void registerPlateTriple( + final Materials aMaterial, final ItemStack aStack, final boolean aNoSmashing, final long aMaterialMass) { registerCover(aMaterial, aStack); @@ -282,27 +263,29 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist if (GregTech_API.sRecipeFile.get( gregtech.api.enums.ConfigCategories.Tools.hammertripleplate, - OrePrefixes.plate.get(aMaterial).toString(), true)) { + OrePrefixes.plate.get(aMaterial).toString(), + true)) { Object aPlateStack = OrePrefixes.plate.get(aMaterial); GT_ModHandler.addCraftingRecipe( - GT_Utility.copyAmount(1L, aStack), - DO_NOT_CHECK_FOR_COLLISIONS | BUFFERED, - new Object[]{ - "I", - "B", - "h", // craftingToolHardHammer - 'I', OrePrefixes.plateDouble.get(aMaterial), - 'B', aPlateStack}); + GT_Utility.copyAmount(1L, aStack), DO_NOT_CHECK_FOR_COLLISIONS | BUFFERED, new Object[] { + "I", + "B", + "h", // craftingToolHardHammer + 'I', + OrePrefixes.plateDouble.get(aMaterial), + 'B', + aPlateStack + }); GT_ModHandler.addShapelessCraftingRecipe( - GT_Utility.copyAmount(1L, aStack), - DO_NOT_CHECK_FOR_COLLISIONS | BUFFERED, - new Object[]{ - gregtech.api.enums.ToolDictNames.craftingToolForgeHammer, - aPlateStack, aPlateStack, aPlateStack}); - + GT_Utility.copyAmount(1L, aStack), DO_NOT_CHECK_FOR_COLLISIONS | BUFFERED, new Object[] { + gregtech.api.enums.ToolDictNames.craftingToolForgeHammer, + aPlateStack, + aPlateStack, + aPlateStack + }); } RA.addBenderRecipe( @@ -318,8 +301,8 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist gregtech.api.enums.ItemList.Circuit_Integrated.getWithDamage(0L, 3L), Materials.Glue.getFluid(20L), GT_Utility.copyAmount(1L, aStack), - 96, 8); - + 96, + 8); } RA.addImplosionRecipe( @@ -327,21 +310,20 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist 2, GT_OreDictUnificator.get(OrePrefixes.compressed, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L)); - } - private void registerPlateQuadruple(final Materials aMaterial, - final ItemStack aStack, - final boolean aNoSmashing, - final long aMaterialMass, - final boolean aNoWorking) { + private void registerPlateQuadruple( + final Materials aMaterial, + final ItemStack aStack, + final boolean aNoSmashing, + final long aMaterialMass, + final boolean aNoWorking) { registerCover(aMaterial, aStack); GT_ModHandler.removeRecipeByOutputDelayed(aStack); if (!aNoWorking) - RA.addCNCRecipe( GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L), @@ -352,26 +334,30 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist if (GregTech_API.sRecipeFile.get( gregtech.api.enums.ConfigCategories.Tools.hammerquadrupleplate, - OrePrefixes.plate.get(aMaterial).toString(), true)) { + OrePrefixes.plate.get(aMaterial).toString(), + true)) { Object aPlateStack = OrePrefixes.plate.get(aMaterial); GT_ModHandler.addCraftingRecipe( - GT_Utility.copyAmount(1L, aStack), - DO_NOT_CHECK_FOR_COLLISIONS | BUFFERED, - new Object[]{ - "I", - "B", - "h", // craftingToolHardHammer - 'I', OrePrefixes.plateTriple.get(aMaterial), - 'B', aPlateStack}); + GT_Utility.copyAmount(1L, aStack), DO_NOT_CHECK_FOR_COLLISIONS | BUFFERED, new Object[] { + "I", + "B", + "h", // craftingToolHardHammer + 'I', + OrePrefixes.plateTriple.get(aMaterial), + 'B', + aPlateStack + }); GT_ModHandler.addShapelessCraftingRecipe( - GT_Utility.copyAmount(1L, aStack), - DO_NOT_CHECK_FOR_COLLISIONS | BUFFERED, - new Object[]{gregtech.api.enums.ToolDictNames.craftingToolForgeHammer, - aPlateStack, aPlateStack, aPlateStack, aPlateStack}); - + GT_Utility.copyAmount(1L, aStack), DO_NOT_CHECK_FOR_COLLISIONS | BUFFERED, new Object[] { + gregtech.api.enums.ToolDictNames.craftingToolForgeHammer, + aPlateStack, + aPlateStack, + aPlateStack, + aPlateStack + }); } RA.addBenderRecipe( @@ -385,16 +371,15 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist RA.addAssemblerRecipe( GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 4L), gregtech.api.enums.ItemList.Circuit_Integrated.getWithDamage(0L, 4L), - Materials.Glue.getFluid(30L), GT_Utility.copyAmount(1L, aStack), - 128, 8); - + Materials.Glue.getFluid(30L), + GT_Utility.copyAmount(1L, aStack), + 128, + 8); } } - private void registerPlateQuintuple(final Materials aMaterial, - final ItemStack aStack, - final boolean aNoSmashing, - final long aMaterialMass) { + private void registerPlateQuintuple( + final Materials aMaterial, final ItemStack aStack, final boolean aNoSmashing, final long aMaterialMass) { registerCover(aMaterial, aStack); @@ -404,27 +389,31 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist if (GregTech_API.sRecipeFile.get( gregtech.api.enums.ConfigCategories.Tools.hammerquintupleplate, - OrePrefixes.plate.get(aMaterial).toString(), true)) { + OrePrefixes.plate.get(aMaterial).toString(), + true)) { Object aPlateStack = OrePrefixes.plate.get(aMaterial); GT_ModHandler.addCraftingRecipe( - GT_Utility.copyAmount(1L, aStack), - DO_NOT_CHECK_FOR_COLLISIONS | BUFFERED, - new Object[]{ - "I", - "B", - "h", // craftingToolHardHammer - 'I', OrePrefixes.plateQuadruple.get(aMaterial), - 'B', aPlateStack}); + GT_Utility.copyAmount(1L, aStack), DO_NOT_CHECK_FOR_COLLISIONS | BUFFERED, new Object[] { + "I", + "B", + "h", // craftingToolHardHammer + 'I', + OrePrefixes.plateQuadruple.get(aMaterial), + 'B', + aPlateStack + }); GT_ModHandler.addShapelessCraftingRecipe( - GT_Utility.copyAmount(1L, aStack), - DO_NOT_CHECK_FOR_COLLISIONS | BUFFERED, - new Object[]{ - ToolDictNames.craftingToolForgeHammer, - aPlateStack, aPlateStack, aPlateStack, aPlateStack, aPlateStack}); - + GT_Utility.copyAmount(1L, aStack), DO_NOT_CHECK_FOR_COLLISIONS | BUFFERED, new Object[] { + ToolDictNames.craftingToolForgeHammer, + aPlateStack, + aPlateStack, + aPlateStack, + aPlateStack, + aPlateStack + }); } RA.addBenderRecipe( @@ -440,15 +429,13 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist ItemList.Circuit_Integrated.getWithDamage(0L, 5L), Materials.Glue.getFluid(40L), GT_Utility.copyAmount(1L, aStack), - 160, 8); - + 160, + 8); } } - private void registerPlateDense(final Materials aMaterial, - final ItemStack aStack, - final boolean aNoSmashing, - final long aMaterialMass) { + private void registerPlateDense( + final Materials aMaterial, final ItemStack aStack, final boolean aNoSmashing, final long aMaterialMass) { registerCover(aMaterial, aStack); @@ -458,17 +445,14 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist RA.addBenderRecipe( GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 9L), - GT_Utility.copyAmount(1L, aStack), (int) Math.max(aMaterialMass * 9L, 1L), + GT_Utility.copyAmount(1L, aStack), + (int) Math.max(aMaterialMass * 9L, 1L), 96); - } - } - private void registerItemCasing(final OrePrefixes aPrefix, - final Materials aMaterial, - final ItemStack aStack, - final boolean aNoSmashing) { + private void registerItemCasing( + final OrePrefixes aPrefix, final Materials aMaterial, final ItemStack aStack, final boolean aNoSmashing) { GT_ModHandler.removeRecipeByOutputDelayed(aStack); @@ -478,36 +462,35 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist ItemList.Shape_Mold_Casing.get(0L), aMaterial.getMolten(L / 2), GT_OreDictUnificator.get(OrePrefixes.itemCasing, aMaterial, 1L), - 16, 8); - + 16, + 8); } - if (aMaterial.mUnificatable && - aMaterial.mMaterialInto == aMaterial && - !aNoSmashing && - GregTech_API.sRecipeFile.get(ConfigCategories.Tools.hammerplating, aMaterial.toString(), true)) { + if (aMaterial.mUnificatable + && aMaterial.mMaterialInto == aMaterial + && !aNoSmashing + && GregTech_API.sRecipeFile.get(ConfigCategories.Tools.hammerplating, aMaterial.toString(), true)) { GT_ModHandler.addCraftingRecipe( GT_OreDictUnificator.get(OrePrefixes.itemCasing, aMaterial, 1L), tBits, // DO_NOT_CHECK_FOR_COLLISIONS|BUFFERED|ONLY_ADD_IF_RESULT_IS_NOT_NULL|NOT_REMOVABLE - new Object[]{ - "h X", - 'X', OrePrefixes.plate.get(aMaterial)}); + new Object[] {"h X", 'X', OrePrefixes.plate.get(aMaterial)}); // Only added if IC2 Forge Hammer is enabled in Recipes.cfg: B:ic2forgehammer_true=false GT_ModHandler.addCraftingRecipe( GT_OreDictUnificator.get(OrePrefixes.itemCasing, aMaterial, 1L), tBits, // DO_NOT_CHECK_FOR_COLLISIONS|BUFFERED|ONLY_ADD_IF_RESULT_IS_NOT_NULL|NOT_REMOVABLE - new Object[]{ - "H X", - 'H', ToolDictNames.craftingToolForgeHammer, - 'X', OrePrefixes.plate.get(aMaterial)}); - + new Object[] { + "H X", 'H', ToolDictNames.craftingToolForgeHammer, 'X', OrePrefixes.plate.get(aMaterial) + }); } RA.addAlloySmelterRecipe( GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 2L), - ItemList.Shape_Mold_Casing.get(0L), GT_Utility.copyAmount(3L, aStack), 128, 15); + ItemList.Shape_Mold_Casing.get(0L), + GT_Utility.copyAmount(3L, aStack), + 128, + 15); RA.addCutterRecipe( GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), @@ -524,49 +507,53 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist 45); GT_RecipeRegistrator.registerReverseFluidSmelting(aStack, aMaterial, aPrefix.mMaterialAmount, null); - } - private void registerPlateAlloy(final String aOreDictName, - final ItemStack aStack) { + private void registerPlateAlloy(final String aOreDictName, final ItemStack aStack) { switch (aOreDictName) { - case "plateAlloyCarbon": - RA.addAssemblerRecipe( GT_ModHandler.getIC2Item("generator", 1L), GT_Utility.copyAmount(4L, aStack), GT_ModHandler.getIC2Item("windMill", 1L), - 6400, 8); + 6400, + 8); GT_ModHandler.addAlloySmelterRecipe( GT_Utility.copyAmount(1L, aStack), new ItemStack(Blocks.glass, 3, W), GT_ModHandler.getIC2Item("reinforcedGlass", 4L), - 400, 4, false); + 400, + 4, + false); GT_ModHandler.addAlloySmelterRecipe( GT_Utility.copyAmount(1L, aStack), Materials.Glass.getDust(3), GT_ModHandler.getIC2Item("reinforcedGlass", 4L), - 400, 4, false); + 400, + 4, + false); break; case "plateAlloyAdvanced": - GT_ModHandler.addAlloySmelterRecipe( GT_Utility.copyAmount(1L, aStack), new ItemStack(Blocks.glass, 3, W), GT_ModHandler.getIC2Item("reinforcedGlass", 4L), - 400, 4, false); + 400, + 4, + false); GT_ModHandler.addAlloySmelterRecipe( GT_Utility.copyAmount(1L, aStack), Materials.Glass.getDust(3), GT_ModHandler.getIC2Item("reinforcedGlass", 4L), - 400, 4, false); + 400, + 4, + false); break; @@ -579,9 +566,7 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist default: break; - } - } private void registerCover(final Materials aMaterial, final ItemStack aStack) { @@ -589,8 +574,8 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist // Get ItemStack of Block matching Materials ItemStack tStack = NI; // Try different prefixes to use same smooth stones as older GT5U - for (OrePrefixes orePrefix : new OrePrefixes[]{ - OrePrefixes.block, OrePrefixes.block_, OrePrefixes.stoneSmooth, OrePrefixes.stone}) { + for (OrePrefixes orePrefix : + new OrePrefixes[] {OrePrefixes.block, OrePrefixes.block_, OrePrefixes.stoneSmooth, OrePrefixes.stone}) { if ((tStack = GT_OreDictUnificator.get(orePrefix, aMaterial, 1)) != NI) break; } @@ -598,16 +583,17 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist GregTech_API.registerCover( aStack, // If there is an ItemStack of Block for Materials - tStack == NI ? + tStack == NI + ? // Use Materials mRGBa dyed blocs/materialicons/MATERIALSET/block1 icons TextureFactory.builder() .addIcon(aMaterial.mIconSet.mTextures[TextureSet.INDEX_block1]) .setRGBA(aMaterial.mRGBa) - .stdOrient().build() : + .stdOrient() + .build() + : // or copy Block texture TextureFactory.of(Block.getBlockFromItem(tStack.getItem()), tStack.getItemDamage()), null); - } - } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPure.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPure.java index 14b6bf8eb7..dfda2cd0f3 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPure.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPure.java @@ -16,8 +16,25 @@ public class ProcessingPure implements gregtech.api.interfaces.IOreRecipeRegistr } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - GT_Values.RA.addForgeHammerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial.mMacerateInto, 1L), 10, 16); - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial.mMacerateInto, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), 1L), GT_OreDictUnificator.get(OrePrefixes.dust, GT_Utility.selectItemInList(1, aMaterial.mMacerateInto, aMaterial.mOreByProducts), 1L), 10, false); + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + GT_Values.RA.addForgeHammerRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial.mMacerateInto, 1L), + 10, + 16); + GT_ModHandler.addPulverisationRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get( + OrePrefixes.dustPure, + aMaterial.mMacerateInto, + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), + 1L), + GT_OreDictUnificator.get( + OrePrefixes.dust, + GT_Utility.selectItemInList(1, aMaterial.mMacerateInto, aMaterial.mOreByProducts), + 1L), + 10, + false); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingRecycling.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingRecycling.java index 83cf284eb6..69957bd909 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingRecycling.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingRecycling.java @@ -16,8 +16,17 @@ public class ProcessingRecycling implements gregtech.api.interfaces.IOreRecipeRe } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - if ((aMaterial != Materials.Empty) && (GT_Utility.getFluidForFilledItem(aStack, true) == null) && !aMaterial.contains(SubTag.SMELTING_TO_FLUID)) - GT_Values.RA.addCannerRecipe(aStack, null, GT_Utility.getContainerItem(aStack, true), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, aPrefix.mMaterialAmount / 3628800L), (int) Math.max(aMaterial.getMass() / 2L, 1L), 2); + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + if ((aMaterial != Materials.Empty) + && (GT_Utility.getFluidForFilledItem(aStack, true) == null) + && !aMaterial.contains(SubTag.SMELTING_TO_FLUID)) + GT_Values.RA.addCannerRecipe( + aStack, + null, + GT_Utility.getContainerItem(aStack, true), + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, aPrefix.mMaterialAmount / 3628800L), + (int) Math.max(aMaterial.getMass() / 2L, 1L), + 2); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingRotor.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingRotor.java index 20132b3035..a3151c5bb4 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingRotor.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingRotor.java @@ -13,20 +13,61 @@ public class ProcessingRotor implements gregtech.api.interfaces.IOreRecipeRegist } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - if ((aMaterial.mUnificatable) && (aMaterial.mMaterialInto == aMaterial) && !aMaterial.contains(SubTag.NO_WORKING)) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + if ((aMaterial.mUnificatable) + && (aMaterial.mMaterialInto == aMaterial) + && !aMaterial.contains(SubTag.NO_WORKING)) { ItemStack tPlate = GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 4L); ItemStack tRing = GT_OreDictUnificator.get(OrePrefixes.ring, aMaterial, 1L); if (GT_Utility.isStackValid(tPlate) && GT_Utility.isStackValid(tRing)) { - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"PhP", "SRf", "PdP", 'P', aMaterial == Materials.Wood ? OrePrefixes.plank.get(aMaterial) : OrePrefixes.plate.get(aMaterial), 'R', OrePrefixes.ring.get(aMaterial), 'S', OrePrefixes.screw.get(aMaterial)}); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{tPlate.copy(), tRing.copy(), GT_Utility.getIntegratedCircuit(4)}, Materials.Tin.getMolten(32), GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), 240, 24); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{tPlate.copy(), tRing.copy(), GT_Utility.getIntegratedCircuit(4)}, Materials.Lead.getMolten(48), GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), 240, 24); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{tPlate.copy(), tRing.copy(), GT_Utility.getIntegratedCircuit(4)}, Materials.SolderingAlloy.getMolten(16), GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), 240, 24); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), GT_Proxy.tBits, new Object[] { + "PhP", + "SRf", + "PdP", + 'P', + aMaterial == Materials.Wood + ? OrePrefixes.plank.get(aMaterial) + : OrePrefixes.plate.get(aMaterial), + 'R', + OrePrefixes.ring.get(aMaterial), + 'S', + OrePrefixes.screw.get(aMaterial) + }); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] {tPlate.copy(), tRing.copy(), GT_Utility.getIntegratedCircuit(4)}, + Materials.Tin.getMolten(32), + GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), + 240, + 24); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] {tPlate.copy(), tRing.copy(), GT_Utility.getIntegratedCircuit(4)}, + Materials.Lead.getMolten(48), + GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), + 240, + 24); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] {tPlate.copy(), tRing.copy(), GT_Utility.getIntegratedCircuit(4)}, + Materials.SolderingAlloy.getMolten(16), + GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), + 240, + 24); } - GT_Values.RA.addExtruderRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 5L), ItemList.Shape_Extruder_Rotor.get(0L), GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), 200, 60); + GT_Values.RA.addExtruderRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 5L), + ItemList.Shape_Extruder_Rotor.get(0L), + GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), + 200, + 60); if (!(aMaterial == Materials.AnnealedCopper || aMaterial == Materials.WroughtIron)) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Rotor.get(0L), aMaterial.getMolten(612L), GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), 100, 60); - } + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Rotor.get(0L), + aMaterial.getMolten(612L), + GT_OreDictUnificator.get(OrePrefixes.rotor, aMaterial, 1L), + 100, + 60); + } } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingRound.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingRound.java index dde16fbda6..c621450e80 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingRound.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingRound.java @@ -18,16 +18,31 @@ public class ProcessingRound implements gregtech.api.interfaces.IOreRecipeRegist } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if (!aMaterial.contains(SubTag.NO_WORKING)) { - GT_Values.RA.addLatheRecipe(GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 1L), GT_Utility.copyAmount(1L, aStack), null, (int) Math.max(aMaterial.getMass() / 4L, 1L), 8); + GT_Values.RA.addLatheRecipe( + GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 1L), + GT_Utility.copyAmount(1L, aStack), + null, + (int) Math.max(aMaterial.getMass() / 4L, 1L), + 8); if ((aMaterial.mUnificatable) && (aMaterial.mMaterialInto == aMaterial)) { - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.round, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"fX", "Xh", 'X', OrePrefixes.nugget.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.round, aMaterial, 4L), GT_Proxy.tBits, new Object[]{"fXh", 'X', OrePrefixes.ingot.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.round, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] {"fX", "Xh", 'X', OrePrefixes.nugget.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.round, aMaterial, 4L), + GT_Proxy.tBits, + new Object[] {"fXh", 'X', OrePrefixes.ingot.get(aMaterial)}); } } if (GT_Mod.gregtechproxy.mAE2Integration) { - Api.INSTANCE.registries().matterCannon().registerAmmo(GT_OreDictUnificator.get(OrePrefixes.round, aMaterial, 1L), aMaterial.getMass()); + Api.INSTANCE + .registries() + .matterCannon() + .registerAmmo(GT_OreDictUnificator.get(OrePrefixes.round, aMaterial, 1L), aMaterial.getMass()); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingSand.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingSand.java index ddd558c487..f9e55088ee 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingSand.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingSand.java @@ -14,11 +14,30 @@ public class ProcessingSand implements gregtech.api.interfaces.IOreRecipeRegistr } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if (aOreDictName.equals("sandCracked")) { - GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(16L, aStack), -1, gregtech.api.util.GT_ModHandler.getFuelCan(25000), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 8L), null, null, null, new ItemStack(Blocks.sand, 10), 2500); + GT_Values.RA.addCentrifugeRecipe( + GT_Utility.copyAmount(16L, aStack), + -1, + gregtech.api.util.GT_ModHandler.getFuelCan(25000), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 8L), + null, + null, + null, + new ItemStack(Blocks.sand, 10), + 2500); } else if (aOreDictName.equals("sandOil")) { - GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(2L, aStack), 1, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oil, 1L), new ItemStack(Blocks.sand, 1, 0), null, null, null, null, 1000); + GT_Values.RA.addCentrifugeRecipe( + GT_Utility.copyAmount(2L, aStack), + 1, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oil, 1L), + new ItemStack(Blocks.sand, 1, 0), + null, + null, + null, + null, + 1000); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingSaplings.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingSaplings.java index 33ac22c7ac..4e65e501b3 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingSaplings.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingSaplings.java @@ -15,9 +15,20 @@ public class ProcessingSaplings implements gregtech.api.interfaces.IOreRecipeReg } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - GT_Values.RA.addPulveriserRecipe(GT_Utility.copyAmount(1L, aStack), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 2L)}, new int[]{10000}, 100, 2); + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + GT_Values.RA.addPulveriserRecipe( + GT_Utility.copyAmount(1L, aStack), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 2L)}, + new int[] {10000}, + 100, + 2); GT_ModHandler.addCompressionRecipe(GT_Utility.copyAmount(8L, aStack), ItemList.IC2_Plantball.get(1L)); - GT_Values.RA.addLatheRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Wood, 1L), 16, 8); + GT_Values.RA.addLatheRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Wood, 1L), + 16, + 8); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingScrew.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingScrew.java index ca93c8bb06..f89451fbe0 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingScrew.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingScrew.java @@ -16,11 +16,20 @@ public class ProcessingScrew implements gregtech.api.interfaces.IOreRecipeRegist } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if (!aMaterial.contains(SubTag.NO_WORKING)) { - GT_Values.RA.addLatheRecipe(GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial, 1L), GT_Utility.copyAmount(1L, aStack), null, (int) Math.max(aMaterial.getMass() / 8L, 1L), 4); + GT_Values.RA.addLatheRecipe( + GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial, 1L), + GT_Utility.copyAmount(1L, aStack), + null, + (int) Math.max(aMaterial.getMass() / 8L, 1L), + 4); if ((aMaterial.mUnificatable) && (aMaterial.mMaterialInto == aMaterial)) - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.screw, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"fX", "X ", 'X', OrePrefixes.bolt.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.screw, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] {"fX", "X ", 'X', OrePrefixes.bolt.get(aMaterial)}); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingShaping.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingShaping.java index ca43c2dfac..bf50836627 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingShaping.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingShaping.java @@ -16,8 +16,10 @@ public class ProcessingShaping implements gregtech.api.interfaces.IOreRecipeRegi } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - if (((aMaterial == Materials.Glass) || (GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L) != null)) && (!aMaterial.contains(SubTag.NO_SMELTING))) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + if (((aMaterial == Materials.Glass) || (GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L) != null)) + && (!aMaterial.contains(SubTag.NO_SMELTING))) { long aMaterialMass = aMaterial.getMass(); int tAmount = (int) (aPrefix.mMaterialAmount / 3628800L); if ((tAmount > 0) && (tAmount <= 64) && (aPrefix.mMaterialAmount % 3628800L == 0L)) { @@ -30,127 +32,437 @@ public class ProcessingShaping implements gregtech.api.interfaces.IOreRecipeRegi } if (!OrePrefixes.block.isIgnored(aMaterial.mSmeltInto)) { - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(9L, aStack), ItemList.Shape_Extruder_Block.get(0L), GT_OreDictUnificator.get(OrePrefixes.block, aMaterial.mSmeltInto, tAmount), 10 * tAmount, 8 * tVoltageMultiplier); - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(9L, aStack), ItemList.Shape_Mold_Block.get(0L), GT_OreDictUnificator.get(OrePrefixes.block, aMaterial.mSmeltInto, tAmount), 5 * tAmount, 4 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(9L, aStack), + ItemList.Shape_Extruder_Block.get(0L), + GT_OreDictUnificator.get(OrePrefixes.block, aMaterial.mSmeltInto, tAmount), + 10 * tAmount, + 8 * tVoltageMultiplier); + GT_Values.RA.addAlloySmelterRecipe( + GT_Utility.copyAmount(9L, aStack), + ItemList.Shape_Mold_Block.get(0L), + GT_OreDictUnificator.get(OrePrefixes.block, aMaterial.mSmeltInto, tAmount), + 5 * tAmount, + 4 * tVoltageMultiplier); } if (((aPrefix != OrePrefixes.ingot) || (aMaterial != aMaterial.mSmeltInto))) { - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Ingot.get(0L), GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, tAmount), 10, 4 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Shape_Extruder_Ingot.get(0L), + GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, tAmount), + 10, + 4 * tVoltageMultiplier); } - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Pipe_Tiny.get(0L), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, aMaterial.mSmeltInto, tAmount * 2), 4 * tAmount, 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Shape_Extruder_Pipe_Tiny.get(0L), + GT_OreDictUnificator.get(OrePrefixes.pipeTiny, aMaterial.mSmeltInto, tAmount * 2), + 4 * tAmount, + 8 * tVoltageMultiplier); if (!(aMaterial == Materials.Redstone || aMaterial == Materials.Glowstone)) { - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Pipe_Small.get(0L), GT_OreDictUnificator.get(OrePrefixes.pipeSmall, aMaterial.mSmeltInto, tAmount), 8 * tAmount, 8 * tVoltageMultiplier); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(3L, aStack), ItemList.Shape_Extruder_Pipe_Medium.get(0L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, aMaterial.mSmeltInto, tAmount), 24 * tAmount, 8 * tVoltageMultiplier); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(6L, aStack), ItemList.Shape_Extruder_Pipe_Large.get(0L), GT_OreDictUnificator.get(OrePrefixes.pipeLarge, aMaterial.mSmeltInto, tAmount), 48 * tAmount, 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Shape_Extruder_Pipe_Small.get(0L), + GT_OreDictUnificator.get(OrePrefixes.pipeSmall, aMaterial.mSmeltInto, tAmount), + 8 * tAmount, + 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(3L, aStack), + ItemList.Shape_Extruder_Pipe_Medium.get(0L), + GT_OreDictUnificator.get(OrePrefixes.pipeMedium, aMaterial.mSmeltInto, tAmount), + 24 * tAmount, + 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(6L, aStack), + ItemList.Shape_Extruder_Pipe_Large.get(0L), + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, aMaterial.mSmeltInto, tAmount), + 48 * tAmount, + 8 * tVoltageMultiplier); } - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(12L, aStack), ItemList.Shape_Extruder_Pipe_Huge.get(0L), GT_OreDictUnificator.get(OrePrefixes.pipeHuge, aMaterial.mSmeltInto, tAmount), 96 * tAmount, 8 * tVoltageMultiplier); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Plate.get(0L), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 1L * tAmount, tAmount), 8 * tVoltageMultiplier); - GT_Values.RA.addExtruderRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), ItemList.Shape_Extruder_Small_Gear.get(0L), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 1L * tAmount, tAmount), 8 * tVoltageMultiplier); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(6L, aStack), ItemList.Shape_Extruder_Turbine_Blade.get(0L), GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 1L * tAmount, tAmount), 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(12L, aStack), + ItemList.Shape_Extruder_Pipe_Huge.get(0L), + GT_OreDictUnificator.get(OrePrefixes.pipeHuge, aMaterial.mSmeltInto, tAmount), + 96 * tAmount, + 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Shape_Extruder_Plate.get(0L), + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial.mSmeltInto, tAmount), + (int) Math.max(aMaterialMass * 1L * tAmount, tAmount), + 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), + ItemList.Shape_Extruder_Small_Gear.get(0L), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, aMaterial.mSmeltInto, tAmount), + (int) Math.max(aMaterialMass * 1L * tAmount, tAmount), + 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(6L, aStack), + ItemList.Shape_Extruder_Turbine_Blade.get(0L), + GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial.mSmeltInto, tAmount), + (int) Math.max(aMaterialMass * 1L * tAmount, tAmount), + 8 * tVoltageMultiplier); if (!(aMaterial == Materials.AnnealedCopper || aMaterial == Materials.WroughtIron)) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ring.get(0L), aMaterial.getMolten(36L), GT_OreDictUnificator.get(OrePrefixes.ring, aMaterial, 1L), 100, 4 * tVoltageMultiplier); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Screw.get(0L), aMaterial.getMolten(18L), GT_OreDictUnificator.get(OrePrefixes.screw, aMaterial, 1L), 50, 2 * tVoltageMultiplier); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Rod.get(0L), aMaterial.getMolten(72L), GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1L), 150, 8 * tVoltageMultiplier); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Bolt.get(0L), aMaterial.getMolten(18L), GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial, 1L), 50, 2 * tVoltageMultiplier); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Round.get(0L), aMaterial.getMolten(18L), GT_OreDictUnificator.get(OrePrefixes.round, aMaterial, 1L), 50, 2 * tVoltageMultiplier); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Rod_Long.get(0L), aMaterial.getMolten(144L), GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 1L), 300, 8 * tVoltageMultiplier); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Turbine_Blade.get(0L), aMaterial.getMolten(864L), GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial, 1L), 400, 8 * tVoltageMultiplier); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Pipe_Tiny.get(0L), aMaterial.getMolten(72L), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, aMaterial, 1L), 20, 8 * tVoltageMultiplier); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Pipe_Small.get(0L), aMaterial.getMolten(144L), GT_OreDictUnificator.get(OrePrefixes.pipeSmall, aMaterial, 1L), 40, 8 * tVoltageMultiplier); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Pipe_Medium.get(0L), aMaterial.getMolten(432L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, aMaterial, 1L), 80, 8 * tVoltageMultiplier); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Pipe_Large.get(0L), aMaterial.getMolten(864L), GT_OreDictUnificator.get(OrePrefixes.pipeLarge, aMaterial, 1L), 160, 8 * tVoltageMultiplier); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Pipe_Huge.get(0L), aMaterial.getMolten(1728L), GT_OreDictUnificator.get(OrePrefixes.pipeHuge, aMaterial, 1L), 320, 8 * tVoltageMultiplier); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Ring.get(0L), + aMaterial.getMolten(36L), + GT_OreDictUnificator.get(OrePrefixes.ring, aMaterial, 1L), + 100, + 4 * tVoltageMultiplier); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Screw.get(0L), + aMaterial.getMolten(18L), + GT_OreDictUnificator.get(OrePrefixes.screw, aMaterial, 1L), + 50, + 2 * tVoltageMultiplier); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Rod.get(0L), + aMaterial.getMolten(72L), + GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1L), + 150, + 8 * tVoltageMultiplier); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Bolt.get(0L), + aMaterial.getMolten(18L), + GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial, 1L), + 50, + 2 * tVoltageMultiplier); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Round.get(0L), + aMaterial.getMolten(18L), + GT_OreDictUnificator.get(OrePrefixes.round, aMaterial, 1L), + 50, + 2 * tVoltageMultiplier); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Rod_Long.get(0L), + aMaterial.getMolten(144L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 1L), + 300, + 8 * tVoltageMultiplier); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Turbine_Blade.get(0L), + aMaterial.getMolten(864L), + GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial, 1L), + 400, + 8 * tVoltageMultiplier); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Pipe_Tiny.get(0L), + aMaterial.getMolten(72L), + GT_OreDictUnificator.get(OrePrefixes.pipeTiny, aMaterial, 1L), + 20, + 8 * tVoltageMultiplier); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Pipe_Small.get(0L), + aMaterial.getMolten(144L), + GT_OreDictUnificator.get(OrePrefixes.pipeSmall, aMaterial, 1L), + 40, + 8 * tVoltageMultiplier); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Pipe_Medium.get(0L), + aMaterial.getMolten(432L), + GT_OreDictUnificator.get(OrePrefixes.pipeMedium, aMaterial, 1L), + 80, + 8 * tVoltageMultiplier); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Pipe_Large.get(0L), + aMaterial.getMolten(864L), + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, aMaterial, 1L), + 160, + 8 * tVoltageMultiplier); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Pipe_Huge.get(0L), + aMaterial.getMolten(1728L), + GT_OreDictUnificator.get(OrePrefixes.pipeHuge, aMaterial, 1L), + 320, + 8 * tVoltageMultiplier); } if (tAmount * 2 <= 64) { if (!(aMaterial == Materials.Aluminium)) { - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Rod.get(0L), GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mSmeltInto, tAmount * 2), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), 6 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Shape_Extruder_Rod.get(0L), + GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mSmeltInto, tAmount * 2), + (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), + 6 * tVoltageMultiplier); } else { - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Rod.get(0L), GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mSmeltInto, tAmount * 2), 200, 2 * tVoltageMultiplier); - } + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Shape_Extruder_Rod.get(0L), + GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mSmeltInto, tAmount * 2), + 200, + 2 * tVoltageMultiplier); } + } if (tAmount * 2 <= 64) - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Wire.get(0L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial.mSmeltInto, tAmount * 2), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), 6 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Shape_Extruder_Wire.get(0L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial.mSmeltInto, tAmount * 2), + (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), + 6 * tVoltageMultiplier); if (tAmount * 8 <= 64) - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Bolt.get(0L), GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial.mSmeltInto, tAmount * 8), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Shape_Extruder_Bolt.get(0L), + GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial.mSmeltInto, tAmount * 8), + (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), + 8 * tVoltageMultiplier); if (tAmount * 4 <= 64) { - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Ring.get(0L), GT_OreDictUnificator.get(OrePrefixes.ring, aMaterial.mSmeltInto, tAmount * 4), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), 6 * tVoltageMultiplier); - if ((aMaterial.mUnificatable) && (aMaterial.mMaterialInto == aMaterial) && !aMaterial.contains(SubTag.NO_SMASHING)) - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.ring, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"h ", "fX", 'X', OrePrefixes.stick.get(aMaterial)}); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Shape_Extruder_Ring.get(0L), + GT_OreDictUnificator.get(OrePrefixes.ring, aMaterial.mSmeltInto, tAmount * 4), + (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), + 6 * tVoltageMultiplier); + if ((aMaterial.mUnificatable) + && (aMaterial.mMaterialInto == aMaterial) + && !aMaterial.contains(SubTag.NO_SMASHING)) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.ring, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] {"h ", "fX", 'X', OrePrefixes.stick.get(aMaterial)}); } - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Extruder_Sword.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), 8 * tVoltageMultiplier); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(3L, new Object[]{aStack}), ItemList.Shape_Extruder_Pickaxe.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 3L * tAmount, tAmount), 8 * tVoltageMultiplier); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Shovel.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 1L * tAmount, tAmount), 8 * tVoltageMultiplier); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(3L, new Object[]{aStack}), ItemList.Shape_Extruder_Axe.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 3L * tAmount, tAmount), 8 * tVoltageMultiplier); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Extruder_Hoe.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), 8 * tVoltageMultiplier); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(6L, new Object[]{aStack}), ItemList.Shape_Extruder_Hammer.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadHammer, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 6L * tAmount, tAmount), 8 * tVoltageMultiplier); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Extruder_File.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadFile, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), 8 * tVoltageMultiplier); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Extruder_Saw.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadSaw, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), 8 * tVoltageMultiplier); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(4L, new Object[]{aStack}), ItemList.Shape_Extruder_Gear.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 5L * tAmount, tAmount), 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(2L, new Object[] {aStack}), + ItemList.Shape_Extruder_Sword.get(0L, new Object[0]), + GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, aMaterial.mSmeltInto, tAmount), + (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), + 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(3L, new Object[] {aStack}), + ItemList.Shape_Extruder_Pickaxe.get(0L, new Object[0]), + GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, aMaterial.mSmeltInto, tAmount), + (int) Math.max(aMaterialMass * 3L * tAmount, tAmount), + 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(1L, new Object[] {aStack}), + ItemList.Shape_Extruder_Shovel.get(0L, new Object[0]), + GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, aMaterial.mSmeltInto, tAmount), + (int) Math.max(aMaterialMass * 1L * tAmount, tAmount), + 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(3L, new Object[] {aStack}), + ItemList.Shape_Extruder_Axe.get(0L, new Object[0]), + GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, aMaterial.mSmeltInto, tAmount), + (int) Math.max(aMaterialMass * 3L * tAmount, tAmount), + 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(2L, new Object[] {aStack}), + ItemList.Shape_Extruder_Hoe.get(0L, new Object[0]), + GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, aMaterial.mSmeltInto, tAmount), + (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), + 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(6L, new Object[] {aStack}), + ItemList.Shape_Extruder_Hammer.get(0L, new Object[0]), + GT_OreDictUnificator.get(OrePrefixes.toolHeadHammer, aMaterial.mSmeltInto, tAmount), + (int) Math.max(aMaterialMass * 6L * tAmount, tAmount), + 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(2L, new Object[] {aStack}), + ItemList.Shape_Extruder_File.get(0L, new Object[0]), + GT_OreDictUnificator.get(OrePrefixes.toolHeadFile, aMaterial.mSmeltInto, tAmount), + (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), + 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(2L, new Object[] {aStack}), + ItemList.Shape_Extruder_Saw.get(0L, new Object[0]), + GT_OreDictUnificator.get(OrePrefixes.toolHeadSaw, aMaterial.mSmeltInto, tAmount), + (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), + 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(4L, new Object[] {aStack}), + ItemList.Shape_Extruder_Gear.get(0L, new Object[0]), + GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial.mSmeltInto, tAmount), + (int) Math.max(aMaterialMass * 5L * tAmount, tAmount), + 8 * tVoltageMultiplier); if (!(aMaterial == Materials.StyreneButadieneRubber || aMaterial == Materials.Silicone)) { - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, aStack), ItemList.Shape_Mold_Plate.get(0L), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), 2 * tVoltageMultiplier); - }else{ - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Mold_Plate.get(0L), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), 2 * tVoltageMultiplier); + GT_Values.RA.addAlloySmelterRecipe( + GT_Utility.copyAmount(2L, aStack), + ItemList.Shape_Mold_Plate.get(0L), + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial.mSmeltInto, tAmount), + (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), + 2 * tVoltageMultiplier); + } else { + GT_Values.RA.addAlloySmelterRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Shape_Mold_Plate.get(0L), + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial.mSmeltInto, tAmount), + (int) Math.max(aMaterialMass * 2L * tAmount, tAmount), + 2 * tVoltageMultiplier); } - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(8L, aStack), ItemList.Shape_Mold_Gear.get(0L), GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterialMass * 10L * tAmount, tAmount), 2 * tVoltageMultiplier); + GT_Values.RA.addAlloySmelterRecipe( + GT_Utility.copyAmount(8L, aStack), + ItemList.Shape_Mold_Gear.get(0L), + GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial.mSmeltInto, tAmount), + (int) Math.max(aMaterialMass * 10L * tAmount, tAmount), + 2 * tVoltageMultiplier); switch (aMaterial.mSmeltInto.mName) { case "Glass": - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Bottle.get(0L), new ItemStack(Items.glass_bottle, 1), tAmount * 32, 16); - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Mold_Bottle.get(0L), new ItemStack(Items.glass_bottle, 1), tAmount * 64, 4); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Shape_Extruder_Bottle.get(0L), + new ItemStack(Items.glass_bottle, 1), + tAmount * 32, + 16); + GT_Values.RA.addAlloySmelterRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Shape_Mold_Bottle.get(0L), + new ItemStack(Items.glass_bottle, 1), + tAmount * 64, + 4); break; case "Steel": - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Cell.get(0L), ItemList.Cell_Empty.get(tAmount), tAmount * 128, 30); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Shape_Extruder_Cell.get(0L), + ItemList.Cell_Empty.get(tAmount), + tAmount * 128, + 30); if (tAmount * 2 <= 64) - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Casing.get(0L), GT_ModHandler.getIC2Item("casingadviron", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Shape_Extruder_Casing.get(0L), + GT_ModHandler.getIC2Item("casingadviron", tAmount * 2), + tAmount * 32, + 3 * tVoltageMultiplier); if (tAmount * 2 <= 64) - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, aStack), ItemList.Shape_Mold_Casing.get(0L), GT_ModHandler.getIC2Item("casingadviron", tAmount * 3), tAmount * 128, 1 * tVoltageMultiplier); + GT_Values.RA.addAlloySmelterRecipe( + GT_Utility.copyAmount(2L, aStack), + ItemList.Shape_Mold_Casing.get(0L), + GT_ModHandler.getIC2Item("casingadviron", tAmount * 3), + tAmount * 128, + 1 * tVoltageMultiplier); break; case "Iron": case "WroughtIron": - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Cell.get(0L), GT_ModHandler.getIC2Item("fuelRod", tAmount), tAmount * 128, 30); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Shape_Extruder_Cell.get(0L), + GT_ModHandler.getIC2Item("fuelRod", tAmount), + tAmount * 128, + 30); if (tAmount * 2 <= 64) - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Casing.get(0L), GT_ModHandler.getIC2Item("casingiron", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Shape_Extruder_Casing.get(0L), + GT_ModHandler.getIC2Item("casingiron", tAmount * 2), + tAmount * 32, + 3 * tVoltageMultiplier); if (tAmount * 2 <= 64) - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, aStack), ItemList.Shape_Mold_Casing.get(0L), GT_ModHandler.getIC2Item("casingiron", tAmount * 3), tAmount * 128, 1 * tVoltageMultiplier); + GT_Values.RA.addAlloySmelterRecipe( + GT_Utility.copyAmount(2L, aStack), + ItemList.Shape_Mold_Casing.get(0L), + GT_ModHandler.getIC2Item("casingiron", tAmount * 3), + tAmount * 128, + 1 * tVoltageMultiplier); if (tAmount * 31 <= 64) - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(31L, aStack), ItemList.Shape_Mold_Anvil.get(0L), new ItemStack(Blocks.anvil, 1, 0), tAmount * 512, 4 * tVoltageMultiplier); + GT_Values.RA.addAlloySmelterRecipe( + GT_Utility.copyAmount(31L, aStack), + ItemList.Shape_Mold_Anvil.get(0L), + new ItemStack(Blocks.anvil, 1, 0), + tAmount * 512, + 4 * tVoltageMultiplier); break; case "Tin": - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(2L, aStack), ItemList.Shape_Extruder_Cell.get(0L), ItemList.Cell_Empty.get(tAmount), tAmount * 128, 30); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(2L, aStack), + ItemList.Shape_Extruder_Cell.get(0L), + ItemList.Cell_Empty.get(tAmount), + tAmount * 128, + 30); if (tAmount * 2 <= 64) - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Casing.get(0L), GT_ModHandler.getIC2Item("casingtin", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Shape_Extruder_Casing.get(0L), + GT_ModHandler.getIC2Item("casingtin", tAmount * 2), + tAmount * 32, + 3 * tVoltageMultiplier); if (tAmount * 2 <= 64) - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, aStack), ItemList.Shape_Mold_Casing.get(0L), GT_ModHandler.getIC2Item("casingtin", tAmount * 3), tAmount * 128, 1 * tVoltageMultiplier); + GT_Values.RA.addAlloySmelterRecipe( + GT_Utility.copyAmount(2L, aStack), + ItemList.Shape_Mold_Casing.get(0L), + GT_ModHandler.getIC2Item("casingtin", tAmount * 3), + tAmount * 128, + 1 * tVoltageMultiplier); break; case "Lead": if (tAmount * 2 <= 64) - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Casing.get(0L), GT_ModHandler.getIC2Item("casinglead", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Shape_Extruder_Casing.get(0L), + GT_ModHandler.getIC2Item("casinglead", tAmount * 2), + tAmount * 32, + 3 * tVoltageMultiplier); if (tAmount * 2 <= 64) - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, aStack), ItemList.Shape_Mold_Casing.get(0L), GT_ModHandler.getIC2Item("casinglead", tAmount * 3), tAmount * 128, 1 * tVoltageMultiplier); + GT_Values.RA.addAlloySmelterRecipe( + GT_Utility.copyAmount(2L, aStack), + ItemList.Shape_Mold_Casing.get(0L), + GT_ModHandler.getIC2Item("casinglead", tAmount * 3), + tAmount * 128, + 1 * tVoltageMultiplier); break; case "Copper": case "AnnealedCopper": if (tAmount * 2 <= 64) - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Casing.get(0L), GT_ModHandler.getIC2Item("casingcopper", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Shape_Extruder_Casing.get(0L), + GT_ModHandler.getIC2Item("casingcopper", tAmount * 2), + tAmount * 32, + 3 * tVoltageMultiplier); if (tAmount * 2 <= 64) - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, aStack), ItemList.Shape_Mold_Casing.get(0L), GT_ModHandler.getIC2Item("casingcopper", tAmount * 3), tAmount * 128, 1 * tVoltageMultiplier); + GT_Values.RA.addAlloySmelterRecipe( + GT_Utility.copyAmount(2L, aStack), + ItemList.Shape_Mold_Casing.get(0L), + GT_ModHandler.getIC2Item("casingcopper", tAmount * 3), + tAmount * 128, + 1 * tVoltageMultiplier); break; case "Bronze": if (tAmount * 2 <= 64) - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Casing.get(0L), GT_ModHandler.getIC2Item("casingbronze", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Shape_Extruder_Casing.get(0L), + GT_ModHandler.getIC2Item("casingbronze", tAmount * 2), + tAmount * 32, + 3 * tVoltageMultiplier); if (tAmount * 2 <= 64) - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, aStack), ItemList.Shape_Mold_Casing.get(0L), GT_ModHandler.getIC2Item("casingbronze", tAmount * 3), tAmount * 128, 1 * tVoltageMultiplier); + GT_Values.RA.addAlloySmelterRecipe( + GT_Utility.copyAmount(2L, aStack), + ItemList.Shape_Mold_Casing.get(0L), + GT_ModHandler.getIC2Item("casingbronze", tAmount * 3), + tAmount * 128, + 1 * tVoltageMultiplier); break; case "Gold": if (tAmount * 2 <= 64) - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Casing.get(0L), GT_ModHandler.getIC2Item("casinggold", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Shape_Extruder_Casing.get(0L), + GT_ModHandler.getIC2Item("casinggold", tAmount * 2), + tAmount * 32, + 3 * tVoltageMultiplier); if (tAmount * 2 <= 64) - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, aStack), ItemList.Shape_Mold_Casing.get(0L), GT_ModHandler.getIC2Item("casinggold", tAmount * 3), tAmount * 128, 1 * tVoltageMultiplier); + GT_Values.RA.addAlloySmelterRecipe( + GT_Utility.copyAmount(2L, aStack), + ItemList.Shape_Mold_Casing.get(0L), + GT_ModHandler.getIC2Item("casinggold", tAmount * 3), + tAmount * 128, + 1 * tVoltageMultiplier); break; case "Polytetrafluoroethylene": - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Shape_Extruder_Cell.get(0L), ItemList.Cell_Empty.get(tAmount * 4), tAmount * 128, 30); - break; + GT_Values.RA.addExtruderRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Shape_Extruder_Cell.get(0L), + ItemList.Cell_Empty.get(tAmount * 4), + tAmount * 128, + 30); + break; } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingSlab.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingSlab.java index 53470c55f1..29a990aedc 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingSlab.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingSlab.java @@ -1,5 +1,7 @@ package gregtech.loaders.oreprocessing; +import static gregtech.api.enums.GT_Values.MOD_ID_RC; + import cpw.mods.fml.common.Loader; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; @@ -8,20 +10,26 @@ import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_Utility; import net.minecraft.item.ItemStack; -import static gregtech.api.enums.GT_Values.MOD_ID_RC; - public class ProcessingSlab implements gregtech.api.interfaces.IOreRecipeRegistrator { public ProcessingSlab() { OrePrefixes.slab.add(this); } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if (aOreDictName.startsWith("slabWood")) { if (Loader.isModLoaded(MOD_ID_RC)) { - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(3L, aStack), Materials.Creosote.getFluid(300L), ItemList.RC_Tie_Wood.get(3L), null, null, null, 200, 4); + GT_Values.RA.addChemicalBathRecipe( + GT_Utility.copyAmount(3L, aStack), + Materials.Creosote.getFluid(300L), + ItemList.RC_Tie_Wood.get(3L), + null, + null, + null, + 200, + 4); } } - } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStick.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStick.java index 7be7595fd9..8f710a509a 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStick.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStick.java @@ -13,20 +13,56 @@ public class ProcessingStick implements gregtech.api.interfaces.IOreRecipeRegist } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.springSmall, aMaterial, 1L), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{" s ", "fPx", 'P', OrePrefixes.stick.get(aMaterial)}); + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.springSmall, aMaterial, 1L), + GT_ModHandler.RecipeBits.BUFFERED, + new Object[] {" s ", "fPx", 'P', OrePrefixes.stick.get(aMaterial)}); if (!aMaterial.contains(gregtech.api.enums.SubTag.NO_WORKING)) { - GT_Values.RA.addLatheRecipe(aMaterial.contains(SubTag.CRYSTAL) ? GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L) : GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial.mMacerateInto, 2L), (int) Math.max(aMaterial.getMass() * 5L, 1L), 16); - GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial, 4L), null, (int) Math.max(aMaterial.getMass() * 2L, 1L), 4); + GT_Values.RA.addLatheRecipe( + aMaterial.contains(SubTag.CRYSTAL) + ? GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L) + : GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial.mMacerateInto, 2L), + (int) Math.max(aMaterial.getMass() * 5L, 1L), + 16); + GT_Values.RA.addCutterRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial, 4L), + null, + (int) Math.max(aMaterial.getMass() * 2L, 1L), + 4); if ((aMaterial.mUnificatable) && (aMaterial.mMaterialInto == aMaterial)) { - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 2L), GT_Proxy.tBits, new Object[]{"s", "X", 'X', OrePrefixes.stickLong.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"f ", " X", 'X', OrePrefixes.ingot.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 2L), + GT_Proxy.tBits, + new Object[] {"s", "X", 'X', OrePrefixes.stickLong.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] {"f ", " X", 'X', OrePrefixes.ingot.get(aMaterial)}); } } if (!aMaterial.contains(gregtech.api.enums.SubTag.NO_SMASHING)) { - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.springSmall, aMaterial, 2L), 100, 8); - GT_Values.RA.addForgeHammerRecipe(GT_Utility.copyAmount(2L, aStack), GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 1L), (int) Math.max(aMaterial.getMass(), 1L), 16); + GT_Values.RA.addBenderRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.springSmall, aMaterial, 2L), + 100, + 8); + GT_Values.RA.addForgeHammerRecipe( + GT_Utility.copyAmount(2L, aStack), + GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 1L), + (int) Math.max(aMaterial.getMass(), 1L), + 16); } - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1), ItemList.Circuit_Integrated.getWithDamage(0L, 2L), Materials.SeedOil.getFluid(50L), ItemList.FR_Stick.get(1L), 16, 8); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1), + ItemList.Circuit_Integrated.getWithDamage(0L, 2L), + Materials.SeedOil.getFluid(50L), + ItemList.FR_Stick.get(1L), + 16, + 8); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStickLong.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStickLong.java index 8a0e573d75..ca8ae1c31e 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStickLong.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStickLong.java @@ -16,19 +16,41 @@ public class ProcessingStickLong implements gregtech.api.interfaces.IOreRecipeRe } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.spring, aMaterial, 1L), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{" s ", "fSx", " S ", 'S', OrePrefixes.stickLong.get(aMaterial)}); + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.spring, aMaterial, 1L), + GT_ModHandler.RecipeBits.BUFFERED, + new Object[] {" s ", "fSx", " S ", 'S', OrePrefixes.stickLong.get(aMaterial)}); if (!aMaterial.contains(SubTag.NO_WORKING)) { - GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 2L), null, (int) Math.max(aMaterial.getMass(), 1L), 4); + GT_Values.RA.addCutterRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 2L), + null, + (int) Math.max(aMaterial.getMass(), 1L), + 4); if (aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial)) { - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"sf", "G ", 'G', OrePrefixes.gemFlawless.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 2L), GT_Proxy.tBits, new Object[]{"sf", "G ", 'G', OrePrefixes.gemExquisite.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] {"sf", "G ", 'G', OrePrefixes.gemFlawless.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 2L), + GT_Proxy.tBits, + new Object[] {"sf", "G ", 'G', OrePrefixes.gemExquisite.get(aMaterial)}); } } if (!aMaterial.contains(SubTag.NO_SMASHING)) { - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.spring, aMaterial, 1L), 200, 16); + GT_Values.RA.addBenderRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.spring, aMaterial, 1L), + 200, + 16); if (aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial)) - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"ShS", 'S', OrePrefixes.stick.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] {"ShS", 'S', OrePrefixes.stick.get(aMaterial)}); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStone.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStone.java index 69ee30e544..6d9c177f11 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStone.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStone.java @@ -13,85 +13,207 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -public class ProcessingStone - implements IOreRecipeRegistrator { +public class ProcessingStone implements IOreRecipeRegistrator { public ProcessingStone() { OrePrefixes.stone.add(this); } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { Block aBlock = GT_Utility.getBlockFromStack(aStack); switch (aMaterial.mName) { case "NULL": - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(3L, aStack), new ItemStack(Blocks.redstone_torch, 2), Materials.Redstone.getMolten(144L), new ItemStack(Items.repeater, 1), 100, 4); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(3L, aStack), + new ItemStack(Blocks.redstone_torch, 2), + Materials.Redstone.getMolten(144L), + new ItemStack(Items.repeater, 1), + 100, + 4); break; case "Sand": - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), new ItemStack(Blocks.sand, 1, 0), null, 10, false); + GT_ModHandler.addPulverisationRecipe( + GT_Utility.copyAmount(1L, aStack), new ItemStack(Blocks.sand, 1, 0), null, 10, false); break; case "Endstone": - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustImpure, Materials.Endstone, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Tungstate, 1L), 5, false); + GT_ModHandler.addPulverisationRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dustImpure, Materials.Endstone, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Tungstate, 1L), + 5, + false); break; case "Netherrack": - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustImpure, Materials.Netherrack, 1L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Gold, 1L), 5, false); + GT_ModHandler.addPulverisationRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dustImpure, Materials.Netherrack, 1L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Gold, 1L), + 5, + false); break; case "NetherBrick": - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 1L), new ItemStack(Blocks.nether_brick_fence, 1), 100, 4); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Circuit_Integrated.getWithDamage(0L, 1L), + new ItemStack(Blocks.nether_brick_fence, 1), + 100, + 4); break; case "Obsidian": if (aBlock != Blocks.air) aBlock.setResistance(20.0F); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.IC2_Compressed_Coal_Ball.get(8L), ItemList.IC2_Compressed_Coal_Chunk.get(1L), 400, 4); - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_ModHandler.getModItem("Railcraft", "cube.crushed.obsidian", 1L, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L)), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), 10, true); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.IC2_Compressed_Coal_Ball.get(8L), + ItemList.IC2_Compressed_Coal_Chunk.get(1L), + 400, + 4); + GT_ModHandler.addPulverisationRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_ModHandler.getModItem( + "Railcraft", + "cube.crushed.obsidian", + 1L, + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L)), + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), + 10, + true); break; case "Concrete": - GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), null, 100, 30); - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L)); + GT_Values.RA.addCutterRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), + null, + 100, + 30); + GT_ModHandler.addPulverisationRecipe( + GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L)); break; case "Rhyolite": - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.PotassiumFeldspar, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Quartz, 1L), 20, false); + GT_ModHandler.addPulverisationRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.PotassiumFeldspar, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Quartz, 1L), + 20, + false); break; case "Komatiite": - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Biotite, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Uranium, 1L), 5, false); + GT_ModHandler.addPulverisationRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Biotite, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Uranium, 1L), + 5, + false); break; case "Dacite": case "Andesite": - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Obsidian, 1L), 20, false); + GT_ModHandler.addPulverisationRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Obsidian, 1L), + 20, + false); break; case "Gabbro": - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.PotassiumFeldspar, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Pyrite, 1L), 20, false); + GT_ModHandler.addPulverisationRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.PotassiumFeldspar, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Pyrite, 1L), + 20, + false); break; case "Eclogite": - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Rutile, 1L), 10, false); + GT_ModHandler.addPulverisationRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Rutile, 1L), + 10, + false); break; case "Soapstone": - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustImpure, Materials.Talc, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Chromite, 1L), 10, false); + GT_ModHandler.addPulverisationRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dustImpure, Materials.Talc, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Chromite, 1L), + 10, + false); break; case "Greenschist": case "Blueschist": - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Glauconite, 2L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Basalt, 1L), 100, false); + GT_ModHandler.addPulverisationRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Glauconite, 2L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Basalt, 1L), + 100, + false); break; case "Gneiss": case "Migmatite": - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 1L), GT_OreDictUnificator.get(OrePrefixes.dustImpure, Materials.GraniteBlack, 1L), 50, false); + GT_ModHandler.addPulverisationRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustImpure, Materials.GraniteBlack, 1L), + 50, + false); break; case "Redrock": case "Marble": - GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), null, 200, 30); + GT_Values.RA.addCutterRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), + null, + 200, + 30); case "Basalt": - GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), null, 200, 30); + GT_Values.RA.addCutterRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), + null, + 200, + 30); case "Quartzite": - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), 10, false); + GT_ModHandler.addPulverisationRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), + 10, + false); break; case "Flint": - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 2L), new ItemStack(Items.flint, 1), 50, false); + GT_ModHandler.addPulverisationRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 2L), + new ItemStack(Items.flint, 1), + 50, + false); break; case "GraniteBlack": - GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), null, 200, 30); - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Thorium, 1L), 1, false); + GT_Values.RA.addCutterRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), + null, + 200, + 30); + GT_ModHandler.addPulverisationRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Thorium, 1L), + 1, + false); break; case "GraniteRed": - GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), null, 200, 30); - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Uranium, 1L), 1, false); + GT_Values.RA.addCutterRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), + null, + 200, + 30); + GT_ModHandler.addPulverisationRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Uranium, 1L), + 1, + false); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneCobble.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneCobble.java index 80c199e64f..4e78aaf72f 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneCobble.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneCobble.java @@ -16,10 +16,32 @@ public class ProcessingStoneCobble implements gregtech.api.interfaces.IOreRecipe } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), new ItemStack(Blocks.lever, 1), 400, 1); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(8L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), new ItemStack(Blocks.furnace, 1), 400, 4); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(7L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), new ItemStack(Blocks.dropper, 1), 400, 4); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(7L, aStack), new ItemStack(Items.bow, 1, 0), Materials.Redstone.getMolten(144L), new ItemStack(Blocks.dispenser, 1), 400, 4); + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), + new ItemStack(Blocks.lever, 1), + 400, + 1); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(8L, aStack), + ItemList.Circuit_Integrated.getWithDamage(0L, 8L), + new ItemStack(Blocks.furnace, 1), + 400, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(7L, aStack), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), + new ItemStack(Blocks.dropper, 1), + 400, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(7L, aStack), + new ItemStack(Items.bow, 1, 0), + Materials.Redstone.getMolten(144L), + new ItemStack(Blocks.dispenser, 1), + 400, + 4); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneVarious.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneVarious.java index 4d51de6b43..539e0513e0 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneVarious.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneVarious.java @@ -20,10 +20,25 @@ public class ProcessingStoneVarious implements gregtech.api.interfaces.IOreRecip } @Override - public void registerOre(OrePrefixes aPrefix, gregtech.api.enums.Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, + gregtech.api.enums.Materials aMaterial, + String aOreDictName, + String aModName, + ItemStack aStack) { if (aPrefix == OrePrefixes.stoneSmooth) { - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 1L), new ItemStack(Blocks.stone_button, 1), 100, 4); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(2L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 2L), new ItemStack(Blocks.stone_pressure_plate, 1), 200, 4); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(1L, aStack), + ItemList.Circuit_Integrated.getWithDamage(0L, 1L), + new ItemStack(Blocks.stone_button, 1), + 100, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(2L, aStack), + ItemList.Circuit_Integrated.getWithDamage(0L, 2L), + new ItemStack(Blocks.stone_pressure_plate, 1), + 200, + 4); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolHead.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolHead.java index c5504496fa..cf1a5a6e4e 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolHead.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolHead.java @@ -8,7 +8,8 @@ import gregtech.common.GT_Proxy; import gregtech.common.items.GT_MetaGenerated_Tool_01; import net.minecraft.item.ItemStack; -public class ProcessingToolHead implements gregtech.api.interfaces.IOreRecipeRegistrator {//TODO COMPARE WITH OLD TOOL HEAD??? generator +public class ProcessingToolHead + implements gregtech.api.interfaces.IOreRecipeRegistrator { // TODO COMPARE WITH OLD TOOL HEAD??? generator public ProcessingToolHead() { OrePrefixes.toolHeadArrow.add(this); OrePrefixes.toolHeadAxe.add(this); @@ -30,173 +31,1783 @@ public class ProcessingToolHead implements gregtech.api.interfaces.IOreRecipeReg } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - boolean aSpecialRecipeReq1 = aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial) && !aMaterial.contains(SubTag.NO_SMASHING); - boolean aSpecialRecipeReq2 = aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial) && !aMaterial.contains(SubTag.NO_WORKING); + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + boolean aSpecialRecipeReq1 = aMaterial.mUnificatable + && (aMaterial.mMaterialInto == aMaterial) + && !aMaterial.contains(SubTag.NO_SMASHING); + boolean aSpecialRecipeReq2 = aMaterial.mUnificatable + && (aMaterial.mMaterialInto == aMaterial) + && !aMaterial.contains(SubTag.NO_WORKING); boolean aNoWorking = aMaterial.contains(SubTag.NO_WORKING); switch (aPrefix) { case toolHeadArrow: if (aMaterial.mStandardMoltenFluid != null) if (!(aMaterial == Materials.AnnealedCopper || aMaterial == Materials.WroughtIron)) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Arrow.get(0L), aMaterial.getMolten(36L), GT_Utility.copyAmount(1L, aStack), 16, 4); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Arrow.get(0L), + aMaterial.getMolten(36L), + GT_Utility.copyAmount(1L, aStack), + 16, + 4); } if (aSpecialRecipeReq2) { - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadArrow, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"Xf", 'X', OrePrefixes.gemChipped.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadArrow, aMaterial, 3L), GT_Proxy.tBits, new Object[]{(aMaterial.contains(SubTag.WOOD) ? 115 : 'x') + "Pf", 'P', OrePrefixes.plate.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadArrow, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] {"Xf", 'X', OrePrefixes.gemChipped.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadArrow, aMaterial, 3L), + GT_Proxy.tBits, + new Object[] { + (aMaterial.contains(SubTag.WOOD) ? 115 : 'x') + "Pf", + 'P', + OrePrefixes.plate.get(aMaterial) + }); } break; case toolHeadAxe: - GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.AXE, 1, aMaterial, aMaterial.mHandleMaterial, null), new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, aMaterial, 1L), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.AXE, 1, aMaterial, aMaterial.mHandleMaterial, null), 200, 120); - if (aSpecialRecipeReq1) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"PIh", "P ", "f ", 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial)}); - if (!aNoWorking) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"GG ", "G ", "f ", 'G', OrePrefixes.gem.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.AXE, 1, aMaterial, aMaterial.mHandleMaterial, null), + new Object[] {aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, aMaterial, 1L), + GT_Utility.getIntegratedCircuit(2) + }, + GT_Values.NF, + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.AXE, 1, aMaterial, aMaterial.mHandleMaterial, null), + 200, + 120); + if (aSpecialRecipeReq1) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] { + "PIh", + "P ", + "f ", + 'P', + OrePrefixes.plate.get(aMaterial), + 'I', + OrePrefixes.ingot.get(aMaterial) + }); + if (!aNoWorking) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] {"GG ", "G ", "f ", 'G', OrePrefixes.gem.get(aMaterial)}); break; case toolHeadBuzzSaw: - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. BUZZSAW_LV, 1, aMaterial, Materials.Steel, new long[]{ 100000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PBM", "dXG", "SGP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_LV.get(1L), 'S', OrePrefixes.screw.get(Materials.Steel), 'P', OrePrefixes.plate.get(Materials.Steel), 'G', OrePrefixes.gearGtSmall.get(Materials.Steel), 'B', ItemList.Battery_RE_LV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. BUZZSAW_LV, 1, aMaterial, Materials.Steel, new long[]{ 75000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PBM", "dXG", "SGP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_LV.get(1L), 'S', OrePrefixes.screw.get(Materials.Steel), 'P', OrePrefixes.plate.get(Materials.Steel), 'G', OrePrefixes.gearGtSmall.get(Materials.Steel), 'B', ItemList.Battery_RE_LV_Cadmium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. BUZZSAW_LV, 1, aMaterial, Materials.Steel, new long[]{ 50000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PBM", "dXG", "SGP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_LV.get(1L), 'S', OrePrefixes.screw.get(Materials.Steel), 'P', OrePrefixes.plate.get(Materials.Steel), 'G', OrePrefixes.gearGtSmall.get(Materials.Steel), 'B', ItemList.Battery_RE_LV_Sodium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. BUZZSAW_MV, 1, aMaterial, Materials.Aluminium, new long[]{ 400000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PBM", "dXG", "SGP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_MV.get(1L), 'S', OrePrefixes.screw.get(Materials.Aluminium), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'G', OrePrefixes.gearGtSmall.get(Materials.Aluminium), 'B', ItemList.Battery_RE_MV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. BUZZSAW_MV, 1, aMaterial, Materials.Aluminium, new long[]{ 300000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PBM", "dXG", "SGP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_MV.get(1L), 'S', OrePrefixes.screw.get(Materials.Aluminium), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'G', OrePrefixes.gearGtSmall.get(Materials.Aluminium), 'B', ItemList.Battery_RE_MV_Cadmium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. BUZZSAW_MV, 1, aMaterial, Materials.Aluminium, new long[]{ 200000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PBM", "dXG", "SGP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_MV.get(1L), 'S', OrePrefixes.screw.get(Materials.Aluminium), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'G', OrePrefixes.gearGtSmall.get(Materials.Aluminium), 'B', ItemList.Battery_RE_MV_Sodium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. BUZZSAW_HV, 1, aMaterial, Materials.StainlessSteel, new long[]{1600000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PBM", "dXG", "SGP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_HV.get(1L), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_HV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. BUZZSAW_HV, 1, aMaterial, Materials.StainlessSteel, new long[]{1200000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PBM", "dXG", "SGP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_HV.get(1L), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_HV_Cadmium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. BUZZSAW_HV, 1, aMaterial, Materials.StainlessSteel, new long[]{ 800000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PBM", "dXG", "SGP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_HV.get(1L), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_HV_Sodium.get(1L)}); - if (aSpecialRecipeReq2) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadBuzzSaw, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"wXh", "X X", "fXx", 'X', OrePrefixes.plate.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.BUZZSAW_LV, 1, aMaterial, Materials.Steel, new long[] { + 100000L, 32L, 1L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PBM", + "dXG", + "SGP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_LV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Steel), + 'P', + OrePrefixes.plate.get(Materials.Steel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Steel), + 'B', + ItemList.Battery_RE_LV_Lithium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.BUZZSAW_LV, 1, aMaterial, Materials.Steel, new long[] { + 75000L, 32L, 1L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PBM", + "dXG", + "SGP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_LV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Steel), + 'P', + OrePrefixes.plate.get(Materials.Steel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Steel), + 'B', + ItemList.Battery_RE_LV_Cadmium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.BUZZSAW_LV, 1, aMaterial, Materials.Steel, new long[] { + 50000L, 32L, 1L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PBM", + "dXG", + "SGP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_LV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Steel), + 'P', + OrePrefixes.plate.get(Materials.Steel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Steel), + 'B', + ItemList.Battery_RE_LV_Sodium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.BUZZSAW_MV, 1, aMaterial, Materials.Aluminium, new long[] { + 400000L, 128L, 2L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PBM", + "dXG", + "SGP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_MV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Aluminium), + 'P', + OrePrefixes.plate.get(Materials.Aluminium), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Aluminium), + 'B', + ItemList.Battery_RE_MV_Lithium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.BUZZSAW_MV, 1, aMaterial, Materials.Aluminium, new long[] { + 300000L, 128L, 2L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PBM", + "dXG", + "SGP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_MV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Aluminium), + 'P', + OrePrefixes.plate.get(Materials.Aluminium), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Aluminium), + 'B', + ItemList.Battery_RE_MV_Cadmium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.BUZZSAW_MV, 1, aMaterial, Materials.Aluminium, new long[] { + 200000L, 128L, 2L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PBM", + "dXG", + "SGP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_MV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Aluminium), + 'P', + OrePrefixes.plate.get(Materials.Aluminium), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Aluminium), + 'B', + ItemList.Battery_RE_MV_Sodium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.BUZZSAW_HV, + 1, + aMaterial, + Materials.StainlessSteel, + new long[] {1600000L, 512L, 3L, -1L}), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PBM", + "dXG", + "SGP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_HV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.StainlessSteel), + 'P', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), + 'B', + ItemList.Battery_RE_HV_Lithium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.BUZZSAW_HV, + 1, + aMaterial, + Materials.StainlessSteel, + new long[] {1200000L, 512L, 3L, -1L}), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PBM", + "dXG", + "SGP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_HV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.StainlessSteel), + 'P', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), + 'B', + ItemList.Battery_RE_HV_Cadmium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.BUZZSAW_HV, + 1, + aMaterial, + Materials.StainlessSteel, + new long[] {800000L, 512L, 3L, -1L}), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PBM", + "dXG", + "SGP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_HV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.StainlessSteel), + 'P', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), + 'B', + ItemList.Battery_RE_HV_Sodium.get(1L) + }); + if (aSpecialRecipeReq2) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadBuzzSaw, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] {"wXh", "X X", "fXx", 'X', OrePrefixes.plate.get(aMaterial)}); break; case toolHeadChainsaw: - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. CHAINSAW_LV, 1, aMaterial, Materials.Steel, new long[]{ 100000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_LV.get(1L), 'S', OrePrefixes.screw.get(Materials.Steel), 'P', OrePrefixes.plate.get(Materials.Steel), 'G', OrePrefixes.gearGtSmall.get(Materials.Steel), 'B', ItemList.Battery_RE_LV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. CHAINSAW_LV, 1, aMaterial, Materials.Steel, new long[]{ 75000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_LV.get(1L), 'S', OrePrefixes.screw.get(Materials.Steel), 'P', OrePrefixes.plate.get(Materials.Steel), 'G', OrePrefixes.gearGtSmall.get(Materials.Steel), 'B', ItemList.Battery_RE_LV_Cadmium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. CHAINSAW_LV, 1, aMaterial, Materials.Steel, new long[]{ 50000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_LV.get(1L), 'S', OrePrefixes.screw.get(Materials.Steel), 'P', OrePrefixes.plate.get(Materials.Steel), 'G', OrePrefixes.gearGtSmall.get(Materials.Steel), 'B', ItemList.Battery_RE_LV_Sodium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. CHAINSAW_MV, 1, aMaterial, Materials.Aluminium, new long[]{ 400000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_MV.get(1L), 'S', OrePrefixes.screw.get(Materials.Aluminium), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'G', OrePrefixes.gearGtSmall.get(Materials.Aluminium), 'B', ItemList.Battery_RE_MV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. CHAINSAW_MV, 1, aMaterial, Materials.Aluminium, new long[]{ 300000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_MV.get(1L), 'S', OrePrefixes.screw.get(Materials.Aluminium), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'G', OrePrefixes.gearGtSmall.get(Materials.Aluminium), 'B', ItemList.Battery_RE_MV_Cadmium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. CHAINSAW_MV, 1, aMaterial, Materials.Aluminium, new long[]{ 200000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_MV.get(1L), 'S', OrePrefixes.screw.get(Materials.Aluminium), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'G', OrePrefixes.gearGtSmall.get(Materials.Aluminium), 'B', ItemList.Battery_RE_MV_Sodium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. CHAINSAW_HV, 1, aMaterial, Materials.StainlessSteel, new long[]{1600000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_HV.get(1L), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_HV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. CHAINSAW_HV, 1, aMaterial, Materials.StainlessSteel, new long[]{1200000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_HV.get(1L), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_HV_Cadmium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. CHAINSAW_HV, 1, aMaterial, Materials.StainlessSteel, new long[]{ 800000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_HV.get(1L), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_HV_Sodium.get(1L)}); - if (aSpecialRecipeReq2) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadChainsaw, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"SRS", "XhX", "SRS", 'X', OrePrefixes.plate.get(aMaterial), 'S', OrePrefixes.plate.get(Materials.Steel), 'R', OrePrefixes.ring.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.CHAINSAW_LV, 1, aMaterial, Materials.Steel, new long[] { + 100000L, 32L, 1L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_LV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Steel), + 'P', + OrePrefixes.plate.get(Materials.Steel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Steel), + 'B', + ItemList.Battery_RE_LV_Lithium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.CHAINSAW_LV, 1, aMaterial, Materials.Steel, new long[] { + 75000L, 32L, 1L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_LV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Steel), + 'P', + OrePrefixes.plate.get(Materials.Steel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Steel), + 'B', + ItemList.Battery_RE_LV_Cadmium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.CHAINSAW_LV, 1, aMaterial, Materials.Steel, new long[] { + 50000L, 32L, 1L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_LV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Steel), + 'P', + OrePrefixes.plate.get(Materials.Steel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Steel), + 'B', + ItemList.Battery_RE_LV_Sodium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.CHAINSAW_MV, 1, aMaterial, Materials.Aluminium, new long[] { + 400000L, 128L, 2L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_MV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Aluminium), + 'P', + OrePrefixes.plate.get(Materials.Aluminium), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Aluminium), + 'B', + ItemList.Battery_RE_MV_Lithium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.CHAINSAW_MV, 1, aMaterial, Materials.Aluminium, new long[] { + 300000L, 128L, 2L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_MV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Aluminium), + 'P', + OrePrefixes.plate.get(Materials.Aluminium), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Aluminium), + 'B', + ItemList.Battery_RE_MV_Cadmium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.CHAINSAW_MV, 1, aMaterial, Materials.Aluminium, new long[] { + 200000L, 128L, 2L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_MV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Aluminium), + 'P', + OrePrefixes.plate.get(Materials.Aluminium), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Aluminium), + 'B', + ItemList.Battery_RE_MV_Sodium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.CHAINSAW_HV, + 1, + aMaterial, + Materials.StainlessSteel, + new long[] {1600000L, 512L, 3L, -1L}), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_HV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.StainlessSteel), + 'P', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), + 'B', + ItemList.Battery_RE_HV_Lithium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.CHAINSAW_HV, + 1, + aMaterial, + Materials.StainlessSteel, + new long[] {1200000L, 512L, 3L, -1L}), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_HV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.StainlessSteel), + 'P', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), + 'B', + ItemList.Battery_RE_HV_Cadmium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.CHAINSAW_HV, + 1, + aMaterial, + Materials.StainlessSteel, + new long[] {800000L, 512L, 3L, -1L}), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_HV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.StainlessSteel), + 'P', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), + 'B', + ItemList.Battery_RE_HV_Sodium.get(1L) + }); + if (aSpecialRecipeReq2) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadChainsaw, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] { + "SRS", + "XhX", + "SRS", + 'X', + OrePrefixes.plate.get(aMaterial), + 'S', + OrePrefixes.plate.get(Materials.Steel), + 'R', + OrePrefixes.ring.get(Materials.Steel) + }); break; case toolHeadDrill: - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. DRILL_LV, 1, aMaterial, Materials.Steel, new long[]{ 100000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_LV.get(1L), 'S', OrePrefixes.screw.get(Materials.Steel), 'P', OrePrefixes.plate.get(Materials.Steel), 'G', OrePrefixes.gearGtSmall.get(Materials.Steel), 'B', ItemList.Battery_RE_LV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. DRILL_LV, 1, aMaterial, Materials.Steel, new long[]{ 75000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_LV.get(1L), 'S', OrePrefixes.screw.get(Materials.Steel), 'P', OrePrefixes.plate.get(Materials.Steel), 'G', OrePrefixes.gearGtSmall.get(Materials.Steel), 'B', ItemList.Battery_RE_LV_Cadmium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. DRILL_LV, 1, aMaterial, Materials.Steel, new long[]{ 50000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_LV.get(1L), 'S', OrePrefixes.screw.get(Materials.Steel), 'P', OrePrefixes.plate.get(Materials.Steel), 'G', OrePrefixes.gearGtSmall.get(Materials.Steel), 'B', ItemList.Battery_RE_LV_Sodium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. DRILL_MV, 1, aMaterial, Materials.Aluminium, new long[]{ 400000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_MV.get(1L), 'S', OrePrefixes.screw.get(Materials.Aluminium), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'G', OrePrefixes.gearGtSmall.get(Materials.Aluminium), 'B', ItemList.Battery_RE_MV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. DRILL_MV, 1, aMaterial, Materials.Aluminium, new long[]{ 300000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_MV.get(1L), 'S', OrePrefixes.screw.get(Materials.Aluminium), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'G', OrePrefixes.gearGtSmall.get(Materials.Aluminium), 'B', ItemList.Battery_RE_MV_Cadmium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. DRILL_MV, 1, aMaterial, Materials.Aluminium, new long[]{ 200000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_MV.get(1L), 'S', OrePrefixes.screw.get(Materials.Aluminium), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'G', OrePrefixes.gearGtSmall.get(Materials.Aluminium), 'B', ItemList.Battery_RE_MV_Sodium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. DRILL_HV, 1, aMaterial, Materials.StainlessSteel, new long[]{1600000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_HV.get(1L), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_HV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. DRILL_HV, 1, aMaterial, Materials.StainlessSteel, new long[]{1200000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_HV.get(1L), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_HV_Cadmium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. DRILL_HV, 1, aMaterial, Materials.StainlessSteel, new long[]{ 800000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_HV.get(1L), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_HV_Sodium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. JACKHAMMER, 1, aMaterial, Materials.StainlessSteel, new long[]{1600000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "PRP", "MPB", 'X', OrePrefixes.stickLong.get(aMaterial), 'M', ItemList.Electric_Piston_HV.get(1L), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'R', OrePrefixes.spring.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_HV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. JACKHAMMER, 1, aMaterial, Materials.StainlessSteel, new long[]{1200000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "PRP", "MPB", 'X', OrePrefixes.stickLong.get(aMaterial), 'M', ItemList.Electric_Piston_HV.get(1L), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'R', OrePrefixes.spring.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_HV_Cadmium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01. JACKHAMMER, 1, aMaterial, Materials.StainlessSteel, new long[]{ 800000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "PRP", "MPB", 'X', OrePrefixes.stickLong.get(aMaterial), 'M', ItemList.Electric_Piston_HV.get(1L), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'R', OrePrefixes.spring.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_HV_Sodium.get(1L)}); - if (aSpecialRecipeReq2) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadDrill, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"XSX", "XSX", "ShS", 'X', OrePrefixes.plate.get(aMaterial), 'S', OrePrefixes.plate.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.DRILL_LV, 1, aMaterial, Materials.Steel, new long[] { + 100000L, 32L, 1L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_LV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Steel), + 'P', + OrePrefixes.plate.get(Materials.Steel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Steel), + 'B', + ItemList.Battery_RE_LV_Lithium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.DRILL_LV, 1, aMaterial, Materials.Steel, new long[] { + 75000L, 32L, 1L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_LV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Steel), + 'P', + OrePrefixes.plate.get(Materials.Steel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Steel), + 'B', + ItemList.Battery_RE_LV_Cadmium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.DRILL_LV, 1, aMaterial, Materials.Steel, new long[] { + 50000L, 32L, 1L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_LV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Steel), + 'P', + OrePrefixes.plate.get(Materials.Steel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Steel), + 'B', + ItemList.Battery_RE_LV_Sodium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.DRILL_MV, 1, aMaterial, Materials.Aluminium, new long[] { + 400000L, 128L, 2L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_MV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Aluminium), + 'P', + OrePrefixes.plate.get(Materials.Aluminium), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Aluminium), + 'B', + ItemList.Battery_RE_MV_Lithium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.DRILL_MV, 1, aMaterial, Materials.Aluminium, new long[] { + 300000L, 128L, 2L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_MV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Aluminium), + 'P', + OrePrefixes.plate.get(Materials.Aluminium), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Aluminium), + 'B', + ItemList.Battery_RE_MV_Cadmium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.DRILL_MV, 1, aMaterial, Materials.Aluminium, new long[] { + 200000L, 128L, 2L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_MV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Aluminium), + 'P', + OrePrefixes.plate.get(Materials.Aluminium), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Aluminium), + 'B', + ItemList.Battery_RE_MV_Sodium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.DRILL_HV, 1, aMaterial, Materials.StainlessSteel, new long[] { + 1600000L, 512L, 3L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_HV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.StainlessSteel), + 'P', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), + 'B', + ItemList.Battery_RE_HV_Lithium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.DRILL_HV, 1, aMaterial, Materials.StainlessSteel, new long[] { + 1200000L, 512L, 3L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_HV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.StainlessSteel), + 'P', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), + 'B', + ItemList.Battery_RE_HV_Cadmium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.DRILL_HV, 1, aMaterial, Materials.StainlessSteel, new long[] { + 800000L, 512L, 3L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_HV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.StainlessSteel), + 'P', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), + 'B', + ItemList.Battery_RE_HV_Sodium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.JACKHAMMER, + 1, + aMaterial, + Materials.StainlessSteel, + new long[] {1600000L, 512L, 3L, -1L}), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "PRP", + "MPB", + 'X', + OrePrefixes.stickLong.get(aMaterial), + 'M', + ItemList.Electric_Piston_HV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.StainlessSteel), + 'P', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'R', + OrePrefixes.spring.get(Materials.StainlessSteel), + 'B', + ItemList.Battery_RE_HV_Lithium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.JACKHAMMER, + 1, + aMaterial, + Materials.StainlessSteel, + new long[] {1200000L, 512L, 3L, -1L}), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "PRP", + "MPB", + 'X', + OrePrefixes.stickLong.get(aMaterial), + 'M', + ItemList.Electric_Piston_HV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.StainlessSteel), + 'P', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'R', + OrePrefixes.spring.get(Materials.StainlessSteel), + 'B', + ItemList.Battery_RE_HV_Cadmium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.JACKHAMMER, + 1, + aMaterial, + Materials.StainlessSteel, + new long[] {800000L, 512L, 3L, -1L}), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "PRP", + "MPB", + 'X', + OrePrefixes.stickLong.get(aMaterial), + 'M', + ItemList.Electric_Piston_HV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.StainlessSteel), + 'P', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'R', + OrePrefixes.spring.get(Materials.StainlessSteel), + 'B', + ItemList.Battery_RE_HV_Sodium.get(1L) + }); + if (aSpecialRecipeReq2) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadDrill, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] { + "XSX", + "XSX", + "ShS", + 'X', + OrePrefixes.plate.get(aMaterial), + 'S', + OrePrefixes.plate.get(Materials.Steel) + }); break; case toolHeadFile: - GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.FILE, 1, aMaterial, aMaterial.mHandleMaterial, null), new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.toolHeadFile, aMaterial, 1L), GT_Utility.getIntegratedCircuit(15)}, GT_Values.NF, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.FILE, 1, aMaterial, aMaterial.mHandleMaterial, null), 200, 120); + GT_ModHandler.addShapelessCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.FILE, 1, aMaterial, aMaterial.mHandleMaterial, null), + new Object[] {aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.toolHeadFile, aMaterial, 1L), + GT_Utility.getIntegratedCircuit(15) + }, + GT_Values.NF, + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.FILE, 1, aMaterial, aMaterial.mHandleMaterial, null), + 200, + 120); if ((!aMaterial.contains(SubTag.NO_SMASHING)) && (!aMaterial.contains(SubTag.BOUNCY))) { - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.FILE, 1, aMaterial, aMaterial.mHandleMaterial, null), GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"P", "P", "S", 'P', OrePrefixes.plate.get(aMaterial), 'S', OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.FILE, 1, aMaterial, aMaterial.mHandleMaterial, null), + GT_ModHandler.RecipeBits.MIRRORED + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "P", + "P", + "S", + 'P', + OrePrefixes.plate.get(aMaterial), + 'S', + OrePrefixes.stick.get(aMaterial.mHandleMaterial) + }); } break; case toolHeadHoe: - GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.HOE, 1, aMaterial, aMaterial.mHandleMaterial, null), new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, aMaterial, 1L), GT_Utility.getIntegratedCircuit(16)}, GT_Values.NF, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.HOE, 1, aMaterial, aMaterial.mHandleMaterial, null), 200, 120); - if (aSpecialRecipeReq1) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"PIh", "f ", 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial)}); - if (!aNoWorking) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"GG ", "f ", " ", 'G', OrePrefixes.gem.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.HOE, 1, aMaterial, aMaterial.mHandleMaterial, null), + new Object[] {aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, aMaterial, 1L), + GT_Utility.getIntegratedCircuit(16) + }, + GT_Values.NF, + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.HOE, 1, aMaterial, aMaterial.mHandleMaterial, null), + 200, + 120); + if (aSpecialRecipeReq1) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] { + "PIh", + "f ", + 'P', + OrePrefixes.plate.get(aMaterial), + 'I', + OrePrefixes.ingot.get(aMaterial) + }); + if (!aNoWorking) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] {"GG ", "f ", " ", 'G', OrePrefixes.gem.get(aMaterial)}); break; case toolHeadPickaxe: - GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.PICKAXE, 1, aMaterial, aMaterial.mHandleMaterial, null), new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, aMaterial, 1L), GT_Utility.getIntegratedCircuit(5)}, GT_Values.NF, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.PICKAXE, 1, aMaterial, aMaterial.mHandleMaterial, null), 200, 120); - if (aSpecialRecipeReq1) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"PII", "f h", 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial)}); - if (!aNoWorking) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"GGG", "f ", 'G', OrePrefixes.gem.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.PICKAXE, 1, aMaterial, aMaterial.mHandleMaterial, null), + new Object[] {aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, aMaterial, 1L), + GT_Utility.getIntegratedCircuit(5) + }, + GT_Values.NF, + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.PICKAXE, 1, aMaterial, aMaterial.mHandleMaterial, null), + 200, + 120); + if (aSpecialRecipeReq1) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] { + "PII", + "f h", + 'P', + OrePrefixes.plate.get(aMaterial), + 'I', + OrePrefixes.ingot.get(aMaterial) + }); + if (!aNoWorking) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] {"GGG", "f ", 'G', OrePrefixes.gem.get(aMaterial)}); break; case toolHeadPlow: - GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.PLOW, 1, aMaterial, aMaterial.mHandleMaterial, null), new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.toolHeadPlow, aMaterial, 1L), GT_Utility.getIntegratedCircuit(6)}, GT_Values.NF, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.PLOW, 1, aMaterial, aMaterial.mHandleMaterial, null), 200, 120); - if (aSpecialRecipeReq1) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadPlow, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"PP", "PP", "hf", 'P', OrePrefixes.plate.get(aMaterial)}); - if (!aNoWorking) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadPlow, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"GG", "GG", " f", 'G', OrePrefixes.gem.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.PLOW, 1, aMaterial, aMaterial.mHandleMaterial, null), + new Object[] {aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.toolHeadPlow, aMaterial, 1L), + GT_Utility.getIntegratedCircuit(6) + }, + GT_Values.NF, + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.PLOW, 1, aMaterial, aMaterial.mHandleMaterial, null), + 200, + 120); + if (aSpecialRecipeReq1) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadPlow, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] {"PP", "PP", "hf", 'P', OrePrefixes.plate.get(aMaterial)}); + if (!aNoWorking) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadPlow, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] {"GG", "GG", " f", 'G', OrePrefixes.gem.get(aMaterial)}); break; case toolHeadSaw: - GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SAW, 1, aMaterial, aMaterial.mHandleMaterial, null), new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.toolHeadSaw, aMaterial, 1L), GT_Utility.getIntegratedCircuit(7)}, GT_Values.NF, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SAW, 1, aMaterial, aMaterial.mHandleMaterial, null), 200, 120); - if (aSpecialRecipeReq1) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSaw, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"PP ", "fh ", 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial)}); - if (!aNoWorking) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSaw, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"GGf", 'G', OrePrefixes.gem.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.SAW, 1, aMaterial, aMaterial.mHandleMaterial, null), + new Object[] {aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.toolHeadSaw, aMaterial, 1L), + GT_Utility.getIntegratedCircuit(7) + }, + GT_Values.NF, + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.SAW, 1, aMaterial, aMaterial.mHandleMaterial, null), + 200, + 120); + if (aSpecialRecipeReq1) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadSaw, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] { + "PP ", + "fh ", + 'P', + OrePrefixes.plate.get(aMaterial), + 'I', + OrePrefixes.ingot.get(aMaterial) + }); + if (!aNoWorking) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadSaw, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] {"GGf", 'G', OrePrefixes.gem.get(aMaterial)}); break; case toolHeadSense: - GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SENSE, 1, aMaterial, aMaterial.mHandleMaterial, null), new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.toolHeadSense, aMaterial, 1L), GT_Utility.getIntegratedCircuit(8)}, GT_Values.NF, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SENSE, 1, aMaterial, aMaterial.mHandleMaterial, null), 200, 120); - if (aSpecialRecipeReq1) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSense, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"PPI", "hf ", 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial)}); - if (!aNoWorking) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSense, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"GGG", " f ", " ", 'G', OrePrefixes.gem.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.SENSE, 1, aMaterial, aMaterial.mHandleMaterial, null), + new Object[] {aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.toolHeadSense, aMaterial, 1L), + GT_Utility.getIntegratedCircuit(8) + }, + GT_Values.NF, + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.SENSE, 1, aMaterial, aMaterial.mHandleMaterial, null), + 200, + 120); + if (aSpecialRecipeReq1) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadSense, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] { + "PPI", + "hf ", + 'P', + OrePrefixes.plate.get(aMaterial), + 'I', + OrePrefixes.ingot.get(aMaterial) + }); + if (!aNoWorking) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadSense, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] {"GGG", " f ", " ", 'G', OrePrefixes.gem.get(aMaterial)}); break; case toolHeadShovel: - GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SHOVEL, 1, aMaterial, aMaterial.mHandleMaterial, null), new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, aMaterial, 1L), GT_Utility.getIntegratedCircuit(9)}, GT_Values.NF, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SHOVEL, 1, aMaterial, aMaterial.mHandleMaterial, null), 200, 120); - if (aSpecialRecipeReq1) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"fPh", 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial)}); - if (!aNoWorking) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"fG", 'G', OrePrefixes.gem.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.SHOVEL, 1, aMaterial, aMaterial.mHandleMaterial, null), + new Object[] {aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, aMaterial, 1L), + GT_Utility.getIntegratedCircuit(9) + }, + GT_Values.NF, + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.SHOVEL, 1, aMaterial, aMaterial.mHandleMaterial, null), + 200, + 120); + if (aSpecialRecipeReq1) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] { + "fPh", 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial) + }); + if (!aNoWorking) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] {"fG", 'G', OrePrefixes.gem.get(aMaterial)}); break; case toolHeadSword: - GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SWORD, 1, aMaterial, aMaterial.mHandleMaterial, null), new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, aMaterial, 1L), GT_Utility.getIntegratedCircuit(10)}, GT_Values.NF, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SWORD, 1, aMaterial, aMaterial.mHandleMaterial, null), 200, 120); - if (aSpecialRecipeReq1) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, aMaterial, 1L), GT_Proxy.tBits, new Object[]{" P ", "fPh", 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial)}); - if (!aNoWorking) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, aMaterial, 1L), GT_Proxy.tBits, new Object[]{" G", "fG", 'G', OrePrefixes.gem.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.SWORD, 1, aMaterial, aMaterial.mHandleMaterial, null), + new Object[] {aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, aMaterial, 1L), + GT_Utility.getIntegratedCircuit(10) + }, + GT_Values.NF, + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.SWORD, 1, aMaterial, aMaterial.mHandleMaterial, null), + 200, + 120); + if (aSpecialRecipeReq1) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] { + " P ", + "fPh", + 'P', + OrePrefixes.plate.get(aMaterial), + 'I', + OrePrefixes.ingot.get(aMaterial) + }); + if (!aNoWorking) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] {" G", "fG", 'G', OrePrefixes.gem.get(aMaterial)}); break; case toolHeadUniversalSpade: - GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.UNIVERSALSPADE, 1, aMaterial, aMaterial, null), new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial), OrePrefixes.screw.get(aMaterial), ToolDictNames.craftingToolScrewdriver}); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.screw, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.toolHeadUniversalSpade, aMaterial, 1L), GT_Utility.getIntegratedCircuit(11)}, GT_Values.NF, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.UNIVERSALSPADE, 1, aMaterial, aMaterial.mHandleMaterial, null), 200, 120); - if (aSpecialRecipeReq2) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadUniversalSpade, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"fX", 'X', OrePrefixes.toolHeadShovel.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.UNIVERSALSPADE, 1, aMaterial, aMaterial, null), + new Object[] { + aOreDictName, + OrePrefixes.stick.get(aMaterial), + OrePrefixes.screw.get(aMaterial), + ToolDictNames.craftingToolScrewdriver + }); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.screw, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.toolHeadUniversalSpade, aMaterial, 1L), + GT_Utility.getIntegratedCircuit(11) + }, + GT_Values.NF, + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.UNIVERSALSPADE, 1, aMaterial, aMaterial.mHandleMaterial, null), + 200, + 120); + if (aSpecialRecipeReq2) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadUniversalSpade, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] {"fX", 'X', OrePrefixes.toolHeadShovel.get(aMaterial)}); break; case toolHeadWrench: - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_LV, 1, aMaterial, Materials.Steel, new long[]{ 100000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_LV.get(1L), 'S', OrePrefixes.screw.get(Materials.Steel), 'P', OrePrefixes.plate.get(Materials.Steel), 'G', OrePrefixes.gearGtSmall.get(Materials.Steel), 'B', ItemList.Battery_RE_LV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_LV, 1, aMaterial, Materials.Steel, new long[]{ 75000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_LV.get(1L), 'S', OrePrefixes.screw.get(Materials.Steel), 'P', OrePrefixes.plate.get(Materials.Steel), 'G', OrePrefixes.gearGtSmall.get(Materials.Steel), 'B', ItemList.Battery_RE_LV_Cadmium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_LV, 1, aMaterial, Materials.Steel, new long[]{ 50000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_LV.get(1L), 'S', OrePrefixes.screw.get(Materials.Steel), 'P', OrePrefixes.plate.get(Materials.Steel), 'G', OrePrefixes.gearGtSmall.get(Materials.Steel), 'B', ItemList.Battery_RE_LV_Sodium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_MV, 1, aMaterial, Materials.Aluminium, new long[]{ 400000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_MV.get(1L), 'S', OrePrefixes.screw.get(Materials.Aluminium), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'G', OrePrefixes.gearGtSmall.get(Materials.Aluminium), 'B', ItemList.Battery_RE_MV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_MV, 1, aMaterial, Materials.Aluminium, new long[]{ 300000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_MV.get(1L), 'S', OrePrefixes.screw.get(Materials.Aluminium), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'G', OrePrefixes.gearGtSmall.get(Materials.Aluminium), 'B', ItemList.Battery_RE_MV_Cadmium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_MV, 1, aMaterial, Materials.Aluminium, new long[]{ 200000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_MV.get(1L), 'S', OrePrefixes.screw.get(Materials.Aluminium), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'G', OrePrefixes.gearGtSmall.get(Materials.Aluminium), 'B', ItemList.Battery_RE_MV_Sodium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_HV, 1, aMaterial, Materials.StainlessSteel, new long[]{1600000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_HV.get(1L), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_HV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_HV, 1, aMaterial, Materials.StainlessSteel, new long[]{1200000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_HV.get(1L), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_HV_Cadmium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_HV, 1, aMaterial, Materials.StainlessSteel, new long[]{ 800000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', aOreDictName, 'M', ItemList.Electric_Motor_HV.get(1L), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_HV_Sodium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER_LV, 1, aMaterial, Materials.Steel, new long[]{ 100000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', OrePrefixes.stickLong.get(aMaterial), 'M', ItemList.Electric_Motor_LV.get(1L), 'S', OrePrefixes.screw.get(Materials.Steel), 'P', OrePrefixes.plate.get(Materials.Steel), 'G', OrePrefixes.gearGtSmall.get(Materials.Steel), 'B', ItemList.Battery_RE_LV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER_LV, 1, aMaterial, Materials.Steel, new long[]{ 75000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', OrePrefixes.stickLong.get(aMaterial), 'M', ItemList.Electric_Motor_LV.get(1L), 'S', OrePrefixes.screw.get(Materials.Steel), 'P', OrePrefixes.plate.get(Materials.Steel), 'G', OrePrefixes.gearGtSmall.get(Materials.Steel), 'B', ItemList.Battery_RE_LV_Cadmium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER_LV, 1, aMaterial, Materials.Steel, new long[]{ 50000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', OrePrefixes.stickLong.get(aMaterial), 'M', ItemList.Electric_Motor_LV.get(1L), 'S', OrePrefixes.screw.get(Materials.Steel), 'P', OrePrefixes.plate.get(Materials.Steel), 'G', OrePrefixes.gearGtSmall.get(Materials.Steel), 'B', ItemList.Battery_RE_LV_Sodium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER_MV, 1, aMaterial, Materials.Aluminium, new long[]{ 400000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', OrePrefixes.stickLong.get(aMaterial), 'M', ItemList.Electric_Motor_MV.get(1L), 'S', OrePrefixes.screw.get(Materials.Aluminium), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'G', OrePrefixes.gearGtSmall.get(Materials.Aluminium), 'B', ItemList.Battery_RE_MV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER_MV, 1, aMaterial, Materials.Aluminium, new long[]{ 300000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', OrePrefixes.stickLong.get(aMaterial), 'M', ItemList.Electric_Motor_MV.get(1L), 'S', OrePrefixes.screw.get(Materials.Aluminium), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'G', OrePrefixes.gearGtSmall.get(Materials.Aluminium), 'B', ItemList.Battery_RE_MV_Cadmium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER_MV, 1, aMaterial, Materials.Aluminium, new long[]{ 200000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', OrePrefixes.stickLong.get(aMaterial), 'M', ItemList.Electric_Motor_MV.get(1L), 'S', OrePrefixes.screw.get(Materials.Aluminium), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'G', OrePrefixes.gearGtSmall.get(Materials.Aluminium), 'B', ItemList.Battery_RE_MV_Sodium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER_HV, 1, aMaterial, Materials.StainlessSteel, new long[]{1600000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', OrePrefixes.stickLong.get(aMaterial), 'M', ItemList.Electric_Motor_HV.get(1L), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_HV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER_HV, 1, aMaterial, Materials.StainlessSteel, new long[]{1200000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', OrePrefixes.stickLong.get(aMaterial), 'M', ItemList.Electric_Motor_HV.get(1L), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_HV_Cadmium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER_HV, 1, aMaterial, Materials.StainlessSteel, new long[]{ 800000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', OrePrefixes.stickLong.get(aMaterial), 'M', ItemList.Electric_Motor_HV.get(1L), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_HV_Sodium.get(1L)}); - if (aSpecialRecipeReq2) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadWrench, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"hXW", "XRX", "WXd", 'X', OrePrefixes.plate.get(aMaterial), 'S', OrePrefixes.plate.get(Materials.Steel), 'R', OrePrefixes.ring.get(Materials.Steel), 'W', OrePrefixes.screw.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.WRENCH_LV, 1, aMaterial, Materials.Steel, new long[] { + 100000L, 32L, 1L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_LV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Steel), + 'P', + OrePrefixes.plate.get(Materials.Steel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Steel), + 'B', + ItemList.Battery_RE_LV_Lithium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.WRENCH_LV, 1, aMaterial, Materials.Steel, new long[] { + 75000L, 32L, 1L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_LV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Steel), + 'P', + OrePrefixes.plate.get(Materials.Steel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Steel), + 'B', + ItemList.Battery_RE_LV_Cadmium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.WRENCH_LV, 1, aMaterial, Materials.Steel, new long[] { + 50000L, 32L, 1L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_LV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Steel), + 'P', + OrePrefixes.plate.get(Materials.Steel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Steel), + 'B', + ItemList.Battery_RE_LV_Sodium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.WRENCH_MV, 1, aMaterial, Materials.Aluminium, new long[] { + 400000L, 128L, 2L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_MV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Aluminium), + 'P', + OrePrefixes.plate.get(Materials.Aluminium), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Aluminium), + 'B', + ItemList.Battery_RE_MV_Lithium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.WRENCH_MV, 1, aMaterial, Materials.Aluminium, new long[] { + 300000L, 128L, 2L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_MV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Aluminium), + 'P', + OrePrefixes.plate.get(Materials.Aluminium), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Aluminium), + 'B', + ItemList.Battery_RE_MV_Cadmium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.WRENCH_MV, 1, aMaterial, Materials.Aluminium, new long[] { + 200000L, 128L, 2L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_MV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Aluminium), + 'P', + OrePrefixes.plate.get(Materials.Aluminium), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Aluminium), + 'B', + ItemList.Battery_RE_MV_Sodium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.WRENCH_HV, 1, aMaterial, Materials.StainlessSteel, new long[] { + 1600000L, 512L, 3L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_HV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.StainlessSteel), + 'P', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), + 'B', + ItemList.Battery_RE_HV_Lithium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.WRENCH_HV, 1, aMaterial, Materials.StainlessSteel, new long[] { + 1200000L, 512L, 3L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_HV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.StainlessSteel), + 'P', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), + 'B', + ItemList.Battery_RE_HV_Cadmium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.WRENCH_HV, 1, aMaterial, Materials.StainlessSteel, new long[] { + 800000L, 512L, 3L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SXd", + "GMG", + "PBP", + 'X', + aOreDictName, + 'M', + ItemList.Electric_Motor_HV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.StainlessSteel), + 'P', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), + 'B', + ItemList.Battery_RE_HV_Sodium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.SCREWDRIVER_LV, 1, aMaterial, Materials.Steel, new long[] { + 100000L, 32L, 1L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PdX", + "MGS", + "GBP", + 'X', + OrePrefixes.stickLong.get(aMaterial), + 'M', + ItemList.Electric_Motor_LV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Steel), + 'P', + OrePrefixes.plate.get(Materials.Steel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Steel), + 'B', + ItemList.Battery_RE_LV_Lithium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.SCREWDRIVER_LV, 1, aMaterial, Materials.Steel, new long[] { + 75000L, 32L, 1L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PdX", + "MGS", + "GBP", + 'X', + OrePrefixes.stickLong.get(aMaterial), + 'M', + ItemList.Electric_Motor_LV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Steel), + 'P', + OrePrefixes.plate.get(Materials.Steel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Steel), + 'B', + ItemList.Battery_RE_LV_Cadmium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.SCREWDRIVER_LV, 1, aMaterial, Materials.Steel, new long[] { + 50000L, 32L, 1L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PdX", + "MGS", + "GBP", + 'X', + OrePrefixes.stickLong.get(aMaterial), + 'M', + ItemList.Electric_Motor_LV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Steel), + 'P', + OrePrefixes.plate.get(Materials.Steel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Steel), + 'B', + ItemList.Battery_RE_LV_Sodium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.SCREWDRIVER_MV, 1, aMaterial, Materials.Aluminium, new long[] { + 400000L, 128L, 2L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PdX", + "MGS", + "GBP", + 'X', + OrePrefixes.stickLong.get(aMaterial), + 'M', + ItemList.Electric_Motor_MV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Aluminium), + 'P', + OrePrefixes.plate.get(Materials.Aluminium), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Aluminium), + 'B', + ItemList.Battery_RE_MV_Lithium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.SCREWDRIVER_MV, 1, aMaterial, Materials.Aluminium, new long[] { + 300000L, 128L, 2L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PdX", + "MGS", + "GBP", + 'X', + OrePrefixes.stickLong.get(aMaterial), + 'M', + ItemList.Electric_Motor_MV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Aluminium), + 'P', + OrePrefixes.plate.get(Materials.Aluminium), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Aluminium), + 'B', + ItemList.Battery_RE_MV_Cadmium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.SCREWDRIVER_MV, 1, aMaterial, Materials.Aluminium, new long[] { + 200000L, 128L, 2L, -1L + }), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PdX", + "MGS", + "GBP", + 'X', + OrePrefixes.stickLong.get(aMaterial), + 'M', + ItemList.Electric_Motor_MV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.Aluminium), + 'P', + OrePrefixes.plate.get(Materials.Aluminium), + 'G', + OrePrefixes.gearGtSmall.get(Materials.Aluminium), + 'B', + ItemList.Battery_RE_MV_Sodium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.SCREWDRIVER_HV, + 1, + aMaterial, + Materials.StainlessSteel, + new long[] {1600000L, 512L, 3L, -1L}), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PdX", + "MGS", + "GBP", + 'X', + OrePrefixes.stickLong.get(aMaterial), + 'M', + ItemList.Electric_Motor_HV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.StainlessSteel), + 'P', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), + 'B', + ItemList.Battery_RE_HV_Lithium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.SCREWDRIVER_HV, + 1, + aMaterial, + Materials.StainlessSteel, + new long[] {1200000L, 512L, 3L, -1L}), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PdX", + "MGS", + "GBP", + 'X', + OrePrefixes.stickLong.get(aMaterial), + 'M', + ItemList.Electric_Motor_HV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.StainlessSteel), + 'P', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), + 'B', + ItemList.Battery_RE_HV_Cadmium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.SCREWDRIVER_HV, + 1, + aMaterial, + Materials.StainlessSteel, + new long[] {800000L, 512L, 3L, -1L}), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS + | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PdX", + "MGS", + "GBP", + 'X', + OrePrefixes.stickLong.get(aMaterial), + 'M', + ItemList.Electric_Motor_HV.get(1L), + 'S', + OrePrefixes.screw.get(Materials.StainlessSteel), + 'P', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'G', + OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), + 'B', + ItemList.Battery_RE_HV_Sodium.get(1L) + }); + if (aSpecialRecipeReq2) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadWrench, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] { + "hXW", + "XRX", + "WXd", + 'X', + OrePrefixes.plate.get(aMaterial), + 'S', + OrePrefixes.plate.get(Materials.Steel), + 'R', + OrePrefixes.ring.get(Materials.Steel), + 'W', + OrePrefixes.screw.get(Materials.Steel) + }); break; case toolHeadHammer: case toolHeadMallet: GT_Values.RA.addAssemblerRecipe( - new ItemStack[]{ - GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), - GT_OreDictUnificator.get(OrePrefixes.toolHeadHammer, aMaterial, 1L), - GT_Utility.getIntegratedCircuit(14) + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mHandleMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.toolHeadHammer, aMaterial, 1L), + GT_Utility.getIntegratedCircuit(14) }, GT_Values.NF, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( - (aMaterial.contains(SubTag.BOUNCY)) || (aMaterial.contains(SubTag.WOOD)) ? - GT_MetaGenerated_Tool_01.SOFTMALLET : - GT_MetaGenerated_Tool_01.HARDHAMMER, - 1, aMaterial, aMaterial.mHandleMaterial, null), - 200, 120 - ); + (aMaterial.contains(SubTag.BOUNCY)) || (aMaterial.contains(SubTag.WOOD)) + ? GT_MetaGenerated_Tool_01.SOFTMALLET + : GT_MetaGenerated_Tool_01.HARDHAMMER, + 1, + aMaterial, + aMaterial.mHandleMaterial, + null), + 200, + 120); if ((aMaterial != Materials.Stone) && (aMaterial != Materials.Flint)) { - GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats((aMaterial.contains(SubTag.BOUNCY)) || (aMaterial.contains(SubTag.WOOD)) ? GT_MetaGenerated_Tool_01.SOFTMALLET : GT_MetaGenerated_Tool_01.HARDHAMMER, 1, aMaterial, aMaterial.mHandleMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats((aMaterial.contains(SubTag.BOUNCY)) || (aMaterial.contains(SubTag.WOOD)) ? GT_MetaGenerated_Tool_01.SOFTMALLET : GT_MetaGenerated_Tool_01.HARDHAMMER, 1, aMaterial, aMaterial.mHandleMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"XX ", "XXS", "XX ", 'X', aMaterial == Materials.Wood ? OrePrefixes.plank.get(Materials.Wood) : OrePrefixes.ingot.get(aMaterial), 'S', OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats((aMaterial.contains(SubTag.BOUNCY)) || (aMaterial.contains(SubTag.WOOD)) ? GT_MetaGenerated_Tool_01.SOFTMALLET : GT_MetaGenerated_Tool_01.HARDHAMMER, 1, aMaterial, aMaterial.mHandleMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"XX ", "XXS", "XX ", 'X', aMaterial == Materials.Wood ? OrePrefixes.plank.get(Materials.Wood) : OrePrefixes.gem.get(aMaterial), 'S', OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + (aMaterial.contains(SubTag.BOUNCY)) || (aMaterial.contains(SubTag.WOOD)) + ? GT_MetaGenerated_Tool_01.SOFTMALLET + : GT_MetaGenerated_Tool_01.HARDHAMMER, + 1, + aMaterial, + aMaterial.mHandleMaterial, + null), + GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] {aOreDictName, OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + (aMaterial.contains(SubTag.BOUNCY)) || (aMaterial.contains(SubTag.WOOD)) + ? GT_MetaGenerated_Tool_01.SOFTMALLET + : GT_MetaGenerated_Tool_01.HARDHAMMER, + 1, + aMaterial, + aMaterial.mHandleMaterial, + null), + GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "XX ", + "XXS", + "XX ", + 'X', + aMaterial == Materials.Wood + ? OrePrefixes.plank.get(Materials.Wood) + : OrePrefixes.ingot.get(aMaterial), + 'S', + OrePrefixes.stick.get(aMaterial.mHandleMaterial) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + (aMaterial.contains(SubTag.BOUNCY)) || (aMaterial.contains(SubTag.WOOD)) + ? GT_MetaGenerated_Tool_01.SOFTMALLET + : GT_MetaGenerated_Tool_01.HARDHAMMER, + 1, + aMaterial, + aMaterial.mHandleMaterial, + null), + GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "XX ", + "XXS", + "XX ", + 'X', + aMaterial == Materials.Wood + ? OrePrefixes.plank.get(Materials.Wood) + : OrePrefixes.gem.get(aMaterial), + 'S', + OrePrefixes.stick.get(aMaterial.mHandleMaterial) + }); } if (aPrefix == OrePrefixes.toolHeadHammer) - if (aSpecialRecipeReq1) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadHammer, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"II ", "IIh", "II ", 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial)}); + if (aSpecialRecipeReq1) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadHammer, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] { + "II ", + "IIh", + "II ", + 'P', + OrePrefixes.plate.get(aMaterial), + 'I', + OrePrefixes.ingot.get(aMaterial) + }); break; case turbineBlade: - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial, 4L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Magnalium, 1L), GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(170, 1, aMaterial, aMaterial, null), 160, 100); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial, 8L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Titanium, 1L), GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(172, 1, aMaterial, aMaterial, null), 320, 400); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial, 12L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.TungstenSteel, 1L), GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(174, 1, aMaterial, aMaterial, null), 640, 1600); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial, 16L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Americium, 1L), GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(176, 1, aMaterial, aMaterial, null), 1280, 6400); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial, 4L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Magnalium, 1L), + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(170, 1, aMaterial, aMaterial, null), + 160, + 100); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial, 8L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Titanium, 1L), + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(172, 1, aMaterial, aMaterial, null), + 320, + 400); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial, 12L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.TungstenSteel, 1L), + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(174, 1, aMaterial, aMaterial, null), + 640, + 1600); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial, 16L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Americium, 1L), + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(176, 1, aMaterial, aMaterial, null), + 1280, + 6400); if (aSpecialRecipeReq2) { - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"fPd", "SPS", " P ", 'P', aMaterial == Materials.Wood ? OrePrefixes.plank.get(aMaterial) : OrePrefixes.plateDouble.get(aMaterial), 'R', OrePrefixes.ring.get(aMaterial), 'S', OrePrefixes.screw.get(aMaterial)}); - GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, aMaterial, 3L), GT_OreDictUnificator.get(OrePrefixes.screw, aMaterial, 2L), GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial, 1L), 200, 60); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] { + "fPd", + "SPS", + " P ", + 'P', + aMaterial == Materials.Wood + ? OrePrefixes.plank.get(aMaterial) + : OrePrefixes.plateDouble.get(aMaterial), + 'R', + OrePrefixes.ring.get(aMaterial), + 'S', + OrePrefixes.screw.get(aMaterial) + }); + GT_Values.RA.addFormingPressRecipe( + GT_OreDictUnificator.get(OrePrefixes.plateDouble, aMaterial, 3L), + GT_OreDictUnificator.get(OrePrefixes.screw, aMaterial, 2L), + GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial, 1L), + 200, + 60); } break; default: diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolOther.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolOther.java index 5a85ecc86e..3c2a4a2306 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolOther.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolOther.java @@ -12,23 +12,172 @@ public class ProcessingToolOther implements gregtech.api.interfaces.IOreRecipeRe } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if ((aMaterial != Materials.Stone) && (aMaterial != Materials.Flint)) { if (aMaterial != Materials.Rubber) { - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.PLUNGER, 1, aMaterial, aMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"xRR", " SR", "S f", 'S', OrePrefixes.stick.get(aMaterial), 'R', OrePrefixes.plate.get(Materials.AnyRubber)}); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.PLUNGER, 1, aMaterial, aMaterial, null), + GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "xRR", + " SR", + "S f", + 'S', + OrePrefixes.stick.get(aMaterial), + 'R', + OrePrefixes.plate.get(Materials.AnyRubber) + }); } - if ((!aMaterial.contains(SubTag.WOOD)) && (!aMaterial.contains(SubTag.BOUNCY)) && (!aMaterial.contains(SubTag.NO_SMASHING))) { - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH, 1, aMaterial, aMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"IhI", "III", " I ", 'I', OrePrefixes.ingot.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.CROWBAR, 1, aMaterial, aMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"hDS", "DSD", "SDf", 'S', OrePrefixes.stick.get(aMaterial), 'D', Dyes.dyeBlue}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER, 1, aMaterial, aMaterial.mHandleMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{" fS", " Sh", "W ", 'S', OrePrefixes.stick.get(aMaterial), 'W', OrePrefixes.stick.get(aMaterial.mHandleMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WIRECUTTER, 1, aMaterial, aMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PfP", "hPd", "STS", 'S', OrePrefixes.stick.get(aMaterial), 'P', OrePrefixes.plate.get(aMaterial), 'T', OrePrefixes.screw.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCOOP, 1, aMaterial, aMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SWS", "SSS", "xSh", 'S', OrePrefixes.stick.get(aMaterial), 'W', new ItemStack(Blocks.wool, 1, 32767)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.BRANCHCUTTER, 1, aMaterial, aMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PfP", "PdP", "STS", 'S', OrePrefixes.stick.get(aMaterial), 'P', OrePrefixes.plate.get(aMaterial), 'T', OrePrefixes.screw.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.KNIFE, 1, aMaterial, aMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"fPh", " S ", 'S', OrePrefixes.stick.get(aMaterial), 'P', OrePrefixes.plate.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.BUTCHERYKNIFE, 1, aMaterial, aMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PPf", "PP ", "Sh ", 'S', OrePrefixes.stick.get(aMaterial), 'P', OrePrefixes.plate.get(aMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SOLDERING_IRON_LV, 1, aMaterial, Materials.Rubber, new long[]{100000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"LBf", "Sd ", "P ", 'B', OrePrefixes.bolt.get(aMaterial), 'P', OrePrefixes.plate.get(Materials.AnyRubber), 'S', OrePrefixes.stick.get(Materials.Iron), 'L', ItemList.Battery_RE_LV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SOLDERING_IRON_MV, 1, aMaterial, Materials.Rubber, new long[]{400000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"LBf", "Sd ", "P ", 'B', OrePrefixes.bolt.get(aMaterial), 'P', OrePrefixes.plate.get(Materials.AnyRubber), 'S', OrePrefixes.stick.get(Materials.Steel), 'L', ItemList.Battery_RE_MV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SOLDERING_IRON_HV, 1, aMaterial, Materials.StyreneButadieneRubber, new long[]{1600000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"LBf", "Sd ", "P ", 'B', OrePrefixes.bolt.get(aMaterial), 'P', OrePrefixes.plate.get(Materials.StyreneButadieneRubber), 'S', OrePrefixes.stick.get(Materials.StainlessSteel), 'L', ItemList.Battery_RE_HV_Lithium.get(1L)}); + if ((!aMaterial.contains(SubTag.WOOD)) + && (!aMaterial.contains(SubTag.BOUNCY)) + && (!aMaterial.contains(SubTag.NO_SMASHING))) { + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.WRENCH, 1, aMaterial, aMaterial, null), + GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] {"IhI", "III", " I ", 'I', OrePrefixes.ingot.get(aMaterial)}); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.CROWBAR, 1, aMaterial, aMaterial, null), + GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] {"hDS", "DSD", "SDf", 'S', OrePrefixes.stick.get(aMaterial), 'D', Dyes.dyeBlue}); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.SCREWDRIVER, 1, aMaterial, aMaterial.mHandleMaterial, null), + GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + " fS", + " Sh", + "W ", + 'S', + OrePrefixes.stick.get(aMaterial), + 'W', + OrePrefixes.stick.get(aMaterial.mHandleMaterial) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.WIRECUTTER, 1, aMaterial, aMaterial, null), + GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PfP", + "hPd", + "STS", + 'S', + OrePrefixes.stick.get(aMaterial), + 'P', + OrePrefixes.plate.get(aMaterial), + 'T', + OrePrefixes.screw.get(aMaterial) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.SCOOP, 1, aMaterial, aMaterial, null), + GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SWS", + "SSS", + "xSh", + 'S', + OrePrefixes.stick.get(aMaterial), + 'W', + new ItemStack(Blocks.wool, 1, 32767) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.BRANCHCUTTER, 1, aMaterial, aMaterial, null), + GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PfP", + "PdP", + "STS", + 'S', + OrePrefixes.stick.get(aMaterial), + 'P', + OrePrefixes.plate.get(aMaterial), + 'T', + OrePrefixes.screw.get(aMaterial) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.KNIFE, 1, aMaterial, aMaterial, null), + GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "fPh", " S ", 'S', OrePrefixes.stick.get(aMaterial), 'P', OrePrefixes.plate.get(aMaterial) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.BUTCHERYKNIFE, 1, aMaterial, aMaterial, null), + GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PPf", + "PP ", + "Sh ", + 'S', + OrePrefixes.stick.get(aMaterial), + 'P', + OrePrefixes.plate.get(aMaterial) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.SOLDERING_IRON_LV, 1, aMaterial, Materials.Rubber, new long[] { + 100000L, 32L, 1L, -1L + }), + GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "LBf", + "Sd ", + "P ", + 'B', + OrePrefixes.bolt.get(aMaterial), + 'P', + OrePrefixes.plate.get(Materials.AnyRubber), + 'S', + OrePrefixes.stick.get(Materials.Iron), + 'L', + ItemList.Battery_RE_LV_Lithium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.SOLDERING_IRON_MV, 1, aMaterial, Materials.Rubber, new long[] { + 400000L, 128L, 2L, -1L + }), + GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "LBf", + "Sd ", + "P ", + 'B', + OrePrefixes.bolt.get(aMaterial), + 'P', + OrePrefixes.plate.get(Materials.AnyRubber), + 'S', + OrePrefixes.stick.get(Materials.Steel), + 'L', + ItemList.Battery_RE_MV_Lithium.get(1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.SOLDERING_IRON_HV, + 1, + aMaterial, + Materials.StyreneButadieneRubber, + new long[] {1600000L, 512L, 3L, -1L}), + GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "LBf", + "Sd ", + "P ", + 'B', + OrePrefixes.bolt.get(aMaterial), + 'P', + OrePrefixes.plate.get(Materials.StyreneButadieneRubber), + 'S', + OrePrefixes.stick.get(Materials.StainlessSteel), + 'L', + ItemList.Battery_RE_HV_Lithium.get(1L) + }); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingTransforming.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingTransforming.java index 3cfd0d6fa5..217781f61a 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingTransforming.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingTransforming.java @@ -11,35 +11,110 @@ import net.minecraft.item.ItemStack; public class ProcessingTransforming implements IOreRecipeRegistrator { public ProcessingTransforming() { for (OrePrefixes tPrefix : OrePrefixes.values()) - if (((tPrefix.mMaterialAmount > 0L) && (!tPrefix.mIsContainer) && (!tPrefix.mIsEnchantable)) || (tPrefix == OrePrefixes.plank)) - tPrefix.add(this); + if (((tPrefix.mMaterialAmount > 0L) && (!tPrefix.mIsContainer) && (!tPrefix.mIsEnchantable)) + || (tPrefix == OrePrefixes.plank)) tPrefix.add(this); } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if (aPrefix == OrePrefixes.plank) aPrefix = OrePrefixes.plate; switch (aMaterial.mName) { case "Wood": - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.SeedOil.getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 120L, true)), GT_OreDictUnificator.get(aPrefix, Materials.WoodSealed, 1L), GT_Values.NI, GT_Values.NI, null, 100, 8); - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.SeedOilLin.getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 80L, true)), GT_OreDictUnificator.get(aPrefix, Materials.WoodSealed, 1L), GT_Values.NI, GT_Values.NI, null, 100, 8); - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.SeedOilHemp.getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 80L, true)), GT_OreDictUnificator.get(aPrefix, Materials.WoodSealed, 1L), GT_Values.NI, GT_Values.NI, null, 100, 8); + GT_Values.RA.addChemicalBathRecipe( + GT_Utility.copyAmount(1L, aStack), + Materials.SeedOil.getFluid( + GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 120L, true)), + GT_OreDictUnificator.get(aPrefix, Materials.WoodSealed, 1L), + GT_Values.NI, + GT_Values.NI, + null, + 100, + 8); + GT_Values.RA.addChemicalBathRecipe( + GT_Utility.copyAmount(1L, aStack), + Materials.SeedOilLin.getFluid( + GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 80L, true)), + GT_OreDictUnificator.get(aPrefix, Materials.WoodSealed, 1L), + GT_Values.NI, + GT_Values.NI, + null, + 100, + 8); + GT_Values.RA.addChemicalBathRecipe( + GT_Utility.copyAmount(1L, aStack), + Materials.SeedOilHemp.getFluid( + GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 80L, true)), + GT_OreDictUnificator.get(aPrefix, Materials.WoodSealed, 1L), + GT_Values.NI, + GT_Values.NI, + null, + 100, + 8); break; case "Iron": - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.FierySteel.getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 250L, true)), GT_OreDictUnificator.get(aPrefix, Materials.FierySteel, 1L), GT_Values.NI, GT_Values.NI, null, 100, 8); - GT_Values.RA.addPolarizerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(aPrefix, Materials.IronMagnetic, 1L), (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / 3628800L), 16); + GT_Values.RA.addChemicalBathRecipe( + GT_Utility.copyAmount(1L, aStack), + Materials.FierySteel.getFluid( + GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 250L, true)), + GT_OreDictUnificator.get(aPrefix, Materials.FierySteel, 1L), + GT_Values.NI, + GT_Values.NI, + null, + 100, + 8); + GT_Values.RA.addPolarizerRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(aPrefix, Materials.IronMagnetic, 1L), + (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / 3628800L), + 16); break; case "WroughtIron": - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.FierySteel.getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 225L, true)), GT_OreDictUnificator.get(aPrefix, Materials.FierySteel, 1L), GT_Values.NI, GT_Values.NI, null, 100, 8); - GT_Values.RA.addPolarizerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(aPrefix, Materials.IronMagnetic, 1L), (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / 3628800L), 16); + GT_Values.RA.addChemicalBathRecipe( + GT_Utility.copyAmount(1L, aStack), + Materials.FierySteel.getFluid( + GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 225L, true)), + GT_OreDictUnificator.get(aPrefix, Materials.FierySteel, 1L), + GT_Values.NI, + GT_Values.NI, + null, + 100, + 8); + GT_Values.RA.addPolarizerRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(aPrefix, Materials.IronMagnetic, 1L), + (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / 3628800L), + 16); break; case "Steel": - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.FierySteel.getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 200L, true)), GT_OreDictUnificator.get(aPrefix, Materials.FierySteel, 1L), GT_Values.NI, GT_Values.NI, null, 100, 8); - GT_Values.RA.addPolarizerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(aPrefix, Materials.SteelMagnetic, 1L), (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / 3628800L), 16); + GT_Values.RA.addChemicalBathRecipe( + GT_Utility.copyAmount(1L, aStack), + Materials.FierySteel.getFluid( + GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 200L, true)), + GT_OreDictUnificator.get(aPrefix, Materials.FierySteel, 1L), + GT_Values.NI, + GT_Values.NI, + null, + 100, + 8); + GT_Values.RA.addPolarizerRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(aPrefix, Materials.SteelMagnetic, 1L), + (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / 3628800L), + 16); break; case "Neodymium": - GT_Values.RA.addPolarizerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(aPrefix, Materials.NeodymiumMagnetic, 1L), (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / 3628800L), 256); + GT_Values.RA.addPolarizerRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(aPrefix, Materials.NeodymiumMagnetic, 1L), + (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / 3628800L), + 256); case "Samarium": - GT_Values.RA.addPolarizerRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(aPrefix, Materials.SamariumMagnetic, 1L), (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / 3628800L), 4096); + GT_Values.RA.addPolarizerRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(aPrefix, Materials.SamariumMagnetic, 1L), + (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / 3628800L), + 4096); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingWax.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingWax.java index 15e287b281..315e8a7549 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingWax.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingWax.java @@ -12,8 +12,8 @@ public class ProcessingWax implements gregtech.api.interfaces.IOreRecipeRegistra } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - if (aOreDictName.equals("waxMagical")) - GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aStack), null, 6, 5); + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + if (aOreDictName.equals("waxMagical")) GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aStack), null, 6, 5); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingWire.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingWire.java index 2c244c10f3..708952ce8d 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingWire.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingWire.java @@ -10,9 +10,8 @@ import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.common.GT_Proxy; -import net.minecraft.item.ItemStack; - import java.util.ArrayList; +import net.minecraft.item.ItemStack; public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistrator { @@ -21,6 +20,7 @@ public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistr private Materials[] syntheticRubbers = {Materials.StyreneButadieneRubber, Materials.Silicone}; private static Object tt; + public ProcessingWire() { OrePrefixes.wireGt01.add(this); OrePrefixes.wireGt02.add(this); @@ -31,7 +31,8 @@ public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistr } @Override - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + public void registerOre( + OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if (GT_Mod.gregtechproxy.mAE2Integration) { if (tt == TunnelType.ME) { try { @@ -49,171 +50,412 @@ public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistr cableWidth = 1; correspondingCable = OrePrefixes.cableGt01; if (!aMaterial.contains(gregtech.api.enums.SubTag.NO_SMASHING)) { - GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.springSmall, aMaterial, 2L), 100, 8); - GT_Values.RA.addWiremillRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.wireFine, aMaterial, 4L), 200, 8); - //GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), GT_Utility.copy(new Object[]{GT_Utility.copyAmount(2L, aStack), GT_OreDictUnificator.get(OrePrefixes.wireFine, aMaterial, 8L)}), 100, 4); - //GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1L), GT_Utility.copy(new Object[]{aStack, GT_OreDictUnificator.get(OrePrefixes.wireFine, aMaterial, 4L)}), 50, 4); + GT_Values.RA.addBenderRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.springSmall, aMaterial, 2L), + 100, + 8); + GT_Values.RA.addWiremillRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.wireFine, aMaterial, 4L), + 200, + 8); + // GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), + // GT_Utility.copy(new Object[]{GT_Utility.copyAmount(2L, aStack), + // GT_OreDictUnificator.get(OrePrefixes.wireFine, aMaterial, 8L)}), 100, 4); + // GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1L), + // GT_Utility.copy(new Object[]{aStack, GT_OreDictUnificator.get(OrePrefixes.wireFine, aMaterial, + // 4L)}), 50, 4); } - if (aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial) && !aMaterial.contains(SubTag.NO_WORKING)) - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 1L), GT_Proxy.tBits, new Object[]{"Xx", 'X', OrePrefixes.plate.get(aMaterial)}); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(2L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 2L), GT_OreDictUnificator.get(OrePrefixes.wireGt02, aMaterial, 1L), 150, 8); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(4L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 4L), GT_OreDictUnificator.get(OrePrefixes.wireGt04, aMaterial, 1L), 200, 8); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(8L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 8L), GT_OreDictUnificator.get(OrePrefixes.wireGt08, aMaterial, 1L), 300, 8); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(12L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 12L), GT_OreDictUnificator.get(OrePrefixes.wireGt12, aMaterial, 1L), 400, 8); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(16L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 16L), GT_OreDictUnificator.get(OrePrefixes.wireGt16, aMaterial, 1L), 500, 8); + if (aMaterial.mUnificatable + && (aMaterial.mMaterialInto == aMaterial) + && !aMaterial.contains(SubTag.NO_WORKING)) + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 1L), + GT_Proxy.tBits, + new Object[] {"Xx", 'X', OrePrefixes.plate.get(aMaterial)}); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(2L, aStack), + ItemList.Circuit_Integrated.getWithDamage(0L, 2L), + GT_OreDictUnificator.get(OrePrefixes.wireGt02, aMaterial, 1L), + 150, + 8); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(4L, aStack), + ItemList.Circuit_Integrated.getWithDamage(0L, 4L), + GT_OreDictUnificator.get(OrePrefixes.wireGt04, aMaterial, 1L), + 200, + 8); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(8L, aStack), + ItemList.Circuit_Integrated.getWithDamage(0L, 8L), + GT_OreDictUnificator.get(OrePrefixes.wireGt08, aMaterial, 1L), + 300, + 8); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(12L, aStack), + ItemList.Circuit_Integrated.getWithDamage(0L, 12L), + GT_OreDictUnificator.get(OrePrefixes.wireGt12, aMaterial, 1L), + 400, + 8); + GT_Values.RA.addAssemblerRecipe( + GT_Utility.copyAmount(16L, aStack), + ItemList.Circuit_Integrated.getWithDamage(0L, 16L), + GT_OreDictUnificator.get(OrePrefixes.wireGt16, aMaterial, 1L), + 500, + 8); break; case wireGt02: cableWidth = 2; correspondingCable = OrePrefixes.cableGt02; - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 2L), new Object[]{aOreDictName}); - GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, aStack), new Object[]{OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 2L), new Object[] {aOreDictName}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_Utility.copyAmount(1L, aStack), + new Object[] {OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial)}); break; case wireGt04: cableWidth = 4; correspondingCable = OrePrefixes.cableGt04; - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 4L), new Object[]{aOreDictName}); - GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, aStack), new Object[]{OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, aStack), new Object[]{OrePrefixes.wireGt02.get(aMaterial), OrePrefixes.wireGt02.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 4L), new Object[] {aOreDictName}); + GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, aStack), new Object[] { + OrePrefixes.wireGt01.get(aMaterial), + OrePrefixes.wireGt01.get(aMaterial), + OrePrefixes.wireGt01.get(aMaterial), + OrePrefixes.wireGt01.get(aMaterial) + }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_Utility.copyAmount(1L, aStack), + new Object[] {OrePrefixes.wireGt02.get(aMaterial), OrePrefixes.wireGt02.get(aMaterial)}); break; case wireGt08: cableWidth = 8; correspondingCable = OrePrefixes.cableGt08; - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 8L), new Object[]{aOreDictName}); - GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, aStack), new Object[]{OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial),OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, aStack), new Object[]{OrePrefixes.wireGt04.get(aMaterial), OrePrefixes.wireGt04.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 8L), new Object[] {aOreDictName}); + GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, aStack), new Object[] { + OrePrefixes.wireGt01.get(aMaterial), + OrePrefixes.wireGt01.get(aMaterial), + OrePrefixes.wireGt01.get(aMaterial), + OrePrefixes.wireGt01.get(aMaterial), + OrePrefixes.wireGt01.get(aMaterial), + OrePrefixes.wireGt01.get(aMaterial), + OrePrefixes.wireGt01.get(aMaterial), + OrePrefixes.wireGt01.get(aMaterial) + }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_Utility.copyAmount(1L, aStack), + new Object[] {OrePrefixes.wireGt04.get(aMaterial), OrePrefixes.wireGt04.get(aMaterial)}); break; case wireGt12: cableWidth = 12; correspondingCable = OrePrefixes.cableGt12; - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 12L), new Object[]{aOreDictName}); - GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, aStack), new Object[]{OrePrefixes.wireGt08.get(aMaterial), OrePrefixes.wireGt04.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 12L), new Object[] {aOreDictName}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_Utility.copyAmount(1L, aStack), + new Object[] {OrePrefixes.wireGt08.get(aMaterial), OrePrefixes.wireGt04.get(aMaterial)}); break; case wireGt16: cableWidth = 16; correspondingCable = OrePrefixes.cableGt16; - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 16L), new Object[]{aOreDictName}); - GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, aStack), new Object[]{OrePrefixes.wireGt08.get(aMaterial), OrePrefixes.wireGt08.get(aMaterial)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, aStack), new Object[]{OrePrefixes.wireGt12.get(aMaterial), OrePrefixes.wireGt04.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 16L), new Object[] {aOreDictName}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_Utility.copyAmount(1L, aStack), + new Object[] {OrePrefixes.wireGt08.get(aMaterial), OrePrefixes.wireGt08.get(aMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_Utility.copyAmount(1L, aStack), + new Object[] {OrePrefixes.wireGt12.get(aMaterial), OrePrefixes.wireGt04.get(aMaterial)}); if (GT_Mod.gregtechproxy.mAE2Integration) { AE2addNewAttunement(aStack); } break; default: - GT_Log.err.println("OrePrefix " + aPrefix.name() + " cannot be registered as a cable for Material " + aMaterial.mName); + GT_Log.err.println("OrePrefix " + aPrefix.name() + " cannot be registered as a cable for Material " + + aMaterial.mName); return; } int costMultiplier = cableWidth / 4 + 1; - - switch (aMaterial.mName){ - case "RedAlloy":case "Cobalt": case "Lead": case "Tin": case "Zinc":case "SolderingAlloy": + switch (aMaterial.mName) { + case "RedAlloy": + case "Cobalt": + case "Lead": + case "Tin": + case "Zinc": + case "SolderingAlloy": ArrayList<Object> craftingListRubber = new ArrayList<>(); craftingListRubber.add(aOreDictName); for (int i = 0; i < costMultiplier; i++) { craftingListRubber.add(OrePrefixes.plate.get(Materials.Rubber)); } - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), craftingListRubber.toArray()); - GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.plate.get(Materials.Rubber), costMultiplier), GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), 100, 8); - GT_Values.RA.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Rubber, 2L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.cableGt01, aMaterial, 1L), 100, 8); - GT_Values.RA.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Rubber, 2L), GT_OreDictUnificator.get(OrePrefixes.wireGt02, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.cableGt02, aMaterial, 1L), 200, 16); - GT_Values.RA.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Rubber, 4L), GT_OreDictUnificator.get(OrePrefixes.wireGt04, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.cableGt04, aMaterial, 1L), 300, 30); - case "Iron": case "Nickel": case "Cupronickel": case "Copper": case "AnnealedCopper": - case "Kanthal": case "Gold": case "Electrum": case "Silver": case "Blue Alloy": - case "Nichrome": case "Steel": case "BlackSteel": case "Titanium": case "Aluminium": case "BlueAlloy" : - GT_Values.RA.addAssemblerRecipe(aStack, GT_Utility.getIntegratedCircuit(24), Materials.Rubber.getMolten(144 * costMultiplier), - GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), 100, 8); - GT_Values.RA.addAssemblerRecipe(aStack, GT_Utility.getIntegratedCircuit(24), Materials.StyreneButadieneRubber.getMolten(108 * costMultiplier), - GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), 100, 8); - GT_Values.RA.addAssemblerRecipe(aStack, GT_Utility.getIntegratedCircuit(24), Materials.Silicone.getMolten(72 * costMultiplier), - GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), 100, 8); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), craftingListRubber.toArray()); + GT_Values.RA.addBoxingRecipe( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.plate.get(Materials.Rubber), costMultiplier), + GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), + 100, + 8); + GT_Values.RA.addAlloySmelterRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Rubber, 2L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.cableGt01, aMaterial, 1L), + 100, + 8); + GT_Values.RA.addAlloySmelterRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Rubber, 2L), + GT_OreDictUnificator.get(OrePrefixes.wireGt02, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.cableGt02, aMaterial, 1L), + 200, + 16); + GT_Values.RA.addAlloySmelterRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Rubber, 4L), + GT_OreDictUnificator.get(OrePrefixes.wireGt04, aMaterial, 1L), + GT_OreDictUnificator.get(OrePrefixes.cableGt04, aMaterial, 1L), + 300, + 30); + case "Iron": + case "Nickel": + case "Cupronickel": + case "Copper": + case "AnnealedCopper": + case "Kanthal": + case "Gold": + case "Electrum": + case "Silver": + case "Blue Alloy": + case "Nichrome": + case "Steel": + case "BlackSteel": + case "Titanium": + case "Aluminium": + case "BlueAlloy": + GT_Values.RA.addAssemblerRecipe( + aStack, + GT_Utility.getIntegratedCircuit(24), + Materials.Rubber.getMolten(144 * costMultiplier), + GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), + 100, + 8); + GT_Values.RA.addAssemblerRecipe( + aStack, + GT_Utility.getIntegratedCircuit(24), + Materials.StyreneButadieneRubber.getMolten(108 * costMultiplier), + GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), + 100, + 8); + GT_Values.RA.addAssemblerRecipe( + aStack, + GT_Utility.getIntegratedCircuit(24), + Materials.Silicone.getMolten(72 * costMultiplier), + GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), + 100, + 8); for (Materials dielectric : dielectrics) { for (Materials syntheticRubber : syntheticRubbers) { - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(4, aStack), dielectric.getDust(costMultiplier)}, - syntheticRubber.getMolten(costMultiplier * 144), GT_OreDictUnificator.get(correspondingCable, aMaterial, 4L), 400, 8); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{aStack, dielectric.getDustSmall(costMultiplier)}, - syntheticRubber.getMolten(costMultiplier * 36), GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), 100, 8); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] {GT_Utility.copyAmount(4, aStack), dielectric.getDust(costMultiplier)}, + syntheticRubber.getMolten(costMultiplier * 144), + GT_OreDictUnificator.get(correspondingCable, aMaterial, 4L), + 400, + 8); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] {aStack, dielectric.getDustSmall(costMultiplier)}, + syntheticRubber.getMolten(costMultiplier * 36), + GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), + 100, + 8); } } case "RedstoneAlloy": - GT_Values.RA.addAssemblerRecipe(aStack, GT_Utility.getIntegratedCircuit(24), Materials.Rubber.getMolten(144 * costMultiplier), - GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), 100, 8); - GT_Values.RA.addAssemblerRecipe(aStack, GT_Utility.getIntegratedCircuit(24), Materials.StyreneButadieneRubber.getMolten(108 * costMultiplier), - GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), 100, 8); - GT_Values.RA.addAssemblerRecipe(aStack, GT_Utility.getIntegratedCircuit(24), Materials.Silicone.getMolten(72 * costMultiplier), - GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), 100, 8); + GT_Values.RA.addAssemblerRecipe( + aStack, + GT_Utility.getIntegratedCircuit(24), + Materials.Rubber.getMolten(144 * costMultiplier), + GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), + 100, + 8); + GT_Values.RA.addAssemblerRecipe( + aStack, + GT_Utility.getIntegratedCircuit(24), + Materials.StyreneButadieneRubber.getMolten(108 * costMultiplier), + GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), + 100, + 8); + GT_Values.RA.addAssemblerRecipe( + aStack, + GT_Utility.getIntegratedCircuit(24), + Materials.Silicone.getMolten(72 * costMultiplier), + GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), + 100, + 8); for (Materials dielectric : dielectrics) { for (Materials syntheticRubber : syntheticRubbers) { - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(4, aStack), dielectric.getDust(costMultiplier)}, - syntheticRubber.getMolten(costMultiplier * 144), GT_OreDictUnificator.get(correspondingCable, aMaterial, 4L), 400, 8); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{aStack, dielectric.getDustSmall(costMultiplier)}, - syntheticRubber.getMolten(costMultiplier * 36), GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), 100, 8); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] {GT_Utility.copyAmount(4, aStack), dielectric.getDust(costMultiplier)}, + syntheticRubber.getMolten(costMultiplier * 144), + GT_OreDictUnificator.get(correspondingCable, aMaterial, 4L), + 400, + 8); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] {aStack, dielectric.getDustSmall(costMultiplier)}, + syntheticRubber.getMolten(costMultiplier * 36), + GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), + 100, + 8); } } break; - default: + default: if (GT_Mod.gregtechproxy.mEasierIVPlusCables) { - GT_Values.RA.addAssemblerRecipe(aStack, GT_Utility.getIntegratedCircuit(24), Materials.Rubber.getMolten(144 * costMultiplier), - GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), 100, 8); - GT_Values.RA.addAssemblerRecipe(aStack, GT_Utility.getIntegratedCircuit(24), Materials.StyreneButadieneRubber.getMolten(108 * costMultiplier), - GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), 100, 8); - GT_Values.RA.addAssemblerRecipe(aStack, GT_Utility.getIntegratedCircuit(24), Materials.Silicone.getMolten(72 * costMultiplier), - GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), 100, 8); + GT_Values.RA.addAssemblerRecipe( + aStack, + GT_Utility.getIntegratedCircuit(24), + Materials.Rubber.getMolten(144 * costMultiplier), + GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), + 100, + 8); + GT_Values.RA.addAssemblerRecipe( + aStack, + GT_Utility.getIntegratedCircuit(24), + Materials.StyreneButadieneRubber.getMolten(108 * costMultiplier), + GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), + 100, + 8); + GT_Values.RA.addAssemblerRecipe( + aStack, + GT_Utility.getIntegratedCircuit(24), + Materials.Silicone.getMolten(72 * costMultiplier), + GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), + 100, + 8); for (Materials dielectric : dielectrics) { for (Materials syntheticRubber : syntheticRubbers) { - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(4, aStack), dielectric.getDust(costMultiplier)}, - syntheticRubber.getMolten(costMultiplier * 144), GT_OreDictUnificator.get(correspondingCable, aMaterial, 4L), 400, 8); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{aStack, dielectric.getDustSmall(costMultiplier)}, - syntheticRubber.getMolten(costMultiplier * 36), GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), 100, 8); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(4, aStack), dielectric.getDust(costMultiplier) + }, + syntheticRubber.getMolten(costMultiplier * 144), + GT_OreDictUnificator.get(correspondingCable, aMaterial, 4L), + 400, + 8); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] {aStack, dielectric.getDustSmall(costMultiplier)}, + syntheticRubber.getMolten(costMultiplier * 36), + GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), + 100, + 8); } } } else { - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{aStack, GT_OreDictUnificator.get(OrePrefixes.foil, aMaterial, costMultiplier), GT_Utility.getIntegratedCircuit(24)}, - Materials.Silicone.getMolten(costMultiplier * 72), GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), 100, 8); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{aStack, GT_OreDictUnificator.get(OrePrefixes.foil, Materials.PolyphenyleneSulfide, costMultiplier), GT_Utility.getIntegratedCircuit(24)}, - Materials.Silicone.getMolten(costMultiplier * 72), GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), 100, 8); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + aStack, + GT_OreDictUnificator.get(OrePrefixes.foil, aMaterial, costMultiplier), + GT_Utility.getIntegratedCircuit(24) + }, + Materials.Silicone.getMolten(costMultiplier * 72), + GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), + 100, + 8); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + aStack, + GT_OreDictUnificator.get( + OrePrefixes.foil, Materials.PolyphenyleneSulfide, costMultiplier), + GT_Utility.getIntegratedCircuit(24) + }, + Materials.Silicone.getMolten(costMultiplier * 72), + GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), + 100, + 8); for (Materials dielectric : dielectrics) { for (Materials syntheticRubber : syntheticRubbers) { - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(4, aStack), dielectric.getDust(costMultiplier), GT_OreDictUnificator.get(OrePrefixes.foil, aMaterial, costMultiplier * 4)}, - syntheticRubber.getMolten(costMultiplier * 144), GT_OreDictUnificator.get(correspondingCable, aMaterial, 4L), 400, 8); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(4, aStack), dielectric.getDust(costMultiplier), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.PolyphenyleneSulfide, costMultiplier * 4)}, - syntheticRubber.getMolten(costMultiplier * 144), GT_OreDictUnificator.get(correspondingCable, aMaterial, 4L), 400, 8); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{aStack, dielectric.getDustSmall(costMultiplier), GT_OreDictUnificator.get(OrePrefixes.foil, aMaterial, costMultiplier)}, - syntheticRubber.getMolten(costMultiplier * 36), GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), 100, 8); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{aStack, dielectric.getDustSmall(costMultiplier), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.PolyphenyleneSulfide, costMultiplier)}, - syntheticRubber.getMolten(costMultiplier * 36), GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), 100, 8); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(4, aStack), + dielectric.getDust(costMultiplier), + GT_OreDictUnificator.get(OrePrefixes.foil, aMaterial, costMultiplier * 4) + }, + syntheticRubber.getMolten(costMultiplier * 144), + GT_OreDictUnificator.get(correspondingCable, aMaterial, 4L), + 400, + 8); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(4, aStack), + dielectric.getDust(costMultiplier), + GT_OreDictUnificator.get( + OrePrefixes.foil, Materials.PolyphenyleneSulfide, costMultiplier * 4) + }, + syntheticRubber.getMolten(costMultiplier * 144), + GT_OreDictUnificator.get(correspondingCable, aMaterial, 4L), + 400, + 8); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + aStack, + dielectric.getDustSmall(costMultiplier), + GT_OreDictUnificator.get(OrePrefixes.foil, aMaterial, costMultiplier) + }, + syntheticRubber.getMolten(costMultiplier * 36), + GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), + 100, + 8); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + aStack, + dielectric.getDustSmall(costMultiplier), + GT_OreDictUnificator.get( + OrePrefixes.foil, Materials.PolyphenyleneSulfide, costMultiplier) + }, + syntheticRubber.getMolten(costMultiplier * 36), + GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), + 100, + 8); } } } break; } - GT_Values.RA.addUnboxingRecipe(GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), GT_Utility.copyAmount(1L, aStack), null, 100, 8); + GT_Values.RA.addUnboxingRecipe( + GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), + GT_Utility.copyAmount(1L, aStack), + null, + 100, + 8); if (GT_Mod.gregtechproxy.mAE2Integration) { AE2AddNetAttunementCable(aStack, correspondingCable, aMaterial); } } - //region AE2 compat + // region AE2 compat static { - if (GT_Mod.gregtechproxy.mAE2Integration) - setAE2Field(); + if (GT_Mod.gregtechproxy.mAE2Integration) setAE2Field(); } @Optional.Method(modid = "appliedenergistics2") - private static void setAE2Field(){ + private static void setAE2Field() { tt = TunnelType.ME; } @Optional.Method(modid = "appliedenergistics2") - private void AE2addNewAttunement(ItemStack aStack){ + private void AE2addNewAttunement(ItemStack aStack) { Api.INSTANCE.registries().p2pTunnel().addNewAttunement(aStack, (TunnelType) tt); } @Optional.Method(modid = "appliedenergistics2") - private void AE2AddNetAttunementCable(ItemStack aStack, OrePrefixes correspondingCable, Materials aMaterial){ + private void AE2AddNetAttunementCable(ItemStack aStack, OrePrefixes correspondingCable, Materials aMaterial) { Api.INSTANCE.registries().p2pTunnel().addNewAttunement(aStack, (TunnelType) tt); - Api.INSTANCE.registries().p2pTunnel().addNewAttunement(GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L),(TunnelType) tt); + Api.INSTANCE + .registries() + .p2pTunnel() + .addNewAttunement(GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), (TunnelType) tt); } -//end region + // end region } diff --git a/src/main/java/gregtech/loaders/postload/GT_BlockResistanceLoader.java b/src/main/java/gregtech/loaders/postload/GT_BlockResistanceLoader.java index 26a1313694..39f6830555 100644 --- a/src/main/java/gregtech/loaders/postload/GT_BlockResistanceLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_BlockResistanceLoader.java @@ -2,13 +2,12 @@ package gregtech.loaders.postload; import gregtech.GT_Mod; import gregtech.api.util.GT_Utility; +import java.util.Set; import net.minecraft.block.material.Material; import net.minecraft.init.Blocks; import net.minecraft.item.ItemAxe; import net.minecraft.item.ItemPickaxe; -import java.util.Set; - public class GT_BlockResistanceLoader implements Runnable { @Override public void run() { @@ -27,7 +26,6 @@ public class GT_BlockResistanceLoader implements Runnable { Blocks.hardened_clay.setResistance(15.0F); Blocks.stained_hardened_clay.setResistance(15.0F); - Blocks.bed.setHarvestLevel("axe", 0); Blocks.hay_block.setHarvestLevel("axe", 0); Blocks.tnt.setHarvestLevel("pickaxe", 0); diff --git a/src/main/java/gregtech/loaders/postload/GT_BookAndLootLoader.java b/src/main/java/gregtech/loaders/postload/GT_BookAndLootLoader.java index 6a5e81ebc0..c518dea6fa 100644 --- a/src/main/java/gregtech/loaders/postload/GT_BookAndLootLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_BookAndLootLoader.java @@ -47,87 +47,277 @@ public class GT_BookAndLootLoader implements Runnable { tChest.setMax(tChest.getMax() + 16); tChest.setMin(tChest.getMin() + 8); } - ChestGenHooks.addItem("bonusChest", new WeightedRandomChestContent(ItemList.Bottle_Purple_Drink.get(1L), 8, 16, 2)); + ChestGenHooks.addItem( + "bonusChest", new WeightedRandomChestContent(ItemList.Bottle_Purple_Drink.get(1L), 8, 16, 2)); + ChestGenHooks.addItem( + "dungeonChest", new WeightedRandomChestContent(ItemList.Bottle_Holy_Water.get(1L), 4, 8, 20)); + ChestGenHooks.addItem( + "dungeonChest", new WeightedRandomChestContent(ItemList.Bottle_Purple_Drink.get(1L), 8, 16, 80)); + ChestGenHooks.addItem( + "dungeonChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Silver, 1L), 1, 6, 120)); + ChestGenHooks.addItem( + "dungeonChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Lead, 1L), 1, 6, 30)); + ChestGenHooks.addItem( + "dungeonChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), 1, 6, 60)); + ChestGenHooks.addItem( + "dungeonChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Bronze, 1L), 1, 6, 60)); + ChestGenHooks.addItem( + "dungeonChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Manganese, 1L), 1, 6, 60)); + ChestGenHooks.addItem( + "dungeonChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.DamascusSteel, 1L), 1, 6, 10)); + ChestGenHooks.addItem( + "dungeonChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Emerald, 1L), 1, 6, 20)); + ChestGenHooks.addItem( + "dungeonChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Ruby, 1L), 1, 6, 20)); + ChestGenHooks.addItem( + "dungeonChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Sapphire, 1L), 1, 6, 20)); + ChestGenHooks.addItem( + "dungeonChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GreenSapphire, 1L), 1, 6, 20)); + ChestGenHooks.addItem( + "dungeonChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Olivine, 1L), 1, 6, 20)); + ChestGenHooks.addItem( + "dungeonChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GarnetRed, 1L), 1, 6, 40)); + ChestGenHooks.addItem( + "dungeonChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GarnetYellow, 1L), 1, 6, 40)); + ChestGenHooks.addItem( + "dungeonChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Neodymium, 1L), 1, 6, 40)); + ChestGenHooks.addItem( + "dungeonChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chrome, 1L), 1, 3, 40)); - ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(ItemList.Bottle_Holy_Water.get(1L), 4, 8, 20)); - ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(ItemList.Bottle_Purple_Drink.get(1L), 8, 16, 80)); - ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Silver, 1L), 1, 6, 120)); - ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Lead, 1L), 1, 6, 30)); - ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), 1, 6, 60)); - ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Bronze, 1L), 1, 6, 60)); - ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Manganese, 1L), 1, 6, 60)); - ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.DamascusSteel, 1L), 1, 6, 10)); - ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Emerald, 1L), 1, 6, 20)); - ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Ruby, 1L), 1, 6, 20)); - ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Sapphire, 1L), 1, 6, 20)); - ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GreenSapphire, 1L), 1, 6, 20)); - ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Olivine, 1L), 1, 6, 20)); - ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GarnetRed, 1L), 1, 6, 40)); - ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GarnetYellow, 1L), 1, 6, 40)); - ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Neodymium, 1L), 1, 6, 40)); - ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chrome, 1L), 1, 3, 40)); + ChestGenHooks.addItem( + "pyramidDesertyChest", new WeightedRandomChestContent(ItemList.Bottle_Holy_Water.get(1L), 4, 8, 2)); + ChestGenHooks.addItem( + "pyramidDesertyChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Silver, 1L), 4, 16, 12)); + ChestGenHooks.addItem( + "pyramidDesertyChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Platinum, 1L), 2, 8, 4)); + ChestGenHooks.addItem( + "pyramidDesertyChest", + new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Ruby, 1L), 2, 8, 2)); + ChestGenHooks.addItem( + "pyramidDesertyChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Sapphire, 1L), 2, 8, 2)); + ChestGenHooks.addItem( + "pyramidDesertyChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GreenSapphire, 1L), 2, 8, 2)); + ChestGenHooks.addItem( + "pyramidDesertyChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Olivine, 1L), 2, 8, 2)); + ChestGenHooks.addItem( + "pyramidDesertyChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GarnetRed, 1L), 2, 8, 4)); + ChestGenHooks.addItem( + "pyramidDesertyChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GarnetYellow, 1L), 2, 8, 4)); - ChestGenHooks.addItem("pyramidDesertyChest", new WeightedRandomChestContent(ItemList.Bottle_Holy_Water.get(1L), 4, 8, 2)); - ChestGenHooks.addItem("pyramidDesertyChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Silver, 1L), 4, 16, 12)); - ChestGenHooks.addItem("pyramidDesertyChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Platinum, 1L), 2, 8, 4)); - ChestGenHooks.addItem("pyramidDesertyChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Ruby, 1L), 2, 8, 2)); - ChestGenHooks.addItem("pyramidDesertyChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Sapphire, 1L), 2, 8, 2)); - ChestGenHooks.addItem("pyramidDesertyChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GreenSapphire, 1L), 2, 8, 2)); - ChestGenHooks.addItem("pyramidDesertyChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Olivine, 1L), 2, 8, 2)); - ChestGenHooks.addItem("pyramidDesertyChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GarnetRed, 1L), 2, 8, 4)); - ChestGenHooks.addItem("pyramidDesertyChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GarnetYellow, 1L), 2, 8, 4)); + ChestGenHooks.addItem( + "pyramidJungleChest", new WeightedRandomChestContent(ItemList.Coin_Gold_Ancient.get(1L), 16, 64, 10)); + ChestGenHooks.addItem( + "pyramidJungleChest", + new WeightedRandomChestContent(ItemList.ZPM.getWithCharge(1L, 2147483647), 1, 1, 1)); + ChestGenHooks.addItem( + "pyramidJungleChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Bronze, 1L), 4, 16, 12)); + ChestGenHooks.addItem( + "pyramidJungleChest", + new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Ruby, 1L), 2, 8, 2)); + ChestGenHooks.addItem( + "pyramidJungleChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Sapphire, 1L), 2, 8, 2)); + ChestGenHooks.addItem( + "pyramidJungleChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GreenSapphire, 1L), 2, 8, 2)); + ChestGenHooks.addItem( + "pyramidJungleChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Olivine, 1L), 2, 8, 2)); + ChestGenHooks.addItem( + "pyramidJungleChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GarnetRed, 1L), 2, 8, 4)); + ChestGenHooks.addItem( + "pyramidJungleChest", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GarnetYellow, 1L), 2, 8, 4)); - ChestGenHooks.addItem("pyramidJungleChest", new WeightedRandomChestContent(ItemList.Coin_Gold_Ancient.get(1L), 16, 64, 10)); - ChestGenHooks.addItem("pyramidJungleChest", new WeightedRandomChestContent(ItemList.ZPM.getWithCharge(1L, 2147483647), 1, 1, 1)); - ChestGenHooks.addItem("pyramidJungleChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Bronze, 1L), 4, 16, 12)); - ChestGenHooks.addItem("pyramidJungleChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Ruby, 1L), 2, 8, 2)); - ChestGenHooks.addItem("pyramidJungleChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Sapphire, 1L), 2, 8, 2)); - ChestGenHooks.addItem("pyramidJungleChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GreenSapphire, 1L), 2, 8, 2)); - ChestGenHooks.addItem("pyramidJungleChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Olivine, 1L), 2, 8, 2)); - ChestGenHooks.addItem("pyramidJungleChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GarnetRed, 1L), 2, 8, 4)); - ChestGenHooks.addItem("pyramidJungleChest", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GarnetYellow, 1L), 2, 8, 4)); + ChestGenHooks.addItem( + "pyramidJungleDispenser", + new WeightedRandomChestContent(new ItemStack(Items.fire_charge, 1), 2, 8, 30)); + ChestGenHooks.addItem( + "pyramidJungleDispenser", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.arrowGtWood, Materials.DamascusSteel, 1L), 8, 16, 20)); - ChestGenHooks.addItem("pyramidJungleDispenser", new WeightedRandomChestContent(new ItemStack(Items.fire_charge, 1), 2, 8, 30)); - ChestGenHooks.addItem("pyramidJungleDispenser", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.arrowGtWood, Materials.DamascusSteel, 1L), 8, 16, 20)); + ChestGenHooks.addItem( + "mineshaftCorridor", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Silver, 1L), 1, 4, 12)); + ChestGenHooks.addItem( + "mineshaftCorridor", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Lead, 1L), 1, 4, 3)); + ChestGenHooks.addItem( + "mineshaftCorridor", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), 1, 4, 6)); + ChestGenHooks.addItem( + "mineshaftCorridor", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Bronze, 1L), 1, 4, 6)); + ChestGenHooks.addItem( + "mineshaftCorridor", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Sapphire, 1L), 1, 4, 2)); + ChestGenHooks.addItem( + "mineshaftCorridor", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GreenSapphire, 1L), 1, 4, 2)); + ChestGenHooks.addItem( + "mineshaftCorridor", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Olivine, 1L), 1, 4, 2)); + ChestGenHooks.addItem( + "mineshaftCorridor", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GarnetRed, 1L), 1, 4, 4)); + ChestGenHooks.addItem( + "mineshaftCorridor", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GarnetYellow, 1L), 1, 4, 4)); + ChestGenHooks.addItem( + "mineshaftCorridor", + new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Ruby, 1L), 1, 4, 2)); + ChestGenHooks.addItem( + "mineshaftCorridor", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Emerald, 1L), 1, 4, 2)); + ChestGenHooks.addItem( + "mineshaftCorridor", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, Materials.DamascusSteel, 1L), 1, 4, 1)); + ChestGenHooks.addItem( + "mineshaftCorridor", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, Materials.DamascusSteel, 1L), 1, 4, 1)); + ChestGenHooks.addItem( + "villageBlacksmith", new WeightedRandomChestContent(ItemList.McGuffium_239.get(1L), 1, 1, 1)); + ChestGenHooks.addItem( + "villageBlacksmith", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chrome, 1L), 1, 4, 6)); + ChestGenHooks.addItem( + "villageBlacksmith", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Neodymium, 1L), 2, 8, 6)); + ChestGenHooks.addItem( + "villageBlacksmith", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Manganese, 1L), 2, 8, 12)); + ChestGenHooks.addItem( + "villageBlacksmith", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), 4, 12, 12)); + ChestGenHooks.addItem( + "villageBlacksmith", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Bronze, 1L), 4, 12, 12)); + ChestGenHooks.addItem( + "villageBlacksmith", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Brass, 1L), 4, 12, 12)); + ChestGenHooks.addItem( + "villageBlacksmith", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.DamascusSteel, 1L), 4, 12, 1)); - ChestGenHooks.addItem("mineshaftCorridor", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Silver, 1L), 1, 4, 12)); - ChestGenHooks.addItem("mineshaftCorridor", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Lead, 1L), 1, 4, 3)); - ChestGenHooks.addItem("mineshaftCorridor", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), 1, 4, 6)); - ChestGenHooks.addItem("mineshaftCorridor", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Bronze, 1L), 1, 4, 6)); - ChestGenHooks.addItem("mineshaftCorridor", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Sapphire, 1L), 1, 4, 2)); - ChestGenHooks.addItem("mineshaftCorridor", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GreenSapphire, 1L), 1, 4, 2)); - ChestGenHooks.addItem("mineshaftCorridor", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Olivine, 1L), 1, 4, 2)); - ChestGenHooks.addItem("mineshaftCorridor", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GarnetRed, 1L), 1, 4, 4)); - ChestGenHooks.addItem("mineshaftCorridor", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.GarnetYellow, 1L), 1, 4, 4)); - ChestGenHooks.addItem("mineshaftCorridor", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Ruby, 1L), 1, 4, 2)); - ChestGenHooks.addItem("mineshaftCorridor", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Emerald, 1L), 1, 4, 2)); - ChestGenHooks.addItem("mineshaftCorridor", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, Materials.DamascusSteel, 1L), 1, 4, 1)); - ChestGenHooks.addItem("mineshaftCorridor", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, Materials.DamascusSteel, 1L), 1, 4, 1)); + ChestGenHooks.addItem( + "strongholdCrossing", new WeightedRandomChestContent(ItemList.Bottle_Holy_Water.get(1L), 4, 8, 6)); + ChestGenHooks.addItem( + "strongholdCrossing", new WeightedRandomChestContent(ItemList.McGuffium_239.get(1L), 1, 1, 10)); - ChestGenHooks.addItem("villageBlacksmith", new WeightedRandomChestContent(ItemList.McGuffium_239.get(1L), 1, 1, 1)); - ChestGenHooks.addItem("villageBlacksmith", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chrome, 1L), 1, 4, 6)); - ChestGenHooks.addItem("villageBlacksmith", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Neodymium, 1L), 2, 8, 6)); - ChestGenHooks.addItem("villageBlacksmith", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Manganese, 1L), 2, 8, 12)); - ChestGenHooks.addItem("villageBlacksmith", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), 4, 12, 12)); - ChestGenHooks.addItem("villageBlacksmith", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Bronze, 1L), 4, 12, 12)); - ChestGenHooks.addItem("villageBlacksmith", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Brass, 1L), 4, 12, 12)); - ChestGenHooks.addItem("villageBlacksmith", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.DamascusSteel, 1L), 4, 12, 1)); + ChestGenHooks.addItem( + "strongholdCrossing", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.crateGtIngot, Materials.DamascusSteel, 1L), 4, 8, 6)); + ChestGenHooks.addItem( + "strongholdCrossing", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.crateGtIngot, Materials.Steel, 1L), 8, 16, 12)); + ChestGenHooks.addItem( + "strongholdCrossing", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.crateGtIngot, Materials.Bronze, 1L), 8, 16, 12)); + ChestGenHooks.addItem( + "strongholdCrossing", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.crateGtIngot, Materials.Manganese, 1L), 4, 8, 12)); + ChestGenHooks.addItem( + "strongholdCrossing", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.crateGtDust, Materials.Neodymium, 1L), 4, 8, 6)); + ChestGenHooks.addItem( + "strongholdCrossing", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.crateGtDust, Materials.Chrome, 1L), 2, 4, 6)); - ChestGenHooks.addItem("strongholdCrossing", new WeightedRandomChestContent(ItemList.Bottle_Holy_Water.get(1L), 4, 8, 6)); - ChestGenHooks.addItem("strongholdCrossing", new WeightedRandomChestContent(ItemList.McGuffium_239.get(1L), 1, 1, 10)); - - ChestGenHooks.addItem("strongholdCrossing", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.crateGtIngot, Materials.DamascusSteel, 1L), 4, 8, 6)); - ChestGenHooks.addItem("strongholdCrossing", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.crateGtIngot, Materials.Steel, 1L), 8, 16, 12)); - ChestGenHooks.addItem("strongholdCrossing", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.crateGtIngot, Materials.Bronze, 1L), 8, 16, 12)); - ChestGenHooks.addItem("strongholdCrossing", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.crateGtIngot, Materials.Manganese, 1L), 4, 8, 12)); - ChestGenHooks.addItem("strongholdCrossing", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.crateGtDust, Materials.Neodymium, 1L), 4, 8, 6)); - ChestGenHooks.addItem("strongholdCrossing", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.crateGtDust, Materials.Chrome, 1L), 2, 4, 6)); - - ChestGenHooks.addItem("strongholdCorridor", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, Materials.DamascusSteel, 1L), 1, 4, 6)); - ChestGenHooks.addItem("strongholdCorridor", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, Materials.DamascusSteel, 1L), 1, 4, 6)); - ChestGenHooks.addItem("strongholdCorridor", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.arrowGtWood, Materials.DamascusSteel, 1L), 16, 48, 6)); - ChestGenHooks.addItem("strongholdCorridor", new WeightedRandomChestContent(GT_OreDictUnificator.get(OrePrefixes.arrowGtWood, Materials.SterlingSilver, 1L), 8, 24, 6)); + ChestGenHooks.addItem( + "strongholdCorridor", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, Materials.DamascusSteel, 1L), 1, 4, 6)); + ChestGenHooks.addItem( + "strongholdCorridor", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, Materials.DamascusSteel, 1L), 1, 4, 6)); + ChestGenHooks.addItem( + "strongholdCorridor", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.arrowGtWood, Materials.DamascusSteel, 1L), 16, 48, 6)); + ChestGenHooks.addItem( + "strongholdCorridor", + new WeightedRandomChestContent( + GT_OreDictUnificator.get(OrePrefixes.arrowGtWood, Materials.SterlingSilver, 1L), 8, 24, 6)); } } diff --git a/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java index fe67494967..c81d4d7a0f 100644 --- a/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java @@ -16,6 +16,9 @@ import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import ic2.core.Ic2Items; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; @@ -23,71 +26,172 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -import java.util.Arrays; -import java.util.List; -import java.util.stream.Collectors; - public class GT_CraftingRecipeLoader implements Runnable { private static final String aTextIron1 = "X X"; private static final String aTextIron2 = "XXX"; - private static final long bits_no_remove_buffered = GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED; - private static final long bits = GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED; + private static final long bits_no_remove_buffered = + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED; + private static final long bits = GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE + | GT_ModHandler.RecipeBits.BUFFERED; private static final String aTextPlateWrench = "PwP"; - @Override public void run() { GT_Log.out.println("GT_Mod: Adding nerfed Vanilla Recipes."); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.bucket, 1), bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"XhX", " X ", 'X', OrePrefixes.plate.get(Materials.AnyIron)}); + GT_ModHandler.addCraftingRecipe( + new ItemStack(Items.bucket, 1), + bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, + new Object[] {"XhX", " X ", 'X', OrePrefixes.plate.get(Materials.AnyIron)}); if (!GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.recipereplacements, "Iron.Bucket", true)) { - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.bucket, 1), bits_no_remove_buffered, new Object[]{aTextIron1, " X ", 'X', OrePrefixes.ingot.get(Materials.AnyIron)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Items.bucket, 1), bits_no_remove_buffered, new Object[] { + aTextIron1, " X ", 'X', OrePrefixes.ingot.get(Materials.AnyIron) + }); } ItemStack tMat = new ItemStack(Items.iron_ingot); if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.recipereplacements, "Iron.PressurePlate", true)) { ItemStack tStack; if (null != (tStack = GT_ModHandler.removeRecipe(tMat, tMat, null, null, null, null, null, null, null))) { - GT_ModHandler.addCraftingRecipe(tStack, bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, new Object[]{"ShS", "XZX","SdS", 'X', OrePrefixes.plate.get(Materials.AnyIron), 'S', OrePrefixes.screw.get(Materials.Steel), 'Z', OrePrefixes.spring.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe( + tStack, + bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, + new Object[] { + "ShS", + "XZX", + "SdS", + 'X', + OrePrefixes.plate.get(Materials.AnyIron), + 'S', + OrePrefixes.screw.get(Materials.Steel), + 'Z', + OrePrefixes.spring.get(Materials.Steel) + }); } } if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.recipereplacements, "Iron.Door", true)) { ItemStack tStack; if (null != (tStack = GT_ModHandler.removeRecipe(tMat, tMat, null, tMat, tMat, null, tMat, tMat, null))) { - GT_ModHandler.addCraftingRecipe(tStack, bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, new Object[]{"XX ", "XXh", "XX ", 'X', OrePrefixes.plate.get(Materials.AnyIron), 'S', OrePrefixes.stick.get(Materials.Wood), 'I', OrePrefixes.ingot.get(Materials.AnyIron)}); + GT_ModHandler.addCraftingRecipe( + tStack, + bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, + new Object[] { + "XX ", + "XXh", + "XX ", + 'X', + OrePrefixes.plate.get(Materials.AnyIron), + 'S', + OrePrefixes.stick.get(Materials.Wood), + 'I', + OrePrefixes.ingot.get(Materials.AnyIron) + }); } } if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.recipereplacements, "Iron.Cauldron", true)) { ItemStack tStack; if (null != (tStack = GT_ModHandler.removeRecipe(tMat, null, tMat, tMat, null, tMat, tMat, tMat, tMat))) { - GT_ModHandler.addCraftingRecipe(tStack, bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, new Object[]{aTextIron1, "XhX", aTextIron2, 'X', OrePrefixes.plate.get(Materials.AnyIron), 'S', OrePrefixes.stick.get(Materials.Wood), 'I', OrePrefixes.ingot.get(Materials.AnyIron)}); + GT_ModHandler.addCraftingRecipe( + tStack, + bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, + new Object[] { + aTextIron1, + "XhX", + aTextIron2, + 'X', + OrePrefixes.plate.get(Materials.AnyIron), + 'S', + OrePrefixes.stick.get(Materials.Wood), + 'I', + OrePrefixes.ingot.get(Materials.AnyIron) + }); } } if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.recipereplacements, "Iron.Hopper", true)) { ItemStack tStack; - if (null != (tStack = GT_ModHandler.removeRecipe(tMat, null, tMat, tMat, new ItemStack(Blocks.chest, 1, 0), tMat, null, tMat, null))) { - GT_ModHandler.addCraftingRecipe(tStack, bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, new Object[]{"XwX", "XCX", " X ", 'X', OrePrefixes.plate.get(Materials.AnyIron), 'S', OrePrefixes.stick.get(Materials.Wood), 'I', OrePrefixes.ingot.get(Materials.AnyIron), 'C', "craftingChest"}); + if (null + != (tStack = GT_ModHandler.removeRecipe( + tMat, null, tMat, tMat, new ItemStack(Blocks.chest, 1, 0), tMat, null, tMat, null))) { + GT_ModHandler.addCraftingRecipe( + tStack, + bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, + new Object[] { + "XwX", + "XCX", + " X ", + 'X', + OrePrefixes.plate.get(Materials.AnyIron), + 'S', + OrePrefixes.stick.get(Materials.Wood), + 'I', + OrePrefixes.ingot.get(Materials.AnyIron), + 'C', + "craftingChest" + }); } } if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.recipereplacements, "Iron.Bars", true)) { ItemStack tStack; if (null != (tStack = GT_ModHandler.removeRecipe(tMat, tMat, tMat, tMat, tMat, tMat, null, null, null))) { tStack.stackSize /= 2; - GT_ModHandler.addCraftingRecipe(tStack, bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, new Object[]{" w ", aTextIron2, aTextIron2, 'X', OrePrefixes.stick.get(Materials.AnyIron), 'S', OrePrefixes.stick.get(Materials.Wood), 'I', OrePrefixes.ingot.get(Materials.AnyIron)}); + GT_ModHandler.addCraftingRecipe( + tStack, + bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, + new Object[] { + " w ", + aTextIron2, + aTextIron2, + 'X', + OrePrefixes.stick.get(Materials.AnyIron), + 'S', + OrePrefixes.stick.get(Materials.Wood), + 'I', + OrePrefixes.ingot.get(Materials.AnyIron) + }); } } - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("ironFence", 6L), bits_no_remove_buffered | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextIron2, aTextIron2, " w ", 'X', OrePrefixes.stick.get(Materials.AnyIron), 'S', OrePrefixes.stick.get(Materials.Wood), 'I', OrePrefixes.ingot.get(Materials.AnyIron)}); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("ironFence", 6L), + bits_no_remove_buffered | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { + aTextIron2, + aTextIron2, + " w ", + 'X', + OrePrefixes.stick.get(Materials.AnyIron), + 'S', + OrePrefixes.stick.get(Materials.Wood), + 'I', + OrePrefixes.ingot.get(Materials.AnyIron) + }); tMat = new ItemStack(Items.gold_ingot); if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.recipereplacements, "Gold.PressurePlate", true)) { ItemStack tStack; if (null != (tStack = GT_ModHandler.removeRecipe(tMat, tMat, null, null, null, null, null, null, null))) { - GT_ModHandler.addCraftingRecipe(tStack, bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, new Object[]{"ShS", "XZX","SdS", 'X', OrePrefixes.plate.get(Materials.Gold), 'S', OrePrefixes.screw.get(Materials.Steel), 'Z', OrePrefixes.spring.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe( + tStack, + bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, + new Object[] { + "ShS", + "XZX", + "SdS", + 'X', + OrePrefixes.plate.get(Materials.Gold), + 'S', + OrePrefixes.screw.get(Materials.Steel), + 'Z', + OrePrefixes.spring.get(Materials.Steel) + }); } } tMat = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Rubber, 1L); if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.recipereplacements, "Rubber.Sheet", true)) { ItemStack tStack; if (null != (tStack = GT_ModHandler.removeRecipe(tMat, tMat, tMat, tMat, tMat, tMat, null, null, null))) { - GT_ModHandler.addCraftingRecipe(tStack, bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, new Object[]{aTextIron2, aTextIron2, 'X', OrePrefixes.plate.get(Materials.Rubber)}); + GT_ModHandler.addCraftingRecipe( + tStack, + bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_RECIPES, + new Object[] {aTextIron2, aTextIron2, 'X', OrePrefixes.plate.get(Materials.Rubber)}); } } GT_ModHandler.removeRecipeByOutputDelayed(ItemList.Bottle_Empty.get(1L)); @@ -110,162 +214,629 @@ public class GT_CraftingRecipeLoader implements Runnable { GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getModItem("Forestry", "engine", 1L, 2)); GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getModItem("Forestry", "engine", 1L, 4)); - ItemStack tStack = GT_ModHandler.removeRecipe(new ItemStack(Blocks.planks, 1, 0), null, null, new ItemStack(Blocks.planks, 1, 0)); + ItemStack tStack = GT_ModHandler.removeRecipe( + new ItemStack(Blocks.planks, 1, 0), null, null, new ItemStack(Blocks.planks, 1, 0)); if (tStack != null) { - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize : tStack.stackSize * 5 / 4, tStack), bits_no_remove_buffered, new Object[]{"s", "P", "P", 'P', OrePrefixes.plank.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize / 2 : tStack.stackSize, tStack), bits_no_remove_buffered, new Object[]{"P", "P", 'P', OrePrefixes.plank.get(Materials.Wood)}); + GT_ModHandler.addCraftingRecipe( + GT_Utility.copyAmount( + GT_Mod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize : tStack.stackSize * 5 / 4, + tStack), + bits_no_remove_buffered, + new Object[] {"s", "P", "P", 'P', OrePrefixes.plank.get(Materials.Wood)}); + GT_ModHandler.addCraftingRecipe( + GT_Utility.copyAmount( + GT_Mod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize / 2 : tStack.stackSize, tStack), + bits_no_remove_buffered, + new Object[] {"P", "P", 'P', OrePrefixes.plank.get(Materials.Wood)}); } - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.stone_button, 2, 0), bits_no_remove_buffered, new Object[]{"S", "S", 'S', OrePrefixes.stone}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.stone_button, 1, 0), bits_no_remove_buffered, new Object[]{OrePrefixes.stone}); + GT_ModHandler.addCraftingRecipe( + new ItemStack(Blocks.stone_button, 2, 0), + bits_no_remove_buffered, + new Object[] {"S", "S", 'S', OrePrefixes.stone}); + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Blocks.stone_button, 1, 0), bits_no_remove_buffered, new Object[] {OrePrefixes.stone}); GT_Log.out.println("GT_Mod: Adding Vanilla Convenience Recipes."); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.stonebrick, 1, 3), bits_no_remove_buffered, new Object[]{"f", "X", 'X', new ItemStack(Blocks.double_stone_slab, 1, 8)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.gravel, 1, 0), bits_no_remove_buffered, new Object[]{"h", "X", 'X', new ItemStack(Blocks.cobblestone, 1, 0)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.sand, 1, 0), bits_no_remove_buffered, new Object[]{"h", "X", 'X', new ItemStack(Blocks.gravel, 1, 0)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.cobblestone, 1, 0), bits_no_remove_buffered, new Object[]{"h", "X", 'X', new ItemStack(Blocks.stone, 1, 0)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.stonebrick, 1, 2), bits_no_remove_buffered, new Object[]{"h", "X", 'X', new ItemStack(Blocks.stonebrick, 1, 0)}); - - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.double_stone_slab, 1, 8), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.double_stone_slab, 1, 0)}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.double_stone_slab, 1, 0), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.double_stone_slab, 1, 8)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.double_stone_slab, 1, 0), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 0)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.cobblestone, 1, 0), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 3)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.brick_block, 1, 0), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 4)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.stonebrick, 1, 0), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 5)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.nether_brick, 1, 0), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 6)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.quartz_block, 1, 0), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 7)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.double_stone_slab, 1, 8), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 8)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 0), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 0)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 1), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 1)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 2), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 2)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 3), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 3)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 4), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 4)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 5), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 5)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 6), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 6)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 7), bits_no_remove_buffered, new Object[]{"B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 7)}); - - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.stick, 2, 0), bits_no_remove_buffered, new Object[]{"s", "X", 'X', new ItemStack(Blocks.deadbush, 1, 32767)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.stick, 2, 0), bits_no_remove_buffered, new Object[]{"s", "X", 'X', new ItemStack(Blocks.tallgrass, 1, 0)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.stick, 1, 0), bits_no_remove_buffered, new Object[]{"s", "X", 'X', OrePrefixes.treeSapling}); - - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.comparator, 1, 0), bits_no_remove_buffered, new Object[]{" T ", "TQT", "SSS", 'Q', OreDictNames.craftingQuartz, 'S', OrePrefixes.stoneSmooth, 'T', OreDictNames.craftingRedstoneTorch}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.stonebrick, 1, 3), bits_no_remove_buffered, new Object[] { + "f", "X", 'X', new ItemStack(Blocks.double_stone_slab, 1, 8) + }); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.gravel, 1, 0), bits_no_remove_buffered, new Object[] { + "h", "X", 'X', new ItemStack(Blocks.cobblestone, 1, 0) + }); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.sand, 1, 0), bits_no_remove_buffered, new Object[] { + "h", "X", 'X', new ItemStack(Blocks.gravel, 1, 0) + }); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.cobblestone, 1, 0), bits_no_remove_buffered, new Object[] { + "h", "X", 'X', new ItemStack(Blocks.stone, 1, 0) + }); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.stonebrick, 1, 2), bits_no_remove_buffered, new Object[] { + "h", "X", 'X', new ItemStack(Blocks.stonebrick, 1, 0) + }); + + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Blocks.double_stone_slab, 1, 8), + bits_no_remove_buffered, + new Object[] {new ItemStack(Blocks.double_stone_slab, 1, 0)}); + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Blocks.double_stone_slab, 1, 0), + bits_no_remove_buffered, + new Object[] {new ItemStack(Blocks.double_stone_slab, 1, 8)}); + GT_ModHandler.addCraftingRecipe( + new ItemStack(Blocks.double_stone_slab, 1, 0), + bits_no_remove_buffered, + new Object[] {"B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 0)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.cobblestone, 1, 0), bits_no_remove_buffered, new Object[] { + "B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 3) + }); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.brick_block, 1, 0), bits_no_remove_buffered, new Object[] { + "B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 4) + }); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.stonebrick, 1, 0), bits_no_remove_buffered, new Object[] { + "B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 5) + }); + GT_ModHandler.addCraftingRecipe( + new ItemStack(Blocks.nether_brick, 1, 0), + bits_no_remove_buffered, + new Object[] {"B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 6)}); + GT_ModHandler.addCraftingRecipe( + new ItemStack(Blocks.quartz_block, 1, 0), + bits_no_remove_buffered, + new Object[] {"B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 7)}); + GT_ModHandler.addCraftingRecipe( + new ItemStack(Blocks.double_stone_slab, 1, 8), + bits_no_remove_buffered, + new Object[] {"B", "B", 'B', new ItemStack(Blocks.stone_slab, 1, 8)}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 0), bits_no_remove_buffered, new Object[] { + "B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 0) + }); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 1), bits_no_remove_buffered, new Object[] { + "B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 1) + }); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 2), bits_no_remove_buffered, new Object[] { + "B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 2) + }); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 3), bits_no_remove_buffered, new Object[] { + "B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 3) + }); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 4), bits_no_remove_buffered, new Object[] { + "B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 4) + }); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 5), bits_no_remove_buffered, new Object[] { + "B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 5) + }); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 6), bits_no_remove_buffered, new Object[] { + "B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 6) + }); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.planks, 1, 7), bits_no_remove_buffered, new Object[] { + "B", "B", 'B', new ItemStack(Blocks.wooden_slab, 1, 7) + }); + + GT_ModHandler.addCraftingRecipe(new ItemStack(Items.stick, 2, 0), bits_no_remove_buffered, new Object[] { + "s", "X", 'X', new ItemStack(Blocks.deadbush, 1, 32767) + }); + GT_ModHandler.addCraftingRecipe(new ItemStack(Items.stick, 2, 0), bits_no_remove_buffered, new Object[] { + "s", "X", 'X', new ItemStack(Blocks.tallgrass, 1, 0) + }); + GT_ModHandler.addCraftingRecipe(new ItemStack(Items.stick, 1, 0), bits_no_remove_buffered, new Object[] { + "s", "X", 'X', OrePrefixes.treeSapling + }); + + GT_ModHandler.addCraftingRecipe(new ItemStack(Items.comparator, 1, 0), bits_no_remove_buffered, new Object[] { + " T ", + "TQT", + "SSS", + 'Q', + OreDictNames.craftingQuartz, + 'S', + OrePrefixes.stoneSmooth, + 'T', + OreDictNames.craftingRedstoneTorch + }); GT_Log.out.println("GT_Mod: Adding Tool Recipes."); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.minecart, 1), bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{" h ", "PwP", "WPW", 'P', OrePrefixes.plate.get(Materials.AnyIron), 'W', ItemList.Component_Minecart_Wheels_Iron}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.minecart, 1), bits_no_remove_buffered, new Object[]{" h ", "PwP", "WPW", 'P', OrePrefixes.plate.get(Materials.Steel), 'W', ItemList.Component_Minecart_Wheels_Steel}); - - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.chest_minecart, 1), bits_no_remove_buffered | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"X", "C", 'C', new ItemStack(Items.minecart, 1), 'X', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.furnace_minecart, 1), bits_no_remove_buffered | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"X", "C", 'C', new ItemStack(Items.minecart, 1), 'X', OreDictNames.craftingFurnace}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.hopper_minecart, 1), bits_no_remove_buffered | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"X", "C", 'C', new ItemStack(Items.minecart, 1), 'X', new ItemStack(Blocks.hopper, 1, 32767)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.tnt_minecart, 1), bits_no_remove_buffered | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"X", "C", 'C', new ItemStack(Items.minecart, 1), 'X', new ItemStack(Blocks.tnt, 1, 32767)}); + GT_ModHandler.addCraftingRecipe( + new ItemStack(Items.minecart, 1), + bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, + new Object[] { + " h ", + "PwP", + "WPW", + 'P', + OrePrefixes.plate.get(Materials.AnyIron), + 'W', + ItemList.Component_Minecart_Wheels_Iron + }); + GT_ModHandler.addCraftingRecipe(new ItemStack(Items.minecart, 1), bits_no_remove_buffered, new Object[] { + " h ", + "PwP", + "WPW", + 'P', + OrePrefixes.plate.get(Materials.Steel), + 'W', + ItemList.Component_Minecart_Wheels_Steel + }); + + GT_ModHandler.addCraftingRecipe( + new ItemStack(Items.chest_minecart, 1), + bits_no_remove_buffered + | GT_ModHandler.RecipeBits.REVERSIBLE + | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, + new Object[] {"X", "C", 'C', new ItemStack(Items.minecart, 1), 'X', OreDictNames.craftingChest}); + GT_ModHandler.addCraftingRecipe( + new ItemStack(Items.furnace_minecart, 1), + bits_no_remove_buffered + | GT_ModHandler.RecipeBits.REVERSIBLE + | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, + new Object[] {"X", "C", 'C', new ItemStack(Items.minecart, 1), 'X', OreDictNames.craftingFurnace}); + GT_ModHandler.addCraftingRecipe( + new ItemStack(Items.hopper_minecart, 1), + bits_no_remove_buffered + | GT_ModHandler.RecipeBits.REVERSIBLE + | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, + new Object[] { + "X", "C", 'C', new ItemStack(Items.minecart, 1), 'X', new ItemStack(Blocks.hopper, 1, 32767) + }); + GT_ModHandler.addCraftingRecipe( + new ItemStack(Items.tnt_minecart, 1), + bits_no_remove_buffered + | GT_ModHandler.RecipeBits.REVERSIBLE + | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, + new Object[] {"X", "C", 'C', new ItemStack(Items.minecart, 1), 'X', new ItemStack(Blocks.tnt, 1, 32767) + }); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.chainmail_helmet, 1), bits_no_remove_buffered | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"RRR", "RhR", 'R', OrePrefixes.ring.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.chainmail_chestplate, 1), bits_no_remove_buffered | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"RhR", "RRR", "RRR", 'R', OrePrefixes.ring.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.chainmail_leggings, 1), bits_no_remove_buffered | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"RRR", "RhR", "R R", 'R', OrePrefixes.ring.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.chainmail_boots, 1), bits_no_remove_buffered | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{"R R", "RhR", 'R', OrePrefixes.ring.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe( + new ItemStack(Items.chainmail_helmet, 1), + bits_no_remove_buffered + | GT_ModHandler.RecipeBits.REVERSIBLE + | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, + new Object[] {"RRR", "RhR", 'R', OrePrefixes.ring.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe( + new ItemStack(Items.chainmail_chestplate, 1), + bits_no_remove_buffered + | GT_ModHandler.RecipeBits.REVERSIBLE + | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, + new Object[] {"RhR", "RRR", "RRR", 'R', OrePrefixes.ring.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe( + new ItemStack(Items.chainmail_leggings, 1), + bits_no_remove_buffered + | GT_ModHandler.RecipeBits.REVERSIBLE + | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, + new Object[] {"RRR", "RhR", "R R", 'R', OrePrefixes.ring.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe( + new ItemStack(Items.chainmail_boots, 1), + bits_no_remove_buffered + | GT_ModHandler.RecipeBits.REVERSIBLE + | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, + new Object[] {"R R", "RhR", 'R', OrePrefixes.ring.get(Materials.Steel)}); GT_Log.out.println("GT_Mod: Adding Wool and Color releated Recipes."); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 1), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeOrange}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 2), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeMagenta}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 3), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeLightBlue}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 4), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeYellow}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 5), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeLime}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 6), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyePink}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 7), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeGray}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 8), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeLightGray}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 9), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeCyan}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 10), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyePurple}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 11), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeBlue}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 12), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeBrown}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 13), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeGreen}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 14), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeRed}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Blocks.wool, 1, 15), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.wool, 1, 0), Dyes.dyeBlack}); - - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.stained_glass, 8, 0), bits_no_remove_buffered, new Object[]{"GGG", "GDG", "GGG", 'G', new ItemStack(Blocks.glass, 1), 'D', Dyes.dyeWhite}); + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Blocks.wool, 1, 1), + bits_no_remove_buffered, + new Object[] {new ItemStack(Blocks.wool, 1, 0), Dyes.dyeOrange}); + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Blocks.wool, 1, 2), + bits_no_remove_buffered, + new Object[] {new ItemStack(Blocks.wool, 1, 0), Dyes.dyeMagenta}); + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Blocks.wool, 1, 3), + bits_no_remove_buffered, + new Object[] {new ItemStack(Blocks.wool, 1, 0), Dyes.dyeLightBlue}); + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Blocks.wool, 1, 4), + bits_no_remove_buffered, + new Object[] {new ItemStack(Blocks.wool, 1, 0), Dyes.dyeYellow}); + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Blocks.wool, 1, 5), + bits_no_remove_buffered, + new Object[] {new ItemStack(Blocks.wool, 1, 0), Dyes.dyeLime}); + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Blocks.wool, 1, 6), + bits_no_remove_buffered, + new Object[] {new ItemStack(Blocks.wool, 1, 0), Dyes.dyePink}); + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Blocks.wool, 1, 7), + bits_no_remove_buffered, + new Object[] {new ItemStack(Blocks.wool, 1, 0), Dyes.dyeGray}); + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Blocks.wool, 1, 8), + bits_no_remove_buffered, + new Object[] {new ItemStack(Blocks.wool, 1, 0), Dyes.dyeLightGray}); + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Blocks.wool, 1, 9), + bits_no_remove_buffered, + new Object[] {new ItemStack(Blocks.wool, 1, 0), Dyes.dyeCyan}); + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Blocks.wool, 1, 10), + bits_no_remove_buffered, + new Object[] {new ItemStack(Blocks.wool, 1, 0), Dyes.dyePurple}); + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Blocks.wool, 1, 11), + bits_no_remove_buffered, + new Object[] {new ItemStack(Blocks.wool, 1, 0), Dyes.dyeBlue}); + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Blocks.wool, 1, 12), + bits_no_remove_buffered, + new Object[] {new ItemStack(Blocks.wool, 1, 0), Dyes.dyeBrown}); + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Blocks.wool, 1, 13), + bits_no_remove_buffered, + new Object[] {new ItemStack(Blocks.wool, 1, 0), Dyes.dyeGreen}); + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Blocks.wool, 1, 14), + bits_no_remove_buffered, + new Object[] {new ItemStack(Blocks.wool, 1, 0), Dyes.dyeRed}); + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Blocks.wool, 1, 15), + bits_no_remove_buffered, + new Object[] {new ItemStack(Blocks.wool, 1, 0), Dyes.dyeBlack}); + + GT_ModHandler.addCraftingRecipe( + new ItemStack(Blocks.stained_glass, 8, 0), + bits_no_remove_buffered, + new Object[] {"GGG", "GDG", "GGG", 'G', new ItemStack(Blocks.glass, 1), 'D', Dyes.dyeWhite}); GT_Log.out.println("GT_Mod: Putting a Potato on a Stick."); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Packaged_PotatoChips.get(1L), bits_no_remove_buffered, new Object[]{OrePrefixes.foil.get(Materials.Aluminium), ItemList.Food_PotatoChips}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Packaged_ChiliChips.get(1L), bits_no_remove_buffered, new Object[]{OrePrefixes.foil.get(Materials.Aluminium), ItemList.Food_ChiliChips}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Packaged_Fries.get(1L), bits_no_remove_buffered, new Object[]{OrePrefixes.plateDouble.get(Materials.Paper), ItemList.Food_Fries}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Chum_On_Stick.get(1L), bits_no_remove_buffered, new Object[]{OrePrefixes.stick.get(Materials.Wood), ItemList.Food_Chum}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Potato_On_Stick.get(1L), bits_no_remove_buffered, new Object[]{OrePrefixes.stick.get(Materials.Wood), ItemList.Food_Raw_Potato}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Potato_On_Stick_Roasted.get(1L), bits_no_remove_buffered, new Object[]{OrePrefixes.stick.get(Materials.Wood), ItemList.Food_Baked_Potato}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Dough.get(1L), bits_no_remove_buffered, new Object[]{OrePrefixes.bucket.get(Materials.Water), OrePrefixes.dust.get(Materials.Wheat)}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Dough_Sugar.get(2L), bits_no_remove_buffered, new Object[]{"foodDough", OrePrefixes.dust.get(Materials.Sugar)}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Dough_Chocolate.get(2L), bits_no_remove_buffered, new Object[]{"foodDough", OrePrefixes.dust.get(Materials.Cocoa)}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Dough_Chocolate.get(2L), bits_no_remove_buffered, new Object[]{"foodDough", OrePrefixes.dust.get(Materials.Chocolate)}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Flat_Dough.get(1L), bits_no_remove_buffered, new Object[]{"foodDough", ToolDictNames.craftingToolRollingPin}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Raw_Bun.get(1L), bits_no_remove_buffered, new Object[]{"foodDough"}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Raw_Bread.get(1L), bits_no_remove_buffered, new Object[]{"foodDough", "foodDough"}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Raw_Baguette.get(1L), bits_no_remove_buffered, new Object[]{"foodDough", "foodDough", "foodDough"}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Raw_Cake.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Dough_Sugar, ItemList.Food_Dough_Sugar, ItemList.Food_Dough_Sugar, ItemList.Food_Dough_Sugar}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_ChiliChips.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_PotatoChips, OrePrefixes.dust.get(Materials.Chili)}); - - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sliced_Buns.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Bun, ItemList.Food_Sliced_Bun}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sliced_Breads.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Bread, ItemList.Food_Sliced_Bread}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sliced_Baguettes.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Baguette, ItemList.Food_Sliced_Baguette}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sliced_Bun.get(2L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Buns}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sliced_Bread.get(2L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Breads}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sliced_Baguette.get(2L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Baguettes}); - - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Burger_Veggie.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Buns, ItemList.Food_Sliced_Cucumber, ItemList.Food_Sliced_Tomato, ItemList.Food_Sliced_Onion}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Burger_Cheese.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Buns, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Burger_Meat.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Buns, OrePrefixes.dust.get(Materials.MeatCooked)}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Burger_Chum.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Buns, ItemList.Food_Chum}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Burger_Veggie.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Bun, ItemList.Food_Sliced_Bun, ItemList.Food_Sliced_Cucumber, ItemList.Food_Sliced_Tomato, ItemList.Food_Sliced_Onion}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Burger_Cheese.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Bun, ItemList.Food_Sliced_Bun, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Burger_Meat.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Bun, ItemList.Food_Sliced_Bun, OrePrefixes.dust.get(Materials.MeatCooked)}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Burger_Chum.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Bun, ItemList.Food_Sliced_Bun, ItemList.Food_Chum}); - - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sandwich_Veggie.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Breads, ItemList.Food_Sliced_Cucumber, ItemList.Food_Sliced_Cucumber, ItemList.Food_Sliced_Tomato, ItemList.Food_Sliced_Tomato, ItemList.Food_Sliced_Onion}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sandwich_Cheese.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Breads, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sandwich_Bacon.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Breads, new ItemStack(Items.cooked_porkchop, 1)}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sandwich_Steak.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Breads, new ItemStack(Items.cooked_beef, 1)}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sandwich_Veggie.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Bread, ItemList.Food_Sliced_Bread, ItemList.Food_Sliced_Cucumber, ItemList.Food_Sliced_Cucumber, ItemList.Food_Sliced_Tomato, ItemList.Food_Sliced_Tomato, ItemList.Food_Sliced_Onion}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sandwich_Cheese.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Bread, ItemList.Food_Sliced_Bread, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sandwich_Bacon.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Bread, ItemList.Food_Sliced_Bread, new ItemStack(Items.cooked_porkchop, 1)}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Sandwich_Steak.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Bread, ItemList.Food_Sliced_Bread, new ItemStack(Items.cooked_beef, 1)}); - - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Large_Sandwich_Veggie.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Baguettes, ItemList.Food_Sliced_Cucumber, ItemList.Food_Sliced_Cucumber, ItemList.Food_Sliced_Cucumber, ItemList.Food_Sliced_Tomato, ItemList.Food_Sliced_Tomato, ItemList.Food_Sliced_Tomato, ItemList.Food_Sliced_Onion}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Large_Sandwich_Cheese.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Baguettes, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Large_Sandwich_Bacon.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Baguettes, new ItemStack(Items.cooked_porkchop, 1), new ItemStack(Items.cooked_porkchop, 1)}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Large_Sandwich_Steak.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Baguettes, new ItemStack(Items.cooked_beef, 1), new ItemStack(Items.cooked_beef, 1)}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Large_Sandwich_Veggie.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Baguette, ItemList.Food_Sliced_Baguette, ItemList.Food_Sliced_Cucumber, ItemList.Food_Sliced_Cucumber, ItemList.Food_Sliced_Cucumber, ItemList.Food_Sliced_Tomato, ItemList.Food_Sliced_Tomato, ItemList.Food_Sliced_Tomato, ItemList.Food_Sliced_Onion}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Large_Sandwich_Cheese.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Baguette, ItemList.Food_Sliced_Baguette, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Large_Sandwich_Bacon.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Baguette, ItemList.Food_Sliced_Baguette, new ItemStack(Items.cooked_porkchop, 1), new ItemStack(Items.cooked_porkchop, 1)}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Large_Sandwich_Steak.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Sliced_Baguette, ItemList.Food_Sliced_Baguette, new ItemStack(Items.cooked_beef, 1), new ItemStack(Items.cooked_beef, 1)}); - - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Raw_Pizza_Veggie.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Flat_Dough, ItemList.Food_Sliced_Cucumber, ItemList.Food_Sliced_Tomato, ItemList.Food_Sliced_Onion}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Raw_Pizza_Cheese.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Flat_Dough, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese, ItemList.Food_Sliced_Cheese}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Raw_Pizza_Meat.get(1L), bits_no_remove_buffered, new Object[]{ItemList.Food_Flat_Dough, OrePrefixes.dust.get(Materials.MeatCooked)}); - - GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Cheese.get(4L), bits_no_remove_buffered, new Object[]{"kX", 'X', "foodCheese"}); - GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Lemon.get(4L), bits_no_remove_buffered, new Object[]{"kX", 'X', "cropLemon"}); - GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Tomato.get(4L), bits_no_remove_buffered, new Object[]{"kX", 'X', "cropTomato"}); - GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Onion.get(4L), bits_no_remove_buffered, new Object[]{"kX", 'X', "cropOnion"}); - GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Cucumber.get(4L), bits_no_remove_buffered, new Object[]{"kX", 'X', "cropCucumber"}); - GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Bun.get(2L), bits_no_remove_buffered, new Object[]{"kX", 'X', ItemList.Food_Baked_Bun}); - GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Bread.get(2L), bits_no_remove_buffered, new Object[]{"kX", 'X', ItemList.Food_Baked_Bread}); - GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Baguette.get(2L), bits_no_remove_buffered, new Object[]{"kX", 'X', ItemList.Food_Baked_Baguette}); - GT_ModHandler.addCraftingRecipe(ItemList.Food_Raw_PotatoChips.get(1L), bits_no_remove_buffered, new Object[]{"kX", 'X', "cropPotato"}); - GT_ModHandler.addCraftingRecipe(ItemList.Food_Raw_Cookie.get(4L), bits_no_remove_buffered, new Object[]{"kX", 'X', ItemList.Food_Dough_Chocolate}); - - GT_ModHandler.addCraftingRecipe(ItemList.Food_Raw_Fries.get(1L), bits_no_remove_buffered, new Object[]{"k", "X", 'X', "cropPotato"}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.bowl, 1), bits_no_remove_buffered, new Object[]{"k", "X", 'X', OrePrefixes.plank.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Rubber, 1L), bits_no_remove_buffered, new Object[]{"k", "X", 'X', OrePrefixes.plate.get(Materials.Rubber)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadArrow, Materials.Flint, 1L), bits_no_remove_buffered, new Object[]{"f", "X", 'X', new ItemStack(Items.flint, 1, 32767)}); - - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.arrow, 1), bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, new Object[]{" H", " S ", "F ", 'H', new ItemStack(Items.flint, 1, 32767), 'S', OrePrefixes.stick.get(Materials.Wood), 'F', OreDictNames.craftingFeather}); - - GT_ModHandler.removeRecipe(new ItemStack(Blocks.planks), null, new ItemStack(Blocks.planks), null, new ItemStack(Blocks.planks)); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Packaged_PotatoChips.get(1L), + bits_no_remove_buffered, + new Object[] {OrePrefixes.foil.get(Materials.Aluminium), ItemList.Food_PotatoChips}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Packaged_ChiliChips.get(1L), + bits_no_remove_buffered, + new Object[] {OrePrefixes.foil.get(Materials.Aluminium), ItemList.Food_ChiliChips}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Packaged_Fries.get(1L), + bits_no_remove_buffered, + new Object[] {OrePrefixes.plateDouble.get(Materials.Paper), ItemList.Food_Fries}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Chum_On_Stick.get(1L), + bits_no_remove_buffered, + new Object[] {OrePrefixes.stick.get(Materials.Wood), ItemList.Food_Chum}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Potato_On_Stick.get(1L), + bits_no_remove_buffered, + new Object[] {OrePrefixes.stick.get(Materials.Wood), ItemList.Food_Raw_Potato}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Potato_On_Stick_Roasted.get(1L), + bits_no_remove_buffered, + new Object[] {OrePrefixes.stick.get(Materials.Wood), ItemList.Food_Baked_Potato}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Dough.get(1L), bits_no_remove_buffered, new Object[] { + OrePrefixes.bucket.get(Materials.Water), OrePrefixes.dust.get(Materials.Wheat) + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Dough_Sugar.get(2L), + bits_no_remove_buffered, + new Object[] {"foodDough", OrePrefixes.dust.get(Materials.Sugar)}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Dough_Chocolate.get(2L), + bits_no_remove_buffered, + new Object[] {"foodDough", OrePrefixes.dust.get(Materials.Cocoa)}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Dough_Chocolate.get(2L), + bits_no_remove_buffered, + new Object[] {"foodDough", OrePrefixes.dust.get(Materials.Chocolate)}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Flat_Dough.get(1L), + bits_no_remove_buffered, + new Object[] {"foodDough", ToolDictNames.craftingToolRollingPin}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Raw_Bun.get(1L), bits_no_remove_buffered, new Object[] {"foodDough"}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Raw_Bread.get(1L), bits_no_remove_buffered, new Object[] {"foodDough", "foodDough"}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Raw_Baguette.get(1L), + bits_no_remove_buffered, + new Object[] {"foodDough", "foodDough", "foodDough"}); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Food_Raw_Cake.get(1L), bits_no_remove_buffered, new Object[] { + ItemList.Food_Dough_Sugar, ItemList.Food_Dough_Sugar, ItemList.Food_Dough_Sugar, ItemList.Food_Dough_Sugar + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_ChiliChips.get(1L), + bits_no_remove_buffered, + new Object[] {ItemList.Food_PotatoChips, OrePrefixes.dust.get(Materials.Chili)}); + + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Sliced_Buns.get(1L), + bits_no_remove_buffered, + new Object[] {ItemList.Food_Sliced_Bun, ItemList.Food_Sliced_Bun}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Sliced_Breads.get(1L), + bits_no_remove_buffered, + new Object[] {ItemList.Food_Sliced_Bread, ItemList.Food_Sliced_Bread}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Sliced_Baguettes.get(1L), + bits_no_remove_buffered, + new Object[] {ItemList.Food_Sliced_Baguette, ItemList.Food_Sliced_Baguette}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Sliced_Bun.get(2L), bits_no_remove_buffered, new Object[] {ItemList.Food_Sliced_Buns}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Sliced_Bread.get(2L), bits_no_remove_buffered, new Object[] {ItemList.Food_Sliced_Breads + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Sliced_Baguette.get(2L), + bits_no_remove_buffered, + new Object[] {ItemList.Food_Sliced_Baguettes}); + + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Burger_Veggie.get(1L), bits_no_remove_buffered, new Object[] { + ItemList.Food_Sliced_Buns, + ItemList.Food_Sliced_Cucumber, + ItemList.Food_Sliced_Tomato, + ItemList.Food_Sliced_Onion + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Burger_Cheese.get(1L), bits_no_remove_buffered, new Object[] { + ItemList.Food_Sliced_Buns, + ItemList.Food_Sliced_Cheese, + ItemList.Food_Sliced_Cheese, + ItemList.Food_Sliced_Cheese + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Burger_Meat.get(1L), + bits_no_remove_buffered, + new Object[] {ItemList.Food_Sliced_Buns, OrePrefixes.dust.get(Materials.MeatCooked)}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Burger_Chum.get(1L), + bits_no_remove_buffered, + new Object[] {ItemList.Food_Sliced_Buns, ItemList.Food_Chum}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Burger_Veggie.get(1L), bits_no_remove_buffered, new Object[] { + ItemList.Food_Sliced_Bun, + ItemList.Food_Sliced_Bun, + ItemList.Food_Sliced_Cucumber, + ItemList.Food_Sliced_Tomato, + ItemList.Food_Sliced_Onion + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Burger_Cheese.get(1L), bits_no_remove_buffered, new Object[] { + ItemList.Food_Sliced_Bun, + ItemList.Food_Sliced_Bun, + ItemList.Food_Sliced_Cheese, + ItemList.Food_Sliced_Cheese, + ItemList.Food_Sliced_Cheese + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Burger_Meat.get(1L), bits_no_remove_buffered, new Object[] { + ItemList.Food_Sliced_Bun, ItemList.Food_Sliced_Bun, OrePrefixes.dust.get(Materials.MeatCooked) + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Burger_Chum.get(1L), + bits_no_remove_buffered, + new Object[] {ItemList.Food_Sliced_Bun, ItemList.Food_Sliced_Bun, ItemList.Food_Chum}); + + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Sandwich_Veggie.get(1L), bits_no_remove_buffered, new Object[] { + ItemList.Food_Sliced_Breads, + ItemList.Food_Sliced_Cucumber, + ItemList.Food_Sliced_Cucumber, + ItemList.Food_Sliced_Tomato, + ItemList.Food_Sliced_Tomato, + ItemList.Food_Sliced_Onion + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Sandwich_Cheese.get(1L), bits_no_remove_buffered, new Object[] { + ItemList.Food_Sliced_Breads, + ItemList.Food_Sliced_Cheese, + ItemList.Food_Sliced_Cheese, + ItemList.Food_Sliced_Cheese, + ItemList.Food_Sliced_Cheese, + ItemList.Food_Sliced_Cheese + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Sandwich_Bacon.get(1L), + bits_no_remove_buffered, + new Object[] {ItemList.Food_Sliced_Breads, new ItemStack(Items.cooked_porkchop, 1)}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Sandwich_Steak.get(1L), + bits_no_remove_buffered, + new Object[] {ItemList.Food_Sliced_Breads, new ItemStack(Items.cooked_beef, 1)}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Sandwich_Veggie.get(1L), bits_no_remove_buffered, new Object[] { + ItemList.Food_Sliced_Bread, + ItemList.Food_Sliced_Bread, + ItemList.Food_Sliced_Cucumber, + ItemList.Food_Sliced_Cucumber, + ItemList.Food_Sliced_Tomato, + ItemList.Food_Sliced_Tomato, + ItemList.Food_Sliced_Onion + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Sandwich_Cheese.get(1L), bits_no_remove_buffered, new Object[] { + ItemList.Food_Sliced_Bread, + ItemList.Food_Sliced_Bread, + ItemList.Food_Sliced_Cheese, + ItemList.Food_Sliced_Cheese, + ItemList.Food_Sliced_Cheese, + ItemList.Food_Sliced_Cheese, + ItemList.Food_Sliced_Cheese + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Sandwich_Bacon.get(1L), bits_no_remove_buffered, new Object[] { + ItemList.Food_Sliced_Bread, ItemList.Food_Sliced_Bread, new ItemStack(Items.cooked_porkchop, 1) + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Sandwich_Steak.get(1L), bits_no_remove_buffered, new Object[] { + ItemList.Food_Sliced_Bread, ItemList.Food_Sliced_Bread, new ItemStack(Items.cooked_beef, 1) + }); + + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Large_Sandwich_Veggie.get(1L), bits_no_remove_buffered, new Object[] { + ItemList.Food_Sliced_Baguettes, + ItemList.Food_Sliced_Cucumber, + ItemList.Food_Sliced_Cucumber, + ItemList.Food_Sliced_Cucumber, + ItemList.Food_Sliced_Tomato, + ItemList.Food_Sliced_Tomato, + ItemList.Food_Sliced_Tomato, + ItemList.Food_Sliced_Onion + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Large_Sandwich_Cheese.get(1L), bits_no_remove_buffered, new Object[] { + ItemList.Food_Sliced_Baguettes, + ItemList.Food_Sliced_Cheese, + ItemList.Food_Sliced_Cheese, + ItemList.Food_Sliced_Cheese, + ItemList.Food_Sliced_Cheese, + ItemList.Food_Sliced_Cheese, + ItemList.Food_Sliced_Cheese, + ItemList.Food_Sliced_Cheese + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Large_Sandwich_Bacon.get(1L), bits_no_remove_buffered, new Object[] { + ItemList.Food_Sliced_Baguettes, + new ItemStack(Items.cooked_porkchop, 1), + new ItemStack(Items.cooked_porkchop, 1) + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Large_Sandwich_Steak.get(1L), bits_no_remove_buffered, new Object[] { + ItemList.Food_Sliced_Baguettes, + new ItemStack(Items.cooked_beef, 1), + new ItemStack(Items.cooked_beef, 1) + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Large_Sandwich_Veggie.get(1L), bits_no_remove_buffered, new Object[] { + ItemList.Food_Sliced_Baguette, + ItemList.Food_Sliced_Baguette, + ItemList.Food_Sliced_Cucumber, + ItemList.Food_Sliced_Cucumber, + ItemList.Food_Sliced_Cucumber, + ItemList.Food_Sliced_Tomato, + ItemList.Food_Sliced_Tomato, + ItemList.Food_Sliced_Tomato, + ItemList.Food_Sliced_Onion + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Large_Sandwich_Cheese.get(1L), bits_no_remove_buffered, new Object[] { + ItemList.Food_Sliced_Baguette, + ItemList.Food_Sliced_Baguette, + ItemList.Food_Sliced_Cheese, + ItemList.Food_Sliced_Cheese, + ItemList.Food_Sliced_Cheese, + ItemList.Food_Sliced_Cheese, + ItemList.Food_Sliced_Cheese, + ItemList.Food_Sliced_Cheese, + ItemList.Food_Sliced_Cheese + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Large_Sandwich_Bacon.get(1L), bits_no_remove_buffered, new Object[] { + ItemList.Food_Sliced_Baguette, + ItemList.Food_Sliced_Baguette, + new ItemStack(Items.cooked_porkchop, 1), + new ItemStack(Items.cooked_porkchop, 1) + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Large_Sandwich_Steak.get(1L), bits_no_remove_buffered, new Object[] { + ItemList.Food_Sliced_Baguette, + ItemList.Food_Sliced_Baguette, + new ItemStack(Items.cooked_beef, 1), + new ItemStack(Items.cooked_beef, 1) + }); + + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Raw_Pizza_Veggie.get(1L), bits_no_remove_buffered, new Object[] { + ItemList.Food_Flat_Dough, + ItemList.Food_Sliced_Cucumber, + ItemList.Food_Sliced_Tomato, + ItemList.Food_Sliced_Onion + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Raw_Pizza_Cheese.get(1L), bits_no_remove_buffered, new Object[] { + ItemList.Food_Flat_Dough, + ItemList.Food_Sliced_Cheese, + ItemList.Food_Sliced_Cheese, + ItemList.Food_Sliced_Cheese + }); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Food_Raw_Pizza_Meat.get(1L), + bits_no_remove_buffered, + new Object[] {ItemList.Food_Flat_Dough, OrePrefixes.dust.get(Materials.MeatCooked)}); + + GT_ModHandler.addCraftingRecipe( + ItemList.Food_Sliced_Cheese.get(4L), bits_no_remove_buffered, new Object[] {"kX", 'X', "foodCheese"}); + GT_ModHandler.addCraftingRecipe( + ItemList.Food_Sliced_Lemon.get(4L), bits_no_remove_buffered, new Object[] {"kX", 'X', "cropLemon"}); + GT_ModHandler.addCraftingRecipe( + ItemList.Food_Sliced_Tomato.get(4L), bits_no_remove_buffered, new Object[] {"kX", 'X', "cropTomato"}); + GT_ModHandler.addCraftingRecipe( + ItemList.Food_Sliced_Onion.get(4L), bits_no_remove_buffered, new Object[] {"kX", 'X', "cropOnion"}); + GT_ModHandler.addCraftingRecipe( + ItemList.Food_Sliced_Cucumber.get(4L), bits_no_remove_buffered, new Object[] {"kX", 'X', "cropCucumber" + }); + GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Bun.get(2L), bits_no_remove_buffered, new Object[] { + "kX", 'X', ItemList.Food_Baked_Bun + }); + GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Bread.get(2L), bits_no_remove_buffered, new Object[] { + "kX", 'X', ItemList.Food_Baked_Bread + }); + GT_ModHandler.addCraftingRecipe(ItemList.Food_Sliced_Baguette.get(2L), bits_no_remove_buffered, new Object[] { + "kX", 'X', ItemList.Food_Baked_Baguette + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Food_Raw_PotatoChips.get(1L), bits_no_remove_buffered, new Object[] {"kX", 'X', "cropPotato"}); + GT_ModHandler.addCraftingRecipe(ItemList.Food_Raw_Cookie.get(4L), bits_no_remove_buffered, new Object[] { + "kX", 'X', ItemList.Food_Dough_Chocolate + }); + + GT_ModHandler.addCraftingRecipe( + ItemList.Food_Raw_Fries.get(1L), bits_no_remove_buffered, new Object[] {"k", "X", 'X', "cropPotato"}); + GT_ModHandler.addCraftingRecipe(new ItemStack(Items.bowl, 1), bits_no_remove_buffered, new Object[] { + "k", "X", 'X', OrePrefixes.plank.get(Materials.Wood) + }); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Rubber, 1L), + bits_no_remove_buffered, + new Object[] {"k", "X", 'X', OrePrefixes.plate.get(Materials.Rubber)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadArrow, Materials.Flint, 1L), + bits_no_remove_buffered, + new Object[] {"f", "X", 'X', new ItemStack(Items.flint, 1, 32767)}); + + GT_ModHandler.addCraftingRecipe( + new ItemStack(Items.arrow, 1), + bits_no_remove_buffered | GT_ModHandler.RecipeBits.DELETE_ALL_OTHER_SHAPED_RECIPES, + new Object[] { + " H", + " S ", + "F ", + 'H', + new ItemStack(Items.flint, 1, 32767), + 'S', + OrePrefixes.stick.get(Materials.Wood), + 'F', + OreDictNames.craftingFeather + }); + + GT_ModHandler.removeRecipe( + new ItemStack(Blocks.planks), null, new ItemStack(Blocks.planks), null, new ItemStack(Blocks.planks)); GT_ModHandler.removeRecipeByOutputDelayed(ItemList.Food_Baked_Bread.get(1L)); GT_ModHandler.removeRecipeByOutputDelayed(new ItemStack(Items.cookie, 1)); - GT_ModHandler.removeRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Copper, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Copper, 1L)); - if (null != GT_Utility.setStack(GT_ModHandler.getRecipeOutput(true, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Copper, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Copper, 1L), null, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Copper, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L)), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Bronze, GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "bronzeingotcrafting", true) ? 1L : 2L))) { + GT_ModHandler.removeRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Copper, 1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Copper, 1L)); + if (null + != GT_Utility.setStack( + GT_ModHandler.getRecipeOutput( + true, + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Copper, 1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Copper, 1L), + null, + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Copper, 1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L)), + GT_OreDictUnificator.get( + OrePrefixes.ingot, + Materials.Bronze, + GregTech_API.sRecipeFile.get( + ConfigCategories.Recipes.disabledrecipes, "bronzeingotcrafting", true) + ? 1L + : 2L))) { GT_Log.out.println("GT_Mod: Changed Forestrys Bronze Recipe"); } if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "enchantmenttable", false)) { - GT_Log.out.println("GT_Mod: Removing the Recipe of the Enchantment Table, to have more Fun at enchanting with the Anvil and Books from Dungeons."); + GT_Log.out.println( + "GT_Mod: Removing the Recipe of the Enchantment Table, to have more Fun at enchanting with the Anvil and Books from Dungeons."); GT_ModHandler.removeRecipeByOutputDelayed(new ItemStack(Blocks.enchanting_table, 1)); } if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "enderchest", false)) { @@ -273,253 +844,1778 @@ public class GT_CraftingRecipeLoader implements Runnable { } tStack = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 1L); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getRecipeOutput(null, new ItemStack(Blocks.sand, 1, 0), null, null, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Apatite, 1L), null, null, new ItemStack(Blocks.sand, 1, 0), null), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"S", "A", "S", 'A', OrePrefixes.dust.get(Materials.Apatite), 'S', new ItemStack(Blocks.sand, 1, 32767)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getRecipeOutput(tStack, tStack, tStack, tStack, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Apatite, 1L), tStack, tStack, tStack, tStack), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SSS", "SAS", "SSS", 'A', OrePrefixes.dust.get(Materials.Apatite), 'S', OrePrefixes.dust.get(Materials.Ash)}); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getRecipeOutput( + null, + new ItemStack(Blocks.sand, 1, 0), + null, + null, + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Apatite, 1L), + null, + null, + new ItemStack(Blocks.sand, 1, 0), + null), + GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "S", + "A", + "S", + 'A', + OrePrefixes.dust.get(Materials.Apatite), + 'S', + new ItemStack(Blocks.sand, 1, 32767) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getRecipeOutput( + tStack, + tStack, + tStack, + tStack, + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Apatite, 1L), + tStack, + tStack, + tStack, + tStack), + GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "SSS", + "SAS", + "SSS", + 'A', + OrePrefixes.dust.get(Materials.Apatite), + 'S', + OrePrefixes.dust.get(Materials.Ash) + }); GT_Log.out.println("GT_Mod: Adding Mixed Metal Ingot Recipes."); GT_ModHandler.removeRecipeByOutputDelayed(ItemList.IC2_Mixed_Metal_Ingot.get(1L)); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.AnyIron), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.AnyIron), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.AnyIron), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.AnyIron), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.AnyIron), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.AnyIron), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); - - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Nickel), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Nickel), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Nickel), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Nickel), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Nickel), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Nickel), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); - - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(2L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Invar), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(2L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Invar), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Invar), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(2L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Invar), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(2L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Invar), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Invar), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); - - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(2L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Steel), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(2L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Steel), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Steel), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(2L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Steel), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(2L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Steel), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Steel), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); - - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.StainlessSteel), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.StainlessSteel), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(4L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.StainlessSteel), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.StainlessSteel), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.StainlessSteel), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(4L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.StainlessSteel), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); - - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Titanium), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Titanium), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(4L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Titanium), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Titanium), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Titanium), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(4L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Titanium), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); - - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Tungsten), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Tungsten), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(4L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Tungsten), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Tungsten), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Tungsten), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(4L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Tungsten), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); - - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(5L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.TungstenSteel), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(5L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.TungstenSteel), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(6L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.TungstenSteel), 'Y', OrePrefixes.plate.get(Materials.Bronze), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(5L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.TungstenSteel), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(5L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.TungstenSteel), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(6L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.TungstenSteel), 'Y', OrePrefixes.plate.get(Materials.Brass), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); - - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(8L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.TungstenSteel), 'Y', OrePrefixes.plate.get(Materials.Chrome), 'Z', OrePrefixes.plate.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(8L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.TungstenSteel), 'Y', OrePrefixes.plate.get(Materials.Chrome), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(8L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.TungstenSteel), 'Y', OrePrefixes.plate.get(Materials.Chrome), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(10L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.TungstenSteel), 'Y', OrePrefixes.plate.get(Materials.StainlessSteel), 'Z', OrePrefixes.plate.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(10L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.TungstenSteel), 'Y', OrePrefixes.plate.get(Materials.StainlessSteel), 'Z', OrePrefixes.plate.get(Materials.Zinc)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(10L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.TungstenSteel), 'Y', OrePrefixes.plate.get(Materials.StainlessSteel), 'Z', OrePrefixes.plate.get(Materials.Aluminium)}); - - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(12L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Iridium), 'Y', OrePrefixes.plate.get(Materials.Chrome), 'Z', OrePrefixes.plate.get(Materials.AnnealedCopper)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(12L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Iridium), 'Y', OrePrefixes.plate.get(Materials.Chrome), 'Z', OrePrefixes.plate.get(Materials.RoseGold)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(12L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Iridium), 'Y', OrePrefixes.plate.get(Materials.Chrome), 'Z', OrePrefixes.plate.get(Materials.AstralSilver)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(14L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Iridium), 'Y', OrePrefixes.plate.get(Materials.StainlessSteel), 'Z', OrePrefixes.plate.get(Materials.AnnealedCopper)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(14L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Iridium), 'Y', OrePrefixes.plate.get(Materials.StainlessSteel), 'Z', OrePrefixes.plate.get(Materials.RoseGold)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(14L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Iridium), 'Y', OrePrefixes.plate.get(Materials.StainlessSteel), 'Z', OrePrefixes.plate.get(Materials.AstralSilver)}); - - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(16L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.HSSG), 'Y', OrePrefixes.plate.get(Materials.StainlessSteel), 'Z', OrePrefixes.plate.get(Materials.AnnealedCopper)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(16L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.HSSG), 'Y', OrePrefixes.plate.get(Materials.StainlessSteel), 'Z', OrePrefixes.plate.get(Materials.RoseGold)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(16L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.HSSG), 'Y', OrePrefixes.plate.get(Materials.StainlessSteel), 'Z', OrePrefixes.plate.get(Materials.AstralSilver)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(18L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.HSSE), 'Y', OrePrefixes.plate.get(Materials.Chrome), 'Z', OrePrefixes.plate.get(Materials.AnnealedCopper)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(18L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.HSSE), 'Y', OrePrefixes.plate.get(Materials.Chrome), 'Z', OrePrefixes.plate.get(Materials.RoseGold)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(18L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.HSSE), 'Y', OrePrefixes.plate.get(Materials.Chrome), 'Z', OrePrefixes.plate.get(Materials.AstralSilver)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(20L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.HSSS), 'Y', OrePrefixes.plate.get(Materials.TungstenSteel), 'Z', OrePrefixes.plate.get(Materials.AnnealedCopper)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(20L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.HSSS), 'Y', OrePrefixes.plate.get(Materials.TungstenSteel), 'Z', OrePrefixes.plate.get(Materials.RoseGold)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(20L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.HSSS), 'Y', OrePrefixes.plate.get(Materials.TungstenSteel), 'Z', OrePrefixes.plate.get(Materials.AstralSilver)}); - - GT_ModHandler.addCraftingRecipe(ItemList.Long_Distance_Pipeline_Fluid.get(1L),GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"GPG", "IwI", "GPG", 'G', GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Steel, 1L), 'P', GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 1L), 'I', GT_OreDictUnificator.get(OrePrefixes.pipeHuge, Materials.Steel, 1L)}); - GT_ModHandler.addCraftingRecipe(ItemList.Long_Distance_Pipeline_Item.get(1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"GPG", "IwI", "GPG",'G' ,GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Steel, 1L), 'P', GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 1L), 'I', GT_OreDictUnificator.get(OrePrefixes.pipeHuge, Materials.Tin, 1L)}); - GT_ModHandler.addCraftingRecipe(ItemList.Long_Distance_Pipeline_Fluid_Pipe.get(32L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"PPP", "IwI", "PPP", 'P',GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 1L), 'I', GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Steel, 1L)}); - GT_ModHandler.addCraftingRecipe(ItemList.Long_Distance_Pipeline_Item_Pipe.get(32L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"PPP", "IwI", "PPP", 'P',GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 1L), 'I', GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Tin, 1L)}); - - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(22L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Naquadah), 'Y', OrePrefixes.plate.get(Materials.Iridium), 'Z', OrePrefixes.plate.get(Materials.HSSG)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(24L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Naquadah), 'Y', OrePrefixes.plate.get(Materials.Iridium), 'Z', OrePrefixes.plate.get(Materials.HSSE)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(26L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Naquadah), 'Y', OrePrefixes.plate.get(Materials.Iridium), 'Z', OrePrefixes.plate.get(Materials.HSSS)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(28L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.NaquadahAlloy), 'Y', OrePrefixes.plate.get(Materials.Osmiridium), 'Z', OrePrefixes.plate.get(Materials.HSSE)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(30L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.NaquadahAlloy), 'Y', OrePrefixes.plate.get(Materials.Osmiridium), 'Z', OrePrefixes.plate.get(Materials.HSSG)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(32L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.NaquadahAlloy), 'Y', OrePrefixes.plate.get(Materials.Osmiridium), 'Z', OrePrefixes.plate.get(Materials.HSSS)}); - - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(34L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Neutronium), 'Y', OrePrefixes.plate.get(Materials.EnergeticAlloy), 'Z', OrePrefixes.plate.get(Materials.Naquadah)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(36L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Neutronium), 'Y', OrePrefixes.plate.get(Materials.EnergeticAlloy), 'Z', OrePrefixes.plate.get(Materials.NaquadahAlloy)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(38L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.Neutronium), 'Y', OrePrefixes.plate.get(Materials.EnergeticAlloy), 'Z', OrePrefixes.plate.get(Materials.Draconium)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(40L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.BlackPlutonium), 'Y', OrePrefixes.plate.get(Materials.Sunnarium), 'Z', OrePrefixes.plate.get(Materials.Naquadah)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(42L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.BlackPlutonium), 'Y', OrePrefixes.plate.get(Materials.Sunnarium), 'Z', OrePrefixes.plate.get(Materials.NaquadahAlloy)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(44L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.BlackPlutonium), 'Y', OrePrefixes.plate.get(Materials.Sunnarium), 'Z', OrePrefixes.plate.get(Materials.Draconium)}); - - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(48L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.DraconiumAwakened), 'Y', OrePrefixes.plate.get(Materials.Neutronium), 'Z', OrePrefixes.plate.get(Materials.HSSS)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(52L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.DraconiumAwakened), 'Y', OrePrefixes.plate.get(Materials.Neutronium), 'Z', OrePrefixes.plate.get(Materials.Naquadah)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(56L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.DraconiumAwakened), 'Y', OrePrefixes.plate.get(Materials.Neutronium), 'Z', OrePrefixes.plate.get(Materials.NaquadahAlloy)}); - GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(64L), bits_no_remove_buffered, new Object[]{"X", "Y", "Z", 'X', OrePrefixes.plate.get(Materials.DraconiumAwakened), 'Y', OrePrefixes.plate.get(Materials.Neutronium), 'Z', OrePrefixes.plate.get(Materials.BlackPlutonium)}); - - GT_Log.out.println("GT_Mod: Beginning to add regular Crafting Recipes."); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("scaffold", 4L), bits_no_remove_buffered, new Object[]{"WWW", " S ", "S S", 'W', OrePrefixes.plank.get(Materials.Wood), 'S', OrePrefixes.stick.get(Materials.Wood)}); - - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.IronMagnetic, 1L), bits_no_remove_buffered, new Object[]{OrePrefixes.stick.get(Materials.AnyIron), OrePrefixes.dust.get(Materials.Redstone), OrePrefixes.dust.get(Materials.Redstone), OrePrefixes.dust.get(Materials.Redstone), OrePrefixes.dust.get(Materials.Redstone)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Paper, 1L), bits_no_remove_buffered, new Object[]{"PPk", 'P', OrePrefixes.plate.get(Materials.Paper)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.AnyIron), + 'Y', + OrePrefixes.plate.get(Materials.Bronze), + 'Z', + OrePrefixes.plate.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.AnyIron), + 'Y', + OrePrefixes.plate.get(Materials.Bronze), + 'Z', + OrePrefixes.plate.get(Materials.Zinc) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.AnyIron), + 'Y', + OrePrefixes.plate.get(Materials.Bronze), + 'Z', + OrePrefixes.plate.get(Materials.Aluminium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.AnyIron), + 'Y', + OrePrefixes.plate.get(Materials.Brass), + 'Z', + OrePrefixes.plate.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.AnyIron), + 'Y', + OrePrefixes.plate.get(Materials.Brass), + 'Z', + OrePrefixes.plate.get(Materials.Zinc) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.AnyIron), + 'Y', + OrePrefixes.plate.get(Materials.Brass), + 'Z', + OrePrefixes.plate.get(Materials.Aluminium) + }); + + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Nickel), + 'Y', + OrePrefixes.plate.get(Materials.Bronze), + 'Z', + OrePrefixes.plate.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Nickel), + 'Y', + OrePrefixes.plate.get(Materials.Bronze), + 'Z', + OrePrefixes.plate.get(Materials.Zinc) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Nickel), + 'Y', + OrePrefixes.plate.get(Materials.Bronze), + 'Z', + OrePrefixes.plate.get(Materials.Aluminium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Nickel), + 'Y', + OrePrefixes.plate.get(Materials.Brass), + 'Z', + OrePrefixes.plate.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Nickel), + 'Y', + OrePrefixes.plate.get(Materials.Brass), + 'Z', + OrePrefixes.plate.get(Materials.Zinc) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Nickel), + 'Y', + OrePrefixes.plate.get(Materials.Brass), + 'Z', + OrePrefixes.plate.get(Materials.Aluminium) + }); + + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(2L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Invar), + 'Y', + OrePrefixes.plate.get(Materials.Bronze), + 'Z', + OrePrefixes.plate.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(2L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Invar), + 'Y', + OrePrefixes.plate.get(Materials.Bronze), + 'Z', + OrePrefixes.plate.get(Materials.Zinc) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Invar), + 'Y', + OrePrefixes.plate.get(Materials.Bronze), + 'Z', + OrePrefixes.plate.get(Materials.Aluminium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(2L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Invar), + 'Y', + OrePrefixes.plate.get(Materials.Brass), + 'Z', + OrePrefixes.plate.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(2L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Invar), + 'Y', + OrePrefixes.plate.get(Materials.Brass), + 'Z', + OrePrefixes.plate.get(Materials.Zinc) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Invar), + 'Y', + OrePrefixes.plate.get(Materials.Brass), + 'Z', + OrePrefixes.plate.get(Materials.Aluminium) + }); + + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(2L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Steel), + 'Y', + OrePrefixes.plate.get(Materials.Bronze), + 'Z', + OrePrefixes.plate.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(2L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Steel), + 'Y', + OrePrefixes.plate.get(Materials.Bronze), + 'Z', + OrePrefixes.plate.get(Materials.Zinc) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Steel), + 'Y', + OrePrefixes.plate.get(Materials.Bronze), + 'Z', + OrePrefixes.plate.get(Materials.Aluminium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(2L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Steel), + 'Y', + OrePrefixes.plate.get(Materials.Brass), + 'Z', + OrePrefixes.plate.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(2L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Steel), + 'Y', + OrePrefixes.plate.get(Materials.Brass), + 'Z', + OrePrefixes.plate.get(Materials.Zinc) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Steel), + 'Y', + OrePrefixes.plate.get(Materials.Brass), + 'Z', + OrePrefixes.plate.get(Materials.Aluminium) + }); + + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'Y', + OrePrefixes.plate.get(Materials.Bronze), + 'Z', + OrePrefixes.plate.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'Y', + OrePrefixes.plate.get(Materials.Bronze), + 'Z', + OrePrefixes.plate.get(Materials.Zinc) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(4L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'Y', + OrePrefixes.plate.get(Materials.Bronze), + 'Z', + OrePrefixes.plate.get(Materials.Aluminium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'Y', + OrePrefixes.plate.get(Materials.Brass), + 'Z', + OrePrefixes.plate.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'Y', + OrePrefixes.plate.get(Materials.Brass), + 'Z', + OrePrefixes.plate.get(Materials.Zinc) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(4L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'Y', + OrePrefixes.plate.get(Materials.Brass), + 'Z', + OrePrefixes.plate.get(Materials.Aluminium) + }); + + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Titanium), + 'Y', + OrePrefixes.plate.get(Materials.Bronze), + 'Z', + OrePrefixes.plate.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Titanium), + 'Y', + OrePrefixes.plate.get(Materials.Bronze), + 'Z', + OrePrefixes.plate.get(Materials.Zinc) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(4L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Titanium), + 'Y', + OrePrefixes.plate.get(Materials.Bronze), + 'Z', + OrePrefixes.plate.get(Materials.Aluminium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Titanium), + 'Y', + OrePrefixes.plate.get(Materials.Brass), + 'Z', + OrePrefixes.plate.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Titanium), + 'Y', + OrePrefixes.plate.get(Materials.Brass), + 'Z', + OrePrefixes.plate.get(Materials.Zinc) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(4L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Titanium), + 'Y', + OrePrefixes.plate.get(Materials.Brass), + 'Z', + OrePrefixes.plate.get(Materials.Aluminium) + }); + + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Tungsten), + 'Y', + OrePrefixes.plate.get(Materials.Bronze), + 'Z', + OrePrefixes.plate.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Tungsten), + 'Y', + OrePrefixes.plate.get(Materials.Bronze), + 'Z', + OrePrefixes.plate.get(Materials.Zinc) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(4L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Tungsten), + 'Y', + OrePrefixes.plate.get(Materials.Bronze), + 'Z', + OrePrefixes.plate.get(Materials.Aluminium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Tungsten), + 'Y', + OrePrefixes.plate.get(Materials.Brass), + 'Z', + OrePrefixes.plate.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(3L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Tungsten), + 'Y', + OrePrefixes.plate.get(Materials.Brass), + 'Z', + OrePrefixes.plate.get(Materials.Zinc) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(4L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Tungsten), + 'Y', + OrePrefixes.plate.get(Materials.Brass), + 'Z', + OrePrefixes.plate.get(Materials.Aluminium) + }); + + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(5L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.TungstenSteel), + 'Y', + OrePrefixes.plate.get(Materials.Bronze), + 'Z', + OrePrefixes.plate.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(5L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.TungstenSteel), + 'Y', + OrePrefixes.plate.get(Materials.Bronze), + 'Z', + OrePrefixes.plate.get(Materials.Zinc) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(6L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.TungstenSteel), + 'Y', + OrePrefixes.plate.get(Materials.Bronze), + 'Z', + OrePrefixes.plate.get(Materials.Aluminium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(5L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.TungstenSteel), + 'Y', + OrePrefixes.plate.get(Materials.Brass), + 'Z', + OrePrefixes.plate.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(5L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.TungstenSteel), + 'Y', + OrePrefixes.plate.get(Materials.Brass), + 'Z', + OrePrefixes.plate.get(Materials.Zinc) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(6L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.TungstenSteel), + 'Y', + OrePrefixes.plate.get(Materials.Brass), + 'Z', + OrePrefixes.plate.get(Materials.Aluminium) + }); + + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(8L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.TungstenSteel), + 'Y', + OrePrefixes.plate.get(Materials.Chrome), + 'Z', + OrePrefixes.plate.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(8L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.TungstenSteel), + 'Y', + OrePrefixes.plate.get(Materials.Chrome), + 'Z', + OrePrefixes.plate.get(Materials.Zinc) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(8L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.TungstenSteel), + 'Y', + OrePrefixes.plate.get(Materials.Chrome), + 'Z', + OrePrefixes.plate.get(Materials.Aluminium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(10L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.TungstenSteel), + 'Y', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'Z', + OrePrefixes.plate.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(10L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.TungstenSteel), + 'Y', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'Z', + OrePrefixes.plate.get(Materials.Zinc) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(10L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.TungstenSteel), + 'Y', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'Z', + OrePrefixes.plate.get(Materials.Aluminium) + }); + + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(12L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Iridium), + 'Y', + OrePrefixes.plate.get(Materials.Chrome), + 'Z', + OrePrefixes.plate.get(Materials.AnnealedCopper) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(12L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Iridium), + 'Y', + OrePrefixes.plate.get(Materials.Chrome), + 'Z', + OrePrefixes.plate.get(Materials.RoseGold) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(12L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Iridium), + 'Y', + OrePrefixes.plate.get(Materials.Chrome), + 'Z', + OrePrefixes.plate.get(Materials.AstralSilver) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(14L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Iridium), + 'Y', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'Z', + OrePrefixes.plate.get(Materials.AnnealedCopper) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(14L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Iridium), + 'Y', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'Z', + OrePrefixes.plate.get(Materials.RoseGold) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(14L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Iridium), + 'Y', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'Z', + OrePrefixes.plate.get(Materials.AstralSilver) + }); + + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(16L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.HSSG), + 'Y', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'Z', + OrePrefixes.plate.get(Materials.AnnealedCopper) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(16L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.HSSG), + 'Y', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'Z', + OrePrefixes.plate.get(Materials.RoseGold) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(16L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.HSSG), + 'Y', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'Z', + OrePrefixes.plate.get(Materials.AstralSilver) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(18L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.HSSE), + 'Y', + OrePrefixes.plate.get(Materials.Chrome), + 'Z', + OrePrefixes.plate.get(Materials.AnnealedCopper) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(18L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.HSSE), + 'Y', + OrePrefixes.plate.get(Materials.Chrome), + 'Z', + OrePrefixes.plate.get(Materials.RoseGold) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(18L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.HSSE), + 'Y', + OrePrefixes.plate.get(Materials.Chrome), + 'Z', + OrePrefixes.plate.get(Materials.AstralSilver) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(20L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.HSSS), + 'Y', + OrePrefixes.plate.get(Materials.TungstenSteel), + 'Z', + OrePrefixes.plate.get(Materials.AnnealedCopper) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(20L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.HSSS), + 'Y', + OrePrefixes.plate.get(Materials.TungstenSteel), + 'Z', + OrePrefixes.plate.get(Materials.RoseGold) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(20L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.HSSS), + 'Y', + OrePrefixes.plate.get(Materials.TungstenSteel), + 'Z', + OrePrefixes.plate.get(Materials.AstralSilver) + }); + + GT_ModHandler.addCraftingRecipe( + ItemList.Long_Distance_Pipeline_Fluid.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + "GPG", + "IwI", + "GPG", + 'G', + GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Steel, 1L), + 'P', + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 1L), + 'I', + GT_OreDictUnificator.get(OrePrefixes.pipeHuge, Materials.Steel, 1L) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Long_Distance_Pipeline_Item.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + "GPG", + "IwI", + "GPG", + 'G', + GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Steel, 1L), + 'P', + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 1L), + 'I', + GT_OreDictUnificator.get(OrePrefixes.pipeHuge, Materials.Tin, 1L) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Long_Distance_Pipeline_Fluid_Pipe.get(32L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + "PPP", + "IwI", + "PPP", + 'P', + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 1L), + 'I', + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Steel, 1L) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Long_Distance_Pipeline_Item_Pipe.get(32L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + "PPP", + "IwI", + "PPP", + 'P', + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 1L), + 'I', + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Tin, 1L) + }); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.torch, 2), bits_no_remove_buffered, new Object[]{"C", "S", 'C', OrePrefixes.dust.get(Materials.Sulfur), 'S', OrePrefixes.stick.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.torch, 6), bits_no_remove_buffered, new Object[]{"C", "S", 'C', OrePrefixes.dust.get(Materials.TricalciumPhosphate), 'S', OrePrefixes.stick.get(Materials.Wood)}); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(22L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Naquadah), + 'Y', + OrePrefixes.plate.get(Materials.Iridium), + 'Z', + OrePrefixes.plate.get(Materials.HSSG) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(24L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Naquadah), + 'Y', + OrePrefixes.plate.get(Materials.Iridium), + 'Z', + OrePrefixes.plate.get(Materials.HSSE) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(26L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Naquadah), + 'Y', + OrePrefixes.plate.get(Materials.Iridium), + 'Z', + OrePrefixes.plate.get(Materials.HSSS) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(28L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.NaquadahAlloy), + 'Y', + OrePrefixes.plate.get(Materials.Osmiridium), + 'Z', + OrePrefixes.plate.get(Materials.HSSE) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(30L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.NaquadahAlloy), + 'Y', + OrePrefixes.plate.get(Materials.Osmiridium), + 'Z', + OrePrefixes.plate.get(Materials.HSSG) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(32L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.NaquadahAlloy), + 'Y', + OrePrefixes.plate.get(Materials.Osmiridium), + 'Z', + OrePrefixes.plate.get(Materials.HSSS) + }); + + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(34L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Neutronium), + 'Y', + OrePrefixes.plate.get(Materials.EnergeticAlloy), + 'Z', + OrePrefixes.plate.get(Materials.Naquadah) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(36L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Neutronium), + 'Y', + OrePrefixes.plate.get(Materials.EnergeticAlloy), + 'Z', + OrePrefixes.plate.get(Materials.NaquadahAlloy) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(38L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.Neutronium), + 'Y', + OrePrefixes.plate.get(Materials.EnergeticAlloy), + 'Z', + OrePrefixes.plate.get(Materials.Draconium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(40L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.BlackPlutonium), + 'Y', + OrePrefixes.plate.get(Materials.Sunnarium), + 'Z', + OrePrefixes.plate.get(Materials.Naquadah) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(42L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.BlackPlutonium), + 'Y', + OrePrefixes.plate.get(Materials.Sunnarium), + 'Z', + OrePrefixes.plate.get(Materials.NaquadahAlloy) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(44L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.BlackPlutonium), + 'Y', + OrePrefixes.plate.get(Materials.Sunnarium), + 'Z', + OrePrefixes.plate.get(Materials.Draconium) + }); + + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(48L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.DraconiumAwakened), + 'Y', + OrePrefixes.plate.get(Materials.Neutronium), + 'Z', + OrePrefixes.plate.get(Materials.HSSS) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(52L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.DraconiumAwakened), + 'Y', + OrePrefixes.plate.get(Materials.Neutronium), + 'Z', + OrePrefixes.plate.get(Materials.Naquadah) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(56L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.DraconiumAwakened), + 'Y', + OrePrefixes.plate.get(Materials.Neutronium), + 'Z', + OrePrefixes.plate.get(Materials.NaquadahAlloy) + }); + GT_ModHandler.addCraftingRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(64L), bits_no_remove_buffered, new Object[] { + "X", + "Y", + "Z", + 'X', + OrePrefixes.plate.get(Materials.DraconiumAwakened), + 'Y', + OrePrefixes.plate.get(Materials.Neutronium), + 'Z', + OrePrefixes.plate.get(Materials.BlackPlutonium) + }); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.piston, 1), bits_no_remove_buffered, new Object[]{"WWW", "CBC", "CRC", 'W', OrePrefixes.plank.get(Materials.Wood), 'C', OrePrefixes.stoneCobble, 'R', OrePrefixes.dust.get(Materials.Redstone), 'B', OrePrefixes.ingot.get(Materials.AnyIron)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.piston, 1), bits_no_remove_buffered, new Object[]{"WWW", "CBC", "CRC", 'W', OrePrefixes.plank.get(Materials.Wood), 'C', OrePrefixes.stoneCobble, 'R', OrePrefixes.dust.get(Materials.Redstone), 'B', OrePrefixes.ingot.get(Materials.AnyBronze)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.piston, 1), bits_no_remove_buffered, new Object[]{"WWW", "CBC", "CRC", 'W', OrePrefixes.plank.get(Materials.Wood), 'C', OrePrefixes.stoneCobble, 'R', OrePrefixes.dust.get(Materials.Redstone), 'B', OrePrefixes.ingot.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.piston, 1), bits_no_remove_buffered, new Object[]{"WWW", "CBC", "CRC", 'W', OrePrefixes.plank.get(Materials.Wood), 'C', OrePrefixes.stoneCobble, 'R', OrePrefixes.dust.get(Materials.Redstone), 'B', OrePrefixes.ingot.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.piston, 1), bits_no_remove_buffered, new Object[]{"WWW", "CBC", "CRC", 'W', OrePrefixes.plank.get(Materials.Wood), 'C', OrePrefixes.stoneCobble, 'R', OrePrefixes.dust.get(Materials.Redstone), 'B', OrePrefixes.ingot.get(Materials.Titanium)}); + GT_Log.out.println("GT_Mod: Beginning to add regular Crafting Recipes."); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("scaffold", 4L), bits_no_remove_buffered, new Object[] { + "WWW", + " S ", + "S S", + 'W', + OrePrefixes.plank.get(Materials.Wood), + 'S', + OrePrefixes.stick.get(Materials.Wood) + }); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("reactorVent", 1L, 1), bits_no_remove_buffered, new Object[]{"AIA", "I I", "AIA", 'I', new ItemStack(Blocks.iron_bars, 1), 'A', OrePrefixes.plate.get(Materials.Aluminium)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_ModHandler.getIC2Item("reactorPlatingExplosive", 1L), bits_no_remove_buffered, new Object[]{GT_ModHandler.getIC2Item("reactorPlating", 1L), OrePrefixes.plate.get(Materials.Lead)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.IronMagnetic, 1L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.stick.get(Materials.AnyIron), + OrePrefixes.dust.get(Materials.Redstone), + OrePrefixes.dust.get(Materials.Redstone), + OrePrefixes.dust.get(Materials.Redstone), + OrePrefixes.dust.get(Materials.Redstone) + }); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Paper, 1L), + bits_no_remove_buffered, + new Object[] {"PPk", 'P', OrePrefixes.plate.get(Materials.Paper)}); + + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.torch, 2), bits_no_remove_buffered, new Object[] { + "C", "S", 'C', OrePrefixes.dust.get(Materials.Sulfur), 'S', OrePrefixes.stick.get(Materials.Wood) + }); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.torch, 6), bits_no_remove_buffered, new Object[] { + "C", + "S", + 'C', + OrePrefixes.dust.get(Materials.TricalciumPhosphate), + 'S', + OrePrefixes.stick.get(Materials.Wood) + }); + + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.piston, 1), bits_no_remove_buffered, new Object[] { + "WWW", + "CBC", + "CRC", + 'W', + OrePrefixes.plank.get(Materials.Wood), + 'C', + OrePrefixes.stoneCobble, + 'R', + OrePrefixes.dust.get(Materials.Redstone), + 'B', + OrePrefixes.ingot.get(Materials.AnyIron) + }); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.piston, 1), bits_no_remove_buffered, new Object[] { + "WWW", + "CBC", + "CRC", + 'W', + OrePrefixes.plank.get(Materials.Wood), + 'C', + OrePrefixes.stoneCobble, + 'R', + OrePrefixes.dust.get(Materials.Redstone), + 'B', + OrePrefixes.ingot.get(Materials.AnyBronze) + }); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.piston, 1), bits_no_remove_buffered, new Object[] { + "WWW", + "CBC", + "CRC", + 'W', + OrePrefixes.plank.get(Materials.Wood), + 'C', + OrePrefixes.stoneCobble, + 'R', + OrePrefixes.dust.get(Materials.Redstone), + 'B', + OrePrefixes.ingot.get(Materials.Aluminium) + }); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.piston, 1), bits_no_remove_buffered, new Object[] { + "WWW", + "CBC", + "CRC", + 'W', + OrePrefixes.plank.get(Materials.Wood), + 'C', + OrePrefixes.stoneCobble, + 'R', + OrePrefixes.dust.get(Materials.Redstone), + 'B', + OrePrefixes.ingot.get(Materials.Steel) + }); + GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.piston, 1), bits_no_remove_buffered, new Object[] { + "WWW", + "CBC", + "CRC", + 'W', + OrePrefixes.plank.get(Materials.Wood), + 'C', + OrePrefixes.stoneCobble, + 'R', + OrePrefixes.dust.get(Materials.Redstone), + 'B', + OrePrefixes.ingot.get(Materials.Titanium) + }); + + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("reactorVent", 1L, 1), bits_no_remove_buffered, new Object[] { + "AIA", + "I I", + "AIA", + 'I', + new ItemStack(Blocks.iron_bars, 1), + 'A', + OrePrefixes.plate.get(Materials.Aluminium) + }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_ModHandler.getIC2Item("reactorPlatingExplosive", 1L), + bits_no_remove_buffered, + new Object[] {GT_ModHandler.getIC2Item("reactorPlating", 1L), OrePrefixes.plate.get(Materials.Lead)}); if (!Materials.Steel.mBlastFurnaceRequired) { - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 1L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Coal), OrePrefixes.dust.get(Materials.Coal)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 1L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.Iron), + OrePrefixes.dust.get(Materials.Coal), + OrePrefixes.dust.get(Materials.Coal) + }); } if (GT_Mod.gregtechproxy.mNerfDustCrafting) { - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.YttriumBariumCuprate, 5L), bits_no_remove_buffered, new Object[]{OrePrefixes.dustTiny.get(Materials.Yttrium), OrePrefixes.dustTiny.get(Materials.Barium), OrePrefixes.dustTiny.get(Materials.Barium), OrePrefixes.dustTiny.get(Materials.AnyCopper), OrePrefixes.dustTiny.get(Materials.AnyCopper), OrePrefixes.dustTiny.get(Materials.AnyCopper)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.YttriumBariumCuprate, 23L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Yttrium), OrePrefixes.dust.get(Materials.Barium), OrePrefixes.dust.get(Materials.Barium), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSG, 8L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.Chrome), OrePrefixes.dust.get(Materials.Molybdenum), OrePrefixes.dust.get(Materials.Molybdenum), OrePrefixes.dust.get(Materials.Vanadium)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSE, 8L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Manganese), OrePrefixes.dust.get(Materials.Silicon)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSS, 8L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.Iridium), OrePrefixes.dust.get(Materials.Iridium), OrePrefixes.dust.get(Materials.Osmium)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.StainlessSteel, 8L), bits_no_remove_buffered, new Object[]{OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Nickel), OrePrefixes.dustTiny.get(Materials.Manganese), OrePrefixes.dustTiny.get(Materials.Chrome)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.StainlessSteel, 8L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Manganese), OrePrefixes.dust.get(Materials.Chrome)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.TungstenSteel, 7L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Tungsten),OrePrefixes.dust.get(Materials.Steel)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.TungstenCarbide, 7L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Tungsten),OrePrefixes.dust.get(Materials.Carbon)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.VanadiumGallium, 15L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Vanadium),OrePrefixes.dust.get(Materials.Vanadium),OrePrefixes.dust.get(Materials.Vanadium),OrePrefixes.dust.get(Materials.Gallium)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.NiobiumTitanium, 7L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Niobium),OrePrefixes.dust.get(Materials.Titanium)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Osmiridium, 15L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Osmium),OrePrefixes.dust.get(Materials.Iridium),OrePrefixes.dust.get(Materials.Iridium),OrePrefixes.dust.get(Materials.Iridium)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Electrum, 6L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.Gold)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, + // Materials.YttriumBariumCuprate, 5L), bits_no_remove_buffered, new + // Object[]{OrePrefixes.dustTiny.get(Materials.Yttrium), OrePrefixes.dustTiny.get(Materials.Barium), + // OrePrefixes.dustTiny.get(Materials.Barium), OrePrefixes.dustTiny.get(Materials.AnyCopper), + // OrePrefixes.dustTiny.get(Materials.AnyCopper), OrePrefixes.dustTiny.get(Materials.AnyCopper)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, + // Materials.YttriumBariumCuprate, 23L), bits_no_remove_buffered, new + // Object[]{OrePrefixes.dust.get(Materials.Yttrium), OrePrefixes.dust.get(Materials.Barium), + // OrePrefixes.dust.get(Materials.Barium), OrePrefixes.dust.get(Materials.AnyCopper), + // OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSG, 8L), + // bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.TungstenSteel), + // OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), + // OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), + // OrePrefixes.dust.get(Materials.Chrome), OrePrefixes.dust.get(Materials.Molybdenum), + // OrePrefixes.dust.get(Materials.Molybdenum), OrePrefixes.dust.get(Materials.Vanadium)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSE, 8L), + // bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.HSSG), + // OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), + // OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), + // OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.Cobalt), + // OrePrefixes.dust.get(Materials.Manganese), OrePrefixes.dust.get(Materials.Silicon)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSS, 8L), + // bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.HSSG), + // OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), + // OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), + // OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.Iridium), + // OrePrefixes.dust.get(Materials.Iridium), OrePrefixes.dust.get(Materials.Osmium)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, + // Materials.StainlessSteel, 8L), bits_no_remove_buffered, new + // Object[]{OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), + // OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), + // OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), + // OrePrefixes.dustTiny.get(Materials.Nickel), OrePrefixes.dustTiny.get(Materials.Manganese), + // OrePrefixes.dustTiny.get(Materials.Chrome)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, + // Materials.StainlessSteel, 8L), bits_no_remove_buffered, new + // Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), + // OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), + // OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), + // OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Manganese), + // OrePrefixes.dust.get(Materials.Chrome)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, + // Materials.TungstenSteel, 7L), bits_no_remove_buffered, new + // Object[]{OrePrefixes.dust.get(Materials.Tungsten),OrePrefixes.dust.get(Materials.Steel)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, + // Materials.TungstenCarbide, 7L), bits_no_remove_buffered, new + // Object[]{OrePrefixes.dust.get(Materials.Tungsten),OrePrefixes.dust.get(Materials.Carbon)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, + // Materials.VanadiumGallium, 15L), bits_no_remove_buffered, new + // Object[]{OrePrefixes.dust.get(Materials.Vanadium),OrePrefixes.dust.get(Materials.Vanadium),OrePrefixes.dust.get(Materials.Vanadium),OrePrefixes.dust.get(Materials.Gallium)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, + // Materials.NiobiumTitanium, 7L), bits_no_remove_buffered, new + // Object[]{OrePrefixes.dust.get(Materials.Niobium),OrePrefixes.dust.get(Materials.Titanium)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, + // Materials.Osmiridium, 15L), bits_no_remove_buffered, new + // Object[]{OrePrefixes.dust.get(Materials.Osmium),OrePrefixes.dust.get(Materials.Iridium),OrePrefixes.dust.get(Materials.Iridium),OrePrefixes.dust.get(Materials.Iridium)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, + // Materials.Electrum, 6L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Silver), + // OrePrefixes.dust.get(Materials.Gold)}); GT_ModHandler.removeRecipeByOutputDelayed(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brass, 1L)); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brass, 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.Zinc)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Brass, 9L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Zinc)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bronze, 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.Tin)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Bronze, 9L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Tin)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Invar, 9L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Nickel)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Cupronickel, 6L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.AnyCopper)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Nichrome, 15L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Chrome)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brass, 3L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.AnyCopper), + OrePrefixes.dust.get(Materials.AnyCopper), + OrePrefixes.dust.get(Materials.AnyCopper), + OrePrefixes.dust.get(Materials.Zinc) + }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Brass, 9L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.Tetrahedrite), + OrePrefixes.dust.get(Materials.Tetrahedrite), + OrePrefixes.dust.get(Materials.Tetrahedrite), + OrePrefixes.dust.get(Materials.Zinc) + }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bronze, 3L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.AnyCopper), + OrePrefixes.dust.get(Materials.AnyCopper), + OrePrefixes.dust.get(Materials.AnyCopper), + OrePrefixes.dust.get(Materials.Tin) + }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Bronze, 9L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.Tetrahedrite), + OrePrefixes.dust.get(Materials.Tetrahedrite), + OrePrefixes.dust.get(Materials.Tetrahedrite), + OrePrefixes.dust.get(Materials.Tin) + }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Invar, 9L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.Iron), + OrePrefixes.dust.get(Materials.Iron), + OrePrefixes.dust.get(Materials.Nickel) + }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Cupronickel, 6L), + bits_no_remove_buffered, + new Object[] {OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.AnyCopper)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, + // Materials.Nichrome, 15L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Nickel), + // OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Nickel), + // OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Chrome)}); } else { - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.YttriumBariumCuprate, 6L), bits_no_remove_buffered, new Object[]{OrePrefixes.dustTiny.get(Materials.Yttrium), OrePrefixes.dustTiny.get(Materials.Barium), OrePrefixes.dustTiny.get(Materials.Barium), OrePrefixes.dustTiny.get(Materials.AnyCopper), OrePrefixes.dustTiny.get(Materials.AnyCopper), OrePrefixes.dustTiny.get(Materials.AnyCopper)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.YttriumBariumCuprate, 6L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Yttrium), OrePrefixes.dust.get(Materials.Barium), OrePrefixes.dust.get(Materials.Barium), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSG, 9L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.Chrome), OrePrefixes.dust.get(Materials.Molybdenum), OrePrefixes.dust.get(Materials.Molybdenum), OrePrefixes.dust.get(Materials.Vanadium)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSE, 9L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Manganese), OrePrefixes.dust.get(Materials.Silicon)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSS, 9L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.Iridium), OrePrefixes.dust.get(Materials.Iridium), OrePrefixes.dust.get(Materials.Osmium)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.StainlessSteel, 1L), bits_no_remove_buffered, new Object[]{OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Nickel), OrePrefixes.dustTiny.get(Materials.Manganese), OrePrefixes.dustTiny.get(Materials.Chrome)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.StainlessSteel, 9L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Manganese), OrePrefixes.dust.get(Materials.Chrome)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Tungsten),OrePrefixes.dust.get(Materials.Steel)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenCarbide, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Tungsten),OrePrefixes.dust.get(Materials.Carbon)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.VanadiumGallium, 4L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Vanadium),OrePrefixes.dust.get(Materials.Vanadium),OrePrefixes.dust.get(Materials.Vanadium),OrePrefixes.dust.get(Materials.Gallium)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NiobiumTitanium, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Niobium),OrePrefixes.dust.get(Materials.Titanium)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Osmiridium, 4L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Osmium),OrePrefixes.dust.get(Materials.Iridium),OrePrefixes.dust.get(Materials.Iridium),OrePrefixes.dust.get(Materials.Iridium)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Electrum, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.Gold)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brass, 4L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.Zinc)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brass, 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Zinc)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bronze, 4L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.Tin)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bronze, 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Tin)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Invar, 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Nickel)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cupronickel, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.AnyCopper)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nichrome, 5L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Chrome)}); - } - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RoseGold, 4L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Gold), OrePrefixes.dust.get(Materials.Gold), OrePrefixes.dust.get(Materials.Gold), OrePrefixes.dust.get(Materials.Gold), OrePrefixes.dust.get(Materials.AnyCopper)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SterlingSilver, 4L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.AnyCopper)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BlackBronze, 4L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Gold), OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BismuthBronze, 4L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Bismuth), OrePrefixes.dust.get(Materials.Zinc), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BlackSteel, 4L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.BlackBronze), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RedSteel, 6L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.SterlingSilver), OrePrefixes.dust.get(Materials.BismuthBronze), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.BlackSteel), OrePrefixes.dust.get(Materials.BlackSteel), OrePrefixes.dust.get(Materials.BlackSteel), OrePrefixes.dust.get(Materials.BlackSteel)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BlueSteel, 6L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.RoseGold), OrePrefixes.dust.get(Materials.Brass), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.BlackSteel), OrePrefixes.dust.get(Materials.BlackSteel), OrePrefixes.dust.get(Materials.BlackSteel), OrePrefixes.dust.get(Materials.BlackSteel)}); - - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ultimet, 9L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Chrome), OrePrefixes.dust.get(Materials.Chrome), OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Molybdenum)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CobaltBrass, 8L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Brass), OrePrefixes.dust.get(Materials.Brass), OrePrefixes.dust.get(Materials.Brass), OrePrefixes.dust.get(Materials.Brass), OrePrefixes.dust.get(Materials.Brass), OrePrefixes.dust.get(Materials.Brass), OrePrefixes.dust.get(Materials.Brass), OrePrefixes.dust.get(Materials.Aluminium), OrePrefixes.dust.get(Materials.Cobalt)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Kanthal, 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Aluminium), OrePrefixes.dust.get(Materials.Chrome)}); - - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ultimet, 1L), bits_no_remove_buffered, new Object[]{OrePrefixes.dustTiny.get(Materials.Cobalt), OrePrefixes.dustTiny.get(Materials.Cobalt), OrePrefixes.dustTiny.get(Materials.Cobalt), OrePrefixes.dustTiny.get(Materials.Cobalt), OrePrefixes.dustTiny.get(Materials.Cobalt), OrePrefixes.dustTiny.get(Materials.Chrome), OrePrefixes.dustTiny.get(Materials.Chrome), OrePrefixes.dustTiny.get(Materials.Nickel), OrePrefixes.dustTiny.get(Materials.Molybdenum)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CobaltBrass, 1L), bits_no_remove_buffered, new Object[]{OrePrefixes.dustTiny.get(Materials.Brass), OrePrefixes.dustTiny.get(Materials.Brass), OrePrefixes.dustTiny.get(Materials.Brass), OrePrefixes.dustTiny.get(Materials.Brass), OrePrefixes.dustTiny.get(Materials.Brass), OrePrefixes.dustTiny.get(Materials.Brass), OrePrefixes.dustTiny.get(Materials.Brass), OrePrefixes.dustTiny.get(Materials.Aluminium), OrePrefixes.dustTiny.get(Materials.Cobalt)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Kanthal, 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Aluminium), OrePrefixes.dustTiny.get(Materials.Chrome)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DamascusSteel, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dustSmall.get(Materials.Nickel), OrePrefixes.dustSmall.get(Materials.Nickel), OrePrefixes.dustSmall.get(Materials.Nickel), OrePrefixes.dustTiny.get(Materials.Coal), OrePrefixes.dustTiny.get(Materials.Silicon), OrePrefixes.dustTiny.get(Materials.Manganese), OrePrefixes.dustTiny.get(Materials.Chrome), OrePrefixes.dustTiny.get(Materials.Molybdenum)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DamascusSteel, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dustSmall.get(Materials.Manganese), OrePrefixes.dustSmall.get(Materials.Manganese), OrePrefixes.dustSmall.get(Materials.Chrome), OrePrefixes.dustSmall.get(Materials.Chrome), OrePrefixes.dustTiny.get(Materials.Coal), OrePrefixes.dustTiny.get(Materials.Silicon), OrePrefixes.dustTiny.get(Materials.Vanadium)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSLA, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dustSmall.get(Materials.Niobium), OrePrefixes.dustSmall.get(Materials.AnnealedCopper), OrePrefixes.dustSmall.get(Materials.Nickel), OrePrefixes.dustSmall.get(Materials.Vanadium), OrePrefixes.dustSmall.get(Materials.Chrome), OrePrefixes.dustTiny.get(Materials.Molybdenum), OrePrefixes.dustSmall.get(Materials.Titanium), OrePrefixes.dustTiny.get(Materials.Carbon)}); - - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RedstoneAlloy, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Redstone), OrePrefixes.dust.get(Materials.Silicon), OrePrefixes.dust.get(Materials.Coal)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CrudeSteel, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Clay), OrePrefixes.dust.get(Materials.Flint), OrePrefixes.dust.get(Materials.Stone)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.ConductiveIron, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.RedstoneAlloy), OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Silver)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.EnergeticAlloy, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.ConductiveIron), OrePrefixes.dust.get(Materials.Gold), OrePrefixes.dust.get(Materials.BlackSteel)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.EnergeticSilver, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.ConductiveIron), OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.BlackSteel)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.VibrantAlloy, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.EnergeticAlloy), OrePrefixes.dust.get(Materials.EnderEye), OrePrefixes.dust.get(Materials.Chrome)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.VividAlloy, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.EnergeticSilver), OrePrefixes.dust.get(Materials.EnderEye), OrePrefixes.dust.get(Materials.Chrome)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.ElectricalSteel, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Coal), OrePrefixes.dust.get(Materials.Silicon)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.PulsatingIron, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.EnderPearl), OrePrefixes.dust.get(Materials.RedstoneAlloy)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Soularium, 2L), bits_no_remove_buffered, new Object[]{new ItemStack(Blocks.soul_sand, 1, 32767), OrePrefixes.dust.get(Materials.Gold), OrePrefixes.dust.get(Materials.Ash)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkSteel, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.ElectricalSteel), OrePrefixes.dust.get(Materials.Coal), OrePrefixes.dust.get(Materials.Obsidian)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.EnderiumBase, 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Tin), OrePrefixes.dust.get(Materials.Tin), OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.Platinum)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Enderium, 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.EnderiumBase), OrePrefixes.dust.get(Materials.EnderiumBase), OrePrefixes.dust.get(Materials.Thaumium), OrePrefixes.dust.get(Materials.EnderPearl)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.ShadowIron, 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Thaumium), OrePrefixes.dust.get(Materials.Thaumium), OrePrefixes.dust.get(Materials.Thaumium)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Manyullyn, 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Ardite), OrePrefixes.dust.get(Materials.Ardite), OrePrefixes.dust.get(Materials.Ardite), OrePrefixes.dust.get(Materials.Ardite), OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Cobalt)}); - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.AstralSilver, 1L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.Thaumium)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Haderoth, 1L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Rubracium), OrePrefixes.dust.get(Materials.Mithril)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Celenegil, 1L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Platinum), OrePrefixes.dust.get(Materials.Orichalcum)}); - - //GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.VanadiumSteel, 9L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Vanadium), OrePrefixes.dust.get(Materials.Chrome)}); - - - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.IronWood, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.LiveRoot), OrePrefixes.dustTiny.get(Materials.Gold)}); - - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Hepatizon, 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Copper), OrePrefixes.dust.get(Materials.Copper), OrePrefixes.dust.get(Materials.Copper), OrePrefixes.dustTiny.get(Materials.Gold), OrePrefixes.dustTiny.get(Materials.Gold), OrePrefixes.dustTiny.get(Materials.Gold), OrePrefixes.dustTiny.get(Materials.Silver), OrePrefixes.dustTiny.get(Materials.Silver), OrePrefixes.dustTiny.get(Materials.Silver)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Angmallen, 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Gold)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Inolashite, 1L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Alduorite), OrePrefixes.dust.get(Materials.Ceruclase)}); - - - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Items.gunpowder, 6), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Coal), OrePrefixes.dust.get(Materials.Coal), OrePrefixes.dust.get(Materials.Coal), OrePrefixes.dust.get(Materials.Sulfur), OrePrefixes.dust.get(Materials.Saltpeter), OrePrefixes.dust.get(Materials.Saltpeter)}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Items.gunpowder, 6), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Charcoal), OrePrefixes.dust.get(Materials.Charcoal), OrePrefixes.dust.get(Materials.Charcoal), OrePrefixes.dust.get(Materials.Sulfur), OrePrefixes.dust.get(Materials.Saltpeter), OrePrefixes.dust.get(Materials.Saltpeter)}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Items.gunpowder, 6), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Carbon), OrePrefixes.dust.get(Materials.Carbon), OrePrefixes.dust.get(Materials.Carbon), OrePrefixes.dust.get(Materials.Sulfur), OrePrefixes.dust.get(Materials.Saltpeter), OrePrefixes.dust.get(Materials.Saltpeter)}); - - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.IndiumGalliumPhosphide, 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Indium), OrePrefixes.dust.get(Materials.Gallium), OrePrefixes.dust.get(Materials.Phosphorus)}); - - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 5L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Potassium), OrePrefixes.cell.get(Materials.Nitrogen), OrePrefixes.cell.get(Materials.Oxygen), OrePrefixes.cell.get(Materials.Oxygen), OrePrefixes.cell.get(Materials.Oxygen)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, + // Materials.YttriumBariumCuprate, 6L), bits_no_remove_buffered, new + // Object[]{OrePrefixes.dustTiny.get(Materials.Yttrium), OrePrefixes.dustTiny.get(Materials.Barium), + // OrePrefixes.dustTiny.get(Materials.Barium), OrePrefixes.dustTiny.get(Materials.AnyCopper), + // OrePrefixes.dustTiny.get(Materials.AnyCopper), OrePrefixes.dustTiny.get(Materials.AnyCopper)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, + // Materials.YttriumBariumCuprate, 6L), bits_no_remove_buffered, new + // Object[]{OrePrefixes.dust.get(Materials.Yttrium), OrePrefixes.dust.get(Materials.Barium), + // OrePrefixes.dust.get(Materials.Barium), OrePrefixes.dust.get(Materials.AnyCopper), + // OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSG, 9L), + // bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.TungstenSteel), + // OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), + // OrePrefixes.dust.get(Materials.TungstenSteel), OrePrefixes.dust.get(Materials.TungstenSteel), + // OrePrefixes.dust.get(Materials.Chrome), OrePrefixes.dust.get(Materials.Molybdenum), + // OrePrefixes.dust.get(Materials.Molybdenum), OrePrefixes.dust.get(Materials.Vanadium)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSE, 9L), + // bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.HSSG), + // OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), + // OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), + // OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.Cobalt), + // OrePrefixes.dust.get(Materials.Manganese), OrePrefixes.dust.get(Materials.Silicon)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSS, 9L), + // bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.HSSG), + // OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), + // OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.HSSG), + // OrePrefixes.dust.get(Materials.HSSG), OrePrefixes.dust.get(Materials.Iridium), + // OrePrefixes.dust.get(Materials.Iridium), OrePrefixes.dust.get(Materials.Osmium)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, + // Materials.StainlessSteel, 1L), bits_no_remove_buffered, new + // Object[]{OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), + // OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), + // OrePrefixes.dustTiny.get(Materials.Iron), OrePrefixes.dustTiny.get(Materials.Iron), + // OrePrefixes.dustTiny.get(Materials.Nickel), OrePrefixes.dustTiny.get(Materials.Manganese), + // OrePrefixes.dustTiny.get(Materials.Chrome)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, + // Materials.StainlessSteel, 9L), bits_no_remove_buffered, new + // Object[]{OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), + // OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), + // OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Iron), + // OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Manganese), + // OrePrefixes.dust.get(Materials.Chrome)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, + // Materials.TungstenSteel, 2L), bits_no_remove_buffered, new + // Object[]{OrePrefixes.dust.get(Materials.Tungsten),OrePrefixes.dust.get(Materials.Steel)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, + // Materials.TungstenCarbide, 2L), bits_no_remove_buffered, new + // Object[]{OrePrefixes.dust.get(Materials.Tungsten),OrePrefixes.dust.get(Materials.Carbon)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, + // Materials.VanadiumGallium, 4L), bits_no_remove_buffered, new + // Object[]{OrePrefixes.dust.get(Materials.Vanadium),OrePrefixes.dust.get(Materials.Vanadium),OrePrefixes.dust.get(Materials.Vanadium),OrePrefixes.dust.get(Materials.Gallium)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, + // Materials.NiobiumTitanium, 2L), bits_no_remove_buffered, new + // Object[]{OrePrefixes.dust.get(Materials.Niobium),OrePrefixes.dust.get(Materials.Titanium)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Osmiridium, + // 4L), bits_no_remove_buffered, new + // Object[]{OrePrefixes.dust.get(Materials.Osmium),OrePrefixes.dust.get(Materials.Iridium),OrePrefixes.dust.get(Materials.Iridium),OrePrefixes.dust.get(Materials.Iridium)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Electrum, + // 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Silver), + // OrePrefixes.dust.get(Materials.Gold)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brass, 4L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.AnyCopper), + OrePrefixes.dust.get(Materials.AnyCopper), + OrePrefixes.dust.get(Materials.AnyCopper), + OrePrefixes.dust.get(Materials.Zinc) + }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brass, 3L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.Tetrahedrite), + OrePrefixes.dust.get(Materials.Tetrahedrite), + OrePrefixes.dust.get(Materials.Tetrahedrite), + OrePrefixes.dust.get(Materials.Zinc) + }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bronze, 4L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.AnyCopper), + OrePrefixes.dust.get(Materials.AnyCopper), + OrePrefixes.dust.get(Materials.AnyCopper), + OrePrefixes.dust.get(Materials.Tin) + }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bronze, 3L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.Tetrahedrite), + OrePrefixes.dust.get(Materials.Tetrahedrite), + OrePrefixes.dust.get(Materials.Tetrahedrite), + OrePrefixes.dust.get(Materials.Tin) + }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Invar, 3L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.Iron), + OrePrefixes.dust.get(Materials.Iron), + OrePrefixes.dust.get(Materials.Nickel) + }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cupronickel, 2L), + bits_no_remove_buffered, + new Object[] {OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.AnyCopper)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nichrome, + // 5L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Nickel), + // OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Nickel), + // OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Chrome)}); + } + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RoseGold, 4L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.Gold), + OrePrefixes.dust.get(Materials.Gold), + OrePrefixes.dust.get(Materials.Gold), + OrePrefixes.dust.get(Materials.Gold), + OrePrefixes.dust.get(Materials.AnyCopper) + }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SterlingSilver, 4L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.Silver), + OrePrefixes.dust.get(Materials.Silver), + OrePrefixes.dust.get(Materials.Silver), + OrePrefixes.dust.get(Materials.Silver), + OrePrefixes.dust.get(Materials.AnyCopper) + }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BlackBronze, 4L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.Gold), + OrePrefixes.dust.get(Materials.Silver), + OrePrefixes.dust.get(Materials.AnyCopper), + OrePrefixes.dust.get(Materials.AnyCopper), + OrePrefixes.dust.get(Materials.AnyCopper) + }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BismuthBronze, 4L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.Bismuth), + OrePrefixes.dust.get(Materials.Zinc), + OrePrefixes.dust.get(Materials.AnyCopper), + OrePrefixes.dust.get(Materials.AnyCopper), + OrePrefixes.dust.get(Materials.AnyCopper) + }); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BlackSteel, + // 4L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Nickel), + // OrePrefixes.dust.get(Materials.BlackBronze), OrePrefixes.dust.get(Materials.Steel), + // OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RedSteel, 6L), + // bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.SterlingSilver), + // OrePrefixes.dust.get(Materials.BismuthBronze), OrePrefixes.dust.get(Materials.Steel), + // OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.BlackSteel), + // OrePrefixes.dust.get(Materials.BlackSteel), OrePrefixes.dust.get(Materials.BlackSteel), + // OrePrefixes.dust.get(Materials.BlackSteel)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BlueSteel, 6L), + // bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.RoseGold), + // OrePrefixes.dust.get(Materials.Brass), OrePrefixes.dust.get(Materials.Steel), + // OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.BlackSteel), + // OrePrefixes.dust.get(Materials.BlackSteel), OrePrefixes.dust.get(Materials.BlackSteel), + // OrePrefixes.dust.get(Materials.BlackSteel)}); + + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ultimet, 9L), + // bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Cobalt), + // OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Cobalt), + // OrePrefixes.dust.get(Materials.Cobalt), OrePrefixes.dust.get(Materials.Cobalt), + // OrePrefixes.dust.get(Materials.Chrome), OrePrefixes.dust.get(Materials.Chrome), + // OrePrefixes.dust.get(Materials.Nickel), OrePrefixes.dust.get(Materials.Molybdenum)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CobaltBrass, 8L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.Brass), + OrePrefixes.dust.get(Materials.Brass), + OrePrefixes.dust.get(Materials.Brass), + OrePrefixes.dust.get(Materials.Brass), + OrePrefixes.dust.get(Materials.Brass), + OrePrefixes.dust.get(Materials.Brass), + OrePrefixes.dust.get(Materials.Brass), + OrePrefixes.dust.get(Materials.Aluminium), + OrePrefixes.dust.get(Materials.Cobalt) + }); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Kanthal, 3L), + // bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Iron), + // OrePrefixes.dust.get(Materials.Aluminium), OrePrefixes.dust.get(Materials.Chrome)}); + + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ultimet, 1L), + // bits_no_remove_buffered, new Object[]{OrePrefixes.dustTiny.get(Materials.Cobalt), + // OrePrefixes.dustTiny.get(Materials.Cobalt), OrePrefixes.dustTiny.get(Materials.Cobalt), + // OrePrefixes.dustTiny.get(Materials.Cobalt), OrePrefixes.dustTiny.get(Materials.Cobalt), + // OrePrefixes.dustTiny.get(Materials.Chrome), OrePrefixes.dustTiny.get(Materials.Chrome), + // OrePrefixes.dustTiny.get(Materials.Nickel), OrePrefixes.dustTiny.get(Materials.Molybdenum)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CobaltBrass, + // 1L), bits_no_remove_buffered, new Object[]{OrePrefixes.dustTiny.get(Materials.Brass), + // OrePrefixes.dustTiny.get(Materials.Brass), OrePrefixes.dustTiny.get(Materials.Brass), + // OrePrefixes.dustTiny.get(Materials.Brass), OrePrefixes.dustTiny.get(Materials.Brass), + // OrePrefixes.dustTiny.get(Materials.Brass), OrePrefixes.dustTiny.get(Materials.Brass), + // OrePrefixes.dustTiny.get(Materials.Aluminium), OrePrefixes.dustTiny.get(Materials.Cobalt)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Kanthal, + // 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dustTiny.get(Materials.Iron), + // OrePrefixes.dustTiny.get(Materials.Aluminium), OrePrefixes.dustTiny.get(Materials.Chrome)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DamascusSteel, 2L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.Steel), + OrePrefixes.dustSmall.get(Materials.Nickel), + OrePrefixes.dustSmall.get(Materials.Nickel), + OrePrefixes.dustSmall.get(Materials.Nickel), + OrePrefixes.dustTiny.get(Materials.Coal), + OrePrefixes.dustTiny.get(Materials.Silicon), + OrePrefixes.dustTiny.get(Materials.Manganese), + OrePrefixes.dustTiny.get(Materials.Chrome), + OrePrefixes.dustTiny.get(Materials.Molybdenum) + }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DamascusSteel, 2L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.Steel), + OrePrefixes.dustSmall.get(Materials.Manganese), + OrePrefixes.dustSmall.get(Materials.Manganese), + OrePrefixes.dustSmall.get(Materials.Chrome), + OrePrefixes.dustSmall.get(Materials.Chrome), + OrePrefixes.dustTiny.get(Materials.Coal), + OrePrefixes.dustTiny.get(Materials.Silicon), + OrePrefixes.dustTiny.get(Materials.Vanadium) + }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSLA, 2L), bits_no_remove_buffered, new Object[] { + OrePrefixes.dust.get(Materials.Steel), + OrePrefixes.dustSmall.get(Materials.Niobium), + OrePrefixes.dustSmall.get(Materials.AnnealedCopper), + OrePrefixes.dustSmall.get(Materials.Nickel), + OrePrefixes.dustSmall.get(Materials.Vanadium), + OrePrefixes.dustSmall.get(Materials.Chrome), + OrePrefixes.dustTiny.get(Materials.Molybdenum), + OrePrefixes.dustSmall.get(Materials.Titanium), + OrePrefixes.dustTiny.get(Materials.Carbon) + }); + + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RedstoneAlloy, 2L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.Redstone), + OrePrefixes.dust.get(Materials.Silicon), + OrePrefixes.dust.get(Materials.Coal) + }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CrudeSteel, 2L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.Clay), + OrePrefixes.dust.get(Materials.Flint), + OrePrefixes.dust.get(Materials.Stone) + }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.ConductiveIron, 2L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.RedstoneAlloy), + OrePrefixes.dust.get(Materials.Iron), + OrePrefixes.dust.get(Materials.Silver) + }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.EnergeticAlloy, 2L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.ConductiveIron), + OrePrefixes.dust.get(Materials.Gold), + OrePrefixes.dust.get(Materials.BlackSteel) + }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.EnergeticSilver, 2L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.ConductiveIron), + OrePrefixes.dust.get(Materials.Silver), + OrePrefixes.dust.get(Materials.BlackSteel) + }); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.VibrantAlloy, + // 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.EnergeticAlloy), + // OrePrefixes.dust.get(Materials.EnderEye), OrePrefixes.dust.get(Materials.Chrome)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.VividAlloy, + // 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.EnergeticSilver), + // OrePrefixes.dust.get(Materials.EnderEye), OrePrefixes.dust.get(Materials.Chrome)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.ElectricalSteel, 2L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.Steel), + OrePrefixes.dust.get(Materials.Coal), + OrePrefixes.dust.get(Materials.Silicon) + }); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.PulsatingIron, + // 2L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Iron), + // OrePrefixes.dust.get(Materials.EnderPearl), OrePrefixes.dust.get(Materials.RedstoneAlloy)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Soularium, 2L), + bits_no_remove_buffered, + new Object[] { + new ItemStack(Blocks.soul_sand, 1, 32767), + OrePrefixes.dust.get(Materials.Gold), + OrePrefixes.dust.get(Materials.Ash) + }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkSteel, 2L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.ElectricalSteel), + OrePrefixes.dust.get(Materials.Coal), + OrePrefixes.dust.get(Materials.Obsidian) + }); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.EnderiumBase, + // 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Tin), + // OrePrefixes.dust.get(Materials.Tin), OrePrefixes.dust.get(Materials.Silver), + // OrePrefixes.dust.get(Materials.Platinum)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Enderium, 3L), + // bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.EnderiumBase), + // OrePrefixes.dust.get(Materials.EnderiumBase), OrePrefixes.dust.get(Materials.Thaumium), + // OrePrefixes.dust.get(Materials.EnderPearl)}); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.ShadowIron, + // 3L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Iron), + // OrePrefixes.dust.get(Materials.Thaumium), OrePrefixes.dust.get(Materials.Thaumium), + // OrePrefixes.dust.get(Materials.Thaumium)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Manyullyn, 3L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.Ardite), + OrePrefixes.dust.get(Materials.Ardite), + OrePrefixes.dust.get(Materials.Ardite), + OrePrefixes.dust.get(Materials.Ardite), + OrePrefixes.dust.get(Materials.Cobalt), + OrePrefixes.dust.get(Materials.Cobalt), + OrePrefixes.dust.get(Materials.Cobalt), + OrePrefixes.dust.get(Materials.Cobalt) + }); + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.AstralSilver, + // 1L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Silver), + // OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.Thaumium)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Haderoth, 1L), + bits_no_remove_buffered, + new Object[] {OrePrefixes.dust.get(Materials.Rubracium), OrePrefixes.dust.get(Materials.Mithril)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Celenegil, 1L), + bits_no_remove_buffered, + new Object[] {OrePrefixes.dust.get(Materials.Platinum), OrePrefixes.dust.get(Materials.Orichalcum)}); + + // GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.VanadiumSteel, + // 9L), bits_no_remove_buffered, new Object[]{OrePrefixes.dust.get(Materials.Steel), + // OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), + // OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), + // OrePrefixes.dust.get(Materials.Steel), OrePrefixes.dust.get(Materials.Steel), + // OrePrefixes.dust.get(Materials.Vanadium), OrePrefixes.dust.get(Materials.Chrome)}); + + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.IronWood, 2L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.Iron), + OrePrefixes.dust.get(Materials.LiveRoot), + OrePrefixes.dustTiny.get(Materials.Gold) + }); + + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Hepatizon, 3L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.Copper), + OrePrefixes.dust.get(Materials.Copper), + OrePrefixes.dust.get(Materials.Copper), + OrePrefixes.dustTiny.get(Materials.Gold), + OrePrefixes.dustTiny.get(Materials.Gold), + OrePrefixes.dustTiny.get(Materials.Gold), + OrePrefixes.dustTiny.get(Materials.Silver), + OrePrefixes.dustTiny.get(Materials.Silver), + OrePrefixes.dustTiny.get(Materials.Silver) + }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Angmallen, 2L), + bits_no_remove_buffered, + new Object[] {OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Gold)}); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Inolashite, 1L), + bits_no_remove_buffered, + new Object[] {OrePrefixes.dust.get(Materials.Alduorite), OrePrefixes.dust.get(Materials.Ceruclase)}); + + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Items.gunpowder, 6), bits_no_remove_buffered, new Object[] { + OrePrefixes.dust.get(Materials.Coal), + OrePrefixes.dust.get(Materials.Coal), + OrePrefixes.dust.get(Materials.Coal), + OrePrefixes.dust.get(Materials.Sulfur), + OrePrefixes.dust.get(Materials.Saltpeter), + OrePrefixes.dust.get(Materials.Saltpeter) + }); + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Items.gunpowder, 6), bits_no_remove_buffered, new Object[] { + OrePrefixes.dust.get(Materials.Charcoal), + OrePrefixes.dust.get(Materials.Charcoal), + OrePrefixes.dust.get(Materials.Charcoal), + OrePrefixes.dust.get(Materials.Sulfur), + OrePrefixes.dust.get(Materials.Saltpeter), + OrePrefixes.dust.get(Materials.Saltpeter) + }); + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Items.gunpowder, 6), bits_no_remove_buffered, new Object[] { + OrePrefixes.dust.get(Materials.Carbon), + OrePrefixes.dust.get(Materials.Carbon), + OrePrefixes.dust.get(Materials.Carbon), + OrePrefixes.dust.get(Materials.Sulfur), + OrePrefixes.dust.get(Materials.Saltpeter), + OrePrefixes.dust.get(Materials.Saltpeter) + }); + + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.IndiumGalliumPhosphide, 3L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.Indium), + OrePrefixes.dust.get(Materials.Gallium), + OrePrefixes.dust.get(Materials.Phosphorus) + }); + + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 5L), + bits_no_remove_buffered, + new Object[] { + OrePrefixes.dust.get(Materials.Potassium), + OrePrefixes.cell.get(Materials.Nitrogen), + OrePrefixes.cell.get(Materials.Oxygen), + OrePrefixes.cell.get(Materials.Oxygen), + OrePrefixes.cell.get(Materials.Oxygen) + }); GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("carbonFiber", 1L)); - ItemStack[] tChestAndTank = new ItemStack[]{ - ItemList.Super_Chest_EV.get(1), ItemList.Super_Chest_IV.get(1), ItemList.Super_Chest_HV.get(1), ItemList.Super_Chest_MV.get(1), ItemList.Super_Chest_LV.get(1), - ItemList.Quantum_Chest_EV.get(1), ItemList.Quantum_Chest_IV.get(1), ItemList.Quantum_Chest_HV.get(1), ItemList.Quantum_Chest_MV.get(1), ItemList.Quantum_Chest_LV.get(1), - ItemList.Super_Tank_EV.get(1), ItemList.Super_Tank_IV.get(1), ItemList.Super_Tank_HV.get(1), ItemList.Super_Tank_MV.get(1), ItemList.Super_Tank_LV.get(1), - ItemList.Quantum_Tank_EV.get(1), ItemList.Quantum_Tank_IV.get(1), ItemList.Quantum_Tank_HV.get(1), ItemList.Quantum_Tank_MV.get(1), ItemList.Quantum_Tank_LV.get(1) + ItemStack[] tChestAndTank = new ItemStack[] { + ItemList.Super_Chest_EV.get(1), ItemList.Super_Chest_IV.get(1), ItemList.Super_Chest_HV.get(1), + ItemList.Super_Chest_MV.get(1), ItemList.Super_Chest_LV.get(1), + ItemList.Quantum_Chest_EV.get(1), ItemList.Quantum_Chest_IV.get(1), ItemList.Quantum_Chest_HV.get(1), + ItemList.Quantum_Chest_MV.get(1), ItemList.Quantum_Chest_LV.get(1), + ItemList.Super_Tank_EV.get(1), ItemList.Super_Tank_IV.get(1), ItemList.Super_Tank_HV.get(1), + ItemList.Super_Tank_MV.get(1), ItemList.Super_Tank_LV.get(1), + ItemList.Quantum_Tank_EV.get(1), ItemList.Quantum_Tank_IV.get(1), ItemList.Quantum_Tank_HV.get(1), + ItemList.Quantum_Tank_MV.get(1), ItemList.Quantum_Tank_LV.get(1) }; for (ItemStack tItem : tChestAndTank) { - GT_ModHandler.addShapelessCraftingRecipe(tItem, new Object[]{tItem}); + GT_ModHandler.addShapelessCraftingRecipe(tItem, new Object[] {tItem}); } if (GT_Mod.gregtechproxy.mDisableIC2Cables) { List<ItemStack> iToRemoveAndHide = Arrays.stream(new String[] { - "copperCableItem", "insulatedCopperCableItem", "goldCableItem", "insulatedGoldCableItem", "insulatedIronCableItem", "glassFiberCableItem", - "tinCableItem", "ironCableItem", "insulatedTinCableItem", "detectorCableItem", "splitterCableItem", "electrolyzer", "cutter" - }).map(x -> GT_ModHandler.getIC2Item(x, 1L)).collect(Collectors.toList()); + "copperCableItem", + "insulatedCopperCableItem", + "goldCableItem", + "insulatedGoldCableItem", + "insulatedIronCableItem", + "glassFiberCableItem", + "tinCableItem", + "ironCableItem", + "insulatedTinCableItem", + "detectorCableItem", + "splitterCableItem", + "electrolyzer", + "cutter" + }) + .map(x -> GT_ModHandler.getIC2Item(x, 1L)) + .collect(Collectors.toList()); if (Loader.isModLoaded("NotEnoughItems")) { iToRemoveAndHide.forEach(item -> { @@ -528,43 +2624,403 @@ public class GT_CraftingRecipeLoader implements Runnable { }); } - Arrays.stream(new String[]{ - "batBox", "mfeUnit", "lvTransformer", "mvTransformer", "hvTransformer", "evTransformer", "cesuUnit", "luminator", "teleporter", "energyOMat", - "advBattery", "boatElectric", "cropnalyzer", "coil", "powerunit", "powerunitsmall", "remote", "odScanner", "ovScanner", "solarHelmet", "staticBoots", - "ecMeter", "obscurator", "overclockerUpgrade", "transformerUpgrade", "energyStorageUpgrade", "ejectorUpgrade", "suBattery", "frequencyTransmitter", - "pullingUpgrade" - }).map(x -> GT_ModHandler.getIC2Item(x, 1L)).forEach(GT_ModHandler::removeRecipeByOutputDelayed); - - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("batBox", 1L), bits_no_remove_buffered, new Object[]{"PCP", "BBB", "PPP", 'C', OrePrefixes.cableGt01.get(Materials.Tin), 'P', OrePrefixes.plank.get(Materials.Wood), 'B', OrePrefixes.battery.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("mfeUnit", 1L), bits_no_remove_buffered, new Object[]{"CEC", "EME", "CEC", 'C', OrePrefixes.cableGt01.get(Materials.Gold), 'E', OrePrefixes.battery.get(Materials.Elite), 'M', GT_ModHandler.getIC2Item("machine", 1L)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("lvTransformer", 1L), bits_no_remove_buffered, new Object[]{"PCP", "POP", "PCP", 'C', OrePrefixes.cableGt01.get(Materials.Tin), 'O', GT_ModHandler.getIC2Item("coil", 1L), 'P', OrePrefixes.plank.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("mvTransformer", 1L), bits_no_remove_buffered, new Object[]{"CMC", 'C', OrePrefixes.cableGt01.get(Materials.Copper), 'M', GT_ModHandler.getIC2Item("machine", 1L)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("hvTransformer", 1L), bits_no_remove_buffered, new Object[]{" C ", "IMB", " C ", 'C', OrePrefixes.cableGt01.get(Materials.Gold), 'M', GT_ModHandler.getIC2Item("mvTransformer", 1L), 'I', OrePrefixes.circuit.get(Materials.Basic), 'B', OrePrefixes.battery.get(Materials.Advanced)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("evTransformer", 1L), bits_no_remove_buffered, new Object[]{" C ", "IMB", " C ", 'C', OrePrefixes.cableGt01.get(Materials.Aluminium), 'M', GT_ModHandler.getIC2Item("hvTransformer", 1L), 'I', OrePrefixes.circuit.get(Materials.Advanced), 'B', OrePrefixes.battery.get(Materials.Master)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("cesuUnit", 1L), bits_no_remove_buffered, new Object[]{"PCP", "BBB", "PPP", 'C', OrePrefixes.cableGt01.get(Materials.Copper), 'P', OrePrefixes.plate.get(Materials.Bronze), 'B', OrePrefixes.battery.get(Materials.Advanced)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("teleporter", 1L), bits_no_remove_buffered, new Object[]{"GFG", "CMC", "GDG", 'C', OrePrefixes.cableGt01.get(Materials.Platinum), 'G', OrePrefixes.circuit.get(Materials.Advanced), 'D', OrePrefixes.gem.get(Materials.Diamond), 'M', GT_ModHandler.getIC2Item("machine", 1L), 'F', GT_ModHandler.getIC2Item("frequencyTransmitter", 1L)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("energyOMat", 1L), bits_no_remove_buffered, new Object[]{"RBR", "CMC", 'C', OrePrefixes.cableGt01.get(Materials.Copper), 'R', OrePrefixes.dust.get(Materials.Redstone), 'B', OrePrefixes.battery.get(Materials.Basic), 'M', GT_ModHandler.getIC2Item("machine", 1L)}); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("advBattery", 1L), bits_no_remove_buffered, new Object[]{"CTC", "TST", "TLT", 'C', OrePrefixes.cableGt01.get(Materials.Copper), 'S', OrePrefixes.dust.get(Materials.Sulfur), 'L', OrePrefixes.dust.get(Materials.Lead), 'T', GT_ModHandler.getIC2Item("casingbronze", 1L)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("boatElectric", 1L), bits_no_remove_buffered, new Object[]{"CCC", "XWX", aTextIron2, 'C', OrePrefixes.cableGt01.get(Materials.Copper), 'X', OrePrefixes.plate.get(Materials.Iron), 'W', GT_ModHandler.getIC2Item("waterMill", 1L)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("cropnalyzer", 1L), bits_no_remove_buffered, new Object[]{"CC ", "RGR", "RIR", 'C', OrePrefixes.cableGt01.get(Materials.Copper), 'R', OrePrefixes.dust.get(Materials.Redstone), 'G', OrePrefixes.block.get(Materials.Glass), 'I', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("coil", 1L), bits_no_remove_buffered, new Object[]{"CCC", "CXC", "CCC", 'C', OrePrefixes.wireGt01.get(Materials.Copper), 'X', OrePrefixes.ingot.get(Materials.AnyIron)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("powerunit", 1L), bits_no_remove_buffered, new Object[]{"BCA", "BIM", "BCA", 'C', OrePrefixes.cableGt01.get(Materials.Copper), 'B', OrePrefixes.battery.get(Materials.Basic), 'A', GT_ModHandler.getIC2Item("casingiron", 1L), 'I', OrePrefixes.circuit.get(Materials.Basic), 'M', GT_ModHandler.getIC2Item("elemotor", 1L)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("powerunitsmall", 1L), bits_no_remove_buffered, new Object[]{" CA", "BIM", " CA", 'C', OrePrefixes.cableGt01.get(Materials.Copper), 'B', OrePrefixes.battery.get(Materials.Basic), 'A', GT_ModHandler.getIC2Item("casingiron", 1L), 'I', OrePrefixes.circuit.get(Materials.Basic), 'M', GT_ModHandler.getIC2Item("elemotor", 1L)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("remote", 1L), bits_no_remove_buffered, new Object[]{" C ", "TLT", " F ", 'C', OrePrefixes.cableGt01.get(Materials.Copper), 'L', OrePrefixes.dust.get(Materials.Lapis), 'T', GT_ModHandler.getIC2Item("casingtin", 1L), 'F', GT_ModHandler.getIC2Item("frequencyTransmitter", 1L)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("odScanner", 1L), bits_no_remove_buffered, new Object[]{"PGP", "CBC", "WWW", 'W', OrePrefixes.cableGt01.get(Materials.Copper), 'G', OrePrefixes.dust.get(Materials.Glowstone), 'B', OrePrefixes.battery.get(Materials.Advanced), 'C', OrePrefixes.circuit.get(Materials.Advanced), 'P', GT_ModHandler.getIC2Item("casinggold", 1L)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("ovScanner", 1L), bits_no_remove_buffered, new Object[]{"PDP", "GCG", "WSW", 'W', OrePrefixes.cableGt01.get(Materials.Gold), 'G', OrePrefixes.dust.get(Materials.Glowstone), 'D', OrePrefixes.battery.get(Materials.Elite), 'C', OrePrefixes.circuit.get(Materials.Advanced), 'P', GT_ModHandler.getIC2Item("casinggold", 1L), 'S', GT_ModHandler.getIC2Item("odScanner", 1L)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("staticBoots", 1L), bits_no_remove_buffered, new Object[]{"I I", "IWI", "CCC", 'C', OrePrefixes.cableGt01.get(Materials.Copper), 'I', OrePrefixes.ingot.get(Materials.Iron), 'W', new ItemStack(Blocks.wool)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("ecMeter", 1L), bits_no_remove_buffered, new Object[]{" G ", "CIC", "C C", 'C', OrePrefixes.cableGt01.get(Materials.Copper), 'G', OrePrefixes.dust.get(Materials.Glowstone), 'I', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("obscurator", 1L), bits_no_remove_buffered, new Object[]{"RER", "CAC", "RRR", 'C', OrePrefixes.cableGt01.get(Materials.Gold), 'R', OrePrefixes.dust.get(Materials.Redstone), 'E', OrePrefixes.battery.get(Materials.Advanced), 'A', OrePrefixes.circuit.get(Materials.Advanced)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("overclockerUpgrade", 1L), bits_no_remove_buffered, new Object[]{"CCC", "WEW", 'W', OrePrefixes.cableGt01.get(Materials.Copper), 'C', GT_ModHandler.getIC2Item("reactorCoolantSimple", 1L, 1), 'E', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("transformerUpgrade", 1L), bits_no_remove_buffered, new Object[]{"GGG", "WTW", "GEG", 'W', OrePrefixes.cableGt01.get(Materials.Gold), 'T', GT_ModHandler.getIC2Item("mvTransformer", 1L), 'E', OrePrefixes.circuit.get(Materials.Basic), 'G', OrePrefixes.block.get(Materials.Glass)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("energyStorageUpgrade", 1L), bits_no_remove_buffered, new Object[]{"PPP", "WBW", "PEP", 'W', OrePrefixes.cableGt01.get(Materials.Copper), 'E', OrePrefixes.circuit.get(Materials.Basic), 'P', OrePrefixes.plank.get(Materials.Wood), 'B', OrePrefixes.battery.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("ejectorUpgrade", 1L), bits_no_remove_buffered, new Object[]{"PHP", "WEW", 'W', OrePrefixes.cableGt01.get(Materials.Copper), 'E', OrePrefixes.circuit.get(Materials.Basic), 'P', new ItemStack(Blocks.piston), 'H', new ItemStack(Blocks.hopper)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("suBattery", 1L), bits_no_remove_buffered, new Object[]{"W", "C", "R", 'W', OrePrefixes.cableGt01.get(Materials.Copper), 'C', OrePrefixes.dust.get(Materials.HydratedCoal), 'R', OrePrefixes.dust.get(Materials.Redstone)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("pullingUpgrade", 1L), bits_no_remove_buffered, new Object[]{"PHP", "WEW", 'W', OrePrefixes.cableGt01.get(Materials.Copper), 'P', new ItemStack(Blocks.sticky_piston), 'R', new ItemStack(Blocks.hopper), 'E', OrePrefixes.circuit.get(Materials.Basic)}); + Arrays.stream(new String[] { + "batBox", + "mfeUnit", + "lvTransformer", + "mvTransformer", + "hvTransformer", + "evTransformer", + "cesuUnit", + "luminator", + "teleporter", + "energyOMat", + "advBattery", + "boatElectric", + "cropnalyzer", + "coil", + "powerunit", + "powerunitsmall", + "remote", + "odScanner", + "ovScanner", + "solarHelmet", + "staticBoots", + "ecMeter", + "obscurator", + "overclockerUpgrade", + "transformerUpgrade", + "energyStorageUpgrade", + "ejectorUpgrade", + "suBattery", + "frequencyTransmitter", + "pullingUpgrade" + }) + .map(x -> GT_ModHandler.getIC2Item(x, 1L)) + .forEach(GT_ModHandler::removeRecipeByOutputDelayed); + + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("batBox", 1L), bits_no_remove_buffered, new Object[] { + "PCP", + "BBB", + "PPP", + 'C', + OrePrefixes.cableGt01.get(Materials.Tin), + 'P', + OrePrefixes.plank.get(Materials.Wood), + 'B', + OrePrefixes.battery.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("mfeUnit", 1L), bits_no_remove_buffered, new Object[] { + "CEC", + "EME", + "CEC", + 'C', + OrePrefixes.cableGt01.get(Materials.Gold), + 'E', + OrePrefixes.battery.get(Materials.Elite), + 'M', + GT_ModHandler.getIC2Item("machine", 1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("lvTransformer", 1L), bits_no_remove_buffered, new Object[] { + "PCP", + "POP", + "PCP", + 'C', + OrePrefixes.cableGt01.get(Materials.Tin), + 'O', + GT_ModHandler.getIC2Item("coil", 1L), + 'P', + OrePrefixes.plank.get(Materials.Wood) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("mvTransformer", 1L), bits_no_remove_buffered, new Object[] { + "CMC", + 'C', + OrePrefixes.cableGt01.get(Materials.Copper), + 'M', + GT_ModHandler.getIC2Item("machine", 1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("hvTransformer", 1L), bits_no_remove_buffered, new Object[] { + " C ", + "IMB", + " C ", + 'C', + OrePrefixes.cableGt01.get(Materials.Gold), + 'M', + GT_ModHandler.getIC2Item("mvTransformer", 1L), + 'I', + OrePrefixes.circuit.get(Materials.Basic), + 'B', + OrePrefixes.battery.get(Materials.Advanced) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("evTransformer", 1L), bits_no_remove_buffered, new Object[] { + " C ", + "IMB", + " C ", + 'C', + OrePrefixes.cableGt01.get(Materials.Aluminium), + 'M', + GT_ModHandler.getIC2Item("hvTransformer", 1L), + 'I', + OrePrefixes.circuit.get(Materials.Advanced), + 'B', + OrePrefixes.battery.get(Materials.Master) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("cesuUnit", 1L), bits_no_remove_buffered, new Object[] { + "PCP", + "BBB", + "PPP", + 'C', + OrePrefixes.cableGt01.get(Materials.Copper), + 'P', + OrePrefixes.plate.get(Materials.Bronze), + 'B', + OrePrefixes.battery.get(Materials.Advanced) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("teleporter", 1L), bits_no_remove_buffered, new Object[] { + "GFG", + "CMC", + "GDG", + 'C', + OrePrefixes.cableGt01.get(Materials.Platinum), + 'G', + OrePrefixes.circuit.get(Materials.Advanced), + 'D', + OrePrefixes.gem.get(Materials.Diamond), + 'M', + GT_ModHandler.getIC2Item("machine", 1L), + 'F', + GT_ModHandler.getIC2Item("frequencyTransmitter", 1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("energyOMat", 1L), bits_no_remove_buffered, new Object[] { + "RBR", + "CMC", + 'C', + OrePrefixes.cableGt01.get(Materials.Copper), + 'R', + OrePrefixes.dust.get(Materials.Redstone), + 'B', + OrePrefixes.battery.get(Materials.Basic), + 'M', + GT_ModHandler.getIC2Item("machine", 1L) + }); + // GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("advBattery", 1L), bits_no_remove_buffered, new + // Object[]{"CTC", "TST", "TLT", 'C', OrePrefixes.cableGt01.get(Materials.Copper), 'S', + // OrePrefixes.dust.get(Materials.Sulfur), 'L', OrePrefixes.dust.get(Materials.Lead), 'T', + // GT_ModHandler.getIC2Item("casingbronze", 1L)}); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("boatElectric", 1L), bits_no_remove_buffered, new Object[] { + "CCC", + "XWX", + aTextIron2, + 'C', + OrePrefixes.cableGt01.get(Materials.Copper), + 'X', + OrePrefixes.plate.get(Materials.Iron), + 'W', + GT_ModHandler.getIC2Item("waterMill", 1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("cropnalyzer", 1L), bits_no_remove_buffered, new Object[] { + "CC ", + "RGR", + "RIR", + 'C', + OrePrefixes.cableGt01.get(Materials.Copper), + 'R', + OrePrefixes.dust.get(Materials.Redstone), + 'G', + OrePrefixes.block.get(Materials.Glass), + 'I', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("coil", 1L), bits_no_remove_buffered, new Object[] { + "CCC", + "CXC", + "CCC", + 'C', + OrePrefixes.wireGt01.get(Materials.Copper), + 'X', + OrePrefixes.ingot.get(Materials.AnyIron) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("powerunit", 1L), bits_no_remove_buffered, new Object[] { + "BCA", + "BIM", + "BCA", + 'C', + OrePrefixes.cableGt01.get(Materials.Copper), + 'B', + OrePrefixes.battery.get(Materials.Basic), + 'A', + GT_ModHandler.getIC2Item("casingiron", 1L), + 'I', + OrePrefixes.circuit.get(Materials.Basic), + 'M', + GT_ModHandler.getIC2Item("elemotor", 1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("powerunitsmall", 1L), bits_no_remove_buffered, new Object[] { + " CA", + "BIM", + " CA", + 'C', + OrePrefixes.cableGt01.get(Materials.Copper), + 'B', + OrePrefixes.battery.get(Materials.Basic), + 'A', + GT_ModHandler.getIC2Item("casingiron", 1L), + 'I', + OrePrefixes.circuit.get(Materials.Basic), + 'M', + GT_ModHandler.getIC2Item("elemotor", 1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("remote", 1L), bits_no_remove_buffered, new Object[] { + " C ", + "TLT", + " F ", + 'C', + OrePrefixes.cableGt01.get(Materials.Copper), + 'L', + OrePrefixes.dust.get(Materials.Lapis), + 'T', + GT_ModHandler.getIC2Item("casingtin", 1L), + 'F', + GT_ModHandler.getIC2Item("frequencyTransmitter", 1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("odScanner", 1L), bits_no_remove_buffered, new Object[] { + "PGP", + "CBC", + "WWW", + 'W', + OrePrefixes.cableGt01.get(Materials.Copper), + 'G', + OrePrefixes.dust.get(Materials.Glowstone), + 'B', + OrePrefixes.battery.get(Materials.Advanced), + 'C', + OrePrefixes.circuit.get(Materials.Advanced), + 'P', + GT_ModHandler.getIC2Item("casinggold", 1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("ovScanner", 1L), bits_no_remove_buffered, new Object[] { + "PDP", + "GCG", + "WSW", + 'W', + OrePrefixes.cableGt01.get(Materials.Gold), + 'G', + OrePrefixes.dust.get(Materials.Glowstone), + 'D', + OrePrefixes.battery.get(Materials.Elite), + 'C', + OrePrefixes.circuit.get(Materials.Advanced), + 'P', + GT_ModHandler.getIC2Item("casinggold", 1L), + 'S', + GT_ModHandler.getIC2Item("odScanner", 1L) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("staticBoots", 1L), bits_no_remove_buffered, new Object[] { + "I I", + "IWI", + "CCC", + 'C', + OrePrefixes.cableGt01.get(Materials.Copper), + 'I', + OrePrefixes.ingot.get(Materials.Iron), + 'W', + new ItemStack(Blocks.wool) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("ecMeter", 1L), bits_no_remove_buffered, new Object[] { + " G ", + "CIC", + "C C", + 'C', + OrePrefixes.cableGt01.get(Materials.Copper), + 'G', + OrePrefixes.dust.get(Materials.Glowstone), + 'I', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("obscurator", 1L), bits_no_remove_buffered, new Object[] { + "RER", + "CAC", + "RRR", + 'C', + OrePrefixes.cableGt01.get(Materials.Gold), + 'R', + OrePrefixes.dust.get(Materials.Redstone), + 'E', + OrePrefixes.battery.get(Materials.Advanced), + 'A', + OrePrefixes.circuit.get(Materials.Advanced) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("overclockerUpgrade", 1L), bits_no_remove_buffered, new Object[] { + "CCC", + "WEW", + 'W', + OrePrefixes.cableGt01.get(Materials.Copper), + 'C', + GT_ModHandler.getIC2Item("reactorCoolantSimple", 1L, 1), + 'E', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("transformerUpgrade", 1L), bits_no_remove_buffered, new Object[] { + "GGG", + "WTW", + "GEG", + 'W', + OrePrefixes.cableGt01.get(Materials.Gold), + 'T', + GT_ModHandler.getIC2Item("mvTransformer", 1L), + 'E', + OrePrefixes.circuit.get(Materials.Basic), + 'G', + OrePrefixes.block.get(Materials.Glass) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("energyStorageUpgrade", 1L), bits_no_remove_buffered, new Object[] { + "PPP", + "WBW", + "PEP", + 'W', + OrePrefixes.cableGt01.get(Materials.Copper), + 'E', + OrePrefixes.circuit.get(Materials.Basic), + 'P', + OrePrefixes.plank.get(Materials.Wood), + 'B', + OrePrefixes.battery.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("ejectorUpgrade", 1L), bits_no_remove_buffered, new Object[] { + "PHP", + "WEW", + 'W', + OrePrefixes.cableGt01.get(Materials.Copper), + 'E', + OrePrefixes.circuit.get(Materials.Basic), + 'P', + new ItemStack(Blocks.piston), + 'H', + new ItemStack(Blocks.hopper) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("suBattery", 1L), bits_no_remove_buffered, new Object[] { + "W", + "C", + "R", + 'W', + OrePrefixes.cableGt01.get(Materials.Copper), + 'C', + OrePrefixes.dust.get(Materials.HydratedCoal), + 'R', + OrePrefixes.dust.get(Materials.Redstone) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("pullingUpgrade", 1L), bits_no_remove_buffered, new Object[] { + "PHP", + "WEW", + 'W', + OrePrefixes.cableGt01.get(Materials.Copper), + 'P', + new ItemStack(Blocks.sticky_piston), + 'R', + new ItemStack(Blocks.hopper), + 'E', + OrePrefixes.circuit.get(Materials.Basic) + }); } else { - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("glassFiberCableItem", 1L), bits_no_remove_buffered, new Object[]{"GGG", "EDE", "GGG", 'G', new ItemStack(Blocks.glass, 1, 32767), 'D', OrePrefixes.dust.get(Materials.Silver), 'E', ItemList.IC2_Energium_Dust.get(1L)}); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("glassFiberCableItem", 1L), bits_no_remove_buffered, new Object[] { + "GGG", + "EDE", + "GGG", + 'G', + new ItemStack(Blocks.glass, 1, 32767), + 'D', + OrePrefixes.dust.get(Materials.Silver), + 'E', + ItemList.IC2_Energium_Dust.get(1L) + }); } if (Loader.isModLoaded("NotEnoughItems")) { @@ -575,74 +3031,390 @@ public class GT_CraftingRecipeLoader implements Runnable { codechicken.nei.api.API.hideItem(GT_ModHandler.getIC2Item("reactorMOXDual", 1L, 1)); codechicken.nei.api.API.hideItem(GT_ModHandler.getIC2Item("reactorMOXQuad", 1L, 1)); } - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("UranFuel", 1L), bits_no_remove_buffered, new Object[]{"UUU", "NNN", "UUU", 'U', OrePrefixes.ingot.get(Materials.Uranium), 'N', OrePrefixes.nugget.get(Materials.Uranium235)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("MOXFuel", 1L), bits_no_remove_buffered, new Object[]{"UUU", "NNN", "UUU", 'U', OrePrefixes.ingot.get(Materials.Uranium), 'N', OrePrefixes.ingot.get(Materials.Plutonium)}); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("UranFuel", 1L), bits_no_remove_buffered, new Object[] { + "UUU", + "NNN", + "UUU", + 'U', + OrePrefixes.ingot.get(Materials.Uranium), + 'N', + OrePrefixes.nugget.get(Materials.Uranium235) + }); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("MOXFuel", 1L), bits_no_remove_buffered, new Object[] { + "UUU", + "NNN", + "UUU", + 'U', + OrePrefixes.ingot.get(Materials.Uranium), + 'N', + OrePrefixes.ingot.get(Materials.Plutonium) + }); if (!GregTech_API.mIC2Classic) { GT_ModHandler.removeRecipeByOutputDelayed(Ic2Items.miningLaser.copy()); - GT_ModHandler.addCraftingRecipe(Ic2Items.miningLaser.copy(), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PPP", "GEC", "SBd", 'P', OrePrefixes.plate.get(Materials.Titanium), 'G', OrePrefixes.gemExquisite.get(Materials.Diamond), 'E', ItemList.Emitter_HV, 'C', OrePrefixes.circuit.get(Materials.Elite), 'S', OrePrefixes.screw.get(Materials.Titanium), 'B', new ItemStack(Ic2Items.chargingEnergyCrystal.copy().getItem(), 1, GT_Values.W)}); - GT_ModHandler.addCraftingRecipe(Ic2Items.miningLaser.copy(), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PPP", "GEC", "SBd", 'P', OrePrefixes.plate.get(Materials.Titanium), 'G', OrePrefixes.gemExquisite.get(Materials.Ruby), 'E', ItemList.Emitter_HV, 'C', OrePrefixes.circuit.get(Materials.Elite), 'S', OrePrefixes.screw.get(Materials.Titanium), 'B', new ItemStack(Ic2Items.chargingEnergyCrystal.copy().getItem(), 1, GT_Values.W)}); - GT_ModHandler.addCraftingRecipe(Ic2Items.miningLaser.copy(), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PPP", "GEC", "SBd", 'P', OrePrefixes.plate.get(Materials.Titanium), 'G', OrePrefixes.gemExquisite.get(Materials.Jasper), 'E', ItemList.Emitter_HV, 'C', OrePrefixes.circuit.get(Materials.Elite), 'S', OrePrefixes.screw.get(Materials.Titanium), 'B', new ItemStack(Ic2Items.chargingEnergyCrystal.copy().getItem(), 1, GT_Values.W)}); - GT_ModHandler.addCraftingRecipe(Ic2Items.miningLaser.copy(), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PPP", "GEC", "SBd", 'P', OrePrefixes.plate.get(Materials.Titanium), 'G', OrePrefixes.gemExquisite.get(Materials.GarnetRed), 'E', ItemList.Emitter_HV, 'C', OrePrefixes.circuit.get(Materials.Elite), 'S', OrePrefixes.screw.get(Materials.Titanium), 'B', new ItemStack(Ic2Items.chargingEnergyCrystal.copy().getItem(), 1, GT_Values.W)}); + GT_ModHandler.addCraftingRecipe( + Ic2Items.miningLaser.copy(), GT_ModHandler.RecipeBits.BUFFERED, new Object[] { + "PPP", + "GEC", + "SBd", + 'P', + OrePrefixes.plate.get(Materials.Titanium), + 'G', + OrePrefixes.gemExquisite.get(Materials.Diamond), + 'E', + ItemList.Emitter_HV, + 'C', + OrePrefixes.circuit.get(Materials.Elite), + 'S', + OrePrefixes.screw.get(Materials.Titanium), + 'B', + new ItemStack(Ic2Items.chargingEnergyCrystal.copy().getItem(), 1, GT_Values.W) + }); + GT_ModHandler.addCraftingRecipe( + Ic2Items.miningLaser.copy(), GT_ModHandler.RecipeBits.BUFFERED, new Object[] { + "PPP", + "GEC", + "SBd", + 'P', + OrePrefixes.plate.get(Materials.Titanium), + 'G', + OrePrefixes.gemExquisite.get(Materials.Ruby), + 'E', + ItemList.Emitter_HV, + 'C', + OrePrefixes.circuit.get(Materials.Elite), + 'S', + OrePrefixes.screw.get(Materials.Titanium), + 'B', + new ItemStack(Ic2Items.chargingEnergyCrystal.copy().getItem(), 1, GT_Values.W) + }); + GT_ModHandler.addCraftingRecipe( + Ic2Items.miningLaser.copy(), GT_ModHandler.RecipeBits.BUFFERED, new Object[] { + "PPP", + "GEC", + "SBd", + 'P', + OrePrefixes.plate.get(Materials.Titanium), + 'G', + OrePrefixes.gemExquisite.get(Materials.Jasper), + 'E', + ItemList.Emitter_HV, + 'C', + OrePrefixes.circuit.get(Materials.Elite), + 'S', + OrePrefixes.screw.get(Materials.Titanium), + 'B', + new ItemStack(Ic2Items.chargingEnergyCrystal.copy().getItem(), 1, GT_Values.W) + }); + GT_ModHandler.addCraftingRecipe( + Ic2Items.miningLaser.copy(), GT_ModHandler.RecipeBits.BUFFERED, new Object[] { + "PPP", + "GEC", + "SBd", + 'P', + OrePrefixes.plate.get(Materials.Titanium), + 'G', + OrePrefixes.gemExquisite.get(Materials.GarnetRed), + 'E', + ItemList.Emitter_HV, + 'C', + OrePrefixes.circuit.get(Materials.Elite), + 'S', + OrePrefixes.screw.get(Materials.Titanium), + 'B', + new ItemStack(Ic2Items.chargingEnergyCrystal.copy().getItem(), 1, GT_Values.W) + }); } GT_ModHandler.removeRecipeDelayed(GT_ModHandler.getIC2Item("miningPipe", 8)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("miningPipe", 1), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"hPf", 'P', OrePrefixes.pipeSmall.get(Materials.Steel)}); - GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Steel, 1), GT_ModHandler.getIC2Item("miningPipe", 1), 200, 16); - - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("luminator", 16L), bits_no_remove_buffered, new Object[]{"RTR", "GHG", "GGG", 'H', OrePrefixes.cell.get(Materials.Helium), 'T', OrePrefixes.ingot.get(Materials.Tin), 'R', OrePrefixes.ingot.get(Materials.AnyIron), 'G', new ItemStack(Blocks.glass, 1)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("luminator", 16L), bits_no_remove_buffered, new Object[]{"RTR", "GHG", "GGG", 'H', OrePrefixes.cell.get(Materials.Mercury), 'T', OrePrefixes.ingot.get(Materials.Tin), 'R', OrePrefixes.ingot.get(Materials.AnyIron), 'G', new ItemStack(Blocks.glass, 1)}); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("miningPipe", 1), + GT_ModHandler.RecipeBits.BUFFERED, + new Object[] {"hPf", 'P', OrePrefixes.pipeSmall.get(Materials.Steel)}); + GT_Values.RA.addWiremillRecipe( + GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Steel, 1), + GT_ModHandler.getIC2Item("miningPipe", 1), + 200, + 16); + + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("luminator", 16L), bits_no_remove_buffered, new Object[] { + "RTR", + "GHG", + "GGG", + 'H', + OrePrefixes.cell.get(Materials.Helium), + 'T', + OrePrefixes.ingot.get(Materials.Tin), + 'R', + OrePrefixes.ingot.get(Materials.AnyIron), + 'G', + new ItemStack(Blocks.glass, 1) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("luminator", 16L), bits_no_remove_buffered, new Object[] { + "RTR", + "GHG", + "GGG", + 'H', + OrePrefixes.cell.get(Materials.Mercury), + 'T', + OrePrefixes.ingot.get(Materials.Tin), + 'R', + OrePrefixes.ingot.get(Materials.AnyIron), + 'G', + new ItemStack(Blocks.glass, 1) + }); - GT_ModHandler.removeRecipeDelayed(tStack = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), tStack, tStack, tStack, new ItemStack(Items.coal, 1, 0), tStack, tStack, tStack, tStack); - GT_ModHandler.removeRecipeDelayed(tStack = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), tStack, tStack, tStack, new ItemStack(Items.coal, 1, 1), tStack, tStack, tStack, tStack); - GT_ModHandler.removeRecipeDelayed(null, tStack = new ItemStack(Items.coal, 1), null, tStack, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iron, 1L), tStack, null, tStack, null); + GT_ModHandler.removeRecipeDelayed( + tStack = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), + tStack, + tStack, + tStack, + new ItemStack(Items.coal, 1, 0), + tStack, + tStack, + tStack, + tStack); + GT_ModHandler.removeRecipeDelayed( + tStack = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), + tStack, + tStack, + tStack, + new ItemStack(Items.coal, 1, 1), + tStack, + tStack, + tStack, + tStack); + GT_ModHandler.removeRecipeDelayed( + null, + tStack = new ItemStack(Items.coal, 1), + null, + tStack, + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iron, 1L), + tStack, + null, + tStack, + null); GT_ModHandler.removeFurnaceSmelting(new ItemStack(Blocks.hopper)); - - GT_Log.out.println("GT_Mod: Applying harder Recipes for several Blocks."); // TODO: Not Buffered + GT_Log.out.println("GT_Mod: Applying harder Recipes for several Blocks."); // TODO: Not Buffered if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "blockbreaker", false)) { - tStack = GT_ModHandler.getRecipeOutput(new ItemStack(Blocks.cobblestone, 1), new ItemStack(Items.iron_pickaxe, 1), new ItemStack(Blocks.cobblestone, 1), new ItemStack(Blocks.cobblestone, 1), new ItemStack(Blocks.piston, 1), new ItemStack(Blocks.cobblestone, 1), new ItemStack(Blocks.cobblestone, 1), new ItemStack(Items.redstone, 1), new ItemStack(Blocks.cobblestone, 1)); + tStack = GT_ModHandler.getRecipeOutput( + new ItemStack(Blocks.cobblestone, 1), + new ItemStack(Items.iron_pickaxe, 1), + new ItemStack(Blocks.cobblestone, 1), + new ItemStack(Blocks.cobblestone, 1), + new ItemStack(Blocks.piston, 1), + new ItemStack(Blocks.cobblestone, 1), + new ItemStack(Blocks.cobblestone, 1), + new ItemStack(Items.redstone, 1), + new ItemStack(Blocks.cobblestone, 1)); GT_ModHandler.removeRecipeDelayed(tStack); - GT_ModHandler.addCraftingRecipe(tStack, bits_no_remove_buffered, new Object[]{"RGR", "RPR", "RCR", 'G', OreDictNames.craftingGrinder, 'C', OrePrefixes.circuit.get(Materials.Advanced), 'R', OrePrefixes.plate.get(Materials.Steel), 'P', OreDictNames.craftingPiston} - ); + GT_ModHandler.addCraftingRecipe(tStack, bits_no_remove_buffered, new Object[] { + "RGR", + "RPR", + "RCR", + 'G', + OreDictNames.craftingGrinder, + 'C', + OrePrefixes.circuit.get(Materials.Advanced), + 'R', + OrePrefixes.plate.get(Materials.Steel), + 'P', + OreDictNames.craftingPiston + }); } if ((GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "beryliumreflector", true))) { GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("reactorReflectorThick", 1L, 1)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("reactorReflectorThick", 1L, 1), bits_no_remove_buffered, new Object[]{" N ", "NBN", " N ", 'B', OrePrefixes.plateDouble.get(Materials.Beryllium), 'N', GT_ModHandler.getIC2Item("reactorReflector", 1L, 1)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("reactorReflectorThick", 1L, 1), bits_no_remove_buffered, new Object[]{" B ", "NCN", " B ", 'B', OrePrefixes.plate.get(Materials.Beryllium), 'N', GT_ModHandler.getIC2Item("reactorReflector", 1L, 1), 'C', OrePrefixes.plate.get(Materials.TungstenCarbide)}); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("reactorReflectorThick", 1L, 1), bits_no_remove_buffered, new Object[] { + " N ", + "NBN", + " N ", + 'B', + OrePrefixes.plateDouble.get(Materials.Beryllium), + 'N', + GT_ModHandler.getIC2Item("reactorReflector", 1L, 1) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("reactorReflectorThick", 1L, 1), bits_no_remove_buffered, new Object[] { + " B ", + "NCN", + " B ", + 'B', + OrePrefixes.plate.get(Materials.Beryllium), + 'N', + GT_ModHandler.getIC2Item("reactorReflector", 1L, 1), + 'C', + OrePrefixes.plate.get(Materials.TungstenCarbide) + }); } if ((GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "reflector", true))) { GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("reactorReflector", 1L, 1)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("reactorReflector", 1L, 1), bits_no_remove_buffered, new Object[]{"TGT", "GSG", "TGT", 'T', OrePrefixes.plate.get(Materials.Tin), 'G', OrePrefixes.dust.get(Materials.Graphite), 'S', OrePrefixes.plateDouble.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("reactorReflector", 1L, 1), bits_no_remove_buffered, new Object[]{"TTT", "GSG", "TTT", 'T', OrePrefixes.plate.get(Materials.TinAlloy), 'G', OrePrefixes.dust.get(Materials.Graphite), 'S', OrePrefixes.plate.get(Materials.Beryllium)}); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("reactorReflector", 1L, 1), bits_no_remove_buffered, new Object[] { + "TGT", + "GSG", + "TGT", + 'T', + OrePrefixes.plate.get(Materials.Tin), + 'G', + OrePrefixes.dust.get(Materials.Graphite), + 'S', + OrePrefixes.plateDouble.get(Materials.Steel) + }); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("reactorReflector", 1L, 1), bits_no_remove_buffered, new Object[] { + "TTT", + "GSG", + "TTT", + 'T', + OrePrefixes.plate.get(Materials.TinAlloy), + 'G', + OrePrefixes.dust.get(Materials.Graphite), + 'S', + OrePrefixes.plate.get(Materials.Beryllium) + }); } if ((GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "cropharvester", true))) { GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("crophavester", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("crophavester", 1L), bits_no_remove_buffered, new Object[]{"ACA", "PMS", "WOW", 'M', ItemList.Hull_MV, 'C', OrePrefixes.circuit.get(Materials.Good), 'A', ItemList.Robot_Arm_LV, 'P', ItemList.Electric_Piston_LV, 'S', ItemList.Sensor_LV, 'W', OrePrefixes.toolHeadSense.get(Materials.Aluminium), 'O', ItemList.Conveyor_Module_LV}); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("crophavester", 1L), bits_no_remove_buffered, new Object[] { + "ACA", + "PMS", + "WOW", + 'M', + ItemList.Hull_MV, + 'C', + OrePrefixes.circuit.get(Materials.Good), + 'A', + ItemList.Robot_Arm_LV, + 'P', + ItemList.Electric_Piston_LV, + 'S', + ItemList.Sensor_LV, + 'W', + OrePrefixes.toolHeadSense.get(Materials.Aluminium), + 'O', + ItemList.Conveyor_Module_LV + }); } if ((GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "rtg", true))) { GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("RTGenerator", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("RTGenerator", 1L), bits_no_remove_buffered, new Object[]{"III", "IMI", "ICI", 'I', OrePrefixes.itemCasing.get(Materials.Steel), 'C', OrePrefixes.circuit.get(Materials.Master), 'M', ItemList.Hull_IV}); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("RTGenerator", 1L), bits_no_remove_buffered, new Object[] { + "III", + "IMI", + "ICI", + 'I', + OrePrefixes.itemCasing.get(Materials.Steel), + 'C', + OrePrefixes.circuit.get(Materials.Master), + 'M', + ItemList.Hull_IV + }); GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("RTHeatGenerator", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("RTHeatGenerator", 1L), bits_no_remove_buffered, new Object[]{"III", "IMB", "ICI", 'I', OrePrefixes.itemCasing.get(Materials.Steel), 'C', OrePrefixes.circuit.get(Materials.Master), 'M', ItemList.Hull_IV, 'B', GT_OreDictUnificator.get(OrePrefixes.block, Materials.Copper, 1)}); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("RTHeatGenerator", 1L), bits_no_remove_buffered, new Object[] { + "III", + "IMB", + "ICI", + 'I', + OrePrefixes.itemCasing.get(Materials.Steel), + 'C', + OrePrefixes.circuit.get(Materials.Master), + 'M', + ItemList.Hull_IV, + 'B', + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Copper, 1) + }); } if ((GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "windRotor", true))) { GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("carbonrotor", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("carbonrotor", 1L), bits_no_remove_buffered, new Object[]{"dBS", "BTB", "SBw", 'B', GT_ModHandler.getIC2Item("carbonrotorblade", 1), 'S', OrePrefixes.screw.get(Materials.Iridium), 'T', GT_ModHandler.getIC2Item("steelshaft", 1)}); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("carbonrotor", 1L), bits_no_remove_buffered, new Object[] { + "dBS", + "BTB", + "SBw", + 'B', + GT_ModHandler.getIC2Item("carbonrotorblade", 1), + 'S', + OrePrefixes.screw.get(Materials.Iridium), + 'T', + GT_ModHandler.getIC2Item("steelshaft", 1) + }); GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("steelrotor", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("steelrotor", 1L), bits_no_remove_buffered, new Object[]{"dBS", "BTB", "SBw", 'B', GT_ModHandler.getIC2Item("steelrotorblade", 1), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'T', GT_ModHandler.getIC2Item("ironshaft", 1)}); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("steelrotor", 1L), bits_no_remove_buffered, new Object[] { + "dBS", + "BTB", + "SBw", + 'B', + GT_ModHandler.getIC2Item("steelrotorblade", 1), + 'S', + OrePrefixes.screw.get(Materials.StainlessSteel), + 'T', + GT_ModHandler.getIC2Item("ironshaft", 1) + }); GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("ironrotor", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("ironrotor", 1L), bits_no_remove_buffered, new Object[]{"dBS", "BTB", "SBw", 'B', GT_ModHandler.getIC2Item("ironrotorblade", 1), 'S', OrePrefixes.screw.get(Materials.WroughtIron), 'T', GT_ModHandler.getIC2Item("ironshaft", 1)}); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("ironrotor", 1L), bits_no_remove_buffered, new Object[] { + "dBS", + "BTB", + "SBw", + 'B', + GT_ModHandler.getIC2Item("ironrotorblade", 1), + 'S', + OrePrefixes.screw.get(Materials.WroughtIron), + 'T', + GT_ModHandler.getIC2Item("ironshaft", 1) + }); GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("woodrotor", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("woodrotor", 1L), bits_no_remove_buffered, new Object[]{"dBS", "BTB", "SBw", 'B', GT_ModHandler.getIC2Item("woodrotorblade", 1), 'S', OrePrefixes.screw.get(Materials.WroughtIron), 'T', OrePrefixes.stickLong.get(Materials.WroughtIron)}); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("woodrotor", 1L), bits_no_remove_buffered, new Object[] { + "dBS", + "BTB", + "SBw", + 'B', + GT_ModHandler.getIC2Item("woodrotorblade", 1), + 'S', + OrePrefixes.screw.get(Materials.WroughtIron), + 'T', + OrePrefixes.stickLong.get(Materials.WroughtIron) + }); } if (GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Diamond, 1L) != null) { - tStack = GT_ModHandler.getRecipeOutput(GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Iron, 1L), new ItemStack(Items.redstone, 1), GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Gold, 1L), GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Gold, 1L), GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Diamond, 1L), new ItemStack(Items.diamond_pickaxe, 1), GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Diamond, 1L)); + tStack = GT_ModHandler.getRecipeOutput( + GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Iron, 1L), + new ItemStack(Items.redstone, 1), + GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Iron, 1L), + GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Gold, 1L), + GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Iron, 1L), + GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Gold, 1L), + GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Diamond, 1L), + new ItemStack(Items.diamond_pickaxe, 1), + GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Diamond, 1L)); if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "quarry", true)) { GT_ModHandler.removeRecipeByOutputDelayed(tStack); - GT_ModHandler.addCraftingRecipe(tStack, bits_no_remove_buffered, new Object[]{"ICI", "GIG", "DPD", 'C', OrePrefixes.circuit.get(Materials.Advanced), 'D', OrePrefixes.gear.get(Materials.Diamond), 'G', OrePrefixes.gear.get(Materials.Gold), 'I', OrePrefixes.gear.get(Materials.Steel), 'P', GT_ModHandler.getIC2Item("diamondDrill", 1L, 32767)}); + GT_ModHandler.addCraftingRecipe(tStack, bits_no_remove_buffered, new Object[] { + "ICI", + "GIG", + "DPD", + 'C', + OrePrefixes.circuit.get(Materials.Advanced), + 'D', + OrePrefixes.gear.get(Materials.Diamond), + 'G', + OrePrefixes.gear.get(Materials.Gold), + 'I', + OrePrefixes.gear.get(Materials.Steel), + 'P', + GT_ModHandler.getIC2Item("diamondDrill", 1L, 32767) + }); } if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "quarry", false)) { GT_ModHandler.removeRecipeByOutputDelayed(tStack); @@ -652,38 +3424,88 @@ public class GT_CraftingRecipeLoader implements Runnable { if ((GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "sugarpaper", true))) { GT_ModHandler.removeRecipeByOutputDelayed(new ItemStack(Items.paper)); GT_ModHandler.removeRecipeByOutputDelayed(new ItemStack(Items.sugar)); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Paper, 2), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SSS", " m ", 'S', new ItemStack(Items.reeds)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"Sm ", 'S', new ItemStack(Items.reeds)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.paper, Materials.Empty, 2), GT_ModHandler.RecipeBits.BUFFERED, new Object[]{" C ", "SSS", " C ", 'S', GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Paper, 1), 'C', new ItemStack(Blocks.stone_slab)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Paper, 2), + GT_ModHandler.RecipeBits.BUFFERED, + new Object[] {"SSS", " m ", 'S', new ItemStack(Items.reeds)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1), + GT_ModHandler.RecipeBits.BUFFERED, + new Object[] {"Sm ", 'S', new ItemStack(Items.reeds)}); + GT_ModHandler.addCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.paper, Materials.Empty, 2), + GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + " C ", + "SSS", + " C ", + 'S', + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Paper, 1), + 'C', + new ItemStack(Blocks.stone_slab) + }); } GT_Log.out.println("GT_Mod: Applying Recipes for Tools"); if ((GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "nanosaber", true))) { GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("nanoSaber", 1L)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("nanoSaber", 1L), bits_no_remove_buffered, new Object[]{"PI ", "PI ", "CLC", 'L', OrePrefixes.battery.get(Materials.Master), 'I', OrePrefixes.plateAlloy.get("Iridium"), 'P', OrePrefixes.plate.get(Materials.Platinum), 'C', OrePrefixes.circuit.get(Materials.Elite)}); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("nanoSaber", 1L), bits_no_remove_buffered, new Object[] { + "PI ", + "PI ", + "CLC", + 'L', + OrePrefixes.battery.get(Materials.Master), + 'I', + OrePrefixes.plateAlloy.get("Iridium"), + 'P', + OrePrefixes.plate.get(Materials.Platinum), + 'C', + OrePrefixes.circuit.get(Materials.Elite) + }); } if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "namefix", true)) { GT_ModHandler.removeRecipeByOutputDelayed(new ItemStack(Items.flint_and_steel, 1)); - GT_ModHandler.addCraftingRecipe(new ItemStack(Items.flint_and_steel, 1), bits_no_remove_buffered, new Object[]{"S ", " F", 'F', new ItemStack(Items.flint, 1), 'S', "nuggetSteel"}); + GT_ModHandler.addCraftingRecipe( + new ItemStack(Items.flint_and_steel, 1), + bits_no_remove_buffered, + new Object[] {"S ", " F", 'F', new ItemStack(Items.flint, 1), 'S', "nuggetSteel"}); } GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("diamondDrill", 1L)); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("diamondDrill", 1L), bits_no_remove_buffered, new Object[]{" D ", "DMD", "TAT", 'M', GT_ModHandler.getIC2Item("miningDrill", 1L, 32767), 'D', OreDictNames.craftingIndustrialDiamond, 'T', OrePrefixes.plate.get(Materials.Titanium), 'A', OrePrefixes.circuit.get(Materials.Advanced)}); + // GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("diamondDrill", 1L), bits_no_remove_buffered, new + // Object[]{" D ", "DMD", "TAT", 'M', GT_ModHandler.getIC2Item("miningDrill", 1L, 32767), 'D', + // OreDictNames.craftingIndustrialDiamond, 'T', OrePrefixes.plate.get(Materials.Titanium), 'A', + // OrePrefixes.circuit.get(Materials.Advanced)}); GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("miningDrill", 1L)); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("miningDrill", 1L), bits_no_remove_buffered, new Object[]{" S ", "SCS", "SBS", 'C', OrePrefixes.circuit.get(Materials.Basic), 'B', OrePrefixes.battery.get(Materials.Basic), 'S', GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "electricsteeltools", true) ? OrePrefixes.plate.get(Materials.StainlessSteel) : OrePrefixes.plate.get(Materials.Iron)}); + // GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("miningDrill", 1L), bits_no_remove_buffered, new + // Object[]{" S ", "SCS", "SBS", 'C', OrePrefixes.circuit.get(Materials.Basic), 'B', + // OrePrefixes.battery.get(Materials.Basic), 'S', + // GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "electricsteeltools", true) ? + // OrePrefixes.plate.get(Materials.StainlessSteel) : OrePrefixes.plate.get(Materials.Iron)}); GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("chainsaw", 1L)); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("chainsaw", 1L), bits_no_remove_buffered, new Object[]{"BS ", "SCS", " SS", 'C', OrePrefixes.circuit.get(Materials.Basic), 'B', OrePrefixes.battery.get(Materials.Basic), 'S', GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "electricsteeltools", true) ? OrePrefixes.plate.get(Materials.StainlessSteel) : OrePrefixes.plate.get(Materials.Iron)}); + // GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("chainsaw", 1L), bits_no_remove_buffered, new + // Object[]{"BS ", "SCS", " SS", 'C', OrePrefixes.circuit.get(Materials.Basic), 'B', + // OrePrefixes.battery.get(Materials.Basic), 'S', + // GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "electricsteeltools", true) ? + // OrePrefixes.plate.get(Materials.StainlessSteel) : OrePrefixes.plate.get(Materials.Iron)}); GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("electricHoe", 1L)); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("electricHoe", 1L), bits_no_remove_buffered, new Object[]{"SS ", " C ", " B ", 'C', OrePrefixes.circuit.get(Materials.Basic), 'B', OrePrefixes.battery.get(Materials.Basic), 'S', GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "electricsteeltools", true) ? OrePrefixes.plate.get(Materials.StainlessSteel) : OrePrefixes.plate.get(Materials.Iron)}); + // GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("electricHoe", 1L), bits_no_remove_buffered, new + // Object[]{"SS ", " C ", " B ", 'C', OrePrefixes.circuit.get(Materials.Basic), 'B', + // OrePrefixes.battery.get(Materials.Basic), 'S', + // GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "electricsteeltools", true) ? + // OrePrefixes.plate.get(Materials.StainlessSteel) : OrePrefixes.plate.get(Materials.Iron)}); GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getIC2Item("electricTreetap", 1L)); - //GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("electricTreetap", 1L), bits_no_remove_buffered, new Object[]{" B ", "SCS", "S ", 'C', OrePrefixes.circuit.get(Materials.Basic), 'B', OrePrefixes.battery.get(Materials.Basic), 'S', GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "electricsteeltools", true) ? OrePrefixes.plate.get(Materials.StainlessSteel) : OrePrefixes.plate.get(Materials.Iron)}); - - + // GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("electricTreetap", 1L), bits_no_remove_buffered, new + // Object[]{" B ", "SCS", "S ", 'C', OrePrefixes.circuit.get(Materials.Basic), 'B', + // OrePrefixes.battery.get(Materials.Basic), 'S', + // GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "electricsteeltools", true) ? + // OrePrefixes.plate.get(Materials.StainlessSteel) : OrePrefixes.plate.get(Materials.Iron)}); GT_Log.out.println("GT_Mod: Removing Q-Armor Recipes if configured."); if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "QHelmet", false)) { @@ -700,26 +3522,98 @@ public class GT_CraftingRecipeLoader implements Runnable { } if (Loader.isModLoaded("GraviSuite")) { - GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getModItem("GraviSuite", "advNanoChestPlate", 1, GT_Values.W)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem("GraviSuite", "advNanoChestPlate", 1, GT_Values.W), bits_no_remove_buffered, new Object[]{"CJC", "TNT", "WPW", 'C', OrePrefixes.plateAlloy.get(Materials.Advanced), 'T', OrePrefixes.plate.get(Materials.TungstenSteel), 'J', GT_ModHandler.getModItem("GraviSuite", "advJetpack", 1, GT_Values.W), 'N', GT_ModHandler.getModItem("IC2","itemArmorNanoChestplate", 1, GT_Values.W), 'W', OrePrefixes.wireGt12.get(Materials.Platinum), 'P', OrePrefixes.circuit.get(Materials.Elite)}); - - GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getModItem("GraviSuite", "advLappack", 1, GT_Values.W)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem("GraviSuite", "advLappack", 1, GT_Values.W), bits_no_remove_buffered, new Object[]{"CEC", "EJE", "WPW", 'C', OrePrefixes.plateAlloy.get(Materials.Carbon), 'J', GT_ModHandler.getModItem("IC2","itemArmorEnergypack", 1L, GT_Values.W), 'E', GT_ModHandler.getModItem("IC2","itemBatCrystal", 1L, GT_Values.W), 'W', OrePrefixes.wireGt04.get(Materials.Platinum), 'P', OrePrefixes.circuit.get(Materials.Data)}); - - GT_ModHandler.removeRecipeByOutputDelayed(GT_ModHandler.getModItem("GraviSuite", "advJetpack", 1, GT_Values.W)); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem("GraviSuite", "advJetpack", 1, GT_Values.W), bits_no_remove_buffered, new Object[]{"CJC", "EXE", "YZY", 'C', OrePrefixes.plateAlloy.get(Materials.Carbon), 'J', GT_ModHandler.getModItem("IC2", "itemArmorJetpackElectric", 1, GT_Values.W), 'E', OrePrefixes.plate.get(Materials.Titanium), 'X', GT_ModHandler.getModItem("IC2", "itemArmorAlloyChestplate", 1L), 'Z', OrePrefixes.circuit.get(Materials.Data), 'Y', OrePrefixes.wireGt02.get(Materials.Platinum)}); + GT_ModHandler.removeRecipeByOutputDelayed( + GT_ModHandler.getModItem("GraviSuite", "advNanoChestPlate", 1, GT_Values.W)); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getModItem("GraviSuite", "advNanoChestPlate", 1, GT_Values.W), + bits_no_remove_buffered, + new Object[] { + "CJC", + "TNT", + "WPW", + 'C', + OrePrefixes.plateAlloy.get(Materials.Advanced), + 'T', + OrePrefixes.plate.get(Materials.TungstenSteel), + 'J', + GT_ModHandler.getModItem("GraviSuite", "advJetpack", 1, GT_Values.W), + 'N', + GT_ModHandler.getModItem("IC2", "itemArmorNanoChestplate", 1, GT_Values.W), + 'W', + OrePrefixes.wireGt12.get(Materials.Platinum), + 'P', + OrePrefixes.circuit.get(Materials.Elite) + }); + + GT_ModHandler.removeRecipeByOutputDelayed( + GT_ModHandler.getModItem("GraviSuite", "advLappack", 1, GT_Values.W)); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getModItem("GraviSuite", "advLappack", 1, GT_Values.W), + bits_no_remove_buffered, + new Object[] { + "CEC", + "EJE", + "WPW", + 'C', + OrePrefixes.plateAlloy.get(Materials.Carbon), + 'J', + GT_ModHandler.getModItem("IC2", "itemArmorEnergypack", 1L, GT_Values.W), + 'E', + GT_ModHandler.getModItem("IC2", "itemBatCrystal", 1L, GT_Values.W), + 'W', + OrePrefixes.wireGt04.get(Materials.Platinum), + 'P', + OrePrefixes.circuit.get(Materials.Data) + }); + + GT_ModHandler.removeRecipeByOutputDelayed( + GT_ModHandler.getModItem("GraviSuite", "advJetpack", 1, GT_Values.W)); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getModItem("GraviSuite", "advJetpack", 1, GT_Values.W), + bits_no_remove_buffered, + new Object[] { + "CJC", + "EXE", + "YZY", + 'C', + OrePrefixes.plateAlloy.get(Materials.Carbon), + 'J', + GT_ModHandler.getModItem("IC2", "itemArmorJetpackElectric", 1, GT_Values.W), + 'E', + OrePrefixes.plate.get(Materials.Titanium), + 'X', + GT_ModHandler.getModItem("IC2", "itemArmorAlloyChestplate", 1L), + 'Z', + OrePrefixes.circuit.get(Materials.Data), + 'Y', + OrePrefixes.wireGt02.get(Materials.Platinum) + }); } - GT_ModHandler.addShapelessCraftingRecipe(Materials.Fireclay.getDust(2), new Object[]{Materials.Brick.getDust(1), Materials.Clay.getDust(1)}); + GT_ModHandler.addShapelessCraftingRecipe( + Materials.Fireclay.getDust(2), new Object[] {Materials.Brick.getDust(1), Materials.Clay.getDust(1)}); ItemStack flask = ItemList.VOLUMETRIC_FLASK.get(1); NBTTagCompound nbtFlask = new NBTTagCompound(); nbtFlask.setInteger("Capacity", 1000); flask.setTagCompound(nbtFlask); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ball.get(0), new FluidStack(FluidRegistry.getFluid("molten.borosilicateglass"), 144), flask, 44, 24); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Ball.get(0), + new FluidStack(FluidRegistry.getFluid("molten.borosilicateglass"), 144), + flask, + 44, + 24); if (Loader.isModLoaded("bartworks")) { - GT_ModHandler.addCraftingRecipe(ItemList.Casing_Advanced_Rhodium_Palladium.get(1L), bits, new Object[]{"PhP", "PFP", aTextPlateWrench, 'P', GT_ModHandler.getModItem("bartworks", "gt.bwMetaGeneratedplate", 1L, 88), 'F', OrePrefixes.frameGt.get(Materials.Chrome)}); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Advanced_Rhodium_Palladium.get(1L), bits, new Object[] { + "PhP", + "PFP", + aTextPlateWrench, + 'P', + GT_ModHandler.getModItem("bartworks", "gt.bwMetaGeneratedplate", 1L, 88), + 'F', + OrePrefixes.frameGt.get(Materials.Chrome) + }); } } } diff --git a/src/main/java/gregtech/loaders/postload/GT_CropLoader.java b/src/main/java/gregtech/loaders/postload/GT_CropLoader.java index 20f0c9e84f..5af34bf413 100644 --- a/src/main/java/gregtech/loaders/postload/GT_CropLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_CropLoader.java @@ -21,371 +21,1067 @@ public class GT_CropLoader implements Runnable { * */ ItemStack[] tI = { - ItemList.Crop_Drop_Indigo.get(4L), ItemList.Crop_Drop_MilkWart.get(4L), new ItemStack(Blocks.brown_mushroom, 4), new ItemStack(Blocks.red_mushroom, 4) + ItemList.Crop_Drop_Indigo.get(4L), + ItemList.Crop_Drop_MilkWart.get(4L), + new ItemStack(Blocks.brown_mushroom, 4), + new ItemStack(Blocks.red_mushroom, 4) }; - new GT_BaseCrop(124, "Indigo", "Eloraam", tI[0], 2, 4, 0, 1, 4, 1, 1, 0, 4, 0, new String[] { - "Flower", - "Blue", - "Ingredient" - }, ItemList.Crop_Drop_Indigo.get(1L), null); - new GT_BaseCrop(125, "Flax", "Eloraam", null, 2, 4, 0, 1, 4, 1, 1, 2, 0, 1, new String[] { - "Silk", - "Tendrilly", - "Addictive" - }, new ItemStack(Items.string, 1), null); - new GT_BaseCrop(126, "Oilberries", "Spacetoad", null, 9, 4, 0, 1, 4, 6, 1, 2, 1, 12, new String[] { - "Fire", - "Dark", - "Reed", - "Rotten", - "Coal", - "Oil" - }, ItemList.Crop_Drop_OilBerry.get(1L), null); - new GT_BaseCrop(127, "Bobsyeruncleranks", "GenerikB", null, 11, 4, 0, 1, 4, 4, 0, 8, 2, 9, new String[] { - "Shiny", - "Tendrilly", - "Emerald", - "Berylium", - "Crystal" - }, Materials.Emerald, ItemList.Crop_Drop_BobsYerUncleRanks.get(1L), new ItemStack[] { - new ItemStack(Items.emerald, 1) - }); - new GT_BaseCrop(128, "Diareed", "Direwolf20", null, 12, 4, 0, 1, 4, 5, 0, 10, 2, 10, new String[] { - "Fire", - "Shiny", - "Reed", - "Coal", - "Diamond", - "Crystal" - }, Materials.Diamond, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond, 1L), new ItemStack[] { - new ItemStack(Items.diamond, 1) - }); - new GT_BaseCrop(129, "Withereed", "CovertJaguar", null, 8, 4, 0, 1, 4, 2, 0, 4, 1, 3, new String[] { - "Fire", - "Undead", - "Reed", - "Coal", - "Rotten", - "Wither" - }, Materials.Coal, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L), new ItemStack[] { - new ItemStack(Items.coal, 1), new ItemStack(Items.coal, 1) - }); - new GT_BaseCrop(130, "Blazereed", "Mr. Brain", null, 6, 4, 0, 1, 4, 0, 4, 1, 0, 0, new String[] { - "Fire", - "Blaze", - "Reed", - "Sulfur" - }, new ItemStack(Items.blaze_powder, 1), new ItemStack[] { - new ItemStack(Items.blaze_rod, 1) - }); - new GT_BaseCrop(131, "Eggplant", "Link", null, 6, 3, 900, 2, 3, 0, 4, 1, 0, 0, new String[] { - "Chicken", - "Egg", - "Food", - "Feather", - "Flower", - "Addictive" - }, new ItemStack(Items.egg, 1), new ItemStack[] { - new ItemStack(Items.chicken, 1), new ItemStack(Items.feather, 1), new ItemStack(Items.feather, 1), new ItemStack(Items.feather, 1) - }); - new GT_BaseCrop(132, "Corium", "Gregorius Techneticies", null, 6, 4, 0, 1, 4, 0, 2, 3, 1, 0, new String[] { - "Cow", - "Silk", - "Tendrilly" - }, new ItemStack(Items.leather, 1), null); - new GT_BaseCrop(133, "Corpseplant", "Mr. Kenny", null, 5, 4, 0, 1, 4, 0, 2, 1, 0, 3, new String[] { - "Toxic", - "Undead", - "Tendrilly", - "Food", - "Rotten" - }, new ItemStack(Items.rotten_flesh, 1), new ItemStack[] { - ItemList.Dye_Bonemeal.get(1L), ItemList.Dye_Bonemeal.get(1L), new ItemStack(Items.bone, 1) - }); - new GT_BaseCrop(134, "Creeperweed", "General Spaz", null, 7, 4, 0, 1, 4, 3, 0, 5, 1, 3, new String[] { - "Creeper", - "Tendrilly", - "Explosive", - "Fire", - "Sulfur", - "Saltpeter", - "Coal" - }, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gunpowder, 1L), null); - new GT_BaseCrop(135, "Enderbloom", "RichardG", null, 10, 4, 0, 1, 4, 5, 0, 2, 1, 6, new String[] { - "Ender", - "Flower", - "Shiny" - }, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.EnderPearl, 1L), new ItemStack[] { - new ItemStack(Items.ender_pearl, 1), new ItemStack(Items.ender_pearl, 1), new ItemStack(Items.ender_eye, 1) - }); - new GT_BaseCrop(136, "Meatrose", "VintageBeef", null, 7, 4, 1500, 1, 4, 0, 4, 1, 3, 0, new String[] { - "Food", - "Flower", - "Cow", - "Fish", - "Chicken", - "Pig" - }, new ItemStack(Items.dye, 1, 9), new ItemStack[] { - new ItemStack(Items.beef, 1), new ItemStack(Items.porkchop, 1), new ItemStack(Items.chicken, 1), new ItemStack(Items.fish, 1) - }); - new GT_BaseCrop(137, "Milkwart", "Mr. Brain", tI[1], 6, 3, 900, 1, 3, 0, 3, 0, 1, 0, new String[] { - "Food", - "Milk", - "Cow" - }, ItemList.Crop_Drop_MilkWart.get(1L), null); - new GT_BaseCrop(138, "Slimeplant", "Neowulf", null, 6, 4, 0, 3, 4, 3, 0, 0, 0, 2, new String[] { - "Slime", - "Bouncy", - "Sticky", - "Bush" - }, new ItemStack(Items.slime_ball, 1), null); - new GT_BaseCrop(139, "Spidernip", "Mr. Kenny", null, 4, 4, 600, 1, 4, 2, 1, 4, 1, 3, new String[] { - "Toxic", - "Silk", - "Spider", - "Flower", - "Ingredient", - "Addictive" - }, new ItemStack(Items.string, 1), new ItemStack[] { - new ItemStack(Items.spider_eye, 1), new ItemStack(Blocks.web, 1) - }); - new GT_BaseCrop(140, "Tearstalks", "Neowulf", null, 8, 4, 0, 1, 4, 1, 2, 0, 0, 0, new String[] { - "Healing", - "Nether", - "Ingredient", - "Reed", - "Ghast" - }, new ItemStack(Items.ghast_tear, 1), null); - new GT_BaseCrop(141, "Tine", "Gregorius Techneticies", null, 5, 3, 0, 2, 3, 2, 0, 3, 0, 0, new String[] { - "Shiny", - "Metal", - "Pine", - "Tin", - "Bush" - }, Materials.Tin, ItemList.Crop_Drop_Tine.get(1L), null); - new GT_BaseCrop(142, "Coppon", "Mr. Brain", null, 6, 3, 0, 2, 3, 2, 0, 1, 1, 1, new String[] { - "Shiny", - "Metal", - "Cotton", - "Copper", - "Bush" - }, Materials.Copper, ItemList.Crop_Drop_Coppon.get(1L), null); - new GT_BaseCrop(143, "Brown Mushrooms", "Mr. Brain", tI[2], 1, 3, 0, 1, 3, 0, 2, 0, 0, 2, new String[] { - "Food", - "Mushroom", - "Ingredient" - }, new ItemStack(Blocks.brown_mushroom, 1), null); - new GT_BaseCrop(144, "Red Mushrooms", "Mr. Kenny", tI[3], 1, 3, 0, 1, 3, 0, 1, 3, 0, 2, new String[] { - "Toxic", - "Mushroom", - "Ingredient" - }, new ItemStack(Blocks.red_mushroom, 1), null); - new GT_BaseCrop(145, "Argentia", "Eloraam", null, 7, 4, 0, 3, 4, 2, 0, 1, 0, 0, new String[] { - "Shiny", - "Metal", - "Silver", - "Reed" - }, Materials.Silver, ItemList.Crop_Drop_Argentia.get(1L), null); - new GT_BaseCrop(146, "Plumbilia", "KingLemming", null, 6, 4, 0, 3, 4, 2, 0, 3, 1, 1, new String[] { - "Heavy", - "Metal", - "Lead", - "Reed" - }, Materials.Lead, ItemList.Crop_Drop_Plumbilia.get(1L), null); - new GT_BaseCrop(147, "Steeleafranks", "Benimatic", null, 10, 4, 0, 1, 4, 3, 0, 7, 2, 8, new String[] { - "Metal", - "Tendrilly", - "Iron" - }, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steeleaf, 1L), new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steeleaf, 1L) - }); - new GT_BaseCrop(148, "Liveroots", "Benimatic", null, 8, 4, 0, 1, 4, 2, 0, 5, 2, 6, new String[] { - "Wood", - "Tendrilly" - }, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.LiveRoot, 1L), new ItemStack[] { - ItemList.TF_LiveRoot.get(1L) - }); - new GT_BaseCrop(149, "Trollplant", "unknown", null, 6, 5, 1000, 1, 4, 0, 0, 5, 2, 8, new String[] { - "Troll", - "Bad", - "Scrap" - }, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.FoolsRuby, 1L), new ItemStack[] { - ItemList.IC2_Plantball.get(1), ItemList.IC2_Scrap.get(1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plutonium241, 1L) - }); - new GT_BaseCrop(150, "Lazulia", "unknown", null, 7, 4, 0, 2, 4, 4, 2, 5, 7, 4, new String[] { - "Shiny", - "Bad", - "Crystal", - "Lapis" - }, Materials.Lapis, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lapis, 1L), null); - new GT_BaseCrop(151, "Glowheat", "unknown", null, 10, 7, 0, 5, 7, 3, 3, 3, 5, 4, new String[] { - "Light", - "Shiny", - "Crystal" - }, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), null); - new GT_BaseCrop(153, "Fertilia", "unknown", null, 3, 4, 0, 1, 4, 2, 3, 5, 4, 8, new String[] { - "Growth", - "Healing", - "Flower" - }, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, 1L), new ItemStack[] { - ItemList.IC2_Fertilizer.get(1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Apatite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphate, 1L) - }); - new GT_BaseCrop(154, "Bauxia", "unknown", null, 6, 3, 0, 2, 3, 5, 0, 2, 3, 3, new String[] { - "Metal", - "Aluminium", - "Reed", - "Aluminium" - }, Materials.Aluminium, ItemList.Crop_Drop_Bauxite.get(1), null); - new GT_BaseCrop(155, "Titania", "unknown", null, 9, 3, 0, 2, 3, 5, 0, 3, 3, 1, new String[] { - "Metal", - "Heavy", - "Reed", - "Titanium" - }, Materials.Titanium, ItemList.Crop_Drop_Ilmenite.get(1), null); - new GT_BaseCrop(156, "Reactoria", "unknown", null, 12, 4, 0, 2, 4, 4, 0, 1, 2, 1, new String[] { - "Radioactive", - "Metal", - "Danger", - "Uranium" - }, Materials.Uranium, ItemList.Crop_Drop_Pitchblende.get(1), new ItemStack[] { - ItemList.Crop_Drop_Uraninite.get(1) - }); - new GT_BaseCrop(157, "God of Thunder", "unknown", null, 9, 4, 0, 2, 4, 3, 0, 5, 1, 2, new String[] { - "Radioactive", - "Metal", - "Coal", - "Thorium" - }, Materials.Thorium, ItemList.Crop_Drop_Thorium.get(1), null); - new GT_BaseCrop(158, "Transformium", "unknown", null, 12, 4, 2500, 1, 4, 6, 2, 1, 6, 1, new String[] { - "Transform", - "Coal", - "Reed" - }, ItemList.Crop_Drop_UUABerry.get(1L), new ItemStack[] { - ItemList.Crop_Drop_UUABerry.get(1L), ItemList.Crop_Drop_UUABerry.get(1L), ItemList.Crop_Drop_UUABerry.get(1L), ItemList.Crop_Drop_UUABerry.get(1L), ItemList.Crop_Drop_UUMBerry.get(1L) - }); - new GT_BaseCrop(159, "Starwart", "unknown", null, 12, 4, 4000, 1, 4, 2, 0, 0, 1, 0, new String[] { - "Wither", - "Nether", - "Undead", - "Netherstar" - }, Materials.NetherStar, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L), new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 1L), new ItemStack(Items.skull, 1), new ItemStack(Items.skull, 1, 1), new ItemStack(Items.skull, 1, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NetherStar, 1L) - }); - new GT_BaseCrop(160, "Zomplant", "unknown", null, 3, 4, 0, 1, 4, 1, 3, 4, 2, 6, new String[] { - "Zombie", - "Rotten", - "Undead" - }, new ItemStack(Items.rotten_flesh), null); - new GT_BaseCrop(161, "Nickelback", "unknown", null, 5, 3, 0, 2, 3, 3, 0, 1, 2, 2, new String[] { - "Metal", - "Fire", - "Alloy" - }, Materials.Nickel, ItemList.Crop_Drop_Nickel.get(1), null); - new GT_BaseCrop(162, "Galvania", "unknown", null, 6, 3, 0, 2, 3, 3, 0, 2, 2, 3, new String[] { - "Metal", - "Alloy", - "Bush" - }, Materials.Zinc, ItemList.Crop_Drop_Zinc.get(1), null); - new GT_BaseCrop(163, "Evil Ore", "unknown", null, 8, 4, 0, 3, 4, 4, 0, 2, 1, 3, new String[] { - "Crystal", - "Fire", - "Nether" - }, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NetherQuartz, 1L), new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.gem, Materials.NetherQuartz, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CertusQuartz, 1L), - }); - new GT_BaseCrop(164, "Olivia", "unknown", null, 2, 4, 0, 3, 4, 1, 0, 1, 4, 0, new String[] { - "Crystal", - "Shiny", - "Processing", - "Olivine" - }, Materials.Olivine, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Olivine, 1L), new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Olivine, 1L), - }); - new GT_BaseCrop(165, "Sapphirum", "unknown", null, 4, 4, 0, 3, 4, 1, 0, 1, 5, 0, new String[] { - "Crystal", - "Shiny", - "Metal", - "Sapphire" - }, Materials.Sapphire, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sapphire, 1L), new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Sapphire, 1L), - }); - new GT_BaseCrop(166, "Pyrolusium", "unknown", null, 12, 3, 0, 2, 3, 1, 0, 1, 1, 0, new String[] { - "Metal", - "Clean", - "Bush", - "Manganese" - }, Materials.Manganese, ItemList.Crop_Drop_Manganese.get(1), null); - new GT_BaseCrop(167, "Scheelinium", "unknown", null, 12, 3, 0, 2, 3, 3, 0, 1, 1, 0, new String[] { - "Metal", - "Hard", - "Bush", - "Tungsten" - }, Materials.Tungsten, ItemList.Crop_Drop_Scheelite.get(1), null); - new GT_BaseCrop(168, "Platina", "unknown", null, 11, 4, 0, 1, 4, 3, 0, 0, 3, 0, new String[] { - "Metal", - "Shiny", - "Reed", - "Platinum" - }, Materials.Platinum, ItemList.Crop_Drop_Platinum.get(1), null); - new GT_BaseCrop(169, "Quantaria", "unknown", null, 12, 4, 1000, 1, 4, 4, 0, 0, 1, 0, new String[] { - "Metal", - "Iridium", - "Reed" - }, Materials.Iridium, ItemList.Crop_Drop_Iridium.get(1), new ItemStack[] { - ItemList.Crop_Drop_Osmium.get(1) - }); - new GT_BaseCrop(170, "Stargatium", "unknown", null, 12, 4, 1500, 1, 4, 4, 0, 0, 2, 0, new String[] { - "Metal", - "Heavy", - "Alien", - "Naquadah" - }, Materials.Naquadah, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Endstone, 1L), new ItemStack[] { - ItemList.Crop_Drop_Naquadah.get(1) - }); - new GT_BaseCrop(171, "Lemon", "unknown", null, 4, 4, 0, 1, 4, 1, 1, 0, 2, 0, new String[] { - "Food", - "Yellow", - "Sour" - }, ItemList.Crop_Drop_Lemon.get(1), null); - new GT_BaseCrop(172, "Chilly", "unknown", null, 4, 4, 0, 1, 4, 1, 1, 0, 2, 0, new String[] { - "Food", - "Red", - "Spicy" - }, ItemList.Crop_Drop_Chilly.get(1), null); - new GT_BaseCrop(173, "Tomato", "unknown", null, 4, 4, 0, 1, 4, 1, 1, 0, 2, 0, new String[] { - "Food", - "Red" - }, ItemList.Crop_Drop_Tomato.get(1), new ItemStack[] { - ItemList.Crop_Drop_MTomato.get(1) - }); - new GT_BaseCrop(174, "Grape", "unknown", null, 4, 4, 0, 1, 4, 1, 1, 0, 2, 0, new String[] { - "Food", - "Purple" - }, ItemList.Crop_Drop_Grapes.get(1), null); - new GT_BaseCrop(175, "Onion", "unknown", null, 4, 4, 0, 1, 4, 1, 1, 0, 2, 0, new String[] { - "Food", - "Brown" - }, ItemList.Crop_Drop_Onion.get(1), null); - new GT_BaseCrop(176, "Cucumber", "unknown", null, 4, 4, 0, 1, 4, 1, 1, 0, 2, 0, new String[] { - "Food", - "Green" - }, ItemList.Crop_Drop_Cucumber.get(1), null); - new GT_BaseCrop(177, "Tea", "unknown", null, 4, 4, 0, 1, 4, 1, 1, 0, 2, 0, new String[] { - "Food", - "Green", - "Ingredient" - }, ItemList.Crop_Drop_TeaLeaf.get(1), null); - new GT_BaseCrop(178, "Rape", "unknown", null, 4, 4, 0, 1, 4, 1, 1, 0, 2, 0, new String[] { - "Food", - "Yellow", - "Oil" - }, ItemList.Crop_Drop_Rape.get(1), null); - new GT_BaseCrop(179, "Micadia", "bartimaeusnek", null, 9, 3, 0, 2, 3, 2, 0, 3, 0, 0, new String[] { - "Metal", - "Pine", - "Mica", - "Bush" - }, Materials.Mica, ItemList.Crop_Drop_Mica.get(1L), null); + new GT_BaseCrop( + 124, + "Indigo", + "Eloraam", + tI[0], + 2, + 4, + 0, + 1, + 4, + 1, + 1, + 0, + 4, + 0, + new String[] {"Flower", "Blue", "Ingredient"}, + ItemList.Crop_Drop_Indigo.get(1L), + null); + new GT_BaseCrop( + 125, + "Flax", + "Eloraam", + null, + 2, + 4, + 0, + 1, + 4, + 1, + 1, + 2, + 0, + 1, + new String[] {"Silk", "Tendrilly", "Addictive"}, + new ItemStack(Items.string, 1), + null); + new GT_BaseCrop( + 126, + "Oilberries", + "Spacetoad", + null, + 9, + 4, + 0, + 1, + 4, + 6, + 1, + 2, + 1, + 12, + new String[] {"Fire", "Dark", "Reed", "Rotten", "Coal", "Oil"}, + ItemList.Crop_Drop_OilBerry.get(1L), + null); + new GT_BaseCrop( + 127, + "Bobsyeruncleranks", + "GenerikB", + null, + 11, + 4, + 0, + 1, + 4, + 4, + 0, + 8, + 2, + 9, + new String[] {"Shiny", "Tendrilly", "Emerald", "Berylium", "Crystal"}, + Materials.Emerald, + ItemList.Crop_Drop_BobsYerUncleRanks.get(1L), + new ItemStack[] {new ItemStack(Items.emerald, 1)}); + new GT_BaseCrop( + 128, + "Diareed", + "Direwolf20", + null, + 12, + 4, + 0, + 1, + 4, + 5, + 0, + 10, + 2, + 10, + new String[] {"Fire", "Shiny", "Reed", "Coal", "Diamond", "Crystal"}, + Materials.Diamond, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond, 1L), + new ItemStack[] {new ItemStack(Items.diamond, 1)}); + new GT_BaseCrop( + 129, + "Withereed", + "CovertJaguar", + null, + 8, + 4, + 0, + 1, + 4, + 2, + 0, + 4, + 1, + 3, + new String[] {"Fire", "Undead", "Reed", "Coal", "Rotten", "Wither"}, + Materials.Coal, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L), + new ItemStack[] {new ItemStack(Items.coal, 1), new ItemStack(Items.coal, 1)}); + new GT_BaseCrop( + 130, + "Blazereed", + "Mr. Brain", + null, + 6, + 4, + 0, + 1, + 4, + 0, + 4, + 1, + 0, + 0, + new String[] {"Fire", "Blaze", "Reed", "Sulfur"}, + new ItemStack(Items.blaze_powder, 1), + new ItemStack[] {new ItemStack(Items.blaze_rod, 1)}); + new GT_BaseCrop( + 131, + "Eggplant", + "Link", + null, + 6, + 3, + 900, + 2, + 3, + 0, + 4, + 1, + 0, + 0, + new String[] {"Chicken", "Egg", "Food", "Feather", "Flower", "Addictive"}, + new ItemStack(Items.egg, 1), + new ItemStack[] { + new ItemStack(Items.chicken, 1), + new ItemStack(Items.feather, 1), + new ItemStack(Items.feather, 1), + new ItemStack(Items.feather, 1) + }); + new GT_BaseCrop( + 132, + "Corium", + "Gregorius Techneticies", + null, + 6, + 4, + 0, + 1, + 4, + 0, + 2, + 3, + 1, + 0, + new String[] {"Cow", "Silk", "Tendrilly"}, + new ItemStack(Items.leather, 1), + null); + new GT_BaseCrop( + 133, + "Corpseplant", + "Mr. Kenny", + null, + 5, + 4, + 0, + 1, + 4, + 0, + 2, + 1, + 0, + 3, + new String[] {"Toxic", "Undead", "Tendrilly", "Food", "Rotten"}, + new ItemStack(Items.rotten_flesh, 1), + new ItemStack[] { + ItemList.Dye_Bonemeal.get(1L), ItemList.Dye_Bonemeal.get(1L), new ItemStack(Items.bone, 1) + }); + new GT_BaseCrop( + 134, + "Creeperweed", + "General Spaz", + null, + 7, + 4, + 0, + 1, + 4, + 3, + 0, + 5, + 1, + 3, + new String[] {"Creeper", "Tendrilly", "Explosive", "Fire", "Sulfur", "Saltpeter", "Coal"}, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gunpowder, 1L), + null); + new GT_BaseCrop( + 135, + "Enderbloom", + "RichardG", + null, + 10, + 4, + 0, + 1, + 4, + 5, + 0, + 2, + 1, + 6, + new String[] {"Ender", "Flower", "Shiny"}, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.EnderPearl, 1L), + new ItemStack[] { + new ItemStack(Items.ender_pearl, 1), + new ItemStack(Items.ender_pearl, 1), + new ItemStack(Items.ender_eye, 1) + }); + new GT_BaseCrop( + 136, + "Meatrose", + "VintageBeef", + null, + 7, + 4, + 1500, + 1, + 4, + 0, + 4, + 1, + 3, + 0, + new String[] {"Food", "Flower", "Cow", "Fish", "Chicken", "Pig"}, + new ItemStack(Items.dye, 1, 9), + new ItemStack[] { + new ItemStack(Items.beef, 1), + new ItemStack(Items.porkchop, 1), + new ItemStack(Items.chicken, 1), + new ItemStack(Items.fish, 1) + }); + new GT_BaseCrop( + 137, + "Milkwart", + "Mr. Brain", + tI[1], + 6, + 3, + 900, + 1, + 3, + 0, + 3, + 0, + 1, + 0, + new String[] {"Food", "Milk", "Cow"}, + ItemList.Crop_Drop_MilkWart.get(1L), + null); + new GT_BaseCrop( + 138, + "Slimeplant", + "Neowulf", + null, + 6, + 4, + 0, + 3, + 4, + 3, + 0, + 0, + 0, + 2, + new String[] {"Slime", "Bouncy", "Sticky", "Bush"}, + new ItemStack(Items.slime_ball, 1), + null); + new GT_BaseCrop( + 139, + "Spidernip", + "Mr. Kenny", + null, + 4, + 4, + 600, + 1, + 4, + 2, + 1, + 4, + 1, + 3, + new String[] {"Toxic", "Silk", "Spider", "Flower", "Ingredient", "Addictive"}, + new ItemStack(Items.string, 1), + new ItemStack[] {new ItemStack(Items.spider_eye, 1), new ItemStack(Blocks.web, 1)}); + new GT_BaseCrop( + 140, + "Tearstalks", + "Neowulf", + null, + 8, + 4, + 0, + 1, + 4, + 1, + 2, + 0, + 0, + 0, + new String[] {"Healing", "Nether", "Ingredient", "Reed", "Ghast"}, + new ItemStack(Items.ghast_tear, 1), + null); + new GT_BaseCrop( + 141, + "Tine", + "Gregorius Techneticies", + null, + 5, + 3, + 0, + 2, + 3, + 2, + 0, + 3, + 0, + 0, + new String[] {"Shiny", "Metal", "Pine", "Tin", "Bush"}, + Materials.Tin, + ItemList.Crop_Drop_Tine.get(1L), + null); + new GT_BaseCrop( + 142, + "Coppon", + "Mr. Brain", + null, + 6, + 3, + 0, + 2, + 3, + 2, + 0, + 1, + 1, + 1, + new String[] {"Shiny", "Metal", "Cotton", "Copper", "Bush"}, + Materials.Copper, + ItemList.Crop_Drop_Coppon.get(1L), + null); + new GT_BaseCrop( + 143, + "Brown Mushrooms", + "Mr. Brain", + tI[2], + 1, + 3, + 0, + 1, + 3, + 0, + 2, + 0, + 0, + 2, + new String[] {"Food", "Mushroom", "Ingredient"}, + new ItemStack(Blocks.brown_mushroom, 1), + null); + new GT_BaseCrop( + 144, + "Red Mushrooms", + "Mr. Kenny", + tI[3], + 1, + 3, + 0, + 1, + 3, + 0, + 1, + 3, + 0, + 2, + new String[] {"Toxic", "Mushroom", "Ingredient"}, + new ItemStack(Blocks.red_mushroom, 1), + null); + new GT_BaseCrop( + 145, + "Argentia", + "Eloraam", + null, + 7, + 4, + 0, + 3, + 4, + 2, + 0, + 1, + 0, + 0, + new String[] {"Shiny", "Metal", "Silver", "Reed"}, + Materials.Silver, + ItemList.Crop_Drop_Argentia.get(1L), + null); + new GT_BaseCrop( + 146, + "Plumbilia", + "KingLemming", + null, + 6, + 4, + 0, + 3, + 4, + 2, + 0, + 3, + 1, + 1, + new String[] {"Heavy", "Metal", "Lead", "Reed"}, + Materials.Lead, + ItemList.Crop_Drop_Plumbilia.get(1L), + null); + new GT_BaseCrop( + 147, + "Steeleafranks", + "Benimatic", + null, + 10, + 4, + 0, + 1, + 4, + 3, + 0, + 7, + 2, + 8, + new String[] {"Metal", "Tendrilly", "Iron"}, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steeleaf, 1L), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steeleaf, 1L)}); + new GT_BaseCrop( + 148, + "Liveroots", + "Benimatic", + null, + 8, + 4, + 0, + 1, + 4, + 2, + 0, + 5, + 2, + 6, + new String[] {"Wood", "Tendrilly"}, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.LiveRoot, 1L), + new ItemStack[] {ItemList.TF_LiveRoot.get(1L)}); + new GT_BaseCrop( + 149, + "Trollplant", + "unknown", + null, + 6, + 5, + 1000, + 1, + 4, + 0, + 0, + 5, + 2, + 8, + new String[] {"Troll", "Bad", "Scrap"}, + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.FoolsRuby, 1L), + new ItemStack[] { + ItemList.IC2_Plantball.get(1), + ItemList.IC2_Scrap.get(1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plutonium241, 1L) + }); + new GT_BaseCrop( + 150, + "Lazulia", + "unknown", + null, + 7, + 4, + 0, + 2, + 4, + 4, + 2, + 5, + 7, + 4, + new String[] {"Shiny", "Bad", "Crystal", "Lapis"}, + Materials.Lapis, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lapis, 1L), + null); + new GT_BaseCrop( + 151, + "Glowheat", + "unknown", + null, + 10, + 7, + 0, + 5, + 7, + 3, + 3, + 3, + 5, + 4, + new String[] {"Light", "Shiny", "Crystal"}, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), + null); + new GT_BaseCrop( + 153, + "Fertilia", + "unknown", + null, + 3, + 4, + 0, + 1, + 4, + 2, + 3, + 5, + 4, + 8, + new String[] {"Growth", "Healing", "Flower"}, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, 1L), + new ItemStack[] { + ItemList.IC2_Fertilizer.get(1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Apatite, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphate, 1L) + }); + new GT_BaseCrop( + 154, + "Bauxia", + "unknown", + null, + 6, + 3, + 0, + 2, + 3, + 5, + 0, + 2, + 3, + 3, + new String[] {"Metal", "Aluminium", "Reed", "Aluminium"}, + Materials.Aluminium, + ItemList.Crop_Drop_Bauxite.get(1), + null); + new GT_BaseCrop( + 155, + "Titania", + "unknown", + null, + 9, + 3, + 0, + 2, + 3, + 5, + 0, + 3, + 3, + 1, + new String[] {"Metal", "Heavy", "Reed", "Titanium"}, + Materials.Titanium, + ItemList.Crop_Drop_Ilmenite.get(1), + null); + new GT_BaseCrop( + 156, + "Reactoria", + "unknown", + null, + 12, + 4, + 0, + 2, + 4, + 4, + 0, + 1, + 2, + 1, + new String[] {"Radioactive", "Metal", "Danger", "Uranium"}, + Materials.Uranium, + ItemList.Crop_Drop_Pitchblende.get(1), + new ItemStack[] {ItemList.Crop_Drop_Uraninite.get(1)}); + new GT_BaseCrop( + 157, + "God of Thunder", + "unknown", + null, + 9, + 4, + 0, + 2, + 4, + 3, + 0, + 5, + 1, + 2, + new String[] {"Radioactive", "Metal", "Coal", "Thorium"}, + Materials.Thorium, + ItemList.Crop_Drop_Thorium.get(1), + null); + new GT_BaseCrop( + 158, + "Transformium", + "unknown", + null, + 12, + 4, + 2500, + 1, + 4, + 6, + 2, + 1, + 6, + 1, + new String[] {"Transform", "Coal", "Reed"}, + ItemList.Crop_Drop_UUABerry.get(1L), + new ItemStack[] { + ItemList.Crop_Drop_UUABerry.get(1L), + ItemList.Crop_Drop_UUABerry.get(1L), + ItemList.Crop_Drop_UUABerry.get(1L), + ItemList.Crop_Drop_UUABerry.get(1L), + ItemList.Crop_Drop_UUMBerry.get(1L) + }); + new GT_BaseCrop( + 159, + "Starwart", + "unknown", + null, + 12, + 4, + 4000, + 1, + 4, + 2, + 0, + 0, + 1, + 0, + new String[] {"Wither", "Nether", "Undead", "Netherstar"}, + Materials.NetherStar, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 1L), + new ItemStack(Items.skull, 1), + new ItemStack(Items.skull, 1, 1), + new ItemStack(Items.skull, 1, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NetherStar, 1L) + }); + new GT_BaseCrop( + 160, + "Zomplant", + "unknown", + null, + 3, + 4, + 0, + 1, + 4, + 1, + 3, + 4, + 2, + 6, + new String[] {"Zombie", "Rotten", "Undead"}, + new ItemStack(Items.rotten_flesh), + null); + new GT_BaseCrop( + 161, + "Nickelback", + "unknown", + null, + 5, + 3, + 0, + 2, + 3, + 3, + 0, + 1, + 2, + 2, + new String[] {"Metal", "Fire", "Alloy"}, + Materials.Nickel, + ItemList.Crop_Drop_Nickel.get(1), + null); + new GT_BaseCrop( + 162, + "Galvania", + "unknown", + null, + 6, + 3, + 0, + 2, + 3, + 3, + 0, + 2, + 2, + 3, + new String[] {"Metal", "Alloy", "Bush"}, + Materials.Zinc, + ItemList.Crop_Drop_Zinc.get(1), + null); + new GT_BaseCrop( + 163, + "Evil Ore", + "unknown", + null, + 8, + 4, + 0, + 3, + 4, + 4, + 0, + 2, + 1, + 3, + new String[] {"Crystal", "Fire", "Nether"}, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NetherQuartz, 1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.NetherQuartz, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CertusQuartz, 1L), + }); + new GT_BaseCrop( + 164, + "Olivia", + "unknown", + null, + 2, + 4, + 0, + 3, + 4, + 1, + 0, + 1, + 4, + 0, + new String[] {"Crystal", "Shiny", "Processing", "Olivine"}, + Materials.Olivine, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Olivine, 1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Olivine, 1L), + }); + new GT_BaseCrop( + 165, + "Sapphirum", + "unknown", + null, + 4, + 4, + 0, + 3, + 4, + 1, + 0, + 1, + 5, + 0, + new String[] {"Crystal", "Shiny", "Metal", "Sapphire"}, + Materials.Sapphire, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sapphire, 1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Sapphire, 1L), + }); + new GT_BaseCrop( + 166, + "Pyrolusium", + "unknown", + null, + 12, + 3, + 0, + 2, + 3, + 1, + 0, + 1, + 1, + 0, + new String[] {"Metal", "Clean", "Bush", "Manganese"}, + Materials.Manganese, + ItemList.Crop_Drop_Manganese.get(1), + null); + new GT_BaseCrop( + 167, + "Scheelinium", + "unknown", + null, + 12, + 3, + 0, + 2, + 3, + 3, + 0, + 1, + 1, + 0, + new String[] {"Metal", "Hard", "Bush", "Tungsten"}, + Materials.Tungsten, + ItemList.Crop_Drop_Scheelite.get(1), + null); + new GT_BaseCrop( + 168, + "Platina", + "unknown", + null, + 11, + 4, + 0, + 1, + 4, + 3, + 0, + 0, + 3, + 0, + new String[] {"Metal", "Shiny", "Reed", "Platinum"}, + Materials.Platinum, + ItemList.Crop_Drop_Platinum.get(1), + null); + new GT_BaseCrop( + 169, + "Quantaria", + "unknown", + null, + 12, + 4, + 1000, + 1, + 4, + 4, + 0, + 0, + 1, + 0, + new String[] {"Metal", "Iridium", "Reed"}, + Materials.Iridium, + ItemList.Crop_Drop_Iridium.get(1), + new ItemStack[] {ItemList.Crop_Drop_Osmium.get(1)}); + new GT_BaseCrop( + 170, + "Stargatium", + "unknown", + null, + 12, + 4, + 1500, + 1, + 4, + 4, + 0, + 0, + 2, + 0, + new String[] {"Metal", "Heavy", "Alien", "Naquadah"}, + Materials.Naquadah, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Endstone, 1L), + new ItemStack[] {ItemList.Crop_Drop_Naquadah.get(1)}); + new GT_BaseCrop( + 171, + "Lemon", + "unknown", + null, + 4, + 4, + 0, + 1, + 4, + 1, + 1, + 0, + 2, + 0, + new String[] {"Food", "Yellow", "Sour"}, + ItemList.Crop_Drop_Lemon.get(1), + null); + new GT_BaseCrop( + 172, + "Chilly", + "unknown", + null, + 4, + 4, + 0, + 1, + 4, + 1, + 1, + 0, + 2, + 0, + new String[] {"Food", "Red", "Spicy"}, + ItemList.Crop_Drop_Chilly.get(1), + null); + new GT_BaseCrop( + 173, + "Tomato", + "unknown", + null, + 4, + 4, + 0, + 1, + 4, + 1, + 1, + 0, + 2, + 0, + new String[] {"Food", "Red"}, + ItemList.Crop_Drop_Tomato.get(1), + new ItemStack[] {ItemList.Crop_Drop_MTomato.get(1)}); + new GT_BaseCrop( + 174, + "Grape", + "unknown", + null, + 4, + 4, + 0, + 1, + 4, + 1, + 1, + 0, + 2, + 0, + new String[] {"Food", "Purple"}, + ItemList.Crop_Drop_Grapes.get(1), + null); + new GT_BaseCrop( + 175, + "Onion", + "unknown", + null, + 4, + 4, + 0, + 1, + 4, + 1, + 1, + 0, + 2, + 0, + new String[] {"Food", "Brown"}, + ItemList.Crop_Drop_Onion.get(1), + null); + new GT_BaseCrop( + 176, + "Cucumber", + "unknown", + null, + 4, + 4, + 0, + 1, + 4, + 1, + 1, + 0, + 2, + 0, + new String[] {"Food", "Green"}, + ItemList.Crop_Drop_Cucumber.get(1), + null); + new GT_BaseCrop( + 177, + "Tea", + "unknown", + null, + 4, + 4, + 0, + 1, + 4, + 1, + 1, + 0, + 2, + 0, + new String[] {"Food", "Green", "Ingredient"}, + ItemList.Crop_Drop_TeaLeaf.get(1), + null); + new GT_BaseCrop( + 178, + "Rape", + "unknown", + null, + 4, + 4, + 0, + 1, + 4, + 1, + 1, + 0, + 2, + 0, + new String[] {"Food", "Yellow", "Oil"}, + ItemList.Crop_Drop_Rape.get(1), + null); + new GT_BaseCrop( + 179, + "Micadia", + "bartimaeusnek", + null, + 9, + 3, + 0, + 2, + 3, + 2, + 0, + 3, + 0, + 0, + new String[] {"Metal", "Pine", "Mica", "Bush"}, + Materials.Mica, + ItemList.Crop_Drop_Mica.get(1L), + null); } catch (Throwable e) { GT_Log.err.println("GT_Mod: Failed to register Crops to IC2."); e.printStackTrace(GT_Log.err); diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index e74037b146..8449031626 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -1,5 +1,8 @@ package gregtech.loaders.postload; +import static gregtech.api.GregTech_API.mGTPlusPlus; +import static gregtech.api.enums.GT_Values.*; + import codechicken.nei.api.API; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.GameRegistry; @@ -9,11 +12,13 @@ import gregtech.api.enums.*; import gregtech.api.objects.MaterialStack; import gregtech.api.util.*; import gregtech.common.GT_DummyWorld; -import gregtech.common.items.CombType; import gregtech.common.items.GT_MetaGenerated_Item_03; -import gregtech.common.items.ItemComb; import ic2.api.recipe.ILiquidHeatExchangerManager; import ic2.api.recipe.Recipes; +import java.util.Arrays; +import java.util.Collections; +import java.util.Iterator; +import java.util.Map; import mods.railcraft.common.blocks.aesthetics.cube.EnumCube; import mods.railcraft.common.items.RailcraftToolItems; import net.minecraft.init.Blocks; @@ -25,501 +30,3172 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -import java.util.Arrays; -import java.util.Collections; -import java.util.Iterator; -import java.util.Map; - -import static gregtech.api.GregTech_API.mGTPlusPlus; -import static gregtech.api.enums.GT_Values.*; - public class GT_MachineRecipeLoader implements Runnable { private final MaterialStack[][] mAlloySmelterList = { - {new MaterialStack(Materials.Tetrahedrite, 3L), new MaterialStack(Materials.Tin, 1L), new MaterialStack(Materials.Bronze, 3L)}, - {new MaterialStack(Materials.Tetrahedrite, 3L), new MaterialStack(Materials.Zinc, 1L), new MaterialStack(Materials.Brass, 3L)}, - {new MaterialStack(Materials.Copper, 3L), new MaterialStack(Materials.Tin, 1L), new MaterialStack(Materials.Bronze, 4L)}, - {new MaterialStack(Materials.Copper, 3L), new MaterialStack(Materials.Zinc, 1L), new MaterialStack(Materials.Brass, 4L)}, - {new MaterialStack(Materials.Copper, 1L), new MaterialStack(Materials.Nickel, 1L), new MaterialStack(Materials.Cupronickel, 2L)}, - {new MaterialStack(Materials.Copper, 1L), new MaterialStack(Materials.Redstone, 4L), new MaterialStack(Materials.RedAlloy, 1L)}, - {new MaterialStack(Materials.AnnealedCopper, 3L), new MaterialStack(Materials.Tin, 1L), new MaterialStack(Materials.Bronze, 4L)}, - {new MaterialStack(Materials.AnnealedCopper, 3L), new MaterialStack(Materials.Zinc, 1L), new MaterialStack(Materials.Brass, 4L)}, - {new MaterialStack(Materials.AnnealedCopper, 1L), new MaterialStack(Materials.Nickel, 1L), new MaterialStack(Materials.Cupronickel, 2L)}, - {new MaterialStack(Materials.AnnealedCopper, 1L), new MaterialStack(Materials.Redstone, 4L), new MaterialStack(Materials.RedAlloy, 1L)}, - {new MaterialStack(Materials.Iron, 1L), new MaterialStack(Materials.Tin, 1L), new MaterialStack(Materials.TinAlloy, 2L)}, - {new MaterialStack(Materials.WroughtIron, 1L), new MaterialStack(Materials.Tin, 1L), new MaterialStack(Materials.TinAlloy, 2L)}, - {new MaterialStack(Materials.Iron, 2L), new MaterialStack(Materials.Nickel, 1L), new MaterialStack(Materials.Invar, 3L)}, - {new MaterialStack(Materials.WroughtIron, 2L), new MaterialStack(Materials.Nickel, 1L), new MaterialStack(Materials.Invar, 3L)}, - {new MaterialStack(Materials.Tin, 9L), new MaterialStack(Materials.Antimony, 1L), new MaterialStack(Materials.SolderingAlloy, 10L)}, - {new MaterialStack(Materials.Lead, 4L), new MaterialStack(Materials.Antimony, 1L), new MaterialStack(Materials.BatteryAlloy, 5L)}, - {new MaterialStack(Materials.Gold, 1L), new MaterialStack(Materials.Silver, 1L), new MaterialStack(Materials.Electrum, 2L)}, - {new MaterialStack(Materials.Magnesium, 1L), new MaterialStack(Materials.Aluminium, 2L), new MaterialStack(Materials.Magnalium, 3L)}, - {new MaterialStack(Materials.Silver, 1L), new MaterialStack(Materials.Electrotine, 4L), new MaterialStack(Materials.BlueAlloy, 1L)}, - {new MaterialStack(Materials.Boron, 1L), new MaterialStack(Materials.Glass, 7L), new MaterialStack(Materials.BorosilicateGlass, 8L)}}; - private static final String aTextAE = "appliedenergistics2"; private static final String aTextAEMM = "item.ItemMultiMaterial"; private static final String aTextForestry = "Forestry"; - private static final String aTextEBXL = "ExtrabiomesXL"; private static final String aTextTCGTPage = "gt.research.page.1."; + { + new MaterialStack(Materials.Tetrahedrite, 3L), + new MaterialStack(Materials.Tin, 1L), + new MaterialStack(Materials.Bronze, 3L) + }, + { + new MaterialStack(Materials.Tetrahedrite, 3L), + new MaterialStack(Materials.Zinc, 1L), + new MaterialStack(Materials.Brass, 3L) + }, + { + new MaterialStack(Materials.Copper, 3L), + new MaterialStack(Materials.Tin, 1L), + new MaterialStack(Materials.Bronze, 4L) + }, + { + new MaterialStack(Materials.Copper, 3L), + new MaterialStack(Materials.Zinc, 1L), + new MaterialStack(Materials.Brass, 4L) + }, + { + new MaterialStack(Materials.Copper, 1L), + new MaterialStack(Materials.Nickel, 1L), + new MaterialStack(Materials.Cupronickel, 2L) + }, + { + new MaterialStack(Materials.Copper, 1L), + new MaterialStack(Materials.Redstone, 4L), + new MaterialStack(Materials.RedAlloy, 1L) + }, + { + new MaterialStack(Materials.AnnealedCopper, 3L), + new MaterialStack(Materials.Tin, 1L), + new MaterialStack(Materials.Bronze, 4L) + }, + { + new MaterialStack(Materials.AnnealedCopper, 3L), + new MaterialStack(Materials.Zinc, 1L), + new MaterialStack(Materials.Brass, 4L) + }, + { + new MaterialStack(Materials.AnnealedCopper, 1L), + new MaterialStack(Materials.Nickel, 1L), + new MaterialStack(Materials.Cupronickel, 2L) + }, + { + new MaterialStack(Materials.AnnealedCopper, 1L), + new MaterialStack(Materials.Redstone, 4L), + new MaterialStack(Materials.RedAlloy, 1L) + }, + { + new MaterialStack(Materials.Iron, 1L), + new MaterialStack(Materials.Tin, 1L), + new MaterialStack(Materials.TinAlloy, 2L) + }, + { + new MaterialStack(Materials.WroughtIron, 1L), + new MaterialStack(Materials.Tin, 1L), + new MaterialStack(Materials.TinAlloy, 2L) + }, + { + new MaterialStack(Materials.Iron, 2L), + new MaterialStack(Materials.Nickel, 1L), + new MaterialStack(Materials.Invar, 3L) + }, + { + new MaterialStack(Materials.WroughtIron, 2L), + new MaterialStack(Materials.Nickel, 1L), + new MaterialStack(Materials.Invar, 3L) + }, + { + new MaterialStack(Materials.Tin, 9L), + new MaterialStack(Materials.Antimony, 1L), + new MaterialStack(Materials.SolderingAlloy, 10L) + }, + { + new MaterialStack(Materials.Lead, 4L), + new MaterialStack(Materials.Antimony, 1L), + new MaterialStack(Materials.BatteryAlloy, 5L) + }, + { + new MaterialStack(Materials.Gold, 1L), + new MaterialStack(Materials.Silver, 1L), + new MaterialStack(Materials.Electrum, 2L) + }, + { + new MaterialStack(Materials.Magnesium, 1L), + new MaterialStack(Materials.Aluminium, 2L), + new MaterialStack(Materials.Magnalium, 3L) + }, + { + new MaterialStack(Materials.Silver, 1L), + new MaterialStack(Materials.Electrotine, 4L), + new MaterialStack(Materials.BlueAlloy, 1L) + }, + { + new MaterialStack(Materials.Boron, 1L), + new MaterialStack(Materials.Glass, 7L), + new MaterialStack(Materials.BorosilicateGlass, 8L) + } + }; + private static final String aTextAE = "appliedenergistics2"; + private static final String aTextAEMM = "item.ItemMultiMaterial"; + private static final String aTextForestry = "Forestry"; + private static final String aTextEBXL = "ExtrabiomesXL"; + private static final String aTextTCGTPage = "gt.research.page.1."; private static final Boolean isNEILoaded = Loader.isModLoaded("NotEnoughItems"); @Override public void run() { GT_Log.out.println("GT_Mod: Adding non-OreDict Machine Recipes."); try { - GT_Utility.removeSimpleIC2MachineRecipe(GT_Values.NI, ic2.api.recipe.Recipes.metalformerExtruding.getRecipes(), ItemList.Cell_Empty.get(3L)); - GT_Utility.removeSimpleIC2MachineRecipe(ItemList.IC2_Energium_Dust.get(1L), ic2.api.recipe.Recipes.compressor.getRecipes(), GT_Values.NI); - GT_Utility.removeSimpleIC2MachineRecipe(new ItemStack(Items.gunpowder), ic2.api.recipe.Recipes.extractor.getRecipes(), GT_Values.NI); - GT_Utility.removeSimpleIC2MachineRecipe(new ItemStack(Blocks.wool, 1, 32767), ic2.api.recipe.Recipes.extractor.getRecipes(), GT_Values.NI); - GT_Utility.removeSimpleIC2MachineRecipe(new ItemStack(Blocks.gravel), ic2.api.recipe.Recipes.oreWashing.getRecipes(), GT_Values.NI); + GT_Utility.removeSimpleIC2MachineRecipe( + GT_Values.NI, + ic2.api.recipe.Recipes.metalformerExtruding.getRecipes(), + ItemList.Cell_Empty.get(3L)); + GT_Utility.removeSimpleIC2MachineRecipe( + ItemList.IC2_Energium_Dust.get(1L), ic2.api.recipe.Recipes.compressor.getRecipes(), GT_Values.NI); + GT_Utility.removeSimpleIC2MachineRecipe( + new ItemStack(Items.gunpowder), ic2.api.recipe.Recipes.extractor.getRecipes(), GT_Values.NI); + GT_Utility.removeSimpleIC2MachineRecipe( + new ItemStack(Blocks.wool, 1, 32767), ic2.api.recipe.Recipes.extractor.getRecipes(), GT_Values.NI); + GT_Utility.removeSimpleIC2MachineRecipe( + new ItemStack(Blocks.gravel), ic2.api.recipe.Recipes.oreWashing.getRecipes(), GT_Values.NI); } catch (Throwable ignored) { } - GT_Utility.removeIC2BottleRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), GT_ModHandler.getIC2Item("UranFuel", 1), ic2.api.recipe.Recipes.cannerBottle.getRecipes(), GT_ModHandler.getIC2Item("reactorUraniumSimple", 1, 1)); - GT_Utility.removeIC2BottleRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), GT_ModHandler.getIC2Item("MOXFuel", 1), ic2.api.recipe.Recipes.cannerBottle.getRecipes(), GT_ModHandler.getIC2Item("reactorMOXSimple", 1, 1)); - GT_Values.RA.addFluidExtractionRecipe(new ItemStack(Items.wheat_seeds, 1, 32767), GT_Values.NI, Materials.SeedOil.getFluid(10), 10000, 32, 2); - GT_Values.RA.addFluidExtractionRecipe(new ItemStack(Items.melon_seeds, 1, 32767), GT_Values.NI, Materials.SeedOil.getFluid(10), 10000, 32, 2); - GT_Values.RA.addFluidExtractionRecipe(new ItemStack(Items.pumpkin_seeds, 1, 32767), GT_Values.NI, Materials.SeedOil.getFluid(10), 10000, 32, 2); - GT_Values.RA.addFluidExtractionRecipe(ItemList.Crop_Drop_Rape.get(1), null, Materials.SeedOil.getFluid(125), 10000, 32, 2); + GT_Utility.removeIC2BottleRecipe( + GT_ModHandler.getIC2Item("fuelRod", 1), + GT_ModHandler.getIC2Item("UranFuel", 1), + ic2.api.recipe.Recipes.cannerBottle.getRecipes(), + GT_ModHandler.getIC2Item("reactorUraniumSimple", 1, 1)); + GT_Utility.removeIC2BottleRecipe( + GT_ModHandler.getIC2Item("fuelRod", 1), + GT_ModHandler.getIC2Item("MOXFuel", 1), + ic2.api.recipe.Recipes.cannerBottle.getRecipes(), + GT_ModHandler.getIC2Item("reactorMOXSimple", 1, 1)); + GT_Values.RA.addFluidExtractionRecipe( + new ItemStack(Items.wheat_seeds, 1, 32767), GT_Values.NI, Materials.SeedOil.getFluid(10), 10000, 32, 2); + GT_Values.RA.addFluidExtractionRecipe( + new ItemStack(Items.melon_seeds, 1, 32767), GT_Values.NI, Materials.SeedOil.getFluid(10), 10000, 32, 2); + GT_Values.RA.addFluidExtractionRecipe( + new ItemStack(Items.pumpkin_seeds, 1, 32767), + GT_Values.NI, + Materials.SeedOil.getFluid(10), + 10000, + 32, + 2); + GT_Values.RA.addFluidExtractionRecipe( + ItemList.Crop_Drop_Rape.get(1), null, Materials.SeedOil.getFluid(125), 10000, 32, 2); try { GT_DummyWorld tWorld = (GT_DummyWorld) GT_Values.DW; while (tWorld.mRandom.mIterationStep > 0) { - GT_Values.RA.addFluidExtractionRecipe(GT_Utility.copyAmount(1L, ForgeHooks.getGrassSeed(tWorld)), GT_Values.NI, Materials.SeedOil.getFluid(5L), 10000, 64, 2); + GT_Values.RA.addFluidExtractionRecipe( + GT_Utility.copyAmount(1L, ForgeHooks.getGrassSeed(tWorld)), + GT_Values.NI, + Materials.SeedOil.getFluid(5L), + 10000, + 64, + 2); } } catch (Throwable e) { - GT_Log.out.println("GT_Mod: failed to iterate somehow, maybe it's your Forge Version causing it. But it's not that important\n"); + GT_Log.out.println( + "GT_Mod: failed to iterate somehow, maybe it's your Forge Version causing it. But it's not that important\n"); e.printStackTrace(GT_Log.err); } - GT_Values.RA.addArcFurnaceRecipe(ItemList.Block_TungstenSteelReinforced.get(1), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.TungstenSteel, 2), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Concrete, 1)}, null, 160, 96); - - GT_Values.RA.addPrinterRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Paper, 1L), FluidRegistry.getFluidStack("squidink", 36), GT_Values.NI, ItemList.Paper_Punch_Card_Empty.get(1L), 100, 2); - GT_Values.RA.addPrinterRecipe(ItemList.Paper_Punch_Card_Empty.get(1L), FluidRegistry.getFluidStack("squidink", 36), ItemList.Tool_DataStick.getWithName(0L, "With Punch Card Data"), ItemList.Paper_Punch_Card_Encoded.get(1L), 100, 2); - GT_Values.RA.addPrinterRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 3L), FluidRegistry.getFluidStack("squidink", 144), ItemList.Tool_DataStick.getWithName(0L, "With Scanned Book Data"), ItemList.Paper_Printed_Pages.get(1L), 400, 2); - GT_Values.RA.addPrinterRecipe(new ItemStack(Items.map, 1, 32767), FluidRegistry.getFluidStack("squidink", 144), ItemList.Tool_DataStick.getWithName(0L, "With Scanned Map Data"), new ItemStack(Items.filled_map, 1, 0), 400, 2); - GT_Values.RA.addPrinterRecipe(new ItemStack(Items.book, 1, 32767), FluidRegistry.getFluidStack("squidink", 144), GT_Values.NI, GT_Utility.getWrittenBook("Manual_Printer", ItemList.Book_Written_01.get(1L)), 400, 2); - - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.EnderPearl, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Blaze, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.EnderEye, OrePrefixes.dust.mMaterialAmount), (int) (100L * OrePrefixes.dust.mMaterialAmount / 3628800L), 48); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silver, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Electrum, 2L * OrePrefixes.dust.mMaterialAmount), (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Invar, 3L * OrePrefixes.dust.mMaterialAmount), (int) (300L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Invar, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Manganese, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chrome, 1L), GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.StainlessSteel, 9L * OrePrefixes.dust.mMaterialAmount), (int) (900L * OrePrefixes.dust.mMaterialAmount / 3628800L), 120); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chrome, 1L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Kanthal, 3L * OrePrefixes.dust.mMaterialAmount), (int) (300L * OrePrefixes.dust.mMaterialAmount / 3628800L), 120); - //GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Barium, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Yttrium, 1L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.YttriumBariumCuprate, 6L * OrePrefixes.dust.mMaterialAmount), (int) (600L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Zinc, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Brass, 4L * OrePrefixes.dust.mMaterialAmount), (int) (400L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tin, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Bronze, 4L * OrePrefixes.dust.mMaterialAmount), (int) (400L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(3), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Cupronickel, 2L * OrePrefixes.dust.mMaterialAmount), (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), 24); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silver, 4L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(4), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.SterlingSilver, 5L * OrePrefixes.dust.mMaterialAmount), (int) (500L * OrePrefixes.dust.mMaterialAmount / 3628800L), 120); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Electrum, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.BlackBronze, 4L * OrePrefixes.dust.mMaterialAmount), (int) (500L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bismuth, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brass, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.BismuthBronze, 2L * OrePrefixes.dust.mMaterialAmount), (int) (500L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BlackBronze, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 3L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.BlackSteel, 5L * OrePrefixes.dust.mMaterialAmount), (int) (500L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SterlingSilver, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BismuthBronze, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BlackSteel, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 2L), GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.RedSteel, 8L * OrePrefixes.dust.mMaterialAmount), (int) (800L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RoseGold, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brass, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BlackSteel, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 2L), GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.BlueSteel, 8L * OrePrefixes.dust.mMaterialAmount), (int) (800L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silver, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 5L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 15L), GT_Utility.getIntegratedCircuit(14), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.BlackSteel, 25L * OrePrefixes.dust.mMaterialAmount), (int) (800L * OrePrefixes.dust.mMaterialAmount / 3628800L), 480); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silver, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bismuth, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Zinc, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BlackSteel, 20L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 10L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(15), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.RedSteel, 40L * OrePrefixes.dust.mMaterialAmount), (int) (1200L * OrePrefixes.dust.mMaterialAmount / 3628800L), 480); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 31L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Zinc, 5L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BlackSteel, 64L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BlackSteel, 16L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 40L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(16), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.BlueSteel, 64L * OrePrefixes.dust.mMaterialAmount), GT_OreDictUnificator.getDust(Materials.BlueSteel, 64L * OrePrefixes.dust.mMaterialAmount), GT_OreDictUnificator.getDust(Materials.BlueSteel, 32L * OrePrefixes.dust.mMaterialAmount), GT_Values.NI, (int) (3600L * OrePrefixes.dust.mMaterialAmount / 3628800L), 480); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cobalt, 5L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chrome, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Molybdenum, 1L), GT_Values.NI, GT_Utility.getIntegratedCircuit(2), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Ultimet, 9L * OrePrefixes.dust.mMaterialAmount), (int) (900L * OrePrefixes.dust.mMaterialAmount / 3628800L), 500); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brass, 7L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cobalt, 1L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.CobaltBrass, 9L * OrePrefixes.dust.mMaterialAmount), (int) (900L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 3L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Gunpowder, 6L * OrePrefixes.dust.mMaterialAmount), (int) (600L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Charcoal, 3L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Gunpowder, 6L * OrePrefixes.dust.mMaterialAmount), (int) (600L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 3L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Gunpowder, 6L * OrePrefixes.dust.mMaterialAmount), (int) (600L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Indium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gallium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphorus, 1L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.IndiumGalliumPhosphide, 3L * OrePrefixes.dust.mMaterialAmount), (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brick, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Clay, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Fireclay, 2L * OrePrefixes.dust.mMaterialAmount), (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chrome, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Nichrome, 5L * OrePrefixes.dust.mMaterialAmount), (int) (500L * OrePrefixes.dust.mMaterialAmount / 3628800L), 480); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Osmium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iridium, 3L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.Osmiridium, 4L * OrePrefixes.dust.mMaterialAmount), (int) (400L * OrePrefixes.dust.mMaterialAmount / 3628800L), 2000); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Niobium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Titanium, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.NiobiumTitanium, 2L * OrePrefixes.dust.mMaterialAmount), (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), 2000); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Vanadium, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gallium, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.VanadiumGallium, 4L * OrePrefixes.dust.mMaterialAmount), (int) (400L * OrePrefixes.dust.mMaterialAmount / 3628800L), 2000); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tungsten, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.TungstenCarbide, 2L * OrePrefixes.dust.mMaterialAmount), (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), 500); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tungsten, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.TungstenSteel, 2L * OrePrefixes.dust.mMaterialAmount), (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), 500); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 5L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chrome, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Molybdenum, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Vanadium, 1L), GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.HSSG, 9L * OrePrefixes.dust.mMaterialAmount), (int) (600L * OrePrefixes.dust.mMaterialAmount / 3628800L), 1920); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSG, 6L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cobalt, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Manganese, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 1L), GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.HSSE, 9L * OrePrefixes.dust.mMaterialAmount), (int) (700L * OrePrefixes.dust.mMaterialAmount / 3628800L), 4096); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSG, 6L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iridium, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Osmium, 1L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(2), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.HSSS, 9L * OrePrefixes.dust.mMaterialAmount), (int) (800L * OrePrefixes.dust.mMaterialAmount / 3628800L), 7680); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Zinc, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 4L), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.FerriteMixture, 6L * OrePrefixes.dust.mMaterialAmount), (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Boron, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 7L), GT_Values.NI, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.getDust(Materials.BorosilicateGlass, 8L * OrePrefixes.dust.mMaterialAmount), (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); - - GT_Values.RA.addMixerRecipe(new ItemStack(Items.rotten_flesh, 1, 0), new ItemStack(Items.fermented_spider_eye, 1, 0), ItemList.IC2_Scrap.get(1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.MeatRaw, 1L), FluidRegistry.getFluidStack("potion.purpledrink", 750), FluidRegistry.getFluidStack("sludge", 1000), ItemList.Food_Chum.get(4L), 128, 24); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wheat, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Water.getFluid(1000L), GT_Values.NF, ItemList.Food_Dough.get(2L), 32, 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chili, 1L), ItemList.Food_PotatoChips.get(1L), GT_Values.NI, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.Food_ChiliChips.get(1L), 32, 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Redstone, 5L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ruby, 4L), GT_Values.NI, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.IC2_Energium_Dust.get(1L), 300, 120); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 5L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ruby, 4L), GT_Values.NI, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.IC2_Energium_Dust.get(9L), 600, 120); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L), new ItemStack(Blocks.brown_mushroom, 1), new ItemStack(Items.spider_eye, 1), GT_Values.NI, GT_Values.NF, GT_Values.NF, new ItemStack(Items.fermented_spider_eye, 1), 100, 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Gold, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.LiveRoot, 1L), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.IronWood, 2L), 100, 8); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 9L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.LiveRoot, 9L), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.IronWood, 18L), 900, 8); - GT_Values.RA.addMixerRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.NetherQuartz, 1L), GT_Values.NI, Materials.Water.getFluid(500L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Fluix, 2L), 20, 16); - GT_Values.RA.addMixerRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.NetherQuartz, 1L), GT_Values.NI, GT_ModHandler.getDistilledWater(500L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Fluix, 2L), 20, 16); - GT_Values.RA.addMixerRecipe(ItemList.IC2_Fertilizer.get(1L), new ItemStack(Blocks.dirt, 8, 32767), GT_Utility.getIntegratedCircuit(1), GT_Values.NI, Materials.Water.getFluid(1000L), GT_Values.NF, GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "soil", 8L, 0), 64, 16); - GT_Values.RA.addMixerRecipe(ItemList.FR_Fertilizer.get(1L), new ItemStack(Blocks.dirt, 8, 32767), GT_Utility.getIntegratedCircuit(1), GT_Values.NI, Materials.Water.getFluid(1000L), GT_Values.NF, GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "soil", 8L, 0), 64, 16); - GT_Values.RA.addMixerRecipe(ItemList.FR_Compost.get(1L), new ItemStack(Blocks.dirt, 8, 32767), GT_Utility.getIntegratedCircuit(1), GT_Values.NI, Materials.Water.getFluid(1000L), GT_Values.NF, GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "soil", 8L, 0), 64, 16); - GT_Values.RA.addMixerRecipe(ItemList.FR_Mulch.get(8L), new ItemStack(Blocks.dirt, 8, 32767), GT_Utility.getIntegratedCircuit(1), GT_Values.NI, Materials.Water.getFluid(1000L), GT_Values.NF, GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "soil", 8L, 0), 64, 16); - GT_Values.RA.addMixerRecipe(new ItemStack(Blocks.sand, 1, 32767), new ItemStack(Blocks.dirt, 1, 32767), GT_Utility.getIntegratedCircuit(1), GT_Values.NI, Materials.Water.getFluid(250L), GT_Values.NF, GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "soil", 2L, 1), 16, 16); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LightFuel, 5L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HeavyFuel, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fuel, 6L), 16, 120); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LightFuel, 5L), Materials.Empty.getCells(1), GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.HeavyFuel.getFluid(1000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fuel, 6L), 16, 120); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HeavyFuel, 1L), Materials.Empty.getCells(5), GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.LightFuel.getFluid(5000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fuel, 6L), 16, 120); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LightFuel, 5L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(5), Materials.HeavyFuel.getFluid(1000L), Materials.Fuel.getFluid(6000L), Materials.Empty.getCells(5), 16, 120); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HeavyFuel, 1L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(6), Materials.LightFuel.getFluid(5000L), Materials.Fuel.getFluid(6000L), Materials.Empty.getCells(1), 16, 120); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 5L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), GT_Values.NI, GT_Values.NI, Materials.Lubricant.getFluid(20), new FluidStack(ItemList.sDrillingFluid, 5000), Materials.Empty.getCells(5), 64, 16); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lapis, 1L), GT_Utility.getIntegratedCircuit(4), GT_Values.NI, GT_Values.NI, Materials.Water.getFluid(125), FluidRegistry.getFluidStack("ic2coolant", 125), GT_Values.NI, 256, 48); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lapis, 1L), GT_Utility.getIntegratedCircuit(4), GT_Values.NI, GT_Values.NI, GT_ModHandler.getDistilledWater(1000), FluidRegistry.getFluidStack("ic2coolant", 1000), GT_Values.NI, 256, 48); - - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 4L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.AdvancedGlue.getFluid(200), null, ItemList.SFMixture.get(4), 800, 16); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 4L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.AdvancedGlue.getFluid(200), null, ItemList.SFMixture.get(8), 800, 16); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Caesium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 4L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.AdvancedGlue.getFluid(200), null, ItemList.SFMixture.get(12), 800, 16); - - GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(2), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.EnderEye, 1L), null, null, Materials.Mercury.getFluid(1000), null, ItemList.MSFMixture.get(4), 300, 64); - GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Blaze, 1L), null, null, Materials.Mercury.getFluid(500), null, ItemList.MSFMixture.get(1), 300, 64); - - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Lignite, 4), ItemList.MSFMixture.get(24), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond, 1L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.NitroFuel.getFluid(4000), null, ItemList.Block_MSSFUEL.get(4), 400, 600); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Charcoal, 4), ItemList.MSFMixture.get(16), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond, 1L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.NitroFuel.getFluid(3000), null, ItemList.Block_MSSFUEL.get(4), 300, 600); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Coal, 4), ItemList.MSFMixture.get(8), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond, 1L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.NitroFuel.getFluid(2000), null, ItemList.Block_MSSFUEL.get(4), 200, 600); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Lignite, 4), ItemList.MSFMixture.get(24), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond, 1L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.GasolinePremium.getFluid(1600), null, ItemList.Block_MSSFUEL.get(4), 400, 600); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Charcoal, 4), ItemList.MSFMixture.get(16), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond, 1L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.GasolinePremium.getFluid(1200), null, ItemList.Block_MSSFUEL.get(4), 300, 600); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Coal, 4), ItemList.MSFMixture.get(8), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond, 1L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.GasolinePremium.getFluid(800), null, ItemList.Block_MSSFUEL.get(4), 200, 600); + GT_Values.RA.addArcFurnaceRecipe( + ItemList.Block_TungstenSteelReinforced.get(1), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.TungstenSteel, 2), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Concrete, 1) + }, + null, + 160, + 96); + + GT_Values.RA.addPrinterRecipe( + GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Paper, 1L), + FluidRegistry.getFluidStack("squidink", 36), + GT_Values.NI, + ItemList.Paper_Punch_Card_Empty.get(1L), + 100, + 2); + GT_Values.RA.addPrinterRecipe( + ItemList.Paper_Punch_Card_Empty.get(1L), + FluidRegistry.getFluidStack("squidink", 36), + ItemList.Tool_DataStick.getWithName(0L, "With Punch Card Data"), + ItemList.Paper_Punch_Card_Encoded.get(1L), + 100, + 2); + GT_Values.RA.addPrinterRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 3L), + FluidRegistry.getFluidStack("squidink", 144), + ItemList.Tool_DataStick.getWithName(0L, "With Scanned Book Data"), + ItemList.Paper_Printed_Pages.get(1L), + 400, + 2); + GT_Values.RA.addPrinterRecipe( + new ItemStack(Items.map, 1, 32767), + FluidRegistry.getFluidStack("squidink", 144), + ItemList.Tool_DataStick.getWithName(0L, "With Scanned Map Data"), + new ItemStack(Items.filled_map, 1, 0), + 400, + 2); + GT_Values.RA.addPrinterRecipe( + new ItemStack(Items.book, 1, 32767), + FluidRegistry.getFluidStack("squidink", 144), + GT_Values.NI, + GT_Utility.getWrittenBook("Manual_Printer", ItemList.Book_Written_01.get(1L)), + 400, + 2); + + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.EnderPearl, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Blaze, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.EnderEye, OrePrefixes.dust.mMaterialAmount), + (int) (100L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 48); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silver, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.Electrum, 2L * OrePrefixes.dust.mMaterialAmount), + (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 8); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 2L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.Invar, 3L * OrePrefixes.dust.mMaterialAmount), + (int) (300L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 8); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Invar, 3L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Manganese, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chrome, 1L), + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.StainlessSteel, 9L * OrePrefixes.dust.mMaterialAmount), + (int) (900L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 120); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chrome, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.Kanthal, 3L * OrePrefixes.dust.mMaterialAmount), + (int) (300L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 120); + // GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 3L), + // GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Barium, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, + // Materials.Yttrium, 1L), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, + // GT_Values.NF, GT_OreDictUnificator.getDust(Materials.YttriumBariumCuprate, 6L * + // OrePrefixes.dust.mMaterialAmount), (int) (600L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 3L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Zinc, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.Brass, 4L * OrePrefixes.dust.mMaterialAmount), + (int) (400L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 8); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 3L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tin, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.Bronze, 4L * OrePrefixes.dust.mMaterialAmount), + (int) (400L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 8); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(3), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.Cupronickel, 2L * OrePrefixes.dust.mMaterialAmount), + (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 24); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silver, 4L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(4), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.SterlingSilver, 5L * OrePrefixes.dust.mMaterialAmount), + (int) (500L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 120); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 3L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Electrum, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.BlackBronze, 4L * OrePrefixes.dust.mMaterialAmount), + (int) (500L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 8); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bismuth, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brass, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.BismuthBronze, 2L * OrePrefixes.dust.mMaterialAmount), + (int) (500L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 8); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BlackBronze, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 3L), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.BlackSteel, 5L * OrePrefixes.dust.mMaterialAmount), + (int) (500L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 8); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SterlingSilver, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BismuthBronze, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BlackSteel, 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 2L), + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.RedSteel, 8L * OrePrefixes.dust.mMaterialAmount), + (int) (800L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 8); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RoseGold, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brass, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BlackSteel, 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 2L), + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.BlueSteel, 8L * OrePrefixes.dust.mMaterialAmount), + (int) (800L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 8); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 3L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silver, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 5L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 15L), + GT_Utility.getIntegratedCircuit(14), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.BlackSteel, 25L * OrePrefixes.dust.mMaterialAmount), + (int) (800L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 480); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silver, 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bismuth, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Zinc, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BlackSteel, 20L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 10L), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(15), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.RedSteel, 40L * OrePrefixes.dust.mMaterialAmount), + (int) (1200L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 480); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 31L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Zinc, 5L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BlackSteel, 64L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BlackSteel, 16L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 40L), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(16), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.BlueSteel, 64L * OrePrefixes.dust.mMaterialAmount), + GT_OreDictUnificator.getDust(Materials.BlueSteel, 64L * OrePrefixes.dust.mMaterialAmount), + GT_OreDictUnificator.getDust(Materials.BlueSteel, 32L * OrePrefixes.dust.mMaterialAmount), + GT_Values.NI, + (int) (3600L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 480); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cobalt, 5L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chrome, 2L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Molybdenum, 1L), + GT_Values.NI, + GT_Utility.getIntegratedCircuit(2), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.Ultimet, 9L * OrePrefixes.dust.mMaterialAmount), + (int) (900L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 500); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brass, 7L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cobalt, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.CobaltBrass, 9L * OrePrefixes.dust.mMaterialAmount), + (int) (900L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 8); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 2L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 3L), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.Gunpowder, 6L * OrePrefixes.dust.mMaterialAmount), + (int) (600L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 8); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 2L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Charcoal, 3L), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.Gunpowder, 6L * OrePrefixes.dust.mMaterialAmount), + (int) (600L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 8); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 2L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 3L), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.Gunpowder, 6L * OrePrefixes.dust.mMaterialAmount), + (int) (600L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 8); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Indium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gallium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphorus, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.IndiumGalliumPhosphide, 3L * OrePrefixes.dust.mMaterialAmount), + (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 8); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brick, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Clay, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.Fireclay, 2L * OrePrefixes.dust.mMaterialAmount), + (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 8); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chrome, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.Nichrome, 5L * OrePrefixes.dust.mMaterialAmount), + (int) (500L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 480); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Osmium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iridium, 3L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.Osmiridium, 4L * OrePrefixes.dust.mMaterialAmount), + (int) (400L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 2000); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Niobium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Titanium, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.NiobiumTitanium, 2L * OrePrefixes.dust.mMaterialAmount), + (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 2000); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Vanadium, 3L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gallium, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.VanadiumGallium, 4L * OrePrefixes.dust.mMaterialAmount), + (int) (400L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 2000); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tungsten, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.TungstenCarbide, 2L * OrePrefixes.dust.mMaterialAmount), + (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 500); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tungsten, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.TungstenSteel, 2L * OrePrefixes.dust.mMaterialAmount), + (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 500); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 5L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chrome, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Molybdenum, 2L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Vanadium, 1L), + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.HSSG, 9L * OrePrefixes.dust.mMaterialAmount), + (int) (600L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 1920); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSG, 6L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cobalt, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Manganese, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 1L), + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.HSSE, 9L * OrePrefixes.dust.mMaterialAmount), + (int) (700L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 4096); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSG, 6L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iridium, 2L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Osmium, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(2), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.HSSS, 9L * OrePrefixes.dust.mMaterialAmount), + (int) (800L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 7680); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Zinc, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 4L), + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.FerriteMixture, 6L * OrePrefixes.dust.mMaterialAmount), + (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 8); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Boron, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 7L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.getDust(Materials.BorosilicateGlass, 8L * OrePrefixes.dust.mMaterialAmount), + (int) (200L * OrePrefixes.dust.mMaterialAmount / 3628800L), + 8); + + GT_Values.RA.addMixerRecipe( + new ItemStack(Items.rotten_flesh, 1, 0), + new ItemStack(Items.fermented_spider_eye, 1, 0), + ItemList.IC2_Scrap.get(1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.MeatRaw, 1L), + FluidRegistry.getFluidStack("potion.purpledrink", 750), + FluidRegistry.getFluidStack("sludge", 1000), + ItemList.Food_Chum.get(4L), + 128, + 24); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wheat, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.Water.getFluid(1000L), + GT_Values.NF, + ItemList.Food_Dough.get(2L), + 32, + 8); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chili, 1L), + ItemList.Food_PotatoChips.get(1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + ItemList.Food_ChiliChips.get(1L), + 32, + 8); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Redstone, 5L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ruby, 4L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + ItemList.IC2_Energium_Dust.get(1L), + 300, + 120); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 5L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ruby, 4L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + ItemList.IC2_Energium_Dust.get(9L), + 600, + 120); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L), + new ItemStack(Blocks.brown_mushroom, 1), + new ItemStack(Items.spider_eye, 1), + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + new ItemStack(Items.fermented_spider_eye, 1), + 100, + 8); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Gold, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.LiveRoot, 1L), + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.IronWood, 2L), + 100, + 8); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 9L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.LiveRoot, 9L), + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.IronWood, 18L), + 900, + 8); + GT_Values.RA.addMixerRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.NetherQuartz, 1L), + GT_Values.NI, + Materials.Water.getFluid(500L), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Fluix, 2L), + 20, + 16); + GT_Values.RA.addMixerRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.NetherQuartz, 1L), + GT_Values.NI, + GT_ModHandler.getDistilledWater(500L), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Fluix, 2L), + 20, + 16); + GT_Values.RA.addMixerRecipe( + ItemList.IC2_Fertilizer.get(1L), + new ItemStack(Blocks.dirt, 8, 32767), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NI, + Materials.Water.getFluid(1000L), + GT_Values.NF, + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "soil", 8L, 0), + 64, + 16); + GT_Values.RA.addMixerRecipe( + ItemList.FR_Fertilizer.get(1L), + new ItemStack(Blocks.dirt, 8, 32767), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NI, + Materials.Water.getFluid(1000L), + GT_Values.NF, + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "soil", 8L, 0), + 64, + 16); + GT_Values.RA.addMixerRecipe( + ItemList.FR_Compost.get(1L), + new ItemStack(Blocks.dirt, 8, 32767), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NI, + Materials.Water.getFluid(1000L), + GT_Values.NF, + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "soil", 8L, 0), + 64, + 16); + GT_Values.RA.addMixerRecipe( + ItemList.FR_Mulch.get(8L), + new ItemStack(Blocks.dirt, 8, 32767), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NI, + Materials.Water.getFluid(1000L), + GT_Values.NF, + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "soil", 8L, 0), + 64, + 16); + GT_Values.RA.addMixerRecipe( + new ItemStack(Blocks.sand, 1, 32767), + new ItemStack(Blocks.dirt, 1, 32767), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NI, + Materials.Water.getFluid(250L), + GT_Values.NF, + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "soil", 2L, 1), + 16, + 16); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LightFuel, 5L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HeavyFuel, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fuel, 6L), + 16, + 120); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LightFuel, 5L), + Materials.Empty.getCells(1), + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.HeavyFuel.getFluid(1000L), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fuel, 6L), + 16, + 120); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HeavyFuel, 1L), + Materials.Empty.getCells(5), + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.LightFuel.getFluid(5000L), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fuel, 6L), + 16, + 120); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LightFuel, 5L), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(5), + Materials.HeavyFuel.getFluid(1000L), + Materials.Fuel.getFluid(6000L), + Materials.Empty.getCells(5), + 16, + 120); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HeavyFuel, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(6), + Materials.LightFuel.getFluid(5000L), + Materials.Fuel.getFluid(6000L), + Materials.Empty.getCells(1), + 16, + 120); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 5L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), + GT_Values.NI, + GT_Values.NI, + Materials.Lubricant.getFluid(20), + new FluidStack(ItemList.sDrillingFluid, 5000), + Materials.Empty.getCells(5), + 64, + 16); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lapis, 1L), + GT_Utility.getIntegratedCircuit(4), + GT_Values.NI, + GT_Values.NI, + Materials.Water.getFluid(125), + FluidRegistry.getFluidStack("ic2coolant", 125), + GT_Values.NI, + 256, + 48); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lapis, 1L), + GT_Utility.getIntegratedCircuit(4), + GT_Values.NI, + GT_Values.NI, + GT_ModHandler.getDistilledWater(1000), + FluidRegistry.getFluidStack("ic2coolant", 1000), + GT_Values.NI, + 256, + 48); + + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 4L), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.AdvancedGlue.getFluid(200), + null, + ItemList.SFMixture.get(4), + 800, + 16); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 4L), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.AdvancedGlue.getFluid(200), + null, + ItemList.SFMixture.get(8), + 800, + 16); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Caesium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 4L), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.AdvancedGlue.getFluid(200), + null, + ItemList.SFMixture.get(12), + 800, + 16); + + GT_Values.RA.addMixerRecipe( + ItemList.SFMixture.get(2), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.EnderEye, 1L), + null, + null, + Materials.Mercury.getFluid(1000), + null, + ItemList.MSFMixture.get(4), + 300, + 64); + GT_Values.RA.addMixerRecipe( + ItemList.SFMixture.get(1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Blaze, 1L), + null, + null, + Materials.Mercury.getFluid(500), + null, + ItemList.MSFMixture.get(1), + 300, + 64); + + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Lignite, 4), + ItemList.MSFMixture.get(24), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.NitroFuel.getFluid(4000), + null, + ItemList.Block_MSSFUEL.get(4), + 400, + 600); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Charcoal, 4), + ItemList.MSFMixture.get(16), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.NitroFuel.getFluid(3000), + null, + ItemList.Block_MSSFUEL.get(4), + 300, + 600); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Coal, 4), + ItemList.MSFMixture.get(8), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.NitroFuel.getFluid(2000), + null, + ItemList.Block_MSSFUEL.get(4), + 200, + 600); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Lignite, 4), + ItemList.MSFMixture.get(24), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.GasolinePremium.getFluid(1600), + null, + ItemList.Block_MSSFUEL.get(4), + 400, + 600); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Charcoal, 4), + ItemList.MSFMixture.get(16), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.GasolinePremium.getFluid(1200), + null, + ItemList.Block_MSSFUEL.get(4), + 300, + 600); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Coal, 4), + ItemList.MSFMixture.get(8), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.GasolinePremium.getFluid(800), + null, + ItemList.Block_MSSFUEL.get(4), + 200, + 600); if (Loader.isModLoaded("Thaumcraft")) { - GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(20), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedAir, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.FierySteel.getFluid(50), null, ItemList.MSFMixture.get(20), 200, 64); - GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(20), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedEarth, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.FierySteel.getFluid(50), null, ItemList.MSFMixture.get(20), 200, 64); - GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(20), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedEntropy, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.FierySteel.getFluid(50), null, ItemList.MSFMixture.get(20), 200, 64); - GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(20), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedFire, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.FierySteel.getFluid(50), null, ItemList.MSFMixture.get(20), 200, 64); - GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(20), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedOrder, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.FierySteel.getFluid(50), null, ItemList.MSFMixture.get(20), 200, 64); - GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(20), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedWater, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.FierySteel.getFluid(50), null, ItemList.MSFMixture.get(20), 200, 64); + GT_Values.RA.addMixerRecipe( + ItemList.SFMixture.get(20), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedAir, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.FierySteel.getFluid(50), + null, + ItemList.MSFMixture.get(20), + 200, + 64); + GT_Values.RA.addMixerRecipe( + ItemList.SFMixture.get(20), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedEarth, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.FierySteel.getFluid(50), + null, + ItemList.MSFMixture.get(20), + 200, + 64); + GT_Values.RA.addMixerRecipe( + ItemList.SFMixture.get(20), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedEntropy, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.FierySteel.getFluid(50), + null, + ItemList.MSFMixture.get(20), + 200, + 64); + GT_Values.RA.addMixerRecipe( + ItemList.SFMixture.get(20), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedFire, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.FierySteel.getFluid(50), + null, + ItemList.MSFMixture.get(20), + 200, + 64); + GT_Values.RA.addMixerRecipe( + ItemList.SFMixture.get(20), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedOrder, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.FierySteel.getFluid(50), + null, + ItemList.MSFMixture.get(20), + 200, + 64); + GT_Values.RA.addMixerRecipe( + ItemList.SFMixture.get(20), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedWater, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.FierySteel.getFluid(50), + null, + ItemList.MSFMixture.get(20), + 200, + 64); FluidStack tFD = FluidRegistry.getFluidStack("fluiddeath", 30); if (tFD != null && tFD.getFluid() != null && tFD.amount > 0) { - GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(30), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedAir, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), tFD, null, ItemList.MSFMixture.get(30), 200, 64); - GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(30), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedEarth, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), tFD, null, ItemList.MSFMixture.get(30), 200, 64); - GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(30), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedEntropy, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), tFD, null, ItemList.MSFMixture.get(30), 200, 64); - GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(30), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedFire, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), tFD, null, ItemList.MSFMixture.get(30), 200, 64); - GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(30), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedOrder, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), tFD, null, ItemList.MSFMixture.get(30), 200, 64); - GT_Values.RA.addMixerRecipe(ItemList.SFMixture.get(30), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedWater, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), tFD, null, ItemList.MSFMixture.get(30), 200, 64); - - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Lignite, 1), ItemList.MSFMixture.get(6), GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 4), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.NitroFuel.getFluid(1000), null, ItemList.Block_MSSFUEL.get(1), 140, 600); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Charcoal, 1), ItemList.MSFMixture.get(4), GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 4), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.NitroFuel.getFluid(750), null, ItemList.Block_MSSFUEL.get(1), 120, 600); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Coal, 1), ItemList.MSFMixture.get(2), GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 4), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.NitroFuel.getFluid(500), null, ItemList.Block_MSSFUEL.get(1), 100, 600); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Lignite, 1), ItemList.MSFMixture.get(6), GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 4), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.GasolinePremium.getFluid(400), null, ItemList.Block_MSSFUEL.get(1), 140, 600); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Charcoal, 1), ItemList.MSFMixture.get(4), GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 4), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.GasolinePremium.getFluid(300), null, ItemList.Block_MSSFUEL.get(1), 120, 600); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Coal, 1), ItemList.MSFMixture.get(2), GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 4), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.GasolinePremium.getFluid(200), null, ItemList.Block_MSSFUEL.get(1), 100, 600); - + GT_Values.RA.addMixerRecipe( + ItemList.SFMixture.get(30), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedAir, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + tFD, + null, + ItemList.MSFMixture.get(30), + 200, + 64); + GT_Values.RA.addMixerRecipe( + ItemList.SFMixture.get(30), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedEarth, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + tFD, + null, + ItemList.MSFMixture.get(30), + 200, + 64); + GT_Values.RA.addMixerRecipe( + ItemList.SFMixture.get(30), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedEntropy, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + tFD, + null, + ItemList.MSFMixture.get(30), + 200, + 64); + GT_Values.RA.addMixerRecipe( + ItemList.SFMixture.get(30), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedFire, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + tFD, + null, + ItemList.MSFMixture.get(30), + 200, + 64); + GT_Values.RA.addMixerRecipe( + ItemList.SFMixture.get(30), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedOrder, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + tFD, + null, + ItemList.MSFMixture.get(30), + 200, + 64); + GT_Values.RA.addMixerRecipe( + ItemList.SFMixture.get(30), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedWater, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + tFD, + null, + ItemList.MSFMixture.get(30), + 200, + 64); + + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Lignite, 1), + ItemList.MSFMixture.get(6), + GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 4), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.NitroFuel.getFluid(1000), + null, + ItemList.Block_MSSFUEL.get(1), + 140, + 600); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Charcoal, 1), + ItemList.MSFMixture.get(4), + GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 4), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.NitroFuel.getFluid(750), + null, + ItemList.Block_MSSFUEL.get(1), + 120, + 600); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Coal, 1), + ItemList.MSFMixture.get(2), + GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 4), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.NitroFuel.getFluid(500), + null, + ItemList.Block_MSSFUEL.get(1), + 100, + 600); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Lignite, 1), + ItemList.MSFMixture.get(6), + GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 4), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.GasolinePremium.getFluid(400), + null, + ItemList.Block_MSSFUEL.get(1), + 140, + 600); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Charcoal, 1), + ItemList.MSFMixture.get(4), + GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 4), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.GasolinePremium.getFluid(300), + null, + ItemList.Block_MSSFUEL.get(1), + 120, + 600); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Coal, 1), + ItemList.MSFMixture.get(2), + GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 4), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.GasolinePremium.getFluid(200), + null, + ItemList.Block_MSSFUEL.get(1), + 100, + 600); } } - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Lignite, 1), ItemList.SFMixture.get(6), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.NitroFuel.getFluid(1000), null, ItemList.Block_SSFUEL.get(1), 140, 250); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Charcoal, 1), ItemList.SFMixture.get(4), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.NitroFuel.getFluid(750), null, ItemList.Block_SSFUEL.get(1), 120, 250); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Coal, 1), ItemList.SFMixture.get(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.NitroFuel.getFluid(500), null, ItemList.Block_SSFUEL.get(1), 100, 250); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Lignite, 1), ItemList.SFMixture.get(6), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.GasolinePremium.getFluid(400), null, ItemList.Block_SSFUEL.get(1), 140, 250); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Charcoal, 1), ItemList.SFMixture.get(4), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.GasolinePremium.getFluid(300), null, ItemList.Block_SSFUEL.get(1), 120, 250); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Coal, 1), ItemList.SFMixture.get(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.GasolinePremium.getFluid(200), null, ItemList.Block_SSFUEL.get(1), 100, 250); - - GT_Values.RA.addExtruderRecipe(ItemList.FR_Wax.get(1L), ItemList.Shape_Extruder_Cell.get(0L), ItemList.FR_WaxCapsule.get(1L), 64, 16); - GT_Values.RA.addExtruderRecipe(ItemList.FR_RefractoryWax.get(1L), ItemList.Shape_Extruder_Cell.get(0L), ItemList.FR_RefractoryCapsule.get(1L), 128, 16); - - GT_Values.RA.addFluidCannerRecipe(ItemList.Battery_Hull_LV.get(1L), ItemList.IC2_ReBattery.get(1L), Materials.Redstone.getMolten(288L), GT_Values.NF); - GT_Values.RA.addFluidCannerRecipe(ItemList.Battery_Hull_LV.get(1L), ItemList.Battery_SU_LV_Mercury.getWithCharge(1L, Integer.MAX_VALUE), Materials.Mercury.getFluid(1000L), GT_Values.NF); - GT_Values.RA.addFluidCannerRecipe(ItemList.Battery_Hull_MV.get(1L), ItemList.Battery_SU_MV_Mercury.getWithCharge(1L, Integer.MAX_VALUE), Materials.Mercury.getFluid(4000L), GT_Values.NF); - GT_Values.RA.addFluidCannerRecipe(ItemList.Battery_Hull_HV.get(1L), ItemList.Battery_SU_HV_Mercury.getWithCharge(1L, Integer.MAX_VALUE), Materials.Mercury.getFluid(16000L), GT_Values.NF); - GT_Values.RA.addFluidCannerRecipe(ItemList.Battery_Hull_LV.get(1L), ItemList.Battery_SU_LV_SulfuricAcid.getWithCharge(1L, Integer.MAX_VALUE), Materials.SulfuricAcid.getFluid(1000L), GT_Values.NF); - GT_Values.RA.addFluidCannerRecipe(ItemList.Battery_Hull_MV.get(1L), ItemList.Battery_SU_MV_SulfuricAcid.getWithCharge(1L, Integer.MAX_VALUE), Materials.SulfuricAcid.getFluid(4000L), GT_Values.NF); - GT_Values.RA.addFluidCannerRecipe(ItemList.Battery_Hull_HV.get(1L), ItemList.Battery_SU_HV_SulfuricAcid.getWithCharge(1L, Integer.MAX_VALUE), Materials.SulfuricAcid.getFluid(16000L), GT_Values.NF); - GT_Values.RA.addFluidCannerRecipe(ItemList.TF_Vial_FieryTears.get(1L), ItemList.Bottle_Empty.get(1L), GT_Values.NF, Materials.FierySteel.getFluid(250L)); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Lignite, 1), + ItemList.SFMixture.get(6), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.NitroFuel.getFluid(1000), + null, + ItemList.Block_SSFUEL.get(1), + 140, + 250); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Charcoal, 1), + ItemList.SFMixture.get(4), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.NitroFuel.getFluid(750), + null, + ItemList.Block_SSFUEL.get(1), + 120, + 250); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Coal, 1), + ItemList.SFMixture.get(2), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.NitroFuel.getFluid(500), + null, + ItemList.Block_SSFUEL.get(1), + 100, + 250); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Lignite, 1), + ItemList.SFMixture.get(6), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.GasolinePremium.getFluid(400), + null, + ItemList.Block_SSFUEL.get(1), + 140, + 250); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Charcoal, 1), + ItemList.SFMixture.get(4), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.GasolinePremium.getFluid(300), + null, + ItemList.Block_SSFUEL.get(1), + 120, + 250); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Coal, 1), + ItemList.SFMixture.get(2), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.GasolinePremium.getFluid(200), + null, + ItemList.Block_SSFUEL.get(1), + 100, + 250); + + GT_Values.RA.addExtruderRecipe( + ItemList.FR_Wax.get(1L), ItemList.Shape_Extruder_Cell.get(0L), ItemList.FR_WaxCapsule.get(1L), 64, 16); + GT_Values.RA.addExtruderRecipe( + ItemList.FR_RefractoryWax.get(1L), + ItemList.Shape_Extruder_Cell.get(0L), + ItemList.FR_RefractoryCapsule.get(1L), + 128, + 16); + + GT_Values.RA.addFluidCannerRecipe( + ItemList.Battery_Hull_LV.get(1L), + ItemList.IC2_ReBattery.get(1L), + Materials.Redstone.getMolten(288L), + GT_Values.NF); + GT_Values.RA.addFluidCannerRecipe( + ItemList.Battery_Hull_LV.get(1L), + ItemList.Battery_SU_LV_Mercury.getWithCharge(1L, Integer.MAX_VALUE), + Materials.Mercury.getFluid(1000L), + GT_Values.NF); + GT_Values.RA.addFluidCannerRecipe( + ItemList.Battery_Hull_MV.get(1L), + ItemList.Battery_SU_MV_Mercury.getWithCharge(1L, Integer.MAX_VALUE), + Materials.Mercury.getFluid(4000L), + GT_Values.NF); + GT_Values.RA.addFluidCannerRecipe( + ItemList.Battery_Hull_HV.get(1L), + ItemList.Battery_SU_HV_Mercury.getWithCharge(1L, Integer.MAX_VALUE), + Materials.Mercury.getFluid(16000L), + GT_Values.NF); + GT_Values.RA.addFluidCannerRecipe( + ItemList.Battery_Hull_LV.get(1L), + ItemList.Battery_SU_LV_SulfuricAcid.getWithCharge(1L, Integer.MAX_VALUE), + Materials.SulfuricAcid.getFluid(1000L), + GT_Values.NF); + GT_Values.RA.addFluidCannerRecipe( + ItemList.Battery_Hull_MV.get(1L), + ItemList.Battery_SU_MV_SulfuricAcid.getWithCharge(1L, Integer.MAX_VALUE), + Materials.SulfuricAcid.getFluid(4000L), + GT_Values.NF); + GT_Values.RA.addFluidCannerRecipe( + ItemList.Battery_Hull_HV.get(1L), + ItemList.Battery_SU_HV_SulfuricAcid.getWithCharge(1L, Integer.MAX_VALUE), + Materials.SulfuricAcid.getFluid(16000L), + GT_Values.NF); + GT_Values.RA.addFluidCannerRecipe( + ItemList.TF_Vial_FieryTears.get(1L), + ItemList.Bottle_Empty.get(1L), + GT_Values.NF, + Materials.FierySteel.getFluid(250L)); Materials tMaterial = Materials.Iron; if (tMaterial.mStandardMoltenFluid != null) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Casing.get(0L), tMaterial.getMolten(72L), ItemList.IC2_Item_Casing_Iron.get(1L), 16, 8); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Casing.get(0L), + tMaterial.getMolten(72L), + ItemList.IC2_Item_Casing_Iron.get(1L), + 16, + 8); } tMaterial = Materials.WroughtIron; if (tMaterial.mStandardMoltenFluid != null) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Casing.get(0L), tMaterial.getMolten(72L), ItemList.IC2_Item_Casing_Iron.get(1L), 16, 8); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Casing.get(0L), + tMaterial.getMolten(72L), + ItemList.IC2_Item_Casing_Iron.get(1L), + 16, + 8); } tMaterial = Materials.Gold; if (tMaterial.mStandardMoltenFluid != null) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Casing.get(0L), tMaterial.getMolten(72L), ItemList.IC2_Item_Casing_Gold.get(1L), 16, 8); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Casing.get(0L), + tMaterial.getMolten(72L), + ItemList.IC2_Item_Casing_Gold.get(1L), + 16, + 8); } tMaterial = Materials.Bronze; if (tMaterial.mStandardMoltenFluid != null) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Casing.get(0L), tMaterial.getMolten(72L), ItemList.IC2_Item_Casing_Bronze.get(1L), 16, 8); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Casing.get(0L), + tMaterial.getMolten(72L), + ItemList.IC2_Item_Casing_Bronze.get(1L), + 16, + 8); } tMaterial = Materials.Copper; if (tMaterial.mStandardMoltenFluid != null) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Casing.get(0L), tMaterial.getMolten(72L), ItemList.IC2_Item_Casing_Copper.get(1L), 16, 8); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Casing.get(0L), + tMaterial.getMolten(72L), + ItemList.IC2_Item_Casing_Copper.get(1L), + 16, + 8); } tMaterial = Materials.AnnealedCopper; if (tMaterial.mStandardMoltenFluid != null) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Casing.get(0L), tMaterial.getMolten(72L), ItemList.IC2_Item_Casing_Copper.get(1L), 16, 8); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Casing.get(0L), + tMaterial.getMolten(72L), + ItemList.IC2_Item_Casing_Copper.get(1L), + 16, + 8); } tMaterial = Materials.Tin; if (tMaterial.mStandardMoltenFluid != null) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Casing.get(0L), tMaterial.getMolten(72L), ItemList.IC2_Item_Casing_Tin.get(1L), 16, 8); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Casing.get(0L), + tMaterial.getMolten(72L), + ItemList.IC2_Item_Casing_Tin.get(1L), + 16, + 8); } tMaterial = Materials.Lead; if (tMaterial.mStandardMoltenFluid != null) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Casing.get(0L), tMaterial.getMolten(72L), ItemList.IC2_Item_Casing_Lead.get(1L), 16, 8); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Casing.get(0L), + tMaterial.getMolten(72L), + ItemList.IC2_Item_Casing_Lead.get(1L), + 16, + 8); } tMaterial = Materials.Steel; if (tMaterial.mStandardMoltenFluid != null) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Casing.get(0L), tMaterial.getMolten(72L), ItemList.IC2_Item_Casing_Steel.get(1L), 16, 8); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Casing.get(0L), + tMaterial.getMolten(72L), + ItemList.IC2_Item_Casing_Steel.get(1L), + 16, + 8); } - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ball.get(0L), Materials.Mercury.getFluid(1000L), GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1, 3), 128, 4); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ball.get(0L), Materials.Mercury.getFluid(1000L), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Mercury, 1L), 128, 4); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ball.get(0L), Materials.Water.getFluid(250L), new ItemStack(Items.snowball, 1, 0), 128, 4); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ball.get(0L), GT_ModHandler.getDistilledWater(250L), new ItemStack(Items.snowball, 1, 0), 128, 4); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0L), Materials.Water.getFluid(1000L), new ItemStack(Blocks.snow, 1, 0), 512, 4); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0L), GT_ModHandler.getDistilledWater(1000L), new ItemStack(Blocks.snow, 1, 0), 512, 4); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0L), Materials.Lava.getFluid(1000L), new ItemStack(Blocks.obsidian, 1, 0), 1024, 16); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0L), Materials.Concrete.getMolten(144L), new ItemStack(GregTech_API.sBlockConcretes, 1, 8), 12, 4); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0L), Materials.Glowstone.getMolten(576L), new ItemStack(Blocks.glowstone, 1, 0), 12, 4); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0L), Materials.Glass.getMolten(144L), new ItemStack(Blocks.glass, 1, 0), 12, 4); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Plate.get(0L), Materials.Glass.getMolten(144L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Glass, 1L), 12, 4); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Bottle.get(0L), Materials.Glass.getMolten(144L), ItemList.Bottle_Empty.get(1L), 12, 4); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Cylinder.get(0L), Materials.Milk.getFluid(250L), ItemList.Food_Cheese.get(1L), 1024, 4); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Cylinder.get(0L), Materials.Cheese.getMolten(144L), ItemList.Food_Cheese.get(1L), 64, 8); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Anvil.get(0L), Materials.Iron.getMolten(4464L), new ItemStack(Blocks.anvil, 1, 0), 128, 16); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Anvil.get(0L), Materials.WroughtIron.getMolten(4464L), new ItemStack(Blocks.anvil, 1, 0), 128, 16); - - GT_Values.RA.addChemicalBathRecipe(ItemList.Food_Raw_Fries.get(1L), Materials.FryingOilHot.getFluid(10L), ItemList.Food_Fries.get(1L), GT_Values.NI, GT_Values.NI, null, 16, 4); - GT_Values.RA.addChemicalBathRecipe(GT_ModHandler.getIC2Item("dynamite", 1L), Materials.Glue.getFluid(10L), GT_ModHandler.getIC2Item("stickyDynamite", 1L), GT_Values.NI, GT_Values.NI, null, 16, 4); - GT_Values.RA.addChemicalRecipe(new ItemStack(Items.paper, 1), new ItemStack(Items.string, 1), Materials.Glyceryl.getFluid(500), GT_Values.NF, GT_ModHandler.getIC2Item("dynamite", 1L), 160, 4); - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Steel, 1L), Materials.Concrete.getMolten(144L), GT_ModHandler.getIC2Item("reinforcedStone", 1L), GT_Values.NI, GT_Values.NI, null, 200, 4); - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L), Materials.Water.getFluid(125L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HydratedCoal, 1L), GT_Values.NI, GT_Values.NI, null, 12, 4); - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), Materials.Water.getFluid(100L), new ItemStack(Items.paper, 1, 0), GT_Values.NI, GT_Values.NI, null, 200, 4); - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Paper, 1L), Materials.Water.getFluid(100L), new ItemStack(Items.paper, 1, 0), GT_Values.NI, GT_Values.NI, null, 100, 4); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Items.reeds, 1, 32767), Materials.Water.getFluid(100L), new ItemStack(Items.paper, 1, 0), GT_Values.NI, GT_Values.NI, null, 100, 8); - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L), GT_ModHandler.getDistilledWater(125L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HydratedCoal, 1L), GT_Values.NI, GT_Values.NI, null, 12, 4); - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), GT_ModHandler.getDistilledWater(100L), new ItemStack(Items.paper, 1, 0), GT_Values.NI, GT_Values.NI, null, 200, 4); - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Paper, 1L), GT_ModHandler.getDistilledWater(100L), new ItemStack(Items.paper, 1, 0), GT_Values.NI, GT_Values.NI, null, 100, 4); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Items.reeds, 1, 32767), GT_ModHandler.getDistilledWater(100L), new ItemStack(Items.paper, 1, 0), GT_Values.NI, GT_Values.NI, null, 100, 8); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.wool, 1, 1), Materials.Chlorine.getGas(50L), new ItemStack(Blocks.wool, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.wool, 1, 2), Materials.Chlorine.getGas(50L), new ItemStack(Blocks.wool, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.wool, 1, 3), Materials.Chlorine.getGas(50L), new ItemStack(Blocks.wool, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.wool, 1, 4), Materials.Chlorine.getGas(50L), new ItemStack(Blocks.wool, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.wool, 1, 5), Materials.Chlorine.getGas(50L), new ItemStack(Blocks.wool, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.wool, 1, 6), Materials.Chlorine.getGas(50L), new ItemStack(Blocks.wool, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.wool, 1, 7), Materials.Chlorine.getGas(50L), new ItemStack(Blocks.wool, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.wool, 1, 8), Materials.Chlorine.getGas(50L), new ItemStack(Blocks.wool, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.wool, 1, 9), Materials.Chlorine.getGas(50L), new ItemStack(Blocks.wool, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.wool, 1, 10), Materials.Chlorine.getGas(50L), new ItemStack(Blocks.wool, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.wool, 1, 11), Materials.Chlorine.getGas(50L), new ItemStack(Blocks.wool, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.wool, 1, 12), Materials.Chlorine.getGas(50L), new ItemStack(Blocks.wool, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.wool, 1, 13), Materials.Chlorine.getGas(50L), new ItemStack(Blocks.wool, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.wool, 1, 14), Materials.Chlorine.getGas(50L), new ItemStack(Blocks.wool, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.wool, 1, 15), Materials.Chlorine.getGas(50L), new ItemStack(Blocks.wool, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.carpet, 1, 1), Materials.Chlorine.getGas(25L), new ItemStack(Blocks.carpet, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.carpet, 1, 2), Materials.Chlorine.getGas(25L), new ItemStack(Blocks.carpet, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.carpet, 1, 3), Materials.Chlorine.getGas(25L), new ItemStack(Blocks.carpet, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.carpet, 1, 4), Materials.Chlorine.getGas(25L), new ItemStack(Blocks.carpet, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.carpet, 1, 5), Materials.Chlorine.getGas(25L), new ItemStack(Blocks.carpet, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.carpet, 1, 6), Materials.Chlorine.getGas(25L), new ItemStack(Blocks.carpet, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.carpet, 1, 7), Materials.Chlorine.getGas(25L), new ItemStack(Blocks.carpet, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.carpet, 1, 8), Materials.Chlorine.getGas(25L), new ItemStack(Blocks.carpet, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.carpet, 1, 9), Materials.Chlorine.getGas(25L), new ItemStack(Blocks.carpet, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.carpet, 1, 10), Materials.Chlorine.getGas(25L), new ItemStack(Blocks.carpet, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.carpet, 1, 11), Materials.Chlorine.getGas(25L), new ItemStack(Blocks.carpet, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.carpet, 1, 12), Materials.Chlorine.getGas(25L), new ItemStack(Blocks.carpet, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.carpet, 1, 13), Materials.Chlorine.getGas(25L), new ItemStack(Blocks.carpet, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.carpet, 1, 14), Materials.Chlorine.getGas(25L), new ItemStack(Blocks.carpet, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.carpet, 1, 15), Materials.Chlorine.getGas(25L), new ItemStack(Blocks.carpet, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.stained_hardened_clay, 1, 32767), Materials.Chlorine.getGas(50L), new ItemStack(Blocks.hardened_clay, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.stained_glass, 1, 32767), Materials.Chlorine.getGas(50L), new ItemStack(Blocks.glass, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.stained_glass_pane, 1, 32767), Materials.Chlorine.getGas(20L), new ItemStack(Blocks.glass_pane, 1, 0), GT_Values.NI, GT_Values.NI, null, 400, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(GregTech_API.sBlockConcretes, 1, 8), Materials.Water.getFluid(250L), new ItemStack(GregTech_API.sBlockConcretes, 1, 0), GT_Values.NI, GT_Values.NI, null, 200, 4); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(GregTech_API.sBlockConcretes, 1, 9), Materials.Water.getFluid(250L), new ItemStack(GregTech_API.sBlockConcretes, 1, 1), GT_Values.NI, GT_Values.NI, null, 200, 4); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(GregTech_API.sBlockConcretes, 1, 10), Materials.Water.getFluid(250L), new ItemStack(GregTech_API.sBlockConcretes, 1, 2), GT_Values.NI, GT_Values.NI, null, 200, 4); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(GregTech_API.sBlockConcretes, 1, 11), Materials.Water.getFluid(250L), new ItemStack(GregTech_API.sBlockConcretes, 1, 3), GT_Values.NI, GT_Values.NI, null, 200, 4); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(GregTech_API.sBlockConcretes, 1, 12), Materials.Water.getFluid(250L), new ItemStack(GregTech_API.sBlockConcretes, 1, 4), GT_Values.NI, GT_Values.NI, null, 200, 4); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(GregTech_API.sBlockConcretes, 1, 13), Materials.Water.getFluid(250L), new ItemStack(GregTech_API.sBlockConcretes, 1, 5), GT_Values.NI, GT_Values.NI, null, 200, 4); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(GregTech_API.sBlockConcretes, 1, 14), Materials.Water.getFluid(250L), new ItemStack(GregTech_API.sBlockConcretes, 1, 6), GT_Values.NI, GT_Values.NI, null, 200, 4); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(GregTech_API.sBlockConcretes, 1, 15), Materials.Water.getFluid(250L), new ItemStack(GregTech_API.sBlockConcretes, 1, 7), GT_Values.NI, GT_Values.NI, null, 200, 4); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(GregTech_API.sBlockConcretes, 1, 8), GT_ModHandler.getDistilledWater(250L), new ItemStack(GregTech_API.sBlockConcretes, 1, 0), GT_Values.NI, GT_Values.NI, null, 200, 4); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(GregTech_API.sBlockConcretes, 1, 9), GT_ModHandler.getDistilledWater(250L), new ItemStack(GregTech_API.sBlockConcretes, 1, 1), GT_Values.NI, GT_Values.NI, null, 200, 4); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(GregTech_API.sBlockConcretes, 1, 10), GT_ModHandler.getDistilledWater(250L), new ItemStack(GregTech_API.sBlockConcretes, 1, 2), GT_Values.NI, GT_Values.NI, null, 200, 4); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(GregTech_API.sBlockConcretes, 1, 11), GT_ModHandler.getDistilledWater(250L), new ItemStack(GregTech_API.sBlockConcretes, 1, 3), GT_Values.NI, GT_Values.NI, null, 200, 4); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(GregTech_API.sBlockConcretes, 1, 12), GT_ModHandler.getDistilledWater(250L), new ItemStack(GregTech_API.sBlockConcretes, 1, 4), GT_Values.NI, GT_Values.NI, null, 200, 4); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(GregTech_API.sBlockConcretes, 1, 13), GT_ModHandler.getDistilledWater(250L), new ItemStack(GregTech_API.sBlockConcretes, 1, 5), GT_Values.NI, GT_Values.NI, null, 200, 4); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(GregTech_API.sBlockConcretes, 1, 14), GT_ModHandler.getDistilledWater(250L), new ItemStack(GregTech_API.sBlockConcretes, 1, 6), GT_Values.NI, GT_Values.NI, null, 200, 4); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(GregTech_API.sBlockConcretes, 1, 15), GT_ModHandler.getDistilledWater(250L), new ItemStack(GregTech_API.sBlockConcretes, 1, 7), GT_Values.NI, GT_Values.NI, null, 200, 4); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.BlackSteel, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 1L), Materials.Concrete.getMolten(144L), ItemList.Block_Plascrete.get(1L), 200, 48); - - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Bronze, 1L), Materials.Concrete.getMolten(144L), ItemList.Block_BronzePlate.get(1L), GT_Values.NI, GT_Values.NI, null, 200, 4); - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Steel, 1L), Materials.Steel.getMolten(288L), ItemList.Block_SteelPlate.get(1L), GT_Values.NI, GT_Values.NI, null, 250, 16); - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Titanium, 1L), Materials.Titanium.getMolten(144L), ItemList.Block_TitaniumPlate.get(1L), GT_Values.NI, GT_Values.NI, null, 300, 30); - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.TungstenSteel, 1L), Materials.TungstenSteel.getMolten(144L), ItemList.Block_TungstenSteelReinforced.get(1L), GT_Values.NI, GT_Values.NI, null, 350, 64); - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Iridium, 1L), Materials.Iridium.getMolten(144L), ItemList.Block_IridiumTungstensteel.get(1L), GT_Values.NI, GT_Values.NI, null, 400, 120); - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Naquadah, 1L), Materials.Osmium.getMolten(144L), ItemList.Block_NaquadahPlate.get(1L), GT_Values.NI, GT_Values.NI, null, 450, 256); - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 1L), Materials.Naquadria.getMolten(144L), ItemList.Block_NeutroniumPlate.get(1L), GT_Values.NI, GT_Values.NI, null, 500, 480); - - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.TungstenSteel, 1L), Materials.Concrete.getMolten(144L), ItemList.Block_TungstenSteelReinforced.get(1L), GT_Values.NI, GT_Values.NI, null, 200, 4); - GT_Values.RA.addCentrifugeRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedGold, 1L), GT_Values.NI, Materials.Mercury.getFluid(200L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 1L), GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 2L, 14), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{10000, 10000, 9000}, 400, 120); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Ball.get(0L), + Materials.Mercury.getFluid(1000L), + GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1, 3), + 128, + 4); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Ball.get(0L), + Materials.Mercury.getFluid(1000L), + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Mercury, 1L), + 128, + 4); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Ball.get(0L), + Materials.Water.getFluid(250L), + new ItemStack(Items.snowball, 1, 0), + 128, + 4); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Ball.get(0L), + GT_ModHandler.getDistilledWater(250L), + new ItemStack(Items.snowball, 1, 0), + 128, + 4); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Block.get(0L), + Materials.Water.getFluid(1000L), + new ItemStack(Blocks.snow, 1, 0), + 512, + 4); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Block.get(0L), + GT_ModHandler.getDistilledWater(1000L), + new ItemStack(Blocks.snow, 1, 0), + 512, + 4); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Block.get(0L), + Materials.Lava.getFluid(1000L), + new ItemStack(Blocks.obsidian, 1, 0), + 1024, + 16); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Block.get(0L), + Materials.Concrete.getMolten(144L), + new ItemStack(GregTech_API.sBlockConcretes, 1, 8), + 12, + 4); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Block.get(0L), + Materials.Glowstone.getMolten(576L), + new ItemStack(Blocks.glowstone, 1, 0), + 12, + 4); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Block.get(0L), + Materials.Glass.getMolten(144L), + new ItemStack(Blocks.glass, 1, 0), + 12, + 4); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Plate.get(0L), + Materials.Glass.getMolten(144L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Glass, 1L), + 12, + 4); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Bottle.get(0L), + Materials.Glass.getMolten(144L), + ItemList.Bottle_Empty.get(1L), + 12, + 4); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Cylinder.get(0L), + Materials.Milk.getFluid(250L), + ItemList.Food_Cheese.get(1L), + 1024, + 4); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Cylinder.get(0L), + Materials.Cheese.getMolten(144L), + ItemList.Food_Cheese.get(1L), + 64, + 8); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Anvil.get(0L), + Materials.Iron.getMolten(4464L), + new ItemStack(Blocks.anvil, 1, 0), + 128, + 16); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Anvil.get(0L), + Materials.WroughtIron.getMolten(4464L), + new ItemStack(Blocks.anvil, 1, 0), + 128, + 16); + + GT_Values.RA.addChemicalBathRecipe( + ItemList.Food_Raw_Fries.get(1L), + Materials.FryingOilHot.getFluid(10L), + ItemList.Food_Fries.get(1L), + GT_Values.NI, + GT_Values.NI, + null, + 16, + 4); + GT_Values.RA.addChemicalBathRecipe( + GT_ModHandler.getIC2Item("dynamite", 1L), + Materials.Glue.getFluid(10L), + GT_ModHandler.getIC2Item("stickyDynamite", 1L), + GT_Values.NI, + GT_Values.NI, + null, + 16, + 4); + GT_Values.RA.addChemicalRecipe( + new ItemStack(Items.paper, 1), + new ItemStack(Items.string, 1), + Materials.Glyceryl.getFluid(500), + GT_Values.NF, + GT_ModHandler.getIC2Item("dynamite", 1L), + 160, + 4); + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Steel, 1L), + Materials.Concrete.getMolten(144L), + GT_ModHandler.getIC2Item("reinforcedStone", 1L), + GT_Values.NI, + GT_Values.NI, + null, + 200, + 4); + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L), + Materials.Water.getFluid(125L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HydratedCoal, 1L), + GT_Values.NI, + GT_Values.NI, + null, + 12, + 4); + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), + Materials.Water.getFluid(100L), + new ItemStack(Items.paper, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 200, + 4); + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Paper, 1L), + Materials.Water.getFluid(100L), + new ItemStack(Items.paper, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 100, + 4); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Items.reeds, 1, 32767), + Materials.Water.getFluid(100L), + new ItemStack(Items.paper, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 100, + 8); + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L), + GT_ModHandler.getDistilledWater(125L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HydratedCoal, 1L), + GT_Values.NI, + GT_Values.NI, + null, + 12, + 4); + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), + GT_ModHandler.getDistilledWater(100L), + new ItemStack(Items.paper, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 200, + 4); + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Paper, 1L), + GT_ModHandler.getDistilledWater(100L), + new ItemStack(Items.paper, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 100, + 4); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Items.reeds, 1, 32767), + GT_ModHandler.getDistilledWater(100L), + new ItemStack(Items.paper, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 100, + 8); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.wool, 1, 1), + Materials.Chlorine.getGas(50L), + new ItemStack(Blocks.wool, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.wool, 1, 2), + Materials.Chlorine.getGas(50L), + new ItemStack(Blocks.wool, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.wool, 1, 3), + Materials.Chlorine.getGas(50L), + new ItemStack(Blocks.wool, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.wool, 1, 4), + Materials.Chlorine.getGas(50L), + new ItemStack(Blocks.wool, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.wool, 1, 5), + Materials.Chlorine.getGas(50L), + new ItemStack(Blocks.wool, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.wool, 1, 6), + Materials.Chlorine.getGas(50L), + new ItemStack(Blocks.wool, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.wool, 1, 7), + Materials.Chlorine.getGas(50L), + new ItemStack(Blocks.wool, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.wool, 1, 8), + Materials.Chlorine.getGas(50L), + new ItemStack(Blocks.wool, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.wool, 1, 9), + Materials.Chlorine.getGas(50L), + new ItemStack(Blocks.wool, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.wool, 1, 10), + Materials.Chlorine.getGas(50L), + new ItemStack(Blocks.wool, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.wool, 1, 11), + Materials.Chlorine.getGas(50L), + new ItemStack(Blocks.wool, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.wool, 1, 12), + Materials.Chlorine.getGas(50L), + new ItemStack(Blocks.wool, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.wool, 1, 13), + Materials.Chlorine.getGas(50L), + new ItemStack(Blocks.wool, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.wool, 1, 14), + Materials.Chlorine.getGas(50L), + new ItemStack(Blocks.wool, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.wool, 1, 15), + Materials.Chlorine.getGas(50L), + new ItemStack(Blocks.wool, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.carpet, 1, 1), + Materials.Chlorine.getGas(25L), + new ItemStack(Blocks.carpet, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.carpet, 1, 2), + Materials.Chlorine.getGas(25L), + new ItemStack(Blocks.carpet, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.carpet, 1, 3), + Materials.Chlorine.getGas(25L), + new ItemStack(Blocks.carpet, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.carpet, 1, 4), + Materials.Chlorine.getGas(25L), + new ItemStack(Blocks.carpet, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.carpet, 1, 5), + Materials.Chlorine.getGas(25L), + new ItemStack(Blocks.carpet, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.carpet, 1, 6), + Materials.Chlorine.getGas(25L), + new ItemStack(Blocks.carpet, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.carpet, 1, 7), + Materials.Chlorine.getGas(25L), + new ItemStack(Blocks.carpet, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.carpet, 1, 8), + Materials.Chlorine.getGas(25L), + new ItemStack(Blocks.carpet, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.carpet, 1, 9), + Materials.Chlorine.getGas(25L), + new ItemStack(Blocks.carpet, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.carpet, 1, 10), + Materials.Chlorine.getGas(25L), + new ItemStack(Blocks.carpet, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.carpet, 1, 11), + Materials.Chlorine.getGas(25L), + new ItemStack(Blocks.carpet, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.carpet, 1, 12), + Materials.Chlorine.getGas(25L), + new ItemStack(Blocks.carpet, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.carpet, 1, 13), + Materials.Chlorine.getGas(25L), + new ItemStack(Blocks.carpet, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.carpet, 1, 14), + Materials.Chlorine.getGas(25L), + new ItemStack(Blocks.carpet, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.carpet, 1, 15), + Materials.Chlorine.getGas(25L), + new ItemStack(Blocks.carpet, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.stained_hardened_clay, 1, 32767), + Materials.Chlorine.getGas(50L), + new ItemStack(Blocks.hardened_clay, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.stained_glass, 1, 32767), + Materials.Chlorine.getGas(50L), + new ItemStack(Blocks.glass, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.stained_glass_pane, 1, 32767), + Materials.Chlorine.getGas(20L), + new ItemStack(Blocks.glass_pane, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(GregTech_API.sBlockConcretes, 1, 8), + Materials.Water.getFluid(250L), + new ItemStack(GregTech_API.sBlockConcretes, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 200, + 4); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(GregTech_API.sBlockConcretes, 1, 9), + Materials.Water.getFluid(250L), + new ItemStack(GregTech_API.sBlockConcretes, 1, 1), + GT_Values.NI, + GT_Values.NI, + null, + 200, + 4); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(GregTech_API.sBlockConcretes, 1, 10), + Materials.Water.getFluid(250L), + new ItemStack(GregTech_API.sBlockConcretes, 1, 2), + GT_Values.NI, + GT_Values.NI, + null, + 200, + 4); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(GregTech_API.sBlockConcretes, 1, 11), + Materials.Water.getFluid(250L), + new ItemStack(GregTech_API.sBlockConcretes, 1, 3), + GT_Values.NI, + GT_Values.NI, + null, + 200, + 4); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(GregTech_API.sBlockConcretes, 1, 12), + Materials.Water.getFluid(250L), + new ItemStack(GregTech_API.sBlockConcretes, 1, 4), + GT_Values.NI, + GT_Values.NI, + null, + 200, + 4); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(GregTech_API.sBlockConcretes, 1, 13), + Materials.Water.getFluid(250L), + new ItemStack(GregTech_API.sBlockConcretes, 1, 5), + GT_Values.NI, + GT_Values.NI, + null, + 200, + 4); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(GregTech_API.sBlockConcretes, 1, 14), + Materials.Water.getFluid(250L), + new ItemStack(GregTech_API.sBlockConcretes, 1, 6), + GT_Values.NI, + GT_Values.NI, + null, + 200, + 4); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(GregTech_API.sBlockConcretes, 1, 15), + Materials.Water.getFluid(250L), + new ItemStack(GregTech_API.sBlockConcretes, 1, 7), + GT_Values.NI, + GT_Values.NI, + null, + 200, + 4); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(GregTech_API.sBlockConcretes, 1, 8), + GT_ModHandler.getDistilledWater(250L), + new ItemStack(GregTech_API.sBlockConcretes, 1, 0), + GT_Values.NI, + GT_Values.NI, + null, + 200, + 4); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(GregTech_API.sBlockConcretes, 1, 9), + GT_ModHandler.getDistilledWater(250L), + new ItemStack(GregTech_API.sBlockConcretes, 1, 1), + GT_Values.NI, + GT_Values.NI, + null, + 200, + 4); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(GregTech_API.sBlockConcretes, 1, 10), + GT_ModHandler.getDistilledWater(250L), + new ItemStack(GregTech_API.sBlockConcretes, 1, 2), + GT_Values.NI, + GT_Values.NI, + null, + 200, + 4); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(GregTech_API.sBlockConcretes, 1, 11), + GT_ModHandler.getDistilledWater(250L), + new ItemStack(GregTech_API.sBlockConcretes, 1, 3), + GT_Values.NI, + GT_Values.NI, + null, + 200, + 4); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(GregTech_API.sBlockConcretes, 1, 12), + GT_ModHandler.getDistilledWater(250L), + new ItemStack(GregTech_API.sBlockConcretes, 1, 4), + GT_Values.NI, + GT_Values.NI, + null, + 200, + 4); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(GregTech_API.sBlockConcretes, 1, 13), + GT_ModHandler.getDistilledWater(250L), + new ItemStack(GregTech_API.sBlockConcretes, 1, 5), + GT_Values.NI, + GT_Values.NI, + null, + 200, + 4); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(GregTech_API.sBlockConcretes, 1, 14), + GT_ModHandler.getDistilledWater(250L), + new ItemStack(GregTech_API.sBlockConcretes, 1, 6), + GT_Values.NI, + GT_Values.NI, + null, + 200, + 4); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(GregTech_API.sBlockConcretes, 1, 15), + GT_ModHandler.getDistilledWater(250L), + new ItemStack(GregTech_API.sBlockConcretes, 1, 7), + GT_Values.NI, + GT_Values.NI, + null, + 200, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.BlackSteel, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 1L), + Materials.Concrete.getMolten(144L), + ItemList.Block_Plascrete.get(1L), + 200, + 48); + + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Bronze, 1L), + Materials.Concrete.getMolten(144L), + ItemList.Block_BronzePlate.get(1L), + GT_Values.NI, + GT_Values.NI, + null, + 200, + 4); + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Steel, 1L), + Materials.Steel.getMolten(288L), + ItemList.Block_SteelPlate.get(1L), + GT_Values.NI, + GT_Values.NI, + null, + 250, + 16); + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Titanium, 1L), + Materials.Titanium.getMolten(144L), + ItemList.Block_TitaniumPlate.get(1L), + GT_Values.NI, + GT_Values.NI, + null, + 300, + 30); + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.TungstenSteel, 1L), + Materials.TungstenSteel.getMolten(144L), + ItemList.Block_TungstenSteelReinforced.get(1L), + GT_Values.NI, + GT_Values.NI, + null, + 350, + 64); + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Iridium, 1L), + Materials.Iridium.getMolten(144L), + ItemList.Block_IridiumTungstensteel.get(1L), + GT_Values.NI, + GT_Values.NI, + null, + 400, + 120); + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Naquadah, 1L), + Materials.Osmium.getMolten(144L), + ItemList.Block_NaquadahPlate.get(1L), + GT_Values.NI, + GT_Values.NI, + null, + 450, + 256); + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 1L), + Materials.Naquadria.getMolten(144L), + ItemList.Block_NeutroniumPlate.get(1L), + GT_Values.NI, + GT_Values.NI, + null, + 500, + 480); + + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.TungstenSteel, 1L), + Materials.Concrete.getMolten(144L), + ItemList.Block_TungstenSteelReinforced.get(1L), + GT_Values.NI, + GT_Values.NI, + null, + 200, + 4); + GT_Values.RA.addCentrifugeRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedGold, 1L), + GT_Values.NI, + Materials.Mercury.getFluid(200L), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 1L), + GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 2L, 14), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + new int[] {10000, 10000, 9000}, + 400, + 120); for (int j = 0; j < Dyes.dyeRed.getSizeOfFluidList(); j++) { - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.RedAlloy, 1L), Dyes.dyeRed.getFluidDye(j, 72L), GT_ModHandler.getModItem("BuildCraft|Transport", "pipeWire", 4L, 0), GT_Values.NI, GT_Values.NI, null, 32, 16); + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.RedAlloy, 1L), + Dyes.dyeRed.getFluidDye(j, 72L), + GT_ModHandler.getModItem("BuildCraft|Transport", "pipeWire", 4L, 0), + GT_Values.NI, + GT_Values.NI, + null, + 32, + 16); } for (int j = 0; j < Dyes.dyeBlue.getSizeOfFluidList(); j++) { - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.RedAlloy, 1L), Dyes.dyeBlue.getFluidDye(j, 72L), GT_ModHandler.getModItem("BuildCraft|Transport", "pipeWire", 4L, 1), GT_Values.NI, GT_Values.NI, null, 32, 16); + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.RedAlloy, 1L), + Dyes.dyeBlue.getFluidDye(j, 72L), + GT_ModHandler.getModItem("BuildCraft|Transport", "pipeWire", 4L, 1), + GT_Values.NI, + GT_Values.NI, + null, + 32, + 16); } for (int j = 0; j < Dyes.dyeGreen.getSizeOfFluidList(); j++) { - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.RedAlloy, 1L), Dyes.dyeGreen.getFluidDye(j, 72L), GT_ModHandler.getModItem("BuildCraft|Transport", "pipeWire", 4L, 2), GT_Values.NI, GT_Values.NI, null, 32, 16); + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.RedAlloy, 1L), + Dyes.dyeGreen.getFluidDye(j, 72L), + GT_ModHandler.getModItem("BuildCraft|Transport", "pipeWire", 4L, 2), + GT_Values.NI, + GT_Values.NI, + null, + 32, + 16); } for (int j = 0; j < Dyes.dyeYellow.getSizeOfFluidList(); j++) { - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.RedAlloy, 1L), Dyes.dyeYellow.getFluidDye(j, 72L), GT_ModHandler.getModItem("BuildCraft|Transport", "pipeWire", 4L, 3), GT_Values.NI, GT_Values.NI, null, 32, 16); + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.RedAlloy, 1L), + Dyes.dyeYellow.getFluidDye(j, 72L), + GT_ModHandler.getModItem("BuildCraft|Transport", "pipeWire", 4L, 3), + GT_Values.NI, + GT_Values.NI, + null, + 32, + 16); } for (byte i = 0; i < 16; i = (byte) (i + 1)) { for (int j = 0; j < Dyes.VALUES[i].getSizeOfFluidList(); j++) { if (i != 15) { - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.wool, 1, 0), Dyes.VALUES[i].getFluidDye(j, 72L), new ItemStack(Blocks.wool, 1, 15 - i), GT_Values.NI, GT_Values.NI, null, 64, 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.wool, 1, 0), + Dyes.VALUES[i].getFluidDye(j, 72L), + new ItemStack(Blocks.wool, 1, 15 - i), + GT_Values.NI, + GT_Values.NI, + null, + 64, + 2); } - GT_Values.RA.addAssemblerRecipe(new ItemStack(Items.string, 3), GT_Utility.getIntegratedCircuit(3), Dyes.VALUES[i].getFluidDye(j, 24L), new ItemStack(Blocks.carpet, 2, 15 - i), 128, 5); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.glass, 1, 0), Dyes.VALUES[i].getFluidDye(j, 18L), new ItemStack(Blocks.stained_glass, 1, 15 - i), GT_Values.NI, GT_Values.NI, null, 64, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Blocks.hardened_clay, 1, 0), Dyes.VALUES[i].getFluidDye(j, 18L), new ItemStack(Blocks.stained_hardened_clay, 1, 15 - i), GT_Values.NI, GT_Values.NI, null, 64, 2); + GT_Values.RA.addAssemblerRecipe( + new ItemStack(Items.string, 3), + GT_Utility.getIntegratedCircuit(3), + Dyes.VALUES[i].getFluidDye(j, 24L), + new ItemStack(Blocks.carpet, 2, 15 - i), + 128, + 5); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.glass, 1, 0), + Dyes.VALUES[i].getFluidDye(j, 18L), + new ItemStack(Blocks.stained_glass, 1, 15 - i), + GT_Values.NI, + GT_Values.NI, + null, + 64, + 2); + GT_Values.RA.addChemicalBathRecipe( + new ItemStack(Blocks.hardened_clay, 1, 0), + Dyes.VALUES[i].getFluidDye(j, 18L), + new ItemStack(Blocks.stained_hardened_clay, 1, 15 - i), + GT_Values.NI, + GT_Values.NI, + null, + 64, + 2); } } - GT_Values.RA.addFluidExtractionRecipe(ItemList.Dye_SquidInk.get(1L), GT_Values.NI, FluidRegistry.getFluidStack("squidink", 144), 10000, 128, 4); - GT_Values.RA.addFluidExtractionRecipe(ItemList.Dye_Indigo.get(1L), GT_Values.NI, FluidRegistry.getFluidStack("indigo", 144), 10000, 128, 4); - GT_Values.RA.addFluidExtractionRecipe(ItemList.Crop_Drop_Indigo.get(1L), GT_Values.NI, FluidRegistry.getFluidStack("indigo", 144), 10000, 128, 4); - GT_Values.RA.addFluidExtractionRecipe(ItemList.Crop_Drop_MilkWart.get(1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Milk, 1L), GT_ModHandler.getMilk(150L), 1000, 128, 4); - GT_Values.RA.addFluidExtractionRecipe(ItemList.Crop_Drop_OilBerry.get(1L), GT_Values.NI, Materials.Oil.getFluid(100L), 10000, 128, 4); - GT_Values.RA.addFluidExtractionRecipe(ItemList.Crop_Drop_UUMBerry.get(1L), GT_Values.NI, Materials.UUMatter.getFluid(4L), 10000, 128, 4); - GT_Values.RA.addFluidExtractionRecipe(ItemList.Crop_Drop_UUABerry.get(1L), GT_Values.NI, Materials.UUAmplifier.getFluid(4L), 10000, 128, 4); - GT_Values.RA.addFluidExtractionRecipe(new ItemStack(Items.fish, 1, 0), GT_Values.NI, Materials.FishOil.getFluid(40L), 10000, 16, 4); - GT_Values.RA.addFluidExtractionRecipe(new ItemStack(Items.fish, 1, 1), GT_Values.NI, Materials.FishOil.getFluid(60L), 10000, 16, 4); - GT_Values.RA.addFluidExtractionRecipe(new ItemStack(Items.fish, 1, 2), GT_Values.NI, Materials.FishOil.getFluid(70L), 10000, 16, 4); - GT_Values.RA.addFluidExtractionRecipe(new ItemStack(Items.fish, 1, 3), GT_Values.NI, Materials.FishOil.getFluid(30L), 10000, 16, 4); - - GT_Values.RA.addFluidExtractionRecipe(new ItemStack(Items.coal, 1, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 1L), Materials.WoodTar.getFluid(100L), 1000, 30, 16); - GT_Values.RA.addFluidExtractionRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), ItemList.IC2_Plantball.get(1L), Materials.Creosote.getFluid(5L), 100, 16, 4); - GT_Values.RA.addFluidExtractionRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HydratedCoal, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L), Materials.Water.getFluid(100L), 10000, 32, 4); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1, 3), GT_Values.NI, Materials.Mercury.getFluid(1000L), 10000, 128, 4); - GT_Values.RA.addFluidExtractionRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Mercury, 1L), GT_Values.NI, Materials.Mercury.getFluid(1000L), 10000, 128, 4); - GT_Values.RA.addFluidExtractionRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Monazite, 1L), GT_Values.NI, Materials.Helium.getGas(200L), 10000, 64, 64); - - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem("IC2", "blockAlloyGlass", 1L, 0), GT_Values.NI, Materials.ReinforceGlass.getFluid(144), 10000, 100, 1920); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_DC, "item.ReinforcedGlassPLate", 2L, 0), GT_Values.NI, Materials.ReinforceGlass.getFluid(144), 10000, 75, 1920); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_DC, "item.ReinforcedGlassLense", 2L, 0), GT_Values.NI, Materials.ReinforceGlass.getFluid(144), 10000, 50, 1920); - - GT_Values.RA.addFluidSmelterRecipe(new ItemStack(Items.snowball, 1, 0), GT_Values.NI, Materials.Water.getFluid(250L), 10000, 32, 4); - GT_Values.RA.addFluidSmelterRecipe(new ItemStack(Blocks.snow, 1, 0), GT_Values.NI, Materials.Water.getFluid(1000L), 10000, 128, 4); - GT_Values.RA.addFluidSmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ice, 1L), GT_Values.NI, Materials.Ice.getSolid(1000L), 10000, 128, 4); - GT_Values.RA.addFluidSmelterRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "phosphor", 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphorus, 1L), Materials.Lava.getFluid(800L), 1000, 256, 128); - - GT_Values.RA.addAutoclaveRecipe(ItemList.IC2_Energium_Dust.get(9L), Materials.EnergeticAlloy.getMolten(288), ItemList.IC2_EnergyCrystal.get(1L), 10000, 600, 256); - GT_Values.RA.addAutoclaveRecipe(ItemList.IC2_Energium_Dust.get(9L), Materials.ConductiveIron.getMolten(576), ItemList.IC2_EnergyCrystal.get(1L), 10000, 1200, 256); - GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 0), Materials.Water.getFluid(200L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 10), 8000, 2000, 24); - GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 600), Materials.Water.getFluid(200L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 11), 8000, 2000, 24); - GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 1200), Materials.Water.getFluid(200L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 12), 8000, 2000, 24); - GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 0), GT_ModHandler.getDistilledWater(100L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 10), 9000, 1000, 24); - GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 600), GT_ModHandler.getDistilledWater(100L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 11), 9000, 1000, 24); - GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 1200), GT_ModHandler.getDistilledWater(100L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 12), 9000, 1000, 24); - GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 0), Materials.Void.getMolten(36L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 10), 10000, 500, 24); - GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 600), Materials.Void.getMolten(36L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 11), 10000, 500, 24); - GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 1200), Materials.Void.getMolten(36L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 12), 10000, 500, 24); - GT_Values.RA.addAutoclaveRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 32), Materials.Polybenzimidazole.getMolten(36L), GT_ModHandler.getIC2Item("carbonFiber", 64L), 10000, 150, 1920); - GT_Values.RA.addAutoclaveRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 64), Materials.Epoxid.getMolten(144L), GT_ModHandler.getIC2Item("carbonFiber", 64L), 10000, 300, 480); - GT_Values.RA.addAutoclaveRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 64), Materials.Polytetrafluoroethylene.getMolten(288L), GT_ModHandler.getIC2Item("carbonFiber", 32L), 10000, 400, 120); - GT_Values.RA.addAutoclaveRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 64), Materials.Plastic.getMolten(576L), GT_ModHandler.getIC2Item("carbonFiber", 16L), 10000, 600, 30); - GT_Values.RA.addAutoclaveRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NetherStar, 1), Materials.UUMatter.getFluid(576L), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.NetherStar, 1), 3333, 72000, 480); - - GT_Values.RA.addAutoclave4Recipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 1), GT_Utility.getIntegratedCircuit(1), Materials.Water.getFluid(1000L), GT_Values.NF, new ItemStack[]{GT_Values.NI, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 3)}, new int[]{0, 7500}, 1200, 30, false); - GT_Values.RA.addAutoclave4Recipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 1), GT_Utility.getIntegratedCircuit(1), GT_ModHandler.getDistilledWater(1000L), GT_Values.NF, new ItemStack[]{GT_Values.NI, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 3)}, new int[]{0, 9000}, 1200, 30, false); - GT_Values.RA.addSimpleArcFurnaceRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 1L), Materials.Oxygen.getGas(2000L), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 3)}, null, 1200, 30); - - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.PolyvinylChloride, 1), ItemList.Paper_Printed_Pages.get(1L), Materials.Glue.getFluid(20L), new ItemStack(Items.written_book, 1, 0), 32, 8); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.PolyvinylChloride, 1), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 3), Materials.Glue.getFluid(20L), new ItemStack(Items.book, 1, 0), 20, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_ModHandler.getIC2Item("carbonMesh", 4L), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Zinc, 16L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Component_Filter.get(1L), 1600, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Steel, 64), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Zinc, 16L), GT_Utility.getIntegratedCircuit(1)}, Materials.Plastic.getFluid(144), ItemList.Component_Filter.get(1), 1600, 16); - - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 64), ItemList.Circuit_Silicon_Wafer2.get(32L), GT_Utility.getIntegratedCircuit(1)}, Materials.AdvancedGlue.getFluid(500L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphene, 64), 3200, 1920); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 64), ItemList.Circuit_Silicon_Wafer3.get(8L), GT_Utility.getIntegratedCircuit(1)}, Materials.AdvancedGlue.getFluid(250L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphene, 64), 800, 7920); + GT_Values.RA.addFluidExtractionRecipe( + ItemList.Dye_SquidInk.get(1L), + GT_Values.NI, + FluidRegistry.getFluidStack("squidink", 144), + 10000, + 128, + 4); + GT_Values.RA.addFluidExtractionRecipe( + ItemList.Dye_Indigo.get(1L), GT_Values.NI, FluidRegistry.getFluidStack("indigo", 144), 10000, 128, 4); + GT_Values.RA.addFluidExtractionRecipe( + ItemList.Crop_Drop_Indigo.get(1L), + GT_Values.NI, + FluidRegistry.getFluidStack("indigo", 144), + 10000, + 128, + 4); + GT_Values.RA.addFluidExtractionRecipe( + ItemList.Crop_Drop_MilkWart.get(1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Milk, 1L), + GT_ModHandler.getMilk(150L), + 1000, + 128, + 4); + GT_Values.RA.addFluidExtractionRecipe( + ItemList.Crop_Drop_OilBerry.get(1L), GT_Values.NI, Materials.Oil.getFluid(100L), 10000, 128, 4); + GT_Values.RA.addFluidExtractionRecipe( + ItemList.Crop_Drop_UUMBerry.get(1L), GT_Values.NI, Materials.UUMatter.getFluid(4L), 10000, 128, 4); + GT_Values.RA.addFluidExtractionRecipe( + ItemList.Crop_Drop_UUABerry.get(1L), GT_Values.NI, Materials.UUAmplifier.getFluid(4L), 10000, 128, 4); + GT_Values.RA.addFluidExtractionRecipe( + new ItemStack(Items.fish, 1, 0), GT_Values.NI, Materials.FishOil.getFluid(40L), 10000, 16, 4); + GT_Values.RA.addFluidExtractionRecipe( + new ItemStack(Items.fish, 1, 1), GT_Values.NI, Materials.FishOil.getFluid(60L), 10000, 16, 4); + GT_Values.RA.addFluidExtractionRecipe( + new ItemStack(Items.fish, 1, 2), GT_Values.NI, Materials.FishOil.getFluid(70L), 10000, 16, 4); + GT_Values.RA.addFluidExtractionRecipe( + new ItemStack(Items.fish, 1, 3), GT_Values.NI, Materials.FishOil.getFluid(30L), 10000, 16, 4); + + GT_Values.RA.addFluidExtractionRecipe( + new ItemStack(Items.coal, 1, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 1L), + Materials.WoodTar.getFluid(100L), + 1000, + 30, + 16); + GT_Values.RA.addFluidExtractionRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), + ItemList.IC2_Plantball.get(1L), + Materials.Creosote.getFluid(5L), + 100, + 16, + 4); + GT_Values.RA.addFluidExtractionRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HydratedCoal, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L), + Materials.Water.getFluid(100L), + 10000, + 32, + 4); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1, 3), + GT_Values.NI, + Materials.Mercury.getFluid(1000L), + 10000, + 128, + 4); + GT_Values.RA.addFluidExtractionRecipe( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Mercury, 1L), + GT_Values.NI, + Materials.Mercury.getFluid(1000L), + 10000, + 128, + 4); + GT_Values.RA.addFluidExtractionRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Monazite, 1L), + GT_Values.NI, + Materials.Helium.getGas(200L), + 10000, + 64, + 64); + + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem("IC2", "blockAlloyGlass", 1L, 0), + GT_Values.NI, + Materials.ReinforceGlass.getFluid(144), + 10000, + 100, + 1920); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_DC, "item.ReinforcedGlassPLate", 2L, 0), + GT_Values.NI, + Materials.ReinforceGlass.getFluid(144), + 10000, + 75, + 1920); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_DC, "item.ReinforcedGlassLense", 2L, 0), + GT_Values.NI, + Materials.ReinforceGlass.getFluid(144), + 10000, + 50, + 1920); + + GT_Values.RA.addFluidSmelterRecipe( + new ItemStack(Items.snowball, 1, 0), GT_Values.NI, Materials.Water.getFluid(250L), 10000, 32, 4); + GT_Values.RA.addFluidSmelterRecipe( + new ItemStack(Blocks.snow, 1, 0), GT_Values.NI, Materials.Water.getFluid(1000L), 10000, 128, 4); + GT_Values.RA.addFluidSmelterRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ice, 1L), + GT_Values.NI, + Materials.Ice.getSolid(1000L), + 10000, + 128, + 4); + GT_Values.RA.addFluidSmelterRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "phosphor", 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphorus, 1L), + Materials.Lava.getFluid(800L), + 1000, + 256, + 128); + + GT_Values.RA.addAutoclaveRecipe( + ItemList.IC2_Energium_Dust.get(9L), + Materials.EnergeticAlloy.getMolten(288), + ItemList.IC2_EnergyCrystal.get(1L), + 10000, + 600, + 256); + GT_Values.RA.addAutoclaveRecipe( + ItemList.IC2_Energium_Dust.get(9L), + Materials.ConductiveIron.getMolten(576), + ItemList.IC2_EnergyCrystal.get(1L), + 10000, + 1200, + 256); + GT_Values.RA.addAutoclaveRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 0), + Materials.Water.getFluid(200L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 10), + 8000, + 2000, + 24); + GT_Values.RA.addAutoclaveRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 600), + Materials.Water.getFluid(200L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 11), + 8000, + 2000, + 24); + GT_Values.RA.addAutoclaveRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 1200), + Materials.Water.getFluid(200L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 12), + 8000, + 2000, + 24); + GT_Values.RA.addAutoclaveRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 0), + GT_ModHandler.getDistilledWater(100L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 10), + 9000, + 1000, + 24); + GT_Values.RA.addAutoclaveRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 600), + GT_ModHandler.getDistilledWater(100L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 11), + 9000, + 1000, + 24); + GT_Values.RA.addAutoclaveRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 1200), + GT_ModHandler.getDistilledWater(100L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 12), + 9000, + 1000, + 24); + GT_Values.RA.addAutoclaveRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 0), + Materials.Void.getMolten(36L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 10), + 10000, + 500, + 24); + GT_Values.RA.addAutoclaveRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 600), + Materials.Void.getMolten(36L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 11), + 10000, + 500, + 24); + GT_Values.RA.addAutoclaveRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 1200), + Materials.Void.getMolten(36L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 12), + 10000, + 500, + 24); + GT_Values.RA.addAutoclaveRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 32), + Materials.Polybenzimidazole.getMolten(36L), + GT_ModHandler.getIC2Item("carbonFiber", 64L), + 10000, + 150, + 1920); + GT_Values.RA.addAutoclaveRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 64), + Materials.Epoxid.getMolten(144L), + GT_ModHandler.getIC2Item("carbonFiber", 64L), + 10000, + 300, + 480); + GT_Values.RA.addAutoclaveRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 64), + Materials.Polytetrafluoroethylene.getMolten(288L), + GT_ModHandler.getIC2Item("carbonFiber", 32L), + 10000, + 400, + 120); + GT_Values.RA.addAutoclaveRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 64), + Materials.Plastic.getMolten(576L), + GT_ModHandler.getIC2Item("carbonFiber", 16L), + 10000, + 600, + 30); + GT_Values.RA.addAutoclaveRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NetherStar, 1), + Materials.UUMatter.getFluid(576L), + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.NetherStar, 1), + 3333, + 72000, + 480); + + GT_Values.RA.addAutoclave4Recipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 1), + GT_Utility.getIntegratedCircuit(1), + Materials.Water.getFluid(1000L), + GT_Values.NF, + new ItemStack[] {GT_Values.NI, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 3)}, + new int[] {0, 7500}, + 1200, + 30, + false); + GT_Values.RA.addAutoclave4Recipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 1), + GT_Utility.getIntegratedCircuit(1), + GT_ModHandler.getDistilledWater(1000L), + GT_Values.NF, + new ItemStack[] {GT_Values.NI, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 3)}, + new int[] {0, 9000}, + 1200, + 30, + false); + GT_Values.RA.addSimpleArcFurnaceRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 1L), + Materials.Oxygen.getGas(2000L), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 3)}, + null, + 1200, + 30); + + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.PolyvinylChloride, 1), + ItemList.Paper_Printed_Pages.get(1L), + Materials.Glue.getFluid(20L), + new ItemStack(Items.written_book, 1, 0), + 32, + 8); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.PolyvinylChloride, 1), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 3), + Materials.Glue.getFluid(20L), + new ItemStack(Items.book, 1, 0), + 20, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_ModHandler.getIC2Item("carbonMesh", 4L), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Zinc, 16L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.Component_Filter.get(1L), + 1600, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Steel, 64), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Zinc, 16L), + GT_Utility.getIntegratedCircuit(1) + }, + Materials.Plastic.getFluid(144), + ItemList.Component_Filter.get(1), + 1600, + 16); + + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 64), + ItemList.Circuit_Silicon_Wafer2.get(32L), + GT_Utility.getIntegratedCircuit(1) + }, + Materials.AdvancedGlue.getFluid(500L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphene, 64), + 3200, + 1920); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 64), + ItemList.Circuit_Silicon_Wafer3.get(8L), + GT_Utility.getIntegratedCircuit(1) + }, + Materials.AdvancedGlue.getFluid(250L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphene, 64), + 800, + 7920); if (!Loader.isModLoaded("miscutils")) { - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 64), ItemList.Circuit_Silicon_Wafer4.get(2L), GT_Utility.getIntegratedCircuit(1)}, Materials.AdvancedGlue.getFluid(500L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphene, 64), 400, 30720); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 64), ItemList.Circuit_Silicon_Wafer5.get(1L), GT_Utility.getIntegratedCircuit(1)}, Materials.AdvancedGlue.getFluid(250L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphene, 64), 80, 122880); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 64), + ItemList.Circuit_Silicon_Wafer4.get(2L), + GT_Utility.getIntegratedCircuit(1) + }, + Materials.AdvancedGlue.getFluid(500L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphene, 64), + 400, + 30720); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 64), + ItemList.Circuit_Silicon_Wafer5.get(1L), + GT_Utility.getIntegratedCircuit(1) + }, + Materials.AdvancedGlue.getFluid(250L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphene, 64), + 80, + 122880); } - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Electric_Pump_LV.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Basic), 2L), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, ItemList.FluidRegulator_LV.get(1L), 400, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Electric_Pump_MV.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Good), 2L), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, ItemList.FluidRegulator_MV.get(1L), 350, 120); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Electric_Pump_HV.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Advanced), 2L), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, ItemList.FluidRegulator_HV.get(1L), 300, 480); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Electric_Pump_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Data), 2L), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, ItemList.FluidRegulator_EV.get(1L), 250, 1920); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Electric_Pump_IV.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Elite), 2L), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, ItemList.FluidRegulator_IV.get(1L), 200, 7680); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Electric_Pump_LuV.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Master), 2L), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, ItemList.FluidRegulator_LuV.get(1L), 150, 30720); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Electric_Pump_ZPM.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Ultimate), 2L), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, ItemList.FluidRegulator_ZPM.get(1L), 100, 122880); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Electric_Pump_UV.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.SuperconductorUHV), 2L), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, ItemList.FluidRegulator_UV.get(1L), 50, 500000); - - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Electric_Pump_LV.get(1L), ItemList.Electric_Motor_LV.get(1L), GT_OreDictUnificator.get(OrePrefixes.gear.get(Materials.Steel), 2L), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, ItemList.Steam_Valve_LV.get(1L), 400, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Electric_Pump_MV.get(1L), ItemList.Electric_Motor_MV.get(1L), GT_OreDictUnificator.get(OrePrefixes.gear.get(Materials.Aluminium), 2L), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, ItemList.Steam_Valve_MV.get(1L), 350, 120); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Electric_Pump_HV.get(1L), ItemList.Electric_Motor_HV.get(1L), GT_OreDictUnificator.get(OrePrefixes.gear.get(Materials.StainlessSteel), 2L), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, ItemList.Steam_Valve_HV.get(1L), 300, 480); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Electric_Pump_EV.get(1L), ItemList.Electric_Motor_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.gear.get(Materials.Titanium), 2L), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, ItemList.Steam_Valve_EV.get(1L), 250, 1920); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Electric_Pump_IV.get(1L), ItemList.Electric_Motor_IV.get(1L), GT_OreDictUnificator.get(OrePrefixes.gear.get(Materials.TungstenSteel), 2L), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, ItemList.Steam_Valve_IV.get(1L), 200, 7680); - - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 4L), GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Basic), 4), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, ItemList.Schematic.get(1L), 600, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 3L), GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Good), 2), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, ItemList.Schematic.get(1L), 300, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 2L), GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Advanced), 1), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, ItemList.Schematic.get(1L), 150, 48); - - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_HV.get(1L), GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Gold, 1L), ItemList.Circuit_Chip_LPIC.get(2L), ItemList.HV_Coil.get(2L), ItemList.Reactor_Coolant_He_1.get(1L), ItemList.Electric_Pump_HV.get(1L)}, GT_Values.NF, ItemList.Hatch_Energy_HV.get(1L), 200, 480); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Aluminium, 1L), ItemList.Circuit_Chip_PIC.get(2L), ItemList.EV_Coil.get(2L), ItemList.Reactor_Coolant_He_1.get(1L), ItemList.Electric_Pump_EV.get(1L)}, GT_Values.NF, ItemList.Hatch_Energy_EV.get(1L), 200, 1920); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorIV, 1L), ItemList.Circuit_Chip_HPIC.get(2L), ItemList.IV_Coil.get(2L), ItemList.Reactor_Coolant_He_3.get(1L), ItemList.Electric_Pump_IV.get(1L)}, GT_Values.NF, ItemList.Hatch_Energy_IV.get(1L), 200, 7680); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_HV.get(1L), GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Gold, 1L), ItemList.Circuit_Chip_LPIC.get(2L), ItemList.HV_Coil.get(2L), ItemList.Reactor_Coolant_NaK_1.get(1L), ItemList.Electric_Pump_HV.get(1L)}, GT_Values.NF, ItemList.Hatch_Energy_HV.get(1L), 200, 480); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Aluminium, 1L), ItemList.Circuit_Chip_PIC.get(2L), ItemList.EV_Coil.get(2L), ItemList.Reactor_Coolant_NaK_1.get(1L), ItemList.Electric_Pump_EV.get(1L)}, GT_Values.NF, ItemList.Hatch_Energy_EV.get(1L), 200, 1920); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorIV, 1L), ItemList.Circuit_Chip_HPIC.get(2L), ItemList.IV_Coil.get(2L), ItemList.Reactor_Coolant_NaK_3.get(1L), ItemList.Electric_Pump_IV.get(1L)}, GT_Values.NF, ItemList.Hatch_Energy_IV.get(1L), 200, 7680); - - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_HV.get(1L), GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Gold, 1L), ItemList.Circuit_Chip_LPIC.get(2L), ItemList.HV_Coil.get(2L), ItemList.Reactor_Coolant_He_1.get(1L), ItemList.Electric_Pump_HV.get(1L)}, GT_Values.NF, ItemList.Hatch_Dynamo_HV.get(1L), 200, 480); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Aluminium, 1L), ItemList.Circuit_Chip_PIC.get(2L), ItemList.EV_Coil.get(2L), ItemList.Reactor_Coolant_He_1.get(1L), ItemList.Electric_Pump_EV.get(1L)}, GT_Values.NF, ItemList.Hatch_Dynamo_EV.get(1L), 200, 1920); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1L), GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Vanadiumtriindinid, 1L), ItemList.Circuit_Chip_HPIC.get(2L), ItemList.IV_Coil.get(2L), ItemList.Reactor_Coolant_He_3.get(1L), ItemList.Electric_Pump_IV.get(1L)}, GT_Values.NF, ItemList.Hatch_Dynamo_IV.get(1L), 200, 7680); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_HV.get(1L), GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Gold, 1L), ItemList.Circuit_Chip_LPIC.get(2L), ItemList.HV_Coil.get(2L), ItemList.Reactor_Coolant_NaK_1.get(1L), ItemList.Electric_Pump_HV.get(1L)}, GT_Values.NF, ItemList.Hatch_Dynamo_HV.get(1L), 200, 480); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Aluminium, 1L), ItemList.Circuit_Chip_PIC.get(2L), ItemList.EV_Coil.get(2L), ItemList.Reactor_Coolant_NaK_1.get(1L), ItemList.Electric_Pump_EV.get(1L)}, GT_Values.NF, ItemList.Hatch_Dynamo_EV.get(1L), 200, 1920); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1L), GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Vanadiumtriindinid, 1L), ItemList.Circuit_Chip_HPIC.get(2L), ItemList.IV_Coil.get(2L), ItemList.Reactor_Coolant_NaK_3.get(1L), ItemList.Electric_Pump_IV.get(1L)}, GT_Values.NF, ItemList.Hatch_Dynamo_IV.get(1L), 200, 7680); - - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeHuge, Materials.Steel, 2L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 6L), GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Steel, 2L), GT_Utility.getIntegratedCircuit(2)}, Materials.Tin.getMolten(144L), ItemList.Long_Distance_Pipeline_Fluid.get(2L), 300, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeHuge, Materials.Tin, 2L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 6L), GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Steel, 2L), GT_Utility.getIntegratedCircuit(2)}, Materials.Tin.getMolten(144L), ItemList.Long_Distance_Pipeline_Item.get(2L), 300, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Steel, 2L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 9L), GT_Utility.getIntegratedCircuit(24)}, Materials.Tin.getMolten(144L), ItemList.Long_Distance_Pipeline_Fluid_Pipe.get(64L), 600, 24); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Tin, 2L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 9L), GT_Utility.getIntegratedCircuit(24)}, Materials.Tin.getMolten(144L), ItemList.Long_Distance_Pipeline_Item_Pipe.get(64L), 600, 24); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Electric_Pump_LV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Basic), 2L), + GT_Utility.getIntegratedCircuit(3) + }, + GT_Values.NF, + ItemList.FluidRegulator_LV.get(1L), + 400, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Electric_Pump_MV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Good), 2L), + GT_Utility.getIntegratedCircuit(3) + }, + GT_Values.NF, + ItemList.FluidRegulator_MV.get(1L), + 350, + 120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Electric_Pump_HV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Advanced), 2L), + GT_Utility.getIntegratedCircuit(3) + }, + GT_Values.NF, + ItemList.FluidRegulator_HV.get(1L), + 300, + 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Electric_Pump_EV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Data), 2L), + GT_Utility.getIntegratedCircuit(3) + }, + GT_Values.NF, + ItemList.FluidRegulator_EV.get(1L), + 250, + 1920); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Electric_Pump_IV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Elite), 2L), + GT_Utility.getIntegratedCircuit(3) + }, + GT_Values.NF, + ItemList.FluidRegulator_IV.get(1L), + 200, + 7680); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Electric_Pump_LuV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Master), 2L), + GT_Utility.getIntegratedCircuit(3) + }, + GT_Values.NF, + ItemList.FluidRegulator_LuV.get(1L), + 150, + 30720); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Electric_Pump_ZPM.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Ultimate), 2L), + GT_Utility.getIntegratedCircuit(3) + }, + GT_Values.NF, + ItemList.FluidRegulator_ZPM.get(1L), + 100, + 122880); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Electric_Pump_UV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.SuperconductorUHV), 2L), + GT_Utility.getIntegratedCircuit(3) + }, + GT_Values.NF, + ItemList.FluidRegulator_UV.get(1L), + 50, + 500000); + + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Electric_Pump_LV.get(1L), + ItemList.Electric_Motor_LV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.gear.get(Materials.Steel), 2L), + GT_Utility.getIntegratedCircuit(2) + }, + GT_Values.NF, + ItemList.Steam_Valve_LV.get(1L), + 400, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Electric_Pump_MV.get(1L), + ItemList.Electric_Motor_MV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.gear.get(Materials.Aluminium), 2L), + GT_Utility.getIntegratedCircuit(2) + }, + GT_Values.NF, + ItemList.Steam_Valve_MV.get(1L), + 350, + 120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Electric_Pump_HV.get(1L), + ItemList.Electric_Motor_HV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.gear.get(Materials.StainlessSteel), 2L), + GT_Utility.getIntegratedCircuit(2) + }, + GT_Values.NF, + ItemList.Steam_Valve_HV.get(1L), + 300, + 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Electric_Pump_EV.get(1L), + ItemList.Electric_Motor_EV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.gear.get(Materials.Titanium), 2L), + GT_Utility.getIntegratedCircuit(2) + }, + GT_Values.NF, + ItemList.Steam_Valve_EV.get(1L), + 250, + 1920); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Electric_Pump_IV.get(1L), + ItemList.Electric_Motor_IV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.gear.get(Materials.TungstenSteel), 2L), + GT_Utility.getIntegratedCircuit(2) + }, + GT_Values.NF, + ItemList.Steam_Valve_IV.get(1L), + 200, + 7680); + + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 4L), + GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Basic), 4), + GT_Utility.getIntegratedCircuit(3) + }, + GT_Values.NF, + ItemList.Schematic.get(1L), + 600, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 3L), + GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Good), 2), + GT_Utility.getIntegratedCircuit(3) + }, + GT_Values.NF, + ItemList.Schematic.get(1L), + 300, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 2L), + GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Advanced), 1), + GT_Utility.getIntegratedCircuit(3) + }, + GT_Values.NF, + ItemList.Schematic.get(1L), + 150, + 48); + + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Hull_HV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Gold, 1L), + ItemList.Circuit_Chip_LPIC.get(2L), + ItemList.HV_Coil.get(2L), + ItemList.Reactor_Coolant_He_1.get(1L), + ItemList.Electric_Pump_HV.get(1L) + }, + GT_Values.NF, + ItemList.Hatch_Energy_HV.get(1L), + 200, + 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Hull_EV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Aluminium, 1L), + ItemList.Circuit_Chip_PIC.get(2L), + ItemList.EV_Coil.get(2L), + ItemList.Reactor_Coolant_He_1.get(1L), + ItemList.Electric_Pump_EV.get(1L) + }, + GT_Values.NF, + ItemList.Hatch_Energy_EV.get(1L), + 200, + 1920); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Hull_IV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorIV, 1L), + ItemList.Circuit_Chip_HPIC.get(2L), + ItemList.IV_Coil.get(2L), + ItemList.Reactor_Coolant_He_3.get(1L), + ItemList.Electric_Pump_IV.get(1L) + }, + GT_Values.NF, + ItemList.Hatch_Energy_IV.get(1L), + 200, + 7680); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Hull_HV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Gold, 1L), + ItemList.Circuit_Chip_LPIC.get(2L), + ItemList.HV_Coil.get(2L), + ItemList.Reactor_Coolant_NaK_1.get(1L), + ItemList.Electric_Pump_HV.get(1L) + }, + GT_Values.NF, + ItemList.Hatch_Energy_HV.get(1L), + 200, + 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Hull_EV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Aluminium, 1L), + ItemList.Circuit_Chip_PIC.get(2L), + ItemList.EV_Coil.get(2L), + ItemList.Reactor_Coolant_NaK_1.get(1L), + ItemList.Electric_Pump_EV.get(1L) + }, + GT_Values.NF, + ItemList.Hatch_Energy_EV.get(1L), + 200, + 1920); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Hull_IV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorIV, 1L), + ItemList.Circuit_Chip_HPIC.get(2L), + ItemList.IV_Coil.get(2L), + ItemList.Reactor_Coolant_NaK_3.get(1L), + ItemList.Electric_Pump_IV.get(1L) + }, + GT_Values.NF, + ItemList.Hatch_Energy_IV.get(1L), + 200, + 7680); + + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Hull_HV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Gold, 1L), + ItemList.Circuit_Chip_LPIC.get(2L), + ItemList.HV_Coil.get(2L), + ItemList.Reactor_Coolant_He_1.get(1L), + ItemList.Electric_Pump_HV.get(1L) + }, + GT_Values.NF, + ItemList.Hatch_Dynamo_HV.get(1L), + 200, + 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Hull_EV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Aluminium, 1L), + ItemList.Circuit_Chip_PIC.get(2L), + ItemList.EV_Coil.get(2L), + ItemList.Reactor_Coolant_He_1.get(1L), + ItemList.Electric_Pump_EV.get(1L) + }, + GT_Values.NF, + ItemList.Hatch_Dynamo_EV.get(1L), + 200, + 1920); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Hull_IV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Vanadiumtriindinid, 1L), + ItemList.Circuit_Chip_HPIC.get(2L), + ItemList.IV_Coil.get(2L), + ItemList.Reactor_Coolant_He_3.get(1L), + ItemList.Electric_Pump_IV.get(1L) + }, + GT_Values.NF, + ItemList.Hatch_Dynamo_IV.get(1L), + 200, + 7680); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Hull_HV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Gold, 1L), + ItemList.Circuit_Chip_LPIC.get(2L), + ItemList.HV_Coil.get(2L), + ItemList.Reactor_Coolant_NaK_1.get(1L), + ItemList.Electric_Pump_HV.get(1L) + }, + GT_Values.NF, + ItemList.Hatch_Dynamo_HV.get(1L), + 200, + 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Hull_EV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Aluminium, 1L), + ItemList.Circuit_Chip_PIC.get(2L), + ItemList.EV_Coil.get(2L), + ItemList.Reactor_Coolant_NaK_1.get(1L), + ItemList.Electric_Pump_EV.get(1L) + }, + GT_Values.NF, + ItemList.Hatch_Dynamo_EV.get(1L), + 200, + 1920); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Hull_IV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Vanadiumtriindinid, 1L), + ItemList.Circuit_Chip_HPIC.get(2L), + ItemList.IV_Coil.get(2L), + ItemList.Reactor_Coolant_NaK_3.get(1L), + ItemList.Electric_Pump_IV.get(1L) + }, + GT_Values.NF, + ItemList.Hatch_Dynamo_IV.get(1L), + 200, + 7680); + + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.pipeHuge, Materials.Steel, 2L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 6L), + GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Steel, 2L), + GT_Utility.getIntegratedCircuit(2) + }, + Materials.Tin.getMolten(144L), + ItemList.Long_Distance_Pipeline_Fluid.get(2L), + 300, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.pipeHuge, Materials.Tin, 2L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 6L), + GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Steel, 2L), + GT_Utility.getIntegratedCircuit(2) + }, + Materials.Tin.getMolten(144L), + ItemList.Long_Distance_Pipeline_Item.get(2L), + 300, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Steel, 2L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 9L), + GT_Utility.getIntegratedCircuit(24) + }, + Materials.Tin.getMolten(144L), + ItemList.Long_Distance_Pipeline_Fluid_Pipe.get(64L), + 600, + 24); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Tin, 2L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 9L), + GT_Utility.getIntegratedCircuit(24) + }, + Materials.Tin.getMolten(144L), + ItemList.Long_Distance_Pipeline_Item_Pipe.get(64L), + 600, + 24); // recycling Long Distance Pipes - GT_Values.RA.addPulveriserRecipe(ItemList.Long_Distance_Pipeline_Fluid.get(1L), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 19L)}, null, 300, 4); - GT_Values.RA.addArcFurnaceRecipe(ItemList.Long_Distance_Pipeline_Fluid.get(1L), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 19L)}, null, 180, 120); - GT_Values.RA.addFluidExtractionRecipe(ItemList.Long_Distance_Pipeline_Fluid.get(1L), GT_Values.NI, Materials.Steel.getMolten(19 * 144), 10000, 400, 90); - GT_Values.RA.addPulveriserRecipe(ItemList.Long_Distance_Pipeline_Item.get(1L), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tin, 12L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 7L)}, null, 300, 4); - GT_Values.RA.addArcFurnaceRecipe(ItemList.Long_Distance_Pipeline_Item.get(1L), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 12L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 7L)}, null, 180, 120); - GT_Values.RA.addFluidExtractionRecipe(ItemList.Long_Distance_Pipeline_Item.get(1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 7L), Materials.Tin.getMolten(12 * 144), 10000, 400, 90); - GT_Values.RA.addPulveriserRecipe(ItemList.Long_Distance_Pipeline_Fluid_Pipe.get(1L), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Steel, 2L)}, null, 10, 4); - GT_Values.RA.addArcFurnaceRecipe(ItemList.Long_Distance_Pipeline_Fluid_Pipe.get(1L), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Steel, 2L)}, null, 10, 120); - GT_Values.RA.addFluidExtractionRecipe(ItemList.Long_Distance_Pipeline_Fluid_Pipe.get(4L), GT_Values.NI, Materials.Steel.getMolten(189), 10000, 40, 90); - GT_Values.RA.addPulveriserRecipe(ItemList.Long_Distance_Pipeline_Item_Pipe.get(1L), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Tin, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Steel, 1L)}, null, 10, 4); - GT_Values.RA.addArcFurnaceRecipe(ItemList.Long_Distance_Pipeline_Item_Pipe.get(1L), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Tin, 1L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Steel, 1L)}, null, 10, 120); - GT_Values.RA.addFluidExtractionRecipe(ItemList.Long_Distance_Pipeline_Item_Pipe.get(16L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 3L), Materials.Steel.getMolten(324), 10000, 400, 90); - - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeQuadruple, Materials.StainlessSteel, 1L), ItemList.Hull_EV.get(1L), GT_Utility.getIntegratedCircuit(4)}, Materials.Glass.getMolten(2304L), ItemList.Hatch_Input_Multi_2x2_EV.get(1L), 600, 24); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeQuadruple, Materials.Titanium, 1L), ItemList.Hull_IV.get(1L), GT_Utility.getIntegratedCircuit(4)}, Materials.Glass.getMolten(2304L), ItemList.Hatch_Input_Multi_2x2_IV.get(1L), 600, 24); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeQuadruple, Materials.TungstenSteel, 1L), ItemList.Hull_LuV.get(1L), GT_Utility.getIntegratedCircuit(4)}, Materials.Polytetrafluoroethylene.getMolten(2304L), ItemList.Hatch_Input_Multi_2x2_LuV.get(1L), 600, 24); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeQuadruple, Materials.NiobiumTitanium, 1L), ItemList.Hull_ZPM.get(1L), GT_Utility.getIntegratedCircuit(4)}, Materials.Polytetrafluoroethylene.getMolten(2304L), ItemList.Hatch_Input_Multi_2x2_ZPM.get(1L), 600, 24); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeQuadruple, Materials.MysteriousCrystal, 1L), ItemList.Hull_UV.get(1L), GT_Utility.getIntegratedCircuit(4)}, Materials.Polybenzimidazole.getMolten(2304L), ItemList.Hatch_Input_Multi_2x2_UV.get(1L), 600, 24); - - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 4L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.TungstenSteel, 1L), ItemList.Robot_Arm_IV.get(2L), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, ItemList.Casing_Gearbox_TungstenSteel.get(1L), 200, 30); - - {//limiting life time of the variables + GT_Values.RA.addPulveriserRecipe( + ItemList.Long_Distance_Pipeline_Fluid.get(1L), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 19L)}, + null, + 300, + 4); + GT_Values.RA.addArcFurnaceRecipe( + ItemList.Long_Distance_Pipeline_Fluid.get(1L), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 19L)}, + null, + 180, + 120); + GT_Values.RA.addFluidExtractionRecipe( + ItemList.Long_Distance_Pipeline_Fluid.get(1L), + GT_Values.NI, + Materials.Steel.getMolten(19 * 144), + 10000, + 400, + 90); + GT_Values.RA.addPulveriserRecipe( + ItemList.Long_Distance_Pipeline_Item.get(1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tin, 12L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 7L) + }, + null, + 300, + 4); + GT_Values.RA.addArcFurnaceRecipe( + ItemList.Long_Distance_Pipeline_Item.get(1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 12L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 7L) + }, + null, + 180, + 120); + GT_Values.RA.addFluidExtractionRecipe( + ItemList.Long_Distance_Pipeline_Item.get(1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 7L), + Materials.Tin.getMolten(12 * 144), + 10000, + 400, + 90); + GT_Values.RA.addPulveriserRecipe( + ItemList.Long_Distance_Pipeline_Fluid_Pipe.get(1L), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Steel, 2L)}, + null, + 10, + 4); + GT_Values.RA.addArcFurnaceRecipe( + ItemList.Long_Distance_Pipeline_Fluid_Pipe.get(1L), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Steel, 2L)}, + null, + 10, + 120); + GT_Values.RA.addFluidExtractionRecipe( + ItemList.Long_Distance_Pipeline_Fluid_Pipe.get(4L), + GT_Values.NI, + Materials.Steel.getMolten(189), + 10000, + 40, + 90); + GT_Values.RA.addPulveriserRecipe( + ItemList.Long_Distance_Pipeline_Item_Pipe.get(1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Tin, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Steel, 1L) + }, + null, + 10, + 4); + GT_Values.RA.addArcFurnaceRecipe( + ItemList.Long_Distance_Pipeline_Item_Pipe.get(1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Tin, 1L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Steel, 1L) + }, + null, + 10, + 120); + GT_Values.RA.addFluidExtractionRecipe( + ItemList.Long_Distance_Pipeline_Item_Pipe.get(16L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 3L), + Materials.Steel.getMolten(324), + 10000, + 400, + 90); + + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.pipeQuadruple, Materials.StainlessSteel, 1L), + ItemList.Hull_EV.get(1L), + GT_Utility.getIntegratedCircuit(4) + }, + Materials.Glass.getMolten(2304L), + ItemList.Hatch_Input_Multi_2x2_EV.get(1L), + 600, + 24); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.pipeQuadruple, Materials.Titanium, 1L), + ItemList.Hull_IV.get(1L), + GT_Utility.getIntegratedCircuit(4) + }, + Materials.Glass.getMolten(2304L), + ItemList.Hatch_Input_Multi_2x2_IV.get(1L), + 600, + 24); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.pipeQuadruple, Materials.TungstenSteel, 1L), + ItemList.Hull_LuV.get(1L), + GT_Utility.getIntegratedCircuit(4) + }, + Materials.Polytetrafluoroethylene.getMolten(2304L), + ItemList.Hatch_Input_Multi_2x2_LuV.get(1L), + 600, + 24); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.pipeQuadruple, Materials.NiobiumTitanium, 1L), + ItemList.Hull_ZPM.get(1L), + GT_Utility.getIntegratedCircuit(4) + }, + Materials.Polytetrafluoroethylene.getMolten(2304L), + ItemList.Hatch_Input_Multi_2x2_ZPM.get(1L), + 600, + 24); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.pipeQuadruple, Materials.MysteriousCrystal, 1L), + ItemList.Hull_UV.get(1L), + GT_Utility.getIntegratedCircuit(4) + }, + Materials.Polybenzimidazole.getMolten(2304L), + ItemList.Hatch_Input_Multi_2x2_UV.get(1L), + 600, + 24); + + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 4L), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.TungstenSteel, 1L), + ItemList.Robot_Arm_IV.get(2L), + GT_Utility.getIntegratedCircuit(3) + }, + GT_Values.NF, + ItemList.Casing_Gearbox_TungstenSteel.get(1L), + 200, + 30); + + { // limiting life time of the variables ItemStack flask = ItemList.VOLUMETRIC_FLASK.get(1); NBTTagCompound nbtFlask = new NBTTagCompound(); nbtFlask.setInteger("Capacity", 144); flask.setTagCompound(nbtFlask); - GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(1), flask, 10, 30); + GT_Values.RA.addAssemblerRecipe( + ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(1), flask, 10, 30); nbtFlask.setInteger("Capacity", 288); flask.setTagCompound(nbtFlask); - GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(2), flask, 10, 30); + GT_Values.RA.addAssemblerRecipe( + ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(2), flask, 10, 30); nbtFlask.setInteger("Capacity", 576); flask.setTagCompound(nbtFlask); - GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(3), flask, 10, 30); + GT_Values.RA.addAssemblerRecipe( + ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(3), flask, 10, 30); nbtFlask.setInteger("Capacity", 720); flask.setTagCompound(nbtFlask); - GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(4), flask, 10, 30); + GT_Values.RA.addAssemblerRecipe( + ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(4), flask, 10, 30); nbtFlask.setInteger("Capacity", 864); flask.setTagCompound(nbtFlask); - GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(5), flask, 10, 30); + GT_Values.RA.addAssemblerRecipe( + ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(5), flask, 10, 30); nbtFlask.setInteger("Capacity", 72); flask.setTagCompound(nbtFlask); - GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(6), flask, 10, 30); + GT_Values.RA.addAssemblerRecipe( + ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(6), flask, 10, 30); nbtFlask.setInteger("Capacity", 648); flask.setTagCompound(nbtFlask); - GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(7), flask, 10, 30); + GT_Values.RA.addAssemblerRecipe( + ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(7), flask, 10, 30); nbtFlask.setInteger("Capacity", 936); flask.setTagCompound(nbtFlask); - GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(8), flask, 10, 30); + GT_Values.RA.addAssemblerRecipe( + ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(8), flask, 10, 30); nbtFlask.setInteger("Capacity", 250); flask.setTagCompound(nbtFlask); - GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(10), flask, 10, 30); + GT_Values.RA.addAssemblerRecipe( + ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(10), flask, 10, 30); nbtFlask.setInteger("Capacity", 500); flask.setTagCompound(nbtFlask); - GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(11), flask, 10, 30); + GT_Values.RA.addAssemblerRecipe( + ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(11), flask, 10, 30); // make the 1000L recipe actualy in ItemStack flask500 = flask.copy(); nbtFlask.setInteger("Capacity", 1000); @@ -527,474 +3203,2787 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(flask500, GT_Utility.getIntegratedCircuit(24), flask, 10, 30); } - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Bronze, 1L), GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Bronze, 1L), ItemList.Electric_Motor_LV.get(1L), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, ItemList.Hatch_Muffler_LV.get(1L), 200, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_MV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Steel, 1L), GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Steel, 1L), ItemList.Electric_Motor_MV.get(1L), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, ItemList.Hatch_Muffler_MV.get(1L), 200, 120); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_HV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.StainlessSteel, 1L), GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.StainlessSteel, 1L), ItemList.Electric_Motor_HV.get(1L), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, ItemList.Hatch_Muffler_HV.get(1L), 200, 480); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Titanium, 1L), ItemList.Electric_Motor_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Titanium, 1L), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, ItemList.Hatch_Muffler_EV.get(1L), 200, 1920); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.TungstenSteel, 1L), ItemList.Electric_Motor_IV.get(1L), GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.TungstenSteel, 1L), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, ItemList.Hatch_Muffler_IV.get(1L), 200, 7680); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Enderium, 1L), ItemList.Electric_Motor_LuV.get(1L), GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Enderium, 1L), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, ItemList.Hatch_Muffler_LuV.get(1L), 200, 30720); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_ZPM.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Naquadah, 1L), ItemList.Electric_Motor_ZPM.get(1L), GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.NaquadahAlloy, 1L), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, ItemList.Hatch_Muffler_ZPM.get(1L), 200, 122880); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.NetherStar, 1L), ItemList.Electric_Motor_UV.get(1L), GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Neutronium, 1L), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, ItemList.Hatch_Muffler_UV.get(1L), 200, 500000); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_MAX.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.MysteriousCrystal, 1L), ItemList.Electric_Motor_UHV.get(1L), GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.CosmicNeutronium, 1L), GT_Utility.getIntegratedCircuit(3)}, GT_Values.NF, ItemList.Hatch_Muffler_MAX.get(1L), 200, 2000000); - - GT_Values.RA.addCentrifugeRecipe(ItemList.Cell_Empty.get(1), null, Materials.Air.getGas(10000), Materials.Nitrogen.getGas(3900), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1), null, null, null, null, null, null, 1600, 8); - //In chain - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Galena, 3), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Sphalerite, 1), Materials.SulfuricAcid.getFluid(4000), new FluidStack(ItemList.sIndiumConcentrate, 8000), null, 60, 150); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(8), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Galena, 27), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Sphalerite, 9)}, new FluidStack[]{Materials.SulfuricAcid.getFluid(36000)}, new FluidStack[]{new FluidStack(ItemList.sIndiumConcentrate, 72000)}, null, 160, 480); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 4), GT_Utility.getIntegratedCircuit(1), new FluidStack(ItemList.sIndiumConcentrate, 8000), new FluidStack(ItemList.sLeadZincSolution, 8000), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Indium, 1), 50, 600); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 36), GT_Utility.getIntegratedCircuit(9), new FluidStack(ItemList.sIndiumConcentrate, 72000), new FluidStack(ItemList.sLeadZincSolution, 72000), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Indium, 1), 450, 600); - - GT_Values.RA.addElectrolyzerRecipe(GT_Values.NI, GT_Values.NI, new FluidStack(ItemList.sLeadZincSolution, 8000), Materials.Water.getFluid(2000), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lead, 3), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silver, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Zinc, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 4), null, null, null, 300, 192); - //Platinum Group Sludge chain - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Pentlandite, 1), GT_Utility.getIntegratedCircuit(1), Materials.NitricAcid.getFluid(1000L), new FluidStack(ItemList.sNickelSulfate, 2000), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.PlatinumGroupSludge, 1), 50, 30); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Chalcopyrite, 1), GT_Utility.getIntegratedCircuit(1), Materials.NitricAcid.getFluid(1000L), new FluidStack(ItemList.sBlueVitriol, 2000), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.PlatinumGroupSludge, 1), 50, 30); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Pentlandite, 9)}, new FluidStack[]{Materials.NitricAcid.getFluid(9000L)}, new FluidStack[]{new FluidStack(ItemList.sNickelSulfate, 18000)}, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.PlatinumGroupSludge, 1)}, 25, 480); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Chalcopyrite, 9)}, new FluidStack[]{Materials.NitricAcid.getFluid(9000L)}, new FluidStack[]{new FluidStack(ItemList.sBlueVitriol, 18000)}, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.PlatinumGroupSludge, 1)}, 25, 480); - - GT_Values.RA.addElectrolyzerRecipe(ItemList.Cell_Empty.get(1), null, new FluidStack(ItemList.sBlueVitriol, 2000), Materials.SulfuricAcid.getFluid(1000), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 1), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 900, 30); - GT_Values.RA.addElectrolyzerRecipe(ItemList.Cell_Empty.get(1), null, new FluidStack(ItemList.sNickelSulfate, 2000), Materials.SulfuricAcid.getFluid(1000), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 1), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 900, 30); - GT_Values.RA.addCentrifugeRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.PlatinumGroupSludge, 9), null, null, null, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 9), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 9), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Platinum, 9), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Palladium, 3), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iridium, 3), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Osmium, 3), new int[]{10000, 10000, 10000, 9500, 9000, 8500}, 8100, 30); - //Fe + 3HCl = FeCl3 + 3H - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 1), ItemList.Cell_Empty.get(3), Materials.HydrochloricAcid.getFluid(3000), Materials.IronIIIChloride.getFluid(1000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 3), 400, 30); - - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedGold, 8L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 8L), new FluidStack(FluidRegistry.getFluid("ic2coolant"), 1000), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Thaumium, 16L), 400, 480); - - GT_Values.RA.addSlicerRecipe(ItemList.Food_Dough_Chocolate.get(1L), ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Raw_Cookie.get(4L), 128, 4); - GT_Values.RA.addSlicerRecipe(ItemList.Food_Baked_Bun.get(1L), ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Bun.get(2L), 128, 4); - GT_Values.RA.addSlicerRecipe(ItemList.Food_Baked_Bread.get(1L), ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Bread.get(2L), 128, 4); - GT_Values.RA.addSlicerRecipe(ItemList.Food_Baked_Baguette.get(1L), ItemList.Shape_Slicer_Flat.get(0L), ItemList.Food_Sliced_Baguette.get(2L), 128, 4); - - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Cylinder.get(0), Materials.Polytetrafluoroethylene.getMolten(36), ItemList.Circuit_Parts_PetriDish.get(1), 160, 16); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Cylinder.get(0), Materials.Polystyrene.getMolten(36), ItemList.Circuit_Parts_PetriDish.get(1), 160, 16); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Cylinder.get(0), Materials.BorosilicateGlass.getMolten(72), ItemList.Circuit_Parts_PetriDish.get(1), 160, 16); - - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Plate.get(0L), Materials.ReinforceGlass.getMolten(72), GT_ModHandler.getModItem(MOD_ID_DC, "item.ReinforcedGlassPLate", 1L, 0), 160, 1920); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0L), Materials.ReinforceGlass.getMolten(144), GT_ModHandler.getModItem("IC2", "blockAlloyGlass", 1L), 160, 1920); - - GT_Values.RA.addChemicalRecipe(GT_ModHandler.getModItem("GalaxySpace", "item.UnknowCrystal", 4L), Materials.Osmiridium.getDust(2), Materials.GrowthMediumSterilized.getFluid(1000L), FluidRegistry.getFluidStack("bacterialsludge", 1000), ItemList.Circuit_Chip_Stemcell.get(64L), GT_Values.NI, 600, 30720); - GT_Values.RA.addChemicalRecipe(ItemList.Circuit_Chip_Stemcell.get(32L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CosmicNeutronium, 4), Materials.BioMediumSterilized.getFluid(2000L), FluidRegistry.getFluidStack("mutagen", 2000), ItemList.Circuit_Chip_Biocell.get(32L), GT_Values.NI, 1200, 500000); - GT_Values.RA.addFluidHeaterRecipe(GT_Utility.getIntegratedCircuit(1), Materials.GrowthMediumRaw.getFluid(1000L), Materials.GrowthMediumSterilized.getFluid(1000L), 200, 7680); - GT_Values.RA.addFluidHeaterRecipe(GT_Utility.getIntegratedCircuit(1), Materials.BioMediumRaw.getFluid(1000L), Materials.BioMediumSterilized.getFluid(1000L), 200, 30720); - - GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 1), 100, 120); - GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 1), 100, 120); - GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Gold, 1L), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 2), 200, 120); - GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Diamond, 1L), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 3), 100, 480); - GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderPearl, 1L), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 2L, 4), 200, 120); - GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NetherQuartz, 1L), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 5), 300, 120); - GT_Values.RA.addFormingPressRecipe(new ItemStack(Items.comparator, 1, 32767), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 6), 300, 120); - GT_Values.RA.addFormingPressRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 10), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 0L, 13), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 16), 200, 16); - GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.CertusQuartz, 1L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 0L, 13), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 16), 200, 16); - GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Diamond, 1L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 0L, 14), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 17), 200, 16); - GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Gold, 1L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 0L, 15), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 18), 200, 16); - GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicon, 1L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 0L, 19), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 20), 200, 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Hull_LV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Bronze, 1L), + GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Bronze, 1L), + ItemList.Electric_Motor_LV.get(1L), + GT_Utility.getIntegratedCircuit(3) + }, + GT_Values.NF, + ItemList.Hatch_Muffler_LV.get(1L), + 200, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Hull_MV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Steel, 1L), + GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Steel, 1L), + ItemList.Electric_Motor_MV.get(1L), + GT_Utility.getIntegratedCircuit(3) + }, + GT_Values.NF, + ItemList.Hatch_Muffler_MV.get(1L), + 200, + 120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Hull_HV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.StainlessSteel, 1L), + GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.StainlessSteel, 1L), + ItemList.Electric_Motor_HV.get(1L), + GT_Utility.getIntegratedCircuit(3) + }, + GT_Values.NF, + ItemList.Hatch_Muffler_HV.get(1L), + 200, + 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Hull_EV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Titanium, 1L), + ItemList.Electric_Motor_EV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Titanium, 1L), + GT_Utility.getIntegratedCircuit(3) + }, + GT_Values.NF, + ItemList.Hatch_Muffler_EV.get(1L), + 200, + 1920); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Hull_IV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.TungstenSteel, 1L), + ItemList.Electric_Motor_IV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.TungstenSteel, 1L), + GT_Utility.getIntegratedCircuit(3) + }, + GT_Values.NF, + ItemList.Hatch_Muffler_IV.get(1L), + 200, + 7680); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Hull_LuV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Enderium, 1L), + ItemList.Electric_Motor_LuV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Enderium, 1L), + GT_Utility.getIntegratedCircuit(3) + }, + GT_Values.NF, + ItemList.Hatch_Muffler_LuV.get(1L), + 200, + 30720); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Hull_ZPM.get(1L), + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Naquadah, 1L), + ItemList.Electric_Motor_ZPM.get(1L), + GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.NaquadahAlloy, 1L), + GT_Utility.getIntegratedCircuit(3) + }, + GT_Values.NF, + ItemList.Hatch_Muffler_ZPM.get(1L), + 200, + 122880); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Hull_UV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.NetherStar, 1L), + ItemList.Electric_Motor_UV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Neutronium, 1L), + GT_Utility.getIntegratedCircuit(3) + }, + GT_Values.NF, + ItemList.Hatch_Muffler_UV.get(1L), + 200, + 500000); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Hull_MAX.get(1L), + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.MysteriousCrystal, 1L), + ItemList.Electric_Motor_UHV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.CosmicNeutronium, 1L), + GT_Utility.getIntegratedCircuit(3) + }, + GT_Values.NF, + ItemList.Hatch_Muffler_MAX.get(1L), + 200, + 2000000); + + GT_Values.RA.addCentrifugeRecipe( + ItemList.Cell_Empty.get(1), + null, + Materials.Air.getGas(10000), + Materials.Nitrogen.getGas(3900), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1), + null, + null, + null, + null, + null, + null, + 1600, + 8); + // In chain + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Galena, 3), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Sphalerite, 1), + Materials.SulfuricAcid.getFluid(4000), + new FluidStack(ItemList.sIndiumConcentrate, 8000), + null, + 60, + 150); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(8), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Galena, 27), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Sphalerite, 9) + }, + new FluidStack[] {Materials.SulfuricAcid.getFluid(36000)}, + new FluidStack[] {new FluidStack(ItemList.sIndiumConcentrate, 72000)}, + null, + 160, + 480); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 4), + GT_Utility.getIntegratedCircuit(1), + new FluidStack(ItemList.sIndiumConcentrate, 8000), + new FluidStack(ItemList.sLeadZincSolution, 8000), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Indium, 1), + 50, + 600); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 36), + GT_Utility.getIntegratedCircuit(9), + new FluidStack(ItemList.sIndiumConcentrate, 72000), + new FluidStack(ItemList.sLeadZincSolution, 72000), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Indium, 1), + 450, + 600); + + GT_Values.RA.addElectrolyzerRecipe( + GT_Values.NI, + GT_Values.NI, + new FluidStack(ItemList.sLeadZincSolution, 8000), + Materials.Water.getFluid(2000), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lead, 3), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silver, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Zinc, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 4), + null, + null, + null, + 300, + 192); + // Platinum Group Sludge chain + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Pentlandite, 1), + GT_Utility.getIntegratedCircuit(1), + Materials.NitricAcid.getFluid(1000L), + new FluidStack(ItemList.sNickelSulfate, 2000), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.PlatinumGroupSludge, 1), + 50, + 30); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Chalcopyrite, 1), + GT_Utility.getIntegratedCircuit(1), + Materials.NitricAcid.getFluid(1000L), + new FluidStack(ItemList.sBlueVitriol, 2000), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.PlatinumGroupSludge, 1), + 50, + 30); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(9), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Pentlandite, 9) + }, + new FluidStack[] {Materials.NitricAcid.getFluid(9000L)}, + new FluidStack[] {new FluidStack(ItemList.sNickelSulfate, 18000)}, + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.PlatinumGroupSludge, 1)}, + 25, + 480); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(9), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Chalcopyrite, 9) + }, + new FluidStack[] {Materials.NitricAcid.getFluid(9000L)}, + new FluidStack[] {new FluidStack(ItemList.sBlueVitriol, 18000)}, + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.PlatinumGroupSludge, 1)}, + 25, + 480); + + GT_Values.RA.addElectrolyzerRecipe( + ItemList.Cell_Empty.get(1), + null, + new FluidStack(ItemList.sBlueVitriol, 2000), + Materials.SulfuricAcid.getFluid(1000), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 1), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 900, + 30); + GT_Values.RA.addElectrolyzerRecipe( + ItemList.Cell_Empty.get(1), + null, + new FluidStack(ItemList.sNickelSulfate, 2000), + Materials.SulfuricAcid.getFluid(1000), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 1), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 900, + 30); + GT_Values.RA.addCentrifugeRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.PlatinumGroupSludge, 9), + null, + null, + null, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 9), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 9), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Platinum, 9), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Palladium, 3), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iridium, 3), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Osmium, 3), + new int[] {10000, 10000, 10000, 9500, 9000, 8500}, + 8100, + 30); + // Fe + 3HCl = FeCl3 + 3H + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 1), + ItemList.Cell_Empty.get(3), + Materials.HydrochloricAcid.getFluid(3000), + Materials.IronIIIChloride.getFluid(1000), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 3), + 400, + 30); + + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.InfusedGold, 8L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 8L), + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 1000), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Thaumium, 16L), + 400, + 480); + + GT_Values.RA.addSlicerRecipe( + ItemList.Food_Dough_Chocolate.get(1L), + ItemList.Shape_Slicer_Flat.get(0L), + ItemList.Food_Raw_Cookie.get(4L), + 128, + 4); + GT_Values.RA.addSlicerRecipe( + ItemList.Food_Baked_Bun.get(1L), + ItemList.Shape_Slicer_Flat.get(0L), + ItemList.Food_Sliced_Bun.get(2L), + 128, + 4); + GT_Values.RA.addSlicerRecipe( + ItemList.Food_Baked_Bread.get(1L), + ItemList.Shape_Slicer_Flat.get(0L), + ItemList.Food_Sliced_Bread.get(2L), + 128, + 4); + GT_Values.RA.addSlicerRecipe( + ItemList.Food_Baked_Baguette.get(1L), + ItemList.Shape_Slicer_Flat.get(0L), + ItemList.Food_Sliced_Baguette.get(2L), + 128, + 4); + + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Cylinder.get(0), + Materials.Polytetrafluoroethylene.getMolten(36), + ItemList.Circuit_Parts_PetriDish.get(1), + 160, + 16); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Cylinder.get(0), + Materials.Polystyrene.getMolten(36), + ItemList.Circuit_Parts_PetriDish.get(1), + 160, + 16); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Cylinder.get(0), + Materials.BorosilicateGlass.getMolten(72), + ItemList.Circuit_Parts_PetriDish.get(1), + 160, + 16); + + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Plate.get(0L), + Materials.ReinforceGlass.getMolten(72), + GT_ModHandler.getModItem(MOD_ID_DC, "item.ReinforcedGlassPLate", 1L, 0), + 160, + 1920); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Block.get(0L), + Materials.ReinforceGlass.getMolten(144), + GT_ModHandler.getModItem("IC2", "blockAlloyGlass", 1L), + 160, + 1920); + + GT_Values.RA.addChemicalRecipe( + GT_ModHandler.getModItem("GalaxySpace", "item.UnknowCrystal", 4L), + Materials.Osmiridium.getDust(2), + Materials.GrowthMediumSterilized.getFluid(1000L), + FluidRegistry.getFluidStack("bacterialsludge", 1000), + ItemList.Circuit_Chip_Stemcell.get(64L), + GT_Values.NI, + 600, + 30720); + GT_Values.RA.addChemicalRecipe( + ItemList.Circuit_Chip_Stemcell.get(32L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CosmicNeutronium, 4), + Materials.BioMediumSterilized.getFluid(2000L), + FluidRegistry.getFluidStack("mutagen", 2000), + ItemList.Circuit_Chip_Biocell.get(32L), + GT_Values.NI, + 1200, + 500000); + GT_Values.RA.addFluidHeaterRecipe( + GT_Utility.getIntegratedCircuit(1), + Materials.GrowthMediumRaw.getFluid(1000L), + Materials.GrowthMediumSterilized.getFluid(1000L), + 200, + 7680); + GT_Values.RA.addFluidHeaterRecipe( + GT_Utility.getIntegratedCircuit(1), + Materials.BioMediumRaw.getFluid(1000L), + Materials.BioMediumSterilized.getFluid(1000L), + 200, + 30720); + + GT_Values.RA.addFormingPressRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), + GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), + GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 1), + 100, + 120); + GT_Values.RA.addFormingPressRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), + GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), + GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 1), + 100, + 120); + GT_Values.RA.addFormingPressRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Gold, 1L), + GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), + GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 2), + 200, + 120); + GT_Values.RA.addFormingPressRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Diamond, 1L), + GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), + GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 3), + 100, + 480); + GT_Values.RA.addFormingPressRecipe( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderPearl, 1L), + GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), + GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 2L, 4), + 200, + 120); + GT_Values.RA.addFormingPressRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NetherQuartz, 1L), + GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), + GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 5), + 300, + 120); + GT_Values.RA.addFormingPressRecipe( + new ItemStack(Items.comparator, 1, 32767), + GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), + GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 6), + 300, + 120); + GT_Values.RA.addFormingPressRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 10), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 0L, 13), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 16), + 200, + 16); + GT_Values.RA.addFormingPressRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.CertusQuartz, 1L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 0L, 13), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 16), + 200, + 16); + GT_Values.RA.addFormingPressRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Diamond, 1L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 0L, 14), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 17), + 200, + 16); + GT_Values.RA.addFormingPressRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Gold, 1L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 0L, 15), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 18), + 200, + 16); + GT_Values.RA.addFormingPressRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicon, 1L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 0L, 19), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 20), + 200, + 16); this.run2(); - GT_Values.RA.addFormingPressRecipe(ItemList.Food_Dough_Sugar.get(4L), ItemList.Shape_Mold_Cylinder.get(0L), ItemList.Food_Raw_Cake.get(1L), 384, 4); - GT_Values.RA.addFormingPressRecipe(new ItemStack(Blocks.glass, 1, 32767), ItemList.Shape_Mold_Arrow.get(0L), ItemList.Arrow_Head_Glass_Emtpy.get(1L), 64, 4); + GT_Values.RA.addFormingPressRecipe( + ItemList.Food_Dough_Sugar.get(4L), + ItemList.Shape_Mold_Cylinder.get(0L), + ItemList.Food_Raw_Cake.get(1L), + 384, + 4); + GT_Values.RA.addFormingPressRecipe( + new ItemStack(Blocks.glass, 1, 32767), + ItemList.Shape_Mold_Arrow.get(0L), + ItemList.Arrow_Head_Glass_Emtpy.get(1L), + 64, + 4); for (Materials tMat : Materials.values()) { if (tMat.isProperSolderingFluid()) { - int tMultiplier = tMat.contains(SubTag.SOLDERING_MATERIAL_GOOD) ? 1 : tMat.contains(SubTag.SOLDERING_MATERIAL_BAD) ? 4 : 2; - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Coated_Basic.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Primitive, 2), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Iron, 2), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Iron, 4), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Iron, 1), GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(1152L * tMultiplier / 2L), GT_ModHandler.getModItem("Forestry", "chipsets", 1L, 0), 200, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Coated_Basic.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 2), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Bronze, 2), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Bronze, 4), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Bronze, 1), GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(1152L * tMultiplier / 2L), GT_ModHandler.getModItem("Forestry", "chipsets", 1L, 1), 200, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Phenolic_Good.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 2), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Steel, 2), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 4), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Steel, 1), GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(1152L * tMultiplier / 2L), GT_ModHandler.getModItem("Forestry", "chipsets", 1L, 2), 200, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Phenolic_Good.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 2), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Electrum, 2), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Electrum, 4), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 1), GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(1152L * tMultiplier / 2L), GT_ModHandler.getModItem("Forestry", "chipsets", 1L, 3), 200, 30); + int tMultiplier = tMat.contains(SubTag.SOLDERING_MATERIAL_GOOD) + ? 1 + : tMat.contains(SubTag.SOLDERING_MATERIAL_BAD) ? 4 : 2; + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + ItemList.Circuit_Board_Coated_Basic.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Primitive, 2), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Iron, 2), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Iron, 4), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Iron, 1), + GT_Utility.getIntegratedCircuit(1) + }, + tMat.getMolten(1152L * tMultiplier / 2L), + GT_ModHandler.getModItem("Forestry", "chipsets", 1L, 0), + 200, + 30); + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + ItemList.Circuit_Board_Coated_Basic.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 2), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Bronze, 2), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Bronze, 4), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Bronze, 1), + GT_Utility.getIntegratedCircuit(1) + }, + tMat.getMolten(1152L * tMultiplier / 2L), + GT_ModHandler.getModItem("Forestry", "chipsets", 1L, 1), + 200, + 30); + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + ItemList.Circuit_Board_Phenolic_Good.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 2), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Steel, 2), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 4), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Steel, 1), + GT_Utility.getIntegratedCircuit(1) + }, + tMat.getMolten(1152L * tMultiplier / 2L), + GT_ModHandler.getModItem("Forestry", "chipsets", 1L, 2), + 200, + 30); + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + ItemList.Circuit_Board_Phenolic_Good.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 2), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Electrum, 2), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Electrum, 4), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 1), + GT_Utility.getIntegratedCircuit(1) + }, + tMat.getMolten(1152L * tMultiplier / 2L), + GT_ModHandler.getModItem("Forestry", "chipsets", 1L, 3), + 200, + 30); // Circuit soldering // Integraded Circuits - for (ItemStack tPlate : new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L)}) { - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.lever, 1, 32767), tPlate, GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(144L * tMultiplier / 2L), ItemList.Cover_Controller.get(1L), 800, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.redstone_torch, 1, 32767), tPlate, GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(144L * tMultiplier / 2L), ItemList.Cover_ActivityDetector.get(1L), 800, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.heavy_weighted_pressure_plate, 1, 32767), tPlate, GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(144L * tMultiplier / 2L), ItemList.Cover_FluidDetector.get(1L), 800, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.light_weighted_pressure_plate, 1, 32767), tPlate, GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(144L * tMultiplier / 2L), ItemList.Cover_ItemDetector.get(1L), 800, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_ModHandler.getIC2Item("ecMeter", 1L), tPlate, GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(144L * tMultiplier / 2L), ItemList.Cover_EnergyDetector.get(1L), 800, 16); + for (ItemStack tPlate : new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L) + }) { + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.lever, 1, 32767), tPlate, GT_Utility.getIntegratedCircuit(1) + }, + tMat.getMolten(144L * tMultiplier / 2L), + ItemList.Cover_Controller.get(1L), + 800, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.redstone_torch, 1, 32767), + tPlate, + GT_Utility.getIntegratedCircuit(1) + }, + tMat.getMolten(144L * tMultiplier / 2L), + ItemList.Cover_ActivityDetector.get(1L), + 800, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.heavy_weighted_pressure_plate, 1, 32767), + tPlate, + GT_Utility.getIntegratedCircuit(1) + }, + tMat.getMolten(144L * tMultiplier / 2L), + ItemList.Cover_FluidDetector.get(1L), + 800, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.light_weighted_pressure_plate, 1, 32767), + tPlate, + GT_Utility.getIntegratedCircuit(1) + }, + tMat.getMolten(144L * tMultiplier / 2L), + ItemList.Cover_ItemDetector.get(1L), + 800, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_ModHandler.getIC2Item("ecMeter", 1L), tPlate, GT_Utility.getIntegratedCircuit(1) + }, + tMat.getMolten(144L * tMultiplier / 2L), + ItemList.Cover_EnergyDetector.get(1L), + 800, + 16); } } } - GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 32), ItemList.GalliumArsenideCrystalSmallPart.get(1L), GT_Utility.getIntegratedCircuit(2), GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.Circuit_Silicon_Ingot.get(1), GT_Values.NI, GT_Values.NI, GT_Values.NI, 9000, 120, 1784); - GT_Values.RA.addCutterRecipe(new ItemStack[]{ItemList.Circuit_Silicon_Ingot.get(1)}, new ItemStack[]{ItemList.Circuit_Silicon_Wafer.get(16), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 4L)}, 400, 30, false); - GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 64), ItemList.GalliumArsenideCrystalSmallPart.get(2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphorus, 8), GT_Utility.getIntegratedCircuit(3), Materials.Nitrogen.getGas(8000), GT_Values.NF, ItemList.Circuit_Silicon_Ingot2.get(1), GT_Values.NI, GT_Values.NI, GT_Values.NI, 12000, 480, 2484); - GT_Values.RA.addCutterRecipe(new ItemStack[]{ItemList.Circuit_Silicon_Ingot2.get(1)}, new ItemStack[]{ItemList.Circuit_Silicon_Wafer2.get(32), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 8L)}, 800, 120, true); - GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.SiliconSG, 16), ItemList.GalliumArsenideCrystal.get(1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Naquadah, 1), GT_Utility.getIntegratedCircuit(3), Materials.Argon.getGas(8000), GT_Values.NF, ItemList.Circuit_Silicon_Ingot3.get(1), GT_Values.NI, GT_Values.NI, GT_Values.NI, 15000, 1920, 4484); - GT_Values.RA.addCutterRecipe(new ItemStack[]{ItemList.Circuit_Silicon_Ingot3.get(1)}, new ItemStack[]{ItemList.Circuit_Silicon_Wafer3.get(64), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 16L)}, 1600, 480, true); - GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.SiliconSG, 32), ItemList.GalliumArsenideCrystal.get(2L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Europium, 2), GT_Utility.getIntegratedCircuit(3), Materials.Radon.getGas(8000), null, ItemList.Circuit_Silicon_Ingot4.get(1), GT_Values.NI, GT_Values.NI, GT_Values.NI, 18000, 7680, 6484); - GT_Values.RA.addCutterRecipe(new ItemStack[]{ItemList.Circuit_Silicon_Ingot4.get(1)}, new ItemStack[]{ItemList.Circuit_Silicon_Wafer4.get(64), ItemList.Circuit_Silicon_Wafer4.get(32), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 32L)}, 2400, 1920, true); - GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.SiliconSG, 64), ItemList.GalliumArsenideCrystal.get(4L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Americium, 4), GT_Utility.getIntegratedCircuit(3), Materials.Radon.getGas(16000), GT_Values.NF, ItemList.Circuit_Silicon_Ingot5.get(1), GT_Values.NI, GT_Values.NI, GT_Values.NI, 21000, 30720, 9000); - GT_Values.RA.addCutterRecipe(new ItemStack[]{ItemList.Circuit_Silicon_Ingot5.get(1)}, new ItemStack[]{ItemList.Circuit_Silicon_Wafer5.get(64), ItemList.Circuit_Silicon_Wafer5.get(64), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 64L)}, 3200, 7680, true); + GT_Values.RA.addBlastRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 32), + ItemList.GalliumArsenideCrystalSmallPart.get(1L), + GT_Utility.getIntegratedCircuit(2), + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + ItemList.Circuit_Silicon_Ingot.get(1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + 9000, + 120, + 1784); + GT_Values.RA.addCutterRecipe( + new ItemStack[] {ItemList.Circuit_Silicon_Ingot.get(1)}, + new ItemStack[] { + ItemList.Circuit_Silicon_Wafer.get(16), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 4L) + }, + 400, + 30, + false); + GT_Values.RA.addBlastRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 64), + ItemList.GalliumArsenideCrystalSmallPart.get(2L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphorus, 8), + GT_Utility.getIntegratedCircuit(3), + Materials.Nitrogen.getGas(8000), + GT_Values.NF, + ItemList.Circuit_Silicon_Ingot2.get(1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + 12000, + 480, + 2484); + GT_Values.RA.addCutterRecipe( + new ItemStack[] {ItemList.Circuit_Silicon_Ingot2.get(1)}, + new ItemStack[] { + ItemList.Circuit_Silicon_Wafer2.get(32), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 8L) + }, + 800, + 120, + true); + GT_Values.RA.addBlastRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.SiliconSG, 16), + ItemList.GalliumArsenideCrystal.get(1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Naquadah, 1), + GT_Utility.getIntegratedCircuit(3), + Materials.Argon.getGas(8000), + GT_Values.NF, + ItemList.Circuit_Silicon_Ingot3.get(1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + 15000, + 1920, + 4484); + GT_Values.RA.addCutterRecipe( + new ItemStack[] {ItemList.Circuit_Silicon_Ingot3.get(1)}, + new ItemStack[] { + ItemList.Circuit_Silicon_Wafer3.get(64), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 16L) + }, + 1600, + 480, + true); + GT_Values.RA.addBlastRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.SiliconSG, 32), + ItemList.GalliumArsenideCrystal.get(2L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Europium, 2), + GT_Utility.getIntegratedCircuit(3), + Materials.Radon.getGas(8000), + null, + ItemList.Circuit_Silicon_Ingot4.get(1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + 18000, + 7680, + 6484); + GT_Values.RA.addCutterRecipe( + new ItemStack[] {ItemList.Circuit_Silicon_Ingot4.get(1)}, + new ItemStack[] { + ItemList.Circuit_Silicon_Wafer4.get(64), + ItemList.Circuit_Silicon_Wafer4.get(32), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 32L) + }, + 2400, + 1920, + true); + GT_Values.RA.addBlastRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.SiliconSG, 64), + ItemList.GalliumArsenideCrystal.get(4L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Americium, 4), + GT_Utility.getIntegratedCircuit(3), + Materials.Radon.getGas(16000), + GT_Values.NF, + ItemList.Circuit_Silicon_Ingot5.get(1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + 21000, + 30720, + 9000); + GT_Values.RA.addCutterRecipe( + new ItemStack[] {ItemList.Circuit_Silicon_Ingot5.get(1)}, + new ItemStack[] { + ItemList.Circuit_Silicon_Wafer5.get(64), + ItemList.Circuit_Silicon_Wafer5.get(64), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 64L) + }, + 3200, + 7680, + true); // ----------------------------------------------------------------------------------------------------------------------------- // Catalysts for Plasma Forge. GT_Values.RA.addMixerRecipe( - new ItemStack[]{GT_Utility.getIntegratedCircuit(9)}, - new FluidStack[]{Materials.Helium.getPlasma(1000L), Materials.Iron.getPlasma(1000L), Materials.Calcium.getPlasma(1000L), Materials.Niobium.getPlasma(1000L)}, - new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.DimensionallyTranscendentCrudeCatalyst.getFluid(1000L)}, - 50_000, 125_000 - ); + new ItemStack[] {GT_Utility.getIntegratedCircuit(9)}, + new FluidStack[] { + Materials.Helium.getPlasma(1000L), + Materials.Iron.getPlasma(1000L), + Materials.Calcium.getPlasma(1000L), + Materials.Niobium.getPlasma(1000L) + }, + new ItemStack[] {GT_Values.NI}, + new FluidStack[] {Materials.DimensionallyTranscendentCrudeCatalyst.getFluid(1000L)}, + 50_000, + 125_000); GT_Values.RA.addMixerRecipe( - new ItemStack[]{GT_Utility.getIntegratedCircuit(10)}, - new FluidStack[]{Materials.DimensionallyTranscendentCrudeCatalyst.getFluid(1000L), Materials.Radon.getPlasma(1000L), Materials.Nickel.getPlasma(1000L), Materials.Boron.getPlasma(1000L), Materials.Sulfur.getPlasma(1000L)}, - new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.DimensionallyTranscendentProsaicCatalyst.getFluid(1000L)}, - 50_000, 125_000 * 4 - ); + new ItemStack[] {GT_Utility.getIntegratedCircuit(10)}, + new FluidStack[] { + Materials.DimensionallyTranscendentCrudeCatalyst.getFluid(1000L), + Materials.Radon.getPlasma(1000L), + Materials.Nickel.getPlasma(1000L), + Materials.Boron.getPlasma(1000L), + Materials.Sulfur.getPlasma(1000L) + }, + new ItemStack[] {GT_Values.NI}, + new FluidStack[] {Materials.DimensionallyTranscendentProsaicCatalyst.getFluid(1000L)}, + 50_000, + 125_000 * 4); GT_Values.RA.addMixerRecipe( - new ItemStack[]{GT_Utility.getIntegratedCircuit(11)}, - new FluidStack[]{Materials.DimensionallyTranscendentProsaicCatalyst.getFluid(1000L), Materials.Nitrogen.getPlasma(1000L), Materials.Zinc.getPlasma(1000L), Materials.Silver.getPlasma(1000L), Materials.Titanium.getPlasma(1000L)}, - new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.DimensionallyTranscendentResplendentCatalyst.getFluid(1000L)}, - 50_000, 125_000 * 16 - ); + new ItemStack[] {GT_Utility.getIntegratedCircuit(11)}, + new FluidStack[] { + Materials.DimensionallyTranscendentProsaicCatalyst.getFluid(1000L), + Materials.Nitrogen.getPlasma(1000L), + Materials.Zinc.getPlasma(1000L), + Materials.Silver.getPlasma(1000L), + Materials.Titanium.getPlasma(1000L) + }, + new ItemStack[] {GT_Values.NI}, + new FluidStack[] {Materials.DimensionallyTranscendentResplendentCatalyst.getFluid(1000L)}, + 50_000, + 125_000 * 16); GT_Values.RA.addMixerRecipe( - new ItemStack[]{GT_Utility.getIntegratedCircuit(12)}, - new FluidStack[]{Materials.DimensionallyTranscendentResplendentCatalyst.getFluid(1000L), Materials.Americium.getPlasma(1000L), Materials.Bismuth.getPlasma(1000L), Materials.Oxygen.getPlasma(1000L), Materials.Tin.getPlasma(1000L)}, - new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.DimensionallyTranscendentExoticCatalyst.getFluid(1000L)}, - 50_000, 125_000 * 64 - ); + new ItemStack[] {GT_Utility.getIntegratedCircuit(12)}, + new FluidStack[] { + Materials.DimensionallyTranscendentResplendentCatalyst.getFluid(1000L), + Materials.Americium.getPlasma(1000L), + Materials.Bismuth.getPlasma(1000L), + Materials.Oxygen.getPlasma(1000L), + Materials.Tin.getPlasma(1000L) + }, + new ItemStack[] {GT_Values.NI}, + new FluidStack[] {Materials.DimensionallyTranscendentExoticCatalyst.getFluid(1000L)}, + 50_000, + 125_000 * 64); // ----------------------------------------------------------------------------------------------------------------------------- GT_Values.RA.addLaserEngraverRecipe( - new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.DimensionallyTranscendentCrudeCatalyst.getFluid(1000L)}, - - new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.ExcitedDTCC.getFluid(1000L)}, - 50_000, 125_000, true - ); + new ItemStack[] {GT_Values.NI}, + new FluidStack[] {Materials.DimensionallyTranscendentCrudeCatalyst.getFluid(1000L)}, + new ItemStack[] {GT_Values.NI}, + new FluidStack[] {Materials.ExcitedDTCC.getFluid(1000L)}, + 50_000, + 125_000, + true); GT_Values.RA.addLaserEngraverRecipe( - new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.DimensionallyTranscendentProsaicCatalyst.getFluid(1000L)}, - - new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.ExcitedDTPC.getFluid(1000L)}, - 50_000, 125_000 * 4, true - ); + new ItemStack[] {GT_Values.NI}, + new FluidStack[] {Materials.DimensionallyTranscendentProsaicCatalyst.getFluid(1000L)}, + new ItemStack[] {GT_Values.NI}, + new FluidStack[] {Materials.ExcitedDTPC.getFluid(1000L)}, + 50_000, + 125_000 * 4, + true); GT_Values.RA.addLaserEngraverRecipe( - new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.DimensionallyTranscendentResplendentCatalyst.getFluid(1000L)}, - - new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.ExcitedDTRC.getFluid(1000L)}, - 50_000, 125_000 * 16, true - ); + new ItemStack[] {GT_Values.NI}, + new FluidStack[] {Materials.DimensionallyTranscendentResplendentCatalyst.getFluid(1000L)}, + new ItemStack[] {GT_Values.NI}, + new FluidStack[] {Materials.ExcitedDTRC.getFluid(1000L)}, + 50_000, + 125_000 * 16, + true); GT_Values.RA.addLaserEngraverRecipe( - new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.DimensionallyTranscendentExoticCatalyst.getFluid(1000L)}, - - new ItemStack[]{GT_Values.NI}, - new FluidStack[]{Materials.ExcitedDTEC.getFluid(1000L)}, - 50_000, 125_000 * 64, true - ); + new ItemStack[] {GT_Values.NI}, + new FluidStack[] {Materials.DimensionallyTranscendentExoticCatalyst.getFluid(1000L)}, + new ItemStack[] {GT_Values.NI}, + new FluidStack[] {Materials.ExcitedDTEC.getFluid(1000L)}, + 50_000, + 125_000 * 64, + true); // ----------------------------------------------------------------------------------------------------------------------------- - GT_Values.RA.addAssemblerRecipe(new ItemStack(Blocks.redstone_torch, 2, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), Materials.Concrete.getMolten(144L), new ItemStack(Items.repeater, 1, 0), 80, 10); - GT_Values.RA.addAssemblerRecipe(new ItemStack(Items.leather, 1, 32767), new ItemStack(Items.lead, 1, 32767), Materials.Glue.getFluid(72L), new ItemStack(Items.name_tag, 1, 0), 100, 8); - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem(MOD_ID_DC, "item.ArtificialLeather", 1L, 0), new ItemStack(Items.lead, 1, 32767), Materials.Glue.getFluid(72L), new ItemStack(Items.name_tag, 1, 0), 100, 8); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 8L), new ItemStack(Items.compass, 1, 32767), GT_Values.NF, new ItemStack(Items.map, 1, 0), 100, 8); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tantalum, 1L), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Manganese, 1L), Materials.Plastic.getMolten(144L), ItemList.Battery_RE_ULV_Tantalum.get(8L), 100, 4); - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("TwilightForest", "item.charmOfLife1", 4L, 0), GT_Utility.getIntegratedCircuit(4), GT_Values.NF, GT_ModHandler.getModItem("TwilightForest", "item.charmOfLife2", 1L, 0), 100, 8); - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping1", 4L, 0), GT_Utility.getIntegratedCircuit(4), GT_Values.NF, GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping2", 1L, 0), 100, 8); - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping2", 4L, 0), GT_Utility.getIntegratedCircuit(4), GT_Values.NF, GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping3", 1L, 0), 100, 8); - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("TwilightForest", "item.charmOfLife2", 1L, 0), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_ModHandler.getModItem("TwilightForest", "item.charmOfLife1", 4L, 0), 100, 8); - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping2", 1L, 0), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping1", 4L, 0), 100, 8); - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping3", 1L, 0), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping2", 4L, 0), 100, 8); - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 16), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 20), Materials.Redstone.getMolten(144L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 23), 64, 30); - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 17), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 20), Materials.Redstone.getMolten(144L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 24), 64, 30); - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 18), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 20), Materials.Redstone.getMolten(144L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 22), 64, 30); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CertusQuartz, 1L), new ItemStack(Blocks.sand, 1, 32767), GT_Values.NF, GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 2L, 0), 64, 8); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NetherQuartz, 1L), new ItemStack(Blocks.sand, 1, 32767), GT_Values.NF, GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 2L, 600), 64, 8); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Fluix, 1L), new ItemStack(Blocks.sand, 1, 32767), GT_Values.NF, GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 2L, 1200), 64, 8); - GT_Values.RA.addAssemblerRecipe(ItemList.FR_Wax.get(6L), new ItemStack(Items.string, 1, 32767), Materials.Water.getFluid(600L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "candle", 24L, 0), 64, 8); - GT_Values.RA.addAssemblerRecipe(ItemList.FR_Wax.get(2L), ItemList.FR_Silk.get(1L), Materials.Water.getFluid(200L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "candle", 8L, 0), 16, 8); - GT_Values.RA.addAssemblerRecipe(ItemList.FR_Silk.get(9L), GT_Utility.getIntegratedCircuit(9), Materials.Water.getFluid(500L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "craftingMaterial", 1L, 3), 64, 8); - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "propolis", 5L, 2), GT_Utility.getIntegratedCircuit(5), GT_Values.NF, GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "craftingMaterial", 1L, 1), 16, 8); - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "sturdyMachine", 1L, 0), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Diamond, 4L), Materials.Water.getFluid(5000L), ItemList.FR_Casing_Hardened.get(1L), 64, 32); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Bronze, 8L), GT_Utility.getIntegratedCircuit(8), GT_Values.NF, ItemList.FR_Casing_Sturdy.get(1L), 32, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), new ItemStack(Blocks.wool, 1, 32767), Materials.Creosote.getFluid(1000L), new ItemStack(Blocks.torch, 6, 0), 400, 1); - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "craftingMaterial", 5L, 1), GT_Utility.getIntegratedCircuit(5), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderPearl, 1L), 64, 8); - GT_Values.RA.addAssemblerRecipe(new ItemStack(Blocks.piston, 1, 32767), new ItemStack(Items.slime_ball, 1, 32767), GT_Values.NF, new ItemStack(Blocks.sticky_piston, 1, 0), 100, 4); - GT_Values.RA.addAssemblerRecipe(new ItemStack(Blocks.piston, 1, 32767), ItemList.IC2_Resin.get(1L), GT_Values.NF, new ItemStack(Blocks.sticky_piston, 1, 0), 100, 4); - GT_Values.RA.addAssemblerRecipe(new ItemStack(Blocks.piston, 1, 32767), GT_Utility.getIntegratedCircuit(1), Materials.Glue.getFluid(100L), new ItemStack(Blocks.sticky_piston, 1, 0), 100, 4); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Rubber, 3L), GT_ModHandler.getIC2Item("carbonMesh", 3L), GT_Utility.getIntegratedCircuit(1)}, Materials.Glue.getFluid(300L), ItemList.Duct_Tape.get(1L), 100, 120); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StyreneButadieneRubber, 2L), GT_ModHandler.getIC2Item("carbonMesh", 2L), GT_Utility.getIntegratedCircuit(2)}, Materials.Glue.getFluid(200L), ItemList.Duct_Tape.get(1L), 100, 480); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicone, 1L), GT_ModHandler.getIC2Item("carbonMesh", 1L), GT_Utility.getIntegratedCircuit(3)}, Materials.Glue.getFluid(100L), ItemList.Duct_Tape.get(1L), 100, 1920); - //Maintenance Hatch Recipes Using BrainTech + Refined Glue. Info: One BrainTech Recipe Is In GT+ü Originally. The Maintenance Hatch Recipe using SuperGlue is there. - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LV.get(1), ItemList.Duct_Tape.get(2), GT_Utility.getIntegratedCircuit(2)}, Materials.Glue.getFluid(1000L), ItemList.Hatch_Maintenance.get(1L), 100, 120); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 3L), new ItemStack(Items.leather, 1, 32767), Materials.Glue.getFluid(20L), new ItemStack(Items.book, 1, 0), 32, 8); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 3L), GT_ModHandler.getModItem(MOD_ID_DC, "item.ArtificialLeather", 1L, 0), Materials.Glue.getFluid(20L), new ItemStack(Items.book, 1, 0), 32, 8); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 3L), GT_OreDictUnificator.get(OrePrefixes.plateQuadruple, Materials.Paper, 1L), Materials.Glue.getFluid(20L), new ItemStack(Items.book, 1, 0), 32, 8); - GT_Values.RA.addAssemblerRecipe(ItemList.Paper_Printed_Pages.get(1L), new ItemStack(Items.leather, 1, 32767), Materials.Glue.getFluid(20L), new ItemStack(Items.written_book, 1, 0), 32, 8); - GT_Values.RA.addAssemblerRecipe(ItemList.Paper_Printed_Pages.get(1L), GT_ModHandler.getModItem(MOD_ID_DC, "item.ArtificialLeather", 1L, 0), Materials.Glue.getFluid(20L), new ItemStack(Items.written_book, 1, 0), 32, 8); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.Tin, 4L)}, GT_Values.NF, ItemList.Cell_Universal_Fluid.get(1L), 128, 8); - GT_Values.RA.addAssemblerRecipe(ItemList.Food_Baked_Cake.get(1L), new ItemStack(Items.egg, 1, 0), Materials.Milk.getFluid(3000L), new ItemStack(Items.cake, 1, 0), 100, 8); - GT_Values.RA.addAssemblerRecipe(ItemList.Food_Sliced_Bun.get(2L), GT_Utility.getIntegratedCircuit(2), GT_Values.NF, ItemList.Food_Sliced_Buns.get(1L), 100, 4); - GT_Values.RA.addAssemblerRecipe(ItemList.Food_Sliced_Bread.get(2L), GT_Utility.getIntegratedCircuit(2), GT_Values.NF, ItemList.Food_Sliced_Breads.get(1L), 100, 4); - GT_Values.RA.addAssemblerRecipe(ItemList.Food_Sliced_Baguette.get(2L), GT_Utility.getIntegratedCircuit(2), GT_Values.NF, ItemList.Food_Sliced_Baguettes.get(1L), 100, 4); - GT_Values.RA.addAssemblerRecipe(ItemList.Food_Sliced_Buns.get(1L), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, ItemList.Food_Sliced_Bun.get(2L), 100, 4); - GT_Values.RA.addAssemblerRecipe(ItemList.Food_Sliced_Breads.get(1L), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, ItemList.Food_Sliced_Bread.get(2L), 100, 4); - GT_Values.RA.addAssemblerRecipe(ItemList.Food_Sliced_Baguettes.get(1L), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, ItemList.Food_Sliced_Baguette.get(2L), 100, 4); - GT_Values.RA.addAssemblerRecipe(ItemList.Food_Sliced_Bun.get(2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.MeatCooked, 1L), GT_Values.NF, ItemList.Food_Burger_Meat.get(1L), 100, 4); - GT_Values.RA.addAssemblerRecipe(ItemList.Food_Sliced_Buns.get(1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.MeatCooked, 1L), GT_Values.NF, ItemList.Food_Burger_Meat.get(1L), 100, 4); - GT_Values.RA.addAssemblerRecipe(ItemList.Food_Sliced_Bun.get(2L), ItemList.Food_Chum.get(1L), GT_Values.NF, ItemList.Food_Burger_Chum.get(1L), 100, 4); - GT_Values.RA.addAssemblerRecipe(ItemList.Food_Sliced_Buns.get(1L), ItemList.Food_Chum.get(1L), GT_Values.NF, ItemList.Food_Burger_Chum.get(1L), 100, 4); - GT_Values.RA.addAssemblerRecipe(ItemList.Food_Sliced_Bun.get(2L), ItemList.Food_Sliced_Cheese.get(3L), GT_Values.NF, ItemList.Food_Burger_Cheese.get(1L), 100, 4); - GT_Values.RA.addAssemblerRecipe(ItemList.Food_Sliced_Buns.get(1L), ItemList.Food_Sliced_Cheese.get(3L), GT_Values.NF, ItemList.Food_Burger_Cheese.get(1L), 100, 4); - GT_Values.RA.addAssemblerRecipe(ItemList.Food_Flat_Dough.get(1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.MeatCooked, 1L), GT_Values.NF, ItemList.Food_Raw_Pizza_Meat.get(1L), 100, 4); - GT_Values.RA.addAssemblerRecipe(ItemList.Food_Flat_Dough.get(1L), ItemList.Food_Sliced_Cheese.get(3L), GT_Values.NF, ItemList.Food_Raw_Pizza_Cheese.get(1L), 100, 4); - - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Copper, 2L)}, Materials.Glass.getMolten(576L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 0), 200, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.AnnealedCopper, 2L)}, Materials.Glass.getMolten(576L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 0), 200, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Tin, 2L)}, Materials.Glass.getMolten(576L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 1), 200, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Bronze, 2L)}, Materials.Glass.getMolten(576L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 2), 200, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Iron, 2L)}, Materials.Glass.getMolten(576L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 3), 200, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.WroughtIron, 2L)}, Materials.Glass.getMolten(576L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 3), 200, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Gold, 2L)}, Materials.Glass.getMolten(576L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 4), 200, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Diamond, 2L)}, Materials.Glass.getMolten(576L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 5), 200, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), GT_ModHandler.getModItem(MOD_ID_DC, "item.LongObsidianRod", 2L, 0)}, Materials.Glass.getMolten(576L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 6), 200, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Blaze, 2L)}, Materials.Glass.getMolten(576L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 7), 200, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Rubber, 2L)}, Materials.Glass.getMolten(576L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 8), 200, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Emerald, 2L)}, Materials.Glass.getMolten(576L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 9), 200, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Apatite, 2L)}, Materials.Glass.getMolten(576L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 10), 200, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Lapis, 2L)}, Materials.Glass.getMolten(576L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 11), 200, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.EnderEye, 2L)}, Materials.Glass.getMolten(576L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 12), 200, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.EnderEye, 1L), GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Uranium, 2L)}, Materials.Glass.getMolten(576L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 13), 200, 30); - - //SC craft - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Pentacadmiummagnesiumhexaoxid, 3L), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.StainlessSteel, 2L), ItemList.Electric_Pump_MV.get(1L), GT_Utility.getIntegratedCircuit(9)}, Materials.Helium.getGas(2000L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorMV, 3L), 400, 120); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Titaniumonabariumdecacoppereikosaoxid, 6L), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Titanium, 4L), ItemList.Electric_Pump_HV.get(1L), GT_Utility.getIntegratedCircuit(9)}, Materials.Helium.getGas(4000L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorHV, 6L), 400, 480); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Uraniumtriplatinid, 9L), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.TungstenSteel, 6L), ItemList.Electric_Pump_EV.get(1L), GT_Utility.getIntegratedCircuit(9)}, Materials.Helium.getGas(6000L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorEV, 9L), 400, 1920); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Vanadiumtriindinid, 12L), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.NiobiumTitanium, 8L), ItemList.Electric_Pump_IV.get(1L), GT_Utility.getIntegratedCircuit(9)}, Materials.Helium.getGas(8000L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorIV, 12L), 800, 7680); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid, 15L), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Enderium, 10L), ItemList.Electric_Pump_LuV.get(1L), GT_Utility.getIntegratedCircuit(9)}, Materials.Helium.getGas(12000L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorLuV, 15L), 800, 30720); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Tetranaquadahdiindiumhexaplatiumosminid, 18L), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Naquadah, 12L), ItemList.Electric_Pump_ZPM.get(1L), GT_Utility.getIntegratedCircuit(9)}, Materials.Helium.getGas(16000L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorZPM, 18L), 1600, 122880); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Longasssuperconductornameforuvwire, 21L), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Neutronium, 14L), ItemList.Electric_Pump_UV.get(1L), GT_Utility.getIntegratedCircuit(9)}, Materials.Helium.getGas(20000L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUV, 21L), 1600, 491520); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Longasssuperconductornameforuhvwire, 24L), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Bedrockium, 16L), ItemList.Electric_Pump_UHV.get(1L), GT_Utility.getIntegratedCircuit(9)}, Materials.Helium.getGas(24000L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUHV, 24L), 3200, 1966080); - if(Loader.isModLoaded("GalaxySpace")) { - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Pentacadmiummagnesiumhexaoxid, 3L), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.StainlessSteel, 2L), ItemList.Electric_Pump_MV.get(1L), GT_Utility.getIntegratedCircuit(9)}, new FluidStack(FluidRegistry.getFluid("liquid helium"), 2000), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorMV, 3L), 320, 120); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Titaniumonabariumdecacoppereikosaoxid, 6L), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Titanium, 4L), ItemList.Electric_Pump_HV.get(1L), GT_Utility.getIntegratedCircuit(9)}, new FluidStack(FluidRegistry.getFluid("liquid helium"), 4000), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorHV, 6L), 320, 480); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Uraniumtriplatinid, 9L), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.TungstenSteel, 6L), ItemList.Electric_Pump_EV.get(1L), GT_Utility.getIntegratedCircuit(9)}, new FluidStack(FluidRegistry.getFluid("liquid helium"), 6000), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorEV, 9L), 320, 1920); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Vanadiumtriindinid, 12L), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.NiobiumTitanium, 8L), ItemList.Electric_Pump_IV.get(1L), GT_Utility.getIntegratedCircuit(9)}, new FluidStack(FluidRegistry.getFluid("liquid helium"), 8000), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorIV, 12L), 640, 7680); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid, 15L), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Enderium, 10L), ItemList.Electric_Pump_LuV.get(1L), GT_Utility.getIntegratedCircuit(9)}, new FluidStack(FluidRegistry.getFluid("liquid helium"), 12000), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorLuV, 15L), 640, 30720); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Tetranaquadahdiindiumhexaplatiumosminid, 18L), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Naquadah, 12L), ItemList.Electric_Pump_ZPM.get(1L), GT_Utility.getIntegratedCircuit(9)}, new FluidStack(FluidRegistry.getFluid("liquid helium"), 16000), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorZPM, 18L), 1280, 122880); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Longasssuperconductornameforuvwire, 21L), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Neutronium, 14L), ItemList.Electric_Pump_UV.get(1L), GT_Utility.getIntegratedCircuit(9)}, new FluidStack(FluidRegistry.getFluid("liquid helium"), 20000), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUV, 21L), 1280, 491520); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Longasssuperconductornameforuhvwire, 24L), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Bedrockium, 16L), ItemList.Electric_Pump_UHV.get(1L), GT_Utility.getIntegratedCircuit(9)}, new FluidStack(FluidRegistry.getFluid("liquid helium"), 24000), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUHV, 24L), 2560, 1966080); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUEVBase, 27L), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Infinity, 18L), ItemList.Electric_Pump_UEV.get(1L), GT_Utility.getIntegratedCircuit(9)}, new FluidStack(FluidRegistry.getFluid("liquid helium"), 28000), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUEV, 27L), 3200, 7864320); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUMVBase, 33L), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.SpaceTime, 22L), ItemList.Electric_Pump_UMV.get(1L), GT_Utility.getIntegratedCircuit(9)}, new FluidStack(FluidRegistry.getFluid("liquid helium"), 36000), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUMV, 33L), 3200, 125829120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack(Blocks.redstone_torch, 2, 32767), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), + Materials.Concrete.getMolten(144L), + new ItemStack(Items.repeater, 1, 0), + 80, + 10); + GT_Values.RA.addAssemblerRecipe( + new ItemStack(Items.leather, 1, 32767), + new ItemStack(Items.lead, 1, 32767), + Materials.Glue.getFluid(72L), + new ItemStack(Items.name_tag, 1, 0), + 100, + 8); + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getModItem(MOD_ID_DC, "item.ArtificialLeather", 1L, 0), + new ItemStack(Items.lead, 1, 32767), + Materials.Glue.getFluid(72L), + new ItemStack(Items.name_tag, 1, 0), + 100, + 8); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 8L), + new ItemStack(Items.compass, 1, 32767), + GT_Values.NF, + new ItemStack(Items.map, 1, 0), + 100, + 8); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tantalum, 1L), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Manganese, 1L), + Materials.Plastic.getMolten(144L), + ItemList.Battery_RE_ULV_Tantalum.get(8L), + 100, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getModItem("TwilightForest", "item.charmOfLife1", 4L, 0), + GT_Utility.getIntegratedCircuit(4), + GT_Values.NF, + GT_ModHandler.getModItem("TwilightForest", "item.charmOfLife2", 1L, 0), + 100, + 8); + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping1", 4L, 0), + GT_Utility.getIntegratedCircuit(4), + GT_Values.NF, + GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping2", 1L, 0), + 100, + 8); + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping2", 4L, 0), + GT_Utility.getIntegratedCircuit(4), + GT_Values.NF, + GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping3", 1L, 0), + 100, + 8); + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getModItem("TwilightForest", "item.charmOfLife2", 1L, 0), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_ModHandler.getModItem("TwilightForest", "item.charmOfLife1", 4L, 0), + 100, + 8); + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping2", 1L, 0), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping1", 4L, 0), + 100, + 8); + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping3", 1L, 0), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping2", 4L, 0), + 100, + 8); + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 16), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 20), + Materials.Redstone.getMolten(144L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 23), + 64, + 30); + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 17), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 20), + Materials.Redstone.getMolten(144L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 24), + 64, + 30); + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 18), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 20), + Materials.Redstone.getMolten(144L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 22), + 64, + 30); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CertusQuartz, 1L), + new ItemStack(Blocks.sand, 1, 32767), + GT_Values.NF, + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 2L, 0), + 64, + 8); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NetherQuartz, 1L), + new ItemStack(Blocks.sand, 1, 32767), + GT_Values.NF, + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 2L, 600), + 64, + 8); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Fluix, 1L), + new ItemStack(Blocks.sand, 1, 32767), + GT_Values.NF, + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 2L, 1200), + 64, + 8); + GT_Values.RA.addAssemblerRecipe( + ItemList.FR_Wax.get(6L), + new ItemStack(Items.string, 1, 32767), + Materials.Water.getFluid(600L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "candle", 24L, 0), + 64, + 8); + GT_Values.RA.addAssemblerRecipe( + ItemList.FR_Wax.get(2L), + ItemList.FR_Silk.get(1L), + Materials.Water.getFluid(200L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "candle", 8L, 0), + 16, + 8); + GT_Values.RA.addAssemblerRecipe( + ItemList.FR_Silk.get(9L), + GT_Utility.getIntegratedCircuit(9), + Materials.Water.getFluid(500L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "craftingMaterial", 1L, 3), + 64, + 8); + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "propolis", 5L, 2), + GT_Utility.getIntegratedCircuit(5), + GT_Values.NF, + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "craftingMaterial", 1L, 1), + 16, + 8); + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "sturdyMachine", 1L, 0), + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Diamond, 4L), + Materials.Water.getFluid(5000L), + ItemList.FR_Casing_Hardened.get(1L), + 64, + 32); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Bronze, 8L), + GT_Utility.getIntegratedCircuit(8), + GT_Values.NF, + ItemList.FR_Casing_Sturdy.get(1L), + 32, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), + new ItemStack(Blocks.wool, 1, 32767), + Materials.Creosote.getFluid(1000L), + new ItemStack(Blocks.torch, 6, 0), + 400, + 1); + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "craftingMaterial", 5L, 1), + GT_Utility.getIntegratedCircuit(5), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderPearl, 1L), + 64, + 8); + GT_Values.RA.addAssemblerRecipe( + new ItemStack(Blocks.piston, 1, 32767), + new ItemStack(Items.slime_ball, 1, 32767), + GT_Values.NF, + new ItemStack(Blocks.sticky_piston, 1, 0), + 100, + 4); + GT_Values.RA.addAssemblerRecipe( + new ItemStack(Blocks.piston, 1, 32767), + ItemList.IC2_Resin.get(1L), + GT_Values.NF, + new ItemStack(Blocks.sticky_piston, 1, 0), + 100, + 4); + GT_Values.RA.addAssemblerRecipe( + new ItemStack(Blocks.piston, 1, 32767), + GT_Utility.getIntegratedCircuit(1), + Materials.Glue.getFluid(100L), + new ItemStack(Blocks.sticky_piston, 1, 0), + 100, + 4); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Rubber, 3L), + GT_ModHandler.getIC2Item("carbonMesh", 3L), + GT_Utility.getIntegratedCircuit(1) + }, + Materials.Glue.getFluid(300L), + ItemList.Duct_Tape.get(1L), + 100, + 120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StyreneButadieneRubber, 2L), + GT_ModHandler.getIC2Item("carbonMesh", 2L), + GT_Utility.getIntegratedCircuit(2) + }, + Materials.Glue.getFluid(200L), + ItemList.Duct_Tape.get(1L), + 100, + 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicone, 1L), + GT_ModHandler.getIC2Item("carbonMesh", 1L), + GT_Utility.getIntegratedCircuit(3) + }, + Materials.Glue.getFluid(100L), + ItemList.Duct_Tape.get(1L), + 100, + 1920); + // Maintenance Hatch Recipes Using BrainTech + Refined Glue. Info: One BrainTech Recipe Is In GT+ü Originally. + // The Maintenance Hatch Recipe using SuperGlue is there. + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] {ItemList.Hull_LV.get(1), ItemList.Duct_Tape.get(2), GT_Utility.getIntegratedCircuit(2) + }, + Materials.Glue.getFluid(1000L), + ItemList.Hatch_Maintenance.get(1L), + 100, + 120); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 3L), + new ItemStack(Items.leather, 1, 32767), + Materials.Glue.getFluid(20L), + new ItemStack(Items.book, 1, 0), + 32, + 8); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 3L), + GT_ModHandler.getModItem(MOD_ID_DC, "item.ArtificialLeather", 1L, 0), + Materials.Glue.getFluid(20L), + new ItemStack(Items.book, 1, 0), + 32, + 8); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 3L), + GT_OreDictUnificator.get(OrePrefixes.plateQuadruple, Materials.Paper, 1L), + Materials.Glue.getFluid(20L), + new ItemStack(Items.book, 1, 0), + 32, + 8); + GT_Values.RA.addAssemblerRecipe( + ItemList.Paper_Printed_Pages.get(1L), + new ItemStack(Items.leather, 1, 32767), + Materials.Glue.getFluid(20L), + new ItemStack(Items.written_book, 1, 0), + 32, + 8); + GT_Values.RA.addAssemblerRecipe( + ItemList.Paper_Printed_Pages.get(1L), + GT_ModHandler.getModItem(MOD_ID_DC, "item.ArtificialLeather", 1L, 0), + Materials.Glue.getFluid(20L), + new ItemStack(Items.written_book, 1, 0), + 32, + 8); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.Tin, 4L)}, + GT_Values.NF, + ItemList.Cell_Universal_Fluid.get(1L), + 128, + 8); + GT_Values.RA.addAssemblerRecipe( + ItemList.Food_Baked_Cake.get(1L), + new ItemStack(Items.egg, 1, 0), + Materials.Milk.getFluid(3000L), + new ItemStack(Items.cake, 1, 0), + 100, + 8); + GT_Values.RA.addAssemblerRecipe( + ItemList.Food_Sliced_Bun.get(2L), + GT_Utility.getIntegratedCircuit(2), + GT_Values.NF, + ItemList.Food_Sliced_Buns.get(1L), + 100, + 4); + GT_Values.RA.addAssemblerRecipe( + ItemList.Food_Sliced_Bread.get(2L), + GT_Utility.getIntegratedCircuit(2), + GT_Values.NF, + ItemList.Food_Sliced_Breads.get(1L), + 100, + 4); + GT_Values.RA.addAssemblerRecipe( + ItemList.Food_Sliced_Baguette.get(2L), + GT_Utility.getIntegratedCircuit(2), + GT_Values.NF, + ItemList.Food_Sliced_Baguettes.get(1L), + 100, + 4); + GT_Values.RA.addAssemblerRecipe( + ItemList.Food_Sliced_Buns.get(1L), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + ItemList.Food_Sliced_Bun.get(2L), + 100, + 4); + GT_Values.RA.addAssemblerRecipe( + ItemList.Food_Sliced_Breads.get(1L), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + ItemList.Food_Sliced_Bread.get(2L), + 100, + 4); + GT_Values.RA.addAssemblerRecipe( + ItemList.Food_Sliced_Baguettes.get(1L), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + ItemList.Food_Sliced_Baguette.get(2L), + 100, + 4); + GT_Values.RA.addAssemblerRecipe( + ItemList.Food_Sliced_Bun.get(2L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.MeatCooked, 1L), + GT_Values.NF, + ItemList.Food_Burger_Meat.get(1L), + 100, + 4); + GT_Values.RA.addAssemblerRecipe( + ItemList.Food_Sliced_Buns.get(1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.MeatCooked, 1L), + GT_Values.NF, + ItemList.Food_Burger_Meat.get(1L), + 100, + 4); + GT_Values.RA.addAssemblerRecipe( + ItemList.Food_Sliced_Bun.get(2L), + ItemList.Food_Chum.get(1L), + GT_Values.NF, + ItemList.Food_Burger_Chum.get(1L), + 100, + 4); + GT_Values.RA.addAssemblerRecipe( + ItemList.Food_Sliced_Buns.get(1L), + ItemList.Food_Chum.get(1L), + GT_Values.NF, + ItemList.Food_Burger_Chum.get(1L), + 100, + 4); + GT_Values.RA.addAssemblerRecipe( + ItemList.Food_Sliced_Bun.get(2L), + ItemList.Food_Sliced_Cheese.get(3L), + GT_Values.NF, + ItemList.Food_Burger_Cheese.get(1L), + 100, + 4); + GT_Values.RA.addAssemblerRecipe( + ItemList.Food_Sliced_Buns.get(1L), + ItemList.Food_Sliced_Cheese.get(3L), + GT_Values.NF, + ItemList.Food_Burger_Cheese.get(1L), + 100, + 4); + GT_Values.RA.addAssemblerRecipe( + ItemList.Food_Flat_Dough.get(1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.MeatCooked, 1L), + GT_Values.NF, + ItemList.Food_Raw_Pizza_Meat.get(1L), + 100, + 4); + GT_Values.RA.addAssemblerRecipe( + ItemList.Food_Flat_Dough.get(1L), + ItemList.Food_Sliced_Cheese.get(3L), + GT_Values.NF, + ItemList.Food_Raw_Pizza_Cheese.get(1L), + 100, + 4); + + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), + GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Copper, 2L) + }, + Materials.Glass.getMolten(576L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 0), + 200, + 30); + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), + GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.AnnealedCopper, 2L) + }, + Materials.Glass.getMolten(576L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 0), + 200, + 30); + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), + GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Tin, 2L) + }, + Materials.Glass.getMolten(576L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 1), + 200, + 30); + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), + GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Bronze, 2L) + }, + Materials.Glass.getMolten(576L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 2), + 200, + 30); + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), + GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Iron, 2L) + }, + Materials.Glass.getMolten(576L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 3), + 200, + 30); + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), + GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.WroughtIron, 2L) + }, + Materials.Glass.getMolten(576L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 3), + 200, + 30); + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), + GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Gold, 2L) + }, + Materials.Glass.getMolten(576L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 4), + 200, + 30); + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), + GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Diamond, 2L) + }, + Materials.Glass.getMolten(576L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 5), + 200, + 30); + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), + GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), + GT_ModHandler.getModItem(MOD_ID_DC, "item.LongObsidianRod", 2L, 0) + }, + Materials.Glass.getMolten(576L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 6), + 200, + 30); + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), + GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Blaze, 2L) + }, + Materials.Glass.getMolten(576L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 7), + 200, + 30); + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), + GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Rubber, 2L) + }, + Materials.Glass.getMolten(576L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 8), + 200, + 30); + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), + GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Emerald, 2L) + }, + Materials.Glass.getMolten(576L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 9), + 200, + 30); + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), + GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Apatite, 2L) + }, + Materials.Glass.getMolten(576L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 10), + 200, + 30); + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), + GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Lapis, 2L) + }, + Materials.Glass.getMolten(576L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 11), + 200, + 30); + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), + GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.EnderEye, 2L) + }, + Materials.Glass.getMolten(576L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 12), + 200, + 30); + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.EnderEye, 1L), + GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Gold, 2L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 2L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Uranium, 2L) + }, + Materials.Glass.getMolten(576L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "thermionicTubes", 4L, 13), + 200, + 30); + + // SC craft + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Pentacadmiummagnesiumhexaoxid, 3L), + GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.StainlessSteel, 2L), + ItemList.Electric_Pump_MV.get(1L), + GT_Utility.getIntegratedCircuit(9) + }, + Materials.Helium.getGas(2000L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorMV, 3L), + 400, + 120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Titaniumonabariumdecacoppereikosaoxid, 6L), + GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Titanium, 4L), + ItemList.Electric_Pump_HV.get(1L), + GT_Utility.getIntegratedCircuit(9) + }, + Materials.Helium.getGas(4000L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorHV, 6L), + 400, + 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Uraniumtriplatinid, 9L), + GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.TungstenSteel, 6L), + ItemList.Electric_Pump_EV.get(1L), + GT_Utility.getIntegratedCircuit(9) + }, + Materials.Helium.getGas(6000L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorEV, 9L), + 400, + 1920); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Vanadiumtriindinid, 12L), + GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.NiobiumTitanium, 8L), + ItemList.Electric_Pump_IV.get(1L), + GT_Utility.getIntegratedCircuit(9) + }, + Materials.Helium.getGas(8000L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorIV, 12L), + 800, + 7680); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get( + OrePrefixes.wireGt01, + Materials.Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid, + 15L), + GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Enderium, 10L), + ItemList.Electric_Pump_LuV.get(1L), + GT_Utility.getIntegratedCircuit(9) + }, + Materials.Helium.getGas(12000L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorLuV, 15L), + 800, + 30720); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get( + OrePrefixes.wireGt01, Materials.Tetranaquadahdiindiumhexaplatiumosminid, 18L), + GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Naquadah, 12L), + ItemList.Electric_Pump_ZPM.get(1L), + GT_Utility.getIntegratedCircuit(9) + }, + Materials.Helium.getGas(16000L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorZPM, 18L), + 1600, + 122880); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Longasssuperconductornameforuvwire, 21L), + GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Neutronium, 14L), + ItemList.Electric_Pump_UV.get(1L), + GT_Utility.getIntegratedCircuit(9) + }, + Materials.Helium.getGas(20000L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUV, 21L), + 1600, + 491520); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Longasssuperconductornameforuhvwire, 24L), + GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Bedrockium, 16L), + ItemList.Electric_Pump_UHV.get(1L), + GT_Utility.getIntegratedCircuit(9) + }, + Materials.Helium.getGas(24000L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUHV, 24L), + 3200, + 1966080); + if (Loader.isModLoaded("GalaxySpace")) { + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Pentacadmiummagnesiumhexaoxid, 3L), + GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.StainlessSteel, 2L), + ItemList.Electric_Pump_MV.get(1L), + GT_Utility.getIntegratedCircuit(9) + }, + new FluidStack(FluidRegistry.getFluid("liquid helium"), 2000), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorMV, 3L), + 320, + 120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get( + OrePrefixes.wireGt01, Materials.Titaniumonabariumdecacoppereikosaoxid, 6L), + GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Titanium, 4L), + ItemList.Electric_Pump_HV.get(1L), + GT_Utility.getIntegratedCircuit(9) + }, + new FluidStack(FluidRegistry.getFluid("liquid helium"), 4000), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorHV, 6L), + 320, + 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Uraniumtriplatinid, 9L), + GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.TungstenSteel, 6L), + ItemList.Electric_Pump_EV.get(1L), + GT_Utility.getIntegratedCircuit(9) + }, + new FluidStack(FluidRegistry.getFluid("liquid helium"), 6000), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorEV, 9L), + 320, + 1920); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Vanadiumtriindinid, 12L), + GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.NiobiumTitanium, 8L), + ItemList.Electric_Pump_IV.get(1L), + GT_Utility.getIntegratedCircuit(9) + }, + new FluidStack(FluidRegistry.getFluid("liquid helium"), 8000), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorIV, 12L), + 640, + 7680); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get( + OrePrefixes.wireGt01, + Materials.Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid, + 15L), + GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Enderium, 10L), + ItemList.Electric_Pump_LuV.get(1L), + GT_Utility.getIntegratedCircuit(9) + }, + new FluidStack(FluidRegistry.getFluid("liquid helium"), 12000), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorLuV, 15L), + 640, + 30720); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get( + OrePrefixes.wireGt01, Materials.Tetranaquadahdiindiumhexaplatiumosminid, 18L), + GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Naquadah, 12L), + ItemList.Electric_Pump_ZPM.get(1L), + GT_Utility.getIntegratedCircuit(9) + }, + new FluidStack(FluidRegistry.getFluid("liquid helium"), 16000), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorZPM, 18L), + 1280, + 122880); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get( + OrePrefixes.wireGt01, Materials.Longasssuperconductornameforuvwire, 21L), + GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Neutronium, 14L), + ItemList.Electric_Pump_UV.get(1L), + GT_Utility.getIntegratedCircuit(9) + }, + new FluidStack(FluidRegistry.getFluid("liquid helium"), 20000), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUV, 21L), + 1280, + 491520); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get( + OrePrefixes.wireGt01, Materials.Longasssuperconductornameforuhvwire, 24L), + GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Bedrockium, 16L), + ItemList.Electric_Pump_UHV.get(1L), + GT_Utility.getIntegratedCircuit(9) + }, + new FluidStack(FluidRegistry.getFluid("liquid helium"), 24000), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUHV, 24L), + 2560, + 1966080); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUEVBase, 27L), + GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Infinity, 18L), + ItemList.Electric_Pump_UEV.get(1L), + GT_Utility.getIntegratedCircuit(9) + }, + new FluidStack(FluidRegistry.getFluid("liquid helium"), 28000), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUEV, 27L), + 3200, + 7864320); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUMVBase, 33L), + GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.SpaceTime, 22L), + ItemList.Electric_Pump_UMV.get(1L), + GT_Utility.getIntegratedCircuit(9) + }, + new FluidStack(FluidRegistry.getFluid("liquid helium"), 36000), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUMV, 33L), + 3200, + 125829120); } - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, Materials.IronMagnetic, 1L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Lead, 16L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.ULV_Coil.get(1L), 200, 8); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, Materials.IronMagnetic, 1L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Steel, 16L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.LV_Coil.get(1L), 200, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, Materials.SteelMagnetic, 1L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Aluminium, 16L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.MV_Coil.get(1L), 200, 120); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, Materials.SteelMagnetic, 1L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.EnergeticAlloy, 16L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.HV_Coil.get(1L), 200, 480); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, Materials.NeodymiumMagnetic, 1L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.TungstenSteel, 16L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.EV_Coil.get(1L), 200, 1920); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, Materials.NeodymiumMagnetic, 1L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Iridium, 16L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.IV_Coil.get(1L), 200, 7680); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, Materials.SamariumMagnetic, 1L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Osmiridium, 16L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.LuV_Coil.get(1L), 200, 30720); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, Materials.SamariumMagnetic, 1L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Europium, 16L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.ZPM_Coil.get(1L), 200, 122880); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, Materials.SamariumMagnetic, 1L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.ElectrumFlux, 16L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.UV_Coil.get(1L), 200, 500000); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, Materials.SamariumMagnetic, 1L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Tritanium, 16L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.UHV_Coil.get(1L), 200, 2000000); - - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Wood, 6L), GT_Utility.getIntegratedCircuit(2)}, Materials.Glue.getFluid(10), GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Wood, 2L), 200, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Wood, 3L), GT_Utility.getIntegratedCircuit(4)}, Materials.Glue.getFluid(20), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Wood, 4L), 200, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Wood, 1L), GT_Utility.getIntegratedCircuit(12)}, Materials.Glue.getFluid(60), GT_OreDictUnificator.get(OrePrefixes.pipeSmall, Materials.Wood, 6L), 200, 30); - - GT_Values.RA.addUniversalDistillationRecipewithCircuit(Materials.OilLight.getFluid(150), new ItemStack[]{GT_Utility.getIntegratedCircuit(1)}, new FluidStack[]{Materials.SulfuricHeavyFuel.getFluid(10), Materials.SulfuricLightFuel.getFluid(20), Materials.SulfuricNaphtha.getFluid(30), Materials.SulfuricGas.getGas(240)}, null, 20, 96); - GT_Values.RA.addUniversalDistillationRecipewithCircuit(Materials.OilMedium.getFluid(100), new ItemStack[]{GT_Utility.getIntegratedCircuit(1)}, new FluidStack[]{Materials.SulfuricHeavyFuel.getFluid(15), Materials.SulfuricLightFuel.getFluid(50), Materials.SulfuricNaphtha.getFluid(20), Materials.SulfuricGas.getGas(60)}, null, 20, 96); - GT_Values.RA.addUniversalDistillationRecipewithCircuit(Materials.Oil.getFluid(50L), new ItemStack[]{GT_Utility.getIntegratedCircuit(1)}, new FluidStack[]{Materials.SulfuricHeavyFuel.getFluid(15), Materials.SulfuricLightFuel.getFluid(50), Materials.SulfuricNaphtha.getFluid(20), Materials.SulfuricGas.getGas(60)}, null, 20, 96); - GT_Values.RA.addUniversalDistillationRecipewithCircuit(Materials.OilHeavy.getFluid(100), new ItemStack[]{GT_Utility.getIntegratedCircuit(1)}, new FluidStack[]{Materials.SulfuricHeavyFuel.getFluid(250), Materials.SulfuricLightFuel.getFluid(45), Materials.SulfuricNaphtha.getFluid(15), Materials.SulfuricGas.getGas(60)}, null, 20, 288); - - if (GregTech_API.sSpecialFile.get("general", "EnableLagencyOilGalactiCraft", false) && FluidRegistry.getFluid("oilgc") != null) - GT_Values.RA.addUniversalDistillationRecipe(new FluidStack(FluidRegistry.getFluid("oilgc"), 50), new FluidStack[]{Materials.SulfuricHeavyFuel.getFluid(15), Materials.SulfuricLightFuel.getFluid(50), Materials.SulfuricNaphtha.getFluid(20), Materials.SulfuricGas.getGas(60)}, null, 20, 96); - - GT_Values.RA.addDistilleryRecipe(GT_Utility.getIntegratedCircuit(1), new FluidStack(ItemList.sOilExtraHeavy, 10), Materials.OilHeavy.getFluid(15), 16, 24, false); - GT_Values.RA.addDistilleryRecipe(GT_Utility.getIntegratedCircuit(1), Materials.HeavyFuel.getFluid(10L), new FluidStack(ItemList.sToluene, 4), 16, 24, false); - GT_Values.RA.addDistilleryRecipe(GT_Utility.getIntegratedCircuit(1), new FluidStack(ItemList.sToluene, 30), Materials.LightFuel.getFluid(30L), 16, 24, false); - - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ball.get(0L), Materials.Glass.getMolten(144), ItemList.Circuit_Parts_Glass_Tube.get(1), 200, 24); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ball.get(0L), Materials.ReinforceGlass.getFluid(288), ItemList.Circuit_Parts_Reinforced_Glass_Tube.get(1), 200, 240); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ball.get(0L), FluidRegistry.getFluidStack("glass.molten", 1000), ItemList.Circuit_Parts_Glass_Tube.get(1), 200, 24); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ball.get(0L), new FluidStack(ItemList.sToluene, 100), ItemList.GelledToluene.get(1), 100, 16); - - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Nugget.get(0L), Materials.AnnealedCopper.getMolten(16), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Copper, 1L), 16, 4); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ingot.get(0L), Materials.AnnealedCopper.getMolten(144), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Copper, 1L), 32, 8); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0L), Materials.AnnealedCopper.getMolten(1296), GT_OreDictUnificator.get(OrePrefixes.block, Materials.Copper, 1L), 288, 8); - - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Nugget.get(0L), Materials.WroughtIron.getMolten(16), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Iron, 1L), 16, 4); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ingot.get(0L), Materials.WroughtIron.getMolten(144), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iron, 1L), 32, 8); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0L), Materials.WroughtIron.getMolten(1296), GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), 288, 8); - - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricAcid, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.NitricAcid.getFluid(1000L), new FluidStack(ItemList.sNitrationMixture, 2000), ItemList.Cell_Empty.get(1), 480, 2); - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricAcid, 1), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NitricAcid, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NitrationMixture, 2), 480, 2); - GT_Values.RA.addChemicalRecipe(new ItemStack(Items.sugar), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Plastic, 1), new FluidStack(ItemList.sToluene, 133), GT_Values.NF, ItemList.GelledToluene.get(2), 140, 192); - GT_Values.RA.addChemicalRecipe(new ItemStack(Items.sugar, 9), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 1), new FluidStack(ItemList.sToluene, 1197), GT_Values.NF, ItemList.GelledToluene.get(18), 1260, 192); - GT_Values.RA.addChemicalRecipe(ItemList.GelledToluene.get(4), GT_Utility.getIntegratedCircuit(1), Materials.SulfuricAcid.getFluid(250), GT_Values.NF, new ItemStack(Blocks.tnt, 1), 200, 24); - GT_Values.RA.addChemicalRecipe(ItemList.GelledToluene.get(4), GT_Utility.getIntegratedCircuit(1), new FluidStack(ItemList.sNitrationMixture, 200), Materials.DilutedSulfuricAcid.getFluid(150), GT_ModHandler.getIC2Item("industrialTnt", 1L), 80, 480); - - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2L), GT_Utility.getIntegratedCircuit(4), Materials.NatruralGas.getGas(16000), Materials.Gas.getGas(16000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydricSulfide, 1L), Materials.Empty.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NatruralGas, 16L), GT_Utility.getIntegratedCircuit(4), Materials.Hydrogen.getGas(2000), Materials.HydricSulfide.getGas(1000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Gas, 16L), 160); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2L), GT_Utility.getIntegratedCircuit(4), Materials.SulfuricGas.getGas(16000), Materials.Gas.getGas(16000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydricSulfide, 1L), Materials.Empty.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricGas, 16L), GT_Utility.getIntegratedCircuit(4), Materials.Hydrogen.getGas(2000), Materials.HydricSulfide.getGas(1000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Gas, 16L), 160); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2L), GT_Utility.getIntegratedCircuit(4), Materials.SulfuricNaphtha.getFluid(12000), Materials.Naphtha.getFluid(12000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydricSulfide, 1L), Materials.Empty.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricNaphtha, 12L), GT_Utility.getIntegratedCircuit(4), Materials.Hydrogen.getGas(2000), Materials.HydricSulfide.getGas(1000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Naphtha, 12L), 160); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2L), GT_Utility.getIntegratedCircuit(4), Materials.SulfuricLightFuel.getFluid(12000), Materials.LightFuel.getFluid(12000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydricSulfide, 1L), Materials.Empty.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricLightFuel, 12L), GT_Utility.getIntegratedCircuit(4), Materials.Hydrogen.getGas(2000), Materials.HydricSulfide.getGas(1000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LightFuel, 12L), 160); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2L), GT_Utility.getIntegratedCircuit(4), Materials.SulfuricHeavyFuel.getFluid(8000), Materials.HeavyFuel.getFluid(8000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydricSulfide, 1L), Materials.Empty.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricHeavyFuel, 8L), GT_Utility.getIntegratedCircuit(4), Materials.Hydrogen.getGas(2000), Materials.HydricSulfide.getGas(1000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HeavyFuel, 8L), 160); - - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 1L), GT_Utility.getIntegratedCircuit(1), Materials.Naphtha.getFluid(576), Materials.Polycaprolactam.getMolten(1296), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Potassium, 1), 640); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 9L), GT_Utility.getIntegratedCircuit(9), Materials.Naphtha.getFluid(5184), Materials.Polycaprolactam.getMolten(11664), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Potassium, 1), 5760); - GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Polycaprolactam, 1L), new ItemStack(Items.string, 32), 80, 48); - - GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.EnergeticAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.EnergeticAlloy, 4L), 200, 16); - GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.EnergeticAlloy, 1L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.EnergeticAlloy, 8L), 400, 30); - GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iridium, 1L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Iridium, 4L), 200, 16); - GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iridium, 1L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Iridium, 8L), 400, 30); - GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Osmiridium, 1L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Osmiridium, 4L), 200, 16); - GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Osmiridium, 1L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Osmiridium, 8L), 400, 30); - GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Europium, 1L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Europium, 4L), 200, 16); - GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Europium, 1L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Europium, 8L), 400, 30); - GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Neutronium, 1L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Neutronium, 4L), 200, 16); - GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Neutronium, 1L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Neutronium, 8L), 400, 30); - GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Americium, 1L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 4L), 200, 16); - GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Americium, 1L), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 8L), 400, 30); - GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.SpaceTime, 1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SpaceTime, 2L), 400, 32000); - - GT_Values.RA.addDistilleryRecipe(GT_Utility.getIntegratedCircuit(24), Materials.Creosote.getFluid(100L), Materials.Lubricant.getFluid(32L), 240, 30, false); - GT_Values.RA.addDistilleryRecipe(GT_Utility.getIntegratedCircuit(24), Materials.SeedOil.getFluid(32L), Materials.Lubricant.getFluid(8L), 80, 30, false); - GT_Values.RA.addDistilleryRecipe(GT_Utility.getIntegratedCircuit(24), Materials.FishOil.getFluid(32L), Materials.Lubricant.getFluid(8L), 80, 30, false); - GT_Values.RA.addDistilleryRecipe(GT_Utility.getIntegratedCircuit(24), Materials.Oil.getFluid(120L), Materials.Lubricant.getFluid(60L), 160, 30, false); - GT_Values.RA.addDistilleryRecipe(GT_Utility.getIntegratedCircuit(1), Materials.Biomass.getFluid(40L), Materials.Ethanol.getFluid(12L), 16, 24, false); - GT_Values.RA.addDistilleryRecipe(GT_Utility.getIntegratedCircuit(5), Materials.Biomass.getFluid(40L), Materials.Water.getFluid(12L), 16, 24, false); - GT_Values.RA.addDistilleryRecipe(GT_Utility.getIntegratedCircuit(5), Materials.Water.getFluid(5L), GT_ModHandler.getDistilledWater(5L), 16, 10, false); - GT_Values.RA.addDistilleryRecipe(GT_Utility.getIntegratedCircuit(1), FluidRegistry.getFluidStack("potion.potatojuice", 2), FluidRegistry.getFluidStack("potion.vodka", 1), 16, 16, true); - GT_Values.RA.addDistilleryRecipe(GT_Utility.getIntegratedCircuit(1), FluidRegistry.getFluidStack("potion.lemonade", 2), FluidRegistry.getFluidStack("potion.alcopops", 1), 16, 16, true); - - GT_Values.RA.addDistilleryRecipe(GT_Utility.getIntegratedCircuit(4), Materials.OilLight.getFluid(300L), Materials.Oil.getFluid(100L), 16, 24, false); - GT_Values.RA.addDistilleryRecipe(GT_Utility.getIntegratedCircuit(4), Materials.OilMedium.getFluid(200L), Materials.Oil.getFluid(100L), 16, 24, false); - GT_Values.RA.addDistilleryRecipe(GT_Utility.getIntegratedCircuit(4), Materials.OilHeavy.getFluid(100L), Materials.Oil.getFluid(100L), 16, 24, false); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.IronMagnetic, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Lead, 16L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.ULV_Coil.get(1L), + 200, + 8); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.IronMagnetic, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Steel, 16L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.LV_Coil.get(1L), + 200, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.SteelMagnetic, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Aluminium, 16L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.MV_Coil.get(1L), + 200, + 120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.SteelMagnetic, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.EnergeticAlloy, 16L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.HV_Coil.get(1L), + 200, + 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.NeodymiumMagnetic, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.TungstenSteel, 16L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.EV_Coil.get(1L), + 200, + 1920); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.NeodymiumMagnetic, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Iridium, 16L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.IV_Coil.get(1L), + 200, + 7680); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.SamariumMagnetic, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Osmiridium, 16L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.LuV_Coil.get(1L), + 200, + 30720); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.SamariumMagnetic, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Europium, 16L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.ZPM_Coil.get(1L), + 200, + 122880); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.SamariumMagnetic, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.ElectrumFlux, 16L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.UV_Coil.get(1L), + 200, + 500000); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.SamariumMagnetic, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Tritanium, 16L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.UHV_Coil.get(1L), + 200, + 2000000); + + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Wood, 6L), GT_Utility.getIntegratedCircuit(2) + }, + Materials.Glue.getFluid(10), + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Wood, 2L), + 200, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Wood, 3L), GT_Utility.getIntegratedCircuit(4) + }, + Materials.Glue.getFluid(20), + GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Wood, 4L), + 200, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Wood, 1L), GT_Utility.getIntegratedCircuit(12) + }, + Materials.Glue.getFluid(60), + GT_OreDictUnificator.get(OrePrefixes.pipeSmall, Materials.Wood, 6L), + 200, + 30); + + GT_Values.RA.addUniversalDistillationRecipewithCircuit( + Materials.OilLight.getFluid(150), + new ItemStack[] {GT_Utility.getIntegratedCircuit(1)}, + new FluidStack[] { + Materials.SulfuricHeavyFuel.getFluid(10), + Materials.SulfuricLightFuel.getFluid(20), + Materials.SulfuricNaphtha.getFluid(30), + Materials.SulfuricGas.getGas(240) + }, + null, + 20, + 96); + GT_Values.RA.addUniversalDistillationRecipewithCircuit( + Materials.OilMedium.getFluid(100), + new ItemStack[] {GT_Utility.getIntegratedCircuit(1)}, + new FluidStack[] { + Materials.SulfuricHeavyFuel.getFluid(15), + Materials.SulfuricLightFuel.getFluid(50), + Materials.SulfuricNaphtha.getFluid(20), + Materials.SulfuricGas.getGas(60) + }, + null, + 20, + 96); + GT_Values.RA.addUniversalDistillationRecipewithCircuit( + Materials.Oil.getFluid(50L), + new ItemStack[] {GT_Utility.getIntegratedCircuit(1)}, + new FluidStack[] { + Materials.SulfuricHeavyFuel.getFluid(15), + Materials.SulfuricLightFuel.getFluid(50), + Materials.SulfuricNaphtha.getFluid(20), + Materials.SulfuricGas.getGas(60) + }, + null, + 20, + 96); + GT_Values.RA.addUniversalDistillationRecipewithCircuit( + Materials.OilHeavy.getFluid(100), + new ItemStack[] {GT_Utility.getIntegratedCircuit(1)}, + new FluidStack[] { + Materials.SulfuricHeavyFuel.getFluid(250), + Materials.SulfuricLightFuel.getFluid(45), + Materials.SulfuricNaphtha.getFluid(15), + Materials.SulfuricGas.getGas(60) + }, + null, + 20, + 288); + + if (GregTech_API.sSpecialFile.get("general", "EnableLagencyOilGalactiCraft", false) + && FluidRegistry.getFluid("oilgc") != null) + GT_Values.RA.addUniversalDistillationRecipe( + new FluidStack(FluidRegistry.getFluid("oilgc"), 50), + new FluidStack[] { + Materials.SulfuricHeavyFuel.getFluid(15), + Materials.SulfuricLightFuel.getFluid(50), + Materials.SulfuricNaphtha.getFluid(20), + Materials.SulfuricGas.getGas(60) + }, + null, + 20, + 96); + + GT_Values.RA.addDistilleryRecipe( + GT_Utility.getIntegratedCircuit(1), + new FluidStack(ItemList.sOilExtraHeavy, 10), + Materials.OilHeavy.getFluid(15), + 16, + 24, + false); + GT_Values.RA.addDistilleryRecipe( + GT_Utility.getIntegratedCircuit(1), + Materials.HeavyFuel.getFluid(10L), + new FluidStack(ItemList.sToluene, 4), + 16, + 24, + false); + GT_Values.RA.addDistilleryRecipe( + GT_Utility.getIntegratedCircuit(1), + new FluidStack(ItemList.sToluene, 30), + Materials.LightFuel.getFluid(30L), + 16, + 24, + false); + + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Ball.get(0L), + Materials.Glass.getMolten(144), + ItemList.Circuit_Parts_Glass_Tube.get(1), + 200, + 24); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Ball.get(0L), + Materials.ReinforceGlass.getFluid(288), + ItemList.Circuit_Parts_Reinforced_Glass_Tube.get(1), + 200, + 240); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Ball.get(0L), + FluidRegistry.getFluidStack("glass.molten", 1000), + ItemList.Circuit_Parts_Glass_Tube.get(1), + 200, + 24); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Ball.get(0L), + new FluidStack(ItemList.sToluene, 100), + ItemList.GelledToluene.get(1), + 100, + 16); + + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Nugget.get(0L), + Materials.AnnealedCopper.getMolten(16), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Copper, 1L), + 16, + 4); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Ingot.get(0L), + Materials.AnnealedCopper.getMolten(144), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Copper, 1L), + 32, + 8); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Block.get(0L), + Materials.AnnealedCopper.getMolten(1296), + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Copper, 1L), + 288, + 8); + + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Nugget.get(0L), + Materials.WroughtIron.getMolten(16), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Iron, 1L), + 16, + 4); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Ingot.get(0L), + Materials.WroughtIron.getMolten(144), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iron, 1L), + 32, + 8); + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Block.get(0L), + Materials.WroughtIron.getMolten(1296), + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), + 288, + 8); + + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricAcid, 1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.NitricAcid.getFluid(1000L), + new FluidStack(ItemList.sNitrationMixture, 2000), + ItemList.Cell_Empty.get(1), + 480, + 2); + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricAcid, 1), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NitricAcid, 1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NitrationMixture, 2), + 480, + 2); + GT_Values.RA.addChemicalRecipe( + new ItemStack(Items.sugar), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Plastic, 1), + new FluidStack(ItemList.sToluene, 133), + GT_Values.NF, + ItemList.GelledToluene.get(2), + 140, + 192); + GT_Values.RA.addChemicalRecipe( + new ItemStack(Items.sugar, 9), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 1), + new FluidStack(ItemList.sToluene, 1197), + GT_Values.NF, + ItemList.GelledToluene.get(18), + 1260, + 192); + GT_Values.RA.addChemicalRecipe( + ItemList.GelledToluene.get(4), + GT_Utility.getIntegratedCircuit(1), + Materials.SulfuricAcid.getFluid(250), + GT_Values.NF, + new ItemStack(Blocks.tnt, 1), + 200, + 24); + GT_Values.RA.addChemicalRecipe( + ItemList.GelledToluene.get(4), + GT_Utility.getIntegratedCircuit(1), + new FluidStack(ItemList.sNitrationMixture, 200), + Materials.DilutedSulfuricAcid.getFluid(150), + GT_ModHandler.getIC2Item("industrialTnt", 1L), + 80, + 480); + + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2L), + GT_Utility.getIntegratedCircuit(4), + Materials.NatruralGas.getGas(16000), + Materials.Gas.getGas(16000), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydricSulfide, 1L), + Materials.Empty.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NatruralGas, 16L), + GT_Utility.getIntegratedCircuit(4), + Materials.Hydrogen.getGas(2000), + Materials.HydricSulfide.getGas(1000), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Gas, 16L), + 160); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2L), + GT_Utility.getIntegratedCircuit(4), + Materials.SulfuricGas.getGas(16000), + Materials.Gas.getGas(16000), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydricSulfide, 1L), + Materials.Empty.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricGas, 16L), + GT_Utility.getIntegratedCircuit(4), + Materials.Hydrogen.getGas(2000), + Materials.HydricSulfide.getGas(1000), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Gas, 16L), + 160); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2L), + GT_Utility.getIntegratedCircuit(4), + Materials.SulfuricNaphtha.getFluid(12000), + Materials.Naphtha.getFluid(12000), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydricSulfide, 1L), + Materials.Empty.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricNaphtha, 12L), + GT_Utility.getIntegratedCircuit(4), + Materials.Hydrogen.getGas(2000), + Materials.HydricSulfide.getGas(1000), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Naphtha, 12L), + 160); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2L), + GT_Utility.getIntegratedCircuit(4), + Materials.SulfuricLightFuel.getFluid(12000), + Materials.LightFuel.getFluid(12000), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydricSulfide, 1L), + Materials.Empty.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricLightFuel, 12L), + GT_Utility.getIntegratedCircuit(4), + Materials.Hydrogen.getGas(2000), + Materials.HydricSulfide.getGas(1000), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LightFuel, 12L), + 160); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2L), + GT_Utility.getIntegratedCircuit(4), + Materials.SulfuricHeavyFuel.getFluid(8000), + Materials.HeavyFuel.getFluid(8000), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydricSulfide, 1L), + Materials.Empty.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricHeavyFuel, 8L), + GT_Utility.getIntegratedCircuit(4), + Materials.Hydrogen.getGas(2000), + Materials.HydricSulfide.getGas(1000), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HeavyFuel, 8L), + 160); + + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 1L), + GT_Utility.getIntegratedCircuit(1), + Materials.Naphtha.getFluid(576), + Materials.Polycaprolactam.getMolten(1296), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Potassium, 1), + 640); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 9L), + GT_Utility.getIntegratedCircuit(9), + Materials.Naphtha.getFluid(5184), + Materials.Polycaprolactam.getMolten(11664), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Potassium, 1), + 5760); + GT_Values.RA.addWiremillRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Polycaprolactam, 1L), + new ItemStack(Items.string, 32), + 80, + 48); + + GT_Values.RA.addWiremillRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.EnergeticAlloy, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.EnergeticAlloy, 4L), + 200, + 16); + GT_Values.RA.addWiremillRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.EnergeticAlloy, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.EnergeticAlloy, 8L), + 400, + 30); + GT_Values.RA.addWiremillRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iridium, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Iridium, 4L), + 200, + 16); + GT_Values.RA.addWiremillRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iridium, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Iridium, 8L), + 400, + 30); + GT_Values.RA.addWiremillRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Osmiridium, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Osmiridium, 4L), + 200, + 16); + GT_Values.RA.addWiremillRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Osmiridium, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Osmiridium, 8L), + 400, + 30); + GT_Values.RA.addWiremillRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Europium, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Europium, 4L), + 200, + 16); + GT_Values.RA.addWiremillRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Europium, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Europium, 8L), + 400, + 30); + GT_Values.RA.addWiremillRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Neutronium, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Neutronium, 4L), + 200, + 16); + GT_Values.RA.addWiremillRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Neutronium, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Neutronium, 8L), + 400, + 30); + GT_Values.RA.addWiremillRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Americium, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 4L), + 200, + 16); + GT_Values.RA.addWiremillRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Americium, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 8L), + 400, + 30); + GT_Values.RA.addWiremillRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.SpaceTime, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SpaceTime, 2L), + 400, + 32000); + + GT_Values.RA.addDistilleryRecipe( + GT_Utility.getIntegratedCircuit(24), + Materials.Creosote.getFluid(100L), + Materials.Lubricant.getFluid(32L), + 240, + 30, + false); + GT_Values.RA.addDistilleryRecipe( + GT_Utility.getIntegratedCircuit(24), + Materials.SeedOil.getFluid(32L), + Materials.Lubricant.getFluid(8L), + 80, + 30, + false); + GT_Values.RA.addDistilleryRecipe( + GT_Utility.getIntegratedCircuit(24), + Materials.FishOil.getFluid(32L), + Materials.Lubricant.getFluid(8L), + 80, + 30, + false); + GT_Values.RA.addDistilleryRecipe( + GT_Utility.getIntegratedCircuit(24), + Materials.Oil.getFluid(120L), + Materials.Lubricant.getFluid(60L), + 160, + 30, + false); + GT_Values.RA.addDistilleryRecipe( + GT_Utility.getIntegratedCircuit(1), + Materials.Biomass.getFluid(40L), + Materials.Ethanol.getFluid(12L), + 16, + 24, + false); + GT_Values.RA.addDistilleryRecipe( + GT_Utility.getIntegratedCircuit(5), + Materials.Biomass.getFluid(40L), + Materials.Water.getFluid(12L), + 16, + 24, + false); + GT_Values.RA.addDistilleryRecipe( + GT_Utility.getIntegratedCircuit(5), + Materials.Water.getFluid(5L), + GT_ModHandler.getDistilledWater(5L), + 16, + 10, + false); + GT_Values.RA.addDistilleryRecipe( + GT_Utility.getIntegratedCircuit(1), + FluidRegistry.getFluidStack("potion.potatojuice", 2), + FluidRegistry.getFluidStack("potion.vodka", 1), + 16, + 16, + true); + GT_Values.RA.addDistilleryRecipe( + GT_Utility.getIntegratedCircuit(1), + FluidRegistry.getFluidStack("potion.lemonade", 2), + FluidRegistry.getFluidStack("potion.alcopops", 1), + 16, + 16, + true); + + GT_Values.RA.addDistilleryRecipe( + GT_Utility.getIntegratedCircuit(4), + Materials.OilLight.getFluid(300L), + Materials.Oil.getFluid(100L), + 16, + 24, + false); + GT_Values.RA.addDistilleryRecipe( + GT_Utility.getIntegratedCircuit(4), + Materials.OilMedium.getFluid(200L), + Materials.Oil.getFluid(100L), + 16, + 24, + false); + GT_Values.RA.addDistilleryRecipe( + GT_Utility.getIntegratedCircuit(4), + Materials.OilHeavy.getFluid(100L), + Materials.Oil.getFluid(100L), + 16, + 24, + false); if (Loader.isModLoaded("TConstruct")) { - GT_Values.RA.addDistilleryRecipe(GT_Utility.getIntegratedCircuit(1), Materials.Glue.getFluid(8L), FluidRegistry.getFluidStack("glue", 8), 1, 24, false); - GT_Values.RA.addDistilleryRecipe(GT_Utility.getIntegratedCircuit(1), FluidRegistry.getFluidStack("glue", 8), Materials.Glue.getFluid(4L), 1, 24, false); + GT_Values.RA.addDistilleryRecipe( + GT_Utility.getIntegratedCircuit(1), + Materials.Glue.getFluid(8L), + FluidRegistry.getFluidStack("glue", 8), + 1, + 24, + false); + GT_Values.RA.addDistilleryRecipe( + GT_Utility.getIntegratedCircuit(1), + FluidRegistry.getFluidStack("glue", 8), + Materials.Glue.getFluid(4L), + 1, + 24, + false); } - GT_Values.RA.addFluidHeaterRecipe(GT_Utility.getIntegratedCircuit(1), Materials.Water.getFluid(6L), Materials.Water.getGas(960L), 30, 30); - GT_Values.RA.addFluidHeaterRecipe(GT_Utility.getIntegratedCircuit(1), GT_ModHandler.getDistilledWater(6L), Materials.Water.getGas(960L), 30, 30); - GT_Values.RA.addFluidHeaterRecipe(GT_Utility.getIntegratedCircuit(1), Materials.SeedOil.getFluid(16L), Materials.FryingOilHot.getFluid(16L), 16, 30); - GT_Values.RA.addFluidHeaterRecipe(GT_Utility.getIntegratedCircuit(1), Materials.FishOil.getFluid(16L), Materials.FryingOilHot.getFluid(16L), 16, 30); - - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Talc, 1L), FluidRegistry.getFluid("oil"), FluidRegistry.getFluid("lubricant"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Soapstone, 1L), FluidRegistry.getFluid("oil"), FluidRegistry.getFluid("lubricant"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), FluidRegistry.getFluid("oil"), FluidRegistry.getFluid("lubricant"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Talc, 1L), FluidRegistry.getFluid("creosote"), FluidRegistry.getFluid("lubricant"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Soapstone, 1L), FluidRegistry.getFluid("creosote"), FluidRegistry.getFluid("lubricant"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), FluidRegistry.getFluid("creosote"), FluidRegistry.getFluid("lubricant"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Talc, 1L), FluidRegistry.getFluid("seedoil"), FluidRegistry.getFluid("lubricant"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Soapstone, 1L), FluidRegistry.getFluid("seedoil"), FluidRegistry.getFluid("lubricant"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), FluidRegistry.getFluid("seedoil"), FluidRegistry.getFluid("lubricant"), false); - for (Fluid tFluid : new Fluid[]{FluidRegistry.WATER, GT_ModHandler.getDistilledWater(1L).getFluid()}) { - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Milk, 1L), tFluid, FluidRegistry.getFluid("milk"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wheat, 1L), tFluid, FluidRegistry.getFluid("potion.wheatyjuice"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Potassium, 1L), tFluid, FluidRegistry.getFluid("potion.mineralwater"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L), tFluid, FluidRegistry.getFluid("potion.mineralwater"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcium, 1L), tFluid, FluidRegistry.getFluid("potion.mineralwater"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesium, 1L), tFluid, FluidRegistry.getFluid("potion.mineralwater"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), tFluid, FluidRegistry.getFluid("potion.thick"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), tFluid, FluidRegistry.getFluid("potion.mundane"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L), tFluid, FluidRegistry.getFluid("potion.mundane"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Blaze, 1L), tFluid, FluidRegistry.getFluid("potion.mundane"), false); - GT_Values.RA.addBrewingRecipe(new ItemStack(Items.magma_cream, 1, 0), tFluid, FluidRegistry.getFluid("potion.mundane"), false); - GT_Values.RA.addBrewingRecipe(new ItemStack(Items.fermented_spider_eye, 1, 0), tFluid, FluidRegistry.getFluid("potion.mundane"), false); - GT_Values.RA.addBrewingRecipe(new ItemStack(Items.spider_eye, 1, 0), tFluid, FluidRegistry.getFluid("potion.mundane"), false); - GT_Values.RA.addBrewingRecipe(new ItemStack(Items.speckled_melon, 1, 0), tFluid, FluidRegistry.getFluid("potion.mundane"), false); - GT_Values.RA.addBrewingRecipe(new ItemStack(Items.ghast_tear, 1, 0), tFluid, FluidRegistry.getFluid("potion.mundane"), false); - GT_Values.RA.addBrewingRecipe(new ItemStack(Items.nether_wart, 1, 0), tFluid, FluidRegistry.getFluid("potion.awkward"), false); - GT_Values.RA.addBrewingRecipe(new ItemStack(Blocks.red_mushroom, 1, 0), tFluid, FluidRegistry.getFluid("potion.poison"), false); - GT_Values.RA.addBrewingRecipe(new ItemStack(Items.fish, 1, 3), tFluid, FluidRegistry.getFluid("potion.poison.strong"), true); - GT_Values.RA.addBrewingRecipe(ItemList.IC2_Grin_Powder.get(1L), tFluid, FluidRegistry.getFluid("potion.poison.strong"), false); - GT_Values.RA.addBrewingRecipe(new ItemStack(Items.reeds, 1, 0), tFluid, FluidRegistry.getFluid("potion.reedwater"), false); - GT_Values.RA.addBrewingRecipe(new ItemStack(Items.apple, 1, 0), tFluid, FluidRegistry.getFluid("potion.applejuice"), false); - GT_Values.RA.addBrewingRecipe(new ItemStack(Items.golden_apple, 1, 0), tFluid, FluidRegistry.getFluid("potion.goldenapplejuice"), true); - GT_Values.RA.addBrewingRecipe(new ItemStack(Items.golden_apple, 1, 1), tFluid, FluidRegistry.getFluid("potion.idunsapplejuice"), true); - GT_Values.RA.addBrewingRecipe(ItemList.IC2_Hops.get(1L), tFluid, FluidRegistry.getFluid("potion.hopsjuice"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coffee, 1L), tFluid, FluidRegistry.getFluid("potion.darkcoffee"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chili, 1L), tFluid, FluidRegistry.getFluid("potion.chillysauce"), false); - - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(2L), 200); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TricalciumPhosphate, 1L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(3L), 300); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphate, 1L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(2L), 200); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 3L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(1L), 100); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 1L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(1L), 100); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(3L), 300); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TricalciumPhosphate, 1L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(4L), 400); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphate, 1L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(3L), 300); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 3L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(2L), 200); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 1L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(2L), 200); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Apatite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(3L), 300); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Apatite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TricalciumPhosphate, 1L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(4L), 400); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Apatite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphate, 1L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(3L), 300); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Apatite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 3L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(2L), 200); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Apatite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 1L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(2L), 200); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glauconite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(3L), 300); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glauconite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TricalciumPhosphate, 1L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(4L), 400); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glauconite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphate, 1L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(3L), 300); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glauconite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 3L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(2L), 200); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glauconite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 1L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(2L), 200); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.GlauconiteSand, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(3L), 300); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.GlauconiteSand, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TricalciumPhosphate, 1L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(4L), 400); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.GlauconiteSand, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphate, 1L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(3L), 300); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.GlauconiteSand, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 3L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(2L), 200); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.GlauconiteSand, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 1L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(2L), 200); + GT_Values.RA.addFluidHeaterRecipe( + GT_Utility.getIntegratedCircuit(1), Materials.Water.getFluid(6L), Materials.Water.getGas(960L), 30, 30); + GT_Values.RA.addFluidHeaterRecipe( + GT_Utility.getIntegratedCircuit(1), + GT_ModHandler.getDistilledWater(6L), + Materials.Water.getGas(960L), + 30, + 30); + GT_Values.RA.addFluidHeaterRecipe( + GT_Utility.getIntegratedCircuit(1), + Materials.SeedOil.getFluid(16L), + Materials.FryingOilHot.getFluid(16L), + 16, + 30); + GT_Values.RA.addFluidHeaterRecipe( + GT_Utility.getIntegratedCircuit(1), + Materials.FishOil.getFluid(16L), + Materials.FryingOilHot.getFluid(16L), + 16, + 30); + + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Talc, 1L), + FluidRegistry.getFluid("oil"), + FluidRegistry.getFluid("lubricant"), + false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Soapstone, 1L), + FluidRegistry.getFluid("oil"), + FluidRegistry.getFluid("lubricant"), + false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), + FluidRegistry.getFluid("oil"), + FluidRegistry.getFluid("lubricant"), + false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Talc, 1L), + FluidRegistry.getFluid("creosote"), + FluidRegistry.getFluid("lubricant"), + false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Soapstone, 1L), + FluidRegistry.getFluid("creosote"), + FluidRegistry.getFluid("lubricant"), + false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), + FluidRegistry.getFluid("creosote"), + FluidRegistry.getFluid("lubricant"), + false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Talc, 1L), + FluidRegistry.getFluid("seedoil"), + FluidRegistry.getFluid("lubricant"), + false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Soapstone, 1L), + FluidRegistry.getFluid("seedoil"), + FluidRegistry.getFluid("lubricant"), + false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), + FluidRegistry.getFluid("seedoil"), + FluidRegistry.getFluid("lubricant"), + false); + for (Fluid tFluid : new Fluid[] { + FluidRegistry.WATER, GT_ModHandler.getDistilledWater(1L).getFluid() + }) { + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Milk, 1L), + tFluid, + FluidRegistry.getFluid("milk"), + false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wheat, 1L), + tFluid, + FluidRegistry.getFluid("potion.wheatyjuice"), + false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Potassium, 1L), + tFluid, + FluidRegistry.getFluid("potion.mineralwater"), + false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L), + tFluid, + FluidRegistry.getFluid("potion.mineralwater"), + false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcium, 1L), + tFluid, + FluidRegistry.getFluid("potion.mineralwater"), + false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesium, 1L), + tFluid, + FluidRegistry.getFluid("potion.mineralwater"), + false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), + tFluid, + FluidRegistry.getFluid("potion.thick"), + false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), + tFluid, + FluidRegistry.getFluid("potion.mundane"), + false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L), + tFluid, + FluidRegistry.getFluid("potion.mundane"), + false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Blaze, 1L), + tFluid, + FluidRegistry.getFluid("potion.mundane"), + false); + GT_Values.RA.addBrewingRecipe( + new ItemStack(Items.magma_cream, 1, 0), tFluid, FluidRegistry.getFluid("potion.mundane"), false); + GT_Values.RA.addBrewingRecipe( + new ItemStack(Items.fermented_spider_eye, 1, 0), + tFluid, + FluidRegistry.getFluid("potion.mundane"), + false); + GT_Values.RA.addBrewingRecipe( + new ItemStack(Items.spider_eye, 1, 0), tFluid, FluidRegistry.getFluid("potion.mundane"), false); + GT_Values.RA.addBrewingRecipe( + new ItemStack(Items.speckled_melon, 1, 0), tFluid, FluidRegistry.getFluid("potion.mundane"), false); + GT_Values.RA.addBrewingRecipe( + new ItemStack(Items.ghast_tear, 1, 0), tFluid, FluidRegistry.getFluid("potion.mundane"), false); + GT_Values.RA.addBrewingRecipe( + new ItemStack(Items.nether_wart, 1, 0), tFluid, FluidRegistry.getFluid("potion.awkward"), false); + GT_Values.RA.addBrewingRecipe( + new ItemStack(Blocks.red_mushroom, 1, 0), tFluid, FluidRegistry.getFluid("potion.poison"), false); + GT_Values.RA.addBrewingRecipe( + new ItemStack(Items.fish, 1, 3), tFluid, FluidRegistry.getFluid("potion.poison.strong"), true); + GT_Values.RA.addBrewingRecipe( + ItemList.IC2_Grin_Powder.get(1L), tFluid, FluidRegistry.getFluid("potion.poison.strong"), false); + GT_Values.RA.addBrewingRecipe( + new ItemStack(Items.reeds, 1, 0), tFluid, FluidRegistry.getFluid("potion.reedwater"), false); + GT_Values.RA.addBrewingRecipe( + new ItemStack(Items.apple, 1, 0), tFluid, FluidRegistry.getFluid("potion.applejuice"), false); + GT_Values.RA.addBrewingRecipe( + new ItemStack(Items.golden_apple, 1, 0), + tFluid, + FluidRegistry.getFluid("potion.goldenapplejuice"), + true); + GT_Values.RA.addBrewingRecipe( + new ItemStack(Items.golden_apple, 1, 1), + tFluid, + FluidRegistry.getFluid("potion.idunsapplejuice"), + true); + GT_Values.RA.addBrewingRecipe( + ItemList.IC2_Hops.get(1L), tFluid, FluidRegistry.getFluid("potion.hopsjuice"), false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coffee, 1L), + tFluid, + FluidRegistry.getFluid("potion.darkcoffee"), + false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chili, 1L), + tFluid, + FluidRegistry.getFluid("potion.chillysauce"), + false); + + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), + new FluidStack(tFluid, 1000), + GT_Values.NF, + ItemList.IC2_Fertilizer.get(2L), + 200); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TricalciumPhosphate, 1L), + new FluidStack(tFluid, 1000), + GT_Values.NF, + ItemList.IC2_Fertilizer.get(3L), + 300); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphate, 1L), + new FluidStack(tFluid, 1000), + GT_Values.NF, + ItemList.IC2_Fertilizer.get(2L), + 200); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 3L), + new FluidStack(tFluid, 1000), + GT_Values.NF, + ItemList.IC2_Fertilizer.get(1L), + 100); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 1L), + new FluidStack(tFluid, 1000), + GT_Values.NF, + ItemList.IC2_Fertilizer.get(1L), + 100); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), + new FluidStack(tFluid, 1000), + GT_Values.NF, + ItemList.IC2_Fertilizer.get(3L), + 300); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TricalciumPhosphate, 1L), + new FluidStack(tFluid, 1000), + GT_Values.NF, + ItemList.IC2_Fertilizer.get(4L), + 400); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphate, 1L), + new FluidStack(tFluid, 1000), + GT_Values.NF, + ItemList.IC2_Fertilizer.get(3L), + 300); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 3L), + new FluidStack(tFluid, 1000), + GT_Values.NF, + ItemList.IC2_Fertilizer.get(2L), + 200); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 1L), + new FluidStack(tFluid, 1000), + GT_Values.NF, + ItemList.IC2_Fertilizer.get(2L), + 200); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Apatite, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), + new FluidStack(tFluid, 1000), + GT_Values.NF, + ItemList.IC2_Fertilizer.get(3L), + 300); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Apatite, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TricalciumPhosphate, 1L), + new FluidStack(tFluid, 1000), + GT_Values.NF, + ItemList.IC2_Fertilizer.get(4L), + 400); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Apatite, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphate, 1L), + new FluidStack(tFluid, 1000), + GT_Values.NF, + ItemList.IC2_Fertilizer.get(3L), + 300); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Apatite, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 3L), + new FluidStack(tFluid, 1000), + GT_Values.NF, + ItemList.IC2_Fertilizer.get(2L), + 200); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Apatite, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 1L), + new FluidStack(tFluid, 1000), + GT_Values.NF, + ItemList.IC2_Fertilizer.get(2L), + 200); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glauconite, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), + new FluidStack(tFluid, 1000), + GT_Values.NF, + ItemList.IC2_Fertilizer.get(3L), + 300); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glauconite, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TricalciumPhosphate, 1L), + new FluidStack(tFluid, 1000), + GT_Values.NF, + ItemList.IC2_Fertilizer.get(4L), + 400); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glauconite, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphate, 1L), + new FluidStack(tFluid, 1000), + GT_Values.NF, + ItemList.IC2_Fertilizer.get(3L), + 300); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glauconite, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 3L), + new FluidStack(tFluid, 1000), + GT_Values.NF, + ItemList.IC2_Fertilizer.get(2L), + 200); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glauconite, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 1L), + new FluidStack(tFluid, 1000), + GT_Values.NF, + ItemList.IC2_Fertilizer.get(2L), + 200); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.GlauconiteSand, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), + new FluidStack(tFluid, 1000), + GT_Values.NF, + ItemList.IC2_Fertilizer.get(3L), + 300); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.GlauconiteSand, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TricalciumPhosphate, 1L), + new FluidStack(tFluid, 1000), + GT_Values.NF, + ItemList.IC2_Fertilizer.get(4L), + 400); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.GlauconiteSand, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphate, 1L), + new FluidStack(tFluid, 1000), + GT_Values.NF, + ItemList.IC2_Fertilizer.get(3L), + 300); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.GlauconiteSand, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 3L), + new FluidStack(tFluid, 1000), + GT_Values.NF, + ItemList.IC2_Fertilizer.get(2L), + 200); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.GlauconiteSand, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 1L), + new FluidStack(tFluid, 1000), + GT_Values.NF, + ItemList.IC2_Fertilizer.get(2L), + 200); } - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chili, 1L), FluidRegistry.getFluid("potion.chillysauce"), FluidRegistry.getFluid("potion.hotsauce"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chili, 1L), FluidRegistry.getFluid("potion.hotsauce"), FluidRegistry.getFluid("potion.diabolosauce"), true); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chili, 1L), FluidRegistry.getFluid("potion.diabolosauce"), FluidRegistry.getFluid("potion.diablosauce"), true); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coffee, 1L), FluidRegistry.getFluid("milk"), FluidRegistry.getFluid("potion.coffee"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cocoa, 1L), FluidRegistry.getFluid("milk"), FluidRegistry.getFluid("potion.darkchocolatemilk"), false); - GT_Values.RA.addBrewingRecipe(ItemList.IC2_Hops.get(1L), FluidRegistry.getFluid("potion.wheatyjuice"), FluidRegistry.getFluid("potion.wheatyhopsjuice"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wheat, 1L), FluidRegistry.getFluid("potion.hopsjuice"), FluidRegistry.getFluid("potion.wheatyhopsjuice"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L), FluidRegistry.getFluid("potion.tea"), FluidRegistry.getFluid("potion.sweettea"), true); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L), FluidRegistry.getFluid("potion.coffee"), FluidRegistry.getFluid("potion.cafeaulait"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L), FluidRegistry.getFluid("potion.cafeaulait"), FluidRegistry.getFluid("potion.laitaucafe"), true); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L), FluidRegistry.getFluid("potion.lemonjuice"), FluidRegistry.getFluid("potion.lemonade"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L), FluidRegistry.getFluid("potion.darkcoffee"), FluidRegistry.getFluid("potion.darkcafeaulait"), true); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L), FluidRegistry.getFluid("potion.darkchocolatemilk"), FluidRegistry.getFluid("potion.chocolatemilk"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ice, 1L), FluidRegistry.getFluid("potion.tea"), FluidRegistry.getFluid("potion.icetea"), false); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gunpowder, 1L), FluidRegistry.getFluid("potion.lemonade"), FluidRegistry.getFluid("potion.cavejohnsonsgrenadejuice"), true); - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L), FluidRegistry.getFluid("potion.mundane"), FluidRegistry.getFluid("potion.purpledrink"), true); - GT_Values.RA.addBrewingRecipe(new ItemStack(Items.fermented_spider_eye, 1, 0), FluidRegistry.getFluid("potion.mundane"), FluidRegistry.getFluid("potion.weakness"), false); - GT_Values.RA.addBrewingRecipe(new ItemStack(Items.fermented_spider_eye, 1, 0), FluidRegistry.getFluid("potion.thick"), FluidRegistry.getFluid("potion.weakness"), false); - - GT_Values.RA.addBrewingRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "fertilizerBio", 4L, 0), FluidRegistry.WATER, FluidRegistry.getFluid("biomass"), false); - GT_Values.RA.addBrewingRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "mulch", 16L, 0), GT_ModHandler.getDistilledWater(750L).getFluid(), FluidRegistry.getFluid("biomass"), false); - GT_Values.RA.addBrewingRecipeCustom(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "mulch", 8L, 0), FluidRegistry.getFluidStack("juice", 500), FluidRegistry.getFluidStack("biomass", 750), 128, 4, false); - - GT_Values.RA.addBrewingRecipeCustom(GT_ModHandler.getIC2Item("biochaff", 1), GT_ModHandler.getWater(1000L), FluidRegistry.getFluidStack("ic2biomass", 1000), 170, 4, false); - GT_Values.RA.addBrewingRecipeCustom(GT_ModHandler.getIC2Item("biochaff", 1), GT_ModHandler.getDistilledWater(500L), FluidRegistry.getFluidStack("ic2biomass", 1000), 10, 30, false); - - GT_Values.RA.addMixerRecipe(new ItemStack(Blocks.dirt, 1, 32767), new ItemStack(Items.wheat, 4, 32767), GT_Utility.getIntegratedCircuit(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Water.getFluid(100), null, GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), 200, 16); - GT_Values.RA.addMixerRecipe(new ItemStack(Blocks.dirt, 1, 2), new ItemStack(Items.wheat, 4, 32767), GT_Utility.getIntegratedCircuit(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Water.getFluid(100), GT_Values.NF, GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), 200, 16); - GT_Values.RA.addMixerRecipe(new ItemStack(Blocks.dirt, 1, 32767), GT_ModHandler.getModItem("BiomesOPlenty", "plants", 4, 6), GT_Utility.getIntegratedCircuit(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Water.getFluid(100), GT_Values.NF, GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), 200, 16); - GT_Values.RA.addMixerRecipe(new ItemStack(Blocks.dirt, 1, 2), GT_ModHandler.getModItem("BiomesOPlenty", "plants", 4, 6), GT_Utility.getIntegratedCircuit(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Water.getFluid(100), GT_Values.NF, GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), 200, 16); - GT_Values.RA.addMixerRecipe(new ItemStack(Blocks.dirt, 1, 32767), GT_ModHandler.getModItem("harvestcraft", "oatsItem", 4), GT_Utility.getIntegratedCircuit(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Water.getFluid(100), GT_Values.NF, GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), 200, 16); - GT_Values.RA.addMixerRecipe(new ItemStack(Blocks.dirt, 1, 2), GT_ModHandler.getModItem("harvestcraft", "oatsItem", 4), GT_Utility.getIntegratedCircuit(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Water.getFluid(100), GT_Values.NF, GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), 200, 16); - GT_Values.RA.addMixerRecipe(new ItemStack(Blocks.dirt, 1, 32767), GT_ModHandler.getModItem("harvestcraft", "ryeItem", 4), GT_Utility.getIntegratedCircuit(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Water.getFluid(100), GT_Values.NF, GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), 200, 16); - GT_Values.RA.addMixerRecipe(new ItemStack(Blocks.dirt, 1, 2), GT_ModHandler.getModItem("harvestcraft", "ryeItem", 4), GT_Utility.getIntegratedCircuit(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Water.getFluid(100), GT_Values.NF, GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), 200, 16); - GT_Values.RA.addMixerRecipe(new ItemStack(Blocks.dirt, 1, 32767), GT_ModHandler.getModItem("harvestcraft", "barleyItem", 4), GT_Utility.getIntegratedCircuit(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Water.getFluid(100), GT_Values.NF, GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), 200, 16); - GT_Values.RA.addMixerRecipe(new ItemStack(Blocks.dirt, 1, 2), GT_ModHandler.getModItem("harvestcraft", "barleyItem", 4, 6), GT_Utility.getIntegratedCircuit(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Water.getFluid(100), GT_Values.NF, GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), 200, 16); - GT_Values.RA.addMixerRecipe(new ItemStack(Blocks.dirt, 1, 32767), GT_ModHandler.getModItem("Natura", "barleyFood", 4), GT_Utility.getIntegratedCircuit(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Water.getFluid(100), GT_Values.NF, GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), 200, 16); - GT_Values.RA.addMixerRecipe(new ItemStack(Blocks.dirt, 1, 2), GT_ModHandler.getModItem("Natura", "barleyFood", 4), GT_Utility.getIntegratedCircuit(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Water.getFluid(100), GT_Values.NF, GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), 200, 16); - GT_Values.RA.addMixerRecipe(new ItemStack(Blocks.dirt, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 4L), GT_Utility.getIntegratedCircuit(3), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Water.getFluid(100), GT_Values.NF, GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), 200, 16); - GT_Values.RA.addMixerRecipe(new ItemStack(Blocks.dirt, 1, 2), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 4L), GT_Utility.getIntegratedCircuit(3), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Water.getFluid(100), GT_Values.NF, GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), 200, 16); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chili, 1L), + FluidRegistry.getFluid("potion.chillysauce"), + FluidRegistry.getFluid("potion.hotsauce"), + false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chili, 1L), + FluidRegistry.getFluid("potion.hotsauce"), + FluidRegistry.getFluid("potion.diabolosauce"), + true); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chili, 1L), + FluidRegistry.getFluid("potion.diabolosauce"), + FluidRegistry.getFluid("potion.diablosauce"), + true); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coffee, 1L), + FluidRegistry.getFluid("milk"), + FluidRegistry.getFluid("potion.coffee"), + false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cocoa, 1L), + FluidRegistry.getFluid("milk"), + FluidRegistry.getFluid("potion.darkchocolatemilk"), + false); + GT_Values.RA.addBrewingRecipe( + ItemList.IC2_Hops.get(1L), + FluidRegistry.getFluid("potion.wheatyjuice"), + FluidRegistry.getFluid("potion.wheatyhopsjuice"), + false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wheat, 1L), + FluidRegistry.getFluid("potion.hopsjuice"), + FluidRegistry.getFluid("potion.wheatyhopsjuice"), + false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L), + FluidRegistry.getFluid("potion.tea"), + FluidRegistry.getFluid("potion.sweettea"), + true); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L), + FluidRegistry.getFluid("potion.coffee"), + FluidRegistry.getFluid("potion.cafeaulait"), + false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L), + FluidRegistry.getFluid("potion.cafeaulait"), + FluidRegistry.getFluid("potion.laitaucafe"), + true); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L), + FluidRegistry.getFluid("potion.lemonjuice"), + FluidRegistry.getFluid("potion.lemonade"), + false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L), + FluidRegistry.getFluid("potion.darkcoffee"), + FluidRegistry.getFluid("potion.darkcafeaulait"), + true); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L), + FluidRegistry.getFluid("potion.darkchocolatemilk"), + FluidRegistry.getFluid("potion.chocolatemilk"), + false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ice, 1L), + FluidRegistry.getFluid("potion.tea"), + FluidRegistry.getFluid("potion.icetea"), + false); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gunpowder, 1L), + FluidRegistry.getFluid("potion.lemonade"), + FluidRegistry.getFluid("potion.cavejohnsonsgrenadejuice"), + true); + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L), + FluidRegistry.getFluid("potion.mundane"), + FluidRegistry.getFluid("potion.purpledrink"), + true); + GT_Values.RA.addBrewingRecipe( + new ItemStack(Items.fermented_spider_eye, 1, 0), + FluidRegistry.getFluid("potion.mundane"), + FluidRegistry.getFluid("potion.weakness"), + false); + GT_Values.RA.addBrewingRecipe( + new ItemStack(Items.fermented_spider_eye, 1, 0), + FluidRegistry.getFluid("potion.thick"), + FluidRegistry.getFluid("potion.weakness"), + false); + + GT_Values.RA.addBrewingRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "fertilizerBio", 4L, 0), + FluidRegistry.WATER, + FluidRegistry.getFluid("biomass"), + false); + GT_Values.RA.addBrewingRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "mulch", 16L, 0), + GT_ModHandler.getDistilledWater(750L).getFluid(), + FluidRegistry.getFluid("biomass"), + false); + GT_Values.RA.addBrewingRecipeCustom( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "mulch", 8L, 0), + FluidRegistry.getFluidStack("juice", 500), + FluidRegistry.getFluidStack("biomass", 750), + 128, + 4, + false); + + GT_Values.RA.addBrewingRecipeCustom( + GT_ModHandler.getIC2Item("biochaff", 1), + GT_ModHandler.getWater(1000L), + FluidRegistry.getFluidStack("ic2biomass", 1000), + 170, + 4, + false); + GT_Values.RA.addBrewingRecipeCustom( + GT_ModHandler.getIC2Item("biochaff", 1), + GT_ModHandler.getDistilledWater(500L), + FluidRegistry.getFluidStack("ic2biomass", 1000), + 10, + 30, + false); + + GT_Values.RA.addMixerRecipe( + new ItemStack(Blocks.dirt, 1, 32767), + new ItemStack(Items.wheat, 4, 32767), + GT_Utility.getIntegratedCircuit(2), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.Water.getFluid(100), + null, + GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), + 200, + 16); + GT_Values.RA.addMixerRecipe( + new ItemStack(Blocks.dirt, 1, 2), + new ItemStack(Items.wheat, 4, 32767), + GT_Utility.getIntegratedCircuit(2), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.Water.getFluid(100), + GT_Values.NF, + GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), + 200, + 16); + GT_Values.RA.addMixerRecipe( + new ItemStack(Blocks.dirt, 1, 32767), + GT_ModHandler.getModItem("BiomesOPlenty", "plants", 4, 6), + GT_Utility.getIntegratedCircuit(2), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.Water.getFluid(100), + GT_Values.NF, + GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), + 200, + 16); + GT_Values.RA.addMixerRecipe( + new ItemStack(Blocks.dirt, 1, 2), + GT_ModHandler.getModItem("BiomesOPlenty", "plants", 4, 6), + GT_Utility.getIntegratedCircuit(2), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.Water.getFluid(100), + GT_Values.NF, + GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), + 200, + 16); + GT_Values.RA.addMixerRecipe( + new ItemStack(Blocks.dirt, 1, 32767), + GT_ModHandler.getModItem("harvestcraft", "oatsItem", 4), + GT_Utility.getIntegratedCircuit(2), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.Water.getFluid(100), + GT_Values.NF, + GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), + 200, + 16); + GT_Values.RA.addMixerRecipe( + new ItemStack(Blocks.dirt, 1, 2), + GT_ModHandler.getModItem("harvestcraft", "oatsItem", 4), + GT_Utility.getIntegratedCircuit(2), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.Water.getFluid(100), + GT_Values.NF, + GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), + 200, + 16); + GT_Values.RA.addMixerRecipe( + new ItemStack(Blocks.dirt, 1, 32767), + GT_ModHandler.getModItem("harvestcraft", "ryeItem", 4), + GT_Utility.getIntegratedCircuit(2), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.Water.getFluid(100), + GT_Values.NF, + GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), + 200, + 16); + GT_Values.RA.addMixerRecipe( + new ItemStack(Blocks.dirt, 1, 2), + GT_ModHandler.getModItem("harvestcraft", "ryeItem", 4), + GT_Utility.getIntegratedCircuit(2), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.Water.getFluid(100), + GT_Values.NF, + GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), + 200, + 16); + GT_Values.RA.addMixerRecipe( + new ItemStack(Blocks.dirt, 1, 32767), + GT_ModHandler.getModItem("harvestcraft", "barleyItem", 4), + GT_Utility.getIntegratedCircuit(2), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.Water.getFluid(100), + GT_Values.NF, + GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), + 200, + 16); + GT_Values.RA.addMixerRecipe( + new ItemStack(Blocks.dirt, 1, 2), + GT_ModHandler.getModItem("harvestcraft", "barleyItem", 4, 6), + GT_Utility.getIntegratedCircuit(2), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.Water.getFluid(100), + GT_Values.NF, + GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), + 200, + 16); + GT_Values.RA.addMixerRecipe( + new ItemStack(Blocks.dirt, 1, 32767), + GT_ModHandler.getModItem("Natura", "barleyFood", 4), + GT_Utility.getIntegratedCircuit(2), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.Water.getFluid(100), + GT_Values.NF, + GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), + 200, + 16); + GT_Values.RA.addMixerRecipe( + new ItemStack(Blocks.dirt, 1, 2), + GT_ModHandler.getModItem("Natura", "barleyFood", 4), + GT_Utility.getIntegratedCircuit(2), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.Water.getFluid(100), + GT_Values.NF, + GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), + 200, + 16); + GT_Values.RA.addMixerRecipe( + new ItemStack(Blocks.dirt, 1, 32767), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 4L), + GT_Utility.getIntegratedCircuit(3), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.Water.getFluid(100), + GT_Values.NF, + GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), + 200, + 16); + GT_Values.RA.addMixerRecipe( + new ItemStack(Blocks.dirt, 1, 2), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 4L), + GT_Utility.getIntegratedCircuit(3), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.Water.getFluid(100), + GT_Values.NF, + GT_ModHandler.getModItem("Forestry", "fertilizerBio", 1L, 0), + 200, + 16); this.addPotionRecipes("waterbreathing", new ItemStack(Items.fish, 1, 3)); this.addPotionRecipes("fireresistance", new ItemStack(Items.magma_cream, 1, 0)); @@ -1006,58 +5995,229 @@ public class GT_MachineRecipeLoader implements Runnable { this.addPotionRecipes("speed", GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L)); this.addPotionRecipes("strength", GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Blaze, 1L)); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("milk", 50), FluidRegistry.getFluidStack("potion.mundane", 25), 1024, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.lemonjuice", 50), FluidRegistry.getFluidStack("potion.limoncello", 25), 1024, true); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.applejuice", 50), FluidRegistry.getFluidStack("potion.cider", 25), 1024, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.goldenapplejuice", 50), FluidRegistry.getFluidStack("potion.goldencider", 25), 1024, true); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.idunsapplejuice", 50), FluidRegistry.getFluidStack("potion.notchesbrew", 25), 1024, true); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.reedwater", 50), FluidRegistry.getFluidStack("potion.rum", 25), 1024, true); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.rum", 50), FluidRegistry.getFluidStack("potion.piratebrew", 10), 2048, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.grapejuice", 50), FluidRegistry.getFluidStack("potion.wine", 25), 1024, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.wine", 50), FluidRegistry.getFluidStack("potion.vinegar", 10), 2048, true); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.wheatyjuice", 50), FluidRegistry.getFluidStack("potion.scotch", 25), 1024, true); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.scotch", 50), FluidRegistry.getFluidStack("potion.glenmckenner", 10), 2048, true); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.wheatyhopsjuice", 50), FluidRegistry.getFluidStack("potion.beer", 25), 1024, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.hopsjuice", 50), FluidRegistry.getFluidStack("potion.darkbeer", 25), 1024, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.darkbeer", 50), FluidRegistry.getFluidStack("potion.dragonblood", 10), 2048, true); - - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.beer", 75), FluidRegistry.getFluidStack("potion.vinegar", 50), 2048, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.cider", 75), FluidRegistry.getFluidStack("potion.vinegar", 50), 2048, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.goldencider", 75), FluidRegistry.getFluidStack("potion.vinegar", 50), 2048, true); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.rum", 75), FluidRegistry.getFluidStack("potion.vinegar", 50), 2048, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.wine", 75), FluidRegistry.getFluidStack("potion.vinegar", 50), 2048, false); - - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.awkward", 50), FluidRegistry.getFluidStack("potion.weakness", 25), 1024, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.mundane", 50), FluidRegistry.getFluidStack("potion.weakness", 25), 1024, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.thick", 50), FluidRegistry.getFluidStack("potion.weakness", 25), 1024, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.poison", 50), FluidRegistry.getFluidStack("potion.damage", 25), 1024, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.health", 50), FluidRegistry.getFluidStack("potion.damage", 25), 1024, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.waterbreathing", 50), FluidRegistry.getFluidStack("potion.damage", 25), 1024, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.nightvision", 50), FluidRegistry.getFluidStack("potion.invisibility", 25), 1024, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.fireresistance", 50), FluidRegistry.getFluidStack("potion.slowness", 25), 1024, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.speed", 50), FluidRegistry.getFluidStack("potion.slowness", 25), 1024, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.strength", 50), FluidRegistry.getFluidStack("potion.weakness", 25), 1024, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.regen", 50), FluidRegistry.getFluidStack("potion.poison", 25), 1024, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.poison.strong", 50), FluidRegistry.getFluidStack("potion.damage.strong", 10), 2048, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.health.strong", 50), FluidRegistry.getFluidStack("potion.damage.strong", 10), 2048, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.speed.strong", 50), FluidRegistry.getFluidStack("potion.slowness.strong", 10), 2048, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.strength.strong", 50), FluidRegistry.getFluidStack("potion.weakness.strong", 10), 2048, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.nightvision.long", 50), FluidRegistry.getFluidStack("potion.invisibility.long", 10), 2048, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.regen.strong", 50), FluidRegistry.getFluidStack("potion.poison.strong", 10), 2048, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.poison.long", 50), FluidRegistry.getFluidStack("potion.damage.long", 10), 2048, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.waterbreathing.long", 50), FluidRegistry.getFluidStack("potion.damage.long", 10), 2048, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.fireresistance.long", 50), FluidRegistry.getFluidStack("potion.slowness.long", 10), 2048, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.speed.long", 50), FluidRegistry.getFluidStack("potion.slowness.long", 10), 2048, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.strength.long", 50), FluidRegistry.getFluidStack("potion.weakness.long", 10), 2048, false); - GT_Values.RA.addFermentingRecipe(FluidRegistry.getFluidStack("potion.regen.long", 50), FluidRegistry.getFluidStack("potion.poison.long", 10), 2048, false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("milk", 50), + FluidRegistry.getFluidStack("potion.mundane", 25), + 1024, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.lemonjuice", 50), + FluidRegistry.getFluidStack("potion.limoncello", 25), + 1024, + true); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.applejuice", 50), + FluidRegistry.getFluidStack("potion.cider", 25), + 1024, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.goldenapplejuice", 50), + FluidRegistry.getFluidStack("potion.goldencider", 25), + 1024, + true); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.idunsapplejuice", 50), + FluidRegistry.getFluidStack("potion.notchesbrew", 25), + 1024, + true); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.reedwater", 50), + FluidRegistry.getFluidStack("potion.rum", 25), + 1024, + true); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.rum", 50), + FluidRegistry.getFluidStack("potion.piratebrew", 10), + 2048, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.grapejuice", 50), + FluidRegistry.getFluidStack("potion.wine", 25), + 1024, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.wine", 50), + FluidRegistry.getFluidStack("potion.vinegar", 10), + 2048, + true); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.wheatyjuice", 50), + FluidRegistry.getFluidStack("potion.scotch", 25), + 1024, + true); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.scotch", 50), + FluidRegistry.getFluidStack("potion.glenmckenner", 10), + 2048, + true); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.wheatyhopsjuice", 50), + FluidRegistry.getFluidStack("potion.beer", 25), + 1024, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.hopsjuice", 50), + FluidRegistry.getFluidStack("potion.darkbeer", 25), + 1024, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.darkbeer", 50), + FluidRegistry.getFluidStack("potion.dragonblood", 10), + 2048, + true); + + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.beer", 75), + FluidRegistry.getFluidStack("potion.vinegar", 50), + 2048, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.cider", 75), + FluidRegistry.getFluidStack("potion.vinegar", 50), + 2048, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.goldencider", 75), + FluidRegistry.getFluidStack("potion.vinegar", 50), + 2048, + true); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.rum", 75), + FluidRegistry.getFluidStack("potion.vinegar", 50), + 2048, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.wine", 75), + FluidRegistry.getFluidStack("potion.vinegar", 50), + 2048, + false); + + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.awkward", 50), + FluidRegistry.getFluidStack("potion.weakness", 25), + 1024, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.mundane", 50), + FluidRegistry.getFluidStack("potion.weakness", 25), + 1024, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.thick", 50), + FluidRegistry.getFluidStack("potion.weakness", 25), + 1024, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.poison", 50), + FluidRegistry.getFluidStack("potion.damage", 25), + 1024, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.health", 50), + FluidRegistry.getFluidStack("potion.damage", 25), + 1024, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.waterbreathing", 50), + FluidRegistry.getFluidStack("potion.damage", 25), + 1024, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.nightvision", 50), + FluidRegistry.getFluidStack("potion.invisibility", 25), + 1024, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.fireresistance", 50), + FluidRegistry.getFluidStack("potion.slowness", 25), + 1024, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.speed", 50), + FluidRegistry.getFluidStack("potion.slowness", 25), + 1024, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.strength", 50), + FluidRegistry.getFluidStack("potion.weakness", 25), + 1024, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.regen", 50), + FluidRegistry.getFluidStack("potion.poison", 25), + 1024, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.poison.strong", 50), + FluidRegistry.getFluidStack("potion.damage.strong", 10), + 2048, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.health.strong", 50), + FluidRegistry.getFluidStack("potion.damage.strong", 10), + 2048, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.speed.strong", 50), + FluidRegistry.getFluidStack("potion.slowness.strong", 10), + 2048, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.strength.strong", 50), + FluidRegistry.getFluidStack("potion.weakness.strong", 10), + 2048, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.nightvision.long", 50), + FluidRegistry.getFluidStack("potion.invisibility.long", 10), + 2048, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.regen.strong", 50), + FluidRegistry.getFluidStack("potion.poison.strong", 10), + 2048, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.poison.long", 50), + FluidRegistry.getFluidStack("potion.damage.long", 10), + 2048, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.waterbreathing.long", 50), + FluidRegistry.getFluidStack("potion.damage.long", 10), + 2048, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.fireresistance.long", 50), + FluidRegistry.getFluidStack("potion.slowness.long", 10), + 2048, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.speed.long", 50), + FluidRegistry.getFluidStack("potion.slowness.long", 10), + 2048, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.strength.long", 50), + FluidRegistry.getFluidStack("potion.weakness.long", 10), + 2048, + false); + GT_Values.RA.addFermentingRecipe( + FluidRegistry.getFluidStack("potion.regen.long", 50), + FluidRegistry.getFluidStack("potion.poison.long", 10), + 2048, + false); GT_ModHandler.addSmeltingRecipe(ItemList.Food_Raw_PotatoChips.get(1L), ItemList.Food_PotatoChips.get(1L)); - GT_ModHandler.addSmeltingRecipe(ItemList.Food_Potato_On_Stick.get(1L), ItemList.Food_Potato_On_Stick_Roasted.get(1L)); + GT_ModHandler.addSmeltingRecipe( + ItemList.Food_Potato_On_Stick.get(1L), ItemList.Food_Potato_On_Stick_Roasted.get(1L)); GT_ModHandler.addSmeltingRecipe(ItemList.Food_Raw_Bun.get(1L), ItemList.Food_Baked_Bun.get(1L)); GT_ModHandler.addSmeltingRecipe(ItemList.Food_Raw_Bread.get(1L), ItemList.Food_Baked_Bread.get(1L)); GT_ModHandler.addSmeltingRecipe(ItemList.Food_Raw_Baguette.get(1L), ItemList.Food_Baked_Baguette.get(1L)); - GT_ModHandler.addSmeltingRecipe(ItemList.Food_Raw_Pizza_Veggie.get(1L), ItemList.Food_Baked_Pizza_Veggie.get(1L)); - GT_ModHandler.addSmeltingRecipe(ItemList.Food_Raw_Pizza_Cheese.get(1L), ItemList.Food_Baked_Pizza_Cheese.get(1L)); + GT_ModHandler.addSmeltingRecipe( + ItemList.Food_Raw_Pizza_Veggie.get(1L), ItemList.Food_Baked_Pizza_Veggie.get(1L)); + GT_ModHandler.addSmeltingRecipe( + ItemList.Food_Raw_Pizza_Cheese.get(1L), ItemList.Food_Baked_Pizza_Cheese.get(1L)); GT_ModHandler.addSmeltingRecipe(ItemList.Food_Raw_Pizza_Meat.get(1L), ItemList.Food_Baked_Pizza_Meat.get(1L)); GT_ModHandler.addSmeltingRecipe(ItemList.Food_Raw_Baguette.get(1L), ItemList.Food_Baked_Baguette.get(1L)); GT_ModHandler.addSmeltingRecipe(ItemList.Food_Raw_Cake.get(1L), ItemList.Food_Baked_Cake.get(1L)); @@ -1065,244 +6225,888 @@ public class GT_MachineRecipeLoader implements Runnable { GT_ModHandler.addSmeltingRecipe(new ItemStack(Items.slime_ball, 1), ItemList.IC2_Resin.get(1L)); GT_ModHandler.addExtractionRecipe(new ItemStack(Blocks.bookshelf, 1, 32767), new ItemStack(Items.book, 3, 0)); - GT_ModHandler.addExtractionRecipe(new ItemStack(Items.slime_ball, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RawRubber, 2L)); - GT_ModHandler.addExtractionRecipe(ItemList.IC2_Resin.get(1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RawRubber, 3L)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getIC2Item("rubberSapling", 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RawRubber, 1L)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getIC2Item("rubberLeaves", 16L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RawRubber, 1L)); + GT_ModHandler.addExtractionRecipe( + new ItemStack(Items.slime_ball, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RawRubber, 2L)); + GT_ModHandler.addExtractionRecipe( + ItemList.IC2_Resin.get(1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RawRubber, 3L)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getIC2Item("rubberSapling", 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RawRubber, 1L)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getIC2Item("rubberLeaves", 16L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RawRubber, 1L)); GT_ModHandler.addExtractionRecipe(ItemList.Cell_Air.get(1L), ItemList.Cell_Empty.get(1L)); if (Loader.isModLoaded(GT_MachineRecipeLoader.aTextEBXL)) { - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "waterplant1", 1, 0), new ItemStack(Items.dye, 4, 2)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "vines", 1, 0), new ItemStack(Items.dye, 4, 1)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 11), new ItemStack(Items.dye, 4, 11)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 10), new ItemStack(Items.dye, 4, 5)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 9), new ItemStack(Items.dye, 4, 14)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 8), new ItemStack(Items.dye, 4, 14)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 7), new ItemStack(Items.dye, 4, 1)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 6), new ItemStack(Items.dye, 4, 1)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 5), new ItemStack(Items.dye, 4, 11)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 0), new ItemStack(Items.dye, 4, 9)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 4), new ItemStack(Items.dye, 4, 11)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 3), new ItemStack(Items.dye, 4, 13)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower1", 1, 3), new ItemStack(Items.dye, 4, 5)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 2), new ItemStack(Items.dye, 4, 5)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower1", 1, 1), new ItemStack(Items.dye, 4, 12)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 15), new ItemStack(Items.dye, 4, 11)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 14), new ItemStack(Items.dye, 4, 1)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 13), new ItemStack(Items.dye, 4, 9)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 12), new ItemStack(Items.dye, 4, 14)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 11), new ItemStack(Items.dye, 4, 7)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower1", 1, 7), new ItemStack(Items.dye, 4, 7)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower1", 1, 2), new ItemStack(Items.dye, 4, 11)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 13), new ItemStack(Items.dye, 4, 6)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 6), new ItemStack(Items.dye, 4, 12)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 5), new ItemStack(Items.dye, 4, 10)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 2), new ItemStack(Items.dye, 4, 1)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 1), new ItemStack(Items.dye, 4, 9)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 0), new ItemStack(Items.dye, 4, 13)); - - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 7), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "extrabiomes.dye", 1, 0)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 1), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "extrabiomes.dye", 1, 1)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 12), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "extrabiomes.dye", 1, 1)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 4), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "extrabiomes.dye", 1, 1)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower1", 1, 6), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "extrabiomes.dye", 1, 2)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 8), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "extrabiomes.dye", 1, 3)); - GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 3), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "extrabiomes.dye", 1, 3)); - - GT_ModHandler.addCompressionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 0), ItemList.IC2_Plantball.get(1)); - GT_ModHandler.addCompressionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 1), ItemList.IC2_Plantball.get(1)); - GT_ModHandler.addCompressionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 2), ItemList.IC2_Plantball.get(1)); - GT_ModHandler.addCompressionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 3), ItemList.IC2_Plantball.get(1)); - GT_ModHandler.addCompressionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 4), ItemList.IC2_Plantball.get(1)); - GT_ModHandler.addCompressionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 5), ItemList.IC2_Plantball.get(1)); - GT_ModHandler.addCompressionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 6), ItemList.IC2_Plantball.get(1)); - GT_ModHandler.addCompressionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 7), ItemList.IC2_Plantball.get(1)); - GT_ModHandler.addCompressionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_2", 4, 0), ItemList.IC2_Plantball.get(1)); - GT_ModHandler.addCompressionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_2", 4, 1), ItemList.IC2_Plantball.get(1)); - GT_ModHandler.addCompressionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_2", 4, 2), ItemList.IC2_Plantball.get(1)); - GT_ModHandler.addCompressionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_2", 4, 3), ItemList.IC2_Plantball.get(1)); - GT_ModHandler.addCompressionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_2", 4, 4), ItemList.IC2_Plantball.get(1)); - + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "waterplant1", 1, 0), + new ItemStack(Items.dye, 4, 2)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "vines", 1, 0), + new ItemStack(Items.dye, 4, 1)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 11), + new ItemStack(Items.dye, 4, 11)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 10), + new ItemStack(Items.dye, 4, 5)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 9), + new ItemStack(Items.dye, 4, 14)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 8), + new ItemStack(Items.dye, 4, 14)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 7), + new ItemStack(Items.dye, 4, 1)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 6), + new ItemStack(Items.dye, 4, 1)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 5), + new ItemStack(Items.dye, 4, 11)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 0), + new ItemStack(Items.dye, 4, 9)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 4), + new ItemStack(Items.dye, 4, 11)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 3), + new ItemStack(Items.dye, 4, 13)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower1", 1, 3), + new ItemStack(Items.dye, 4, 5)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 2), + new ItemStack(Items.dye, 4, 5)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower1", 1, 1), + new ItemStack(Items.dye, 4, 12)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 15), + new ItemStack(Items.dye, 4, 11)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 14), + new ItemStack(Items.dye, 4, 1)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 13), + new ItemStack(Items.dye, 4, 9)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 12), + new ItemStack(Items.dye, 4, 14)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 11), + new ItemStack(Items.dye, 4, 7)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower1", 1, 7), + new ItemStack(Items.dye, 4, 7)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower1", 1, 2), + new ItemStack(Items.dye, 4, 11)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 13), + new ItemStack(Items.dye, 4, 6)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 6), + new ItemStack(Items.dye, 4, 12)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 5), + new ItemStack(Items.dye, 4, 10)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 2), + new ItemStack(Items.dye, 4, 1)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 1), + new ItemStack(Items.dye, 4, 9)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 0), + new ItemStack(Items.dye, 4, 13)); + + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 7), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "extrabiomes.dye", 1, 0)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 1), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "extrabiomes.dye", 1, 1)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower3", 1, 12), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "extrabiomes.dye", 1, 1)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 4), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "extrabiomes.dye", 1, 1)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower1", 1, 6), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "extrabiomes.dye", 1, 2)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 8), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "extrabiomes.dye", 1, 3)); + GT_ModHandler.addExtractionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "flower2", 1, 3), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "extrabiomes.dye", 1, 3)); + + GT_ModHandler.addCompressionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 0), + ItemList.IC2_Plantball.get(1)); + GT_ModHandler.addCompressionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 1), + ItemList.IC2_Plantball.get(1)); + GT_ModHandler.addCompressionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 2), + ItemList.IC2_Plantball.get(1)); + GT_ModHandler.addCompressionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 3), + ItemList.IC2_Plantball.get(1)); + GT_ModHandler.addCompressionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 4), + ItemList.IC2_Plantball.get(1)); + GT_ModHandler.addCompressionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 5), + ItemList.IC2_Plantball.get(1)); + GT_ModHandler.addCompressionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 6), + ItemList.IC2_Plantball.get(1)); + GT_ModHandler.addCompressionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_1", 4, 7), + ItemList.IC2_Plantball.get(1)); + GT_ModHandler.addCompressionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_2", 4, 0), + ItemList.IC2_Plantball.get(1)); + GT_ModHandler.addCompressionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_2", 4, 1), + ItemList.IC2_Plantball.get(1)); + GT_ModHandler.addCompressionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_2", 4, 2), + ItemList.IC2_Plantball.get(1)); + GT_ModHandler.addCompressionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_2", 4, 3), + ItemList.IC2_Plantball.get(1)); + GT_ModHandler.addCompressionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "saplings_2", 4, 4), + ItemList.IC2_Plantball.get(1)); } - GT_ModHandler.addCompressionRecipe(GT_ModHandler.getModItem("miscutils", "blockRainforestOakSapling", 8, 0), ItemList.IC2_Plantball.get(1)); - - GT_Values.RA.addCompressorRecipe(ItemList.IC2_Compressed_Coal_Chunk.get(1L), ItemList.IC2_Industrial_Diamond.get(1L), 300, 2); - GT_ModHandler.addCompressionRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Uranium, 1L), GT_ModHandler.getIC2Item("Uran238", 1L)); - GT_ModHandler.addCompressionRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Uranium235, 1L), GT_ModHandler.getIC2Item("Uran235", 1L)); - GT_ModHandler.addCompressionRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plutonium, 1L), GT_ModHandler.getIC2Item("Plutonium", 1L)); - GT_ModHandler.addCompressionRecipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Uranium235, 1L), GT_ModHandler.getIC2Item("smallUran235", 1L)); - GT_ModHandler.addCompressionRecipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Plutonium, 1L), GT_ModHandler.getIC2Item("smallPlutonium", 1L)); + GT_ModHandler.addCompressionRecipe( + GT_ModHandler.getModItem("miscutils", "blockRainforestOakSapling", 8, 0), + ItemList.IC2_Plantball.get(1)); + + GT_Values.RA.addCompressorRecipe( + ItemList.IC2_Compressed_Coal_Chunk.get(1L), ItemList.IC2_Industrial_Diamond.get(1L), 300, 2); + GT_ModHandler.addCompressionRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Uranium, 1L), + GT_ModHandler.getIC2Item("Uran238", 1L)); + GT_ModHandler.addCompressionRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Uranium235, 1L), + GT_ModHandler.getIC2Item("Uran235", 1L)); + GT_ModHandler.addCompressionRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plutonium, 1L), + GT_ModHandler.getIC2Item("Plutonium", 1L)); + GT_ModHandler.addCompressionRecipe( + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Uranium235, 1L), + GT_ModHandler.getIC2Item("smallUran235", 1L)); + GT_ModHandler.addCompressionRecipe( + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Plutonium, 1L), + GT_ModHandler.getIC2Item("smallPlutonium", 1L)); GT_ModHandler.addCompressionRecipe(new ItemStack(Blocks.ice, 2, 32767), new ItemStack(Blocks.packed_ice, 1, 0)); - GT_ModHandler.addCompressionRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ice, 1L), new ItemStack(Blocks.ice, 1, 0)); - GT_ModHandler.addCompressionRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.CertusQuartz, 4L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "tile.BlockQuartz", 1L)); - GT_ModHandler.addCompressionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 8L, 10), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "tile.BlockQuartz", 1L)); - GT_ModHandler.addCompressionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 8L, 11), new ItemStack(Blocks.quartz_block, 1, 0)); - GT_ModHandler.addCompressionRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 8L, 12), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "tile.BlockFluix", 1L)); + GT_ModHandler.addCompressionRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ice, 1L), new ItemStack(Blocks.ice, 1, 0)); + GT_ModHandler.addCompressionRecipe( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.CertusQuartz, 4L), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "tile.BlockQuartz", 1L)); + GT_ModHandler.addCompressionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 8L, 10), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "tile.BlockQuartz", 1L)); + GT_ModHandler.addCompressionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 8L, 11), + new ItemStack(Blocks.quartz_block, 1, 0)); + GT_ModHandler.addCompressionRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 8L, 12), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "tile.BlockFluix", 1L)); GT_ModHandler.addCompressionRecipe(new ItemStack(Items.quartz, 4, 0), new ItemStack(Blocks.quartz_block, 1, 0)); - //GT_ModHandler.addCompressionRecipe(new ItemStack(Items.wheat, 9, 0), new ItemStack(Blocks.hay_block, 1, 0)); - GT_ModHandler.addCompressionRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 4L), new ItemStack(Blocks.glowstone, 1)); + // GT_ModHandler.addCompressionRecipe(new ItemStack(Items.wheat, 9, 0), new ItemStack(Blocks.hay_block, 1, 0)); + GT_ModHandler.addCompressionRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 4L), + new ItemStack(Blocks.glowstone, 1)); GT_Values.RA.addCompressorRecipe(Materials.Fireclay.getDust(1), ItemList.CompressedFireclay.get(1), 80, 4); GameRegistry.addSmelting(ItemList.CompressedFireclay.get(1), ItemList.Firebrick.get(1), 0); - GT_Values.RA.addCutterRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Graphite, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Graphite, 9L), GT_Values.NI, 500, 48); + GT_Values.RA.addCutterRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Graphite, 1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Graphite, 9L), + GT_Values.NI, + 500, + 48); GT_ModHandler.removeFurnaceSmelting(GT_OreDictUnificator.get(OrePrefixes.ore, Materials.Graphite, 1L)); - GT_ModHandler.addSmeltingRecipe(GT_OreDictUnificator.get(OrePrefixes.ore, Materials.Graphite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 1L)); - GT_ModHandler.removeFurnaceSmelting(GT_OreDictUnificator.get(OrePrefixes.oreBlackgranite, Materials.Graphite, 1L)); - GT_ModHandler.addSmeltingRecipe(GT_OreDictUnificator.get(OrePrefixes.oreBlackgranite, Materials.Graphite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 1L)); + GT_ModHandler.addSmeltingRecipe( + GT_OreDictUnificator.get(OrePrefixes.ore, Materials.Graphite, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 1L)); + GT_ModHandler.removeFurnaceSmelting( + GT_OreDictUnificator.get(OrePrefixes.oreBlackgranite, Materials.Graphite, 1L)); + GT_ModHandler.addSmeltingRecipe( + GT_OreDictUnificator.get(OrePrefixes.oreBlackgranite, Materials.Graphite, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 1L)); GT_ModHandler.removeFurnaceSmelting(GT_OreDictUnificator.get(OrePrefixes.oreEndstone, Materials.Graphite, 1L)); - GT_ModHandler.addSmeltingRecipe(GT_OreDictUnificator.get(OrePrefixes.oreEndstone, Materials.Graphite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 1L)); - GT_ModHandler.removeFurnaceSmelting(GT_OreDictUnificator.get(OrePrefixes.oreNetherrack, Materials.Graphite, 1L)); - GT_ModHandler.addSmeltingRecipe(GT_OreDictUnificator.get(OrePrefixes.oreNetherrack, Materials.Graphite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 1L)); - GT_ModHandler.removeFurnaceSmelting(GT_OreDictUnificator.get(OrePrefixes.oreRedgranite, Materials.Graphite, 1L)); - GT_ModHandler.addSmeltingRecipe(GT_OreDictUnificator.get(OrePrefixes.oreRedgranite, Materials.Graphite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 1L)); - - GT_ModHandler.addPulverisationRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "tile.BlockSkyStone", 1L, 32767), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 45), GT_Values.NI, 0, false); - GT_ModHandler.addPulverisationRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "tile.BlockSkyChest", 1L, 32767), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 8L, 45), GT_Values.NI, 0, false); - GT_ModHandler.addPulverisationRecipe(new ItemStack(Items.blaze_rod, 1), new ItemStack(Items.blaze_powder, 3), new ItemStack(Items.blaze_powder, 1), 50, false); - GT_ModHandler.addPulverisationRecipe(new ItemStack(Blocks.web, 1, 0), new ItemStack(Items.string, 1), new ItemStack(Items.string, 1), 50, false); - GT_ModHandler.addPulverisationRecipe(new ItemStack(Blocks.red_mushroom, 1, 32767), ItemList.IC2_Grin_Powder.get(1L)); - GT_ModHandler.addPulverisationRecipe(new ItemStack(Items.item_frame, 1, 32767), new ItemStack(Items.leather, 1), GT_OreDictUnificator.getDust(Materials.Wood, OrePrefixes.stick.mMaterialAmount * 4L), 95, false); - GT_ModHandler.addPulverisationRecipe(new ItemStack(Items.bow, 1, 0), new ItemStack(Items.string, 3), GT_OreDictUnificator.getDust(Materials.Wood, OrePrefixes.stick.mMaterialAmount * 3L), 95, false); + GT_ModHandler.addSmeltingRecipe( + GT_OreDictUnificator.get(OrePrefixes.oreEndstone, Materials.Graphite, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 1L)); + GT_ModHandler.removeFurnaceSmelting( + GT_OreDictUnificator.get(OrePrefixes.oreNetherrack, Materials.Graphite, 1L)); + GT_ModHandler.addSmeltingRecipe( + GT_OreDictUnificator.get(OrePrefixes.oreNetherrack, Materials.Graphite, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 1L)); + GT_ModHandler.removeFurnaceSmelting( + GT_OreDictUnificator.get(OrePrefixes.oreRedgranite, Materials.Graphite, 1L)); + GT_ModHandler.addSmeltingRecipe( + GT_OreDictUnificator.get(OrePrefixes.oreRedgranite, Materials.Graphite, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 1L)); + + GT_ModHandler.addPulverisationRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "tile.BlockSkyStone", 1L, 32767), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 45), + GT_Values.NI, + 0, + false); + GT_ModHandler.addPulverisationRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "tile.BlockSkyChest", 1L, 32767), + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 8L, 45), + GT_Values.NI, + 0, + false); + GT_ModHandler.addPulverisationRecipe( + new ItemStack(Items.blaze_rod, 1), + new ItemStack(Items.blaze_powder, 3), + new ItemStack(Items.blaze_powder, 1), + 50, + false); + GT_ModHandler.addPulverisationRecipe( + new ItemStack(Blocks.web, 1, 0), + new ItemStack(Items.string, 1), + new ItemStack(Items.string, 1), + 50, + false); + GT_ModHandler.addPulverisationRecipe( + new ItemStack(Blocks.red_mushroom, 1, 32767), ItemList.IC2_Grin_Powder.get(1L)); + GT_ModHandler.addPulverisationRecipe( + new ItemStack(Items.item_frame, 1, 32767), + new ItemStack(Items.leather, 1), + GT_OreDictUnificator.getDust(Materials.Wood, OrePrefixes.stick.mMaterialAmount * 4L), + 95, + false); + GT_ModHandler.addPulverisationRecipe( + new ItemStack(Items.bow, 1, 0), + new ItemStack(Items.string, 3), + GT_OreDictUnificator.getDust(Materials.Wood, OrePrefixes.stick.mMaterialAmount * 3L), + 95, + false); GT_ModHandler.addPulverisationRecipe(Materials.Brick.getIngots(1), Materials.Brick.getDustSmall(1)); GT_ModHandler.addPulverisationRecipe(new ItemStack(Blocks.brick_stairs, 1, 0), Materials.Brick.getDustSmall(6)); GT_ModHandler.addPulverisationRecipe(ItemList.CompressedFireclay.get(1), Materials.Fireclay.getDustSmall(1)); GT_ModHandler.addPulverisationRecipe(ItemList.Firebrick.get(1), Materials.Brick.getDust(1)); GT_ModHandler.addPulverisationRecipe(ItemList.Casing_Firebricks.get(1), Materials.Brick.getDust(4)); - GT_ModHandler.addPulverisationRecipe(ItemList.Machine_Bricked_BlastFurnace.get(1), Materials.Brick.getDust(8), Materials.Iron.getDust(1), true); - - GT_Values.RA.addSifterRecipe(new ItemStack(Blocks.gravel, 1, 0), new ItemStack[]{new ItemStack(Items.flint, 1, 0), new ItemStack(Items.flint, 1, 0), new ItemStack(Items.flint, 1, 0), new ItemStack(Items.flint, 1, 0), new ItemStack(Items.flint, 1, 0), new ItemStack(Items.flint, 1, 0)}, new int[]{10000, 9000, 8000, 6000, 3300, 2500}, 600, 16); - GT_Values.RA.addSifterRecipe(GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Coal, 1L), new ItemStack[]{new ItemStack(Items.coal, 1, 0), new ItemStack(Items.coal, 1, 0), new ItemStack(Items.coal, 1, 0), new ItemStack(Items.coal, 1, 0), new ItemStack(Items.coal, 1, 0), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L)}, new int[]{10000, 9000, 8000, 7000, 6000, 5000}, 600, 16); - - GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.stonebrick, 1, 0), new ItemStack(Blocks.stonebrick, 1, 2), 10, 16); - GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.stone, 1, 0), new ItemStack(Blocks.cobblestone, 1, 0), 10, 16); - GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.cobblestone, 1, 0), new ItemStack(Blocks.gravel, 1, 0), 10, 16); + GT_ModHandler.addPulverisationRecipe( + ItemList.Machine_Bricked_BlastFurnace.get(1), + Materials.Brick.getDust(8), + Materials.Iron.getDust(1), + true); + + GT_Values.RA.addSifterRecipe( + new ItemStack(Blocks.gravel, 1, 0), + new ItemStack[] { + new ItemStack(Items.flint, 1, 0), + new ItemStack(Items.flint, 1, 0), + new ItemStack(Items.flint, 1, 0), + new ItemStack(Items.flint, 1, 0), + new ItemStack(Items.flint, 1, 0), + new ItemStack(Items.flint, 1, 0) + }, + new int[] {10000, 9000, 8000, 6000, 3300, 2500}, + 600, + 16); + GT_Values.RA.addSifterRecipe( + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Coal, 1L), + new ItemStack[] { + new ItemStack(Items.coal, 1, 0), + new ItemStack(Items.coal, 1, 0), + new ItemStack(Items.coal, 1, 0), + new ItemStack(Items.coal, 1, 0), + new ItemStack(Items.coal, 1, 0), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L) + }, + new int[] {10000, 9000, 8000, 7000, 6000, 5000}, + 600, + 16); + + GT_Values.RA.addForgeHammerRecipe( + new ItemStack(Blocks.stonebrick, 1, 0), new ItemStack(Blocks.stonebrick, 1, 2), 10, 16); + GT_Values.RA.addForgeHammerRecipe( + new ItemStack(Blocks.stone, 1, 0), new ItemStack(Blocks.cobblestone, 1, 0), 10, 16); + GT_Values.RA.addForgeHammerRecipe( + new ItemStack(Blocks.cobblestone, 1, 0), new ItemStack(Blocks.gravel, 1, 0), 10, 16); GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.gravel, 1, 0), new ItemStack(Blocks.sand, 1, 0), 10, 16); - GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.sandstone, 1, 32767), new ItemStack(Blocks.sand, 1, 0), 10, 16); - GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.ice, 1, 0), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ice, 1L), 10, 16); - GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.packed_ice, 1, 0), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ice, 2L), 10, 16); - GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.brick_block, 1, 0), new ItemStack(Items.brick, 3, 0), 10, 16); - GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.nether_brick, 1, 0), new ItemStack(Items.netherbrick, 3, 0), 10, 16); - GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.stained_glass, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 1L), 10, 16); - GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.glass, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 1L), 10, 10); - GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.stained_glass_pane, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L), 10, 16); - GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.glass_pane, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L), 10, 16); + GT_Values.RA.addForgeHammerRecipe( + new ItemStack(Blocks.sandstone, 1, 32767), new ItemStack(Blocks.sand, 1, 0), 10, 16); + GT_Values.RA.addForgeHammerRecipe( + new ItemStack(Blocks.ice, 1, 0), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ice, 1L), 10, 16); + GT_Values.RA.addForgeHammerRecipe( + new ItemStack(Blocks.packed_ice, 1, 0), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ice, 2L), + 10, + 16); + GT_Values.RA.addForgeHammerRecipe( + new ItemStack(Blocks.brick_block, 1, 0), new ItemStack(Items.brick, 3, 0), 10, 16); + GT_Values.RA.addForgeHammerRecipe( + new ItemStack(Blocks.nether_brick, 1, 0), new ItemStack(Items.netherbrick, 3, 0), 10, 16); + GT_Values.RA.addForgeHammerRecipe( + new ItemStack(Blocks.stained_glass, 1, 32767), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 1L), + 10, + 16); + GT_Values.RA.addForgeHammerRecipe( + new ItemStack(Blocks.glass, 1, 32767), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 1L), + 10, + 10); + GT_Values.RA.addForgeHammerRecipe( + new ItemStack(Blocks.stained_glass_pane, 1, 32767), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L), + 10, + 16); + GT_Values.RA.addForgeHammerRecipe( + new ItemStack(Blocks.glass_pane, 1, 32767), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L), + 10, + 16); GT_Values.RA.addForgeHammerRecipe(Materials.Brick.getIngots(1), Materials.Brick.getDustSmall(1), 10, 16); GT_Values.RA.addForgeHammerRecipe(ItemList.Firebrick.get(1), Materials.Brick.getDust(1), 10, 16); GT_Values.RA.addForgeHammerRecipe(ItemList.Casing_Firebricks.get(1), ItemList.Firebrick.get(3), 10, 16); if (Loader.isModLoaded("HardcoreEnderExpansion")) { - GT_Values.RA.addForgeHammerRecipe(GT_ModHandler.getModItem("HardcoreEnderExpansion", "endium_ore", 1), GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.HeeEndium, 1), 16, 10); - GT_ModHandler.addPulverisationRecipe(GT_ModHandler.getModItem("HardcoreEnderExpansion", "endium_ore", 1), GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.HeeEndium, 2), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Endstone, 1), 50, GT_Values.NI, 0, true); - GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.HeeEndium, GT_ModHandler.getModItem("HardcoreEnderExpansion", "endium_ingot", 1), true, true); + GT_Values.RA.addForgeHammerRecipe( + GT_ModHandler.getModItem("HardcoreEnderExpansion", "endium_ore", 1), + GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.HeeEndium, 1), + 16, + 10); + GT_ModHandler.addPulverisationRecipe( + GT_ModHandler.getModItem("HardcoreEnderExpansion", "endium_ore", 1), + GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.HeeEndium, 2), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Endstone, 1), + 50, + GT_Values.NI, + 0, + true); + GT_OreDictUnificator.set( + OrePrefixes.ingot, + Materials.HeeEndium, + GT_ModHandler.getModItem("HardcoreEnderExpansion", "endium_ingot", 1), + true, + true); } // Giga chad trophy. GT_Values.RA.addPlasmaForgeRecipe( - new ItemStack[]{Materials.SpaceTime.getBlocks(64), ItemList.Field_Generator_UMV.get(64), Materials.SpaceTime.getBlocks(64)}, - new FluidStack[]{Materials.ExcitedDTEC.getFluid(100_000_000)}, - - new ItemStack[]{ItemList.GigaChad.get(1)}, - new FluidStack[]{GT_Values.NF}, - 86400 * 20 * 2, 2_000_000_000, 13500); - + new ItemStack[] { + Materials.SpaceTime.getBlocks(64), + ItemList.Field_Generator_UMV.get(64), + Materials.SpaceTime.getBlocks(64) + }, + new FluidStack[] {Materials.ExcitedDTEC.getFluid(100_000_000)}, + new ItemStack[] {ItemList.GigaChad.get(1)}, + new FluidStack[] {GT_Values.NF}, + 86400 * 20 * 2, + 2_000_000_000, + 13500); GT_Values.RA.addAmplifier(ItemList.IC2_Scrap.get(9L), 180, 1); GT_Values.RA.addAmplifier(ItemList.IC2_Scrapbox.get(1L), 180, 1); - GT_Values.RA.addBoxingRecipe(ItemList.IC2_Scrap.get(9L), ItemList.Schematic_3by3.get(0L), ItemList.IC2_Scrapbox.get(1L), 16, 1); - GT_Values.RA.addBoxingRecipe(ItemList.Food_Fries.get(1L), GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Paper, 1L), ItemList.Food_Packaged_Fries.get(1L), 64, 16); - GT_Values.RA.addBoxingRecipe(ItemList.Food_PotatoChips.get(1L), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 1L), ItemList.Food_Packaged_PotatoChips.get(1L), 64, 16); - GT_Values.RA.addBoxingRecipe(ItemList.Food_ChiliChips.get(1L), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 1L), ItemList.Food_Packaged_ChiliChips.get(1L), 64, 16); - - //fuel rod canner recipes - GT_Values.RA.addCannerRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Lithium, 1L), GT_ModHandler.getIC2Item("reactorLithiumCell", 1, 1), null, 16, 64); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getIC2Item("TritiumCell", 1), GT_ModHandler.getIC2Item("fuelRod", 1), Materials.Tritium.getGas(32), 10000, 16, 64); - GT_Values.RA.addCannerRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Thorium, 3), ItemList.ThoriumCell_1.get(1L), null, 30, 16); - GT_Values.RA.addCannerRecipe(ItemList.Large_Fluid_Cell_TungstenSteel.get(1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NaquadahEnriched, 3), ItemList.NaquadahCell_1.get(1L), null, 30, 16); - GT_Values.RA.addCannerRecipe(ItemList.Large_Fluid_Cell_TungstenSteel.get(1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadria, 3), ItemList.MNqCell_1.get(1L), null, 30, 16); - GT_Values.RA.addCannerRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), GT_ModHandler.getIC2Item("UranFuel", 1), ItemList.Uraniumcell_1.get(1), null, 30, 16); - GT_Values.RA.addCannerRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), GT_ModHandler.getIC2Item("MOXFuel", 1), ItemList.Moxcell_1.get(1), null, 30, 16); + GT_Values.RA.addBoxingRecipe( + ItemList.IC2_Scrap.get(9L), ItemList.Schematic_3by3.get(0L), ItemList.IC2_Scrapbox.get(1L), 16, 1); + GT_Values.RA.addBoxingRecipe( + ItemList.Food_Fries.get(1L), + GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Paper, 1L), + ItemList.Food_Packaged_Fries.get(1L), + 64, + 16); + GT_Values.RA.addBoxingRecipe( + ItemList.Food_PotatoChips.get(1L), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 1L), + ItemList.Food_Packaged_PotatoChips.get(1L), + 64, + 16); + GT_Values.RA.addBoxingRecipe( + ItemList.Food_ChiliChips.get(1L), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 1L), + ItemList.Food_Packaged_ChiliChips.get(1L), + 64, + 16); + + // fuel rod canner recipes + GT_Values.RA.addCannerRecipe( + GT_ModHandler.getIC2Item("fuelRod", 1), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Lithium, 1L), + GT_ModHandler.getIC2Item("reactorLithiumCell", 1, 1), + null, + 16, + 64); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getIC2Item("TritiumCell", 1), + GT_ModHandler.getIC2Item("fuelRod", 1), + Materials.Tritium.getGas(32), + 10000, + 16, + 64); + GT_Values.RA.addCannerRecipe( + GT_ModHandler.getIC2Item("fuelRod", 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Thorium, 3), + ItemList.ThoriumCell_1.get(1L), + null, + 30, + 16); + GT_Values.RA.addCannerRecipe( + ItemList.Large_Fluid_Cell_TungstenSteel.get(1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NaquadahEnriched, 3), + ItemList.NaquadahCell_1.get(1L), + null, + 30, + 16); + GT_Values.RA.addCannerRecipe( + ItemList.Large_Fluid_Cell_TungstenSteel.get(1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadria, 3), + ItemList.MNqCell_1.get(1L), + null, + 30, + 16); + GT_Values.RA.addCannerRecipe( + GT_ModHandler.getIC2Item("fuelRod", 1), + GT_ModHandler.getIC2Item("UranFuel", 1), + ItemList.Uraniumcell_1.get(1), + null, + 30, + 16); + GT_Values.RA.addCannerRecipe( + GT_ModHandler.getIC2Item("fuelRod", 1), + GT_ModHandler.getIC2Item("MOXFuel", 1), + ItemList.Moxcell_1.get(1), + null, + 30, + 16); // radiation manufacturing - GT_Values.RA.addMixerRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), new ItemStack(Items.glowstone_dust, 9), NI, NI, Materials.Helium.getGas(250), NF, ItemList.GlowstoneCell.get(1), 30, 16); - RA.addThermalCentrifugeRecipe(ItemList.SunnariumCell.get(1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sunnarium, 1L), new ItemStack(Items.glowstone_dust, 2), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 1L), 500, 48); - //Fusion tiering -T1 32768EU/t -T2 65536EU/t - T3 131073EU/t - //Fusion with margin 32700 65450 131000 - //Startup max 160M EU 320M EU 640M EU - //Fluid input,Fluid input,Fluid output,ticks,EU/t,Startup - //FT1, FT2, FT3 - fusion tier required, + - requires different startup recipe (startup cost bigger than available on the tier) - GT_Values.RA.addFusionReactorRecipe(Materials.Lithium.getMolten(16), Materials.Tungsten.getMolten(16), Materials.Iridium.getMolten(16), 64, 32700, 300000000); //FT1+ - utility - GT_Values.RA.addFusionReactorRecipe(Materials.Deuterium.getGas(125), Materials.Tritium.getGas(125), Materials.Helium.getPlasma(125), 16, 4096, 40000000); //FT1 Cheap - farmable - GT_Values.RA.addFusionReactorRecipe(Materials.Deuterium.getGas(125), Materials.Helium_3.getGas(125), Materials.Helium.getPlasma(125), 16, 2048, 60000000); //FT1 Expensive // - GT_Values.RA.addFusionReactorRecipe(Materials.Carbon.getMolten(125), Materials.Helium_3.getGas(125), Materials.Oxygen.getPlasma(125), 32, 4096, 80000000); //FT1 Expensive // - GT_Values.RA.addFusionReactorRecipe(Materials.Aluminium.getMolten(16), Materials.Lithium.getMolten(16), Materials.Sulfur.getPlasma(144), 32, 10240, 240000000); //FT1+ Cheap - GT_Values.RA.addFusionReactorRecipe(Materials.Beryllium.getMolten(16), Materials.Deuterium.getGas(375), Materials.Nitrogen.getPlasma(125), 16, 16384, 180000000); //FT1+ Expensive // - GT_Values.RA.addFusionReactorRecipe(Materials.Silicon.getMolten(16), Materials.Magnesium.getMolten(16), Materials.Iron.getPlasma(144), 32, 8192, 360000000); //FT1++ Cheap // - GT_Values.RA.addFusionReactorRecipe(Materials.Potassium.getMolten(16), Materials.Fluorine.getGas(144), Materials.Nickel.getPlasma(144), 16, 32700, 480000000); //FT1++ Expensive // - GT_Values.RA.addFusionReactorRecipe(Materials.Beryllium.getMolten(16), Materials.Tungsten.getMolten(16), Materials.Platinum.getMolten(16), 32, 32700, 150000000); //FT1 - utility - GT_Values.RA.addFusionReactorRecipe(Materials.Neodymium.getMolten(16), Materials.Hydrogen.getGas(48), Materials.Europium.getMolten(16), 32, 24576, 150000000); //FT1 - utility - GT_Values.RA.addFusionReactorRecipe(Materials.Lutetium.getMolten(16), Materials.Chrome.getMolten(16), Materials.Americium.getMolten(16), 96, 49152, 200000000); //FT2 - utility - GT_Values.RA.addFusionReactorRecipe(Materials.Plutonium.getMolten(16), Materials.Thorium.getMolten(16), Materials.Naquadah.getMolten(16), 64, 32700, 300000000); //FT1+ - utility - GT_Values.RA.addFusionReactorRecipe(Materials.Americium.getMolten(144), Materials.Naquadria.getMolten(144), Materials.Neutronium.getMolten(144), 240, 122880, 640000000); //FT3 - utility - GT_Values.RA.addFusionReactorRecipe(Materials.Glowstone.getMolten(16), Materials.Helium.getPlasma(4), Materials.Sunnarium.getMolten(16), 32, 7680, 40000000); //Mark 1 Expensive // - - GT_Values.RA.addFusionReactorRecipe(Materials.Tungsten.getMolten(16), Materials.Helium.getGas(16), Materials.Osmium.getMolten(16), 256, 24578, 150000000); //FT1 - utility - GT_Values.RA.addFusionReactorRecipe(Materials.Manganese.getMolten(16), Materials.Hydrogen.getGas(16), Materials.Iron.getMolten(16), 64, 8192, 120000000); //FT1 - utility - GT_Values.RA.addFusionReactorRecipe(Materials.Magnesium.getMolten(128), Materials.Oxygen.getGas(128), Materials.Calcium.getPlasma(16), 128, 8192, 120000000); // - GT_Values.RA.addFusionReactorRecipe(Materials.Mercury.getFluid(16), Materials.Magnesium.getMolten(16), Materials.Uranium.getMolten(16), 64, 49152, 240000000); //FT2 - utility - GT_Values.RA.addFusionReactorRecipe(Materials.Gold.getMolten(16), Materials.Aluminium.getMolten(16), Materials.Uranium.getMolten(16), 64, 49152, 240000000); //FT2 - utility - GT_Values.RA.addFusionReactorRecipe(Materials.Uranium.getMolten(16), Materials.Helium.getGas(16), Materials.Plutonium.getMolten(16), 128, 49152, 480000000); //FT2+ - utility - GT_Values.RA.addFusionReactorRecipe(Materials.Vanadium.getMolten(16), Materials.Hydrogen.getGas(125), Materials.Chrome.getMolten(16), 64, 24576, 140000000); //FT1 - utility - - GT_Values.RA.addFusionReactorRecipe(Materials.Gallium.getMolten(16), Materials.Radon.getGas(125), Materials.Duranium.getMolten(16), 64, 16384, 140000000); - GT_Values.RA.addFusionReactorRecipe(Materials.Titanium.getMolten(48), Materials.Duranium.getMolten(32), Materials.Tritanium.getMolten(16), 64, 32700, 200000000); - GT_Values.RA.addFusionReactorRecipe(Materials.Tantalum.getMolten(16), Materials.Tritium.getGas(16), Materials.Tungsten.getMolten(16), 16, 24576, 200000000); // - GT_Values.RA.addFusionReactorRecipe(Materials.Silver.getMolten(16), Materials.Lithium.getMolten(16), Materials.Indium.getMolten(16), 32, 24576, 380000000); // - - //NEW RECIPES FOR FUSION - GT_Values.RA.addFusionReactorRecipe(Materials.Magnesium.getMolten(144), Materials.Carbon.getMolten(144), Materials.Argon.getPlasma(125), 32, 24576, 180000000);//FT1+ - utility - - GT_Values.RA.addFusionReactorRecipe(Materials.Copper.getMolten(72), Materials.Tritium.getGas(250), Materials.Zinc.getPlasma(72), 16, 49152, 180000000);//FT2 - farmable - GT_Values.RA.addFusionReactorRecipe(Materials.Cobalt.getMolten(144), Materials.Silicon.getMolten(144), Materials.Niobium.getPlasma(144), 16, 49152, 200000000);//FT2 - utility - GT_Values.RA.addFusionReactorRecipe(Materials.Gold.getMolten(144), Materials.Arsenic.getMolten(144), Materials.Silver.getPlasma(144), 16, 49152, 350000000);//FT2+ - GT_Values.RA.addFusionReactorRecipe(Materials.Silver.getMolten(144), Materials.Helium_3.getGas(375), Materials.Tin.getPlasma(144), 16, 49152, 280000000);//FT2 - GT_Values.RA.addFusionReactorRecipe(Materials.Tungsten.getMolten(144), Materials.Carbon.getMolten(144), Materials.Mercury.getPlasma(144), 16, 49152, 300000000);//FT2 - - GT_Values.RA.addFusionReactorRecipe(Materials.Tantalum.getMolten(144), Materials.Zinc.getPlasma(72), Materials.Bismuth.getPlasma(144), 16, 98304, 350000000);//FT3 - farmable - GT_Values.RA.addFusionReactorRecipe(Materials.Caesium.getMolten(144), Materials.Carbon.getMolten(144), Materials.Promethium.getMolten(144), 64, 49152, 400000000);//FT3 - GT_Values.RA.addFusionReactorRecipe(Materials.Iridium.getMolten(144), Materials.Fluorine.getGas(500), Materials.Radon.getPlasma(144), 32, 98304, 450000000);//FT3 - utility - GT_Values.RA.addFusionReactorRecipe(Materials.Plutonium241.getMolten(144), Materials.Hydrogen.getGas(2000), Materials.Americium.getPlasma(144), 64, 98304, 500000000);//FT3 - //GT_Values.RA.addFusionReactorRecipe(Materials.Neutronium.getMolten(144), Materials.Neutronium.getMolten(144), Materials.Neutronium.getPlasma(72), 64, 130000, 640000000);//FT3+ - yes it is a bit troll XD + GT_Values.RA.addMixerRecipe( + GT_ModHandler.getIC2Item("fuelRod", 1), + new ItemStack(Items.glowstone_dust, 9), + NI, + NI, + Materials.Helium.getGas(250), + NF, + ItemList.GlowstoneCell.get(1), + 30, + 16); + RA.addThermalCentrifugeRecipe( + ItemList.SunnariumCell.get(1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sunnarium, 1L), + new ItemStack(Items.glowstone_dust, 2), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 1L), + 500, + 48); + // Fusion tiering -T1 32768EU/t -T2 65536EU/t - T3 131073EU/t + // Fusion with margin 32700 65450 131000 + // Startup max 160M EU 320M EU 640M EU + // Fluid input,Fluid input,Fluid output,ticks,EU/t,Startup + // FT1, FT2, FT3 - fusion tier required, + - requires different startup recipe (startup cost bigger than + // available on the tier) + GT_Values.RA.addFusionReactorRecipe( + Materials.Lithium.getMolten(16), + Materials.Tungsten.getMolten(16), + Materials.Iridium.getMolten(16), + 64, + 32700, + 300000000); // FT1+ - utility + GT_Values.RA.addFusionReactorRecipe( + Materials.Deuterium.getGas(125), + Materials.Tritium.getGas(125), + Materials.Helium.getPlasma(125), + 16, + 4096, + 40000000); // FT1 Cheap - farmable + GT_Values.RA.addFusionReactorRecipe( + Materials.Deuterium.getGas(125), + Materials.Helium_3.getGas(125), + Materials.Helium.getPlasma(125), + 16, + 2048, + 60000000); // FT1 Expensive // + GT_Values.RA.addFusionReactorRecipe( + Materials.Carbon.getMolten(125), + Materials.Helium_3.getGas(125), + Materials.Oxygen.getPlasma(125), + 32, + 4096, + 80000000); // FT1 Expensive // + GT_Values.RA.addFusionReactorRecipe( + Materials.Aluminium.getMolten(16), + Materials.Lithium.getMolten(16), + Materials.Sulfur.getPlasma(144), + 32, + 10240, + 240000000); // FT1+ Cheap + GT_Values.RA.addFusionReactorRecipe( + Materials.Beryllium.getMolten(16), + Materials.Deuterium.getGas(375), + Materials.Nitrogen.getPlasma(125), + 16, + 16384, + 180000000); // FT1+ Expensive // + GT_Values.RA.addFusionReactorRecipe( + Materials.Silicon.getMolten(16), + Materials.Magnesium.getMolten(16), + Materials.Iron.getPlasma(144), + 32, + 8192, + 360000000); // FT1++ Cheap // + GT_Values.RA.addFusionReactorRecipe( + Materials.Potassium.getMolten(16), + Materials.Fluorine.getGas(144), + Materials.Nickel.getPlasma(144), + 16, + 32700, + 480000000); // FT1++ Expensive // + GT_Values.RA.addFusionReactorRecipe( + Materials.Beryllium.getMolten(16), + Materials.Tungsten.getMolten(16), + Materials.Platinum.getMolten(16), + 32, + 32700, + 150000000); // FT1 - utility + GT_Values.RA.addFusionReactorRecipe( + Materials.Neodymium.getMolten(16), + Materials.Hydrogen.getGas(48), + Materials.Europium.getMolten(16), + 32, + 24576, + 150000000); // FT1 - utility + GT_Values.RA.addFusionReactorRecipe( + Materials.Lutetium.getMolten(16), + Materials.Chrome.getMolten(16), + Materials.Americium.getMolten(16), + 96, + 49152, + 200000000); // FT2 - utility + GT_Values.RA.addFusionReactorRecipe( + Materials.Plutonium.getMolten(16), + Materials.Thorium.getMolten(16), + Materials.Naquadah.getMolten(16), + 64, + 32700, + 300000000); // FT1+ - utility + GT_Values.RA.addFusionReactorRecipe( + Materials.Americium.getMolten(144), + Materials.Naquadria.getMolten(144), + Materials.Neutronium.getMolten(144), + 240, + 122880, + 640000000); // FT3 - utility + GT_Values.RA.addFusionReactorRecipe( + Materials.Glowstone.getMolten(16), + Materials.Helium.getPlasma(4), + Materials.Sunnarium.getMolten(16), + 32, + 7680, + 40000000); // Mark 1 Expensive // + + GT_Values.RA.addFusionReactorRecipe( + Materials.Tungsten.getMolten(16), + Materials.Helium.getGas(16), + Materials.Osmium.getMolten(16), + 256, + 24578, + 150000000); // FT1 - utility + GT_Values.RA.addFusionReactorRecipe( + Materials.Manganese.getMolten(16), + Materials.Hydrogen.getGas(16), + Materials.Iron.getMolten(16), + 64, + 8192, + 120000000); // FT1 - utility + GT_Values.RA.addFusionReactorRecipe( + Materials.Magnesium.getMolten(128), + Materials.Oxygen.getGas(128), + Materials.Calcium.getPlasma(16), + 128, + 8192, + 120000000); // + GT_Values.RA.addFusionReactorRecipe( + Materials.Mercury.getFluid(16), + Materials.Magnesium.getMolten(16), + Materials.Uranium.getMolten(16), + 64, + 49152, + 240000000); // FT2 - utility + GT_Values.RA.addFusionReactorRecipe( + Materials.Gold.getMolten(16), + Materials.Aluminium.getMolten(16), + Materials.Uranium.getMolten(16), + 64, + 49152, + 240000000); // FT2 - utility + GT_Values.RA.addFusionReactorRecipe( + Materials.Uranium.getMolten(16), + Materials.Helium.getGas(16), + Materials.Plutonium.getMolten(16), + 128, + 49152, + 480000000); // FT2+ - utility + GT_Values.RA.addFusionReactorRecipe( + Materials.Vanadium.getMolten(16), + Materials.Hydrogen.getGas(125), + Materials.Chrome.getMolten(16), + 64, + 24576, + 140000000); // FT1 - utility + + GT_Values.RA.addFusionReactorRecipe( + Materials.Gallium.getMolten(16), + Materials.Radon.getGas(125), + Materials.Duranium.getMolten(16), + 64, + 16384, + 140000000); + GT_Values.RA.addFusionReactorRecipe( + Materials.Titanium.getMolten(48), + Materials.Duranium.getMolten(32), + Materials.Tritanium.getMolten(16), + 64, + 32700, + 200000000); + GT_Values.RA.addFusionReactorRecipe( + Materials.Tantalum.getMolten(16), + Materials.Tritium.getGas(16), + Materials.Tungsten.getMolten(16), + 16, + 24576, + 200000000); // + GT_Values.RA.addFusionReactorRecipe( + Materials.Silver.getMolten(16), + Materials.Lithium.getMolten(16), + Materials.Indium.getMolten(16), + 32, + 24576, + 380000000); // + + // NEW RECIPES FOR FUSION + GT_Values.RA.addFusionReactorRecipe( + Materials.Magnesium.getMolten(144), + Materials.Carbon.getMolten(144), + Materials.Argon.getPlasma(125), + 32, + 24576, + 180000000); // FT1+ - utility + + GT_Values.RA.addFusionReactorRecipe( + Materials.Copper.getMolten(72), + Materials.Tritium.getGas(250), + Materials.Zinc.getPlasma(72), + 16, + 49152, + 180000000); // FT2 - farmable + GT_Values.RA.addFusionReactorRecipe( + Materials.Cobalt.getMolten(144), + Materials.Silicon.getMolten(144), + Materials.Niobium.getPlasma(144), + 16, + 49152, + 200000000); // FT2 - utility + GT_Values.RA.addFusionReactorRecipe( + Materials.Gold.getMolten(144), + Materials.Arsenic.getMolten(144), + Materials.Silver.getPlasma(144), + 16, + 49152, + 350000000); // FT2+ + GT_Values.RA.addFusionReactorRecipe( + Materials.Silver.getMolten(144), + Materials.Helium_3.getGas(375), + Materials.Tin.getPlasma(144), + 16, + 49152, + 280000000); // FT2 + GT_Values.RA.addFusionReactorRecipe( + Materials.Tungsten.getMolten(144), + Materials.Carbon.getMolten(144), + Materials.Mercury.getPlasma(144), + 16, + 49152, + 300000000); // FT2 + + GT_Values.RA.addFusionReactorRecipe( + Materials.Tantalum.getMolten(144), + Materials.Zinc.getPlasma(72), + Materials.Bismuth.getPlasma(144), + 16, + 98304, + 350000000); // FT3 - farmable + GT_Values.RA.addFusionReactorRecipe( + Materials.Caesium.getMolten(144), + Materials.Carbon.getMolten(144), + Materials.Promethium.getMolten(144), + 64, + 49152, + 400000000); // FT3 + GT_Values.RA.addFusionReactorRecipe( + Materials.Iridium.getMolten(144), + Materials.Fluorine.getGas(500), + Materials.Radon.getPlasma(144), + 32, + 98304, + 450000000); // FT3 - utility + GT_Values.RA.addFusionReactorRecipe( + Materials.Plutonium241.getMolten(144), + Materials.Hydrogen.getGas(2000), + Materials.Americium.getPlasma(144), + 64, + 98304, + 500000000); // FT3 + // GT_Values.RA.addFusionReactorRecipe(Materials.Neutronium.getMolten(144), Materials.Neutronium.getMolten(144), + // Materials.Neutronium.getPlasma(72), 64, 130000, 640000000);//FT3+ - yes it is a bit troll XD GT_ModHandler.removeRecipeByOutput(ItemList.IC2_Fertilizer.get(1L)); - GT_Values.RA.addImplosionRecipe(ItemList.IC2_Compressed_Coal_Chunk.get(1L), 8, ItemList.IC2_Industrial_Diamond.get(1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 4L)); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 4L), GT_OreDictUnificator.get(OrePrefixes.plateAlloy, Materials.Advanced, 4L), GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Diamond, 1L), GT_Utility.getIntegratedCircuit(2)}, GT_Values.NF, ItemList.Ingot_IridiumAlloy.get(1L), 1200, 7680); - GT_Values.RA.addImplosionRecipe(ItemList.Ingot_IridiumAlloy.get(1L), 8, GT_OreDictUnificator.get(OrePrefixes.plateAlloy, Materials.Iridium, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 4L)); + GT_Values.RA.addImplosionRecipe( + ItemList.IC2_Compressed_Coal_Chunk.get(1L), + 8, + ItemList.IC2_Industrial_Diamond.get(1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 4L)); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 4L), + GT_OreDictUnificator.get(OrePrefixes.plateAlloy, Materials.Advanced, 4L), + GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Diamond, 1L), + GT_Utility.getIntegratedCircuit(2) + }, + GT_Values.NF, + ItemList.Ingot_IridiumAlloy.get(1L), + 1200, + 7680); + GT_Values.RA.addImplosionRecipe( + ItemList.Ingot_IridiumAlloy.get(1L), + 8, + GT_OreDictUnificator.get(OrePrefixes.plateAlloy, Materials.Iridium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 4L)); if (Loader.isModLoaded("GalacticraftMars")) { - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.compressed, Materials.Bronze, 1L), GT_OreDictUnificator.get(OrePrefixes.compressed, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.compressed, Materials.Steel, 1L), GT_Utility.getIntegratedCircuit(1)}, Materials.StainlessSteel.getMolten(72L), ItemList.Ingot_Heavy1.get(1L), 300, 480); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_ModHandler.getModItem("GalacticraftCore", "item.heavyPlating", 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.MeteoricIron, 2L), GT_Utility.getIntegratedCircuit(1)}, Materials.TungstenSteel.getMolten(72L), ItemList.Ingot_Heavy2.get(1L), 300, 1920); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_ModHandler.getModItem("GalacticraftMars", "item.null", 1L, 3), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Desh, 4L), GT_Utility.getIntegratedCircuit(1)}, Materials.Platinum.getMolten(72L), ItemList.Ingot_Heavy3.get(1L), 300, 7680); - GT_Values.RA.addImplosionRecipe(ItemList.Ingot_Heavy1.get(1L), 8, GT_ModHandler.getModItem("GalacticraftCore", "item.heavyPlating", 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.StainlessSteel, 1L)); - GT_Values.RA.addImplosionRecipe(ItemList.Ingot_Heavy2.get(1L), 16, GT_ModHandler.getModItem("GalacticraftMars", "item.null", 1L, 3), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.TungstenSteel, 2L)); - GT_Values.RA.addImplosionRecipe(ItemList.Ingot_Heavy3.get(1L), 24, GT_ModHandler.getModItem("GalacticraftMars", "item.itemBasicAsteroids", 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Platinum, 3L)); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.compressed, Materials.Bronze, 1L), + GT_OreDictUnificator.get(OrePrefixes.compressed, Materials.Aluminium, 1L), + GT_OreDictUnificator.get(OrePrefixes.compressed, Materials.Steel, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + Materials.StainlessSteel.getMolten(72L), + ItemList.Ingot_Heavy1.get(1L), + 300, + 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_ModHandler.getModItem("GalacticraftCore", "item.heavyPlating", 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.MeteoricIron, 2L), + GT_Utility.getIntegratedCircuit(1) + }, + Materials.TungstenSteel.getMolten(72L), + ItemList.Ingot_Heavy2.get(1L), + 300, + 1920); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_ModHandler.getModItem("GalacticraftMars", "item.null", 1L, 3), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Desh, 4L), + GT_Utility.getIntegratedCircuit(1) + }, + Materials.Platinum.getMolten(72L), + ItemList.Ingot_Heavy3.get(1L), + 300, + 7680); + GT_Values.RA.addImplosionRecipe( + ItemList.Ingot_Heavy1.get(1L), + 8, + GT_ModHandler.getModItem("GalacticraftCore", "item.heavyPlating", 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.StainlessSteel, 1L)); + GT_Values.RA.addImplosionRecipe( + ItemList.Ingot_Heavy2.get(1L), + 16, + GT_ModHandler.getModItem("GalacticraftMars", "item.null", 1L, 3), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.TungstenSteel, 2L)); + GT_Values.RA.addImplosionRecipe( + ItemList.Ingot_Heavy3.get(1L), + 24, + GT_ModHandler.getModItem("GalacticraftMars", "item.itemBasicAsteroids", 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Platinum, 3L)); } - GT_Values.RA.addFluidExtractionRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Quartzite, 1L), null, Materials.Glass.getMolten(72), 10000, 600, 28); - //(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SiliconDioxide,1L), GT_OreDictUnificator.get(OrePrefixes.dust,Materials.SiliconDioxide,2L),GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glass,1L)/** GT_Utility.fillFluidContainer(Materials.Glass.getMolten(1000), ItemList.Cell_Empty.get(1), true, true)**/, 600, 16); - - GT_Values.RA.addDistillationTowerRecipe(Materials.Creosote.getFluid(1000L), new FluidStack[]{Materials.Lubricant.getFluid(500L)}, null, 400, 120); - GT_Values.RA.addDistillationTowerRecipe(Materials.SeedOil.getFluid(1400L), new FluidStack[]{Materials.Lubricant.getFluid(500L)}, null, 400, 120); - GT_Values.RA.addDistillationTowerRecipe(Materials.FishOil.getFluid(1200L), new FluidStack[]{Materials.Lubricant.getFluid(500L)}, null, 400, 120); - GT_Values.RA.addDistillationTowerRecipe(Materials.Biomass.getFluid(1000L), new FluidStack[]{Materials.Ethanol.getFluid(600L), Materials.Water.getFluid(300L)}, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 2L), 32, 400); - GT_Values.RA.addDistillationTowerRecipe(Materials.Water.getFluid(1000L), new FluidStack[]{GT_ModHandler.getDistilledWater(1000L)}, null, 32, 120); - - if(!GregTech_API.mIC2Classic){ - GT_Values.RA.addDistillationTowerRecipe(new FluidStack(FluidRegistry.getFluid("ic2biomass"), 3000), new FluidStack[]{new FluidStack(FluidRegistry.getFluid("ic2biogas"), 8000), Materials.Water.getFluid(125L)}, ItemList.IC2_Fertilizer.get(1), 250, 480); + GT_Values.RA.addFluidExtractionRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Quartzite, 1L), + null, + Materials.Glass.getMolten(72), + 10000, + 600, + 28); + // (GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SiliconDioxide,1L), + // GT_OreDictUnificator.get(OrePrefixes.dust,Materials.SiliconDioxide,2L),GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glass,1L)/** GT_Utility.fillFluidContainer(Materials.Glass.getMolten(1000), ItemList.Cell_Empty.get(1), true, true)**/, 600, 16); + + GT_Values.RA.addDistillationTowerRecipe( + Materials.Creosote.getFluid(1000L), + new FluidStack[] {Materials.Lubricant.getFluid(500L)}, + null, + 400, + 120); + GT_Values.RA.addDistillationTowerRecipe( + Materials.SeedOil.getFluid(1400L), + new FluidStack[] {Materials.Lubricant.getFluid(500L)}, + null, + 400, + 120); + GT_Values.RA.addDistillationTowerRecipe( + Materials.FishOil.getFluid(1200L), + new FluidStack[] {Materials.Lubricant.getFluid(500L)}, + null, + 400, + 120); + GT_Values.RA.addDistillationTowerRecipe( + Materials.Biomass.getFluid(1000L), + new FluidStack[] {Materials.Ethanol.getFluid(600L), Materials.Water.getFluid(300L)}, + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 2L), + 32, + 400); + GT_Values.RA.addDistillationTowerRecipe( + Materials.Water.getFluid(1000L), + new FluidStack[] {GT_ModHandler.getDistilledWater(1000L)}, + null, + 32, + 120); + + if (!GregTech_API.mIC2Classic) { + GT_Values.RA.addDistillationTowerRecipe( + new FluidStack(FluidRegistry.getFluid("ic2biomass"), 3000), + new FluidStack[] { + new FluidStack(FluidRegistry.getFluid("ic2biogas"), 8000), Materials.Water.getFluid(125L) + }, + ItemList.IC2_Fertilizer.get(1), + 250, + 480); GT_Values.RA.addFuel(GT_ModHandler.getIC2Item("biogasCell", 1L), null, 40, 1); - GT_Values.RA.addDistilleryRecipe(GT_Utility.getIntegratedCircuit(1), new FluidStack(FluidRegistry.getFluid("ic2biomass"), 20), new FluidStack(FluidRegistry.getFluid("ic2biogas"), 32), 40, 16, false); - GT_Values.RA.addDistilleryRecipe(GT_Utility.getIntegratedCircuit(2), new FluidStack(FluidRegistry.getFluid("ic2biomass"), 4), Materials.Water.getFluid(2), 80, 30, false); + GT_Values.RA.addDistilleryRecipe( + GT_Utility.getIntegratedCircuit(1), + new FluidStack(FluidRegistry.getFluid("ic2biomass"), 20), + new FluidStack(FluidRegistry.getFluid("ic2biogas"), 32), + 40, + 16, + false); + GT_Values.RA.addDistilleryRecipe( + GT_Utility.getIntegratedCircuit(2), + new FluidStack(FluidRegistry.getFluid("ic2biomass"), 4), + Materials.Water.getFluid(2), + 80, + 30, + false); } GT_Values.RA.addFuel(new ItemStack(Items.golden_apple, 1, 1), new ItemStack(Items.apple, 1), 6400, 5); @@ -1322,330 +7126,1256 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addFuel(GT_ModHandler.getModItem("ThaumicTinkerer", "kamiResource", 1L, 6), null, 720, 5); GT_Values.RA.addFuel(GT_ModHandler.getModItem("ThaumicTinkerer", "kamiResource", 1L, 7), null, 720, 5); - //H2O = 2H + O - GT_Values.RA.addElectrolyzerRecipe(GT_Utility.getIntegratedCircuit(1), ItemList.Cell_Empty.get(1L), Materials.Water.getFluid(1000L), Materials.Hydrogen.getGas(2000L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 2000, 30); - GT_Values.RA.addElectrolyzerRecipe(GT_Utility.getIntegratedCircuit(2), ItemList.Cell_Empty.get(1L), GT_ModHandler.getDistilledWater(1000L), Materials.Hydrogen.getGas(2000L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 2000, 30); - GT_Values.RA.addElectrolyzerRecipe(GT_Utility.getIntegratedCircuit(3), ItemList.Cell_Empty.get(2L), Materials.Water.getFluid(1000L), Materials.Oxygen.getGas(1000L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 2000, 30); - GT_Values.RA.addElectrolyzerRecipe(GT_Utility.getIntegratedCircuit(4), ItemList.Cell_Empty.get(2L), GT_ModHandler.getDistilledWater(1000L), Materials.Oxygen.getGas(1000L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 2000, 30); - GT_Values.RA.addElectrolyzerRecipe(GT_ModHandler.getIC2Item("electrolyzedWaterCell", 1L), ItemList.Cell_Empty.get(2L), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI,null, 30, 30); - GT_Values.RA.addElectrolyzerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 1L), 0, GT_ModHandler.getIC2Item("electrolyzedWaterCell", 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, 1470, 30); - - GT_Values.RA.addElectrolyzerRecipe(ItemList.Dye_Bonemeal.get(3L), 0, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcium, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, 98, 26); - GT_Values.RA.addElectrolyzerRecipe(new ItemStack(Blocks.sand, 8, 0), 0, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 3L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, 500, 25); - GT_Values.RA.addElectrolyzerRecipe(new ItemStack(Blocks.sand, 8, 1), 0, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 3L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, 500, 25); - //GT_Values.RA.addElectrolyzerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tungstate, 7L), GT_Utility.getIntegratedCircuit(1), Materials.Hydrogen.getGas(7000L), Materials.Oxygen.getGas(4000L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tungsten, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 2L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{10000, 10000, 0, 0, 0, 0}, 120, 1920); - //GT_Values.RA.addElectrolyzerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Scheelite, 7L), GT_Utility.getIntegratedCircuit(1), Materials.Hydrogen.getGas(7000L), Materials.Oxygen.getGas(4000L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tungsten, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcium, 2L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{10000, 10000, 0, 0, 0, 0}, 120, 1920); - GT_Values.RA.addElectrolyzerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 1), 0, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 4), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, 100, 64); - //ZnS = Zn + S + 1 Ga(9.17%) - GT_Values.RA.addElectrolyzerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sphalerite, 2), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Zinc, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gallium, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{10000, 10000, 917, 0, 0, 0},200, 30); - //IC2 Fertilizer = H2O + CaCO3 + C - GT_Values.RA.addElectrolyzerRecipe(ItemList.IC2_Fertilizer.get(1L), GT_Values.NI, GT_Values.NF, Materials.Water.getFluid(1000L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 100, 30); - - //3quartz dust + Na + H2O = 3quartz gem (Na loss - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NetherQuartz, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L), Materials.Water.getFluid(1000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.NetherQuartz, 3L), 500); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CertusQuartz, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L), Materials.Water.getFluid(1000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.CertusQuartz, 3L), 500); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Quartzite, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L), Materials.Water.getFluid(1000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Quartzite, 3L), 500); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NetherQuartz, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L), GT_ModHandler.getDistilledWater(1000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.NetherQuartz, 3L), 500); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CertusQuartz, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L), GT_ModHandler.getDistilledWater(1000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.CertusQuartz, 3L), 500); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Quartzite, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L), GT_ModHandler.getDistilledWater(1000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Quartzite, 3L), 500); - - //3UO2 + 4Al = 3U + 2Al2O3 - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Uraninite, 9L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 4L), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Uranium, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminiumoxide, 10L), 1000); - //UO2 + 2Mg = U + 2MgO - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Uraninite, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesium, 2L), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Uranium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesia, 4L), 1000); - //Ca + C + 3O = CaCO3 - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1L), Materials.Oxygen.getGas(3000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, 5L), 500); - //C + 4H = CH4 - GT_Values.RA.addChemicalRecipe(Materials.Carbon.getDust(1), GT_Utility.getIntegratedCircuit(1), Materials.Hydrogen.getGas(4000L), Materials.Methane.getGas(1000L), GT_Values.NI, 200); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Carbon.getDust(1), Materials.Empty.getCells(1), Materials.Hydrogen.getGas(4000L), GT_Values.NF, Materials.Methane.getCells(1), GT_Values.NI, 200, 30); - //O + 2H = H2O - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), GT_Values.NI, Materials.Hydrogen.getGas(2000L), GT_ModHandler.getDistilledWater(1000L), ItemList.Cell_Empty.get(1L), GT_Values.NI, 10, 30); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 1L), GT_Values.NI, Materials.Oxygen.getGas(500L), GT_ModHandler.getDistilledWater(500L), ItemList.Cell_Empty.get(1L), GT_Values.NI, 5, 30); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(22)}, new FluidStack[]{Materials.Hydrogen.getGas(16000), Materials.Oxygen.getGas(8000)}, new FluidStack[]{GT_ModHandler.getDistilledWater(8000)}, new ItemStack[]{}, 80, 30); - //TiO2 + 2C + 4Cl = TiCl4 + 2CO - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Rutile, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Carbon, 2L), Materials.Chlorine.getGas(4000L), Materials.Titaniumtetrachloride.getFluid(1000L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.CarbonMonoxide, 2L), 400, 480); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Rutile, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 2L), Materials.Chlorine.getGas(4000L), Materials.Titaniumtetrachloride.getFluid(1000L), GT_Values.NI, 400, 480); - //4Na + 2MgCl2 = 2Mg + 4NaCl - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesiumchloride, 6L), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesium, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Salt, 8L), 400, 300); + // H2O = 2H + O + GT_Values.RA.addElectrolyzerRecipe( + GT_Utility.getIntegratedCircuit(1), + ItemList.Cell_Empty.get(1L), + Materials.Water.getFluid(1000L), + Materials.Hydrogen.getGas(2000L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 2000, + 30); + GT_Values.RA.addElectrolyzerRecipe( + GT_Utility.getIntegratedCircuit(2), + ItemList.Cell_Empty.get(1L), + GT_ModHandler.getDistilledWater(1000L), + Materials.Hydrogen.getGas(2000L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 2000, + 30); + GT_Values.RA.addElectrolyzerRecipe( + GT_Utility.getIntegratedCircuit(3), + ItemList.Cell_Empty.get(2L), + Materials.Water.getFluid(1000L), + Materials.Oxygen.getGas(1000L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 2000, + 30); + GT_Values.RA.addElectrolyzerRecipe( + GT_Utility.getIntegratedCircuit(4), + ItemList.Cell_Empty.get(2L), + GT_ModHandler.getDistilledWater(1000L), + Materials.Oxygen.getGas(1000L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 2000, + 30); + GT_Values.RA.addElectrolyzerRecipe( + GT_ModHandler.getIC2Item("electrolyzedWaterCell", 1L), + ItemList.Cell_Empty.get(2L), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 30, + 30); + GT_Values.RA.addElectrolyzerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 1L), + 0, + GT_ModHandler.getIC2Item("electrolyzedWaterCell", 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + 1470, + 30); + + GT_Values.RA.addElectrolyzerRecipe( + ItemList.Dye_Bonemeal.get(3L), + 0, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcium, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + 98, + 26); + GT_Values.RA.addElectrolyzerRecipe( + new ItemStack(Blocks.sand, 8, 0), + 0, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 3L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + 500, + 25); + GT_Values.RA.addElectrolyzerRecipe( + new ItemStack(Blocks.sand, 8, 1), + 0, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 3L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + 500, + 25); + // GT_Values.RA.addElectrolyzerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tungstate, 7L), + // GT_Utility.getIntegratedCircuit(1), Materials.Hydrogen.getGas(7000L), Materials.Oxygen.getGas(4000L), + // GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tungsten, 1L), + // GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 2L), GT_Values.NI, GT_Values.NI, GT_Values.NI, + // GT_Values.NI, new int[]{10000, 10000, 0, 0, 0, 0}, 120, 1920); + // GT_Values.RA.addElectrolyzerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Scheelite, 7L), + // GT_Utility.getIntegratedCircuit(1), Materials.Hydrogen.getGas(7000L), Materials.Oxygen.getGas(4000L), + // GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tungsten, 1L), + // GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcium, 2L), GT_Values.NI, GT_Values.NI, GT_Values.NI, + // GT_Values.NI, new int[]{10000, 10000, 0, 0, 0, 0}, 120, 1920); + GT_Values.RA.addElectrolyzerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 1), + 0, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 4), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + 100, + 64); + // ZnS = Zn + S + 1 Ga(9.17%) + GT_Values.RA.addElectrolyzerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sphalerite, 2), + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Zinc, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gallium, 1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + new int[] {10000, 10000, 917, 0, 0, 0}, + 200, + 30); + // IC2 Fertilizer = H2O + CaCO3 + C + GT_Values.RA.addElectrolyzerRecipe( + ItemList.IC2_Fertilizer.get(1L), + GT_Values.NI, + GT_Values.NF, + Materials.Water.getFluid(1000L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 100, + 30); + + // 3quartz dust + Na + H2O = 3quartz gem (Na loss + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NetherQuartz, 3L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L), + Materials.Water.getFluid(1000L), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.NetherQuartz, 3L), + 500); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CertusQuartz, 3L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L), + Materials.Water.getFluid(1000L), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.CertusQuartz, 3L), + 500); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Quartzite, 3L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L), + Materials.Water.getFluid(1000L), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Quartzite, 3L), + 500); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NetherQuartz, 3L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L), + GT_ModHandler.getDistilledWater(1000L), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.NetherQuartz, 3L), + 500); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CertusQuartz, 3L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L), + GT_ModHandler.getDistilledWater(1000L), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.CertusQuartz, 3L), + 500); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Quartzite, 3L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L), + GT_ModHandler.getDistilledWater(1000L), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Quartzite, 3L), + 500); + + // 3UO2 + 4Al = 3U + 2Al2O3 + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Uraninite, 9L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 4L), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Uranium, 3L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminiumoxide, 10L), + 1000); + // UO2 + 2Mg = U + 2MgO + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Uraninite, 3L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesium, 2L), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Uranium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesia, 4L), + 1000); + // Ca + C + 3O = CaCO3 + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1L), + Materials.Oxygen.getGas(3000L), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, 5L), + 500); + // C + 4H = CH4 + GT_Values.RA.addChemicalRecipe( + Materials.Carbon.getDust(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Hydrogen.getGas(4000L), + Materials.Methane.getGas(1000L), + GT_Values.NI, + 200); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Carbon.getDust(1), + Materials.Empty.getCells(1), + Materials.Hydrogen.getGas(4000L), + GT_Values.NF, + Materials.Methane.getCells(1), + GT_Values.NI, + 200, + 30); + // O + 2H = H2O + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), + GT_Values.NI, + Materials.Hydrogen.getGas(2000L), + GT_ModHandler.getDistilledWater(1000L), + ItemList.Cell_Empty.get(1L), + GT_Values.NI, + 10, + 30); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 1L), + GT_Values.NI, + Materials.Oxygen.getGas(500L), + GT_ModHandler.getDistilledWater(500L), + ItemList.Cell_Empty.get(1L), + GT_Values.NI, + 5, + 30); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(22)}, + new FluidStack[] {Materials.Hydrogen.getGas(16000), Materials.Oxygen.getGas(8000)}, + new FluidStack[] {GT_ModHandler.getDistilledWater(8000)}, + new ItemStack[] {}, + 80, + 30); + // TiO2 + 2C + 4Cl = TiCl4 + 2CO + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Rutile, 1L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Carbon, 2L), + Materials.Chlorine.getGas(4000L), + Materials.Titaniumtetrachloride.getFluid(1000L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.CarbonMonoxide, 2L), + 400, + 480); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Rutile, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 2L), + Materials.Chlorine.getGas(4000L), + Materials.Titaniumtetrachloride.getFluid(1000L), + GT_Values.NI, + 400, + 480); + // 4Na + 2MgCl2 = 2Mg + 4NaCl + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesiumchloride, 6L), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesium, 2L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Salt, 8L), + 400, + 300); // rubber - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RawRubber, 9L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), GT_Values.NF, Materials.Rubber.getMolten(1296L), GT_Values.NI, 600, 16); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RawRubber, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Sulfur, 1L), GT_Values.NF, Materials.Rubber.getMolten(144L), GT_Values.NI, 100, 16); - //vanilla recipe - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Gold, 8L), new ItemStack(Items.melon, 1, 32767), new ItemStack(Items.speckled_melon, 1, 0), 50); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Gold, 8L), new ItemStack(Items.carrot, 1, 32767), new ItemStack(Items.golden_carrot, 1, 0), 50); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Gold, 8L), new ItemStack(Items.apple, 1, 32767), new ItemStack(Items.golden_apple, 1, 0), 50); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Gold, 8L), new ItemStack(Items.apple, 1, 32767), new ItemStack(Items.golden_apple, 1, 1), 50); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Blaze, 1L), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderPearl, 1L), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderEye, 1L), 200, 480); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Blaze, 1L), new ItemStack(Items.slime_ball, 1, 32767), new ItemStack(Items.magma_cream, 1, 0), 50); - //1/9U +Air ==Pu== 0.1Rn - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Plutonium, 8), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Uranium, 1), Materials.Air.getGas(1000), Materials.Radon.getGas(100), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plutonium, 8), 12000, 8); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Plutonium, 64L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Uranium, 1L), GT_Utility.getIntegratedCircuit(8)}, new FluidStack[]{Materials.Air.getGas(8000L)}, new FluidStack[]{Materials.Radon.getGas(800L)}, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plutonium, 64L)}, 1500, 480); - //Rn relate quantum recipe - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderEye, 1), Materials.Radon.getGas(250), ItemList.QuantumEye.get(1L), null, null, null, 480, 384); - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.NetherStar, 1), Materials.Radon.getGas(1250), ItemList.QuantumStar.get(1L), null, null, null, 1920, 384); - GT_Values.RA.addAutoclaveRecipe(GT_OreDictUnificator.get(ItemList.QuantumStar.get(1L)), Materials.Neutronium.getMolten(288), ItemList.Gravistar.get(1L), 10000, 480, 7680); - - //Silicon Line - //SiO2 + 2Mg = 2MgO + Si - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 3), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesium, 2), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesia, 4), 100, 8); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NetherQuartz, 3), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesium, 2), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesia, 4), 100, 8); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Quartzite, 6), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesium, 2), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesia, 4), 100, 8); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CertusQuartz, 3), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesium, 2), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesia, 4), 100, 8); - //3SiO2 + 4Al = 3Si + 2Al2O3 - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 9), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 4)}, null, null, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 3), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminiumoxide, 10)}, 10, 120); - //3SiF4 + 4Al = 3Si + 4AlF3 - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 4), GT_Utility.getIntegratedCircuit(1), Materials.SiliconTetrafluoride.getGas(3000), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 3), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.AluminiumFluoride, 16), 600, 30); - //SiO2 + 4HF = SiF4 + 2H2O - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 3), GT_Utility.getIntegratedCircuit(2), Materials.HydrofluoricAcid.getFluid(4000), Materials.SiliconTetrafluoride.getGas(1000), GT_Values.NI,300, 30); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NetherQuartz, 3), GT_Utility.getIntegratedCircuit(2), Materials.HydrofluoricAcid.getFluid(4000), Materials.SiliconTetrafluoride.getGas(1000), GT_Values.NI,300, 30); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CertusQuartz, 3), GT_Utility.getIntegratedCircuit(2), Materials.HydrofluoricAcid.getFluid(4000), Materials.SiliconTetrafluoride.getGas(1000), GT_Values.NI,300, 30); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Quartzite, 6), GT_Utility.getIntegratedCircuit(2), Materials.HydrofluoricAcid.getFluid(4000), Materials.SiliconTetrafluoride.getGas(1000), GT_Values.NI,300, 30); - //4Na + SiCl4 = 4NaCl + Si - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 4), GT_Utility.getIntegratedCircuit(1), Materials.SiliconTetrachloride.getFluid(1000), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Salt, 8), 100, 30); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RawRubber, 9L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), + GT_Values.NF, + Materials.Rubber.getMolten(1296L), + GT_Values.NI, + 600, + 16); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RawRubber, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Sulfur, 1L), + GT_Values.NF, + Materials.Rubber.getMolten(144L), + GT_Values.NI, + 100, + 16); + // vanilla recipe + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Gold, 8L), + new ItemStack(Items.melon, 1, 32767), + new ItemStack(Items.speckled_melon, 1, 0), + 50); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Gold, 8L), + new ItemStack(Items.carrot, 1, 32767), + new ItemStack(Items.golden_carrot, 1, 0), + 50); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Gold, 8L), + new ItemStack(Items.apple, 1, 32767), + new ItemStack(Items.golden_apple, 1, 0), + 50); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Gold, 8L), + new ItemStack(Items.apple, 1, 32767), + new ItemStack(Items.golden_apple, 1, 1), + 50); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Blaze, 1L), + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderPearl, 1L), + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderEye, 1L), + 200, + 480); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Blaze, 1L), + new ItemStack(Items.slime_ball, 1, 32767), + new ItemStack(Items.magma_cream, 1, 0), + 50); + // 1/9U +Air ==Pu== 0.1Rn + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Plutonium, 8), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Uranium, 1), + Materials.Air.getGas(1000), + Materials.Radon.getGas(100), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plutonium, 8), + 12000, + 8); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Plutonium, 64L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Uranium, 1L), + GT_Utility.getIntegratedCircuit(8) + }, + new FluidStack[] {Materials.Air.getGas(8000L)}, + new FluidStack[] {Materials.Radon.getGas(800L)}, + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plutonium, 64L)}, + 1500, + 480); + // Rn relate quantum recipe + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderEye, 1), + Materials.Radon.getGas(250), + ItemList.QuantumEye.get(1L), + null, + null, + null, + 480, + 384); + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.NetherStar, 1), + Materials.Radon.getGas(1250), + ItemList.QuantumStar.get(1L), + null, + null, + null, + 1920, + 384); + GT_Values.RA.addAutoclaveRecipe( + GT_OreDictUnificator.get(ItemList.QuantumStar.get(1L)), + Materials.Neutronium.getMolten(288), + ItemList.Gravistar.get(1L), + 10000, + 480, + 7680); + + // Silicon Line + // SiO2 + 2Mg = 2MgO + Si + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 3), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesium, 2), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesia, 4), + 100, + 8); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NetherQuartz, 3), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesium, 2), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesia, 4), + 100, + 8); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Quartzite, 6), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesium, 2), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesia, 4), + 100, + 8); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CertusQuartz, 3), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesium, 2), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Magnesia, 4), + 100, + 8); + // 3SiO2 + 4Al = 3Si + 2Al2O3 + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 9), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 4) + }, + null, + null, + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 3), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminiumoxide, 10) + }, + 10, + 120); + // 3SiF4 + 4Al = 3Si + 4AlF3 + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 4), + GT_Utility.getIntegratedCircuit(1), + Materials.SiliconTetrafluoride.getGas(3000), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 3), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.AluminiumFluoride, 16), + 600, + 30); + // SiO2 + 4HF = SiF4 + 2H2O + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 3), + GT_Utility.getIntegratedCircuit(2), + Materials.HydrofluoricAcid.getFluid(4000), + Materials.SiliconTetrafluoride.getGas(1000), + GT_Values.NI, + 300, + 30); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NetherQuartz, 3), + GT_Utility.getIntegratedCircuit(2), + Materials.HydrofluoricAcid.getFluid(4000), + Materials.SiliconTetrafluoride.getGas(1000), + GT_Values.NI, + 300, + 30); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CertusQuartz, 3), + GT_Utility.getIntegratedCircuit(2), + Materials.HydrofluoricAcid.getFluid(4000), + Materials.SiliconTetrafluoride.getGas(1000), + GT_Values.NI, + 300, + 30); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Quartzite, 6), + GT_Utility.getIntegratedCircuit(2), + Materials.HydrofluoricAcid.getFluid(4000), + Materials.SiliconTetrafluoride.getGas(1000), + GT_Values.NI, + 300, + 30); + // 4Na + SiCl4 = 4NaCl + Si + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 4), + GT_Utility.getIntegratedCircuit(1), + Materials.SiliconTetrachloride.getFluid(1000), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Salt, 8), + 100, + 30); if (Loader.isModLoaded("bartworks")) { - //CaSi2 + 2HCl = 2Si + CaCl2 + 2H - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CalciumDisilicide, 3), GT_Utility.getIntegratedCircuit(1), Materials.HydrochloricAcid.getFluid(2000), Materials.Hydrogen.getGas(2000), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 2), GT_ModHandler.getModItem("bartworks", "gt.bwMetaGenerateddust", 3L, 63), 900, 30); - //SiCl4 + 2Zn = 2ZnCl2 + Si - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Zinc, 2), GT_Utility.getIntegratedCircuit(1), Materials.SiliconTetrachloride.getFluid(1000), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 1), GT_ModHandler.getModItem("bartworks", "gt.bwMetaGenerateddust", 6L, 10052),400, 30); + // CaSi2 + 2HCl = 2Si + CaCl2 + 2H + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CalciumDisilicide, 3), + GT_Utility.getIntegratedCircuit(1), + Materials.HydrochloricAcid.getFluid(2000), + Materials.Hydrogen.getGas(2000), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 2), + GT_ModHandler.getModItem("bartworks", "gt.bwMetaGenerateddust", 3L, 63), + 900, + 30); + // SiCl4 + 2Zn = 2ZnCl2 + Si + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Zinc, 2), + GT_Utility.getIntegratedCircuit(1), + Materials.SiliconTetrachloride.getFluid(1000), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 1), + GT_ModHandler.getModItem("bartworks", "gt.bwMetaGenerateddust", 6L, 10052), + 400, + 30); } - //Si + 4Cl = SiCl4 - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 1), ItemList.Cell_Empty.get(2L), Materials.HydrochloricAcid.getFluid(3000), Materials.Trichlorosilane.getFluid(1000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2), GT_Values.NI, 300, 30); - //10Si + 30HCl -> 0.3 SiH2Cl2 + 9 HSiCl3 + 0.3 SiCl4 + 0.2 Si2Cl6 + 20.4H - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 10)}, new FluidStack[]{Materials.HydrochloricAcid.getFluid(30000)}, new FluidStack[]{Materials.Trichlorosilane.getFluid(9000), Materials.SiliconTetrachloride.getFluid(300), Materials.Hexachlorodisilane.getFluid(200), Materials.Dichlorosilane.getGas(300), Materials.Hydrogen.getGas(20400)}, null,150, 480); - //HSiCl3 + 2H = 3HCl + Si - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2), GT_Utility.getIntegratedCircuit(1), Materials.Trichlorosilane.getFluid(1000), Materials.HydrochloricAcid.getFluid(3000), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 1), ItemList.Cell_Empty.get(2L),300, 30); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Trichlorosilane, 1), GT_Utility.getIntegratedCircuit(1), Materials.Hydrogen.getGas(2000), Materials.HydrochloricAcid.getFluid(3000), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 1), ItemList.Cell_Empty.get(1L),300, 30); - //4HSiCl3 = 3SiCl4 + SiH4 - GT_Values.RA.addChemicalRecipe(ItemList.Cell_Empty.get(1L), GT_Utility.getIntegratedCircuit(2), Materials.Trichlorosilane.getFluid(4000), Materials.SiliconTetrachloride.getFluid(3000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Silane, 1), 240, 30); - //SiH4 = Si + 4H - GT_Values.RA.addChemicalRecipe(GT_Utility.getIntegratedCircuit(1), GT_Values.NI, Materials.Silane.getGas(1000), Materials.Hydrogen.getGas(4000), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 1), 300, 30); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Silane, 1), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Hydrogen.getGas(4000), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 1), ItemList.Cell_Empty.get(1L),300, 30); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Silane, 1), ItemList.Cell_Empty.get(3L), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 1), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 4),300, 30); - //Ca + 2H = CaH2 - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcium, 1), GT_Utility.getIntegratedCircuit(1), Materials.Hydrogen.getGas(2000), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calciumhydride, 3),400, 30); - //CaH2 + 2Si = CaSi2 + 2H - GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calciumhydride, 3), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 2), GT_Values.NF, Materials.Hydrogen.getGas(2000), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CalciumDisilicide, 3), GT_Values.NI, 300, 120, 1273); - //Si + 4Cl = SiCl4 - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 1), GT_Utility.getIntegratedCircuit(2), Materials.Chlorine.getGas(4000), Materials.SiliconTetrachloride.getFluid(1000), null,400, 30); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 1), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Chlorine, 4), GT_Values.NF, Materials.SiliconTetrachloride.getFluid(1000), ItemList.Cell_Empty.get(4L), GT_Values.NI,400, 30); - - GT_Values.RA.addBenderRecipe(ItemList.IC2_Mixed_Metal_Ingot.get(1L), GT_OreDictUnificator.get(OrePrefixes.plateAlloy, Materials.Advanced, 1L), 100, 8); - - //cell, bucket, food can - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Tin, 12L), ItemList.Cell_Empty.get(6L), 1200, 8); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 12L), ItemList.Cell_Empty.get(12L), 1200, 8); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Polytetrafluoroethylene, 12L), ItemList.Cell_Empty.get(48L), 1200, 8); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 12L), new ItemStack(Items.bucket, 4, 0), 800, 4); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 12L), new ItemStack(Items.bucket, 4, 0), 800, 4); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.Iron, 2L), GT_ModHandler.getIC2Item("fuelRod", 1L), 100, 8); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.Tin, 1L), ItemList.IC2_Food_Can_Empty.get(1L), 20, 480); - //marbe dust( stone dust - GT_Values.RA.addPulveriserRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Marble, 1L), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Marble, 1L)}, null, 160, 4); - - //reactor parts vacuum - //reactor heat switch - GT_Values.RA.addVacuumFreezerRecipe(GT_ModHandler.getIC2Item("reactorHeatSwitch", 1L, 32767), GT_ModHandler.getIC2Item("reactorHeatSwitch", 1L, 1), 100); - GT_Values.RA.addVacuumFreezerRecipe(GT_ModHandler.getIC2Item("reactorHeatSwitchCore", 1L, 32767), GT_ModHandler.getIC2Item("reactorHeatSwitchCore", 1L, 1), 100); - GT_Values.RA.addVacuumFreezerRecipe(GT_ModHandler.getIC2Item("reactorHeatSwitchSpread", 1L, 32767), GT_ModHandler.getIC2Item("reactorHeatSwitchSpread", 1L, 1), 100); - GT_Values.RA.addVacuumFreezerRecipe(GT_ModHandler.getIC2Item("reactorHeatSwitchDiamond", 1L, 32767), GT_ModHandler.getIC2Item("reactorHeatSwitchDiamond", 1L, 1), 100); - //reactor vent - GT_Values.RA.addVacuumFreezerRecipe(GT_ModHandler.getIC2Item("reactorVent", 1L, 32767), GT_ModHandler.getIC2Item("reactorVent", 1L, 1), 100); - GT_Values.RA.addVacuumFreezerRecipe(GT_ModHandler.getIC2Item("reactorVentCore", 1L, 32767), GT_ModHandler.getIC2Item("reactorVentCore", 1L, 1), 100); - GT_Values.RA.addVacuumFreezerRecipe(GT_ModHandler.getIC2Item("reactorVentGold", 1L, 32767), GT_ModHandler.getIC2Item("reactorVentGold", 1L, 1), 100); - GT_Values.RA.addVacuumFreezerRecipe(GT_ModHandler.getIC2Item("reactorVentDiamond", 1L, 32767), GT_ModHandler.getIC2Item("reactorVentDiamond", 1L, 1), 100); - //reactor vent spread - GT_Values.RA.addVacuumFreezerRecipe(GT_ModHandler.getIC2Item("reactorVentSpread", 1L, 32767), GT_ModHandler.getIC2Item("reactorVentSpread", 1L, 0), 100); - //reactor coolant - GT_Values.RA.addVacuumFreezerRecipe(GT_ModHandler.getIC2Item("reactorCoolantSimple", 1L, 32767), GT_ModHandler.getIC2Item("reactorCoolantSimple", 1L, 1), 100); - GT_Values.RA.addVacuumFreezerRecipe(GT_ModHandler.getIC2Item("reactorCoolantTriple", 1L, 32767), GT_ModHandler.getIC2Item("reactorCoolantTriple", 1L, 1), 300); - GT_Values.RA.addVacuumFreezerRecipe(GT_ModHandler.getIC2Item("reactorCoolantSix", 1L, 32767), GT_ModHandler.getIC2Item("reactorCoolantSix", 1L, 1), 600); - GT_Values.RA.addVacuumFreezerRecipe(ItemList.Reactor_Coolant_He_1.getWildcard(1L), ItemList.Reactor_Coolant_He_1.get(1L), 600); - GT_Values.RA.addVacuumFreezerRecipe(ItemList.Reactor_Coolant_He_3.getWildcard(1L), ItemList.Reactor_Coolant_He_3.get(1L), 1800); - GT_Values.RA.addVacuumFreezerRecipe(ItemList.Reactor_Coolant_He_6.getWildcard(1L), ItemList.Reactor_Coolant_He_6.get(1L), 3600); - GT_Values.RA.addVacuumFreezerRecipe(ItemList.Reactor_Coolant_NaK_1.getWildcard(1L), ItemList.Reactor_Coolant_NaK_1.get(1L), 600); - GT_Values.RA.addVacuumFreezerRecipe(ItemList.Reactor_Coolant_NaK_3.getWildcard(1L), ItemList.Reactor_Coolant_NaK_3.get(1L), 1800); - GT_Values.RA.addVacuumFreezerRecipe(ItemList.Reactor_Coolant_NaK_6.getWildcard(1L), ItemList.Reactor_Coolant_NaK_6.get(1L), 3600); - GT_Values.RA.addVacuumFreezerRecipe(ItemList.neutroniumHeatCapacitor.getWildcard(1L), ItemList.neutroniumHeatCapacitor.get(1L), 10000000); - GT_Values.RA.addVacuumFreezerRecipe(ItemList.Reactor_Coolant_Sp_1.getWildcard(1L), ItemList.Reactor_Coolant_Sp_1.get(1L), 1800); - GT_Values.RA.addVacuumFreezerRecipe(ItemList.Reactor_Coolant_Sp_2.getWildcard(1L), ItemList.Reactor_Coolant_Sp_2.get(1L), 3600); - GT_Values.RA.addVacuumFreezerRecipe(ItemList.Reactor_Coolant_Sp_3.getWildcard(1L), ItemList.Reactor_Coolant_Sp_3.get(1L), 5400); - GT_Values.RA.addVacuumFreezerRecipe(ItemList.Reactor_Coolant_Sp_6.getWildcard(1L), ItemList.Reactor_Coolant_Sp_6.get(1L), 10800); - - //fluid vacuum - GT_Values.RA.addVacuumFreezerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ice, 1L), 50); - GT_Values.RA.addVacuumFreezerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LiquidOxygen, 1L), 1200, 480); - GT_Values.RA.addVacuumFreezerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Nitrogen, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LiquidNitrogen, 1L), 1200, 480); - GT_Values.RA.addVacuumFreezerRecipe(GT_ModHandler.getIC2Item("airCell", 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LiquidAir, 1L), 28, 480); - - GT_Values.RA.addVacuumFreezerRecipe(ItemList.Reactor_Coolant_Sp_1.getWildcard(1L), ItemList.Reactor_Coolant_Sp_1.get(1L), 1800); - GT_Values.RA.addVacuumFreezerRecipe(ItemList.Reactor_Coolant_Sp_2.getWildcard(1L), ItemList.Reactor_Coolant_Sp_2.get(1L), 3600); - GT_Values.RA.addVacuumFreezerRecipe(ItemList.Reactor_Coolant_Sp_3.getWildcard(1L), ItemList.Reactor_Coolant_Sp_3.get(1L), 5400); - GT_Values.RA.addVacuumFreezerRecipe(ItemList.Reactor_Coolant_Sp_6.getWildcard(1L), ItemList.Reactor_Coolant_Sp_6.get(1L), 10800); + // Si + 4Cl = SiCl4 + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 1), + ItemList.Cell_Empty.get(2L), + Materials.HydrochloricAcid.getFluid(3000), + Materials.Trichlorosilane.getFluid(1000), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2), + GT_Values.NI, + 300, + 30); + // 10Si + 30HCl -> 0.3 SiH2Cl2 + 9 HSiCl3 + 0.3 SiCl4 + 0.2 Si2Cl6 + 20.4H + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(9), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 10) + }, + new FluidStack[] {Materials.HydrochloricAcid.getFluid(30000)}, + new FluidStack[] { + Materials.Trichlorosilane.getFluid(9000), + Materials.SiliconTetrachloride.getFluid(300), + Materials.Hexachlorodisilane.getFluid(200), + Materials.Dichlorosilane.getGas(300), + Materials.Hydrogen.getGas(20400) + }, + null, + 150, + 480); + // HSiCl3 + 2H = 3HCl + Si + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2), + GT_Utility.getIntegratedCircuit(1), + Materials.Trichlorosilane.getFluid(1000), + Materials.HydrochloricAcid.getFluid(3000), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 1), + ItemList.Cell_Empty.get(2L), + 300, + 30); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Trichlorosilane, 1), + GT_Utility.getIntegratedCircuit(1), + Materials.Hydrogen.getGas(2000), + Materials.HydrochloricAcid.getFluid(3000), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 1), + ItemList.Cell_Empty.get(1L), + 300, + 30); + // 4HSiCl3 = 3SiCl4 + SiH4 + GT_Values.RA.addChemicalRecipe( + ItemList.Cell_Empty.get(1L), + GT_Utility.getIntegratedCircuit(2), + Materials.Trichlorosilane.getFluid(4000), + Materials.SiliconTetrachloride.getFluid(3000), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Silane, 1), + 240, + 30); + // SiH4 = Si + 4H + GT_Values.RA.addChemicalRecipe( + GT_Utility.getIntegratedCircuit(1), + GT_Values.NI, + Materials.Silane.getGas(1000), + Materials.Hydrogen.getGas(4000), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 1), + 300, + 30); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Silane, 1), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Hydrogen.getGas(4000), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 1), + ItemList.Cell_Empty.get(1L), + 300, + 30); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Silane, 1), + ItemList.Cell_Empty.get(3L), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconSG, 1), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 4), + 300, + 30); + // Ca + 2H = CaH2 + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcium, 1), + GT_Utility.getIntegratedCircuit(1), + Materials.Hydrogen.getGas(2000), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calciumhydride, 3), + 400, + 30); + // CaH2 + 2Si = CaSi2 + 2H + GT_Values.RA.addBlastRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calciumhydride, 3), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 2), + GT_Values.NF, + Materials.Hydrogen.getGas(2000), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CalciumDisilicide, 3), + GT_Values.NI, + 300, + 120, + 1273); + // Si + 4Cl = SiCl4 + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 1), + GT_Utility.getIntegratedCircuit(2), + Materials.Chlorine.getGas(4000), + Materials.SiliconTetrachloride.getFluid(1000), + null, + 400, + 30); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 1), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Chlorine, 4), + GT_Values.NF, + Materials.SiliconTetrachloride.getFluid(1000), + ItemList.Cell_Empty.get(4L), + GT_Values.NI, + 400, + 30); + + GT_Values.RA.addBenderRecipe( + ItemList.IC2_Mixed_Metal_Ingot.get(1L), + GT_OreDictUnificator.get(OrePrefixes.plateAlloy, Materials.Advanced, 1L), + 100, + 8); + + // cell, bucket, food can + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Tin, 12L), ItemList.Cell_Empty.get(6L), 1200, 8); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 12L), + ItemList.Cell_Empty.get(12L), + 1200, + 8); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Polytetrafluoroethylene, 12L), + ItemList.Cell_Empty.get(48L), + 1200, + 8); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 12L), + new ItemStack(Items.bucket, 4, 0), + 800, + 4); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 12L), + new ItemStack(Items.bucket, 4, 0), + 800, + 4); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.Iron, 2L), + GT_ModHandler.getIC2Item("fuelRod", 1L), + 100, + 8); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.Tin, 1L), + ItemList.IC2_Food_Can_Empty.get(1L), + 20, + 480); + // marbe dust( stone dust + GT_Values.RA.addPulveriserRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Marble, 1L), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Marble, 1L)}, + null, + 160, + 4); + + // reactor parts vacuum + // reactor heat switch + GT_Values.RA.addVacuumFreezerRecipe( + GT_ModHandler.getIC2Item("reactorHeatSwitch", 1L, 32767), + GT_ModHandler.getIC2Item("reactorHeatSwitch", 1L, 1), + 100); + GT_Values.RA.addVacuumFreezerRecipe( + GT_ModHandler.getIC2Item("reactorHeatSwitchCore", 1L, 32767), + GT_ModHandler.getIC2Item("reactorHeatSwitchCore", 1L, 1), + 100); + GT_Values.RA.addVacuumFreezerRecipe( + GT_ModHandler.getIC2Item("reactorHeatSwitchSpread", 1L, 32767), + GT_ModHandler.getIC2Item("reactorHeatSwitchSpread", 1L, 1), + 100); + GT_Values.RA.addVacuumFreezerRecipe( + GT_ModHandler.getIC2Item("reactorHeatSwitchDiamond", 1L, 32767), + GT_ModHandler.getIC2Item("reactorHeatSwitchDiamond", 1L, 1), + 100); + // reactor vent + GT_Values.RA.addVacuumFreezerRecipe( + GT_ModHandler.getIC2Item("reactorVent", 1L, 32767), + GT_ModHandler.getIC2Item("reactorVent", 1L, 1), + 100); + GT_Values.RA.addVacuumFreezerRecipe( + GT_ModHandler.getIC2Item("reactorVentCore", 1L, 32767), + GT_ModHandler.getIC2Item("reactorVentCore", 1L, 1), + 100); + GT_Values.RA.addVacuumFreezerRecipe( + GT_ModHandler.getIC2Item("reactorVentGold", 1L, 32767), + GT_ModHandler.getIC2Item("reactorVentGold", 1L, 1), + 100); + GT_Values.RA.addVacuumFreezerRecipe( + GT_ModHandler.getIC2Item("reactorVentDiamond", 1L, 32767), + GT_ModHandler.getIC2Item("reactorVentDiamond", 1L, 1), + 100); + // reactor vent spread + GT_Values.RA.addVacuumFreezerRecipe( + GT_ModHandler.getIC2Item("reactorVentSpread", 1L, 32767), + GT_ModHandler.getIC2Item("reactorVentSpread", 1L, 0), + 100); + // reactor coolant + GT_Values.RA.addVacuumFreezerRecipe( + GT_ModHandler.getIC2Item("reactorCoolantSimple", 1L, 32767), + GT_ModHandler.getIC2Item("reactorCoolantSimple", 1L, 1), + 100); + GT_Values.RA.addVacuumFreezerRecipe( + GT_ModHandler.getIC2Item("reactorCoolantTriple", 1L, 32767), + GT_ModHandler.getIC2Item("reactorCoolantTriple", 1L, 1), + 300); + GT_Values.RA.addVacuumFreezerRecipe( + GT_ModHandler.getIC2Item("reactorCoolantSix", 1L, 32767), + GT_ModHandler.getIC2Item("reactorCoolantSix", 1L, 1), + 600); + GT_Values.RA.addVacuumFreezerRecipe( + ItemList.Reactor_Coolant_He_1.getWildcard(1L), ItemList.Reactor_Coolant_He_1.get(1L), 600); + GT_Values.RA.addVacuumFreezerRecipe( + ItemList.Reactor_Coolant_He_3.getWildcard(1L), ItemList.Reactor_Coolant_He_3.get(1L), 1800); + GT_Values.RA.addVacuumFreezerRecipe( + ItemList.Reactor_Coolant_He_6.getWildcard(1L), ItemList.Reactor_Coolant_He_6.get(1L), 3600); + GT_Values.RA.addVacuumFreezerRecipe( + ItemList.Reactor_Coolant_NaK_1.getWildcard(1L), ItemList.Reactor_Coolant_NaK_1.get(1L), 600); + GT_Values.RA.addVacuumFreezerRecipe( + ItemList.Reactor_Coolant_NaK_3.getWildcard(1L), ItemList.Reactor_Coolant_NaK_3.get(1L), 1800); + GT_Values.RA.addVacuumFreezerRecipe( + ItemList.Reactor_Coolant_NaK_6.getWildcard(1L), ItemList.Reactor_Coolant_NaK_6.get(1L), 3600); + GT_Values.RA.addVacuumFreezerRecipe( + ItemList.neutroniumHeatCapacitor.getWildcard(1L), ItemList.neutroniumHeatCapacitor.get(1L), 10000000); + GT_Values.RA.addVacuumFreezerRecipe( + ItemList.Reactor_Coolant_Sp_1.getWildcard(1L), ItemList.Reactor_Coolant_Sp_1.get(1L), 1800); + GT_Values.RA.addVacuumFreezerRecipe( + ItemList.Reactor_Coolant_Sp_2.getWildcard(1L), ItemList.Reactor_Coolant_Sp_2.get(1L), 3600); + GT_Values.RA.addVacuumFreezerRecipe( + ItemList.Reactor_Coolant_Sp_3.getWildcard(1L), ItemList.Reactor_Coolant_Sp_3.get(1L), 5400); + GT_Values.RA.addVacuumFreezerRecipe( + ItemList.Reactor_Coolant_Sp_6.getWildcard(1L), ItemList.Reactor_Coolant_Sp_6.get(1L), 10800); + + // fluid vacuum + GT_Values.RA.addVacuumFreezerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 1L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ice, 1L), + 50); + GT_Values.RA.addVacuumFreezerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LiquidOxygen, 1L), + 1200, + 480); + GT_Values.RA.addVacuumFreezerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Nitrogen, 1L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LiquidNitrogen, 1L), + 1200, + 480); + GT_Values.RA.addVacuumFreezerRecipe( + GT_ModHandler.getIC2Item("airCell", 1L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LiquidAir, 1L), + 28, + 480); + + GT_Values.RA.addVacuumFreezerRecipe( + ItemList.Reactor_Coolant_Sp_1.getWildcard(1L), ItemList.Reactor_Coolant_Sp_1.get(1L), 1800); + GT_Values.RA.addVacuumFreezerRecipe( + ItemList.Reactor_Coolant_Sp_2.getWildcard(1L), ItemList.Reactor_Coolant_Sp_2.get(1L), 3600); + GT_Values.RA.addVacuumFreezerRecipe( + ItemList.Reactor_Coolant_Sp_3.getWildcard(1L), ItemList.Reactor_Coolant_Sp_3.get(1L), 5400); + GT_Values.RA.addVacuumFreezerRecipe( + ItemList.Reactor_Coolant_Sp_6.getWildcard(1L), ItemList.Reactor_Coolant_Sp_6.get(1L), 10800); // Beecombs fluid extractor recipes if (Loader.isModLoaded("bartworks")) { - //xenon - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 134), null, FluidRegistry.getFluidStack("xenon", 250), 100 * 100, 50, 8192); - //neon - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 135), null, FluidRegistry.getFluidStack("neon", 250), 100 * 100, 15, 8192); - //krpton - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 136), null, FluidRegistry.getFluidStack("krypton", 250), 100 * 100, 25, 8192); - + // xenon + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 134), + null, + FluidRegistry.getFluidStack("xenon", 250), + 100 * 100, + 50, + 8192); + // neon + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 135), + null, + FluidRegistry.getFluidStack("neon", 250), + 100 * 100, + 15, + 8192); + // krpton + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 136), + null, + FluidRegistry.getFluidStack("krypton", 250), + 100 * 100, + 25, + 8192); } if (Loader.isModLoaded("Thaumcraft")) { - //air - GT_Values.RA.addCentrifugeRecipe(GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 144), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, null, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedAir, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 1024, 12); - //fire - GT_Values.RA.addCentrifugeRecipe(GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 146), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, null, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedFire, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 1024, 12); - //aqua - GT_Values.RA.addCentrifugeRecipe(GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 147), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, null, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedWater, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 1024, 12); - //terra - GT_Values.RA.addCentrifugeRecipe(GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 145), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, null, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedEarth, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 1024, 12); - //ordo - GT_Values.RA.addCentrifugeRecipe(GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 148), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, null, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedOrder, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 1024, 12); - //perditio - GT_Values.RA.addCentrifugeRecipe(GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 149), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, null, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedEntropy, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 1024, 12); - //Nethershard - GT_Values.RA.addCentrifugeRecipe(GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 152), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, null, GT_ModHandler.getModItem("ThaumicTinkerer", "kamiResource", 1L, 6), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 128, 512); - //Endshard - GT_Values.RA.addCentrifugeRecipe(GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 153), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, null, GT_ModHandler.getModItem("ThaumicTinkerer", "kamiResource", 1L, 7), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 128, 512); - - - //Add Recipe for TC Crucible: Salis Mundus to Balanced Shards + // air + GT_Values.RA.addCentrifugeRecipe( + GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 144), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + null, + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedAir, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 1024, + 12); + // fire + GT_Values.RA.addCentrifugeRecipe( + GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 146), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + null, + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedFire, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 1024, + 12); + // aqua + GT_Values.RA.addCentrifugeRecipe( + GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 147), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + null, + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedWater, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 1024, + 12); + // terra + GT_Values.RA.addCentrifugeRecipe( + GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 145), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + null, + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedEarth, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 1024, + 12); + // ordo + GT_Values.RA.addCentrifugeRecipe( + GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 148), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + null, + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedOrder, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 1024, + 12); + // perditio + GT_Values.RA.addCentrifugeRecipe( + GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 149), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + null, + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedEntropy, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 1024, + 12); + // Nethershard + GT_Values.RA.addCentrifugeRecipe( + GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 152), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + null, + GT_ModHandler.getModItem("ThaumicTinkerer", "kamiResource", 1L, 6), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 128, + 512); + // Endshard + GT_Values.RA.addCentrifugeRecipe( + GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 153), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + null, + GT_ModHandler.getModItem("ThaumicTinkerer", "kamiResource", 1L, 7), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 128, + 512); + + // Add Recipe for TC Crucible: Salis Mundus to Balanced Shards String tKey = "GT_BALANCE_SHARD_RECIPE"; - GregTech_API.sThaumcraftCompat.addCrucibleRecipe("TB.SM", GT_ModHandler.getModItem(MOD_ID_TC, "ItemResource", 1L, 14), GT_ModHandler.getModItem(MOD_ID_TC, "ItemShard", 1L, 6), Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 1L))); + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + "TB.SM", + GT_ModHandler.getModItem(MOD_ID_TC, "ItemResource", 1L, 14), + GT_ModHandler.getModItem(MOD_ID_TC, "ItemShard", 1L, 6), + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 1L))); + } + if (Loader.isModLoaded("ExtraUtilities")) { + // Caelestis red + GT_Values.RA.addCentrifugeRecipe( + GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 154), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + null, + GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 2), + GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 10), + GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 14), + GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 1), + GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 12), + GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 6), + null, + 512, + 12); + // Caelestis green + GT_Values.RA.addCentrifugeRecipe( + GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 155), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + null, + GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 13), + GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 5), + GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 4), + GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 8), + GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 0), + NI, + null, + 512, + 12); + // Caelestis blue + GT_Values.RA.addCentrifugeRecipe( + GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 156), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + null, + GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 3), + GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 9), + GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 11), + GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 7), + GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 15), + NI, + null, + 512, + 12); } - if (Loader.isModLoaded("ExtraUtilities")) { - //Caelestis red - GT_Values.RA.addCentrifugeRecipe(GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 154), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, null, GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 2), GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 10), GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 14), GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 1), GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 12), GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 6), null, 512, 12); - //Caelestis green - GT_Values.RA.addCentrifugeRecipe(GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 155), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, null, GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 13), GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 5), GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 4), GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 8), GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 0), NI, null, 512, 12); - //Caelestis blue - GT_Values.RA.addCentrifugeRecipe(GT_ModHandler.getModItem("gregtech", "gt.comb", 1L, 156), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, null, GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 3), GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 9), GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 11), GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 7), GT_ModHandler.getModItem("ExtraUtilities", "greenscreen", 1L, 15), NI, null, 512, 12); - - } // Freeze superconductors. - GT_Values.RA.addVacuumFreezerRecipe(GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.Pentacadmiummagnesiumhexaoxid, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Pentacadmiummagnesiumhexaoxid, 1L), 200, 120); - GT_Values.RA.addVacuumFreezerRecipe(GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.Titaniumonabariumdecacoppereikosaoxid, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Titaniumonabariumdecacoppereikosaoxid, 1L), 200, 480); - GT_Values.RA.addVacuumFreezerRecipe(GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.Uraniumtriplatinid, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Uraniumtriplatinid, 1L), 200, 1920); - GT_Values.RA.addVacuumFreezerRecipe(GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.Vanadiumtriindinid, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Vanadiumtriindinid, 1L), 200, 7680); - GT_Values.RA.addVacuumFreezerRecipe(GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid, 1L), 400, 30720); - GT_Values.RA.addVacuumFreezerRecipe(GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.Tetranaquadahdiindiumhexaplatiumosminid, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tetranaquadahdiindiumhexaplatiumosminid, 1L), 400, 122880); - GT_Values.RA.addVacuumFreezerRecipe(GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.Longasssuperconductornameforuvwire, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Longasssuperconductornameforuvwire, 1L), 800, 491520); - GT_Values.RA.addVacuumFreezerRecipe(GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.Longasssuperconductornameforuhvwire, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Longasssuperconductornameforuhvwire, 1L), 1600, 1966080); - GT_Values.RA.addVacuumFreezerRecipe(GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.SuperconductorUEVBase, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.SuperconductorUEVBase, 1L), 3200, 7864320); - GT_Values.RA.addVacuumFreezerRecipe(GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.SuperconductorUIVBase, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.SuperconductorUIVBase, 1L), 3200, 30198988); - GT_Values.RA.addVacuumFreezerRecipe(GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.SuperconductorUMVBase, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.SuperconductorUMVBase, 1L), 3200, 120795955); + GT_Values.RA.addVacuumFreezerRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.Pentacadmiummagnesiumhexaoxid, 1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Pentacadmiummagnesiumhexaoxid, 1L), + 200, + 120); + GT_Values.RA.addVacuumFreezerRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.Titaniumonabariumdecacoppereikosaoxid, 1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Titaniumonabariumdecacoppereikosaoxid, 1L), + 200, + 480); + GT_Values.RA.addVacuumFreezerRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.Uraniumtriplatinid, 1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Uraniumtriplatinid, 1L), + 200, + 1920); + GT_Values.RA.addVacuumFreezerRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.Vanadiumtriindinid, 1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Vanadiumtriindinid, 1L), + 200, + 7680); + GT_Values.RA.addVacuumFreezerRecipe( + GT_OreDictUnificator.get( + OrePrefixes.ingotHot, + Materials.Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid, + 1L), + GT_OreDictUnificator.get( + OrePrefixes.ingot, Materials.Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid, 1L), + 400, + 30720); + GT_Values.RA.addVacuumFreezerRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.Tetranaquadahdiindiumhexaplatiumosminid, 1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tetranaquadahdiindiumhexaplatiumosminid, 1L), + 400, + 122880); + GT_Values.RA.addVacuumFreezerRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.Longasssuperconductornameforuvwire, 1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Longasssuperconductornameforuvwire, 1L), + 800, + 491520); + GT_Values.RA.addVacuumFreezerRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.Longasssuperconductornameforuhvwire, 1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Longasssuperconductornameforuhvwire, 1L), + 1600, + 1966080); + GT_Values.RA.addVacuumFreezerRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.SuperconductorUEVBase, 1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.SuperconductorUEVBase, 1L), + 3200, + 7864320); + GT_Values.RA.addVacuumFreezerRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.SuperconductorUIVBase, 1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.SuperconductorUIVBase, 1L), + 3200, + 30198988); + GT_Values.RA.addVacuumFreezerRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.SuperconductorUMVBase, 1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.SuperconductorUMVBase, 1L), + 3200, + 120795955); GT_Values.RA.addBlastRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SuperconductorUEVBase, 1L), - GT_Utility.getIntegratedCircuit(1), - GT_Values.NF, - GT_Values.NF, - GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.SuperconductorUEVBase, 1L), - GT_Values.NI, - 19660, - 122880*4, - 11800 - ); + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SuperconductorUEVBase, 1L), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.SuperconductorUEVBase, 1L), + GT_Values.NI, + 19660, + 122880 * 4, + 11800); GT_Values.RA.addBlastRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SuperconductorUEVBase, 1L), - GT_Utility.getIntegratedCircuit(11), - Materials.Radon.getGas(1000L), - GT_Values.NF, - GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.SuperconductorUEVBase, 1L), - GT_Values.NI, - 8847, - 122880*4, - 11800 - ); // 0.45 * 19660 = 8847 + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SuperconductorUEVBase, 1L), + GT_Utility.getIntegratedCircuit(11), + Materials.Radon.getGas(1000L), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.SuperconductorUEVBase, 1L), + GT_Values.NI, + 8847, + 122880 * 4, + 11800); // 0.45 * 19660 = 8847 GT_Values.RA.addBlastRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SuperconductorUIVBase, 1L), - GT_Utility.getIntegratedCircuit(1), - GT_Values.NF, - GT_Values.NF, - GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.SuperconductorUIVBase, 1L), - GT_Values.NI, - 19660, - 491520*4, - 12700 - ); + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SuperconductorUIVBase, 1L), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.SuperconductorUIVBase, 1L), + GT_Values.NI, + 19660, + 491520 * 4, + 12700); GT_Values.RA.addBlastRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SuperconductorUIVBase, 1L), - GT_Utility.getIntegratedCircuit(11), - Materials.Radon.getGas(1000L), - GT_Values.NF, - GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.SuperconductorUIVBase, 1L), - GT_Values.NI, - 8847, - 491520*4, - 12700 - ); // 0.45 * 19660 = 8847 + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SuperconductorUIVBase, 1L), + GT_Utility.getIntegratedCircuit(11), + Materials.Radon.getGas(1000L), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.SuperconductorUIVBase, 1L), + GT_Values.NI, + 8847, + 491520 * 4, + 12700); // 0.45 * 19660 = 8847 GT_Values.RA.addBlastRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SuperconductorUMVBase, 1L), - GT_Utility.getIntegratedCircuit(1), - GT_Values.NF, - GT_Values.NF, - GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.SuperconductorUMVBase, 1L), - GT_Values.NI, - 19660, - 1966080*4, - 13600 - ); + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SuperconductorUMVBase, 1L), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.SuperconductorUMVBase, 1L), + GT_Values.NI, + 19660, + 1966080 * 4, + 13600); GT_Values.RA.addBlastRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SuperconductorUMVBase, 1L), - GT_Utility.getIntegratedCircuit(11), - Materials.Radon.getGas(1000L), - GT_Values.NF, - GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.SuperconductorUMVBase, 1L), - GT_Values.NI, - 8847, - 1966080*4, - 13600 - ); // 0.45 * 19660 = 8847 - - //Plasma Freezing - GT_Values.RA.addVacuumFreezerRecipe(GT_OreDictUnificator.get(OrePrefixes.cellPlasma, Materials.Americium, 1L), GT_OreDictUnificator.get(OrePrefixes.cellMolten, Materials.Americium, 1L), 20, 30720); - GT_Values.RA.addVacuumFreezerRecipe(GT_OreDictUnificator.get(OrePrefixes.cellPlasma, Materials.Helium, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Helium, 1L), 5, 120); - GT_Values.RA.addVacuumFreezerRecipe(GT_OreDictUnificator.get(OrePrefixes.cellPlasma, Materials.Nitrogen, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Nitrogen, 1L), 28, 120); - GT_Values.RA.addVacuumFreezerRecipe(GT_OreDictUnificator.get(OrePrefixes.cellPlasma, Materials.Oxygen, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), 32, 120); - GT_Values.RA.addVacuumFreezerRecipe(GT_OreDictUnificator.get(OrePrefixes.cellPlasma, Materials.Radon, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Radon, 1L), 110, 480); - - GT_Values.RA.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lead, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Obsidian, 2L), ItemList.TE_Hardened_Glass.get(2L), 200, 16); - GT_Values.RA.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Lead, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Obsidian, 2L), ItemList.TE_Hardened_Glass.get(2L), 200, 16); - GT_Values.RA.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RawRubber, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Rubber, 1L), 200, 8); //We use rubber - - GT_Values.RA.addCutterRecipe(GT_ModHandler.getModItem("BuildCraft|Transport", "item.buildcraftPipe.pipestructurecobblestone", 1L, 0), GT_ModHandler.getModItem("BuildCraft|Transport", "pipePlug", 8L, 0), GT_Values.NI, 32, 16); + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SuperconductorUMVBase, 1L), + GT_Utility.getIntegratedCircuit(11), + Materials.Radon.getGas(1000L), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.SuperconductorUMVBase, 1L), + GT_Values.NI, + 8847, + 1966080 * 4, + 13600); // 0.45 * 19660 = 8847 + + // Plasma Freezing + GT_Values.RA.addVacuumFreezerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cellPlasma, Materials.Americium, 1L), + GT_OreDictUnificator.get(OrePrefixes.cellMolten, Materials.Americium, 1L), + 20, + 30720); + GT_Values.RA.addVacuumFreezerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cellPlasma, Materials.Helium, 1L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Helium, 1L), + 5, + 120); + GT_Values.RA.addVacuumFreezerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cellPlasma, Materials.Nitrogen, 1L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Nitrogen, 1L), + 28, + 120); + GT_Values.RA.addVacuumFreezerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cellPlasma, Materials.Oxygen, 1L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), + 32, + 120); + GT_Values.RA.addVacuumFreezerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cellPlasma, Materials.Radon, 1L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Radon, 1L), + 110, + 480); + + GT_Values.RA.addAlloySmelterRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lead, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Obsidian, 2L), + ItemList.TE_Hardened_Glass.get(2L), + 200, + 16); + GT_Values.RA.addAlloySmelterRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Lead, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Obsidian, 2L), + ItemList.TE_Hardened_Glass.get(2L), + 200, + 16); + GT_Values.RA.addAlloySmelterRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RawRubber, 3L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Rubber, 1L), + 200, + 8); // We use rubber + + GT_Values.RA.addCutterRecipe( + GT_ModHandler.getModItem("BuildCraft|Transport", "item.buildcraftPipe.pipestructurecobblestone", 1L, 0), + GT_ModHandler.getModItem("BuildCraft|Transport", "pipePlug", 8L, 0), + GT_Values.NI, + 32, + 16); for (int i = 0; i < 16; i++) { - GT_Values.RA.addCutterRecipe(new ItemStack(Blocks.stained_glass, 3, i), new ItemStack(Blocks.stained_glass_pane, 8, i), GT_Values.NI, 50, 8); + GT_Values.RA.addCutterRecipe( + new ItemStack(Blocks.stained_glass, 3, i), + new ItemStack(Blocks.stained_glass_pane, 8, i), + GT_Values.NI, + 50, + 8); } - GT_Values.RA.addCutterRecipe(new ItemStack(Blocks.glass, 3, 0), new ItemStack(Blocks.glass_pane, 8, 0), GT_Values.NI, 50, 8); - GT_Values.RA.addCutterRecipe(GT_ModHandler.getModItem("TConstruct", "GlassBlock", 3L, 0), GT_ModHandler.getModItem("TConstruct", "GlassPane", 8L, 0), GT_Values.NI, 50, 8); - GT_Values.RA.addCutterRecipe(new ItemStack(Blocks.stone, 1, 0), new ItemStack(Blocks.stone_slab, 2, 0), GT_Values.NI, 25, 8); - GT_Values.RA.addCutterRecipe(new ItemStack(Blocks.sandstone, 1, 0), new ItemStack(Blocks.stone_slab, 2, 1), GT_Values.NI, 25, 8); - GT_Values.RA.addCutterRecipe(new ItemStack(Blocks.cobblestone, 1, 0), new ItemStack(Blocks.stone_slab, 2, 3), GT_Values.NI, 25, 8); - GT_Values.RA.addCutterRecipe(new ItemStack(Blocks.brick_block, 1, 0), new ItemStack(Blocks.stone_slab, 2, 4), GT_Values.NI, 25, 8); - GT_Values.RA.addCutterRecipe(new ItemStack(Blocks.stonebrick, 1, 0), new ItemStack(Blocks.stone_slab, 2, 5), GT_Values.NI, 25, 8); - GT_Values.RA.addCutterRecipe(new ItemStack(Blocks.nether_brick, 1, 0), new ItemStack(Blocks.stone_slab, 2, 6), GT_Values.NI, 25, 8); - GT_Values.RA.addCutterRecipe(new ItemStack(Blocks.quartz_block, 1, 32767), new ItemStack(Blocks.stone_slab, 2, 7), GT_Values.NI, 25, 8); - GT_Values.RA.addCutterRecipe(new ItemStack(Blocks.glowstone, 1, 0), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Glowstone, 4L), GT_Values.NI, 100, 16); + GT_Values.RA.addCutterRecipe( + new ItemStack(Blocks.glass, 3, 0), new ItemStack(Blocks.glass_pane, 8, 0), GT_Values.NI, 50, 8); + GT_Values.RA.addCutterRecipe( + GT_ModHandler.getModItem("TConstruct", "GlassBlock", 3L, 0), + GT_ModHandler.getModItem("TConstruct", "GlassPane", 8L, 0), + GT_Values.NI, + 50, + 8); + GT_Values.RA.addCutterRecipe( + new ItemStack(Blocks.stone, 1, 0), new ItemStack(Blocks.stone_slab, 2, 0), GT_Values.NI, 25, 8); + GT_Values.RA.addCutterRecipe( + new ItemStack(Blocks.sandstone, 1, 0), new ItemStack(Blocks.stone_slab, 2, 1), GT_Values.NI, 25, 8); + GT_Values.RA.addCutterRecipe( + new ItemStack(Blocks.cobblestone, 1, 0), new ItemStack(Blocks.stone_slab, 2, 3), GT_Values.NI, 25, 8); + GT_Values.RA.addCutterRecipe( + new ItemStack(Blocks.brick_block, 1, 0), new ItemStack(Blocks.stone_slab, 2, 4), GT_Values.NI, 25, 8); + GT_Values.RA.addCutterRecipe( + new ItemStack(Blocks.stonebrick, 1, 0), new ItemStack(Blocks.stone_slab, 2, 5), GT_Values.NI, 25, 8); + GT_Values.RA.addCutterRecipe( + new ItemStack(Blocks.nether_brick, 1, 0), new ItemStack(Blocks.stone_slab, 2, 6), GT_Values.NI, 25, 8); + GT_Values.RA.addCutterRecipe( + new ItemStack(Blocks.quartz_block, 1, 32767), + new ItemStack(Blocks.stone_slab, 2, 7), + GT_Values.NI, + 25, + 8); + GT_Values.RA.addCutterRecipe( + new ItemStack(Blocks.glowstone, 1, 0), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Glowstone, 4L), + GT_Values.NI, + 100, + 16); for (byte i = 0; i < 16; i = (byte) (i + 1)) { - GT_Values.RA.addCutterRecipe(new ItemStack(Blocks.wool, 1, i), new ItemStack(Blocks.carpet, 2, i), GT_Values.NI, 50, 8); + GT_Values.RA.addCutterRecipe( + new ItemStack(Blocks.wool, 1, i), new ItemStack(Blocks.carpet, 2, i), GT_Values.NI, 50, 8); } - GT_Values.RA.addCutterRecipe(new ItemStack(Blocks.wooden_slab, 1, 0), ItemList.Plank_Oak.get(2L), GT_Values.NI, 50, 8); - GT_Values.RA.addCutterRecipe(new ItemStack(Blocks.wooden_slab, 1, 1), ItemList.Plank_Spruce.get(2L), GT_Values.NI, 50, 8); - GT_Values.RA.addCutterRecipe(new ItemStack(Blocks.wooden_slab, 1, 2), ItemList.Plank_Birch.get(2L), GT_Values.NI, 50, 8); - GT_Values.RA.addCutterRecipe(new ItemStack(Blocks.wooden_slab, 1, 3), ItemList.Plank_Jungle.get(2L), GT_Values.NI, 50, 8); - GT_Values.RA.addCutterRecipe(new ItemStack(Blocks.wooden_slab, 1, 4), ItemList.Plank_Acacia.get(2L), GT_Values.NI, 50, 8); - GT_Values.RA.addCutterRecipe(new ItemStack(Blocks.wooden_slab, 1, 5), ItemList.Plank_DarkOak.get(2L), GT_Values.NI, 50, 8); - boolean loaded = Loader.isModLoaded(GT_MachineRecipeLoader.aTextForestry);//TODO OW YEAH NEW PLANK GEN CODE!!! + GT_Values.RA.addCutterRecipe( + new ItemStack(Blocks.wooden_slab, 1, 0), ItemList.Plank_Oak.get(2L), GT_Values.NI, 50, 8); + GT_Values.RA.addCutterRecipe( + new ItemStack(Blocks.wooden_slab, 1, 1), ItemList.Plank_Spruce.get(2L), GT_Values.NI, 50, 8); + GT_Values.RA.addCutterRecipe( + new ItemStack(Blocks.wooden_slab, 1, 2), ItemList.Plank_Birch.get(2L), GT_Values.NI, 50, 8); + GT_Values.RA.addCutterRecipe( + new ItemStack(Blocks.wooden_slab, 1, 3), ItemList.Plank_Jungle.get(2L), GT_Values.NI, 50, 8); + GT_Values.RA.addCutterRecipe( + new ItemStack(Blocks.wooden_slab, 1, 4), ItemList.Plank_Acacia.get(2L), GT_Values.NI, 50, 8); + GT_Values.RA.addCutterRecipe( + new ItemStack(Blocks.wooden_slab, 1, 5), ItemList.Plank_DarkOak.get(2L), GT_Values.NI, 50, 8); + boolean loaded = Loader.isModLoaded(GT_MachineRecipeLoader.aTextForestry); // TODO OW YEAH NEW PLANK GEN CODE!!! ItemStack[] coverIDs = { ItemList.Plank_Larch.get(2L), ItemList.Plank_Teak.get(2L), @@ -1670,14 +8400,22 @@ public class GT_MachineRecipeLoader implements Runnable { ItemList.Plank_Pine.get(2L), ItemList.Plank_Plum.get(2L), ItemList.Plank_Maple.get(2L), - ItemList.Plank_Citrus.get(2L)}; + ItemList.Plank_Citrus.get(2L) + }; int i = 0; for (ItemStack cover : coverIDs) { if (loaded) { ItemStack slabWood = GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "slabs", 1, i); - ItemStack slabWoodFireproof = GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "slabsFireproof", 1, i); - GT_ModHandler.addCraftingRecipe(cover, GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', slabWood}); - GT_ModHandler.addCraftingRecipe(cover, GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"s ", " P", 'P', slabWoodFireproof}); + ItemStack slabWoodFireproof = + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "slabsFireproof", 1, i); + GT_ModHandler.addCraftingRecipe( + cover, + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', slabWood}); + GT_ModHandler.addCraftingRecipe( + cover, + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] {"s ", " P", 'P', slabWoodFireproof}); GT_Values.RA.addCutterRecipe(slabWood, cover, null, 40, 8); GT_Values.RA.addCutterRecipe(slabWoodFireproof, cover, null, 40, 8); } else if (GT_MachineRecipeLoader.isNEILoaded) { @@ -1692,366 +8430,2445 @@ public class GT_MachineRecipeLoader implements Runnable { API.hideItem(new ItemStack(GT_MetaGenerated_Item_03.INSTANCE, 1, g)); } } - public void run2() { - - GT_Values.RA.addLatheRecipe(new ItemStack(Blocks.wooden_slab, 1, GT_Values.W), new ItemStack(Items.bowl,1), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 1), 50, 8); - GT_Values.RA.addLatheRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "slabs", 1L, GT_Values.W), new ItemStack(Items.bowl,1), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 1), 50, 8); - GT_Values.RA.addLatheRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "woodslab", 1L, GT_Values.W), new ItemStack(Items.bowl,1), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 1), 50, 8); - GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Cupronickel, 1L), ItemList.Shape_Mold_Credit.get(0L), ItemList.Credit_Greg_Cupronickel.get(4L), 100, 16); - GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Brass, 1L), ItemList.Shape_Mold_Credit.get(0L), ItemList.Coin_Doge.get(4L), 100, 16); - GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), ItemList.Shape_Mold_Credit.get(0L), ItemList.Credit_Iron.get(4L), 100, 16); - GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), ItemList.Shape_Mold_Credit.get(0L), ItemList.Credit_Iron.get(4L), 100, 16); + public void run2() { - GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brick, 1L), ItemList.Shape_Mold_Ingot.get(0L), new ItemStack(Items.brick, 1, 0), 100, 16); + GT_Values.RA.addLatheRecipe( + new ItemStack(Blocks.wooden_slab, 1, GT_Values.W), + new ItemStack(Items.bowl, 1), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 1), + 50, + 8); + GT_Values.RA.addLatheRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "slabs", 1L, GT_Values.W), + new ItemStack(Items.bowl, 1), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 1), + 50, + 8); + GT_Values.RA.addLatheRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextEBXL, "woodslab", 1L, GT_Values.W), + new ItemStack(Items.bowl, 1), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 1), + 50, + 8); + + GT_Values.RA.addFormingPressRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Cupronickel, 1L), + ItemList.Shape_Mold_Credit.get(0L), + ItemList.Credit_Greg_Cupronickel.get(4L), + 100, + 16); + GT_Values.RA.addFormingPressRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Brass, 1L), + ItemList.Shape_Mold_Credit.get(0L), + ItemList.Coin_Doge.get(4L), + 100, + 16); + GT_Values.RA.addFormingPressRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), + ItemList.Shape_Mold_Credit.get(0L), + ItemList.Credit_Iron.get(4L), + 100, + 16); + GT_Values.RA.addFormingPressRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), + ItemList.Shape_Mold_Credit.get(0L), + ItemList.Credit_Iron.get(4L), + 100, + 16); + + GT_Values.RA.addFormingPressRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brick, 1L), + ItemList.Shape_Mold_Ingot.get(0L), + new ItemStack(Items.brick, 1, 0), + 100, + 16); if (!GT_Mod.gregtechproxy.mDisableIC2Cables) { - GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Copper, 1L), GT_ModHandler.getIC2Item("copperCableItem", 3L), 100, 2); - GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.AnnealedCopper, 1L), GT_ModHandler.getIC2Item("copperCableItem", 3L), 100, 2); - GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Tin, 1L), GT_ModHandler.getIC2Item("tinCableItem", 4L), 150, 1); - GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), GT_ModHandler.getIC2Item("ironCableItem", 6L), 200, 2); - GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), GT_ModHandler.getIC2Item("ironCableItem", 6L), 200, 2); - GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Gold, 1L), GT_ModHandler.getIC2Item("goldCableItem", 6L), 200, 1); + GT_Values.RA.addWiremillRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Copper, 1L), + GT_ModHandler.getIC2Item("copperCableItem", 3L), + 100, + 2); + GT_Values.RA.addWiremillRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.AnnealedCopper, 1L), + GT_ModHandler.getIC2Item("copperCableItem", 3L), + 100, + 2); + GT_Values.RA.addWiremillRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Tin, 1L), + GT_ModHandler.getIC2Item("tinCableItem", 4L), + 150, + 1); + GT_Values.RA.addWiremillRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), + GT_ModHandler.getIC2Item("ironCableItem", 6L), + 200, + 2); + GT_Values.RA.addWiremillRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), + GT_ModHandler.getIC2Item("ironCableItem", 6L), + 200, + 2); + GT_Values.RA.addWiremillRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Gold, 1L), + GT_ModHandler.getIC2Item("goldCableItem", 6L), + 200, + 1); } - GT_Values.RA.addWiremillRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphene, 1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Graphene, 1L), 400, 2); + GT_Values.RA.addWiremillRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphene, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Graphene, 1L), + 400, + 2); if (!GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "torchesFromCoal", false)) { - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), new ItemStack(Items.coal, 1, 32767), new ItemStack(Blocks.torch, 4), 400, 1); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), + new ItemStack(Items.coal, 1, 32767), + new ItemStack(Blocks.torch, 4), + 400, + 1); } - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Steel, 1L), new ItemStack(Blocks.light_weighted_pressure_plate, 1), 200, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 2L), GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Steel, 1L), new ItemStack(Blocks.heavy_weighted_pressure_plate, 1), 200, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 6L), GT_Utility.getIntegratedCircuit(6), new ItemStack(Items.iron_door, 1), 600, 4); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 7L), GT_Utility.getIntegratedCircuit(7), new ItemStack(Items.cauldron, 1), 700, 4); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iron, 1L), GT_Utility.getIntegratedCircuit(1), GT_ModHandler.getIC2Item("ironFence", 1L), 100, 4); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iron, 3L), GT_Utility.getIntegratedCircuit(3), new ItemStack(Blocks.iron_bars, 4), 300, 4); - //GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 2L), GT_Utility.getIntegratedCircuit(2), new ItemStack(Blocks.heavy_weighted_pressure_plate, 1), 200, 4); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 6L), GT_Utility.getIntegratedCircuit(6), new ItemStack(Items.iron_door, 1), 600, 4); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 7L), GT_Utility.getIntegratedCircuit(7), new ItemStack(Items.cauldron, 1), 700, 4); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.WroughtIron, 1L), GT_Utility.getIntegratedCircuit(1), GT_ModHandler.getIC2Item("ironFence", 1L), 100, 4); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.WroughtIron, 3L), GT_Utility.getIntegratedCircuit(3), new ItemStack(Blocks.iron_bars, 4), 300, 4); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 3L), GT_Utility.getIntegratedCircuit(3), new ItemStack(Blocks.fence, 1), 300, 4); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Iron, 2L), new ItemStack(Blocks.tripwire_hook, 1), 400, 4); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.WroughtIron, 2L), new ItemStack(Blocks.tripwire_hook, 1), 400, 4); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 3L), new ItemStack(Items.string, 3, 32767), new ItemStack(Items.bow, 1), 400, 4); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 3L), ItemList.Component_Minecart_Wheels_Iron.get(2L), new ItemStack(Items.minecart, 1), 500, 2); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 3L), ItemList.Component_Minecart_Wheels_Iron.get(2L), new ItemStack(Items.minecart, 1), 400, 2); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 3L), ItemList.Component_Minecart_Wheels_Steel.get(2L), new ItemStack(Items.minecart, 1), 300, 2); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Iron, 2L), ItemList.Component_Minecart_Wheels_Iron.get(1L), 500, 2); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.WroughtIron, 2L), ItemList.Component_Minecart_Wheels_Iron.get(1L), 400, 2); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Steel, 2L), ItemList.Component_Minecart_Wheels_Steel.get(1L), 300, 2); - GT_Values.RA.addAssemblerRecipe(new ItemStack(Items.minecart, 1), new ItemStack(Blocks.hopper, 1, 32767), new ItemStack(Items.hopper_minecart, 1), 400, 4); - GT_Values.RA.addAssemblerRecipe(new ItemStack(Items.minecart, 1), new ItemStack(Blocks.tnt, 1, 32767), new ItemStack(Items.tnt_minecart, 1), 400, 4); - GT_Values.RA.addAssemblerRecipe(new ItemStack(Items.minecart, 1), new ItemStack(Blocks.chest, 1, 32767), new ItemStack(Items.chest_minecart, 1), 400, 4); - GT_Values.RA.addAssemblerRecipe(new ItemStack(Items.minecart, 1), new ItemStack(Blocks.trapped_chest, 1, 32767), new ItemStack(Items.chest_minecart, 1), 400, 4); - GT_Values.RA.addAssemblerRecipe(new ItemStack(Items.minecart, 1), new ItemStack(Blocks.furnace, 1, 32767), new ItemStack(Items.furnace_minecart, 1), 400, 4); - GT_Values.RA.addAssemblerRecipe(new ItemStack(Blocks.tripwire_hook, 1), new ItemStack(Blocks.chest, 1, 32767), new ItemStack(Blocks.trapped_chest, 1), 200, 4); - GT_Values.RA.addAssemblerRecipe(new ItemStack(Blocks.stone, 1, 0), GT_Utility.getIntegratedCircuit(4), new ItemStack(Blocks.stonebrick, 1, 0), 50, 4); - GT_Values.RA.addAssemblerRecipe(new ItemStack(Blocks.sandstone, 1, 0), GT_Utility.getIntegratedCircuit(1), new ItemStack(Blocks.sandstone, 1, 2), 50, 4); - GT_Values.RA.addAssemblerRecipe(new ItemStack(Blocks.sandstone, 1, 1), GT_Utility.getIntegratedCircuit(1), new ItemStack(Blocks.sandstone, 1, 0), 50, 4); - GT_Values.RA.addAssemblerRecipe(new ItemStack(Blocks.sandstone, 1, 2), GT_Utility.getIntegratedCircuit(1), new ItemStack(Blocks.sandstone, 1, 0), 50, 4); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 8L), GT_Utility.getIntegratedCircuit(8), GT_ModHandler.getIC2Item("machine", 1L), 25, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 8L), GT_Utility.getIntegratedCircuit(8), ItemList.Casing_ULV.get(1L), 25, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 8L), GT_Utility.getIntegratedCircuit(8), ItemList.Casing_LV.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 8L), GT_Utility.getIntegratedCircuit(8), ItemList.Casing_MV.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 8L), GT_Utility.getIntegratedCircuit(8), ItemList.Casing_HV.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 8L), GT_Utility.getIntegratedCircuit(8), ItemList.Casing_EV.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 8L), GT_Utility.getIntegratedCircuit(8), ItemList.Casing_IV.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Chrome, 8L), GT_Utility.getIntegratedCircuit(8), ItemList.Casing_LuV.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 8L), GT_Utility.getIntegratedCircuit(8), ItemList.Casing_ZPM.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 8L), GT_Utility.getIntegratedCircuit(8), ItemList.Casing_UV.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 8L), GT_Utility.getIntegratedCircuit(8), ItemList.Casing_MAX.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Invar, 6L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Invar, 1L), ItemList.Casing_HeatProof.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 6L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Steel, 1L), ItemList.Casing_SolidSteel.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 6L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Aluminium, 1L), ItemList.Casing_FrostProof.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 6L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.TungstenSteel, 1L), ItemList.Casing_RobustTungstenSteel.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 6L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.StainlessSteel, 1L), ItemList.Casing_CleanStainlessSteel.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 6L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Titanium, 1L), ItemList.Casing_StableTitanium.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmiridium, 6L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Osmiridium, 1L), ItemList.Casing_MiningOsmiridium.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 6L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 1L), ItemList.Casing_MiningNeutronium.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BlackPlutonium, 6L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.BlackPlutonium, 1L), ItemList.Casing_MiningBlackPlutonium.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.HSSS, 4L), ItemList.Casing_LuV.get(1L), Materials.HSSG.getMolten(288), ItemList.Casing_Fusion.get(1L), 100, 7680); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Americium, 4L), ItemList.Casing_Fusion.get(1L), Materials.NaquadahAlloy.getMolten(288), ItemList.Casing_Fusion2.get(1L), 200, 30720); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Magnalium, 6L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.BlueSteel, 1L), ItemList.Casing_Turbine.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 6L), ItemList.Casing_Turbine.get(1L), ItemList.Casing_Turbine1.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 6L), ItemList.Casing_Turbine.get(1L), ItemList.Casing_Turbine2.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 6L), ItemList.Casing_Turbine.get(1L), ItemList.Casing_Turbine3.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.HSSS, 6L), ItemList.Casing_Turbine.get(1L), ItemList.Casing_TurbineGasAdvanced.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(ItemList.Casing_SolidSteel.get(1), GT_Utility.getIntegratedCircuit(6), Materials.Polytetrafluoroethylene.getMolten(216), ItemList.Casing_Chemically_Inert.get(1), 50, 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Gold, 2L), + GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Steel, 1L), + new ItemStack(Blocks.light_weighted_pressure_plate, 1), + 200, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 2L), + GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Steel, 1L), + new ItemStack(Blocks.heavy_weighted_pressure_plate, 1), + 200, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 6L), + GT_Utility.getIntegratedCircuit(6), + new ItemStack(Items.iron_door, 1), + 600, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 7L), + GT_Utility.getIntegratedCircuit(7), + new ItemStack(Items.cauldron, 1), + 700, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iron, 1L), + GT_Utility.getIntegratedCircuit(1), + GT_ModHandler.getIC2Item("ironFence", 1L), + 100, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iron, 3L), + GT_Utility.getIntegratedCircuit(3), + new ItemStack(Blocks.iron_bars, 4), + 300, + 4); + // GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 2L), + // GT_Utility.getIntegratedCircuit(2), new ItemStack(Blocks.heavy_weighted_pressure_plate, 1), 200, 4); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 6L), + GT_Utility.getIntegratedCircuit(6), + new ItemStack(Items.iron_door, 1), + 600, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 7L), + GT_Utility.getIntegratedCircuit(7), + new ItemStack(Items.cauldron, 1), + 700, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.WroughtIron, 1L), + GT_Utility.getIntegratedCircuit(1), + GT_ModHandler.getIC2Item("ironFence", 1L), + 100, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.WroughtIron, 3L), + GT_Utility.getIntegratedCircuit(3), + new ItemStack(Blocks.iron_bars, 4), + 300, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 3L), + GT_Utility.getIntegratedCircuit(3), + new ItemStack(Blocks.fence, 1), + 300, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Iron, 2L), + new ItemStack(Blocks.tripwire_hook, 1), + 400, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.WroughtIron, 2L), + new ItemStack(Blocks.tripwire_hook, 1), + 400, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 3L), + new ItemStack(Items.string, 3, 32767), + new ItemStack(Items.bow, 1), + 400, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 3L), + ItemList.Component_Minecart_Wheels_Iron.get(2L), + new ItemStack(Items.minecart, 1), + 500, + 2); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 3L), + ItemList.Component_Minecart_Wheels_Iron.get(2L), + new ItemStack(Items.minecart, 1), + 400, + 2); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 3L), + ItemList.Component_Minecart_Wheels_Steel.get(2L), + new ItemStack(Items.minecart, 1), + 300, + 2); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iron, 1L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Iron, 2L), + ItemList.Component_Minecart_Wheels_Iron.get(1L), + 500, + 2); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.WroughtIron, 1L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.WroughtIron, 2L), + ItemList.Component_Minecart_Wheels_Iron.get(1L), + 400, + 2); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 1L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Steel, 2L), + ItemList.Component_Minecart_Wheels_Steel.get(1L), + 300, + 2); + GT_Values.RA.addAssemblerRecipe( + new ItemStack(Items.minecart, 1), + new ItemStack(Blocks.hopper, 1, 32767), + new ItemStack(Items.hopper_minecart, 1), + 400, + 4); + GT_Values.RA.addAssemblerRecipe( + new ItemStack(Items.minecart, 1), + new ItemStack(Blocks.tnt, 1, 32767), + new ItemStack(Items.tnt_minecart, 1), + 400, + 4); + GT_Values.RA.addAssemblerRecipe( + new ItemStack(Items.minecart, 1), + new ItemStack(Blocks.chest, 1, 32767), + new ItemStack(Items.chest_minecart, 1), + 400, + 4); + GT_Values.RA.addAssemblerRecipe( + new ItemStack(Items.minecart, 1), + new ItemStack(Blocks.trapped_chest, 1, 32767), + new ItemStack(Items.chest_minecart, 1), + 400, + 4); + GT_Values.RA.addAssemblerRecipe( + new ItemStack(Items.minecart, 1), + new ItemStack(Blocks.furnace, 1, 32767), + new ItemStack(Items.furnace_minecart, 1), + 400, + 4); + GT_Values.RA.addAssemblerRecipe( + new ItemStack(Blocks.tripwire_hook, 1), + new ItemStack(Blocks.chest, 1, 32767), + new ItemStack(Blocks.trapped_chest, 1), + 200, + 4); + GT_Values.RA.addAssemblerRecipe( + new ItemStack(Blocks.stone, 1, 0), + GT_Utility.getIntegratedCircuit(4), + new ItemStack(Blocks.stonebrick, 1, 0), + 50, + 4); + GT_Values.RA.addAssemblerRecipe( + new ItemStack(Blocks.sandstone, 1, 0), + GT_Utility.getIntegratedCircuit(1), + new ItemStack(Blocks.sandstone, 1, 2), + 50, + 4); + GT_Values.RA.addAssemblerRecipe( + new ItemStack(Blocks.sandstone, 1, 1), + GT_Utility.getIntegratedCircuit(1), + new ItemStack(Blocks.sandstone, 1, 0), + 50, + 4); + GT_Values.RA.addAssemblerRecipe( + new ItemStack(Blocks.sandstone, 1, 2), + GT_Utility.getIntegratedCircuit(1), + new ItemStack(Blocks.sandstone, 1, 0), + 50, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 8L), + GT_Utility.getIntegratedCircuit(8), + GT_ModHandler.getIC2Item("machine", 1L), + 25, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 8L), + GT_Utility.getIntegratedCircuit(8), + ItemList.Casing_ULV.get(1L), + 25, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 8L), + GT_Utility.getIntegratedCircuit(8), + ItemList.Casing_LV.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 8L), + GT_Utility.getIntegratedCircuit(8), + ItemList.Casing_MV.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 8L), + GT_Utility.getIntegratedCircuit(8), + ItemList.Casing_HV.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 8L), + GT_Utility.getIntegratedCircuit(8), + ItemList.Casing_EV.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 8L), + GT_Utility.getIntegratedCircuit(8), + ItemList.Casing_IV.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Chrome, 8L), + GT_Utility.getIntegratedCircuit(8), + ItemList.Casing_LuV.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 8L), + GT_Utility.getIntegratedCircuit(8), + ItemList.Casing_ZPM.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 8L), + GT_Utility.getIntegratedCircuit(8), + ItemList.Casing_UV.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 8L), + GT_Utility.getIntegratedCircuit(8), + ItemList.Casing_MAX.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Invar, 6L), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Invar, 1L), + ItemList.Casing_HeatProof.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 6L), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Steel, 1L), + ItemList.Casing_SolidSteel.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 6L), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Aluminium, 1L), + ItemList.Casing_FrostProof.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 6L), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.TungstenSteel, 1L), + ItemList.Casing_RobustTungstenSteel.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 6L), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.StainlessSteel, 1L), + ItemList.Casing_CleanStainlessSteel.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 6L), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Titanium, 1L), + ItemList.Casing_StableTitanium.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmiridium, 6L), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Osmiridium, 1L), + ItemList.Casing_MiningOsmiridium.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 6L), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 1L), + ItemList.Casing_MiningNeutronium.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BlackPlutonium, 6L), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.BlackPlutonium, 1L), + ItemList.Casing_MiningBlackPlutonium.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.HSSS, 4L), + ItemList.Casing_LuV.get(1L), + Materials.HSSG.getMolten(288), + ItemList.Casing_Fusion.get(1L), + 100, + 7680); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Americium, 4L), + ItemList.Casing_Fusion.get(1L), + Materials.NaquadahAlloy.getMolten(288), + ItemList.Casing_Fusion2.get(1L), + 200, + 30720); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Magnalium, 6L), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.BlueSteel, 1L), + ItemList.Casing_Turbine.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 6L), + ItemList.Casing_Turbine.get(1L), + ItemList.Casing_Turbine1.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 6L), + ItemList.Casing_Turbine.get(1L), + ItemList.Casing_Turbine2.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 6L), + ItemList.Casing_Turbine.get(1L), + ItemList.Casing_Turbine3.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.HSSS, 6L), + ItemList.Casing_Turbine.get(1L), + ItemList.Casing_TurbineGasAdvanced.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + ItemList.Casing_SolidSteel.get(1), + GT_Utility.getIntegratedCircuit(6), + Materials.Polytetrafluoroethylene.getMolten(216), + ItemList.Casing_Chemically_Inert.get(1), + 50, + 16); if (Loader.isModLoaded("bartworks")) { - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("bartworks", "gt.bwMetaGeneratedplate", 6L, 88), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Chrome, 1L), ItemList.Casing_Advanced_Rhodium_Palladium.get(1L), 50, 16); + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getModItem("bartworks", "gt.bwMetaGeneratedplate", 6L, 88), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Chrome, 1L), + ItemList.Casing_Advanced_Rhodium_Palladium.get(1L), + 50, + 16); } - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 6L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Iridium, 1L), ItemList.Casing_Advanced_Iridium.get(1L), 50, 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 6L), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Iridium, 1L), + ItemList.Casing_Advanced_Iridium.get(1L), + 50, + 16); if (GT_Mod.gregtechproxy.mHardMachineCasings) { - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Lead, 2L), ItemList.Casing_ULV.get(1L), Materials.Plastic.getMolten(288), ItemList.Hull_ULV.get(1L), 25, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Tin, 2L), ItemList.Casing_LV.get(1L), Materials.Plastic.getMolten(288), ItemList.Hull_LV.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Copper, 2L), ItemList.Casing_MV.get(1L), Materials.Plastic.getMolten(288), ItemList.Hull_MV.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.AnnealedCopper, 2L), ItemList.Casing_MV.get(1L), Materials.Plastic.getMolten(288), ItemList.Hull_MV.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Gold, 2L), ItemList.Casing_HV.get(1L), Materials.Plastic.getMolten(288), ItemList.Hull_HV.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Aluminium, 2L), ItemList.Casing_EV.get(1L), Materials.Plastic.getMolten(288), ItemList.Hull_EV.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Tungsten, 2L), ItemList.Casing_IV.get(1L), Materials.Polytetrafluoroethylene.getMolten(288), ItemList.Hull_IV.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.VanadiumGallium, 2L), ItemList.Casing_LuV.get(1L), Materials.Polytetrafluoroethylene.getMolten(288), ItemList.Hull_LuV.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Naquadah, 2L), ItemList.Casing_ZPM.get(1L), Materials.Polybenzimidazole.getMolten(288), ItemList.Hull_ZPM.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 2L), ItemList.Casing_UV.get(1L), Materials.Polybenzimidazole.getMolten(288), ItemList.Hull_UV.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.SuperconductorUV, 2L), ItemList.Casing_MAX.get(1L), Materials.Polybenzimidazole.getMolten(288), ItemList.Hull_MAX.get(1L), 50, 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Lead, 2L), + ItemList.Casing_ULV.get(1L), + Materials.Plastic.getMolten(288), + ItemList.Hull_ULV.get(1L), + 25, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Tin, 2L), + ItemList.Casing_LV.get(1L), + Materials.Plastic.getMolten(288), + ItemList.Hull_LV.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Copper, 2L), + ItemList.Casing_MV.get(1L), + Materials.Plastic.getMolten(288), + ItemList.Hull_MV.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.AnnealedCopper, 2L), + ItemList.Casing_MV.get(1L), + Materials.Plastic.getMolten(288), + ItemList.Hull_MV.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Gold, 2L), + ItemList.Casing_HV.get(1L), + Materials.Plastic.getMolten(288), + ItemList.Hull_HV.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Aluminium, 2L), + ItemList.Casing_EV.get(1L), + Materials.Plastic.getMolten(288), + ItemList.Hull_EV.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Tungsten, 2L), + ItemList.Casing_IV.get(1L), + Materials.Polytetrafluoroethylene.getMolten(288), + ItemList.Hull_IV.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.VanadiumGallium, 2L), + ItemList.Casing_LuV.get(1L), + Materials.Polytetrafluoroethylene.getMolten(288), + ItemList.Hull_LuV.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Naquadah, 2L), + ItemList.Casing_ZPM.get(1L), + Materials.Polybenzimidazole.getMolten(288), + ItemList.Hull_ZPM.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 2L), + ItemList.Casing_UV.get(1L), + Materials.Polybenzimidazole.getMolten(288), + ItemList.Hull_UV.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.SuperconductorUV, 2L), + ItemList.Casing_MAX.get(1L), + Materials.Polybenzimidazole.getMolten(288), + ItemList.Hull_MAX.get(1L), + 50, + 16); } else { - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Lead, 2L), ItemList.Casing_ULV.get(1L),ItemList.Hull_ULV.get(1L), 25, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Tin, 2L), ItemList.Casing_LV.get(1L),ItemList.Hull_LV.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Copper, 2L), ItemList.Casing_MV.get(1L),ItemList.Hull_MV.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.AnnealedCopper, 2L), ItemList.Casing_MV.get(1L), ItemList.Hull_MV.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Gold, 2L), ItemList.Casing_HV.get(1L), ItemList.Hull_HV.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Aluminium, 2L), ItemList.Casing_EV.get(1L), ItemList.Hull_EV.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Tungsten, 2L), ItemList.Casing_IV.get(1L), ItemList.Hull_IV.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.VanadiumGallium, 2L), ItemList.Casing_LuV.get(1L), ItemList.Hull_LuV.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Naquadah, 2L), ItemList.Casing_ZPM.get(1L), ItemList.Hull_ZPM.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 2L), ItemList.Casing_UV.get(1L), ItemList.Hull_UV.get(1L), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.SuperconductorUV, 2L), ItemList.Casing_MAX.get(1L), ItemList.Hull_MAX.get(1L), 50, 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Lead, 2L), + ItemList.Casing_ULV.get(1L), + ItemList.Hull_ULV.get(1L), + 25, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Tin, 2L), + ItemList.Casing_LV.get(1L), + ItemList.Hull_LV.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Copper, 2L), + ItemList.Casing_MV.get(1L), + ItemList.Hull_MV.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.AnnealedCopper, 2L), + ItemList.Casing_MV.get(1L), + ItemList.Hull_MV.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Gold, 2L), + ItemList.Casing_HV.get(1L), + ItemList.Hull_HV.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Aluminium, 2L), + ItemList.Casing_EV.get(1L), + ItemList.Hull_EV.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Tungsten, 2L), + ItemList.Casing_IV.get(1L), + ItemList.Hull_IV.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.VanadiumGallium, 2L), + ItemList.Casing_LuV.get(1L), + ItemList.Hull_LuV.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Naquadah, 2L), + ItemList.Casing_ZPM.get(1L), + ItemList.Hull_ZPM.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 2L), + ItemList.Casing_UV.get(1L), + ItemList.Hull_UV.get(1L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.SuperconductorUV, 2L), + ItemList.Casing_MAX.get(1L), + ItemList.Hull_MAX.get(1L), + 50, + 16); } - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Tin, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BatteryAlloy, 1L), Materials.Plastic.getMolten(144), ItemList.Battery_Hull_LV.get(1L), 800, 1); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Copper, 2L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BatteryAlloy, 3L), Materials.Plastic.getMolten(432), ItemList.Battery_Hull_MV.get(1L), 1600, 2); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.AnnealedCopper, 2L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BatteryAlloy, 3L), Materials.Plastic.getMolten(432), ItemList.Battery_Hull_MV.get(1L), 1600, 2); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Gold, 4L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BatteryAlloy, 9L), Materials.Plastic.getMolten(1296), ItemList.Battery_Hull_HV.get(1L), 3200, 4); - - GT_Values.RA.addAssemblerRecipe(new ItemStack(Items.string, 4, 32767), new ItemStack(Items.slime_ball, 1, 32767), new ItemStack(Items.lead, 2), 200, 2); - GT_Values.RA.addAssemblerRecipe(ItemList.IC2_Compressed_Coal_Ball.get(8L), new ItemStack(Blocks.brick_block, 1), ItemList.IC2_Compressed_Coal_Chunk.get(1L), 400, 4); - - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getIC2Item("waterMill", 2L), GT_Utility.getIntegratedCircuit(2), GT_ModHandler.getIC2Item("generator", 1L), 6400, 8); - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getIC2Item("batPack", 1L, 32767), GT_Utility.getIntegratedCircuit(1), ItemList.IC2_ReBattery.get(6L), 800, 4); - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getIC2Item("carbonFiber", 2L), GT_Utility.getIntegratedCircuit(2), GT_ModHandler.getIC2Item("carbonMesh", 1L), 800, 2); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 4L), GT_ModHandler.getIC2Item("generator", 1L), GT_ModHandler.getIC2Item("waterMill", 2L), 6400, 8); - - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 5L), new ItemStack(Blocks.chest, 1, 32767), new ItemStack(Blocks.hopper), 800, 2); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 5L), new ItemStack(Blocks.trapped_chest, 1, 32767), new ItemStack(Blocks.hopper), 800, 2); - - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 5L), new ItemStack(Blocks.chest, 1, 32767), new ItemStack(Blocks.hopper), 800, 2); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 5L), new ItemStack(Blocks.trapped_chest, 1, 32767), new ItemStack(Blocks.hopper), 800, 2); - - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Magnalium, 2L), GT_ModHandler.getIC2Item("generator", 1L), GT_ModHandler.getIC2Item("windMill", 1L), 6400, 8); - - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderPearl, 1L), new ItemStack(Items.blaze_powder, 1, 0), new ItemStack(Items.ender_eye, 1, 0), 400, 2); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderPearl, 6L), new ItemStack(Items.blaze_rod, 1, 0), new ItemStack(Items.ender_eye, 6, 0), 2500, 2); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.gear, Materials.CobaltBrass, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond, 1L), ItemList.Component_Sawblade_Diamond.get(1L), 1600, 2); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 4L), new ItemStack(Blocks.redstone_lamp, 1), 400, 1); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), new ItemStack(Blocks.redstone_torch, 1), 400, 1); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 4L), new ItemStack(Items.compass, 1), 400, 4); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 4L), new ItemStack(Items.compass, 1), 400, 4); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Gold, 4L), new ItemStack(Items.clock, 1), 400, 4); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), new ItemStack(Blocks.torch, 2), 400, 1); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TricalciumPhosphate, 1L), new ItemStack(Blocks.torch, 6), 400, 1); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), ItemList.IC2_Resin.get(1L), new ItemStack(Blocks.torch, 6), 400, 1); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 8L), new ItemStack(Items.flint, 1), ItemList.IC2_Compressed_Coal_Ball.get(1L), 400, 4); - - if(Loader.isModLoaded("IC2NuclearControl")) {//Card recycling recipes - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("IC2NuclearControl", "ItemVanillaMachineCard", 1L, 0), GT_Utility.getIntegratedCircuit(1), GT_ModHandler.getIC2Item("electronicCircuit", 2L), 200, 30); - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("IC2NuclearControl", "ItemInventoryScannerCard", 1L, 0), GT_Utility.getIntegratedCircuit(1), GT_ModHandler.getIC2Item("electronicCircuit", 2L), 200, 30); - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("IC2NuclearControl", "ItemEnergySensorLocationCard", 1L, 0), GT_Utility.getIntegratedCircuit(1), GT_ModHandler.getIC2Item("electronicCircuit", 2L), 200, 30); - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("IC2NuclearControl", "RFSensorCard", 1L, 0), GT_Utility.getIntegratedCircuit(1), GT_ModHandler.getIC2Item("electronicCircuit", 2L), 200, 30); - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("IC2NuclearControl", "ItemMultipleSensorLocationCard", 1L, 0), GT_Utility.getIntegratedCircuit(1), GT_ModHandler.getIC2Item("electronicCircuit", 1L), 200, 30);//counter - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("IC2NuclearControl", "ItemMultipleSensorLocationCard", 1L, 1), GT_Utility.getIntegratedCircuit(1), GT_ModHandler.getIC2Item("electronicCircuit", 1L), 200, 30);//liquid - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("IC2NuclearControl", "ItemMultipleSensorLocationCard", 1L, 2), GT_Utility.getIntegratedCircuit(1), GT_ModHandler.getIC2Item("electronicCircuit", 2L), 200, 30);//generator - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("IC2NuclearControl", "ItemLiquidArrayLocationCard", 1L, 0), GT_Utility.getIntegratedCircuit(1), GT_ModHandler.getIC2Item("electronicCircuit", 2L), 200, 30);//2-6 liquid - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("IC2NuclearControl", "ItemEnergyArrayLocationCard", 1L, 0), GT_Utility.getIntegratedCircuit(1), GT_ModHandler.getIC2Item("electronicCircuit", 2L), 200, 30);//2-6 energy - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("IC2NuclearControl", "ItemSensorLocationCard", 1L, 0), GT_Utility.getIntegratedCircuit(1), GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Good), 2L), 200, 30);//non-fluid nuke - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("IC2NuclearControl", "Item55ReactorCard", 1L, 0), GT_Utility.getIntegratedCircuit(1), GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Good), 2L), 200, 30); - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("IC2NuclearControl", "CardAppeng", 1L, 0), GT_Utility.getIntegratedCircuit(1), GT_ModHandler.getIC2Item("electronicCircuit", 2L), 200, 30); - GT_Values.RA.addAssemblerRecipe(ItemList.NC_SensorCard.get(1L), GT_Utility.getIntegratedCircuit(1), GT_ModHandler.getIC2Item("electronicCircuit", 3L), 200, 30); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Tin, 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BatteryAlloy, 1L), + Materials.Plastic.getMolten(144), + ItemList.Battery_Hull_LV.get(1L), + 800, + 1); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Copper, 2L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BatteryAlloy, 3L), + Materials.Plastic.getMolten(432), + ItemList.Battery_Hull_MV.get(1L), + 1600, + 2); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.AnnealedCopper, 2L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BatteryAlloy, 3L), + Materials.Plastic.getMolten(432), + ItemList.Battery_Hull_MV.get(1L), + 1600, + 2); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Gold, 4L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BatteryAlloy, 9L), + Materials.Plastic.getMolten(1296), + ItemList.Battery_Hull_HV.get(1L), + 3200, + 4); + + GT_Values.RA.addAssemblerRecipe( + new ItemStack(Items.string, 4, 32767), + new ItemStack(Items.slime_ball, 1, 32767), + new ItemStack(Items.lead, 2), + 200, + 2); + GT_Values.RA.addAssemblerRecipe( + ItemList.IC2_Compressed_Coal_Ball.get(8L), + new ItemStack(Blocks.brick_block, 1), + ItemList.IC2_Compressed_Coal_Chunk.get(1L), + 400, + 4); + + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getIC2Item("waterMill", 2L), + GT_Utility.getIntegratedCircuit(2), + GT_ModHandler.getIC2Item("generator", 1L), + 6400, + 8); + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getIC2Item("batPack", 1L, 32767), + GT_Utility.getIntegratedCircuit(1), + ItemList.IC2_ReBattery.get(6L), + 800, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getIC2Item("carbonFiber", 2L), + GT_Utility.getIntegratedCircuit(2), + GT_ModHandler.getIC2Item("carbonMesh", 1L), + 800, + 2); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 4L), + GT_ModHandler.getIC2Item("generator", 1L), + GT_ModHandler.getIC2Item("waterMill", 2L), + 6400, + 8); + + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 5L), + new ItemStack(Blocks.chest, 1, 32767), + new ItemStack(Blocks.hopper), + 800, + 2); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 5L), + new ItemStack(Blocks.trapped_chest, 1, 32767), + new ItemStack(Blocks.hopper), + 800, + 2); + + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 5L), + new ItemStack(Blocks.chest, 1, 32767), + new ItemStack(Blocks.hopper), + 800, + 2); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 5L), + new ItemStack(Blocks.trapped_chest, 1, 32767), + new ItemStack(Blocks.hopper), + 800, + 2); + + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Magnalium, 2L), + GT_ModHandler.getIC2Item("generator", 1L), + GT_ModHandler.getIC2Item("windMill", 1L), + 6400, + 8); + + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderPearl, 1L), + new ItemStack(Items.blaze_powder, 1, 0), + new ItemStack(Items.ender_eye, 1, 0), + 400, + 2); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderPearl, 6L), + new ItemStack(Items.blaze_rod, 1, 0), + new ItemStack(Items.ender_eye, 6, 0), + 2500, + 2); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.gear, Materials.CobaltBrass, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond, 1L), + ItemList.Component_Sawblade_Diamond.get(1L), + 1600, + 2); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 4L), + new ItemStack(Blocks.redstone_lamp, 1), + 400, + 1); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), + new ItemStack(Blocks.redstone_torch, 1), + 400, + 1); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 4L), + new ItemStack(Items.compass, 1), + 400, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 4L), + new ItemStack(Items.compass, 1), + 400, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Gold, 4L), + new ItemStack(Items.clock, 1), + 400, + 4); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), + new ItemStack(Blocks.torch, 2), + 400, + 1); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TricalciumPhosphate, 1L), + new ItemStack(Blocks.torch, 6), + 400, + 1); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), + ItemList.IC2_Resin.get(1L), + new ItemStack(Blocks.torch, 6), + 400, + 1); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 8L), + new ItemStack(Items.flint, 1), + ItemList.IC2_Compressed_Coal_Ball.get(1L), + 400, + 4); + + if (Loader.isModLoaded("IC2NuclearControl")) { // Card recycling recipes + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getModItem("IC2NuclearControl", "ItemVanillaMachineCard", 1L, 0), + GT_Utility.getIntegratedCircuit(1), + GT_ModHandler.getIC2Item("electronicCircuit", 2L), + 200, + 30); + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getModItem("IC2NuclearControl", "ItemInventoryScannerCard", 1L, 0), + GT_Utility.getIntegratedCircuit(1), + GT_ModHandler.getIC2Item("electronicCircuit", 2L), + 200, + 30); + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getModItem("IC2NuclearControl", "ItemEnergySensorLocationCard", 1L, 0), + GT_Utility.getIntegratedCircuit(1), + GT_ModHandler.getIC2Item("electronicCircuit", 2L), + 200, + 30); + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getModItem("IC2NuclearControl", "RFSensorCard", 1L, 0), + GT_Utility.getIntegratedCircuit(1), + GT_ModHandler.getIC2Item("electronicCircuit", 2L), + 200, + 30); + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getModItem("IC2NuclearControl", "ItemMultipleSensorLocationCard", 1L, 0), + GT_Utility.getIntegratedCircuit(1), + GT_ModHandler.getIC2Item("electronicCircuit", 1L), + 200, + 30); // counter + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getModItem("IC2NuclearControl", "ItemMultipleSensorLocationCard", 1L, 1), + GT_Utility.getIntegratedCircuit(1), + GT_ModHandler.getIC2Item("electronicCircuit", 1L), + 200, + 30); // liquid + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getModItem("IC2NuclearControl", "ItemMultipleSensorLocationCard", 1L, 2), + GT_Utility.getIntegratedCircuit(1), + GT_ModHandler.getIC2Item("electronicCircuit", 2L), + 200, + 30); // generator + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getModItem("IC2NuclearControl", "ItemLiquidArrayLocationCard", 1L, 0), + GT_Utility.getIntegratedCircuit(1), + GT_ModHandler.getIC2Item("electronicCircuit", 2L), + 200, + 30); // 2-6 liquid + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getModItem("IC2NuclearControl", "ItemEnergyArrayLocationCard", 1L, 0), + GT_Utility.getIntegratedCircuit(1), + GT_ModHandler.getIC2Item("electronicCircuit", 2L), + 200, + 30); // 2-6 energy + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getModItem("IC2NuclearControl", "ItemSensorLocationCard", 1L, 0), + GT_Utility.getIntegratedCircuit(1), + GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Good), 2L), + 200, + 30); // non-fluid nuke + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getModItem("IC2NuclearControl", "Item55ReactorCard", 1L, 0), + GT_Utility.getIntegratedCircuit(1), + GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Good), 2L), + 200, + 30); + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getModItem("IC2NuclearControl", "CardAppeng", 1L, 0), + GT_Utility.getIntegratedCircuit(1), + GT_ModHandler.getIC2Item("electronicCircuit", 2L), + 200, + 30); + GT_Values.RA.addAssemblerRecipe( + ItemList.NC_SensorCard.get(1L), + GT_Utility.getIntegratedCircuit(1), + GT_ModHandler.getIC2Item("electronicCircuit", 3L), + 200, + 30); } if (!GT_Mod.gregtechproxy.mDisableIC2Cables) { - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getIC2Item("tinCableItem", 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Rubber, 1L), GT_ModHandler.getIC2Item("insulatedTinCableItem", 1L), 100, 2); - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getIC2Item("copperCableItem", 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Rubber, 1L), GT_ModHandler.getIC2Item("insulatedCopperCableItem", 1L), 100, 2); - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getIC2Item("goldCableItem", 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Rubber, 2L), GT_ModHandler.getIC2Item("insulatedGoldCableItem", 1L), 200, 2); - GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getIC2Item("ironCableItem", 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Rubber, 3L), GT_ModHandler.getIC2Item("insulatedIronCableItem", 1L), 300, 2); + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getIC2Item("tinCableItem", 1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Rubber, 1L), + GT_ModHandler.getIC2Item("insulatedTinCableItem", 1L), + 100, + 2); + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getIC2Item("copperCableItem", 1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Rubber, 1L), + GT_ModHandler.getIC2Item("insulatedCopperCableItem", 1L), + 100, + 2); + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getIC2Item("goldCableItem", 1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Rubber, 2L), + GT_ModHandler.getIC2Item("insulatedGoldCableItem", 1L), + 200, + 2); + GT_Values.RA.addAssemblerRecipe( + GT_ModHandler.getIC2Item("ironCableItem", 1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Rubber, 3L), + GT_ModHandler.getIC2Item("insulatedIronCableItem", 1L), + 300, + 2); } - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, Materials.Wood, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), new ItemStack(Items.wooden_sword, 1), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, Materials.Stone, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), new ItemStack(Items.stone_sword, 1), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), new ItemStack(Items.iron_sword, 1), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, Materials.Gold, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), new ItemStack(Items.golden_sword, 1), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, Materials.Diamond, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), new ItemStack(Items.diamond_sword, 1), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, Materials.Bronze, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), ItemList.Tool_Sword_Bronze.getUndamaged(1L), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, Materials.Steel, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), ItemList.Tool_Sword_Steel.getUndamaged(1L), 100, 16); - - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, Materials.Wood, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), new ItemStack(Items.wooden_pickaxe, 1), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, Materials.Stone, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), new ItemStack(Items.stone_pickaxe, 1), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), new ItemStack(Items.iron_pickaxe, 1), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, Materials.Gold, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), new ItemStack(Items.golden_pickaxe, 1), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, Materials.Diamond, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), new ItemStack(Items.diamond_pickaxe, 1), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, Materials.Bronze, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), ItemList.Tool_Pickaxe_Bronze.getUndamaged(1L), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, Materials.Steel, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), ItemList.Tool_Pickaxe_Steel.getUndamaged(1L), 100, 16); - - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, Materials.Wood, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), new ItemStack(Items.wooden_shovel, 1), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, Materials.Stone, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), new ItemStack(Items.stone_shovel, 1), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), new ItemStack(Items.iron_shovel, 1), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, Materials.Gold, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), new ItemStack(Items.golden_shovel, 1), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, Materials.Diamond, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), new ItemStack(Items.diamond_shovel, 1), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, Materials.Bronze, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), ItemList.Tool_Shovel_Bronze.getUndamaged(1L), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, Materials.Steel, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), ItemList.Tool_Shovel_Steel.getUndamaged(1L), 100, 16); - - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, Materials.Wood, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), new ItemStack(Items.wooden_axe, 1), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, Materials.Stone, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), new ItemStack(Items.stone_axe, 1), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), new ItemStack(Items.iron_axe, 1), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, Materials.Gold, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), new ItemStack(Items.golden_axe, 1), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, Materials.Diamond, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), new ItemStack(Items.diamond_axe, 1), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, Materials.Bronze, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), ItemList.Tool_Axe_Bronze.getUndamaged(1L), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, Materials.Steel, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), ItemList.Tool_Axe_Steel.getUndamaged(1L), 100, 16); - - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, Materials.Wood, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), new ItemStack(Items.wooden_hoe, 1), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, Materials.Stone, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), new ItemStack(Items.stone_hoe, 1), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), new ItemStack(Items.iron_hoe, 1), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, Materials.Gold, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), new ItemStack(Items.golden_hoe, 1), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, Materials.Diamond, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), new ItemStack(Items.diamond_hoe, 1), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, Materials.Bronze, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), ItemList.Tool_Hoe_Bronze.getUndamaged(1L), 100, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, Materials.Steel, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), ItemList.Tool_Hoe_Steel.getUndamaged(1L), 100, 16); - - //fuel rod assembler recipes - GT_Values.RA.addAssemblerRecipe(new ItemStack[] {ItemList.ThoriumCell_1.get(2L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 4L), GT_Utility.getIntegratedCircuit(2)}, null, ItemList.ThoriumCell_2.get(1L), 200, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[] {ItemList.ThoriumCell_1.get(4L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Steel, 6L), GT_Utility.getIntegratedCircuit(4)}, null, ItemList.ThoriumCell_4.get(1L), 300, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[] {ItemList.ThoriumCell_2.get(2L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 4L), GT_Utility.getIntegratedCircuit(5)}, null, ItemList.ThoriumCell_4.get(1L), 200, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[] {ItemList.Uraniumcell_1.get(2L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 4L), GT_Utility.getIntegratedCircuit(2)}, null, ItemList.Uraniumcell_2.get(1L), 200, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[] {ItemList.Uraniumcell_1.get(4L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Steel, 6L), GT_Utility.getIntegratedCircuit(4)}, null, ItemList.Uraniumcell_4.get(1L), 300, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[] {ItemList.Uraniumcell_2.get(2L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 4L), GT_Utility.getIntegratedCircuit(5)}, null, ItemList.Uraniumcell_4.get(1L), 200, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[] {ItemList.Moxcell_1.get(2L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 4L), GT_Utility.getIntegratedCircuit(2)}, null, ItemList.Moxcell_2.get(1L), 200, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[] {ItemList.Moxcell_1.get(4L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Steel, 6L), GT_Utility.getIntegratedCircuit(4)}, null, ItemList.Moxcell_4.get(1L), 300, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[] {ItemList.Moxcell_2.get(2L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 4L), GT_Utility.getIntegratedCircuit(5)}, null, ItemList.Moxcell_4.get(1L), 200, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[] {ItemList.NaquadahCell_1.get(2L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.TungstenSteel, 4L), GT_Utility.getIntegratedCircuit(2)}, null, ItemList.NaquadahCell_2.get(1L), 100, 400); - GT_Values.RA.addAssemblerRecipe(new ItemStack[] {ItemList.NaquadahCell_1.get(4L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.TungstenSteel, 6L), GT_Utility.getIntegratedCircuit(4)}, null, ItemList.NaquadahCell_4.get(1L), 150, 400); - GT_Values.RA.addAssemblerRecipe(new ItemStack[] {ItemList.NaquadahCell_2.get(2L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.TungstenSteel, 4L), GT_Utility.getIntegratedCircuit(5)}, null, ItemList.NaquadahCell_4.get(1L), 100, 400); - GT_Values.RA.addAssemblerRecipe(new ItemStack[] {ItemList.MNqCell_1.get(2L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.TungstenSteel, 4L), GT_Utility.getIntegratedCircuit(2)}, null, ItemList.MNqCell_2.get(1L), 100, 400); - GT_Values.RA.addAssemblerRecipe(new ItemStack[] {ItemList.MNqCell_1.get(4L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.TungstenSteel, 6L), GT_Utility.getIntegratedCircuit(4)}, null, ItemList.MNqCell_4.get(1L), 150, 400); - GT_Values.RA.addAssemblerRecipe(new ItemStack[] {ItemList.MNqCell_2.get(2L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.TungstenSteel, 4L), GT_Utility.getIntegratedCircuit(5)}, null, ItemList.MNqCell_4.get(1L), 100, 400); - - - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Neutronium, 8L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Iridium, 4L), ItemList.neutroniumHeatCapacitor.get(1L), 100, 120000); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, Materials.Wood, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), + new ItemStack(Items.wooden_sword, 1), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, Materials.Stone, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), + new ItemStack(Items.stone_sword, 1), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, Materials.Iron, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), + new ItemStack(Items.iron_sword, 1), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, Materials.Gold, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), + new ItemStack(Items.golden_sword, 1), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, Materials.Diamond, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), + new ItemStack(Items.diamond_sword, 1), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, Materials.Bronze, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), + ItemList.Tool_Sword_Bronze.getUndamaged(1L), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, Materials.Steel, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), + ItemList.Tool_Sword_Steel.getUndamaged(1L), + 100, + 16); + + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, Materials.Wood, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + new ItemStack(Items.wooden_pickaxe, 1), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, Materials.Stone, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + new ItemStack(Items.stone_pickaxe, 1), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, Materials.Iron, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + new ItemStack(Items.iron_pickaxe, 1), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, Materials.Gold, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + new ItemStack(Items.golden_pickaxe, 1), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, Materials.Diamond, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + new ItemStack(Items.diamond_pickaxe, 1), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, Materials.Bronze, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + ItemList.Tool_Pickaxe_Bronze.getUndamaged(1L), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, Materials.Steel, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + ItemList.Tool_Pickaxe_Steel.getUndamaged(1L), + 100, + 16); + + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, Materials.Wood, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + new ItemStack(Items.wooden_shovel, 1), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, Materials.Stone, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + new ItemStack(Items.stone_shovel, 1), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, Materials.Iron, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + new ItemStack(Items.iron_shovel, 1), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, Materials.Gold, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + new ItemStack(Items.golden_shovel, 1), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, Materials.Diamond, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + new ItemStack(Items.diamond_shovel, 1), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, Materials.Bronze, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + ItemList.Tool_Shovel_Bronze.getUndamaged(1L), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, Materials.Steel, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + ItemList.Tool_Shovel_Steel.getUndamaged(1L), + 100, + 16); + + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, Materials.Wood, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + new ItemStack(Items.wooden_axe, 1), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, Materials.Stone, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + new ItemStack(Items.stone_axe, 1), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, Materials.Iron, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + new ItemStack(Items.iron_axe, 1), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, Materials.Gold, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + new ItemStack(Items.golden_axe, 1), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, Materials.Diamond, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + new ItemStack(Items.diamond_axe, 1), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, Materials.Bronze, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + ItemList.Tool_Axe_Bronze.getUndamaged(1L), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, Materials.Steel, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + ItemList.Tool_Axe_Steel.getUndamaged(1L), + 100, + 16); + + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, Materials.Wood, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + new ItemStack(Items.wooden_hoe, 1), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, Materials.Stone, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + new ItemStack(Items.stone_hoe, 1), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, Materials.Iron, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + new ItemStack(Items.iron_hoe, 1), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, Materials.Gold, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + new ItemStack(Items.golden_hoe, 1), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, Materials.Diamond, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + new ItemStack(Items.diamond_hoe, 1), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, Materials.Bronze, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + ItemList.Tool_Hoe_Bronze.getUndamaged(1L), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, Materials.Steel, 1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), + ItemList.Tool_Hoe_Steel.getUndamaged(1L), + 100, + 16); + + // fuel rod assembler recipes + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.ThoriumCell_1.get(2L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 4L), + GT_Utility.getIntegratedCircuit(2) + }, + null, + ItemList.ThoriumCell_2.get(1L), + 200, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.ThoriumCell_1.get(4L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Steel, 6L), + GT_Utility.getIntegratedCircuit(4) + }, + null, + ItemList.ThoriumCell_4.get(1L), + 300, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.ThoriumCell_2.get(2L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 4L), + GT_Utility.getIntegratedCircuit(5) + }, + null, + ItemList.ThoriumCell_4.get(1L), + 200, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Uraniumcell_1.get(2L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 4L), + GT_Utility.getIntegratedCircuit(2) + }, + null, + ItemList.Uraniumcell_2.get(1L), + 200, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Uraniumcell_1.get(4L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Steel, 6L), + GT_Utility.getIntegratedCircuit(4) + }, + null, + ItemList.Uraniumcell_4.get(1L), + 300, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Uraniumcell_2.get(2L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 4L), + GT_Utility.getIntegratedCircuit(5) + }, + null, + ItemList.Uraniumcell_4.get(1L), + 200, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Moxcell_1.get(2L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 4L), + GT_Utility.getIntegratedCircuit(2) + }, + null, + ItemList.Moxcell_2.get(1L), + 200, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Moxcell_1.get(4L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Steel, 6L), + GT_Utility.getIntegratedCircuit(4) + }, + null, + ItemList.Moxcell_4.get(1L), + 300, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Moxcell_2.get(2L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 4L), + GT_Utility.getIntegratedCircuit(5) + }, + null, + ItemList.Moxcell_4.get(1L), + 200, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.NaquadahCell_1.get(2L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.TungstenSteel, 4L), + GT_Utility.getIntegratedCircuit(2) + }, + null, + ItemList.NaquadahCell_2.get(1L), + 100, + 400); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.NaquadahCell_1.get(4L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.TungstenSteel, 6L), + GT_Utility.getIntegratedCircuit(4) + }, + null, + ItemList.NaquadahCell_4.get(1L), + 150, + 400); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.NaquadahCell_2.get(2L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.TungstenSteel, 4L), + GT_Utility.getIntegratedCircuit(5) + }, + null, + ItemList.NaquadahCell_4.get(1L), + 100, + 400); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.MNqCell_1.get(2L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.TungstenSteel, 4L), + GT_Utility.getIntegratedCircuit(2) + }, + null, + ItemList.MNqCell_2.get(1L), + 100, + 400); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.MNqCell_1.get(4L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.TungstenSteel, 6L), + GT_Utility.getIntegratedCircuit(4) + }, + null, + ItemList.MNqCell_4.get(1L), + 150, + 400); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.MNqCell_2.get(2L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.TungstenSteel, 4L), + GT_Utility.getIntegratedCircuit(5) + }, + null, + ItemList.MNqCell_4.get(1L), + 100, + 400); + + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Neutronium, 8L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Iridium, 4L), + ItemList.neutroniumHeatCapacitor.get(1L), + 100, + 120000); GT_ModHandler.removeRecipe(new ItemStack(Items.lava_bucket), ItemList.Cell_Empty.get(1L)); GT_ModHandler.removeRecipe(new ItemStack(Items.water_bucket), ItemList.Cell_Empty.get(1L)); GT_ModHandler.removeFurnaceSmelting(ItemList.IC2_Resin.get(1L)); - if(!GregTech_API.mIC2Classic) - GT_Values.RA.addPyrolyseRecipe(GT_ModHandler.getIC2Item("biochaff", 4L), Materials.Water.getFluid(4000), 1, GT_Values.NI, new FluidStack(FluidRegistry.getFluid("ic2biomass"), 5000), 900, 10); - if(Loader.isModLoaded(MOD_ID_FR)) { - GT_Values.RA.addPyrolyseRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "fertilizerBio", 4L), Materials.Water.getFluid(4000), 1, GT_Values.NI, Materials.Biomass.getFluid(5000), 900, 10); - GT_Values.RA.addPyrolyseRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "mulch", 32L), Materials.Water.getFluid(4000), 1, GT_Values.NI, Materials.Biomass.getFluid(5000), 900, 10); + if (!GregTech_API.mIC2Classic) + GT_Values.RA.addPyrolyseRecipe( + GT_ModHandler.getIC2Item("biochaff", 4L), + Materials.Water.getFluid(4000), + 1, + GT_Values.NI, + new FluidStack(FluidRegistry.getFluid("ic2biomass"), 5000), + 900, + 10); + if (Loader.isModLoaded(MOD_ID_FR)) { + GT_Values.RA.addPyrolyseRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "fertilizerBio", 4L), + Materials.Water.getFluid(4000), + 1, + GT_Values.NI, + Materials.Biomass.getFluid(5000), + 900, + 10); + GT_Values.RA.addPyrolyseRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "mulch", 32L), + Materials.Water.getFluid(4000), + 1, + GT_Values.NI, + Materials.Biomass.getFluid(5000), + 900, + 10); } /* Recycling Recipes for EBF Coils Adding hatches/buses at a later date*/ - GT_Values.RA.addArcFurnaceRecipe(ItemList.Casing_Coil_Cupronickel.get(1L),new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot,Materials.Cupronickel,8),GT_OreDictUnificator.get(OrePrefixes.ingot,Materials.Tin,1),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Ash,2)},null,300,360); - GT_Values.RA.addArcFurnaceRecipe(ItemList.Casing_Coil_Kanthal.get(1L),new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot,Materials.Kanthal,8),GT_OreDictUnificator.get(OrePrefixes.ingot,Materials.Cupronickel,1),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Ash,3)},null,300,360); - GT_Values.RA.addArcFurnaceRecipe(ItemList.Casing_Coil_Nichrome.get(1L),new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot,Materials.Nichrome,8),GT_OreDictUnificator.get(OrePrefixes.ingot,Materials.Kanthal,1),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Ash,4)},null,300,360); - GT_Values.RA.addArcFurnaceRecipe(ItemList.Casing_Coil_TungstenSteel.get(1L),new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot,Materials.TungstenSteel,8),GT_OreDictUnificator.get(OrePrefixes.ingot,Materials.Nichrome,1),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Ash,5)},null,300,360); - GT_Values.RA.addArcFurnaceRecipe(ItemList.Casing_Coil_HSSG.get(1L),new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot,Materials.HSSG,8),GT_OreDictUnificator.get(OrePrefixes.ingot,Materials.TungstenSteel,1),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Ash,6)},null,300,360); - GT_Values.RA.addArcFurnaceRecipe(ItemList.Casing_Coil_HSSS.get(1L),new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot,Materials.HSSS,8),GT_OreDictUnificator.get(OrePrefixes.ingot,Materials.HSSG,1),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Ash,7)},null,300,360); - GT_Values.RA.addArcFurnaceRecipe(ItemList.Casing_Coil_Naquadah.get(1L),new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot,Materials.Naquadah,8),GT_OreDictUnificator.get(OrePrefixes.ingot,Materials.HSSS,1),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Ash,8)},null,300,360); - GT_Values.RA.addArcFurnaceRecipe(ItemList.Casing_Coil_NaquadahAlloy.get(1L),new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot,Materials.NaquadahAlloy,8),GT_OreDictUnificator.get(OrePrefixes.ingot,Materials.Naquadah,1),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Ash,9)},null,300,360); - GT_Values.RA.addArcFurnaceRecipe(ItemList.Casing_Coil_Trinium.get(1L),new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot,Materials.Trinium,8),GT_OreDictUnificator.get(OrePrefixes.ingot,Materials.NaquadahAlloy,1),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Ash,10)},null,300,360); - GT_Values.RA.addArcFurnaceRecipe(ItemList.Casing_Coil_ElectrumFlux.get(1L),new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot,Materials.ElectrumFlux,8),GT_OreDictUnificator.get(OrePrefixes.ingot,Materials.Trinium,1),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Ash,11)},null,300,360); - GT_Values.RA.addArcFurnaceRecipe(ItemList.Casing_Coil_AwakenedDraconium.get(1L),new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot,Materials.DraconiumAwakened,8),GT_OreDictUnificator.get(OrePrefixes.ingot,Materials.ElectrumFlux,1),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Ash,12)},null,300,360); - - GT_Values.RA.addPulveriserRecipe(ItemList.Casing_Coil_Cupronickel.get(1L),new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Cupronickel,8),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Tin,1),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.QuartzSand,2)},null,1500,80); - GT_Values.RA.addPulveriserRecipe(ItemList.Casing_Coil_Kanthal.get(1L),new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Kanthal,8),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Cupronickel,1),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.QuartzSand,3)},null,1500,80); - GT_Values.RA.addPulveriserRecipe(ItemList.Casing_Coil_Nichrome.get(1L),new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Nichrome,8),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Kanthal,1),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.QuartzSand,4)},null,1500,80); - GT_Values.RA.addPulveriserRecipe(ItemList.Casing_Coil_TungstenSteel.get(1L),new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust,Materials.TungstenSteel,8),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Nichrome,1),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.QuartzSand,5)},null,1500,80); - GT_Values.RA.addPulveriserRecipe(ItemList.Casing_Coil_HSSG.get(1L),new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust,Materials.HSSG,8),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.TungstenSteel,1),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.QuartzSand,6)},null,1500,80); - GT_Values.RA.addPulveriserRecipe(ItemList.Casing_Coil_HSSS.get(1L),new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust,Materials.HSSS,8),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.HSSG,1),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.QuartzSand,7)},null,1500,80); - GT_Values.RA.addPulveriserRecipe(ItemList.Casing_Coil_Naquadah.get(1L),new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Naquadah,8),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.HSSS,1),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.QuartzSand,8)},null,1500,80); - GT_Values.RA.addPulveriserRecipe(ItemList.Casing_Coil_NaquadahAlloy.get(1L),new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust,Materials.NaquadahAlloy,8),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Naquadah,1),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.QuartzSand,9)},null,1500,80); - GT_Values.RA.addPulveriserRecipe(ItemList.Casing_Coil_Trinium.get(1L),new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Trinium,8),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.NaquadahAlloy,1),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.QuartzSand,10)},null,1500,80); - GT_Values.RA.addPulveriserRecipe(ItemList.Casing_Coil_ElectrumFlux.get(1L),new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust,Materials.ElectrumFlux,8),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Trinium,1),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.QuartzSand,11)},null,1500,80); - GT_Values.RA.addPulveriserRecipe(ItemList.Casing_Coil_AwakenedDraconium.get(1L),new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust,Materials.DraconiumAwakened,8),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.ElectrumFlux,1),GT_OreDictUnificator.get(OrePrefixes.dust,Materials.QuartzSand,12)},null,1500,80); - - //food ->CH4 - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Items.golden_apple, 1, 1), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(4608L), new ItemStack(Items.gold_ingot, 64), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 9216, 5); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Items.golden_apple, 1, 0), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), new ItemStack(Items.gold_ingot, 7), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 9216, 5); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Items.golden_carrot, 1, 0), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), new ItemStack(Items.gold_nugget, 6), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 9216, 5); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Items.speckled_melon, 1, 0), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), new ItemStack(Items.gold_nugget, 6), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 9216, 5); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Items.mushroom_stew, 16, 0), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), new ItemStack(Items.bowl, 16, 0), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Items.apple, 32, 0), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Items.bread, 64, 0), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Items.porkchop, 12, 0), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Items.cooked_porkchop, 16, 0), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Items.beef, 12, 0), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Items.cooked_beef, 16, 0), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Items.fish, 12, 32767), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Items.cooked_fished, 16, 32767), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Items.chicken, 12, 0), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Items.cooked_chicken, 16, 0), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Items.melon, 64, 0), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Blocks.pumpkin, 16, 0), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Items.rotten_flesh, 16, 0), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Items.spider_eye, 32, 0), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Items.carrot, 16, 0), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(ItemList.Food_Raw_Potato.get(16L), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(ItemList.Food_Poisonous_Potato.get(12L), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(ItemList.Food_Baked_Potato.get(24L), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Items.cookie, 64, 0), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Items.cake, 8, 0), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Blocks.brown_mushroom_block, 12, 32767), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Blocks.red_mushroom_block, 12, 32767), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Blocks.brown_mushroom, 32, 32767), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Blocks.red_mushroom, 32, 32767), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Items.nether_wart, 32, 32767), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(GT_ModHandler.getIC2Item("terraWart", 16L), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(GT_ModHandler.getModItem("TwilightForest", "item.meefRaw", 12L, 32767), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(GT_ModHandler.getModItem("TwilightForest", "item.meefSteak", 16L, 32767), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(GT_ModHandler.getModItem("TwilightForest", "item.venisonRaw", 12L, 32767), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - GT_Values.RA.addCentrifugeRecipe(GT_ModHandler.getModItem("TwilightForest", "item.venisonCooked", 16L, 32767), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Methane.getGas(576L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 4608, 5); - - GT_Values.RA.addCentrifugeRecipe(GT_OreDictUnificator.get(OrePrefixes.log, Materials.Wood, 1L), GT_Utility.getIntegratedCircuit(1), null, Materials.Methane.getGas(60L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 200, 20); - - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Blocks.sand, 1, 1), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Diamond, 1L), new ItemStack(Blocks.sand, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{5000, 100, 5000}, 600, 120); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Blocks.dirt, 1, 32767), GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.IC2_Plantball.get(1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Clay, 1L), new ItemStack(Blocks.sand, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{1250, 5000, 5000}, 250, 30); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Blocks.grass, 1, 32767), GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.IC2_Plantball.get(1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Clay, 1L), new ItemStack(Blocks.sand, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{2500, 5000, 5000}, 250, 30); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Blocks.mycelium, 1, 32767), GT_Values.NI, GT_Values.NF, GT_Values.NF, new ItemStack(Blocks.brown_mushroom, 1), new ItemStack(Blocks.red_mushroom, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Clay, 1L), new ItemStack(Blocks.sand, 1), GT_Values.NI, GT_Values.NI, new int[]{2500, 2500, 5000, 5000}, 650, 30); - GT_Values.RA.addCentrifugeRecipe(ItemList.IC2_Resin.get(1L), GT_Values.NI, GT_Values.NF, Materials.Glue.getFluid(100L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RawRubber, 3L), ItemList.IC2_Plantball.get(1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{10000, 1000}, 300, 5); - GT_Values.RA.addCentrifugeRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 1), 0, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 1L), ItemList.TE_Slag.get(1L, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1L)), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, 250); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Items.magma_cream, 1), 0, new ItemStack(Items.blaze_powder, 1), new ItemStack(Items.slime_ball, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, 500); - GT_Values.RA.addCentrifugeRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Uranium, 1L), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Uranium235, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Plutonium, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{2000, 200}, 800, 320); - GT_Values.RA.addCentrifugeRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plutonium, 1L), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Plutonium241, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Uranium, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{2000, 3000}, 1600, 320); - GT_Values.RA.addCentrifugeRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 9L), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NaquadahEnriched, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadria, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{5000, 1000}, 28800, 320); - GT_Values.RA.addCentrifugeRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NaquadahEnriched, 4L), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadria, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{2000, 3000}, 25600, 640); - GT_Values.RA.addCentrifugeRecipe(GT_Values.NI, GT_Values.NI, Materials.Hydrogen.getGas(160L), Materials.Deuterium.getGas(40L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 160, 20); - GT_Values.RA.addCentrifugeRecipe(GT_Values.NI, GT_Values.NI, Materials.Deuterium.getGas(160L), Materials.Tritium.getGas(40L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 160, 80); - GT_Values.RA.addCentrifugeRecipe(GT_Values.NI, GT_Values.NI, Materials.Helium.getGas(80L), Materials.Helium_3.getGas(5L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 160, 80); - GT_Values.RA.addCentrifugeRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 2L), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 976, 80); - - GT_Values.RA.addCentrifugeRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Endstone, 36L), GT_Values.NI, GT_Values.NF, Materials.Helium.getGas(4320L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tungstate, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Platinum, 1L), new ItemStack(Blocks.sand, 36), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{3750, 2500, 9000, 0, 0, 0}, 11520, 20); - GT_Values.RA.addCentrifugeRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Netherrack, 36L), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 9L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 1L), GT_Values.NI, GT_Values.NI, new int[]{5625, 9900, 5625, 2500, 0, 0}, 5760, 20); - - GT_Values.RA.addCentrifugeRecipe(GT_Utility.getIntegratedCircuit(10),GT_Values.NI,Materials.Lava.getFluid(400L),GT_Values.NF,Materials.SiliconDioxide.getDust(1),Materials.Magnesia.getDust(1),Materials.Quicklime.getDust(1),Materials.Gold.getNuggets(4),Materials.Sapphire.getDust(1),Materials.Tantalite.getDust(1),new int[]{5000,1000,1000,250,1250,500},320,80); - GT_Values.RA.addCentrifugeRecipe(new ItemStack(Blocks.soul_sand, 1), GT_Values.NI, GT_Values.NF, Materials.Oil.getFluid(200L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L), new ItemStack(Blocks.sand, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{1000, 700, 9000, 0, 0, 0}, 200, 12); - - GT_Values.RA.addCentrifugeRecipe(GT_Utility.getIntegratedCircuit(10), GT_Values.NI, FluidRegistry.getFluidStack("ic2pahoehoelava", 100), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Copper, 1L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Tin, 1L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Silver, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Phosphorus, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Scheelite, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Bauxite, 1L), new int[]{2000, 1000, 250, 50, 250, 500}, 40, 1024); - GT_Values.RA.addCentrifugeRecipe(GT_Utility.getIntegratedCircuit(20), GT_Values.NI, FluidRegistry.getFluidStack("ic2pahoehoelava", 3600), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Copper, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Silver, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphorus, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Scheelite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bauxite, 9L), new int[]{2000, 4000, 1000, 200, 2250, 4500}, 328, 4096); - - //rare earth ( why this still remain - GT_Values.RA.addCentrifugeRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RareEarth, 1L), GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Neodymium, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Yttrium, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Lanthanum, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Cerium, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Cadmium, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Caesium, 1L), new int[]{2500, 2500, 2500, 2500, 2500, 2500}, 64, 20); - - GT_Values.RA.addCentrifugeRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 45), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.BasalticMineralSand, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Olivine, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Obsidian, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Basalt, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Flint, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.RareEarth, 1L), new int[]{2000, 2000, 2000, 2000, 2000, 2000}, 64, 20); - GT_Values.RA.addCentrifugeRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 36L, 45), GT_Utility.getIntegratedCircuit(2), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BasalticMineralSand, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Olivine, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Obsidian, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Basalt, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Flint, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RareEarth, 2L), new int[]{9000, 9000, 9000, 9000, 9000, 9000}, 518, 80); - - //Ash centrifuge recipes - GT_Values.RA.addCentrifugeRecipe(Materials.Ash.getDust(36), GT_Values.NI, GT_Values.NF, GT_Values.NF, - Materials.Quicklime.getDust(18), Materials.Potash.getDust(9), Materials.Magnesia.getDust(9), - Materials.PhosphorousPentoxide.getDust(4), Materials.SodaAsh.getDust(4), Materials.BandedIron.getDust(4), new int[] - {6400, 6000, 500, 5000, 2500, 10000}, 6000, 30); - //Stone Dust and Metal Mixture centrifuge recipes - GT_Values.RA.addCentrifugeRecipe(Materials.Stone.getDust(36), GT_Values.NI, GT_Values.NF, GT_Values.NF, - Materials.Quartzite.getDust(9), Materials.PotassiumFeldspar.getDust(9), Materials.Marble.getDust(8), - Materials.Biotite.getDust(4), Materials.MetalMixture.getDust(4), Materials.Sodalite.getDust(4), - new int[]{10000, 10000, 10000, 10000, 7500, 5000}, 8640, 30); - GT_Values.RA.addCentrifugeRecipe(Materials.MetalMixture.getDust(36), GT_Values.NI, GT_Values.NF, GT_Values.NF, - Materials.BandedIron.getDust(9), Materials.Bauxite.getDust(9), Materials.Pyrolusite.getDust(8), - Materials.Barite.getDust(4), Materials.Chromite.getDust(4), Materials.Ilmenite.getDust(4), - new int[]{10000, 10000, 10000, 10000, 7500, 5000}, 13125, 1920); + GT_Values.RA.addArcFurnaceRecipe( + ItemList.Casing_Coil_Cupronickel.get(1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Cupronickel, 8), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 2) + }, + null, + 300, + 360); + GT_Values.RA.addArcFurnaceRecipe( + ItemList.Casing_Coil_Kanthal.get(1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Kanthal, 8), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Cupronickel, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 3) + }, + null, + 300, + 360); + GT_Values.RA.addArcFurnaceRecipe( + ItemList.Casing_Coil_Nichrome.get(1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Nichrome, 8), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Kanthal, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 4) + }, + null, + 300, + 360); + GT_Values.RA.addArcFurnaceRecipe( + ItemList.Casing_Coil_TungstenSteel.get(1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.TungstenSteel, 8), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Nichrome, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 5) + }, + null, + 300, + 360); + GT_Values.RA.addArcFurnaceRecipe( + ItemList.Casing_Coil_HSSG.get(1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.HSSG, 8), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.TungstenSteel, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 6) + }, + null, + 300, + 360); + GT_Values.RA.addArcFurnaceRecipe( + ItemList.Casing_Coil_HSSS.get(1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.HSSS, 8), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.HSSG, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 7) + }, + null, + 300, + 360); + GT_Values.RA.addArcFurnaceRecipe( + ItemList.Casing_Coil_Naquadah.get(1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Naquadah, 8), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.HSSS, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 8) + }, + null, + 300, + 360); + GT_Values.RA.addArcFurnaceRecipe( + ItemList.Casing_Coil_NaquadahAlloy.get(1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.NaquadahAlloy, 8), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Naquadah, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 9) + }, + null, + 300, + 360); + GT_Values.RA.addArcFurnaceRecipe( + ItemList.Casing_Coil_Trinium.get(1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Trinium, 8), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.NaquadahAlloy, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 10) + }, + null, + 300, + 360); + GT_Values.RA.addArcFurnaceRecipe( + ItemList.Casing_Coil_ElectrumFlux.get(1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.ElectrumFlux, 8), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Trinium, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 11) + }, + null, + 300, + 360); + GT_Values.RA.addArcFurnaceRecipe( + ItemList.Casing_Coil_AwakenedDraconium.get(1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.DraconiumAwakened, 8), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.ElectrumFlux, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 12) + }, + null, + 300, + 360); + + GT_Values.RA.addPulveriserRecipe( + ItemList.Casing_Coil_Cupronickel.get(1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cupronickel, 8), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tin, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.QuartzSand, 2) + }, + null, + 1500, + 80); + GT_Values.RA.addPulveriserRecipe( + ItemList.Casing_Coil_Kanthal.get(1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Kanthal, 8), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cupronickel, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.QuartzSand, 3) + }, + null, + 1500, + 80); + GT_Values.RA.addPulveriserRecipe( + ItemList.Casing_Coil_Nichrome.get(1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nichrome, 8), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Kanthal, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.QuartzSand, 4) + }, + null, + 1500, + 80); + GT_Values.RA.addPulveriserRecipe( + ItemList.Casing_Coil_TungstenSteel.get(1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 8), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nichrome, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.QuartzSand, 5) + }, + null, + 1500, + 80); + GT_Values.RA.addPulveriserRecipe( + ItemList.Casing_Coil_HSSG.get(1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSG, 8), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.QuartzSand, 6) + }, + null, + 1500, + 80); + GT_Values.RA.addPulveriserRecipe( + ItemList.Casing_Coil_HSSS.get(1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSS, 8), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSG, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.QuartzSand, 7) + }, + null, + 1500, + 80); + GT_Values.RA.addPulveriserRecipe( + ItemList.Casing_Coil_Naquadah.get(1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 8), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HSSS, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.QuartzSand, 8) + }, + null, + 1500, + 80); + GT_Values.RA.addPulveriserRecipe( + ItemList.Casing_Coil_NaquadahAlloy.get(1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NaquadahAlloy, 8), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.QuartzSand, 9) + }, + null, + 1500, + 80); + GT_Values.RA.addPulveriserRecipe( + ItemList.Casing_Coil_Trinium.get(1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Trinium, 8), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NaquadahAlloy, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.QuartzSand, 10) + }, + null, + 1500, + 80); + GT_Values.RA.addPulveriserRecipe( + ItemList.Casing_Coil_ElectrumFlux.get(1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.ElectrumFlux, 8), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Trinium, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.QuartzSand, 11) + }, + null, + 1500, + 80); + GT_Values.RA.addPulveriserRecipe( + ItemList.Casing_Coil_AwakenedDraconium.get(1L), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DraconiumAwakened, 8), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.ElectrumFlux, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.QuartzSand, 12) + }, + null, + 1500, + 80); + + // food ->CH4 + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Items.golden_apple, 1, 1), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(4608L), + new ItemStack(Items.gold_ingot, 64), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 9216, + 5); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Items.golden_apple, 1, 0), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + new ItemStack(Items.gold_ingot, 7), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 9216, + 5); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Items.golden_carrot, 1, 0), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + new ItemStack(Items.gold_nugget, 6), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 9216, + 5); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Items.speckled_melon, 1, 0), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + new ItemStack(Items.gold_nugget, 6), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 9216, + 5); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Items.mushroom_stew, 16, 0), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + new ItemStack(Items.bowl, 16, 0), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Items.apple, 32, 0), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Items.bread, 64, 0), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Items.porkchop, 12, 0), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Items.cooked_porkchop, 16, 0), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Items.beef, 12, 0), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Items.cooked_beef, 16, 0), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Items.fish, 12, 32767), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Items.cooked_fished, 16, 32767), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Items.chicken, 12, 0), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Items.cooked_chicken, 16, 0), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Items.melon, 64, 0), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Blocks.pumpkin, 16, 0), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Items.rotten_flesh, 16, 0), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Items.spider_eye, 32, 0), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Items.carrot, 16, 0), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + ItemList.Food_Raw_Potato.get(16L), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + ItemList.Food_Poisonous_Potato.get(12L), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + ItemList.Food_Baked_Potato.get(24L), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Items.cookie, 64, 0), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Items.cake, 8, 0), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Blocks.brown_mushroom_block, 12, 32767), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Blocks.red_mushroom_block, 12, 32767), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Blocks.brown_mushroom, 32, 32767), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Blocks.red_mushroom, 32, 32767), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Items.nether_wart, 32, 32767), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + GT_ModHandler.getIC2Item("terraWart", 16L), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + GT_ModHandler.getModItem("TwilightForest", "item.meefRaw", 12L, 32767), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + GT_ModHandler.getModItem("TwilightForest", "item.meefSteak", 16L, 32767), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + GT_ModHandler.getModItem("TwilightForest", "item.venisonRaw", 12L, 32767), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); + GT_Values.RA.addCentrifugeRecipe( + GT_ModHandler.getModItem("TwilightForest", "item.venisonCooked", 16L, 32767), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Methane.getGas(576L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 4608, + 5); - this.run3(); + GT_Values.RA.addCentrifugeRecipe( + GT_OreDictUnificator.get(OrePrefixes.log, Materials.Wood, 1L), + GT_Utility.getIntegratedCircuit(1), + null, + Materials.Methane.getGas(60L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 200, + 20); - GT_Utility.removeSimpleIC2MachineRecipe(new ItemStack(Blocks.cobblestone), GT_ModHandler.getMaceratorRecipeList(), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L)); - GT_Utility.removeSimpleIC2MachineRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Lapis, 1L), GT_ModHandler.getMaceratorRecipeList(), ItemList.IC2_Plantball.get(1L)); - GT_Utility.removeSimpleIC2MachineRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), GT_ModHandler.getMaceratorRecipeList(), ItemList.IC2_Plantball.get(1L)); - GT_Utility.removeSimpleIC2MachineRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), GT_ModHandler.getMaceratorRecipeList(), ItemList.IC2_Plantball.get(1L)); - GT_Utility.removeSimpleIC2MachineRecipe(GT_Values.NI, GT_ModHandler.getMaceratorRecipeList(), GT_ModHandler.getModItem("IC2", "itemBiochaff", 1L)); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Blocks.sand, 1, 1), + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Diamond, 1L), + new ItemStack(Blocks.sand, 1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + new int[] {5000, 100, 5000}, + 600, + 120); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Blocks.dirt, 1, 32767), + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + ItemList.IC2_Plantball.get(1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Clay, 1L), + new ItemStack(Blocks.sand, 1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + new int[] {1250, 5000, 5000}, + 250, + 30); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Blocks.grass, 1, 32767), + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + ItemList.IC2_Plantball.get(1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Clay, 1L), + new ItemStack(Blocks.sand, 1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + new int[] {2500, 5000, 5000}, + 250, + 30); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Blocks.mycelium, 1, 32767), + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + new ItemStack(Blocks.brown_mushroom, 1), + new ItemStack(Blocks.red_mushroom, 1), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Clay, 1L), + new ItemStack(Blocks.sand, 1), + GT_Values.NI, + GT_Values.NI, + new int[] {2500, 2500, 5000, 5000}, + 650, + 30); + GT_Values.RA.addCentrifugeRecipe( + ItemList.IC2_Resin.get(1L), + GT_Values.NI, + GT_Values.NF, + Materials.Glue.getFluid(100L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RawRubber, 3L), + ItemList.IC2_Plantball.get(1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + new int[] {10000, 1000}, + 300, + 5); + GT_Values.RA.addCentrifugeRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 1), + 0, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 1L), + ItemList.TE_Slag.get(1L, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1L)), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + 250); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Items.magma_cream, 1), + 0, + new ItemStack(Items.blaze_powder, 1), + new ItemStack(Items.slime_ball, 1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + 500); + GT_Values.RA.addCentrifugeRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Uranium, 1L), + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Uranium235, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Plutonium, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + new int[] {2000, 200}, + 800, + 320); + GT_Values.RA.addCentrifugeRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plutonium, 1L), + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Plutonium241, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Uranium, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + new int[] {2000, 3000}, + 1600, + 320); + GT_Values.RA.addCentrifugeRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 9L), + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NaquadahEnriched, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadria, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + new int[] {5000, 1000}, + 28800, + 320); + GT_Values.RA.addCentrifugeRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NaquadahEnriched, 4L), + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadria, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + new int[] {2000, 3000}, + 25600, + 640); + GT_Values.RA.addCentrifugeRecipe( + GT_Values.NI, + GT_Values.NI, + Materials.Hydrogen.getGas(160L), + Materials.Deuterium.getGas(40L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 160, + 20); + GT_Values.RA.addCentrifugeRecipe( + GT_Values.NI, + GT_Values.NI, + Materials.Deuterium.getGas(160L), + Materials.Tritium.getGas(40L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 160, + 80); + GT_Values.RA.addCentrifugeRecipe( + GT_Values.NI, + GT_Values.NI, + Materials.Helium.getGas(80L), + Materials.Helium_3.getGas(5L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 160, + 80); + GT_Values.RA.addCentrifugeRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 2L), + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 976, + 80); - GT_Utility.removeSimpleIC2MachineRecipe(new ItemStack(Blocks.cactus, 8, 0), GT_ModHandler.getCompressorRecipeList(), GT_ModHandler.getModItem("IC2", "itemFuelPlantBall", 1L)); - GT_Utility.removeSimpleIC2MachineRecipe(GT_ModHandler.getModItem("ExtraTrees", "food", 8L, 24), GT_ModHandler.getCompressorRecipeList(), GT_ModHandler.getModItem("IC2", "itemFuelPlantBall", 1L)); + GT_Values.RA.addCentrifugeRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Endstone, 36L), + GT_Values.NI, + GT_Values.NF, + Materials.Helium.getGas(4320L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tungstate, 3L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Platinum, 1L), + new ItemStack(Blocks.sand, 36), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + new int[] {3750, 2500, 9000, 0, 0, 0}, + 11520, + 20); + GT_Values.RA.addCentrifugeRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Netherrack, 36L), + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 9L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gold, 1L), + GT_Values.NI, + GT_Values.NI, + new int[] {5625, 9900, 5625, 2500, 0, 0}, + 5760, + 20); + + GT_Values.RA.addCentrifugeRecipe( + GT_Utility.getIntegratedCircuit(10), + GT_Values.NI, + Materials.Lava.getFluid(400L), + GT_Values.NF, + Materials.SiliconDioxide.getDust(1), + Materials.Magnesia.getDust(1), + Materials.Quicklime.getDust(1), + Materials.Gold.getNuggets(4), + Materials.Sapphire.getDust(1), + Materials.Tantalite.getDust(1), + new int[] {5000, 1000, 1000, 250, 1250, 500}, + 320, + 80); + GT_Values.RA.addCentrifugeRecipe( + new ItemStack(Blocks.soul_sand, 1), + GT_Values.NI, + GT_Values.NF, + Materials.Oil.getFluid(200L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L), + new ItemStack(Blocks.sand, 1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + new int[] {1000, 700, 9000, 0, 0, 0}, + 200, + 12); + + GT_Values.RA.addCentrifugeRecipe( + GT_Utility.getIntegratedCircuit(10), + GT_Values.NI, + FluidRegistry.getFluidStack("ic2pahoehoelava", 100), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Copper, 1L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Tin, 1L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Silver, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Phosphorus, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Scheelite, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Bauxite, 1L), + new int[] {2000, 1000, 250, 50, 250, 500}, + 40, + 1024); + GT_Values.RA.addCentrifugeRecipe( + GT_Utility.getIntegratedCircuit(20), + GT_Values.NI, + FluidRegistry.getFluidStack("ic2pahoehoelava", 3600), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Copper, 1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L), + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Silver, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphorus, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Scheelite, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bauxite, 9L), + new int[] {2000, 4000, 1000, 200, 2250, 4500}, + 328, + 4096); + + // rare earth ( why this still remain + GT_Values.RA.addCentrifugeRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RareEarth, 1L), + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Neodymium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Yttrium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Lanthanum, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Cerium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Cadmium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Caesium, 1L), + new int[] {2500, 2500, 2500, 2500, 2500, 2500}, + 64, + 20); + + GT_Values.RA.addCentrifugeRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 45), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.BasalticMineralSand, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Olivine, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Obsidian, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Basalt, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Flint, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.RareEarth, 1L), + new int[] {2000, 2000, 2000, 2000, 2000, 2000}, + 64, + 20); + GT_Values.RA.addCentrifugeRecipe( + GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 36L, 45), + GT_Utility.getIntegratedCircuit(2), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BasalticMineralSand, 2L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Olivine, 2L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Obsidian, 2L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Basalt, 2L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Flint, 2L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RareEarth, 2L), + new int[] {9000, 9000, 9000, 9000, 9000, 9000}, + 518, + 80); + + // Ash centrifuge recipes + GT_Values.RA.addCentrifugeRecipe( + Materials.Ash.getDust(36), + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + Materials.Quicklime.getDust(18), + Materials.Potash.getDust(9), + Materials.Magnesia.getDust(9), + Materials.PhosphorousPentoxide.getDust(4), + Materials.SodaAsh.getDust(4), + Materials.BandedIron.getDust(4), + new int[] {6400, 6000, 500, 5000, 2500, 10000}, + 6000, + 30); + // Stone Dust and Metal Mixture centrifuge recipes + GT_Values.RA.addCentrifugeRecipe( + Materials.Stone.getDust(36), + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + Materials.Quartzite.getDust(9), + Materials.PotassiumFeldspar.getDust(9), + Materials.Marble.getDust(8), + Materials.Biotite.getDust(4), + Materials.MetalMixture.getDust(4), + Materials.Sodalite.getDust(4), + new int[] {10000, 10000, 10000, 10000, 7500, 5000}, + 8640, + 30); + GT_Values.RA.addCentrifugeRecipe( + Materials.MetalMixture.getDust(36), + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + Materials.BandedIron.getDust(9), + Materials.Bauxite.getDust(9), + Materials.Pyrolusite.getDust(8), + Materials.Barite.getDust(4), + Materials.Chromite.getDust(4), + Materials.Ilmenite.getDust(4), + new int[] {10000, 10000, 10000, 10000, 7500, 5000}, + 13125, + 1920); + + this.run3(); + + GT_Utility.removeSimpleIC2MachineRecipe( + new ItemStack(Blocks.cobblestone), + GT_ModHandler.getMaceratorRecipeList(), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L)); + GT_Utility.removeSimpleIC2MachineRecipe( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Lapis, 1L), + GT_ModHandler.getMaceratorRecipeList(), + ItemList.IC2_Plantball.get(1L)); + GT_Utility.removeSimpleIC2MachineRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), + GT_ModHandler.getMaceratorRecipeList(), + ItemList.IC2_Plantball.get(1L)); + GT_Utility.removeSimpleIC2MachineRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), + GT_ModHandler.getMaceratorRecipeList(), + ItemList.IC2_Plantball.get(1L)); + GT_Utility.removeSimpleIC2MachineRecipe( + GT_Values.NI, + GT_ModHandler.getMaceratorRecipeList(), + GT_ModHandler.getModItem("IC2", "itemBiochaff", 1L)); + + GT_Utility.removeSimpleIC2MachineRecipe( + new ItemStack(Blocks.cactus, 8, 0), + GT_ModHandler.getCompressorRecipeList(), + GT_ModHandler.getModItem("IC2", "itemFuelPlantBall", 1L)); + GT_Utility.removeSimpleIC2MachineRecipe( + GT_ModHandler.getModItem("ExtraTrees", "food", 8L, 24), + GT_ModHandler.getCompressorRecipeList(), + GT_ModHandler.getModItem("IC2", "itemFuelPlantBall", 1L)); for (MaterialStack[] tMats : mAlloySmelterList) { ItemStack tDust1 = GT_OreDictUnificator.get(OrePrefixes.dust, tMats[0].mMaterial, tMats[0].mAmount); @@ -2060,41 +10877,56 @@ public class GT_MachineRecipeLoader implements Runnable { ItemStack tIngot2 = GT_OreDictUnificator.get(OrePrefixes.ingot, tMats[1].mMaterial, tMats[1].mAmount); ItemStack tOutputIngot = GT_OreDictUnificator.get(OrePrefixes.ingot, tMats[2].mMaterial, tMats[2].mAmount); if (tOutputIngot != GT_Values.NI) { - GT_ModHandler.addAlloySmelterRecipe(tIngot1, tDust2, tOutputIngot, (int) tMats[2].mAmount * 50, 16, false); - GT_ModHandler.addAlloySmelterRecipe(tIngot1, tIngot2, tOutputIngot, (int) tMats[2].mAmount * 50, 16, false); - GT_ModHandler.addAlloySmelterRecipe(tDust1, tIngot2, tOutputIngot, (int) tMats[2].mAmount * 50, 16, false); - GT_ModHandler.addAlloySmelterRecipe(tDust1, tDust2, tOutputIngot, (int) tMats[2].mAmount * 50, 16, false); + GT_ModHandler.addAlloySmelterRecipe( + tIngot1, tDust2, tOutputIngot, (int) tMats[2].mAmount * 50, 16, false); + GT_ModHandler.addAlloySmelterRecipe( + tIngot1, tIngot2, tOutputIngot, (int) tMats[2].mAmount * 50, 16, false); + GT_ModHandler.addAlloySmelterRecipe( + tDust1, tIngot2, tOutputIngot, (int) tMats[2].mAmount * 50, 16, false); + GT_ModHandler.addAlloySmelterRecipe( + tDust1, tDust2, tOutputIngot, (int) tMats[2].mAmount * 50, 16, false); } } - if(!GregTech_API.mIC2Classic){ + if (!GregTech_API.mIC2Classic) { try { - Map<String, ILiquidHeatExchangerManager.HeatExchangeProperty> tLiqExchange = ic2.api.recipe.Recipes.liquidCooldownManager.getHeatExchangeProperties(); - Iterator<Map.Entry<String, ILiquidHeatExchangerManager.HeatExchangeProperty>> tIterator = tLiqExchange.entrySet().iterator(); + Map<String, ILiquidHeatExchangerManager.HeatExchangeProperty> tLiqExchange = + ic2.api.recipe.Recipes.liquidCooldownManager.getHeatExchangeProperties(); + Iterator<Map.Entry<String, ILiquidHeatExchangerManager.HeatExchangeProperty>> tIterator = + tLiqExchange.entrySet().iterator(); while (tIterator.hasNext()) { Map.Entry<String, ILiquidHeatExchangerManager.HeatExchangeProperty> tEntry = tIterator.next(); - if(tEntry.getKey().equals("ic2hotcoolant")){ + if (tEntry.getKey().equals("ic2hotcoolant")) { tIterator.remove(); Recipes.liquidCooldownManager.addFluid("ic2hotcoolant", "ic2coolant", 100); } } - } catch (Throwable e) {/*Do nothing*/} + } catch (Throwable e) { + /*Do nothing*/ + } try { - Map<String, ILiquidHeatExchangerManager.HeatExchangeProperty> tLiqExchange = ic2.api.recipe.Recipes.liquidHeatupManager.getHeatExchangeProperties(); - Iterator<Map.Entry<String, ILiquidHeatExchangerManager.HeatExchangeProperty>> tIterator = tLiqExchange.entrySet().iterator(); + Map<String, ILiquidHeatExchangerManager.HeatExchangeProperty> tLiqExchange = + ic2.api.recipe.Recipes.liquidHeatupManager.getHeatExchangeProperties(); + Iterator<Map.Entry<String, ILiquidHeatExchangerManager.HeatExchangeProperty>> tIterator = + tLiqExchange.entrySet().iterator(); while (tIterator.hasNext()) { Map.Entry<String, ILiquidHeatExchangerManager.HeatExchangeProperty> tEntry = tIterator.next(); - if(tEntry.getKey().equals("ic2coolant")){ + if (tEntry.getKey().equals("ic2coolant")) { tIterator.remove(); Recipes.liquidHeatupManager.addFluid("ic2coolant", "ic2hotcoolant", 100); } } - } catch (Throwable e) {/*Do nothing*/} + } catch (Throwable e) { + /*Do nothing*/ + } } - GT_Utility.removeSimpleIC2MachineRecipe(ItemList.Crop_Drop_BobsYerUncleRanks.get(1L), GT_ModHandler.getExtractorRecipeList(), null); - GT_Utility.removeSimpleIC2MachineRecipe(ItemList.Crop_Drop_Ferru.get(1L), GT_ModHandler.getExtractorRecipeList(), null); - GT_Utility.removeSimpleIC2MachineRecipe(ItemList.Crop_Drop_Aurelia.get(1L), GT_ModHandler.getExtractorRecipeList(), null); + GT_Utility.removeSimpleIC2MachineRecipe( + ItemList.Crop_Drop_BobsYerUncleRanks.get(1L), GT_ModHandler.getExtractorRecipeList(), null); + GT_Utility.removeSimpleIC2MachineRecipe( + ItemList.Crop_Drop_Ferru.get(1L), GT_ModHandler.getExtractorRecipeList(), null); + GT_Utility.removeSimpleIC2MachineRecipe( + ItemList.Crop_Drop_Aurelia.get(1L), GT_ModHandler.getExtractorRecipeList(), null); ItemStack tCrop; // Metals Line @@ -2111,7 +10943,7 @@ public class GT_MachineRecipeLoader implements Runnable { this.addProcess(tCrop, Materials.CassiteriteSand, 100, true); tCrop = ItemList.Crop_Drop_Plumbilia.get(1); this.addProcess(tCrop, Materials.Lead, 100, true); - this.addProcess(tCrop, Materials.Galena, 100, false);// + this.addProcess(tCrop, Materials.Galena, 100, false); // tCrop = ItemList.Crop_Drop_Ferru.get(1); this.addProcess(tCrop, Materials.Iron, 100, true); this.addProcess(tCrop, Materials.Magnetite, 100, false); @@ -2139,72 +10971,116 @@ public class GT_MachineRecipeLoader implements Runnable { this.addProcess(tCrop, Materials.Gold, 100, true); this.addProcess(tCrop, Materials.Magnetite, Materials.Gold, 100, false); tCrop = ItemList.Crop_Drop_Mica.get(1); - this.addProcess(tCrop,Materials.Mica,75, true); + this.addProcess(tCrop, Materials.Mica, 75, true); // Rare Metals Line tCrop = ItemList.Crop_Drop_Bauxite.get(1); - this.addProcess(tCrop,Materials.Aluminium,60, true); - this.addProcess(tCrop,Materials.Bauxite,100, false); + this.addProcess(tCrop, Materials.Aluminium, 60, true); + this.addProcess(tCrop, Materials.Bauxite, 100, false); tCrop = ItemList.Crop_Drop_Manganese.get(1); - this.addProcess(tCrop,Materials.Manganese,30, true); - this.addProcess(tCrop,Materials.Grossular,100, false); - this.addProcess(tCrop,Materials.Spessartine,100, false); - this.addProcess(tCrop,Materials.Pyrolusite,100, false); - this.addProcess(tCrop,Materials.Tantalite,100, false); + this.addProcess(tCrop, Materials.Manganese, 30, true); + this.addProcess(tCrop, Materials.Grossular, 100, false); + this.addProcess(tCrop, Materials.Spessartine, 100, false); + this.addProcess(tCrop, Materials.Pyrolusite, 100, false); + this.addProcess(tCrop, Materials.Tantalite, 100, false); tCrop = ItemList.Crop_Drop_Ilmenite.get(1); - this.addProcess(tCrop,Materials.Titanium,100, true); - this.addProcess(tCrop,Materials.Ilmenite,100, false); - this.addProcess(tCrop,Materials.Bauxite,100, false); - this.addProcess(tCrop,Materials.Rutile,100, false); + this.addProcess(tCrop, Materials.Titanium, 100, true); + this.addProcess(tCrop, Materials.Ilmenite, 100, false); + this.addProcess(tCrop, Materials.Bauxite, 100, false); + this.addProcess(tCrop, Materials.Rutile, 100, false); tCrop = ItemList.Crop_Drop_Scheelite.get(1); - this.addProcess(tCrop,Materials.Scheelite,100, true); - this.addProcess(tCrop,Materials.Tungstate,100, false); - this.addProcess(tCrop,Materials.Lithium,100, false); - this.addProcess(tCrop,Materials.Tungsten,75, false); + this.addProcess(tCrop, Materials.Scheelite, 100, true); + this.addProcess(tCrop, Materials.Tungstate, 100, false); + this.addProcess(tCrop, Materials.Lithium, 100, false); + this.addProcess(tCrop, Materials.Tungsten, 75, false); tCrop = ItemList.Crop_Drop_Platinum.get(1); - this.addProcess(tCrop,Materials.Platinum,40, true); - this.addProcess(tCrop,Materials.Cooperite,40, false); - this.addProcess(tCrop,Materials.Palladium,40, false); + this.addProcess(tCrop, Materials.Platinum, 40, true); + this.addProcess(tCrop, Materials.Cooperite, 40, false); + this.addProcess(tCrop, Materials.Palladium, 40, false); this.addProcess(tCrop, Materials.Neodymium, 100, false); this.addProcess(tCrop, Materials.Bastnasite, 100, false); tCrop = ItemList.Crop_Drop_Iridium.get(1); - this.addProcess(tCrop,Materials.Iridium,20, true); + this.addProcess(tCrop, Materials.Iridium, 20, true); tCrop = ItemList.Crop_Drop_Osmium.get(1); - this.addProcess(tCrop,Materials.Osmium,20, true); + this.addProcess(tCrop, Materials.Osmium, 20, true); // Radioactive Line tCrop = ItemList.Crop_Drop_Pitchblende.get(1); - this.addProcess(tCrop,Materials.Pitchblende,50, true); + this.addProcess(tCrop, Materials.Pitchblende, 50, true); tCrop = ItemList.Crop_Drop_Uraninite.get(1); - this.addProcess(tCrop,Materials.Uraninite,50, false); - this.addProcess(tCrop,Materials.Uranium,50, true); - this.addProcess(tCrop,Materials.Pitchblende,50, false); - this.addProcess(tCrop,Materials.Uranium235,50, false); + this.addProcess(tCrop, Materials.Uraninite, 50, false); + this.addProcess(tCrop, Materials.Uranium, 50, true); + this.addProcess(tCrop, Materials.Pitchblende, 50, false); + this.addProcess(tCrop, Materials.Uranium235, 50, false); tCrop = ItemList.Crop_Drop_Thorium.get(1); - this.addProcess(tCrop,Materials.Thorium,50, true); + this.addProcess(tCrop, Materials.Thorium, 50, true); tCrop = ItemList.Crop_Drop_Naquadah.get(1); - this.addProcess(tCrop,Materials.Naquadah,10, true); - this.addProcess(tCrop,Materials.NaquadahEnriched,10, false); - this.addProcess(tCrop,Materials.Naquadria,10, false); + this.addProcess(tCrop, Materials.Naquadah, 10, true); + this.addProcess(tCrop, Materials.NaquadahEnriched, 10, false); + this.addProcess(tCrop, Materials.Naquadria, 10, false); - //Gem Line + // Gem Line tCrop = ItemList.Crop_Drop_BobsYerUncleRanks.get(1); this.addProcess(tCrop, Materials.Emerald, 100, true); this.addProcess(tCrop, Materials.Beryllium, 100, false); this.addRecipesApril2017ChemistryUpdate(); - //2Na + S = Na2S - GT_Values.RA.addChemicalRecipe(Materials.Sodium.getDust(2), Materials.Sulfur.getDust(1), Materials.SodiumSulfide.getDust(3), 60); - //H2S + H2O + (O2) = 0.5H2SO4(Diluted) ( S loss - GT_Values.RA.addChemicalRecipe(Materials.HydricSulfide.getCells(1), GT_Values.NI, Materials.Water.getFluid(1000), Materials.DilutedSulfuricAcid.getFluid(750), Materials.Empty.getCells(1), 60); - GT_Values.RA.addChemicalRecipe(Materials.Water.getCells(1), GT_Values.NI, Materials.HydricSulfide.getGas(1000), Materials.DilutedSulfuricAcid.getFluid(750), Materials.Empty.getCells(1), 60); - //SiO2 ->Quartzite - GT_Values.RA.addAutoclaveRecipe(Materials.SiliconDioxide.getDust(1), Materials.Water.getFluid(200L), Materials.Quartzite.getGems(1), 750, 2000, 24); - GT_Values.RA.addAutoclaveRecipe(Materials.SiliconDioxide.getDust(1), GT_ModHandler.getDistilledWater(100L), Materials.Quartzite.getGems(1), 1000, 1500, 24); - GT_Values.RA.addAutoclaveRecipe(Materials.SiliconDioxide.getDust(1), Materials.Void.getMolten(36L), Materials.Quartzite.getGems(1), 10000, 1000, 24); - - //NaOH = Na + O + H - GT_Values.RA.addElectrolyzerRecipe(Materials.SodiumHydroxide.getDust(3), Materials.Empty.getCells(1), GT_Values.NF, Materials.Oxygen.getGas(1000), Materials.Sodium.getDust(1), Materials.Hydrogen.getCells(1), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{10000, 10000}, 1000, 60); + // 2Na + S = Na2S + GT_Values.RA.addChemicalRecipe( + Materials.Sodium.getDust(2), Materials.Sulfur.getDust(1), Materials.SodiumSulfide.getDust(3), 60); + // H2S + H2O + (O2) = 0.5H2SO4(Diluted) ( S loss + GT_Values.RA.addChemicalRecipe( + Materials.HydricSulfide.getCells(1), + GT_Values.NI, + Materials.Water.getFluid(1000), + Materials.DilutedSulfuricAcid.getFluid(750), + Materials.Empty.getCells(1), + 60); + GT_Values.RA.addChemicalRecipe( + Materials.Water.getCells(1), + GT_Values.NI, + Materials.HydricSulfide.getGas(1000), + Materials.DilutedSulfuricAcid.getFluid(750), + Materials.Empty.getCells(1), + 60); + // SiO2 ->Quartzite + GT_Values.RA.addAutoclaveRecipe( + Materials.SiliconDioxide.getDust(1), + Materials.Water.getFluid(200L), + Materials.Quartzite.getGems(1), + 750, + 2000, + 24); + GT_Values.RA.addAutoclaveRecipe( + Materials.SiliconDioxide.getDust(1), + GT_ModHandler.getDistilledWater(100L), + Materials.Quartzite.getGems(1), + 1000, + 1500, + 24); + GT_Values.RA.addAutoclaveRecipe( + Materials.SiliconDioxide.getDust(1), + Materials.Void.getMolten(36L), + Materials.Quartzite.getGems(1), + 10000, + 1000, + 24); + + // NaOH = Na + O + H + GT_Values.RA.addElectrolyzerRecipe( + Materials.SodiumHydroxide.getDust(3), + Materials.Empty.getCells(1), + GT_Values.NF, + Materials.Oxygen.getGas(1000), + Materials.Sodium.getDust(1), + Materials.Hydrogen.getCells(1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + new int[] {10000, 10000}, + 1000, + 60); this.addRecipesMay2017OilRefining(); this.addPyrometallurgicalRecipes(); @@ -2215,1066 +11091,3082 @@ public class GT_MachineRecipeLoader implements Runnable { } private void addKevlarLineRecipes() { - //Kevlar Line - //C15H10N2O2(5HCl) = C15H10N2O2 + 5HCl - GT_Values.RA.addDistillationTowerRecipe(MaterialsKevlar.DiphenylmethaneDiisocyanateMixture.getFluid(1000L), new FluidStack[]{Materials.HydrochloricAcid.getFluid(5000L)}, GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.DiphenylmethaneDiisocyanate, 29L), 2500, 1920); + // Kevlar Line + // C15H10N2O2(5HCl) = C15H10N2O2 + 5HCl + GT_Values.RA.addDistillationTowerRecipe( + MaterialsKevlar.DiphenylmethaneDiisocyanateMixture.getFluid(1000L), + new FluidStack[] {Materials.HydrochloricAcid.getFluid(5000L)}, + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.DiphenylmethaneDiisocyanate, 29L), + 2500, + 1920); if (Loader.isModLoaded("gtnhlanth") && (Loader.isModLoaded("miscutils"))) { - //CH2O + 2C6H7N + HCl = C13H14N2(HCl) + H2O - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1)}, new FluidStack[]{new FluidStack(FluidRegistry.getFluid("formaldehyde"), 1000), new FluidStack(FluidRegistry.getFluid("aniline"), 2000), Materials.HydrochloricAcid.getFluid(1000)}, new FluidStack[]{MaterialsKevlar.DiaminodiphenylmethanMixture.getFluid(1000L)}, null, 1200, 1920); - //C6H5NO2 + 6H =Pd= C6H7N + 2H2O - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Palladium, 1L)}, new FluidStack[]{new FluidStack(FluidRegistry.getFluid("nitrobenzene"), 9000), Materials.Hydrogen.getGas(54000)}, new FluidStack[]{Materials.Water.getFluid(18000), new FluidStack(FluidRegistry.getFluid("aniline"), 9000)}, null, 900, 1920); - //C6H6 + HNO3 =H2SO4= C6H5NO2 + H2O - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NitrationMixture, 10), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Benzene, 5), Materials.Water.getFluid(10000), Materials.DilutedSulfuricAcid.getFluid(5000), GT_ModHandler.getModItem("miscutils", "nitrobenzene", 5L), ItemList.Cell_Empty.get(10L), 200, 1920); - //C13H14N2(HCl) + 2COCl2 = C15H10N2O2(5HCl) - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1)}, new FluidStack[]{MaterialsKevlar.DiaminodiphenylmethanMixture.getFluid(1000L), new FluidStack(FluidRegistry.getFluid("phosgene"), 2000)}, new FluidStack[]{MaterialsKevlar.DiphenylmethaneDiisocyanateMixture.getFluid(1000L)}, null, 600, 1920); - //C4H8O + 2H =Pd= C4H10O - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.Butyraldehyde, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Palladium, 1L), Materials.Hydrogen.getGas(2000), new FluidStack(FluidRegistry.getFluid("butanol"), 1000), ItemList.Cell_Empty.get(1L), 200, 30); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Palladium, 1L)}, new FluidStack[]{MaterialsKevlar.Butyraldehyde.getFluid(9000), Materials.Hydrogen.getGas(18000)}, new FluidStack[]{new FluidStack(FluidRegistry.getFluid("butanol"), 9000)}, null, 80, 480); - - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tin, 1L)}, new FluidStack[]{new FluidStack(FluidRegistry.getFluid("butanol"), 2000), new FluidStack(FluidRegistry.getFluid("propionicacid"), 1000), Materials.IronIIIChloride.getFluid(100)}, null, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.KevlarCatalyst, 1L)}, 600, 1920); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tin, 9L)}, new FluidStack[]{new FluidStack(FluidRegistry.getFluid("butanol"), 18000), new FluidStack(FluidRegistry.getFluid("propionicacid"), 9000), Materials.IronIIIChloride.getFluid(900)}, null, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.KevlarCatalyst, 9L)}, 4500, 1920); - //C2H4 + CO + H2O =C4NiO= C3H6O2 - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1)}, new FluidStack[]{Materials.Ethylene.getGas(1000), Materials.CarbonMonoxide.getGas(1000), MaterialsKevlar.NickelTetracarbonyl.getFluid(100), Materials.Water.getFluid(1000)}, new FluidStack[]{new FluidStack(FluidRegistry.getFluid("propionicacid"), 1000)}, null, 200, 1920); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9)}, new FluidStack[]{Materials.Ethylene.getGas(9000), Materials.CarbonMonoxide.getGas(9000), MaterialsKevlar.NickelTetracarbonyl.getFluid(900), Materials.Water.getFluid(9000)}, new FluidStack[]{new FluidStack(FluidRegistry.getFluid("propionicacid"), 9000)}, null, 1500, 1920); - //C6H7N + HNO3 =H2SO4,C4H6O3= C6H6N2O2 + H2O - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(2)}, new FluidStack[]{new FluidStack(FluidRegistry.getFluid("aniline"), 1000), new FluidStack(FluidRegistry.getFluid("molten.aceticanhydride"), 100), Materials.NitrationMixture.getFluid(2000)}, new FluidStack[]{MaterialsKevlar.IVNitroaniline.getFluid(1000L), Materials.DilutedSulfuricAcid.getFluid(1000)}, null, 300, 1920); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9)}, new FluidStack[]{new FluidStack(FluidRegistry.getFluid("aniline"), 9000), new FluidStack(FluidRegistry.getFluid("molten.aceticanhydride"), 900), Materials.NitrationMixture.getFluid(18000)}, new FluidStack[]{MaterialsKevlar.IVNitroaniline.getFluid(9000L), Materials.DilutedSulfuricAcid.getFluid(9000)}, null, 2000, 1920); - //C6H6N2O2 + 6H =Pd,NO2= C6H8N2 + 2H2O - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Palladium, 1L)}, new FluidStack[]{Materials.NitrogenDioxide.getGas(100), Materials.Hydrogen.getGas(6000), MaterialsKevlar.IVNitroaniline.getFluid(1000L)}, new FluidStack[]{Materials.Water.getFluid(2000L)}, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.ParaPhenylenediamine, 16L)}, 400, 500000); - //C4H10O2 =Cu= C4H6O2 + 4H - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 1L)}, new FluidStack[]{new FluidStack(FluidRegistry.getFluid("1,4-butanediol"), 1000)}, new FluidStack[]{MaterialsKevlar.GammaButyrolactone.getFluid(1000), Materials.Hydrogen.getGas(4000)}, null, 100, 1920); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 9L)}, new FluidStack[]{new FluidStack(FluidRegistry.getFluid("1,4-butanediol"), 9000)}, new FluidStack[]{MaterialsKevlar.GammaButyrolactone.getFluid(9000), Materials.Hydrogen.getGas(36000)}, null, 700, 1920); - //4CH2O + C2H4O =NaOH= C5H12O4 + CO - GT_Values.RA.addChemicalRecipe(GT_ModHandler.getModItem("miscutils", "Formaldehyde", 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SodiumHydroxide, 1L), MaterialsKevlar.Acetaldehyde.getGas(1000), Materials.CarbonMonoxide.getGas(1000), GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.Pentaerythritol, 21L), 600, 480); - //2CH2O + C2H2 =SiO2,CuO,Bi2O3= C4H6O2 - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CupricOxide, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.BismuthIIIOxide, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 1L)}, new FluidStack[]{MaterialsKevlar.Acetylene.getGas(1000L), new FluidStack(FluidRegistry.getFluid("formaldehyde"), 2000)}, null, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.IIButinIIVdiol, 12L)}, 400, 1920); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CupricOxide, 9L), GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.BismuthIIIOxide, 9L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 9L)}, new FluidStack[]{MaterialsKevlar.Acetylene.getGas(9000L), new FluidStack(FluidRegistry.getFluid("formaldehyde"), 18000)}, null, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.IIButinIIVdiol, 64L), GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.IIButinIIVdiol, 44L)}, 3000, 1920); - //C4H6O2 + 4H =NiAl= C4H10O2 - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1), GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.IIButinIIVdiol, 12L), GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.RaneyNickelActivated, 1L)}, new FluidStack[]{Materials.Hydrogen.getGas(4000L)}, new FluidStack[]{new FluidStack(FluidRegistry.getFluid("1,4-butanediol"), 1000)}, null, 300, 500000); - //4CH2O + C2H4O =NaOH= C5H12O4 + CO - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.Acetaldehyde, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SodiumHydroxide, 1L), new FluidStack(FluidRegistry.getFluid("formaldehyde"), 4000), Materials.CarbonMonoxide.getGas(1000), GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.Pentaerythritol, 21L), 600, 480); - //CaC2 + 2H2O = Ca(OH)2 + C2H2 - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.CalciumCarbide, 3L), GT_Utility.getIntegratedCircuit(1), Materials.Water.getFluid(2000L), MaterialsKevlar.Acetylene.getGas(1000L), GT_ModHandler.getModItem("miscutils", "itemDustCalciumHydroxide", 5L), 300, 480); - - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1), GT_ModHandler.getModItem("miscutils", "itemDustCalciumChloride", 1L), GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.ParaPhenylenediamine, 9L), GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.TerephthaloylChloride, 9L)}, new FluidStack[]{MaterialsKevlar.NMethylIIPyrrolidone.getFluid(1000)}, new FluidStack[]{MaterialsKevlar.LiquidCrystalKevlar.getFluid(9000L), Materials.DilutedHydrochloricAcid.getFluid(2000L)}, null, 600, 500000); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9), GT_ModHandler.getModItem("miscutils", "itemDustCalciumChloride", 7L), GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.ParaPhenylenediamine, 63L), GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.TerephthaloylChloride, 63L)}, new FluidStack[]{MaterialsKevlar.NMethylIIPyrrolidone.getFluid(7000)}, new FluidStack[]{MaterialsKevlar.LiquidCrystalKevlar.getFluid(63000L), Materials.DilutedHydrochloricAcid.getFluid(14000L)}, null, 3500, 500000); - - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Electric_Pump_EV.get(4L), ItemList.Field_Generator_EV.get(4L), GT_ModHandler.getModItem("miscutils", "itemPlateInconel690", 4L), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 16L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.BorosilicateGlass, 16L), GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Aluminium, 2L), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Polytetrafluoroethylene, 4L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Data, 4L), ItemList.Shape_Extruder_Wire.get(16L)}, Materials.SolderingAlloy.getGas(144L), ItemList.Spinneret.get(1L), 2400, 1920); - //Co(NO3)2 + 2NaOH = Co(OH)2 + 2NaNO3 - GT_Values.RA.addChemicalRecipe(MaterialsKevlar.CobaltIINitrate.getDust(9), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SodiumHydroxide, 6L), GT_Values.NF, GT_Values.NF, MaterialsKevlar.CobaltIIHydroxide.getDust(5), GT_ModHandler.getModItem("miscutils", "itemDustSodiumNitrate", 10L), 100, 120); - //Rh + 3Cl = RhCl3 - GT_Values.RA.addBlastRecipe(GT_ModHandler.getModItem("bartworks", "gt.bwMetaGenerateddust", 1L, 78), GT_Utility.getIntegratedCircuit(2), Materials.Chlorine.getGas(3000L), GT_Values.NF, MaterialsKevlar.RhodiumChloride.getDust(4), GT_Values.NI, 600, 480, 573); - //Na2B4O7(H2O)10 + 2HCl = 2NaCl + 4H3BO3 + 5H2O - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Borax, 23L)}, new FluidStack[]{Materials.HydrochloricAcid.getFluid(2000L)}, new FluidStack[]{new FluidStack(FluidRegistry.getFluid("boricacid"), 4000), Materials.Water.getFluid(5000L)}, new ItemStack[]{Materials.Salt.getDust(4)}, 800, 480); - //H3BO3 + 3CH4O =H2SO4= C3H9BO3 + 3H2O - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1)}, new FluidStack[]{Materials.Methanol.getFluid(3000L), new FluidStack(FluidRegistry.getFluid("boricacid"), 1000), Materials.SulfuricAcid.getFluid(6000L)}, new FluidStack[]{Materials.DilutedSulfuricAcid.getFluid(6000L), MaterialsKevlar.TrimethylBorate.getFluid(1000)}, null, 600, 960); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9)}, new FluidStack[]{Materials.Methanol.getFluid(27000L), new FluidStack(FluidRegistry.getFluid("boricacid"), 9000), Materials.SulfuricAcid.getFluid(54000L)}, new FluidStack[]{Materials.DilutedSulfuricAcid.getFluid(54000L), MaterialsKevlar.TrimethylBorate.getFluid(9000)}, null, 4500, 960); - //RhCl3 + 3C18H15P + 3NaBH4 + CO = RhC55H46P3O + 3NaCl + 3B + 11H - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1), GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.RhodiumChloride, 4L), MaterialsKevlar.Triphenylphosphene.getDust(64), MaterialsKevlar.Triphenylphosphene.getDust(38), MaterialsKevlar.SodiumBorohydride.getDust(18)}, new FluidStack[]{Materials.CarbonMonoxide.getGas(1000L)}, new FluidStack[]{Materials.Hydrogen.getGas(11000L)}, new ItemStack[]{MaterialsKevlar.OrganorhodiumCatalyst.getDust(64), MaterialsKevlar.OrganorhodiumCatalyst.getDust(42), Materials.Salt.getDust(6), Materials.Boron.getDust(3)}, 800, 500000); - //2NaOH + N2H4 =Mn= 2N + 2H2O + 2NaH - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9), Materials.SodiumHydroxide.getDust(6), Materials.Manganese.getDustTiny(1)}, new FluidStack[]{new FluidStack(FluidRegistry.getFluid("hydrazine"), 1000)}, new FluidStack[]{Materials.Nitrogen.getGas(2000L), Materials.Water.getFluid(2000L)}, new ItemStack[]{MaterialsKevlar.SodiumHydride.getDust(4)}, 10, 1920); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(18), Materials.SodiumHydroxide.getDust(54), Materials.Manganese.getDust(1)}, new FluidStack[]{new FluidStack(FluidRegistry.getFluid("hydrazine"), 9000)}, new FluidStack[]{Materials.Nitrogen.getGas(18000L), Materials.Water.getFluid(18000L)}, new ItemStack[]{MaterialsKevlar.SodiumHydride.getDust(36)}, 70, 1920); + // CH2O + 2C6H7N + HCl = C13H14N2(HCl) + H2O + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(1)}, + new FluidStack[] { + new FluidStack(FluidRegistry.getFluid("formaldehyde"), 1000), + new FluidStack(FluidRegistry.getFluid("aniline"), 2000), + Materials.HydrochloricAcid.getFluid(1000) + }, + new FluidStack[] {MaterialsKevlar.DiaminodiphenylmethanMixture.getFluid(1000L)}, + null, + 1200, + 1920); + // C6H5NO2 + 6H =Pd= C6H7N + 2H2O + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Palladium, 1L) + }, + new FluidStack[] { + new FluidStack(FluidRegistry.getFluid("nitrobenzene"), 9000), Materials.Hydrogen.getGas(54000) + }, + new FluidStack[] { + Materials.Water.getFluid(18000), new FluidStack(FluidRegistry.getFluid("aniline"), 9000) + }, + null, + 900, + 1920); + // C6H6 + HNO3 =H2SO4= C6H5NO2 + H2O + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NitrationMixture, 10), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Benzene, 5), + Materials.Water.getFluid(10000), + Materials.DilutedSulfuricAcid.getFluid(5000), + GT_ModHandler.getModItem("miscutils", "nitrobenzene", 5L), + ItemList.Cell_Empty.get(10L), + 200, + 1920); + // C13H14N2(HCl) + 2COCl2 = C15H10N2O2(5HCl) + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(1)}, + new FluidStack[] { + MaterialsKevlar.DiaminodiphenylmethanMixture.getFluid(1000L), + new FluidStack(FluidRegistry.getFluid("phosgene"), 2000) + }, + new FluidStack[] {MaterialsKevlar.DiphenylmethaneDiisocyanateMixture.getFluid(1000L)}, + null, + 600, + 1920); + // C4H8O + 2H =Pd= C4H10O + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.Butyraldehyde, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Palladium, 1L), + Materials.Hydrogen.getGas(2000), + new FluidStack(FluidRegistry.getFluid("butanol"), 1000), + ItemList.Cell_Empty.get(1L), + 200, + 30); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(9), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Palladium, 1L) + }, + new FluidStack[] {MaterialsKevlar.Butyraldehyde.getFluid(9000), Materials.Hydrogen.getGas(18000)}, + new FluidStack[] {new FluidStack(FluidRegistry.getFluid("butanol"), 9000)}, + null, + 80, + 480); + + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tin, 1L) + }, + new FluidStack[] { + new FluidStack(FluidRegistry.getFluid("butanol"), 2000), + new FluidStack(FluidRegistry.getFluid("propionicacid"), 1000), + Materials.IronIIIChloride.getFluid(100) + }, + null, + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.KevlarCatalyst, 1L)}, + 600, + 1920); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(9), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tin, 9L) + }, + new FluidStack[] { + new FluidStack(FluidRegistry.getFluid("butanol"), 18000), + new FluidStack(FluidRegistry.getFluid("propionicacid"), 9000), + Materials.IronIIIChloride.getFluid(900) + }, + null, + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.KevlarCatalyst, 9L)}, + 4500, + 1920); + // C2H4 + CO + H2O =C4NiO= C3H6O2 + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(1)}, + new FluidStack[] { + Materials.Ethylene.getGas(1000), + Materials.CarbonMonoxide.getGas(1000), + MaterialsKevlar.NickelTetracarbonyl.getFluid(100), + Materials.Water.getFluid(1000) + }, + new FluidStack[] {new FluidStack(FluidRegistry.getFluid("propionicacid"), 1000)}, + null, + 200, + 1920); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(9)}, + new FluidStack[] { + Materials.Ethylene.getGas(9000), + Materials.CarbonMonoxide.getGas(9000), + MaterialsKevlar.NickelTetracarbonyl.getFluid(900), + Materials.Water.getFluid(9000) + }, + new FluidStack[] {new FluidStack(FluidRegistry.getFluid("propionicacid"), 9000)}, + null, + 1500, + 1920); + // C6H7N + HNO3 =H2SO4,C4H6O3= C6H6N2O2 + H2O + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(2)}, + new FluidStack[] { + new FluidStack(FluidRegistry.getFluid("aniline"), 1000), + new FluidStack(FluidRegistry.getFluid("molten.aceticanhydride"), 100), + Materials.NitrationMixture.getFluid(2000) + }, + new FluidStack[] { + MaterialsKevlar.IVNitroaniline.getFluid(1000L), Materials.DilutedSulfuricAcid.getFluid(1000) + }, + null, + 300, + 1920); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(9)}, + new FluidStack[] { + new FluidStack(FluidRegistry.getFluid("aniline"), 9000), + new FluidStack(FluidRegistry.getFluid("molten.aceticanhydride"), 900), + Materials.NitrationMixture.getFluid(18000) + }, + new FluidStack[] { + MaterialsKevlar.IVNitroaniline.getFluid(9000L), Materials.DilutedSulfuricAcid.getFluid(9000) + }, + null, + 2000, + 1920); + // C6H6N2O2 + 6H =Pd,NO2= C6H8N2 + 2H2O + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Palladium, 1L) + }, + new FluidStack[] { + Materials.NitrogenDioxide.getGas(100), + Materials.Hydrogen.getGas(6000), + MaterialsKevlar.IVNitroaniline.getFluid(1000L) + }, + new FluidStack[] {Materials.Water.getFluid(2000L)}, + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.ParaPhenylenediamine, 16L) + }, + 400, + 500000); + // C4H10O2 =Cu= C4H6O2 + 4H + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 1L) + }, + new FluidStack[] {new FluidStack(FluidRegistry.getFluid("1,4-butanediol"), 1000)}, + new FluidStack[] {MaterialsKevlar.GammaButyrolactone.getFluid(1000), Materials.Hydrogen.getGas(4000) + }, + null, + 100, + 1920); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(9), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 9L) + }, + new FluidStack[] {new FluidStack(FluidRegistry.getFluid("1,4-butanediol"), 9000)}, + new FluidStack[] { + MaterialsKevlar.GammaButyrolactone.getFluid(9000), Materials.Hydrogen.getGas(36000) + }, + null, + 700, + 1920); + // 4CH2O + C2H4O =NaOH= C5H12O4 + CO + GT_Values.RA.addChemicalRecipe( + GT_ModHandler.getModItem("miscutils", "Formaldehyde", 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SodiumHydroxide, 1L), + MaterialsKevlar.Acetaldehyde.getGas(1000), + Materials.CarbonMonoxide.getGas(1000), + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.Pentaerythritol, 21L), + 600, + 480); + // 2CH2O + C2H2 =SiO2,CuO,Bi2O3= C4H6O2 + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CupricOxide, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.BismuthIIIOxide, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 1L) + }, + new FluidStack[] { + MaterialsKevlar.Acetylene.getGas(1000L), + new FluidStack(FluidRegistry.getFluid("formaldehyde"), 2000) + }, + null, + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.IIButinIIVdiol, 12L)}, + 400, + 1920); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(9), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CupricOxide, 9L), + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.BismuthIIIOxide, 9L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 9L) + }, + new FluidStack[] { + MaterialsKevlar.Acetylene.getGas(9000L), + new FluidStack(FluidRegistry.getFluid("formaldehyde"), 18000) + }, + null, + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.IIButinIIVdiol, 64L), + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.IIButinIIVdiol, 44L) + }, + 3000, + 1920); + // C4H6O2 + 4H =NiAl= C4H10O2 + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(1), + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.IIButinIIVdiol, 12L), + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.RaneyNickelActivated, 1L) + }, + new FluidStack[] {Materials.Hydrogen.getGas(4000L)}, + new FluidStack[] {new FluidStack(FluidRegistry.getFluid("1,4-butanediol"), 1000)}, + null, + 300, + 500000); + // 4CH2O + C2H4O =NaOH= C5H12O4 + CO + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.Acetaldehyde, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SodiumHydroxide, 1L), + new FluidStack(FluidRegistry.getFluid("formaldehyde"), 4000), + Materials.CarbonMonoxide.getGas(1000), + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.Pentaerythritol, 21L), + 600, + 480); + // CaC2 + 2H2O = Ca(OH)2 + C2H2 + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.CalciumCarbide, 3L), + GT_Utility.getIntegratedCircuit(1), + Materials.Water.getFluid(2000L), + MaterialsKevlar.Acetylene.getGas(1000L), + GT_ModHandler.getModItem("miscutils", "itemDustCalciumHydroxide", 5L), + 300, + 480); + + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(1), + GT_ModHandler.getModItem("miscutils", "itemDustCalciumChloride", 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.ParaPhenylenediamine, 9L), + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.TerephthaloylChloride, 9L) + }, + new FluidStack[] {MaterialsKevlar.NMethylIIPyrrolidone.getFluid(1000)}, + new FluidStack[] { + MaterialsKevlar.LiquidCrystalKevlar.getFluid(9000L), + Materials.DilutedHydrochloricAcid.getFluid(2000L) + }, + null, + 600, + 500000); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(9), + GT_ModHandler.getModItem("miscutils", "itemDustCalciumChloride", 7L), + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.ParaPhenylenediamine, 63L), + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.TerephthaloylChloride, 63L) + }, + new FluidStack[] {MaterialsKevlar.NMethylIIPyrrolidone.getFluid(7000)}, + new FluidStack[] { + MaterialsKevlar.LiquidCrystalKevlar.getFluid(63000L), + Materials.DilutedHydrochloricAcid.getFluid(14000L) + }, + null, + 3500, + 500000); + + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Electric_Pump_EV.get(4L), + ItemList.Field_Generator_EV.get(4L), + GT_ModHandler.getModItem("miscutils", "itemPlateInconel690", 4L), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 16L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.BorosilicateGlass, 16L), + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Aluminium, 2L), + GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Polytetrafluoroethylene, 4L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Data, 4L), + ItemList.Shape_Extruder_Wire.get(16L) + }, + Materials.SolderingAlloy.getGas(144L), + ItemList.Spinneret.get(1L), + 2400, + 1920); + // Co(NO3)2 + 2NaOH = Co(OH)2 + 2NaNO3 + GT_Values.RA.addChemicalRecipe( + MaterialsKevlar.CobaltIINitrate.getDust(9), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SodiumHydroxide, 6L), + GT_Values.NF, + GT_Values.NF, + MaterialsKevlar.CobaltIIHydroxide.getDust(5), + GT_ModHandler.getModItem("miscutils", "itemDustSodiumNitrate", 10L), + 100, + 120); + // Rh + 3Cl = RhCl3 + GT_Values.RA.addBlastRecipe( + GT_ModHandler.getModItem("bartworks", "gt.bwMetaGenerateddust", 1L, 78), + GT_Utility.getIntegratedCircuit(2), + Materials.Chlorine.getGas(3000L), + GT_Values.NF, + MaterialsKevlar.RhodiumChloride.getDust(4), + GT_Values.NI, + 600, + 480, + 573); + // Na2B4O7(H2O)10 + 2HCl = 2NaCl + 4H3BO3 + 5H2O + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Borax, 23L) + }, + new FluidStack[] {Materials.HydrochloricAcid.getFluid(2000L)}, + new FluidStack[] { + new FluidStack(FluidRegistry.getFluid("boricacid"), 4000), Materials.Water.getFluid(5000L) + }, + new ItemStack[] {Materials.Salt.getDust(4)}, + 800, + 480); + // H3BO3 + 3CH4O =H2SO4= C3H9BO3 + 3H2O + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(1)}, + new FluidStack[] { + Materials.Methanol.getFluid(3000L), + new FluidStack(FluidRegistry.getFluid("boricacid"), 1000), + Materials.SulfuricAcid.getFluid(6000L) + }, + new FluidStack[] { + Materials.DilutedSulfuricAcid.getFluid(6000L), MaterialsKevlar.TrimethylBorate.getFluid(1000) + }, + null, + 600, + 960); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(9)}, + new FluidStack[] { + Materials.Methanol.getFluid(27000L), + new FluidStack(FluidRegistry.getFluid("boricacid"), 9000), + Materials.SulfuricAcid.getFluid(54000L) + }, + new FluidStack[] { + Materials.DilutedSulfuricAcid.getFluid(54000L), MaterialsKevlar.TrimethylBorate.getFluid(9000) + }, + null, + 4500, + 960); + // RhCl3 + 3C18H15P + 3NaBH4 + CO = RhC55H46P3O + 3NaCl + 3B + 11H + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(1), + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.RhodiumChloride, 4L), + MaterialsKevlar.Triphenylphosphene.getDust(64), + MaterialsKevlar.Triphenylphosphene.getDust(38), + MaterialsKevlar.SodiumBorohydride.getDust(18) + }, + new FluidStack[] {Materials.CarbonMonoxide.getGas(1000L)}, + new FluidStack[] {Materials.Hydrogen.getGas(11000L)}, + new ItemStack[] { + MaterialsKevlar.OrganorhodiumCatalyst.getDust(64), + MaterialsKevlar.OrganorhodiumCatalyst.getDust(42), + Materials.Salt.getDust(6), + Materials.Boron.getDust(3) + }, + 800, + 500000); + // 2NaOH + N2H4 =Mn= 2N + 2H2O + 2NaH + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(9), + Materials.SodiumHydroxide.getDust(6), + Materials.Manganese.getDustTiny(1) + }, + new FluidStack[] {new FluidStack(FluidRegistry.getFluid("hydrazine"), 1000)}, + new FluidStack[] {Materials.Nitrogen.getGas(2000L), Materials.Water.getFluid(2000L)}, + new ItemStack[] {MaterialsKevlar.SodiumHydride.getDust(4)}, + 10, + 1920); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(18), + Materials.SodiumHydroxide.getDust(54), + Materials.Manganese.getDust(1) + }, + new FluidStack[] {new FluidStack(FluidRegistry.getFluid("hydrazine"), 9000)}, + new FluidStack[] {Materials.Nitrogen.getGas(18000L), Materials.Water.getFluid(18000L)}, + new ItemStack[] {MaterialsKevlar.SodiumHydride.getDust(36)}, + 70, + 1920); } - //2CO + 2C3H6 + 4H =RhHCO(P(C6H5)3)3= C4H8O + C4H8O - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(4), MaterialsKevlar.OrganorhodiumCatalyst.getDustTiny(1)}, new FluidStack[]{Materials.Hydrogen.getGas(4000), Materials.Propene.getGas(2000), Materials.CarbonMonoxide.getGas(2000)}, new FluidStack[]{MaterialsKevlar.Butyraldehyde.getFluid(1000), MaterialsKevlar.Isobutyraldehyde.getFluid(1000)}, null, 300, 30); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9), MaterialsKevlar.OrganorhodiumCatalyst.getDust(1)}, new FluidStack[]{Materials.Hydrogen.getGas(36000), Materials.Propene.getGas(18000), Materials.CarbonMonoxide.getGas(18000)}, new FluidStack[]{MaterialsKevlar.Butyraldehyde.getFluid(9000), MaterialsKevlar.Isobutyraldehyde.getFluid(9000)}, null, 2000, 30); - //Ni + 4CO = Ni(CO)4 - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.CarbonMonoxide, 4L), GT_Values.NF, MaterialsKevlar.NickelTetracarbonyl.getFluid(1000), ItemList.Cell_Empty.get(4L), 400, 1920); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 1L), GT_Utility.getIntegratedCircuit(1), Materials.CarbonMonoxide.getGas(4000), MaterialsKevlar.NickelTetracarbonyl.getFluid(1000), GT_Values.NI, 400, 1920); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 1L), ItemList.Cell_Empty.get(1L), Materials.CarbonMonoxide.getGas(4000), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.NickelTetracarbonyl, 1L), 400, 1920); - //C2H4 + O =Al2O3,Ag= C2H4O - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(2), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silver, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminiumoxide, 1L)}, new FluidStack[]{Materials.Ethylene.getGas(1000), Materials.Oxygen.getGas(1000)}, new FluidStack[]{MaterialsKevlar.EthyleneOxide.getGas(1000)}, null, 50, 480); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(8), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silver, 9L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminiumoxide, 9L)}, new FluidStack[]{Materials.Ethylene.getGas(9000), Materials.Oxygen.getGas(9000)}, new FluidStack[]{MaterialsKevlar.EthyleneOxide.getGas(9000)}, null, 400, 480); - - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.EthyleneOxide, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 5L), Materials.Dimethyldichlorosilane.getFluid(4000), MaterialsKevlar.SiliconOil.getFluid(5000), ItemList.Cell_Empty.get(6L), GT_Values.NI, 600, 480); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.EthyleneOxide, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Dimethyldichlorosilane, 4L), Materials.Water.getFluid(5000), MaterialsKevlar.SiliconOil.getFluid(5000), ItemList.Cell_Empty.get(5L), GT_Values.NI, 600, 480); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(2)}, new FluidStack[]{MaterialsKevlar.EthyleneOxide.getGas(1000), Materials.Dimethyldichlorosilane.getFluid(4000), Materials.Water.getFluid(5000)}, new FluidStack[]{MaterialsKevlar.SiliconOil.getFluid(5000)}, null, 15, 1920); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(8)}, new FluidStack[]{MaterialsKevlar.EthyleneOxide.getGas(9000), Materials.Dimethyldichlorosilane.getFluid(36000), Materials.Water.getFluid(45000)}, new FluidStack[]{MaterialsKevlar.SiliconOil.getFluid(45000)}, null, 100, 1920); - //C2H4O + H2O = C2H6O2 - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.EthyleneOxide, 1L), GT_Utility.getIntegratedCircuit(1), Materials.Water.getFluid(1000), MaterialsKevlar.Ethyleneglycol.getFluid(1000), ItemList.Cell_Empty.get(1L), 200, 480); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 1L), GT_Utility.getIntegratedCircuit(2), MaterialsKevlar.EthyleneOxide.getGas(1000), MaterialsKevlar.Ethyleneglycol.getFluid(1000), ItemList.Cell_Empty.get(1L), GT_Values.NI, 200, 480); - //C2H4 + O = C2H4O - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ethylene, 2L), GT_Utility.getIntegratedCircuit(4), Materials.Oxygen.getGas(1000), MaterialsKevlar.Acetaldehyde.getGas(1000), ItemList.Cell_Empty.get(2), 200, 120); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), GT_Utility.getIntegratedCircuit(5), Materials.Ethylene.getGas(2000), MaterialsKevlar.Acetaldehyde.getGas(1000), ItemList.Cell_Empty.get(1), 200, 120); - //NH3 + CH4O =SiO2,Al2O3= CH5N + H2O - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(10), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminiumoxide, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 1L)}, new FluidStack[]{Materials.Methanol.getFluid(1000), Materials.Ammonia.getGas(1000)}, new FluidStack[]{MaterialsKevlar.Methylamine.getGas(1000L), Materials.Water.getFluid(1000L)}, null, 1500, 500000); - //CaO + 3C = CaC2 + CO - GT_Values.RA.addBlastRecipe(Materials.Quicklime.getDust(2), Materials.Carbon.getDust(3), GT_Values.NF, Materials.CarbonMonoxide.getGas(1000), MaterialsKevlar.CalciumCarbide.getDust(3), GT_Values.NI, 600, 480, 2573); - //Ni + 3Al = NiAl3 - GT_Values.RA.addBlastRecipe(Materials.Nickel.getDust(1), Materials.Aluminium.getDust(3), GT_Values.NF, GT_Values.NF, MaterialsKevlar.NickelAluminide.getIngots(4), GT_Values.NI, 900, 480, 1688); - //NiAl3 + 2NaOH + 2H2O = NiAl + 2NaAlO2 + 6H - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.ingot, MaterialsKevlar.NickelAluminide, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SodiumHydroxide, 6L), Materials.Water.getFluid(2000), Materials.Hydrogen.getGas(6000), GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.RaneyNickelActivated, 2L), Materials.SodiumAluminate.getDust(8), 1200, 1920); - //Cu + O = CuO - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CupricOxide, 2L), ItemList.Cell_Empty.get(1), 100, 30); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 1L), GT_Utility.getIntegratedCircuit(1), Materials.Oxygen.getGas(1000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CupricOxide, 2L), 100, 30); - //2Bi + 3O = Bi2O3 - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bismuth, 4L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 6L), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.BismuthIIIOxide, 10L), ItemList.Cell_Empty.get(6), 200, 120); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bismuth, 4L), GT_Utility.getIntegratedCircuit(1), Materials.Oxygen.getGas(6000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.BismuthIIIOxide, 10L), 200, 120); - - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1), GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.KevlarCatalyst, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.Pentaerythritol, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.DiphenylmethaneDiisocyanate, 5L)}, new FluidStack[]{MaterialsKevlar.Ethyleneglycol.getFluid(4000), MaterialsKevlar.SiliconOil.getFluid(1000)}, new FluidStack[]{MaterialsKevlar.PolyurethaneResin.getFluid(1000L)}, null, 200, 500000); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9), GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.KevlarCatalyst, 9L), GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.Pentaerythritol, 9L), GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.DiphenylmethaneDiisocyanate, 45L)}, new FluidStack[]{MaterialsKevlar.Ethyleneglycol.getFluid(36000), MaterialsKevlar.SiliconOil.getFluid(9000)}, new FluidStack[]{MaterialsKevlar.PolyurethaneResin.getFluid(9000L)}, null, 1500, 500000); - //C4H6O2 + CNH5 = C5H9NO + H2O - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.Methylamine, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.GammaButyrolactone, 1L), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.NMethylIIPyrrolidone, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 1L), 600, 7680); - //3NH3 + 6CH4O =Al2O3,SiO2= CH5N + C2H7N + C3H9N + 6H2O - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(3), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminiumoxide, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 1L)}, new FluidStack[]{Materials.Methanol.getFluid(6000), Materials.Ammonia.getGas(3000)}, new FluidStack[]{MaterialsKevlar.Methylamine.getGas(1000L), Materials.Dimethylamine.getGas(1000L), MaterialsKevlar.Trimethylamine.getGas(1000L), Materials.Water.getFluid(6000L)}, null, 400, 1920); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(11), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminiumoxide, 9L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 9L)}, new FluidStack[]{Materials.Methanol.getFluid(54000), Materials.Ammonia.getGas(27000)}, new FluidStack[]{MaterialsKevlar.Methylamine.getGas(9000L), Materials.Dimethylamine.getGas(9000L), MaterialsKevlar.Trimethylamine.getGas(9000L), Materials.Water.getFluid(54000L)}, null, 3000, 1920); - //S + 2Cl = SCl2 - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 8L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Chlorine, 16L), GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.SulfurDichloride, 8L), ItemList.Cell_Empty.get(16), 800, 30); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 8L), ItemList.Cell_Empty.get(8L), Materials.Chlorine.getGas(16000), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.SulfurDichloride, 8L), GT_Values.NI, 800, 30); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 8L), GT_Utility.getIntegratedCircuit(2), Materials.Chlorine.getGas(16000), MaterialsKevlar.SulfurDichloride.getFluid(8000), GT_Values.NI, GT_Values.NI, 800, 30); - //SCl2 + SO3 = SO2 + SOCl2 - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfurTrioxide, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.SulfurDichloride, 1L), GT_Values.NF, Materials.SulfurDioxide.getGas(1000L), GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.ThionylChloride, 1L), ItemList.Cell_Empty.get(1), 150, 480); - //18SOCl2 + 5C10H10O4 + 6CO2 = 7C8H4Cl2O2 + 22HCl + 18SO2 - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1)}, new FluidStack[]{MaterialsKevlar.ThionylChloride.getFluid(18000), MaterialsKevlar.DimethylTerephthalate.getFluid(5000L), Materials.CarbonDioxide.getGas(6000L)}, new FluidStack[]{Materials.DilutedHydrochloricAcid.getFluid(22000L), Materials.SulfurDioxide.getGas(18000L)}, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.TerephthaloylChloride, 64L), GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.TerephthaloylChloride, 48L)}, 400, 1920); - - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Spinneret.get(0L), MaterialsKevlar.LiquidCrystalKevlar.getFluid(144L), ItemList.KevlarFiber.get(8L), 800, 1920); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.KevlarFiber.get(8L), GT_Utility.getIntegratedCircuit(8)}, GT_Values.NF, ItemList.WovenKevlar.get(1L), 300, 1920); - GT_Values.RA.addChemicalBathRecipe(ItemList.WovenKevlar.get(1L), MaterialsKevlar.PolyurethaneResin.getFluid(1000), GT_Values.NF, MaterialsKevlar.Kevlar.getPlates(1), GT_Values.NI, GT_Values.NI, null, 1200, 30); - //2CH4O + C8H6O4 =H2SO4= C10H10O4 + 2H2O - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1)}, new FluidStack[]{MaterialsKevlar.TerephthalicAcid.getFluid(1000L), Materials.Methanol.getFluid(2000), Materials.SulfuricAcid.getFluid(2000)}, new FluidStack[]{MaterialsKevlar.DimethylTerephthalate.getFluid(1000L), Materials.DilutedSulfuricAcid.getFluid(2000)}, null, 250, 1920); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9)}, new FluidStack[]{MaterialsKevlar.TerephthalicAcid.getFluid(9000L), Materials.Methanol.getFluid(18000), Materials.SulfuricAcid.getFluid(18000)}, new FluidStack[]{MaterialsKevlar.DimethylTerephthalate.getFluid(9000L), Materials.DilutedSulfuricAcid.getFluid(18000)}, null, 1750, 1920); - //C8H10 + 6O =CoC22H14O4= C8H6O4 + 2H2O - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.IVDimethylbenzene, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.CobaltIINaphthenate, 1L), Materials.Oxygen.getGas(6000L), Materials.Water.getFluid(2000L), GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.TerephthalicAcid, 1L), 150, 480); - - GT_Values.RA.addDistillationTowerRecipe(Materials.CharcoalByproducts.getGas(1000), new ItemStack[]{GT_Utility.getIntegratedCircuit(2)}, - new FluidStack[]{Materials.WoodTar.getFluid(250), Materials.WoodVinegar.getFluid(400), Materials.WoodGas.getGas(250), MaterialsKevlar.IIIDimethylbenzene.getFluid(100)}, - Materials.Charcoal.getDustSmall(1), 40, 256); - GT_Values.RA.addDistillationTowerRecipe(Materials.WoodTar.getFluid(1000), new ItemStack[]{GT_Utility.getIntegratedCircuit(2)}, - new FluidStack[]{Materials.Creosote.getFluid(250), Materials.Phenol.getFluid(100), Materials.Benzene.getFluid(400), Materials.Toluene.getFluid(100), MaterialsKevlar.IIIDimethylbenzene.getFluid(150)}, - GT_Values.NI, 40, 256); - GT_Values.RA.addDistillationTowerRecipe(Materials.CharcoalByproducts.getGas(1000), new ItemStack[]{GT_Utility.getIntegratedCircuit(3)}, - new FluidStack[]{Materials.WoodTar.getFluid(250), Materials.WoodVinegar.getFluid(400), Materials.WoodGas.getGas(250), MaterialsKevlar.IVDimethylbenzene.getFluid(100)}, - Materials.Charcoal.getDustSmall(1), 40, 256); - GT_Values.RA.addUniversalDistillationRecipewithCircuit(Materials.WoodTar.getFluid(1000), new ItemStack[]{GT_Utility.getIntegratedCircuit(3)}, - new FluidStack[]{Materials.Creosote.getFluid(250), Materials.Phenol.getFluid(100), Materials.Benzene.getFluid(400), Materials.Toluene.getFluid(100), MaterialsKevlar.IVDimethylbenzene.getFluid(150)}, - GT_Values.NI, 40, 256); - GT_Values.RA.addDistillationTowerRecipe(Materials.CharcoalByproducts.getGas(1000), new ItemStack[]{GT_Utility.getIntegratedCircuit(4)}, - new FluidStack[]{Materials.WoodTar.getFluid(250), Materials.WoodVinegar.getFluid(400), Materials.WoodGas.getGas(250), Materials.Dimethylbenzene.getFluid(20), MaterialsKevlar.IIIDimethylbenzene.getFluid(60), MaterialsKevlar.IVDimethylbenzene.getFluid(20)}, - Materials.Charcoal.getDustSmall(1), 40, 256); - GT_Values.RA.addDistillationTowerRecipe(Materials.WoodTar.getFluid(1000), new ItemStack[]{GT_Utility.getIntegratedCircuit(4)}, - new FluidStack[]{Materials.Creosote.getFluid(250), Materials.Phenol.getFluid(100), Materials.Benzene.getFluid(400), Materials.Toluene.getFluid(100), Materials.Dimethylbenzene.getFluid(30), MaterialsKevlar.IIIDimethylbenzene.getFluid(90), MaterialsKevlar.IVDimethylbenzene.getFluid(30)}, - GT_Values.NI, 40, 256); - - GT_Values.RA.addDistilleryRecipe(6, Materials.WoodTar.getFluid(200), MaterialsKevlar.IIIDimethylbenzene.getFluid(30), 16, 64, false); - GT_Values.RA.addDistilleryRecipe(6, Materials.CharcoalByproducts.getGas(200), MaterialsKevlar.IIIDimethylbenzene.getFluid(20), 100, 64, false); - GT_Values.RA.addDistilleryRecipe(7, Materials.WoodTar.getFluid(200), MaterialsKevlar.IVDimethylbenzene.getFluid(30), 16, 64, false); - GT_Values.RA.addDistilleryRecipe(7, Materials.CharcoalByproducts.getGas(200), MaterialsKevlar.IVDimethylbenzene.getFluid(20), 100, 64, false); - //2CH4 + C6H6 = C8H10 + 4H - GT_Values.RA.addChemicalRecipe(Materials.Methane.getCells(2), GT_Utility.getIntegratedCircuit(13), Materials.Benzene.getFluid(1000), Materials.Hydrogen.getGas(4000), MaterialsKevlar.IIIDimethylbenzene.getCells(1), Materials.Empty.getCells(1), 4000, 120); - GT_Values.RA.addChemicalRecipe(Materials.Benzene.getCells(1), GT_Utility.getIntegratedCircuit(14), Materials.Methane.getGas(2000), Materials.Hydrogen.getGas(4000), MaterialsKevlar.IIIDimethylbenzene.getCells(1), 4000, 120); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(2)}, new FluidStack[]{Materials.Benzene.getFluid(1000), Materials.Methane.getGas(2000)}, new FluidStack[]{MaterialsKevlar.IIIDimethylbenzene.getFluid(1000L), Materials.Hydrogen.getGas(4000)}, null, 4000, 120); - //2CH4 + C6H6 = C8H10 + 4H - GT_Values.RA.addChemicalRecipe(Materials.Methane.getCells(2), GT_Utility.getIntegratedCircuit(15), Materials.Benzene.getFluid(1000), Materials.Hydrogen.getGas(4000), MaterialsKevlar.IVDimethylbenzene.getCells(1), Materials.Empty.getCells(1), 4000, 120); - GT_Values.RA.addChemicalRecipe(Materials.Benzene.getCells(1), GT_Utility.getIntegratedCircuit(16), Materials.Methane.getGas(2000), Materials.Hydrogen.getGas(4000), MaterialsKevlar.IVDimethylbenzene.getCells(1), 4000, 120); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(3)}, new FluidStack[]{Materials.Benzene.getFluid(1000), Materials.Methane.getGas(2000)}, new FluidStack[]{MaterialsKevlar.IVDimethylbenzene.getFluid(1000L), Materials.Hydrogen.getGas(4000)}, null, 4000, 120); - - GT_Values.RA.addChemicalRecipe(MaterialsKevlar.CobaltIIHydroxide.getDust(5), MaterialsKevlar.NaphthenicAcid.getCells(1), GT_Values.NF, GT_Values.NF, MaterialsKevlar.CobaltIINaphthenate.getDust(1), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 1L), 100, 480); - GT_Values.RA.addChemicalRecipe(MaterialsKevlar.CobaltIIHydroxide.getDust(5), GT_Utility.getIntegratedCircuit(1), MaterialsKevlar.NaphthenicAcid.getFluid(1000L), GT_Values.NF, MaterialsKevlar.CobaltIINaphthenate.getDust(1), 100, 480); - - GT_Values.RA.addChemicalRecipe(MaterialsKevlar.CobaltIIAcetate.getDust(15), MaterialsKevlar.NaphthenicAcid.getCells(1), GT_Values.NF, GT_Values.NF, MaterialsKevlar.CobaltIINaphthenate.getDust(1), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 1L), 100, 480); - GT_Values.RA.addChemicalRecipe(MaterialsKevlar.CobaltIIAcetate.getDust(15), GT_Utility.getIntegratedCircuit(1), MaterialsKevlar.NaphthenicAcid.getFluid(1000L), GT_Values.NF, MaterialsKevlar.CobaltIINaphthenate.getDust(1), 100, 480); - //Co + 2HNO3 = Co(NO3)2 + 2H - GT_Values.RA.addChemicalRecipe(Materials.Cobalt.getDust(1), Materials.NitricAcid.getCells(2), Materials.Water.getFluid(6000L), GT_Values.NF, MaterialsKevlar.CobaltIINitrate.getDust(9), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2L), 100, 120); - //Co(NO3)2 + 2KOH = CoH2O2 + 2KNO3 - GT_Values.RA.addChemicalRecipe(MaterialsKevlar.CobaltIINitrate.getDust(9), GT_ModHandler.getModItem(MOD_ID_DC, "item.PotassiumHydroxideDust", 6L, 0), GT_Values.NF, GT_Values.NF, MaterialsKevlar.CobaltIIHydroxide.getDust(5), Materials.Saltpeter.getDust(10), 100, 120); - //CoO + 2C2H4O2 = CoC4H6O4 + 2H - GT_Values.RA.addChemicalRecipe(Materials.CobaltOxide.getDust(2), Materials.AceticAcid.getCells(2), GT_Values.NF, Materials.Hydrogen.getGas(2000L), MaterialsKevlar.CobaltIIAcetate.getDust(15), ItemList.Cell_Empty.get(2L), 100, 120); - - GT_Values.RA.addDistillationTowerRecipe(Materials.OilLight.getFluid(1500), new ItemStack[]{GT_Utility.getIntegratedCircuit(9)}, new FluidStack[]{Materials.SulfuricHeavyFuel.getFluid(100), Materials.SulfuricLightFuel.getFluid(200), Materials.SulfuricNaphtha.getFluid(300), MaterialsKevlar.NaphthenicAcid.getFluid(25), Materials.SulfuricGas.getGas(2400)}, null, 32, 480); - GT_Values.RA.addDistillationTowerRecipe(Materials.OilMedium.getFluid(1000), new ItemStack[]{GT_Utility.getIntegratedCircuit(9)}, new FluidStack[]{Materials.SulfuricHeavyFuel.getFluid(150), Materials.SulfuricLightFuel.getFluid(500), Materials.SulfuricNaphtha.getFluid(200), MaterialsKevlar.NaphthenicAcid.getFluid(25), Materials.SulfuricGas.getGas(600)}, null, 32, 480); - GT_Values.RA.addDistillationTowerRecipe(Materials.Oil.getFluid(500L), new ItemStack[]{GT_Utility.getIntegratedCircuit(9)}, new FluidStack[]{Materials.SulfuricHeavyFuel.getFluid(150), Materials.SulfuricLightFuel.getFluid(500), Materials.SulfuricNaphtha.getFluid(200), MaterialsKevlar.NaphthenicAcid.getFluid(25), Materials.SulfuricGas.getGas(600)}, null, 32, 480); - GT_Values.RA.addDistillationTowerRecipe(Materials.OilHeavy.getFluid(1000), new ItemStack[]{GT_Utility.getIntegratedCircuit(9)}, new FluidStack[]{Materials.SulfuricHeavyFuel.getFluid(2500), Materials.SulfuricLightFuel.getFluid(450), Materials.SulfuricNaphtha.getFluid(150), MaterialsKevlar.NaphthenicAcid.getFluid(50), Materials.SulfuricGas.getGas(600)}, null, 100, 480); - //P + 3Cl = PCl3 - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Phosphorus.getDust(1), Materials.Chlorine.getCells(3), GT_Values.NF, MaterialsKevlar.PhosphorusTrichloride.getFluid(1000L), ItemList.Cell_Empty.get(3L), GT_Values.NI, 200, 120); - GT_Values.RA.addChemicalRecipe(Materials.Phosphorus.getDust(1), GT_Utility.getIntegratedCircuit(1), Materials.Chlorine.getGas(3000L), MaterialsKevlar.PhosphorusTrichloride.getFluid(1000L), GT_Values.NI, 200, 120); - GT_Values.RA.addChemicalRecipe(Materials.Phosphorus.getDust(9), GT_Utility.getIntegratedCircuit(9), Materials.Chlorine.getGas(27000L), MaterialsKevlar.PhosphorusTrichloride.getFluid(9000L), GT_Values.NI, 1500, 120); - //PCl3 + 3C6H5Cl + 6Na = 6NaCl + C18H15P - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 6L)}, new FluidStack[]{MaterialsKevlar.PhosphorusTrichloride.getFluid(1000L), Materials.Chlorobenzene.getFluid(3000)}, null, new ItemStack[]{MaterialsKevlar.Triphenylphosphene.getDust(34), Materials.Salt.getDust(12)}, 400, 1920); - //Na + H = NaH - GT_Values.RA.addChemicalRecipe(Materials.Sodium.getDust(1), GT_Utility.getIntegratedCircuit(2), Materials.Hydrogen.getGas(1000L), GT_Values.NF, MaterialsKevlar.SodiumHydride.getDust(2), 200, 120); - //4NaH + C3H9BO3 = NaBH4 + 3CH3ONa - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1), MaterialsKevlar.SodiumHydride.getDust(8)}, new FluidStack[]{MaterialsKevlar.TrimethylBorate.getFluid(1000L)}, null, new ItemStack[]{MaterialsKevlar.SodiumBorohydride.getDust(6), MaterialsKevlar.SodiumMethoxide.getDust(18)}, 600, 1920); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9), MaterialsKevlar.SodiumHydride.getDust(64)}, new FluidStack[]{MaterialsKevlar.TrimethylBorate.getFluid(8000L)}, null, new ItemStack[]{MaterialsKevlar.SodiumBorohydride.getDust(48), MaterialsKevlar.SodiumMethoxide.getDust(64), MaterialsKevlar.SodiumMethoxide.getDust(64), MaterialsKevlar.SodiumMethoxide.getDust(16)}, 600, 1920); - //CH3ONa + H2O = CH4O + NaOH - GT_Values.RA.addChemicalRecipe(MaterialsKevlar.SodiumMethoxide.getDust(6), GT_Utility.getIntegratedCircuit(1), Materials.Water.getFluid(1000L), Materials.Methanol.getFluid(1000L), Materials.SodiumHydroxide.getDust(3), 200, 480); + // 2CO + 2C3H6 + 4H =RhHCO(P(C6H5)3)3= C4H8O + C4H8O + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(4), MaterialsKevlar.OrganorhodiumCatalyst.getDustTiny(1) + }, + new FluidStack[] { + Materials.Hydrogen.getGas(4000), + Materials.Propene.getGas(2000), + Materials.CarbonMonoxide.getGas(2000) + }, + new FluidStack[] { + MaterialsKevlar.Butyraldehyde.getFluid(1000), MaterialsKevlar.Isobutyraldehyde.getFluid(1000) + }, + null, + 300, + 30); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(9), MaterialsKevlar.OrganorhodiumCatalyst.getDust(1)}, + new FluidStack[] { + Materials.Hydrogen.getGas(36000), + Materials.Propene.getGas(18000), + Materials.CarbonMonoxide.getGas(18000) + }, + new FluidStack[] { + MaterialsKevlar.Butyraldehyde.getFluid(9000), MaterialsKevlar.Isobutyraldehyde.getFluid(9000) + }, + null, + 2000, + 30); + // Ni + 4CO = Ni(CO)4 + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 1L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.CarbonMonoxide, 4L), + GT_Values.NF, + MaterialsKevlar.NickelTetracarbonyl.getFluid(1000), + ItemList.Cell_Empty.get(4L), + 400, + 1920); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 1L), + GT_Utility.getIntegratedCircuit(1), + Materials.CarbonMonoxide.getGas(4000), + MaterialsKevlar.NickelTetracarbonyl.getFluid(1000), + GT_Values.NI, + 400, + 1920); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 1L), + ItemList.Cell_Empty.get(1L), + Materials.CarbonMonoxide.getGas(4000), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.NickelTetracarbonyl, 1L), + 400, + 1920); + // C2H4 + O =Al2O3,Ag= C2H4O + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(2), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silver, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminiumoxide, 1L) + }, + new FluidStack[] {Materials.Ethylene.getGas(1000), Materials.Oxygen.getGas(1000)}, + new FluidStack[] {MaterialsKevlar.EthyleneOxide.getGas(1000)}, + null, + 50, + 480); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(8), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silver, 9L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminiumoxide, 9L) + }, + new FluidStack[] {Materials.Ethylene.getGas(9000), Materials.Oxygen.getGas(9000)}, + new FluidStack[] {MaterialsKevlar.EthyleneOxide.getGas(9000)}, + null, + 400, + 480); + + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.EthyleneOxide, 1L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 5L), + Materials.Dimethyldichlorosilane.getFluid(4000), + MaterialsKevlar.SiliconOil.getFluid(5000), + ItemList.Cell_Empty.get(6L), + GT_Values.NI, + 600, + 480); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.EthyleneOxide, 1L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Dimethyldichlorosilane, 4L), + Materials.Water.getFluid(5000), + MaterialsKevlar.SiliconOil.getFluid(5000), + ItemList.Cell_Empty.get(5L), + GT_Values.NI, + 600, + 480); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(2)}, + new FluidStack[] { + MaterialsKevlar.EthyleneOxide.getGas(1000), + Materials.Dimethyldichlorosilane.getFluid(4000), + Materials.Water.getFluid(5000) + }, + new FluidStack[] {MaterialsKevlar.SiliconOil.getFluid(5000)}, + null, + 15, + 1920); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(8)}, + new FluidStack[] { + MaterialsKevlar.EthyleneOxide.getGas(9000), + Materials.Dimethyldichlorosilane.getFluid(36000), + Materials.Water.getFluid(45000) + }, + new FluidStack[] {MaterialsKevlar.SiliconOil.getFluid(45000)}, + null, + 100, + 1920); + // C2H4O + H2O = C2H6O2 + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.EthyleneOxide, 1L), + GT_Utility.getIntegratedCircuit(1), + Materials.Water.getFluid(1000), + MaterialsKevlar.Ethyleneglycol.getFluid(1000), + ItemList.Cell_Empty.get(1L), + 200, + 480); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 1L), + GT_Utility.getIntegratedCircuit(2), + MaterialsKevlar.EthyleneOxide.getGas(1000), + MaterialsKevlar.Ethyleneglycol.getFluid(1000), + ItemList.Cell_Empty.get(1L), + GT_Values.NI, + 200, + 480); + // C2H4 + O = C2H4O + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ethylene, 2L), + GT_Utility.getIntegratedCircuit(4), + Materials.Oxygen.getGas(1000), + MaterialsKevlar.Acetaldehyde.getGas(1000), + ItemList.Cell_Empty.get(2), + 200, + 120); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), + GT_Utility.getIntegratedCircuit(5), + Materials.Ethylene.getGas(2000), + MaterialsKevlar.Acetaldehyde.getGas(1000), + ItemList.Cell_Empty.get(1), + 200, + 120); + // NH3 + CH4O =SiO2,Al2O3= CH5N + H2O + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(10), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminiumoxide, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 1L) + }, + new FluidStack[] {Materials.Methanol.getFluid(1000), Materials.Ammonia.getGas(1000)}, + new FluidStack[] {MaterialsKevlar.Methylamine.getGas(1000L), Materials.Water.getFluid(1000L)}, + null, + 1500, + 500000); + // CaO + 3C = CaC2 + CO + GT_Values.RA.addBlastRecipe( + Materials.Quicklime.getDust(2), + Materials.Carbon.getDust(3), + GT_Values.NF, + Materials.CarbonMonoxide.getGas(1000), + MaterialsKevlar.CalciumCarbide.getDust(3), + GT_Values.NI, + 600, + 480, + 2573); + // Ni + 3Al = NiAl3 + GT_Values.RA.addBlastRecipe( + Materials.Nickel.getDust(1), + Materials.Aluminium.getDust(3), + GT_Values.NF, + GT_Values.NF, + MaterialsKevlar.NickelAluminide.getIngots(4), + GT_Values.NI, + 900, + 480, + 1688); + // NiAl3 + 2NaOH + 2H2O = NiAl + 2NaAlO2 + 6H + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.ingot, MaterialsKevlar.NickelAluminide, 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SodiumHydroxide, 6L), + Materials.Water.getFluid(2000), + Materials.Hydrogen.getGas(6000), + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.RaneyNickelActivated, 2L), + Materials.SodiumAluminate.getDust(8), + 1200, + 1920); + // Cu + O = CuO + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 1L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CupricOxide, 2L), + ItemList.Cell_Empty.get(1), + 100, + 30); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 1L), + GT_Utility.getIntegratedCircuit(1), + Materials.Oxygen.getGas(1000L), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CupricOxide, 2L), + 100, + 30); + // 2Bi + 3O = Bi2O3 + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bismuth, 4L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 6L), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.BismuthIIIOxide, 10L), + ItemList.Cell_Empty.get(6), + 200, + 120); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bismuth, 4L), + GT_Utility.getIntegratedCircuit(1), + Materials.Oxygen.getGas(6000L), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.BismuthIIIOxide, 10L), + 200, + 120); + + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(1), + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.KevlarCatalyst, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.Pentaerythritol, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.DiphenylmethaneDiisocyanate, 5L) + }, + new FluidStack[] { + MaterialsKevlar.Ethyleneglycol.getFluid(4000), MaterialsKevlar.SiliconOil.getFluid(1000) + }, + new FluidStack[] {MaterialsKevlar.PolyurethaneResin.getFluid(1000L)}, + null, + 200, + 500000); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(9), + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.KevlarCatalyst, 9L), + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.Pentaerythritol, 9L), + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.DiphenylmethaneDiisocyanate, 45L) + }, + new FluidStack[] { + MaterialsKevlar.Ethyleneglycol.getFluid(36000), MaterialsKevlar.SiliconOil.getFluid(9000) + }, + new FluidStack[] {MaterialsKevlar.PolyurethaneResin.getFluid(9000L)}, + null, + 1500, + 500000); + // C4H6O2 + CNH5 = C5H9NO + H2O + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.Methylamine, 1L), + GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.GammaButyrolactone, 1L), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.NMethylIIPyrrolidone, 1L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 1L), + 600, + 7680); + // 3NH3 + 6CH4O =Al2O3,SiO2= CH5N + C2H7N + C3H9N + 6H2O + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(3), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminiumoxide, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 1L) + }, + new FluidStack[] {Materials.Methanol.getFluid(6000), Materials.Ammonia.getGas(3000)}, + new FluidStack[] { + MaterialsKevlar.Methylamine.getGas(1000L), + Materials.Dimethylamine.getGas(1000L), + MaterialsKevlar.Trimethylamine.getGas(1000L), + Materials.Water.getFluid(6000L) + }, + null, + 400, + 1920); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(11), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminiumoxide, 9L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 9L) + }, + new FluidStack[] {Materials.Methanol.getFluid(54000), Materials.Ammonia.getGas(27000)}, + new FluidStack[] { + MaterialsKevlar.Methylamine.getGas(9000L), + Materials.Dimethylamine.getGas(9000L), + MaterialsKevlar.Trimethylamine.getGas(9000L), + Materials.Water.getFluid(54000L) + }, + null, + 3000, + 1920); + // S + 2Cl = SCl2 + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 8L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Chlorine, 16L), + GT_Values.NF, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.SulfurDichloride, 8L), + ItemList.Cell_Empty.get(16), + 800, + 30); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 8L), + ItemList.Cell_Empty.get(8L), + Materials.Chlorine.getGas(16000), + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.SulfurDichloride, 8L), + GT_Values.NI, + 800, + 30); + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 8L), + GT_Utility.getIntegratedCircuit(2), + Materials.Chlorine.getGas(16000), + MaterialsKevlar.SulfurDichloride.getFluid(8000), + GT_Values.NI, + GT_Values.NI, + 800, + 30); + // SCl2 + SO3 = SO2 + SOCl2 + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfurTrioxide, 1L), + GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.SulfurDichloride, 1L), + GT_Values.NF, + Materials.SulfurDioxide.getGas(1000L), + GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.ThionylChloride, 1L), + ItemList.Cell_Empty.get(1), + 150, + 480); + // 18SOCl2 + 5C10H10O4 + 6CO2 = 7C8H4Cl2O2 + 22HCl + 18SO2 + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(1)}, + new FluidStack[] { + MaterialsKevlar.ThionylChloride.getFluid(18000), + MaterialsKevlar.DimethylTerephthalate.getFluid(5000L), + Materials.CarbonDioxide.getGas(6000L) + }, + new FluidStack[] { + Materials.DilutedHydrochloricAcid.getFluid(22000L), Materials.SulfurDioxide.getGas(18000L) + }, + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.TerephthaloylChloride, 64L), + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.TerephthaloylChloride, 48L) + }, + 400, + 1920); + + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Spinneret.get(0L), + MaterialsKevlar.LiquidCrystalKevlar.getFluid(144L), + ItemList.KevlarFiber.get(8L), + 800, + 1920); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] {ItemList.KevlarFiber.get(8L), GT_Utility.getIntegratedCircuit(8)}, + GT_Values.NF, + ItemList.WovenKevlar.get(1L), + 300, + 1920); + GT_Values.RA.addChemicalBathRecipe( + ItemList.WovenKevlar.get(1L), + MaterialsKevlar.PolyurethaneResin.getFluid(1000), + GT_Values.NF, + MaterialsKevlar.Kevlar.getPlates(1), + GT_Values.NI, + GT_Values.NI, + null, + 1200, + 30); + // 2CH4O + C8H6O4 =H2SO4= C10H10O4 + 2H2O + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(1)}, + new FluidStack[] { + MaterialsKevlar.TerephthalicAcid.getFluid(1000L), + Materials.Methanol.getFluid(2000), + Materials.SulfuricAcid.getFluid(2000) + }, + new FluidStack[] { + MaterialsKevlar.DimethylTerephthalate.getFluid(1000L), Materials.DilutedSulfuricAcid.getFluid(2000) + }, + null, + 250, + 1920); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(9)}, + new FluidStack[] { + MaterialsKevlar.TerephthalicAcid.getFluid(9000L), + Materials.Methanol.getFluid(18000), + Materials.SulfuricAcid.getFluid(18000) + }, + new FluidStack[] { + MaterialsKevlar.DimethylTerephthalate.getFluid(9000L), Materials.DilutedSulfuricAcid.getFluid(18000) + }, + null, + 1750, + 1920); + // C8H10 + 6O =CoC22H14O4= C8H6O4 + 2H2O + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.IVDimethylbenzene, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, MaterialsKevlar.CobaltIINaphthenate, 1L), + Materials.Oxygen.getGas(6000L), + Materials.Water.getFluid(2000L), + GT_OreDictUnificator.get(OrePrefixes.cell, MaterialsKevlar.TerephthalicAcid, 1L), + 150, + 480); + + GT_Values.RA.addDistillationTowerRecipe( + Materials.CharcoalByproducts.getGas(1000), + new ItemStack[] {GT_Utility.getIntegratedCircuit(2)}, + new FluidStack[] { + Materials.WoodTar.getFluid(250), + Materials.WoodVinegar.getFluid(400), + Materials.WoodGas.getGas(250), + MaterialsKevlar.IIIDimethylbenzene.getFluid(100) + }, + Materials.Charcoal.getDustSmall(1), + 40, + 256); + GT_Values.RA.addDistillationTowerRecipe( + Materials.WoodTar.getFluid(1000), + new ItemStack[] {GT_Utility.getIntegratedCircuit(2)}, + new FluidStack[] { + Materials.Creosote.getFluid(250), + Materials.Phenol.getFluid(100), + Materials.Benzene.getFluid(400), + Materials.Toluene.getFluid(100), + MaterialsKevlar.IIIDimethylbenzene.getFluid(150) + }, + GT_Values.NI, + 40, + 256); + GT_Values.RA.addDistillationTowerRecipe( + Materials.CharcoalByproducts.getGas(1000), + new ItemStack[] {GT_Utility.getIntegratedCircuit(3)}, + new FluidStack[] { + Materials.WoodTar.getFluid(250), + Materials.WoodVinegar.getFluid(400), + Materials.WoodGas.getGas(250), + MaterialsKevlar.IVDimethylbenzene.getFluid(100) + }, + Materials.Charcoal.getDustSmall(1), + 40, + 256); + GT_Values.RA.addUniversalDistillationRecipewithCircuit( + Materials.WoodTar.getFluid(1000), + new ItemStack[] {GT_Utility.getIntegratedCircuit(3)}, + new FluidStack[] { + Materials.Creosote.getFluid(250), + Materials.Phenol.getFluid(100), + Materials.Benzene.getFluid(400), + Materials.Toluene.getFluid(100), + MaterialsKevlar.IVDimethylbenzene.getFluid(150) + }, + GT_Values.NI, + 40, + 256); + GT_Values.RA.addDistillationTowerRecipe( + Materials.CharcoalByproducts.getGas(1000), + new ItemStack[] {GT_Utility.getIntegratedCircuit(4)}, + new FluidStack[] { + Materials.WoodTar.getFluid(250), + Materials.WoodVinegar.getFluid(400), + Materials.WoodGas.getGas(250), + Materials.Dimethylbenzene.getFluid(20), + MaterialsKevlar.IIIDimethylbenzene.getFluid(60), + MaterialsKevlar.IVDimethylbenzene.getFluid(20) + }, + Materials.Charcoal.getDustSmall(1), + 40, + 256); + GT_Values.RA.addDistillationTowerRecipe( + Materials.WoodTar.getFluid(1000), + new ItemStack[] {GT_Utility.getIntegratedCircuit(4)}, + new FluidStack[] { + Materials.Creosote.getFluid(250), + Materials.Phenol.getFluid(100), + Materials.Benzene.getFluid(400), + Materials.Toluene.getFluid(100), + Materials.Dimethylbenzene.getFluid(30), + MaterialsKevlar.IIIDimethylbenzene.getFluid(90), + MaterialsKevlar.IVDimethylbenzene.getFluid(30) + }, + GT_Values.NI, + 40, + 256); + + GT_Values.RA.addDistilleryRecipe( + 6, Materials.WoodTar.getFluid(200), MaterialsKevlar.IIIDimethylbenzene.getFluid(30), 16, 64, false); + GT_Values.RA.addDistilleryRecipe( + 6, + Materials.CharcoalByproducts.getGas(200), + MaterialsKevlar.IIIDimethylbenzene.getFluid(20), + 100, + 64, + false); + GT_Values.RA.addDistilleryRecipe( + 7, Materials.WoodTar.getFluid(200), MaterialsKevlar.IVDimethylbenzene.getFluid(30), 16, 64, false); + GT_Values.RA.addDistilleryRecipe( + 7, + Materials.CharcoalByproducts.getGas(200), + MaterialsKevlar.IVDimethylbenzene.getFluid(20), + 100, + 64, + false); + // 2CH4 + C6H6 = C8H10 + 4H + GT_Values.RA.addChemicalRecipe( + Materials.Methane.getCells(2), + GT_Utility.getIntegratedCircuit(13), + Materials.Benzene.getFluid(1000), + Materials.Hydrogen.getGas(4000), + MaterialsKevlar.IIIDimethylbenzene.getCells(1), + Materials.Empty.getCells(1), + 4000, + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Benzene.getCells(1), + GT_Utility.getIntegratedCircuit(14), + Materials.Methane.getGas(2000), + Materials.Hydrogen.getGas(4000), + MaterialsKevlar.IIIDimethylbenzene.getCells(1), + 4000, + 120); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(2)}, + new FluidStack[] {Materials.Benzene.getFluid(1000), Materials.Methane.getGas(2000)}, + new FluidStack[] {MaterialsKevlar.IIIDimethylbenzene.getFluid(1000L), Materials.Hydrogen.getGas(4000)}, + null, + 4000, + 120); + // 2CH4 + C6H6 = C8H10 + 4H + GT_Values.RA.addChemicalRecipe( + Materials.Methane.getCells(2), + GT_Utility.getIntegratedCircuit(15), + Materials.Benzene.getFluid(1000), + Materials.Hydrogen.getGas(4000), + MaterialsKevlar.IVDimethylbenzene.getCells(1), + Materials.Empty.getCells(1), + 4000, + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Benzene.getCells(1), + GT_Utility.getIntegratedCircuit(16), + Materials.Methane.getGas(2000), + Materials.Hydrogen.getGas(4000), + MaterialsKevlar.IVDimethylbenzene.getCells(1), + 4000, + 120); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(3)}, + new FluidStack[] {Materials.Benzene.getFluid(1000), Materials.Methane.getGas(2000)}, + new FluidStack[] {MaterialsKevlar.IVDimethylbenzene.getFluid(1000L), Materials.Hydrogen.getGas(4000)}, + null, + 4000, + 120); + + GT_Values.RA.addChemicalRecipe( + MaterialsKevlar.CobaltIIHydroxide.getDust(5), + MaterialsKevlar.NaphthenicAcid.getCells(1), + GT_Values.NF, + GT_Values.NF, + MaterialsKevlar.CobaltIINaphthenate.getDust(1), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 1L), + 100, + 480); + GT_Values.RA.addChemicalRecipe( + MaterialsKevlar.CobaltIIHydroxide.getDust(5), + GT_Utility.getIntegratedCircuit(1), + MaterialsKevlar.NaphthenicAcid.getFluid(1000L), + GT_Values.NF, + MaterialsKevlar.CobaltIINaphthenate.getDust(1), + 100, + 480); + + GT_Values.RA.addChemicalRecipe( + MaterialsKevlar.CobaltIIAcetate.getDust(15), + MaterialsKevlar.NaphthenicAcid.getCells(1), + GT_Values.NF, + GT_Values.NF, + MaterialsKevlar.CobaltIINaphthenate.getDust(1), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 1L), + 100, + 480); + GT_Values.RA.addChemicalRecipe( + MaterialsKevlar.CobaltIIAcetate.getDust(15), + GT_Utility.getIntegratedCircuit(1), + MaterialsKevlar.NaphthenicAcid.getFluid(1000L), + GT_Values.NF, + MaterialsKevlar.CobaltIINaphthenate.getDust(1), + 100, + 480); + // Co + 2HNO3 = Co(NO3)2 + 2H + GT_Values.RA.addChemicalRecipe( + Materials.Cobalt.getDust(1), + Materials.NitricAcid.getCells(2), + Materials.Water.getFluid(6000L), + GT_Values.NF, + MaterialsKevlar.CobaltIINitrate.getDust(9), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2L), + 100, + 120); + // Co(NO3)2 + 2KOH = CoH2O2 + 2KNO3 + GT_Values.RA.addChemicalRecipe( + MaterialsKevlar.CobaltIINitrate.getDust(9), + GT_ModHandler.getModItem(MOD_ID_DC, "item.PotassiumHydroxideDust", 6L, 0), + GT_Values.NF, + GT_Values.NF, + MaterialsKevlar.CobaltIIHydroxide.getDust(5), + Materials.Saltpeter.getDust(10), + 100, + 120); + // CoO + 2C2H4O2 = CoC4H6O4 + 2H + GT_Values.RA.addChemicalRecipe( + Materials.CobaltOxide.getDust(2), + Materials.AceticAcid.getCells(2), + GT_Values.NF, + Materials.Hydrogen.getGas(2000L), + MaterialsKevlar.CobaltIIAcetate.getDust(15), + ItemList.Cell_Empty.get(2L), + 100, + 120); + + GT_Values.RA.addDistillationTowerRecipe( + Materials.OilLight.getFluid(1500), + new ItemStack[] {GT_Utility.getIntegratedCircuit(9)}, + new FluidStack[] { + Materials.SulfuricHeavyFuel.getFluid(100), + Materials.SulfuricLightFuel.getFluid(200), + Materials.SulfuricNaphtha.getFluid(300), + MaterialsKevlar.NaphthenicAcid.getFluid(25), + Materials.SulfuricGas.getGas(2400) + }, + null, + 32, + 480); + GT_Values.RA.addDistillationTowerRecipe( + Materials.OilMedium.getFluid(1000), + new ItemStack[] {GT_Utility.getIntegratedCircuit(9)}, + new FluidStack[] { + Materials.SulfuricHeavyFuel.getFluid(150), + Materials.SulfuricLightFuel.getFluid(500), + Materials.SulfuricNaphtha.getFluid(200), + MaterialsKevlar.NaphthenicAcid.getFluid(25), + Materials.SulfuricGas.getGas(600) + }, + null, + 32, + 480); + GT_Values.RA.addDistillationTowerRecipe( + Materials.Oil.getFluid(500L), + new ItemStack[] {GT_Utility.getIntegratedCircuit(9)}, + new FluidStack[] { + Materials.SulfuricHeavyFuel.getFluid(150), + Materials.SulfuricLightFuel.getFluid(500), + Materials.SulfuricNaphtha.getFluid(200), + MaterialsKevlar.NaphthenicAcid.getFluid(25), + Materials.SulfuricGas.getGas(600) + }, + null, + 32, + 480); + GT_Values.RA.addDistillationTowerRecipe( + Materials.OilHeavy.getFluid(1000), + new ItemStack[] {GT_Utility.getIntegratedCircuit(9)}, + new FluidStack[] { + Materials.SulfuricHeavyFuel.getFluid(2500), + Materials.SulfuricLightFuel.getFluid(450), + Materials.SulfuricNaphtha.getFluid(150), + MaterialsKevlar.NaphthenicAcid.getFluid(50), + Materials.SulfuricGas.getGas(600) + }, + null, + 100, + 480); + // P + 3Cl = PCl3 + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Phosphorus.getDust(1), + Materials.Chlorine.getCells(3), + GT_Values.NF, + MaterialsKevlar.PhosphorusTrichloride.getFluid(1000L), + ItemList.Cell_Empty.get(3L), + GT_Values.NI, + 200, + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Phosphorus.getDust(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Chlorine.getGas(3000L), + MaterialsKevlar.PhosphorusTrichloride.getFluid(1000L), + GT_Values.NI, + 200, + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Phosphorus.getDust(9), + GT_Utility.getIntegratedCircuit(9), + Materials.Chlorine.getGas(27000L), + MaterialsKevlar.PhosphorusTrichloride.getFluid(9000L), + GT_Values.NI, + 1500, + 120); + // PCl3 + 3C6H5Cl + 6Na = 6NaCl + C18H15P + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 6L) + }, + new FluidStack[] { + MaterialsKevlar.PhosphorusTrichloride.getFluid(1000L), Materials.Chlorobenzene.getFluid(3000) + }, + null, + new ItemStack[] {MaterialsKevlar.Triphenylphosphene.getDust(34), Materials.Salt.getDust(12)}, + 400, + 1920); + // Na + H = NaH + GT_Values.RA.addChemicalRecipe( + Materials.Sodium.getDust(1), + GT_Utility.getIntegratedCircuit(2), + Materials.Hydrogen.getGas(1000L), + GT_Values.NF, + MaterialsKevlar.SodiumHydride.getDust(2), + 200, + 120); + // 4NaH + C3H9BO3 = NaBH4 + 3CH3ONa + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(1), MaterialsKevlar.SodiumHydride.getDust(8)}, + new FluidStack[] {MaterialsKevlar.TrimethylBorate.getFluid(1000L)}, + null, + new ItemStack[] { + MaterialsKevlar.SodiumBorohydride.getDust(6), MaterialsKevlar.SodiumMethoxide.getDust(18) + }, + 600, + 1920); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(9), MaterialsKevlar.SodiumHydride.getDust(64)}, + new FluidStack[] {MaterialsKevlar.TrimethylBorate.getFluid(8000L)}, + null, + new ItemStack[] { + MaterialsKevlar.SodiumBorohydride.getDust(48), + MaterialsKevlar.SodiumMethoxide.getDust(64), + MaterialsKevlar.SodiumMethoxide.getDust(64), + MaterialsKevlar.SodiumMethoxide.getDust(16) + }, + 600, + 1920); + // CH3ONa + H2O = CH4O + NaOH + GT_Values.RA.addChemicalRecipe( + MaterialsKevlar.SodiumMethoxide.getDust(6), + GT_Utility.getIntegratedCircuit(1), + Materials.Water.getFluid(1000L), + Materials.Methanol.getFluid(1000L), + Materials.SodiumHydroxide.getDust(3), + 200, + 480); } - public void addProcess(ItemStack tCrop, Materials aMaterial, int chance, boolean aMainOutput) { - if(tCrop==null||aMaterial==null||GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial,1)==null)return; + if (tCrop == null || aMaterial == null || GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1) == null) + return; if (GT_Mod.gregtechproxy.mNerfedCrops) { - GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tCrop), GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1), Materials.Water.getFluid(1000), aMaterial.mOreByProducts.isEmpty() ? null : aMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), 96, 24); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(16, tCrop), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 1), 10000, (int) (aMaterial.getMass() * 128), 384); + GT_Values.RA.addChemicalRecipe( + GT_Utility.copyAmount(9, tCrop), + GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1), + Materials.Water.getFluid(1000), + aMaterial.mOreByProducts.isEmpty() + ? null + : aMaterial.mOreByProducts.get(0).getMolten(144), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), + 96, + 24); + GT_Values.RA.addAutoclaveRecipe( + GT_Utility.copyAmount(16, tCrop), + Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass() + 9) / 10))), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 1), + 10000, + (int) (aMaterial.getMass() * 128), + 384); } else { - if (aMainOutput) GT_Values.RA.addExtractorRecipe(GT_Utility.copyAmount(9, tCrop), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1),300,18); + if (aMainOutput) + GT_Values.RA.addExtractorRecipe( + GT_Utility.copyAmount(9, tCrop), + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1), + 300, + 18); } } - public void addProcess(ItemStack tCrop, Materials aMaterial, int chance){ - if(tCrop==null||aMaterial==null||GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial,1)==null)return; + public void addProcess(ItemStack tCrop, Materials aMaterial, int chance) { + if (tCrop == null || aMaterial == null || GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1) == null) + return; if (GT_Mod.gregtechproxy.mNerfedCrops) { - GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tCrop), GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1), Materials.Water.getFluid(1000), aMaterial.mOreByProducts.isEmpty() ? null : aMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), 96, 24); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(16, tCrop), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 1), 10000, (int) (aMaterial.getMass() * 128), 384); + GT_Values.RA.addChemicalRecipe( + GT_Utility.copyAmount(9, tCrop), + GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1), + Materials.Water.getFluid(1000), + aMaterial.mOreByProducts.isEmpty() + ? null + : aMaterial.mOreByProducts.get(0).getMolten(144), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), + 96, + 24); + GT_Values.RA.addAutoclaveRecipe( + GT_Utility.copyAmount(16, tCrop), + Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass() + 9) / 10))), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 1), + 10000, + (int) (aMaterial.getMass() * 128), + 384); } else { - GT_Values.RA.addExtractorRecipe(GT_Utility.copyAmount(16, tCrop), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1),300,18); + GT_Values.RA.addExtractorRecipe( + GT_Utility.copyAmount(16, tCrop), + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1), + 300, + 18); } } - public void addProcess(ItemStack tCrop, Materials aMaterial, Materials aMaterialOut, int chance, boolean aMainOutput){ - if(tCrop==null||aMaterial==null||GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial,1)==null)return; + public void addProcess( + ItemStack tCrop, Materials aMaterial, Materials aMaterialOut, int chance, boolean aMainOutput) { + if (tCrop == null || aMaterial == null || GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1) == null) + return; if (GT_Mod.gregtechproxy.mNerfedCrops) { - GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tCrop), GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1), Materials.Water.getFluid(1000), aMaterialOut.mOreByProducts.isEmpty() ? null : aMaterialOut.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterialOut, 4), 96, 24); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(16, tCrop), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 1), 10000, (int) (aMaterial.getMass() * 128), 384); + GT_Values.RA.addChemicalRecipe( + GT_Utility.copyAmount(9, tCrop), + GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1), + Materials.Water.getFluid(1000), + aMaterialOut.mOreByProducts.isEmpty() + ? null + : aMaterialOut.mOreByProducts.get(0).getMolten(144), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterialOut, 4), + 96, + 24); + GT_Values.RA.addAutoclaveRecipe( + GT_Utility.copyAmount(16, tCrop), + Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass() + 9) / 10))), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 1), + 10000, + (int) (aMaterial.getMass() * 128), + 384); } else { - if (aMainOutput) GT_Values.RA.addExtractorRecipe(GT_Utility.copyAmount(16, tCrop), GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1),300,18); + if (aMainOutput) + GT_Values.RA.addExtractorRecipe( + GT_Utility.copyAmount(16, tCrop), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1), + 300, + 18); } } - public void addProcess(ItemStack tCrop, Materials aMaterial, Materials aMaterialOut, int chance){ - if(tCrop==null||aMaterial==null||GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial,1)==null)return; + public void addProcess(ItemStack tCrop, Materials aMaterial, Materials aMaterialOut, int chance) { + if (tCrop == null || aMaterial == null || GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1) == null) + return; if (GT_Mod.gregtechproxy.mNerfedCrops) { - GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tCrop), GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1), Materials.Water.getFluid(1000), aMaterialOut.mOreByProducts.isEmpty() ? null : aMaterialOut.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterialOut, 4), 96, 24); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(16, tCrop), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 1), 10000, (int) (aMaterial.getMass() * 128), 384); + GT_Values.RA.addChemicalRecipe( + GT_Utility.copyAmount(9, tCrop), + GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1), + Materials.Water.getFluid(1000), + aMaterialOut.mOreByProducts.isEmpty() + ? null + : aMaterialOut.mOreByProducts.get(0).getMolten(144), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterialOut, 4), + 96, + 24); + GT_Values.RA.addAutoclaveRecipe( + GT_Utility.copyAmount(16, tCrop), + Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass() + 9) / 10))), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 1), + 10000, + (int) (aMaterial.getMass() * 128), + 384); } else { - GT_Values.RA.addExtractorRecipe(GT_Utility.copyAmount(16, tCrop), GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1),300,18); + GT_Values.RA.addExtractorRecipe( + GT_Utility.copyAmount(16, tCrop), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1), + 300, + 18); } } - public void run3(){ - //recipe len: - //LUV 6 72000 600 32k - //ZPM 9 144000 1200 125k - //UV- 12 288000 1800 500k - //UV+/UHV- 14 360000 2100 2000k - //UHV+ 16 576000 2400 4000k - - //addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput1, int aDuration, int aEUt); - - Fluid solderIndalloy = FluidRegistry.getFluid("molten.indalloy140") != null ? FluidRegistry.getFluid("molten.indalloy140") : FluidRegistry.getFluid("molten.solderingalloy"); - - //Motors - GT_Values.RA.addAssemblylineRecipe(ItemList.Electric_Motor_IV.get(1, new Object(){}),144000,new ItemStack[]{ - GT_OreDictUnificator.get(OrePrefixes.stick, Materials.SamariumMagnetic, 1L), - GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.HSSS, 2L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Osmiridium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Osmiridium, 64L), - GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.YttriumBariumCuprate, 2L)}, new FluidStack[]{ - new FluidStack(solderIndalloy, 144), - Materials.Lubricant.getFluid(250)}, ItemList.Electric_Motor_LuV.get(1), 600, 6000); - - GT_Values.RA.addAssemblylineRecipe(ItemList.Electric_Motor_LuV.get(1, new Object(){}),144000,new ItemStack[]{ - GT_OreDictUnificator.get(OrePrefixes.stick, Materials.SamariumMagnetic, 2L), - GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.NaquadahAlloy, 4L), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NaquadahAlloy, 4L), - GT_OreDictUnificator.get(OrePrefixes.round, Materials.NaquadahAlloy, 16L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Europium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Europium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Europium, 64L), - GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.VanadiumGallium, 2L)}, new FluidStack[]{ - new FluidStack(solderIndalloy, 288), - Materials.Lubricant.getFluid(750)}, ItemList.Electric_Motor_ZPM.get(1), 600, 24000); - - GT_Values.RA.addAssemblylineRecipe(ItemList.Electric_Motor_ZPM.get(1, new Object(){}),288000,new ItemStack[]{ - GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.SamariumMagnetic, 2L), - GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Neutronium, 4L), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Neutronium, 4L), - GT_OreDictUnificator.get(OrePrefixes.round, Materials.Neutronium, 16L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 64L), - GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.NaquadahAlloy, 2L)}, new FluidStack[]{ - Materials.Naquadria.getMolten(1296), - new FluidStack(solderIndalloy, 1296), - Materials.Lubricant.getFluid(2000)}, ItemList.Electric_Motor_UV.get(1), 600, 100000); - - //Pumps - GT_Values.RA.addAssemblylineRecipe(ItemList.Electric_Pump_IV.get(1, new Object(){}),144000,new Object[]{ - ItemList.Electric_Motor_LuV.get(1, new Object(){}), - GT_OreDictUnificator.get(OrePrefixes.pipeSmall, Materials.NiobiumTitanium, 2L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.HSSS, 2L), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.HSSS, 8L), - new Object[]{OrePrefixes.ring.get(Materials.AnySyntheticRubber), 4L}, - GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.HSSS, 2L), - GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.YttriumBariumCuprate, 2L)}, new FluidStack[]{ - new FluidStack(solderIndalloy, 144), - Materials.Lubricant.getFluid(250)}, ItemList.Electric_Pump_LuV.get(1), 600, 6000); - - GT_Values.RA.addAssemblylineRecipe(ItemList.Electric_Pump_LuV.get(1, new Object(){}),144000,new Object[]{ - ItemList.Electric_Motor_ZPM.get(1, new Object(){}), - GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Enderium, 2L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NaquadahAlloy, 2L), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.NaquadahAlloy, 8L), - new Object[]{OrePrefixes.ring.get(Materials.AnySyntheticRubber), 8L}, - GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.NaquadahAlloy, 2L), - GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.VanadiumGallium, 2L)}, new FluidStack[]{ - new FluidStack(solderIndalloy, 288), - Materials.Lubricant.getFluid(750)}, ItemList.Electric_Pump_ZPM.get(1), 600, 24000); - - GT_Values.RA.addAssemblylineRecipe(ItemList.Electric_Pump_ZPM.get(1, new Object(){}),288000,new Object[]{ - ItemList.Electric_Motor_UV.get(1, new Object(){}), - GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Naquadah, 2L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 2L), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Neutronium, 8L), - new Object[]{OrePrefixes.ring.get(Materials.AnySyntheticRubber), 16L}, - GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Neutronium, 2L), - GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.NaquadahAlloy, 2L)}, new FluidStack[]{ - Materials.Naquadria.getMolten(1296), - new FluidStack(solderIndalloy, 1296), - Materials.Lubricant.getFluid(2000)}, ItemList.Electric_Pump_UV.get(1), 600, 100000); - - //Conveyors - GT_Values.RA.addAssemblylineRecipe(ItemList.Conveyor_Module_IV.get(1, new Object(){}),144000,new Object[]{ - ItemList.Electric_Motor_LuV.get(2, new Object(){}), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.HSSS, 2L), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.HSSS, 4L), - GT_OreDictUnificator.get(OrePrefixes.round, Materials.HSSS, 32L), - GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.YttriumBariumCuprate, 2L), - new Object[]{OrePrefixes.plate.get(Materials.AnySyntheticRubber), 10L},}, new FluidStack[]{ - new FluidStack(solderIndalloy, 144), - Materials.Lubricant.getFluid(250)},ItemList.Conveyor_Module_LuV.get(1), 600, 6000); - - GT_Values.RA.addAssemblylineRecipe(ItemList.Conveyor_Module_LuV.get(1, new Object(){}),144000,new Object[]{ - ItemList.Electric_Motor_ZPM.get(2, new Object(){}), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NaquadahAlloy, 2L), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NaquadahAlloy, 4L), - GT_OreDictUnificator.get(OrePrefixes.round, Materials.NaquadahAlloy, 32L), - GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.VanadiumGallium, 2L), - new Object[]{OrePrefixes.plate.get(Materials.AnySyntheticRubber), 20L},}, new FluidStack[]{ - new FluidStack(solderIndalloy, 288), - Materials.Lubricant.getFluid(750)}, ItemList.Conveyor_Module_ZPM.get(1), 600, 24000); - - GT_Values.RA.addAssemblylineRecipe(ItemList.Conveyor_Module_ZPM.get(1, new Object(){}),288000,new Object[]{ - ItemList.Electric_Motor_UV.get(2, new Object(){}), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 2L), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Neutronium, 4L), - GT_OreDictUnificator.get(OrePrefixes.round, Materials.Neutronium, 32L), - GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.NaquadahAlloy, 2L), - new Object[]{OrePrefixes.plate.get(Materials.AnySyntheticRubber), 40L}}, new FluidStack[]{ - Materials.Naquadria.getMolten(1296), - new FluidStack(solderIndalloy, 1296), - Materials.Lubricant.getFluid(2000)}, ItemList.Conveyor_Module_UV.get(1), 600, 100000); - - //Pistons - GT_Values.RA.addAssemblylineRecipe(ItemList.Electric_Piston_IV.get(1, new Object(){}),144000,new ItemStack[]{ - ItemList.Electric_Motor_LuV.get(1, new Object(){}), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.HSSS, 6L), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.HSSS, 4L), - GT_OreDictUnificator.get(OrePrefixes.round, Materials.HSSS, 32L), - GT_OreDictUnificator.get(OrePrefixes.stick, Materials.HSSS, 4L), - GT_OreDictUnificator.get(OrePrefixes.gear, Materials.HSSS, 1L), - GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.HSSS, 2L), - GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.YttriumBariumCuprate, 4L)}, new FluidStack[]{ - new FluidStack(solderIndalloy, 144), - Materials.Lubricant.getFluid(250)}, ItemList.Electric_Piston_LuV.get(1), 600, 6000); - - - GT_Values.RA.addAssemblylineRecipe(ItemList.Electric_Piston_LuV.get(1, new Object(){}),144000,new ItemStack[]{ - ItemList.Electric_Motor_ZPM.get(1, new Object(){}), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NaquadahAlloy, 6L), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NaquadahAlloy, 4L), - GT_OreDictUnificator.get(OrePrefixes.round, Materials.NaquadahAlloy, 32L), - GT_OreDictUnificator.get(OrePrefixes.stick, Materials.NaquadahAlloy, 4L), - GT_OreDictUnificator.get(OrePrefixes.gear, Materials.NaquadahAlloy, 1L), - GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.NaquadahAlloy, 2L), - GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.VanadiumGallium, 4L)}, new FluidStack[]{ - new FluidStack(solderIndalloy, 288), - Materials.Lubricant.getFluid(750)}, ItemList.Electric_Piston_ZPM.get(1), 600, 24000); - - GT_Values.RA.addAssemblylineRecipe(ItemList.Electric_Piston_ZPM.get(1, new Object(){}),288000,new ItemStack[]{ - ItemList.Electric_Motor_UV.get(1, new Object(){}), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 6L), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Neutronium, 4L), - GT_OreDictUnificator.get(OrePrefixes.round, Materials.Neutronium, 32L), - GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Neutronium, 4L), - GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Neutronium, 1L), - GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Neutronium, 2L), - GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.NaquadahAlloy, 4L)}, new FluidStack[]{ - Materials.Naquadria.getMolten(1296), - new FluidStack(solderIndalloy, 1296), - Materials.Lubricant.getFluid(2000)}, ItemList.Electric_Piston_UV.get(1), 600, 100000); - - //RobotArms - GT_Values.RA.addAssemblylineRecipe(ItemList.Robot_Arm_IV.get(1, new Object(){}),144000,new Object[]{ - GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.HSSS, 4L), - GT_OreDictUnificator.get(OrePrefixes.gear, Materials.HSSS, 1L), - GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.HSSS, 3L), - ItemList.Electric_Motor_LuV.get(2, new Object(){}), - ItemList.Electric_Piston_LuV.get(1, new Object(){}), - new Object[]{OrePrefixes.circuit.get(Materials.Master), 2}, - new Object[]{OrePrefixes.circuit.get(Materials.Elite), 4}, - new Object[]{OrePrefixes.circuit.get(Materials.Data), 8}, - GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.YttriumBariumCuprate, 6L)}, new FluidStack[]{ - new FluidStack(solderIndalloy, 576), - Materials.Lubricant.getFluid(250)}, ItemList.Robot_Arm_LuV.get(1), 600, 6000); - - GT_Values.RA.addAssemblylineRecipe(ItemList.Robot_Arm_LuV.get(1, new Object(){}),144000,new Object[]{ - GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.NaquadahAlloy, 4L), - GT_OreDictUnificator.get(OrePrefixes.gear, Materials.NaquadahAlloy, 1L), - GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.NaquadahAlloy, 3L), - ItemList.Electric_Motor_ZPM.get(2, new Object(){}), - ItemList.Electric_Piston_ZPM.get(1, new Object(){}), - new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), 2}, - new Object[]{OrePrefixes.circuit.get(Materials.Master), 4}, - new Object[]{OrePrefixes.circuit.get(Materials.Elite), 8}, - GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.VanadiumGallium, 6L)}, new FluidStack[]{ - new FluidStack(solderIndalloy, 1152), - Materials.Lubricant.getFluid(750)}, ItemList.Robot_Arm_ZPM.get(1), 600, 24000); - - GT_Values.RA.addAssemblylineRecipe(ItemList.Robot_Arm_ZPM.get(1, new Object(){}),288000,new Object[]{ - GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Neutronium, 4L), - GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Neutronium, 1L), - GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Neutronium, 3L), - ItemList.Electric_Motor_UV.get(2, new Object(){}), - ItemList.Electric_Piston_UV.get(1, new Object(){}), - new Object[]{OrePrefixes.circuit.get(Materials.Superconductor), 2}, - new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), 4}, - new Object[]{OrePrefixes.circuit.get(Materials.Master), 8}, - GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.NaquadahAlloy, 6L)}, new FluidStack[]{ - Materials.Naquadria.getMolten(1296), - new FluidStack(solderIndalloy, 2304), - Materials.Lubricant.getFluid(2000)}, ItemList.Robot_Arm_UV.get(1), 600, 100000); - - //Emitters - GT_Values.RA.addAssemblylineRecipe(ItemList.Emitter_IV.get(1, new Object(){}),144000,new Object[]{ - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.HSSS, 1L), - ItemList.Electric_Motor_LuV.get(1, new Object(){}), - GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Osmiridium, 8L), - ItemList.QuantumStar.get(1, new Object(){}), - new Object[]{OrePrefixes.circuit.get(Materials.Master), 4}, - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gallium, 64L), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gallium, 64L), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gallium, 64L), - GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.YttriumBariumCuprate, 7L)}, new FluidStack[]{ - new FluidStack(solderIndalloy, 576)}, - ItemList.Emitter_LuV.get(1), 600, 6000); - - GT_Values.RA.addAssemblylineRecipe(ItemList.Emitter_LuV.get(1, new Object(){}),144000,new Object[]{ - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.NaquadahAlloy, 1L), - ItemList.Electric_Motor_ZPM.get(1, new Object(){}), - GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Osmiridium, 8L), - ItemList.QuantumStar.get(2, new Object(){}), - new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), 4}, - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Trinium, 64L), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Trinium, 64L), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Trinium, 64L), - GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.VanadiumGallium, 7L)}, new FluidStack[]{ - new FluidStack(solderIndalloy, 1152)}, - ItemList.Emitter_ZPM.get(1), 600, 24000); - - GT_Values.RA.addAssemblylineRecipe(ItemList.Emitter_ZPM.get(1, new Object(){}),288000,new Object[]{ - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 1L), - ItemList.Electric_Motor_UV.get(1, new Object(){}), - GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Neutronium, 8L), - ItemList.Gravistar.get(4, new Object(){}), - new Object[]{OrePrefixes.circuit.get(Materials.Superconductor), 4}, - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Naquadria, 64L), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Naquadria, 64L), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Naquadria, 64L), - GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.NaquadahAlloy, 7L)}, new FluidStack[]{ - Materials.Naquadria.getMolten(1296), - new FluidStack(solderIndalloy, 2304)}, - ItemList.Emitter_UV.get(1), 600, 100000); - - //Sensors - GT_Values.RA.addAssemblylineRecipe(ItemList.Sensor_IV.get(1, new Object(){}),144000,new Object[]{ - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.HSSS, 1L), - ItemList.Electric_Motor_LuV.get(1, new Object(){}), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmiridium, 8L), - ItemList.QuantumStar.get(1, new Object(){}), - new Object[]{OrePrefixes.circuit.get(Materials.Master), 4}, - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gallium, 64L), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gallium, 64L), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gallium, 64L), - GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.YttriumBariumCuprate, 7L)}, new FluidStack[]{ - new FluidStack(solderIndalloy, 576)}, - ItemList.Sensor_LuV.get(1), 600, 6000); - - GT_Values.RA.addAssemblylineRecipe(ItemList.Sensor_LuV.get(1, new Object(){}),144000,new Object[]{ - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.NaquadahAlloy, 1L), - ItemList.Electric_Motor_ZPM.get(1, new Object(){}), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmiridium, 8L), - ItemList.QuantumStar.get(2, new Object(){}), - new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), 4}, - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Trinium, 64L), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Trinium, 64L), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Trinium, 64L), - GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.VanadiumGallium, 7L)}, new FluidStack[]{ - new FluidStack(solderIndalloy, 1152)}, - ItemList.Sensor_ZPM.get(1), 600, 24000); - - GT_Values.RA.addAssemblylineRecipe(ItemList.Sensor_ZPM.get(1, new Object(){}),288000,new Object[]{ - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 1L), - ItemList.Electric_Motor_UV.get(1, new Object(){}), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 8L), - ItemList.Gravistar.get(4, new Object(){}), - new Object[]{OrePrefixes.circuit.get(Materials.Superconductor), 4}, - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Naquadria, 64L), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Naquadria, 64L), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Naquadria, 64L), - GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.NaquadahAlloy, 7L)}, new FluidStack[]{ - Materials.Naquadria.getMolten(1296), - new FluidStack(solderIndalloy, 2304)}, - ItemList.Sensor_UV.get(1), 600, 100000); - - //Field Generators - GT_Values.RA.addAssemblylineRecipe(ItemList.Field_Generator_IV.get(1, new Object(){}),144000,new Object[]{ - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.HSSS, 1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.HSSS, 6L), - ItemList.QuantumStar.get(2, new Object(){}), - ItemList.Emitter_LuV.get(4, new Object(){}), - new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), 4}, - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Osmiridium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Osmiridium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Osmiridium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Osmiridium, 64L), - GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.YttriumBariumCuprate, 8L)}, new FluidStack[]{ - new FluidStack(solderIndalloy, 576)}, - ItemList.Field_Generator_LuV.get(1), 600, 6000); - - GT_Values.RA.addAssemblylineRecipe(ItemList.Field_Generator_LuV.get(1, new Object(){}),144000,new Object[]{ - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.NaquadahAlloy, 1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NaquadahAlloy, 6L), - ItemList.QuantumStar.get(2, new Object(){}), - ItemList.Emitter_ZPM.get(4, new Object(){}), - new Object[]{OrePrefixes.circuit.get(Materials.Superconductor), 4}, - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Europium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Europium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Europium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Europium, 64L), - GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.VanadiumGallium, 8L)}, new FluidStack[]{ - new FluidStack(solderIndalloy, 1152)}, - ItemList.Field_Generator_ZPM.get(1), 600, 24000); - - GT_Values.RA.addAssemblylineRecipe(ItemList.Field_Generator_ZPM.get(1, new Object(){}),288000,new Object[]{ - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 6L), - ItemList.Gravistar.get(2, new Object(){}), - ItemList.Emitter_UV.get(4, new Object(){}), - new Object[]{OrePrefixes.circuit.get(Materials.Infinite), 4}, - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 64L), - GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.NaquadahAlloy, 8L)}, - new FluidStack[]{ - Materials.Naquadria.getMolten(1296), - new FluidStack(solderIndalloy, 2304)}, - ItemList.Field_Generator_UV.get(1), 600, 100000); - - //Energy Hatches Luv-UV - GT_Values.RA.addAssemblylineRecipe(ItemList.Hatch_Energy_IV.get(1, new Object(){}),72000,new Object[]{ - ItemList.Hull_LuV.get(1L, new Object(){}), - GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorLuV, 2L), - ItemList.Circuit_Chip_UHPIC.get(2L, new Object(){}), - new Object[]{OrePrefixes.circuit.get(Materials.Master), 2}, - ItemList.LuV_Coil.get(2L, new Object(){}), - new ItemStack[]{ItemList.Reactor_Coolant_He_3.get(1, new Object(){}), ItemList.Reactor_Coolant_NaK_3.get(1, new Object(){}), ItemList.Reactor_Coolant_Sp_1.get(1, new Object(){})}, - new ItemStack[]{ItemList.Reactor_Coolant_He_3.get(1, new Object(){}), ItemList.Reactor_Coolant_NaK_3.get(1, new Object(){}), ItemList.Reactor_Coolant_Sp_1.get(1, new Object(){})}, - ItemList.Electric_Pump_LuV.get(1L, new Object(){})}, - new FluidStack[]{ - new FluidStack(FluidRegistry.getFluid("ic2coolant"), 2000), - new FluidStack(solderIndalloy, 720)}, - ItemList.Hatch_Energy_LuV.get(1), 400, 30720); - - - GT_Values.RA.addAssemblylineRecipe(ItemList.Hatch_Energy_LuV.get(1, new Object(){}),144000,new Object[]{ - ItemList.Hull_ZPM.get(1L, new Object(){}), - GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorZPM, 2L), - ItemList.Circuit_Chip_NPIC.get(2L, new Object(){}), - new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), 2}, - ItemList.ZPM_Coil.get(2L, new Object(){}), - new ItemStack[]{ItemList.Reactor_Coolant_He_6.get(1, new Object(){}), ItemList.Reactor_Coolant_NaK_6.get(1, new Object(){}), ItemList.Reactor_Coolant_Sp_2.get(1, new Object(){})}, - new ItemStack[]{ItemList.Reactor_Coolant_He_6.get(1, new Object(){}), ItemList.Reactor_Coolant_NaK_6.get(1, new Object(){}), ItemList.Reactor_Coolant_Sp_2.get(1, new Object(){})}, - ItemList.Electric_Pump_ZPM.get(1L, new Object(){})}, - new FluidStack[]{ - new FluidStack(FluidRegistry.getFluid("ic2coolant"), 4000), - new FluidStack(solderIndalloy, 1440)}, - ItemList.Hatch_Energy_ZPM.get(1), 600, 122880); - - GT_Values.RA.addAssemblylineRecipe(ItemList.Hatch_Energy_ZPM.get(1, new Object(){}),288000,new Object[]{ - ItemList.Hull_UV.get(1L, new Object(){}), - GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorUV, 2L), - ItemList.Circuit_Chip_PPIC.get(2L, new Object(){}), - new Object[]{OrePrefixes.circuit.get(Materials.Superconductor), 2}, - ItemList.UV_Coil.get(2L, new Object(){}), - new ItemStack[]{ItemList.Reactor_Coolant_He_6.get(1, new Object(){}), ItemList.Reactor_Coolant_NaK_6.get(1, new Object(){}), ItemList.Reactor_Coolant_Sp_2.get(1, new Object(){})}, - new ItemStack[]{ItemList.Reactor_Coolant_He_6.get(1, new Object(){}), ItemList.Reactor_Coolant_NaK_6.get(1, new Object(){}), ItemList.Reactor_Coolant_Sp_2.get(1, new Object(){})}, - new ItemStack[]{ItemList.Reactor_Coolant_He_6.get(1, new Object(){}), ItemList.Reactor_Coolant_NaK_6.get(1, new Object(){}), ItemList.Reactor_Coolant_Sp_2.get(1, new Object(){})}, - new ItemStack[]{ItemList.Reactor_Coolant_He_6.get(1, new Object(){}), ItemList.Reactor_Coolant_NaK_6.get(1, new Object(){}), ItemList.Reactor_Coolant_Sp_2.get(1, new Object(){})}, - ItemList.Electric_Pump_UV.get(1L, new Object(){})}, - new FluidStack[]{ - new FluidStack(FluidRegistry.getFluid("ic2coolant"), 8000), - new FluidStack(solderIndalloy, 2880)}, - ItemList.Hatch_Energy_UV.get(1), 800, 500000); - - //Dynamo Hatches Luv-UV - GT_Values.RA.addAssemblylineRecipe(ItemList.Hatch_Dynamo_IV.get(1, new Object(){}),72000,new Object[]{ - ItemList.Hull_LuV.get(1L, new Object(){}), - GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid, 2L), - ItemList.Circuit_Chip_UHPIC.get(2L, new Object(){}), - new Object[]{OrePrefixes.circuit.get(Materials.Master), 2}, - ItemList.LuV_Coil.get(2L, new Object(){}), - new ItemStack[]{ItemList.Reactor_Coolant_He_3.get(1, new Object(){}), ItemList.Reactor_Coolant_NaK_3.get(1, new Object(){}), ItemList.Reactor_Coolant_Sp_1.get(1, new Object(){})}, - new ItemStack[]{ItemList.Reactor_Coolant_He_3.get(1, new Object(){}), ItemList.Reactor_Coolant_NaK_3.get(1, new Object(){}), ItemList.Reactor_Coolant_Sp_1.get(1, new Object(){})}, - ItemList.Electric_Pump_LuV.get(1L, new Object(){})}, - new FluidStack[]{ - new FluidStack(FluidRegistry.getFluid("ic2coolant"), 2000), - new FluidStack(solderIndalloy, 720)}, - ItemList.Hatch_Dynamo_LuV.get(1), 400, 30720); - - - GT_Values.RA.addAssemblylineRecipe(ItemList.Hatch_Dynamo_LuV.get(1, new Object(){}),144000,new Object[]{ - ItemList.Hull_ZPM.get(1L, new Object(){}), - GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Tetranaquadahdiindiumhexaplatiumosminid, 4L), - ItemList.Circuit_Chip_NPIC.get(2L, new Object(){}), - new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), 2}, - ItemList.ZPM_Coil.get(2L, new Object(){}), - new ItemStack[]{ItemList.Reactor_Coolant_He_6.get(1, new Object(){}), ItemList.Reactor_Coolant_NaK_6.get(1, new Object(){}), ItemList.Reactor_Coolant_Sp_2.get(1, new Object(){})}, - new ItemStack[]{ItemList.Reactor_Coolant_He_6.get(1, new Object(){}), ItemList.Reactor_Coolant_NaK_6.get(1, new Object(){}), ItemList.Reactor_Coolant_Sp_2.get(1, new Object(){})}, - ItemList.Electric_Pump_ZPM.get(1L, new Object(){})}, - new FluidStack[]{ - new FluidStack(FluidRegistry.getFluid("ic2coolant"), 4000), - new FluidStack(solderIndalloy, 1440)}, - ItemList.Hatch_Dynamo_ZPM.get(1), 600, 122880); - - GT_Values.RA.addAssemblylineRecipe(ItemList.Hatch_Dynamo_ZPM.get(1, new Object(){}),288000,new Object[]{ - ItemList.Hull_UV.get(1L, new Object(){}), - GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Longasssuperconductornameforuvwire, 4L), - ItemList.Circuit_Chip_PPIC.get(2L, new Object(){}), - new Object[]{OrePrefixes.circuit.get(Materials.Superconductor), 2}, - ItemList.UV_Coil.get(2L, new Object(){}), - new ItemStack[]{ItemList.Reactor_Coolant_He_6.get(1, new Object(){}), ItemList.Reactor_Coolant_NaK_6.get(1, new Object(){}), ItemList.Reactor_Coolant_Sp_2.get(1, new Object(){})}, - new ItemStack[]{ItemList.Reactor_Coolant_He_6.get(1, new Object(){}), ItemList.Reactor_Coolant_NaK_6.get(1, new Object(){}), ItemList.Reactor_Coolant_Sp_2.get(1, new Object(){})}, - new ItemStack[]{ItemList.Reactor_Coolant_He_6.get(1, new Object(){}), ItemList.Reactor_Coolant_NaK_6.get(1, new Object(){}), ItemList.Reactor_Coolant_Sp_2.get(1, new Object(){})}, - new ItemStack[]{ItemList.Reactor_Coolant_He_6.get(1, new Object(){}), ItemList.Reactor_Coolant_NaK_6.get(1, new Object(){}), ItemList.Reactor_Coolant_Sp_2.get(1, new Object(){})}, - ItemList.Electric_Pump_UV.get(1L, new Object(){})}, - new FluidStack[]{ - new FluidStack(FluidRegistry.getFluid("ic2coolant"), 8000), - new FluidStack(solderIndalloy, 2880)}, - ItemList.Hatch_Dynamo_UV.get(1), 800, 500000); - - GT_Values.RA.addAssemblylineRecipe(ItemList.Energy_LapotronicOrb2.get(1), 288000, new Object[]{ - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Europium, 16L), - new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), 1}, - new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), 1}, - new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), 1}, - new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), 1}, - ItemList.Energy_LapotronicOrb2.get(8L), - ItemList.Field_Generator_LuV.get(2), - ItemList.Circuit_Wafer_SoC2.get(64), - ItemList.Circuit_Wafer_SoC2.get(64), - ItemList.Circuit_Parts_DiodeASMD.get(8), - GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Naquadah, 32)}, - new FluidStack[]{ - new FluidStack(solderIndalloy, 2880), new FluidStack(FluidRegistry.getFluid("ic2coolant"), 16000)}, - ItemList.Energy_Module.get(1), 2000, 100000); - - GT_Values.RA.addAssemblylineRecipe(ItemList.Energy_Module.get(1), 288000, new Object[]{ - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Americium, 32L), - new Object[]{OrePrefixes.circuit.get(Materials.Superconductor), 1}, - new Object[]{OrePrefixes.circuit.get(Materials.Superconductor), 1}, - new Object[]{OrePrefixes.circuit.get(Materials.Superconductor), 1}, - new Object[]{OrePrefixes.circuit.get(Materials.Superconductor), 1}, - ItemList.Energy_Module.get(8L), - ItemList.Field_Generator_ZPM.get(2), - ItemList.Circuit_Wafer_HPIC.get(64), - ItemList.Circuit_Wafer_HPIC.get(64), - ItemList.Circuit_Parts_DiodeASMD.get(16), - GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.NaquadahAlloy, 32),}, - new FluidStack[]{ - new FluidStack(solderIndalloy, 2880), - new FluidStack(FluidRegistry.getFluid("ic2coolant"), 16000)}, - ItemList.Energy_Cluster.get(1), 2000, 200000); - - GT_Values.RA.addAssemblylineRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorLuV, 1), 144000, new Object[]{ - ItemList.Casing_Fusion_Coil.get(1), - new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), 1}, - new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), 1}, - new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), 1}, - new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), 1}, - GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.NaquadahAlloy, 4L), - GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Osmiridium, 4L), - ItemList.Field_Generator_LuV.get(2), - ItemList.Circuit_Wafer_UHPIC.get(32), - GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorLuV, 32), - }, new FluidStack[]{ - new FluidStack(solderIndalloy, 2880), - Materials.VanadiumGallium.getMolten(1152L), - }, ItemList.FusionComputer_LuV.get(1), 1000, 30000); - - GT_Values.RA.addAssemblylineRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Europium, 1), 288000, new Object[]{ - ItemList.Casing_Fusion_Coil.get(1), - new Object[]{OrePrefixes.circuit.get(Materials.Superconductor), 1}, - new Object[]{OrePrefixes.circuit.get(Materials.Superconductor), 1}, - new Object[]{OrePrefixes.circuit.get(Materials.Superconductor), 1}, - new Object[]{OrePrefixes.circuit.get(Materials.Superconductor), 1}, - GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Europium, 4L), - ItemList.Field_Generator_ZPM.get(2), - ItemList.Circuit_Wafer_PPIC.get(48), - GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorZPM, 32), - }, new FluidStack[]{ - new FluidStack(solderIndalloy, 2880), - Materials.NiobiumTitanium.getMolten(1152L), - }, ItemList.FusionComputer_ZPMV.get(1), 1000, 60000); - - GT_Values.RA.addAssemblylineRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Americium, 1), 432000, new Object[]{ - ItemList.Casing_Fusion_Coil.get(1), - new Object[]{OrePrefixes.circuit.get(Materials.Infinite), 1}, - new Object[]{OrePrefixes.circuit.get(Materials.Infinite), 1}, - new Object[]{OrePrefixes.circuit.get(Materials.Infinite), 1}, - new Object[]{OrePrefixes.circuit.get(Materials.Infinite), 1}, - GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Americium, 4L), - ItemList.Field_Generator_UV.get(2), - ItemList.Circuit_Wafer_QPIC.get(64), - GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.SuperconductorUV, 32), - }, new FluidStack[]{ - new FluidStack(solderIndalloy, 2880), - Materials.ElectrumFlux.getMolten(1152L), - }, ItemList.FusionComputer_UV.get(1), 1000, 90000); - - GT_Values.RA.addAssemblylineRecipe(ItemList.Machine_IV_OreWasher.get(1), 432000, new Object[]{ - ItemList.Hull_MAX.get(1L), - ItemList.Electric_Motor_UHV.get(32L), - ItemList.Electric_Piston_UHV.get(8L), - ItemList.Electric_Pump_UHV.get(16L), - ItemList.Conveyor_Module_UHV.get(8L), - ItemList.Robot_Arm_UHV.get(8L), - new Object[]{OrePrefixes.circuit.get(Materials.Bio), 4}, - new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Duranium, 32), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 32)}, - GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Polybenzimidazole, 64), - new ItemStack[]{ItemList.Component_Grinder_Tungsten.get(4L), ItemList.Component_Grinder_Diamond.get(64L)}, - GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.StainlessSteel, 32), - GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Chrome, 16) - }, new FluidStack[] { - new FluidStack(solderIndalloy, 2880), - Materials.Naquadria.getMolten(1440) - }, ItemList.Ore_Processor.get(1), 1200, 900000); - + public void run3() { + // recipe len: + // LUV 6 72000 600 32k + // ZPM 9 144000 1200 125k + // UV- 12 288000 1800 500k + // UV+/UHV- 14 360000 2100 2000k + // UHV+ 16 576000 2400 4000k + + // addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, ItemStack[] aInputs, FluidStack[] + // aFluidInputs, ItemStack aOutput1, int aDuration, int aEUt); + + Fluid solderIndalloy = FluidRegistry.getFluid("molten.indalloy140") != null + ? FluidRegistry.getFluid("molten.indalloy140") + : FluidRegistry.getFluid("molten.solderingalloy"); + + // Motors + GT_Values.RA.addAssemblylineRecipe( + ItemList.Electric_Motor_IV.get(1, new Object() {}), + 144000, + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.SamariumMagnetic, 1L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.HSSS, 2L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Osmiridium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Osmiridium, 64L), + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.YttriumBariumCuprate, 2L) + }, + new FluidStack[] {new FluidStack(solderIndalloy, 144), Materials.Lubricant.getFluid(250)}, + ItemList.Electric_Motor_LuV.get(1), + 600, + 6000); + + GT_Values.RA.addAssemblylineRecipe( + ItemList.Electric_Motor_LuV.get(1, new Object() {}), + 144000, + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.SamariumMagnetic, 2L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.NaquadahAlloy, 4L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NaquadahAlloy, 4L), + GT_OreDictUnificator.get(OrePrefixes.round, Materials.NaquadahAlloy, 16L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Europium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Europium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Europium, 64L), + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.VanadiumGallium, 2L) + }, + new FluidStack[] {new FluidStack(solderIndalloy, 288), Materials.Lubricant.getFluid(750)}, + ItemList.Electric_Motor_ZPM.get(1), + 600, + 24000); + + GT_Values.RA.addAssemblylineRecipe( + ItemList.Electric_Motor_ZPM.get(1, new Object() {}), + 288000, + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.SamariumMagnetic, 2L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Neutronium, 4L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Neutronium, 4L), + GT_OreDictUnificator.get(OrePrefixes.round, Materials.Neutronium, 16L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 64L), + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.NaquadahAlloy, 2L) + }, + new FluidStack[] { + Materials.Naquadria.getMolten(1296), + new FluidStack(solderIndalloy, 1296), + Materials.Lubricant.getFluid(2000) + }, + ItemList.Electric_Motor_UV.get(1), + 600, + 100000); + + // Pumps + GT_Values.RA.addAssemblylineRecipe( + ItemList.Electric_Pump_IV.get(1, new Object() {}), + 144000, + new Object[] { + ItemList.Electric_Motor_LuV.get(1, new Object() {}), + GT_OreDictUnificator.get(OrePrefixes.pipeSmall, Materials.NiobiumTitanium, 2L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.HSSS, 2L), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.HSSS, 8L), + new Object[] {OrePrefixes.ring.get(Materials.AnySyntheticRubber), 4L}, + GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.HSSS, 2L), + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.YttriumBariumCuprate, 2L) + }, + new FluidStack[] {new FluidStack(solderIndalloy, 144), Materials.Lubricant.getFluid(250)}, + ItemList.Electric_Pump_LuV.get(1), + 600, + 6000); + + GT_Values.RA.addAssemblylineRecipe( + ItemList.Electric_Pump_LuV.get(1, new Object() {}), + 144000, + new Object[] { + ItemList.Electric_Motor_ZPM.get(1, new Object() {}), + GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Enderium, 2L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NaquadahAlloy, 2L), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.NaquadahAlloy, 8L), + new Object[] {OrePrefixes.ring.get(Materials.AnySyntheticRubber), 8L}, + GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.NaquadahAlloy, 2L), + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.VanadiumGallium, 2L) + }, + new FluidStack[] {new FluidStack(solderIndalloy, 288), Materials.Lubricant.getFluid(750)}, + ItemList.Electric_Pump_ZPM.get(1), + 600, + 24000); + + GT_Values.RA.addAssemblylineRecipe( + ItemList.Electric_Pump_ZPM.get(1, new Object() {}), + 288000, + new Object[] { + ItemList.Electric_Motor_UV.get(1, new Object() {}), + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Naquadah, 2L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 2L), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Neutronium, 8L), + new Object[] {OrePrefixes.ring.get(Materials.AnySyntheticRubber), 16L}, + GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Neutronium, 2L), + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.NaquadahAlloy, 2L) + }, + new FluidStack[] { + Materials.Naquadria.getMolten(1296), + new FluidStack(solderIndalloy, 1296), + Materials.Lubricant.getFluid(2000) + }, + ItemList.Electric_Pump_UV.get(1), + 600, + 100000); + + // Conveyors + GT_Values.RA.addAssemblylineRecipe( + ItemList.Conveyor_Module_IV.get(1, new Object() {}), + 144000, + new Object[] { + ItemList.Electric_Motor_LuV.get(2, new Object() {}), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.HSSS, 2L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.HSSS, 4L), + GT_OreDictUnificator.get(OrePrefixes.round, Materials.HSSS, 32L), + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.YttriumBariumCuprate, 2L), + new Object[] {OrePrefixes.plate.get(Materials.AnySyntheticRubber), 10L}, + }, + new FluidStack[] {new FluidStack(solderIndalloy, 144), Materials.Lubricant.getFluid(250)}, + ItemList.Conveyor_Module_LuV.get(1), + 600, + 6000); + + GT_Values.RA.addAssemblylineRecipe( + ItemList.Conveyor_Module_LuV.get(1, new Object() {}), + 144000, + new Object[] { + ItemList.Electric_Motor_ZPM.get(2, new Object() {}), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NaquadahAlloy, 2L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NaquadahAlloy, 4L), + GT_OreDictUnificator.get(OrePrefixes.round, Materials.NaquadahAlloy, 32L), + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.VanadiumGallium, 2L), + new Object[] {OrePrefixes.plate.get(Materials.AnySyntheticRubber), 20L}, + }, + new FluidStack[] {new FluidStack(solderIndalloy, 288), Materials.Lubricant.getFluid(750)}, + ItemList.Conveyor_Module_ZPM.get(1), + 600, + 24000); + + GT_Values.RA.addAssemblylineRecipe( + ItemList.Conveyor_Module_ZPM.get(1, new Object() {}), + 288000, + new Object[] { + ItemList.Electric_Motor_UV.get(2, new Object() {}), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 2L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Neutronium, 4L), + GT_OreDictUnificator.get(OrePrefixes.round, Materials.Neutronium, 32L), + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.NaquadahAlloy, 2L), + new Object[] {OrePrefixes.plate.get(Materials.AnySyntheticRubber), 40L} + }, + new FluidStack[] { + Materials.Naquadria.getMolten(1296), + new FluidStack(solderIndalloy, 1296), + Materials.Lubricant.getFluid(2000) + }, + ItemList.Conveyor_Module_UV.get(1), + 600, + 100000); + + // Pistons + GT_Values.RA.addAssemblylineRecipe( + ItemList.Electric_Piston_IV.get(1, new Object() {}), + 144000, + new ItemStack[] { + ItemList.Electric_Motor_LuV.get(1, new Object() {}), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.HSSS, 6L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.HSSS, 4L), + GT_OreDictUnificator.get(OrePrefixes.round, Materials.HSSS, 32L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.HSSS, 4L), + GT_OreDictUnificator.get(OrePrefixes.gear, Materials.HSSS, 1L), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.HSSS, 2L), + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.YttriumBariumCuprate, 4L) + }, + new FluidStack[] {new FluidStack(solderIndalloy, 144), Materials.Lubricant.getFluid(250)}, + ItemList.Electric_Piston_LuV.get(1), + 600, + 6000); + + GT_Values.RA.addAssemblylineRecipe( + ItemList.Electric_Piston_LuV.get(1, new Object() {}), + 144000, + new ItemStack[] { + ItemList.Electric_Motor_ZPM.get(1, new Object() {}), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NaquadahAlloy, 6L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NaquadahAlloy, 4L), + GT_OreDictUnificator.get(OrePrefixes.round, Materials.NaquadahAlloy, 32L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.NaquadahAlloy, 4L), + GT_OreDictUnificator.get(OrePrefixes.gear, Materials.NaquadahAlloy, 1L), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.NaquadahAlloy, 2L), + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.VanadiumGallium, 4L) + }, + new FluidStack[] {new FluidStack(solderIndalloy, 288), Materials.Lubricant.getFluid(750)}, + ItemList.Electric_Piston_ZPM.get(1), + 600, + 24000); + + GT_Values.RA.addAssemblylineRecipe( + ItemList.Electric_Piston_ZPM.get(1, new Object() {}), + 288000, + new ItemStack[] { + ItemList.Electric_Motor_UV.get(1, new Object() {}), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 6L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Neutronium, 4L), + GT_OreDictUnificator.get(OrePrefixes.round, Materials.Neutronium, 32L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Neutronium, 4L), + GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Neutronium, 1L), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Neutronium, 2L), + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.NaquadahAlloy, 4L) + }, + new FluidStack[] { + Materials.Naquadria.getMolten(1296), + new FluidStack(solderIndalloy, 1296), + Materials.Lubricant.getFluid(2000) + }, + ItemList.Electric_Piston_UV.get(1), + 600, + 100000); + + // RobotArms + GT_Values.RA.addAssemblylineRecipe( + ItemList.Robot_Arm_IV.get(1, new Object() {}), + 144000, + new Object[] { + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.HSSS, 4L), + GT_OreDictUnificator.get(OrePrefixes.gear, Materials.HSSS, 1L), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.HSSS, 3L), + ItemList.Electric_Motor_LuV.get(2, new Object() {}), + ItemList.Electric_Piston_LuV.get(1, new Object() {}), + new Object[] {OrePrefixes.circuit.get(Materials.Master), 2}, + new Object[] {OrePrefixes.circuit.get(Materials.Elite), 4}, + new Object[] {OrePrefixes.circuit.get(Materials.Data), 8}, + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.YttriumBariumCuprate, 6L) + }, + new FluidStack[] {new FluidStack(solderIndalloy, 576), Materials.Lubricant.getFluid(250)}, + ItemList.Robot_Arm_LuV.get(1), + 600, + 6000); + + GT_Values.RA.addAssemblylineRecipe( + ItemList.Robot_Arm_LuV.get(1, new Object() {}), + 144000, + new Object[] { + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.NaquadahAlloy, 4L), + GT_OreDictUnificator.get(OrePrefixes.gear, Materials.NaquadahAlloy, 1L), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.NaquadahAlloy, 3L), + ItemList.Electric_Motor_ZPM.get(2, new Object() {}), + ItemList.Electric_Piston_ZPM.get(1, new Object() {}), + new Object[] {OrePrefixes.circuit.get(Materials.Ultimate), 2}, + new Object[] {OrePrefixes.circuit.get(Materials.Master), 4}, + new Object[] {OrePrefixes.circuit.get(Materials.Elite), 8}, + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.VanadiumGallium, 6L) + }, + new FluidStack[] {new FluidStack(solderIndalloy, 1152), Materials.Lubricant.getFluid(750)}, + ItemList.Robot_Arm_ZPM.get(1), + 600, + 24000); + + GT_Values.RA.addAssemblylineRecipe( + ItemList.Robot_Arm_ZPM.get(1, new Object() {}), + 288000, + new Object[] { + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Neutronium, 4L), + GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Neutronium, 1L), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Neutronium, 3L), + ItemList.Electric_Motor_UV.get(2, new Object() {}), + ItemList.Electric_Piston_UV.get(1, new Object() {}), + new Object[] {OrePrefixes.circuit.get(Materials.Superconductor), 2}, + new Object[] {OrePrefixes.circuit.get(Materials.Ultimate), 4}, + new Object[] {OrePrefixes.circuit.get(Materials.Master), 8}, + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.NaquadahAlloy, 6L) + }, + new FluidStack[] { + Materials.Naquadria.getMolten(1296), + new FluidStack(solderIndalloy, 2304), + Materials.Lubricant.getFluid(2000) + }, + ItemList.Robot_Arm_UV.get(1), + 600, + 100000); + + // Emitters + GT_Values.RA.addAssemblylineRecipe( + ItemList.Emitter_IV.get(1, new Object() {}), + 144000, + new Object[] { + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.HSSS, 1L), + ItemList.Electric_Motor_LuV.get(1, new Object() {}), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Osmiridium, 8L), + ItemList.QuantumStar.get(1, new Object() {}), + new Object[] {OrePrefixes.circuit.get(Materials.Master), 4}, + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gallium, 64L), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gallium, 64L), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gallium, 64L), + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.YttriumBariumCuprate, 7L) + }, + new FluidStack[] {new FluidStack(solderIndalloy, 576)}, + ItemList.Emitter_LuV.get(1), + 600, + 6000); + + GT_Values.RA.addAssemblylineRecipe( + ItemList.Emitter_LuV.get(1, new Object() {}), + 144000, + new Object[] { + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.NaquadahAlloy, 1L), + ItemList.Electric_Motor_ZPM.get(1, new Object() {}), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Osmiridium, 8L), + ItemList.QuantumStar.get(2, new Object() {}), + new Object[] {OrePrefixes.circuit.get(Materials.Ultimate), 4}, + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Trinium, 64L), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Trinium, 64L), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Trinium, 64L), + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.VanadiumGallium, 7L) + }, + new FluidStack[] {new FluidStack(solderIndalloy, 1152)}, + ItemList.Emitter_ZPM.get(1), + 600, + 24000); + + GT_Values.RA.addAssemblylineRecipe( + ItemList.Emitter_ZPM.get(1, new Object() {}), + 288000, + new Object[] { + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 1L), + ItemList.Electric_Motor_UV.get(1, new Object() {}), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Neutronium, 8L), + ItemList.Gravistar.get(4, new Object() {}), + new Object[] {OrePrefixes.circuit.get(Materials.Superconductor), 4}, + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Naquadria, 64L), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Naquadria, 64L), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Naquadria, 64L), + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.NaquadahAlloy, 7L) + }, + new FluidStack[] {Materials.Naquadria.getMolten(1296), new FluidStack(solderIndalloy, 2304)}, + ItemList.Emitter_UV.get(1), + 600, + 100000); + + // Sensors + GT_Values.RA.addAssemblylineRecipe( + ItemList.Sensor_IV.get(1, new Object() {}), + 144000, + new Object[] { + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.HSSS, 1L), + ItemList.Electric_Motor_LuV.get(1, new Object() {}), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmiridium, 8L), + ItemList.QuantumStar.get(1, new Object() {}), + new Object[] {OrePrefixes.circuit.get(Materials.Master), 4}, + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gallium, 64L), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gallium, 64L), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gallium, 64L), + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.YttriumBariumCuprate, 7L) + }, + new FluidStack[] {new FluidStack(solderIndalloy, 576)}, + ItemList.Sensor_LuV.get(1), + 600, + 6000); + + GT_Values.RA.addAssemblylineRecipe( + ItemList.Sensor_LuV.get(1, new Object() {}), + 144000, + new Object[] { + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.NaquadahAlloy, 1L), + ItemList.Electric_Motor_ZPM.get(1, new Object() {}), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmiridium, 8L), + ItemList.QuantumStar.get(2, new Object() {}), + new Object[] {OrePrefixes.circuit.get(Materials.Ultimate), 4}, + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Trinium, 64L), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Trinium, 64L), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Trinium, 64L), + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.VanadiumGallium, 7L) + }, + new FluidStack[] {new FluidStack(solderIndalloy, 1152)}, + ItemList.Sensor_ZPM.get(1), + 600, + 24000); + + GT_Values.RA.addAssemblylineRecipe( + ItemList.Sensor_ZPM.get(1, new Object() {}), + 288000, + new Object[] { + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 1L), + ItemList.Electric_Motor_UV.get(1, new Object() {}), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 8L), + ItemList.Gravistar.get(4, new Object() {}), + new Object[] {OrePrefixes.circuit.get(Materials.Superconductor), 4}, + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Naquadria, 64L), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Naquadria, 64L), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Naquadria, 64L), + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.NaquadahAlloy, 7L) + }, + new FluidStack[] {Materials.Naquadria.getMolten(1296), new FluidStack(solderIndalloy, 2304)}, + ItemList.Sensor_UV.get(1), + 600, + 100000); + + // Field Generators + GT_Values.RA.addAssemblylineRecipe( + ItemList.Field_Generator_IV.get(1, new Object() {}), + 144000, + new Object[] { + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.HSSS, 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.HSSS, 6L), + ItemList.QuantumStar.get(2, new Object() {}), + ItemList.Emitter_LuV.get(4, new Object() {}), + new Object[] {OrePrefixes.circuit.get(Materials.Ultimate), 4}, + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Osmiridium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Osmiridium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Osmiridium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Osmiridium, 64L), + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.YttriumBariumCuprate, 8L) + }, + new FluidStack[] {new FluidStack(solderIndalloy, 576)}, + ItemList.Field_Generator_LuV.get(1), + 600, + 6000); + + GT_Values.RA.addAssemblylineRecipe( + ItemList.Field_Generator_LuV.get(1, new Object() {}), + 144000, + new Object[] { + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.NaquadahAlloy, 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NaquadahAlloy, 6L), + ItemList.QuantumStar.get(2, new Object() {}), + ItemList.Emitter_ZPM.get(4, new Object() {}), + new Object[] {OrePrefixes.circuit.get(Materials.Superconductor), 4}, + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Europium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Europium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Europium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Europium, 64L), + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.VanadiumGallium, 8L) + }, + new FluidStack[] {new FluidStack(solderIndalloy, 1152)}, + ItemList.Field_Generator_ZPM.get(1), + 600, + 24000); + + GT_Values.RA.addAssemblylineRecipe( + ItemList.Field_Generator_ZPM.get(1, new Object() {}), + 288000, + new Object[] { + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 6L), + ItemList.Gravistar.get(2, new Object() {}), + ItemList.Emitter_UV.get(4, new Object() {}), + new Object[] {OrePrefixes.circuit.get(Materials.Infinite), 4}, + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Americium, 64L), + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.NaquadahAlloy, 8L) + }, + new FluidStack[] {Materials.Naquadria.getMolten(1296), new FluidStack(solderIndalloy, 2304)}, + ItemList.Field_Generator_UV.get(1), + 600, + 100000); + + // Energy Hatches Luv-UV + GT_Values.RA.addAssemblylineRecipe( + ItemList.Hatch_Energy_IV.get(1, new Object() {}), + 72000, + new Object[] { + ItemList.Hull_LuV.get(1L, new Object() {}), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorLuV, 2L), + ItemList.Circuit_Chip_UHPIC.get(2L, new Object() {}), + new Object[] {OrePrefixes.circuit.get(Materials.Master), 2}, + ItemList.LuV_Coil.get(2L, new Object() {}), + new ItemStack[] { + ItemList.Reactor_Coolant_He_3.get(1, new Object() {}), + ItemList.Reactor_Coolant_NaK_3.get(1, new Object() {}), + ItemList.Reactor_Coolant_Sp_1.get(1, new Object() {}) + }, + new ItemStack[] { + ItemList.Reactor_Coolant_He_3.get(1, new Object() {}), + ItemList.Reactor_Coolant_NaK_3.get(1, new Object() {}), + ItemList.Reactor_Coolant_Sp_1.get(1, new Object() {}) + }, + ItemList.Electric_Pump_LuV.get(1L, new Object() {}) + }, + new FluidStack[] { + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 2000), new FluidStack(solderIndalloy, 720) + }, + ItemList.Hatch_Energy_LuV.get(1), + 400, + 30720); + + GT_Values.RA.addAssemblylineRecipe( + ItemList.Hatch_Energy_LuV.get(1, new Object() {}), + 144000, + new Object[] { + ItemList.Hull_ZPM.get(1L, new Object() {}), + GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorZPM, 2L), + ItemList.Circuit_Chip_NPIC.get(2L, new Object() {}), + new Object[] {OrePrefixes.circuit.get(Materials.Ultimate), 2}, + ItemList.ZPM_Coil.get(2L, new Object() {}), + new ItemStack[] { + ItemList.Reactor_Coolant_He_6.get(1, new Object() {}), + ItemList.Reactor_Coolant_NaK_6.get(1, new Object() {}), + ItemList.Reactor_Coolant_Sp_2.get(1, new Object() {}) + }, + new ItemStack[] { + ItemList.Reactor_Coolant_He_6.get(1, new Object() {}), + ItemList.Reactor_Coolant_NaK_6.get(1, new Object() {}), + ItemList.Reactor_Coolant_Sp_2.get(1, new Object() {}) + }, + ItemList.Electric_Pump_ZPM.get(1L, new Object() {}) + }, + new FluidStack[] { + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 4000), new FluidStack(solderIndalloy, 1440) + }, + ItemList.Hatch_Energy_ZPM.get(1), + 600, + 122880); + + GT_Values.RA.addAssemblylineRecipe( + ItemList.Hatch_Energy_ZPM.get(1, new Object() {}), + 288000, + new Object[] { + ItemList.Hull_UV.get(1L, new Object() {}), + GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorUV, 2L), + ItemList.Circuit_Chip_PPIC.get(2L, new Object() {}), + new Object[] {OrePrefixes.circuit.get(Materials.Superconductor), 2}, + ItemList.UV_Coil.get(2L, new Object() {}), + new ItemStack[] { + ItemList.Reactor_Coolant_He_6.get(1, new Object() {}), + ItemList.Reactor_Coolant_NaK_6.get(1, new Object() {}), + ItemList.Reactor_Coolant_Sp_2.get(1, new Object() {}) + }, + new ItemStack[] { + ItemList.Reactor_Coolant_He_6.get(1, new Object() {}), + ItemList.Reactor_Coolant_NaK_6.get(1, new Object() {}), + ItemList.Reactor_Coolant_Sp_2.get(1, new Object() {}) + }, + new ItemStack[] { + ItemList.Reactor_Coolant_He_6.get(1, new Object() {}), + ItemList.Reactor_Coolant_NaK_6.get(1, new Object() {}), + ItemList.Reactor_Coolant_Sp_2.get(1, new Object() {}) + }, + new ItemStack[] { + ItemList.Reactor_Coolant_He_6.get(1, new Object() {}), + ItemList.Reactor_Coolant_NaK_6.get(1, new Object() {}), + ItemList.Reactor_Coolant_Sp_2.get(1, new Object() {}) + }, + ItemList.Electric_Pump_UV.get(1L, new Object() {}) + }, + new FluidStack[] { + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 8000), new FluidStack(solderIndalloy, 2880) + }, + ItemList.Hatch_Energy_UV.get(1), + 800, + 500000); + + // Dynamo Hatches Luv-UV + GT_Values.RA.addAssemblylineRecipe( + ItemList.Hatch_Dynamo_IV.get(1, new Object() {}), + 72000, + new Object[] { + ItemList.Hull_LuV.get(1L, new Object() {}), + GT_OreDictUnificator.get( + OrePrefixes.spring, + Materials.Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid, + 2L), + ItemList.Circuit_Chip_UHPIC.get(2L, new Object() {}), + new Object[] {OrePrefixes.circuit.get(Materials.Master), 2}, + ItemList.LuV_Coil.get(2L, new Object() {}), + new ItemStack[] { + ItemList.Reactor_Coolant_He_3.get(1, new Object() {}), + ItemList.Reactor_Coolant_NaK_3.get(1, new Object() {}), + ItemList.Reactor_Coolant_Sp_1.get(1, new Object() {}) + }, + new ItemStack[] { + ItemList.Reactor_Coolant_He_3.get(1, new Object() {}), + ItemList.Reactor_Coolant_NaK_3.get(1, new Object() {}), + ItemList.Reactor_Coolant_Sp_1.get(1, new Object() {}) + }, + ItemList.Electric_Pump_LuV.get(1L, new Object() {}) + }, + new FluidStack[] { + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 2000), new FluidStack(solderIndalloy, 720) + }, + ItemList.Hatch_Dynamo_LuV.get(1), + 400, + 30720); + + GT_Values.RA.addAssemblylineRecipe( + ItemList.Hatch_Dynamo_LuV.get(1, new Object() {}), + 144000, + new Object[] { + ItemList.Hull_ZPM.get(1L, new Object() {}), + GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Tetranaquadahdiindiumhexaplatiumosminid, 4L), + ItemList.Circuit_Chip_NPIC.get(2L, new Object() {}), + new Object[] {OrePrefixes.circuit.get(Materials.Ultimate), 2}, + ItemList.ZPM_Coil.get(2L, new Object() {}), + new ItemStack[] { + ItemList.Reactor_Coolant_He_6.get(1, new Object() {}), + ItemList.Reactor_Coolant_NaK_6.get(1, new Object() {}), + ItemList.Reactor_Coolant_Sp_2.get(1, new Object() {}) + }, + new ItemStack[] { + ItemList.Reactor_Coolant_He_6.get(1, new Object() {}), + ItemList.Reactor_Coolant_NaK_6.get(1, new Object() {}), + ItemList.Reactor_Coolant_Sp_2.get(1, new Object() {}) + }, + ItemList.Electric_Pump_ZPM.get(1L, new Object() {}) + }, + new FluidStack[] { + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 4000), new FluidStack(solderIndalloy, 1440) + }, + ItemList.Hatch_Dynamo_ZPM.get(1), + 600, + 122880); + + GT_Values.RA.addAssemblylineRecipe( + ItemList.Hatch_Dynamo_ZPM.get(1, new Object() {}), + 288000, + new Object[] { + ItemList.Hull_UV.get(1L, new Object() {}), + GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Longasssuperconductornameforuvwire, 4L), + ItemList.Circuit_Chip_PPIC.get(2L, new Object() {}), + new Object[] {OrePrefixes.circuit.get(Materials.Superconductor), 2}, + ItemList.UV_Coil.get(2L, new Object() {}), + new ItemStack[] { + ItemList.Reactor_Coolant_He_6.get(1, new Object() {}), + ItemList.Reactor_Coolant_NaK_6.get(1, new Object() {}), + ItemList.Reactor_Coolant_Sp_2.get(1, new Object() {}) + }, + new ItemStack[] { + ItemList.Reactor_Coolant_He_6.get(1, new Object() {}), + ItemList.Reactor_Coolant_NaK_6.get(1, new Object() {}), + ItemList.Reactor_Coolant_Sp_2.get(1, new Object() {}) + }, + new ItemStack[] { + ItemList.Reactor_Coolant_He_6.get(1, new Object() {}), + ItemList.Reactor_Coolant_NaK_6.get(1, new Object() {}), + ItemList.Reactor_Coolant_Sp_2.get(1, new Object() {}) + }, + new ItemStack[] { + ItemList.Reactor_Coolant_He_6.get(1, new Object() {}), + ItemList.Reactor_Coolant_NaK_6.get(1, new Object() {}), + ItemList.Reactor_Coolant_Sp_2.get(1, new Object() {}) + }, + ItemList.Electric_Pump_UV.get(1L, new Object() {}) + }, + new FluidStack[] { + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 8000), new FluidStack(solderIndalloy, 2880) + }, + ItemList.Hatch_Dynamo_UV.get(1), + 800, + 500000); + + GT_Values.RA.addAssemblylineRecipe( + ItemList.Energy_LapotronicOrb2.get(1), + 288000, + new Object[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Europium, 16L), + new Object[] {OrePrefixes.circuit.get(Materials.Ultimate), 1}, + new Object[] {OrePrefixes.circuit.get(Materials.Ultimate), 1}, + new Object[] {OrePrefixes.circuit.get(Materials.Ultimate), 1}, + new Object[] {OrePrefixes.circuit.get(Materials.Ultimate), 1}, + ItemList.Energy_LapotronicOrb2.get(8L), + ItemList.Field_Generator_LuV.get(2), + ItemList.Circuit_Wafer_SoC2.get(64), + ItemList.Circuit_Wafer_SoC2.get(64), + ItemList.Circuit_Parts_DiodeASMD.get(8), + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Naquadah, 32) + }, + new FluidStack[] { + new FluidStack(solderIndalloy, 2880), new FluidStack(FluidRegistry.getFluid("ic2coolant"), 16000) + }, + ItemList.Energy_Module.get(1), + 2000, + 100000); + + GT_Values.RA.addAssemblylineRecipe( + ItemList.Energy_Module.get(1), + 288000, + new Object[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Americium, 32L), + new Object[] {OrePrefixes.circuit.get(Materials.Superconductor), 1}, + new Object[] {OrePrefixes.circuit.get(Materials.Superconductor), 1}, + new Object[] {OrePrefixes.circuit.get(Materials.Superconductor), 1}, + new Object[] {OrePrefixes.circuit.get(Materials.Superconductor), 1}, + ItemList.Energy_Module.get(8L), + ItemList.Field_Generator_ZPM.get(2), + ItemList.Circuit_Wafer_HPIC.get(64), + ItemList.Circuit_Wafer_HPIC.get(64), + ItemList.Circuit_Parts_DiodeASMD.get(16), + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.NaquadahAlloy, 32), + }, + new FluidStack[] { + new FluidStack(solderIndalloy, 2880), new FluidStack(FluidRegistry.getFluid("ic2coolant"), 16000) + }, + ItemList.Energy_Cluster.get(1), + 2000, + 200000); + + GT_Values.RA.addAssemblylineRecipe( + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorLuV, 1), + 144000, + new Object[] { + ItemList.Casing_Fusion_Coil.get(1), + new Object[] {OrePrefixes.circuit.get(Materials.Ultimate), 1}, + new Object[] {OrePrefixes.circuit.get(Materials.Ultimate), 1}, + new Object[] {OrePrefixes.circuit.get(Materials.Ultimate), 1}, + new Object[] {OrePrefixes.circuit.get(Materials.Ultimate), 1}, + GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.NaquadahAlloy, 4L), + GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Osmiridium, 4L), + ItemList.Field_Generator_LuV.get(2), + ItemList.Circuit_Wafer_UHPIC.get(32), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorLuV, 32), + }, + new FluidStack[] { + new FluidStack(solderIndalloy, 2880), Materials.VanadiumGallium.getMolten(1152L), + }, + ItemList.FusionComputer_LuV.get(1), + 1000, + 30000); + + GT_Values.RA.addAssemblylineRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Europium, 1), + 288000, + new Object[] { + ItemList.Casing_Fusion_Coil.get(1), + new Object[] {OrePrefixes.circuit.get(Materials.Superconductor), 1}, + new Object[] {OrePrefixes.circuit.get(Materials.Superconductor), 1}, + new Object[] {OrePrefixes.circuit.get(Materials.Superconductor), 1}, + new Object[] {OrePrefixes.circuit.get(Materials.Superconductor), 1}, + GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Europium, 4L), + ItemList.Field_Generator_ZPM.get(2), + ItemList.Circuit_Wafer_PPIC.get(48), + GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorZPM, 32), + }, + new FluidStack[] { + new FluidStack(solderIndalloy, 2880), Materials.NiobiumTitanium.getMolten(1152L), + }, + ItemList.FusionComputer_ZPMV.get(1), + 1000, + 60000); + + GT_Values.RA.addAssemblylineRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Americium, 1), + 432000, + new Object[] { + ItemList.Casing_Fusion_Coil.get(1), + new Object[] {OrePrefixes.circuit.get(Materials.Infinite), 1}, + new Object[] {OrePrefixes.circuit.get(Materials.Infinite), 1}, + new Object[] {OrePrefixes.circuit.get(Materials.Infinite), 1}, + new Object[] {OrePrefixes.circuit.get(Materials.Infinite), 1}, + GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Americium, 4L), + ItemList.Field_Generator_UV.get(2), + ItemList.Circuit_Wafer_QPIC.get(64), + GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.SuperconductorUV, 32), + }, + new FluidStack[] { + new FluidStack(solderIndalloy, 2880), Materials.ElectrumFlux.getMolten(1152L), + }, + ItemList.FusionComputer_UV.get(1), + 1000, + 90000); + + GT_Values.RA.addAssemblylineRecipe( + ItemList.Machine_IV_OreWasher.get(1), + 432000, + new Object[] { + ItemList.Hull_MAX.get(1L), + ItemList.Electric_Motor_UHV.get(32L), + ItemList.Electric_Piston_UHV.get(8L), + ItemList.Electric_Pump_UHV.get(16L), + ItemList.Conveyor_Module_UHV.get(8L), + ItemList.Robot_Arm_UHV.get(8L), + new Object[] {OrePrefixes.circuit.get(Materials.Bio), 4}, + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Duranium, 32), + GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 32) + }, + GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Polybenzimidazole, 64), + new ItemStack[] { + ItemList.Component_Grinder_Tungsten.get(4L), ItemList.Component_Grinder_Diamond.get(64L) + }, + GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.StainlessSteel, 32), + GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Chrome, 16) + }, + new FluidStack[] {new FluidStack(solderIndalloy, 2880), Materials.Naquadria.getMolten(1440)}, + ItemList.Ore_Processor.get(1), + 1200, + 900000); if (GregTech_API.sThaumcraftCompat != null) { String tKey = "GT_WOOD_TO_CHARCOAL"; - GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, "You have discovered a way of making charcoal magically instead of using regular ovens for this purpose.<BR><BR>To create charcoal from wood you first need an air-free environment, some vacuus essentia is needed for that, then you need to incinerate the wood using ignis essentia and wait until all the water inside the wood is burned away.<BR><BR>This method however doesn't create creosote oil as byproduct."); - - GregTech_API.sThaumcraftCompat.addResearch(tKey, "Charcoal Transmutation", "Turning wood into charcoal", new String[]{"ALUMENTUM"}, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Charcoal, 1L), 2, 0, 13, 5, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 10L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 8L)), null, new Object[]{GT_MachineRecipeLoader.aTextTCGTPage + tKey, - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, OrePrefixes.log.get(Materials.Wood), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Charcoal, 1L), Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L)))}); + GT_LanguageManager.addStringLocalization( + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + "You have discovered a way of making charcoal magically instead of using regular ovens for this purpose.<BR><BR>To create charcoal from wood you first need an air-free environment, some vacuus essentia is needed for that, then you need to incinerate the wood using ignis essentia and wait until all the water inside the wood is burned away.<BR><BR>This method however doesn't create creosote oil as byproduct."); + + GregTech_API.sThaumcraftCompat.addResearch( + tKey, + "Charcoal Transmutation", + "Turning wood into charcoal", + new String[] {"ALUMENTUM"}, + "ALCHEMY", + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Charcoal, 1L), + 2, + 0, + 13, + 5, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 10L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 8L)), + null, + new Object[] { + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + OrePrefixes.log.get(Materials.Wood), + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Charcoal, 1L), + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))) + }); tKey = "GT_FILL_WATER_BUCKET"; - GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, "You have discovered a way of filling a bucket with aqua essentia in order to simply get water."); - GregTech_API.sThaumcraftCompat.addResearch(tKey, "Water Transmutation", "Filling buckets with water", null, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Water, 1L), 2, 0, 16, 5, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L)), null, new Object[]{GT_MachineRecipeLoader.aTextTCGTPage + tKey, - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Empty, 1L), GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Water, 1L), Collections.singletonList(new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L))), - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, GT_OreDictUnificator.get(OrePrefixes.bucketClay, Materials.Empty, 1L), GT_OreDictUnificator.get(OrePrefixes.bucketClay, Materials.Water, 1L), Collections.singletonList(new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L))), - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, GT_OreDictUnificator.get(OrePrefixes.capsule, Materials.Empty, 1L), GT_OreDictUnificator.get(OrePrefixes.capsule, Materials.Water, 1L), Collections.singletonList(new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L))), - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 1L), Collections.singletonList(new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L)))}); + GT_LanguageManager.addStringLocalization( + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + "You have discovered a way of filling a bucket with aqua essentia in order to simply get water."); + GregTech_API.sThaumcraftCompat.addResearch( + tKey, + "Water Transmutation", + "Filling buckets with water", + null, + "ALCHEMY", + GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Water, 1L), + 2, + 0, + 16, + 5, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L)), + null, + new Object[] { + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Empty, 1L), + GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Water, 1L), + Collections.singletonList(new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L))), + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + GT_OreDictUnificator.get(OrePrefixes.bucketClay, Materials.Empty, 1L), + GT_OreDictUnificator.get(OrePrefixes.bucketClay, Materials.Water, 1L), + Collections.singletonList(new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L))), + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + GT_OreDictUnificator.get(OrePrefixes.capsule, Materials.Empty, 1L), + GT_OreDictUnificator.get(OrePrefixes.capsule, Materials.Water, 1L), + Collections.singletonList(new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L))), + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 1L), + Collections.singletonList(new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L))) + }); tKey = "GT_TRANSZINC"; - GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, "You have discovered a way to multiply zinc by steeping zinc nuggets in metallum harvested from other metals."); - GregTech_API.sThaumcraftCompat.addResearch(tKey, "Zinc Transmutation", "Transformation of metals into zinc", new String[]{"TRANSTIN"}, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Zinc, 1L), 2, 1, 9, 13, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 3L)), null, new Object[]{GT_MachineRecipeLoader.aTextTCGTPage + tKey, - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, OrePrefixes.nugget.get(Materials.Zinc), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Zinc, 3L), Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L)))}); + GT_LanguageManager.addStringLocalization( + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + "You have discovered a way to multiply zinc by steeping zinc nuggets in metallum harvested from other metals."); + GregTech_API.sThaumcraftCompat.addResearch( + tKey, + "Zinc Transmutation", + "Transformation of metals into zinc", + new String[] {"TRANSTIN"}, + "ALCHEMY", + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Zinc, 1L), + 2, + 1, + 9, + 13, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 3L)), + null, + new Object[] { + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + OrePrefixes.nugget.get(Materials.Zinc), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Zinc, 3L), + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))) + }); tKey = "GT_TRANSANTIMONY"; - GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, "You have discovered a way to multiply antimony by steeping antimony nuggets in metallum harvested from other metals."); - GregTech_API.sThaumcraftCompat.addResearch(tKey, "Antimony Transmutation", "Transformation of metals into antimony", new String[]{"GT_TRANSZINC", "TRANSLEAD"}, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Antimony, 1L), 2, 1, 9, 14, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 3L)), null, new Object[]{GT_MachineRecipeLoader.aTextTCGTPage + tKey, - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, OrePrefixes.nugget.get(Materials.Antimony), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Antimony, 3L), Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L)))}); + GT_LanguageManager.addStringLocalization( + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + "You have discovered a way to multiply antimony by steeping antimony nuggets in metallum harvested from other metals."); + GregTech_API.sThaumcraftCompat.addResearch( + tKey, + "Antimony Transmutation", + "Transformation of metals into antimony", + new String[] {"GT_TRANSZINC", "TRANSLEAD"}, + "ALCHEMY", + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Antimony, 1L), + 2, + 1, + 9, + 14, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 3L)), + null, + new Object[] { + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + OrePrefixes.nugget.get(Materials.Antimony), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Antimony, 3L), + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L))) + }); tKey = "GT_TRANSNICKEL"; - GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, "You have discovered a way to multiply nickel by steeping nickel nuggets in metallum harvested from other metals."); - GregTech_API.sThaumcraftCompat.addResearch(tKey, "Nickel Transmutation", "Transformation of metals into nickel", new String[]{"TRANSLEAD"}, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Nickel, 1L), 2, 1, 9, 15, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 3L)), null, new Object[]{GT_MachineRecipeLoader.aTextTCGTPage + tKey, - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, OrePrefixes.nugget.get(Materials.Nickel), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Nickel, 3L), Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L)))}); + GT_LanguageManager.addStringLocalization( + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + "You have discovered a way to multiply nickel by steeping nickel nuggets in metallum harvested from other metals."); + GregTech_API.sThaumcraftCompat.addResearch( + tKey, + "Nickel Transmutation", + "Transformation of metals into nickel", + new String[] {"TRANSLEAD"}, + "ALCHEMY", + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Nickel, 1L), + 2, + 1, + 9, + 15, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 3L)), + null, + new Object[] { + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + OrePrefixes.nugget.get(Materials.Nickel), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Nickel, 3L), + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))) + }); tKey = "GT_TRANSCOBALT"; - GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, "You have discovered a way to multiply cobalt by steeping cobalt nuggets in metallum harvested from other metals."); - GregTech_API.sThaumcraftCompat.addResearch(tKey, "Cobalt Transmutation", "Transformation of metals into cobalt", new String[]{"GT_TRANSNICKEL"}, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Cobalt, 1L), 2, 1, 9, 16, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 3L)), null, new Object[]{GT_MachineRecipeLoader.aTextTCGTPage + tKey, - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, OrePrefixes.nugget.get(Materials.Cobalt), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Cobalt, 3L), Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1L)))}); + GT_LanguageManager.addStringLocalization( + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + "You have discovered a way to multiply cobalt by steeping cobalt nuggets in metallum harvested from other metals."); + GregTech_API.sThaumcraftCompat.addResearch( + tKey, + "Cobalt Transmutation", + "Transformation of metals into cobalt", + new String[] {"GT_TRANSNICKEL"}, + "ALCHEMY", + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Cobalt, 1L), + 2, + 1, + 9, + 16, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 3L)), + null, + new Object[] { + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + OrePrefixes.nugget.get(Materials.Cobalt), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Cobalt, 3L), + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1L))) + }); tKey = "GT_TRANSBISMUTH"; - GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, "You have discovered a way to multiply bismuth by steeping bismuth nuggets in metallum harvested from other metals."); - GregTech_API.sThaumcraftCompat.addResearch(tKey, "Bismuth Transmutation", "Transformation of metals into bismuth", new String[]{"GT_TRANSCOBALT"}, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Bismuth, 1L), 2, 1, 11, 17, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 3L)), null, new Object[]{GT_MachineRecipeLoader.aTextTCGTPage + tKey, - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, OrePrefixes.nugget.get(Materials.Bismuth), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Bismuth, 3L), Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1L)))}); + GT_LanguageManager.addStringLocalization( + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + "You have discovered a way to multiply bismuth by steeping bismuth nuggets in metallum harvested from other metals."); + GregTech_API.sThaumcraftCompat.addResearch( + tKey, + "Bismuth Transmutation", + "Transformation of metals into bismuth", + new String[] {"GT_TRANSCOBALT"}, + "ALCHEMY", + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Bismuth, 1L), + 2, + 1, + 11, + 17, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 3L)), + null, + new Object[] { + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + OrePrefixes.nugget.get(Materials.Bismuth), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Bismuth, 3L), + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1L))) + }); tKey = "GT_IRON_TO_STEEL"; - GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, "You have discovered a way of making Iron harder by just re-ordering its components.<BR><BR>This Method can be used to create a Material called Steel, which is used in many non-Thaumaturgic applications."); - GregTech_API.sThaumcraftCompat.addResearch(tKey, "Steel Transmutation", "Transforming iron to steel", new String[]{"TRANSIRON", "GT_WOOD_TO_CHARCOAL"}, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Steel, 1L), 3, 0, 13, 8, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 3L)), null, new Object[]{GT_MachineRecipeLoader.aTextTCGTPage + tKey, - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, OrePrefixes.nugget.get(Materials.Iron), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Steel, 1L), Collections.singletonList(new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 1L)))}); + GT_LanguageManager.addStringLocalization( + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + "You have discovered a way of making Iron harder by just re-ordering its components.<BR><BR>This Method can be used to create a Material called Steel, which is used in many non-Thaumaturgic applications."); + GregTech_API.sThaumcraftCompat.addResearch( + tKey, + "Steel Transmutation", + "Transforming iron to steel", + new String[] {"TRANSIRON", "GT_WOOD_TO_CHARCOAL"}, + "ALCHEMY", + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Steel, 1L), + 3, + 0, + 13, + 8, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 3L)), + null, + new Object[] { + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + OrePrefixes.nugget.get(Materials.Iron), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Steel, 1L), + Collections.singletonList(new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 1L))) + }); tKey = "GT_TRANSBRONZE"; - GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, "You have discovered a way of creating Alloys using the already known transmutations of Copper and Tin.<BR><BR>This Method can be used to create a Bronze directly without having to go through an alloying process."); - GregTech_API.sThaumcraftCompat.addResearch(tKey, "Bronze Transmutation", "Transformation of metals into bronze", new String[]{"TRANSTIN", "TRANSCOPPER"}, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Bronze, 1L), 2, 0, 13, 11, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 3L)), null, new Object[]{GT_MachineRecipeLoader.aTextTCGTPage + tKey, - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, OrePrefixes.nugget.get(Materials.Bronze), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Bronze, 3L), Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1L)))}); + GT_LanguageManager.addStringLocalization( + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + "You have discovered a way of creating Alloys using the already known transmutations of Copper and Tin.<BR><BR>This Method can be used to create a Bronze directly without having to go through an alloying process."); + GregTech_API.sThaumcraftCompat.addResearch( + tKey, + "Bronze Transmutation", + "Transformation of metals into bronze", + new String[] {"TRANSTIN", "TRANSCOPPER"}, + "ALCHEMY", + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Bronze, 1L), + 2, + 0, + 13, + 11, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 3L)), + null, + new Object[] { + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + OrePrefixes.nugget.get(Materials.Bronze), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Bronze, 3L), + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1L))) + }); tKey = "GT_TRANSELECTRUM"; - GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, "Your discovery of Bronze Transmutation has lead you to the conclusion it works with other Alloys such as Electrum as well."); - GregTech_API.sThaumcraftCompat.addResearch(tKey, "Electrum Transmutation", "Transformation of metals into electrum", new String[]{"GT_TRANSBRONZE", "TRANSGOLD", "TRANSSILVER"}, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Electrum, 1L), 2, 1, 11, 11, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 3L)), null, new Object[]{GT_MachineRecipeLoader.aTextTCGTPage + tKey, - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, OrePrefixes.nugget.get(Materials.Electrum), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Electrum, 3L), Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L)))}); + GT_LanguageManager.addStringLocalization( + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + "Your discovery of Bronze Transmutation has lead you to the conclusion it works with other Alloys such as Electrum as well."); + GregTech_API.sThaumcraftCompat.addResearch( + tKey, + "Electrum Transmutation", + "Transformation of metals into electrum", + new String[] {"GT_TRANSBRONZE", "TRANSGOLD", "TRANSSILVER"}, + "ALCHEMY", + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Electrum, 1L), + 2, + 1, + 11, + 11, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 3L)), + null, + new Object[] { + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + OrePrefixes.nugget.get(Materials.Electrum), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Electrum, 3L), + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))) + }); tKey = "GT_TRANSBRASS"; - GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, "Your discovery of Bronze Transmutation has lead you to the conclusion it works with other Alloys such as Brass as well."); - GregTech_API.sThaumcraftCompat.addResearch(tKey, "Brass Transmutation", "Transformation of metals into brass", new String[]{"GT_TRANSBRONZE", "GT_TRANSZINC"}, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Brass, 1L), 2, 1, 11, 12, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 3L)), null, new Object[]{GT_MachineRecipeLoader.aTextTCGTPage + tKey, - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, OrePrefixes.nugget.get(Materials.Brass), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Brass, 3L), Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1L)))}); + GT_LanguageManager.addStringLocalization( + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + "Your discovery of Bronze Transmutation has lead you to the conclusion it works with other Alloys such as Brass as well."); + GregTech_API.sThaumcraftCompat.addResearch( + tKey, + "Brass Transmutation", + "Transformation of metals into brass", + new String[] {"GT_TRANSBRONZE", "GT_TRANSZINC"}, + "ALCHEMY", + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Brass, 1L), + 2, + 1, + 11, + 12, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 3L)), + null, + new Object[] { + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + OrePrefixes.nugget.get(Materials.Brass), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Brass, 3L), + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1L))) + }); tKey = "GT_TRANSINVAR"; - GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, "Your discovery of Bronze Transmutation has lead you to the conclusion it works with other Alloys such as Invar as well."); - GregTech_API.sThaumcraftCompat.addResearch(tKey, "Invar Transmutation", "Transformation of metals into invar", new String[]{"GT_TRANSBRONZE", "GT_TRANSNICKEL"}, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Invar, 1L), 2, 1, 11, 15, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 3L)), null, new Object[]{GT_MachineRecipeLoader.aTextTCGTPage + tKey, - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, OrePrefixes.nugget.get(Materials.Invar), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Invar, 3L), Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L)))}); + GT_LanguageManager.addStringLocalization( + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + "Your discovery of Bronze Transmutation has lead you to the conclusion it works with other Alloys such as Invar as well."); + GregTech_API.sThaumcraftCompat.addResearch( + tKey, + "Invar Transmutation", + "Transformation of metals into invar", + new String[] {"GT_TRANSBRONZE", "GT_TRANSNICKEL"}, + "ALCHEMY", + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Invar, 1L), + 2, + 1, + 11, + 15, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 3L)), + null, + new Object[] { + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + OrePrefixes.nugget.get(Materials.Invar), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Invar, 3L), + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L))) + }); tKey = "GT_TRANSCUPRONICKEL"; - GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, "Your discovery of Bronze Transmutation has lead you to the conclusion it works with other Alloys such as Cupronickel as well."); - GregTech_API.sThaumcraftCompat.addResearch(tKey, "Cupronickel Transmutation", "Transformation of metals into cupronickel", new String[]{"GT_TRANSBRONZE", "GT_TRANSNICKEL"}, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Cupronickel, 1L), 2, 1, 11, 16, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 3L)), null, new Object[]{GT_MachineRecipeLoader.aTextTCGTPage + tKey, - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, OrePrefixes.nugget.get(Materials.Cupronickel), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Cupronickel, 3L), Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L)))}); + GT_LanguageManager.addStringLocalization( + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + "Your discovery of Bronze Transmutation has lead you to the conclusion it works with other Alloys such as Cupronickel as well."); + GregTech_API.sThaumcraftCompat.addResearch( + tKey, + "Cupronickel Transmutation", + "Transformation of metals into cupronickel", + new String[] {"GT_TRANSBRONZE", "GT_TRANSNICKEL"}, + "ALCHEMY", + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Cupronickel, 1L), + 2, + 1, + 11, + 16, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 3L)), + null, + new Object[] { + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + OrePrefixes.nugget.get(Materials.Cupronickel), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Cupronickel, 3L), + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))) + }); tKey = "GT_TRANSBATTERYALLOY"; - GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, "Your discovery of Bronze Transmutation has lead you to the conclusion it works with other Alloys such as Battery Alloy as well."); - GregTech_API.sThaumcraftCompat.addResearch(tKey, "Battery Alloy Transmutation", "Transformation of metals into battery alloy", new String[]{"GT_TRANSBRONZE", "GT_TRANSANTIMONY"}, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.BatteryAlloy, 1L), 2, 1, 11, 13, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 3L)), null, new Object[]{GT_MachineRecipeLoader.aTextTCGTPage + tKey, - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, OrePrefixes.nugget.get(Materials.BatteryAlloy), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.BatteryAlloy, 3L), Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 1L)))}); + GT_LanguageManager.addStringLocalization( + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + "Your discovery of Bronze Transmutation has lead you to the conclusion it works with other Alloys such as Battery Alloy as well."); + GregTech_API.sThaumcraftCompat.addResearch( + tKey, + "Battery Alloy Transmutation", + "Transformation of metals into battery alloy", + new String[] {"GT_TRANSBRONZE", "GT_TRANSANTIMONY"}, + "ALCHEMY", + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.BatteryAlloy, 1L), + 2, + 1, + 11, + 13, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 3L)), + null, + new Object[] { + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + OrePrefixes.nugget.get(Materials.BatteryAlloy), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.BatteryAlloy, 3L), + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 1L))) + }); tKey = "GT_TRANSSOLDERINGALLOY"; - GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, "Your discovery of Bronze Transmutation has lead you to the conclusion it works with other Alloys such as Soldering Alloy as well."); - GregTech_API.sThaumcraftCompat.addResearch(tKey, "Soldering Alloy Transmutation", "Transformation of metals into soldering alloy", new String[]{"GT_TRANSBRONZE", "GT_TRANSANTIMONY"}, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.SolderingAlloy, 1L), 2, 1, 11, 14, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 3L)), null, new Object[]{GT_MachineRecipeLoader.aTextTCGTPage + tKey, - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, OrePrefixes.nugget.get(Materials.SolderingAlloy), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.SolderingAlloy, 3L), Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L)))}); + GT_LanguageManager.addStringLocalization( + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + "Your discovery of Bronze Transmutation has lead you to the conclusion it works with other Alloys such as Soldering Alloy as well."); + GregTech_API.sThaumcraftCompat.addResearch( + tKey, + "Soldering Alloy Transmutation", + "Transformation of metals into soldering alloy", + new String[] {"GT_TRANSBRONZE", "GT_TRANSANTIMONY"}, + "ALCHEMY", + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.SolderingAlloy, 1L), + 2, + 1, + 11, + 14, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 3L)), + null, + new Object[] { + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + OrePrefixes.nugget.get(Materials.SolderingAlloy), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.SolderingAlloy, 3L), + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L))) + }); tKey = "GT_ADVANCEDMETALLURGY"; - GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, "Now that you have discovered all the basic metals, you can finally move on to the next Level of magic metallurgy and create more advanced metals"); - GregTech_API.sThaumcraftCompat.addResearch(tKey, "Advanced Metallurgic Transmutation", "Mastering the basic metals", new String[]{"GT_TRANSBISMUTH", "GT_IRON_TO_STEEL", "GT_TRANSSOLDERINGALLOY", "GT_TRANSBATTERYALLOY", "GT_TRANSBRASS", "GT_TRANSELECTRUM", "GT_TRANSCUPRONICKEL", "GT_TRANSINVAR"}, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iron, 1L), 3, 0, 16, 14, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 50L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 20L), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 20L), new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 20L), new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 20L), new TC_Aspects.TC_AspectStack(TC_Aspects.MAGNETO, 20L)), null, new Object[]{GT_MachineRecipeLoader.aTextTCGTPage + tKey}); + GT_LanguageManager.addStringLocalization( + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + "Now that you have discovered all the basic metals, you can finally move on to the next Level of magic metallurgy and create more advanced metals"); + GregTech_API.sThaumcraftCompat.addResearch( + tKey, + "Advanced Metallurgic Transmutation", + "Mastering the basic metals", + new String[] { + "GT_TRANSBISMUTH", + "GT_IRON_TO_STEEL", + "GT_TRANSSOLDERINGALLOY", + "GT_TRANSBATTERYALLOY", + "GT_TRANSBRASS", + "GT_TRANSELECTRUM", + "GT_TRANSCUPRONICKEL", + "GT_TRANSINVAR" + }, + "ALCHEMY", + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iron, 1L), + 3, + 0, + 16, + 14, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 50L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 20L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 20L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 20L), + new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 20L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MAGNETO, 20L)), + null, + new Object[] {GT_MachineRecipeLoader.aTextTCGTPage + tKey}); tKey = "GT_TRANSALUMINIUM"; - GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, "You have discovered a way to multiply aluminium by steeping aluminium nuggets in metallum harvested from other metals.<BR><BR>This transmutation is slightly harder to achieve, because aluminium has special properties, which require more order to achieve the desired result."); - GregTech_API.sThaumcraftCompat.addResearch(tKey, "Aluminium Transmutation", "Transformation of metals into aluminium", new String[]{"GT_ADVANCEDMETALLURGY"}, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Aluminium, 1L), 4, 0, 19, 14, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.VOLATUS, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 3L)), null, new Object[]{GT_MachineRecipeLoader.aTextTCGTPage + tKey, - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, OrePrefixes.nugget.get(Materials.Aluminium), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Aluminium, 3L), Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VOLATUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L)))}); + GT_LanguageManager.addStringLocalization( + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + "You have discovered a way to multiply aluminium by steeping aluminium nuggets in metallum harvested from other metals.<BR><BR>This transmutation is slightly harder to achieve, because aluminium has special properties, which require more order to achieve the desired result."); + GregTech_API.sThaumcraftCompat.addResearch( + tKey, + "Aluminium Transmutation", + "Transformation of metals into aluminium", + new String[] {"GT_ADVANCEDMETALLURGY"}, + "ALCHEMY", + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Aluminium, 1L), + 4, + 0, + 19, + 14, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VOLATUS, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 3L)), + null, + new Object[] { + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + OrePrefixes.nugget.get(Materials.Aluminium), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Aluminium, 3L), + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VOLATUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))) + }); if (Loader.isModLoaded("appliedenergistics2")) { tKey = "GT_TRANSSKYSTONE"; - GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, "You have discovered a way to convert obsidian to skystone.<BR><BR>Not sure why you'd want to do this, unless skystone is somehow unavailable in your world."); - GregTech_API.sThaumcraftCompat.addResearch(tKey, "Skystone Transmutation", "Transformation of obsidian into skystone", new String[]{"GT_ADVANCEDMETALLURGY"}, "ALCHEMY", GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockSkyStone", 1), 4, 0, 19, 15, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.VOLATUS, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.ALIENIS, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 3L)), null, new Object[]{GT_MachineRecipeLoader.aTextTCGTPage + tKey, - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, new ItemStack(Blocks.obsidian), GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockSkyStone", 1), Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VOLATUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ALIENIS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 1L)))}); + GT_LanguageManager.addStringLocalization( + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + "You have discovered a way to convert obsidian to skystone.<BR><BR>Not sure why you'd want to do this, unless skystone is somehow unavailable in your world."); + GregTech_API.sThaumcraftCompat.addResearch( + tKey, + "Skystone Transmutation", + "Transformation of obsidian into skystone", + new String[] {"GT_ADVANCEDMETALLURGY"}, + "ALCHEMY", + GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockSkyStone", 1), + 4, + 0, + 19, + 15, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VOLATUS, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ALIENIS, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 3L)), + null, + new Object[] { + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + new ItemStack(Blocks.obsidian), + GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockSkyStone", 1), + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VOLATUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ALIENIS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 1L))) + }); } tKey = "GT_TRANSMINERAL"; - GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, "You have discovered a way to convert basaltic mineral sand to granitic mineral sand and vice versa.<BR><BR>Handy for people living in the sky who can't access it normally, or if you really want one or the other."); - GregTech_API.sThaumcraftCompat.addResearch(tKey, "Basaltic Mineral Transmutation", "Transformation of mineral sands", new String[]{"GT_ADVANCEDMETALLURGY"}, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.dust, Materials.GraniticMineralSand, 1L), 4, 0, 19, 16, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.VOLATUS, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.MAGNETO, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 3L)), null, new Object[]{GT_MachineRecipeLoader.aTextTCGTPage + tKey, - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BasalticMineralSand, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.GraniticMineralSand, 1L), Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MAGNETO, 1L))), - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.GraniticMineralSand, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BasalticMineralSand, 1L), Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MAGNETO, 1L))) - }); + GT_LanguageManager.addStringLocalization( + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + "You have discovered a way to convert basaltic mineral sand to granitic mineral sand and vice versa.<BR><BR>Handy for people living in the sky who can't access it normally, or if you really want one or the other."); + GregTech_API.sThaumcraftCompat.addResearch( + tKey, + "Basaltic Mineral Transmutation", + "Transformation of mineral sands", + new String[] {"GT_ADVANCEDMETALLURGY"}, + "ALCHEMY", + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.GraniticMineralSand, 1L), + 4, + 0, + 19, + 16, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 5L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VOLATUS, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MAGNETO, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 3L)), + null, + new Object[] { + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BasalticMineralSand, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.GraniticMineralSand, 1L), + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MAGNETO, 1L))), + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.GraniticMineralSand, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.BasalticMineralSand, 1L), + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MAGNETO, 1L))) + }); tKey = "GT_CRYSTALLISATION"; - GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, "Sometimes when processing your Crystal Shards they become a pile of Dust instead of the mostly required Shard.<BR><BR>You have finally found a way to reverse this Process by using Vitreus Essentia for recrystallising the Shards."); - GregTech_API.sThaumcraftCompat.addResearch(tKey, "Shard Recrystallisation", "Fixing your precious crystals", new String[]{"ALCHEMICALMANUFACTURE"}, "ALCHEMY", GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedOrder, 1L), 3, 0, -11, -3, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 5L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 3L)), null, new Object[]{GT_MachineRecipeLoader.aTextTCGTPage + tKey, - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, OrePrefixes.dust.get(Materials.Amber), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Amber, 1L), Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4L))), - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, OrePrefixes.dust.get(Materials.InfusedOrder), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedOrder, 1L), Collections.singletonList(new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4L))), - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, OrePrefixes.dust.get(Materials.InfusedEntropy), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedEntropy, 1L), Collections.singletonList(new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4L))), - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, OrePrefixes.dust.get(Materials.InfusedAir), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedAir, 1L), Collections.singletonList(new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4L))), - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, OrePrefixes.dust.get(Materials.InfusedEarth), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedEarth, 1L), Collections.singletonList(new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4L))), - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, OrePrefixes.dust.get(Materials.InfusedFire), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedFire, 1L), Collections.singletonList(new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4L))), - GregTech_API.sThaumcraftCompat.addCrucibleRecipe(tKey, OrePrefixes.dust.get(Materials.InfusedWater), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedWater, 1L), Collections.singletonList(new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4L)))}); + GT_LanguageManager.addStringLocalization( + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + "Sometimes when processing your Crystal Shards they become a pile of Dust instead of the mostly required Shard.<BR><BR>You have finally found a way to reverse this Process by using Vitreus Essentia for recrystallising the Shards."); + GregTech_API.sThaumcraftCompat.addResearch( + tKey, + "Shard Recrystallisation", + "Fixing your precious crystals", + new String[] {"ALCHEMICALMANUFACTURE"}, + "ALCHEMY", + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedOrder, 1L), + 3, + 0, + -11, + -3, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 5L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 3L)), + null, + new Object[] { + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + OrePrefixes.dust.get(Materials.Amber), + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Amber, 1L), + Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4L))), + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + OrePrefixes.dust.get(Materials.InfusedOrder), + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedOrder, 1L), + Collections.singletonList(new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4L))), + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + OrePrefixes.dust.get(Materials.InfusedEntropy), + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedEntropy, 1L), + Collections.singletonList(new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4L))), + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + OrePrefixes.dust.get(Materials.InfusedAir), + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedAir, 1L), + Collections.singletonList(new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4L))), + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + OrePrefixes.dust.get(Materials.InfusedEarth), + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedEarth, 1L), + Collections.singletonList(new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4L))), + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + OrePrefixes.dust.get(Materials.InfusedFire), + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedFire, 1L), + Collections.singletonList(new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4L))), + GregTech_API.sThaumcraftCompat.addCrucibleRecipe( + tKey, + OrePrefixes.dust.get(Materials.InfusedWater), + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.InfusedWater, 1L), + Collections.singletonList(new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4L))) + }); tKey = "GT_MAGICENERGY"; - GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, - "While trying to find new ways to integrate magic into your industrial factories, you have discovered a way to convert magical energy into electrical power."); - GregTech_API.sThaumcraftCompat.addResearch(tKey, - "Magic Energy Conversion", - "Magic to Power", - new String[]{"ARCANEBORE"}, - "ARTIFICE", - ItemList.MagicEnergyConverter_LV.get(1L), - 3, 0, -3, 10, - Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 10L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 10L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 20L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 10L)), - null, new Object[]{GT_MachineRecipeLoader.aTextTCGTPage + tKey, - GregTech_API.sThaumcraftCompat.addInfusionRecipe(tKey, - ItemList.Hull_LV.get(1L), - new ItemStack[]{ - new ItemStack(Blocks.beacon), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), - ItemList.Sensor_MV.get(2L), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Thaumium, 1L), - ItemList.Sensor_MV.get(2L) - }, - ItemList.MagicEnergyConverter_LV.get(1L), - 5, - Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L)))}); + GT_LanguageManager.addStringLocalization( + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + "While trying to find new ways to integrate magic into your industrial factories, you have discovered a way to convert magical energy into electrical power."); + GregTech_API.sThaumcraftCompat.addResearch( + tKey, + "Magic Energy Conversion", + "Magic to Power", + new String[] {"ARCANEBORE"}, + "ARTIFICE", + ItemList.MagicEnergyConverter_LV.get(1L), + 3, + 0, + -3, + 10, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 10L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 10L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 20L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 10L)), + null, + new Object[] { + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + GregTech_API.sThaumcraftCompat.addInfusionRecipe( + tKey, + ItemList.Hull_LV.get(1L), + new ItemStack[] { + new ItemStack(Blocks.beacon), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), + ItemList.Sensor_MV.get(2L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Thaumium, 1L), + ItemList.Sensor_MV.get(2L) + }, + ItemList.MagicEnergyConverter_LV.get(1L), + 5, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L))) + }); tKey = "GT_MAGICENERGY2"; - GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, - "Attempts to increase the output of your Magic Energy generators have resulted in significant improvements."); - GregTech_API.sThaumcraftCompat.addResearch(tKey, - "Adept Magic Energy Conversion", - "Magic to Power", - new String[]{"GT_MAGICENERGY"}, - "ARTIFICE", - ItemList.MagicEnergyConverter_MV.get(1L), - 1, 1, -4, 12, - Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 10L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 10L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 20L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 10L)), - null, new Object[]{GT_MachineRecipeLoader.aTextTCGTPage + tKey, - GregTech_API.sThaumcraftCompat.addInfusionRecipe(tKey, - ItemList.Hull_MV.get(1L), - new ItemStack[]{ - new ItemStack(Blocks.beacon), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1L), - GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Thaumium, 1L), - ItemList.Sensor_HV.get(2L), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1L), - GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.StainlessSteel, 1L), - ItemList.Sensor_HV.get(2L) - }, - ItemList.MagicEnergyConverter_MV.get(1L), - 6, - Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L)))}); + GT_LanguageManager.addStringLocalization( + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + "Attempts to increase the output of your Magic Energy generators have resulted in significant improvements."); + GregTech_API.sThaumcraftCompat.addResearch( + tKey, + "Adept Magic Energy Conversion", + "Magic to Power", + new String[] {"GT_MAGICENERGY"}, + "ARTIFICE", + ItemList.MagicEnergyConverter_MV.get(1L), + 1, + 1, + -4, + 12, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 10L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 10L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 20L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 10L)), + null, + new Object[] { + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + GregTech_API.sThaumcraftCompat.addInfusionRecipe( + tKey, + ItemList.Hull_MV.get(1L), + new ItemStack[] { + new ItemStack(Blocks.beacon), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1L), + GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Thaumium, 1L), + ItemList.Sensor_HV.get(2L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1L), + GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.StainlessSteel, 1L), + ItemList.Sensor_HV.get(2L) + }, + ItemList.MagicEnergyConverter_MV.get(1L), + 6, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L))) + }); tKey = "GT_MAGICENERGY3"; - GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, - "Attempts to further increase the output of your Magic Energy generators have resulted in great improvements."); - GregTech_API.sThaumcraftCompat.addResearch(tKey, - "Master Magic Energy Conversion", - "Magic to Power", - new String[]{"GT_MAGICENERGY2"}, - "ARTIFICE", - ItemList.MagicEnergyConverter_HV.get(1L), - 1, 1, -4, 14, - Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 20L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 20L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 40L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 20L)), - null, new Object[]{GT_MachineRecipeLoader.aTextTCGTPage + tKey, - GregTech_API.sThaumcraftCompat.addInfusionRecipe(tKey, - ItemList.Hull_HV.get(1L), - new ItemStack[]{ - new ItemStack(Blocks.beacon), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Data, 1L), - GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Thaumium, 1L), - ItemList.Field_Generator_MV.get(1L), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Data, 1L), - GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Titanium, 1L), - ItemList.Field_Generator_MV.get(1L) - }, - ItemList.MagicEnergyConverter_HV.get(1L), - 8, - Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 128L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L)))}); - + GT_LanguageManager.addStringLocalization( + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + "Attempts to further increase the output of your Magic Energy generators have resulted in great improvements."); + GregTech_API.sThaumcraftCompat.addResearch( + tKey, + "Master Magic Energy Conversion", + "Magic to Power", + new String[] {"GT_MAGICENERGY2"}, + "ARTIFICE", + ItemList.MagicEnergyConverter_HV.get(1L), + 1, + 1, + -4, + 14, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 20L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 20L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 40L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 20L)), + null, + new Object[] { + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + GregTech_API.sThaumcraftCompat.addInfusionRecipe( + tKey, + ItemList.Hull_HV.get(1L), + new ItemStack[] { + new ItemStack(Blocks.beacon), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Data, 1L), + GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Thaumium, 1L), + ItemList.Field_Generator_MV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Data, 1L), + GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Titanium, 1L), + ItemList.Field_Generator_MV.get(1L) + }, + ItemList.MagicEnergyConverter_HV.get(1L), + 8, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L))) + }); tKey = "GT_MAGICABSORB"; - GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, - "Research into magical energy conversion methods has identified a way to convert surrounding energies into electrical power."); - GregTech_API.sThaumcraftCompat.addResearch(tKey, - "Magic Energy Absorption", - "Harvesting Magic", - new String[]{"GT_MAGICENERGY"}, - "ARTIFICE", - ItemList.MagicEnergyAbsorber_LV.get(1L), - 3, 0, -2, 12, - Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 10L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 10L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 20L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 10L)), - null, new Object[]{GT_MachineRecipeLoader.aTextTCGTPage + tKey, - GregTech_API.sThaumcraftCompat.addInfusionRecipe(tKey, - ItemList.Hull_LV.get(1L), - new ItemStack[]{ - ItemList.MagicEnergyConverter_LV.get(1L), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Thaumium, 1L), - ItemList.Sensor_MV.get(2L) - }, - ItemList.MagicEnergyAbsorber_LV.get(1L), - 6, - Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.STRONTIO, 4L)))}); + GT_LanguageManager.addStringLocalization( + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + "Research into magical energy conversion methods has identified a way to convert surrounding energies into electrical power."); + GregTech_API.sThaumcraftCompat.addResearch( + tKey, + "Magic Energy Absorption", + "Harvesting Magic", + new String[] {"GT_MAGICENERGY"}, + "ARTIFICE", + ItemList.MagicEnergyAbsorber_LV.get(1L), + 3, + 0, + -2, + 12, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 10L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 10L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 20L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 10L)), + null, + new Object[] { + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + GregTech_API.sThaumcraftCompat.addInfusionRecipe( + tKey, + ItemList.Hull_LV.get(1L), + new ItemStack[] { + ItemList.MagicEnergyConverter_LV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Thaumium, 1L), + ItemList.Sensor_MV.get(2L) + }, + ItemList.MagicEnergyAbsorber_LV.get(1L), + 6, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.STRONTIO, 4L))) + }); tKey = "GT_MAGICABSORB2"; - GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, - "Moar output! Drain all the Magic!"); - GregTech_API.sThaumcraftCompat.addResearch(tKey, - "Improved Magic Energy Absorption", - "Harvesting Magic", - new String[]{"GT_MAGICABSORB"}, - "ARTIFICE", - ItemList.MagicEnergyAbsorber_EV.get(1L), - 3, 1, -2, 14, - Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 10L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 10L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 20L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 10L)), - null, new Object[]{GT_MachineRecipeLoader.aTextTCGTPage + tKey, - GregTech_API.sThaumcraftCompat.addInfusionRecipe(tKey, - ItemList.Hull_MV.get(1L), - new ItemStack[]{ - ItemList.MagicEnergyConverter_MV.get(1L), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Thaumium, 1L), - ItemList.Sensor_HV.get(2L), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Thaumium, 1L) - }, - ItemList.MagicEnergyAbsorber_MV.get(1L), - 6, - Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.STRONTIO, 8L))) - - - , GregTech_API.sThaumcraftCompat.addInfusionRecipe(tKey, - ItemList.Hull_HV.get(1L), - new ItemStack[]{ - ItemList.MagicEnergyConverter_MV.get(1L), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Data, 1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Void, 1), - ItemList.Field_Generator_MV.get(1L), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Data, 1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Void, 1), - }, - ItemList.MagicEnergyAbsorber_HV.get(1L), - 8, - Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 128L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 128L), - new TC_Aspects.TC_AspectStack(TC_Aspects.STRONTIO, 16L))) - - - , GregTech_API.sThaumcraftCompat.addInfusionRecipe(tKey, - ItemList.Hull_EV.get(1L), - new ItemStack[]{ - ItemList.MagicEnergyConverter_HV.get(1L), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Elite, 1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Void, 1), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 1), - ItemList.Field_Generator_HV.get(1L), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Elite, 1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Void, 1), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 1), - }, + GT_LanguageManager.addStringLocalization( + GT_MachineRecipeLoader.aTextTCGTPage + tKey, "Moar output! Drain all the Magic!"); + GregTech_API.sThaumcraftCompat.addResearch( + tKey, + "Improved Magic Energy Absorption", + "Harvesting Magic", + new String[] {"GT_MAGICABSORB"}, + "ARTIFICE", ItemList.MagicEnergyAbsorber_EV.get(1L), - 10, - Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 256L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 128L), - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 256L), - new TC_Aspects.TC_AspectStack(TC_Aspects.STRONTIO, 64L))) - }); + 3, + 1, + -2, + 14, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 10L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 10L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 20L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 10L)), + null, + new Object[] { + GT_MachineRecipeLoader.aTextTCGTPage + tKey, + GregTech_API.sThaumcraftCompat.addInfusionRecipe( + tKey, + ItemList.Hull_MV.get(1L), + new ItemStack[] { + ItemList.MagicEnergyConverter_MV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Thaumium, 1L), + ItemList.Sensor_HV.get(2L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Thaumium, 1L) + }, + ItemList.MagicEnergyAbsorber_MV.get(1L), + 6, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.STRONTIO, 8L))), + GregTech_API.sThaumcraftCompat.addInfusionRecipe( + tKey, + ItemList.Hull_HV.get(1L), + new ItemStack[] { + ItemList.MagicEnergyConverter_MV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Data, 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Void, 1), + ItemList.Field_Generator_MV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Data, 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Void, 1), + }, + ItemList.MagicEnergyAbsorber_HV.get(1L), + 8, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.STRONTIO, 16L))), + GregTech_API.sThaumcraftCompat.addInfusionRecipe( + tKey, + ItemList.Hull_EV.get(1L), + new ItemStack[] { + ItemList.MagicEnergyConverter_HV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Elite, 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Void, 1), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 1), + ItemList.Field_Generator_HV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Elite, 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Void, 1), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 1), + }, + ItemList.MagicEnergyAbsorber_EV.get(1L), + 10, + Arrays.asList( + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.STRONTIO, 64L))) + }); } addBusAndHatchRecipes(); } @@ -3285,736 +14177,4512 @@ public class GT_MachineRecipeLoader implements Runnable { * Adds replacement recipes for Epoxy Resin, Nitric Acid, Polyethylene, Polydimethylsiloxane (Silicone), Polytetrafluoroethylene, Rocket Fuel, Sulfuric Acid * Instrumental materials are not mentioned here. */ - private void addRecipesApril2017ChemistryUpdate(){ - GT_Values.RA.addElectrolyzerRecipe(GT_Utility.getIntegratedCircuit(1), GT_Values.NI, Materials.CarbonDioxide.getGas(1000), Materials.Oxygen.getGas(2000), Materials.Carbon.getDust(1), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 300, 120); - GT_Values.RA.addElectrolyzerRecipe(GT_Utility.getIntegratedCircuit(11), Materials.Empty.getCells(2), Materials.CarbonDioxide.getGas(1000), GT_Values.NF, Materials.Carbon.getDust(1), Materials.Oxygen.getCells(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 300, 120); - //SO2 = S + 2O - GT_Values.RA.addElectrolyzerRecipe(GT_Utility.getIntegratedCircuit(1), GT_Values.NI, Materials.SulfurDioxide.getGas(1000), Materials.Oxygen.getGas(2000), Materials.Sulfur.getDust(1), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 300, 120); - GT_Values.RA.addElectrolyzerRecipe(GT_Utility.getIntegratedCircuit(11), Materials.Empty.getCells(2), Materials.SulfurDioxide.getGas(1000), GT_Values.NF, Materials.Sulfur.getDust(1), Materials.Oxygen.getCells(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 300, 120); - //NaCl = Na +Cl - GT_Values.RA.addElectrolyzerRecipe(Materials.Salt.getDust(2), GT_Values.NI, GT_Values.NF, Materials.Chlorine.getGas(1000), Materials.Sodium.getDust(1), GT_Values.NI, GT_Values.NI, GT_Values.NI,GT_Values.NI, GT_Values.NI, null, 320, 30); - - //(NaCl·H2O)= NaOH + H - GT_Values.RA.addElectrolyzerRecipe(Materials.Empty.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.SaltWater.getFluid(1000), Materials.Chlorine.getGas(1000), Materials.SodiumHydroxide.getDust(3), Materials.Hydrogen.getCells(1), GT_Values.NI, GT_Values.NI,GT_Values.NI, GT_Values.NI, null, 720, 30); - GT_Values.RA.addElectrolyzerRecipe(Materials.Empty.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.SaltWater.getFluid(1000), Materials.Hydrogen.getGas(1000), Materials.SodiumHydroxide.getDust(3), Materials.Chlorine.getCells(1), GT_Values.NI, GT_Values.NI,GT_Values.NI, GT_Values.NI, null, 720, 30); - //HCl = H + Cl - GT_Values.RA.addElectrolyzerRecipe(Materials.Empty.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.HydrochloricAcid.getFluid(1000), Materials.Chlorine.getGas(1000), Materials.Hydrogen.getCells(1), GT_Values.NI, GT_Values.NI, GT_Values.NI,GT_Values.NI, GT_Values.NI, null, 720, 30); - GT_Values.RA.addElectrolyzerRecipe(Materials.Empty.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.HydrochloricAcid.getFluid(1000), Materials.Hydrogen.getGas(1000), Materials.Chlorine.getCells(1), GT_Values.NI, GT_Values.NI, GT_Values.NI,GT_Values.NI, GT_Values.NI, null, 720, 30); - - GT_Values.RA.addElectrolyzerRecipe(Materials.HydrochloricAcid.getCells(1), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.Chlorine.getGas(1000), Materials.Hydrogen.getCells(1), GT_Values.NI, GT_Values.NI, GT_Values.NI,GT_Values.NI, GT_Values.NI, null, 720, 30); - GT_Values.RA.addElectrolyzerRecipe(Materials.HydrochloricAcid.getCells(1), GT_Utility.getIntegratedCircuit(11), GT_Values.NF, Materials.Hydrogen.getGas(1000), Materials.Chlorine.getCells(1), GT_Values.NI, GT_Values.NI, GT_Values.NI,GT_Values.NI, GT_Values.NI, null, 720, 30); - //Na + H2O = NaOH + H - GT_Values.RA.addChemicalBathRecipe(Materials.Sodium.getDust(1), Materials.Water.getFluid(1000), Materials.Hydrogen.getGas(1000), Materials.SodiumHydroxide.getDust(3), GT_Values.NI, GT_Values.NI,null ,100, 4); - //2 0.5HCl(Diluted) = HCl + H2O - GT_Values.RA.addUniversalDistillationRecipe(Materials.DilutedHydrochloricAcid.getFluid(2000), new FluidStack[]{Materials.Water.getFluid(1000), Materials.HydrochloricAcid.getFluid(1000)}, GT_Values.NI, 600, 64); - - //K + HNO3 = KNO3 + H (not real, but gameplay - GT_Values.RA.addChemicalRecipe(Materials.Potassium.getDust(1), GT_Utility.getIntegratedCircuit(2), Materials.NitricAcid.getFluid(1000), Materials.Hydrogen.getGas(1000), Materials.Saltpeter.getDust(5), 100, 30); - //NaCl + H2O = (NaCl·H2O) - GT_Values.RA.addMixerRecipe(Materials.Salt.getDust(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Water.getFluid(1000), Materials.SaltWater.getFluid(1000), GT_Values.NI, 100, 8); - //(NaCl·H2O) = NaCl + H2O - GT_Values.RA.addDistilleryRecipe(1, Materials.SaltWater.getFluid(1000), GT_ModHandler.getDistilledWater(1000), Materials.Salt.getDust(2), 1600, 30, false); - - - GT_Values.RA.addUniversalDistillationRecipe(FluidRegistry.getFluidStack("potion.vinegar", 40), new FluidStack[]{Materials.AceticAcid.getFluid(5), Materials.Water.getFluid(35)}, GT_Values.NI, 20, 64); - //CaCO3 + 2 CH3COOH = Ca(CH3COO)2 + H2O + CO2 - GT_Values.RA.addMixerRecipe(Materials.Calcite.getDust(5), Materials.Empty.getCells(2), GT_Utility.getIntegratedCircuit(1), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.AceticAcid.getFluid(2000), Materials.CalciumAcetateSolution.getFluid(1000), Materials.Water.getCells(1), Materials.CarbonDioxide.getCells(1), GT_Values.NI, GT_Values.NI, 240, 16); - GT_Values.RA.addMixerRecipe(Materials.Calcite.getDust(5), Materials.Empty.getCells(2), GT_Utility.getIntegratedCircuit(11), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.AceticAcid.getFluid(2000), Materials.Water.getFluid(1000), Materials.CalciumAcetateSolution.getCells(1), Materials.CarbonDioxide.getCells(1), GT_Values.NI, GT_Values.NI, 240, 16); - GT_Values.RA.addMixerRecipe(Materials.Calcite.getDust(5), Materials.Empty.getCells(2), GT_Utility.getIntegratedCircuit(21), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.AceticAcid.getFluid(2000), Materials.CarbonDioxide.getGas(1000), Materials.Water.getCells(1), Materials.CalciumAcetateSolution.getCells(1), GT_Values.NI, GT_Values.NI, 240, 16); - GT_Values.RA.addMixerRecipe(Materials.Calcite.getDust(5), Materials.Empty.getCells(1), GT_Utility.getIntegratedCircuit(4), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.AceticAcid.getFluid(2000), Materials.CalciumAcetateSolution.getFluid(1000), Materials.CarbonDioxide.getCells(1), GT_Values.NI, GT_Values.NI, GT_Values.NI, 240, 16); - GT_Values.RA.addMixerRecipe(Materials.Calcite.getDust(5), Materials.Empty.getCells(1), GT_Utility.getIntegratedCircuit(14), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.AceticAcid.getFluid(2000), Materials.CarbonDioxide.getGas(1000), Materials.CalciumAcetateSolution.getCells(1), GT_Values.NI, GT_Values.NI, GT_Values.NI, 240, 16); - //Ca + 2 CH3COOH = Ca(CH3COO)2 + 2H - GT_Values.RA.addMixerRecipe(Materials.Calcium.getDust(1), Materials.Empty.getCells(2), GT_Utility.getIntegratedCircuit(1), GT_Values.NI, Materials.AceticAcid.getFluid(2000), Materials.CalciumAcetateSolution.getFluid(1000), Materials.Hydrogen.getCells(2), 80, 16); - GT_Values.RA.addMixerRecipe(Materials.Calcium.getDust(1), Materials.Empty.getCells(1), GT_Utility.getIntegratedCircuit(11), GT_Values.NI, Materials.AceticAcid.getFluid(2000), Materials.Hydrogen.getGas(2000), Materials.CalciumAcetateSolution.getCells(1), 80, 16); - //CaO + 2 CH3COOH = Ca(CH3COO)2 + H2O - GT_Values.RA.addMixerRecipe(Materials.Quicklime.getDust(2), Materials.Empty.getCells(1), GT_Utility.getIntegratedCircuit(1), GT_Values.NI, Materials.AceticAcid.getFluid(2000), Materials.CalciumAcetateSolution.getFluid(1000), Materials.Water.getCells(1), 80, 16); - GT_Values.RA.addMixerRecipe(Materials.Quicklime.getDust(2), Materials.Empty.getCells(1), GT_Utility.getIntegratedCircuit(11), GT_Values.NI, Materials.AceticAcid.getFluid(2000), Materials.Water.getFluid(1000), Materials.CalciumAcetateSolution.getCells(1), 80, 16); - //GameRegistry.addSmelting(Materials.CalciumAcetateSolution.getCells(1), Materials.Acetone.getCells(1), 0); - //Ca(CH3COO)2 = CH3COCH3 + CaO + CO2 - GT_Values.RA.addFluidHeaterRecipe(GT_Utility.getIntegratedCircuit(1), Materials.CalciumAcetateSolution.getFluid(1000), Materials.Acetone.getFluid(1000), 80, 30); - GT_Values.RA.addUniversalDistillationRecipe(Materials.CalciumAcetateSolution.getFluid(1000), new FluidStack[]{Materials.Acetone.getFluid(1000), Materials.CarbonDioxide.getGas(1000)}, Materials.Quicklime.getDust(2), 80, 480); - //2CH3COOH = CH3COCH3 + CO2 + H - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.copyAmount(0, Materials.Calcite.getDust(5)), GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.AceticAcid.getFluid(2000)}, new FluidStack[]{Materials.Acetone.getFluid(1000), Materials.CarbonDioxide.getGas(1000), Materials.Water.getFluid(1000)}, null, 400, 480); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.copyAmount(0,Materials.Calcium.getDust(1)), GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.AceticAcid.getFluid(2000)}, new FluidStack[]{Materials.Acetone.getFluid(1000), Materials.CarbonDioxide.getGas(1000), Materials.Water.getFluid(1000)}, null, 400, 480); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.copyAmount(0, Materials.Quicklime.getDust(2)), GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.AceticAcid.getFluid(2000)}, new FluidStack[]{Materials.Acetone.getFluid(1000), Materials.CarbonDioxide.getGas(1000), Materials.Water.getFluid(1000)}, null, 400, 480); - //CH3COOH + CH3OH = CH3COOCH3 + H2O - GT_Values.RA.addChemicalRecipe(Materials.AceticAcid.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Methanol.getFluid(1000), Materials.MethylAcetate.getFluid(1000), Materials.Water.getCells(1), 240); - GT_Values.RA.addChemicalRecipe(Materials.Methanol.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.AceticAcid.getFluid(1000), Materials.MethylAcetate.getFluid(1000), Materials.Water.getCells(1), 240); - GT_Values.RA.addChemicalRecipe(Materials.AceticAcid.getCells(1), GT_Utility.getIntegratedCircuit(2), Materials.Methanol.getFluid(1000), Materials.MethylAcetate.getFluid(1000), Materials.Empty.getCells(1), 240); - GT_Values.RA.addChemicalRecipe(Materials.Methanol.getCells(1), GT_Utility.getIntegratedCircuit(2), Materials.AceticAcid.getFluid(1000), Materials.MethylAcetate.getFluid(1000), Materials.Empty.getCells(1), 240); - GT_Values.RA.addChemicalRecipe(Materials.AceticAcid.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Methanol.getFluid(1000), Materials.Water.getFluid(1000), Materials.MethylAcetate.getCells(1), 240); - GT_Values.RA.addChemicalRecipe(Materials.Methanol.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.AceticAcid.getFluid(1000), Materials.Water.getFluid(1000), Materials.MethylAcetate.getCells(1), 240); - GT_Values.RA.addChemicalRecipe(Materials.AceticAcid.getCells(1), GT_Utility.getIntegratedCircuit(12), Materials.Methanol.getFluid(1000), GT_Values.NF, Materials.MethylAcetate.getCells(1), 240); - GT_Values.RA.addChemicalRecipe(Materials.Methanol.getCells(1), GT_Utility.getIntegratedCircuit(12), Materials.AceticAcid.getFluid(1000), GT_Values.NF, Materials.MethylAcetate.getCells(1), 240); - //2CH3COOCH3 + 3CH3COCH3/(C4H6O2)n = 5Glue - GT_Values.RA.addMixerRecipe(Materials.Acetone.getCells(3), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.PolyvinylAcetate.getFluid(2000), Materials.AdvancedGlue.getFluid(5000), Materials.Empty.getCells(3), 100, 8); - GT_Values.RA.addMixerRecipe(Materials.PolyvinylAcetate.getCells(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Acetone.getFluid(3000), Materials.AdvancedGlue.getFluid(5000), Materials.Empty.getCells(2), 100, 8); - GT_Values.RA.addMixerRecipe(Materials.MethylAcetate.getCells(3), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.PolyvinylAcetate.getFluid(2000), Materials.AdvancedGlue.getFluid(5000), Materials.Empty.getCells(3), 100, 8); - GT_Values.RA.addMixerRecipe(Materials.PolyvinylAcetate.getCells(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.MethylAcetate.getFluid(3000), Materials.AdvancedGlue.getFluid(5000), Materials.Empty.getCells(2), 100, 8); - //CO and CO2 recipes - GT_Values.RA.addChemicalRecipe(Materials.Carbon.getDust(1), GT_Utility.getIntegratedCircuit(1), Materials.Oxygen.getGas(1000), Materials.CarbonMonoxide.getGas(1000), GT_Values.NI, 40, 8); - GT_Values.RA.addChemicalRecipe(Materials.Coal.getGems(1), GT_Utility.getIntegratedCircuit(1), Materials.Oxygen.getGas(1000), Materials.CarbonMonoxide.getGas(1000), Materials.Ash.getDustTiny(1), 80, 8); - GT_Values.RA.addChemicalRecipe(Materials.Coal.getDust(1), GT_Utility.getIntegratedCircuit(1), Materials.Oxygen.getGas(1000), Materials.CarbonMonoxide.getGas(1000), Materials.Ash.getDustTiny(1), 80, 8); - GT_Values.RA.addChemicalRecipe(Materials.Charcoal.getGems(1), GT_Utility.getIntegratedCircuit(1), Materials.Oxygen.getGas(1000), Materials.CarbonMonoxide.getGas(1000), Materials.Ash.getDustTiny(1), 80, 8); - GT_Values.RA.addChemicalRecipe(Materials.Charcoal.getDust(1), GT_Utility.getIntegratedCircuit(1), Materials.Oxygen.getGas(1000), Materials.CarbonMonoxide.getGas(1000), Materials.Ash.getDustTiny(1), 80, 8); - GT_Values.RA.addChemicalRecipe(Materials.Carbon.getDust(1), GT_Utility.getIntegratedCircuit(2), Materials.Oxygen.getGas(2000), Materials.CarbonDioxide.getGas(1000), GT_Values.NI, 40, 8); - GT_Values.RA.addChemicalRecipe(Materials.Coal.getGems(1), GT_Utility.getIntegratedCircuit(2), Materials.Oxygen.getGas(2000), Materials.CarbonDioxide.getGas(1000), Materials.Ash.getDustTiny(1), 40, 8); - GT_Values.RA.addChemicalRecipe(Materials.Coal.getDust(1), GT_Utility.getIntegratedCircuit(2), Materials.Oxygen.getGas(2000), Materials.CarbonDioxide.getGas(1000), Materials.Ash.getDustTiny(1), 40, 8); - GT_Values.RA.addChemicalRecipe(Materials.Charcoal.getGems(1), GT_Utility.getIntegratedCircuit(2), Materials.Oxygen.getGas(2000), Materials.CarbonDioxide.getGas(1000), Materials.Ash.getDustTiny(1), 40, 8); - GT_Values.RA.addChemicalRecipe(Materials.Charcoal.getDust(1), GT_Utility.getIntegratedCircuit(2), Materials.Oxygen.getGas(2000), Materials.CarbonDioxide.getGas(1000), Materials.Ash.getDustTiny(1), 40, 8); - GT_Values.RA.addChemicalRecipe(Materials.Carbon.getDust(1), GT_Values.NI, Materials.CarbonDioxide.getGas(1000), Materials.CarbonMonoxide.getGas(2000), GT_Values.NI, 800); - - GT_Values.RA.addChemicalRecipe(Materials.Coal.getGems(9), GT_Utility.getIntegratedCircuit(9), Materials.Oxygen.getGas(9000), Materials.CarbonMonoxide.getGas(9000), Materials.Ash.getDust(1), 720, 8); - GT_Values.RA.addChemicalRecipe(Materials.Coal.getDust(9), GT_Utility.getIntegratedCircuit(9), Materials.Oxygen.getGas(9000), Materials.CarbonMonoxide.getGas(9000), Materials.Ash.getDust(1), 720, 8); - GT_Values.RA.addChemicalRecipe(Materials.Charcoal.getGems(9), GT_Utility.getIntegratedCircuit(9), Materials.Oxygen.getGas(9000), Materials.CarbonMonoxide.getGas(9000), Materials.Ash.getDust(1), 720, 8); - GT_Values.RA.addChemicalRecipe(Materials.Charcoal.getDust(9), GT_Utility.getIntegratedCircuit(9), Materials.Oxygen.getGas(9000), Materials.CarbonMonoxide.getGas(9000), Materials.Ash.getDust(1), 720, 8); - GT_Values.RA.addChemicalRecipe(Materials.Coal.getGems(9), GT_Utility.getIntegratedCircuit(8), Materials.Oxygen.getGas(18000), Materials.CarbonDioxide.getGas(9000), Materials.Ash.getDust(1), 360, 8); - GT_Values.RA.addChemicalRecipe(Materials.Coal.getDust(9), GT_Utility.getIntegratedCircuit(8), Materials.Oxygen.getGas(18000), Materials.CarbonDioxide.getGas(9000), Materials.Ash.getDust(1), 360, 8); - GT_Values.RA.addChemicalRecipe(Materials.Charcoal.getGems(9), GT_Utility.getIntegratedCircuit(8), Materials.Oxygen.getGas(18000), Materials.CarbonDioxide.getGas(9000), Materials.Ash.getDust(1), 360, 8); - GT_Values.RA.addChemicalRecipe(Materials.Charcoal.getDust(9), GT_Utility.getIntegratedCircuit(8), Materials.Oxygen.getGas(18000), Materials.CarbonDioxide.getGas(9000), Materials.Ash.getDust(1), 360, 8); - //CO + 4H = CH3OH - GT_Values.RA.addChemicalRecipe(Materials.CarbonMonoxide.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Hydrogen.getGas(4000), Materials.Methanol.getFluid(1000), Materials.Empty.getCells(1), 120, 96); - GT_Values.RA.addChemicalRecipe(Materials.Hydrogen.getCells(4), GT_Utility.getIntegratedCircuit(1), Materials.CarbonMonoxide.getGas(1000), Materials.Methanol.getFluid(1000), Materials.Empty.getCells(4), 120, 96); - GT_Values.RA.addChemicalRecipe(Materials.CarbonMonoxide.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Hydrogen.getGas(4000), GT_Values.NF, Materials.Methanol.getCells(1), 120, 96); - GT_Values.RA.addChemicalRecipe(Materials.Hydrogen.getCells(4), GT_Utility.getIntegratedCircuit(11), Materials.CarbonMonoxide.getGas(1000), GT_Values.NF, Materials.Methanol.getCells(1), Materials.Empty.getCells(3), 120, 96); - //CO2 + 6H = CH3OH + H2O - GT_Values.RA.addChemicalRecipe(Materials.CarbonDioxide.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Hydrogen.getGas(6000), Materials.Methanol.getFluid(1000), Materials.Water.getCells(1), 120, 96); - GT_Values.RA.addChemicalRecipe(Materials.Hydrogen.getCells(6), GT_Utility.getIntegratedCircuit(1), Materials.CarbonDioxide.getGas(1000), Materials.Methanol.getFluid(1000), Materials.Water.getCells(1), Materials.Empty.getCells(3), 120, 96); - GT_Values.RA.addChemicalRecipe(Materials.CarbonDioxide.getCells(1), GT_Utility.getIntegratedCircuit(2), Materials.Hydrogen.getGas(6000), Materials.Methanol.getFluid(1000), Materials.Empty.getCells(1), 120, 96); - GT_Values.RA.addChemicalRecipe(Materials.Hydrogen.getCells(6), GT_Utility.getIntegratedCircuit(2), Materials.CarbonDioxide.getGas(1000), Materials.Methanol.getFluid(1000), Materials.Empty.getCells(6), 120, 96); - GT_Values.RA.addChemicalRecipe(Materials.CarbonDioxide.getCells(1), GT_Utility.getIntegratedCircuit(12), Materials.Hydrogen.getGas(6000), GT_Values.NF, Materials.Methanol.getCells(1), 120, 96); - GT_Values.RA.addChemicalRecipe(Materials.Hydrogen.getCells(6), GT_Utility.getIntegratedCircuit(12), Materials.CarbonDioxide.getGas(1000), GT_Values.NF, Materials.Methanol.getCells(1), Materials.Empty.getCells(5), 120, 96); - //C + 4H + O = CH3OH - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{Materials.Carbon.getDust(1), GT_Utility.getIntegratedCircuit(23)}, new FluidStack[]{Materials.Hydrogen.getGas(4000), Materials.Oxygen.getGas(1000)}, new FluidStack[]{Materials.Methanol.getFluid(1000)}, null, 320, 96); - - //CH3OH + CO = CH3COOH - GT_Values.RA.addChemicalRecipe(Materials.Methanol.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.CarbonMonoxide.getGas(1000), Materials.AceticAcid.getFluid(1000), Materials.Empty.getCells(1), 300); - GT_Values.RA.addChemicalRecipe(Materials.CarbonMonoxide.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Methanol.getFluid(1000), Materials.AceticAcid.getFluid(1000), Materials.Empty.getCells(1), 300); - GT_Values.RA.addChemicalRecipe(Materials.Methanol.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.CarbonMonoxide.getGas(1000), GT_Values.NF, Materials.AceticAcid.getCells(1), 300); - GT_Values.RA.addChemicalRecipe(Materials.CarbonMonoxide.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Methanol.getFluid(1000), GT_Values.NF, Materials.AceticAcid.getCells(1), 300); - //CH2CH2 + 2O = CH3COOH - GT_Values.RA.addChemicalRecipe(Materials.Ethylene.getCells(1), GT_Utility.getIntegratedCircuit(9), Materials.Oxygen.getGas(2000), Materials.AceticAcid.getFluid(1000), Materials.Empty.getCells(1), 100); - GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(2), GT_Utility.getIntegratedCircuit(9), Materials.Ethylene.getGas(1000), Materials.AceticAcid.getFluid(1000), Materials.Empty.getCells(2), 100); - GT_Values.RA.addChemicalRecipe(Materials.Ethylene.getCells(1), GT_Utility.getIntegratedCircuit(19), Materials.Oxygen.getGas(2000), GT_Values.NF, Materials.AceticAcid.getCells(1), 100); - GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(2), GT_Utility.getIntegratedCircuit(19), Materials.Ethylene.getGas(1000), GT_Values.NF, Materials.AceticAcid.getCells(1), Materials.Empty.getCells(1), 100); - //This recipe collides with one for Vinyl Chloride - //2C + 4H + 2O = CH3COOH - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{Materials.Carbon.getDust(2), GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.Hydrogen.getGas(4000), Materials.Oxygen.getGas(2000)}, new FluidStack[]{Materials.AceticAcid.getFluid(1000)}, null, 480, 30); - //2CO + 4H = CH3COOH - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.CarbonMonoxide.getGas(2000), Materials.Hydrogen.getGas(4000)}, new FluidStack[]{Materials.AceticAcid.getFluid(1000)}, null, 320, 30); - - GT_Values.RA.addFermentingRecipe(Materials.Biomass.getFluid(100), Materials.FermentedBiomass.getFluid(100), 150, false); - GT_Values.RA.addFermentingRecipe(new FluidStack(FluidRegistry.getFluid("ic2biomass"), 100), Materials.FermentedBiomass.getFluid(100), 150, false); - - GT_Values.RA.addPyrolyseRecipe(GT_ModHandler.getIC2Item("biochaff", 1), Materials.Water.getFluid(1500), 2, GT_Values.NI, Materials.FermentedBiomass.getFluid(1500), 200, 10); - GT_Values.RA.addPyrolyseRecipe(GT_Values.NI, new FluidStack(FluidRegistry.getFluid("ic2biomass"), 1000), 2, GT_Values.NI, Materials.FermentedBiomass.getFluid(1000), 100, 10); - GT_Values.RA.addPyrolyseRecipe(GT_Values.NI, Materials.Biomass.getFluid(1000), 2, GT_Values.NI, Materials.FermentedBiomass.getFluid(1000), 100, 10); - - GT_Values.RA.addDistillationTowerRecipe(Materials.FermentedBiomass.getFluid(1000), new FluidStack[]{ - Materials.AceticAcid.getFluid(25), Materials.Water.getFluid(375), Materials.Ethanol.getFluid(150), - Materials.Methanol.getFluid(150),Materials.Ammonia.getGas(100), Materials.CarbonDioxide.getGas(400), - Materials.Methane.getGas(600)}, ItemList.IC2_Fertilizer.get(1), 75, 180); - GT_Values.RA.addDistilleryRecipe(1, Materials.FermentedBiomass.getFluid(1000), Materials.AceticAcid.getFluid(25), ItemList.IC2_Fertilizer.get(1), 1500, 8, false); - GT_Values.RA.addDistilleryRecipe(2, Materials.FermentedBiomass.getFluid(1000), Materials.Water.getFluid(375), ItemList.IC2_Fertilizer.get(1), 1500, 8, false); - GT_Values.RA.addDistilleryRecipe(3, Materials.FermentedBiomass.getFluid(1000), Materials.Ethanol.getFluid(150), ItemList.IC2_Fertilizer.get(1), 1500, 8, false); - GT_Values.RA.addDistilleryRecipe(4, Materials.FermentedBiomass.getFluid(1000), Materials.Methanol.getFluid(150), ItemList.IC2_Fertilizer.get(1), 1500, 8, false); - GT_Values.RA.addDistilleryRecipe(5, Materials.FermentedBiomass.getFluid(1000), Materials.Ammonia.getGas(100), ItemList.IC2_Fertilizer.get(1), 1500, 8, false); - GT_Values.RA.addDistilleryRecipe(6, Materials.FermentedBiomass.getFluid(1000), Materials.CarbonDioxide.getGas(400), ItemList.IC2_Fertilizer.get(1), 1500, 8, false); - GT_Values.RA.addDistilleryRecipe(7, Materials.FermentedBiomass.getFluid(1000), Materials.Methane.getGas(600), ItemList.IC2_Fertilizer.get(1), 1500, 8, false); - - GT_Values.RA.addDistilleryRecipe(17, Materials.FermentedBiomass.getFluid(1000), new FluidStack(FluidRegistry.getFluid("ic2biogas"), 1800), ItemList.IC2_Fertilizer.get(1), 1600, 8, false); - GT_Values.RA.addDistilleryRecipe(1, Materials.Methane.getGas(1000), new FluidStack(FluidRegistry.getFluid("ic2biogas"), 3000), GT_Values.NI, 160, 8, false); - - GT_Values.RA.addPyrolyseRecipe(Materials.Sugar.getDust(23), GT_Values.NF, 1, Materials.Charcoal.getDust(12), Materials.Water.getFluid(1500), 320, 64); - GT_Values.RA.addPyrolyseRecipe(Materials.Sugar.getDust(23), Materials.Nitrogen.getGas(500), 2, Materials.Charcoal.getDust(12), Materials.Water.getFluid(1500), 160, 96); - - GT_Values.RA.addUniversalDistillationRecipewithCircuit(Materials.CharcoalByproducts.getGas(1000), new ItemStack[]{ GT_Utility.getIntegratedCircuit(1)}, - new FluidStack[]{Materials.WoodTar.getFluid(250), Materials.WoodVinegar.getFluid(400), Materials.WoodGas.getGas(250), Materials.Dimethylbenzene.getFluid(100)}, - Materials.Charcoal.getDustSmall(1), 40, 256); - - GT_Values.RA.addUniversalDistillationRecipewithCircuit(Materials.WoodGas.getGas(1000), new ItemStack[]{ GT_Utility.getIntegratedCircuit(1)}, - new FluidStack[]{Materials.CarbonDioxide.getGas(390), Materials.Ethylene.getGas(120), Materials.Methane.getGas(130), Materials.CarbonMonoxide.getGas(2340), Materials.Hydrogen.getGas(120)}, - GT_Values.NI, 40, 256); - GT_Values.RA.addUniversalDistillationRecipewithCircuit(Materials.WoodVinegar.getFluid(1000), new ItemStack[]{ GT_Utility.getIntegratedCircuit(1)}, - new FluidStack[]{Materials.AceticAcid.getFluid(100), Materials.Water.getFluid(500), Materials.Ethanol.getFluid(10), Materials.Methanol.getFluid(300), Materials.Acetone.getFluid(50), Materials.MethylAcetate.getFluid(10)}, - GT_Values.NI, 40, 256); - GT_Values.RA.addUniversalDistillationRecipewithCircuit(Materials.WoodTar.getFluid(1000), new ItemStack[]{ GT_Utility.getIntegratedCircuit(1)}, - new FluidStack[]{Materials.Creosote.getFluid(250), Materials.Phenol.getFluid(100), Materials.Benzene.getFluid(400), Materials.Toluene.getFluid(100), Materials.Dimethylbenzene.getFluid(150)}, - GT_Values.NI, 40, 256); - - //O + C2H4O2 + C2H4 = C4H6O2 + H2O - GT_Values.RA.addChemicalRecipe(Materials.Ethylene.getCells(1), Materials.AceticAcid.getCells(1), Materials.Oxygen.getGas(1000), Materials.VinylAcetate.getFluid(1000),Materials.Water.getCells(1), Materials.Empty.getCells(1), 180); - GT_Values.RA.addChemicalRecipe(Materials.AceticAcid.getCells(1),Materials.Oxygen.getCells(1), Materials.Ethylene.getGas(1000), Materials.VinylAcetate.getFluid(1000),Materials.Water.getCells(1), Materials.Empty.getCells(1), 180); - GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(1), Materials.Ethylene.getCells(1), Materials.AceticAcid.getFluid(1000), Materials.VinylAcetate.getFluid(1000),Materials.Water.getCells(1), Materials.Empty.getCells(1), 180); - - GT_Values.RA.addDefaultPolymerizationRecipes(Materials.VinylAcetate.mFluid, Materials.VinylAcetate.getCells(1), Materials.PolyvinylAcetate.mFluid); - - //Ethanol -> Ethylene (Intended loss for Sulfuric Acid) - GT_Values.RA.addChemicalRecipe(Materials.Ethanol.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.SulfuricAcid.getFluid(1000), Materials.DilutedSulfuricAcid.getFluid(1000), Materials.Ethylene.getCells(1), 1200, 120); - GT_Values.RA.addChemicalRecipe(Materials.SulfuricAcid.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Ethanol.getFluid(1000), Materials.DilutedSulfuricAcid.getFluid(1000), Materials.Ethylene.getCells(1), 1200, 120); - GT_Values.RA.addChemicalRecipe(Materials.Ethanol.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.SulfuricAcid.getFluid(1000), Materials.Ethylene.getGas(1000), Materials.DilutedSulfuricAcid.getCells(1), 1200, 120); - GT_Values.RA.addChemicalRecipe(Materials.SulfuricAcid.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Ethanol.getFluid(1000), Materials.Ethylene.getGas(1000), Materials.DilutedSulfuricAcid.getCells(1), 1200, 120); - - GT_Values.RA.addDefaultPolymerizationRecipes(Materials.Ethylene.mGas, Materials.Ethylene.getCells(1), Materials.Plastic.mStandardMoltenFluid); - - //H2O + Na = NaOH + H - GT_Values.RA.addChemicalRecipe(Materials.Sodium.getDust(1), GT_Utility.getIntegratedCircuit(1), Materials.Water.getFluid(1000), Materials.Hydrogen.getGas(1000), Materials.SodiumHydroxide.getDust(3), 200, 30); - - //H + Cl = HCl - GT_Values.RA.addChemicalRecipe(Materials.Chlorine.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Hydrogen.getGas(1000), Materials.HydrochloricAcid.getFluid(1000), Materials.Empty.getCells(1), 60, 8); - GT_Values.RA.addChemicalRecipe(Materials.Hydrogen.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Chlorine.getGas(1000), Materials.HydrochloricAcid.getFluid(1000), Materials.Empty.getCells(1), 60, 8); - GT_Values.RA.addChemicalRecipe(Materials.Chlorine.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Hydrogen.getGas(1000), GT_Values.NF, Materials.HydrochloricAcid.getCells(1), 60, 8); - GT_Values.RA.addChemicalRecipe(Materials.Hydrogen.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Chlorine.getGas(1000), GT_Values.NF, Materials.HydrochloricAcid.getCells(1), 60, 8); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(8)}, new FluidStack[]{Materials.Hydrogen.getGas(9000), Materials.Chlorine.getGas(9000)}, new FluidStack[]{Materials.HydrochloricAcid.getFluid(9000)}, null, 7, 480); - - //C3H6 + 2Cl = HCl + C3H5Cl - GT_Values.RA.addChemicalRecipe(Materials.Chlorine.getCells(2), GT_Utility.getIntegratedCircuit(1), Materials.Propene.getGas(1000), Materials.AllylChloride.getFluid(1000), Materials.HydrochloricAcid.getCells(1), Materials.Empty.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.Propene.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Chlorine.getGas(2000), Materials.AllylChloride.getFluid(1000), Materials.HydrochloricAcid.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.Chlorine.getCells(2), GT_Utility.getIntegratedCircuit(11), Materials.Propene.getGas(1000), Materials.HydrochloricAcid.getFluid(1000), Materials.AllylChloride.getCells(1), Materials.Empty.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.Propene.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Chlorine.getGas(2000), Materials.HydrochloricAcid.getFluid(1000), Materials.AllylChloride.getCells(1), 160); - - - //H2O + Cl =Hg= HClO + H - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Chlorine.getCells(10), Materials.Mercury.getCells(1), Materials.Water.getFluid(10000), Materials.HypochlorousAcid.getFluid(10000), Materials.Hydrogen.getCells(10), Materials.Empty.getCells(1), 600, 8); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Water.getCells(10), Materials.Mercury.getCells(1), Materials.Chlorine.getGas(10000), Materials.HypochlorousAcid.getFluid(10000), Materials.Hydrogen.getCells(10), Materials.Empty.getCells(1), 600, 8); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Chlorine.getCells(1), Materials.Water.getCells(1), Materials.Mercury.getFluid(100), Materials.HypochlorousAcid.getFluid(1000), Materials.Hydrogen.getCells(1), Materials.Empty.getCells(1), 60, 8); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(2)}, new FluidStack[]{Materials.Chlorine.getGas(10000), Materials.Water.getFluid(10000), Materials.Mercury.getFluid(1000)}, new FluidStack[]{Materials.HypochlorousAcid.getFluid(10000), Materials.Hydrogen.getGas(10000)}, null, 600, 8); - - //2Cl + H2O = HCl + HClO (Intended loss) - GT_Values.RA.addChemicalRecipe(Materials.Chlorine.getCells(2), GT_Utility.getIntegratedCircuit(1), Materials.Water.getFluid(1000), Materials.HypochlorousAcid.getFluid(1000), Materials.DilutedHydrochloricAcid.getCells(1), Materials.Empty.getCells(1), 120); - GT_Values.RA.addChemicalRecipe(Materials.Water.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Chlorine.getGas(2000), Materials.HypochlorousAcid.getFluid(1000), Materials.DilutedHydrochloricAcid.getCells(1), GT_Values.NI, 120); - GT_Values.RA.addChemicalRecipe(Materials.Chlorine.getCells(2), GT_Utility.getIntegratedCircuit(11), Materials.Water.getFluid(1000), Materials.DilutedHydrochloricAcid.getFluid(1000), Materials.HypochlorousAcid.getCells(1), Materials.Empty.getCells(1), 120); - GT_Values.RA.addChemicalRecipe(Materials.Water.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Chlorine.getGas(2000), Materials.DilutedHydrochloricAcid.getFluid(1000), Materials.HypochlorousAcid.getCells(1), GT_Values.NI, 120); - - //HClO + NaOH + C3H5Cl = C3H5ClO + NaCl·H2O - GT_Values.RA.addChemicalRecipe( Materials.HypochlorousAcid.getCells(1), Materials.SodiumHydroxide.getDust(3), Materials.AllylChloride.getFluid(1000), Materials.Epichlorohydrin.getFluid(1000), Materials.SaltWater.getCells(1), 480); - GT_Values.RA.addChemicalRecipe( Materials.SodiumHydroxide.getDust(3), Materials.AllylChloride.getCells(1), Materials.HypochlorousAcid.getFluid(1000), Materials.Epichlorohydrin.getFluid(1000), Materials.SaltWater.getCells(1), 480); - //HCl + C3H8O3 = C3H5ClO + 2H2O - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.HydrochloricAcid.getCells(1), Materials.Glycerol.getCells(1), GT_Values.NF, Materials.Epichlorohydrin.getFluid(1000), Materials.Water.getCells(2), GT_Values.NI, 480, 30); - //H2O + 4Cl + C3H6 + NaOH = C3H5ClO + NaCl·H2O + 2HCl - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{Materials.SodiumHydroxide.getDust(3), GT_Utility.getIntegratedCircuit(23)}, new FluidStack[]{Materials.Propene.getGas(1000), Materials.Chlorine.getGas(4000), Materials.Water.getFluid(1000)}, new FluidStack[]{Materials.Epichlorohydrin.getFluid(1000), Materials.SaltWater.getFluid(1000), Materials.HydrochloricAcid.getFluid(2000)}, null, 640, 30); - //H2O + 2Cl + C3H6 + NaOH =Hg= C3H5ClO + NaCl·H2O + 2H - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{Materials.SodiumHydroxide.getDust(3), GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.Propene.getGas(1000), Materials.Chlorine.getGas(2000), Materials.Water.getFluid(1000), Materials.Mercury.getFluid(100)}, new FluidStack[]{Materials.Epichlorohydrin.getFluid(1000), Materials.SaltWater.getFluid(1000), Materials.Hydrogen.getGas(2000)}, null, 640, 30); - //HClO + 2Cl + C3H6 + NaOH = C3H5ClO + NaCl·H2O + HCl - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{Materials.SodiumHydroxide.getDust(3), GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.Propene.getGas(1000), Materials.Chlorine.getGas(2000), Materials.HypochlorousAcid.getFluid(1000)}, new FluidStack[]{Materials.Epichlorohydrin.getFluid(1000), Materials.SaltWater.getFluid(1000), Materials.HydrochloricAcid.getFluid(1000)}, null, 640, 30); - - GT_Values.RA.addChemicalRecipe( Materials.HydrochloricAcid.getCells(1), Materials.Empty.getCells(1), Materials.Glycerol.getFluid(1000), Materials.Epichlorohydrin.getFluid(1000), Materials.Water.getCells(2), 480); - GT_Values.RA.addChemicalRecipe( Materials.Glycerol.getCells(1), Materials.Empty.getCells(1), Materials.HydrochloricAcid.getFluid(1000), Materials.Epichlorohydrin.getFluid(1000), Materials.Water.getCells(2), 480); - GT_Values.RA.addChemicalRecipe( Materials.HydrochloricAcid.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Glycerol.getFluid(1000), Materials.Water.getFluid(2000), Materials.Epichlorohydrin.getCells(1), 480); - GT_Values.RA.addChemicalRecipe( Materials.Glycerol.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.HydrochloricAcid.getFluid(1000), Materials.Water.getFluid(2000), Materials.Epichlorohydrin.getCells(1), 480); - GT_Values.RA.addChemicalRecipe( Materials.HydrochloricAcid.getCells(1), GT_Utility.getIntegratedCircuit(2), Materials.Glycerol.getFluid(1000), Materials.Epichlorohydrin.getFluid(1000), Materials.Empty.getCells(1), 480); - GT_Values.RA.addChemicalRecipe( Materials.Glycerol.getCells(1), GT_Utility.getIntegratedCircuit(2), Materials.HydrochloricAcid.getFluid(1000), Materials.Epichlorohydrin.getFluid(1000), Materials.Empty.getCells(1), 480); - GT_Values.RA.addChemicalRecipe( Materials.HydrochloricAcid.getCells(1), GT_Utility.getIntegratedCircuit(12), Materials.Glycerol.getFluid(1000), GT_Values.NF, Materials.Epichlorohydrin.getCells(1), 480); - GT_Values.RA.addChemicalRecipe( Materials.Glycerol.getCells(1), GT_Utility.getIntegratedCircuit(12), Materials.HydrochloricAcid.getFluid(1000), GT_Values.NF, Materials.Epichlorohydrin.getCells(1), 480); - - GT_Values.RA.addDistilleryRecipe(2, Materials.HeavyFuel.getFluid(100), Materials.Benzene.getFluid(40), 160, 24, false); - GT_Values.RA.addDistilleryRecipe(3, Materials.HeavyFuel.getFluid(100), Materials.Phenol.getFluid(25), 160, 24, false); - - //Ca5(PO4)3Cl + 5H2SO4 + 10H2O = 5CaSO4(H2O)2 + HCl + 3H3PO4 - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Apatite.getDust(9), Materials.SulfuricAcid.getCells(5), Materials.Water.getFluid(10000), Materials.PhosphoricAcid.getFluid(3000), Materials.HydrochloricAcid.getCells(1), Materials.Empty.getCells(4), 320, 30); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{Materials.Apatite.getDust(9)}, new FluidStack[]{Materials.SulfuricAcid.getFluid(5000), Materials.Water.getFluid(10000)}, new FluidStack[]{Materials.PhosphoricAcid.getFluid(3000), Materials.HydrochloricAcid.getFluid(1000)}, new ItemStack[]{Materials.Gypsum.getDust(40)}, 320, 30); - //10O + 4P = P4O10 - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Phosphorus.getDust(4), GT_Values.NI, Materials.Oxygen.getGas(10000), GT_Values.NF, Materials.PhosphorousPentoxide.getDust(14), GT_Values.NI, 40, 30); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{Materials.Phosphorus.getDust(4), GT_Utility.getIntegratedCircuit(1)}, new FluidStack[]{Materials.Oxygen.getGas(10000)}, null, new ItemStack[]{Materials.PhosphorousPentoxide.getDust(14)}, 40, 30); - //P4O10 + 6H2O = 4H3PO4 - GT_Values.RA.addChemicalRecipe(Materials.PhosphorousPentoxide.getDust(14), GT_Values.NI, Materials.Water.getFluid(6000), Materials.PhosphoricAcid.getFluid(4000), GT_Values.NI, 40); - //2P + 5O + 3H2O = 2H3PO4 - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{Materials.Phosphorus.getDust(1), GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.Oxygen.getGas(2500), Materials.Water.getFluid(1500)}, new FluidStack[]{Materials.PhosphoricAcid.getFluid(1000)}, null, 320, 30); - - //C6H6 + C3H6 = C9H12 - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Propene.getCells(8), Materials.PhosphoricAcid.getCells(1), Materials.Benzene.getFluid(8000), Materials.Cumene.getFluid(8000), Materials.Empty.getCells(9), GT_Values.NI, 1920, 30); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.PhosphoricAcid.getCells(1), Materials.Benzene.getCells(8), Materials.Propene.getGas(8000), Materials.Cumene.getFluid(8000), Materials.Empty.getCells(9), GT_Values.NI, 1920, 30); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Benzene.getCells(1), Materials.Propene.getCells(1), Materials.PhosphoricAcid.getFluid(125), Materials.Cumene.getFluid(1000), Materials.Empty.getCells(2), GT_Values.NI, 240 , 30); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1)}, new FluidStack[]{Materials.Propene.getGas(8000), Materials.Benzene.getFluid(8000), Materials.PhosphoricAcid.getFluid(1000)}, new FluidStack[]{Materials.Cumene.getFluid(8000)}, null, 1920, 30); - - //C9H12 + 2O = C6H6O + C3H6O - GT_Values.RA.addChemicalRecipe(Materials.Cumene.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Oxygen.getGas(2000), Materials.Acetone.getFluid(1000), Materials.Phenol.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(2), GT_Utility.getIntegratedCircuit(1), Materials.Cumene.getFluid(1000),Materials.Acetone.getFluid(1000), Materials.Phenol.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.Cumene.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Oxygen.getGas(2000), Materials.Phenol.getFluid(1000), Materials.Acetone.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(2), GT_Utility.getIntegratedCircuit(11), Materials.Cumene.getFluid(1000),Materials.Phenol.getFluid(1000), Materials.Acetone.getCells(1), 160); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.Propene.getGas(1000), Materials.Benzene.getFluid(1000), Materials.PhosphoricAcid.getFluid(100), Materials.Oxygen.getGas(2000)}, new FluidStack[]{Materials.Phenol.getFluid(1000), Materials.Acetone.getFluid(1000)}, null, 480, 30); - - //C3H6O + 2C6H6O =HCl= C15H16O2 + H2O - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Acetone.getCells(1), Materials.Phenol.getCells(2), Materials.HydrochloricAcid.getFluid(1000), Materials.BisphenolA.getFluid(1000), Materials.Water.getCells(1), Materials.Empty.getCells(2), 160, 30); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.HydrochloricAcid.getCells(1), Materials.Acetone.getCells(1), Materials.Phenol.getFluid(2000), Materials.BisphenolA.getFluid(1000), Materials.Water.getCells(1), Materials.Empty.getCells(1), 160, 30); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Phenol.getCells(2), Materials.HydrochloricAcid.getCells(1), Materials.Acetone.getFluid(1000), Materials.BisphenolA.getFluid(1000), Materials.Water.getCells(1), Materials.Empty.getCells(2), 160, 30); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1)}, new FluidStack[]{Materials.Acetone.getFluid(1000), Materials.Phenol.getFluid(2000), Materials.HydrochloricAcid.getFluid(1000)}, new FluidStack[]{Materials.BisphenolA.getFluid(1000), Materials.Water.getFluid(1000)}, null, 160, 30); - - //C15H16O2 + 2C3H5ClO + 2NaOH = C15H14O2(C3H5O)2 + 2NaCl·H2O - GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDust(6), Materials.Epichlorohydrin.getCells(2), Materials.BisphenolA.getFluid(1000), Materials.Epoxid.getMolten(1000), Materials.SaltWater.getCells(2), 200); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{Materials.SodiumHydroxide.getDust(6), GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.Acetone.getFluid(1000), Materials.Phenol.getFluid(2000), Materials.HydrochloricAcid.getFluid(1000), Materials.Epichlorohydrin.getFluid(2000)}, new FluidStack[]{Materials.Epoxid.getMolten(1000), Materials.SaltWater.getFluid(2000)}, null, 480, 30); - - //CH4O + HCl = CH3Cl + H2O - GT_Values.RA.addChemicalRecipe(Materials.Methanol.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.HydrochloricAcid.getFluid(1000), Materials.Chloromethane.getGas(1000), Materials.Water.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.HydrochloricAcid.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Methanol.getFluid(1000), Materials.Chloromethane.getGas(1000), Materials.Water.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.Methanol.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.HydrochloricAcid.getFluid(1000), Materials.Water.getFluid(1000), Materials.Chloromethane.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.HydrochloricAcid.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Methanol.getFluid(1000), Materials.Water.getFluid(1000), Materials.Chloromethane.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.Methanol.getCells(1), GT_Utility.getIntegratedCircuit(2), Materials.HydrochloricAcid.getFluid(1000), Materials.Chloromethane.getGas(1000), Materials.Empty.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.HydrochloricAcid.getCells(1), GT_Utility.getIntegratedCircuit(2), Materials.Methanol.getFluid(1000), Materials.Chloromethane.getGas(1000), Materials.Empty.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.Methanol.getCells(1), GT_Utility.getIntegratedCircuit(12), Materials.HydrochloricAcid.getFluid(1000), GT_Values.NF, Materials.Chloromethane.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.HydrochloricAcid.getCells(1), GT_Utility.getIntegratedCircuit(12), Materials.Methanol.getFluid(1000), GT_Values.NF, Materials.Chloromethane.getCells(1), 160); - - GT_Values.RA.addChemicalRecipe(Materials.Chlorine.getCells(2), GT_Utility.getIntegratedCircuit(1), Materials.Methane.getGas(1000), Materials.Chloromethane.getGas(1000), Materials.HydrochloricAcid.getCells(1), Materials.Empty.getCells(1), 80); - GT_Values.RA.addChemicalRecipe(Materials.Methane.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Chlorine.getGas(2000), Materials.Chloromethane.getGas(1000), Materials.HydrochloricAcid.getCells(1), 80); - GT_Values.RA.addChemicalRecipe(Materials.Chlorine.getCells(2), GT_Utility.getIntegratedCircuit(11), Materials.Methane.getGas(1000), Materials.HydrochloricAcid.getFluid(1000), Materials.Chloromethane.getCells(1), Materials.Empty.getCells(1), 80); - GT_Values.RA.addChemicalRecipe(Materials.Methane.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Chlorine.getGas(2000), Materials.HydrochloricAcid.getFluid(1000), Materials.Chloromethane.getCells(1), 80); - - //Cl6 + CH4 = CHCl3 + 3HCl - GT_Values.RA.addChemicalRecipe( Materials.Chlorine.getCells(6), GT_Utility.getIntegratedCircuit(3), Materials.Methane.getGas(1000), Materials.Chloroform.getFluid(1000), Materials.HydrochloricAcid.getCells(3), Materials.Empty.getCells(3), 80); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Methane.getCells(1), Materials.Empty.getCells(2), Materials.Chlorine.getGas(6000), Materials.Chloroform.getFluid(1000), Materials.HydrochloricAcid.getCells(3), GT_Values.NI, 80, 30); - GT_Values.RA.addChemicalRecipe( Materials.Chlorine.getCells(6), GT_Utility.getIntegratedCircuit(13), Materials.Methane.getGas(1000), Materials.HydrochloricAcid.getFluid(3000), Materials.Chloroform.getCells(1), Materials.Empty.getCells(5), 80); - GT_Values.RA.addChemicalRecipe( Materials.Methane.getCells(1), GT_Utility.getIntegratedCircuit(13), Materials.Chlorine.getGas(6000), Materials.HydrochloricAcid.getFluid(3000), Materials.Chloroform.getCells(1), 80); - - //H + F = HF - GT_Values.RA.addChemicalRecipe(Materials.Fluorine.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Hydrogen.getGas(1000), Materials.HydrofluoricAcid.getFluid(1000), Materials.Empty.getCells(1), 60, 8); - GT_Values.RA.addChemicalRecipe(Materials.Hydrogen.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Fluorine.getGas(1000), Materials.HydrofluoricAcid.getFluid(1000), Materials.Empty.getCells(1), 60, 8); - GT_Values.RA.addChemicalRecipe(Materials.Fluorine.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Hydrogen.getGas(1000), GT_Values.NF, Materials.HydrofluoricAcid.getCells(1), 60, 8); - GT_Values.RA.addChemicalRecipe(Materials.Hydrogen.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Fluorine.getGas(1000), GT_Values.NF, Materials.HydrofluoricAcid.getCells(1), 60, 8); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9)}, new FluidStack[]{Materials.Hydrogen.getGas(9000), Materials.Fluorine.getGas(9000)}, new FluidStack[]{Materials.HydrofluoricAcid.getFluid(9000)}, null, 7, 480); - - //4HF + 2CHCl3 = C2F4 + 6HCl - GT_Values.RA.addChemicalRecipe(Materials.Chloroform.getCells(2), Materials.HydrofluoricAcid.getCells(4), GT_Values.NF, Materials.Tetrafluoroethylene.getGas(1000), Materials.HydrochloricAcid.getCells(6), 480, 240); - GT_Values.RA.addChemicalRecipe(Materials.Chloroform.getCells(2), Materials.Empty.getCells(4), Materials.HydrofluoricAcid.getFluid(4000), Materials.Tetrafluoroethylene.getGas(1000), Materials.HydrochloricAcid.getCells(6), 480, 240); - GT_Values.RA.addChemicalRecipe(Materials.HydrofluoricAcid.getCells(4), Materials.Empty.getCells(2), Materials.Chloroform.getFluid(2000), Materials.Tetrafluoroethylene.getGas(1000), Materials.HydrochloricAcid.getCells(6), 480, 240); - GT_Values.RA.addChemicalRecipe(Materials.HydrofluoricAcid.getCells(4), GT_Utility.getIntegratedCircuit(11), Materials.Chloroform.getFluid(2000), Materials.HydrochloricAcid.getFluid(6000), Materials.Tetrafluoroethylene.getCells(1), Materials.Empty.getCells(3), 480, 240); - GT_Values.RA.addChemicalRecipe(Materials.Chloroform.getCells(2), GT_Utility.getIntegratedCircuit(11), Materials.HydrofluoricAcid.getFluid(4000), Materials.HydrochloricAcid.getFluid(6000), Materials.Tetrafluoroethylene.getCells(1), Materials.Empty.getCells(1), 480, 240); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.HydrofluoricAcid.getFluid(4000), Materials.Methane.getGas(2000), Materials.Chlorine.getGas(12000)}, new FluidStack[]{Materials.Tetrafluoroethylene.getGas(1000), Materials.HydrochloricAcid.getFluid(12000)}, null, 540, 240); - - GT_Values.RA.addDefaultPolymerizationRecipes(Materials.Tetrafluoroethylene.mGas, Materials.Tetrafluoroethylene.getCells(1), Materials.Polytetrafluoroethylene.mStandardMoltenFluid); - - //Si + 2CH3Cl = C2H6Cl2Si - GT_Values.RA.addChemicalRecipe( Materials.Silicon.getDust(1), GT_Utility.getIntegratedCircuit(1), Materials.Chloromethane.getGas(2000), Materials.Dimethyldichlorosilane.getFluid(1000), GT_Values.NI, 240, 96); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Silicon.getDust(1), Materials.Chloromethane.getCells(2), GT_Values.NF, Materials.Dimethyldichlorosilane.getFluid(1000), Materials.Empty.getCells(2), GT_Values.NI, 240, 96); - - GT_Values.RA.addChemicalRecipe(Materials.Dimethyldichlorosilane.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Water.getFluid(1000), Materials.DilutedHydrochloricAcid.getFluid(1000), Materials.Polydimethylsiloxane.getDust(3), Materials.Empty.getCells(1), 240, 96); - GT_Values.RA.addChemicalRecipe(Materials.Water.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Dimethyldichlorosilane.getFluid(1000), Materials.DilutedHydrochloricAcid.getFluid(1000), Materials.Polydimethylsiloxane.getDust(3), Materials.Empty.getCells(1), 240, 96); - GT_Values.RA.addChemicalRecipe(Materials.Dimethyldichlorosilane.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Water.getFluid(1000), GT_Values.NF, Materials.Polydimethylsiloxane.getDust(3), Materials.DilutedHydrochloricAcid.getCells(1), 240, 96); - GT_Values.RA.addChemicalRecipe(Materials.Water.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Dimethyldichlorosilane.getFluid(1000), GT_Values.NF, Materials.Polydimethylsiloxane.getDust(3), Materials.DilutedHydrochloricAcid.getCells(1), 240, 96); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Dimethyldichlorosilane.getCells(1), Materials.Water.getCells(1), GT_Values.NF, Materials.DilutedHydrochloricAcid.getFluid(1000), Materials.Polydimethylsiloxane.getDust(3), Materials.Empty.getCells(2), 240, 96); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{Materials.Silicon.getDust(1), GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.Methane.getGas(2000), Materials.Chlorine.getGas(4000), Materials.Water.getFluid(1000)}, new FluidStack[]{Materials.HydrochloricAcid.getFluid(2000), Materials.DilutedHydrochloricAcid.getFluid(2000)}, new ItemStack[]{Materials.Polydimethylsiloxane.getDust(3)}, 480, 96); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{Materials.Silicon.getDust(1), GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.Methanol.getFluid(2000), Materials.HydrochloricAcid.getFluid(2000)}, new FluidStack[]{Materials.DilutedHydrochloricAcid.getFluid(2000)}, new ItemStack[]{Materials.Polydimethylsiloxane.getDust(3)}, 480, 96); - - GT_Values.RA.addChemicalRecipe(Materials.Polydimethylsiloxane.getDust(9), Materials.Sulfur.getDust(1), GT_Values.NF, Materials.Silicone.getMolten(1296), GT_Values.NI, 600); - - //N + 3H = NH3 - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Nitrogen.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Hydrogen.getGas(3000), Materials.Ammonia.getGas(1000), Materials.Empty.getCells(1), GT_Values.NI,320, 384); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Hydrogen.getCells(3), GT_Utility.getIntegratedCircuit(1), Materials.Nitrogen.getGas(1000), Materials.Ammonia.getGas(1000), Materials.Empty.getCells(3), GT_Values.NI,320, 384); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Nitrogen.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Hydrogen.getGas(3000), GT_Values.NF, Materials.Ammonia.getCells(1), GT_Values.NI,320, 384); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.Nitrogen.getGas(10000), Materials.Hydrogen.getGas(30000)}, new FluidStack[]{Materials.Ammonia.getGas(10000)}, new ItemStack[]{null}, 800, 480); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Hydrogen.getCells(3), GT_Utility.getIntegratedCircuit(11), Materials.Nitrogen.getGas(1000), GT_Values.NF, Materials.Ammonia.getCells(1), Materials.Empty.getCells(2), 320, 384); - - //NH3 + 2CH4O = C2H7N + 2H2O - GT_Values.RA.addChemicalRecipe( Materials.Methanol.getCells(2), GT_Utility.getIntegratedCircuit(1), Materials.Ammonia.getGas(1000), Materials.Dimethylamine.getGas(1000), Materials.Water.getCells(2), 240, 120); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Ammonia.getCells(1), Materials.Empty.getCells(1), Materials.Methanol.getFluid(2000), Materials.Dimethylamine.getGas(1000), Materials.Water.getCells(2), GT_Values.NI, 240, 120); - GT_Values.RA.addChemicalRecipe( Materials.Methanol.getCells(2), GT_Utility.getIntegratedCircuit(11), Materials.Ammonia.getGas(1000), Materials.Water.getFluid(1000), Materials.Dimethylamine.getCells(1), Materials.Empty.getCells(1), 240, 120); - GT_Values.RA.addChemicalRecipe( Materials.Ammonia.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Methanol.getFluid(2000), Materials.Water.getFluid(1000), Materials.Dimethylamine.getCells(1), 240, 120); - GT_Values.RA.addChemicalRecipe( Materials.Methanol.getCells(2), GT_Utility.getIntegratedCircuit(2), Materials.Ammonia.getGas(1000), Materials.Dimethylamine.getGas(1000), Materials.Empty.getCells(2), 240, 120); - GT_Values.RA.addChemicalRecipe( Materials.Methanol.getCells(2), GT_Utility.getIntegratedCircuit(12), Materials.Ammonia.getGas(1000), GT_Values.NF, Materials.Dimethylamine.getCells(1), Materials.Empty.getCells(1), 240, 120); - GT_Values.RA.addChemicalRecipe( Materials.Ammonia.getCells(1), GT_Utility.getIntegratedCircuit(12), Materials.Methanol.getFluid(2000), GT_Values.NF, Materials.Dimethylamine.getCells(1), 240, 120); - - //NH3 + HClO = NH2Cl + H2O - GT_Values.RA.addChemicalRecipe(Materials.Ammonia.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.HypochlorousAcid.getFluid(1000), Materials.Chloramine.getFluid(1000), Materials.Water.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.HypochlorousAcid.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Ammonia.getGas(1000), Materials.Chloramine.getFluid(1000), Materials.Water.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.Ammonia.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.HypochlorousAcid.getFluid(1000), Materials.Water.getFluid(1000), Materials.Chloramine.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.HypochlorousAcid.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Ammonia.getGas(1000), Materials.Water.getFluid(1000), Materials.Chloramine.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.Ammonia.getCells(1), GT_Utility.getIntegratedCircuit(2), Materials.HypochlorousAcid.getFluid(1000), Materials.Chloramine.getFluid(1000), Materials.Empty.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.HypochlorousAcid.getCells(1), GT_Utility.getIntegratedCircuit(2), Materials.Ammonia.getGas(1000), Materials.Chloramine.getFluid(1000), Materials.Empty.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.Ammonia.getCells(1), GT_Utility.getIntegratedCircuit(12), Materials.HypochlorousAcid.getFluid(1000), GT_Values.NF, Materials.Chloramine.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.HypochlorousAcid.getCells(1), GT_Utility.getIntegratedCircuit(12), Materials.Ammonia.getGas(1000), GT_Values.NF, Materials.Chloramine.getCells(1), 160); - - //2NO2 = N2O4 - GT_Values.RA.addChemicalRecipe(GT_Utility.getIntegratedCircuit(2), GT_Values.NI, Materials.NitrogenDioxide.getGas(2000), Materials.DinitrogenTetroxide.getGas(1000), GT_Values.NI, 640); - GT_Values.RA.addChemicalRecipe(Materials.NitrogenDioxide.getCells(2), GT_Utility.getIntegratedCircuit(2), GT_Values.NF, Materials.DinitrogenTetroxide.getGas(1000), Materials.Empty.getCells(2), 640); - GT_Values.RA.addChemicalRecipe(Materials.NitrogenDioxide.getCells(2), GT_Utility.getIntegratedCircuit(12), GT_Values.NF, GT_Values.NF, Materials.DinitrogenTetroxide.getCells(1), Materials.Empty.getCells(1), 640); - - //2NH3 + 7O = N2O4 + 3H2O - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(23)}, new FluidStack[]{Materials.Ammonia.getGas(2000), Materials.Oxygen.getGas(7000)}, new FluidStack[]{Materials.DinitrogenTetroxide.getGas(1000), Materials.Water.getFluid(3000)}, null, 480, 30); - //7O + 6H + 2N = N2O4 + 3H2O - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(23)}, new FluidStack[]{Materials.Nitrogen.getGas(2000), Materials.Hydrogen.getGas(6000), Materials.Oxygen.getGas(7000)}, new FluidStack[]{Materials.DinitrogenTetroxide.getGas(1000), Materials.Water.getFluid(3000)}, null, 1100, 480); - - //2NH3 + 5O = 2NO + 3H2O - GT_Values.RA.addChemicalRecipe( Materials.Ammonia.getCells(4), GT_Utility.getIntegratedCircuit(1), Materials.Oxygen.getGas(10000), Materials.Water.getFluid(6000), Materials.NitricOxide.getCells(4), 320); - GT_Values.RA.addChemicalRecipe( Materials.Oxygen.getCells(10), GT_Utility.getIntegratedCircuit(1), Materials.Ammonia.getGas(4000), Materials.Water.getFluid(6000), Materials.NitricOxide.getCells(4), Materials.Empty.getCells(6), 320); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Ammonia.getCells(4), Materials.Empty.getCells(2), Materials.Oxygen.getGas(10000), Materials.NitricOxide.getGas(4000), Materials.Water.getCells(6), GT_Values.NI, 320, 30); - GT_Values.RA.addChemicalRecipe( Materials.Oxygen.getCells(10), GT_Utility.getIntegratedCircuit(11), Materials.Ammonia.getGas(4000), Materials.NitricOxide.getGas(4000), Materials.Water.getCells(6), Materials.Empty.getCells(4), 320); - GT_Values.RA.addChemicalRecipe( Materials.Ammonia.getCells(4), GT_Utility.getIntegratedCircuit(2), Materials.Oxygen.getGas(10000), GT_Values.NF, Materials.NitricOxide.getCells(4), 320); - GT_Values.RA.addChemicalRecipe( Materials.Oxygen.getCells(10), GT_Utility.getIntegratedCircuit(2), Materials.Ammonia.getGas(4000), GT_Values.NF, Materials.NitricOxide.getCells(4), Materials.Empty.getCells(6), 320); - GT_Values.RA.addChemicalRecipe( Materials.Oxygen.getCells(10), GT_Utility.getIntegratedCircuit(12), Materials.Ammonia.getGas(4000), Materials.NitricOxide.getGas(4000), Materials.Empty.getCells(10), 320); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9)}, new FluidStack[]{Materials.Oxygen.getGas(100000), Materials.Ammonia.getGas(36000)}, new FluidStack[]{Materials.NitricOxide.getGas(36000), Materials.Water.getFluid(54000)}, null, 170, 480); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(8)}, new FluidStack[]{Materials.Oxygen.getGas(100000), Materials.Ammonia.getGas(36000)}, new FluidStack[]{Materials.NitricOxide.getGas(36000)}, null, 170, 480); - - //NO + O = NO2 - GT_Values.RA.addChemicalRecipe(Materials.NitricOxide.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Oxygen.getGas(1000), Materials.NitrogenDioxide.getGas(1000), Materials.Empty.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.NitricOxide.getGas(1000), Materials.NitrogenDioxide.getGas(1000), Materials.Empty.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.NitricOxide.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Oxygen.getGas(1000), GT_Values.NF, Materials.NitrogenDioxide.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.NitricOxide.getGas(1000), GT_Values.NF, Materials.NitrogenDioxide.getCells(1), 160); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9)}, new FluidStack[]{Materials.NitricOxide.getGas(9000), Materials.Oxygen.getGas(9000)}, new FluidStack[]{Materials.NitrogenDioxide.getGas(18000)}, null, 80, 480); - - //H2O + 3NO2 = 2HNO3 + NO - GT_Values.RA.addChemicalRecipe( Materials.Water.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.NitrogenDioxide.getGas(3000), Materials.NitricAcid.getFluid(2000), Materials.NitricOxide.getCells(1), 240); - GT_Values.RA.addChemicalRecipe( Materials.NitrogenDioxide.getCells(3), GT_Utility.getIntegratedCircuit(1), Materials.Water.getFluid(1000), Materials.NitricAcid.getFluid(2000), Materials.NitricOxide.getCells(1), Materials.Empty.getCells(2), 240); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Water.getCells(1), Materials.Empty.getCells(1), Materials.NitrogenDioxide.getGas(3000), Materials.NitricOxide.getGas(1000), Materials.NitricAcid.getCells(2), GT_Values.NI, 240, 30); - GT_Values.RA.addChemicalRecipe( Materials.NitrogenDioxide.getCells(3), GT_Utility.getIntegratedCircuit(11), Materials.Water.getFluid(1000), Materials.NitricOxide.getGas(1000), Materials.NitricAcid.getCells(2), Materials.Empty.getCells(1), 240); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9)}, new FluidStack[]{Materials.NitrogenDioxide.getGas(27000), Materials.Water.getFluid(9000)}, new FluidStack[]{Materials.NitricAcid.getFluid(18000), Materials.NitricOxide.getGas(9000)}, null, 120, 480); - - //2NO2 + O + H2O = 2HNO3 - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.NitrogenDioxide.getCells(2), Materials.Oxygen.getCells(1), Materials.Water.getFluid(1000), Materials.NitricAcid.getFluid(2000), Materials.Empty.getCells(3), GT_Values.NI,240, 30); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Oxygen.getCells(1), Materials.Water.getCells(1), Materials.NitrogenDioxide.getGas(2000), Materials.NitricAcid.getFluid(2000), Materials.Empty.getCells(2), GT_Values.NI,240, 30); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Water.getCells(1), Materials.NitrogenDioxide.getCells(2), Materials.Oxygen.getGas(1000), Materials.NitricAcid.getFluid(2000), Materials.Empty.getCells(3), GT_Values.NI,240, 30); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.Hydrogen.getGas(3000), Materials.Nitrogen.getGas(1000), Materials.Oxygen.getGas(4000)}, new FluidStack[]{Materials.NitricAcid.getFluid(1000), Materials.Water.getFluid(1000)}, null, 320, 480); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.Ammonia.getGas(1000), Materials.Oxygen.getGas(4000)}, new FluidStack[]{Materials.NitricAcid.getFluid(1000), Materials.Water.getFluid(1000)}, null, 320, 30); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.NitrogenDioxide.getGas(2000), Materials.Oxygen.getGas(1000), Materials.Water.getFluid(1000)}, new FluidStack[]{Materials.NitricAcid.getFluid(2000)}, null, 320, 30); - - //S + 2H = H2S - GT_Values.RA.addChemicalRecipe(Materials.Sulfur.getDust(1), GT_Utility.getIntegratedCircuit(1), Materials.Hydrogen.getGas(2000), Materials.HydricSulfide.getGas(1000), GT_Values.NI, 60, 8); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Sulfur.getDust(1), Materials.Empty.getCells(1), Materials.Hydrogen.getGas(2000), GT_Values.NF, Materials.HydricSulfide.getCells(1), GT_Values.NI, 60, 8); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9), Materials.Sulfur.getDust(9)}, new FluidStack[]{Materials.Hydrogen.getGas(18000)}, new FluidStack[]{Materials.HydricSulfide.getGas(9000)}, null, 4, 120); - - //S + 2O = SO2 - GT_Values.RA.addChemicalRecipe(Materials.Sulfur.getDust(1), GT_Utility.getIntegratedCircuit(3), Materials.Oxygen.getGas(2000), Materials.SulfurDioxide.getGas(1000), GT_Values.NI, 60, 8); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9), Materials.Sulfur.getDust(9)}, new FluidStack[]{Materials.Oxygen.getGas(18000)}, new FluidStack[]{Materials.SulfurDioxide.getGas(9000)}, null, 4, 120); - - //H2S + 3O = SO2 + H2O - GT_Values.RA.addChemicalRecipe(Materials.HydricSulfide.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Oxygen.getGas(3000), Materials.SulfurDioxide.getGas(1000), Materials.Water.getCells(1), 120); - GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(3), GT_Utility.getIntegratedCircuit(1), Materials.HydricSulfide.getGas(1000), Materials.SulfurDioxide.getGas(1000), Materials.Water.getCells(1), Materials.Empty.getCells(2), 120); - GT_Values.RA.addChemicalRecipe(Materials.HydricSulfide.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Oxygen.getGas(3000), Materials.Water.getFluid(1000), Materials.SulfurDioxide.getCells(1), 120); - GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(3), GT_Utility.getIntegratedCircuit(11), Materials.HydricSulfide.getGas(1000), Materials.Water.getFluid(1000), Materials.SulfurDioxide.getCells(1), Materials.Empty.getCells(2), 120); - GT_Values.RA.addChemicalRecipe(Materials.HydricSulfide.getCells(1), GT_Utility.getIntegratedCircuit(2), Materials.Oxygen.getGas(3000), Materials.SulfurDioxide.getGas(1000), Materials.Empty.getCells(1), 120); - GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(3), GT_Utility.getIntegratedCircuit(2), Materials.HydricSulfide.getGas(1000), Materials.SulfurDioxide.getGas(1000), Materials.Empty.getCells(3), 120); - GT_Values.RA.addChemicalRecipe(Materials.HydricSulfide.getCells(1), GT_Utility.getIntegratedCircuit(12), Materials.Oxygen.getGas(3000), GT_Values.NF, Materials.SulfurDioxide.getCells(1), 120); - GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(3), GT_Utility.getIntegratedCircuit(12), Materials.HydricSulfide.getGas(1000), GT_Values.NF, Materials.SulfurDioxide.getCells(1), Materials.Empty.getCells(2), 120); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9)}, new FluidStack[]{Materials.HydricSulfide.getGas(9000), Materials.Oxygen.getGas(27000)}, new FluidStack[]{Materials.SulfurDioxide.getGas(9000), Materials.Water.getFluid(9000)}, null, 60, 480); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(8)}, new FluidStack[]{Materials.HydricSulfide.getGas(9000), Materials.Oxygen.getGas(27000)}, new FluidStack[]{Materials.SulfurDioxide.getGas(9000)}, null, 60, 480); - - //2H2S + SO2 = 3S + 2H2O - GT_Values.RA.addChemicalRecipe(Materials.SulfurDioxide.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.HydricSulfide.getGas(2000), Materials.Water.getFluid(2000), Materials.Sulfur.getDust(3), Materials.Empty.getCells(1), 120); - GT_Values.RA.addChemicalRecipe(Materials.HydricSulfide.getCells(2), GT_Utility.getIntegratedCircuit(1), Materials.SulfurDioxide.getGas(1000), Materials.Water.getFluid(2000), Materials.Sulfur.getDust(3), Materials.Empty.getCells(2), 120); - GT_Values.RA.addChemicalRecipe(Materials.SulfurDioxide.getCells(1), GT_Utility.getIntegratedCircuit(2), Materials.HydricSulfide.getGas(2000), GT_Values.NF, Materials.Sulfur.getDust(3), Materials.Empty.getCells(1), 120); - GT_Values.RA.addChemicalRecipe(Materials.HydricSulfide.getCells(2), GT_Utility.getIntegratedCircuit(2), Materials.SulfurDioxide.getGas(1000), GT_Values.NF, Materials.Sulfur.getDust(3), Materials.Empty.getCells(2), 120); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(7)}, new FluidStack[]{Materials.SulfurDioxide.getGas(9000), Materials.HydricSulfide.getGas(18000)}, null, new ItemStack[]{Materials.Sulfur.getDust(27)}, 60, 480); - - //SO2 + O = SO3 - GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.SulfurDioxide.getGas(1000), Materials.SulfurTrioxide.getGas(1000), Materials.Empty.getCells(1), 200); - GT_Values.RA.addChemicalRecipe(Materials.SulfurDioxide.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Oxygen.getGas(1000), Materials.SulfurTrioxide.getGas(1000), Materials.Empty.getCells(1), 200); - GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.SulfurDioxide.getGas(1000), GT_Values.NF, Materials.SulfurTrioxide.getCells(1), 200); - GT_Values.RA.addChemicalRecipe(Materials.SulfurDioxide.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Oxygen.getGas(1000), GT_Values.NF, Materials.SulfurTrioxide.getCells(1), 200); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9)}, new FluidStack[]{Materials.SulfurTrioxide.getGas(9000), Materials.Water.getFluid(9000)}, new FluidStack[]{Materials.SulfuricAcid.getFluid(9000)}, null, 260, 480); - - //SO3 + H2O = H2SO4 - GT_Values.RA.addChemicalRecipe(Materials.Water.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.SulfurTrioxide.getGas(1000), Materials.SulfuricAcid.getFluid(1000), Materials.Empty.getCells(1), 320, 8); - GT_Values.RA.addChemicalRecipe(Materials.SulfurTrioxide.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Water.getFluid(1000), Materials.SulfuricAcid.getFluid(1000), Materials.Empty.getCells(1), 320, 8); - GT_Values.RA.addChemicalRecipe(Materials.Water.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.SulfurTrioxide.getGas(1000), GT_Values.NF, Materials.SulfuricAcid.getCells(1), 320, 8); - GT_Values.RA.addChemicalRecipe(Materials.SulfurTrioxide.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Water.getFluid(1000), GT_Values.NF, Materials.SulfuricAcid.getCells(1), 320, 8); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{ GT_Utility.getIntegratedCircuit(24), Materials.Sulfur.getDust(1)}, new FluidStack[]{Materials.Oxygen.getGas(3000), Materials.Water.getFluid(1000)}, new FluidStack[]{Materials.SulfuricAcid.getFluid(1000)}, null, 480, 30); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(7), Materials.Sulfur.getDust(9)}, new FluidStack[]{Materials.Oxygen.getGas(27000), Materials.Water.getFluid(9000)}, new FluidStack[]{Materials.SulfuricAcid.getFluid(9000)}, null, 260, 480); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.HydricSulfide.getGas(1000), Materials.Oxygen.getGas(3000)}, new FluidStack[]{Materials.SulfuricAcid.getFluid(1000)}, null, 480, 30); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.SulfurDioxide.getGas(1000), Materials.Oxygen.getGas(1000), Materials.Water.getFluid(1000)}, new FluidStack[]{Materials.SulfuricAcid.getFluid(1000)}, null, 600, 30); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9)}, new FluidStack[]{Materials.SulfurDioxide.getGas(9000), Materials.Oxygen.getGas(9000), Materials.Water.getFluid(9000)}, new FluidStack[]{Materials.SulfuricAcid.getFluid(9000)}, null, 150, 480); - - GT_Values.RA.addUniversalDistillationRecipe(Materials.DilutedSulfuricAcid.getFluid(3000), new FluidStack[]{Materials.SulfuricAcid.getFluid(2000), Materials.Water.getFluid(1000)}, GT_Values.NI, 600, 120); - - //C2H4 + 2Cl = C2H3Cl + HCl - GT_Values.RA.addChemicalRecipe(Materials.Chlorine.getCells(2), GT_Utility.getIntegratedCircuit(1), Materials.Ethylene.getGas(1000), Materials.VinylChloride.getGas(1000), Materials.HydrochloricAcid.getCells(1), Materials.Empty.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.Ethylene.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Chlorine.getGas(2000), Materials.VinylChloride.getGas(1000), Materials.HydrochloricAcid.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.Chlorine.getCells(2), GT_Utility.getIntegratedCircuit(11), Materials.Ethylene.getGas(1000), Materials.HydrochloricAcid.getFluid(1000), Materials.VinylChloride.getCells(1), Materials.Empty.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.Ethylene.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Chlorine.getGas(2000), Materials.HydrochloricAcid.getFluid(1000), Materials.VinylChloride.getCells(1), 160); - - //C2H4 + HCl + O = C2H3Cl + H2O - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Ethylene.getCells(1), Materials.HydrochloricAcid.getCells(1), Materials.Oxygen.getGas(1000), Materials.VinylChloride.getGas(1000), Materials.Water.getCells(1), Materials.Empty.getCells(1), 160, 30); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.HydrochloricAcid.getCells(1), Materials.Oxygen.getCells(1), Materials.Ethylene.getGas(1000), Materials.VinylChloride.getGas(1000), Materials.Water.getCells(1), Materials.Empty.getCells(1), 160, 30); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Oxygen.getCells(1), Materials.Ethylene.getCells(1), Materials.HydrochloricAcid.getFluid(1000), Materials.VinylChloride.getGas(1000), Materials.Water.getCells(1), Materials.Empty.getCells(1), 160, 30); - - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(2)}, new FluidStack[]{Materials.HydrochloricAcid.getFluid(1000), Materials.Ethylene.getGas(1000), Materials.Oxygen.getGas(1000)}, new FluidStack[]{Materials.VinylChloride.getGas(1000), Materials.Water.getFluid(1000)}, null, 160, 30); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.Chlorine.getGas(2000), Materials.Ethylene.getGas(2000), Materials.Oxygen.getGas(1000)}, new FluidStack[]{Materials.VinylChloride.getGas(2000), Materials.Water.getFluid(1000)}, null, 240, 30); - - GT_Values.RA.addDefaultPolymerizationRecipes(Materials.VinylChloride.mGas, Materials.VinylChloride.getCells(1), Materials.PolyvinylChloride.mStandardMoltenFluid); - - GT_Values.RA.addMixerRecipe(Materials.Sugar.getDust(4), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.SulfuricAcid.getFluid(1000), Materials.DilutedSulfuricAcid.getFluid(1000), Materials.Charcoal.getGems(1), 1200, 2); - GT_Values.RA.addMixerRecipe(Materials.Wood.getDust(4), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.SulfuricAcid.getFluid(1000), Materials.DilutedSulfuricAcid.getFluid(1000), Materials.Charcoal.getGems(1), 1200, 2); - - //C3H6O = C2H2O + CH4 - GT_Values.RA.addUniversalDistillationRecipe(Materials.Acetone.getFluid(1000), new FluidStack[]{Materials.Ethenone.getGas(1000), Materials.Methane.getGas(1000)}, GT_Values.NI, 80, 640); - GT_Values.RA.addFluidHeaterRecipe(GT_Utility.getIntegratedCircuit(1), Materials.Acetone.getFluid(1000), Materials.Ethenone.getGas(1000), 160, 160); - //C2H4O2 =H2SO4= C2H2O + H2O - GT_Values.RA.addChemicalRecipe(Materials.AceticAcid.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.SulfuricAcid.getFluid(1000), Materials.DilutedSulfuricAcid.getFluid(1000), Materials.Ethenone.getCells(1), 160, 120); - GT_Values.RA.addChemicalRecipe(Materials.SulfuricAcid.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.AceticAcid.getFluid(1000), Materials.DilutedSulfuricAcid.getFluid(1000), Materials.Ethenone.getCells(1), 160, 120); - GT_Values.RA.addChemicalRecipe(Materials.AceticAcid.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.SulfuricAcid.getFluid(1000), Materials.Ethenone.getGas(1000), Materials.DilutedSulfuricAcid.getCells(1), 160, 120); - GT_Values.RA.addChemicalRecipe(Materials.SulfuricAcid.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.AceticAcid.getFluid(1000), Materials.Ethenone.getGas(1000), Materials.DilutedSulfuricAcid.getCells(1), 160, 120); - - //C2H2O + 8HNO3 = 2CN4O8 + 9H2O - //Chemically this recipe is wrong, but kept for minimizing breaking change. - GT_Values.RA.addChemicalRecipe(Materials.Ethenone.getCells(1), Materials.Empty.getCells(1), Materials.NitricAcid.getFluid(8000), Materials.Water.getFluid(9000), Materials.Tetranitromethane.getCells(2), 480, 120); - GT_Values.RA.addChemicalRecipe(Materials.Ethenone.getCells(1), GT_Utility.getIntegratedCircuit(12), Materials.NitricAcid.getFluid(8000), Materials.Tetranitromethane.getFluid(2000), Materials.Empty.getCells(1), 480, 120); - GT_Values.RA.addChemicalRecipe(Materials.NitricAcid.getCells(8), GT_Utility.getIntegratedCircuit(1), Materials.Ethenone.getGas(1000), Materials.Water.getFluid(9000), Materials.Tetranitromethane.getCells(2), Materials.Empty.getCells(6), 480, 120); - GT_Values.RA.addChemicalRecipe(Materials.NitricAcid.getCells(8), GT_Utility.getIntegratedCircuit(2), Materials.Ethenone.getGas(1000), GT_Values.NF, Materials.Tetranitromethane.getCells(2), Materials.Empty.getCells(6), 480, 120); - GT_Values.RA.addChemicalRecipe(Materials.NitricAcid.getCells(8), GT_Utility.getIntegratedCircuit(12), Materials.Ethenone.getGas(1000), Materials.Tetranitromethane.getFluid(2000), Materials.Empty.getCells(8), 480, 120); - GT_Values.RA.addChemicalRecipe(Materials.NitricAcid.getCells(8), Materials.Empty.getCells(1), Materials.Ethenone.getGas(1000), Materials.Tetranitromethane.getFluid(2000), Materials.Water.getCells(9), 480, 120); - GT_Values.RA.addChemicalRecipe(Materials.Ethenone.getCells(1), Materials.NitricAcid.getCells(8), GT_Values.NF, Materials.Tetranitromethane.getFluid(2000), Materials.Water.getCells(9), 480, 120); - - GT_Values.RA.addMixerRecipe(Materials.Fuel.getCells(1), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Tetranitromethane.getFluid(20), Materials.NitroFuel.getFluid(1000), Materials.Empty.getCells(1), 20, 480); - GT_Values.RA.addMixerRecipe(Materials.BioDiesel.getCells(1), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Tetranitromethane.getFluid(40), Materials.NitroFuel.getFluid(900), Materials.Empty.getCells(1), 20, 480); - - //C3H6 + C2H4 = C5H8 + 2H - GT_Values.RA.addChemicalRecipe(Materials.Propene.getCells(1), Materials.Empty.getCells(1), Materials.Ethylene.getGas(1000), Materials.Isoprene.getFluid(1000), Materials.Hydrogen.getCells(2), 120); - GT_Values.RA.addChemicalRecipe(Materials.Ethylene.getCells(1), Materials.Empty.getCells(1), Materials.Propene.getGas(1000), Materials.Isoprene.getFluid(1000), Materials.Hydrogen.getCells(2), 120); - GT_Values.RA.addChemicalRecipe(Materials.Propene.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Ethylene.getGas(1000), Materials.Hydrogen.getGas(2000), Materials.Isoprene.getCells(1), 120); - GT_Values.RA.addChemicalRecipe(Materials.Ethylene.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Propene.getGas(1000), Materials.Hydrogen.getGas(2000), Materials.Isoprene.getCells(1), 120); - GT_Values.RA.addChemicalRecipe(Materials.Empty.getCells(1), GT_Utility.getIntegratedCircuit(2), Materials.Propene.getGas(2000), Materials.Isoprene.getFluid(1000), Materials.Methane.getCells(1), 120); - GT_Values.RA.addChemicalRecipe(Materials.Propene.getCells(2), GT_Utility.getIntegratedCircuit(3), GT_Values.NF, Materials.Isoprene.getFluid(1000), Materials.Methane.getCells(1), Materials.Empty.getCells(1), 120); - GT_Values.RA.addChemicalRecipe(Materials.Empty.getCells(1), GT_Utility.getIntegratedCircuit(12), Materials.Propene.getGas(2000), Materials.Methane.getGas(1000), Materials.Isoprene.getCells(1), 120); - GT_Values.RA.addChemicalRecipe(Materials.Propene.getCells(2), GT_Utility.getIntegratedCircuit(12), GT_Values.NF, Materials.Methane.getGas(1000), Materials.Isoprene.getCells(1), Materials.Empty.getCells(1), 120); - - GT_Values.RA.addChemicalRecipe(ItemList.Cell_Air.get(1), GT_Utility.getIntegratedCircuit(1), Materials.Isoprene.getFluid(144), GT_Values.NF, Materials.RawRubber.getDust(1), Materials.Empty.getCells(1), 160); - GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(2), GT_Utility.getIntegratedCircuit(1), Materials.Isoprene.getFluid(288), GT_Values.NF, Materials.RawRubber.getDust(3), Materials.Empty.getCells(2), 320); - GT_Values.RA.addChemicalRecipe(Materials.Isoprene.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Air.getGas(14000), GT_Values.NF, Materials.RawRubber.getDust(7), Materials.Empty.getCells(1), 1120); - GT_Values.RA.addChemicalRecipe(Materials.Isoprene.getCells(2), GT_Utility.getIntegratedCircuit(1), Materials.Oxygen.getGas(14000), GT_Values.NF, Materials.RawRubber.getDust(21), Materials.Empty.getCells(2), 2240); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(2)}, new FluidStack[]{Materials.Isoprene.getFluid(1728), Materials.Air.getGas(6000), Materials.Titaniumtetrachloride.getFluid(80)}, null, new ItemStack[]{Materials.RawRubber.getDust(18)}, 640, 30); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(2)}, new FluidStack[]{Materials.Isoprene.getFluid(1728), Materials.Oxygen.getGas(6000), Materials.Titaniumtetrachloride.getFluid(80)}, null, new ItemStack[]{Materials.RawRubber.getDust(24)}, 640, 30); - - GT_Values.RA.addDefaultPolymerizationRecipes(Materials.Styrene.mFluid, Materials.Styrene.getCells(1), Materials.Polystyrene.mStandardMoltenFluid); - - GT_Values.RA.addChemicalRecipe(Materials.Benzene.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Ethylene.getGas(1000), Materials.Hydrogen.getGas(2000), Materials.Styrene.getCells(1), 120); - GT_Values.RA.addChemicalRecipe(Materials.Ethylene.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Benzene.getFluid(1000), Materials.Hydrogen.getGas(2000), Materials.Styrene.getCells(1), 120); - GT_Values.RA.addChemicalRecipe(Materials.Benzene.getCells(1), Materials.Empty.getCells(1), Materials.Ethylene.getGas(1000), Materials.Styrene.getFluid(1000), Materials.Hydrogen.getCells(2), 120); - GT_Values.RA.addChemicalRecipe(Materials.Ethylene.getCells(1), Materials.Empty.getCells(1), Materials.Benzene.getFluid(1000), Materials.Styrene.getFluid(1000), Materials.Hydrogen.getCells(2), 120); - - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Butadiene.getCells(1), ItemList.Cell_Air.get(5), Materials.Styrene.getFluid(350), GT_Values.NF, Materials.RawStyreneButadieneRubber.getDust(9), Materials.Empty.getCells(6), 160, 240); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Butadiene.getCells(1), Materials.Oxygen.getCells(5), Materials.Styrene.getFluid(350), GT_Values.NF, Materials.RawStyreneButadieneRubber.getDust(13), Materials.Empty.getCells(6), 160, 240); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Styrene.getCells(1), ItemList.Cell_Air.get(15), Materials.Butadiene.getGas(3000), GT_Values.NF, Materials.RawStyreneButadieneRubber.getDust(27), Materials.Empty.getCells(16), 480, 240); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Styrene.getCells(1), Materials.Oxygen.getCells(15), Materials.Butadiene.getGas(3000), GT_Values.NF, Materials.RawStyreneButadieneRubber.getDust(41), Materials.Empty.getCells(16), 480, 240); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Styrene.getCells(1), Materials.Butadiene.getCells(3), Materials.Air.getGas(15000), GT_Values.NF, Materials.RawStyreneButadieneRubber.getDust(27), Materials.Empty.getCells(4), 480, 240); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Styrene.getCells(1), Materials.Butadiene.getCells(3), Materials.Oxygen.getGas(15000), GT_Values.NF, Materials.RawStyreneButadieneRubber.getDust(41), Materials.Empty.getCells(4), 480, 240); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(3)}, new FluidStack[]{Materials.Styrene.getFluid(36), Materials.Butadiene.getGas(108), Materials.Air.getGas(2000)}, null, new ItemStack[]{Materials.RawStyreneButadieneRubber.getDust(1)}, 160, 240); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(3)}, new FluidStack[]{Materials.Styrene.getFluid(72), Materials.Butadiene.getGas(216), Materials.Oxygen.getGas(2000)}, null, new ItemStack[]{Materials.RawStyreneButadieneRubber.getDust(3)}, 160, 240); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(4)}, new FluidStack[]{Materials.Styrene.getFluid(540), Materials.Butadiene.getGas(1620), Materials.Titaniumtetrachloride.getFluid(100), Materials.Air.getGas(15000)}, null, new ItemStack[]{Materials.RawStyreneButadieneRubber.getDust(22), Materials.RawStyreneButadieneRubber.getDustSmall(2)}, 640, 240); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(4)}, new FluidStack[]{Materials.Styrene.getFluid(540), Materials.Butadiene.getGas(1620), Materials.Titaniumtetrachloride.getFluid(100), Materials.Oxygen.getGas(7500)}, null, new ItemStack[]{Materials.RawStyreneButadieneRubber.getDust(30)}, 640, 240); - - GT_Values.RA.addChemicalRecipe(Materials.RawStyreneButadieneRubber.getDust(9), Materials.Sulfur.getDust(1), GT_Values.NF, Materials.StyreneButadieneRubber.getMolten(1296), GT_Values.NI, 600); - - //C6H6 + 4Cl = C6H4Cl2 + 2HCl - GT_Values.RA.addChemicalRecipe( Materials.Benzene.getCells(1), GT_Utility.getIntegratedCircuit(2), Materials.Chlorine.getGas(4000), Materials.HydrochloricAcid.getFluid(2000), Materials.Dichlorobenzene.getCells(1), 240); - GT_Values.RA.addChemicalRecipe( Materials.Chlorine.getCells(4), GT_Utility.getIntegratedCircuit(2), Materials.Benzene.getFluid(1000), Materials.HydrochloricAcid.getFluid(2000), Materials.Dichlorobenzene.getCells(1), Materials.Empty.getCells(3), 240); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Benzene.getCells(1), Materials.Empty.getCells(1), Materials.Chlorine.getGas(4000), Materials.Dichlorobenzene.getFluid(1000), Materials.HydrochloricAcid.getCells(2), GT_Values.NI, 240, 30); - GT_Values.RA.addChemicalRecipe( Materials.Chlorine.getCells(4), GT_Utility.getIntegratedCircuit(12), Materials.Benzene.getFluid(1000), Materials.Dichlorobenzene.getFluid(1000), Materials.HydrochloricAcid.getCells(2), Materials.Empty.getCells(2), 240); - - GT_Values.RA.addChemicalRecipe(Materials.SodiumSulfide.getDust(3), ItemList.Cell_Air.get(8), Materials.Dichlorobenzene.getFluid(1000), Materials.PolyphenyleneSulfide.getMolten(1000), Materials.Salt.getDust(2), Materials.Empty.getCells(8), 240, 360); - GT_Values.RA.addChemicalRecipe(Materials.SodiumSulfide.getDust(3), Materials.Oxygen.getCells(8), Materials.Dichlorobenzene.getFluid(1000), Materials.PolyphenyleneSulfide.getMolten(1500), Materials.Salt.getDust(2), Materials.Empty.getCells(8), 240, 360); - - //NaCl + H2SO4 = NaHSO4 + HCl - GT_Values.RA.addChemicalRecipe(Materials.Salt.getDust(2), GT_Utility.getIntegratedCircuit(1), Materials.SulfuricAcid.getFluid(1000), Materials.HydrochloricAcid.getFluid(1000), Materials.SodiumBisulfate.getDust(7), 60); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9),Materials.Salt.getDust(18)}, new FluidStack[]{Materials.SulfuricAcid.getFluid(9000)}, new FluidStack[]{Materials.HydrochloricAcid.getFluid(9000)}, new ItemStack[]{Materials.SodiumBisulfate.getDust(63)}, 135, 120); - //NaOH + H2SO4 = NaHSO4 + H2O - GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDust(3),GT_Utility.getIntegratedCircuit(1), Materials.SulfuricAcid.getFluid(1000), Materials.Water.getFluid(1000),Materials.SodiumBisulfate.getDust(7), 60); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(9),Materials.SodiumHydroxide.getDust(27)}, new FluidStack[]{Materials.SulfuricAcid.getFluid(9000)}, new FluidStack[]{Materials.Water.getFluid(9000)}, new ItemStack[]{Materials.SodiumBisulfate.getDust(63)}, 135, 120); - //2NaHSO4 = 2H + Na2S2O8 - GT_Values.RA.addElectrolyzerRecipe(Materials.SodiumBisulfate.getDust(14), Materials.Empty.getCells(2), null, Materials.SodiumPersulfate.getFluid(1000), Materials.Hydrogen.getCells(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 600, 30); + private void addRecipesApril2017ChemistryUpdate() { + GT_Values.RA.addElectrolyzerRecipe( + GT_Utility.getIntegratedCircuit(1), + GT_Values.NI, + Materials.CarbonDioxide.getGas(1000), + Materials.Oxygen.getGas(2000), + Materials.Carbon.getDust(1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 300, + 120); + GT_Values.RA.addElectrolyzerRecipe( + GT_Utility.getIntegratedCircuit(11), + Materials.Empty.getCells(2), + Materials.CarbonDioxide.getGas(1000), + GT_Values.NF, + Materials.Carbon.getDust(1), + Materials.Oxygen.getCells(2), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 300, + 120); + // SO2 = S + 2O + GT_Values.RA.addElectrolyzerRecipe( + GT_Utility.getIntegratedCircuit(1), + GT_Values.NI, + Materials.SulfurDioxide.getGas(1000), + Materials.Oxygen.getGas(2000), + Materials.Sulfur.getDust(1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 300, + 120); + GT_Values.RA.addElectrolyzerRecipe( + GT_Utility.getIntegratedCircuit(11), + Materials.Empty.getCells(2), + Materials.SulfurDioxide.getGas(1000), + GT_Values.NF, + Materials.Sulfur.getDust(1), + Materials.Oxygen.getCells(2), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 300, + 120); + // NaCl = Na +Cl + GT_Values.RA.addElectrolyzerRecipe( + Materials.Salt.getDust(2), + GT_Values.NI, + GT_Values.NF, + Materials.Chlorine.getGas(1000), + Materials.Sodium.getDust(1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 320, + 30); + + // (NaCl·H2O)= NaOH + H + GT_Values.RA.addElectrolyzerRecipe( + Materials.Empty.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.SaltWater.getFluid(1000), + Materials.Chlorine.getGas(1000), + Materials.SodiumHydroxide.getDust(3), + Materials.Hydrogen.getCells(1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 720, + 30); + GT_Values.RA.addElectrolyzerRecipe( + Materials.Empty.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.SaltWater.getFluid(1000), + Materials.Hydrogen.getGas(1000), + Materials.SodiumHydroxide.getDust(3), + Materials.Chlorine.getCells(1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 720, + 30); + // HCl = H + Cl + GT_Values.RA.addElectrolyzerRecipe( + Materials.Empty.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.HydrochloricAcid.getFluid(1000), + Materials.Chlorine.getGas(1000), + Materials.Hydrogen.getCells(1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 720, + 30); + GT_Values.RA.addElectrolyzerRecipe( + Materials.Empty.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.HydrochloricAcid.getFluid(1000), + Materials.Hydrogen.getGas(1000), + Materials.Chlorine.getCells(1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 720, + 30); + + GT_Values.RA.addElectrolyzerRecipe( + Materials.HydrochloricAcid.getCells(1), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Chlorine.getGas(1000), + Materials.Hydrogen.getCells(1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 720, + 30); + GT_Values.RA.addElectrolyzerRecipe( + Materials.HydrochloricAcid.getCells(1), + GT_Utility.getIntegratedCircuit(11), + GT_Values.NF, + Materials.Hydrogen.getGas(1000), + Materials.Chlorine.getCells(1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 720, + 30); + // Na + H2O = NaOH + H + GT_Values.RA.addChemicalBathRecipe( + Materials.Sodium.getDust(1), + Materials.Water.getFluid(1000), + Materials.Hydrogen.getGas(1000), + Materials.SodiumHydroxide.getDust(3), + GT_Values.NI, + GT_Values.NI, + null, + 100, + 4); + // 2 0.5HCl(Diluted) = HCl + H2O + GT_Values.RA.addUniversalDistillationRecipe( + Materials.DilutedHydrochloricAcid.getFluid(2000), + new FluidStack[] {Materials.Water.getFluid(1000), Materials.HydrochloricAcid.getFluid(1000)}, + GT_Values.NI, + 600, + 64); + + // K + HNO3 = KNO3 + H (not real, but gameplay + GT_Values.RA.addChemicalRecipe( + Materials.Potassium.getDust(1), + GT_Utility.getIntegratedCircuit(2), + Materials.NitricAcid.getFluid(1000), + Materials.Hydrogen.getGas(1000), + Materials.Saltpeter.getDust(5), + 100, + 30); + // NaCl + H2O = (NaCl·H2O) + GT_Values.RA.addMixerRecipe( + Materials.Salt.getDust(2), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.Water.getFluid(1000), + Materials.SaltWater.getFluid(1000), + GT_Values.NI, + 100, + 8); + // (NaCl·H2O) = NaCl + H2O + GT_Values.RA.addDistilleryRecipe( + 1, + Materials.SaltWater.getFluid(1000), + GT_ModHandler.getDistilledWater(1000), + Materials.Salt.getDust(2), + 1600, + 30, + false); + + GT_Values.RA.addUniversalDistillationRecipe( + FluidRegistry.getFluidStack("potion.vinegar", 40), + new FluidStack[] {Materials.AceticAcid.getFluid(5), Materials.Water.getFluid(35)}, + GT_Values.NI, + 20, + 64); + // CaCO3 + 2 CH3COOH = Ca(CH3COO)2 + H2O + CO2 + GT_Values.RA.addMixerRecipe( + Materials.Calcite.getDust(5), + Materials.Empty.getCells(2), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.AceticAcid.getFluid(2000), + Materials.CalciumAcetateSolution.getFluid(1000), + Materials.Water.getCells(1), + Materials.CarbonDioxide.getCells(1), + GT_Values.NI, + GT_Values.NI, + 240, + 16); + GT_Values.RA.addMixerRecipe( + Materials.Calcite.getDust(5), + Materials.Empty.getCells(2), + GT_Utility.getIntegratedCircuit(11), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.AceticAcid.getFluid(2000), + Materials.Water.getFluid(1000), + Materials.CalciumAcetateSolution.getCells(1), + Materials.CarbonDioxide.getCells(1), + GT_Values.NI, + GT_Values.NI, + 240, + 16); + GT_Values.RA.addMixerRecipe( + Materials.Calcite.getDust(5), + Materials.Empty.getCells(2), + GT_Utility.getIntegratedCircuit(21), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.AceticAcid.getFluid(2000), + Materials.CarbonDioxide.getGas(1000), + Materials.Water.getCells(1), + Materials.CalciumAcetateSolution.getCells(1), + GT_Values.NI, + GT_Values.NI, + 240, + 16); + GT_Values.RA.addMixerRecipe( + Materials.Calcite.getDust(5), + Materials.Empty.getCells(1), + GT_Utility.getIntegratedCircuit(4), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.AceticAcid.getFluid(2000), + Materials.CalciumAcetateSolution.getFluid(1000), + Materials.CarbonDioxide.getCells(1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + 240, + 16); + GT_Values.RA.addMixerRecipe( + Materials.Calcite.getDust(5), + Materials.Empty.getCells(1), + GT_Utility.getIntegratedCircuit(14), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.AceticAcid.getFluid(2000), + Materials.CarbonDioxide.getGas(1000), + Materials.CalciumAcetateSolution.getCells(1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + 240, + 16); + // Ca + 2 CH3COOH = Ca(CH3COO)2 + 2H + GT_Values.RA.addMixerRecipe( + Materials.Calcium.getDust(1), + Materials.Empty.getCells(2), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NI, + Materials.AceticAcid.getFluid(2000), + Materials.CalciumAcetateSolution.getFluid(1000), + Materials.Hydrogen.getCells(2), + 80, + 16); + GT_Values.RA.addMixerRecipe( + Materials.Calcium.getDust(1), + Materials.Empty.getCells(1), + GT_Utility.getIntegratedCircuit(11), + GT_Values.NI, + Materials.AceticAcid.getFluid(2000), + Materials.Hydrogen.getGas(2000), + Materials.CalciumAcetateSolution.getCells(1), + 80, + 16); + // CaO + 2 CH3COOH = Ca(CH3COO)2 + H2O + GT_Values.RA.addMixerRecipe( + Materials.Quicklime.getDust(2), + Materials.Empty.getCells(1), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NI, + Materials.AceticAcid.getFluid(2000), + Materials.CalciumAcetateSolution.getFluid(1000), + Materials.Water.getCells(1), + 80, + 16); + GT_Values.RA.addMixerRecipe( + Materials.Quicklime.getDust(2), + Materials.Empty.getCells(1), + GT_Utility.getIntegratedCircuit(11), + GT_Values.NI, + Materials.AceticAcid.getFluid(2000), + Materials.Water.getFluid(1000), + Materials.CalciumAcetateSolution.getCells(1), + 80, + 16); + // GameRegistry.addSmelting(Materials.CalciumAcetateSolution.getCells(1), Materials.Acetone.getCells(1), 0); + // Ca(CH3COO)2 = CH3COCH3 + CaO + CO2 + GT_Values.RA.addFluidHeaterRecipe( + GT_Utility.getIntegratedCircuit(1), + Materials.CalciumAcetateSolution.getFluid(1000), + Materials.Acetone.getFluid(1000), + 80, + 30); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.CalciumAcetateSolution.getFluid(1000), + new FluidStack[] {Materials.Acetone.getFluid(1000), Materials.CarbonDioxide.getGas(1000)}, + Materials.Quicklime.getDust(2), + 80, + 480); + // 2CH3COOH = CH3COCH3 + CO2 + H + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.copyAmount(0, Materials.Calcite.getDust(5)), GT_Utility.getIntegratedCircuit(24) + }, + new FluidStack[] {Materials.AceticAcid.getFluid(2000)}, + new FluidStack[] { + Materials.Acetone.getFluid(1000), + Materials.CarbonDioxide.getGas(1000), + Materials.Water.getFluid(1000) + }, + null, + 400, + 480); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.copyAmount(0, Materials.Calcium.getDust(1)), GT_Utility.getIntegratedCircuit(24) + }, + new FluidStack[] {Materials.AceticAcid.getFluid(2000)}, + new FluidStack[] { + Materials.Acetone.getFluid(1000), + Materials.CarbonDioxide.getGas(1000), + Materials.Water.getFluid(1000) + }, + null, + 400, + 480); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] { + GT_Utility.copyAmount(0, Materials.Quicklime.getDust(2)), GT_Utility.getIntegratedCircuit(24) + }, + new FluidStack[] {Materials.AceticAcid.getFluid(2000)}, + new FluidStack[] { + Materials.Acetone.getFluid(1000), + Materials.CarbonDioxide.getGas(1000), + Materials.Water.getFluid(1000) + }, + null, + 400, + 480); + // CH3COOH + CH3OH = CH3COOCH3 + H2O + GT_Values.RA.addChemicalRecipe( + Materials.AceticAcid.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Methanol.getFluid(1000), + Materials.MethylAcetate.getFluid(1000), + Materials.Water.getCells(1), + 240); + GT_Values.RA.addChemicalRecipe( + Materials.Methanol.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.AceticAcid.getFluid(1000), + Materials.MethylAcetate.getFluid(1000), + Materials.Water.getCells(1), + 240); + GT_Values.RA.addChemicalRecipe( + Materials.AceticAcid.getCells(1), + GT_Utility.getIntegratedCircuit(2), + Materials.Methanol.getFluid(1000), + Materials.MethylAcetate.getFluid(1000), + Materials.Empty.getCells(1), + 240); + GT_Values.RA.addChemicalRecipe( + Materials.Methanol.getCells(1), + GT_Utility.getIntegratedCircuit(2), + Materials.AceticAcid.getFluid(1000), + Materials.MethylAcetate.getFluid(1000), + Materials.Empty.getCells(1), + 240); + GT_Values.RA.addChemicalRecipe( + Materials.AceticAcid.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Methanol.getFluid(1000), + Materials.Water.getFluid(1000), + Materials.MethylAcetate.getCells(1), + 240); + GT_Values.RA.addChemicalRecipe( + Materials.Methanol.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.AceticAcid.getFluid(1000), + Materials.Water.getFluid(1000), + Materials.MethylAcetate.getCells(1), + 240); + GT_Values.RA.addChemicalRecipe( + Materials.AceticAcid.getCells(1), + GT_Utility.getIntegratedCircuit(12), + Materials.Methanol.getFluid(1000), + GT_Values.NF, + Materials.MethylAcetate.getCells(1), + 240); + GT_Values.RA.addChemicalRecipe( + Materials.Methanol.getCells(1), + GT_Utility.getIntegratedCircuit(12), + Materials.AceticAcid.getFluid(1000), + GT_Values.NF, + Materials.MethylAcetate.getCells(1), + 240); + // 2CH3COOCH3 + 3CH3COCH3/(C4H6O2)n = 5Glue + GT_Values.RA.addMixerRecipe( + Materials.Acetone.getCells(3), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.PolyvinylAcetate.getFluid(2000), + Materials.AdvancedGlue.getFluid(5000), + Materials.Empty.getCells(3), + 100, + 8); + GT_Values.RA.addMixerRecipe( + Materials.PolyvinylAcetate.getCells(2), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.Acetone.getFluid(3000), + Materials.AdvancedGlue.getFluid(5000), + Materials.Empty.getCells(2), + 100, + 8); + GT_Values.RA.addMixerRecipe( + Materials.MethylAcetate.getCells(3), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.PolyvinylAcetate.getFluid(2000), + Materials.AdvancedGlue.getFluid(5000), + Materials.Empty.getCells(3), + 100, + 8); + GT_Values.RA.addMixerRecipe( + Materials.PolyvinylAcetate.getCells(2), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.MethylAcetate.getFluid(3000), + Materials.AdvancedGlue.getFluid(5000), + Materials.Empty.getCells(2), + 100, + 8); + // CO and CO2 recipes + GT_Values.RA.addChemicalRecipe( + Materials.Carbon.getDust(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Oxygen.getGas(1000), + Materials.CarbonMonoxide.getGas(1000), + GT_Values.NI, + 40, + 8); + GT_Values.RA.addChemicalRecipe( + Materials.Coal.getGems(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Oxygen.getGas(1000), + Materials.CarbonMonoxide.getGas(1000), + Materials.Ash.getDustTiny(1), + 80, + 8); + GT_Values.RA.addChemicalRecipe( + Materials.Coal.getDust(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Oxygen.getGas(1000), + Materials.CarbonMonoxide.getGas(1000), + Materials.Ash.getDustTiny(1), + 80, + 8); + GT_Values.RA.addChemicalRecipe( + Materials.Charcoal.getGems(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Oxygen.getGas(1000), + Materials.CarbonMonoxide.getGas(1000), + Materials.Ash.getDustTiny(1), + 80, + 8); + GT_Values.RA.addChemicalRecipe( + Materials.Charcoal.getDust(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Oxygen.getGas(1000), + Materials.CarbonMonoxide.getGas(1000), + Materials.Ash.getDustTiny(1), + 80, + 8); + GT_Values.RA.addChemicalRecipe( + Materials.Carbon.getDust(1), + GT_Utility.getIntegratedCircuit(2), + Materials.Oxygen.getGas(2000), + Materials.CarbonDioxide.getGas(1000), + GT_Values.NI, + 40, + 8); + GT_Values.RA.addChemicalRecipe( + Materials.Coal.getGems(1), + GT_Utility.getIntegratedCircuit(2), + Materials.Oxygen.getGas(2000), + Materials.CarbonDioxide.getGas(1000), + Materials.Ash.getDustTiny(1), + 40, + 8); + GT_Values.RA.addChemicalRecipe( + Materials.Coal.getDust(1), + GT_Utility.getIntegratedCircuit(2), + Materials.Oxygen.getGas(2000), + Materials.CarbonDioxide.getGas(1000), + Materials.Ash.getDustTiny(1), + 40, + 8); + GT_Values.RA.addChemicalRecipe( + Materials.Charcoal.getGems(1), + GT_Utility.getIntegratedCircuit(2), + Materials.Oxygen.getGas(2000), + Materials.CarbonDioxide.getGas(1000), + Materials.Ash.getDustTiny(1), + 40, + 8); + GT_Values.RA.addChemicalRecipe( + Materials.Charcoal.getDust(1), + GT_Utility.getIntegratedCircuit(2), + Materials.Oxygen.getGas(2000), + Materials.CarbonDioxide.getGas(1000), + Materials.Ash.getDustTiny(1), + 40, + 8); + GT_Values.RA.addChemicalRecipe( + Materials.Carbon.getDust(1), + GT_Values.NI, + Materials.CarbonDioxide.getGas(1000), + Materials.CarbonMonoxide.getGas(2000), + GT_Values.NI, + 800); + + GT_Values.RA.addChemicalRecipe( + Materials.Coal.getGems(9), + GT_Utility.getIntegratedCircuit(9), + Materials.Oxygen.getGas(9000), + Materials.CarbonMonoxide.getGas(9000), + Materials.Ash.getDust(1), + 720, + 8); + GT_Values.RA.addChemicalRecipe( + Materials.Coal.getDust(9), + GT_Utility.getIntegratedCircuit(9), + Materials.Oxygen.getGas(9000), + Materials.CarbonMonoxide.getGas(9000), + Materials.Ash.getDust(1), + 720, + 8); + GT_Values.RA.addChemicalRecipe( + Materials.Charcoal.getGems(9), + GT_Utility.getIntegratedCircuit(9), + Materials.Oxygen.getGas(9000), + Materials.CarbonMonoxide.getGas(9000), + Materials.Ash.getDust(1), + 720, + 8); + GT_Values.RA.addChemicalRecipe( + Materials.Charcoal.getDust(9), + GT_Utility.getIntegratedCircuit(9), + Materials.Oxygen.getGas(9000), + Materials.CarbonMonoxide.getGas(9000), + Materials.Ash.getDust(1), + 720, + 8); + GT_Values.RA.addChemicalRecipe( + Materials.Coal.getGems(9), + GT_Utility.getIntegratedCircuit(8), + Materials.Oxygen.getGas(18000), + Materials.CarbonDioxide.getGas(9000), + Materials.Ash.getDust(1), + 360, + 8); + GT_Values.RA.addChemicalRecipe( + Materials.Coal.getDust(9), + GT_Utility.getIntegratedCircuit(8), + Materials.Oxygen.getGas(18000), + Materials.CarbonDioxide.getGas(9000), + Materials.Ash.getDust(1), + 360, + 8); + GT_Values.RA.addChemicalRecipe( + Materials.Charcoal.getGems(9), + GT_Utility.getIntegratedCircuit(8), + Materials.Oxygen.getGas(18000), + Materials.CarbonDioxide.getGas(9000), + Materials.Ash.getDust(1), + 360, + 8); + GT_Values.RA.addChemicalRecipe( + Materials.Charcoal.getDust(9), + GT_Utility.getIntegratedCircuit(8), + Materials.Oxygen.getGas(18000), + Materials.CarbonDioxide.getGas(9000), + Materials.Ash.getDust(1), + 360, + 8); + // CO + 4H = CH3OH + GT_Values.RA.addChemicalRecipe( + Materials.CarbonMonoxide.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Hydrogen.getGas(4000), + Materials.Methanol.getFluid(1000), + Materials.Empty.getCells(1), + 120, + 96); + GT_Values.RA.addChemicalRecipe( + Materials.Hydrogen.getCells(4), + GT_Utility.getIntegratedCircuit(1), + Materials.CarbonMonoxide.getGas(1000), + Materials.Methanol.getFluid(1000), + Materials.Empty.getCells(4), + 120, + 96); + GT_Values.RA.addChemicalRecipe( + Materials.CarbonMonoxide.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Hydrogen.getGas(4000), + GT_Values.NF, + Materials.Methanol.getCells(1), + 120, + 96); + GT_Values.RA.addChemicalRecipe( + Materials.Hydrogen.getCells(4), + GT_Utility.getIntegratedCircuit(11), + Materials.CarbonMonoxide.getGas(1000), + GT_Values.NF, + Materials.Methanol.getCells(1), + Materials.Empty.getCells(3), + 120, + 96); + // CO2 + 6H = CH3OH + H2O + GT_Values.RA.addChemicalRecipe( + Materials.CarbonDioxide.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Hydrogen.getGas(6000), + Materials.Methanol.getFluid(1000), + Materials.Water.getCells(1), + 120, + 96); + GT_Values.RA.addChemicalRecipe( + Materials.Hydrogen.getCells(6), + GT_Utility.getIntegratedCircuit(1), + Materials.CarbonDioxide.getGas(1000), + Materials.Methanol.getFluid(1000), + Materials.Water.getCells(1), + Materials.Empty.getCells(3), + 120, + 96); + GT_Values.RA.addChemicalRecipe( + Materials.CarbonDioxide.getCells(1), + GT_Utility.getIntegratedCircuit(2), + Materials.Hydrogen.getGas(6000), + Materials.Methanol.getFluid(1000), + Materials.Empty.getCells(1), + 120, + 96); + GT_Values.RA.addChemicalRecipe( + Materials.Hydrogen.getCells(6), + GT_Utility.getIntegratedCircuit(2), + Materials.CarbonDioxide.getGas(1000), + Materials.Methanol.getFluid(1000), + Materials.Empty.getCells(6), + 120, + 96); + GT_Values.RA.addChemicalRecipe( + Materials.CarbonDioxide.getCells(1), + GT_Utility.getIntegratedCircuit(12), + Materials.Hydrogen.getGas(6000), + GT_Values.NF, + Materials.Methanol.getCells(1), + 120, + 96); + GT_Values.RA.addChemicalRecipe( + Materials.Hydrogen.getCells(6), + GT_Utility.getIntegratedCircuit(12), + Materials.CarbonDioxide.getGas(1000), + GT_Values.NF, + Materials.Methanol.getCells(1), + Materials.Empty.getCells(5), + 120, + 96); + // C + 4H + O = CH3OH + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {Materials.Carbon.getDust(1), GT_Utility.getIntegratedCircuit(23)}, + new FluidStack[] {Materials.Hydrogen.getGas(4000), Materials.Oxygen.getGas(1000)}, + new FluidStack[] {Materials.Methanol.getFluid(1000)}, + null, + 320, + 96); + + // CH3OH + CO = CH3COOH + GT_Values.RA.addChemicalRecipe( + Materials.Methanol.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.CarbonMonoxide.getGas(1000), + Materials.AceticAcid.getFluid(1000), + Materials.Empty.getCells(1), + 300); + GT_Values.RA.addChemicalRecipe( + Materials.CarbonMonoxide.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Methanol.getFluid(1000), + Materials.AceticAcid.getFluid(1000), + Materials.Empty.getCells(1), + 300); + GT_Values.RA.addChemicalRecipe( + Materials.Methanol.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.CarbonMonoxide.getGas(1000), + GT_Values.NF, + Materials.AceticAcid.getCells(1), + 300); + GT_Values.RA.addChemicalRecipe( + Materials.CarbonMonoxide.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Methanol.getFluid(1000), + GT_Values.NF, + Materials.AceticAcid.getCells(1), + 300); + // CH2CH2 + 2O = CH3COOH + GT_Values.RA.addChemicalRecipe( + Materials.Ethylene.getCells(1), + GT_Utility.getIntegratedCircuit(9), + Materials.Oxygen.getGas(2000), + Materials.AceticAcid.getFluid(1000), + Materials.Empty.getCells(1), + 100); + GT_Values.RA.addChemicalRecipe( + Materials.Oxygen.getCells(2), + GT_Utility.getIntegratedCircuit(9), + Materials.Ethylene.getGas(1000), + Materials.AceticAcid.getFluid(1000), + Materials.Empty.getCells(2), + 100); + GT_Values.RA.addChemicalRecipe( + Materials.Ethylene.getCells(1), + GT_Utility.getIntegratedCircuit(19), + Materials.Oxygen.getGas(2000), + GT_Values.NF, + Materials.AceticAcid.getCells(1), + 100); + GT_Values.RA.addChemicalRecipe( + Materials.Oxygen.getCells(2), + GT_Utility.getIntegratedCircuit(19), + Materials.Ethylene.getGas(1000), + GT_Values.NF, + Materials.AceticAcid.getCells(1), + Materials.Empty.getCells(1), + 100); + // This recipe collides with one for Vinyl Chloride + // 2C + 4H + 2O = CH3COOH + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {Materials.Carbon.getDust(2), GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] {Materials.Hydrogen.getGas(4000), Materials.Oxygen.getGas(2000)}, + new FluidStack[] {Materials.AceticAcid.getFluid(1000)}, + null, + 480, + 30); + // 2CO + 4H = CH3COOH + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] {Materials.CarbonMonoxide.getGas(2000), Materials.Hydrogen.getGas(4000)}, + new FluidStack[] {Materials.AceticAcid.getFluid(1000)}, + null, + 320, + 30); + + GT_Values.RA.addFermentingRecipe( + Materials.Biomass.getFluid(100), Materials.FermentedBiomass.getFluid(100), 150, false); + GT_Values.RA.addFermentingRecipe( + new FluidStack(FluidRegistry.getFluid("ic2biomass"), 100), + Materials.FermentedBiomass.getFluid(100), + 150, + false); + + GT_Values.RA.addPyrolyseRecipe( + GT_ModHandler.getIC2Item("biochaff", 1), + Materials.Water.getFluid(1500), + 2, + GT_Values.NI, + Materials.FermentedBiomass.getFluid(1500), + 200, + 10); + GT_Values.RA.addPyrolyseRecipe( + GT_Values.NI, + new FluidStack(FluidRegistry.getFluid("ic2biomass"), 1000), + 2, + GT_Values.NI, + Materials.FermentedBiomass.getFluid(1000), + 100, + 10); + GT_Values.RA.addPyrolyseRecipe( + GT_Values.NI, + Materials.Biomass.getFluid(1000), + 2, + GT_Values.NI, + Materials.FermentedBiomass.getFluid(1000), + 100, + 10); + + GT_Values.RA.addDistillationTowerRecipe( + Materials.FermentedBiomass.getFluid(1000), + new FluidStack[] { + Materials.AceticAcid.getFluid(25), Materials.Water.getFluid(375), Materials.Ethanol.getFluid(150), + Materials.Methanol.getFluid(150), Materials.Ammonia.getGas(100), + Materials.CarbonDioxide.getGas(400), + Materials.Methane.getGas(600) + }, + ItemList.IC2_Fertilizer.get(1), + 75, + 180); + GT_Values.RA.addDistilleryRecipe( + 1, + Materials.FermentedBiomass.getFluid(1000), + Materials.AceticAcid.getFluid(25), + ItemList.IC2_Fertilizer.get(1), + 1500, + 8, + false); + GT_Values.RA.addDistilleryRecipe( + 2, + Materials.FermentedBiomass.getFluid(1000), + Materials.Water.getFluid(375), + ItemList.IC2_Fertilizer.get(1), + 1500, + 8, + false); + GT_Values.RA.addDistilleryRecipe( + 3, + Materials.FermentedBiomass.getFluid(1000), + Materials.Ethanol.getFluid(150), + ItemList.IC2_Fertilizer.get(1), + 1500, + 8, + false); + GT_Values.RA.addDistilleryRecipe( + 4, + Materials.FermentedBiomass.getFluid(1000), + Materials.Methanol.getFluid(150), + ItemList.IC2_Fertilizer.get(1), + 1500, + 8, + false); + GT_Values.RA.addDistilleryRecipe( + 5, + Materials.FermentedBiomass.getFluid(1000), + Materials.Ammonia.getGas(100), + ItemList.IC2_Fertilizer.get(1), + 1500, + 8, + false); + GT_Values.RA.addDistilleryRecipe( + 6, + Materials.FermentedBiomass.getFluid(1000), + Materials.CarbonDioxide.getGas(400), + ItemList.IC2_Fertilizer.get(1), + 1500, + 8, + false); + GT_Values.RA.addDistilleryRecipe( + 7, + Materials.FermentedBiomass.getFluid(1000), + Materials.Methane.getGas(600), + ItemList.IC2_Fertilizer.get(1), + 1500, + 8, + false); + + GT_Values.RA.addDistilleryRecipe( + 17, + Materials.FermentedBiomass.getFluid(1000), + new FluidStack(FluidRegistry.getFluid("ic2biogas"), 1800), + ItemList.IC2_Fertilizer.get(1), + 1600, + 8, + false); + GT_Values.RA.addDistilleryRecipe( + 1, + Materials.Methane.getGas(1000), + new FluidStack(FluidRegistry.getFluid("ic2biogas"), 3000), + GT_Values.NI, + 160, + 8, + false); + + GT_Values.RA.addPyrolyseRecipe( + Materials.Sugar.getDust(23), + GT_Values.NF, + 1, + Materials.Charcoal.getDust(12), + Materials.Water.getFluid(1500), + 320, + 64); + GT_Values.RA.addPyrolyseRecipe( + Materials.Sugar.getDust(23), + Materials.Nitrogen.getGas(500), + 2, + Materials.Charcoal.getDust(12), + Materials.Water.getFluid(1500), + 160, + 96); + + GT_Values.RA.addUniversalDistillationRecipewithCircuit( + Materials.CharcoalByproducts.getGas(1000), + new ItemStack[] {GT_Utility.getIntegratedCircuit(1)}, + new FluidStack[] { + Materials.WoodTar.getFluid(250), + Materials.WoodVinegar.getFluid(400), + Materials.WoodGas.getGas(250), + Materials.Dimethylbenzene.getFluid(100) + }, + Materials.Charcoal.getDustSmall(1), + 40, + 256); + + GT_Values.RA.addUniversalDistillationRecipewithCircuit( + Materials.WoodGas.getGas(1000), + new ItemStack[] {GT_Utility.getIntegratedCircuit(1)}, + new FluidStack[] { + Materials.CarbonDioxide.getGas(390), + Materials.Ethylene.getGas(120), + Materials.Methane.getGas(130), + Materials.CarbonMonoxide.getGas(2340), + Materials.Hydrogen.getGas(120) + }, + GT_Values.NI, + 40, + 256); + GT_Values.RA.addUniversalDistillationRecipewithCircuit( + Materials.WoodVinegar.getFluid(1000), + new ItemStack[] {GT_Utility.getIntegratedCircuit(1)}, + new FluidStack[] { + Materials.AceticAcid.getFluid(100), + Materials.Water.getFluid(500), + Materials.Ethanol.getFluid(10), + Materials.Methanol.getFluid(300), + Materials.Acetone.getFluid(50), + Materials.MethylAcetate.getFluid(10) + }, + GT_Values.NI, + 40, + 256); + GT_Values.RA.addUniversalDistillationRecipewithCircuit( + Materials.WoodTar.getFluid(1000), + new ItemStack[] {GT_Utility.getIntegratedCircuit(1)}, + new FluidStack[] { + Materials.Creosote.getFluid(250), + Materials.Phenol.getFluid(100), + Materials.Benzene.getFluid(400), + Materials.Toluene.getFluid(100), + Materials.Dimethylbenzene.getFluid(150) + }, + GT_Values.NI, + 40, + 256); + + // O + C2H4O2 + C2H4 = C4H6O2 + H2O + GT_Values.RA.addChemicalRecipe( + Materials.Ethylene.getCells(1), + Materials.AceticAcid.getCells(1), + Materials.Oxygen.getGas(1000), + Materials.VinylAcetate.getFluid(1000), + Materials.Water.getCells(1), + Materials.Empty.getCells(1), + 180); + GT_Values.RA.addChemicalRecipe( + Materials.AceticAcid.getCells(1), + Materials.Oxygen.getCells(1), + Materials.Ethylene.getGas(1000), + Materials.VinylAcetate.getFluid(1000), + Materials.Water.getCells(1), + Materials.Empty.getCells(1), + 180); + GT_Values.RA.addChemicalRecipe( + Materials.Oxygen.getCells(1), + Materials.Ethylene.getCells(1), + Materials.AceticAcid.getFluid(1000), + Materials.VinylAcetate.getFluid(1000), + Materials.Water.getCells(1), + Materials.Empty.getCells(1), + 180); + + GT_Values.RA.addDefaultPolymerizationRecipes( + Materials.VinylAcetate.mFluid, Materials.VinylAcetate.getCells(1), Materials.PolyvinylAcetate.mFluid); + + // Ethanol -> Ethylene (Intended loss for Sulfuric Acid) + GT_Values.RA.addChemicalRecipe( + Materials.Ethanol.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.SulfuricAcid.getFluid(1000), + Materials.DilutedSulfuricAcid.getFluid(1000), + Materials.Ethylene.getCells(1), + 1200, + 120); + GT_Values.RA.addChemicalRecipe( + Materials.SulfuricAcid.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Ethanol.getFluid(1000), + Materials.DilutedSulfuricAcid.getFluid(1000), + Materials.Ethylene.getCells(1), + 1200, + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Ethanol.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.SulfuricAcid.getFluid(1000), + Materials.Ethylene.getGas(1000), + Materials.DilutedSulfuricAcid.getCells(1), + 1200, + 120); + GT_Values.RA.addChemicalRecipe( + Materials.SulfuricAcid.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Ethanol.getFluid(1000), + Materials.Ethylene.getGas(1000), + Materials.DilutedSulfuricAcid.getCells(1), + 1200, + 120); + + GT_Values.RA.addDefaultPolymerizationRecipes( + Materials.Ethylene.mGas, Materials.Ethylene.getCells(1), Materials.Plastic.mStandardMoltenFluid); + + // H2O + Na = NaOH + H + GT_Values.RA.addChemicalRecipe( + Materials.Sodium.getDust(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Water.getFluid(1000), + Materials.Hydrogen.getGas(1000), + Materials.SodiumHydroxide.getDust(3), + 200, + 30); + + // H + Cl = HCl + GT_Values.RA.addChemicalRecipe( + Materials.Chlorine.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Hydrogen.getGas(1000), + Materials.HydrochloricAcid.getFluid(1000), + Materials.Empty.getCells(1), + 60, + 8); + GT_Values.RA.addChemicalRecipe( + Materials.Hydrogen.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Chlorine.getGas(1000), + Materials.HydrochloricAcid.getFluid(1000), + Materials.Empty.getCells(1), + 60, + 8); + GT_Values.RA.addChemicalRecipe( + Materials.Chlorine.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Hydrogen.getGas(1000), + GT_Values.NF, + Materials.HydrochloricAcid.getCells(1), + 60, + 8); + GT_Values.RA.addChemicalRecipe( + Materials.Hydrogen.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Chlorine.getGas(1000), + GT_Values.NF, + Materials.HydrochloricAcid.getCells(1), + 60, + 8); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(8)}, + new FluidStack[] {Materials.Hydrogen.getGas(9000), Materials.Chlorine.getGas(9000)}, + new FluidStack[] {Materials.HydrochloricAcid.getFluid(9000)}, + null, + 7, + 480); + + // C3H6 + 2Cl = HCl + C3H5Cl + GT_Values.RA.addChemicalRecipe( + Materials.Chlorine.getCells(2), + GT_Utility.getIntegratedCircuit(1), + Materials.Propene.getGas(1000), + Materials.AllylChloride.getFluid(1000), + Materials.HydrochloricAcid.getCells(1), + Materials.Empty.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.Propene.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Chlorine.getGas(2000), + Materials.AllylChloride.getFluid(1000), + Materials.HydrochloricAcid.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.Chlorine.getCells(2), + GT_Utility.getIntegratedCircuit(11), + Materials.Propene.getGas(1000), + Materials.HydrochloricAcid.getFluid(1000), + Materials.AllylChloride.getCells(1), + Materials.Empty.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.Propene.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Chlorine.getGas(2000), + Materials.HydrochloricAcid.getFluid(1000), + Materials.AllylChloride.getCells(1), + 160); + + // H2O + Cl =Hg= HClO + H + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Chlorine.getCells(10), + Materials.Mercury.getCells(1), + Materials.Water.getFluid(10000), + Materials.HypochlorousAcid.getFluid(10000), + Materials.Hydrogen.getCells(10), + Materials.Empty.getCells(1), + 600, + 8); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Water.getCells(10), + Materials.Mercury.getCells(1), + Materials.Chlorine.getGas(10000), + Materials.HypochlorousAcid.getFluid(10000), + Materials.Hydrogen.getCells(10), + Materials.Empty.getCells(1), + 600, + 8); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Chlorine.getCells(1), + Materials.Water.getCells(1), + Materials.Mercury.getFluid(100), + Materials.HypochlorousAcid.getFluid(1000), + Materials.Hydrogen.getCells(1), + Materials.Empty.getCells(1), + 60, + 8); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(2)}, + new FluidStack[] { + Materials.Chlorine.getGas(10000), Materials.Water.getFluid(10000), Materials.Mercury.getFluid(1000) + }, + new FluidStack[] {Materials.HypochlorousAcid.getFluid(10000), Materials.Hydrogen.getGas(10000)}, + null, + 600, + 8); + + // 2Cl + H2O = HCl + HClO (Intended loss) + GT_Values.RA.addChemicalRecipe( + Materials.Chlorine.getCells(2), + GT_Utility.getIntegratedCircuit(1), + Materials.Water.getFluid(1000), + Materials.HypochlorousAcid.getFluid(1000), + Materials.DilutedHydrochloricAcid.getCells(1), + Materials.Empty.getCells(1), + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Water.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Chlorine.getGas(2000), + Materials.HypochlorousAcid.getFluid(1000), + Materials.DilutedHydrochloricAcid.getCells(1), + GT_Values.NI, + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Chlorine.getCells(2), + GT_Utility.getIntegratedCircuit(11), + Materials.Water.getFluid(1000), + Materials.DilutedHydrochloricAcid.getFluid(1000), + Materials.HypochlorousAcid.getCells(1), + Materials.Empty.getCells(1), + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Water.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Chlorine.getGas(2000), + Materials.DilutedHydrochloricAcid.getFluid(1000), + Materials.HypochlorousAcid.getCells(1), + GT_Values.NI, + 120); + + // HClO + NaOH + C3H5Cl = C3H5ClO + NaCl·H2O + GT_Values.RA.addChemicalRecipe( + Materials.HypochlorousAcid.getCells(1), + Materials.SodiumHydroxide.getDust(3), + Materials.AllylChloride.getFluid(1000), + Materials.Epichlorohydrin.getFluid(1000), + Materials.SaltWater.getCells(1), + 480); + GT_Values.RA.addChemicalRecipe( + Materials.SodiumHydroxide.getDust(3), + Materials.AllylChloride.getCells(1), + Materials.HypochlorousAcid.getFluid(1000), + Materials.Epichlorohydrin.getFluid(1000), + Materials.SaltWater.getCells(1), + 480); + // HCl + C3H8O3 = C3H5ClO + 2H2O + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.HydrochloricAcid.getCells(1), + Materials.Glycerol.getCells(1), + GT_Values.NF, + Materials.Epichlorohydrin.getFluid(1000), + Materials.Water.getCells(2), + GT_Values.NI, + 480, + 30); + // H2O + 4Cl + C3H6 + NaOH = C3H5ClO + NaCl·H2O + 2HCl + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {Materials.SodiumHydroxide.getDust(3), GT_Utility.getIntegratedCircuit(23)}, + new FluidStack[] { + Materials.Propene.getGas(1000), Materials.Chlorine.getGas(4000), Materials.Water.getFluid(1000) + }, + new FluidStack[] { + Materials.Epichlorohydrin.getFluid(1000), + Materials.SaltWater.getFluid(1000), + Materials.HydrochloricAcid.getFluid(2000) + }, + null, + 640, + 30); + // H2O + 2Cl + C3H6 + NaOH =Hg= C3H5ClO + NaCl·H2O + 2H + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {Materials.SodiumHydroxide.getDust(3), GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] { + Materials.Propene.getGas(1000), + Materials.Chlorine.getGas(2000), + Materials.Water.getFluid(1000), + Materials.Mercury.getFluid(100) + }, + new FluidStack[] { + Materials.Epichlorohydrin.getFluid(1000), + Materials.SaltWater.getFluid(1000), + Materials.Hydrogen.getGas(2000) + }, + null, + 640, + 30); + // HClO + 2Cl + C3H6 + NaOH = C3H5ClO + NaCl·H2O + HCl + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {Materials.SodiumHydroxide.getDust(3), GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] { + Materials.Propene.getGas(1000), + Materials.Chlorine.getGas(2000), + Materials.HypochlorousAcid.getFluid(1000) + }, + new FluidStack[] { + Materials.Epichlorohydrin.getFluid(1000), + Materials.SaltWater.getFluid(1000), + Materials.HydrochloricAcid.getFluid(1000) + }, + null, + 640, + 30); + + GT_Values.RA.addChemicalRecipe( + Materials.HydrochloricAcid.getCells(1), + Materials.Empty.getCells(1), + Materials.Glycerol.getFluid(1000), + Materials.Epichlorohydrin.getFluid(1000), + Materials.Water.getCells(2), + 480); + GT_Values.RA.addChemicalRecipe( + Materials.Glycerol.getCells(1), + Materials.Empty.getCells(1), + Materials.HydrochloricAcid.getFluid(1000), + Materials.Epichlorohydrin.getFluid(1000), + Materials.Water.getCells(2), + 480); + GT_Values.RA.addChemicalRecipe( + Materials.HydrochloricAcid.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Glycerol.getFluid(1000), + Materials.Water.getFluid(2000), + Materials.Epichlorohydrin.getCells(1), + 480); + GT_Values.RA.addChemicalRecipe( + Materials.Glycerol.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.HydrochloricAcid.getFluid(1000), + Materials.Water.getFluid(2000), + Materials.Epichlorohydrin.getCells(1), + 480); + GT_Values.RA.addChemicalRecipe( + Materials.HydrochloricAcid.getCells(1), + GT_Utility.getIntegratedCircuit(2), + Materials.Glycerol.getFluid(1000), + Materials.Epichlorohydrin.getFluid(1000), + Materials.Empty.getCells(1), + 480); + GT_Values.RA.addChemicalRecipe( + Materials.Glycerol.getCells(1), + GT_Utility.getIntegratedCircuit(2), + Materials.HydrochloricAcid.getFluid(1000), + Materials.Epichlorohydrin.getFluid(1000), + Materials.Empty.getCells(1), + 480); + GT_Values.RA.addChemicalRecipe( + Materials.HydrochloricAcid.getCells(1), + GT_Utility.getIntegratedCircuit(12), + Materials.Glycerol.getFluid(1000), + GT_Values.NF, + Materials.Epichlorohydrin.getCells(1), + 480); + GT_Values.RA.addChemicalRecipe( + Materials.Glycerol.getCells(1), + GT_Utility.getIntegratedCircuit(12), + Materials.HydrochloricAcid.getFluid(1000), + GT_Values.NF, + Materials.Epichlorohydrin.getCells(1), + 480); + + GT_Values.RA.addDistilleryRecipe( + 2, Materials.HeavyFuel.getFluid(100), Materials.Benzene.getFluid(40), 160, 24, false); + GT_Values.RA.addDistilleryRecipe( + 3, Materials.HeavyFuel.getFluid(100), Materials.Phenol.getFluid(25), 160, 24, false); + + // Ca5(PO4)3Cl + 5H2SO4 + 10H2O = 5CaSO4(H2O)2 + HCl + 3H3PO4 + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Apatite.getDust(9), + Materials.SulfuricAcid.getCells(5), + Materials.Water.getFluid(10000), + Materials.PhosphoricAcid.getFluid(3000), + Materials.HydrochloricAcid.getCells(1), + Materials.Empty.getCells(4), + 320, + 30); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {Materials.Apatite.getDust(9)}, + new FluidStack[] {Materials.SulfuricAcid.getFluid(5000), Materials.Water.getFluid(10000)}, + new FluidStack[] {Materials.PhosphoricAcid.getFluid(3000), Materials.HydrochloricAcid.getFluid(1000)}, + new ItemStack[] {Materials.Gypsum.getDust(40)}, + 320, + 30); + // 10O + 4P = P4O10 + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Phosphorus.getDust(4), + GT_Values.NI, + Materials.Oxygen.getGas(10000), + GT_Values.NF, + Materials.PhosphorousPentoxide.getDust(14), + GT_Values.NI, + 40, + 30); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {Materials.Phosphorus.getDust(4), GT_Utility.getIntegratedCircuit(1)}, + new FluidStack[] {Materials.Oxygen.getGas(10000)}, + null, + new ItemStack[] {Materials.PhosphorousPentoxide.getDust(14)}, + 40, + 30); + // P4O10 + 6H2O = 4H3PO4 + GT_Values.RA.addChemicalRecipe( + Materials.PhosphorousPentoxide.getDust(14), + GT_Values.NI, + Materials.Water.getFluid(6000), + Materials.PhosphoricAcid.getFluid(4000), + GT_Values.NI, + 40); + // 2P + 5O + 3H2O = 2H3PO4 + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {Materials.Phosphorus.getDust(1), GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] {Materials.Oxygen.getGas(2500), Materials.Water.getFluid(1500)}, + new FluidStack[] {Materials.PhosphoricAcid.getFluid(1000)}, + null, + 320, + 30); + + // C6H6 + C3H6 = C9H12 + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Propene.getCells(8), + Materials.PhosphoricAcid.getCells(1), + Materials.Benzene.getFluid(8000), + Materials.Cumene.getFluid(8000), + Materials.Empty.getCells(9), + GT_Values.NI, + 1920, + 30); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.PhosphoricAcid.getCells(1), + Materials.Benzene.getCells(8), + Materials.Propene.getGas(8000), + Materials.Cumene.getFluid(8000), + Materials.Empty.getCells(9), + GT_Values.NI, + 1920, + 30); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Benzene.getCells(1), + Materials.Propene.getCells(1), + Materials.PhosphoricAcid.getFluid(125), + Materials.Cumene.getFluid(1000), + Materials.Empty.getCells(2), + GT_Values.NI, + 240, + 30); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(1)}, + new FluidStack[] { + Materials.Propene.getGas(8000), + Materials.Benzene.getFluid(8000), + Materials.PhosphoricAcid.getFluid(1000) + }, + new FluidStack[] {Materials.Cumene.getFluid(8000)}, + null, + 1920, + 30); + + // C9H12 + 2O = C6H6O + C3H6O + GT_Values.RA.addChemicalRecipe( + Materials.Cumene.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Oxygen.getGas(2000), + Materials.Acetone.getFluid(1000), + Materials.Phenol.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.Oxygen.getCells(2), + GT_Utility.getIntegratedCircuit(1), + Materials.Cumene.getFluid(1000), + Materials.Acetone.getFluid(1000), + Materials.Phenol.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.Cumene.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Oxygen.getGas(2000), + Materials.Phenol.getFluid(1000), + Materials.Acetone.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.Oxygen.getCells(2), + GT_Utility.getIntegratedCircuit(11), + Materials.Cumene.getFluid(1000), + Materials.Phenol.getFluid(1000), + Materials.Acetone.getCells(1), + 160); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] { + Materials.Propene.getGas(1000), + Materials.Benzene.getFluid(1000), + Materials.PhosphoricAcid.getFluid(100), + Materials.Oxygen.getGas(2000) + }, + new FluidStack[] {Materials.Phenol.getFluid(1000), Materials.Acetone.getFluid(1000)}, + null, + 480, + 30); + + // C3H6O + 2C6H6O =HCl= C15H16O2 + H2O + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Acetone.getCells(1), + Materials.Phenol.getCells(2), + Materials.HydrochloricAcid.getFluid(1000), + Materials.BisphenolA.getFluid(1000), + Materials.Water.getCells(1), + Materials.Empty.getCells(2), + 160, + 30); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.HydrochloricAcid.getCells(1), + Materials.Acetone.getCells(1), + Materials.Phenol.getFluid(2000), + Materials.BisphenolA.getFluid(1000), + Materials.Water.getCells(1), + Materials.Empty.getCells(1), + 160, + 30); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Phenol.getCells(2), + Materials.HydrochloricAcid.getCells(1), + Materials.Acetone.getFluid(1000), + Materials.BisphenolA.getFluid(1000), + Materials.Water.getCells(1), + Materials.Empty.getCells(2), + 160, + 30); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(1)}, + new FluidStack[] { + Materials.Acetone.getFluid(1000), + Materials.Phenol.getFluid(2000), + Materials.HydrochloricAcid.getFluid(1000) + }, + new FluidStack[] {Materials.BisphenolA.getFluid(1000), Materials.Water.getFluid(1000)}, + null, + 160, + 30); + + // C15H16O2 + 2C3H5ClO + 2NaOH = C15H14O2(C3H5O)2 + 2NaCl·H2O + GT_Values.RA.addChemicalRecipe( + Materials.SodiumHydroxide.getDust(6), + Materials.Epichlorohydrin.getCells(2), + Materials.BisphenolA.getFluid(1000), + Materials.Epoxid.getMolten(1000), + Materials.SaltWater.getCells(2), + 200); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {Materials.SodiumHydroxide.getDust(6), GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] { + Materials.Acetone.getFluid(1000), + Materials.Phenol.getFluid(2000), + Materials.HydrochloricAcid.getFluid(1000), + Materials.Epichlorohydrin.getFluid(2000) + }, + new FluidStack[] {Materials.Epoxid.getMolten(1000), Materials.SaltWater.getFluid(2000)}, + null, + 480, + 30); + + // CH4O + HCl = CH3Cl + H2O + GT_Values.RA.addChemicalRecipe( + Materials.Methanol.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.HydrochloricAcid.getFluid(1000), + Materials.Chloromethane.getGas(1000), + Materials.Water.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.HydrochloricAcid.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Methanol.getFluid(1000), + Materials.Chloromethane.getGas(1000), + Materials.Water.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.Methanol.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.HydrochloricAcid.getFluid(1000), + Materials.Water.getFluid(1000), + Materials.Chloromethane.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.HydrochloricAcid.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Methanol.getFluid(1000), + Materials.Water.getFluid(1000), + Materials.Chloromethane.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.Methanol.getCells(1), + GT_Utility.getIntegratedCircuit(2), + Materials.HydrochloricAcid.getFluid(1000), + Materials.Chloromethane.getGas(1000), + Materials.Empty.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.HydrochloricAcid.getCells(1), + GT_Utility.getIntegratedCircuit(2), + Materials.Methanol.getFluid(1000), + Materials.Chloromethane.getGas(1000), + Materials.Empty.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.Methanol.getCells(1), + GT_Utility.getIntegratedCircuit(12), + Materials.HydrochloricAcid.getFluid(1000), + GT_Values.NF, + Materials.Chloromethane.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.HydrochloricAcid.getCells(1), + GT_Utility.getIntegratedCircuit(12), + Materials.Methanol.getFluid(1000), + GT_Values.NF, + Materials.Chloromethane.getCells(1), + 160); + + GT_Values.RA.addChemicalRecipe( + Materials.Chlorine.getCells(2), + GT_Utility.getIntegratedCircuit(1), + Materials.Methane.getGas(1000), + Materials.Chloromethane.getGas(1000), + Materials.HydrochloricAcid.getCells(1), + Materials.Empty.getCells(1), + 80); + GT_Values.RA.addChemicalRecipe( + Materials.Methane.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Chlorine.getGas(2000), + Materials.Chloromethane.getGas(1000), + Materials.HydrochloricAcid.getCells(1), + 80); + GT_Values.RA.addChemicalRecipe( + Materials.Chlorine.getCells(2), + GT_Utility.getIntegratedCircuit(11), + Materials.Methane.getGas(1000), + Materials.HydrochloricAcid.getFluid(1000), + Materials.Chloromethane.getCells(1), + Materials.Empty.getCells(1), + 80); + GT_Values.RA.addChemicalRecipe( + Materials.Methane.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Chlorine.getGas(2000), + Materials.HydrochloricAcid.getFluid(1000), + Materials.Chloromethane.getCells(1), + 80); + + // Cl6 + CH4 = CHCl3 + 3HCl + GT_Values.RA.addChemicalRecipe( + Materials.Chlorine.getCells(6), + GT_Utility.getIntegratedCircuit(3), + Materials.Methane.getGas(1000), + Materials.Chloroform.getFluid(1000), + Materials.HydrochloricAcid.getCells(3), + Materials.Empty.getCells(3), + 80); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Methane.getCells(1), + Materials.Empty.getCells(2), + Materials.Chlorine.getGas(6000), + Materials.Chloroform.getFluid(1000), + Materials.HydrochloricAcid.getCells(3), + GT_Values.NI, + 80, + 30); + GT_Values.RA.addChemicalRecipe( + Materials.Chlorine.getCells(6), + GT_Utility.getIntegratedCircuit(13), + Materials.Methane.getGas(1000), + Materials.HydrochloricAcid.getFluid(3000), + Materials.Chloroform.getCells(1), + Materials.Empty.getCells(5), + 80); + GT_Values.RA.addChemicalRecipe( + Materials.Methane.getCells(1), + GT_Utility.getIntegratedCircuit(13), + Materials.Chlorine.getGas(6000), + Materials.HydrochloricAcid.getFluid(3000), + Materials.Chloroform.getCells(1), + 80); + + // H + F = HF + GT_Values.RA.addChemicalRecipe( + Materials.Fluorine.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Hydrogen.getGas(1000), + Materials.HydrofluoricAcid.getFluid(1000), + Materials.Empty.getCells(1), + 60, + 8); + GT_Values.RA.addChemicalRecipe( + Materials.Hydrogen.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Fluorine.getGas(1000), + Materials.HydrofluoricAcid.getFluid(1000), + Materials.Empty.getCells(1), + 60, + 8); + GT_Values.RA.addChemicalRecipe( + Materials.Fluorine.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Hydrogen.getGas(1000), + GT_Values.NF, + Materials.HydrofluoricAcid.getCells(1), + 60, + 8); + GT_Values.RA.addChemicalRecipe( + Materials.Hydrogen.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Fluorine.getGas(1000), + GT_Values.NF, + Materials.HydrofluoricAcid.getCells(1), + 60, + 8); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(9)}, + new FluidStack[] {Materials.Hydrogen.getGas(9000), Materials.Fluorine.getGas(9000)}, + new FluidStack[] {Materials.HydrofluoricAcid.getFluid(9000)}, + null, + 7, + 480); + + // 4HF + 2CHCl3 = C2F4 + 6HCl + GT_Values.RA.addChemicalRecipe( + Materials.Chloroform.getCells(2), + Materials.HydrofluoricAcid.getCells(4), + GT_Values.NF, + Materials.Tetrafluoroethylene.getGas(1000), + Materials.HydrochloricAcid.getCells(6), + 480, + 240); + GT_Values.RA.addChemicalRecipe( + Materials.Chloroform.getCells(2), + Materials.Empty.getCells(4), + Materials.HydrofluoricAcid.getFluid(4000), + Materials.Tetrafluoroethylene.getGas(1000), + Materials.HydrochloricAcid.getCells(6), + 480, + 240); + GT_Values.RA.addChemicalRecipe( + Materials.HydrofluoricAcid.getCells(4), + Materials.Empty.getCells(2), + Materials.Chloroform.getFluid(2000), + Materials.Tetrafluoroethylene.getGas(1000), + Materials.HydrochloricAcid.getCells(6), + 480, + 240); + GT_Values.RA.addChemicalRecipe( + Materials.HydrofluoricAcid.getCells(4), + GT_Utility.getIntegratedCircuit(11), + Materials.Chloroform.getFluid(2000), + Materials.HydrochloricAcid.getFluid(6000), + Materials.Tetrafluoroethylene.getCells(1), + Materials.Empty.getCells(3), + 480, + 240); + GT_Values.RA.addChemicalRecipe( + Materials.Chloroform.getCells(2), + GT_Utility.getIntegratedCircuit(11), + Materials.HydrofluoricAcid.getFluid(4000), + Materials.HydrochloricAcid.getFluid(6000), + Materials.Tetrafluoroethylene.getCells(1), + Materials.Empty.getCells(1), + 480, + 240); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] { + Materials.HydrofluoricAcid.getFluid(4000), + Materials.Methane.getGas(2000), + Materials.Chlorine.getGas(12000) + }, + new FluidStack[] {Materials.Tetrafluoroethylene.getGas(1000), Materials.HydrochloricAcid.getFluid(12000) + }, + null, + 540, + 240); + + GT_Values.RA.addDefaultPolymerizationRecipes( + Materials.Tetrafluoroethylene.mGas, + Materials.Tetrafluoroethylene.getCells(1), + Materials.Polytetrafluoroethylene.mStandardMoltenFluid); + + // Si + 2CH3Cl = C2H6Cl2Si + GT_Values.RA.addChemicalRecipe( + Materials.Silicon.getDust(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Chloromethane.getGas(2000), + Materials.Dimethyldichlorosilane.getFluid(1000), + GT_Values.NI, + 240, + 96); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Silicon.getDust(1), + Materials.Chloromethane.getCells(2), + GT_Values.NF, + Materials.Dimethyldichlorosilane.getFluid(1000), + Materials.Empty.getCells(2), + GT_Values.NI, + 240, + 96); + + GT_Values.RA.addChemicalRecipe( + Materials.Dimethyldichlorosilane.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Water.getFluid(1000), + Materials.DilutedHydrochloricAcid.getFluid(1000), + Materials.Polydimethylsiloxane.getDust(3), + Materials.Empty.getCells(1), + 240, + 96); + GT_Values.RA.addChemicalRecipe( + Materials.Water.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Dimethyldichlorosilane.getFluid(1000), + Materials.DilutedHydrochloricAcid.getFluid(1000), + Materials.Polydimethylsiloxane.getDust(3), + Materials.Empty.getCells(1), + 240, + 96); + GT_Values.RA.addChemicalRecipe( + Materials.Dimethyldichlorosilane.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Water.getFluid(1000), + GT_Values.NF, + Materials.Polydimethylsiloxane.getDust(3), + Materials.DilutedHydrochloricAcid.getCells(1), + 240, + 96); + GT_Values.RA.addChemicalRecipe( + Materials.Water.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Dimethyldichlorosilane.getFluid(1000), + GT_Values.NF, + Materials.Polydimethylsiloxane.getDust(3), + Materials.DilutedHydrochloricAcid.getCells(1), + 240, + 96); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Dimethyldichlorosilane.getCells(1), + Materials.Water.getCells(1), + GT_Values.NF, + Materials.DilutedHydrochloricAcid.getFluid(1000), + Materials.Polydimethylsiloxane.getDust(3), + Materials.Empty.getCells(2), + 240, + 96); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {Materials.Silicon.getDust(1), GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] { + Materials.Methane.getGas(2000), Materials.Chlorine.getGas(4000), Materials.Water.getFluid(1000) + }, + new FluidStack[] { + Materials.HydrochloricAcid.getFluid(2000), Materials.DilutedHydrochloricAcid.getFluid(2000) + }, + new ItemStack[] {Materials.Polydimethylsiloxane.getDust(3)}, + 480, + 96); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {Materials.Silicon.getDust(1), GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] {Materials.Methanol.getFluid(2000), Materials.HydrochloricAcid.getFluid(2000)}, + new FluidStack[] {Materials.DilutedHydrochloricAcid.getFluid(2000)}, + new ItemStack[] {Materials.Polydimethylsiloxane.getDust(3)}, + 480, + 96); + + GT_Values.RA.addChemicalRecipe( + Materials.Polydimethylsiloxane.getDust(9), + Materials.Sulfur.getDust(1), + GT_Values.NF, + Materials.Silicone.getMolten(1296), + GT_Values.NI, + 600); + + // N + 3H = NH3 + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Nitrogen.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Hydrogen.getGas(3000), + Materials.Ammonia.getGas(1000), + Materials.Empty.getCells(1), + GT_Values.NI, + 320, + 384); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Hydrogen.getCells(3), + GT_Utility.getIntegratedCircuit(1), + Materials.Nitrogen.getGas(1000), + Materials.Ammonia.getGas(1000), + Materials.Empty.getCells(3), + GT_Values.NI, + 320, + 384); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Nitrogen.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Hydrogen.getGas(3000), + GT_Values.NF, + Materials.Ammonia.getCells(1), + GT_Values.NI, + 320, + 384); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] {Materials.Nitrogen.getGas(10000), Materials.Hydrogen.getGas(30000)}, + new FluidStack[] {Materials.Ammonia.getGas(10000)}, + new ItemStack[] {null}, + 800, + 480); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Hydrogen.getCells(3), + GT_Utility.getIntegratedCircuit(11), + Materials.Nitrogen.getGas(1000), + GT_Values.NF, + Materials.Ammonia.getCells(1), + Materials.Empty.getCells(2), + 320, + 384); + + // NH3 + 2CH4O = C2H7N + 2H2O + GT_Values.RA.addChemicalRecipe( + Materials.Methanol.getCells(2), + GT_Utility.getIntegratedCircuit(1), + Materials.Ammonia.getGas(1000), + Materials.Dimethylamine.getGas(1000), + Materials.Water.getCells(2), + 240, + 120); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Ammonia.getCells(1), + Materials.Empty.getCells(1), + Materials.Methanol.getFluid(2000), + Materials.Dimethylamine.getGas(1000), + Materials.Water.getCells(2), + GT_Values.NI, + 240, + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Methanol.getCells(2), + GT_Utility.getIntegratedCircuit(11), + Materials.Ammonia.getGas(1000), + Materials.Water.getFluid(1000), + Materials.Dimethylamine.getCells(1), + Materials.Empty.getCells(1), + 240, + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Ammonia.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Methanol.getFluid(2000), + Materials.Water.getFluid(1000), + Materials.Dimethylamine.getCells(1), + 240, + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Methanol.getCells(2), + GT_Utility.getIntegratedCircuit(2), + Materials.Ammonia.getGas(1000), + Materials.Dimethylamine.getGas(1000), + Materials.Empty.getCells(2), + 240, + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Methanol.getCells(2), + GT_Utility.getIntegratedCircuit(12), + Materials.Ammonia.getGas(1000), + GT_Values.NF, + Materials.Dimethylamine.getCells(1), + Materials.Empty.getCells(1), + 240, + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Ammonia.getCells(1), + GT_Utility.getIntegratedCircuit(12), + Materials.Methanol.getFluid(2000), + GT_Values.NF, + Materials.Dimethylamine.getCells(1), + 240, + 120); + + // NH3 + HClO = NH2Cl + H2O + GT_Values.RA.addChemicalRecipe( + Materials.Ammonia.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.HypochlorousAcid.getFluid(1000), + Materials.Chloramine.getFluid(1000), + Materials.Water.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.HypochlorousAcid.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Ammonia.getGas(1000), + Materials.Chloramine.getFluid(1000), + Materials.Water.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.Ammonia.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.HypochlorousAcid.getFluid(1000), + Materials.Water.getFluid(1000), + Materials.Chloramine.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.HypochlorousAcid.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Ammonia.getGas(1000), + Materials.Water.getFluid(1000), + Materials.Chloramine.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.Ammonia.getCells(1), + GT_Utility.getIntegratedCircuit(2), + Materials.HypochlorousAcid.getFluid(1000), + Materials.Chloramine.getFluid(1000), + Materials.Empty.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.HypochlorousAcid.getCells(1), + GT_Utility.getIntegratedCircuit(2), + Materials.Ammonia.getGas(1000), + Materials.Chloramine.getFluid(1000), + Materials.Empty.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.Ammonia.getCells(1), + GT_Utility.getIntegratedCircuit(12), + Materials.HypochlorousAcid.getFluid(1000), + GT_Values.NF, + Materials.Chloramine.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.HypochlorousAcid.getCells(1), + GT_Utility.getIntegratedCircuit(12), + Materials.Ammonia.getGas(1000), + GT_Values.NF, + Materials.Chloramine.getCells(1), + 160); + + // 2NO2 = N2O4 + GT_Values.RA.addChemicalRecipe( + GT_Utility.getIntegratedCircuit(2), + GT_Values.NI, + Materials.NitrogenDioxide.getGas(2000), + Materials.DinitrogenTetroxide.getGas(1000), + GT_Values.NI, + 640); + GT_Values.RA.addChemicalRecipe( + Materials.NitrogenDioxide.getCells(2), + GT_Utility.getIntegratedCircuit(2), + GT_Values.NF, + Materials.DinitrogenTetroxide.getGas(1000), + Materials.Empty.getCells(2), + 640); + GT_Values.RA.addChemicalRecipe( + Materials.NitrogenDioxide.getCells(2), + GT_Utility.getIntegratedCircuit(12), + GT_Values.NF, + GT_Values.NF, + Materials.DinitrogenTetroxide.getCells(1), + Materials.Empty.getCells(1), + 640); + + // 2NH3 + 7O = N2O4 + 3H2O + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(23)}, + new FluidStack[] {Materials.Ammonia.getGas(2000), Materials.Oxygen.getGas(7000)}, + new FluidStack[] {Materials.DinitrogenTetroxide.getGas(1000), Materials.Water.getFluid(3000)}, + null, + 480, + 30); + // 7O + 6H + 2N = N2O4 + 3H2O + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(23)}, + new FluidStack[] { + Materials.Nitrogen.getGas(2000), Materials.Hydrogen.getGas(6000), Materials.Oxygen.getGas(7000) + }, + new FluidStack[] {Materials.DinitrogenTetroxide.getGas(1000), Materials.Water.getFluid(3000)}, + null, + 1100, + 480); + + // 2NH3 + 5O = 2NO + 3H2O + GT_Values.RA.addChemicalRecipe( + Materials.Ammonia.getCells(4), + GT_Utility.getIntegratedCircuit(1), + Materials.Oxygen.getGas(10000), + Materials.Water.getFluid(6000), + Materials.NitricOxide.getCells(4), + 320); + GT_Values.RA.addChemicalRecipe( + Materials.Oxygen.getCells(10), + GT_Utility.getIntegratedCircuit(1), + Materials.Ammonia.getGas(4000), + Materials.Water.getFluid(6000), + Materials.NitricOxide.getCells(4), + Materials.Empty.getCells(6), + 320); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Ammonia.getCells(4), + Materials.Empty.getCells(2), + Materials.Oxygen.getGas(10000), + Materials.NitricOxide.getGas(4000), + Materials.Water.getCells(6), + GT_Values.NI, + 320, + 30); + GT_Values.RA.addChemicalRecipe( + Materials.Oxygen.getCells(10), + GT_Utility.getIntegratedCircuit(11), + Materials.Ammonia.getGas(4000), + Materials.NitricOxide.getGas(4000), + Materials.Water.getCells(6), + Materials.Empty.getCells(4), + 320); + GT_Values.RA.addChemicalRecipe( + Materials.Ammonia.getCells(4), + GT_Utility.getIntegratedCircuit(2), + Materials.Oxygen.getGas(10000), + GT_Values.NF, + Materials.NitricOxide.getCells(4), + 320); + GT_Values.RA.addChemicalRecipe( + Materials.Oxygen.getCells(10), + GT_Utility.getIntegratedCircuit(2), + Materials.Ammonia.getGas(4000), + GT_Values.NF, + Materials.NitricOxide.getCells(4), + Materials.Empty.getCells(6), + 320); + GT_Values.RA.addChemicalRecipe( + Materials.Oxygen.getCells(10), + GT_Utility.getIntegratedCircuit(12), + Materials.Ammonia.getGas(4000), + Materials.NitricOxide.getGas(4000), + Materials.Empty.getCells(10), + 320); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(9)}, + new FluidStack[] {Materials.Oxygen.getGas(100000), Materials.Ammonia.getGas(36000)}, + new FluidStack[] {Materials.NitricOxide.getGas(36000), Materials.Water.getFluid(54000)}, + null, + 170, + 480); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(8)}, + new FluidStack[] {Materials.Oxygen.getGas(100000), Materials.Ammonia.getGas(36000)}, + new FluidStack[] {Materials.NitricOxide.getGas(36000)}, + null, + 170, + 480); + + // NO + O = NO2 + GT_Values.RA.addChemicalRecipe( + Materials.NitricOxide.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Oxygen.getGas(1000), + Materials.NitrogenDioxide.getGas(1000), + Materials.Empty.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.Oxygen.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.NitricOxide.getGas(1000), + Materials.NitrogenDioxide.getGas(1000), + Materials.Empty.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.NitricOxide.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Oxygen.getGas(1000), + GT_Values.NF, + Materials.NitrogenDioxide.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.Oxygen.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.NitricOxide.getGas(1000), + GT_Values.NF, + Materials.NitrogenDioxide.getCells(1), + 160); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(9)}, + new FluidStack[] {Materials.NitricOxide.getGas(9000), Materials.Oxygen.getGas(9000)}, + new FluidStack[] {Materials.NitrogenDioxide.getGas(18000)}, + null, + 80, + 480); + + // H2O + 3NO2 = 2HNO3 + NO + GT_Values.RA.addChemicalRecipe( + Materials.Water.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.NitrogenDioxide.getGas(3000), + Materials.NitricAcid.getFluid(2000), + Materials.NitricOxide.getCells(1), + 240); + GT_Values.RA.addChemicalRecipe( + Materials.NitrogenDioxide.getCells(3), + GT_Utility.getIntegratedCircuit(1), + Materials.Water.getFluid(1000), + Materials.NitricAcid.getFluid(2000), + Materials.NitricOxide.getCells(1), + Materials.Empty.getCells(2), + 240); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Water.getCells(1), + Materials.Empty.getCells(1), + Materials.NitrogenDioxide.getGas(3000), + Materials.NitricOxide.getGas(1000), + Materials.NitricAcid.getCells(2), + GT_Values.NI, + 240, + 30); + GT_Values.RA.addChemicalRecipe( + Materials.NitrogenDioxide.getCells(3), + GT_Utility.getIntegratedCircuit(11), + Materials.Water.getFluid(1000), + Materials.NitricOxide.getGas(1000), + Materials.NitricAcid.getCells(2), + Materials.Empty.getCells(1), + 240); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(9)}, + new FluidStack[] {Materials.NitrogenDioxide.getGas(27000), Materials.Water.getFluid(9000)}, + new FluidStack[] {Materials.NitricAcid.getFluid(18000), Materials.NitricOxide.getGas(9000)}, + null, + 120, + 480); + + // 2NO2 + O + H2O = 2HNO3 + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.NitrogenDioxide.getCells(2), + Materials.Oxygen.getCells(1), + Materials.Water.getFluid(1000), + Materials.NitricAcid.getFluid(2000), + Materials.Empty.getCells(3), + GT_Values.NI, + 240, + 30); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Oxygen.getCells(1), + Materials.Water.getCells(1), + Materials.NitrogenDioxide.getGas(2000), + Materials.NitricAcid.getFluid(2000), + Materials.Empty.getCells(2), + GT_Values.NI, + 240, + 30); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Water.getCells(1), + Materials.NitrogenDioxide.getCells(2), + Materials.Oxygen.getGas(1000), + Materials.NitricAcid.getFluid(2000), + Materials.Empty.getCells(3), + GT_Values.NI, + 240, + 30); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] { + Materials.Hydrogen.getGas(3000), Materials.Nitrogen.getGas(1000), Materials.Oxygen.getGas(4000) + }, + new FluidStack[] {Materials.NitricAcid.getFluid(1000), Materials.Water.getFluid(1000)}, + null, + 320, + 480); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] {Materials.Ammonia.getGas(1000), Materials.Oxygen.getGas(4000)}, + new FluidStack[] {Materials.NitricAcid.getFluid(1000), Materials.Water.getFluid(1000)}, + null, + 320, + 30); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] { + Materials.NitrogenDioxide.getGas(2000), + Materials.Oxygen.getGas(1000), + Materials.Water.getFluid(1000) + }, + new FluidStack[] {Materials.NitricAcid.getFluid(2000)}, + null, + 320, + 30); + + // S + 2H = H2S + GT_Values.RA.addChemicalRecipe( + Materials.Sulfur.getDust(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Hydrogen.getGas(2000), + Materials.HydricSulfide.getGas(1000), + GT_Values.NI, + 60, + 8); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Sulfur.getDust(1), + Materials.Empty.getCells(1), + Materials.Hydrogen.getGas(2000), + GT_Values.NF, + Materials.HydricSulfide.getCells(1), + GT_Values.NI, + 60, + 8); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(9), Materials.Sulfur.getDust(9)}, + new FluidStack[] {Materials.Hydrogen.getGas(18000)}, + new FluidStack[] {Materials.HydricSulfide.getGas(9000)}, + null, + 4, + 120); + + // S + 2O = SO2 + GT_Values.RA.addChemicalRecipe( + Materials.Sulfur.getDust(1), + GT_Utility.getIntegratedCircuit(3), + Materials.Oxygen.getGas(2000), + Materials.SulfurDioxide.getGas(1000), + GT_Values.NI, + 60, + 8); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(9), Materials.Sulfur.getDust(9)}, + new FluidStack[] {Materials.Oxygen.getGas(18000)}, + new FluidStack[] {Materials.SulfurDioxide.getGas(9000)}, + null, + 4, + 120); + + // H2S + 3O = SO2 + H2O + GT_Values.RA.addChemicalRecipe( + Materials.HydricSulfide.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Oxygen.getGas(3000), + Materials.SulfurDioxide.getGas(1000), + Materials.Water.getCells(1), + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Oxygen.getCells(3), + GT_Utility.getIntegratedCircuit(1), + Materials.HydricSulfide.getGas(1000), + Materials.SulfurDioxide.getGas(1000), + Materials.Water.getCells(1), + Materials.Empty.getCells(2), + 120); + GT_Values.RA.addChemicalRecipe( + Materials.HydricSulfide.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Oxygen.getGas(3000), + Materials.Water.getFluid(1000), + Materials.SulfurDioxide.getCells(1), + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Oxygen.getCells(3), + GT_Utility.getIntegratedCircuit(11), + Materials.HydricSulfide.getGas(1000), + Materials.Water.getFluid(1000), + Materials.SulfurDioxide.getCells(1), + Materials.Empty.getCells(2), + 120); + GT_Values.RA.addChemicalRecipe( + Materials.HydricSulfide.getCells(1), + GT_Utility.getIntegratedCircuit(2), + Materials.Oxygen.getGas(3000), + Materials.SulfurDioxide.getGas(1000), + Materials.Empty.getCells(1), + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Oxygen.getCells(3), + GT_Utility.getIntegratedCircuit(2), + Materials.HydricSulfide.getGas(1000), + Materials.SulfurDioxide.getGas(1000), + Materials.Empty.getCells(3), + 120); + GT_Values.RA.addChemicalRecipe( + Materials.HydricSulfide.getCells(1), + GT_Utility.getIntegratedCircuit(12), + Materials.Oxygen.getGas(3000), + GT_Values.NF, + Materials.SulfurDioxide.getCells(1), + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Oxygen.getCells(3), + GT_Utility.getIntegratedCircuit(12), + Materials.HydricSulfide.getGas(1000), + GT_Values.NF, + Materials.SulfurDioxide.getCells(1), + Materials.Empty.getCells(2), + 120); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(9)}, + new FluidStack[] {Materials.HydricSulfide.getGas(9000), Materials.Oxygen.getGas(27000)}, + new FluidStack[] {Materials.SulfurDioxide.getGas(9000), Materials.Water.getFluid(9000)}, + null, + 60, + 480); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(8)}, + new FluidStack[] {Materials.HydricSulfide.getGas(9000), Materials.Oxygen.getGas(27000)}, + new FluidStack[] {Materials.SulfurDioxide.getGas(9000)}, + null, + 60, + 480); + + // 2H2S + SO2 = 3S + 2H2O + GT_Values.RA.addChemicalRecipe( + Materials.SulfurDioxide.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.HydricSulfide.getGas(2000), + Materials.Water.getFluid(2000), + Materials.Sulfur.getDust(3), + Materials.Empty.getCells(1), + 120); + GT_Values.RA.addChemicalRecipe( + Materials.HydricSulfide.getCells(2), + GT_Utility.getIntegratedCircuit(1), + Materials.SulfurDioxide.getGas(1000), + Materials.Water.getFluid(2000), + Materials.Sulfur.getDust(3), + Materials.Empty.getCells(2), + 120); + GT_Values.RA.addChemicalRecipe( + Materials.SulfurDioxide.getCells(1), + GT_Utility.getIntegratedCircuit(2), + Materials.HydricSulfide.getGas(2000), + GT_Values.NF, + Materials.Sulfur.getDust(3), + Materials.Empty.getCells(1), + 120); + GT_Values.RA.addChemicalRecipe( + Materials.HydricSulfide.getCells(2), + GT_Utility.getIntegratedCircuit(2), + Materials.SulfurDioxide.getGas(1000), + GT_Values.NF, + Materials.Sulfur.getDust(3), + Materials.Empty.getCells(2), + 120); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(7)}, + new FluidStack[] {Materials.SulfurDioxide.getGas(9000), Materials.HydricSulfide.getGas(18000)}, + null, + new ItemStack[] {Materials.Sulfur.getDust(27)}, + 60, + 480); + + // SO2 + O = SO3 + GT_Values.RA.addChemicalRecipe( + Materials.Oxygen.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.SulfurDioxide.getGas(1000), + Materials.SulfurTrioxide.getGas(1000), + Materials.Empty.getCells(1), + 200); + GT_Values.RA.addChemicalRecipe( + Materials.SulfurDioxide.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Oxygen.getGas(1000), + Materials.SulfurTrioxide.getGas(1000), + Materials.Empty.getCells(1), + 200); + GT_Values.RA.addChemicalRecipe( + Materials.Oxygen.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.SulfurDioxide.getGas(1000), + GT_Values.NF, + Materials.SulfurTrioxide.getCells(1), + 200); + GT_Values.RA.addChemicalRecipe( + Materials.SulfurDioxide.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Oxygen.getGas(1000), + GT_Values.NF, + Materials.SulfurTrioxide.getCells(1), + 200); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(9)}, + new FluidStack[] {Materials.SulfurTrioxide.getGas(9000), Materials.Water.getFluid(9000)}, + new FluidStack[] {Materials.SulfuricAcid.getFluid(9000)}, + null, + 260, + 480); + + // SO3 + H2O = H2SO4 + GT_Values.RA.addChemicalRecipe( + Materials.Water.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.SulfurTrioxide.getGas(1000), + Materials.SulfuricAcid.getFluid(1000), + Materials.Empty.getCells(1), + 320, + 8); + GT_Values.RA.addChemicalRecipe( + Materials.SulfurTrioxide.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Water.getFluid(1000), + Materials.SulfuricAcid.getFluid(1000), + Materials.Empty.getCells(1), + 320, + 8); + GT_Values.RA.addChemicalRecipe( + Materials.Water.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.SulfurTrioxide.getGas(1000), + GT_Values.NF, + Materials.SulfuricAcid.getCells(1), + 320, + 8); + GT_Values.RA.addChemicalRecipe( + Materials.SulfurTrioxide.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Water.getFluid(1000), + GT_Values.NF, + Materials.SulfuricAcid.getCells(1), + 320, + 8); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(24), Materials.Sulfur.getDust(1)}, + new FluidStack[] {Materials.Oxygen.getGas(3000), Materials.Water.getFluid(1000)}, + new FluidStack[] {Materials.SulfuricAcid.getFluid(1000)}, + null, + 480, + 30); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(7), Materials.Sulfur.getDust(9)}, + new FluidStack[] {Materials.Oxygen.getGas(27000), Materials.Water.getFluid(9000)}, + new FluidStack[] {Materials.SulfuricAcid.getFluid(9000)}, + null, + 260, + 480); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] {Materials.HydricSulfide.getGas(1000), Materials.Oxygen.getGas(3000)}, + new FluidStack[] {Materials.SulfuricAcid.getFluid(1000)}, + null, + 480, + 30); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] { + Materials.SulfurDioxide.getGas(1000), Materials.Oxygen.getGas(1000), Materials.Water.getFluid(1000) + }, + new FluidStack[] {Materials.SulfuricAcid.getFluid(1000)}, + null, + 600, + 30); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(9)}, + new FluidStack[] { + Materials.SulfurDioxide.getGas(9000), Materials.Oxygen.getGas(9000), Materials.Water.getFluid(9000) + }, + new FluidStack[] {Materials.SulfuricAcid.getFluid(9000)}, + null, + 150, + 480); + + GT_Values.RA.addUniversalDistillationRecipe( + Materials.DilutedSulfuricAcid.getFluid(3000), + new FluidStack[] {Materials.SulfuricAcid.getFluid(2000), Materials.Water.getFluid(1000)}, + GT_Values.NI, + 600, + 120); + + // C2H4 + 2Cl = C2H3Cl + HCl + GT_Values.RA.addChemicalRecipe( + Materials.Chlorine.getCells(2), + GT_Utility.getIntegratedCircuit(1), + Materials.Ethylene.getGas(1000), + Materials.VinylChloride.getGas(1000), + Materials.HydrochloricAcid.getCells(1), + Materials.Empty.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.Ethylene.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Chlorine.getGas(2000), + Materials.VinylChloride.getGas(1000), + Materials.HydrochloricAcid.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.Chlorine.getCells(2), + GT_Utility.getIntegratedCircuit(11), + Materials.Ethylene.getGas(1000), + Materials.HydrochloricAcid.getFluid(1000), + Materials.VinylChloride.getCells(1), + Materials.Empty.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.Ethylene.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Chlorine.getGas(2000), + Materials.HydrochloricAcid.getFluid(1000), + Materials.VinylChloride.getCells(1), + 160); + + // C2H4 + HCl + O = C2H3Cl + H2O + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Ethylene.getCells(1), + Materials.HydrochloricAcid.getCells(1), + Materials.Oxygen.getGas(1000), + Materials.VinylChloride.getGas(1000), + Materials.Water.getCells(1), + Materials.Empty.getCells(1), + 160, + 30); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.HydrochloricAcid.getCells(1), + Materials.Oxygen.getCells(1), + Materials.Ethylene.getGas(1000), + Materials.VinylChloride.getGas(1000), + Materials.Water.getCells(1), + Materials.Empty.getCells(1), + 160, + 30); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Oxygen.getCells(1), + Materials.Ethylene.getCells(1), + Materials.HydrochloricAcid.getFluid(1000), + Materials.VinylChloride.getGas(1000), + Materials.Water.getCells(1), + Materials.Empty.getCells(1), + 160, + 30); + + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(2)}, + new FluidStack[] { + Materials.HydrochloricAcid.getFluid(1000), + Materials.Ethylene.getGas(1000), + Materials.Oxygen.getGas(1000) + }, + new FluidStack[] {Materials.VinylChloride.getGas(1000), Materials.Water.getFluid(1000)}, + null, + 160, + 30); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] { + Materials.Chlorine.getGas(2000), Materials.Ethylene.getGas(2000), Materials.Oxygen.getGas(1000) + }, + new FluidStack[] {Materials.VinylChloride.getGas(2000), Materials.Water.getFluid(1000)}, + null, + 240, + 30); + + GT_Values.RA.addDefaultPolymerizationRecipes( + Materials.VinylChloride.mGas, + Materials.VinylChloride.getCells(1), + Materials.PolyvinylChloride.mStandardMoltenFluid); + + GT_Values.RA.addMixerRecipe( + Materials.Sugar.getDust(4), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.SulfuricAcid.getFluid(1000), + Materials.DilutedSulfuricAcid.getFluid(1000), + Materials.Charcoal.getGems(1), + 1200, + 2); + GT_Values.RA.addMixerRecipe( + Materials.Wood.getDust(4), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.SulfuricAcid.getFluid(1000), + Materials.DilutedSulfuricAcid.getFluid(1000), + Materials.Charcoal.getGems(1), + 1200, + 2); + + // C3H6O = C2H2O + CH4 + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Acetone.getFluid(1000), + new FluidStack[] {Materials.Ethenone.getGas(1000), Materials.Methane.getGas(1000)}, + GT_Values.NI, + 80, + 640); + GT_Values.RA.addFluidHeaterRecipe( + GT_Utility.getIntegratedCircuit(1), + Materials.Acetone.getFluid(1000), + Materials.Ethenone.getGas(1000), + 160, + 160); + // C2H4O2 =H2SO4= C2H2O + H2O + GT_Values.RA.addChemicalRecipe( + Materials.AceticAcid.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.SulfuricAcid.getFluid(1000), + Materials.DilutedSulfuricAcid.getFluid(1000), + Materials.Ethenone.getCells(1), + 160, + 120); + GT_Values.RA.addChemicalRecipe( + Materials.SulfuricAcid.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.AceticAcid.getFluid(1000), + Materials.DilutedSulfuricAcid.getFluid(1000), + Materials.Ethenone.getCells(1), + 160, + 120); + GT_Values.RA.addChemicalRecipe( + Materials.AceticAcid.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.SulfuricAcid.getFluid(1000), + Materials.Ethenone.getGas(1000), + Materials.DilutedSulfuricAcid.getCells(1), + 160, + 120); + GT_Values.RA.addChemicalRecipe( + Materials.SulfuricAcid.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.AceticAcid.getFluid(1000), + Materials.Ethenone.getGas(1000), + Materials.DilutedSulfuricAcid.getCells(1), + 160, + 120); + + // C2H2O + 8HNO3 = 2CN4O8 + 9H2O + // Chemically this recipe is wrong, but kept for minimizing breaking change. + GT_Values.RA.addChemicalRecipe( + Materials.Ethenone.getCells(1), + Materials.Empty.getCells(1), + Materials.NitricAcid.getFluid(8000), + Materials.Water.getFluid(9000), + Materials.Tetranitromethane.getCells(2), + 480, + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Ethenone.getCells(1), + GT_Utility.getIntegratedCircuit(12), + Materials.NitricAcid.getFluid(8000), + Materials.Tetranitromethane.getFluid(2000), + Materials.Empty.getCells(1), + 480, + 120); + GT_Values.RA.addChemicalRecipe( + Materials.NitricAcid.getCells(8), + GT_Utility.getIntegratedCircuit(1), + Materials.Ethenone.getGas(1000), + Materials.Water.getFluid(9000), + Materials.Tetranitromethane.getCells(2), + Materials.Empty.getCells(6), + 480, + 120); + GT_Values.RA.addChemicalRecipe( + Materials.NitricAcid.getCells(8), + GT_Utility.getIntegratedCircuit(2), + Materials.Ethenone.getGas(1000), + GT_Values.NF, + Materials.Tetranitromethane.getCells(2), + Materials.Empty.getCells(6), + 480, + 120); + GT_Values.RA.addChemicalRecipe( + Materials.NitricAcid.getCells(8), + GT_Utility.getIntegratedCircuit(12), + Materials.Ethenone.getGas(1000), + Materials.Tetranitromethane.getFluid(2000), + Materials.Empty.getCells(8), + 480, + 120); + GT_Values.RA.addChemicalRecipe( + Materials.NitricAcid.getCells(8), + Materials.Empty.getCells(1), + Materials.Ethenone.getGas(1000), + Materials.Tetranitromethane.getFluid(2000), + Materials.Water.getCells(9), + 480, + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Ethenone.getCells(1), + Materials.NitricAcid.getCells(8), + GT_Values.NF, + Materials.Tetranitromethane.getFluid(2000), + Materials.Water.getCells(9), + 480, + 120); + + GT_Values.RA.addMixerRecipe( + Materials.Fuel.getCells(1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.Tetranitromethane.getFluid(20), + Materials.NitroFuel.getFluid(1000), + Materials.Empty.getCells(1), + 20, + 480); + GT_Values.RA.addMixerRecipe( + Materials.BioDiesel.getCells(1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + Materials.Tetranitromethane.getFluid(40), + Materials.NitroFuel.getFluid(900), + Materials.Empty.getCells(1), + 20, + 480); + + // C3H6 + C2H4 = C5H8 + 2H + GT_Values.RA.addChemicalRecipe( + Materials.Propene.getCells(1), + Materials.Empty.getCells(1), + Materials.Ethylene.getGas(1000), + Materials.Isoprene.getFluid(1000), + Materials.Hydrogen.getCells(2), + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Ethylene.getCells(1), + Materials.Empty.getCells(1), + Materials.Propene.getGas(1000), + Materials.Isoprene.getFluid(1000), + Materials.Hydrogen.getCells(2), + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Propene.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Ethylene.getGas(1000), + Materials.Hydrogen.getGas(2000), + Materials.Isoprene.getCells(1), + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Ethylene.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Propene.getGas(1000), + Materials.Hydrogen.getGas(2000), + Materials.Isoprene.getCells(1), + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Empty.getCells(1), + GT_Utility.getIntegratedCircuit(2), + Materials.Propene.getGas(2000), + Materials.Isoprene.getFluid(1000), + Materials.Methane.getCells(1), + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Propene.getCells(2), + GT_Utility.getIntegratedCircuit(3), + GT_Values.NF, + Materials.Isoprene.getFluid(1000), + Materials.Methane.getCells(1), + Materials.Empty.getCells(1), + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Empty.getCells(1), + GT_Utility.getIntegratedCircuit(12), + Materials.Propene.getGas(2000), + Materials.Methane.getGas(1000), + Materials.Isoprene.getCells(1), + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Propene.getCells(2), + GT_Utility.getIntegratedCircuit(12), + GT_Values.NF, + Materials.Methane.getGas(1000), + Materials.Isoprene.getCells(1), + Materials.Empty.getCells(1), + 120); + + GT_Values.RA.addChemicalRecipe( + ItemList.Cell_Air.get(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Isoprene.getFluid(144), + GT_Values.NF, + Materials.RawRubber.getDust(1), + Materials.Empty.getCells(1), + 160); + GT_Values.RA.addChemicalRecipe( + Materials.Oxygen.getCells(2), + GT_Utility.getIntegratedCircuit(1), + Materials.Isoprene.getFluid(288), + GT_Values.NF, + Materials.RawRubber.getDust(3), + Materials.Empty.getCells(2), + 320); + GT_Values.RA.addChemicalRecipe( + Materials.Isoprene.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Air.getGas(14000), + GT_Values.NF, + Materials.RawRubber.getDust(7), + Materials.Empty.getCells(1), + 1120); + GT_Values.RA.addChemicalRecipe( + Materials.Isoprene.getCells(2), + GT_Utility.getIntegratedCircuit(1), + Materials.Oxygen.getGas(14000), + GT_Values.NF, + Materials.RawRubber.getDust(21), + Materials.Empty.getCells(2), + 2240); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(2)}, + new FluidStack[] { + Materials.Isoprene.getFluid(1728), + Materials.Air.getGas(6000), + Materials.Titaniumtetrachloride.getFluid(80) + }, + null, + new ItemStack[] {Materials.RawRubber.getDust(18)}, + 640, + 30); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(2)}, + new FluidStack[] { + Materials.Isoprene.getFluid(1728), + Materials.Oxygen.getGas(6000), + Materials.Titaniumtetrachloride.getFluid(80) + }, + null, + new ItemStack[] {Materials.RawRubber.getDust(24)}, + 640, + 30); + + GT_Values.RA.addDefaultPolymerizationRecipes( + Materials.Styrene.mFluid, Materials.Styrene.getCells(1), Materials.Polystyrene.mStandardMoltenFluid); + + GT_Values.RA.addChemicalRecipe( + Materials.Benzene.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Ethylene.getGas(1000), + Materials.Hydrogen.getGas(2000), + Materials.Styrene.getCells(1), + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Ethylene.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Benzene.getFluid(1000), + Materials.Hydrogen.getGas(2000), + Materials.Styrene.getCells(1), + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Benzene.getCells(1), + Materials.Empty.getCells(1), + Materials.Ethylene.getGas(1000), + Materials.Styrene.getFluid(1000), + Materials.Hydrogen.getCells(2), + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Ethylene.getCells(1), + Materials.Empty.getCells(1), + Materials.Benzene.getFluid(1000), + Materials.Styrene.getFluid(1000), + Materials.Hydrogen.getCells(2), + 120); + + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Butadiene.getCells(1), + ItemList.Cell_Air.get(5), + Materials.Styrene.getFluid(350), + GT_Values.NF, + Materials.RawStyreneButadieneRubber.getDust(9), + Materials.Empty.getCells(6), + 160, + 240); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Butadiene.getCells(1), + Materials.Oxygen.getCells(5), + Materials.Styrene.getFluid(350), + GT_Values.NF, + Materials.RawStyreneButadieneRubber.getDust(13), + Materials.Empty.getCells(6), + 160, + 240); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Styrene.getCells(1), + ItemList.Cell_Air.get(15), + Materials.Butadiene.getGas(3000), + GT_Values.NF, + Materials.RawStyreneButadieneRubber.getDust(27), + Materials.Empty.getCells(16), + 480, + 240); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Styrene.getCells(1), + Materials.Oxygen.getCells(15), + Materials.Butadiene.getGas(3000), + GT_Values.NF, + Materials.RawStyreneButadieneRubber.getDust(41), + Materials.Empty.getCells(16), + 480, + 240); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Styrene.getCells(1), + Materials.Butadiene.getCells(3), + Materials.Air.getGas(15000), + GT_Values.NF, + Materials.RawStyreneButadieneRubber.getDust(27), + Materials.Empty.getCells(4), + 480, + 240); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Styrene.getCells(1), + Materials.Butadiene.getCells(3), + Materials.Oxygen.getGas(15000), + GT_Values.NF, + Materials.RawStyreneButadieneRubber.getDust(41), + Materials.Empty.getCells(4), + 480, + 240); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(3)}, + new FluidStack[] { + Materials.Styrene.getFluid(36), Materials.Butadiene.getGas(108), Materials.Air.getGas(2000) + }, + null, + new ItemStack[] {Materials.RawStyreneButadieneRubber.getDust(1)}, + 160, + 240); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(3)}, + new FluidStack[] { + Materials.Styrene.getFluid(72), Materials.Butadiene.getGas(216), Materials.Oxygen.getGas(2000) + }, + null, + new ItemStack[] {Materials.RawStyreneButadieneRubber.getDust(3)}, + 160, + 240); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(4)}, + new FluidStack[] { + Materials.Styrene.getFluid(540), + Materials.Butadiene.getGas(1620), + Materials.Titaniumtetrachloride.getFluid(100), + Materials.Air.getGas(15000) + }, + null, + new ItemStack[] { + Materials.RawStyreneButadieneRubber.getDust(22), Materials.RawStyreneButadieneRubber.getDustSmall(2) + }, + 640, + 240); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(4)}, + new FluidStack[] { + Materials.Styrene.getFluid(540), + Materials.Butadiene.getGas(1620), + Materials.Titaniumtetrachloride.getFluid(100), + Materials.Oxygen.getGas(7500) + }, + null, + new ItemStack[] {Materials.RawStyreneButadieneRubber.getDust(30)}, + 640, + 240); + + GT_Values.RA.addChemicalRecipe( + Materials.RawStyreneButadieneRubber.getDust(9), + Materials.Sulfur.getDust(1), + GT_Values.NF, + Materials.StyreneButadieneRubber.getMolten(1296), + GT_Values.NI, + 600); + + // C6H6 + 4Cl = C6H4Cl2 + 2HCl + GT_Values.RA.addChemicalRecipe( + Materials.Benzene.getCells(1), + GT_Utility.getIntegratedCircuit(2), + Materials.Chlorine.getGas(4000), + Materials.HydrochloricAcid.getFluid(2000), + Materials.Dichlorobenzene.getCells(1), + 240); + GT_Values.RA.addChemicalRecipe( + Materials.Chlorine.getCells(4), + GT_Utility.getIntegratedCircuit(2), + Materials.Benzene.getFluid(1000), + Materials.HydrochloricAcid.getFluid(2000), + Materials.Dichlorobenzene.getCells(1), + Materials.Empty.getCells(3), + 240); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Benzene.getCells(1), + Materials.Empty.getCells(1), + Materials.Chlorine.getGas(4000), + Materials.Dichlorobenzene.getFluid(1000), + Materials.HydrochloricAcid.getCells(2), + GT_Values.NI, + 240, + 30); + GT_Values.RA.addChemicalRecipe( + Materials.Chlorine.getCells(4), + GT_Utility.getIntegratedCircuit(12), + Materials.Benzene.getFluid(1000), + Materials.Dichlorobenzene.getFluid(1000), + Materials.HydrochloricAcid.getCells(2), + Materials.Empty.getCells(2), + 240); + + GT_Values.RA.addChemicalRecipe( + Materials.SodiumSulfide.getDust(3), + ItemList.Cell_Air.get(8), + Materials.Dichlorobenzene.getFluid(1000), + Materials.PolyphenyleneSulfide.getMolten(1000), + Materials.Salt.getDust(2), + Materials.Empty.getCells(8), + 240, + 360); + GT_Values.RA.addChemicalRecipe( + Materials.SodiumSulfide.getDust(3), + Materials.Oxygen.getCells(8), + Materials.Dichlorobenzene.getFluid(1000), + Materials.PolyphenyleneSulfide.getMolten(1500), + Materials.Salt.getDust(2), + Materials.Empty.getCells(8), + 240, + 360); + + // NaCl + H2SO4 = NaHSO4 + HCl + GT_Values.RA.addChemicalRecipe( + Materials.Salt.getDust(2), + GT_Utility.getIntegratedCircuit(1), + Materials.SulfuricAcid.getFluid(1000), + Materials.HydrochloricAcid.getFluid(1000), + Materials.SodiumBisulfate.getDust(7), + 60); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(9), Materials.Salt.getDust(18)}, + new FluidStack[] {Materials.SulfuricAcid.getFluid(9000)}, + new FluidStack[] {Materials.HydrochloricAcid.getFluid(9000)}, + new ItemStack[] {Materials.SodiumBisulfate.getDust(63)}, + 135, + 120); + // NaOH + H2SO4 = NaHSO4 + H2O + GT_Values.RA.addChemicalRecipe( + Materials.SodiumHydroxide.getDust(3), + GT_Utility.getIntegratedCircuit(1), + Materials.SulfuricAcid.getFluid(1000), + Materials.Water.getFluid(1000), + Materials.SodiumBisulfate.getDust(7), + 60); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(9), Materials.SodiumHydroxide.getDust(27)}, + new FluidStack[] {Materials.SulfuricAcid.getFluid(9000)}, + new FluidStack[] {Materials.Water.getFluid(9000)}, + new ItemStack[] {Materials.SodiumBisulfate.getDust(63)}, + 135, + 120); + // 2NaHSO4 = 2H + Na2S2O8 + GT_Values.RA.addElectrolyzerRecipe( + Materials.SodiumBisulfate.getDust(14), + Materials.Empty.getCells(2), + null, + Materials.SodiumPersulfate.getFluid(1000), + Materials.Hydrogen.getCells(2), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 600, + 30); // Custom Sodium Persulfate Ore Processing Recipes - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.Tantalite, 1), Materials.SodiumPersulfate.getFluid(500L), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Tantalite, 1), Materials.Tantalum.getDust(1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 3000, 4000}, 800, 8); - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.Pyrolusite, 1), Materials.SodiumPersulfate.getFluid(500L), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Pyrolusite, 1), Materials.Manganese.getDust(1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8); - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.Quartzite, 1), Materials.SodiumPersulfate.getFluid(500L), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Quartzite, 1), Materials.CertusQuartz.getDust(1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 3000, 4000}, 800, 8); - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.CertusQuartz, 1), Materials.SodiumPersulfate.getFluid(500L), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.CertusQuartz, 1), Materials.Barium.getDust(1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8); - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.Bauxite, 1), Materials.SodiumPersulfate.getFluid(500L), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Bauxite, 1), Materials.Rutile.getDust(1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 5000, 4000}, 800, 8); - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.Thorium, 1), Materials.SodiumPersulfate.getFluid(500L), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Thorium, 1), Materials.Uranium.getDust(1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 3000, 4000}, 800, 8); - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.Stibnite, 1), Materials.SodiumPersulfate.getFluid(500L), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Stibnite, 1), Materials.Antimony.getDust(1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 5000, 4000}, 800, 8); - - //Biodiesel recipes - GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDustTiny(1), Materials.Methanol.getCells(1), Materials.SeedOil.getFluid(6000), Materials.BioDiesel.getFluid(6000), Materials.Glycerol.getCells(1), 600); - GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDustTiny(1), Materials.SeedOil.getCells(6), Materials.Methanol.getFluid(1000), Materials.Glycerol.getFluid(1000), Materials.BioDiesel.getCells(6), 600); - GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDustTiny(1), Materials.Methanol.getCells(1), Materials.FishOil.getFluid(6000), Materials.BioDiesel.getFluid(6000), Materials.Glycerol.getCells(1), 600); - GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDustTiny(1), Materials.FishOil.getCells(6), Materials.Methanol.getFluid(1000), Materials.Glycerol.getFluid(1000), Materials.BioDiesel.getCells(6), 600); - GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDustTiny(1), Materials.Ethanol.getCells(1), Materials.SeedOil.getFluid(6000), Materials.BioDiesel.getFluid(6000), Materials.Glycerol.getCells(1), 600); - GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDustTiny(1), Materials.SeedOil.getCells(6), Materials.Ethanol.getFluid(1000), Materials.Glycerol.getFluid(1000), Materials.BioDiesel.getCells(6), 600); - GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDustTiny(1), Materials.Ethanol.getCells(1), Materials.FishOil.getFluid(6000), Materials.BioDiesel.getFluid(6000), Materials.Glycerol.getCells(1), 600); - GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDustTiny(1), Materials.FishOil.getCells(6), Materials.Ethanol.getFluid(1000), Materials.Glycerol.getFluid(1000), Materials.BioDiesel.getCells(6), 600); - - GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDust(1), Materials.Methanol.getCells(9), Materials.SeedOil.getFluid(54000), Materials.BioDiesel.getFluid(54000), Materials.Glycerol.getCells(9), 5400); - GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDust(1), Materials.SeedOil.getCells(54), Materials.Methanol.getFluid(9000), Materials.Glycerol.getFluid(9000), Materials.BioDiesel.getCells(54), 5400); - GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDust(1), Materials.Methanol.getCells(9), Materials.FishOil.getFluid(54000), Materials.BioDiesel.getFluid(54000), Materials.Glycerol.getCells(9), 5400); - GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDust(1), Materials.FishOil.getCells(54), Materials.Methanol.getFluid(9000), Materials.Glycerol.getFluid(9000), Materials.BioDiesel.getCells(54), 5400); - GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDust(1), Materials.Ethanol.getCells(9), Materials.SeedOil.getFluid(54000), Materials.BioDiesel.getFluid(54000), Materials.Glycerol.getCells(9), 5400); - GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDust(1), Materials.SeedOil.getCells(54), Materials.Ethanol.getFluid(9000), Materials.Glycerol.getFluid(9000), Materials.BioDiesel.getCells(54), 5400); - GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDust(1), Materials.Ethanol.getCells(9), Materials.FishOil.getFluid(54000), Materials.BioDiesel.getFluid(54000), Materials.Glycerol.getCells(9), 5400); - GT_Values.RA.addChemicalRecipe(Materials.SodiumHydroxide.getDust(1), Materials.FishOil.getCells(54), Materials.Ethanol.getFluid(9000), Materials.Glycerol.getFluid(9000), Materials.BioDiesel.getCells(54), 5400); - - - //C3H8O3 + 3HNO3 =H2SO4= C3H5N3O9 + 3H2O - GT_Values.RA.addChemicalRecipe( Materials.Glycerol.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.NitrationMixture.getFluid(6000), Materials.DilutedSulfuricAcid.getFluid(3000), Materials.Glyceryl.getCells(1), 180); - GT_Values.RA.addChemicalRecipe( Materials.NitrationMixture.getCells(6), GT_Utility.getIntegratedCircuit(1), Materials.Glycerol.getFluid(1000), Materials.DilutedSulfuricAcid.getFluid(3000), Materials.Glyceryl.getCells(1), Materials.Empty.getCells(5), 180); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Glycerol.getCells(1), Materials.Empty.getCells(2), Materials.NitrationMixture.getFluid(6000), Materials.Glyceryl.getFluid(1000), Materials.DilutedSulfuricAcid.getCells(3), GT_Values.NI, 180, 30); - GT_Values.RA.addChemicalRecipe( Materials.NitrationMixture.getCells(6), GT_Utility.getIntegratedCircuit(11), Materials.Glycerol.getFluid(1000), Materials.Glyceryl.getFluid(1000), Materials.DilutedSulfuricAcid.getCells(3), Materials.Empty.getCells(3), 180); - - //CaO + CO2 = CaCO3 - GT_Values.RA.addChemicalRecipe(Materials.Quicklime.getDust(2), GT_Values.NI, Materials.CarbonDioxide.getGas(1000), GT_Values.NF, Materials.Calcite.getDust(5), 80); - GT_Values.RA.addChemicalRecipe(Materials.Calcite.getDust(5), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Quicklime.getDust(2), 240); - //MgO + CO2 = MgCO3 - GT_Values.RA.addChemicalRecipe(Materials.Magnesia.getDust(2), GT_Values.NI, Materials.CarbonDioxide.getGas(1000), GT_Values.NF, Materials.Magnesite.getDust(5), 80); - GT_Values.RA.addChemicalRecipe(Materials.Magnesite.getDust(5), GT_Utility.getIntegratedCircuit(1), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Magnesia.getDust(2), 240); - - //C6H6 + 2Cl = C6H5Cl + HCl - GT_Values.RA.addChemicalRecipe(Materials.Benzene.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Chlorine.getGas(2000), Materials.HydrochloricAcid.getFluid(1000), Materials.Chlorobenzene.getCells(1), 240); - GT_Values.RA.addChemicalRecipe(Materials.Chlorine.getCells(2), GT_Utility.getIntegratedCircuit(1), Materials.Benzene.getFluid(1000), Materials.HydrochloricAcid.getFluid(1000), Materials.Chlorobenzene.getCells(1), Materials.Empty.getCells(1), 240); - GT_Values.RA.addChemicalRecipe(Materials.Chlorine.getCells(2), GT_Utility.getIntegratedCircuit(11), Materials.Benzene.getFluid(1000), Materials.Chlorobenzene.getFluid(1000), Materials.HydrochloricAcid.getCells(1), Materials.Empty.getCells(1), 240); - - //C6H5Cl + H2O = C6H6O + HCl - GT_Values.RA.addChemicalRecipe(Materials.Water.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Chlorobenzene.getFluid(1000), Materials.Phenol.getFluid(1000), Materials.DilutedHydrochloricAcid.getCells(1), 240); - GT_Values.RA.addChemicalRecipe(Materials.Chlorobenzene.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Water.getFluid(1000), Materials.Phenol.getFluid(1000), Materials.DilutedHydrochloricAcid.getCells(1), 240); - GT_Values.RA.addChemicalRecipe(Materials.Water.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Chlorobenzene.getFluid(1000), Materials.DilutedHydrochloricAcid.getFluid(1000), Materials.Phenol.getCells(1), 240); - GT_Values.RA.addChemicalRecipe(Materials.Chlorobenzene.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Water.getFluid(1000), Materials.DilutedHydrochloricAcid.getFluid(1000), Materials.Phenol.getCells(1), 240); - - //C6H5Cl + NaOH = C6H6O + NaCl - GT_Values.RA.addChemicalRecipe( Materials.SodiumHydroxide.getDust(12), GT_Utility.getIntegratedCircuit(1), Materials.Chlorobenzene.getFluid(4000), Materials.Phenol.getFluid(4000), Materials.Salt.getDust(8), 960); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.SodiumHydroxide.getDust(12), Materials.Empty.getCells(4), Materials.Chlorobenzene.getFluid(4000), GT_Values.NF, Materials.Salt.getDust(8), Materials.Phenol.getCells(4), 960, 30); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.SodiumHydroxide.getDust(12), Materials.Chlorobenzene.getCells(4), GT_Values.NF, GT_Values.NF, Materials.Salt.getDust(8), Materials.Phenol.getCells(4), 960, 30); - - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.Benzene.getFluid(1000), Materials.Chlorine.getGas(2000), Materials.Water.getFluid(1000)}, new FluidStack[]{Materials.Phenol.getFluid(1000), Materials.HydrochloricAcid.getFluid(1000), Materials.DilutedHydrochloricAcid.getFluid(1000)}, null, 560, 30); - //C6H6 + 2Cl + NaOH = C6H6O + NaCl + HCl - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{Materials.SodiumHydroxide.getDust(6), GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.Benzene.getFluid(2000), Materials.Chlorine.getGas(4000)}, new FluidStack[]{Materials.Phenol.getFluid(2000), Materials.HydrochloricAcid.getFluid(2000)}, new ItemStack[]{Materials.Salt.getDust(4)}, 1120, 30); - - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.LightFuel.getFluid(20000), Materials.HeavyFuel.getFluid(4000)}, new FluidStack[]{Materials.Fuel.getFluid(24000)}, null, 100, 480); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.Fuel.getFluid(10000), Materials.Tetranitromethane.getFluid(200)}, new FluidStack[]{Materials.NitroFuel.getFluid(10000)}, null, 120, 480); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.BioDiesel.getFluid(10000), Materials.Tetranitromethane.getFluid(400)}, new FluidStack[]{Materials.NitroFuel.getFluid(9000)}, null, 120, 480); - //CH4 + 2H2O = CO2 + 8H - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(11)}, new FluidStack[]{Materials.Methane.getGas(5000), Materials.Water.getFluid(10000)}, new FluidStack[]{Materials.CarbonDioxide.getGas(5000), Materials.Hydrogen.getGas(40000)}, null, 175, 480); - //CH4 + H2O = CO + 6H - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(12)}, new FluidStack[]{Materials.Methane.getGas(5000), Materials.Water.getFluid(5000)}, new FluidStack[]{Materials.CarbonMonoxide.getGas(5000), Materials.Hydrogen.getGas(30000)}, null, 175, 480); + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.Tantalite, 1), + Materials.SodiumPersulfate.getFluid(500L), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Tantalite, 1), + Materials.Tantalum.getDust(1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), + new int[] {10000, 3000, 4000}, + 800, + 8); + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.Pyrolusite, 1), + Materials.SodiumPersulfate.getFluid(500L), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Pyrolusite, 1), + Materials.Manganese.getDust(1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), + new int[] {10000, 7000, 4000}, + 800, + 8); + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.Quartzite, 1), + Materials.SodiumPersulfate.getFluid(500L), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Quartzite, 1), + Materials.CertusQuartz.getDust(1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), + new int[] {10000, 3000, 4000}, + 800, + 8); + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.CertusQuartz, 1), + Materials.SodiumPersulfate.getFluid(500L), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.CertusQuartz, 1), + Materials.Barium.getDust(1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), + new int[] {10000, 7000, 4000}, + 800, + 8); + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.Bauxite, 1), + Materials.SodiumPersulfate.getFluid(500L), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Bauxite, 1), + Materials.Rutile.getDust(1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), + new int[] {10000, 5000, 4000}, + 800, + 8); + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.Thorium, 1), + Materials.SodiumPersulfate.getFluid(500L), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Thorium, 1), + Materials.Uranium.getDust(1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), + new int[] {10000, 3000, 4000}, + 800, + 8); + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.Stibnite, 1), + Materials.SodiumPersulfate.getFluid(500L), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Stibnite, 1), + Materials.Antimony.getDust(1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), + new int[] {10000, 5000, 4000}, + 800, + 8); + + // Biodiesel recipes + GT_Values.RA.addChemicalRecipe( + Materials.SodiumHydroxide.getDustTiny(1), + Materials.Methanol.getCells(1), + Materials.SeedOil.getFluid(6000), + Materials.BioDiesel.getFluid(6000), + Materials.Glycerol.getCells(1), + 600); + GT_Values.RA.addChemicalRecipe( + Materials.SodiumHydroxide.getDustTiny(1), + Materials.SeedOil.getCells(6), + Materials.Methanol.getFluid(1000), + Materials.Glycerol.getFluid(1000), + Materials.BioDiesel.getCells(6), + 600); + GT_Values.RA.addChemicalRecipe( + Materials.SodiumHydroxide.getDustTiny(1), + Materials.Methanol.getCells(1), + Materials.FishOil.getFluid(6000), + Materials.BioDiesel.getFluid(6000), + Materials.Glycerol.getCells(1), + 600); + GT_Values.RA.addChemicalRecipe( + Materials.SodiumHydroxide.getDustTiny(1), + Materials.FishOil.getCells(6), + Materials.Methanol.getFluid(1000), + Materials.Glycerol.getFluid(1000), + Materials.BioDiesel.getCells(6), + 600); + GT_Values.RA.addChemicalRecipe( + Materials.SodiumHydroxide.getDustTiny(1), + Materials.Ethanol.getCells(1), + Materials.SeedOil.getFluid(6000), + Materials.BioDiesel.getFluid(6000), + Materials.Glycerol.getCells(1), + 600); + GT_Values.RA.addChemicalRecipe( + Materials.SodiumHydroxide.getDustTiny(1), + Materials.SeedOil.getCells(6), + Materials.Ethanol.getFluid(1000), + Materials.Glycerol.getFluid(1000), + Materials.BioDiesel.getCells(6), + 600); + GT_Values.RA.addChemicalRecipe( + Materials.SodiumHydroxide.getDustTiny(1), + Materials.Ethanol.getCells(1), + Materials.FishOil.getFluid(6000), + Materials.BioDiesel.getFluid(6000), + Materials.Glycerol.getCells(1), + 600); + GT_Values.RA.addChemicalRecipe( + Materials.SodiumHydroxide.getDustTiny(1), + Materials.FishOil.getCells(6), + Materials.Ethanol.getFluid(1000), + Materials.Glycerol.getFluid(1000), + Materials.BioDiesel.getCells(6), + 600); + + GT_Values.RA.addChemicalRecipe( + Materials.SodiumHydroxide.getDust(1), + Materials.Methanol.getCells(9), + Materials.SeedOil.getFluid(54000), + Materials.BioDiesel.getFluid(54000), + Materials.Glycerol.getCells(9), + 5400); + GT_Values.RA.addChemicalRecipe( + Materials.SodiumHydroxide.getDust(1), + Materials.SeedOil.getCells(54), + Materials.Methanol.getFluid(9000), + Materials.Glycerol.getFluid(9000), + Materials.BioDiesel.getCells(54), + 5400); + GT_Values.RA.addChemicalRecipe( + Materials.SodiumHydroxide.getDust(1), + Materials.Methanol.getCells(9), + Materials.FishOil.getFluid(54000), + Materials.BioDiesel.getFluid(54000), + Materials.Glycerol.getCells(9), + 5400); + GT_Values.RA.addChemicalRecipe( + Materials.SodiumHydroxide.getDust(1), + Materials.FishOil.getCells(54), + Materials.Methanol.getFluid(9000), + Materials.Glycerol.getFluid(9000), + Materials.BioDiesel.getCells(54), + 5400); + GT_Values.RA.addChemicalRecipe( + Materials.SodiumHydroxide.getDust(1), + Materials.Ethanol.getCells(9), + Materials.SeedOil.getFluid(54000), + Materials.BioDiesel.getFluid(54000), + Materials.Glycerol.getCells(9), + 5400); + GT_Values.RA.addChemicalRecipe( + Materials.SodiumHydroxide.getDust(1), + Materials.SeedOil.getCells(54), + Materials.Ethanol.getFluid(9000), + Materials.Glycerol.getFluid(9000), + Materials.BioDiesel.getCells(54), + 5400); + GT_Values.RA.addChemicalRecipe( + Materials.SodiumHydroxide.getDust(1), + Materials.Ethanol.getCells(9), + Materials.FishOil.getFluid(54000), + Materials.BioDiesel.getFluid(54000), + Materials.Glycerol.getCells(9), + 5400); + GT_Values.RA.addChemicalRecipe( + Materials.SodiumHydroxide.getDust(1), + Materials.FishOil.getCells(54), + Materials.Ethanol.getFluid(9000), + Materials.Glycerol.getFluid(9000), + Materials.BioDiesel.getCells(54), + 5400); + + // C3H8O3 + 3HNO3 =H2SO4= C3H5N3O9 + 3H2O + GT_Values.RA.addChemicalRecipe( + Materials.Glycerol.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.NitrationMixture.getFluid(6000), + Materials.DilutedSulfuricAcid.getFluid(3000), + Materials.Glyceryl.getCells(1), + 180); + GT_Values.RA.addChemicalRecipe( + Materials.NitrationMixture.getCells(6), + GT_Utility.getIntegratedCircuit(1), + Materials.Glycerol.getFluid(1000), + Materials.DilutedSulfuricAcid.getFluid(3000), + Materials.Glyceryl.getCells(1), + Materials.Empty.getCells(5), + 180); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Glycerol.getCells(1), + Materials.Empty.getCells(2), + Materials.NitrationMixture.getFluid(6000), + Materials.Glyceryl.getFluid(1000), + Materials.DilutedSulfuricAcid.getCells(3), + GT_Values.NI, + 180, + 30); + GT_Values.RA.addChemicalRecipe( + Materials.NitrationMixture.getCells(6), + GT_Utility.getIntegratedCircuit(11), + Materials.Glycerol.getFluid(1000), + Materials.Glyceryl.getFluid(1000), + Materials.DilutedSulfuricAcid.getCells(3), + Materials.Empty.getCells(3), + 180); + + // CaO + CO2 = CaCO3 + GT_Values.RA.addChemicalRecipe( + Materials.Quicklime.getDust(2), + GT_Values.NI, + Materials.CarbonDioxide.getGas(1000), + GT_Values.NF, + Materials.Calcite.getDust(5), + 80); + GT_Values.RA.addChemicalRecipe( + Materials.Calcite.getDust(5), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Quicklime.getDust(2), + 240); + // MgO + CO2 = MgCO3 + GT_Values.RA.addChemicalRecipe( + Materials.Magnesia.getDust(2), + GT_Values.NI, + Materials.CarbonDioxide.getGas(1000), + GT_Values.NF, + Materials.Magnesite.getDust(5), + 80); + GT_Values.RA.addChemicalRecipe( + Materials.Magnesite.getDust(5), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Magnesia.getDust(2), + 240); + + // C6H6 + 2Cl = C6H5Cl + HCl + GT_Values.RA.addChemicalRecipe( + Materials.Benzene.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Chlorine.getGas(2000), + Materials.HydrochloricAcid.getFluid(1000), + Materials.Chlorobenzene.getCells(1), + 240); + GT_Values.RA.addChemicalRecipe( + Materials.Chlorine.getCells(2), + GT_Utility.getIntegratedCircuit(1), + Materials.Benzene.getFluid(1000), + Materials.HydrochloricAcid.getFluid(1000), + Materials.Chlorobenzene.getCells(1), + Materials.Empty.getCells(1), + 240); + GT_Values.RA.addChemicalRecipe( + Materials.Chlorine.getCells(2), + GT_Utility.getIntegratedCircuit(11), + Materials.Benzene.getFluid(1000), + Materials.Chlorobenzene.getFluid(1000), + Materials.HydrochloricAcid.getCells(1), + Materials.Empty.getCells(1), + 240); + + // C6H5Cl + H2O = C6H6O + HCl + GT_Values.RA.addChemicalRecipe( + Materials.Water.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Chlorobenzene.getFluid(1000), + Materials.Phenol.getFluid(1000), + Materials.DilutedHydrochloricAcid.getCells(1), + 240); + GT_Values.RA.addChemicalRecipe( + Materials.Chlorobenzene.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Water.getFluid(1000), + Materials.Phenol.getFluid(1000), + Materials.DilutedHydrochloricAcid.getCells(1), + 240); + GT_Values.RA.addChemicalRecipe( + Materials.Water.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Chlorobenzene.getFluid(1000), + Materials.DilutedHydrochloricAcid.getFluid(1000), + Materials.Phenol.getCells(1), + 240); + GT_Values.RA.addChemicalRecipe( + Materials.Chlorobenzene.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Water.getFluid(1000), + Materials.DilutedHydrochloricAcid.getFluid(1000), + Materials.Phenol.getCells(1), + 240); + + // C6H5Cl + NaOH = C6H6O + NaCl + GT_Values.RA.addChemicalRecipe( + Materials.SodiumHydroxide.getDust(12), + GT_Utility.getIntegratedCircuit(1), + Materials.Chlorobenzene.getFluid(4000), + Materials.Phenol.getFluid(4000), + Materials.Salt.getDust(8), + 960); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.SodiumHydroxide.getDust(12), + Materials.Empty.getCells(4), + Materials.Chlorobenzene.getFluid(4000), + GT_Values.NF, + Materials.Salt.getDust(8), + Materials.Phenol.getCells(4), + 960, + 30); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.SodiumHydroxide.getDust(12), + Materials.Chlorobenzene.getCells(4), + GT_Values.NF, + GT_Values.NF, + Materials.Salt.getDust(8), + Materials.Phenol.getCells(4), + 960, + 30); + + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] { + Materials.Benzene.getFluid(1000), Materials.Chlorine.getGas(2000), Materials.Water.getFluid(1000) + }, + new FluidStack[] { + Materials.Phenol.getFluid(1000), + Materials.HydrochloricAcid.getFluid(1000), + Materials.DilutedHydrochloricAcid.getFluid(1000) + }, + null, + 560, + 30); + // C6H6 + 2Cl + NaOH = C6H6O + NaCl + HCl + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {Materials.SodiumHydroxide.getDust(6), GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] {Materials.Benzene.getFluid(2000), Materials.Chlorine.getGas(4000)}, + new FluidStack[] {Materials.Phenol.getFluid(2000), Materials.HydrochloricAcid.getFluid(2000)}, + new ItemStack[] {Materials.Salt.getDust(4)}, + 1120, + 30); + + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] {Materials.LightFuel.getFluid(20000), Materials.HeavyFuel.getFluid(4000)}, + new FluidStack[] {Materials.Fuel.getFluid(24000)}, + null, + 100, + 480); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] {Materials.Fuel.getFluid(10000), Materials.Tetranitromethane.getFluid(200)}, + new FluidStack[] {Materials.NitroFuel.getFluid(10000)}, + null, + 120, + 480); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] {Materials.BioDiesel.getFluid(10000), Materials.Tetranitromethane.getFluid(400)}, + new FluidStack[] {Materials.NitroFuel.getFluid(9000)}, + null, + 120, + 480); + // CH4 + 2H2O = CO2 + 8H + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(11)}, + new FluidStack[] {Materials.Methane.getGas(5000), Materials.Water.getFluid(10000)}, + new FluidStack[] {Materials.CarbonDioxide.getGas(5000), Materials.Hydrogen.getGas(40000)}, + null, + 175, + 480); + // CH4 + H2O = CO + 6H + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(12)}, + new FluidStack[] {Materials.Methane.getGas(5000), Materials.Water.getFluid(5000)}, + new FluidStack[] {Materials.CarbonMonoxide.getGas(5000), Materials.Hydrogen.getGas(30000)}, + null, + 175, + 480); } private void addRecipesMay2017OilRefining() { - GT_Values.RA.addUniversalDistillationRecipe(Materials.Gas.getGas(1000), new FluidStack[]{Materials.Butane.getGas(60), Materials.Propane.getGas(70), Materials.Ethane.getGas(100), Materials.Methane.getGas(750), Materials.Helium.getGas(20)}, GT_Values.NI, 240, 120); - - GT_Values.RA.addCentrifugeRecipe(null, null, Materials.Propane.getGas(320), Materials.LPG.getFluid(290), null, null, null, null, null, null, null, 20, 5); - GT_Values.RA.addCentrifugeRecipe(null, null, Materials.Butane.getGas(320), Materials.LPG.getFluid(370), null, null, null, null, null, null, null, 20, 5); - - GT_Values.RA.addUniversalDistillationRecipe(Materials.Ethylene.getLightlyHydroCracked(1000), new FluidStack[]{Materials.Ethane.getGas(1000)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Ethylene.getModeratelyHydroCracked(1000), new FluidStack[]{Materials.Methane.getGas(2000)}, null, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Ethylene.getSeverelyHydroCracked(1000), new FluidStack[]{Materials.Methane.getGas(2000), Materials.Hydrogen.getGas(2000)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Ethylene.getLightlySteamCracked(1000), new FluidStack[]{Materials.Methane.getGas(1000)}, Materials.Carbon.getDust(1), 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Ethylene.getModeratelySteamCracked(1000), new FluidStack[]{Materials.Methane.getGas(1000)}, Materials.Carbon.getDust(1), 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Ethylene.getSeverelySteamCracked(1000), new FluidStack[]{Materials.Methane.getGas(1000)}, Materials.Carbon.getDust(1), 120, 120); - - GT_Values.RA.addUniversalDistillationRecipe(Materials.Ethane.getLightlyHydroCracked(1000), new FluidStack[]{Materials.Methane.getGas(2000)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Ethane.getModeratelyHydroCracked(1000), new FluidStack[]{Materials.Methane.getGas(2000), Materials.Hydrogen.getGas(2000)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Ethane.getSeverelyHydroCracked(1000), new FluidStack[]{Materials.Methane.getGas(2000), Materials.Hydrogen.getGas(4000)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Ethane.getLightlySteamCracked(1000), new FluidStack[]{Materials.Ethylene.getGas(250), Materials.Methane.getGas(1250)}, Materials.Carbon.getDustSmall(1), 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Ethane.getModeratelySteamCracked(1000), new FluidStack[]{Materials.Ethylene.getGas(125), Materials.Methane.getGas(1375)}, Materials.Carbon.getDustTiny(6), 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Ethane.getSeverelySteamCracked(1000), new FluidStack[]{Materials.Methane.getGas(1500)}, Materials.Carbon.getDustSmall(2), 120, 120); - - GT_Values.RA.addUniversalDistillationRecipe(Materials.Propene.getLightlyHydroCracked(1000), new FluidStack[]{Materials.Propane.getGas(500), Materials.Ethylene.getGas(500), Materials.Methane.getGas(500)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Propene.getModeratelyHydroCracked(1000), new FluidStack[]{Materials.Ethane.getGas(1000), Materials.Methane.getGas(1000)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Propene.getSeverelyHydroCracked(1000), new FluidStack[]{Materials.Methane.getGas(3000)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Propene.getLightlySteamCracked(1000), new FluidStack[]{Materials.Ethylene.getGas(1000), Materials.Methane.getGas(500)}, Materials.Carbon.getDustSmall(2), 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Propene.getModeratelySteamCracked(1000), new FluidStack[]{Materials.Ethylene.getGas(750), Materials.Methane.getGas(750)}, Materials.Carbon.getDustSmall(3), 180, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Propene.getSeverelySteamCracked(1000), new FluidStack[]{Materials.Methane.getGas(1500)}, Materials.Carbon.getDustSmall(6), 180, 120); - - GT_Values.RA.addUniversalDistillationRecipe(Materials.Propane.getLightlyHydroCracked(1000), new FluidStack[]{Materials.Ethane.getGas(1000), Materials.Methane.getGas(1000)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Propane.getModeratelyHydroCracked(1000), new FluidStack[]{Materials.Methane.getGas(3000)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Propane.getSeverelyHydroCracked(1000), new FluidStack[]{Materials.Methane.getGas(3000), Materials.Hydrogen.getGas(2000)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Propane.getLightlySteamCracked(1000), new FluidStack[]{Materials.Ethylene.getGas(750), Materials.Methane.getGas(1250)}, Materials.Carbon.getDustTiny(2), 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Propane.getModeratelySteamCracked(1000), new FluidStack[]{Materials.Ethylene.getGas(500), Materials.Methane.getGas(1500)}, Materials.Carbon.getDustSmall(1), 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Propane.getSeverelySteamCracked(1000), new FluidStack[]{Materials.Ethylene.getGas(250), Materials.Methane.getGas(1750)}, Materials.Carbon.getDustTiny(4), 120, 120); - - GT_Values.RA.addUniversalDistillationRecipe(Materials.Butadiene.getLightlyHydroCracked(1000), new FluidStack[]{Materials.Butene.getGas(667), Materials.Ethylene.getGas(667)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Butadiene.getModeratelyHydroCracked(1000), new FluidStack[]{Materials.Butane.getGas(223), Materials.Propene.getGas(223), Materials.Ethane.getGas(400), Materials.Ethylene.getGas(445), Materials.Methane.getGas(223)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Butadiene.getSeverelyHydroCracked(1000), new FluidStack[]{Materials.Propane.getGas(260), Materials.Ethane.getGas(926), Materials.Ethylene.getGas(389), Materials.Methane.getGas(2667)}, GT_Values.NI, 112, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Butadiene.getLightlySteamCracked(1000), new FluidStack[]{Materials.Propene.getGas(750), Materials.Ethylene.getGas(188), Materials.Methane.getGas(188)}, Materials.Carbon.getDustSmall(3), 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Butadiene.getModeratelySteamCracked(1000), new FluidStack[]{Materials.Propene.getGas(125), Materials.Ethylene.getGas(1125), Materials.Methane.getGas(188)}, Materials.Carbon.getDustSmall(3), 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Butadiene.getSeverelySteamCracked(1000), new FluidStack[]{Materials.Propene.getGas(125), Materials.Ethylene.getGas(188), Materials.Methane.getGas(1125)}, Materials.Carbon.getDust(1), 120, 120); - - GT_Values.RA.addUniversalDistillationRecipe(Materials.Butene.getLightlyHydroCracked(1000), new FluidStack[]{Materials.Butane.getGas(334), Materials.Propene.getGas(334), Materials.Ethane.getGas(334), Materials.Ethylene.getGas(334), Materials.Methane.getGas(334)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Butene.getModeratelyHydroCracked(1000), new FluidStack[]{Materials.Propane.getGas(389), Materials.Ethane.getGas(556), Materials.Ethylene.getGas(334), Materials.Methane.getGas(1056)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Butene.getSeverelyHydroCracked(1000), new FluidStack[]{Materials.Ethane.getGas(1000), Materials.Methane.getGas(2000)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Butene.getLightlySteamCracked(1000), new FluidStack[]{Materials.Propene.getGas(750), Materials.Ethylene.getGas(500), Materials.Methane.getGas(250)}, Materials.Carbon.getDustSmall(1), 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Butene.getModeratelySteamCracked(1000), new FluidStack[]{Materials.Propene.getGas(200), Materials.Ethylene.getGas(1300), Materials.Methane.getGas(400)}, Materials.Carbon.getDustSmall(1), 192, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Butene.getSeverelySteamCracked(1000), new FluidStack[]{Materials.Propene.getGas(125), Materials.Ethylene.getGas(313), Materials.Methane.getGas(1500)}, Materials.Carbon.getDustSmall(6), 120, 120); - - GT_Values.RA.addUniversalDistillationRecipe(Materials.Butane.getLightlyHydroCracked(1000), new FluidStack[]{Materials.Propane.getGas(667), Materials.Ethane.getGas(667), Materials.Methane.getGas(667)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Butane.getModeratelyHydroCracked(1000), new FluidStack[]{Materials.Ethane.getGas(1000), Materials.Methane.getGas(2000)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Butane.getSeverelyHydroCracked(1000), new FluidStack[]{Materials.Methane.getGas(1000)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Butane.getLightlySteamCracked(1000), new FluidStack[]{Materials.Propane.getGas(750), Materials.Ethane.getGas(125), Materials.Ethylene.getGas(125), Materials.Methane.getGas(1063)}, Materials.Carbon.getDustTiny(2), 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Butane.getModeratelySteamCracked(1000), new FluidStack[]{Materials.Propane.getGas(125), Materials.Ethane.getGas(750), Materials.Ethylene.getGas(750), Materials.Methane.getGas(438)}, Materials.Carbon.getDustTiny(2), 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Butane.getSeverelySteamCracked(1000), new FluidStack[]{Materials.Propane.getGas(125), Materials.Ethane.getGas(125), Materials.Ethylene.getGas(125), Materials.Methane.getGas(2000)}, Materials.Carbon.getDustTiny(11), 120, 120); - - GT_Values.RA.addUniversalDistillationRecipe(Materials.Gas.getLightlyHydroCracked(1000), new FluidStack[]{Materials.Methane.getGas(1400), Materials.Hydrogen.getGas(1340), Materials.Helium.getGas(20)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Gas.getModeratelyHydroCracked(1000), new FluidStack[]{Materials.Methane.getGas(1400), Materials.Hydrogen.getGas(3340), Materials.Helium.getGas(20)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Gas.getSeverelyHydroCracked(1000), new FluidStack[]{Materials.Methane.getGas(1400), Materials.Hydrogen.getGas(4340), Materials.Helium.getGas(20)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Gas.getLightlySteamCracked(1000), new FluidStack[]{Materials.Propene.getGas(45), Materials.Ethane.getGas(8), Materials.Ethylene.getGas(85), Materials.Methane.getGas(1026), Materials.Helium.getGas(20)}, Materials.Carbon.getDustTiny(1), 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Gas.getModeratelySteamCracked(1000), new FluidStack[]{Materials.Propene.getGas(8), Materials.Ethane.getGas(45), Materials.Ethylene.getGas(92), Materials.Methane.getGas(1018), Materials.Helium.getGas(20)}, Materials.Carbon.getDustTiny(1), 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Gas.getSeverelySteamCracked(1000), new FluidStack[]{Materials.Propene.getGas(8), Materials.Ethane.getGas(8), Materials.Ethylene.getGas(25), Materials.Methane.getGas(1143), Materials.Helium.getGas(20)}, Materials.Carbon.getDustTiny(1), 120, 120); - - GT_Values.RA.addUniversalDistillationRecipe(Materials.Naphtha.getLightlyHydroCracked(1000), new FluidStack[]{Materials.Butane.getGas(800), Materials.Propane.getGas(300), Materials.Ethane.getGas(250), Materials.Methane.getGas(250)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Naphtha.getModeratelyHydroCracked(1000), new FluidStack[]{Materials.Butane.getGas(200), Materials.Propane.getGas(1100), Materials.Ethane.getGas(400), Materials.Methane.getGas(400)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Naphtha.getSeverelyHydroCracked(1000), new FluidStack[]{Materials.Butane.getGas(125), Materials.Propane.getGas(125), Materials.Ethane.getGas(1500), Materials.Methane.getGas(1500)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Naphtha.getLightlySteamCracked(1000), new FluidStack[]{Materials.HeavyFuel.getFluid(75), Materials.LightFuel.getFluid(150), Materials.Toluene.getFluid(40), Materials.Benzene.getFluid(150), Materials.Butene.getGas(80), Materials.Butadiene.getGas(150), Materials.Propane.getGas(15), Materials.Propene.getGas(200), Materials.Ethane.getGas(35), Materials.Ethylene.getGas(200), Materials.Methane.getGas(200)}, Materials.Carbon.getDustTiny(1), 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Naphtha.getModeratelySteamCracked(1000), new FluidStack[]{Materials.HeavyFuel.getFluid(50), Materials.LightFuel.getFluid(100), Materials.Toluene.getFluid(30), Materials.Benzene.getFluid(125), Materials.Butene.getGas(65), Materials.Butadiene.getGas(100), Materials.Propane.getGas(30), Materials.Propene.getGas(400), Materials.Ethane.getGas(50), Materials.Ethylene.getGas(350), Materials.Methane.getGas(350)}, Materials.Carbon.getDustTiny(2), 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.Naphtha.getSeverelySteamCracked(1000), new FluidStack[]{Materials.HeavyFuel.getFluid(25), Materials.LightFuel.getFluid(50), Materials.Toluene.getFluid(20), Materials.Benzene.getFluid(100), Materials.Butene.getGas(50), Materials.Butadiene.getGas(50), Materials.Propane.getGas(15), Materials.Propene.getGas(300), Materials.Ethane.getGas(65), Materials.Ethylene.getGas(500), Materials.Methane.getGas(500)}, Materials.Carbon.getDustTiny(3), 120, 120); - - GT_Values.RA.addUniversalDistillationRecipe(Materials.LightFuel.getLightlyHydroCracked(1000), new FluidStack[]{Materials.Naphtha.getFluid(800), Materials.Octane.getFluid(100), Materials.Butane.getGas(150), Materials.Propane.getGas(200), Materials.Ethane.getGas(125), Materials.Methane.getGas(125)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.LightFuel.getModeratelyHydroCracked(1000), new FluidStack[]{Materials.Naphtha.getFluid(500), Materials.Octane.getFluid(50), Materials.Butane.getGas(200), Materials.Propane.getGas(1100), Materials.Ethane.getGas(400), Materials.Methane.getGas(400)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.LightFuel.getSeverelyHydroCracked(1000), new FluidStack[]{Materials.Naphtha.getFluid(200), Materials.Octane.getFluid(20), Materials.Butane.getGas(125), Materials.Propane.getGas(125), Materials.Ethane.getGas(1500), Materials.Methane.getGas(1500)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.LightFuel.getLightlySteamCracked(1000), new FluidStack[]{Materials.HeavyFuel.getFluid(150), Materials.Naphtha.getFluid(400), Materials.Toluene.getFluid(40), Materials.Benzene.getFluid(200), Materials.Butene.getGas(75), Materials.Butadiene.getGas(60), Materials.Propane.getGas(20), Materials.Propene.getGas(150), Materials.Ethane.getGas(10), Materials.Ethylene.getGas(50), Materials.Methane.getGas(50)}, Materials.Carbon.getDustTiny(1), 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.LightFuel.getModeratelySteamCracked(1000), new FluidStack[]{Materials.HeavyFuel.getFluid(100), Materials.Naphtha.getFluid(250), Materials.Toluene.getFluid(50), Materials.Benzene.getFluid(300), Materials.Butene.getGas(90), Materials.Butadiene.getGas(75), Materials.Propane.getGas(35), Materials.Propene.getGas(200), Materials.Ethane.getGas(30), Materials.Ethylene.getGas(150), Materials.Methane.getGas(150)}, Materials.Carbon.getDustTiny(2), 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.LightFuel.getSeverelySteamCracked(1000), new FluidStack[]{Materials.HeavyFuel.getFluid(50), Materials.Naphtha.getFluid(100), Materials.Toluene.getFluid(30), Materials.Benzene.getFluid(150), Materials.Butene.getGas(65), Materials.Butadiene.getGas(50), Materials.Propane.getGas(50), Materials.Propene.getGas(250), Materials.Ethane.getGas(50), Materials.Ethylene.getGas(250), Materials.Methane.getGas(250)}, Materials.Carbon.getDustTiny(3), 120, 120); - - GT_Values.RA.addUniversalDistillationRecipe(Materials.HeavyFuel.getLightlyHydroCracked(1000), new FluidStack[]{Materials.LightFuel.getFluid(600), Materials.Naphtha.getFluid(100), Materials.Butane.getGas(100), Materials.Propane.getGas(100), Materials.Ethane.getGas(75), Materials.Methane.getGas(75)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.HeavyFuel.getModeratelyHydroCracked(1000), new FluidStack[]{Materials.LightFuel.getFluid(400), Materials.Naphtha.getFluid(400), Materials.Butane.getGas(150), Materials.Propane.getGas(150), Materials.Ethane.getGas(100), Materials.Methane.getGas(100)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.HeavyFuel.getSeverelyHydroCracked(1000), new FluidStack[]{Materials.LightFuel.getFluid(200), Materials.Naphtha.getFluid(250), Materials.Butane.getGas(300), Materials.Propane.getGas(300), Materials.Ethane.getGas(175), Materials.Methane.getGas(175)}, GT_Values.NI, 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.HeavyFuel.getLightlySteamCracked(1000), new FluidStack[]{Materials.LightFuel.getFluid(300), Materials.Naphtha.getFluid(50), Materials.Toluene.getFluid(25), Materials.Benzene.getFluid(125), Materials.Butene.getGas(25), Materials.Butadiene.getGas(15), Materials.Propane.getGas(3), Materials.Propene.getGas(30), Materials.Ethane.getGas(5), Materials.Ethylene.getGas(50), Materials.Methane.getGas(50)}, Materials.Carbon.getDustTiny(1), 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.HeavyFuel.getModeratelySteamCracked(1000), new FluidStack[]{Materials.LightFuel.getFluid(200), Materials.Naphtha.getFluid(200), Materials.Toluene.getFluid(40), Materials.Benzene.getFluid(200), Materials.Butene.getGas(40), Materials.Butadiene.getGas(25), Materials.Propane.getGas(5), Materials.Propene.getGas(50), Materials.Ethane.getGas(7), Materials.Ethylene.getGas(75), Materials.Methane.getGas(75)}, Materials.Carbon.getDustTiny(2), 120, 120); - GT_Values.RA.addUniversalDistillationRecipe(Materials.HeavyFuel.getSeverelySteamCracked(1000), new FluidStack[]{Materials.LightFuel.getFluid(100), Materials.Naphtha.getFluid(125), Materials.Toluene.getFluid(80), Materials.Benzene.getFluid(400), Materials.Butene.getGas(80), Materials.Butadiene.getGas(50), Materials.Propane.getGas(10), Materials.Propene.getGas(100), Materials.Ethane.getGas(15), Materials.Ethylene.getGas(150), Materials.Methane.getGas(150)}, Materials.Carbon.getDustTiny(3), 120, 120); - - //Recipes for gasoline - //2N + O = N2O - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Nitrogen.getCells(2), Materials.Oxygen.getCells(1), GT_Values.NF, GT_Values.NF, Materials.NitrousOxide.getCells(1), Materials.Empty.getCells(2),200, 30); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Nitrogen.getCells(2), GT_Utility.getIntegratedCircuit(1), Materials.Oxygen.getGas(1000L), Materials.NitrousOxide.getGas(1000L), Materials.Empty.getCells(2), GT_Values.NI, 200, 30); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Nitrogen.getCells(2), GT_Utility.getIntegratedCircuit(11), Materials.Oxygen.getGas(1000L), GT_Values.NF, Materials.NitrousOxide.getCells(1), Materials.Empty.getCells(1), 200, 30); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Oxygen.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.Nitrogen.getGas(2000L), Materials.NitrousOxide.getGas(1000L), Materials.Empty.getCells(1), GT_Values.NI, 200, 30); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Oxygen.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.Nitrogen.getGas(2000L), GT_Values.NF, Materials.NitrousOxide.getCells(1), GT_Values.NI, 200, 30); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.Nitrogen.getGas(20000), Materials.Oxygen.getGas(10000)}, new FluidStack[]{Materials.NitrousOxide.getGas(10000)}, new ItemStack[]{null}, 50, 480); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Gas.getGas(1000), + new FluidStack[] { + Materials.Butane.getGas(60), + Materials.Propane.getGas(70), + Materials.Ethane.getGas(100), + Materials.Methane.getGas(750), + Materials.Helium.getGas(20) + }, + GT_Values.NI, + 240, + 120); + + GT_Values.RA.addCentrifugeRecipe( + null, + null, + Materials.Propane.getGas(320), + Materials.LPG.getFluid(290), + null, + null, + null, + null, + null, + null, + null, + 20, + 5); + GT_Values.RA.addCentrifugeRecipe( + null, + null, + Materials.Butane.getGas(320), + Materials.LPG.getFluid(370), + null, + null, + null, + null, + null, + null, + null, + 20, + 5); + + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Ethylene.getLightlyHydroCracked(1000), + new FluidStack[] {Materials.Ethane.getGas(1000)}, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Ethylene.getModeratelyHydroCracked(1000), + new FluidStack[] {Materials.Methane.getGas(2000)}, + null, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Ethylene.getSeverelyHydroCracked(1000), + new FluidStack[] {Materials.Methane.getGas(2000), Materials.Hydrogen.getGas(2000)}, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Ethylene.getLightlySteamCracked(1000), + new FluidStack[] {Materials.Methane.getGas(1000)}, + Materials.Carbon.getDust(1), + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Ethylene.getModeratelySteamCracked(1000), + new FluidStack[] {Materials.Methane.getGas(1000)}, + Materials.Carbon.getDust(1), + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Ethylene.getSeverelySteamCracked(1000), + new FluidStack[] {Materials.Methane.getGas(1000)}, + Materials.Carbon.getDust(1), + 120, + 120); + + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Ethane.getLightlyHydroCracked(1000), + new FluidStack[] {Materials.Methane.getGas(2000)}, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Ethane.getModeratelyHydroCracked(1000), + new FluidStack[] {Materials.Methane.getGas(2000), Materials.Hydrogen.getGas(2000)}, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Ethane.getSeverelyHydroCracked(1000), + new FluidStack[] {Materials.Methane.getGas(2000), Materials.Hydrogen.getGas(4000)}, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Ethane.getLightlySteamCracked(1000), + new FluidStack[] {Materials.Ethylene.getGas(250), Materials.Methane.getGas(1250)}, + Materials.Carbon.getDustSmall(1), + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Ethane.getModeratelySteamCracked(1000), + new FluidStack[] {Materials.Ethylene.getGas(125), Materials.Methane.getGas(1375)}, + Materials.Carbon.getDustTiny(6), + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Ethane.getSeverelySteamCracked(1000), + new FluidStack[] {Materials.Methane.getGas(1500)}, + Materials.Carbon.getDustSmall(2), + 120, + 120); + + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Propene.getLightlyHydroCracked(1000), + new FluidStack[] { + Materials.Propane.getGas(500), Materials.Ethylene.getGas(500), Materials.Methane.getGas(500) + }, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Propene.getModeratelyHydroCracked(1000), + new FluidStack[] {Materials.Ethane.getGas(1000), Materials.Methane.getGas(1000)}, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Propene.getSeverelyHydroCracked(1000), + new FluidStack[] {Materials.Methane.getGas(3000)}, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Propene.getLightlySteamCracked(1000), + new FluidStack[] {Materials.Ethylene.getGas(1000), Materials.Methane.getGas(500)}, + Materials.Carbon.getDustSmall(2), + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Propene.getModeratelySteamCracked(1000), + new FluidStack[] {Materials.Ethylene.getGas(750), Materials.Methane.getGas(750)}, + Materials.Carbon.getDustSmall(3), + 180, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Propene.getSeverelySteamCracked(1000), + new FluidStack[] {Materials.Methane.getGas(1500)}, + Materials.Carbon.getDustSmall(6), + 180, + 120); + + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Propane.getLightlyHydroCracked(1000), + new FluidStack[] {Materials.Ethane.getGas(1000), Materials.Methane.getGas(1000)}, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Propane.getModeratelyHydroCracked(1000), + new FluidStack[] {Materials.Methane.getGas(3000)}, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Propane.getSeverelyHydroCracked(1000), + new FluidStack[] {Materials.Methane.getGas(3000), Materials.Hydrogen.getGas(2000)}, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Propane.getLightlySteamCracked(1000), + new FluidStack[] {Materials.Ethylene.getGas(750), Materials.Methane.getGas(1250)}, + Materials.Carbon.getDustTiny(2), + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Propane.getModeratelySteamCracked(1000), + new FluidStack[] {Materials.Ethylene.getGas(500), Materials.Methane.getGas(1500)}, + Materials.Carbon.getDustSmall(1), + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Propane.getSeverelySteamCracked(1000), + new FluidStack[] {Materials.Ethylene.getGas(250), Materials.Methane.getGas(1750)}, + Materials.Carbon.getDustTiny(4), + 120, + 120); + + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Butadiene.getLightlyHydroCracked(1000), + new FluidStack[] {Materials.Butene.getGas(667), Materials.Ethylene.getGas(667)}, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Butadiene.getModeratelyHydroCracked(1000), + new FluidStack[] { + Materials.Butane.getGas(223), + Materials.Propene.getGas(223), + Materials.Ethane.getGas(400), + Materials.Ethylene.getGas(445), + Materials.Methane.getGas(223) + }, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Butadiene.getSeverelyHydroCracked(1000), + new FluidStack[] { + Materials.Propane.getGas(260), + Materials.Ethane.getGas(926), + Materials.Ethylene.getGas(389), + Materials.Methane.getGas(2667) + }, + GT_Values.NI, + 112, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Butadiene.getLightlySteamCracked(1000), + new FluidStack[] { + Materials.Propene.getGas(750), Materials.Ethylene.getGas(188), Materials.Methane.getGas(188) + }, + Materials.Carbon.getDustSmall(3), + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Butadiene.getModeratelySteamCracked(1000), + new FluidStack[] { + Materials.Propene.getGas(125), Materials.Ethylene.getGas(1125), Materials.Methane.getGas(188) + }, + Materials.Carbon.getDustSmall(3), + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Butadiene.getSeverelySteamCracked(1000), + new FluidStack[] { + Materials.Propene.getGas(125), Materials.Ethylene.getGas(188), Materials.Methane.getGas(1125) + }, + Materials.Carbon.getDust(1), + 120, + 120); + + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Butene.getLightlyHydroCracked(1000), + new FluidStack[] { + Materials.Butane.getGas(334), + Materials.Propene.getGas(334), + Materials.Ethane.getGas(334), + Materials.Ethylene.getGas(334), + Materials.Methane.getGas(334) + }, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Butene.getModeratelyHydroCracked(1000), + new FluidStack[] { + Materials.Propane.getGas(389), + Materials.Ethane.getGas(556), + Materials.Ethylene.getGas(334), + Materials.Methane.getGas(1056) + }, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Butene.getSeverelyHydroCracked(1000), + new FluidStack[] {Materials.Ethane.getGas(1000), Materials.Methane.getGas(2000)}, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Butene.getLightlySteamCracked(1000), + new FluidStack[] { + Materials.Propene.getGas(750), Materials.Ethylene.getGas(500), Materials.Methane.getGas(250) + }, + Materials.Carbon.getDustSmall(1), + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Butene.getModeratelySteamCracked(1000), + new FluidStack[] { + Materials.Propene.getGas(200), Materials.Ethylene.getGas(1300), Materials.Methane.getGas(400) + }, + Materials.Carbon.getDustSmall(1), + 192, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Butene.getSeverelySteamCracked(1000), + new FluidStack[] { + Materials.Propene.getGas(125), Materials.Ethylene.getGas(313), Materials.Methane.getGas(1500) + }, + Materials.Carbon.getDustSmall(6), + 120, + 120); + + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Butane.getLightlyHydroCracked(1000), + new FluidStack[] { + Materials.Propane.getGas(667), Materials.Ethane.getGas(667), Materials.Methane.getGas(667) + }, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Butane.getModeratelyHydroCracked(1000), + new FluidStack[] {Materials.Ethane.getGas(1000), Materials.Methane.getGas(2000)}, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Butane.getSeverelyHydroCracked(1000), + new FluidStack[] {Materials.Methane.getGas(1000)}, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Butane.getLightlySteamCracked(1000), + new FluidStack[] { + Materials.Propane.getGas(750), + Materials.Ethane.getGas(125), + Materials.Ethylene.getGas(125), + Materials.Methane.getGas(1063) + }, + Materials.Carbon.getDustTiny(2), + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Butane.getModeratelySteamCracked(1000), + new FluidStack[] { + Materials.Propane.getGas(125), + Materials.Ethane.getGas(750), + Materials.Ethylene.getGas(750), + Materials.Methane.getGas(438) + }, + Materials.Carbon.getDustTiny(2), + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Butane.getSeverelySteamCracked(1000), + new FluidStack[] { + Materials.Propane.getGas(125), + Materials.Ethane.getGas(125), + Materials.Ethylene.getGas(125), + Materials.Methane.getGas(2000) + }, + Materials.Carbon.getDustTiny(11), + 120, + 120); + + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Gas.getLightlyHydroCracked(1000), + new FluidStack[] { + Materials.Methane.getGas(1400), Materials.Hydrogen.getGas(1340), Materials.Helium.getGas(20) + }, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Gas.getModeratelyHydroCracked(1000), + new FluidStack[] { + Materials.Methane.getGas(1400), Materials.Hydrogen.getGas(3340), Materials.Helium.getGas(20) + }, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Gas.getSeverelyHydroCracked(1000), + new FluidStack[] { + Materials.Methane.getGas(1400), Materials.Hydrogen.getGas(4340), Materials.Helium.getGas(20) + }, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Gas.getLightlySteamCracked(1000), + new FluidStack[] { + Materials.Propene.getGas(45), + Materials.Ethane.getGas(8), + Materials.Ethylene.getGas(85), + Materials.Methane.getGas(1026), + Materials.Helium.getGas(20) + }, + Materials.Carbon.getDustTiny(1), + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Gas.getModeratelySteamCracked(1000), + new FluidStack[] { + Materials.Propene.getGas(8), + Materials.Ethane.getGas(45), + Materials.Ethylene.getGas(92), + Materials.Methane.getGas(1018), + Materials.Helium.getGas(20) + }, + Materials.Carbon.getDustTiny(1), + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Gas.getSeverelySteamCracked(1000), + new FluidStack[] { + Materials.Propene.getGas(8), + Materials.Ethane.getGas(8), + Materials.Ethylene.getGas(25), + Materials.Methane.getGas(1143), + Materials.Helium.getGas(20) + }, + Materials.Carbon.getDustTiny(1), + 120, + 120); + + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Naphtha.getLightlyHydroCracked(1000), + new FluidStack[] { + Materials.Butane.getGas(800), + Materials.Propane.getGas(300), + Materials.Ethane.getGas(250), + Materials.Methane.getGas(250) + }, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Naphtha.getModeratelyHydroCracked(1000), + new FluidStack[] { + Materials.Butane.getGas(200), + Materials.Propane.getGas(1100), + Materials.Ethane.getGas(400), + Materials.Methane.getGas(400) + }, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Naphtha.getSeverelyHydroCracked(1000), + new FluidStack[] { + Materials.Butane.getGas(125), + Materials.Propane.getGas(125), + Materials.Ethane.getGas(1500), + Materials.Methane.getGas(1500) + }, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Naphtha.getLightlySteamCracked(1000), + new FluidStack[] { + Materials.HeavyFuel.getFluid(75), + Materials.LightFuel.getFluid(150), + Materials.Toluene.getFluid(40), + Materials.Benzene.getFluid(150), + Materials.Butene.getGas(80), + Materials.Butadiene.getGas(150), + Materials.Propane.getGas(15), + Materials.Propene.getGas(200), + Materials.Ethane.getGas(35), + Materials.Ethylene.getGas(200), + Materials.Methane.getGas(200) + }, + Materials.Carbon.getDustTiny(1), + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Naphtha.getModeratelySteamCracked(1000), + new FluidStack[] { + Materials.HeavyFuel.getFluid(50), + Materials.LightFuel.getFluid(100), + Materials.Toluene.getFluid(30), + Materials.Benzene.getFluid(125), + Materials.Butene.getGas(65), + Materials.Butadiene.getGas(100), + Materials.Propane.getGas(30), + Materials.Propene.getGas(400), + Materials.Ethane.getGas(50), + Materials.Ethylene.getGas(350), + Materials.Methane.getGas(350) + }, + Materials.Carbon.getDustTiny(2), + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.Naphtha.getSeverelySteamCracked(1000), + new FluidStack[] { + Materials.HeavyFuel.getFluid(25), + Materials.LightFuel.getFluid(50), + Materials.Toluene.getFluid(20), + Materials.Benzene.getFluid(100), + Materials.Butene.getGas(50), + Materials.Butadiene.getGas(50), + Materials.Propane.getGas(15), + Materials.Propene.getGas(300), + Materials.Ethane.getGas(65), + Materials.Ethylene.getGas(500), + Materials.Methane.getGas(500) + }, + Materials.Carbon.getDustTiny(3), + 120, + 120); + + GT_Values.RA.addUniversalDistillationRecipe( + Materials.LightFuel.getLightlyHydroCracked(1000), + new FluidStack[] { + Materials.Naphtha.getFluid(800), + Materials.Octane.getFluid(100), + Materials.Butane.getGas(150), + Materials.Propane.getGas(200), + Materials.Ethane.getGas(125), + Materials.Methane.getGas(125) + }, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.LightFuel.getModeratelyHydroCracked(1000), + new FluidStack[] { + Materials.Naphtha.getFluid(500), + Materials.Octane.getFluid(50), + Materials.Butane.getGas(200), + Materials.Propane.getGas(1100), + Materials.Ethane.getGas(400), + Materials.Methane.getGas(400) + }, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.LightFuel.getSeverelyHydroCracked(1000), + new FluidStack[] { + Materials.Naphtha.getFluid(200), + Materials.Octane.getFluid(20), + Materials.Butane.getGas(125), + Materials.Propane.getGas(125), + Materials.Ethane.getGas(1500), + Materials.Methane.getGas(1500) + }, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.LightFuel.getLightlySteamCracked(1000), + new FluidStack[] { + Materials.HeavyFuel.getFluid(150), + Materials.Naphtha.getFluid(400), + Materials.Toluene.getFluid(40), + Materials.Benzene.getFluid(200), + Materials.Butene.getGas(75), + Materials.Butadiene.getGas(60), + Materials.Propane.getGas(20), + Materials.Propene.getGas(150), + Materials.Ethane.getGas(10), + Materials.Ethylene.getGas(50), + Materials.Methane.getGas(50) + }, + Materials.Carbon.getDustTiny(1), + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.LightFuel.getModeratelySteamCracked(1000), + new FluidStack[] { + Materials.HeavyFuel.getFluid(100), + Materials.Naphtha.getFluid(250), + Materials.Toluene.getFluid(50), + Materials.Benzene.getFluid(300), + Materials.Butene.getGas(90), + Materials.Butadiene.getGas(75), + Materials.Propane.getGas(35), + Materials.Propene.getGas(200), + Materials.Ethane.getGas(30), + Materials.Ethylene.getGas(150), + Materials.Methane.getGas(150) + }, + Materials.Carbon.getDustTiny(2), + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.LightFuel.getSeverelySteamCracked(1000), + new FluidStack[] { + Materials.HeavyFuel.getFluid(50), + Materials.Naphtha.getFluid(100), + Materials.Toluene.getFluid(30), + Materials.Benzene.getFluid(150), + Materials.Butene.getGas(65), + Materials.Butadiene.getGas(50), + Materials.Propane.getGas(50), + Materials.Propene.getGas(250), + Materials.Ethane.getGas(50), + Materials.Ethylene.getGas(250), + Materials.Methane.getGas(250) + }, + Materials.Carbon.getDustTiny(3), + 120, + 120); + + GT_Values.RA.addUniversalDistillationRecipe( + Materials.HeavyFuel.getLightlyHydroCracked(1000), + new FluidStack[] { + Materials.LightFuel.getFluid(600), + Materials.Naphtha.getFluid(100), + Materials.Butane.getGas(100), + Materials.Propane.getGas(100), + Materials.Ethane.getGas(75), + Materials.Methane.getGas(75) + }, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.HeavyFuel.getModeratelyHydroCracked(1000), + new FluidStack[] { + Materials.LightFuel.getFluid(400), + Materials.Naphtha.getFluid(400), + Materials.Butane.getGas(150), + Materials.Propane.getGas(150), + Materials.Ethane.getGas(100), + Materials.Methane.getGas(100) + }, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.HeavyFuel.getSeverelyHydroCracked(1000), + new FluidStack[] { + Materials.LightFuel.getFluid(200), + Materials.Naphtha.getFluid(250), + Materials.Butane.getGas(300), + Materials.Propane.getGas(300), + Materials.Ethane.getGas(175), + Materials.Methane.getGas(175) + }, + GT_Values.NI, + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.HeavyFuel.getLightlySteamCracked(1000), + new FluidStack[] { + Materials.LightFuel.getFluid(300), + Materials.Naphtha.getFluid(50), + Materials.Toluene.getFluid(25), + Materials.Benzene.getFluid(125), + Materials.Butene.getGas(25), + Materials.Butadiene.getGas(15), + Materials.Propane.getGas(3), + Materials.Propene.getGas(30), + Materials.Ethane.getGas(5), + Materials.Ethylene.getGas(50), + Materials.Methane.getGas(50) + }, + Materials.Carbon.getDustTiny(1), + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.HeavyFuel.getModeratelySteamCracked(1000), + new FluidStack[] { + Materials.LightFuel.getFluid(200), + Materials.Naphtha.getFluid(200), + Materials.Toluene.getFluid(40), + Materials.Benzene.getFluid(200), + Materials.Butene.getGas(40), + Materials.Butadiene.getGas(25), + Materials.Propane.getGas(5), + Materials.Propene.getGas(50), + Materials.Ethane.getGas(7), + Materials.Ethylene.getGas(75), + Materials.Methane.getGas(75) + }, + Materials.Carbon.getDustTiny(2), + 120, + 120); + GT_Values.RA.addUniversalDistillationRecipe( + Materials.HeavyFuel.getSeverelySteamCracked(1000), + new FluidStack[] { + Materials.LightFuel.getFluid(100), + Materials.Naphtha.getFluid(125), + Materials.Toluene.getFluid(80), + Materials.Benzene.getFluid(400), + Materials.Butene.getGas(80), + Materials.Butadiene.getGas(50), + Materials.Propane.getGas(10), + Materials.Propene.getGas(100), + Materials.Ethane.getGas(15), + Materials.Ethylene.getGas(150), + Materials.Methane.getGas(150) + }, + Materials.Carbon.getDustTiny(3), + 120, + 120); + + // Recipes for gasoline + // 2N + O = N2O + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Nitrogen.getCells(2), + Materials.Oxygen.getCells(1), + GT_Values.NF, + GT_Values.NF, + Materials.NitrousOxide.getCells(1), + Materials.Empty.getCells(2), + 200, + 30); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Nitrogen.getCells(2), + GT_Utility.getIntegratedCircuit(1), + Materials.Oxygen.getGas(1000L), + Materials.NitrousOxide.getGas(1000L), + Materials.Empty.getCells(2), + GT_Values.NI, + 200, + 30); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Nitrogen.getCells(2), + GT_Utility.getIntegratedCircuit(11), + Materials.Oxygen.getGas(1000L), + GT_Values.NF, + Materials.NitrousOxide.getCells(1), + Materials.Empty.getCells(1), + 200, + 30); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Oxygen.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Nitrogen.getGas(2000L), + Materials.NitrousOxide.getGas(1000L), + Materials.Empty.getCells(1), + GT_Values.NI, + 200, + 30); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Oxygen.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.Nitrogen.getGas(2000L), + GT_Values.NF, + Materials.NitrousOxide.getCells(1), + GT_Values.NI, + 200, + 30); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] {Materials.Nitrogen.getGas(20000), Materials.Oxygen.getGas(10000)}, + new FluidStack[] {Materials.NitrousOxide.getGas(10000)}, + new ItemStack[] {null}, + 50, + 480); // C2H6O + C4H8 = C6H14O - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Ethanol.getCells(1), Materials.Butene.getCells(1), GT_Values.NF, GT_Values.NF, Materials.AntiKnock.getCells(1), Materials.Empty.getCells(1), 400, 480); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Ethanol.getCells(1), + Materials.Butene.getCells(1), + GT_Values.NF, + GT_Values.NF, + Materials.AntiKnock.getCells(1), + Materials.Empty.getCells(1), + 400, + 480); // CH4O + C4H8 = C5H12O - GT_Values.RA.addMixerRecipe(Materials.Methanol.getCells(1), Materials.Butene.getCells(1), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NF, GT_Values.NF, Materials.MTBEMixture.getCells(1), Materials.Empty.getCells(1), GT_Values.NI, GT_Values.NI, 20, 480); - GT_Values.RA.addMixerRecipe(Materials.Naphtha.getCells(16), Materials.Gas.getCells(2), Materials.Methanol.getCells(1), Materials.Acetone.getCells(1), GT_Values.NF, GT_Values.NF, Materials.GasolineRaw.getCells(20), 100, 480); - GT_Values.RA.addChemicalRecipe(Materials.GasolineRaw.getCells(10), Materials.Toluene.getCells(1), GT_Values.NF, GT_Values.NF, Materials.GasolineRegular.getCells(11), 10, 480); - GT_Values.RA.addMixerRecipe(Materials.GasolineRegular.getCells(20), Materials.Octane.getCells(2), Materials.NitrousOxide.getCells(6), Materials.Toluene.getCells(1), Materials.AntiKnock.getFluid(3000L), Materials.GasolinePremium.getFluid(32000L), Materials.Empty.getCells(29), 50, 1920); + GT_Values.RA.addMixerRecipe( + Materials.Methanol.getCells(1), + Materials.Butene.getCells(1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + Materials.MTBEMixture.getCells(1), + Materials.Empty.getCells(1), + GT_Values.NI, + GT_Values.NI, + 20, + 480); + GT_Values.RA.addMixerRecipe( + Materials.Naphtha.getCells(16), + Materials.Gas.getCells(2), + Materials.Methanol.getCells(1), + Materials.Acetone.getCells(1), + GT_Values.NF, + GT_Values.NF, + Materials.GasolineRaw.getCells(20), + 100, + 480); + GT_Values.RA.addChemicalRecipe( + Materials.GasolineRaw.getCells(10), + Materials.Toluene.getCells(1), + GT_Values.NF, + GT_Values.NF, + Materials.GasolineRegular.getCells(11), + 10, + 480); + GT_Values.RA.addMixerRecipe( + Materials.GasolineRegular.getCells(20), + Materials.Octane.getCells(2), + Materials.NitrousOxide.getCells(6), + Materials.Toluene.getCells(1), + Materials.AntiKnock.getFluid(3000L), + Materials.GasolinePremium.getFluid(32000L), + Materials.Empty.getCells(29), + 50, + 1920); // 9C5H12O = 4C6H14O + 5CH4O + 4C4H8 - GT_Values.RA.addDistillationTowerRecipe(Materials.MTBEMixture.getGas(900L), new FluidStack[]{Materials.AntiKnock.getFluid(400L), Materials.Methanol.getFluid(500L), Materials.Butene.getGas(400L)}, null, 40, 240); - - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.Naphtha.getFluid(16000), Materials.Gas.getGas(2000), Materials.Methanol.getFluid(1000), Materials.Acetone.getFluid(1000)}, new FluidStack[]{ Materials.GasolineRaw.getFluid(20000)}, null, 100, 480); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.GasolineRaw.getFluid(10000), Materials.Toluene.getFluid(1000)}, new FluidStack[]{ Materials.GasolineRegular.getFluid(11000)}, null, 10, 480); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.GasolineRegular.getFluid(20000), Materials.Octane.getFluid(2000), Materials.NitrousOxide.getGas(6000), Materials.Toluene.getFluid(1000), Materials.AntiKnock.getFluid(3000L)}, new FluidStack[]{Materials.GasolinePremium.getFluid(32000L)}, null, 50, 1920); + GT_Values.RA.addDistillationTowerRecipe( + Materials.MTBEMixture.getGas(900L), + new FluidStack[] { + Materials.AntiKnock.getFluid(400L), Materials.Methanol.getFluid(500L), Materials.Butene.getGas(400L) + }, + null, + 40, + 240); + + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] { + Materials.Naphtha.getFluid(16000), + Materials.Gas.getGas(2000), + Materials.Methanol.getFluid(1000), + Materials.Acetone.getFluid(1000) + }, + new FluidStack[] {Materials.GasolineRaw.getFluid(20000)}, + null, + 100, + 480); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] {Materials.GasolineRaw.getFluid(10000), Materials.Toluene.getFluid(1000)}, + new FluidStack[] {Materials.GasolineRegular.getFluid(11000)}, + null, + 10, + 480); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] { + Materials.GasolineRegular.getFluid(20000), + Materials.Octane.getFluid(2000), + Materials.NitrousOxide.getGas(6000), + Materials.Toluene.getFluid(1000), + Materials.AntiKnock.getFluid(3000L) + }, + new FluidStack[] {Materials.GasolinePremium.getFluid(32000L)}, + null, + 50, + 1920); // C2H6O + C4H8 = C6H14O - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.Ethanol.getFluid(1000), Materials.Butene.getGas(1000)}, new FluidStack[]{Materials.AntiKnock.getFluid(1000)}, null,400, 480); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] {Materials.Ethanol.getFluid(1000), Materials.Butene.getGas(1000)}, + new FluidStack[] {Materials.AntiKnock.getFluid(1000)}, + null, + 400, + 480); // CH4O + C4H8 = C5H12O - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.Methanol.getFluid(1000), Materials.Butene.getGas(1000)}, new FluidStack[]{Materials.MTBEMixture.getGas(1000)}, null, 20, 480); - - //Oxide Recipe - GT_Values.RA.addChemicalRecipe(GT_Utility.getIntegratedCircuit(2), Materials.Antimony.getDust(2), Materials.Oxygen.getGas(3000), GT_Values.NF, Materials.AntimonyTrioxide.getDust(5), 20, 30); - GT_Values.RA.addChemicalRecipe(GT_Utility.getIntegratedCircuit(2), Materials.Lead.getDust(1), Materials.Oxygen.getGas(1000), GT_Values.NF, Materials.Massicot.getDust(2), 20, 30); - GT_Values.RA.addChemicalRecipe(GT_Utility.getIntegratedCircuit(2), Materials.Arsenic.getDust(2), Materials.Oxygen.getGas(3000), GT_Values.NF, Materials.ArsenicTrioxide.getDust(5), 20, 30); - GT_Values.RA.addChemicalRecipe(GT_Utility.getIntegratedCircuit(2), Materials.Cobalt.getDust(1), Materials.Oxygen.getGas(1000), GT_Values.NF, Materials.CobaltOxide.getDust(2), 20, 30); - GT_Values.RA.addChemicalRecipe(GT_Utility.getIntegratedCircuit(2), Materials.Zinc.getDust(1), Materials.Oxygen.getGas(1000), GT_Values.NF, Materials.Zincite.getDust(2), 20, 30); - + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] {Materials.Methanol.getFluid(1000), Materials.Butene.getGas(1000)}, + new FluidStack[] {Materials.MTBEMixture.getGas(1000)}, + null, + 20, + 480); + + // Oxide Recipe + GT_Values.RA.addChemicalRecipe( + GT_Utility.getIntegratedCircuit(2), + Materials.Antimony.getDust(2), + Materials.Oxygen.getGas(3000), + GT_Values.NF, + Materials.AntimonyTrioxide.getDust(5), + 20, + 30); + GT_Values.RA.addChemicalRecipe( + GT_Utility.getIntegratedCircuit(2), + Materials.Lead.getDust(1), + Materials.Oxygen.getGas(1000), + GT_Values.NF, + Materials.Massicot.getDust(2), + 20, + 30); + GT_Values.RA.addChemicalRecipe( + GT_Utility.getIntegratedCircuit(2), + Materials.Arsenic.getDust(2), + Materials.Oxygen.getGas(3000), + GT_Values.NF, + Materials.ArsenicTrioxide.getDust(5), + 20, + 30); + GT_Values.RA.addChemicalRecipe( + GT_Utility.getIntegratedCircuit(2), + Materials.Cobalt.getDust(1), + Materials.Oxygen.getGas(1000), + GT_Values.NF, + Materials.CobaltOxide.getDust(2), + 20, + 30); + GT_Values.RA.addChemicalRecipe( + GT_Utility.getIntegratedCircuit(2), + Materials.Zinc.getDust(1), + Materials.Oxygen.getGas(1000), + GT_Values.NF, + Materials.Zincite.getDust(2), + 20, + 30); } - public void addPotionRecipes(String aName,ItemStack aItem){ - //normal - GT_Values.RA.addBrewingRecipe(aItem, FluidRegistry.getFluid("potion.awkward"), FluidRegistry.getFluid("potion."+aName), false); - //strong - GT_Values.RA.addBrewingRecipe(aItem, FluidRegistry.getFluid("potion.thick"), FluidRegistry.getFluid("potion."+aName+".strong"), false); - //long - GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), FluidRegistry.getFluid("potion."+aName), FluidRegistry.getFluid("potion."+aName+".long"), false); - //splash - if(!(FluidRegistry.getFluid("potion."+aName)==null||FluidRegistry.getFluid("potion."+aName+".splash")==null)) - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gunpowder, 1L), null, null, null, new FluidStack(FluidRegistry.getFluid("potion."+aName),750), new FluidStack(FluidRegistry.getFluid("potion."+aName+".splash"),750), null, 200, 24); - //splash strong - if(!(FluidRegistry.getFluid("potion."+aName+".strong")==null||FluidRegistry.getFluid("potion."+aName+".strong.splash")==null)) - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gunpowder, 1L), null, null, null, new FluidStack(FluidRegistry.getFluid("potion."+aName+".strong"),750), new FluidStack(FluidRegistry.getFluid("potion."+aName+".strong.splash"),750), null, 200, 24); - //splash long - if(!(FluidRegistry.getFluid("potion."+aName+".long")==null||FluidRegistry.getFluid("potion."+aName+".long.splash")==null)) - GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gunpowder, 1L), null, null, null, new FluidStack(FluidRegistry.getFluid("potion."+aName+".long"),750), new FluidStack(FluidRegistry.getFluid("potion."+aName+".long.splash"),750), null, 200, 24); + public void addPotionRecipes(String aName, ItemStack aItem) { + // normal + GT_Values.RA.addBrewingRecipe( + aItem, FluidRegistry.getFluid("potion.awkward"), FluidRegistry.getFluid("potion." + aName), false); + // strong + GT_Values.RA.addBrewingRecipe( + aItem, + FluidRegistry.getFluid("potion.thick"), + FluidRegistry.getFluid("potion." + aName + ".strong"), + false); + // long + GT_Values.RA.addBrewingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), + FluidRegistry.getFluid("potion." + aName), + FluidRegistry.getFluid("potion." + aName + ".long"), + false); + // splash + if (!(FluidRegistry.getFluid("potion." + aName) == null + || FluidRegistry.getFluid("potion." + aName + ".splash") == null)) + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gunpowder, 1L), + null, + null, + null, + new FluidStack(FluidRegistry.getFluid("potion." + aName), 750), + new FluidStack(FluidRegistry.getFluid("potion." + aName + ".splash"), 750), + null, + 200, + 24); + // splash strong + if (!(FluidRegistry.getFluid("potion." + aName + ".strong") == null + || FluidRegistry.getFluid("potion." + aName + ".strong.splash") == null)) + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gunpowder, 1L), + null, + null, + null, + new FluidStack(FluidRegistry.getFluid("potion." + aName + ".strong"), 750), + new FluidStack(FluidRegistry.getFluid("potion." + aName + ".strong.splash"), 750), + null, + 200, + 24); + // splash long + if (!(FluidRegistry.getFluid("potion." + aName + ".long") == null + || FluidRegistry.getFluid("potion." + aName + ".long.splash") == null)) + GT_Values.RA.addMixerRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gunpowder, 1L), + null, + null, + null, + new FluidStack(FluidRegistry.getFluid("potion." + aName + ".long"), 750), + new FluidStack(FluidRegistry.getFluid("potion." + aName + ".long.splash"), 750), + null, + 200, + 24); } /** @@ -4022,107 +18690,508 @@ public class GT_MachineRecipeLoader implements Runnable { * Adds recipes related to roasting sulfuric ores and reducing oxidic ores in the Electric Blast Furnace. */ private void addPyrometallurgicalRecipes() { - GT_Values.RA.addPrimitiveBlastRecipe(Materials.Iron.getIngots(1), GT_Values.NI, 4, Materials.Steel.getIngots(1), GT_Values.NI, 7200); - GT_Values.RA.addPrimitiveBlastRecipe(Materials.Iron.getDust(1), GT_Values.NI, 4, Materials.Steel.getIngots(1), GT_Values.NI, 7200); - GT_Values.RA.addPrimitiveBlastRecipe(Materials.Iron.getBlocks(1), GT_Values.NI, 36, Materials.Steel.getIngots(9), GT_Values.NI, 64800); - GT_Values.RA.addPrimitiveBlastRecipe(Materials.Steel.getDust(1), GT_Values.NI, 2, Materials.Steel.getIngots(1), GT_Values.NI, 7200); - - ItemStack[] tSiliconDioxide = new ItemStack[]{Materials.SiliconDioxide.getDust(3), Materials.NetherQuartz.getDust(3), Materials.CertusQuartz.getDust(3), Materials.Quartzite.getDust(6)}; + GT_Values.RA.addPrimitiveBlastRecipe( + Materials.Iron.getIngots(1), GT_Values.NI, 4, Materials.Steel.getIngots(1), GT_Values.NI, 7200); + GT_Values.RA.addPrimitiveBlastRecipe( + Materials.Iron.getDust(1), GT_Values.NI, 4, Materials.Steel.getIngots(1), GT_Values.NI, 7200); + GT_Values.RA.addPrimitiveBlastRecipe( + Materials.Iron.getBlocks(1), GT_Values.NI, 36, Materials.Steel.getIngots(9), GT_Values.NI, 64800); + GT_Values.RA.addPrimitiveBlastRecipe( + Materials.Steel.getDust(1), GT_Values.NI, 2, Materials.Steel.getIngots(1), GT_Values.NI, 7200); + + ItemStack[] tSiliconDioxide = new ItemStack[] { + Materials.SiliconDioxide.getDust(3), + Materials.NetherQuartz.getDust(3), + Materials.CertusQuartz.getDust(3), + Materials.Quartzite.getDust(6) + }; - //Roasting + // Roasting for (ItemStack silicon : tSiliconDioxide) { - GT_Values.RA.addBlastRecipe(Materials.Chalcopyrite.getDust(1), silicon, Materials.Oxygen.getGas(3000), Materials.SulfurDioxide.getGas(2000), Materials.RoastedCopper.getDust(1), Materials.Ferrosilite.getDust(5), 120, 120, 1200); + GT_Values.RA.addBlastRecipe( + Materials.Chalcopyrite.getDust(1), + silicon, + Materials.Oxygen.getGas(3000), + Materials.SulfurDioxide.getGas(2000), + Materials.RoastedCopper.getDust(1), + Materials.Ferrosilite.getDust(5), + 120, + 120, + 1200); } - GT_Values.RA.addBlastRecipe(Materials.Tetrahedrite.getDust(1), GT_Values.NI, Materials.Oxygen.getGas(3000), Materials.SulfurDioxide.getGas(2000), Materials.RoastedCopper.getDust(1), Materials.RoastedAntimony.getDustTiny(3), 120, 120, 1200); + GT_Values.RA.addBlastRecipe( + Materials.Tetrahedrite.getDust(1), + GT_Values.NI, + Materials.Oxygen.getGas(3000), + Materials.SulfurDioxide.getGas(2000), + Materials.RoastedCopper.getDust(1), + Materials.RoastedAntimony.getDustTiny(3), + 120, + 120, + 1200); - GT_Values.RA.addBlastRecipe(Materials.Pyrite.getDust(1), GT_Values.NI, Materials.Oxygen.getGas(3000), Materials.SulfurDioxide.getGas(2000), Materials.RoastedIron.getDust(1), Materials.Ash.getDustTiny(1), 120, 120, 1200); + GT_Values.RA.addBlastRecipe( + Materials.Pyrite.getDust(1), + GT_Values.NI, + Materials.Oxygen.getGas(3000), + Materials.SulfurDioxide.getGas(2000), + Materials.RoastedIron.getDust(1), + Materials.Ash.getDustTiny(1), + 120, + 120, + 1200); - GT_Values.RA.addBlastRecipe(Materials.Pentlandite.getDust(1), GT_Values.NI, Materials.Oxygen.getGas(3000), Materials.SulfurDioxide.getGas(1000), Materials.RoastedNickel.getDust(1), Materials.Ash.getDustTiny(1), 120, 120, 1200); + GT_Values.RA.addBlastRecipe( + Materials.Pentlandite.getDust(1), + GT_Values.NI, + Materials.Oxygen.getGas(3000), + Materials.SulfurDioxide.getGas(1000), + Materials.RoastedNickel.getDust(1), + Materials.Ash.getDustTiny(1), + 120, + 120, + 1200); - GT_Values.RA.addBlastRecipe(Materials.Sphalerite.getDust(1), GT_Values.NI, Materials.Oxygen.getGas(3000), Materials.SulfurDioxide.getGas(1000), Materials.RoastedZinc.getDust(1), Materials.Ash.getDustTiny(1), 120, 120, 1200); + GT_Values.RA.addBlastRecipe( + Materials.Sphalerite.getDust(1), + GT_Values.NI, + Materials.Oxygen.getGas(3000), + Materials.SulfurDioxide.getGas(1000), + Materials.RoastedZinc.getDust(1), + Materials.Ash.getDustTiny(1), + 120, + 120, + 1200); - GT_Values.RA.addBlastRecipe(Materials.Cobaltite.getDust(1), GT_Values.NI, Materials.Oxygen.getGas(3000), Materials.SulfurDioxide.getGas(1000), Materials.RoastedCobalt.getDust(1), Materials.RoastedArsenic.getDust(1), 120, 120, 1200); + GT_Values.RA.addBlastRecipe( + Materials.Cobaltite.getDust(1), + GT_Values.NI, + Materials.Oxygen.getGas(3000), + Materials.SulfurDioxide.getGas(1000), + Materials.RoastedCobalt.getDust(1), + Materials.RoastedArsenic.getDust(1), + 120, + 120, + 1200); - GT_Values.RA.addBlastRecipe(Materials.Stibnite.getDust(1), GT_Values.NI, Materials.Oxygen.getGas(3000), Materials.SulfurDioxide.getGas(1500), Materials.RoastedAntimony.getDust(1), Materials.Ash.getDustTiny(1), 120, 120, 1200); + GT_Values.RA.addBlastRecipe( + Materials.Stibnite.getDust(1), + GT_Values.NI, + Materials.Oxygen.getGas(3000), + Materials.SulfurDioxide.getGas(1500), + Materials.RoastedAntimony.getDust(1), + Materials.Ash.getDustTiny(1), + 120, + 120, + 1200); - GT_Values.RA.addBlastRecipe(Materials.Galena.getDust(1), GT_Values.NI, Materials.Oxygen.getGas(3000), Materials.SulfurDioxide.getGas(1000), Materials.RoastedLead.getDust(1), Materials.Ash.getDustTiny(1), 120, 120, 1200); + GT_Values.RA.addBlastRecipe( + Materials.Galena.getDust(1), + GT_Values.NI, + Materials.Oxygen.getGas(3000), + Materials.SulfurDioxide.getGas(1000), + Materials.RoastedLead.getDust(1), + Materials.Ash.getDustTiny(1), + 120, + 120, + 1200); if (mGTPlusPlus) { GT_Values.RA.addBlastRecipe( - Materials.TranscendentMetal.getDust(1), - GT_Utility.getIntegratedCircuit(1), - Materials.Tungsten.getMolten(144), - - new FluidStack(FluidRegistry.getFluid("molten.celestialtungsten"), 72), - GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.TranscendentMetal, 1L), - GT_Values.NI, - - 180 * 20, 32_000_000, 11701 - ); + Materials.TranscendentMetal.getDust(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Tungsten.getMolten(144), + new FluidStack(FluidRegistry.getFluid("molten.celestialtungsten"), 72), + GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.TranscendentMetal, 1L), + GT_Values.NI, + 180 * 20, + 32_000_000, + 11701); GT_Values.RA.addVacuumFreezerRecipe( - new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.TranscendentMetal, 1L)}, - new FluidStack[]{new FluidStack(FluidRegistry.getFluid("molten.titansteel"), 144), Materials.SuperCoolant.getFluid(1000)}, - - new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.TranscendentMetal, 1L)}, - new FluidStack[]{GT_Values.NF}, - - 50*20, 32_000_000 - ); + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ingotHot, Materials.TranscendentMetal, 1L)}, + new FluidStack[] { + new FluidStack(FluidRegistry.getFluid("molten.titansteel"), 144), + Materials.SuperCoolant.getFluid(1000) + }, + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.TranscendentMetal, 1L)}, + new FluidStack[] {GT_Values.NF}, + 50 * 20, + 32_000_000); } - //Decomposition + // Decomposition - GT_Values.RA.addBlastRecipe(Materials.Gypsum.getDust(8), GT_Values.NI, GT_Values.NF, Materials.DilutedSulfuricAcid.getFluid(1500), Materials.Quicklime.getDust(1), GT_Values.NI, 200, 480, 3200); + GT_Values.RA.addBlastRecipe( + Materials.Gypsum.getDust(8), + GT_Values.NI, + GT_Values.NF, + Materials.DilutedSulfuricAcid.getFluid(1500), + Materials.Quicklime.getDust(1), + GT_Values.NI, + 200, + 480, + 3200); - //Carbothermic Reduction - //Depend on real amount except real ores + // Carbothermic Reduction + // Depend on real amount except real ores int outputIngotAmount = GT_Mod.gregtechproxy.mMixedOreOnlyYieldsTwoThirdsOfPureOre ? 2 : 3; - GT_Values.RA.addBlastRecipe(Materials.RoastedCopper.getDust(2), Materials.Carbon.getDust(1), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Copper.getIngots(outputIngotAmount), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.RoastedAntimony.getDust(2), Materials.Carbon.getDust(1), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Antimony.getIngots(outputIngotAmount), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.RoastedIron.getDust(2), Materials.Carbon.getDust(1), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Iron.getIngots(outputIngotAmount), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.RoastedNickel.getDust(2), Materials.Carbon.getDust(1), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Nickel.getIngots(outputIngotAmount), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.RoastedZinc.getDust(2), Materials.Carbon.getDust(1), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Zinc.getIngots(outputIngotAmount), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.RoastedCobalt.getDust(2), Materials.Carbon.getDust(1), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Cobalt.getIngots(outputIngotAmount), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.RoastedArsenic.getDust(2), Materials.Carbon.getDust(1), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Arsenic.getIngots(outputIngotAmount), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.RoastedLead.getDust(2), Materials.Carbon.getDust(1), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Lead.getIngots(outputIngotAmount), Materials.Ash.getDustTiny(2), 240, 120, 1200); + GT_Values.RA.addBlastRecipe( + Materials.RoastedCopper.getDust(2), + Materials.Carbon.getDust(1), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Copper.getIngots(outputIngotAmount), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.RoastedAntimony.getDust(2), + Materials.Carbon.getDust(1), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Antimony.getIngots(outputIngotAmount), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.RoastedIron.getDust(2), + Materials.Carbon.getDust(1), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Iron.getIngots(outputIngotAmount), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.RoastedNickel.getDust(2), + Materials.Carbon.getDust(1), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Nickel.getIngots(outputIngotAmount), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.RoastedZinc.getDust(2), + Materials.Carbon.getDust(1), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Zinc.getIngots(outputIngotAmount), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.RoastedCobalt.getDust(2), + Materials.Carbon.getDust(1), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Cobalt.getIngots(outputIngotAmount), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.RoastedArsenic.getDust(2), + Materials.Carbon.getDust(1), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Arsenic.getIngots(outputIngotAmount), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.RoastedLead.getDust(2), + Materials.Carbon.getDust(1), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Lead.getIngots(outputIngotAmount), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); - GT_Values.RA.addBlastRecipe(Materials.Malachite.getDust(2), Materials.Carbon.getDust(1), GT_Values.NF, Materials.CarbonDioxide.getGas(3000), Materials.Copper.getIngots(outputIngotAmount), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.Magnetite.getDust(2), Materials.Carbon.getDust(1), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Iron.getIngots(outputIngotAmount), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.YellowLimonite.getDust(2), Materials.Carbon.getDust(1), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Iron.getIngots(outputIngotAmount), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.BrownLimonite.getDust(2), Materials.Carbon.getDust(1), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Iron.getIngots(outputIngotAmount), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.BasalticMineralSand.getDust(2), Materials.Carbon.getDust(1), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Iron.getIngots(outputIngotAmount), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.GraniticMineralSand.getDust(2), Materials.Carbon.getDust(1), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Iron.getIngots(outputIngotAmount), Materials.Ash.getDustTiny(2), 240, 120, 1200); + GT_Values.RA.addBlastRecipe( + Materials.Malachite.getDust(2), + Materials.Carbon.getDust(1), + GT_Values.NF, + Materials.CarbonDioxide.getGas(3000), + Materials.Copper.getIngots(outputIngotAmount), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.Magnetite.getDust(2), + Materials.Carbon.getDust(1), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Iron.getIngots(outputIngotAmount), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.YellowLimonite.getDust(2), + Materials.Carbon.getDust(1), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Iron.getIngots(outputIngotAmount), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.BrownLimonite.getDust(2), + Materials.Carbon.getDust(1), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Iron.getIngots(outputIngotAmount), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.BasalticMineralSand.getDust(2), + Materials.Carbon.getDust(1), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Iron.getIngots(outputIngotAmount), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.GraniticMineralSand.getDust(2), + Materials.Carbon.getDust(1), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Iron.getIngots(outputIngotAmount), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); - GT_Values.RA.addBlastRecipe(Materials.Cassiterite.getDust(2), Materials.Carbon.getDust(1), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Tin.getIngots(outputIngotAmount), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.CassiteriteSand.getDust(2), Materials.Carbon.getDust(1), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Tin.getIngots(outputIngotAmount), Materials.Ash.getDustTiny(2), 240, 120, 1200); + GT_Values.RA.addBlastRecipe( + Materials.Cassiterite.getDust(2), + Materials.Carbon.getDust(1), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Tin.getIngots(outputIngotAmount), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.CassiteriteSand.getDust(2), + Materials.Carbon.getDust(1), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Tin.getIngots(outputIngotAmount), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); - GT_Values.RA.addBlastRecipe(Materials.SiliconDioxide.getDust(3), Materials.Carbon.getDust(2), GT_Values.NF, Materials.CarbonMonoxide.getGas(2000), Materials.Silicon.getIngots(1), Materials.Ash.getDustTiny(1), 80, 120, 1200); + GT_Values.RA.addBlastRecipe( + Materials.SiliconDioxide.getDust(3), + Materials.Carbon.getDust(2), + GT_Values.NF, + Materials.CarbonMonoxide.getGas(2000), + Materials.Silicon.getIngots(1), + Materials.Ash.getDustTiny(1), + 80, + 120, + 1200); if (GT_Mod.gregtechproxy.mMixedOreOnlyYieldsTwoThirdsOfPureOre) { - GT_Values.RA.addBlastRecipe(Materials.CupricOxide.getDust(2), Materials.Carbon.getDustSmall(4), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Copper.getIngots(1), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.Malachite.getDust(2), Materials.Carbon.getDustSmall(4), GT_Values.NF, Materials.CarbonDioxide.getGas(3000), Materials.Copper.getIngots(outputIngotAmount), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.AntimonyTrioxide.getDust(5), Materials.Carbon.getDustSmall(4), GT_Values.NF, Materials.CarbonDioxide.getGas(3000), Materials.Antimony.getIngots(2), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.BandedIron.getDust(5), Materials.Carbon.getDustSmall(4), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Iron.getIngots(2), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.Magnetite.getDust(2), Materials.Carbon.getDustSmall(4), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Iron.getIngots(outputIngotAmount), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.YellowLimonite.getDust(2), Materials.Carbon.getDustSmall(4), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Iron.getIngots(outputIngotAmount), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.BrownLimonite.getDust(2), Materials.Carbon.getDustSmall(4), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Iron.getIngots(outputIngotAmount), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.BasalticMineralSand.getDust(2), Materials.Carbon.getDustSmall(4), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Iron.getIngots(outputIngotAmount), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.GraniticMineralSand.getDust(2), Materials.Carbon.getDustSmall(4), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Iron.getIngots(outputIngotAmount), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.Cassiterite.getDust(2), Materials.Carbon.getDustSmall(4), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Tin.getIngots(outputIngotAmount), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.CassiteriteSand.getDust(2), Materials.Carbon.getDustSmall(4), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Tin.getIngots(outputIngotAmount), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.Garnierite.getDust(2), Materials.Carbon.getDustSmall(4), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Nickel.getIngots(1), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.CobaltOxide.getDust(2), Materials.Carbon.getDustSmall(4), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Cobalt.getIngots(1), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.ArsenicTrioxide.getDust(5), Materials.Carbon.getDustSmall(4), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Arsenic.getIngots(2), Materials.Ash.getDustTiny(2), 240, 120, 1200); - GT_Values.RA.addBlastRecipe(Materials.Massicot.getDust(2), Materials.Carbon.getDustSmall(4), GT_Values.NF, Materials.CarbonDioxide.getGas(1000), Materials.Lead.getIngots(1), Materials.Ash.getDustTiny(2), 240, 120, 1200); + GT_Values.RA.addBlastRecipe( + Materials.CupricOxide.getDust(2), + Materials.Carbon.getDustSmall(4), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Copper.getIngots(1), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.Malachite.getDust(2), + Materials.Carbon.getDustSmall(4), + GT_Values.NF, + Materials.CarbonDioxide.getGas(3000), + Materials.Copper.getIngots(outputIngotAmount), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.AntimonyTrioxide.getDust(5), + Materials.Carbon.getDustSmall(4), + GT_Values.NF, + Materials.CarbonDioxide.getGas(3000), + Materials.Antimony.getIngots(2), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.BandedIron.getDust(5), + Materials.Carbon.getDustSmall(4), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Iron.getIngots(2), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.Magnetite.getDust(2), + Materials.Carbon.getDustSmall(4), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Iron.getIngots(outputIngotAmount), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.YellowLimonite.getDust(2), + Materials.Carbon.getDustSmall(4), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Iron.getIngots(outputIngotAmount), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.BrownLimonite.getDust(2), + Materials.Carbon.getDustSmall(4), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Iron.getIngots(outputIngotAmount), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.BasalticMineralSand.getDust(2), + Materials.Carbon.getDustSmall(4), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Iron.getIngots(outputIngotAmount), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.GraniticMineralSand.getDust(2), + Materials.Carbon.getDustSmall(4), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Iron.getIngots(outputIngotAmount), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.Cassiterite.getDust(2), + Materials.Carbon.getDustSmall(4), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Tin.getIngots(outputIngotAmount), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.CassiteriteSand.getDust(2), + Materials.Carbon.getDustSmall(4), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Tin.getIngots(outputIngotAmount), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.Garnierite.getDust(2), + Materials.Carbon.getDustSmall(4), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Nickel.getIngots(1), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.CobaltOxide.getDust(2), + Materials.Carbon.getDustSmall(4), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Cobalt.getIngots(1), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.ArsenicTrioxide.getDust(5), + Materials.Carbon.getDustSmall(4), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Arsenic.getIngots(2), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); + GT_Values.RA.addBlastRecipe( + Materials.Massicot.getDust(2), + Materials.Carbon.getDustSmall(4), + GT_Values.NF, + Materials.CarbonDioxide.getGas(1000), + Materials.Lead.getIngots(1), + Materials.Ash.getDustTiny(2), + 240, + 120, + 1200); } - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.Naquadria.getMolten(4608L), Materials.ElectrumFlux.getMolten(4608L), Materials.Radon.getGas(16000L)}, new FluidStack[]{Materials.EnrichedNaquadria.getFluid(9216L)}, null,600, 500000); - GT_Values.RA.addCentrifugeRecipe(GT_Values.NI, GT_Values.NI, Materials.EnrichedNaquadria.getFluid(9216L), Materials.FluidNaquadahFuel.getFluid(4806L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 8L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.ElectrumFlux, 8L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{10000, 10000}, 600, 2000000); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(24)}, + new FluidStack[] { + Materials.Naquadria.getMolten(4608L), + Materials.ElectrumFlux.getMolten(4608L), + Materials.Radon.getGas(16000L) + }, + new FluidStack[] {Materials.EnrichedNaquadria.getFluid(9216L)}, + null, + 600, + 500000); + GT_Values.RA.addCentrifugeRecipe( + GT_Values.NI, + GT_Values.NI, + Materials.EnrichedNaquadria.getFluid(9216L), + Materials.FluidNaquadahFuel.getFluid(4806L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 8L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.ElectrumFlux, 8L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + new int[] {10000, 10000}, + 600, + 2000000); } /** @@ -4130,98 +19199,304 @@ public class GT_MachineRecipeLoader implements Runnable { */ private void addPolybenzimidazoleRecipes() { - //Potassium Nitride - //K + HNO3 = KNO3 + H - GT_Values.RA.addChemicalRecipe(Materials.Potassium.getDust(1), GT_Utility.getIntegratedCircuit(1), Materials.NitricAcid.getFluid(1000), Materials.Hydrogen.getGas(1000), Materials.PotassiumNitrade.getDust(5), 100, 30); - - //Chromium Trioxide - //CrO2 + O = CrO3 - GT_Values.RA.addChemicalRecipe(Materials.ChromiumDioxide.getDust(3), GT_Utility.getIntegratedCircuit(1), Materials.Oxygen.getGas(1000), GT_Values.NF, Materials.ChromiumTrioxide.getDust(4), GT_Values.NI,100, 60); - - //Potassium Dichromate - //2KNO3 + 2CrO3 = K2Cr2O7 + 2NO + 3O - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Saltpeter.getDust(10), Materials.ChromiumTrioxide.getDust(8), GT_Values.NF, Materials.NitricOxide.getGas(2000), Materials.Potassiumdichromate.getDust(11), GT_Values.NI, 100, 480); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.PotassiumNitrade.getDust(10), Materials.ChromiumTrioxide.getDust(8), GT_Values.NF, Materials.NitricOxide.getGas(2000), Materials.Potassiumdichromate.getDust(11), GT_Values.NI, 100, 480); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{Materials.PotassiumNitrade.getDust(10), Materials.ChromiumTrioxide.getDust(8)}, null, new FluidStack[]{Materials.NitricOxide.getGas(2000), Materials.Oxygen.getGas(3000)}, new ItemStack[]{Materials.Potassiumdichromate.getDust(11)}, 100, 480); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{Materials.Saltpeter.getDust(10), Materials.ChromiumTrioxide.getDust(8)}, null, new FluidStack[]{Materials.NitricOxide.getGas(2000), Materials.Oxygen.getGas(3000)}, new ItemStack[]{Materials.Potassiumdichromate.getDust(11)}, 100, 480); - - //Nitrochlorobenzene - //C6H5Cl + HNO3 = C6H4ClNO2 + H2O - GT_Values.RA.addChemicalRecipe(Materials.Chlorobenzene.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.NitrationMixture.getFluid(2000), Materials.DilutedSulfuricAcid.getFluid(1000), Materials.Nitrochlorobenzene.getCells(1), 100, 480); - GT_Values.RA.addChemicalRecipe(Materials.Chlorobenzene.getCells(1), GT_Utility.getIntegratedCircuit(11), Materials.NitrationMixture.getFluid(2000), Materials.Nitrochlorobenzene.getFluid(1000), Materials.DilutedSulfuricAcid.getCells(1), 100, 480); - GT_Values.RA.addChemicalRecipe(Materials.NitrationMixture.getCells(2), GT_Utility.getIntegratedCircuit(1), Materials.Chlorobenzene.getFluid(1000), Materials.DilutedSulfuricAcid.getFluid(1000), Materials.Nitrochlorobenzene.getCells(1), Materials.Empty.getCells(1), 100, 480); - GT_Values.RA.addChemicalRecipe(Materials.NitrationMixture.getCells(2), GT_Utility.getIntegratedCircuit(11), Materials.Chlorobenzene.getFluid(1000), Materials.Nitrochlorobenzene.getFluid(1000), Materials.DilutedSulfuricAcid.getCells(1), Materials.Empty.getCells(1), 100, 480); - - //Dimethylbenzene - GT_Values.RA.addDistilleryRecipe(5, Materials.WoodTar.getFluid(200), Materials.Dimethylbenzene.getFluid(30), 100, 120, false); - GT_Values.RA.addDistilleryRecipe(5, Materials.CharcoalByproducts.getGas(200), Materials.Dimethylbenzene.getFluid(20), 100, 120, false); - //C6H6 + 2CH4 = C8H10 + 4H - GT_Values.RA.addChemicalRecipe(Materials.Methane.getCells(2), GT_Utility.getIntegratedCircuit(11), Materials.Benzene.getFluid(1000), Materials.Hydrogen.getGas(4000), Materials.Dimethylbenzene.getCells(1), 4000, 120); - GT_Values.RA.addChemicalRecipe(Materials.Benzene.getCells(1), GT_Utility.getIntegratedCircuit(12), Materials.Methane.getGas(2000), Materials.Hydrogen.getGas(4000), Materials.Dimethylbenzene.getCells(1), 4000, 120); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1)}, new FluidStack[]{Materials.Benzene.getFluid(1000L), Materials.Methane.getGas(2000L)}, new FluidStack[]{Materials.Dimethylbenzene.getFluid(1000L), Materials.Hydrogen.getGas(4000L)}, null, 4000, 120); - - //Phthalic Acid - //C8H10 + 6O =K2Cr2O7= C8H6O4 + 2H2O - GT_Values.RA.addChemicalRecipe(Materials.Dimethylbenzene.getCells(1), Materials.Potassiumdichromate.getDustTiny(1), Materials.Oxygen.getGas(6000), Materials.Water.getFluid(2000), Materials.PhthalicAcid.getCells(1), 100, 1920); - GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(6), Materials.Potassiumdichromate.getDustTiny(1), Materials.Dimethylbenzene.getFluid(1000), Materials.Water.getFluid(2000), Materials.PhthalicAcid.getCells(1), ItemList.Cell_Empty.get(1L),100, 1920); - - GT_Values.RA.addChemicalRecipe(Materials.Dimethylbenzene.getCells(9), Materials.Potassiumdichromate.getDust(1), Materials.Oxygen.getGas(54000), Materials.Water.getFluid(18000), Materials.PhthalicAcid.getCells(9), 900, 1920); - GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(54), Materials.Potassiumdichromate.getDust(1), Materials.Dimethylbenzene.getFluid(9000), Materials.Water.getFluid(18000), Materials.PhthalicAcid.getCells(9), ItemList.Cell_Empty.get(9L), 900, 1920); - - //These following recipes are broken in element term. - //But they are kept in gamewise, too much existed setup will be broken. - //Dichlorobenzidine - GT_Values.RA.addChemicalRecipe(Materials.Copper.getDustTiny(1), GT_Utility.getIntegratedCircuit(1), Materials.Nitrochlorobenzene.getFluid(2000), Materials.Dichlorobenzidine.getFluid(1000), null, 200, 1920); - GT_Values.RA.addChemicalRecipe(Materials.Copper.getDust(1), GT_Utility.getIntegratedCircuit(9), Materials.Nitrochlorobenzene.getFluid(18000), Materials.Dichlorobenzidine.getFluid(9000), null, 1800, 1920); - - //Diphenyl Isophthalate - GT_Values.RA.addChemicalRecipe(Materials.PhthalicAcid.getCells(1),Materials.SulfuricAcid.getCells(1),Materials.Phenol.getFluid(2000), Materials.DilutedSulfuricAcid.getFluid(1000),Materials.Diphenylisophthalate.getCells(1), ItemList.Cell_Empty.get(1L),100, 7680); - GT_Values.RA.addChemicalRecipe(Materials.PhthalicAcid.getCells(1),Materials.Phenol.getCells(2),Materials.SulfuricAcid.getFluid(1000), Materials.DilutedSulfuricAcid.getFluid(1000),Materials.Diphenylisophthalate.getCells(1), ItemList.Cell_Empty.get(2L), 100, 7680); - GT_Values.RA.addChemicalRecipe(Materials.SulfuricAcid.getCells(1),Materials.Phenol.getCells(2),Materials.PhthalicAcid.getFluid(1000), Materials.DilutedSulfuricAcid.getFluid(1000),Materials.Diphenylisophthalate.getCells(1), ItemList.Cell_Empty.get(2L), 100, 7680); - - //Diaminobenzidin - GT_Values.RA.addChemicalRecipe(Materials.Ammonia.getCells(2), Materials.Zinc.getDust(1), Materials.Dichlorobenzidine.getFluid(1000), Materials.HydrochloricAcid.getFluid(2000), Materials.Diaminobenzidin.getCells(1), ItemList.Cell_Empty.get(1L),100, 7680); - - //Polybenzimidazole - //C12H14N4 + C20H14O4 = C20H12N4 + 2C6H6O + 2H2O - GT_Values.RA.addChemicalRecipe(Materials.Diphenylisophthalate.getCells(1), Materials.Diaminobenzidin.getCells(1), GT_Values.NF, Materials.Polybenzimidazole.getMolten(1000), Materials.Phenol.getCells(2), 100, 7680); - + // Potassium Nitride + // K + HNO3 = KNO3 + H + GT_Values.RA.addChemicalRecipe( + Materials.Potassium.getDust(1), + GT_Utility.getIntegratedCircuit(1), + Materials.NitricAcid.getFluid(1000), + Materials.Hydrogen.getGas(1000), + Materials.PotassiumNitrade.getDust(5), + 100, + 30); + + // Chromium Trioxide + // CrO2 + O = CrO3 + GT_Values.RA.addChemicalRecipe( + Materials.ChromiumDioxide.getDust(3), + GT_Utility.getIntegratedCircuit(1), + Materials.Oxygen.getGas(1000), + GT_Values.NF, + Materials.ChromiumTrioxide.getDust(4), + GT_Values.NI, + 100, + 60); + + // Potassium Dichromate + // 2KNO3 + 2CrO3 = K2Cr2O7 + 2NO + 3O + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.Saltpeter.getDust(10), + Materials.ChromiumTrioxide.getDust(8), + GT_Values.NF, + Materials.NitricOxide.getGas(2000), + Materials.Potassiumdichromate.getDust(11), + GT_Values.NI, + 100, + 480); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly( + Materials.PotassiumNitrade.getDust(10), + Materials.ChromiumTrioxide.getDust(8), + GT_Values.NF, + Materials.NitricOxide.getGas(2000), + Materials.Potassiumdichromate.getDust(11), + GT_Values.NI, + 100, + 480); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {Materials.PotassiumNitrade.getDust(10), Materials.ChromiumTrioxide.getDust(8)}, + null, + new FluidStack[] {Materials.NitricOxide.getGas(2000), Materials.Oxygen.getGas(3000)}, + new ItemStack[] {Materials.Potassiumdichromate.getDust(11)}, + 100, + 480); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {Materials.Saltpeter.getDust(10), Materials.ChromiumTrioxide.getDust(8)}, + null, + new FluidStack[] {Materials.NitricOxide.getGas(2000), Materials.Oxygen.getGas(3000)}, + new ItemStack[] {Materials.Potassiumdichromate.getDust(11)}, + 100, + 480); + + // Nitrochlorobenzene + // C6H5Cl + HNO3 = C6H4ClNO2 + H2O + GT_Values.RA.addChemicalRecipe( + Materials.Chlorobenzene.getCells(1), + GT_Utility.getIntegratedCircuit(1), + Materials.NitrationMixture.getFluid(2000), + Materials.DilutedSulfuricAcid.getFluid(1000), + Materials.Nitrochlorobenzene.getCells(1), + 100, + 480); + GT_Values.RA.addChemicalRecipe( + Materials.Chlorobenzene.getCells(1), + GT_Utility.getIntegratedCircuit(11), + Materials.NitrationMixture.getFluid(2000), + Materials.Nitrochlorobenzene.getFluid(1000), + Materials.DilutedSulfuricAcid.getCells(1), + 100, + 480); + GT_Values.RA.addChemicalRecipe( + Materials.NitrationMixture.getCells(2), + GT_Utility.getIntegratedCircuit(1), + Materials.Chlorobenzene.getFluid(1000), + Materials.DilutedSulfuricAcid.getFluid(1000), + Materials.Nitrochlorobenzene.getCells(1), + Materials.Empty.getCells(1), + 100, + 480); + GT_Values.RA.addChemicalRecipe( + Materials.NitrationMixture.getCells(2), + GT_Utility.getIntegratedCircuit(11), + Materials.Chlorobenzene.getFluid(1000), + Materials.Nitrochlorobenzene.getFluid(1000), + Materials.DilutedSulfuricAcid.getCells(1), + Materials.Empty.getCells(1), + 100, + 480); + + // Dimethylbenzene + GT_Values.RA.addDistilleryRecipe( + 5, Materials.WoodTar.getFluid(200), Materials.Dimethylbenzene.getFluid(30), 100, 120, false); + GT_Values.RA.addDistilleryRecipe( + 5, Materials.CharcoalByproducts.getGas(200), Materials.Dimethylbenzene.getFluid(20), 100, 120, false); + // C6H6 + 2CH4 = C8H10 + 4H + GT_Values.RA.addChemicalRecipe( + Materials.Methane.getCells(2), + GT_Utility.getIntegratedCircuit(11), + Materials.Benzene.getFluid(1000), + Materials.Hydrogen.getGas(4000), + Materials.Dimethylbenzene.getCells(1), + 4000, + 120); + GT_Values.RA.addChemicalRecipe( + Materials.Benzene.getCells(1), + GT_Utility.getIntegratedCircuit(12), + Materials.Methane.getGas(2000), + Materials.Hydrogen.getGas(4000), + Materials.Dimethylbenzene.getCells(1), + 4000, + 120); + GT_Values.RA.addMultiblockChemicalRecipe( + new ItemStack[] {GT_Utility.getIntegratedCircuit(1)}, + new FluidStack[] {Materials.Benzene.getFluid(1000L), Materials.Methane.getGas(2000L)}, + new FluidStack[] {Materials.Dimethylbenzene.getFluid(1000L), Materials.Hydrogen.getGas(4000L)}, + null, + 4000, + 120); + + // Phthalic Acid + // C8H10 + 6O =K2Cr2O7= C8H6O4 + 2H2O + GT_Values.RA.addChemicalRecipe( + Materials.Dimethylbenzene.getCells(1), + Materials.Potassiumdichromate.getDustTiny(1), + Materials.Oxygen.getGas(6000), + Materials.Water.getFluid(2000), + Materials.PhthalicAcid.getCells(1), + 100, + 1920); + GT_Values.RA.addChemicalRecipe( + Materials.Oxygen.getCells(6), + Materials.Potassiumdichromate.getDustTiny(1), + Materials.Dimethylbenzene.getFluid(1000), + Materials.Water.getFluid(2000), + Materials.PhthalicAcid.getCells(1), + ItemList.Cell_Empty.get(1L), + 100, + 1920); + + GT_Values.RA.addChemicalRecipe( + Materials.Dimethylbenzene.getCells(9), + Materials.Potassiumdichromate.getDust(1), + Materials.Oxygen.getGas(54000), + Materials.Water.getFluid(18000), + Materials.PhthalicAcid.getCells(9), + 900, + 1920); + GT_Values.RA.addChemicalRecipe( + Materials.Oxygen.getCells(54), + Materials.Potassiumdichromate.getDust(1), + Materials.Dimethylbenzene.getFluid(9000), + Materials.Water.getFluid(18000), + Materials.PhthalicAcid.getCells(9), + ItemList.Cell_Empty.get(9L), + 900, + 1920); + + // These following recipes are broken in element term. + // But they are kept in gamewise, too much existed setup will be broken. + // Dichlorobenzidine + GT_Values.RA.addChemicalRecipe( + Materials.Copper.getDustTiny(1), + GT_Utility.getIntegratedCircuit(1), + Materials.Nitrochlorobenzene.getFluid(2000), + Materials.Dichlorobenzidine.getFluid(1000), + null, + 200, + 1920); + GT_Values.RA.addChemicalRecipe( + Materials.Copper.getDust(1), + GT_Utility.getIntegratedCircuit(9), + Materials.Nitrochlorobenzene.getFluid(18000), + Materials.Dichlorobenzidine.getFluid(9000), + null, + 1800, + 1920); + + // Diphenyl Isophthalate + GT_Values.RA.addChemicalRecipe( + Materials.PhthalicAcid.getCells(1), + Materials.SulfuricAcid.getCells(1), + Materials.Phenol.getFluid(2000), + Materials.DilutedSulfuricAcid.getFluid(1000), + Materials.Diphenylisophthalate.getCells(1), + ItemList.Cell_Empty.get(1L), + 100, + 7680); + GT_Values.RA.addChemicalRecipe( + Materials.PhthalicAcid.getCells(1), + Materials.Phenol.getCells(2), + Materials.SulfuricAcid.getFluid(1000), + Materials.DilutedSulfuricAcid.getFluid(1000), + Materials.Diphenylisophthalate.getCells(1), + ItemList.Cell_Empty.get(2L), + 100, + 7680); + GT_Values.RA.addChemicalRecipe( + Materials.SulfuricAcid.getCells(1), + Materials.Phenol.getCells(2), + Materials.PhthalicAcid.getFluid(1000), + Materials.DilutedSulfuricAcid.getFluid(1000), + Materials.Diphenylisophthalate.getCells(1), + ItemList.Cell_Empty.get(2L), + 100, + 7680); + + // Diaminobenzidin + GT_Values.RA.addChemicalRecipe( + Materials.Ammonia.getCells(2), + Materials.Zinc.getDust(1), + Materials.Dichlorobenzidine.getFluid(1000), + Materials.HydrochloricAcid.getFluid(2000), + Materials.Diaminobenzidin.getCells(1), + ItemList.Cell_Empty.get(1L), + 100, + 7680); + + // Polybenzimidazole + // C12H14N4 + C20H14O4 = C20H12N4 + 2C6H6O + 2H2O + GT_Values.RA.addChemicalRecipe( + Materials.Diphenylisophthalate.getCells(1), + Materials.Diaminobenzidin.getCells(1), + GT_Values.NF, + Materials.Polybenzimidazole.getMolten(1000), + Materials.Phenol.getCells(2), + 100, + 7680); } /** * Adds new recipes for hatches and busses */ - public static void addBusAndHatchRecipes(){ + public static void addBusAndHatchRecipes() { Materials[] glues = { - Materials.Glue, - Materials.Plastic, - Materials.Polytetrafluoroethylene, - Materials.Polybenzimidazole + Materials.Glue, Materials.Plastic, Materials.Polytetrafluoroethylene, Materials.Polybenzimidazole }; ItemStack[] chests = { - Loader.isModLoaded(MOD_ID_DC) ? GT_ModHandler.getModItem(MOD_ID_DC,"BabyChest",1) : new ItemStack(Blocks.chest), + Loader.isModLoaded(MOD_ID_DC) + ? GT_ModHandler.getModItem(MOD_ID_DC, "BabyChest", 1) + : new ItemStack(Blocks.chest), new ItemStack(Blocks.chest), - Loader.isModLoaded("IronChest") ? GT_ModHandler.getModItem("IronChest","BlockIronChest",1,3) : new ItemStack(Blocks.chest), - Loader.isModLoaded("IronChest") ? GT_ModHandler.getModItem("IronChest","BlockIronChest",1) : new ItemStack(Blocks.chest), - Loader.isModLoaded("IronChest") ? GT_ModHandler.getModItem("IronChest","BlockIronChest",1,4) : new ItemStack(Blocks.chest), - Loader.isModLoaded("IronChest") ? GT_ModHandler.getModItem("IronChest","BlockIronChest",1,1) : new ItemStack(Blocks.chest), - Loader.isModLoaded("IronChest") ? GT_ModHandler.getModItem("IronChest","BlockIronChest",1,2) : new ItemStack(Blocks.chest), - Loader.isModLoaded("IronChest") ? GT_ModHandler.getModItem("IronChest","BlockIronChest",1,5) : new ItemStack(Blocks.chest), - Loader.isModLoaded("IronChest") ? GT_ModHandler.getModItem("IronChest","BlockIronChest",1,6) : new ItemStack(Blocks.chest), - Loader.isModLoaded("avaritiaddons") ? GT_ModHandler.getModItem("avaritiaddons","CompressedChest",1) : new ItemStack(Blocks.chest) + Loader.isModLoaded("IronChest") + ? GT_ModHandler.getModItem("IronChest", "BlockIronChest", 1, 3) + : new ItemStack(Blocks.chest), + Loader.isModLoaded("IronChest") + ? GT_ModHandler.getModItem("IronChest", "BlockIronChest", 1) + : new ItemStack(Blocks.chest), + Loader.isModLoaded("IronChest") + ? GT_ModHandler.getModItem("IronChest", "BlockIronChest", 1, 4) + : new ItemStack(Blocks.chest), + Loader.isModLoaded("IronChest") + ? GT_ModHandler.getModItem("IronChest", "BlockIronChest", 1, 1) + : new ItemStack(Blocks.chest), + Loader.isModLoaded("IronChest") + ? GT_ModHandler.getModItem("IronChest", "BlockIronChest", 1, 2) + : new ItemStack(Blocks.chest), + Loader.isModLoaded("IronChest") + ? GT_ModHandler.getModItem("IronChest", "BlockIronChest", 1, 5) + : new ItemStack(Blocks.chest), + Loader.isModLoaded("IronChest") + ? GT_ModHandler.getModItem("IronChest", "BlockIronChest", 1, 6) + : new ItemStack(Blocks.chest), + Loader.isModLoaded("avaritiaddons") + ? GT_ModHandler.getModItem("avaritiaddons", "CompressedChest", 1) + : new ItemStack(Blocks.chest) }; ItemStack[] tanks = { - GT_OreDictUnificator.get(OrePrefixes.cell,Materials.Empty,1L), - Loader.isModLoaded("BuildCraft|Factory") ? GT_ModHandler.getModItem("BuildCraft|Factory","tankBlock",1) : GT_OreDictUnificator.get(OrePrefixes.cell,Materials.Empty,1L), - Loader.isModLoaded("irontank") ? GT_ModHandler.getModItem("irontank","copperTank",1) : GT_OreDictUnificator.get(OrePrefixes.cell,Materials.Empty,1L), - Loader.isModLoaded("irontank") ? GT_ModHandler.getModItem("irontank","ironTank",1) : GT_OreDictUnificator.get(OrePrefixes.cell,Materials.Empty,1L), - Loader.isModLoaded("irontank") ? GT_ModHandler.getModItem("irontank","silverTank",1) : GT_OreDictUnificator.get(OrePrefixes.cell,Materials.Empty,1L), - Loader.isModLoaded("irontank") ? GT_ModHandler.getModItem("irontank","goldTank",1) : GT_OreDictUnificator.get(OrePrefixes.cell,Materials.Empty,1L), - Loader.isModLoaded("irontank") ? GT_ModHandler.getModItem("irontank","diamondTank",1) : GT_OreDictUnificator.get(OrePrefixes.cell,Materials.Empty,1L), - Loader.isModLoaded("irontank") ? GT_ModHandler.getModItem("irontank","obsidianTank",1) : GT_OreDictUnificator.get(OrePrefixes.cell,Materials.Empty,1L), - GT_ModHandler.getModItem("gregtech","gt.blockmachines",1,130), - GT_ModHandler.getModItem("gregtech","gt.blockmachines",1,131) + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), + Loader.isModLoaded("BuildCraft|Factory") + ? GT_ModHandler.getModItem("BuildCraft|Factory", "tankBlock", 1) + : GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), + Loader.isModLoaded("irontank") + ? GT_ModHandler.getModItem("irontank", "copperTank", 1) + : GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), + Loader.isModLoaded("irontank") + ? GT_ModHandler.getModItem("irontank", "ironTank", 1) + : GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), + Loader.isModLoaded("irontank") + ? GT_ModHandler.getModItem("irontank", "silverTank", 1) + : GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), + Loader.isModLoaded("irontank") + ? GT_ModHandler.getModItem("irontank", "goldTank", 1) + : GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), + Loader.isModLoaded("irontank") + ? GT_ModHandler.getModItem("irontank", "diamondTank", 1) + : GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), + Loader.isModLoaded("irontank") + ? GT_ModHandler.getModItem("irontank", "obsidianTank", 1) + : GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), + GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 1, 130), + GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 1, 131) }; ItemStack[][] aInputs = new ItemStack[10][3]; @@ -4230,38 +19505,140 @@ public class GT_MachineRecipeLoader implements Runnable { ItemStack[][] flInputs2 = new ItemStack[10][3]; for (int i = 0; i < 10; i++) { - aInputs[i]= new ItemStack[]{ItemList.MACHINE_HULLS[i].get(1), chests[i].copy(), GT_Utility.getIntegratedCircuit(1)}; - aInputs2[i]= new ItemStack[]{ItemList.MACHINE_HULLS[i].get(1), chests[i].copy(), GT_Utility.getIntegratedCircuit(2)}; - flInputs[i]= new ItemStack[]{ItemList.MACHINE_HULLS[i].get(1), tanks[i].copy(), GT_Utility.getIntegratedCircuit(1)}; - flInputs2[i]= new ItemStack[]{ItemList.MACHINE_HULLS[i].get(1), tanks[i].copy(), GT_Utility.getIntegratedCircuit(2)}; + aInputs[i] = new ItemStack[] { + ItemList.MACHINE_HULLS[i].get(1), chests[i].copy(), GT_Utility.getIntegratedCircuit(1) + }; + aInputs2[i] = new ItemStack[] { + ItemList.MACHINE_HULLS[i].get(1), chests[i].copy(), GT_Utility.getIntegratedCircuit(2) + }; + flInputs[i] = new ItemStack[] { + ItemList.MACHINE_HULLS[i].get(1), tanks[i].copy(), GT_Utility.getIntegratedCircuit(1) + }; + flInputs2[i] = new ItemStack[] { + ItemList.MACHINE_HULLS[i].get(1), tanks[i].copy(), GT_Utility.getIntegratedCircuit(2) + }; } for (int aTier = 0; aTier < 10; aTier++) { - if (aTier<2) { - GT_Values.RA.addAssemblerRecipe(aInputs[aTier], glues[0].getFluid((long)(144 * Math.pow((aTier + 4), aTier))), ItemList.HATCHES_INPUT_BUS[aTier].get(1L), 480, (int) (30 * Math.pow(4, (aTier - 1))), false); - GT_Values.RA.addAssemblerRecipe(aInputs2[aTier], glues[0].getFluid((long)(144 * Math.pow((aTier+4), aTier))), ItemList.HATCHES_OUTPUT_BUS[aTier].get(1L), 480, (int) (30 * Math.pow(4, (aTier - 1))), false); - GT_Values.RA.addAssemblerRecipe(flInputs[aTier], glues[0].getFluid((long)(144 * Math.pow((aTier+4), aTier))), ItemList.HATCHES_INPUT[aTier].get(1L), 480, (int) (30 * Math.pow(4, (aTier - 1))), false); - GT_Values.RA.addAssemblerRecipe(flInputs2[aTier], glues[0].getFluid((long)(144 * Math.pow((aTier+4), aTier))), ItemList.HATCHES_OUTPUT[aTier].get(1L), 480, (int) (30 * Math.pow(4, (aTier - 1))), false); + if (aTier < 2) { + GT_Values.RA.addAssemblerRecipe( + aInputs[aTier], + glues[0].getFluid((long) (144 * Math.pow((aTier + 4), aTier))), + ItemList.HATCHES_INPUT_BUS[aTier].get(1L), + 480, + (int) (30 * Math.pow(4, (aTier - 1))), + false); + GT_Values.RA.addAssemblerRecipe( + aInputs2[aTier], + glues[0].getFluid((long) (144 * Math.pow((aTier + 4), aTier))), + ItemList.HATCHES_OUTPUT_BUS[aTier].get(1L), + 480, + (int) (30 * Math.pow(4, (aTier - 1))), + false); + GT_Values.RA.addAssemblerRecipe( + flInputs[aTier], + glues[0].getFluid((long) (144 * Math.pow((aTier + 4), aTier))), + ItemList.HATCHES_INPUT[aTier].get(1L), + 480, + (int) (30 * Math.pow(4, (aTier - 1))), + false); + GT_Values.RA.addAssemblerRecipe( + flInputs2[aTier], + glues[0].getFluid((long) (144 * Math.pow((aTier + 4), aTier))), + ItemList.HATCHES_OUTPUT[aTier].get(1L), + 480, + (int) (30 * Math.pow(4, (aTier - 1))), + false); } - if (aTier<4) { - GT_Values.RA.addAssemblerRecipe(aInputs[aTier], aTier == 0 ? glues[1].getMolten(72L) : glues[1].getMolten(144L * aTier), ItemList.HATCHES_INPUT_BUS[aTier].get(1L), 480, (int) (30 * Math.pow(4, (aTier - 1))), false); - GT_Values.RA.addAssemblerRecipe(aInputs2[aTier], aTier == 0 ? glues[1].getMolten(72L) : glues[1].getMolten(144L*aTier), ItemList.HATCHES_OUTPUT_BUS[aTier].get(1L), 480, (int) (30 * Math.pow(4, (aTier - 1))), false); - GT_Values.RA.addAssemblerRecipe(flInputs[aTier], aTier == 0 ? glues[1].getMolten(72L) : glues[1].getMolten(144L * aTier), ItemList.HATCHES_INPUT[aTier].get(1L), 480, (int) (30 * Math.pow(4, (aTier - 1))), false); - GT_Values.RA.addAssemblerRecipe(flInputs2[aTier], aTier == 0 ? glues[1].getMolten(72L) : glues[1].getMolten(144L*aTier), ItemList.HATCHES_OUTPUT[aTier].get(1L), 480, (int) (30 * Math.pow(4, (aTier - 1))), false); - + if (aTier < 4) { + GT_Values.RA.addAssemblerRecipe( + aInputs[aTier], + aTier == 0 ? glues[1].getMolten(72L) : glues[1].getMolten(144L * aTier), + ItemList.HATCHES_INPUT_BUS[aTier].get(1L), + 480, + (int) (30 * Math.pow(4, (aTier - 1))), + false); + GT_Values.RA.addAssemblerRecipe( + aInputs2[aTier], + aTier == 0 ? glues[1].getMolten(72L) : glues[1].getMolten(144L * aTier), + ItemList.HATCHES_OUTPUT_BUS[aTier].get(1L), + 480, + (int) (30 * Math.pow(4, (aTier - 1))), + false); + GT_Values.RA.addAssemblerRecipe( + flInputs[aTier], + aTier == 0 ? glues[1].getMolten(72L) : glues[1].getMolten(144L * aTier), + ItemList.HATCHES_INPUT[aTier].get(1L), + 480, + (int) (30 * Math.pow(4, (aTier - 1))), + false); + GT_Values.RA.addAssemblerRecipe( + flInputs2[aTier], + aTier == 0 ? glues[1].getMolten(72L) : glues[1].getMolten(144L * aTier), + ItemList.HATCHES_OUTPUT[aTier].get(1L), + 480, + (int) (30 * Math.pow(4, (aTier - 1))), + false); } - if (aTier<7) { - GT_Values.RA.addAssemblerRecipe(aInputs[aTier], glues[2].getMolten((long) (18 * Math.pow(2, (aTier + 1)))), ItemList.HATCHES_INPUT_BUS[aTier].get(1L), 480, (int) (30 * Math.pow(4, (aTier - 1))), false); - GT_Values.RA.addAssemblerRecipe(aInputs2[aTier], glues[2].getMolten((long) (18 * Math.pow(2,(aTier + 1)))), ItemList.HATCHES_OUTPUT_BUS[aTier].get(1L), 480, (int) (30 * Math.pow(4, (aTier - 1))), false); - GT_Values.RA.addAssemblerRecipe(flInputs[aTier], glues[2].getMolten((long) (18 * Math.pow(2, (aTier + 1)))), ItemList.HATCHES_INPUT[aTier].get(1L), 480, (int) (30 * Math.pow(4, (aTier - 1))), false); - GT_Values.RA.addAssemblerRecipe(flInputs2[aTier], glues[2].getMolten((long) (18 * Math.pow(2,(aTier + 1)))), ItemList.HATCHES_OUTPUT[aTier].get(1L), 480, (int) (30 * Math.pow(4, (aTier - 1))), false); - + if (aTier < 7) { + GT_Values.RA.addAssemblerRecipe( + aInputs[aTier], + glues[2].getMolten((long) (18 * Math.pow(2, (aTier + 1)))), + ItemList.HATCHES_INPUT_BUS[aTier].get(1L), + 480, + (int) (30 * Math.pow(4, (aTier - 1))), + false); + GT_Values.RA.addAssemblerRecipe( + aInputs2[aTier], + glues[2].getMolten((long) (18 * Math.pow(2, (aTier + 1)))), + ItemList.HATCHES_OUTPUT_BUS[aTier].get(1L), + 480, + (int) (30 * Math.pow(4, (aTier - 1))), + false); + GT_Values.RA.addAssemblerRecipe( + flInputs[aTier], + glues[2].getMolten((long) (18 * Math.pow(2, (aTier + 1)))), + ItemList.HATCHES_INPUT[aTier].get(1L), + 480, + (int) (30 * Math.pow(4, (aTier - 1))), + false); + GT_Values.RA.addAssemblerRecipe( + flInputs2[aTier], + glues[2].getMolten((long) (18 * Math.pow(2, (aTier + 1)))), + ItemList.HATCHES_OUTPUT[aTier].get(1L), + 480, + (int) (30 * Math.pow(4, (aTier - 1))), + false); } - GT_Values.RA.addAssemblerRecipe(aInputs[aTier], glues[3].getMolten((long) (2.25 * Math.pow(2,(aTier+1)))), ItemList.HATCHES_INPUT_BUS[aTier].get(1L), 480, (int) (30 * Math.pow(4, (aTier - 1))), false); - GT_Values.RA.addAssemblerRecipe(aInputs2[aTier], glues[3].getMolten((long) (2.25 * Math.pow(2,(aTier+1)))), ItemList.HATCHES_OUTPUT_BUS[aTier].get(1L), 480, (int) (30 * Math.pow(4, (aTier - 1))), false); - GT_Values.RA.addAssemblerRecipe(flInputs[aTier], glues[3].getMolten((long) (2.25 * Math.pow(2,(aTier+1)))), ItemList.HATCHES_INPUT[aTier].get(1L), 480, (int) (30 * Math.pow(4, (aTier - 1))), false); - GT_Values.RA.addAssemblerRecipe(flInputs2[aTier], glues[3].getMolten((long) (2.25 * Math.pow(2,(aTier+1)))), ItemList.HATCHES_OUTPUT[aTier].get(1L), 480, (int) (30 * Math.pow(4, (aTier - 1))), false); + GT_Values.RA.addAssemblerRecipe( + aInputs[aTier], + glues[3].getMolten((long) (2.25 * Math.pow(2, (aTier + 1)))), + ItemList.HATCHES_INPUT_BUS[aTier].get(1L), + 480, + (int) (30 * Math.pow(4, (aTier - 1))), + false); + GT_Values.RA.addAssemblerRecipe( + aInputs2[aTier], + glues[3].getMolten((long) (2.25 * Math.pow(2, (aTier + 1)))), + ItemList.HATCHES_OUTPUT_BUS[aTier].get(1L), + 480, + (int) (30 * Math.pow(4, (aTier - 1))), + false); + GT_Values.RA.addAssemblerRecipe( + flInputs[aTier], + glues[3].getMolten((long) (2.25 * Math.pow(2, (aTier + 1)))), + ItemList.HATCHES_INPUT[aTier].get(1L), + 480, + (int) (30 * Math.pow(4, (aTier - 1))), + false); + GT_Values.RA.addAssemblerRecipe( + flInputs2[aTier], + glues[3].getMolten((long) (2.25 * Math.pow(2, (aTier + 1)))), + ItemList.HATCHES_OUTPUT[aTier].get(1L), + 480, + (int) (30 * Math.pow(4, (aTier - 1))), + false); } } @@ -4270,33 +19647,260 @@ public class GT_MachineRecipeLoader implements Runnable { */ private void loadRailcraftRecipes() { if (!Loader.isModLoaded(MOD_ID_RC)) return; - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.stone_slab, 1, 0), ItemList.RC_Rebar.get(1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.RC_Tie_Stone.get(1L), 128, 8); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.stone_slab, 1, 7), ItemList.RC_Rebar.get(1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.RC_Tie_Stone.get(1L), 128, 8); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 3L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Electrum, 3L), GT_Utility.getIntegratedCircuit(8)}, Materials.Blaze.getMolten(216L), ItemList.RC_Rail_HS.get(16L), 100, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 3L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Electrum, 3L), GT_Utility.getIntegratedCircuit(9)}, Materials.ConductiveIron.getMolten(432L), ItemList.RC_Rail_HS.get(8L), 100, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 3L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Electrum, 3L), GT_Utility.getIntegratedCircuit(9)}, Materials.VibrantAlloy.getMolten(216L), ItemList.RC_Rail_HS.get(32L), 100, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 3L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Electrum, 3L), GT_Utility.getIntegratedCircuit(9)}, Materials.CrystallineAlloy.getMolten(216L), ItemList.RC_Rail_HS.get(64L), 100, 48); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.RC_Rail_Standard.get(3L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Electrum, 3L), GT_Utility.getIntegratedCircuit(8)}, Materials.Redstone.getMolten(216L), ItemList.RC_Rail_Adv.get(8L), 100, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.RC_Rail_Standard.get(3L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Electrum, 3L), GT_Utility.getIntegratedCircuit(8)}, Materials.RedAlloy.getMolten(216L), ItemList.RC_Rail_Adv.get(16L), 100, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.RC_Rail_Standard.get(3L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Electrum, 3L), GT_Utility.getIntegratedCircuit(8)}, Materials.ConductiveIron.getMolten(216L), ItemList.RC_Rail_Adv.get(32L), 100, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.RC_Rail_Standard.get(3L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Electrum, 3L), GT_Utility.getIntegratedCircuit(8)}, Materials.VibrantAlloy.getMolten(216L), ItemList.RC_Rail_Adv.get(64L), 100, 48); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.RC_Rail_Standard.get(1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Copper, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.RC_Rail_Electric.get(1L), 50, 4); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.RC_Rail_Standard.get(1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.AnnealedCopper, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.RC_Rail_Electric.get(1L), 50, 4); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.RC_Rail_Standard.get(1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Gold, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.RC_Rail_Electric.get(2L), 50, 4); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.RC_Rail_Standard.get(1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Electrum, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.RC_Rail_Electric.get(4L), 50, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.RC_Rail_Standard.get(1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Titanium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.RC_Rail_Electric.get(8L), 50, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.RC_Rail_Standard.get(1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.TungstenSteel, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.RC_Rail_Electric.get(16L), 50, 48); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.RC_Rail_Standard.get(1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.HSSG, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.RC_Rail_Electric.get(32L), 50, 64); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.RC_Rail_Standard.get(1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Naquadah, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.RC_Rail_Electric.get(64L), 50, 96); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.RC_Tie_Wood.get(1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iron, 1L), GT_Utility.getIntegratedCircuit(10)}, GT_Values.NF, ItemList.RC_Rail_Wooden.get(8L), 133, 4); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.RC_Tie_Wood.get(1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.WroughtIron, 1L), GT_Utility.getIntegratedCircuit(11)}, GT_Values.NF, ItemList.RC_Rail_Wooden.get(8L), 133, 4); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.RC_Tie_Wood.get(1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 1L), GT_Utility.getIntegratedCircuit(11)}, GT_Values.NF, ItemList.RC_Rail_Wooden.get(16L), 133, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.RC_Tie_Wood.get(1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.StainlessSteel, 1L), GT_Utility.getIntegratedCircuit(11)}, GT_Values.NF, ItemList.RC_Rail_Wooden.get(32L), 133, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.RC_Tie_Wood.get(1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Titanium, 1L), GT_Utility.getIntegratedCircuit(11)}, GT_Values.NF, ItemList.RC_Rail_Wooden.get(64L), 133, 48); - GT_Values.RA.addAssemblerRecipe(ItemList.RC_Tie_Wood.get(32L), GT_Utility.getIntegratedCircuit(20), ItemList.RC_Bed_Wood.get(24L), 200, 30); - GT_Values.RA.addAssemblerRecipe(ItemList.RC_Tie_Wood.get(64L), GT_Utility.getIntegratedCircuit(24), ItemList.RC_Bed_Wood.get(48L), 200, 48); - GT_Values.RA.addAssemblerRecipe(ItemList.RC_Tie_Stone.get(32L), GT_Utility.getIntegratedCircuit(20), ItemList.RC_Bed_Stone.get(24L), 200, 30); - GT_Values.RA.addAssemblerRecipe(ItemList.RC_Tie_Stone.get(64L), GT_Utility.getIntegratedCircuit(24), ItemList.RC_Bed_Stone.get(48L), 200, 48); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.stone_slab, 1, 0), + ItemList.RC_Rebar.get(1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.RC_Tie_Stone.get(1L), + 128, + 8); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.stone_slab, 1, 7), + ItemList.RC_Rebar.get(1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.RC_Tie_Stone.get(1L), + 128, + 8); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 3L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Electrum, 3L), + GT_Utility.getIntegratedCircuit(8) + }, + Materials.Blaze.getMolten(216L), + ItemList.RC_Rail_HS.get(16L), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 3L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Electrum, 3L), + GT_Utility.getIntegratedCircuit(9) + }, + Materials.ConductiveIron.getMolten(432L), + ItemList.RC_Rail_HS.get(8L), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 3L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Electrum, 3L), + GT_Utility.getIntegratedCircuit(9) + }, + Materials.VibrantAlloy.getMolten(216L), + ItemList.RC_Rail_HS.get(32L), + 100, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 3L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Electrum, 3L), + GT_Utility.getIntegratedCircuit(9) + }, + Materials.CrystallineAlloy.getMolten(216L), + ItemList.RC_Rail_HS.get(64L), + 100, + 48); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.RC_Rail_Standard.get(3L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Electrum, 3L), + GT_Utility.getIntegratedCircuit(8) + }, + Materials.Redstone.getMolten(216L), + ItemList.RC_Rail_Adv.get(8L), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.RC_Rail_Standard.get(3L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Electrum, 3L), + GT_Utility.getIntegratedCircuit(8) + }, + Materials.RedAlloy.getMolten(216L), + ItemList.RC_Rail_Adv.get(16L), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.RC_Rail_Standard.get(3L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Electrum, 3L), + GT_Utility.getIntegratedCircuit(8) + }, + Materials.ConductiveIron.getMolten(216L), + ItemList.RC_Rail_Adv.get(32L), + 100, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.RC_Rail_Standard.get(3L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Electrum, 3L), + GT_Utility.getIntegratedCircuit(8) + }, + Materials.VibrantAlloy.getMolten(216L), + ItemList.RC_Rail_Adv.get(64L), + 100, + 48); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.RC_Rail_Standard.get(1L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Copper, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.RC_Rail_Electric.get(1L), + 50, + 4); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.RC_Rail_Standard.get(1L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.AnnealedCopper, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.RC_Rail_Electric.get(1L), + 50, + 4); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.RC_Rail_Standard.get(1L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Gold, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.RC_Rail_Electric.get(2L), + 50, + 4); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.RC_Rail_Standard.get(1L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Electrum, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.RC_Rail_Electric.get(4L), + 50, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.RC_Rail_Standard.get(1L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Titanium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.RC_Rail_Electric.get(8L), + 50, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.RC_Rail_Standard.get(1L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.TungstenSteel, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.RC_Rail_Electric.get(16L), + 50, + 48); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.RC_Rail_Standard.get(1L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.HSSG, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.RC_Rail_Electric.get(32L), + 50, + 64); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.RC_Rail_Standard.get(1L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Naquadah, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + ItemList.RC_Rail_Electric.get(64L), + 50, + 96); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.RC_Tie_Wood.get(1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iron, 1L), + GT_Utility.getIntegratedCircuit(10) + }, + GT_Values.NF, + ItemList.RC_Rail_Wooden.get(8L), + 133, + 4); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.RC_Tie_Wood.get(1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.WroughtIron, 1L), + GT_Utility.getIntegratedCircuit(11) + }, + GT_Values.NF, + ItemList.RC_Rail_Wooden.get(8L), + 133, + 4); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.RC_Tie_Wood.get(1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 1L), + GT_Utility.getIntegratedCircuit(11) + }, + GT_Values.NF, + ItemList.RC_Rail_Wooden.get(16L), + 133, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.RC_Tie_Wood.get(1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.StainlessSteel, 1L), + GT_Utility.getIntegratedCircuit(11) + }, + GT_Values.NF, + ItemList.RC_Rail_Wooden.get(32L), + 133, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.RC_Tie_Wood.get(1L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Titanium, 1L), + GT_Utility.getIntegratedCircuit(11) + }, + GT_Values.NF, + ItemList.RC_Rail_Wooden.get(64L), + 133, + 48); + GT_Values.RA.addAssemblerRecipe( + ItemList.RC_Tie_Wood.get(32L), + GT_Utility.getIntegratedCircuit(20), + ItemList.RC_Bed_Wood.get(24L), + 200, + 30); + GT_Values.RA.addAssemblerRecipe( + ItemList.RC_Tie_Wood.get(64L), + GT_Utility.getIntegratedCircuit(24), + ItemList.RC_Bed_Wood.get(48L), + 200, + 48); + GT_Values.RA.addAssemblerRecipe( + ItemList.RC_Tie_Stone.get(32L), + GT_Utility.getIntegratedCircuit(20), + ItemList.RC_Bed_Stone.get(24L), + 200, + 30); + GT_Values.RA.addAssemblerRecipe( + ItemList.RC_Tie_Stone.get(64L), + GT_Utility.getIntegratedCircuit(24), + ItemList.RC_Bed_Stone.get(48L), + 200, + 48); ItemStack tRailWood = GT_ModHandler.getModItem(MOD_ID_RC, "track", 64, 736); if (tRailWood != null) { NBTTagCompound tTagWood = new NBTTagCompound(); @@ -4308,33 +19912,95 @@ public class GT_MachineRecipeLoader implements Runnable { tTagWoodB.setString("track", "railcraft:track.slow.boost"); tRailWoodB.stackTagCompound = tTagWoodB; - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.RC_Bed_Wood.get(1L), ItemList.RC_Rail_Wooden.get(6L), GT_Utility.getIntegratedCircuit(21)}, GT_Values.NF, tRailWood, 100, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailWood), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_Utility.getIntegratedCircuit(22)}, GT_Values.NF, tRailWoodB, 200, 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.RC_Bed_Wood.get(1L), + ItemList.RC_Rail_Wooden.get(6L), + GT_Utility.getIntegratedCircuit(21) + }, + GT_Values.NF, + tRailWood, + 100, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailWood), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), + GT_Utility.getIntegratedCircuit(22) + }, + GT_Values.NF, + tRailWoodB, + 200, + 30); } - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.rail, 1, 0), ItemList.RC_Rail_Adv.get(2L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_Utility.getIntegratedCircuit(22)}, GT_Values.NF, new ItemStack(Blocks.golden_rail, 16, 0), 300, 30); - - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.RC_Bed_Wood.get(1L), ItemList.RC_Rail_Standard.get(6L), GT_Utility.getIntegratedCircuit(21)}, GT_Values.NF, new ItemStack(Blocks.rail, 64, 0), 200, 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.rail, 1, 0), + ItemList.RC_Rail_Adv.get(2L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), + GT_Utility.getIntegratedCircuit(22) + }, + GT_Values.NF, + new ItemStack(Blocks.golden_rail, 16, 0), + 300, + 30); + + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.RC_Bed_Wood.get(1L), ItemList.RC_Rail_Standard.get(6L), GT_Utility.getIntegratedCircuit(21) + }, + GT_Values.NF, + new ItemStack(Blocks.rail, 64, 0), + 200, + 30); ItemStack tRailRe = GT_ModHandler.getModItem(MOD_ID_RC, "track", 64); NBTTagCompound tTagRe = new NBTTagCompound(); tTagRe.setString("track", "railcraft:track.reinforced"); tRailRe.stackTagCompound = tTagRe; - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.RC_Bed_Stone.get(1L), ItemList.RC_Rail_Reinforced.get(6L), GT_Utility.getIntegratedCircuit(21)}, GT_Values.NF, tRailRe, 200, 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.RC_Bed_Stone.get(1L), + ItemList.RC_Rail_Reinforced.get(6L), + GT_Utility.getIntegratedCircuit(21) + }, + GT_Values.NF, + tRailRe, + 200, + 30); ItemStack tRailReB = GT_ModHandler.getModItem(MOD_ID_RC, "track.reinforced", 16); NBTTagCompound tTagReB = new NBTTagCompound(); tTagReB.setString("track", "railcraft:track.reinforced.boost"); tRailReB.stackTagCompound = tTagReB; - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailRe), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_Utility.getIntegratedCircuit(22)}, GT_Values.NF, tRailReB, 300, 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailRe), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), + GT_Utility.getIntegratedCircuit(22) + }, + GT_Values.NF, + tRailReB, + 300, + 30); ItemStack tRailEl = GT_ModHandler.getModItem(MOD_ID_RC, "track", 64); NBTTagCompound tTagEl = new NBTTagCompound(); tTagEl.setString("track", "railcraft:track.electric"); tRailEl.stackTagCompound = tTagEl; - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.RC_Bed_Stone.get(1L), ItemList.RC_Rail_Electric.get(6L), GT_Utility.getIntegratedCircuit(21)}, GT_Values.NF, tRailEl, 200, 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.RC_Bed_Stone.get(1L), + ItemList.RC_Rail_Electric.get(6L), + GT_Utility.getIntegratedCircuit(21) + }, + GT_Values.NF, + tRailEl, + 200, + 30); ItemStack tRailHs = GT_ModHandler.getModItem(MOD_ID_RC, "track", 64, 816); if (tRailHs != null) { @@ -4342,14 +20008,30 @@ public class GT_MachineRecipeLoader implements Runnable { tTagHs.setString("track", "railcraft:track.speed"); tRailHs.stackTagCompound = tTagHs; - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.RC_Bed_Stone.get(1L), ItemList.RC_Rail_HS.get(6L), GT_Utility.getIntegratedCircuit(21)}, GT_Values.NF, tRailHs, 200, 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.RC_Bed_Stone.get(1L), ItemList.RC_Rail_HS.get(6L), GT_Utility.getIntegratedCircuit(21) + }, + GT_Values.NF, + tRailHs, + 200, + 30); } ItemStack tRailHsB = GT_ModHandler.getModItem(MOD_ID_RC, "track.speed", 16); NBTTagCompound tTagHsB = new NBTTagCompound(); tTagHsB.setString("track", "railcraft:track.speed.boost"); tRailHsB.stackTagCompound = tTagHsB; - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailHs), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_Utility.getIntegratedCircuit(22)}, GT_Values.NF, tRailHsB, 300, 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailHs), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), + GT_Utility.getIntegratedCircuit(22) + }, + GT_Values.NF, + tRailHsB, + 300, + 30); // --- Wooden Switch Track --- ItemStack tRailSS = GT_ModHandler.getModItem(MOD_ID_RC, "track.slow", 1, 19986); @@ -4358,13 +20040,76 @@ public class GT_MachineRecipeLoader implements Runnable { tTagSS.setString("track", "railcraft:track.slow.switch"); tRailSS.stackTagCompound = tTagSS; - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailWood), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.AnyIron, 4L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, tRailSS, 100, 8); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailWood), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Steel, 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(2, tRailSS), 100, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailWood), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.StainlessSteel, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(4, tRailSS), 100, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailWood), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Titanium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(8, tRailSS), 100, 48); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailWood), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.TungstenSteel, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(16, tRailSS), 100, 64); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailWood), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Iridium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(32, tRailSS), 100, 120); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailWood), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Osmium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(64, tRailSS), 100, 256); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailWood), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.AnyIron, 4L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + tRailSS, + 100, + 8); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailWood), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Steel, 2L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(2, tRailSS), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailWood), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.StainlessSteel, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(4, tRailSS), + 100, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailWood), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Titanium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(8, tRailSS), + 100, + 48); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailWood), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.TungstenSteel, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(16, tRailSS), + 100, + 64); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailWood), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Iridium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(32, tRailSS), + 100, + 120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailWood), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Osmium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(64, tRailSS), + 100, + 256); } // --- Wooden Wye Track --- ItemStack tRailSW = GT_ModHandler.getModItem(MOD_ID_RC, "track.slow", 1); @@ -4373,13 +20118,76 @@ public class GT_MachineRecipeLoader implements Runnable { tTagSW.setString("track", "railcraft:track.slow.wye"); tRailSW.stackTagCompound = tTagSW; - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailWood), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.AnyIron, 4L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, tRailSW, 100, 8); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailWood), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Steel, 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(2, tRailSW), 100, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailWood), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.StainlessSteel, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(4, tRailSW), 100, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailWood), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Titanium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(8, tRailSW), 100, 48); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailWood), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.TungstenSteel, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(16, tRailSW), 100, 64); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailWood), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Iridium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(32, tRailSW), 100, 120); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailWood), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Osmium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(64, tRailSW), 100, 256); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailWood), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.AnyIron, 4L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + tRailSW, + 100, + 8); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailWood), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Steel, 2L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(2, tRailSW), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailWood), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.StainlessSteel, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(4, tRailSW), + 100, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailWood), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Titanium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(8, tRailSW), + 100, + 48); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailWood), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.TungstenSteel, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(16, tRailSW), + 100, + 64); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailWood), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Iridium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(32, tRailSW), + 100, + 120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailWood), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Osmium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(64, tRailSW), + 100, + 256); } // --- Wooden Junction Tack --- ItemStack tRailSJ = GT_ModHandler.getModItem(MOD_ID_RC, "track.slow", 1); @@ -4388,13 +20196,76 @@ public class GT_MachineRecipeLoader implements Runnable { tTagSJ.setString("track", "railcraft:track.slow.junction"); tRailSJ.stackTagCompound = tTagSJ; - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailWood), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.AnyIron, 4L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, tRailSJ, 100, 8); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailWood), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(2, tRailSJ), 100, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailWood), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.StainlessSteel, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(4, tRailSJ), 100, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailWood), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(8, tRailSJ), 100, 48); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailWood), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.TungstenSteel, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(16, tRailSJ), 100, 64); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailWood), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Iridium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(32, tRailSJ), 100, 120); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailWood), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Osmium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(64, tRailSJ), 100, 256); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailWood), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.AnyIron, 4L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + tRailSJ, + 100, + 8); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailWood), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 2L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(2, tRailSJ), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailWood), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.StainlessSteel, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(4, tRailSJ), + 100, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailWood), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(8, tRailSJ), + 100, + 48); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailWood), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.TungstenSteel, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(16, tRailSJ), + 100, + 64); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailWood), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Iridium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(32, tRailSJ), + 100, + 120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailWood), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Osmium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(64, tRailSJ), + 100, + 256); } // --- Switch Tack --- ItemStack tRailNS = GT_ModHandler.getModItem(MOD_ID_RC, "track", 1, 4767); @@ -4403,13 +20274,76 @@ public class GT_MachineRecipeLoader implements Runnable { tTagNS.setString("track", "railcraft:track.switch"); tRailNS.stackTagCompound = tTagNS; - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.rail, 2, 0), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Steel, 4L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, tRailNS, 200, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.rail, 2, 0), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.StainlessSteel, 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(2, tRailNS), 200, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.rail, 2, 0), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Titanium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(4, tRailNS), 200, 48); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.rail, 2, 0), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.TungstenSteel, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(8, tRailNS), 200, 64); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.rail, 2, 0), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Iridium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(16, tRailNS), 200, 120); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.rail, 2, 0), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Osmium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(32, tRailNS), 200, 256); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.rail, 2, 0), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Neutronium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(64, tRailNS), 200, 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.rail, 2, 0), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Steel, 4L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + tRailNS, + 200, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.rail, 2, 0), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.StainlessSteel, 2L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(2, tRailNS), + 200, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.rail, 2, 0), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Titanium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(4, tRailNS), + 200, + 48); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.rail, 2, 0), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.TungstenSteel, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(8, tRailNS), + 200, + 64); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.rail, 2, 0), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Iridium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(16, tRailNS), + 200, + 120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.rail, 2, 0), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Osmium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(32, tRailNS), + 200, + 256); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.rail, 2, 0), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Neutronium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(64, tRailNS), + 200, + 480); } // --- Wye Tack --- ItemStack tRailNW = GT_ModHandler.getModItem(MOD_ID_RC, "track", 1, 2144); @@ -4418,13 +20352,76 @@ public class GT_MachineRecipeLoader implements Runnable { tTagNW.setString("track", "railcraft:track.wye"); tRailNW.stackTagCompound = tTagNW; - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.rail, 2, 0), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Steel, 4L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, tRailNW, 200, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.rail, 2, 0), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.StainlessSteel, 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(2, tRailNW), 200, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.rail, 2, 0), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Titanium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(4, tRailNW), 200, 48); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.rail, 2, 0), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.TungstenSteel, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(8, tRailNW), 200, 64); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.rail, 2, 0), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Iridium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(16, tRailNW), 200, 120); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.rail, 2, 0), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Osmium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(32, tRailNW), 200, 256); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.rail, 2, 0), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Neutronium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(64, tRailNW), 200, 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.rail, 2, 0), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Steel, 4L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + tRailNW, + 200, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.rail, 2, 0), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.StainlessSteel, 2L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(2, tRailNW), + 200, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.rail, 2, 0), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Titanium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(4, tRailNW), + 200, + 48); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.rail, 2, 0), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.TungstenSteel, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(8, tRailNW), + 200, + 64); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.rail, 2, 0), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Iridium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(16, tRailNW), + 200, + 120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.rail, 2, 0), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Osmium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(32, tRailNW), + 200, + 256); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.rail, 2, 0), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Neutronium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(64, tRailNW), + 200, + 480); } // --- Junction Tack --- ItemStack tRailNJ = GT_ModHandler.getModItem(MOD_ID_RC, "track", 1); @@ -4433,13 +20430,76 @@ public class GT_MachineRecipeLoader implements Runnable { tTagNJ.setString("track", "railcraft:track.junction"); tRailNJ.stackTagCompound = tTagNJ; - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.rail, 2, 0), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 4L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, tRailNJ, 200, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.rail, 2, 0), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.StainlessSteel, 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(2, tRailNJ), 200, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.rail, 2, 0), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(4, tRailNJ), 200, 48); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.rail, 2, 0), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.TungstenSteel, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(8, tRailNJ), 200, 64); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.rail, 2, 0), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Iridium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(16, tRailNJ), 200, 120); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.rail, 2, 0), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Osmium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(32, tRailNJ), 200, 256); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.rail, 2, 0), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Neutronium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(64, tRailNJ), 200, 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.rail, 2, 0), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 4L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + tRailNJ, + 200, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.rail, 2, 0), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.StainlessSteel, 2L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(2, tRailNJ), + 200, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.rail, 2, 0), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(4, tRailNJ), + 200, + 48); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.rail, 2, 0), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.TungstenSteel, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(8, tRailNJ), + 200, + 64); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.rail, 2, 0), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Iridium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(16, tRailNJ), + 200, + 120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.rail, 2, 0), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Osmium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(32, tRailNJ), + 200, + 256); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.rail, 2, 0), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Neutronium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(64, tRailNJ), + 200, + 480); } // --- Reinforced Switch Track --- ItemStack tRailRS = GT_ModHandler.getModItem(MOD_ID_RC, "track.reinforced", 1); @@ -4448,13 +20508,76 @@ public class GT_MachineRecipeLoader implements Runnable { tTagRS.setString("track", "railcraft:track.reinforced.switch"); tRailRS.stackTagCompound = tTagRS; - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailRe), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Steel, 4L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, tRailRS, 300, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailRe), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.StainlessSteel, 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(2, tRailRS), 300, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailRe), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Titanium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(4, tRailRS), 300, 48); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailRe), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.TungstenSteel, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(8, tRailRS), 300, 64); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailRe), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Iridium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(16, tRailRS), 300, 120); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailRe), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Osmium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(32, tRailRS), 300, 256); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailRe), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Neutronium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(64, tRailRS), 300, 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailRe), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Steel, 4L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + tRailRS, + 300, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailRe), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.StainlessSteel, 2L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(2, tRailRS), + 300, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailRe), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Titanium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(4, tRailRS), + 300, + 48); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailRe), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.TungstenSteel, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(8, tRailRS), + 300, + 64); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailRe), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Iridium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(16, tRailRS), + 300, + 120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailRe), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Osmium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(32, tRailRS), + 300, + 256); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailRe), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Neutronium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(64, tRailRS), + 300, + 480); } // --- Reinforced Wye Track --- ItemStack tRailRW = GT_ModHandler.getModItem(MOD_ID_RC, "track.reinforced", 1); @@ -4463,13 +20586,76 @@ public class GT_MachineRecipeLoader implements Runnable { tTagRW.setString("track", "railcraft:track.reinforced.wye"); tRailRW.stackTagCompound = tTagRW; - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailRe), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Steel, 4L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, tRailRW, 300, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailRe), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.StainlessSteel, 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(2, tRailRW), 300, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailRe), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Titanium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(4, tRailRW), 300, 48); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailRe), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.TungstenSteel, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(8, tRailRW), 300, 64); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailRe), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Iridium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(16, tRailRW), 300, 120); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailRe), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Osmium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(32, tRailRW), 300, 256); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailRe), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Neutronium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(64, tRailRW), 300, 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailRe), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Steel, 4L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + tRailRW, + 300, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailRe), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.StainlessSteel, 2L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(2, tRailRW), + 300, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailRe), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Titanium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(4, tRailRW), + 300, + 48); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailRe), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.TungstenSteel, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(8, tRailRW), + 300, + 64); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailRe), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Iridium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(16, tRailRW), + 300, + 120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailRe), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Osmium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(32, tRailRW), + 300, + 256); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailRe), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Neutronium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(64, tRailRW), + 300, + 480); } // --- Reinforced Junction Track --- ItemStack tRailRJ = GT_ModHandler.getModItem(MOD_ID_RC, "track.reinforced", 1, 764); @@ -4478,13 +20664,76 @@ public class GT_MachineRecipeLoader implements Runnable { tTagRJ.setString("track", "railcraft:track.reinforced.junction"); tRailRJ.stackTagCompound = tTagRJ; - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailRe), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 4L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, tRailRJ, 300, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailRe), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.StainlessSteel, 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(2, tRailRJ), 300, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailRe), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(4, tRailRJ), 300, 48); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailRe), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.TungstenSteel, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(8, tRailRJ), 300, 64); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailRe), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Iridium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(16, tRailRJ), 300, 120); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailRe), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Osmium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(32, tRailRJ), 300, 256); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailRe), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Neutronium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(64, tRailRJ), 300, 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailRe), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 4L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + tRailRJ, + 300, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailRe), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.StainlessSteel, 2L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(2, tRailRJ), + 300, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailRe), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(4, tRailRJ), + 300, + 48); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailRe), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.TungstenSteel, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(8, tRailRJ), + 300, + 64); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailRe), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Iridium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(16, tRailRJ), + 300, + 120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailRe), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Osmium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(32, tRailRJ), + 300, + 256); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailRe), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Neutronium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(64, tRailRJ), + 300, + 480); } // --- H.S. Switch Track --- ItemStack tRailSSw = GT_ModHandler.getModItem(MOD_ID_RC, "track.speed", 1, 7916); @@ -4493,13 +20742,76 @@ public class GT_MachineRecipeLoader implements Runnable { tTagRSSw.setString("track", "railcraft:track.speed.switch"); tRailSSw.stackTagCompound = tTagRSSw; - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailHs), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Steel, 4L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, tRailSSw, 400, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailHs), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.StainlessSteel, 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(2, tRailSSw), 400, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailHs), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Titanium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(4, tRailSSw), 400, 48); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailHs), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.TungstenSteel, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(8, tRailSSw), 400, 64); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailHs), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Iridium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(16, tRailSSw), 400, 120); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailHs), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Osmium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(32, tRailSSw), 400, 256); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailHs), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Neutronium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(64, tRailSSw), 400, 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailHs), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Steel, 4L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + tRailSSw, + 400, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailHs), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.StainlessSteel, 2L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(2, tRailSSw), + 400, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailHs), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Titanium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(4, tRailSSw), + 400, + 48); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailHs), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.TungstenSteel, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(8, tRailSSw), + 400, + 64); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailHs), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Iridium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(16, tRailSSw), + 400, + 120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailHs), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Osmium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(32, tRailSSw), + 400, + 256); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailHs), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Neutronium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(64, tRailSSw), + 400, + 480); } // --- H.S. Wye Track --- ItemStack tRailSWy = GT_ModHandler.getModItem(MOD_ID_RC, "track.speed", 1); @@ -4508,13 +20820,76 @@ public class GT_MachineRecipeLoader implements Runnable { tTagRSWy.setString("track", "railcraft:track.speed.wye"); tRailSWy.stackTagCompound = tTagRSWy; - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailHs), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Steel, 4L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, tRailSWy, 400, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailHs), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.StainlessSteel, 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(2, tRailSWy), 400, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailHs), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Titanium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(4, tRailSWy), 400, 48); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailHs), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.TungstenSteel, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(8, tRailSWy), 400, 64); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailHs), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Iridium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(16, tRailSWy), 400, 120); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailHs), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Osmium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(32, tRailSWy), 400, 256); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailHs), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Neutronium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(64, tRailSWy), 400, 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailHs), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Steel, 4L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + tRailSWy, + 400, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailHs), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.StainlessSteel, 2L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(2, tRailSWy), + 400, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailHs), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Titanium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(4, tRailSWy), + 400, + 48); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailHs), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.TungstenSteel, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(8, tRailSWy), + 400, + 64); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailHs), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Iridium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(16, tRailSWy), + 400, + 120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailHs), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Osmium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(32, tRailSWy), + 400, + 256); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailHs), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Neutronium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(64, tRailSWy), + 400, + 480); } // --- H.S. Transition Track --- ItemStack tRailSTt = GT_ModHandler.getModItem(MOD_ID_RC, "track.speed", 1, 26865); @@ -4523,11 +20898,61 @@ public class GT_MachineRecipeLoader implements Runnable { tTagRSTt.setString("track", "railcraft:track.speed.transition"); tRailSTt.stackTagCompound = tTagRSTt; - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailHs), ItemList.RC_Bed_Stone.get(1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(4, tRailSTt), 400, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailHs), ItemList.RC_Bed_Stone.get(1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.ConductiveIron, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(8, tRailSTt), 400, 64); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailHs), ItemList.RC_Bed_Stone.get(1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.VibrantAlloy, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(16, tRailSTt), 400, 120); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailHs), ItemList.RC_Bed_Stone.get(1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.CrystallineAlloy, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(32, tRailSTt), 400, 256); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailHs), ItemList.RC_Bed_Stone.get(1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.MelodicAlloy, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(64, tRailSTt), 400, 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailHs), + ItemList.RC_Bed_Stone.get(1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedAlloy, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(4, tRailSTt), + 400, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailHs), + ItemList.RC_Bed_Stone.get(1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.ConductiveIron, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(8, tRailSTt), + 400, + 64); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailHs), + ItemList.RC_Bed_Stone.get(1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.VibrantAlloy, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(16, tRailSTt), + 400, + 120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailHs), + ItemList.RC_Bed_Stone.get(1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.CrystallineAlloy, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(32, tRailSTt), + 400, + 256); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailHs), + ItemList.RC_Bed_Stone.get(1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.MelodicAlloy, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(64, tRailSTt), + 400, + 480); } // --- Electric Switch Track --- ItemStack tRailES = GT_ModHandler.getModItem(MOD_ID_RC, "track.electric", 1, 10488); @@ -4536,13 +20961,76 @@ public class GT_MachineRecipeLoader implements Runnable { tTagES.setString("track", "railcraft:track.electric.switch"); tRailES.stackTagCompound = tTagES; - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailEl), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Copper, 4L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, tRailES, 400, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailEl), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Gold, 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(2, tRailES), 400, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailEl), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Electrum, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(4, tRailES), 400, 48); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailEl), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Titanium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(8, tRailES), 400, 64); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailEl), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Platinum, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(16, tRailES), 400, 120); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailEl), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.VanadiumGallium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(32, tRailES), 400, 256); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailEl), GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Naquadah, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(64, tRailES), 400, 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailEl), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Copper, 4L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + tRailES, + 400, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailEl), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Gold, 2L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(2, tRailES), + 400, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailEl), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Electrum, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(4, tRailES), + 400, + 48); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailEl), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Titanium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(8, tRailES), + 400, + 64); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailEl), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Platinum, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(16, tRailES), + 400, + 120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailEl), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.VanadiumGallium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(32, tRailES), + 400, + 256); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailEl), + GT_OreDictUnificator.get(OrePrefixes.springSmall, Materials.Naquadah, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(64, tRailES), + 400, + 480); } // --- Electric Wye Track --- ItemStack tRailEw = GT_ModHandler.getModItem(MOD_ID_RC, "track.electric", 1); @@ -4551,13 +21039,76 @@ public class GT_MachineRecipeLoader implements Runnable { tTagEw.setString("track", "railcraft:track.electric.wye"); tRailEw.stackTagCompound = tTagEw; - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailEl), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Copper, 4L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, tRailEw, 400, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailEl), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Gold, 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(2, tRailEw), 400, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailEl), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Electrum, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(4, tRailEw), 400, 48); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailEl), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Titanium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(8, tRailEw), 400, 64); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailEl), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Platinum, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(16, tRailEw), 400, 120); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailEl), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.VanadiumGallium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(32, tRailEw), 400, 256); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailEl), GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Naquadah, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(64, tRailEw), 400, 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailEl), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Copper, 4L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + tRailEw, + 400, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailEl), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Gold, 2L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(2, tRailEw), + 400, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailEl), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Electrum, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(4, tRailEw), + 400, + 48); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailEl), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Titanium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(8, tRailEw), + 400, + 64); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailEl), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Platinum, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(16, tRailEw), + 400, + 120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailEl), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.VanadiumGallium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(32, tRailEw), + 400, + 256); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailEl), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Naquadah, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(64, tRailEw), + 400, + 480); } // --- Electric Junction Track --- ItemStack tRailEJ = GT_ModHandler.getModItem(MOD_ID_RC, "track.electric", 1); @@ -4566,248 +21117,1757 @@ public class GT_MachineRecipeLoader implements Runnable { tTagREJ.setString("track", "railcraft:track.electric.junction"); tRailEJ.stackTagCompound = tTagREJ; - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailEl), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Copper, 4L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, tRailEJ, 400, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailEl), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Gold, 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(2, tRailEJ), 400, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailEl), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Electrum, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(4, tRailEJ), 400, 48); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailEl), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(8, tRailEJ), 400, 64); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailEl), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Platinum, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(16, tRailEJ), 400, 120); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailEl), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.VanadiumGallium, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(32, tRailEJ), 400, 256); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.copyAmount(2, tRailEl), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Naquadah, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_Utility.copyAmount(64, tRailEJ), 400, 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailEl), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Copper, 4L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + tRailEJ, + 400, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailEl), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Gold, 2L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(2, tRailEJ), + 400, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailEl), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Electrum, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(4, tRailEJ), + 400, + 48); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailEl), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(8, tRailEJ), + 400, + 64); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailEl), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Platinum, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(16, tRailEJ), + 400, + 120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailEl), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.VanadiumGallium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(32, tRailEJ), + 400, + 256); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_Utility.copyAmount(2, tRailEl), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Naquadah, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_Utility.copyAmount(64, tRailEJ), + 400, + 480); } - //Shunting Wire + // Shunting Wire for (Materials tMat : Materials.values()) { if (tMat.isProperSolderingFluid()) { - int tMultiplier = tMat.contains(SubTag.SOLDERING_MATERIAL_GOOD) ? 1 : tMat.contains(SubTag.SOLDERING_MATERIAL_BAD) ? 4 : 2; - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Copper, 1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Lead, 1L), GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(16L * tMultiplier / 2L), ItemList.RC_ShuntingWire.get(1L), 200, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.AnnealedCopper, 1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Lead, 1L), GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(16L * tMultiplier / 2L), ItemList.RC_ShuntingWire.get(1L), 200, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Gold, 1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Lead, 1L), GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(16L * tMultiplier / 2L), ItemList.RC_ShuntingWire.get(4L), 200, 24); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Electrum, 1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Gold, 1L), GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(16L * tMultiplier / 2L), ItemList.RC_ShuntingWire.get(8L), 200, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Titanium, 1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Electrum, 1L), GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(16L * tMultiplier / 2L), ItemList.RC_ShuntingWire.get(16L), 200, 48); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Platinum, 1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Titanium, 1L), GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(16L * tMultiplier / 2L), ItemList.RC_ShuntingWire.get(32L), 200, 64); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.VanadiumGallium, 1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Platinum, 1L), GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(16L * tMultiplier / 2L), ItemList.RC_ShuntingWire.get(64L), 200, 120); - //Railcraft Circuits - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Coated_Basic.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1), ItemList.Cover_Controller.get(1L)}, tMat.getMolten(144L * tMultiplier / 2L), GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 4L, 0), 300, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Coated_Basic.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1), ItemList.Sensor_LV.get(1L)}, tMat.getMolten(144L * tMultiplier / 2L), GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 4L, 1), 300, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Coated_Basic.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1), GT_ModHandler.getModItem(MOD_ID_RC, "part.signal.lamp", 1L, 0)}, tMat.getMolten(144L * tMultiplier / 2L), GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 4L, 2), 300, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Phenolic_Good.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 1), ItemList.Cover_Controller.get(1L)}, tMat.getMolten(144L * tMultiplier / 2L), GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 8L, 0), 400, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Phenolic_Good.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 1), ItemList.Sensor_LV.get(1L)}, tMat.getMolten(144L * tMultiplier / 2L), GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 8L, 1), 400, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Phenolic_Good.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 1), GT_ModHandler.getModItem(MOD_ID_RC, "part.signal.lamp", 1L, 0)}, tMat.getMolten(144L * tMultiplier / 2L), GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 8L, 2), 400, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy_Advanced.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1), ItemList.Cover_Controller.get(1L)}, tMat.getMolten(144L * tMultiplier / 2L), GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 16L, 0), 500, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy_Advanced.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1), ItemList.Sensor_LV.get(1L)}, tMat.getMolten(144L * tMultiplier / 2L), GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 16L, 1), 500, 30); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy_Advanced.get(1L), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1), GT_ModHandler.getModItem(MOD_ID_RC, "part.signal.lamp", 1L, 0)}, tMat.getMolten(144L * tMultiplier / 2L), GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 16L, 2), 500, 30); - //chunkloader upgrade OC - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Plastic_Advanced.get(1L), GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.Aluminium, 2L), GT_ModHandler.getModItem(MOD_ID_RC, "machine.alpha", 1L, 0), GT_ModHandler.getModItem("OpenComputers", "item", 1L, 26), GT_Utility.getIntegratedCircuit(1)}, tMat.getMolten(144L * tMultiplier / 2L), GT_ModHandler.getModItem("OpenComputers", "item", 1L, 62), 250, 256); + int tMultiplier = tMat.contains(SubTag.SOLDERING_MATERIAL_GOOD) + ? 1 + : tMat.contains(SubTag.SOLDERING_MATERIAL_BAD) ? 4 : 2; + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Copper, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Lead, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + tMat.getMolten(16L * tMultiplier / 2L), + ItemList.RC_ShuntingWire.get(1L), + 200, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.AnnealedCopper, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Lead, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + tMat.getMolten(16L * tMultiplier / 2L), + ItemList.RC_ShuntingWire.get(1L), + 200, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Gold, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Lead, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + tMat.getMolten(16L * tMultiplier / 2L), + ItemList.RC_ShuntingWire.get(4L), + 200, + 24); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Electrum, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Gold, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + tMat.getMolten(16L * tMultiplier / 2L), + ItemList.RC_ShuntingWire.get(8L), + 200, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Titanium, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Electrum, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + tMat.getMolten(16L * tMultiplier / 2L), + ItemList.RC_ShuntingWire.get(16L), + 200, + 48); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Platinum, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Titanium, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + tMat.getMolten(16L * tMultiplier / 2L), + ItemList.RC_ShuntingWire.get(32L), + 200, + 64); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.VanadiumGallium, 1L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Platinum, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + tMat.getMolten(16L * tMultiplier / 2L), + ItemList.RC_ShuntingWire.get(64L), + 200, + 120); + // Railcraft Circuits + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + ItemList.Circuit_Board_Coated_Basic.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1), + ItemList.Cover_Controller.get(1L) + }, + tMat.getMolten(144L * tMultiplier / 2L), + GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 4L, 0), + 300, + 30); + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + ItemList.Circuit_Board_Coated_Basic.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1), + ItemList.Sensor_LV.get(1L) + }, + tMat.getMolten(144L * tMultiplier / 2L), + GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 4L, 1), + 300, + 30); + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + ItemList.Circuit_Board_Coated_Basic.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1), + GT_ModHandler.getModItem(MOD_ID_RC, "part.signal.lamp", 1L, 0) + }, + tMat.getMolten(144L * tMultiplier / 2L), + GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 4L, 2), + 300, + 30); + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + ItemList.Circuit_Board_Phenolic_Good.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 1), + ItemList.Cover_Controller.get(1L) + }, + tMat.getMolten(144L * tMultiplier / 2L), + GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 8L, 0), + 400, + 30); + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + ItemList.Circuit_Board_Phenolic_Good.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 1), + ItemList.Sensor_LV.get(1L) + }, + tMat.getMolten(144L * tMultiplier / 2L), + GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 8L, 1), + 400, + 30); + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + ItemList.Circuit_Board_Phenolic_Good.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 1), + GT_ModHandler.getModItem(MOD_ID_RC, "part.signal.lamp", 1L, 0) + }, + tMat.getMolten(144L * tMultiplier / 2L), + GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 8L, 2), + 400, + 30); + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + ItemList.Circuit_Board_Epoxy_Advanced.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1), + ItemList.Cover_Controller.get(1L) + }, + tMat.getMolten(144L * tMultiplier / 2L), + GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 16L, 0), + 500, + 30); + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + ItemList.Circuit_Board_Epoxy_Advanced.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1), + ItemList.Sensor_LV.get(1L) + }, + tMat.getMolten(144L * tMultiplier / 2L), + GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 16L, 1), + 500, + 30); + GT_Values.RA.addCircuitAssemblerRecipe( + new ItemStack[] { + ItemList.Circuit_Board_Epoxy_Advanced.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1), + GT_ModHandler.getModItem(MOD_ID_RC, "part.signal.lamp", 1L, 0) + }, + tMat.getMolten(144L * tMultiplier / 2L), + GT_ModHandler.getModItem(MOD_ID_RC, "part.circuit", 16L, 2), + 500, + 30); + // chunkloader upgrade OC + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.Circuit_Board_Plastic_Advanced.get(1L), + GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.Aluminium, 2L), + GT_ModHandler.getModItem(MOD_ID_RC, "machine.alpha", 1L, 0), + GT_ModHandler.getModItem("OpenComputers", "item", 1L, 26), + GT_Utility.getIntegratedCircuit(1) + }, + tMat.getMolten(144L * tMultiplier / 2L), + GT_ModHandler.getModItem("OpenComputers", "item", 1L, 62), + 250, + 256); } } - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.piston, 1, 0), ItemList.FR_Casing_Sturdy.get(1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Lapis, 1L), GT_Utility.getIntegratedCircuit(1)}, Materials.SeedOil.getFluid(250L), GT_ModHandler.getModItem(MOD_ID_DC,"item.EngineCore", 1L, 0), 100, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Blocks.piston, 1, 0), ItemList.FR_Casing_Sturdy.get(1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Lapis, 1L), GT_Utility.getIntegratedCircuit(1)}, Materials.Lubricant.getFluid(125L), GT_ModHandler.getModItem(MOD_ID_DC,"item.EngineCore", 1L, 0), 100, 16); - - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_ModHandler.getModItem("ExtraUtilities", "trashcan", 1L, 0), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Obsidian, 4L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 11), 200, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_ModHandler.getModItem(MOD_ID_DC,"item.EngineCore", 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.AnyCopper, 10L), GT_Utility.getIntegratedCircuit(10)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 7), 200, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_ModHandler.getModItem(MOD_ID_DC, "item.EngineCore", 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 10L), GT_Utility.getIntegratedCircuit(10)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 8), 200, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_ModHandler.getModItem(MOD_ID_DC, "item.EngineCore", 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 10L), GT_Utility.getIntegratedCircuit(10)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 9), 200, 16); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Gold, 2L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Diamond, 4L), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderPearl, 1L), GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Obsidian, 2L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.alpha", 1, 0), 600, 480); - - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.AnyIron, 2L), GT_Utility.getIntegratedCircuit(20), GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 0), 600, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.AnyIron, 2L), new ItemStack(Blocks.glass_pane, 2, 0), GT_Utility.getIntegratedCircuit(21)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 2L, 1), 800, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.AnyIron, 2L), GT_ModHandler.getModItem("TConstruct", "GlassPane", 2L, 0), GT_Utility.getIntegratedCircuit(21)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 2L, 1), 800, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Bronze, 2L), new ItemStack(Blocks.iron_bars, 2, 0), GT_Utility.getIntegratedCircuit(22)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 2), 800, 30); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 2L), GT_Utility.getIntegratedCircuit(20)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 13), 200, 64); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 2L), new ItemStack(Blocks.glass_pane, 2, 0), GT_Utility.getIntegratedCircuit(21)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 2L, 14), 400, 64); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 2L), GT_ModHandler.getModItem("TConstruct", "GlassPane", 2L, 0), GT_Utility.getIntegratedCircuit(21)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 2L, 14), 400, 64); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Steel, 2L), GT_ModHandler.getModItem(MOD_ID_DC, "item.SteelBars", 2L), GT_Utility.getIntegratedCircuit(22)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 15), 400, 64); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 2L), GT_Utility.getIntegratedCircuit(20), GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 0), 600, 120); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 2L), new ItemStack(Blocks.glass_pane, 2, 0), GT_Utility.getIntegratedCircuit(21)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 2L, 1), 800, 120); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 2L), GT_ModHandler.getModItem("TConstruct", "GlassPane", 2L, 0), GT_Utility.getIntegratedCircuit(21)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 2L, 1), 800, 120); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Plastic, 2L), GT_ModHandler.getModItem(MOD_ID_DC, "item.AluminiumBars", 2L), GT_Utility.getIntegratedCircuit(22)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 2), 800, 120); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 2L), GT_Utility.getIntegratedCircuit(20)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 3), 200, 256); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 2L), new ItemStack(Blocks.glass_pane, 2, 0), GT_Utility.getIntegratedCircuit(21)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 2L, 4), 400, 256); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 2L), GT_ModHandler.getModItem("TConstruct", "GlassPane", 2L, 0), GT_Utility.getIntegratedCircuit(21)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 2L, 4), 400, 256); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.StainlessSteel, 2L), GT_ModHandler.getModItem(MOD_ID_DC, "item.StainlessSteelBars", 2L), GT_Utility.getIntegratedCircuit(22)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 5), 400, 256); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 2L), GT_Utility.getIntegratedCircuit(20), GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 6), 600, 480); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 2L), new ItemStack(Blocks.glass_pane, 2, 0), GT_Utility.getIntegratedCircuit(21)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 2L, 7), 800, 480); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 2L), GT_ModHandler.getModItem("TConstruct", "GlassPane", 2L, 0), GT_Utility.getIntegratedCircuit(21)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 2L, 7), 800, 480); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Titanium, 2L), GT_ModHandler.getModItem(MOD_ID_DC, "item.TitaniumBars", 2L), GT_Utility.getIntegratedCircuit(22)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 8), 800, 480); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 2L), GT_Utility.getIntegratedCircuit(20)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 9), 200, 960); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 2L), new ItemStack(Blocks.glass_pane, 2, 0), GT_Utility.getIntegratedCircuit(21)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 2L, 10), 400, 960); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 2L), GT_ModHandler.getModItem("TConstruct", "GlassPane", 2L, 0), GT_Utility.getIntegratedCircuit(21)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 2L, 10), 400, 960); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.TungstenSteel, 2L), GT_ModHandler.getModItem(MOD_ID_DC, "item.TungstenSteelBars", 2L), GT_Utility.getIntegratedCircuit(22)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 11), 400, 960); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Palladium, 2L), GT_Utility.getIntegratedCircuit(20), GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 12), 600, 1920); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Palladium, 2L), new ItemStack(Blocks.glass_pane, 2, 0), GT_Utility.getIntegratedCircuit(21)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 2L, 13), 800, 1920); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Palladium, 2L), GT_ModHandler.getModItem("TConstruct", "GlassPane", 2L, 0), GT_Utility.getIntegratedCircuit(21)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 2L, 13), 800, 1920); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.NiobiumTitanium, 2L), GT_ModHandler.getModItem(MOD_ID_DC, "item.ChromeBars", 2L), GT_Utility.getIntegratedCircuit(22)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 14), 800, 1920); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 2L), GT_Utility.getIntegratedCircuit(20)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 0), 200, 4096); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 2L), new ItemStack(Blocks.glass_pane, 2, 0), GT_Utility.getIntegratedCircuit(21)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 2L, 1), 400, 4096); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 2L), GT_ModHandler.getModItem("TConstruct", "GlassPane", 2L, 0), GT_Utility.getIntegratedCircuit(21)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 2L, 1), 400, 4096); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Enderium, 2L), GT_ModHandler.getModItem(MOD_ID_DC, "item.IridiumBars", 2L), GT_Utility.getIntegratedCircuit(22)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 2), 400, 4096); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 2L), GT_Utility.getIntegratedCircuit(20), GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 3), 600, 7680); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 2L), new ItemStack(Blocks.glass_pane, 2, 0), GT_Utility.getIntegratedCircuit(21)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 2L, 4), 800, 7680); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 2L), GT_ModHandler.getModItem("TConstruct", "GlassPane", 2L, 0), GT_Utility.getIntegratedCircuit(21)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 2L, 4), 800, 7680); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Naquadah, 2L), GT_ModHandler.getModItem(MOD_ID_DC, "item.OsmiumBars", 2L), GT_Utility.getIntegratedCircuit(22)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 5), 800, 7680); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 2L), GT_Utility.getIntegratedCircuit(20)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 6), 200, 30720); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 2L), new ItemStack(Blocks.glass_pane, 2, 0), GT_Utility.getIntegratedCircuit(21)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 2L, 7), 400, 30720); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 2L), GT_ModHandler.getModItem("TConstruct", "GlassPane", 2L, 0), GT_Utility.getIntegratedCircuit(21)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 2L, 7), 400, 30720); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Neutronium, 2L), GT_ModHandler.getModItem(MOD_ID_DC, "item.NeutroniumBars", 2L), GT_Utility.getIntegratedCircuit(22)}, GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 8), 400, 30720); - //Water Tank - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Wood, 2L)}, Materials.Glue.getFluid(36L), GT_ModHandler.getModItem(MOD_ID_RC, "machine.alpha", 1L, 14), 200, 8, false); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, Materials.IronMagnetic, 1L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Wood, 2L)}, Materials.Glue.getFluid(36L), GT_ModHandler.getModItem(MOD_ID_RC, "machine.alpha", 1L, 14), 200, 8, false); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Wood, 2L)}, Materials.Glue.getFluid(36L), GT_ModHandler.getModItem(MOD_ID_RC, "machine.alpha", 1L, 14), 200, 8, false); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Steel, 4L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Wood, 4L)}, Materials.Glue.getFluid(72L), GT_ModHandler.getModItem(MOD_ID_RC, "machine.alpha", 3L, 14), 400, 30, false); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Steel, 2L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.WoodSealed, 1L)}, Materials.Plastic.getMolten(36L), GT_ModHandler.getModItem(MOD_ID_RC, "machine.alpha", 3L, 14), 400, 30, false); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.StainlessSteel, 4L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.WoodSealed, 4L)}, Materials.Plastic.getMolten(72L), GT_ModHandler.getModItem(MOD_ID_RC, "machine.alpha", 9L, 14), 400, 120, false); - //Steam Boilers - GT_Values.RA.addAssemblerRecipe(ItemList.IC2_Item_Casing_Iron.get(6L), GT_Utility.getIntegratedCircuit(6), GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 3), 400, 30); - GT_Values.RA.addAssemblerRecipe(ItemList.IC2_Item_Casing_Steel.get(6L), GT_Utility.getIntegratedCircuit(6), GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 4), 400, 64); - - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Aluminium, 20L), (GT_Utility.getIntegratedCircuit(10)), ItemList.RC_Rail_Standard.get(64L), 300, 30); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iron, 48L), (GT_Utility.getIntegratedCircuit(10)), ItemList.RC_Rail_Standard.get(64L), 300, 30); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.WroughtIron, 32L), (GT_Utility.getIntegratedCircuit(10)), ItemList.RC_Rail_Standard.get(64L), 300, 30); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Bronze, 32L), (GT_Utility.getIntegratedCircuit(10)), ItemList.RC_Rail_Standard.get(64L), 300, 30); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 24L), (GT_Utility.getIntegratedCircuit(10)), ItemList.RC_Rail_Standard.get(64L), 300, 30); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.StainlessSteel, 16L), (GT_Utility.getIntegratedCircuit(10)), ItemList.RC_Rail_Standard.get(64L), 300, 30); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Titanium, 12L), (GT_Utility.getIntegratedCircuit(10)), ItemList.RC_Rail_Standard.get(64L), 300, 30); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.TungstenSteel, 9L), (GT_Utility.getIntegratedCircuit(10)), ItemList.RC_Rail_Standard.get(64L), 300, 30); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iridium, 6L), (GT_Utility.getIntegratedCircuit(10)), ItemList.RC_Rail_Standard.get(64L), 300, 30); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Osmium, 3L), (GT_Utility.getIntegratedCircuit(10)), ItemList.RC_Rail_Standard.get(64L), 300, 30); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Osmiridium, 2L), (GT_Utility.getIntegratedCircuit(10)), ItemList.RC_Rail_Standard.get(64L), 300, 30); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Obsidian, 24L), (GT_Utility.getIntegratedCircuit(11)), ItemList.RC_Rail_Reinforced.get(64L), 600, 30); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.StainlessSteel, 12L), (GT_Utility.getIntegratedCircuit(11)), ItemList.RC_Rail_Reinforced.get(64L), 600, 30); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.TungstenSteel, 6L), (GT_Utility.getIntegratedCircuit(11)), ItemList.RC_Rail_Reinforced.get(64L), 600, 30); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iridium, 3L), (GT_Utility.getIntegratedCircuit(11)), ItemList.RC_Rail_Reinforced.get(64L), 600, 30); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Osmium, 1L), (GT_Utility.getIntegratedCircuit(11)), ItemList.RC_Rail_Reinforced.get(64L), 600, 30); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Aluminium, 20L), (GT_Utility.getIntegratedCircuit(12)), ItemList.RC_Rebar.get(64L), 200, 15); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iron, 48L), (GT_Utility.getIntegratedCircuit(12)), ItemList.RC_Rebar.get(64L), 200, 15); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.WroughtIron, 24L), (GT_Utility.getIntegratedCircuit(12)), ItemList.RC_Rebar.get(64L), 200, 15); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Bronze, 32L), (GT_Utility.getIntegratedCircuit(12)), ItemList.RC_Rebar.get(64L), 200, 15); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 16L), (GT_Utility.getIntegratedCircuit(12)), ItemList.RC_Rebar.get(64L), 200, 15); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.StainlessSteel, 12L), (GT_Utility.getIntegratedCircuit(12)), ItemList.RC_Rebar.get(64L), 200, 15); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Titanium, 8), (GT_Utility.getIntegratedCircuit(12)), ItemList.RC_Rebar.get(64L), 200, 15); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.TungstenSteel, 6L), (GT_Utility.getIntegratedCircuit(12)), ItemList.RC_Rebar.get(64L), 200, 15); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iridium, 4L), (GT_Utility.getIntegratedCircuit(12)), ItemList.RC_Rebar.get(64L), 200, 15); - GT_Values.RA.addBenderRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Osmium, 2L), (GT_Utility.getIntegratedCircuit(12)), ItemList.RC_Rebar.get(64L), 200, 15); - - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tin, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 1L), Materials.Glass.getMolten(864L), GT_Values.NF, GT_ModHandler.getModItem(MOD_ID_RC, "tile.railcraft.glass", 6L), 50); - - GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.log, Materials.Wood, 1L), Materials.Creosote.getFluid(100L), GT_ModHandler.getModItem(MOD_ID_RC, "cube", 1L, 8), GT_Values.NI, GT_Values.NI, null, 100, 4); - - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Anvil.get(0L), Materials.Steel.getMolten(4464L), GT_ModHandler.getModItem(MOD_ID_RC, "tile.railcraft.anvil", 1L, 0), 128, 16); - - GT_ModHandler.addPulverisationRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "cube.crushed.obsidian", 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Obsidian, 1L), GT_Values.NI, 0, true); - //recycling RC Tanks - //Iron - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 0), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 2L)}, new int[]{10000}, 300, 2); - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 1), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L)}, new int[]{10000, 10000}, 300, 2); - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 2), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bronze, 12L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Iron, 3L)}, new int[]{10000, 10000}, 300, 2); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 0), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iron,2L)},null,150,90); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 1), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iron,1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny,Materials.Glass, 3)},null,150,90); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 2), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Bronze,12L), GT_OreDictUnificator.get(OrePrefixes.nugget,Materials.Iron, 6)},null,150,90); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 0), GT_Values.NI, Materials.Iron.getMolten(288), 10000, 300, 60); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 1), GT_Values.NI, Materials.Iron.getMolten(144), 10000, 300, 60); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 2), GT_OreDictUnificator.get(OrePrefixes.nugget,Materials.Iron, 6), Materials.Bronze.getMolten(1728), 10000, 300, 60); - //Steel - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 13), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 2L)}, new int[]{10000}, 300, 2); - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 14), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L)}, new int[]{10000, 10000}, 300, 2); - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 15), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 12L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Steel, 3L)}, new int[]{10000}, 300, 2); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 13), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel,2L)},null,180,120); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 14), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel,1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny,Materials.Glass, 3)},null,180,120); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 15), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel,12L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Steel,6L)},null,180,120); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 13), GT_Values.NI, Materials.Steel.getMolten(288), 10000, 400, 90); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 14), GT_Values.NI, Materials.Steel.getMolten(144), 10000, 400, 90); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 15), GT_Values.NI, Materials.Steel.getMolten(1836), 10000, 400, 90); - //Aluminium - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 0), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 2L)}, new int[]{10000}, 450, 8); - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 1), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L)}, new int[]{10000, 10000}, 450, 8); - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 2), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 12L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Aluminium, 3L)}, new int[]{10000, 10000}, 450, 8); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 0), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Aluminium,2L)},null,210,150); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 1), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.nugget,Materials.Aluminium, 3)},null,210,150); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 2), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash,12L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Aluminium,6L)},null,210,150); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 0), GT_Values.NI, Materials.Aluminium.getMolten(288), 10000, 500, 120); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 1), GT_Values.NI, Materials.Aluminium.getMolten(144), 10000, 500, 120); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 2), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash,12L), Materials.Aluminium.getMolten(108L), 10000, 500, 120); - //Stainless Steel - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 3), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.StainlessSteel, 2L)}, new int[]{10000}, 600, 16); - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 4), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.StainlessSteel, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L)}, new int[]{10000, 10000}, 600, 16); - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 5), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.StainlessSteel, 12L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.StainlessSteel, 3L)}, new int[]{10000}, 600, 16); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 3), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.StainlessSteel,2L)},null,240,180); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 4), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.StainlessSteel,1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny,Materials.Glass, 3)},null,240,180); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 5), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.StainlessSteel,12L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.StainlessSteel, 6L)},null,240,180); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 3), GT_Values.NI, Materials.StainlessSteel.getMolten(288), 10000, 600, 180); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 4), GT_Values.NI, Materials.StainlessSteel.getMolten(144), 10000, 600, 180); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 5), GT_Values.NI, Materials.StainlessSteel.getMolten(1836), 10000, 600, 180); - //Titanium - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 6), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Titanium, 2L)}, new int[]{10000}, 600, 30); - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 7), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Titanium, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L)}, new int[]{10000, 10000}, 600, 30); - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 8), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Titanium, 12L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Titanium, 3L)}, new int[]{10000}, 600, 30); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 6), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Titanium,2L)},null,270,210); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 7), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Titanium,1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny,Materials.Glass, 3)},null,270,210); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 8), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Titanium,12L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Titanium, 6L)},null,270,210); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 6), GT_Values.NI, Materials.Titanium.getMolten(288), 10000, 700, 240); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 7), GT_Values.NI, Materials.Titanium.getMolten(144), 10000, 700, 240); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 8), GT_Values.NI, Materials.Titanium.getMolten(1836), 10000, 700, 240); - //Tungesten Steel - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 9), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 2L)}, new int[]{10000}, 600, 30); - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 10), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L)}, new int[]{10000, 10000}, 600, 30); - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 11), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 12L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.TungstenSteel, 3L)}, new int[]{10000}, 600, 30); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 9), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.TungstenSteel,2L)},null,300,240); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 10), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.TungstenSteel,1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny,Materials.Glass, 3)},null,300,240); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 11), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.TungstenSteel,12L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.TungstenSteel, 6L)},null,300,240); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 9), GT_Values.NI, Materials.TungstenSteel.getMolten(288), 10000, 800, 360); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 10), GT_Values.NI, Materials.TungstenSteel.getMolten(144), 10000, 800, 360); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 11), GT_Values.NI, Materials.TungstenSteel.getMolten(1836), 10000, 800, 360); - //Palladium - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 12), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Palladium, 2L)}, new int[]{10000}, 750, 64); - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 13), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Palladium, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L)}, new int[]{10000, 10000}, 750, 64); - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 14), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NiobiumTitanium, 12L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Chrome, 3L)}, new int[]{10000, 10000}, 750, 64); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 12), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Palladium,2L)},null,330,270); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 13), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Palladium,1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny,Materials.Glass, 3)},null,330,270); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 14), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.NiobiumTitanium,12L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Chrome, 6L)},null,330,270); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 12), GT_Values.NI, Materials.Palladium.getMolten(288), 10000, 900, 480); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 13), GT_Values.NI, Materials.Palladium.getMolten(144), 10000, 900, 480); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 14), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Chrome,6L), Materials.NiobiumTitanium.getMolten(1728), 10000, 900, 480); - //Iridium - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 0), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iridium, 2L)}, new int[]{10000}, 900, 120); - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 1), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iridium, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L)}, new int[]{10000, 10000}, 900, 120); - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 2), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Enderium, 12L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Iridium, 3L)}, new int[]{10000, 10000}, 900, 120); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 0), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iridium,2L)},null,360,300); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 1), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iridium,1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny,Materials.Glass, 3)},null,360,300); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 2), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Enderium,12L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Iridium, 6L)},null,360,300); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 0), GT_Values.NI, Materials.Iridium.getMolten(288), 10000, 1000, 720); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 1), GT_Values.NI, Materials.Iridium.getMolten(144), 10000, 1000, 720); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 2), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Iridium,6L), Materials.Enderium.getMolten(1728), 10000, 1000, 720); - //Osmium - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 3), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Osmium, 2L)}, new int[]{10000}, 1050, 256); - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 4), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Osmium, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L)}, new int[]{10000, 10000}, 1050, 256); - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 5), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 12L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Osmium, 3L)}, new int[]{10000, 10000}, 1050, 256); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 3), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Osmium,2L)},null,360,330); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 4), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Osmium,1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny,Materials.Glass, 3)},null,360,330); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 5), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Naquadah,12L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Osmium, 6L)},null,360,330); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 3), GT_Values.NI, Materials.Osmium.getMolten(288), 10000, 1100, 960); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 4), GT_Values.NI, Materials.Osmium.getMolten(144), 10000, 1100, 960); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 5), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Osmium,6L), Materials.Naquadah.getMolten(1728), 10000, 1100, 960); - //Neutronium - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 6), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Neutronium, 2L)}, new int[]{10000}, 1200, 480); - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 7), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Neutronium, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L)}, new int[]{10000, 10000}, 1200, 480); - GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 8), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Neutronium, 12L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Neutronium, 3L)}, new int[]{10000}, 1200, 480); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 6), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Neutronium,2L)},null,360,360); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 7), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Neutronium,1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny,Materials.Glass, 3)},null,360,360); - GT_Values.RA.addArcFurnaceRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 8), new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Neutronium,12L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Neutronium, 6L)},null,360,360); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 6), GT_Values.NI, Materials.Neutronium.getMolten(288), 10000, 1200, 1440); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 7), GT_Values.NI, Materials.Neutronium.getMolten(144), 10000, 1200, 1440); - GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 8), GT_Values.NI, Materials.Neutronium.getMolten(1836), 10000, 1200, 1440); - - GT_Values.RA.addPyrolyseRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 16), GT_Values.NF, 1, RailcraftToolItems.getCoalCoke(16), Materials.Creosote.getFluid(8000), 640, 64); - GT_Values.RA.addPyrolyseRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 16), Materials.Nitrogen.getGas(1000), 2, RailcraftToolItems.getCoalCoke(16), Materials.Creosote.getFluid(8000), 320, 96); - GT_Values.RA.addPyrolyseRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Coal, 8), GT_Values.NF, 1, EnumCube.COKE_BLOCK.getItem(8), Materials.Creosote.getFluid(32000), 2560, 64); - GT_Values.RA.addPyrolyseRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Coal, 8), Materials.Nitrogen.getGas(1000), 2, EnumCube.COKE_BLOCK.getItem(8), Materials.Creosote.getFluid(32000), 1280, 96); - - GT_Values.RA.addMixerRecipe(EnumCube.COKE_BLOCK.getItem(), ItemList.SFMixture.get(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.NitroFuel.getFluid(300), null, ItemList.Block_SSFUEL.get(1), 100, 250); - GT_Values.RA.addMixerRecipe(EnumCube.COKE_BLOCK.getItem(), ItemList.SFMixture.get(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.GasolinePremium.getFluid(120), null, ItemList.Block_SSFUEL.get(1), 100, 250); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.piston, 1, 0), + ItemList.FR_Casing_Sturdy.get(1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Lapis, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + Materials.SeedOil.getFluid(250L), + GT_ModHandler.getModItem(MOD_ID_DC, "item.EngineCore", 1L, 0), + 100, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + new ItemStack(Blocks.piston, 1, 0), + ItemList.FR_Casing_Sturdy.get(1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Lapis, 1L), + GT_Utility.getIntegratedCircuit(1) + }, + Materials.Lubricant.getFluid(125L), + GT_ModHandler.getModItem(MOD_ID_DC, "item.EngineCore", 1L, 0), + 100, + 16); + + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_ModHandler.getModItem("ExtraUtilities", "trashcan", 1L, 0), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Obsidian, 4L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 11), + 200, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_ModHandler.getModItem(MOD_ID_DC, "item.EngineCore", 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.AnyCopper, 10L), + GT_Utility.getIntegratedCircuit(10) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 7), + 200, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_ModHandler.getModItem(MOD_ID_DC, "item.EngineCore", 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 10L), + GT_Utility.getIntegratedCircuit(10) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 8), + 200, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_ModHandler.getModItem(MOD_ID_DC, "item.EngineCore", 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 10L), + GT_Utility.getIntegratedCircuit(10) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 9), + 200, + 16); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Gold, 2L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Diamond, 4L), + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderPearl, 1L), + GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Obsidian, 2L), + GT_Utility.getIntegratedCircuit(1) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.alpha", 1, 0), + 600, + 480); + + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.AnyIron, 2L), + GT_Utility.getIntegratedCircuit(20), + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 0), + 600, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.AnyIron, 2L), + new ItemStack(Blocks.glass_pane, 2, 0), + GT_Utility.getIntegratedCircuit(21) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 2L, 1), + 800, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.AnyIron, 2L), + GT_ModHandler.getModItem("TConstruct", "GlassPane", 2L, 0), + GT_Utility.getIntegratedCircuit(21) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 2L, 1), + 800, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Bronze, 2L), + new ItemStack(Blocks.iron_bars, 2, 0), + GT_Utility.getIntegratedCircuit(22) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 2), + 800, + 30); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 2L), + GT_Utility.getIntegratedCircuit(20) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 13), + 200, + 64); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 2L), + new ItemStack(Blocks.glass_pane, 2, 0), + GT_Utility.getIntegratedCircuit(21) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 2L, 14), + 400, + 64); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Steel, 2L), + GT_ModHandler.getModItem("TConstruct", "GlassPane", 2L, 0), + GT_Utility.getIntegratedCircuit(21) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 2L, 14), + 400, + 64); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Steel, 2L), + GT_ModHandler.getModItem(MOD_ID_DC, "item.SteelBars", 2L), + GT_Utility.getIntegratedCircuit(22) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 15), + 400, + 64); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 2L), + GT_Utility.getIntegratedCircuit(20), + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 0), + 600, + 120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 2L), + new ItemStack(Blocks.glass_pane, 2, 0), + GT_Utility.getIntegratedCircuit(21) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 2L, 1), + 800, + 120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 2L), + GT_ModHandler.getModItem("TConstruct", "GlassPane", 2L, 0), + GT_Utility.getIntegratedCircuit(21) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 2L, 1), + 800, + 120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Plastic, 2L), + GT_ModHandler.getModItem(MOD_ID_DC, "item.AluminiumBars", 2L), + GT_Utility.getIntegratedCircuit(22) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 2), + 800, + 120); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 2L), + GT_Utility.getIntegratedCircuit(20) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 3), + 200, + 256); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 2L), + new ItemStack(Blocks.glass_pane, 2, 0), + GT_Utility.getIntegratedCircuit(21) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 2L, 4), + 400, + 256); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 2L), + GT_ModHandler.getModItem("TConstruct", "GlassPane", 2L, 0), + GT_Utility.getIntegratedCircuit(21) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 2L, 4), + 400, + 256); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.StainlessSteel, 2L), + GT_ModHandler.getModItem(MOD_ID_DC, "item.StainlessSteelBars", 2L), + GT_Utility.getIntegratedCircuit(22) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 5), + 400, + 256); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 2L), + GT_Utility.getIntegratedCircuit(20), + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 6), + 600, + 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 2L), + new ItemStack(Blocks.glass_pane, 2, 0), + GT_Utility.getIntegratedCircuit(21) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 2L, 7), + 800, + 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 2L), + GT_ModHandler.getModItem("TConstruct", "GlassPane", 2L, 0), + GT_Utility.getIntegratedCircuit(21) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 2L, 7), + 800, + 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Titanium, 2L), + GT_ModHandler.getModItem(MOD_ID_DC, "item.TitaniumBars", 2L), + GT_Utility.getIntegratedCircuit(22) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 8), + 800, + 480); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 2L), + GT_Utility.getIntegratedCircuit(20) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 9), + 200, + 960); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 2L), + new ItemStack(Blocks.glass_pane, 2, 0), + GT_Utility.getIntegratedCircuit(21) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 2L, 10), + 400, + 960); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 2L), + GT_ModHandler.getModItem("TConstruct", "GlassPane", 2L, 0), + GT_Utility.getIntegratedCircuit(21) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 2L, 10), + 400, + 960); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.TungstenSteel, 2L), + GT_ModHandler.getModItem(MOD_ID_DC, "item.TungstenSteelBars", 2L), + GT_Utility.getIntegratedCircuit(22) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 11), + 400, + 960); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Palladium, 2L), + GT_Utility.getIntegratedCircuit(20), + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 12), + 600, + 1920); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Palladium, 2L), + new ItemStack(Blocks.glass_pane, 2, 0), + GT_Utility.getIntegratedCircuit(21) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 2L, 13), + 800, + 1920); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Palladium, 2L), + GT_ModHandler.getModItem("TConstruct", "GlassPane", 2L, 0), + GT_Utility.getIntegratedCircuit(21) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 2L, 13), + 800, + 1920); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.NiobiumTitanium, 2L), + GT_ModHandler.getModItem(MOD_ID_DC, "item.ChromeBars", 2L), + GT_Utility.getIntegratedCircuit(22) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 14), + 800, + 1920); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 2L), + GT_Utility.getIntegratedCircuit(20) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 0), + 200, + 4096); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 2L), + new ItemStack(Blocks.glass_pane, 2, 0), + GT_Utility.getIntegratedCircuit(21) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 2L, 1), + 400, + 4096); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 2L), + GT_ModHandler.getModItem("TConstruct", "GlassPane", 2L, 0), + GT_Utility.getIntegratedCircuit(21) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 2L, 1), + 400, + 4096); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Enderium, 2L), + GT_ModHandler.getModItem(MOD_ID_DC, "item.IridiumBars", 2L), + GT_Utility.getIntegratedCircuit(22) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 2), + 400, + 4096); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 2L), + GT_Utility.getIntegratedCircuit(20), + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 3), + 600, + 7680); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 2L), + new ItemStack(Blocks.glass_pane, 2, 0), + GT_Utility.getIntegratedCircuit(21) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 2L, 4), + 800, + 7680); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 2L), + GT_ModHandler.getModItem("TConstruct", "GlassPane", 2L, 0), + GT_Utility.getIntegratedCircuit(21) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 2L, 4), + 800, + 7680); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Naquadah, 2L), + GT_ModHandler.getModItem(MOD_ID_DC, "item.OsmiumBars", 2L), + GT_Utility.getIntegratedCircuit(22) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 5), + 800, + 7680); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 2L), + GT_Utility.getIntegratedCircuit(20) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 6), + 200, + 30720); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 2L), + new ItemStack(Blocks.glass_pane, 2, 0), + GT_Utility.getIntegratedCircuit(21) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 2L, 7), + 400, + 30720); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 2L), + GT_ModHandler.getModItem("TConstruct", "GlassPane", 2L, 0), + GT_Utility.getIntegratedCircuit(21) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 2L, 7), + 400, + 30720); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Neutronium, 2L), + GT_ModHandler.getModItem(MOD_ID_DC, "item.NeutroniumBars", 2L), + GT_Utility.getIntegratedCircuit(22) + }, + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 8), + 400, + 30720); + // Water Tank + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iron, 1L), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Wood, 2L) + }, + Materials.Glue.getFluid(36L), + GT_ModHandler.getModItem(MOD_ID_RC, "machine.alpha", 1L, 14), + 200, + 8, + false); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.IronMagnetic, 1L), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Wood, 2L) + }, + Materials.Glue.getFluid(36L), + GT_ModHandler.getModItem(MOD_ID_RC, "machine.alpha", 1L, 14), + 200, + 8, + false); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.WroughtIron, 1L), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Wood, 2L) + }, + Materials.Glue.getFluid(36L), + GT_ModHandler.getModItem(MOD_ID_RC, "machine.alpha", 1L, 14), + 200, + 8, + false); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Steel, 4L), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Wood, 4L) + }, + Materials.Glue.getFluid(72L), + GT_ModHandler.getModItem(MOD_ID_RC, "machine.alpha", 3L, 14), + 400, + 30, + false); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Steel, 2L), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.WoodSealed, 1L) + }, + Materials.Plastic.getMolten(36L), + GT_ModHandler.getModItem(MOD_ID_RC, "machine.alpha", 3L, 14), + 400, + 30, + false); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.StainlessSteel, 4L), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.WoodSealed, 4L) + }, + Materials.Plastic.getMolten(72L), + GT_ModHandler.getModItem(MOD_ID_RC, "machine.alpha", 9L, 14), + 400, + 120, + false); + // Steam Boilers + GT_Values.RA.addAssemblerRecipe( + ItemList.IC2_Item_Casing_Iron.get(6L), + GT_Utility.getIntegratedCircuit(6), + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 3), + 400, + 30); + GT_Values.RA.addAssemblerRecipe( + ItemList.IC2_Item_Casing_Steel.get(6L), + GT_Utility.getIntegratedCircuit(6), + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 4), + 400, + 64); + + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Aluminium, 20L), + (GT_Utility.getIntegratedCircuit(10)), + ItemList.RC_Rail_Standard.get(64L), + 300, + 30); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iron, 48L), + (GT_Utility.getIntegratedCircuit(10)), + ItemList.RC_Rail_Standard.get(64L), + 300, + 30); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.WroughtIron, 32L), + (GT_Utility.getIntegratedCircuit(10)), + ItemList.RC_Rail_Standard.get(64L), + 300, + 30); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Bronze, 32L), + (GT_Utility.getIntegratedCircuit(10)), + ItemList.RC_Rail_Standard.get(64L), + 300, + 30); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 24L), + (GT_Utility.getIntegratedCircuit(10)), + ItemList.RC_Rail_Standard.get(64L), + 300, + 30); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.StainlessSteel, 16L), + (GT_Utility.getIntegratedCircuit(10)), + ItemList.RC_Rail_Standard.get(64L), + 300, + 30); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Titanium, 12L), + (GT_Utility.getIntegratedCircuit(10)), + ItemList.RC_Rail_Standard.get(64L), + 300, + 30); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.TungstenSteel, 9L), + (GT_Utility.getIntegratedCircuit(10)), + ItemList.RC_Rail_Standard.get(64L), + 300, + 30); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iridium, 6L), + (GT_Utility.getIntegratedCircuit(10)), + ItemList.RC_Rail_Standard.get(64L), + 300, + 30); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Osmium, 3L), + (GT_Utility.getIntegratedCircuit(10)), + ItemList.RC_Rail_Standard.get(64L), + 300, + 30); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Osmiridium, 2L), + (GT_Utility.getIntegratedCircuit(10)), + ItemList.RC_Rail_Standard.get(64L), + 300, + 30); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Obsidian, 24L), + (GT_Utility.getIntegratedCircuit(11)), + ItemList.RC_Rail_Reinforced.get(64L), + 600, + 30); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.StainlessSteel, 12L), + (GT_Utility.getIntegratedCircuit(11)), + ItemList.RC_Rail_Reinforced.get(64L), + 600, + 30); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.TungstenSteel, 6L), + (GT_Utility.getIntegratedCircuit(11)), + ItemList.RC_Rail_Reinforced.get(64L), + 600, + 30); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iridium, 3L), + (GT_Utility.getIntegratedCircuit(11)), + ItemList.RC_Rail_Reinforced.get(64L), + 600, + 30); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Osmium, 1L), + (GT_Utility.getIntegratedCircuit(11)), + ItemList.RC_Rail_Reinforced.get(64L), + 600, + 30); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Aluminium, 20L), + (GT_Utility.getIntegratedCircuit(12)), + ItemList.RC_Rebar.get(64L), + 200, + 15); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iron, 48L), + (GT_Utility.getIntegratedCircuit(12)), + ItemList.RC_Rebar.get(64L), + 200, + 15); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.WroughtIron, 24L), + (GT_Utility.getIntegratedCircuit(12)), + ItemList.RC_Rebar.get(64L), + 200, + 15); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Bronze, 32L), + (GT_Utility.getIntegratedCircuit(12)), + ItemList.RC_Rebar.get(64L), + 200, + 15); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 16L), + (GT_Utility.getIntegratedCircuit(12)), + ItemList.RC_Rebar.get(64L), + 200, + 15); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.StainlessSteel, 12L), + (GT_Utility.getIntegratedCircuit(12)), + ItemList.RC_Rebar.get(64L), + 200, + 15); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Titanium, 8), + (GT_Utility.getIntegratedCircuit(12)), + ItemList.RC_Rebar.get(64L), + 200, + 15); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.TungstenSteel, 6L), + (GT_Utility.getIntegratedCircuit(12)), + ItemList.RC_Rebar.get(64L), + 200, + 15); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iridium, 4L), + (GT_Utility.getIntegratedCircuit(12)), + ItemList.RC_Rebar.get(64L), + 200, + 15); + GT_Values.RA.addBenderRecipe( + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Osmium, 2L), + (GT_Utility.getIntegratedCircuit(12)), + ItemList.RC_Rebar.get(64L), + 200, + 15); + + GT_Values.RA.addChemicalRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tin, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 1L), + Materials.Glass.getMolten(864L), + GT_Values.NF, + GT_ModHandler.getModItem(MOD_ID_RC, "tile.railcraft.glass", 6L), + 50); + + GT_Values.RA.addChemicalBathRecipe( + GT_OreDictUnificator.get(OrePrefixes.log, Materials.Wood, 1L), + Materials.Creosote.getFluid(100L), + GT_ModHandler.getModItem(MOD_ID_RC, "cube", 1L, 8), + GT_Values.NI, + GT_Values.NI, + null, + 100, + 4); + + GT_Values.RA.addFluidSolidifierRecipe( + ItemList.Shape_Mold_Anvil.get(0L), + Materials.Steel.getMolten(4464L), + GT_ModHandler.getModItem(MOD_ID_RC, "tile.railcraft.anvil", 1L, 0), + 128, + 16); + + GT_ModHandler.addPulverisationRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "cube.crushed.obsidian", 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Obsidian, 1L), + GT_Values.NI, + 0, + true); + // recycling RC Tanks + // Iron + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 0), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 2L)}, + new int[] {10000}, + 300, + 2); + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 1), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L) + }, + new int[] {10000, 10000}, + 300, + 2); + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 2), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bronze, 12L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Iron, 3L) + }, + new int[] {10000, 10000}, + 300, + 2); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 0), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iron, 2L)}, + null, + 150, + 90); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 1), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iron, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3) + }, + null, + 150, + 90); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 2), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Bronze, 12L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Iron, 6) + }, + null, + 150, + 90); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 0), + GT_Values.NI, + Materials.Iron.getMolten(288), + 10000, + 300, + 60); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 1), + GT_Values.NI, + Materials.Iron.getMolten(144), + 10000, + 300, + 60); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 2), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Iron, 6), + Materials.Bronze.getMolten(1728), + 10000, + 300, + 60); + // Steel + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 13), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 2L)}, + new int[] {10000}, + 300, + 2); + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 14), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L) + }, + new int[] {10000, 10000}, + 300, + 2); + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 15), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 12L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Steel, 3L) + }, + new int[] {10000}, + 300, + 2); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 13), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 2L)}, + null, + 180, + 120); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 14), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3) + }, + null, + 180, + 120); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 15), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 12L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Steel, 6L) + }, + null, + 180, + 120); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 13), + GT_Values.NI, + Materials.Steel.getMolten(288), + 10000, + 400, + 90); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 14), + GT_Values.NI, + Materials.Steel.getMolten(144), + 10000, + 400, + 90); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.beta", 1L, 15), + GT_Values.NI, + Materials.Steel.getMolten(1836), + 10000, + 400, + 90); + // Aluminium + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 0), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 2L)}, + new int[] {10000}, + 450, + 8); + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 1), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L) + }, + new int[] {10000, 10000}, + 450, + 8); + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 2), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 12L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Aluminium, 3L) + }, + new int[] {10000, 10000}, + 450, + 8); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 0), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Aluminium, 2L)}, + null, + 210, + 150); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 1), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Aluminium, 3)}, + null, + 210, + 150); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 2), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 12L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Aluminium, 6L) + }, + null, + 210, + 150); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 0), + GT_Values.NI, + Materials.Aluminium.getMolten(288), + 10000, + 500, + 120); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 1), + GT_Values.NI, + Materials.Aluminium.getMolten(144), + 10000, + 500, + 120); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 2), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 12L), + Materials.Aluminium.getMolten(108L), + 10000, + 500, + 120); + // Stainless Steel + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 3), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.StainlessSteel, 2L)}, + new int[] {10000}, + 600, + 16); + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 4), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.StainlessSteel, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L) + }, + new int[] {10000, 10000}, + 600, + 16); + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 5), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.StainlessSteel, 12L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.StainlessSteel, 3L) + }, + new int[] {10000}, + 600, + 16); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 3), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.StainlessSteel, 2L)}, + null, + 240, + 180); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 4), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.StainlessSteel, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3) + }, + null, + 240, + 180); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 5), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.StainlessSteel, 12L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.StainlessSteel, 6L) + }, + null, + 240, + 180); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 3), + GT_Values.NI, + Materials.StainlessSteel.getMolten(288), + 10000, + 600, + 180); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 4), + GT_Values.NI, + Materials.StainlessSteel.getMolten(144), + 10000, + 600, + 180); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 5), + GT_Values.NI, + Materials.StainlessSteel.getMolten(1836), + 10000, + 600, + 180); + // Titanium + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 6), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Titanium, 2L)}, + new int[] {10000}, + 600, + 30); + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 7), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Titanium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L) + }, + new int[] {10000, 10000}, + 600, + 30); + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 8), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Titanium, 12L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Titanium, 3L) + }, + new int[] {10000}, + 600, + 30); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 6), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Titanium, 2L)}, + null, + 270, + 210); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 7), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Titanium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3) + }, + null, + 270, + 210); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 8), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Titanium, 12L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Titanium, 6L) + }, + null, + 270, + 210); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 6), + GT_Values.NI, + Materials.Titanium.getMolten(288), + 10000, + 700, + 240); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 7), + GT_Values.NI, + Materials.Titanium.getMolten(144), + 10000, + 700, + 240); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 8), + GT_Values.NI, + Materials.Titanium.getMolten(1836), + 10000, + 700, + 240); + // Tungesten Steel + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 9), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 2L)}, + new int[] {10000}, + 600, + 30); + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 10), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L) + }, + new int[] {10000, 10000}, + 600, + 30); + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 11), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 12L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.TungstenSteel, 3L) + }, + new int[] {10000}, + 600, + 30); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 9), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.TungstenSteel, 2L)}, + null, + 300, + 240); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 10), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.TungstenSteel, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3) + }, + null, + 300, + 240); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 11), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.TungstenSteel, 12L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.TungstenSteel, 6L) + }, + null, + 300, + 240); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 9), + GT_Values.NI, + Materials.TungstenSteel.getMolten(288), + 10000, + 800, + 360); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 10), + GT_Values.NI, + Materials.TungstenSteel.getMolten(144), + 10000, + 800, + 360); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 11), + GT_Values.NI, + Materials.TungstenSteel.getMolten(1836), + 10000, + 800, + 360); + // Palladium + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 12), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Palladium, 2L)}, + new int[] {10000}, + 750, + 64); + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 13), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Palladium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L) + }, + new int[] {10000, 10000}, + 750, + 64); + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 14), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NiobiumTitanium, 12L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Chrome, 3L) + }, + new int[] {10000, 10000}, + 750, + 64); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 12), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Palladium, 2L)}, + null, + 330, + 270); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 13), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Palladium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3) + }, + null, + 330, + 270); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 14), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.NiobiumTitanium, 12L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Chrome, 6L) + }, + null, + 330, + 270); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 12), + GT_Values.NI, + Materials.Palladium.getMolten(288), + 10000, + 900, + 480); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 13), + GT_Values.NI, + Materials.Palladium.getMolten(144), + 10000, + 900, + 480); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.zeta", 1L, 14), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Chrome, 6L), + Materials.NiobiumTitanium.getMolten(1728), + 10000, + 900, + 480); + // Iridium + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 0), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iridium, 2L)}, + new int[] {10000}, + 900, + 120); + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 1), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iridium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L) + }, + new int[] {10000, 10000}, + 900, + 120); + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 2), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Enderium, 12L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Iridium, 3L) + }, + new int[] {10000, 10000}, + 900, + 120); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 0), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iridium, 2L)}, + null, + 360, + 300); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 1), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iridium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3) + }, + null, + 360, + 300); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 2), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Enderium, 12L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Iridium, 6L) + }, + null, + 360, + 300); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 0), + GT_Values.NI, + Materials.Iridium.getMolten(288), + 10000, + 1000, + 720); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 1), + GT_Values.NI, + Materials.Iridium.getMolten(144), + 10000, + 1000, + 720); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 2), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Iridium, 6L), + Materials.Enderium.getMolten(1728), + 10000, + 1000, + 720); + // Osmium + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 3), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Osmium, 2L)}, + new int[] {10000}, + 1050, + 256); + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 4), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Osmium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L) + }, + new int[] {10000, 10000}, + 1050, + 256); + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 5), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 12L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Osmium, 3L) + }, + new int[] {10000, 10000}, + 1050, + 256); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 3), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Osmium, 2L)}, + null, + 360, + 330); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 4), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Osmium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3) + }, + null, + 360, + 330); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 5), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Naquadah, 12L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Osmium, 6L) + }, + null, + 360, + 330); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 3), + GT_Values.NI, + Materials.Osmium.getMolten(288), + 10000, + 1100, + 960); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 4), + GT_Values.NI, + Materials.Osmium.getMolten(144), + 10000, + 1100, + 960); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 5), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Osmium, 6L), + Materials.Naquadah.getMolten(1728), + 10000, + 1100, + 960); + // Neutronium + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 6), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Neutronium, 2L)}, + new int[] {10000}, + 1200, + 480); + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 7), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Neutronium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L) + }, + new int[] {10000, 10000}, + 1200, + 480); + GT_Values.RA.addPulveriserRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 8), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Neutronium, 12L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Neutronium, 3L) + }, + new int[] {10000}, + 1200, + 480); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 6), + new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Neutronium, 2L)}, + null, + 360, + 360); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 7), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Neutronium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3) + }, + null, + 360, + 360); + GT_Values.RA.addArcFurnaceRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 8), + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Neutronium, 12L), + GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Neutronium, 6L) + }, + null, + 360, + 360); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 6), + GT_Values.NI, + Materials.Neutronium.getMolten(288), + 10000, + 1200, + 1440); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 7), + GT_Values.NI, + Materials.Neutronium.getMolten(144), + 10000, + 1200, + 1440); + GT_Values.RA.addFluidExtractionRecipe( + GT_ModHandler.getModItem(MOD_ID_RC, "machine.eta", 1L, 8), + GT_Values.NI, + Materials.Neutronium.getMolten(1836), + 10000, + 1200, + 1440); + + GT_Values.RA.addPyrolyseRecipe( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 16), + GT_Values.NF, + 1, + RailcraftToolItems.getCoalCoke(16), + Materials.Creosote.getFluid(8000), + 640, + 64); + GT_Values.RA.addPyrolyseRecipe( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 16), + Materials.Nitrogen.getGas(1000), + 2, + RailcraftToolItems.getCoalCoke(16), + Materials.Creosote.getFluid(8000), + 320, + 96); + GT_Values.RA.addPyrolyseRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Coal, 8), + GT_Values.NF, + 1, + EnumCube.COKE_BLOCK.getItem(8), + Materials.Creosote.getFluid(32000), + 2560, + 64); + GT_Values.RA.addPyrolyseRecipe( + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Coal, 8), + Materials.Nitrogen.getGas(1000), + 2, + EnumCube.COKE_BLOCK.getItem(8), + Materials.Creosote.getFluid(32000), + 1280, + 96); + + GT_Values.RA.addMixerRecipe( + EnumCube.COKE_BLOCK.getItem(), + ItemList.SFMixture.get(2), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.NitroFuel.getFluid(300), + null, + ItemList.Block_SSFUEL.get(1), + 100, + 250); + GT_Values.RA.addMixerRecipe( + EnumCube.COKE_BLOCK.getItem(), + ItemList.SFMixture.get(2), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.GasolinePremium.getFluid(120), + null, + ItemList.Block_SSFUEL.get(1), + 100, + 250); GT_Values.RA.addCompressorRecipe(RailcraftToolItems.getCoalCoke(9), EnumCube.COKE_BLOCK.getItem(), 300, 2); if (Loader.isModLoaded(MOD_ID_TC)) { - GT_Values.RA.addMixerRecipe(EnumCube.COKE_BLOCK.getItem(), ItemList.MSFMixture.get(2), GT_ModHandler.getModItem(MOD_ID_TC, "ItemResource", 4), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.NitroFuel.getFluid(300), null, ItemList.Block_MSSFUEL.get(1), 100, 600); - GT_Values.RA.addMixerRecipe(EnumCube.COKE_BLOCK.getItem(), ItemList.MSFMixture.get(2), GT_ModHandler.getModItem(MOD_ID_TC, "ItemResource", 4), GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), Materials.GasolinePremium.getFluid(120), null, ItemList.Block_MSSFUEL.get(1), 100, 600); + GT_Values.RA.addMixerRecipe( + EnumCube.COKE_BLOCK.getItem(), + ItemList.MSFMixture.get(2), + GT_ModHandler.getModItem(MOD_ID_TC, "ItemResource", 4), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.NitroFuel.getFluid(300), + null, + ItemList.Block_MSSFUEL.get(1), + 100, + 600); + GT_Values.RA.addMixerRecipe( + EnumCube.COKE_BLOCK.getItem(), + ItemList.MSFMixture.get(2), + GT_ModHandler.getModItem(MOD_ID_TC, "ItemResource", 4), + GT_Values.NI, + GT_Values.NI, + GT_Utility.getIntegratedCircuit(1), + Materials.GasolinePremium.getFluid(120), + null, + ItemList.Block_MSSFUEL.get(1), + 100, + 600); } } } 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()); } } diff --git a/src/main/java/gregtech/loaders/postload/GT_ProcessingArrayRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_ProcessingArrayRecipeLoader.java index 71dda61bca..c9564dcd4a 100644 --- a/src/main/java/gregtech/loaders/postload/GT_ProcessingArrayRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_ProcessingArrayRecipeLoader.java @@ -1,99 +1,103 @@ package gregtech.loaders.postload; import gregtech.api.util.GT_ProcessingArray_Manager; -import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; public class GT_ProcessingArrayRecipeLoader { public static void registerDefaultGregtechMaps() { - //Alloy Smelter - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.alloysmelter",GT_Recipe_Map.sAlloySmelterRecipes); - //Arc Furnace - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.arcfurnace",GT_Recipe_Map.sArcFurnaceRecipes); - //Assembler - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.assembler",GT_Recipe_Map.sAssemblerRecipes); - //Autoclave - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.autoclave",GT_Recipe_Map.sAutoclaveRecipes); - //Bender - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.bender",GT_Recipe_Map.sBenderRecipes); - //Boxinator - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.boxinator",GT_Recipe_Map.sBoxinatorRecipes); - //Brewery - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.brewery",GT_Recipe_Map.sBrewingRecipes); - //Canner - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.canner",GT_Recipe_Map.sCannerRecipes); - //Centrifuge - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.centrifuge",GT_Recipe_Map.sCentrifugeRecipes); - //Chemical Bath - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.chemicalbath",GT_Recipe_Map.sChemicalBathRecipes); - //Chemical Reactor - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.chemicalreactor",GT_Recipe_Map.sChemicalRecipes); - //Circuit Assembler - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.circuitassembler",GT_Recipe_Map.sCircuitAssemblerRecipes); - //Compressor - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.compressor",GT_Recipe_Map.sCompressorRecipes); - //Cutting Machine - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.cutter",GT_Recipe_Map.sCutterRecipes); - //Distillery - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.distillery",GT_Recipe_Map.sDistilleryRecipes); - //Electrolyzer - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.electrolyzer",GT_Recipe_Map.sElectrolyzerRecipes); - //Extractor - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.extractor",GT_Recipe_Map.sExtractorRecipes); - //Extruder - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.extruder",GT_Recipe_Map.sExtruderRecipes); - //Fermenter - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.fermenter",GT_Recipe_Map.sFermentingRecipes); - //Fluid Canner - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.fluidcanner",GT_Recipe_Map.sFluidCannerRecipes); - //Fluid Extractor - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.fluidextractor",GT_Recipe_Map.sFluidExtractionRecipes); - //Fluid Heater - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.fluidheater",GT_Recipe_Map.sFluidHeaterRecipes); - //Fluid Solidifier - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.fluidsolidifier",GT_Recipe_Map.sFluidSolidficationRecipes); - //Forge Hammer - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.hammer",GT_Recipe_Map.sHammerRecipes); - //Forming Press - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.press",GT_Recipe_Map.sPressRecipes); - //Laser Engraver - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.laserengraver",GT_Recipe_Map.sLaserEngraverRecipes); - //Lathe - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.lathe",GT_Recipe_Map.sLatheRecipes); - //Macerator - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.macerator",GT_Recipe_Map.sMaceratorRecipes); - //Magnetic Separator - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.electromagneticseparator",GT_Recipe_Map.sElectroMagneticSeparatorRecipes); - //Matter Amplifier - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.amplifab",GT_Recipe_Map.sAmplifiers); - //Microwave - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.microwave",GT_Recipe_Map.sMicrowaveRecipes); - //Mixer - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.mixer",GT_Recipe_Map.sMixerRecipes); - //Ore Washer - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.orewasher",GT_Recipe_Map.sOreWasherRecipes); - //Plasma Arc Furnace - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.plasmaarcfurnace",GT_Recipe_Map.sPlasmaArcFurnaceRecipes); - //Polarizer - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.polarizer",GT_Recipe_Map.sPolarizerRecipes); - //Printer - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.printer",GT_Recipe_Map.sPrinterRecipes); - //Recycler - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.recycler",GT_Recipe_Map.sRecyclerRecipes); - //Scanner - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.scanner",GT_Recipe_Map.sScannerFakeRecipes); - //Sifter - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.sifter",GT_Recipe_Map.sSifterRecipes); - //Slicer - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.slicer",GT_Recipe_Map.sSlicerRecipes); - //Thermal Centrifuge - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.thermalcentrifuge",GT_Recipe_Map.sThermalCentrifugeRecipes); - //Unboxinator - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.unboxinator",GT_Recipe_Map.sUnboxinatorRecipes); - //Wiremill - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.wiremill",GT_Recipe_Map.sWiremillRecipes); - + // Alloy Smelter + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.alloysmelter", GT_Recipe_Map.sAlloySmelterRecipes); + // Arc Furnace + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.arcfurnace", GT_Recipe_Map.sArcFurnaceRecipes); + // Assembler + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.assembler", GT_Recipe_Map.sAssemblerRecipes); + // Autoclave + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.autoclave", GT_Recipe_Map.sAutoclaveRecipes); + // Bender + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.bender", GT_Recipe_Map.sBenderRecipes); + // Boxinator + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.boxinator", GT_Recipe_Map.sBoxinatorRecipes); + // Brewery + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.brewery", GT_Recipe_Map.sBrewingRecipes); + // Canner + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.canner", GT_Recipe_Map.sCannerRecipes); + // Centrifuge + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.centrifuge", GT_Recipe_Map.sCentrifugeRecipes); + // Chemical Bath + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.chemicalbath", GT_Recipe_Map.sChemicalBathRecipes); + // Chemical Reactor + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.chemicalreactor", GT_Recipe_Map.sChemicalRecipes); + // Circuit Assembler + GT_ProcessingArray_Manager.addRecipeMapToPA( + "basicmachine.circuitassembler", GT_Recipe_Map.sCircuitAssemblerRecipes); + // Compressor + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.compressor", GT_Recipe_Map.sCompressorRecipes); + // Cutting Machine + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.cutter", GT_Recipe_Map.sCutterRecipes); + // Distillery + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.distillery", GT_Recipe_Map.sDistilleryRecipes); + // Electrolyzer + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.electrolyzer", GT_Recipe_Map.sElectrolyzerRecipes); + // Extractor + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.extractor", GT_Recipe_Map.sExtractorRecipes); + // Extruder + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.extruder", GT_Recipe_Map.sExtruderRecipes); + // Fermenter + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.fermenter", GT_Recipe_Map.sFermentingRecipes); + // Fluid Canner + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.fluidcanner", GT_Recipe_Map.sFluidCannerRecipes); + // Fluid Extractor + GT_ProcessingArray_Manager.addRecipeMapToPA( + "basicmachine.fluidextractor", GT_Recipe_Map.sFluidExtractionRecipes); + // Fluid Heater + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.fluidheater", GT_Recipe_Map.sFluidHeaterRecipes); + // Fluid Solidifier + GT_ProcessingArray_Manager.addRecipeMapToPA( + "basicmachine.fluidsolidifier", GT_Recipe_Map.sFluidSolidficationRecipes); + // Forge Hammer + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.hammer", GT_Recipe_Map.sHammerRecipes); + // Forming Press + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.press", GT_Recipe_Map.sPressRecipes); + // Laser Engraver + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.laserengraver", GT_Recipe_Map.sLaserEngraverRecipes); + // Lathe + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.lathe", GT_Recipe_Map.sLatheRecipes); + // Macerator + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.macerator", GT_Recipe_Map.sMaceratorRecipes); + // Magnetic Separator + GT_ProcessingArray_Manager.addRecipeMapToPA( + "basicmachine.electromagneticseparator", GT_Recipe_Map.sElectroMagneticSeparatorRecipes); + // Matter Amplifier + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.amplifab", GT_Recipe_Map.sAmplifiers); + // Microwave + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.microwave", GT_Recipe_Map.sMicrowaveRecipes); + // Mixer + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.mixer", GT_Recipe_Map.sMixerRecipes); + // Ore Washer + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.orewasher", GT_Recipe_Map.sOreWasherRecipes); + // Plasma Arc Furnace + GT_ProcessingArray_Manager.addRecipeMapToPA( + "basicmachine.plasmaarcfurnace", GT_Recipe_Map.sPlasmaArcFurnaceRecipes); + // Polarizer + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.polarizer", GT_Recipe_Map.sPolarizerRecipes); + // Printer + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.printer", GT_Recipe_Map.sPrinterRecipes); + // Recycler + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.recycler", GT_Recipe_Map.sRecyclerRecipes); + // Scanner + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.scanner", GT_Recipe_Map.sScannerFakeRecipes); + // Sifter + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.sifter", GT_Recipe_Map.sSifterRecipes); + // Slicer + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.slicer", GT_Recipe_Map.sSlicerRecipes); + // Thermal Centrifuge + GT_ProcessingArray_Manager.addRecipeMapToPA( + "basicmachine.thermalcentrifuge", GT_Recipe_Map.sThermalCentrifugeRecipes); + // Unboxinator + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.unboxinator", GT_Recipe_Map.sUnboxinatorRecipes); + // Wiremill + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.wiremill", GT_Recipe_Map.sWiremillRecipes); } } diff --git a/src/main/java/gregtech/loaders/postload/GT_RecyclerBlacklistLoader.java b/src/main/java/gregtech/loaders/postload/GT_RecyclerBlacklistLoader.java index 18a453d61c..2a96ccbf25 100644 --- a/src/main/java/gregtech/loaders/postload/GT_RecyclerBlacklistLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_RecyclerBlacklistLoader.java @@ -9,8 +9,7 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -public class GT_RecyclerBlacklistLoader - implements Runnable { +public class GT_RecyclerBlacklistLoader implements Runnable { @Override public void run() { GT_Log.out.println("GT_Mod: Adding Stuff to the Recycler Blacklist."); @@ -19,20 +18,18 @@ public class GT_RecyclerBlacklistLoader GT_ModHandler.addToRecyclerBlackList(new ItemStack(Items.bone, 1, 0)); GT_ModHandler.addToRecyclerBlackList(ItemList.Dye_Bonemeal.get(1L)); - GT_ModHandler.addToRecyclerBlackList(new ItemStack(Items.rotten_flesh, 1, 0)); - GT_ModHandler.addToRecyclerBlackList(new ItemStack(Items.string, 1, 0)); - GT_ModHandler.addToRecyclerBlackList(new ItemStack(Items.egg, 1, 0)); } if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "easystonerecycling", true)) { ItemStack tStack = new ItemStack(Blocks.cobblestone, 1, 0); while (tStack != null) { GT_ModHandler.addToRecyclerBlackList(tStack); - tStack = GT_ModHandler.getRecipeOutput(tStack, tStack, tStack, tStack, tStack, tStack, tStack, tStack, tStack); + tStack = GT_ModHandler.getRecipeOutput( + tStack, tStack, tStack, tStack, tStack, tStack, tStack, tStack, tStack); } GT_ModHandler.addToRecyclerBlackList(new ItemStack(Blocks.gravel, 1, 32767)); GT_ModHandler.addToRecyclerBlackList(new ItemStack(Items.flint, 1, 32767)); @@ -40,18 +37,46 @@ public class GT_RecyclerBlacklistLoader GT_ModHandler.addToRecyclerBlackList(new ItemStack(Blocks.sandstone_stairs, 1, 32767)); GT_ModHandler.addToRecyclerBlackList(new ItemStack(Blocks.stone_stairs, 1, 32767)); GT_ModHandler.addToRecyclerBlackList(new ItemStack(Blocks.stone_brick_stairs, 1, 32767)); - GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getSmeltingOutput(new ItemStack(Blocks.stone, 1, 0), false, null)); - GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getRecipeOutput(new ItemStack(Blocks.glass, 1, 0), null, null, new ItemStack(Blocks.glass, 1, 0))); - GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getRecipeOutput(new ItemStack(Blocks.stone, 1, 0), null, null, new ItemStack(Blocks.stone, 1, 0))); - GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getRecipeOutput(new ItemStack(Blocks.cobblestone, 1, 0), null, null, new ItemStack(Blocks.cobblestone, 1, 0))); - GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getRecipeOutput(new ItemStack(Blocks.stone, 1, 0), null, new ItemStack(Blocks.stone, 1, 0), null, new ItemStack(Blocks.stone, 1, 0))); - GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getRecipeOutput(new ItemStack(Blocks.stone, 1, 0), new ItemStack(Blocks.glass, 1, 0), new ItemStack(Blocks.stone, 1, 0))); - GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getRecipeOutput(new ItemStack(Blocks.cobblestone, 1, 0), new ItemStack(Blocks.glass, 1, 0), new ItemStack(Blocks.cobblestone, 1, 0))); - GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getRecipeOutput(new ItemStack(Blocks.sandstone, 1, 0), new ItemStack(Blocks.glass, 1, 0), new ItemStack(Blocks.sandstone, 1, 0))); - GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getRecipeOutput(new ItemStack(Blocks.sand, 1, 0), new ItemStack(Blocks.glass, 1, 0), new ItemStack(Blocks.sand, 1, 0))); - GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getRecipeOutput(new ItemStack(Blocks.sandstone, 1, 0), new ItemStack(Blocks.sandstone, 1, 0), new ItemStack(Blocks.sandstone, 1, 0), new ItemStack(Blocks.sandstone, 1, 0), new ItemStack(Blocks.sandstone, 1, 0), new ItemStack(Blocks.sandstone, 1, 0))); + GT_ModHandler.addToRecyclerBlackList( + GT_ModHandler.getSmeltingOutput(new ItemStack(Blocks.stone, 1, 0), false, null)); + GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getRecipeOutput( + new ItemStack(Blocks.glass, 1, 0), null, null, new ItemStack(Blocks.glass, 1, 0))); + GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getRecipeOutput( + new ItemStack(Blocks.stone, 1, 0), null, null, new ItemStack(Blocks.stone, 1, 0))); + GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getRecipeOutput( + new ItemStack(Blocks.cobblestone, 1, 0), null, null, new ItemStack(Blocks.cobblestone, 1, 0))); + GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getRecipeOutput( + new ItemStack(Blocks.stone, 1, 0), + null, + new ItemStack(Blocks.stone, 1, 0), + null, + new ItemStack(Blocks.stone, 1, 0))); + GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getRecipeOutput( + new ItemStack(Blocks.stone, 1, 0), + new ItemStack(Blocks.glass, 1, 0), + new ItemStack(Blocks.stone, 1, 0))); + GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getRecipeOutput( + new ItemStack(Blocks.cobblestone, 1, 0), + new ItemStack(Blocks.glass, 1, 0), + new ItemStack(Blocks.cobblestone, 1, 0))); + GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getRecipeOutput( + new ItemStack(Blocks.sandstone, 1, 0), + new ItemStack(Blocks.glass, 1, 0), + new ItemStack(Blocks.sandstone, 1, 0))); + GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getRecipeOutput( + new ItemStack(Blocks.sand, 1, 0), + new ItemStack(Blocks.glass, 1, 0), + new ItemStack(Blocks.sand, 1, 0))); + GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getRecipeOutput( + new ItemStack(Blocks.sandstone, 1, 0), + new ItemStack(Blocks.sandstone, 1, 0), + new ItemStack(Blocks.sandstone, 1, 0), + new ItemStack(Blocks.sandstone, 1, 0), + new ItemStack(Blocks.sandstone, 1, 0), + new ItemStack(Blocks.sandstone, 1, 0))); GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getRecipeOutput(new ItemStack(Blocks.glass, 1, 0))); - GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getRecipeOutput(new ItemStack(Blocks.glass, 1, 0), new ItemStack(Blocks.glass, 1, 0))); + GT_ModHandler.addToRecyclerBlackList(GT_ModHandler.getRecipeOutput( + new ItemStack(Blocks.glass, 1, 0), new ItemStack(Blocks.glass, 1, 0))); } } } diff --git a/src/main/java/gregtech/loaders/postload/GT_UUMRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_UUMRecipeLoader.java index efb3bcc0a1..fb8d530e72 100644 --- a/src/main/java/gregtech/loaders/postload/GT_UUMRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_UUMRecipeLoader.java @@ -2,6 +2,5 @@ package gregtech.loaders.postload; public class GT_UUMRecipeLoader implements Runnable { @Override - public void run() { - } + public void run() {} } diff --git a/src/main/java/gregtech/loaders/postload/GT_Worldgenloader.java b/src/main/java/gregtech/loaders/postload/GT_Worldgenloader.java index 595877f21b..0fc7552ba3 100644 --- a/src/main/java/gregtech/loaders/postload/GT_Worldgenloader.java +++ b/src/main/java/gregtech/loaders/postload/GT_Worldgenloader.java @@ -7,7 +7,6 @@ import gregtech.common.GT_Worldgen_GT_Ore_Layer; import gregtech.common.GT_Worldgen_GT_Ore_SmallPieces; import gregtech.common.GT_Worldgen_Stone; import gregtech.common.GT_Worldgenerator; - import java.lang.reflect.Constructor; import java.lang.reflect.Method; @@ -17,203 +16,1578 @@ public class GT_Worldgenloader implements Runnable { new GT_Worldgenerator(); - new GT_Worldgen_Stone("overworld.stone.blackgranite.tiny", true, GregTech_API.sBlockGranites, 0, 0, 1, 75, 5, 0, 180, null, false); - new GT_Worldgen_Stone("overworld.stone.blackgranite.small", true, GregTech_API.sBlockGranites, 0, 0, 1, 100, 10, 0, 180, null, false); - new GT_Worldgen_Stone("overworld.stone.blackgranite.medium", true, GregTech_API.sBlockGranites, 0, 0, 1, 200, 10, 0, 180, null, false); - new GT_Worldgen_Stone("overworld.stone.blackgranite.large", true, GregTech_API.sBlockGranites, 0, 0, 1, 300, 70, 0, 120, null, false); - new GT_Worldgen_Stone("overworld.stone.blackgranite.huge", true, GregTech_API.sBlockGranites, 0, 0, 1, 400, 150, 0, 120, null, false); - - new GT_Worldgen_Stone("overworld.stone.redgranite.tiny", true, GregTech_API.sBlockGranites, 8, 0, 1, 75, 5, 0, 180, null, false); - new GT_Worldgen_Stone("overworld.stone.redgranite.small", true, GregTech_API.sBlockGranites, 8, 0, 1, 100, 10, 0, 180, null, false); - new GT_Worldgen_Stone("overworld.stone.redgranite.medium", true, GregTech_API.sBlockGranites, 8, 0, 1, 200, 10, 0, 180, null, false); - new GT_Worldgen_Stone("overworld.stone.redgranite.large", true, GregTech_API.sBlockGranites, 8, 0, 1, 300, 70, 0, 120, null, false); - new GT_Worldgen_Stone("overworld.stone.redgranite.huge", true, GregTech_API.sBlockGranites, 8, 0, 1, 400, 150, 0, 120, null, false); - - new GT_Worldgen_Stone("overworld.stone.marble.tiny", true, GregTech_API.sBlockStones, 0, 0, 1, 75, 5, 0, 180, null, false); - new GT_Worldgen_Stone("overworld.stone.marble.small", true, GregTech_API.sBlockStones, 0, 0, 1, 100, 10, 0, 180, null, false); - new GT_Worldgen_Stone("overworld.stone.marble.medium", true, GregTech_API.sBlockStones, 0, 0, 1, 200, 10, 0, 180, null, false); - new GT_Worldgen_Stone("overworld.stone.marble.large", true, GregTech_API.sBlockStones, 0, 0, 1, 300, 70, 0, 120, null, false); - new GT_Worldgen_Stone("overworld.stone.marble.huge", true, GregTech_API.sBlockStones, 0, 0, 1, 400, 150, 0, 120, null, false); - - new GT_Worldgen_Stone("overworld.stone.basalt.tiny", true, GregTech_API.sBlockStones, 8, 0, 1, 75, 5, 0, 180, null, false); - new GT_Worldgen_Stone("overworld.stone.basalt.small", true, GregTech_API.sBlockStones, 8, 0, 1, 100, 10, 0, 180, null, false); - new GT_Worldgen_Stone("overworld.stone.basalt.medium", true, GregTech_API.sBlockStones, 8, 0, 1, 200, 10, 0, 180, null, false); - new GT_Worldgen_Stone("overworld.stone.basalt.large", true, GregTech_API.sBlockStones, 8, 0, 1, 300, 70, 0, 120, null, false); - new GT_Worldgen_Stone("overworld.stone.basalt.huge", true, GregTech_API.sBlockStones, 8, 0, 1, 400, 150, 0, 120, null, false); - - new GT_Worldgen_Stone("nether.stone.blackgranite.tiny", false, GregTech_API.sBlockGranites, 0, -1, 1, 50, 45, 0, 120, null, false); - new GT_Worldgen_Stone("nether.stone.blackgranite.small", false, GregTech_API.sBlockGranites, 0, -1, 1, 100, 60, 0, 120, null, false); - new GT_Worldgen_Stone("nether.stone.blackgranite.medium", false, GregTech_API.sBlockGranites, 0, -1, 1, 200, 80, 0, 120, null, false); - new GT_Worldgen_Stone("nether.stone.blackgranite.large", false, GregTech_API.sBlockGranites, 0, -1, 1, 300, 70, 0, 120, null, false); - new GT_Worldgen_Stone("nether.stone.blackgranite.huge", false, GregTech_API.sBlockGranites, 0, -1, 1, 400, 150, 0, 120, null, false); - - new GT_Worldgen_Stone("nether.stone.redgranite.tiny", false, GregTech_API.sBlockGranites, 8, -1, 1, 50, 45, 0, 120, null, false); - new GT_Worldgen_Stone("nether.stone.redgranite.small", false, GregTech_API.sBlockGranites, 8, -1, 1, 100, 60, 0, 120, null, false); - new GT_Worldgen_Stone("nether.stone.redgranite.medium", false, GregTech_API.sBlockGranites, 8, -1, 1, 200, 80, 0, 120, null, false); - new GT_Worldgen_Stone("nether.stone.redgranite.large", false, GregTech_API.sBlockGranites, 8, -1, 1, 300, 70, 0, 120, null, false); - new GT_Worldgen_Stone("nether.stone.redgranite.huge", false, GregTech_API.sBlockGranites, 8, -1, 1, 400, 150, 0, 120, null, false); - - new GT_Worldgen_Stone("nether.stone.marble.tiny", false, GregTech_API.sBlockStones, 0, -1, 1, 50, 45, 0, 120, null, false); - new GT_Worldgen_Stone("nether.stone.marble.small", false, GregTech_API.sBlockStones, 0, -1, 1, 100, 60, 0, 120, null, false); - new GT_Worldgen_Stone("nether.stone.marble.medium", false, GregTech_API.sBlockStones, 0, -1, 1, 200, 80, 0, 120, null, false); - new GT_Worldgen_Stone("nether.stone.marble.large", false, GregTech_API.sBlockStones, 0, -1, 1, 300, 70, 0, 120, null, false); - new GT_Worldgen_Stone("nether.stone.marble.huge", false, GregTech_API.sBlockStones, 0, -1, 1, 400, 150, 0, 120, null, false); - - new GT_Worldgen_Stone("nether.stone.basalt.tiny", false, GregTech_API.sBlockStones, 8, -1, 1, 50, 45, 0, 120, null, false); - new GT_Worldgen_Stone("nether.stone.basalt.small", false, GregTech_API.sBlockStones, 8, -1, 1, 100, 60, 0, 120, null, false); - new GT_Worldgen_Stone("nether.stone.basalt.medium", false, GregTech_API.sBlockStones, 8, -1, 1, 200, 80, 0, 120, null, false); - new GT_Worldgen_Stone("nether.stone.basalt.large", false, GregTech_API.sBlockStones, 8, -1, 1, 300, 70, 0, 120, null, false); - new GT_Worldgen_Stone("nether.stone.basalt.huge", false, GregTech_API.sBlockStones, 8, -1, 1, 400, 150, 0, 120, null, false); - - //GT Default Small Ores - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.copper", true, 60, 180, 32, true, true, true, true, true, false, Materials.Copper); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.tin", true, 80, 220, 32, true, true, true, true, true, true, Materials.Tin); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.bismuth", true, 80, 120, 8, false, true, false, true, true, false, Materials.Bismuth); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.coal", true, 120, 250, 24, true, false, false, false, false, false, Materials.Coal); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.iron", true, 40, 100, 16, true, true, true, true, true, false, Materials.Iron); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.lead", true, 40, 180, 16, false, true, true, true, true, true, Materials.Lead); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.zinc", true, 80, 210, 24, true, true, true, true, true, false, Materials.Zinc); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.gold", true, 20, 60, 8, true, false, true, true, true, true, Materials.Gold); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.silver", true, 20, 60, 20, true, true, true, true, true, true, Materials.Silver); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.nickel", true, 80, 150, 8, true, false, true, true, true, true, Materials.Nickel); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.lapis", true, 10, 50, 4, true, false, false, true, false, true, Materials.Lapis); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.diamond", true, 5, 15, 2, true, false, false, true, true, true, Materials.Diamond); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.emerald", true, 5, 35, 2, false, false, false, false, true, true, Materials.Emerald); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.ruby", true, 5, 35, 2, false, false, false, false, true, true, Materials.Ruby); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.sapphire", true, 5, 35, 2, false, false, false, false, true, true, Materials.Sapphire); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.greensapphire", true, 5, 35, 2, false, false, false, false, true, true, Materials.GreenSapphire); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.olivine", true, 5, 35, 2, false, false, false, false, true, true, Materials.Olivine); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.topaz", true, 5, 35, 2, false, false, false, false, true, true, Materials.Topaz); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.tanzanite", true, 5, 35, 2, false, false, false, false, true, true, Materials.Tanzanite); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.amethyst", true, 5, 35, 2, false, false, false, false, true, true, Materials.Amethyst); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.opal", true, 5, 35, 2, false, false, false, false, true, true, Materials.Opal); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.jasper", true, 5, 35, 2, false, false, false, false, true, true, Materials.Jasper); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.bluetopaz", true, 5, 35, 2, false, false, false, false, true, true, Materials.BlueTopaz); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.amber", true, 5, 35, 2, false, false, false, false, true, true, Materials.Amber); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.foolsruby", true, 5, 35, 2, false, false, false, false, true, true, Materials.FoolsRuby); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.garnetred", true, 5, 35, 2, false, false, false, false, true, true, Materials.GarnetRed); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.garnetyellow", true, 5, 35, 2, false, false, false, false, true, true, Materials.GarnetYellow); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.redstone", true, 5, 25, 8, true, true, false, true, true, true, Materials.Redstone); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.netherquartz", true, 30, 120, 64, false, true, false, false, false, false, Materials.NetherQuartz); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.saltpeter", true, 10, 60, 8, false, true, false, false, false, false, Materials.Saltpeter); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.sulfur", true, 5, 60, 40, false, true, false, false, false, false, Materials.Sulfur); - - //TODO: GTNH Custom Small Ores - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.titanium",true,10,180,32,false, false, false, Materials.Titanium); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.tungsten",true,10,120,16,false, false, false, Materials.Tungsten); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.meteoriciron",true,50,70,8,false, false, false, Materials.MeteoricIron); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.firestone",true,5,15,2,false, false, false, Materials.Firestone); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.neutronium",true,5,15,8,false, false, false, Materials.Neutronium); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.chromite",true,20,40,8,false, false, false, Materials.Chromite); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.tungstate",true,20,40,8,false, false, false, Materials.Tungstate); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.naquadah",true,5,25,8,false, false, false, Materials.Naquadah); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.quantium",true,5,25,6,false, false, false, Materials.Quantium); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.mythril",true,5,25,6,false, false, false, Materials.Mytryl); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.ledox",true,40,60,4,false, false, false, Materials.Ledox); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.oriharukon",true,20,40,6,false, false, false, Materials.Oriharukon); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.draconium",true,5,15,4,false, false, false, Materials.Draconium); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.awdraconium",true,5,15,2,false, false, false, Materials.DraconiumAwakened); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.desh",true,10,30,6,false, false, false, Materials.Desh); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.blackplutonium",true,25,45,6,false, false, false, Materials.BlackPlutonium); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.infinitycatalyst",true,40,80,6,false, false, false, Materials.InfinityCatalyst); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.infinity",true,2,40,2,false, false, false, Materials.Infinity); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.bedrockium",true,5,25,6,false, false, false, Materials.Bedrockium); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.realgar",true,15,85,32,false, true, false, Materials.Realgar); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.certusquartz",true,5,115,16,false, true, false, Materials.CertusQuartz); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.jade",true,5,35,2,false, false, false, Materials.Jade); - new GT_Worldgen_GT_Ore_SmallPieces("ore.small.deepiron",true,5,40,8,false, false, false, Materials.DeepIron); - - //GT Default Veins - - new GT_Worldgen_GT_Ore_Layer("ore.mix.naquadah", true, 10, 90, 30, 4, 32, false, false, false, Materials.Naquadah, Materials.Naquadah, Materials.Naquadah, Materials.NaquadahEnriched); - new GT_Worldgen_GT_Ore_Layer("ore.mix.lignite", true, 80, 210, 160, 7, 32, true, false, false, Materials.Lignite, Materials.Lignite, Materials.Lignite, Materials.Coal); - new GT_Worldgen_GT_Ore_Layer("ore.mix.coal", true, 30, 80, 80, 5, 32, true, false, false, Materials.Coal, Materials.Coal, Materials.Coal, Materials.Lignite); - new GT_Worldgen_GT_Ore_Layer("ore.mix.magnetite", true, 60, 180, 160, 2, 32, true, false, false, Materials.Magnetite, Materials.Magnetite, Materials.Iron, Materials.VanadiumMagnetite); - new GT_Worldgen_GT_Ore_Layer("ore.mix.gold", true, 30, 60, 160, 2, 32, true, false, true, Materials.Magnetite, Materials.Magnetite, Materials.VanadiumMagnetite, Materials.Gold); - new GT_Worldgen_GT_Ore_Layer("ore.mix.iron", true, 10, 40, 120, 3, 24, true, true, false, Materials.BrownLimonite, Materials.YellowLimonite, Materials.BandedIron, Materials.Malachite); - new GT_Worldgen_GT_Ore_Layer("ore.mix.cassiterite", true, 60, 220, 50, 4, 24, true, false, true, Materials.Tin, Materials.Tin, Materials.Cassiterite, Materials.Tin); - new GT_Worldgen_GT_Ore_Layer("ore.mix.tetrahedrite", true, 80, 120, 70, 3, 24, false, true, true, Materials.Tetrahedrite, Materials.Tetrahedrite, Materials.Copper, Materials.Stibnite); - new GT_Worldgen_GT_Ore_Layer("ore.mix.netherquartz", true, 40, 80, 80, 4, 24, false, true, false, Materials.NetherQuartz, Materials.NetherQuartz, Materials.NetherQuartz, Materials.Quartzite); - new GT_Worldgen_GT_Ore_Layer("ore.mix.sulfur", true, 5, 20, 100, 4, 24, false, true, false, Materials.Sulfur, Materials.Sulfur, Materials.Pyrite, Materials.Sphalerite); - new GT_Worldgen_GT_Ore_Layer("ore.mix.copper", true, 5, 60, 80, 3, 24, true, true, true, Materials.Chalcopyrite, Materials.Iron, Materials.Pyrite, Materials.Copper); - new GT_Worldgen_GT_Ore_Layer("ore.mix.bauxite", true, 10, 80, 80, 3, 24, false, false, false, Materials.Bauxite, Materials.Ilmenite, Materials.Aluminium, Materials.Ilmenite); - new GT_Worldgen_GT_Ore_Layer("ore.mix.salts", true, 50, 70, 50, 2, 24, true, false, false, Materials.RockSalt, Materials.Salt, Materials.Lepidolite, Materials.Spodumene); - new GT_Worldgen_GT_Ore_Layer("ore.mix.redstone", true, 5, 40, 60, 2, 24, true, true, false, Materials.Redstone, Materials.Redstone, Materials.Ruby, Materials.Cinnabar); - new GT_Worldgen_GT_Ore_Layer("ore.mix.soapstone", true, 20, 50, 40, 2, 16, true, false, false, Materials.Soapstone, Materials.Talc, Materials.Glauconite, Materials.Pentlandite); - new GT_Worldgen_GT_Ore_Layer("ore.mix.nickel", true, 10, 40, 40, 2, 16, false, false, true, Materials.Garnierite, Materials.Nickel, Materials.Cobaltite, Materials.Pentlandite); - new GT_Worldgen_GT_Ore_Layer("ore.mix.platinum", true, 40, 50, 5, 2, 16, false, false, false, Materials.Cooperite, Materials.Palladium, Materials.Platinum, Materials.Iridium); - new GT_Worldgen_GT_Ore_Layer("ore.mix.pitchblende", true, 30, 60, 40, 2, 16, false, false, false, Materials.Pitchblende, Materials.Pitchblende, Materials.Uraninite, Materials.Uraninite); - new GT_Worldgen_GT_Ore_Layer("ore.mix.monazite", true, 20, 40, 30, 2, 16, false, false, false, Materials.Bastnasite, Materials.Bastnasite, Materials.Monazite, Materials.Neodymium); - new GT_Worldgen_GT_Ore_Layer("ore.mix.molybdenum", true, 20, 50, 5, 2, 16, false, true, true, Materials.Wulfenite, Materials.Molybdenite, Materials.Molybdenum, Materials.Powellite); - new GT_Worldgen_GT_Ore_Layer("ore.mix.tungstate", true, 20, 60, 10, 2, 16, false, false, false, Materials.Scheelite, Materials.Scheelite, Materials.Tungstate, Materials.Lithium); - new GT_Worldgen_GT_Ore_Layer("ore.mix.sapphire", true, 10, 40, 60, 2, 16, false, false, false, Materials.Almandine, Materials.Pyrope, Materials.Sapphire, Materials.GreenSapphire); - new GT_Worldgen_GT_Ore_Layer("ore.mix.manganese", true, 20, 30, 20, 2, 16, true, true, false, Materials.Grossular, Materials.Spessartine, Materials.Pyrolusite, Materials.Tantalite); - new GT_Worldgen_GT_Ore_Layer("ore.mix.quartz", true, 80, 120, 30, 2, 16, false, true, false, Materials.Quartzite, Materials.Barite, Materials.CertusQuartz, Materials.CertusQuartz); - new GT_Worldgen_GT_Ore_Layer("ore.mix.diamond", true, 5, 20, 40, 1, 16, true, false, false, Materials.Graphite, Materials.Graphite, Materials.Diamond, Materials.Coal); - new GT_Worldgen_GT_Ore_Layer("ore.mix.olivine", true, 10, 40, 60, 2, 16, false, false, false, Materials.Bentonite, Materials.Magnesite, Materials.Olivine, Materials.Glauconite); - new GT_Worldgen_GT_Ore_Layer("ore.mix.apatite", true, 40, 60, 60, 2, 16, true, false, false, Materials.Apatite, Materials.Apatite, Materials.TricalciumPhosphate, Materials.Pyrochlore); - new GT_Worldgen_GT_Ore_Layer("ore.mix.galena", true, 5, 45, 40, 4, 16, false, false, false, Materials.Galena, Materials.Galena, Materials.Silver, Materials.Lead); - new GT_Worldgen_GT_Ore_Layer("ore.mix.lapis", true, 20, 50, 40, 4, 16, true, false, false, Materials.Lazurite, Materials.Sodalite, Materials.Lapis, Materials.Calcite); - new GT_Worldgen_GT_Ore_Layer("ore.mix.beryllium", true, 5, 30, 30, 2, 16, false, true, true, Materials.Beryllium, Materials.Beryllium, Materials.Emerald, Materials.Thorium); - new GT_Worldgen_GT_Ore_Layer("ore.mix.uranium", true, 20, 30, 20, 2, 16, false, false, false, Materials.Uraninite, Materials.Uraninite, Materials.Uranium, Materials.Uranium); - new GT_Worldgen_GT_Ore_Layer("ore.mix.oilsand", true, 50, 80, 40, 5, 16, true, false, false, Materials.Oilsands, Materials.Oilsands, Materials.Oilsands, Materials.Oilsands); - + new GT_Worldgen_Stone( + "overworld.stone.blackgranite.tiny", + true, + GregTech_API.sBlockGranites, + 0, + 0, + 1, + 75, + 5, + 0, + 180, + null, + false); + new GT_Worldgen_Stone( + "overworld.stone.blackgranite.small", + true, + GregTech_API.sBlockGranites, + 0, + 0, + 1, + 100, + 10, + 0, + 180, + null, + false); + new GT_Worldgen_Stone( + "overworld.stone.blackgranite.medium", + true, + GregTech_API.sBlockGranites, + 0, + 0, + 1, + 200, + 10, + 0, + 180, + null, + false); + new GT_Worldgen_Stone( + "overworld.stone.blackgranite.large", + true, + GregTech_API.sBlockGranites, + 0, + 0, + 1, + 300, + 70, + 0, + 120, + null, + false); + new GT_Worldgen_Stone( + "overworld.stone.blackgranite.huge", + true, + GregTech_API.sBlockGranites, + 0, + 0, + 1, + 400, + 150, + 0, + 120, + null, + false); + + new GT_Worldgen_Stone( + "overworld.stone.redgranite.tiny", + true, + GregTech_API.sBlockGranites, + 8, + 0, + 1, + 75, + 5, + 0, + 180, + null, + false); + new GT_Worldgen_Stone( + "overworld.stone.redgranite.small", + true, + GregTech_API.sBlockGranites, + 8, + 0, + 1, + 100, + 10, + 0, + 180, + null, + false); + new GT_Worldgen_Stone( + "overworld.stone.redgranite.medium", + true, + GregTech_API.sBlockGranites, + 8, + 0, + 1, + 200, + 10, + 0, + 180, + null, + false); + new GT_Worldgen_Stone( + "overworld.stone.redgranite.large", + true, + GregTech_API.sBlockGranites, + 8, + 0, + 1, + 300, + 70, + 0, + 120, + null, + false); + new GT_Worldgen_Stone( + "overworld.stone.redgranite.huge", + true, + GregTech_API.sBlockGranites, + 8, + 0, + 1, + 400, + 150, + 0, + 120, + null, + false); + + new GT_Worldgen_Stone( + "overworld.stone.marble.tiny", true, GregTech_API.sBlockStones, 0, 0, 1, 75, 5, 0, 180, null, false); + new GT_Worldgen_Stone( + "overworld.stone.marble.small", true, GregTech_API.sBlockStones, 0, 0, 1, 100, 10, 0, 180, null, false); + new GT_Worldgen_Stone( + "overworld.stone.marble.medium", + true, + GregTech_API.sBlockStones, + 0, + 0, + 1, + 200, + 10, + 0, + 180, + null, + false); + new GT_Worldgen_Stone( + "overworld.stone.marble.large", true, GregTech_API.sBlockStones, 0, 0, 1, 300, 70, 0, 120, null, false); + new GT_Worldgen_Stone( + "overworld.stone.marble.huge", true, GregTech_API.sBlockStones, 0, 0, 1, 400, 150, 0, 120, null, false); + + new GT_Worldgen_Stone( + "overworld.stone.basalt.tiny", true, GregTech_API.sBlockStones, 8, 0, 1, 75, 5, 0, 180, null, false); + new GT_Worldgen_Stone( + "overworld.stone.basalt.small", true, GregTech_API.sBlockStones, 8, 0, 1, 100, 10, 0, 180, null, false); + new GT_Worldgen_Stone( + "overworld.stone.basalt.medium", + true, + GregTech_API.sBlockStones, + 8, + 0, + 1, + 200, + 10, + 0, + 180, + null, + false); + new GT_Worldgen_Stone( + "overworld.stone.basalt.large", true, GregTech_API.sBlockStones, 8, 0, 1, 300, 70, 0, 120, null, false); + new GT_Worldgen_Stone( + "overworld.stone.basalt.huge", true, GregTech_API.sBlockStones, 8, 0, 1, 400, 150, 0, 120, null, false); + + new GT_Worldgen_Stone( + "nether.stone.blackgranite.tiny", + false, + GregTech_API.sBlockGranites, + 0, + -1, + 1, + 50, + 45, + 0, + 120, + null, + false); + new GT_Worldgen_Stone( + "nether.stone.blackgranite.small", + false, + GregTech_API.sBlockGranites, + 0, + -1, + 1, + 100, + 60, + 0, + 120, + null, + false); + new GT_Worldgen_Stone( + "nether.stone.blackgranite.medium", + false, + GregTech_API.sBlockGranites, + 0, + -1, + 1, + 200, + 80, + 0, + 120, + null, + false); + new GT_Worldgen_Stone( + "nether.stone.blackgranite.large", + false, + GregTech_API.sBlockGranites, + 0, + -1, + 1, + 300, + 70, + 0, + 120, + null, + false); + new GT_Worldgen_Stone( + "nether.stone.blackgranite.huge", + false, + GregTech_API.sBlockGranites, + 0, + -1, + 1, + 400, + 150, + 0, + 120, + null, + false); + + new GT_Worldgen_Stone( + "nether.stone.redgranite.tiny", + false, + GregTech_API.sBlockGranites, + 8, + -1, + 1, + 50, + 45, + 0, + 120, + null, + false); + new GT_Worldgen_Stone( + "nether.stone.redgranite.small", + false, + GregTech_API.sBlockGranites, + 8, + -1, + 1, + 100, + 60, + 0, + 120, + null, + false); + new GT_Worldgen_Stone( + "nether.stone.redgranite.medium", + false, + GregTech_API.sBlockGranites, + 8, + -1, + 1, + 200, + 80, + 0, + 120, + null, + false); + new GT_Worldgen_Stone( + "nether.stone.redgranite.large", + false, + GregTech_API.sBlockGranites, + 8, + -1, + 1, + 300, + 70, + 0, + 120, + null, + false); + new GT_Worldgen_Stone( + "nether.stone.redgranite.huge", + false, + GregTech_API.sBlockGranites, + 8, + -1, + 1, + 400, + 150, + 0, + 120, + null, + false); + + new GT_Worldgen_Stone( + "nether.stone.marble.tiny", false, GregTech_API.sBlockStones, 0, -1, 1, 50, 45, 0, 120, null, false); + new GT_Worldgen_Stone( + "nether.stone.marble.small", false, GregTech_API.sBlockStones, 0, -1, 1, 100, 60, 0, 120, null, false); + new GT_Worldgen_Stone( + "nether.stone.marble.medium", false, GregTech_API.sBlockStones, 0, -1, 1, 200, 80, 0, 120, null, false); + new GT_Worldgen_Stone( + "nether.stone.marble.large", false, GregTech_API.sBlockStones, 0, -1, 1, 300, 70, 0, 120, null, false); + new GT_Worldgen_Stone( + "nether.stone.marble.huge", false, GregTech_API.sBlockStones, 0, -1, 1, 400, 150, 0, 120, null, false); + + new GT_Worldgen_Stone( + "nether.stone.basalt.tiny", false, GregTech_API.sBlockStones, 8, -1, 1, 50, 45, 0, 120, null, false); + new GT_Worldgen_Stone( + "nether.stone.basalt.small", false, GregTech_API.sBlockStones, 8, -1, 1, 100, 60, 0, 120, null, false); + new GT_Worldgen_Stone( + "nether.stone.basalt.medium", false, GregTech_API.sBlockStones, 8, -1, 1, 200, 80, 0, 120, null, false); + new GT_Worldgen_Stone( + "nether.stone.basalt.large", false, GregTech_API.sBlockStones, 8, -1, 1, 300, 70, 0, 120, null, false); + new GT_Worldgen_Stone( + "nether.stone.basalt.huge", false, GregTech_API.sBlockStones, 8, -1, 1, 400, 150, 0, 120, null, false); + + // GT Default Small Ores + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.copper", true, 60, 180, 32, true, true, true, true, true, false, Materials.Copper); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.tin", true, 80, 220, 32, true, true, true, true, true, true, Materials.Tin); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.bismuth", true, 80, 120, 8, false, true, false, true, true, false, Materials.Bismuth); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.coal", true, 120, 250, 24, true, false, false, false, false, false, Materials.Coal); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.iron", true, 40, 100, 16, true, true, true, true, true, false, Materials.Iron); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.lead", true, 40, 180, 16, false, true, true, true, true, true, Materials.Lead); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.zinc", true, 80, 210, 24, true, true, true, true, true, false, Materials.Zinc); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.gold", true, 20, 60, 8, true, false, true, true, true, true, Materials.Gold); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.silver", true, 20, 60, 20, true, true, true, true, true, true, Materials.Silver); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.nickel", true, 80, 150, 8, true, false, true, true, true, true, Materials.Nickel); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.lapis", true, 10, 50, 4, true, false, false, true, false, true, Materials.Lapis); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.diamond", true, 5, 15, 2, true, false, false, true, true, true, Materials.Diamond); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.emerald", true, 5, 35, 2, false, false, false, false, true, true, Materials.Emerald); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.ruby", true, 5, 35, 2, false, false, false, false, true, true, Materials.Ruby); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.sapphire", true, 5, 35, 2, false, false, false, false, true, true, Materials.Sapphire); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.greensapphire", + true, + 5, + 35, + 2, + false, + false, + false, + false, + true, + true, + Materials.GreenSapphire); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.olivine", true, 5, 35, 2, false, false, false, false, true, true, Materials.Olivine); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.topaz", true, 5, 35, 2, false, false, false, false, true, true, Materials.Topaz); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.tanzanite", true, 5, 35, 2, false, false, false, false, true, true, Materials.Tanzanite); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.amethyst", true, 5, 35, 2, false, false, false, false, true, true, Materials.Amethyst); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.opal", true, 5, 35, 2, false, false, false, false, true, true, Materials.Opal); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.jasper", true, 5, 35, 2, false, false, false, false, true, true, Materials.Jasper); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.bluetopaz", true, 5, 35, 2, false, false, false, false, true, true, Materials.BlueTopaz); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.amber", true, 5, 35, 2, false, false, false, false, true, true, Materials.Amber); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.foolsruby", true, 5, 35, 2, false, false, false, false, true, true, Materials.FoolsRuby); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.garnetred", true, 5, 35, 2, false, false, false, false, true, true, Materials.GarnetRed); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.garnetyellow", + true, + 5, + 35, + 2, + false, + false, + false, + false, + true, + true, + Materials.GarnetYellow); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.redstone", true, 5, 25, 8, true, true, false, true, true, true, Materials.Redstone); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.netherquartz", + true, + 30, + 120, + 64, + false, + true, + false, + false, + false, + false, + Materials.NetherQuartz); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.saltpeter", true, 10, 60, 8, false, true, false, false, false, false, Materials.Saltpeter); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.sulfur", true, 5, 60, 40, false, true, false, false, false, false, Materials.Sulfur); + + // TODO: GTNH Custom Small Ores + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.titanium", true, 10, 180, 32, false, false, false, Materials.Titanium); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.tungsten", true, 10, 120, 16, false, false, false, Materials.Tungsten); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.meteoriciron", true, 50, 70, 8, false, false, false, Materials.MeteoricIron); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.firestone", true, 5, 15, 2, false, false, false, Materials.Firestone); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.neutronium", true, 5, 15, 8, false, false, false, Materials.Neutronium); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.chromite", true, 20, 40, 8, false, false, false, Materials.Chromite); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.tungstate", true, 20, 40, 8, false, false, false, Materials.Tungstate); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.naquadah", true, 5, 25, 8, false, false, false, Materials.Naquadah); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.quantium", true, 5, 25, 6, false, false, false, Materials.Quantium); + new GT_Worldgen_GT_Ore_SmallPieces("ore.small.mythril", true, 5, 25, 6, false, false, false, Materials.Mytryl); + new GT_Worldgen_GT_Ore_SmallPieces("ore.small.ledox", true, 40, 60, 4, false, false, false, Materials.Ledox); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.oriharukon", true, 20, 40, 6, false, false, false, Materials.Oriharukon); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.draconium", true, 5, 15, 4, false, false, false, Materials.Draconium); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.awdraconium", true, 5, 15, 2, false, false, false, Materials.DraconiumAwakened); + new GT_Worldgen_GT_Ore_SmallPieces("ore.small.desh", true, 10, 30, 6, false, false, false, Materials.Desh); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.blackplutonium", true, 25, 45, 6, false, false, false, Materials.BlackPlutonium); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.infinitycatalyst", true, 40, 80, 6, false, false, false, Materials.InfinityCatalyst); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.infinity", true, 2, 40, 2, false, false, false, Materials.Infinity); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.bedrockium", true, 5, 25, 6, false, false, false, Materials.Bedrockium); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.realgar", true, 15, 85, 32, false, true, false, Materials.Realgar); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.certusquartz", true, 5, 115, 16, false, true, false, Materials.CertusQuartz); + new GT_Worldgen_GT_Ore_SmallPieces("ore.small.jade", true, 5, 35, 2, false, false, false, Materials.Jade); + new GT_Worldgen_GT_Ore_SmallPieces( + "ore.small.deepiron", true, 5, 40, 8, false, false, false, Materials.DeepIron); + + // GT Default Veins + + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.naquadah", + true, + 10, + 90, + 30, + 4, + 32, + false, + false, + false, + Materials.Naquadah, + Materials.Naquadah, + Materials.Naquadah, + Materials.NaquadahEnriched); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.lignite", + true, + 80, + 210, + 160, + 7, + 32, + true, + false, + false, + Materials.Lignite, + Materials.Lignite, + Materials.Lignite, + Materials.Coal); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.coal", + true, + 30, + 80, + 80, + 5, + 32, + true, + false, + false, + Materials.Coal, + Materials.Coal, + Materials.Coal, + Materials.Lignite); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.magnetite", + true, + 60, + 180, + 160, + 2, + 32, + true, + false, + false, + Materials.Magnetite, + Materials.Magnetite, + Materials.Iron, + Materials.VanadiumMagnetite); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.gold", + true, + 30, + 60, + 160, + 2, + 32, + true, + false, + true, + Materials.Magnetite, + Materials.Magnetite, + Materials.VanadiumMagnetite, + Materials.Gold); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.iron", + true, + 10, + 40, + 120, + 3, + 24, + true, + true, + false, + Materials.BrownLimonite, + Materials.YellowLimonite, + Materials.BandedIron, + Materials.Malachite); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.cassiterite", + true, + 60, + 220, + 50, + 4, + 24, + true, + false, + true, + Materials.Tin, + Materials.Tin, + Materials.Cassiterite, + Materials.Tin); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.tetrahedrite", + true, + 80, + 120, + 70, + 3, + 24, + false, + true, + true, + Materials.Tetrahedrite, + Materials.Tetrahedrite, + Materials.Copper, + Materials.Stibnite); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.netherquartz", + true, + 40, + 80, + 80, + 4, + 24, + false, + true, + false, + Materials.NetherQuartz, + Materials.NetherQuartz, + Materials.NetherQuartz, + Materials.Quartzite); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.sulfur", + true, + 5, + 20, + 100, + 4, + 24, + false, + true, + false, + Materials.Sulfur, + Materials.Sulfur, + Materials.Pyrite, + Materials.Sphalerite); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.copper", + true, + 5, + 60, + 80, + 3, + 24, + true, + true, + true, + Materials.Chalcopyrite, + Materials.Iron, + Materials.Pyrite, + Materials.Copper); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.bauxite", + true, + 10, + 80, + 80, + 3, + 24, + false, + false, + false, + Materials.Bauxite, + Materials.Ilmenite, + Materials.Aluminium, + Materials.Ilmenite); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.salts", + true, + 50, + 70, + 50, + 2, + 24, + true, + false, + false, + Materials.RockSalt, + Materials.Salt, + Materials.Lepidolite, + Materials.Spodumene); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.redstone", + true, + 5, + 40, + 60, + 2, + 24, + true, + true, + false, + Materials.Redstone, + Materials.Redstone, + Materials.Ruby, + Materials.Cinnabar); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.soapstone", + true, + 20, + 50, + 40, + 2, + 16, + true, + false, + false, + Materials.Soapstone, + Materials.Talc, + Materials.Glauconite, + Materials.Pentlandite); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.nickel", + true, + 10, + 40, + 40, + 2, + 16, + false, + false, + true, + Materials.Garnierite, + Materials.Nickel, + Materials.Cobaltite, + Materials.Pentlandite); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.platinum", + true, + 40, + 50, + 5, + 2, + 16, + false, + false, + false, + Materials.Cooperite, + Materials.Palladium, + Materials.Platinum, + Materials.Iridium); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.pitchblende", + true, + 30, + 60, + 40, + 2, + 16, + false, + false, + false, + Materials.Pitchblende, + Materials.Pitchblende, + Materials.Uraninite, + Materials.Uraninite); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.monazite", + true, + 20, + 40, + 30, + 2, + 16, + false, + false, + false, + Materials.Bastnasite, + Materials.Bastnasite, + Materials.Monazite, + Materials.Neodymium); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.molybdenum", + true, + 20, + 50, + 5, + 2, + 16, + false, + true, + true, + Materials.Wulfenite, + Materials.Molybdenite, + Materials.Molybdenum, + Materials.Powellite); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.tungstate", + true, + 20, + 60, + 10, + 2, + 16, + false, + false, + false, + Materials.Scheelite, + Materials.Scheelite, + Materials.Tungstate, + Materials.Lithium); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.sapphire", + true, + 10, + 40, + 60, + 2, + 16, + false, + false, + false, + Materials.Almandine, + Materials.Pyrope, + Materials.Sapphire, + Materials.GreenSapphire); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.manganese", + true, + 20, + 30, + 20, + 2, + 16, + true, + true, + false, + Materials.Grossular, + Materials.Spessartine, + Materials.Pyrolusite, + Materials.Tantalite); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.quartz", + true, + 80, + 120, + 30, + 2, + 16, + false, + true, + false, + Materials.Quartzite, + Materials.Barite, + Materials.CertusQuartz, + Materials.CertusQuartz); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.diamond", + true, + 5, + 20, + 40, + 1, + 16, + true, + false, + false, + Materials.Graphite, + Materials.Graphite, + Materials.Diamond, + Materials.Coal); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.olivine", + true, + 10, + 40, + 60, + 2, + 16, + false, + false, + false, + Materials.Bentonite, + Materials.Magnesite, + Materials.Olivine, + Materials.Glauconite); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.apatite", + true, + 40, + 60, + 60, + 2, + 16, + true, + false, + false, + Materials.Apatite, + Materials.Apatite, + Materials.TricalciumPhosphate, + Materials.Pyrochlore); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.galena", + true, + 5, + 45, + 40, + 4, + 16, + false, + false, + false, + Materials.Galena, + Materials.Galena, + Materials.Silver, + Materials.Lead); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.lapis", + true, + 20, + 50, + 40, + 4, + 16, + true, + false, + false, + Materials.Lazurite, + Materials.Sodalite, + Materials.Lapis, + Materials.Calcite); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.beryllium", + true, + 5, + 30, + 30, + 2, + 16, + false, + true, + true, + Materials.Beryllium, + Materials.Beryllium, + Materials.Emerald, + Materials.Thorium); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.uranium", + true, + 20, + 30, + 20, + 2, + 16, + false, + false, + false, + Materials.Uraninite, + Materials.Uraninite, + Materials.Uranium, + Materials.Uranium); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.oilsand", + true, + 50, + 80, + 40, + 5, + 16, + true, + false, + false, + Materials.Oilsands, + Materials.Oilsands, + Materials.Oilsands, + Materials.Oilsands); + /* * TODO: custom GTNH OreMixes * WARNING: NO DUPLICATES IN aName OR DEPRECATED MATERIALS IN HERE. * Materials can be used unlimited, since achievements for Ores are turned off. */ - - //aName, aDefault, aMinY, aMaxY, aWeight, aDensity, aSize, aOverworld, aNether, aEnd, aPrimary, aSecondary, aBetween, aSporadic - new GT_Worldgen_GT_Ore_Layer("ore.mix.neutronium", true, 5, 30, 10, 2, 16, false, false, false, Materials.Neutronium, Materials.Adamantium, Materials.Naquadah, Materials.Titanium); - new GT_Worldgen_GT_Ore_Layer("ore.mix.aquaignis", true, 5, 35, 16, 2, 16, false, false, false, Materials.InfusedWater, Materials.InfusedFire, Materials.Amber, Materials.Cinnabar); - new GT_Worldgen_GT_Ore_Layer("ore.mix.terraaer", true, 5, 35, 16, 2, 16, false, false, false, Materials.InfusedEarth, Materials.InfusedAir, Materials.Amber, Materials.Cinnabar); - new GT_Worldgen_GT_Ore_Layer("ore.mix.perditioordo", true, 5, 35, 16, 2, 16, false, false, false, Materials.InfusedEntropy, Materials.InfusedOrder, Materials.Amber, Materials.Cinnabar); - new GT_Worldgen_GT_Ore_Layer("ore.mix.coppertin", true, 80, 200, 80, 3, 24, true, false, false, Materials.Chalcopyrite, Materials.Vermiculite, Materials.Cassiterite, Materials.Alunite); - new GT_Worldgen_GT_Ore_Layer("ore.mix.titaniumchrome", true, 10, 70, 16, 2, 16, false, false, false, Materials.Ilmenite, Materials.Chromite, Materials.Uvarovite, Materials.Perlite); - new GT_Worldgen_GT_Ore_Layer("ore.mix.mineralsand", true, 50, 60, 80, 3, 24, true, false, false, Materials.BasalticMineralSand, Materials.GraniticMineralSand, Materials.FullersEarth, Materials.Gypsum); - new GT_Worldgen_GT_Ore_Layer("ore.mix.garnettin", true, 50, 60, 80, 3, 24, true, false, false, Materials.CassiteriteSand, Materials.GarnetSand, Materials.Asbestos, Materials.Diatomite); - new GT_Worldgen_GT_Ore_Layer("ore.mix.kaolinitezeolite", true, 50, 70, 60, 4, 16, true, false, false, Materials.Kaolinite, Materials.Zeolite, Materials.FullersEarth, Materials.GlauconiteSand); - new GT_Worldgen_GT_Ore_Layer("ore.mix.mica", true, 20, 40, 20, 2, 16, true, false, false, Materials.Kyanite, Materials.Mica, Materials.Cassiterite, Materials.Pollucite); - new GT_Worldgen_GT_Ore_Layer("ore.mix.dolomite", true, 150, 200, 40, 4, 24, true, false, false, Materials.Dolomite, Materials.Wollastonite, Materials.Trona, Materials.Andradite); - new GT_Worldgen_GT_Ore_Layer("ore.mix.platinumchrome", true, 5, 30, 10, 2, 16, false, false, false, Materials.Platinum, Materials.Chrome, Materials.Cooperite, Materials.Palladium); - new GT_Worldgen_GT_Ore_Layer("ore.mix.iridiummytryl", true, 15, 40, 10, 2, 16, false, false, false, Materials.Nickel, Materials.Iridium, Materials.Palladium, Materials.Mithril); - new GT_Worldgen_GT_Ore_Layer("ore.mix.osmium", true, 5, 30, 10, 2, 16, false, false, false, Materials.Nickel, Materials.Osmium, Materials.Iridium, Materials.Nickel); - new GT_Worldgen_GT_Ore_Layer("ore.mix.saltpeterelectrotine", true, 5, 45, 40, 3, 16, false, true, false, Materials.Saltpeter, Materials.Diatomite, Materials.Electrotine, Materials.Alunite); - new GT_Worldgen_GT_Ore_Layer("ore.mix.desh", true, 5, 40, 30, 2, 16, false, false, false, Materials.Desh, Materials.Desh, Materials.Scheelite, Materials.Tungstate); - new GT_Worldgen_GT_Ore_Layer("ore.mix.draconium", true, 20, 40, 40, 1, 16, false, false, false, Materials.Draconium, Materials.Electrotine, Materials.Jade, Materials.Vinteum); - new GT_Worldgen_GT_Ore_Layer("ore.mix.quantium", true, 5, 25, 30,3, 24, false, false, false, Materials.Quantium, Materials.Amethyst, Materials.Rutile, Materials.Ardite); - new GT_Worldgen_GT_Ore_Layer("ore.mix.callistoice", true, 40, 60, 40, 2, 16, false, false, false, Materials.CallistoIce, Materials.Topaz, Materials.BlueTopaz, Materials.Alduorite); - new GT_Worldgen_GT_Ore_Layer("ore.mix.mytryl", true, 10, 30, 40, 2, 16, false, false, false, Materials.Mytryl, Materials.Jasper, Materials.Ceruclase, Materials.Vulcanite); - new GT_Worldgen_GT_Ore_Layer("ore.mix.ledox", true, 55, 65, 30, 2, 24, false, false, false, Materials.Ledox, Materials.Opal, Materials.Orichalcum, Materials.Rubracium); - new GT_Worldgen_GT_Ore_Layer("ore.mix.oriharukon", true, 30, 60, 40, 2, 16, false, false, false, Materials.Oriharukon, Materials.Tanzanite, Materials.Vyroxeres, Materials.Mirabilite); - new GT_Worldgen_GT_Ore_Layer("ore.mix.blackplutonium", true, 5, 25, 40, 2, 24, false, false, false, Materials.BlackPlutonium, Materials.GarnetRed, Materials.GarnetYellow, Materials.Borax); - new GT_Worldgen_GT_Ore_Layer("ore.mix.infusedgold", true, 15, 40, 30, 2, 16, false, false, false, Materials.Gold, Materials.Gold, Materials.InfusedGold, Materials.Platinum); - new GT_Worldgen_GT_Ore_Layer("ore.mix.niobium", true, 5, 30, 60, 2, 24, false, false, false, Materials.Niobium, Materials.Yttrium, Materials.Gallium, Materials.Gallium); - new GT_Worldgen_GT_Ore_Layer("ore.mix.tungstenirons", true, 5, 25, 16, 2, 30, false, false, false, Materials.Tungsten, Materials.Silicon, Materials.DeepIron, Materials.ShadowIron); - new GT_Worldgen_GT_Ore_Layer("ore.mix.uraniumgtnh", true, 10, 30, 60, 2, 24, false, false, false, Materials.Thorium, Materials.Uranium, Materials.Plutonium241, Materials.Uranium235); - new GT_Worldgen_GT_Ore_Layer("ore.mix.vanadiumgold", true, 10, 50, 60, 2, 24, false, false, false, Materials.Vanadium, Materials.Magnetite, Materials.Gold, Materials.Chrome); - new GT_Worldgen_GT_Ore_Layer("ore.mix.netherstar", true, 20, 60, 60, 2, 24, false, false, false, Materials.GarnetSand, Materials.NetherStar, Materials.GarnetRed, Materials.GarnetYellow); - new GT_Worldgen_GT_Ore_Layer("ore.mix.garnet", true, 10, 30, 40, 2, 16, false, false, false, Materials.GarnetRed, Materials.GarnetYellow, Materials.Chrysotile, Materials.Realgar); - new GT_Worldgen_GT_Ore_Layer("ore.mix.rareearth", true, 30, 60, 40, 2, 24, false, false, false, Materials.Cadmium, Materials.Caesium, Materials.Lanthanum, Materials.Cerium); - new GT_Worldgen_GT_Ore_Layer("ore.mix.richnuclear", true, 55, 120, 5, 2, 8, false, false, false, Materials.Uranium, Materials.Plutonium, Materials.Thorium, Materials.Thorium); - new GT_Worldgen_GT_Ore_Layer("ore.mix.heavypentele", true, 40, 60, 60, 5, 32, false, false, false, Materials.Arsenic, Materials.Bismuth, Materials.Antimony, Materials.Antimony); - new GT_Worldgen_GT_Ore_Layer("ore.mix.europa", true, 55, 65, 110, 4, 24, false, false, false, Materials.Magnesite, Materials.BandedIron, Materials.Sulfur, Materials.Opal); - new GT_Worldgen_GT_Ore_Layer("ore.mix.europacore", true, 5, 15, 5, 2, 16, false, false, false, Materials.Chrome, Materials.Tungstate, Materials.Molybdenum, Materials.Manganese); - new GT_Worldgen_GT_Ore_Layer("ore.mix.secondlanthanid", true, 10, 40, 10, 3, 24, false, false, false, Materials.Samarium, Materials.Neodymium, Materials.Tartarite, Materials.Tartarite); - new GT_Worldgen_GT_Ore_Layer("ore.mix.quartzspace", true, 40, 80, 20, 3, 16, false, false, false, Materials.Quartzite, Materials.Barite, Materials.CertusQuartz, Materials.CertusQuartz); - new GT_Worldgen_GT_Ore_Layer("ore.mix.rutile", true, 5, 20, 8, 4, 12, false, false, false, Materials.Rutile, Materials.Titanium, Materials.Bauxite, Materials.MeteoricIron); - new GT_Worldgen_GT_Ore_Layer("ore.mix.tfgalena", true, 5, 35, 40, 4, 16, false, false, false, Materials.Galena, Materials.Silver, Materials.Lead, Materials.Cryolite); - new GT_Worldgen_GT_Ore_Layer("ore.mix.luvtantalite", true, 20, 30, 10, 4, 16, false, false, false, Materials.Pyrolusite, Materials.Apatite, Materials.Tantalite, Materials.Pyrochlore); - - //DO NOT DELETE V THIS V - this is needed so that gregtech generates its Ore Layer's first (the ones up there), which can then be transformed into "GT_Worldgen_GT_Ore_Layer_Space". Also, Reflexion is slow. + + // aName, aDefault, aMinY, aMaxY, aWeight, aDensity, aSize, aOverworld, aNether, aEnd, aPrimary, aSecondary, + // aBetween, aSporadic + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.neutronium", + true, + 5, + 30, + 10, + 2, + 16, + false, + false, + false, + Materials.Neutronium, + Materials.Adamantium, + Materials.Naquadah, + Materials.Titanium); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.aquaignis", + true, + 5, + 35, + 16, + 2, + 16, + false, + false, + false, + Materials.InfusedWater, + Materials.InfusedFire, + Materials.Amber, + Materials.Cinnabar); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.terraaer", + true, + 5, + 35, + 16, + 2, + 16, + false, + false, + false, + Materials.InfusedEarth, + Materials.InfusedAir, + Materials.Amber, + Materials.Cinnabar); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.perditioordo", + true, + 5, + 35, + 16, + 2, + 16, + false, + false, + false, + Materials.InfusedEntropy, + Materials.InfusedOrder, + Materials.Amber, + Materials.Cinnabar); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.coppertin", + true, + 80, + 200, + 80, + 3, + 24, + true, + false, + false, + Materials.Chalcopyrite, + Materials.Vermiculite, + Materials.Cassiterite, + Materials.Alunite); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.titaniumchrome", + true, + 10, + 70, + 16, + 2, + 16, + false, + false, + false, + Materials.Ilmenite, + Materials.Chromite, + Materials.Uvarovite, + Materials.Perlite); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.mineralsand", + true, + 50, + 60, + 80, + 3, + 24, + true, + false, + false, + Materials.BasalticMineralSand, + Materials.GraniticMineralSand, + Materials.FullersEarth, + Materials.Gypsum); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.garnettin", + true, + 50, + 60, + 80, + 3, + 24, + true, + false, + false, + Materials.CassiteriteSand, + Materials.GarnetSand, + Materials.Asbestos, + Materials.Diatomite); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.kaolinitezeolite", + true, + 50, + 70, + 60, + 4, + 16, + true, + false, + false, + Materials.Kaolinite, + Materials.Zeolite, + Materials.FullersEarth, + Materials.GlauconiteSand); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.mica", + true, + 20, + 40, + 20, + 2, + 16, + true, + false, + false, + Materials.Kyanite, + Materials.Mica, + Materials.Cassiterite, + Materials.Pollucite); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.dolomite", + true, + 150, + 200, + 40, + 4, + 24, + true, + false, + false, + Materials.Dolomite, + Materials.Wollastonite, + Materials.Trona, + Materials.Andradite); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.platinumchrome", + true, + 5, + 30, + 10, + 2, + 16, + false, + false, + false, + Materials.Platinum, + Materials.Chrome, + Materials.Cooperite, + Materials.Palladium); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.iridiummytryl", + true, + 15, + 40, + 10, + 2, + 16, + false, + false, + false, + Materials.Nickel, + Materials.Iridium, + Materials.Palladium, + Materials.Mithril); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.osmium", + true, + 5, + 30, + 10, + 2, + 16, + false, + false, + false, + Materials.Nickel, + Materials.Osmium, + Materials.Iridium, + Materials.Nickel); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.saltpeterelectrotine", + true, + 5, + 45, + 40, + 3, + 16, + false, + true, + false, + Materials.Saltpeter, + Materials.Diatomite, + Materials.Electrotine, + Materials.Alunite); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.desh", + true, + 5, + 40, + 30, + 2, + 16, + false, + false, + false, + Materials.Desh, + Materials.Desh, + Materials.Scheelite, + Materials.Tungstate); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.draconium", + true, + 20, + 40, + 40, + 1, + 16, + false, + false, + false, + Materials.Draconium, + Materials.Electrotine, + Materials.Jade, + Materials.Vinteum); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.quantium", + true, + 5, + 25, + 30, + 3, + 24, + false, + false, + false, + Materials.Quantium, + Materials.Amethyst, + Materials.Rutile, + Materials.Ardite); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.callistoice", + true, + 40, + 60, + 40, + 2, + 16, + false, + false, + false, + Materials.CallistoIce, + Materials.Topaz, + Materials.BlueTopaz, + Materials.Alduorite); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.mytryl", + true, + 10, + 30, + 40, + 2, + 16, + false, + false, + false, + Materials.Mytryl, + Materials.Jasper, + Materials.Ceruclase, + Materials.Vulcanite); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.ledox", + true, + 55, + 65, + 30, + 2, + 24, + false, + false, + false, + Materials.Ledox, + Materials.Opal, + Materials.Orichalcum, + Materials.Rubracium); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.oriharukon", + true, + 30, + 60, + 40, + 2, + 16, + false, + false, + false, + Materials.Oriharukon, + Materials.Tanzanite, + Materials.Vyroxeres, + Materials.Mirabilite); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.blackplutonium", + true, + 5, + 25, + 40, + 2, + 24, + false, + false, + false, + Materials.BlackPlutonium, + Materials.GarnetRed, + Materials.GarnetYellow, + Materials.Borax); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.infusedgold", + true, + 15, + 40, + 30, + 2, + 16, + false, + false, + false, + Materials.Gold, + Materials.Gold, + Materials.InfusedGold, + Materials.Platinum); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.niobium", + true, + 5, + 30, + 60, + 2, + 24, + false, + false, + false, + Materials.Niobium, + Materials.Yttrium, + Materials.Gallium, + Materials.Gallium); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.tungstenirons", + true, + 5, + 25, + 16, + 2, + 30, + false, + false, + false, + Materials.Tungsten, + Materials.Silicon, + Materials.DeepIron, + Materials.ShadowIron); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.uraniumgtnh", + true, + 10, + 30, + 60, + 2, + 24, + false, + false, + false, + Materials.Thorium, + Materials.Uranium, + Materials.Plutonium241, + Materials.Uranium235); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.vanadiumgold", + true, + 10, + 50, + 60, + 2, + 24, + false, + false, + false, + Materials.Vanadium, + Materials.Magnetite, + Materials.Gold, + Materials.Chrome); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.netherstar", + true, + 20, + 60, + 60, + 2, + 24, + false, + false, + false, + Materials.GarnetSand, + Materials.NetherStar, + Materials.GarnetRed, + Materials.GarnetYellow); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.garnet", + true, + 10, + 30, + 40, + 2, + 16, + false, + false, + false, + Materials.GarnetRed, + Materials.GarnetYellow, + Materials.Chrysotile, + Materials.Realgar); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.rareearth", + true, + 30, + 60, + 40, + 2, + 24, + false, + false, + false, + Materials.Cadmium, + Materials.Caesium, + Materials.Lanthanum, + Materials.Cerium); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.richnuclear", + true, + 55, + 120, + 5, + 2, + 8, + false, + false, + false, + Materials.Uranium, + Materials.Plutonium, + Materials.Thorium, + Materials.Thorium); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.heavypentele", + true, + 40, + 60, + 60, + 5, + 32, + false, + false, + false, + Materials.Arsenic, + Materials.Bismuth, + Materials.Antimony, + Materials.Antimony); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.europa", + true, + 55, + 65, + 110, + 4, + 24, + false, + false, + false, + Materials.Magnesite, + Materials.BandedIron, + Materials.Sulfur, + Materials.Opal); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.europacore", + true, + 5, + 15, + 5, + 2, + 16, + false, + false, + false, + Materials.Chrome, + Materials.Tungstate, + Materials.Molybdenum, + Materials.Manganese); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.secondlanthanid", + true, + 10, + 40, + 10, + 3, + 24, + false, + false, + false, + Materials.Samarium, + Materials.Neodymium, + Materials.Tartarite, + Materials.Tartarite); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.quartzspace", + true, + 40, + 80, + 20, + 3, + 16, + false, + false, + false, + Materials.Quartzite, + Materials.Barite, + Materials.CertusQuartz, + Materials.CertusQuartz); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.rutile", + true, + 5, + 20, + 8, + 4, + 12, + false, + false, + false, + Materials.Rutile, + Materials.Titanium, + Materials.Bauxite, + Materials.MeteoricIron); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.tfgalena", + true, + 5, + 35, + 40, + 4, + 16, + false, + false, + false, + Materials.Galena, + Materials.Silver, + Materials.Lead, + Materials.Cryolite); + new GT_Worldgen_GT_Ore_Layer( + "ore.mix.luvtantalite", + true, + 20, + 30, + 10, + 4, + 16, + false, + false, + false, + Materials.Pyrolusite, + Materials.Apatite, + Materials.Tantalite, + Materials.Pyrochlore); + + // DO NOT DELETE V THIS V - this is needed so that gregtech generates its Ore Layer's first (the ones up there), + // which can then be transformed into "GT_Worldgen_GT_Ore_Layer_Space". Also, Reflexion is slow. try { Class<?> clazz = Class.forName("bloodasp.galacticgreg.WorldGenGaGT"); - Constructor<?> constructor=clazz.getConstructor(); - Method method=clazz.getMethod("run"); + Constructor<?> constructor = clazz.getConstructor(); + Method method = clazz.getMethod("run"); method.invoke(constructor.newInstance()); GT_Log.out.println("Started Galactic Greg ore gen code"); - //this function calls Galactic Greg and enables its generation. + // this function calls Galactic Greg and enables its generation. } catch (Exception e) { // ClassNotFound is expected if Galactic Greg is absent, so only report if other problem if (!(e instanceof ClassNotFoundException)) { @@ -221,7 +1595,7 @@ public class GT_Worldgenloader implements Runnable { e.printStackTrace(GT_Log.err); } } - //DO NOT DELETE ^ THIS ^ - + // DO NOT DELETE ^ THIS ^ + } } diff --git a/src/main/java/gregtech/loaders/postload/PartP2PGTPower.java b/src/main/java/gregtech/loaders/postload/PartP2PGTPower.java index 879383f0db..12b8e5cf6a 100644 --- a/src/main/java/gregtech/loaders/postload/PartP2PGTPower.java +++ b/src/main/java/gregtech/loaders/postload/PartP2PGTPower.java @@ -9,13 +9,12 @@ import appeng.parts.p2p.PartP2PIC2Power; import gregtech.api.interfaces.tileentity.IEnergyConnected; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_Utility; +import java.lang.reflect.Field; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import java.lang.reflect.Field; - public class PartP2PGTPower extends PartP2PIC2Power implements IGridTickable { public PartP2PGTPower(ItemStack is) { super(is); @@ -68,7 +67,10 @@ public class PartP2PGTPower extends PartP2PIC2Power implements IGridTickable { if (voltage > getOfferedEnergy()) { voltage = (long) getOfferedEnergy(); } - if (((IEnergyConnected) t).injectEnergyUnits(GT_Utility.getOppositeSide(getSide().ordinal()), voltage, 1) > 0) { + if (((IEnergyConnected) t) + .injectEnergyUnits( + GT_Utility.getOppositeSide(getSide().ordinal()), voltage, 1) + > 0) { drawEnergy(voltage); return true; } @@ -87,15 +89,15 @@ public class PartP2PGTPower extends PartP2PIC2Power implements IGridTickable { } @Override - public ForgeDirection getSide(){ - try { - Field fSide = AEBasePart.class.getDeclaredField("side"); - fSide.setAccessible(true); - return (ForgeDirection) fSide.get(this); - } catch (Exception e) { - GT_Log.out.println("A fatal error occured at the P2P tunnel for GT electricity"); + public ForgeDirection getSide() { + try { + Field fSide = AEBasePart.class.getDeclaredField("side"); + fSide.setAccessible(true); + return (ForgeDirection) fSide.get(this); + } catch (Exception e) { + GT_Log.out.println("A fatal error occured at the P2P tunnel for GT electricity"); e.printStackTrace(GT_Log.out); - throw new RuntimeException(e); - } + throw new RuntimeException(e); + } } } diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_ItemData.java b/src/main/java/gregtech/loaders/preload/GT_Loader_ItemData.java index f915c39c0b..8057a2efea 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_ItemData.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_ItemData.java @@ -1,5 +1,7 @@ package gregtech.loaders.preload; +import static gregtech.api.enums.GT_Values.MOD_ID_DC; + import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; @@ -13,166 +15,370 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -import static gregtech.api.enums.GT_Values.MOD_ID_DC; - public class GT_Loader_ItemData implements Runnable { @Override public void run() { GT_Log.out.println("GT_Mod: Loading Item Data Tags"); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("TwilightForest", "item.giantPick", 1L, 0), new ItemData(Materials.Stone, 696729600L, new MaterialStack(Materials.Wood, 464486400L))); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("TwilightForest", "item.giantSword", 1L, 0), new ItemData(Materials.Stone, 464486400L, new MaterialStack(Materials.Wood, 232243200L))); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("TwilightForest", "tile.GiantLog", 1L, 32767), new ItemData(Materials.Wood, 232243200L)); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("TwilightForest", "tile.GiantCobble", 1L, 32767), new ItemData(Materials.Stone, 232243200L)); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("TwilightForest", "tile.GiantObsidian", 1L, 32767), new ItemData(Materials.Obsidian, 232243200L)); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("TwilightForest", "item.minotaurAxe", 1L, 0), new ItemData(Materials.Diamond, 14515200L, new MaterialStack(Materials.Wood, OrePrefixes.stick.mMaterialAmount * 2L))); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("TwilightForest", "item.armorShards", 1L, 0), new ItemData(Materials.Knightmetal, 403200L)); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("TwilightForest", "item.shardCluster", 1L, 0), new ItemData(Materials.Knightmetal, 3628800L)); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getModItem("TwilightForest", "item.giantPick", 1L, 0), + new ItemData(Materials.Stone, 696729600L, new MaterialStack(Materials.Wood, 464486400L))); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getModItem("TwilightForest", "item.giantSword", 1L, 0), + new ItemData(Materials.Stone, 464486400L, new MaterialStack(Materials.Wood, 232243200L))); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getModItem("TwilightForest", "tile.GiantLog", 1L, 32767), + new ItemData(Materials.Wood, 232243200L)); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getModItem("TwilightForest", "tile.GiantCobble", 1L, 32767), + new ItemData(Materials.Stone, 232243200L)); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getModItem("TwilightForest", "tile.GiantObsidian", 1L, 32767), + new ItemData(Materials.Obsidian, 232243200L)); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getModItem("TwilightForest", "item.minotaurAxe", 1L, 0), + new ItemData( + Materials.Diamond, + 14515200L, + new MaterialStack(Materials.Wood, OrePrefixes.stick.mMaterialAmount * 2L))); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getModItem("TwilightForest", "item.armorShards", 1L, 0), + new ItemData(Materials.Knightmetal, 403200L)); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getModItem("TwilightForest", "item.shardCluster", 1L, 0), + new ItemData(Materials.Knightmetal, 3628800L)); GT_OreDictUnificator.addItemData(ItemList.TF_LiveRoot.get(1L), new ItemData(Materials.LiveRoot, 3628800L)); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 10), new ItemData(Materials.CertusQuartz, 1814400L)); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 11), new ItemData(Materials.NetherQuartz, 1814400L)); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 12), new ItemData(Materials.Fluix, 1814400L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.quartz_block, 1, 32767), new ItemData(Materials.NetherQuartz, 14515200L)); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockQuartz", 1L, 32767), new ItemData(Materials.CertusQuartz, 14515200L)); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockQuartzPillar", 1L, 32767), new ItemData(Materials.CertusQuartz, 14515200L)); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockQuartzChiseled", 1L, 32767), new ItemData(Materials.CertusQuartz, 14515200L)); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 10), + new ItemData(Materials.CertusQuartz, 1814400L)); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 11), + new ItemData(Materials.NetherQuartz, 1814400L)); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 12), + new ItemData(Materials.Fluix, 1814400L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.quartz_block, 1, 32767), new ItemData(Materials.NetherQuartz, 14515200L)); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockQuartz", 1L, 32767), + new ItemData(Materials.CertusQuartz, 14515200L)); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockQuartzPillar", 1L, 32767), + new ItemData(Materials.CertusQuartz, 14515200L)); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockQuartzChiseled", 1L, 32767), + new ItemData(Materials.CertusQuartz, 14515200L)); GT_OreDictUnificator.addItemData(new ItemStack(Items.wheat, 1, 32767), new ItemData(Materials.Wheat, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.hay_block, 1, 32767), new ItemData(Materials.Wheat, 32659200L)); - GT_OreDictUnificator.addItemData(new ItemStack(Items.snowball, 1, 32767), new ItemData(Materials.Snow, 907200L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.hay_block, 1, 32767), new ItemData(Materials.Wheat, 32659200L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Items.snowball, 1, 32767), new ItemData(Materials.Snow, 907200L)); GT_OreDictUnificator.addItemData(new ItemStack(Blocks.snow, 1, 32767), new ItemData(Materials.Snow, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.glowstone, 1, 32767), new ItemData(Materials.Glowstone, 14515200L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.redstone_lamp, 1, 32767), new ItemData(Materials.Glowstone, 14515200L, new MaterialStack(Materials.Redstone, OrePrefixes.dust.mMaterialAmount * 4L))); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.lit_redstone_lamp, 1, 32767), new ItemData(Materials.Glowstone, 14515200L, new MaterialStack(Materials.Redstone, OrePrefixes.dust.mMaterialAmount * 4L))); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("Forestry", "craftingMaterial", 1L, 5), new ItemData(Materials.Ice, 3628800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.glowstone, 1, 32767), new ItemData(Materials.Glowstone, 14515200L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.redstone_lamp, 1, 32767), + new ItemData( + Materials.Glowstone, + 14515200L, + new MaterialStack(Materials.Redstone, OrePrefixes.dust.mMaterialAmount * 4L))); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.lit_redstone_lamp, 1, 32767), + new ItemData( + Materials.Glowstone, + 14515200L, + new MaterialStack(Materials.Redstone, OrePrefixes.dust.mMaterialAmount * 4L))); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getModItem("Forestry", "craftingMaterial", 1L, 5), new ItemData(Materials.Ice, 3628800L)); GT_OreDictUnificator.addItemData(new ItemStack(Blocks.ice, 1, 32767), new ItemData(Materials.Ice, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.packed_ice, 1, 32767), new ItemData(Materials.Ice, 7257600L)); - GT_OreDictUnificator.addItemData(new ItemStack(Items.clay_ball, 1, 32767), new ItemData(Materials.Clay, 1814400L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.packed_ice, 1, 32767), new ItemData(Materials.Ice, 7257600L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Items.clay_ball, 1, 32767), new ItemData(Materials.Clay, 1814400L)); GT_OreDictUnificator.addItemData(new ItemStack(Blocks.clay, 1, 32767), new ItemData(Materials.Clay, 7257600L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.hardened_clay, 1, 32767), new ItemData(Materials.Clay, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stained_hardened_clay, 1, 32767), new ItemData(Materials.Clay, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.brick_block, 1, 32767), new ItemData(Materials.Brick, 3628800L)); - GT_OreDictUnificator.addItemData(GT_ModHandler.getIC2Item("Uran238", 1L), new ItemData(Materials.Uranium, 3628800L)); - GT_OreDictUnificator.addItemData(GT_ModHandler.getIC2Item("Uran235", 1L), new ItemData(Materials.Uranium235, 3628800L)); - GT_OreDictUnificator.addItemData(GT_ModHandler.getIC2Item("Plutonium", 1L), new ItemData(Materials.Plutonium, 3628800L)); - GT_OreDictUnificator.addItemData(GT_ModHandler.getIC2Item("smallUran235", 1L), new ItemData(Materials.Uranium235, 403200L)); - GT_OreDictUnificator.addItemData(GT_ModHandler.getIC2Item("smallPlutonium", 1L), new ItemData(Materials.Plutonium, 403200L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.hardened_clay, 1, 32767), new ItemData(Materials.Clay, 3628800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.stained_hardened_clay, 1, 32767), new ItemData(Materials.Clay, 3628800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.brick_block, 1, 32767), new ItemData(Materials.Brick, 3628800L)); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getIC2Item("Uran238", 1L), new ItemData(Materials.Uranium, 3628800L)); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getIC2Item("Uran235", 1L), new ItemData(Materials.Uranium235, 3628800L)); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getIC2Item("Plutonium", 1L), new ItemData(Materials.Plutonium, 3628800L)); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getIC2Item("smallUran235", 1L), new ItemData(Materials.Uranium235, 403200L)); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getIC2Item("smallPlutonium", 1L), new ItemData(Materials.Plutonium, 403200L)); GT_OreDictUnificator.addItemData(ItemList.IC2_Item_Casing_Iron.get(1L), new ItemData(Materials.Iron, 1814400L)); GT_OreDictUnificator.addItemData(ItemList.IC2_Item_Casing_Gold.get(1L), new ItemData(Materials.Gold, 1814400L)); - GT_OreDictUnificator.addItemData(ItemList.IC2_Item_Casing_Bronze.get(1L), new ItemData(Materials.Bronze, 1814400L)); - GT_OreDictUnificator.addItemData(ItemList.IC2_Item_Casing_Copper.get(1L), new ItemData(Materials.Copper, 1814400L)); + GT_OreDictUnificator.addItemData( + ItemList.IC2_Item_Casing_Bronze.get(1L), new ItemData(Materials.Bronze, 1814400L)); + GT_OreDictUnificator.addItemData( + ItemList.IC2_Item_Casing_Copper.get(1L), new ItemData(Materials.Copper, 1814400L)); GT_OreDictUnificator.addItemData(ItemList.IC2_Item_Casing_Tin.get(1L), new ItemData(Materials.Tin, 1814400L)); GT_OreDictUnificator.addItemData(ItemList.IC2_Item_Casing_Lead.get(1L), new ItemData(Materials.Lead, 1814400L)); - GT_OreDictUnificator.addItemData(ItemList.IC2_Item_Casing_Steel.get(1L), new ItemData(Materials.Steel, 1814400L)); + GT_OreDictUnificator.addItemData( + ItemList.IC2_Item_Casing_Steel.get(1L), new ItemData(Materials.Steel, 1814400L)); GT_OreDictUnificator.addItemData(new ItemStack(Items.book, 1, 32767), new ItemData(Materials.Paper, 10886400L)); - GT_OreDictUnificator.addItemData(new ItemStack(Items.written_book, 1, 32767), new ItemData(Materials.Paper, 10886400L)); - GT_OreDictUnificator.addItemData(new ItemStack(Items.writable_book, 1, 32767), new ItemData(Materials.Paper, 10886400L)); - GT_OreDictUnificator.addItemData(new ItemStack(Items.enchanted_book, 1, 32767), new ItemData(Materials.Paper, 10886400L)); - GT_OreDictUnificator.addItemData(new ItemStack(Items.golden_apple, 1, 1), new ItemData(Materials.Gold, OrePrefixes.block.mMaterialAmount * 8L)); - GT_OreDictUnificator.addItemData(new ItemStack(Items.golden_apple, 1, 0), new ItemData(Materials.Gold, OrePrefixes.ingot.mMaterialAmount * 8L)); - GT_OreDictUnificator.addItemData(new ItemStack(Items.golden_carrot, 1, 0), new ItemData(Materials.Gold, OrePrefixes.nugget.mMaterialAmount * 8L)); - GT_OreDictUnificator.addItemData(new ItemStack(Items.speckled_melon, 1, 0), new ItemData(Materials.Gold, OrePrefixes.nugget.mMaterialAmount * 8L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Items.written_book, 1, 32767), new ItemData(Materials.Paper, 10886400L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Items.writable_book, 1, 32767), new ItemData(Materials.Paper, 10886400L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Items.enchanted_book, 1, 32767), new ItemData(Materials.Paper, 10886400L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Items.golden_apple, 1, 1), + new ItemData(Materials.Gold, OrePrefixes.block.mMaterialAmount * 8L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Items.golden_apple, 1, 0), + new ItemData(Materials.Gold, OrePrefixes.ingot.mMaterialAmount * 8L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Items.golden_carrot, 1, 0), + new ItemData(Materials.Gold, OrePrefixes.nugget.mMaterialAmount * 8L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Items.speckled_melon, 1, 0), + new ItemData(Materials.Gold, OrePrefixes.nugget.mMaterialAmount * 8L)); GT_OreDictUnificator.addItemData(new ItemStack(Items.minecart, 1), new ItemData(Materials.Iron, 18144000L)); GT_OreDictUnificator.addItemData(new ItemStack(Items.iron_door, 1), new ItemData(Materials.Iron, 21772800L)); GT_OreDictUnificator.addItemData(new ItemStack(Items.cauldron, 1), new ItemData(Materials.Iron, 25401600L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.iron_bars, 8, 32767), new ItemData(Materials.Iron, 10886400L)); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem(MOD_ID_DC, "item.SteelBars", 8L, 0), new ItemData(Materials.Steel, 10886400L)); - GT_OreDictUnificator.addItemData(GT_ModHandler.getIC2Item("ironFurnace", 1L), new ItemData(Materials.Iron, 18144000L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.iron_bars, 8, 32767), new ItemData(Materials.Iron, 10886400L)); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getModItem(MOD_ID_DC, "item.SteelBars", 8L, 0), new ItemData(Materials.Steel, 10886400L)); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getIC2Item("ironFurnace", 1L), new ItemData(Materials.Iron, 18144000L)); GT_OreDictUnificator.addItemData(ItemList.IC2_Food_Can_Empty.get(1L), new ItemData(Materials.Tin, 1814400L)); GT_OreDictUnificator.addItemData(ItemList.IC2_Fuel_Rod_Empty.get(1L), new ItemData(Materials.Iron, 3628800L)); GT_OreDictUnificator.addItemData(ItemList.IC2_Fuel_Can_Empty.get(1L), new ItemData(Materials.Tin, 25401600L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.light_weighted_pressure_plate, 1, 32767), new ItemData(Materials.Gold, 7257600L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.heavy_weighted_pressure_plate, 1, 32767), new ItemData(Materials.Iron, 7257600L)); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("Railcraft", "tile.railcraft.anvil", 1L, 0), new ItemData(Materials.Steel, 108864000L)); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("Railcraft", "tile.railcraft.anvil", 1L, 1), new ItemData(Materials.Steel, 72576000L)); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("Railcraft", "tile.railcraft.anvil", 1L, 2), new ItemData(Materials.Steel, 36288000L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.light_weighted_pressure_plate, 1, 32767), new ItemData(Materials.Gold, 7257600L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.heavy_weighted_pressure_plate, 1, 32767), new ItemData(Materials.Iron, 7257600L)); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getModItem("Railcraft", "tile.railcraft.anvil", 1L, 0), + new ItemData(Materials.Steel, 108864000L)); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getModItem("Railcraft", "tile.railcraft.anvil", 1L, 1), + new ItemData(Materials.Steel, 72576000L)); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getModItem("Railcraft", "tile.railcraft.anvil", 1L, 2), + new ItemData(Materials.Steel, 36288000L)); GT_OreDictUnificator.addItemData(new ItemStack(Blocks.anvil, 1, 0), new ItemData(Materials.Iron, 108864000L)); GT_OreDictUnificator.addItemData(new ItemStack(Blocks.anvil, 1, 1), new ItemData(Materials.Iron, 72576000L)); GT_OreDictUnificator.addItemData(new ItemStack(Blocks.anvil, 1, 2), new ItemData(Materials.Iron, 36288000L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.hopper, 1, 32767), new ItemData(Materials.Iron, 18144000L, new MaterialStack(Materials.Wood, 29030400L))); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.hopper, 1, 32767), + new ItemData(Materials.Iron, 18144000L, new MaterialStack(Materials.Wood, 29030400L))); GT_OreDictUnificator.addItemData(ItemList.Cell_Universal_Fluid.get(1L), new ItemData(Materials.Tin, 7257600L)); GT_OreDictUnificator.addItemData(ItemList.Cell_Empty.get(1L), new ItemData(Materials.Tin, 7257600L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.tripwire_hook, 1, 32767), new ItemData(Materials.Iron, OrePrefixes.ring.mMaterialAmount * 2L, new MaterialStack(Materials.Wood, 3628800L))); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.tripwire_hook, 1, 32767), + new ItemData( + Materials.Iron, + OrePrefixes.ring.mMaterialAmount * 2L, + new MaterialStack(Materials.Wood, 3628800L))); GT_OreDictUnificator.addItemData(ItemList.Bottle_Empty.get(1L), new ItemData(Materials.Glass, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Items.potionitem, 1, 32767), new ItemData(Materials.Glass, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stained_glass, 1, 32767), new ItemData(Materials.Glass, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.glass, 1, 32767), new ItemData(Materials.Glass, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stained_glass_pane, 1, 32767), new ItemData(Materials.Glass, 1360800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.glass_pane, 1, 32767), new ItemData(Materials.Glass, 1360800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Items.clock, 1, 32767), new ItemData(Materials.Gold, 14515200L, new MaterialStack(Materials.Redstone, 3628800L))); - GT_OreDictUnificator.addItemData(new ItemStack(Items.compass, 1, 32767), new ItemData(Materials.Iron, 14515200L, new MaterialStack(Materials.Redstone, 3628800L))); - GT_OreDictUnificator.addItemData(new ItemStack(Items.iron_horse_armor, 1, 32767), new ItemData(Materials.Iron, 29030400L, new MaterialStack(Materials.Leather, 21772800L))); - GT_OreDictUnificator.addItemData(new ItemStack(Items.golden_horse_armor, 1, 32767), new ItemData(Materials.Gold, 29030400L, new MaterialStack(Materials.Leather, 21772800L))); - GT_OreDictUnificator.addItemData(new ItemStack(Items.diamond_horse_armor, 1, 32767), new ItemData(Materials.Diamond, 29030400L, new MaterialStack(Materials.Leather, 21772800L))); - GT_OreDictUnificator.addItemData(new ItemStack(Items.leather, 1, 32767), new ItemData(Materials.Leather, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.beacon, 1, 32767), new ItemData(Materials.NetherStar, 3628800L, new MaterialStack(Materials.Obsidian, 10886400L), new MaterialStack(Materials.Glass, 18144000L))); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.enchanting_table, 1, 32767), new ItemData(Materials.Diamond, 7257600L, new MaterialStack(Materials.Obsidian, 14515200L), new MaterialStack(Materials.Paper, 10886400L))); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.ender_chest, 1, 32767), new ItemData(Materials.EnderEye, 3628800L, new MaterialStack(Materials.Obsidian, 29030400L))); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.bookshelf, 1, 32767), new ItemData(Materials.Paper, 32659200L, new MaterialStack(Materials.Wood, 21772800L))); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.lever, 1, 32767), new ItemData(Materials.Stone, 3628800L, new MaterialStack(Materials.Wood, 1814400L))); + GT_OreDictUnificator.addItemData( + new ItemStack(Items.potionitem, 1, 32767), new ItemData(Materials.Glass, 3628800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.stained_glass, 1, 32767), new ItemData(Materials.Glass, 3628800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.glass, 1, 32767), new ItemData(Materials.Glass, 3628800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.stained_glass_pane, 1, 32767), new ItemData(Materials.Glass, 1360800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.glass_pane, 1, 32767), new ItemData(Materials.Glass, 1360800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Items.clock, 1, 32767), + new ItemData(Materials.Gold, 14515200L, new MaterialStack(Materials.Redstone, 3628800L))); + GT_OreDictUnificator.addItemData( + new ItemStack(Items.compass, 1, 32767), + new ItemData(Materials.Iron, 14515200L, new MaterialStack(Materials.Redstone, 3628800L))); + GT_OreDictUnificator.addItemData( + new ItemStack(Items.iron_horse_armor, 1, 32767), + new ItemData(Materials.Iron, 29030400L, new MaterialStack(Materials.Leather, 21772800L))); + GT_OreDictUnificator.addItemData( + new ItemStack(Items.golden_horse_armor, 1, 32767), + new ItemData(Materials.Gold, 29030400L, new MaterialStack(Materials.Leather, 21772800L))); + GT_OreDictUnificator.addItemData( + new ItemStack(Items.diamond_horse_armor, 1, 32767), + new ItemData(Materials.Diamond, 29030400L, new MaterialStack(Materials.Leather, 21772800L))); + GT_OreDictUnificator.addItemData( + new ItemStack(Items.leather, 1, 32767), new ItemData(Materials.Leather, 3628800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.beacon, 1, 32767), + new ItemData( + Materials.NetherStar, + 3628800L, + new MaterialStack(Materials.Obsidian, 10886400L), + new MaterialStack(Materials.Glass, 18144000L))); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.enchanting_table, 1, 32767), + new ItemData( + Materials.Diamond, + 7257600L, + new MaterialStack(Materials.Obsidian, 14515200L), + new MaterialStack(Materials.Paper, 10886400L))); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.ender_chest, 1, 32767), + new ItemData(Materials.EnderEye, 3628800L, new MaterialStack(Materials.Obsidian, 29030400L))); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.bookshelf, 1, 32767), + new ItemData(Materials.Paper, 32659200L, new MaterialStack(Materials.Wood, 21772800L))); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.lever, 1, 32767), + new ItemData(Materials.Stone, 3628800L, new MaterialStack(Materials.Wood, 1814400L))); GT_OreDictUnificator.addItemData(new ItemStack(Blocks.ice, 1, 32767), new ItemData(Materials.Ice, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.packed_ice, 1, 32767), new ItemData(Materials.Ice, 7257600L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.packed_ice, 1, 32767), new ItemData(Materials.Ice, 7257600L)); GT_OreDictUnificator.addItemData(new ItemStack(Blocks.snow, 1, 32767), new ItemData(Materials.Snow, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Items.snowball, 1, 32767), new ItemData(Materials.Snow, 907200L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Items.snowball, 1, 32767), new ItemData(Materials.Snow, 907200L)); GT_OreDictUnificator.addItemData(new ItemStack(Blocks.snow_layer, 1, 32767), new ItemData(Materials.Snow, -1L)); GT_OreDictUnificator.addItemData(new ItemStack(Blocks.sand, 1, 32767), new ItemData(Materials.Sand, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.sandstone, 1, 32767), new ItemData(Materials.Sand, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stone_slab, 1, 0), new ItemData(Materials.Stone, 1814400L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stone_slab, 1, 8), new ItemData(Materials.Stone, 1814400L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.double_stone_slab, 1, 0), new ItemData(Materials.Stone, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.double_stone_slab, 1, 8), new ItemData(Materials.Stone, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stone_slab, 1, 1), new ItemData(Materials.Sand, 1814400L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stone_slab, 1, 9), new ItemData(Materials.Sand, 1814400L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.double_stone_slab, 1, 1), new ItemData(Materials.Sand, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.double_stone_slab, 1, 9), new ItemData(Materials.Sand, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stone_slab, 1, 2), new ItemData(Materials.Wood, 1814400L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stone_slab, 1, 10), new ItemData(Materials.Wood, 1814400L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.double_stone_slab, 1, 2), new ItemData(Materials.Wood, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.double_stone_slab, 1, 10), new ItemData(Materials.Wood, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stone_slab, 1, 3), new ItemData(Materials.Stone, 1814400L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stone_slab, 1, 11), new ItemData(Materials.Stone, 1814400L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.double_stone_slab, 1, 3), new ItemData(Materials.Stone, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.double_stone_slab, 1, 11), new ItemData(Materials.Stone, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stone_slab, 1, 5), new ItemData(Materials.Stone, 1814400L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stone_slab, 1, 13), new ItemData(Materials.Stone, 1814400L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.double_stone_slab, 1, 5), new ItemData(Materials.Stone, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.double_stone_slab, 1, 13), new ItemData(Materials.Stone, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stone, 1, 32767), new ItemData(Materials.Stone, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.furnace, 1, 32767), new ItemData(Materials.Stone, 29030400L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.lit_furnace, 1, 32767), new ItemData(Materials.Stone, 29030400L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stonebrick, 1, 32767), new ItemData(Materials.Stone, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.cobblestone, 1, 32767), new ItemData(Materials.Stone, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.mossy_cobblestone, 1, 32767), new ItemData(Materials.Stone, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stone_button, 1, 32767), new ItemData(Materials.Stone, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.stone_pressure_plate, 1, 32767), new ItemData(Materials.Stone, 7257600L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.ladder, 1, 32767), new ItemData(Materials.Wood, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.wooden_button, 1, 32767), new ItemData(Materials.Wood, 3628800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.wooden_pressure_plate, 1, 32767), new ItemData(Materials.Wood, 7257600L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.sandstone, 1, 32767), new ItemData(Materials.Sand, 3628800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.stone_slab, 1, 0), new ItemData(Materials.Stone, 1814400L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.stone_slab, 1, 8), new ItemData(Materials.Stone, 1814400L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.double_stone_slab, 1, 0), new ItemData(Materials.Stone, 3628800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.double_stone_slab, 1, 8), new ItemData(Materials.Stone, 3628800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.stone_slab, 1, 1), new ItemData(Materials.Sand, 1814400L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.stone_slab, 1, 9), new ItemData(Materials.Sand, 1814400L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.double_stone_slab, 1, 1), new ItemData(Materials.Sand, 3628800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.double_stone_slab, 1, 9), new ItemData(Materials.Sand, 3628800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.stone_slab, 1, 2), new ItemData(Materials.Wood, 1814400L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.stone_slab, 1, 10), new ItemData(Materials.Wood, 1814400L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.double_stone_slab, 1, 2), new ItemData(Materials.Wood, 3628800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.double_stone_slab, 1, 10), new ItemData(Materials.Wood, 3628800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.stone_slab, 1, 3), new ItemData(Materials.Stone, 1814400L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.stone_slab, 1, 11), new ItemData(Materials.Stone, 1814400L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.double_stone_slab, 1, 3), new ItemData(Materials.Stone, 3628800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.double_stone_slab, 1, 11), new ItemData(Materials.Stone, 3628800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.stone_slab, 1, 5), new ItemData(Materials.Stone, 1814400L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.stone_slab, 1, 13), new ItemData(Materials.Stone, 1814400L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.double_stone_slab, 1, 5), new ItemData(Materials.Stone, 3628800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.double_stone_slab, 1, 13), new ItemData(Materials.Stone, 3628800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.stone, 1, 32767), new ItemData(Materials.Stone, 3628800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.furnace, 1, 32767), new ItemData(Materials.Stone, 29030400L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.lit_furnace, 1, 32767), new ItemData(Materials.Stone, 29030400L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.stonebrick, 1, 32767), new ItemData(Materials.Stone, 3628800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.cobblestone, 1, 32767), new ItemData(Materials.Stone, 3628800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.mossy_cobblestone, 1, 32767), new ItemData(Materials.Stone, 3628800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.stone_button, 1, 32767), new ItemData(Materials.Stone, 3628800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.stone_pressure_plate, 1, 32767), new ItemData(Materials.Stone, 7257600L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.ladder, 1, 32767), new ItemData(Materials.Wood, 3628800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.wooden_button, 1, 32767), new ItemData(Materials.Wood, 3628800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.wooden_pressure_plate, 1, 32767), new ItemData(Materials.Wood, 7257600L)); GT_OreDictUnificator.addItemData(new ItemStack(Blocks.fence, 1, 32767), new ItemData(Materials.Wood, 5443200L)); GT_OreDictUnificator.addItemData(new ItemStack(Items.bowl, 1, 32767), new ItemData(Materials.Wood, 3628800L)); GT_OreDictUnificator.addItemData(new ItemStack(Items.sign, 1, 32767), new ItemData(Materials.Wood, 7257600L)); - GT_OreDictUnificator.addItemData(new ItemStack(Items.wooden_door, 1, 32767), new ItemData(Materials.Wood, 21772800L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.chest, 1, 32767), new ItemData(Materials.Wood, 29030400L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.trapped_chest, 1, 32767), new ItemData(Materials.Wood, 32659200L, new MaterialStack(Materials.Iron, OrePrefixes.ring.mMaterialAmount * 2L))); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.unlit_redstone_torch, 1, 32767), new ItemData(Materials.Wood, 1814400L, new MaterialStack(Materials.Redstone, 3628800L))); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.redstone_torch, 1, 32767), new ItemData(Materials.Wood, 1814400L, new MaterialStack(Materials.Redstone, 3628800L))); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.noteblock, 1, 32767), new ItemData(Materials.Wood, 29030400L, new MaterialStack(Materials.Redstone, 3628800L))); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.jukebox, 1, 32767), new ItemData(Materials.Wood, 29030400L, new MaterialStack(Materials.Diamond, 3628800L))); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.crafting_table, 1, 32767), new ItemData(Materials.Wood, 14515200L)); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.piston, 1, 32767), new ItemData(Materials.Stone, 14515200L, new MaterialStack(Materials.Wood, 10886400L))); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.sticky_piston, 1, 32767), new ItemData(Materials.Stone, 14515200L, new MaterialStack(Materials.Wood, 10886400L))); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.dispenser, 1, 32767), new ItemData(Materials.Stone, 25401600L, new MaterialStack(Materials.Redstone, 3628800L))); - GT_OreDictUnificator.addItemData(new ItemStack(Blocks.dropper, 1, 32767), new ItemData(Materials.Stone, 25401600L, new MaterialStack(Materials.Redstone, 3628800L))); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("Thaumcraft", "ItemNuggetChicken", 1L, 32767), new ItemData(Materials.MeatCooked, 403200L)); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("Thaumcraft", "ItemNuggetBeef", 1L, 32767), new ItemData(Materials.MeatCooked, 403200L)); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("Thaumcraft", "ItemNuggetPork", 1L, 32767), new ItemData(Materials.MeatCooked, 403200L)); - GT_OreDictUnificator.addItemData(GT_ModHandler.getModItem("Thaumcraft", "ItemNuggetFish", 1L, 32767), new ItemData(Materials.MeatCooked, 403200L)); - for (ItemStack tItem : new ItemStack[]{GT_ModHandler.getModItem("TwilightForest", "item.meefRaw", 1L, 0), GT_ModHandler.getModItem("TwilightForest", "item.venisonRaw", 1L, 0), new ItemStack(Items.porkchop), new ItemStack(Items.beef), new ItemStack(Items.chicken), new ItemStack(Items.fish)}) { + GT_OreDictUnificator.addItemData( + new ItemStack(Items.wooden_door, 1, 32767), new ItemData(Materials.Wood, 21772800L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.chest, 1, 32767), new ItemData(Materials.Wood, 29030400L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.trapped_chest, 1, 32767), + new ItemData( + Materials.Wood, + 32659200L, + new MaterialStack(Materials.Iron, OrePrefixes.ring.mMaterialAmount * 2L))); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.unlit_redstone_torch, 1, 32767), + new ItemData(Materials.Wood, 1814400L, new MaterialStack(Materials.Redstone, 3628800L))); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.redstone_torch, 1, 32767), + new ItemData(Materials.Wood, 1814400L, new MaterialStack(Materials.Redstone, 3628800L))); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.noteblock, 1, 32767), + new ItemData(Materials.Wood, 29030400L, new MaterialStack(Materials.Redstone, 3628800L))); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.jukebox, 1, 32767), + new ItemData(Materials.Wood, 29030400L, new MaterialStack(Materials.Diamond, 3628800L))); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.crafting_table, 1, 32767), new ItemData(Materials.Wood, 14515200L)); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.piston, 1, 32767), + new ItemData(Materials.Stone, 14515200L, new MaterialStack(Materials.Wood, 10886400L))); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.sticky_piston, 1, 32767), + new ItemData(Materials.Stone, 14515200L, new MaterialStack(Materials.Wood, 10886400L))); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.dispenser, 1, 32767), + new ItemData(Materials.Stone, 25401600L, new MaterialStack(Materials.Redstone, 3628800L))); + GT_OreDictUnificator.addItemData( + new ItemStack(Blocks.dropper, 1, 32767), + new ItemData(Materials.Stone, 25401600L, new MaterialStack(Materials.Redstone, 3628800L))); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getModItem("Thaumcraft", "ItemNuggetChicken", 1L, 32767), + new ItemData(Materials.MeatCooked, 403200L)); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getModItem("Thaumcraft", "ItemNuggetBeef", 1L, 32767), + new ItemData(Materials.MeatCooked, 403200L)); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getModItem("Thaumcraft", "ItemNuggetPork", 1L, 32767), + new ItemData(Materials.MeatCooked, 403200L)); + GT_OreDictUnificator.addItemData( + GT_ModHandler.getModItem("Thaumcraft", "ItemNuggetFish", 1L, 32767), + new ItemData(Materials.MeatCooked, 403200L)); + for (ItemStack tItem : new ItemStack[] { + GT_ModHandler.getModItem("TwilightForest", "item.meefRaw", 1L, 0), + GT_ModHandler.getModItem("TwilightForest", "item.venisonRaw", 1L, 0), + new ItemStack(Items.porkchop), + new ItemStack(Items.beef), + new ItemStack(Items.chicken), + new ItemStack(Items.fish) + }) { if (tItem != null) { - GT_OreDictUnificator.addItemData(GT_Utility.copyMetaData(32767L, tItem), new ItemData(Materials.MeatRaw, 3628800L, new MaterialStack(Materials.Bone, 403200L))); + GT_OreDictUnificator.addItemData( + GT_Utility.copyMetaData(32767L, tItem), + new ItemData(Materials.MeatRaw, 3628800L, new MaterialStack(Materials.Bone, 403200L))); } } - for (ItemStack tItem : new ItemStack[]{GT_ModHandler.getModItem("TwilightForest", "item.meefSteak", 1L, 0), GT_ModHandler.getModItem("TwilightForest", "item.venisonCooked", 1L, 0), new ItemStack(Items.cooked_porkchop), new ItemStack(Items.cooked_beef), new ItemStack(Items.cooked_chicken), new ItemStack(Items.cooked_fished)}) { + for (ItemStack tItem : new ItemStack[] { + GT_ModHandler.getModItem("TwilightForest", "item.meefSteak", 1L, 0), + GT_ModHandler.getModItem("TwilightForest", "item.venisonCooked", 1L, 0), + new ItemStack(Items.cooked_porkchop), + new ItemStack(Items.cooked_beef), + new ItemStack(Items.cooked_chicken), + new ItemStack(Items.cooked_fished) + }) { if (tItem != null) { - GT_OreDictUnificator.addItemData(GT_Utility.copyMetaData(32767L, tItem), new ItemData(Materials.MeatCooked, 3628800L, new MaterialStack(Materials.Bone, 403200L))); + GT_OreDictUnificator.addItemData( + GT_Utility.copyMetaData(32767L, tItem), + new ItemData(Materials.MeatCooked, 3628800L, new MaterialStack(Materials.Bone, 403200L))); } } } diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java index e8c88d6322..66a241604b 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java @@ -18,27 +18,26 @@ import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.common.blocks.*; import gregtech.common.items.*; +import java.util.Locale; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -import java.util.Locale; - public class GT_Loader_Item_Block_And_Fluid implements Runnable { @Override public void run() { - Materials.Water.mFluid = (Materials.Ice.mFluid = GT_ModHandler.getWater(1000L).getFluid()); + Materials.Water.mFluid = + (Materials.Ice.mFluid = GT_ModHandler.getWater(1000L).getFluid()); Materials.Lava.mFluid = GT_ModHandler.getLava(1000L).getFluid(); GT_Log.out.println("GT_Mod: Register Books."); - GT_Utility.getWrittenBook("Manual_Printer", "Printer Manual V2.0", "Gregorius Techneticies", new String[]{ + GT_Utility.getWrittenBook("Manual_Printer", "Printer Manual V2.0", "Gregorius Techneticies", new String[] { "This Manual explains the different Functionalities the GregTech Printing Factory has built in, which are not in NEI. Most got NEI Support now, but there is still some left without it.", "1. Coloring Items and Blocks: You know those Crafting Recipes, which have a dye surrounded by 8 Item to dye them? Or the ones which have just one Item and one Dye in the Grid? Those two Recipe Types can be cheaply automated using the Printer.", "The Colorization Functionality even optimizes the Recipes, which normally require 8 Items + 1 Dye to 1 Item and an 8th of the normally used Dye in Fluid Form, isn't that awesome?", @@ -46,26 +45,36 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { "Now insert the Stick into the Data Slot of the Printer and add 3 pieces of Paper together with 144 Liters of actual Ink Fluid. Water mixed and chemical Dyes won't work on Paper without messing things up!", "You got a stack of Pages for your new Book, just put them into the Assembler with some Glue and a piece of Leather for the Binding, and you receive an identical copy of the Book, which would stack together with the original.", "3. Renaming Items: This Functionality is no longer Part of the Printer. There is now a Name Mold for the Forming Press to imprint a Name into an Item, just rename the Mold in an Anvil and use it in the Forming Press on any Item.", - "4. Crafting of Books, Maps, Nametags etc etc etc: Those Recipes moved to other Machines, just look them up in NEI."}); - - GT_Utility.getWrittenBook("Manual_Punch_Cards", "Punch Card Manual V0.0", "Gregorius Techneticies", new String[]{ - "This Manual will explain the Functionality of the Punch Cards, once they are fully implemented. And no, they won't be like the IRL Punch Cards. This is just a current Idea Collection.", - "(i1&&i2)?o1=15:o1=0;=10", "ignore all Whitespace Characters, use Long for saving the Numbers", "&& || ^^ & | ^ ! ++ -- + - % / // * ** << >> >>> < > <= >= == != ~ ( ) ?: , ; ;= ;=X; = i0 i1 i2 i3 i4 i5 o0 o1 o2 o3 o4 o5 v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 m0 m1 m2 m3 m4 m5 m6 m7 m8 m9 A B C D E F", - "'0' = false, 'everything but 0' = true, '!' turns '0' into '1' and everything else into '0'", "',' is just a separator for multiple executed Codes in a row.", - "';' means that the Program waits until the next tick before continuing. ';=10' and ';=10;' both mean that it will wait 10 Ticks instead of 1. And ';=0' or anything < 0 will default to 0.", - "If the '=' Operator is used within Brackets, it returns the value the variable has been set to.", "The Program saves the Char Index of the current Task, the 10 Variables (which reset to 0 as soon as the Program Loop stops), the 10 Member Variables and the remaining waiting Time in its NBT.", - "A = 10, B = 11, C = 12, D = 13, E = 14, F = 15, just for Hexadecimal Space saving, since Redstone has only 4 Bits.", - "For implementing Loops you just need 1 Punch Card per Loop, these Cards can restart once they are finished, depending on how many other Cards there are in the Program Loop you inserted your Card into, since it will process them procedurally.", - "A Punch Card Processor can run up to four Loops, each with the length of seven Punch Cards, parallel.", - "Why does the Punch Card need Ink to be made, you ask? Because the empty one needs to have some lines on, and the for the punched one it prints the Code to execute in a human readable format on the Card."}); - - GT_Utility.getWrittenBook("Manual_Microwave", "Microwave Oven Manual", "Kitchen Industries", new String[]{ + "4. Crafting of Books, Maps, Nametags etc etc etc: Those Recipes moved to other Machines, just look them up in NEI." + }); + + GT_Utility.getWrittenBook( + "Manual_Punch_Cards", "Punch Card Manual V0.0", "Gregorius Techneticies", new String[] { + "This Manual will explain the Functionality of the Punch Cards, once they are fully implemented. And no, they won't be like the IRL Punch Cards. This is just a current Idea Collection.", + "(i1&&i2)?o1=15:o1=0;=10", + "ignore all Whitespace Characters, use Long for saving the Numbers", + "&& || ^^ & | ^ ! ++ -- + - % / // * ** << >> >>> < > <= >= == != ~ ( ) ?: , ; ;= ;=X; = i0 i1 i2 i3 i4 i5 o0 o1 o2 o3 o4 o5 v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 m0 m1 m2 m3 m4 m5 m6 m7 m8 m9 A B C D E F", + "'0' = false, 'everything but 0' = true, '!' turns '0' into '1' and everything else into '0'", + "',' is just a separator for multiple executed Codes in a row.", + "';' means that the Program waits until the next tick before continuing. ';=10' and ';=10;' both mean that it will wait 10 Ticks instead of 1. And ';=0' or anything < 0 will default to 0.", + "If the '=' Operator is used within Brackets, it returns the value the variable has been set to.", + "The Program saves the Char Index of the current Task, the 10 Variables (which reset to 0 as soon as the Program Loop stops), the 10 Member Variables and the remaining waiting Time in its NBT.", + "A = 10, B = 11, C = 12, D = 13, E = 14, F = 15, just for Hexadecimal Space saving, since Redstone has only 4 Bits.", + "For implementing Loops you just need 1 Punch Card per Loop, these Cards can restart once they are finished, depending on how many other Cards there are in the Program Loop you inserted your Card into, since it will process them procedurally.", + "A Punch Card Processor can run up to four Loops, each with the length of seven Punch Cards, parallel.", + "Why does the Punch Card need Ink to be made, you ask? Because the empty one needs to have some lines on, and the for the punched one it prints the Code to execute in a human readable format on the Card." + }); + + GT_Utility.getWrittenBook("Manual_Microwave", "Microwave Oven Manual", "Kitchen Industries", new String[] { "Congratulations, you inserted a random seemingly empty Book into the Microwave and these Letters appeared out of nowhere.", "You just got a Microwave Oven and asked yourself 'why do I even need it?'. It's simple, the Microwave can cook for just 128 EU and at an insane speed. Not even a normal E-furnace can do it that fast and cheap!", "This is the cheapest and fastest way to cook for you. That is why the Microwave Oven can be found in almost every Kitchen (see www.youwannabuyakitchen.ly).", "Long time exposure to Microwaves can cause Cancer, but we doubt Steve lives long enough to die because of that.", - "Do not insert any Metals. It might result in an Explosion.", "Do not dry Animals with it. It will result in a Hot Dog, no matter which Animal you put into it.", - "Do not insert inflammable Objects. The Oven will catch on Fire.", "Do not insert Explosives such as Eggs. Just don't."}); + "Do not insert any Metals. It might result in an Explosion.", + "Do not dry Animals with it. It will result in a Hot Dog, no matter which Animal you put into it.", + "Do not insert inflammable Objects. The Oven will catch on Fire.", + "Do not insert Explosives such as Eggs. Just don't." + }); GT_Log.out.println("GT_Mod: Register Items."); @@ -73,14 +82,17 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { new GT_MetaGenerated_Item_01(); new GT_MetaGenerated_Item_02(); new GT_MetaGenerated_Item_03(); - // GT_MetaGenerated_Item_98 is initialized in GT_Proxy.onPostLoad() because we need to wait for fluids to be registered. - // Pre-initialization needs to happen before then, though, because the cell icons get deleted at some point between load and post-load. + // GT_MetaGenerated_Item_98 is initialized in GT_Proxy.onPostLoad() because we need to wait for fluids to be + // registered. + // Pre-initialization needs to happen before then, though, because the cell icons get deleted at some point + // between load and post-load. GT_MetaGenerated_Item_98.preInit(); new GT_MetaGenerated_Item_99(); new GT_MetaGenerated_Tool_01(); new GT_FluidDisplayItem(); - //Tiered recipe materials actually appear to be set in GT_MetaTileEntity_BasicMachine_GT_Recipe, making these unused + // Tiered recipe materials actually appear to be set in GT_MetaTileEntity_BasicMachine_GT_Recipe, making these + // unused ItemList.Rotor_LV.set(GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Tin, 1L)); ItemList.Rotor_MV.set(GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Bronze, 1L)); ItemList.Rotor_HV.set(GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Steel, 1L)); @@ -89,124 +101,405 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { ItemList.VOLUMETRIC_FLASK.set(new GT_VolumetricFlask("Volumetric_Flask", "Volumetric flask", 1000)); - Item tItem = (Item) GT_Utility.callConstructor("gregtech.common.items.GT_SensorCard_Item", 0, null, false, new Object[]{"sensorcard", "GregTech Sensor Card"}); - ItemList.NC_SensorCard.set(tItem == null ? new GT_Generic_Item("sensorcard", "GregTech Sensor Card", "Nuclear Control not installed", false) : tItem); - - ItemList.Neutron_Reflector.set(new GT_NeutronReflector_Item("neutronreflector", "Iridium Neutron Reflector", 0)); - - ItemList.Reactor_Coolant_He_1.set(GregTech_API.constructCoolantCellItem("60k_Helium_Coolantcell", "60k He Coolant Cell", 60000)); - GT_ModHandler.addCraftingRecipe(ItemList.Reactor_Coolant_He_1.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{" P ", "PCP", " P ", 'C', OrePrefixes.cell.get(Materials.Helium), 'P', OrePrefixes.plate.get(Materials.Tin)}); - - ItemList.Reactor_Coolant_He_3.set(GregTech_API.constructCoolantCellItem("180k_Helium_Coolantcell", "180k He Coolant Cell", 180000)); - GT_ModHandler.addCraftingRecipe(ItemList.Reactor_Coolant_He_3.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"PCP", "PCP", "PCP", 'C', ItemList.Reactor_Coolant_He_1, 'P', OrePrefixes.plate.get(Materials.Tin)}); - - ItemList.Reactor_Coolant_He_6.set(GregTech_API.constructCoolantCellItem("360k_Helium_Coolantcell", "360k He Coolant Cell", 360000)); - GT_ModHandler.addCraftingRecipe(ItemList.Reactor_Coolant_He_6.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"PCP", "PDP", "PCP", 'C', ItemList.Reactor_Coolant_He_3, 'P', OrePrefixes.plate.get(Materials.Tin), 'D', OrePrefixes.plateDense.get(Materials.Copper)}); - - ItemList.Reactor_Coolant_NaK_1.set(GregTech_API.constructCoolantCellItem("60k_NaK_Coolantcell", "60k NaK Coolantcell", 60000)); - GT_ModHandler.addCraftingRecipe(ItemList.Reactor_Coolant_NaK_1.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"TST", "PCP", "TST", 'C', GT_ModHandler.getIC2Item("reactorCoolantSimple", 1L, 1), 'T', OrePrefixes.plate.get(Materials.Tin), 'S', OrePrefixes.dust.get(Materials.Sodium), 'P', OrePrefixes.dust.get(Materials.Potassium)}); - - ItemList.Reactor_Coolant_NaK_3.set(GregTech_API.constructCoolantCellItem("180k_NaK_Coolantcell", "180k NaK Coolantcell", 180000)); - GT_ModHandler.addCraftingRecipe(ItemList.Reactor_Coolant_NaK_3.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"PCP", "PCP", "PCP", 'C', ItemList.Reactor_Coolant_NaK_1, 'P', OrePrefixes.plate.get(Materials.Tin)}); - - ItemList.Reactor_Coolant_NaK_6.set(GregTech_API.constructCoolantCellItem("360k_NaK_Coolantcell", "360k NaK Coolantcell", 360000)); - GT_ModHandler.addCraftingRecipe(ItemList.Reactor_Coolant_NaK_6.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"PCP", "PDP", "PCP", 'C', ItemList.Reactor_Coolant_NaK_3, 'P', OrePrefixes.plate.get(Materials.Tin), 'D', OrePrefixes.plateDense.get(Materials.Copper)}); - - ItemList.Reactor_Coolant_Sp_1.set(GregTech_API.constructCoolantCellItem("180k_Space_Coolantcell", "180k Sp Coolant Cell", 180000)); - - ItemList.Reactor_Coolant_Sp_2.set(GregTech_API.constructCoolantCellItem("360k_Space_Coolantcell", "360k Sp Coolant Cell", 360000)); - - ItemList.Reactor_Coolant_Sp_3.set(GregTech_API.constructCoolantCellItem("540k_Space_Coolantcell", "540k Sp Coolant Cell", 540000)); - - ItemList.Reactor_Coolant_Sp_6.set(GregTech_API.constructCoolantCellItem("1080k_Space_Coolantcell", "1080k Sp Coolant Cell", 1080000)); - - ItemList.GlowstoneCell.set(new GT_BreederCell_Item("glowstoneCell", "Glowstone Fuel Rod", "Source of sunnarium", 3000, 1, 10000, () -> ItemList.SunnariumCell.get(1))); + Item tItem = (Item) + GT_Utility.callConstructor("gregtech.common.items.GT_SensorCard_Item", 0, null, false, new Object[] { + "sensorcard", "GregTech Sensor Card" + }); + ItemList.NC_SensorCard.set( + tItem == null + ? new GT_Generic_Item( + "sensorcard", "GregTech Sensor Card", "Nuclear Control not installed", false) + : tItem); + + ItemList.Neutron_Reflector.set( + new GT_NeutronReflector_Item("neutronreflector", "Iridium Neutron Reflector", 0)); + + ItemList.Reactor_Coolant_He_1.set( + GregTech_API.constructCoolantCellItem("60k_Helium_Coolantcell", "60k He Coolant Cell", 60000)); + GT_ModHandler.addCraftingRecipe( + ItemList.Reactor_Coolant_He_1.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + " P ", + "PCP", + " P ", + 'C', + OrePrefixes.cell.get(Materials.Helium), + 'P', + OrePrefixes.plate.get(Materials.Tin) + }); + + ItemList.Reactor_Coolant_He_3.set( + GregTech_API.constructCoolantCellItem("180k_Helium_Coolantcell", "180k He Coolant Cell", 180000)); + GT_ModHandler.addCraftingRecipe( + ItemList.Reactor_Coolant_He_3.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + "PCP", "PCP", "PCP", 'C', ItemList.Reactor_Coolant_He_1, 'P', OrePrefixes.plate.get(Materials.Tin) + }); + + ItemList.Reactor_Coolant_He_6.set( + GregTech_API.constructCoolantCellItem("360k_Helium_Coolantcell", "360k He Coolant Cell", 360000)); + GT_ModHandler.addCraftingRecipe( + ItemList.Reactor_Coolant_He_6.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + "PCP", + "PDP", + "PCP", + 'C', + ItemList.Reactor_Coolant_He_3, + 'P', + OrePrefixes.plate.get(Materials.Tin), + 'D', + OrePrefixes.plateDense.get(Materials.Copper) + }); + + ItemList.Reactor_Coolant_NaK_1.set( + GregTech_API.constructCoolantCellItem("60k_NaK_Coolantcell", "60k NaK Coolantcell", 60000)); + GT_ModHandler.addCraftingRecipe( + ItemList.Reactor_Coolant_NaK_1.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + "TST", + "PCP", + "TST", + 'C', + GT_ModHandler.getIC2Item("reactorCoolantSimple", 1L, 1), + 'T', + OrePrefixes.plate.get(Materials.Tin), + 'S', + OrePrefixes.dust.get(Materials.Sodium), + 'P', + OrePrefixes.dust.get(Materials.Potassium) + }); + + ItemList.Reactor_Coolant_NaK_3.set( + GregTech_API.constructCoolantCellItem("180k_NaK_Coolantcell", "180k NaK Coolantcell", 180000)); + GT_ModHandler.addCraftingRecipe( + ItemList.Reactor_Coolant_NaK_3.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + "PCP", "PCP", "PCP", 'C', ItemList.Reactor_Coolant_NaK_1, 'P', OrePrefixes.plate.get(Materials.Tin) + }); + + ItemList.Reactor_Coolant_NaK_6.set( + GregTech_API.constructCoolantCellItem("360k_NaK_Coolantcell", "360k NaK Coolantcell", 360000)); + GT_ModHandler.addCraftingRecipe( + ItemList.Reactor_Coolant_NaK_6.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { + "PCP", + "PDP", + "PCP", + 'C', + ItemList.Reactor_Coolant_NaK_3, + 'P', + OrePrefixes.plate.get(Materials.Tin), + 'D', + OrePrefixes.plateDense.get(Materials.Copper) + }); + + ItemList.Reactor_Coolant_Sp_1.set( + GregTech_API.constructCoolantCellItem("180k_Space_Coolantcell", "180k Sp Coolant Cell", 180000)); + + ItemList.Reactor_Coolant_Sp_2.set( + GregTech_API.constructCoolantCellItem("360k_Space_Coolantcell", "360k Sp Coolant Cell", 360000)); + + ItemList.Reactor_Coolant_Sp_3.set( + GregTech_API.constructCoolantCellItem("540k_Space_Coolantcell", "540k Sp Coolant Cell", 540000)); + + ItemList.Reactor_Coolant_Sp_6.set( + GregTech_API.constructCoolantCellItem("1080k_Space_Coolantcell", "1080k Sp Coolant Cell", 1080000)); + + ItemList.GlowstoneCell.set(new GT_BreederCell_Item( + "glowstoneCell", + "Glowstone Fuel Rod", + "Source of sunnarium", + 3000, + 1, + 10000, + () -> ItemList.SunnariumCell.get(1))); ItemList.SunnariumCell.set(new GT_DepletetCell_Item("sunnariumCell", "Sunnarium Fuel Rod", 1)); if (!GregTech_API.mIC2Classic) { - ItemList.neutroniumHeatCapacitor.set(GregTech_API.constructCoolantCellItem("neutroniumHeatCapacitor", "1G Neutronium Heat Capacitor", 1000000000)); - - ItemList.Depleted_Thorium_1.set(new GT_DepletetCell_Item("ThoriumcellDep", "Fuel Rod (Depleted Thorium)", 1)); - ItemList.Depleted_Thorium_2.set(new GT_DepletetCell_Item("Double_ThoriumcellDep", "Dual Fuel Rod (Depleted Thorium)", 1));//TODO CHECK num - ItemList.Depleted_Thorium_4.set(new GT_DepletetCell_Item("Quad_ThoriumcellDep", "Quad Fuel Rod (Depleted Thorium)", 1));//TODO CHECK num - ItemList.ThoriumCell_1.set(new GT_RadioactiveCellIC_Item("Thoriumcell", "Fuel Rod (Thorium)", 1, 50000, 0.4F, 0, 0.25F, ItemList.Depleted_Thorium_1.get(1, new Object[0]), false)); - ItemList.ThoriumCell_2.set(new GT_RadioactiveCellIC_Item("Double_Thoriumcell", "Dual Fuel Rod (Thorium)", 2, 50000, 0.4F, 0, 0.25F, ItemList.Depleted_Thorium_2.get(1, new Object[0]), false)); - ItemList.ThoriumCell_4.set(new GT_RadioactiveCellIC_Item("Quad_Thoriumcell", "Quad Fuel Rod (Thorium)", 4, 50000, 0.4F, 0, 0.25F, ItemList.Depleted_Thorium_4.get(1, new Object[0]), false)); - - GT_ModHandler.addThermalCentrifugeRecipe(ItemList.Depleted_Thorium_1.get(1, new Object[0]), 5000, new Object[]{GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Lutetium, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Thorium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 1L)}); - GT_ModHandler.addThermalCentrifugeRecipe(ItemList.Depleted_Thorium_2.get(1, new Object[0]), 5000, new Object[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lutetium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Thorium, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 3L)}); - GT_ModHandler.addThermalCentrifugeRecipe(ItemList.Depleted_Thorium_4.get(1, new Object[0]), 5000, new Object[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lutetium, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Thorium, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 6L)}); - - ItemList.Depleted_Naquadah_1.set(new GT_DepletetCell_Item("NaquadahcellDep", "Fuel Rod (Depleted Naquadah)", 1)); - ItemList.Depleted_Naquadah_2.set(new GT_DepletetCell_Item("Double_NaquadahcellDep", "Dual Fuel Rod (Depleted Naquadah)", 1)); - ItemList.Depleted_Naquadah_4.set(new GT_DepletetCell_Item("Quad_NaquadahcellDep", "Quad Fuel Rod (Depleted Naquadah)", 1)); - ItemList.NaquadahCell_1.set(new GT_RadioactiveCellIC_Item("Naquadahcell", "Fuel Rod (Naquadah)", 1, 100000, 4F, 1, 1F, ItemList.Depleted_Naquadah_1.get(1, new Object[0]), false)); - ItemList.NaquadahCell_2.set(new GT_RadioactiveCellIC_Item("Double_Naquadahcell", "Dual Fuel Rod (Naquadah)", 2, 100000, 4F, 1, 1F, ItemList.Depleted_Naquadah_2.get(1, new Object[0]), false)); - ItemList.NaquadahCell_4.set(new GT_RadioactiveCellIC_Item("Quad_Naquadahcell", "Quad Fuel Rod (Naquadah)", 4, 100000, 4F, 1, 1F, ItemList.Depleted_Naquadah_4.get(1, new Object[0]), false)); - - GT_Values.RA.addCentrifugeRecipe(ItemList.Depleted_Naquadah_1.get(1), null, null, null, - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 1L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 1L), - GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Naquadria, 2L), - GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.NaquadahEnriched, 2L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 8L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Platinum, 1L), - new int[]{10_000, 5_000, 5_000, 2_500, 10_000, 10_000}, 500, 2000); - GT_Values.RA.addCentrifugeRecipe(ItemList.Depleted_Naquadah_2.get(1), null, null, null, - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 2L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 2L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadria, 1L), - GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.NaquadahEnriched, 4L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 18L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Platinum, 2L), - new int[]{10_000, 5_000, 5_000, 2_500, 10_000, 10_000}, 1000, 2000); - GT_Values.RA.addCentrifugeRecipe(ItemList.Depleted_Naquadah_4.get(1), null, null, null, - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 4L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 4L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadria, 2L), - GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.NaquadahEnriched, 8L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 38L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Platinum, 4L), - new int[]{10_000, 5_000, 5_000, 2_500, 10_000, 10_000}, 2000, 2000); + ItemList.neutroniumHeatCapacitor.set(GregTech_API.constructCoolantCellItem( + "neutroniumHeatCapacitor", "1G Neutronium Heat Capacitor", 1000000000)); + + ItemList.Depleted_Thorium_1.set( + new GT_DepletetCell_Item("ThoriumcellDep", "Fuel Rod (Depleted Thorium)", 1)); + ItemList.Depleted_Thorium_2.set(new GT_DepletetCell_Item( + "Double_ThoriumcellDep", "Dual Fuel Rod (Depleted Thorium)", 1)); // TODO CHECK num + ItemList.Depleted_Thorium_4.set(new GT_DepletetCell_Item( + "Quad_ThoriumcellDep", "Quad Fuel Rod (Depleted Thorium)", 1)); // TODO CHECK num + ItemList.ThoriumCell_1.set(new GT_RadioactiveCellIC_Item( + "Thoriumcell", + "Fuel Rod (Thorium)", + 1, + 50000, + 0.4F, + 0, + 0.25F, + ItemList.Depleted_Thorium_1.get(1, new Object[0]), + false)); + ItemList.ThoriumCell_2.set(new GT_RadioactiveCellIC_Item( + "Double_Thoriumcell", + "Dual Fuel Rod (Thorium)", + 2, + 50000, + 0.4F, + 0, + 0.25F, + ItemList.Depleted_Thorium_2.get(1, new Object[0]), + false)); + ItemList.ThoriumCell_4.set(new GT_RadioactiveCellIC_Item( + "Quad_Thoriumcell", + "Quad Fuel Rod (Thorium)", + 4, + 50000, + 0.4F, + 0, + 0.25F, + ItemList.Depleted_Thorium_4.get(1, new Object[0]), + false)); + + GT_ModHandler.addThermalCentrifugeRecipe( + ItemList.Depleted_Thorium_1.get(1, new Object[0]), 5000, new Object[] { + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Lutetium, 2L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Thorium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 1L) + }); + GT_ModHandler.addThermalCentrifugeRecipe( + ItemList.Depleted_Thorium_2.get(1, new Object[0]), 5000, new Object[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lutetium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Thorium, 2L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 3L) + }); + GT_ModHandler.addThermalCentrifugeRecipe( + ItemList.Depleted_Thorium_4.get(1, new Object[0]), 5000, new Object[] { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lutetium, 2L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Thorium, 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 6L) + }); + + ItemList.Depleted_Naquadah_1.set( + new GT_DepletetCell_Item("NaquadahcellDep", "Fuel Rod (Depleted Naquadah)", 1)); + ItemList.Depleted_Naquadah_2.set( + new GT_DepletetCell_Item("Double_NaquadahcellDep", "Dual Fuel Rod (Depleted Naquadah)", 1)); + ItemList.Depleted_Naquadah_4.set( + new GT_DepletetCell_Item("Quad_NaquadahcellDep", "Quad Fuel Rod (Depleted Naquadah)", 1)); + ItemList.NaquadahCell_1.set(new GT_RadioactiveCellIC_Item( + "Naquadahcell", + "Fuel Rod (Naquadah)", + 1, + 100000, + 4F, + 1, + 1F, + ItemList.Depleted_Naquadah_1.get(1, new Object[0]), + false)); + ItemList.NaquadahCell_2.set(new GT_RadioactiveCellIC_Item( + "Double_Naquadahcell", + "Dual Fuel Rod (Naquadah)", + 2, + 100000, + 4F, + 1, + 1F, + ItemList.Depleted_Naquadah_2.get(1, new Object[0]), + false)); + ItemList.NaquadahCell_4.set(new GT_RadioactiveCellIC_Item( + "Quad_Naquadahcell", + "Quad Fuel Rod (Naquadah)", + 4, + 100000, + 4F, + 1, + 1F, + ItemList.Depleted_Naquadah_4.get(1, new Object[0]), + false)); + + GT_Values.RA.addCentrifugeRecipe( + ItemList.Depleted_Naquadah_1.get(1), + null, + null, + null, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Naquadria, 2L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.NaquadahEnriched, 2L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 8L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Platinum, 1L), + new int[] {10_000, 5_000, 5_000, 2_500, 10_000, 10_000}, + 500, + 2000); + GT_Values.RA.addCentrifugeRecipe( + ItemList.Depleted_Naquadah_2.get(1), + null, + null, + null, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 2L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 2L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadria, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.NaquadahEnriched, 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 18L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Platinum, 2L), + new int[] {10_000, 5_000, 5_000, 2_500, 10_000, 10_000}, + 1000, + 2000); + GT_Values.RA.addCentrifugeRecipe( + ItemList.Depleted_Naquadah_4.get(1), + null, + null, + null, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadria, 2L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.NaquadahEnriched, 8L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 38L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Platinum, 4L), + new int[] {10_000, 5_000, 5_000, 2_500, 10_000, 10_000}, + 2000, + 2000); ItemList.Depleted_MNq_1.set(new GT_DepletetCell_Item("MNqCellDep", "Fuel Rod (Depleted Nq*)", 1)); - ItemList.Depleted_MNq_2.set(new GT_DepletetCell_Item("Double_MNqCellDep", "Dual Fuel Rod (Depleted Nq*)", 1)); + ItemList.Depleted_MNq_2.set( + new GT_DepletetCell_Item("Double_MNqCellDep", "Dual Fuel Rod (Depleted Nq*)", 1)); ItemList.Depleted_MNq_4.set(new GT_DepletetCell_Item("Quad_MNqCellDep", "Quad Fuel Rod (Depleted Nq*)", 1)); - ItemList.MNqCell_1.set(new GT_RadioactiveCellIC_Item("MNqCell", "Fuel Rod (Nq* - MOX like behaviour)", 1, 100000, 4F, 1, 1F, ItemList.Depleted_MNq_1.get(1, new Object[0]), true)); - ItemList.MNqCell_2.set(new GT_RadioactiveCellIC_Item("Double_MNqCell", "Dual Fuel Rod (Nq* - MOX like behaviour)", 2, 100000, 4F, 1, 1F, ItemList.Depleted_MNq_2.get(1, new Object[0]), true)); - ItemList.MNqCell_4.set(new GT_RadioactiveCellIC_Item("Quad_MNqCell", "Quad Fuel Rod (Nq* - MOX like behaviour)", 4, 100000, 4F, 1, 1F, ItemList.Depleted_MNq_4.get(1, new Object[0]), true)); - - GT_Values.RA.addCentrifugeRecipe(ItemList.Depleted_MNq_1.get(1), null, null, null, - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 1L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 1L), - GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.NaquadahEnriched, 2L), - GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Naquadria, 2L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 8L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Platinum, 1L), - new int[]{10_000, 5_000, 5_000, 2_500, 10_000, 10_000}, 500, 2000); - GT_Values.RA.addCentrifugeRecipe(ItemList.Depleted_MNq_2.get(1), null, null, null, - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 2L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 2L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NaquadahEnriched, 1L), - GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Naquadria, 4L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 18L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Platinum, 2L), - new int[]{10_000, 5_000, 5_000, 2_500, 10_000, 10_000}, 1000, 2000); - GT_Values.RA.addCentrifugeRecipe(ItemList.Depleted_MNq_4.get(1), null, null, null, - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 4L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 4L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NaquadahEnriched, 2L), - GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Naquadria, 8L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 38L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Platinum, 4L), - new int[]{10_000, 5_000, 5_000, 2_500, 10_000, 10_000}, 2000, 2000); - - ItemList.Uraniumcell_1.set(new GT_RadioactiveCellIC_Item("reactorUraniumSimple", "Fuel Rod (Uranium)", 1, 20000, 2F, 1, 1F, GT_ModHandler.getIC2Item("reactorDepletedUraniumSimple", 1), false)); - ItemList.Uraniumcell_2.set(new GT_RadioactiveCellIC_Item("reactorUraniumDual", "Dual Fuel Rod (Uranium)", 2, 20000, 2F, 1, 1F, GT_ModHandler.getIC2Item("reactorDepletedUraniumDual", 1), false)); - ItemList.Uraniumcell_4.set(new GT_RadioactiveCellIC_Item("reactorUraniumQuad", "Quad Fuel Rod (Uranium)", 4, 20000, 2F, 1, 1F, GT_ModHandler.getIC2Item("reactorDepletedUraniumQuad", 1), false)); - ItemList.Moxcell_1.set(new GT_RadioactiveCellIC_Item("reactorMOXSimple", "Fuel Rod (Mox)", 1, 10000, 2F, 1, 1F, GT_ModHandler.getIC2Item("reactorDepletedMOXSimple", 1), true)); - ItemList.Moxcell_2.set(new GT_RadioactiveCellIC_Item("reactorMOXDual", "Dual Fuel Rod (Mox)", 2, 10000, 2F, 1, 1F, GT_ModHandler.getIC2Item("reactorDepletedMOXDual", 1), true)); - ItemList.Moxcell_4.set(new GT_RadioactiveCellIC_Item("reactorMOXQuad", "Quad Fuel Rod (Mox)", 4, 10000, 2F, 1, 1F, GT_ModHandler.getIC2Item("reactorDepletedMOXQuad", 1), true)); + ItemList.MNqCell_1.set(new GT_RadioactiveCellIC_Item( + "MNqCell", + "Fuel Rod (Nq* - MOX like behaviour)", + 1, + 100000, + 4F, + 1, + 1F, + ItemList.Depleted_MNq_1.get(1, new Object[0]), + true)); + ItemList.MNqCell_2.set(new GT_RadioactiveCellIC_Item( + "Double_MNqCell", + "Dual Fuel Rod (Nq* - MOX like behaviour)", + 2, + 100000, + 4F, + 1, + 1F, + ItemList.Depleted_MNq_2.get(1, new Object[0]), + true)); + ItemList.MNqCell_4.set(new GT_RadioactiveCellIC_Item( + "Quad_MNqCell", + "Quad Fuel Rod (Nq* - MOX like behaviour)", + 4, + 100000, + 4F, + 1, + 1F, + ItemList.Depleted_MNq_4.get(1, new Object[0]), + true)); + + GT_Values.RA.addCentrifugeRecipe( + ItemList.Depleted_MNq_1.get(1), + null, + null, + null, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.NaquadahEnriched, 2L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Naquadria, 2L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 8L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Platinum, 1L), + new int[] {10_000, 5_000, 5_000, 2_500, 10_000, 10_000}, + 500, + 2000); + GT_Values.RA.addCentrifugeRecipe( + ItemList.Depleted_MNq_2.get(1), + null, + null, + null, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 2L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 2L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NaquadahEnriched, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Naquadria, 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 18L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Platinum, 2L), + new int[] {10_000, 5_000, 5_000, 2_500, 10_000, 10_000}, + 1000, + 2000); + GT_Values.RA.addCentrifugeRecipe( + ItemList.Depleted_MNq_4.get(1), + null, + null, + null, + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NaquadahEnriched, 2L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Naquadria, 8L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TungstenSteel, 38L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Platinum, 4L), + new int[] {10_000, 5_000, 5_000, 2_500, 10_000, 10_000}, + 2000, + 2000); + + ItemList.Uraniumcell_1.set(new GT_RadioactiveCellIC_Item( + "reactorUraniumSimple", + "Fuel Rod (Uranium)", + 1, + 20000, + 2F, + 1, + 1F, + GT_ModHandler.getIC2Item("reactorDepletedUraniumSimple", 1), + false)); + ItemList.Uraniumcell_2.set(new GT_RadioactiveCellIC_Item( + "reactorUraniumDual", + "Dual Fuel Rod (Uranium)", + 2, + 20000, + 2F, + 1, + 1F, + GT_ModHandler.getIC2Item("reactorDepletedUraniumDual", 1), + false)); + ItemList.Uraniumcell_4.set(new GT_RadioactiveCellIC_Item( + "reactorUraniumQuad", + "Quad Fuel Rod (Uranium)", + 4, + 20000, + 2F, + 1, + 1F, + GT_ModHandler.getIC2Item("reactorDepletedUraniumQuad", 1), + false)); + ItemList.Moxcell_1.set(new GT_RadioactiveCellIC_Item( + "reactorMOXSimple", + "Fuel Rod (Mox)", + 1, + 10000, + 2F, + 1, + 1F, + GT_ModHandler.getIC2Item("reactorDepletedMOXSimple", 1), + true)); + ItemList.Moxcell_2.set(new GT_RadioactiveCellIC_Item( + "reactorMOXDual", + "Dual Fuel Rod (Mox)", + 2, + 10000, + 2F, + 1, + 1F, + GT_ModHandler.getIC2Item("reactorDepletedMOXDual", 1), + true)); + ItemList.Moxcell_4.set(new GT_RadioactiveCellIC_Item( + "reactorMOXQuad", + "Quad Fuel Rod (Mox)", + 4, + 10000, + 2F, + 1, + 1F, + GT_ModHandler.getIC2Item("reactorDepletedMOXQuad", 1), + true)); } GT_Log.out.println("GT_Mod: Adding Blocks."); @@ -226,220 +519,261 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { // meta ID order, DO NOT CHANGE ORDER - GregTech_API.sBlockMetal1 = new GT_Block_Metal("gt.blockmetal1", new Materials[]{ - Materials.Adamantium, - Materials.Aluminium, - Materials.Americium, - Materials.AnnealedCopper, - Materials.Antimony, - Materials.Arsenic, - Materials.AstralSilver, - Materials.BatteryAlloy, - Materials.Beryllium, - Materials.Bismuth, - Materials.BismuthBronze, - Materials.BlackBronze, - Materials.BlackSteel, - Materials.BlueAlloy, - Materials.BlueSteel, - Materials.Brass}, OrePrefixes.block, gregtech.api.enums.Textures.BlockIcons.STORAGE_BLOCKS1); - - GregTech_API.sBlockMetal2 = new GT_Block_Metal("gt.blockmetal2", new Materials[]{ - Materials.Bronze, - Materials.Caesium, - Materials.Cerium, - Materials.Chrome, - Materials.ChromiumDioxide, - Materials.Cobalt, - Materials.CobaltBrass, - Materials.Copper, - Materials.Cupronickel, - Materials.DamascusSteel, - Materials.DarkIron, - Materials.DeepIron, - Materials.Desh, - Materials.Duranium, - Materials.Dysprosium, - Materials.Electrum - }, OrePrefixes.block, gregtech.api.enums.Textures.BlockIcons.STORAGE_BLOCKS2); - - GregTech_API.sBlockMetal3 = new GT_Block_Metal("gt.blockmetal3", new Materials[]{ - Materials.ElectrumFlux, - Materials.Enderium, - Materials.Erbium, - Materials.Europium, - Materials.FierySteel, - Materials.Gadolinium, - Materials.Gallium, - Materials.Holmium, - Materials.HSLA, - Materials.Indium, - Materials.InfusedGold, - Materials.Invar, - Materials.Iridium, - Materials.IronMagnetic, - Materials.IronWood, - Materials.Kanthal - }, OrePrefixes.block, gregtech.api.enums.Textures.BlockIcons.STORAGE_BLOCKS3); - - GregTech_API.sBlockMetal4 = new GT_Block_Metal("gt.blockmetal4", new Materials[]{ - Materials.Knightmetal, - Materials.Lanthanum, - Materials.Lead, - Materials.Lutetium, - Materials.Magnalium, - Materials.Magnesium, - Materials.Manganese, - Materials.MeteoricIron, - Materials.MeteoricSteel, - Materials.Trinium, - Materials.Mithril, - Materials.Molybdenum, - Materials.Naquadah, - Materials.NaquadahAlloy, - Materials.NaquadahEnriched, - Materials.Naquadria - }, OrePrefixes.block, gregtech.api.enums.Textures.BlockIcons.STORAGE_BLOCKS4); - - GregTech_API.sBlockMetal5 = new GT_Block_Metal("gt.blockmetal5", new Materials[]{ - Materials.Neodymium, - Materials.NeodymiumMagnetic, - Materials.Neutronium, - Materials.Nichrome, - Materials.Nickel, - Materials.Niobium, - Materials.NiobiumNitride, - Materials.NiobiumTitanium, - Materials.Osmiridium, - Materials.Osmium, - Materials.Palladium, - Materials.PigIron, - Materials.Platinum, - Materials.Plutonium, - Materials.Plutonium241, - Materials.Praseodymium - }, OrePrefixes.block, gregtech.api.enums.Textures.BlockIcons.STORAGE_BLOCKS5); - - GregTech_API.sBlockMetal6 = new GT_Block_Metal("gt.blockmetal6", new Materials[]{ - Materials.Promethium, - Materials.RedAlloy, - Materials.RedSteel, - Materials.RoseGold, - Materials.Rubidium, - Materials.Samarium, - Materials.Scandium, - Materials.ShadowIron, - Materials.ShadowSteel, - Materials.Silicon, - Materials.Silver, - Materials.SolderingAlloy, - Materials.StainlessSteel, - Materials.Steel, - Materials.SteelMagnetic, - Materials.SterlingSilver - }, OrePrefixes.block, gregtech.api.enums.Textures.BlockIcons.STORAGE_BLOCKS6); - - GregTech_API.sBlockMetal7 = new GT_Block_Metal("gt.blockmetal7", new Materials[]{ - Materials.Sunnarium, - Materials.Tantalum, - Materials.Tellurium, - Materials.Terbium, - Materials.Thaumium, - Materials.Thorium, - Materials.Thulium, - Materials.Tin, - Materials.TinAlloy, - Materials.Titanium, - Materials.Tritanium, - Materials.Tungsten, - Materials.TungstenSteel, - Materials.Ultimet, - Materials.Uranium, - Materials.Uranium235 - }, OrePrefixes.block, gregtech.api.enums.Textures.BlockIcons.STORAGE_BLOCKS7); - - GregTech_API.sBlockMetal8 = new GT_Block_Metal("gt.blockmetal8", new Materials[]{ - Materials.Vanadium, - Materials.VanadiumGallium, - Materials.WroughtIron, - Materials.Ytterbium, - Materials.Yttrium, - Materials.YttriumBariumCuprate, - Materials.Zinc, - Materials.TungstenCarbide, - Materials.VanadiumSteel, - Materials.HSSG, - Materials.HSSE, - Materials.HSSS, - Materials.Steeleaf, - Materials.Ichorium, - Materials.Firestone, - Materials.Shadow - }, OrePrefixes.block, gregtech.api.enums.Textures.BlockIcons.STORAGE_BLOCKS8); - - GregTech_API.sBlockGem1 = new GT_Block_Metal("gt.blockgem1", new Materials[]{ - Materials.InfusedAir, - Materials.Amber, - Materials.Amethyst, - Materials.InfusedWater, - Materials.BlueTopaz, - Materials.CertusQuartz, - Materials.Dilithium, - Materials.EnderEye, - Materials.EnderPearl, - Materials.FoolsRuby, - Materials.Force, - Materials.Forcicium, - Materials.Forcillium, - Materials.GreenSapphire, - Materials.InfusedFire, - Materials.Jasper - }, OrePrefixes.block, gregtech.api.enums.Textures.BlockIcons.STORAGE_BLOCKS9); - - GregTech_API.sBlockGem2 = new GT_Block_Metal("gt.blockgem2", new Materials[]{ - Materials.Lazurite, - Materials.Lignite, - Materials.Monazite, - Materials.Niter, - Materials.Olivine, - Materials.Opal, - Materials.InfusedOrder, - Materials.InfusedEntropy, - Materials.TricalciumPhosphate, - Materials.Quartzite, - Materials.GarnetRed, - Materials.Ruby, - Materials.Sapphire, - Materials.Sodalite, - Materials.Tanzanite, - Materials.InfusedEarth - }, OrePrefixes.block, gregtech.api.enums.Textures.BlockIcons.STORAGE_BLOCKS10); - - GregTech_API.sBlockGem3 = new GT_Block_Metal("gt.blockgem3", new Materials[]{ - - Materials.Topaz, - Materials.Vinteum, - Materials.GarnetYellow, - Materials.NetherStar, - Materials.Charcoal, - Materials.Blaze - - }, OrePrefixes.block, gregtech.api.enums.Textures.BlockIcons.STORAGE_BLOCKS11); - - GregTech_API.sBlockMetal9 = new GT_Block_Metal("gt.blockmetal9", new Materials[]{ - Materials.Cryolite, - Materials.SiliconSG, - MaterialsKevlar.NickelAluminide, - Materials.SpaceTime - }, OrePrefixes.block, gregtech.api.enums.Textures.BlockIcons.STORAGE_BLOCKS12); - + GregTech_API.sBlockMetal1 = new GT_Block_Metal( + "gt.blockmetal1", + new Materials[] { + Materials.Adamantium, + Materials.Aluminium, + Materials.Americium, + Materials.AnnealedCopper, + Materials.Antimony, + Materials.Arsenic, + Materials.AstralSilver, + Materials.BatteryAlloy, + Materials.Beryllium, + Materials.Bismuth, + Materials.BismuthBronze, + Materials.BlackBronze, + Materials.BlackSteel, + Materials.BlueAlloy, + Materials.BlueSteel, + Materials.Brass + }, + OrePrefixes.block, + gregtech.api.enums.Textures.BlockIcons.STORAGE_BLOCKS1); + + GregTech_API.sBlockMetal2 = new GT_Block_Metal( + "gt.blockmetal2", + new Materials[] { + Materials.Bronze, + Materials.Caesium, + Materials.Cerium, + Materials.Chrome, + Materials.ChromiumDioxide, + Materials.Cobalt, + Materials.CobaltBrass, + Materials.Copper, + Materials.Cupronickel, + Materials.DamascusSteel, + Materials.DarkIron, + Materials.DeepIron, + Materials.Desh, + Materials.Duranium, + Materials.Dysprosium, + Materials.Electrum + }, + OrePrefixes.block, + gregtech.api.enums.Textures.BlockIcons.STORAGE_BLOCKS2); + + GregTech_API.sBlockMetal3 = new GT_Block_Metal( + "gt.blockmetal3", + new Materials[] { + Materials.ElectrumFlux, + Materials.Enderium, + Materials.Erbium, + Materials.Europium, + Materials.FierySteel, + Materials.Gadolinium, + Materials.Gallium, + Materials.Holmium, + Materials.HSLA, + Materials.Indium, + Materials.InfusedGold, + Materials.Invar, + Materials.Iridium, + Materials.IronMagnetic, + Materials.IronWood, + Materials.Kanthal + }, + OrePrefixes.block, + gregtech.api.enums.Textures.BlockIcons.STORAGE_BLOCKS3); + + GregTech_API.sBlockMetal4 = new GT_Block_Metal( + "gt.blockmetal4", + new Materials[] { + Materials.Knightmetal, + Materials.Lanthanum, + Materials.Lead, + Materials.Lutetium, + Materials.Magnalium, + Materials.Magnesium, + Materials.Manganese, + Materials.MeteoricIron, + Materials.MeteoricSteel, + Materials.Trinium, + Materials.Mithril, + Materials.Molybdenum, + Materials.Naquadah, + Materials.NaquadahAlloy, + Materials.NaquadahEnriched, + Materials.Naquadria + }, + OrePrefixes.block, + gregtech.api.enums.Textures.BlockIcons.STORAGE_BLOCKS4); + + GregTech_API.sBlockMetal5 = new GT_Block_Metal( + "gt.blockmetal5", + new Materials[] { + Materials.Neodymium, + Materials.NeodymiumMagnetic, + Materials.Neutronium, + Materials.Nichrome, + Materials.Nickel, + Materials.Niobium, + Materials.NiobiumNitride, + Materials.NiobiumTitanium, + Materials.Osmiridium, + Materials.Osmium, + Materials.Palladium, + Materials.PigIron, + Materials.Platinum, + Materials.Plutonium, + Materials.Plutonium241, + Materials.Praseodymium + }, + OrePrefixes.block, + gregtech.api.enums.Textures.BlockIcons.STORAGE_BLOCKS5); + + GregTech_API.sBlockMetal6 = new GT_Block_Metal( + "gt.blockmetal6", + new Materials[] { + Materials.Promethium, + Materials.RedAlloy, + Materials.RedSteel, + Materials.RoseGold, + Materials.Rubidium, + Materials.Samarium, + Materials.Scandium, + Materials.ShadowIron, + Materials.ShadowSteel, + Materials.Silicon, + Materials.Silver, + Materials.SolderingAlloy, + Materials.StainlessSteel, + Materials.Steel, + Materials.SteelMagnetic, + Materials.SterlingSilver + }, + OrePrefixes.block, + gregtech.api.enums.Textures.BlockIcons.STORAGE_BLOCKS6); + + GregTech_API.sBlockMetal7 = new GT_Block_Metal( + "gt.blockmetal7", + new Materials[] { + Materials.Sunnarium, + Materials.Tantalum, + Materials.Tellurium, + Materials.Terbium, + Materials.Thaumium, + Materials.Thorium, + Materials.Thulium, + Materials.Tin, + Materials.TinAlloy, + Materials.Titanium, + Materials.Tritanium, + Materials.Tungsten, + Materials.TungstenSteel, + Materials.Ultimet, + Materials.Uranium, + Materials.Uranium235 + }, + OrePrefixes.block, + gregtech.api.enums.Textures.BlockIcons.STORAGE_BLOCKS7); + + GregTech_API.sBlockMetal8 = new GT_Block_Metal( + "gt.blockmetal8", + new Materials[] { + Materials.Vanadium, + Materials.VanadiumGallium, + Materials.WroughtIron, + Materials.Ytterbium, + Materials.Yttrium, + Materials.YttriumBariumCuprate, + Materials.Zinc, + Materials.TungstenCarbide, + Materials.VanadiumSteel, + Materials.HSSG, + Materials.HSSE, + Materials.HSSS, + Materials.Steeleaf, + Materials.Ichorium, + Materials.Firestone, + Materials.Shadow + }, + OrePrefixes.block, + gregtech.api.enums.Textures.BlockIcons.STORAGE_BLOCKS8); + + GregTech_API.sBlockGem1 = new GT_Block_Metal( + "gt.blockgem1", + new Materials[] { + Materials.InfusedAir, + Materials.Amber, + Materials.Amethyst, + Materials.InfusedWater, + Materials.BlueTopaz, + Materials.CertusQuartz, + Materials.Dilithium, + Materials.EnderEye, + Materials.EnderPearl, + Materials.FoolsRuby, + Materials.Force, + Materials.Forcicium, + Materials.Forcillium, + Materials.GreenSapphire, + Materials.InfusedFire, + Materials.Jasper + }, + OrePrefixes.block, + gregtech.api.enums.Textures.BlockIcons.STORAGE_BLOCKS9); + + GregTech_API.sBlockGem2 = new GT_Block_Metal( + "gt.blockgem2", + new Materials[] { + Materials.Lazurite, + Materials.Lignite, + Materials.Monazite, + Materials.Niter, + Materials.Olivine, + Materials.Opal, + Materials.InfusedOrder, + Materials.InfusedEntropy, + Materials.TricalciumPhosphate, + Materials.Quartzite, + Materials.GarnetRed, + Materials.Ruby, + Materials.Sapphire, + Materials.Sodalite, + Materials.Tanzanite, + Materials.InfusedEarth + }, + OrePrefixes.block, + gregtech.api.enums.Textures.BlockIcons.STORAGE_BLOCKS10); + + GregTech_API.sBlockGem3 = new GT_Block_Metal( + "gt.blockgem3", + new Materials[] { + Materials.Topaz, + Materials.Vinteum, + Materials.GarnetYellow, + Materials.NetherStar, + Materials.Charcoal, + Materials.Blaze + }, + OrePrefixes.block, + gregtech.api.enums.Textures.BlockIcons.STORAGE_BLOCKS11); + + GregTech_API.sBlockMetal9 = new GT_Block_Metal( + "gt.blockmetal9", + new Materials[] { + Materials.Cryolite, Materials.SiliconSG, MaterialsKevlar.NickelAluminide, Materials.SpaceTime + }, + OrePrefixes.block, + gregtech.api.enums.Textures.BlockIcons.STORAGE_BLOCKS12); GregTech_API.sBlockReinforced = new GT_Block_Reinforced("gt.blockreinforced"); - GT_Log.out.println("GT_Mod: Register TileEntities."); - BaseMetaTileEntity tBaseMetaTileEntity = GregTech_API.constructBaseMetaTileEntity(); GT_Log.out.println("GT_Mod: Testing BaseMetaTileEntity."); @@ -449,7 +783,10 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { } GT_Log.out.println("GT_Mod: Registering the BaseMetaTileEntity."); GameRegistry.registerTileEntity(tBaseMetaTileEntity.getClass(), "BaseMetaTileEntity"); - FMLInterModComms.sendMessage("appliedenergistics2", "whitelist-spatial", tBaseMetaTileEntity.getClass().getName()); + FMLInterModComms.sendMessage( + "appliedenergistics2", + "whitelist-spatial", + tBaseMetaTileEntity.getClass().getName()); GT_Log.out.println("GT_Mod: Registering the BaseMetaPipeEntity."); GameRegistry.registerTileEntity(BaseMetaPipeEntity.class, "BaseMetaPipeEntity"); @@ -460,119 +797,730 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { FMLInterModComms.sendMessage("appliedenergistics2", "whitelist-spatial", GT_TileEntity_Ores.class.getName()); if (!GregTech_API.mIC2Classic) { GT_Log.out.println("GT_Mod: Registering Fluids."); - Materials.ConstructionFoam.mFluid = GT_Utility.getFluidForFilledItem(GT_ModHandler.getIC2Item("CFCell", 1L), true).getFluid(); - Materials.UUMatter.mFluid = GT_Utility.getFluidForFilledItem(GT_ModHandler.getIC2Item("uuMatterCell", 1L), true).getFluid(); + Materials.ConstructionFoam.mFluid = GT_Utility.getFluidForFilledItem( + GT_ModHandler.getIC2Item("CFCell", 1L), true) + .getFluid(); + Materials.UUMatter.mFluid = GT_Utility.getFluidForFilledItem( + GT_ModHandler.getIC2Item("uuMatterCell", 1L), true) + .getFluid(); } - GT_Mod.gregtechproxy.addFluid("Air", "Air", Materials.Air, 2, 295, ItemList.Cell_Air.get(1L, new Object[0]), ItemList.Cell_Empty.get(1L, new Object[0]), 2000); - GT_Mod.gregtechproxy.addFluid("LiquidOxygen", "Liquid Oxygen", Materials.LiquidOxygen, 2, 60, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LiquidOxygen, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("LiquidNitrogen", "Liquid Nitrogen", Materials.LiquidNitrogen, 2, 77, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LiquidNitrogen, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("LiquidAir", "Liquid Air", Materials.LiquidAir, 1, 77, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LiquidAir, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("Oxygen", "Oxygen", Materials.Oxygen, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("Hydrogen", "Hydrogen", Materials.Hydrogen, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("Deuterium", "Deuterium", Materials.Deuterium, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Deuterium, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("Tritium", "Tritium", Materials.Tritium, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Tritium, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("Helium", "Helium", Materials.Helium, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Helium, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("Argon", "Argon", Materials.Argon, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Argon, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("Radon", "Radon", Materials.Radon, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Radon, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - - GT_Mod.gregtechproxy.addFluid("Fluorine", "Fluorine", Materials.Fluorine, 2, 53, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fluorine, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("Titaniumtetrachloride", "Titaniumtetrachloride", Materials.Titaniumtetrachloride, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Titaniumtetrachloride, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("Helium-3", "Helium-3", Materials.Helium_3, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Helium_3, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("Methane", "Methane", Materials.Methane, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Methane, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("Nitrogen", "Nitrogen", Materials.Nitrogen, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Nitrogen, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("NitrogenDioxide", "Nitrogen Dioxide", Materials.NitrogenDioxide, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NitrogenDioxide, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("Steam", "Steam", Materials.Water, 2, 375, GT_ModHandler.getIC2Item("steamCell", 1), Materials.Empty.getCells(1), 1000); - GT_Values.RA.addFluidCannerRecipe(Materials.Empty.getCells(1), GT_ModHandler.getIC2Item("steamCell", 1), GT_ModHandler.getSteam(1000), null); + GT_Mod.gregtechproxy.addFluid( + "Air", + "Air", + Materials.Air, + 2, + 295, + ItemList.Cell_Air.get(1L, new Object[0]), + ItemList.Cell_Empty.get(1L, new Object[0]), + 2000); + GT_Mod.gregtechproxy.addFluid( + "LiquidOxygen", + "Liquid Oxygen", + Materials.LiquidOxygen, + 2, + 60, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LiquidOxygen, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "LiquidNitrogen", + "Liquid Nitrogen", + Materials.LiquidNitrogen, + 2, + 77, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LiquidNitrogen, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "LiquidAir", + "Liquid Air", + Materials.LiquidAir, + 1, + 77, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LiquidAir, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "Oxygen", + "Oxygen", + Materials.Oxygen, + 2, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "Hydrogen", + "Hydrogen", + Materials.Hydrogen, + 2, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "Deuterium", + "Deuterium", + Materials.Deuterium, + 2, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Deuterium, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "Tritium", + "Tritium", + Materials.Tritium, + 2, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Tritium, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "Helium", + "Helium", + Materials.Helium, + 2, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Helium, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "Argon", + "Argon", + Materials.Argon, + 2, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Argon, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "Radon", + "Radon", + Materials.Radon, + 2, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Radon, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + + GT_Mod.gregtechproxy.addFluid( + "Fluorine", + "Fluorine", + Materials.Fluorine, + 2, + 53, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fluorine, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "Titaniumtetrachloride", + "Titaniumtetrachloride", + Materials.Titaniumtetrachloride, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Titaniumtetrachloride, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "Helium-3", + "Helium-3", + Materials.Helium_3, + 2, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Helium_3, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "Methane", + "Methane", + Materials.Methane, + 2, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Methane, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "Nitrogen", + "Nitrogen", + Materials.Nitrogen, + 2, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Nitrogen, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "NitrogenDioxide", + "Nitrogen Dioxide", + Materials.NitrogenDioxide, + 2, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NitrogenDioxide, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "Steam", + "Steam", + Materials.Water, + 2, + 375, + GT_ModHandler.getIC2Item("steamCell", 1), + Materials.Empty.getCells(1), + 1000); + GT_Values.RA.addFluidCannerRecipe( + Materials.Empty.getCells(1), + GT_ModHandler.getIC2Item("steamCell", 1), + GT_ModHandler.getSteam(1000), + null); Materials.Ice.mGas = Materials.Water.mGas; Materials.Water.mGas.setTemperature(375).setGaseous(true); - ItemList.sOilExtraHeavy = GT_Mod.gregtechproxy.addFluid("liquid_extra_heavy_oil", "Very Heavy Oil", null, 1, 295); - ItemList.sEpichlorhydrin = GT_Mod.gregtechproxy.addFluid("liquid_epichlorhydrin", "Epichlorohydrin", Materials.Epichlorohydrin, 1, 295, Materials.Epichlorohydrin.getCells(1), Materials.Empty.getCells(1), 1000); + ItemList.sOilExtraHeavy = + GT_Mod.gregtechproxy.addFluid("liquid_extra_heavy_oil", "Very Heavy Oil", null, 1, 295); + ItemList.sEpichlorhydrin = GT_Mod.gregtechproxy.addFluid( + "liquid_epichlorhydrin", + "Epichlorohydrin", + Materials.Epichlorohydrin, + 1, + 295, + Materials.Epichlorohydrin.getCells(1), + Materials.Empty.getCells(1), + 1000); ItemList.sDrillingFluid = GT_Mod.gregtechproxy.addFluid("liquid_drillingfluid", "Drilling Fluid", null, 1, 295); - ItemList.sToluene = GT_Mod.gregtechproxy.addFluid("liquid_toluene", "Toluene", Materials.Toluene, 1, 295, Materials.Toluene.getCells(1), Materials.Empty.getCells(1), 1000); - ItemList.sNitrationMixture = GT_Mod.gregtechproxy.addFluid("liquid_nitrationmixture", "Nitration Mixture", Materials.NitrationMixture, 1, 295, Materials.NitrationMixture.getCells(1), Materials.Empty.getCells(1), 1000); - - GT_Mod.gregtechproxy.addFluid("liquid_heavy_oil", "Heavy Oil", Materials.OilHeavy, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.OilHeavy, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("liquid_medium_oil", "Raw Oil", Materials.OilMedium, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.OilMedium, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("liquid_light_oil", "Light Oil", Materials.OilLight, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.OilLight, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("gas_natural_gas", "Natural Gas", Materials.NatruralGas, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NatruralGas, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - ItemList.sHydricSulfur = GT_Mod.gregtechproxy.addFluid("liquid_hydricsulfur", "Hydrogen Sulfide", Materials.HydricSulfide, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydricSulfide, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("gas_sulfuricgas", "Sulfuric Gas", Materials.SulfuricGas, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricGas, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("gas_gas", "Refinery Gas", Materials.Gas, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Gas, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("liquid_sulfuricnaphtha", "Sulfuric Naphtha", Materials.SulfuricNaphtha, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricNaphtha, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("liquid_sufluriclight_fuel", "Sulfuric Light Fuel", Materials.SulfuricLightFuel, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricLightFuel, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("liquid_sulfuricheavy_fuel", "Sulfuric Heavy Fuel", Materials.SulfuricHeavyFuel, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricHeavyFuel, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("liquid_naphtha", "Naphtha", Materials.Naphtha, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Naphtha, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("liquid_light_fuel", "Light Fuel", Materials.LightFuel, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LightFuel, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("liquid_heavy_fuel", "Heavy Fuel", Materials.HeavyFuel, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HeavyFuel, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("liquid_lpg", "LPG", Materials.LPG, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LPG, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - - GT_Mod.gregtechproxy.addFluid("charcoal_byproducts", "molten.autogenerated", "Charcoal Byproducts", Materials.CharcoalByproducts, Materials.CharcoalByproducts.mRGBa, 2, 775, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.CharcoalByproducts, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("molten.bisphenol_a", "molten.autogenerated", "Molten Bisphenol A", Materials.BisphenolA, Materials.BisphenolA.mRGBa, 1, 432, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.BisphenolA, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - - GT_Mod.gregtechproxy.addFluid("UUAmplifier", "UU Amplifier", Materials.UUAmplifier, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.UUAmplifier, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("Chlorine", "Chlorine", Materials.Chlorine, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Chlorine, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("Mercury", "Mercury", Materials.Mercury, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Mercury, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("NitroFuel", "Cetane-Boosted Diesel", Materials.NitroFuel, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NitroFuel, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("SodiumPersulfate", "Sodium Persulfate", Materials.SodiumPersulfate, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SodiumPersulfate, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("Glyceryl", "Glyceryl Trinitrate", Materials.Glyceryl, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glyceryl, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - - GT_Mod.gregtechproxy.addFluid("lubricant", "Lubricant", Materials.Lubricant, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Lubricant, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("creosote", "Creosote Oil", Materials.Creosote, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Creosote, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("seedoil", "Seed Oil", Materials.SeedOil, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SeedOil, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("fishoil", "Fish Oil", Materials.FishOil, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.FishOil, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("oil", "Oil", Materials.Oil, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oil, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("fuel", "Diesel", Materials.Fuel, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fuel, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("for.honey", "Honey", Materials.Honey, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Honey, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("biomass", "Biomass", Materials.Biomass, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Biomass, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("bioethanol", "Bio Ethanol", Materials.Ethanol, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ethanol, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("sulfuricacid", "Sulfuric Acid", Materials.SulfuricAcid, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricAcid, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("milk", "Milk", Materials.Milk, 1, 290, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Milk, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("mcguffium", "Mc Guffium 239", Materials.McGuffium239, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.McGuffium239, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("refinedGlue", "Refined Glue", Materials.Glue, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glue, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("hotfryingoil", "Hot Frying Oil", Materials.FryingOilHot, 1, 400, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.FryingOilHot, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - - GT_Mod.gregtechproxy.addFluid("DimensionallyTranscendentResidue", "Dimensionally Transcendent Residue", Materials.DimensionallyTranscendentResidue, 1, 2000000000, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.DimensionallyTranscendentResidue, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("ExcitedDTCC", "Excited Dimensionally Transcendent Crude Catalyst", Materials.ExcitedDTCC, 1, 500000000, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.ExcitedDTCC, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("ExcitedDTPC", "Excited Dimensionally Transcendent Prosaic Catalyst", Materials.ExcitedDTPC, 1, 500000000, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.ExcitedDTPC, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("ExcitedDTRC", "Excited Dimensionally Transcendent Resplendent Catalyst", Materials.ExcitedDTRC, 1, 500000000, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.ExcitedDTRC, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("ExcitedDTEC", "Excited Dimensionally Transcendent Exotic Catalyst", Materials.ExcitedDTEC, 1, 500000000, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.ExcitedDTEC, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - - - GT_Mod.gregtechproxy.addFluid("fieryblood", "Fiery Blood", Materials.FierySteel, 1, 6400, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.FierySteel, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - GT_Mod.gregtechproxy.addFluid("holywater", "Holy Water", Materials.HolyWater, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HolyWater, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); + ItemList.sToluene = GT_Mod.gregtechproxy.addFluid( + "liquid_toluene", + "Toluene", + Materials.Toluene, + 1, + 295, + Materials.Toluene.getCells(1), + Materials.Empty.getCells(1), + 1000); + ItemList.sNitrationMixture = GT_Mod.gregtechproxy.addFluid( + "liquid_nitrationmixture", + "Nitration Mixture", + Materials.NitrationMixture, + 1, + 295, + Materials.NitrationMixture.getCells(1), + Materials.Empty.getCells(1), + 1000); + + GT_Mod.gregtechproxy.addFluid( + "liquid_heavy_oil", + "Heavy Oil", + Materials.OilHeavy, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.OilHeavy, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "liquid_medium_oil", + "Raw Oil", + Materials.OilMedium, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.OilMedium, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "liquid_light_oil", + "Light Oil", + Materials.OilLight, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.OilLight, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "gas_natural_gas", + "Natural Gas", + Materials.NatruralGas, + 2, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NatruralGas, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + ItemList.sHydricSulfur = GT_Mod.gregtechproxy.addFluid( + "liquid_hydricsulfur", + "Hydrogen Sulfide", + Materials.HydricSulfide, + 2, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydricSulfide, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "gas_sulfuricgas", + "Sulfuric Gas", + Materials.SulfuricGas, + 2, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricGas, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "gas_gas", + "Refinery Gas", + Materials.Gas, + 2, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Gas, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "liquid_sulfuricnaphtha", + "Sulfuric Naphtha", + Materials.SulfuricNaphtha, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricNaphtha, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "liquid_sufluriclight_fuel", + "Sulfuric Light Fuel", + Materials.SulfuricLightFuel, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricLightFuel, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "liquid_sulfuricheavy_fuel", + "Sulfuric Heavy Fuel", + Materials.SulfuricHeavyFuel, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricHeavyFuel, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "liquid_naphtha", + "Naphtha", + Materials.Naphtha, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Naphtha, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "liquid_light_fuel", + "Light Fuel", + Materials.LightFuel, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LightFuel, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "liquid_heavy_fuel", + "Heavy Fuel", + Materials.HeavyFuel, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HeavyFuel, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "liquid_lpg", + "LPG", + Materials.LPG, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.LPG, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + + GT_Mod.gregtechproxy.addFluid( + "charcoal_byproducts", + "molten.autogenerated", + "Charcoal Byproducts", + Materials.CharcoalByproducts, + Materials.CharcoalByproducts.mRGBa, + 2, + 775, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.CharcoalByproducts, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "molten.bisphenol_a", + "molten.autogenerated", + "Molten Bisphenol A", + Materials.BisphenolA, + Materials.BisphenolA.mRGBa, + 1, + 432, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.BisphenolA, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + + GT_Mod.gregtechproxy.addFluid( + "UUAmplifier", + "UU Amplifier", + Materials.UUAmplifier, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.UUAmplifier, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "Chlorine", + "Chlorine", + Materials.Chlorine, + 2, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Chlorine, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "Mercury", + "Mercury", + Materials.Mercury, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Mercury, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "NitroFuel", + "Cetane-Boosted Diesel", + Materials.NitroFuel, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NitroFuel, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "SodiumPersulfate", + "Sodium Persulfate", + Materials.SodiumPersulfate, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SodiumPersulfate, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "Glyceryl", + "Glyceryl Trinitrate", + Materials.Glyceryl, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glyceryl, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + + GT_Mod.gregtechproxy.addFluid( + "lubricant", + "Lubricant", + Materials.Lubricant, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Lubricant, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "creosote", + "Creosote Oil", + Materials.Creosote, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Creosote, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "seedoil", + "Seed Oil", + Materials.SeedOil, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SeedOil, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "fishoil", + "Fish Oil", + Materials.FishOil, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.FishOil, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "oil", + "Oil", + Materials.Oil, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oil, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "fuel", + "Diesel", + Materials.Fuel, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fuel, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "for.honey", + "Honey", + Materials.Honey, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Honey, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "biomass", + "Biomass", + Materials.Biomass, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Biomass, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "bioethanol", + "Bio Ethanol", + Materials.Ethanol, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ethanol, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "sulfuricacid", + "Sulfuric Acid", + Materials.SulfuricAcid, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricAcid, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "milk", + "Milk", + Materials.Milk, + 1, + 290, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Milk, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "mcguffium", + "Mc Guffium 239", + Materials.McGuffium239, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.McGuffium239, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "refinedGlue", + "Refined Glue", + Materials.Glue, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glue, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "hotfryingoil", + "Hot Frying Oil", + Materials.FryingOilHot, + 1, + 400, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.FryingOilHot, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + + GT_Mod.gregtechproxy.addFluid( + "DimensionallyTranscendentResidue", + "Dimensionally Transcendent Residue", + Materials.DimensionallyTranscendentResidue, + 1, + 2000000000, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.DimensionallyTranscendentResidue, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "ExcitedDTCC", + "Excited Dimensionally Transcendent Crude Catalyst", + Materials.ExcitedDTCC, + 1, + 500000000, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.ExcitedDTCC, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "ExcitedDTPC", + "Excited Dimensionally Transcendent Prosaic Catalyst", + Materials.ExcitedDTPC, + 1, + 500000000, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.ExcitedDTPC, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "ExcitedDTRC", + "Excited Dimensionally Transcendent Resplendent Catalyst", + Materials.ExcitedDTRC, + 1, + 500000000, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.ExcitedDTRC, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "ExcitedDTEC", + "Excited Dimensionally Transcendent Exotic Catalyst", + Materials.ExcitedDTEC, + 1, + 500000000, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.ExcitedDTEC, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + + GT_Mod.gregtechproxy.addFluid( + "fieryblood", + "Fiery Blood", + Materials.FierySteel, + 1, + 6400, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.FierySteel, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); + GT_Mod.gregtechproxy.addFluid( + "holywater", + "Holy Water", + Materials.HolyWater, + 1, + 295, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HolyWater, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); if (ItemList.TF_Vial_FieryBlood.get(1L, new Object[0]) != null) { - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(Materials.FierySteel.getFluid(250L), ItemList.TF_Vial_FieryBlood.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + Materials.FierySteel.getFluid(250L), + ItemList.TF_Vial_FieryBlood.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]))); } - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(Materials.Milk.getFluid(1000L), GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Milk, 1L), GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Empty, 1L))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(Materials.Milk.getFluid(250L), ItemList.Bottle_Milk.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(Materials.HolyWater.getFluid(250L), ItemList.Bottle_Holy_Water.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(Materials.McGuffium239.getFluid(250L), ItemList.McGuffium_239.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(Materials.Fuel.getFluid(100L), ItemList.Tool_Lighter_Invar_Full.get(1L, new Object[0]), ItemList.Tool_Lighter_Invar_Empty.get(1L, new Object[0]))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(Materials.Fuel.getFluid(1000L), ItemList.Tool_Lighter_Platinum_Full.get(1L, new Object[0]), ItemList.Tool_Lighter_Platinum_Empty.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + Materials.Milk.getFluid(1000L), + GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Milk, 1L), + GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Empty, 1L))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + Materials.Milk.getFluid(250L), + ItemList.Bottle_Milk.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + Materials.HolyWater.getFluid(250L), + ItemList.Bottle_Holy_Water.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + Materials.McGuffium239.getFluid(250L), + ItemList.McGuffium_239.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + Materials.Fuel.getFluid(100L), + ItemList.Tool_Lighter_Invar_Full.get(1L, new Object[0]), + ItemList.Tool_Lighter_Invar_Empty.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + Materials.Fuel.getFluid(1000L), + ItemList.Tool_Lighter_Platinum_Full.get(1L, new Object[0]), + ItemList.Tool_Lighter_Platinum_Empty.get(1L, new Object[0]))); Dyes.dyeBlack.addFluidDye(GT_Mod.gregtechproxy.addFluid("squidink", "Squid Ink", null, 1, 295)); Dyes.dyeBlue.addFluidDye(GT_Mod.gregtechproxy.addFluid("indigo", "Indigo Dye", null, 1, 295)); for (byte i = 0; i < Dyes.VALUES.length; i = (byte) (i + 1)) { Dyes tDye = Dyes.VALUES[i]; Fluid tFluid; - tDye.addFluidDye(tFluid = GT_Mod.gregtechproxy.addFluid("dye.watermixed." + tDye.name().toLowerCase(Locale.ENGLISH), "dyes", "Water Mixed " + tDye.mName + " Dye", null, tDye.getRGBA(), 1, 295, null, null, 0)); - tDye.addFluidDye(tFluid = GT_Mod.gregtechproxy.addFluid("dye.chemical." + tDye.name().toLowerCase(Locale.ENGLISH), "dyes", "Chemical " + tDye.mName + " Dye", null, tDye.getRGBA(), 1, 295, null, null, 0)); - FluidContainerRegistry.registerFluidContainer(new FluidStack(tFluid, 2304), ItemList.SPRAY_CAN_DYES[i].get(1L, new Object[0]), ItemList.Spray_Empty.get(1L, new Object[0])); + tDye.addFluidDye( + tFluid = GT_Mod.gregtechproxy.addFluid( + "dye.watermixed." + tDye.name().toLowerCase(Locale.ENGLISH), + "dyes", + "Water Mixed " + tDye.mName + " Dye", + null, + tDye.getRGBA(), + 1, + 295, + null, + null, + 0)); + tDye.addFluidDye( + tFluid = GT_Mod.gregtechproxy.addFluid( + "dye.chemical." + tDye.name().toLowerCase(Locale.ENGLISH), + "dyes", + "Chemical " + tDye.mName + " Dye", + null, + tDye.getRGBA(), + 1, + 295, + null, + null, + 0)); + FluidContainerRegistry.registerFluidContainer( + new FluidStack(tFluid, 2304), + ItemList.SPRAY_CAN_DYES[i].get(1L, new Object[0]), + ItemList.Spray_Empty.get(1L, new Object[0])); } - GT_Mod.gregtechproxy.addFluid("ice", "Crushed Ice", Materials.Ice, 0, 270, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ice, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); + GT_Mod.gregtechproxy.addFluid( + "ice", + "Crushed Ice", + Materials.Ice, + 0, + 270, + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ice, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 1000); Materials.Water.mSolid = Materials.Ice.mSolid; - - GT_Mod.gregtechproxy.addFluid("molten.glass", "Molten Glass", Materials.Glass, 4, 1500, GT_OreDictUnificator.get(OrePrefixes.cellMolten, Materials.Glass, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 144); - GT_Mod.gregtechproxy.addFluid("molten.redstone", "Molten Redstone", Materials.Redstone, 4, 500, GT_OreDictUnificator.get(OrePrefixes.cellMolten, Materials.Redstone, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 144); - GT_Mod.gregtechproxy.addFluid("molten.blaze", "Molten Blaze", Materials.Blaze, 4, 6400, GT_OreDictUnificator.get(OrePrefixes.cellMolten, Materials.Blaze, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 144); - GT_Mod.gregtechproxy.addFluid("wet.concrete", "Wet Concrete", Materials.Concrete, 4, 300, GT_OreDictUnificator.get(OrePrefixes.cellMolten, Materials.Concrete, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 144); + GT_Mod.gregtechproxy.addFluid( + "molten.glass", + "Molten Glass", + Materials.Glass, + 4, + 1500, + GT_OreDictUnificator.get(OrePrefixes.cellMolten, Materials.Glass, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 144); + GT_Mod.gregtechproxy.addFluid( + "molten.redstone", + "Molten Redstone", + Materials.Redstone, + 4, + 500, + GT_OreDictUnificator.get(OrePrefixes.cellMolten, Materials.Redstone, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 144); + GT_Mod.gregtechproxy.addFluid( + "molten.blaze", + "Molten Blaze", + Materials.Blaze, + 4, + 6400, + GT_OreDictUnificator.get(OrePrefixes.cellMolten, Materials.Blaze, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 144); + GT_Mod.gregtechproxy.addFluid( + "wet.concrete", + "Wet Concrete", + Materials.Concrete, + 4, + 300, + GT_OreDictUnificator.get(OrePrefixes.cellMolten, Materials.Concrete, 1L), + ItemList.Cell_Empty.get(1L, new Object[0]), + 144); for (Materials tMaterial : Materials.values()) { - if ((tMaterial.mStandardMoltenFluid == null) && (tMaterial.contains(SubTag.SMELTING_TO_FLUID)) && (!tMaterial.contains(SubTag.NO_SMELTING))) { + if ((tMaterial.mStandardMoltenFluid == null) + && (tMaterial.contains(SubTag.SMELTING_TO_FLUID)) + && (!tMaterial.contains(SubTag.NO_SMELTING))) { GT_Mod.gregtechproxy.addAutogeneratedMoltenFluid(tMaterial); if ((tMaterial.mSmeltInto != tMaterial) && (tMaterial.mSmeltInto.mStandardMoltenFluid == null)) { GT_Mod.gregtechproxy.addAutogeneratedMoltenFluid(tMaterial.mSmeltInto); @@ -593,143 +1541,1057 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { } } - GT_Mod.gregtechproxy.addFluid("potion.awkward", "Awkward Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.thick", "Thick Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 32), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.mundane", "Mundane Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 64), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.damage", "Harming Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 8204), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.damage.strong", "Strong Harming Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 8236), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.damage.splash", "Splash Harming Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16396), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.damage.strong.splash", "Strong Splash Harming Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16428), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.health", "Healing Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 8197), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.health.strong", "Strong Healing Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 8229), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.health.splash", "Splash Healing Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16389), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.health.strong.splash", "Strong Splash Healing Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16421), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.speed", "Swiftness Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 8194), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.speed.strong", "Strong Swiftness Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 8226), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.speed.long", "Stretched Swiftness Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 8258), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.speed.splash", "Splash Swiftness Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16386), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.speed.strong.splash", "Strong Splash Swiftness Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16418), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.speed.long.splash", "Stretched Splash Swiftness Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16450), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.strength", "Strength Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 8201), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.strength.strong", "Strong Strength Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 8233), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.strength.long", "Stretched Strength Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 8265), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.strength.splash", "Splash Strength Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16393), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.strength.strong.splash", "Strong Splash Strength Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16425), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.strength.long.splash", "Stretched Splash Strength Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16457), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.regen", "Regenerating Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 8193), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.regen.strong", "Strong Regenerating Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 8225), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.regen.long", "Stretched Regenerating Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 8257), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.regen.splash", "Splash Regenerating Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16385), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.regen.strong.splash", "Strong Splash Regenerating Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16417), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.regen.long.splash", "Stretched Splash Regenerating Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16449), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.poison", "Poisonous Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 8196), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.poison.strong", "Strong Poisonous Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 8228), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.poison.long", "Stretched Poisonous Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 8260), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.poison.splash", "Splash Poisonous Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16388), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.poison.strong.splash", "Strong Splash Poisonous Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16420), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.poison.long.splash", "Stretched Splash Poisonous Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16452), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.fireresistance", "Fire Resistant Brew", null, 1, 375, new ItemStack(Items.potionitem, 1, 8195), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.fireresistance.long", "Stretched Fire Resistant Brew", null, 1, 375, new ItemStack(Items.potionitem, 1, 8259), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.fireresistance.splash", "Splash Fire Resistant Brew", null, 1, 375, new ItemStack(Items.potionitem, 1, 16387), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.fireresistance.long.splash", "Stretched Splash Fire Resistant Brew", null, 1, 375, new ItemStack(Items.potionitem, 1, 16451), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.nightvision", "Night Vision Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 8198), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.nightvision.long", "Stretched Night Vision Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 8262), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.nightvision.splash", "Splash Night Vision Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16390), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.nightvision.long.splash", "Stretched Splash Night Vision Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16454), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.weakness", "Weakening Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 8200), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.weakness.long", "Stretched Weakening Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 8264), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.weakness.splash", "Splash Weakening Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16392), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.weakness.long.splash", "Stretched Splash Weakening Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16456), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.slowness", "Lame Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 8202), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.slowness.long", "Stretched Lame Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 8266), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.slowness.splash", "Splash Lame Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16394), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.slowness.long.splash", "Stretched Splash Lame Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16458), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.waterbreathing", "Fishy Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 8205), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.waterbreathing.long", "Stretched Fishy Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 8269), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.waterbreathing.splash", "Splash Fishy Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16397), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.waterbreathing.long.splash", "Stretched Splash Fishy Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16461), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.invisibility", "Invisible Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 8206), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.invisibility.long", "Stretched Invisible Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 8270), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.invisibility.splash", "Splash Invisible Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16398), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.invisibility.long.splash", "Stretched Splash Invisible Brew", null, 1, 295, new ItemStack(Items.potionitem, 1, 16462), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - - GT_Mod.gregtechproxy.addFluid("potion.purpledrink", "Purple Drink", null, 1, 275, ItemList.Bottle_Purple_Drink.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.grapejuice", "Grape Juice", null, 1, 295, ItemList.Bottle_Grape_Juice.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.wine", "Wine", null, 1, 295, ItemList.Bottle_Wine.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.vinegar", "Vinegar", Materials.Vinegar, 1, 295, ItemList.Bottle_Vinegar.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.potatojuice", "Potato Juice", null, 1, 295, ItemList.Bottle_Potato_Juice.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.vodka", "Vodka", null, 1, 275, ItemList.Bottle_Vodka.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.leninade", "Leninade", null, 1, 275, ItemList.Bottle_Leninade.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.mineralwater", "Mineral Water", null, 1, 275, ItemList.Bottle_Mineral_Water.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.saltywater", "Salty Water", null, 1, 275, ItemList.Bottle_Salty_Water.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.reedwater", "Reed Water", null, 1, 295, ItemList.Bottle_Reed_Water.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.rum", "Rum", null, 1, 295, ItemList.Bottle_Rum.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.piratebrew", "Pirate Brew", null, 1, 295, ItemList.Bottle_Pirate_Brew.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.hopsjuice", "Hops Juice", null, 1, 295, ItemList.Bottle_Hops_Juice.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.darkbeer", "Dark Beer", null, 1, 275, ItemList.Bottle_Dark_Beer.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.dragonblood", "Dragon Blood", null, 1, 375, ItemList.Bottle_Dragon_Blood.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.wheatyjuice", "Wheaty Juice", null, 1, 295, ItemList.Bottle_Wheaty_Juice.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.scotch", "Scotch", null, 1, 275, ItemList.Bottle_Scotch.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.glenmckenner", "Glen McKenner", null, 1, 275, ItemList.Bottle_Glen_McKenner.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.wheatyhopsjuice", "Wheaty Hops Juice", null, 1, 295, ItemList.Bottle_Wheaty_Hops_Juice.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.beer", "Beer", null, 1, 275, ItemList.Bottle_Beer.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.chillysauce", "Chilly Sauce", null, 1, 375, ItemList.Bottle_Chilly_Sauce.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.hotsauce", "Hot Sauce", null, 1, 380, ItemList.Bottle_Hot_Sauce.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.diabolosauce", "Diabolo Sauce", null, 1, 385, ItemList.Bottle_Diabolo_Sauce.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.diablosauce", "Diablo Sauce", null, 1, 390, ItemList.Bottle_Diablo_Sauce.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.diablosauce.strong", "Old Man Snitches glitched Diablo Sauce", null, 1, 999, ItemList.Bottle_Snitches_Glitch_Sauce.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.applejuice", "Apple Juice", null, 1, 295, ItemList.Bottle_Apple_Juice.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.cider", "Cider", null, 1, 295, ItemList.Bottle_Cider.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.goldenapplejuice", "Golden Apple Juice", null, 1, 295, ItemList.Bottle_Golden_Apple_Juice.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.goldencider", "Golden Cider", null, 1, 295, ItemList.Bottle_Golden_Cider.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.idunsapplejuice", "Idun's Apple Juice", null, 1, 295, ItemList.Bottle_Iduns_Apple_Juice.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.notchesbrew", "Notches Brew", null, 1, 295, ItemList.Bottle_Notches_Brew.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.lemonjuice", "Lemon Juice", null, 1, 295, ItemList.Bottle_Lemon_Juice.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.limoncello", "Limoncello", null, 1, 295, ItemList.Bottle_Limoncello.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.lemonade", "Lemonade", null, 1, 275, ItemList.Bottle_Lemonade.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.alcopops", "Alcopops", null, 1, 275, ItemList.Bottle_Alcopops.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.cavejohnsonsgrenadejuice", "Cave Johnsons Grenade Juice", null, 1, 295, ItemList.Bottle_Cave_Johnsons_Grenade_Juice.get(1L, new Object[0]), ItemList.Bottle_Empty.get(1L, new Object[0]), 250); - - GT_Mod.gregtechproxy.addFluid("potion.darkcoffee", "Dark Coffee", null, 1, 295, ItemList.ThermosCan_Dark_Coffee.get(1L, new Object[0]), ItemList.ThermosCan_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.darkcafeaulait", "Dark Cafe au lait", null, 1, 295, ItemList.ThermosCan_Dark_Cafe_au_lait.get(1L, new Object[0]), ItemList.ThermosCan_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.coffee", "Coffee", null, 1, 295, ItemList.ThermosCan_Coffee.get(1L, new Object[0]), ItemList.ThermosCan_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.cafeaulait", "Cafe au lait", null, 1, 295, ItemList.ThermosCan_Cafe_au_lait.get(1L, new Object[0]), ItemList.ThermosCan_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.laitaucafe", "Lait au cafe", null, 1, 295, ItemList.ThermosCan_Lait_au_cafe.get(1L, new Object[0]), ItemList.ThermosCan_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.darkchocolatemilk", "Bitter Chocolate Milk", null, 1, 295, ItemList.ThermosCan_Dark_Chocolate_Milk.get(1L, new Object[0]), ItemList.ThermosCan_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.chocolatemilk", "Chocolate Milk", null, 1, 295, ItemList.ThermosCan_Chocolate_Milk.get(1L, new Object[0]), ItemList.ThermosCan_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.tea", "Tea", null, 1, 295, ItemList.ThermosCan_Tea.get(1L, new Object[0]), ItemList.ThermosCan_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.sweettea", "Sweet Tea", null, 1, 295, ItemList.ThermosCan_Sweet_Tea.get(1L, new Object[0]), ItemList.ThermosCan_Empty.get(1L, new Object[0]), 250); - GT_Mod.gregtechproxy.addFluid("potion.icetea", "Ice Tea", null, 1, 255, ItemList.ThermosCan_Ice_Tea.get(1L, new Object[0]), ItemList.ThermosCan_Empty.get(1L, new Object[0]), 250); - - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(FluidRegistry.getFluidStack("potion.poison.strong", 750), ItemList.IC2_Spray_WeedEx.get(1L, new Object[0]), ItemList.Spray_Empty.get(1L, new Object[0]))); - - - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(FluidRegistry.getFluidStack("potion.poison", 125), ItemList.Arrow_Head_Glass_Poison.get(1L, new Object[0]), ItemList.Arrow_Head_Glass_Emtpy.get(1L, new Object[0]))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(FluidRegistry.getFluidStack("potion.poison.long", 125), ItemList.Arrow_Head_Glass_Poison_Long.get(1L, new Object[0]), ItemList.Arrow_Head_Glass_Emtpy.get(1L, new Object[0]))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(FluidRegistry.getFluidStack("potion.poison.strong", 125), ItemList.Arrow_Head_Glass_Poison_Strong.get(1L, new Object[0]), ItemList.Arrow_Head_Glass_Emtpy.get(1L, new Object[0]))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(FluidRegistry.getFluidStack("potion.slowness", 125), ItemList.Arrow_Head_Glass_Slowness.get(1L, new Object[0]), ItemList.Arrow_Head_Glass_Emtpy.get(1L, new Object[0]))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(FluidRegistry.getFluidStack("potion.slowness.long", 125), ItemList.Arrow_Head_Glass_Slowness_Long.get(1L, new Object[0]), ItemList.Arrow_Head_Glass_Emtpy.get(1L, new Object[0]))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(FluidRegistry.getFluidStack("potion.weakness", 125), ItemList.Arrow_Head_Glass_Weakness.get(1L, new Object[0]), ItemList.Arrow_Head_Glass_Emtpy.get(1L, new Object[0]))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(FluidRegistry.getFluidStack("potion.weakness.long", 125), ItemList.Arrow_Head_Glass_Weakness_Long.get(1L, new Object[0]), ItemList.Arrow_Head_Glass_Emtpy.get(1L, new Object[0]))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(FluidRegistry.getFluidStack("holywater", 125), ItemList.Arrow_Head_Glass_Holy_Water.get(1L, new Object[0]), ItemList.Arrow_Head_Glass_Emtpy.get(1L, new Object[0]))); - - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(FluidRegistry.getFluidStack("potion.poison", 125), ItemList.Arrow_Wooden_Glass_Poison.get(1L, new Object[0]), ItemList.Arrow_Wooden_Glass_Emtpy.get(1L, new Object[0]))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(FluidRegistry.getFluidStack("potion.poison.long", 125), ItemList.Arrow_Wooden_Glass_Poison_Long.get(1L, new Object[0]), ItemList.Arrow_Wooden_Glass_Emtpy.get(1L, new Object[0]))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(FluidRegistry.getFluidStack("potion.poison.strong", 125), ItemList.Arrow_Wooden_Glass_Poison_Strong.get(1L, new Object[0]), ItemList.Arrow_Wooden_Glass_Emtpy.get(1L, new Object[0]))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(FluidRegistry.getFluidStack("potion.slowness", 125), ItemList.Arrow_Wooden_Glass_Slowness.get(1L, new Object[0]), ItemList.Arrow_Wooden_Glass_Emtpy.get(1L, new Object[0]))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(FluidRegistry.getFluidStack("potion.slowness.long", 125), ItemList.Arrow_Wooden_Glass_Slowness_Long.get(1L, new Object[0]), ItemList.Arrow_Wooden_Glass_Emtpy.get(1L, new Object[0]))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(FluidRegistry.getFluidStack("potion.weakness", 125), ItemList.Arrow_Wooden_Glass_Weakness.get(1L, new Object[0]), ItemList.Arrow_Wooden_Glass_Emtpy.get(1L, new Object[0]))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(FluidRegistry.getFluidStack("potion.weakness.long", 125), ItemList.Arrow_Wooden_Glass_Weakness_Long.get(1L, new Object[0]), ItemList.Arrow_Wooden_Glass_Emtpy.get(1L, new Object[0]))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(FluidRegistry.getFluidStack("holywater", 125), ItemList.Arrow_Wooden_Glass_Holy_Water.get(1L, new Object[0]), ItemList.Arrow_Wooden_Glass_Emtpy.get(1L, new Object[0]))); - - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(FluidRegistry.getFluidStack("potion.poison", 125), ItemList.Arrow_Plastic_Glass_Poison.get(1L, new Object[0]), ItemList.Arrow_Plastic_Glass_Emtpy.get(1L, new Object[0]))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(FluidRegistry.getFluidStack("potion.poison.long", 125), ItemList.Arrow_Plastic_Glass_Poison_Long.get(1L, new Object[0]), ItemList.Arrow_Plastic_Glass_Emtpy.get(1L, new Object[0]))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(FluidRegistry.getFluidStack("potion.poison.strong", 125), ItemList.Arrow_Plastic_Glass_Poison_Strong.get(1L, new Object[0]), ItemList.Arrow_Plastic_Glass_Emtpy.get(1L, new Object[0]))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(FluidRegistry.getFluidStack("potion.slowness", 125), ItemList.Arrow_Plastic_Glass_Slowness.get(1L, new Object[0]), ItemList.Arrow_Plastic_Glass_Emtpy.get(1L, new Object[0]))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(FluidRegistry.getFluidStack("potion.slowness.long", 125), ItemList.Arrow_Plastic_Glass_Slowness_Long.get(1L, new Object[0]), ItemList.Arrow_Plastic_Glass_Emtpy.get(1L, new Object[0]))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(FluidRegistry.getFluidStack("potion.weakness", 125), ItemList.Arrow_Plastic_Glass_Weakness.get(1L, new Object[0]), ItemList.Arrow_Plastic_Glass_Emtpy.get(1L, new Object[0]))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(FluidRegistry.getFluidStack("potion.weakness.long", 125), ItemList.Arrow_Plastic_Glass_Weakness_Long.get(1L, new Object[0]), ItemList.Arrow_Plastic_Glass_Emtpy.get(1L, new Object[0]))); - FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(FluidRegistry.getFluidStack("holywater", 125), ItemList.Arrow_Plastic_Glass_Holy_Water.get(1L, new Object[0]), ItemList.Arrow_Plastic_Glass_Emtpy.get(1L, new Object[0]))); + GT_Mod.gregtechproxy.addFluid( + "potion.awkward", + "Awkward Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.thick", + "Thick Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 32), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.mundane", + "Mundane Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 64), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.damage", + "Harming Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 8204), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.damage.strong", + "Strong Harming Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 8236), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.damage.splash", + "Splash Harming Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16396), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.damage.strong.splash", + "Strong Splash Harming Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16428), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.health", + "Healing Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 8197), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.health.strong", + "Strong Healing Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 8229), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.health.splash", + "Splash Healing Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16389), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.health.strong.splash", + "Strong Splash Healing Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16421), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.speed", + "Swiftness Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 8194), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.speed.strong", + "Strong Swiftness Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 8226), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.speed.long", + "Stretched Swiftness Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 8258), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.speed.splash", + "Splash Swiftness Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16386), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.speed.strong.splash", + "Strong Splash Swiftness Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16418), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.speed.long.splash", + "Stretched Splash Swiftness Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16450), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.strength", + "Strength Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 8201), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.strength.strong", + "Strong Strength Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 8233), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.strength.long", + "Stretched Strength Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 8265), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.strength.splash", + "Splash Strength Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16393), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.strength.strong.splash", + "Strong Splash Strength Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16425), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.strength.long.splash", + "Stretched Splash Strength Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16457), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.regen", + "Regenerating Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 8193), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.regen.strong", + "Strong Regenerating Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 8225), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.regen.long", + "Stretched Regenerating Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 8257), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.regen.splash", + "Splash Regenerating Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16385), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.regen.strong.splash", + "Strong Splash Regenerating Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16417), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.regen.long.splash", + "Stretched Splash Regenerating Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16449), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.poison", + "Poisonous Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 8196), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.poison.strong", + "Strong Poisonous Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 8228), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.poison.long", + "Stretched Poisonous Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 8260), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.poison.splash", + "Splash Poisonous Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16388), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.poison.strong.splash", + "Strong Splash Poisonous Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16420), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.poison.long.splash", + "Stretched Splash Poisonous Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16452), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.fireresistance", + "Fire Resistant Brew", + null, + 1, + 375, + new ItemStack(Items.potionitem, 1, 8195), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.fireresistance.long", + "Stretched Fire Resistant Brew", + null, + 1, + 375, + new ItemStack(Items.potionitem, 1, 8259), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.fireresistance.splash", + "Splash Fire Resistant Brew", + null, + 1, + 375, + new ItemStack(Items.potionitem, 1, 16387), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.fireresistance.long.splash", + "Stretched Splash Fire Resistant Brew", + null, + 1, + 375, + new ItemStack(Items.potionitem, 1, 16451), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.nightvision", + "Night Vision Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 8198), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.nightvision.long", + "Stretched Night Vision Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 8262), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.nightvision.splash", + "Splash Night Vision Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16390), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.nightvision.long.splash", + "Stretched Splash Night Vision Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16454), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.weakness", + "Weakening Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 8200), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.weakness.long", + "Stretched Weakening Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 8264), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.weakness.splash", + "Splash Weakening Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16392), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.weakness.long.splash", + "Stretched Splash Weakening Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16456), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.slowness", + "Lame Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 8202), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.slowness.long", + "Stretched Lame Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 8266), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.slowness.splash", + "Splash Lame Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16394), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.slowness.long.splash", + "Stretched Splash Lame Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16458), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.waterbreathing", + "Fishy Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 8205), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.waterbreathing.long", + "Stretched Fishy Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 8269), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.waterbreathing.splash", + "Splash Fishy Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16397), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.waterbreathing.long.splash", + "Stretched Splash Fishy Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16461), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.invisibility", + "Invisible Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 8206), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.invisibility.long", + "Stretched Invisible Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 8270), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.invisibility.splash", + "Splash Invisible Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16398), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.invisibility.long.splash", + "Stretched Splash Invisible Brew", + null, + 1, + 295, + new ItemStack(Items.potionitem, 1, 16462), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + + GT_Mod.gregtechproxy.addFluid( + "potion.purpledrink", + "Purple Drink", + null, + 1, + 275, + ItemList.Bottle_Purple_Drink.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.grapejuice", + "Grape Juice", + null, + 1, + 295, + ItemList.Bottle_Grape_Juice.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.wine", + "Wine", + null, + 1, + 295, + ItemList.Bottle_Wine.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.vinegar", + "Vinegar", + Materials.Vinegar, + 1, + 295, + ItemList.Bottle_Vinegar.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.potatojuice", + "Potato Juice", + null, + 1, + 295, + ItemList.Bottle_Potato_Juice.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.vodka", + "Vodka", + null, + 1, + 275, + ItemList.Bottle_Vodka.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.leninade", + "Leninade", + null, + 1, + 275, + ItemList.Bottle_Leninade.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.mineralwater", + "Mineral Water", + null, + 1, + 275, + ItemList.Bottle_Mineral_Water.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.saltywater", + "Salty Water", + null, + 1, + 275, + ItemList.Bottle_Salty_Water.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.reedwater", + "Reed Water", + null, + 1, + 295, + ItemList.Bottle_Reed_Water.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.rum", + "Rum", + null, + 1, + 295, + ItemList.Bottle_Rum.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.piratebrew", + "Pirate Brew", + null, + 1, + 295, + ItemList.Bottle_Pirate_Brew.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.hopsjuice", + "Hops Juice", + null, + 1, + 295, + ItemList.Bottle_Hops_Juice.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.darkbeer", + "Dark Beer", + null, + 1, + 275, + ItemList.Bottle_Dark_Beer.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.dragonblood", + "Dragon Blood", + null, + 1, + 375, + ItemList.Bottle_Dragon_Blood.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.wheatyjuice", + "Wheaty Juice", + null, + 1, + 295, + ItemList.Bottle_Wheaty_Juice.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.scotch", + "Scotch", + null, + 1, + 275, + ItemList.Bottle_Scotch.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.glenmckenner", + "Glen McKenner", + null, + 1, + 275, + ItemList.Bottle_Glen_McKenner.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.wheatyhopsjuice", + "Wheaty Hops Juice", + null, + 1, + 295, + ItemList.Bottle_Wheaty_Hops_Juice.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.beer", + "Beer", + null, + 1, + 275, + ItemList.Bottle_Beer.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.chillysauce", + "Chilly Sauce", + null, + 1, + 375, + ItemList.Bottle_Chilly_Sauce.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.hotsauce", + "Hot Sauce", + null, + 1, + 380, + ItemList.Bottle_Hot_Sauce.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.diabolosauce", + "Diabolo Sauce", + null, + 1, + 385, + ItemList.Bottle_Diabolo_Sauce.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.diablosauce", + "Diablo Sauce", + null, + 1, + 390, + ItemList.Bottle_Diablo_Sauce.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.diablosauce.strong", + "Old Man Snitches glitched Diablo Sauce", + null, + 1, + 999, + ItemList.Bottle_Snitches_Glitch_Sauce.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.applejuice", + "Apple Juice", + null, + 1, + 295, + ItemList.Bottle_Apple_Juice.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.cider", + "Cider", + null, + 1, + 295, + ItemList.Bottle_Cider.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.goldenapplejuice", + "Golden Apple Juice", + null, + 1, + 295, + ItemList.Bottle_Golden_Apple_Juice.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.goldencider", + "Golden Cider", + null, + 1, + 295, + ItemList.Bottle_Golden_Cider.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.idunsapplejuice", + "Idun's Apple Juice", + null, + 1, + 295, + ItemList.Bottle_Iduns_Apple_Juice.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.notchesbrew", + "Notches Brew", + null, + 1, + 295, + ItemList.Bottle_Notches_Brew.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.lemonjuice", + "Lemon Juice", + null, + 1, + 295, + ItemList.Bottle_Lemon_Juice.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.limoncello", + "Limoncello", + null, + 1, + 295, + ItemList.Bottle_Limoncello.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.lemonade", + "Lemonade", + null, + 1, + 275, + ItemList.Bottle_Lemonade.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.alcopops", + "Alcopops", + null, + 1, + 275, + ItemList.Bottle_Alcopops.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.cavejohnsonsgrenadejuice", + "Cave Johnsons Grenade Juice", + null, + 1, + 295, + ItemList.Bottle_Cave_Johnsons_Grenade_Juice.get(1L, new Object[0]), + ItemList.Bottle_Empty.get(1L, new Object[0]), + 250); + + GT_Mod.gregtechproxy.addFluid( + "potion.darkcoffee", + "Dark Coffee", + null, + 1, + 295, + ItemList.ThermosCan_Dark_Coffee.get(1L, new Object[0]), + ItemList.ThermosCan_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.darkcafeaulait", + "Dark Cafe au lait", + null, + 1, + 295, + ItemList.ThermosCan_Dark_Cafe_au_lait.get(1L, new Object[0]), + ItemList.ThermosCan_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.coffee", + "Coffee", + null, + 1, + 295, + ItemList.ThermosCan_Coffee.get(1L, new Object[0]), + ItemList.ThermosCan_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.cafeaulait", + "Cafe au lait", + null, + 1, + 295, + ItemList.ThermosCan_Cafe_au_lait.get(1L, new Object[0]), + ItemList.ThermosCan_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.laitaucafe", + "Lait au cafe", + null, + 1, + 295, + ItemList.ThermosCan_Lait_au_cafe.get(1L, new Object[0]), + ItemList.ThermosCan_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.darkchocolatemilk", + "Bitter Chocolate Milk", + null, + 1, + 295, + ItemList.ThermosCan_Dark_Chocolate_Milk.get(1L, new Object[0]), + ItemList.ThermosCan_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.chocolatemilk", + "Chocolate Milk", + null, + 1, + 295, + ItemList.ThermosCan_Chocolate_Milk.get(1L, new Object[0]), + ItemList.ThermosCan_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.tea", + "Tea", + null, + 1, + 295, + ItemList.ThermosCan_Tea.get(1L, new Object[0]), + ItemList.ThermosCan_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.sweettea", + "Sweet Tea", + null, + 1, + 295, + ItemList.ThermosCan_Sweet_Tea.get(1L, new Object[0]), + ItemList.ThermosCan_Empty.get(1L, new Object[0]), + 250); + GT_Mod.gregtechproxy.addFluid( + "potion.icetea", + "Ice Tea", + null, + 1, + 255, + ItemList.ThermosCan_Ice_Tea.get(1L, new Object[0]), + ItemList.ThermosCan_Empty.get(1L, new Object[0]), + 250); + + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.poison.strong", 750), + ItemList.IC2_Spray_WeedEx.get(1L, new Object[0]), + ItemList.Spray_Empty.get(1L, new Object[0]))); + + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.poison", 125), + ItemList.Arrow_Head_Glass_Poison.get(1L, new Object[0]), + ItemList.Arrow_Head_Glass_Emtpy.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.poison.long", 125), + ItemList.Arrow_Head_Glass_Poison_Long.get(1L, new Object[0]), + ItemList.Arrow_Head_Glass_Emtpy.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.poison.strong", 125), + ItemList.Arrow_Head_Glass_Poison_Strong.get(1L, new Object[0]), + ItemList.Arrow_Head_Glass_Emtpy.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.slowness", 125), + ItemList.Arrow_Head_Glass_Slowness.get(1L, new Object[0]), + ItemList.Arrow_Head_Glass_Emtpy.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.slowness.long", 125), + ItemList.Arrow_Head_Glass_Slowness_Long.get(1L, new Object[0]), + ItemList.Arrow_Head_Glass_Emtpy.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.weakness", 125), + ItemList.Arrow_Head_Glass_Weakness.get(1L, new Object[0]), + ItemList.Arrow_Head_Glass_Emtpy.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.weakness.long", 125), + ItemList.Arrow_Head_Glass_Weakness_Long.get(1L, new Object[0]), + ItemList.Arrow_Head_Glass_Emtpy.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("holywater", 125), + ItemList.Arrow_Head_Glass_Holy_Water.get(1L, new Object[0]), + ItemList.Arrow_Head_Glass_Emtpy.get(1L, new Object[0]))); + + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.poison", 125), + ItemList.Arrow_Wooden_Glass_Poison.get(1L, new Object[0]), + ItemList.Arrow_Wooden_Glass_Emtpy.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.poison.long", 125), + ItemList.Arrow_Wooden_Glass_Poison_Long.get(1L, new Object[0]), + ItemList.Arrow_Wooden_Glass_Emtpy.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.poison.strong", 125), + ItemList.Arrow_Wooden_Glass_Poison_Strong.get(1L, new Object[0]), + ItemList.Arrow_Wooden_Glass_Emtpy.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.slowness", 125), + ItemList.Arrow_Wooden_Glass_Slowness.get(1L, new Object[0]), + ItemList.Arrow_Wooden_Glass_Emtpy.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.slowness.long", 125), + ItemList.Arrow_Wooden_Glass_Slowness_Long.get(1L, new Object[0]), + ItemList.Arrow_Wooden_Glass_Emtpy.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.weakness", 125), + ItemList.Arrow_Wooden_Glass_Weakness.get(1L, new Object[0]), + ItemList.Arrow_Wooden_Glass_Emtpy.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.weakness.long", 125), + ItemList.Arrow_Wooden_Glass_Weakness_Long.get(1L, new Object[0]), + ItemList.Arrow_Wooden_Glass_Emtpy.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("holywater", 125), + ItemList.Arrow_Wooden_Glass_Holy_Water.get(1L, new Object[0]), + ItemList.Arrow_Wooden_Glass_Emtpy.get(1L, new Object[0]))); + + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.poison", 125), + ItemList.Arrow_Plastic_Glass_Poison.get(1L, new Object[0]), + ItemList.Arrow_Plastic_Glass_Emtpy.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.poison.long", 125), + ItemList.Arrow_Plastic_Glass_Poison_Long.get(1L, new Object[0]), + ItemList.Arrow_Plastic_Glass_Emtpy.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.poison.strong", 125), + ItemList.Arrow_Plastic_Glass_Poison_Strong.get(1L, new Object[0]), + ItemList.Arrow_Plastic_Glass_Emtpy.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.slowness", 125), + ItemList.Arrow_Plastic_Glass_Slowness.get(1L, new Object[0]), + ItemList.Arrow_Plastic_Glass_Emtpy.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.slowness.long", 125), + ItemList.Arrow_Plastic_Glass_Slowness_Long.get(1L, new Object[0]), + ItemList.Arrow_Plastic_Glass_Emtpy.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.weakness", 125), + ItemList.Arrow_Plastic_Glass_Weakness.get(1L, new Object[0]), + ItemList.Arrow_Plastic_Glass_Emtpy.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("potion.weakness.long", 125), + ItemList.Arrow_Plastic_Glass_Weakness_Long.get(1L, new Object[0]), + ItemList.Arrow_Plastic_Glass_Emtpy.get(1L, new Object[0]))); + FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData( + FluidRegistry.getFluidStack("holywater", 125), + ItemList.Arrow_Plastic_Glass_Holy_Water.get(1L, new Object[0]), + ItemList.Arrow_Plastic_Glass_Emtpy.get(1L, new Object[0]))); if (!GT_Values.D1) { try { Class.forName("codechicken.nei.api.API"); @@ -741,67 +2603,152 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { } } } - GT_ModHandler.addPulverisationRecipe(new ItemStack(Blocks.cobblestone, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), null, 0, false); - GT_ModHandler.addPulverisationRecipe(new ItemStack(Blocks.gravel, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new ItemStack(Items.flint, 1), 10, false); - GT_ModHandler.addPulverisationRecipe(new ItemStack(Blocks.furnace, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 8L), null, 0, false); - GT_ModHandler.addPulverisationRecipe(new ItemStack(Blocks.lit_furnace, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 8L), null, 0, false); - - GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.FierySteel, GT_ModHandler.getModItem("TwilightForest", "item.fieryIngot", 1L, 0)); - GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.Knightmetal, GT_ModHandler.getModItem("TwilightForest", "item.knightMetal", 1L, 0)); - GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.Steeleaf, GT_ModHandler.getModItem("TwilightForest", "item.steeleafIngot", 1L, 0)); - GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.IronWood, GT_ModHandler.getModItem("TwilightForest", "item.ironwoodIngot", 1L, 0)); - GT_OreDictUnificator.set(OrePrefixes.gem, Materials.InfusedAir, GT_ModHandler.getModItem("Thaumcraft", "ItemShard", 1L, 0)); - GT_OreDictUnificator.set(OrePrefixes.gem, Materials.InfusedFire, GT_ModHandler.getModItem("Thaumcraft", "ItemShard", 1L, 1)); - GT_OreDictUnificator.set(OrePrefixes.gem, Materials.InfusedWater, GT_ModHandler.getModItem("Thaumcraft", "ItemShard", 1L, 2)); - GT_OreDictUnificator.set(OrePrefixes.gem, Materials.InfusedEarth, GT_ModHandler.getModItem("Thaumcraft", "ItemShard", 1L, 3)); - GT_OreDictUnificator.set(OrePrefixes.gem, Materials.InfusedOrder, GT_ModHandler.getModItem("Thaumcraft", "ItemShard", 1L, 4)); - GT_OreDictUnificator.set(OrePrefixes.gem, Materials.InfusedEntropy, GT_ModHandler.getModItem("Thaumcraft", "ItemShard", 1L, 5)); - GT_OreDictUnificator.set(OrePrefixes.nugget, Materials.Mercury, GT_ModHandler.getModItem("Thaumcraft", "ItemNugget", 1L, 5)); - GT_OreDictUnificator.set(OrePrefixes.nugget, Materials.Thaumium, GT_ModHandler.getModItem("Thaumcraft", "ItemNugget", 1L, 6)); - GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.Thaumium, GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1L, 2)); - GT_OreDictUnificator.set(OrePrefixes.gem, Materials.Mercury, GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1L, 3)); - GT_OreDictUnificator.set(OrePrefixes.gem, Materials.Amber, GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1L, 6)); - GT_OreDictUnificator.set(OrePrefixes.gem, Materials.Firestone, GT_ModHandler.getModItem("Railcraft", "firestone.raw", 1L)); - - GT_OreDictUnificator.set(OrePrefixes.nugget, Materials.Void, GT_ModHandler.getModItem("Thaumcraft", "ItemNugget", 1L, 7)); - GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.Void, GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1L, 16)); - GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.BloodInfusedIron, GT_ModHandler.getModItem("BloodArsenal", "blood_infused_iron", 1L, 0)); - - if (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + "railcraft", "plateIron", true)) { - GT_OreDictUnificator.set(OrePrefixes.plate, Materials.Iron, GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 0)); + GT_ModHandler.addPulverisationRecipe( + new ItemStack(Blocks.cobblestone, 1, 32767), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), + null, + 0, + false); + GT_ModHandler.addPulverisationRecipe( + new ItemStack(Blocks.gravel, 1, 32767), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), + new ItemStack(Items.flint, 1), + 10, + false); + GT_ModHandler.addPulverisationRecipe( + new ItemStack(Blocks.furnace, 1, 32767), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 8L), + null, + 0, + false); + GT_ModHandler.addPulverisationRecipe( + new ItemStack(Blocks.lit_furnace, 1, 32767), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 8L), + null, + 0, + false); + + GT_OreDictUnificator.set( + OrePrefixes.ingot, + Materials.FierySteel, + GT_ModHandler.getModItem("TwilightForest", "item.fieryIngot", 1L, 0)); + GT_OreDictUnificator.set( + OrePrefixes.ingot, + Materials.Knightmetal, + GT_ModHandler.getModItem("TwilightForest", "item.knightMetal", 1L, 0)); + GT_OreDictUnificator.set( + OrePrefixes.ingot, + Materials.Steeleaf, + GT_ModHandler.getModItem("TwilightForest", "item.steeleafIngot", 1L, 0)); + GT_OreDictUnificator.set( + OrePrefixes.ingot, + Materials.IronWood, + GT_ModHandler.getModItem("TwilightForest", "item.ironwoodIngot", 1L, 0)); + GT_OreDictUnificator.set( + OrePrefixes.gem, Materials.InfusedAir, GT_ModHandler.getModItem("Thaumcraft", "ItemShard", 1L, 0)); + GT_OreDictUnificator.set( + OrePrefixes.gem, Materials.InfusedFire, GT_ModHandler.getModItem("Thaumcraft", "ItemShard", 1L, 1)); + GT_OreDictUnificator.set( + OrePrefixes.gem, Materials.InfusedWater, GT_ModHandler.getModItem("Thaumcraft", "ItemShard", 1L, 2)); + GT_OreDictUnificator.set( + OrePrefixes.gem, Materials.InfusedEarth, GT_ModHandler.getModItem("Thaumcraft", "ItemShard", 1L, 3)); + GT_OreDictUnificator.set( + OrePrefixes.gem, Materials.InfusedOrder, GT_ModHandler.getModItem("Thaumcraft", "ItemShard", 1L, 4)); + GT_OreDictUnificator.set( + OrePrefixes.gem, Materials.InfusedEntropy, GT_ModHandler.getModItem("Thaumcraft", "ItemShard", 1L, 5)); + GT_OreDictUnificator.set( + OrePrefixes.nugget, Materials.Mercury, GT_ModHandler.getModItem("Thaumcraft", "ItemNugget", 1L, 5)); + GT_OreDictUnificator.set( + OrePrefixes.nugget, Materials.Thaumium, GT_ModHandler.getModItem("Thaumcraft", "ItemNugget", 1L, 6)); + GT_OreDictUnificator.set( + OrePrefixes.ingot, Materials.Thaumium, GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1L, 2)); + GT_OreDictUnificator.set( + OrePrefixes.gem, Materials.Mercury, GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1L, 3)); + GT_OreDictUnificator.set( + OrePrefixes.gem, Materials.Amber, GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1L, 6)); + GT_OreDictUnificator.set( + OrePrefixes.gem, Materials.Firestone, GT_ModHandler.getModItem("Railcraft", "firestone.raw", 1L)); + + GT_OreDictUnificator.set( + OrePrefixes.nugget, Materials.Void, GT_ModHandler.getModItem("Thaumcraft", "ItemNugget", 1L, 7)); + GT_OreDictUnificator.set( + OrePrefixes.ingot, Materials.Void, GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1L, 16)); + GT_OreDictUnificator.set( + OrePrefixes.ingot, + Materials.BloodInfusedIron, + GT_ModHandler.getModItem("BloodArsenal", "blood_infused_iron", 1L, 0)); + + if (GregTech_API.sUnification.get( + ConfigCategories.specialunificationtargets + "." + "railcraft", "plateIron", true)) { + GT_OreDictUnificator.set( + OrePrefixes.plate, Materials.Iron, GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 0)); } else { - GT_OreDictUnificator.set(OrePrefixes.plate, Materials.Iron, GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 0), false, false); + GT_OreDictUnificator.set( + OrePrefixes.plate, + Materials.Iron, + GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 0), + false, + false); } - if (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + "railcraft", "plateSteel", true)) { - GT_OreDictUnificator.set(OrePrefixes.plate, Materials.Steel, GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 1)); + if (GregTech_API.sUnification.get( + ConfigCategories.specialunificationtargets + "." + "railcraft", "plateSteel", true)) { + GT_OreDictUnificator.set( + OrePrefixes.plate, Materials.Steel, GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 1)); } else { - GT_OreDictUnificator.set(OrePrefixes.plate, Materials.Steel, GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 1), false, false); + GT_OreDictUnificator.set( + OrePrefixes.plate, + Materials.Steel, + GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 1), + false, + false); } - if (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + "railcraft", "plateTinAlloy", true)) { - GT_OreDictUnificator.set(OrePrefixes.plate, Materials.TinAlloy, GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 2)); + if (GregTech_API.sUnification.get( + ConfigCategories.specialunificationtargets + "." + "railcraft", "plateTinAlloy", true)) { + GT_OreDictUnificator.set( + OrePrefixes.plate, Materials.TinAlloy, GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 2)); } else { - GT_OreDictUnificator.set(OrePrefixes.plate, Materials.TinAlloy, GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 2), false, false); + GT_OreDictUnificator.set( + OrePrefixes.plate, + Materials.TinAlloy, + GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 2), + false, + false); } - - if (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + "railcraft", "plateCopper", true)) { - GT_OreDictUnificator.set(OrePrefixes.plate, Materials.Copper, GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 3)); + if (GregTech_API.sUnification.get( + ConfigCategories.specialunificationtargets + "." + "railcraft", "plateCopper", true)) { + GT_OreDictUnificator.set( + OrePrefixes.plate, Materials.Copper, GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 3)); } else { - GT_OreDictUnificator.set(OrePrefixes.plate, Materials.Copper, GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 3), false, false); + GT_OreDictUnificator.set( + OrePrefixes.plate, + Materials.Copper, + GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 3), + false, + false); } - - GT_OreDictUnificator.set(OrePrefixes.dust, Materials.Cocoa, GT_ModHandler.getModItem("harvestcraft", "cocoapowderItem", 1L, 0)); + GT_OreDictUnificator.set( + OrePrefixes.dust, Materials.Cocoa, GT_ModHandler.getModItem("harvestcraft", "cocoapowderItem", 1L, 0)); GT_OreDictUnificator.set(OrePrefixes.dust, Materials.Coffee, ItemList.IC2_CoffeePowder.get(1L, new Object[0])); - - //TODO ADD LATER @Technus why it crash if enable? - //FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(Materials.Naquadah.getMolten(1000L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Naquadah, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L))); - //FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(Materials.NaquadahEnriched.getMolten(1000L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NaquadahEnriched, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L))); - //FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(Materials.Naquadria.getMolten(1000L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Naquadria, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L))); - - GregTech_API.registerMachineBlock(GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("reinforcedGlass", 0)), 0); + // TODO ADD LATER @Technus why it crash if enable? + // FluidContainerRegistry.registerFluidContainer(new + // FluidContainerRegistry.FluidContainerData(Materials.Naquadah.getMolten(1000L), + // GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Naquadah, 1L), + // GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L))); + // FluidContainerRegistry.registerFluidContainer(new + // FluidContainerRegistry.FluidContainerData(Materials.NaquadahEnriched.getMolten(1000L), + // GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NaquadahEnriched, 1L), + // GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L))); + // FluidContainerRegistry.registerFluidContainer(new + // FluidContainerRegistry.FluidContainerData(Materials.Naquadria.getMolten(1000L), + // GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Naquadria, 1L), + // GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L))); + + GregTech_API.registerMachineBlock( + GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("reinforcedGlass", 0)), 0); } } diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java index de50b309cc..ecf4356f62 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java @@ -204,115 +204,596 @@ import net.minecraft.util.EnumChatFormatting; // 748 // 749 -public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUIT RECIPES AND USAGES - private static final String aTextWire1 = "wire."; private static final String aTextCable1 = "cable."; private static final String aTextWire2 = " Wire"; private static final String aTextCable2 = " Cable"; - private static final String aTextPlate = "PPP"; private static final String aTextPlateWrench = "PwP"; private static final String aTextPlateMotor = "PMP"; private static final String aTextCableHull = "CMC"; - private static final String aTextWireHull = "WMW"; private static final String aTextWireChest = "WTW"; private static final String aTextWireCoil = "WCW"; private static final String aTextMotorWire = "EWE"; +public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRCUIT RECIPES AND USAGES + private static final String aTextWire1 = "wire."; + private static final String aTextCable1 = "cable."; + private static final String aTextWire2 = " Wire"; + private static final String aTextCable2 = " Cable"; + private static final String aTextPlate = "PPP"; + private static final String aTextPlateWrench = "PwP"; + private static final String aTextPlateMotor = "PMP"; + private static final String aTextCableHull = "CMC"; + private static final String aTextWireHull = "WMW"; + private static final String aTextWireChest = "WTW"; + private static final String aTextWireCoil = "WCW"; + private static final String aTextMotorWire = "EWE"; private static final String aTextWirePump = "WPW"; - public static final String imagination=EnumChatFormatting.RESET + "You just need " + EnumChatFormatting.DARK_PURPLE + "I" + EnumChatFormatting.LIGHT_PURPLE + "m" + EnumChatFormatting.DARK_RED + "a" + EnumChatFormatting.RED + "g" + EnumChatFormatting.YELLOW + "i" + EnumChatFormatting.GREEN + "n" + EnumChatFormatting.AQUA + "a" + EnumChatFormatting.DARK_AQUA + "t" + EnumChatFormatting.BLUE + "i" + EnumChatFormatting.DARK_BLUE + "o" + EnumChatFormatting.DARK_PURPLE + "n" + EnumChatFormatting.RESET + " to use this."; - private static final long bits = GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED; + public static final String imagination = EnumChatFormatting.RESET + "You just need " + + EnumChatFormatting.DARK_PURPLE + "I" + EnumChatFormatting.LIGHT_PURPLE + "m" + EnumChatFormatting.DARK_RED + + "a" + EnumChatFormatting.RED + "g" + EnumChatFormatting.YELLOW + "i" + EnumChatFormatting.GREEN + "n" + + EnumChatFormatting.AQUA + "a" + EnumChatFormatting.DARK_AQUA + "t" + EnumChatFormatting.BLUE + "i" + + EnumChatFormatting.DARK_BLUE + "o" + EnumChatFormatting.DARK_PURPLE + "n" + EnumChatFormatting.RESET + + " to use this."; + private static final long bits = GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE + | GT_ModHandler.RecipeBits.BUFFERED; private static final long bitsd = GT_ModHandler.RecipeBits.DISMANTLEABLE | bits; private static final Boolean isNEILoaded = Loader.isModLoaded("NotEnoughItems"); private static void run1() { - GT_ModHandler.addCraftingRecipe(ItemList.Casing_Pipe_Polytetrafluoroethylene.get(1L), bits, new Object[]{"PIP", "IFI", "PIP", 'P', OrePrefixes.plate.get(Materials.Polytetrafluoroethylene), 'F', OrePrefixes.frameGt.get(Materials.Polytetrafluoroethylene), 'I', OrePrefixes.pipeMedium.get(Materials.Polytetrafluoroethylene)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_ULV.get(1L), bits, new Object[]{aTextPlate, aTextPlateWrench, aTextPlate, 'P', OrePrefixes.plate.get(Materials.WroughtIron)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_LV.get(1L), bits, new Object[]{aTextPlate, aTextPlateWrench, aTextPlate, 'P', OrePrefixes.plate.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_MV.get(1L), bits, new Object[]{aTextPlate, aTextPlateWrench, aTextPlate, 'P', OrePrefixes.plate.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_HV.get(1L), bits, new Object[]{aTextPlate, aTextPlateWrench, aTextPlate, 'P', OrePrefixes.plate.get(Materials.StainlessSteel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_EV.get(1L), bits, new Object[]{aTextPlate, aTextPlateWrench, aTextPlate, 'P', OrePrefixes.plate.get(Materials.Titanium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_IV.get(1L), bits, new Object[]{aTextPlate, aTextPlateWrench, aTextPlate, 'P', OrePrefixes.plate.get(Materials.TungstenSteel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_LuV.get(1L), bits, new Object[]{aTextPlate, aTextPlateWrench, aTextPlate, 'P', OrePrefixes.plate.get(Materials.Chrome)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_ZPM.get(1L), bits, new Object[]{aTextPlate, aTextPlateWrench, aTextPlate, 'P', OrePrefixes.plate.get(Materials.Iridium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_UV.get(1L), bits, new Object[]{aTextPlate, aTextPlateWrench, aTextPlate, 'P', OrePrefixes.plate.get(Materials.Osmium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_MAX.get(1L), bits, new Object[]{aTextPlate, aTextPlateWrench, aTextPlate, 'P', OrePrefixes.plate.get(Materials.Neutronium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_BronzePlatedBricks.get(1L), bits, new Object[]{"PhP", "PBP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.Bronze), 'B', new ItemStack(Blocks.brick_block, 1)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_SolidSteel.get(1L), bits, new Object[]{"PhP", "PFP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.Steel), 'F', OrePrefixes.frameGt.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_StableTitanium.get(1L), bits, new Object[]{"PhP", "PFP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.Titanium), 'F', OrePrefixes.frameGt.get(Materials.Titanium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_HeatProof.get(1L), bits, new Object[]{"PhP", "PFP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.Invar), 'F', OrePrefixes.frameGt.get(Materials.Invar)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_FrostProof.get(1L), bits, new Object[]{"PhP", "PFP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.Aluminium), 'F', OrePrefixes.frameGt.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_CleanStainlessSteel.get(1L), bits, new Object[]{"PhP", "PFP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'F', OrePrefixes.frameGt.get(Materials.StainlessSteel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_RobustTungstenSteel.get(1L), bits, new Object[]{"PhP", "PFP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'F', OrePrefixes.frameGt.get(Materials.TungstenSteel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_MiningOsmiridium.get(1L), bits, new Object[]{"PhP", "PFP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.Osmiridium), 'F', OrePrefixes.frameGt.get(Materials.Osmiridium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_MiningNeutronium.get(1L), bits, new Object[]{"PhP", "PFP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.Neutronium), 'F', OrePrefixes.frameGt.get(Materials.Neutronium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_MiningBlackPlutonium.get(1L), bits, new Object[]{"PhP", "PFP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.BlackPlutonium), 'F', OrePrefixes.frameGt.get(Materials.BlackPlutonium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_Turbine.get(1L), bits, new Object[]{"PhP", "PFP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.Magnalium), 'F', OrePrefixes.frameGt.get(Materials.BlueSteel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_Turbine1.get(1L), bits, new Object[]{"PhP", "PFP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'F', ItemList.Casing_Turbine}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_Turbine2.get(1L), bits, new Object[]{"PhP", "PFP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.Titanium), 'F', ItemList.Casing_Turbine}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_Turbine3.get(1L), bits, new Object[]{"PhP", "PFP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'F', ItemList.Casing_Turbine}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_TurbineGasAdvanced.get(1L), bits, new Object[]{"PhP", "PFP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.HSSS), 'F', ItemList.Casing_Turbine}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_Pipe_Bronze.get(1L), bits, new Object[]{"PIP", "IFI", "PIP", 'P', OrePrefixes.plate.get(Materials.Bronze), 'F', OrePrefixes.frameGt.get(Materials.Bronze), 'I', OrePrefixes.pipeMedium.get(Materials.Bronze)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_Pipe_Steel.get(1L), bits, new Object[]{"PIP", "IFI", "PIP", 'P', OrePrefixes.plate.get(Materials.Steel), 'F', OrePrefixes.frameGt.get(Materials.Steel), 'I', OrePrefixes.pipeMedium.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_Pipe_Titanium.get(1L), bits, new Object[]{"PIP", "IFI", "PIP", 'P', OrePrefixes.plate.get(Materials.Titanium), 'F', OrePrefixes.frameGt.get(Materials.Titanium), 'I', OrePrefixes.pipeMedium.get(Materials.Titanium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_Pipe_TungstenSteel.get(1L), bits, new Object[]{"PIP", "IFI", "PIP", 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'F', OrePrefixes.frameGt.get(Materials.TungstenSteel), 'I', OrePrefixes.pipeMedium.get(Materials.TungstenSteel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_Gearbox_Bronze.get(1L), bits, new Object[]{"PhP", "GFG", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.Bronze), 'F', OrePrefixes.frameGt.get(Materials.Bronze), 'G', OrePrefixes.gearGt.get(Materials.Bronze)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_Gearbox_Steel.get(1L), bits, new Object[]{"PhP", "GFG", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.Steel), 'F', OrePrefixes.frameGt.get(Materials.Steel), 'G', OrePrefixes.gearGt.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_Gearbox_Titanium.get(1L), bits, new Object[]{"PhP", "GFG", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.Steel), 'F', OrePrefixes.frameGt.get(Materials.Titanium), 'G', OrePrefixes.gearGt.get(Materials.Titanium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_Gearbox_TungstenSteel.get(1L), bits, new Object[]{"PhP", "GFG", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.Steel), 'F', OrePrefixes.frameGt.get(Materials.TungstenSteel), 'G', ItemList.Robot_Arm_IV}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_Grate.get(1L), bits, new Object[]{"PVP", "PFP", aTextPlateMotor, 'P', new ItemStack(Blocks.iron_bars, 1), 'F', OrePrefixes.frameGt.get(Materials.Steel), 'M', ItemList.Electric_Motor_MV, 'V', OrePrefixes.rotor.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_Assembler.get(1L), bits, new Object[]{"PVP", "PFP", aTextPlateMotor, 'P', OrePrefixes.circuit.get(Materials.Ultimate), 'F', OrePrefixes.frameGt.get(Materials.TungstenSteel), 'M', ItemList.Electric_Motor_IV, 'V', OrePrefixes.circuit.get(Materials.Master)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_Firebox_Bronze.get(1L), bits, new Object[]{"PSP", "SFS", "PSP", 'P', OrePrefixes.plate.get(Materials.Bronze), 'F', OrePrefixes.frameGt.get(Materials.Bronze), 'S', OrePrefixes.stick.get(Materials.Bronze)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_Firebox_Steel.get(1L), bits, new Object[]{"PSP", "SFS", "PSP", 'P', OrePrefixes.plate.get(Materials.Steel), 'F', OrePrefixes.frameGt.get(Materials.Steel), 'S', OrePrefixes.stick.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_Firebox_Titanium.get(1L), bits, new Object[]{"PSP", "SFS", "PSP", 'P', OrePrefixes.plate.get(Materials.Titanium), 'F', OrePrefixes.frameGt.get(Materials.Titanium), 'S', OrePrefixes.stick.get(Materials.Titanium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_Firebox_TungstenSteel.get(1L), bits, new Object[]{"PSP", "SFS", "PSP", 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'F', OrePrefixes.frameGt.get(Materials.TungstenSteel), 'S', OrePrefixes.stick.get(Materials.TungstenSteel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_Stripes_A.get(1L), bits, new Object[]{"Y ", " M ", " B", 'M', ItemList.Casing_SolidSteel, 'Y', Dyes.dyeYellow, 'B', Dyes.dyeBlack}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_Stripes_B.get(1L), bits, new Object[]{" Y", " M ", "B ", 'M', ItemList.Casing_SolidSteel, 'Y', Dyes.dyeYellow, 'B', Dyes.dyeBlack}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_RadioactiveHazard.get(1L), bits, new Object[]{" YB", " M ", " ", 'M', ItemList.Casing_SolidSteel, 'Y', Dyes.dyeYellow, 'B', Dyes.dyeBlack}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_BioHazard.get(1L), bits, new Object[]{" Y ", " MB", " ", 'M', ItemList.Casing_SolidSteel, 'Y', Dyes.dyeYellow, 'B', Dyes.dyeBlack}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_ExplosionHazard.get(1L), bits, new Object[]{" Y ", " M ", " B", 'M', ItemList.Casing_SolidSteel, 'Y', Dyes.dyeYellow, 'B', Dyes.dyeBlack}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_FireHazard.get(1L), bits, new Object[]{" Y ", " M ", " B ", 'M', ItemList.Casing_SolidSteel, 'Y', Dyes.dyeYellow, 'B', Dyes.dyeBlack}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_AcidHazard.get(1L), bits, new Object[]{" Y ", " M ", "B ", 'M', ItemList.Casing_SolidSteel, 'Y', Dyes.dyeYellow, 'B', Dyes.dyeBlack}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_MagicHazard.get(1L), bits, new Object[]{" Y ", "BM ", " ", 'M', ItemList.Casing_SolidSteel, 'Y', Dyes.dyeYellow, 'B', Dyes.dyeBlack}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_FrostHazard.get(1L), bits, new Object[]{"BY ", " M ", " ", 'M', ItemList.Casing_SolidSteel, 'Y', Dyes.dyeYellow, 'B', Dyes.dyeBlack}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_NoiseHazard.get(1L), bits, new Object[]{" ", " M ", "BY ", 'M', ItemList.Casing_SolidSteel, 'Y', Dyes.dyeYellow, 'B', Dyes.dyeBlack}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_Advanced_Iridium.get(1L), bits, new Object[]{"PhP", "PFP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.Iridium), 'F', OrePrefixes.frameGt.get(Materials.Iridium)}); - - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Casing_SolidSteel.get(1L), bits, new Object[]{ItemList.Casing_Stripes_A}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Casing_SolidSteel.get(1L), bits, new Object[]{ItemList.Casing_Stripes_B}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Casing_SolidSteel.get(1L), bits, new Object[]{ItemList.Casing_RadioactiveHazard}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Casing_SolidSteel.get(1L), bits, new Object[]{ItemList.Casing_BioHazard}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Casing_SolidSteel.get(1L), bits, new Object[]{ItemList.Casing_ExplosionHazard}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Casing_SolidSteel.get(1L), bits, new Object[]{ItemList.Casing_FireHazard}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Casing_SolidSteel.get(1L), bits, new Object[]{ItemList.Casing_AcidHazard}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Casing_SolidSteel.get(1L), bits, new Object[]{ItemList.Casing_MagicHazard}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Casing_SolidSteel.get(1L), bits, new Object[]{ItemList.Casing_FrostHazard}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Casing_SolidSteel.get(1L), bits, new Object[]{ItemList.Casing_NoiseHazard}); - - ItemList.Machine_Bricked_BlastFurnace.set(new GT_MetaTileEntity_BrickedBlastFurnace(140, "multimachine.brickedblastfurnace", "Bricked Blast Furnace").getStackForm(1L)); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_Bricked_BlastFurnace.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"BFB", "FwF", "BFB", 'B', ItemList.Casing_Firebricks, 'F', OreDictNames.craftingIronFurnace}); - - ItemList.Hull_Bronze.set(new GT_MetaTileEntity_BasicHull_Bronze(1, "hull.bronze", "Bronze Hull", 0, "For your first Steam Machines").getStackForm(1L)); - ItemList.Hull_Bronze_Bricks.set(new GT_MetaTileEntity_BasicHull_BronzeBricks(2, "hull.bronze_bricked", "Bricked Bronze Hull", 0, "For your first Steam Machines").getStackForm(1L)); - ItemList.Hull_HP.set(new GT_MetaTileEntity_BasicHull_Steel(3, "hull.steel", "Steel Hull", 0, "For improved Steam Machines").getStackForm(1L)); - ItemList.Hull_HP_Bricks.set(new GT_MetaTileEntity_BasicHull_SteelBricks(4, "hull.steel_bricked", "Bricked Wrought Iron Hull", 0, "For improved Steam Machines").getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Hull_Bronze.get(1L), bits, new Object[]{aTextPlate, "PhP", aTextPlate, 'P', OrePrefixes.plate.get(Materials.Bronze)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_Bronze_Bricks.get(1L), bits, new Object[]{aTextPlate, "PhP", "BBB", 'P', OrePrefixes.plate.get(Materials.Bronze), 'B', new ItemStack(Blocks.brick_block, 1)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_HP.get(1L), bits, new Object[]{aTextPlate, "PhP", aTextPlate, 'P', OrePrefixes.plate.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_HP_Bricks.get(1L), bits, new Object[]{aTextPlate, "PhP", "BBB", 'P', OrePrefixes.plate.get(Materials.WroughtIron), 'B', new ItemStack(Blocks.brick_block, 1)}); - - ItemList.Hull_ULV.set(new GT_MetaTileEntity_BasicHull(10, "hull.tier.00", "ULV Machine Hull", 0, imagination).getStackForm(1L)); - ItemList.Hull_LV.set(new GT_MetaTileEntity_BasicHull(11, "hull.tier.01", "LV Machine Hull", 1, imagination).getStackForm(1L)); - ItemList.Hull_MV.set(new GT_MetaTileEntity_BasicHull(12, "hull.tier.02", "MV Machine Hull", 2, imagination).getStackForm(1L)); - ItemList.Hull_HV.set(new GT_MetaTileEntity_BasicHull(13, "hull.tier.03", "HV Machine Hull", 3, imagination).getStackForm(1L)); - ItemList.Hull_EV.set(new GT_MetaTileEntity_BasicHull(14, "hull.tier.04", "EV Machine Hull", 4, imagination).getStackForm(1L)); - ItemList.Hull_IV.set(new GT_MetaTileEntity_BasicHull(15, "hull.tier.05", "IV Machine Hull", 5, imagination).getStackForm(1L)); - ItemList.Hull_LuV.set(new GT_MetaTileEntity_BasicHull(16, "hull.tier.06", "LuV Machine Hull", 6, imagination).getStackForm(1L)); - ItemList.Hull_ZPM.set(new GT_MetaTileEntity_BasicHull(17, "hull.tier.07", "ZPM Machine Hull", 7, imagination).getStackForm(1L)); - ItemList.Hull_UV.set(new GT_MetaTileEntity_BasicHull(18, "hull.tier.08", "UV Machine Hull", 8, imagination).getStackForm(1L)); - ItemList.Hull_MAX.set(new GT_MetaTileEntity_BasicHull(19, "hull.tier.09", "UHV Machine Hull", 9, imagination).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Hull_ULV.get(1L), GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextCableHull, 'M', ItemList.Casing_ULV, 'C', OrePrefixes.cableGt01.get(Materials.Lead), 'H', OrePrefixes.plate.get(Materials.WroughtIron), 'P', OrePrefixes.plate.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_LV.get(1L), GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextCableHull, 'M', ItemList.Casing_LV, 'C', OrePrefixes.cableGt01.get(Materials.Tin), 'H', OrePrefixes.plate.get(Materials.Steel), 'P', OrePrefixes.plate.get(Materials.WroughtIron)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_MV.get(1L), GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextCableHull, 'M', ItemList.Casing_MV, 'C', OrePrefixes.cableGt01.get(Materials.AnyCopper), 'H', OrePrefixes.plate.get(Materials.Aluminium), 'P', OrePrefixes.plate.get(Materials.WroughtIron)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_HV.get(1L), GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextCableHull, 'M', ItemList.Casing_HV, 'C', OrePrefixes.cableGt01.get(Materials.Gold), 'H', OrePrefixes.plate.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.Plastic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_EV.get(1L), GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextCableHull, 'M', ItemList.Casing_EV, 'C', OrePrefixes.cableGt01.get(Materials.Aluminium), 'H', OrePrefixes.plate.get(Materials.Titanium), 'P', OrePrefixes.plate.get(Materials.Plastic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_IV.get(1L), GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextCableHull, 'M', ItemList.Casing_IV, 'C', OrePrefixes.cableGt01.get(Materials.Tungsten), 'H', OrePrefixes.plate.get(Materials.TungstenSteel), 'P', OrePrefixes.plate.get(Materials.Polytetrafluoroethylene)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_LuV.get(1L), GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextCableHull, 'M', ItemList.Casing_LuV, 'C', OrePrefixes.cableGt01.get(Materials.VanadiumGallium), 'H', OrePrefixes.plate.get(Materials.Chrome), 'P', OrePrefixes.plate.get(Materials.Polytetrafluoroethylene)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_ZPM.get(1L), GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextCableHull, 'M', ItemList.Casing_ZPM, 'C', OrePrefixes.cableGt02.get(Materials.Naquadah), 'H', OrePrefixes.plate.get(Materials.Iridium), 'P', OrePrefixes.plate.get(Materials.Polybenzimidazole)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_UV.get(1L), GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextCableHull, 'M', ItemList.Casing_UV, 'C', OrePrefixes.cableGt04.get(Materials.NaquadahAlloy), 'H', OrePrefixes.plate.get(Materials.Osmium), 'P', OrePrefixes.plate.get(Materials.Polybenzimidazole)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_MAX.get(1L), GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{aTextCableHull, 'M', ItemList.Casing_MAX, 'C', OrePrefixes.wireGt04.get(Materials.SuperconductorUV), 'H', OrePrefixes.plate.get(Materials.Neutronium), 'P', OrePrefixes.plate.get(Materials.Polybenzimidazole)}); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Pipe_Polytetrafluoroethylene.get(1L), bits, new Object[] { + "PIP", + "IFI", + "PIP", + 'P', + OrePrefixes.plate.get(Materials.Polytetrafluoroethylene), + 'F', + OrePrefixes.frameGt.get(Materials.Polytetrafluoroethylene), + 'I', + OrePrefixes.pipeMedium.get(Materials.Polytetrafluoroethylene) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_ULV.get(1L), bits, new Object[] { + aTextPlate, aTextPlateWrench, aTextPlate, 'P', OrePrefixes.plate.get(Materials.WroughtIron) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_LV.get(1L), bits, new Object[] { + aTextPlate, aTextPlateWrench, aTextPlate, 'P', OrePrefixes.plate.get(Materials.Steel) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_MV.get(1L), bits, new Object[] { + aTextPlate, aTextPlateWrench, aTextPlate, 'P', OrePrefixes.plate.get(Materials.Aluminium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_HV.get(1L), bits, new Object[] { + aTextPlate, aTextPlateWrench, aTextPlate, 'P', OrePrefixes.plate.get(Materials.StainlessSteel) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_EV.get(1L), bits, new Object[] { + aTextPlate, aTextPlateWrench, aTextPlate, 'P', OrePrefixes.plate.get(Materials.Titanium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_IV.get(1L), bits, new Object[] { + aTextPlate, aTextPlateWrench, aTextPlate, 'P', OrePrefixes.plate.get(Materials.TungstenSteel) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_LuV.get(1L), bits, new Object[] { + aTextPlate, aTextPlateWrench, aTextPlate, 'P', OrePrefixes.plate.get(Materials.Chrome) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_ZPM.get(1L), bits, new Object[] { + aTextPlate, aTextPlateWrench, aTextPlate, 'P', OrePrefixes.plate.get(Materials.Iridium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_UV.get(1L), bits, new Object[] { + aTextPlate, aTextPlateWrench, aTextPlate, 'P', OrePrefixes.plate.get(Materials.Osmium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_MAX.get(1L), bits, new Object[] { + aTextPlate, aTextPlateWrench, aTextPlate, 'P', OrePrefixes.plate.get(Materials.Neutronium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_BronzePlatedBricks.get(1L), bits, new Object[] { + "PhP", + "PBP", + aTextPlateWrench, + 'P', + OrePrefixes.plate.get(Materials.Bronze), + 'B', + new ItemStack(Blocks.brick_block, 1) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_SolidSteel.get(1L), bits, new Object[] { + "PhP", + "PFP", + aTextPlateWrench, + 'P', + OrePrefixes.plate.get(Materials.Steel), + 'F', + OrePrefixes.frameGt.get(Materials.Steel) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_StableTitanium.get(1L), bits, new Object[] { + "PhP", + "PFP", + aTextPlateWrench, + 'P', + OrePrefixes.plate.get(Materials.Titanium), + 'F', + OrePrefixes.frameGt.get(Materials.Titanium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_HeatProof.get(1L), bits, new Object[] { + "PhP", + "PFP", + aTextPlateWrench, + 'P', + OrePrefixes.plate.get(Materials.Invar), + 'F', + OrePrefixes.frameGt.get(Materials.Invar) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_FrostProof.get(1L), bits, new Object[] { + "PhP", + "PFP", + aTextPlateWrench, + 'P', + OrePrefixes.plate.get(Materials.Aluminium), + 'F', + OrePrefixes.frameGt.get(Materials.Aluminium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_CleanStainlessSteel.get(1L), bits, new Object[] { + "PhP", + "PFP", + aTextPlateWrench, + 'P', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'F', + OrePrefixes.frameGt.get(Materials.StainlessSteel) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_RobustTungstenSteel.get(1L), bits, new Object[] { + "PhP", + "PFP", + aTextPlateWrench, + 'P', + OrePrefixes.plate.get(Materials.TungstenSteel), + 'F', + OrePrefixes.frameGt.get(Materials.TungstenSteel) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_MiningOsmiridium.get(1L), bits, new Object[] { + "PhP", + "PFP", + aTextPlateWrench, + 'P', + OrePrefixes.plate.get(Materials.Osmiridium), + 'F', + OrePrefixes.frameGt.get(Materials.Osmiridium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_MiningNeutronium.get(1L), bits, new Object[] { + "PhP", + "PFP", + aTextPlateWrench, + 'P', + OrePrefixes.plate.get(Materials.Neutronium), + 'F', + OrePrefixes.frameGt.get(Materials.Neutronium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_MiningBlackPlutonium.get(1L), bits, new Object[] { + "PhP", + "PFP", + aTextPlateWrench, + 'P', + OrePrefixes.plate.get(Materials.BlackPlutonium), + 'F', + OrePrefixes.frameGt.get(Materials.BlackPlutonium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Turbine.get(1L), bits, new Object[] { + "PhP", + "PFP", + aTextPlateWrench, + 'P', + OrePrefixes.plate.get(Materials.Magnalium), + 'F', + OrePrefixes.frameGt.get(Materials.BlueSteel) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Turbine1.get(1L), bits, new Object[] { + "PhP", + "PFP", + aTextPlateWrench, + 'P', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'F', + ItemList.Casing_Turbine + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Turbine2.get(1L), bits, new Object[] { + "PhP", "PFP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.Titanium), 'F', ItemList.Casing_Turbine + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Turbine3.get(1L), bits, new Object[] { + "PhP", + "PFP", + aTextPlateWrench, + 'P', + OrePrefixes.plate.get(Materials.TungstenSteel), + 'F', + ItemList.Casing_Turbine + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_TurbineGasAdvanced.get(1L), bits, new Object[] { + "PhP", "PFP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.HSSS), 'F', ItemList.Casing_Turbine + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Pipe_Bronze.get(1L), bits, new Object[] { + "PIP", + "IFI", + "PIP", + 'P', + OrePrefixes.plate.get(Materials.Bronze), + 'F', + OrePrefixes.frameGt.get(Materials.Bronze), + 'I', + OrePrefixes.pipeMedium.get(Materials.Bronze) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Pipe_Steel.get(1L), bits, new Object[] { + "PIP", + "IFI", + "PIP", + 'P', + OrePrefixes.plate.get(Materials.Steel), + 'F', + OrePrefixes.frameGt.get(Materials.Steel), + 'I', + OrePrefixes.pipeMedium.get(Materials.Steel) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Pipe_Titanium.get(1L), bits, new Object[] { + "PIP", + "IFI", + "PIP", + 'P', + OrePrefixes.plate.get(Materials.Titanium), + 'F', + OrePrefixes.frameGt.get(Materials.Titanium), + 'I', + OrePrefixes.pipeMedium.get(Materials.Titanium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Pipe_TungstenSteel.get(1L), bits, new Object[] { + "PIP", + "IFI", + "PIP", + 'P', + OrePrefixes.plate.get(Materials.TungstenSteel), + 'F', + OrePrefixes.frameGt.get(Materials.TungstenSteel), + 'I', + OrePrefixes.pipeMedium.get(Materials.TungstenSteel) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Gearbox_Bronze.get(1L), bits, new Object[] { + "PhP", + "GFG", + aTextPlateWrench, + 'P', + OrePrefixes.plate.get(Materials.Bronze), + 'F', + OrePrefixes.frameGt.get(Materials.Bronze), + 'G', + OrePrefixes.gearGt.get(Materials.Bronze) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Gearbox_Steel.get(1L), bits, new Object[] { + "PhP", + "GFG", + aTextPlateWrench, + 'P', + OrePrefixes.plate.get(Materials.Steel), + 'F', + OrePrefixes.frameGt.get(Materials.Steel), + 'G', + OrePrefixes.gearGt.get(Materials.Steel) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Gearbox_Titanium.get(1L), bits, new Object[] { + "PhP", + "GFG", + aTextPlateWrench, + 'P', + OrePrefixes.plate.get(Materials.Steel), + 'F', + OrePrefixes.frameGt.get(Materials.Titanium), + 'G', + OrePrefixes.gearGt.get(Materials.Titanium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Gearbox_TungstenSteel.get(1L), bits, new Object[] { + "PhP", + "GFG", + aTextPlateWrench, + 'P', + OrePrefixes.plate.get(Materials.Steel), + 'F', + OrePrefixes.frameGt.get(Materials.TungstenSteel), + 'G', + ItemList.Robot_Arm_IV + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Grate.get(1L), bits, new Object[] { + "PVP", + "PFP", + aTextPlateMotor, + 'P', + new ItemStack(Blocks.iron_bars, 1), + 'F', + OrePrefixes.frameGt.get(Materials.Steel), + 'M', + ItemList.Electric_Motor_MV, + 'V', + OrePrefixes.rotor.get(Materials.Steel) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Assembler.get(1L), bits, new Object[] { + "PVP", + "PFP", + aTextPlateMotor, + 'P', + OrePrefixes.circuit.get(Materials.Ultimate), + 'F', + OrePrefixes.frameGt.get(Materials.TungstenSteel), + 'M', + ItemList.Electric_Motor_IV, + 'V', + OrePrefixes.circuit.get(Materials.Master) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Firebox_Bronze.get(1L), bits, new Object[] { + "PSP", + "SFS", + "PSP", + 'P', + OrePrefixes.plate.get(Materials.Bronze), + 'F', + OrePrefixes.frameGt.get(Materials.Bronze), + 'S', + OrePrefixes.stick.get(Materials.Bronze) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Firebox_Steel.get(1L), bits, new Object[] { + "PSP", + "SFS", + "PSP", + 'P', + OrePrefixes.plate.get(Materials.Steel), + 'F', + OrePrefixes.frameGt.get(Materials.Steel), + 'S', + OrePrefixes.stick.get(Materials.Steel) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Firebox_Titanium.get(1L), bits, new Object[] { + "PSP", + "SFS", + "PSP", + 'P', + OrePrefixes.plate.get(Materials.Titanium), + 'F', + OrePrefixes.frameGt.get(Materials.Titanium), + 'S', + OrePrefixes.stick.get(Materials.Titanium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Firebox_TungstenSteel.get(1L), bits, new Object[] { + "PSP", + "SFS", + "PSP", + 'P', + OrePrefixes.plate.get(Materials.TungstenSteel), + 'F', + OrePrefixes.frameGt.get(Materials.TungstenSteel), + 'S', + OrePrefixes.stick.get(Materials.TungstenSteel) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Stripes_A.get(1L), bits, new Object[] { + "Y ", " M ", " B", 'M', ItemList.Casing_SolidSteel, 'Y', Dyes.dyeYellow, 'B', Dyes.dyeBlack + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Stripes_B.get(1L), bits, new Object[] { + " Y", " M ", "B ", 'M', ItemList.Casing_SolidSteel, 'Y', Dyes.dyeYellow, 'B', Dyes.dyeBlack + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_RadioactiveHazard.get(1L), bits, new Object[] { + " YB", " M ", " ", 'M', ItemList.Casing_SolidSteel, 'Y', Dyes.dyeYellow, 'B', Dyes.dyeBlack + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_BioHazard.get(1L), bits, new Object[] { + " Y ", " MB", " ", 'M', ItemList.Casing_SolidSteel, 'Y', Dyes.dyeYellow, 'B', Dyes.dyeBlack + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_ExplosionHazard.get(1L), bits, new Object[] { + " Y ", " M ", " B", 'M', ItemList.Casing_SolidSteel, 'Y', Dyes.dyeYellow, 'B', Dyes.dyeBlack + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_FireHazard.get(1L), bits, new Object[] { + " Y ", " M ", " B ", 'M', ItemList.Casing_SolidSteel, 'Y', Dyes.dyeYellow, 'B', Dyes.dyeBlack + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_AcidHazard.get(1L), bits, new Object[] { + " Y ", " M ", "B ", 'M', ItemList.Casing_SolidSteel, 'Y', Dyes.dyeYellow, 'B', Dyes.dyeBlack + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_MagicHazard.get(1L), bits, new Object[] { + " Y ", "BM ", " ", 'M', ItemList.Casing_SolidSteel, 'Y', Dyes.dyeYellow, 'B', Dyes.dyeBlack + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_FrostHazard.get(1L), bits, new Object[] { + "BY ", " M ", " ", 'M', ItemList.Casing_SolidSteel, 'Y', Dyes.dyeYellow, 'B', Dyes.dyeBlack + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_NoiseHazard.get(1L), bits, new Object[] { + " ", " M ", "BY ", 'M', ItemList.Casing_SolidSteel, 'Y', Dyes.dyeYellow, 'B', Dyes.dyeBlack + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Advanced_Iridium.get(1L), bits, new Object[] { + "PhP", + "PFP", + aTextPlateWrench, + 'P', + OrePrefixes.plate.get(Materials.Iridium), + 'F', + OrePrefixes.frameGt.get(Materials.Iridium) + }); + + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Casing_SolidSteel.get(1L), bits, new Object[] {ItemList.Casing_Stripes_A}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Casing_SolidSteel.get(1L), bits, new Object[] {ItemList.Casing_Stripes_B}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Casing_SolidSteel.get(1L), bits, new Object[] {ItemList.Casing_RadioactiveHazard}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Casing_SolidSteel.get(1L), bits, new Object[] {ItemList.Casing_BioHazard}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Casing_SolidSteel.get(1L), bits, new Object[] {ItemList.Casing_ExplosionHazard}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Casing_SolidSteel.get(1L), bits, new Object[] {ItemList.Casing_FireHazard}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Casing_SolidSteel.get(1L), bits, new Object[] {ItemList.Casing_AcidHazard}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Casing_SolidSteel.get(1L), bits, new Object[] {ItemList.Casing_MagicHazard}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Casing_SolidSteel.get(1L), bits, new Object[] {ItemList.Casing_FrostHazard}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Casing_SolidSteel.get(1L), bits, new Object[] {ItemList.Casing_NoiseHazard}); + + ItemList.Machine_Bricked_BlastFurnace.set(new GT_MetaTileEntity_BrickedBlastFurnace( + 140, "multimachine.brickedblastfurnace", "Bricked Blast Furnace") + .getStackForm(1L)); + GT_ModHandler.addCraftingRecipe( + ItemList.Machine_Bricked_BlastFurnace.get(1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "BFB", "FwF", "BFB", 'B', ItemList.Casing_Firebricks, 'F', OreDictNames.craftingIronFurnace + }); + + ItemList.Hull_Bronze.set(new GT_MetaTileEntity_BasicHull_Bronze( + 1, "hull.bronze", "Bronze Hull", 0, "For your first Steam Machines") + .getStackForm(1L)); + ItemList.Hull_Bronze_Bricks.set(new GT_MetaTileEntity_BasicHull_BronzeBricks( + 2, "hull.bronze_bricked", "Bricked Bronze Hull", 0, "For your first Steam Machines") + .getStackForm(1L)); + ItemList.Hull_HP.set( + new GT_MetaTileEntity_BasicHull_Steel(3, "hull.steel", "Steel Hull", 0, "For improved Steam Machines") + .getStackForm(1L)); + ItemList.Hull_HP_Bricks.set(new GT_MetaTileEntity_BasicHull_SteelBricks( + 4, "hull.steel_bricked", "Bricked Wrought Iron Hull", 0, "For improved Steam Machines") + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Hull_Bronze.get(1L), bits, new Object[] { + aTextPlate, "PhP", aTextPlate, 'P', OrePrefixes.plate.get(Materials.Bronze) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Hull_Bronze_Bricks.get(1L), bits, new Object[] { + aTextPlate, + "PhP", + "BBB", + 'P', + OrePrefixes.plate.get(Materials.Bronze), + 'B', + new ItemStack(Blocks.brick_block, 1) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Hull_HP.get(1L), bits, new Object[] { + aTextPlate, "PhP", aTextPlate, 'P', OrePrefixes.plate.get(Materials.Steel) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Hull_HP_Bricks.get(1L), bits, new Object[] { + aTextPlate, + "PhP", + "BBB", + 'P', + OrePrefixes.plate.get(Materials.WroughtIron), + 'B', + new ItemStack(Blocks.brick_block, 1) + }); + + ItemList.Hull_ULV.set(new GT_MetaTileEntity_BasicHull(10, "hull.tier.00", "ULV Machine Hull", 0, imagination) + .getStackForm(1L)); + ItemList.Hull_LV.set(new GT_MetaTileEntity_BasicHull(11, "hull.tier.01", "LV Machine Hull", 1, imagination) + .getStackForm(1L)); + ItemList.Hull_MV.set(new GT_MetaTileEntity_BasicHull(12, "hull.tier.02", "MV Machine Hull", 2, imagination) + .getStackForm(1L)); + ItemList.Hull_HV.set(new GT_MetaTileEntity_BasicHull(13, "hull.tier.03", "HV Machine Hull", 3, imagination) + .getStackForm(1L)); + ItemList.Hull_EV.set(new GT_MetaTileEntity_BasicHull(14, "hull.tier.04", "EV Machine Hull", 4, imagination) + .getStackForm(1L)); + ItemList.Hull_IV.set(new GT_MetaTileEntity_BasicHull(15, "hull.tier.05", "IV Machine Hull", 5, imagination) + .getStackForm(1L)); + ItemList.Hull_LuV.set(new GT_MetaTileEntity_BasicHull(16, "hull.tier.06", "LuV Machine Hull", 6, imagination) + .getStackForm(1L)); + ItemList.Hull_ZPM.set(new GT_MetaTileEntity_BasicHull(17, "hull.tier.07", "ZPM Machine Hull", 7, imagination) + .getStackForm(1L)); + ItemList.Hull_UV.set(new GT_MetaTileEntity_BasicHull(18, "hull.tier.08", "UV Machine Hull", 8, imagination) + .getStackForm(1L)); + ItemList.Hull_MAX.set(new GT_MetaTileEntity_BasicHull(19, "hull.tier.09", "UHV Machine Hull", 9, imagination) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Hull_ULV.get(1L), GT_ModHandler.RecipeBits.REVERSIBLE, new Object[] { + aTextCableHull, + 'M', + ItemList.Casing_ULV, + 'C', + OrePrefixes.cableGt01.get(Materials.Lead), + 'H', + OrePrefixes.plate.get(Materials.WroughtIron), + 'P', + OrePrefixes.plate.get(Materials.Wood) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Hull_LV.get(1L), GT_ModHandler.RecipeBits.REVERSIBLE, new Object[] { + aTextCableHull, + 'M', + ItemList.Casing_LV, + 'C', + OrePrefixes.cableGt01.get(Materials.Tin), + 'H', + OrePrefixes.plate.get(Materials.Steel), + 'P', + OrePrefixes.plate.get(Materials.WroughtIron) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Hull_MV.get(1L), GT_ModHandler.RecipeBits.REVERSIBLE, new Object[] { + aTextCableHull, + 'M', + ItemList.Casing_MV, + 'C', + OrePrefixes.cableGt01.get(Materials.AnyCopper), + 'H', + OrePrefixes.plate.get(Materials.Aluminium), + 'P', + OrePrefixes.plate.get(Materials.WroughtIron) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Hull_HV.get(1L), GT_ModHandler.RecipeBits.REVERSIBLE, new Object[] { + aTextCableHull, + 'M', + ItemList.Casing_HV, + 'C', + OrePrefixes.cableGt01.get(Materials.Gold), + 'H', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'P', + OrePrefixes.plate.get(Materials.Plastic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Hull_EV.get(1L), GT_ModHandler.RecipeBits.REVERSIBLE, new Object[] { + aTextCableHull, + 'M', + ItemList.Casing_EV, + 'C', + OrePrefixes.cableGt01.get(Materials.Aluminium), + 'H', + OrePrefixes.plate.get(Materials.Titanium), + 'P', + OrePrefixes.plate.get(Materials.Plastic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Hull_IV.get(1L), GT_ModHandler.RecipeBits.REVERSIBLE, new Object[] { + aTextCableHull, + 'M', + ItemList.Casing_IV, + 'C', + OrePrefixes.cableGt01.get(Materials.Tungsten), + 'H', + OrePrefixes.plate.get(Materials.TungstenSteel), + 'P', + OrePrefixes.plate.get(Materials.Polytetrafluoroethylene) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Hull_LuV.get(1L), GT_ModHandler.RecipeBits.REVERSIBLE, new Object[] { + aTextCableHull, + 'M', + ItemList.Casing_LuV, + 'C', + OrePrefixes.cableGt01.get(Materials.VanadiumGallium), + 'H', + OrePrefixes.plate.get(Materials.Chrome), + 'P', + OrePrefixes.plate.get(Materials.Polytetrafluoroethylene) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Hull_ZPM.get(1L), GT_ModHandler.RecipeBits.REVERSIBLE, new Object[] { + aTextCableHull, + 'M', + ItemList.Casing_ZPM, + 'C', + OrePrefixes.cableGt02.get(Materials.Naquadah), + 'H', + OrePrefixes.plate.get(Materials.Iridium), + 'P', + OrePrefixes.plate.get(Materials.Polybenzimidazole) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Hull_UV.get(1L), GT_ModHandler.RecipeBits.REVERSIBLE, new Object[] { + aTextCableHull, + 'M', + ItemList.Casing_UV, + 'C', + OrePrefixes.cableGt04.get(Materials.NaquadahAlloy), + 'H', + OrePrefixes.plate.get(Materials.Osmium), + 'P', + OrePrefixes.plate.get(Materials.Polybenzimidazole) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Hull_MAX.get(1L), GT_ModHandler.RecipeBits.REVERSIBLE, new Object[] { + aTextCableHull, + 'M', + ItemList.Casing_MAX, + 'C', + OrePrefixes.wireGt04.get(Materials.SuperconductorUV), + 'H', + OrePrefixes.plate.get(Materials.Neutronium), + 'P', + OrePrefixes.plate.get(Materials.Polybenzimidazole) + }); GT_ModHandler.removeRecipeByOutput(ItemList.Hull_ULV.get(1L)); GT_ModHandler.removeRecipeByOutput(ItemList.Hull_LV.get(1L)); @@ -326,1023 +807,11939 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI GT_ModHandler.removeRecipeByOutput(ItemList.Hull_MAX.get(1L)); if (GT_Mod.gregtechproxy.mHardMachineCasings) { - GT_ModHandler.addCraftingRecipe(ItemList.Hull_ULV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PHP", aTextCableHull, 'M', ItemList.Casing_ULV, 'C', OrePrefixes.cableGt01.get(Materials.Lead), 'H', OrePrefixes.plate.get(Materials.WroughtIron), 'P', OrePrefixes.plate.get(Materials.Wood)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_LV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PHP", aTextCableHull, 'M', ItemList.Casing_LV, 'C', OrePrefixes.cableGt01.get(Materials.Tin), 'H', OrePrefixes.plate.get(Materials.Steel), 'P', OrePrefixes.plate.get(Materials.WroughtIron)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_MV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PHP", aTextCableHull, 'M', ItemList.Casing_MV, 'C', OrePrefixes.cableGt01.get(Materials.Copper), 'H', OrePrefixes.plate.get(Materials.Aluminium), 'P', OrePrefixes.plate.get(Materials.WroughtIron)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_HV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PHP", aTextCableHull, 'M', ItemList.Casing_HV, 'C', OrePrefixes.cableGt01.get(Materials.Gold), 'H', OrePrefixes.plate.get(Materials.StainlessSteel), 'P', OrePrefixes.plate.get(Materials.Plastic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_EV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PHP", aTextCableHull, 'M', ItemList.Casing_EV, 'C', OrePrefixes.cableGt01.get(Materials.Aluminium), 'H', OrePrefixes.plate.get(Materials.Titanium), 'P', OrePrefixes.plate.get(Materials.Plastic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_IV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PHP", aTextCableHull, 'M', ItemList.Casing_IV, 'C', OrePrefixes.cableGt01.get(Materials.Tungsten), 'H', OrePrefixes.plate.get(Materials.TungstenSteel), 'P', OrePrefixes.plate.get(Materials.Polytetrafluoroethylene)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_LuV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PHP", aTextCableHull, 'M', ItemList.Casing_LuV, 'C', OrePrefixes.cableGt01.get(Materials.VanadiumGallium), 'H', OrePrefixes.plate.get(Materials.Chrome), 'P', OrePrefixes.plate.get(Materials.Polytetrafluoroethylene)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_ZPM.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PHP", aTextCableHull, 'M', ItemList.Casing_ZPM, 'C', OrePrefixes.cableGt01.get(Materials.Naquadah), 'H', OrePrefixes.plate.get(Materials.Iridium), 'P', OrePrefixes.plate.get(Materials.Polybenzimidazole)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_UV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PHP", aTextCableHull, 'M', ItemList.Casing_UV, 'C', OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), 'H', OrePrefixes.plate.get(Materials.Osmium), 'P', OrePrefixes.plate.get(Materials.Polybenzimidazole)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_MAX.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PHP", aTextCableHull, 'M', ItemList.Casing_MAX, 'C', OrePrefixes.wireGt04.get(Materials.SuperconductorUV), 'H', OrePrefixes.plate.get(Materials.Neutronium), 'P', OrePrefixes.plate.get(Materials.Polybenzimidazole)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Hull_ULV.get(1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PHP", + aTextCableHull, + 'M', + ItemList.Casing_ULV, + 'C', + OrePrefixes.cableGt01.get(Materials.Lead), + 'H', + OrePrefixes.plate.get(Materials.WroughtIron), + 'P', + OrePrefixes.plate.get(Materials.Wood) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Hull_LV.get(1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PHP", + aTextCableHull, + 'M', + ItemList.Casing_LV, + 'C', + OrePrefixes.cableGt01.get(Materials.Tin), + 'H', + OrePrefixes.plate.get(Materials.Steel), + 'P', + OrePrefixes.plate.get(Materials.WroughtIron) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Hull_MV.get(1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PHP", + aTextCableHull, + 'M', + ItemList.Casing_MV, + 'C', + OrePrefixes.cableGt01.get(Materials.Copper), + 'H', + OrePrefixes.plate.get(Materials.Aluminium), + 'P', + OrePrefixes.plate.get(Materials.WroughtIron) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Hull_HV.get(1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PHP", + aTextCableHull, + 'M', + ItemList.Casing_HV, + 'C', + OrePrefixes.cableGt01.get(Materials.Gold), + 'H', + OrePrefixes.plate.get(Materials.StainlessSteel), + 'P', + OrePrefixes.plate.get(Materials.Plastic) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Hull_EV.get(1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PHP", + aTextCableHull, + 'M', + ItemList.Casing_EV, + 'C', + OrePrefixes.cableGt01.get(Materials.Aluminium), + 'H', + OrePrefixes.plate.get(Materials.Titanium), + 'P', + OrePrefixes.plate.get(Materials.Plastic) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Hull_IV.get(1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PHP", + aTextCableHull, + 'M', + ItemList.Casing_IV, + 'C', + OrePrefixes.cableGt01.get(Materials.Tungsten), + 'H', + OrePrefixes.plate.get(Materials.TungstenSteel), + 'P', + OrePrefixes.plate.get(Materials.Polytetrafluoroethylene) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Hull_LuV.get(1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PHP", + aTextCableHull, + 'M', + ItemList.Casing_LuV, + 'C', + OrePrefixes.cableGt01.get(Materials.VanadiumGallium), + 'H', + OrePrefixes.plate.get(Materials.Chrome), + 'P', + OrePrefixes.plate.get(Materials.Polytetrafluoroethylene) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Hull_ZPM.get(1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PHP", + aTextCableHull, + 'M', + ItemList.Casing_ZPM, + 'C', + OrePrefixes.cableGt01.get(Materials.Naquadah), + 'H', + OrePrefixes.plate.get(Materials.Iridium), + 'P', + OrePrefixes.plate.get(Materials.Polybenzimidazole) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Hull_UV.get(1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PHP", + aTextCableHull, + 'M', + ItemList.Casing_UV, + 'C', + OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), + 'H', + OrePrefixes.plate.get(Materials.Osmium), + 'P', + OrePrefixes.plate.get(Materials.Polybenzimidazole) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Hull_MAX.get(1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + "PHP", + aTextCableHull, + 'M', + ItemList.Casing_MAX, + 'C', + OrePrefixes.wireGt04.get(Materials.SuperconductorUV), + 'H', + OrePrefixes.plate.get(Materials.Neutronium), + 'P', + OrePrefixes.plate.get(Materials.Polybenzimidazole) + }); } else { - GT_ModHandler.addCraftingRecipe(ItemList.Hull_ULV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{aTextCableHull, 'M', ItemList.Casing_ULV, 'C', OrePrefixes.cableGt01.get(Materials.Lead)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_LV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{aTextCableHull, 'M', ItemList.Casing_LV, 'C', OrePrefixes.cableGt01.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_MV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{aTextCableHull, 'M', ItemList.Casing_MV, 'C', OrePrefixes.cableGt01.get(Materials.Copper)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_HV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{aTextCableHull, 'M', ItemList.Casing_HV, 'C', OrePrefixes.cableGt01.get(Materials.Gold)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_EV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{aTextCableHull, 'M', ItemList.Casing_EV, 'C', OrePrefixes.cableGt01.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_IV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{aTextCableHull, 'M', ItemList.Casing_IV, 'C', OrePrefixes.cableGt01.get(Materials.Tungsten)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_LuV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{aTextCableHull, 'M', ItemList.Casing_LuV, 'C', OrePrefixes.cableGt01.get(Materials.VanadiumGallium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_ZPM.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{aTextCableHull, 'M', ItemList.Casing_ZPM, 'C', OrePrefixes.cableGt01.get(Materials.Naquadah)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_UV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{aTextCableHull, 'M', ItemList.Casing_UV, 'C', OrePrefixes.wireGt04.get(Materials.NaquadahAlloy)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_MAX.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{aTextCableHull, 'M', ItemList.Casing_MAX, 'C', OrePrefixes.wireGt04.get(Materials.SuperconductorUV)}); + GT_ModHandler.addCraftingRecipe( + ItemList.Hull_ULV.get(1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + aTextCableHull, 'M', ItemList.Casing_ULV, 'C', OrePrefixes.cableGt01.get(Materials.Lead) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Hull_LV.get(1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] {aTextCableHull, 'M', ItemList.Casing_LV, 'C', OrePrefixes.cableGt01.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Hull_MV.get(1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + aTextCableHull, 'M', ItemList.Casing_MV, 'C', OrePrefixes.cableGt01.get(Materials.Copper) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Hull_HV.get(1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + aTextCableHull, 'M', ItemList.Casing_HV, 'C', OrePrefixes.cableGt01.get(Materials.Gold) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Hull_EV.get(1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + aTextCableHull, 'M', ItemList.Casing_EV, 'C', OrePrefixes.cableGt01.get(Materials.Aluminium) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Hull_IV.get(1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + aTextCableHull, 'M', ItemList.Casing_IV, 'C', OrePrefixes.cableGt01.get(Materials.Tungsten) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Hull_LuV.get(1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + aTextCableHull, + 'M', + ItemList.Casing_LuV, + 'C', + OrePrefixes.cableGt01.get(Materials.VanadiumGallium) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Hull_ZPM.get(1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + aTextCableHull, 'M', ItemList.Casing_ZPM, 'C', OrePrefixes.cableGt01.get(Materials.Naquadah) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Hull_UV.get(1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + aTextCableHull, 'M', ItemList.Casing_UV, 'C', OrePrefixes.wireGt04.get(Materials.NaquadahAlloy) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.Hull_MAX.get(1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { + aTextCableHull, + 'M', + ItemList.Casing_MAX, + 'C', + OrePrefixes.wireGt04.get(Materials.SuperconductorUV) + }); } - ItemList.Transformer_LV_ULV.set(new GT_MetaTileEntity_Transformer(20, "transformer.tier.00", "Ultra Low Voltage Transformer", 0, "LV -> ULV (Use Soft Mallet to invert)").getStackForm(1L)); - ItemList.Transformer_MV_LV.set(new GT_MetaTileEntity_Transformer(21, "transformer.tier.01", "Low Voltage Transformer", 1, "MV -> LV (Use Soft Mallet to invert)").getStackForm(1L)); - ItemList.Transformer_HV_MV.set(new GT_MetaTileEntity_Transformer(22, "transformer.tier.02", "Medium Voltage Transformer", 2, "HV -> MV (Use Soft Mallet to invert)").getStackForm(1L)); - ItemList.Transformer_EV_HV.set(new GT_MetaTileEntity_Transformer(23, "transformer.tier.03", "High Voltage Transformer", 3, "EV -> HV (Use Soft Mallet to invert)").getStackForm(1L)); - ItemList.Transformer_IV_EV.set(new GT_MetaTileEntity_Transformer(24, "transformer.tier.04", "Extreme Transformer", 4, "IV -> EV (Use Soft Mallet to invert)").getStackForm(1L)); - ItemList.Transformer_LuV_IV.set(new GT_MetaTileEntity_Transformer(25, "transformer.tier.05", "Insane Transformer", 5, "LuV -> IV (Use Soft Mallet to invert)").getStackForm(1L)); - ItemList.Transformer_ZPM_LuV.set(new GT_MetaTileEntity_Transformer(26, "transformer.tier.06", "Ludicrous Transformer", 6, "ZPM -> LuV (Use Soft Mallet to invert)").getStackForm(1L)); - ItemList.Transformer_UV_ZPM.set(new GT_MetaTileEntity_Transformer(27, "transformer.tier.07", "ZPM Voltage Transformer", 7, "UV -> ZPM (Use Soft Mallet to invert)").getStackForm(1L)); - ItemList.Transformer_MAX_UV.set(new GT_MetaTileEntity_Transformer(28, "transformer.tier.08", "Ultimate Transformer", 8, "UHV -> UV (Use Soft Mallet to invert)").getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Transformer_LV_ULV.get(1L), bitsd, new Object[]{" BB", "CM ", " BB", 'M', ItemList.Hull_ULV, 'C', OrePrefixes.cableGt01.get(Materials.Tin), 'B', OrePrefixes.cableGt01.get(Materials.Lead)}); - GT_ModHandler.addCraftingRecipe(ItemList.Transformer_MV_LV.get(1L), bitsd, new Object[]{" BB", "CM ", " BB", 'M', ItemList.Hull_LV, 'C', OrePrefixes.cableGt01.get(Materials.AnyCopper), 'B', OrePrefixes.cableGt01.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.Transformer_HV_MV.get(1L), bitsd, new Object[]{"KBB", "CM ", "KBB", 'M', ItemList.Hull_MV, 'C', OrePrefixes.cableGt01.get(Materials.Gold), 'B', OrePrefixes.cableGt01.get(Materials.AnyCopper), 'K', ItemList.Circuit_Parts_Coil}); - GT_ModHandler.addCraftingRecipe(ItemList.Transformer_EV_HV.get(1L), bitsd, new Object[]{"KBB", "CM ", "KBB", 'M', ItemList.Hull_HV, 'C', OrePrefixes.cableGt01.get(Materials.Aluminium), 'B', OrePrefixes.cableGt01.get(Materials.Gold), 'K', ItemList.Circuit_Chip_ULPIC}); - GT_ModHandler.addCraftingRecipe(ItemList.Transformer_IV_EV.get(1L), bitsd, new Object[]{"KBB", "CM ", "KBB", 'M', ItemList.Hull_EV, 'C', OrePrefixes.cableGt01.get(Materials.Tungsten), 'B', OrePrefixes.cableGt01.get(Materials.Aluminium), 'K', ItemList.Circuit_Chip_LPIC}); - GT_ModHandler.addCraftingRecipe(ItemList.Transformer_LuV_IV.get(1L), bitsd, new Object[]{"KBB", "CM ", "KBB", 'M', ItemList.Hull_IV, 'C', OrePrefixes.cableGt01.get(Materials.VanadiumGallium), 'B', OrePrefixes.cableGt01.get(Materials.Tungsten), 'K', ItemList.Circuit_Chip_PIC}); - GT_ModHandler.addCraftingRecipe(ItemList.Transformer_ZPM_LuV.get(1L), bitsd, new Object[]{"KBB", "CM ", "KBB", 'M', ItemList.Hull_LuV, 'C', OrePrefixes.cableGt01.get(Materials.Naquadah), 'B', OrePrefixes.cableGt01.get(Materials.VanadiumGallium), 'K', ItemList.Circuit_Chip_HPIC}); - GT_ModHandler.addCraftingRecipe(ItemList.Transformer_UV_ZPM.get(1L), bitsd, new Object[]{"KBB", "CM ", "KBB", 'M', ItemList.Hull_ZPM, 'C', OrePrefixes.cableGt01.get(Materials.NaquadahAlloy), 'B', OrePrefixes.cableGt01.get(Materials.Naquadah), 'K', ItemList.Circuit_Chip_UHPIC}); - GT_ModHandler.addCraftingRecipe(ItemList.Transformer_MAX_UV.get(1L), bitsd, new Object[]{"KBB", "CM ", "KBB", 'M', ItemList.Hull_UV, 'C', OrePrefixes.wireGt01.get(Materials.Bedrockium), 'B', OrePrefixes.cableGt01.get(Materials.NaquadahAlloy), 'K', ItemList.Circuit_Chip_NPIC}); - - ItemList.Hatch_Dynamo_ULV.set(new GT_MetaTileEntity_Hatch_Dynamo(30, "hatch.dynamo.tier.00", "ULV Dynamo Hatch", 0).getStackForm(1L)); - ItemList.Hatch_Dynamo_LV.set(new GT_MetaTileEntity_Hatch_Dynamo(31, "hatch.dynamo.tier.01", "LV Dynamo Hatch", 1).getStackForm(1L)); - ItemList.Hatch_Dynamo_MV.set(new GT_MetaTileEntity_Hatch_Dynamo(32, "hatch.dynamo.tier.02", "MV Dynamo Hatch", 2).getStackForm(1L)); - ItemList.Hatch_Dynamo_HV.set(new GT_MetaTileEntity_Hatch_Dynamo(33, "hatch.dynamo.tier.03", "HV Dynamo Hatch", 3).getStackForm(1L)); - ItemList.Hatch_Dynamo_EV.set(new GT_MetaTileEntity_Hatch_Dynamo(34, "hatch.dynamo.tier.04", "EV Dynamo Hatch", 4).getStackForm(1L)); - ItemList.Hatch_Dynamo_IV.set(new GT_MetaTileEntity_Hatch_Dynamo(35, "hatch.dynamo.tier.05", "IV Dynamo Hatch", 5).getStackForm(1L)); - ItemList.Hatch_Dynamo_LuV.set(new GT_MetaTileEntity_Hatch_Dynamo(36, "hatch.dynamo.tier.06", "LuV Dynamo Hatch", 6).getStackForm(1L)); - ItemList.Hatch_Dynamo_ZPM.set(new GT_MetaTileEntity_Hatch_Dynamo(37, "hatch.dynamo.tier.07", "ZPM Dynamo Hatch", 7).getStackForm(1L)); - ItemList.Hatch_Dynamo_UV.set(new GT_MetaTileEntity_Hatch_Dynamo(38, "hatch.dynamo.tier.08", "UV Dynamo Hatch", 8).getStackForm(1L)); - ItemList.Hatch_Dynamo_MAX.set(new GT_MetaTileEntity_Hatch_Dynamo(39, "hatch.dynamo.tier.09", "UHV Dynamo Hatch", 9).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Dynamo_ULV.get(1L), bitsd, new Object[]{"XOL", "SMP", "XOL", 'M', ItemList.Hull_ULV, 'S', OrePrefixes.spring.get(Materials.Lead), 'X', OrePrefixes.circuit.get(Materials.Primitive), 'O', ItemList.ULV_Coil, 'L', OrePrefixes.cell.get(Materials.Lubricant), 'P', OrePrefixes.rotor.get(Materials.Lead)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Dynamo_LV.get(1L), bitsd, new Object[]{"XOL", "SMP", "XOL", 'M', ItemList.Hull_LV, 'S', OrePrefixes.spring.get(Materials.Tin), 'X', OrePrefixes.circuit.get(Materials.Basic), 'O', ItemList.LV_Coil, 'L', OrePrefixes.cell.get(Materials.Lubricant), 'P', ItemList.Electric_Pump_LV}); - GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Dynamo_MV.get(1L), bitsd, new Object[]{"XOL", "SMP", "XOL", 'M', ItemList.Hull_MV, 'S', OrePrefixes.spring.get(Materials.Copper), 'X', ItemList.Circuit_Chip_ULPIC, 'O', ItemList.MV_Coil, 'L', OrePrefixes.cell.get(Materials.Lubricant), 'P', ItemList.Electric_Pump_MV}); + ItemList.Transformer_LV_ULV.set(new GT_MetaTileEntity_Transformer( + 20, + "transformer.tier.00", + "Ultra Low Voltage Transformer", + 0, + "LV -> ULV (Use Soft Mallet to invert)") + .getStackForm(1L)); + ItemList.Transformer_MV_LV.set(new GT_MetaTileEntity_Transformer( + 21, "transformer.tier.01", "Low Voltage Transformer", 1, "MV -> LV (Use Soft Mallet to invert)") + .getStackForm(1L)); + ItemList.Transformer_HV_MV.set(new GT_MetaTileEntity_Transformer( + 22, + "transformer.tier.02", + "Medium Voltage Transformer", + 2, + "HV -> MV (Use Soft Mallet to invert)") + .getStackForm(1L)); + ItemList.Transformer_EV_HV.set(new GT_MetaTileEntity_Transformer( + 23, + "transformer.tier.03", + "High Voltage Transformer", + 3, + "EV -> HV (Use Soft Mallet to invert)") + .getStackForm(1L)); + ItemList.Transformer_IV_EV.set(new GT_MetaTileEntity_Transformer( + 24, "transformer.tier.04", "Extreme Transformer", 4, "IV -> EV (Use Soft Mallet to invert)") + .getStackForm(1L)); + ItemList.Transformer_LuV_IV.set(new GT_MetaTileEntity_Transformer( + 25, "transformer.tier.05", "Insane Transformer", 5, "LuV -> IV (Use Soft Mallet to invert)") + .getStackForm(1L)); + ItemList.Transformer_ZPM_LuV.set(new GT_MetaTileEntity_Transformer( + 26, "transformer.tier.06", "Ludicrous Transformer", 6, "ZPM -> LuV (Use Soft Mallet to invert)") + .getStackForm(1L)); + ItemList.Transformer_UV_ZPM.set(new GT_MetaTileEntity_Transformer( + 27, + "transformer.tier.07", + "ZPM Voltage Transformer", + 7, + "UV -> ZPM (Use Soft Mallet to invert)") + .getStackForm(1L)); + ItemList.Transformer_MAX_UV.set(new GT_MetaTileEntity_Transformer( + 28, "transformer.tier.08", "Ultimate Transformer", 8, "UHV -> UV (Use Soft Mallet to invert)") + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Transformer_LV_ULV.get(1L), bitsd, new Object[] { + " BB", + "CM ", + " BB", + 'M', + ItemList.Hull_ULV, + 'C', + OrePrefixes.cableGt01.get(Materials.Tin), + 'B', + OrePrefixes.cableGt01.get(Materials.Lead) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Transformer_MV_LV.get(1L), bitsd, new Object[] { + " BB", + "CM ", + " BB", + 'M', + ItemList.Hull_LV, + 'C', + OrePrefixes.cableGt01.get(Materials.AnyCopper), + 'B', + OrePrefixes.cableGt01.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Transformer_HV_MV.get(1L), bitsd, new Object[] { + "KBB", + "CM ", + "KBB", + 'M', + ItemList.Hull_MV, + 'C', + OrePrefixes.cableGt01.get(Materials.Gold), + 'B', + OrePrefixes.cableGt01.get(Materials.AnyCopper), + 'K', + ItemList.Circuit_Parts_Coil + }); + GT_ModHandler.addCraftingRecipe(ItemList.Transformer_EV_HV.get(1L), bitsd, new Object[] { + "KBB", + "CM ", + "KBB", + 'M', + ItemList.Hull_HV, + 'C', + OrePrefixes.cableGt01.get(Materials.Aluminium), + 'B', + OrePrefixes.cableGt01.get(Materials.Gold), + 'K', + ItemList.Circuit_Chip_ULPIC + }); + GT_ModHandler.addCraftingRecipe(ItemList.Transformer_IV_EV.get(1L), bitsd, new Object[] { + "KBB", + "CM ", + "KBB", + 'M', + ItemList.Hull_EV, + 'C', + OrePrefixes.cableGt01.get(Materials.Tungsten), + 'B', + OrePrefixes.cableGt01.get(Materials.Aluminium), + 'K', + ItemList.Circuit_Chip_LPIC + }); + GT_ModHandler.addCraftingRecipe(ItemList.Transformer_LuV_IV.get(1L), bitsd, new Object[] { + "KBB", + "CM ", + "KBB", + 'M', + ItemList.Hull_IV, + 'C', + OrePrefixes.cableGt01.get(Materials.VanadiumGallium), + 'B', + OrePrefixes.cableGt01.get(Materials.Tungsten), + 'K', + ItemList.Circuit_Chip_PIC + }); + GT_ModHandler.addCraftingRecipe(ItemList.Transformer_ZPM_LuV.get(1L), bitsd, new Object[] { + "KBB", + "CM ", + "KBB", + 'M', + ItemList.Hull_LuV, + 'C', + OrePrefixes.cableGt01.get(Materials.Naquadah), + 'B', + OrePrefixes.cableGt01.get(Materials.VanadiumGallium), + 'K', + ItemList.Circuit_Chip_HPIC + }); + GT_ModHandler.addCraftingRecipe(ItemList.Transformer_UV_ZPM.get(1L), bitsd, new Object[] { + "KBB", + "CM ", + "KBB", + 'M', + ItemList.Hull_ZPM, + 'C', + OrePrefixes.cableGt01.get(Materials.NaquadahAlloy), + 'B', + OrePrefixes.cableGt01.get(Materials.Naquadah), + 'K', + ItemList.Circuit_Chip_UHPIC + }); + GT_ModHandler.addCraftingRecipe(ItemList.Transformer_MAX_UV.get(1L), bitsd, new Object[] { + "KBB", + "CM ", + "KBB", + 'M', + ItemList.Hull_UV, + 'C', + OrePrefixes.wireGt01.get(Materials.Bedrockium), + 'B', + OrePrefixes.cableGt01.get(Materials.NaquadahAlloy), + 'K', + ItemList.Circuit_Chip_NPIC + }); + + ItemList.Hatch_Dynamo_ULV.set( + new GT_MetaTileEntity_Hatch_Dynamo(30, "hatch.dynamo.tier.00", "ULV Dynamo Hatch", 0).getStackForm(1L)); + ItemList.Hatch_Dynamo_LV.set( + new GT_MetaTileEntity_Hatch_Dynamo(31, "hatch.dynamo.tier.01", "LV Dynamo Hatch", 1).getStackForm(1L)); + ItemList.Hatch_Dynamo_MV.set( + new GT_MetaTileEntity_Hatch_Dynamo(32, "hatch.dynamo.tier.02", "MV Dynamo Hatch", 2).getStackForm(1L)); + ItemList.Hatch_Dynamo_HV.set( + new GT_MetaTileEntity_Hatch_Dynamo(33, "hatch.dynamo.tier.03", "HV Dynamo Hatch", 3).getStackForm(1L)); + ItemList.Hatch_Dynamo_EV.set( + new GT_MetaTileEntity_Hatch_Dynamo(34, "hatch.dynamo.tier.04", "EV Dynamo Hatch", 4).getStackForm(1L)); + ItemList.Hatch_Dynamo_IV.set( + new GT_MetaTileEntity_Hatch_Dynamo(35, "hatch.dynamo.tier.05", "IV Dynamo Hatch", 5).getStackForm(1L)); + ItemList.Hatch_Dynamo_LuV.set( + new GT_MetaTileEntity_Hatch_Dynamo(36, "hatch.dynamo.tier.06", "LuV Dynamo Hatch", 6).getStackForm(1L)); + ItemList.Hatch_Dynamo_ZPM.set( + new GT_MetaTileEntity_Hatch_Dynamo(37, "hatch.dynamo.tier.07", "ZPM Dynamo Hatch", 7).getStackForm(1L)); + ItemList.Hatch_Dynamo_UV.set( + new GT_MetaTileEntity_Hatch_Dynamo(38, "hatch.dynamo.tier.08", "UV Dynamo Hatch", 8).getStackForm(1L)); + ItemList.Hatch_Dynamo_MAX.set( + new GT_MetaTileEntity_Hatch_Dynamo(39, "hatch.dynamo.tier.09", "UHV Dynamo Hatch", 9).getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Dynamo_ULV.get(1L), bitsd, new Object[] { + "XOL", + "SMP", + "XOL", + 'M', + ItemList.Hull_ULV, + 'S', + OrePrefixes.spring.get(Materials.Lead), + 'X', + OrePrefixes.circuit.get(Materials.Primitive), + 'O', + ItemList.ULV_Coil, + 'L', + OrePrefixes.cell.get(Materials.Lubricant), + 'P', + OrePrefixes.rotor.get(Materials.Lead) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Dynamo_LV.get(1L), bitsd, new Object[] { + "XOL", + "SMP", + "XOL", + 'M', + ItemList.Hull_LV, + 'S', + OrePrefixes.spring.get(Materials.Tin), + 'X', + OrePrefixes.circuit.get(Materials.Basic), + 'O', + ItemList.LV_Coil, + 'L', + OrePrefixes.cell.get(Materials.Lubricant), + 'P', + ItemList.Electric_Pump_LV + }); + GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Dynamo_MV.get(1L), bitsd, new Object[] { + "XOL", + "SMP", + "XOL", + 'M', + ItemList.Hull_MV, + 'S', + OrePrefixes.spring.get(Materials.Copper), + 'X', + ItemList.Circuit_Chip_ULPIC, + 'O', + ItemList.MV_Coil, + 'L', + OrePrefixes.cell.get(Materials.Lubricant), + 'P', + ItemList.Electric_Pump_MV + }); // 1234 - ItemList.Hatch_Energy_ULV.set(new GT_MetaTileEntity_Hatch_Energy(40, "hatch.energy.tier.00", "ULV Energy Hatch", 0).getStackForm(1L)); - ItemList.Hatch_Energy_LV.set(new GT_MetaTileEntity_Hatch_Energy(41, "hatch.energy.tier.01", "LV Energy Hatch", 1).getStackForm(1L)); - ItemList.Hatch_Energy_MV.set(new GT_MetaTileEntity_Hatch_Energy(42, "hatch.energy.tier.02", "MV Energy Hatch", 2).getStackForm(1L)); - ItemList.Hatch_Energy_HV.set(new GT_MetaTileEntity_Hatch_Energy(43, "hatch.energy.tier.03", "HV Energy Hatch", 3).getStackForm(1L)); - ItemList.Hatch_Energy_EV.set(new GT_MetaTileEntity_Hatch_Energy(44, "hatch.energy.tier.04", "EV Energy Hatch", 4).getStackForm(1L)); - ItemList.Hatch_Energy_IV.set(new GT_MetaTileEntity_Hatch_Energy(45, "hatch.energy.tier.05", "IV Energy Hatch", 5).getStackForm(1L)); - ItemList.Hatch_Energy_LuV.set(new GT_MetaTileEntity_Hatch_Energy(46, "hatch.energy.tier.06", "LuV Energy Hatch", 6).getStackForm(1L)); - ItemList.Hatch_Energy_ZPM.set(new GT_MetaTileEntity_Hatch_Energy(47, "hatch.energy.tier.07", "ZPM Energy Hatch", 7).getStackForm(1L)); - ItemList.Hatch_Energy_UV.set(new GT_MetaTileEntity_Hatch_Energy(48, "hatch.energy.tier.08", "UV Energy Hatch", 8).getStackForm(1L)); - ItemList.Hatch_Energy_MAX.set(new GT_MetaTileEntity_Hatch_Energy(49, "hatch.energy.tier.09", "UHV Energy Hatch", 9).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Energy_ULV.get(1L), bitsd, new Object[]{"COL", "XMP", "COL", 'M', ItemList.Hull_ULV, 'C', OrePrefixes.cableGt01.get(Materials.Lead), 'X', OrePrefixes.circuit.get(Materials.Primitive), 'O', ItemList.ULV_Coil, 'L', OrePrefixes.cell.get(Materials.Lubricant), 'P', OrePrefixes.rotor.get(Materials.Lead)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Energy_LV.get(1L), bitsd, new Object[]{"COL", "XMP", "COL", 'M', ItemList.Hull_LV, 'C', OrePrefixes.cableGt01.get(Materials.Tin), 'X', OrePrefixes.circuit.get(Materials.Basic), 'O', ItemList.LV_Coil, 'L', OrePrefixes.cell.get(Materials.Lubricant), 'P', ItemList.Electric_Pump_LV}); - GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Energy_MV.get(1L), bitsd, new Object[]{"XOL", "CMP", "XOL", 'M', ItemList.Hull_MV, 'C', OrePrefixes.cableGt01.get(Materials.Copper), 'X', ItemList.Circuit_Chip_ULPIC, 'O', ItemList.MV_Coil, 'L', OrePrefixes.cell.get(Materials.Lubricant), 'P', ItemList.Electric_Pump_MV}); - - ItemList.Hatch_Input_ULV.set(new GT_MetaTileEntity_Hatch_Input(50, "hatch.input.tier.00", "Input Hatch (ULV)", 0).getStackForm(1L)); - ItemList.Hatch_Input_LV.set(new GT_MetaTileEntity_Hatch_Input(51, "hatch.input.tier.01", "Input Hatch (LV)", 1).getStackForm(1L)); - ItemList.Hatch_Input_MV.set(new GT_MetaTileEntity_Hatch_Input(52, "hatch.input.tier.02", "Input Hatch (MV)", 2).getStackForm(1L)); - ItemList.Hatch_Input_HV.set(new GT_MetaTileEntity_Hatch_Input(53, "hatch.input.tier.03", "Input Hatch (HV)", 3).getStackForm(1L)); - ItemList.Hatch_Input_EV.set(new GT_MetaTileEntity_Hatch_Input(54, "hatch.input.tier.04", "Input Hatch (EV)", 4).getStackForm(1L)); - ItemList.Hatch_Input_IV.set(new GT_MetaTileEntity_Hatch_Input(55, "hatch.input.tier.05", "Input Hatch (IV)", 5).getStackForm(1L)); - ItemList.Hatch_Input_LuV.set(new GT_MetaTileEntity_Hatch_Input(56, "hatch.input.tier.06", "Input Hatch (LuV)", 6).getStackForm(1L)); - ItemList.Hatch_Input_ZPM.set(new GT_MetaTileEntity_Hatch_Input(57, "hatch.input.tier.07", "Input Hatch (ZPM)", 7).getStackForm(1L)); - ItemList.Hatch_Input_UV.set(new GT_MetaTileEntity_Hatch_Input(58, "hatch.input.tier.08", "Input Hatch (UV)", 8).getStackForm(1L)); - ItemList.Hatch_Input_MAX.set(new GT_MetaTileEntity_Hatch_Input(59, "hatch.input.tier.09", "Input Hatch (UHV)", 9).getStackForm(1L)); - ItemList.Hatch_Input_Multi_2x2_EV.set(new GT_MetaTileEntity_Hatch_MultiInput(200, 4, "hatch.multi.input.tier.01", "Quadruple Input Hatch (EV)", 4).getStackForm(1L)); - ItemList.Hatch_Input_Multi_2x2_IV.set(new GT_MetaTileEntity_Hatch_MultiInput(710, 4, "hatch.multi.input.tier.02", "Quadruple Input Hatch (IV)", 5).getStackForm(1L)); - ItemList.Hatch_Input_Multi_2x2_LuV.set(new GT_MetaTileEntity_Hatch_MultiInput(711, 4, "hatch.multi.input.tier.03", "Quadruple Input Hatch (LuV)", 6).getStackForm(1L)); - ItemList.Hatch_Input_Multi_2x2_ZPM.set(new GT_MetaTileEntity_Hatch_MultiInput(712, 4, "hatch.multi.input.tier.04", "Quadruple Input Hatch (ZPM)", 7).getStackForm(1L)); - ItemList.Hatch_Input_Multi_2x2_UV.set(new GT_MetaTileEntity_Hatch_MultiInput(713, 4, "hatch.multi.input.tier.05", "Quadruple Input Hatch (UV)", 8).getStackForm(1L)); - - ItemList.Hatch_Output_ULV.set(new GT_MetaTileEntity_Hatch_Output(60, "hatch.output.tier.00", "Output Hatch (ULV)", 0).getStackForm(1L)); - ItemList.Hatch_Output_LV.set(new GT_MetaTileEntity_Hatch_Output(61, "hatch.output.tier.01", "Output Hatch (LV)", 1).getStackForm(1L)); - ItemList.Hatch_Output_MV.set(new GT_MetaTileEntity_Hatch_Output(62, "hatch.output.tier.02", "Output Hatch (MV)", 2).getStackForm(1L)); - ItemList.Hatch_Output_HV.set(new GT_MetaTileEntity_Hatch_Output(63, "hatch.output.tier.03", "Output Hatch (HV)", 3).getStackForm(1L)); - ItemList.Hatch_Output_EV.set(new GT_MetaTileEntity_Hatch_Output(64, "hatch.output.tier.04", "Output Hatch (EV)", 4).getStackForm(1L)); - ItemList.Hatch_Output_IV.set(new GT_MetaTileEntity_Hatch_Output(65, "hatch.output.tier.05", "Output Hatch (IV)", 5).getStackForm(1L)); - ItemList.Hatch_Output_LuV.set(new GT_MetaTileEntity_Hatch_Output(66, "hatch.output.tier.06", "Output Hatch (LuV)", 6).getStackForm(1L)); - ItemList.Hatch_Output_ZPM.set(new GT_MetaTileEntity_Hatch_Output(67, "hatch.output.tier.07", "Output Hatch (ZPM)", 7).getStackForm(1L)); - ItemList.Hatch_Output_UV.set(new GT_MetaTileEntity_Hatch_Output(68, "hatch.output.tier.08", "Output Hatch (UV)", 8).getStackForm(1L)); - ItemList.Hatch_Output_MAX.set(new GT_MetaTileEntity_Hatch_Output(69, "hatch.output.tier.09", "Output Hatch (UHV)", 9).getStackForm(1L)); - - ItemList.Quantum_Tank_LV.set(new GT_MetaTileEntity_QuantumTank(120, "quantum.tank.tier.06", "Quantum Tank I", 6).getStackForm(1L)); - ItemList.Quantum_Tank_MV.set(new GT_MetaTileEntity_QuantumTank(121, "quantum.tank.tier.07", "Quantum Tank II", 7).getStackForm(1L)); - ItemList.Quantum_Tank_HV.set(new GT_MetaTileEntity_QuantumTank(122, "quantum.tank.tier.08", "Quantum Tank III", 8).getStackForm(1L)); - ItemList.Quantum_Tank_EV.set(new GT_MetaTileEntity_QuantumTank(123, "quantum.tank.tier.09", "Quantum Tank IV", 9).getStackForm(1L)); - ItemList.Quantum_Tank_IV.set(new GT_MetaTileEntity_QuantumTank(124, "quantum.tank.tier.10", "Quantum Tank V", 10).getStackForm(1L)); - - ItemList.Quantum_Chest_LV.set(new GT_MetaTileEntity_QuantumChest(125, "quantum.chest.tier.06", "Quantum Chest I", 6).getStackForm(1L)); - ItemList.Quantum_Chest_MV.set(new GT_MetaTileEntity_QuantumChest(126, "quantum.chest.tier.07", "Quantum Chest II", 7).getStackForm(1L)); - ItemList.Quantum_Chest_HV.set(new GT_MetaTileEntity_QuantumChest(127, "quantum.chest.tier.08", "Quantum Chest III", 8).getStackForm(1L)); - ItemList.Quantum_Chest_EV.set(new GT_MetaTileEntity_QuantumChest(128, "quantum.chest.tier.09", "Quantum Chest IV", 9).getStackForm(1L)); - ItemList.Quantum_Chest_IV.set(new GT_MetaTileEntity_QuantumChest(129, "quantum.chest.tier.10", "Quantum Chest V", 10).getStackForm(1L)); - - ItemList.Super_Tank_LV.set(new GT_MetaTileEntity_SuperTank(130, "super.tank.tier.01", "Super Tank I", 1).getStackForm(1L)); - ItemList.Super_Tank_MV.set(new GT_MetaTileEntity_SuperTank(131, "super.tank.tier.02", "Super Tank II", 2).getStackForm(1L)); - ItemList.Super_Tank_HV.set(new GT_MetaTileEntity_SuperTank(132, "super.tank.tier.03", "Super Tank III", 3).getStackForm(1L)); - ItemList.Super_Tank_EV.set(new GT_MetaTileEntity_SuperTank(133, "super.tank.tier.04", "Super Tank IV", 4).getStackForm(1L)); - ItemList.Super_Tank_IV.set(new GT_MetaTileEntity_SuperTank(134, "super.tank.tier.05", "Super Tank V", 5).getStackForm(1L)); - - ItemList.Super_Chest_LV.set(new GT_MetaTileEntity_SuperChest(135, "super.chest.tier.01", "Super Chest I", 1).getStackForm(1L)); - ItemList.Super_Chest_MV.set(new GT_MetaTileEntity_SuperChest(136, "super.chest.tier.02", "Super Chest II", 2).getStackForm(1L)); - ItemList.Super_Chest_HV.set(new GT_MetaTileEntity_SuperChest(137, "super.chest.tier.03", "Super Chest III", 3).getStackForm(1L)); - ItemList.Super_Chest_EV.set(new GT_MetaTileEntity_SuperChest(138, "super.chest.tier.04", "Super Chest IV", 4).getStackForm(1L)); - ItemList.Super_Chest_IV.set(new GT_MetaTileEntity_SuperChest(139, "super.chest.tier.05", "Super Chest V", 5).getStackForm(1L)); - - ItemList.Long_Distance_Pipeline_Fluid.set(new GT_MetaTileEntity_LongDistancePipelineFluid(2700, "long.distance.pipeline.fluid", "Long Distance Fluid Pipeline", 1).getStackForm(1L)); - ItemList.Long_Distance_Pipeline_Item.set(new GT_MetaTileEntity_LongDistancePipelineItem(2701, "long.distance.pipeline.item", "Long Distance Item Pipeline", 1).getStackForm(1L)); + ItemList.Hatch_Energy_ULV.set( + new GT_MetaTileEntity_Hatch_Energy(40, "hatch.energy.tier.00", "ULV Energy Hatch", 0).getStackForm(1L)); + ItemList.Hatch_Energy_LV.set( + new GT_MetaTileEntity_Hatch_Energy(41, "hatch.energy.tier.01", "LV Energy Hatch", 1).getStackForm(1L)); + ItemList.Hatch_Energy_MV.set( + new GT_MetaTileEntity_Hatch_Energy(42, "hatch.energy.tier.02", "MV Energy Hatch", 2).getStackForm(1L)); + ItemList.Hatch_Energy_HV.set( + new GT_MetaTileEntity_Hatch_Energy(43, "hatch.energy.tier.03", "HV Energy Hatch", 3).getStackForm(1L)); + ItemList.Hatch_Energy_EV.set( + new GT_MetaTileEntity_Hatch_Energy(44, "hatch.energy.tier.04", "EV Energy Hatch", 4).getStackForm(1L)); + ItemList.Hatch_Energy_IV.set( + new GT_MetaTileEntity_Hatch_Energy(45, "hatch.energy.tier.05", "IV Energy Hatch", 5).getStackForm(1L)); + ItemList.Hatch_Energy_LuV.set( + new GT_MetaTileEntity_Hatch_Energy(46, "hatch.energy.tier.06", "LuV Energy Hatch", 6).getStackForm(1L)); + ItemList.Hatch_Energy_ZPM.set( + new GT_MetaTileEntity_Hatch_Energy(47, "hatch.energy.tier.07", "ZPM Energy Hatch", 7).getStackForm(1L)); + ItemList.Hatch_Energy_UV.set( + new GT_MetaTileEntity_Hatch_Energy(48, "hatch.energy.tier.08", "UV Energy Hatch", 8).getStackForm(1L)); + ItemList.Hatch_Energy_MAX.set( + new GT_MetaTileEntity_Hatch_Energy(49, "hatch.energy.tier.09", "UHV Energy Hatch", 9).getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Energy_ULV.get(1L), bitsd, new Object[] { + "COL", + "XMP", + "COL", + 'M', + ItemList.Hull_ULV, + 'C', + OrePrefixes.cableGt01.get(Materials.Lead), + 'X', + OrePrefixes.circuit.get(Materials.Primitive), + 'O', + ItemList.ULV_Coil, + 'L', + OrePrefixes.cell.get(Materials.Lubricant), + 'P', + OrePrefixes.rotor.get(Materials.Lead) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Energy_LV.get(1L), bitsd, new Object[] { + "COL", + "XMP", + "COL", + 'M', + ItemList.Hull_LV, + 'C', + OrePrefixes.cableGt01.get(Materials.Tin), + 'X', + OrePrefixes.circuit.get(Materials.Basic), + 'O', + ItemList.LV_Coil, + 'L', + OrePrefixes.cell.get(Materials.Lubricant), + 'P', + ItemList.Electric_Pump_LV + }); + GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Energy_MV.get(1L), bitsd, new Object[] { + "XOL", + "CMP", + "XOL", + 'M', + ItemList.Hull_MV, + 'C', + OrePrefixes.cableGt01.get(Materials.Copper), + 'X', + ItemList.Circuit_Chip_ULPIC, + 'O', + ItemList.MV_Coil, + 'L', + OrePrefixes.cell.get(Materials.Lubricant), + 'P', + ItemList.Electric_Pump_MV + }); + + ItemList.Hatch_Input_ULV.set( + new GT_MetaTileEntity_Hatch_Input(50, "hatch.input.tier.00", "Input Hatch (ULV)", 0).getStackForm(1L)); + ItemList.Hatch_Input_LV.set( + new GT_MetaTileEntity_Hatch_Input(51, "hatch.input.tier.01", "Input Hatch (LV)", 1).getStackForm(1L)); + ItemList.Hatch_Input_MV.set( + new GT_MetaTileEntity_Hatch_Input(52, "hatch.input.tier.02", "Input Hatch (MV)", 2).getStackForm(1L)); + ItemList.Hatch_Input_HV.set( + new GT_MetaTileEntity_Hatch_Input(53, "hatch.input.tier.03", "Input Hatch (HV)", 3).getStackForm(1L)); + ItemList.Hatch_Input_EV.set( + new GT_MetaTileEntity_Hatch_Input(54, "hatch.input.tier.04", "Input Hatch (EV)", 4).getStackForm(1L)); + ItemList.Hatch_Input_IV.set( + new GT_MetaTileEntity_Hatch_Input(55, "hatch.input.tier.05", "Input Hatch (IV)", 5).getStackForm(1L)); + ItemList.Hatch_Input_LuV.set( + new GT_MetaTileEntity_Hatch_Input(56, "hatch.input.tier.06", "Input Hatch (LuV)", 6).getStackForm(1L)); + ItemList.Hatch_Input_ZPM.set( + new GT_MetaTileEntity_Hatch_Input(57, "hatch.input.tier.07", "Input Hatch (ZPM)", 7).getStackForm(1L)); + ItemList.Hatch_Input_UV.set( + new GT_MetaTileEntity_Hatch_Input(58, "hatch.input.tier.08", "Input Hatch (UV)", 8).getStackForm(1L)); + ItemList.Hatch_Input_MAX.set( + new GT_MetaTileEntity_Hatch_Input(59, "hatch.input.tier.09", "Input Hatch (UHV)", 9).getStackForm(1L)); + ItemList.Hatch_Input_Multi_2x2_EV.set(new GT_MetaTileEntity_Hatch_MultiInput( + 200, 4, "hatch.multi.input.tier.01", "Quadruple Input Hatch (EV)", 4) + .getStackForm(1L)); + ItemList.Hatch_Input_Multi_2x2_IV.set(new GT_MetaTileEntity_Hatch_MultiInput( + 710, 4, "hatch.multi.input.tier.02", "Quadruple Input Hatch (IV)", 5) + .getStackForm(1L)); + ItemList.Hatch_Input_Multi_2x2_LuV.set(new GT_MetaTileEntity_Hatch_MultiInput( + 711, 4, "hatch.multi.input.tier.03", "Quadruple Input Hatch (LuV)", 6) + .getStackForm(1L)); + ItemList.Hatch_Input_Multi_2x2_ZPM.set(new GT_MetaTileEntity_Hatch_MultiInput( + 712, 4, "hatch.multi.input.tier.04", "Quadruple Input Hatch (ZPM)", 7) + .getStackForm(1L)); + ItemList.Hatch_Input_Multi_2x2_UV.set(new GT_MetaTileEntity_Hatch_MultiInput( + 713, 4, "hatch.multi.input.tier.05", "Quadruple Input Hatch (UV)", 8) + .getStackForm(1L)); + + ItemList.Hatch_Output_ULV.set( + new GT_MetaTileEntity_Hatch_Output(60, "hatch.output.tier.00", "Output Hatch (ULV)", 0) + .getStackForm(1L)); + ItemList.Hatch_Output_LV.set( + new GT_MetaTileEntity_Hatch_Output(61, "hatch.output.tier.01", "Output Hatch (LV)", 1) + .getStackForm(1L)); + ItemList.Hatch_Output_MV.set( + new GT_MetaTileEntity_Hatch_Output(62, "hatch.output.tier.02", "Output Hatch (MV)", 2) + .getStackForm(1L)); + ItemList.Hatch_Output_HV.set( + new GT_MetaTileEntity_Hatch_Output(63, "hatch.output.tier.03", "Output Hatch (HV)", 3) + .getStackForm(1L)); + ItemList.Hatch_Output_EV.set( + new GT_MetaTileEntity_Hatch_Output(64, "hatch.output.tier.04", "Output Hatch (EV)", 4) + .getStackForm(1L)); + ItemList.Hatch_Output_IV.set( + new GT_MetaTileEntity_Hatch_Output(65, "hatch.output.tier.05", "Output Hatch (IV)", 5) + .getStackForm(1L)); + ItemList.Hatch_Output_LuV.set( + new GT_MetaTileEntity_Hatch_Output(66, "hatch.output.tier.06", "Output Hatch (LuV)", 6) + .getStackForm(1L)); + ItemList.Hatch_Output_ZPM.set( + new GT_MetaTileEntity_Hatch_Output(67, "hatch.output.tier.07", "Output Hatch (ZPM)", 7) + .getStackForm(1L)); + ItemList.Hatch_Output_UV.set( + new GT_MetaTileEntity_Hatch_Output(68, "hatch.output.tier.08", "Output Hatch (UV)", 8) + .getStackForm(1L)); + ItemList.Hatch_Output_MAX.set( + new GT_MetaTileEntity_Hatch_Output(69, "hatch.output.tier.09", "Output Hatch (UHV)", 9) + .getStackForm(1L)); + + ItemList.Quantum_Tank_LV.set( + new GT_MetaTileEntity_QuantumTank(120, "quantum.tank.tier.06", "Quantum Tank I", 6).getStackForm(1L)); + ItemList.Quantum_Tank_MV.set( + new GT_MetaTileEntity_QuantumTank(121, "quantum.tank.tier.07", "Quantum Tank II", 7).getStackForm(1L)); + ItemList.Quantum_Tank_HV.set( + new GT_MetaTileEntity_QuantumTank(122, "quantum.tank.tier.08", "Quantum Tank III", 8).getStackForm(1L)); + ItemList.Quantum_Tank_EV.set( + new GT_MetaTileEntity_QuantumTank(123, "quantum.tank.tier.09", "Quantum Tank IV", 9).getStackForm(1L)); + ItemList.Quantum_Tank_IV.set( + new GT_MetaTileEntity_QuantumTank(124, "quantum.tank.tier.10", "Quantum Tank V", 10).getStackForm(1L)); + + ItemList.Quantum_Chest_LV.set( + new GT_MetaTileEntity_QuantumChest(125, "quantum.chest.tier.06", "Quantum Chest I", 6) + .getStackForm(1L)); + ItemList.Quantum_Chest_MV.set( + new GT_MetaTileEntity_QuantumChest(126, "quantum.chest.tier.07", "Quantum Chest II", 7) + .getStackForm(1L)); + ItemList.Quantum_Chest_HV.set( + new GT_MetaTileEntity_QuantumChest(127, "quantum.chest.tier.08", "Quantum Chest III", 8) + .getStackForm(1L)); + ItemList.Quantum_Chest_EV.set( + new GT_MetaTileEntity_QuantumChest(128, "quantum.chest.tier.09", "Quantum Chest IV", 9) + .getStackForm(1L)); + ItemList.Quantum_Chest_IV.set( + new GT_MetaTileEntity_QuantumChest(129, "quantum.chest.tier.10", "Quantum Chest V", 10) + .getStackForm(1L)); + + ItemList.Super_Tank_LV.set( + new GT_MetaTileEntity_SuperTank(130, "super.tank.tier.01", "Super Tank I", 1).getStackForm(1L)); + ItemList.Super_Tank_MV.set( + new GT_MetaTileEntity_SuperTank(131, "super.tank.tier.02", "Super Tank II", 2).getStackForm(1L)); + ItemList.Super_Tank_HV.set( + new GT_MetaTileEntity_SuperTank(132, "super.tank.tier.03", "Super Tank III", 3).getStackForm(1L)); + ItemList.Super_Tank_EV.set( + new GT_MetaTileEntity_SuperTank(133, "super.tank.tier.04", "Super Tank IV", 4).getStackForm(1L)); + ItemList.Super_Tank_IV.set( + new GT_MetaTileEntity_SuperTank(134, "super.tank.tier.05", "Super Tank V", 5).getStackForm(1L)); + + ItemList.Super_Chest_LV.set( + new GT_MetaTileEntity_SuperChest(135, "super.chest.tier.01", "Super Chest I", 1).getStackForm(1L)); + ItemList.Super_Chest_MV.set( + new GT_MetaTileEntity_SuperChest(136, "super.chest.tier.02", "Super Chest II", 2).getStackForm(1L)); + ItemList.Super_Chest_HV.set( + new GT_MetaTileEntity_SuperChest(137, "super.chest.tier.03", "Super Chest III", 3).getStackForm(1L)); + ItemList.Super_Chest_EV.set( + new GT_MetaTileEntity_SuperChest(138, "super.chest.tier.04", "Super Chest IV", 4).getStackForm(1L)); + ItemList.Super_Chest_IV.set( + new GT_MetaTileEntity_SuperChest(139, "super.chest.tier.05", "Super Chest V", 5).getStackForm(1L)); + + ItemList.Long_Distance_Pipeline_Fluid.set(new GT_MetaTileEntity_LongDistancePipelineFluid( + 2700, "long.distance.pipeline.fluid", "Long Distance Fluid Pipeline", 1) + .getStackForm(1L)); + ItemList.Long_Distance_Pipeline_Item.set(new GT_MetaTileEntity_LongDistancePipelineItem( + 2701, "long.distance.pipeline.item", "Long Distance Item Pipeline", 1) + .getStackForm(1L)); if (GregTech_API.mAE2) { - ItemList.Hatch_Output_Bus_ME.set(new GT_MetaTileEntity_Hatch_OutputBus_ME(2710, "hatch.output_bus.me", "Output Bus (ME)").getStackForm(1L)); - ItemList.Hatch_Input_Bus_ME.set(new GT_MetaTileEntity_Hatch_InputBus_ME(2711, "hatch.input_bus.me", "Stocking Input Bus (ME)").getStackForm(1L)); - //ItemList.Hatch_CraftingInput_Bus_ME.set(new GT_MetaTileEntity_Hatch_CraftingInputBus_ME(2712, "hatch.crafting_input_bus.me", "Crafting Input Bus (ME)").getStackForm(1L)); + ItemList.Hatch_Output_Bus_ME.set( + new GT_MetaTileEntity_Hatch_OutputBus_ME(2710, "hatch.output_bus.me", "Output Bus (ME)") + .getStackForm(1L)); + ItemList.Hatch_Input_Bus_ME.set( + new GT_MetaTileEntity_Hatch_InputBus_ME(2711, "hatch.input_bus.me", "Stocking Input Bus (ME)") + .getStackForm(1L)); + // ItemList.Hatch_CraftingInput_Bus_ME.set(new GT_MetaTileEntity_Hatch_CraftingInputBus_ME(2712, + // "hatch.crafting_input_bus.me", "Crafting Input Bus (ME)").getStackForm(1L)); } - ItemList.Hatch_Input_Bus_ULV.set(new GT_MetaTileEntity_Hatch_InputBus(70, "hatch.input_bus.tier.00", "Input Bus (ULV)", 0).getStackForm(1L)); - ItemList.Hatch_Input_Bus_LV.set(new GT_MetaTileEntity_Hatch_InputBus(71, "hatch.input_bus.tier.01", "Input Bus (LV)", 1).getStackForm(1L)); - ItemList.Hatch_Input_Bus_MV.set(new GT_MetaTileEntity_Hatch_InputBus(72, "hatch.input_bus.tier.02", "Input Bus (MV)", 2).getStackForm(1L)); - ItemList.Hatch_Input_Bus_HV.set(new GT_MetaTileEntity_Hatch_InputBus(73, "hatch.input_bus.tier.03", "Input Bus (HV)", 3).getStackForm(1L)); - ItemList.Hatch_Input_Bus_EV.set(new GT_MetaTileEntity_Hatch_InputBus(74, "hatch.input_bus.tier.04", "Input Bus (EV)", 4).getStackForm(1L)); - ItemList.Hatch_Input_Bus_IV.set(new GT_MetaTileEntity_Hatch_InputBus(75, "hatch.input_bus.tier.05", "Input Bus (IV)", 5).getStackForm(1L)); - ItemList.Hatch_Input_Bus_LuV.set(new GT_MetaTileEntity_Hatch_InputBus(76, "hatch.input_bus.tier.06", "Input Bus (LuV)", 6).getStackForm(1L)); - ItemList.Hatch_Input_Bus_ZPM.set(new GT_MetaTileEntity_Hatch_InputBus(77, "hatch.input_bus.tier.07", "Input Bus (ZPM)", 7).getStackForm(1L)); - ItemList.Hatch_Input_Bus_UV.set(new GT_MetaTileEntity_Hatch_InputBus(78, "hatch.input_bus.tier.08", "Input Bus (UV)", 8).getStackForm(1L)); - ItemList.Hatch_Input_Bus_MAX.set(new GT_MetaTileEntity_Hatch_InputBus(79, "hatch.input_bus.tier.09", "Input Bus (UHV)", 9).getStackForm(1L)); - - ItemList.Hatch_Output_Bus_ULV.set(new GT_MetaTileEntity_Hatch_OutputBus(80, "hatch.output_bus.tier.00", "Output Bus (ULV)", 0).getStackForm(1L)); - ItemList.Hatch_Output_Bus_LV.set(new GT_MetaTileEntity_Hatch_OutputBus(81, "hatch.output_bus.tier.01", "Output Bus (LV)", 1).getStackForm(1L)); - ItemList.Hatch_Output_Bus_MV.set(new GT_MetaTileEntity_Hatch_OutputBus(82, "hatch.output_bus.tier.02", "Output Bus (MV)", 2).getStackForm(1L)); - ItemList.Hatch_Output_Bus_HV.set(new GT_MetaTileEntity_Hatch_OutputBus(83, "hatch.output_bus.tier.03", "Output Bus (HV)", 3).getStackForm(1L)); - ItemList.Hatch_Output_Bus_EV.set(new GT_MetaTileEntity_Hatch_OutputBus(84, "hatch.output_bus.tier.04", "Output Bus (EV)", 4).getStackForm(1L)); - ItemList.Hatch_Output_Bus_IV.set(new GT_MetaTileEntity_Hatch_OutputBus(85, "hatch.output_bus.tier.05", "Output Bus (IV)", 5).getStackForm(1L)); - ItemList.Hatch_Output_Bus_LuV.set(new GT_MetaTileEntity_Hatch_OutputBus(86, "hatch.output_bus.tier.06", "Output Bus (LuV)", 6).getStackForm(1L)); - ItemList.Hatch_Output_Bus_ZPM.set(new GT_MetaTileEntity_Hatch_OutputBus(87, "hatch.output_bus.tier.07", "Output Bus (ZPM)", 7).getStackForm(1L)); - ItemList.Hatch_Output_Bus_UV.set(new GT_MetaTileEntity_Hatch_OutputBus(88, "hatch.output_bus.tier.08", "Output Bus (UV)", 8).getStackForm(1L)); - ItemList.Hatch_Output_Bus_MAX.set(new GT_MetaTileEntity_Hatch_OutputBus(89, "hatch.output_bus.tier.09", "Output Bus (UHV)", 9).getStackForm(1L)); - - ItemList.Hatch_Maintenance.set(new GT_MetaTileEntity_Hatch_Maintenance(90, "hatch.maintenance", "Maintenance Hatch", 1).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Maintenance.get(1L), bitsd, new Object[]{"dwx", "hMc", "fsr", 'M', ItemList.Hull_LV}); - GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Maintenance.get(1L), bitsd, new Object[]{"dwx", "hMC", "fsr", 'M', ItemList.Hull_LV, 'C', GT_ModHandler.getModItem("Railcraft", "tool.crowbar", 1L, 0)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Maintenance.get(1L), bitsd, new Object[]{"dwx", "hMC", "fsr", 'M', ItemList.Hull_LV, 'C', GT_ModHandler.getModItem("Railcraft", "tool.crowbar.reinforced", 1L, 0)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Maintenance.get(1L), bitsd, new Object[]{"dwx", "hMC", "fsr", 'M', ItemList.Hull_LV, 'C', GT_ModHandler.getModItem("Railcraft", "tool.crowbar.magic", 1L, 0)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Maintenance.get(1L), bitsd, new Object[]{"dwx", "hMC", "fsr", 'M', ItemList.Hull_LV, 'C', GT_ModHandler.getModItem("Railcraft", "tool.crowbar.void", 1L, 0)}); - - ItemList.Hatch_AutoMaintenance.set(new GT_MetaTileEntity_Hatch_Maintenance(111, "hatch.maintenance.auto", "Auto Maintenance Hatch", 6, true).getStackForm(1L)); - ItemList.Hatch_DataAccess_EV.set(new GT_MetaTileEntity_Hatch_DataAccess(145, "hatch.dataaccess", "Data Access Hatch", 4).getStackForm(1L)); - ItemList.Hatch_DataAccess_LuV.set(new GT_MetaTileEntity_Hatch_DataAccess(146, "hatch.dataaccess.adv", "Advanced Data Access Hatch", 6).getStackForm(1L)); - ItemList.Hatch_DataAccess_UV.set(new GT_MetaTileEntity_Hatch_DataAccess(147, "hatch.dataaccess.auto", "Automatable Data Access Hatch", 8).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Hatch_DataAccess_EV.get(1L), bitsd, new Object[]{"COC", "OMO", "COC", 'M', ItemList.Hull_EV, 'O', ItemList.Tool_DataStick, 'C', OrePrefixes.circuit.get(Materials.Elite)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hatch_DataAccess_LuV.get(1L), bitsd, new Object[]{"COC", "OMO", "COC", 'M', ItemList.Hull_LuV, 'O', ItemList.Tool_DataOrb, 'C', OrePrefixes.circuit.get(Materials.Ultimate)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hatch_DataAccess_UV.get(1L), bitsd, new Object[]{"CRC", "OMO", "CRC", 'M', ItemList.Hull_UV, 'O', ItemList.Tool_DataOrb, 'C', OrePrefixes.circuit.get(Materials.Infinite), 'R', ItemList.Robot_Arm_UV}); - - GT_ModHandler.addCraftingRecipe(ItemList.Hatch_AutoMaintenance.get(1L), bitsd, new Object[]{"CHC", "AMA", "CHC", 'M', ItemList.Hull_LuV, 'H', ItemList.Hatch_Maintenance, 'A', ItemList.Robot_Arm_LuV, 'C', OrePrefixes.circuit.get(Materials.Ultimate)}); - - ItemList.Hatch_Muffler_LV.set(new GT_MetaTileEntity_Hatch_Muffler(91, "hatch.muffler.tier.01", "Muffler Hatch (LV)", 1).getStackForm(1L)); - ItemList.Hatch_Muffler_MV.set(new GT_MetaTileEntity_Hatch_Muffler(92, "hatch.muffler.tier.02", "Muffler Hatch (MV)", 2).getStackForm(1L)); - ItemList.Hatch_Muffler_HV.set(new GT_MetaTileEntity_Hatch_Muffler(93, "hatch.muffler.tier.03", "Muffler Hatch (HV)", 3).getStackForm(1L)); - ItemList.Hatch_Muffler_EV.set(new GT_MetaTileEntity_Hatch_Muffler(94, "hatch.muffler.tier.04", "Muffler Hatch (EV)", 4).getStackForm(1L)); - ItemList.Hatch_Muffler_IV.set(new GT_MetaTileEntity_Hatch_Muffler(95, "hatch.muffler.tier.05", "Muffler Hatch (IV)", 5).getStackForm(1L)); - ItemList.Hatch_Muffler_LuV.set(new GT_MetaTileEntity_Hatch_Muffler(96, "hatch.muffler.tier.06", "Muffler Hatch (LuV)", 6).getStackForm(1L)); - ItemList.Hatch_Muffler_ZPM.set(new GT_MetaTileEntity_Hatch_Muffler(97, "hatch.muffler.tier.07", "Muffler Hatch (ZPM)", 7).getStackForm(1L)); - ItemList.Hatch_Muffler_UV.set(new GT_MetaTileEntity_Hatch_Muffler(98, "hatch.muffler.tier.08", "Muffler Hatch (UV)", 8).getStackForm(1L)); - ItemList.Hatch_Muffler_MAX.set(new GT_MetaTileEntity_Hatch_Muffler(99, "hatch.muffler.tier.09", "Muffler Hatch (UHV)", 9).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Muffler_LV.get(1L), bitsd, new Object[]{"MX ", "PR ", 'M', ItemList.Hull_LV, 'P', OrePrefixes.pipeMedium.get(Materials.Bronze), 'R', OrePrefixes.rotor.get(Materials.Bronze), 'X', ItemList.Electric_Motor_LV}); - GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Muffler_MV.get(1L), bitsd, new Object[]{"MX ", "PR ", 'M', ItemList.Hull_MV, 'P', OrePrefixes.pipeMedium.get(Materials.Steel), 'R', OrePrefixes.rotor.get(Materials.Steel), 'X', ItemList.Electric_Motor_MV}); - - ItemList.Machine_Bronze_Boiler.set(new GT_MetaTileEntity_Boiler_Bronze(100, "boiler.bronze", "Small Coal Boiler").getStackForm(1L)); - ItemList.Machine_Steel_Boiler.set(new GT_MetaTileEntity_Boiler_Steel(101, "boiler.steel", "High Pressure Coal Boiler").getStackForm(1L)); - ItemList.Machine_Steel_Boiler_Lava.set(new GT_MetaTileEntity_Boiler_Lava(102, "boiler.lava", "High Pressure Lava Boiler").getStackForm(1L)); - ItemList.Machine_Bronze_Boiler_Solar.set(new GT_MetaTileEntity_Boiler_Solar(105, "boiler.solar", "Simple Solar Boiler").getStackForm(1L)); - ItemList.Machine_HP_Solar.set(new GT_MetaTileEntity_Boiler_Solar_Steel(114, "boiler.steel.solar", "High Pressure Solar Boiler").getStackForm(1L)); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_Bronze_Boiler.get(1L), bits, new Object[]{aTextPlate, "PwP", "BFB", 'F', OreDictNames.craftingIronFurnace, 'P', OrePrefixes.plate.get(Materials.Bronze), 'B', new ItemStack(Blocks.brick_block, 1)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_Steel_Boiler.get(1L), bits, new Object[]{aTextPlate, "PwP", "BFB", 'F', OreDictNames.craftingIronFurnace, 'P', OrePrefixes.plate.get(Materials.Steel), 'B', new ItemStack(Blocks.brick_block, 1)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_Steel_Boiler_Lava.get(1L), bits, new Object[]{aTextPlate, "PTP", aTextPlateMotor, 'M', ItemList.Hull_HP, 'P', OrePrefixes.plate.get(Materials.Steel), 'T', GT_ModHandler.getModItem("BuildCraft|Factory", "tankBlock", 1L, 0)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_Bronze_Boiler_Solar.get(1L), bits, new Object[]{"GGG", "SSS", aTextPlateMotor, 'M', ItemList.Hull_Bronze_Bricks, 'P', OrePrefixes.pipeSmall.get(Materials.Bronze), 'S', OrePrefixes.plateDouble.get(Materials.Silver), 'G', new ItemStack(Blocks.glass, 1)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_HP_Solar.get(1L), bits, new Object[]{"GGG", "SSS", aTextPlateMotor, 'M', ItemList.Hull_HP_Bricks, 'P', OrePrefixes.pipeSmall.get(Materials.Steel), 'S', OrePrefixes.plateTriple.get(Materials.Silver), 'G', GT_ModHandler.getModItem("IC2", "blockAlloyGlass", 1L)}); - - ItemList.Machine_Bronze_BlastFurnace.set(new GT_MetaTileEntity_BronzeBlastFurnace(108, "bronzemachine.blastfurnace", "Bronze Plated Blast Furnace").getStackForm(1L)); - ItemList.Machine_Bronze_Furnace.set(new GT_MetaTileEntity_Furnace_Bronze(103, "bronzemachine.furnace", "Steam Furnace").getStackForm(1L)); - ItemList.Machine_HP_Furnace.set(new GT_MetaTileEntity_Furnace_Steel(104, "hpmachine.furnace", "High Pressure Furnace").getStackForm(1L)); - ItemList.Machine_Bronze_Macerator.set(new GT_MetaTileEntity_Macerator_Bronze(106, "bronzemachine.macerator", "Steam Macerator").getStackForm(1L)); - ItemList.Machine_HP_Macerator.set(new GT_MetaTileEntity_Macerator_Steel(107, "hpmachine.macerator", "High Pressure Macerator").getStackForm(1L)); - ItemList.Machine_Bronze_Extractor.set(new GT_MetaTileEntity_Extractor_Bronze(109, "bronzemachine.extractor", "Steam Extractor").getStackForm(1L)); - ItemList.Machine_HP_Extractor.set(new GT_MetaTileEntity_Extractor_Steel(110, "hpmachine.extractor", "High Pressure Extractor").getStackForm(1L)); - ItemList.Machine_Bronze_Hammer.set(new GT_MetaTileEntity_ForgeHammer_Bronze(112, "bronzemachine.hammer", "Steam Forge Hammer").getStackForm(1L)); - ItemList.Machine_HP_Hammer.set(new GT_MetaTileEntity_ForgeHammer_Steel(113, "hpmachine.hammer", "High Pressure Forge Hammer").getStackForm(1L)); - ItemList.Machine_Bronze_Compressor.set(new GT_MetaTileEntity_Compressor_Bronze(115, "bronzemachine.compressor", "Steam Compressor").getStackForm(1L)); - ItemList.Machine_HP_Compressor.set(new GT_MetaTileEntity_Compressor_Steel(116, "hpmachine.compressor", "High Pressure Compressor").getStackForm(1L)); - ItemList.Machine_Bronze_AlloySmelter.set(new GT_MetaTileEntity_AlloySmelter_Bronze(118, "bronzemachine.alloysmelter", "Steam Alloy Smelter").getStackForm(1L)); - ItemList.Machine_HP_AlloySmelter.set(new GT_MetaTileEntity_AlloySmelter_Steel(119, "hpmachine.alloysmelter", "High Pressure Alloy Smelter").getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Machine_Bronze_Furnace.get(1L), bits, new Object[]{"XXX", "XMX", "XFX", 'M', ItemList.Hull_Bronze_Bricks, 'X', OrePrefixes.pipeSmall.get(Materials.Bronze), 'F', OreDictNames.craftingFurnace}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_HP_Furnace.get(1L), bits, new Object[]{"XSX", "PMP", "XXX", 'M', ItemList.Machine_Bronze_Furnace, 'X', OrePrefixes.pipeSmall.get(Materials.WroughtIron), 'P', OrePrefixes.plate.get(Materials.WroughtIron), 'S', OrePrefixes.plate.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_Bronze_Macerator.get(1L), bits, new Object[]{"DXD", "XMX", "PXP", 'M', ItemList.Hull_Bronze, 'X', OrePrefixes.pipeSmall.get(Materials.Bronze), 'P', OreDictNames.craftingPiston, 'D', OrePrefixes.gem.get(Materials.Diamond)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_HP_Macerator.get(1L), bits, new Object[]{"PSP", "XMX", "PPP", 'M', ItemList.Machine_Bronze_Macerator, 'X', OrePrefixes.pipeSmall.get(Materials.WroughtIron), 'P', OrePrefixes.plate.get(Materials.WroughtIron), 'S', OrePrefixes.plate.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_Bronze_Extractor.get(1L), bits, new Object[]{"XXX", "PMG", "XXX", 'M', ItemList.Hull_Bronze, 'X', OrePrefixes.pipeSmall.get(Materials.Bronze), 'P', OreDictNames.craftingPiston, 'G', new ItemStack(Blocks.glass, 1)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_HP_Extractor.get(1L), bits, new Object[]{"XSX", "PMP", "XXX", 'M', ItemList.Machine_Bronze_Extractor, 'X', OrePrefixes.pipeSmall.get(Materials.WroughtIron), 'P', OrePrefixes.plate.get(Materials.WroughtIron), 'S', OrePrefixes.plate.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_Bronze_Hammer.get(1L), bits, new Object[]{"XPX", "XMX", "XAX", 'M', ItemList.Hull_Bronze, 'X', OrePrefixes.pipeSmall.get(Materials.Bronze), 'P', OreDictNames.craftingPiston, 'A', OreDictNames.craftingAnvil}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_HP_Hammer.get(1L), bits, new Object[]{"PSP", "XMX", "PPP", 'M', ItemList.Machine_Bronze_Hammer, 'X', OrePrefixes.pipeSmall.get(Materials.WroughtIron), 'P', OrePrefixes.plate.get(Materials.WroughtIron), 'S', OrePrefixes.plate.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_Bronze_Compressor.get(1L), bits, new Object[]{"XXX", aTextPlateMotor, "XXX", 'M', ItemList.Hull_Bronze, 'X', OrePrefixes.pipeSmall.get(Materials.Bronze), 'P', OreDictNames.craftingPiston}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_HP_Compressor.get(1L), bits, new Object[]{"XSX", "PMP", "XXX", 'M', ItemList.Machine_Bronze_Compressor, 'X', OrePrefixes.pipeSmall.get(Materials.WroughtIron), 'P', OrePrefixes.plate.get(Materials.WroughtIron), 'S', OrePrefixes.plate.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_Bronze_AlloySmelter.get(1L), bits, new Object[]{"XXX", "FMF", "XXX", 'M', ItemList.Hull_Bronze_Bricks, 'X', OrePrefixes.pipeSmall.get(Materials.Bronze), 'F', OreDictNames.craftingFurnace}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_HP_AlloySmelter.get(1L), bits, new Object[]{"PSP", "PMP", "PXP", 'M', ItemList.Machine_Bronze_AlloySmelter, 'X', OrePrefixes.pipeSmall.get(Materials.WroughtIron), 'P', OrePrefixes.plate.get(Materials.WroughtIron), 'S', OrePrefixes.plate.get(Materials.Steel)}); - - ItemList.Locker_ULV.set(new GT_MetaTileEntity_Locker(150, "locker.tier.00", "Ultra Low Voltage Locker", 0).getStackForm(1L)); - ItemList.Locker_LV.set(new GT_MetaTileEntity_Locker(151, "locker.tier.01", "Low Voltage Locker", 1).getStackForm(1L)); - ItemList.Locker_MV.set(new GT_MetaTileEntity_Locker(152, "locker.tier.02", "Medium Voltage Locker", 2).getStackForm(1L)); - ItemList.Locker_HV.set(new GT_MetaTileEntity_Locker(153, "locker.tier.03", "High Voltage Locker", 3).getStackForm(1L)); - ItemList.Locker_EV.set(new GT_MetaTileEntity_Locker(154, "locker.tier.04", "Extreme Voltage Locker", 4).getStackForm(1L)); - ItemList.Locker_IV.set(new GT_MetaTileEntity_Locker(155, "locker.tier.05", "Insane Voltage Locker", 5).getStackForm(1L)); - ItemList.Locker_LuV.set(new GT_MetaTileEntity_Locker(156, "locker.tier.06", "Ludicrous Voltage Locker", 6).getStackForm(1L)); - ItemList.Locker_ZPM.set(new GT_MetaTileEntity_Locker(157, "locker.tier.07", "ZPM Voltage Locker", 7).getStackForm(1L)); - ItemList.Locker_UV.set(new GT_MetaTileEntity_Locker(158, "locker.tier.08", "Ultimate Voltage Locker", 8).getStackForm(1L)); - ItemList.Locker_MAX.set(new GT_MetaTileEntity_Locker(159, "locker.tier.09", "Highly Ultimate Voltage Locker", 9).getStackForm(1L)); - - ItemList.Battery_Buffer_1by1_ULV.set(new GT_MetaTileEntity_BasicBatteryBuffer(160, "batterybuffer.01.tier.00", "Ultra Low Voltage Battery Buffer", 0, "", 1).getStackForm(1L)); - ItemList.Battery_Buffer_1by1_LV.set(new GT_MetaTileEntity_BasicBatteryBuffer(161, "batterybuffer.01.tier.01", "Low Voltage Battery Buffer", 1, "", 1).getStackForm(1L)); - ItemList.Battery_Buffer_1by1_MV.set(new GT_MetaTileEntity_BasicBatteryBuffer(162, "batterybuffer.01.tier.02", "Medium Voltage Battery Buffer", 2, "", 1).getStackForm(1L)); - ItemList.Battery_Buffer_1by1_HV.set(new GT_MetaTileEntity_BasicBatteryBuffer(163, "batterybuffer.01.tier.03", "High Voltage Battery Buffer", 3, "", 1).getStackForm(1L)); - ItemList.Battery_Buffer_1by1_EV.set(new GT_MetaTileEntity_BasicBatteryBuffer(164, "batterybuffer.01.tier.04", "Extreme Voltage Battery Buffer", 4, "", 1).getStackForm(1L)); - ItemList.Battery_Buffer_1by1_IV.set(new GT_MetaTileEntity_BasicBatteryBuffer(165, "batterybuffer.01.tier.05", "Insane Voltage Battery Buffer", 5, "", 1).getStackForm(1L)); - ItemList.Battery_Buffer_1by1_LuV.set(new GT_MetaTileEntity_BasicBatteryBuffer(166, "batterybuffer.01.tier.06", "Ludicrous Voltage Battery Buffer", 6, "", 1).getStackForm(1L)); - ItemList.Battery_Buffer_1by1_ZPM.set(new GT_MetaTileEntity_BasicBatteryBuffer(167, "batterybuffer.01.tier.07", "ZPM Voltage Battery Buffer", 7, "", 1).getStackForm(1L)); - ItemList.Battery_Buffer_1by1_UV.set(new GT_MetaTileEntity_BasicBatteryBuffer(168, "batterybuffer.01.tier.08", "Ultimate Voltage Battery Buffer", 8, "", 1).getStackForm(1L)); - ItemList.Battery_Buffer_1by1_MAX.set(new GT_MetaTileEntity_BasicBatteryBuffer(169, "batterybuffer.01.tier.09", "Highly Ultimate Voltage Battery Buffer", 9, "", 1).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_1by1_ULV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_ULV, 'W', OrePrefixes.wireGt01.get(Materials.Lead), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_1by1_LV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_LV, 'W', OrePrefixes.wireGt01.get(Materials.Tin), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_1by1_MV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_MV, 'W', OrePrefixes.wireGt01.get(Materials.AnyCopper), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_1by1_HV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_HV, 'W', OrePrefixes.wireGt01.get(Materials.Gold), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_1by1_EV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_EV, 'W', OrePrefixes.wireGt01.get(Materials.Aluminium), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_1by1_IV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_IV, 'W', OrePrefixes.wireGt01.get(Materials.Tungsten), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_1by1_LuV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_LuV, 'W', OrePrefixes.wireGt01.get(Materials.VanadiumGallium), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_1by1_ZPM.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_ZPM, 'W', OrePrefixes.wireGt01.get(Materials.Naquadah), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_1by1_UV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_UV, 'W', OrePrefixes.wireGt01.get(Materials.NaquadahAlloy), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_1by1_MAX.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_MAX, 'W', OrePrefixes.wireGt01.get(Materials.SuperconductorUHV), 'T', OreDictNames.craftingChest}); - - ItemList.Battery_Buffer_2by2_ULV.set(new GT_MetaTileEntity_BasicBatteryBuffer(170, "batterybuffer.04.tier.00", "Ultra Low Voltage Battery Buffer", 0, "", 4).getStackForm(1L)); - ItemList.Battery_Buffer_2by2_LV.set(new GT_MetaTileEntity_BasicBatteryBuffer(171, "batterybuffer.04.tier.01", "Low Voltage Battery Buffer", 1, "", 4).getStackForm(1L)); - ItemList.Battery_Buffer_2by2_MV.set(new GT_MetaTileEntity_BasicBatteryBuffer(172, "batterybuffer.04.tier.02", "Medium Voltage Battery Buffer", 2, "", 4).getStackForm(1L)); - ItemList.Battery_Buffer_2by2_HV.set(new GT_MetaTileEntity_BasicBatteryBuffer(173, "batterybuffer.04.tier.03", "High Voltage Battery Buffer", 3, "", 4).getStackForm(1L)); - ItemList.Battery_Buffer_2by2_EV.set(new GT_MetaTileEntity_BasicBatteryBuffer(174, "batterybuffer.04.tier.04", "Extreme Voltage Battery Buffer", 4, "", 4).getStackForm(1L)); - ItemList.Battery_Buffer_2by2_IV.set(new GT_MetaTileEntity_BasicBatteryBuffer(175, "batterybuffer.04.tier.05", "Insane Voltage Battery Buffer", 5, "", 4).getStackForm(1L)); - ItemList.Battery_Buffer_2by2_LuV.set(new GT_MetaTileEntity_BasicBatteryBuffer(176, "batterybuffer.04.tier.06", "Ludicrous Voltage Battery Buffer", 6, "", 4).getStackForm(1L)); - ItemList.Battery_Buffer_2by2_ZPM.set(new GT_MetaTileEntity_BasicBatteryBuffer(177, "batterybuffer.04.tier.07", "ZPM Voltage Battery Buffer", 7, "", 4).getStackForm(1L)); - ItemList.Battery_Buffer_2by2_UV.set(new GT_MetaTileEntity_BasicBatteryBuffer(178, "batterybuffer.04.tier.08", "Ultimate Voltage Battery Buffer", 8, "", 4).getStackForm(1L)); - ItemList.Battery_Buffer_2by2_MAX.set(new GT_MetaTileEntity_BasicBatteryBuffer(179, "batterybuffer.04.tier.09", "Highly Ultimate Voltage Battery Buffer", 9, "", 4).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_2by2_ULV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_ULV, 'W', OrePrefixes.wireGt04.get(Materials.Lead), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_2by2_LV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_LV, 'W', OrePrefixes.wireGt04.get(Materials.Tin), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_2by2_MV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_MV, 'W', OrePrefixes.wireGt04.get(Materials.AnyCopper), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_2by2_HV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_HV, 'W', OrePrefixes.wireGt04.get(Materials.Gold), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_2by2_EV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_EV, 'W', OrePrefixes.wireGt04.get(Materials.Aluminium), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_2by2_IV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_IV, 'W', OrePrefixes.wireGt04.get(Materials.Tungsten), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_2by2_LuV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_LuV, 'W', OrePrefixes.wireGt04.get(Materials.VanadiumGallium), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_2by2_ZPM.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_ZPM, 'W', OrePrefixes.wireGt04.get(Materials.Naquadah), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_2by2_UV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_UV, 'W', OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_2by2_MAX.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_MAX, 'W', OrePrefixes.wireGt04.get(Materials.SuperconductorUHV), 'T', OreDictNames.craftingChest}); - - ItemList.Battery_Buffer_3by3_ULV.set(new GT_MetaTileEntity_BasicBatteryBuffer(180, "batterybuffer.09.tier.00", "Ultra Low Voltage Battery Buffer", 0, "", 9).getStackForm(1L)); - ItemList.Battery_Buffer_3by3_LV.set(new GT_MetaTileEntity_BasicBatteryBuffer(181, "batterybuffer.09.tier.01", "Low Voltage Battery Buffer", 1, "", 9).getStackForm(1L)); - ItemList.Battery_Buffer_3by3_MV.set(new GT_MetaTileEntity_BasicBatteryBuffer(182, "batterybuffer.09.tier.02", "Medium Voltage Battery Buffer", 2, "", 9).getStackForm(1L)); - ItemList.Battery_Buffer_3by3_HV.set(new GT_MetaTileEntity_BasicBatteryBuffer(183, "batterybuffer.09.tier.03", "High Voltage Battery Buffer", 3, "", 9).getStackForm(1L)); - ItemList.Battery_Buffer_3by3_EV.set(new GT_MetaTileEntity_BasicBatteryBuffer(184, "batterybuffer.09.tier.04", "Extreme Voltage Battery Buffer", 4, "", 9).getStackForm(1L)); - ItemList.Battery_Buffer_3by3_IV.set(new GT_MetaTileEntity_BasicBatteryBuffer(185, "batterybuffer.09.tier.05", "Insane Voltage Battery Buffer", 5, "", 9).getStackForm(1L)); - ItemList.Battery_Buffer_3by3_LuV.set(new GT_MetaTileEntity_BasicBatteryBuffer(186, "batterybuffer.09.tier.06", "Ludicrous Voltage Battery Buffer", 6, "", 9).getStackForm(1L)); - ItemList.Battery_Buffer_3by3_ZPM.set(new GT_MetaTileEntity_BasicBatteryBuffer(187, "batterybuffer.09.tier.07", "ZPM Voltage Battery Buffer", 7, "", 9).getStackForm(1L)); - ItemList.Battery_Buffer_3by3_UV.set(new GT_MetaTileEntity_BasicBatteryBuffer(188, "batterybuffer.09.tier.08", "Ultimate Voltage Battery Buffer", 8, "", 9).getStackForm(1L)); - ItemList.Battery_Buffer_3by3_MAX.set(new GT_MetaTileEntity_BasicBatteryBuffer(189, "batterybuffer.09.tier.09", "Highly Ultimate Voltage Battery Buffer", 9, "", 9).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_3by3_ULV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_ULV, 'W', OrePrefixes.wireGt08.get(Materials.Lead), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_3by3_LV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_LV, 'W', OrePrefixes.wireGt08.get(Materials.Tin), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_3by3_MV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_MV, 'W', OrePrefixes.wireGt08.get(Materials.AnyCopper), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_3by3_HV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_HV, 'W', OrePrefixes.wireGt08.get(Materials.Gold), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_3by3_EV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_EV, 'W', OrePrefixes.wireGt08.get(Materials.Aluminium), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_3by3_IV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_IV, 'W', OrePrefixes.wireGt08.get(Materials.Tungsten), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_3by3_LuV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_LuV, 'W', OrePrefixes.wireGt08.get(Materials.VanadiumGallium), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_3by3_ZPM.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_ZPM, 'W', OrePrefixes.wireGt08.get(Materials.Naquadah), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_3by3_UV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_UV, 'W', OrePrefixes.wireGt08.get(Materials.NaquadahAlloy), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_3by3_MAX.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_MAX, 'W', OrePrefixes.wireGt08.get(Materials.SuperconductorUHV), 'T', OreDictNames.craftingChest}); - - ItemList.Battery_Buffer_4by4_ULV.set(new GT_MetaTileEntity_BasicBatteryBuffer(190, "batterybuffer.16.tier.00", "Ultra Low Voltage Battery Buffer", 0, "", 16).getStackForm(1L)); - ItemList.Battery_Buffer_4by4_LV.set(new GT_MetaTileEntity_BasicBatteryBuffer(191, "batterybuffer.16.tier.01", "Low Voltage Battery Buffer", 1, "", 16).getStackForm(1L)); - ItemList.Battery_Buffer_4by4_MV.set(new GT_MetaTileEntity_BasicBatteryBuffer(192, "batterybuffer.16.tier.02", "Medium Voltage Battery Buffer", 2, "", 16).getStackForm(1L)); - ItemList.Battery_Buffer_4by4_HV.set(new GT_MetaTileEntity_BasicBatteryBuffer(193, "batterybuffer.16.tier.03", "High Voltage Battery Buffer", 3, "", 16).getStackForm(1L)); - ItemList.Battery_Buffer_4by4_EV.set(new GT_MetaTileEntity_BasicBatteryBuffer(194, "batterybuffer.16.tier.04", "Extreme Voltage Battery Buffer", 4, "", 16).getStackForm(1L)); - ItemList.Battery_Buffer_4by4_IV.set(new GT_MetaTileEntity_BasicBatteryBuffer(195, "batterybuffer.16.tier.05", "Insane Voltage Battery Buffer", 5, "", 16).getStackForm(1L)); - ItemList.Battery_Buffer_4by4_LuV.set(new GT_MetaTileEntity_BasicBatteryBuffer(196, "batterybuffer.16.tier.06", "Ludicrous Voltage Battery Buffer", 6, "", 16).getStackForm(1L)); - ItemList.Battery_Buffer_4by4_ZPM.set(new GT_MetaTileEntity_BasicBatteryBuffer(197, "batterybuffer.16.tier.07", "ZPM Voltage Battery Buffer", 7, "", 16).getStackForm(1L)); - ItemList.Battery_Buffer_4by4_UV.set(new GT_MetaTileEntity_BasicBatteryBuffer(198, "batterybuffer.16.tier.08", "Ultimate Voltage Battery Buffer", 8, "", 16).getStackForm(1L)); - ItemList.Battery_Buffer_4by4_MAX.set(new GT_MetaTileEntity_BasicBatteryBuffer(199, "batterybuffer.16.tier.09", "Highly Ultimate Voltage Battery Buffer", 9, "", 16).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_4by4_ULV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_ULV, 'W', OrePrefixes.wireGt16.get(Materials.Lead), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_4by4_LV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_LV, 'W', OrePrefixes.wireGt16.get(Materials.Tin), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_4by4_MV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_MV, 'W', OrePrefixes.wireGt16.get(Materials.AnyCopper), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_4by4_HV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_HV, 'W', OrePrefixes.wireGt16.get(Materials.Gold), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_4by4_EV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_EV, 'W', OrePrefixes.wireGt16.get(Materials.Aluminium), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_4by4_IV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_IV, 'W', OrePrefixes.wireGt16.get(Materials.Tungsten), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_4by4_LuV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_LuV, 'W', OrePrefixes.wireGt16.get(Materials.VanadiumGallium), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_4by4_ZPM.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_ZPM, 'W', OrePrefixes.wireGt16.get(Materials.Naquadah), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_4by4_UV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_UV, 'W', OrePrefixes.wireGt16.get(Materials.NaquadahAlloy), 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_4by4_MAX.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, 'M', ItemList.Hull_MAX, 'W', OrePrefixes.wireGt16.get(Materials.SuperconductorUHV), 'T', OreDictNames.craftingChest}); - - ItemList.Battery_Charger_4by4_ULV.set(new GT_MetaTileEntity_Charger(690, "batterycharger.16.tier.00", "Ultra Low Voltage Battery Charger", 0, "Each battery gives 8A in/4A out (min 4A/2A)", 4).getStackForm(1L)); - ItemList.Battery_Charger_4by4_LV.set(new GT_MetaTileEntity_Charger(691, "batterycharger.16.tier.01", "Low Voltage Battery Charger", 1, "Each battery gives 8A in/4A out (min 4A/2A)", 4).getStackForm(1L)); - ItemList.Battery_Charger_4by4_MV.set(new GT_MetaTileEntity_Charger(692, "batterycharger.16.tier.02", "Medium Voltage Battery Charger", 2, "Each battery gives 8A in/4A out (min 4A/2A)", 4).getStackForm(1L)); - ItemList.Battery_Charger_4by4_HV.set(new GT_MetaTileEntity_Charger(693, "batterycharger.16.tier.03", "High Voltage Battery Charger", 3, "Each battery gives 8A in/4A out (min 4A/2A)", 4).getStackForm(1L)); - ItemList.Battery_Charger_4by4_EV.set(new GT_MetaTileEntity_Charger(694, "batterycharger.16.tier.04", "Extreme Voltage Battery Charger", 4, "Each battery gives 8A in/4A out (min 4A/2A)", 4).getStackForm(1L)); - ItemList.Battery_Charger_4by4_IV.set(new GT_MetaTileEntity_Charger(695, "batterycharger.16.tier.05", "Insane Voltage Battery Charger", 5, "Each battery gives 8A in/4A out (min 4A/2A)", 4).getStackForm(1L)); - ItemList.Battery_Charger_4by4_LuV.set(new GT_MetaTileEntity_Charger(696, "batterycharger.16.tier.06", "Ludicrous Voltage Battery Charger", 6, "Each battery gives 8A in/4A out (min 4A/2A)", 4).getStackForm(1L)); - ItemList.Battery_Charger_4by4_ZPM.set(new GT_MetaTileEntity_Charger(697, "batterycharger.16.tier.07", "ZPM Voltage Battery Charger", 7, "Each battery gives 8A in/4A out (min 4A/2A)", 4).getStackForm(1L)); - ItemList.Battery_Charger_4by4_UV.set(new GT_MetaTileEntity_Charger(698, "batterycharger.16.tier.08", "Ultimate Voltage Battery Charger", 8, "Each battery gives 8A in/4A out (min 4A/2A)", 4).getStackForm(1L)); - ItemList.Battery_Charger_4by4_MAX.set(new GT_MetaTileEntity_Charger(699, "batterycharger.16.tier.09", "Highly Ultimate Voltage Battery Charger", 9, "Each battery gives 8A in/4A out (min 4A/2A)", 4).getStackForm(1L)); + ItemList.Hatch_Input_Bus_ULV.set( + new GT_MetaTileEntity_Hatch_InputBus(70, "hatch.input_bus.tier.00", "Input Bus (ULV)", 0) + .getStackForm(1L)); + ItemList.Hatch_Input_Bus_LV.set( + new GT_MetaTileEntity_Hatch_InputBus(71, "hatch.input_bus.tier.01", "Input Bus (LV)", 1) + .getStackForm(1L)); + ItemList.Hatch_Input_Bus_MV.set( + new GT_MetaTileEntity_Hatch_InputBus(72, "hatch.input_bus.tier.02", "Input Bus (MV)", 2) + .getStackForm(1L)); + ItemList.Hatch_Input_Bus_HV.set( + new GT_MetaTileEntity_Hatch_InputBus(73, "hatch.input_bus.tier.03", "Input Bus (HV)", 3) + .getStackForm(1L)); + ItemList.Hatch_Input_Bus_EV.set( + new GT_MetaTileEntity_Hatch_InputBus(74, "hatch.input_bus.tier.04", "Input Bus (EV)", 4) + .getStackForm(1L)); + ItemList.Hatch_Input_Bus_IV.set( + new GT_MetaTileEntity_Hatch_InputBus(75, "hatch.input_bus.tier.05", "Input Bus (IV)", 5) + .getStackForm(1L)); + ItemList.Hatch_Input_Bus_LuV.set( + new GT_MetaTileEntity_Hatch_InputBus(76, "hatch.input_bus.tier.06", "Input Bus (LuV)", 6) + .getStackForm(1L)); + ItemList.Hatch_Input_Bus_ZPM.set( + new GT_MetaTileEntity_Hatch_InputBus(77, "hatch.input_bus.tier.07", "Input Bus (ZPM)", 7) + .getStackForm(1L)); + ItemList.Hatch_Input_Bus_UV.set( + new GT_MetaTileEntity_Hatch_InputBus(78, "hatch.input_bus.tier.08", "Input Bus (UV)", 8) + .getStackForm(1L)); + ItemList.Hatch_Input_Bus_MAX.set( + new GT_MetaTileEntity_Hatch_InputBus(79, "hatch.input_bus.tier.09", "Input Bus (UHV)", 9) + .getStackForm(1L)); + + ItemList.Hatch_Output_Bus_ULV.set( + new GT_MetaTileEntity_Hatch_OutputBus(80, "hatch.output_bus.tier.00", "Output Bus (ULV)", 0) + .getStackForm(1L)); + ItemList.Hatch_Output_Bus_LV.set( + new GT_MetaTileEntity_Hatch_OutputBus(81, "hatch.output_bus.tier.01", "Output Bus (LV)", 1) + .getStackForm(1L)); + ItemList.Hatch_Output_Bus_MV.set( + new GT_MetaTileEntity_Hatch_OutputBus(82, "hatch.output_bus.tier.02", "Output Bus (MV)", 2) + .getStackForm(1L)); + ItemList.Hatch_Output_Bus_HV.set( + new GT_MetaTileEntity_Hatch_OutputBus(83, "hatch.output_bus.tier.03", "Output Bus (HV)", 3) + .getStackForm(1L)); + ItemList.Hatch_Output_Bus_EV.set( + new GT_MetaTileEntity_Hatch_OutputBus(84, "hatch.output_bus.tier.04", "Output Bus (EV)", 4) + .getStackForm(1L)); + ItemList.Hatch_Output_Bus_IV.set( + new GT_MetaTileEntity_Hatch_OutputBus(85, "hatch.output_bus.tier.05", "Output Bus (IV)", 5) + .getStackForm(1L)); + ItemList.Hatch_Output_Bus_LuV.set( + new GT_MetaTileEntity_Hatch_OutputBus(86, "hatch.output_bus.tier.06", "Output Bus (LuV)", 6) + .getStackForm(1L)); + ItemList.Hatch_Output_Bus_ZPM.set( + new GT_MetaTileEntity_Hatch_OutputBus(87, "hatch.output_bus.tier.07", "Output Bus (ZPM)", 7) + .getStackForm(1L)); + ItemList.Hatch_Output_Bus_UV.set( + new GT_MetaTileEntity_Hatch_OutputBus(88, "hatch.output_bus.tier.08", "Output Bus (UV)", 8) + .getStackForm(1L)); + ItemList.Hatch_Output_Bus_MAX.set( + new GT_MetaTileEntity_Hatch_OutputBus(89, "hatch.output_bus.tier.09", "Output Bus (UHV)", 9) + .getStackForm(1L)); + + ItemList.Hatch_Maintenance.set( + new GT_MetaTileEntity_Hatch_Maintenance(90, "hatch.maintenance", "Maintenance Hatch", 1) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe( + ItemList.Hatch_Maintenance.get(1L), bitsd, new Object[] {"dwx", "hMc", "fsr", 'M', ItemList.Hull_LV}); + GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Maintenance.get(1L), bitsd, new Object[] { + "dwx", + "hMC", + "fsr", + 'M', + ItemList.Hull_LV, + 'C', + GT_ModHandler.getModItem("Railcraft", "tool.crowbar", 1L, 0) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Maintenance.get(1L), bitsd, new Object[] { + "dwx", + "hMC", + "fsr", + 'M', + ItemList.Hull_LV, + 'C', + GT_ModHandler.getModItem("Railcraft", "tool.crowbar.reinforced", 1L, 0) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Maintenance.get(1L), bitsd, new Object[] { + "dwx", + "hMC", + "fsr", + 'M', + ItemList.Hull_LV, + 'C', + GT_ModHandler.getModItem("Railcraft", "tool.crowbar.magic", 1L, 0) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Maintenance.get(1L), bitsd, new Object[] { + "dwx", + "hMC", + "fsr", + 'M', + ItemList.Hull_LV, + 'C', + GT_ModHandler.getModItem("Railcraft", "tool.crowbar.void", 1L, 0) + }); + + ItemList.Hatch_AutoMaintenance.set(new GT_MetaTileEntity_Hatch_Maintenance( + 111, "hatch.maintenance.auto", "Auto Maintenance Hatch", 6, true) + .getStackForm(1L)); + ItemList.Hatch_DataAccess_EV.set( + new GT_MetaTileEntity_Hatch_DataAccess(145, "hatch.dataaccess", "Data Access Hatch", 4) + .getStackForm(1L)); + ItemList.Hatch_DataAccess_LuV.set( + new GT_MetaTileEntity_Hatch_DataAccess(146, "hatch.dataaccess.adv", "Advanced Data Access Hatch", 6) + .getStackForm(1L)); + ItemList.Hatch_DataAccess_UV.set( + new GT_MetaTileEntity_Hatch_DataAccess(147, "hatch.dataaccess.auto", "Automatable Data Access Hatch", 8) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Hatch_DataAccess_EV.get(1L), bitsd, new Object[] { + "COC", + "OMO", + "COC", + 'M', + ItemList.Hull_EV, + 'O', + ItemList.Tool_DataStick, + 'C', + OrePrefixes.circuit.get(Materials.Elite) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Hatch_DataAccess_LuV.get(1L), bitsd, new Object[] { + "COC", + "OMO", + "COC", + 'M', + ItemList.Hull_LuV, + 'O', + ItemList.Tool_DataOrb, + 'C', + OrePrefixes.circuit.get(Materials.Ultimate) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Hatch_DataAccess_UV.get(1L), bitsd, new Object[] { + "CRC", + "OMO", + "CRC", + 'M', + ItemList.Hull_UV, + 'O', + ItemList.Tool_DataOrb, + 'C', + OrePrefixes.circuit.get(Materials.Infinite), + 'R', + ItemList.Robot_Arm_UV + }); + + GT_ModHandler.addCraftingRecipe(ItemList.Hatch_AutoMaintenance.get(1L), bitsd, new Object[] { + "CHC", + "AMA", + "CHC", + 'M', + ItemList.Hull_LuV, + 'H', + ItemList.Hatch_Maintenance, + 'A', + ItemList.Robot_Arm_LuV, + 'C', + OrePrefixes.circuit.get(Materials.Ultimate) + }); + + ItemList.Hatch_Muffler_LV.set( + new GT_MetaTileEntity_Hatch_Muffler(91, "hatch.muffler.tier.01", "Muffler Hatch (LV)", 1) + .getStackForm(1L)); + ItemList.Hatch_Muffler_MV.set( + new GT_MetaTileEntity_Hatch_Muffler(92, "hatch.muffler.tier.02", "Muffler Hatch (MV)", 2) + .getStackForm(1L)); + ItemList.Hatch_Muffler_HV.set( + new GT_MetaTileEntity_Hatch_Muffler(93, "hatch.muffler.tier.03", "Muffler Hatch (HV)", 3) + .getStackForm(1L)); + ItemList.Hatch_Muffler_EV.set( + new GT_MetaTileEntity_Hatch_Muffler(94, "hatch.muffler.tier.04", "Muffler Hatch (EV)", 4) + .getStackForm(1L)); + ItemList.Hatch_Muffler_IV.set( + new GT_MetaTileEntity_Hatch_Muffler(95, "hatch.muffler.tier.05", "Muffler Hatch (IV)", 5) + .getStackForm(1L)); + ItemList.Hatch_Muffler_LuV.set( + new GT_MetaTileEntity_Hatch_Muffler(96, "hatch.muffler.tier.06", "Muffler Hatch (LuV)", 6) + .getStackForm(1L)); + ItemList.Hatch_Muffler_ZPM.set( + new GT_MetaTileEntity_Hatch_Muffler(97, "hatch.muffler.tier.07", "Muffler Hatch (ZPM)", 7) + .getStackForm(1L)); + ItemList.Hatch_Muffler_UV.set( + new GT_MetaTileEntity_Hatch_Muffler(98, "hatch.muffler.tier.08", "Muffler Hatch (UV)", 8) + .getStackForm(1L)); + ItemList.Hatch_Muffler_MAX.set( + new GT_MetaTileEntity_Hatch_Muffler(99, "hatch.muffler.tier.09", "Muffler Hatch (UHV)", 9) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Muffler_LV.get(1L), bitsd, new Object[] { + "MX ", + "PR ", + 'M', + ItemList.Hull_LV, + 'P', + OrePrefixes.pipeMedium.get(Materials.Bronze), + 'R', + OrePrefixes.rotor.get(Materials.Bronze), + 'X', + ItemList.Electric_Motor_LV + }); + GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Muffler_MV.get(1L), bitsd, new Object[] { + "MX ", + "PR ", + 'M', + ItemList.Hull_MV, + 'P', + OrePrefixes.pipeMedium.get(Materials.Steel), + 'R', + OrePrefixes.rotor.get(Materials.Steel), + 'X', + ItemList.Electric_Motor_MV + }); + + ItemList.Machine_Bronze_Boiler.set( + new GT_MetaTileEntity_Boiler_Bronze(100, "boiler.bronze", "Small Coal Boiler").getStackForm(1L)); + ItemList.Machine_Steel_Boiler.set( + new GT_MetaTileEntity_Boiler_Steel(101, "boiler.steel", "High Pressure Coal Boiler").getStackForm(1L)); + ItemList.Machine_Steel_Boiler_Lava.set( + new GT_MetaTileEntity_Boiler_Lava(102, "boiler.lava", "High Pressure Lava Boiler").getStackForm(1L)); + ItemList.Machine_Bronze_Boiler_Solar.set( + new GT_MetaTileEntity_Boiler_Solar(105, "boiler.solar", "Simple Solar Boiler").getStackForm(1L)); + ItemList.Machine_HP_Solar.set( + new GT_MetaTileEntity_Boiler_Solar_Steel(114, "boiler.steel.solar", "High Pressure Solar Boiler") + .getStackForm(1L)); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_Bronze_Boiler.get(1L), bits, new Object[] { + aTextPlate, + "PwP", + "BFB", + 'F', + OreDictNames.craftingIronFurnace, + 'P', + OrePrefixes.plate.get(Materials.Bronze), + 'B', + new ItemStack(Blocks.brick_block, 1) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_Steel_Boiler.get(1L), bits, new Object[] { + aTextPlate, + "PwP", + "BFB", + 'F', + OreDictNames.craftingIronFurnace, + 'P', + OrePrefixes.plate.get(Materials.Steel), + 'B', + new ItemStack(Blocks.brick_block, 1) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_Steel_Boiler_Lava.get(1L), bits, new Object[] { + aTextPlate, + "PTP", + aTextPlateMotor, + 'M', + ItemList.Hull_HP, + 'P', + OrePrefixes.plate.get(Materials.Steel), + 'T', + GT_ModHandler.getModItem("BuildCraft|Factory", "tankBlock", 1L, 0) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_Bronze_Boiler_Solar.get(1L), bits, new Object[] { + "GGG", + "SSS", + aTextPlateMotor, + 'M', + ItemList.Hull_Bronze_Bricks, + 'P', + OrePrefixes.pipeSmall.get(Materials.Bronze), + 'S', + OrePrefixes.plateDouble.get(Materials.Silver), + 'G', + new ItemStack(Blocks.glass, 1) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_HP_Solar.get(1L), bits, new Object[] { + "GGG", + "SSS", + aTextPlateMotor, + 'M', + ItemList.Hull_HP_Bricks, + 'P', + OrePrefixes.pipeSmall.get(Materials.Steel), + 'S', + OrePrefixes.plateTriple.get(Materials.Silver), + 'G', + GT_ModHandler.getModItem("IC2", "blockAlloyGlass", 1L) + }); + + ItemList.Machine_Bronze_BlastFurnace.set(new GT_MetaTileEntity_BronzeBlastFurnace( + 108, "bronzemachine.blastfurnace", "Bronze Plated Blast Furnace") + .getStackForm(1L)); + ItemList.Machine_Bronze_Furnace.set( + new GT_MetaTileEntity_Furnace_Bronze(103, "bronzemachine.furnace", "Steam Furnace").getStackForm(1L)); + ItemList.Machine_HP_Furnace.set( + new GT_MetaTileEntity_Furnace_Steel(104, "hpmachine.furnace", "High Pressure Furnace") + .getStackForm(1L)); + ItemList.Machine_Bronze_Macerator.set( + new GT_MetaTileEntity_Macerator_Bronze(106, "bronzemachine.macerator", "Steam Macerator") + .getStackForm(1L)); + ItemList.Machine_HP_Macerator.set( + new GT_MetaTileEntity_Macerator_Steel(107, "hpmachine.macerator", "High Pressure Macerator") + .getStackForm(1L)); + ItemList.Machine_Bronze_Extractor.set( + new GT_MetaTileEntity_Extractor_Bronze(109, "bronzemachine.extractor", "Steam Extractor") + .getStackForm(1L)); + ItemList.Machine_HP_Extractor.set( + new GT_MetaTileEntity_Extractor_Steel(110, "hpmachine.extractor", "High Pressure Extractor") + .getStackForm(1L)); + ItemList.Machine_Bronze_Hammer.set( + new GT_MetaTileEntity_ForgeHammer_Bronze(112, "bronzemachine.hammer", "Steam Forge Hammer") + .getStackForm(1L)); + ItemList.Machine_HP_Hammer.set( + new GT_MetaTileEntity_ForgeHammer_Steel(113, "hpmachine.hammer", "High Pressure Forge Hammer") + .getStackForm(1L)); + ItemList.Machine_Bronze_Compressor.set( + new GT_MetaTileEntity_Compressor_Bronze(115, "bronzemachine.compressor", "Steam Compressor") + .getStackForm(1L)); + ItemList.Machine_HP_Compressor.set( + new GT_MetaTileEntity_Compressor_Steel(116, "hpmachine.compressor", "High Pressure Compressor") + .getStackForm(1L)); + ItemList.Machine_Bronze_AlloySmelter.set( + new GT_MetaTileEntity_AlloySmelter_Bronze(118, "bronzemachine.alloysmelter", "Steam Alloy Smelter") + .getStackForm(1L)); + ItemList.Machine_HP_AlloySmelter.set( + new GT_MetaTileEntity_AlloySmelter_Steel(119, "hpmachine.alloysmelter", "High Pressure Alloy Smelter") + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Machine_Bronze_Furnace.get(1L), bits, new Object[] { + "XXX", + "XMX", + "XFX", + 'M', + ItemList.Hull_Bronze_Bricks, + 'X', + OrePrefixes.pipeSmall.get(Materials.Bronze), + 'F', + OreDictNames.craftingFurnace + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_HP_Furnace.get(1L), bits, new Object[] { + "XSX", + "PMP", + "XXX", + 'M', + ItemList.Machine_Bronze_Furnace, + 'X', + OrePrefixes.pipeSmall.get(Materials.WroughtIron), + 'P', + OrePrefixes.plate.get(Materials.WroughtIron), + 'S', + OrePrefixes.plate.get(Materials.Steel) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_Bronze_Macerator.get(1L), bits, new Object[] { + "DXD", + "XMX", + "PXP", + 'M', + ItemList.Hull_Bronze, + 'X', + OrePrefixes.pipeSmall.get(Materials.Bronze), + 'P', + OreDictNames.craftingPiston, + 'D', + OrePrefixes.gem.get(Materials.Diamond) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_HP_Macerator.get(1L), bits, new Object[] { + "PSP", + "XMX", + "PPP", + 'M', + ItemList.Machine_Bronze_Macerator, + 'X', + OrePrefixes.pipeSmall.get(Materials.WroughtIron), + 'P', + OrePrefixes.plate.get(Materials.WroughtIron), + 'S', + OrePrefixes.plate.get(Materials.Steel) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_Bronze_Extractor.get(1L), bits, new Object[] { + "XXX", + "PMG", + "XXX", + 'M', + ItemList.Hull_Bronze, + 'X', + OrePrefixes.pipeSmall.get(Materials.Bronze), + 'P', + OreDictNames.craftingPiston, + 'G', + new ItemStack(Blocks.glass, 1) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_HP_Extractor.get(1L), bits, new Object[] { + "XSX", + "PMP", + "XXX", + 'M', + ItemList.Machine_Bronze_Extractor, + 'X', + OrePrefixes.pipeSmall.get(Materials.WroughtIron), + 'P', + OrePrefixes.plate.get(Materials.WroughtIron), + 'S', + OrePrefixes.plate.get(Materials.Steel) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_Bronze_Hammer.get(1L), bits, new Object[] { + "XPX", + "XMX", + "XAX", + 'M', + ItemList.Hull_Bronze, + 'X', + OrePrefixes.pipeSmall.get(Materials.Bronze), + 'P', + OreDictNames.craftingPiston, + 'A', + OreDictNames.craftingAnvil + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_HP_Hammer.get(1L), bits, new Object[] { + "PSP", + "XMX", + "PPP", + 'M', + ItemList.Machine_Bronze_Hammer, + 'X', + OrePrefixes.pipeSmall.get(Materials.WroughtIron), + 'P', + OrePrefixes.plate.get(Materials.WroughtIron), + 'S', + OrePrefixes.plate.get(Materials.Steel) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_Bronze_Compressor.get(1L), bits, new Object[] { + "XXX", + aTextPlateMotor, + "XXX", + 'M', + ItemList.Hull_Bronze, + 'X', + OrePrefixes.pipeSmall.get(Materials.Bronze), + 'P', + OreDictNames.craftingPiston + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_HP_Compressor.get(1L), bits, new Object[] { + "XSX", + "PMP", + "XXX", + 'M', + ItemList.Machine_Bronze_Compressor, + 'X', + OrePrefixes.pipeSmall.get(Materials.WroughtIron), + 'P', + OrePrefixes.plate.get(Materials.WroughtIron), + 'S', + OrePrefixes.plate.get(Materials.Steel) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_Bronze_AlloySmelter.get(1L), bits, new Object[] { + "XXX", + "FMF", + "XXX", + 'M', + ItemList.Hull_Bronze_Bricks, + 'X', + OrePrefixes.pipeSmall.get(Materials.Bronze), + 'F', + OreDictNames.craftingFurnace + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_HP_AlloySmelter.get(1L), bits, new Object[] { + "PSP", + "PMP", + "PXP", + 'M', + ItemList.Machine_Bronze_AlloySmelter, + 'X', + OrePrefixes.pipeSmall.get(Materials.WroughtIron), + 'P', + OrePrefixes.plate.get(Materials.WroughtIron), + 'S', + OrePrefixes.plate.get(Materials.Steel) + }); + + ItemList.Locker_ULV.set( + new GT_MetaTileEntity_Locker(150, "locker.tier.00", "Ultra Low Voltage Locker", 0).getStackForm(1L)); + ItemList.Locker_LV.set( + new GT_MetaTileEntity_Locker(151, "locker.tier.01", "Low Voltage Locker", 1).getStackForm(1L)); + ItemList.Locker_MV.set( + new GT_MetaTileEntity_Locker(152, "locker.tier.02", "Medium Voltage Locker", 2).getStackForm(1L)); + ItemList.Locker_HV.set( + new GT_MetaTileEntity_Locker(153, "locker.tier.03", "High Voltage Locker", 3).getStackForm(1L)); + ItemList.Locker_EV.set( + new GT_MetaTileEntity_Locker(154, "locker.tier.04", "Extreme Voltage Locker", 4).getStackForm(1L)); + ItemList.Locker_IV.set( + new GT_MetaTileEntity_Locker(155, "locker.tier.05", "Insane Voltage Locker", 5).getStackForm(1L)); + ItemList.Locker_LuV.set( + new GT_MetaTileEntity_Locker(156, "locker.tier.06", "Ludicrous Voltage Locker", 6).getStackForm(1L)); + ItemList.Locker_ZPM.set( + new GT_MetaTileEntity_Locker(157, "locker.tier.07", "ZPM Voltage Locker", 7).getStackForm(1L)); + ItemList.Locker_UV.set( + new GT_MetaTileEntity_Locker(158, "locker.tier.08", "Ultimate Voltage Locker", 8).getStackForm(1L)); + ItemList.Locker_MAX.set(new GT_MetaTileEntity_Locker(159, "locker.tier.09", "Highly Ultimate Voltage Locker", 9) + .getStackForm(1L)); + + ItemList.Battery_Buffer_1by1_ULV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 160, "batterybuffer.01.tier.00", "Ultra Low Voltage Battery Buffer", 0, "", 1) + .getStackForm(1L)); + ItemList.Battery_Buffer_1by1_LV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 161, "batterybuffer.01.tier.01", "Low Voltage Battery Buffer", 1, "", 1) + .getStackForm(1L)); + ItemList.Battery_Buffer_1by1_MV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 162, "batterybuffer.01.tier.02", "Medium Voltage Battery Buffer", 2, "", 1) + .getStackForm(1L)); + ItemList.Battery_Buffer_1by1_HV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 163, "batterybuffer.01.tier.03", "High Voltage Battery Buffer", 3, "", 1) + .getStackForm(1L)); + ItemList.Battery_Buffer_1by1_EV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 164, "batterybuffer.01.tier.04", "Extreme Voltage Battery Buffer", 4, "", 1) + .getStackForm(1L)); + ItemList.Battery_Buffer_1by1_IV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 165, "batterybuffer.01.tier.05", "Insane Voltage Battery Buffer", 5, "", 1) + .getStackForm(1L)); + ItemList.Battery_Buffer_1by1_LuV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 166, "batterybuffer.01.tier.06", "Ludicrous Voltage Battery Buffer", 6, "", 1) + .getStackForm(1L)); + ItemList.Battery_Buffer_1by1_ZPM.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 167, "batterybuffer.01.tier.07", "ZPM Voltage Battery Buffer", 7, "", 1) + .getStackForm(1L)); + ItemList.Battery_Buffer_1by1_UV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 168, "batterybuffer.01.tier.08", "Ultimate Voltage Battery Buffer", 8, "", 1) + .getStackForm(1L)); + ItemList.Battery_Buffer_1by1_MAX.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 169, "batterybuffer.01.tier.09", "Highly Ultimate Voltage Battery Buffer", 9, "", 1) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_1by1_ULV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_ULV, + 'W', + OrePrefixes.wireGt01.get(Materials.Lead), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_1by1_LV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_LV, + 'W', + OrePrefixes.wireGt01.get(Materials.Tin), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_1by1_MV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_MV, + 'W', + OrePrefixes.wireGt01.get(Materials.AnyCopper), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_1by1_HV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_HV, + 'W', + OrePrefixes.wireGt01.get(Materials.Gold), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_1by1_EV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_EV, + 'W', + OrePrefixes.wireGt01.get(Materials.Aluminium), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_1by1_IV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_IV, + 'W', + OrePrefixes.wireGt01.get(Materials.Tungsten), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_1by1_LuV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_LuV, + 'W', + OrePrefixes.wireGt01.get(Materials.VanadiumGallium), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_1by1_ZPM.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_ZPM, + 'W', + OrePrefixes.wireGt01.get(Materials.Naquadah), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_1by1_UV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_UV, + 'W', + OrePrefixes.wireGt01.get(Materials.NaquadahAlloy), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_1by1_MAX.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_MAX, + 'W', + OrePrefixes.wireGt01.get(Materials.SuperconductorUHV), + 'T', + OreDictNames.craftingChest + }); + + ItemList.Battery_Buffer_2by2_ULV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 170, "batterybuffer.04.tier.00", "Ultra Low Voltage Battery Buffer", 0, "", 4) + .getStackForm(1L)); + ItemList.Battery_Buffer_2by2_LV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 171, "batterybuffer.04.tier.01", "Low Voltage Battery Buffer", 1, "", 4) + .getStackForm(1L)); + ItemList.Battery_Buffer_2by2_MV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 172, "batterybuffer.04.tier.02", "Medium Voltage Battery Buffer", 2, "", 4) + .getStackForm(1L)); + ItemList.Battery_Buffer_2by2_HV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 173, "batterybuffer.04.tier.03", "High Voltage Battery Buffer", 3, "", 4) + .getStackForm(1L)); + ItemList.Battery_Buffer_2by2_EV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 174, "batterybuffer.04.tier.04", "Extreme Voltage Battery Buffer", 4, "", 4) + .getStackForm(1L)); + ItemList.Battery_Buffer_2by2_IV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 175, "batterybuffer.04.tier.05", "Insane Voltage Battery Buffer", 5, "", 4) + .getStackForm(1L)); + ItemList.Battery_Buffer_2by2_LuV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 176, "batterybuffer.04.tier.06", "Ludicrous Voltage Battery Buffer", 6, "", 4) + .getStackForm(1L)); + ItemList.Battery_Buffer_2by2_ZPM.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 177, "batterybuffer.04.tier.07", "ZPM Voltage Battery Buffer", 7, "", 4) + .getStackForm(1L)); + ItemList.Battery_Buffer_2by2_UV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 178, "batterybuffer.04.tier.08", "Ultimate Voltage Battery Buffer", 8, "", 4) + .getStackForm(1L)); + ItemList.Battery_Buffer_2by2_MAX.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 179, "batterybuffer.04.tier.09", "Highly Ultimate Voltage Battery Buffer", 9, "", 4) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_2by2_ULV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_ULV, + 'W', + OrePrefixes.wireGt04.get(Materials.Lead), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_2by2_LV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_LV, + 'W', + OrePrefixes.wireGt04.get(Materials.Tin), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_2by2_MV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_MV, + 'W', + OrePrefixes.wireGt04.get(Materials.AnyCopper), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_2by2_HV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_HV, + 'W', + OrePrefixes.wireGt04.get(Materials.Gold), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_2by2_EV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_EV, + 'W', + OrePrefixes.wireGt04.get(Materials.Aluminium), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_2by2_IV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_IV, + 'W', + OrePrefixes.wireGt04.get(Materials.Tungsten), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_2by2_LuV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_LuV, + 'W', + OrePrefixes.wireGt04.get(Materials.VanadiumGallium), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_2by2_ZPM.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_ZPM, + 'W', + OrePrefixes.wireGt04.get(Materials.Naquadah), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_2by2_UV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_UV, + 'W', + OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_2by2_MAX.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_MAX, + 'W', + OrePrefixes.wireGt04.get(Materials.SuperconductorUHV), + 'T', + OreDictNames.craftingChest + }); + + ItemList.Battery_Buffer_3by3_ULV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 180, "batterybuffer.09.tier.00", "Ultra Low Voltage Battery Buffer", 0, "", 9) + .getStackForm(1L)); + ItemList.Battery_Buffer_3by3_LV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 181, "batterybuffer.09.tier.01", "Low Voltage Battery Buffer", 1, "", 9) + .getStackForm(1L)); + ItemList.Battery_Buffer_3by3_MV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 182, "batterybuffer.09.tier.02", "Medium Voltage Battery Buffer", 2, "", 9) + .getStackForm(1L)); + ItemList.Battery_Buffer_3by3_HV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 183, "batterybuffer.09.tier.03", "High Voltage Battery Buffer", 3, "", 9) + .getStackForm(1L)); + ItemList.Battery_Buffer_3by3_EV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 184, "batterybuffer.09.tier.04", "Extreme Voltage Battery Buffer", 4, "", 9) + .getStackForm(1L)); + ItemList.Battery_Buffer_3by3_IV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 185, "batterybuffer.09.tier.05", "Insane Voltage Battery Buffer", 5, "", 9) + .getStackForm(1L)); + ItemList.Battery_Buffer_3by3_LuV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 186, "batterybuffer.09.tier.06", "Ludicrous Voltage Battery Buffer", 6, "", 9) + .getStackForm(1L)); + ItemList.Battery_Buffer_3by3_ZPM.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 187, "batterybuffer.09.tier.07", "ZPM Voltage Battery Buffer", 7, "", 9) + .getStackForm(1L)); + ItemList.Battery_Buffer_3by3_UV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 188, "batterybuffer.09.tier.08", "Ultimate Voltage Battery Buffer", 8, "", 9) + .getStackForm(1L)); + ItemList.Battery_Buffer_3by3_MAX.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 189, "batterybuffer.09.tier.09", "Highly Ultimate Voltage Battery Buffer", 9, "", 9) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_3by3_ULV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_ULV, + 'W', + OrePrefixes.wireGt08.get(Materials.Lead), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_3by3_LV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_LV, + 'W', + OrePrefixes.wireGt08.get(Materials.Tin), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_3by3_MV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_MV, + 'W', + OrePrefixes.wireGt08.get(Materials.AnyCopper), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_3by3_HV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_HV, + 'W', + OrePrefixes.wireGt08.get(Materials.Gold), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_3by3_EV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_EV, + 'W', + OrePrefixes.wireGt08.get(Materials.Aluminium), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_3by3_IV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_IV, + 'W', + OrePrefixes.wireGt08.get(Materials.Tungsten), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_3by3_LuV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_LuV, + 'W', + OrePrefixes.wireGt08.get(Materials.VanadiumGallium), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_3by3_ZPM.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_ZPM, + 'W', + OrePrefixes.wireGt08.get(Materials.Naquadah), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_3by3_UV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_UV, + 'W', + OrePrefixes.wireGt08.get(Materials.NaquadahAlloy), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_3by3_MAX.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_MAX, + 'W', + OrePrefixes.wireGt08.get(Materials.SuperconductorUHV), + 'T', + OreDictNames.craftingChest + }); + + ItemList.Battery_Buffer_4by4_ULV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 190, "batterybuffer.16.tier.00", "Ultra Low Voltage Battery Buffer", 0, "", 16) + .getStackForm(1L)); + ItemList.Battery_Buffer_4by4_LV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 191, "batterybuffer.16.tier.01", "Low Voltage Battery Buffer", 1, "", 16) + .getStackForm(1L)); + ItemList.Battery_Buffer_4by4_MV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 192, "batterybuffer.16.tier.02", "Medium Voltage Battery Buffer", 2, "", 16) + .getStackForm(1L)); + ItemList.Battery_Buffer_4by4_HV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 193, "batterybuffer.16.tier.03", "High Voltage Battery Buffer", 3, "", 16) + .getStackForm(1L)); + ItemList.Battery_Buffer_4by4_EV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 194, "batterybuffer.16.tier.04", "Extreme Voltage Battery Buffer", 4, "", 16) + .getStackForm(1L)); + ItemList.Battery_Buffer_4by4_IV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 195, "batterybuffer.16.tier.05", "Insane Voltage Battery Buffer", 5, "", 16) + .getStackForm(1L)); + ItemList.Battery_Buffer_4by4_LuV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 196, "batterybuffer.16.tier.06", "Ludicrous Voltage Battery Buffer", 6, "", 16) + .getStackForm(1L)); + ItemList.Battery_Buffer_4by4_ZPM.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 197, "batterybuffer.16.tier.07", "ZPM Voltage Battery Buffer", 7, "", 16) + .getStackForm(1L)); + ItemList.Battery_Buffer_4by4_UV.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 198, "batterybuffer.16.tier.08", "Ultimate Voltage Battery Buffer", 8, "", 16) + .getStackForm(1L)); + ItemList.Battery_Buffer_4by4_MAX.set(new GT_MetaTileEntity_BasicBatteryBuffer( + 199, "batterybuffer.16.tier.09", "Highly Ultimate Voltage Battery Buffer", 9, "", 16) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_4by4_ULV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_ULV, + 'W', + OrePrefixes.wireGt16.get(Materials.Lead), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_4by4_LV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_LV, + 'W', + OrePrefixes.wireGt16.get(Materials.Tin), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_4by4_MV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_MV, + 'W', + OrePrefixes.wireGt16.get(Materials.AnyCopper), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_4by4_HV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_HV, + 'W', + OrePrefixes.wireGt16.get(Materials.Gold), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_4by4_EV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_EV, + 'W', + OrePrefixes.wireGt16.get(Materials.Aluminium), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_4by4_IV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_IV, + 'W', + OrePrefixes.wireGt16.get(Materials.Tungsten), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_4by4_LuV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_LuV, + 'W', + OrePrefixes.wireGt16.get(Materials.VanadiumGallium), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_4by4_ZPM.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_ZPM, + 'W', + OrePrefixes.wireGt16.get(Materials.Naquadah), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_4by4_UV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_UV, + 'W', + OrePrefixes.wireGt16.get(Materials.NaquadahAlloy), + 'T', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Buffer_4by4_MAX.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + 'M', + ItemList.Hull_MAX, + 'W', + OrePrefixes.wireGt16.get(Materials.SuperconductorUHV), + 'T', + OreDictNames.craftingChest + }); + + ItemList.Battery_Charger_4by4_ULV.set(new GT_MetaTileEntity_Charger( + 690, + "batterycharger.16.tier.00", + "Ultra Low Voltage Battery Charger", + 0, + "Each battery gives 8A in/4A out (min 4A/2A)", + 4) + .getStackForm(1L)); + ItemList.Battery_Charger_4by4_LV.set(new GT_MetaTileEntity_Charger( + 691, + "batterycharger.16.tier.01", + "Low Voltage Battery Charger", + 1, + "Each battery gives 8A in/4A out (min 4A/2A)", + 4) + .getStackForm(1L)); + ItemList.Battery_Charger_4by4_MV.set(new GT_MetaTileEntity_Charger( + 692, + "batterycharger.16.tier.02", + "Medium Voltage Battery Charger", + 2, + "Each battery gives 8A in/4A out (min 4A/2A)", + 4) + .getStackForm(1L)); + ItemList.Battery_Charger_4by4_HV.set(new GT_MetaTileEntity_Charger( + 693, + "batterycharger.16.tier.03", + "High Voltage Battery Charger", + 3, + "Each battery gives 8A in/4A out (min 4A/2A)", + 4) + .getStackForm(1L)); + ItemList.Battery_Charger_4by4_EV.set(new GT_MetaTileEntity_Charger( + 694, + "batterycharger.16.tier.04", + "Extreme Voltage Battery Charger", + 4, + "Each battery gives 8A in/4A out (min 4A/2A)", + 4) + .getStackForm(1L)); + ItemList.Battery_Charger_4by4_IV.set(new GT_MetaTileEntity_Charger( + 695, + "batterycharger.16.tier.05", + "Insane Voltage Battery Charger", + 5, + "Each battery gives 8A in/4A out (min 4A/2A)", + 4) + .getStackForm(1L)); + ItemList.Battery_Charger_4by4_LuV.set(new GT_MetaTileEntity_Charger( + 696, + "batterycharger.16.tier.06", + "Ludicrous Voltage Battery Charger", + 6, + "Each battery gives 8A in/4A out (min 4A/2A)", + 4) + .getStackForm(1L)); + ItemList.Battery_Charger_4by4_ZPM.set(new GT_MetaTileEntity_Charger( + 697, + "batterycharger.16.tier.07", + "ZPM Voltage Battery Charger", + 7, + "Each battery gives 8A in/4A out (min 4A/2A)", + 4) + .getStackForm(1L)); + ItemList.Battery_Charger_4by4_UV.set(new GT_MetaTileEntity_Charger( + 698, + "batterycharger.16.tier.08", + "Ultimate Voltage Battery Charger", + 8, + "Each battery gives 8A in/4A out (min 4A/2A)", + 4) + .getStackForm(1L)); + ItemList.Battery_Charger_4by4_MAX.set(new GT_MetaTileEntity_Charger( + 699, + "batterycharger.16.tier.09", + "Highly Ultimate Voltage Battery Charger", + 9, + "Each battery gives 8A in/4A out (min 4A/2A)", + 4) + .getStackForm(1L)); { // Wireless Energy Hatches - ItemList.Wireless_Hatch_Energy_ULV.set(new GT_MetaTileEntity_Wireless_Hatch(206, "hatch.wireless.receiver.tier.00", "ULV Wireless Energy Hatch", 0).getStackForm(1L)); - ItemList.Wireless_Hatch_Energy_LV.set(new GT_MetaTileEntity_Wireless_Hatch(207, "hatch.wireless.receiver.tier.01", "LV Wireless Energy Hatch", 1).getStackForm(1L)); - ItemList.Wireless_Hatch_Energy_MV.set(new GT_MetaTileEntity_Wireless_Hatch(208, "hatch.wireless.receiver.tier.02", "MV Wireless Energy Hatch", 2).getStackForm(1L)); - ItemList.Wireless_Hatch_Energy_HV.set(new GT_MetaTileEntity_Wireless_Hatch(209, "hatch.wireless.receiver.tier.03", "HV Wireless Energy Hatch", 3).getStackForm(1L)); - ItemList.Wireless_Hatch_Energy_EV.set(new GT_MetaTileEntity_Wireless_Hatch(216, "hatch.wireless.receiver.tier.04", "EV Wireless Energy Hatch", 4).getStackForm(1L)); - ItemList.Wireless_Hatch_Energy_IV.set(new GT_MetaTileEntity_Wireless_Hatch(217, "hatch.wireless.receiver.tier.05", "IV Wireless Energy Hatch", 5).getStackForm(1L)); - ItemList.Wireless_Hatch_Energy_LuV.set(new GT_MetaTileEntity_Wireless_Hatch(218, "hatch.wireless.receiver.tier.06", "LuV Wireless Energy Hatch", 6).getStackForm(1L)); - ItemList.Wireless_Hatch_Energy_ZPM.set(new GT_MetaTileEntity_Wireless_Hatch(219, "hatch.wireless.receiver.tier.07", "ZPM Wireless Energy Hatch", 7).getStackForm(1L)); - ItemList.Wireless_Hatch_Energy_UV.set(new GT_MetaTileEntity_Wireless_Hatch(227, "hatch.wireless.receiver.tier.08", "UV Wireless Energy Hatch", 8).getStackForm(1L)); - ItemList.Wireless_Hatch_Energy_UHV.set(new GT_MetaTileEntity_Wireless_Hatch(229, "hatch.wireless.receiver.tier.09", "UHV Wireless Energy Hatch", 9).getStackForm(1L)); - ItemList.Wireless_Hatch_Energy_UEV.set(new GT_MetaTileEntity_Wireless_Hatch(266, "hatch.wireless.receiver.tier.10", "UEV Wireless Energy Hatch", 10).getStackForm(1L)); - ItemList.Wireless_Hatch_Energy_UIV.set(new GT_MetaTileEntity_Wireless_Hatch(267, "hatch.wireless.receiver.tier.11", "UIV Wireless Energy Hatch", 11).getStackForm(1L)); - ItemList.Wireless_Hatch_Energy_UMV.set(new GT_MetaTileEntity_Wireless_Hatch(268, "hatch.wireless.receiver.tier.12", "UMV Wireless Energy Hatch", 12).getStackForm(1L)); - ItemList.Wireless_Hatch_Energy_UXV.set(new GT_MetaTileEntity_Wireless_Hatch(269, "hatch.wireless.receiver.tier.13", "UXV Wireless Energy Hatch", 13).getStackForm(1L)); - ItemList.Wireless_Hatch_Energy_MAX.set(new GT_MetaTileEntity_Wireless_Hatch(286, "hatch.wireless.receiver.tier.14", "MAX Wireless Energy Hatch", 14).getStackForm(1L)); + ItemList.Wireless_Hatch_Energy_ULV.set(new GT_MetaTileEntity_Wireless_Hatch( + 206, "hatch.wireless.receiver.tier.00", "ULV Wireless Energy Hatch", 0) + .getStackForm(1L)); + ItemList.Wireless_Hatch_Energy_LV.set(new GT_MetaTileEntity_Wireless_Hatch( + 207, "hatch.wireless.receiver.tier.01", "LV Wireless Energy Hatch", 1) + .getStackForm(1L)); + ItemList.Wireless_Hatch_Energy_MV.set(new GT_MetaTileEntity_Wireless_Hatch( + 208, "hatch.wireless.receiver.tier.02", "MV Wireless Energy Hatch", 2) + .getStackForm(1L)); + ItemList.Wireless_Hatch_Energy_HV.set(new GT_MetaTileEntity_Wireless_Hatch( + 209, "hatch.wireless.receiver.tier.03", "HV Wireless Energy Hatch", 3) + .getStackForm(1L)); + ItemList.Wireless_Hatch_Energy_EV.set(new GT_MetaTileEntity_Wireless_Hatch( + 216, "hatch.wireless.receiver.tier.04", "EV Wireless Energy Hatch", 4) + .getStackForm(1L)); + ItemList.Wireless_Hatch_Energy_IV.set(new GT_MetaTileEntity_Wireless_Hatch( + 217, "hatch.wireless.receiver.tier.05", "IV Wireless Energy Hatch", 5) + .getStackForm(1L)); + ItemList.Wireless_Hatch_Energy_LuV.set(new GT_MetaTileEntity_Wireless_Hatch( + 218, "hatch.wireless.receiver.tier.06", "LuV Wireless Energy Hatch", 6) + .getStackForm(1L)); + ItemList.Wireless_Hatch_Energy_ZPM.set(new GT_MetaTileEntity_Wireless_Hatch( + 219, "hatch.wireless.receiver.tier.07", "ZPM Wireless Energy Hatch", 7) + .getStackForm(1L)); + ItemList.Wireless_Hatch_Energy_UV.set(new GT_MetaTileEntity_Wireless_Hatch( + 227, "hatch.wireless.receiver.tier.08", "UV Wireless Energy Hatch", 8) + .getStackForm(1L)); + ItemList.Wireless_Hatch_Energy_UHV.set(new GT_MetaTileEntity_Wireless_Hatch( + 229, "hatch.wireless.receiver.tier.09", "UHV Wireless Energy Hatch", 9) + .getStackForm(1L)); + ItemList.Wireless_Hatch_Energy_UEV.set(new GT_MetaTileEntity_Wireless_Hatch( + 266, "hatch.wireless.receiver.tier.10", "UEV Wireless Energy Hatch", 10) + .getStackForm(1L)); + ItemList.Wireless_Hatch_Energy_UIV.set(new GT_MetaTileEntity_Wireless_Hatch( + 267, "hatch.wireless.receiver.tier.11", "UIV Wireless Energy Hatch", 11) + .getStackForm(1L)); + ItemList.Wireless_Hatch_Energy_UMV.set(new GT_MetaTileEntity_Wireless_Hatch( + 268, "hatch.wireless.receiver.tier.12", "UMV Wireless Energy Hatch", 12) + .getStackForm(1L)); + ItemList.Wireless_Hatch_Energy_UXV.set(new GT_MetaTileEntity_Wireless_Hatch( + 269, "hatch.wireless.receiver.tier.13", "UXV Wireless Energy Hatch", 13) + .getStackForm(1L)); + ItemList.Wireless_Hatch_Energy_MAX.set(new GT_MetaTileEntity_Wireless_Hatch( + 286, "hatch.wireless.receiver.tier.14", "MAX Wireless Energy Hatch", 14) + .getStackForm(1L)); // Wireless Dynamo Hatches - ItemList.Wireless_Dynamo_Energy_ULV.set(new GT_MetaTileEntity_Wireless_Dynamo(287, "hatch.wireless.transmitter.tier.00", "ULV Wireless Energy Dynamo", 0).getStackForm(1L)); - ItemList.Wireless_Dynamo_Energy_LV.set(new GT_MetaTileEntity_Wireless_Dynamo(288, "hatch.wireless.transmitter.tier.01", "LV Wireless Energy Dynamo", 1).getStackForm(1L)); - ItemList.Wireless_Dynamo_Energy_MV.set(new GT_MetaTileEntity_Wireless_Dynamo(289, "hatch.wireless.transmitter.tier.02", "MV Wireless Energy Dynamo", 2).getStackForm(1L)); - ItemList.Wireless_Dynamo_Energy_HV.set(new GT_MetaTileEntity_Wireless_Dynamo(296, "hatch.wireless.transmitter.tier.03", "HV Wireless Energy Dynamo", 3).getStackForm(1L)); - ItemList.Wireless_Dynamo_Energy_EV.set(new GT_MetaTileEntity_Wireless_Dynamo(297, "hatch.wireless.transmitter.tier.04", "EV Wireless Energy Dynamo", 4).getStackForm(1L)); - ItemList.Wireless_Dynamo_Energy_IV.set(new GT_MetaTileEntity_Wireless_Dynamo(298, "hatch.wireless.transmitter.tier.05", "IV Wireless Energy Dynamo", 5).getStackForm(1L)); - ItemList.Wireless_Dynamo_Energy_LuV.set(new GT_MetaTileEntity_Wireless_Dynamo(299, "hatch.wireless.transmitter.tier.06", "LuV Wireless Energy Dynamo", 6).getStackForm(1L)); - ItemList.Wireless_Dynamo_Energy_ZPM.set(new GT_MetaTileEntity_Wireless_Dynamo(310, "hatch.wireless.transmitter.tier.07", "ZPM Wireless Energy Dynamo", 7).getStackForm(1L)); - ItemList.Wireless_Dynamo_Energy_UV.set(new GT_MetaTileEntity_Wireless_Dynamo(316, "hatch.wireless.transmitter.tier.08", "UV Wireless Energy Dynamo", 8).getStackForm(1L)); - ItemList.Wireless_Dynamo_Energy_UHV.set(new GT_MetaTileEntity_Wireless_Dynamo(317, "hatch.wireless.transmitter.tier.09", "UHV Wireless Energy Dynamo", 9).getStackForm(1L)); - ItemList.Wireless_Dynamo_Energy_UEV.set(new GT_MetaTileEntity_Wireless_Dynamo(318, "hatch.wireless.transmitter.tier.10", "UEV Wireless Energy Dynamo", 10).getStackForm(1L)); - ItemList.Wireless_Dynamo_Energy_UIV.set(new GT_MetaTileEntity_Wireless_Dynamo(319, "hatch.wireless.transmitter.tier.11", "UIV Wireless Energy Dynamo", 11).getStackForm(1L)); - ItemList.Wireless_Dynamo_Energy_UMV.set(new GT_MetaTileEntity_Wireless_Dynamo(346, "hatch.wireless.transmitter.tier.12", "UMV Wireless Energy Dynamo", 12).getStackForm(1L)); - ItemList.Wireless_Dynamo_Energy_UXV.set(new GT_MetaTileEntity_Wireless_Dynamo(347, "hatch.wireless.transmitter.tier.13", "UXV Wireless Energy Dynamo", 13).getStackForm(1L)); - ItemList.Wireless_Dynamo_Energy_MAX.set(new GT_MetaTileEntity_Wireless_Dynamo(348, "hatch.wireless.transmitter.tier.14", "MAX Wireless Energy Dynamo", 14).getStackForm(1L)); - + ItemList.Wireless_Dynamo_Energy_ULV.set(new GT_MetaTileEntity_Wireless_Dynamo( + 287, "hatch.wireless.transmitter.tier.00", "ULV Wireless Energy Dynamo", 0) + .getStackForm(1L)); + ItemList.Wireless_Dynamo_Energy_LV.set(new GT_MetaTileEntity_Wireless_Dynamo( + 288, "hatch.wireless.transmitter.tier.01", "LV Wireless Energy Dynamo", 1) + .getStackForm(1L)); + ItemList.Wireless_Dynamo_Energy_MV.set(new GT_MetaTileEntity_Wireless_Dynamo( + 289, "hatch.wireless.transmitter.tier.02", "MV Wireless Energy Dynamo", 2) + .getStackForm(1L)); + ItemList.Wireless_Dynamo_Energy_HV.set(new GT_MetaTileEntity_Wireless_Dynamo( + 296, "hatch.wireless.transmitter.tier.03", "HV Wireless Energy Dynamo", 3) + .getStackForm(1L)); + ItemList.Wireless_Dynamo_Energy_EV.set(new GT_MetaTileEntity_Wireless_Dynamo( + 297, "hatch.wireless.transmitter.tier.04", "EV Wireless Energy Dynamo", 4) + .getStackForm(1L)); + ItemList.Wireless_Dynamo_Energy_IV.set(new GT_MetaTileEntity_Wireless_Dynamo( + 298, "hatch.wireless.transmitter.tier.05", "IV Wireless Energy Dynamo", 5) + .getStackForm(1L)); + ItemList.Wireless_Dynamo_Energy_LuV.set(new GT_MetaTileEntity_Wireless_Dynamo( + 299, "hatch.wireless.transmitter.tier.06", "LuV Wireless Energy Dynamo", 6) + .getStackForm(1L)); + ItemList.Wireless_Dynamo_Energy_ZPM.set(new GT_MetaTileEntity_Wireless_Dynamo( + 310, "hatch.wireless.transmitter.tier.07", "ZPM Wireless Energy Dynamo", 7) + .getStackForm(1L)); + ItemList.Wireless_Dynamo_Energy_UV.set(new GT_MetaTileEntity_Wireless_Dynamo( + 316, "hatch.wireless.transmitter.tier.08", "UV Wireless Energy Dynamo", 8) + .getStackForm(1L)); + ItemList.Wireless_Dynamo_Energy_UHV.set(new GT_MetaTileEntity_Wireless_Dynamo( + 317, "hatch.wireless.transmitter.tier.09", "UHV Wireless Energy Dynamo", 9) + .getStackForm(1L)); + ItemList.Wireless_Dynamo_Energy_UEV.set(new GT_MetaTileEntity_Wireless_Dynamo( + 318, "hatch.wireless.transmitter.tier.10", "UEV Wireless Energy Dynamo", 10) + .getStackForm(1L)); + ItemList.Wireless_Dynamo_Energy_UIV.set(new GT_MetaTileEntity_Wireless_Dynamo( + 319, "hatch.wireless.transmitter.tier.11", "UIV Wireless Energy Dynamo", 11) + .getStackForm(1L)); + ItemList.Wireless_Dynamo_Energy_UMV.set(new GT_MetaTileEntity_Wireless_Dynamo( + 346, "hatch.wireless.transmitter.tier.12", "UMV Wireless Energy Dynamo", 12) + .getStackForm(1L)); + ItemList.Wireless_Dynamo_Energy_UXV.set(new GT_MetaTileEntity_Wireless_Dynamo( + 347, "hatch.wireless.transmitter.tier.13", "UXV Wireless Energy Dynamo", 13) + .getStackForm(1L)); + ItemList.Wireless_Dynamo_Energy_MAX.set(new GT_MetaTileEntity_Wireless_Dynamo( + 348, "hatch.wireless.transmitter.tier.14", "MAX Wireless Energy Dynamo", 14) + .getStackForm(1L)); } - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Charger_4by4_ULV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, "BCB", 'M', ItemList.Hull_ULV, 'W', OrePrefixes.wireGt16.get(Materials.Lead), 'T', OreDictNames.craftingChest, 'B', ItemList.Battery_RE_ULV_Tantalum, 'C', OrePrefixes.circuit.get(Materials.Primitive)}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Charger_4by4_LV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, "BCB", 'M', ItemList.Hull_LV, 'W', OrePrefixes.wireGt16.get(Materials.Tin), 'T', OreDictNames.craftingChest, 'B', ItemList.Battery_RE_LV_Lithium, 'C', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Charger_4by4_MV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, "BCB", 'M', ItemList.Hull_MV, 'W', OrePrefixes.wireGt16.get(Materials.AnyCopper), 'T', OreDictNames.craftingChest, 'B', ItemList.Battery_RE_MV_Lithium, 'C', OrePrefixes.circuit.get(Materials.Good)}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Charger_4by4_HV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, "BCB", 'M', ItemList.Hull_HV, 'W', OrePrefixes.wireGt16.get(Materials.Gold), 'T', OreDictNames.craftingChest, 'B', ItemList.Battery_RE_HV_Lithium, 'C', OrePrefixes.circuit.get(Materials.Advanced)}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Charger_4by4_EV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, "BCB", 'M', ItemList.Hull_EV, 'W', OrePrefixes.wireGt16.get(Materials.Aluminium), 'T', OreDictNames.craftingChest, 'B', OrePrefixes.battery.get(Materials.Master), 'C', OrePrefixes.circuit.get(Materials.Data)}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Charger_4by4_IV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, "BCB", 'M', ItemList.Hull_IV, 'W', OrePrefixes.wireGt16.get(Materials.Tungsten), 'T', OreDictNames.craftingChest, 'B', ItemList.Energy_LapotronicOrb, 'C', OrePrefixes.circuit.get(Materials.Elite)}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Charger_4by4_LuV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, "BCB", 'M', ItemList.Hull_LuV, 'W', OrePrefixes.wireGt16.get(Materials.VanadiumGallium), 'T', OreDictNames.craftingChest, 'B', ItemList.Energy_LapotronicOrb2, 'C', OrePrefixes.circuit.get(Materials.Master)}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Charger_4by4_ZPM.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, "BCB", 'M', ItemList.Hull_ZPM, 'W', OrePrefixes.wireGt16.get(Materials.Naquadah), 'T', OreDictNames.craftingChest, 'B', ItemList.Energy_LapotronicOrb2, 'C', OrePrefixes.circuit.get(Materials.Ultimate)}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Charger_4by4_UV.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, "BCB", 'M', ItemList.Hull_UV, 'W', OrePrefixes.wireGt16.get(Materials.NaquadahAlloy), 'T', OreDictNames.craftingChest, 'B', ItemList.ZPM2, 'C', OrePrefixes.circuit.get(Materials.SuperconductorUHV)}); - GT_ModHandler.addCraftingRecipe(ItemList.Battery_Charger_4by4_MAX.get(1L), bitsd, new Object[]{aTextWireChest, aTextWireHull, "BCB", 'M', ItemList.Hull_MAX, 'W', OrePrefixes.wireGt16.get(Materials.SuperconductorUHV), 'T', OreDictNames.craftingChest, 'B', ItemList.ZPM2, 'C', OrePrefixes.circuit.get(Materials.Infinite)}); - - GT_ModHandler.addCraftingRecipe(ItemList.Locker_ULV.get(1L), bitsd, new Object[]{"T", "M", 'M', ItemList.Battery_Buffer_2by2_ULV, 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Locker_LV.get(1L), bitsd, new Object[]{"T", "M", 'M', ItemList.Battery_Buffer_2by2_LV, 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Locker_MV.get(1L), bitsd, new Object[]{"T", "M", 'M', ItemList.Battery_Buffer_2by2_MV, 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Locker_HV.get(1L), bitsd, new Object[]{"T", "M", 'M', ItemList.Battery_Buffer_2by2_HV, 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Locker_EV.get(1L), bitsd, new Object[]{"T", "M", 'M', ItemList.Battery_Buffer_2by2_EV, 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Locker_IV.get(1L), bitsd, new Object[]{"T", "M", 'M', ItemList.Battery_Buffer_2by2_IV, 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Locker_LuV.get(1L), bitsd, new Object[]{"T", "M", 'M', ItemList.Battery_Buffer_2by2_LuV, 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Locker_ZPM.get(1L), bitsd, new Object[]{"T", "M", 'M', ItemList.Battery_Buffer_2by2_ZPM, 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Locker_UV.get(1L), bitsd, new Object[]{"T", "M", 'M', ItemList.Battery_Buffer_2by2_UV, 'T', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Locker_MAX.get(1L), bitsd, new Object[]{"T", "M", 'M', ItemList.Battery_Buffer_2by2_MAX, 'T', OreDictNames.craftingChest}); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Charger_4by4_ULV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + "BCB", + 'M', + ItemList.Hull_ULV, + 'W', + OrePrefixes.wireGt16.get(Materials.Lead), + 'T', + OreDictNames.craftingChest, + 'B', + ItemList.Battery_RE_ULV_Tantalum, + 'C', + OrePrefixes.circuit.get(Materials.Primitive) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Charger_4by4_LV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + "BCB", + 'M', + ItemList.Hull_LV, + 'W', + OrePrefixes.wireGt16.get(Materials.Tin), + 'T', + OreDictNames.craftingChest, + 'B', + ItemList.Battery_RE_LV_Lithium, + 'C', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Charger_4by4_MV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + "BCB", + 'M', + ItemList.Hull_MV, + 'W', + OrePrefixes.wireGt16.get(Materials.AnyCopper), + 'T', + OreDictNames.craftingChest, + 'B', + ItemList.Battery_RE_MV_Lithium, + 'C', + OrePrefixes.circuit.get(Materials.Good) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Charger_4by4_HV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + "BCB", + 'M', + ItemList.Hull_HV, + 'W', + OrePrefixes.wireGt16.get(Materials.Gold), + 'T', + OreDictNames.craftingChest, + 'B', + ItemList.Battery_RE_HV_Lithium, + 'C', + OrePrefixes.circuit.get(Materials.Advanced) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Charger_4by4_EV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + "BCB", + 'M', + ItemList.Hull_EV, + 'W', + OrePrefixes.wireGt16.get(Materials.Aluminium), + 'T', + OreDictNames.craftingChest, + 'B', + OrePrefixes.battery.get(Materials.Master), + 'C', + OrePrefixes.circuit.get(Materials.Data) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Charger_4by4_IV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + "BCB", + 'M', + ItemList.Hull_IV, + 'W', + OrePrefixes.wireGt16.get(Materials.Tungsten), + 'T', + OreDictNames.craftingChest, + 'B', + ItemList.Energy_LapotronicOrb, + 'C', + OrePrefixes.circuit.get(Materials.Elite) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Charger_4by4_LuV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + "BCB", + 'M', + ItemList.Hull_LuV, + 'W', + OrePrefixes.wireGt16.get(Materials.VanadiumGallium), + 'T', + OreDictNames.craftingChest, + 'B', + ItemList.Energy_LapotronicOrb2, + 'C', + OrePrefixes.circuit.get(Materials.Master) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Charger_4by4_ZPM.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + "BCB", + 'M', + ItemList.Hull_ZPM, + 'W', + OrePrefixes.wireGt16.get(Materials.Naquadah), + 'T', + OreDictNames.craftingChest, + 'B', + ItemList.Energy_LapotronicOrb2, + 'C', + OrePrefixes.circuit.get(Materials.Ultimate) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Charger_4by4_UV.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + "BCB", + 'M', + ItemList.Hull_UV, + 'W', + OrePrefixes.wireGt16.get(Materials.NaquadahAlloy), + 'T', + OreDictNames.craftingChest, + 'B', + ItemList.ZPM2, + 'C', + OrePrefixes.circuit.get(Materials.SuperconductorUHV) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Battery_Charger_4by4_MAX.get(1L), bitsd, new Object[] { + aTextWireChest, + aTextWireHull, + "BCB", + 'M', + ItemList.Hull_MAX, + 'W', + OrePrefixes.wireGt16.get(Materials.SuperconductorUHV), + 'T', + OreDictNames.craftingChest, + 'B', + ItemList.ZPM2, + 'C', + OrePrefixes.circuit.get(Materials.Infinite) + }); + + GT_ModHandler.addCraftingRecipe(ItemList.Locker_ULV.get(1L), bitsd, new Object[] { + "T", "M", 'M', ItemList.Battery_Buffer_2by2_ULV, 'T', OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Locker_LV.get(1L), bitsd, new Object[] { + "T", "M", 'M', ItemList.Battery_Buffer_2by2_LV, 'T', OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Locker_MV.get(1L), bitsd, new Object[] { + "T", "M", 'M', ItemList.Battery_Buffer_2by2_MV, 'T', OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Locker_HV.get(1L), bitsd, new Object[] { + "T", "M", 'M', ItemList.Battery_Buffer_2by2_HV, 'T', OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Locker_EV.get(1L), bitsd, new Object[] { + "T", "M", 'M', ItemList.Battery_Buffer_2by2_EV, 'T', OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Locker_IV.get(1L), bitsd, new Object[] { + "T", "M", 'M', ItemList.Battery_Buffer_2by2_IV, 'T', OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Locker_LuV.get(1L), bitsd, new Object[] { + "T", "M", 'M', ItemList.Battery_Buffer_2by2_LuV, 'T', OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Locker_ZPM.get(1L), bitsd, new Object[] { + "T", "M", 'M', ItemList.Battery_Buffer_2by2_ZPM, 'T', OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Locker_UV.get(1L), bitsd, new Object[] { + "T", "M", 'M', ItemList.Battery_Buffer_2by2_UV, 'T', OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Locker_MAX.get(1L), bitsd, new Object[] { + "T", "M", 'M', ItemList.Battery_Buffer_2by2_MAX, 'T', OreDictNames.craftingChest + }); } private static void run2() { - ItemList.Machine_LV_AlloySmelter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(201, "basicmachine.alloysmelter.tier.01", "Basic Alloy Smelter", 1, "HighTech combination Smelter", GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes, 2, 1, 0, 0, 1, "AlloySmelter.png", SoundResource.IC2_MACHINES_INDUCTION_LOOP, false, false, SpecialEffects.NONE, "ALLOY_SMELTER", new Object[]{"ECE", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); - ItemList.Machine_MV_AlloySmelter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(202, "basicmachine.alloysmelter.tier.02", "Advanced Alloy Smelter", 2, "HighTech combination Smelter", GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes, 2, 1, 0, 0, 1, "AlloySmelter.png", SoundResource.IC2_MACHINES_INDUCTION_LOOP, false, false, SpecialEffects.NONE, "ALLOY_SMELTER", new Object[]{"ECE", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); - ItemList.Machine_HV_AlloySmelter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(203, "basicmachine.alloysmelter.tier.03", "Advanced Alloy Smelter II", 3, "HighTech combination Smelter", GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes, 2, 1, 0, 0, 1, "AlloySmelter.png", SoundResource.IC2_MACHINES_INDUCTION_LOOP, false, false, SpecialEffects.NONE, "ALLOY_SMELTER", new Object[]{"ECE", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); - ItemList.Machine_EV_AlloySmelter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(204, "basicmachine.alloysmelter.tier.04", "Advanced Alloy Smelter III", 4, "HighTech combination Smelter", GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes, 2, 1, 0, 0, 1, "AlloySmelter.png", SoundResource.IC2_MACHINES_INDUCTION_LOOP, false, false, SpecialEffects.NONE, "ALLOY_SMELTER", new Object[]{"ECE", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); - ItemList.Machine_IV_AlloySmelter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(205, "basicmachine.alloysmelter.tier.05", "Advanced Alloy Smelter IV", 5, "HighTech combination Smelter", GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes, 2, 1, 0, 0, 1, "AlloySmelter.png", SoundResource.IC2_MACHINES_INDUCTION_LOOP, false, false, SpecialEffects.NONE, "ALLOY_SMELTER", new Object[]{"ECE", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); - - ItemList.Machine_LV_Assembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(211, "basicmachine.assembler.tier.01", "Basic Assembling Machine", 1, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sAssemblerRecipes, 6, 1, 16000, 0, 1, "Assembler.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "ASSEMBLER", new Object[]{"ACA", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_MV_Assembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(212, "basicmachine.assembler.tier.02", "Advanced Assembling Machine", 2, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sAssemblerRecipes, 9, 1, 24000, 0, 1, "Assembler2.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "ASSEMBLER", new Object[]{"ACA", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_HV_Assembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(213, "basicmachine.assembler.tier.03", "Advanced Assembling Machine II", 3, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sAssemblerRecipes, 9, 1, 32000, 0, 1, "Assembler2.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "ASSEMBLER", new Object[]{"ACA", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_EV_Assembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(214, "basicmachine.assembler.tier.04", "Advanced Assembling Machine III", 4, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sAssemblerRecipes, 9, 1, 48000, 0, 1, "Assembler2.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "ASSEMBLER", new Object[]{"ACA", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_IV_Assembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(215, "basicmachine.assembler.tier.05", "Advanced Assembling Machine IV", 5, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sAssemblerRecipes, 9, 1, 64000, 0, 1, "Assembler2.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "ASSEMBLER", new Object[]{"ACA", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - - ItemList.Machine_LV_Bender.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(221, "basicmachine.bender.tier.01", "Basic Bending Machine", 1, "Boo, he's bad! We want BENDER!!!", GT_Recipe.GT_Recipe_Map.sBenderRecipes, 2, 1, 0, 0, 1, "Bender.png", SoundResource.IC2_MACHINES_COMPRESSOR_OP, false, false, SpecialEffects.NONE, "BENDER", new Object[]{aTextPlateWrench, aTextCableHull, aTextMotorWire, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_MV_Bender.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(222, "basicmachine.bender.tier.02", "Advanced Bending Machine", 2, "Boo, he's bad! We want BENDER!!!", GT_Recipe.GT_Recipe_Map.sBenderRecipes, 2, 1, 0, 0, 1, "Bender.png", SoundResource.IC2_MACHINES_COMPRESSOR_OP, false, false, SpecialEffects.NONE, "BENDER", new Object[]{aTextPlateWrench, aTextCableHull, aTextMotorWire, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_HV_Bender.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(223, "basicmachine.bender.tier.03", "Advanced Bending Machine II", 3, "Boo, he's bad! We want BENDER!!!", GT_Recipe.GT_Recipe_Map.sBenderRecipes, 2, 1, 0, 0, 1, "Bender.png", SoundResource.IC2_MACHINES_COMPRESSOR_OP, false, false, SpecialEffects.NONE, "BENDER", new Object[]{aTextPlateWrench, aTextCableHull, aTextMotorWire, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_EV_Bender.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(224, "basicmachine.bender.tier.04", "Advanced Bending Machine III", 4, "Boo, he's bad! We want BENDER!!!", GT_Recipe.GT_Recipe_Map.sBenderRecipes, 2, 1, 0, 0, 1, "Bender.png", SoundResource.IC2_MACHINES_COMPRESSOR_OP, false, false, SpecialEffects.NONE, "BENDER", new Object[]{aTextPlateWrench, aTextCableHull, aTextMotorWire, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_IV_Bender.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(225, "basicmachine.bender.tier.05", "Advanced Bending Machine IV", 5, "Boo, he's bad! We want BENDER!!!", GT_Recipe.GT_Recipe_Map.sBenderRecipes, 2, 1, 0, 0, 1, "Bender.png", SoundResource.IC2_MACHINES_COMPRESSOR_OP, false, false, SpecialEffects.NONE, "BENDER", new Object[]{aTextPlateWrench, aTextCableHull, aTextMotorWire, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - - ItemList.Machine_LV_Canner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(231, "basicmachine.canner.tier.01", "Basic Canning Machine", 1, "Unmobile Food Canning Machine GTA4", GT_Recipe.GT_Recipe_Map.sCannerRecipes, 2, 2, 0, 0, 1, "Canner.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "CANNER", new Object[]{aTextWirePump, aTextCableHull, "GGG", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_MV_Canner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(232, "basicmachine.canner.tier.02", "Advanced Canning Machine", 2, "Unmobile Food Canning Machine GTA4", GT_Recipe.GT_Recipe_Map.sCannerRecipes, 2, 2, 0, 0, 1, "Canner.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "CANNER", new Object[]{aTextWirePump, aTextCableHull, "GGG", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_HV_Canner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(233, "basicmachine.canner.tier.03", "Advanced Canning Machine II", 3, "Unmobile Food Canning Machine GTA4", GT_Recipe.GT_Recipe_Map.sCannerRecipes, 2, 2, 0, 0, 1, "Canner.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "CANNER", new Object[]{aTextWirePump, aTextCableHull, "GGG", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_EV_Canner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(234, "basicmachine.canner.tier.04", "Advanced Canning Machine III", 4, "Unmobile Food Canning Machine GTA4", GT_Recipe.GT_Recipe_Map.sCannerRecipes, 2, 2, 0, 0, 1, "Canner.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "CANNER", new Object[]{aTextWirePump, aTextCableHull, "GGG", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_IV_Canner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(235, "basicmachine.canner.tier.05", "Advanced Canning Machine IV", 5, "Unmobile Food Canning Machine GTA4", GT_Recipe.GT_Recipe_Map.sCannerRecipes, 2, 2, 0, 0, 1, "Canner.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "CANNER", new Object[]{aTextWirePump, aTextCableHull, "GGG", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - - ItemList.Machine_LV_Compressor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(241, "basicmachine.compressor.tier.01", "Basic Compressor", 1, "Compress-O-Matic C77", GT_Recipe.GT_Recipe_Map.sCompressorRecipes, 1, 1, 0, 0, 1, "Compressor.png", SoundResource.IC2_MACHINES_COMPRESSOR_OP, false, false, SpecialEffects.NONE, "COMPRESSOR", new Object[]{aTextWireCoil, aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_MV_Compressor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(242, "basicmachine.compressor.tier.02", "Advanced Compressor", 2, "Compress-O-Matic C77", GT_Recipe.GT_Recipe_Map.sCompressorRecipes, 1, 1, 0, 0, 1, "Compressor.png", SoundResource.IC2_MACHINES_COMPRESSOR_OP, false, false, SpecialEffects.NONE, "COMPRESSOR", new Object[]{aTextWireCoil, aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_HV_Compressor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(243, "basicmachine.compressor.tier.03", "Advanced Compressor II", 3, "Compress-O-Matic C77", GT_Recipe.GT_Recipe_Map.sCompressorRecipes, 1, 1, 0, 0, 1, "Compressor.png", SoundResource.IC2_MACHINES_COMPRESSOR_OP, false, false, SpecialEffects.NONE, "COMPRESSOR", new Object[]{aTextWireCoil, aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_EV_Compressor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(244, "basicmachine.compressor.tier.04", "Advanced Compressor III", 4, "Compress-O-Matic C77", GT_Recipe.GT_Recipe_Map.sCompressorRecipes, 1, 1, 0, 0, 1, "Compressor.png", SoundResource.IC2_MACHINES_COMPRESSOR_OP, false, false, SpecialEffects.NONE, "COMPRESSOR", new Object[]{aTextWireCoil, aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_IV_Compressor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(245, "basicmachine.compressor.tier.05", "Singularity Compressor", 5, "Compress-O-Matic C77", GT_Recipe.GT_Recipe_Map.sCompressorRecipes, 1, 1, 0, 0, 1, "Compressor.png", SoundResource.IC2_MACHINES_COMPRESSOR_OP, false, false, SpecialEffects.NONE, "COMPRESSOR", new Object[]{aTextWireCoil, aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - - ItemList.Machine_LV_Cutter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(251, "basicmachine.cutter.tier.01", "Basic Cutting Machine", 1, "Slice'N Dice", GT_Recipe.GT_Recipe_Map.sCutterRecipes, 1, 2, 8000, 0, 1, "Cutter.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "CUTTER", new Object[]{"WCG", "VMB", "CWE", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, 'B', OreDictNames.craftingDiamondBlade}).getStackForm(1L)); - ItemList.Machine_MV_Cutter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(252, "basicmachine.cutter.tier.02", "Advanced Cutting Machine", 2, "Slice'N Dice", GT_Recipe.GT_Recipe_Map.sCutterRecipes, 2, 2, 16000, 0, 1, "Cutter2.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "CUTTER", new Object[]{"WCG", "VMB", "CWE", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, 'B', OreDictNames.craftingDiamondBlade}).getStackForm(1L)); - ItemList.Machine_HV_Cutter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(253, "basicmachine.cutter.tier.03", "Advanced Cutting Machine II", 3, "Slice'N Dice", GT_Recipe.GT_Recipe_Map.sCutterRecipes, 2, 4, 32000, 0, 1, "Cutter4.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "CUTTER", new Object[]{"WCG", "VMB", "CWE", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, 'B', OreDictNames.craftingDiamondBlade}).getStackForm(1L)); - ItemList.Machine_EV_Cutter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(254, "basicmachine.cutter.tier.04", "Advanced Cutting Machine III", 4, "Slice'N Dice", GT_Recipe.GT_Recipe_Map.sCutterRecipes, 2, 4, 64000, 0, 1, "Cutter4.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "CUTTER", new Object[]{"WCG", "VMB", "CWE", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, 'B', OreDictNames.craftingDiamondBlade}).getStackForm(1L)); - ItemList.Machine_IV_Cutter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(255, "basicmachine.cutter.tier.05", "Advanced Cutting Machine IV", 5, "Slice'N Dice", GT_Recipe.GT_Recipe_Map.sCutterRecipes, 2, 4, 96000, 0, 1, "Cutter4.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "CUTTER", new Object[]{"WCG", "VMB", "CWE", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, 'B', OreDictNames.craftingDiamondBlade}).getStackForm(1L)); - - ItemList.Machine_LV_E_Furnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(261, "basicmachine.e_furnace.tier.01", "Basic Electric Furnace", 1, "Not like using a Commodore 64", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Furnace.png", SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, false, false, SpecialEffects.NONE, "ELECTRIC_FURNACE", new Object[]{"ECE", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); - ItemList.Machine_MV_E_Furnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(262, "basicmachine.e_furnace.tier.02", "Advanced Electric Furnace", 2, "Not like using a Commodore 64", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Furnace.png", SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, false, false, SpecialEffects.NONE, "ELECTRIC_FURNACE", new Object[]{"ECE", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); - ItemList.Machine_HV_E_Furnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(263, "basicmachine.e_furnace.tier.03", "Advanced Electric Furnace II", 3, "Not like using a Commodore 64", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Furnace.png", SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, false, false, SpecialEffects.NONE, "ELECTRIC_FURNACE", new Object[]{"ECE", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); - ItemList.Machine_EV_E_Furnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(264, "basicmachine.e_furnace.tier.04", "Advanced Electric Furnace III", 4, "Not like using a Commodore 64", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Furnace.png", SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, false, false, SpecialEffects.NONE, "ELECTRIC_FURNACE", new Object[]{"ECE", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); - ItemList.Machine_IV_E_Furnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(265, "basicmachine.e_furnace.tier.05", "Electron Exitement Processor", 5, "Not like using a Commodore 64", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Furnace.png", SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, false, false, SpecialEffects.NONE, "ELECTRIC_FURNACE", new Object[]{"ECE", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); - - ItemList.Machine_LV_Extractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(271, "basicmachine.extractor.tier.01", "Basic Extractor", 1, "Dejuicer-Device of Doom - D123", GT_Recipe.GT_Recipe_Map.sExtractorRecipes, 1, 1, 0, 0, 1, "Extractor.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "EXTRACTOR", new Object[]{"GCG", "EMP", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_MV_Extractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(272, "basicmachine.extractor.tier.02", "Advanced Extractor", 2, "Dejuicer-Device of Doom - D123", GT_Recipe.GT_Recipe_Map.sExtractorRecipes, 1, 1, 0, 0, 1, "Extractor.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "EXTRACTOR", new Object[]{"GCG", "EMP", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_HV_Extractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(273, "basicmachine.extractor.tier.03", "Advanced Extractor II", 3, "Dejuicer-Device of Doom - D123", GT_Recipe.GT_Recipe_Map.sExtractorRecipes, 1, 1, 0, 0, 1, "Extractor.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "EXTRACTOR", new Object[]{"GCG", "EMP", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_EV_Extractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(274, "basicmachine.extractor.tier.04", "Advanced Extractor III", 4, "Dejuicer-Device of Doom - D123", GT_Recipe.GT_Recipe_Map.sExtractorRecipes, 1, 1, 0, 0, 1, "Extractor.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "EXTRACTOR", new Object[]{"GCG", "EMP", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_IV_Extractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(275, "basicmachine.extractor.tier.05", "Vacuum Extractor", 5, "Dejuicer-Device of Doom - D123", GT_Recipe.GT_Recipe_Map.sExtractorRecipes, 1, 1, 0, 0, 1, "Extractor.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "EXTRACTOR", new Object[]{"GCG", "EMP", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - - ItemList.Machine_LV_Extruder.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(281, "basicmachine.extruder.tier.01", "Basic Extruder", 1, "Universal Machine for Metal Working", GT_Recipe.GT_Recipe_Map.sExtruderRecipes, 2, 1, 0, 0, 1, "Extruder.png", SoundResource.IC2_MACHINES_INDUCTION_LOOP, false, false, SpecialEffects.NONE, "EXTRUDER", new Object[]{"CCE", "XMP", "CCE", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'X', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); - ItemList.Machine_MV_Extruder.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(282, "basicmachine.extruder.tier.02", "Advanced Extruder", 2, "Universal Machine for Metal Working", GT_Recipe.GT_Recipe_Map.sExtruderRecipes, 2, 1, 0, 0, 1, "Extruder.png", SoundResource.IC2_MACHINES_INDUCTION_LOOP, false, false, SpecialEffects.NONE, "EXTRUDER", new Object[]{"CCE", "XMP", "CCE", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'X', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); - ItemList.Machine_HV_Extruder.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(283, "basicmachine.extruder.tier.03", "Advanced Extruder II", 3, "Universal Machine for Metal Working", GT_Recipe.GT_Recipe_Map.sExtruderRecipes, 2, 1, 0, 0, 1, "Extruder.png", SoundResource.IC2_MACHINES_INDUCTION_LOOP, false, false, SpecialEffects.NONE, "EXTRUDER", new Object[]{"CCE", "XMP", "CCE", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'X', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); - ItemList.Machine_EV_Extruder.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(284, "basicmachine.extruder.tier.04", "Advanced Extruder III", 4, "Universal Machine for Metal Working", GT_Recipe.GT_Recipe_Map.sExtruderRecipes, 2, 1, 0, 0, 1, "Extruder.png", SoundResource.IC2_MACHINES_INDUCTION_LOOP, false, false, SpecialEffects.NONE, "EXTRUDER", new Object[]{"CCE", "XMP", "CCE", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'X', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); - ItemList.Machine_IV_Extruder.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(285, "basicmachine.extruder.tier.05", "Advanced Extruder IV", 5, "Universal Machine for Metal Working", GT_Recipe.GT_Recipe_Map.sExtruderRecipes, 2, 1, 0, 0, 1, "Extruder.png", SoundResource.IC2_MACHINES_INDUCTION_LOOP, false, false, SpecialEffects.NONE, "EXTRUDER", new Object[]{"CCE", "XMP", "CCE", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'X', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); - - ItemList.Machine_LV_Lathe.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(291, "basicmachine.lathe.tier.01", "Basic Lathe", 1, "Produces Rods more efficiently", GT_Recipe.GT_Recipe_Map.sLatheRecipes, 1, 2, 0, 0, 1, "Lathe.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "LATHE", new Object[]{aTextWireCoil, "EMD", "CWP", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'D', OrePrefixes.gem.get(Materials.Diamond)}).getStackForm(1L)); - ItemList.Machine_MV_Lathe.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(292, "basicmachine.lathe.tier.02", "Advanced Lathe", 2, "Produces Rods more efficiently", GT_Recipe.GT_Recipe_Map.sLatheRecipes, 1, 2, 0, 0, 1, "Lathe.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "LATHE", new Object[]{aTextWireCoil, "EMD", "CWP", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'D', OrePrefixes.gemFlawless.get(Materials.Diamond)}).getStackForm(1L)); - ItemList.Machine_HV_Lathe.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(293, "basicmachine.lathe.tier.03", "Advanced Lathe II", 3, "Produces Rods more efficiently", GT_Recipe.GT_Recipe_Map.sLatheRecipes, 1, 2, 0, 0, 1, "Lathe.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "LATHE", new Object[]{aTextWireCoil, "EMD", "CWP", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'D', OreDictNames.craftingIndustrialDiamond}).getStackForm(1L)); - ItemList.Machine_EV_Lathe.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(294, "basicmachine.lathe.tier.04", "Advanced Lathe III", 4, "Produces Rods more efficiently", GT_Recipe.GT_Recipe_Map.sLatheRecipes, 1, 2, 0, 0, 1, "Lathe.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "LATHE", new Object[]{aTextWireCoil, "EMD", "CWP", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'D', OreDictNames.craftingIndustrialDiamond}).getStackForm(1L)); - ItemList.Machine_IV_Lathe.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(295, "basicmachine.lathe.tier.05", "Advanced Lathe IV", 5, "Produces Rods more efficiently", GT_Recipe.GT_Recipe_Map.sLatheRecipes, 1, 2, 0, 0, 1, "Lathe.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "LATHE", new Object[]{aTextWireCoil, "EMD", "CWP", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'D', OreDictNames.craftingIndustrialDiamond}).getStackForm(1L)); - - ItemList.Machine_LV_Macerator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(301, "basicmachine.macerator.tier.01", "Basic Macerator", 1, "Schreddering your Ores", GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, 1, 1, 0, 0, 1, "Macerator1.png", SoundResource.IC2_MACHINES_MACERATOR_OP, false, false, SpecialEffects.TOP_SMOKE, "MACERATOR", new Object[]{"PEG", "WWM", "CCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.gem.get(Materials.Diamond)}).getStackForm(1L)); - ItemList.Machine_MV_Macerator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(302, "basicmachine.macerator.tier.02", "Advanced Macerator", 2, "Schreddering your Ores", GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, 1, 1, 0, 0, 1, "Macerator1.png", SoundResource.IC2_MACHINES_MACERATOR_OP, false, false, SpecialEffects.TOP_SMOKE, "MACERATOR", new Object[]{"PEG", "WWM", "CCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.gemFlawless.get(Materials.Diamond)}).getStackForm(1L)); - ItemList.Machine_HV_Macerator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(303, "basicmachine.macerator.tier.03", "Universal Macerator", 3, "Schreddering your Ores with Byproducts", GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, 1, 2, 0, 0, 1, "Macerator2.png", SoundResource.IC2_MACHINES_MACERATOR_OP, false, false, SpecialEffects.TOP_SMOKE, "PULVERIZER", new Object[]{"PEG", "WWM", "CCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OreDictNames.craftingGrinder}).getStackForm(1L)); - ItemList.Machine_EV_Macerator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(304, "basicmachine.macerator.tier.04", "Universal Pulverizer", 4, "Schreddering your Ores with Byproducts", GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, 1, 3, 0, 0, 1, "Macerator3.png", SoundResource.IC2_MACHINES_MACERATOR_OP, false, false, SpecialEffects.TOP_SMOKE, "PULVERIZER", new Object[]{"PEG", "WWM", "CCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OreDictNames.craftingGrinder}).getStackForm(1L)); - ItemList.Machine_IV_Macerator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(305, "basicmachine.macerator.tier.05", "Blend-O-Matic 9001", 5, "Schreddering your Ores with Byproducts", GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, 1, 4, 0, 0, 1, "Macerator4.png", SoundResource.IC2_MACHINES_MACERATOR_OP, false, false, SpecialEffects.TOP_SMOKE, "PULVERIZER", new Object[]{"PEG", "WWM", "CCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OreDictNames.craftingGrinder}).getStackForm(1L)); - - ItemList.Machine_LV_Microwave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(311, "basicmachine.microwave.tier.01", "Basic Microwave", 1, "Did you really read the instruction Manual?", GT_Recipe.GT_Recipe_Map.sMicrowaveRecipes, 1, 1, 0, 0, 1, "E_Furnace.png", SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, false, false, SpecialEffects.NONE, "MICROWAVE", new Object[]{"LWC", "LMR", "LEC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'L', OrePrefixes.plate.get(Materials.Lead)}).getStackForm(1L)); - ItemList.Machine_MV_Microwave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(312, "basicmachine.microwave.tier.02", "Advanced Microwave", 2, "Did you really read the instruction Manual?", GT_Recipe.GT_Recipe_Map.sMicrowaveRecipes, 1, 1, 0, 0, 1, "E_Furnace.png", SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, false, false, SpecialEffects.NONE, "MICROWAVE", new Object[]{"LWC", "LMR", "LEC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'L', OrePrefixes.plate.get(Materials.Lead)}).getStackForm(1L)); - ItemList.Machine_HV_Microwave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(313, "basicmachine.microwave.tier.03", "Advanced Microwave II", 3, "Did you really read the instruction Manual?", GT_Recipe.GT_Recipe_Map.sMicrowaveRecipes, 1, 1, 0, 0, 1, "E_Furnace.png", SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, false, false, SpecialEffects.NONE, "MICROWAVE", new Object[]{"LWC", "LMR", "LEC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'L', OrePrefixes.plate.get(Materials.Lead)}).getStackForm(1L)); - ItemList.Machine_EV_Microwave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(314, "basicmachine.microwave.tier.04", "Advanced Microwave III", 4, "Did you really read the instruction Manual?", GT_Recipe.GT_Recipe_Map.sMicrowaveRecipes, 1, 1, 0, 0, 1, "E_Furnace.png", SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, false, false, SpecialEffects.NONE, "MICROWAVE", new Object[]{"LWC", "LMR", "LEC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'L', OrePrefixes.plate.get(Materials.Lead)}).getStackForm(1L)); - ItemList.Machine_IV_Microwave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(315, "basicmachine.microwave.tier.05", "Advanced Microwave IV", 5, "Did you really read the instruction Manual?", GT_Recipe.GT_Recipe_Map.sMicrowaveRecipes, 1, 1, 0, 0, 1, "E_Furnace.png", SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, false, false, SpecialEffects.NONE, "MICROWAVE", new Object[]{"LWC", "LMR", "LEC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'L', OrePrefixes.plate.get(Materials.Lead)}).getStackForm(1L)); - - ItemList.Machine_LV_Printer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(321, "basicmachine.printer.tier.01", "Basic Printer", 1, "It can copy Books and paint Stuff", GT_Recipe.GT_Recipe_Map.sPrinterRecipes, 1, 1, 16000, 0, 1, "Printer.png", SoundResource.IC2_MACHINES_COMPRESSOR_OP, false, false, SpecialEffects.TOP_SMOKE, "PRINTER", new Object[]{aTextMotorWire, aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_MV_Printer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(322, "basicmachine.printer.tier.02", "Advanced Printer", 2, "It can copy Books and paint Stuff", GT_Recipe.GT_Recipe_Map.sPrinterRecipes, 1, 1, 16000, 0, 1, "Printer.png", SoundResource.IC2_MACHINES_COMPRESSOR_OP, false, false, SpecialEffects.TOP_SMOKE, "PRINTER", new Object[]{aTextMotorWire, aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_HV_Printer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(323, "basicmachine.printer.tier.03", "Advanced Printer II", 3, "It can copy Books and paint Stuff", GT_Recipe.GT_Recipe_Map.sPrinterRecipes, 1, 1, 16000, 0, 1, "Printer.png", SoundResource.IC2_MACHINES_COMPRESSOR_OP, false, false, SpecialEffects.TOP_SMOKE, "PRINTER", new Object[]{aTextMotorWire, aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_EV_Printer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(324, "basicmachine.printer.tier.04", "Advanced Printer III", 4, "It can copy Books and paint Stuff", GT_Recipe.GT_Recipe_Map.sPrinterRecipes, 1, 1, 16000, 0, 1, "Printer.png", SoundResource.IC2_MACHINES_COMPRESSOR_OP, false, false, SpecialEffects.TOP_SMOKE, "PRINTER", new Object[]{aTextMotorWire, aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_IV_Printer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(325, "basicmachine.printer.tier.05", "Advanced Printer IV", 5, "It can copy Books and paint Stuff", GT_Recipe.GT_Recipe_Map.sPrinterRecipes, 1, 1, 16000, 0, 1, "Printer.png", SoundResource.IC2_MACHINES_COMPRESSOR_OP, false, false, SpecialEffects.TOP_SMOKE, "PRINTER", new Object[]{aTextMotorWire, aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_LuV_Printer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(326, "basicmachine.printer.tier.06", "Advanced Printer V", 6, "It can copy Books and paint Stuff", GT_Recipe.GT_Recipe_Map.sPrinterRecipes, 1, 1, 16000, 0, 1, "Printer.png", SoundResource.IC2_MACHINES_COMPRESSOR_OP, false, false, SpecialEffects.TOP_SMOKE, "PRINTER", new Object[]{aTextMotorWire, aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_ZPM_Printer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(327, "basicmachine.printer.tier.07", "Advanced Printer VI", 7, "It can copy Books and paint Stuff", GT_Recipe.GT_Recipe_Map.sPrinterRecipes, 1, 1, 16000, 0, 1, "Printer.png", SoundResource.IC2_MACHINES_COMPRESSOR_OP, false, false, SpecialEffects.TOP_SMOKE, "PRINTER", new Object[]{aTextMotorWire, aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_UV_Printer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(328, "basicmachine.printer.tier.08", "Advanced Printer VII", 8, "It can copy Books and paint Stuff", GT_Recipe.GT_Recipe_Map.sPrinterRecipes, 1, 1, 16000, 0, 1, "Printer.png", SoundResource.IC2_MACHINES_COMPRESSOR_OP, false, false, SpecialEffects.TOP_SMOKE, "PRINTER", new Object[]{aTextMotorWire, aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - - ItemList.Machine_LV_Recycler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(331, "basicmachine.recycler.tier.01", "Basic Recycler", 1, "Compress, burn, obliterate and filter EVERYTHING", GT_Recipe.GT_Recipe_Map.sRecyclerRecipes, 1, 1, 0, 0, 1, "Recycler.png", SoundResource.IC2_MACHINES_RECYCLER_OP, false, false, SpecialEffects.NONE, "RECYCLER", new Object[]{"GCG", aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.dust.get(Materials.Glowstone)}).getStackForm(1L)); - ItemList.Machine_MV_Recycler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(332, "basicmachine.recycler.tier.02", "Advanced Recycler", 2, "Compress, burn, obliterate and filter EVERYTHING", GT_Recipe.GT_Recipe_Map.sRecyclerRecipes, 1, 1, 0, 0, 1, "Recycler.png", SoundResource.IC2_MACHINES_RECYCLER_OP, false, false, SpecialEffects.NONE, "RECYCLER", new Object[]{"GCG", aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.dust.get(Materials.Glowstone)}).getStackForm(1L)); - ItemList.Machine_HV_Recycler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(333, "basicmachine.recycler.tier.03", "Advanced Recycler II", 3, "Compress, burn, obliterate and filter EVERYTHING", GT_Recipe.GT_Recipe_Map.sRecyclerRecipes, 1, 1, 0, 0, 1, "Recycler.png", SoundResource.IC2_MACHINES_RECYCLER_OP, false, false, SpecialEffects.NONE, "RECYCLER", new Object[]{"GCG", aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.dust.get(Materials.Glowstone)}).getStackForm(1L)); - ItemList.Machine_EV_Recycler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(334, "basicmachine.recycler.tier.04", "Advanced Recycler III", 4, "Compress, burn, obliterate and filter EVERYTHING", GT_Recipe.GT_Recipe_Map.sRecyclerRecipes, 1, 1, 0, 0, 1, "Recycler.png", SoundResource.IC2_MACHINES_RECYCLER_OP, false, false, SpecialEffects.NONE, "RECYCLER", new Object[]{"GCG", aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.dust.get(Materials.Glowstone)}).getStackForm(1L)); - ItemList.Machine_IV_Recycler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(335, "basicmachine.recycler.tier.05", "The Oblitterator", 5, "Compress, burn, obliterate and filter EVERYTHING", GT_Recipe.GT_Recipe_Map.sRecyclerRecipes, 1, 1, 0, 0, 1, "Recycler.png", SoundResource.IC2_MACHINES_RECYCLER_OP, false, false, SpecialEffects.NONE, "RECYCLER", new Object[]{"GCG", aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.dust.get(Materials.Glowstone)}).getStackForm(1L)); - - ItemList.Machine_LV_Scanner.set(new GT_MetaTileEntity_Scanner(341, "basicmachine.scanner.tier.01", "Basic Scanner", 1).getStackForm(1L)); - ItemList.Machine_MV_Scanner.set(new GT_MetaTileEntity_Scanner(342, "basicmachine.scanner.tier.02", "Advanced Scanner", 2).getStackForm(1L)); - ItemList.Machine_HV_Scanner.set(new GT_MetaTileEntity_Scanner(343, "basicmachine.scanner.tier.03", "Advanced Scanner II", 3).getStackForm(1L)); - ItemList.Machine_EV_Scanner.set(new GT_MetaTileEntity_Scanner(344, "basicmachine.scanner.tier.04", "Advanced Scanner III", 4).getStackForm(1L)); - ItemList.Machine_IV_Scanner.set(new GT_MetaTileEntity_Scanner(345, "basicmachine.scanner.tier.05", "Advanced Scanner IV", 5).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Machine_LV_Scanner.get(1L), bitsd, new Object[]{"CTC", aTextWireHull, "CRC", 'M', ItemList.Hull_LV, 'T', ItemList.Emitter_LV, 'R', ItemList.Sensor_LV, 'C', OrePrefixes.circuit.get(Materials.Good), 'W', OrePrefixes.cableGt01.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_MV_Scanner.get(1L), bitsd, new Object[]{"CTC", aTextWireHull, "CRC", 'M', ItemList.Hull_MV, 'T', ItemList.Emitter_MV, 'R', ItemList.Sensor_MV, 'C', OrePrefixes.circuit.get(Materials.Advanced), 'W', OrePrefixes.cableGt01.get(Materials.AnyCopper)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_HV_Scanner.get(1L), bitsd, new Object[]{"CTC", aTextWireHull, "CRC", 'M', ItemList.Hull_HV, 'T', ItemList.Emitter_HV, 'R', ItemList.Sensor_HV, 'C', OrePrefixes.circuit.get(Materials.Data), 'W', OrePrefixes.cableGt01.get(Materials.Gold)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_EV_Scanner.get(1L), bitsd, new Object[]{"CTC", aTextWireHull, "CRC", 'M', ItemList.Hull_EV, 'T', ItemList.Emitter_EV, 'R', ItemList.Sensor_EV, 'C', OrePrefixes.circuit.get(Materials.Elite), 'W', OrePrefixes.cableGt01.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_IV_Scanner.get(1L), bitsd, new Object[]{"CTC", aTextWireHull, "CRC", 'M', ItemList.Hull_IV, 'T', ItemList.Emitter_IV, 'R', ItemList.Sensor_IV, 'C', OrePrefixes.circuit.get(Materials.Master), 'W', OrePrefixes.cableGt01.get(Materials.Tungsten)}); - - ItemList.Machine_LV_Wiremill.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(351, "basicmachine.wiremill.tier.01", "Basic Wiremill", 1, "Produces Wires more efficiently", GT_Recipe.GT_Recipe_Map.sWiremillRecipes, 1, 1, 0, 0, 1, "Wiremill.png", SoundResource.IC2_MACHINES_RECYCLER_OP, false, false, SpecialEffects.NONE, "WIREMILL", new Object[]{aTextMotorWire, aTextCableHull, aTextMotorWire, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_MV_Wiremill.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(352, "basicmachine.wiremill.tier.02", "Advanced Wiremill", 2, "Produces Wires more efficiently", GT_Recipe.GT_Recipe_Map.sWiremillRecipes, 1, 1, 0, 0, 1, "Wiremill.png", SoundResource.IC2_MACHINES_RECYCLER_OP, false, false, SpecialEffects.NONE, "WIREMILL", new Object[]{aTextMotorWire, aTextCableHull, aTextMotorWire, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_HV_Wiremill.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(353, "basicmachine.wiremill.tier.03", "Advanced Wiremill II", 3, "Produces Wires more efficiently", GT_Recipe.GT_Recipe_Map.sWiremillRecipes, 1, 1, 0, 0, 1, "Wiremill.png", SoundResource.IC2_MACHINES_RECYCLER_OP, false, false, SpecialEffects.NONE, "WIREMILL", new Object[]{aTextMotorWire, aTextCableHull, aTextMotorWire, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_EV_Wiremill.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(354, "basicmachine.wiremill.tier.04", "Advanced Wiremill III", 4, "Produces Wires more efficiently", GT_Recipe.GT_Recipe_Map.sWiremillRecipes, 1, 1, 0, 0, 1, "Wiremill.png", SoundResource.IC2_MACHINES_RECYCLER_OP, false, false, SpecialEffects.NONE, "WIREMILL", new Object[]{aTextMotorWire, aTextCableHull, aTextMotorWire, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_IV_Wiremill.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(355, "basicmachine.wiremill.tier.05", "Advanced Wiremill IV", 5, "Produces Wires more efficiently", GT_Recipe.GT_Recipe_Map.sWiremillRecipes, 1, 1, 0, 0, 1, "Wiremill.png", SoundResource.IC2_MACHINES_RECYCLER_OP, false, false, SpecialEffects.NONE, "WIREMILL", new Object[]{aTextMotorWire, aTextCableHull, aTextMotorWire, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - - ItemList.Machine_LV_Centrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(361, "basicmachine.centrifuge.tier.01", "Basic Centrifuge", 1, "Separating Molecules", GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes, 2, 6, 64000, 0, 1, "Centrifuge.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "CENTRIFUGE", new Object[]{"CEC", aTextWireHull, "CEC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_MV_Centrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(362, "basicmachine.centrifuge.tier.02", "Advanced Centrifuge", 2, "Separating Molecules", GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes, 2, 6, 64000, 0, 1, "Centrifuge.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "CENTRIFUGE", new Object[]{"CEC", aTextWireHull, "CEC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_HV_Centrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(363, "basicmachine.centrifuge.tier.03", "Turbo Centrifuge", 3, "Separating Molecules", GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes, 2, 6, 64000, 0, 1, "Centrifuge.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "CENTRIFUGE", new Object[]{"CEC", aTextWireHull, "CEC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_EV_Centrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(364, "basicmachine.centrifuge.tier.04", "Molecular Separator", 4, "Separating Molecules", GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes, 2, 6, 64000, 0, 1, "Centrifuge.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "CENTRIFUGE", new Object[]{"CEC", aTextWireHull, "CEC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_IV_Centrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(365, "basicmachine.centrifuge.tier.05", "Molecular Cyclone", 5, "Separating Molecules", GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes, 2, 6, 64000, 0, 1, "Centrifuge.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "CENTRIFUGE", new Object[]{"CEC", aTextWireHull, "CEC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - - ItemList.Machine_LV_Electrolyzer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(371, "basicmachine.electrolyzer.tier.01", "Basic Electrolyzer", 1, "Electrolyzing Molecules", GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes, 2, 6, 64000, 0, 1, "Electrolyzer.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "ELECTROLYZER", new Object[]{"IGI", "IMI", "CWC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'I', OrePrefixes.wireGt01.get(Materials.Gold), 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_MV_Electrolyzer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(372, "basicmachine.electrolyzer.tier.02", "Advanced Electrolyzer", 2, "Electrolyzing Molecules", GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes, 2, 6, 64000, 0, 1, "Electrolyzer.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "ELECTROLYZER", new Object[]{"IGI", "IMI", "CWC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'I', OrePrefixes.wireGt01.get(Materials.Silver), 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_HV_Electrolyzer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(373, "basicmachine.electrolyzer.tier.03", "Advanced Electrolyzer II", 3, "Electrolyzing Molecules", GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes, 2, 6, 64000, 0, 1, "Electrolyzer.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "ELECTROLYZER", new Object[]{"IGI", "IMI", "CWC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'I', OrePrefixes.wireGt01.get(Materials.Electrum), 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_EV_Electrolyzer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(374, "basicmachine.electrolyzer.tier.04", "Advanced Electrolyzer III", 4, "Electrolyzing Molecules", GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes, 2, 6, 64000, 0, 1, "Electrolyzer.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "ELECTROLYZER", new Object[]{"IGI", "IMI", "CWC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'I', OrePrefixes.wireGt01.get(Materials.Platinum), 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_IV_Electrolyzer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(375, "basicmachine.electrolyzer.tier.05", "Molecular Disintegrator E-4908", 5, "Electrolyzing Molecules", GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes, 2, 6, 64000, 0, 1, "Electrolyzer.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "ELECTROLYZER", new Object[]{"IGI", "IMI", "CWC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'I', OrePrefixes.wireGt01.get(Materials.HSSG), 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - - ItemList.Machine_LV_ThermalCentrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(381, "basicmachine.thermalcentrifuge.tier.01", "Basic Thermal Centrifuge", 1, "Separating Ores more precisely", GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, 1, 3, 0, 0, 1, "ThermalCentrifuge.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "THERMAL_CENTRIFUGE", new Object[]{"CEC", "OMO", "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); - ItemList.Machine_MV_ThermalCentrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(382, "basicmachine.thermalcentrifuge.tier.02", "Advanced Thermal Centrifuge", 2, "Separating Ores more precisely", GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, 1, 3, 0, 0, 1, "ThermalCentrifuge.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "THERMAL_CENTRIFUGE", new Object[]{"CEC", "OMO", "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); - ItemList.Machine_HV_ThermalCentrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(383, "basicmachine.thermalcentrifuge.tier.03", "Advanced Thermal Centrifuge II", 3, "Separating Ores more precisely", GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, 1, 3, 0, 0, 1, "ThermalCentrifuge.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "THERMAL_CENTRIFUGE", new Object[]{"CEC", "OMO", "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); - ItemList.Machine_EV_ThermalCentrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(384, "basicmachine.thermalcentrifuge.tier.04", "Advanced Thermal Centrifuge III", 4, "Separating Ores more precisely", GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, 1, 3, 0, 0, 1, "ThermalCentrifuge.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "THERMAL_CENTRIFUGE", new Object[]{"CEC", "OMO", "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); - ItemList.Machine_IV_ThermalCentrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(385, "basicmachine.thermalcentrifuge.tier.05", "Blaze Sweatshop T-6350", 5, "Separating Ores more precisely", GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, 1, 3, 0, 0, 1, "ThermalCentrifuge.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "THERMAL_CENTRIFUGE", new Object[]{"CEC", "OMO", "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE}).getStackForm(1L)); - - ItemList.Machine_LV_OreWasher.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(391, "basicmachine.orewasher.tier.01", "Basic Ore Washing Plant", 1, "Getting more Byproducts from your Ores", GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, 1, 3, 16000, 0, 1, "OreWasher.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "ORE_WASHER", new Object[]{"RGR", "CEC", aTextWireHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP}).getStackForm(1L)); - ItemList.Machine_MV_OreWasher.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(392, "basicmachine.orewasher.tier.02", "Advanced Ore Washing Plant", 2, "Getting more Byproducts from your Ores", GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, 1, 3, 24000, 0, 1, "OreWasher.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "ORE_WASHER", new Object[]{"RGR", "CEC", aTextWireHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP}).getStackForm(1L)); - ItemList.Machine_HV_OreWasher.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(393, "basicmachine.orewasher.tier.03", "Advanced Ore Washing Plant II", 3, "Getting more Byproducts from your Ores", GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, 1, 3, 32000, 0, 1, "OreWasher.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "ORE_WASHER", new Object[]{"RGR", "CEC", aTextWireHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP}).getStackForm(1L)); - ItemList.Machine_EV_OreWasher.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(394, "basicmachine.orewasher.tier.04", "Advanced Ore Washing Plant III", 4, "Getting more Byproducts from your Ores", GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, 1, 3, 40000, 0, 1, "OreWasher.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "ORE_WASHER", new Object[]{"RGR", "CEC", aTextWireHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP}).getStackForm(1L)); - ItemList.Machine_IV_OreWasher.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(395, "basicmachine.orewasher.tier.05", "Repurposed Laundry-Washer I-360", 5, "Getting more Byproducts from your Ores", GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, 1, 3, 48000, 0, 1, "OreWasher.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "ORE_WASHER", new Object[]{"RGR", "CEC", aTextWireHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP}).getStackForm(1L)); - - ItemList.Machine_LV_Boxinator.set(new GT_MetaTileEntity_Boxinator(401, "basicmachine.boxinator.tier.01", "Basic Packager", 1).getStackForm(1L)); - ItemList.Machine_MV_Boxinator.set(new GT_MetaTileEntity_Boxinator(402, "basicmachine.boxinator.tier.02", "Advanced Packager", 2).getStackForm(1L)); - ItemList.Machine_HV_Boxinator.set(new GT_MetaTileEntity_Boxinator(403, "basicmachine.boxinator.tier.03", "Advanced Packager II", 3).getStackForm(1L)); - ItemList.Machine_EV_Boxinator.set(new GT_MetaTileEntity_Boxinator(404, "basicmachine.boxinator.tier.04", "Advanced Packager III", 4).getStackForm(1L)); - ItemList.Machine_IV_Boxinator.set(new GT_MetaTileEntity_Boxinator(405, "basicmachine.boxinator.tier.05", "Boxinator", 5).getStackForm(1L)); - ItemList.Machine_LuV_Boxinator.set(new GT_MetaTileEntity_Boxinator(406, "basicmachine.boxinator.tier.06", "Boxinator", 6).getStackForm(1L)); - ItemList.Machine_ZPM_Boxinator.set(new GT_MetaTileEntity_Boxinator(407, "basicmachine.boxinator.tier.07", "Boxinator", 7).getStackForm(1L)); - ItemList.Machine_UV_Boxinator.set(new GT_MetaTileEntity_Boxinator(408, "basicmachine.boxinator.tier.08", "Boxinator", 8).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Machine_LV_Boxinator.get(1L), bitsd, new Object[]{"BCB", "RMV", aTextWireCoil, 'M', ItemList.Hull_LV, 'R', ItemList.Robot_Arm_LV, 'V', ItemList.Conveyor_Module_LV, 'C', OrePrefixes.circuit.get(Materials.Basic), 'W', OrePrefixes.cableGt01.get(Materials.Tin), 'B', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_MV_Boxinator.get(1L), bitsd, new Object[]{"BCB", "RMV", aTextWireCoil, 'M', ItemList.Hull_MV, 'R', ItemList.Robot_Arm_MV, 'V', ItemList.Conveyor_Module_MV, 'C', OrePrefixes.circuit.get(Materials.Good), 'W', OrePrefixes.cableGt01.get(Materials.AnyCopper), 'B', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_HV_Boxinator.get(1L), bitsd, new Object[]{"BCB", "RMV", aTextWireCoil, 'M', ItemList.Hull_HV, 'R', ItemList.Robot_Arm_HV, 'V', ItemList.Conveyor_Module_HV, 'C', OrePrefixes.circuit.get(Materials.Advanced), 'W', OrePrefixes.cableGt01.get(Materials.Gold), 'B', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_EV_Boxinator.get(1L), bitsd, new Object[]{"BCB", "RMV", aTextWireCoil, 'M', ItemList.Hull_EV, 'R', ItemList.Robot_Arm_EV, 'V', ItemList.Conveyor_Module_EV, 'C', OrePrefixes.circuit.get(Materials.Data), 'W', OrePrefixes.cableGt01.get(Materials.Aluminium), 'B', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_IV_Boxinator.get(1L), bitsd, new Object[]{"BCB", "RMV", aTextWireCoil, 'M', ItemList.Hull_IV, 'R', ItemList.Robot_Arm_IV, 'V', ItemList.Conveyor_Module_IV, 'C', OrePrefixes.circuit.get(Materials.Elite), 'W', OrePrefixes.cableGt01.get(Materials.Tungsten), 'B', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_LuV_Boxinator.get(1L), bitsd, new Object[]{"BCB", "RMV", aTextWireCoil, 'M', ItemList.Hull_LuV, 'R', ItemList.Robot_Arm_LuV, 'V', ItemList.Conveyor_Module_LuV, 'C', OrePrefixes.circuit.get(Materials.Master), 'W', OrePrefixes.cableGt01.get(Materials.VanadiumGallium), 'B', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_ZPM_Boxinator.get(1L), bitsd, new Object[]{"BCB", "RMV", aTextWireCoil, 'M', ItemList.Hull_ZPM, 'R', ItemList.Robot_Arm_ZPM, 'V', ItemList.Conveyor_Module_ZPM, 'C', OrePrefixes.circuit.get(Materials.Ultimate), 'W', OrePrefixes.cableGt01.get(Materials.Naquadah), 'B', OreDictNames.craftingChest}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_UV_Boxinator.get(1L), bitsd, new Object[]{"BCB", "RMV", aTextWireCoil, 'M', ItemList.Hull_UV, 'R', ItemList.Robot_Arm_UV, 'V', ItemList.Conveyor_Module_UV, 'C', OrePrefixes.circuit.get(Materials.SuperconductorUHV), 'W', OrePrefixes.cableGt01.get(Materials.NaquadahAlloy), 'B', OreDictNames.craftingChest}); - - ItemList.Machine_LV_Unboxinator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(411, "basicmachine.unboxinator.tier.01", "Basic Unpackager", 1, "Grabs things out of Boxes", GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes, 1, 2, 0, 0, 1, "Unpackager.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "UNBOXINATOR", new Object[]{"BCB", "VMR", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'B', OreDictNames.craftingChest}).getStackForm(1L)); - ItemList.Machine_MV_Unboxinator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(412, "basicmachine.unboxinator.tier.02", "Advanced Unpackager", 2, "Grabs things out of Boxes", GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes, 1, 2, 0, 0, 1, "Unpackager.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "UNBOXINATOR", new Object[]{"BCB", "VMR", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'B', OreDictNames.craftingChest}).getStackForm(1L)); - ItemList.Machine_HV_Unboxinator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(413, "basicmachine.unboxinator.tier.03", "Advanced Unpackager II", 3, "Grabs things out of Boxes", GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes, 1, 2, 0, 0, 1, "Unpackager.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "UNBOXINATOR", new Object[]{"BCB", "VMR", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'B', OreDictNames.craftingChest}).getStackForm(1L)); - ItemList.Machine_EV_Unboxinator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(414, "basicmachine.unboxinator.tier.04", "Advanced Unpackager III", 4, "Grabs things out of Boxes", GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes, 1, 2, 0, 0, 1, "Unpackager.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "UNBOXINATOR", new Object[]{"BCB", "VMR", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'B', OreDictNames.craftingChest}).getStackForm(1L)); - ItemList.Machine_IV_Unboxinator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(415, "basicmachine.unboxinator.tier.05", "Unboxinator", 5, "Grabs things out of Boxes", GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes, 1, 2, 0, 0, 1, "Unpackager.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "UNBOXINATOR", new Object[]{"BCB", "VMR", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'B', OreDictNames.craftingChest}).getStackForm(1L)); - ItemList.Machine_LuV_Unboxinator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(416, "basicmachine.unboxinator.tier.06", "Unboxinator", 6, "Grabs things out of Boxes", GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes, 1, 2, 0, 0, 1, "Unpackager.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "UNBOXINATOR", new Object[]{"BCB", "VMR", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'B', OreDictNames.craftingChest}).getStackForm(1L)); - ItemList.Machine_ZPM_Unboxinator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(417, "basicmachine.unboxinator.tier.07", "Unboxinator", 7, "Grabs things out of Boxes", GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes, 1, 2, 0, 0, 1, "Unpackager.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "UNBOXINATOR", new Object[]{"BCB", "VMR", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'B', OreDictNames.craftingChest}).getStackForm(1L)); - ItemList.Machine_UV_Unboxinator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(418, "basicmachine.unboxinator.tier.08", "Unboxinator", 8, "Grabs things out of Boxes", GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes, 1, 2, 0, 0, 1, "Unpackager.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "UNBOXINATOR", new Object[]{"BCB", "VMR", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'B', OreDictNames.craftingChest}).getStackForm(1L)); - - ItemList.Machine_LV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(421, "basicmachine.chemicalreactor.tier.01", "Basic Chemical Reactor", 1, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 2, 16000, 0, 1, "ChemicalReactor.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "CHEMICAL_REACTOR", new Object[]{"GRG", "WEW", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_MV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(422, "basicmachine.chemicalreactor.tier.02", "Advanced Chemical Reactor", 2, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 2, 16000, 0, 1, "ChemicalReactor.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "CHEMICAL_REACTOR", new Object[]{"GRG", "WEW", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_HV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(423, "basicmachine.chemicalreactor.tier.03", "Advanced Chemical Reactor II", 3, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 2, 16000, 0, 1, "ChemicalReactor.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "CHEMICAL_REACTOR", new Object[]{"GRG", "WEW", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.pipeMedium.get(Materials.Plastic)}).getStackForm(1L)); - ItemList.Machine_EV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(424, "basicmachine.chemicalreactor.tier.04", "Advanced Chemical Reactor III", 4, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 2, 16000, 0, 1, "ChemicalReactor.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "CHEMICAL_REACTOR", new Object[]{"GRG", "WEW", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.pipeLarge.get(Materials.Plastic)}).getStackForm(1L)); - ItemList.Machine_IV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(425, "basicmachine.chemicalreactor.tier.05", "Advanced Chemical Reactor IV", 5, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 2, 16000, 0, 1, "ChemicalReactor.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "CHEMICAL_REACTOR", new Object[]{"GRG", "WEW", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.pipeHuge.get(Materials.Plastic)}).getStackForm(1L)); - - ItemList.Machine_LV_FluidCanner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(431, "basicmachine.fluidcanner.tier.01", "Basic Fluid Canner", 1, "Puts Fluids into and out of Containers", GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes, 1, 1, 16000, 0, 1, "FluidCanner.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "FLUID_CANNER", new Object[]{"GCG", "GMG", "WPW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_MV_FluidCanner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(432, "basicmachine.fluidcanner.tier.02", "Advanced Fluid Canner", 2, "Puts Fluids into and out of Containers", GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes, 1, 1, 32000, 0, 1, "FluidCanner.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "FLUID_CANNER", new Object[]{"GCG", "GMG", "WPW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_HV_FluidCanner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(433, "basicmachine.fluidcanner.tier.03", "Quick Fluid Canner", 3, "Puts Fluids into and out of Containers", GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes, 1, 1, 48000, 0, 1, "FluidCanner.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "FLUID_CANNER", new Object[]{"GCG", "GMG", "WPW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_EV_FluidCanner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(434, "basicmachine.fluidcanner.tier.04", "Turbo Fluid Canner", 4, "Puts Fluids into and out of Containers", GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes, 1, 1, 64000, 0, 1, "FluidCanner.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "FLUID_CANNER", new Object[]{"GCG", "GMG", "WPW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_IV_FluidCanner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(435, "basicmachine.fluidcanner.tier.05", "Instant Fluid Canner", 5, "Puts Fluids into and out of Containers", GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes, 1, 1, 80000, 0, 1, "FluidCanner.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "FLUID_CANNER", new Object[]{"GCG", "GMG", "WPW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - - ItemList.Machine_LV_RockBreaker.set(new GT_MetaTileEntity_RockBreaker(441, "basicmachine.rockbreaker.tier.01", "Basic Rock Breaker", 1).getStackForm(1L)); - ItemList.Machine_MV_RockBreaker.set(new GT_MetaTileEntity_RockBreaker(442, "basicmachine.rockbreaker.tier.02", "Advanced Rock Breaker", 2).getStackForm(1L)); - ItemList.Machine_HV_RockBreaker.set(new GT_MetaTileEntity_RockBreaker(443, "basicmachine.rockbreaker.tier.03", "Advanced Rock Breaker II", 3).getStackForm(1L)); - ItemList.Machine_EV_RockBreaker.set(new GT_MetaTileEntity_RockBreaker(444, "basicmachine.rockbreaker.tier.04", "Advanced Rock Breaker III", 4).getStackForm(1L)); - ItemList.Machine_IV_RockBreaker.set(new GT_MetaTileEntity_RockBreaker(445, "basicmachine.rockbreaker.tier.05", "Cryogenic Magma Solidifier R-8200", 5).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Machine_LV_RockBreaker.get(1L), bitsd, new Object[]{"PED", aTextWireHull, "GGG", 'M', ItemList.Hull_LV, 'D', OreDictNames.craftingGrinder, 'E', ItemList.Electric_Motor_LV, 'P', ItemList.Electric_Piston_LV, 'C', OrePrefixes.circuit.get(Materials.Basic), 'W', OrePrefixes.cableGt01.get(Materials.Tin), 'G', new ItemStack(Blocks.glass, 1)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_MV_RockBreaker.get(1L), bitsd, new Object[]{"PED", aTextWireHull, "GGG", 'M', ItemList.Hull_MV, 'D', OreDictNames.craftingGrinder, 'E', ItemList.Electric_Motor_MV, 'P', ItemList.Electric_Piston_MV, 'C', OrePrefixes.circuit.get(Materials.Good), 'W', OrePrefixes.cableGt01.get(Materials.AnyCopper), 'G', new ItemStack(Blocks.glass, 1)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_HV_RockBreaker.get(1L), bitsd, new Object[]{"PED", aTextWireHull, "GGG", 'M', ItemList.Hull_HV, 'D', OreDictNames.craftingGrinder, 'E', ItemList.Electric_Motor_HV, 'P', ItemList.Electric_Piston_HV, 'C', OrePrefixes.circuit.get(Materials.Advanced), 'W', OrePrefixes.cableGt01.get(Materials.Gold), 'G', new ItemStack(Blocks.glass, 1)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_EV_RockBreaker.get(1L), bitsd, new Object[]{"PED", aTextWireHull, "GGG", 'M', ItemList.Hull_EV, 'D', OreDictNames.craftingGrinder, 'E', ItemList.Electric_Motor_EV, 'P', ItemList.Electric_Piston_EV, 'C', OrePrefixes.circuit.get(Materials.Data), 'W', OrePrefixes.cableGt01.get(Materials.Aluminium), 'G', new ItemStack(Blocks.glass, 1)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_IV_RockBreaker.get(1L), bitsd, new Object[]{"PED", aTextWireHull, "GGG", 'M', ItemList.Hull_IV, 'D', OreDictNames.craftingGrinder, 'E', ItemList.Electric_Motor_IV, 'P', ItemList.Electric_Piston_IV, 'C', OrePrefixes.circuit.get(Materials.Elite), 'W', OrePrefixes.cableGt01.get(Materials.Tungsten), 'G', new ItemStack(Blocks.glass, 1)}); - - ItemList.Machine_LV_Disassembler.set(new GT_MetaTileEntity_Disassembler(451, "basicmachine.disassembler.tier.01", "Basic Disassembler", 1).getStackForm(1L)); - ItemList.Machine_MV_Disassembler.set(new GT_MetaTileEntity_Disassembler(452, "basicmachine.disassembler.tier.02", "Advanced Disassembler", 2).getStackForm(1L)); - ItemList.Machine_HV_Disassembler.set(new GT_MetaTileEntity_Disassembler(453, "basicmachine.disassembler.tier.03", "Advanced Disassembler II", 3).getStackForm(1L)); - ItemList.Machine_EV_Disassembler.set(new GT_MetaTileEntity_Disassembler(454, "basicmachine.disassembler.tier.04", "Advanced Disassembler III", 4).getStackForm(1L)); - ItemList.Machine_IV_Disassembler.set(new GT_MetaTileEntity_Disassembler(455, "basicmachine.disassembler.tier.05", "Advanced Disassembler IV", 5).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Machine_LV_Disassembler.get(1L), bitsd, new Object[]{"ACA", aTextWireHull, "ACA", 'M', ItemList.Hull_LV, 'A', ItemList.Robot_Arm_LV, 'C', OrePrefixes.circuit.get(Materials.Basic), 'W', OrePrefixes.cableGt01.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_MV_Disassembler.get(1L), bitsd, new Object[]{"ACA", aTextWireHull, "ACA", 'M', ItemList.Hull_MV, 'A', ItemList.Robot_Arm_MV, 'C', OrePrefixes.circuit.get(Materials.Good), 'W', OrePrefixes.cableGt01.get(Materials.AnyCopper)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_HV_Disassembler.get(1L), bitsd, new Object[]{"ACA", aTextWireHull, "ACA", 'M', ItemList.Hull_HV, 'A', ItemList.Robot_Arm_HV, 'C', OrePrefixes.circuit.get(Materials.Advanced), 'W', OrePrefixes.cableGt01.get(Materials.Gold)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_EV_Disassembler.get(1L), bitsd, new Object[]{"ACA", aTextWireHull, "ACA", 'M', ItemList.Hull_EV, 'A', ItemList.Robot_Arm_EV, 'C', OrePrefixes.circuit.get(Materials.Data), 'W', OrePrefixes.cableGt01.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_IV_Disassembler.get(1L), bitsd, new Object[]{"ACA", aTextWireHull, "ACA", 'M', ItemList.Hull_IV, 'A', ItemList.Robot_Arm_IV, 'C', OrePrefixes.circuit.get(Materials.Elite), 'W', OrePrefixes.cableGt01.get(Materials.Tungsten)}); - - if(Loader.isModLoaded("Forestry") && Loader.isModLoaded("gendustry")) { - ItemList.Machine_IndustrialApiary.set(new GT_MetaTileEntity_IndustrialApiary(9399, "basicmachine.industrialapiary", "Industrial Apiary", 8).getStackForm(1L)); + ItemList.Machine_LV_AlloySmelter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 201, + "basicmachine.alloysmelter.tier.01", + "Basic Alloy Smelter", + 1, + "HighTech combination Smelter", + GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes, + 2, + 1, + 0, + 0, + 1, + "AlloySmelter.png", + SoundResource.IC2_MACHINES_INDUCTION_LOOP, + false, + false, + SpecialEffects.NONE, + "ALLOY_SMELTER", + new Object[] { + "ECE", + aTextCableHull, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE + }) + .getStackForm(1L)); + ItemList.Machine_MV_AlloySmelter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 202, + "basicmachine.alloysmelter.tier.02", + "Advanced Alloy Smelter", + 2, + "HighTech combination Smelter", + GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes, + 2, + 1, + 0, + 0, + 1, + "AlloySmelter.png", + SoundResource.IC2_MACHINES_INDUCTION_LOOP, + false, + false, + SpecialEffects.NONE, + "ALLOY_SMELTER", + new Object[] { + "ECE", + aTextCableHull, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE + }) + .getStackForm(1L)); + ItemList.Machine_HV_AlloySmelter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 203, + "basicmachine.alloysmelter.tier.03", + "Advanced Alloy Smelter II", + 3, + "HighTech combination Smelter", + GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes, + 2, + 1, + 0, + 0, + 1, + "AlloySmelter.png", + SoundResource.IC2_MACHINES_INDUCTION_LOOP, + false, + false, + SpecialEffects.NONE, + "ALLOY_SMELTER", + new Object[] { + "ECE", + aTextCableHull, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE + }) + .getStackForm(1L)); + ItemList.Machine_EV_AlloySmelter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 204, + "basicmachine.alloysmelter.tier.04", + "Advanced Alloy Smelter III", + 4, + "HighTech combination Smelter", + GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes, + 2, + 1, + 0, + 0, + 1, + "AlloySmelter.png", + SoundResource.IC2_MACHINES_INDUCTION_LOOP, + false, + false, + SpecialEffects.NONE, + "ALLOY_SMELTER", + new Object[] { + "ECE", + aTextCableHull, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE + }) + .getStackForm(1L)); + ItemList.Machine_IV_AlloySmelter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 205, + "basicmachine.alloysmelter.tier.05", + "Advanced Alloy Smelter IV", + 5, + "HighTech combination Smelter", + GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes, + 2, + 1, + 0, + 0, + 1, + "AlloySmelter.png", + SoundResource.IC2_MACHINES_INDUCTION_LOOP, + false, + false, + SpecialEffects.NONE, + "ALLOY_SMELTER", + new Object[] { + "ECE", + aTextCableHull, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Assembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 211, + "basicmachine.assembler.tier.01", + "Basic Assembling Machine", + 1, + "Avengers, Assemble!", + GT_Recipe.GT_Recipe_Map.sAssemblerRecipes, + 6, + 1, + 16000, + 0, + 1, + "Assembler.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "ASSEMBLER", + new Object[] { + "ACA", + "VMV", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'A', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_MV_Assembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 212, + "basicmachine.assembler.tier.02", + "Advanced Assembling Machine", + 2, + "Avengers, Assemble!", + GT_Recipe.GT_Recipe_Map.sAssemblerRecipes, + 9, + 1, + 24000, + 0, + 1, + "Assembler2.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "ASSEMBLER", + new Object[] { + "ACA", + "VMV", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'A', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_HV_Assembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 213, + "basicmachine.assembler.tier.03", + "Advanced Assembling Machine II", + 3, + "Avengers, Assemble!", + GT_Recipe.GT_Recipe_Map.sAssemblerRecipes, + 9, + 1, + 32000, + 0, + 1, + "Assembler2.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "ASSEMBLER", + new Object[] { + "ACA", + "VMV", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'A', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_EV_Assembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 214, + "basicmachine.assembler.tier.04", + "Advanced Assembling Machine III", + 4, + "Avengers, Assemble!", + GT_Recipe.GT_Recipe_Map.sAssemblerRecipes, + 9, + 1, + 48000, + 0, + 1, + "Assembler2.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "ASSEMBLER", + new Object[] { + "ACA", + "VMV", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'A', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_IV_Assembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 215, + "basicmachine.assembler.tier.05", + "Advanced Assembling Machine IV", + 5, + "Avengers, Assemble!", + GT_Recipe.GT_Recipe_Map.sAssemblerRecipes, + 9, + 1, + 64000, + 0, + 1, + "Assembler2.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "ASSEMBLER", + new Object[] { + "ACA", + "VMV", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'A', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Bender.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 221, + "basicmachine.bender.tier.01", + "Basic Bending Machine", + 1, + "Boo, he's bad! We want BENDER!!!", + GT_Recipe.GT_Recipe_Map.sBenderRecipes, + 2, + 1, + 0, + 0, + 1, + "Bender.png", + SoundResource.IC2_MACHINES_COMPRESSOR_OP, + false, + false, + SpecialEffects.NONE, + "BENDER", + new Object[] { + aTextPlateWrench, + aTextCableHull, + aTextMotorWire, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_MV_Bender.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 222, + "basicmachine.bender.tier.02", + "Advanced Bending Machine", + 2, + "Boo, he's bad! We want BENDER!!!", + GT_Recipe.GT_Recipe_Map.sBenderRecipes, + 2, + 1, + 0, + 0, + 1, + "Bender.png", + SoundResource.IC2_MACHINES_COMPRESSOR_OP, + false, + false, + SpecialEffects.NONE, + "BENDER", + new Object[] { + aTextPlateWrench, + aTextCableHull, + aTextMotorWire, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_HV_Bender.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 223, + "basicmachine.bender.tier.03", + "Advanced Bending Machine II", + 3, + "Boo, he's bad! We want BENDER!!!", + GT_Recipe.GT_Recipe_Map.sBenderRecipes, + 2, + 1, + 0, + 0, + 1, + "Bender.png", + SoundResource.IC2_MACHINES_COMPRESSOR_OP, + false, + false, + SpecialEffects.NONE, + "BENDER", + new Object[] { + aTextPlateWrench, + aTextCableHull, + aTextMotorWire, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_EV_Bender.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 224, + "basicmachine.bender.tier.04", + "Advanced Bending Machine III", + 4, + "Boo, he's bad! We want BENDER!!!", + GT_Recipe.GT_Recipe_Map.sBenderRecipes, + 2, + 1, + 0, + 0, + 1, + "Bender.png", + SoundResource.IC2_MACHINES_COMPRESSOR_OP, + false, + false, + SpecialEffects.NONE, + "BENDER", + new Object[] { + aTextPlateWrench, + aTextCableHull, + aTextMotorWire, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_IV_Bender.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 225, + "basicmachine.bender.tier.05", + "Advanced Bending Machine IV", + 5, + "Boo, he's bad! We want BENDER!!!", + GT_Recipe.GT_Recipe_Map.sBenderRecipes, + 2, + 1, + 0, + 0, + 1, + "Bender.png", + SoundResource.IC2_MACHINES_COMPRESSOR_OP, + false, + false, + SpecialEffects.NONE, + "BENDER", + new Object[] { + aTextPlateWrench, + aTextCableHull, + aTextMotorWire, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Canner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 231, + "basicmachine.canner.tier.01", + "Basic Canning Machine", + 1, + "Unmobile Food Canning Machine GTA4", + GT_Recipe.GT_Recipe_Map.sCannerRecipes, + 2, + 2, + 0, + 0, + 1, + "Canner.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "CANNER", + new Object[] { + aTextWirePump, + aTextCableHull, + "GGG", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_MV_Canner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 232, + "basicmachine.canner.tier.02", + "Advanced Canning Machine", + 2, + "Unmobile Food Canning Machine GTA4", + GT_Recipe.GT_Recipe_Map.sCannerRecipes, + 2, + 2, + 0, + 0, + 1, + "Canner.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "CANNER", + new Object[] { + aTextWirePump, + aTextCableHull, + "GGG", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_HV_Canner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 233, + "basicmachine.canner.tier.03", + "Advanced Canning Machine II", + 3, + "Unmobile Food Canning Machine GTA4", + GT_Recipe.GT_Recipe_Map.sCannerRecipes, + 2, + 2, + 0, + 0, + 1, + "Canner.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "CANNER", + new Object[] { + aTextWirePump, + aTextCableHull, + "GGG", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_EV_Canner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 234, + "basicmachine.canner.tier.04", + "Advanced Canning Machine III", + 4, + "Unmobile Food Canning Machine GTA4", + GT_Recipe.GT_Recipe_Map.sCannerRecipes, + 2, + 2, + 0, + 0, + 1, + "Canner.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "CANNER", + new Object[] { + aTextWirePump, + aTextCableHull, + "GGG", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_IV_Canner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 235, + "basicmachine.canner.tier.05", + "Advanced Canning Machine IV", + 5, + "Unmobile Food Canning Machine GTA4", + GT_Recipe.GT_Recipe_Map.sCannerRecipes, + 2, + 2, + 0, + 0, + 1, + "Canner.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "CANNER", + new Object[] { + aTextWirePump, + aTextCableHull, + "GGG", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Compressor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 241, + "basicmachine.compressor.tier.01", + "Basic Compressor", + 1, + "Compress-O-Matic C77", + GT_Recipe.GT_Recipe_Map.sCompressorRecipes, + 1, + 1, + 0, + 0, + 1, + "Compressor.png", + SoundResource.IC2_MACHINES_COMPRESSOR_OP, + false, + false, + SpecialEffects.NONE, + "COMPRESSOR", + new Object[] { + aTextWireCoil, + aTextPlateMotor, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_MV_Compressor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 242, + "basicmachine.compressor.tier.02", + "Advanced Compressor", + 2, + "Compress-O-Matic C77", + GT_Recipe.GT_Recipe_Map.sCompressorRecipes, + 1, + 1, + 0, + 0, + 1, + "Compressor.png", + SoundResource.IC2_MACHINES_COMPRESSOR_OP, + false, + false, + SpecialEffects.NONE, + "COMPRESSOR", + new Object[] { + aTextWireCoil, + aTextPlateMotor, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_HV_Compressor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 243, + "basicmachine.compressor.tier.03", + "Advanced Compressor II", + 3, + "Compress-O-Matic C77", + GT_Recipe.GT_Recipe_Map.sCompressorRecipes, + 1, + 1, + 0, + 0, + 1, + "Compressor.png", + SoundResource.IC2_MACHINES_COMPRESSOR_OP, + false, + false, + SpecialEffects.NONE, + "COMPRESSOR", + new Object[] { + aTextWireCoil, + aTextPlateMotor, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_EV_Compressor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 244, + "basicmachine.compressor.tier.04", + "Advanced Compressor III", + 4, + "Compress-O-Matic C77", + GT_Recipe.GT_Recipe_Map.sCompressorRecipes, + 1, + 1, + 0, + 0, + 1, + "Compressor.png", + SoundResource.IC2_MACHINES_COMPRESSOR_OP, + false, + false, + SpecialEffects.NONE, + "COMPRESSOR", + new Object[] { + aTextWireCoil, + aTextPlateMotor, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_IV_Compressor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 245, + "basicmachine.compressor.tier.05", + "Singularity Compressor", + 5, + "Compress-O-Matic C77", + GT_Recipe.GT_Recipe_Map.sCompressorRecipes, + 1, + 1, + 0, + 0, + 1, + "Compressor.png", + SoundResource.IC2_MACHINES_COMPRESSOR_OP, + false, + false, + SpecialEffects.NONE, + "COMPRESSOR", + new Object[] { + aTextWireCoil, + aTextPlateMotor, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Cutter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 251, + "basicmachine.cutter.tier.01", + "Basic Cutting Machine", + 1, + "Slice'N Dice", + GT_Recipe.GT_Recipe_Map.sCutterRecipes, + 1, + 2, + 8000, + 0, + 1, + "Cutter.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "CUTTER", + new Object[] { + "WCG", + "VMB", + "CWE", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, + 'B', + OreDictNames.craftingDiamondBlade + }) + .getStackForm(1L)); + ItemList.Machine_MV_Cutter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 252, + "basicmachine.cutter.tier.02", + "Advanced Cutting Machine", + 2, + "Slice'N Dice", + GT_Recipe.GT_Recipe_Map.sCutterRecipes, + 2, + 2, + 16000, + 0, + 1, + "Cutter2.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "CUTTER", + new Object[] { + "WCG", + "VMB", + "CWE", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, + 'B', + OreDictNames.craftingDiamondBlade + }) + .getStackForm(1L)); + ItemList.Machine_HV_Cutter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 253, + "basicmachine.cutter.tier.03", + "Advanced Cutting Machine II", + 3, + "Slice'N Dice", + GT_Recipe.GT_Recipe_Map.sCutterRecipes, + 2, + 4, + 32000, + 0, + 1, + "Cutter4.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "CUTTER", + new Object[] { + "WCG", + "VMB", + "CWE", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, + 'B', + OreDictNames.craftingDiamondBlade + }) + .getStackForm(1L)); + ItemList.Machine_EV_Cutter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 254, + "basicmachine.cutter.tier.04", + "Advanced Cutting Machine III", + 4, + "Slice'N Dice", + GT_Recipe.GT_Recipe_Map.sCutterRecipes, + 2, + 4, + 64000, + 0, + 1, + "Cutter4.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "CUTTER", + new Object[] { + "WCG", + "VMB", + "CWE", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, + 'B', + OreDictNames.craftingDiamondBlade + }) + .getStackForm(1L)); + ItemList.Machine_IV_Cutter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 255, + "basicmachine.cutter.tier.05", + "Advanced Cutting Machine IV", + 5, + "Slice'N Dice", + GT_Recipe.GT_Recipe_Map.sCutterRecipes, + 2, + 4, + 96000, + 0, + 1, + "Cutter4.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "CUTTER", + new Object[] { + "WCG", + "VMB", + "CWE", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, + 'B', + OreDictNames.craftingDiamondBlade + }) + .getStackForm(1L)); + + ItemList.Machine_LV_E_Furnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 261, + "basicmachine.e_furnace.tier.01", + "Basic Electric Furnace", + 1, + "Not like using a Commodore 64", + GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, + 1, + 1, + 0, + 0, + 1, + "E_Furnace.png", + SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, + false, + false, + SpecialEffects.NONE, + "ELECTRIC_FURNACE", + new Object[] { + "ECE", + aTextCableHull, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING + }) + .getStackForm(1L)); + ItemList.Machine_MV_E_Furnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 262, + "basicmachine.e_furnace.tier.02", + "Advanced Electric Furnace", + 2, + "Not like using a Commodore 64", + GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, + 1, + 1, + 0, + 0, + 1, + "E_Furnace.png", + SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, + false, + false, + SpecialEffects.NONE, + "ELECTRIC_FURNACE", + new Object[] { + "ECE", + aTextCableHull, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING + }) + .getStackForm(1L)); + ItemList.Machine_HV_E_Furnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 263, + "basicmachine.e_furnace.tier.03", + "Advanced Electric Furnace II", + 3, + "Not like using a Commodore 64", + GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, + 1, + 1, + 0, + 0, + 1, + "E_Furnace.png", + SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, + false, + false, + SpecialEffects.NONE, + "ELECTRIC_FURNACE", + new Object[] { + "ECE", + aTextCableHull, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING + }) + .getStackForm(1L)); + ItemList.Machine_EV_E_Furnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 264, + "basicmachine.e_furnace.tier.04", + "Advanced Electric Furnace III", + 4, + "Not like using a Commodore 64", + GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, + 1, + 1, + 0, + 0, + 1, + "E_Furnace.png", + SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, + false, + false, + SpecialEffects.NONE, + "ELECTRIC_FURNACE", + new Object[] { + "ECE", + aTextCableHull, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING + }) + .getStackForm(1L)); + ItemList.Machine_IV_E_Furnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 265, + "basicmachine.e_furnace.tier.05", + "Electron Exitement Processor", + 5, + "Not like using a Commodore 64", + GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, + 1, + 1, + 0, + 0, + 1, + "E_Furnace.png", + SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, + false, + false, + SpecialEffects.NONE, + "ELECTRIC_FURNACE", + new Object[] { + "ECE", + aTextCableHull, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Extractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 271, + "basicmachine.extractor.tier.01", + "Basic Extractor", + 1, + "Dejuicer-Device of Doom - D123", + GT_Recipe.GT_Recipe_Map.sExtractorRecipes, + 1, + 1, + 0, + 0, + 1, + "Extractor.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "EXTRACTOR", + new Object[] { + "GCG", + "EMP", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_MV_Extractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 272, + "basicmachine.extractor.tier.02", + "Advanced Extractor", + 2, + "Dejuicer-Device of Doom - D123", + GT_Recipe.GT_Recipe_Map.sExtractorRecipes, + 1, + 1, + 0, + 0, + 1, + "Extractor.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "EXTRACTOR", + new Object[] { + "GCG", + "EMP", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_HV_Extractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 273, + "basicmachine.extractor.tier.03", + "Advanced Extractor II", + 3, + "Dejuicer-Device of Doom - D123", + GT_Recipe.GT_Recipe_Map.sExtractorRecipes, + 1, + 1, + 0, + 0, + 1, + "Extractor.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "EXTRACTOR", + new Object[] { + "GCG", + "EMP", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_EV_Extractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 274, + "basicmachine.extractor.tier.04", + "Advanced Extractor III", + 4, + "Dejuicer-Device of Doom - D123", + GT_Recipe.GT_Recipe_Map.sExtractorRecipes, + 1, + 1, + 0, + 0, + 1, + "Extractor.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "EXTRACTOR", + new Object[] { + "GCG", + "EMP", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_IV_Extractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 275, + "basicmachine.extractor.tier.05", + "Vacuum Extractor", + 5, + "Dejuicer-Device of Doom - D123", + GT_Recipe.GT_Recipe_Map.sExtractorRecipes, + 1, + 1, + 0, + 0, + 1, + "Extractor.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "EXTRACTOR", + new Object[] { + "GCG", + "EMP", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Extruder.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 281, + "basicmachine.extruder.tier.01", + "Basic Extruder", + 1, + "Universal Machine for Metal Working", + GT_Recipe.GT_Recipe_Map.sExtruderRecipes, + 2, + 1, + 0, + 0, + 1, + "Extruder.png", + SoundResource.IC2_MACHINES_INDUCTION_LOOP, + false, + false, + SpecialEffects.NONE, + "EXTRUDER", + new Object[] { + "CCE", + "XMP", + "CCE", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'X', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE + }) + .getStackForm(1L)); + ItemList.Machine_MV_Extruder.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 282, + "basicmachine.extruder.tier.02", + "Advanced Extruder", + 2, + "Universal Machine for Metal Working", + GT_Recipe.GT_Recipe_Map.sExtruderRecipes, + 2, + 1, + 0, + 0, + 1, + "Extruder.png", + SoundResource.IC2_MACHINES_INDUCTION_LOOP, + false, + false, + SpecialEffects.NONE, + "EXTRUDER", + new Object[] { + "CCE", + "XMP", + "CCE", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'X', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE + }) + .getStackForm(1L)); + ItemList.Machine_HV_Extruder.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 283, + "basicmachine.extruder.tier.03", + "Advanced Extruder II", + 3, + "Universal Machine for Metal Working", + GT_Recipe.GT_Recipe_Map.sExtruderRecipes, + 2, + 1, + 0, + 0, + 1, + "Extruder.png", + SoundResource.IC2_MACHINES_INDUCTION_LOOP, + false, + false, + SpecialEffects.NONE, + "EXTRUDER", + new Object[] { + "CCE", + "XMP", + "CCE", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'X', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE + }) + .getStackForm(1L)); + ItemList.Machine_EV_Extruder.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 284, + "basicmachine.extruder.tier.04", + "Advanced Extruder III", + 4, + "Universal Machine for Metal Working", + GT_Recipe.GT_Recipe_Map.sExtruderRecipes, + 2, + 1, + 0, + 0, + 1, + "Extruder.png", + SoundResource.IC2_MACHINES_INDUCTION_LOOP, + false, + false, + SpecialEffects.NONE, + "EXTRUDER", + new Object[] { + "CCE", + "XMP", + "CCE", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'X', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE + }) + .getStackForm(1L)); + ItemList.Machine_IV_Extruder.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 285, + "basicmachine.extruder.tier.05", + "Advanced Extruder IV", + 5, + "Universal Machine for Metal Working", + GT_Recipe.GT_Recipe_Map.sExtruderRecipes, + 2, + 1, + 0, + 0, + 1, + "Extruder.png", + SoundResource.IC2_MACHINES_INDUCTION_LOOP, + false, + false, + SpecialEffects.NONE, + "EXTRUDER", + new Object[] { + "CCE", + "XMP", + "CCE", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'X', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Lathe.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 291, + "basicmachine.lathe.tier.01", + "Basic Lathe", + 1, + "Produces Rods more efficiently", + GT_Recipe.GT_Recipe_Map.sLatheRecipes, + 1, + 2, + 0, + 0, + 1, + "Lathe.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "LATHE", + new Object[] { + aTextWireCoil, + "EMD", + "CWP", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'D', + OrePrefixes.gem.get(Materials.Diamond) + }) + .getStackForm(1L)); + ItemList.Machine_MV_Lathe.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 292, + "basicmachine.lathe.tier.02", + "Advanced Lathe", + 2, + "Produces Rods more efficiently", + GT_Recipe.GT_Recipe_Map.sLatheRecipes, + 1, + 2, + 0, + 0, + 1, + "Lathe.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "LATHE", + new Object[] { + aTextWireCoil, + "EMD", + "CWP", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'D', + OrePrefixes.gemFlawless.get(Materials.Diamond) + }) + .getStackForm(1L)); + ItemList.Machine_HV_Lathe.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 293, + "basicmachine.lathe.tier.03", + "Advanced Lathe II", + 3, + "Produces Rods more efficiently", + GT_Recipe.GT_Recipe_Map.sLatheRecipes, + 1, + 2, + 0, + 0, + 1, + "Lathe.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "LATHE", + new Object[] { + aTextWireCoil, + "EMD", + "CWP", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'D', + OreDictNames.craftingIndustrialDiamond + }) + .getStackForm(1L)); + ItemList.Machine_EV_Lathe.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 294, + "basicmachine.lathe.tier.04", + "Advanced Lathe III", + 4, + "Produces Rods more efficiently", + GT_Recipe.GT_Recipe_Map.sLatheRecipes, + 1, + 2, + 0, + 0, + 1, + "Lathe.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "LATHE", + new Object[] { + aTextWireCoil, + "EMD", + "CWP", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'D', + OreDictNames.craftingIndustrialDiamond + }) + .getStackForm(1L)); + ItemList.Machine_IV_Lathe.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 295, + "basicmachine.lathe.tier.05", + "Advanced Lathe IV", + 5, + "Produces Rods more efficiently", + GT_Recipe.GT_Recipe_Map.sLatheRecipes, + 1, + 2, + 0, + 0, + 1, + "Lathe.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "LATHE", + new Object[] { + aTextWireCoil, + "EMD", + "CWP", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'D', + OreDictNames.craftingIndustrialDiamond + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Macerator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 301, + "basicmachine.macerator.tier.01", + "Basic Macerator", + 1, + "Schreddering your Ores", + GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, + 1, + 1, + 0, + 0, + 1, + "Macerator1.png", + SoundResource.IC2_MACHINES_MACERATOR_OP, + false, + false, + SpecialEffects.TOP_SMOKE, + "MACERATOR", + new Object[] { + "PEG", + "WWM", + "CCW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + OrePrefixes.gem.get(Materials.Diamond) + }) + .getStackForm(1L)); + ItemList.Machine_MV_Macerator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 302, + "basicmachine.macerator.tier.02", + "Advanced Macerator", + 2, + "Schreddering your Ores", + GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, + 1, + 1, + 0, + 0, + 1, + "Macerator1.png", + SoundResource.IC2_MACHINES_MACERATOR_OP, + false, + false, + SpecialEffects.TOP_SMOKE, + "MACERATOR", + new Object[] { + "PEG", + "WWM", + "CCW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + OrePrefixes.gemFlawless.get(Materials.Diamond) + }) + .getStackForm(1L)); + ItemList.Machine_HV_Macerator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 303, + "basicmachine.macerator.tier.03", + "Universal Macerator", + 3, + "Schreddering your Ores with Byproducts", + GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, + 1, + 2, + 0, + 0, + 1, + "Macerator2.png", + SoundResource.IC2_MACHINES_MACERATOR_OP, + false, + false, + SpecialEffects.TOP_SMOKE, + "PULVERIZER", + new Object[] { + "PEG", + "WWM", + "CCW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + OreDictNames.craftingGrinder + }) + .getStackForm(1L)); + ItemList.Machine_EV_Macerator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 304, + "basicmachine.macerator.tier.04", + "Universal Pulverizer", + 4, + "Schreddering your Ores with Byproducts", + GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, + 1, + 3, + 0, + 0, + 1, + "Macerator3.png", + SoundResource.IC2_MACHINES_MACERATOR_OP, + false, + false, + SpecialEffects.TOP_SMOKE, + "PULVERIZER", + new Object[] { + "PEG", + "WWM", + "CCW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + OreDictNames.craftingGrinder + }) + .getStackForm(1L)); + ItemList.Machine_IV_Macerator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 305, + "basicmachine.macerator.tier.05", + "Blend-O-Matic 9001", + 5, + "Schreddering your Ores with Byproducts", + GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, + 1, + 4, + 0, + 0, + 1, + "Macerator4.png", + SoundResource.IC2_MACHINES_MACERATOR_OP, + false, + false, + SpecialEffects.TOP_SMOKE, + "PULVERIZER", + new Object[] { + "PEG", + "WWM", + "CCW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + OreDictNames.craftingGrinder + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Microwave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 311, + "basicmachine.microwave.tier.01", + "Basic Microwave", + 1, + "Did you really read the instruction Manual?", + GT_Recipe.GT_Recipe_Map.sMicrowaveRecipes, + 1, + 1, + 0, + 0, + 1, + "E_Furnace.png", + SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, + false, + false, + SpecialEffects.NONE, + "MICROWAVE", + new Object[] { + "LWC", + "LMR", + "LEC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'L', + OrePrefixes.plate.get(Materials.Lead) + }) + .getStackForm(1L)); + ItemList.Machine_MV_Microwave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 312, + "basicmachine.microwave.tier.02", + "Advanced Microwave", + 2, + "Did you really read the instruction Manual?", + GT_Recipe.GT_Recipe_Map.sMicrowaveRecipes, + 1, + 1, + 0, + 0, + 1, + "E_Furnace.png", + SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, + false, + false, + SpecialEffects.NONE, + "MICROWAVE", + new Object[] { + "LWC", + "LMR", + "LEC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'L', + OrePrefixes.plate.get(Materials.Lead) + }) + .getStackForm(1L)); + ItemList.Machine_HV_Microwave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 313, + "basicmachine.microwave.tier.03", + "Advanced Microwave II", + 3, + "Did you really read the instruction Manual?", + GT_Recipe.GT_Recipe_Map.sMicrowaveRecipes, + 1, + 1, + 0, + 0, + 1, + "E_Furnace.png", + SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, + false, + false, + SpecialEffects.NONE, + "MICROWAVE", + new Object[] { + "LWC", + "LMR", + "LEC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'L', + OrePrefixes.plate.get(Materials.Lead) + }) + .getStackForm(1L)); + ItemList.Machine_EV_Microwave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 314, + "basicmachine.microwave.tier.04", + "Advanced Microwave III", + 4, + "Did you really read the instruction Manual?", + GT_Recipe.GT_Recipe_Map.sMicrowaveRecipes, + 1, + 1, + 0, + 0, + 1, + "E_Furnace.png", + SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, + false, + false, + SpecialEffects.NONE, + "MICROWAVE", + new Object[] { + "LWC", + "LMR", + "LEC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'L', + OrePrefixes.plate.get(Materials.Lead) + }) + .getStackForm(1L)); + ItemList.Machine_IV_Microwave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 315, + "basicmachine.microwave.tier.05", + "Advanced Microwave IV", + 5, + "Did you really read the instruction Manual?", + GT_Recipe.GT_Recipe_Map.sMicrowaveRecipes, + 1, + 1, + 0, + 0, + 1, + "E_Furnace.png", + SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, + false, + false, + SpecialEffects.NONE, + "MICROWAVE", + new Object[] { + "LWC", + "LMR", + "LEC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'L', + OrePrefixes.plate.get(Materials.Lead) + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Printer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 321, + "basicmachine.printer.tier.01", + "Basic Printer", + 1, + "It can copy Books and paint Stuff", + GT_Recipe.GT_Recipe_Map.sPrinterRecipes, + 1, + 1, + 16000, + 0, + 1, + "Printer.png", + SoundResource.IC2_MACHINES_COMPRESSOR_OP, + false, + false, + SpecialEffects.TOP_SMOKE, + "PRINTER", + new Object[] { + aTextMotorWire, + aTextCableHull, + "WEW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_MV_Printer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 322, + "basicmachine.printer.tier.02", + "Advanced Printer", + 2, + "It can copy Books and paint Stuff", + GT_Recipe.GT_Recipe_Map.sPrinterRecipes, + 1, + 1, + 16000, + 0, + 1, + "Printer.png", + SoundResource.IC2_MACHINES_COMPRESSOR_OP, + false, + false, + SpecialEffects.TOP_SMOKE, + "PRINTER", + new Object[] { + aTextMotorWire, + aTextCableHull, + "WEW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_HV_Printer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 323, + "basicmachine.printer.tier.03", + "Advanced Printer II", + 3, + "It can copy Books and paint Stuff", + GT_Recipe.GT_Recipe_Map.sPrinterRecipes, + 1, + 1, + 16000, + 0, + 1, + "Printer.png", + SoundResource.IC2_MACHINES_COMPRESSOR_OP, + false, + false, + SpecialEffects.TOP_SMOKE, + "PRINTER", + new Object[] { + aTextMotorWire, + aTextCableHull, + "WEW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_EV_Printer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 324, + "basicmachine.printer.tier.04", + "Advanced Printer III", + 4, + "It can copy Books and paint Stuff", + GT_Recipe.GT_Recipe_Map.sPrinterRecipes, + 1, + 1, + 16000, + 0, + 1, + "Printer.png", + SoundResource.IC2_MACHINES_COMPRESSOR_OP, + false, + false, + SpecialEffects.TOP_SMOKE, + "PRINTER", + new Object[] { + aTextMotorWire, + aTextCableHull, + "WEW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_IV_Printer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 325, + "basicmachine.printer.tier.05", + "Advanced Printer IV", + 5, + "It can copy Books and paint Stuff", + GT_Recipe.GT_Recipe_Map.sPrinterRecipes, + 1, + 1, + 16000, + 0, + 1, + "Printer.png", + SoundResource.IC2_MACHINES_COMPRESSOR_OP, + false, + false, + SpecialEffects.TOP_SMOKE, + "PRINTER", + new Object[] { + aTextMotorWire, + aTextCableHull, + "WEW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_LuV_Printer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 326, + "basicmachine.printer.tier.06", + "Advanced Printer V", + 6, + "It can copy Books and paint Stuff", + GT_Recipe.GT_Recipe_Map.sPrinterRecipes, + 1, + 1, + 16000, + 0, + 1, + "Printer.png", + SoundResource.IC2_MACHINES_COMPRESSOR_OP, + false, + false, + SpecialEffects.TOP_SMOKE, + "PRINTER", + new Object[] { + aTextMotorWire, + aTextCableHull, + "WEW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_ZPM_Printer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 327, + "basicmachine.printer.tier.07", + "Advanced Printer VI", + 7, + "It can copy Books and paint Stuff", + GT_Recipe.GT_Recipe_Map.sPrinterRecipes, + 1, + 1, + 16000, + 0, + 1, + "Printer.png", + SoundResource.IC2_MACHINES_COMPRESSOR_OP, + false, + false, + SpecialEffects.TOP_SMOKE, + "PRINTER", + new Object[] { + aTextMotorWire, + aTextCableHull, + "WEW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_UV_Printer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 328, + "basicmachine.printer.tier.08", + "Advanced Printer VII", + 8, + "It can copy Books and paint Stuff", + GT_Recipe.GT_Recipe_Map.sPrinterRecipes, + 1, + 1, + 16000, + 0, + 1, + "Printer.png", + SoundResource.IC2_MACHINES_COMPRESSOR_OP, + false, + false, + SpecialEffects.TOP_SMOKE, + "PRINTER", + new Object[] { + aTextMotorWire, + aTextCableHull, + "WEW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Recycler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 331, + "basicmachine.recycler.tier.01", + "Basic Recycler", + 1, + "Compress, burn, obliterate and filter EVERYTHING", + GT_Recipe.GT_Recipe_Map.sRecyclerRecipes, + 1, + 1, + 0, + 0, + 1, + "Recycler.png", + SoundResource.IC2_MACHINES_RECYCLER_OP, + false, + false, + SpecialEffects.NONE, + "RECYCLER", + new Object[] { + "GCG", + aTextPlateMotor, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + OrePrefixes.dust.get(Materials.Glowstone) + }) + .getStackForm(1L)); + ItemList.Machine_MV_Recycler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 332, + "basicmachine.recycler.tier.02", + "Advanced Recycler", + 2, + "Compress, burn, obliterate and filter EVERYTHING", + GT_Recipe.GT_Recipe_Map.sRecyclerRecipes, + 1, + 1, + 0, + 0, + 1, + "Recycler.png", + SoundResource.IC2_MACHINES_RECYCLER_OP, + false, + false, + SpecialEffects.NONE, + "RECYCLER", + new Object[] { + "GCG", + aTextPlateMotor, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + OrePrefixes.dust.get(Materials.Glowstone) + }) + .getStackForm(1L)); + ItemList.Machine_HV_Recycler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 333, + "basicmachine.recycler.tier.03", + "Advanced Recycler II", + 3, + "Compress, burn, obliterate and filter EVERYTHING", + GT_Recipe.GT_Recipe_Map.sRecyclerRecipes, + 1, + 1, + 0, + 0, + 1, + "Recycler.png", + SoundResource.IC2_MACHINES_RECYCLER_OP, + false, + false, + SpecialEffects.NONE, + "RECYCLER", + new Object[] { + "GCG", + aTextPlateMotor, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + OrePrefixes.dust.get(Materials.Glowstone) + }) + .getStackForm(1L)); + ItemList.Machine_EV_Recycler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 334, + "basicmachine.recycler.tier.04", + "Advanced Recycler III", + 4, + "Compress, burn, obliterate and filter EVERYTHING", + GT_Recipe.GT_Recipe_Map.sRecyclerRecipes, + 1, + 1, + 0, + 0, + 1, + "Recycler.png", + SoundResource.IC2_MACHINES_RECYCLER_OP, + false, + false, + SpecialEffects.NONE, + "RECYCLER", + new Object[] { + "GCG", + aTextPlateMotor, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + OrePrefixes.dust.get(Materials.Glowstone) + }) + .getStackForm(1L)); + ItemList.Machine_IV_Recycler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 335, + "basicmachine.recycler.tier.05", + "The Oblitterator", + 5, + "Compress, burn, obliterate and filter EVERYTHING", + GT_Recipe.GT_Recipe_Map.sRecyclerRecipes, + 1, + 1, + 0, + 0, + 1, + "Recycler.png", + SoundResource.IC2_MACHINES_RECYCLER_OP, + false, + false, + SpecialEffects.NONE, + "RECYCLER", + new Object[] { + "GCG", + aTextPlateMotor, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + OrePrefixes.dust.get(Materials.Glowstone) + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Scanner.set( + new GT_MetaTileEntity_Scanner(341, "basicmachine.scanner.tier.01", "Basic Scanner", 1) + .getStackForm(1L)); + ItemList.Machine_MV_Scanner.set( + new GT_MetaTileEntity_Scanner(342, "basicmachine.scanner.tier.02", "Advanced Scanner", 2) + .getStackForm(1L)); + ItemList.Machine_HV_Scanner.set( + new GT_MetaTileEntity_Scanner(343, "basicmachine.scanner.tier.03", "Advanced Scanner II", 3) + .getStackForm(1L)); + ItemList.Machine_EV_Scanner.set( + new GT_MetaTileEntity_Scanner(344, "basicmachine.scanner.tier.04", "Advanced Scanner III", 4) + .getStackForm(1L)); + ItemList.Machine_IV_Scanner.set( + new GT_MetaTileEntity_Scanner(345, "basicmachine.scanner.tier.05", "Advanced Scanner IV", 5) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Machine_LV_Scanner.get(1L), bitsd, new Object[] { + "CTC", + aTextWireHull, + "CRC", + 'M', + ItemList.Hull_LV, + 'T', + ItemList.Emitter_LV, + 'R', + ItemList.Sensor_LV, + 'C', + OrePrefixes.circuit.get(Materials.Good), + 'W', + OrePrefixes.cableGt01.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_MV_Scanner.get(1L), bitsd, new Object[] { + "CTC", + aTextWireHull, + "CRC", + 'M', + ItemList.Hull_MV, + 'T', + ItemList.Emitter_MV, + 'R', + ItemList.Sensor_MV, + 'C', + OrePrefixes.circuit.get(Materials.Advanced), + 'W', + OrePrefixes.cableGt01.get(Materials.AnyCopper) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_HV_Scanner.get(1L), bitsd, new Object[] { + "CTC", + aTextWireHull, + "CRC", + 'M', + ItemList.Hull_HV, + 'T', + ItemList.Emitter_HV, + 'R', + ItemList.Sensor_HV, + 'C', + OrePrefixes.circuit.get(Materials.Data), + 'W', + OrePrefixes.cableGt01.get(Materials.Gold) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_EV_Scanner.get(1L), bitsd, new Object[] { + "CTC", + aTextWireHull, + "CRC", + 'M', + ItemList.Hull_EV, + 'T', + ItemList.Emitter_EV, + 'R', + ItemList.Sensor_EV, + 'C', + OrePrefixes.circuit.get(Materials.Elite), + 'W', + OrePrefixes.cableGt01.get(Materials.Aluminium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_IV_Scanner.get(1L), bitsd, new Object[] { + "CTC", + aTextWireHull, + "CRC", + 'M', + ItemList.Hull_IV, + 'T', + ItemList.Emitter_IV, + 'R', + ItemList.Sensor_IV, + 'C', + OrePrefixes.circuit.get(Materials.Master), + 'W', + OrePrefixes.cableGt01.get(Materials.Tungsten) + }); + + ItemList.Machine_LV_Wiremill.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 351, + "basicmachine.wiremill.tier.01", + "Basic Wiremill", + 1, + "Produces Wires more efficiently", + GT_Recipe.GT_Recipe_Map.sWiremillRecipes, + 1, + 1, + 0, + 0, + 1, + "Wiremill.png", + SoundResource.IC2_MACHINES_RECYCLER_OP, + false, + false, + SpecialEffects.NONE, + "WIREMILL", + new Object[] { + aTextMotorWire, + aTextCableHull, + aTextMotorWire, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_MV_Wiremill.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 352, + "basicmachine.wiremill.tier.02", + "Advanced Wiremill", + 2, + "Produces Wires more efficiently", + GT_Recipe.GT_Recipe_Map.sWiremillRecipes, + 1, + 1, + 0, + 0, + 1, + "Wiremill.png", + SoundResource.IC2_MACHINES_RECYCLER_OP, + false, + false, + SpecialEffects.NONE, + "WIREMILL", + new Object[] { + aTextMotorWire, + aTextCableHull, + aTextMotorWire, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_HV_Wiremill.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 353, + "basicmachine.wiremill.tier.03", + "Advanced Wiremill II", + 3, + "Produces Wires more efficiently", + GT_Recipe.GT_Recipe_Map.sWiremillRecipes, + 1, + 1, + 0, + 0, + 1, + "Wiremill.png", + SoundResource.IC2_MACHINES_RECYCLER_OP, + false, + false, + SpecialEffects.NONE, + "WIREMILL", + new Object[] { + aTextMotorWire, + aTextCableHull, + aTextMotorWire, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_EV_Wiremill.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 354, + "basicmachine.wiremill.tier.04", + "Advanced Wiremill III", + 4, + "Produces Wires more efficiently", + GT_Recipe.GT_Recipe_Map.sWiremillRecipes, + 1, + 1, + 0, + 0, + 1, + "Wiremill.png", + SoundResource.IC2_MACHINES_RECYCLER_OP, + false, + false, + SpecialEffects.NONE, + "WIREMILL", + new Object[] { + aTextMotorWire, + aTextCableHull, + aTextMotorWire, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_IV_Wiremill.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 355, + "basicmachine.wiremill.tier.05", + "Advanced Wiremill IV", + 5, + "Produces Wires more efficiently", + GT_Recipe.GT_Recipe_Map.sWiremillRecipes, + 1, + 1, + 0, + 0, + 1, + "Wiremill.png", + SoundResource.IC2_MACHINES_RECYCLER_OP, + false, + false, + SpecialEffects.NONE, + "WIREMILL", + new Object[] { + aTextMotorWire, + aTextCableHull, + aTextMotorWire, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Centrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 361, + "basicmachine.centrifuge.tier.01", + "Basic Centrifuge", + 1, + "Separating Molecules", + GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes, + 2, + 6, + 64000, + 0, + 1, + "Centrifuge.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "CENTRIFUGE", + new Object[] { + "CEC", + aTextWireHull, + "CEC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_MV_Centrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 362, + "basicmachine.centrifuge.tier.02", + "Advanced Centrifuge", + 2, + "Separating Molecules", + GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes, + 2, + 6, + 64000, + 0, + 1, + "Centrifuge.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "CENTRIFUGE", + new Object[] { + "CEC", + aTextWireHull, + "CEC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_HV_Centrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 363, + "basicmachine.centrifuge.tier.03", + "Turbo Centrifuge", + 3, + "Separating Molecules", + GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes, + 2, + 6, + 64000, + 0, + 1, + "Centrifuge.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "CENTRIFUGE", + new Object[] { + "CEC", + aTextWireHull, + "CEC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_EV_Centrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 364, + "basicmachine.centrifuge.tier.04", + "Molecular Separator", + 4, + "Separating Molecules", + GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes, + 2, + 6, + 64000, + 0, + 1, + "Centrifuge.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "CENTRIFUGE", + new Object[] { + "CEC", + aTextWireHull, + "CEC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_IV_Centrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 365, + "basicmachine.centrifuge.tier.05", + "Molecular Cyclone", + 5, + "Separating Molecules", + GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes, + 2, + 6, + 64000, + 0, + 1, + "Centrifuge.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "CENTRIFUGE", + new Object[] { + "CEC", + aTextWireHull, + "CEC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Electrolyzer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 371, + "basicmachine.electrolyzer.tier.01", + "Basic Electrolyzer", + 1, + "Electrolyzing Molecules", + GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes, + 2, + 6, + 64000, + 0, + 1, + "Electrolyzer.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "ELECTROLYZER", + new Object[] { + "IGI", + "IMI", + "CWC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'I', + OrePrefixes.wireGt01.get(Materials.Gold), + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_MV_Electrolyzer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 372, + "basicmachine.electrolyzer.tier.02", + "Advanced Electrolyzer", + 2, + "Electrolyzing Molecules", + GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes, + 2, + 6, + 64000, + 0, + 1, + "Electrolyzer.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "ELECTROLYZER", + new Object[] { + "IGI", + "IMI", + "CWC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'I', + OrePrefixes.wireGt01.get(Materials.Silver), + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_HV_Electrolyzer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 373, + "basicmachine.electrolyzer.tier.03", + "Advanced Electrolyzer II", + 3, + "Electrolyzing Molecules", + GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes, + 2, + 6, + 64000, + 0, + 1, + "Electrolyzer.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "ELECTROLYZER", + new Object[] { + "IGI", + "IMI", + "CWC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'I', + OrePrefixes.wireGt01.get(Materials.Electrum), + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_EV_Electrolyzer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 374, + "basicmachine.electrolyzer.tier.04", + "Advanced Electrolyzer III", + 4, + "Electrolyzing Molecules", + GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes, + 2, + 6, + 64000, + 0, + 1, + "Electrolyzer.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "ELECTROLYZER", + new Object[] { + "IGI", + "IMI", + "CWC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'I', + OrePrefixes.wireGt01.get(Materials.Platinum), + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_IV_Electrolyzer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 375, + "basicmachine.electrolyzer.tier.05", + "Molecular Disintegrator E-4908", + 5, + "Electrolyzing Molecules", + GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes, + 2, + 6, + 64000, + 0, + 1, + "Electrolyzer.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "ELECTROLYZER", + new Object[] { + "IGI", + "IMI", + "CWC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'I', + OrePrefixes.wireGt01.get(Materials.HSSG), + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + + ItemList.Machine_LV_ThermalCentrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 381, + "basicmachine.thermalcentrifuge.tier.01", + "Basic Thermal Centrifuge", + 1, + "Separating Ores more precisely", + GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, + 1, + 3, + 0, + 0, + 1, + "ThermalCentrifuge.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "THERMAL_CENTRIFUGE", + new Object[] { + "CEC", + "OMO", + "WEW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'O', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE + }) + .getStackForm(1L)); + ItemList.Machine_MV_ThermalCentrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 382, + "basicmachine.thermalcentrifuge.tier.02", + "Advanced Thermal Centrifuge", + 2, + "Separating Ores more precisely", + GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, + 1, + 3, + 0, + 0, + 1, + "ThermalCentrifuge.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "THERMAL_CENTRIFUGE", + new Object[] { + "CEC", + "OMO", + "WEW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'O', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE + }) + .getStackForm(1L)); + ItemList.Machine_HV_ThermalCentrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 383, + "basicmachine.thermalcentrifuge.tier.03", + "Advanced Thermal Centrifuge II", + 3, + "Separating Ores more precisely", + GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, + 1, + 3, + 0, + 0, + 1, + "ThermalCentrifuge.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "THERMAL_CENTRIFUGE", + new Object[] { + "CEC", + "OMO", + "WEW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'O', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE + }) + .getStackForm(1L)); + ItemList.Machine_EV_ThermalCentrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 384, + "basicmachine.thermalcentrifuge.tier.04", + "Advanced Thermal Centrifuge III", + 4, + "Separating Ores more precisely", + GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, + 1, + 3, + 0, + 0, + 1, + "ThermalCentrifuge.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "THERMAL_CENTRIFUGE", + new Object[] { + "CEC", + "OMO", + "WEW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'O', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE + }) + .getStackForm(1L)); + ItemList.Machine_IV_ThermalCentrifuge.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 385, + "basicmachine.thermalcentrifuge.tier.05", + "Blaze Sweatshop T-6350", + 5, + "Separating Ores more precisely", + GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, + 1, + 3, + 0, + 0, + 1, + "ThermalCentrifuge.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "THERMAL_CENTRIFUGE", + new Object[] { + "CEC", + "OMO", + "WEW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'O', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE + }) + .getStackForm(1L)); + + ItemList.Machine_LV_OreWasher.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 391, + "basicmachine.orewasher.tier.01", + "Basic Ore Washing Plant", + 1, + "Getting more Byproducts from your Ores", + GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, + 1, + 3, + 16000, + 0, + 1, + "OreWasher.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "ORE_WASHER", + new Object[] { + "RGR", + "CEC", + aTextWireHull, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP + }) + .getStackForm(1L)); + ItemList.Machine_MV_OreWasher.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 392, + "basicmachine.orewasher.tier.02", + "Advanced Ore Washing Plant", + 2, + "Getting more Byproducts from your Ores", + GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, + 1, + 3, + 24000, + 0, + 1, + "OreWasher.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "ORE_WASHER", + new Object[] { + "RGR", + "CEC", + aTextWireHull, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP + }) + .getStackForm(1L)); + ItemList.Machine_HV_OreWasher.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 393, + "basicmachine.orewasher.tier.03", + "Advanced Ore Washing Plant II", + 3, + "Getting more Byproducts from your Ores", + GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, + 1, + 3, + 32000, + 0, + 1, + "OreWasher.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "ORE_WASHER", + new Object[] { + "RGR", + "CEC", + aTextWireHull, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP + }) + .getStackForm(1L)); + ItemList.Machine_EV_OreWasher.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 394, + "basicmachine.orewasher.tier.04", + "Advanced Ore Washing Plant III", + 4, + "Getting more Byproducts from your Ores", + GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, + 1, + 3, + 40000, + 0, + 1, + "OreWasher.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "ORE_WASHER", + new Object[] { + "RGR", + "CEC", + aTextWireHull, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP + }) + .getStackForm(1L)); + ItemList.Machine_IV_OreWasher.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 395, + "basicmachine.orewasher.tier.05", + "Repurposed Laundry-Washer I-360", + 5, + "Getting more Byproducts from your Ores", + GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, + 1, + 3, + 48000, + 0, + 1, + "OreWasher.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "ORE_WASHER", + new Object[] { + "RGR", + "CEC", + aTextWireHull, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Boxinator.set( + new GT_MetaTileEntity_Boxinator(401, "basicmachine.boxinator.tier.01", "Basic Packager", 1) + .getStackForm(1L)); + ItemList.Machine_MV_Boxinator.set( + new GT_MetaTileEntity_Boxinator(402, "basicmachine.boxinator.tier.02", "Advanced Packager", 2) + .getStackForm(1L)); + ItemList.Machine_HV_Boxinator.set( + new GT_MetaTileEntity_Boxinator(403, "basicmachine.boxinator.tier.03", "Advanced Packager II", 3) + .getStackForm(1L)); + ItemList.Machine_EV_Boxinator.set( + new GT_MetaTileEntity_Boxinator(404, "basicmachine.boxinator.tier.04", "Advanced Packager III", 4) + .getStackForm(1L)); + ItemList.Machine_IV_Boxinator.set( + new GT_MetaTileEntity_Boxinator(405, "basicmachine.boxinator.tier.05", "Boxinator", 5) + .getStackForm(1L)); + ItemList.Machine_LuV_Boxinator.set( + new GT_MetaTileEntity_Boxinator(406, "basicmachine.boxinator.tier.06", "Boxinator", 6) + .getStackForm(1L)); + ItemList.Machine_ZPM_Boxinator.set( + new GT_MetaTileEntity_Boxinator(407, "basicmachine.boxinator.tier.07", "Boxinator", 7) + .getStackForm(1L)); + ItemList.Machine_UV_Boxinator.set( + new GT_MetaTileEntity_Boxinator(408, "basicmachine.boxinator.tier.08", "Boxinator", 8) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Machine_LV_Boxinator.get(1L), bitsd, new Object[] { + "BCB", + "RMV", + aTextWireCoil, + 'M', + ItemList.Hull_LV, + 'R', + ItemList.Robot_Arm_LV, + 'V', + ItemList.Conveyor_Module_LV, + 'C', + OrePrefixes.circuit.get(Materials.Basic), + 'W', + OrePrefixes.cableGt01.get(Materials.Tin), + 'B', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_MV_Boxinator.get(1L), bitsd, new Object[] { + "BCB", + "RMV", + aTextWireCoil, + 'M', + ItemList.Hull_MV, + 'R', + ItemList.Robot_Arm_MV, + 'V', + ItemList.Conveyor_Module_MV, + 'C', + OrePrefixes.circuit.get(Materials.Good), + 'W', + OrePrefixes.cableGt01.get(Materials.AnyCopper), + 'B', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_HV_Boxinator.get(1L), bitsd, new Object[] { + "BCB", + "RMV", + aTextWireCoil, + 'M', + ItemList.Hull_HV, + 'R', + ItemList.Robot_Arm_HV, + 'V', + ItemList.Conveyor_Module_HV, + 'C', + OrePrefixes.circuit.get(Materials.Advanced), + 'W', + OrePrefixes.cableGt01.get(Materials.Gold), + 'B', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_EV_Boxinator.get(1L), bitsd, new Object[] { + "BCB", + "RMV", + aTextWireCoil, + 'M', + ItemList.Hull_EV, + 'R', + ItemList.Robot_Arm_EV, + 'V', + ItemList.Conveyor_Module_EV, + 'C', + OrePrefixes.circuit.get(Materials.Data), + 'W', + OrePrefixes.cableGt01.get(Materials.Aluminium), + 'B', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_IV_Boxinator.get(1L), bitsd, new Object[] { + "BCB", + "RMV", + aTextWireCoil, + 'M', + ItemList.Hull_IV, + 'R', + ItemList.Robot_Arm_IV, + 'V', + ItemList.Conveyor_Module_IV, + 'C', + OrePrefixes.circuit.get(Materials.Elite), + 'W', + OrePrefixes.cableGt01.get(Materials.Tungsten), + 'B', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_LuV_Boxinator.get(1L), bitsd, new Object[] { + "BCB", + "RMV", + aTextWireCoil, + 'M', + ItemList.Hull_LuV, + 'R', + ItemList.Robot_Arm_LuV, + 'V', + ItemList.Conveyor_Module_LuV, + 'C', + OrePrefixes.circuit.get(Materials.Master), + 'W', + OrePrefixes.cableGt01.get(Materials.VanadiumGallium), + 'B', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_ZPM_Boxinator.get(1L), bitsd, new Object[] { + "BCB", + "RMV", + aTextWireCoil, + 'M', + ItemList.Hull_ZPM, + 'R', + ItemList.Robot_Arm_ZPM, + 'V', + ItemList.Conveyor_Module_ZPM, + 'C', + OrePrefixes.circuit.get(Materials.Ultimate), + 'W', + OrePrefixes.cableGt01.get(Materials.Naquadah), + 'B', + OreDictNames.craftingChest + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_UV_Boxinator.get(1L), bitsd, new Object[] { + "BCB", + "RMV", + aTextWireCoil, + 'M', + ItemList.Hull_UV, + 'R', + ItemList.Robot_Arm_UV, + 'V', + ItemList.Conveyor_Module_UV, + 'C', + OrePrefixes.circuit.get(Materials.SuperconductorUHV), + 'W', + OrePrefixes.cableGt01.get(Materials.NaquadahAlloy), + 'B', + OreDictNames.craftingChest + }); + + ItemList.Machine_LV_Unboxinator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 411, + "basicmachine.unboxinator.tier.01", + "Basic Unpackager", + 1, + "Grabs things out of Boxes", + GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes, + 1, + 2, + 0, + 0, + 1, + "Unpackager.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "UNBOXINATOR", + new Object[] { + "BCB", + "VMR", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'B', + OreDictNames.craftingChest + }) + .getStackForm(1L)); + ItemList.Machine_MV_Unboxinator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 412, + "basicmachine.unboxinator.tier.02", + "Advanced Unpackager", + 2, + "Grabs things out of Boxes", + GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes, + 1, + 2, + 0, + 0, + 1, + "Unpackager.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "UNBOXINATOR", + new Object[] { + "BCB", + "VMR", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'B', + OreDictNames.craftingChest + }) + .getStackForm(1L)); + ItemList.Machine_HV_Unboxinator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 413, + "basicmachine.unboxinator.tier.03", + "Advanced Unpackager II", + 3, + "Grabs things out of Boxes", + GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes, + 1, + 2, + 0, + 0, + 1, + "Unpackager.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "UNBOXINATOR", + new Object[] { + "BCB", + "VMR", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'B', + OreDictNames.craftingChest + }) + .getStackForm(1L)); + ItemList.Machine_EV_Unboxinator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 414, + "basicmachine.unboxinator.tier.04", + "Advanced Unpackager III", + 4, + "Grabs things out of Boxes", + GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes, + 1, + 2, + 0, + 0, + 1, + "Unpackager.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "UNBOXINATOR", + new Object[] { + "BCB", + "VMR", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'B', + OreDictNames.craftingChest + }) + .getStackForm(1L)); + ItemList.Machine_IV_Unboxinator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 415, + "basicmachine.unboxinator.tier.05", + "Unboxinator", + 5, + "Grabs things out of Boxes", + GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes, + 1, + 2, + 0, + 0, + 1, + "Unpackager.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "UNBOXINATOR", + new Object[] { + "BCB", + "VMR", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'B', + OreDictNames.craftingChest + }) + .getStackForm(1L)); + ItemList.Machine_LuV_Unboxinator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 416, + "basicmachine.unboxinator.tier.06", + "Unboxinator", + 6, + "Grabs things out of Boxes", + GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes, + 1, + 2, + 0, + 0, + 1, + "Unpackager.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "UNBOXINATOR", + new Object[] { + "BCB", + "VMR", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'B', + OreDictNames.craftingChest + }) + .getStackForm(1L)); + ItemList.Machine_ZPM_Unboxinator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 417, + "basicmachine.unboxinator.tier.07", + "Unboxinator", + 7, + "Grabs things out of Boxes", + GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes, + 1, + 2, + 0, + 0, + 1, + "Unpackager.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "UNBOXINATOR", + new Object[] { + "BCB", + "VMR", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'B', + OreDictNames.craftingChest + }) + .getStackForm(1L)); + ItemList.Machine_UV_Unboxinator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 418, + "basicmachine.unboxinator.tier.08", + "Unboxinator", + 8, + "Grabs things out of Boxes", + GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes, + 1, + 2, + 0, + 0, + 1, + "Unpackager.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "UNBOXINATOR", + new Object[] { + "BCB", + "VMR", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'B', + OreDictNames.craftingChest + }) + .getStackForm(1L)); + + ItemList.Machine_LV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 421, + "basicmachine.chemicalreactor.tier.01", + "Basic Chemical Reactor", + 1, + "Letting Chemicals react with each other", + GT_Recipe.GT_Recipe_Map.sChemicalRecipes, + 2, + 2, + 16000, + 0, + 1, + "ChemicalReactor.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "CHEMICAL_REACTOR", + new Object[] { + "GRG", + "WEW", + aTextCableHull, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_MV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 422, + "basicmachine.chemicalreactor.tier.02", + "Advanced Chemical Reactor", + 2, + "Letting Chemicals react with each other", + GT_Recipe.GT_Recipe_Map.sChemicalRecipes, + 2, + 2, + 16000, + 0, + 1, + "ChemicalReactor.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "CHEMICAL_REACTOR", + new Object[] { + "GRG", + "WEW", + aTextCableHull, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_HV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 423, + "basicmachine.chemicalreactor.tier.03", + "Advanced Chemical Reactor II", + 3, + "Letting Chemicals react with each other", + GT_Recipe.GT_Recipe_Map.sChemicalRecipes, + 2, + 2, + 16000, + 0, + 1, + "ChemicalReactor.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "CHEMICAL_REACTOR", + new Object[] { + "GRG", + "WEW", + aTextCableHull, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + OrePrefixes.pipeMedium.get(Materials.Plastic) + }) + .getStackForm(1L)); + ItemList.Machine_EV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 424, + "basicmachine.chemicalreactor.tier.04", + "Advanced Chemical Reactor III", + 4, + "Letting Chemicals react with each other", + GT_Recipe.GT_Recipe_Map.sChemicalRecipes, + 2, + 2, + 16000, + 0, + 1, + "ChemicalReactor.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "CHEMICAL_REACTOR", + new Object[] { + "GRG", + "WEW", + aTextCableHull, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + OrePrefixes.pipeLarge.get(Materials.Plastic) + }) + .getStackForm(1L)); + ItemList.Machine_IV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 425, + "basicmachine.chemicalreactor.tier.05", + "Advanced Chemical Reactor IV", + 5, + "Letting Chemicals react with each other", + GT_Recipe.GT_Recipe_Map.sChemicalRecipes, + 2, + 2, + 16000, + 0, + 1, + "ChemicalReactor.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "CHEMICAL_REACTOR", + new Object[] { + "GRG", + "WEW", + aTextCableHull, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + OrePrefixes.pipeHuge.get(Materials.Plastic) + }) + .getStackForm(1L)); + + ItemList.Machine_LV_FluidCanner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 431, + "basicmachine.fluidcanner.tier.01", + "Basic Fluid Canner", + 1, + "Puts Fluids into and out of Containers", + GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes, + 1, + 1, + 16000, + 0, + 1, + "FluidCanner.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "FLUID_CANNER", + new Object[] { + "GCG", + "GMG", + "WPW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_MV_FluidCanner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 432, + "basicmachine.fluidcanner.tier.02", + "Advanced Fluid Canner", + 2, + "Puts Fluids into and out of Containers", + GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes, + 1, + 1, + 32000, + 0, + 1, + "FluidCanner.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "FLUID_CANNER", + new Object[] { + "GCG", + "GMG", + "WPW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_HV_FluidCanner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 433, + "basicmachine.fluidcanner.tier.03", + "Quick Fluid Canner", + 3, + "Puts Fluids into and out of Containers", + GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes, + 1, + 1, + 48000, + 0, + 1, + "FluidCanner.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "FLUID_CANNER", + new Object[] { + "GCG", + "GMG", + "WPW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_EV_FluidCanner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 434, + "basicmachine.fluidcanner.tier.04", + "Turbo Fluid Canner", + 4, + "Puts Fluids into and out of Containers", + GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes, + 1, + 1, + 64000, + 0, + 1, + "FluidCanner.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "FLUID_CANNER", + new Object[] { + "GCG", + "GMG", + "WPW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_IV_FluidCanner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 435, + "basicmachine.fluidcanner.tier.05", + "Instant Fluid Canner", + 5, + "Puts Fluids into and out of Containers", + GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes, + 1, + 1, + 80000, + 0, + 1, + "FluidCanner.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "FLUID_CANNER", + new Object[] { + "GCG", + "GMG", + "WPW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + + ItemList.Machine_LV_RockBreaker.set( + new GT_MetaTileEntity_RockBreaker(441, "basicmachine.rockbreaker.tier.01", "Basic Rock Breaker", 1) + .getStackForm(1L)); + ItemList.Machine_MV_RockBreaker.set( + new GT_MetaTileEntity_RockBreaker(442, "basicmachine.rockbreaker.tier.02", "Advanced Rock Breaker", 2) + .getStackForm(1L)); + ItemList.Machine_HV_RockBreaker.set(new GT_MetaTileEntity_RockBreaker( + 443, "basicmachine.rockbreaker.tier.03", "Advanced Rock Breaker II", 3) + .getStackForm(1L)); + ItemList.Machine_EV_RockBreaker.set(new GT_MetaTileEntity_RockBreaker( + 444, "basicmachine.rockbreaker.tier.04", "Advanced Rock Breaker III", 4) + .getStackForm(1L)); + ItemList.Machine_IV_RockBreaker.set(new GT_MetaTileEntity_RockBreaker( + 445, "basicmachine.rockbreaker.tier.05", "Cryogenic Magma Solidifier R-8200", 5) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Machine_LV_RockBreaker.get(1L), bitsd, new Object[] { + "PED", + aTextWireHull, + "GGG", + 'M', + ItemList.Hull_LV, + 'D', + OreDictNames.craftingGrinder, + 'E', + ItemList.Electric_Motor_LV, + 'P', + ItemList.Electric_Piston_LV, + 'C', + OrePrefixes.circuit.get(Materials.Basic), + 'W', + OrePrefixes.cableGt01.get(Materials.Tin), + 'G', + new ItemStack(Blocks.glass, 1) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_MV_RockBreaker.get(1L), bitsd, new Object[] { + "PED", + aTextWireHull, + "GGG", + 'M', + ItemList.Hull_MV, + 'D', + OreDictNames.craftingGrinder, + 'E', + ItemList.Electric_Motor_MV, + 'P', + ItemList.Electric_Piston_MV, + 'C', + OrePrefixes.circuit.get(Materials.Good), + 'W', + OrePrefixes.cableGt01.get(Materials.AnyCopper), + 'G', + new ItemStack(Blocks.glass, 1) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_HV_RockBreaker.get(1L), bitsd, new Object[] { + "PED", + aTextWireHull, + "GGG", + 'M', + ItemList.Hull_HV, + 'D', + OreDictNames.craftingGrinder, + 'E', + ItemList.Electric_Motor_HV, + 'P', + ItemList.Electric_Piston_HV, + 'C', + OrePrefixes.circuit.get(Materials.Advanced), + 'W', + OrePrefixes.cableGt01.get(Materials.Gold), + 'G', + new ItemStack(Blocks.glass, 1) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_EV_RockBreaker.get(1L), bitsd, new Object[] { + "PED", + aTextWireHull, + "GGG", + 'M', + ItemList.Hull_EV, + 'D', + OreDictNames.craftingGrinder, + 'E', + ItemList.Electric_Motor_EV, + 'P', + ItemList.Electric_Piston_EV, + 'C', + OrePrefixes.circuit.get(Materials.Data), + 'W', + OrePrefixes.cableGt01.get(Materials.Aluminium), + 'G', + new ItemStack(Blocks.glass, 1) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_IV_RockBreaker.get(1L), bitsd, new Object[] { + "PED", + aTextWireHull, + "GGG", + 'M', + ItemList.Hull_IV, + 'D', + OreDictNames.craftingGrinder, + 'E', + ItemList.Electric_Motor_IV, + 'P', + ItemList.Electric_Piston_IV, + 'C', + OrePrefixes.circuit.get(Materials.Elite), + 'W', + OrePrefixes.cableGt01.get(Materials.Tungsten), + 'G', + new ItemStack(Blocks.glass, 1) + }); + + ItemList.Machine_LV_Disassembler.set( + new GT_MetaTileEntity_Disassembler(451, "basicmachine.disassembler.tier.01", "Basic Disassembler", 1) + .getStackForm(1L)); + ItemList.Machine_MV_Disassembler.set( + new GT_MetaTileEntity_Disassembler(452, "basicmachine.disassembler.tier.02", "Advanced Disassembler", 2) + .getStackForm(1L)); + ItemList.Machine_HV_Disassembler.set(new GT_MetaTileEntity_Disassembler( + 453, "basicmachine.disassembler.tier.03", "Advanced Disassembler II", 3) + .getStackForm(1L)); + ItemList.Machine_EV_Disassembler.set(new GT_MetaTileEntity_Disassembler( + 454, "basicmachine.disassembler.tier.04", "Advanced Disassembler III", 4) + .getStackForm(1L)); + ItemList.Machine_IV_Disassembler.set(new GT_MetaTileEntity_Disassembler( + 455, "basicmachine.disassembler.tier.05", "Advanced Disassembler IV", 5) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Machine_LV_Disassembler.get(1L), bitsd, new Object[] { + "ACA", + aTextWireHull, + "ACA", + 'M', + ItemList.Hull_LV, + 'A', + ItemList.Robot_Arm_LV, + 'C', + OrePrefixes.circuit.get(Materials.Basic), + 'W', + OrePrefixes.cableGt01.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_MV_Disassembler.get(1L), bitsd, new Object[] { + "ACA", + aTextWireHull, + "ACA", + 'M', + ItemList.Hull_MV, + 'A', + ItemList.Robot_Arm_MV, + 'C', + OrePrefixes.circuit.get(Materials.Good), + 'W', + OrePrefixes.cableGt01.get(Materials.AnyCopper) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_HV_Disassembler.get(1L), bitsd, new Object[] { + "ACA", + aTextWireHull, + "ACA", + 'M', + ItemList.Hull_HV, + 'A', + ItemList.Robot_Arm_HV, + 'C', + OrePrefixes.circuit.get(Materials.Advanced), + 'W', + OrePrefixes.cableGt01.get(Materials.Gold) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_EV_Disassembler.get(1L), bitsd, new Object[] { + "ACA", + aTextWireHull, + "ACA", + 'M', + ItemList.Hull_EV, + 'A', + ItemList.Robot_Arm_EV, + 'C', + OrePrefixes.circuit.get(Materials.Data), + 'W', + OrePrefixes.cableGt01.get(Materials.Aluminium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_IV_Disassembler.get(1L), bitsd, new Object[] { + "ACA", + aTextWireHull, + "ACA", + 'M', + ItemList.Hull_IV, + 'A', + ItemList.Robot_Arm_IV, + 'C', + OrePrefixes.circuit.get(Materials.Elite), + 'W', + OrePrefixes.cableGt01.get(Materials.Tungsten) + }); + + if (Loader.isModLoaded("Forestry") && Loader.isModLoaded("gendustry")) { + ItemList.Machine_IndustrialApiary.set(new GT_MetaTileEntity_IndustrialApiary( + 9399, "basicmachine.industrialapiary", "Industrial Apiary", 8) + .getStackForm(1L)); /* Conversion recipe / / Real recipe is in scripts */ - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Machine_IndustrialApiary.get(1L), new Object[]{GT_ModHandler.getModItem("gendustry", "IndustrialApiary", 1, 0)}); - - GT_ModHandler.addCraftingRecipe(ItemList.IndustrialApiary_Upgrade_Acceleration_1.get(6L), bitsd, new Object[]{"PFP", "FAF", "OFO", 'O', OrePrefixes.gearGtSmall.get(Materials.Osmium), 'P', OrePrefixes.gearGtSmall.get(Materials.Palladium), 'F', GT_ModHandler.getModItem("gendustry", "UpgradeFrame", 1, 0), 'A', GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 1, 11100)}); - GT_ModHandler.addCraftingRecipe(ItemList.IndustrialApiary_Upgrade_Acceleration_2.get(6L), bitsd, new Object[]{"PFP", "FAF", "OFO", 'O', OrePrefixes.gearGtSmall.get(Materials.Osmium), 'P', OrePrefixes.gearGtSmall.get(Materials.Palladium), 'F', GT_ModHandler.getModItem("gendustry", "UpgradeFrame", 1, 0), 'A', GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 1, 11101)}); - GT_ModHandler.addCraftingRecipe(ItemList.IndustrialApiary_Upgrade_Acceleration_3.get(6L), bitsd, new Object[]{"PFP", "FAF", "OFO", 'O', OrePrefixes.gearGtSmall.get(Materials.Osmium), 'P', OrePrefixes.gearGtSmall.get(Materials.Palladium), 'F', GT_ModHandler.getModItem("gendustry", "UpgradeFrame", 1, 0), 'A', GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 1, 11102)}); - GT_ModHandler.addCraftingRecipe(ItemList.IndustrialApiary_Upgrade_Acceleration_4.get(6L), bitsd, new Object[]{"PFP", "FAF", "OFO", 'O', OrePrefixes.gearGtSmall.get(Materials.Osmium), 'P', OrePrefixes.gearGtSmall.get(Materials.Palladium), 'F', GT_ModHandler.getModItem("gendustry", "UpgradeFrame", 1, 0), 'A', GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 1, 11103)}); - GT_ModHandler.addCraftingRecipe(ItemList.IndustrialApiary_Upgrade_Acceleration_5.get(6L), bitsd, new Object[]{"PFP", "FAF", "OFO", 'O', OrePrefixes.gearGtSmall.get(Materials.Osmium), 'P', OrePrefixes.gearGtSmall.get(Materials.Palladium), 'F', GT_ModHandler.getModItem("gendustry", "UpgradeFrame", 1, 0), 'A', GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 1, 11104)}); - GT_ModHandler.addCraftingRecipe(ItemList.IndustrialApiary_Upgrade_Acceleration_6.get(6L), bitsd, new Object[]{"PFP", "FAF", "OFO", 'O', OrePrefixes.gearGtSmall.get(Materials.Osmium), 'P', OrePrefixes.gearGtSmall.get(Materials.Palladium), 'F', GT_ModHandler.getModItem("gendustry", "UpgradeFrame", 1, 0), 'A', GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 1, 11105)}); - GT_ModHandler.addCraftingRecipe(ItemList.IndustrialApiary_Upgrade_Acceleration_7.get(6L), bitsd, new Object[]{"PFP", "FAF", "OFO", 'O', OrePrefixes.gearGtSmall.get(Materials.Osmium), 'P', OrePrefixes.gearGtSmall.get(Materials.Palladium), 'F', GT_ModHandler.getModItem("gendustry", "UpgradeFrame", 1, 0), 'A', GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 1, 11106)}); - GT_ModHandler.addCraftingRecipe(ItemList.IndustrialApiary_Upgrade_Acceleration_8.get(6L), bitsd, new Object[]{"PFP", "FAF", "OFO", 'O', OrePrefixes.gearGtSmall.get(Materials.Osmium), 'P', OrePrefixes.gearGtSmall.get(Materials.Palladium), 'F', GT_ModHandler.getModItem("gendustry", "UpgradeFrame", 1, 0), 'A', GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 1, 11107)}); - GT_ModHandler.addCraftingRecipe(ItemList.IndustrialApiary_Upgrade_Acceleration_8_Upgraded.get(1L), bitsd, new Object[]{"PPP", "PAP", "PPP", 'P', GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 0), 'A', ItemList.IndustrialApiary_Upgrade_Acceleration_8.get(1)}); - + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Machine_IndustrialApiary.get(1L), + new Object[] {GT_ModHandler.getModItem("gendustry", "IndustrialApiary", 1, 0)}); + + GT_ModHandler.addCraftingRecipe( + ItemList.IndustrialApiary_Upgrade_Acceleration_1.get(6L), bitsd, new Object[] { + "PFP", + "FAF", + "OFO", + 'O', + OrePrefixes.gearGtSmall.get(Materials.Osmium), + 'P', + OrePrefixes.gearGtSmall.get(Materials.Palladium), + 'F', + GT_ModHandler.getModItem("gendustry", "UpgradeFrame", 1, 0), + 'A', + GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 1, 11100) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.IndustrialApiary_Upgrade_Acceleration_2.get(6L), bitsd, new Object[] { + "PFP", + "FAF", + "OFO", + 'O', + OrePrefixes.gearGtSmall.get(Materials.Osmium), + 'P', + OrePrefixes.gearGtSmall.get(Materials.Palladium), + 'F', + GT_ModHandler.getModItem("gendustry", "UpgradeFrame", 1, 0), + 'A', + GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 1, 11101) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.IndustrialApiary_Upgrade_Acceleration_3.get(6L), bitsd, new Object[] { + "PFP", + "FAF", + "OFO", + 'O', + OrePrefixes.gearGtSmall.get(Materials.Osmium), + 'P', + OrePrefixes.gearGtSmall.get(Materials.Palladium), + 'F', + GT_ModHandler.getModItem("gendustry", "UpgradeFrame", 1, 0), + 'A', + GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 1, 11102) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.IndustrialApiary_Upgrade_Acceleration_4.get(6L), bitsd, new Object[] { + "PFP", + "FAF", + "OFO", + 'O', + OrePrefixes.gearGtSmall.get(Materials.Osmium), + 'P', + OrePrefixes.gearGtSmall.get(Materials.Palladium), + 'F', + GT_ModHandler.getModItem("gendustry", "UpgradeFrame", 1, 0), + 'A', + GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 1, 11103) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.IndustrialApiary_Upgrade_Acceleration_5.get(6L), bitsd, new Object[] { + "PFP", + "FAF", + "OFO", + 'O', + OrePrefixes.gearGtSmall.get(Materials.Osmium), + 'P', + OrePrefixes.gearGtSmall.get(Materials.Palladium), + 'F', + GT_ModHandler.getModItem("gendustry", "UpgradeFrame", 1, 0), + 'A', + GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 1, 11104) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.IndustrialApiary_Upgrade_Acceleration_6.get(6L), bitsd, new Object[] { + "PFP", + "FAF", + "OFO", + 'O', + OrePrefixes.gearGtSmall.get(Materials.Osmium), + 'P', + OrePrefixes.gearGtSmall.get(Materials.Palladium), + 'F', + GT_ModHandler.getModItem("gendustry", "UpgradeFrame", 1, 0), + 'A', + GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 1, 11105) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.IndustrialApiary_Upgrade_Acceleration_7.get(6L), bitsd, new Object[] { + "PFP", + "FAF", + "OFO", + 'O', + OrePrefixes.gearGtSmall.get(Materials.Osmium), + 'P', + OrePrefixes.gearGtSmall.get(Materials.Palladium), + 'F', + GT_ModHandler.getModItem("gendustry", "UpgradeFrame", 1, 0), + 'A', + GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 1, 11106) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.IndustrialApiary_Upgrade_Acceleration_8.get(6L), bitsd, new Object[] { + "PFP", + "FAF", + "OFO", + 'O', + OrePrefixes.gearGtSmall.get(Materials.Osmium), + 'P', + OrePrefixes.gearGtSmall.get(Materials.Palladium), + 'F', + GT_ModHandler.getModItem("gendustry", "UpgradeFrame", 1, 0), + 'A', + GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 1, 11107) + }); + GT_ModHandler.addCraftingRecipe( + ItemList.IndustrialApiary_Upgrade_Acceleration_8_Upgraded.get(1L), bitsd, new Object[] { + "PPP", + "PAP", + "PPP", + 'P', + GT_ModHandler.getModItem("gendustry", "ApiaryUpgrade", 1, 0), + 'A', + ItemList.IndustrialApiary_Upgrade_Acceleration_8.get(1) + }); } - ItemList.Machine_LV_Massfab.set(new GT_MetaTileEntity_Massfabricator(461, "basicmachine.massfab.tier.01", "Basic Mass Fabricator", 1).getStackForm(1L)); - ItemList.Machine_MV_Massfab.set(new GT_MetaTileEntity_Massfabricator(462, "basicmachine.massfab.tier.02", "Advanced Mass Fabricator", 2).getStackForm(1L)); - ItemList.Machine_HV_Massfab.set(new GT_MetaTileEntity_Massfabricator(463, "basicmachine.massfab.tier.03", "Advanced Mass Fabricator II", 3).getStackForm(1L)); - ItemList.Machine_EV_Massfab.set(new GT_MetaTileEntity_Massfabricator(464, "basicmachine.massfab.tier.04", "Advanced Mass Fabricator III", 4).getStackForm(1L)); - ItemList.Machine_IV_Massfab.set(new GT_MetaTileEntity_Massfabricator(465, "basicmachine.massfab.tier.05", "Advanced Mass Fabricator IV", 5).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Machine_LV_Massfab.get(1L), bitsd, new Object[]{"CFC", aTextWireHull, "CFC", 'M', ItemList.Hull_LV, 'F', ItemList.Field_Generator_LV, 'C', OrePrefixes.circuit.get(Materials.Good), 'W', OrePrefixes.cableGt04.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_MV_Massfab.get(1L), bitsd, new Object[]{"CFC", aTextWireHull, "CFC", 'M', ItemList.Hull_MV, 'F', ItemList.Field_Generator_MV, 'C', OrePrefixes.circuit.get(Materials.Advanced), 'W', OrePrefixes.cableGt04.get(Materials.AnyCopper)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_HV_Massfab.get(1L), bitsd, new Object[]{"CFC", aTextWireHull, "CFC", 'M', ItemList.Hull_HV, 'F', ItemList.Field_Generator_HV, 'C', OrePrefixes.circuit.get(Materials.Data), 'W', OrePrefixes.cableGt04.get(Materials.Gold)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_EV_Massfab.get(1L), bitsd, new Object[]{"CFC", aTextWireHull, "CFC", 'M', ItemList.Hull_EV, 'F', ItemList.Field_Generator_EV, 'C', OrePrefixes.circuit.get(Materials.Elite), 'W', OrePrefixes.cableGt04.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_IV_Massfab.get(1L), bitsd, new Object[]{"CFC", aTextWireHull, "CFC", 'M', ItemList.Hull_IV, 'F', ItemList.Field_Generator_IV, 'C', OrePrefixes.circuit.get(Materials.Master), 'W', OrePrefixes.cableGt04.get(Materials.Tungsten)}); - - ItemList.Machine_LV_Amplifab.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(471, "basicmachine.amplifab.tier.01", "Basic Amplifabricator", 1, "Extracting UU Amplifier", GT_Recipe.GT_Recipe_Map.sAmplifiers, 1, 1, 1000, 0, 1, "Amplifabricator.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "AMPLIFAB", new Object[]{aTextWirePump, aTextPlateMotor, "CPC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4}).getStackForm(1L)); - ItemList.Machine_MV_Amplifab.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(472, "basicmachine.amplifab.tier.02", "Advanced Amplifabricator", 2, "Extracting UU Amplifier", GT_Recipe.GT_Recipe_Map.sAmplifiers, 1, 1, 1000, 0, 1, "Amplifabricator.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "AMPLIFAB", new Object[]{aTextWirePump, aTextPlateMotor, "CPC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4}).getStackForm(1L)); - ItemList.Machine_HV_Amplifab.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(473, "basicmachine.amplifab.tier.03", "Advanced Amplifabricator II", 3, "Extracting UU Amplifier", GT_Recipe.GT_Recipe_Map.sAmplifiers, 1, 1, 1000, 0, 1, "Amplifabricator.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "AMPLIFAB", new Object[]{aTextWirePump, aTextPlateMotor, "CPC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4}).getStackForm(1L)); - ItemList.Machine_EV_Amplifab.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(474, "basicmachine.amplifab.tier.04", "Advanced Amplifabricator III", 4, "Extracting UU Amplifier", GT_Recipe.GT_Recipe_Map.sAmplifiers, 1, 1, 1000, 0, 1, "Amplifabricator.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "AMPLIFAB", new Object[]{aTextWirePump, aTextPlateMotor, "CPC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4}).getStackForm(1L)); - ItemList.Machine_IV_Amplifab.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(475, "basicmachine.amplifab.tier.05", "Advanced Amplifabricator IV", 5, "Extracting UU Amplifier", GT_Recipe.GT_Recipe_Map.sAmplifiers, 1, 1, 1000, 0, 1, "Amplifabricator.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "AMPLIFAB", new Object[]{aTextWirePump, aTextPlateMotor, "CPC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4}).getStackForm(1L)); - - ItemList.Machine_LV_Replicator.set(new GT_MetaTileEntity_Replicator(481, "basicmachine.replicator.tier.01", "Basic Replicator", 1).getStackForm(1L)); - ItemList.Machine_MV_Replicator.set(new GT_MetaTileEntity_Replicator(482, "basicmachine.replicator.tier.02", "Advanced Replicator", 2).getStackForm(1L)); - ItemList.Machine_HV_Replicator.set(new GT_MetaTileEntity_Replicator(483, "basicmachine.replicator.tier.03", "Advanced Replicator II", 3).getStackForm(1L)); - ItemList.Machine_EV_Replicator.set(new GT_MetaTileEntity_Replicator(484, "basicmachine.replicator.tier.04", "Advanced Replicator III", 4).getStackForm(1L)); - ItemList.Machine_IV_Replicator.set(new GT_MetaTileEntity_Replicator(485, "basicmachine.replicator.tier.05", "Advanced Replicator IV", 5).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Machine_LV_Replicator.get(1L), bitsd, new Object[]{"EFE", aTextCableHull, aTextMotorWire, 'M', ItemList.Hull_LV, 'F', ItemList.Field_Generator_LV, 'E', ItemList.Emitter_LV, 'C', OrePrefixes.circuit.get(Materials.Good), 'W', OrePrefixes.cableGt04.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_MV_Replicator.get(1L), bitsd, new Object[]{"EFE", aTextCableHull, aTextMotorWire, 'M', ItemList.Hull_MV, 'F', ItemList.Field_Generator_MV, 'E', ItemList.Emitter_MV, 'C', OrePrefixes.circuit.get(Materials.Advanced), 'W', OrePrefixes.cableGt04.get(Materials.AnyCopper)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_HV_Replicator.get(1L), bitsd, new Object[]{"EFE", aTextCableHull, aTextMotorWire, 'M', ItemList.Hull_HV, 'F', ItemList.Field_Generator_HV, 'E', ItemList.Emitter_HV, 'C', OrePrefixes.circuit.get(Materials.Data), 'W', OrePrefixes.cableGt04.get(Materials.Gold)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_EV_Replicator.get(1L), bitsd, new Object[]{"EFE", aTextCableHull, aTextMotorWire, 'M', ItemList.Hull_EV, 'F', ItemList.Field_Generator_EV, 'E', ItemList.Emitter_EV, 'C', OrePrefixes.circuit.get(Materials.Elite), 'W', OrePrefixes.cableGt04.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_IV_Replicator.get(1L), bitsd, new Object[]{"EFE", aTextCableHull, aTextMotorWire, 'M', ItemList.Hull_IV, 'F', ItemList.Field_Generator_IV, 'E', ItemList.Emitter_IV, 'C', OrePrefixes.circuit.get(Materials.Master), 'W', OrePrefixes.cableGt04.get(Materials.Tungsten)}); - - ItemList.Machine_LV_Brewery.set(new GT_MetaTileEntity_PotionBrewer(491, "basicmachine.brewery.tier.01", "Basic Brewery", 1).getStackForm(1L)); - ItemList.Machine_MV_Brewery.set(new GT_MetaTileEntity_PotionBrewer(492, "basicmachine.brewery.tier.02", "Advanced Brewery", 2).getStackForm(1L)); - ItemList.Machine_HV_Brewery.set(new GT_MetaTileEntity_PotionBrewer(493, "basicmachine.brewery.tier.03", "Advanced Brewery II", 3).getStackForm(1L)); - ItemList.Machine_EV_Brewery.set(new GT_MetaTileEntity_PotionBrewer(494, "basicmachine.brewery.tier.04", "Advanced Brewery III", 4).getStackForm(1L)); - ItemList.Machine_IV_Brewery.set(new GT_MetaTileEntity_PotionBrewer(495, "basicmachine.brewery.tier.05", "Advanced Brewery IV", 5).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Machine_LV_Brewery.get(1L), bitsd, new Object[]{"GPG", aTextWireHull, "CBC", 'M', ItemList.Hull_LV, 'P', ItemList.Electric_Pump_LV, 'B', new ItemStack(Items.brewing_stand, 0), 'C', OrePrefixes.circuit.get(Materials.Basic), 'W', OrePrefixes.cableGt01.get(Materials.Tin), 'G', new ItemStack(Blocks.glass, 1)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_MV_Brewery.get(1L), bitsd, new Object[]{"GPG", aTextWireHull, "CBC", 'M', ItemList.Hull_MV, 'P', ItemList.Electric_Pump_MV, 'B', new ItemStack(Items.brewing_stand, 0), 'C', OrePrefixes.circuit.get(Materials.Good), 'W', OrePrefixes.cableGt01.get(Materials.AnyCopper), 'G', new ItemStack(Blocks.glass, 1)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_HV_Brewery.get(1L), bitsd, new Object[]{"GPG", aTextWireHull, "CBC", 'M', ItemList.Hull_HV, 'P', ItemList.Electric_Pump_HV, 'B', new ItemStack(Items.brewing_stand, 0), 'C', OrePrefixes.circuit.get(Materials.Advanced), 'W', OrePrefixes.cableGt01.get(Materials.Gold), 'G', new ItemStack(Blocks.glass, 1)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_EV_Brewery.get(1L), bitsd, new Object[]{"GPG", aTextWireHull, "CBC", 'M', ItemList.Hull_EV, 'P', ItemList.Electric_Pump_EV, 'B', new ItemStack(Items.brewing_stand, 0), 'C', OrePrefixes.circuit.get(Materials.Data), 'W', OrePrefixes.cableGt01.get(Materials.Aluminium), 'G', new ItemStack(Blocks.glass, 1)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_IV_Brewery.get(1L), bitsd, new Object[]{"GPG", aTextWireHull, "CBC", 'M', ItemList.Hull_IV, 'P', ItemList.Electric_Pump_IV, 'B', new ItemStack(Items.brewing_stand, 0), 'C', OrePrefixes.circuit.get(Materials.Elite), 'W', OrePrefixes.cableGt01.get(Materials.Tungsten), 'G', new ItemStack(Blocks.glass, 1)}); - - ItemList.Machine_LV_Fermenter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(501, "basicmachine.fermenter.tier.01", "Basic Fermenter", 1, "Fermenting Fluids", GT_Recipe.GT_Recipe_Map.sFermentingRecipes, 1, 1, 1000, 0, 1, "Fermenter.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "FERMENTER", new Object[]{aTextWirePump, "GMG", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_MV_Fermenter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(502, "basicmachine.fermenter.tier.02", "Advanced Fermenter", 2, "Fermenting Fluids", GT_Recipe.GT_Recipe_Map.sFermentingRecipes, 1, 1, 1000, 0, 1, "Fermenter.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "FERMENTER", new Object[]{aTextWirePump, "GMG", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_HV_Fermenter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(503, "basicmachine.fermenter.tier.03", "Advanced Fermenter II", 3, "Fermenting Fluids", GT_Recipe.GT_Recipe_Map.sFermentingRecipes, 1, 1, 1000, 0, 1, "Fermenter.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "FERMENTER", new Object[]{aTextWirePump, "GMG", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_EV_Fermenter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(504, "basicmachine.fermenter.tier.04", "Advanced Fermenter III", 4, "Fermenting Fluids", GT_Recipe.GT_Recipe_Map.sFermentingRecipes, 1, 1, 1000, 0, 1, "Fermenter.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "FERMENTER", new Object[]{aTextWirePump, "GMG", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_IV_Fermenter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(505, "basicmachine.fermenter.tier.05", "Advanced Fermenter IV", 5, "Fermenting Fluids", GT_Recipe.GT_Recipe_Map.sFermentingRecipes, 1, 1, 1000, 0, 1, "Fermenter.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "FERMENTER", new Object[]{aTextWirePump, "GMG", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - - ItemList.Machine_LV_FluidExtractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(511, "basicmachine.fluidextractor.tier.01", "Basic Fluid Extractor", 1, "Extracting Fluids from Items", GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes, 1, 1, 16000, 0, 1, "FluidExtractor.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "FLUID_EXTRACTOR", new Object[]{"GEG", "TPT", "CMC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'T', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_MV_FluidExtractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(512, "basicmachine.fluidextractor.tier.02", "Advanced Fluid Extractor", 2, "Extracting Fluids from Items", GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes, 1, 1, 16000, 0, 1, "FluidExtractor.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "FLUID_EXTRACTOR", new Object[]{"GEG", "TPT", "CMC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'T', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_HV_FluidExtractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(513, "basicmachine.fluidextractor.tier.03", "Advanced Fluid Extractor II", 3, "Extracting Fluids from Items", GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes, 1, 1, 16000, 0, 1, "FluidExtractor.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "FLUID_EXTRACTOR", new Object[]{"GEG", "TPT", "CMC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'T', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_EV_FluidExtractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(514, "basicmachine.fluidextractor.tier.04", "Advanced Fluid Extractor III", 4, "Extracting Fluids from Items", GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes, 1, 1, 16000, 0, 1, "FluidExtractor.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "FLUID_EXTRACTOR", new Object[]{"GEG", "TPT", "CMC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'T', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_IV_FluidExtractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(515, "basicmachine.fluidextractor.tier.05", "Advanced Fluid Extractor IV", 5, "Extracting Fluids from Items", GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes, 1, 1, 16000, 0, 1, "FluidExtractor.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "FLUID_EXTRACTOR", new Object[]{"GEG", "TPT", "CMC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'T', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - - ItemList.Machine_LV_FluidSolidifier.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(521, "basicmachine.fluidsolidifier.tier.01", "Basic Fluid Solidifier", 1, "Cools Fluids down to form Solids", GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes, 1, 1, 16000, 0, 1, "FluidSolidifier.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "FLUID_SOLIDIFIER", new Object[]{"PGP", aTextWireHull, "CBC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, 'B', OreDictNames.craftingChest}).getStackForm(1L)); - ItemList.Machine_MV_FluidSolidifier.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(522, "basicmachine.fluidsolidifier.tier.02", "Advanced Fluid Solidifier", 2, "Cools Fluids down to form Solids", GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes, 1, 1, 16000, 0, 1, "FluidSolidifier.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "FLUID_SOLIDIFIER", new Object[]{"PGP", aTextWireHull, "CBC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, 'B', OreDictNames.craftingChest}).getStackForm(1L)); - ItemList.Machine_HV_FluidSolidifier.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(523, "basicmachine.fluidsolidifier.tier.03", "Advanced Fluid Solidifier II", 3, "Cools Fluids down to form Solids", GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes, 1, 1, 16000, 0, 1, "FluidSolidifier.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "FLUID_SOLIDIFIER", new Object[]{"PGP", aTextWireHull, "CBC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, 'B', OreDictNames.craftingChest}).getStackForm(1L)); - ItemList.Machine_EV_FluidSolidifier.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(524, "basicmachine.fluidsolidifier.tier.04", "Advanced Fluid Solidifier III", 4, "Cools Fluids down to form Solids", GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes, 1, 1, 16000, 0, 1, "FluidSolidifier.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "FLUID_SOLIDIFIER", new Object[]{"PGP", aTextWireHull, "CBC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, 'B', OreDictNames.craftingChest}).getStackForm(1L)); - ItemList.Machine_IV_FluidSolidifier.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(525, "basicmachine.fluidsolidifier.tier.05", "Advanced Fluid Solidifier IV", 5, "Cools Fluids down to form Solids", GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes, 1, 1, 16000, 0, 1, "FluidSolidifier.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "FLUID_SOLIDIFIER", new Object[]{"PGP", aTextWireHull, "CBC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, 'B', OreDictNames.craftingChest}).getStackForm(1L)); - - ItemList.Machine_LV_Distillery.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(531, "basicmachine.distillery.tier.01", "Basic Distillery", 1, "Extracting the most relevant Parts of Fluids", GT_Recipe.GT_Recipe_Map.sDistilleryRecipes, 1, 1, 8000, 0, 1, "Distillery.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "DISTILLERY", new Object[]{"GBG", aTextCableHull, aTextWirePump, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'B', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_MV_Distillery.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(532, "basicmachine.distillery.tier.02", "Advanced Distillery", 2, "Extracting the most relevant Parts of Fluids", GT_Recipe.GT_Recipe_Map.sDistilleryRecipes, 1, 1, 16000, 0, 1, "Distillery.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "DISTILLERY", new Object[]{"GBG", aTextCableHull, aTextWirePump, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'B', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_HV_Distillery.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(533, "basicmachine.distillery.tier.03", "Advanced Distillery II", 3, "Extracting the most relevant Parts of Fluids", GT_Recipe.GT_Recipe_Map.sDistilleryRecipes, 1, 1, 24000, 0, 1, "Distillery.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "DISTILLERY", new Object[]{"GBG", aTextCableHull, aTextWirePump, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'B', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_EV_Distillery.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(534, "basicmachine.distillery.tier.04", "Advanced Distillery III", 4, "Extracting the most relevant Parts of Fluids", GT_Recipe.GT_Recipe_Map.sDistilleryRecipes, 1, 1, 32000, 0, 1, "Distillery.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "DISTILLERY", new Object[]{"GBG", aTextCableHull, aTextWirePump, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'B', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_IV_Distillery.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(535, "basicmachine.distillery.tier.05", "Advanced Distillery IV", 5, "Extracting the most relevant Parts of Fluids", GT_Recipe.GT_Recipe_Map.sDistilleryRecipes, 1, 1, 40000, 0, 1, "Distillery.png", SoundResource.IC2_MACHINES_EXTRACTOR_OP, false, false, SpecialEffects.NONE, "DISTILLERY", new Object[]{"GBG", aTextCableHull, aTextWirePump, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'B', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - - ItemList.Machine_LV_ChemicalBath.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(541, "basicmachine.chemicalbath.tier.01", "Basic Chemical Bath", 1, "Bathing Ores in Chemicals to separate them", GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes, 1, 3, 8000, 0, 1, "ChemicalBath.png", SoundResource.NONE, false, true, SpecialEffects.NONE, "CHEMICAL_BATH", new Object[]{"VGW", "PGV", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_MV_ChemicalBath.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(542, "basicmachine.chemicalbath.tier.02", "Advanced Chemical Bath", 2, "Bathing Ores in Chemicals to separate them", GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes, 1, 3, 8000, 0, 1, "ChemicalBath.png", SoundResource.NONE, false, true, SpecialEffects.NONE, "CHEMICAL_BATH", new Object[]{"VGW", "PGV", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_HV_ChemicalBath.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(543, "basicmachine.chemicalbath.tier.03", "Advanced Chemical Bath II", 3, "Bathing Ores in Chemicals to separate them", GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes, 1, 3, 8000, 0, 1, "ChemicalBath.png", SoundResource.NONE, false, true, SpecialEffects.NONE, "CHEMICAL_BATH", new Object[]{"VGW", "PGV", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_EV_ChemicalBath.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(544, "basicmachine.chemicalbath.tier.04", "Advanced Chemical Bath III", 4, "Bathing Ores in Chemicals to separate them", GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes, 1, 3, 8000, 0, 1, "ChemicalBath.png", SoundResource.NONE, false, true, SpecialEffects.NONE, "CHEMICAL_BATH", new Object[]{"VGW", "PGV", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_IV_ChemicalBath.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(545, "basicmachine.chemicalbath.tier.05", "Advanced Chemical Bath IV", 5, "Bathing Ores in Chemicals to separate them", GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes, 1, 3, 8000, 0, 1, "ChemicalBath.png", SoundResource.NONE, false, true, SpecialEffects.NONE, "CHEMICAL_BATH", new Object[]{"VGW", "PGV", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - - ItemList.Machine_LV_Polarizer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(551, "basicmachine.polarizer.tier.01", "Basic Polarizer", 1, "Bipolarising your Magnets", GT_Recipe.GT_Recipe_Map.sPolarizerRecipes, 1, 1, 0, 0, 1, "Polarizer.png", SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, false, false, SpecialEffects.NONE, "POLARIZER", new Object[]{"ZSZ", aTextWireHull, "ZSZ", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'S', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, 'Z', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_MV_Polarizer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(552, "basicmachine.polarizer.tier.02", "Advanced Polarizer", 2, "Bipolarising your Magnets", GT_Recipe.GT_Recipe_Map.sPolarizerRecipes, 1, 1, 0, 0, 1, "Polarizer.png", SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, false, false, SpecialEffects.NONE, "POLARIZER", new Object[]{"ZSZ", aTextWireHull, "ZSZ", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'S', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, 'Z', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_HV_Polarizer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(553, "basicmachine.polarizer.tier.03", "Advanced Polarizer II", 3, "Bipolarising your Magnets", GT_Recipe.GT_Recipe_Map.sPolarizerRecipes, 1, 1, 0, 0, 1, "Polarizer.png", SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, false, false, SpecialEffects.NONE, "POLARIZER", new Object[]{"ZSZ", aTextWireHull, "ZSZ", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'S', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, 'Z', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_EV_Polarizer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(554, "basicmachine.polarizer.tier.04", "Advanced Polarizer III", 4, "Bipolarising your Magnets", GT_Recipe.GT_Recipe_Map.sPolarizerRecipes, 1, 1, 0, 0, 1, "Polarizer.png", SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, false, false, SpecialEffects.NONE, "POLARIZER", new Object[]{"ZSZ", aTextWireHull, "ZSZ", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'S', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, 'Z', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_IV_Polarizer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(555, "basicmachine.polarizer.tier.05", "Advanced Polarizer IV", 5, "Bipolarising your Magnets", GT_Recipe.GT_Recipe_Map.sPolarizerRecipes, 1, 1, 0, 0, 1, "Polarizer.png", SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, false, false, SpecialEffects.NONE, "POLARIZER", new Object[]{"ZSZ", aTextWireHull, "ZSZ", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'S', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, 'Z', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - - ItemList.Machine_LV_ElectromagneticSeparator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(561, "basicmachine.electromagneticseparator.tier.01", "Basic Electromagnetic Separator", 1, "Separating the magnetic Ores from the rest", GT_Recipe.GT_Recipe_Map.sElectroMagneticSeparatorRecipes, 1, 3, 0, 0, 1, "ElectromagneticSeparator.png", SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, false, false, SpecialEffects.NONE, "ELECTROMAGNETIC_SEPARATOR", new Object[]{"VWZ", "WMS", "CWZ", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'S', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, 'Z', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_MV_ElectromagneticSeparator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(562, "basicmachine.electromagneticseparator.tier.02", "Advanced Electromagnetic Separator", 2, "Separating the magnetic Ores from the rest", GT_Recipe.GT_Recipe_Map.sElectroMagneticSeparatorRecipes, 1, 3, 0, 0, 1, "ElectromagneticSeparator.png", SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, false, false, SpecialEffects.NONE, "ELECTROMAGNETIC_SEPARATOR", new Object[]{"VWZ", "WMS", "CWZ", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'S', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, 'Z', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_HV_ElectromagneticSeparator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(563, "basicmachine.electromagneticseparator.tier.03", "Advanced Electromagnetic Separator II", 3, "Separating the magnetic Ores from the rest", GT_Recipe.GT_Recipe_Map.sElectroMagneticSeparatorRecipes, 1, 3, 0, 0, 1, "ElectromagneticSeparator.png", SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, false, false, SpecialEffects.NONE, "ELECTROMAGNETIC_SEPARATOR", new Object[]{"VWZ", "WMS", "CWZ", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'S', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, 'Z', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_EV_ElectromagneticSeparator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(564, "basicmachine.electromagneticseparator.tier.04", "Advanced Electromagnetic Separator III", 4, "Separating the magnetic Ores from the rest", GT_Recipe.GT_Recipe_Map.sElectroMagneticSeparatorRecipes, 1, 3, 0, 0, 1, "ElectromagneticSeparator.png", SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, false, false, SpecialEffects.NONE, "ELECTROMAGNETIC_SEPARATOR", new Object[]{"VWZ", "WMS", "CWZ", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'S', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, 'Z', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_IV_ElectromagneticSeparator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(565, "basicmachine.electromagneticseparator.tier.05", "Advanced Electromagnetic Separator IV", 5, "Separating the magnetic Ores from the rest", GT_Recipe.GT_Recipe_Map.sElectroMagneticSeparatorRecipes, 1, 3, 0, 0, 1, "ElectromagneticSeparator.png", SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, false, false, SpecialEffects.NONE, "ELECTROMAGNETIC_SEPARATOR", new Object[]{"VWZ", "WMS", "CWZ", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'S', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, 'Z', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - - ItemList.Machine_LV_Autoclave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(571, "basicmachine.autoclave.tier.01", "Basic Autoclave", 1, "Crystallizing your Dusts", GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes, 2, 2, 10000, 0, 1, "Autoclave2.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "AUTOCLAVE", new Object[]{"IGI", "IMI", "CPC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'I', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_MV_Autoclave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(572, "basicmachine.autoclave.tier.02", "Advanced Autoclave", 2, "Crystallizing your Dusts", GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes, 2, 2, 20000, 0, 1, "Autoclave2.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "AUTOCLAVE", new Object[]{"IGI", "IMI", "CPC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'I', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_HV_Autoclave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(573, "basicmachine.autoclave.tier.03", "Advanced Autoclave II", 3, "Crystallizing your Dusts", GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes, 2, 3, 30000, 0, 1, "Autoclave3.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "AUTOCLAVE", new Object[]{"IGI", "IMI", "CPC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'I', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_EV_Autoclave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(574, "basicmachine.autoclave.tier.04", "Advanced Autoclave III", 4, "Crystallizing your Dusts", GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes, 2, 4, 40000, 0, 1, "Autoclave4.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "AUTOCLAVE", new Object[]{"IGI", "IMI", "CPC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'I', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_IV_Autoclave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(575, "basicmachine.autoclave.tier.05", "Advanced Autoclave IV", 5, "Crystallizing your Dusts", GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes, 2, 4, 50000, 0, 1, "Autoclave4.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "AUTOCLAVE", new Object[]{"IGI", "IMI", "CPC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'I', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - - ItemList.Machine_LV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(581, "basicmachine.mixer.tier.01", "Basic Mixer", 1, "Will it Blend?", GT_Recipe.GT_Recipe_Map.sMixerRecipes, 6, 1, 16000, 0, 1, "Mixer.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "MIXER", new Object[]{"GRG", "GEG", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_MV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(582, "basicmachine.mixer.tier.02", "Advanced Mixer", 2, "Will it Blend?", GT_Recipe.GT_Recipe_Map.sMixerRecipes, 6, 1, 32000, 0, 1, "Mixer.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "MIXER", new Object[]{"GRG", "GEG", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_HV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(583, "basicmachine.mixer.tier.03", "Advanced Mixer II", 3, "Will it Blend?", GT_Recipe.GT_Recipe_Map.sMixerRecipes, 6, 4, 48000, 0, 1, "Mixer4.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "MIXER", new Object[]{"GRG", "GEG", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_EV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(584, "basicmachine.mixer.tier.04", "Advanced Mixer III", 4, "Will it Blend?", GT_Recipe.GT_Recipe_Map.sMixerRecipes, 9, 4, 64000, 0, 1, "Mixer6.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "MIXER", new Object[]{"GRG", "GEG", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_IV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(585, "basicmachine.mixer.tier.05", "Advanced Mixer IV", 5, "Will it Blend?", GT_Recipe.GT_Recipe_Map.sMixerRecipes, 9, 4, 128000, 0, 1, "Mixer6.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "MIXER", new Object[]{"GRG", "GEG", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - - ItemList.Machine_LV_LaserEngraver.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(591, "basicmachine.laserengraver.tier.01", "Basic Precision Laser Engraver", 1, "Don't look directly at the Laser", GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes, 2, 1, 8000, 0, 1, "LaserEngraver.png", SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, false, false, SpecialEffects.NONE, "LASER_ENGRAVER", new Object[]{"PEP", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_MV_LaserEngraver.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(592, "basicmachine.laserengraver.tier.02", "Advanced Precision Laser Engraver", 2, "Don't look directly at the Laser", GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes, 2, 1, 16000, 0, 1, "LaserEngraver.png", SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, false, false, SpecialEffects.NONE, "LASER_ENGRAVER", new Object[]{"PEP", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_HV_LaserEngraver.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(593, "basicmachine.laserengraver.tier.03", "Advanced Precision Laser Engraver II", 3, "Don't look directly at the Laser", GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes, 2, 1, 24000, 0, 1, "LaserEngraver.png", SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, false, false, SpecialEffects.NONE, "LASER_ENGRAVER", new Object[]{"PEP", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_EV_LaserEngraver.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(594, "basicmachine.laserengraver.tier.04", "Advanced Precision Laser Engraver III", 4, "Don't look directly at the Laser", GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes, 2, 1, 32000, 0, 1, "LaserEngraver.png", SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, false, false, SpecialEffects.NONE, "LASER_ENGRAVER", new Object[]{"PEP", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_IV_LaserEngraver.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(595, "basicmachine.laserengraver.tier.05", "Advanced Precision Laser Engraver IV", 5, "Don't look directly at the Laser", GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes, 2, 1, 40000, 0, 1, "LaserEngraver.png", SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, false, false, SpecialEffects.NONE, "LASER_ENGRAVER", new Object[]{"PEP", aTextCableHull, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - - ItemList.Machine_LV_Press.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(601, "basicmachine.press.tier.01", "Basic Forming Press", 1, "Imprinting Images into things", GT_Recipe.GT_Recipe_Map.sPressRecipes, 2, 1, 0, 0, 1, "Press.png", SoundResource.IC2_MACHINES_COMPRESSOR_OP, false, false, SpecialEffects.NONE, "PRESS", new Object[]{aTextWirePump, aTextCableHull, aTextWirePump, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_MV_Press.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(602, "basicmachine.press.tier.02", "Advanced Forming Press", 2, "Imprinting Images into things", GT_Recipe.GT_Recipe_Map.sPressRecipes, 2, 1, 0, 0, 1, "Press.png", SoundResource.IC2_MACHINES_COMPRESSOR_OP, false, false, SpecialEffects.NONE, "PRESS", new Object[]{aTextWirePump, aTextCableHull, aTextWirePump, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_HV_Press.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(603, "basicmachine.press.tier.03", "Advanced Forming Press II", 3, "Imprinting Images into things", GT_Recipe.GT_Recipe_Map.sPressRecipes, 2, 1, 0, 0, 1, "Press.png", SoundResource.IC2_MACHINES_COMPRESSOR_OP, false, false, SpecialEffects.NONE, "PRESS", new Object[]{aTextWirePump, aTextCableHull, aTextWirePump, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_EV_Press.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(604, "basicmachine.press.tier.04", "Advanced Forming Press III", 4, "Imprinting Images into things", GT_Recipe.GT_Recipe_Map.sPressRecipes, 2, 1, 0, 0, 1, "Press.png", SoundResource.IC2_MACHINES_COMPRESSOR_OP, false, false, SpecialEffects.NONE, "PRESS", new Object[]{aTextWirePump, aTextCableHull, aTextWirePump, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_IV_Press.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(605, "basicmachine.press.tier.05", "Advanced Forming Press IV", 5, "Imprinting Images into things", GT_Recipe.GT_Recipe_Map.sPressRecipes, 2, 1, 0, 0, 1, "Press.png", SoundResource.IC2_MACHINES_COMPRESSOR_OP, false, false, SpecialEffects.NONE, "PRESS", new Object[]{aTextWirePump, aTextCableHull, aTextWirePump, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - - ItemList.Machine_LV_Hammer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(611, "basicmachine.hammer.tier.01", "Basic Forge Hammer", 1, "Stop, Hammertime!", GT_Recipe.GT_Recipe_Map.sHammerRecipes, 1, 1, 0, 6, 3, "Hammer.png", SoundResource.RANDOM_ANVIL_USE, false, false, SpecialEffects.MAIN_RANDOM_SPARKS, "HAMMER", new Object[]{aTextWirePump, aTextCableHull, "WAW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, 'A', OreDictNames.craftingAnvil}).getStackForm(1L)); - ItemList.Machine_MV_Hammer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(612, "basicmachine.hammer.tier.02", "Advanced Forge Hammer", 2, "Stop, Hammertime!", GT_Recipe.GT_Recipe_Map.sHammerRecipes, 1, 1, 0, 6, 3, "Hammer.png", SoundResource.RANDOM_ANVIL_USE, false, false, SpecialEffects.MAIN_RANDOM_SPARKS, "HAMMER", new Object[]{aTextWirePump, aTextCableHull, "WAW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, 'A', OreDictNames.craftingAnvil}).getStackForm(1L)); - ItemList.Machine_HV_Hammer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(613, "basicmachine.hammer.tier.03", "Advanced Forge Hammer II", 3, "Stop, Hammertime!", GT_Recipe.GT_Recipe_Map.sHammerRecipes, 1, 1, 0, 6, 3, "Hammer.png", SoundResource.RANDOM_ANVIL_USE, false, false, SpecialEffects.MAIN_RANDOM_SPARKS, "HAMMER", new Object[]{aTextWirePump, aTextCableHull, "WAW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, 'A', OreDictNames.craftingAnvil}).getStackForm(1L)); - ItemList.Machine_EV_Hammer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(614, "basicmachine.hammer.tier.04", "Advanced Forge Hammer III", 4, "Stop, Hammertime!", GT_Recipe.GT_Recipe_Map.sHammerRecipes, 1, 1, 0, 6, 3, "Hammer.png", SoundResource.RANDOM_ANVIL_USE, false, false, SpecialEffects.MAIN_RANDOM_SPARKS, "HAMMER", new Object[]{aTextWirePump, aTextCableHull, "WAW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, 'A', OreDictNames.craftingAnvil}).getStackForm(1L)); - ItemList.Machine_IV_Hammer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(615, "basicmachine.hammer.tier.05", "Advanced Forge Hammer IV", 5, "Stop, Hammertime!", GT_Recipe.GT_Recipe_Map.sHammerRecipes, 1, 1, 0, 6, 3, "Hammer.png", SoundResource.RANDOM_ANVIL_USE, false, false, SpecialEffects.MAIN_RANDOM_SPARKS, "HAMMER", new Object[]{aTextWirePump, aTextCableHull, "WAW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, 'A', OreDictNames.craftingAnvil}).getStackForm(1L)); - - ItemList.Machine_LV_FluidHeater.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(621, "basicmachine.fluidheater.tier.01", "Basic Fluid Heater", 1, "Heating up your Fluids", GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes, 1, 0, 8000, 0, 1, "FluidHeater.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "FLUID_HEATER", new Object[]{"OGO", aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_MV_FluidHeater.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(622, "basicmachine.fluidheater.tier.02", "Advanced Fluid Heater", 2, "Heating up your Fluids", GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes, 1, 0, 8000, 0, 1, "FluidHeater.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "FLUID_HEATER", new Object[]{"OGO", aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_HV_FluidHeater.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(623, "basicmachine.fluidheater.tier.03", "Advanced Fluid Heater II", 3, "Heating up your Fluids", GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes, 1, 0, 8000, 0, 1, "FluidHeater.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "FLUID_HEATER", new Object[]{"OGO", aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_EV_FluidHeater.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(624, "basicmachine.fluidheater.tier.04", "Advanced Fluid Heater III", 4, "Heating up your Fluids", GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes, 1, 0, 8000, 0, 1, "FluidHeater.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "FLUID_HEATER", new Object[]{"OGO", aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_IV_FluidHeater.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(625, "basicmachine.fluidheater.tier.05", "Advanced Fluid Heater IV", 5, "Heating up your Fluids", GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes, 1, 0, 8000, 0, 1, "FluidHeater.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "FLUID_HEATER", new Object[]{"OGO", aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'O', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - - ItemList.Machine_LV_Slicer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(631, "basicmachine.slicer.tier.01", "Basic Slicing Machine", 1, "Slice of Life", GT_Recipe.GT_Recipe_Map.sSlicerRecipes, 2, 1, 0, 0, 1, "Slicer.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "SLICER", new Object[]{aTextWireCoil, "PMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_MV_Slicer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(632, "basicmachine.slicer.tier.02", "Advanced Slicing Machine", 2, "Slice of Life", GT_Recipe.GT_Recipe_Map.sSlicerRecipes, 2, 1, 0, 0, 1, "Slicer.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "SLICER", new Object[]{aTextWireCoil, "PMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_HV_Slicer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(633, "basicmachine.slicer.tier.03", "Advanced Slicing Machine II", 3, "Slice of Life", GT_Recipe.GT_Recipe_Map.sSlicerRecipes, 2, 1, 0, 0, 1, "Slicer.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "SLICER", new Object[]{aTextWireCoil, "PMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_EV_Slicer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(634, "basicmachine.slicer.tier.04", "Advanced Slicing Machine III", 4, "Slice of Life", GT_Recipe.GT_Recipe_Map.sSlicerRecipes, 2, 1, 0, 0, 1, "Slicer.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "SLICER", new Object[]{aTextWireCoil, "PMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_IV_Slicer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(635, "basicmachine.slicer.tier.05", "Advanced Slicing Machine IV", 5, "Slice of Life", GT_Recipe.GT_Recipe_Map.sSlicerRecipes, 2, 1, 0, 0, 1, "Slicer.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "SLICER", new Object[]{aTextWireCoil, "PMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - - ItemList.Machine_LV_Sifter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(641, "basicmachine.sifter.tier.01", "Basic Sifting Machine", 1, "Stay calm and keep sifting", GT_Recipe.GT_Recipe_Map.sSifterRecipes, 1, 9, 1000, 2, 5, "Sifter.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "SIFTER", new Object[]{"WFW", aTextPlateMotor, "CFC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'F', OreDictNames.craftingFilter, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_MV_Sifter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(642, "basicmachine.sifter.tier.02", "Advanced Sifting Machine", 2, "Stay calm and keep sifting", GT_Recipe.GT_Recipe_Map.sSifterRecipes, 1, 9, 2000, 2, 5, "Sifter.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "SIFTER", new Object[]{"WFW", aTextPlateMotor, "CFC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'F', OreDictNames.craftingFilter, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_HV_Sifter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(643, "basicmachine.sifter.tier.03", "Advanced Sifting Machine II", 3, "Stay calm and keep sifting", GT_Recipe.GT_Recipe_Map.sSifterRecipes, 1, 9, 4000, 2, 5, "Sifter.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "SIFTER", new Object[]{"WFW", aTextPlateMotor, "CFC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'F', OreDictNames.craftingFilter, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_EV_Sifter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(644, "basicmachine.sifter.tier.04", "Advanced Sifting Machine III", 4, "Stay calm and keep sifting", GT_Recipe.GT_Recipe_Map.sSifterRecipes, 1, 9, 8000, 2, 5, "Sifter.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "SIFTER", new Object[]{"WFW", aTextPlateMotor, "CFC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'F', OreDictNames.craftingFilter, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - ItemList.Machine_IV_Sifter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(645, "basicmachine.sifter.tier.05", "Advanced Sifting Machine IV", 5, "Stay calm and keep sifting", GT_Recipe.GT_Recipe_Map.sSifterRecipes, 1, 9, 16000, 2, 5, "Sifter.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "SIFTER", new Object[]{"WFW", aTextPlateMotor, "CFC", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'F', OreDictNames.craftingFilter, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE}).getStackForm(1L)); - - ItemList.Machine_LV_ArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(651, "basicmachine.arcfurnace.tier.01", "Basic Arc Furnace", 1, "", GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes, 1, 4, 16000, 0, 1, "ArcFurnace.png", SoundResource.IC2_MACHINES_INDUCTION_LOOP, false, false, SpecialEffects.NONE, "ARC_FURNACE", new Object[]{"WGW", aTextCableHull, aTextPlate, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, 'G', OrePrefixes.cell.get(Materials.Graphite)}).getStackForm(1L)); - ItemList.Machine_MV_ArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(652, "basicmachine.arcfurnace.tier.02", "Advanced Arc Furnace", 2, "", GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes, 1, 4, 24000, 0, 1, "ArcFurnace.png", SoundResource.IC2_MACHINES_INDUCTION_LOOP, false, false, SpecialEffects.NONE, "ARC_FURNACE", new Object[]{"WGW", aTextCableHull, aTextPlate, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, 'G', OrePrefixes.cell.get(Materials.Graphite)}).getStackForm(1L)); - ItemList.Machine_HV_ArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(653, "basicmachine.arcfurnace.tier.03", "Advanced Arc Furnace II", 3, "", GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes, 1, 4, 32000, 0, 1, "ArcFurnace.png", SoundResource.IC2_MACHINES_INDUCTION_LOOP, false, false, SpecialEffects.NONE, "ARC_FURNACE", new Object[]{"WGW", aTextCableHull, aTextPlate, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, 'G', OrePrefixes.cell.get(Materials.Graphite)}).getStackForm(1L)); - ItemList.Machine_EV_ArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(654, "basicmachine.arcfurnace.tier.04", "Advanced Arc Furnace III", 4, "", GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes, 1, 4, 48000, 0, 1, "ArcFurnace.png", SoundResource.IC2_MACHINES_INDUCTION_LOOP, false, false, SpecialEffects.NONE, "ARC_FURNACE", new Object[]{"WGW", aTextCableHull, aTextPlate, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, 'G', OrePrefixes.cell.get(Materials.Graphite)}).getStackForm(1L)); - ItemList.Machine_IV_ArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(655, "basicmachine.arcfurnace.tier.05", "Advanced Arc Furnace IV", 5, "", GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes, 1, 4, 64000, 0, 1, "ArcFurnace.png", SoundResource.IC2_MACHINES_INDUCTION_LOOP, false, false, SpecialEffects.NONE, "ARC_FURNACE", new Object[]{"WGW", aTextCableHull, aTextPlate, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, 'G', OrePrefixes.cell.get(Materials.Graphite)}).getStackForm(1L)); - - ItemList.Machine_LV_PlasmaArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(661, "basicmachine.plasmaarcfurnace.tier.01", "Basic Plasma Arc Furnace", 1, "", GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes, 1, 4, 1000, 0, 1, "PlasmaArcFurnace.png", SoundResource.IC2_MACHINES_INDUCTION_LOOP, false, false, SpecialEffects.NONE, "PLASMA_ARC_FURNACE", new Object[]{"WGW", aTextCableHull, "TPT", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, 'T', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'G', OrePrefixes.cell.get(Materials.Graphite)}).getStackForm(1L)); - ItemList.Machine_MV_PlasmaArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(662, "basicmachine.plasmaarcfurnace.tier.02", "Advanced Plasma Arc Furnace", 2, "", GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes, 1, 4, 2000, 0, 1, "PlasmaArcFurnace.png", SoundResource.IC2_MACHINES_INDUCTION_LOOP, false, false, SpecialEffects.NONE, "PLASMA_ARC_FURNACE", new Object[]{"WGW", aTextCableHull, "TPT", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, 'T', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'G', OrePrefixes.cell.get(Materials.Graphite)}).getStackForm(1L)); - ItemList.Machine_HV_PlasmaArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(663, "basicmachine.plasmaarcfurnace.tier.03", "Advanced Plasma Arc Furnace II", 3, "", GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes, 1, 4, 4000, 0, 1, "PlasmaArcFurnace.png", SoundResource.IC2_MACHINES_INDUCTION_LOOP, false, false, SpecialEffects.NONE, "PLASMA_ARC_FURNACE", new Object[]{"WGW", aTextCableHull, "TPT", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, 'T', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'G', OrePrefixes.cell.get(Materials.Graphite)}).getStackForm(1L)); - ItemList.Machine_EV_PlasmaArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(664, "basicmachine.plasmaarcfurnace.tier.04", "Advanced Plasma Arc Furnace III", 4, "", GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes, 1, 4, 8000, 0, 1, "PlasmaArcFurnace.png", SoundResource.IC2_MACHINES_INDUCTION_LOOP, false, false, SpecialEffects.NONE, "PLASMA_ARC_FURNACE", new Object[]{"WGW", aTextCableHull, "TPT", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, 'T', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'G', OrePrefixes.cell.get(Materials.Graphite)}).getStackForm(1L)); - ItemList.Machine_IV_PlasmaArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(665, "basicmachine.plasmaarcfurnace.tier.05", "Advanced Plasma Arc Furnace IV", 5, "", GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes, 1, 4, 16000, 0, 1, "PlasmaArcFurnace.png", SoundResource.IC2_MACHINES_INDUCTION_LOOP, false, false, SpecialEffects.NONE, "PLASMA_ARC_FURNACE", new Object[]{"WGW", aTextCableHull, "TPT", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, 'T', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'G', OrePrefixes.cell.get(Materials.Graphite)}).getStackForm(1L)); - - ItemList.Machine_LV_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(671, "basicmachine.e_oven.tier.01", "Basic Electric Oven", 1, "Just a Furnace with a different Design", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Oven.png", SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, false, false, SpecialEffects.NONE, "ELECTRIC_OVEN", new Object[]{"CEC", aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); - ItemList.Machine_MV_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(672, "basicmachine.e_oven.tier.02", "Advanced Electric Oven", 2, "Just a Furnace with a different Design", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Oven.png", SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, false, false, SpecialEffects.NONE, "ELECTRIC_OVEN", new Object[]{"CEC", aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); - ItemList.Machine_HV_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(673, "basicmachine.e_oven.tier.03", "Advanced Electric Oven II", 3, "Just a Furnace with a different Design", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Oven.png", SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, false, false, SpecialEffects.NONE, "ELECTRIC_OVEN", new Object[]{"CEC", aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); - ItemList.Machine_EV_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(674, "basicmachine.e_oven.tier.04", "Advanced Electric Oven III", 4, "Just a Furnace with a different Design", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Oven.png", SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, false, false, SpecialEffects.NONE, "ELECTRIC_OVEN", new Object[]{"CEC", aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); - ItemList.Machine_IV_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(675, "basicmachine.e_oven.tier.05", "Advanced Electric Oven IV", 5, "Just a Furnace with a different Design", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Oven.png", SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, false, false, SpecialEffects.NONE, "ELECTRIC_OVEN", new Object[]{"CEC", aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); - - ItemList.Machine_LV_Miner.set(new GT_MetaTileEntity_Miner(679, "basicmachine.miner.tier.01", "Basic Miner", 1).getStackForm(1L)); - ItemList.Machine_MV_Miner.set(new GT_MetaTileEntity_Miner(680, "basicmachine.miner.tier.02", "Good Miner", 2).getStackForm(1L)); - ItemList.Machine_HV_Miner.set(new GT_MetaTileEntity_Miner(681, "basicmachine.miner.tier.03", "Advanced Miner", 3).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Machine_LV_Miner.get(1L), bitsd, new Object[]{"EEE", aTextWireHull, "CSC", 'M', ItemList.Hull_LV, 'E', ItemList.Electric_Motor_LV, 'C', OrePrefixes.circuit.get(Materials.Basic), 'W', OrePrefixes.cableGt01.get(Materials.Tin), 'S', ItemList.Sensor_LV}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_MV_Miner.get(1L), bitsd, new Object[]{"PEP", aTextWireHull, "CSC", 'M', ItemList.Hull_MV, 'E', ItemList.Electric_Motor_MV, 'P', ItemList.Electric_Piston_MV, 'C', OrePrefixes.circuit.get(Materials.Good), 'W', OrePrefixes.cableGt02.get(Materials.Copper), 'S', ItemList.Sensor_MV}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_HV_Miner.get(1L), bitsd, new Object[]{"RPR", aTextWireHull, "CSC", 'M', ItemList.Hull_HV, 'E', ItemList.Electric_Motor_HV, 'P', ItemList.Electric_Piston_HV, 'R', ItemList.Robot_Arm_HV, 'C', OrePrefixes.circuit.get(Materials.Advanced), 'W', OrePrefixes.cableGt04.get(Materials.Gold), 'S', ItemList.Sensor_HV}); + ItemList.Machine_LV_Massfab.set( + new GT_MetaTileEntity_Massfabricator(461, "basicmachine.massfab.tier.01", "Basic Mass Fabricator", 1) + .getStackForm(1L)); + ItemList.Machine_MV_Massfab.set( + new GT_MetaTileEntity_Massfabricator(462, "basicmachine.massfab.tier.02", "Advanced Mass Fabricator", 2) + .getStackForm(1L)); + ItemList.Machine_HV_Massfab.set(new GT_MetaTileEntity_Massfabricator( + 463, "basicmachine.massfab.tier.03", "Advanced Mass Fabricator II", 3) + .getStackForm(1L)); + ItemList.Machine_EV_Massfab.set(new GT_MetaTileEntity_Massfabricator( + 464, "basicmachine.massfab.tier.04", "Advanced Mass Fabricator III", 4) + .getStackForm(1L)); + ItemList.Machine_IV_Massfab.set(new GT_MetaTileEntity_Massfabricator( + 465, "basicmachine.massfab.tier.05", "Advanced Mass Fabricator IV", 5) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Machine_LV_Massfab.get(1L), bitsd, new Object[] { + "CFC", + aTextWireHull, + "CFC", + 'M', + ItemList.Hull_LV, + 'F', + ItemList.Field_Generator_LV, + 'C', + OrePrefixes.circuit.get(Materials.Good), + 'W', + OrePrefixes.cableGt04.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_MV_Massfab.get(1L), bitsd, new Object[] { + "CFC", + aTextWireHull, + "CFC", + 'M', + ItemList.Hull_MV, + 'F', + ItemList.Field_Generator_MV, + 'C', + OrePrefixes.circuit.get(Materials.Advanced), + 'W', + OrePrefixes.cableGt04.get(Materials.AnyCopper) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_HV_Massfab.get(1L), bitsd, new Object[] { + "CFC", + aTextWireHull, + "CFC", + 'M', + ItemList.Hull_HV, + 'F', + ItemList.Field_Generator_HV, + 'C', + OrePrefixes.circuit.get(Materials.Data), + 'W', + OrePrefixes.cableGt04.get(Materials.Gold) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_EV_Massfab.get(1L), bitsd, new Object[] { + "CFC", + aTextWireHull, + "CFC", + 'M', + ItemList.Hull_EV, + 'F', + ItemList.Field_Generator_EV, + 'C', + OrePrefixes.circuit.get(Materials.Elite), + 'W', + OrePrefixes.cableGt04.get(Materials.Aluminium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_IV_Massfab.get(1L), bitsd, new Object[] { + "CFC", + aTextWireHull, + "CFC", + 'M', + ItemList.Hull_IV, + 'F', + ItemList.Field_Generator_IV, + 'C', + OrePrefixes.circuit.get(Materials.Master), + 'W', + OrePrefixes.cableGt04.get(Materials.Tungsten) + }); + + ItemList.Machine_LV_Amplifab.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 471, + "basicmachine.amplifab.tier.01", + "Basic Amplifabricator", + 1, + "Extracting UU Amplifier", + GT_Recipe.GT_Recipe_Map.sAmplifiers, + 1, + 1, + 1000, + 0, + 1, + "Amplifabricator.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "AMPLIFAB", + new Object[] { + aTextWirePump, + aTextPlateMotor, + "CPC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 + }) + .getStackForm(1L)); + ItemList.Machine_MV_Amplifab.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 472, + "basicmachine.amplifab.tier.02", + "Advanced Amplifabricator", + 2, + "Extracting UU Amplifier", + GT_Recipe.GT_Recipe_Map.sAmplifiers, + 1, + 1, + 1000, + 0, + 1, + "Amplifabricator.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "AMPLIFAB", + new Object[] { + aTextWirePump, + aTextPlateMotor, + "CPC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 + }) + .getStackForm(1L)); + ItemList.Machine_HV_Amplifab.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 473, + "basicmachine.amplifab.tier.03", + "Advanced Amplifabricator II", + 3, + "Extracting UU Amplifier", + GT_Recipe.GT_Recipe_Map.sAmplifiers, + 1, + 1, + 1000, + 0, + 1, + "Amplifabricator.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "AMPLIFAB", + new Object[] { + aTextWirePump, + aTextPlateMotor, + "CPC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 + }) + .getStackForm(1L)); + ItemList.Machine_EV_Amplifab.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 474, + "basicmachine.amplifab.tier.04", + "Advanced Amplifabricator III", + 4, + "Extracting UU Amplifier", + GT_Recipe.GT_Recipe_Map.sAmplifiers, + 1, + 1, + 1000, + 0, + 1, + "Amplifabricator.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "AMPLIFAB", + new Object[] { + aTextWirePump, + aTextPlateMotor, + "CPC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 + }) + .getStackForm(1L)); + ItemList.Machine_IV_Amplifab.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 475, + "basicmachine.amplifab.tier.05", + "Advanced Amplifabricator IV", + 5, + "Extracting UU Amplifier", + GT_Recipe.GT_Recipe_Map.sAmplifiers, + 1, + 1, + 1000, + 0, + 1, + "Amplifabricator.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "AMPLIFAB", + new Object[] { + aTextWirePump, + aTextPlateMotor, + "CPC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Replicator.set( + new GT_MetaTileEntity_Replicator(481, "basicmachine.replicator.tier.01", "Basic Replicator", 1) + .getStackForm(1L)); + ItemList.Machine_MV_Replicator.set( + new GT_MetaTileEntity_Replicator(482, "basicmachine.replicator.tier.02", "Advanced Replicator", 2) + .getStackForm(1L)); + ItemList.Machine_HV_Replicator.set( + new GT_MetaTileEntity_Replicator(483, "basicmachine.replicator.tier.03", "Advanced Replicator II", 3) + .getStackForm(1L)); + ItemList.Machine_EV_Replicator.set( + new GT_MetaTileEntity_Replicator(484, "basicmachine.replicator.tier.04", "Advanced Replicator III", 4) + .getStackForm(1L)); + ItemList.Machine_IV_Replicator.set( + new GT_MetaTileEntity_Replicator(485, "basicmachine.replicator.tier.05", "Advanced Replicator IV", 5) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Machine_LV_Replicator.get(1L), bitsd, new Object[] { + "EFE", + aTextCableHull, + aTextMotorWire, + 'M', + ItemList.Hull_LV, + 'F', + ItemList.Field_Generator_LV, + 'E', + ItemList.Emitter_LV, + 'C', + OrePrefixes.circuit.get(Materials.Good), + 'W', + OrePrefixes.cableGt04.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_MV_Replicator.get(1L), bitsd, new Object[] { + "EFE", + aTextCableHull, + aTextMotorWire, + 'M', + ItemList.Hull_MV, + 'F', + ItemList.Field_Generator_MV, + 'E', + ItemList.Emitter_MV, + 'C', + OrePrefixes.circuit.get(Materials.Advanced), + 'W', + OrePrefixes.cableGt04.get(Materials.AnyCopper) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_HV_Replicator.get(1L), bitsd, new Object[] { + "EFE", + aTextCableHull, + aTextMotorWire, + 'M', + ItemList.Hull_HV, + 'F', + ItemList.Field_Generator_HV, + 'E', + ItemList.Emitter_HV, + 'C', + OrePrefixes.circuit.get(Materials.Data), + 'W', + OrePrefixes.cableGt04.get(Materials.Gold) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_EV_Replicator.get(1L), bitsd, new Object[] { + "EFE", + aTextCableHull, + aTextMotorWire, + 'M', + ItemList.Hull_EV, + 'F', + ItemList.Field_Generator_EV, + 'E', + ItemList.Emitter_EV, + 'C', + OrePrefixes.circuit.get(Materials.Elite), + 'W', + OrePrefixes.cableGt04.get(Materials.Aluminium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_IV_Replicator.get(1L), bitsd, new Object[] { + "EFE", + aTextCableHull, + aTextMotorWire, + 'M', + ItemList.Hull_IV, + 'F', + ItemList.Field_Generator_IV, + 'E', + ItemList.Emitter_IV, + 'C', + OrePrefixes.circuit.get(Materials.Master), + 'W', + OrePrefixes.cableGt04.get(Materials.Tungsten) + }); + + ItemList.Machine_LV_Brewery.set( + new GT_MetaTileEntity_PotionBrewer(491, "basicmachine.brewery.tier.01", "Basic Brewery", 1) + .getStackForm(1L)); + ItemList.Machine_MV_Brewery.set( + new GT_MetaTileEntity_PotionBrewer(492, "basicmachine.brewery.tier.02", "Advanced Brewery", 2) + .getStackForm(1L)); + ItemList.Machine_HV_Brewery.set( + new GT_MetaTileEntity_PotionBrewer(493, "basicmachine.brewery.tier.03", "Advanced Brewery II", 3) + .getStackForm(1L)); + ItemList.Machine_EV_Brewery.set( + new GT_MetaTileEntity_PotionBrewer(494, "basicmachine.brewery.tier.04", "Advanced Brewery III", 4) + .getStackForm(1L)); + ItemList.Machine_IV_Brewery.set( + new GT_MetaTileEntity_PotionBrewer(495, "basicmachine.brewery.tier.05", "Advanced Brewery IV", 5) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Machine_LV_Brewery.get(1L), bitsd, new Object[] { + "GPG", + aTextWireHull, + "CBC", + 'M', + ItemList.Hull_LV, + 'P', + ItemList.Electric_Pump_LV, + 'B', + new ItemStack(Items.brewing_stand, 0), + 'C', + OrePrefixes.circuit.get(Materials.Basic), + 'W', + OrePrefixes.cableGt01.get(Materials.Tin), + 'G', + new ItemStack(Blocks.glass, 1) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_MV_Brewery.get(1L), bitsd, new Object[] { + "GPG", + aTextWireHull, + "CBC", + 'M', + ItemList.Hull_MV, + 'P', + ItemList.Electric_Pump_MV, + 'B', + new ItemStack(Items.brewing_stand, 0), + 'C', + OrePrefixes.circuit.get(Materials.Good), + 'W', + OrePrefixes.cableGt01.get(Materials.AnyCopper), + 'G', + new ItemStack(Blocks.glass, 1) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_HV_Brewery.get(1L), bitsd, new Object[] { + "GPG", + aTextWireHull, + "CBC", + 'M', + ItemList.Hull_HV, + 'P', + ItemList.Electric_Pump_HV, + 'B', + new ItemStack(Items.brewing_stand, 0), + 'C', + OrePrefixes.circuit.get(Materials.Advanced), + 'W', + OrePrefixes.cableGt01.get(Materials.Gold), + 'G', + new ItemStack(Blocks.glass, 1) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_EV_Brewery.get(1L), bitsd, new Object[] { + "GPG", + aTextWireHull, + "CBC", + 'M', + ItemList.Hull_EV, + 'P', + ItemList.Electric_Pump_EV, + 'B', + new ItemStack(Items.brewing_stand, 0), + 'C', + OrePrefixes.circuit.get(Materials.Data), + 'W', + OrePrefixes.cableGt01.get(Materials.Aluminium), + 'G', + new ItemStack(Blocks.glass, 1) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_IV_Brewery.get(1L), bitsd, new Object[] { + "GPG", + aTextWireHull, + "CBC", + 'M', + ItemList.Hull_IV, + 'P', + ItemList.Electric_Pump_IV, + 'B', + new ItemStack(Items.brewing_stand, 0), + 'C', + OrePrefixes.circuit.get(Materials.Elite), + 'W', + OrePrefixes.cableGt01.get(Materials.Tungsten), + 'G', + new ItemStack(Blocks.glass, 1) + }); + + ItemList.Machine_LV_Fermenter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 501, + "basicmachine.fermenter.tier.01", + "Basic Fermenter", + 1, + "Fermenting Fluids", + GT_Recipe.GT_Recipe_Map.sFermentingRecipes, + 1, + 1, + 1000, + 0, + 1, + "Fermenter.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "FERMENTER", + new Object[] { + aTextWirePump, + "GMG", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_MV_Fermenter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 502, + "basicmachine.fermenter.tier.02", + "Advanced Fermenter", + 2, + "Fermenting Fluids", + GT_Recipe.GT_Recipe_Map.sFermentingRecipes, + 1, + 1, + 1000, + 0, + 1, + "Fermenter.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "FERMENTER", + new Object[] { + aTextWirePump, + "GMG", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_HV_Fermenter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 503, + "basicmachine.fermenter.tier.03", + "Advanced Fermenter II", + 3, + "Fermenting Fluids", + GT_Recipe.GT_Recipe_Map.sFermentingRecipes, + 1, + 1, + 1000, + 0, + 1, + "Fermenter.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "FERMENTER", + new Object[] { + aTextWirePump, + "GMG", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_EV_Fermenter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 504, + "basicmachine.fermenter.tier.04", + "Advanced Fermenter III", + 4, + "Fermenting Fluids", + GT_Recipe.GT_Recipe_Map.sFermentingRecipes, + 1, + 1, + 1000, + 0, + 1, + "Fermenter.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "FERMENTER", + new Object[] { + aTextWirePump, + "GMG", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_IV_Fermenter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 505, + "basicmachine.fermenter.tier.05", + "Advanced Fermenter IV", + 5, + "Fermenting Fluids", + GT_Recipe.GT_Recipe_Map.sFermentingRecipes, + 1, + 1, + 1000, + 0, + 1, + "Fermenter.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "FERMENTER", + new Object[] { + aTextWirePump, + "GMG", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + + ItemList.Machine_LV_FluidExtractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 511, + "basicmachine.fluidextractor.tier.01", + "Basic Fluid Extractor", + 1, + "Extracting Fluids from Items", + GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes, + 1, + 1, + 16000, + 0, + 1, + "FluidExtractor.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "FLUID_EXTRACTOR", + new Object[] { + "GEG", + "TPT", + "CMC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'T', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_MV_FluidExtractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 512, + "basicmachine.fluidextractor.tier.02", + "Advanced Fluid Extractor", + 2, + "Extracting Fluids from Items", + GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes, + 1, + 1, + 16000, + 0, + 1, + "FluidExtractor.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "FLUID_EXTRACTOR", + new Object[] { + "GEG", + "TPT", + "CMC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'T', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_HV_FluidExtractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 513, + "basicmachine.fluidextractor.tier.03", + "Advanced Fluid Extractor II", + 3, + "Extracting Fluids from Items", + GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes, + 1, + 1, + 16000, + 0, + 1, + "FluidExtractor.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "FLUID_EXTRACTOR", + new Object[] { + "GEG", + "TPT", + "CMC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'T', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_EV_FluidExtractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 514, + "basicmachine.fluidextractor.tier.04", + "Advanced Fluid Extractor III", + 4, + "Extracting Fluids from Items", + GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes, + 1, + 1, + 16000, + 0, + 1, + "FluidExtractor.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "FLUID_EXTRACTOR", + new Object[] { + "GEG", + "TPT", + "CMC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'T', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_IV_FluidExtractor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 515, + "basicmachine.fluidextractor.tier.05", + "Advanced Fluid Extractor IV", + 5, + "Extracting Fluids from Items", + GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes, + 1, + 1, + 16000, + 0, + 1, + "FluidExtractor.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "FLUID_EXTRACTOR", + new Object[] { + "GEG", + "TPT", + "CMC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'T', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + + ItemList.Machine_LV_FluidSolidifier.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 521, + "basicmachine.fluidsolidifier.tier.01", + "Basic Fluid Solidifier", + 1, + "Cools Fluids down to form Solids", + GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes, + 1, + 1, + 16000, + 0, + 1, + "FluidSolidifier.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "FLUID_SOLIDIFIER", + new Object[] { + "PGP", + aTextWireHull, + "CBC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, + 'B', + OreDictNames.craftingChest + }) + .getStackForm(1L)); + ItemList.Machine_MV_FluidSolidifier.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 522, + "basicmachine.fluidsolidifier.tier.02", + "Advanced Fluid Solidifier", + 2, + "Cools Fluids down to form Solids", + GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes, + 1, + 1, + 16000, + 0, + 1, + "FluidSolidifier.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "FLUID_SOLIDIFIER", + new Object[] { + "PGP", + aTextWireHull, + "CBC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, + 'B', + OreDictNames.craftingChest + }) + .getStackForm(1L)); + ItemList.Machine_HV_FluidSolidifier.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 523, + "basicmachine.fluidsolidifier.tier.03", + "Advanced Fluid Solidifier II", + 3, + "Cools Fluids down to form Solids", + GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes, + 1, + 1, + 16000, + 0, + 1, + "FluidSolidifier.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "FLUID_SOLIDIFIER", + new Object[] { + "PGP", + aTextWireHull, + "CBC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, + 'B', + OreDictNames.craftingChest + }) + .getStackForm(1L)); + ItemList.Machine_EV_FluidSolidifier.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 524, + "basicmachine.fluidsolidifier.tier.04", + "Advanced Fluid Solidifier III", + 4, + "Cools Fluids down to form Solids", + GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes, + 1, + 1, + 16000, + 0, + 1, + "FluidSolidifier.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "FLUID_SOLIDIFIER", + new Object[] { + "PGP", + aTextWireHull, + "CBC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, + 'B', + OreDictNames.craftingChest + }) + .getStackForm(1L)); + ItemList.Machine_IV_FluidSolidifier.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 525, + "basicmachine.fluidsolidifier.tier.05", + "Advanced Fluid Solidifier IV", + 5, + "Cools Fluids down to form Solids", + GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes, + 1, + 1, + 16000, + 0, + 1, + "FluidSolidifier.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "FLUID_SOLIDIFIER", + new Object[] { + "PGP", + aTextWireHull, + "CBC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS, + 'B', + OreDictNames.craftingChest + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Distillery.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 531, + "basicmachine.distillery.tier.01", + "Basic Distillery", + 1, + "Extracting the most relevant Parts of Fluids", + GT_Recipe.GT_Recipe_Map.sDistilleryRecipes, + 1, + 1, + 8000, + 0, + 1, + "Distillery.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "DISTILLERY", + new Object[] { + "GBG", + aTextCableHull, + aTextWirePump, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'B', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_MV_Distillery.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 532, + "basicmachine.distillery.tier.02", + "Advanced Distillery", + 2, + "Extracting the most relevant Parts of Fluids", + GT_Recipe.GT_Recipe_Map.sDistilleryRecipes, + 1, + 1, + 16000, + 0, + 1, + "Distillery.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "DISTILLERY", + new Object[] { + "GBG", + aTextCableHull, + aTextWirePump, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'B', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_HV_Distillery.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 533, + "basicmachine.distillery.tier.03", + "Advanced Distillery II", + 3, + "Extracting the most relevant Parts of Fluids", + GT_Recipe.GT_Recipe_Map.sDistilleryRecipes, + 1, + 1, + 24000, + 0, + 1, + "Distillery.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "DISTILLERY", + new Object[] { + "GBG", + aTextCableHull, + aTextWirePump, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'B', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_EV_Distillery.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 534, + "basicmachine.distillery.tier.04", + "Advanced Distillery III", + 4, + "Extracting the most relevant Parts of Fluids", + GT_Recipe.GT_Recipe_Map.sDistilleryRecipes, + 1, + 1, + 32000, + 0, + 1, + "Distillery.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "DISTILLERY", + new Object[] { + "GBG", + aTextCableHull, + aTextWirePump, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'B', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_IV_Distillery.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 535, + "basicmachine.distillery.tier.05", + "Advanced Distillery IV", + 5, + "Extracting the most relevant Parts of Fluids", + GT_Recipe.GT_Recipe_Map.sDistilleryRecipes, + 1, + 1, + 40000, + 0, + 1, + "Distillery.png", + SoundResource.IC2_MACHINES_EXTRACTOR_OP, + false, + false, + SpecialEffects.NONE, + "DISTILLERY", + new Object[] { + "GBG", + aTextCableHull, + aTextWirePump, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'B', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PIPE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + + ItemList.Machine_LV_ChemicalBath.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 541, + "basicmachine.chemicalbath.tier.01", + "Basic Chemical Bath", + 1, + "Bathing Ores in Chemicals to separate them", + GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes, + 1, + 3, + 8000, + 0, + 1, + "ChemicalBath.png", + SoundResource.NONE, + false, + true, + SpecialEffects.NONE, + "CHEMICAL_BATH", + new Object[] { + "VGW", + "PGV", + aTextCableHull, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_MV_ChemicalBath.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 542, + "basicmachine.chemicalbath.tier.02", + "Advanced Chemical Bath", + 2, + "Bathing Ores in Chemicals to separate them", + GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes, + 1, + 3, + 8000, + 0, + 1, + "ChemicalBath.png", + SoundResource.NONE, + false, + true, + SpecialEffects.NONE, + "CHEMICAL_BATH", + new Object[] { + "VGW", + "PGV", + aTextCableHull, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_HV_ChemicalBath.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 543, + "basicmachine.chemicalbath.tier.03", + "Advanced Chemical Bath II", + 3, + "Bathing Ores in Chemicals to separate them", + GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes, + 1, + 3, + 8000, + 0, + 1, + "ChemicalBath.png", + SoundResource.NONE, + false, + true, + SpecialEffects.NONE, + "CHEMICAL_BATH", + new Object[] { + "VGW", + "PGV", + aTextCableHull, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_EV_ChemicalBath.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 544, + "basicmachine.chemicalbath.tier.04", + "Advanced Chemical Bath III", + 4, + "Bathing Ores in Chemicals to separate them", + GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes, + 1, + 3, + 8000, + 0, + 1, + "ChemicalBath.png", + SoundResource.NONE, + false, + true, + SpecialEffects.NONE, + "CHEMICAL_BATH", + new Object[] { + "VGW", + "PGV", + aTextCableHull, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_IV_ChemicalBath.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 545, + "basicmachine.chemicalbath.tier.05", + "Advanced Chemical Bath IV", + 5, + "Bathing Ores in Chemicals to separate them", + GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes, + 1, + 3, + 8000, + 0, + 1, + "ChemicalBath.png", + SoundResource.NONE, + false, + true, + SpecialEffects.NONE, + "CHEMICAL_BATH", + new Object[] { + "VGW", + "PGV", + aTextCableHull, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Polarizer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 551, + "basicmachine.polarizer.tier.01", + "Basic Polarizer", + 1, + "Bipolarising your Magnets", + GT_Recipe.GT_Recipe_Map.sPolarizerRecipes, + 1, + 1, + 0, + 0, + 1, + "Polarizer.png", + SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, + false, + false, + SpecialEffects.NONE, + "POLARIZER", + new Object[] { + "ZSZ", + aTextWireHull, + "ZSZ", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'S', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, + 'Z', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_MV_Polarizer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 552, + "basicmachine.polarizer.tier.02", + "Advanced Polarizer", + 2, + "Bipolarising your Magnets", + GT_Recipe.GT_Recipe_Map.sPolarizerRecipes, + 1, + 1, + 0, + 0, + 1, + "Polarizer.png", + SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, + false, + false, + SpecialEffects.NONE, + "POLARIZER", + new Object[] { + "ZSZ", + aTextWireHull, + "ZSZ", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'S', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, + 'Z', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_HV_Polarizer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 553, + "basicmachine.polarizer.tier.03", + "Advanced Polarizer II", + 3, + "Bipolarising your Magnets", + GT_Recipe.GT_Recipe_Map.sPolarizerRecipes, + 1, + 1, + 0, + 0, + 1, + "Polarizer.png", + SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, + false, + false, + SpecialEffects.NONE, + "POLARIZER", + new Object[] { + "ZSZ", + aTextWireHull, + "ZSZ", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'S', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, + 'Z', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_EV_Polarizer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 554, + "basicmachine.polarizer.tier.04", + "Advanced Polarizer III", + 4, + "Bipolarising your Magnets", + GT_Recipe.GT_Recipe_Map.sPolarizerRecipes, + 1, + 1, + 0, + 0, + 1, + "Polarizer.png", + SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, + false, + false, + SpecialEffects.NONE, + "POLARIZER", + new Object[] { + "ZSZ", + aTextWireHull, + "ZSZ", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'S', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, + 'Z', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_IV_Polarizer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 555, + "basicmachine.polarizer.tier.05", + "Advanced Polarizer IV", + 5, + "Bipolarising your Magnets", + GT_Recipe.GT_Recipe_Map.sPolarizerRecipes, + 1, + 1, + 0, + 0, + 1, + "Polarizer.png", + SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, + false, + false, + SpecialEffects.NONE, + "POLARIZER", + new Object[] { + "ZSZ", + aTextWireHull, + "ZSZ", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'S', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, + 'Z', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + + ItemList.Machine_LV_ElectromagneticSeparator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 561, + "basicmachine.electromagneticseparator.tier.01", + "Basic Electromagnetic Separator", + 1, + "Separating the magnetic Ores from the rest", + GT_Recipe.GT_Recipe_Map.sElectroMagneticSeparatorRecipes, + 1, + 3, + 0, + 0, + 1, + "ElectromagneticSeparator.png", + SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, + false, + false, + SpecialEffects.NONE, + "ELECTROMAGNETIC_SEPARATOR", + new Object[] { + "VWZ", + "WMS", + "CWZ", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'S', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, + 'Z', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_MV_ElectromagneticSeparator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 562, + "basicmachine.electromagneticseparator.tier.02", + "Advanced Electromagnetic Separator", + 2, + "Separating the magnetic Ores from the rest", + GT_Recipe.GT_Recipe_Map.sElectroMagneticSeparatorRecipes, + 1, + 3, + 0, + 0, + 1, + "ElectromagneticSeparator.png", + SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, + false, + false, + SpecialEffects.NONE, + "ELECTROMAGNETIC_SEPARATOR", + new Object[] { + "VWZ", + "WMS", + "CWZ", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'S', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, + 'Z', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_HV_ElectromagneticSeparator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 563, + "basicmachine.electromagneticseparator.tier.03", + "Advanced Electromagnetic Separator II", + 3, + "Separating the magnetic Ores from the rest", + GT_Recipe.GT_Recipe_Map.sElectroMagneticSeparatorRecipes, + 1, + 3, + 0, + 0, + 1, + "ElectromagneticSeparator.png", + SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, + false, + false, + SpecialEffects.NONE, + "ELECTROMAGNETIC_SEPARATOR", + new Object[] { + "VWZ", + "WMS", + "CWZ", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'S', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, + 'Z', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_EV_ElectromagneticSeparator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 564, + "basicmachine.electromagneticseparator.tier.04", + "Advanced Electromagnetic Separator III", + 4, + "Separating the magnetic Ores from the rest", + GT_Recipe.GT_Recipe_Map.sElectroMagneticSeparatorRecipes, + 1, + 3, + 0, + 0, + 1, + "ElectromagneticSeparator.png", + SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, + false, + false, + SpecialEffects.NONE, + "ELECTROMAGNETIC_SEPARATOR", + new Object[] { + "VWZ", + "WMS", + "CWZ", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'S', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, + 'Z', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_IV_ElectromagneticSeparator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 565, + "basicmachine.electromagneticseparator.tier.05", + "Advanced Electromagnetic Separator IV", + 5, + "Separating the magnetic Ores from the rest", + GT_Recipe.GT_Recipe_Map.sElectroMagneticSeparatorRecipes, + 1, + 3, + 0, + 0, + 1, + "ElectromagneticSeparator.png", + SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, + false, + false, + SpecialEffects.NONE, + "ELECTROMAGNETIC_SEPARATOR", + new Object[] { + "VWZ", + "WMS", + "CWZ", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'S', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, + 'Z', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_ELECTRIC, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Autoclave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 571, + "basicmachine.autoclave.tier.01", + "Basic Autoclave", + 1, + "Crystallizing your Dusts", + GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes, + 2, + 2, + 10000, + 0, + 1, + "Autoclave2.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "AUTOCLAVE", + new Object[] { + "IGI", + "IMI", + "CPC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'I', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_MV_Autoclave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 572, + "basicmachine.autoclave.tier.02", + "Advanced Autoclave", + 2, + "Crystallizing your Dusts", + GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes, + 2, + 2, + 20000, + 0, + 1, + "Autoclave2.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "AUTOCLAVE", + new Object[] { + "IGI", + "IMI", + "CPC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'I', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_HV_Autoclave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 573, + "basicmachine.autoclave.tier.03", + "Advanced Autoclave II", + 3, + "Crystallizing your Dusts", + GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes, + 2, + 3, + 30000, + 0, + 1, + "Autoclave3.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "AUTOCLAVE", + new Object[] { + "IGI", + "IMI", + "CPC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'I', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_EV_Autoclave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 574, + "basicmachine.autoclave.tier.04", + "Advanced Autoclave III", + 4, + "Crystallizing your Dusts", + GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes, + 2, + 4, + 40000, + 0, + 1, + "Autoclave4.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "AUTOCLAVE", + new Object[] { + "IGI", + "IMI", + "CPC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'I', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_IV_Autoclave.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 575, + "basicmachine.autoclave.tier.05", + "Advanced Autoclave IV", + 5, + "Crystallizing your Dusts", + GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes, + 2, + 4, + 50000, + 0, + 1, + "Autoclave4.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "AUTOCLAVE", + new Object[] { + "IGI", + "IMI", + "CPC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'I', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 581, + "basicmachine.mixer.tier.01", + "Basic Mixer", + 1, + "Will it Blend?", + GT_Recipe.GT_Recipe_Map.sMixerRecipes, + 6, + 1, + 16000, + 0, + 1, + "Mixer.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "MIXER", + new Object[] { + "GRG", + "GEG", + aTextCableHull, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_MV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 582, + "basicmachine.mixer.tier.02", + "Advanced Mixer", + 2, + "Will it Blend?", + GT_Recipe.GT_Recipe_Map.sMixerRecipes, + 6, + 1, + 32000, + 0, + 1, + "Mixer.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "MIXER", + new Object[] { + "GRG", + "GEG", + aTextCableHull, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_HV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 583, + "basicmachine.mixer.tier.03", + "Advanced Mixer II", + 3, + "Will it Blend?", + GT_Recipe.GT_Recipe_Map.sMixerRecipes, + 6, + 4, + 48000, + 0, + 1, + "Mixer4.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "MIXER", + new Object[] { + "GRG", + "GEG", + aTextCableHull, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_EV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 584, + "basicmachine.mixer.tier.04", + "Advanced Mixer III", + 4, + "Will it Blend?", + GT_Recipe.GT_Recipe_Map.sMixerRecipes, + 9, + 4, + 64000, + 0, + 1, + "Mixer6.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "MIXER", + new Object[] { + "GRG", + "GEG", + aTextCableHull, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_IV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 585, + "basicmachine.mixer.tier.05", + "Advanced Mixer IV", + 5, + "Will it Blend?", + GT_Recipe.GT_Recipe_Map.sMixerRecipes, + 9, + 4, + 128000, + 0, + 1, + "Mixer6.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "MIXER", + new Object[] { + "GRG", + "GEG", + aTextCableHull, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, + 'R', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + + ItemList.Machine_LV_LaserEngraver.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 591, + "basicmachine.laserengraver.tier.01", + "Basic Precision Laser Engraver", + 1, + "Don't look directly at the Laser", + GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes, + 2, + 1, + 8000, + 0, + 1, + "LaserEngraver.png", + SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, + false, + false, + SpecialEffects.NONE, + "LASER_ENGRAVER", + new Object[] { + "PEP", + aTextCableHull, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_MV_LaserEngraver.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 592, + "basicmachine.laserengraver.tier.02", + "Advanced Precision Laser Engraver", + 2, + "Don't look directly at the Laser", + GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes, + 2, + 1, + 16000, + 0, + 1, + "LaserEngraver.png", + SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, + false, + false, + SpecialEffects.NONE, + "LASER_ENGRAVER", + new Object[] { + "PEP", + aTextCableHull, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_HV_LaserEngraver.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 593, + "basicmachine.laserengraver.tier.03", + "Advanced Precision Laser Engraver II", + 3, + "Don't look directly at the Laser", + GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes, + 2, + 1, + 24000, + 0, + 1, + "LaserEngraver.png", + SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, + false, + false, + SpecialEffects.NONE, + "LASER_ENGRAVER", + new Object[] { + "PEP", + aTextCableHull, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_EV_LaserEngraver.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 594, + "basicmachine.laserengraver.tier.04", + "Advanced Precision Laser Engraver III", + 4, + "Don't look directly at the Laser", + GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes, + 2, + 1, + 32000, + 0, + 1, + "LaserEngraver.png", + SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, + false, + false, + SpecialEffects.NONE, + "LASER_ENGRAVER", + new Object[] { + "PEP", + aTextCableHull, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_IV_LaserEngraver.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 595, + "basicmachine.laserengraver.tier.05", + "Advanced Precision Laser Engraver IV", + 5, + "Don't look directly at the Laser", + GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes, + 2, + 1, + 40000, + 0, + 1, + "LaserEngraver.png", + SoundResource.IC2_MACHINES_MAGNETIZER_LOOP, + false, + false, + SpecialEffects.NONE, + "LASER_ENGRAVER", + new Object[] { + "PEP", + aTextCableHull, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Press.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 601, + "basicmachine.press.tier.01", + "Basic Forming Press", + 1, + "Imprinting Images into things", + GT_Recipe.GT_Recipe_Map.sPressRecipes, + 2, + 1, + 0, + 0, + 1, + "Press.png", + SoundResource.IC2_MACHINES_COMPRESSOR_OP, + false, + false, + SpecialEffects.NONE, + "PRESS", + new Object[] { + aTextWirePump, + aTextCableHull, + aTextWirePump, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_MV_Press.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 602, + "basicmachine.press.tier.02", + "Advanced Forming Press", + 2, + "Imprinting Images into things", + GT_Recipe.GT_Recipe_Map.sPressRecipes, + 2, + 1, + 0, + 0, + 1, + "Press.png", + SoundResource.IC2_MACHINES_COMPRESSOR_OP, + false, + false, + SpecialEffects.NONE, + "PRESS", + new Object[] { + aTextWirePump, + aTextCableHull, + aTextWirePump, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_HV_Press.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 603, + "basicmachine.press.tier.03", + "Advanced Forming Press II", + 3, + "Imprinting Images into things", + GT_Recipe.GT_Recipe_Map.sPressRecipes, + 2, + 1, + 0, + 0, + 1, + "Press.png", + SoundResource.IC2_MACHINES_COMPRESSOR_OP, + false, + false, + SpecialEffects.NONE, + "PRESS", + new Object[] { + aTextWirePump, + aTextCableHull, + aTextWirePump, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_EV_Press.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 604, + "basicmachine.press.tier.04", + "Advanced Forming Press III", + 4, + "Imprinting Images into things", + GT_Recipe.GT_Recipe_Map.sPressRecipes, + 2, + 1, + 0, + 0, + 1, + "Press.png", + SoundResource.IC2_MACHINES_COMPRESSOR_OP, + false, + false, + SpecialEffects.NONE, + "PRESS", + new Object[] { + aTextWirePump, + aTextCableHull, + aTextWirePump, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_IV_Press.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 605, + "basicmachine.press.tier.05", + "Advanced Forming Press IV", + 5, + "Imprinting Images into things", + GT_Recipe.GT_Recipe_Map.sPressRecipes, + 2, + 1, + 0, + 0, + 1, + "Press.png", + SoundResource.IC2_MACHINES_COMPRESSOR_OP, + false, + false, + SpecialEffects.NONE, + "PRESS", + new Object[] { + aTextWirePump, + aTextCableHull, + aTextWirePump, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Hammer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 611, + "basicmachine.hammer.tier.01", + "Basic Forge Hammer", + 1, + "Stop, Hammertime!", + GT_Recipe.GT_Recipe_Map.sHammerRecipes, + 1, + 1, + 0, + 6, + 3, + "Hammer.png", + SoundResource.RANDOM_ANVIL_USE, + false, + false, + SpecialEffects.MAIN_RANDOM_SPARKS, + "HAMMER", + new Object[] { + aTextWirePump, + aTextCableHull, + "WAW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'O', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, + 'A', + OreDictNames.craftingAnvil + }) + .getStackForm(1L)); + ItemList.Machine_MV_Hammer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 612, + "basicmachine.hammer.tier.02", + "Advanced Forge Hammer", + 2, + "Stop, Hammertime!", + GT_Recipe.GT_Recipe_Map.sHammerRecipes, + 1, + 1, + 0, + 6, + 3, + "Hammer.png", + SoundResource.RANDOM_ANVIL_USE, + false, + false, + SpecialEffects.MAIN_RANDOM_SPARKS, + "HAMMER", + new Object[] { + aTextWirePump, + aTextCableHull, + "WAW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'O', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, + 'A', + OreDictNames.craftingAnvil + }) + .getStackForm(1L)); + ItemList.Machine_HV_Hammer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 613, + "basicmachine.hammer.tier.03", + "Advanced Forge Hammer II", + 3, + "Stop, Hammertime!", + GT_Recipe.GT_Recipe_Map.sHammerRecipes, + 1, + 1, + 0, + 6, + 3, + "Hammer.png", + SoundResource.RANDOM_ANVIL_USE, + false, + false, + SpecialEffects.MAIN_RANDOM_SPARKS, + "HAMMER", + new Object[] { + aTextWirePump, + aTextCableHull, + "WAW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'O', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, + 'A', + OreDictNames.craftingAnvil + }) + .getStackForm(1L)); + ItemList.Machine_EV_Hammer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 614, + "basicmachine.hammer.tier.04", + "Advanced Forge Hammer III", + 4, + "Stop, Hammertime!", + GT_Recipe.GT_Recipe_Map.sHammerRecipes, + 1, + 1, + 0, + 6, + 3, + "Hammer.png", + SoundResource.RANDOM_ANVIL_USE, + false, + false, + SpecialEffects.MAIN_RANDOM_SPARKS, + "HAMMER", + new Object[] { + aTextWirePump, + aTextCableHull, + "WAW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'O', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, + 'A', + OreDictNames.craftingAnvil + }) + .getStackForm(1L)); + ItemList.Machine_IV_Hammer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 615, + "basicmachine.hammer.tier.05", + "Advanced Forge Hammer IV", + 5, + "Stop, Hammertime!", + GT_Recipe.GT_Recipe_Map.sHammerRecipes, + 1, + 1, + 0, + 6, + 3, + "Hammer.png", + SoundResource.RANDOM_ANVIL_USE, + false, + false, + SpecialEffects.MAIN_RANDOM_SPARKS, + "HAMMER", + new Object[] { + aTextWirePump, + aTextCableHull, + "WAW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'O', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, + 'A', + OreDictNames.craftingAnvil + }) + .getStackForm(1L)); + + ItemList.Machine_LV_FluidHeater.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 621, + "basicmachine.fluidheater.tier.01", + "Basic Fluid Heater", + 1, + "Heating up your Fluids", + GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes, + 1, + 0, + 8000, + 0, + 1, + "FluidHeater.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "FLUID_HEATER", + new Object[] { + "OGO", + aTextPlateMotor, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'O', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_MV_FluidHeater.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 622, + "basicmachine.fluidheater.tier.02", + "Advanced Fluid Heater", + 2, + "Heating up your Fluids", + GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes, + 1, + 0, + 8000, + 0, + 1, + "FluidHeater.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "FLUID_HEATER", + new Object[] { + "OGO", + aTextPlateMotor, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'O', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_HV_FluidHeater.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 623, + "basicmachine.fluidheater.tier.03", + "Advanced Fluid Heater II", + 3, + "Heating up your Fluids", + GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes, + 1, + 0, + 8000, + 0, + 1, + "FluidHeater.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "FLUID_HEATER", + new Object[] { + "OGO", + aTextPlateMotor, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'O', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_EV_FluidHeater.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 624, + "basicmachine.fluidheater.tier.04", + "Advanced Fluid Heater III", + 4, + "Heating up your Fluids", + GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes, + 1, + 0, + 8000, + 0, + 1, + "FluidHeater.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "FLUID_HEATER", + new Object[] { + "OGO", + aTextPlateMotor, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'O', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + ItemList.Machine_IV_FluidHeater.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 625, + "basicmachine.fluidheater.tier.05", + "Advanced Fluid Heater IV", + 5, + "Heating up your Fluids", + GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes, + 1, + 0, + 8000, + 0, + 1, + "FluidHeater.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "FLUID_HEATER", + new Object[] { + "OGO", + aTextPlateMotor, + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'O', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING_DOUBLE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'G', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Slicer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 631, + "basicmachine.slicer.tier.01", + "Basic Slicing Machine", + 1, + "Slice of Life", + GT_Recipe.GT_Recipe_Map.sSlicerRecipes, + 2, + 1, + 0, + 0, + 1, + "Slicer.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "SLICER", + new Object[] { + aTextWireCoil, + "PMV", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_MV_Slicer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 632, + "basicmachine.slicer.tier.02", + "Advanced Slicing Machine", + 2, + "Slice of Life", + GT_Recipe.GT_Recipe_Map.sSlicerRecipes, + 2, + 1, + 0, + 0, + 1, + "Slicer.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "SLICER", + new Object[] { + aTextWireCoil, + "PMV", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_HV_Slicer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 633, + "basicmachine.slicer.tier.03", + "Advanced Slicing Machine II", + 3, + "Slice of Life", + GT_Recipe.GT_Recipe_Map.sSlicerRecipes, + 2, + 1, + 0, + 0, + 1, + "Slicer.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "SLICER", + new Object[] { + aTextWireCoil, + "PMV", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_EV_Slicer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 634, + "basicmachine.slicer.tier.04", + "Advanced Slicing Machine III", + 4, + "Slice of Life", + GT_Recipe.GT_Recipe_Map.sSlicerRecipes, + 2, + 1, + 0, + 0, + 1, + "Slicer.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "SLICER", + new Object[] { + aTextWireCoil, + "PMV", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_IV_Slicer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 635, + "basicmachine.slicer.tier.05", + "Advanced Slicing Machine IV", + 5, + "Slice of Life", + GT_Recipe.GT_Recipe_Map.sSlicerRecipes, + 2, + 1, + 0, + 0, + 1, + "Slicer.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "SLICER", + new Object[] { + aTextWireCoil, + "PMV", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Sifter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 641, + "basicmachine.sifter.tier.01", + "Basic Sifting Machine", + 1, + "Stay calm and keep sifting", + GT_Recipe.GT_Recipe_Map.sSifterRecipes, + 1, + 9, + 1000, + 2, + 5, + "Sifter.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "SIFTER", + new Object[] { + "WFW", + aTextPlateMotor, + "CFC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'F', + OreDictNames.craftingFilter, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_MV_Sifter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 642, + "basicmachine.sifter.tier.02", + "Advanced Sifting Machine", + 2, + "Stay calm and keep sifting", + GT_Recipe.GT_Recipe_Map.sSifterRecipes, + 1, + 9, + 2000, + 2, + 5, + "Sifter.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "SIFTER", + new Object[] { + "WFW", + aTextPlateMotor, + "CFC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'F', + OreDictNames.craftingFilter, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_HV_Sifter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 643, + "basicmachine.sifter.tier.03", + "Advanced Sifting Machine II", + 3, + "Stay calm and keep sifting", + GT_Recipe.GT_Recipe_Map.sSifterRecipes, + 1, + 9, + 4000, + 2, + 5, + "Sifter.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "SIFTER", + new Object[] { + "WFW", + aTextPlateMotor, + "CFC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'F', + OreDictNames.craftingFilter, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_EV_Sifter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 644, + "basicmachine.sifter.tier.04", + "Advanced Sifting Machine III", + 4, + "Stay calm and keep sifting", + GT_Recipe.GT_Recipe_Map.sSifterRecipes, + 1, + 9, + 8000, + 2, + 5, + "Sifter.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "SIFTER", + new Object[] { + "WFW", + aTextPlateMotor, + "CFC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'F', + OreDictNames.craftingFilter, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + ItemList.Machine_IV_Sifter.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 645, + "basicmachine.sifter.tier.05", + "Advanced Sifting Machine IV", + 5, + "Stay calm and keep sifting", + GT_Recipe.GT_Recipe_Map.sSifterRecipes, + 1, + 9, + 16000, + 2, + 5, + "Sifter.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "SIFTER", + new Object[] { + "WFW", + aTextPlateMotor, + "CFC", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, + 'F', + OreDictNames.craftingFilter, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE + }) + .getStackForm(1L)); + + ItemList.Machine_LV_ArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 651, + "basicmachine.arcfurnace.tier.01", + "Basic Arc Furnace", + 1, + "", + GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes, + 1, + 4, + 16000, + 0, + 1, + "ArcFurnace.png", + SoundResource.IC2_MACHINES_INDUCTION_LOOP, + false, + false, + SpecialEffects.NONE, + "ARC_FURNACE", + new Object[] { + "WGW", + aTextCableHull, + aTextPlate, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, + 'G', + OrePrefixes.cell.get(Materials.Graphite) + }) + .getStackForm(1L)); + ItemList.Machine_MV_ArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 652, + "basicmachine.arcfurnace.tier.02", + "Advanced Arc Furnace", + 2, + "", + GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes, + 1, + 4, + 24000, + 0, + 1, + "ArcFurnace.png", + SoundResource.IC2_MACHINES_INDUCTION_LOOP, + false, + false, + SpecialEffects.NONE, + "ARC_FURNACE", + new Object[] { + "WGW", + aTextCableHull, + aTextPlate, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, + 'G', + OrePrefixes.cell.get(Materials.Graphite) + }) + .getStackForm(1L)); + ItemList.Machine_HV_ArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 653, + "basicmachine.arcfurnace.tier.03", + "Advanced Arc Furnace II", + 3, + "", + GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes, + 1, + 4, + 32000, + 0, + 1, + "ArcFurnace.png", + SoundResource.IC2_MACHINES_INDUCTION_LOOP, + false, + false, + SpecialEffects.NONE, + "ARC_FURNACE", + new Object[] { + "WGW", + aTextCableHull, + aTextPlate, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, + 'G', + OrePrefixes.cell.get(Materials.Graphite) + }) + .getStackForm(1L)); + ItemList.Machine_EV_ArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 654, + "basicmachine.arcfurnace.tier.04", + "Advanced Arc Furnace III", + 4, + "", + GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes, + 1, + 4, + 48000, + 0, + 1, + "ArcFurnace.png", + SoundResource.IC2_MACHINES_INDUCTION_LOOP, + false, + false, + SpecialEffects.NONE, + "ARC_FURNACE", + new Object[] { + "WGW", + aTextCableHull, + aTextPlate, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, + 'G', + OrePrefixes.cell.get(Materials.Graphite) + }) + .getStackForm(1L)); + ItemList.Machine_IV_ArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 655, + "basicmachine.arcfurnace.tier.05", + "Advanced Arc Furnace IV", + 5, + "", + GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes, + 1, + 4, + 64000, + 0, + 1, + "ArcFurnace.png", + SoundResource.IC2_MACHINES_INDUCTION_LOOP, + false, + false, + SpecialEffects.NONE, + "ARC_FURNACE", + new Object[] { + "WGW", + aTextCableHull, + aTextPlate, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, + 'G', + OrePrefixes.cell.get(Materials.Graphite) + }) + .getStackForm(1L)); + + ItemList.Machine_LV_PlasmaArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 661, + "basicmachine.plasmaarcfurnace.tier.01", + "Basic Plasma Arc Furnace", + 1, + "", + GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes, + 1, + 4, + 1000, + 0, + 1, + "PlasmaArcFurnace.png", + SoundResource.IC2_MACHINES_INDUCTION_LOOP, + false, + false, + SpecialEffects.NONE, + "PLASMA_ARC_FURNACE", + new Object[] { + "WGW", + aTextCableHull, + "TPT", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, + 'T', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'G', + OrePrefixes.cell.get(Materials.Graphite) + }) + .getStackForm(1L)); + ItemList.Machine_MV_PlasmaArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 662, + "basicmachine.plasmaarcfurnace.tier.02", + "Advanced Plasma Arc Furnace", + 2, + "", + GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes, + 1, + 4, + 2000, + 0, + 1, + "PlasmaArcFurnace.png", + SoundResource.IC2_MACHINES_INDUCTION_LOOP, + false, + false, + SpecialEffects.NONE, + "PLASMA_ARC_FURNACE", + new Object[] { + "WGW", + aTextCableHull, + "TPT", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, + 'T', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'G', + OrePrefixes.cell.get(Materials.Graphite) + }) + .getStackForm(1L)); + ItemList.Machine_HV_PlasmaArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 663, + "basicmachine.plasmaarcfurnace.tier.03", + "Advanced Plasma Arc Furnace II", + 3, + "", + GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes, + 1, + 4, + 4000, + 0, + 1, + "PlasmaArcFurnace.png", + SoundResource.IC2_MACHINES_INDUCTION_LOOP, + false, + false, + SpecialEffects.NONE, + "PLASMA_ARC_FURNACE", + new Object[] { + "WGW", + aTextCableHull, + "TPT", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, + 'T', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'G', + OrePrefixes.cell.get(Materials.Graphite) + }) + .getStackForm(1L)); + ItemList.Machine_EV_PlasmaArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 664, + "basicmachine.plasmaarcfurnace.tier.04", + "Advanced Plasma Arc Furnace III", + 4, + "", + GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes, + 1, + 4, + 8000, + 0, + 1, + "PlasmaArcFurnace.png", + SoundResource.IC2_MACHINES_INDUCTION_LOOP, + false, + false, + SpecialEffects.NONE, + "PLASMA_ARC_FURNACE", + new Object[] { + "WGW", + aTextCableHull, + "TPT", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, + 'T', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'G', + OrePrefixes.cell.get(Materials.Graphite) + }) + .getStackForm(1L)); + ItemList.Machine_IV_PlasmaArcFurnace.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 665, + "basicmachine.plasmaarcfurnace.tier.05", + "Advanced Plasma Arc Furnace IV", + 5, + "", + GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes, + 1, + 4, + 16000, + 0, + 1, + "PlasmaArcFurnace.png", + SoundResource.IC2_MACHINES_INDUCTION_LOOP, + false, + false, + SpecialEffects.NONE, + "PLASMA_ARC_FURNACE", + new Object[] { + "WGW", + aTextCableHull, + "TPT", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'P', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4, + 'T', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, + 'G', + OrePrefixes.cell.get(Materials.Graphite) + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 671, + "basicmachine.e_oven.tier.01", + "Basic Electric Oven", + 1, + "Just a Furnace with a different Design", + GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, + 1, + 1, + 0, + 0, + 1, + "E_Oven.png", + SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, + false, + false, + SpecialEffects.NONE, + "ELECTRIC_OVEN", + new Object[] { + "CEC", + aTextCableHull, + "WEW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING + }) + .getStackForm(1L)); + ItemList.Machine_MV_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 672, + "basicmachine.e_oven.tier.02", + "Advanced Electric Oven", + 2, + "Just a Furnace with a different Design", + GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, + 1, + 1, + 0, + 0, + 1, + "E_Oven.png", + SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, + false, + false, + SpecialEffects.NONE, + "ELECTRIC_OVEN", + new Object[] { + "CEC", + aTextCableHull, + "WEW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING + }) + .getStackForm(1L)); + ItemList.Machine_HV_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 673, + "basicmachine.e_oven.tier.03", + "Advanced Electric Oven II", + 3, + "Just a Furnace with a different Design", + GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, + 1, + 1, + 0, + 0, + 1, + "E_Oven.png", + SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, + false, + false, + SpecialEffects.NONE, + "ELECTRIC_OVEN", + new Object[] { + "CEC", + aTextCableHull, + "WEW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING + }) + .getStackForm(1L)); + ItemList.Machine_EV_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 674, + "basicmachine.e_oven.tier.04", + "Advanced Electric Oven III", + 4, + "Just a Furnace with a different Design", + GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, + 1, + 1, + 0, + 0, + 1, + "E_Oven.png", + SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, + false, + false, + SpecialEffects.NONE, + "ELECTRIC_OVEN", + new Object[] { + "CEC", + aTextCableHull, + "WEW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING + }) + .getStackForm(1L)); + ItemList.Machine_IV_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 675, + "basicmachine.e_oven.tier.05", + "Advanced Electric Oven IV", + 5, + "Just a Furnace with a different Design", + GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, + 1, + 1, + 0, + 0, + 1, + "E_Oven.png", + SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, + false, + false, + SpecialEffects.NONE, + "ELECTRIC_OVEN", + new Object[] { + "CEC", + aTextCableHull, + "WEW", + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING + }) + .getStackForm(1L)); + + ItemList.Machine_LV_Miner.set( + new GT_MetaTileEntity_Miner(679, "basicmachine.miner.tier.01", "Basic Miner", 1).getStackForm(1L)); + ItemList.Machine_MV_Miner.set( + new GT_MetaTileEntity_Miner(680, "basicmachine.miner.tier.02", "Good Miner", 2).getStackForm(1L)); + ItemList.Machine_HV_Miner.set( + new GT_MetaTileEntity_Miner(681, "basicmachine.miner.tier.03", "Advanced Miner", 3).getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Machine_LV_Miner.get(1L), bitsd, new Object[] { + "EEE", + aTextWireHull, + "CSC", + 'M', + ItemList.Hull_LV, + 'E', + ItemList.Electric_Motor_LV, + 'C', + OrePrefixes.circuit.get(Materials.Basic), + 'W', + OrePrefixes.cableGt01.get(Materials.Tin), + 'S', + ItemList.Sensor_LV + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_MV_Miner.get(1L), bitsd, new Object[] { + "PEP", + aTextWireHull, + "CSC", + 'M', + ItemList.Hull_MV, + 'E', + ItemList.Electric_Motor_MV, + 'P', + ItemList.Electric_Piston_MV, + 'C', + OrePrefixes.circuit.get(Materials.Good), + 'W', + OrePrefixes.cableGt02.get(Materials.Copper), + 'S', + ItemList.Sensor_MV + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_HV_Miner.get(1L), bitsd, new Object[] { + "RPR", + aTextWireHull, + "CSC", + 'M', + ItemList.Hull_HV, + 'E', + ItemList.Electric_Motor_HV, + 'P', + ItemList.Electric_Piston_HV, + 'R', + ItemList.Robot_Arm_HV, + 'C', + OrePrefixes.circuit.get(Materials.Advanced), + 'W', + OrePrefixes.cableGt04.get(Materials.Gold), + 'S', + ItemList.Sensor_HV + }); } private static void run3() { - ItemList.Machine_Multi_BlastFurnace.set(new GT_MetaTileEntity_ElectricBlastFurnace(1000, "multimachine.blastfurnace", "Electric Blast Furnace").getStackForm(1L)); - ItemList.Machine_Multi_ImplosionCompressor.set(new GT_MetaTileEntity_ImplosionCompressor(1001, "multimachine.implosioncompressor", "Implosion Compressor").getStackForm(1L)); - ItemList.Machine_Multi_VacuumFreezer.set(new GT_MetaTileEntity_VacuumFreezer(1002, "multimachine.vacuumfreezer", "Vacuum Freezer").getStackForm(1L)); - ItemList.Machine_Multi_Furnace.set(new GT_MetaTileEntity_MultiFurnace(1003, "multimachine.multifurnace", "Multi Smelter").getStackForm(1L)); - ItemList.Machine_Multi_PlasmaForge.set(new GT_MetaTileEntity_PlasmaForge(1004, "multimachine.plasmaforge", "Dimensionally Transcendent Plasma Forge").getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_BlastFurnace.get(1L), bitsd, new Object[]{"FFF", aTextCableHull, aTextWireCoil, 'M', ItemList.Casing_HeatProof, 'F', OreDictNames.craftingIronFurnace, 'C', OrePrefixes.circuit.get(Materials.Basic), 'W', OrePrefixes.cableGt01.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_VacuumFreezer.get(1L), bitsd, new Object[]{aTextPlate, aTextCableHull, aTextWireCoil, 'M', ItemList.Casing_FrostProof, 'P', ItemList.Electric_Pump_HV, 'C', OrePrefixes.circuit.get(Materials.Data), 'W', OrePrefixes.cableGt01.get(Materials.Gold)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_ImplosionCompressor.get(1L), bitsd, new Object[]{"OOO", aTextCableHull, aTextWireCoil, 'M', ItemList.Casing_SolidSteel, 'O', Ic2Items.reinforcedStone, 'C', OrePrefixes.circuit.get(Materials.Advanced), 'W', OrePrefixes.cableGt01.get(Materials.Gold)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_Furnace.get(1L), bitsd, new Object[]{"FFF", aTextCableHull, aTextWireCoil, 'M', ItemList.Casing_HeatProof, 'F', OreDictNames.craftingIronFurnace, 'C', OrePrefixes.circuit.get(Materials.Advanced), 'W', OrePrefixes.cableGt01.get(Materials.AnnealedCopper)}); - - ItemList.Machine_Multi_LargeBoiler_Bronze.set(new GT_MetaTileEntity_LargeBoiler_Bronze(1020, "multimachine.boiler.bronze", "Large Bronze Boiler").getStackForm(1L)); - ItemList.Machine_Multi_LargeBoiler_Steel.set(new GT_MetaTileEntity_LargeBoiler_Steel(1021, "multimachine.boiler.steel", "Large Steel Boiler").getStackForm(1L)); - ItemList.Machine_Multi_LargeBoiler_Titanium.set(new GT_MetaTileEntity_LargeBoiler_Titanium(1022, "multimachine.boiler.titanium", "Large Titanium Boiler").getStackForm(1L)); - ItemList.Machine_Multi_LargeBoiler_TungstenSteel.set(new GT_MetaTileEntity_LargeBoiler_TungstenSteel(1023, "multimachine.boiler.tungstensteel", "Large Tungstensteel Boiler").getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_LargeBoiler_Bronze.get(1L), bitsd, new Object[]{aTextWireCoil, aTextCableHull, aTextWireCoil, 'M', ItemList.Casing_Firebox_Bronze, 'C', OrePrefixes.circuit.get(Materials.Good), 'W', OrePrefixes.cableGt01.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_LargeBoiler_Steel.get(1L), bitsd, new Object[]{aTextWireCoil, aTextCableHull, aTextWireCoil, 'M', ItemList.Casing_Firebox_Steel, 'C', OrePrefixes.circuit.get(Materials.Advanced), 'W', OrePrefixes.cableGt01.get(Materials.AnyCopper)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_LargeBoiler_Titanium.get(1L), bitsd, new Object[]{aTextWireCoil, aTextCableHull, aTextWireCoil, 'M', ItemList.Casing_Firebox_Titanium, 'C', OrePrefixes.circuit.get(Materials.Data), 'W', OrePrefixes.cableGt01.get(Materials.Gold)}); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_LargeBoiler_TungstenSteel.get(1L), bitsd, new Object[]{aTextWireCoil, aTextCableHull, aTextWireCoil, 'M', ItemList.Casing_Firebox_TungstenSteel, 'C', OrePrefixes.circuit.get(Materials.Elite), 'W', OrePrefixes.cableGt01.get(Materials.Aluminium)}); - - ItemList.Generator_Diesel_LV.set(new GT_MetaTileEntity_DieselGenerator(1110, "basicgenerator.diesel.tier.01", "Basic Combustion Generator", 1).getStackForm(1L)); - ItemList.Generator_Diesel_MV.set(new GT_MetaTileEntity_DieselGenerator(1111, "basicgenerator.diesel.tier.02", "Advanced Combustion Generator", 2).getStackForm(1L)); - ItemList.Generator_Diesel_HV.set(new GT_MetaTileEntity_DieselGenerator(1112, "basicgenerator.diesel.tier.03", "Turbo Combustion Generator", 3).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Generator_Diesel_LV.get(1L), bitsd, new Object[]{"PCP", "EME", "GWG", 'M', ItemList.Hull_LV, 'P', ItemList.Electric_Piston_LV, 'E', ItemList.Electric_Motor_LV, 'C', OrePrefixes.circuit.get(Materials.Basic), 'W', OrePrefixes.cableGt01.get(Materials.Tin), 'G', OrePrefixes.gearGt.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Generator_Diesel_MV.get(1L), bitsd, new Object[]{"PCP", "EME", "GWG", 'M', ItemList.Hull_MV, 'P', ItemList.Electric_Piston_MV, 'E', ItemList.Electric_Motor_MV, 'C', OrePrefixes.circuit.get(Materials.Good), 'W', OrePrefixes.cableGt01.get(Materials.AnyCopper), 'G', OrePrefixes.gearGt.get(Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Generator_Diesel_HV.get(1L), bitsd, new Object[]{"PCP", "EME", "GWG", 'M', ItemList.Hull_HV, 'P', ItemList.Electric_Piston_HV, 'E', ItemList.Electric_Motor_HV, 'C', OrePrefixes.circuit.get(Materials.Advanced), 'W', OrePrefixes.cableGt01.get(Materials.Gold), 'G', OrePrefixes.gearGt.get(Materials.StainlessSteel)}); - - ItemList.Generator_Gas_Turbine_LV.set(new GT_MetaTileEntity_GasTurbine(1115, "basicgenerator.gasturbine.tier.01", "Basic Gas Turbine", 1).getStackForm(1L)); - ItemList.Generator_Gas_Turbine_MV.set(new GT_MetaTileEntity_GasTurbine(1116, "basicgenerator.gasturbine.tier.02", "Advanced Gas Turbine", 2).getStackForm(1L)); - ItemList.Generator_Gas_Turbine_HV.set(new GT_MetaTileEntity_GasTurbine(1117, "basicgenerator.gasturbine.tier.03", "Turbo Gas Turbine", 3).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Generator_Gas_Turbine_LV.get(1L), bitsd, new Object[]{"CRC", "RMR", aTextMotorWire, 'M', ItemList.Hull_LV, 'E', ItemList.Electric_Motor_LV, 'R', OrePrefixes.rotor.get(Materials.Tin), 'C', OrePrefixes.circuit.get(Materials.Basic), 'W', OrePrefixes.cableGt01.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.Generator_Gas_Turbine_MV.get(1L), bitsd, new Object[]{"CRC", "RMR", aTextMotorWire, 'M', ItemList.Hull_MV, 'E', ItemList.Electric_Motor_MV, 'R', OrePrefixes.rotor.get(Materials.Bronze), 'C', OrePrefixes.circuit.get(Materials.Good), 'W', OrePrefixes.cableGt01.get(Materials.AnyCopper)}); - GT_ModHandler.addCraftingRecipe(ItemList.Generator_Gas_Turbine_HV.get(1L), bitsd, new Object[]{"CRC", "RMR", aTextMotorWire, 'M', ItemList.Hull_HV, 'E', ItemList.Electric_Motor_HV, 'R', OrePrefixes.rotor.get(Materials.Steel), 'C', OrePrefixes.circuit.get(Materials.Advanced), 'W', OrePrefixes.cableGt01.get(Materials.Gold)}); - - ItemList.Generator_Steam_Turbine_LV.set(new GT_MetaTileEntity_SteamTurbine(1120, "basicgenerator.steamturbine.tier.01", "Basic Steam Turbine", 1).getStackForm(1L)); - ItemList.Generator_Steam_Turbine_MV.set(new GT_MetaTileEntity_SteamTurbine(1121, "basicgenerator.steamturbine.tier.02", "Advanced Steam Turbine", 2).getStackForm(1L)); - ItemList.Generator_Steam_Turbine_HV.set(new GT_MetaTileEntity_SteamTurbine(1122, "basicgenerator.steamturbine.tier.03", "Turbo Steam Turbine", 3).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Generator_Steam_Turbine_LV.get(1L), bitsd, new Object[]{"PCP", "RMR", aTextMotorWire, 'M', ItemList.Hull_LV, 'E', ItemList.Electric_Motor_LV, 'R', OrePrefixes.rotor.get(Materials.Tin), 'C', OrePrefixes.circuit.get(Materials.Basic), 'W', OrePrefixes.cableGt01.get(Materials.Tin), 'P', OrePrefixes.pipeMedium.get(Materials.Bronze)}); - GT_ModHandler.addCraftingRecipe(ItemList.Generator_Steam_Turbine_MV.get(1L), bitsd, new Object[]{"PCP", "RMR", aTextMotorWire, 'M', ItemList.Hull_MV, 'E', ItemList.Electric_Motor_MV, 'R', OrePrefixes.rotor.get(Materials.Bronze), 'C', OrePrefixes.circuit.get(Materials.Good), 'W', OrePrefixes.cableGt01.get(Materials.AnyCopper), 'P', OrePrefixes.pipeMedium.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Generator_Steam_Turbine_HV.get(1L), bitsd, new Object[]{"PCP", "RMR", aTextMotorWire, 'M', ItemList.Hull_HV, 'E', ItemList.Electric_Motor_HV, 'R', OrePrefixes.rotor.get(Materials.Steel), 'C', OrePrefixes.circuit.get(Materials.Advanced), 'W', OrePrefixes.cableGt01.get(Materials.Gold), 'P', OrePrefixes.pipeMedium.get(Materials.StainlessSteel)}); - - ItemList.Generator_Naquadah_Mark_I.set(new GT_MetaTileEntity_NaquadahReactor(1190, "basicgenerator.naquadah.tier.04",new String[]{"Requires Enriched Naquadah Bolts"}, "Naquadah Reactor Mark I", 4).getStackForm(1L)); - ItemList.Generator_Naquadah_Mark_II.set(new GT_MetaTileEntity_NaquadahReactor(1191, "basicgenerator.naquadah.tier.05",new String[]{"Requires Enriched Naquadah Rods"}, "Naquadah Reactor Mark II", 5).getStackForm(1L)); - ItemList.Generator_Naquadah_Mark_III.set(new GT_MetaTileEntity_NaquadahReactor(1192, "basicgenerator.naquadah.tier.06",new String[]{"Requires Enriched Naquadah Long Rods"}, "Naquadah Reactor Mark III", 6).getStackForm(1L)); - ItemList.Generator_Naquadah_Mark_IV.set(new GT_MetaTileEntity_NaquadahReactor(1188, "basicgenerator.naquadah.tier.07",new String[]{"Requires Naquadria Bolts"}, "Naquadah Reactor Mark IV", 7).getStackForm(1L)); - ItemList.Generator_Naquadah_Mark_V.set(new GT_MetaTileEntity_NaquadahReactor(1189, "basicgenerator.naquadah.tier.08",new String[]{"Requires Naquadria Rods"}, "Naquadah Reactor Mark V", 8).getStackForm(1L)); - - ItemList.MagicEnergyConverter_LV.set(new GT_MetaTileEntity_MagicEnergyConverter(1123, "basicgenerator.magicenergyconverter.tier.01", "Novice Magic Energy Converter", 1).getStackForm(1L)); - ItemList.MagicEnergyConverter_MV.set(new GT_MetaTileEntity_MagicEnergyConverter(1124, "basicgenerator.magicenergyconverter.tier.02", "Adept Magic Energy Converter", 2).getStackForm(1L)); - ItemList.MagicEnergyConverter_HV.set(new GT_MetaTileEntity_MagicEnergyConverter(1125, "basicgenerator.magicenergyconverter.tier.03", "Master Magic Energy Converter", 3).getStackForm(1L)); - - ItemList.MagicEnergyAbsorber_LV.set(new GT_MetaTileEntity_MagicalEnergyAbsorber(1127, "basicgenerator.magicenergyabsorber.tier.01", "Novice Magic Energy Absorber", 1).getStackForm(1L)); - ItemList.MagicEnergyAbsorber_MV.set(new GT_MetaTileEntity_MagicalEnergyAbsorber(1128, "basicgenerator.magicenergyabsorber.tier.02", "Adept Magic Energy Absorber", 2).getStackForm(1L)); - ItemList.MagicEnergyAbsorber_HV.set(new GT_MetaTileEntity_MagicalEnergyAbsorber(1129, "basicgenerator.magicenergyabsorber.tier.03", "Master Magic Energy Absorber", 3).getStackForm(1L)); - ItemList.MagicEnergyAbsorber_EV.set(new GT_MetaTileEntity_MagicalEnergyAbsorber(1130, "basicgenerator.magicenergyabsorber.tier.04", "Grandmaster Magic Energy Absorber", 4).getStackForm(1L)); + ItemList.Machine_Multi_BlastFurnace.set( + new GT_MetaTileEntity_ElectricBlastFurnace(1000, "multimachine.blastfurnace", "Electric Blast Furnace") + .getStackForm(1L)); + ItemList.Machine_Multi_ImplosionCompressor.set(new GT_MetaTileEntity_ImplosionCompressor( + 1001, "multimachine.implosioncompressor", "Implosion Compressor") + .getStackForm(1L)); + ItemList.Machine_Multi_VacuumFreezer.set( + new GT_MetaTileEntity_VacuumFreezer(1002, "multimachine.vacuumfreezer", "Vacuum Freezer") + .getStackForm(1L)); + ItemList.Machine_Multi_Furnace.set( + new GT_MetaTileEntity_MultiFurnace(1003, "multimachine.multifurnace", "Multi Smelter") + .getStackForm(1L)); + ItemList.Machine_Multi_PlasmaForge.set(new GT_MetaTileEntity_PlasmaForge( + 1004, "multimachine.plasmaforge", "Dimensionally Transcendent Plasma Forge") + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_BlastFurnace.get(1L), bitsd, new Object[] { + "FFF", + aTextCableHull, + aTextWireCoil, + 'M', + ItemList.Casing_HeatProof, + 'F', + OreDictNames.craftingIronFurnace, + 'C', + OrePrefixes.circuit.get(Materials.Basic), + 'W', + OrePrefixes.cableGt01.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_VacuumFreezer.get(1L), bitsd, new Object[] { + aTextPlate, + aTextCableHull, + aTextWireCoil, + 'M', + ItemList.Casing_FrostProof, + 'P', + ItemList.Electric_Pump_HV, + 'C', + OrePrefixes.circuit.get(Materials.Data), + 'W', + OrePrefixes.cableGt01.get(Materials.Gold) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_ImplosionCompressor.get(1L), bitsd, new Object[] { + "OOO", + aTextCableHull, + aTextWireCoil, + 'M', + ItemList.Casing_SolidSteel, + 'O', + Ic2Items.reinforcedStone, + 'C', + OrePrefixes.circuit.get(Materials.Advanced), + 'W', + OrePrefixes.cableGt01.get(Materials.Gold) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_Furnace.get(1L), bitsd, new Object[] { + "FFF", + aTextCableHull, + aTextWireCoil, + 'M', + ItemList.Casing_HeatProof, + 'F', + OreDictNames.craftingIronFurnace, + 'C', + OrePrefixes.circuit.get(Materials.Advanced), + 'W', + OrePrefixes.cableGt01.get(Materials.AnnealedCopper) + }); + + ItemList.Machine_Multi_LargeBoiler_Bronze.set( + new GT_MetaTileEntity_LargeBoiler_Bronze(1020, "multimachine.boiler.bronze", "Large Bronze Boiler") + .getStackForm(1L)); + ItemList.Machine_Multi_LargeBoiler_Steel.set( + new GT_MetaTileEntity_LargeBoiler_Steel(1021, "multimachine.boiler.steel", "Large Steel Boiler") + .getStackForm(1L)); + ItemList.Machine_Multi_LargeBoiler_Titanium.set(new GT_MetaTileEntity_LargeBoiler_Titanium( + 1022, "multimachine.boiler.titanium", "Large Titanium Boiler") + .getStackForm(1L)); + ItemList.Machine_Multi_LargeBoiler_TungstenSteel.set(new GT_MetaTileEntity_LargeBoiler_TungstenSteel( + 1023, "multimachine.boiler.tungstensteel", "Large Tungstensteel Boiler") + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_LargeBoiler_Bronze.get(1L), bitsd, new Object[] { + aTextWireCoil, + aTextCableHull, + aTextWireCoil, + 'M', + ItemList.Casing_Firebox_Bronze, + 'C', + OrePrefixes.circuit.get(Materials.Good), + 'W', + OrePrefixes.cableGt01.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_LargeBoiler_Steel.get(1L), bitsd, new Object[] { + aTextWireCoil, + aTextCableHull, + aTextWireCoil, + 'M', + ItemList.Casing_Firebox_Steel, + 'C', + OrePrefixes.circuit.get(Materials.Advanced), + 'W', + OrePrefixes.cableGt01.get(Materials.AnyCopper) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_LargeBoiler_Titanium.get(1L), bitsd, new Object[] { + aTextWireCoil, + aTextCableHull, + aTextWireCoil, + 'M', + ItemList.Casing_Firebox_Titanium, + 'C', + OrePrefixes.circuit.get(Materials.Data), + 'W', + OrePrefixes.cableGt01.get(Materials.Gold) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_LargeBoiler_TungstenSteel.get(1L), bitsd, new Object[] { + aTextWireCoil, + aTextCableHull, + aTextWireCoil, + 'M', + ItemList.Casing_Firebox_TungstenSteel, + 'C', + OrePrefixes.circuit.get(Materials.Elite), + 'W', + OrePrefixes.cableGt01.get(Materials.Aluminium) + }); + + ItemList.Generator_Diesel_LV.set(new GT_MetaTileEntity_DieselGenerator( + 1110, "basicgenerator.diesel.tier.01", "Basic Combustion Generator", 1) + .getStackForm(1L)); + ItemList.Generator_Diesel_MV.set(new GT_MetaTileEntity_DieselGenerator( + 1111, "basicgenerator.diesel.tier.02", "Advanced Combustion Generator", 2) + .getStackForm(1L)); + ItemList.Generator_Diesel_HV.set(new GT_MetaTileEntity_DieselGenerator( + 1112, "basicgenerator.diesel.tier.03", "Turbo Combustion Generator", 3) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Generator_Diesel_LV.get(1L), bitsd, new Object[] { + "PCP", + "EME", + "GWG", + 'M', + ItemList.Hull_LV, + 'P', + ItemList.Electric_Piston_LV, + 'E', + ItemList.Electric_Motor_LV, + 'C', + OrePrefixes.circuit.get(Materials.Basic), + 'W', + OrePrefixes.cableGt01.get(Materials.Tin), + 'G', + OrePrefixes.gearGt.get(Materials.Steel) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Generator_Diesel_MV.get(1L), bitsd, new Object[] { + "PCP", + "EME", + "GWG", + 'M', + ItemList.Hull_MV, + 'P', + ItemList.Electric_Piston_MV, + 'E', + ItemList.Electric_Motor_MV, + 'C', + OrePrefixes.circuit.get(Materials.Good), + 'W', + OrePrefixes.cableGt01.get(Materials.AnyCopper), + 'G', + OrePrefixes.gearGt.get(Materials.Aluminium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Generator_Diesel_HV.get(1L), bitsd, new Object[] { + "PCP", + "EME", + "GWG", + 'M', + ItemList.Hull_HV, + 'P', + ItemList.Electric_Piston_HV, + 'E', + ItemList.Electric_Motor_HV, + 'C', + OrePrefixes.circuit.get(Materials.Advanced), + 'W', + OrePrefixes.cableGt01.get(Materials.Gold), + 'G', + OrePrefixes.gearGt.get(Materials.StainlessSteel) + }); + + ItemList.Generator_Gas_Turbine_LV.set( + new GT_MetaTileEntity_GasTurbine(1115, "basicgenerator.gasturbine.tier.01", "Basic Gas Turbine", 1) + .getStackForm(1L)); + ItemList.Generator_Gas_Turbine_MV.set( + new GT_MetaTileEntity_GasTurbine(1116, "basicgenerator.gasturbine.tier.02", "Advanced Gas Turbine", 2) + .getStackForm(1L)); + ItemList.Generator_Gas_Turbine_HV.set( + new GT_MetaTileEntity_GasTurbine(1117, "basicgenerator.gasturbine.tier.03", "Turbo Gas Turbine", 3) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Generator_Gas_Turbine_LV.get(1L), bitsd, new Object[] { + "CRC", + "RMR", + aTextMotorWire, + 'M', + ItemList.Hull_LV, + 'E', + ItemList.Electric_Motor_LV, + 'R', + OrePrefixes.rotor.get(Materials.Tin), + 'C', + OrePrefixes.circuit.get(Materials.Basic), + 'W', + OrePrefixes.cableGt01.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Generator_Gas_Turbine_MV.get(1L), bitsd, new Object[] { + "CRC", + "RMR", + aTextMotorWire, + 'M', + ItemList.Hull_MV, + 'E', + ItemList.Electric_Motor_MV, + 'R', + OrePrefixes.rotor.get(Materials.Bronze), + 'C', + OrePrefixes.circuit.get(Materials.Good), + 'W', + OrePrefixes.cableGt01.get(Materials.AnyCopper) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Generator_Gas_Turbine_HV.get(1L), bitsd, new Object[] { + "CRC", + "RMR", + aTextMotorWire, + 'M', + ItemList.Hull_HV, + 'E', + ItemList.Electric_Motor_HV, + 'R', + OrePrefixes.rotor.get(Materials.Steel), + 'C', + OrePrefixes.circuit.get(Materials.Advanced), + 'W', + OrePrefixes.cableGt01.get(Materials.Gold) + }); + + ItemList.Generator_Steam_Turbine_LV.set(new GT_MetaTileEntity_SteamTurbine( + 1120, "basicgenerator.steamturbine.tier.01", "Basic Steam Turbine", 1) + .getStackForm(1L)); + ItemList.Generator_Steam_Turbine_MV.set(new GT_MetaTileEntity_SteamTurbine( + 1121, "basicgenerator.steamturbine.tier.02", "Advanced Steam Turbine", 2) + .getStackForm(1L)); + ItemList.Generator_Steam_Turbine_HV.set(new GT_MetaTileEntity_SteamTurbine( + 1122, "basicgenerator.steamturbine.tier.03", "Turbo Steam Turbine", 3) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Generator_Steam_Turbine_LV.get(1L), bitsd, new Object[] { + "PCP", + "RMR", + aTextMotorWire, + 'M', + ItemList.Hull_LV, + 'E', + ItemList.Electric_Motor_LV, + 'R', + OrePrefixes.rotor.get(Materials.Tin), + 'C', + OrePrefixes.circuit.get(Materials.Basic), + 'W', + OrePrefixes.cableGt01.get(Materials.Tin), + 'P', + OrePrefixes.pipeMedium.get(Materials.Bronze) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Generator_Steam_Turbine_MV.get(1L), bitsd, new Object[] { + "PCP", + "RMR", + aTextMotorWire, + 'M', + ItemList.Hull_MV, + 'E', + ItemList.Electric_Motor_MV, + 'R', + OrePrefixes.rotor.get(Materials.Bronze), + 'C', + OrePrefixes.circuit.get(Materials.Good), + 'W', + OrePrefixes.cableGt01.get(Materials.AnyCopper), + 'P', + OrePrefixes.pipeMedium.get(Materials.Steel) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Generator_Steam_Turbine_HV.get(1L), bitsd, new Object[] { + "PCP", + "RMR", + aTextMotorWire, + 'M', + ItemList.Hull_HV, + 'E', + ItemList.Electric_Motor_HV, + 'R', + OrePrefixes.rotor.get(Materials.Steel), + 'C', + OrePrefixes.circuit.get(Materials.Advanced), + 'W', + OrePrefixes.cableGt01.get(Materials.Gold), + 'P', + OrePrefixes.pipeMedium.get(Materials.StainlessSteel) + }); + + ItemList.Generator_Naquadah_Mark_I.set(new GT_MetaTileEntity_NaquadahReactor( + 1190, + "basicgenerator.naquadah.tier.04", + new String[] {"Requires Enriched Naquadah Bolts"}, + "Naquadah Reactor Mark I", + 4) + .getStackForm(1L)); + ItemList.Generator_Naquadah_Mark_II.set(new GT_MetaTileEntity_NaquadahReactor( + 1191, + "basicgenerator.naquadah.tier.05", + new String[] {"Requires Enriched Naquadah Rods"}, + "Naquadah Reactor Mark II", + 5) + .getStackForm(1L)); + ItemList.Generator_Naquadah_Mark_III.set(new GT_MetaTileEntity_NaquadahReactor( + 1192, + "basicgenerator.naquadah.tier.06", + new String[] {"Requires Enriched Naquadah Long Rods"}, + "Naquadah Reactor Mark III", + 6) + .getStackForm(1L)); + ItemList.Generator_Naquadah_Mark_IV.set(new GT_MetaTileEntity_NaquadahReactor( + 1188, + "basicgenerator.naquadah.tier.07", + new String[] {"Requires Naquadria Bolts"}, + "Naquadah Reactor Mark IV", + 7) + .getStackForm(1L)); + ItemList.Generator_Naquadah_Mark_V.set(new GT_MetaTileEntity_NaquadahReactor( + 1189, + "basicgenerator.naquadah.tier.08", + new String[] {"Requires Naquadria Rods"}, + "Naquadah Reactor Mark V", + 8) + .getStackForm(1L)); + + ItemList.MagicEnergyConverter_LV.set(new GT_MetaTileEntity_MagicEnergyConverter( + 1123, "basicgenerator.magicenergyconverter.tier.01", "Novice Magic Energy Converter", 1) + .getStackForm(1L)); + ItemList.MagicEnergyConverter_MV.set(new GT_MetaTileEntity_MagicEnergyConverter( + 1124, "basicgenerator.magicenergyconverter.tier.02", "Adept Magic Energy Converter", 2) + .getStackForm(1L)); + ItemList.MagicEnergyConverter_HV.set(new GT_MetaTileEntity_MagicEnergyConverter( + 1125, "basicgenerator.magicenergyconverter.tier.03", "Master Magic Energy Converter", 3) + .getStackForm(1L)); + + ItemList.MagicEnergyAbsorber_LV.set(new GT_MetaTileEntity_MagicalEnergyAbsorber( + 1127, "basicgenerator.magicenergyabsorber.tier.01", "Novice Magic Energy Absorber", 1) + .getStackForm(1L)); + ItemList.MagicEnergyAbsorber_MV.set(new GT_MetaTileEntity_MagicalEnergyAbsorber( + 1128, "basicgenerator.magicenergyabsorber.tier.02", "Adept Magic Energy Absorber", 2) + .getStackForm(1L)); + ItemList.MagicEnergyAbsorber_HV.set(new GT_MetaTileEntity_MagicalEnergyAbsorber( + 1129, "basicgenerator.magicenergyabsorber.tier.03", "Master Magic Energy Absorber", 3) + .getStackForm(1L)); + ItemList.MagicEnergyAbsorber_EV.set(new GT_MetaTileEntity_MagicalEnergyAbsorber( + 1130, "basicgenerator.magicenergyabsorber.tier.04", "Grandmaster Magic Energy Absorber", 4) + .getStackForm(1L)); if (!Loader.isModLoaded("Thaumcraft")) { - GT_ModHandler.addCraftingRecipe(ItemList.MagicEnergyConverter_LV.get(1L), bitsd, new Object[]{"CTC", "FMF", "CBC", 'M', ItemList.Hull_LV, 'B', new ItemStack(Blocks.beacon), 'C', OrePrefixes.circuit.get(Materials.Advanced), 'T', ItemList.Field_Generator_LV, 'F', OrePrefixes.plate.get(Materials.Platinum)}); - GT_ModHandler.addCraftingRecipe(ItemList.MagicEnergyConverter_MV.get(1L), bitsd, new Object[]{"CTC", "FMF", "CBC", 'M', ItemList.Hull_MV, 'B', new ItemStack(Blocks.beacon), 'C', OrePrefixes.circuit.get(Materials.Data), 'T', ItemList.Field_Generator_MV, 'F', OrePrefixes.plate.get(Materials.Iridium)}); - GT_ModHandler.addCraftingRecipe(ItemList.MagicEnergyConverter_HV.get(1L), bitsd, new Object[]{"CTC", "FMF", "CBC", 'M', ItemList.Hull_HV, 'B', new ItemStack(Blocks.beacon), 'C', OrePrefixes.circuit.get(Materials.Elite), 'T', ItemList.Field_Generator_HV, 'F', OrePrefixes.plate.get(Materials.Neutronium)}); - - GT_ModHandler.addCraftingRecipe(ItemList.MagicEnergyAbsorber_LV.get(1L), bitsd, new Object[]{"CTC", "FMF", "CBC", 'M', ItemList.Hull_LV, 'B', ItemList.MagicEnergyConverter_LV.get(1L), 'C', OrePrefixes.circuit.get(Materials.Advanced), 'T', ItemList.Field_Generator_LV, 'F', OrePrefixes.plate.get(Materials.Platinum)}); - GT_ModHandler.addCraftingRecipe(ItemList.MagicEnergyAbsorber_MV.get(1L), bitsd, new Object[]{"CTC", "FMF", "CBC", 'M', ItemList.Hull_MV, 'B', ItemList.MagicEnergyConverter_MV.get(1L), 'C', OrePrefixes.circuit.get(Materials.Data), 'T', ItemList.Field_Generator_MV, 'F', OrePrefixes.plate.get(Materials.Iridium)}); - GT_ModHandler.addCraftingRecipe(ItemList.MagicEnergyAbsorber_HV.get(1L), bitsd, new Object[]{"CTC", "FMF", "CBC", 'M', ItemList.Hull_HV, 'B', ItemList.MagicEnergyConverter_MV.get(1L), 'C', OrePrefixes.circuit.get(Materials.Elite), 'T', ItemList.Field_Generator_HV, 'F', OrePrefixes.plate.get(Materials.Europium)}); - GT_ModHandler.addCraftingRecipe(ItemList.MagicEnergyAbsorber_EV.get(1L), bitsd, new Object[]{"CTC", "FMF", "CBC", 'M', ItemList.Hull_HV, 'B', ItemList.MagicEnergyConverter_HV.get(1L), 'C', OrePrefixes.circuit.get(Materials.Master), 'T', ItemList.Field_Generator_EV, 'F', OrePrefixes.plate.get(Materials.Neutronium)}); + GT_ModHandler.addCraftingRecipe(ItemList.MagicEnergyConverter_LV.get(1L), bitsd, new Object[] { + "CTC", + "FMF", + "CBC", + 'M', + ItemList.Hull_LV, + 'B', + new ItemStack(Blocks.beacon), + 'C', + OrePrefixes.circuit.get(Materials.Advanced), + 'T', + ItemList.Field_Generator_LV, + 'F', + OrePrefixes.plate.get(Materials.Platinum) + }); + GT_ModHandler.addCraftingRecipe(ItemList.MagicEnergyConverter_MV.get(1L), bitsd, new Object[] { + "CTC", + "FMF", + "CBC", + 'M', + ItemList.Hull_MV, + 'B', + new ItemStack(Blocks.beacon), + 'C', + OrePrefixes.circuit.get(Materials.Data), + 'T', + ItemList.Field_Generator_MV, + 'F', + OrePrefixes.plate.get(Materials.Iridium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.MagicEnergyConverter_HV.get(1L), bitsd, new Object[] { + "CTC", + "FMF", + "CBC", + 'M', + ItemList.Hull_HV, + 'B', + new ItemStack(Blocks.beacon), + 'C', + OrePrefixes.circuit.get(Materials.Elite), + 'T', + ItemList.Field_Generator_HV, + 'F', + OrePrefixes.plate.get(Materials.Neutronium) + }); + + GT_ModHandler.addCraftingRecipe(ItemList.MagicEnergyAbsorber_LV.get(1L), bitsd, new Object[] { + "CTC", + "FMF", + "CBC", + 'M', + ItemList.Hull_LV, + 'B', + ItemList.MagicEnergyConverter_LV.get(1L), + 'C', + OrePrefixes.circuit.get(Materials.Advanced), + 'T', + ItemList.Field_Generator_LV, + 'F', + OrePrefixes.plate.get(Materials.Platinum) + }); + GT_ModHandler.addCraftingRecipe(ItemList.MagicEnergyAbsorber_MV.get(1L), bitsd, new Object[] { + "CTC", + "FMF", + "CBC", + 'M', + ItemList.Hull_MV, + 'B', + ItemList.MagicEnergyConverter_MV.get(1L), + 'C', + OrePrefixes.circuit.get(Materials.Data), + 'T', + ItemList.Field_Generator_MV, + 'F', + OrePrefixes.plate.get(Materials.Iridium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.MagicEnergyAbsorber_HV.get(1L), bitsd, new Object[] { + "CTC", + "FMF", + "CBC", + 'M', + ItemList.Hull_HV, + 'B', + ItemList.MagicEnergyConverter_MV.get(1L), + 'C', + OrePrefixes.circuit.get(Materials.Elite), + 'T', + ItemList.Field_Generator_HV, + 'F', + OrePrefixes.plate.get(Materials.Europium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.MagicEnergyAbsorber_EV.get(1L), bitsd, new Object[] { + "CTC", + "FMF", + "CBC", + 'M', + ItemList.Hull_HV, + 'B', + ItemList.MagicEnergyConverter_HV.get(1L), + 'C', + OrePrefixes.circuit.get(Materials.Master), + 'T', + ItemList.Field_Generator_EV, + 'F', + OrePrefixes.plate.get(Materials.Neutronium) + }); } - ItemList.FusionComputer_LuV.set(new GT_MetaTileEntity_FusionComputer1(1193, "fusioncomputer.tier.06", "Fusion Control Computer Mark I").getStackForm(1L)); - ItemList.FusionComputer_ZPMV.set(new GT_MetaTileEntity_FusionComputer2(1194, "fusioncomputer.tier.07", "Fusion Control Computer Mark II").getStackForm(1L)); - ItemList.FusionComputer_UV.set(new GT_MetaTileEntity_FusionComputer3(1195, "fusioncomputer.tier.08", "Fusion Control Computer Mark III").getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Casing_Fusion_Coil.get(1L), bitsd, new Object[]{"CTC", "FMF", "CTC", 'M', ItemList.Casing_Coil_Superconductor, 'C', OrePrefixes.circuit.get(Materials.Master), 'F', ItemList.Field_Generator_MV, 'T', ItemList.Neutron_Reflector}); - - ItemList.Generator_Plasma_IV.set(new GT_MetaTileEntity_PlasmaGenerator(1196, "basicgenerator.plasmagenerator.tier.05", "Plasma Generator Mark I", 4).getStackForm(1L)); - ItemList.Generator_Plasma_LuV.set(new GT_MetaTileEntity_PlasmaGenerator(1197, "basicgenerator.plasmagenerator.tier.06", "Plasma Generator Mark II", 5).getStackForm(1L)); - ItemList.Generator_Plasma_ZPMV.set(new GT_MetaTileEntity_PlasmaGenerator(1198, "basicgenerator.plasmagenerator.tier.07", "Plasma Generator Mark III", 6).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Generator_Plasma_IV.get(1L), bitsd, new Object[]{"UCU", "FMF", aTextWireCoil, 'M', ItemList.Hull_LuV, 'F', ItemList.Field_Generator_HV, 'C', OrePrefixes.circuit.get(Materials.Elite), 'W', OrePrefixes.cableGt04.get(Materials.Tungsten), 'U', OrePrefixes.stick.get(Materials.Plutonium241)}); - GT_ModHandler.addCraftingRecipe(ItemList.Generator_Plasma_LuV.get(1L), bitsd, new Object[]{"UCU", "FMF", aTextWireCoil, 'M', ItemList.Hull_ZPM, 'F', ItemList.Field_Generator_EV, 'C', OrePrefixes.circuit.get(Materials.Master), 'W', OrePrefixes.wireGt04.get(Materials.VanadiumGallium), 'U', OrePrefixes.stick.get(Materials.Europium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Generator_Plasma_ZPMV.get(1L), bitsd, new Object[]{"UCU", "FMF", aTextWireCoil, 'M', ItemList.Hull_UV, 'F', ItemList.Field_Generator_IV, 'C', OrePrefixes.circuit.get(Materials.Ultimate), 'W', OrePrefixes.wireGt04.get(Materials.Naquadah), 'U', OrePrefixes.stick.get(Materials.Americium)}); - - ItemList.Processing_Array.set(new GT_MetaTileEntity_ProcessingArray(1199, "multimachine.processingarray", "Processing Array").getStackForm(1L)); - GT_ModHandler.addCraftingRecipe(ItemList.Processing_Array.get(1L), bitsd, new Object[]{"CTC", "FMF", "CBC", 'M', ItemList.Hull_EV, 'B', OrePrefixes.pipeLarge.get(Materials.StainlessSteel), 'C', OrePrefixes.circuit.get(Materials.Elite), 'F', ItemList.Robot_Arm_EV, 'T', ItemList.Energy_LapotronicOrb}); + ItemList.FusionComputer_LuV.set( + new GT_MetaTileEntity_FusionComputer1(1193, "fusioncomputer.tier.06", "Fusion Control Computer Mark I") + .getStackForm(1L)); + ItemList.FusionComputer_ZPMV.set( + new GT_MetaTileEntity_FusionComputer2(1194, "fusioncomputer.tier.07", "Fusion Control Computer Mark II") + .getStackForm(1L)); + ItemList.FusionComputer_UV.set(new GT_MetaTileEntity_FusionComputer3( + 1195, "fusioncomputer.tier.08", "Fusion Control Computer Mark III") + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Fusion_Coil.get(1L), bitsd, new Object[] { + "CTC", + "FMF", + "CTC", + 'M', + ItemList.Casing_Coil_Superconductor, + 'C', + OrePrefixes.circuit.get(Materials.Master), + 'F', + ItemList.Field_Generator_MV, + 'T', + ItemList.Neutron_Reflector + }); + + ItemList.Generator_Plasma_IV.set(new GT_MetaTileEntity_PlasmaGenerator( + 1196, "basicgenerator.plasmagenerator.tier.05", "Plasma Generator Mark I", 4) + .getStackForm(1L)); + ItemList.Generator_Plasma_LuV.set(new GT_MetaTileEntity_PlasmaGenerator( + 1197, "basicgenerator.plasmagenerator.tier.06", "Plasma Generator Mark II", 5) + .getStackForm(1L)); + ItemList.Generator_Plasma_ZPMV.set(new GT_MetaTileEntity_PlasmaGenerator( + 1198, "basicgenerator.plasmagenerator.tier.07", "Plasma Generator Mark III", 6) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Generator_Plasma_IV.get(1L), bitsd, new Object[] { + "UCU", + "FMF", + aTextWireCoil, + 'M', + ItemList.Hull_LuV, + 'F', + ItemList.Field_Generator_HV, + 'C', + OrePrefixes.circuit.get(Materials.Elite), + 'W', + OrePrefixes.cableGt04.get(Materials.Tungsten), + 'U', + OrePrefixes.stick.get(Materials.Plutonium241) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Generator_Plasma_LuV.get(1L), bitsd, new Object[] { + "UCU", + "FMF", + aTextWireCoil, + 'M', + ItemList.Hull_ZPM, + 'F', + ItemList.Field_Generator_EV, + 'C', + OrePrefixes.circuit.get(Materials.Master), + 'W', + OrePrefixes.wireGt04.get(Materials.VanadiumGallium), + 'U', + OrePrefixes.stick.get(Materials.Europium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Generator_Plasma_ZPMV.get(1L), bitsd, new Object[] { + "UCU", + "FMF", + aTextWireCoil, + 'M', + ItemList.Hull_UV, + 'F', + ItemList.Field_Generator_IV, + 'C', + OrePrefixes.circuit.get(Materials.Ultimate), + 'W', + OrePrefixes.wireGt04.get(Materials.Naquadah), + 'U', + OrePrefixes.stick.get(Materials.Americium) + }); + + ItemList.Processing_Array.set( + new GT_MetaTileEntity_ProcessingArray(1199, "multimachine.processingarray", "Processing Array") + .getStackForm(1L)); + GT_ModHandler.addCraftingRecipe(ItemList.Processing_Array.get(1L), bitsd, new Object[] { + "CTC", + "FMF", + "CBC", + 'M', + ItemList.Hull_EV, + 'B', + OrePrefixes.pipeLarge.get(Materials.StainlessSteel), + 'C', + OrePrefixes.circuit.get(Materials.Elite), + 'F', + ItemList.Robot_Arm_EV, + 'T', + ItemList.Energy_LapotronicOrb + }); GT_ProcessingArrayRecipeLoader.registerDefaultGregtechMaps(); - ItemList.Distillation_Tower.set(new GT_MetaTileEntity_DistillationTower(1126, "multimachine.distillationtower", "Distillation Tower").getStackForm(1L)); - GT_ModHandler.addCraftingRecipe(ItemList.Distillation_Tower.get(1L), bitsd, new Object[]{"CBC", "FMF", "CBC", 'M', ItemList.Hull_HV, 'B', OrePrefixes.pipeLarge.get(Materials.StainlessSteel), 'C', OrePrefixes.circuit.get(Materials.Data), 'F', ItemList.Electric_Pump_HV}); - - ItemList.Ore_Processor.set(new GT_MetaTileEntity_IntegratedOreFactory(1132, "multimachine.oreprocessor", "Integrated Ore Factory").getStackForm(1L)); - - ItemList.LargeSteamTurbine.set(new GT_MetaTileEntity_LargeTurbine_Steam(1131, "multimachine.largeturbine", "Large Steam Turbine").getStackForm(1L)); - ItemList.LargeGasTurbine.set(new GT_MetaTileEntity_LargeTurbine_Gas(1151, "multimachine.largegasturbine", "Large Gas Turbine").getStackForm(1L)); - ItemList.LargeHPSteamTurbine.set(new GT_MetaTileEntity_LargeTurbine_HPSteam(1152, "multimachine.largehpturbine", "Large HP Steam Turbine").getStackForm(1L)); - ItemList.LargeAdvancedGasTurbine.set(new GT_MetaTileEntity_LargeTurbine_GasAdvanced(1005, "multimachine.largeadvancedgasturbine", "Large Advanced Gas Turbine").getStackForm(1L)); - ItemList.LargePlasmaTurbine.set(new GT_MetaTileEntity_LargeTurbine_Plasma(1153, "multimachine.largeplasmaturbine", "Large Plasma Generator").getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.LargeSteamTurbine.get(1L), bitsd, new Object[]{"CPC", aTextPlateMotor, "BPB", 'M', ItemList.Hull_HV, 'B', OrePrefixes.pipeLarge.get(Materials.Steel), 'C', OrePrefixes.circuit.get(Materials.Advanced), 'P', OrePrefixes.gearGt.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(ItemList.LargeGasTurbine.get(1L), bitsd, new Object[]{"CPC", aTextPlateMotor, "BPB", 'M', ItemList.Hull_EV, 'B', OrePrefixes.pipeLarge.get(Materials.StainlessSteel), 'C', OrePrefixes.circuit.get(Materials.Data), 'P', OrePrefixes.gearGt.get(Materials.StainlessSteel)}); - GT_ModHandler.addCraftingRecipe(ItemList.LargeAdvancedGasTurbine.get(1L), bitsd, new Object[]{"CPC", aTextPlateMotor, "BPB", 'M', ItemList.Hull_IV, 'B', OrePrefixes.pipeLarge.get(Materials.TungstenSteel), 'C', OrePrefixes.circuit.get(Materials.Master), 'P', OrePrefixes.gearGt.get(Materials.HSSG)}); - - ItemList.Pump_LV.set(new GT_MetaTileEntity_Pump(1140, "basicmachine.pump.tier.01", "Basic Pump", 1).getStackForm(1L)); - ItemList.Pump_MV.set(new GT_MetaTileEntity_Pump(1141, "basicmachine.pump.tier.02", "Advanced Pump", 2).getStackForm(1L)); - ItemList.Pump_HV.set(new GT_MetaTileEntity_Pump(1142, "basicmachine.pump.tier.03", "Advanced Pump II", 3).getStackForm(1L)); - ItemList.Pump_EV.set(new GT_MetaTileEntity_Pump(1143, "basicmachine.pump.tier.04", "Advanced Pump III", 4).getStackForm(1L)); - ItemList.Pump_IV.set(new GT_MetaTileEntity_Pump(1144, "basicmachine.pump.tier.05", "Advanced Pump IV", 5).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Pump_LV.get(1L), bitsd, new Object[]{"CPC", aTextPlateMotor, "BPB", 'M', ItemList.Hull_LV, 'B', OrePrefixes.pipeLarge.get(Materials.Bronze), 'C', OrePrefixes.circuit.get(Materials.Basic), 'P', ItemList.Electric_Pump_LV}); - GT_ModHandler.addCraftingRecipe(ItemList.Pump_MV.get(1L), bitsd, new Object[]{"CPC", aTextPlateMotor, "BPB", 'M', ItemList.Hull_MV, 'B', OrePrefixes.pipeLarge.get(Materials.Steel), 'C', OrePrefixes.circuit.get(Materials.Good), 'P', ItemList.Electric_Pump_MV}); - GT_ModHandler.addCraftingRecipe(ItemList.Pump_HV.get(1L), bitsd, new Object[]{"CPC", aTextPlateMotor, "BPB", 'M', ItemList.Hull_HV, 'B', OrePrefixes.pipeLarge.get(Materials.StainlessSteel), 'C', OrePrefixes.circuit.get(Materials.Advanced), 'P', ItemList.Electric_Pump_HV}); - GT_ModHandler.addCraftingRecipe(ItemList.Pump_EV.get(1L), bitsd, new Object[]{"CPC", aTextPlateMotor, "BPB", 'M', ItemList.Hull_EV, 'B', OrePrefixes.pipeLarge.get(Materials.Titanium), 'C', OrePrefixes.circuit.get(Materials.Data), 'P', ItemList.Electric_Pump_EV}); - GT_ModHandler.addCraftingRecipe(ItemList.Pump_IV.get(1L), bitsd, new Object[]{"CPC", aTextPlateMotor, "BPB", 'M', ItemList.Hull_IV, 'B', OrePrefixes.pipeLarge.get(Materials.TungstenSteel), 'C', OrePrefixes.circuit.get(Materials.Elite), 'P', ItemList.Electric_Pump_IV}); - - ItemList.Teleporter.set(new GT_MetaTileEntity_Teleporter(1145, "basicmachine.teleporter", "Teleporter", 9).getStackForm(1L)); - - ItemList.MobRep_LV.set(new GT_MetaTileEntity_MonsterRepellent(1146, "basicmachine.mobrep.tier.01", "Basic Monster Repellator", 1).getStackForm(1L)); - ItemList.MobRep_MV.set(new GT_MetaTileEntity_MonsterRepellent(1147, "basicmachine.mobrep.tier.02", "Advanced Monster Repellator", 2).getStackForm(1L)); - ItemList.MobRep_HV.set(new GT_MetaTileEntity_MonsterRepellent(1148, "basicmachine.mobrep.tier.03", "Advanced Monster Repellator II", 3).getStackForm(1L)); - ItemList.MobRep_EV.set(new GT_MetaTileEntity_MonsterRepellent(1149, "basicmachine.mobrep.tier.04", "Advanced Monster Repellator III", 4).getStackForm(1L)); - ItemList.MobRep_IV.set(new GT_MetaTileEntity_MonsterRepellent(1150, "basicmachine.mobrep.tier.05", "Advanced Monster Repellator IV", 5).getStackForm(1L)); - ItemList.MobRep_LuV.set(new GT_MetaTileEntity_MonsterRepellent(1135, "basicmachine.mobrep.tier.06", "Advanced Monster Repellator V", 6).getStackForm(1L)); - ItemList.MobRep_ZPM.set(new GT_MetaTileEntity_MonsterRepellent(1136, "basicmachine.mobrep.tier.07", "Advanced Monster Repellator VI", 7).getStackForm(1L)); - ItemList.MobRep_UV.set(new GT_MetaTileEntity_MonsterRepellent(1137, "basicmachine.mobrep.tier.08", "Advanced Monster Repellator VII", 8).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.MobRep_LV.get(1L), bitsd, new Object[]{"EEE", " M ", "CCC", 'M', ItemList.Hull_LV, 'E', ItemList.Emitter_LV.get(1L), 'C', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.MobRep_MV.get(1L), bitsd, new Object[]{"EEE", " M ", "CCC", 'M', ItemList.Hull_MV, 'E', ItemList.Emitter_MV.get(1L), 'C', OrePrefixes.circuit.get(Materials.Good)}); - GT_ModHandler.addCraftingRecipe(ItemList.MobRep_HV.get(1L), bitsd, new Object[]{"EEE", " M ", "CCC", 'M', ItemList.Hull_HV, 'E', ItemList.Emitter_HV.get(1L), 'C', OrePrefixes.circuit.get(Materials.Advanced)}); - GT_ModHandler.addCraftingRecipe(ItemList.MobRep_EV.get(1L), bitsd, new Object[]{"EEE", " M ", "CCC", 'M', ItemList.Hull_EV, 'E', ItemList.Emitter_EV.get(1L), 'C', OrePrefixes.circuit.get(Materials.Data)}); - GT_ModHandler.addCraftingRecipe(ItemList.MobRep_IV.get(1L), bitsd, new Object[]{"EEE", " M ", "CCC", 'M', ItemList.Hull_IV, 'E', ItemList.Emitter_IV.get(1L), 'C', OrePrefixes.circuit.get(Materials.Elite)}); - GT_ModHandler.addCraftingRecipe(ItemList.MobRep_LuV.get(1L), bitsd, new Object[]{"EEE", " M ", "CCC", 'M', ItemList.Hull_LuV, 'E', ItemList.Emitter_LuV.get(1L), 'C', OrePrefixes.circuit.get(Materials.Master)}); - GT_ModHandler.addCraftingRecipe(ItemList.MobRep_ZPM.get(1L), bitsd, new Object[]{"EEE", " M ", "CCC", 'M', ItemList.Hull_ZPM, 'E', ItemList.Emitter_ZPM.get(1L), 'C', OrePrefixes.circuit.get(Materials.Ultimate)}); - GT_ModHandler.addCraftingRecipe(ItemList.MobRep_UV.get(1L), bitsd, new Object[]{"EEE", " M ", "CCC", 'M', ItemList.Hull_UV, 'E', ItemList.Emitter_UV.get(1L), 'C', OrePrefixes.circuit.get(Materials.SuperconductorUHV)}); - - ItemList.Machine_Multi_HeatExchanger.set(new GT_MetaTileEntity_HeatExchanger(1154, "multimachine.heatexchanger", "Large Heat Exchanger").getStackForm(1L)); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_HeatExchanger.get(1L), bitsd, new Object[]{aTextWireCoil, aTextCableHull, aTextWireCoil, 'M', ItemList.Casing_Pipe_Titanium, 'C', OrePrefixes.pipeMedium.get(Materials.Titanium), 'W', ItemList.Electric_Pump_EV}); - - - ItemList.Charcoal_Pile.set(new GT_MetaTileEntity_Charcoal_Pit(1155, "multimachine.charcoalpile", "Charcoal Pile Igniter").getStackForm(1)); - GT_ModHandler.addCraftingRecipe(ItemList.Charcoal_Pile.get(1L), bitsd, new Object[]{"EXE", "EME", "hCw", 'M', ItemList.Hull_HP_Bricks, 'E', OrePrefixes.plate.get(Materials.AnyBronze), 'C', new ItemStack(Items.flint_and_steel, 1), 'X', OrePrefixes.rotor.get(Materials.Steel),}); - - ItemList.Seismic_Prospector_LV.set(new GT_MetaTileEntity_SeismicProspector(1156, "basicmachine.seismicprospector.01", "Seismic Prospector LV", 1).getStackForm(1)); - ItemList.Seismic_Prospector_MV.set(new GT_MetaTileEntity_SeismicProspector(2100, "basicmachine.seismicprospector.02", "Seismic Prospector MV", 2).getStackForm(1)); - ItemList.Seismic_Prospector_HV.set(new GT_MetaTileEntity_SeismicProspector(2101, "basicmachine.seismicprospector.03", "Seismic Prospector HV", 3).getStackForm(1)); - - ItemList.Seismic_Prospector_Adv_LV.set(new GT_MetaTileEntity_AdvSeismicProspector(2102, "basicmachine.seismicprospector.07", "Advanced Seismic Prospector LV", 1, 5*16/2, 2).getStackForm(1)); - ItemList.Seismic_Prospector_Adv_MV.set(new GT_MetaTileEntity_AdvSeismicProspector(2103, "basicmachine.seismicprospector.06", "Advanced Seismic Prospector MV", 2, 7*16/2, 2).getStackForm(1)); - ItemList.Seismic_Prospector_Adv_HV.set(new GT_MetaTileEntity_AdvSeismicProspector(2104, "basicmachine.seismicprospector.05", "Advanced Seismic Prospector HV", 3, 9*16/2, 2).getStackForm(1)); - ItemList.Seismic_Prospector_Adv_EV.set(new GT_MetaTileEntity_AdvSeismicProspector(1173, "basicmachine.seismicprospector.04", "Advanced Seismic Prospector EV", 4, 11*16/2, 2).getStackForm(1)); - - //Converter recipes in case you had old one lying around - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Seismic_Prospector_Adv_LV.get(1L), bits, new Object[]{ItemList.Seismic_Prospector_LV}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Seismic_Prospector_Adv_MV.get(1L), bits, new Object[]{ItemList.Seismic_Prospector_MV}); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Seismic_Prospector_Adv_HV.get(1L), bits, new Object[]{ItemList.Seismic_Prospector_HV}); - - GT_ModHandler.addCraftingRecipe(ItemList.Seismic_Prospector_Adv_LV.get(1L), bitsd, new Object[]{"WWW", "EME", "CXC", 'M', ItemList.Hull_LV, 'W', OrePrefixes.plateDouble.get(Materials.Steel), 'E', OrePrefixes.circuit.get(Materials.Basic), 'C', ItemList.Sensor_LV, 'X', OrePrefixes.cableGt02.get(Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(ItemList.Seismic_Prospector_Adv_MV.get(1L), bitsd, new Object[]{"WWW", "EME", "CXC", 'M', ItemList.Hull_MV, 'W', OrePrefixes.plateDouble.get(Materials.BlackSteel), 'E', OrePrefixes.circuit.get(Materials.Good), 'C', ItemList.Sensor_MV, 'X', OrePrefixes.cableGt02.get(Materials.Copper)}); - GT_ModHandler.addCraftingRecipe(ItemList.Seismic_Prospector_Adv_HV.get(1L), bitsd, new Object[]{"WWW", "EME", "CXC", 'M', ItemList.Hull_HV, 'W', OrePrefixes.plateDouble.get(Materials.StainlessSteel), 'E', OrePrefixes.circuit.get(Materials.Advanced), 'C', ItemList.Sensor_HV, 'X', OrePrefixes.cableGt04.get(Materials.Gold)}); - GT_ModHandler.addCraftingRecipe(ItemList.Seismic_Prospector_Adv_EV.get(1L), bitsd, new Object[] { "WWW", "EME", "CXC", 'M', ItemList.Hull_EV, 'W', OrePrefixes.plateDouble.get(Materials.VanadiumSteel),'E', OrePrefixes.circuit.get(Materials.Data), 'C', ItemList.Sensor_EV, 'X', OrePrefixes.cableGt04.get(Materials.Aluminium) }); - - ItemList.OilDrill1.set(new GT_MetaTileEntity_OilDrill1(1157, "multimachine.oildrill1", "Oil/Gas/Fluid Drilling Rig").getStackForm(1)); - ItemList.OilDrill2.set(new GT_MetaTileEntity_OilDrill2(141, "multimachine.oildrill2", "Oil/Gas/Fluid Drilling Rig II").getStackForm(1)); - ItemList.OilDrill3.set(new GT_MetaTileEntity_OilDrill3(142, "multimachine.oildrill3", "Oil/Gas/Fluid Drilling Rig III").getStackForm(1)); - ItemList.OilDrill4.set(new GT_MetaTileEntity_OilDrill4(149, "multimachine.oildrill4", "Oil/Gas/Fluid Drilling Rig IV").getStackForm(1)); - ItemList.OilDrillInfinite.set(new GT_MetaTileEntity_OilDrillInfinite(148, "multimachine.oildrillinfinite", "Infinite Oil/Gas/Fluid Drilling Rig").getStackForm(1)); - - ItemList.ConcreteBackfiller1.set(new GT_MetaTileEntity_ConcreteBackfiller1(143, "multimachine.concretebackfiller1", "Concrete Backfiller").getStackForm(1)); - ItemList.ConcreteBackfiller2.set(new GT_MetaTileEntity_ConcreteBackfiller2(144, "multimachine.concretebackfiller3", "Advanced Concrete Backfiller").getStackForm(1)); - GT_ModHandler.addCraftingRecipe(ItemList.ConcreteBackfiller1.get(1L), bitsd, new Object[]{"WPW", "EME", "CQC", 'M', ItemList.Hull_MV, 'W', OrePrefixes.frameGt.get(Materials.Steel), 'E', OrePrefixes.circuit.get(Materials.Good), 'C', ItemList.Electric_Motor_MV, 'P', OrePrefixes.pipeLarge.get(Materials.Steel), 'Q', ItemList.Electric_Pump_MV}); - GT_ModHandler.addCraftingRecipe(ItemList.ConcreteBackfiller2.get(1L), bitsd, new Object[]{"WPW", "EME", "CQC", 'M', ItemList.ConcreteBackfiller1, 'W', OrePrefixes.frameGt.get(Materials.Titanium), 'E', OrePrefixes.circuit.get(Materials.Data), 'C', ItemList.Electric_Motor_EV, 'P', OrePrefixes.pipeLarge.get(Materials.Steel), 'Q', ItemList.Electric_Pump_EV}); - - ItemList.OreDrill1.set(new GT_MetaTileEntity_OreDrillingPlant1(1158, "multimachine.oredrill1", "Ore Drilling Plant").getStackForm(1)); - ItemList.OreDrill2.set(new GT_MetaTileEntity_OreDrillingPlant2(1177, "multimachine.oredrill2", "Ore Drilling Plant II").getStackForm(1)); - ItemList.OreDrill3.set(new GT_MetaTileEntity_OreDrillingPlant3(1178, "multimachine.oredrill3", "Ore Drilling Plant III").getStackForm(1)); - ItemList.OreDrill4.set(new GT_MetaTileEntity_OreDrillingPlant4(1179, "multimachine.oredrill4", "Ore Drilling Plant IV").getStackForm(1)); - - ItemList.PyrolyseOven.set(new GT_MetaTileEntity_PyrolyseOven(1159, "multimachine.pyro", "Pyrolyse Oven").getStackForm(1)); - GT_ModHandler.addCraftingRecipe(ItemList.PyrolyseOven.get(1L), bitsd, new Object[]{"WEP", "EME", "WCP", 'M', ItemList.Hull_MV, 'W', ItemList.Electric_Piston_MV, 'P', OrePrefixes.wireGt04.get(Materials.Cupronickel), 'E', OrePrefixes.circuit.get(Materials.Good), 'C', ItemList.Electric_Pump_MV}); - - ItemList.OilCracker.set(new GT_MetaTileEntity_OilCracker(1160, "multimachine.cracker", "Oil Cracking Unit").getStackForm(1)); - GT_ModHandler.addCraftingRecipe(ItemList.OilCracker.get(1L), bitsd, new Object[]{aTextWireCoil, "EME", aTextWireCoil, 'M', ItemList.Hull_HV, 'W', ItemList.Casing_Coil_Cupronickel, 'E', OrePrefixes.circuit.get(Materials.Advanced), 'C', ItemList.Electric_Pump_HV}); - - ItemList.MicroTransmitter_HV.set(new GT_MetaTileEntity_MicrowaveEnergyTransmitter(1161, "basicmachine.microtransmitter.03", "HV Microwave Energy Transmitter", 3).getStackForm(1L)); - ItemList.MicroTransmitter_EV.set(new GT_MetaTileEntity_MicrowaveEnergyTransmitter(1162, "basicmachine.microtransmitter.04", "EV Microwave Energy Transmitter", 4).getStackForm(1L)); - ItemList.MicroTransmitter_IV.set(new GT_MetaTileEntity_MicrowaveEnergyTransmitter(1163, "basicmachine.microtransmitter.05", "IV Microwave Energy Transmitter", 5).getStackForm(1L)); - ItemList.MicroTransmitter_LUV.set(new GT_MetaTileEntity_MicrowaveEnergyTransmitter(1164, "basicmachine.microtransmitter.06", "LuV Microwave Energy Transmitter", 6).getStackForm(1L)); - ItemList.MicroTransmitter_ZPM.set(new GT_MetaTileEntity_MicrowaveEnergyTransmitter(1165, "basicmachine.microtransmitter.07", "ZPM Microwave Energy Transmitter", 7).getStackForm(1L)); - ItemList.MicroTransmitter_UV.set(new GT_MetaTileEntity_MicrowaveEnergyTransmitter(1166, "basicmachine.microtransmitter.08", "UV Microwave Energy Transmitter", 8).getStackForm(1L)); - GT_ModHandler.addCraftingRecipe(ItemList.MicroTransmitter_HV.get(1L), bitsd, new Object[]{"CPC", aTextCableHull, "GBG", 'M', ItemList.Hull_HV, 'B', ItemList.Battery_RE_HV_Lithium, 'C', ItemList.Emitter_HV, 'G', OrePrefixes.circuit.get(Materials.Advanced), 'P', ItemList.Field_Generator_HV}); - GT_ModHandler.addCraftingRecipe(ItemList.MicroTransmitter_EV.get(1L), bitsd, new Object[]{"CPC", aTextCableHull, "GBG", 'M', ItemList.Hull_EV, 'B', GT_ModHandler.getIC2Item("lapotronCrystal", 1L, GT_Values.W), 'C', ItemList.Emitter_EV, 'G', OrePrefixes.circuit.get(Materials.Data), 'P', ItemList.Field_Generator_EV}); - GT_ModHandler.addCraftingRecipe(ItemList.MicroTransmitter_IV.get(1L), bitsd, new Object[]{"CPC", aTextCableHull, "GBG", 'M', ItemList.Hull_IV, 'B', ItemList.Energy_LapotronicOrb, 'C', ItemList.Emitter_IV, 'G', OrePrefixes.circuit.get(Materials.Elite), 'P', ItemList.Field_Generator_IV}); - GT_ModHandler.addCraftingRecipe(ItemList.MicroTransmitter_LUV.get(1L), bitsd, new Object[]{"CPC", aTextCableHull, "GBG", 'M', ItemList.Hull_LuV, 'B', ItemList.Energy_LapotronicOrb2, 'C', ItemList.Emitter_LuV, 'G', OrePrefixes.circuit.get(Materials.Master), 'P', ItemList.Field_Generator_LuV}); - GT_ModHandler.addCraftingRecipe(ItemList.MicroTransmitter_ZPM.get(1L), bitsd, new Object[]{"CPC", aTextCableHull, "GBG", 'M', ItemList.Hull_ZPM, 'B', GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "EnableZPMandUVBatteries", false) ? ItemList.Energy_Module : ItemList.ZPM2, 'C', ItemList.Emitter_ZPM, 'G', OrePrefixes.circuit.get(Materials.Ultimate), 'P', ItemList.Field_Generator_ZPM}); - GT_ModHandler.addCraftingRecipe(ItemList.MicroTransmitter_UV.get(1L), bitsd, new Object[]{"CPC", aTextCableHull, "GBG", 'M', ItemList.Hull_UV, 'B', GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "EnableZPMandUVBatteries", false) ? ItemList.Energy_Module : ItemList.ZPM3, 'C', ItemList.Emitter_UV, 'G', OrePrefixes.circuit.get(Materials.SuperconductorUHV), 'P', ItemList.Field_Generator_UV}); - - ItemList.Machine_Multi_Assemblyline.set(new GT_MetaTileEntity_AssemblyLine(1170, "multimachine.assemblyline", "Assembling Line").getStackForm(1L)); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_Assemblyline.get(1L), bitsd, new Object[]{aTextWireCoil, "EME", aTextWireCoil, 'M', ItemList.Hull_IV, 'W', ItemList.Casing_Assembler, 'E', OrePrefixes.circuit.get(Materials.Elite), 'C', ItemList.Robot_Arm_IV}); - - ItemList.Machine_Multi_DieselEngine.set(new GT_MetaTileEntity_DieselEngine(1171, "multimachine.dieselengine", "Combustion Engine").getStackForm(1L)); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_DieselEngine.get(1L), bitsd, new Object[]{"PCP", "EME", "GWG", 'M', ItemList.Hull_EV, 'P', ItemList.Electric_Piston_EV, 'E', ItemList.Electric_Motor_EV, 'C', OrePrefixes.circuit.get(Materials.Elite), 'W', OrePrefixes.cableGt01.get(Materials.TungstenSteel), 'G', OrePrefixes.gearGt.get(Materials.Titanium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_EngineIntake.get(4L), bitsd, new Object[]{"PhP", "RFR", aTextPlateWrench, 'R', OrePrefixes.pipeMedium.get(Materials.Titanium), 'F', ItemList.Casing_StableTitanium, 'P', OrePrefixes.rotor.get(Materials.Titanium)}); - - ItemList.Machine_Multi_ExtremeDieselEngine.set(new GT_MetaTileEntity_ExtremeDieselEngine(2105, "multimachine.extremedieselengine", "Extreme Combustion Engine").getStackForm(1L)); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_ExtremeDieselEngine.get(1L), bitsd, new Object[]{"PCP", "EME", "GWG", 'M', ItemList.Hull_IV, 'P', ItemList.Electric_Piston_IV, 'E', ItemList.Electric_Motor_IV, 'C', OrePrefixes.circuit.get(Materials.Master), 'W', OrePrefixes.cableGt01.get(Materials.HSSG), 'G', OrePrefixes.gearGt.get(Materials.TungstenSteel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_ExtremeEngineIntake.get(4L), bitsd, new Object[]{"PhP", "RFR", aTextPlateWrench, 'R', OrePrefixes.pipeMedium.get(Materials.TungstenSteel), 'F', ItemList.Casing_RobustTungstenSteel, 'P', OrePrefixes.rotor.get(Materials.TungstenSteel)}); - - ItemList.Machine_Multi_Cleanroom.set(new GT_MetaTileEntity_Cleanroom(1172, "multimachine.cleanroom", "Cleanroom Controller").getStackForm(1)); - //If Cleanroom is enabled, add a recipe, else hide from NEI. - if (GT_Mod.gregtechproxy.mEnableCleanroom){ - GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_Cleanroom.get(1L), bitsd, new Object[]{"FFF", "RHR", "MCM", 'H', ItemList.Hull_HV, 'F', ItemList.Component_Filter, 'R', OrePrefixes.rotor.get(Materials.StainlessSteel), 'M', ItemList.Electric_Motor_HV, 'C', OrePrefixes.circuit.get(Materials.Advanced)}); - } - else { - if (isNEILoaded){ + ItemList.Distillation_Tower.set( + new GT_MetaTileEntity_DistillationTower(1126, "multimachine.distillationtower", "Distillation Tower") + .getStackForm(1L)); + GT_ModHandler.addCraftingRecipe(ItemList.Distillation_Tower.get(1L), bitsd, new Object[] { + "CBC", + "FMF", + "CBC", + 'M', + ItemList.Hull_HV, + 'B', + OrePrefixes.pipeLarge.get(Materials.StainlessSteel), + 'C', + OrePrefixes.circuit.get(Materials.Data), + 'F', + ItemList.Electric_Pump_HV + }); + + ItemList.Ore_Processor.set( + new GT_MetaTileEntity_IntegratedOreFactory(1132, "multimachine.oreprocessor", "Integrated Ore Factory") + .getStackForm(1L)); + + ItemList.LargeSteamTurbine.set( + new GT_MetaTileEntity_LargeTurbine_Steam(1131, "multimachine.largeturbine", "Large Steam Turbine") + .getStackForm(1L)); + ItemList.LargeGasTurbine.set( + new GT_MetaTileEntity_LargeTurbine_Gas(1151, "multimachine.largegasturbine", "Large Gas Turbine") + .getStackForm(1L)); + ItemList.LargeHPSteamTurbine.set(new GT_MetaTileEntity_LargeTurbine_HPSteam( + 1152, "multimachine.largehpturbine", "Large HP Steam Turbine") + .getStackForm(1L)); + ItemList.LargeAdvancedGasTurbine.set(new GT_MetaTileEntity_LargeTurbine_GasAdvanced( + 1005, "multimachine.largeadvancedgasturbine", "Large Advanced Gas Turbine") + .getStackForm(1L)); + ItemList.LargePlasmaTurbine.set(new GT_MetaTileEntity_LargeTurbine_Plasma( + 1153, "multimachine.largeplasmaturbine", "Large Plasma Generator") + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.LargeSteamTurbine.get(1L), bitsd, new Object[] { + "CPC", + aTextPlateMotor, + "BPB", + 'M', + ItemList.Hull_HV, + 'B', + OrePrefixes.pipeLarge.get(Materials.Steel), + 'C', + OrePrefixes.circuit.get(Materials.Advanced), + 'P', + OrePrefixes.gearGt.get(Materials.Steel) + }); + GT_ModHandler.addCraftingRecipe(ItemList.LargeGasTurbine.get(1L), bitsd, new Object[] { + "CPC", + aTextPlateMotor, + "BPB", + 'M', + ItemList.Hull_EV, + 'B', + OrePrefixes.pipeLarge.get(Materials.StainlessSteel), + 'C', + OrePrefixes.circuit.get(Materials.Data), + 'P', + OrePrefixes.gearGt.get(Materials.StainlessSteel) + }); + GT_ModHandler.addCraftingRecipe(ItemList.LargeAdvancedGasTurbine.get(1L), bitsd, new Object[] { + "CPC", + aTextPlateMotor, + "BPB", + 'M', + ItemList.Hull_IV, + 'B', + OrePrefixes.pipeLarge.get(Materials.TungstenSteel), + 'C', + OrePrefixes.circuit.get(Materials.Master), + 'P', + OrePrefixes.gearGt.get(Materials.HSSG) + }); + + ItemList.Pump_LV.set( + new GT_MetaTileEntity_Pump(1140, "basicmachine.pump.tier.01", "Basic Pump", 1).getStackForm(1L)); + ItemList.Pump_MV.set( + new GT_MetaTileEntity_Pump(1141, "basicmachine.pump.tier.02", "Advanced Pump", 2).getStackForm(1L)); + ItemList.Pump_HV.set( + new GT_MetaTileEntity_Pump(1142, "basicmachine.pump.tier.03", "Advanced Pump II", 3).getStackForm(1L)); + ItemList.Pump_EV.set( + new GT_MetaTileEntity_Pump(1143, "basicmachine.pump.tier.04", "Advanced Pump III", 4).getStackForm(1L)); + ItemList.Pump_IV.set( + new GT_MetaTileEntity_Pump(1144, "basicmachine.pump.tier.05", "Advanced Pump IV", 5).getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Pump_LV.get(1L), bitsd, new Object[] { + "CPC", + aTextPlateMotor, + "BPB", + 'M', + ItemList.Hull_LV, + 'B', + OrePrefixes.pipeLarge.get(Materials.Bronze), + 'C', + OrePrefixes.circuit.get(Materials.Basic), + 'P', + ItemList.Electric_Pump_LV + }); + GT_ModHandler.addCraftingRecipe(ItemList.Pump_MV.get(1L), bitsd, new Object[] { + "CPC", + aTextPlateMotor, + "BPB", + 'M', + ItemList.Hull_MV, + 'B', + OrePrefixes.pipeLarge.get(Materials.Steel), + 'C', + OrePrefixes.circuit.get(Materials.Good), + 'P', + ItemList.Electric_Pump_MV + }); + GT_ModHandler.addCraftingRecipe(ItemList.Pump_HV.get(1L), bitsd, new Object[] { + "CPC", + aTextPlateMotor, + "BPB", + 'M', + ItemList.Hull_HV, + 'B', + OrePrefixes.pipeLarge.get(Materials.StainlessSteel), + 'C', + OrePrefixes.circuit.get(Materials.Advanced), + 'P', + ItemList.Electric_Pump_HV + }); + GT_ModHandler.addCraftingRecipe(ItemList.Pump_EV.get(1L), bitsd, new Object[] { + "CPC", + aTextPlateMotor, + "BPB", + 'M', + ItemList.Hull_EV, + 'B', + OrePrefixes.pipeLarge.get(Materials.Titanium), + 'C', + OrePrefixes.circuit.get(Materials.Data), + 'P', + ItemList.Electric_Pump_EV + }); + GT_ModHandler.addCraftingRecipe(ItemList.Pump_IV.get(1L), bitsd, new Object[] { + "CPC", + aTextPlateMotor, + "BPB", + 'M', + ItemList.Hull_IV, + 'B', + OrePrefixes.pipeLarge.get(Materials.TungstenSteel), + 'C', + OrePrefixes.circuit.get(Materials.Elite), + 'P', + ItemList.Electric_Pump_IV + }); + + ItemList.Teleporter.set( + new GT_MetaTileEntity_Teleporter(1145, "basicmachine.teleporter", "Teleporter", 9).getStackForm(1L)); + + ItemList.MobRep_LV.set(new GT_MetaTileEntity_MonsterRepellent( + 1146, "basicmachine.mobrep.tier.01", "Basic Monster Repellator", 1) + .getStackForm(1L)); + ItemList.MobRep_MV.set(new GT_MetaTileEntity_MonsterRepellent( + 1147, "basicmachine.mobrep.tier.02", "Advanced Monster Repellator", 2) + .getStackForm(1L)); + ItemList.MobRep_HV.set(new GT_MetaTileEntity_MonsterRepellent( + 1148, "basicmachine.mobrep.tier.03", "Advanced Monster Repellator II", 3) + .getStackForm(1L)); + ItemList.MobRep_EV.set(new GT_MetaTileEntity_MonsterRepellent( + 1149, "basicmachine.mobrep.tier.04", "Advanced Monster Repellator III", 4) + .getStackForm(1L)); + ItemList.MobRep_IV.set(new GT_MetaTileEntity_MonsterRepellent( + 1150, "basicmachine.mobrep.tier.05", "Advanced Monster Repellator IV", 5) + .getStackForm(1L)); + ItemList.MobRep_LuV.set(new GT_MetaTileEntity_MonsterRepellent( + 1135, "basicmachine.mobrep.tier.06", "Advanced Monster Repellator V", 6) + .getStackForm(1L)); + ItemList.MobRep_ZPM.set(new GT_MetaTileEntity_MonsterRepellent( + 1136, "basicmachine.mobrep.tier.07", "Advanced Monster Repellator VI", 7) + .getStackForm(1L)); + ItemList.MobRep_UV.set(new GT_MetaTileEntity_MonsterRepellent( + 1137, "basicmachine.mobrep.tier.08", "Advanced Monster Repellator VII", 8) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.MobRep_LV.get(1L), bitsd, new Object[] { + "EEE", + " M ", + "CCC", + 'M', + ItemList.Hull_LV, + 'E', + ItemList.Emitter_LV.get(1L), + 'C', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.MobRep_MV.get(1L), bitsd, new Object[] { + "EEE", + " M ", + "CCC", + 'M', + ItemList.Hull_MV, + 'E', + ItemList.Emitter_MV.get(1L), + 'C', + OrePrefixes.circuit.get(Materials.Good) + }); + GT_ModHandler.addCraftingRecipe(ItemList.MobRep_HV.get(1L), bitsd, new Object[] { + "EEE", + " M ", + "CCC", + 'M', + ItemList.Hull_HV, + 'E', + ItemList.Emitter_HV.get(1L), + 'C', + OrePrefixes.circuit.get(Materials.Advanced) + }); + GT_ModHandler.addCraftingRecipe(ItemList.MobRep_EV.get(1L), bitsd, new Object[] { + "EEE", + " M ", + "CCC", + 'M', + ItemList.Hull_EV, + 'E', + ItemList.Emitter_EV.get(1L), + 'C', + OrePrefixes.circuit.get(Materials.Data) + }); + GT_ModHandler.addCraftingRecipe(ItemList.MobRep_IV.get(1L), bitsd, new Object[] { + "EEE", + " M ", + "CCC", + 'M', + ItemList.Hull_IV, + 'E', + ItemList.Emitter_IV.get(1L), + 'C', + OrePrefixes.circuit.get(Materials.Elite) + }); + GT_ModHandler.addCraftingRecipe(ItemList.MobRep_LuV.get(1L), bitsd, new Object[] { + "EEE", + " M ", + "CCC", + 'M', + ItemList.Hull_LuV, + 'E', + ItemList.Emitter_LuV.get(1L), + 'C', + OrePrefixes.circuit.get(Materials.Master) + }); + GT_ModHandler.addCraftingRecipe(ItemList.MobRep_ZPM.get(1L), bitsd, new Object[] { + "EEE", + " M ", + "CCC", + 'M', + ItemList.Hull_ZPM, + 'E', + ItemList.Emitter_ZPM.get(1L), + 'C', + OrePrefixes.circuit.get(Materials.Ultimate) + }); + GT_ModHandler.addCraftingRecipe(ItemList.MobRep_UV.get(1L), bitsd, new Object[] { + "EEE", + " M ", + "CCC", + 'M', + ItemList.Hull_UV, + 'E', + ItemList.Emitter_UV.get(1L), + 'C', + OrePrefixes.circuit.get(Materials.SuperconductorUHV) + }); + + ItemList.Machine_Multi_HeatExchanger.set( + new GT_MetaTileEntity_HeatExchanger(1154, "multimachine.heatexchanger", "Large Heat Exchanger") + .getStackForm(1L)); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_HeatExchanger.get(1L), bitsd, new Object[] { + aTextWireCoil, + aTextCableHull, + aTextWireCoil, + 'M', + ItemList.Casing_Pipe_Titanium, + 'C', + OrePrefixes.pipeMedium.get(Materials.Titanium), + 'W', + ItemList.Electric_Pump_EV + }); + + ItemList.Charcoal_Pile.set( + new GT_MetaTileEntity_Charcoal_Pit(1155, "multimachine.charcoalpile", "Charcoal Pile Igniter") + .getStackForm(1)); + GT_ModHandler.addCraftingRecipe(ItemList.Charcoal_Pile.get(1L), bitsd, new Object[] { + "EXE", + "EME", + "hCw", + 'M', + ItemList.Hull_HP_Bricks, + 'E', + OrePrefixes.plate.get(Materials.AnyBronze), + 'C', + new ItemStack(Items.flint_and_steel, 1), + 'X', + OrePrefixes.rotor.get(Materials.Steel), + }); + + ItemList.Seismic_Prospector_LV.set(new GT_MetaTileEntity_SeismicProspector( + 1156, "basicmachine.seismicprospector.01", "Seismic Prospector LV", 1) + .getStackForm(1)); + ItemList.Seismic_Prospector_MV.set(new GT_MetaTileEntity_SeismicProspector( + 2100, "basicmachine.seismicprospector.02", "Seismic Prospector MV", 2) + .getStackForm(1)); + ItemList.Seismic_Prospector_HV.set(new GT_MetaTileEntity_SeismicProspector( + 2101, "basicmachine.seismicprospector.03", "Seismic Prospector HV", 3) + .getStackForm(1)); + + ItemList.Seismic_Prospector_Adv_LV.set(new GT_MetaTileEntity_AdvSeismicProspector( + 2102, "basicmachine.seismicprospector.07", "Advanced Seismic Prospector LV", 1, 5 * 16 / 2, 2) + .getStackForm(1)); + ItemList.Seismic_Prospector_Adv_MV.set(new GT_MetaTileEntity_AdvSeismicProspector( + 2103, "basicmachine.seismicprospector.06", "Advanced Seismic Prospector MV", 2, 7 * 16 / 2, 2) + .getStackForm(1)); + ItemList.Seismic_Prospector_Adv_HV.set(new GT_MetaTileEntity_AdvSeismicProspector( + 2104, "basicmachine.seismicprospector.05", "Advanced Seismic Prospector HV", 3, 9 * 16 / 2, 2) + .getStackForm(1)); + ItemList.Seismic_Prospector_Adv_EV.set(new GT_MetaTileEntity_AdvSeismicProspector( + 1173, "basicmachine.seismicprospector.04", "Advanced Seismic Prospector EV", 4, 11 * 16 / 2, 2) + .getStackForm(1)); + + // Converter recipes in case you had old one lying around + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Seismic_Prospector_Adv_LV.get(1L), bits, new Object[] {ItemList.Seismic_Prospector_LV}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Seismic_Prospector_Adv_MV.get(1L), bits, new Object[] {ItemList.Seismic_Prospector_MV}); + GT_ModHandler.addShapelessCraftingRecipe( + ItemList.Seismic_Prospector_Adv_HV.get(1L), bits, new Object[] {ItemList.Seismic_Prospector_HV}); + + GT_ModHandler.addCraftingRecipe(ItemList.Seismic_Prospector_Adv_LV.get(1L), bitsd, new Object[] { + "WWW", + "EME", + "CXC", + 'M', + ItemList.Hull_LV, + 'W', + OrePrefixes.plateDouble.get(Materials.Steel), + 'E', + OrePrefixes.circuit.get(Materials.Basic), + 'C', + ItemList.Sensor_LV, + 'X', + OrePrefixes.cableGt02.get(Materials.Tin) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Seismic_Prospector_Adv_MV.get(1L), bitsd, new Object[] { + "WWW", + "EME", + "CXC", + 'M', + ItemList.Hull_MV, + 'W', + OrePrefixes.plateDouble.get(Materials.BlackSteel), + 'E', + OrePrefixes.circuit.get(Materials.Good), + 'C', + ItemList.Sensor_MV, + 'X', + OrePrefixes.cableGt02.get(Materials.Copper) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Seismic_Prospector_Adv_HV.get(1L), bitsd, new Object[] { + "WWW", + "EME", + "CXC", + 'M', + ItemList.Hull_HV, + 'W', + OrePrefixes.plateDouble.get(Materials.StainlessSteel), + 'E', + OrePrefixes.circuit.get(Materials.Advanced), + 'C', + ItemList.Sensor_HV, + 'X', + OrePrefixes.cableGt04.get(Materials.Gold) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Seismic_Prospector_Adv_EV.get(1L), bitsd, new Object[] { + "WWW", + "EME", + "CXC", + 'M', + ItemList.Hull_EV, + 'W', + OrePrefixes.plateDouble.get(Materials.VanadiumSteel), + 'E', + OrePrefixes.circuit.get(Materials.Data), + 'C', + ItemList.Sensor_EV, + 'X', + OrePrefixes.cableGt04.get(Materials.Aluminium) + }); + + ItemList.OilDrill1.set( + new GT_MetaTileEntity_OilDrill1(1157, "multimachine.oildrill1", "Oil/Gas/Fluid Drilling Rig") + .getStackForm(1)); + ItemList.OilDrill2.set( + new GT_MetaTileEntity_OilDrill2(141, "multimachine.oildrill2", "Oil/Gas/Fluid Drilling Rig II") + .getStackForm(1)); + ItemList.OilDrill3.set( + new GT_MetaTileEntity_OilDrill3(142, "multimachine.oildrill3", "Oil/Gas/Fluid Drilling Rig III") + .getStackForm(1)); + ItemList.OilDrill4.set( + new GT_MetaTileEntity_OilDrill4(149, "multimachine.oildrill4", "Oil/Gas/Fluid Drilling Rig IV") + .getStackForm(1)); + ItemList.OilDrillInfinite.set(new GT_MetaTileEntity_OilDrillInfinite( + 148, "multimachine.oildrillinfinite", "Infinite Oil/Gas/Fluid Drilling Rig") + .getStackForm(1)); + + ItemList.ConcreteBackfiller1.set(new GT_MetaTileEntity_ConcreteBackfiller1( + 143, "multimachine.concretebackfiller1", "Concrete Backfiller") + .getStackForm(1)); + ItemList.ConcreteBackfiller2.set(new GT_MetaTileEntity_ConcreteBackfiller2( + 144, "multimachine.concretebackfiller3", "Advanced Concrete Backfiller") + .getStackForm(1)); + GT_ModHandler.addCraftingRecipe(ItemList.ConcreteBackfiller1.get(1L), bitsd, new Object[] { + "WPW", + "EME", + "CQC", + 'M', + ItemList.Hull_MV, + 'W', + OrePrefixes.frameGt.get(Materials.Steel), + 'E', + OrePrefixes.circuit.get(Materials.Good), + 'C', + ItemList.Electric_Motor_MV, + 'P', + OrePrefixes.pipeLarge.get(Materials.Steel), + 'Q', + ItemList.Electric_Pump_MV + }); + GT_ModHandler.addCraftingRecipe(ItemList.ConcreteBackfiller2.get(1L), bitsd, new Object[] { + "WPW", + "EME", + "CQC", + 'M', + ItemList.ConcreteBackfiller1, + 'W', + OrePrefixes.frameGt.get(Materials.Titanium), + 'E', + OrePrefixes.circuit.get(Materials.Data), + 'C', + ItemList.Electric_Motor_EV, + 'P', + OrePrefixes.pipeLarge.get(Materials.Steel), + 'Q', + ItemList.Electric_Pump_EV + }); + + ItemList.OreDrill1.set( + new GT_MetaTileEntity_OreDrillingPlant1(1158, "multimachine.oredrill1", "Ore Drilling Plant") + .getStackForm(1)); + ItemList.OreDrill2.set( + new GT_MetaTileEntity_OreDrillingPlant2(1177, "multimachine.oredrill2", "Ore Drilling Plant II") + .getStackForm(1)); + ItemList.OreDrill3.set( + new GT_MetaTileEntity_OreDrillingPlant3(1178, "multimachine.oredrill3", "Ore Drilling Plant III") + .getStackForm(1)); + ItemList.OreDrill4.set( + new GT_MetaTileEntity_OreDrillingPlant4(1179, "multimachine.oredrill4", "Ore Drilling Plant IV") + .getStackForm(1)); + + ItemList.PyrolyseOven.set( + new GT_MetaTileEntity_PyrolyseOven(1159, "multimachine.pyro", "Pyrolyse Oven").getStackForm(1)); + GT_ModHandler.addCraftingRecipe(ItemList.PyrolyseOven.get(1L), bitsd, new Object[] { + "WEP", + "EME", + "WCP", + 'M', + ItemList.Hull_MV, + 'W', + ItemList.Electric_Piston_MV, + 'P', + OrePrefixes.wireGt04.get(Materials.Cupronickel), + 'E', + OrePrefixes.circuit.get(Materials.Good), + 'C', + ItemList.Electric_Pump_MV + }); + + ItemList.OilCracker.set( + new GT_MetaTileEntity_OilCracker(1160, "multimachine.cracker", "Oil Cracking Unit").getStackForm(1)); + GT_ModHandler.addCraftingRecipe(ItemList.OilCracker.get(1L), bitsd, new Object[] { + aTextWireCoil, + "EME", + aTextWireCoil, + 'M', + ItemList.Hull_HV, + 'W', + ItemList.Casing_Coil_Cupronickel, + 'E', + OrePrefixes.circuit.get(Materials.Advanced), + 'C', + ItemList.Electric_Pump_HV + }); + + ItemList.MicroTransmitter_HV.set(new GT_MetaTileEntity_MicrowaveEnergyTransmitter( + 1161, "basicmachine.microtransmitter.03", "HV Microwave Energy Transmitter", 3) + .getStackForm(1L)); + ItemList.MicroTransmitter_EV.set(new GT_MetaTileEntity_MicrowaveEnergyTransmitter( + 1162, "basicmachine.microtransmitter.04", "EV Microwave Energy Transmitter", 4) + .getStackForm(1L)); + ItemList.MicroTransmitter_IV.set(new GT_MetaTileEntity_MicrowaveEnergyTransmitter( + 1163, "basicmachine.microtransmitter.05", "IV Microwave Energy Transmitter", 5) + .getStackForm(1L)); + ItemList.MicroTransmitter_LUV.set(new GT_MetaTileEntity_MicrowaveEnergyTransmitter( + 1164, "basicmachine.microtransmitter.06", "LuV Microwave Energy Transmitter", 6) + .getStackForm(1L)); + ItemList.MicroTransmitter_ZPM.set(new GT_MetaTileEntity_MicrowaveEnergyTransmitter( + 1165, "basicmachine.microtransmitter.07", "ZPM Microwave Energy Transmitter", 7) + .getStackForm(1L)); + ItemList.MicroTransmitter_UV.set(new GT_MetaTileEntity_MicrowaveEnergyTransmitter( + 1166, "basicmachine.microtransmitter.08", "UV Microwave Energy Transmitter", 8) + .getStackForm(1L)); + GT_ModHandler.addCraftingRecipe(ItemList.MicroTransmitter_HV.get(1L), bitsd, new Object[] { + "CPC", + aTextCableHull, + "GBG", + 'M', + ItemList.Hull_HV, + 'B', + ItemList.Battery_RE_HV_Lithium, + 'C', + ItemList.Emitter_HV, + 'G', + OrePrefixes.circuit.get(Materials.Advanced), + 'P', + ItemList.Field_Generator_HV + }); + GT_ModHandler.addCraftingRecipe(ItemList.MicroTransmitter_EV.get(1L), bitsd, new Object[] { + "CPC", + aTextCableHull, + "GBG", + 'M', + ItemList.Hull_EV, + 'B', + GT_ModHandler.getIC2Item("lapotronCrystal", 1L, GT_Values.W), + 'C', + ItemList.Emitter_EV, + 'G', + OrePrefixes.circuit.get(Materials.Data), + 'P', + ItemList.Field_Generator_EV + }); + GT_ModHandler.addCraftingRecipe(ItemList.MicroTransmitter_IV.get(1L), bitsd, new Object[] { + "CPC", + aTextCableHull, + "GBG", + 'M', + ItemList.Hull_IV, + 'B', + ItemList.Energy_LapotronicOrb, + 'C', + ItemList.Emitter_IV, + 'G', + OrePrefixes.circuit.get(Materials.Elite), + 'P', + ItemList.Field_Generator_IV + }); + GT_ModHandler.addCraftingRecipe(ItemList.MicroTransmitter_LUV.get(1L), bitsd, new Object[] { + "CPC", + aTextCableHull, + "GBG", + 'M', + ItemList.Hull_LuV, + 'B', + ItemList.Energy_LapotronicOrb2, + 'C', + ItemList.Emitter_LuV, + 'G', + OrePrefixes.circuit.get(Materials.Master), + 'P', + ItemList.Field_Generator_LuV + }); + GT_ModHandler.addCraftingRecipe(ItemList.MicroTransmitter_ZPM.get(1L), bitsd, new Object[] { + "CPC", + aTextCableHull, + "GBG", + 'M', + ItemList.Hull_ZPM, + 'B', + GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "EnableZPMandUVBatteries", false) + ? ItemList.Energy_Module + : ItemList.ZPM2, + 'C', + ItemList.Emitter_ZPM, + 'G', + OrePrefixes.circuit.get(Materials.Ultimate), + 'P', + ItemList.Field_Generator_ZPM + }); + GT_ModHandler.addCraftingRecipe(ItemList.MicroTransmitter_UV.get(1L), bitsd, new Object[] { + "CPC", + aTextCableHull, + "GBG", + 'M', + ItemList.Hull_UV, + 'B', + GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "EnableZPMandUVBatteries", false) + ? ItemList.Energy_Module + : ItemList.ZPM3, + 'C', + ItemList.Emitter_UV, + 'G', + OrePrefixes.circuit.get(Materials.SuperconductorUHV), + 'P', + ItemList.Field_Generator_UV + }); + + ItemList.Machine_Multi_Assemblyline.set( + new GT_MetaTileEntity_AssemblyLine(1170, "multimachine.assemblyline", "Assembling Line") + .getStackForm(1L)); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_Assemblyline.get(1L), bitsd, new Object[] { + aTextWireCoil, + "EME", + aTextWireCoil, + 'M', + ItemList.Hull_IV, + 'W', + ItemList.Casing_Assembler, + 'E', + OrePrefixes.circuit.get(Materials.Elite), + 'C', + ItemList.Robot_Arm_IV + }); + + ItemList.Machine_Multi_DieselEngine.set( + new GT_MetaTileEntity_DieselEngine(1171, "multimachine.dieselengine", "Combustion Engine") + .getStackForm(1L)); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_DieselEngine.get(1L), bitsd, new Object[] { + "PCP", + "EME", + "GWG", + 'M', + ItemList.Hull_EV, + 'P', + ItemList.Electric_Piston_EV, + 'E', + ItemList.Electric_Motor_EV, + 'C', + OrePrefixes.circuit.get(Materials.Elite), + 'W', + OrePrefixes.cableGt01.get(Materials.TungstenSteel), + 'G', + OrePrefixes.gearGt.get(Materials.Titanium) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_EngineIntake.get(4L), bitsd, new Object[] { + "PhP", + "RFR", + aTextPlateWrench, + 'R', + OrePrefixes.pipeMedium.get(Materials.Titanium), + 'F', + ItemList.Casing_StableTitanium, + 'P', + OrePrefixes.rotor.get(Materials.Titanium) + }); + + ItemList.Machine_Multi_ExtremeDieselEngine.set(new GT_MetaTileEntity_ExtremeDieselEngine( + 2105, "multimachine.extremedieselengine", "Extreme Combustion Engine") + .getStackForm(1L)); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_ExtremeDieselEngine.get(1L), bitsd, new Object[] { + "PCP", + "EME", + "GWG", + 'M', + ItemList.Hull_IV, + 'P', + ItemList.Electric_Piston_IV, + 'E', + ItemList.Electric_Motor_IV, + 'C', + OrePrefixes.circuit.get(Materials.Master), + 'W', + OrePrefixes.cableGt01.get(Materials.HSSG), + 'G', + OrePrefixes.gearGt.get(Materials.TungstenSteel) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_ExtremeEngineIntake.get(4L), bitsd, new Object[] { + "PhP", + "RFR", + aTextPlateWrench, + 'R', + OrePrefixes.pipeMedium.get(Materials.TungstenSteel), + 'F', + ItemList.Casing_RobustTungstenSteel, + 'P', + OrePrefixes.rotor.get(Materials.TungstenSteel) + }); + + ItemList.Machine_Multi_Cleanroom.set( + new GT_MetaTileEntity_Cleanroom(1172, "multimachine.cleanroom", "Cleanroom Controller") + .getStackForm(1)); + // If Cleanroom is enabled, add a recipe, else hide from NEI. + if (GT_Mod.gregtechproxy.mEnableCleanroom) { + GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_Cleanroom.get(1L), bitsd, new Object[] { + "FFF", + "RHR", + "MCM", + 'H', + ItemList.Hull_HV, + 'F', + ItemList.Component_Filter, + 'R', + OrePrefixes.rotor.get(Materials.StainlessSteel), + 'M', + ItemList.Electric_Motor_HV, + 'C', + OrePrefixes.circuit.get(Materials.Advanced) + }); + } else { + if (isNEILoaded) { API.hideItem(ItemList.Machine_Multi_Cleanroom.get(1L)); } } - ItemList.Machine_LV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( 1180, "basicmachine.circuitassembler.tier.01", "Basic Circuit Assembler", 1, "Pick-n-Place all over the place", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L)); - ItemList.Machine_MV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( 1181, "basicmachine.circuitassembler.tier.02", "Advanced Circuit Assembler", 2, "Pick-n-Place all over the place", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L)); - ItemList.Machine_HV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( 1182, "basicmachine.circuitassembler.tier.03", "Advanced Circuit Assembler II", 3, "Pick-n-Place all over the place", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L)); - ItemList.Machine_EV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( 1183, "basicmachine.circuitassembler.tier.04", "Advanced Circuit Assembler III", 4, "Pick-n-Place all over the place", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L)); - ItemList.Machine_IV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( 1184, "basicmachine.circuitassembler.tier.05", "Advanced Circuit Assembler IV", 5, "Pick-n-Place all over the place", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L)); - ItemList.Machine_LuV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(1185, "basicmachine.circuitassembler.tier.06", "Advanced Circuit Assembler V", 6, "Pick-n-Place all over the place", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L)); - ItemList.Machine_ZPM_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(1186, "basicmachine.circuitassembler.tier.07", "Advanced Circuit Assembler VI", 7, "Pick-n-Place all over the place", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L)); - ItemList.Machine_UV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( 1187, "basicmachine.circuitassembler.tier.08", "Advanced Circuit Assembler VII", 8, "Pick-n-Place all over the place", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", SoundResource.NONE, false, false, SpecialEffects.NONE, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L)); - - ItemList.Machine_HV_LightningRod.set(new GT_MetaTileEntity_LightningRod(1174, "basicgenerator.lightningrod.03", "Lightning Rod", 3).getStackForm(1)); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_HV_LightningRod.get(1L), bitsd, new Object[]{"LTL", "TMT", "LTL", 'M', ItemList.Hull_LuV, 'L', ItemList.Energy_LapotronicOrb, 'T', ItemList.Transformer_ZPM_LuV}); - ItemList.Machine_EV_LightningRod.set(new GT_MetaTileEntity_LightningRod(1175, "basicgenerator.lightningrod.04", "Lightning Rod II", 4).getStackForm(1)); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_EV_LightningRod.get(1L), bitsd, new Object[]{"LTL", "TMT", "LTL", 'M', ItemList.Hull_ZPM, 'L', ItemList.Energy_LapotronicOrb2, 'T', ItemList.Transformer_UV_ZPM}); - ItemList.Machine_IV_LightningRod.set(new GT_MetaTileEntity_LightningRod(1176, "basicgenerator.lightningrod.05", "Lightning Rod III", 5).getStackForm(1)); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_IV_LightningRod.get(1L), bitsd, new Object[]{"LTL", "TMT", "LTL", 'M', ItemList.Hull_UV, 'L', ItemList.ZPM2, 'T', ItemList.Transformer_MAX_UV}); - - ItemList.Machine_Multi_LargeChemicalReactor.set(new GT_MetaTileEntity_LargeChemicalReactor(1169, "multimachine.chemicalreactor", "Large Chemical Reactor").getStackForm(1)); - GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_LargeChemicalReactor.get(1L), bitsd, new Object[]{"CRC", "PMP", "CBC", - 'C', OrePrefixes.circuit.get(Materials.Advanced), - 'R', OrePrefixes.rotor.get(Materials.StainlessSteel), - 'P', OrePrefixes.pipeLarge.get(Materials.Polytetrafluoroethylene), - 'M', ItemList.Electric_Motor_HV, - 'B', ItemList.Hull_HV}); + ItemList.Machine_LV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 1180, + "basicmachine.circuitassembler.tier.01", + "Basic Circuit Assembler", + 1, + "Pick-n-Place all over the place", + GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, + 6, + 1, + 16000, + 0, + 1, + "CircuitAssembler.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "CIRCUITASSEMBLER", + new Object[] { + "ACE", + "VMV", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'A', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER + }) + .getStackForm(1L)); + ItemList.Machine_MV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 1181, + "basicmachine.circuitassembler.tier.02", + "Advanced Circuit Assembler", + 2, + "Pick-n-Place all over the place", + GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, + 6, + 1, + 16000, + 0, + 1, + "CircuitAssembler.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "CIRCUITASSEMBLER", + new Object[] { + "ACE", + "VMV", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'A', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER + }) + .getStackForm(1L)); + ItemList.Machine_HV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 1182, + "basicmachine.circuitassembler.tier.03", + "Advanced Circuit Assembler II", + 3, + "Pick-n-Place all over the place", + GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, + 6, + 1, + 16000, + 0, + 1, + "CircuitAssembler.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "CIRCUITASSEMBLER", + new Object[] { + "ACE", + "VMV", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'A', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER + }) + .getStackForm(1L)); + ItemList.Machine_EV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 1183, + "basicmachine.circuitassembler.tier.04", + "Advanced Circuit Assembler III", + 4, + "Pick-n-Place all over the place", + GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, + 6, + 1, + 16000, + 0, + 1, + "CircuitAssembler.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "CIRCUITASSEMBLER", + new Object[] { + "ACE", + "VMV", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'A', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER + }) + .getStackForm(1L)); + ItemList.Machine_IV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 1184, + "basicmachine.circuitassembler.tier.05", + "Advanced Circuit Assembler IV", + 5, + "Pick-n-Place all over the place", + GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, + 6, + 1, + 16000, + 0, + 1, + "CircuitAssembler.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "CIRCUITASSEMBLER", + new Object[] { + "ACE", + "VMV", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'A', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER + }) + .getStackForm(1L)); + ItemList.Machine_LuV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 1185, + "basicmachine.circuitassembler.tier.06", + "Advanced Circuit Assembler V", + 6, + "Pick-n-Place all over the place", + GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, + 6, + 1, + 16000, + 0, + 1, + "CircuitAssembler.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "CIRCUITASSEMBLER", + new Object[] { + "ACE", + "VMV", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'A', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER + }) + .getStackForm(1L)); + ItemList.Machine_ZPM_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 1186, + "basicmachine.circuitassembler.tier.07", + "Advanced Circuit Assembler VI", + 7, + "Pick-n-Place all over the place", + GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, + 6, + 1, + 16000, + 0, + 1, + "CircuitAssembler.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "CIRCUITASSEMBLER", + new Object[] { + "ACE", + "VMV", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'A', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER + }) + .getStackForm(1L)); + ItemList.Machine_UV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( + 1187, + "basicmachine.circuitassembler.tier.08", + "Advanced Circuit Assembler VII", + 8, + "Pick-n-Place all over the place", + GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, + 6, + 1, + 16000, + 0, + 1, + "CircuitAssembler.png", + SoundResource.NONE, + false, + false, + SpecialEffects.NONE, + "CIRCUITASSEMBLER", + new Object[] { + "ACE", + "VMV", + aTextWireCoil, + 'M', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, + 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, + 'A', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, + 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, + 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, + 'E', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER + }) + .getStackForm(1L)); + + ItemList.Machine_HV_LightningRod.set( + new GT_MetaTileEntity_LightningRod(1174, "basicgenerator.lightningrod.03", "Lightning Rod", 3) + .getStackForm(1)); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_HV_LightningRod.get(1L), bitsd, new Object[] { + "LTL", + "TMT", + "LTL", + 'M', + ItemList.Hull_LuV, + 'L', + ItemList.Energy_LapotronicOrb, + 'T', + ItemList.Transformer_ZPM_LuV + }); + ItemList.Machine_EV_LightningRod.set( + new GT_MetaTileEntity_LightningRod(1175, "basicgenerator.lightningrod.04", "Lightning Rod II", 4) + .getStackForm(1)); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_EV_LightningRod.get(1L), bitsd, new Object[] { + "LTL", + "TMT", + "LTL", + 'M', + ItemList.Hull_ZPM, + 'L', + ItemList.Energy_LapotronicOrb2, + 'T', + ItemList.Transformer_UV_ZPM + }); + ItemList.Machine_IV_LightningRod.set( + new GT_MetaTileEntity_LightningRod(1176, "basicgenerator.lightningrod.05", "Lightning Rod III", 5) + .getStackForm(1)); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_IV_LightningRod.get(1L), bitsd, new Object[] { + "LTL", "TMT", "LTL", 'M', ItemList.Hull_UV, 'L', ItemList.ZPM2, 'T', ItemList.Transformer_MAX_UV + }); + + ItemList.Machine_Multi_LargeChemicalReactor.set(new GT_MetaTileEntity_LargeChemicalReactor( + 1169, "multimachine.chemicalreactor", "Large Chemical Reactor") + .getStackForm(1)); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_LargeChemicalReactor.get(1L), bitsd, new Object[] { + "CRC", + "PMP", + "CBC", + 'C', + OrePrefixes.circuit.get(Materials.Advanced), + 'R', + OrePrefixes.rotor.get(Materials.StainlessSteel), + 'P', + OrePrefixes.pipeLarge.get(Materials.Polytetrafluoroethylene), + 'M', + ItemList.Electric_Motor_HV, + 'B', + ItemList.Hull_HV + }); } private static void run4() { - long bits = GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED; + long bits = GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE + | GT_ModHandler.RecipeBits.BUFFERED; for (int i = 0; i < GregTech_API.sGeneratedMaterials.length; i++) { - if (((GregTech_API.sGeneratedMaterials[i] != null) && ((GregTech_API.sGeneratedMaterials[i].mTypes & 0x2) != 0)) || (GregTech_API.sGeneratedMaterials[i] == Materials.Wood)) { - new GT_MetaPipeEntity_Frame(4096 + i, "GT_Frame_" + GregTech_API.sGeneratedMaterials[i], (GT_LanguageManager.i18nPlaceholder ? "%material" : GregTech_API.sGeneratedMaterials[i] != null ? GregTech_API.sGeneratedMaterials[i].mDefaultLocalName : "") + " Frame Box", GregTech_API.sGeneratedMaterials[i]); + if (((GregTech_API.sGeneratedMaterials[i] != null) + && ((GregTech_API.sGeneratedMaterials[i].mTypes & 0x2) != 0)) + || (GregTech_API.sGeneratedMaterials[i] == Materials.Wood)) { + new GT_MetaPipeEntity_Frame( + 4096 + i, + "GT_Frame_" + GregTech_API.sGeneratedMaterials[i], + (GT_LanguageManager.i18nPlaceholder + ? "%material" + : GregTech_API.sGeneratedMaterials[i] != null + ? GregTech_API.sGeneratedMaterials[i].mDefaultLocalName + : "") + + " Frame Box", + GregTech_API.sGeneratedMaterials[i]); } } boolean bEC = !GT_Mod.gregtechproxy.mHardcoreCables; @@ -1356,63 +12753,343 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI makeWires(Materials.Zinc, 1260, 1L, 2L, 1L, gregtech.api.enums.GT_Values.V[1], true, false); makeWires(Materials.SolderingAlloy, 1280, 1L, 2L, 1L, gregtech.api.enums.GT_Values.V[1], true, false); - makeWires(Materials.Iron, 1300, bEC ? 3L : 4L, bEC ? 6L : 8L, 2L, gregtech.api.enums.GT_Values.V[2], true, false); - makeWires(Materials.Nickel, 1320, bEC ? 3L : 5L, bEC ? 6L : 10L, 3L, gregtech.api.enums.GT_Values.V[2], true, false); - makeWires(Materials.Cupronickel, 1340, bEC ? 3L : 4L, bEC ? 6L : 8L, 2L, gregtech.api.enums.GT_Values.V[2], true, false); - makeWires(Materials.Copper, 1360, bEC ? 2L : 3L, bEC ? 4L : 6L, 1L, gregtech.api.enums.GT_Values.V[2], true, false); - makeWires(Materials.AnnealedCopper, 1380, bEC ? 1L : 2L, bEC ? 2L : 4L, 1L, gregtech.api.enums.GT_Values.V[2], true, false); - - makeWires(Materials.Kanthal, 1400, bEC ? 3L : 8L, bEC ? 6L : 16L, 4L, gregtech.api.enums.GT_Values.V[3], true, false); - makeWires(Materials.Gold, 1420, bEC ? 2L : 6L, bEC ? 4L : 12L, 3L, gregtech.api.enums.GT_Values.V[3], true, false); - makeWires(Materials.Electrum, 1440, bEC ? 2L : 5L, bEC ? 4L : 10L, 2L, gregtech.api.enums.GT_Values.V[3], true, false); - makeWires(Materials.Silver, 1460, bEC ? 1L : 4L, bEC ? 2L : 8L, 1L, gregtech.api.enums.GT_Values.V[3], true, false); - makeWires(Materials.BlueAlloy, 1480, bEC ? 1L : 4L, bEC ? 2L : 8L, 2L, gregtech.api.enums.GT_Values.V[3], true, false); - - makeWires(Materials.Nichrome, 1500, bEC ? 4L : 32L, bEC ? 8L : 64L, 3L, gregtech.api.enums.GT_Values.V[4], true, false); - makeWires(Materials.Steel, 1520, bEC ? 2L : 16L, bEC ? 4L : 32L, 2L, gregtech.api.enums.GT_Values.V[4], true, false); - makeWires(Materials.BlackSteel, 1540, bEC ? 2L : 14L, bEC ? 4L : 28L, 3L, gregtech.api.enums.GT_Values.V[4], true, false); - makeWires(Materials.Titanium, 1560, bEC ? 2L : 12L, bEC ? 4L : 24L, 4L, gregtech.api.enums.GT_Values.V[4], true, false); - makeWires(Materials.Aluminium, 1580, bEC ? 1L : 8L, bEC ? 2L : 16L, 1L, gregtech.api.enums.GT_Values.V[4], true, false); - - makeWires(Materials.Graphene, 1600, bEC ? 1L : 16L, bEC ? 2L : 32L, 1L, gregtech.api.enums.GT_Values.V[5], false, true); - makeWires(Materials.Osmium, 1620, bEC ? 2L : 32L, bEC ? 4L : 64L, 4L, gregtech.api.enums.GT_Values.V[5], true, false); - makeWires(Materials.Platinum, 1640, bEC ? 1L : 16L, bEC ? 2L : 32L, 2L, gregtech.api.enums.GT_Values.V[5], true, false); - makeWires(Materials.TungstenSteel, 1660, bEC ? 2L : 14L, bEC ? 4L : 28L, 3L, gregtech.api.enums.GT_Values.V[5], true, false); - makeWires(Materials.Tungsten, 1680, bEC ? 2L : 12L, bEC ? 4L : 24L, 2L, gregtech.api.enums.GT_Values.V[5], true, false); - - makeWires(Materials.HSSG, 1700, bEC ? 2L : 128L, bEC ? 4L : 256L, 4L, gregtech.api.enums.GT_Values.V[6], true, false); - makeWires(Materials.NiobiumTitanium, 1720, bEC ? 2L : 128L, bEC ? 4L : 256L, 4L, gregtech.api.enums.GT_Values.V[6], true, false); - makeWires(Materials.VanadiumGallium, 1740, bEC ? 2L : 128L, bEC ? 4L : 256L, 4L, gregtech.api.enums.GT_Values.V[6], true, false); - makeWires(Materials.YttriumBariumCuprate, 1760, bEC ? 4L : 256L, bEC ? 8L : 512L, 4L, gregtech.api.enums.GT_Values.V[6], true, false); - - makeWires(Materials.Naquadah, 1780, bEC ? 2L : 64L, bEC ? 4L : 128L, 2L, gregtech.api.enums.GT_Values.V[7], true, false); - - makeWires(Materials.NaquadahAlloy, 1800, bEC ? 4L : 64L, bEC ? 8L : 128L, 2L, gregtech.api.enums.GT_Values.V[8], true, false); - makeWires(Materials.Duranium, 1820, bEC ? 8L : 64L, bEC ? 16L : 128L, 1L, gregtech.api.enums.GT_Values.V[8], true, false); - + makeWires( + Materials.Iron, 1300, bEC ? 3L : 4L, bEC ? 6L : 8L, 2L, gregtech.api.enums.GT_Values.V[2], true, false); + makeWires( + Materials.Nickel, + 1320, + bEC ? 3L : 5L, + bEC ? 6L : 10L, + 3L, + gregtech.api.enums.GT_Values.V[2], + true, + false); + makeWires( + Materials.Cupronickel, + 1340, + bEC ? 3L : 4L, + bEC ? 6L : 8L, + 2L, + gregtech.api.enums.GT_Values.V[2], + true, + false); + makeWires( + Materials.Copper, + 1360, + bEC ? 2L : 3L, + bEC ? 4L : 6L, + 1L, + gregtech.api.enums.GT_Values.V[2], + true, + false); + makeWires( + Materials.AnnealedCopper, + 1380, + bEC ? 1L : 2L, + bEC ? 2L : 4L, + 1L, + gregtech.api.enums.GT_Values.V[2], + true, + false); + + makeWires( + Materials.Kanthal, + 1400, + bEC ? 3L : 8L, + bEC ? 6L : 16L, + 4L, + gregtech.api.enums.GT_Values.V[3], + true, + false); + makeWires( + Materials.Gold, + 1420, + bEC ? 2L : 6L, + bEC ? 4L : 12L, + 3L, + gregtech.api.enums.GT_Values.V[3], + true, + false); + makeWires( + Materials.Electrum, + 1440, + bEC ? 2L : 5L, + bEC ? 4L : 10L, + 2L, + gregtech.api.enums.GT_Values.V[3], + true, + false); + makeWires( + Materials.Silver, + 1460, + bEC ? 1L : 4L, + bEC ? 2L : 8L, + 1L, + gregtech.api.enums.GT_Values.V[3], + true, + false); + makeWires( + Materials.BlueAlloy, + 1480, + bEC ? 1L : 4L, + bEC ? 2L : 8L, + 2L, + gregtech.api.enums.GT_Values.V[3], + true, + false); + + makeWires( + Materials.Nichrome, + 1500, + bEC ? 4L : 32L, + bEC ? 8L : 64L, + 3L, + gregtech.api.enums.GT_Values.V[4], + true, + false); + makeWires( + Materials.Steel, + 1520, + bEC ? 2L : 16L, + bEC ? 4L : 32L, + 2L, + gregtech.api.enums.GT_Values.V[4], + true, + false); + makeWires( + Materials.BlackSteel, + 1540, + bEC ? 2L : 14L, + bEC ? 4L : 28L, + 3L, + gregtech.api.enums.GT_Values.V[4], + true, + false); + makeWires( + Materials.Titanium, + 1560, + bEC ? 2L : 12L, + bEC ? 4L : 24L, + 4L, + gregtech.api.enums.GT_Values.V[4], + true, + false); + makeWires( + Materials.Aluminium, + 1580, + bEC ? 1L : 8L, + bEC ? 2L : 16L, + 1L, + gregtech.api.enums.GT_Values.V[4], + true, + false); + + makeWires( + Materials.Graphene, + 1600, + bEC ? 1L : 16L, + bEC ? 2L : 32L, + 1L, + gregtech.api.enums.GT_Values.V[5], + false, + true); + makeWires( + Materials.Osmium, + 1620, + bEC ? 2L : 32L, + bEC ? 4L : 64L, + 4L, + gregtech.api.enums.GT_Values.V[5], + true, + false); + makeWires( + Materials.Platinum, + 1640, + bEC ? 1L : 16L, + bEC ? 2L : 32L, + 2L, + gregtech.api.enums.GT_Values.V[5], + true, + false); + makeWires( + Materials.TungstenSteel, + 1660, + bEC ? 2L : 14L, + bEC ? 4L : 28L, + 3L, + gregtech.api.enums.GT_Values.V[5], + true, + false); + makeWires( + Materials.Tungsten, + 1680, + bEC ? 2L : 12L, + bEC ? 4L : 24L, + 2L, + gregtech.api.enums.GT_Values.V[5], + true, + false); + + makeWires( + Materials.HSSG, + 1700, + bEC ? 2L : 128L, + bEC ? 4L : 256L, + 4L, + gregtech.api.enums.GT_Values.V[6], + true, + false); + makeWires( + Materials.NiobiumTitanium, + 1720, + bEC ? 2L : 128L, + bEC ? 4L : 256L, + 4L, + gregtech.api.enums.GT_Values.V[6], + true, + false); + makeWires( + Materials.VanadiumGallium, + 1740, + bEC ? 2L : 128L, + bEC ? 4L : 256L, + 4L, + gregtech.api.enums.GT_Values.V[6], + true, + false); + makeWires( + Materials.YttriumBariumCuprate, + 1760, + bEC ? 4L : 256L, + bEC ? 8L : 512L, + 4L, + gregtech.api.enums.GT_Values.V[6], + true, + false); + + makeWires( + Materials.Naquadah, + 1780, + bEC ? 2L : 64L, + bEC ? 4L : 128L, + 2L, + gregtech.api.enums.GT_Values.V[7], + true, + false); + + makeWires( + Materials.NaquadahAlloy, + 1800, + bEC ? 4L : 64L, + bEC ? 8L : 128L, + 2L, + gregtech.api.enums.GT_Values.V[8], + true, + false); + makeWires( + Materials.Duranium, + 1820, + bEC ? 8L : 64L, + bEC ? 16L : 128L, + 1L, + gregtech.api.enums.GT_Values.V[8], + true, + false); // Superconductor base. - makeWires(Materials.Pentacadmiummagnesiumhexaoxid , 2200, 1L, 2L, 1L, gregtech.api.enums.GT_Values.V[2],false, false); - makeWires(Materials.Titaniumonabariumdecacoppereikosaoxid , 2220, 1L, 8L, 2L, gregtech.api.enums.GT_Values.V[3], false, false); - makeWires(Materials.Uraniumtriplatinid , 2240, 1L, 16L, 3L, gregtech.api.enums.GT_Values.V[4], false, false); - makeWires(Materials.Vanadiumtriindinid , 2260, 1L, 64L, 4L, gregtech.api.enums.GT_Values.V[5], false, false); - makeWires(Materials.Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid, 2280, 2L, 256L, 6L, gregtech.api.enums.GT_Values.V[6], false, false); - makeWires(Materials.Tetranaquadahdiindiumhexaplatiumosminid , 2300, 2L, 1024L, 8L, gregtech.api.enums.GT_Values.V[7], false, false); - makeWires(Materials.Longasssuperconductornameforuvwire , 2500, 2L, 4096L, 12L, gregtech.api.enums.GT_Values.V[8], false, false); - makeWires(Materials.Longasssuperconductornameforuhvwire , 2520, 2L, 16384L, 16L, gregtech.api.enums.GT_Values.V[9], false, false); - makeWires(Materials.SuperconductorUEVBase , 2032, 2L, 65536L, 24L, gregtech.api.enums.GT_Values.V[10], false, false); - makeWires(Materials.SuperconductorUIVBase , 2052, 2L, 262144L, 32L, gregtech.api.enums.GT_Values.V[11], false, false); - makeWires(Materials.SuperconductorUMVBase , 2072, 2L, 1048576L, 32L, gregtech.api.enums.GT_Values.V[12], false, false); + makeWires( + Materials.Pentacadmiummagnesiumhexaoxid, + 2200, + 1L, + 2L, + 1L, + gregtech.api.enums.GT_Values.V[2], + false, + false); + makeWires( + Materials.Titaniumonabariumdecacoppereikosaoxid, + 2220, + 1L, + 8L, + 2L, + gregtech.api.enums.GT_Values.V[3], + false, + false); + makeWires(Materials.Uraniumtriplatinid, 2240, 1L, 16L, 3L, gregtech.api.enums.GT_Values.V[4], false, false); + makeWires(Materials.Vanadiumtriindinid, 2260, 1L, 64L, 4L, gregtech.api.enums.GT_Values.V[5], false, false); + makeWires( + Materials.Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid, + 2280, + 2L, + 256L, + 6L, + gregtech.api.enums.GT_Values.V[6], + false, + false); + makeWires( + Materials.Tetranaquadahdiindiumhexaplatiumosminid, + 2300, + 2L, + 1024L, + 8L, + gregtech.api.enums.GT_Values.V[7], + false, + false); + makeWires( + Materials.Longasssuperconductornameforuvwire, + 2500, + 2L, + 4096L, + 12L, + gregtech.api.enums.GT_Values.V[8], + false, + false); + makeWires( + Materials.Longasssuperconductornameforuhvwire, + 2520, + 2L, + 16384L, + 16L, + gregtech.api.enums.GT_Values.V[9], + false, + false); + makeWires( + Materials.SuperconductorUEVBase, + 2032, + 2L, + 65536L, + 24L, + gregtech.api.enums.GT_Values.V[10], + false, + false); + makeWires( + Materials.SuperconductorUIVBase, + 2052, + 2L, + 262144L, + 32L, + gregtech.api.enums.GT_Values.V[11], + false, + false); + makeWires( + Materials.SuperconductorUMVBase, + 2072, + 2L, + 1048576L, + 32L, + gregtech.api.enums.GT_Values.V[12], + false, + false); // Actual superconductors. - makeWires(Materials.SuperconductorMV , 2320, 0L, 0L, 4L , gregtech.api.enums.GT_Values.V[2] , false, true); - makeWires(Materials.SuperconductorHV , 2340, 0L, 0L, 6L , gregtech.api.enums.GT_Values.V[3] , false, true); - makeWires(Materials.SuperconductorEV , 2360, 0L, 0L, 8L , gregtech.api.enums.GT_Values.V[4] , false, true); - makeWires(Materials.SuperconductorIV , 2380, 0L, 0L, 12L, gregtech.api.enums.GT_Values.V[5] , false, true); - makeWires(Materials.SuperconductorLuV, 2400, 0L, 0L, 16L, gregtech.api.enums.GT_Values.V[6] , false, true); - makeWires(Materials.SuperconductorZPM, 2420, 0L, 0L, 24L, gregtech.api.enums.GT_Values.V[7] , false, true); - makeWires(Materials.SuperconductorUV , 2440, 0L, 0L, 32L, gregtech.api.enums.GT_Values.V[8] , false, true); - makeWires(Materials.SuperconductorUHV, 2020, 0L, 0L, 48L, gregtech.api.enums.GT_Values.V[9] , false, true); + makeWires(Materials.SuperconductorMV, 2320, 0L, 0L, 4L, gregtech.api.enums.GT_Values.V[2], false, true); + makeWires(Materials.SuperconductorHV, 2340, 0L, 0L, 6L, gregtech.api.enums.GT_Values.V[3], false, true); + makeWires(Materials.SuperconductorEV, 2360, 0L, 0L, 8L, gregtech.api.enums.GT_Values.V[4], false, true); + makeWires(Materials.SuperconductorIV, 2380, 0L, 0L, 12L, gregtech.api.enums.GT_Values.V[5], false, true); + makeWires(Materials.SuperconductorLuV, 2400, 0L, 0L, 16L, gregtech.api.enums.GT_Values.V[6], false, true); + makeWires(Materials.SuperconductorZPM, 2420, 0L, 0L, 24L, gregtech.api.enums.GT_Values.V[7], false, true); + makeWires(Materials.SuperconductorUV, 2440, 0L, 0L, 32L, gregtech.api.enums.GT_Values.V[8], false, true); + makeWires(Materials.SuperconductorUHV, 2020, 0L, 0L, 48L, gregtech.api.enums.GT_Values.V[9], false, true); makeWires(Materials.SuperconductorUEV, 2026, 0L, 0L, 64L, gregtech.api.enums.GT_Values.V[10], false, true); makeWires(Materials.SuperconductorUIV, 2081, 0L, 0L, 64L, gregtech.api.enums.GT_Values.V[11], false, true); makeWires(Materials.SuperconductorUMV, 2089, 0L, 0L, 64L, gregtech.api.enums.GT_Values.V[12], false, true); @@ -1421,16 +13098,53 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI makeWires(Materials.SpaceTime, 2606, 0L, 0L, 1_000_000L, GT_Values.V[14], false, true); if (!GT_Mod.gregtechproxy.mDisableIC2Cables) { - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("copperCableItem", 2L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"xP", 'P', OrePrefixes.plate.get(Materials.AnyCopper)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("goldCableItem", 4L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"xP", 'P', OrePrefixes.plate.get(Materials.Gold)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("ironCableItem", 3L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"xP", 'P', OrePrefixes.plate.get(Materials.AnyIron)}); - GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("tinCableItem", 3L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"xP", 'P', OrePrefixes.plate.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("copperCableItem", 2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] {"xP", 'P', OrePrefixes.plate.get(Materials.AnyCopper)}); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("goldCableItem", 4L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] {"xP", 'P', OrePrefixes.plate.get(Materials.Gold)}); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("ironCableItem", 3L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] {"xP", 'P', OrePrefixes.plate.get(Materials.AnyIron)}); + GT_ModHandler.addCraftingRecipe( + GT_ModHandler.getIC2Item("tinCableItem", 3L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] {"xP", 'P', OrePrefixes.plate.get(Materials.Tin)}); } - - GT_OreDictUnificator.registerOre(OrePrefixes.pipeSmall.get(Materials.Wood), new GT_MetaPipeEntity_Fluid(5101, "GT_Pipe_Wood_Small", "Small Wooden Fluid Pipe", 0.375F, Materials.Wood, 10, 350, false).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(Materials.Wood), new GT_MetaPipeEntity_Fluid(5102, "GT_Pipe_Wood", "Wooden Fluid Pipe", 0.5F, Materials.Wood, 30, 350, false).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(Materials.Wood), new GT_MetaPipeEntity_Fluid(5103, "GT_Pipe_Wood_Large", "Large Wooden Fluid Pipe", 0.75F, Materials.Wood, 60, 350, false).getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.pipeSmall.get(Materials.Wood), + new GT_MetaPipeEntity_Fluid( + 5101, + "GT_Pipe_Wood_Small", + "Small Wooden Fluid Pipe", + 0.375F, + Materials.Wood, + 10, + 350, + false) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.pipeMedium.get(Materials.Wood), + new GT_MetaPipeEntity_Fluid( + 5102, "GT_Pipe_Wood", "Wooden Fluid Pipe", 0.5F, Materials.Wood, 30, 350, false) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.pipeLarge.get(Materials.Wood), + new GT_MetaPipeEntity_Fluid( + 5103, + "GT_Pipe_Wood_Large", + "Large Wooden Fluid Pipe", + 0.75F, + Materials.Wood, + 60, + 350, + false) + .getStackForm(1L)); generateFluidPipes(Materials.Copper, Materials.Copper.mName, 5110, 20, 1000, true); generateFluidMultiPipes(Materials.Copper, Materials.Copper.mName, 5115, 20, 1000, true); @@ -1444,22 +13158,97 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI generateFluidMultiPipes(Materials.Titanium, Materials.Titanium.mName, 5155, 480, 5000, true); generateFluidPipes(Materials.TungstenSteel, Materials.TungstenSteel.mName, 5160, 600, 7500, true); generateFluidMultiPipes(Materials.TungstenSteel, Materials.TungstenSteel.mName, 5270, 600, 7500, true); - generateFluidPipes(Materials.Polybenzimidazole, Materials.Polybenzimidazole.mName, "PBI", 5280, 600, 1000, true); - generateFluidMultiPipes(Materials.Polybenzimidazole, Materials.Polybenzimidazole.mName, "PBI", 5290, 600, 1000, true); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeSmall.get(Materials.Ultimate), new GT_MetaPipeEntity_Fluid(5165, "GT_Pipe_HighPressure_Small", "Small High Pressure Fluid Pipe", 0.375F, Materials.Redstone, 4800, 1500, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(Materials.Ultimate), new GT_MetaPipeEntity_Fluid(5166, "GT_Pipe_HighPressure", "High Pressure Fluid Pipe", 0.5F, Materials.Redstone, 7200, 1500, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(Materials.Ultimate), new GT_MetaPipeEntity_Fluid(5167, "GT_Pipe_HighPressure_Large", "Large High Pressure Fluid Pipe", 0.75F, Materials.Redstone, 9600, 1500, true).getStackForm(1L)); + generateFluidPipes( + Materials.Polybenzimidazole, Materials.Polybenzimidazole.mName, "PBI", 5280, 600, 1000, true); + generateFluidMultiPipes( + Materials.Polybenzimidazole, Materials.Polybenzimidazole.mName, "PBI", 5290, 600, 1000, true); + GT_OreDictUnificator.registerOre( + OrePrefixes.pipeSmall.get(Materials.Ultimate), + new GT_MetaPipeEntity_Fluid( + 5165, + "GT_Pipe_HighPressure_Small", + "Small High Pressure Fluid Pipe", + 0.375F, + Materials.Redstone, + 4800, + 1500, + true) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.pipeMedium.get(Materials.Ultimate), + new GT_MetaPipeEntity_Fluid( + 5166, + "GT_Pipe_HighPressure", + "High Pressure Fluid Pipe", + 0.5F, + Materials.Redstone, + 7200, + 1500, + true) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.pipeLarge.get(Materials.Ultimate), + new GT_MetaPipeEntity_Fluid( + 5167, + "GT_Pipe_HighPressure_Large", + "Large High Pressure Fluid Pipe", + 0.75F, + Materials.Redstone, + 9600, + 1500, + true) + .getStackForm(1L)); generateFluidPipes(Materials.Plastic, Materials.Plastic.mName, "Plastic", 5170, 360, 350, true); generateFluidMultiPipes(Materials.Plastic, Materials.Plastic.mName, "Plastic", 5175, 360, 350, true); - generateFluidPipes(Materials.Polytetrafluoroethylene, Materials.Polytetrafluoroethylene.mName, "PTFE", 5680, 480, 600, true); - generateFluidMultiPipes(Materials.Polytetrafluoroethylene, Materials.Polytetrafluoroethylene.mName, "PTFE", 5685, 480, 600, true); + generateFluidPipes( + Materials.Polytetrafluoroethylene, + Materials.Polytetrafluoroethylene.mName, + "PTFE", + 5680, + 480, + 600, + true); + generateFluidMultiPipes( + Materials.Polytetrafluoroethylene, + Materials.Polytetrafluoroethylene.mName, + "PTFE", + 5685, + 480, + 600, + true); generateFluidPipes(Materials.SpaceTime, Materials.SpaceTime.mName, 5300, 250000, 2147483647, true); generateFluidMultiPipes(Materials.SpaceTime, Materials.SpaceTime.mName, 5305, 250000, 2147483647, true); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeSmall, Materials.TungstenSteel, 1L), ItemList.Electric_Pump_EV.get(1L), GT_Utility.getIntegratedCircuit(5)}, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.pipeSmall, Materials.Ultimate, 1L), 300, 1920); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.TungstenSteel, 1L), ItemList.Electric_Pump_IV.get(1L), GT_Utility.getIntegratedCircuit(5)}, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Ultimate, 1L), 400, 4096); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.TungstenSteel, 1L), ItemList.Electric_Pump_IV.get(2L), GT_Utility.getIntegratedCircuit(5)}, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Ultimate, 1L), 600, 7680); - + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.pipeSmall, Materials.TungstenSteel, 1L), + ItemList.Electric_Pump_EV.get(1L), + GT_Utility.getIntegratedCircuit(5) + }, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.pipeSmall, Materials.Ultimate, 1L), + 300, + 1920); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.TungstenSteel, 1L), + ItemList.Electric_Pump_IV.get(1L), + GT_Utility.getIntegratedCircuit(5) + }, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Ultimate, 1L), + 400, + 4096); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.TungstenSteel, 1L), + ItemList.Electric_Pump_IV.get(2L), + GT_Utility.getIntegratedCircuit(5) + }, + GT_Values.NF, + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Ultimate, 1L), + 600, + 7680); generateItemPipes(Materials.Brass, Materials.Brass.mName, 5602, 1); generateItemPipes(Materials.Electrum, Materials.Electrum.mName, 5612, 2); @@ -1470,191 +13259,1359 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI generateItemPipes(Materials.Cobalt, Materials.Cobalt.mName, 5710, 2); generateItemPipes(Materials.Aluminium, Materials.Aluminium.mName, 5720, 2); - - ItemList.Automation_ChestBuffer_ULV.set(new GT_MetaTileEntity_ChestBuffer(9230, "automation.chestbuffer.tier.00", "Ultra Low Voltage Chest Buffer", 0).getStackForm(1L)); - ItemList.Automation_ChestBuffer_LV.set(new GT_MetaTileEntity_ChestBuffer(9231, "automation.chestbuffer.tier.01", "Low Voltage Chest Buffer", 1).getStackForm(1L)); - ItemList.Automation_ChestBuffer_MV.set(new GT_MetaTileEntity_ChestBuffer(9232, "automation.chestbuffer.tier.02", "Medium Voltage Chest Buffer", 2).getStackForm(1L)); - ItemList.Automation_ChestBuffer_HV.set(new GT_MetaTileEntity_ChestBuffer(9233, "automation.chestbuffer.tier.03", "High Voltage Chest Buffer", 3).getStackForm(1L)); - ItemList.Automation_ChestBuffer_EV.set(new GT_MetaTileEntity_ChestBuffer(9234, "automation.chestbuffer.tier.04", "Extreme Voltage Chest Buffer", 4).getStackForm(1L)); - ItemList.Automation_ChestBuffer_IV.set(new GT_MetaTileEntity_ChestBuffer(9235, "automation.chestbuffer.tier.05", "Insane Voltage Chest Buffer", 5).getStackForm(1L)); - ItemList.Automation_ChestBuffer_LuV.set(new GT_MetaTileEntity_ChestBuffer(9236, "automation.chestbuffer.tier.06", "Ludicrous Voltage Chest Buffer", 6).getStackForm(1L)); - ItemList.Automation_ChestBuffer_ZPM.set(new GT_MetaTileEntity_ChestBuffer(9237, "automation.chestbuffer.tier.07", "ZPM Voltage Chest Buffer", 7).getStackForm(1L)); - ItemList.Automation_ChestBuffer_UV.set(new GT_MetaTileEntity_ChestBuffer(9238, "automation.chestbuffer.tier.08", "Ultimate Voltage Chest Buffer", 8).getStackForm(1L)); - ItemList.Automation_ChestBuffer_MAX.set(new GT_MetaTileEntity_ChestBuffer(9239, "automation.chestbuffer.tier.09", "Highly Ultimate Voltage Chest Buffer", 9).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Automation_ChestBuffer_ULV.get(1L), bits, new Object[]{"CMV", " X ", 'M', ItemList.Hull_ULV, 'V', ItemList.Conveyor_Module_LV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Primitive)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_ChestBuffer_LV.get(1L), bits, new Object[]{"CMV", " X ", 'M', ItemList.Hull_LV, 'V', ItemList.Conveyor_Module_LV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_ChestBuffer_MV.get(1L), bits, new Object[]{"CMV", " X ", 'M', ItemList.Hull_MV, 'V', ItemList.Conveyor_Module_MV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Good)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_ChestBuffer_HV.get(1L), bits, new Object[]{"CMV", " X ", 'M', ItemList.Hull_HV, 'V', ItemList.Conveyor_Module_HV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Advanced)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_ChestBuffer_EV.get(1L), bits, new Object[]{"CMV", " X ", 'M', ItemList.Hull_EV, 'V', ItemList.Conveyor_Module_EV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Data)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_ChestBuffer_IV.get(1L), bits, new Object[]{"CMV", " X ", 'M', ItemList.Hull_IV, 'V', ItemList.Conveyor_Module_IV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Elite)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_ChestBuffer_LuV.get(1L), bits, new Object[]{"CMV", " X ", 'M', ItemList.Hull_LuV, 'V', ItemList.Conveyor_Module_LuV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Master)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_ChestBuffer_ZPM.get(1L), bits, new Object[]{"CMV", " X ", 'M', ItemList.Hull_ZPM, 'V', ItemList.Conveyor_Module_ZPM, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Ultimate)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_ChestBuffer_UV.get(1L), bits, new Object[]{"CMV", " X ", 'M', ItemList.Hull_UV, 'V', ItemList.Conveyor_Module_UV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.SuperconductorUHV)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_ChestBuffer_MAX.get(1L), bits, new Object[]{"CMV", " X ", 'M', ItemList.Hull_MAX, 'V', ItemList.Conveyor_Module_UHV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Infinite)}); - - ItemList.Automation_Filter_ULV.set(new GT_MetaTileEntity_Filter(9240, "automation.filter.tier.00", "Ultra Low Voltage Item Filter", 0).getStackForm(1L)); - ItemList.Automation_Filter_LV.set(new GT_MetaTileEntity_Filter(9241, "automation.filter.tier.01", "Low Voltage Item Filter", 1).getStackForm(1L)); - ItemList.Automation_Filter_MV.set(new GT_MetaTileEntity_Filter(9242, "automation.filter.tier.02", "Medium Voltage Item Filter", 2).getStackForm(1L)); - ItemList.Automation_Filter_HV.set(new GT_MetaTileEntity_Filter(9243, "automation.filter.tier.03", "High Voltage Item Filter", 3).getStackForm(1L)); - ItemList.Automation_Filter_EV.set(new GT_MetaTileEntity_Filter(9244, "automation.filter.tier.04", "Extreme Voltage Item Filter", 4).getStackForm(1L)); - ItemList.Automation_Filter_IV.set(new GT_MetaTileEntity_Filter(9245, "automation.filter.tier.05", "Insane Voltage Item Filter", 5).getStackForm(1L)); - ItemList.Automation_Filter_LuV.set(new GT_MetaTileEntity_Filter(9246, "automation.filter.tier.06", "Ludicrous Voltage Item Filter", 6).getStackForm(1L)); - ItemList.Automation_Filter_ZPM.set(new GT_MetaTileEntity_Filter(9247, "automation.filter.tier.07", "ZPM Voltage Item Filter", 7).getStackForm(1L)); - ItemList.Automation_Filter_UV.set(new GT_MetaTileEntity_Filter(9248, "automation.filter.tier.08", "Ultimate Voltage Item Filter", 8).getStackForm(1L)); - ItemList.Automation_Filter_MAX.set(new GT_MetaTileEntity_Filter(9249, "automation.filter.tier.09", "Highly Ultimate Voltage Item Filter", 9).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Automation_Filter_ULV.get(1L), bits, new Object[]{" F ", "CMV", " X ", 'M', ItemList.Hull_ULV, 'V', ItemList.Conveyor_Module_LV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_Filter_LV.get(1L), bits, new Object[]{" F ", "CMV", " X ", 'M', ItemList.Hull_LV, 'V', ItemList.Conveyor_Module_LV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_Filter_MV.get(1L), bits, new Object[]{" F ", "CMV", " X ", 'M', ItemList.Hull_MV, 'V', ItemList.Conveyor_Module_MV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_Filter_HV.get(1L), bits, new Object[]{" F ", "CMV", " X ", 'M', ItemList.Hull_HV, 'V', ItemList.Conveyor_Module_HV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_Filter_EV.get(1L), bits, new Object[]{" F ", "CMV", " X ", 'M', ItemList.Hull_EV, 'V', ItemList.Conveyor_Module_EV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_Filter_IV.get(1L), bits, new Object[]{" F ", "CMV", " X ", 'M', ItemList.Hull_IV, 'V', ItemList.Conveyor_Module_IV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_Filter_LuV.get(1L), bits, new Object[]{" F ", "CMV", " X ", 'M', ItemList.Hull_LuV, 'V', ItemList.Conveyor_Module_LuV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_Filter_ZPM.get(1L), bits, new Object[]{" F ", "CMV", " X ", 'M', ItemList.Hull_ZPM, 'V', ItemList.Conveyor_Module_ZPM, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_Filter_UV.get(1L), bits, new Object[]{" F ", "CMV", " X ", 'M', ItemList.Hull_UV, 'V', ItemList.Conveyor_Module_UV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_Filter_MAX.get(1L), bits, new Object[]{" F ", "CMV", " X ", 'M', ItemList.Hull_MAX, 'V', ItemList.Conveyor_Module_UHV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - - ItemList.Automation_TypeFilter_ULV.set(new GT_MetaTileEntity_TypeFilter(9250, "automation.typefilter.tier.00", "Ultra Low Voltage Type Filter", 0).getStackForm(1L)); - ItemList.Automation_TypeFilter_LV.set(new GT_MetaTileEntity_TypeFilter(9251, "automation.typefilter.tier.01", "Low Voltage Type Filter", 1).getStackForm(1L)); - ItemList.Automation_TypeFilter_MV.set(new GT_MetaTileEntity_TypeFilter(9252, "automation.typefilter.tier.02", "Medium Voltage Type Filter", 2).getStackForm(1L)); - ItemList.Automation_TypeFilter_HV.set(new GT_MetaTileEntity_TypeFilter(9253, "automation.typefilter.tier.03", "High Voltage Type Filter", 3).getStackForm(1L)); - ItemList.Automation_TypeFilter_EV.set(new GT_MetaTileEntity_TypeFilter(9254, "automation.typefilter.tier.04", "Extreme Voltage Type Filter", 4).getStackForm(1L)); - ItemList.Automation_TypeFilter_IV.set(new GT_MetaTileEntity_TypeFilter(9255, "automation.typefilter.tier.05", "Insane Voltage Type Filter", 5).getStackForm(1L)); - ItemList.Automation_TypeFilter_LuV.set(new GT_MetaTileEntity_TypeFilter(9256, "automation.typefilter.tier.06", "Ludicrous Voltage Type Filter", 6).getStackForm(1L)); - ItemList.Automation_TypeFilter_ZPM.set(new GT_MetaTileEntity_TypeFilter(9257, "automation.typefilter.tier.07", "ZPM Voltage Type Filter", 7).getStackForm(1L)); - ItemList.Automation_TypeFilter_UV.set(new GT_MetaTileEntity_TypeFilter(9258, "automation.typefilter.tier.08", "Ultimate Voltage Type Filter", 8).getStackForm(1L)); - ItemList.Automation_TypeFilter_MAX.set(new GT_MetaTileEntity_TypeFilter(9259, "automation.typefilter.tier.09", "Highly Ultimate Voltage Type Filter", 9).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Automation_TypeFilter_ULV.get(1L), bits, new Object[]{" F ", "VMC", " X ", 'M', ItemList.Hull_ULV, 'V', ItemList.Conveyor_Module_LV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_TypeFilter_LV.get(1L), bits, new Object[]{" F ", "VMC", " X ", 'M', ItemList.Hull_LV, 'V', ItemList.Conveyor_Module_LV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_TypeFilter_MV.get(1L), bits, new Object[]{" F ", "VMC", " X ", 'M', ItemList.Hull_MV, 'V', ItemList.Conveyor_Module_MV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_TypeFilter_HV.get(1L), bits, new Object[]{" F ", "VMC", " X ", 'M', ItemList.Hull_HV, 'V', ItemList.Conveyor_Module_HV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_TypeFilter_EV.get(1L), bits, new Object[]{" F ", "VMC", " X ", 'M', ItemList.Hull_EV, 'V', ItemList.Conveyor_Module_EV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_TypeFilter_IV.get(1L), bits, new Object[]{" F ", "VMC", " X ", 'M', ItemList.Hull_IV, 'V', ItemList.Conveyor_Module_IV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_TypeFilter_LuV.get(1L), bits, new Object[]{" F ", "VMC", " X ", 'M', ItemList.Hull_LuV, 'V', ItemList.Conveyor_Module_LuV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_TypeFilter_ZPM.get(1L), bits, new Object[]{" F ", "VMC", " X ", 'M', ItemList.Hull_ZPM, 'V', ItemList.Conveyor_Module_ZPM, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_TypeFilter_UV.get(1L), bits, new Object[]{" F ", "VMC", " X ", 'M', ItemList.Hull_UV, 'V', ItemList.Conveyor_Module_UV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_TypeFilter_MAX.get(1L), bits, new Object[]{" F ", "VMC", " X ", 'M', ItemList.Hull_MAX, 'V', ItemList.Conveyor_Module_UHV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - - ItemList.Automation_Regulator_ULV.set(new GT_MetaTileEntity_Regulator(9270, "automation.regulator.tier.00", "Ultra Low Voltage Regulator", 0).getStackForm(1L)); - ItemList.Automation_Regulator_LV.set(new GT_MetaTileEntity_Regulator(9271, "automation.regulator.tier.01", "Low Voltage Regulator", 1).getStackForm(1L)); - ItemList.Automation_Regulator_MV.set(new GT_MetaTileEntity_Regulator(9272, "automation.regulator.tier.02", "Medium Voltage Regulator", 2).getStackForm(1L)); - ItemList.Automation_Regulator_HV.set(new GT_MetaTileEntity_Regulator(9273, "automation.regulator.tier.03", "High Voltage Regulator", 3).getStackForm(1L)); - ItemList.Automation_Regulator_EV.set(new GT_MetaTileEntity_Regulator(9274, "automation.regulator.tier.04", "Extreme Voltage Regulator", 4).getStackForm(1L)); - ItemList.Automation_Regulator_IV.set(new GT_MetaTileEntity_Regulator(9275, "automation.regulator.tier.05", "Insane Voltage Regulator", 5).getStackForm(1L)); - ItemList.Automation_Regulator_LuV.set(new GT_MetaTileEntity_Regulator(9276, "automation.regulator.tier.06", "Ludicrous Voltage Regulator", 6).getStackForm(1L)); - ItemList.Automation_Regulator_ZPM.set(new GT_MetaTileEntity_Regulator(9277, "automation.regulator.tier.07", "ZPM Voltage Regulator", 7).getStackForm(1L)); - ItemList.Automation_Regulator_UV.set(new GT_MetaTileEntity_Regulator(9278, "automation.regulator.tier.08", "Ultimate Voltage Regulator", 8).getStackForm(1L)); - ItemList.Automation_Regulator_MAX.set(new GT_MetaTileEntity_Regulator(9279, "automation.regulator.tier.09", "Highly Ultimate Voltage Regulator", 9).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Automation_Regulator_ULV.get(1L), bits, new Object[]{"XFX", "VMV", "XCX", 'M', ItemList.Hull_ULV, 'V', ItemList.Robot_Arm_LV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_Regulator_LV.get(1L), bits, new Object[]{"XFX", "VMV", "XCX", 'M', ItemList.Hull_LV, 'V', ItemList.Robot_Arm_LV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_Regulator_MV.get(1L), bits, new Object[]{"XFX", "VMV", "XCX", 'M', ItemList.Hull_MV, 'V', ItemList.Robot_Arm_MV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_Regulator_HV.get(1L), bits, new Object[]{"XFX", "VMV", "XCX", 'M', ItemList.Hull_HV, 'V', ItemList.Robot_Arm_HV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_Regulator_EV.get(1L), bits, new Object[]{"XFX", "VMV", "XCX", 'M', ItemList.Hull_EV, 'V', ItemList.Robot_Arm_EV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_Regulator_IV.get(1L), bits, new Object[]{"XFX", "VMV", "XCX", 'M', ItemList.Hull_IV, 'V', ItemList.Robot_Arm_IV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_Regulator_LuV.get(1L), bits, new Object[]{"XFX", "VMV", "XCX", 'M', ItemList.Hull_LuV, 'V', ItemList.Robot_Arm_LuV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_Regulator_ZPM.get(1L), bits, new Object[]{"XFX", "VMV", "XCX", 'M', ItemList.Hull_ZPM, 'V', ItemList.Robot_Arm_ZPM, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_Regulator_UV.get(1L), bits, new Object[]{"XFX", "VMV", "XCX", 'M', ItemList.Hull_UV, 'V', ItemList.Robot_Arm_UV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_Regulator_MAX.get(1L), bits, new Object[]{"XFX", "VMV", "XCX", 'M', ItemList.Hull_MAX, 'V', ItemList.Robot_Arm_UHV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - - ItemList.Automation_SuperBuffer_ULV.set(new GT_MetaTileEntity_SuperBuffer(9300, "automation.superbuffer.tier.00", "Ultra Low Voltage Super Buffer", 0).getStackForm(1L)); - ItemList.Automation_SuperBuffer_LV.set(new GT_MetaTileEntity_SuperBuffer(9301, "automation.superbuffer.tier.01", "Low Voltage Super Buffer", 1).getStackForm(1L)); - ItemList.Automation_SuperBuffer_MV.set(new GT_MetaTileEntity_SuperBuffer(9302, "automation.superbuffer.tier.02", "Medium Voltage Super Buffer", 2).getStackForm(1L)); - ItemList.Automation_SuperBuffer_HV.set(new GT_MetaTileEntity_SuperBuffer(9303, "automation.superbuffer.tier.03", "High Voltage Super Buffer", 3).getStackForm(1L)); - ItemList.Automation_SuperBuffer_EV.set(new GT_MetaTileEntity_SuperBuffer(9304, "automation.superbuffer.tier.04", "Extreme Voltage Super Buffer", 4).getStackForm(1L)); - ItemList.Automation_SuperBuffer_IV.set(new GT_MetaTileEntity_SuperBuffer(9305, "automation.superbuffer.tier.05", "Insane Voltage Super Buffer", 5).getStackForm(1L)); - ItemList.Automation_SuperBuffer_LuV.set(new GT_MetaTileEntity_SuperBuffer(9306, "automation.superbuffer.tier.06", "Ludicrous Voltage Super Buffer", 6).getStackForm(1L)); - ItemList.Automation_SuperBuffer_ZPM.set(new GT_MetaTileEntity_SuperBuffer(9307, "automation.superbuffer.tier.07", "ZPM Voltage Super Buffer", 7).getStackForm(1L)); - ItemList.Automation_SuperBuffer_UV.set(new GT_MetaTileEntity_SuperBuffer(9308, "automation.superbuffer.tier.08", "Ultimate Voltage Super Buffer", 8).getStackForm(1L)); - ItemList.Automation_SuperBuffer_MAX.set(new GT_MetaTileEntity_SuperBuffer(9309, "automation.superbuffer.tier.09", "Highly Ultimate Voltage Super Buffer", 9).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_ULV.get(1L), bits, new Object[]{"DMV", 'M', ItemList.Automation_ChestBuffer_ULV, 'V', ItemList.Conveyor_Module_LV, 'D', ItemList.Tool_DataOrb}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_LV.get(1L), bits, new Object[]{"DMV", 'M', ItemList.Automation_ChestBuffer_LV, 'V', ItemList.Conveyor_Module_LV, 'D', ItemList.Tool_DataOrb}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_MV.get(1L), bits, new Object[]{"DMV", 'M', ItemList.Automation_ChestBuffer_MV, 'V', ItemList.Conveyor_Module_MV, 'D', ItemList.Tool_DataOrb}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_HV.get(1L), bits, new Object[]{"DMV", 'M', ItemList.Automation_ChestBuffer_HV, 'V', ItemList.Conveyor_Module_HV, 'D', ItemList.Tool_DataOrb}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_EV.get(1L), bits, new Object[]{"DMV", 'M', ItemList.Automation_ChestBuffer_EV, 'V', ItemList.Conveyor_Module_EV, 'D', ItemList.Tool_DataOrb}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_IV.get(1L), bits, new Object[]{"DMV", 'M', ItemList.Automation_ChestBuffer_IV, 'V', ItemList.Conveyor_Module_IV, 'D', ItemList.Tool_DataOrb}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_LuV.get(1L), bits, new Object[]{"DMV", 'M', ItemList.Automation_ChestBuffer_LuV, 'V', ItemList.Conveyor_Module_LuV, 'D', ItemList.Tool_DataOrb}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_ZPM.get(1L), bits, new Object[]{"DMV", 'M', ItemList.Automation_ChestBuffer_ZPM, 'V', ItemList.Conveyor_Module_ZPM, 'D', ItemList.Tool_DataOrb}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_UV.get(1L), bits, new Object[]{"DMV", 'M', ItemList.Automation_ChestBuffer_UV, 'V', ItemList.Conveyor_Module_UV, 'D', ItemList.Tool_DataOrb}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_MAX.get(1L), bits, new Object[]{"DMV", 'M', ItemList.Automation_ChestBuffer_MAX, 'V', ItemList.Conveyor_Module_UHV, 'D', ItemList.Tool_DataOrb}); - - GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_ULV.get(1L), bits, new Object[]{"DMV", "DDD", 'M', ItemList.Hull_ULV, 'V', ItemList.Conveyor_Module_LV, 'D', ItemList.Tool_DataStick}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_LV.get(1L), bits, new Object[]{"DMV", "DDD", 'M', ItemList.Hull_LV, 'V', ItemList.Conveyor_Module_LV, 'D', ItemList.Tool_DataStick}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_MV.get(1L), bits, new Object[]{"DMV", "DDD", 'M', ItemList.Hull_MV, 'V', ItemList.Conveyor_Module_MV, 'D', ItemList.Tool_DataStick}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_HV.get(1L), bits, new Object[]{"DMV", "DDD", 'M', ItemList.Hull_HV, 'V', ItemList.Conveyor_Module_HV, 'D', ItemList.Tool_DataStick}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_EV.get(1L), bits, new Object[]{"DMV", "DDD", 'M', ItemList.Hull_EV, 'V', ItemList.Conveyor_Module_EV, 'D', ItemList.Tool_DataStick}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_IV.get(1L), bits, new Object[]{"DMV", "DDD", 'M', ItemList.Hull_IV, 'V', ItemList.Conveyor_Module_IV, 'D', ItemList.Tool_DataStick}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_LuV.get(1L), bits, new Object[]{"DMV", "DDD", 'M', ItemList.Hull_LuV, 'V', ItemList.Conveyor_Module_LuV, 'D', ItemList.Tool_DataStick}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_ZPM.get(1L), bits, new Object[]{"DMV", "DDD", 'M', ItemList.Hull_ZPM, 'V', ItemList.Conveyor_Module_ZPM, 'D', ItemList.Tool_DataStick}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_UV.get(1L), bits, new Object[]{"DMV", "DDD", 'M', ItemList.Hull_UV, 'V', ItemList.Conveyor_Module_UV, 'D', ItemList.Tool_DataStick}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_MAX.get(1L), bits, new Object[]{"DMV", "DDD", 'M', ItemList.Hull_MAX, 'V', ItemList.Conveyor_Module_UHV, 'D', ItemList.Tool_DataStick}); - - ItemList.Automation_ItemDistributor_ULV.set(new GT_MetaTileEntity_ItemDistributor(9320, "automation.itemdistributor.tier.00", "Ultra Low Voltage Item Distributor", 0).getStackForm(1L)); - ItemList.Automation_ItemDistributor_LV.set(new GT_MetaTileEntity_ItemDistributor(9321, "automation.itemdistributor.tier.01", "Low Voltage Item Distributor", 1).getStackForm(1L)); - ItemList.Automation_ItemDistributor_MV.set(new GT_MetaTileEntity_ItemDistributor(9322, "automation.itemdistributor.tier.02", "Medium Voltage Item Distributor", 2).getStackForm(1L)); - ItemList.Automation_ItemDistributor_HV.set(new GT_MetaTileEntity_ItemDistributor(9323, "automation.itemdistributor.tier.03", "High Voltage Item Distributor", 3).getStackForm(1L)); - ItemList.Automation_ItemDistributor_EV.set(new GT_MetaTileEntity_ItemDistributor(9324, "automation.itemdistributor.tier.04", "Extreme Voltage Item Distributor", 4).getStackForm(1L)); - ItemList.Automation_ItemDistributor_IV.set(new GT_MetaTileEntity_ItemDistributor(9325, "automation.itemdistributor.tier.05", "Insane Voltage Item Distributor", 5).getStackForm(1L)); - ItemList.Automation_ItemDistributor_LuV.set(new GT_MetaTileEntity_ItemDistributor(9326, "automation.itemdistributor.tier.06", "Ludicrous Voltage Item Distributor", 6).getStackForm(1L)); - ItemList.Automation_ItemDistributor_ZPM.set(new GT_MetaTileEntity_ItemDistributor(9327, "automation.itemdistributor.tier.07", "ZPM Voltage Item Distributor", 7).getStackForm(1L)); - ItemList.Automation_ItemDistributor_UV.set(new GT_MetaTileEntity_ItemDistributor(9328, "automation.itemdistributor.tier.08", "Ultimate Voltage Item Distributor", 8).getStackForm(1L)); - ItemList.Automation_ItemDistributor_MAX.set(new GT_MetaTileEntity_ItemDistributor(9329, "automation.itemdistributor.tier.09", "MAX Voltage Item Distributor", 9).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_ULV.get(1L), bits, new Object[]{"XCX", "VMV", " V ", 'M', ItemList.Hull_ULV, 'V', ItemList.Conveyor_Module_LV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_LV.get(1L), bits, new Object[]{"XCX", "VMV", " V ", 'M', ItemList.Hull_LV, 'V', ItemList.Conveyor_Module_LV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_MV.get(1L), bits, new Object[]{"XCX", "VMV", " V ", 'M', ItemList.Hull_MV, 'V', ItemList.Conveyor_Module_MV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_HV.get(1L), bits, new Object[]{"XCX", "VMV", " V ", 'M', ItemList.Hull_HV, 'V', ItemList.Conveyor_Module_HV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_EV.get(1L), bits, new Object[]{"XCX", "VMV", " V ", 'M', ItemList.Hull_EV, 'V', ItemList.Conveyor_Module_EV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_IV.get(1L), bits, new Object[]{"XCX", "VMV", " V ", 'M', ItemList.Hull_IV, 'V', ItemList.Conveyor_Module_IV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_LuV.get(1L), bits, new Object[]{"XCX", "VMV", " V ", 'M', ItemList.Hull_LuV, 'V', ItemList.Conveyor_Module_LuV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_ZPM.get(1L), bits, new Object[]{"XCX", "VMV", " V ", 'M', ItemList.Hull_ZPM, 'V', ItemList.Conveyor_Module_ZPM, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_UV.get(1L), bits, new Object[]{"XCX", "VMV", " V ", 'M', ItemList.Hull_UV, 'V', ItemList.Conveyor_Module_UV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_MAX.get(1L), bits, new Object[]{"XCX", "VMV", " V ", 'M', ItemList.Hull_MAX, 'V', ItemList.Conveyor_Module_UHV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - - ItemList.Automation_RecipeFilter_ULV.set(new GT_MetaTileEntity_RecipeFilter(9330, "automation.recipefilter.tier.00", "Ultra Low Voltage Recipe Filter", 0).getStackForm(1L)); - ItemList.Automation_RecipeFilter_LV.set(new GT_MetaTileEntity_RecipeFilter(9331, "automation.recipefilter.tier.01", "Low Voltage Recipe Filter", 1).getStackForm(1L)); - ItemList.Automation_RecipeFilter_MV.set(new GT_MetaTileEntity_RecipeFilter(9332, "automation.recipefilter.tier.02", "Medium Voltage Recipe Filter", 2).getStackForm(1L)); - ItemList.Automation_RecipeFilter_HV.set(new GT_MetaTileEntity_RecipeFilter(9333, "automation.recipefilter.tier.03", "High Voltage Recipe Filter", 3).getStackForm(1L)); - ItemList.Automation_RecipeFilter_EV.set(new GT_MetaTileEntity_RecipeFilter(9334, "automation.recipefilter.tier.04", "Extreme Voltage Recipe Filter", 4).getStackForm(1L)); - ItemList.Automation_RecipeFilter_IV.set(new GT_MetaTileEntity_RecipeFilter(9335, "automation.recipefilter.tier.05", "Insane Voltage Recipe Filter", 5).getStackForm(1L)); - ItemList.Automation_RecipeFilter_LuV.set(new GT_MetaTileEntity_RecipeFilter(9336, "automation.recipefilter.tier.06", "Ludicrous Voltage Recipe Filter", 6).getStackForm(1L)); - ItemList.Automation_RecipeFilter_ZPM.set(new GT_MetaTileEntity_RecipeFilter(9337, "automation.recipefilter.tier.07", "ZPM Voltage Recipe Filter", 7).getStackForm(1L)); - ItemList.Automation_RecipeFilter_UV.set(new GT_MetaTileEntity_RecipeFilter(9338, "automation.recipefilter.tier.08", "Ultimate Voltage Recipe Filter", 8).getStackForm(1L)); - ItemList.Automation_RecipeFilter_MAX.set(new GT_MetaTileEntity_RecipeFilter(9339, "automation.recipefilter.tier.09", "Highly Ultimate Voltage Recipe Filter", 9).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(ItemList.Automation_RecipeFilter_ULV.get(1L), bits, new Object[]{" F ", "VMC", " X ", 'M', ItemList.Hull_ULV, 'V', ItemList.Robot_Arm_LV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_RecipeFilter_LV.get(1L), bits, new Object[]{" F ", "VMC", " X ", 'M', ItemList.Hull_LV, 'V', ItemList.Robot_Arm_LV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_RecipeFilter_MV.get(1L), bits, new Object[]{" F ", "VMC", " X ", 'M', ItemList.Hull_MV, 'V', ItemList.Robot_Arm_MV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_RecipeFilter_HV.get(1L), bits, new Object[]{" F ", "VMC", " X ", 'M', ItemList.Hull_HV, 'V', ItemList.Robot_Arm_HV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_RecipeFilter_EV.get(1L), bits, new Object[]{" F ", "VMC", " X ", 'M', ItemList.Hull_EV, 'V', ItemList.Robot_Arm_EV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_RecipeFilter_IV.get(1L), bits, new Object[]{" F ", "VMC", " X ", 'M', ItemList.Hull_IV, 'V', ItemList.Robot_Arm_IV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_RecipeFilter_LuV.get(1L), bits, new Object[]{" F ", "VMC", " X ", 'M', ItemList.Hull_LuV, 'V', ItemList.Robot_Arm_LuV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_RecipeFilter_ZPM.get(1L), bits, new Object[]{" F ", "VMC", " X ", 'M', ItemList.Hull_ZPM, 'V', ItemList.Robot_Arm_ZPM, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_RecipeFilter_UV.get(1L), bits, new Object[]{" F ", "VMC", " X ", 'M', ItemList.Hull_UV, 'V', ItemList.Robot_Arm_UV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_RecipeFilter_MAX.get(1L), bits, new Object[]{" F ", "VMC", " X ", 'M', ItemList.Hull_MAX, 'V', ItemList.Robot_Arm_UHV, 'C', OreDictNames.craftingChest, 'F', OreDictNames.craftingFilter, 'X', OrePrefixes.circuit.get(Materials.Basic)}); + ItemList.Automation_ChestBuffer_ULV.set(new GT_MetaTileEntity_ChestBuffer( + 9230, "automation.chestbuffer.tier.00", "Ultra Low Voltage Chest Buffer", 0) + .getStackForm(1L)); + ItemList.Automation_ChestBuffer_LV.set( + new GT_MetaTileEntity_ChestBuffer(9231, "automation.chestbuffer.tier.01", "Low Voltage Chest Buffer", 1) + .getStackForm(1L)); + ItemList.Automation_ChestBuffer_MV.set(new GT_MetaTileEntity_ChestBuffer( + 9232, "automation.chestbuffer.tier.02", "Medium Voltage Chest Buffer", 2) + .getStackForm(1L)); + ItemList.Automation_ChestBuffer_HV.set(new GT_MetaTileEntity_ChestBuffer( + 9233, "automation.chestbuffer.tier.03", "High Voltage Chest Buffer", 3) + .getStackForm(1L)); + ItemList.Automation_ChestBuffer_EV.set(new GT_MetaTileEntity_ChestBuffer( + 9234, "automation.chestbuffer.tier.04", "Extreme Voltage Chest Buffer", 4) + .getStackForm(1L)); + ItemList.Automation_ChestBuffer_IV.set(new GT_MetaTileEntity_ChestBuffer( + 9235, "automation.chestbuffer.tier.05", "Insane Voltage Chest Buffer", 5) + .getStackForm(1L)); + ItemList.Automation_ChestBuffer_LuV.set(new GT_MetaTileEntity_ChestBuffer( + 9236, "automation.chestbuffer.tier.06", "Ludicrous Voltage Chest Buffer", 6) + .getStackForm(1L)); + ItemList.Automation_ChestBuffer_ZPM.set( + new GT_MetaTileEntity_ChestBuffer(9237, "automation.chestbuffer.tier.07", "ZPM Voltage Chest Buffer", 7) + .getStackForm(1L)); + ItemList.Automation_ChestBuffer_UV.set(new GT_MetaTileEntity_ChestBuffer( + 9238, "automation.chestbuffer.tier.08", "Ultimate Voltage Chest Buffer", 8) + .getStackForm(1L)); + ItemList.Automation_ChestBuffer_MAX.set(new GT_MetaTileEntity_ChestBuffer( + 9239, "automation.chestbuffer.tier.09", "Highly Ultimate Voltage Chest Buffer", 9) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Automation_ChestBuffer_ULV.get(1L), bits, new Object[] { + "CMV", + " X ", + 'M', + ItemList.Hull_ULV, + 'V', + ItemList.Conveyor_Module_LV, + 'C', + OreDictNames.craftingChest, + 'X', + OrePrefixes.circuit.get(Materials.Primitive) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_ChestBuffer_LV.get(1L), bits, new Object[] { + "CMV", + " X ", + 'M', + ItemList.Hull_LV, + 'V', + ItemList.Conveyor_Module_LV, + 'C', + OreDictNames.craftingChest, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_ChestBuffer_MV.get(1L), bits, new Object[] { + "CMV", + " X ", + 'M', + ItemList.Hull_MV, + 'V', + ItemList.Conveyor_Module_MV, + 'C', + OreDictNames.craftingChest, + 'X', + OrePrefixes.circuit.get(Materials.Good) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_ChestBuffer_HV.get(1L), bits, new Object[] { + "CMV", + " X ", + 'M', + ItemList.Hull_HV, + 'V', + ItemList.Conveyor_Module_HV, + 'C', + OreDictNames.craftingChest, + 'X', + OrePrefixes.circuit.get(Materials.Advanced) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_ChestBuffer_EV.get(1L), bits, new Object[] { + "CMV", + " X ", + 'M', + ItemList.Hull_EV, + 'V', + ItemList.Conveyor_Module_EV, + 'C', + OreDictNames.craftingChest, + 'X', + OrePrefixes.circuit.get(Materials.Data) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_ChestBuffer_IV.get(1L), bits, new Object[] { + "CMV", + " X ", + 'M', + ItemList.Hull_IV, + 'V', + ItemList.Conveyor_Module_IV, + 'C', + OreDictNames.craftingChest, + 'X', + OrePrefixes.circuit.get(Materials.Elite) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_ChestBuffer_LuV.get(1L), bits, new Object[] { + "CMV", + " X ", + 'M', + ItemList.Hull_LuV, + 'V', + ItemList.Conveyor_Module_LuV, + 'C', + OreDictNames.craftingChest, + 'X', + OrePrefixes.circuit.get(Materials.Master) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_ChestBuffer_ZPM.get(1L), bits, new Object[] { + "CMV", + " X ", + 'M', + ItemList.Hull_ZPM, + 'V', + ItemList.Conveyor_Module_ZPM, + 'C', + OreDictNames.craftingChest, + 'X', + OrePrefixes.circuit.get(Materials.Ultimate) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_ChestBuffer_UV.get(1L), bits, new Object[] { + "CMV", + " X ", + 'M', + ItemList.Hull_UV, + 'V', + ItemList.Conveyor_Module_UV, + 'C', + OreDictNames.craftingChest, + 'X', + OrePrefixes.circuit.get(Materials.SuperconductorUHV) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_ChestBuffer_MAX.get(1L), bits, new Object[] { + "CMV", + " X ", + 'M', + ItemList.Hull_MAX, + 'V', + ItemList.Conveyor_Module_UHV, + 'C', + OreDictNames.craftingChest, + 'X', + OrePrefixes.circuit.get(Materials.Infinite) + }); + + ItemList.Automation_Filter_ULV.set( + new GT_MetaTileEntity_Filter(9240, "automation.filter.tier.00", "Ultra Low Voltage Item Filter", 0) + .getStackForm(1L)); + ItemList.Automation_Filter_LV.set( + new GT_MetaTileEntity_Filter(9241, "automation.filter.tier.01", "Low Voltage Item Filter", 1) + .getStackForm(1L)); + ItemList.Automation_Filter_MV.set( + new GT_MetaTileEntity_Filter(9242, "automation.filter.tier.02", "Medium Voltage Item Filter", 2) + .getStackForm(1L)); + ItemList.Automation_Filter_HV.set( + new GT_MetaTileEntity_Filter(9243, "automation.filter.tier.03", "High Voltage Item Filter", 3) + .getStackForm(1L)); + ItemList.Automation_Filter_EV.set( + new GT_MetaTileEntity_Filter(9244, "automation.filter.tier.04", "Extreme Voltage Item Filter", 4) + .getStackForm(1L)); + ItemList.Automation_Filter_IV.set( + new GT_MetaTileEntity_Filter(9245, "automation.filter.tier.05", "Insane Voltage Item Filter", 5) + .getStackForm(1L)); + ItemList.Automation_Filter_LuV.set( + new GT_MetaTileEntity_Filter(9246, "automation.filter.tier.06", "Ludicrous Voltage Item Filter", 6) + .getStackForm(1L)); + ItemList.Automation_Filter_ZPM.set( + new GT_MetaTileEntity_Filter(9247, "automation.filter.tier.07", "ZPM Voltage Item Filter", 7) + .getStackForm(1L)); + ItemList.Automation_Filter_UV.set( + new GT_MetaTileEntity_Filter(9248, "automation.filter.tier.08", "Ultimate Voltage Item Filter", 8) + .getStackForm(1L)); + ItemList.Automation_Filter_MAX.set(new GT_MetaTileEntity_Filter( + 9249, "automation.filter.tier.09", "Highly Ultimate Voltage Item Filter", 9) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Automation_Filter_ULV.get(1L), bits, new Object[] { + " F ", + "CMV", + " X ", + 'M', + ItemList.Hull_ULV, + 'V', + ItemList.Conveyor_Module_LV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_Filter_LV.get(1L), bits, new Object[] { + " F ", + "CMV", + " X ", + 'M', + ItemList.Hull_LV, + 'V', + ItemList.Conveyor_Module_LV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_Filter_MV.get(1L), bits, new Object[] { + " F ", + "CMV", + " X ", + 'M', + ItemList.Hull_MV, + 'V', + ItemList.Conveyor_Module_MV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_Filter_HV.get(1L), bits, new Object[] { + " F ", + "CMV", + " X ", + 'M', + ItemList.Hull_HV, + 'V', + ItemList.Conveyor_Module_HV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_Filter_EV.get(1L), bits, new Object[] { + " F ", + "CMV", + " X ", + 'M', + ItemList.Hull_EV, + 'V', + ItemList.Conveyor_Module_EV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_Filter_IV.get(1L), bits, new Object[] { + " F ", + "CMV", + " X ", + 'M', + ItemList.Hull_IV, + 'V', + ItemList.Conveyor_Module_IV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_Filter_LuV.get(1L), bits, new Object[] { + " F ", + "CMV", + " X ", + 'M', + ItemList.Hull_LuV, + 'V', + ItemList.Conveyor_Module_LuV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_Filter_ZPM.get(1L), bits, new Object[] { + " F ", + "CMV", + " X ", + 'M', + ItemList.Hull_ZPM, + 'V', + ItemList.Conveyor_Module_ZPM, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_Filter_UV.get(1L), bits, new Object[] { + " F ", + "CMV", + " X ", + 'M', + ItemList.Hull_UV, + 'V', + ItemList.Conveyor_Module_UV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_Filter_MAX.get(1L), bits, new Object[] { + " F ", + "CMV", + " X ", + 'M', + ItemList.Hull_MAX, + 'V', + ItemList.Conveyor_Module_UHV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + + ItemList.Automation_TypeFilter_ULV.set(new GT_MetaTileEntity_TypeFilter( + 9250, "automation.typefilter.tier.00", "Ultra Low Voltage Type Filter", 0) + .getStackForm(1L)); + ItemList.Automation_TypeFilter_LV.set( + new GT_MetaTileEntity_TypeFilter(9251, "automation.typefilter.tier.01", "Low Voltage Type Filter", 1) + .getStackForm(1L)); + ItemList.Automation_TypeFilter_MV.set( + new GT_MetaTileEntity_TypeFilter(9252, "automation.typefilter.tier.02", "Medium Voltage Type Filter", 2) + .getStackForm(1L)); + ItemList.Automation_TypeFilter_HV.set( + new GT_MetaTileEntity_TypeFilter(9253, "automation.typefilter.tier.03", "High Voltage Type Filter", 3) + .getStackForm(1L)); + ItemList.Automation_TypeFilter_EV.set(new GT_MetaTileEntity_TypeFilter( + 9254, "automation.typefilter.tier.04", "Extreme Voltage Type Filter", 4) + .getStackForm(1L)); + ItemList.Automation_TypeFilter_IV.set( + new GT_MetaTileEntity_TypeFilter(9255, "automation.typefilter.tier.05", "Insane Voltage Type Filter", 5) + .getStackForm(1L)); + ItemList.Automation_TypeFilter_LuV.set(new GT_MetaTileEntity_TypeFilter( + 9256, "automation.typefilter.tier.06", "Ludicrous Voltage Type Filter", 6) + .getStackForm(1L)); + ItemList.Automation_TypeFilter_ZPM.set( + new GT_MetaTileEntity_TypeFilter(9257, "automation.typefilter.tier.07", "ZPM Voltage Type Filter", 7) + .getStackForm(1L)); + ItemList.Automation_TypeFilter_UV.set(new GT_MetaTileEntity_TypeFilter( + 9258, "automation.typefilter.tier.08", "Ultimate Voltage Type Filter", 8) + .getStackForm(1L)); + ItemList.Automation_TypeFilter_MAX.set(new GT_MetaTileEntity_TypeFilter( + 9259, "automation.typefilter.tier.09", "Highly Ultimate Voltage Type Filter", 9) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Automation_TypeFilter_ULV.get(1L), bits, new Object[] { + " F ", + "VMC", + " X ", + 'M', + ItemList.Hull_ULV, + 'V', + ItemList.Conveyor_Module_LV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_TypeFilter_LV.get(1L), bits, new Object[] { + " F ", + "VMC", + " X ", + 'M', + ItemList.Hull_LV, + 'V', + ItemList.Conveyor_Module_LV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_TypeFilter_MV.get(1L), bits, new Object[] { + " F ", + "VMC", + " X ", + 'M', + ItemList.Hull_MV, + 'V', + ItemList.Conveyor_Module_MV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_TypeFilter_HV.get(1L), bits, new Object[] { + " F ", + "VMC", + " X ", + 'M', + ItemList.Hull_HV, + 'V', + ItemList.Conveyor_Module_HV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_TypeFilter_EV.get(1L), bits, new Object[] { + " F ", + "VMC", + " X ", + 'M', + ItemList.Hull_EV, + 'V', + ItemList.Conveyor_Module_EV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_TypeFilter_IV.get(1L), bits, new Object[] { + " F ", + "VMC", + " X ", + 'M', + ItemList.Hull_IV, + 'V', + ItemList.Conveyor_Module_IV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_TypeFilter_LuV.get(1L), bits, new Object[] { + " F ", + "VMC", + " X ", + 'M', + ItemList.Hull_LuV, + 'V', + ItemList.Conveyor_Module_LuV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_TypeFilter_ZPM.get(1L), bits, new Object[] { + " F ", + "VMC", + " X ", + 'M', + ItemList.Hull_ZPM, + 'V', + ItemList.Conveyor_Module_ZPM, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_TypeFilter_UV.get(1L), bits, new Object[] { + " F ", + "VMC", + " X ", + 'M', + ItemList.Hull_UV, + 'V', + ItemList.Conveyor_Module_UV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_TypeFilter_MAX.get(1L), bits, new Object[] { + " F ", + "VMC", + " X ", + 'M', + ItemList.Hull_MAX, + 'V', + ItemList.Conveyor_Module_UHV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + + ItemList.Automation_Regulator_ULV.set( + new GT_MetaTileEntity_Regulator(9270, "automation.regulator.tier.00", "Ultra Low Voltage Regulator", 0) + .getStackForm(1L)); + ItemList.Automation_Regulator_LV.set( + new GT_MetaTileEntity_Regulator(9271, "automation.regulator.tier.01", "Low Voltage Regulator", 1) + .getStackForm(1L)); + ItemList.Automation_Regulator_MV.set( + new GT_MetaTileEntity_Regulator(9272, "automation.regulator.tier.02", "Medium Voltage Regulator", 2) + .getStackForm(1L)); + ItemList.Automation_Regulator_HV.set( + new GT_MetaTileEntity_Regulator(9273, "automation.regulator.tier.03", "High Voltage Regulator", 3) + .getStackForm(1L)); + ItemList.Automation_Regulator_EV.set( + new GT_MetaTileEntity_Regulator(9274, "automation.regulator.tier.04", "Extreme Voltage Regulator", 4) + .getStackForm(1L)); + ItemList.Automation_Regulator_IV.set( + new GT_MetaTileEntity_Regulator(9275, "automation.regulator.tier.05", "Insane Voltage Regulator", 5) + .getStackForm(1L)); + ItemList.Automation_Regulator_LuV.set( + new GT_MetaTileEntity_Regulator(9276, "automation.regulator.tier.06", "Ludicrous Voltage Regulator", 6) + .getStackForm(1L)); + ItemList.Automation_Regulator_ZPM.set( + new GT_MetaTileEntity_Regulator(9277, "automation.regulator.tier.07", "ZPM Voltage Regulator", 7) + .getStackForm(1L)); + ItemList.Automation_Regulator_UV.set( + new GT_MetaTileEntity_Regulator(9278, "automation.regulator.tier.08", "Ultimate Voltage Regulator", 8) + .getStackForm(1L)); + ItemList.Automation_Regulator_MAX.set(new GT_MetaTileEntity_Regulator( + 9279, "automation.regulator.tier.09", "Highly Ultimate Voltage Regulator", 9) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Automation_Regulator_ULV.get(1L), bits, new Object[] { + "XFX", + "VMV", + "XCX", + 'M', + ItemList.Hull_ULV, + 'V', + ItemList.Robot_Arm_LV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_Regulator_LV.get(1L), bits, new Object[] { + "XFX", + "VMV", + "XCX", + 'M', + ItemList.Hull_LV, + 'V', + ItemList.Robot_Arm_LV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_Regulator_MV.get(1L), bits, new Object[] { + "XFX", + "VMV", + "XCX", + 'M', + ItemList.Hull_MV, + 'V', + ItemList.Robot_Arm_MV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_Regulator_HV.get(1L), bits, new Object[] { + "XFX", + "VMV", + "XCX", + 'M', + ItemList.Hull_HV, + 'V', + ItemList.Robot_Arm_HV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_Regulator_EV.get(1L), bits, new Object[] { + "XFX", + "VMV", + "XCX", + 'M', + ItemList.Hull_EV, + 'V', + ItemList.Robot_Arm_EV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_Regulator_IV.get(1L), bits, new Object[] { + "XFX", + "VMV", + "XCX", + 'M', + ItemList.Hull_IV, + 'V', + ItemList.Robot_Arm_IV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_Regulator_LuV.get(1L), bits, new Object[] { + "XFX", + "VMV", + "XCX", + 'M', + ItemList.Hull_LuV, + 'V', + ItemList.Robot_Arm_LuV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_Regulator_ZPM.get(1L), bits, new Object[] { + "XFX", + "VMV", + "XCX", + 'M', + ItemList.Hull_ZPM, + 'V', + ItemList.Robot_Arm_ZPM, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_Regulator_UV.get(1L), bits, new Object[] { + "XFX", + "VMV", + "XCX", + 'M', + ItemList.Hull_UV, + 'V', + ItemList.Robot_Arm_UV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_Regulator_MAX.get(1L), bits, new Object[] { + "XFX", + "VMV", + "XCX", + 'M', + ItemList.Hull_MAX, + 'V', + ItemList.Robot_Arm_UHV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + + ItemList.Automation_SuperBuffer_ULV.set(new GT_MetaTileEntity_SuperBuffer( + 9300, "automation.superbuffer.tier.00", "Ultra Low Voltage Super Buffer", 0) + .getStackForm(1L)); + ItemList.Automation_SuperBuffer_LV.set( + new GT_MetaTileEntity_SuperBuffer(9301, "automation.superbuffer.tier.01", "Low Voltage Super Buffer", 1) + .getStackForm(1L)); + ItemList.Automation_SuperBuffer_MV.set(new GT_MetaTileEntity_SuperBuffer( + 9302, "automation.superbuffer.tier.02", "Medium Voltage Super Buffer", 2) + .getStackForm(1L)); + ItemList.Automation_SuperBuffer_HV.set(new GT_MetaTileEntity_SuperBuffer( + 9303, "automation.superbuffer.tier.03", "High Voltage Super Buffer", 3) + .getStackForm(1L)); + ItemList.Automation_SuperBuffer_EV.set(new GT_MetaTileEntity_SuperBuffer( + 9304, "automation.superbuffer.tier.04", "Extreme Voltage Super Buffer", 4) + .getStackForm(1L)); + ItemList.Automation_SuperBuffer_IV.set(new GT_MetaTileEntity_SuperBuffer( + 9305, "automation.superbuffer.tier.05", "Insane Voltage Super Buffer", 5) + .getStackForm(1L)); + ItemList.Automation_SuperBuffer_LuV.set(new GT_MetaTileEntity_SuperBuffer( + 9306, "automation.superbuffer.tier.06", "Ludicrous Voltage Super Buffer", 6) + .getStackForm(1L)); + ItemList.Automation_SuperBuffer_ZPM.set( + new GT_MetaTileEntity_SuperBuffer(9307, "automation.superbuffer.tier.07", "ZPM Voltage Super Buffer", 7) + .getStackForm(1L)); + ItemList.Automation_SuperBuffer_UV.set(new GT_MetaTileEntity_SuperBuffer( + 9308, "automation.superbuffer.tier.08", "Ultimate Voltage Super Buffer", 8) + .getStackForm(1L)); + ItemList.Automation_SuperBuffer_MAX.set(new GT_MetaTileEntity_SuperBuffer( + 9309, "automation.superbuffer.tier.09", "Highly Ultimate Voltage Super Buffer", 9) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_ULV.get(1L), bits, new Object[] { + "DMV", + 'M', + ItemList.Automation_ChestBuffer_ULV, + 'V', + ItemList.Conveyor_Module_LV, + 'D', + ItemList.Tool_DataOrb + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_LV.get(1L), bits, new Object[] { + "DMV", 'M', ItemList.Automation_ChestBuffer_LV, 'V', ItemList.Conveyor_Module_LV, 'D', ItemList.Tool_DataOrb + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_MV.get(1L), bits, new Object[] { + "DMV", 'M', ItemList.Automation_ChestBuffer_MV, 'V', ItemList.Conveyor_Module_MV, 'D', ItemList.Tool_DataOrb + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_HV.get(1L), bits, new Object[] { + "DMV", 'M', ItemList.Automation_ChestBuffer_HV, 'V', ItemList.Conveyor_Module_HV, 'D', ItemList.Tool_DataOrb + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_EV.get(1L), bits, new Object[] { + "DMV", 'M', ItemList.Automation_ChestBuffer_EV, 'V', ItemList.Conveyor_Module_EV, 'D', ItemList.Tool_DataOrb + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_IV.get(1L), bits, new Object[] { + "DMV", 'M', ItemList.Automation_ChestBuffer_IV, 'V', ItemList.Conveyor_Module_IV, 'D', ItemList.Tool_DataOrb + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_LuV.get(1L), bits, new Object[] { + "DMV", + 'M', + ItemList.Automation_ChestBuffer_LuV, + 'V', + ItemList.Conveyor_Module_LuV, + 'D', + ItemList.Tool_DataOrb + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_ZPM.get(1L), bits, new Object[] { + "DMV", + 'M', + ItemList.Automation_ChestBuffer_ZPM, + 'V', + ItemList.Conveyor_Module_ZPM, + 'D', + ItemList.Tool_DataOrb + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_UV.get(1L), bits, new Object[] { + "DMV", 'M', ItemList.Automation_ChestBuffer_UV, 'V', ItemList.Conveyor_Module_UV, 'D', ItemList.Tool_DataOrb + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_MAX.get(1L), bits, new Object[] { + "DMV", + 'M', + ItemList.Automation_ChestBuffer_MAX, + 'V', + ItemList.Conveyor_Module_UHV, + 'D', + ItemList.Tool_DataOrb + }); + + GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_ULV.get(1L), bits, new Object[] { + "DMV", "DDD", 'M', ItemList.Hull_ULV, 'V', ItemList.Conveyor_Module_LV, 'D', ItemList.Tool_DataStick + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_LV.get(1L), bits, new Object[] { + "DMV", "DDD", 'M', ItemList.Hull_LV, 'V', ItemList.Conveyor_Module_LV, 'D', ItemList.Tool_DataStick + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_MV.get(1L), bits, new Object[] { + "DMV", "DDD", 'M', ItemList.Hull_MV, 'V', ItemList.Conveyor_Module_MV, 'D', ItemList.Tool_DataStick + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_HV.get(1L), bits, new Object[] { + "DMV", "DDD", 'M', ItemList.Hull_HV, 'V', ItemList.Conveyor_Module_HV, 'D', ItemList.Tool_DataStick + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_EV.get(1L), bits, new Object[] { + "DMV", "DDD", 'M', ItemList.Hull_EV, 'V', ItemList.Conveyor_Module_EV, 'D', ItemList.Tool_DataStick + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_IV.get(1L), bits, new Object[] { + "DMV", "DDD", 'M', ItemList.Hull_IV, 'V', ItemList.Conveyor_Module_IV, 'D', ItemList.Tool_DataStick + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_LuV.get(1L), bits, new Object[] { + "DMV", "DDD", 'M', ItemList.Hull_LuV, 'V', ItemList.Conveyor_Module_LuV, 'D', ItemList.Tool_DataStick + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_ZPM.get(1L), bits, new Object[] { + "DMV", "DDD", 'M', ItemList.Hull_ZPM, 'V', ItemList.Conveyor_Module_ZPM, 'D', ItemList.Tool_DataStick + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_UV.get(1L), bits, new Object[] { + "DMV", "DDD", 'M', ItemList.Hull_UV, 'V', ItemList.Conveyor_Module_UV, 'D', ItemList.Tool_DataStick + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_SuperBuffer_MAX.get(1L), bits, new Object[] { + "DMV", "DDD", 'M', ItemList.Hull_MAX, 'V', ItemList.Conveyor_Module_UHV, 'D', ItemList.Tool_DataStick + }); + + ItemList.Automation_ItemDistributor_ULV.set(new GT_MetaTileEntity_ItemDistributor( + 9320, "automation.itemdistributor.tier.00", "Ultra Low Voltage Item Distributor", 0) + .getStackForm(1L)); + ItemList.Automation_ItemDistributor_LV.set(new GT_MetaTileEntity_ItemDistributor( + 9321, "automation.itemdistributor.tier.01", "Low Voltage Item Distributor", 1) + .getStackForm(1L)); + ItemList.Automation_ItemDistributor_MV.set(new GT_MetaTileEntity_ItemDistributor( + 9322, "automation.itemdistributor.tier.02", "Medium Voltage Item Distributor", 2) + .getStackForm(1L)); + ItemList.Automation_ItemDistributor_HV.set(new GT_MetaTileEntity_ItemDistributor( + 9323, "automation.itemdistributor.tier.03", "High Voltage Item Distributor", 3) + .getStackForm(1L)); + ItemList.Automation_ItemDistributor_EV.set(new GT_MetaTileEntity_ItemDistributor( + 9324, "automation.itemdistributor.tier.04", "Extreme Voltage Item Distributor", 4) + .getStackForm(1L)); + ItemList.Automation_ItemDistributor_IV.set(new GT_MetaTileEntity_ItemDistributor( + 9325, "automation.itemdistributor.tier.05", "Insane Voltage Item Distributor", 5) + .getStackForm(1L)); + ItemList.Automation_ItemDistributor_LuV.set(new GT_MetaTileEntity_ItemDistributor( + 9326, "automation.itemdistributor.tier.06", "Ludicrous Voltage Item Distributor", 6) + .getStackForm(1L)); + ItemList.Automation_ItemDistributor_ZPM.set(new GT_MetaTileEntity_ItemDistributor( + 9327, "automation.itemdistributor.tier.07", "ZPM Voltage Item Distributor", 7) + .getStackForm(1L)); + ItemList.Automation_ItemDistributor_UV.set(new GT_MetaTileEntity_ItemDistributor( + 9328, "automation.itemdistributor.tier.08", "Ultimate Voltage Item Distributor", 8) + .getStackForm(1L)); + ItemList.Automation_ItemDistributor_MAX.set(new GT_MetaTileEntity_ItemDistributor( + 9329, "automation.itemdistributor.tier.09", "MAX Voltage Item Distributor", 9) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_ULV.get(1L), bits, new Object[] { + "XCX", + "VMV", + " V ", + 'M', + ItemList.Hull_ULV, + 'V', + ItemList.Conveyor_Module_LV, + 'C', + OreDictNames.craftingChest, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_LV.get(1L), bits, new Object[] { + "XCX", + "VMV", + " V ", + 'M', + ItemList.Hull_LV, + 'V', + ItemList.Conveyor_Module_LV, + 'C', + OreDictNames.craftingChest, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_MV.get(1L), bits, new Object[] { + "XCX", + "VMV", + " V ", + 'M', + ItemList.Hull_MV, + 'V', + ItemList.Conveyor_Module_MV, + 'C', + OreDictNames.craftingChest, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_HV.get(1L), bits, new Object[] { + "XCX", + "VMV", + " V ", + 'M', + ItemList.Hull_HV, + 'V', + ItemList.Conveyor_Module_HV, + 'C', + OreDictNames.craftingChest, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_EV.get(1L), bits, new Object[] { + "XCX", + "VMV", + " V ", + 'M', + ItemList.Hull_EV, + 'V', + ItemList.Conveyor_Module_EV, + 'C', + OreDictNames.craftingChest, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_IV.get(1L), bits, new Object[] { + "XCX", + "VMV", + " V ", + 'M', + ItemList.Hull_IV, + 'V', + ItemList.Conveyor_Module_IV, + 'C', + OreDictNames.craftingChest, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_LuV.get(1L), bits, new Object[] { + "XCX", + "VMV", + " V ", + 'M', + ItemList.Hull_LuV, + 'V', + ItemList.Conveyor_Module_LuV, + 'C', + OreDictNames.craftingChest, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_ZPM.get(1L), bits, new Object[] { + "XCX", + "VMV", + " V ", + 'M', + ItemList.Hull_ZPM, + 'V', + ItemList.Conveyor_Module_ZPM, + 'C', + OreDictNames.craftingChest, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_UV.get(1L), bits, new Object[] { + "XCX", + "VMV", + " V ", + 'M', + ItemList.Hull_UV, + 'V', + ItemList.Conveyor_Module_UV, + 'C', + OreDictNames.craftingChest, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_MAX.get(1L), bits, new Object[] { + "XCX", + "VMV", + " V ", + 'M', + ItemList.Hull_MAX, + 'V', + ItemList.Conveyor_Module_UHV, + 'C', + OreDictNames.craftingChest, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + + ItemList.Automation_RecipeFilter_ULV.set(new GT_MetaTileEntity_RecipeFilter( + 9330, "automation.recipefilter.tier.00", "Ultra Low Voltage Recipe Filter", 0) + .getStackForm(1L)); + ItemList.Automation_RecipeFilter_LV.set(new GT_MetaTileEntity_RecipeFilter( + 9331, "automation.recipefilter.tier.01", "Low Voltage Recipe Filter", 1) + .getStackForm(1L)); + ItemList.Automation_RecipeFilter_MV.set(new GT_MetaTileEntity_RecipeFilter( + 9332, "automation.recipefilter.tier.02", "Medium Voltage Recipe Filter", 2) + .getStackForm(1L)); + ItemList.Automation_RecipeFilter_HV.set(new GT_MetaTileEntity_RecipeFilter( + 9333, "automation.recipefilter.tier.03", "High Voltage Recipe Filter", 3) + .getStackForm(1L)); + ItemList.Automation_RecipeFilter_EV.set(new GT_MetaTileEntity_RecipeFilter( + 9334, "automation.recipefilter.tier.04", "Extreme Voltage Recipe Filter", 4) + .getStackForm(1L)); + ItemList.Automation_RecipeFilter_IV.set(new GT_MetaTileEntity_RecipeFilter( + 9335, "automation.recipefilter.tier.05", "Insane Voltage Recipe Filter", 5) + .getStackForm(1L)); + ItemList.Automation_RecipeFilter_LuV.set(new GT_MetaTileEntity_RecipeFilter( + 9336, "automation.recipefilter.tier.06", "Ludicrous Voltage Recipe Filter", 6) + .getStackForm(1L)); + ItemList.Automation_RecipeFilter_ZPM.set(new GT_MetaTileEntity_RecipeFilter( + 9337, "automation.recipefilter.tier.07", "ZPM Voltage Recipe Filter", 7) + .getStackForm(1L)); + ItemList.Automation_RecipeFilter_UV.set(new GT_MetaTileEntity_RecipeFilter( + 9338, "automation.recipefilter.tier.08", "Ultimate Voltage Recipe Filter", 8) + .getStackForm(1L)); + ItemList.Automation_RecipeFilter_MAX.set(new GT_MetaTileEntity_RecipeFilter( + 9339, "automation.recipefilter.tier.09", "Highly Ultimate Voltage Recipe Filter", 9) + .getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Automation_RecipeFilter_ULV.get(1L), bits, new Object[] { + " F ", + "VMC", + " X ", + 'M', + ItemList.Hull_ULV, + 'V', + ItemList.Robot_Arm_LV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_RecipeFilter_LV.get(1L), bits, new Object[] { + " F ", + "VMC", + " X ", + 'M', + ItemList.Hull_LV, + 'V', + ItemList.Robot_Arm_LV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_RecipeFilter_MV.get(1L), bits, new Object[] { + " F ", + "VMC", + " X ", + 'M', + ItemList.Hull_MV, + 'V', + ItemList.Robot_Arm_MV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_RecipeFilter_HV.get(1L), bits, new Object[] { + " F ", + "VMC", + " X ", + 'M', + ItemList.Hull_HV, + 'V', + ItemList.Robot_Arm_HV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_RecipeFilter_EV.get(1L), bits, new Object[] { + " F ", + "VMC", + " X ", + 'M', + ItemList.Hull_EV, + 'V', + ItemList.Robot_Arm_EV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_RecipeFilter_IV.get(1L), bits, new Object[] { + " F ", + "VMC", + " X ", + 'M', + ItemList.Hull_IV, + 'V', + ItemList.Robot_Arm_IV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_RecipeFilter_LuV.get(1L), bits, new Object[] { + " F ", + "VMC", + " X ", + 'M', + ItemList.Hull_LuV, + 'V', + ItemList.Robot_Arm_LuV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_RecipeFilter_ZPM.get(1L), bits, new Object[] { + " F ", + "VMC", + " X ", + 'M', + ItemList.Hull_ZPM, + 'V', + ItemList.Robot_Arm_ZPM, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_RecipeFilter_UV.get(1L), bits, new Object[] { + " F ", + "VMC", + " X ", + 'M', + ItemList.Hull_UV, + 'V', + ItemList.Robot_Arm_UV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_RecipeFilter_MAX.get(1L), bits, new Object[] { + " F ", + "VMC", + " X ", + 'M', + ItemList.Hull_MAX, + 'V', + ItemList.Robot_Arm_UHV, + 'C', + OreDictNames.craftingChest, + 'F', + OreDictNames.craftingFilter, + 'X', + OrePrefixes.circuit.get(Materials.Basic) + }); } @SuppressWarnings("PointlessArithmeticExpression") - private static void makeWires(Materials aMaterial, int aStartID, long aLossInsulated, long aLoss, long aAmperage, long aVoltage, boolean aInsulatable, boolean aAutoInsulated) { + private static void makeWires( + Materials aMaterial, + int aStartID, + long aLossInsulated, + long aLoss, + long aAmperage, + long aVoltage, + boolean aInsulatable, + boolean aAutoInsulated) { String name = GT_LanguageManager.i18nPlaceholder ? "%material" : aMaterial.mDefaultLocalName; - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt01, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 0, aTextWire1 + aMaterial.mName.toLowerCase() + ".01", "1x " + name + aTextWire2, 0.125F, aMaterial, aLoss, 1L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt02, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 1, aTextWire1 + aMaterial.mName.toLowerCase() + ".02", "2x " + name + aTextWire2, 0.25F, aMaterial, aLoss, 2L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt04, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 2, aTextWire1 + aMaterial.mName.toLowerCase() + ".04", "4x " + name + aTextWire2, 0.375F, aMaterial, aLoss, 4L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt08, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 3, aTextWire1 + aMaterial.mName.toLowerCase() + ".08", "8x " + name + aTextWire2, 0.5F, aMaterial, aLoss, 8L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt12, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 4, aTextWire1 + aMaterial.mName.toLowerCase() + ".12", "12x " + name + aTextWire2, 0.625F, aMaterial, aLoss, 12L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt16, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 5, aTextWire1 + aMaterial.mName.toLowerCase() + ".16", "16x " + name + aTextWire2, 0.75F, aMaterial, aLoss, 16L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.wireGt01, + aMaterial, + new GT_MetaPipeEntity_Cable( + aStartID + 0, + aTextWire1 + aMaterial.mName.toLowerCase() + ".01", + "1x " + name + aTextWire2, + 0.125F, + aMaterial, + aLoss, + 1L * aAmperage, + aVoltage, + false, + !aAutoInsulated) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.wireGt02, + aMaterial, + new GT_MetaPipeEntity_Cable( + aStartID + 1, + aTextWire1 + aMaterial.mName.toLowerCase() + ".02", + "2x " + name + aTextWire2, + 0.25F, + aMaterial, + aLoss, + 2L * aAmperage, + aVoltage, + false, + !aAutoInsulated) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.wireGt04, + aMaterial, + new GT_MetaPipeEntity_Cable( + aStartID + 2, + aTextWire1 + aMaterial.mName.toLowerCase() + ".04", + "4x " + name + aTextWire2, + 0.375F, + aMaterial, + aLoss, + 4L * aAmperage, + aVoltage, + false, + !aAutoInsulated) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.wireGt08, + aMaterial, + new GT_MetaPipeEntity_Cable( + aStartID + 3, + aTextWire1 + aMaterial.mName.toLowerCase() + ".08", + "8x " + name + aTextWire2, + 0.5F, + aMaterial, + aLoss, + 8L * aAmperage, + aVoltage, + false, + !aAutoInsulated) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.wireGt12, + aMaterial, + new GT_MetaPipeEntity_Cable( + aStartID + 4, + aTextWire1 + aMaterial.mName.toLowerCase() + ".12", + "12x " + name + aTextWire2, + 0.625F, + aMaterial, + aLoss, + 12L * aAmperage, + aVoltage, + false, + !aAutoInsulated) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.wireGt16, + aMaterial, + new GT_MetaPipeEntity_Cable( + aStartID + 5, + aTextWire1 + aMaterial.mName.toLowerCase() + ".16", + "16x " + name + aTextWire2, + 0.75F, + aMaterial, + aLoss, + 16L * aAmperage, + aVoltage, + false, + !aAutoInsulated) + .getStackForm(1L)); if (aInsulatable) { - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt01, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 6, aTextCable1 + aMaterial.mName.toLowerCase() + ".01", "1x " + name + aTextCable2, 0.25F, aMaterial, aLossInsulated, 1L * aAmperage, aVoltage, true, false).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt02, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 7, aTextCable1 + aMaterial.mName.toLowerCase() + ".02", "2x " + name + aTextCable2, 0.375F, aMaterial, aLossInsulated, 2L * aAmperage, aVoltage, true, false).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt04, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 8, aTextCable1 + aMaterial.mName.toLowerCase() + ".04", "4x " + name + aTextCable2, 0.5F, aMaterial, aLossInsulated, 4L * aAmperage, aVoltage, true, false).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt08, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 9, aTextCable1 + aMaterial.mName.toLowerCase() + ".08", "8x " + name + aTextCable2, 0.625F, aMaterial, aLossInsulated, 8L * aAmperage, aVoltage, true, false).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt12, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 10, aTextCable1 + aMaterial.mName.toLowerCase() + ".12", "12x " + name + aTextCable2, 0.75F, aMaterial, aLossInsulated, 12L * aAmperage, aVoltage, true, false).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt16, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 11, aTextCable1 + aMaterial.mName.toLowerCase() + ".16", "16x " + name + aTextCable2, 0.875F, aMaterial, aLossInsulated, 16L * aAmperage, aVoltage, true, false).getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.cableGt01, + aMaterial, + new GT_MetaPipeEntity_Cable( + aStartID + 6, + aTextCable1 + aMaterial.mName.toLowerCase() + ".01", + "1x " + name + aTextCable2, + 0.25F, + aMaterial, + aLossInsulated, + 1L * aAmperage, + aVoltage, + true, + false) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.cableGt02, + aMaterial, + new GT_MetaPipeEntity_Cable( + aStartID + 7, + aTextCable1 + aMaterial.mName.toLowerCase() + ".02", + "2x " + name + aTextCable2, + 0.375F, + aMaterial, + aLossInsulated, + 2L * aAmperage, + aVoltage, + true, + false) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.cableGt04, + aMaterial, + new GT_MetaPipeEntity_Cable( + aStartID + 8, + aTextCable1 + aMaterial.mName.toLowerCase() + ".04", + "4x " + name + aTextCable2, + 0.5F, + aMaterial, + aLossInsulated, + 4L * aAmperage, + aVoltage, + true, + false) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.cableGt08, + aMaterial, + new GT_MetaPipeEntity_Cable( + aStartID + 9, + aTextCable1 + aMaterial.mName.toLowerCase() + ".08", + "8x " + name + aTextCable2, + 0.625F, + aMaterial, + aLossInsulated, + 8L * aAmperage, + aVoltage, + true, + false) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.cableGt12, + aMaterial, + new GT_MetaPipeEntity_Cable( + aStartID + 10, + aTextCable1 + aMaterial.mName.toLowerCase() + ".12", + "12x " + name + aTextCable2, + 0.75F, + aMaterial, + aLossInsulated, + 12L * aAmperage, + aVoltage, + true, + false) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.cableGt16, + aMaterial, + new GT_MetaPipeEntity_Cable( + aStartID + 11, + aTextCable1 + aMaterial.mName.toLowerCase() + ".16", + "16x " + name + aTextCable2, + 0.875F, + aMaterial, + aLossInsulated, + 16L * aAmperage, + aVoltage, + true, + false) + .getStackForm(1L)); } - } @Override @@ -1666,40 +14623,213 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI run4(); } - private static void generateItemPipes(Materials aMaterial, String name, int startID, int baseInvSlots){ - generateItemPipes(aMaterial, name, GT_LanguageManager.i18nPlaceholder ? "%material" : aMaterial.mDefaultLocalName, startID, baseInvSlots); + private static void generateItemPipes(Materials aMaterial, String name, int startID, int baseInvSlots) { + generateItemPipes( + aMaterial, + name, + GT_LanguageManager.i18nPlaceholder ? "%material" : aMaterial.mDefaultLocalName, + startID, + baseInvSlots); } - private static void generateItemPipes(Materials aMaterial, String name, String displayName, int startID, int baseInvSlots){ - GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(aMaterial), new GT_MetaPipeEntity_Item(startID, "GT_Pipe_" + name, displayName + " Item Pipe", 0.50F, aMaterial, baseInvSlots, 32768 / baseInvSlots, false).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(aMaterial), new GT_MetaPipeEntity_Item(startID + 1, "GT_Pipe_" + name + "_Large", "Large " + displayName + " Item Pipe", 0.75F, aMaterial, baseInvSlots * 2, 16384 / baseInvSlots, false).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(aMaterial), new GT_MetaPipeEntity_Item(startID + 2, "GT_Pipe_" + name + "_Huge", "Huge " + displayName +" Item Pipe", 1.00F, aMaterial, baseInvSlots * 4, 8192 / baseInvSlots, false).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeRestrictiveMedium.get(aMaterial), new GT_MetaPipeEntity_Item(startID + 3, "GT_Pipe_Restrictive_" + name, "Restrictive " + displayName + " Item Pipe", 0.50F, aMaterial, baseInvSlots, 3276800 / baseInvSlots, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeRestrictiveLarge.get(aMaterial), new GT_MetaPipeEntity_Item(startID + 4, "GT_Pipe_Restrictive_" + name + "_Large","Large Restrictive " + displayName + " Item Pipe", 0.75F, aMaterial, baseInvSlots * 2, 1638400 / baseInvSlots, true).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeRestrictiveHuge.get(aMaterial), new GT_MetaPipeEntity_Item(startID + 5, "GT_Pipe_Restrictive_" + name + "_Huge", "Huge Restrictive " + displayName + " Item Pipe", 0.875F, aMaterial, baseInvSlots * 4, 819200 / baseInvSlots, true).getStackForm(1L)); - + private static void generateItemPipes( + Materials aMaterial, String name, String displayName, int startID, int baseInvSlots) { + GT_OreDictUnificator.registerOre( + OrePrefixes.pipeMedium.get(aMaterial), + new GT_MetaPipeEntity_Item( + startID, + "GT_Pipe_" + name, + displayName + " Item Pipe", + 0.50F, + aMaterial, + baseInvSlots, + 32768 / baseInvSlots, + false) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.pipeLarge.get(aMaterial), + new GT_MetaPipeEntity_Item( + startID + 1, + "GT_Pipe_" + name + "_Large", + "Large " + displayName + " Item Pipe", + 0.75F, + aMaterial, + baseInvSlots * 2, + 16384 / baseInvSlots, + false) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.pipeHuge.get(aMaterial), + new GT_MetaPipeEntity_Item( + startID + 2, + "GT_Pipe_" + name + "_Huge", + "Huge " + displayName + " Item Pipe", + 1.00F, + aMaterial, + baseInvSlots * 4, + 8192 / baseInvSlots, + false) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.pipeRestrictiveMedium.get(aMaterial), + new GT_MetaPipeEntity_Item( + startID + 3, + "GT_Pipe_Restrictive_" + name, + "Restrictive " + displayName + " Item Pipe", + 0.50F, + aMaterial, + baseInvSlots, + 3276800 / baseInvSlots, + true) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.pipeRestrictiveLarge.get(aMaterial), + new GT_MetaPipeEntity_Item( + startID + 4, + "GT_Pipe_Restrictive_" + name + "_Large", + "Large Restrictive " + displayName + " Item Pipe", + 0.75F, + aMaterial, + baseInvSlots * 2, + 1638400 / baseInvSlots, + true) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.pipeRestrictiveHuge.get(aMaterial), + new GT_MetaPipeEntity_Item( + startID + 5, + "GT_Pipe_Restrictive_" + name + "_Huge", + "Huge Restrictive " + displayName + " Item Pipe", + 0.875F, + aMaterial, + baseInvSlots * 4, + 819200 / baseInvSlots, + true) + .getStackForm(1L)); } @SuppressWarnings("SameParameterValue") - private static void generateFluidPipes(Materials aMaterial, String name, int startID, int baseCapacity, int heatCapacity, boolean gasProof){ - generateFluidPipes(aMaterial, name, GT_LanguageManager.i18nPlaceholder ? "%material" : aMaterial.mDefaultLocalName, startID, baseCapacity, heatCapacity, gasProof); + private static void generateFluidPipes( + Materials aMaterial, String name, int startID, int baseCapacity, int heatCapacity, boolean gasProof) { + generateFluidPipes( + aMaterial, + name, + GT_LanguageManager.i18nPlaceholder ? "%material" : aMaterial.mDefaultLocalName, + startID, + baseCapacity, + heatCapacity, + gasProof); } - private static void generateFluidPipes(Materials aMaterial, String name, String displayName, int startID, int baseCapacity, int heatCapacity, boolean gasProof){ - GT_OreDictUnificator.registerOre(OrePrefixes.pipeTiny.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID, "GT_Pipe_" + name + "_Tiny", "Tiny " + displayName + " Fluid Pipe", 0.25F, aMaterial, baseCapacity / 6, heatCapacity, gasProof).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeSmall.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID + 1, "GT_Pipe_" + name + "_Small", "Small " + displayName + " Fluid Pipe", 0.375F, aMaterial, baseCapacity / 3, heatCapacity, gasProof).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID + 2, "GT_Pipe_" + name, displayName + " Fluid Pipe", 0.5F, aMaterial, baseCapacity, heatCapacity, gasProof).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID + 3, "GT_Pipe_" + name + "_Large", "Large " + displayName + " Fluid Pipe", 0.75F, aMaterial, baseCapacity * 2, heatCapacity, gasProof).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID + 4, "GT_Pipe_" + name + "_Huge", "Huge " + displayName + " Fluid Pipe", 0.875F, aMaterial, baseCapacity * 4, heatCapacity, gasProof).getStackForm(1L)); + private static void generateFluidPipes( + Materials aMaterial, + String name, + String displayName, + int startID, + int baseCapacity, + int heatCapacity, + boolean gasProof) { + GT_OreDictUnificator.registerOre( + OrePrefixes.pipeTiny.get(aMaterial), + new GT_MetaPipeEntity_Fluid( + startID, + "GT_Pipe_" + name + "_Tiny", + "Tiny " + displayName + " Fluid Pipe", + 0.25F, + aMaterial, + baseCapacity / 6, + heatCapacity, + gasProof) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.pipeSmall.get(aMaterial), + new GT_MetaPipeEntity_Fluid( + startID + 1, + "GT_Pipe_" + name + "_Small", + "Small " + displayName + " Fluid Pipe", + 0.375F, + aMaterial, + baseCapacity / 3, + heatCapacity, + gasProof) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.pipeMedium.get(aMaterial), + new GT_MetaPipeEntity_Fluid( + startID + 2, + "GT_Pipe_" + name, + displayName + " Fluid Pipe", + 0.5F, + aMaterial, + baseCapacity, + heatCapacity, + gasProof) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.pipeLarge.get(aMaterial), + new GT_MetaPipeEntity_Fluid( + startID + 3, + "GT_Pipe_" + name + "_Large", + "Large " + displayName + " Fluid Pipe", + 0.75F, + aMaterial, + baseCapacity * 2, + heatCapacity, + gasProof) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.pipeHuge.get(aMaterial), + new GT_MetaPipeEntity_Fluid( + startID + 4, + "GT_Pipe_" + name + "_Huge", + "Huge " + displayName + " Fluid Pipe", + 0.875F, + aMaterial, + baseCapacity * 4, + heatCapacity, + gasProof) + .getStackForm(1L)); } @SuppressWarnings("SameParameterValue") - private static void generateFluidMultiPipes(Materials aMaterial, String name, int startID, int baseCapacity, int heatCapacity, boolean gasProof){ + private static void generateFluidMultiPipes( + Materials aMaterial, String name, int startID, int baseCapacity, int heatCapacity, boolean gasProof) { generateFluidMultiPipes(aMaterial, name, "%material", startID, baseCapacity, heatCapacity, gasProof); } - private static void generateFluidMultiPipes(Materials aMaterial, String name, String displayName, int startID, int baseCapacity, int heatCapacity, boolean gasProof){ - GT_OreDictUnificator.registerOre(OrePrefixes.pipeQuadruple.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID, "GT_Pipe_" + name + "_Quadruple", "Quadruple " + displayName + " Fluid Pipe", 1.0F, aMaterial, baseCapacity, heatCapacity, gasProof, 4).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeNonuple.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID + 1, "GT_Pipe_" + name + "_Nonuple", "Nonuple " + displayName + " Fluid Pipe", 1.0F, aMaterial, baseCapacity / 3, heatCapacity, gasProof, 9).getStackForm(1L)); + private static void generateFluidMultiPipes( + Materials aMaterial, + String name, + String displayName, + int startID, + int baseCapacity, + int heatCapacity, + boolean gasProof) { + GT_OreDictUnificator.registerOre( + OrePrefixes.pipeQuadruple.get(aMaterial), + new GT_MetaPipeEntity_Fluid( + startID, + "GT_Pipe_" + name + "_Quadruple", + "Quadruple " + displayName + " Fluid Pipe", + 1.0F, + aMaterial, + baseCapacity, + heatCapacity, + gasProof, + 4) + .getStackForm(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.pipeNonuple.get(aMaterial), + new GT_MetaPipeEntity_Fluid( + startID + 1, + "GT_Pipe_" + name + "_Nonuple", + "Nonuple " + displayName + " Fluid Pipe", + 1.0F, + aMaterial, + baseCapacity / 3, + heatCapacity, + gasProof, + 9) + .getStackForm(1L)); } } diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_MultiTileEntities.java b/src/main/java/gregtech/loaders/preload/GT_Loader_MultiTileEntities.java index 694a33d4ad..4ca61fab5f 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_MultiTileEntities.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_MultiTileEntities.java @@ -1,44 +1,37 @@ package gregtech.loaders.preload; -import gregtech.api.enums.Materials; +import static gregtech.GT_Mod.GT_FML_LOGGER; + import gregtech.api.multitileentity.MultiTileEntityBlock; import gregtech.api.multitileentity.MultiTileEntityRegistry; -import gregtech.api.multitileentity.multiblock.base.MultiBlockPart; -import gregtech.api.util.GT_Util; -import gregtech.common.tileentities.machines.multiblock.MultiBlock_Macerator; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.tileentity.TileEntity; - - -import static gregtech.GT_Mod.GT_FML_LOGGER; -import static gregtech.api.enums.GT_Values.NBT; -import static gregtech.api.util.GT_Util.tuple; public class GT_Loader_MultiTileEntities implements Runnable { @Override public void run() { GT_FML_LOGGER.info("GT_Mod: Regisering MultiTileEntities"); final MultiTileEntityRegistry aRegistry = new MultiTileEntityRegistry("gt.multitileentity"); - final MultiTileEntityBlock aMachine = MultiTileEntityBlock.getOrCreate("GregTech", "machine", Material.iron, Block.soundTypeMetal, "wrench", 0, 0, 15, true, true); + final MultiTileEntityBlock aMachine = MultiTileEntityBlock.getOrCreate( + "GregTech", "machine", Material.iron, Block.soundTypeMetal, "wrench", 0, 0, 15, true, true); // Disable for now -// aRegistry.create(1000, MultiBlock_Macerator.class) -// .name("Large Macerator") -// .category("Multiblock Controller") -// .setBlock(aMachine) -// .material(Materials.Iron) -// .texture("metalwall") -// .tankCapacity(128000L) -// .register(); -// -// aRegistry.create(18000, MultiBlockPart.class) -// .name("Test Casing") -// .category("Multiblock Casing") -// .setBlock(aMachine) -// .material(Materials.Cobalt) -// .texture("metalwall") -// .register(); + // aRegistry.create(1000, MultiBlock_Macerator.class) + // .name("Large Macerator") + // .category("Multiblock Controller") + // .setBlock(aMachine) + // .material(Materials.Iron) + // .texture("metalwall") + // .tankCapacity(128000L) + // .register(); + // + // aRegistry.create(18000, MultiBlockPart.class) + // .name("Test Casing") + // .category("Multiblock Casing") + // .setBlock(aMachine) + // .material(Materials.Cobalt) + // .texture("metalwall") + // .register(); } } diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_OreDictionary.java b/src/main/java/gregtech/loaders/preload/GT_Loader_OreDictionary.java index fb5e7ebeaf..0ed2ed63d7 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_OreDictionary.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_OreDictionary.java @@ -1,5 +1,7 @@ package gregtech.loaders.preload; +import static gregtech.api.enums.GT_Values.MOD_ID_DC; + import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -13,8 +15,6 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -import static gregtech.api.enums.GT_Values.MOD_ID_DC; - public class GT_Loader_OreDictionary implements Runnable { @Override public void run() { @@ -24,8 +24,8 @@ public class GT_Loader_OreDictionary implements Runnable { GT_OreDictUnificator.set(OrePrefixes.cell, Materials.Lava, GT_ModHandler.getIC2Item("lavaCell", 1L)); GT_OreDictUnificator.set(OrePrefixes.cell, Materials.Water, ItemList.Cell_Water.get(1L)); GT_OreDictUnificator.set(OrePrefixes.cell, Materials.Water, GT_ModHandler.getIC2Item("waterCell", 1L)); - GT_OreDictUnificator.set(OrePrefixes.cell, Materials.Creosote, GT_ModHandler.getModItem("Railcraft", "fluid.creosote.cell", 1L)); - + GT_OreDictUnificator.set( + OrePrefixes.cell, Materials.Creosote, GT_ModHandler.getModItem("Railcraft", "fluid.creosote.cell", 1L)); GT_OreDictUnificator.set(OrePrefixes.cell, Materials.UUMatter, GT_ModHandler.getIC2Item("uuMatterCell", 1L)); GT_OreDictUnificator.set(OrePrefixes.cell, Materials.ConstructionFoam, GT_ModHandler.getIC2Item("CFCell", 1L)); @@ -34,13 +34,16 @@ public class GT_Loader_OreDictionary implements Runnable { GT_OreDictUnificator.set(OrePrefixes.bucket, Materials.Water, new ItemStack(Items.water_bucket, 1, 0)); GT_OreDictUnificator.set(OrePrefixes.bucket, Materials.Lava, new ItemStack(Items.lava_bucket, 1, 0)); GT_OreDictUnificator.set(OrePrefixes.bucket, Materials.Milk, new ItemStack(Items.milk_bucket, 1, 0)); - // Clay buckets handled in gregtech.common.GT_Proxy.onLoad() as they aren't registered until Iguana Tweaks pre-init. + // Clay buckets handled in gregtech.common.GT_Proxy.onLoad() as they aren't registered until Iguana Tweaks + // pre-init. GT_OreDictUnificator.set(OrePrefixes.bottle, Materials.Empty, new ItemStack(Items.glass_bottle, 1, 0)); GT_OreDictUnificator.set(OrePrefixes.bottle, Materials.Water, new ItemStack(Items.potionitem, 1, 0)); - GT_OreDictUnificator.set(OrePrefixes.plateAlloy, Materials.Iridium, GT_ModHandler.getIC2Item("iridiumPlate", 1L)); - GT_OreDictUnificator.set(OrePrefixes.plateAlloy, Materials.Advanced, GT_ModHandler.getIC2Item("advancedAlloy", 1L)); + GT_OreDictUnificator.set( + OrePrefixes.plateAlloy, Materials.Iridium, GT_ModHandler.getIC2Item("iridiumPlate", 1L)); + GT_OreDictUnificator.set( + OrePrefixes.plateAlloy, Materials.Advanced, GT_ModHandler.getIC2Item("advancedAlloy", 1L)); GT_OreDictUnificator.set(OrePrefixes.plateAlloy, Materials.Carbon, GT_ModHandler.getIC2Item("carbonPlate", 1L)); GT_OreDictUnificator.set(OrePrefixes.ore, Materials.Coal, new ItemStack(Blocks.coal_ore, 1)); @@ -92,17 +95,31 @@ public class GT_Loader_OreDictionary implements Runnable { GT_OreDictUnificator.registerOre(OreDictNames.enderChest, new ItemStack(Blocks.ender_chest, 1)); } GT_OreDictUnificator.registerOre(OreDictNames.craftingAnvil, new ItemStack(Blocks.anvil, 1)); - GT_OreDictUnificator.registerOre(OreDictNames.craftingAnvil, GT_ModHandler.getModItem("Railcraft", "anvil", 1L, 0)); - GT_OreDictUnificator.registerOre(OreDictNames.craftingIndustrialDiamond, ItemList.IC2_Industrial_Diamond.get(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.dust, Materials.Wood, GT_ModHandler.getModItem("ThermalExpansion", "sawdust", 1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.glass, Materials.Reinforced, GT_ModHandler.getIC2Item("reinforcedGlass", 1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.glass, Materials.Reinforced, GT_ModHandler.getModItem("ThermalExpansion", "glassHardened", 1L)); - - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, GT_ModHandler.getModItem("Railcraft", "cube", 1L, 6)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Marble, GT_ModHandler.getModItem("Railcraft", "cube", 1L, 7)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, GT_ModHandler.getModItem("Railcraft", "brick.abyssal", 1L, 32767)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Marble, GT_ModHandler.getModItem("Railcraft", "brick.quarried", 1L, 32767)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Obsidian, new ItemStack(Blocks.obsidian, 1, 32767)); + GT_OreDictUnificator.registerOre( + OreDictNames.craftingAnvil, GT_ModHandler.getModItem("Railcraft", "anvil", 1L, 0)); + GT_OreDictUnificator.registerOre( + OreDictNames.craftingIndustrialDiamond, ItemList.IC2_Industrial_Diamond.get(1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.dust, Materials.Wood, GT_ModHandler.getModItem("ThermalExpansion", "sawdust", 1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.glass, Materials.Reinforced, GT_ModHandler.getIC2Item("reinforcedGlass", 1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.glass, + Materials.Reinforced, + GT_ModHandler.getModItem("ThermalExpansion", "glassHardened", 1L)); + + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Basalt, GT_ModHandler.getModItem("Railcraft", "cube", 1L, 6)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Marble, GT_ModHandler.getModItem("Railcraft", "cube", 1L, 7)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Basalt, GT_ModHandler.getModItem("Railcraft", "brick.abyssal", 1L, 32767)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, + Materials.Marble, + GT_ModHandler.getModItem("Railcraft", "brick.quarried", 1L, 32767)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Obsidian, new ItemStack(Blocks.obsidian, 1, 32767)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Stone, new ItemStack(Blocks.stone, 1, 32767)); GT_OreDictUnificator.registerOre(OrePrefixes.stoneMossy, new ItemStack(Blocks.mossy_cobblestone, 1, 32767)); GT_OreDictUnificator.registerOre(OrePrefixes.stoneCobble, new ItemStack(Blocks.mossy_cobblestone, 1, 32767)); @@ -113,39 +130,67 @@ public class GT_Loader_OreDictionary implements Runnable { GT_OreDictUnificator.registerOre(OrePrefixes.stoneCracked, new ItemStack(Blocks.stonebrick, 1, 2)); GT_OreDictUnificator.registerOre(OrePrefixes.stoneChiseled, new ItemStack(Blocks.stonebrick, 1, 3)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Sand, new ItemStack(Blocks.sandstone, 1, 32767)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Netherrack, new ItemStack(Blocks.netherrack, 1, 32767)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.NetherBrick, new ItemStack(Blocks.nether_brick, 1, 32767)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Endstone, new ItemStack(Blocks.end_stone, 1, 32767)); - GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Glowstone, new ItemStack(Blocks.glowstone, 1, 32767)); - - GT_OreDictUnificator.registerOre("paperResearchFragment", GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1L, 9)); - GT_OreDictUnificator.registerOre("itemCertusQuartz", GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 1)); - GT_OreDictUnificator.registerOre("itemCertusQuartz", GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 10)); - GT_OreDictUnificator.registerOre("itemNetherQuartz", GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 11)); - GT_OreDictUnificator.registerOre(OreDictNames.craftingQuartz, GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 1)); - GT_OreDictUnificator.registerOre(OreDictNames.craftingQuartz, GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 10)); - GT_OreDictUnificator.registerOre(OreDictNames.craftingQuartz, GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 11)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Netherrack, new ItemStack(Blocks.netherrack, 1, 32767)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.NetherBrick, new ItemStack(Blocks.nether_brick, 1, 32767)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Endstone, new ItemStack(Blocks.end_stone, 1, 32767)); + GT_OreDictUnificator.registerOre( + OrePrefixes.stone, Materials.Glowstone, new ItemStack(Blocks.glowstone, 1, 32767)); + + GT_OreDictUnificator.registerOre( + "paperResearchFragment", GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1L, 9)); + GT_OreDictUnificator.registerOre( + "itemCertusQuartz", GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 1)); + GT_OreDictUnificator.registerOre( + "itemCertusQuartz", GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 10)); + GT_OreDictUnificator.registerOre( + "itemNetherQuartz", GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 11)); + GT_OreDictUnificator.registerOre( + OreDictNames.craftingQuartz, + GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 1)); + GT_OreDictUnificator.registerOre( + OreDictNames.craftingQuartz, + GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 10)); + GT_OreDictUnificator.registerOre( + OreDictNames.craftingQuartz, + GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 11)); GT_OreDictUnificator.registerOre("cropLemon", ItemList.FR_Lemon.get(1L)); GT_OreDictUnificator.registerOre("cropCoffee", ItemList.IC2_CoffeeBeans.get(1L)); GT_OreDictUnificator.registerOre("cropPotato", ItemList.Food_Raw_Potato.get(1L)); GT_OreDictUnificator.registerOre("calclavia:BATTERY", GT_ModHandler.getIC2Item("reBattery", 1L)); GT_OreDictUnificator.registerOre("calclavia:BATTERY", GT_ModHandler.getIC2Item("chargedReBattery", 1L, 32767)); - GT_OreDictUnificator.registerOre(OrePrefixes.battery, Materials.Basic, GT_ModHandler.getIC2Item("reBattery", 1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.battery, Materials.Basic, GT_ModHandler.getIC2Item("chargedReBattery", 1L, 32767)); - GT_OreDictUnificator.registerOre(OrePrefixes.battery, Materials.Advanced, GT_ModHandler.getIC2Item("advBattery", 1L, 32767)); - GT_OreDictUnificator.registerOre(OrePrefixes.battery, Materials.Elite, GT_ModHandler.getIC2Item("energyCrystal", 1L, 32767)); - GT_OreDictUnificator.registerOre(OrePrefixes.battery, Materials.Master, GT_ModHandler.getIC2Item("lapotronCrystal", 1L, 32767)); - - GT_OreDictUnificator.registerOre(OreDictNames.craftingWireCopper, GT_ModHandler.getIC2Item("insulatedCopperCableItem", 1L)); - GT_OreDictUnificator.registerOre(OreDictNames.craftingWireGold, GT_ModHandler.getIC2Item("insulatedGoldCableItem", 1L)); - GT_OreDictUnificator.registerOre(OreDictNames.craftingWireIron, GT_ModHandler.getIC2Item("insulatedIronCableItem", 1L)); - GT_OreDictUnificator.registerOre(OreDictNames.craftingWireTin, GT_ModHandler.getIC2Item("insulatedTinCableItem", 1L, GT_ModHandler.getIC2Item("insulatedCopperCableItem", 1L))); - - GT_OreDictUnificator.registerOre(OreDictNames.craftingRedstoneTorch, new ItemStack(Blocks.redstone_torch, 1, 32767)); - GT_OreDictUnificator.registerOre(OreDictNames.craftingRedstoneTorch, new ItemStack(Blocks.unlit_redstone_torch, 1, 32767)); + GT_OreDictUnificator.registerOre( + OrePrefixes.battery, Materials.Basic, GT_ModHandler.getIC2Item("reBattery", 1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.battery, Materials.Basic, GT_ModHandler.getIC2Item("chargedReBattery", 1L, 32767)); + GT_OreDictUnificator.registerOre( + OrePrefixes.battery, Materials.Advanced, GT_ModHandler.getIC2Item("advBattery", 1L, 32767)); + GT_OreDictUnificator.registerOre( + OrePrefixes.battery, Materials.Elite, GT_ModHandler.getIC2Item("energyCrystal", 1L, 32767)); + GT_OreDictUnificator.registerOre( + OrePrefixes.battery, Materials.Master, GT_ModHandler.getIC2Item("lapotronCrystal", 1L, 32767)); + + GT_OreDictUnificator.registerOre( + OreDictNames.craftingWireCopper, GT_ModHandler.getIC2Item("insulatedCopperCableItem", 1L)); + GT_OreDictUnificator.registerOre( + OreDictNames.craftingWireGold, GT_ModHandler.getIC2Item("insulatedGoldCableItem", 1L)); + GT_OreDictUnificator.registerOre( + OreDictNames.craftingWireIron, GT_ModHandler.getIC2Item("insulatedIronCableItem", 1L)); + GT_OreDictUnificator.registerOre( + OreDictNames.craftingWireTin, + GT_ModHandler.getIC2Item( + "insulatedTinCableItem", 1L, GT_ModHandler.getIC2Item("insulatedCopperCableItem", 1L))); + + GT_OreDictUnificator.registerOre( + OreDictNames.craftingRedstoneTorch, new ItemStack(Blocks.redstone_torch, 1, 32767)); + GT_OreDictUnificator.registerOre( + OreDictNames.craftingRedstoneTorch, new ItemStack(Blocks.unlit_redstone_torch, 1, 32767)); GT_OreDictUnificator.registerOre(OreDictNames.craftingWorkBench, new ItemStack(Blocks.crafting_table, 1)); - GT_OreDictUnificator.registerOre(OreDictNames.craftingWorkBench, new ItemStack(GregTech_API.sBlockMachines, 1, 16)); + GT_OreDictUnificator.registerOre( + OreDictNames.craftingWorkBench, new ItemStack(GregTech_API.sBlockMachines, 1, 16)); GT_OreDictUnificator.registerOre(OreDictNames.craftingPiston, new ItemStack(Blocks.piston, 1, 32767)); GT_OreDictUnificator.registerOre(OreDictNames.craftingPiston, new ItemStack(Blocks.sticky_piston, 1, 32767)); @@ -160,38 +205,47 @@ public class GT_Loader_OreDictionary implements Runnable { GT_OreDictUnificator.registerOre(OreDictNames.craftingFurnace, new ItemStack(Blocks.lit_furnace, 1, 32767)); GT_OreDictUnificator.registerOre(OreDictNames.craftingPump, GT_ModHandler.getIC2Item("pump", 1L)); - GT_OreDictUnificator.registerOre(OreDictNames.craftingElectromagnet, GT_ModHandler.getIC2Item("magnetizer", 1L)); + GT_OreDictUnificator.registerOre( + OreDictNames.craftingElectromagnet, GT_ModHandler.getIC2Item("magnetizer", 1L)); GT_OreDictUnificator.registerOre(OreDictNames.craftingTeleporter, GT_ModHandler.getIC2Item("teleporter", 1L)); GT_OreDictUnificator.registerOre(OreDictNames.craftingMacerator, GT_ModHandler.getIC2Item("macerator", 1L)); - GT_OreDictUnificator.registerOre(OreDictNames.craftingMacerator, new ItemStack(GregTech_API.sBlockMachines, 1, 50)); - + GT_OreDictUnificator.registerOre( + OreDictNames.craftingMacerator, new ItemStack(GregTech_API.sBlockMachines, 1, 50)); GT_OreDictUnificator.registerOre(OreDictNames.craftingExtractor, GT_ModHandler.getIC2Item("extractor", 1L)); - GT_OreDictUnificator.registerOre(OreDictNames.craftingExtractor, new ItemStack(GregTech_API.sBlockMachines, 1, 51)); + GT_OreDictUnificator.registerOre( + OreDictNames.craftingExtractor, new ItemStack(GregTech_API.sBlockMachines, 1, 51)); GT_OreDictUnificator.registerOre(OreDictNames.craftingCompressor, GT_ModHandler.getIC2Item("compressor", 1L)); - GT_OreDictUnificator.registerOre(OreDictNames.craftingCompressor, new ItemStack(GregTech_API.sBlockMachines, 1, 52)); + GT_OreDictUnificator.registerOre( + OreDictNames.craftingCompressor, new ItemStack(GregTech_API.sBlockMachines, 1, 52)); GT_OreDictUnificator.registerOre(OreDictNames.craftingRecycler, GT_ModHandler.getIC2Item("recycler", 1L)); - GT_OreDictUnificator.registerOre(OreDictNames.craftingRecycler, new ItemStack(GregTech_API.sBlockMachines, 1, 53)); + GT_OreDictUnificator.registerOre( + OreDictNames.craftingRecycler, new ItemStack(GregTech_API.sBlockMachines, 1, 53)); GT_OreDictUnificator.registerOre(OreDictNames.craftingIronFurnace, GT_ModHandler.getIC2Item("ironFurnace", 1L)); - GT_OreDictUnificator.registerOre(OreDictNames.craftingCentrifuge, new ItemStack(GregTech_API.sBlockMachines, 1, 62)); + GT_OreDictUnificator.registerOre( + OreDictNames.craftingCentrifuge, new ItemStack(GregTech_API.sBlockMachines, 1, 62)); - GT_OreDictUnificator.registerOre(OreDictNames.craftingInductionFurnace, GT_ModHandler.getIC2Item("inductionFurnace", 1L)); + GT_OreDictUnificator.registerOre( + OreDictNames.craftingInductionFurnace, GT_ModHandler.getIC2Item("inductionFurnace", 1L)); - - GT_OreDictUnificator.registerOre(OreDictNames.craftingElectricFurnace, GT_ModHandler.getIC2Item("electroFurnace", 1L)); - GT_OreDictUnificator.registerOre(OreDictNames.craftingElectricFurnace, new ItemStack(GregTech_API.sBlockMachines, 1, 54)); + GT_OreDictUnificator.registerOre( + OreDictNames.craftingElectricFurnace, GT_ModHandler.getIC2Item("electroFurnace", 1L)); + GT_OreDictUnificator.registerOre( + OreDictNames.craftingElectricFurnace, new ItemStack(GregTech_API.sBlockMachines, 1, 54)); GT_OreDictUnificator.registerOre(OreDictNames.craftingGenerator, GT_ModHandler.getIC2Item("generator", 1L)); - GT_OreDictUnificator.registerOre(OreDictNames.craftingGeothermalGenerator, GT_ModHandler.getIC2Item("geothermalGenerator", 1L)); + GT_OreDictUnificator.registerOre( + OreDictNames.craftingGeothermalGenerator, GT_ModHandler.getIC2Item("geothermalGenerator", 1L)); GT_OreDictUnificator.registerOre(OreDictNames.craftingFeather, new ItemStack(Items.feather, 1, 32767)); - GT_OreDictUnificator.registerOre(OreDictNames.craftingFeather, GT_ModHandler.getModItem("TwilightForest", "item.tfFeather", 1L, 32767)); + GT_OreDictUnificator.registerOre( + OreDictNames.craftingFeather, GT_ModHandler.getModItem("TwilightForest", "item.tfFeather", 1L, 32767)); GT_OreDictUnificator.registerOre("itemWheat", new ItemStack(Items.wheat, 1, 32767)); GT_OreDictUnificator.registerOre("paperEmpty", new ItemStack(Items.paper, 1, 32767)); @@ -206,57 +260,138 @@ public class GT_Loader_OreDictionary implements Runnable { GT_OreDictUnificator.registerOre(OreDictNames.craftingBook, new ItemStack(Items.written_book, 1, 32767)); GT_OreDictUnificator.registerOre(OreDictNames.craftingBook, new ItemStack(Items.enchanted_book, 1, 32767)); - GT_OreDictUnificator.registerOre(OrePrefixes.circuit, Materials.Basic, GT_ModHandler.getIC2Item("electronicCircuit", 1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.circuit, Materials.Advanced, GT_ModHandler.getIC2Item("advancedCircuit", 1L)); - - GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Copper, GT_ModHandler.getModItem("IC2", "itemCasing", 1L, 0)); - GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Tin, GT_ModHandler.getModItem("IC2","itemCasing", 1L, 1)); - GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Bronze, GT_ModHandler.getModItem("IC2","itemCasing", 1L, 2)); - GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Gold, GT_ModHandler.getModItem("IC2","itemCasing", 1L, 3)); - GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Iron, GT_ModHandler.getModItem("IC2","itemCasing", 1L, 4)); - GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Steel, GT_ModHandler.getModItem("IC2","itemCasing", 1L, 5)); - GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Lead, GT_ModHandler.getModItem("IC2","itemCasing", 1L, 6)); - - GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Osmium, GT_ModHandler.getModItem(MOD_ID_DC,"item.OsmiumItemCasing", 1L, 0)); - GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Aluminium, GT_ModHandler.getModItem(MOD_ID_DC,"item.AluminiumItemCasing", 1L, 0)); - GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.StainlessSteel, GT_ModHandler.getModItem(MOD_ID_DC,"item.StainlessSteelItemCasing", 1L, 0)); - GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Tungsten, GT_ModHandler.getModItem(MOD_ID_DC,"item.TungstenItemCasing", 1L, 0)); - GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Neutronium, GT_ModHandler.getModItem(MOD_ID_DC,"item.NeutroniumItemCasing", 1L, 0)); - GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.TungstenSteel, GT_ModHandler.getModItem(MOD_ID_DC,"item.TungstenSteelItemCasing", 1L, 0)); - GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Iridium, GT_ModHandler.getModItem(MOD_ID_DC,"item.IridiumItemCasing", 1L, 0)); - GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Titanium, GT_ModHandler.getModItem(MOD_ID_DC,"item.TitaniumItemCasing", 1L, 0)); - GT_OreDictUnificator.registerOre(OrePrefixes.itemCasing, Materials.Chrome, GT_ModHandler.getModItem(MOD_ID_DC,"item.ChromeItemCasing", 1L, 0)); - - //Fake Circuits - GT_OreDictUnificator.registerOre(OrePrefixes.circuit, Materials.Primitive, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitULV", 1L)); - //GT_OreDictUnificator.registerOre(OrePrefixes.circuit, Materials.Basic, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitLV", 1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.circuit, Materials.Good, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitMV", 1L)); - //GT_OreDictUnificator.registerOre(OrePrefixes.circuit, Materials.Advanced, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitHV", 1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.circuit, Materials.Data, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitEV", 1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.circuit, Materials.Elite, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitIV", 1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.circuit, Materials.Master, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitLuV", 1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.circuit, Materials.Ultimate, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitZPM", 1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.circuit, Materials.Superconductor, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitUV", 1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.circuit, Materials.Infinite, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitUHV", 1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.circuit, Materials.Bio, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitUEV", 1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.circuit, Materials.Optical, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitUIV", 1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.circuit, Materials.Exotic, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitUMV", 1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.circuit, Materials.Cosmic, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitUXV", 1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.circuit, Materials.Transcendent, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitMAX", 1L)); - - GT_OreDictUnificator.registerOre(OrePrefixes.block, MaterialsBotania.Manasteel, GT_ModHandler.getModItem("Botania", "storage", 1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.block, MaterialsBotania.Terrasteel, GT_ModHandler.getModItem("Botania", "storage", 1L, 1)); - GT_OreDictUnificator.registerOre(OrePrefixes.ingot, MaterialsBotania.ElvenElementium, GT_ModHandler.getModItem("Botania", "manaResource", 1L, 7)); - GT_OreDictUnificator.registerOre(OrePrefixes.nugget, MaterialsBotania.ElvenElementium, GT_ModHandler.getModItem("Botania", "manaResource", 1L, 19)); - GT_OreDictUnificator.registerOre(OrePrefixes.block, MaterialsBotania.ElvenElementium, GT_ModHandler.getModItem("Botania", "storage", 1L, 2)); - GT_OreDictUnificator.registerOre(OrePrefixes.block, MaterialsBotania.Livingrock, GT_ModHandler.getModItem("Botania", "livingrock", 1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.ingot, MaterialsBotania.GaiaSpirit, GT_ModHandler.getModItem("Botania", "manaResource", 1L, 14)); - GT_OreDictUnificator.registerOre(OrePrefixes.block, MaterialsBotania.Livingwood, GT_ModHandler.getModItem("Botania", "livingwood", 1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.block, MaterialsBotania.Dreamwood, GT_ModHandler.getModItem("Botania", "dreamwood", 1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.gem, MaterialsBotania.ManaDiamond, GT_ModHandler.getModItem("Botania", "manaResource", 1L, 2)); - GT_OreDictUnificator.registerOre(OrePrefixes.block, MaterialsBotania.ManaDiamond, GT_ModHandler.getModItem("Botania", "storage", 1L, 3)); - GT_OreDictUnificator.registerOre(OrePrefixes.gem, MaterialsBotania.BotaniaDragonstone, GT_ModHandler.getModItem("Botania", "manaResource", 1L, 9)); - GT_OreDictUnificator.registerOre(OrePrefixes.block, MaterialsBotania.BotaniaDragonstone, GT_ModHandler.getModItem("Botania", "storage", 1L, 4)); - + GT_OreDictUnificator.registerOre( + OrePrefixes.circuit, Materials.Basic, GT_ModHandler.getIC2Item("electronicCircuit", 1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.circuit, Materials.Advanced, GT_ModHandler.getIC2Item("advancedCircuit", 1L)); + + GT_OreDictUnificator.registerOre( + OrePrefixes.itemCasing, Materials.Copper, GT_ModHandler.getModItem("IC2", "itemCasing", 1L, 0)); + GT_OreDictUnificator.registerOre( + OrePrefixes.itemCasing, Materials.Tin, GT_ModHandler.getModItem("IC2", "itemCasing", 1L, 1)); + GT_OreDictUnificator.registerOre( + OrePrefixes.itemCasing, Materials.Bronze, GT_ModHandler.getModItem("IC2", "itemCasing", 1L, 2)); + GT_OreDictUnificator.registerOre( + OrePrefixes.itemCasing, Materials.Gold, GT_ModHandler.getModItem("IC2", "itemCasing", 1L, 3)); + GT_OreDictUnificator.registerOre( + OrePrefixes.itemCasing, Materials.Iron, GT_ModHandler.getModItem("IC2", "itemCasing", 1L, 4)); + GT_OreDictUnificator.registerOre( + OrePrefixes.itemCasing, Materials.Steel, GT_ModHandler.getModItem("IC2", "itemCasing", 1L, 5)); + GT_OreDictUnificator.registerOre( + OrePrefixes.itemCasing, Materials.Lead, GT_ModHandler.getModItem("IC2", "itemCasing", 1L, 6)); + + GT_OreDictUnificator.registerOre( + OrePrefixes.itemCasing, + Materials.Osmium, + GT_ModHandler.getModItem(MOD_ID_DC, "item.OsmiumItemCasing", 1L, 0)); + GT_OreDictUnificator.registerOre( + OrePrefixes.itemCasing, + Materials.Aluminium, + GT_ModHandler.getModItem(MOD_ID_DC, "item.AluminiumItemCasing", 1L, 0)); + GT_OreDictUnificator.registerOre( + OrePrefixes.itemCasing, + Materials.StainlessSteel, + GT_ModHandler.getModItem(MOD_ID_DC, "item.StainlessSteelItemCasing", 1L, 0)); + GT_OreDictUnificator.registerOre( + OrePrefixes.itemCasing, + Materials.Tungsten, + GT_ModHandler.getModItem(MOD_ID_DC, "item.TungstenItemCasing", 1L, 0)); + GT_OreDictUnificator.registerOre( + OrePrefixes.itemCasing, + Materials.Neutronium, + GT_ModHandler.getModItem(MOD_ID_DC, "item.NeutroniumItemCasing", 1L, 0)); + GT_OreDictUnificator.registerOre( + OrePrefixes.itemCasing, + Materials.TungstenSteel, + GT_ModHandler.getModItem(MOD_ID_DC, "item.TungstenSteelItemCasing", 1L, 0)); + GT_OreDictUnificator.registerOre( + OrePrefixes.itemCasing, + Materials.Iridium, + GT_ModHandler.getModItem(MOD_ID_DC, "item.IridiumItemCasing", 1L, 0)); + GT_OreDictUnificator.registerOre( + OrePrefixes.itemCasing, + Materials.Titanium, + GT_ModHandler.getModItem(MOD_ID_DC, "item.TitaniumItemCasing", 1L, 0)); + GT_OreDictUnificator.registerOre( + OrePrefixes.itemCasing, + Materials.Chrome, + GT_ModHandler.getModItem(MOD_ID_DC, "item.ChromeItemCasing", 1L, 0)); + + // Fake Circuits + GT_OreDictUnificator.registerOre( + OrePrefixes.circuit, Materials.Primitive, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitULV", 1L)); + // GT_OreDictUnificator.registerOre(OrePrefixes.circuit, Materials.Basic, GT_ModHandler.getModItem(MOD_ID_DC, + // "item.CircuitLV", 1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.circuit, Materials.Good, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitMV", 1L)); + // GT_OreDictUnificator.registerOre(OrePrefixes.circuit, Materials.Advanced, GT_ModHandler.getModItem(MOD_ID_DC, + // "item.CircuitHV", 1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.circuit, Materials.Data, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitEV", 1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.circuit, Materials.Elite, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitIV", 1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.circuit, Materials.Master, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitLuV", 1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.circuit, Materials.Ultimate, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitZPM", 1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.circuit, + Materials.Superconductor, + GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitUV", 1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.circuit, Materials.Infinite, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitUHV", 1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.circuit, Materials.Bio, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitUEV", 1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.circuit, Materials.Optical, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitUIV", 1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.circuit, Materials.Exotic, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitUMV", 1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.circuit, Materials.Cosmic, GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitUXV", 1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.circuit, + Materials.Transcendent, + GT_ModHandler.getModItem(MOD_ID_DC, "item.CircuitMAX", 1L)); + + GT_OreDictUnificator.registerOre( + OrePrefixes.block, MaterialsBotania.Manasteel, GT_ModHandler.getModItem("Botania", "storage", 1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.block, MaterialsBotania.Terrasteel, GT_ModHandler.getModItem("Botania", "storage", 1L, 1)); + GT_OreDictUnificator.registerOre( + OrePrefixes.ingot, + MaterialsBotania.ElvenElementium, + GT_ModHandler.getModItem("Botania", "manaResource", 1L, 7)); + GT_OreDictUnificator.registerOre( + OrePrefixes.nugget, + MaterialsBotania.ElvenElementium, + GT_ModHandler.getModItem("Botania", "manaResource", 1L, 19)); + GT_OreDictUnificator.registerOre( + OrePrefixes.block, + MaterialsBotania.ElvenElementium, + GT_ModHandler.getModItem("Botania", "storage", 1L, 2)); + GT_OreDictUnificator.registerOre( + OrePrefixes.block, MaterialsBotania.Livingrock, GT_ModHandler.getModItem("Botania", "livingrock", 1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.ingot, + MaterialsBotania.GaiaSpirit, + GT_ModHandler.getModItem("Botania", "manaResource", 1L, 14)); + GT_OreDictUnificator.registerOre( + OrePrefixes.block, MaterialsBotania.Livingwood, GT_ModHandler.getModItem("Botania", "livingwood", 1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.block, MaterialsBotania.Dreamwood, GT_ModHandler.getModItem("Botania", "dreamwood", 1L)); + GT_OreDictUnificator.registerOre( + OrePrefixes.gem, + MaterialsBotania.ManaDiamond, + GT_ModHandler.getModItem("Botania", "manaResource", 1L, 2)); + GT_OreDictUnificator.registerOre( + OrePrefixes.block, MaterialsBotania.ManaDiamond, GT_ModHandler.getModItem("Botania", "storage", 1L, 3)); + GT_OreDictUnificator.registerOre( + OrePrefixes.gem, + MaterialsBotania.BotaniaDragonstone, + GT_ModHandler.getModItem("Botania", "manaResource", 1L, 9)); + GT_OreDictUnificator.registerOre( + OrePrefixes.block, + MaterialsBotania.BotaniaDragonstone, + GT_ModHandler.getModItem("Botania", "storage", 1L, 4)); } } diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_OreProcessing.java b/src/main/java/gregtech/loaders/preload/GT_Loader_OreProcessing.java index 8fa37dfe7b..e4351f16ab 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_OreProcessing.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_OreProcessing.java @@ -3,8 +3,7 @@ package gregtech.loaders.preload; import gregtech.api.util.GT_Log; import gregtech.loaders.oreprocessing.*; -public class GT_Loader_OreProcessing - implements Runnable { +public class GT_Loader_OreProcessing implements Runnable { @Override public void run() { GT_Log.out.println("GT_Mod: Register Ore processing."); diff --git a/src/main/java/gregtech/loaders/preload/GT_PreLoad.java b/src/main/java/gregtech/loaders/preload/GT_PreLoad.java index 5d600f4dfe..83190f7621 100644 --- a/src/main/java/gregtech/loaders/preload/GT_PreLoad.java +++ b/src/main/java/gregtech/loaders/preload/GT_PreLoad.java @@ -1,5 +1,8 @@ package gregtech.loaders.preload; +import static gregtech.GT_Mod.GT_FML_LOGGER; +import static gregtech.api.enums.GT_Values.MOD_ID_AE; + import cpw.mods.fml.common.LoadController; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.ModContainer; @@ -17,10 +20,6 @@ import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; import gregtech.common.tileentities.machines.long_distance.GT_MetaTileEntity_LongDistancePipelineBase; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_Cleanroom; -import net.minecraft.init.Blocks; -import net.minecraftforge.common.config.Configuration; -import org.apache.commons.lang3.StringUtils; - import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; @@ -33,16 +32,17 @@ import java.util.List; import java.util.Objects; import java.util.regex.Matcher; import java.util.regex.Pattern; - -import static gregtech.GT_Mod.GT_FML_LOGGER; -import static gregtech.api.enums.GT_Values.MOD_ID_AE; +import net.minecraft.init.Blocks; +import net.minecraftforge.common.config.Configuration; +import org.apache.commons.lang3.StringUtils; public class GT_PreLoad { public static void sortToTheEnd() { if (GT_Mod.gregtechproxy.mSortToTheEnd) { try { GT_FML_LOGGER.info("GT_Mod: Sorting GregTech to the end of the Mod List for further processing."); - LoadController tLoadController = (LoadController) GT_Utility.getFieldContent(Loader.instance(), "modController", true, true); + LoadController tLoadController = + (LoadController) GT_Utility.getFieldContent(Loader.instance(), "modController", true, true); assert tLoadController != null; List<ModContainer> tModList = tLoadController.getActiveModList(); List<ModContainer> tNewModsList = new ArrayList<>(); @@ -59,7 +59,8 @@ public class GT_PreLoad { if (tGregTech != null) { tNewModsList.add(tGregTech); } - Objects.requireNonNull(GT_Utility.getField(tLoadController, "activeModList", true, true)).set(tLoadController, tNewModsList); + Objects.requireNonNull(GT_Utility.getField(tLoadController, "activeModList", true, true)) + .set(tLoadController, tNewModsList); } catch (Throwable e) { GT_Mod.logStackTrace(e); } @@ -70,12 +71,18 @@ public class GT_PreLoad { GT_FML_LOGGER.info("GT_Mod: Generating Lang-File"); GT_LanguageManager.sEnglishFile = new Configuration(new File(languageDir, "GregTech.lang")); GT_LanguageManager.sEnglishFile.load(); - if (GT_LanguageManager.sEnglishFile.get("EnableLangFile", "UseThisFileAsLanguageFile", false).getBoolean(false)) { - GT_LanguageManager.sLanguage = GT_LanguageManager.sEnglishFile.get("EnableLangFile", "Language", "en_US").getString(); + if (GT_LanguageManager.sEnglishFile + .get("EnableLangFile", "UseThisFileAsLanguageFile", false) + .getBoolean(false)) { + GT_LanguageManager.sLanguage = GT_LanguageManager.sEnglishFile + .get("EnableLangFile", "Language", "en_US") + .getString(); } - Materials.getMaterialsMap().values().parallelStream().filter( - Objects::nonNull).forEach(aMaterial -> aMaterial.mLocalizedName = GT_LanguageManager.addStringLocalization("Material." + aMaterial.mName.toLowerCase(), aMaterial.mDefaultLocalName)); + Materials.getMaterialsMap().values().parallelStream() + .filter(Objects::nonNull) + .forEach(aMaterial -> aMaterial.mLocalizedName = GT_LanguageManager.addStringLocalization( + "Material." + aMaterial.mName.toLowerCase(), aMaterial.mDefaultLocalName)); } public static Configuration getConfiguration(File configDir) { @@ -86,16 +93,25 @@ public class GT_PreLoad { GT_Config.sConfigFileIDs = new Configuration(tFile); GT_Config.sConfigFileIDs.load(); GT_Config.sConfigFileIDs.save(); - GregTech_API.sRecipeFile = new GT_Config(new Configuration(new File(new File(configDir, "GregTech"), "Recipes.cfg"))); - GregTech_API.sMachineFile = new GT_Config(new Configuration(new File(new File(configDir, "GregTech"), "MachineStats.cfg"))); - GregTech_API.sWorldgenFile = new GT_Config(new Configuration(new File(new File(configDir, "GregTech"), "WorldGeneration.cfg"))); - GregTech_API.sMaterialProperties = new GT_Config(new Configuration(new File(new File(configDir, "GregTech"), "MaterialProperties.cfg"))); - GregTech_API.sMaterialComponents = new GT_Config(new Configuration(new File(new File(configDir, "GregTech"), "MaterialComponents.cfg"))); - GregTech_API.sUnification = new GT_Config(new Configuration(new File(new File(configDir, "GregTech"), "Unification.cfg"))); - GregTech_API.sSpecialFile = new GT_Config(new Configuration(new File(new File(configDir, "GregTech"), "Other.cfg"))); - GregTech_API.sOPStuff = new GT_Config(new Configuration(new File(new File(configDir, "GregTech"), "OverpoweredStuff.cfg"))); - - GregTech_API.sClientDataFile = new GT_Config(new Configuration(new File(new File(configDir, "GregTech"), "Client.cfg"))); + GregTech_API.sRecipeFile = + new GT_Config(new Configuration(new File(new File(configDir, "GregTech"), "Recipes.cfg"))); + GregTech_API.sMachineFile = + new GT_Config(new Configuration(new File(new File(configDir, "GregTech"), "MachineStats.cfg"))); + GregTech_API.sWorldgenFile = + new GT_Config(new Configuration(new File(new File(configDir, "GregTech"), "WorldGeneration.cfg"))); + GregTech_API.sMaterialProperties = + new GT_Config(new Configuration(new File(new File(configDir, "GregTech"), "MaterialProperties.cfg"))); + GregTech_API.sMaterialComponents = + new GT_Config(new Configuration(new File(new File(configDir, "GregTech"), "MaterialComponents.cfg"))); + GregTech_API.sUnification = + new GT_Config(new Configuration(new File(new File(configDir, "GregTech"), "Unification.cfg"))); + GregTech_API.sSpecialFile = + new GT_Config(new Configuration(new File(new File(configDir, "GregTech"), "Other.cfg"))); + GregTech_API.sOPStuff = + new GT_Config(new Configuration(new File(new File(configDir, "GregTech"), "OverpoweredStuff.cfg"))); + + GregTech_API.sClientDataFile = + new GT_Config(new Configuration(new File(new File(configDir, "GregTech"), "Client.cfg"))); return tMainConfig; } @@ -113,22 +129,26 @@ public class GT_PreLoad { if (!GT_Log.mLogFile.exists()) { try { final boolean ignored = GT_Log.mLogFile.createNewFile(); - } catch (Throwable ignored) {} + } catch (Throwable ignored) { + } } try { GT_Log.out = GT_Log.err = new PrintStream(GT_Log.mLogFile); - } catch (FileNotFoundException ignored) {} + } catch (FileNotFoundException ignored) { + } if (tMainConfig.get(GT_Mod.aTextGeneral, "LoggingOreDict", false).getBoolean(false)) { GT_Log.mOreDictLogFile = new File(parentFile, "logs/OreDict.log"); if (!GT_Log.mOreDictLogFile.exists()) { try { final boolean ignored = GT_Log.mOreDictLogFile.createNewFile(); - } catch (Throwable ignored) {} + } catch (Throwable ignored) { + } } try { GT_Log.ore = new PrintStream(GT_Log.mOreDictLogFile); - } catch (Throwable ignored) {} + } catch (Throwable ignored) { + } try { List<String> tList = ((GT_Log.LogBuffer) GT_Log.ore).mBufferedOreDictLog; GT_Log.ore.println("******************************************************************************"); @@ -146,11 +166,13 @@ public class GT_PreLoad { if (!GT_Log.mExplosionLog.exists()) { try { final boolean ignored = GT_Log.mExplosionLog.createNewFile(); - } catch (Throwable ignored) {} + } catch (Throwable ignored) { + } } try { GT_Log.exp = new PrintStream(GT_Log.mExplosionLog); - } catch (Throwable ignored) {} + } catch (Throwable ignored) { + } } if (tMainConfig.get(GT_Mod.aTextGeneral, "LoggingPlayerActivity", true).getBoolean(true)) { @@ -158,17 +180,18 @@ public class GT_PreLoad { if (!GT_Log.mPlayerActivityLogFile.exists()) { try { final boolean ignored = GT_Log.mPlayerActivityLogFile.createNewFile(); - } catch (Throwable ignored) {} + } catch (Throwable ignored) { + } } try { GT_Log.pal = new PrintStream(GT_Log.mPlayerActivityLogFile); - } catch (Throwable ignored) {} + } catch (Throwable ignored) { + } } } public static void runMineTweakerCompat() { - if (!Loader.isModLoaded("MineTweaker3")) - return; + if (!Loader.isModLoaded("MineTweaker3")) return; GT_FML_LOGGER.info("preReader"); final List<String> oreTags = new ArrayList<>(); @@ -213,13 +236,82 @@ public class GT_PreLoad { int prefix = meta / 1000; int material = meta % 1000; String tag = ""; - String[] tags = new String[]{}; + String[] tags = new String[] {}; if (mIt == 1) - tags = new String[]{"dustTiny", "dustSmall", "dust", "dustImpure", "dustPure", "crushed", "crushedPurified", "crushedCentrifuged", "gem", "nugget", null, "ingot", "ingotHot", "ingotDouble", "ingotTriple", "ingotQuadruple", "ingotQuintuple", "plate", "plateDouble", "plateTriple", "plateQuadruple", "plateQuintuple", "plateDense", "stick", "lens", "round", "bolt", "screw", "ring", "foil", "cell", "cellPlasma", "cellMolten"}; + tags = new String[] { + "dustTiny", + "dustSmall", + "dust", + "dustImpure", + "dustPure", + "crushed", + "crushedPurified", + "crushedCentrifuged", + "gem", + "nugget", + null, + "ingot", + "ingotHot", + "ingotDouble", + "ingotTriple", + "ingotQuadruple", + "ingotQuintuple", + "plate", + "plateDouble", + "plateTriple", + "plateQuadruple", + "plateQuintuple", + "plateDense", + "stick", + "lens", + "round", + "bolt", + "screw", + "ring", + "foil", + "cell", + "cellPlasma", + "cellMolten" + }; if (mIt == 2) - tags = new String[]{"toolHeadSword", "toolHeadPickaxe", "toolHeadShovel", "toolHeadAxe", "toolHeadHoe", "toolHeadHammer", "toolHeadFile", "toolHeadSaw", "toolHeadDrill", "toolHeadChainsaw", "toolHeadWrench", "toolHeadUniversalSpade", "toolHeadSense", "toolHeadPlow", "toolHeadArrow", "toolHeadBuzzSaw", "turbineBlade", null, null, "wireFine", "gearGtSmall", "rotor", "stickLong", "springSmall", "spring", "arrowGtWood", "arrowGtPlastic", "gemChipped", "gemFlawed", "gemFlawless", "gemExquisite", "gearGt"}; + tags = new String[] { + "toolHeadSword", + "toolHeadPickaxe", + "toolHeadShovel", + "toolHeadAxe", + "toolHeadHoe", + "toolHeadHammer", + "toolHeadFile", + "toolHeadSaw", + "toolHeadDrill", + "toolHeadChainsaw", + "toolHeadWrench", + "toolHeadUniversalSpade", + "toolHeadSense", + "toolHeadPlow", + "toolHeadArrow", + "toolHeadBuzzSaw", + "turbineBlade", + null, + null, + "wireFine", + "gearGtSmall", + "rotor", + "stickLong", + "springSmall", + "spring", + "arrowGtWood", + "arrowGtPlastic", + "gemChipped", + "gemFlawed", + "gemFlawless", + "gemExquisite", + "gearGt" + }; if (mIt == 3) - tags = new String[]{"crateGtDust", "crateGtIngot", "crateGtGem", "crateGtPlate", "itemCasing"}; + tags = new String[] { + "crateGtDust", "crateGtIngot", "crateGtGem", "crateGtPlate", "itemCasing" + }; if (tags.length > prefix) tag = tags[prefix]; if (GregTech_API.sGeneratedMaterials[material] != null) { tag += GregTech_API.sGeneratedMaterials[material].mName; @@ -234,16 +326,80 @@ public class GT_PreLoad { } } - final String[] preS = new String[]{"dustTiny", "dustSmall", "dust", "dustImpure", "dustPure", "crushed", "crushedPurified", "crushedCentrifuged", "gem", "nugget", "ingot", "ingotHot", "ingotDouble", "ingotTriple", "ingotQuadruple", "ingotQuintuple", "plate", "plateDouble", "plateTriple", "plateQuadruple", "plateQuintuple", "plateDense", "stick", "lens", "round", "bolt", "screw", "ring", "foil", "cell", "cellPlasma", "toolHeadSword", "toolHeadPickaxe", "toolHeadShovel", "toolHeadAxe", "toolHeadHoe", "toolHeadHammer", "toolHeadFile", "toolHeadSaw", "toolHeadDrill", "toolHeadChainsaw", "toolHeadWrench", "toolHeadUniversalSpade", "toolHeadSense", "toolHeadPlow", "toolHeadArrow", "toolHeadBuzzSaw", "turbineBlade", "wireFine", "gearGtSmall", "rotor", "stickLong", "springSmall", "spring", "arrowGtWood", "arrowGtPlastic", "gemChipped", "gemFlawed", "gemFlawless", "gemExquisite", "gearGt", "crateGtDust", "crateGtIngot", "crateGtGem", "crateGtPlate", "cellMolten"}; + final String[] preS = new String[] { + "dustTiny", + "dustSmall", + "dust", + "dustImpure", + "dustPure", + "crushed", + "crushedPurified", + "crushedCentrifuged", + "gem", + "nugget", + "ingot", + "ingotHot", + "ingotDouble", + "ingotTriple", + "ingotQuadruple", + "ingotQuintuple", + "plate", + "plateDouble", + "plateTriple", + "plateQuadruple", + "plateQuintuple", + "plateDense", + "stick", + "lens", + "round", + "bolt", + "screw", + "ring", + "foil", + "cell", + "cellPlasma", + "toolHeadSword", + "toolHeadPickaxe", + "toolHeadShovel", + "toolHeadAxe", + "toolHeadHoe", + "toolHeadHammer", + "toolHeadFile", + "toolHeadSaw", + "toolHeadDrill", + "toolHeadChainsaw", + "toolHeadWrench", + "toolHeadUniversalSpade", + "toolHeadSense", + "toolHeadPlow", + "toolHeadArrow", + "toolHeadBuzzSaw", + "turbineBlade", + "wireFine", + "gearGtSmall", + "rotor", + "stickLong", + "springSmall", + "spring", + "arrowGtWood", + "arrowGtPlastic", + "gemChipped", + "gemFlawed", + "gemFlawless", + "gemExquisite", + "gearGt", + "crateGtDust", + "crateGtIngot", + "crateGtGem", + "crateGtPlate", + "cellMolten" + }; List<String> mMTTags = new ArrayList<>(); - oreTags.stream() - .filter(test -> StringUtils.startsWithAny(test, preS)) - .forEach(test -> { - mMTTags.add(test); - if (GT_Values.D1) - GT_FML_LOGGER.info("oretag: " + test); - }); + oreTags.stream().filter(test -> StringUtils.startsWithAny(test, preS)).forEach(test -> { + mMTTags.add(test); + if (GT_Values.D1) GT_FML_LOGGER.info("oretag: " + test); + }); GT_FML_LOGGER.info("reenableMetaItems"); @@ -294,8 +450,14 @@ public class GT_PreLoad { public static void adjustScrap() { GT_FML_LOGGER.info("GT_Mod: Removing all original Scrapbox Drops."); try { - Objects.requireNonNull(GT_Utility.getField("ic2.core.item.ItemScrapbox$Drop", "topChance", true, true)).set(null, 0); - ((List<?>) Objects.requireNonNull(GT_Utility.getFieldContent(GT_Utility.getFieldContent("ic2.api.recipe.Recipes", "scrapboxDrops", true, true), "drops", true, true))).clear(); + Objects.requireNonNull(GT_Utility.getField("ic2.core.item.ItemScrapbox$Drop", "topChance", true, true)) + .set(null, 0); + ((List<?>) Objects.requireNonNull(GT_Utility.getFieldContent( + GT_Utility.getFieldContent("ic2.api.recipe.Recipes", "scrapboxDrops", true, true), + "drops", + true, + true))) + .clear(); } catch (Throwable e) { if (GT_Values.D1) { e.printStackTrace(GT_Log.err); @@ -308,237 +470,493 @@ public class GT_PreLoad { public static void loadConfig(Configuration tMainConfig) { GT_Values.D1 = tMainConfig.get(GT_Mod.aTextGeneral, "Debug", false).getBoolean(false); GT_Values.D2 = tMainConfig.get(GT_Mod.aTextGeneral, "Debug2", false).getBoolean(false); - GT_Values.hideAssLineRecipes = tMainConfig.get(GT_Mod.aTextGeneral, "hide assline recipes", false).getBoolean(false); - GT_Values.updateFluidDisplayItems = tMainConfig.get(GT_Mod.aTextGeneral, "update fluid display items", true).getBoolean(true); - GT_Values.allow_broken_recipemap = tMainConfig.get(GT_Mod.aTextGeneral, "debug allow broken recipemap", false).getBoolean(false); - GT_Values.debugCleanroom = tMainConfig.get(GT_Mod.aTextGeneral, "debugCleanroom", false).getBoolean(false); - GT_Values.debugDriller = tMainConfig.get(GT_Mod.aTextGeneral, "debugDriller", false).getBoolean(false); - GT_Values.debugWorldGen = tMainConfig.get(GT_Mod.aTextGeneral, "debugWorldGen", false).getBoolean(false); - GT_Values.debugOrevein = tMainConfig.get(GT_Mod.aTextGeneral, "debugOrevein", false).getBoolean(false); - GT_Values.debugSmallOres = tMainConfig.get(GT_Mod.aTextGeneral, "debugSmallOres", false).getBoolean(false); - GT_Values.debugStones = tMainConfig.get(GT_Mod.aTextGeneral, "debugStones", false).getBoolean(false); - GT_Values.debugBlockMiner = tMainConfig.get(GT_Mod.aTextGeneral, "debugBlockMiner", false).getBoolean(false); - GT_Values.debugBlockPump = tMainConfig.get(GT_Mod.aTextGeneral, "debugBlockPump", false).getBoolean(false); - GT_Values.debugEntityCramming = tMainConfig.get(GT_Mod.aTextGeneral, "debugEntityCramming", false).getBoolean(false); - GT_Values.debugWorldData = tMainConfig.get(GT_Mod.aTextGeneral, "debugWorldData", false).getBoolean(false); - GT_Values.oreveinPercentage = tMainConfig.get(GT_Mod.aTextGeneral, "oreveinPercentage_100", 100).getInt(100); - GT_Values.oreveinAttempts = tMainConfig.get(GT_Mod.aTextGeneral, "oreveinAttempts_64", 64).getInt(64); - GT_Values.oreveinMaxPlacementAttempts = tMainConfig.get(GT_Mod.aTextGeneral, "oreveinMaxPlacementAttempts_8", 8).getInt(8); - GT_Values.oreveinPlacerOres = tMainConfig.get(GT_Mod.aTextGeneral, "oreveinPlacerOres", true).getBoolean(true); - GT_Values.oreveinPlacerOresMultiplier = tMainConfig.get(GT_Mod.aTextGeneral, "oreveinPlacerOresMultiplier", 2).getInt(2); - //GT_Values.oreveinMaxSize = tMainConfig.get(aTextGeneral, "oreveinMaxSize_64",64).getInt(64); - GT_Values.ticksBetweenSounds = tMainConfig.get("machines", "TicksBetweenSounds", 30).getInt(30); - GT_Values.cleanroomGlass = (float) tMainConfig.get("machines", "ReinforcedGlassPercentageForCleanroom", 5D).getDouble(5D); - GT_Values.enableChunkloaders = tMainConfig.get("machines", "enableChunkloaders", true).getBoolean(true); - GT_Values.alwaysReloadChunkloaders = tMainConfig.get("machines", "alwaysReloadChunkloaders", false).getBoolean(false); - GT_Values.debugChunkloaders = tMainConfig.get("machines", "debugChunkloaders", false).getBoolean(false); - GT_Values.disableDigitalChestsExternalAccess = tMainConfig.get("machines", "disableDigitalChestsExternalAccess", false).getBoolean(false); - GregTech_API.TICKS_FOR_LAG_AVERAGING = tMainConfig.get(GT_Mod.aTextGeneral, "TicksForLagAveragingWithScanner", 25).getInt(25); - GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING = tMainConfig.get(GT_Mod.aTextGeneral, "MillisecondsPassedInGTTileEntityUntilLagWarning", 100).getInt(100); + GT_Values.hideAssLineRecipes = tMainConfig + .get(GT_Mod.aTextGeneral, "hide assline recipes", false) + .getBoolean(false); + GT_Values.updateFluidDisplayItems = tMainConfig + .get(GT_Mod.aTextGeneral, "update fluid display items", true) + .getBoolean(true); + GT_Values.allow_broken_recipemap = tMainConfig + .get(GT_Mod.aTextGeneral, "debug allow broken recipemap", false) + .getBoolean(false); + GT_Values.debugCleanroom = + tMainConfig.get(GT_Mod.aTextGeneral, "debugCleanroom", false).getBoolean(false); + GT_Values.debugDriller = + tMainConfig.get(GT_Mod.aTextGeneral, "debugDriller", false).getBoolean(false); + GT_Values.debugWorldGen = + tMainConfig.get(GT_Mod.aTextGeneral, "debugWorldGen", false).getBoolean(false); + GT_Values.debugOrevein = + tMainConfig.get(GT_Mod.aTextGeneral, "debugOrevein", false).getBoolean(false); + GT_Values.debugSmallOres = + tMainConfig.get(GT_Mod.aTextGeneral, "debugSmallOres", false).getBoolean(false); + GT_Values.debugStones = + tMainConfig.get(GT_Mod.aTextGeneral, "debugStones", false).getBoolean(false); + GT_Values.debugBlockMiner = + tMainConfig.get(GT_Mod.aTextGeneral, "debugBlockMiner", false).getBoolean(false); + GT_Values.debugBlockPump = + tMainConfig.get(GT_Mod.aTextGeneral, "debugBlockPump", false).getBoolean(false); + GT_Values.debugEntityCramming = tMainConfig + .get(GT_Mod.aTextGeneral, "debugEntityCramming", false) + .getBoolean(false); + GT_Values.debugWorldData = + tMainConfig.get(GT_Mod.aTextGeneral, "debugWorldData", false).getBoolean(false); + GT_Values.oreveinPercentage = tMainConfig + .get(GT_Mod.aTextGeneral, "oreveinPercentage_100", 100) + .getInt(100); + GT_Values.oreveinAttempts = + tMainConfig.get(GT_Mod.aTextGeneral, "oreveinAttempts_64", 64).getInt(64); + GT_Values.oreveinMaxPlacementAttempts = tMainConfig + .get(GT_Mod.aTextGeneral, "oreveinMaxPlacementAttempts_8", 8) + .getInt(8); + GT_Values.oreveinPlacerOres = + tMainConfig.get(GT_Mod.aTextGeneral, "oreveinPlacerOres", true).getBoolean(true); + GT_Values.oreveinPlacerOresMultiplier = tMainConfig + .get(GT_Mod.aTextGeneral, "oreveinPlacerOresMultiplier", 2) + .getInt(2); + // GT_Values.oreveinMaxSize = tMainConfig.get(aTextGeneral, "oreveinMaxSize_64",64).getInt(64); + GT_Values.ticksBetweenSounds = + tMainConfig.get("machines", "TicksBetweenSounds", 30).getInt(30); + GT_Values.cleanroomGlass = (float) tMainConfig + .get("machines", "ReinforcedGlassPercentageForCleanroom", 5D) + .getDouble(5D); + GT_Values.enableChunkloaders = + tMainConfig.get("machines", "enableChunkloaders", true).getBoolean(true); + GT_Values.alwaysReloadChunkloaders = + tMainConfig.get("machines", "alwaysReloadChunkloaders", false).getBoolean(false); + GT_Values.debugChunkloaders = + tMainConfig.get("machines", "debugChunkloaders", false).getBoolean(false); + GT_Values.disableDigitalChestsExternalAccess = tMainConfig + .get("machines", "disableDigitalChestsExternalAccess", false) + .getBoolean(false); + GregTech_API.TICKS_FOR_LAG_AVERAGING = tMainConfig + .get(GT_Mod.aTextGeneral, "TicksForLagAveragingWithScanner", 25) + .getInt(25); + GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING = tMainConfig + .get(GT_Mod.aTextGeneral, "MillisecondsPassedInGTTileEntityUntilLagWarning", 100) + .getInt(100); if (tMainConfig.get(GT_Mod.aTextGeneral, "disable_STDOUT", false).getBoolean(false)) { GT_FML_LOGGER.info("Disableing Console Messages."); GT_FML_LOGGER.exit(); System.out.close(); System.err.close(); } - GregTech_API.sMachineExplosions = tMainConfig.get("machines", "machines_explosion_damage", true).getBoolean(false); - GregTech_API.sMachineFlammable = tMainConfig.get("machines", "machines_flammable", true).getBoolean(false); - GregTech_API.sMachineNonWrenchExplosions = tMainConfig.get("machines", "explosions_on_nonwrenching", true).getBoolean(false); - GregTech_API.sMachineWireFire = tMainConfig.get("machines", "wirefire_on_explosion", true).getBoolean(false); - GregTech_API.sMachineFireExplosions = tMainConfig.get("machines", "fire_causes_explosions", true).getBoolean(false); - GregTech_API.sMachineRainExplosions = tMainConfig.get("machines", "rain_causes_explosions", true).getBoolean(false); - GregTech_API.sMachineThunderExplosions = tMainConfig.get("machines", "lightning_causes_explosions", true).getBoolean(false); - GregTech_API.sConstantEnergy = tMainConfig.get("machines", "constant_need_of_energy", true).getBoolean(false); - GregTech_API.sColoredGUI = tMainConfig.get("machines", "colored_guis_when_painted", true).getBoolean(false); - GregTech_API.sMachineMetalGUI = tMainConfig.get("machines", "guis_in_consistent_machine_metal_color", false).getBoolean(false); + GregTech_API.sMachineExplosions = + tMainConfig.get("machines", "machines_explosion_damage", true).getBoolean(false); + GregTech_API.sMachineFlammable = + tMainConfig.get("machines", "machines_flammable", true).getBoolean(false); + GregTech_API.sMachineNonWrenchExplosions = + tMainConfig.get("machines", "explosions_on_nonwrenching", true).getBoolean(false); + GregTech_API.sMachineWireFire = + tMainConfig.get("machines", "wirefire_on_explosion", true).getBoolean(false); + GregTech_API.sMachineFireExplosions = + tMainConfig.get("machines", "fire_causes_explosions", true).getBoolean(false); + GregTech_API.sMachineRainExplosions = + tMainConfig.get("machines", "rain_causes_explosions", true).getBoolean(false); + GregTech_API.sMachineThunderExplosions = + tMainConfig.get("machines", "lightning_causes_explosions", true).getBoolean(false); + GregTech_API.sConstantEnergy = + tMainConfig.get("machines", "constant_need_of_energy", true).getBoolean(false); + GregTech_API.sColoredGUI = + tMainConfig.get("machines", "colored_guis_when_painted", true).getBoolean(false); + GregTech_API.sMachineMetalGUI = tMainConfig + .get("machines", "guis_in_consistent_machine_metal_color", false) + .getBoolean(false); // Implementation for this is actually handled in NewHorizonsCoreMod in MainRegistry.java! - GregTech_API.sUseMachineMetal = tMainConfig.get("machines", "use_machine_metal_tint", true).getBoolean(true); - - GregTech_API.sTimber = tMainConfig.get(GT_Mod.aTextGeneral, "timber_axe", true).getBoolean(true); - GregTech_API.sDrinksAlwaysDrinkable = tMainConfig.get(GT_Mod.aTextGeneral, "drinks_always_drinkable", false).getBoolean(false); - GregTech_API.sDoShowAllItemsInCreative = tMainConfig.get(GT_Mod.aTextGeneral, "show_all_metaitems_in_creative_and_NEI", false).getBoolean(false); - GregTech_API.sMultiThreadedSounds = tMainConfig.get(GT_Mod.aTextGeneral, "sound_multi_threading", false).getBoolean(false); + GregTech_API.sUseMachineMetal = + tMainConfig.get("machines", "use_machine_metal_tint", true).getBoolean(true); + + GregTech_API.sTimber = + tMainConfig.get(GT_Mod.aTextGeneral, "timber_axe", true).getBoolean(true); + GregTech_API.sDrinksAlwaysDrinkable = tMainConfig + .get(GT_Mod.aTextGeneral, "drinks_always_drinkable", false) + .getBoolean(false); + GregTech_API.sDoShowAllItemsInCreative = tMainConfig + .get(GT_Mod.aTextGeneral, "show_all_metaitems_in_creative_and_NEI", false) + .getBoolean(false); + GregTech_API.sMultiThreadedSounds = tMainConfig + .get(GT_Mod.aTextGeneral, "sound_multi_threading", false) + .getBoolean(false); loadClientConfig(); - GT_Mod.gregtechproxy.mMaxEqualEntitiesAtOneSpot = tMainConfig.get(GT_Mod.aTextGeneral, "MaxEqualEntitiesAtOneSpot", 3).getInt(3); - GT_Mod.gregtechproxy.mSkeletonsShootGTArrows = tMainConfig.get(GT_Mod.aTextGeneral, "SkeletonsShootGTArrows", 16).getInt(16); - GT_Mod.gregtechproxy.mFlintChance = tMainConfig.get(GT_Mod.aTextGeneral, "FlintAndSteelChance", 30).getInt(30); - GT_Mod.gregtechproxy.mItemDespawnTime = tMainConfig.get(GT_Mod.aTextGeneral, "ItemDespawnTime", 6000).getInt(6000); - GT_Mod.gregtechproxy.mAllowSmallBoilerAutomation = tMainConfig.get(GT_Mod.aTextGeneral, "AllowSmallBoilerAutomation", false).getBoolean(false); - GT_Mod.gregtechproxy.mHardMachineCasings = tMainConfig.get(GT_Mod.aTextGeneral, "HardMachineCasings", true).getBoolean(true); - GT_Mod.gregtechproxy.mDisableVanillaOres = tMainConfig.get(GT_Mod.aTextGeneral, "DisableVanillaOres", true).getBoolean(true); - GT_Mod.gregtechproxy.mNerfDustCrafting = tMainConfig.get(GT_Mod.aTextGeneral, "NerfDustCrafting", true).getBoolean(true); - GT_Mod.gregtechproxy.mIncreaseDungeonLoot = tMainConfig.get(GT_Mod.aTextGeneral, "IncreaseDungeonLoot", true).getBoolean(true); - GT_Mod.gregtechproxy.mAxeWhenAdventure = tMainConfig.get(GT_Mod.aTextGeneral, "AdventureModeStartingAxe", true).getBoolean(true); - GT_Mod.gregtechproxy.mHardcoreCables = tMainConfig.get(GT_Mod.aTextGeneral, "HardCoreCableLoss", false).getBoolean(false); - GT_Mod.gregtechproxy.mSurvivalIntoAdventure = tMainConfig.get(GT_Mod.aTextGeneral, "forceAdventureMode", false).getBoolean(false); - GT_Mod.gregtechproxy.mHungerEffect = tMainConfig.get(GT_Mod.aTextGeneral, "AFK_Hunger", false).getBoolean(false); - GT_Mod.gregtechproxy.mHardRock = tMainConfig.get(GT_Mod.aTextGeneral, "harderstone", false).getBoolean(false); - GT_Mod.gregtechproxy.mInventoryUnification = tMainConfig.get(GT_Mod.aTextGeneral, "InventoryUnification", true).getBoolean(true); - GT_Mod.gregtechproxy.mGTBees = tMainConfig.get(GT_Mod.aTextGeneral, "GTBees", true).getBoolean(true); - GT_Mod.gregtechproxy.mCraftingUnification = tMainConfig.get(GT_Mod.aTextGeneral, "CraftingUnification", true).getBoolean(true); - GT_Mod.gregtechproxy.mNerfedWoodPlank = tMainConfig.get(GT_Mod.aTextGeneral, "WoodNeedsSawForCrafting", true).getBoolean(true); - GT_Mod.gregtechproxy.mNerfedVanillaTools = tMainConfig.get(GT_Mod.aTextGeneral, "smallerVanillaToolDurability", true).getBoolean(true); - GT_Mod.gregtechproxy.mSortToTheEnd = tMainConfig.get(GT_Mod.aTextGeneral, "EnsureToBeLoadedLast", true).getBoolean(true); - GT_Mod.gregtechproxy.mDisableIC2Cables = tMainConfig.get(GT_Mod.aTextGeneral, "DisableIC2Cables", true).getBoolean(true); - GT_Mod.gregtechproxy.mAchievements = tMainConfig.get(GT_Mod.aTextGeneral, "EnableAchievements", true).getBoolean(true); - GT_Mod.gregtechproxy.mAE2Integration = GregTech_API.sSpecialFile.get(ConfigCategories.general, "EnableAE2Integration", GregTech_API.mAE2); - GT_Mod.gregtechproxy.mNerfedCombs = tMainConfig.get(GT_Mod.aTextGeneral, "NerfCombs", true).getBoolean(true); - GT_Mod.gregtechproxy.mNerfedCrops = tMainConfig.get(GT_Mod.aTextGeneral, "NerfCrops", true).getBoolean(true); - GT_Mod.gregtechproxy.mHideUnusedOres = tMainConfig.get(GT_Mod.aTextGeneral, "HideUnusedOres", true).getBoolean(true); - GT_Mod.gregtechproxy.mHideRecyclingRecipes = tMainConfig.get(GT_Mod.aTextGeneral, "HideRecyclingRecipes", true).getBoolean(true); - GT_Mod.gregtechproxy.mArcSmeltIntoAnnealed = tMainConfig.get(GT_Mod.aTextGeneral, "ArcSmeltIntoAnnealedWrought", true).getBoolean(true); - GT_Mod.gregtechproxy.mEnableAllMaterials = tMainConfig.get("general", "EnableAllMaterials", false).getBoolean(false); - GT_Mod.gregtechproxy.mEnableAllComponents = tMainConfig.get("general", "EnableAllComponents", false).getBoolean(false); - - //Pollution: edit GT_Proxy.java to change default values - GT_Mod.gregtechproxy.mPollution = tMainConfig.get("Pollution", "EnablePollution", GT_Mod.gregtechproxy.mPollution).getBoolean( - GT_Mod.gregtechproxy.mPollution); - GT_Mod.gregtechproxy.mPollutionSmogLimit = tMainConfig.get("Pollution", "SmogLimit", GT_Mod.gregtechproxy.mPollutionSmogLimit).getInt( - GT_Mod.gregtechproxy.mPollutionSmogLimit); - GT_Mod.gregtechproxy.mPollutionPoisonLimit = tMainConfig.get("Pollution", "PoisonLimit", GT_Mod.gregtechproxy.mPollutionPoisonLimit).getInt( - GT_Mod.gregtechproxy.mPollutionPoisonLimit); - GT_Mod.gregtechproxy.mPollutionVegetationLimit = tMainConfig.get("Pollution", "VegetationLimit", GT_Mod.gregtechproxy.mPollutionVegetationLimit).getInt( - GT_Mod.gregtechproxy.mPollutionVegetationLimit); - GT_Mod.gregtechproxy.mPollutionSourRainLimit = tMainConfig.get("Pollution", "SourRainLimit", GT_Mod.gregtechproxy.mPollutionSourRainLimit).getInt( - GT_Mod.gregtechproxy.mPollutionSourRainLimit); - GT_Mod.gregtechproxy.mPollutionOnExplosion = tMainConfig.get("Pollution", "SourRainLimit", GT_Mod.gregtechproxy.mPollutionOnExplosion).getInt( - GT_Mod.gregtechproxy.mPollutionOnExplosion); - GT_Mod.gregtechproxy.mExplosionItemDrop = tMainConfig.get("general", "ExplosionItemDrops", GT_Mod.gregtechproxy.mExplosionItemDrop).getBoolean( - GT_Mod.gregtechproxy.mExplosionItemDrop); - GT_Mod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond = tMainConfig.get("Pollution", "PollutionPrimitiveBlastFurnace", GT_Mod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond).getInt( - GT_Mod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond); - GT_Mod.gregtechproxy.mPollutionCharcoalPitPerSecond = tMainConfig.get("Pollution", "PollutionCharcoalPit", GT_Mod.gregtechproxy.mPollutionCharcoalPitPerSecond).getInt( - GT_Mod.gregtechproxy.mPollutionCharcoalPitPerSecond); - GT_Mod.gregtechproxy.mPollutionEBFPerSecond = tMainConfig.get("Pollution", "PollutionEBF", GT_Mod.gregtechproxy.mPollutionEBFPerSecond).getInt( - GT_Mod.gregtechproxy.mPollutionEBFPerSecond); - GT_Mod.gregtechproxy.mPollutionLargeCombustionEnginePerSecond = tMainConfig.get("Pollution", "PollutionLargeCombustionEngine", GT_Mod.gregtechproxy.mPollutionLargeCombustionEnginePerSecond).getInt( - GT_Mod.gregtechproxy.mPollutionLargeCombustionEnginePerSecond); - GT_Mod.gregtechproxy.mPollutionExtremeCombustionEnginePerSecond = tMainConfig.get("Pollution", "PollutionExtremeCombustionEngine", GT_Mod.gregtechproxy.mPollutionExtremeCombustionEnginePerSecond).getInt( - GT_Mod.gregtechproxy.mPollutionExtremeCombustionEnginePerSecond); - GT_Mod.gregtechproxy.mPollutionImplosionCompressorPerSecond = tMainConfig.get("Pollution", "PollutionImplosionCompressor", GT_Mod.gregtechproxy.mPollutionImplosionCompressorPerSecond).getInt( - GT_Mod.gregtechproxy.mPollutionImplosionCompressorPerSecond); - GT_Mod.gregtechproxy.mPollutionLargeBronzeBoilerPerSecond = tMainConfig.get("Pollution", "PollutionLargeBronzeBoiler", GT_Mod.gregtechproxy.mPollutionLargeBronzeBoilerPerSecond).getInt( - GT_Mod.gregtechproxy.mPollutionLargeBronzeBoilerPerSecond); - GT_Mod.gregtechproxy.mPollutionLargeSteelBoilerPerSecond = tMainConfig.get("Pollution", "PollutionLargeSteelBoiler", GT_Mod.gregtechproxy.mPollutionLargeSteelBoilerPerSecond).getInt( - GT_Mod.gregtechproxy.mPollutionLargeSteelBoilerPerSecond); - GT_Mod.gregtechproxy.mPollutionLargeTitaniumBoilerPerSecond = tMainConfig.get("Pollution", "PollutionLargeTitaniumBoiler", GT_Mod.gregtechproxy.mPollutionLargeTitaniumBoilerPerSecond).getInt( - GT_Mod.gregtechproxy.mPollutionLargeTitaniumBoilerPerSecond); - GT_Mod.gregtechproxy.mPollutionLargeTungstenSteelBoilerPerSecond = tMainConfig.get("Pollution", "PollutionLargeTungstenSteelBoiler", GT_Mod.gregtechproxy.mPollutionLargeTungstenSteelBoilerPerSecond).getInt( - GT_Mod.gregtechproxy.mPollutionLargeTungstenSteelBoilerPerSecond); - GT_Mod.gregtechproxy.mPollutionReleasedByThrottle = tMainConfig.get("Pollution", "PollutionReleasedByThrottle", GT_Mod.gregtechproxy.mPollutionReleasedByThrottle).getDouble( - GT_Mod.gregtechproxy.mPollutionReleasedByThrottle); - GT_Mod.gregtechproxy.mPollutionLargeGasTurbinePerSecond = tMainConfig.get("Pollution", "PollutionLargeGasTurbine", GT_Mod.gregtechproxy.mPollutionLargeGasTurbinePerSecond).getInt( - GT_Mod.gregtechproxy.mPollutionLargeGasTurbinePerSecond); - GT_Mod.gregtechproxy.mPollutionMultiSmelterPerSecond = tMainConfig.get("Pollution", "PollutionMultiSmelter", GT_Mod.gregtechproxy.mPollutionMultiSmelterPerSecond).getInt( - GT_Mod.gregtechproxy.mPollutionMultiSmelterPerSecond); - GT_Mod.gregtechproxy.mPollutionPyrolyseOvenPerSecond = tMainConfig.get("Pollution", "PollutionPyrolyseOven", GT_Mod.gregtechproxy.mPollutionPyrolyseOvenPerSecond).getInt( - GT_Mod.gregtechproxy.mPollutionPyrolyseOvenPerSecond); - GT_Mod.gregtechproxy.mPollutionSmallCoalBoilerPerSecond = tMainConfig.get("Pollution", "PollutionSmallCoalBoiler", GT_Mod.gregtechproxy.mPollutionSmallCoalBoilerPerSecond).getInt( - GT_Mod.gregtechproxy.mPollutionSmallCoalBoilerPerSecond); - GT_Mod.gregtechproxy.mPollutionHighPressureLavaBoilerPerSecond = tMainConfig.get("Pollution", "PollutionHighPressureLavaBoiler", GT_Mod.gregtechproxy.mPollutionHighPressureLavaBoilerPerSecond).getInt( - GT_Mod.gregtechproxy.mPollutionHighPressureLavaBoilerPerSecond); - GT_Mod.gregtechproxy.mPollutionHighPressureCoalBoilerPerSecond = tMainConfig.get("Pollution", "PollutionHighPressureCoalBoiler", GT_Mod.gregtechproxy.mPollutionHighPressureCoalBoilerPerSecond).getInt( - GT_Mod.gregtechproxy.mPollutionHighPressureCoalBoilerPerSecond); - GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond = tMainConfig.get("Pollution", "PollutionBaseDieselGenerator", GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond).getInt( - GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond); - GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier = tMainConfig.get("Pollution", "PollutionReleasedByTierDieselGenerator", GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier).getDoubleList(); - GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond = tMainConfig.get("Pollution", "PollutionBaseGasTurbineGenerator", GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond).getInt( - GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond); - GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier = tMainConfig.get("Pollution", "PollutionReleasedByTierGasTurbineGenerator", GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier).getDoubleList(); + GT_Mod.gregtechproxy.mMaxEqualEntitiesAtOneSpot = tMainConfig + .get(GT_Mod.aTextGeneral, "MaxEqualEntitiesAtOneSpot", 3) + .getInt(3); + GT_Mod.gregtechproxy.mSkeletonsShootGTArrows = tMainConfig + .get(GT_Mod.aTextGeneral, "SkeletonsShootGTArrows", 16) + .getInt(16); + GT_Mod.gregtechproxy.mFlintChance = + tMainConfig.get(GT_Mod.aTextGeneral, "FlintAndSteelChance", 30).getInt(30); + GT_Mod.gregtechproxy.mItemDespawnTime = + tMainConfig.get(GT_Mod.aTextGeneral, "ItemDespawnTime", 6000).getInt(6000); + GT_Mod.gregtechproxy.mAllowSmallBoilerAutomation = tMainConfig + .get(GT_Mod.aTextGeneral, "AllowSmallBoilerAutomation", false) + .getBoolean(false); + GT_Mod.gregtechproxy.mHardMachineCasings = + tMainConfig.get(GT_Mod.aTextGeneral, "HardMachineCasings", true).getBoolean(true); + GT_Mod.gregtechproxy.mDisableVanillaOres = + tMainConfig.get(GT_Mod.aTextGeneral, "DisableVanillaOres", true).getBoolean(true); + GT_Mod.gregtechproxy.mNerfDustCrafting = + tMainConfig.get(GT_Mod.aTextGeneral, "NerfDustCrafting", true).getBoolean(true); + GT_Mod.gregtechproxy.mIncreaseDungeonLoot = tMainConfig + .get(GT_Mod.aTextGeneral, "IncreaseDungeonLoot", true) + .getBoolean(true); + GT_Mod.gregtechproxy.mAxeWhenAdventure = tMainConfig + .get(GT_Mod.aTextGeneral, "AdventureModeStartingAxe", true) + .getBoolean(true); + GT_Mod.gregtechproxy.mHardcoreCables = + tMainConfig.get(GT_Mod.aTextGeneral, "HardCoreCableLoss", false).getBoolean(false); + GT_Mod.gregtechproxy.mSurvivalIntoAdventure = tMainConfig + .get(GT_Mod.aTextGeneral, "forceAdventureMode", false) + .getBoolean(false); + GT_Mod.gregtechproxy.mHungerEffect = + tMainConfig.get(GT_Mod.aTextGeneral, "AFK_Hunger", false).getBoolean(false); + GT_Mod.gregtechproxy.mHardRock = + tMainConfig.get(GT_Mod.aTextGeneral, "harderstone", false).getBoolean(false); + GT_Mod.gregtechproxy.mInventoryUnification = tMainConfig + .get(GT_Mod.aTextGeneral, "InventoryUnification", true) + .getBoolean(true); + GT_Mod.gregtechproxy.mGTBees = + tMainConfig.get(GT_Mod.aTextGeneral, "GTBees", true).getBoolean(true); + GT_Mod.gregtechproxy.mCraftingUnification = tMainConfig + .get(GT_Mod.aTextGeneral, "CraftingUnification", true) + .getBoolean(true); + GT_Mod.gregtechproxy.mNerfedWoodPlank = tMainConfig + .get(GT_Mod.aTextGeneral, "WoodNeedsSawForCrafting", true) + .getBoolean(true); + GT_Mod.gregtechproxy.mNerfedVanillaTools = tMainConfig + .get(GT_Mod.aTextGeneral, "smallerVanillaToolDurability", true) + .getBoolean(true); + GT_Mod.gregtechproxy.mSortToTheEnd = tMainConfig + .get(GT_Mod.aTextGeneral, "EnsureToBeLoadedLast", true) + .getBoolean(true); + GT_Mod.gregtechproxy.mDisableIC2Cables = + tMainConfig.get(GT_Mod.aTextGeneral, "DisableIC2Cables", true).getBoolean(true); + GT_Mod.gregtechproxy.mAchievements = + tMainConfig.get(GT_Mod.aTextGeneral, "EnableAchievements", true).getBoolean(true); + GT_Mod.gregtechproxy.mAE2Integration = + GregTech_API.sSpecialFile.get(ConfigCategories.general, "EnableAE2Integration", GregTech_API.mAE2); + GT_Mod.gregtechproxy.mNerfedCombs = + tMainConfig.get(GT_Mod.aTextGeneral, "NerfCombs", true).getBoolean(true); + GT_Mod.gregtechproxy.mNerfedCrops = + tMainConfig.get(GT_Mod.aTextGeneral, "NerfCrops", true).getBoolean(true); + GT_Mod.gregtechproxy.mHideUnusedOres = + tMainConfig.get(GT_Mod.aTextGeneral, "HideUnusedOres", true).getBoolean(true); + GT_Mod.gregtechproxy.mHideRecyclingRecipes = tMainConfig + .get(GT_Mod.aTextGeneral, "HideRecyclingRecipes", true) + .getBoolean(true); + GT_Mod.gregtechproxy.mArcSmeltIntoAnnealed = tMainConfig + .get(GT_Mod.aTextGeneral, "ArcSmeltIntoAnnealedWrought", true) + .getBoolean(true); + GT_Mod.gregtechproxy.mEnableAllMaterials = + tMainConfig.get("general", "EnableAllMaterials", false).getBoolean(false); + GT_Mod.gregtechproxy.mEnableAllComponents = + tMainConfig.get("general", "EnableAllComponents", false).getBoolean(false); + + // Pollution: edit GT_Proxy.java to change default values + GT_Mod.gregtechproxy.mPollution = tMainConfig + .get("Pollution", "EnablePollution", GT_Mod.gregtechproxy.mPollution) + .getBoolean(GT_Mod.gregtechproxy.mPollution); + GT_Mod.gregtechproxy.mPollutionSmogLimit = tMainConfig + .get("Pollution", "SmogLimit", GT_Mod.gregtechproxy.mPollutionSmogLimit) + .getInt(GT_Mod.gregtechproxy.mPollutionSmogLimit); + GT_Mod.gregtechproxy.mPollutionPoisonLimit = tMainConfig + .get("Pollution", "PoisonLimit", GT_Mod.gregtechproxy.mPollutionPoisonLimit) + .getInt(GT_Mod.gregtechproxy.mPollutionPoisonLimit); + GT_Mod.gregtechproxy.mPollutionVegetationLimit = tMainConfig + .get("Pollution", "VegetationLimit", GT_Mod.gregtechproxy.mPollutionVegetationLimit) + .getInt(GT_Mod.gregtechproxy.mPollutionVegetationLimit); + GT_Mod.gregtechproxy.mPollutionSourRainLimit = tMainConfig + .get("Pollution", "SourRainLimit", GT_Mod.gregtechproxy.mPollutionSourRainLimit) + .getInt(GT_Mod.gregtechproxy.mPollutionSourRainLimit); + GT_Mod.gregtechproxy.mPollutionOnExplosion = tMainConfig + .get("Pollution", "SourRainLimit", GT_Mod.gregtechproxy.mPollutionOnExplosion) + .getInt(GT_Mod.gregtechproxy.mPollutionOnExplosion); + GT_Mod.gregtechproxy.mExplosionItemDrop = tMainConfig + .get("general", "ExplosionItemDrops", GT_Mod.gregtechproxy.mExplosionItemDrop) + .getBoolean(GT_Mod.gregtechproxy.mExplosionItemDrop); + GT_Mod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond = tMainConfig + .get( + "Pollution", + "PollutionPrimitiveBlastFurnace", + GT_Mod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond) + .getInt(GT_Mod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond); + GT_Mod.gregtechproxy.mPollutionCharcoalPitPerSecond = tMainConfig + .get("Pollution", "PollutionCharcoalPit", GT_Mod.gregtechproxy.mPollutionCharcoalPitPerSecond) + .getInt(GT_Mod.gregtechproxy.mPollutionCharcoalPitPerSecond); + GT_Mod.gregtechproxy.mPollutionEBFPerSecond = tMainConfig + .get("Pollution", "PollutionEBF", GT_Mod.gregtechproxy.mPollutionEBFPerSecond) + .getInt(GT_Mod.gregtechproxy.mPollutionEBFPerSecond); + GT_Mod.gregtechproxy.mPollutionLargeCombustionEnginePerSecond = tMainConfig + .get( + "Pollution", + "PollutionLargeCombustionEngine", + GT_Mod.gregtechproxy.mPollutionLargeCombustionEnginePerSecond) + .getInt(GT_Mod.gregtechproxy.mPollutionLargeCombustionEnginePerSecond); + GT_Mod.gregtechproxy.mPollutionExtremeCombustionEnginePerSecond = tMainConfig + .get( + "Pollution", + "PollutionExtremeCombustionEngine", + GT_Mod.gregtechproxy.mPollutionExtremeCombustionEnginePerSecond) + .getInt(GT_Mod.gregtechproxy.mPollutionExtremeCombustionEnginePerSecond); + GT_Mod.gregtechproxy.mPollutionImplosionCompressorPerSecond = tMainConfig + .get( + "Pollution", + "PollutionImplosionCompressor", + GT_Mod.gregtechproxy.mPollutionImplosionCompressorPerSecond) + .getInt(GT_Mod.gregtechproxy.mPollutionImplosionCompressorPerSecond); + GT_Mod.gregtechproxy.mPollutionLargeBronzeBoilerPerSecond = tMainConfig + .get( + "Pollution", + "PollutionLargeBronzeBoiler", + GT_Mod.gregtechproxy.mPollutionLargeBronzeBoilerPerSecond) + .getInt(GT_Mod.gregtechproxy.mPollutionLargeBronzeBoilerPerSecond); + GT_Mod.gregtechproxy.mPollutionLargeSteelBoilerPerSecond = tMainConfig + .get("Pollution", "PollutionLargeSteelBoiler", GT_Mod.gregtechproxy.mPollutionLargeSteelBoilerPerSecond) + .getInt(GT_Mod.gregtechproxy.mPollutionLargeSteelBoilerPerSecond); + GT_Mod.gregtechproxy.mPollutionLargeTitaniumBoilerPerSecond = tMainConfig + .get( + "Pollution", + "PollutionLargeTitaniumBoiler", + GT_Mod.gregtechproxy.mPollutionLargeTitaniumBoilerPerSecond) + .getInt(GT_Mod.gregtechproxy.mPollutionLargeTitaniumBoilerPerSecond); + GT_Mod.gregtechproxy.mPollutionLargeTungstenSteelBoilerPerSecond = tMainConfig + .get( + "Pollution", + "PollutionLargeTungstenSteelBoiler", + GT_Mod.gregtechproxy.mPollutionLargeTungstenSteelBoilerPerSecond) + .getInt(GT_Mod.gregtechproxy.mPollutionLargeTungstenSteelBoilerPerSecond); + GT_Mod.gregtechproxy.mPollutionReleasedByThrottle = tMainConfig + .get("Pollution", "PollutionReleasedByThrottle", GT_Mod.gregtechproxy.mPollutionReleasedByThrottle) + .getDouble(GT_Mod.gregtechproxy.mPollutionReleasedByThrottle); + GT_Mod.gregtechproxy.mPollutionLargeGasTurbinePerSecond = tMainConfig + .get("Pollution", "PollutionLargeGasTurbine", GT_Mod.gregtechproxy.mPollutionLargeGasTurbinePerSecond) + .getInt(GT_Mod.gregtechproxy.mPollutionLargeGasTurbinePerSecond); + GT_Mod.gregtechproxy.mPollutionMultiSmelterPerSecond = tMainConfig + .get("Pollution", "PollutionMultiSmelter", GT_Mod.gregtechproxy.mPollutionMultiSmelterPerSecond) + .getInt(GT_Mod.gregtechproxy.mPollutionMultiSmelterPerSecond); + GT_Mod.gregtechproxy.mPollutionPyrolyseOvenPerSecond = tMainConfig + .get("Pollution", "PollutionPyrolyseOven", GT_Mod.gregtechproxy.mPollutionPyrolyseOvenPerSecond) + .getInt(GT_Mod.gregtechproxy.mPollutionPyrolyseOvenPerSecond); + GT_Mod.gregtechproxy.mPollutionSmallCoalBoilerPerSecond = tMainConfig + .get("Pollution", "PollutionSmallCoalBoiler", GT_Mod.gregtechproxy.mPollutionSmallCoalBoilerPerSecond) + .getInt(GT_Mod.gregtechproxy.mPollutionSmallCoalBoilerPerSecond); + GT_Mod.gregtechproxy.mPollutionHighPressureLavaBoilerPerSecond = tMainConfig + .get( + "Pollution", + "PollutionHighPressureLavaBoiler", + GT_Mod.gregtechproxy.mPollutionHighPressureLavaBoilerPerSecond) + .getInt(GT_Mod.gregtechproxy.mPollutionHighPressureLavaBoilerPerSecond); + GT_Mod.gregtechproxy.mPollutionHighPressureCoalBoilerPerSecond = tMainConfig + .get( + "Pollution", + "PollutionHighPressureCoalBoiler", + GT_Mod.gregtechproxy.mPollutionHighPressureCoalBoilerPerSecond) + .getInt(GT_Mod.gregtechproxy.mPollutionHighPressureCoalBoilerPerSecond); + GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond = tMainConfig + .get( + "Pollution", + "PollutionBaseDieselGenerator", + GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond) + .getInt(GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond); + GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier = tMainConfig + .get( + "Pollution", + "PollutionReleasedByTierDieselGenerator", + GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier) + .getDoubleList(); + GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond = tMainConfig + .get( + "Pollution", + "PollutionBaseGasTurbineGenerator", + GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond) + .getInt(GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond); + GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier = tMainConfig + .get( + "Pollution", + "PollutionReleasedByTierGasTurbineGenerator", + GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier) + .getDoubleList(); GT_Mod.gregtechproxy.mUndergroundOil.getConfig(tMainConfig, "undergroundfluid"); - GT_Mod.gregtechproxy.mEnableCleanroom = tMainConfig.get("general", "EnableCleanroom", true).getBoolean(true); - if (GT_Mod.gregtechproxy.mEnableCleanroom) - GT_MetaTileEntity_Cleanroom.loadConfig(tMainConfig); - GT_Mod.gregtechproxy.mLowGravProcessing = Loader.isModLoaded(GT_Values.MOD_ID_GC_CORE) && tMainConfig.get("general", "LowGravProcessing", true).getBoolean(true); - GT_Mod.gregtechproxy.mUseGreatlyShrukenReplacementList = tMainConfig.get("general", "GTNH Optimised Material Loading", true).getBoolean(true); + GT_Mod.gregtechproxy.mEnableCleanroom = + tMainConfig.get("general", "EnableCleanroom", true).getBoolean(true); + if (GT_Mod.gregtechproxy.mEnableCleanroom) GT_MetaTileEntity_Cleanroom.loadConfig(tMainConfig); + GT_Mod.gregtechproxy.mLowGravProcessing = Loader.isModLoaded(GT_Values.MOD_ID_GC_CORE) + && tMainConfig.get("general", "LowGravProcessing", true).getBoolean(true); + GT_Mod.gregtechproxy.mUseGreatlyShrukenReplacementList = tMainConfig + .get("general", "GTNH Optimised Material Loading", true) + .getBoolean(true); Calendar now = Calendar.getInstance(); - GT_Mod.gregtechproxy.mAprilFool = GregTech_API.sSpecialFile.get(ConfigCategories.general, "AprilFool", now.get(Calendar.MONTH) == Calendar.APRIL && now.get(Calendar.DAY_OF_MONTH) == 1); - GT_Mod.gregtechproxy.mCropNeedBlock = tMainConfig.get("general", "CropNeedBlockBelow", true).getBoolean(true); - GT_Mod.gregtechproxy.mDisableOldChemicalRecipes = tMainConfig.get("general", "DisableOldChemicalRecipes", false).getBoolean(false); - GT_Mod.gregtechproxy.mAMHInteraction = tMainConfig.get("general", "AllowAutoMaintenanceHatchInteraction", false).getBoolean(false); + GT_Mod.gregtechproxy.mAprilFool = GregTech_API.sSpecialFile.get( + ConfigCategories.general, + "AprilFool", + now.get(Calendar.MONTH) == Calendar.APRIL && now.get(Calendar.DAY_OF_MONTH) == 1); + GT_Mod.gregtechproxy.mCropNeedBlock = + tMainConfig.get("general", "CropNeedBlockBelow", true).getBoolean(true); + GT_Mod.gregtechproxy.mDisableOldChemicalRecipes = + tMainConfig.get("general", "DisableOldChemicalRecipes", false).getBoolean(false); + GT_Mod.gregtechproxy.mAMHInteraction = tMainConfig + .get("general", "AllowAutoMaintenanceHatchInteraction", false) + .getBoolean(false); GregTech_API.mOutputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "OutputRF", true); GregTech_API.mInputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "InputRF", false); GregTech_API.mEUtoRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "100EUtoRF", 360); GregTech_API.mRFtoEU = GregTech_API.sOPStuff.get(ConfigCategories.general, "100RFtoEU", 20); GregTech_API.mRFExplosions = GregTech_API.sOPStuff.get(ConfigCategories.general, "RFExplosions", false); GregTech_API.meIOLoaded = Loader.isModLoaded("EnderIO"); - GT_Mod.gregtechproxy.mForceFreeFace = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "forceFreeFace", true); - GT_Mod.gregtechproxy.mBrickedBlastFurnace = tMainConfig.get("general", "BrickedBlastFurnace", true).getBoolean(true); - GT_Mod.gregtechproxy.mEasierIVPlusCables = tMainConfig.get("general", "EasierEVPlusCables", false).getBoolean(false); - GT_Mod.gregtechproxy.mMixedOreOnlyYieldsTwoThirdsOfPureOre = tMainConfig.get("general", "MixedOreOnlyYieldsTwoThirdsOfPureOre", false).getBoolean(false); - GT_Mod.gregtechproxy.enableBlackGraniteOres = GregTech_API.sWorldgenFile.get("general", "enableBlackGraniteOres", GT_Mod.gregtechproxy.enableBlackGraniteOres); - GT_Mod.gregtechproxy.enableRedGraniteOres = GregTech_API.sWorldgenFile.get("general", "enableRedGraniteOres", GT_Mod.gregtechproxy.enableRedGraniteOres); - GT_Mod.gregtechproxy.enableMarbleOres = GregTech_API.sWorldgenFile.get("general", "enableMarbleOres", GT_Mod.gregtechproxy.enableMarbleOres); - GT_Mod.gregtechproxy.enableBasaltOres = GregTech_API.sWorldgenFile.get("general", "enableBasaltOres", GT_Mod.gregtechproxy.enableBasaltOres); - GT_Mod.gregtechproxy.gt6Pipe = tMainConfig.get("general", "GT6StyledPipesConnection", true).getBoolean(true); - GT_Mod.gregtechproxy.gt6Cable = tMainConfig.get("general", "GT6StyledWiresConnection", true).getBoolean(true); - GT_Mod.gregtechproxy.ic2EnergySourceCompat = tMainConfig.get("general", "Ic2EnergySourceCompat", true).getBoolean(true); - GT_Mod.gregtechproxy.costlyCableConnection = tMainConfig.get("general", "CableConnectionRequiresSolderingMaterial", false).getBoolean(false); - GT_LanguageManager.i18nPlaceholder = tMainConfig.get("general", "EnablePlaceholderForMaterialNamesInLangFile", true).getBoolean(true); - GT_MetaTileEntity_LongDistancePipelineBase.minimalDistancePoints = tMainConfig.get("general", "LongDistancePipelineMinimalDistancePoints", 64).getInt(64); - - GregTech_API.mUseOnlyGoodSolderingMaterials = GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "useonlygoodsolderingmaterials", GregTech_API.mUseOnlyGoodSolderingMaterials); - GT_Mod.gregtechproxy.mChangeHarvestLevels = GregTech_API.sMaterialProperties.get("havestLevel", "activateHarvestLevelChange", false);//TODO CHECK + GT_Mod.gregtechproxy.mForceFreeFace = + GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "forceFreeFace", true); + GT_Mod.gregtechproxy.mBrickedBlastFurnace = + tMainConfig.get("general", "BrickedBlastFurnace", true).getBoolean(true); + GT_Mod.gregtechproxy.mEasierIVPlusCables = + tMainConfig.get("general", "EasierEVPlusCables", false).getBoolean(false); + GT_Mod.gregtechproxy.mMixedOreOnlyYieldsTwoThirdsOfPureOre = tMainConfig + .get("general", "MixedOreOnlyYieldsTwoThirdsOfPureOre", false) + .getBoolean(false); + GT_Mod.gregtechproxy.enableBlackGraniteOres = GregTech_API.sWorldgenFile.get( + "general", "enableBlackGraniteOres", GT_Mod.gregtechproxy.enableBlackGraniteOres); + GT_Mod.gregtechproxy.enableRedGraniteOres = GregTech_API.sWorldgenFile.get( + "general", "enableRedGraniteOres", GT_Mod.gregtechproxy.enableRedGraniteOres); + GT_Mod.gregtechproxy.enableMarbleOres = + GregTech_API.sWorldgenFile.get("general", "enableMarbleOres", GT_Mod.gregtechproxy.enableMarbleOres); + GT_Mod.gregtechproxy.enableBasaltOres = + GregTech_API.sWorldgenFile.get("general", "enableBasaltOres", GT_Mod.gregtechproxy.enableBasaltOres); + GT_Mod.gregtechproxy.gt6Pipe = + tMainConfig.get("general", "GT6StyledPipesConnection", true).getBoolean(true); + GT_Mod.gregtechproxy.gt6Cable = + tMainConfig.get("general", "GT6StyledWiresConnection", true).getBoolean(true); + GT_Mod.gregtechproxy.ic2EnergySourceCompat = + tMainConfig.get("general", "Ic2EnergySourceCompat", true).getBoolean(true); + GT_Mod.gregtechproxy.costlyCableConnection = tMainConfig + .get("general", "CableConnectionRequiresSolderingMaterial", false) + .getBoolean(false); + GT_LanguageManager.i18nPlaceholder = tMainConfig + .get("general", "EnablePlaceholderForMaterialNamesInLangFile", true) + .getBoolean(true); + GT_MetaTileEntity_LongDistancePipelineBase.minimalDistancePoints = tMainConfig + .get("general", "LongDistancePipelineMinimalDistancePoints", 64) + .getInt(64); + + GregTech_API.mUseOnlyGoodSolderingMaterials = GregTech_API.sRecipeFile.get( + ConfigCategories.Recipes.harderrecipes, + "useonlygoodsolderingmaterials", + GregTech_API.mUseOnlyGoodSolderingMaterials); + GT_Mod.gregtechproxy.mChangeHarvestLevels = + GregTech_API.sMaterialProperties.get("havestLevel", "activateHarvestLevelChange", false); // TODO CHECK if (GT_Mod.gregtechproxy.mChangeHarvestLevels) { - GT_Mod.gregtechproxy.mGraniteHavestLevel = GregTech_API.sMaterialProperties.get("havestLevel", "graniteHarvestLevel", 3); - GT_Mod.gregtechproxy.mMaxHarvestLevel = Math.min(15, GregTech_API.sMaterialProperties.get("havestLevel", "maxLevel", 7)); - Materials.getMaterialsMap().values().parallelStream().filter(tMaterial -> tMaterial != null && tMaterial.mToolQuality > 0 && tMaterial.mMetaItemSubID < GT_Mod.gregtechproxy.mHarvestLevel.length && tMaterial.mMetaItemSubID >= 0).forEach( - tMaterial -> GT_Mod.gregtechproxy.mHarvestLevel[tMaterial.mMetaItemSubID] = GregTech_API.sMaterialProperties.get("materialHavestLevel", tMaterial.mDefaultLocalName, tMaterial.mToolQuality) - ); + GT_Mod.gregtechproxy.mGraniteHavestLevel = + GregTech_API.sMaterialProperties.get("havestLevel", "graniteHarvestLevel", 3); + GT_Mod.gregtechproxy.mMaxHarvestLevel = + Math.min(15, GregTech_API.sMaterialProperties.get("havestLevel", "maxLevel", 7)); + Materials.getMaterialsMap().values().parallelStream() + .filter(tMaterial -> tMaterial != null + && tMaterial.mToolQuality > 0 + && tMaterial.mMetaItemSubID < GT_Mod.gregtechproxy.mHarvestLevel.length + && tMaterial.mMetaItemSubID >= 0) + .forEach(tMaterial -> GT_Mod.gregtechproxy.mHarvestLevel[tMaterial.mMetaItemSubID] = + GregTech_API.sMaterialProperties.get( + "materialHavestLevel", tMaterial.mDefaultLocalName, tMaterial.mToolQuality)); } if (tMainConfig.get("general", "hardermobspawners", true).getBoolean(true)) { Blocks.mob_spawner.setHardness(500.0F).setResistance(6000000.0F); } - GT_Mod.gregtechproxy.mOnline = tMainConfig.get(GT_Mod.aTextGeneral, "online", true).getBoolean(false); + GT_Mod.gregtechproxy.mOnline = + tMainConfig.get(GT_Mod.aTextGeneral, "online", true).getBoolean(false); - GT_Mod.gregtechproxy.mUpgradeCount = Math.min(64, Math.max(1, tMainConfig.get("features", "UpgradeStacksize", 4).getInt())); + GT_Mod.gregtechproxy.mUpgradeCount = Math.min( + 64, + Math.max(1, tMainConfig.get("features", "UpgradeStacksize", 4).getInt())); for (OrePrefixes tPrefix : OrePrefixes.values()) { if (tPrefix.mIsUsedForOreProcessing) { - tPrefix.mDefaultStackSize = ((byte) Math.min(64, Math.max(1, tMainConfig.get("features", "MaxOreStackSize", 64).getInt()))); + tPrefix.mDefaultStackSize = ((byte) Math.min( + 64, + Math.max( + 1, + tMainConfig + .get("features", "MaxOreStackSize", 64) + .getInt()))); } else if (tPrefix == OrePrefixes.plank) { - tPrefix.mDefaultStackSize = ((byte) Math.min(64, Math.max(16, tMainConfig.get("features", "MaxPlankStackSize", 64).getInt()))); - } else if ((tPrefix == OrePrefixes.wood) || (tPrefix == OrePrefixes.treeLeaves) || (tPrefix == OrePrefixes.treeSapling) || (tPrefix == OrePrefixes.log)) { - tPrefix.mDefaultStackSize = ((byte) Math.min(64, Math.max(16, tMainConfig.get("features", "MaxLogStackSize", 64).getInt()))); + tPrefix.mDefaultStackSize = ((byte) Math.min( + 64, + Math.max( + 16, + tMainConfig + .get("features", "MaxPlankStackSize", 64) + .getInt()))); + } else if ((tPrefix == OrePrefixes.wood) + || (tPrefix == OrePrefixes.treeLeaves) + || (tPrefix == OrePrefixes.treeSapling) + || (tPrefix == OrePrefixes.log)) { + tPrefix.mDefaultStackSize = ((byte) Math.min( + 64, + Math.max( + 16, + tMainConfig + .get("features", "MaxLogStackSize", 64) + .getInt()))); } else if (tPrefix.mIsUsedForBlocks) { - tPrefix.mDefaultStackSize = ((byte) Math.min(64, Math.max(16, tMainConfig.get("features", "MaxOtherBlockStackSize", 64).getInt()))); + tPrefix.mDefaultStackSize = ((byte) Math.min( + 64, + Math.max( + 16, + tMainConfig + .get("features", "MaxOtherBlockStackSize", 64) + .getInt()))); } } - GT_Values.mCTMEnabledBlock.addAll(Arrays.asList(tMainConfig.get("general", "ctm_block_whitelist", new String[]{"team.chisel.block.BlockCarvable", "team.chisel.block.BlockCarvableGlass"}).getStringList())); - GT_Values.mCTMDisabledBlock.addAll(Arrays.asList(tMainConfig.get("general", "ctm_block_blacklist", new String[]{"team.chisel.block.BlockRoadLine"}).getStringList())); + GT_Values.mCTMEnabledBlock.addAll(Arrays.asList(tMainConfig + .get("general", "ctm_block_whitelist", new String[] { + "team.chisel.block.BlockCarvable", "team.chisel.block.BlockCarvableGlass" + }) + .getStringList())); + GT_Values.mCTMDisabledBlock.addAll(Arrays.asList(tMainConfig + .get("general", "ctm_block_blacklist", new String[] {"team.chisel.block.BlockRoadLine"}) + .getStringList())); } public static void loadClientConfig() { final String sBDye0 = "ColorModulation."; - Arrays.stream(Dyes.values()).filter(tDye -> (tDye != Dyes._NULL) && (tDye.mIndex < 0)).forEach(tDye -> { - String sBDye1 = sBDye0 + tDye; - tDye.mRGBa[0] = ((short) Math.min(255, Math.max(0, GregTech_API.sClientDataFile.get(sBDye1, "R", tDye.mOriginalRGBa[0])))); - tDye.mRGBa[1] = ((short) Math.min(255, Math.max(0, GregTech_API.sClientDataFile.get(sBDye1, "G", tDye.mOriginalRGBa[1])))); - tDye.mRGBa[2] = ((short) Math.min(255, Math.max(0, GregTech_API.sClientDataFile.get(sBDye1, "B", tDye.mOriginalRGBa[2])))); - } - ); - GT_Mod.gregtechproxy.mRenderTileAmbientOcclusion = GregTech_API.sClientDataFile.get("render", "TileAmbientOcclusion", true); + Arrays.stream(Dyes.values()) + .filter(tDye -> (tDye != Dyes._NULL) && (tDye.mIndex < 0)) + .forEach(tDye -> { + String sBDye1 = sBDye0 + tDye; + tDye.mRGBa[0] = ((short) Math.min( + 255, Math.max(0, GregTech_API.sClientDataFile.get(sBDye1, "R", tDye.mOriginalRGBa[0])))); + tDye.mRGBa[1] = ((short) Math.min( + 255, Math.max(0, GregTech_API.sClientDataFile.get(sBDye1, "G", tDye.mOriginalRGBa[1])))); + tDye.mRGBa[2] = ((short) Math.min( + 255, Math.max(0, GregTech_API.sClientDataFile.get(sBDye1, "B", tDye.mOriginalRGBa[2])))); + }); + GT_Mod.gregtechproxy.mRenderTileAmbientOcclusion = + GregTech_API.sClientDataFile.get("render", "TileAmbientOcclusion", true); GT_Mod.gregtechproxy.mRenderGlowTextures = GregTech_API.sClientDataFile.get("render", "GlowTextures", true); - GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped = GregTech_API.sClientDataFile.get("render", "RenderFlippedMachinesFlipped", true); - GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch = GregTech_API.sClientDataFile.get("render", "RenderIndicatorsOnHatch", true); - GT_Mod.gregtechproxy.mRenderDirtParticles = GregTech_API.sClientDataFile.get("render", "RenderDirtParticles", true); - GT_Mod.gregtechproxy.mRenderPollutionFog = GregTech_API.sClientDataFile.get("render", "RenderPollutionFog", true); - GT_Mod.gregtechproxy.mCoverTabsVisible = GregTech_API.sClientDataFile.get("interface", "DisplayCoverTabs", true); + GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped = + GregTech_API.sClientDataFile.get("render", "RenderFlippedMachinesFlipped", true); + GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch = + GregTech_API.sClientDataFile.get("render", "RenderIndicatorsOnHatch", true); + GT_Mod.gregtechproxy.mRenderDirtParticles = + GregTech_API.sClientDataFile.get("render", "RenderDirtParticles", true); + GT_Mod.gregtechproxy.mRenderPollutionFog = + GregTech_API.sClientDataFile.get("render", "RenderPollutionFog", true); + GT_Mod.gregtechproxy.mCoverTabsVisible = + GregTech_API.sClientDataFile.get("interface", "DisplayCoverTabs", true); GT_Mod.gregtechproxy.mCoverTabsFlipped = GregTech_API.sClientDataFile.get("interface", "FlipCoverTabs", false); GT_Mod.gregtechproxy.mTooltipVerbosity = GregTech_API.sClientDataFile.get("interface", "TooltipVerbosity", 2); - GT_Mod.gregtechproxy.mTooltipShiftVerbosity = GregTech_API.sClientDataFile.get("interface", "TooltipShiftVerbosity", 3); + GT_Mod.gregtechproxy.mTooltipShiftVerbosity = + GregTech_API.sClientDataFile.get("interface", "TooltipShiftVerbosity", 3); GT_Mod.gregtechproxy.mNEIRecipeSecondMode = GregTech_API.sClientDataFile.get("nei", "RecipeSecondMode", true); GT_Mod.gregtechproxy.mNEIRecipeOwner = GregTech_API.sClientDataFile.get("nei", "RecipeOwner", false); - GT_Mod.gregtechproxy.mNEIRecipeOwnerStackTrace = GregTech_API.sClientDataFile.get("nei", "RecipeOwnerStackTrace", false); + GT_Mod.gregtechproxy.mNEIRecipeOwnerStackTrace = + GregTech_API.sClientDataFile.get("nei", "RecipeOwnerStackTrace", false); GT_Mod.gregtechproxy.mNEIOriginalVoltage = GregTech_API.sClientDataFile.get("nei", "OriginalVoltage", false); - GT_Mod.gregtechproxy.mWailaTransformerVoltageTier = GregTech_API.sClientDataFile.get("waila", "WailaTransformerVoltageTier", true); + GT_Mod.gregtechproxy.mWailaTransformerVoltageTier = + GregTech_API.sClientDataFile.get("waila", "WailaTransformerVoltageTier", true); - final String[] Circuits = GregTech_API.sClientDataFile.get("interface", "CircuitsOrder" ); + final String[] Circuits = GregTech_API.sClientDataFile.get("interface", "CircuitsOrder"); GT_Mod.gregtechproxy.mCircuitsOrder.clear(); for (int i = 0; i < Circuits.length; i++) { GT_Mod.gregtechproxy.mCircuitsOrder.putIfAbsent(Circuits[i], i); diff --git a/src/main/java/gregtech/nei/GT_NEI_AssLineHandler.java b/src/main/java/gregtech/nei/GT_NEI_AssLineHandler.java index 3fdefd07d9..8026e8b4ec 100644 --- a/src/main/java/gregtech/nei/GT_NEI_AssLineHandler.java +++ b/src/main/java/gregtech/nei/GT_NEI_AssLineHandler.java @@ -1,5 +1,7 @@ package gregtech.nei; +import static gregtech.api.util.GT_Utility.trans; + import codechicken.lib.gui.GuiDraw; import codechicken.nei.NEIClientUtils; import codechicken.nei.PositionedStack; @@ -20,26 +22,18 @@ import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_WithAlt; import gregtech.api.util.GT_Utility; -import net.minecraft.client.Minecraft; +import java.awt.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.client.resources.IResource; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.ResourceLocation; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidStack; import org.lwjgl.opengl.GL11; -import java.awt.*; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; - -import static gregtech.api.util.GT_Utility.trans; - public class GT_NEI_AssLineHandler extends RecipeMapHandler { public static final int sOffsetX = 5; public static final int sOffsetY = 11; @@ -49,14 +43,13 @@ public class GT_NEI_AssLineHandler extends RecipeMapHandler { * Can be referenced from cached recipes. */ public static int cycleTicksStatic = Math.abs((int) System.currentTimeMillis()); - private String mRecipeName; static { GuiContainerManager.addInputHandler(new GT_RectHandler()); GuiContainerManager.addTooltipHandler(new GT_RectHandler()); } - public GT_NEI_AssLineHandler(GT_Recipe.GT_Recipe_Map aRecipeMap) {//this is called when recipes should be shown + public GT_NEI_AssLineHandler(GT_Recipe.GT_Recipe_Map aRecipeMap) { // this is called when recipes should be shown super(aRecipeMap); this.transferRects.add(new RecipeTransferRect(new Rectangle(138, 18, 18, 18), getOverlayIdentifier())); } @@ -69,7 +62,7 @@ public class GT_NEI_AssLineHandler extends RecipeMapHandler { @Override public TemplateRecipeHandler newInstance() { - NEI_GT_Config.ALH=new GT_NEI_AssLineHandler(this.mRecipeMap); + NEI_GT_Config.ALH = new GT_NEI_AssLineHandler(this.mRecipeMap); return NEI_GT_Config.ALH; } @@ -79,7 +72,7 @@ public class GT_NEI_AssLineHandler extends RecipeMapHandler { for (GT_Recipe tRecipe : getSortedRecipes()) { if (!tRecipe.mHidden) { this.arecipes.add(new CachedDefaultRecipe(tRecipe)); - }else{ + } else { this.arecipes.remove(new CachedDefaultRecipe(tRecipe)); } } @@ -95,7 +88,9 @@ public class GT_NEI_AssLineHandler extends RecipeMapHandler { ArrayList<ItemStack> tResults = new ArrayList(); tResults.add(aResult); tResults.add(GT_OreDictUnificator.get(true, aResult)); - if ((tPrefixMaterial != null) && (!tPrefixMaterial.mBlackListed) && (!tPrefixMaterial.mPrefix.mFamiliarPrefixes.isEmpty())) { + if ((tPrefixMaterial != null) + && (!tPrefixMaterial.mBlackListed) + && (!tPrefixMaterial.mPrefix.mFamiliarPrefixes.isEmpty())) { for (OrePrefixes tPrefix : tPrefixMaterial.mPrefix.mFamiliarPrefixes) { tResults.add(GT_OreDictUnificator.get(tPrefix, tPrefixMaterial.mMaterial.mMaterial, 1L)); } @@ -103,7 +98,8 @@ public class GT_NEI_AssLineHandler extends RecipeMapHandler { FluidStack tFluid = GT_Utility.getFluidForFilledItem(aResult, true); if (tFluid != null) { tResults.add(GT_Utility.getFluidDisplayStack(tFluid, false)); - for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) { + for (FluidContainerRegistry.FluidContainerData tData : + FluidContainerRegistry.getRegisteredFluidContainerData()) { if (tData.fluid.isFluidEqual(tFluid)) { tResults.add(GT_Utility.copyOrNull(tData.filledContainer)); } @@ -145,7 +141,8 @@ public class GT_NEI_AssLineHandler extends RecipeMapHandler { FluidStack tFluid = GT_Utility.getFluidForFilledItem(aInput, true); if (tFluid != null) { tInputs.add(GT_Utility.getFluidDisplayStack(tFluid, false)); - for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) { + for (FluidContainerRegistry.FluidContainerData tData : + FluidContainerRegistry.getRegisteredFluidContainerData()) { if (tData.fluid.isFluidEqual(tFluid)) { tInputs.add(GT_Utility.copyOrNull(tData.filledContainer)); } @@ -160,7 +157,7 @@ public class GT_NEI_AssLineHandler extends RecipeMapHandler { break; } } - }else{ + } else { CachedDefaultRecipe tNEIRecipe = new CachedDefaultRecipe(tRecipe); for (ItemStack tStack : tInputs) { if (tNEIRecipe.contains(tNEIRecipe.mInputs, tStack)) { @@ -188,8 +185,7 @@ public class GT_NEI_AssLineHandler extends RecipeMapHandler { @Override public void onUpdate() { super.onUpdate(); - if (!NEIClientUtils.shiftKey()) - cycleTicksStatic++; + if (!NEIClientUtils.shiftKey()) cycleTicksStatic++; } @Override @@ -199,11 +195,7 @@ public class GT_NEI_AssLineHandler extends RecipeMapHandler { @Override public String getRecipeName() { - if (mRecipeName == null) { - mRecipeName = GT_LanguageManager.getTranslation(this.mRecipeMap.mUnlocalizedName); - updateOverrideTextColor(); - } - return mRecipeName; + return GT_LanguageManager.getTranslation(this.mRecipeMap.mUnlocalizedName); } @Override @@ -212,23 +204,30 @@ public class GT_NEI_AssLineHandler extends RecipeMapHandler { } @Override - public List<String> handleItemTooltip(GuiRecipe<?> gui, ItemStack aStack, List<String> currenttip, int aRecipeIndex) { + public List<String> handleItemTooltip( + GuiRecipe<?> gui, ItemStack aStack, List<String> currenttip, int aRecipeIndex) { CachedRecipe tObject = (CachedRecipe) this.arecipes.get(aRecipeIndex); if ((tObject instanceof CachedDefaultRecipe)) { CachedDefaultRecipe tRecipe = (CachedDefaultRecipe) tObject; for (PositionedStack tStack : tRecipe.mOutputs) { if (aStack == tStack.item) { - if ((!(tStack instanceof FixedPositionedStack)) || (((FixedPositionedStack) tStack).mChance <= 0) || (((FixedPositionedStack) tStack).mChance == 10000)) { + if ((!(tStack instanceof FixedPositionedStack)) + || (((FixedPositionedStack) tStack).mChance <= 0) + || (((FixedPositionedStack) tStack).mChance == 10000)) { break; } - currenttip.add("Chance: " + ((FixedPositionedStack) tStack).mChance / 100 + "." + (((FixedPositionedStack) tStack).mChance % 100 < 10 ? "0" + ((FixedPositionedStack) tStack).mChance % 100 : Integer.valueOf(((FixedPositionedStack) tStack).mChance % 100)) + "%"); + currenttip.add("Chance: " + ((FixedPositionedStack) tStack).mChance / 100 + "." + + (((FixedPositionedStack) tStack).mChance % 100 < 10 + ? "0" + ((FixedPositionedStack) tStack).mChance % 100 + : Integer.valueOf(((FixedPositionedStack) tStack).mChance % 100)) + + "%"); break; } } for (PositionedStack tStack : tRecipe.mInputs) { if (aStack == tStack.item) { - if ((gregtech.api.enums.ItemList.Display_Fluid.isStackEqual(tStack.item, true, true)) || - (tStack.item.stackSize != 0)) { + if ((gregtech.api.enums.ItemList.Display_Fluid.isStackEqual(tStack.item, true, true)) + || (tStack.item.stackSize != 0)) { break; } currenttip.add("Does not get consumed in the process"); @@ -241,67 +240,67 @@ public class GT_NEI_AssLineHandler extends RecipeMapHandler { @Override public void drawExtras(int aRecipeIndex) { - GT_Recipe recipe = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe; - int tEUt = recipe.mEUt; - int tDuration = recipe.mDuration; - String[] recipeDesc = recipe.getNeiDesc(); + int tEUt = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mEUt; + int tDuration = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mDuration; + String[] recipeDesc = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.getNeiDesc(); if (recipeDesc == null) { if (tEUt != 0) { - drawText(10, 73, trans("152","Total: ") + GT_Utility.formatNumbers((long) tDuration * tEUt) + " EU", 0xFF000000); - drawText(10, 83, trans("153","Usage: ") + GT_Utility.formatNumbers(tEUt) + " EU/t", 0xFF000000); + drawText( + 10, + 73, + trans("152", "Total: ") + GT_Utility.formatNumbers((long) tDuration * tEUt) + " EU", + 0xFF000000); + drawText(10, 83, trans("153", "Usage: ") + GT_Utility.formatNumbers(tEUt) + " EU/t", 0xFF000000); if (this.mRecipeMap.mShowVoltageAmperageInNEI) { int voltage = tEUt / this.mRecipeMap.mAmperage; byte tier = GT_Utility.getTier(voltage); if (tier < 0 || tier >= 16) { - drawText(10, 93, trans("154", "Voltage: ") + GT_Utility.formatNumbers(voltage) + " EU", 0xFF000000); + drawText( + 10, + 93, + trans("154", "Voltage: ") + GT_Utility.formatNumbers(voltage) + " EU", + 0xFFFF0000); } else { - drawText(10, 93, trans("154","Voltage: ") + GT_Utility.formatNumbers(voltage) + " EU (" + GT_Values.VN[tier] + ")", 0xFF000000); + drawText( + 10, + 93, + trans("154", "Voltage: ") + GT_Utility.formatNumbers(voltage) + " EU (" + + GT_Values.VN[tier] + ")", + 0xFF000000); } - drawText(10, 103, trans("155","Amperage: ") + GT_Utility.formatNumbers(this.mRecipeMap.mAmperage), 0xFF000000); + drawText( + 10, + 103, + trans("155", "Amperage: ") + GT_Utility.formatNumbers(this.mRecipeMap.mAmperage), + 0xFF000000); } else { - drawText(10, 93, trans("156","Voltage: unspecified"), 0xFF000000); - drawText(10, 103, trans("157","Amperage: unspecified"), 0xFF000000); + drawText(10, 93, trans("156", "Voltage: unspecified"), 0xFF000000); + drawText(10, 103, trans("157", "Amperage: unspecified"), 0xFF000000); } } if (tDuration > 0) { - drawText(10, 113, trans("158","Time: ") + GT_Utility.formatNumbers(0.05d * tDuration) + trans("161"," secs"), 0xFF000000); + drawText( + 10, + 113, + trans("158", "Time: ") + GT_Utility.formatNumbers(0.05d * tDuration) + trans("161", " secs"), + 0xFF000000); } int tSpecial = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue; - boolean specialDrew = false; if (tSpecial == -100 && GT_Mod.gregtechproxy.mLowGravProcessing) { - drawText(10, 123, trans("159","Needs Low Gravity"), 0xFF000000); - specialDrew = true; + drawText(10, 123, trans("159", "Needs Low Gravity"), 0xFF000000); } else if (tSpecial == -200 && GT_Mod.gregtechproxy.mEnableCleanroom) { - drawText(10, 123, trans("160","Needs Cleanroom"), 0xFF000000); - specialDrew = true; + drawText(10, 123, trans("160", "Needs Cleanroom"), 0xFF000000); } else if (tSpecial == -201) { - drawText(10, 123, trans("206","Scan for Assembly Line"), 0xFF000000); - specialDrew = true; - } else if ((GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePre)) || (GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePost))) { - drawText(10, 123, this.mRecipeMap.mNEISpecialValuePre + GT_Utility.formatNumbers(tSpecial * this.mRecipeMap.mNEISpecialValueMultiplier) + this.mRecipeMap.mNEISpecialValuePost, 0xFF000000); - specialDrew = true; - } - int y = 123 + (specialDrew ? 10 : 0); - if (GT_Mod.gregtechproxy.mNEIRecipeOwner) { - if (recipe.owners.size() > 1) { - drawText(10, y, EnumChatFormatting.ITALIC + GT_Utility.trans("226", "Original Recipe by: ") + recipe.owners.get(0).getName(), 0xFF000000); - y += 10; - for (int i = 1; i < recipe.owners.size(); i++) { - drawText(10, y, EnumChatFormatting.ITALIC + GT_Utility.trans("227", "Modified by: ") + recipe.owners.get(i).getName(), 0xFF000000); - y += 10; - } - } else if (recipe.owners.size() > 0) { - drawText(10, y, EnumChatFormatting.ITALIC + GT_Utility.trans("225", "Recipe by: ") + recipe.owners.get(0).getName(), 0xFF000000); - y += 10; - } - } - if (GT_Mod.gregtechproxy.mNEIRecipeOwnerStackTrace && recipe.stackTraces != null && !recipe.stackTraces.isEmpty()) { - drawText(10, y, "stackTrace:", 0xFF000000); - y += 10; - for (StackTraceElement stackTrace : recipe.stackTraces.get(0)) { - drawText(10, y, stackTrace.toString(), 0xFF000000); - y += 10; - } + drawText(10, 123, trans("206", "Scan for Assembly Line"), 0xFF000000); + } else if ((GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePre)) + || (GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePost))) { + drawText( + 10, + 123, + this.mRecipeMap.mNEISpecialValuePre + + GT_Utility.formatNumbers(tSpecial * this.mRecipeMap.mNEISpecialValueMultiplier) + + this.mRecipeMap.mNEISpecialValuePost, + 0xFF000000); } } else { int i = 0; @@ -326,7 +325,8 @@ public class GT_NEI_AssLineHandler extends RecipeMapHandler { public boolean canHandle(GuiContainer gui) { return false; - //return (((gui instanceof GT_GUIContainer_BasicMachine)) && (GT_Utility.isStringValid(((GT_GUIContainer_BasicMachine) gui).mNEI))); + // return (((gui instanceof GT_GUIContainer_BasicMachine)) && + // (GT_Utility.isStringValid(((GT_GUIContainer_BasicMachine) gui).mNEI))); } @Override @@ -335,8 +335,19 @@ public class GT_NEI_AssLineHandler extends RecipeMapHandler { } private boolean transferRect(GuiContainer gui, boolean usage) { - return (canHandle(gui)) && (new Rectangle(138, 18, 18, 18).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_BasicMachine) gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_BasicMachine) gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1]))) && (usage ? GuiUsageRecipe.openRecipeGui(((GT_GUIContainer_BasicMachine) gui).mNEI, new Object[0]) : GuiCraftingRecipe.openRecipeGui(((GT_GUIContainer_BasicMachine) gui).mNEI, new Object[0])); - + return (canHandle(gui)) + && (new Rectangle(138, 18, 18, 18) + .contains(new Point( + GuiDraw.getMousePosition().x + - ((GT_GUIContainer_BasicMachine) gui).getLeft() + - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], + GuiDraw.getMousePosition().y + - ((GT_GUIContainer_BasicMachine) gui).getTop() + - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1]))) + && (usage + ? GuiUsageRecipe.openRecipeGui(((GT_GUIContainer_BasicMachine) gui).mNEI, new Object[0]) + : GuiCraftingRecipe.openRecipeGui( + ((GT_GUIContainer_BasicMachine) gui).mNEI, new Object[0])); } @Override @@ -345,7 +356,8 @@ public class GT_NEI_AssLineHandler extends RecipeMapHandler { } @Override - public List<String> handleItemTooltip(GuiContainer gui, ItemStack itemstack, int mousex, int mousey, List<String> currenttip) { + public List<String> handleItemTooltip( + GuiContainer gui, ItemStack itemstack, int mousex, int mousey, List<String> currenttip) { return currenttip; } @@ -355,16 +367,13 @@ public class GT_NEI_AssLineHandler extends RecipeMapHandler { } @Override - public void onKeyTyped(GuiContainer gui, char keyChar, int keyID) { - } + public void onKeyTyped(GuiContainer gui, char keyChar, int keyID) {} @Override - public void onMouseClicked(GuiContainer gui, int mousex, int mousey, int button) { - } + public void onMouseClicked(GuiContainer gui, int mousex, int mousey, int button) {} @Override - public void onMouseUp(GuiContainer gui, int mousex, int mousey, int button) { - } + public void onMouseUp(GuiContainer gui, int mousex, int mousey, int button) {} @Override public boolean mouseScrolled(GuiContainer gui, int mousex, int mousey, int scrolled) { @@ -372,16 +381,13 @@ public class GT_NEI_AssLineHandler extends RecipeMapHandler { } @Override - public void onMouseScrolled(GuiContainer gui, int mousex, int mousey, int scrolled) { - } + public void onMouseScrolled(GuiContainer gui, int mousex, int mousey, int scrolled) {} @Override - public void onMouseDragged(GuiContainer gui, int mousex, int mousey, int button, long heldTime) { - } + public void onMouseDragged(GuiContainer gui, int mousex, int mousey, int button, long heldTime) {} } - public class FixedPositionedStack - extends PositionedStack { + public class FixedPositionedStack extends PositionedStack { public final int mChance; public boolean permutated = false; @@ -406,7 +412,9 @@ public class GT_NEI_AssLineHandler extends RecipeMapHandler { List<ItemStack> permutations = codechicken.nei.ItemList.itemMap.get(tStack.getItem()); if (!permutations.isEmpty()) { ItemStack stack; - for (Iterator i$ = permutations.iterator(); i$.hasNext(); tDisplayStacks.add(GT_Utility.copyAmount(tStack.stackSize, new Object[]{stack}))) { + for (Iterator i$ = permutations.iterator(); + i$.hasNext(); + tDisplayStacks.add(GT_Utility.copyAmount(tStack.stackSize, new Object[] {stack}))) { stack = (ItemStack) i$.next(); } } else { @@ -421,15 +429,14 @@ public class GT_NEI_AssLineHandler extends RecipeMapHandler { } this.items = ((ItemStack[]) tDisplayStacks.toArray(new ItemStack[0])); if (this.items.length == 0) { - this.items = new ItemStack[]{new ItemStack(Blocks.fire)}; + this.items = new ItemStack[] {new ItemStack(Blocks.fire)}; } this.permutated = true; setPermutationToRender(0); } } - public class CachedDefaultRecipe - extends CachedRecipe { + public class CachedDefaultRecipe extends CachedRecipe { public final GT_Recipe mRecipe; public final List<PositionedStack> mOutputs = new ArrayList(); public final List<PositionedStack> mInputs = new ArrayList(); @@ -439,10 +446,12 @@ public class GT_NEI_AssLineHandler extends RecipeMapHandler { this.mRecipe = aRecipe; for (int i = 0; i < 16; i++) { - Object obj = aRecipe instanceof GT_Recipe_WithAlt ? ((GT_Recipe_WithAlt) aRecipe).getAltRepresentativeInput(i) : aRecipe.getRepresentativeInput(i); - if (obj != null) { - this.mInputs.add(new FixedPositionedStack(obj, 18 * (i % 4) + 12, 18 * (i / 4))); - } + Object obj = aRecipe instanceof GT_Recipe_WithAlt + ? ((GT_Recipe_WithAlt) aRecipe).getAltRepresentativeInput(i) + : aRecipe.getRepresentativeInput(i); + if (obj != null) { + this.mInputs.add(new FixedPositionedStack(obj, 18 * (i % 4) + 12, 18 * (i / 4))); + } } if (aRecipe.mSpecialItems != null) { @@ -451,14 +460,26 @@ public class GT_NEI_AssLineHandler extends RecipeMapHandler { if (aRecipe.getOutput(0) != null) { this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(0), 138, 0, aRecipe.getOutputChance(0))); } - if ((aRecipe.mFluidInputs.length > 0) && (aRecipe.mFluidInputs[0] != null) && (aRecipe.mFluidInputs[0].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[0], true), 102, 0)); - if ((aRecipe.mFluidInputs.length > 1) && (aRecipe.mFluidInputs[1] != null) && (aRecipe.mFluidInputs[1].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[1], true), 102, 18)); - if ((aRecipe.mFluidInputs.length > 2) && (aRecipe.mFluidInputs[2] != null) && (aRecipe.mFluidInputs[2].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[2], true), 102, 36)); - if ((aRecipe.mFluidInputs.length > 3) && (aRecipe.mFluidInputs[3] != null) && (aRecipe.mFluidInputs[3].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[3], true), 102, 54)); + if ((aRecipe.mFluidInputs.length > 0) + && (aRecipe.mFluidInputs[0] != null) + && (aRecipe.mFluidInputs[0].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[0], true), 102, 0)); + if ((aRecipe.mFluidInputs.length > 1) + && (aRecipe.mFluidInputs[1] != null) + && (aRecipe.mFluidInputs[1].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[1], true), 102, 18)); + if ((aRecipe.mFluidInputs.length > 2) + && (aRecipe.mFluidInputs[2] != null) + && (aRecipe.mFluidInputs[2].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[2], true), 102, 36)); + if ((aRecipe.mFluidInputs.length > 3) + && (aRecipe.mFluidInputs[3] != null) + && (aRecipe.mFluidInputs[3].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[3], true), 102, 54)); } } } diff --git a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java index 8932e35710..06f7bde416 100644 --- a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java +++ b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java @@ -1,5 +1,7 @@ package gregtech.nei; +import static codechicken.nei.recipe.RecipeInfo.getGuiOffset; + import codechicken.lib.gui.GuiDraw; import codechicken.nei.NEIClientUtils; import codechicken.nei.PositionedStack; @@ -15,7 +17,6 @@ import codechicken.nei.recipe.RecipeCatalysts; import codechicken.nei.recipe.TemplateRecipeHandler; import gregtech.GT_Mod; import gregtech.api.enums.GT_Values; -import gregtech.api.enums.HeatingCoilLevel; import gregtech.api.enums.OrePrefixes; import gregtech.api.gui.GT_GUIContainer; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -30,47 +31,40 @@ import gregtech.common.blocks.GT_Item_Machines; import gregtech.common.power.EUPower; import gregtech.common.power.Power; import gregtech.common.power.UnspecifiedEUPower; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraftforge.fluids.FluidStack; -import org.apache.commons.lang3.Range; -import org.lwjgl.opengl.GL11; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.awt.*; import java.lang.ref.SoftReference; import java.util.ArrayList; import java.util.Collections; -import java.util.HashMap; import java.util.Iterator; import java.util.List; -import java.util.Map; -import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.stream.Collectors; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; +import org.apache.commons.lang3.Range; +import org.lwjgl.opengl.GL11; -import static codechicken.nei.recipe.RecipeInfo.getGuiOffset; - +@SuppressWarnings("all") public class GT_NEI_DefaultHandler extends RecipeMapHandler { - @SuppressWarnings("unused") // Public constant public static final int sOffsetX = 5; - @SuppressWarnings("unused") // Public constant public static final int sOffsetY = 11; private static final int M = 1000000; - private static final ConcurrentMap<GT_Recipe.GT_Recipe_Map, SortedRecipeListCache> CACHE = new ConcurrentHashMap<>(); + private static final ConcurrentMap<GT_Recipe.GT_Recipe_Map, SortedRecipeListCache> CACHE = + new ConcurrentHashMap<>(); - protected Power mPower; + private Power mPower; private String mRecipeName; // Name of the handler displayed on top private NEIHandlerAbsoluteTooltip mRecipeNameTooltip; private static final int RECIPE_NAME_WIDTH = 140; - /** + /** * Static version of {@link TemplateRecipeHandler#cycleticks}. * Can be referenced from cached recipes. */ @@ -85,8 +79,7 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { super(aRecipeMap); if ("gt.recipe.complexfusionreactor".equals(aRecipeMap.mUnlocalizedName)) { this.transferRects.add(new RecipeTransferRect(new Rectangle(74, 23, 18, 18), getOverlayIdentifier())); - } - else { + } else { this.transferRects.add(new RecipeTransferRect(new Rectangle(65, 13, 36, 18), getOverlayIdentifier())); } } @@ -105,13 +98,14 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { public List<CachedDefaultRecipe> getCache() { SortedRecipeListCache cacheHolder = getCacheHolder(); List<CachedDefaultRecipe> cache; - if (cacheHolder.getCachedRecipesVersion() != GT_Mod.gregtechproxy.getReloadCount() || (cache = cacheHolder.getCachedRecipes()) == null) { - cache = mRecipeMap.mRecipeList.stream() // do not use parallel stream. This is already parallelized by NEI + if (cacheHolder.getCachedRecipesVersion() != GT_Mod.gregtechproxy.getReloadCount() + || (cache = cacheHolder.getCachedRecipes()) == null) { + cache = mRecipeMap.mRecipeList.stream() // do not use parallel stream. This is already parallelized by NEI .filter(r -> !r.mHidden) .sorted() .map(CachedDefaultRecipe::new) .collect(Collectors.toList()); - // while the NEI parallelize handlers, for each individual handler it still uses sequential execution model, + // while the NEI parallelize handlers, for each individual handler it still uses sequential execution model // so we do not need any synchronization here // even if it does break, at worst case it's just recreating the cache multiple times, which should be fine cacheHolder.setCachedRecipes(cache); @@ -146,15 +140,16 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { ArrayList<ItemStack> tResults = new ArrayList<>(); tResults.add(aResult); tResults.add(GT_OreDictUnificator.get(true, aResult)); - if ((tPrefixMaterial != null) && (!tPrefixMaterial.mBlackListed) && (!tPrefixMaterial.mPrefix.mFamiliarPrefixes.isEmpty())) { + if ((tPrefixMaterial != null) + && (!tPrefixMaterial.mBlackListed) + && (!tPrefixMaterial.mPrefix.mFamiliarPrefixes.isEmpty())) { for (OrePrefixes tPrefix : tPrefixMaterial.mPrefix.mFamiliarPrefixes) { tResults.add(GT_OreDictUnificator.get(tPrefix, tPrefixMaterial.mMaterial.mMaterial, 1L)); } } addFluidStacks(aResult, tResults); for (CachedDefaultRecipe recipe : getCache()) { - if (tResults.stream().anyMatch(stack -> recipe.contains(recipe.mOutputs, stack))) - arecipes.add(recipe); + if (tResults.stream().anyMatch(stack -> recipe.contains(recipe.mOutputs, stack))) arecipes.add(recipe); } } @@ -171,13 +166,13 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { } private void loadTieredCraftingRecipesUpTo(byte upperTier) { - arecipes.addAll(getTieredRecipes(upperTier)); + arecipes.addAll(getTieredRecipes((byte) 0, upperTier)); } - private List<CachedDefaultRecipe> getTieredRecipes(byte upperTier) { + private List<CachedDefaultRecipe> getTieredRecipes(byte lowerTier, byte upperTier) { List<CachedDefaultRecipe> recipes = getCache(); - if ( recipes.size() > 0 ) { - Range<Integer> indexRange = getCacheHolder().getIndexRangeForTiers((byte) 0, upperTier); + if (recipes.size() > 0) { + Range<Integer> indexRange = getCacheHolder().getIndexRangeForTiers(lowerTier, upperTier); recipes = recipes.subList(indexRange.getMinimum(), indexRange.getMaximum() + 1); } return recipes; @@ -196,8 +191,7 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { } addFluidStacks(aInput, tInputs); for (CachedDefaultRecipe recipe : getCache()) { - if (tInputs.stream().anyMatch(stack -> recipe.contains(recipe.mInputs, stack))) - arecipes.add(recipe); + if (tInputs.stream().anyMatch(stack -> recipe.contains(recipe.mInputs, stack))) arecipes.add(recipe); } } @@ -211,10 +205,11 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { if (gtTileEntity instanceof GT_MetaTileEntity_BasicMachine) { Power power = ((GT_MetaTileEntity_BasicMachine) gtTileEntity).getPower(); handler.loadCraftingRecipes(getOverlayIdentifier(), power); + return handler; } else { handler.loadCraftingRecipes(getOverlayIdentifier(), (Object) null); + return handler; } - return handler; } } return this.getUsageHandler(inputId, ingredients); @@ -244,8 +239,7 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { @Override public void onUpdate() { super.onUpdate(); - if (!NEIClientUtils.shiftKey()) - cycleTicksStatic++; + if (!NEIClientUtils.shiftKey()) cycleTicksStatic++; } @Override @@ -257,7 +251,6 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { public String getRecipeName() { if (mRecipeName == null) { mRecipeName = computeRecipeName(); - updateOverrideTextColor(); } return mRecipeName; } @@ -265,24 +258,19 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { private String computeRecipeName() { String recipeName = GT_LanguageManager.getTranslation(this.mRecipeMap.mUnlocalizedName); if (mPower != null) { - recipeName = addSuffixToRecipeName(recipeName, mPower.getTierString() + ")"); + recipeName = addSuffixToRecipeName(recipeName, " (", mPower.getTierString() + ")"); } return recipeName; } - private String addSuffixToRecipeName(final String aRecipeName, final String suffix) { - final String recipeName; - final String separator; + private String addSuffixToRecipeName(String recipeName, String separator, String suffix) { FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer; - int recipeNameWidth = fontRenderer.getStringWidth(aRecipeName); + int recipeNameWidth = fontRenderer.getStringWidth(recipeName); int targetWidth = RECIPE_NAME_WIDTH - fontRenderer.getStringWidth(suffix); - if (recipeNameWidth + fontRenderer.getStringWidth(" (") <= targetWidth) { - recipeName = aRecipeName; - separator = " ("; - } else { - setupRecipeNameTooltip(aRecipeName + " (" + suffix); + if (recipeNameWidth + fontRenderer.getStringWidth(separator) > targetWidth) { + setupRecipeNameTooltip(recipeName + separator + suffix); separator = "...("; - recipeName = shrinkRecipeName(aRecipeName, targetWidth - fontRenderer.getStringWidth(separator)); + recipeName = shrinkRecipeName(recipeName, targetWidth - fontRenderer.getStringWidth(separator)); } return recipeName + separator + suffix; } @@ -291,7 +279,7 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer; do { recipeName = recipeName.substring(0, recipeName.length() - 2); - } while (fontRenderer.getStringWidth(recipeName) > targetWidth); + } while (fontRenderer.getStringWidth(recipeName) > targetWidth); return recipeName; } @@ -310,35 +298,43 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { } @Override - public List<String> handleItemTooltip(GuiRecipe<?> gui, ItemStack aStack, List<String> currentTip, int aRecipeIndex) { + public List<String> handleItemTooltip( + GuiRecipe<?> gui, ItemStack aStack, List<String> currenttip, int aRecipeIndex) { CachedRecipe tObject = this.arecipes.get(aRecipeIndex); if ((tObject instanceof CachedDefaultRecipe)) { CachedDefaultRecipe tRecipe = (CachedDefaultRecipe) tObject; for (PositionedStack tStack : tRecipe.mOutputs) { if (aStack == tStack.item) { - if ((!(tStack instanceof FixedPositionedStack)) || (((FixedPositionedStack) tStack).mChance <= 0) || (((FixedPositionedStack) tStack).mChance == 10000)) { + if ((!(tStack instanceof FixedPositionedStack)) + || (((FixedPositionedStack) tStack).mChance <= 0) + || (((FixedPositionedStack) tStack).mChance == 10000)) { break; } - currentTip.add(GT_Utility.trans("150", "Chance: ") + ((FixedPositionedStack) tStack).mChance / 100 + "." + (((FixedPositionedStack) tStack).mChance % 100 < 10 ? "0" + ((FixedPositionedStack) tStack).mChance % 100 : Integer.valueOf(((FixedPositionedStack) tStack).mChance % 100)) + "%"); + currenttip.add( + GT_Utility.trans("150", "Chance: ") + ((FixedPositionedStack) tStack).mChance / 100 + "." + + (((FixedPositionedStack) tStack).mChance % 100 < 10 + ? "0" + ((FixedPositionedStack) tStack).mChance % 100 + : Integer.valueOf(((FixedPositionedStack) tStack).mChance % 100)) + + "%"); break; } } for (PositionedStack tStack : tRecipe.mInputs) { if (aStack == tStack.item) { - if ((gregtech.api.enums.ItemList.Display_Fluid.isStackEqual(tStack.item, true, true)) || - (tStack.item.stackSize != 0)) { + if ((gregtech.api.enums.ItemList.Display_Fluid.isStackEqual(tStack.item, true, true)) + || (tStack.item.stackSize != 0)) { break; } - currentTip.add(GT_Utility.trans("151", "Does not get consumed in the process")); + currenttip.add(GT_Utility.trans("151", "Does not get consumed in the process")); break; } } } if (mRecipeNameTooltip != null) { - mRecipeNameTooltip.handleTooltip(currentTip, aRecipeIndex); + mRecipeNameTooltip.handleTooltip(currenttip, aRecipeIndex); } - return currentTip; + return currenttip; } private Power getPowerFromRecipeMap() { @@ -376,21 +372,9 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { String amperage = mPower.getAmperageString(); String powerUsage = mPower.getPowerUsageString(); - if (amperage == null || amperage.equals("unspecified") || powerUsage.contains("(OC)")){ + if (amperage == null || amperage.equals("unspecified") || powerUsage.contains("(OC)")) { drawLine(lineCounter, GT_Utility.trans("153", "Usage: ") + powerUsage); lineCounter++; - if (GT_Mod.gregtechproxy.mNEIOriginalVoltage) { - Power originalPower = getPowerFromRecipeMap(); - if (!(originalPower instanceof UnspecifiedEUPower)) { - originalPower.computePowerUsageAndDuration(recipe.mEUt, recipe.mDuration); - drawLine(lineCounter, GT_Utility.trans("228", "Original voltage: ") + originalPower.getVoltageString()); - lineCounter++; - } - } - if (amperage != null && !amperage.equals("unspecified") && !amperage.equals("1")) { - drawLine(lineCounter, GT_Utility.trans("155", "Amperage: ") + amperage); - lineCounter++; - } } else if (amperage.equals("1")) { drawLine(lineCounter, GT_Utility.trans("154", "Voltage: ") + mPower.getVoltageString()); lineCounter++; @@ -402,50 +386,24 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { drawLine(lineCounter, GT_Utility.trans("155", "Amperage: ") + amperage); lineCounter++; } - } if (mPower.getDurationTicks() > 0) { - if(GT_Mod.gregtechproxy.mNEIRecipeSecondMode) { + if (GT_Mod.gregtechproxy.mNEIRecipeSecondMode) { drawLine(lineCounter, GT_Utility.trans("158", "Time: ") + mPower.getDurationStringSeconds()); + lineCounter++; } else { drawLine(lineCounter, GT_Utility.trans("158", "Time: ") + mPower.getDurationStringTicks()); - } - lineCounter++; - } - if (this.mRecipeMap.mNEIName.equals("gt.recipe.fusionreactor") || this.mRecipeMap.mNEIName.equals("gt.recipe.complexfusionreactor")) { - if (drawOptionalLine(lineCounter, getSpecialInfo(recipe.mSpecialValue) + " " + formatSpecialValueFusion(recipe.mSpecialValue, recipe.mEUt))) { lineCounter++; } - } else if (GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePre) && this.mRecipeMap.mNEISpecialValuePre.toLowerCase().contains("heat capacity")) { - drawLine(lineCounter, getSpecialInfo(recipe.mSpecialValue)); - lineCounter++; - drawLine(lineCounter, " " + formatSpecialValueHeatCoil(recipe.mSpecialValue)); - lineCounter++; - } else if (drawOptionalLine(lineCounter, getSpecialInfo(recipe.mSpecialValue))) { - lineCounter++; } - if (GT_Mod.gregtechproxy.mNEIRecipeOwner) { - if (recipe.owners.size() > 1) { - drawLine(lineCounter, EnumChatFormatting.ITALIC + GT_Utility.trans("226", "Original Recipe by: ") + recipe.owners.get(0).getName()); - lineCounter++; - for (int i = 1; i < recipe.owners.size(); i++) { - drawLine(lineCounter, EnumChatFormatting.ITALIC + GT_Utility.trans("227", "Modified by: ") + recipe.owners.get(i).getName()); - lineCounter++; - } - } else if (recipe.owners.size() > 0) { - drawLine(lineCounter, EnumChatFormatting.ITALIC + GT_Utility.trans("225", "Recipe by: ") + recipe.owners.get(0).getName()); - lineCounter++; - } - } - if (GT_Mod.gregtechproxy.mNEIRecipeOwnerStackTrace && recipe.stackTraces != null && !recipe.stackTraces.isEmpty()) { - drawLine(lineCounter, "stackTrace:"); - lineCounter++; - // todo: good way to show all stacktraces - for (StackTraceElement stackTrace : recipe.stackTraces.get(0)) { - drawLine(lineCounter, stackTrace.toString()); - lineCounter++; - } + if (this.mRecipeMap.mNEIName.equals("gt.recipe.fusionreactor") + || this.mRecipeMap.mNEIName.equals("gt.recipe.complexfusionreactor")) { + drawOptionalLine( + lineCounter, + getSpecialInfo(recipe.mSpecialValue) + " " + + formatSpecialValueFusion(recipe.mSpecialValue, recipe.mEUt)); } + drawOptionalLine(lineCounter, getSpecialInfo(recipe.mSpecialValue)); } private void drawOverrideDescription(String[] recipeDesc) { @@ -456,7 +414,7 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { } } - protected String getSpecialInfo(int specialValue) { + private String getSpecialInfo(int specialValue) { String specialInfo = null; if (specialValue == -100 && GT_Mod.gregtechproxy.mLowGravProcessing) { specialInfo = GT_Utility.trans("159", "Needs Low Gravity"); @@ -476,17 +434,17 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { private boolean hasSpecialValueFormat() { return (GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePre)) - || (GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePost)); + || (GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePost)); } - protected String formatSpecialValue(int SpecialValue) { - return this.mRecipeMap.mNEISpecialValuePre + GT_Utility.formatNumbers( - (long) SpecialValue * this.mRecipeMap.mNEISpecialValueMultiplier) - + this.mRecipeMap.mNEISpecialValuePost; + private String formatSpecialValue(int SpecialValue) { + return this.mRecipeMap.mNEISpecialValuePre + + GT_Utility.formatNumbers((long) SpecialValue * this.mRecipeMap.mNEISpecialValueMultiplier) + + this.mRecipeMap.mNEISpecialValuePost; } private String formatSpecialValueFusion(int SpecialValue, int Voltage) { - int tier; + int tier = 0; if (SpecialValue <= 10 * M * 16) { tier = 1; } else if (SpecialValue <= 20 * M * 16) { @@ -496,60 +454,40 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { } else { tier = 4; } - if (Voltage <= GT_Values.V[6]) { - //no-op - } else if (Voltage <= GT_Values.V[7]) { + if (Voltage <= 32768) { + tier = Math.max(tier, 1); + } else if (Voltage <= 65536) { tier = Math.max(tier, 2); - } else if (Voltage <= GT_Values.V[8]) { + } else if (Voltage <= 131072) { tier = Math.max(tier, 3); } else { - tier = 4; + tier = Math.max(tier, 4); } return "(MK " + tier + ")"; } - private String formatSpecialValueHeatCoil(int heat) { - for (HeatingCoilLevel heatLevel : HeatingCoilLevel.values()) { - if (heatLevel == HeatingCoilLevel.None || heatLevel == HeatingCoilLevel.ULV) continue; - if (heatLevel.getHeat() >= heat) { - return "(" + heatLevel.getName() + ")"; - } - } - return "(" + HeatingCoilLevel.MAX.getName() + "+)"; - } - - @SuppressWarnings("unused") //TODO: Consider removing - protected boolean drawOptionalLine(int lineNumber, String line, String prefix) { - if (!(line == null || "unspecified".equals(line))) { + private void drawOptionalLine(int lineNumber, String line, String prefix) { + if (!"unspecified".equals(line)) { drawLine(lineNumber, prefix + line); - return true; } - return false; } - protected boolean drawOptionalLine(int lineNumber, String line) { - if (!(line == null || "unspecified".equals(line))) { + private void drawOptionalLine(int lineNumber, String line) { + if (!"unspecified".equals(line)) { drawLine(lineNumber, line); - return true; } - return false; } - protected void drawLine(int lineNumber, String line) { - drawText(10, getDescriptionYOffset() + lineNumber * 10, line, 0xFF000000); + private void drawLine(int lineNumber, String line) { + drawText(10, 73 + lineNumber * 10, line, 0xFF000000); } - protected int getDescriptionYOffset() { - return 73; - } - - public static class GT_RectHandler - implements IContainerInputHandler, IContainerTooltipHandler { + public static class GT_RectHandler implements IContainerInputHandler, IContainerTooltipHandler { @Override - public boolean mouseClicked(GuiContainer gui, int mouseX, int mouseY, int button) { + public boolean mouseClicked(GuiContainer gui, int mousex, int mousey, int button) { if (canHandle(gui)) { NEI_TransferRectHost host = (NEI_TransferRectHost) gui; - if (hostRectContainsMouse(host, getMousePos(gui, mouseX, mouseY))) { + if (hostRectContainsMouse(host, getMousePos(gui, mousex, mousey))) { if (button == 0) { return handleTransferRectMouseClick(host, false); } @@ -561,10 +499,11 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { return false; } - private Point getMousePos(GuiContainer gui, int mouseX, int mouseY) { - return new Point( - mouseX - ((GT_GUIContainer) gui).getLeft() - getGuiOffset(gui)[0], - mouseY - ((GT_GUIContainer) gui).getTop() - getGuiOffset(gui)[1]); + private Point getMousePos(GuiContainer gui, int mousex, int mousey) { + Point point = new Point( + mousex - ((GT_GUIContainer) gui).getLeft() - getGuiOffset(gui)[0], + mousey - ((GT_GUIContainer) gui).getTop() - getGuiOffset(gui)[1]); + return point; } private boolean hostRectContainsMouse(NEI_TransferRectHost host, Point mousePos) { @@ -583,28 +522,30 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { } public boolean canHandle(GuiContainer gui) { - return gui instanceof NEI_TransferRectHost && GT_Utility.isStringValid(((NEI_TransferRectHost) gui).getNeiTransferRectString()); + return gui instanceof NEI_TransferRectHost + && GT_Utility.isStringValid(((NEI_TransferRectHost) gui).getNeiTransferRectString()); } @Override - public List<String> handleTooltip(GuiContainer gui, int mouseX, int mouseY, List<String> currentTip) { - if ((canHandle(gui)) && (currentTip.isEmpty())) { + public List<String> handleTooltip(GuiContainer gui, int mousex, int mousey, List<String> currenttip) { + if ((canHandle(gui)) && (currenttip.isEmpty())) { NEI_TransferRectHost host = (NEI_TransferRectHost) gui; - if (hostRectContainsMouse(host, getMousePos(gui, mouseX, mouseY))) { - currentTip.add(host.getNeiTransferRectTooltip()); + if (hostRectContainsMouse(host, getMousePos(gui, mousex, mousey))) { + currenttip.add(host.getNeiTransferRectTooltip()); } } - return currentTip; + return currenttip; } @Override - public List<String> handleItemDisplayName(GuiContainer gui, ItemStack itemstack, List<String> currentTip) { - return currentTip; + public List<String> handleItemDisplayName(GuiContainer gui, ItemStack itemstack, List<String> currenttip) { + return currenttip; } @Override - public List<String> handleItemTooltip(GuiContainer gui, ItemStack itemstack, int mouseX, int mouseY, List<String> currentTip) { - return currentTip; + public List<String> handleItemTooltip( + GuiContainer gui, ItemStack itemstack, int mousex, int mousey, List<String> currenttip) { + return currenttip; } @Override @@ -616,21 +557,21 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { public void onKeyTyped(GuiContainer gui, char keyChar, int keyID) {} @Override - public void onMouseClicked(GuiContainer gui, int mouseX, int mouseY, int button) {} + public void onMouseClicked(GuiContainer gui, int mousex, int mousey, int button) {} @Override - public void onMouseUp(GuiContainer gui, int mouseX, int mouseY, int button) {} + public void onMouseUp(GuiContainer gui, int mousex, int mousey, int button) {} @Override - public boolean mouseScrolled(GuiContainer gui, int mouseX, int mouseY, int scrolled) { + public boolean mouseScrolled(GuiContainer gui, int mousex, int mousey, int scrolled) { return false; } @Override - public void onMouseScrolled(GuiContainer gui, int mouseX, int mouseY, int scrolled) {} + public void onMouseScrolled(GuiContainer gui, int mousex, int mousey, int scrolled) {} @Override - public void onMouseDragged(GuiContainer gui, int mouseX, int mouseY, int button, long heldTime) {} + public void onMouseDragged(GuiContainer gui, int mousex, int mousey, int button, long heldTime) {} } public static class FixedPositionedStack extends PositionedStack { @@ -680,7 +621,7 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { } this.items = tDisplayStacks.toArray(new ItemStack[0]); if (this.items.length == 0) { - this.items = new ItemStack[]{new ItemStack(Blocks.fire)}; + this.items = new ItemStack[] {new ItemStack(Blocks.fire)}; } this.permutated = true; setPermutationToRender(0); @@ -693,8 +634,15 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { public final List<PositionedStack> mInputs; // Draw a grid of fluids and items (in that order). - @SuppressWarnings("unused") // Public API method - public void drawNEIItemAndFluidGrid(ItemStack[] ItemArray, FluidStack[] FluidArray, int x_coord_origin, int y_coord_origin, int x_dir_max_items, int y_max_dir_max_items, GT_Recipe Recipe, boolean is_input) { + public void drawNEIItemAndFluidGrid( + ItemStack[] ItemArray, + FluidStack[] FluidArray, + int x_coord_origin, + int y_coord_origin, + int x_dir_max_items, + int y_max_dir_max_items, + GT_Recipe Recipe, + boolean is_input) { if (ItemArray.length + FluidArray.length > x_dir_max_items * y_max_dir_max_items) { GT_Log.err.println("Recipe cannot be properly displayed in NEI due to too many items/fluids."); } @@ -704,12 +652,17 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { int x_coord = x_coord_origin; int y_coord = y_coord_origin; - for(FluidStack fluid : FluidArray) { + for (FluidStack fluid : FluidArray) { if (fluid != GT_Values.NF) { if (is_input) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(fluid, true), x_coord, y_coord, true)); + this.mInputs.add(new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(fluid, true), x_coord, y_coord, true)); } else { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(fluid, true), x_coord, y_coord, GT_NEI_DefaultHandler.this.mRecipeMap.mNEIUnificateOutput)); + this.mOutputs.add(new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(fluid, true), + x_coord, + y_coord, + GT_NEI_DefaultHandler.this.mRecipeMap.mNEIUnificateOutput)); } x_coord += 18; if (x_coord == x_max) { @@ -721,12 +674,17 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { // Iterate over all items in array and display them. int special_counter = 0; - for(ItemStack item : ItemArray) { + for (ItemStack item : ItemArray) { if (item != GT_Values.NI) { if (is_input) { mInputs.add(new FixedPositionedStack(item, x_coord, y_coord, true)); } else { - mOutputs.add(new FixedPositionedStack(item, x_coord, y_coord, Recipe.getOutputChance(special_counter), GT_NEI_DefaultHandler.this.mRecipeMap.mNEIUnificateOutput)); + mOutputs.add(new FixedPositionedStack( + item, + x_coord, + y_coord, + Recipe.getOutputChance(special_counter), + GT_NEI_DefaultHandler.this.mRecipeMap.mNEIUnificateOutput)); special_counter++; } x_coord += 18; @@ -736,30 +694,42 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { } } } - } - + ; // Draws a grid of items for NEI rendering. - private void drawNEIItemGrid(ItemStack[] ItemArray, int x_coord_origin, int y_coord_origin, int x_dir_max_items, int y_max_dir_max_items, GT_Recipe Recipe, boolean is_input) { + private void drawNEIItemGrid( + ItemStack[] ItemArray, + int x_coord_origin, + int y_coord_origin, + int x_dir_max_items, + int y_max_dir_max_items, + GT_Recipe Recipe, + boolean is_input) { if (ItemArray.length > x_dir_max_items * y_max_dir_max_items) { GT_Log.err.println("Recipe cannot be properly displayed in NEI due to too many items."); } - // 18 pixels to get to a new grid for placing an item tile since they are 16x16 and have 1 pixel buffers around them. + // 18 pixels to get to a new grid for placing a item tile since they are 16x16 and have 1 pixel buffers + // around them. int x_max = x_coord_origin + x_dir_max_items * 18; - // Temp variables to keep track of current coordinates to place item at. + // Temp variables to keep track of current coords to place item at. int x_coord = x_coord_origin; int y_coord = y_coord_origin; // Iterate over all items in array and display them. int special_counter = 0; - for(ItemStack item : ItemArray) { + for (ItemStack item : ItemArray) { if (item != GT_Values.NI) { if (is_input) { mInputs.add(new FixedPositionedStack(item, x_coord, y_coord, true)); } else { - mOutputs.add(new FixedPositionedStack(item, x_coord, y_coord, Recipe.getOutputChance(special_counter), GT_NEI_DefaultHandler.this.mRecipeMap.mNEIUnificateOutput)); + mOutputs.add(new FixedPositionedStack( + item, + x_coord, + y_coord, + Recipe.getOutputChance(special_counter), + GT_NEI_DefaultHandler.this.mRecipeMap.mNEIUnificateOutput)); special_counter++; } x_coord += 18; @@ -771,7 +741,50 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { } } - @SuppressWarnings("deprecation") + // Draws a grid of fluids for NEI rendering. + private void drawNEIFluidGrid( + FluidStack[] FluidArray, + int x_coord_origin, + int y_coord_origin, + int x_dir_max_fluids, + int y_max_dir_max_fluids, + GT_Recipe Recipe, + boolean is_input) { + + if (FluidArray.length > x_dir_max_fluids * y_max_dir_max_fluids) { + GT_Log.err.println("Recipe cannot be properly displayed in NEI due to too many fluids."); + } + + // 18 pixels to get to a new grid for placing a fluid tile since they are 16x16 and have 1 pixel buffers + // around them. + int x_max = x_coord_origin + x_dir_max_fluids * 18; + + // Temp variables to keep track of current coords to place fluid at. + int x_coord = x_coord_origin; + int y_coord = y_coord_origin; + + // Iterate over all fluids in array and display them. + for (FluidStack fluid : FluidArray) { + if (fluid != GT_Values.NF) { + if (is_input) { + this.mInputs.add(new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(fluid, true), x_coord, y_coord, true)); + } else { + this.mOutputs.add(new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(fluid, true), + x_coord, + y_coord, + GT_NEI_DefaultHandler.this.mRecipeMap.mNEIUnificateOutput)); + } + x_coord += 18; + if (x_coord == x_max) { + x_coord = x_coord_origin; + y_coord += 18; + } + } + } + } + public CachedDefaultRecipe(GT_Recipe aRecipe) { super(); this.mRecipe = aRecipe; @@ -779,27 +792,6 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { List<PositionedStack> maybeOut; try { - maybeIn = GT_NEI_DefaultHandler.this.mRecipeMap.getInputPositionedStacks(aRecipe); - } catch (NullPointerException npe) { - maybeIn = null; - GT_Log.err.println("CachedDefaultRecipe - Invalid InputPositionedStacks " + aRecipe); - npe.printStackTrace(GT_Log.err); - } - try { - maybeOut = GT_NEI_DefaultHandler.this.mRecipeMap.getOutputPositionedStacks(aRecipe); - } catch (NullPointerException npe) { - maybeOut = null; - GT_Log.err.println("CachedDefaultRecipe - Invalid OutputPositionedStacks " + aRecipe); - npe.printStackTrace(GT_Log.err); - } - - if (maybeOut != null && maybeIn != null) { - mOutputs = maybeOut; - mInputs = maybeIn; - return; - } - - try { maybeIn = aRecipe.getInputPositionedStacks(); } catch (NullPointerException npe) { maybeIn = null; @@ -837,6 +829,8 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { drawNEIItemGrid(aRecipe.mInputs, 12, 14, 3, 1, aRecipe, true); break; case 4: + drawNEIItemGrid(aRecipe.mInputs, 12, 14, 3, 2, aRecipe, true); + break; case 5: drawNEIItemGrid(aRecipe.mInputs, 12, 14, 3, 2, aRecipe, true); break; @@ -845,7 +839,7 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { break; default: drawNEIItemGrid(aRecipe.mInputs, 12, -4, 3, 3, aRecipe, true); - } + } switch (GT_NEI_DefaultHandler.this.mRecipeMap.mUsualOutputCount) { case 0: @@ -863,44 +857,66 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { drawNEIItemGrid(aRecipe.mOutputs, 102, 5, 2, 2, aRecipe, false); break; case 5: + drawNEIItemGrid(aRecipe.mOutputs, 102, 5, 3, 2, aRecipe, false); + break; case 6: drawNEIItemGrid(aRecipe.mOutputs, 102, 5, 3, 2, aRecipe, false); break; default: drawNEIItemGrid(aRecipe.mOutputs, 102, -4, 3, 3, aRecipe, false); - } + } - // ??? No idea what this does. Leaving it alone. - if (aRecipe.mSpecialItems != null) { - this.mInputs.add(new FixedPositionedStack(aRecipe.mSpecialItems, 120, 52)); - } + // ??? No idea what this does. Leaving it alone. + if (aRecipe.mSpecialItems != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.mSpecialItems, 120, 52)); + } - if ((aRecipe.mFluidInputs.length > 0) && (aRecipe.mFluidInputs[0] != null) && (aRecipe.mFluidInputs[0].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[0], true), 48, 52)); - if ((aRecipe.mFluidInputs.length > 1) && (aRecipe.mFluidInputs[1] != null) && (aRecipe.mFluidInputs[1].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[1], true), 30, 52)); - } + if ((aRecipe.mFluidInputs.length > 0) + && (aRecipe.mFluidInputs[0] != null) + && (aRecipe.mFluidInputs[0].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[0], true), 48, 52)); + if ((aRecipe.mFluidInputs.length > 1) + && (aRecipe.mFluidInputs[1] != null) + && (aRecipe.mFluidInputs[1].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[1], true), 30, 52)); } + } - if (aRecipe.mFluidOutputs.length > 1) { - if (aRecipe.mFluidOutputs[0] != null && (aRecipe.mFluidOutputs[0].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[0], true), 120, 5)); - } - if (aRecipe.mFluidOutputs[1] != null && (aRecipe.mFluidOutputs[1].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[1], true), 138, 5)); - } - if (aRecipe.mFluidOutputs.length > 2 && aRecipe.mFluidOutputs[2] != null && (aRecipe.mFluidOutputs[2].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[2], true), 102, 23)); - } - if (aRecipe.mFluidOutputs.length > 3 && aRecipe.mFluidOutputs[3] != null && (aRecipe.mFluidOutputs[3].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[3], true), 120, 23)); - } - if (aRecipe.mFluidOutputs.length > 4 && aRecipe.mFluidOutputs[4] != null && (aRecipe.mFluidOutputs[4].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[4], true), 138, 23)); - } - } else if ((aRecipe.mFluidOutputs.length > 0) && (aRecipe.mFluidOutputs[0] != null) && (aRecipe.mFluidOutputs[0].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[0], true), 102, 52)); + if (aRecipe.mFluidOutputs.length > 1) { + if (aRecipe.mFluidOutputs[0] != null && (aRecipe.mFluidOutputs[0].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[0], true), 120, 5)); } + if (aRecipe.mFluidOutputs[1] != null && (aRecipe.mFluidOutputs[1].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[1], true), 138, 5)); + } + if (aRecipe.mFluidOutputs.length > 2 + && aRecipe.mFluidOutputs[2] != null + && (aRecipe.mFluidOutputs[2].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[2], true), 102, 23)); + } + if (aRecipe.mFluidOutputs.length > 3 + && aRecipe.mFluidOutputs[3] != null + && (aRecipe.mFluidOutputs[3].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[3], true), 120, 23)); + } + if (aRecipe.mFluidOutputs.length > 4 + && aRecipe.mFluidOutputs[4] != null + && (aRecipe.mFluidOutputs[4].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[4], true), 138, 23)); + } + } else if ((aRecipe.mFluidOutputs.length > 0) + && (aRecipe.mFluidOutputs[0] != null) + && (aRecipe.mFluidOutputs[0].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack( + GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[0], true), 102, 52)); + } } @Override @@ -926,9 +942,11 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { private class SortedRecipeListCache { private int mCachedRecipesVersion = -1; + @Nullable private SoftReference<List<CachedDefaultRecipe>> mCachedRecipes; - private Map<Byte, Range<Integer>> mTierIndexes; + + private Range<Integer>[] mTierIndexes; private Range<Byte> mTierRange; public int getCachedRecipesVersion() { @@ -956,22 +974,21 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { } private void computeTierIndexes() { - // Holds 16 elements without rehashing - mTierIndexes = new HashMap<>(GT_Values.V.length + 1, 1f); - assert mCachedRecipes != null; - Iterator<CachedDefaultRecipe> iterator = Objects.requireNonNull(mCachedRecipes.get()).iterator(); + mTierIndexes = new Range[GT_Values.V.length]; + Iterator<CachedDefaultRecipe> iterator = mCachedRecipes.get().iterator(); int index = 0; int minIndex = 0; int maxIndex = -1; byte previousTier = -1; byte lowestTier = 0; - while(iterator.hasNext()) { + while (iterator.hasNext()) { CachedDefaultRecipe recipe = iterator.next(); - byte recipeTier = GT_Utility.getTier(recipe.mRecipe.mEUt / GT_NEI_DefaultHandler.this.mRecipeMap.mAmperage); + byte recipeTier = + GT_Utility.getTier(recipe.mRecipe.mEUt / GT_NEI_DefaultHandler.this.mRecipeMap.mAmperage); if (recipeTier != previousTier) { if (maxIndex != -1) { - mTierIndexes.put(previousTier, Range.between(minIndex, maxIndex)); + mTierIndexes[previousTier] = Range.between(minIndex, maxIndex); } else { lowestTier = recipeTier; } @@ -981,7 +998,7 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { maxIndex = index; index++; if (!iterator.hasNext()) { - mTierIndexes.put(recipeTier, Range.between(minIndex, maxIndex)); + mTierIndexes[recipeTier] = Range.between(minIndex, maxIndex); mTierRange = Range.between(lowestTier, recipeTier); } } @@ -989,18 +1006,18 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { private int getLowIndexForTier(byte lowerTier) { byte lowTier = (byte) Math.max(mTierRange.getMinimum(), lowerTier); - while (mTierIndexes.get(lowTier) == null) { + while (mTierIndexes[lowTier] == null) { lowTier++; } - return mTierIndexes.get(lowTier).getMinimum(); + return mTierIndexes[lowTier].getMinimum(); } private int getHighIndexForTier(byte upperTier) { byte highTier = (byte) Math.min(mTierRange.getMaximum(), upperTier); - while (mTierIndexes.get(highTier) == null) { + while (mTierIndexes[highTier] == null) { highTier--; } - return mTierIndexes.get(highTier).getMaximum(); + return mTierIndexes[highTier].getMaximum(); } } } diff --git a/src/main/java/gregtech/nei/NEIHandlerAbsoluteTooltip.java b/src/main/java/gregtech/nei/NEIHandlerAbsoluteTooltip.java index fae3b68882..e136a67c99 100644 --- a/src/main/java/gregtech/nei/NEIHandlerAbsoluteTooltip.java +++ b/src/main/java/gregtech/nei/NEIHandlerAbsoluteTooltip.java @@ -1,7 +1,6 @@ package gregtech.nei; import codechicken.lib.gui.GuiDraw; - import java.awt.*; import java.util.List; @@ -18,7 +17,7 @@ public class NEIHandlerAbsoluteTooltip { public void handleTooltip(List<String> currenttip, int recipeIndex) { displaySize = GuiDraw.displaySize(); if (shouldAddTooltip(recipeIndex)) { - currenttip.add(tooltip); + currenttip.add(tooltip); } } @@ -31,10 +30,9 @@ public class NEIHandlerAbsoluteTooltip { return area.contains(mousePos); } - private Point getRelMouse() { int ySize = Math.min(Math.max(displaySize.height - 68, 166), 370); - int guiLeft = (displaySize.width - 176) / 2; + int guiLeft = (displaySize.width - 176) / 2; int guiTop = (displaySize.height - ySize) / 2 + 10; Point mousePos = GuiDraw.getMousePosition(); return new Point(mousePos.x - guiLeft - 5, mousePos.y - guiTop - 38); @@ -47,6 +45,6 @@ public class NEIHandlerAbsoluteTooltip { private int getActualRecipesPerPage() { int ySize = Math.min(Math.max(displaySize.height - 68, 166), 370); - return (ySize - (12*3)) / 135; + return (ySize - (12 * 3)) / 135; } } diff --git a/src/main/java/gregtech/nei/NEI_GT_Config.java b/src/main/java/gregtech/nei/NEI_GT_Config.java index 0b4476eeef..150b434e6b 100644 --- a/src/main/java/gregtech/nei/NEI_GT_Config.java +++ b/src/main/java/gregtech/nei/NEI_GT_Config.java @@ -10,7 +10,6 @@ import cpw.mods.fml.common.event.FMLInterModComms; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.util.GT_Recipe; - import java.util.ArrayList; import java.util.Comparator; import java.util.List; @@ -29,15 +28,16 @@ public class NEI_GT_Config implements IConfigureNEI { .build(); private static final Comparator<RecipeMapHandler> RECIPE_MAP_HANDLER_COMPARATOR = - Comparator.comparingInt( - handler -> RECIPE_MAP_ORDERING.getOrDefault(handler.getRecipeMap(), 0)); + Comparator.comparingInt(handler -> RECIPE_MAP_ORDERING.getOrDefault(handler.getRecipeMap(), 0)); public static boolean sIsAdded = true; public static GT_NEI_AssLineHandler ALH; private static void addHandler(TemplateRecipeHandler handler) { FMLInterModComms.sendRuntimeMessage( - GT_Values.GT, "NEIPlugins", "register-crafting-handler", + GT_Values.GT, + "NEIPlugins", + "register-crafting-handler", "gregtech@" + handler.getRecipeName() + "@" + handler.getOverlayIdentifier()); GuiCraftingRecipe.craftinghandlers.add(handler); GuiUsageRecipe.usagehandlers.add(handler); diff --git a/src/main/java/gregtech/nei/NEI_TransferRectHost.java b/src/main/java/gregtech/nei/NEI_TransferRectHost.java index e04740cf99..8c649d8695 100644 --- a/src/main/java/gregtech/nei/NEI_TransferRectHost.java +++ b/src/main/java/gregtech/nei/NEI_TransferRectHost.java @@ -4,7 +4,10 @@ import java.awt.*; public interface NEI_TransferRectHost { String getNeiTransferRectString(); + String getNeiTransferRectTooltip(); + Object[] getNeiTransferRectArgs(); + Rectangle getNeiTransferRect(); } diff --git a/src/main/java/gregtech/nei/RecipeMapHandler.java b/src/main/java/gregtech/nei/RecipeMapHandler.java index 954f7ae7ba..7a644d8ad0 100644 --- a/src/main/java/gregtech/nei/RecipeMapHandler.java +++ b/src/main/java/gregtech/nei/RecipeMapHandler.java @@ -29,6 +29,8 @@ abstract class RecipeMapHandler extends TemplateRecipeHandler { } protected void drawText(int aX, int aY, String aString, int aColor) { - Minecraft.getMinecraft().fontRenderer.drawString(aString, aX, aY, overrideTextColor != -1 ? overrideTextColor : aColor); + Minecraft.getMinecraft() + .fontRenderer + .drawString(aString, aX, aY, overrideTextColor != -1 ? overrideTextColor : aColor); } } diff --git a/src/main/java/speiger/src/crops/api/ICropCardInfo.java b/src/main/java/speiger/src/crops/api/ICropCardInfo.java index 7f1a76f611..a82a864f6e 100644 --- a/src/main/java/speiger/src/crops/api/ICropCardInfo.java +++ b/src/main/java/speiger/src/crops/api/ICropCardInfo.java @@ -1,19 +1,17 @@ package speiger.src.crops.api; -import net.minecraft.item.ItemStack; - import java.util.List; +import net.minecraft.item.ItemStack; /** - * + * * @author Speiger * Class to add Informations from CropCards. * This has Priorty over the ICropInfo * @requirement: The class that implement this class need to extends CropCard */ -public interface ICropCardInfo -{ - public List<String> getCropInformation(); - - public ItemStack getDisplayItem(); +public interface ICropCardInfo { + public List<String> getCropInformation(); + + public ItemStack getDisplayItem(); } |